This commit is contained in:
parent
0d70cb8929
commit
a8d663bee4
|
@ -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,
|
||||
|
|
|
@ -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';
|
Loading…
Reference in New Issue