Presumably fix some bug for vendor catalog batch

just found this laying around too...
This commit is contained in:
Lance Edgar 2021-06-11 17:42:01 -05:00
parent dc28dd995a
commit 3920a72df9

View file

@ -116,8 +116,11 @@ class VendorCatalogHandler(base.VendorCatalogHandler):
row.old_vendor_code = core_vendor_item.sku row.old_vendor_code = core_vendor_item.sku
row.old_case_size = core_vendor_item.units row.old_case_size = core_vendor_item.units
row.old_unit_cost = core_vendor_item.cost row.old_unit_cost = core_vendor_item.cost
row.old_case_cost = (core_vendor_item.cost * decimal.Decimal(core_vendor_item.units))\ if core_vendor_item.cost is None:
.quantize(decimal.Decimal('0.12345')) row.old_case_cost = None
else:
row.old_case_cost = (core_vendor_item.cost * decimal.Decimal(core_vendor_item.units))\
.quantize(decimal.Decimal('0.12345'))
self.refresh_cost_diffs(row) self.refresh_cost_diffs(row)
self.set_status_per_diffs(row) self.set_status_per_diffs(row)