diff --git a/VERSION.txt b/VERSION.txt index 0403edcfe884..b01dcc14f856 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -5.4.10 \ No newline at end of file +5.4.11 \ No newline at end of file diff --git a/app/Listeners/Invoice/InvoiceArchivedActivity.php b/app/Listeners/Invoice/InvoiceArchivedActivity.php index 785983123fbf..5118ac5a29c9 100644 --- a/app/Listeners/Invoice/InvoiceArchivedActivity.php +++ b/app/Listeners/Invoice/InvoiceArchivedActivity.php @@ -21,7 +21,7 @@ class InvoiceArchivedActivity implements ShouldQueue { protected $activity_repo; - public $delay = 5; + public $delay = 15; /** * Create the event listener. diff --git a/app/Listeners/Invoice/InvoicePaidActivity.php b/app/Listeners/Invoice/InvoicePaidActivity.php index ec162331cbc2..040b12317a1c 100644 --- a/app/Listeners/Invoice/InvoicePaidActivity.php +++ b/app/Listeners/Invoice/InvoicePaidActivity.php @@ -21,7 +21,7 @@ class InvoicePaidActivity implements ShouldQueue { protected $activity_repo; - public $delay = 5; + public $delay = 10; /** * Create the event listener. diff --git a/app/Models/Task.php b/app/Models/Task.php index 1829b5011c97..0693eb0041c7 100644 --- a/app/Models/Task.php +++ b/app/Models/Task.php @@ -71,22 +71,22 @@ class Task extends BaseModel public function client() { - return $this->belongsTo(Client::class); + return $this->belongsTo(Client::class)->withTrashed(); } public function status() { - return $this->belongsTo(TaskStatus::class); + return $this->belongsTo(TaskStatus::class)->withTrashed(); } public function invoice() { - return $this->belongsTo(Invoice::class); + return $this->belongsTo(Invoice::class)->withTrashed(); } public function project() { - return $this->belongsTo(Project::class); + return $this->belongsTo(Project::class)->withTrashed(); } diff --git a/app/Services/Invoice/InvoiceService.php b/app/Services/Invoice/InvoiceService.php index 234392313b31..6da6423975b5 100644 --- a/app/Services/Invoice/InvoiceService.php +++ b/app/Services/Invoice/InvoiceService.php @@ -310,6 +310,9 @@ class InvoiceService elseif ($this->invoice->balance > 0 && $this->invoice->balance < $this->invoice->amount) { $this->invoice->status_id = Invoice::STATUS_PARTIAL; } + elseif ($this->invoice->balance < 0) { + $this->invoice->status_id = Invoice::STATUS_SENT; + } return $this; } diff --git a/app/Utils/Traits/ClientGroupSettingsSaver.php b/app/Utils/Traits/ClientGroupSettingsSaver.php index 985e0b69b30c..7d819d754ef6 100644 --- a/app/Utils/Traits/ClientGroupSettingsSaver.php +++ b/app/Utils/Traits/ClientGroupSettingsSaver.php @@ -89,8 +89,9 @@ trait ClientGroupSettingsSaver if(property_exists($settings, 'translations')) unset($settings->translations); + //18-07-2022 removed || empty($settings->{$key}) from this check to allow "0" values to persist foreach ($settings as $key => $value) { - if (! isset($settings->{$key}) || empty($settings->{$key}) || (! is_object($settings->{$key}) && strlen($settings->{$key}) == 0)) { + if (! isset($settings->{$key}) || (! is_object($settings->{$key}) && strlen($settings->{$key}) == 0)) { unset($settings->{$key}); } } diff --git a/config/ninja.php b/config/ninja.php index ebab634dc8e3..d51e80987306 100644 --- a/config/ninja.php +++ b/config/ninja.php @@ -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.4.10', - 'app_tag' => '5.4.10', + 'app_version' => '5.4.11', + 'app_tag' => '5.4.11', 'minimum_client_version' => '5.0.16', 'terms_version' => '1.0.1', 'api_secret' => env('API_SECRET', ''),