fix gitlab tests
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Models\BaseModel;
|
||||
|
||||
class PaymentNotificationLog extends BaseModel
|
||||
{
|
||||
protected $table = 'payment_notification_logs';
|
||||
@@ -29,14 +31,14 @@ class PaymentNotificationLog extends BaseModel
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'parent_id' => 'integer',
|
||||
'invoice_id' => 'integer',
|
||||
'period_year' => 'integer',
|
||||
'period_month' => 'integer',
|
||||
'head_fa_notified' => 'boolean',
|
||||
'balance_snapshot' => 'decimal:2', // adjust precision if needed
|
||||
'created_at' => 'datetime',
|
||||
'sent_at' => 'datetime',
|
||||
'parent_id' => 'integer',
|
||||
'invoice_id' => 'integer',
|
||||
'period_year' => 'integer',
|
||||
'period_month' => 'integer',
|
||||
'head_fa_notified' => 'boolean',
|
||||
'balance_snapshot' => 'decimal:2', // adjust precision if needed
|
||||
'created_at' => 'datetime',
|
||||
'sent_at' => 'datetime',
|
||||
];
|
||||
|
||||
/* Optional relationships */
|
||||
@@ -71,16 +73,16 @@ class PaymentNotificationLog extends BaseModel
|
||||
{
|
||||
$q = static::query()->orderByDesc('sent_at');
|
||||
|
||||
if (! empty($from)) {
|
||||
if (!empty($from)) {
|
||||
$q->where('sent_at', '>=', $from);
|
||||
}
|
||||
if (! empty($to)) {
|
||||
if (!empty($to)) {
|
||||
$q->where('sent_at', '<=', $to);
|
||||
}
|
||||
if (! empty($type)) {
|
||||
if (!empty($type)) {
|
||||
$q->where('type', $type);
|
||||
}
|
||||
|
||||
return $q->get()->toArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user