feat: refs #7348 hasDailyInvoice field
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Javi Gallego 2024-07-03 10:49:51 +02:00
parent 0d70cb8929
commit a8d663bee4
2 changed files with 17 additions and 9 deletions

View File

@ -34,20 +34,25 @@ BEGIN
DECLARE vIsTaxDataChecked TINYINT(1);
DECLARE vHasCoreVnl BOOLEAN;
DECLARE vMandateTypeFk INT;
DECLARE vHasDailyInvoice BOOLEAN;
SELECT defaultPayMethodFk,
defaultDueDay,
defaultCredit,
defaultIsTaxDataChecked,
defaultHasCoreVnl,
defaultMandateTypeFk
SELECT cc.defaultPayMethodFk,
cc.defaultDueDay,
cc.defaultCredit,
cc.defaultIsTaxDataChecked,
cc.defaultHasCoreVnl,
cc.defaultMandateTypeFk,
c.hasDailyInvoice
INTO vPayMethodFk,
vDueDay,
vDefaultCredit,
vIsTaxDataChecked,
vHasCoreVnl,
vMandateTypeFk
FROM clientConfig;
vMandateTypeFk,
vHasDailyInvoice
FROM clientConfig cc
LEFT JOIN province p ON p.id = vProvinceFk
LEFT JOIN country c ON c.id = p.countryFk;
INSERT INTO `client`
SET id = vUserFk,
@ -65,7 +70,8 @@ BEGIN
credit = vDefaultCredit,
isTaxDataChecked = vIsTaxDataChecked,
hasCoreVnl = vHasCoreVnl,
isEqualizated = FALSE
isEqualizated = FALSE,
hasDailyInvoice = vHasDailyInvoice
ON duplicate KEY UPDATE
payMethodFk = vPayMethodFk,
dueDay = vDueDay,

View File

@ -0,0 +1,2 @@
ALTER TABLE `client`
ADD COLUMN `hasDailyInvoice` TINYINT(1) NOT NULL DEFAULT 0 COMMENT 'Indica si el cliente requiere facturación diaria por defecto se copiará lo que tenga country.hasDailyInvoice';