From cb96b614497846509730e8b918b5d0ac4af2d1b3 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Wed, 30 Sep 2015 16:22:05 +0530 Subject: [PATCH] [fix] remove validation to disallow lower rate --- erpnext/stock/doctype/stock_entry/stock_entry.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index 68274d1b42..6a949d399b 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -241,7 +241,6 @@ class StockEntry(StockController): self.set_basic_rate(force) self.distribute_additional_costs() self.update_valuation_rate() - self.validate_valuation_rate() self.set_total_incoming_outgoing_value() self.set_total_amount() @@ -299,19 +298,6 @@ class StockEntry(StockController): d.valuation_rate = flt(flt(d.basic_rate) + flt(d.additional_cost) / flt(d.transfer_qty), d.precision("valuation_rate")) - def validate_valuation_rate(self): - if self.purpose in ["Manufacture", "Repack"]: - valuation_at_source, valuation_at_target = 0, 0 - for d in self.get("items"): - if d.s_warehouse and not d.t_warehouse: - valuation_at_source += flt(d.amount) - if d.t_warehouse and not d.s_warehouse: - valuation_at_target += flt(d.amount) - - if valuation_at_target + 0.001 < valuation_at_source: - frappe.throw(_("Total valuation ({0}) for manufactured or repacked item(s) can not be less than total valuation of raw materials ({1})") - .format(valuation_at_target, valuation_at_source)) - def set_total_incoming_outgoing_value(self): self.total_incoming_value = self.total_outgoing_value = 0.0 for d in self.get("items"):