mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-23 06:24:03 +00:00
Merge branch 'dillon/34.8-jenkins-vapor' into vapor/production
This commit is contained in:
@@ -20,14 +20,10 @@ class ExportsCustomersWalletTransactionHistory implements FromQuery, WithHeading
|
||||
|
||||
private $request;
|
||||
private $runningBalance = 0;
|
||||
protected $startDate;
|
||||
protected $endDate;
|
||||
|
||||
public function __construct(Request $request, $startDate = null, $endDate = null)
|
||||
public function __construct(Request $request)
|
||||
{
|
||||
$this->request = $request;
|
||||
$this->startDate = $startDate ? Carbon::parse($startDate)->startOfDay() : Carbon::now()->subMonths(3);
|
||||
$this->endDate = $endDate ? Carbon::parse($endDate)->endOfDay() : Carbon::now();
|
||||
}
|
||||
|
||||
public function headings(): array
|
||||
@@ -47,7 +43,7 @@ class ExportsCustomersWalletTransactionHistory implements FromQuery, WithHeading
|
||||
public function query()
|
||||
{
|
||||
$company = Company::where('reference', $this->request->route('marking'))->first();
|
||||
$transactions = $company->wallets()->first()->transactions()->whereIn('transactions.status', [2, 3])->whereBetween('created_at', [$this->startDate, $this->endDate])->orderBy('id');
|
||||
$transactions = $company->wallets()->first()->transactions()->whereIn('transactions.status', [2, 3])->orderBy('id');
|
||||
// dd($transactions->get()->toArray());
|
||||
|
||||
return $transactions;
|
||||
|
||||
Reference in New Issue
Block a user