update
This commit is contained in:
@@ -12,10 +12,6 @@ use Illuminate\Support\Facades\DB;
|
||||
use Carbon\Carbon;
|
||||
class GlejerController extends Controller
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
public function getGlejer($kodcaw, Request $request)
|
||||
{
|
||||
$current = Carbon::now();
|
||||
@@ -27,13 +23,6 @@ class GlejerController extends Controller
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public function Getglejer_Data($tarikh1,$tarikh2,$kodcaw)
|
||||
{
|
||||
|
||||
@@ -68,122 +57,55 @@ class GlejerController extends Controller
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public function getSemalam_Glejer($kodcaw, Request $request)
|
||||
{
|
||||
|
||||
|
||||
public function getSemalam_Glejer($kodcaw, Request $request){
|
||||
|
||||
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$kodcaw)->first();
|
||||
$glejer=Glejer::on($cawangan['mysql'])->where('glcode','=',$request->glcode)->orderBy('tarikh','DESC')->limit(1)->get();
|
||||
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$kodcaw)->first();
|
||||
$glejer=Glejer::on($cawangan['mysql'])->where('glcode','=',$request->glcode)->orderBy('tarikh','DESC')->limit(1)->get();
|
||||
|
||||
return response()->json($glejer);
|
||||
return response()->json($glejer);
|
||||
}
|
||||
|
||||
public function Create_Glejer($kodcaw,Request $request){
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public function Create_Glejer($kodcaw,Request $request)
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
$current = Carbon::now();
|
||||
$current = new Carbon();
|
||||
$current = Carbon::now();
|
||||
$current = new Carbon();
|
||||
|
||||
|
||||
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$kodcaw)->first();
|
||||
$glejer=Glejer::on($cawangan['mysql'])->create([
|
||||
// 'tarikh' => $current->toDateString(),
|
||||
'kodcaw'=> $request->kodcaw,
|
||||
'tarikh'=>$current->toDateString(),
|
||||
'glcode'=>$request->glcode,
|
||||
'descpt'=>$request->descpt,
|
||||
'debit'=>$request->debit,
|
||||
'kredit'=>$request->kredit,
|
||||
'hariini'=>$request->hariini,
|
||||
'kelmarin'=>$request->kelmarin,
|
||||
'jumlah'=>$request->jumlah,
|
||||
'bulanini'=>$request->bulanini,
|
||||
'tahunini'=>$request->tahunini,
|
||||
'acttype'=>$request->acttype
|
||||
]);
|
||||
|
||||
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$kodcaw)->first();
|
||||
$glejer=Glejer::on($cawangan['mysql'])->create([
|
||||
|
||||
// 'tarikh' => $current->toDateString(),
|
||||
'kodcaw'=> $request->kodcaw,
|
||||
'tarikh'=>$current->toDateString(),
|
||||
'glcode'=>$request->glcode,
|
||||
'descpt'=>$request->descpt,
|
||||
'debit'=>$request->debit,
|
||||
'kredit'=>$request->kredit,
|
||||
'hariini'=>$request->hariini,
|
||||
'kelmarin'=>$request->kelmarin,
|
||||
'jumlah'=>$request->jumlah,
|
||||
'bulanini'=>$request->bulanini,
|
||||
'tahunini'=>$request->tahunini,
|
||||
'acttype'=>$request->acttype
|
||||
|
||||
]);
|
||||
|
||||
return response()->json($glejer,201);
|
||||
return response()->json($glejer,201);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function carianBulananTahun_glejer($kodcaw,Request $request)
|
||||
{
|
||||
|
||||
$current = Carbon::now();
|
||||
$current = new Carbon();
|
||||
$yr = Carbon::now()->format('Y');
|
||||
$month= Carbon::now()->format('m');
|
||||
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$kodcaw)->first();
|
||||
|
||||
$glejerMy=Glejer::on ($cawangan['mysql'])->whereYear('tarikh','=',$yr)->whereMonth('tarikh', '=',$month)->where('glcode', '=',$request->glcode)->
|
||||
orderBy('tarikh','ASC')->get();
|
||||
return response()->json($glejerMy);
|
||||
|
||||
$glejerMy=Glejer::on ($cawangan['mysql'])->whereYear('tarikh','=',$yr)->whereMonth('tarikh', '=',$month)->where('glcode', '=',$request->glcode)->
|
||||
orderBy('tarikh','ASC')->get();
|
||||
return response()->json($glejerMy);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*public function updateRequestTeller($kodcaw,Request $request)
|
||||
{
|
||||
$requestteller = RequestTeller::on('mysql7')->
|
||||
where([['no','=',$request->no],['kodcaw','=',$kodcaw],['kodlaluan','=',$request->kodlaluan],['update','=',0]])
|
||||
->update(array(
|
||||
|
||||
'update' => 1
|
||||
|
||||
) );
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public function Kemaskini_Glejer($kodcaw, Request $request)
|
||||
{
|
||||
|
||||
@@ -199,30 +121,21 @@ class GlejerController extends Controller
|
||||
'hariini'=>$request->hariini,
|
||||
'kelmarin'=>$request->kelmarin
|
||||
|
||||
) );
|
||||
));
|
||||
|
||||
return response()->json($updateGLejer,200);
|
||||
|
||||
|
||||
return response()->json($updateGLejer,200);
|
||||
}
|
||||
|
||||
public function carianTahun_glejer($kodcaw,Request $request)
|
||||
{
|
||||
|
||||
|
||||
|
||||
$current = Carbon::now();
|
||||
$current = new Carbon();
|
||||
$yr = Carbon::now()->format('Y');
|
||||
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$kodcaw)->first();
|
||||
$db=$cawangan['mysql'];
|
||||
$db=$cawangan['mysql'];
|
||||
|
||||
$gelejerYear=Glejer::on($cawangan['mysql'])->whereYear('tarikh','=',$yr)->where('glcode', '=',$request->glcode)->
|
||||
orderBy('tarikh','ASC')->get();
|
||||
return response()->json($gelejerYear);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user