fix: multiple pos conversion issue resolved
This commit is contained in:
parent
9cd42dd60f
commit
1de531e56e
@ -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)
|
abs(available_batch_qty - reserved_batch_qty - item.qty * item.conversion_factor)
|
||||||
)
|
)
|
||||||
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) < 0:
|
elif (available_batch_qty - reserved_batch_qty - item.qty * item.conversion_factor) < 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"
|
||||||
@ -246,7 +246,7 @@ class POSInvoice(SalesInvoice):
|
|||||||
),
|
),
|
||||||
title=_("Item Unavailable"),
|
title=_("Item Unavailable"),
|
||||||
)
|
)
|
||||||
elif is_stock_item and flt(available_stock) < flt(d.qty):
|
elif is_stock_item and flt(available_stock) < flt(d.qty * d.conversion_factor):
|
||||||
frappe.throw(
|
frappe.throw(
|
||||||
_(
|
_(
|
||||||
"Row #{}: Stock quantity not enough for Item Code: {} under warehouse {}. Available quantity {}."
|
"Row #{}: Stock quantity not enough for Item Code: {} under warehouse {}. Available quantity {}."
|
||||||
|
@ -522,7 +522,7 @@ erpnext.PointOfSale.Controller = class {
|
|||||||
|
|
||||||
const from_selector = field === 'qty' && value === "+1";
|
const from_selector = field === 'qty' && value === "+1";
|
||||||
if (from_selector)
|
if (from_selector)
|
||||||
value = flt(item_row.qty) + flt(value);
|
value = flt(item_row.qty * item_row.conversion_factor) + flt(value);
|
||||||
|
|
||||||
if (item_row_exists) {
|
if (item_row_exists) {
|
||||||
if (field === 'qty')
|
if (field === 'qty')
|
||||||
|
Loading…
Reference in New Issue
Block a user