mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-04 20:59:11 +00:00
Reserve for subcontracting (#13195)
* [fix] #8427 * review comments changes * Validation for reserved warhouse * code improvements * alignment * test case * message changes * default warehouse / remove validation / change sql * fix * patch * Fixed merge conflict * Fixes and cleanups of reserve qty for subcontracting * set from_warehouse only if purchase_order and purpose found (#12398) * [HotFix] Validation issue for subcontract stock entry (#12127) * [Fix] Validation issue for subcontract stock entry * Update stock_entry.py * Fixes and cleanups of reserve qty for subcontracting * patch fixed * Reload bin in patch * [fix] set source warehouse in stock entry for manufacture * [fix] #8540 * code alignment * code alignment * Move target warehouse validation to submit * validation code improvement * code changes for single stock entry * validation fix * call make_rm_stock_entry * remove old stock entry method/rewrite test case * Don't set bom_no against raw materials while trasferring items for sub-contracting * minor fix
This commit is contained in:
@@ -90,7 +90,7 @@ erpnext.stock.ItemDashboard = Class.extend({
|
||||
data.forEach(function(d) {
|
||||
d.actual_or_pending = d.projected_qty + d.reserved_qty + d.reserved_qty_for_production;
|
||||
d.pending_qty = 0;
|
||||
d.total_reserved = d.reserved_qty + d.reserved_qty_for_production;
|
||||
d.total_reserved = d.reserved_qty + d.reserved_qty_for_production + d.reserved_qty_for_sub_contract;
|
||||
if(d.actual_or_pending > d.actual_qty) {
|
||||
d.pending_qty = d.actual_or_pending - d.actual_qty;
|
||||
}
|
||||
|
||||
@@ -26,13 +26,14 @@ def get_data(item_code=None, warehouse=None, item_group=None,
|
||||
return frappe.db.sql('''
|
||||
select
|
||||
b.item_code, b.warehouse, b.projected_qty, b.reserved_qty,
|
||||
b.reserved_qty_for_production, b.actual_qty, b.valuation_rate, i.item_name
|
||||
b.reserved_qty_for_production, b.reserved_qty_for_sub_contract, b.actual_qty, b.valuation_rate, i.item_name
|
||||
from
|
||||
tabBin b, tabItem i
|
||||
where
|
||||
b.item_code = i.name
|
||||
and
|
||||
(b.projected_qty != 0 or b.reserved_qty != 0 or b.reserved_qty_for_production != 0 or b.actual_qty != 0)
|
||||
(b.projected_qty != 0 or b.reserved_qty != 0 or b.reserved_qty_for_production != 0
|
||||
or b.reserved_qty_for_sub_contract != 0 or b.actual_qty != 0)
|
||||
{conditions}
|
||||
order by
|
||||
{sort_by} {sort_order}
|
||||
|
||||
Reference in New Issue
Block a user