merge
gitea/salix/dev This commit looks good
Details
gitea/salix/dev This commit looks good
Details
This commit is contained in:
commit
c344d8088b
|
@ -113,10 +113,13 @@ module.exports = Self => {
|
|||
}
|
||||
|
||||
const isTicketEmpty = await models.Ticket.isEmpty(id, options);
|
||||
if (isTicketEmpty)
|
||||
await originalTicket.updateAttributes({isDeleted: true}, options);
|
||||
if (isTicketEmpty) {
|
||||
await originalTicket.updateAttributes({
|
||||
isDeleted: true
|
||||
}, options);
|
||||
}
|
||||
|
||||
if (tx.id) await tx.commit();
|
||||
await tx.commit();
|
||||
|
||||
return {id: ticketId};
|
||||
} catch (error) {
|
||||
|
|
|
@ -80,7 +80,7 @@ module.exports = Self => {
|
|||
fields: ['salesPersonFk']
|
||||
}
|
||||
},
|
||||
});
|
||||
}, options);
|
||||
const salesPersonId = ticket.client().salesPersonFk;
|
||||
const usesMana = await models.WorkerMana.findOne({
|
||||
where: {
|
||||
|
@ -102,10 +102,10 @@ module.exports = Self => {
|
|||
value: value,
|
||||
componentFk: componentId}, options);
|
||||
|
||||
const updatedSale = models.Sale.update({id: sale.id},
|
||||
const updatedSale = models.Sale.updateAll({id: sale.id},
|
||||
{discount: newDiscount}, options);
|
||||
|
||||
promises.push([newComponent, updatedSale]);
|
||||
promises.push(newComponent, updatedSale);
|
||||
}
|
||||
|
||||
await Promise.all(promises);
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
{
|
||||
"name": "Sale",
|
||||
"base": "VnModel",
|
||||
"base": "Loggable",
|
||||
"log": {
|
||||
"model": "TicketLog",
|
||||
"relation": "ticket",
|
||||
"showField": "concept"
|
||||
},
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "sale"
|
||||
|
|
Loading…
Reference in New Issue