Fix date issue.

This commit is contained in:
James Cole
2021-12-28 20:42:50 +01:00
parent 3444146da3
commit 246fa0d6e4
18 changed files with 30 additions and 30 deletions

View File

@@ -70,7 +70,7 @@ class StoreRequest extends FormRequest
'account_number' => $this->string('account_number'),
'account_role' => $this->string('account_role'),
'opening_balance' => $this->string('opening_balance'),
'opening_balance_date' => $this->date('opening_balance_date'),
'opening_balance_date' => $this->getCarbonDate('opening_balance_date'),
'cc_type' => $this->string('credit_card_type'),
'cc_monthly_payment_date' => $this->string('monthly_payment_date'),
'notes' => $this->stringWithNewlines('notes'),
@@ -82,7 +82,7 @@ class StoreRequest extends FormRequest
if ('liability' === $data['account_type_name'] || 'liabilities' === $data['account_type_name']) {
$data['opening_balance'] = app('steam')->negative($this->string('liability_amount'));
$data['opening_balance_date'] = $this->date('liability_start_date');
$data['opening_balance_date'] = $this->getCarbonDate('liability_start_date');
$data['account_type_name'] = $this->string('liability_type');
$data['liability_direction'] = $this->string('liability_direction');
$data['account_type_id'] = null;

View File

@@ -44,8 +44,8 @@ class StoreRequest extends FormRequest
public function getAll(): array
{
return [
'start' => $this->date('start'),
'end' => $this->date('end'),
'start' => $this->getCarbonDate('start'),
'end' => $this->getCarbonDate('end'),
'amount' => $this->string('amount'),
'currency_id' => $this->integer('currency_id'),
'currency_code' => $this->string('currency_code'),

View File

@@ -51,8 +51,8 @@ class StoreRequest extends FormRequest
$data['account_id'] = $this->integer('account_id');
$data['targetamount'] = $this->string('target_amount');
$data['current_amount'] = $this->string('current_amount');
$data['startdate'] = $this->date('start_date');
$data['targetdate'] = $this->date('target_date');
$data['startdate'] = $this->getCarbonDate('start_date');
$data['targetdate'] = $this->getCarbonDate('target_date');
$data['notes'] = $this->stringWithNewlines('notes');
$data['object_group_id'] = $this->integer('object_group_id');
$data['object_group_title'] = $this->string('object_group_title');

View File

@@ -47,7 +47,7 @@ class StoreRequest extends FormRequest
{
$data = [
'tag' => $this->string('tag'),
'date' => $this->date('date'),
'date' => $this->getCarbonDate('date'),
'description' => $this->string('description'),
'has_location' => true,
];