mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-14 07:02:34 +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();
|
$payment->save();
|
||||||
|
|
||||||
$this->setExchangeRate($payment);
|
$this->setExchangeRate($payment);
|
||||||
|
|
||||||
$payment->invoices()->attach($this->invoice->id, [
|
$payment->invoices()->attach($this->invoice->id, [
|
||||||
'amount' => $payment->amount,
|
'amount' => $payment->amount,
|
||||||
]);
|
]);
|
||||||
@ -74,6 +74,7 @@ class MarkPaid extends AbstractService
|
|||||||
$this->invoice->next_send_date = null;
|
$this->invoice->next_send_date = null;
|
||||||
|
|
||||||
$this->invoice->service()
|
$this->invoice->service()
|
||||||
|
->setExchangeRate()
|
||||||
->updateBalance($payment->amount * -1)
|
->updateBalance($payment->amount * -1)
|
||||||
->updatePaidToDate($payment->amount)
|
->updatePaidToDate($payment->amount)
|
||||||
->setStatus(Invoice::STATUS_PAID)
|
->setStatus(Invoice::STATUS_PAID)
|
||||||
|
Loading…
Reference in New Issue
Block a user