mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-12 22:22:32 +01:00
Set Exchange Rates on invoice when marked as paid
This commit is contained in:
parent
823d23df24
commit
a3a406b122
@ -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…
Reference in New Issue
Block a user