fix: myOptions 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
61f806b0c9
commit
36e1cfd51a
|
@ -64,7 +64,7 @@ module.exports = Self => {
|
||||||
try {
|
try {
|
||||||
const client = await models.Client.findById(args.clientId, {
|
const client = await models.Client.findById(args.clientId, {
|
||||||
fields: ['id', 'hasToInvoiceByAddress']
|
fields: ['id', 'hasToInvoiceByAddress']
|
||||||
}, options);
|
}, myOptions);
|
||||||
|
|
||||||
if (client.hasToInvoiceByAddress) {
|
if (client.hasToInvoiceByAddress) {
|
||||||
await Self.rawSql('CALL ticketToInvoiceByAddress(?, ?, ?, ?)', [
|
await Self.rawSql('CALL ticketToInvoiceByAddress(?, ?, ?, ?)', [
|
||||||
|
@ -72,13 +72,13 @@ module.exports = Self => {
|
||||||
args.maxShipped,
|
args.maxShipped,
|
||||||
args.addressId,
|
args.addressId,
|
||||||
args.companyFk
|
args.companyFk
|
||||||
], options);
|
], myOptions);
|
||||||
} else {
|
} else {
|
||||||
await Self.rawSql('CALL invoiceFromClient(?, ?, ?)', [
|
await Self.rawSql('CALL invoiceFromClient(?, ?, ?)', [
|
||||||
args.maxShipped,
|
args.maxShipped,
|
||||||
client.id,
|
client.id,
|
||||||
args.companyFk
|
args.companyFk
|
||||||
], options);
|
], myOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
const invoiceId = await models.Ticket.makeInvoice(
|
const invoiceId = await models.Ticket.makeInvoice(
|
||||||
|
@ -87,7 +87,7 @@ module.exports = Self => {
|
||||||
args.companyFk,
|
args.companyFk,
|
||||||
args.invoiceDate,
|
args.invoiceDate,
|
||||||
null,
|
null,
|
||||||
options
|
myOptions
|
||||||
);
|
);
|
||||||
|
|
||||||
if (tx) await tx.commit();
|
if (tx) await tx.commit();
|
||||||
|
|
Loading…
Reference in New Issue