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