Lot invoicing + Fee padding

This commit is contained in:
2026-06-23 13:54:14 +02:00
parent fbf3842e6c
commit 50b262dbd2

View File

@@ -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)