mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-30 10:24:48 +00:00
Show only sub-contracted purchase order in stock entry for subcontracting
This commit is contained in:
@@ -44,6 +44,15 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.frm.set_query("purchase_order", function() {
|
||||||
|
return {
|
||||||
|
"filters": {
|
||||||
|
"docstatus": 1,
|
||||||
|
"is_subcontracted": "Yes"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
if(cint(frappe.defaults.get_default("auto_accounting_for_stock"))) {
|
if(cint(frappe.defaults.get_default("auto_accounting_for_stock"))) {
|
||||||
this.frm.add_fetch("company", "stock_adjustment_account", "expense_account");
|
this.frm.add_fetch("company", "stock_adjustment_account", "expense_account");
|
||||||
this.frm.fields_dict.items.grid.get_field('expense_account').get_query =
|
this.frm.fields_dict.items.grid.get_field('expense_account').get_query =
|
||||||
|
|||||||
Reference in New Issue
Block a user