1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-24 02:11:34 +02:00

Merge pull request #7810 from turbo124/v5-stable

v5.5.21
This commit is contained in:
David Bomba 2022-09-09 17:25:41 +10:00 committed by GitHub
commit 7c5f1cec11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
28 changed files with 307 additions and 248 deletions

View File

@ -1 +1 @@
5.5.20
5.5.21

View File

@ -0,0 +1,59 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2022. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\DataMapper\Analytics;
use Turbo124\Beacon\ExampleMetric\GenericMixedMetric;
class EmailCount extends GenericMixedMetric
{
/**
* The type of Sample.
*
* Monotonically incrementing counter
*
* - counter
*
* @var string
*/
public $type = 'mixed_metric';
/**
* The name of the counter.
* @var string
*/
public $name = 'account.daily_email_count';
/**
* The datetime of the counter measurement.
*
* date("Y-m-d H:i:s")
*
* @var DateTime
*/
public $datetime;
/**
* The Class failure name
* set to 0.
*
* @var string
*/
public $string_metric5 = 'account_key';
public $int_metric1 = 1;
public function __construct($int_metric1, $string_metric5)
{
$this->int_metric1 = $int_metric1;
$this->string_metric5 = $string_metric5;
}
}

View File

@ -29,10 +29,7 @@ class RecurringInvoiceToInvoiceFactory
$invoice->terms = self::tranformObject($recurring_invoice->terms, $client);
$invoice->public_notes = self::tranformObject($recurring_invoice->public_notes, $client);
$invoice->private_notes = $recurring_invoice->private_notes;
//$invoice->date = now()->format($client->date_format());
//$invoice->due_date = $recurring_invoice->calculateDueDate(now());
$invoice->is_deleted = $recurring_invoice->is_deleted;
// $invoice->line_items = $recurring_invoice->line_items;
$invoice->line_items = self::transformItems($recurring_invoice, $client);
$invoice->tax_name1 = $recurring_invoice->tax_name1;
$invoice->tax_rate1 = $recurring_invoice->tax_rate1;

View File

@ -578,6 +578,16 @@ class InvoiceController extends BaseController
return response()->json(['message' => ctrans('texts.sent_message')], 200);
}
if($action == 'download' && $invoices->count() >=1 && auth()->user()->can('view', $invoices->first())) {
$file = $invoices->first()->service()->getInvoicePdf();
return response()->streamDownload(function () use ($file) {
echo Storage::get($file);
}, basename($file), ['Content-Type' => 'application/pdf']);
}
/*
* Send the other actions to the switch
*/

View File

@ -306,7 +306,7 @@ class PreviewController extends BaseController
if (Ninja::isHosted()) {
LightLogs::create(new LivePreview())
->increment()
->queue();
->batch();
}
$response = Response::make($file_path, 200);

View File

@ -68,8 +68,8 @@ class QueryLogging
$ip = request()->ip();
}
LightLogs::create(new DbQuery($request->method(), urldecode($request->url()), $count, $time, $ip))
->queue();
LightLogs::create(new DbQuery($request->method(), substr(urldecode($request->url()),0,180), $count, $time, $ip))
->batch();
}
return $response;

View File

@ -49,7 +49,7 @@ class StoreGroupSettingRequest extends Request
}
}
$input['settings'] = $group_settings;
$input['settings'] = (array)$group_settings;
$this->replace($input);
}

View File

@ -73,6 +73,6 @@ class UpdateGroupSettingRequest extends Request
}
}
return $settings;
return (array)$settings;
}
}

View File

@ -178,12 +178,14 @@ class BaseTransformer
public function getFloat($data, $field)
{
if (array_key_exists($field, $data)) {
$number = preg_replace('/[^0-9-.]+/', '', $data[$field]);
//$number = preg_replace('/[^0-9-.]+/', '', $data[$field]);
return Number::parseStringFloat($data[$field]);
} else {
$number = 0;
//$number = 0;
return 0;
}
return Number::parseFloat($number);
// return Number::parseFloat($number);
}
/**

View File

@ -13,6 +13,7 @@ namespace App\Jobs\Cron;
use App\Jobs\RecurringInvoice\SendRecurring;
use App\Libraries\MultiDB;
use App\Models\Invoice;
use App\Models\RecurringInvoice;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Support\Carbon;
@ -107,7 +108,7 @@ class RecurringInvoicesCron
nlog("Trying to send {$recurring_invoice->number}");
if ($recurring_invoice->company->stop_on_unpaid_recurring) {
if ($recurring_invoice->invoices()->whereIn('status_id', [2, 3])->where('is_deleted', 0)->where('balance', '>', 0)->exists()) {
if (Invoice::where('recurring_id', $recurring_invoice->id)->whereIn('status_id', [2, 3])->where('is_deleted', 0)->where('balance', '>', 0)->exists()) {
return;
}
}

View File

@ -123,7 +123,7 @@ class NinjaMailerJob implements ShouldQueue
->send($this->nmo->mailable);
LightLogs::create(new EmailSuccess($this->nmo->company->company_key))
->queue();
->batch();
/* Count the amount of emails sent across all the users accounts */
Cache::increment($this->company->account->key);

