mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for quote queries
This commit is contained in:
parent
3da4c42f71
commit
f8a9220531
@ -87,6 +87,7 @@ class QuoteFilters extends QueryFilters
|
|||||||
if (in_array('expired', $status_parameters)) {
|
if (in_array('expired', $status_parameters)) {
|
||||||
$this->builder->orWhere(function ($query){
|
$this->builder->orWhere(function ($query){
|
||||||
$query->where('status_id', Quote::STATUS_SENT)
|
$query->where('status_id', Quote::STATUS_SENT)
|
||||||
|
->company()
|
||||||
->whereNotNull('due_date')
|
->whereNotNull('due_date')
|
||||||
->where('due_date', '<=', now()->toDateString());
|
->where('due_date', '<=', now()->toDateString());
|
||||||
});
|
});
|
||||||
@ -95,6 +96,7 @@ class QuoteFilters extends QueryFilters
|
|||||||
if (in_array('upcoming', $status_parameters)) {
|
if (in_array('upcoming', $status_parameters)) {
|
||||||
$this->builder->orWhere(function ($query){
|
$this->builder->orWhere(function ($query){
|
||||||
$query->where('status_id', Quote::STATUS_SENT)
|
$query->where('status_id', Quote::STATUS_SENT)
|
||||||
|
->company()
|
||||||
->where('due_date', '>=', now()->toDateString())
|
->where('due_date', '>=', now()->toDateString())
|
||||||
->orderBy('due_date', 'DESC');
|
->orderBy('due_date', 'DESC');
|
||||||
});
|
});
|
||||||
|
@ -90,9 +90,7 @@ trait Utilities
|
|||||||
nlog("checkout failure");
|
nlog("checkout failure");
|
||||||
nlog($_payment);
|
nlog($_payment);
|
||||||
|
|
||||||
if (is_array($_payment) && array_key_exists('actions', $_payment) && array_key_exists('response_summary', end($_payment['actions']))) {
|
if (is_array($_payment) && array_key_exists('status', $_payment)) {
|
||||||
$error_message = end($_payment['actions'])['response_summary'];
|
|
||||||
} elseif (is_array($_payment) && array_key_exists('status', $_payment)) {
|
|
||||||
$error_message = $_payment['status'];
|
$error_message = $_payment['status'];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -34,15 +34,7 @@ class BankMatchingService implements ShouldQueue, ShouldBeUnique
|
|||||||
{
|
{
|
||||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||||
|
|
||||||
protected $company_id;
|
public function __construct(public $company_id, public $db){}
|
||||||
|
|
||||||
protected $db;
|
|
||||||
|
|
||||||
public function __construct($company_id, $db)
|
|
||||||
{
|
|
||||||
$this->company_id = $company_id;
|
|
||||||
$this->db = $db;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function handle() :void
|
public function handle() :void
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user