mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Store booleans correctly.
This commit is contained in:
parent
922c8703f5
commit
a5520d45e7
@ -276,6 +276,7 @@ class CurrencyController extends Controller
|
||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
||||
$unfiltered = $repository->getAllBudgetLimits($this->parameters->get('start'), $this->parameters->get('end'));
|
||||
|
||||
// TODO replace this
|
||||
// filter budget limits on currency ID
|
||||
$collection = $unfiltered->filter(
|
||||
function (BudgetLimit $budgetLimit) use ($currency) {
|
||||
|
@ -51,6 +51,11 @@ class BillRequest extends Request
|
||||
*/
|
||||
public function getAll(): array
|
||||
{
|
||||
$active = true;
|
||||
if(null !== $this->get('active')) {
|
||||
$active = $this->boolean('active');
|
||||
}
|
||||
|
||||
$data = [
|
||||
'name' => $this->string('name'),
|
||||
'amount_min' => $this->string('amount_min'),
|
||||
@ -60,8 +65,7 @@ class BillRequest extends Request
|
||||
'date' => $this->date('date'),
|
||||
'repeat_freq' => $this->string('repeat_freq'),
|
||||
'skip' => $this->integer('skip'),
|
||||
'automatch' => $this->boolean('automatch'),
|
||||
'active' => $this->boolean('active'),
|
||||
'active' => $active,
|
||||
'notes' => $this->string('notes'),
|
||||
];
|
||||
|
||||
|
@ -49,9 +49,14 @@ class BudgetRequest extends Request
|
||||
*/
|
||||
public function getAll(): array
|
||||
{
|
||||
$active = true;
|
||||
if (null !== $this->get('active')) {
|
||||
$active = $this->boolean('active');
|
||||
}
|
||||
|
||||
return [
|
||||
'name' => $this->string('name'),
|
||||
'active' => $this->boolean('active'),
|
||||
'active' => $active,
|
||||
'order' => 0,
|
||||
];
|
||||
}
|
||||
|
@ -211,7 +211,7 @@ class TransactionRequest extends Request
|
||||
'source_name' => isset($transaction['source_name']) ? (string)$transaction['source_name'] : null,
|
||||
'destination_id' => isset($transaction['destination_id']) ? (int)$transaction['destination_id'] : null,
|
||||
'destination_name' => isset($transaction['destination_name']) ? (string)$transaction['destination_name'] : null,
|
||||
'reconciled' => $transaction['reconciled'] ?? false,
|
||||
'reconciled' => $this->convertBoolean((string)($transaction['reconciled'] ?? 'false')),
|
||||
'identifier' => $index,
|
||||
];
|
||||
}
|
||||
|
@ -65,9 +65,13 @@ class UserRequest extends Request
|
||||
*/
|
||||
public function getAll(): array
|
||||
{
|
||||
$blocked = false;
|
||||
if (null === $this->get('blocked')) {
|
||||
$blocked = $this->boolean('blocked');
|
||||
}
|
||||
$data = [
|
||||
'email' => $this->string('email'),
|
||||
'blocked' => $this->boolean('blocked'),
|
||||
'blocked' => $blocked,
|
||||
'blocked_code' => $this->string('blocked_code'),
|
||||
'role' => $this->string('role'),
|
||||
];
|
||||
|
@ -80,7 +80,7 @@ class BillFactory
|
||||
'date' => $data['date'],
|
||||
'repeat_freq' => $data['repeat_freq'],
|
||||
'skip' => $data['skip'],
|
||||
'automatch' => $data['automatch'] ?? true,
|
||||
'automatch' => true,
|
||||
'active' => $data['active'] ?? true,
|
||||
]
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user