refactor: refs #7202 modified procedure to include customsAgent field when creating an invoice
This commit is contained in:
parent
698ef3dec3
commit
a6799cba0f
|
@ -105,7 +105,8 @@ BEGIN
|
||||||
clientFk,
|
clientFk,
|
||||||
dued,
|
dued,
|
||||||
companyFk,
|
companyFk,
|
||||||
siiTypeInvoiceOutFk
|
siiTypeInvoiceOutFk,
|
||||||
|
customsAgentFk
|
||||||
)
|
)
|
||||||
SELECT
|
SELECT
|
||||||
1,
|
1,
|
||||||
|
@ -118,9 +119,11 @@ BEGIN
|
||||||
vCplusCorrectingInvoiceTypeFk,
|
vCplusCorrectingInvoiceTypeFk,
|
||||||
IF(vSerial = vSimplifiedSerial,
|
IF(vSerial = vSimplifiedSerial,
|
||||||
vCplusSimplifiedInvoiceTypeFk,
|
vCplusSimplifiedInvoiceTypeFk,
|
||||||
vCplusStandardInvoiceTypeFk))
|
vCplusStandardInvoiceTypeFk)),
|
||||||
FROM client
|
a.customsAgentFk
|
||||||
WHERE id = vClientFk;
|
FROM client c
|
||||||
|
JOIN address a ON a.id = c.defaultAddressFk
|
||||||
|
WHERE c.id = vClientFk;
|
||||||
|
|
||||||
SET vNewInvoiceId = LAST_INSERT_ID();
|
SET vNewInvoiceId = LAST_INSERT_ID();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue