@@ -51,7 +51,7 @@ def get_result(filters, tds_docs, tds_accounts, tax_category_map, journal_entry_
5151 entries = {}
5252 for name , details in gle_map .items ():
5353 for entry in details :
54- tax_amount , total_amount , grand_total , base_total = 0 , 0 , 0 , 0
54+ tax_amount , total_amount , grand_total , base_total , base_tax_withholding_net_total = 0 , 0 , 0 , 0 , 0
5555 tax_withholding_category , rate = None , None
5656 bill_no , bill_date = "" , ""
5757 party = entry .party or entry .against
@@ -83,6 +83,7 @@ def get_result(filters, tds_docs, tds_accounts, tax_category_map, journal_entry_
8383 # back calculate total amount from rate and tax_amount
8484 base_total = min (flt (tax_amount / (rate / 100 ), precision = precision ), values [0 ])
8585 total_amount = grand_total = base_total
86+ base_tax_withholding_net_total = total_amount
8687
8788 else :
8889 if tax_amount and rate :
@@ -93,12 +94,16 @@ def get_result(filters, tds_docs, tds_accounts, tax_category_map, journal_entry_
9394
9495 grand_total = values [1 ]
9596 base_total = values [2 ]
97+ base_tax_withholding_net_total = total_amount
9698
9799 if voucher_type == "Purchase Invoice" :
100+ base_tax_withholding_net_total = values [0 ]
98101 bill_no = values [3 ]
99102 bill_date = values [4 ]
103+
100104 else :
101105 total_amount += entry .credit
106+ base_tax_withholding_net_total = total_amount
102107
103108 if tax_amount :
104109 if party_map .get (party , {}).get ("party_type" ) == "Supplier" :
@@ -125,6 +130,7 @@ def get_result(filters, tds_docs, tds_accounts, tax_category_map, journal_entry_
125130 "rate" : rate ,
126131 "total_amount" : total_amount ,
127132 "grand_total" : grand_total ,
133+ "base_tax_withholding_net_total" : base_tax_withholding_net_total ,
128134 "base_total" : base_total ,
129135 "tax_amount" : tax_amount ,
130136 "transaction_date" : posting_date ,
@@ -252,14 +258,14 @@ def get_columns(filters):
252258 "width" : 60 ,
253259 },
254260 {
255- "label" : _ ("Total Amount " ),
256- "fieldname" : "total_amount " ,
261+ "label" : _ ("Tax Withholding Net Total " ),
262+ "fieldname" : "base_tax_withholding_net_total " ,
257263 "fieldtype" : "Float" ,
258- "width" : 120 ,
264+ "width" : 150 ,
259265 },
260266 {
261- "label" : _ ("Base Total " ),
262- "fieldname" : "base_total " ,
267+ "label" : _ ("Taxable Amount " ),
268+ "fieldname" : "total_amount " ,
263269 "fieldtype" : "Float" ,
264270 "width" : 120 ,
265271 },
@@ -270,10 +276,16 @@ def get_columns(filters):
270276 "width" : 120 ,
271277 },
272278 {
273- "label" : _ ("Grand Total" ),
279+ "label" : _ ("Grand Total (Company Currency)" ),
280+ "fieldname" : "base_total" ,
281+ "fieldtype" : "Float" ,
282+ "width" : 150 ,
283+ },
284+ {
285+ "label" : _ ("Grand Total (Transaction Currency)" ),
274286 "fieldname" : "grand_total" ,
275287 "fieldtype" : "Float" ,
276- "width" : 120 ,
288+ "width" : 170 ,
277289 },
278290 {"label" : _ ("Transaction Type" ), "fieldname" : "transaction_type" , "width" : 130 },
279291 {
0 commit comments