View File

@ -11,6 +11,7 @@
namespace App\Jobs\Ninja;
use App\DataMapper\Analytics\EmailCount;
use App\Libraries\MultiDB;
use App\Models\Account;
use App\Utils\Ninja;
@ -20,6 +21,7 @@ use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Cache;
use Turbo124\Beacon\Facades\LightLogs;
class AdjustEmailQuota implements ShouldQueue
{
@ -58,8 +60,15 @@ class AdjustEmailQuota implements ShouldQueue
{
Account::query()->cursor()->each(function ($account) {
nlog("resetting email quota for {$account->key}");
$email_count = Cache::get($account->key);
if($email_count > 0)
LightLogs::create(new EmailCount($email_count, $account->key))->batch();
Cache::forget($account->key);
Cache::forget("throttle_notified:{$account->key}");
});
}
}

View File

@ -217,7 +217,7 @@ class ProcessPostmarkWebhook implements ShouldQueue
$this->request['MessageID']
);
LightLogs::create($bounce)->queue();
LightLogs::create($bounce)->batch();
SystemLogger::dispatch($this->request, SystemLog::CATEGORY_MAIL, SystemLog::EVENT_MAIL_BOUNCED, SystemLog::TYPE_WEBHOOK_RESPONSE, $this->invitation->contact->client, $this->invitation->company);
@ -263,7 +263,7 @@ class ProcessPostmarkWebhook implements ShouldQueue
$this->request['MessageID']
);
LightLogs::create($spam)->queue();
LightLogs::create($spam)->batch();
SystemLogger::dispatch($this->request, SystemLog::CATEGORY_MAIL, SystemLog::EVENT_MAIL_SPAM_COMPLAINT, SystemLog::TYPE_WEBHOOK_RESPONSE, $this->invitation->contact->client, $this->invitation->company);

View File

@ -73,8 +73,11 @@ class SendRecurring implements ShouldQueue
$invoice->auto_bill_enabled = false;
}
$invoice->date = now()->format('Y-m-d');
$invoice->due_date = $this->recurring_invoice->calculateDueDate(now()->format('Y-m-d'));
$invoice->date = date('Y-m-d');
nlog("Recurring Invoice Date Set on Invoice = {$invoice->date} - ". now()->format('Y-m-d'));
$invoice->due_date = $this->recurring_invoice->calculateDueDate(date('Y-m-d'));
$invoice->recurring_id = $this->recurring_invoice->id;
$invoice->saveQuietly();
@ -108,9 +111,9 @@ class SendRecurring implements ShouldQueue
$this->recurring_invoice->setCompleted();
}
// nlog('next send date = '.$this->recurring_invoice->next_send_date);
nlog('next send date = '.$this->recurring_invoice->next_send_date);
// nlog('remaining cycles = '.$this->recurring_invoice->remaining_cycles);
// nlog('last send date = '.$this->recurring_invoice->last_sent_date);
nlog('last send date = '.$this->recurring_invoice->last_sent_date);
$this->recurring_invoice->save();

View File

@ -61,7 +61,7 @@ class VendorTemplateEmail extends Mailable
}
if ($this->build_email->getTemplate() == 'custom') {
$this->build_email->setBody(str_replace('$body', $this->build_email->getBody(), $this->client->getSetting('email_style_custom')));
$this->build_email->setBody(str_replace('$body', $this->build_email->getBody(), $this->company->getSetting('email_style_custom')));
}
$settings = $this->company->settings;

View File

