mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-21 15:20:34 +00:00
fix: closing balance in customers list API.
This commit is contained in:
@@ -69,7 +69,7 @@ export default class CustomersService {
|
|||||||
|
|
||||||
private transformContactToCustomer(contactModel: IContact) {
|
private transformContactToCustomer(contactModel: IContact) {
|
||||||
return {
|
return {
|
||||||
...omit(contactModel, ['contactService', 'contactType']),
|
...omit(contactModel.toJSON(), ['contactService', 'contactType']),
|
||||||
customerType: contactModel.contactType,
|
customerType: contactModel.contactType,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -174,7 +174,11 @@ export default class CustomersService {
|
|||||||
public async getCustomersList(
|
public async getCustomersList(
|
||||||
tenantId: number,
|
tenantId: number,
|
||||||
customersFilter: ICustomersFilter
|
customersFilter: ICustomersFilter
|
||||||
): Promise<{ customers: ICustomer[], pagination: IPaginationMeta, filterMeta: IFilterMeta }> {
|
): Promise<{
|
||||||
|
customers: ICustomer[],
|
||||||
|
pagination: IPaginationMeta,
|
||||||
|
filterMeta: IFilterMeta,
|
||||||
|
}> {
|
||||||
const { Contact } = this.tenancy.models(tenantId);
|
const { Contact } = this.tenancy.models(tenantId);
|
||||||
const dynamicList = await this.dynamicListService.dynamicList(tenantId, Contact, customersFilter);
|
const dynamicList = await this.dynamicListService.dynamicList(tenantId, Contact, customersFilter);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user