diff --git a/app/Http/Controllers/StaticController.php b/app/Http/Controllers/StaticController.php index 1cb4ccf1ff00..20e99db5d6ff 100644 --- a/app/Http/Controllers/StaticController.php +++ b/app/Http/Controllers/StaticController.php @@ -23,6 +23,43 @@ use Illuminate\Http\Response; class StaticController extends BaseController { + /** + * Show the list of Invoices. + * + * @param InvoiceFilters $filters The filters + * + * @return Response + * + * @OA\Get( + * path="/api/v1/statics", + * operationId="getStatics", + * tags={"statics"}, + * summary="Gets a list of statics", + * description="Lists all statics", + * + * @OA\Parameter(ref="#/components/parameters/X-Api-Secret"), + * @OA\Parameter(ref="#/components/parameters/X-Api-Token"), + * @OA\Parameter(ref="#/components/parameters/X-Requested-With"), + * @OA\Parameter(ref="#/components/parameters/include"), + * @OA\Response( + * response=200, + * description="A list of static data", + * @OA\Header(header="X-MINIMUM-CLIENT-VERSION", ref="#/components/headers/X-MINIMUM-CLIENT-VERSION"), + * @OA\Header(header="X-RateLimit-Remaining", ref="#/components/headers/X-RateLimit-Remaining"), + * @OA\Header(header="X-RateLimit-Limit", ref="#/components/headers/X-RateLimit-Limit"), + * ), + * @OA\Response( + * response=422, + * description="Validation error", + * @OA\JsonContent(ref="#/components/schemas/ValidationError"), + * ), + * @OA\Response( + * response="default", + * description="Unexpected Error", + * @OA\JsonContent(ref="#/components/schemas/Error"), + * ), + * ) + */ public function __invoke() { diff --git a/app/Jobs/Util/Import.php b/app/Jobs/Util/Import.php index 773ef8326243..627619656c9a 100644 --- a/app/Jobs/Util/Import.php +++ b/app/Jobs/Util/Import.php @@ -1866,10 +1866,19 @@ class Import implements ShouldQueue private function processNinjaTokens(array $data) { + nlog("attempting to process Ninja Tokens"); - if(Ninja::isHosted()) - \Modules\Admin\Jobs\Account\NinjaUser::dispatchNow($data, $this->company); + if(Ninja::isHosted()){ + + try{ + \Modules\Admin\Jobs\Account\NinjaUser::dispatchNow($data, $this->company); + } + catch(\Exception $e){ + nlog($e->getMessage()); + } + + } } diff --git a/app/Services/Invoice/AutoBillInvoice.php b/app/Services/Invoice/AutoBillInvoice.php index 025e9dcec957..17a511909161 100644 --- a/app/Services/Invoice/AutoBillInvoice.php +++ b/app/Services/Invoice/AutoBillInvoice.php @@ -125,7 +125,7 @@ class AutoBillInvoice extends AbstractService } catch(\Exception $e){ nlog("payment NOT captured for ". $this->invoice->number . " with error " . $e->getMessage()); - // nlog($e->getMessage()); + $this->invoice->service()->removeUnpaidGatewayFees()->save(); } if($payment){