This commit is contained in:
David Bomba 2024-06-27 14:57:15 +10:00
parent 7288e5b641
commit 1a1d75a0b5
9 changed files with 19 additions and 19 deletions

View File

@ -1 +1 @@
5.10.3 5.10.4

View File

@ -112,12 +112,12 @@ use Laracasts\Presenter\PresentableTrait;
* @property int $notify_vendor_when_paid * @property int $notify_vendor_when_paid
* @property int $invoice_task_hours * @property int $invoice_task_hours
* @property int $deleted_at * @property int $deleted_at
* @property string $smtp_username * @property string|null $smtp_username
* @property string $smtp_password * @property string|null $smtp_password
* @property string $smtp_host * @property string|null $smtp_host
* @property string $smtp_port * @property string|null $smtp_port
* @property string $smtp_encryption * @property string|null $smtp_encryption
* @property string $smtp_local_domain * @property string|null $smtp_local_domain
* @property boolean $smtp_verify_peer * @property boolean $smtp_verify_peer
* @property-read \App\Models\Account $account * @property-read \App\Models\Account $account
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Activity> $activities * @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Activity> $activities

View File

@ -1118,7 +1118,7 @@ class SubscriptionService
*/ */
public function triggerWebhook($context) public function triggerWebhook($context)
{ {
if (empty($this->subscription->webhook_configuration['post_purchase_url']) || is_null($this->subscription->webhook_configuration['post_purchase_url']) || strlen($this->subscription->webhook_configuration['post_purchase_url']) < 1) { if (empty($this->subscription->webhook_configuration['post_purchase_url']) || is_null($this->subscription->webhook_configuration['post_purchase_url']) || strlen($this->subscription->webhook_configuration['post_purchase_url']) < 1) { //@phpstan-ignore-line
return ["message" => "Success", "status_code" => 200]; return ["message" => "Success", "status_code" => 200];
} }

View File

@ -174,7 +174,7 @@ class SubscriptionStatus extends AbstractService
*/ */
private function checkRefundable(): self private function checkRefundable(): self
{ {
if(!$this->recurring_invoice->subscription->refund_period || (int)$this->recurring_invoice->subscription->refund_period == 0) { if(!$this->recurring_invoice->subscription->refund_period || (int)$this->recurring_invoice->subscription->refund_period == 0) {//@phpstan-ignore-line
return $this->setRefundable(false); return $this->setRefundable(false);
} }

View File

@ -436,11 +436,11 @@ class TemplateService
} }
match ($key) { match ($key) {
'variables' => $processed = $value->first() ?? [], 'variables' => $processed = $value->first() ?? [], //@phpstan-ignore-line
'invoices' => $processed = (new HtmlEngine($value->first()->invitations()->first()))->setSettings($this->getSettings())->generateLabelsAndValues() ?? [], 'invoices' => $processed = (new HtmlEngine($value->first()->invitations()->first()))->setSettings($this->getSettings())->generateLabelsAndValues() ?? [],
'quotes' => $processed = (new HtmlEngine($value->first()->invitations()->first()))->setSettings($this->getSettings())->generateLabelsAndValues() ?? [], 'quotes' => $processed = (new HtmlEngine($value->first()->invitations()->first()))->setSettings($this->getSettings())->generateLabelsAndValues() ?? [],
'credits' => $processed = (new HtmlEngine($value->first()->invitations()->first()))->setSettings($this->getSettings())->generateLabelsAndValues() ?? [], 'credits' => $processed = (new HtmlEngine($value->first()->invitations()->first()))->setSettings($this->getSettings())->generateLabelsAndValues() ?? [],
'payments' => $processed = (new PaymentHtmlEngine($value->first(), $value->first()->client->contacts()->first()))->setSettings($this->getSettings())->generateLabelsAndValues() ?? [], 'payments' => $processed = (new PaymentHtmlEngine($value->first(), $value->first()->client->contacts()->first()))->setSettings($this->getSettings())->generateLabelsAndValues() ?? [], //@phpstan-ignore-line
'tasks' => $processed = [], 'tasks' => $processed = [],
'projects' => $processed = [], 'projects' => $processed = [],
'purchase_orders' => (new VendorHtmlEngine($value->first()->invitations()->first()))->setSettings($this->getSettings())->generateLabelsAndValues() ?? [], 'purchase_orders' => (new VendorHtmlEngine($value->first()->invitations()->first()))->setSettings($this->getSettings())->generateLabelsAndValues() ?? [],
@ -533,7 +533,7 @@ class TemplateService
'tax_rate3' => (float) $invoice->tax_rate3, 'tax_rate3' => (float) $invoice->tax_rate3,
'total_taxes' => Number::formatMoney($invoice->total_taxes, $invoice->client), 'total_taxes' => Number::formatMoney($invoice->total_taxes, $invoice->client),
'total_taxes_raw' => $invoice->total_taxes, 'total_taxes_raw' => $invoice->total_taxes,
'is_amount_discount' => (bool) $invoice->is_amount_discount ?? false, 'is_amount_discount' => (bool) $invoice->is_amount_discount ?? false,//@phpstan-ignore-line
'footer' => $invoice->footer ?? '', 'footer' => $invoice->footer ?? '',
'partial' => $invoice->partial ?? 0, 'partial' => $invoice->partial ?? 0,
'partial_due_date' => $this->translateDate($invoice->partial_due_date, $invoice->client->date_format(), $invoice->client->locale()), 'partial_due_date' => $this->translateDate($invoice->partial_due_date, $invoice->client->date_format(), $invoice->client->locale()),
@ -864,7 +864,7 @@ class TemplateService
'tax_rate3' => (float) $credit->tax_rate3, 'tax_rate3' => (float) $credit->tax_rate3,
'total_taxes' => Number::formatMoney($credit->total_taxes, $credit->client), 'total_taxes' => Number::formatMoney($credit->total_taxes, $credit->client),
'total_taxes_raw' => $credit->total_taxes, 'total_taxes_raw' => $credit->total_taxes,
'is_amount_discount' => (bool) $credit->is_amount_discount ?? false, 'is_amount_discount' => (bool) $credit->is_amount_discount ?? false, //@phpstan-ignore-line
'footer' => $credit->footer ?? '', 'footer' => $credit->footer ?? '',
'partial' => $credit->partial ?? 0, 'partial' => $credit->partial ?? 0,
'partial_due_date' => $this->translateDate($credit->partial_due_date, $credit->client->date_format(), $credit->client->locale()), 'partial_due_date' => $this->translateDate($credit->partial_due_date, $credit->client->date_format(), $credit->client->locale()),
@ -1014,7 +1014,7 @@ class TemplateService
'custom_value4' => (string) $project->custom_value4 ?: '', 'custom_value4' => (string) $project->custom_value4 ?: '',
'color' => (string) $project->color ?: '', 'color' => (string) $project->color ?: '',
'current_hours' => (int) $project->current_hours ?: 0, 'current_hours' => (int) $project->current_hours ?: 0,
'tasks' => ($project->tasks && !$nested) ? $this->processTasks($project->tasks, true) : [], 'tasks' => ($project->tasks && !$nested) ? $this->processTasks($project->tasks, true) : [], //@phpstan-ignore-line
'client' => $project->client ? [ 'client' => $project->client ? [
'name' => $project->client->present()->name(), 'name' => $project->client->present()->name(),
'balance' => $project->client->balance, 'balance' => $project->client->balance,

View File

@ -74,7 +74,7 @@ class ProductTransformer extends EntityTransformer
'notes' => $product->notes ?: '', 'notes' => $product->notes ?: '',
'cost' => (float) $product->cost ?: 0, 'cost' => (float) $product->cost ?: 0,
'price' => (float) $product->price ?: 0, 'price' => (float) $product->price ?: 0,
'quantity' => is_numeric($product->quantity) ? (float) $product->quantity : (float) 1.0, 'quantity' => is_numeric($product->quantity) ? (float) $product->quantity : (float) 1.0, //@phpstan-ignore-line
'tax_name1' => $product->tax_name1 ?: '', 'tax_name1' => $product->tax_name1 ?: '',
'tax_rate1' => (float) $product->tax_rate1 ?: 0, 'tax_rate1' => (float) $product->tax_rate1 ?: 0,
'tax_name2' => $product->tax_name2 ?: '', 'tax_name2' => $product->tax_name2 ?: '',

View File

@ -78,7 +78,7 @@ class PurchaseOrderTransformer extends EntityTransformer
{ {
$transformer = new VendorTransformer($this->serializer); $transformer = new VendorTransformer($this->serializer);
if (!$purchase_order->vendor) { if (!$purchase_order->vendor) {//@phpstan-ignore-line
return null; return null;
} }

View File

@ -67,7 +67,7 @@ class TaskTransformer extends EntityTransformer
{ {
$transformer = new UserTransformer($this->serializer); $transformer = new UserTransformer($this->serializer);
if (!$task->user) { if (!$task->user) { //@phpstan-ignore-line
return null; return null;
} }

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.3'), 'app_version' => env('APP_VERSION', '5.10.4'),
'app_tag' => env('APP_TAG', '5.10.3'), 'app_tag' => env('APP_TAG', '5.10.4'),
'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),