fied paid status change when amount is not changed
This commit is contained in:
parent
e84a8bb11a
commit
66666cc841
@ -62,8 +62,14 @@ class UpdateDocument extends Job
|
||||
$this->document->paid_amount = $this->document->paid;
|
||||
event(new PaidAmountCalculated($this->document));
|
||||
|
||||
if ($this->request['amount'] > $this->document->paid_amount && $this->document->paid_amount > 0) {
|
||||
$this->request['status'] = 'partial';
|
||||
if ($this->document->paid_amount > 0) {
|
||||
if ($this->request['amount'] == $this->document->paid_amount) {
|
||||
$this->request['status'] = 'paid';
|
||||
}
|
||||
|
||||
if ($this->request['amount'] > $this->document->paid_amount) {
|
||||
$this->request['status'] = 'partial';
|
||||
}
|
||||
}
|
||||
|
||||
unset($this->document->reconciled);
|
||||
|
Loading…
x
Reference in New Issue
Block a user