Set Exchange Rates on invoice when marked as paid
This commit is contained in:
parent
823d23df24
commit
a3a406b122
1 changed files with 2 additions and 1 deletions
|
|
@ -66,7 +66,7 @@ class MarkPaid extends AbstractService
|
|||
$payment->save();
|
||||
|
||||
$this->setExchangeRate($payment);
|
||||
|
||||
|
||||
$payment->invoices()->attach($this->invoice->id, [
|
||||
'amount' => $payment->amount,
|
||||
]);
|
||||
|
|
@ -74,6 +74,7 @@ class MarkPaid extends AbstractService
|
|||
$this->invoice->next_send_date = null;
|
||||
|
||||
$this->invoice->service()
|
||||
->setExchangeRate()
|
||||
->updateBalance($payment->amount * -1)
|
||||
->updatePaidToDate($payment->amount)
|
||||
->setStatus(Invoice::STATUS_PAID)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue