diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index da516deeac..a4c54b445c 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -177,11 +177,11 @@ class update_entries_after(object): self.prev_stock_value = self.stock_value # update current sle - frappe.db.sql("""update `tabStock Ledger Entry` - set qty_after_transaction=%s, valuation_rate=%s, stock_queue=%s, - stock_value=%s, stock_value_difference=%s where name=%s""", - (self.qty_after_transaction, self.valuation_rate, - json.dumps(self.stock_queue), self.stock_value, stock_value_difference, sle.name)) + sle.qty_after_transaction = self.qty_after_transaction + sle.valuation_rate = self.valuation_rate + sle.stock_queue = json.dumps(self.stock_queue) + sle.stock_value_difference = stock_value_difference + sle.save() def validate_negative_stock(self, sle): """ diff --git a/erpnext/templates/form_grid/material_request_grid.html b/erpnext/templates/form_grid/material_request_grid.html index 1e25909d7e..812245a8c1 100644 --- a/erpnext/templates/form_grid/material_request_grid.html +++ b/erpnext/templates/form_grid/material_request_grid.html @@ -15,13 +15,10 @@

{%= doc.description %}

{% } %}
{% if(doc.warehouse) { %} -
- - {%= doc.warehouse %} - -
+ + {%= doc.warehouse %} + {% } %} {% if(doc.schedule_date) { %}