diff --git a/app/Filters/QuoteFilters.php b/app/Filters/QuoteFilters.php index 517479aa121d..2f342c4413f6 100644 --- a/app/Filters/QuoteFilters.php +++ b/app/Filters/QuoteFilters.php @@ -87,6 +87,7 @@ class QuoteFilters extends QueryFilters if (in_array('expired', $status_parameters)) { $this->builder->orWhere(function ($query){ $query->where('status_id', Quote::STATUS_SENT) + ->company() ->whereNotNull('due_date') ->where('due_date', '<=', now()->toDateString()); }); @@ -95,6 +96,7 @@ class QuoteFilters extends QueryFilters if (in_array('upcoming', $status_parameters)) { $this->builder->orWhere(function ($query){ $query->where('status_id', Quote::STATUS_SENT) + ->company() ->where('due_date', '>=', now()->toDateString()) ->orderBy('due_date', 'DESC'); }); diff --git a/app/PaymentDrivers/CheckoutCom/Utilities.php b/app/PaymentDrivers/CheckoutCom/Utilities.php index 7ac9601d5d60..2407c1c395cb 100644 --- a/app/PaymentDrivers/CheckoutCom/Utilities.php +++ b/app/PaymentDrivers/CheckoutCom/Utilities.php @@ -90,9 +90,7 @@ trait Utilities nlog("checkout failure"); nlog($_payment); - if (is_array($_payment) && array_key_exists('actions', $_payment) && array_key_exists('response_summary', end($_payment['actions']))) { - $error_message = end($_payment['actions'])['response_summary']; - } elseif (is_array($_payment) && array_key_exists('status', $_payment)) { + if (is_array($_payment) && array_key_exists('status', $_payment)) { $error_message = $_payment['status']; } else { diff --git a/app/Services/Bank/BankMatchingService.php b/app/Services/Bank/BankMatchingService.php index 963e669aef6c..6abf9a9c11cf 100644 --- a/app/Services/Bank/BankMatchingService.php +++ b/app/Services/Bank/BankMatchingService.php @@ -34,15 +34,7 @@ class BankMatchingService implements ShouldQueue, ShouldBeUnique { use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; - protected $company_id; - - protected $db; - - public function __construct($company_id, $db) - { - $this->company_id = $company_id; - $this->db = $db; - } + public function __construct(public $company_id, public $db){} public function handle() :void {