mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-02 16:13:22 +00:00
[minor] check if the company is selected or not before triggering get_bank_cash_account (#9830)
* [minor] check if the company is selected or not before triggering get_bank_cash_account * [minor] check if production order is available * [minor] fixed codacy errors
This commit is contained in:
@@ -340,10 +340,15 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({
|
||||
production_order: function() {
|
||||
var me = this;
|
||||
this.toggle_enable_bom();
|
||||
if(!me.frm.doc.production_order) {
|
||||
return;
|
||||
}
|
||||
|
||||
return frappe.call({
|
||||
method: "erpnext.stock.doctype.stock_entry.stock_entry.get_production_order_details",
|
||||
args: {production_order: me.frm.doc.production_order},
|
||||
args: {
|
||||
production_order: me.frm.doc.production_order
|
||||
},
|
||||
callback: function(r) {
|
||||
if (!r.exc) {
|
||||
$.each(["from_bom", "bom_no", "fg_completed_qty", "use_multi_level_bom"], function(i, field) {
|
||||
|
||||
Reference in New Issue
Block a user