mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-19 04:59:18 +00:00
chore: apply pre-commit formatting
(cherry picked from commit 0fc187adc3)
This commit is contained in:
@@ -814,6 +814,7 @@ def get_pos_reserved_qty(item_code, warehouse):
|
|||||||
|
|
||||||
return direct_reserved + bundle_reserved
|
return direct_reserved + bundle_reserved
|
||||||
|
|
||||||
|
|
||||||
def get_direct_pos_reserved_qty(item_code, warehouse):
|
def get_direct_pos_reserved_qty(item_code, warehouse):
|
||||||
"""Reserved qty for the item from direct lines in submitted POS Invoices (matching warehouse)."""
|
"""Reserved qty for the item from direct lines in submitted POS Invoices (matching warehouse)."""
|
||||||
|
|
||||||
@@ -833,6 +834,7 @@ def get_direct_pos_reserved_qty(item_code, warehouse):
|
|||||||
).run(as_dict=True)
|
).run(as_dict=True)
|
||||||
return flt(reserved_qty[0].stock_qty) if reserved_qty else 0
|
return flt(reserved_qty[0].stock_qty) if reserved_qty else 0
|
||||||
|
|
||||||
|
|
||||||
def get_bundle_pos_reserved_qty(item_code, warehouse):
|
def get_bundle_pos_reserved_qty(item_code, warehouse):
|
||||||
"""Reserved qty for the item as a component of Product Bundles in submitted POS Invoices (matching warehouse)."""
|
"""Reserved qty for the item as a component of Product Bundles in submitted POS Invoices (matching warehouse)."""
|
||||||
|
|
||||||
@@ -852,13 +854,14 @@ def get_bundle_pos_reserved_qty(item_code, warehouse):
|
|||||||
& (IfNull(p_inv.consolidated_invoice, "") == "")
|
& (IfNull(p_inv.consolidated_invoice, "") == "")
|
||||||
& (p_item.docstatus == 1)
|
& (p_item.docstatus == 1)
|
||||||
& (p_item.warehouse == warehouse)
|
& (p_item.warehouse == warehouse)
|
||||||
& (pb.name == p_item.item_code) # POS item is a bundle
|
& (pb.name == p_item.item_code) # POS item is a bundle
|
||||||
& (pb_item.parent == pb.name) # Bundle items
|
& (pb_item.parent == pb.name) # Bundle items
|
||||||
& (pb_item.item_code == item_code) # This specific item
|
& (pb_item.item_code == item_code) # This specific item
|
||||||
)
|
)
|
||||||
).run(as_dict=True)
|
).run(as_dict=True)
|
||||||
return flt(bundle_reserved[0].stock_qty) if bundle_reserved else 0
|
return flt(bundle_reserved[0].stock_qty) if bundle_reserved else 0
|
||||||
|
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def make_sales_return(source_name, target_doc=None):
|
def make_sales_return(source_name, target_doc=None):
|
||||||
from erpnext.controllers.sales_and_purchase_return import make_return_doc
|
from erpnext.controllers.sales_and_purchase_return import make_return_doc
|
||||||
|
|||||||
Reference in New Issue
Block a user