adds CREDIT_DEBIT_NOT_EQUAL error
This commit is contained in:
@@ -33,6 +33,10 @@ export class CommandManualJournalValidators {
|
||||
if (totalCredit <= 0 || totalDebit <= 0) {
|
||||
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 {
|
||||
|
||||
Reference in New Issue
Block a user