mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 16:04:46 +00:00
This happens due to old data.
(cherry picked from commit 66bf21f143)
Co-authored-by: Ankush Menat <ankush@frappe.io>
This commit is contained in:
@@ -305,7 +305,7 @@ erpnext.patches.v13_0.shopify_deprecation_warning
|
|||||||
erpnext.patches.v13_0.add_custom_field_for_south_africa #2
|
erpnext.patches.v13_0.add_custom_field_for_south_africa #2
|
||||||
erpnext.patches.v13_0.rename_discharge_ordered_date_in_ip_record
|
erpnext.patches.v13_0.rename_discharge_ordered_date_in_ip_record
|
||||||
erpnext.patches.v13_0.remove_bad_selling_defaults
|
erpnext.patches.v13_0.remove_bad_selling_defaults
|
||||||
erpnext.patches.v13_0.trim_whitespace_from_serial_nos
|
erpnext.patches.v13_0.trim_whitespace_from_serial_nos # 16-01-2022
|
||||||
erpnext.patches.v13_0.migrate_stripe_api
|
erpnext.patches.v13_0.migrate_stripe_api
|
||||||
erpnext.patches.v13_0.reset_clearance_date_for_intracompany_payment_entries
|
erpnext.patches.v13_0.reset_clearance_date_for_intracompany_payment_entries
|
||||||
execute:frappe.reload_doc("erpnext_integrations", "doctype", "TaxJar Settings")
|
execute:frappe.reload_doc("erpnext_integrations", "doctype", "TaxJar Settings")
|
||||||
|
|||||||
@@ -9,13 +9,15 @@ def execute():
|
|||||||
from `tabStock Ledger Entry`
|
from `tabStock Ledger Entry`
|
||||||
where
|
where
|
||||||
is_cancelled = 0
|
is_cancelled = 0
|
||||||
and (serial_no like %s or serial_no like %s or serial_no like %s or serial_no like %s)
|
and ( serial_no like %s or serial_no like %s or serial_no like %s or serial_no like %s
|
||||||
|
or serial_no = %s )
|
||||||
""",
|
""",
|
||||||
(
|
(
|
||||||
" %", # leading whitespace
|
" %", # leading whitespace
|
||||||
"% ", # trailing whitespace
|
"% ", # trailing whitespace
|
||||||
"%\n %", # leading whitespace on newline
|
"%\n %", # leading whitespace on newline
|
||||||
"% \n%", # trailing whitespace on newline
|
"% \n%", # trailing whitespace on newline
|
||||||
|
"\n", # just new line
|
||||||
),
|
),
|
||||||
as_dict=True,
|
as_dict=True,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -105,6 +105,7 @@ def get_args_for_future_sle(row):
|
|||||||
|
|
||||||
def validate_serial_no(sle):
|
def validate_serial_no(sle):
|
||||||
from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos
|
from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos
|
||||||
|
|
||||||
for sn in get_serial_nos(sle.serial_no):
|
for sn in get_serial_nos(sle.serial_no):
|
||||||
args = copy.deepcopy(sle)
|
args = copy.deepcopy(sle)
|
||||||
args.serial_no = sn
|
args.serial_no = sn
|
||||||
@@ -415,6 +416,8 @@ class update_entries_after(object):
|
|||||||
return sorted(entries_to_fix, key=lambda k: k['timestamp'])
|
return sorted(entries_to_fix, key=lambda k: k['timestamp'])
|
||||||
|
|
||||||
def process_sle(self, sle):
|
def process_sle(self, sle):
|
||||||
|
from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos
|
||||||
|
|
||||||
# previous sle data for this warehouse
|
# previous sle data for this warehouse
|
||||||
self.wh_data = self.data[sle.warehouse]
|
self.wh_data = self.data[sle.warehouse]
|
||||||
|
|
||||||
@@ -429,7 +432,7 @@ class update_entries_after(object):
|
|||||||
if not self.args.get("sle_id"):
|
if not self.args.get("sle_id"):
|
||||||
self.get_dynamic_incoming_outgoing_rate(sle)
|
self.get_dynamic_incoming_outgoing_rate(sle)
|
||||||
|
|
||||||
if sle.serial_no:
|
if get_serial_nos(sle.serial_no):
|
||||||
self.get_serialized_values(sle)
|
self.get_serialized_values(sle)
|
||||||
self.wh_data.qty_after_transaction += flt(sle.actual_qty)
|
self.wh_data.qty_after_transaction += flt(sle.actual_qty)
|
||||||
if sle.voucher_type == "Stock Reconciliation":
|
if sle.voucher_type == "Stock Reconciliation":
|
||||||
|
|||||||
Reference in New Issue
Block a user