#7896 - 24.36 Dev To Test #2884

Merged
jsegarra merged 118 commits from dev into test 2024-08-27 10:32:53 +00:00
6 changed files with 17 additions and 5 deletions
Showing only changes of commit 618baaf604 - Show all commits

View File

@ -97,7 +97,7 @@ BEGIN
AND (vCorrectingSerial = vSerial OR NOT hasAnyNegativeBase()) AND (vCorrectingSerial = vSerial OR NOT hasAnyNegativeBase())
THEN THEN
-- el trigger añade el siguiente Id_Factura correspondiente a la vSerial -- el trigger añade el siguiente ref correspondiente a la vSerial
INSERT INTO invoiceOut( INSERT INTO invoiceOut(
ref, ref,
serial, serial,

View File

@ -0,0 +1,2 @@
ALTER TABLE vn.invoiceOutSerial
MODIFY COLUMN `type` enum('global','quick','multiple') CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL NULL;

View File

@ -0,0 +1,3 @@
UPDATE vn.invoiceOutSerial
SET `type`='multiple'
WHERE `description` LIKE '%multiple%';

View File

@ -75,7 +75,7 @@ module.exports = Self => {
AND c.isTaxDataChecked AND c.isTaxDataChecked
AND c.isActive AND c.isActive
AND NOT t.isDeleted AND NOT t.isDeleted
GROUP BY c.id, IF(c.hasToInvoiceByAddress, a.id, TRUE) GROUP BY IF(c.hasToInvoiceByAddress, a.id, c.id)
HAVING SUM(t.totalWithVat) > 0;`; HAVING SUM(t.totalWithVat) > 0;`;
const addresses = await Self.rawSql(query, [ const addresses = await Self.rawSql(query, [

View File

@ -28,6 +28,11 @@ module.exports = Self => {
type: 'number', type: 'number',
description: 'The company id to invoice', description: 'The company id to invoice',
required: true required: true
}, {
arg: 'serialType',
type: 'string',
description: 'Type of serial',
required: true
} }
], ],
returns: { returns: {
@ -74,10 +79,9 @@ module.exports = Self => {
], options); ], options);
} }
const invoiceType = 'G';
const invoiceId = await models.Ticket.makeInvoice( const invoiceId = await models.Ticket.makeInvoice(
ctx, ctx,
invoiceType, serialType,
args.companyFk, args.companyFk,
args.invoiceDate, args.invoiceDate,
null, null,

View File

@ -20,6 +20,9 @@
}, },
"isCEE": { "isCEE": {
"type": "boolean" "type": "boolean"
},
"type": {
"type": "string"
} }
}, },
"relations": { "relations": {