Merge branch 'dev' into 7648_myEntries_filter
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Javier Segarra 2024-07-11 19:55:52 +02:00
commit 1c5ab395e6
8 changed files with 58 additions and 4 deletions

View File

@ -0,0 +1,12 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`productionConfig_afterDelete`
AFTER DELETE ON `productionConfig`
FOR EACH ROW
BEGIN
INSERT INTO productionConfig
SET `action` = 'delete',
`changedModel` = 'ProductionConfig',
`changedModelId` = OLD.id,
`userFk` = account.myUser_getId();
END$$
DELIMITER ;

View File

@ -0,0 +1,8 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`productionConfig_beforeInsert`
BEFORE INSERT ON `productionConfig`
FOR EACH ROW
BEGIN
SET NEW.editorFk = account.myUser_getId();
END$$
DELIMITER ;

View File

@ -0,0 +1,8 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`productionConfig_beforeUpdate`
BEFORE UPDATE ON `productionConfig`
FOR EACH ROW
BEGIN
SET NEW.editorFk = account.myUser_getId();
END$$
DELIMITER ;

View File

@ -0,0 +1,23 @@
ALTER TABLE vn.productionConfig
ADD editorFk int(10) unsigned DEFAULT NULL NULL;
ALTER TABLE vn.productionConfig
ADD CONSTRAINT productionConfig_user_FK FOREIGN KEY (editorFk) REFERENCES account.`user`(id);
CREATE OR REPLACE TABLE `vn`.`productionConfigLog` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`originFk` int(11) DEFAULT NULL,
`userFk` int(10) unsigned DEFAULT NULL,
`action` set('insert','update','delete','select') NOT NULL,
`creationDate` timestamp NULL DEFAULT current_timestamp(),
`description` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
`changedModel` enum('ProductionConfig') NOT NULL DEFAULT 'ProductionConfig',
`oldInstance` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`oldInstance`)),
`newInstance` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`newInstance`)),
`changedModelId` int(11) NOT NULL,
`changedModelValue` varchar(45) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `productionConfigLog_userFk` (`userFk`),
KEY `productionConfigLog_changedModel` (`changedModel`,`changedModelId`,`creationDate`),
KEY `productionConfigLog_originFk` (`originFk`,`creationDate`),
CONSTRAINT `productionConfigUserFk` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

View File

@ -104,7 +104,7 @@
<tr> <tr>
<td width="5%">{{sale.itemFk}}</td> <td width="5%">{{sale.itemFk}}</td>
<td class="number">{{sale.quantity}}</td> <td class="number">{{sale.quantity}}</td>
<td width="50%">{{sale.concept}}</td> <td width="50%">{{sale.concept}} <span class="font light-gray">{{sale.subName}}</span></td>
<td class="number">{{sale.price | currency('EUR', $i18n.locale)}}</td> <td class="number">{{sale.price | currency('EUR', $i18n.locale)}}</td>
<td class="centered" width="5%">{{(sale.discount / 100) | percentage}}</td> <td class="centered" width="5%">{{(sale.discount / 100) | percentage}}</td>
<td class="centered">{{sale.vatType}}</td> <td class="centered">{{sale.vatType}}</td>

View File

@ -34,4 +34,4 @@ plantPassport: Plant passport
observations: Observations observations: Observations
wireTransfer: "Pay method: Transferencia" wireTransfer: "Pay method: Transferencia"
accountNumber: "Account number: {0}" accountNumber: "Account number: {0}"
services: Services services: Services

View File

@ -34,4 +34,5 @@ plantPassport: Pasaporte fitosanitario
observations: Observaciones observations: Observaciones
wireTransfer: "Forma de pago: Transferencia" wireTransfer: "Forma de pago: Transferencia"
accountNumber: "Número de cuenta: {0}" accountNumber: "Número de cuenta: {0}"
services: Servicios services: Servicios

View File

@ -8,7 +8,8 @@ SELECT
s.itemFk, s.itemFk,
s.concept, s.concept,
tc.code vatType, tc.code vatType,
it.isPackaging it.isPackaging,
i.subName
FROM vn.invoiceOut io FROM vn.invoiceOut io
JOIN vn.ticket t ON t.refFk = io.ref JOIN vn.ticket t ON t.refFk = io.ref
JOIN vn.supplier su ON su.id = io.companyFk JOIN vn.supplier su ON su.id = io.companyFk
@ -38,6 +39,7 @@ SELECT
NULL, NULL,
ts.description, ts.description,
tc.code, tc.code,
NULL,
NULL NULL
FROM vn.invoiceOut io FROM vn.invoiceOut io
JOIN vn.ticket t ON t.refFk = io.ref JOIN vn.ticket t ON t.refFk = io.ref