From 50f08362a3219e4f10378d573f32ad42c45efa2c Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 21 Sep 2022 20:35:36 +1000 Subject: [PATCH 1/8] Minor fixes for stripe imports --- app/PaymentDrivers/Stripe/UpdatePaymentMethods.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/PaymentDrivers/Stripe/UpdatePaymentMethods.php b/app/PaymentDrivers/Stripe/UpdatePaymentMethods.php index 860b590602..4424ca40ee 100644 --- a/app/PaymentDrivers/Stripe/UpdatePaymentMethods.php +++ b/app/PaymentDrivers/Stripe/UpdatePaymentMethods.php @@ -74,7 +74,7 @@ class UpdatePaymentMethods { $sources = $customer->sources; - if(!property_exists($sources, 'data')) + if(!$customer || !property_exists($sources, 'data')) return; foreach ($sources->data as $method) { From e63cf9c48f6d8138f1e7dedb890d812f7c5c108b Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 21 Sep 2022 22:02:29 +1000 Subject: [PATCH 2/8] Do not serialize company after migration --- app/Jobs/Util/Import.php | 11 ++++++++++- app/Mail/MigrationCompleted.php | 15 ++++++++++++--- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/app/Jobs/Util/Import.php b/app/Jobs/Util/Import.php index 7a987808d1..5fad49fe6e 100644 --- a/app/Jobs/Util/Import.php +++ b/app/Jobs/Util/Import.php @@ -264,7 +264,7 @@ class Import implements ShouldQueue $t->replace(Ninja::transformTranslations($this->company->settings)); Mail::to($this->user->email, $this->user->name()) - ->send(new MigrationCompleted($this->company, implode("
",$check_data))); + ->send(new MigrationCompleted($this->company->id, $this->company->db, implode("
",$check_data))); } catch(\Exception $e) { nlog($e->getMessage()); @@ -715,6 +715,15 @@ class Import implements ShouldQueue Client::reguard(); + Client::with('contacts')->where('company_id', $this->company->id)->cursor()->each(function ($client){ + + $contact = $client->contacts->sortByDesc('is_primary')->first(); + $contact->is_primary = true; + $contact->save(); + + }); + + /*Improve memory handling by setting everything to null when we have finished*/ $data = null; $contact_repository = null; diff --git a/app/Mail/MigrationCompleted.php b/app/Mail/MigrationCompleted.php index d8dfb3ed8e..daddca816c 100644 --- a/app/Mail/MigrationCompleted.php +++ b/app/Mail/MigrationCompleted.php @@ -2,6 +2,7 @@ namespace App\Mail; +use App\Libraries\MultiDB; use App\Models\Company; use App\Utils\Ninja; use Illuminate\Bus\Queueable; @@ -13,19 +14,23 @@ class MigrationCompleted extends Mailable { // use Queueable, SerializesModels; - public $company; + public $company_id; + + public $db; public $check_data; + public $company; /** * Create a new message instance. * * @return void */ - public function __construct(Company $company, $check_data = '') + public function __construct(int $company_id, string $db, $check_data = '') { - $this->company = $company; + $this->company_id = $company_id; $this->check_data = $check_data; + $this->db = $db; } /** @@ -35,6 +40,10 @@ class MigrationCompleted extends Mailable */ public function build() { + + MultiDB::setDb($this->db); + $this->company = Company::find($this->company_id); + App::forgetInstance('translator'); $t = app('translator'); $t->replace(Ninja::transformTranslations($this->company->settings)); From 3d0b8c629b47e06f94c628c64baeb88e193222b6 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Thu, 22 Sep 2022 09:59:40 +1000 Subject: [PATCH 3/8] Put in checks for client filters --- app/Filters/ClientFilters.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Filters/ClientFilters.php b/app/Filters/ClientFilters.php index a04f8eb623..18eb909d0c 100644 --- a/app/Filters/ClientFilters.php +++ b/app/Filters/ClientFilters.php @@ -30,7 +30,10 @@ class ClientFilters extends QueryFilters */ public function name(string $name): Builder { - return $this->builder->where('name', 'like', '%'.$name.'%'); + if(strlen($name) >=1) + return $this->builder->where('name', 'like', '%'.$name.'%'); + + return $this->builder; } /** From 49044be48cfaf6364791b187a3dd8807d633b76b Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 27 Sep 2022 20:01:58 +1000 Subject: [PATCH 4/8] Fixes for checkout catching failures --- app/Http/Controllers/SelfUpdateController.php | 34 +------------------ .../CheckoutComPaymentDriver.php | 10 ++++-- 2 files changed, 8 insertions(+), 36 deletions(-) diff --git a/app/Http/Controllers/SelfUpdateController.php b/app/Http/Controllers/SelfUpdateController.php index 32324873a9..4614d1486c 100644 --- a/app/Http/Controllers/SelfUpdateController.php +++ b/app/Http/Controllers/SelfUpdateController.php @@ -69,39 +69,7 @@ class SelfUpdateController extends BaseController * ), * ) */ - // public function old_update(\Codedge\Updater\UpdaterManager $updater) - // { - // set_time_limit(0); - // define('STDIN', fopen('php://stdin', 'r')); - - // if (Ninja::isHosted()) { - // return response()->json(['message' => ctrans('texts.self_update_not_available')], 403); - // } - - // $this->testWritable(); - - // // Get the new version available - // $versionAvailable = $updater->source()->getVersionAvailable(); - - // // Create a release - // $release = $updater->source()->fetch($versionAvailable); - - // $updater->source()->update($release); - - // $cacheCompiled = base_path('bootstrap/cache/compiled.php'); - // if (file_exists($cacheCompiled)) { unlink ($cacheCompiled); } - // $cacheServices = base_path('bootstrap/cache/services.php'); - // if (file_exists($cacheServices)) { unlink ($cacheServices); } - - // Artisan::call('clear-compiled'); - // Artisan::call('route:clear'); - // Artisan::call('view:clear'); - // Artisan::call('optimize'); - - // return response()->json(['message' => 'Update completed'], 200); - - // } - + public function update() { set_time_limit(0); diff --git a/app/PaymentDrivers/CheckoutComPaymentDriver.php b/app/PaymentDrivers/CheckoutComPaymentDriver.php index fffdd8edf1..2a7a9e9451 100644 --- a/app/PaymentDrivers/CheckoutComPaymentDriver.php +++ b/app/PaymentDrivers/CheckoutComPaymentDriver.php @@ -12,6 +12,7 @@ namespace App\PaymentDrivers; +use App\Exceptions\PaymentFailed; use App\Http\Requests\ClientPortal\Payments\PaymentResponseRequest; use App\Http\Requests\Gateways\Checkout3ds\Checkout3dsRequest; use App\Http\Requests\Payments\PaymentWebhookRequest; @@ -254,12 +255,13 @@ class CheckoutComPaymentDriver extends BaseDriver ]; } catch (CheckoutApiException $e) { // API error - $request_id = $e->request_id; - $http_status_code = $e->http_status_code; - $error_details = $e->error_details; + throw new PaymentFailed($e->getMessage(), $e->getCode()); + } catch (CheckoutArgumentException $e) { // Bad arguments + throw new PaymentFailed($e->getMessage(), $e->getCode()); + return [ 'transaction_reference' => null, 'transaction_response' => json_encode($e->getMessage()), @@ -270,6 +272,8 @@ class CheckoutComPaymentDriver extends BaseDriver } catch (CheckoutAuthorizationException $e) { // Bad Invalid authorization + throw new PaymentFailed($e->getMessage(), $e->getCode()); + return [ 'transaction_reference' => null, 'transaction_response' => json_encode($e->getMessage()), From 56fe8c08dad8e750fa69f5e7f10f644b692ff68f Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 27 Sep 2022 20:02:37 +1000 Subject: [PATCH 5/8] Fixes for swagger --- app/Http/Controllers/ActivityController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/ActivityController.php b/app/Http/Controllers/ActivityController.php index 8e85d37f12..eca62ed1f2 100644 --- a/app/Http/Controllers/ActivityController.php +++ b/app/Http/Controllers/ActivityController.php @@ -41,7 +41,7 @@ class ActivityController extends BaseController /** * @OA\Get( - * path="/api/v1/actvities", + * path="/api/v1/activities", * operationId="getActivities", * tags={"actvities"}, * summary="Gets a list of actvities", From 9542bcc92e0bdd9f85149687e00f555ecae2019c Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 28 Sep 2022 10:54:07 +1000 Subject: [PATCH 6/8] Show labels of custom fields in registration form --- resources/views/portal/ninja2020/auth/register.blade.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/resources/views/portal/ninja2020/auth/register.blade.php b/resources/views/portal/ninja2020/auth/register.blade.php index 23fd243113..84e2c0f2a9 100644 --- a/resources/views/portal/ninja2020/auth/register.blade.php +++ b/resources/views/portal/ninja2020/auth/register.blade.php @@ -27,7 +27,11 @@ @if($field['required']) From a75fbc1e85a76e2b86a4e96d4ccfc6caf8e8fd3e Mon Sep 17 00:00:00 2001 From: David Bomba Date: Fri, 30 Sep 2022 15:23:18 +1000 Subject: [PATCH 7/8] Remove direct google URLs --- ...X2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4gaVI.woff2 | Bin 0 -> 16740 bytes .../views/errors/illustrated-layout.blade.php | 17 ++++++++++++++--- resources/views/errors/layout.blade.php | 17 ++++++++++++++--- resources/views/errors/minimal.blade.php | 15 +++++++++++++-- resources/views/layouts/app.blade.php | 15 +++++++++++++-- resources/views/layouts/ninja.blade.php | 15 +++++++++++++-- .../portal/ninja2020/layout/app.blade.php | 16 +++++++++++++--- .../portal/ninja2020/layout/clean.blade.php | 14 +++++++++++++- .../ninja2020/layout/clean_setup.blade.php | 15 +++++++++++++-- .../ninja2020/layout/vendor_app.blade.php | 15 +++++++++++++-- .../views/themes/ninja2020/clean.blade.php | 16 ++++++++++++++-- .../views/vendor/l5-swagger/index.blade.php | 13 ++++++++++++- 12 files changed, 145 insertions(+), 23 deletions(-) create mode 100644 public/css/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4gaVI.woff2 diff --git a/public/css/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4gaVI.woff2 b/public/css/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4gaVI.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..15339ea9ccdd3bc54b25dfe54800f1c3bb730d26 GIT binary patch literal 16740 zcmV(_K-9l?Pew8T0RR9106}B`5&!@I0DF)C06_Zy0RR9100000000000000000000 z0000QVjCbFgir=xKT}jeR9*mr3) zsADuVl9*Sz(A_;0JQ(l|=aKIWKsT0w=wAkcGmuOvGbt({eSq3bpGk>Tmx+F!-{znD z2%|B+!+K^RD|CUd#^JI|j6y8zz{H4Pt^@5={6+R7i1y<*D|hds(ljIz$)yxaWMZR| z3XM_-Mf4rQ*i3PuA*iCMynIrp$&^HPK$bzKS_+|BD-SB_frkl~9dKNG4g8Fgon`7W zfAaH*9Ik0HpfAFADbavAFhD-%ru>9^7=aRPa1(F11F%h5IAhKk%@m!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83f@yield('title') - - - + {{-- --}} + {{-- --}} + + + diff --git a/resources/views/layouts/ninja.blade.php b/resources/views/layouts/ninja.blade.php index 9fa37c947f..d18aa27e8b 100644 --- a/resources/views/layouts/ninja.blade.php +++ b/resources/views/layouts/ninja.blade.php @@ -52,8 +52,19 @@ - - + {{-- --}} + {{-- --}} + diff --git a/resources/views/portal/ninja2020/layout/app.blade.php b/resources/views/portal/ninja2020/layout/app.blade.php index 91a1cde304..e2aed0225b 100644 --- a/resources/views/portal/ninja2020/layout/app.blade.php +++ b/resources/views/portal/ninja2020/layout/app.blade.php @@ -51,9 +51,19 @@ - - - + {{-- --}} + {{-- --}} + diff --git a/resources/views/portal/ninja2020/layout/clean.blade.php b/resources/views/portal/ninja2020/layout/clean.blade.php index 7a504e7468..0302bdb23f 100644 --- a/resources/views/portal/ninja2020/layout/clean.blade.php +++ b/resources/views/portal/ninja2020/layout/clean.blade.php @@ -51,8 +51,20 @@ - + {{-- + --}} + diff --git a/resources/views/portal/ninja2020/layout/clean_setup.blade.php b/resources/views/portal/ninja2020/layout/clean_setup.blade.php index 50452d2b7e..3eaf8875c7 100644 --- a/resources/views/portal/ninja2020/layout/clean_setup.blade.php +++ b/resources/views/portal/ninja2020/layout/clean_setup.blade.php @@ -55,8 +55,19 @@ - - + {{-- --}} + {{-- --}} + @if(strpos(Request::url(),'setup') === false) diff --git a/resources/views/portal/ninja2020/layout/vendor_app.blade.php b/resources/views/portal/ninja2020/layout/vendor_app.blade.php index 64d66f8322..87f03f3d80 100644 --- a/resources/views/portal/ninja2020/layout/vendor_app.blade.php +++ b/resources/views/portal/ninja2020/layout/vendor_app.blade.php @@ -51,8 +51,19 @@ - - + {{-- --}} + {{-- --}} + diff --git a/resources/views/themes/ninja2020/clean.blade.php b/resources/views/themes/ninja2020/clean.blade.php index 8a24e8ca80..b1ecd0e05b 100644 --- a/resources/views/themes/ninja2020/clean.blade.php +++ b/resources/views/themes/ninja2020/clean.blade.php @@ -51,9 +51,21 @@ - - + {{-- --}} + {{-- --}} + + {{-- --}} diff --git a/resources/views/vendor/l5-swagger/index.blade.php b/resources/views/vendor/l5-swagger/index.blade.php index e75abb2e41..d0992af082 100644 --- a/resources/views/vendor/l5-swagger/index.blade.php +++ b/resources/views/vendor/l5-swagger/index.blade.php @@ -4,7 +4,18 @@ {{config('l5-swagger.documentations.'.$documentation.'.api.title')}} - + {{-- --}} + From 6cb3f5c37277b2aa6baa67b99562e610119cf4e0 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Fri, 30 Sep 2022 15:34:06 +1000 Subject: [PATCH 8/8] Minor fixes for QR Code generation for live previews --- app/Helpers/SwissQr/SwissQrGenerator.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app/Helpers/SwissQr/SwissQrGenerator.php b/app/Helpers/SwissQr/SwissQrGenerator.php index 105b080711..043acd5ae4 100644 --- a/app/Helpers/SwissQr/SwissQrGenerator.php +++ b/app/Helpers/SwissQr/SwissQrGenerator.php @@ -105,11 +105,21 @@ class SwissQrGenerator // Add payment reference // This is what you will need to identify incoming payments. + if(stripos($this->invoice->number, "Live-") === 0) + { + // we're currently in preview status. Let's give a dummy reference for now + $invoice_number = "123456789"; + } + else + { + $invoice_number = $this->invoice->number; + } + if(strlen($this->company->present()->besr_id()) > 1) { $referenceNumber = QrBill\Reference\QrPaymentReferenceGenerator::generate( $this->company->present()->besr_id() ?: '', // You receive this number from your bank (BESR-ID). Unless your bank is PostFinance, in that case use NULL. - $this->invoice->number// A number to match the payment with your internal data, e.g. an invoice number + $invoice_number// A number to match the payment with your internal data, e.g. an invoice number ); $qrBill->setPaymentReference(