mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-13 20:05:09 +00:00
fix: do not remove item which has zero qty and zero valuation
(cherry picked from commit 86e4a658a5)
# Conflicts:
# erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py
This commit is contained in:
committed by
Mergify
parent
a8e1c4f6cd
commit
ef77791bd6
@@ -163,8 +163,16 @@ class StockReconciliation(StockController):
|
|||||||
def set_current_serial_and_batch_bundle(self, voucher_detail_no=None, save=False) -> None:
|
def set_current_serial_and_batch_bundle(self, voucher_detail_no=None, save=False) -> None:
|
||||||
"""Set Serial and Batch Bundle for each item"""
|
"""Set Serial and Batch Bundle for each item"""
|
||||||
for item in self.items:
|
for item in self.items:
|
||||||
|
<<<<<<< HEAD
|
||||||
if not frappe.db.exists("Item", item.item_code):
|
if not frappe.db.exists("Item", item.item_code):
|
||||||
frappe.throw(_("Item {0} does not exist").format(item.item_code))
|
frappe.throw(_("Item {0} does not exist").format(item.item_code))
|
||||||
|
=======
|
||||||
|
if voucher_detail_no and voucher_detail_no != item.name:
|
||||||
|
continue
|
||||||
|
|
||||||
|
if not item.item_code:
|
||||||
|
continue
|
||||||
|
>>>>>>> 86e4a658a5 (fix: do not remove item which has zero qty and zero valuation)
|
||||||
|
|
||||||
item_details = frappe.get_cached_value(
|
item_details = frappe.get_cached_value(
|
||||||
"Item", item.item_code, ["has_serial_no", "has_batch_no"], as_dict=1
|
"Item", item.item_code, ["has_serial_no", "has_batch_no"], as_dict=1
|
||||||
@@ -232,9 +240,6 @@ class StockReconciliation(StockController):
|
|||||||
if not save and item.use_serial_batch_fields:
|
if not save and item.use_serial_batch_fields:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if voucher_detail_no and voucher_detail_no != item.name:
|
|
||||||
continue
|
|
||||||
|
|
||||||
if not item.current_serial_and_batch_bundle:
|
if not item.current_serial_and_batch_bundle:
|
||||||
serial_and_batch_bundle = frappe.get_doc(
|
serial_and_batch_bundle = frappe.get_doc(
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user