mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 05:10:31 +00:00
adds CREDIT_DEBIT_NOT_EQUAL error
This commit is contained in:
@@ -33,6 +33,10 @@ export class CommandManualJournalValidators {
|
|||||||
if (totalCredit <= 0 || totalDebit <= 0) {
|
if (totalCredit <= 0 || totalDebit <= 0) {
|
||||||
throw new ServiceError(ERRORS.CREDIT_DEBIT_NOT_EQUAL_ZERO);
|
throw new ServiceError(ERRORS.CREDIT_DEBIT_NOT_EQUAL_ZERO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (totalCredit !== totalDebit) {
|
||||||
|
throw new ServiceError(ERRORS.CREDIT_DEBIT_NOT_EQUAL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private roundToTwoDecimals(value: number): number {
|
private roundToTwoDecimals(value: number): number {
|
||||||
|
|||||||
Reference in New Issue
Block a user