Replaced renamed total fields in code files

This commit is contained in:
Nabin Hait
2015-02-12 16:09:11 +05:30
parent dd1c2d3018
commit 5690be103c
67 changed files with 1235 additions and 1241 deletions

View File

@@ -227,8 +227,8 @@ erpnext.taxes_and_totals = erpnext.stock.StockController.extend({
if(tax.charge_type == "Actual") {
// distribute the tax amount proportionally to each item row
var actual = flt(tax.rate, precision("tax_amount", tax));
current_tax_amount = this.frm.doc.net_total ?
((item.base_amount / this.frm.doc.net_total) * actual) : 0.0;
current_tax_amount = this.frm.doc.base_net_total ?
((item.base_amount / this.frm.doc.base_net_total) * actual) : 0.0;
} else if(tax.charge_type == "On Net Total") {
current_tax_amount = (tax_rate / 100.0) * item.base_amount;
@@ -258,7 +258,7 @@ erpnext.taxes_and_totals = erpnext.stock.StockController.extend({
},
adjust_discount_amount_loss: function(tax) {
var discount_amount_loss = this.frm.doc.grand_total - flt(this.frm.doc.base_discount_amount) - tax.total;
var discount_amount_loss = this.frm.doc.base_grand_total - flt(this.frm.doc.base_discount_amount) - tax.total;
tax.tax_amount_after_discount_amount = flt(tax.tax_amount_after_discount_amount +
discount_amount_loss, precision("tax_amount", tax));
tax.total = flt(tax.total + discount_amount_loss, precision("total", tax));
@@ -266,7 +266,7 @@ erpnext.taxes_and_totals = erpnext.stock.StockController.extend({
_cleanup: function() {
this.frm.doc.in_words = this.frm.doc.in_words_import = this.frm.doc.in_words_export = "";
this.frm.doc.base_in_words = this.frm.doc.in_words = this.frm.doc.in_words = "";
if(this.frm.doc["items"] && this.frm.doc["items"].length) {
if(!frappe.meta.get_docfield(this.frm.doc["items"][0].doctype, "item_tax_amount", this.frm.doctype)) {
@@ -338,8 +338,8 @@ erpnext.taxes_and_totals = erpnext.stock.StockController.extend({
total_actual_tax += value;
});
grand_total_for_discount_amount = flt(this.frm.doc.grand_total - total_actual_tax,
precision("grand_total"));
grand_total_for_discount_amount = flt(this.frm.doc.base_grand_total - total_actual_tax,
precision("base_grand_total"));
return grand_total_for_discount_amount;
},