mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-21 07:10:33 +00:00
fix: Invalid bill payment amount on editing bill payment
This commit is contained in:
@@ -21,6 +21,20 @@ export class BillsValidators {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates the bill amount is bigger than paid amount.
|
||||
* @param {number} billAmount
|
||||
* @param {number} paidAmount
|
||||
*/
|
||||
public validateBillAmountBiggerPaidAmount(
|
||||
billAmount: number,
|
||||
paidAmount: number,
|
||||
) {
|
||||
if (billAmount < paidAmount) {
|
||||
throw new ServiceError(ERRORS.BILL_AMOUNT_SMALLER_THAN_PAID_AMOUNT);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates the bill number existance.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user