mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +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) {
|
||||
return {
|
||||
...omit(contactModel, ['contactService', 'contactType']),
|
||||
...omit(contactModel.toJSON(), ['contactService', 'contactType']),
|
||||
customerType: contactModel.contactType,
|
||||
};
|
||||
}
|
||||
@@ -174,7 +174,11 @@ export default class CustomersService {
|
||||
public async getCustomersList(
|
||||
tenantId: number,
|
||||
customersFilter: ICustomersFilter
|
||||
): Promise<{ customers: ICustomer[], pagination: IPaginationMeta, filterMeta: IFilterMeta }> {
|
||||
): Promise<{
|
||||
customers: ICustomer[],
|
||||
pagination: IPaginationMeta,
|
||||
filterMeta: IFilterMeta,
|
||||
}> {
|
||||
const { Contact } = this.tenancy.models(tenantId);
|
||||
const dynamicList = await this.dynamicListService.dynamicList(tenantId, Contact, customersFilter);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user