This question has been flagged
1 Reply
2392 Views
Is there a way to add a fixed line spacing between Total and 0.00?


OTHER DISCOUNTS
-------------------------
Description     Amount    
CM              10.00     
-------------------------
Total           10.00     




















                                                                                0.00
                                                                                19,380.00
                                                                                0.00
                                                                                0.00
                                                                                0.00
                                                                                19,370.00
 



My code: ${'OTHER DISCOUNTS'.ljust(10)} ${''.rjust(25,'-')} ${'Description'.ljust(15)} ${'Amount'.ljust(10)} % for l in object.account_invoice_deduction_line: ${l.description[:10].ljust(15)} ${"{:4,.2f}".format(l.amount).ljust(10)} %endfor ${''.rjust(25,'-')} ${"Total".ljust(15)} ${"{:4,.2f}".format(object.total_applied_discount).ljust(10)} %set end_line = vars.line_counter %for _ in range(1, 28): %set end_line = end_line + 1 %if end_line < 20: ${''} %endif %endfor ${"".rjust(80)}${"{:4,.2f}".format(vars.vatable_sales)} ${"".rjust(80)}${"{:4,.2f}".format(vars.vat_exempt_sales)} ${"".rjust(80)}${"0.00"} ${"".rjust(80)}${"{:4,.2f}".format(object.amount_tax)} ${"".rjust(80)}${"{:4,.2f}".format(vars.outright_discount + vars.cash_discount + vars.freight_discount + vars.promo_discount)} ${"".rjust(80)}${"{:4,.2f}".format(object.residual)}

Avatar
Discard
Best Answer

Hello,
Below block added a some extra lines  so you don't want this block so remove this section.

This Section is unnecessary right now as per your posted code, 
so you not require this so please remove this section.
**************************************************************
 %set end_line = vars.line_counter
%for _ in range(1, 28):
%set end_line = end_line + 1
%if end_line < 20:
${''}
%endif 
%endfor


Thanks

Avatar
Discard