mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
updates for payment currencyid
This commit is contained in:
parent
57ea035c62
commit
1034622fbc
@ -119,6 +119,9 @@ class PaymentController extends Controller
|
||||
} else {
|
||||
$payment = PaymentFactory::create($payment_hash->fee_invoice->company_id, $payment_hash->fee_invoice->user_id);
|
||||
$payment->client_id = $payment_hash->fee_invoice->client_id;
|
||||
|
||||
$payment->saveQuietly();
|
||||
$payment->currency_id = $payment->client->getSetting('currency_id');
|
||||
$payment->saveQuietly();
|
||||
|
||||
$payment_hash->payment_id = $payment->id;
|
||||
|
@ -106,6 +106,7 @@ class PaymentRepository extends BaseRepository {
|
||||
$payment->fill($data);
|
||||
$payment->is_manual = true;
|
||||
$payment->status_id = Payment::STATUS_COMPLETED;
|
||||
|
||||
$payment->save();
|
||||
|
||||
/*Save documents*/
|
||||
@ -207,6 +208,7 @@ class PaymentRepository extends BaseRepository {
|
||||
$payment->exchange_rate = $exchange_rate->exchangeRate($client_currency, $company_currency, Carbon::parse($payment->date));
|
||||
// $payment->exchange_currency_id = $client_currency;
|
||||
$payment->exchange_currency_id = $company_currency;
|
||||
$payment->currency_id = $client_currency;
|
||||
|
||||
}
|
||||
|
||||
|
@ -119,6 +119,7 @@ class CreditService
|
||||
$payment->status_id = Payment::STATUS_COMPLETED;
|
||||
$payment->type_id = PaymentType::CREDIT;
|
||||
$payment->is_manual = true;
|
||||
$payment->currency_id = $this->credit->client->getSetting('currency_id');
|
||||
$payment->date = now();
|
||||
|
||||
$payment->saveQuietly();
|
||||
|
Loading…
x
Reference in New Issue
Block a user