refactor: gl entries

This commit is contained in:
Ahmed Bouhuolia
2025-06-10 12:29:46 +02:00
parent 90d6bea9b9
commit fa180b3ac5
7 changed files with 13 additions and 5 deletions

View File

@@ -1,3 +1,4 @@
import * as moment from 'moment';
import { sumBy } from 'lodash';
import { BillPayment } from '../models/BillPayment';
import { AccountNormal } from '@/interfaces/Account';

View File

@@ -1,4 +1,5 @@
import { sumBy } from 'lodash';
import * as moment from 'moment';
import { ILedgerEntry } from '@/modules/Ledger/types/Ledger.types';
import { ItemEntry } from '@/modules/TransactionItemEntry/models/ItemEntry';
import { Bill } from '../models/Bill';

View File

@@ -1,6 +1,7 @@
import { ToNumber } from '@/common/decorators/Validators';
import { parseBoolean } from '@/utils/parse-boolean';
import { ApiProperty } from '@nestjs/swagger';
import { Type } from 'class-transformer';
import { Transform, Type } from 'class-transformer';
import {
IsArray,
IsBoolean,
@@ -41,6 +42,7 @@ export class ExpenseCategoryDto {
description?: string;
@IsBoolean()
@Transform(({ value }) => parseBoolean(value, false))
@IsOptional()
landedCost?: boolean;
@@ -103,6 +105,7 @@ export class CommandExpenseDto {
currencyCode?: string;
@IsBoolean()
@Transform(({ value }) => parseBoolean(value, false))
@IsOptional()
@ApiProperty({
description: 'The publish status of the expense',

View File

@@ -4,6 +4,7 @@ import {
Delete,
Get,
Param,
Patch,
Post,
Put,
Query,
@@ -67,7 +68,7 @@ export class ManualJournalsController {
return this.manualJournalsApplication.deleteManualJournal(manualJournalId);
}
@Put(':id/publish')
@Patch(':id/publish')
@ApiOperation({ summary: 'Publish the given manual journal.' })
@ApiResponse({
status: 200,

View File

@@ -1,9 +1,11 @@
import { Injectable } from '@nestjs/common';
import { ApplyVendorCreditToBillsService } from './command/ApplyVendorCreditToBills.service';
import { DeleteApplyVendorCreditToBillService } from './command/DeleteApplyVendorCreditToBill.service';
import { GetAppliedBillsToVendorCreditService } from './queries/GetAppliedBillsToVendorCredit.service';
import { GetVendorCreditToApplyBills } from './queries/GetVendorCreditToApplyBills.service';
import { IVendorCreditApplyToInvoicesDTO } from './types/VendorCreditApplyBills.types';
@Injectable()
export class VendorCreditApplyBillsApplicationService {
/**
* @param {ApplyVendorCreditToBillsService} applyVendorCreditToBillsService