add: saldo supplier
This commit is contained in:
@@ -19,4 +19,6 @@ export class Supplier extends BaseModel {
|
|||||||
status: boolean;
|
status: boolean;
|
||||||
|
|
||||||
coa: COA;
|
coa: COA;
|
||||||
|
|
||||||
|
coa_undistribute: COA;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -139,7 +139,13 @@ export class SupplierService {
|
|||||||
'coa',
|
'coa',
|
||||||
`coa.supplier = supplier.id and coa.type = '2'`,
|
`coa.supplier = supplier.id and coa.type = '2'`,
|
||||||
)
|
)
|
||||||
.select(['supplier', 'coa.amount']);
|
.leftJoinAndMapOne(
|
||||||
|
'supplier.coa_undistribute',
|
||||||
|
COA,
|
||||||
|
'coa_undistribute',
|
||||||
|
`coa_undistribute.supplier = supplier.id and coa_undistribute.type = '9'`,
|
||||||
|
)
|
||||||
|
.select(['supplier', 'coa.amount', 'coa_undistribute.amount']);
|
||||||
|
|
||||||
const data = await baseQuery
|
const data = await baseQuery
|
||||||
.skip(page * 10)
|
.skip(page * 10)
|
||||||
|
|||||||
Reference in New Issue
Block a user