fix: option Error
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
568a77aa19
commit
fbba2e3fea
|
@ -64,7 +64,7 @@ module.exports = Self => {
|
|||
try {
|
||||
const client = await models.Client.findById(args.clientId, {
|
||||
fields: ['id', 'hasToInvoiceByAddress']
|
||||
}, options);
|
||||
}, myOptions);
|
||||
|
||||
if (client.hasToInvoiceByAddress) {
|
||||
await Self.rawSql('CALL ticketToInvoiceByAddress(?, ?, ?, ?)', [
|
||||
|
@ -72,13 +72,13 @@ module.exports = Self => {
|
|||
args.maxShipped,
|
||||
args.addressId,
|
||||
args.companyFk
|
||||
], options);
|
||||
], myOptions);
|
||||
} else {
|
||||
await Self.rawSql('CALL invoiceFromClient(?, ?, ?)', [
|
||||
args.maxShipped,
|
||||
client.id,
|
||||
args.companyFk
|
||||
], options);
|
||||
], myOptions);
|
||||
}
|
||||
|
||||
const invoiceId = await models.Ticket.makeInvoice(
|
||||
|
@ -87,7 +87,7 @@ module.exports = Self => {
|
|||
args.companyFk,
|
||||
args.invoiceDate,
|
||||
null,
|
||||
options
|
||||
myOptions
|
||||
);
|
||||
|
||||
if (tx) await tx.commit();
|
||||
|
|
Loading…
Reference in New Issue