mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Add currencies to payments by default
This commit is contained in:
parent
f0b5891327
commit
055e40ccc6
@ -100,6 +100,11 @@ class PaymentMigrationRepository extends BaseRepository
|
||||
$payment->deleted_at = $data['deleted_at'] ?: null;
|
||||
$payment->save();
|
||||
|
||||
if(array_key_exists('currency_id', $data) && $data['currency_id'] == 0){
|
||||
$payment->currency_id = $payment->company->settings->currency_id;
|
||||
$payment->save();
|
||||
}
|
||||
|
||||
/*Ensure payment number generated*/
|
||||
if (! $payment->number || strlen($payment->number) == 0) {
|
||||
$payment->number = $payment->client->getNextPaymentNumber($payment->client);
|
||||
|
Loading…
Reference in New Issue
Block a user