Rounding Adjustment via a separate field, instead of last tax row (#10659)
* Rounding Adjust via a separate field, instead of last tax row
* Fixed test cases
diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js
index f5bcf1c..a5ef15e 100644
--- a/erpnext/public/js/controllers/transaction.js
+++ b/erpnext/public/js/controllers/transaction.js
@@ -660,30 +660,32 @@
"base_discount_amount", "base_grand_total", "base_rounded_total", "base_in_words",
"base_taxes_and_charges_added", "base_taxes_and_charges_deducted", "total_amount_to_pay",
"base_paid_amount", "base_write_off_amount", "base_change_amount", "base_operating_cost",
- "base_raw_material_cost", "base_total_cost", "base_scrap_material_cost"
- ], company_currency);
+ "base_raw_material_cost", "base_total_cost", "base_scrap_material_cost",
+ "base_rounding_adjustment"], company_currency);
this.frm.set_currency_labels(["total", "net_total", "total_taxes_and_charges", "discount_amount",
"grand_total", "taxes_and_charges_added", "taxes_and_charges_deducted",
- "rounded_total", "in_words", "paid_amount", "write_off_amount", "operating_cost", "scrap_material_cost",
- "raw_material_cost", "total_cost"], this.frm.doc.currency);
+ "rounded_total", "in_words", "paid_amount", "write_off_amount", "operating_cost",
+ "scrap_material_cost", "rounding_adjustment", "raw_material_cost",
+ "total_cost"], this.frm.doc.currency);
- this.frm.set_currency_labels(["outstanding_amount", "total_advance"], this.frm.doc.party_account_currency);
+ this.frm.set_currency_labels(["outstanding_amount", "total_advance"],
+ this.frm.doc.party_account_currency);
cur_frm.set_df_property("conversion_rate", "description", "1 " + this.frm.doc.currency
- + " = [?] " + company_currency)
+ + " = [?] " + company_currency);
if(this.frm.doc.price_list_currency && this.frm.doc.price_list_currency!=company_currency) {
- cur_frm.set_df_property("plc_conversion_rate", "description", "1 " + this.frm.doc.price_list_currency
- + " = [?] " + company_currency)
+ cur_frm.set_df_property("plc_conversion_rate", "description", "1 "
+ + this.frm.doc.price_list_currency + " = [?] " + company_currency);
}
// toggle fields
- this.frm.toggle_display(["conversion_rate", "base_total", "base_net_total", "base_total_taxes_and_charges",
- "base_taxes_and_charges_added", "base_taxes_and_charges_deducted",
+ this.frm.toggle_display(["conversion_rate", "base_total", "base_net_total",
+ "base_total_taxes_and_charges", "base_taxes_and_charges_added", "base_taxes_and_charges_deducted",
"base_grand_total", "base_rounded_total", "base_in_words", "base_discount_amount",
- "base_paid_amount", "base_write_off_amount", "base_operating_cost",
- "base_raw_material_cost", "base_total_cost", "base_scrap_material_cost"],
+ "base_paid_amount", "base_write_off_amount", "base_operating_cost", "base_raw_material_cost",
+ "base_total_cost", "base_scrap_material_cost", "base_rounding_adjustment"],
this.frm.doc.currency != company_currency);
this.frm.toggle_display(["plc_conversion_rate", "price_list_currency"],