mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-21 23:30:32 +00:00
fix: Invalid bill payment amount on editing bill payment
This commit is contained in:
@@ -103,6 +103,7 @@ export class EditBill {
|
||||
tenantId,
|
||||
billDTO.entries
|
||||
);
|
||||
|
||||
// Transforms the bill DTO to model object.
|
||||
const billObj = await this.transformerDTO.billDTOToModel(
|
||||
tenantId,
|
||||
@@ -111,6 +112,11 @@ export class EditBill {
|
||||
authorizedUser,
|
||||
oldBill
|
||||
);
|
||||
// Validate bill total amount should be bigger than paid amount.
|
||||
this.validators.validateBillAmountBiggerPaidAmount(
|
||||
billObj.amount,
|
||||
oldBill.paymentAmount
|
||||
);
|
||||
// Validate landed cost entries that have allocated cost could not be deleted.
|
||||
await this.entriesService.validateLandedCostEntriesNotDeleted(
|
||||
oldBill.entries,
|
||||
|
||||
Reference in New Issue
Block a user