feat: conversion art. A1 a A2 refs #4979 #2171
|
@ -161,7 +161,6 @@ pipeline {
|
||||||
def packageJson = readJSON file: 'package.json'
|
def packageJson = readJSON file: 'package.json'
|
||||||
env.VERSION = packageJson.version
|
env.VERSION = packageJson.version
|
||||||
}
|
}
|
||||||
echo "BRANCH_NAME: ${env.BRANCH_NAME}"
|
|
||||||
sh 'gulp build'
|
sh 'gulp build'
|
||||||
sh 'docker-compose build front'
|
sh 'docker-compose build front'
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
DELIMITER $$
|
DELIMITER $$
|
||||||
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`xdiario_new`(vAsiento INT,
|
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`xdiario_new`(
|
||||||
|
vBookNumber INT,
|
||||||
vDated DATE,
|
vDated DATE,
|
||||||
vSubaccount VARCHAR(12),
|
vSubaccount VARCHAR(12),
|
||||||
vAccount VARCHAR(12),
|
vAccount VARCHAR(12),
|
||||||
|
@ -12,33 +13,33 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`xdiario_new`(vAsient
|
||||||
vVat DOUBLE,
|
vVat DOUBLE,
|
||||||
vRe DOUBLE,
|
vRe DOUBLE,
|
||||||
vAux TINYINT,
|
vAux TINYINT,
|
||||||
vCompany INT
|
vCompanyFk INT
|
||||||
)
|
)
|
||||||
RETURNS int(11)
|
RETURNS int(11)
|
||||||
NOT DETERMINISTIC
|
NOT DETERMINISTIC
|
||||||
NO SQL
|
NO SQL
|
||||||
BEGIN
|
BEGIN
|
||||||
IF vAsiento IS NULL THEN
|
IF vBookNumber IS NULL THEN
|
||||||
CALL vn.ledger_next(vAsiento);
|
CALL ledger_next(YEAR(vDated), vBookNumber);
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
INSERT INTO XDiario
|
INSERT INTO XDiario
|
||||||
SET ASIEN = vAsiento,
|
SET ASIEN = vBookNumber,
|
||||||
FECHA = vDated,
|
FECHA = vDated,
|
||||||
SUBCTA = vSubaccount,
|
SUBCTA = vSubaccount,
|
||||||
CONTRA = vAccount,
|
CONTRA = vAccount,
|
||||||
CONCEPTO = vConcept,
|
CONCEPTO = vConcept,
|
||||||
EURODEBE = vDebit,
|
EURODEBE = vDebit,
|
||||||
EUROHABER = vCredit,
|
EUROHABER = vCredit,
|
||||||
BASEEURO = vEuro,
|
BASEEURO = vEuro,
|
||||||
SERIE = vSerie,
|
SERIE = vSerie,
|
||||||
FACTURA = vInvoice,
|
FACTURA = vInvoice,
|
||||||
IVA = vVat,
|
IVA = vVat,
|
||||||
RECEQUIV = vRe,
|
RECEQUIV = vRe,
|
||||||
AUXILIAR = IF(vAux = FALSE, NULL, '*'),
|
AUXILIAR = IF(vAux = FALSE, NULL, '*'),
|
||||||
MONEDAUSO = 2,
|
MONEDAUSO = 2,
|
||||||
empresa_id = vCompany;
|
empresa_id = vCompanyFk;
|
||||||
|
|
||||||
RETURN vAsiento;
|
RETURN vBookNumber;
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
|
@ -2,127 +2,121 @@ DELIMITER $$
|
||||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`duaTaxBooking`(vDuaFk INT)
|
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`duaTaxBooking`(vDuaFk INT)
|
||||||
BEGIN
|
BEGIN
|
||||||
DECLARE vBookNumber INT;
|
DECLARE vBookNumber INT;
|
||||||
DECLARE vBookDated DATE;
|
DECLARE vBookDated DATE;
|
||||||
DECLARE vDiff DECIMAL(10,2);
|
DECLARE vDiff DECIMAL(10,2);
|
||||||
DECLARE vApunte BIGINT;
|
DECLARE vApunte BIGINT;
|
||||||
|
|
||||||
SELECT ASIEN, IFNULL(bookEntried, util.VN_CURDATE()) INTO vBookNumber, vBookDated
|
SELECT ASIEN, IFNULL(bookEntried, util.VN_CURDATE())
|
||||||
FROM dua
|
INTO vBookNumber, vBookDated
|
||||||
|
FROM dua
|
||||||
WHERE id = vDuaFk;
|
WHERE id = vDuaFk;
|
||||||
|
|
||||||
IF vBookNumber IS NULL OR NOT vBookNumber THEN
|
IF vBookNumber IS NULL OR NOT vBookNumber THEN
|
||||||
CALL ledger_next(vBookNumber);
|
CALL ledger_next(YEAR(vBookDated), vBookNumber);
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
-- Apunte de la aduana
|
-- Apunte de la aduana
|
||||||
|
|
||||||
INSERT INTO XDiario(
|
INSERT INTO XDiario(
|
||||||
ASIEN,
|
ASIEN,
|
||||||
FECHA,
|
FECHA,
|
||||||
SUBCTA,
|
SUBCTA,
|
||||||
CONCEPTO,
|
CONCEPTO,
|
||||||
EUROHABER,
|
EUROHABER,
|
||||||
SERIE,
|
SERIE,
|
||||||
empresa_id,
|
empresa_id,
|
||||||
CLAVE,
|
CLAVE,
|
||||||
FACTURA)
|
FACTURA)
|
||||||
|
SELECT vBookNumber,
|
||||||
|
d.bookEntried,
|
||||||
|
'4700000999',
|
||||||
|
CONCAT('DUA ',d.`code`),
|
||||||
|
sum(dt.base * dt.rate / 100) EUROHABER,
|
||||||
|
'R',
|
||||||
|
d.companyFk,
|
||||||
|
vDuaFk,
|
||||||
|
vDuaFk
|
||||||
|
FROM duaTax dt
|
||||||
|
JOIN dua d ON d.id = dt.duaFk
|
||||||
|
WHERE dt.duaFk = vDuaFk;
|
||||||
|
|
||||||
SELECT
|
-- Apuntes por tipo de IVA y proveedor
|
||||||
vBookNumber,
|
INSERT INTO XDiario(
|
||||||
d.bookEntried,
|
ASIEN,
|
||||||
'4700000999',
|
FECHA,
|
||||||
CONCAT('DUA ',d.`code`),
|
SUBCTA,
|
||||||
sum(dt.base * dt.rate / 100) EUROHABER,
|
CONTRA,
|
||||||
'R',
|
EURODEBE,
|
||||||
d.companyFk,
|
BASEEURO,
|
||||||
vDuaFk,
|
CONCEPTO,
|
||||||
vDuaFk
|
FACTURA,
|
||||||
FROM duaTax dt
|
IVA,
|
||||||
JOIN dua d ON d.id = dt.duaFk
|
AUXILIAR,
|
||||||
WHERE dt.duaFk = vDuaFk;
|
SERIE,
|
||||||
|
FECHA_EX,
|
||||||
-- Apuntes por tipo de IVA y proveedor
|
FECHA_OP,
|
||||||
|
FACTURAEX,
|
||||||
INSERT INTO XDiario(
|
NFACTICK,
|
||||||
ASIEN,
|
L340,
|
||||||
FECHA,
|
LDIFADUAN,
|
||||||
SUBCTA,
|
TIPOCLAVE,
|
||||||
CONTRA,
|
TIPOEXENCI,
|
||||||
EURODEBE,
|
TIPONOSUJE,
|
||||||
BASEEURO,
|
TIPOFACT,
|
||||||
CONCEPTO,
|
TIPORECTIF,
|
||||||
FACTURA,
|
TERIDNIF,
|
||||||
IVA,
|
TERNIF,
|
||||||
AUXILIAR,
|
TERNOM,
|
||||||
SERIE,
|
empresa_id,
|
||||||
FECHA_EX,
|
FECREGCON)
|
||||||
FECHA_OP,
|
SELECT vBookNumber ASIEN,
|
||||||
FACTURAEX,
|
vBookDated FECHA,
|
||||||
NFACTICK,
|
tr.account SUBCTA,
|
||||||
L340,
|
'4330002067' CONTRA,
|
||||||
LDIFADUAN,
|
SUM(dt.tax) EURODEBE,
|
||||||
TIPOCLAVE,
|
SUM(dt.base) BASEEURO,
|
||||||
TIPOEXENCI,
|
CONCAT('DUA nº',d.code) CONCEPTO,
|
||||||
TIPONOSUJE,
|
d.id FACTURA,
|
||||||
TIPOFACT,
|
dt.rate IVA,
|
||||||
TIPORECTIF,
|
'*' AUXILIAR,
|
||||||
TERIDNIF,
|
'D' SERIE,
|
||||||
TERNIF,
|
d.issued FECHA_EX,
|
||||||
TERNOM,
|
d.operated FECHA_OP,
|
||||||
empresa_id,
|
d.code FACTURAEX,
|
||||||
FECREGCON
|
1 NFACTICK,
|
||||||
)
|
1 L340,
|
||||||
|
TRUE LDIFADUAN,
|
||||||
SELECT
|
1 TIPOCLAVE,
|
||||||
vBookNumber ASIEN,
|
1 TIPOEXENCI,
|
||||||
vBookDated FECHA,
|
1 TIPONOSUJE,
|
||||||
tr.account SUBCTA,
|
5 TIPOFACT,
|
||||||
'4330002067' CONTRA,
|
1 TIPORECTIF,
|
||||||
sum(dt.tax) EURODEBE,
|
IF(c.code = 'ES', 1, 4) TERIDNIF,
|
||||||
sum(dt.base) BASEEURO,
|
s.nif TERNIF,
|
||||||
CONCAT('DUA nº',d.code) CONCEPTO,
|
s.name TERNOM,
|
||||||
d.id FACTURA,
|
d.companyFk,
|
||||||
dt.rate IVA,
|
d.booked FECREGCON
|
||||||
'*' AUXILIAR,
|
FROM duaTax dt
|
||||||
'D' SERIE,
|
JOIN dua d ON dt.duaFk = d.id
|
||||||
d.issued FECHA_EX,
|
JOIN (SELECT account, rate
|
||||||
d.operated FECHA_OP,
|
FROM
|
||||||
d.code FACTURAEX,
|
(SELECT rate, account
|
||||||
1 NFACTICK,
|
FROM invoiceInTaxBookingAccount ta
|
||||||
1 L340,
|
WHERE ta.effectived <= vBookDated
|
||||||
TRUE LDIFADUAN,
|
AND taxAreaFk = 'WORLD'
|
||||||
1 TIPOCLAVE,
|
ORDER BY ta.effectived DESC
|
||||||
1 TIPOEXENCI,
|
LIMIT 10000000000000000000
|
||||||
1 TIPONOSUJE,
|
) tba
|
||||||
5 TIPOFACT,
|
GROUP BY rate
|
||||||
1 TIPORECTIF,
|
|
||||||
IF(c.code = 'ES', 1, 4) TERIDNIF,
|
|
||||||
s.nif TERNIF,
|
|
||||||
s.name TERNOM,
|
|
||||||
d.companyFk,
|
|
||||||
d.booked FECREGCON
|
|
||||||
FROM duaTax dt
|
|
||||||
JOIN dua d ON dt.duaFk = d.id
|
|
||||||
JOIN (SELECT account, rate
|
|
||||||
FROM
|
|
||||||
(SELECT rate, account
|
|
||||||
FROM invoiceInTaxBookingAccount ta
|
|
||||||
WHERE ta.effectived <= vBookDated
|
|
||||||
AND taxAreaFk = 'WORLD'
|
|
||||||
ORDER BY ta.effectived DESC
|
|
||||||
LIMIT 10000000000000000000
|
|
||||||
) tba
|
|
||||||
GROUP BY rate
|
|
||||||
) tr ON tr.rate = dt.rate
|
) tr ON tr.rate = dt.rate
|
||||||
JOIN supplier s ON s.id = d.companyFk
|
JOIN supplier s ON s.id = d.companyFk
|
||||||
JOIN country c ON c.id = s.countryFk
|
JOIN country c ON c.id = s.countryFk
|
||||||
WHERE d.id = vDuaFk
|
WHERE d.id = vDuaFk
|
||||||
GROUP BY dt.rate;
|
GROUP BY dt.rate;
|
||||||
|
|
||||||
SELECT SUM(EURODEBE) -SUM(EUROHABER), MAX(id) INTO vDiff, vApunte
|
SELECT SUM(EURODEBE) -SUM(EUROHABER), MAX(id) INTO vDiff, vApunte
|
||||||
FROM XDiario
|
FROM XDiario
|
||||||
WHERE ASIEN = vBookNumber;
|
WHERE ASIEN = vBookNumber;
|
||||||
|
|
||||||
UPDATE XDiario
|
UPDATE XDiario
|
||||||
SET BASEEURO = 100 * (EURODEBE - vDiff) / IVA,
|
SET BASEEURO = 100 * (EURODEBE - vDiff) / IVA,
|
||||||
EURODEBE = EURODEBE - vDiff
|
EURODEBE = EURODEBE - vDiff
|
||||||
|
@ -131,6 +125,5 @@ BEGIN
|
||||||
UPDATE dua
|
UPDATE dua
|
||||||
SET ASIEN = vBookNumber
|
SET ASIEN = vBookNumber
|
||||||
WHERE id = vDuaFk;
|
WHERE id = vDuaFk;
|
||||||
|
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -1,24 +1,24 @@
|
||||||
DELIMITER $$
|
DELIMITER $$
|
||||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`invoiceInTax_getFromEntries`(IN vInvoiceInFk INT)
|
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`invoiceInTax_getFromEntries`(
|
||||||
|
IN vInvoiceInFk INT
|
||||||
|
)
|
||||||
BEGIN
|
BEGIN
|
||||||
DECLARE vRate DOUBLE DEFAULT 1;
|
DECLARE vRate DOUBLE DEFAULT 1;
|
||||||
DECLARE vDated DATE;
|
|
||||||
DECLARE vExpenseFk VARCHAR(10);
|
DECLARE vExpenseFk VARCHAR(10);
|
||||||
|
|
||||||
SELECT MAX(rr.dated) INTO vDated
|
WITH rate AS(
|
||||||
FROM referenceRate rr
|
SELECT MAX(rr.dated) dated, ii.currencyFk
|
||||||
JOIN invoiceIn ii ON ii.id = vInvoiceInFk
|
FROM vn.invoiceIn ii
|
||||||
WHERE rr.dated <= ii.issued
|
JOIN vn.referenceRate rr ON rr.currencyFk = ii.currencyFk
|
||||||
AND rr.currencyFk = ii.currencyFk ;
|
WHERE ii.id = vInvoiceInFk
|
||||||
|
AND rr.dated <= ii.issued
|
||||||
IF vDated THEN
|
) SELECT `value` INTO vRate
|
||||||
SELECT `value` INTO vRate
|
FROM vn.referenceRate rr
|
||||||
FROM referenceRate
|
JOIN rate r ON r.dated = rr.dated
|
||||||
WHERE dated = vDated;
|
AND r.currencyFk = rr.currencyFk;
|
||||||
END IF;
|
|
||||||
|
|
||||||
SELECT id INTO vExpenseFk
|
SELECT id INTO vExpenseFk
|
||||||
FROM vn.expense
|
FROM expense
|
||||||
WHERE `name` = 'Adquisición mercancia Extracomunitaria'
|
WHERE `name` = 'Adquisición mercancia Extracomunitaria'
|
||||||
GROUP BY id
|
GROUP BY id
|
||||||
LIMIT 1;
|
LIMIT 1;
|
||||||
|
@ -26,19 +26,25 @@ BEGIN
|
||||||
DELETE FROM invoiceInTax
|
DELETE FROM invoiceInTax
|
||||||
WHERE invoiceInFk = vInvoiceInFk;
|
WHERE invoiceInFk = vInvoiceInFk;
|
||||||
|
|
||||||
INSERT INTO invoiceInTax(invoiceInFk, taxableBase, expenseFk, foreignValue, taxTypeSageFk, transactionTypeSageFk)
|
INSERT INTO invoiceInTax(
|
||||||
SELECT ii.id,
|
invoiceInFk,
|
||||||
SUM(b.buyingValue * b.quantity) / IFNULL(vRate,1) taxableBase,
|
taxableBase,
|
||||||
vExpenseFk,
|
expenseFk,
|
||||||
IF(ii.currencyFk = 1,NULL,SUM(b.buyingValue * b.quantity )) divisa,
|
foreignValue,
|
||||||
taxTypeSageFk,
|
taxTypeSageFk,
|
||||||
transactionTypeSageFk
|
transactionTypeSageFk
|
||||||
|
)SELECT ii.id,
|
||||||
|
SUM(b.buyingValue * b.quantity) / vRate taxableBase,
|
||||||
|
vExpenseFk,
|
||||||
|
IF(ii.currencyFk = 1,
|
||||||
|
NULL,
|
||||||
|
SUM(b.buyingValue * b.quantity )),
|
||||||
|
taxTypeSageFk,
|
||||||
|
transactionTypeSageFk
|
||||||
FROM invoiceIn ii
|
FROM invoiceIn ii
|
||||||
JOIN entry e ON e.invoiceInFk = ii.id
|
JOIN entry e ON e.invoiceInFk = ii.id
|
||||||
JOIN supplier s ON s.id = e.supplierFk
|
JOIN supplier s ON s.id = e.supplierFk
|
||||||
JOIN buy b ON b.entryFk = e.id
|
JOIN buy b ON b.entryFk = e.id
|
||||||
LEFT JOIN referenceRate rr ON rr.currencyFk = ii.currencyFk
|
|
||||||
AND rr.dated = ii.issued
|
|
||||||
WHERE ii.id = vInvoiceInFk
|
WHERE ii.id = vInvoiceInFk
|
||||||
HAVING taxableBase IS NOT NULL;
|
HAVING taxableBase IS NOT NULL;
|
||||||
END$$
|
END$$
|
||||||
|
|
|
@ -2,6 +2,7 @@ DELIMITER $$
|
||||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`invoiceIn_booking`(vSelf INT)
|
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`invoiceIn_booking`(vSelf INT)
|
||||||
BEGIN
|
BEGIN
|
||||||
DECLARE vBookNumber INT;
|
DECLARE vBookNumber INT;
|
||||||
|
DECLARE vFiscalYear INT;
|
||||||
|
|
||||||
CREATE OR REPLACE TEMPORARY TABLE tInvoiceIn
|
CREATE OR REPLACE TEMPORARY TABLE tInvoiceIn
|
||||||
ENGINE = MEMORY
|
ENGINE = MEMORY
|
||||||
|
@ -56,7 +57,8 @@ BEGIN
|
||||||
LEFT JOIN sage.taxType tt ON tt.id = ti.CodigoIva
|
LEFT JOIN sage.taxType tt ON tt.id = ti.CodigoIva
|
||||||
WHERE ii.id = vSelf;
|
WHERE ii.id = vSelf;
|
||||||
|
|
||||||
CALL vn.ledger_next(vBookNumber);
|
SELECT YEAR(bookEntried) INTO vFiscalYear FROM tInvoiceIn LIMIT 1;
|
||||||
|
CALL ledger_next(vFiscalYear, vBookNumber);
|
||||||
|
|
||||||
-- Apunte del proveedor
|
-- Apunte del proveedor
|
||||||
INSERT INTO XDiario(
|
INSERT INTO XDiario(
|
||||||
|
|
|
@ -1,22 +1,24 @@
|
||||||
DELIMITER $$
|
DELIMITER $$
|
||||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`invoiceOutBooking`(IN vInvoice INT)
|
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`invoiceOutBooking`(IN vInvoice INT)
|
||||||
BEGIN
|
BEGIN
|
||||||
/* Asienta la factura emitida
|
/**
|
||||||
*
|
* Asienta una factura emitida
|
||||||
* param vInvoice factura_id
|
*
|
||||||
*/
|
* @param vInvoice Id invoiceOut
|
||||||
|
*/
|
||||||
DECLARE vBookNumber INT;
|
DECLARE vBookNumber INT;
|
||||||
DECLARE vExpenseConcept VARCHAR(50);
|
DECLARE vExpenseConcept VARCHAR(50);
|
||||||
DECLARE vSpainCountryFk INT;
|
DECLARE vSpainCountryFk INT;
|
||||||
DECLARE vOldBookNumber INT;
|
DECLARE vOldBookNumber INT;
|
||||||
|
DECLARE vFiscalYear INT;
|
||||||
|
|
||||||
SELECT id INTO vSpainCountryFk FROM country WHERE code = 'ES';
|
SELECT id INTO vSpainCountryFk FROM country WHERE `code` = 'ES';
|
||||||
|
|
||||||
SELECT ASIEN
|
SELECT ASIEN
|
||||||
INTO vOldBookNumber
|
INTO vOldBookNumber
|
||||||
FROM XDiario x
|
FROM XDiario x
|
||||||
JOIN invoiceOut io ON io.id = vInvoice
|
JOIN invoiceOut io ON io.id = vInvoice
|
||||||
WHERE x.SERIE = io.serial
|
WHERE x.SERIE = io.serial
|
||||||
AND x.FACTURA = RIGHT(io.ref, LENGTH(io.ref) - 1)
|
AND x.FACTURA = RIGHT(io.ref, LENGTH(io.ref) - 1)
|
||||||
LIMIT 1;
|
LIMIT 1;
|
||||||
|
|
||||||
|
@ -26,140 +28,133 @@ BEGIN
|
||||||
|
|
||||||
DROP TEMPORARY TABLE IF EXISTS rs;
|
DROP TEMPORARY TABLE IF EXISTS rs;
|
||||||
CREATE TEMPORARY TABLE rs
|
CREATE TEMPORARY TABLE rs
|
||||||
SELECT
|
SELECT c.accountingAccount clientBookingAccount,
|
||||||
c.accountingAccount AS clientBookingAccount,
|
io.amount totalAmount,
|
||||||
io.amount as totalAmount,
|
CONCAT('n/fra ', io.ref) simpleConcept,
|
||||||
CONCAT('n/fra ', io.ref) as simpleConcept,
|
CONCAT('n/fra ', io.ref, ' ', c.name) Concept,
|
||||||
CONCAT('n/fra ', io.ref, ' ', c.name) as Concept,
|
io.serial SERIE,
|
||||||
io.serial AS SERIE,
|
io.issued FECHA_EX,
|
||||||
io.issued AS FECHA_EX,
|
io.issued FECHA_OP,
|
||||||
io.issued AS FECHA_OP,
|
io.issued FECHA,
|
||||||
io.issued AS FECHA,
|
1 NFACTICK,
|
||||||
1 AS NFACTICK,
|
IF(ic.correctingFk,'D','') TIPOOPE,
|
||||||
IF(ic.correctingFk,'D','') AS TIPOOPE,
|
io.siiTrascendencyInvoiceOutFk TIPOCLAVE,
|
||||||
io.siiTrascendencyInvoiceOutFk AS TIPOCLAVE,
|
io.cplusTaxBreakFk TIPOEXENCI,
|
||||||
io.cplusTaxBreakFk AS TIPOEXENCI,
|
io.cplusSubjectOpFk TIPONOSUJE,
|
||||||
io.cplusSubjectOpFk AS TIPONOSUJE,
|
io.siiTypeInvoiceOutFk TIPOFACT,
|
||||||
io.siiTypeInvoiceOutFk AS TIPOFACT,
|
ic.cplusRectificationTypeFk TIPORECTIF,
|
||||||
ic.cplusRectificationTypeFk AS TIPORECTIF,
|
|
||||||
io.companyFk,
|
io.companyFk,
|
||||||
RIGHT(io.ref, LENGTH(io.ref) - 1) AS invoiceNum,
|
RIGHT(io.ref, LENGTH(io.ref) - 1) invoiceNum,
|
||||||
IF(c.countryFk = vSpainCountryFk, vSpainCountryFk, IF(ct.isUeeMember,2,4)) AS TERIDNIF,
|
IF(c.countryFk = vSpainCountryFk, vSpainCountryFk, IF(ct.isUeeMember,2,4)) TERIDNIF,
|
||||||
CONCAT(IF(ct.isUeeMember AND c.countryFk <> vSpainCountryFk,ct.code,''),c.fi) AS TERNIF,
|
CONCAT(IF(ct.isUeeMember AND c.countryFk <> vSpainCountryFk,ct.code,''),c.fi) TERNIF,
|
||||||
c.socialName AS TERNOM,
|
c.socialName TERNOM,
|
||||||
ior.serial AS SERIE_RT,
|
ior.serial SERIE_RT,
|
||||||
RIGHT(ior.ref, LENGTH(ior.ref) - 1) AS FACTU_RT,
|
RIGHT(ior.ref, LENGTH(ior.ref) - 1) FACTU_RT,
|
||||||
ior.issued AS FECHA_RT,
|
ior.issued FECHA_RT,
|
||||||
IF(ior.id,TRUE,FALSE) AS RECTIFICA
|
IF(ior.id,TRUE,FALSE) RECTIFICA
|
||||||
FROM invoiceOut io
|
FROM invoiceOut io
|
||||||
JOIN invoiceOutSerial ios ON ios.code = io.serial
|
JOIN invoiceOutSerial ios ON ios.code = io.serial
|
||||||
JOIN client c ON c.id = io.clientFk
|
JOIN client c ON c.id = io.clientFk
|
||||||
JOIN country ct ON ct.id = c.countryFk
|
JOIN country ct ON ct.id = c.countryFk
|
||||||
LEFT JOIN invoiceCorrection ic ON ic.correctingFk = io.id
|
LEFT JOIN invoiceCorrection ic ON ic.correctingFk = io.id
|
||||||
LEFT JOIN invoiceOut ior ON ior.id = ic.correctedFk
|
LEFT JOIN invoiceOut ior ON ior.id = ic.correctedFk
|
||||||
WHERE io.id = vInvoice;
|
WHERE io.id = vInvoice;
|
||||||
|
|
||||||
CALL vn.ledger_next(vBookNumber);
|
SELECT YEAR(FECHA) INTO vFiscalYear FROM rs LIMIT 1;
|
||||||
|
CALL ledger_next(vFiscalYear, vBookNumber);
|
||||||
-- Linea del cliente
|
-- Linea del cliente
|
||||||
INSERT INTO XDiario(
|
INSERT INTO XDiario(
|
||||||
ASIEN,
|
ASIEN,
|
||||||
FECHA,
|
FECHA,
|
||||||
SUBCTA,
|
SUBCTA,
|
||||||
EURODEBE,
|
EURODEBE,
|
||||||
CONCEPTO,
|
CONCEPTO,
|
||||||
FECHA_EX,
|
FECHA_EX,
|
||||||
FECHA_OP,
|
FECHA_OP,
|
||||||
empresa_id
|
empresa_id)
|
||||||
)
|
SELECT vBookNumber,
|
||||||
SELECT
|
|
||||||
vBookNumber AS ASIEN,
|
|
||||||
rs.FECHA,
|
rs.FECHA,
|
||||||
rs.clientBookingAccount AS SUBCTA,
|
rs.clientBookingAccount,
|
||||||
rs.totalAmount AS EURODEBE,
|
rs.totalAmount,
|
||||||
rs.simpleConcept AS CONCEPTO,
|
rs.simpleConcept,
|
||||||
rs.FECHA_EX,
|
rs.FECHA_EX,
|
||||||
rs.FECHA_OP,
|
rs.FECHA_OP,
|
||||||
rs.companyFk AS empresa_id
|
rs.companyFk
|
||||||
FROM rs;
|
FROM rs;
|
||||||
|
|
||||||
-- Lineas de gasto
|
-- Lineas de gasto
|
||||||
INSERT INTO XDiario(
|
INSERT INTO XDiario(
|
||||||
ASIEN,
|
ASIEN,
|
||||||
FECHA,
|
FECHA,
|
||||||
SUBCTA,
|
SUBCTA,
|
||||||
CONTRA,
|
CONTRA,
|
||||||
EUROHABER,
|
EUROHABER,
|
||||||
CONCEPTO,
|
CONCEPTO,
|
||||||
FECHA_EX,
|
FECHA_EX,
|
||||||
FECHA_OP,
|
FECHA_OP,
|
||||||
empresa_id
|
empresa_id)
|
||||||
)
|
SELECT vBookNumber,
|
||||||
SELECT
|
rs.FECHA,
|
||||||
vBookNumber AS ASIEN,
|
ioe.expenseFk,
|
||||||
rs.FECHA,
|
rs.clientBookingAccount,
|
||||||
ioe.expenseFk AS SUBCTA,
|
ioe.amount,
|
||||||
rs.clientBookingAccount AS CONTRA,
|
rs.Concept,
|
||||||
ioe.amount AS EUROHABER,
|
rs.FECHA_EX,
|
||||||
rs.Concept AS CONCEPTO,
|
rs.FECHA_OP,
|
||||||
rs.FECHA_EX,
|
rs.companyFk
|
||||||
rs.FECHA_OP,
|
FROM rs
|
||||||
rs.companyFk AS empresa_id
|
JOIN invoiceOutExpense ioe
|
||||||
FROM rs
|
WHERE ioe.invoiceOutFk = vInvoice;
|
||||||
JOIN invoiceOutExpense ioe
|
|
||||||
WHERE ioe.invoiceOutFk = vInvoice;
|
|
||||||
|
|
||||||
SELECT GROUP_CONCAT(`name` SEPARATOR ',')
|
SELECT GROUP_CONCAT(`name` SEPARATOR ',')
|
||||||
INTO vExpenseConcept
|
INTO vExpenseConcept
|
||||||
FROM expense e
|
FROM expense e
|
||||||
JOIN invoiceOutExpense ioe ON ioe.expenseFk = e.id
|
JOIN invoiceOutExpense ioe ON ioe.expenseFk = e.id
|
||||||
WHERE ioe.invoiceOutFk = vInvoice;
|
WHERE ioe.invoiceOutFk = vInvoice;
|
||||||
|
|
||||||
-- Lineas de IVA
|
-- Lineas de IVA
|
||||||
INSERT INTO XDiario(
|
INSERT INTO XDiario(
|
||||||
ASIEN,
|
ASIEN,
|
||||||
FECHA,
|
FECHA,
|
||||||
SUBCTA,
|
SUBCTA,
|
||||||
CONTRA,
|
CONTRA,
|
||||||
EUROHABER,
|
EUROHABER,
|
||||||
BASEEURO,
|
BASEEURO,
|
||||||
CONCEPTO,
|
CONCEPTO,
|
||||||
FACTURA,
|
FACTURA,
|
||||||
IVA,
|
IVA,
|
||||||
RECEQUIV,
|
RECEQUIV,
|
||||||
AUXILIAR,
|
AUXILIAR,
|
||||||
SERIE,
|
SERIE,
|
||||||
SERIE_RT,
|
SERIE_RT,
|
||||||
FACTU_RT,
|
FACTU_RT,
|
||||||
RECTIFICA,
|
RECTIFICA,
|
||||||
FECHA_RT,
|
FECHA_RT,
|
||||||
FECHA_OP,
|
FECHA_OP,
|
||||||
FECHA_EX,
|
FECHA_EX,
|
||||||
TIPOOPE,
|
TIPOOPE,
|
||||||
NFACTICK,
|
NFACTICK,
|
||||||
TERIDNIF,
|
TERIDNIF,
|
||||||
TERNIF,
|
TERNIF,
|
||||||
TERNOM,
|
TERNOM,
|
||||||
L340,
|
L340,
|
||||||
TIPOCLAVE,
|
TIPOCLAVE,
|
||||||
TIPOEXENCI,
|
TIPOEXENCI,
|
||||||
TIPONOSUJE,
|
TIPONOSUJE,
|
||||||
TIPOFACT,
|
TIPOFACT,
|
||||||
TIPORECTIF,
|
TIPORECTIF,
|
||||||
empresa_id
|
empresa_id)
|
||||||
)
|
SELECT vBookNumber ASIEN,
|
||||||
SELECT
|
|
||||||
vBookNumber AS ASIEN,
|
|
||||||
rs.FECHA,
|
rs.FECHA,
|
||||||
iot.pgcFk AS SUBCTA,
|
iot.pgcFk SUBCTA,
|
||||||
rs.clientBookingAccount AS CONTRA,
|
rs.clientBookingAccount CONTRA,
|
||||||
iot.vat AS EUROHABER,
|
iot.vat EUROHABER,
|
||||||
iot.taxableBase AS BASEEURO,
|
iot.taxableBase BASEEURO,
|
||||||
CONCAT(vExpenseConcept,' : ',rs.Concept) AS CONCEPTO,
|
CONCAT(vExpenseConcept,' : ',rs.Concept) CONCEPTO,
|
||||||
rs.invoiceNum AS FACTURA,
|
rs.invoiceNum FACTURA,
|
||||||
IF(pe2.equFk,0,pgc.rate) AS IVA,
|
IF(pe2.equFk,0,pgc.rate) IVA,
|
||||||
IF(pe2.equFk,0,pgce.rate) AS RECEQUIV,
|
IF(pe2.equFk,0,pgce.rate) RECEQUIV,
|
||||||
IF(pgc.mod347,'','*') AS AUXILIAR,
|
IF(pgc.mod347,'','*') AUXILIAR,
|
||||||
rs.SERIE,
|
rs.SERIE,
|
||||||
rs.SERIE_RT,
|
rs.SERIE_RT,
|
||||||
rs.FACTU_RT,
|
rs.FACTU_RT,
|
||||||
|
@ -168,27 +163,27 @@ BEGIN
|
||||||
rs.FECHA_OP,
|
rs.FECHA_OP,
|
||||||
rs.FECHA_EX,
|
rs.FECHA_EX,
|
||||||
rs.TIPOOPE,
|
rs.TIPOOPE,
|
||||||
rs.NFACTICK,
|
rs.NFACTICK,
|
||||||
rs.TERIDNIF,
|
rs.TERIDNIF,
|
||||||
rs.TERNIF,
|
rs.TERNIF,
|
||||||
rs.TERNOM,
|
rs.TERNOM,
|
||||||
pgc.mod340 AS L340,
|
pgc.mod340 L340,
|
||||||
pgc.siiTrascendencyInvoiceOutFk AS TIPOCLAVE,
|
pgc.siiTrascendencyInvoiceOutFk TIPOCLAVE,
|
||||||
pgc.cplusTaxBreakFk as TIPOEXENCI,
|
pgc.cplusTaxBreakFk TIPOEXENCI,
|
||||||
rs.TIPONOSUJE,
|
rs.TIPONOSUJE,
|
||||||
rs.TIPOFACT,
|
rs.TIPOFACT,
|
||||||
rs.TIPORECTIF,
|
rs.TIPORECTIF,
|
||||||
rs.companyFk AS empresa_id
|
rs.companyFk
|
||||||
FROM rs
|
FROM rs
|
||||||
JOIN invoiceOutTax iot
|
JOIN invoiceOutTax iot
|
||||||
JOIN pgc ON pgc.code = iot.pgcFk
|
JOIN pgc ON pgc.code = iot.pgcFk
|
||||||
LEFT JOIN pgcEqu pe ON pe.vatFk = iot.pgcFk -- --------------- Comprueba si la linea es de iva con rec.equiv. asociado
|
LEFT JOIN pgcEqu pe ON pe.vatFk = iot.pgcFk -- --------------- Comprueba si la linea es de iva con rec.equiv. asociado
|
||||||
LEFT JOIN pgc pgce ON pgce.code = pe.equFk
|
LEFT JOIN pgc pgce ON pgce.code = pe.equFk
|
||||||
LEFT JOIN pgcEqu pe2 ON pe2.equFk = iot.pgcFk -- --------------- Comprueba si la linea es de rec.equiv.
|
LEFT JOIN pgcEqu pe2 ON pe2.equFk = iot.pgcFk -- --------------- Comprueba si la linea es de rec.equiv.
|
||||||
WHERE iot.invoiceOutFk = vInvoice;
|
WHERE iot.invoiceOutFk = vInvoice;
|
||||||
|
|
||||||
UPDATE invoiceOut
|
UPDATE invoiceOut
|
||||||
SET booked = util.VN_CURDATE()
|
SET booked = util.VN_CURDATE()
|
||||||
WHERE id = vInvoice;
|
WHERE id = vInvoice;
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -2,7 +2,7 @@ DELIMITER $$
|
||||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelvingRadar`(
|
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelvingRadar`(
|
||||||
vSectorFk INT
|
vSectorFk INT
|
||||||
)
|
)
|
||||||
proc:BEGIN
|
BEGIN
|
||||||
/**
|
/**
|
||||||
* Calcula la información detallada respecto un sector.
|
* Calcula la información detallada respecto un sector.
|
||||||
*
|
*
|
||||||
|
@ -15,37 +15,24 @@ proc:BEGIN
|
||||||
DECLARE vWarehouseFk INT DEFAULT 0;
|
DECLARE vWarehouseFk INT DEFAULT 0;
|
||||||
DECLARE vSonSectorFk INT;
|
DECLARE vSonSectorFk INT;
|
||||||
DECLARE vWorkerFk INT;
|
DECLARE vWorkerFk INT;
|
||||||
|
|
||||||
SELECT s.workerFk
|
SELECT s.workerFk INTO vWorkerFk
|
||||||
INTO vWorkerFk
|
FROM sector s
|
||||||
FROM vn.sector s
|
|
||||||
WHERE s.id = vSectorFk;
|
WHERE s.id = vSectorFk;
|
||||||
|
|
||||||
SELECT w.id, s.warehouseFk INTO vBuyerFk, vWarehouseFk
|
|
||||||
FROM vn.worker w
|
|
||||||
JOIN vn.sector s ON s.code = w.code
|
|
||||||
WHERE s.id = vSectorFk;
|
|
||||||
|
|
||||||
SELECT s.id INTO vSectorFk
|
|
||||||
FROM vn.sector s
|
|
||||||
WHERE s.warehouseFk = vWarehouseFk
|
|
||||||
AND s.isMain;
|
|
||||||
|
|
||||||
SELECT COUNT(*) INTO hasFatherSector
|
SELECT COUNT(*) INTO hasFatherSector
|
||||||
FROM vn.sector
|
FROM sector
|
||||||
WHERE sonFk = vSectorFk;
|
WHERE sonFk = vSectorFk;
|
||||||
|
|
||||||
SELECT warehouseFk, sonFk INTO vWarehouseFk, vSonSectorFk
|
SELECT warehouseFk, sonFk INTO vWarehouseFk, vSonSectorFk
|
||||||
FROM vn.sector
|
FROM sector
|
||||||
WHERE id = vSectorFk;
|
WHERE id = vSectorFk;
|
||||||
|
|
||||||
CALL cache.visible_refresh(vCalcVisibleFk, TRUE, vWarehouseFk);
|
CALL cache.visible_refresh(vCalcVisibleFk, TRUE, vWarehouseFk);
|
||||||
CALL cache.available_refresh(vCalcAvailableFk, FALSE, vWarehouseFk, util.VN_CURDATE());
|
CALL cache.available_refresh(vCalcAvailableFk, FALSE, vWarehouseFk, util.VN_CURDATE());
|
||||||
|
|
||||||
DROP TEMPORARY TABLE IF EXISTS tmp.itemShelvingRadar;
|
|
||||||
|
|
||||||
IF hasFatherSector THEN
|
IF hasFatherSector THEN
|
||||||
CREATE TEMPORARY TABLE tmp.itemShelvingRadar
|
CREATE OR REPLACE TEMPORARY TABLE tItemShelvingRadar
|
||||||
(PRIMARY KEY (itemFk))
|
(PRIMARY KEY (itemFk))
|
||||||
ENGINE = MEMORY
|
ENGINE = MEMORY
|
||||||
SELECT *
|
SELECT *
|
||||||
|
@ -54,57 +41,77 @@ proc:BEGIN
|
||||||
i.longName,
|
i.longName,
|
||||||
i.size,
|
i.size,
|
||||||
i.subName producer,
|
i.subName producer,
|
||||||
IFNULL(a.available,0) available,
|
IFNULL(a.available, 0) available,
|
||||||
SUM(IF(s.sonFk = vSectorFk, IFNULL(iss.visible,0), 0)) upstairs,
|
SUM(IF(s.sonFk = vSectorFk, IFNULL(iss.visible, 0), 0)) upstairs,
|
||||||
SUM(IF(iss.sectorFk = vSectorFk, IFNULL(iss.visible,0), 0)) downstairs,
|
SUM(IF(iss.sectorFk = vSectorFk, IFNULL(iss.visible, 0), 0)) downstairs,
|
||||||
IF(it.isPackaging, NULL, IFNULL(v.visible,0)) as visible,
|
IF(it.isPackaging, NULL, IFNULL(v.visible, 0)) visible,
|
||||||
vSectorFk sectorFk
|
vSectorFk sectorFk,
|
||||||
FROM vn.itemShelvingStock iss
|
ish.isChecked,
|
||||||
JOIN vn.sector s ON s.id = iss.sectorFk
|
sub.isAllChecked
|
||||||
JOIN vn.item i on i.id = iss.itemFk
|
FROM itemShelvingStock iss
|
||||||
JOIN vn.itemType it ON it.id = i.typeFk AND vBuyerFk IN (0,it.workerFk)
|
JOIN itemShelving ish ON ish.shelvingFk = iss.shelvingFk
|
||||||
LEFT JOIN cache.available a ON a.item_id = iss.itemFk AND a.calc_id = vCalcAvailableFk
|
LEFT JOIN (
|
||||||
LEFT JOIN cache.visible v ON v.item_id = iss.itemFk AND v.calc_id = vCalcVisibleFk
|
SELECT itemFk,
|
||||||
|
IF(
|
||||||
|
COUNT(*) = SUM(IF(isChecked >= 0, 1, 0)),
|
||||||
|
TRUE,
|
||||||
|
FALSE
|
||||||
|
) isAllChecked
|
||||||
|
FROM itemShelving is2
|
||||||
|
GROUP BY itemFk
|
||||||
|
) sub ON sub.itemFk = ish.itemFk
|
||||||
|
JOIN sector s ON s.id = iss.sectorFk
|
||||||
|
JOIN item i ON i.id = iss.itemFk
|
||||||
|
JOIN itemType it ON it.id = i.typeFk
|
||||||
|
LEFT JOIN cache.available a ON a.item_id = iss.itemFk
|
||||||
|
AND a.calc_id = vCalcAvailableFk
|
||||||
|
LEFT JOIN cache.visible v ON v.item_id = iss.itemFk
|
||||||
|
AND v.calc_id = vCalcVisibleFk
|
||||||
WHERE vSectorFk IN (iss.sectorFk, s.sonFk)
|
WHERE vSectorFk IN (iss.sectorFk, s.sonFk)
|
||||||
GROUP BY iss.itemFk
|
GROUP BY iss.itemFk
|
||||||
|
|
||||||
UNION ALL
|
UNION ALL
|
||||||
|
SELECT v.item_id,
|
||||||
SELECT v.item_id,
|
|
||||||
i.longName,
|
i.longName,
|
||||||
i.size,
|
i.size,
|
||||||
i.subName producer,
|
i.subName,
|
||||||
IFNULL(a.available,0) as available,
|
IFNULL(a.available, 0),
|
||||||
0 upstairs,
|
0,
|
||||||
0 downstairs,
|
0,
|
||||||
IF(it.isPackaging, NULL, v.visible) visible,
|
IF(it.isPackaging, NULL, v.visible),
|
||||||
vSectorFk as sectorFk
|
vSectorFk,
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
FROM cache.visible v
|
FROM cache.visible v
|
||||||
JOIN vn.item i on i.id = v.item_id
|
JOIN item i ON i.id = v.item_id
|
||||||
JOIN vn.itemType it ON it.id = i.typeFk AND vBuyerFk IN (0,it.workerFk)
|
JOIN itemType it ON it.id = i.typeFk
|
||||||
LEFT JOIN vn.itemShelvingStock iss ON iss.itemFk = v.item_id AND iss.warehouseFk = vWarehouseFk
|
LEFT JOIN itemShelvingStock iss ON iss.itemFk = v.item_id
|
||||||
LEFT JOIN cache.available a ON a.item_id = v.item_id AND a.calc_id = vCalcAvailableFk
|
AND iss.warehouseFk = vWarehouseFk
|
||||||
|
LEFT JOIN cache.available a ON a.item_id = v.item_id
|
||||||
|
AND a.calc_id = vCalcAvailableFk
|
||||||
WHERE v.calc_id = vCalcVisibleFk
|
WHERE v.calc_id = vCalcVisibleFk
|
||||||
AND iss.itemFk IS NULL
|
AND iss.itemFk IS NULL
|
||||||
AND it.isInventory
|
AND it.isInventory
|
||||||
) sub GROUP BY itemFk;
|
) sub
|
||||||
|
GROUP BY itemFk;
|
||||||
|
|
||||||
SELECT ishr.*,
|
SELECT ishr.*,
|
||||||
CAST(visible - upstairs - downstairs AS DECIMAL(10,0)) AS nicho,
|
CAST(visible - upstairs - downstairs AS DECIMAL(10, 0)) nicho,
|
||||||
CAST(downstairs - IFNULL(notPickedYed,0) AS DECIMAL(10,0)) as pendiente
|
CAST(downstairs - IFNULL(notPickedYed, 0) AS DECIMAL(10, 0)) pendiente
|
||||||
FROM tmp.itemShelvingRadar ishr
|
FROM tItemShelvingRadar ishr
|
||||||
JOIN vn.item i ON i.id = ishr.itemFk
|
JOIN item i ON i.id = ishr.itemFk
|
||||||
LEFT JOIN (SELECT s.itemFk, sum(s.quantity) as notPickedYed
|
LEFT JOIN (
|
||||||
FROM vn.ticket t
|
SELECT s.itemFk, SUM(s.quantity) notPickedYed
|
||||||
JOIN vn.ticketStateToday tst ON tst.ticketFk = t.id
|
FROM ticket t
|
||||||
JOIN vn.sale s ON s.ticketFk = t.id
|
JOIN ticketStateToday tst ON tst.ticketFk = t.id
|
||||||
WHERE t.warehouseFk = vWarehouseFk
|
JOIN alertLevel al ON al.id = tst.alertLevel
|
||||||
AND tst.alertLevel = 0
|
JOIN sale s ON s.ticketFk = t.id
|
||||||
GROUP BY s.itemFk
|
WHERE t.warehouseFk = vWarehouseFk
|
||||||
) sub ON sub.itemFk = ishr.itemFk
|
AND al.code = 'FREE'
|
||||||
ORDER BY i.typeFk, i.longName;
|
GROUP BY s.itemFk
|
||||||
|
) sub ON sub.itemFk = ishr.itemFk
|
||||||
|
ORDER BY i.typeFk, i.longName;
|
||||||
ELSE
|
ELSE
|
||||||
CREATE TEMPORARY TABLE tmp.itemShelvingRadar
|
CREATE OR REPLACE TEMPORARY TABLE tItemShelvingRadar
|
||||||
(PRIMARY KEY (itemFk))
|
(PRIMARY KEY (itemFk))
|
||||||
ENGINE = MEMORY
|
ENGINE = MEMORY
|
||||||
SELECT iss.itemFk,
|
SELECT iss.itemFk,
|
||||||
|
@ -115,80 +122,86 @@ proc:BEGIN
|
||||||
i.size,
|
i.size,
|
||||||
i.subName producer,
|
i.subName producer,
|
||||||
i.upToDown,
|
i.upToDown,
|
||||||
IFNULL(a.available,0) available,
|
IFNULL(a.available, 0) available,
|
||||||
IFNULL(v.visible - iss.visible,0) dayEndVisible,
|
IFNULL(v.visible - iss.visible, 0) dayEndVisible,
|
||||||
IFNULL(v.visible - iss.visible,0) firstNegative,
|
IFNULL(v.visible - iss.visible, 0) firstNegative,
|
||||||
IFNULL(v.visible - iss.visible,0) itemPlacementVisible,
|
IFNULL(v.visible - iss.visible, 0) itemPlacementVisible,
|
||||||
IFNULL(i.minimum * b.packing,0) itemPlacementSize,
|
IFNULL(i.minimum * b.packing, 0) itemPlacementSize,
|
||||||
ips.onTheWay,
|
ips.onTheWay,
|
||||||
iss.visible itemShelvingStock,
|
iss.visible itemShelvingStock,
|
||||||
IFNULL(v.visible,0) visible,
|
IFNULL(v.visible, 0) visible,
|
||||||
b.isPickedOff,
|
b.isPickedOff,
|
||||||
iss.sectorFk
|
iss.sectorFk
|
||||||
FROM vn.itemShelvingStock iss
|
FROM itemShelvingStock iss
|
||||||
JOIN vn.item i on i.id = iss.itemFk
|
JOIN item i ON i.id = iss.itemFk
|
||||||
LEFT JOIN cache.last_buy lb ON lb.item_id = iss.itemFk AND lb.warehouse_id = vWarehouseFk
|
LEFT JOIN cache.last_buy lb ON lb.item_id = iss.itemFk
|
||||||
LEFT JOIN vn.buy b ON b.id = lb.buy_id
|
AND lb.warehouse_id = vWarehouseFk
|
||||||
LEFT JOIN cache.available a ON a.item_id = iss.itemFk AND a.calc_id = vCalcAvailableFk
|
LEFT JOIN buy b ON b.id = lb.buy_id
|
||||||
LEFT JOIN cache.visible v ON v.item_id = iss.itemFk AND v.calc_id = vCalcVisibleFk
|
LEFT JOIN cache.available a ON a.item_id = iss.itemFk
|
||||||
LEFT JOIN (SELECT itemFk, sum(saldo) as onTheWay
|
AND a.calc_id = vCalcAvailableFk
|
||||||
FROM vn.itemPlacementSupplyList
|
LEFT JOIN cache.visible v ON v.item_id = iss.itemFk
|
||||||
WHERE saldo > 0
|
AND v.calc_id = vCalcVisibleFk
|
||||||
GROUP BY itemFk
|
LEFT JOIN (
|
||||||
) ips ON ips.itemFk = i.id
|
SELECT itemFk, SUM(saldo) onTheWay
|
||||||
WHERE IFNULL(iss.sectorFk,0) IN (0, vSectorFk)
|
FROM itemPlacementSupplyList
|
||||||
OR iss.sectorFk = vSectorFk;
|
WHERE saldo > 0
|
||||||
|
GROUP BY itemFk
|
||||||
|
) ips ON ips.itemFk = i.id
|
||||||
|
WHERE iss.sectorFk = vSectorFk
|
||||||
|
OR iss.sectorFk IS NULL;
|
||||||
|
|
||||||
DROP TEMPORARY TABLE IF EXISTS tmp.itemOutTime;
|
CREATE OR REPLACE TEMPORARY TABLE tmp.itemOutTime
|
||||||
CREATE TEMPORARY TABLE tmp.itemOutTime
|
SELECT *, SUM(amount) quantity
|
||||||
SELECT *,SUM(amount) quantity
|
FROM (
|
||||||
FROM
|
SELECT io.itemFk,
|
||||||
(SELECT io.itemFk,
|
io.quantity amount,
|
||||||
io.quantity amount,
|
IF(HOUR(t.shipped), HOUR(t.shipped), HOUR(z.`hour`)) `hours`,
|
||||||
IF(HOUR(t.shipped), HOUR(t.shipped), HOUR(z.`hour`)) as hours,
|
IF(MINUTE(t.shipped), MINUTE(t.shipped), MINUTE(z.`hour`)) `minutes`
|
||||||
IF(MINUTE(t.shipped), MINUTE(t.shipped), MINUTE(z.`hour`)) as minutes
|
FROM itemTicketOut `io`
|
||||||
FROM itemTicketOut io
|
JOIN tItemShelvingRadar isr ON isr.itemFk = io.itemFk
|
||||||
JOIN tmp.itemShelvingRadar isr ON isr.itemFk = io.itemFk
|
JOIN ticket t ON t.id= io.ticketFk
|
||||||
JOIN vn.ticket t on t.id= io.ticketFk
|
JOIN ticketState ts ON ts.ticketFk = io.ticketFk
|
||||||
JOIN vn.ticketState ts on ts.ticketFk = io.ticketFk
|
JOIN `state` s ON s.id = ts.stateFk
|
||||||
JOIN vn.state s ON s.id = ts.stateFk
|
LEFT JOIN `zone` z ON z.id = t.zoneFk
|
||||||
LEFT JOIN vn.zone z ON z.id = t.zoneFk
|
LEFT JOIN (
|
||||||
LEFT JOIN (SELECT DISTINCT saleFk
|
SELECT DISTINCT saleFk
|
||||||
FROM vn.saleTracking st
|
FROM saleTracking st
|
||||||
WHERE st.created > util.VN_CURDATE()
|
WHERE st.created > util.VN_CURDATE()
|
||||||
AND st.isChecked
|
AND st.isChecked
|
||||||
) stPrevious ON `stPrevious`.`saleFk` = io.saleFk
|
) stPrevious ON stPrevious.saleFk = io.saleFk
|
||||||
WHERE t.warehouseFk = vWarehouseFk
|
WHERE t.warehouseFk = vWarehouseFk
|
||||||
AND s.isPicked = 0
|
AND NOT s.isPicked
|
||||||
AND NOT io.reserved
|
AND NOT io.reserved
|
||||||
AND stPrevious.saleFk IS NULL
|
AND stPrevious.saleFk IS NULL
|
||||||
AND io.shipped >= util.VN_CURDATE()
|
AND io.shipped >= util.VN_CURDATE()
|
||||||
AND io.shipped < util.VN_CURDATE() + INTERVAL 1 DAY
|
AND io.shipped < util.VN_CURDATE() + INTERVAL 1 DAY
|
||||||
) sub
|
) sub
|
||||||
GROUP BY itemFk, hours, minutes;
|
GROUP BY itemFk, `hours`, `minutes`;
|
||||||
|
|
||||||
INSERT INTO tmp.itemShelvingRadar (itemFk)
|
INSERT INTO tItemShelvingRadar (itemFk)
|
||||||
SELECT itemFk FROM tmp.itemOutTime
|
SELECT itemFk FROM tmp.itemOutTime
|
||||||
ON DUPLICATE KEY UPDATE dayEndVisible = dayEndVisible + quantity,
|
ON DUPLICATE KEY UPDATE dayEndVisible = dayEndVisible + quantity,
|
||||||
firstNegative = if (firstNegative < 0, firstNegative, firstNegative + quantity),
|
firstNegative = IF(firstNegative < 0, firstNegative, firstNegative + quantity),
|
||||||
`hour` = ifnull(if (firstNegative > 0 , `hour`, hours),0),
|
`hour` = IFNULL(IF(firstNegative > 0 , `hour`, `hours`), 0),
|
||||||
`minute` = ifnull(if (firstNegative > 0, `minute`, minutes),0);
|
`minute` = IFNULL(IF(firstNegative > 0, `minute`, `minutes`), 0);
|
||||||
|
|
||||||
UPDATE tmp.itemShelvingRadar isr
|
UPDATE tItemShelvingRadar isr
|
||||||
JOIN (SELECT s.itemFk, sum(s.quantity) amount
|
JOIN (
|
||||||
FROM sale s
|
SELECT s.itemFk, SUM(s.quantity) amount
|
||||||
JOIN ticket t ON t.id = s.ticketFk
|
FROM sale s
|
||||||
JOIN ticketLastState tls ON tls.ticketFk = t.id
|
JOIN ticket t ON t.id = s.ticketFk
|
||||||
WHERE t.shipped BETWEEN util.VN_CURDATE() AND util.dayend(util.VN_CURDATE())
|
JOIN ticketState ts ON ts.ticketFk = t.id
|
||||||
AND tls.name = 'Prep Camara'
|
WHERE t.shipped BETWEEN util.VN_CURDATE() AND util.dayend(util.VN_CURDATE())
|
||||||
GROUP BY s.itemFk) sub ON sub.itemFk = isr.itemFk
|
AND ts.code = 'COOLER_PREPARATION'
|
||||||
|
GROUP BY s.itemFk
|
||||||
|
) sub ON sub.itemFk = isr.itemFk
|
||||||
SET isr.dayEndVisible = dayEndVisible + sub.amount,
|
SET isr.dayEndVisible = dayEndVisible + sub.amount,
|
||||||
firstNegative = firstNegative + sub.amount;
|
firstNegative = firstNegative + sub.amount;
|
||||||
|
|
||||||
SELECT * FROM tmp.itemShelvingRadar;
|
SELECT * FROM tItemShelvingRadar;
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
DROP TEMPORARY TABLE tmp.itemShelvingRadar;
|
DROP TEMPORARY TABLE tItemShelvingRadar;
|
||||||
|
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -21,6 +21,9 @@ BEGIN
|
||||||
|
|
||||||
CALL cache.available_refresh(vCalcFk, FALSE, vWarehouseFk, vDated);
|
CALL cache.available_refresh(vCalcFk, FALSE, vWarehouseFk, vDated);
|
||||||
|
|
||||||
|
-- Añadido temporalmente para que no se cuelgue la db
|
||||||
|
SET vShowType = TRUE;
|
||||||
|
|
||||||
WITH itemTags AS (
|
WITH itemTags AS (
|
||||||
SELECT i.id,
|
SELECT i.id,
|
||||||
typeFk,
|
typeFk,
|
||||||
|
|
|
@ -1,5 +1,13 @@
|
||||||
DELIMITER $$
|
DELIMITER $$
|
||||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ledger_doCompensation`(vDated DATE, vCompensationAccount VARCHAR(10) , vBankFk VARCHAR(10), vConcept VARCHAR(255), vAmount DECIMAL(10,2), vCompanyFk INT, vOriginalAccount VARCHAR(10))
|
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ledger_doCompensation`(
|
||||||
|
vDated DATE,
|
||||||
|
vCompensationAccount VARCHAR(10),
|
||||||
|
vBankFk VARCHAR(10),
|
||||||
|
vConcept VARCHAR(255),
|
||||||
|
vAmount DECIMAL(10,2),
|
||||||
|
vCompanyFk INT,
|
||||||
|
vOriginalAccount VARCHAR(10)
|
||||||
|
)
|
||||||
BEGIN
|
BEGIN
|
||||||
/**
|
/**
|
||||||
* Compensa un pago o un recibo insertando en contabilidad
|
* Compensa un pago o un recibo insertando en contabilidad
|
||||||
|
@ -9,29 +17,31 @@ BEGIN
|
||||||
* @param vBankFk banco de la compensacion
|
* @param vBankFk banco de la compensacion
|
||||||
* @param vConcept descripcion
|
* @param vConcept descripcion
|
||||||
* @param vAmount cantidad que se compensa
|
* @param vAmount cantidad que se compensa
|
||||||
* @param vCompany empresa
|
* @param vCompanyFk empresa
|
||||||
* @param vOriginalAccount cuenta contable desde la cual se compensa
|
* @param vOriginalAccount cuenta contable desde la cual se compensa
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
DECLARE vNewBookEntry INT;
|
DECLARE vNewBookEntry INT;
|
||||||
DECLARE vIsClientCompensation INT;
|
DECLARE vIsClientCompensation INT;
|
||||||
DECLARE vClientFk INT;
|
DECLARE vClientFk INT;
|
||||||
DECLARE vSupplierFk INT;
|
DECLARE vSupplierFk INT;
|
||||||
DECLARE vIsOriginalAClient BOOL;
|
DECLARE vIsOriginalAClient BOOL;
|
||||||
DECLARE vPayMethodCompensation INT;
|
DECLARE vPayMethodCompensation INT;
|
||||||
|
|
||||||
CALL ledger_next(vNewBookEntry);
|
|
||||||
|
|
||||||
SELECT COUNT(id) INTO vIsOriginalAClient FROM client WHERE accountingAccount LIKE vOriginalAccount COLLATE utf8_general_ci;
|
CALL ledger_next(YEAR(vDated), vNewBookEntry);
|
||||||
|
|
||||||
|
SELECT COUNT(id) INTO vIsOriginalAClient
|
||||||
|
FROM client
|
||||||
|
WHERE accountingAccount LIKE vOriginalAccount COLLATE utf8_general_ci;
|
||||||
|
|
||||||
SELECT id, COUNT(id) INTO vClientFk, vIsClientCompensation
|
SELECT id, COUNT(id) INTO vClientFk, vIsClientCompensation
|
||||||
FROM client
|
FROM client
|
||||||
WHERE accountingAccount LIKE vCompensationAccount COLLATE utf8_general_ci;
|
WHERE accountingAccount LIKE vCompensationAccount COLLATE utf8_general_ci;
|
||||||
|
|
||||||
SET @vAmount1:= 0.0;
|
SET @vAmount1:= 0.0;
|
||||||
SET @vAmount2:= 0.0;
|
SET @vAmount2:= 0.0;
|
||||||
|
|
||||||
INSERT INTO XDiario (ASIEN, FECHA, SUBCTA, CONTRA, CONCEPTO, EURODEBE, EUROHABER, empresa_id)
|
INSERT INTO XDiario (ASIEN, FECHA, SUBCTA, CONTRA, CONCEPTO, EURODEBE, EUROHABER, empresa_id)
|
||||||
VALUES ( vNewBookEntry,
|
VALUES ( vNewBookEntry,
|
||||||
vDated,
|
vDated,
|
||||||
vOriginalAccount,
|
vOriginalAccount,
|
||||||
|
@ -49,30 +59,51 @@ BEGIN
|
||||||
),
|
),
|
||||||
vCompanyFk
|
vCompanyFk
|
||||||
),
|
),
|
||||||
( vNewBookEntry,
|
( vNewBookEntry,
|
||||||
vDated,
|
vDated,
|
||||||
vCompensationAccount,
|
vCompensationAccount,
|
||||||
vOriginalAccount,
|
vOriginalAccount,
|
||||||
vConcept,
|
vConcept,
|
||||||
@vAmount2,
|
@vAmount2,
|
||||||
@vAmount1,
|
@vAmount1,
|
||||||
vCompanyFk);
|
vCompanyFk);
|
||||||
|
|
||||||
IF vIsClientCompensation THEN
|
IF vIsClientCompensation THEN
|
||||||
IF vIsOriginalAClient THEN
|
IF vIsOriginalAClient THEN
|
||||||
SET vAmount = -vAmount;
|
SET vAmount = -vAmount;
|
||||||
END IF;
|
END IF;
|
||||||
INSERT INTO receipt(invoiceFk, amountPaid, payed, bankFk, companyFk, clientFk, isConciliate)
|
|
||||||
VALUES (vConcept, vAmount, vDated, vBankFk, vCompanyFk, vClientFk, TRUE);
|
INSERT INTO receipt
|
||||||
ELSE
|
SET invoiceFk = vConcept,
|
||||||
IF NOT vIsOriginalAClient THEN
|
amountPaid = vAmount,
|
||||||
SET vAmount = -vAmount;
|
payed = vDated,
|
||||||
END IF;
|
bankFk = vBankFk,
|
||||||
SELECT id INTO vSupplierFk FROM supplier WHERE `account` LIKE vCompensationAccount COLLATE utf8_general_ci;
|
companyFk = vCompanyFk,
|
||||||
SELECT id INTO vPayMethodCompensation FROM payMethod WHERE `code` = 'compensation';
|
clientFk = vClientFk,
|
||||||
|
isConciliate = TRUE;
|
||||||
INSERT INTO payment (received, dueDated, supplierFk, amount, bankFk, payMethodFk, concept, companyFk, isConciliated)
|
ELSE
|
||||||
VALUES(vDated, vDated, vSupplierFk, vAmount, vBankFk, vPayMethodCompensation, vConcept, vCompanyFk, TRUE);
|
IF NOT vIsOriginalAClient THEN
|
||||||
END IF;
|
SET vAmount = -vAmount;
|
||||||
|
END IF;
|
||||||
|
|
||||||
|
SELECT id INTO vSupplierFk
|
||||||
|
FROM supplier
|
||||||
|
WHERE `account` LIKE vCompensationAccount COLLATE utf8_general_ci;
|
||||||
|
|
||||||
|
SELECT id INTO vPayMethodCompensation
|
||||||
|
FROM payMethod
|
||||||
|
WHERE `code` = 'compensation';
|
||||||
|
|
||||||
|
INSERT INTO payment
|
||||||
|
SET received = vDated,
|
||||||
|
dueDated = vDated,
|
||||||
|
supplierFk = vSupplierFk,
|
||||||
|
amount = vAmount,
|
||||||
|
bankFk = vBankFk,
|
||||||
|
payMethodFk = vPayMethodCompensation,
|
||||||
|
concept = vConcept,
|
||||||
|
companyFk = vCompanyFk,
|
||||||
|
isConciliated = TRUE;
|
||||||
|
END IF;
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -1,9 +1,13 @@
|
||||||
DELIMITER $$
|
DELIMITER $$
|
||||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ledger_next`(OUT vNewBookEntry INT)
|
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ledger_next`(
|
||||||
|
IN vFiscalYear INT,
|
||||||
|
OUT vNewBookEntry INT
|
||||||
|
)
|
||||||
BEGIN
|
BEGIN
|
||||||
|
UPDATE ledgerCompany
|
||||||
UPDATE vn.ledgerConfig SET lastBookEntry = LAST_INSERT_ID(lastBookEntry + 1);
|
SET bookEntry = LAST_INSERT_ID(bookEntry + 1)
|
||||||
SET vNewBookEntry = LAST_INSERT_ID();
|
WHERE fiscalYear = vFiscalYear;
|
||||||
|
|
||||||
|
SET vNewBookEntry = LAST_INSERT_ID();
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -3,92 +3,93 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`payment_beforeInsert`
|
||||||
BEFORE INSERT ON `payment`
|
BEFORE INSERT ON `payment`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
DECLARE cuenta_banco,cuenta_proveedor DOUBLE;
|
DECLARE vBankAccount DOUBLE;
|
||||||
DECLARE vNewBookEntry INT;
|
DECLARE vSupplierAccount DOUBLE;
|
||||||
DECLARE bolCASH BOOLEAN;
|
DECLARE vNewBookEntry INT;
|
||||||
DECLARE isSupplierActive BOOLEAN;
|
DECLARE vIsCash BOOLEAN;
|
||||||
|
DECLARE vIsSupplierActive BOOLEAN;
|
||||||
|
|
||||||
-- PAK 10/02/15 No se asientan los pagos directamente, salvo en el caso de las cajas de CASH
|
-- PAK 10/02/15 No se asientan los pagos directamente, salvo en el caso de las cajas de CASH
|
||||||
SELECT (at2.code = 'cash') INTO bolCASH
|
SELECT (at2.code = 'cash') INTO vIsCash
|
||||||
FROM accounting a
|
FROM accounting a
|
||||||
JOIN accountingType at2 ON at2.id = a.accountingTypeFk
|
JOIN accountingType at2 ON at2.id = a.accountingTypeFk
|
||||||
WHERE a.id = NEW.bankFk;
|
WHERE a.id = NEW.bankFk;
|
||||||
|
|
||||||
IF bolCASH THEN
|
IF vIsCash THEN
|
||||||
|
SELECT account INTO vBankAccount
|
||||||
SELECT account INTO cuenta_banco
|
FROM accounting
|
||||||
FROM accounting
|
WHERE id = NEW.bankFk;
|
||||||
WHERE id = NEW.bankFk;
|
|
||||||
|
|
||||||
SELECT account INTO cuenta_proveedor
|
|
||||||
FROM supplier
|
|
||||||
WHERE id = NEW.supplierFk;
|
|
||||||
|
|
||||||
CALL ledger_next(vNewBookEntry);
|
SELECT account INTO vSupplierAccount
|
||||||
|
|
||||||
INSERT INTO XDiario ( ASIEN,
|
|
||||||
FECHA,
|
|
||||||
SUBCTA,
|
|
||||||
CONTRA,
|
|
||||||
CONCEPTO,
|
|
||||||
EURODEBE,
|
|
||||||
EUROHABER,
|
|
||||||
empresa_id)
|
|
||||||
SELECT vNewBookEntry,
|
|
||||||
NEW.received,
|
|
||||||
SUBCTA,
|
|
||||||
CONTRA,
|
|
||||||
NEW.concept,
|
|
||||||
EURODEBE,
|
|
||||||
EUROHABER,
|
|
||||||
NEW.companyFk
|
|
||||||
FROM ( SELECT cuenta_banco SUBCTA,
|
|
||||||
cuenta_proveedor CONTRA,
|
|
||||||
0 EURODEBE,
|
|
||||||
NEW.amount + NEW.bankingFees EUROHABER
|
|
||||||
UNION ALL
|
|
||||||
SELECT cuenta_proveedor SUBCTA,
|
|
||||||
cuenta_banco CONTRA,
|
|
||||||
NEW.amount EURODEBE,
|
|
||||||
0 EUROHABER) gf;
|
|
||||||
|
|
||||||
IF NEW.bankingFees <> 0 THEN
|
|
||||||
INSERT INTO XDiario ( ASIEN,
|
|
||||||
FECHA,
|
|
||||||
SUBCTA,
|
|
||||||
CONTRA,
|
|
||||||
CONCEPTO,
|
|
||||||
EURODEBE,
|
|
||||||
EUROHABER,
|
|
||||||
empresa_id)
|
|
||||||
SELECT vNewBookEntry,
|
|
||||||
NEW.received,
|
|
||||||
IF(c.id = 1,6260000002,
|
|
||||||
IF(CEE = 1,6260000003,6260000004)),
|
|
||||||
cuenta_banco,
|
|
||||||
NEW.concept,
|
|
||||||
NEW.bankingFees,
|
|
||||||
0,
|
|
||||||
NEW.companyFk
|
|
||||||
FROM supplier s
|
|
||||||
JOIN country c ON s.countryFk = c.id
|
|
||||||
WHERE s.id = NEW.supplierFk;
|
|
||||||
END IF;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
SET NEW.dueDated = IFNULL(NEW.dueDated, NEW.received);
|
|
||||||
|
|
||||||
SELECT isActive INTO isSupplierActive
|
|
||||||
FROM supplier
|
FROM supplier
|
||||||
WHERE id = NEW.supplierFk;
|
WHERE id = NEW.supplierFk;
|
||||||
|
|
||||||
IF isSupplierActive = FALSE THEN
|
CALL ledger_next(YEAR(NEW.received), NEW.companyFk, vNewBookEntry);
|
||||||
CALL util.throw('SUPPLIER_INACTIVE');
|
|
||||||
END IF;
|
INSERT INTO XDiario (
|
||||||
|
ASIEN,
|
||||||
IF ISNULL(NEW.workerFk) THEN
|
FECHA,
|
||||||
SET NEW.workerFk = account.myUser_getId();
|
SUBCTA,
|
||||||
END IF;
|
CONTRA,
|
||||||
|
CONCEPTO,
|
||||||
END$$
|
EURODEBE,
|
||||||
|
EUROHABER,
|
||||||
|
empresa_id)
|
||||||
|
SELECT vNewBookEntry,
|
||||||
|
NEW.received,
|
||||||
|
SUBCTA,
|
||||||
|
CONTRA,
|
||||||
|
NEW.concept,
|
||||||
|
EURODEBE,
|
||||||
|
EUROHABER,
|
||||||
|
NEW.companyFk
|
||||||
|
FROM (SELECT vBankAccount SUBCTA,
|
||||||
|
vSupplierAccount CONTRA,
|
||||||
|
0 EURODEBE,
|
||||||
|
NEW.amount + NEW.bankingFees EUROHABER
|
||||||
|
UNION ALL
|
||||||
|
SELECT vSupplierAccount SUBCTA,
|
||||||
|
vBankAccount CONTRA,
|
||||||
|
NEW.amount EURODEBE,
|
||||||
|
0 EUROHABER) gf;
|
||||||
|
|
||||||
|
IF NEW.bankingFees <> 0 THEN
|
||||||
|
INSERT INTO XDiario (
|
||||||
|
ASIEN,
|
||||||
|
FECHA,
|
||||||
|
SUBCTA,
|
||||||
|
CONTRA,
|
||||||
|
CONCEPTO,
|
||||||
|
EURODEBE,
|
||||||
|
EUROHABER,
|
||||||
|
empresa_id)
|
||||||
|
SELECT vNewBookEntry,
|
||||||
|
NEW.received,
|
||||||
|
IF(c.id = 1,6260000002,
|
||||||
|
IF(CEE = 1,6260000003,6260000004)),
|
||||||
|
vBankAccount,
|
||||||
|
NEW.concept,
|
||||||
|
NEW.bankingFees,
|
||||||
|
0,
|
||||||
|
NEW.companyFk
|
||||||
|
FROM supplier s
|
||||||
|
JOIN country c ON s.countryFk = c.id
|
||||||
|
WHERE s.id = NEW.supplierFk;
|
||||||
|
END IF;
|
||||||
|
END IF;
|
||||||
|
|
||||||
|
SET NEW.dueDated = IFNULL(NEW.dueDated, NEW.received);
|
||||||
|
|
||||||
|
SELECT isActive INTO vIsSupplierActive
|
||||||
|
FROM supplier
|
||||||
|
WHERE id = NEW.supplierFk;
|
||||||
|
|
||||||
|
IF vIsSupplierActive = FALSE THEN
|
||||||
|
CALL util.throw('SUPPLIER_INACTIVE');
|
||||||
|
END IF;
|
||||||
|
|
||||||
|
IF ISNULL(NEW.workerFk) THEN
|
||||||
|
SET NEW.workerFk = account.myUser_getId();
|
||||||
|
END IF;
|
||||||
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
UPDATE vn.route
|
||||||
|
SET vehicleFk = NULL
|
||||||
|
WHERE vehicleFk NOT IN (SELECT id FROM vn.vehicle);
|
||||||
|
|
||||||
|
ALTER TABLE vn.route
|
||||||
|
ADD CONSTRAINT route_vehicleFk FOREIGN KEY (vehicleFk) REFERENCES vn.vehicle(id);
|
||||||
|
|
||||||
|
ALTER TABLE vn.route
|
||||||
|
MODIFY COLUMN firstEditorFk int(10) unsigned NULL;
|
||||||
|
|
||||||
|
UPDATE vn.route
|
||||||
|
SET firstEditorFk = NULL
|
||||||
|
WHERE firstEditorFk NOT IN (SELECT id FROM account.user);
|
||||||
|
|
||||||
|
ALTER TABLE vn.route
|
||||||
|
ADD CONSTRAINT route_firstEditorFk FOREIGN KEY (firstEditorFk) REFERENCES account.user(id);
|
|
@ -1,3 +1,3 @@
|
||||||
ALTER TABLE pbx.sipConfig
|
ALTER TABLE pbx.sipConfig
|
||||||
CHANGE incomingLimit `call-limit` varchar(10)
|
CHANGE incomingLimit `call-limit` varchar(10)
|
||||||
CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL;
|
CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL;
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
CREATE OR REPLACE TABLE vn.ledgerCompany (
|
||||||
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`fiscalYear` int(10) unsigned NOT NULL COMMENT 'Año del ejercicio contable',
|
||||||
|
`bookEntry` int(10) unsigned NOT NULL DEFAULT 1 COMMENT 'Contador asiento contable',
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
UNIQUE KEY `ledgerCompany_unique` (`fiscalYear`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci
|
||||||
|
COMMENT='Contador para asientos contables';
|
||||||
|
|
||||||
|
INSERT IGNORE INTO vn.ledgerCompany (fiscalYear, bookEntry)
|
||||||
|
SELECT YEAR(util.VN_CURDATE()), lastBookEntry
|
||||||
|
FROM vn.ledgerConfig;
|
||||||
|
|
||||||
|
ALTER TABLE vn.ledgerConfig CHANGE IF EXISTS lastBookEntry lastBookEntry__ int(11) NOT NULL
|
||||||
|
COMMENT '@deprecated 2024-05-28 refs #7400 Modificar contador asientos contables';
|
||||||
|
|
|
@ -6,6 +6,7 @@ services:
|
||||||
context: front
|
context: front
|
||||||
environment:
|
environment:
|
||||||
- TZ
|
- TZ
|
||||||
|
- NODE_ENV
|
||||||
ports:
|
ports:
|
||||||
- 80
|
- 80
|
||||||
deploy:
|
deploy:
|
||||||
|
|
|
@ -4,7 +4,9 @@ ENV TZ Europe/Madrid
|
||||||
|
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends nginx \
|
&& apt-get install -y --no-install-recommends \
|
||||||
|
nginx \
|
||||||
|
gettext-base \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
&& ln -sf /dev/stdout /var/log/nginx/access.log \
|
&& ln -sf /dev/stdout /var/log/nginx/access.log \
|
||||||
&& ln -sf /dev/stderr /var/log/nginx/error.log
|
&& ln -sf /dev/stderr /var/log/nginx/error.log
|
||||||
|
@ -14,5 +16,7 @@ COPY nginx.conf sites-available/salix
|
||||||
RUN rm sites-enabled/default && ln -s ../sites-available/salix sites-enabled/salix
|
RUN rm sites-enabled/default && ln -s ../sites-available/salix sites-enabled/salix
|
||||||
|
|
||||||
COPY dist /salix/dist
|
COPY dist /salix/dist
|
||||||
|
COPY env.template.js /salix/dist
|
||||||
|
COPY nginx-entrypoint.sh /
|
||||||
|
|
||||||
CMD ["nginx", "-g", "daemon off;"]
|
ENTRYPOINT [ "sh", "/nginx-entrypoint.sh" ]
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
window.process = {
|
||||||
|
env: {NODE_ENV: '${NODE_ENV}'}
|
||||||
|
};
|
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
WWW_DIR=/salix/dist
|
||||||
|
INJECT_FILE_SRC="${WWW_DIR}/env.template.js"
|
||||||
|
INJECT_FILE_DST="${WWW_DIR}/env.js"
|
||||||
|
envsubst < "${INJECT_FILE_SRC}" > "${INJECT_FILE_DST}"
|
||||||
|
[ -z "$@" ] && nginx -g 'daemon off;' || $@
|
|
@ -5,6 +5,8 @@
|
||||||
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=no"/>
|
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=no"/>
|
||||||
<meta name="mobile-web-app-capable" content="yes"/>
|
<meta name="mobile-web-app-capable" content="yes"/>
|
||||||
<link rel="manifest" href="<%= require('./manifest.json') %>"/>
|
<link rel="manifest" href="<%= require('./manifest.json') %>"/>
|
||||||
|
<script type="text/javascript" src="/env.js">
|
||||||
|
</script>
|
||||||
<title vn-title translate></title>
|
<title vn-title translate></title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -139,6 +139,9 @@ function webpack(done) {
|
||||||
webpack.description = `Transpiles application into files`;
|
webpack.description = `Transpiles application into files`;
|
||||||
|
|
||||||
function webpackDevServer(done) {
|
function webpackDevServer(done) {
|
||||||
|
const replace = require('gulp-replace');
|
||||||
|
const rename = require('gulp-rename');
|
||||||
|
|
||||||
const webpack = require('webpack');
|
const webpack = require('webpack');
|
||||||
const merge = require('webpack-merge');
|
const merge = require('webpack-merge');
|
||||||
const WebpackDevServer = require('webpack-dev-server');
|
const WebpackDevServer = require('webpack-dev-server');
|
||||||
|
@ -148,6 +151,12 @@ function webpackDevServer(done) {
|
||||||
|
|
||||||
let devServer = wpConfig.devServer;
|
let devServer = wpConfig.devServer;
|
||||||
|
|
||||||
|
// local env
|
||||||
|
gulp.src(srcDir + '/env.template.js')
|
||||||
|
.pipe(replace('${NODE_ENV}', 'development'))
|
||||||
|
.pipe(rename('env.js'))
|
||||||
|
.pipe(gulp.dest(buildDir));
|
||||||
|
|
||||||
for (let entryName in wpConfig.entry) {
|
for (let entryName in wpConfig.entry) {
|
||||||
let entry = wpConfig.entry[entryName];
|
let entry = wpConfig.entry[entryName];
|
||||||
if (!Array.isArray(entry))
|
if (!Array.isArray(entry))
|
||||||
|
|
|
@ -40,7 +40,8 @@ module.exports = Self => {
|
||||||
http: {
|
http: {
|
||||||
path: '/:id/client-debt-statement-pdf',
|
path: '/:id/client-debt-statement-pdf',
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
}
|
},
|
||||||
|
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.clientDebtStatementPdf = (ctx, id) => Self.printReport(ctx, id, 'client-debt-statement');
|
Self.clientDebtStatementPdf = (ctx, id) => Self.printReport(ctx, id, 'client-debt-statement');
|
||||||
|
|
|
@ -3,6 +3,7 @@ const UserError = require('vn-loopback/util/user-error');
|
||||||
module.exports = function(Self) {
|
module.exports = function(Self) {
|
||||||
Self.remoteMethodCtx('createReceipt', {
|
Self.remoteMethodCtx('createReceipt', {
|
||||||
description: 'Creates receipt and its compensation if necessary',
|
description: 'Creates receipt and its compensation if necessary',
|
||||||
|
accessType: 'READ',
|
||||||
accepts: [{
|
accepts: [{
|
||||||
arg: 'clientFk',
|
arg: 'clientFk',
|
||||||
type: 'number',
|
type: 'number',
|
||||||
|
@ -45,7 +46,8 @@ module.exports = function(Self) {
|
||||||
http: {
|
http: {
|
||||||
verb: 'post',
|
verb: 'post',
|
||||||
path: '/:clientFk/createReceipt'
|
path: '/:clientFk/createReceipt'
|
||||||
}
|
},
|
||||||
|
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.createReceipt = async(ctx, options) => {
|
Self.createReceipt = async(ctx, options) => {
|
||||||
|
|
|
@ -35,7 +35,8 @@ module.exports = Self => {
|
||||||
http: {
|
http: {
|
||||||
path: '/:id/credit-request-pdf',
|
path: '/:id/credit-request-pdf',
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
}
|
},
|
||||||
|
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.creditRequestPdf = (ctx, id) => Self.printReport(ctx, id, 'credit-request');
|
Self.creditRequestPdf = (ctx, id) => Self.printReport(ctx, id, 'credit-request');
|
||||||
|
|
|
@ -47,7 +47,8 @@ module.exports = Self => {
|
||||||
http: {
|
http: {
|
||||||
path: '/:id/incoterms-authorization-pdf',
|
path: '/:id/incoterms-authorization-pdf',
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
}
|
},
|
||||||
|
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.incotermsAuthorizationPdf = (ctx, id) => Self.printReport(ctx, id, 'incoterms-authorization');
|
Self.incotermsAuthorizationPdf = (ctx, id) => Self.printReport(ctx, id, 'incoterms-authorization');
|
||||||
|
|
|
@ -41,7 +41,8 @@ module.exports = Self => {
|
||||||
http: {
|
http: {
|
||||||
path: '/:id/letter-debtor-pdf',
|
path: '/:id/letter-debtor-pdf',
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
}
|
},
|
||||||
|
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.letterDebtorPdf = (ctx, id) => Self.printReport(ctx, id, 'letter-debtor');
|
Self.letterDebtorPdf = (ctx, id) => Self.printReport(ctx, id, 'letter-debtor');
|
||||||
|
|
|
@ -29,7 +29,8 @@ module.exports = Self => {
|
||||||
http: {
|
http: {
|
||||||
path: '/:id/balance-compensation-pdf',
|
path: '/:id/balance-compensation-pdf',
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
}
|
},
|
||||||
|
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.balanceCompensationPdf = (ctx, id) => Self.printReport(ctx, id, 'balance-compensation');
|
Self.balanceCompensationPdf = (ctx, id) => Self.printReport(ctx, id, 'balance-compensation');
|
||||||
|
|
|
@ -34,7 +34,8 @@ module.exports = Self => {
|
||||||
http: {
|
http: {
|
||||||
path: '/:id/receipt-pdf',
|
path: '/:id/receipt-pdf',
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
}
|
},
|
||||||
|
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.receiptPdf = (ctx, id) => Self.printReport(ctx, id, 'receipt');
|
Self.receiptPdf = (ctx, id) => Self.printReport(ctx, id, 'receipt');
|
||||||
|
|
|
@ -31,7 +31,8 @@ module.exports = Self => {
|
||||||
http: {
|
http: {
|
||||||
path: '/:reference/invoice-out-pdf',
|
path: '/:reference/invoice-out-pdf',
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
}
|
},
|
||||||
|
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.invoiceOutPdf = async(ctx, reference) => {
|
Self.invoiceOutPdf = async(ctx, reference) => {
|
||||||
|
|
|
@ -51,7 +51,8 @@ module.exports = Self => {
|
||||||
http: {
|
http: {
|
||||||
path: '/:id/label-pdf',
|
path: '/:id/label-pdf',
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
}
|
},
|
||||||
|
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.labelPdf = (ctx, id) => Self.printReport(ctx, id, 'item-label');
|
Self.labelPdf = (ctx, id) => Self.printReport(ctx, id, 'item-label');
|
||||||
|
|
|
@ -28,7 +28,8 @@ module.exports = Self => {
|
||||||
http: {
|
http: {
|
||||||
path: `/:id/docuwareDownload`,
|
path: `/:id/docuwareDownload`,
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
}
|
},
|
||||||
|
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.docuwareDownload = async id => {
|
Self.docuwareDownload = async id => {
|
||||||
|
|
|
@ -82,6 +82,8 @@
|
||||||
"gulp-print": "^2.0.1",
|
"gulp-print": "^2.0.1",
|
||||||
"gulp-wrap": "^0.15.0",
|
"gulp-wrap": "^0.15.0",
|
||||||
"gulp-yaml": "^1.0.1",
|
"gulp-yaml": "^1.0.1",
|
||||||
|
"gulp-rename": "^2.0.0",
|
||||||
|
"gulp-replace": "^1.1.4",
|
||||||
"html-loader": "^0.4.5",
|
"html-loader": "^0.4.5",
|
||||||
"html-loader-jest": "^0.2.1",
|
"html-loader-jest": "^0.2.1",
|
||||||
"html-webpack-plugin": "^5.5.1",
|
"html-webpack-plugin": "^5.5.1",
|
||||||
|
|
|
@ -202,6 +202,12 @@ devDependencies:
|
||||||
gulp-print:
|
gulp-print:
|
||||||
specifier: ^2.0.1
|
specifier: ^2.0.1
|
||||||
version: 2.0.1
|
version: 2.0.1
|
||||||
|
gulp-rename:
|
||||||
|
specifier: ^2.0.0
|
||||||
|
version: 2.0.0
|
||||||
|
gulp-replace:
|
||||||
|
specifier: ^1.1.4
|
||||||
|
version: 1.1.4
|
||||||
gulp-wrap:
|
gulp-wrap:
|
||||||
specifier: ^0.15.0
|
specifier: ^0.15.0
|
||||||
version: 0.15.0(ejs@2.3.1)
|
version: 0.15.0(ejs@2.3.1)
|
||||||
|
@ -2632,6 +2638,10 @@ packages:
|
||||||
resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==}
|
resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
/@types/expect@1.20.4:
|
||||||
|
resolution: {integrity: sha512-Q5Vn3yjTDyCMV50TB6VRIbQNxSE4OmZR86VSbGaNpfUolm0iePBB4KdEEHmxoY5sT2+2DIvXW0rvMDP2nHZ4Mg==}
|
||||||
|
dev: true
|
||||||
|
|
||||||
/@types/express-serve-static-core@4.17.42:
|
/@types/express-serve-static-core@4.17.42:
|
||||||
resolution: {integrity: sha512-ckM3jm2bf/MfB3+spLPWYPUH573plBFwpOhqQ2WottxYV85j1HQFlxmnTq57X1yHY9awZPig06hL/cLMgNWHIQ==}
|
resolution: {integrity: sha512-ckM3jm2bf/MfB3+spLPWYPUH573plBFwpOhqQ2WottxYV85j1HQFlxmnTq57X1yHY9awZPig06hL/cLMgNWHIQ==}
|
||||||
dependencies:
|
dependencies:
|
||||||
|
@ -2790,6 +2800,13 @@ packages:
|
||||||
resolution: {integrity: sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==}
|
resolution: {integrity: sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
|
/@types/vinyl@2.0.12:
|
||||||
|
resolution: {integrity: sha512-Sr2fYMBUVGYq8kj3UthXFAu5UN6ZW+rYr4NACjZQJvHvj+c8lYv0CahmZ2P/r7iUkN44gGUBwqxZkrKXYPb7cw==}
|
||||||
|
dependencies:
|
||||||
|
'@types/expect': 1.20.4
|
||||||
|
'@types/node': 20.11.16
|
||||||
|
dev: true
|
||||||
|
|
||||||
/@types/yargs-parser@21.0.3:
|
/@types/yargs-parser@21.0.3:
|
||||||
resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==}
|
resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==}
|
||||||
dev: true
|
dev: true
|
||||||
|
@ -3770,6 +3787,11 @@ packages:
|
||||||
engines: {node: '>=8'}
|
engines: {node: '>=8'}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
/binaryextensions@2.3.0:
|
||||||
|
resolution: {integrity: sha512-nAihlQsYGyc5Bwq6+EsubvANYGExeJKHDO3RjnvwU042fawQTQfM3Kxn7IHUXQOz4bzfwsGYYHGSvXyW4zOGLg==}
|
||||||
|
engines: {node: '>=0.8'}
|
||||||
|
dev: true
|
||||||
|
|
||||||
/bindings@1.5.0:
|
/bindings@1.5.0:
|
||||||
resolution: {integrity: sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==}
|
resolution: {integrity: sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==}
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
|
@ -7090,6 +7112,22 @@ packages:
|
||||||
map-stream: 0.0.7
|
map-stream: 0.0.7
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
/gulp-rename@2.0.0:
|
||||||
|
resolution: {integrity: sha512-97Vba4KBzbYmR5VBs9mWmK+HwIf5mj+/zioxfZhOKeXtx5ZjBk57KFlePf5nxq9QsTtFl0ejnHE3zTC9MHXqyQ==}
|
||||||
|
engines: {node: '>=4'}
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/gulp-replace@1.1.4:
|
||||||
|
resolution: {integrity: sha512-SVSF7ikuWKhpAW4l4wapAqPPSToJoiNKsbDoUnRrSgwZHH7lH8pbPeQj1aOVYQrbZKhfSVBxVW+Py7vtulRktw==}
|
||||||
|
engines: {node: '>=10'}
|
||||||
|
dependencies:
|
||||||
|
'@types/node': 20.11.16
|
||||||
|
'@types/vinyl': 2.0.12
|
||||||
|
istextorbinary: 3.3.0
|
||||||
|
replacestream: 4.0.3
|
||||||
|
yargs-parser: 21.1.1
|
||||||
|
dev: true
|
||||||
|
|
||||||
/gulp-util@3.0.8:
|
/gulp-util@3.0.8:
|
||||||
resolution: {integrity: sha512-q5oWPc12lwSFS9h/4VIjG+1NuNDlJ48ywV2JKItY4Ycc/n1fXJeYPVQsfu5ZrhQi7FGSDBalwUCLar/GyHXKGw==}
|
resolution: {integrity: sha512-q5oWPc12lwSFS9h/4VIjG+1NuNDlJ48ywV2JKItY4Ycc/n1fXJeYPVQsfu5ZrhQi7FGSDBalwUCLar/GyHXKGw==}
|
||||||
engines: {node: '>=0.10'}
|
engines: {node: '>=0.10'}
|
||||||
|
@ -8324,6 +8362,14 @@ packages:
|
||||||
istanbul-lib-report: 3.0.1
|
istanbul-lib-report: 3.0.1
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
/istextorbinary@3.3.0:
|
||||||
|
resolution: {integrity: sha512-Tvq1W6NAcZeJ8op+Hq7tdZ434rqnMx4CCZ7H0ff83uEloDvVbqAwaMTZcafKGJT0VHkYzuXUiCY4hlXQg6WfoQ==}
|
||||||
|
engines: {node: '>=8'}
|
||||||
|
dependencies:
|
||||||
|
binaryextensions: 2.3.0
|
||||||
|
textextensions: 3.3.0
|
||||||
|
dev: true
|
||||||
|
|
||||||
/jackspeak@2.3.6:
|
/jackspeak@2.3.6:
|
||||||
resolution: {integrity: sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==}
|
resolution: {integrity: sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==}
|
||||||
engines: {node: '>=14'}
|
engines: {node: '>=14'}
|
||||||
|
@ -12065,6 +12111,14 @@ packages:
|
||||||
remove-trailing-separator: 1.1.0
|
remove-trailing-separator: 1.1.0
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
/replacestream@4.0.3:
|
||||||
|
resolution: {integrity: sha512-AC0FiLS352pBBiZhd4VXB1Ab/lh0lEgpP+GGvZqbQh8a5cmXVoTe5EX/YeTFArnp4SRGTHh1qCHu9lGs1qG8sA==}
|
||||||
|
dependencies:
|
||||||
|
escape-string-regexp: 1.0.5
|
||||||
|
object-assign: 4.1.1
|
||||||
|
readable-stream: 2.3.8
|
||||||
|
dev: true
|
||||||
|
|
||||||
/request@2.88.2:
|
/request@2.88.2:
|
||||||
resolution: {integrity: sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==}
|
resolution: {integrity: sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==}
|
||||||
engines: {node: '>= 6'}
|
engines: {node: '>= 6'}
|
||||||
|
@ -13563,6 +13617,11 @@ packages:
|
||||||
resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==}
|
resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
/textextensions@3.3.0:
|
||||||
|
resolution: {integrity: sha512-mk82dS8eRABNbeVJrEiN5/UMSCliINAuz8mkUwH4SwslkNP//gbEzlWNS5au0z5Dpx40SQxzqZevZkn+WYJ9Dw==}
|
||||||
|
engines: {node: '>=8'}
|
||||||
|
dev: true
|
||||||
|
|
||||||
/throat@5.0.0:
|
/throat@5.0.0:
|
||||||
resolution: {integrity: sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA==}
|
resolution: {integrity: sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
|
@ -70,6 +70,7 @@ let baseConfig = {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
optimization: {
|
optimization: {
|
||||||
|
nodeEnv: false,
|
||||||
runtimeChunk: true,
|
runtimeChunk: true,
|
||||||
splitChunks: {
|
splitChunks: {
|
||||||
chunks: 'all',
|
chunks: 'all',
|
||||||
|
@ -99,9 +100,6 @@ let baseConfig = {
|
||||||
filename: 'index.html',
|
filename: 'index.html',
|
||||||
chunks: ['salix']
|
chunks: ['salix']
|
||||||
}),
|
}),
|
||||||
new webpack.DefinePlugin({
|
|
||||||
'process.env.NODE_ENV': JSON.stringify(env)
|
|
||||||
})
|
|
||||||
],
|
],
|
||||||
devtool: 'source-map',
|
devtool: 'source-map',
|
||||||
stats: {
|
stats: {
|
||||||
|
|
Loading…
Reference in New Issue