This commit is contained in:
parent
e851c3b481
commit
df271a242d
|
@ -42,20 +42,20 @@ BEGIN
|
|||
OutForeignValue,
|
||||
workerFk
|
||||
)
|
||||
SELECT ar.operationDated dated,
|
||||
TRUE isAccountable,
|
||||
'MB' serie,
|
||||
SELECT ar.operationDated,
|
||||
TRUE,
|
||||
'MB',
|
||||
ar.concept,
|
||||
@totalIn := IF(ar.debitCredit = arc.debitCredit2 AND a.currencyFk = arc.currencyFk, ar.amount, NULL) `in`,
|
||||
@totalOut := IF(ar.debitCredit = arc.debitCredit AND a.currencyFk = arc.currencyFk, ar.amount, NULL) `out`,
|
||||
a.id bankFk,
|
||||
sa.supplierFk companyFk,
|
||||
IF(ar.debitCredit = arc.debitCredit2 AND a.currencyFk = arc.currencyFk, ar.amount, NULL),
|
||||
IF(ar.debitCredit = arc.debitCredit AND a.currencyFk = arc.currencyFk, ar.amount, NULL),
|
||||
a.id,
|
||||
sa.supplierFk,
|
||||
arc.warehouseFk,
|
||||
ar.supplierAccountFk,
|
||||
ar.calculatedCode,
|
||||
@totalIn InForeignValue,
|
||||
@totalOut OutForeignValue,
|
||||
account.myUser_getId() user
|
||||
IF(ar.debitCredit = arc.debitCredit2 AND NOT a.currencyFk = arc.currencyFk, ar.amount, NULL),
|
||||
IF(ar.debitCredit = arc.debitCredit AND NOT a.currencyFk = arc.currencyFk, ar.amount, NULL),
|
||||
account.myUser_getId()
|
||||
FROM accountReconciliation ar
|
||||
JOIN supplierAccount sa ON sa.id = ar.supplierAccountFk
|
||||
JOIN accounting a ON a.id = sa.accountingFk
|
||||
|
|
Loading…
Reference in New Issue