fix: travis
This commit is contained in:
@@ -262,7 +262,7 @@ def get_incoming_rate(args, raise_error_if_no_rate=True):
|
||||
if isinstance(args, dict):
|
||||
args = frappe._dict(args)
|
||||
|
||||
if item_details.has_serial_no and args.get("serial_and_batch_bundle"):
|
||||
if item_details and item_details.has_serial_no and args.get("serial_and_batch_bundle"):
|
||||
args.actual_qty = args.qty
|
||||
sn_obj = SerialNoValuation(
|
||||
sle=args,
|
||||
@@ -272,7 +272,7 @@ def get_incoming_rate(args, raise_error_if_no_rate=True):
|
||||
|
||||
in_rate = sn_obj.get_incoming_rate()
|
||||
|
||||
elif item_details.has_batch_no and args.get("serial_and_batch_bundle"):
|
||||
elif item_details and item_details.has_batch_no and args.get("serial_and_batch_bundle"):
|
||||
args.actual_qty = args.qty
|
||||
batch_obj = BatchNoValuation(
|
||||
sle=args,
|
||||
@@ -307,7 +307,6 @@ def get_incoming_rate(args, raise_error_if_no_rate=True):
|
||||
currency=erpnext.get_company_currency(args.get("company")),
|
||||
company=args.get("company"),
|
||||
raise_error_if_no_rate=raise_error_if_no_rate,
|
||||
batch_no=args.get("batch_no"),
|
||||
)
|
||||
|
||||
return flt(in_rate)
|
||||
@@ -455,17 +454,6 @@ def update_included_uom_in_report(columns, result, include_uom, conversion_facto
|
||||
row[key] = value
|
||||
|
||||
|
||||
def get_available_serial_nos(args):
|
||||
return frappe.db.sql(
|
||||
""" SELECT name from `tabSerial No`
|
||||
WHERE item_code = %(item_code)s and warehouse = %(warehouse)s
|
||||
and timestamp(purchase_date, purchase_time) <= timestamp(%(posting_date)s, %(posting_time)s)
|
||||
""",
|
||||
args,
|
||||
as_dict=1,
|
||||
)
|
||||
|
||||
|
||||
def add_additional_uom_columns(columns, result, include_uom, conversion_factors):
|
||||
if not include_uom or not conversion_factors:
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user