[fix] [minor] [stock entry] call get_items even if item exists and on saved document
This commit is contained in:
parent
176f3afd14
commit
c46d044efe
@ -122,8 +122,7 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
get_items: function() {
|
get_items: function() {
|
||||||
if(this.frm.doc.__islocal && (this.frm.doc.production_order || this.frm.doc.bom_no)
|
if(this.frm.doc.production_order || this.frm.doc.bom_no) {
|
||||||
&& !getchildren('Stock Entry Detail', this.frm.doc.name, 'mtn_details').length) {
|
|
||||||
// if production order / bom is mentioned, get items
|
// if production order / bom is mentioned, get items
|
||||||
return this.frm.call({
|
return this.frm.call({
|
||||||
doc: this.frm.doc,
|
doc: this.frm.doc,
|
||||||
|
@ -571,7 +571,6 @@ class DocType(StockController):
|
|||||||
for item in item_dict:
|
for item in item_dict:
|
||||||
pending_to_issue = (max_qty * item_dict[item]["qty"]) - issued_item_qty.get(item, 0)
|
pending_to_issue = (max_qty * item_dict[item]["qty"]) - issued_item_qty.get(item, 0)
|
||||||
desire_to_transfer = flt(self.doc.fg_completed_qty) * item_dict[item]["qty"]
|
desire_to_transfer = flt(self.doc.fg_completed_qty) * item_dict[item]["qty"]
|
||||||
|
|
||||||
if desire_to_transfer <= pending_to_issue:
|
if desire_to_transfer <= pending_to_issue:
|
||||||
item_dict[item]["qty"] = desire_to_transfer
|
item_dict[item]["qty"] = desire_to_transfer
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user