Lot invoicing + Fee padding
This commit is contained in:
@@ -5036,6 +5036,14 @@ class LotInvoiceStart(ModelView):
|
||||
if getattr(line, 'lot', None)]
|
||||
return self._split_sale_padding(self.sale_padding, lots)
|
||||
|
||||
@classmethod
|
||||
def _split_sale_padding(cls, padding, lots):
|
||||
padding = Decimal(str(padding or 0))
|
||||
if not padding or not lots:
|
||||
return {}
|
||||
share = padding / Decimal(len(lots))
|
||||
return {lot.id: share for lot in lots}
|
||||
|
||||
@staticmethod
|
||||
def _record_key(record):
|
||||
return getattr(record, 'id', None) or id(record)
|
||||
|
||||
Reference in New Issue
Block a user