|
|
@@ -393,7 +393,7 @@ Route::group(['middleware' => 'auth'],function(){
|
|
|
->leftJoin('receipts', 'records.id', '=', 'receipts.record_id')
|
|
|
->where('records.type', 'IN');
|
|
|
|
|
|
- $y = \App\Models\Record::select('records_rows.amount', 'records.member_id', 'records.corrispettivo_fiscale', 'records.deleted', 'records.financial_movement', 'records_rows.causal_id', \DB::raw('members.first_name as first_name'), \DB::raw('members.last_name as last_name')) // , \DB::raw('SUM(records.id) As total'))
|
|
|
+ $y = \App\Models\Record::select('records_rows.amount', 'records.member_id', 'records.corrispettivo_fiscale', 'records.deleted', 'records.financial_movement', 'records_rows.causal_id', 'records.payment_method_id', \DB::raw('members.first_name as first_name'), \DB::raw('members.last_name as last_name')) // , \DB::raw('SUM(records.id) As total'))
|
|
|
->leftJoin('members', 'records.member_id', '=', 'members.id')
|
|
|
->leftJoin('records_rows', 'records.id', '=', 'records_rows.record_id')
|
|
|
//->leftJoin('receipts', 'records.id', '=', 'receipts.record_id')
|
|
|
@@ -489,14 +489,14 @@ Route::group(['middleware' => 'auth'],function(){
|
|
|
if ($_GET["filterFrom"] != '')
|
|
|
{
|
|
|
$hasFilter = true;
|
|
|
- $x = $x->where('records.date', '>=', $_GET["filterFrom"]);
|
|
|
- $y = $y->where('date', '>=', $_GET["filterFrom"]);
|
|
|
+ $x = $x->where('records.date', '>=', $_GET["filterFrom"] . " 00:00:00");
|
|
|
+ $y = $y->where('records.date', '>=', $_GET["filterFrom"] . " 00:00:00");
|
|
|
}
|
|
|
if ($_GET["filterTo"] != '')
|
|
|
{
|
|
|
$hasFilter = true;
|
|
|
- $x = $x->where('records.date', '<=', $_GET["filterTo"]);
|
|
|
- $y = $y->where('date', '<=', $_GET["filterTo"]);
|
|
|
+ $x = $x->where('records.date', '<=', $_GET["filterTo"] . " 23:59:59");
|
|
|
+ $y = $y->where('records.date', '<=', $_GET["filterTo"] . " 23:59:59");
|
|
|
}
|
|
|
|
|
|
//});
|
|
|
@@ -592,7 +592,7 @@ Route::group(['middleware' => 'auth'],function(){
|
|
|
|
|
|
$datas[] = array(
|
|
|
//'id' => $r->id,
|
|
|
- 'date' => $r->date,
|
|
|
+ 'date' => date("y-m-d", strtotime($r->date)),
|
|
|
//'date' => $r->receipt_date != null ? $r->receipt_date : "",
|
|
|
'total' => formatPrice($r->getTotal()),
|
|
|
'first_name' => $r->first_name,
|
|
|
@@ -1452,7 +1452,7 @@ Route::group(['middleware' => 'auth'],function(){
|
|
|
'last_name' => $r->member->last_name,
|
|
|
'first_name' => $r->member->first_name,
|
|
|
'status' => $r->status,
|
|
|
- 'date' => date("d/m/Y", strtotime($r->date)),
|
|
|
+ 'date' => date("d/m/Y", strtotime($r->created_at)),
|
|
|
'totals' => formatPrice($r->rows->sum('amount')),
|
|
|
'action' => $ids
|
|
|
);
|