add: saldo supplier
This commit is contained in:
parent
e499a8a1e6
commit
1ea1e5cf46
|
@ -19,4 +19,6 @@ export class Supplier extends BaseModel {
|
|||
status: boolean;
|
||||
|
||||
coa: COA;
|
||||
|
||||
coa_undistribute: COA;
|
||||
}
|
||||
|
|
|
@ -139,7 +139,13 @@ export class SupplierService {
|
|||
'coa',
|
||||
`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
|
||||
.skip(page * 10)
|
||||
|
|
Loading…
Reference in New Issue
Block a user