diff --git a/app/Http/Requests/BankTransaction/MatchBankTransactionRequest.php b/app/Http/Requests/BankTransaction/MatchBankTransactionRequest.php index 9c5869fabce3..76dc1e349c87 100644 --- a/app/Http/Requests/BankTransaction/MatchBankTransactionRequest.php +++ b/app/Http/Requests/BankTransaction/MatchBankTransactionRequest.php @@ -33,9 +33,9 @@ class MatchBankTransactionRequest extends Request 'transactions' => 'bail|array', 'transactions.*.id' => 'bail|required', 'transactions.*.invoice_ids' => 'nullable|string|sometimes', - 'transactions.*.ninja_category_id' => 'nullable|string|sometimes' ]; + $rules['transactions.*.ninja_category_id'] = 'bail|nullable|sometimes|exists:expense_categories,id,company_id,'.auth()->user()->company()->id.',is_deleted,0'; $rules['transactions.*.vendor_id'] = 'bail|sometimes|exists:vendors,id,company_id,'.auth()->user()->company()->id.',is_deleted,0'; return $rules; diff --git a/app/Http/ValidationRules/User/HasValidPhoneNumber.php b/app/Http/ValidationRules/User/HasValidPhoneNumber.php index 3ec45657aeb7..b9e16bf70621 100644 --- a/app/Http/ValidationRules/User/HasValidPhoneNumber.php +++ b/app/Http/ValidationRules/User/HasValidPhoneNumber.php @@ -40,29 +40,31 @@ class HasValidPhoneNumber implements Rule */ public function passes($attribute, $value) { - + $sid = config('ninja.twilio_account_sid'); $token = config('ninja.twilio_auth_token'); if(!$sid) return true; - $twilio = new Twilio\Rest\Client($sid, $token); + $twilio = new \Twilio\Rest\Client($sid, $token); $country = auth()->user()->account?->companies()?->first()?->country(); - if(!$country || strlen($user->phone) < 2) + if(!$country || strlen(auth()->user()->phone) < 2) return true; $countryCode = $country->iso_3166_2; - + try{ $phone_number = $twilio->lookups->v1->phoneNumbers($value) ->fetch(["countryCode" => $countryCode]); $user = auth()->user(); - $user->phone = $phone_number->phoneNumber; + + request()->merge(['validated_phone' => $phone_number->phoneNumber ]); + $user->verified_phone_number = true; $user->save(); diff --git a/app/Import/Providers/Csv.php b/app/Import/Providers/Csv.php index 5dd23683c40f..fdf70ca691e7 100644 --- a/app/Import/Providers/Csv.php +++ b/app/Import/Providers/Csv.php @@ -46,11 +46,14 @@ use App\Repositories\PaymentRepository; use App\Repositories\ProductRepository; use App\Repositories\QuoteRepository; use App\Repositories\VendorRepository; +use App\Utils\Traits\MakesHash; use Illuminate\Support\Facades\Validator; use Symfony\Component\HttpFoundation\ParameterBag; class Csv extends BaseImport implements ImportInterface { + use MakesHash; + public array $entity_count = []; public function import(string $entity) @@ -77,24 +80,20 @@ class Csv extends BaseImport implements ImportInterface $data = $this->getCsvData($entity_type); - if (is_array($data)) { + if (is_array($data)) + { + $data = $this->preTransformCsv($data, $entity_type); - - if(array_key_exists('bank_integration_id', $this->request)){ - - foreach($data as $key => $value) - { - $data['bank_integration_id'][$key] = $this->request['bank_integration_id']; - } - + foreach($data as $key => $value) + { + $data[$key]['bank.bank_integration_id'] = $this->decodePrimaryKey($this->request['bank_integration_id']); } } if (empty($data)) { $this->entity_count['bank_transactions'] = 0; - return; } @@ -102,6 +101,8 @@ class Csv extends BaseImport implements ImportInterface $this->repository_name = BankTransactionRepository::class; $this->factory_name = BankTransactionFactory::class; + $this->repository = app()->make($this->repository_name); + $this->transformer = new BankTransformer($this->company); $bank_transaction_count = $this->ingest($data, $entity_type); $this->entity_count['bank_transactions'] = $bank_transaction_count; diff --git a/app/Import/Transformer/BaseTransformer.php b/app/Import/Transformer/BaseTransformer.php index 46775ac07024..3aa0e1769cc6 100644 --- a/app/Import/Transformer/BaseTransformer.php +++ b/app/Import/Transformer/BaseTransformer.php @@ -68,6 +68,11 @@ class BaseTransformer } + public function getNumber($data, $field) + { + return (isset($data->$field) && $data->$field) ? (int)$data->$field : 0; + } + public function getString($data, $field) { return isset($data[$field]) && $data[$field] ? trim($data[$field]) : ''; diff --git a/app/Import/Transformers/Bank/BankTransformer.php b/app/Import/Transformers/Bank/BankTransformer.php index 071ac7711074..80086111bc7a 100644 --- a/app/Import/Transformers/Bank/BankTransformer.php +++ b/app/Import/Transformers/Bank/BankTransformer.php @@ -12,7 +12,7 @@ namespace App\Import\Transformers\Bank; use App\Import\ImportException; -use App\Import\Transformers\BaseTransformer; +use App\Import\Transformer\BaseTransformer; use App\Models\BankTransaction; use App\Utils\Number; @@ -31,17 +31,17 @@ class BankTransformer extends BaseTransformer $now = now(); $transformed = [ - // 'bank_integration_id' => $this->bank_integration->id, + 'bank_integration_id' => $transaction['bank.bank_integration_id'], 'transaction_id' => $this->getNumber($transaction,'bank.transaction_id'), 'amount' => abs($this->getFloat($transaction, 'bank.amount')), 'currency_id' => $this->getCurrencyByCode($transaction, 'bank.currency'), 'account_type' => strlen($this->getString($transaction, 'bank.account_type')) > 1 ? $this->getString($transaction, 'bank.account_type') : 'bank', 'category_id' => $this->getNumber($transaction, 'bank.category_id') > 0 ? $this->getNumber($transaction, 'bank.category_id') : null, - 'category_type' => $this->getString($transaction, 'category_type'), - 'date' => array_key_exists('date', $transaction) ? date('Y-m-d', strtotime(str_replace("/","-",$transaction['date']))) + 'category_type' => $this->getString($transaction, 'bank.category_type'), + 'date' => array_key_exists('bank.date', $transaction) ? $this->parseDate($transaction['bank.date']) : now()->format('Y-m-d'), - 'bank_account_id' => array_key_exists('bank_account_id', $transaction) ? $transaction['bank_account_id'] : 0, - 'description' => array_key_exists('description', $transaction)? $transaction['description'] : '', + 'bank_account_id' => array_key_exists('bank.bank_account_id', $transaction) ? $transaction['bank.bank_account_id'] : 0, + 'description' => array_key_exists('bank.description', $transaction) ? $transaction['bank.description'] : '', 'base_type' => $this->calculateType($transaction), 'created_at' => $now, 'updated_at' => $now, @@ -56,22 +56,22 @@ class BankTransformer extends BaseTransformer private function calculateType($transaction) { - if(array_key_exists('base_type', $transaction) && $transaction['base_type'] == 'CREDIT') + if(array_key_exists('bank.base_type', $transaction) && $transaction['bank.base_type'] == 'CREDIT') return 'CREDIT'; - if(array_key_exists('base_type', $transaction) && $transaction['base_type'] == 'DEBIT') + if(array_key_exists('bank.base_type', $transaction) && $transaction['bank.base_type'] == 'DEBIT') return 'DEBIT'; - if(array_key_exists('category_id',$transaction)) + if(array_key_exists('bank.category_id', $transaction)) return 'DEBIT'; - if(array_key_exists('category_type', $transaction) && $transaction['category_type'] == 'Income') + if(array_key_exists('bank.category_type', $transaction) && $transaction['bank.category_type'] == 'Income') return 'CREDIT'; - if(array_key_exists('category_type', $transaction)) + if(array_key_exists('bank.category_type', $transaction)) return 'DEBIT'; - if(array_key_exists('amount', $transaction) && is_numeric($transaction['amount']) && $transaction['amount'] > 0) + if(array_key_exists('bank.amount', $transaction) && is_numeric($transaction['bank.amount']) && $transaction['bank.amount'] > 0) return 'CREDIT'; return 'DEBIT'; diff --git a/app/Jobs/User/VerifyPhone.php b/app/Jobs/User/VerifyPhone.php index ca639b2d8cea..a1fb8b1687df 100644 --- a/app/Jobs/User/VerifyPhone.php +++ b/app/Jobs/User/VerifyPhone.php @@ -53,7 +53,7 @@ class VerifyPhone implements ShouldQueue if(!$sid) return; // no twilio api credentials provided, bail. - $twilio = new Twilio\Rest\Client($sid, $token); + $twilio = new \Twilio\Rest\Client($sid, $token); $country = $this->user->account?->companies()?->first()?->country(); diff --git a/app/Observers/UserObserver.php b/app/Observers/UserObserver.php index ce9fe4b35f1f..44444572b175 100644 --- a/app/Observers/UserObserver.php +++ b/app/Observers/UserObserver.php @@ -38,9 +38,9 @@ class UserObserver */ public function updated(User $user) { - if (Ninja::isHosted() && $user->isDirty('phone')) { - VerifyPhone::dispatch($user); - } + // if (Ninja::isHosted() && $user->isDirty('phone')) { + // VerifyPhone::dispatch($user); + // } } /** diff --git a/app/Repositories/UserRepository.php b/app/Repositories/UserRepository.php index 52bf31033ca8..cecc25522b2f 100644 --- a/app/Repositories/UserRepository.php +++ b/app/Repositories/UserRepository.php @@ -56,15 +56,12 @@ class UserRepository extends BaseRepository $company = auth()->user()->company(); $account = $company->account; - /* If hosted and Enterprise we need to increment the num_users field on the accounts table*/ - // 05-08-2022 This is an error, the num_users should _never_ increment - // if (! $user->id && $account->isEnterpriseClient()) { - // $account->num_users++; - // $account->save(); - // } if(array_key_exists('oauth_provider_id', $details)) unset($details['oauth_provider_id']); + if (request()->has('validated_phone')) + $details['phone'] = request()->input('validated_phone'); + $user->fill($details); //allow users to change only their passwords - not others! @@ -140,7 +137,7 @@ class UserRepository extends BaseRepository $cu->forceDelete(); } - event(new UserWasDeleted($user, $company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null))); + event(new UserWasDeleted($user, auth()->user(), $company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null))); $user->delete(); diff --git a/artisan b/artisan old mode 100755 new mode 100644 diff --git a/bootstrap/app.php b/bootstrap/app.php old mode 100755 new mode 100644 diff --git a/bootstrap/cache/.gitignore b/bootstrap/cache/.gitignore old mode 100755 new mode 100644 diff --git a/dusk.sh b/dusk.sh old mode 100755 new mode 100644 diff --git a/public/.htaccess b/public/.htaccess old mode 100755 new mode 100644 diff --git a/public/assets/AssetManifest.json b/public/assets/AssetManifest.json old mode 100755 new mode 100644 diff --git a/public/assets/FontManifest.json b/public/assets/FontManifest.json old mode 100755 new mode 100644 diff --git a/public/assets/LICENSE b/public/assets/LICENSE old mode 100755 new mode 100644 diff --git a/public/assets/NOTICES b/public/assets/NOTICES old mode 100755 new mode 100644 diff --git a/public/assets/assets/images/google-icon.png b/public/assets/assets/images/google-icon.png old mode 100755 new mode 100644 diff --git a/public/assets/assets/images/logo.png b/public/assets/assets/images/logo.png old mode 100755 new mode 100644 diff --git a/public/assets/assets/images/payment_types/ach.png b/public/assets/assets/images/payment_types/ach.png old mode 100755 new mode 100644 diff --git a/public/assets/assets/images/payment_types/amex.png b/public/assets/assets/images/payment_types/amex.png old mode 100755 new mode 100644 diff --git a/public/assets/assets/images/payment_types/carteblanche.png b/public/assets/assets/images/payment_types/carteblanche.png old mode 100755 new mode 100644 diff --git a/public/assets/assets/images/payment_types/dinerscard.png b/public/assets/assets/images/payment_types/dinerscard.png old mode 100755 new mode 100644 diff --git a/public/assets/assets/images/payment_types/discover.png b/public/assets/assets/images/payment_types/discover.png old mode 100755 new mode 100644 diff --git a/public/assets/assets/images/payment_types/jcb.png b/public/assets/assets/images/payment_types/jcb.png old mode 100755 new mode 100644 diff --git a/public/assets/assets/images/payment_types/laser.png b/public/assets/assets/images/payment_types/laser.png old mode 100755 new mode 100644 diff --git a/public/assets/assets/images/payment_types/maestro.png b/public/assets/assets/images/payment_types/maestro.png old mode 100755 new mode 100644 diff --git a/public/assets/assets/images/payment_types/mastercard.png b/public/assets/assets/images/payment_types/mastercard.png old mode 100755 new mode 100644 diff --git a/public/assets/assets/images/payment_types/other.png b/public/assets/assets/images/payment_types/other.png old mode 100755 new mode 100644 diff --git a/public/assets/assets/images/payment_types/paypal.png b/public/assets/assets/images/payment_types/paypal.png old mode 100755 new mode 100644 diff --git a/public/assets/assets/images/payment_types/solo.png b/public/assets/assets/images/payment_types/solo.png old mode 100755 new mode 100644 diff --git a/public/assets/assets/images/payment_types/switch.png b/public/assets/assets/images/payment_types/switch.png old mode 100755 new mode 100644 diff --git a/public/assets/assets/images/payment_types/unionpay.png b/public/assets/assets/images/payment_types/unionpay.png old mode 100755 new mode 100644 diff --git a/public/assets/assets/images/payment_types/visa.png b/public/assets/assets/images/payment_types/visa.png old mode 100755 new mode 100644 diff --git a/public/assets/fonts/MaterialIcons-Regular.otf b/public/assets/fonts/MaterialIcons-Regular.otf old mode 100755 new mode 100644 diff --git a/public/assets/fonts/MaterialIcons-Regular.ttf b/public/assets/fonts/MaterialIcons-Regular.ttf old mode 100755 new mode 100644 diff --git a/public/assets/fonts/Roboto-Regular.ttf b/public/assets/fonts/Roboto-Regular.ttf old mode 100755 new mode 100644 diff --git a/public/assets/packages/flutter_auth_buttons/fonts/Roboto-Medium.ttf b/public/assets/packages/flutter_auth_buttons/fonts/Roboto-Medium.ttf old mode 100755 new mode 100644 diff --git a/public/assets/packages/flutter_auth_buttons/fonts/SF-Pro-Medium.ttf b/public/assets/packages/flutter_auth_buttons/fonts/SF-Pro-Medium.ttf old mode 100755 new mode 100644 diff --git a/public/assets/packages/flutter_auth_buttons/graphics/Twitter_Logo_Blue.png b/public/assets/packages/flutter_auth_buttons/graphics/Twitter_Logo_Blue.png old mode 100755 new mode 100644 diff --git a/public/assets/packages/flutter_auth_buttons/graphics/apple_logo_black.png b/public/assets/packages/flutter_auth_buttons/graphics/apple_logo_black.png old mode 100755 new mode 100644 diff --git a/public/assets/packages/flutter_auth_buttons/graphics/apple_logo_white.png b/public/assets/packages/flutter_auth_buttons/graphics/apple_logo_white.png old mode 100755 new mode 100644 diff --git a/public/assets/packages/flutter_auth_buttons/graphics/flogo-HexRBG-Wht-100.png b/public/assets/packages/flutter_auth_buttons/graphics/flogo-HexRBG-Wht-100.png old mode 100755 new mode 100644 diff --git a/public/assets/packages/flutter_auth_buttons/graphics/google-logo.png b/public/assets/packages/flutter_auth_buttons/graphics/google-logo.png old mode 100755 new mode 100644 diff --git a/public/assets/packages/flutter_auth_buttons/graphics/ms-symbollockup_mssymbol_19.png b/public/assets/packages/flutter_auth_buttons/graphics/ms-symbollockup_mssymbol_19.png old mode 100755 new mode 100644 diff --git a/public/assets/packages/font_awesome_flutter/lib/fonts/fa-brands-400.ttf b/public/assets/packages/font_awesome_flutter/lib/fonts/fa-brands-400.ttf old mode 100755 new mode 100644 diff --git a/public/assets/packages/font_awesome_flutter/lib/fonts/fa-regular-400.ttf b/public/assets/packages/font_awesome_flutter/lib/fonts/fa-regular-400.ttf old mode 100755 new mode 100644 diff --git a/public/assets/packages/font_awesome_flutter/lib/fonts/fa-solid-900.ttf b/public/assets/packages/font_awesome_flutter/lib/fonts/fa-solid-900.ttf old mode 100755 new mode 100644 diff --git a/public/assets/web/assets/fonts/Roboto-Regular.ttf b/public/assets/web/assets/fonts/Roboto-Regular.ttf old mode 100755 new mode 100644 diff --git a/public/css/app.css b/public/css/app.css old mode 100755 new mode 100644 diff --git a/public/css/ninja.css b/public/css/ninja.css old mode 100755 new mode 100644 diff --git a/public/css/ninja.min.css b/public/css/ninja.min.css old mode 100755 new mode 100644 diff --git a/public/favicon.ico b/public/favicon.ico old mode 100755 new mode 100644 diff --git a/public/favicon.png b/public/favicon.png old mode 100755 new mode 100644 diff --git a/public/flutter_service_worker.js b/public/flutter_service_worker.js old mode 100755 new mode 100644 diff --git a/public/icons/Icon-192.png b/public/icons/Icon-192.png old mode 100755 new mode 100644 diff --git a/public/icons/Icon-512.png b/public/icons/Icon-512.png old mode 100755 new mode 100644 diff --git a/public/images/american-express.png b/public/images/american-express.png old mode 100755 new mode 100644 diff --git a/public/images/created-by-invoiceninja-new.png b/public/images/created-by-invoiceninja-new.png old mode 100755 new mode 100644 diff --git a/public/images/created-by-invoiceninja.jpg b/public/images/created-by-invoiceninja.jpg old mode 100755 new mode 100644 diff --git a/public/images/diners-club.png b/public/images/diners-club.png old mode 100755 new mode 100644 diff --git a/public/images/discover.png b/public/images/discover.png old mode 100755 new mode 100644 diff --git a/public/images/invoiceninja-black-logo-2.png b/public/images/invoiceninja-black-logo-2.png old mode 100755 new mode 100644 diff --git a/public/images/invoiceninja-white-logo.png b/public/images/invoiceninja-white-logo.png old mode 100755 new mode 100644 diff --git a/public/images/logo.png b/public/images/logo.png old mode 100755 new mode 100644 diff --git a/public/images/mastercard.png b/public/images/mastercard.png old mode 100755 new mode 100644 diff --git a/public/images/paypal.png b/public/images/paypal.png old mode 100755 new mode 100644 diff --git a/public/images/svg/activity.svg b/public/images/svg/activity.svg old mode 100755 new mode 100644 diff --git a/public/images/svg/align-left.svg b/public/images/svg/align-left.svg old mode 100755 new mode 100644 diff --git a/public/images/svg/clock.svg b/public/images/svg/clock.svg old mode 100755 new mode 100644 diff --git a/public/images/svg/credit-card.svg b/public/images/svg/credit-card.svg old mode 100755 new mode 100644 diff --git a/public/images/svg/dark/activity.svg b/public/images/svg/dark/activity.svg old mode 100755 new mode 100644 diff --git a/public/images/svg/dark/align-left.svg b/public/images/svg/dark/align-left.svg old mode 100755 new mode 100644 diff --git a/public/images/svg/dark/clock.svg b/public/images/svg/dark/clock.svg old mode 100755 new mode 100644 diff --git a/public/images/svg/dark/credit-card.svg b/public/images/svg/dark/credit-card.svg old mode 100755 new mode 100644 diff --git a/public/images/svg/dark/download.svg b/public/images/svg/dark/download.svg old mode 100755 new mode 100644 diff --git a/public/images/svg/dark/file-text.svg b/public/images/svg/dark/file-text.svg old mode 100755 new mode 100644 diff --git a/public/images/svg/dark/file.svg b/public/images/svg/dark/file.svg old mode 100755 new mode 100644 diff --git a/public/images/svg/dark/shield.svg b/public/images/svg/dark/shield.svg old mode 100755 new mode 100644 diff --git a/public/images/svg/dark/user.svg b/public/images/svg/dark/user.svg old mode 100755 new mode 100644 diff --git a/public/images/svg/download.svg b/public/images/svg/download.svg old mode 100755 new mode 100644 diff --git a/public/images/svg/file-text.svg b/public/images/svg/file-text.svg old mode 100755 new mode 100644 diff --git a/public/images/svg/file.svg b/public/images/svg/file.svg old mode 100755 new mode 100644 diff --git a/public/images/svg/shield.svg b/public/images/svg/shield.svg old mode 100755 new mode 100644 diff --git a/public/images/svg/user.svg b/public/images/svg/user.svg old mode 100755 new mode 100644 diff --git a/public/images/visa.png b/public/images/visa.png old mode 100755 new mode 100644 diff --git a/public/index.php b/public/index.php old mode 100755 new mode 100644 diff --git a/public/js/app.js b/public/js/app.js old mode 100755 new mode 100644 diff --git a/public/js/client_create.js b/public/js/client_create.js old mode 100755 new mode 100644 diff --git a/public/js/client_create.min.js b/public/js/client_create.min.js old mode 100755 new mode 100644 diff --git a/public/js/client_edit.js b/public/js/client_edit.js old mode 100755 new mode 100644 diff --git a/public/js/client_edit.min.js b/public/js/client_edit.min.js old mode 100755 new mode 100644 diff --git a/public/js/client_list.js b/public/js/client_list.js old mode 100755 new mode 100644 diff --git a/public/js/client_list.min.js b/public/js/client_list.min.js old mode 100755 new mode 100644 diff --git a/public/js/client_settings.js b/public/js/client_settings.js old mode 100755 new mode 100644 diff --git a/public/js/client_settings.min.js b/public/js/client_settings.min.js old mode 100755 new mode 100644 diff --git a/public/js/client_show.js b/public/js/client_show.js old mode 100755 new mode 100644 diff --git a/public/js/client_show.min.js b/public/js/client_show.min.js old mode 100755 new mode 100644 diff --git a/public/js/clients/invoices/action-selectors.js b/public/js/clients/invoices/action-selectors.js old mode 100755 new mode 100644 diff --git a/public/js/clients/invoices/action-selectors.js.LICENSE.txt b/public/js/clients/invoices/action-selectors.js.LICENSE.txt old mode 100755 new mode 100644 diff --git a/public/js/clients/invoices/payment.js b/public/js/clients/invoices/payment.js old mode 100755 new mode 100644 diff --git a/public/js/clients/invoices/payment.js.LICENSE.txt b/public/js/clients/invoices/payment.js.LICENSE.txt old mode 100755 new mode 100644 diff --git a/public/js/clients/payment_methods/authorize-ach.js b/public/js/clients/payment_methods/authorize-ach.js old mode 100755 new mode 100644 diff --git a/public/js/clients/payment_methods/authorize-ach.js.LICENSE.txt b/public/js/clients/payment_methods/authorize-ach.js.LICENSE.txt old mode 100755 new mode 100644 diff --git a/public/js/clients/payment_methods/authorize-authorize-card.js b/public/js/clients/payment_methods/authorize-authorize-card.js old mode 100755 new mode 100644 diff --git a/public/js/clients/payment_methods/authorize-authorize-card.js.LICENSE.txt b/public/js/clients/payment_methods/authorize-authorize-card.js.LICENSE.txt old mode 100755 new mode 100644 diff --git a/public/js/clients/payment_methods/authorize-stripe-card.js b/public/js/clients/payment_methods/authorize-stripe-card.js old mode 100755 new mode 100644 diff --git a/public/js/clients/payment_methods/authorize-stripe-card.js.LICENSE.txt b/public/js/clients/payment_methods/authorize-stripe-card.js.LICENSE.txt old mode 100755 new mode 100644 diff --git a/public/js/clients/payment_methods/stripe-ach.js b/public/js/clients/payment_methods/stripe-ach.js old mode 100755 new mode 100644 diff --git a/public/js/clients/payments/alipay.js b/public/js/clients/payments/alipay.js old mode 100755 new mode 100644 diff --git a/public/js/clients/payments/alipay.js.LICENSE.txt b/public/js/clients/payments/alipay.js.LICENSE.txt old mode 100755 new mode 100644 diff --git a/public/js/clients/payments/authorize-credit-card-payment.js b/public/js/clients/payments/authorize-credit-card-payment.js old mode 100755 new mode 100644 diff --git a/public/js/clients/payments/authorize-credit-card-payment.js.LICENSE.txt b/public/js/clients/payments/authorize-credit-card-payment.js.LICENSE.txt old mode 100755 new mode 100644 diff --git a/public/js/clients/payments/card-js.min.js b/public/js/clients/payments/card-js.min.js old mode 100755 new mode 100644 diff --git a/public/js/clients/payments/checkout.com.js b/public/js/clients/payments/checkout.com.js old mode 100755 new mode 100644 diff --git a/public/js/clients/payments/process.js b/public/js/clients/payments/process.js old mode 100755 new mode 100644 diff --git a/public/js/clients/payments/process.js.LICENSE.txt b/public/js/clients/payments/process.js.LICENSE.txt old mode 100755 new mode 100644 diff --git a/public/js/clients/payments/sofort.js b/public/js/clients/payments/sofort.js old mode 100755 new mode 100644 diff --git a/public/js/clients/payments/sofort.js.LICENSE.txt b/public/js/clients/payments/sofort.js.LICENSE.txt old mode 100755 new mode 100644 diff --git a/public/js/clients/payments/stripe-ach.js b/public/js/clients/payments/stripe-ach.js old mode 100755 new mode 100644 diff --git a/public/js/clients/payments/stripe-ach.js.LICENSE.txt b/public/js/clients/payments/stripe-ach.js.LICENSE.txt old mode 100755 new mode 100644 diff --git a/public/js/clients/payments/stripe-alipay.js b/public/js/clients/payments/stripe-alipay.js old mode 100755 new mode 100644 diff --git a/public/js/clients/payments/stripe-alipay.js.LICENSE.txt b/public/js/clients/payments/stripe-alipay.js.LICENSE.txt old mode 100755 new mode 100644 diff --git a/public/js/clients/payments/stripe-credit-card.js b/public/js/clients/payments/stripe-credit-card.js old mode 100755 new mode 100644 diff --git a/public/js/clients/payments/stripe-credit-card.js.LICENSE.txt b/public/js/clients/payments/stripe-credit-card.js.LICENSE.txt old mode 100755 new mode 100644 diff --git a/public/js/clients/payments/stripe-sofort.js b/public/js/clients/payments/stripe-sofort.js old mode 100755 new mode 100644 diff --git a/public/js/clients/payments/stripe-sofort.js.LICENSE.txt b/public/js/clients/payments/stripe-sofort.js.LICENSE.txt old mode 100755 new mode 100644 diff --git a/public/js/clients/quotes/action-selectors.js b/public/js/clients/quotes/action-selectors.js old mode 100755 new mode 100644 diff --git a/public/js/clients/quotes/action-selectors.js.LICENSE.txt b/public/js/clients/quotes/action-selectors.js.LICENSE.txt old mode 100755 new mode 100644 diff --git a/public/js/clients/quotes/approve.js b/public/js/clients/quotes/approve.js old mode 100755 new mode 100644 diff --git a/public/js/clients/quotes/approve.js.LICENSE.txt b/public/js/clients/quotes/approve.js.LICENSE.txt old mode 100755 new mode 100644 diff --git a/public/js/clients/shared/multiple-downloads.js b/public/js/clients/shared/multiple-downloads.js old mode 100755 new mode 100644 diff --git a/public/js/clients/shared/pdf.js b/public/js/clients/shared/pdf.js old mode 100755 new mode 100644 diff --git a/public/js/clients/shared/pdf.js.LICENSE.txt b/public/js/clients/shared/pdf.js.LICENSE.txt old mode 100755 new mode 100644 diff --git a/public/js/coreui.js b/public/js/coreui.js old mode 100755 new mode 100644 diff --git a/public/js/coreui.min.js b/public/js/coreui.min.js old mode 100755 new mode 100644 diff --git a/public/js/localization.js b/public/js/localization.js old mode 100755 new mode 100644 diff --git a/public/js/localization.min.js b/public/js/localization.min.js old mode 100755 new mode 100644 diff --git a/public/js/ninja.js b/public/js/ninja.js old mode 100755 new mode 100644 diff --git a/public/js/ninja.min.js b/public/js/ninja.min.js old mode 100755 new mode 100644 diff --git a/public/js/setup/setup.js b/public/js/setup/setup.js old mode 100755 new mode 100644 diff --git a/public/js/setup/setup.js.LICENSE.txt b/public/js/setup/setup.js.LICENSE.txt old mode 100755 new mode 100644 diff --git a/public/js/vendor/app.js b/public/js/vendor/app.js old mode 100755 new mode 100644 diff --git a/public/js/vendor/datatables/datatables.min.css b/public/js/vendor/datatables/datatables.min.css old mode 100755 new mode 100644 diff --git a/public/js/vendor/datatables/datatables.min.js b/public/js/vendor/datatables/datatables.min.js old mode 100755 new mode 100644 diff --git a/public/js/vendor/jquery-3.3.1/jquery-3.3.1.js b/public/js/vendor/jquery-3.3.1/jquery-3.3.1.js old mode 100755 new mode 100644 diff --git a/public/js/vendor/jquery-3.3.1/jquery-3.3.1.min.js b/public/js/vendor/jquery-3.3.1/jquery-3.3.1.min.js old mode 100755 new mode 100644 diff --git a/public/js/vendor/pdf.js/pdf.min.js b/public/js/vendor/pdf.js/pdf.min.js old mode 100755 new mode 100644 diff --git a/public/js/vendor/pdf.js/pdf.worker.min.js b/public/js/vendor/pdf.js/pdf.worker.min.js old mode 100755 new mode 100644 diff --git a/public/main.dart.js b/public/main.dart.js old mode 100755 new mode 100644 diff --git a/public/main.dart.js.map b/public/main.dart.js.map old mode 100755 new mode 100644 diff --git a/public/manifest.json b/public/manifest.json old mode 100755 new mode 100644 diff --git a/public/mix-manifest.json b/public/mix-manifest.json old mode 100755 new mode 100644 diff --git a/public/robots.txt b/public/robots.txt old mode 100755 new mode 100644 diff --git a/public/svg/403.svg b/public/svg/403.svg old mode 100755 new mode 100644 diff --git a/public/svg/404.svg b/public/svg/404.svg old mode 100755 new mode 100644 diff --git a/public/svg/500.svg b/public/svg/500.svg old mode 100755 new mode 100644 diff --git a/public/svg/503.svg b/public/svg/503.svg old mode 100755 new mode 100644 diff --git a/public/vendor/dropzone-5.7.0/.gitignore b/public/vendor/dropzone-5.7.0/.gitignore old mode 100755 new mode 100644 diff --git a/public/vendor/dropzone-5.7.0/CONTRIBUTING.md b/public/vendor/dropzone-5.7.0/CONTRIBUTING.md old mode 100755 new mode 100644 diff --git a/public/vendor/dropzone-5.7.0/LICENSE b/public/vendor/dropzone-5.7.0/LICENSE old mode 100755 new mode 100644 diff --git a/public/vendor/dropzone-5.7.0/README.md b/public/vendor/dropzone-5.7.0/README.md old mode 100755 new mode 100644 diff --git a/public/vendor/dropzone-5.7.0/component.json b/public/vendor/dropzone-5.7.0/component.json old mode 100755 new mode 100644 diff --git a/public/vendor/dropzone-5.7.0/composer.json b/public/vendor/dropzone-5.7.0/composer.json old mode 100755 new mode 100644 diff --git a/public/vendor/dropzone-5.7.0/dist/basic.css b/public/vendor/dropzone-5.7.0/dist/basic.css old mode 100755 new mode 100644 diff --git a/public/vendor/dropzone-5.7.0/dist/dropzone-amd-module.js b/public/vendor/dropzone-5.7.0/dist/dropzone-amd-module.js old mode 100755 new mode 100644 diff --git a/public/vendor/dropzone-5.7.0/dist/dropzone.css b/public/vendor/dropzone-5.7.0/dist/dropzone.css old mode 100755 new mode 100644 diff --git a/public/vendor/dropzone-5.7.0/dist/dropzone.js b/public/vendor/dropzone-5.7.0/dist/dropzone.js old mode 100755 new mode 100644 diff --git a/public/vendor/dropzone-5.7.0/dist/dropzone.js.map b/public/vendor/dropzone-5.7.0/dist/dropzone.js.map old mode 100755 new mode 100644 diff --git a/public/vendor/dropzone-5.7.0/dist/min/basic.min.css b/public/vendor/dropzone-5.7.0/dist/min/basic.min.css old mode 100755 new mode 100644 diff --git a/public/vendor/dropzone-5.7.0/dist/min/dropzone-amd-module.min.js b/public/vendor/dropzone-5.7.0/dist/min/dropzone-amd-module.min.js old mode 100755 new mode 100644 diff --git a/public/vendor/dropzone-5.7.0/dist/min/dropzone.min.css b/public/vendor/dropzone-5.7.0/dist/min/dropzone.min.css old mode 100755 new mode 100644 diff --git a/public/vendor/dropzone-5.7.0/dist/min/dropzone.min.js b/public/vendor/dropzone-5.7.0/dist/min/dropzone.min.js old mode 100755 new mode 100644 diff --git a/public/vendor/dropzone-5.7.0/index.js b/public/vendor/dropzone-5.7.0/index.js old mode 100755 new mode 100644 diff --git a/public/vendor/dropzone-5.7.0/package.json b/public/vendor/dropzone-5.7.0/package.json old mode 100755 new mode 100644 diff --git a/public/vendor/livewire/livewire.js b/public/vendor/livewire/livewire.js old mode 100755 new mode 100644 diff --git a/public/vendor/livewire/livewire.js.map b/public/vendor/livewire/livewire.js.map old mode 100755 new mode 100644 diff --git a/public/vendor/livewire/manifest.json b/public/vendor/livewire/manifest.json old mode 100755 new mode 100644 diff --git a/public/version.json b/public/version.json old mode 100755 new mode 100644 diff --git a/storage/app/.gitignore b/storage/app/.gitignore old mode 100755 new mode 100644 diff --git a/storage/app/public/.gitignore b/storage/app/public/.gitignore old mode 100755 new mode 100644 diff --git a/storage/framework/.gitignore b/storage/framework/.gitignore old mode 100755 new mode 100644 diff --git a/storage/framework/cache/.gitignore b/storage/framework/cache/.gitignore old mode 100755 new mode 100644 diff --git a/storage/framework/sessions/.gitignore b/storage/framework/sessions/.gitignore old mode 100755 new mode 100644 diff --git a/storage/framework/testing/.gitignore b/storage/framework/testing/.gitignore old mode 100755 new mode 100644 diff --git a/storage/framework/views/.gitignore b/storage/framework/views/.gitignore old mode 100755 new mode 100644 diff --git a/storage/logs/.gitignore b/storage/logs/.gitignore old mode 100755 new mode 100644 diff --git a/tests/Feature/Import/ImportCompanyTest.php b/tests/Feature/Import/ImportCompanyTest.php index 30f66317a5c3..ee4ea43954c4 100644 --- a/tests/Feature/Import/ImportCompanyTest.php +++ b/tests/Feature/Import/ImportCompanyTest.php @@ -51,6 +51,7 @@ use App\Models\VendorContact; use App\Utils\Traits\MakesHash; use Illuminate\Foundation\Testing\DatabaseTransactions; use Illuminate\Routing\Middleware\ThrottleRequests; +use Illuminate\Support\Facades\Artisan; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Str; use League\Csv\Reader; @@ -78,8 +79,8 @@ class ImportCompanyTest extends TestCase { parent::setUp(); - // $this->artisan('db:seed'); - + Artisan::call('db:seed'); + $this->withoutMiddleware( ThrottleRequests::class ); diff --git a/tests/Feature/Inventory/InventoryManagementTest.php b/tests/Feature/Inventory/InventoryManagementTest.php index eb62e19c884f..8b12761a974e 100644 --- a/tests/Feature/Inventory/InventoryManagementTest.php +++ b/tests/Feature/Inventory/InventoryManagementTest.php @@ -80,7 +80,7 @@ class InventoryManagementTest extends TestCase ])->post('/api/v1/invoices/', $invoice_array) ->assertStatus(200); - $product = $product->refresh(); + $product = $product->fresh(); $this->assertEquals(90, $product->in_stock_quantity); diff --git a/tests/Feature/PdfCreatorTest.php b/tests/Feature/PdfCreatorTest.php index 6d42a20e35b0..cb8c023ec023 100644 --- a/tests/Feature/PdfCreatorTest.php +++ b/tests/Feature/PdfCreatorTest.php @@ -41,20 +41,20 @@ class PdfCreatorTest extends TestCase { $credit_path = (new CreateEntityPdf($this->credit->invitations->first()))->handle(); - $this->assertTrue(Storage::disk('public')->exists($credit_path)); + $this->assertTrue(Storage::exists($credit_path)); } public function testInvoicePdfCreated() { $invoice_path = (new CreateEntityPdf($this->invoice->invitations->first()))->handle(); - $this->assertTrue(Storage::disk('public')->exists($invoice_path)); + $this->assertTrue(Storage::exists($invoice_path)); } public function testQuotePdfCreated() { $quote_path = (new CreateEntityPdf($this->quote->invitations->first()))->handle(); - $this->assertTrue(Storage::disk('public')->exists($quote_path)); + $this->assertTrue(Storage::exists($quote_path)); } }