mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-15 03:01:22 +00:00
fixes in warehouse validation
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
|
||||
wn.provide("erpnext.buying");
|
||||
|
||||
erpnext.buying.BuyingController = erpnext.utils.Controller.extend({
|
||||
erpnext.buying.BuyingController = wn.ui.form.Controller.extend({
|
||||
setup: function() {
|
||||
var me = this;
|
||||
|
||||
|
||||
@@ -132,6 +132,10 @@ class DocType(BuyingController):
|
||||
for d in getlist(self.doclist, 'po_details'):
|
||||
#1. Check if is_stock_item == 'Yes'
|
||||
if webnotes.conn.get_value("Item", d.item_code, "is_stock_item") == "Yes":
|
||||
# this happens when item is changed from non-stock to stock item
|
||||
if not d.warehouse:
|
||||
continue
|
||||
|
||||
ind_qty, po_qty = 0, flt(d.qty) * flt(d.conversion_factor)
|
||||
if is_stopped:
|
||||
po_qty = flt(d.qty) > flt(d.received_qty) and \
|
||||
|
||||
Reference in New Issue
Block a user