Prefer null over zero, for empty amounts in credit record
This commit is contained in:
parent
8a535b6cf5
commit
bdfaff6e7a
|
@ -1830,8 +1830,8 @@ class PurchaseBatchHandler(BatchHandler):
|
|||
credit = model.PurchaseCredit()
|
||||
self.populate_credit(credit, row)
|
||||
credit.credit_type = 'missing'
|
||||
credit.cases_shorted = cases
|
||||
credit.units_shorted = units
|
||||
credit.cases_shorted = cases or None
|
||||
credit.units_shorted = units or None
|
||||
credit.status = self.enum.PURCHASE_CREDIT_STATUS_NEW
|
||||
if not credit.date_received:
|
||||
credit.date_received = date_received
|
||||
|
|
Loading…
Reference in a new issue