fix laporan
This commit is contained in:
@@ -106,4 +106,17 @@ class HargaEmasController extends Controller
|
||||
}
|
||||
return response()->json($hargaemas);
|
||||
}
|
||||
|
||||
public function laporanhargaemas(Request $request)
|
||||
{
|
||||
$rekod = HistoryEmasSandaran::on('mysql7')
|
||||
->where('t_efektif','>=',$request->mula)
|
||||
->where('t_efektif','<=',$request->hingga)
|
||||
->orderBy('t_efektif','desc')
|
||||
->orderBy('m_efektif','desc')
|
||||
->get();
|
||||
|
||||
return response()->json($rekod);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -19,6 +19,7 @@ use App\Denominasi;
|
||||
use App\HapusKira;
|
||||
use App\GlCode;
|
||||
use App\GlDetail;
|
||||
use App\Audit;
|
||||
use Carbon\Carbon;
|
||||
|
||||
class LaporanController extends Controller
|
||||
@@ -805,4 +806,22 @@ class LaporanController extends Controller
|
||||
return response()->json($arrayxtra);
|
||||
}
|
||||
|
||||
public function LaporanAuditTrail(Request $request)
|
||||
{
|
||||
$atarray = array();
|
||||
$audittrail = Audit::on('mysql7')
|
||||
->where('kodcaw','=',$request->kodcaw)
|
||||
->whereDate('created_at','=',$request->tarikh)
|
||||
->get();
|
||||
|
||||
foreach($audittrail as $index=>$at)
|
||||
{
|
||||
$atz = json_decode($at['new_data']);
|
||||
|
||||
dd($atz);
|
||||
}
|
||||
|
||||
return response()->json($audittrail);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -667,6 +667,21 @@ class VaultController extends Controller
|
||||
return response()->json($arraypend);
|
||||
}
|
||||
|
||||
public function laporanPetiBesiRange($kodcaw,Request $request)
|
||||
{
|
||||
$current = Carbon::now();
|
||||
$current = new Carbon();
|
||||
|
||||
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$kodcaw)->first();
|
||||
$vault=Vault::on($cawangan['mysql'])
|
||||
->where('kodcaw','=',$kodcaw)
|
||||
->where('tarikh','>=', $request->mula)
|
||||
->where('tarikh','<=', $request->hingga)
|
||||
->orderby('tarikh','desc')->get();
|
||||
|
||||
return response()->json($vault);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user