close #690 Fixed: Add new Item to Paid Invoice should mark Invoice Status as Partial
This commit is contained in:
parent
238f69b40a
commit
2e6c42f7ba
@ -107,6 +107,14 @@ class UpdateBill
|
||||
|
||||
$this->request['amount'] = money($amount, $this->request['currency_code'])->getAmount();
|
||||
|
||||
$bill_paid = $this->bill->paid;
|
||||
|
||||
if ($this->request['amount'] > $bill_paid) {
|
||||
$this->request['bill_status_code'] = 'partial';
|
||||
|
||||
unset($this->bill->reconciled);
|
||||
}
|
||||
|
||||
$this->bill->update($this->request->input());
|
||||
|
||||
// Delete previous bill totals
|
||||
|
@ -108,6 +108,14 @@ class UpdateInvoice
|
||||
|
||||
$this->request['amount'] = money($amount, $this->request['currency_code'])->getAmount();
|
||||
|
||||
$invoice_paid = $this->invoice->paid;
|
||||
|
||||
if ($this->request['amount'] > $invoice_paid) {
|
||||
$this->request['invoice_status_code'] = 'partial';
|
||||
|
||||
unset($this->invoice->reconciled);
|
||||
}
|
||||
|
||||
$this->invoice->update($this->request->input());
|
||||
|
||||
// Delete previous invoice totals
|
||||
|
Loading…
x
Reference in New Issue
Block a user