mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fix #1014
This commit is contained in:
parent
93c2f13807
commit
7de512aff8
@ -40,6 +40,7 @@ use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
||||
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
|
||||
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
||||
use FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface;
|
||||
use Illuminate\Http\Request;
|
||||
use Log;
|
||||
use Preferences;
|
||||
use Session;
|
||||
@ -153,9 +154,10 @@ class SingleController extends Controller
|
||||
*
|
||||
* @return View
|
||||
*/
|
||||
public function create(string $what = TransactionType::DEPOSIT)
|
||||
public function create(Request $request, string $what = TransactionType::DEPOSIT)
|
||||
{
|
||||
$what = strtolower($what);
|
||||
$what = $request->old('what') ?? $what;
|
||||
$uploadSize = min(Steam::phpBytes(ini_get('upload_max_filesize')), Steam::phpBytes(ini_get('post_max_size')));
|
||||
$assetAccounts = $this->groupedActiveAccountList();
|
||||
$budgets = ExpandedForm::makeSelectListWithEmpty($this->budgets->getActiveBudgets());
|
||||
|
4
public/js/ff/transactions/single/common.js
vendored
4
public/js/ff/transactions/single/common.js
vendored
@ -107,6 +107,10 @@ function selectsForeignCurrency() {
|
||||
if (foreignCurrencyId === nativeCurrencyId) {
|
||||
$('#exchange_rate_instruction_holder').hide();
|
||||
$('#native_amount_holder').hide();
|
||||
|
||||
// make all other inputs empty
|
||||
$('input[name="destination_amount"]').val("");
|
||||
$('input[name="native_amount"]').val("");
|
||||
}
|
||||
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user