mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-14 00:04:24 +00:00
Two small code fixes.
This commit is contained in:
@@ -16,6 +16,7 @@ namespace FireflyIII\Models;
|
|||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use Crypt;
|
use Crypt;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
use Steam;
|
use Steam;
|
||||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||||
@@ -67,7 +68,7 @@ class PiggyBank extends Model
|
|||||||
/**
|
/**
|
||||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||||
*/
|
*/
|
||||||
public function account()
|
public function account(): BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo('FireflyIII\Models\Account');
|
return $this->belongsTo('FireflyIII\Models\Account');
|
||||||
}
|
}
|
||||||
|
@@ -36,9 +36,7 @@ $(document).ready(function () {
|
|||||||
function updateCurrency() {
|
function updateCurrency() {
|
||||||
// get value:
|
// get value:
|
||||||
var accountId = $('select[name="source_account_id"]').val();
|
var accountId = $('select[name="source_account_id"]').val();
|
||||||
console.log('account id is ' + accountId);
|
|
||||||
var currencyPreference = accountInfo[accountId].preferredCurrency;
|
var currencyPreference = accountInfo[accountId].preferredCurrency;
|
||||||
console.log('currency pref is ' + currencyPreference);
|
|
||||||
|
|
||||||
$('.currency-option[data-id="' + currencyPreference + '"]').click();
|
$('.currency-option[data-id="' + currencyPreference + '"]').click();
|
||||||
$('[data-toggle="dropdown"]').parent().removeClass('open');
|
$('[data-toggle="dropdown"]').parent().removeClass('open');
|
||||||
|
Reference in New Issue
Block a user