feat: integrate multiple branches and warehouses with import

This commit is contained in:
Ahmed Bouhuolia
2024-09-02 14:42:05 +02:00
parent 266902026e
commit bfb3909d26
41 changed files with 392 additions and 11 deletions

View File

@@ -15,12 +15,17 @@ export class CreditNotesExportable extends Exportable {
* @returns {}
*/
public exportable(tenantId: number, query: ICreditNotesQueryDTO) {
const filterQuery = (query) => {
query.withGraphFetched('branch');
query.withGraphFetched('warehouse');
};
const parsedQuery = {
sortOrder: 'desc',
columnSortBy: 'created_at',
...query,
page: 1,
pageSize: 12000,
filterQuery,
} as ICreditNotesQueryDTO;
return this.getCreditNotes