feat: refs #7346 add multiple feature
gitea/salix/pipeline/pr-dev There was a failure building this commit Details

This commit is contained in:
Javi Gallego 2024-08-16 10:08:58 +02:00
parent f21c292e20
commit 575577d29b
5 changed files with 6 additions and 4 deletions

View File

@ -632,7 +632,7 @@ INSERT INTO `vn`.`invoiceOutSerial` (`code`, `description`, `isTaxed`, `taxAreaF
('A', 'Global nacional', 1, 'NATIONAL', 0, 'global'), ('A', 'Global nacional', 1, 'NATIONAL', 0, 'global'),
('T', 'Española rapida', 1, 'NATIONAL', 0, 'quick'), ('T', 'Española rapida', 1, 'NATIONAL', 0, 'quick'),
('V', 'Intracomunitaria global', 0, 'CEE', 1, 'global'), ('V', 'Intracomunitaria global', 0, 'CEE', 1, 'global'),
('M', 'Múltiple nacional', 1, 'NATIONAL', 0, 'quick'), ('M', 'Múltiple nacional', 1, 'NATIONAL', 0, 'multiple'),
('R', 'Rectificativa', 1, 'NATIONAL', 0, NULL), ('R', 'Rectificativa', 1, 'NATIONAL', 0, NULL),
('E', 'Exportación rápida', 0, 'WORLD', 0, 'quick'); ('E', 'Exportación rápida', 0, 'WORLD', 0, 'quick');

View File

@ -12,7 +12,7 @@ BEGIN
* @param vType Tipo de factura ['global','multiple','quick'] * @param vType Tipo de factura ['global','multiple','quick']
* @return vSerie de la factura * @return vSerie de la factura
*/ */
DECLARE vTaxArea VARCHAR(25); DECLARE vTaxArea VARCHAR(25) COLLATE utf8mb3_general_ci;
DECLARE vSerie CHAR(2); DECLARE vSerie CHAR(2);
IF (SELECT hasInvoiceSimplified FROM client WHERE id = vClientFk) THEN IF (SELECT hasInvoiceSimplified FROM client WHERE id = vClientFk) THEN

View File

@ -1,2 +1,4 @@
ALTER TABLE vn.invoiceOutSerial ALTER TABLE vn.invoiceOutSerial
MODIFY COLUMN `type` enum('global','quick','multiple') CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL NULL; MODIFY COLUMN `type` enum('global','quick','multiple') CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL NULL;
CREATE UNIQUE INDEX invoiceOutSerial_taxAreaFk_IDX USING BTREE ON vn.invoiceOutSerial (taxAreaFk,`type`);

View File

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

View File

@ -46,7 +46,7 @@ module.exports = Self => {
} }
}); });
filter = mergeFilters(args.filter, {where}); const filter = mergeFilters(args.filter, {where});
const stmt = new ParameterizedSQL( const stmt = new ParameterizedSQL(
`SELECT i.serial, SUM(IF(i.isBooked, 0,1)) pending, COUNT(*) total `SELECT i.serial, SUM(IF(i.isBooked, 0,1)) pending, COUNT(*) total