updated untuk 28-9-2022
This commit is contained in:
@@ -112,7 +112,11 @@ class AliranTunaiController extends Controller
|
||||
|
||||
$tunaipast = Http::withOptions(['verify' => config('app.api_verify')])->get( config('api.url') .'/api/getPastTunai/'. $auth_user['cawangan'],['kodlaluan' => Auth::user()->name])->json();
|
||||
|
||||
return view('aliran_tunai.index',compact('cawangan_info','alirantunai','api_url','GT','denominasi','gadai_tebus','tuntutbaki','advansur','addtunai','tunaipast'));
|
||||
$proses_modal = Http::withOptions(['verify' => config('app.api_verify')])->get( config('api.url') .'/api/requestTeller/checkproses',['kodlaluan' => Auth::user()->name,'kodcaw' => $auth_user['cawangan']])->json();
|
||||
|
||||
$countproses = sizeof($proses_modal);
|
||||
|
||||
return view('aliran_tunai.index',compact('cawangan_info','alirantunai','api_url','GT','denominasi','gadai_tebus','tuntutbaki','advansur','addtunai','tunaipast','countproses'));
|
||||
}
|
||||
|
||||
public function alirantunaiGadai(Request $request,$teller){
|
||||
|
||||
@@ -7,6 +7,7 @@ use Illuminate\Support\Facades\Auth;
|
||||
use App\Services\CustomerService;
|
||||
use Illuminate\Support\Facades\Session;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
|
||||
class HomeController extends Controller
|
||||
{
|
||||
@@ -29,6 +30,16 @@ class HomeController extends Controller
|
||||
{
|
||||
$auth_user = Auth::user();
|
||||
$api_url = config('api.url');
|
||||
|
||||
if(session()->has('iklan') && session()->get('iklan') == 0)
|
||||
{
|
||||
session()->put('iklan', 1);
|
||||
}else{
|
||||
if (Hash::check(config('app.reset_password'), $auth_user['password']) || Hash::check($auth_user['no_kp'], $auth_user['password'])) {
|
||||
session()->put('iklan', 0);
|
||||
}
|
||||
}
|
||||
|
||||
if($auth_user['roles'] == 'teller'){
|
||||
if($auth_user['role_harian'] == 'teller'){
|
||||
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
||||
@@ -45,7 +56,13 @@ class HomeController extends Controller
|
||||
}
|
||||
elseif($auth_user['roles'] == 'pc' || $auth_user['roles'] == 'ppc'){
|
||||
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
||||
return view('homepage.khazanah.home',compact('cawangan_info','api_url'));
|
||||
|
||||
$gadai = Http::withOptions(['verify' => config('app.api_verify')])->get( config('api.url') .'/api/gadai/serah_marhun/khazanah/'. $auth_user['cawangan'])->json();
|
||||
$listserah = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/listSerahMarhunController/'.$auth_user['cawangan'])->json();
|
||||
|
||||
$countkhazanah = sizeof($gadai) + sizeof($listserah);
|
||||
|
||||
return view('homepage.khazanah.home',compact('cawangan_info','api_url','countkhazanah'));
|
||||
}
|
||||
else{
|
||||
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
||||
|
||||
@@ -383,7 +383,15 @@ class KhazanahController extends Controller
|
||||
|
||||
$update=Http::withOptions(['verify' => config('app.api_verify')])->put(config('api.url').'/api/updatetagterima/'.$auth_user['cawangan'].'/'.$request->norujukan_barcode)->json();
|
||||
|
||||
return redirect()->route('khazanah.tebus');
|
||||
if($update == 'success')
|
||||
{
|
||||
return redirect()->route('khazanah.tebus');
|
||||
}else if($update == 'unavailable'){
|
||||
return redirect()->route('khazanah.tebus')->with(['type' => 'unavailable', 'message' => 'Norujukan Tidak Wujud!', 'norujukan' => $request->norujukan_barcode]);
|
||||
}else{
|
||||
return redirect()->route('khazanah.tebus')->with(['type' => 'scanned', 'message' => 'Norujukan Dah Discan!', 'norujukan' => $request->norujukan_barcode]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function pendahuluanserah($id)
|
||||
@@ -1026,7 +1034,14 @@ class KhazanahController extends Controller
|
||||
|
||||
event(new NotifikasiPembayaran('TellerkepadaKhazanah'));
|
||||
|
||||
return redirect()->route('khazanah.gadaian');
|
||||
if($scan_barcode == 'success')
|
||||
{
|
||||
return redirect()->route('khazanah.gadaian');
|
||||
}else if($scan_barcode == 'unavailable'){
|
||||
return redirect()->route('khazanah.gadaian')->with(['type' => 'unavailable', 'message' => 'Norujukan Tidak Wujud!', 'norujukan' => $request->norujukan_barcode]);
|
||||
}else{
|
||||
return redirect()->route('khazanah.gadaian')->with(['type' => 'scanned', 'message' => 'Norujukan Dah Discan!', 'norujukan' => $request->norujukan_barcode]);
|
||||
}
|
||||
}
|
||||
|
||||
public function LaporanSemakBarcode(){
|
||||
@@ -3928,5 +3943,170 @@ class KhazanahController extends Controller
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function Laporan_SerahPetiBesiGadai()
|
||||
{
|
||||
$auth_user = Auth::user();
|
||||
$api_url = config('api.url');
|
||||
|
||||
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
||||
// $lookwakil = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/lookupwakil/')->json();
|
||||
|
||||
return view('khazanah.laporan.serahgadai', compact('cawangan_info','api_url'));
|
||||
}
|
||||
|
||||
public function cetak_serahBarcodeGadai(Request $request)
|
||||
{
|
||||
$api_url = config('api.url');
|
||||
$auth_user = Auth::user();
|
||||
$current = Carbon::now();
|
||||
$current = new Carbon();
|
||||
$tarikh_cetak = $current->toDateString();
|
||||
|
||||
if($request->datemula == null){
|
||||
$datemula = $current->toDateString();
|
||||
}else{
|
||||
$split_date = explode('-', $request->datemula);
|
||||
$datemula = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0];
|
||||
}
|
||||
|
||||
if($request->datehingga == null){
|
||||
$datehingga = $current->toDateString();
|
||||
}else{
|
||||
$split_date = explode('-', $request->datehingga);
|
||||
$datehingga = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0];
|
||||
}
|
||||
|
||||
|
||||
$serahbarcode = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/admin/laporan/serahgadai/',[
|
||||
'kodcaw' => $auth_user['cawangan'],
|
||||
'mula' => $datemula,
|
||||
'hingga' => $datehingga,
|
||||
])->json();
|
||||
|
||||
|
||||
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
||||
$cawangan = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json();
|
||||
$cawangan_detail=$cawangan[0];
|
||||
|
||||
return view('print.laporan_serahpetibesigadai', compact('cawangan_detail','api_url','serahbarcode','cawangan_info','datemula','datehingga','tarikh_cetak'));
|
||||
}
|
||||
|
||||
|
||||
public function Laporan_SerahMarhunTebus()
|
||||
{
|
||||
$auth_user = Auth::user();
|
||||
$api_url = config('api.url');
|
||||
|
||||
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
||||
// $lookwakil = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/lookupwakil/')->json();
|
||||
|
||||
return view('khazanah.laporan.serahmarhun', compact('cawangan_info','api_url'));
|
||||
}
|
||||
|
||||
|
||||
public function cetak_serahMarhunTebus(Request $request)
|
||||
{
|
||||
$api_url = config('api.url');
|
||||
$auth_user = Auth::user();
|
||||
$current = Carbon::now();
|
||||
$current = new Carbon();
|
||||
$tarikh_cetak = $current->toDateString();
|
||||
|
||||
if($request->datemula == null){
|
||||
$datemula = $current->toDateString();
|
||||
}else{
|
||||
$split_date = explode('-', $request->datemula);
|
||||
$datemula = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0];
|
||||
}
|
||||
|
||||
if($request->datehingga == null){
|
||||
$datehingga = $current->toDateString();
|
||||
}else{
|
||||
$split_date = explode('-', $request->datehingga);
|
||||
$datehingga = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0];
|
||||
}
|
||||
|
||||
|
||||
$serahmarhun = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/admin/laporan/serahmarhuntebus/',[
|
||||
'kodcaw' => $auth_user['cawangan'],
|
||||
'mula' => $datemula,
|
||||
'hingga' => $datehingga,
|
||||
])->json();
|
||||
|
||||
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
||||
$cawangan = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json();
|
||||
$cawangan_detail=$cawangan[0];
|
||||
|
||||
return view('print.laporan_serahmarhun', compact('cawangan_detail','api_url','serahmarhun','cawangan_info','datemula','datehingga','tarikh_cetak'));
|
||||
}
|
||||
|
||||
public function Laporan_AuditCustomer()
|
||||
{
|
||||
$auth_user = Auth::user();
|
||||
$api_url = config('api.url');
|
||||
|
||||
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
||||
|
||||
return view('khazanah.laporan.auditcustomer', compact('cawangan_info','api_url'));
|
||||
}
|
||||
|
||||
public function cetak_AuditCustomer(Request $request)
|
||||
{
|
||||
$api_url = config('api.url');
|
||||
$auth_user = Auth::user();
|
||||
$current = Carbon::now();
|
||||
$current = new Carbon();
|
||||
$tarikh_cetak = $current->toDateString();
|
||||
|
||||
if($request->datemula == null){
|
||||
$datemula = $current->toDateString();
|
||||
}else{
|
||||
$split_date = explode('-', $request->datemula);
|
||||
$datemula = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0];
|
||||
}
|
||||
|
||||
if($request->datehingga == null){
|
||||
$datehingga = $current->toDateString();
|
||||
}else{
|
||||
$split_date = explode('-', $request->datehingga);
|
||||
$datehingga = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0];
|
||||
}
|
||||
|
||||
$auditcustomer = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/admin/laporan/auditcustomer/',[
|
||||
'kodcaw' => $auth_user['cawangan'],
|
||||
'mula' => $datemula,
|
||||
'hingga' => $datehingga
|
||||
])->json();
|
||||
|
||||
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
||||
$cawangan = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json();
|
||||
$cawangan_detail=$cawangan[0];
|
||||
|
||||
return view('print.laporan_auditcustomer', compact('cawangan_detail','api_url','auditcustomer','cawangan_info','datemula','datehingga','tarikh_cetak'));
|
||||
}
|
||||
|
||||
public function LaporanTebusBarcode(){
|
||||
$auth_user=Auth::user();
|
||||
$current = Carbon::now();
|
||||
$current = new Carbon();
|
||||
$api_url = config('api.url');
|
||||
$tarikh_cetak = $current->toDateString();
|
||||
|
||||
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
||||
$cawangan = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json();
|
||||
$cawangan_detail=$cawangan[0];
|
||||
|
||||
$datemula = $current->toDateString();
|
||||
$datehingga = $current->toDateString();
|
||||
|
||||
$serahmarhun = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/admin/laporan/serahmarhuntebus/',[
|
||||
'kodcaw' => $auth_user['cawangan'],
|
||||
'mula' => $datemula,
|
||||
'hingga' => $datehingga,
|
||||
])->json();
|
||||
|
||||
return view('print.laporan_serahmarhun', compact('cawangan_detail','api_url','serahmarhun','cawangan_info','datemula','datehingga','tarikh_cetak'));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user