mirror of
https://github.com/frappe/books.git
synced 2026-08-24 10:04:45 -05:00
fix : simplify return logic
This commit is contained in:
@@ -1051,12 +1051,11 @@ export abstract class Invoice extends Transactional {
|
||||
.grandTotal!.abs()
|
||||
.sub(sinvreturnedDoc.outstandingAmount!);
|
||||
|
||||
const returnAmount = this.grandTotal!.abs();
|
||||
const intendedReturnAmount = this.grandTotal!.abs();
|
||||
|
||||
const result = returnAmount.lte(totalPaid)
|
||||
? returnAmount
|
||||
return intendedReturnAmount.lte(totalPaid)
|
||||
? intendedReturnAmount
|
||||
: totalPaid;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user