7773-testToMaster_2430 #2774

Merged
alexm merged 368 commits from 7773-testToMaster_2430 into master 2024-07-23 06:21:03 +00:00
2 changed files with 17 additions and 9 deletions
Showing only changes of commit a8d663bee4 - Show all commits

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';