From 7b19b9ed02e1cbb0b5e7d217544229daa68b9ae3 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 24 Feb 2015 09:42:24 +0530 Subject: [PATCH] minor fixes --- erpnext/controllers/taxes_and_totals.py | 4 ++-- erpnext/selling/sales_common.js | 4 ---- erpnext/stock/doctype/purchase_receipt/purchase_receipt.py | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/erpnext/controllers/taxes_and_totals.py b/erpnext/controllers/taxes_and_totals.py index 24ca3c6922..c786d2ab20 100644 --- a/erpnext/controllers/taxes_and_totals.py +++ b/erpnext/controllers/taxes_and_totals.py @@ -356,8 +356,8 @@ class calculate_taxes_and_totals(object): return flt(self.doc.grand_total - sum(actual_taxes_dict.values()), self.doc.precision("grand_total")) - def calculate_total_advance(self, parenttype, advance_parentfield): - if self.docstatus < 2: + def calculate_total_advance(self): + if self.doc.docstatus < 2: total_allocated_amount = sum([flt(adv.allocated_amount, adv.precision("allocated_amount")) for adv in self.doc.get("advances")]) diff --git a/erpnext/selling/sales_common.js b/erpnext/selling/sales_common.js index f73b7970c6..85f4f73baf 100644 --- a/erpnext/selling/sales_common.js +++ b/erpnext/selling/sales_common.js @@ -17,10 +17,6 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({ this.toggle_editable_price_list_rate(); }, - onload_post_render: function() { - cur_frm.get_field("items").grid.set_multiple_add("item_code", "qty"); - }, - setup_queries: function() { var me = this; diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py index 2785cc13a2..48fbb15fca 100644 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py @@ -330,7 +330,7 @@ class PurchaseReceipt(BuyingController): })) # divisional loss adjustment - if not self.get("other_charges"): + if not self.get("taxes"): sle_valuation_amount = flt(flt(d.valuation_rate, val_rate_db_precision) * flt(d.qty) * flt(d.conversion_factor), self.precision("base_net_amount", d))