Do not allow overpayment of invoice when write-off amount is negative
When paying less than the amount to pay, there is no overpayment.
This commit is contained in:
1 parent
c3da634f9f
commit
03e0455e75
1 file changed
+6
-1
@@ -3157,7 +3157,12 @@ class PayInvoiceAsk(ModelView):
|
||||
('writeoff', "Write-Off"),
|
||||
('partial', "Partial Payment"),
|
||||
('overpayment', "Overpayment"),
|
||||
], 'Type', required=True)
|
||||
], 'Type', required=True,
|
||||
domain=[
|
||||
If(Eval('amount_writeoff', 0) >= 0,
|
||||
('type', 'in', ['writeoff', 'partial']),
|
||||
()),
|
||||
])
|
||||
writeoff = fields.Many2One(
|
||||
'account.move.reconcile.write_off', "Write Off",
|
||||
domain=[
|
||||
|
||||
Reference in new issue
Block a user