Merge pull request #10352 from turbo124/v5-develop

v5.10.62
This commit is contained in:
David Bomba 2024-12-07 08:50:22 +11:00 committed by GitHub
commit 03445dfdf7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 7 additions and 11 deletions

View File

@ -1 +1 @@
5.10.61 5.10.62

View File

@ -44,7 +44,7 @@ class BulkInvoiceRequest extends Request
throw new DuplicatePaymentException('Action still processing, please wait. ', 429); throw new DuplicatePaymentException('Action still processing, please wait. ', 429);
} }
$delay = $this->input('action', 'delete') == 'delete' ? (ceil(count($this->input('ids', 4)))) : 1; $delay = $this->input('action', 'delete') == 'delete' ? (ceil(count($this->input('ids', 2)))) : 1;
\Illuminate\Support\Facades\Cache::put(($this->ip()."|".$this->input('action', 0)."|".$user->company()->company_key), true, $delay); \Illuminate\Support\Facades\Cache::put(($this->ip()."|".$this->input('action', 0)."|".$user->company()->company_key), true, $delay);
} }

View File

@ -160,6 +160,7 @@ class Statement
private function templateStatement($variables) private function templateStatement($variables)
{ {
if (isset($this->options['template'])) { if (isset($this->options['template'])) {
$statement_design_id = $this->options['template']; $statement_design_id = $this->options['template'];
} else { } else {
@ -221,12 +222,10 @@ class Statement
$this->entity = $this->getInvoices()->first();//@phpstan-ignore-line $this->entity = $this->getInvoices()->first();//@phpstan-ignore-line
} }
else { else {
nlog("fall back to any invoice/invitation");
$this->entity = $this->client->invoices()->whereHas('invitations')->first(); $this->entity = $this->client->invoices()->whereHas('invitations')->first();
} }
if(\is_null($this->entity)){ if(\is_null($this->entity)){
$settings = new \stdClass(); $settings = new \stdClass();
$settings->entity = \App\Models\Client::class; $settings->entity = \App\Models\Client::class;
$settings->currency_id = '1'; $settings->currency_id = '1';
@ -419,13 +418,12 @@ class Statement
protected function getInvitation() protected function getInvitation()
{ {
if($this->entity instanceof Invoice) { if($this->entity instanceof Invoice) {
// if ($this->entity instanceof Invoice || $this->entity instanceof Payment) { $invitation = $this->entity->invitations->first();
$invitation = $this->entity->whereHas('invitations')->first()->invitations->first();
if($invitation) if($invitation)
return $invitation; return $invitation;
$invitation = $this->client->invoice()->whereHas('invitations')->first()->invitations->first(); $invitation = $this->client->invoices()->whereHas('invitations')->first()->invitations->first();
if ($invitation) if ($invitation)
return $invitation; return $invitation;

View File

@ -29,8 +29,6 @@ class PdfMaker
private $options; private $options;
public $xpath;
/** @var CommonMarkConverter */ /** @var CommonMarkConverter */
protected $commonmark; protected $commonmark;

View File

@ -17,8 +17,8 @@ return [
'require_https' => env('REQUIRE_HTTPS', true), 'require_https' => env('REQUIRE_HTTPS', true),
'app_url' => rtrim(env('APP_URL', ''), '/'), 'app_url' => rtrim(env('APP_URL', ''), '/'),
'app_domain' => env('APP_DOMAIN', 'invoicing.co'), 'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
'app_version' => env('APP_VERSION', '5.10.61'), 'app_version' => env('APP_VERSION', '5.10.62'),
'app_tag' => env('APP_TAG', '5.10.61'), 'app_tag' => env('APP_TAG', '5.10.62'),
'minimum_client_version' => '5.0.16', 'minimum_client_version' => '5.0.16',
'terms_version' => '1.0.1', 'terms_version' => '1.0.1',
'api_secret' => env('API_SECRET', false), 'api_secret' => env('API_SECRET', false),