fix(installments): guarantee new cheques exactly cover remaining installment amount
- genPreview: compute lastAmt = remaining - amt*(needed-1) to show exact
total; display grand total (existing + new) when cheques already exist;
highlight preview red if lastAmt would be ≤ 0
- generateCheques: guard against per-cheque amount too large (lastAmt ≤ 0)
with clear Arabic error showing max allowed per-cheque value; last cheque
always = remaining - amt*(needed-1) so existing+new always = PLAN_TOTAL
Co-Authored-By:
Claude Sonnet 4.6 <noreply@anthropic.com>
Showing
Please register or sign in to comment