main #7

Merged
admin merged 620 commits from main into dev 2026-03-29 13:03:25 +00:00
Showing only changes of commit 8bb34aa4fb - Show all commits

View File

@@ -793,6 +793,8 @@ class PayableRule(ModelSQL, ModelView):
elif self.payable_method == 'min_of_both':
by_percent = grade * self.payable_percent / Decimal(100)
by_deduction = grade - self.deduction_value
if self.deduction_unit.symbol == 'g/t':
result = min(by_percent/Decimal(10000), by_deduction/Decimal(10000))
result = min(by_percent, by_deduction)
if self.min_payable is not None: