mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-09-24 10:21:35 +02:00
commit
a537c1d319
1
.github/workflows/phpunit.yml
vendored
1
.github/workflows/phpunit.yml
vendored
@ -103,6 +103,7 @@ jobs:
|
|||||||
- name: Run Testsuite
|
- name: Run Testsuite
|
||||||
run: |
|
run: |
|
||||||
cat .env
|
cat .env
|
||||||
|
vendor/bin/snappdf download
|
||||||
vendor/bin/phpunit --testdox
|
vendor/bin/phpunit --testdox
|
||||||
env:
|
env:
|
||||||
DB_PORT: ${{ job.services.mysql.ports[3306] }}
|
DB_PORT: ${{ job.services.mysql.ports[3306] }}
|
||||||
|
@ -1 +1 @@
|
|||||||
5.5.13
|
5.5.14
|
@ -20,7 +20,6 @@ use Livewire\WithPagination;
|
|||||||
|
|
||||||
class QuotesTable extends Component
|
class QuotesTable extends Component
|
||||||
{
|
{
|
||||||
use WithSorting;
|
|
||||||
use WithPagination;
|
use WithPagination;
|
||||||
|
|
||||||
public $per_page = 10;
|
public $per_page = 10;
|
||||||
@ -29,6 +28,19 @@ class QuotesTable extends Component
|
|||||||
|
|
||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
|
public $sort_field = 'status_id'; // Default sortBy. Feel free to change or pull from client/company settings.
|
||||||
|
|
||||||
|
public $sort_asc = true;
|
||||||
|
|
||||||
|
public function sortBy($field)
|
||||||
|
{
|
||||||
|
$this->sort_field === $field
|
||||||
|
? $this->sort_asc = ! $this->sort_asc
|
||||||
|
: $this->sort_asc = true;
|
||||||
|
|
||||||
|
$this->sort_field = $field;
|
||||||
|
}
|
||||||
|
|
||||||
public function mount()
|
public function mount()
|
||||||
{
|
{
|
||||||
MultiDB::setDb($this->company->db);
|
MultiDB::setDb($this->company->db);
|
||||||
@ -36,6 +48,7 @@ class QuotesTable extends Component
|
|||||||
|
|
||||||
public function render()
|
public function render()
|
||||||
{
|
{
|
||||||
|
|
||||||
$query = Quote::query()
|
$query = Quote::query()
|
||||||
->with('client.gateway_tokens', 'company', 'client.contacts')
|
->with('client.gateway_tokens', 'company', 'client.contacts')
|
||||||
->orderBy($this->sort_field, $this->sort_asc ? 'asc' : 'desc');
|
->orderBy($this->sort_field, $this->sort_asc ? 'asc' : 'desc');
|
||||||
@ -44,7 +57,6 @@ class QuotesTable extends Component
|
|||||||
|
|
||||||
/* Special filter for expired*/
|
/* Special filter for expired*/
|
||||||
if (in_array('-1', $this->status)) {
|
if (in_array('-1', $this->status)) {
|
||||||
// $query->whereDate('due_date', '<=', now()->startOfDay());
|
|
||||||
|
|
||||||
$query->where(function ($query) {
|
$query->where(function ($query) {
|
||||||
$query->whereDate('due_date', '<=', now()->startOfDay())
|
$query->whereDate('due_date', '<=', now()->startOfDay())
|
||||||
@ -69,10 +81,6 @@ class QuotesTable extends Component
|
|||||||
->where('company_id', $this->company->id)
|
->where('company_id', $this->company->id)
|
||||||
->where('client_id', auth()->guard('contact')->user()->client->id)
|
->where('client_id', auth()->guard('contact')->user()->client->id)
|
||||||
->where('status_id', '<>', Quote::STATUS_DRAFT)
|
->where('status_id', '<>', Quote::STATUS_DRAFT)
|
||||||
// ->where(function ($query){
|
|
||||||
// $query->whereDate('due_date', '>=', now())
|
|
||||||
// ->orWhereNull('due_date');
|
|
||||||
// })
|
|
||||||
->where('is_deleted', 0)
|
->where('is_deleted', 0)
|
||||||
->withTrashed()
|
->withTrashed()
|
||||||
->paginate($this->per_page);
|
->paginate($this->per_page);
|
||||||
|
@ -17,6 +17,7 @@ use App\Models\InvoiceInvitation;
|
|||||||
use App\Models\PurchaseOrderInvitation;
|
use App\Models\PurchaseOrderInvitation;
|
||||||
use App\Models\QuoteInvitation;
|
use App\Models\QuoteInvitation;
|
||||||
use App\Models\RecurringInvoiceInvitation;
|
use App\Models\RecurringInvoiceInvitation;
|
||||||
|
use App\Utils\Ninja;
|
||||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
use Illuminate\Mail\Events\MessageSent;
|
use Illuminate\Mail\Events\MessageSent;
|
||||||
use Illuminate\Support\Facades\Notification;
|
use Illuminate\Support\Facades\Notification;
|
||||||
@ -41,7 +42,9 @@ class MailSentListener implements ShouldQueue
|
|||||||
*/
|
*/
|
||||||
public function handle(MessageSent $event)
|
public function handle(MessageSent $event)
|
||||||
{
|
{
|
||||||
|
if(!Ninja::isHosted());
|
||||||
|
return;
|
||||||
|
|
||||||
$message_id = $event->sent->getMessageId();
|
$message_id = $event->sent->getMessageId();
|
||||||
|
|
||||||
$message = MessageConverter::toEmail($event->sent->getOriginalMessage());
|
$message = MessageConverter::toEmail($event->sent->getOriginalMessage());
|
||||||
|
@ -33,7 +33,7 @@ class Account extends BaseModel
|
|||||||
use PresentableTrait;
|
use PresentableTrait;
|
||||||
use MakesHash;
|
use MakesHash;
|
||||||
|
|
||||||
private $free_plan_email_quota = 50;
|
private $free_plan_email_quota = 20;
|
||||||
|
|
||||||
private $paid_plan_email_quota = 500;
|
private $paid_plan_email_quota = 500;
|
||||||
/**
|
/**
|
||||||
@ -390,11 +390,11 @@ class Account extends BaseModel
|
|||||||
|
|
||||||
if($this->isPaid()){
|
if($this->isPaid()){
|
||||||
$limit = $this->paid_plan_email_quota;
|
$limit = $this->paid_plan_email_quota;
|
||||||
$limit += Carbon::createFromTimestamp($this->created_at)->diffInMonths() * 100;
|
$limit += Carbon::createFromTimestamp($this->created_at)->diffInMonths() * 50;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$limit = $this->free_plan_email_quota;
|
$limit = $this->free_plan_email_quota;
|
||||||
$limit += Carbon::createFromTimestamp($this->created_at)->diffInMonths() * 50;
|
$limit += Carbon::createFromTimestamp($this->created_at)->diffInMonths() * 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
return min($limit, 5000);
|
return min($limit, 5000);
|
||||||
|
@ -14,8 +14,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' => '5.5.13',
|
'app_version' => '5.5.14',
|
||||||
'app_tag' => '5.5.13',
|
'app_tag' => '5.5.14',
|
||||||
'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', ''),
|
'api_secret' => env('API_SECRET', ''),
|
||||||
|
Loading…
Reference in New Issue
Block a user