@ -121,6 +121,7 @@ class Company extends BaseModel
'stock_notification',
'enabled_expense_tax_rates',
'invoice_task_project',
'report_include_deleted',
];
protected $hidden = [

View File

@ -560,7 +560,7 @@ class RecurringInvoice extends BaseModel
break;
case 'on_receipt':
return Carbon::Parse($date)->copy();
return Carbon::parse($date)->copy();
break;
default:

View File

@ -64,7 +64,7 @@ class Vendor extends BaseModel
protected $touches = [];
protected $with = [
'company',
'contacts.company',
];
protected $presenter = VendorPresenter::class;

View File

@ -45,10 +45,7 @@ class VendorContact extends Authenticatable implements HasLocalePreference
'hashed_id',
];
protected $with = [
// 'vendor',
// 'company'
];
protected $with = [];
protected $casts = [
'updated_at' => 'timestamp',

View File

@ -261,7 +261,7 @@ class GoCardlessPaymentDriver extends BaseDriver
//finalize payments on invoices here.
}
if ($event['action'] === 'failed') {
if ($event['action'] === 'failed' && array_key_exists('payment', $event['links'])) {
$payment = Payment::query()
->where('transaction_reference', $event['links']['payment'])
->where('company_id', $request->getCompany()->id)

View File

@ -1,4 +1,5 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
@ -16,6 +17,7 @@ use App\Libraries\Currency\Conversion\CurrencyApi;
use App\Models\Expense;
use App\Utils\Traits\GeneratesCounter;
use Illuminate\Support\Carbon;
use Illuminate\Database\QueryException;
/**
* ExpenseRepository.
@ -24,6 +26,8 @@ class ExpenseRepository extends BaseRepository
{
use GeneratesCounter;
private $completed = true;
/**
* Saves the expense and its contacts.
*
@ -32,15 +36,17 @@ class ExpenseRepository extends BaseRepository
*
* @return \App\Models\Expense|null expense Object
*/
public function save(array $data, Expense $expense) : ?Expense
public function save(array $data, Expense $expense): ?Expense
{
$expense->fill($data);
if (! $expense->id) {
if (!$expense->id) {
$expense = $this->processExchangeRates($data, $expense);
}
$expense->number = empty($expense->number) ? $this->getNextExpenseNumber($expense) : $expense->number;
if (empty($expense->number))
$expense = $this->findAndSaveNumber($expense);
$expense->save();
if (array_key_exists('documents', $data)) {
@ -54,6 +60,7 @@ class ExpenseRepository extends BaseRepository
* Store expenses in bulk.
*
* @param array $expense
*
* @return \App\Models\Expense|null
*/
public function create($expense): ?Expense
@ -64,7 +71,7 @@ class ExpenseRepository extends BaseRepository
);
}
public function processExchangeRates($data, $expense)
public function processExchangeRates($data, $expense): Expense
{
if (array_key_exists('exchange_rate', $data) && isset($data['exchange_rate']) && $data['exchange_rate'] != 1) {
return $expense;
@ -83,4 +90,35 @@ class ExpenseRepository extends BaseRepository
return $expense;
}
/**
* Handle race conditions when creating expense numbers
*
* @param Expense $expense
* @return \App\Models\Expense
*/
private function findAndSaveNumber($expense): Expense
{
$x = 1;
do {
try {
$expense->number = $this->getNextExpenseNumber($expense);
$expense->saveQuietly();
$this->completed = false;
} catch (QueryException $e) {
$x++;
if ($x > 50)
$this->completed = false;
}
} while ($this->completed);
return $expense;
}
}

View File

@ -179,6 +179,7 @@ class CompanyTransformer extends EntityTransformer
'enable_applying_payments' => (bool) $company->enable_applying_payments,
'enabled_expense_tax_rates' => (int) $company->enabled_expense_tax_rates,
'invoice_task_project' => (bool) $company->invoice_task_project,
'report_include_deleted' => (bool) $company->report_include_deleted,
];
}

View File

@ -522,6 +522,9 @@ class HtmlEngine
$data['$font_name'] = ['value' => Helpers::resolveFont($this->settings->primary_font)['name'], 'label' => ''];
$data['$font_url'] = ['value' => Helpers::resolveFont($this->settings->primary_font)['url'], 'label' => ''];
$data['$secondary_font_name'] = ['value' => Helpers::resolveFont($this->settings->secondary_font)['name'], 'label' => ''];
$data['$secondary_font_url'] = ['value' => Helpers::resolveFont($this->settings->secondary_font)['url'], 'label' => ''];
$data['$invoiceninja.whitelabel'] = ['value' => 'https://raw.githubusercontent.com/invoiceninja/invoiceninja/v5-develop/public/images/new_logo.png', 'label' => ''];
$data['$primary_color'] = ['value' => $this->settings->primary_color, 'label' => ''];

View File

@ -1,4 +1,5 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
@ -87,16 +88,16 @@ class TemplateEngine
{
return $this->setEntity()
->setSettingsObject()
->setTemplates()
->replaceValues()
->renderTemplate();
->setSettingsObject()
->setTemplates()
->replaceValues()
->renderTemplate();
}
private function setEntity()
{
if (strlen($this->entity) > 1 && strlen($this->entity_id) > 1) {
$class = 'App\Models\\'.ucfirst(Str::camel($this->entity));
$class = 'App\Models\\' . ucfirst(Str::camel($this->entity));
$this->entity_obj = $class::withTrashed()->where('id', $this->decodePrimaryKey($this->entity_id))->company()->first();
} else {
$this->mockEntity();
@ -107,11 +108,10 @@ class TemplateEngine
private function setSettingsObject()
{
if($this->entity == 'purchaseOrder' || $this->entity == 'purchase_order'){
if ($this->entity == 'purchaseOrder' || $this->entity == 'purchase_order') {
$this->settings_entity = auth()->user()->company();
$this->settings = $this->settings_entity->settings;
}
elseif ($this->entity_obj->client()->exists()) {
} elseif ($this->entity_obj->client()->exists()) {
$this->settings_entity = $this->entity_obj->client;
$this->settings = $this->settings_entity->getMergedSettings();
} else {
@ -155,13 +155,11 @@ class TemplateEngine
$this->raw_body = $this->body;
$this->raw_subject = $this->subject;
if($this->entity == 'purchaseOrder'){
$this->fakerValues();
}
elseif ($this->entity_obj->client()->exists()) {
if ($this->entity_obj->client()->exists()) {
$this->entityValues($this->entity_obj->client->primary_contact()->first());
}
else {
} elseif ($this->entity_obj->vendor()->exists()) {
$this->entityValues($this->entity_obj->vendor->primary_contact()->first());
} else {
$this->fakerValues();
}
@ -184,16 +182,16 @@ class TemplateEngine
]);
$this->body = $converter->convert($this->body)->getContent();
}
private function entityValues($contact)
{
if($this->entity == 'purchaseOrder')
if (in_array($this->entity, ['purchaseOrder', 'purchase_order']))
$this->labels_and_values = (new VendorHtmlEngine($this->entity_obj->invitations->first()))->generateLabelsAndValues();
else
$this->labels_and_values = (new HtmlEngine($this->entity_obj->invitations->first()))->generateLabelsAndValues();
$this->body = strtr($this->body, $this->labels_and_values['labels']);
$this->body = strtr($this->body, $this->labels_and_values['values']);
@ -217,16 +215,15 @@ class TemplateEngine
$data['footer'] = '';
$data['logo'] = auth()->user()->company()->present()->logo();
if($this->entity_obj->client()->exists())
if ($this->entity_obj->client()->exists())
$data = array_merge($data, Helpers::sharedEmailVariables($this->entity_obj->client));
else{
else {
$data['signature'] = $this->settings->email_signature;
$data['settings'] = $this->settings;
$data['whitelabel'] = $this->entity_obj ? $this->entity_obj->company->account->isPaid() : true;
$data['company'] = $this->entity_obj ? $this->entity_obj->company : '';
$data['settings'] = $this->settings;
}
@ -235,7 +232,6 @@ class TemplateEngine
// In order to parse variables such as $signature in the body,
// we need to replace strings with the values from HTMLEngine.
$wrapper = strtr($wrapper, $this->labels_and_values['values']);
/*If no custom design exists, send back a blank!*/
@ -269,7 +265,7 @@ class TemplateEngine
private function mockEntity()
{
if(!$this->entity && $this->template && str_contains($this->template, 'purchase_order'))
if (!$this->entity && $this->template && str_contains($this->template, 'purchase_order'))
$this->entity = 'purchaseOrder';
DB::connection(config('database.default'))->beginTransaction();
@ -289,7 +285,7 @@ class TemplateEngine
'send_email' => true,
]);
if (! $this->entity || $this->entity == 'invoice') {
if (!$this->entity || $this->entity == 'invoice') {
$this->entity_obj = Invoice::factory()->create([
'user_id' => auth()->user()->id,
'company_id' => auth()->user()->company()->id,
@ -321,40 +317,37 @@ class TemplateEngine
if($this->entity == 'purchaseOrder')
{
if ($this->entity == 'purchaseOrder') {
$vendor = Vendor::factory()->create([
'user_id' => auth()->user()->id,
'company_id' => auth()->user()->company()->id,
]);
'user_id' => auth()->user()->id,
'company_id' => auth()->user()->company()->id,
]);
$contact = VendorContact::factory()->create([
'user_id' => auth()->user()->id,
'company_id' => auth()->user()->company()->id,
'vendor_id' => $vendor->id,
'is_primary' => 1,
'send_email' => true,
]);
'user_id' => auth()->user()->id,
'company_id' => auth()->user()->company()->id,
'vendor_id' => $vendor->id,
'is_primary' => 1,
'send_email' => true,
]);
$this->entity_obj = PurchaseOrder::factory()->create([
'user_id' => auth()->user()->id,
'company_id' => auth()->user()->company()->id,
'vendor_id' => $vendor->id,
]);
$invitation = PurchaseOrderInvitation::factory()->create([
'user_id' => auth()->user()->id,
'company_id' => auth()->user()->company()->id,
'purchase_order_id' => $this->entity_obj->id,
'vendor_contact_id' => $contact->id,
'user_id' => auth()->user()->id,
'company_id' => auth()->user()->company()->id,
'vendor_id' => $vendor->id,
]);
$invitation = PurchaseOrderInvitation::factory()->create([
'user_id' => auth()->user()->id,
'company_id' => auth()->user()->company()->id,
'purchase_order_id' => $this->entity_obj->id,
'vendor_contact_id' => $contact->id,
]);
}
if($vendor)
{
if ($vendor) {
$this->entity_obj->setRelation('invitations', $invitation);
$this->entity_obj->setRelation('vendor', $vendor);
@ -362,10 +355,7 @@ class TemplateEngine
$this->entity_obj->load('vendor');
$vendor->setRelation('company', auth()->user()->company());
$vendor->load('company');
}
else
{
} else {
$this->entity_obj->setRelation('invitations', $invitation);
$this->entity_obj->setRelation('client', $client);
$this->entity_obj->setRelation('company', auth()->user()->company());

View File

@ -88,7 +88,7 @@
"symfony/mailgun-mailer": "^6.1",
"symfony/postmark-mailer": "^6.1",
"tijsverkoyen/css-to-inline-styles": "^2.2",
"turbo124/beacon": "^1.2",
"turbo124/beacon": "^1.3",
"twilio/sdk": "^6.40",
"webpatser/laravel-countries": "dev-master#75992ad",
"wepay/php-sdk": "^0.3"

244
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "68269627da68ba8ad674df71001d16ea",
"content-hash": "8d9b065d1cf3f4fd42565e77e63c53fc",
"packages": [
{
"name": "afosto/yaac",
@ -378,16 +378,16 @@
},
{
"name": "aws/aws-sdk-php",
"version": "3.235.1",
"version": "3.235.3",
"source": {
"type": "git",
"url": "https://github.com/aws/aws-sdk-php.git",
"reference": "2025db05c7dd22ae414857dadd49207f64c2fc74"
"reference": "d14bf468240f5bd8a0754b8a8248ff219ebada02"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/2025db05c7dd22ae414857dadd49207f64c2fc74",
"reference": "2025db05c7dd22ae414857dadd49207f64c2fc74",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/d14bf468240f5bd8a0754b8a8248ff219ebada02",
"reference": "d14bf468240f5bd8a0754b8a8248ff219ebada02",
"shasum": ""
},
"require": {
@ -464,9 +464,9 @@
"support": {
"forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
"issues": "https://github.com/aws/aws-sdk-php/issues",
"source": "https://github.com/aws/aws-sdk-php/tree/3.235.1"
"source": "https://github.com/aws/aws-sdk-php/tree/3.235.3"
},
"time": "2022-09-02T18:18:19+00:00"
"time": "2022-09-07T18:17:39+00:00"
},
{
"name": "bacon/bacon-qr-code",
@ -1165,16 +1165,16 @@
},
{
"name": "doctrine/dbal",
"version": "3.4.3",
"version": "3.4.4",
"source": {
"type": "git",
"url": "https://github.com/doctrine/dbal.git",
"reference": "a24b89d663d8f261199bc0a91c48016042ebda85"
"reference": "4cbbe6e4b9ef6c69d5f4c968c637476f47bb54f5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/dbal/zipball/a24b89d663d8f261199bc0a91c48016042ebda85",
"reference": "a24b89d663d8f261199bc0a91c48016042ebda85",
"url": "https://api.github.com/repos/doctrine/dbal/zipball/4cbbe6e4b9ef6c69d5f4c968c637476f47bb54f5",
"reference": "4cbbe6e4b9ef6c69d5f4c968c637476f47bb54f5",
"shasum": ""
},
"require": {
@ -1189,14 +1189,14 @@
"require-dev": {
"doctrine/coding-standard": "10.0.0",
"jetbrains/phpstorm-stubs": "2022.2",
"phpstan/phpstan": "1.8.2",
"phpstan/phpstan": "1.8.3",
"phpstan/phpstan-strict-rules": "^1.3",
"phpunit/phpunit": "9.5.21",
"phpunit/phpunit": "9.5.24",
"psalm/plugin-phpunit": "0.17.0",
"squizlabs/php_codesniffer": "3.7.1",
"symfony/cache": "^5.4|^6.0",
"symfony/console": "^4.4|^5.4|^6.0",
"vimeo/psalm": "4.24.0"
"vimeo/psalm": "4.27.0"
},
"suggest": {
"symfony/console": "For helpful console commands such as SQL execution and import of files."
@ -1256,7 +1256,7 @@
],
"support": {
"issues": "https://github.com/doctrine/dbal/issues",
"source": "https://github.com/doctrine/dbal/tree/3.4.3"
"source": "https://github.com/doctrine/dbal/tree/3.4.4"
},
"funding": [
{
@ -1272,7 +1272,7 @@
"type": "tidelift"
}
],
"time": "2022-08-28T17:26:36+00:00"
"time": "2022-09-01T21:26:42+00:00"
},
{
"name": "doctrine/deprecations",
@ -1410,28 +1410,28 @@
},
{
"name": "doctrine/inflector",
"version": "2.0.4",
"version": "2.0.5",
"source": {
"type": "git",
"url": "https://github.com/doctrine/inflector.git",
"reference": "8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89"
"reference": "ade2b3bbfb776f27f0558e26eed43b5d9fe1b392"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/inflector/zipball/8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89",
"reference": "8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89",
"url": "https://api.github.com/repos/doctrine/inflector/zipball/ade2b3bbfb776f27f0558e26eed43b5d9fe1b392",
"reference": "ade2b3bbfb776f27f0558e26eed43b5d9fe1b392",
"shasum": ""
},
"require": {
"php": "^7.2 || ^8.0"
},
"require-dev": {
"doctrine/coding-standard": "^8.2",
"phpstan/phpstan": "^0.12",
"phpstan/phpstan-phpunit": "^0.12",
"phpstan/phpstan-strict-rules": "^0.12",
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0",
"vimeo/psalm": "^4.10"
"doctrine/coding-standard": "^9",
"phpstan/phpstan": "^1.8",
"phpstan/phpstan-phpunit": "^1.1",
"phpstan/phpstan-strict-rules": "^1.3",
"phpunit/phpunit": "^8.5 || ^9.5",
"vimeo/psalm": "^4.25"
},
"type": "library",
"autoload": {
@ -1481,7 +1481,7 @@
],
"support": {
"issues": "https://github.com/doctrine/inflector/issues",
"source": "https://github.com/doctrine/inflector/tree/2.0.4"
"source": "https://github.com/doctrine/inflector/tree/2.0.5"
},
"funding": [
{
@ -1497,7 +1497,7 @@
"type": "tidelift"
}
],
"time": "2021-10-22T20:16:43+00:00"
"time": "2022-09-07T09:01:28+00:00"
},
{
"name": "doctrine/lexer",
@ -3481,16 +3481,16 @@
},
{
"name": "laravel/framework",
"version": "v9.27.0",
"version": "v9.28.0",
"source": {
"type": "git",
"url": "https://github.com/laravel/framework.git",
"reference": "27572f45120fd3977d92651a71d8c711a9aaa790"
"reference": "396a89e1f3654123d1c7f56306051212e5c75bc0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/27572f45120fd3977d92651a71d8c711a9aaa790",
"reference": "27572f45120fd3977d92651a71d8c711a9aaa790",
"url": "https://api.github.com/repos/laravel/framework/zipball/396a89e1f3654123d1c7f56306051212e5c75bc0",
"reference": "396a89e1f3654123d1c7f56306051212e5c75bc0",
"shasum": ""
},
"require": {
@ -3657,7 +3657,7 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
"time": "2022-08-30T13:34:43+00:00"
"time": "2022-09-06T14:57:01+00:00"
},
{
"name": "laravel/serializable-closure",
@ -6812,16 +6812,16 @@
},
{
"name": "phpseclib/phpseclib",
"version": "3.0.15",
"version": "3.0.16",
"source": {
"type": "git",
"url": "https://github.com/phpseclib/phpseclib.git",
"reference": "c96e250238e88bf1040e9f7715efab1d6bc7f622"
"reference": "7181378909ed8890be4db53d289faac5b77f8b05"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/c96e250238e88bf1040e9f7715efab1d6bc7f622",
"reference": "c96e250238e88bf1040e9f7715efab1d6bc7f622",
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/7181378909ed8890be4db53d289faac5b77f8b05",
"reference": "7181378909ed8890be4db53d289faac5b77f8b05",
"shasum": ""
},
"require": {
@ -6902,7 +6902,7 @@
],
"support": {
"issues": "https://github.com/phpseclib/phpseclib/issues",
"source": "https://github.com/phpseclib/phpseclib/tree/3.0.15"
"source": "https://github.com/phpseclib/phpseclib/tree/3.0.16"
},
"funding": [
{
@ -6918,7 +6918,7 @@
"type": "tidelift"
}
],
"time": "2022-09-02T17:05:08+00:00"
"time": "2022-09-05T18:03:08+00:00"
},
{
"name": "pragmarx/google2fa",
@ -8073,16 +8073,16 @@
},
{
"name": "sentry/sentry",
"version": "3.7.0",
"version": "3.8.0",
"source": {
"type": "git",
"url": "https://github.com/getsentry/sentry-php.git",
"reference": "877bca3f0f0ac0fc8ec0a218c6070cccea266795"
"reference": "dc599ef4ac5459fef95cc0414d26ac47e300e1dc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/getsentry/sentry-php/zipball/877bca3f0f0ac0fc8ec0a218c6070cccea266795",
"reference": "877bca3f0f0ac0fc8ec0a218c6070cccea266795",
"url": "https://api.github.com/repos/getsentry/sentry-php/zipball/dc599ef4ac5459fef95cc0414d26ac47e300e1dc",
"reference": "dc599ef4ac5459fef95cc0414d26ac47e300e1dc",
"shasum": ""
},
"require": {
@ -8101,8 +8101,7 @@
"psr/http-message-implementation": "^1.0",
"psr/log": "^1.0|^2.0|^3.0",
"symfony/options-resolver": "^3.4.43|^4.4.30|^5.0.11|^6.0",
"symfony/polyfill-php80": "^1.17",
"symfony/polyfill-uuid": "^1.13.1"
"symfony/polyfill-php80": "^1.17"
},
"conflict": {
"php-http/client-common": "1.8.0",
@ -8128,7 +8127,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.7.x-dev"
"dev-master": "3.8.x-dev"
}
},
"autoload": {
@ -8162,7 +8161,7 @@
],
"support": {
"issues": "https://github.com/getsentry/sentry-php/issues",
"source": "https://github.com/getsentry/sentry-php/tree/3.7.0"
"source": "https://github.com/getsentry/sentry-php/tree/3.8.0"
},
"funding": [
{
@ -8174,7 +8173,7 @@
"type": "custom"
}
],
"time": "2022-07-18T07:55:36+00:00"
"time": "2022-09-05T14:25:47+00:00"
},
{
"name": "sentry/sentry-laravel",
@ -10919,88 +10918,6 @@
],
"time": "2022-05-24T11:49:31+00:00"
},
{
"name": "symfony/polyfill-uuid",
"version": "v1.26.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-uuid.git",
"reference": "a41886c1c81dc075a09c71fe6db5b9d68c79de23"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-uuid/zipball/a41886c1c81dc075a09c71fe6db5b9d68c79de23",
"reference": "a41886c1c81dc075a09c71fe6db5b9d68c79de23",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"provide": {
"ext-uuid": "*"
},
"suggest": {
"ext-uuid": "For best performance"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.26-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"files": [
"bootstrap.php"
],
"psr-4": {
"Symfony\\Polyfill\\Uuid\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Grégoire Pineau",
"email": "lyrixx@lyrixx.info"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill for uuid functions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"polyfill",
"portable",
"uuid"
],
"support": {
"source": "https://github.com/symfony/polyfill-uuid/tree/v1.26.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2022-05-24T11:49:31+00:00"
},
{
"name": "symfony/postmark-mailer",
"version": "v6.1.0",
@ -11299,16 +11216,16 @@
},
{
"name": "symfony/psr-http-message-bridge",
"version": "v2.1.2",
"version": "v2.1.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/psr-http-message-bridge.git",
"reference": "22b37c8a3f6b5d94e9cdbd88e1270d96e2f97b34"
"reference": "d444f85dddf65c7e57c58d8e5b3a4dbb593b1840"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/22b37c8a3f6b5d94e9cdbd88e1270d96e2f97b34",
"reference": "22b37c8a3f6b5d94e9cdbd88e1270d96e2f97b34",
"url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/d444f85dddf65c7e57c58d8e5b3a4dbb593b1840",
"reference": "d444f85dddf65c7e57c58d8e5b3a4dbb593b1840",
"shasum": ""
},
"require": {
@ -11367,7 +11284,7 @@
],
"support": {
"issues": "https://github.com/symfony/psr-http-message-bridge/issues",
"source": "https://github.com/symfony/psr-http-message-bridge/tree/v2.1.2"
"source": "https://github.com/symfony/psr-http-message-bridge/tree/v2.1.3"
},
"funding": [
{
@ -11383,7 +11300,7 @@
"type": "tidelift"
}
],
"time": "2021-11-05T13:13:39+00:00"
"time": "2022-09-05T10:34:54+00:00"
},
{
"name": "symfony/routing",
@ -12071,26 +11988,25 @@
},
{
"name": "turbo124/beacon",
"version": "v1.2.0",
"version": "v1.3.2",
"source": {
"type": "git",
"url": "https://github.com/turbo124/beacon.git",
"reference": "3e3bd337f91666ae793b6682ef40fd228aa6f185"
"reference": "e46e6122e28c2a7628ad40975bfd11a3ab883575"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/turbo124/beacon/zipball/3e3bd337f91666ae793b6682ef40fd228aa6f185",
"reference": "3e3bd337f91666ae793b6682ef40fd228aa6f185",
"url": "https://api.github.com/repos/turbo124/beacon/zipball/e46e6122e28c2a7628ad40975bfd11a3ab883575",
"reference": "e46e6122e28c2a7628ad40975bfd11a3ab883575",
"shasum": ""
},
"require": {
"guzzlehttp/guzzle": "^7",
"illuminate/support": "^6.0|^7.0|^8.0|^9.0",
"php": "^7.3|^7.4|^8"
"illuminate/support": "^9.0",
"php": "^8"
},
"require-dev": {
"orchestra/testbench": "^4.0",
"phpunit/phpunit": "^8.0"
"phpunit/phpunit": "^9.0"
},
"type": "library",
"extra": {
@ -12128,22 +12044,22 @@
"turbo124"
],
"support": {
"source": "https://github.com/turbo124/beacon/tree/v1.2.0"
"source": "https://github.com/turbo124/beacon/tree/v1.3.2"
},
"time": "2022-06-22T11:22:46+00:00"
"time": "2022-09-08T08:08:59+00:00"
},
{
"name": "twilio/sdk",
"version": "6.41.0",
"version": "6.42.0",
"source": {
"type": "git",
"url": "git@github.com:twilio/twilio-php.git",
"reference": "3e6b81216052aac086efd6334a0fc358c38c2e20"
"reference": "fff5abe683e7d51912ee782012684daa0959e45b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/twilio/twilio-php/zipball/3e6b81216052aac086efd6334a0fc358c38c2e20",
"reference": "3e6b81216052aac086efd6334a0fc358c38c2e20",
"url": "https://api.github.com/repos/twilio/twilio-php/zipball/fff5abe683e7d51912ee782012684daa0959e45b",
"reference": "fff5abe683e7d51912ee782012684daa0959e45b",
"shasum": ""
},
"require": {
@ -12179,7 +12095,7 @@
"sms",
"twilio"
],
"time": "2022-08-24T20:39:42+00:00"
"time": "2022-09-07T19:17:29+00:00"
},
{
"name": "vlucas/phpdotenv",
@ -13764,16 +13680,16 @@
},
{
"name": "maximebf/debugbar",
"version": "v1.18.0",
"version": "v1.18.1",
"source": {
"type": "git",
"url": "https://github.com/maximebf/php-debugbar.git",
"reference": "0d44b75f3b5d6d41ae83b79c7a4bceae7fbc78b6"
"reference": "ba0af68dd4316834701ecb30a00ce9604ced3ee9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/0d44b75f3b5d6d41ae83b79c7a4bceae7fbc78b6",
"reference": "0d44b75f3b5d6d41ae83b79c7a4bceae7fbc78b6",
"url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/ba0af68dd4316834701ecb30a00ce9604ced3ee9",
"reference": "ba0af68dd4316834701ecb30a00ce9604ced3ee9",
"shasum": ""
},
"require": {
@ -13793,7 +13709,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.17-dev"
"dev-master": "1.18-dev"
}
},
"autoload": {
@ -13824,22 +13740,22 @@
],
"support": {
"issues": "https://github.com/maximebf/php-debugbar/issues",
"source": "https://github.com/maximebf/php-debugbar/tree/v1.18.0"
"source": "https://github.com/maximebf/php-debugbar/tree/v1.18.1"
},
"time": "2021-12-27T18:49:48+00:00"
"time": "2022-03-31T14:55:54+00:00"
},
{
"name": "mockery/mockery",
"version": "1.5.0",
"version": "1.5.1",
"source": {
"type": "git",
"url": "https://github.com/mockery/mockery.git",
"reference": "c10a5f6e06fc2470ab1822fa13fa2a7380f8fbac"
"reference": "e92dcc83d5a51851baf5f5591d32cb2b16e3684e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/mockery/mockery/zipball/c10a5f6e06fc2470ab1822fa13fa2a7380f8fbac",
"reference": "c10a5f6e06fc2470ab1822fa13fa2a7380f8fbac",
"url": "https://api.github.com/repos/mockery/mockery/zipball/e92dcc83d5a51851baf5f5591d32cb2b16e3684e",
"reference": "e92dcc83d5a51851baf5f5591d32cb2b16e3684e",
"shasum": ""
},
"require": {
@ -13896,9 +13812,9 @@
],
"support": {
"issues": "https://github.com/mockery/mockery/issues",
"source": "https://github.com/mockery/mockery/tree/1.5.0"
"source": "https://github.com/mockery/mockery/tree/1.5.1"
},
"time": "2022-01-20T13:18:17+00:00"
"time": "2022-09-07T15:32:08+00:00"
},
{
"name": "myclabs/deep-copy",

View File

@ -14,8 +14,8 @@ return [
'require_https' => env('REQUIRE_HTTPS', true),
'app_url' => rtrim(env('APP_URL', ''), '/'),
'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
'app_version' => '5.5.20',
'app_tag' => '5.5.20',
'app_version' => '5.5.21',
'app_tag' => '5.5.21',
'minimum_client_version' => '5.0.16',
'terms_version' => '1.0.1',
'api_secret' => env('API_SECRET', ''),

View File

@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('companies', function (Blueprint $table) {
$table->boolean('report_include_deleted')->default(false);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('companies', function (Blueprint $table) {
//
});
}
};