Add per-slot explicit installment amounts to product plans
- Migration: add installment_amounts JSONB (nullable) to product_installment_plans
- ProductInstallmentPlan: new buildSchedule() method — uses explicit piaster amounts per slot where set, auto-calculates remainder evenly for blank slots; downPaymentAmount/regularInstallmentAmount respect slot[0] override
- ProductForm: syncInstallmentSlots() keeps slot array in sync when count changes; plan rows load/save installment_amounts (stored as piasters, shown as pounds); slot inputs appear under collapsible "تحديد مبلغ كل قسط" toggle per plan row
- Wizard confirm(): uses buildSchedule() so each Installment row gets its correct explicit or auto-calculated amount
- Wizard blade breakdown preview: renders individual amounts when slots differ, uniform "N × amount" when all regular slots match
Co-Authored-By:
Claude Sonnet 4.6 <noreply@anthropic.com>
Showing
Please register or sign in to comment