mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Various small fixes.
This commit is contained in:
parent
284db7f90b
commit
e76075e29f
@ -503,6 +503,13 @@ class ExpandedForm
|
||||
$currencies = Amt::getAllCurrencies();
|
||||
unset($options['currency']);
|
||||
unset($options['placeholder']);
|
||||
|
||||
// make sure value is formatted nicely:
|
||||
if (!is_null($value) && $value !== '') {
|
||||
$value = round($value, 2);
|
||||
}
|
||||
|
||||
|
||||
$html = view('form.' . $view, compact('defaultCurrency', 'currencies', 'classes', 'name', 'label', 'value', 'options'))->render();
|
||||
|
||||
return $html;
|
||||
|
@ -16,6 +16,7 @@ namespace FireflyIII\Support\Twig;
|
||||
|
||||
use Amount;
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Models\AccountType;
|
||||
use FireflyIII\Models\Budget as ModelBudget;
|
||||
use FireflyIII\Models\Category;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
@ -142,7 +143,7 @@ class Journal extends Twig_Extension
|
||||
$array = [];
|
||||
/** @var Account $entry */
|
||||
foreach ($list as $entry) {
|
||||
if ($entry->accountType->type == 'Cash account') {
|
||||
if ($entry->accountType->type == AccountType::CASH) {
|
||||
$array[] = '<span class="text-success">(cash)</span>';
|
||||
continue;
|
||||
}
|
||||
@ -153,7 +154,6 @@ class Journal extends Twig_Extension
|
||||
$cache->store($result);
|
||||
|
||||
return $result;
|
||||
|
||||
}
|
||||
);
|
||||
}
|
||||
|
@ -129,10 +129,10 @@ class BudgetControllerTest extends TestCase
|
||||
public function testPostUpdateIncome()
|
||||
{
|
||||
$data = [
|
||||
'amount' => 200,
|
||||
'amount' => '200',
|
||||
];
|
||||
$this->be($this->user());
|
||||
$this->call('post', route('budgets.income.post', [1]), $data);
|
||||
$this->call('post', route('budgets.income.post'), $data);
|
||||
$this->assertResponseStatus(302);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user