fix skit2
This commit is contained in:
@@ -37,14 +37,11 @@ class GlejerController extends Controller
|
||||
public function Getglejer_Data($tarikh1,$tarikh2,$kodcaw)
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$kodcaw)->first();
|
||||
$glejer=Glejer::on($cawangan['mysql'])->whereBetween('tarikh',[$tarikh1,$tarikh2])->orderBy('glcode','ASC')->get();
|
||||
return response()->json($glejer);
|
||||
|
||||
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$kodcaw)->first();
|
||||
$db=$cawangan['mysql'];
|
||||
|
||||
$glejer=DB::connection($db)->select("SELECT glcode, descpt , SUM(debit)AS total_debit, SUM(kredit) AS total_kredit, SUM(hariini) AS totalharini FROM glejer where tarikh BETWEEN '".$tarikh1."' and '".$tarikh2."' GROUP BY glcode,descpt ORDER BY glcode asc");
|
||||
return response()->json($glejer);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user