[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,16 +122,15 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({
|
||||
},
|
||||
|
||||
get_items: function() {
|
||||
if(this.frm.doc.__islocal && (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
|
||||
return this.frm.call({
|
||||
doc: this.frm.doc,
|
||||
method: "get_items",
|
||||
callback: function(r) {
|
||||
if(!r.exc) refresh_field("mtn_details");
|
||||
}
|
||||
});
|
||||
if(this.frm.doc.production_order || this.frm.doc.bom_no) {
|
||||
// if production order / bom is mentioned, get items
|
||||
return this.frm.call({
|
||||
doc: this.frm.doc,
|
||||
method: "get_items",
|
||||
callback: function(r) {
|
||||
if(!r.exc) refresh_field("mtn_details");
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -571,7 +571,6 @@ class DocType(StockController):
|
||||
for item in item_dict:
|
||||
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"]
|
||||
|
||||
if desire_to_transfer <= pending_to_issue:
|
||||
item_dict[item]["qty"] = desire_to_transfer
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user