mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 11:19:09 +00:00
Merge branch 'version-13-hotfix' into misc_asset_fixes_v13
This commit is contained in:
@@ -628,7 +628,6 @@
|
|||||||
"width": "70px"
|
"width": "70px"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 1,
|
|
||||||
"fieldname": "ordered_qty",
|
"fieldname": "ordered_qty",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"label": "Ordered Qty",
|
"label": "Ordered Qty",
|
||||||
@@ -810,7 +809,7 @@
|
|||||||
"idx": 1,
|
"idx": 1,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2023-01-12 13:13:28.691585",
|
"modified": "2022-12-25 02:51:10.247569",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Selling",
|
"module": "Selling",
|
||||||
"name": "Sales Order Item",
|
"name": "Sales Order Item",
|
||||||
|
|||||||
@@ -104,7 +104,6 @@ class TestItem(FrappeTestCase):
|
|||||||
"conversion_factor": 1.0,
|
"conversion_factor": 1.0,
|
||||||
"reserved_qty": 1,
|
"reserved_qty": 1,
|
||||||
"actual_qty": 5,
|
"actual_qty": 5,
|
||||||
"ordered_qty": 10,
|
|
||||||
"projected_qty": 14,
|
"projected_qty": 14,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
def get_data():
|
def get_data():
|
||||||
return {
|
return {
|
||||||
"fieldname": "pick_list",
|
"fieldname": "pick_list",
|
||||||
|
"internal_links": {
|
||||||
|
"Sales Order": ["locations", "sales_order"],
|
||||||
|
},
|
||||||
"transactions": [
|
"transactions": [
|
||||||
{"items": ["Stock Entry", "Delivery Note"]},
|
{"items": ["Stock Entry", "Sales Order", "Delivery Note"]},
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1161,7 +1161,7 @@ def get_projected_qty(item_code, warehouse):
|
|||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def get_bin_details(item_code, warehouse, company=None, include_child_warehouses=False):
|
def get_bin_details(item_code, warehouse, company=None, include_child_warehouses=False):
|
||||||
bin_details = {"projected_qty": 0, "actual_qty": 0, "reserved_qty": 0, "ordered_qty": 0}
|
bin_details = {"projected_qty": 0, "actual_qty": 0, "reserved_qty": 0}
|
||||||
|
|
||||||
if warehouse:
|
if warehouse:
|
||||||
from frappe.query_builder.functions import Coalesce, Sum
|
from frappe.query_builder.functions import Coalesce, Sum
|
||||||
@@ -1177,7 +1177,6 @@ def get_bin_details(item_code, warehouse, company=None, include_child_warehouses
|
|||||||
Coalesce(Sum(bin.projected_qty), 0).as_("projected_qty"),
|
Coalesce(Sum(bin.projected_qty), 0).as_("projected_qty"),
|
||||||
Coalesce(Sum(bin.actual_qty), 0).as_("actual_qty"),
|
Coalesce(Sum(bin.actual_qty), 0).as_("actual_qty"),
|
||||||
Coalesce(Sum(bin.reserved_qty), 0).as_("reserved_qty"),
|
Coalesce(Sum(bin.reserved_qty), 0).as_("reserved_qty"),
|
||||||
Coalesce(Sum(bin.ordered_qty), 0).as_("ordered_qty"),
|
|
||||||
)
|
)
|
||||||
.where((bin.item_code == item_code) & (bin.warehouse.isin(warehouses)))
|
.where((bin.item_code == item_code) & (bin.warehouse.isin(warehouses)))
|
||||||
).run(as_dict=True)[0]
|
).run(as_dict=True)[0]
|
||||||
|
|||||||
Reference in New Issue
Block a user