cancelled_at
This commit is contained in:
parent
d6cf667c96
commit
ff6241d13c
@ -173,13 +173,13 @@ trait OrderCardConcern
|
||||
switch ($conditions['card_status']) {
|
||||
case 0:
|
||||
$this->model = $this->model->whereNull('service_start_at')->whereHas('card', function ($relation) {
|
||||
$relation->whereNull('cancelled_at');
|
||||
$relation->whereNull('cancelled_at')->where('cancelled_at', "<", date('Y-m-d H:i:s'));
|
||||
})->where('created_at', '<', Carbon::now()->subMonths(6));
|
||||
break;
|
||||
|
||||
case 1:
|
||||
$this->model = $this->model->whereNull('service_start_at')->whereHas('card', function ($relation) {
|
||||
$relation->whereNull('cancelled_at');
|
||||
$relation->whereNull('cancelled_at')->where('cancelled_at', "<", date('Y-m-d H:i:s'));
|
||||
})->where('created_at', '>=', Carbon::now()->subMonths(6));
|
||||
break;
|
||||
|
||||
@ -189,7 +189,7 @@ trait OrderCardConcern
|
||||
$this->model = $this->model->whereNotNull('service_start_at')
|
||||
->groupBy('sim')->havingRaw($havingRaw)
|
||||
->whereHas('card', function ($relation) {
|
||||
$relation->whereNull('cancelled_at');
|
||||
$relation->whereNull('cancelled_at')->where('cancelled_at', "<", date('Y-m-d H:i:s'));
|
||||
});
|
||||
break;
|
||||
|
||||
@ -199,13 +199,13 @@ trait OrderCardConcern
|
||||
$this->model = $this->model->whereNotNull('service_start_at')
|
||||
->groupBy('sim')->havingRaw($havingRaw)
|
||||
->whereHas('card', function ($relation) {
|
||||
$relation->whereNull('cancelled_at');
|
||||
$relation->whereNull('cancelled_at')->where('cancelled_at', "<", date('Y-m-d H:i:s'));
|
||||
});
|
||||
break;
|
||||
|
||||
case 4:
|
||||
$this->model = $this->model->whereHas('card', function ($relation) {
|
||||
$relation->whereNotNull('cancelled_at');
|
||||
$relation->where('cancelled_at', ">=", date('Y-m-d H:i:s'));
|
||||
});
|
||||
break;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user