diff --git a/app/Traits/Import.php b/app/Traits/Import.php index 42a0d9725..95742496b 100644 --- a/app/Traits/Import.php +++ b/app/Traits/Import.php @@ -102,7 +102,7 @@ trait Import 'created_by' => $row['created_by'], ]; - Validator::validate($data, [(new CurrencyRequest)->rules()]); + Validator::validate($data, (new CurrencyRequest)->rules()); $currency = $this->dispatch(new CreateCurrency($data)); @@ -181,7 +181,7 @@ trait Import 'created_by' => $row['created_by'], ]; - Validator::validate($data, [(new AccountRequest)->rules()]); + Validator::validate($data, (new AccountRequest)->rules()); $account = $this->dispatch(new CreateAccount($data)); @@ -207,7 +207,7 @@ trait Import 'created_by' => $row['created_by'], ]; - Validator::validate($data, [(new AccountRequest)->rules()]); + Validator::validate($data, (new AccountRequest)->rules()); $account = $this->dispatch(new CreateAccount($data)); @@ -233,7 +233,7 @@ trait Import 'created_by' => $row['created_by'], ]; - Validator::validate($data, [(new AccountRequest)->rules()]); + Validator::validate($data, (new AccountRequest)->rules()); $account = $this->dispatch(new CreateAccount($data)); @@ -258,7 +258,7 @@ trait Import 'created_by' => $row['created_by'], ]; - Validator::validate($data, [(new CategoryRequest)->rules()]); + Validator::validate($data, (new CategoryRequest)->rules()); $category = $this->dispatch(new CreateCategory($data)); @@ -284,7 +284,7 @@ trait Import 'created_by' => $row['created_by'], ]; - Validator::validate($data, [(new ContactRequest)->rules()]); + Validator::validate($data, (new ContactRequest)->rules()); $contact = $this->dispatch(new CreateContact($data)); @@ -310,7 +310,7 @@ trait Import 'created_by' => $row['created_by'], ]; - Validator::validate($data, [(new ContactRequest)->rules()]); + Validator::validate($data, (new ContactRequest)->rules()); $contact = $this->dispatch(new CreateContact($data)); @@ -335,7 +335,7 @@ trait Import 'created_by' => $row['created_by'], ]; - Validator::validate($data, [(new ItemRequest())->rules()]); + Validator::validate($data, (new ItemRequest())->rules()); $item = $this->dispatch(new CreateItem($data)); @@ -354,13 +354,13 @@ trait Import 'company_id' => company_id(), 'rate' => $row['tax_rate'], 'type' => $type, - 'name' => !empty($row['tax_name']) ? $row['tax_name'] : $row['tax_rate'], + 'name' => !empty($row['tax_name']) ? $row['tax_name'] : (string) $row['tax_rate'], 'enabled' => 1, 'created_from' => $row['created_from'], 'created_by' => $row['created_by'], ]; - Validator::validate($data, [(new TaxRequest())->rules()]); + Validator::validate($data, (new TaxRequest())->rules()); $tax = $this->dispatch(new CreateTax($data));