@@ -92,7 +92,7 @@ <h4>Pending UPI payments <span id="pendingCount" class="pending-badge">0</span><
9292</ main >
9393
9494< div id ="modalRoot "> </ div >
95- < footer > New Serchhip North Village Council · v1.29.8 </ footer >
95+ < footer > New Serchhip North Village Council · v1.29.9 </ footer >
9696
9797< script type ="module ">
9898/* ============================================================
@@ -2809,11 +2809,13 @@ <h4>Pending UPI payments <span id="pendingCount" class="pending-badge">0</span><
28092809 const bal = getEffectiveBalance ( c ) ;
28102810 const entries = ledgers [ c . id ] || await store . getLedger ( c . id ) ;
28112811 const payments = entries . filter ( e => e . type === "payment" ) . map ( e => fmtRs ( e . amount ) ) ;
2812+ const charges = entries . filter ( e => e . type === "charge" && ! e . deferred ) . map ( e => fmtRs ( e . amount ) ) ;
28122813 rows . push ( {
28132814 name : c . name || "—" ,
28142815 jobCard : c . jobCard || c . id ,
28152816 amount : fmtRs ( bal ) ,
2816- payments : payments . length ? "Payment: " + payments . join ( ", " ) : ""
2817+ payments : payments . length ? "Payment: " + payments . join ( ", " ) : "" ,
2818+ charges : charges . length ? "Charge: " + charges . join ( ", " ) : ""
28172819 } ) ;
28182820 }
28192821
@@ -2835,7 +2837,7 @@ <h4>Pending UPI payments <span id="pendingCount" class="pending-badge">0</span><
28352837
28362838 doc . setDrawColor ( 230 , 230 , 230 ) ;
28372839 for ( const r of rows ) {
2838- if ( y > doc . internal . pageSize . getHeight ( ) - 28 ) { doc . addPage ( ) ; y = 20 ; }
2840+ if ( y > doc . internal . pageSize . getHeight ( ) - 36 ) { doc . addPage ( ) ; y = 20 ; }
28392841
28402842 // Row 1: name (left) and amount (right)
28412843 doc . setFont ( undefined , "bold" ) ;
@@ -2862,6 +2864,15 @@ <h4>Pending UPI payments <span id="pendingCount" class="pending-badge">0</span><
28622864 doc . text ( payLines , rightX , y , { align : "right" } ) ;
28632865 }
28642866
2867+ // Row 3: charges (right, red)
2868+ if ( r . charges ) {
2869+ y += 4.5 ;
2870+ const chargeMaxW = 70 ;
2871+ const chargeLines = doc . splitTextToSize ( r . charges , chargeMaxW ) ;
2872+ doc . setTextColor ( 180 , 40 , 40 ) ;
2873+ doc . text ( chargeLines , rightX , y , { align : "right" } ) ;
2874+ }
2875+
28652876 doc . setFontSize ( 11 ) ;
28662877 y += 6 ;
28672878 doc . line ( margin , y , pageW - margin , y ) ;
0 commit comments