refactor: financial reports to nestjs

This commit is contained in:
Ahmed Bouhuolia
2025-01-18 22:32:45 +02:00
parent 6dd854178d
commit dfc5674088
151 changed files with 5264 additions and 1296 deletions

View File

@@ -1,7 +1,6 @@
import { Model, raw } from 'objection';
import { castArray } from 'lodash';
import moment, { unitOfTime } from 'moment';
import { BaseModel } from '@/models/Model';
import * as moment from 'moment';
import { getTransactionTypeLabel } from '@/modules/BankingTransactions/utils';
import { TInventoryTransactionDirection } from '../types/InventoryCost.types';
import { TenantBaseModel } from '@/modules/System/models/TenantBaseModel';
@@ -53,7 +52,7 @@ export class InventoryTransaction extends TenantBaseModel {
query,
startDate,
endDate,
type: unitOfTime.StartOf = 'day',
type: moment.unitOfTime.StartOf = 'day',
) {
const dateFormat = 'YYYY-MM-DD';
const fromDate = moment(startDate).startOf(type).format(dateFormat);