mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 07:54:46 +00:00
chore: minor changes added to code
(cherry picked from commit 3ebe7d861d)
This commit is contained in:
@@ -161,7 +161,7 @@ class POSInvoice(SalesInvoice):
|
|||||||
|
|
||||||
bold_item_name = frappe.bold(item.item_name)
|
bold_item_name = frappe.bold(item.item_name)
|
||||||
bold_extra_batch_qty_needed = frappe.bold(
|
bold_extra_batch_qty_needed = frappe.bold(
|
||||||
abs(available_batch_qty - reserved_batch_qty - item.qty * item.conversion_factor)
|
abs(available_batch_qty - reserved_batch_qty - item.stock_qty)
|
||||||
)
|
)
|
||||||
bold_invalid_batch_no = frappe.bold(item.batch_no)
|
bold_invalid_batch_no = frappe.bold(item.batch_no)
|
||||||
|
|
||||||
@@ -172,7 +172,7 @@ class POSInvoice(SalesInvoice):
|
|||||||
).format(item.idx, bold_invalid_batch_no, bold_item_name),
|
).format(item.idx, bold_invalid_batch_no, bold_item_name),
|
||||||
title=_("Item Unavailable"),
|
title=_("Item Unavailable"),
|
||||||
)
|
)
|
||||||
elif (available_batch_qty - reserved_batch_qty - item.qty * item.conversion_factor) < 0:
|
elif (available_batch_qty - reserved_batch_qty - item.stock_qty) < 0:
|
||||||
frappe.throw(
|
frappe.throw(
|
||||||
_(
|
_(
|
||||||
"Row #{}: Batch No. {} of item {} has less than required stock available, {} more required"
|
"Row #{}: Batch No. {} of item {} has less than required stock available, {} more required"
|
||||||
@@ -652,7 +652,7 @@ def get_bundle_availability(bundle_item_code, warehouse):
|
|||||||
item_pos_reserved_qty = get_pos_reserved_qty(item.item_code, warehouse)
|
item_pos_reserved_qty = get_pos_reserved_qty(item.item_code, warehouse)
|
||||||
available_qty = item_bin_qty - item_pos_reserved_qty
|
available_qty = item_bin_qty - item_pos_reserved_qty
|
||||||
|
|
||||||
max_available_bundles = available_qty / item.qty
|
max_available_bundles = available_qty / item.stock_qty
|
||||||
if bundle_bin_qty > max_available_bundles and frappe.get_value(
|
if bundle_bin_qty > max_available_bundles and frappe.get_value(
|
||||||
"Item", item.item_code, "is_stock_item"
|
"Item", item.item_code, "is_stock_item"
|
||||||
):
|
):
|
||||||
|
|||||||
Reference in New Issue
Block a user