Merge remote-tracking branch 'origin/prod-kopkb' into annur-rebate
This commit is contained in:
@@ -0,0 +1,50 @@
|
|||||||
|
APP_NAME=Laravel
|
||||||
|
APP_ENV=local
|
||||||
|
APP_KEY=base64:WRTHcFTq5YARKVdA8YDUzsh9Ue8vD63ivgZgXNNBiGo=
|
||||||
|
APP_DEBUG=true
|
||||||
|
APP_URL=http://ujrahkopkb.erahn.com.my
|
||||||
|
API_URL=http://apiujrah-kopkb.erahn.com.my
|
||||||
|
#API_ARRAHNBID=http://lelong.test/api/
|
||||||
|
|
||||||
|
LOG_CHANNEL=stack
|
||||||
|
|
||||||
|
DB_CONNECTION=mysql
|
||||||
|
DB_HOST=127.0.0.1
|
||||||
|
DB_PORT=3306
|
||||||
|
DB_DATABASE=kaunter_erahn
|
||||||
|
DB_USERNAME=spider
|
||||||
|
DB_PASSWORD=G0dz!ll4
|
||||||
|
|
||||||
|
BROADCAST_DRIVER=pusher
|
||||||
|
CACHE_DRIVER=file
|
||||||
|
QUEUE_CONNECTION=sync
|
||||||
|
SESSION_DRIVER=file
|
||||||
|
SESSION_LIFETIME=120
|
||||||
|
|
||||||
|
REDIS_HOST=127.0.0.1
|
||||||
|
REDIS_PASSWORD=null
|
||||||
|
REDIS_PORT=6379
|
||||||
|
|
||||||
|
PUSHER_APP_ID=1132718
|
||||||
|
PUSHER_APP_KEY=26b0ec2f297f94b7aa9b
|
||||||
|
PUSHER_APP_SECRET=421b61fb5a8ecce477a6
|
||||||
|
|
||||||
|
MAIL_MAILER=smtp
|
||||||
|
MAIL_HOST=smtp.mailtrap.io
|
||||||
|
MAIL_PORT=2525
|
||||||
|
MAIL_USERNAME=null
|
||||||
|
MAIL_PASSWORD=null
|
||||||
|
MAIL_ENCRYPTION=null
|
||||||
|
MAIL_FROM_ADDRESS=null
|
||||||
|
MAIL_FROM_NAME="${APP_NAME}"
|
||||||
|
|
||||||
|
AWS_ACCESS_KEY_ID=
|
||||||
|
AWS_SECRET_ACCESS_KEY=
|
||||||
|
AWS_DEFAULT_REGION=us-east-1
|
||||||
|
AWS_BUCKET=
|
||||||
|
|
||||||
|
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
|
||||||
|
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
|
||||||
|
|
||||||
|
MYKAD_READER_PORT=8085
|
||||||
|
MYKAD_READER_ENABLED_CAWANGAN='' # IF NO CAWANGAN STATED, ALL CAWANGAN IS ENABLED
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Console\Commands;
|
||||||
|
|
||||||
|
use Illuminate\Console\Command;
|
||||||
|
use Illuminate\Support\Facades\Http;
|
||||||
|
use Carbon\Carbon;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
|
class updateImbangDuga extends Command
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The name and signature of the console command.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $signature = 'update:imbangduga {--all : all zone} {--1 : update zone 1} {--2 : update zone 2} {--3 : update zone3}';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The console command description.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $description = 'Command description';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new command instance.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Execute the console command.
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
|
public function handle()
|
||||||
|
{
|
||||||
|
if($this->option('all')){
|
||||||
|
$zone = 'all';
|
||||||
|
}else if($this->option('1')){
|
||||||
|
$zone = '1';
|
||||||
|
}else if ($this->option('2')){
|
||||||
|
$zone = '2';
|
||||||
|
}else if ($this->option('3')){
|
||||||
|
$zone = '3';
|
||||||
|
}
|
||||||
|
|
||||||
|
$monthly = Carbon::now();
|
||||||
|
$monthly = new Carbon();
|
||||||
|
|
||||||
|
$previousmonth = $monthly->subMonthsNoOverflow()->endOfMonth();
|
||||||
|
$tahun = $previousmonth->year;
|
||||||
|
$month = $previousmonth->month;
|
||||||
|
|
||||||
|
$response = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/reports/updateigall',[
|
||||||
|
'month' => $month,
|
||||||
|
'year' => $tahun,
|
||||||
|
]);
|
||||||
|
|
||||||
|
if ($response->successful()) {
|
||||||
|
$data = $response->json();
|
||||||
|
Log::info('Imbang Duga update successful', [
|
||||||
|
'month' => $month,
|
||||||
|
'year' => $tahun,
|
||||||
|
'data' => $data
|
||||||
|
]);
|
||||||
|
$this->info('Imbang Duga update successful');
|
||||||
|
} else {
|
||||||
|
Log::error('API error', [
|
||||||
|
'url' => $response->effectiveUri(),
|
||||||
|
'status' => $response->status(),
|
||||||
|
'body' => $response->body()
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Events;
|
||||||
|
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
use Illuminate\Foundation\Events\Dispatchable;
|
||||||
|
use Illuminate\Broadcasting\InteractsWithSockets;
|
||||||
|
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
|
||||||
|
|
||||||
|
class AutoSerahan implements ShouldBroadcast
|
||||||
|
{
|
||||||
|
use Dispatchable, InteractsWithSockets, SerializesModels;
|
||||||
|
|
||||||
|
public $pengesahan;
|
||||||
|
public $cawangan;
|
||||||
|
public $kodlaluan;
|
||||||
|
public $id;
|
||||||
|
|
||||||
|
public function __construct($pengesahan,$id,$cawangan,$kodlaluan)
|
||||||
|
{
|
||||||
|
$this->pengesahan = $pengesahan;
|
||||||
|
$this->id = $id;
|
||||||
|
$this->cawangan = $cawangan;
|
||||||
|
$this->kodlaluan = $kodlaluan;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function broadcastOn()
|
||||||
|
{
|
||||||
|
return ['autoserahan-notice'];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function broadcastAs()
|
||||||
|
{
|
||||||
|
return 'autoserahan-event';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Events;
|
||||||
|
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
use Illuminate\Foundation\Events\Dispatchable;
|
||||||
|
use Illuminate\Broadcasting\InteractsWithSockets;
|
||||||
|
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
|
||||||
|
|
||||||
|
class NotifikasiAnggota implements ShouldBroadcast
|
||||||
|
{
|
||||||
|
use Dispatchable, InteractsWithSockets, SerializesModels;
|
||||||
|
|
||||||
|
public $nokp;
|
||||||
|
public $status; // DILULUSKAN atau DITOLAK
|
||||||
|
public $komen;
|
||||||
|
public $tagoperasi;
|
||||||
|
|
||||||
|
public function __construct($nokp, $status, $komen, $tagoperasi = null)
|
||||||
|
{
|
||||||
|
$this->nokp = $nokp;
|
||||||
|
$this->status = strtoupper($status); // pastikan huruf besar DILULUSKAN/DITOLAK
|
||||||
|
$this->komen = $komen;
|
||||||
|
$this->tagoperasi = $tagoperasi;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function broadcastOn()
|
||||||
|
{
|
||||||
|
return ['notice-anggota'];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function broadcastAs()
|
||||||
|
{
|
||||||
|
return 'my-anggota';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function broadcastWith()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'noic' => $this->nokp,
|
||||||
|
'status' => $this->status, // ikut format API updateAnggota
|
||||||
|
'komen' => $this->komen,
|
||||||
|
'tagoperasi' => $this->tagoperasi,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -11,15 +11,16 @@ class NotifikasiKelulusan implements ShouldBroadcast
|
|||||||
{
|
{
|
||||||
use Dispatchable, InteractsWithSockets, SerializesModels;
|
use Dispatchable, InteractsWithSockets, SerializesModels;
|
||||||
|
|
||||||
public $norujukan,$kelulusan,$siri,$komen,$teller;
|
public $norujukan,$kelulusan,$siri,$komen,$teller,$tagoperasi;
|
||||||
|
|
||||||
public function __construct($norujukan,$kelulusan,$siri,$komen,$teller)
|
public function __construct($norujukan,$kelulusan,$siri,$komen,$teller,$tagoperasi = null)
|
||||||
{
|
{
|
||||||
$this->norujukan = $norujukan;
|
$this->norujukan = $norujukan;
|
||||||
$this->kelulusan = $kelulusan;
|
$this->kelulusan = $kelulusan;
|
||||||
$this->siri = $siri;
|
$this->siri = $siri;
|
||||||
$this->komen = $komen;
|
$this->komen = $komen;
|
||||||
$this->teller = $teller;
|
$this->teller = $teller;
|
||||||
|
$this->tagoperasi = $tagoperasi;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function broadcastOn()
|
public function broadcastOn()
|
||||||
|
|||||||
@@ -308,6 +308,16 @@ class CallCenterController extends Controller
|
|||||||
$bycawnotisperingatan = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/arcc/bycawnotisperingatan/'.$kodcaw.'/'.$notisid)->json();
|
$bycawnotisperingatan = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/arcc/bycawnotisperingatan/'.$kodcaw.'/'.$notisid)->json();
|
||||||
return view('callcenter.pdfbycawdetailnotisperingatan', compact('cawangan_info','bycawnotisperingatan','kodcaw','notisid','cawangan_detail','tarikh_cetak'));
|
return view('callcenter.pdfbycawdetailnotisperingatan', compact('cawangan_info','bycawnotisperingatan','kodcaw','notisid','cawangan_detail','tarikh_cetak'));
|
||||||
}
|
}
|
||||||
|
elseif($request->type == 'excel')
|
||||||
|
{
|
||||||
|
$current = Carbon::now();
|
||||||
|
$current = new Carbon();
|
||||||
|
$tarikh_cetak = $current->toDateString();
|
||||||
|
$cawangan = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/cawangan/detail/'.$kodcaw)->json();
|
||||||
|
$cawangan_detail=$cawangan[0];
|
||||||
|
$bycawnotisperingatan = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/arcc/bycawnotisperingatan/'.$kodcaw.'/'.$notisid)->json();
|
||||||
|
return view('callcenter.notisperingatanpertama_excel', compact('cawangan_info','bycawnotisperingatan','kodcaw','notisid','cawangan_detail','tarikh_cetak'));
|
||||||
|
}
|
||||||
return view('callcenter.bycawdetailnotisperingatan',compact('cawangan_info','bycawnotisperingatan','kodcaw','notisid'));
|
return view('callcenter.bycawdetailnotisperingatan',compact('cawangan_info','bycawnotisperingatan','kodcaw','notisid'));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -327,6 +337,22 @@ class CallCenterController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function pelanggannew()
|
||||||
|
{
|
||||||
|
$search = false;
|
||||||
|
|
||||||
|
$api_url = config('api.url');
|
||||||
|
$auth_user = Auth::user();
|
||||||
|
$idtype = 'nokp';
|
||||||
|
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
||||||
|
$bank = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/bank')->json();
|
||||||
|
if($auth_user->roles == 'admin'){
|
||||||
|
return view('admin.customer_index',compact('search','cawangan_info','bank','api_url','idtype','auth_user'));
|
||||||
|
}else{
|
||||||
|
return view('callcenter.indexnama',compact('search','cawangan_info','bank','api_url','idtype','auth_user'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function search(Request $request){
|
public function search(Request $request){
|
||||||
// dd($request->all());
|
// dd($request->all());
|
||||||
$noic = $request->noic;
|
$noic = $request->noic;
|
||||||
@@ -355,6 +381,112 @@ class CallCenterController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function searchnama(Request $request)
|
||||||
|
{
|
||||||
|
$noic = $request->noic;
|
||||||
|
$kodcaw = $request->cawangan;
|
||||||
|
Session::put('noic', $noic);
|
||||||
|
Session::put('kodcaw', $kodcaw);
|
||||||
|
|
||||||
|
$api_url = config('api.url');
|
||||||
|
|
||||||
|
$request->session()->forget('page_reload');
|
||||||
|
$request->session()->forget('norujukan');
|
||||||
|
|
||||||
|
if (empty($noic)) {
|
||||||
|
return redirect()->route('arcc.pelanggannew')->with('failed', 'Maaf, Tiada Data Pelanggan...');
|
||||||
|
}
|
||||||
|
|
||||||
|
// ======================
|
||||||
|
// 1️⃣ Kalau isi NOIC sahaja
|
||||||
|
// ======================
|
||||||
|
if ($noic && !$kodcaw) {
|
||||||
|
$customersWithGadai = [];
|
||||||
|
|
||||||
|
// Ambil semua cawangan
|
||||||
|
$cawanganList = Http::withOptions(['verify' => config('app.api_verify')])
|
||||||
|
->get($api_url . '/api/cawangan')
|
||||||
|
->json();
|
||||||
|
|
||||||
|
|
||||||
|
if (is_array($cawanganList)) {
|
||||||
|
foreach ($cawanganList as $caw) {
|
||||||
|
$kod = $caw['kodcaw'];
|
||||||
|
|
||||||
|
// Check customer di cawangan tu
|
||||||
|
$customer = Http::withOptions(['verify' => config('app.api_verify')])
|
||||||
|
->get($api_url . '/api/customers/' . $noic, ['kodcaw' => $kod])
|
||||||
|
->json();
|
||||||
|
|
||||||
|
|
||||||
|
if (!empty($customer)) {
|
||||||
|
// Check rekod gadai
|
||||||
|
$nokp = !empty($customer['kpbaru']) ? $customer['kpbaru'] : (!empty($customer['kplama']) ? $customer['kplama'] : $noic);
|
||||||
|
$gadaiData = Http::withOptions(['verify' => config('app.api_verify')])
|
||||||
|
->get($api_url . '/arcc/rekodgadai', [
|
||||||
|
'nokp' => $nokp,
|
||||||
|
'kodcaw' => $kod
|
||||||
|
])
|
||||||
|
->json();
|
||||||
|
// dump($gadaiData);
|
||||||
|
|
||||||
|
if (!empty($gadaiData['data']) && $gadaiData['status'] === true) {
|
||||||
|
$customersWithGadai[] = [
|
||||||
|
'nama' => $customer['nama'] ?? '-',
|
||||||
|
'kpbaru' => $customer['kpbaru'] ?? null,
|
||||||
|
'kplama' => $customer['kplama'] ?? null,
|
||||||
|
'customer' => $customer,
|
||||||
|
'kodcaw' => $kod,
|
||||||
|
'nama_cawangan' => $caw['details_caw'] ?? $kod,
|
||||||
|
// 'rekod_gadai' => $gadaiData
|
||||||
|
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// dd(true);
|
||||||
|
|
||||||
|
// Kalau lebih 1 → pilih pelanggan
|
||||||
|
if (count($customersWithGadai) >= 1) {
|
||||||
|
Session::put('customer_list', $customersWithGadai);
|
||||||
|
return redirect()->route('arcc.pilihpelanggan');
|
||||||
|
}
|
||||||
|
|
||||||
|
return redirect()->route('arcc.pelanggannew')->with('failed', 'Maaf, Tiada Data Pelanggan...');
|
||||||
|
}
|
||||||
|
|
||||||
|
// ======================
|
||||||
|
// 2️⃣ Kalau isi NOIC + Cawangan
|
||||||
|
// ======================
|
||||||
|
if ($noic && $kodcaw) {
|
||||||
|
$customer_info = Http::withOptions(['verify' => config('app.api_verify')])
|
||||||
|
->get($api_url . '/api/customers/' . $noic, ['kodcaw' => $kodcaw])
|
||||||
|
->json();
|
||||||
|
|
||||||
|
// Check sama ada $customer_info bukan null dan ada data penting seperti 'nama' (atau key lain)
|
||||||
|
if ($customer_info && !empty($customer_info['nama'])) {
|
||||||
|
Session::put('customer_info_arcc', $customer_info);
|
||||||
|
|
||||||
|
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])
|
||||||
|
->get($api_url . '/api/cawangan/' . $kodcaw)
|
||||||
|
->json();
|
||||||
|
|
||||||
|
return redirect()->route('arcc.customer_info_nama', [
|
||||||
|
'customer_info' => $customer_info,
|
||||||
|
'cawangan_info' => $cawangan_info,
|
||||||
|
'api_url' => $api_url
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Jika tiada data pelanggan di cawangan tu
|
||||||
|
return redirect()->route('arcc.pelanggan')->with('failed', 'Maaf, Tiada Data Pelanggan di cawangan ini.');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Boleh tambah kes lain (Nama sahaja, Nama + Cawangan) kalau nak
|
||||||
|
}
|
||||||
|
|
||||||
public function info(Request $request){
|
public function info(Request $request){
|
||||||
$auth_user = Auth::user();
|
$auth_user = Auth::user();
|
||||||
$api_url = config('api.url');
|
$api_url = config('api.url');
|
||||||
@@ -372,6 +504,54 @@ class CallCenterController extends Controller
|
|||||||
return view('callcenter.' . $cawangan_info['version'] . '.info',compact('cawangan_info','api_url','customer_info','bakilelong','rugilelong','negeri'));
|
return view('callcenter.' . $cawangan_info['version'] . '.info',compact('cawangan_info','api_url','customer_info','bakilelong','rugilelong','negeri'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function infonama(Request $request)
|
||||||
|
{
|
||||||
|
$auth_user = Auth::user();
|
||||||
|
$api_url = Session::get('api_url_arcc', config('api.url'));
|
||||||
|
|
||||||
|
$cawangan_info = Session::get('cawangan_info_arcc');
|
||||||
|
$customer_info = Session::get('customer_info_arcc');
|
||||||
|
|
||||||
|
// Kalau data kosong, fallback panggil API
|
||||||
|
if (!$cawangan_info) {
|
||||||
|
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])
|
||||||
|
->get($api_url . '/api/cawangan/' . Session::get('kodcaw'))
|
||||||
|
->json();
|
||||||
|
}
|
||||||
|
if (!$customer_info) {
|
||||||
|
$customer_info = Http::withOptions(['verify' => config('app.api_verify')])
|
||||||
|
->get($api_url . '/api/customers/' . Session::get('noic'))
|
||||||
|
->json();
|
||||||
|
|
||||||
|
$customer_info = $response['data'] ?? [];
|
||||||
|
}
|
||||||
|
|
||||||
|
$bakilelong = Http::withOptions(['verify' => config('app.api_verify')])
|
||||||
|
->get($api_url . '/api/bakilelong/cawangan/' . Session::get('kodcaw') . '/' . Session::get('noic') . '/baki')
|
||||||
|
->json();
|
||||||
|
|
||||||
|
$rugilelong = Http::withOptions(['verify' => config('app.api_verify')])
|
||||||
|
->get($api_url . '/api/bakilelong/cawangan/' . Session::get('kodcaw') . '/' . Session::get('noic') . '/rugi')
|
||||||
|
->json();
|
||||||
|
|
||||||
|
$negeri = Http::withOptions(['verify' => config('app.api_verify')])
|
||||||
|
->get($api_url . '/api/negeri/')
|
||||||
|
->json();
|
||||||
|
|
||||||
|
$request->session()->forget('page_reload');
|
||||||
|
$request->session()->forget('norujukan');
|
||||||
|
|
||||||
|
return view('callcenter.' . $cawangan_info['version'] . '.info', compact(
|
||||||
|
'cawangan_info',
|
||||||
|
'api_url',
|
||||||
|
'customer_info',
|
||||||
|
'bakilelong',
|
||||||
|
'rugilelong',
|
||||||
|
'negeri'
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
public function notisperingatankedua(Request $request){
|
public function notisperingatankedua(Request $request){
|
||||||
$auth_user = Auth::user();
|
$auth_user = Auth::user();
|
||||||
$api_url = config('api.url');
|
$api_url = config('api.url');
|
||||||
@@ -831,51 +1011,84 @@ class CallCenterController extends Controller
|
|||||||
{
|
{
|
||||||
$auth_user = Auth::user();
|
$auth_user = Auth::user();
|
||||||
|
|
||||||
$gadai = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/gadai/norujukan/'. $request->norujukan)->json();
|
$norujukan = $request->norujukan;
|
||||||
|
$gadai = Http::withOptions(['verify' => config('app.api_verify')])
|
||||||
|
->get(config('api.url') . '/api/gadai/norujukan/' . $norujukan)
|
||||||
|
->json();
|
||||||
|
|
||||||
if(sizeof($gadai) > 0)
|
|
||||||
{
|
|
||||||
$history = $gadai[0][0]['historygadaian'];
|
|
||||||
$dahtebus = $gadai[0][0]['sttebus'];
|
|
||||||
$norujukan = $gadai[0][0]['norujukan'];
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
$count = 0;
|
|
||||||
$arrayhist = [];
|
$arrayhist = [];
|
||||||
|
|
||||||
while($history != "0" && $history != '' || $dahtebus == 'T')
|
if (sizeof($gadai) > 0) {
|
||||||
{
|
|
||||||
if($history != "0" && $history != '')
|
|
||||||
{
|
|
||||||
$gadai = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/gadai/norujukan/'. $history)->json();
|
|
||||||
$tebus = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/listpenebusanhistory/'. $gadai[0][0]['kodcaw'],[
|
|
||||||
"norujukan" => $history
|
|
||||||
])->json();
|
|
||||||
|
|
||||||
if(sizeof($gadai) > 0)
|
|
||||||
{
|
|
||||||
if($history == $gadai[0][0]['historygadaian'])
|
|
||||||
$history = 0;
|
|
||||||
else{
|
|
||||||
array_push($arrayhist,["tagbaru" => ((isset($gadai[0][0]['tagbaru'])) ? $gadai[0][0]['tagbaru'] : 0),"hargajualan" => ((isset($gadai[0][0]['hargajualan'])) ? $gadai[0][0]['hargajualan'] : ''), "pinjaman" => ((isset($tebus[0])) ? $tebus[0]['pinjaman'] : 0),"norujukan" => $history,"jenistebus" => ((isset($tebus[0])) ? $tebus[0]['jenistebus'] : 0),"jbg" => ((isset($tebus[0])) ? $tebus[0]['jbg'] : 0),"t_tebus" => ((isset($tebus[0])) ? $tebus[0]['t_tebus'] : 0)]);
|
|
||||||
$history = $gadai[0][0]['historygadaian'];
|
$history = $gadai[0][0]['historygadaian'];
|
||||||
}
|
$dahtebus = $gadai[0][0]['sttebus'];
|
||||||
}
|
$kodcaw = $gadai[0][0]['kodcaw'];
|
||||||
|
// Kalau belum ada history, ambil rekod asal sahaja
|
||||||
|
if ($dahtebus == 'T') {
|
||||||
|
|
||||||
$count++;
|
$tebusList = Http::withOptions(['verify' => config('app.api_verify')])
|
||||||
|
->get(config('api.url') . '/api/listpenebusanhistory/' . $kodcaw, [
|
||||||
|
'norujukan' => $norujukan
|
||||||
|
])
|
||||||
|
->json();
|
||||||
|
|
||||||
}
|
$tebus = collect($tebusList)->firstWhere('norujukan', $norujukan);
|
||||||
else{
|
|
||||||
$gadai = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/gadai/norujukan/'. $norujukan)->json();
|
|
||||||
$tebus = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/listpenebusanhistory/'. $gadai[0][0]['kodcaw'],[
|
|
||||||
"norujukan" => $norujukan
|
|
||||||
])->json();
|
|
||||||
|
|
||||||
|
$arrayhist[] = [
|
||||||
|
"tagbaru" => $gadai[0][0]['tagbaru'] ?? 0,
|
||||||
|
"hargajualan" => $gadai[0][0]['hargajualan'] ?? '',
|
||||||
|
"pinjaman" => $tebus['pinjaman'] ?? 0,
|
||||||
|
"norujukan" => $norujukan,
|
||||||
|
"jenistebus" => $tebus['jenistebus'] ?? 0,
|
||||||
|
"jbg" => $tebus['jbg'] ?? 0,
|
||||||
|
"t_tebus" => $tebus['t_tebus'] ?? 0,
|
||||||
|
"bayaran_keuntungan" => $tebus['bayaran_keuntungan'] ?? 0,
|
||||||
|
"bayaran_pembiayaan" => $tebus['bayaran_pembiayaan'] ?? 0,
|
||||||
|
"duit_masuk" => $tebus['duit_masuk'] ?? 0,
|
||||||
|
"trans_type" => $tebus['trans_type'] ?? 0,
|
||||||
|
];
|
||||||
|
} else {
|
||||||
|
// Loop ke belakang (rekod lepas-lepas)
|
||||||
|
while ($history != "0" && $history != '') {
|
||||||
|
$prevGadai = Http::withOptions(['verify' => config('app.api_verify')])
|
||||||
|
->get(config('api.url') . '/api/gadai/norujukan/' . $history)
|
||||||
|
->json();
|
||||||
|
|
||||||
array_push($arrayhist,["tagbaru" => ((isset($gadai[0][0]['tagbaru'])) ? $gadai[0][0]['tagbaru'] : 0), "hargajualan" => ((isset($gadai[0][0]['hargajualan'])) ? $gadai[0][0]['hargajualan'] : ''),"pinjaman" => ((isset($tebus[0])) ? $tebus[0]['pinjaman'] : 0),"norujukan" => $norujukan,"jenistebus" => ((isset($tebus[0])) ? $tebus[0]['jenistebus'] : 0),"jbg" => ((isset($tebus[0])) ? $tebus[0]['jbg'] : 0),"t_tebus" => ((isset($tebus[0])) ? $tebus[0]['t_tebus'] : 0)]);
|
$prevKodcaw = $prevGadai[0][0]['kodcaw'] ?? null;
|
||||||
|
|
||||||
|
if (!$prevKodcaw) break;
|
||||||
|
|
||||||
|
$tebusList = Http::withOptions(['verify' => config('app.api_verify')])
|
||||||
|
->get(config('api.url') . '/api/listpenebusanhistory/' . $prevKodcaw, [
|
||||||
|
'norujukan' => $history
|
||||||
|
])
|
||||||
|
->json();
|
||||||
|
|
||||||
|
$tebus = collect($tebusList)->firstWhere('norujukan', $history);
|
||||||
|
|
||||||
|
$arrayhist[] = [
|
||||||
|
"tagbaru" => $prevGadai[0][0]['tagbaru'] ?? 0,
|
||||||
|
"hargajualan" => $prevGadai[0][0]['hargajualan'] ?? '',
|
||||||
|
"pinjaman" => $tebus['pinjaman'] ?? 0,
|
||||||
|
"norujukan" => $history,
|
||||||
|
"jenistebus" => $tebus['jenistebus'] ?? 0,
|
||||||
|
"jbg" => $tebus['jbg'] ?? 0,
|
||||||
|
"t_tebus" => $tebus['t_tebus'] ?? 0,
|
||||||
|
"bayaran_keuntungan" => $tebus['bayaran_keuntungan'] ?? 0,
|
||||||
|
"bayaran_pembiayaan" => $tebus['bayaran_pembiayaan'] ?? 0,
|
||||||
|
"duit_masuk" => $tebus['duit_masuk'] ?? 0,
|
||||||
|
"trans_type" => $tebus['trans_type'] ?? 0,
|
||||||
|
];
|
||||||
|
|
||||||
|
$nextHistory = $prevGadai[0][0]['historygadaian'] ?? '0';
|
||||||
|
|
||||||
|
// Elakkan infinite loop
|
||||||
|
if ($nextHistory == $history) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$history = $nextHistory;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return response()->json($arrayhist,200);
|
return response()->json($arrayhist,200);
|
||||||
@@ -923,4 +1136,242 @@ class CallCenterController extends Controller
|
|||||||
$pertambahpinjaman = 0.80;
|
$pertambahpinjaman = 0.80;
|
||||||
return view('callcenter.' . $cawangan_info['version'] . '.index',compact('cawangan_info','api_url','gadai','marhun','nama','nilaihargasemasa','pertambahpinjaman'));
|
return view('callcenter.' . $cawangan_info['version'] . '.index',compact('cawangan_info','api_url','gadai','marhun','nama','nilaihargasemasa','pertambahpinjaman'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function pilihPelanggan()
|
||||||
|
{
|
||||||
|
if (!Session::has('customer_list')) {
|
||||||
|
return redirect()->route('arcc.pelanggan')->with('failed', 'Tiada pelanggan untuk dipilih.');
|
||||||
|
}
|
||||||
|
|
||||||
|
$kodcaw = Session::get('kodcaw'); // Ambil dari sesi
|
||||||
|
|
||||||
|
$cawangan_info = null;
|
||||||
|
|
||||||
|
// Kalau kodcaw ada, baru ambil cawangan_info
|
||||||
|
if ($kodcaw) {
|
||||||
|
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])
|
||||||
|
->get(config('api.url') . '/api/cawangan/' . $kodcaw)
|
||||||
|
->json();
|
||||||
|
// dd($cawangan_info );
|
||||||
|
}
|
||||||
|
|
||||||
|
return view('callcenter.pilihpelanggan', compact('cawangan_info'));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public function pilihPelangganProceed(Request $request)
|
||||||
|
{
|
||||||
|
$customerData = $request->input('customer');
|
||||||
|
$kodcaw = $request->input('kodcaw');
|
||||||
|
|
||||||
|
if ($customerData) {
|
||||||
|
$customer = json_decode(base64_decode($customerData), true);
|
||||||
|
|
||||||
|
// Merge data penuh supaya flat & senang guna di Blade
|
||||||
|
$customer_info = array_merge(
|
||||||
|
$customer['customer'] ?? $customer, // kalau ada sub-array 'customer', ambil dia
|
||||||
|
[
|
||||||
|
'kodcaw' => $customer['kodcaw'] ?? $kodcaw,
|
||||||
|
'nama_cawangan' => $customer['nama_cawangan'] ?? '',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
// Simpan dalam session
|
||||||
|
Session::put('customer_info_arcc', $customer_info);
|
||||||
|
Session::put('kodcaw', $kodcaw);
|
||||||
|
Session::put('noic', $customer_info['kpbaru'] ?? $customer_info['kplama']);
|
||||||
|
|
||||||
|
$api_url = config('api.url');
|
||||||
|
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])
|
||||||
|
->get($api_url . '/api/cawangan/' . $kodcaw)->json();
|
||||||
|
|
||||||
|
// Simpan juga dalam session
|
||||||
|
Session::put('cawangan_info_arcc', $cawangan_info);
|
||||||
|
Session::put('api_url_arcc', $api_url);
|
||||||
|
|
||||||
|
return redirect()->route('arcc.customer_info');
|
||||||
|
}
|
||||||
|
|
||||||
|
return redirect()->route('arcc.pelanggan')->with('failed', 'Pelanggan tidak sah dipilih.');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function ajaxSearchCustomer(Request $request)
|
||||||
|
{
|
||||||
|
$search = strtolower($request->query('search', ''));
|
||||||
|
$customers = collect(session('customer_list', []))
|
||||||
|
->filter(function ($customer) use ($search) {
|
||||||
|
return strpos(strtolower($customer['nama']), $search) !== false ||
|
||||||
|
strpos(strtolower($customer['nokp']), $search) !== false;
|
||||||
|
});
|
||||||
|
|
||||||
|
return view('callcenter.partials.customertable', ['customers' => $customers])->render();
|
||||||
|
}
|
||||||
|
public function cariannama(Request $request)
|
||||||
|
{
|
||||||
|
$nama = $request->nama;
|
||||||
|
$api_url = config('api.url');
|
||||||
|
|
||||||
|
if (empty($nama)) {
|
||||||
|
return redirect()->route('arcc.pelanggan')->with('failed', 'Maaf, Tiada Data Pelanggan...');
|
||||||
|
}
|
||||||
|
|
||||||
|
session(['last_search' => $request->all()]);
|
||||||
|
|
||||||
|
// Clear session lama
|
||||||
|
$request->session()->forget(['page_reload', 'norujukan']);
|
||||||
|
|
||||||
|
// 1. Call API carian nama
|
||||||
|
$customers = Http::withOptions(['verify' => config('app.api_verify')])
|
||||||
|
->get($api_url . '/api/customers', ['nama' => $nama])
|
||||||
|
->json();
|
||||||
|
|
||||||
|
|
||||||
|
if (!is_array($customers) || empty($customers)) {
|
||||||
|
return redirect()->route('arcc.pelanggannew')->with('failed', 'Tiada pelanggan dijumpai.');
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. Ambil senarai cawangan
|
||||||
|
$cawanganList = Http::withOptions(['verify' => config('app.api_verify')])
|
||||||
|
->get($api_url . '/api/cawangan')
|
||||||
|
->json();
|
||||||
|
|
||||||
|
if (!is_array($cawanganList) || empty($cawanganList)) {
|
||||||
|
return redirect()->route('arcc.pelanggan')->with('failed', 'Tiada senarai cawangan.');
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. Kumpul semua IC (kpbaru / kplama) dari senarai customer
|
||||||
|
$nokpList = collect($customers)
|
||||||
|
->map(function ($customer) {
|
||||||
|
return $customer['kpbaru'] ?? $customer['kplama'] ?? null;
|
||||||
|
})
|
||||||
|
->filter()
|
||||||
|
->unique()
|
||||||
|
->values()
|
||||||
|
->toArray();
|
||||||
|
|
||||||
|
|
||||||
|
$customersWithGadai = collect();
|
||||||
|
|
||||||
|
foreach ($cawanganList as $caw) {
|
||||||
|
$kod = $caw['kodcaw'];
|
||||||
|
|
||||||
|
$response = Http::withOptions(['verify' => config('app.api_verify')])
|
||||||
|
->post($api_url . '/arcc/rekodgadai-batch', [
|
||||||
|
'nokp_list' => $nokpList,
|
||||||
|
'kodcaw' => $kod
|
||||||
|
]);
|
||||||
|
|
||||||
|
if ($response->failed()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = $response->json();
|
||||||
|
|
||||||
|
if (!empty($data['data']) && is_array($data['data'])) {
|
||||||
|
foreach ($data['data'] as $rekod) {
|
||||||
|
$customer = collect($customers)->first(function ($c) use ($rekod) {
|
||||||
|
return ($c['kpbaru'] ?? $c['kplama']) === $rekod['nokp'];
|
||||||
|
});
|
||||||
|
|
||||||
|
if ($customer) {
|
||||||
|
$customersWithGadai->put(
|
||||||
|
$customer['kpbaru'] ?? $customer['kplama'], // guna IC as key
|
||||||
|
[
|
||||||
|
'nama' => $customer['nama'] ?? '-',
|
||||||
|
'kpbaru' => $customer['kpbaru'] ?? null,
|
||||||
|
'kplama' => $customer['kplama'] ?? null,
|
||||||
|
'customer' => $customer,
|
||||||
|
'kodcaw' => $kod,
|
||||||
|
'nama_cawangan' => $caw['details_caw'] ?? $kod
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$customersWithGadai = $customersWithGadai
|
||||||
|
->sortBy('nama') // sort ikut nama A→Z
|
||||||
|
->values(); // reset key semula
|
||||||
|
|
||||||
|
|
||||||
|
// 5. Return ikut result
|
||||||
|
if ($customersWithGadai->count() > 1) {
|
||||||
|
Session::put('customer_list', $customersWithGadai);
|
||||||
|
return redirect()->route('arcc.pilihpelanggannama');
|
||||||
|
} elseif ($customersWithGadai->count() === 1) {
|
||||||
|
$singleCustomer = $customersWithGadai->first();
|
||||||
|
Session::put('customer_info_arcc', $singleCustomer['customer']);
|
||||||
|
|
||||||
|
return redirect()->route('arcc.customer_info', [
|
||||||
|
'customer_info' => $singleCustomer['customer'],
|
||||||
|
'cawangan_info' => [
|
||||||
|
'kodcaw' => $singleCustomer['kodcaw'],
|
||||||
|
'nama_cawangan' => $singleCustomer['nama_cawangan']
|
||||||
|
],
|
||||||
|
'api_url' => $api_url
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return redirect()->route('arcc.pelanggannew')->with('failed', 'Tiada pelanggan dengan rekod gadai.');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function pilihPelanggannama()
|
||||||
|
{
|
||||||
|
if (!Session::has('customer_list')) {
|
||||||
|
return redirect()->route('arcc.pelanggan')->with('failed', 'Tiada pelanggan untuk dipilih.');
|
||||||
|
}
|
||||||
|
|
||||||
|
$kodcaw = Session::get('kodcaw'); // Ambil dari sesi
|
||||||
|
|
||||||
|
$cawangan_info = null;
|
||||||
|
|
||||||
|
// Kalau kodcaw ada, baru ambil cawangan_info
|
||||||
|
if ($kodcaw) {
|
||||||
|
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])
|
||||||
|
->get(config('api.url') . '/api/cawangan/' . $kodcaw)
|
||||||
|
->json();
|
||||||
|
// dd($cawangan_info );
|
||||||
|
}
|
||||||
|
|
||||||
|
return view('callcenter.pilihpelanggannama', compact('cawangan_info'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function pilihPelangganProceednama(Request $request)
|
||||||
|
{
|
||||||
|
$customerData = $request->input('customer');
|
||||||
|
$kodcaw = $request->input('kodcaw');
|
||||||
|
|
||||||
|
if ($customerData) {
|
||||||
|
$customer = json_decode(base64_decode($customerData), true);
|
||||||
|
|
||||||
|
// Merge data penuh supaya flat & senang guna di Blade
|
||||||
|
$customer_info = array_merge(
|
||||||
|
$customer['customer'] ?? $customer, // kalau ada sub-array 'customer', ambil dia
|
||||||
|
[
|
||||||
|
'kodcaw' => $customer['kodcaw'] ?? $kodcaw,
|
||||||
|
'nama_cawangan' => $customer['nama_cawangan'] ?? '',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
// Simpan dalam session
|
||||||
|
Session::put('customer_info_arcc', $customer_info);
|
||||||
|
Session::put('kodcaw', $kodcaw);
|
||||||
|
Session::put('noic', $customer_info['kpbaru'] ?? $customer_info['kplama']);
|
||||||
|
|
||||||
|
$api_url = config('api.url');
|
||||||
|
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])
|
||||||
|
->get($api_url . '/api/cawangan/' . $kodcaw)->json();
|
||||||
|
|
||||||
|
// Simpan juga dalam session
|
||||||
|
Session::put('cawangan_info_arcc', $cawangan_info);
|
||||||
|
Session::put('api_url_arcc', $api_url);
|
||||||
|
|
||||||
|
return redirect()->route('arcc.customer_info');
|
||||||
|
}
|
||||||
|
|
||||||
|
return redirect()->route('arcc.pelanggan')->with('failed', 'Pelanggan tidak sah dipilih.');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ use Illuminate\Support\Facades\Auth;
|
|||||||
use Twilio\Rest\Client;
|
use Twilio\Rest\Client;
|
||||||
use App\Komoditi;
|
use App\Komoditi;
|
||||||
use App\Events\Dashboard\PelangganNotify;
|
use App\Events\Dashboard\PelangganNotify;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
|
|
||||||
@@ -24,7 +25,7 @@ class CustomersController extends Controller
|
|||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->middleware('auth');
|
$this->middleware('auth');
|
||||||
$this->customerService = New CustomerService();
|
$this->customerService = new CustomerService();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Display a listing of the resource.
|
* Display a listing of the resource.
|
||||||
@@ -38,80 +39,241 @@ class CustomersController extends Controller
|
|||||||
$api_url = config('api.url');
|
$api_url = config('api.url');
|
||||||
$auth_user = Auth::user();
|
$auth_user = Auth::user();
|
||||||
$idtype = 'nokp';
|
$idtype = 'nokp';
|
||||||
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/' . $auth_user['cawangan'])->json();
|
||||||
$bank = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/bank')->json();
|
$bank = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/bank')->json();
|
||||||
$pekerjaan = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/pekerjaan')->json();
|
$pekerjaan = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/pekerjaan')->json();
|
||||||
$blacklist_search = false;
|
$blacklist_search = false;
|
||||||
|
|
||||||
return view('customers.' . $cawangan_info['version'] . '.index',compact('search','blacklist_search','cawangan_info','bank','api_url','idtype','pekerjaan'));
|
return view('customers.' . $cawangan_info['version'] . '.index', compact('search', 'blacklist_search', 'cawangan_info', 'bank', 'api_url', 'idtype', 'pekerjaan'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function info(Request $request){
|
public function info(Request $request)
|
||||||
|
{
|
||||||
$auth_user = Auth::user();
|
$auth_user = Auth::user();
|
||||||
$api_url = config('api.url');
|
$api_url = config('api.url');
|
||||||
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
|
||||||
|
|
||||||
$customer_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/customers/'. Session::get('noic'))->json();
|
// 🔹 Panggil maklumat cawangan
|
||||||
// dd($customer_info);
|
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])
|
||||||
$pekerjaan = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/pekerjaan')->json();
|
->get($api_url . '/api/cawangan/' . $auth_user['cawangan'])
|
||||||
|
->json();
|
||||||
|
|
||||||
|
// 🔹 Panggil maklumat pelanggan (customer)
|
||||||
|
$customer_info = Http::withOptions(['verify' => config('app.api_verify')])
|
||||||
|
->get($api_url . '/api/customers/' . Session::get('noic'))
|
||||||
|
->json();
|
||||||
|
|
||||||
|
// 🔹 Panggil maklumat pekerjaan
|
||||||
|
$pekerjaan = Http::withOptions(['verify' => config('app.api_verify')])
|
||||||
|
->get($api_url . '/api/pekerjaan')
|
||||||
|
->json();
|
||||||
|
|
||||||
$komoditi = Komoditi::first();
|
$komoditi = Komoditi::first();
|
||||||
$min_komoditi = $komoditi['min_komoditi'];
|
$min_komoditi = $komoditi['min_komoditi'];
|
||||||
|
|
||||||
$bakilelong = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/bakilelong/cawangan/' . $auth_user['cawangan'] . '/' . Session::get('noic') . '/baki')->json();
|
// 🔹 Panggil baki lelong
|
||||||
$rugilelong = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/bakilelong/cawangan/' . $auth_user['cawangan'] . '/' . Session::get('noic') . '/rugi')->json();
|
$bakilelong = Http::withOptions(['verify' => config('app.api_verify')])
|
||||||
|
->get($api_url . '/api/bakilelong/cawangan/' . $auth_user['cawangan'] . '/' . Session::get('noic') . '/baki')
|
||||||
|
->json();
|
||||||
|
|
||||||
|
// 🔹 Panggil rugi lelong
|
||||||
|
$rugilelong = Http::withOptions(['verify' => config('app.api_verify')])
|
||||||
|
->get($api_url . '/api/bakilelong/cawangan/' . $auth_user['cawangan'] . '/' . Session::get('noic') . '/rugi')
|
||||||
|
->json();
|
||||||
|
|
||||||
|
// 🔹 Reset session sementara
|
||||||
$request->session()->forget('page_reload');
|
$request->session()->forget('page_reload');
|
||||||
$request->session()->forget('norujukan');
|
$request->session()->forget('norujukan');
|
||||||
|
|
||||||
$customer_page = ($cawangan_info['version'] == 'v1') ? 'customers.v1.info' : 'customers.v2.info';
|
$customer_page = ($cawangan_info['version'] == 'v1')
|
||||||
|
? 'customers.v1.info'
|
||||||
|
: 'customers.v2.info';
|
||||||
|
|
||||||
|
// Logik papar butang "Assign sebagai Anggota"
|
||||||
|
$showAssignAnggotaBtn = false;
|
||||||
|
$noic = Session::get('noic');
|
||||||
|
|
||||||
if($request->tebus_auto_tawarruq_berjaya === 'true'){
|
if (!empty($customer_info)) {
|
||||||
|
|
||||||
|
$anggota_info = Http::withOptions(['verify' => config('app.api_verify')])
|
||||||
|
->get($api_url . '/api/customer/anggota', [
|
||||||
|
'noic' => $noic
|
||||||
|
])
|
||||||
|
->json();
|
||||||
|
$isAnggotaExist = isset($anggota_info) && !empty($anggota_info) && !isset($anggota_info['message']);
|
||||||
|
|
||||||
|
if ($isAnggotaExist && isset($customer_info['tag_anggota']) && $customer_info['tag_anggota'] == 0) {
|
||||||
|
$showAssignAnggotaBtn = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$getApprovalError = Http::withOptions(['verify' => config('app.api_verify')])
|
||||||
|
->get($api_url . '/api/getApproval', [
|
||||||
|
'kodcaw' => $auth_user['cawangan'],
|
||||||
|
'teller' => $auth_user['name'],
|
||||||
|
])
|
||||||
|
->json();
|
||||||
|
|
||||||
|
if ($request->tebus_auto_tawarruq_berjaya === 'true') {
|
||||||
$request->session()->flash('activate_tab', 'SAG_baru');
|
$request->session()->flash('activate_tab', 'SAG_baru');
|
||||||
}
|
}
|
||||||
|
|
||||||
return view($customer_page,compact('cawangan_info','api_url','customer_info','bakilelong','rugilelong','min_komoditi','pekerjaan'));
|
return view($customer_page, compact(
|
||||||
|
'cawangan_info',
|
||||||
|
'api_url',
|
||||||
|
'customer_info',
|
||||||
|
'bakilelong',
|
||||||
|
'rugilelong',
|
||||||
|
'min_komoditi',
|
||||||
|
'pekerjaan',
|
||||||
|
'getApprovalError',
|
||||||
|
'showAssignAnggotaBtn'
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function search(Request $request){
|
|
||||||
// dd($request->all());
|
public function search(Request $request)
|
||||||
|
{
|
||||||
$noic = $request->noic;
|
$noic = $request->noic;
|
||||||
$idtype = $request->customerIDType;
|
$idtype = $request->customerIDType;
|
||||||
Session::put('noic', $noic);
|
Session::put('noic', $noic);
|
||||||
|
|
||||||
$api_url = config('api.url');
|
$api_url = config('api.url');
|
||||||
$auth_user = Auth::user();
|
$auth_user = Auth::user();
|
||||||
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
|
||||||
$bank = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/bank')->json();
|
|
||||||
$customer_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/customers/'. $noic)->json();
|
|
||||||
$pekerjaan = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/pekerjaan')->json();
|
|
||||||
|
|
||||||
$blacklist = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/customer/blacklist',[
|
// Dapatkan maklumat asas
|
||||||
'nokp' => $noic
|
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])
|
||||||
])->json();
|
->get($api_url . '/api/cawangan/' . $auth_user['cawangan'])
|
||||||
// if($customers_info){
|
->json();
|
||||||
// $customer_info = $customers_info[0];
|
|
||||||
// }else{
|
$bank = Http::withOptions(['verify' => config('app.api_verify')])
|
||||||
// $customer_info = $customers_info;
|
->get($api_url . '/api/bank')
|
||||||
// }
|
->json();
|
||||||
|
|
||||||
|
$customer_info = Http::withOptions(['verify' => config('app.api_verify')])
|
||||||
|
->get($api_url . '/api/customers/' . $noic)
|
||||||
|
->json();
|
||||||
|
|
||||||
|
$pekerjaan = Http::withOptions(['verify' => config('app.api_verify')])
|
||||||
|
->get($api_url . '/api/pekerjaan')
|
||||||
|
->json();
|
||||||
|
|
||||||
|
$blacklist = Http::withOptions(['verify' => config('app.api_verify')])
|
||||||
|
->get($api_url . '/api/customer/blacklist', ['nokp' => $noic])
|
||||||
|
->json();
|
||||||
|
|
||||||
|
// Reset session lama
|
||||||
$request->session()->forget('page_reload');
|
$request->session()->forget('page_reload');
|
||||||
$request->session()->forget('norujukan');
|
$request->session()->forget('norujukan');
|
||||||
|
|
||||||
$blacklist_search = false;
|
$blacklist_search = false;
|
||||||
$search = true;
|
$search = true;
|
||||||
if($customer_info){
|
|
||||||
if($blacklist){
|
// SEMAK STATUS ANGGOTA DAN PELANGGAN
|
||||||
$blacklist_search = true;
|
$isAnggota = false;
|
||||||
return view('customers.' . $cawangan_info['version'] .'.index',compact('blacklist_search','customer_info','search','noic','cawangan_info','bank','api_url','idtype'));
|
$isPelanggan = false;
|
||||||
}else{
|
$isNewCustomer = false;
|
||||||
Session::put('customer_info',$customer_info);
|
$showAssignAnggotaBtn = false;
|
||||||
return redirect()->route('customer_info')->with( ['customer_info' => $customer_info,'cawangan_info'=>$cawangan_info,'api_url'=>$api_url]);
|
$showDaftarPelangganBtn = false;
|
||||||
|
|
||||||
|
// Semak dalam sistem anggota
|
||||||
|
$anggota_info = Http::withOptions(['verify' => config('app.api_verify')])
|
||||||
|
->get(config('api.url') . '/api/customer/anggota', [
|
||||||
|
'noic' => $noic
|
||||||
|
])
|
||||||
|
->json();
|
||||||
|
|
||||||
|
// Semak betul-betul jika ada rekod anggota
|
||||||
|
if (!empty($anggota_info) && isset($anggota_info['data']) && !empty($anggota_info['data'])) {
|
||||||
|
$isAnggota = true;
|
||||||
|
} elseif (isset($anggota_info['noic']) && !empty($anggota_info['noic'])) {
|
||||||
|
$isAnggota = true;
|
||||||
}
|
}
|
||||||
}else{
|
|
||||||
if($blacklist){
|
if ($customer_info && isset($customer_info['id'])) {
|
||||||
$blacklist_search = true;
|
$isPelanggan = true;
|
||||||
return view('customers.' . $cawangan_info['version'] . '.index',compact('blacklist_search','customer_info','search','noic','cawangan_info','bank','api_url','idtype','pekerjaan'));
|
|
||||||
}else{
|
|
||||||
return view('customers.' . $cawangan_info['version'] . '.index',compact('blacklist_search','customer_info','search','noic','cawangan_info','bank','api_url','idtype','pekerjaan'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Tentukan butang mana nak paparkan (logik diperbetulkan)
|
||||||
|
if ($isPelanggan && !$isAnggota) {
|
||||||
|
// Pelanggan dah berdaftar tapi bukan anggota koperasi
|
||||||
|
$showAssignAnggotaBtn = true;
|
||||||
|
} elseif ($isAnggota && !$isPelanggan) {
|
||||||
|
// Anggota koperasi tapi belum berdaftar sebagai pelanggan
|
||||||
|
$showDaftarPelangganBtn = true;
|
||||||
|
} elseif (!$isAnggota && !$isPelanggan) {
|
||||||
|
// Bukan anggota dan bukan pelanggan (pelanggan baru)
|
||||||
|
$showDaftarPelangganBtn = true;
|
||||||
|
$isNewCustomer = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Debug log untuk semak nilai sebenar
|
||||||
|
// Log::info('DEBUG CUSTOMER STATUS', [
|
||||||
|
// 'noic' => $noic,
|
||||||
|
// 'isAnggota' => $isAnggota,
|
||||||
|
// 'isPelanggan' => $isPelanggan,
|
||||||
|
// 'isNewCustomer' => $isNewCustomer,
|
||||||
|
// 'showAssignAnggotaBtn' => $showAssignAnggotaBtn,
|
||||||
|
// 'showDaftarPelangganBtn' => $showDaftarPelangganBtn,
|
||||||
|
// ]);
|
||||||
|
|
||||||
|
if ($customer_info) {
|
||||||
|
// Ada maklumat pelanggan
|
||||||
|
if ($blacklist) {
|
||||||
|
$blacklist_search = true;
|
||||||
|
return view('customers.' . $cawangan_info['version'] . '.index', compact(
|
||||||
|
'blacklist_search',
|
||||||
|
'customer_info',
|
||||||
|
'search',
|
||||||
|
'noic',
|
||||||
|
'cawangan_info',
|
||||||
|
'bank',
|
||||||
|
'api_url',
|
||||||
|
'idtype',
|
||||||
|
'isAnggota',
|
||||||
|
'isPelanggan',
|
||||||
|
'isNewCustomer',
|
||||||
|
'showAssignAnggotaBtn',
|
||||||
|
'showDaftarPelangganBtn',
|
||||||
|
'auth_user'
|
||||||
|
));
|
||||||
|
} else {
|
||||||
|
// Simpan dalam session & redirect ke paparan info pelanggan
|
||||||
|
Session::put('customer_info', $customer_info);
|
||||||
|
return redirect()->route('customer_info')->with([
|
||||||
|
'customer_info' => $customer_info,
|
||||||
|
'cawangan_info' => $cawangan_info,
|
||||||
|
'api_url' => $api_url,
|
||||||
|
'isAnggota' => $isAnggota,
|
||||||
|
'isPelanggan' => $isPelanggan,
|
||||||
|
'isNewCustomer' => $isNewCustomer,
|
||||||
|
'showAssignAnggotaBtn' => $showAssignAnggotaBtn,
|
||||||
|
'showDaftarPelangganBtn' => $showDaftarPelangganBtn,
|
||||||
|
'auth_user' => $auth_user
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// Tiada customer dalam sistem
|
||||||
|
if ($blacklist) {
|
||||||
|
$blacklist_search = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return view('customers.' . $cawangan_info['version'] . '.index', compact(
|
||||||
|
'blacklist_search',
|
||||||
|
'customer_info',
|
||||||
|
'search',
|
||||||
|
'noic',
|
||||||
|
'cawangan_info',
|
||||||
|
'bank',
|
||||||
|
'api_url',
|
||||||
|
'idtype',
|
||||||
|
'pekerjaan',
|
||||||
|
'isAnggota',
|
||||||
|
'isPelanggan',
|
||||||
|
'isNewCustomer',
|
||||||
|
'showAssignAnggotaBtn',
|
||||||
|
'showDaftarPelangganBtn',
|
||||||
|
'auth_user'
|
||||||
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -119,9 +281,9 @@ class CustomersController extends Controller
|
|||||||
public function cari(Request $request)
|
public function cari(Request $request)
|
||||||
{
|
{
|
||||||
$api_url = config('api.url');
|
$api_url = config('api.url');
|
||||||
$customers_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/customers/'. $request->icno)->json();
|
$customers_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/customers/' . $request->icno)->json();
|
||||||
|
|
||||||
if(sizeof($customers_info) > 0)
|
if (sizeof($customers_info) > 0)
|
||||||
return $customers_info;
|
return $customers_info;
|
||||||
else
|
else
|
||||||
return response(["no-data"], 200);
|
return response(["no-data"], 200);
|
||||||
@@ -145,48 +307,47 @@ class CustomersController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function store(Request $request)
|
public function store(Request $request)
|
||||||
{
|
{
|
||||||
if($request->idtype == 'nokp'){
|
if ($request->idtype == 'nokp') {
|
||||||
$nokpbaru = $request->noic;
|
$nokpbaru = $request->noic;
|
||||||
$nokplama = '';
|
$nokplama = '';
|
||||||
}elseif($request->idtype == 'passport'){
|
} elseif ($request->idtype == 'passport') {
|
||||||
$nokpbaru = '';
|
$nokpbaru = '';
|
||||||
$nokplama = $request->noic;
|
$nokplama = $request->noic;
|
||||||
}
|
}
|
||||||
if($request->warganegara){
|
if ($request->warganegara) {
|
||||||
$warganegara = 'Y';
|
$warganegara = 'Y';
|
||||||
}else{
|
} else {
|
||||||
$warganegara = 'N';
|
$warganegara = 'N';
|
||||||
}
|
}
|
||||||
if($request->bumiputera){
|
if ($request->bumiputera) {
|
||||||
$bumiputera = 'Y';
|
$bumiputera = 'Y';
|
||||||
}else{
|
} else {
|
||||||
$bumiputera = 'N';
|
$bumiputera = 'N';
|
||||||
}
|
}
|
||||||
if($request->jantina == 'Lelaki'){
|
if ($request->jantina == 'Lelaki') {
|
||||||
$jantina = 'L';
|
$jantina = 'L';
|
||||||
}elseif($request->jantina == 'Perempuan'){
|
} elseif ($request->jantina == 'Perempuan') {
|
||||||
$jantina = 'P';
|
$jantina = 'P';
|
||||||
}
|
}
|
||||||
$split_date = explode('/',$request->tarikh_lahir);
|
$split_date = explode('/', $request->tarikh_lahir);
|
||||||
|
|
||||||
$tarikh_lahir = $split_date[2].'-'.$split_date[1].'-'.$split_date[0];
|
$tarikh_lahir = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0];
|
||||||
$tarikhlahir = Carbon::parse($tarikh_lahir);
|
$tarikhlahir = Carbon::parse($tarikh_lahir);
|
||||||
$auth_user = Auth::user();
|
$auth_user = Auth::user();
|
||||||
$latest_customer = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/customers/latest/' . $auth_user['cawangan'])->json();
|
$latest_customer = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/customers/latest/' . $auth_user['cawangan'])->json();
|
||||||
|
|
||||||
if($latest_customer == null){
|
if ($latest_customer == null) {
|
||||||
$nosiri_latest = 1;
|
$nosiri_latest = 1;
|
||||||
}
|
} else {
|
||||||
else{
|
$nosiri_latest = $latest_customer['nosiri'] + 1;
|
||||||
$nosiri_latest = $latest_customer['nosiri']+1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$count = sprintf("%08d", $nosiri_latest);
|
$count = sprintf("%08d", $nosiri_latest);
|
||||||
|
|
||||||
$no_pelanggan = $request->bangsa . substr($request->noic,6,2).'-'.$count;
|
$no_pelanggan = $request->bangsa . substr($request->noic, 6, 2) . '-' . $count;
|
||||||
$detail_poskod = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/poskod/' . $request->poskod)->json();
|
$detail_poskod = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/poskod/' . $request->poskod)->json();
|
||||||
|
|
||||||
if(empty($detail_poskod)){
|
if (empty($detail_poskod)) {
|
||||||
|
|
||||||
$detail_poskod = Http::withOptions(['verify' => config('app.api_verify')])
|
$detail_poskod = Http::withOptions(['verify' => config('app.api_verify')])
|
||||||
->post(config('api.url') . '/api/poskod', [
|
->post(config('api.url') . '/api/poskod', [
|
||||||
@@ -195,10 +356,9 @@ class CustomersController extends Controller
|
|||||||
'kodnegeri' => $request->kodnegeri,
|
'kodnegeri' => $request->kodnegeri,
|
||||||
'user' => auth()->user(),
|
'user' => auth()->user(),
|
||||||
])->json();
|
])->json();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$customer_info = Http::withOptions(['verify' => config('app.api_verify')])->post(config('api.url') . '/api/customers/create/'. $auth_user['cawangan'],[
|
$customer_info = Http::withOptions(['verify' => config('app.api_verify')])->post(config('api.url') . '/api/customers/create/' . $auth_user['cawangan'], [
|
||||||
'kodcaw' => $auth_user['cawangan'],
|
'kodcaw' => $auth_user['cawangan'],
|
||||||
'nopelanggan' => $no_pelanggan,
|
'nopelanggan' => $no_pelanggan,
|
||||||
'nokpbaru' => $nokpbaru,
|
'nokpbaru' => $nokpbaru,
|
||||||
@@ -220,60 +380,117 @@ class CustomersController extends Controller
|
|||||||
'teller' => $auth_user['name'],
|
'teller' => $auth_user['name'],
|
||||||
'telefon2' => $request->alternate_phone,
|
'telefon2' => $request->alternate_phone,
|
||||||
'nosiri' => $nosiri_latest,
|
'nosiri' => $nosiri_latest,
|
||||||
'nota'=>$request->nota,
|
'nota' => $request->nota,
|
||||||
'kodkerja'=>$request->pekerjaan,
|
'kodkerja' => $request->pekerjaan,
|
||||||
'nota_pekerjaan'=>$request->nota_pekerjaan,
|
'nota_pekerjaan' => $request->nota_pekerjaan,
|
||||||
'tujuangadai'=>$request->tujuan_gadai,
|
'notaarcc' => $request->notaarcc,
|
||||||
|
'tujuangadai' => $request->tujuan_gadai,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
Session::put('customer_info', $customer_info);
|
Session::put('customer_info', $customer_info);
|
||||||
Session::put('noic', $request->noic);
|
Session::put('noic', $request->noic);
|
||||||
|
|
||||||
event(new PelangganNotify('lulus',$auth_user['cawangan']));
|
event(new PelangganNotify('lulus', $auth_user['cawangan']));
|
||||||
return redirect()->route('customer_info')->with( ['customer_info' => $customer_info] );
|
return redirect()->route('customer_info')->with(['customer_info' => $customer_info]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getOTP(Request $request){
|
public function getOTP(Request $request)
|
||||||
|
{
|
||||||
$auth_user = Auth::user();
|
$auth_user = Auth::user();
|
||||||
$expired = Carbon::now();
|
$expired = Carbon::now();
|
||||||
$expired = new Carbon();
|
$expired = new Carbon();
|
||||||
$expired = $expired->addHours(24);
|
$expired = $expired->addHours(24);
|
||||||
$currentDateTime = Carbon::now();
|
$currentDateTime = Carbon::now();
|
||||||
|
|
||||||
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/' . $auth_user['cawangan'])->json();
|
||||||
$nama_cawangan = $cawangan_info["details_caw"];
|
$nama_cawangan = $cawangan_info["details_caw"];
|
||||||
|
|
||||||
$nokp = $request->noic_otp;
|
$nokp = $request->noic_otp;
|
||||||
$customer = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/customers/'.$nokp)->json();
|
$customer = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/customers/' . $nokp)->json();
|
||||||
$recipient = '6'.$customer['telefon'];
|
$recipient = '6' . $customer['telefon'];
|
||||||
// $recipient = '60189025461';
|
// $recipient = '60189025461';
|
||||||
//pembinaan token
|
//pembinaan token
|
||||||
function token($length) {
|
function token($length)
|
||||||
|
{
|
||||||
$characters = array(
|
$characters = array(
|
||||||
"A","B","C","D","E","F","G","H","J","K","L","M",
|
"A",
|
||||||
"N","P","Q","R","S","T","U","V","W","X","Y","Z",
|
"B",
|
||||||
"a","b","c","d","e","f","g","h","i","j","k","m",
|
"C",
|
||||||
"n","o","p","q","r","s","t","u","v","w","x","y","z",
|
"D",
|
||||||
"1","2","3","4","5","6","7","8","9");
|
"E",
|
||||||
|
"F",
|
||||||
|
"G",
|
||||||
|
"H",
|
||||||
|
"J",
|
||||||
|
"K",
|
||||||
|
"L",
|
||||||
|
"M",
|
||||||
|
"N",
|
||||||
|
"P",
|
||||||
|
"Q",
|
||||||
|
"R",
|
||||||
|
"S",
|
||||||
|
"T",
|
||||||
|
"U",
|
||||||
|
"V",
|
||||||
|
"W",
|
||||||
|
"X",
|
||||||
|
"Y",
|
||||||
|
"Z",
|
||||||
|
"a",
|
||||||
|
"b",
|
||||||
|
"c",
|
||||||
|
"d",
|
||||||
|
"e",
|
||||||
|
"f",
|
||||||
|
"g",
|
||||||
|
"h",
|
||||||
|
"i",
|
||||||
|
"j",
|
||||||
|
"k",
|
||||||
|
"m",
|
||||||
|
"n",
|
||||||
|
"o",
|
||||||
|
"p",
|
||||||
|
"q",
|
||||||
|
"r",
|
||||||
|
"s",
|
||||||
|
"t",
|
||||||
|
"u",
|
||||||
|
"v",
|
||||||
|
"w",
|
||||||
|
"x",
|
||||||
|
"y",
|
||||||
|
"z",
|
||||||
|
"1",
|
||||||
|
"2",
|
||||||
|
"3",
|
||||||
|
"4",
|
||||||
|
"5",
|
||||||
|
"6",
|
||||||
|
"7",
|
||||||
|
"8",
|
||||||
|
"9"
|
||||||
|
);
|
||||||
if ($length < 0 || $length > count($characters)) return null;
|
if ($length < 0 || $length > count($characters)) return null;
|
||||||
shuffle($characters);
|
shuffle($characters);
|
||||||
return implode("", array_slice($characters, 0, $length));
|
return implode("", array_slice($characters, 0, $length));
|
||||||
}
|
}
|
||||||
|
|
||||||
$otp_token = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/otp/' . $nokp) ->json();
|
$otp_token = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/otp/' . $nokp)->json();
|
||||||
$otp_token_used = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/otp/used/' . $nokp) ->json();
|
$otp_token_used = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/otp/used/' . $nokp)->json();
|
||||||
|
|
||||||
if (is_array($otp_token) || is_object($otp_token)){
|
if (is_array($otp_token) || is_object($otp_token)) {
|
||||||
if($otp_token){
|
if ($otp_token) {
|
||||||
return response(['error' => "OTP Akaun Telah Di Jana"]);
|
return response(['error' => "OTP Akaun Telah Di Jana"]);
|
||||||
}else{
|
} else {
|
||||||
if (is_array($otp_token_used) || is_object($otp_token_used)){
|
if (is_array($otp_token_used) || is_object($otp_token_used)) {
|
||||||
if($otp_token_used){
|
if ($otp_token_used) {
|
||||||
return response(['error' => "Pelanggan Sudah Mendaftar Pada Customer Portal"]);
|
return response(['error' => "Pelanggan Sudah Mendaftar Pada Customer Portal"]);
|
||||||
}else{
|
} else {
|
||||||
$random = token(6);
|
$random = token(6);
|
||||||
|
|
||||||
$otp_baru = Http::withOptions(['verify' => config('app.api_verify')])->post(config('api.url'). '/api/otp/generateotp/' . $nokp,[
|
$otp_baru = Http::withOptions(['verify' => config('app.api_verify')])->post(config('api.url') . '/api/otp/generateotp/' . $nokp, [
|
||||||
'otptoken' => $random,
|
'otptoken' => $random,
|
||||||
'expired' => $expired,
|
'expired' => $expired,
|
||||||
'kodcaw' => $auth_user['cawangan']
|
'kodcaw' => $auth_user['cawangan']
|
||||||
@@ -281,12 +498,12 @@ class CustomersController extends Controller
|
|||||||
// $message = "Your OTP code is " . $random;
|
// $message = "Your OTP code is " . $random;
|
||||||
$message = 'AR-RAHN PKB ' . $nama_cawangan . ' : OTP: ' . $random . ' ' . $currentDateTime . '. AR-RAHN CARELINE CENTRE 1300-22-4343';
|
$message = 'AR-RAHN PKB ' . $nama_cawangan . ' : OTP: ' . $random . ' ' . $currentDateTime . '. AR-RAHN CARELINE CENTRE 1300-22-4343';
|
||||||
$this->sendWhatsAppMessage($message, $recipient);
|
$this->sendWhatsAppMessage($message, $recipient);
|
||||||
return response()->json(['otp'=>$random]);
|
return response()->json(['otp' => $random]);
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
$random = token(6);
|
$random = token(6);
|
||||||
|
|
||||||
$otp_baru = Http::withOptions(['verify' => config('app.api_verify')])->post(config('api.url'). '/api/otp/generateotp/' . $nokp,[
|
$otp_baru = Http::withOptions(['verify' => config('app.api_verify')])->post(config('api.url') . '/api/otp/generateotp/' . $nokp, [
|
||||||
'otptoken' => $random,
|
'otptoken' => $random,
|
||||||
'expired' => $expired,
|
'expired' => $expired,
|
||||||
'kodcaw' => $auth_user['cawangan']
|
'kodcaw' => $auth_user['cawangan']
|
||||||
@@ -294,17 +511,17 @@ class CustomersController extends Controller
|
|||||||
// $message = "Your OTP code is " . $random;
|
// $message = "Your OTP code is " . $random;
|
||||||
$message = 'AR-RAHN PKB ' . $nama_cawangan . ' : OTP: ' . $random . ' ' . $currentDateTime . '. AR-RAHN CARELINE CENTRE 1300-22-4343';
|
$message = 'AR-RAHN PKB ' . $nama_cawangan . ' : OTP: ' . $random . ' ' . $currentDateTime . '. AR-RAHN CARELINE CENTRE 1300-22-4343';
|
||||||
$this->sendWhatsAppMessage($message, $recipient);
|
$this->sendWhatsAppMessage($message, $recipient);
|
||||||
return response()->json(['otp'=>$random]);
|
return response()->json(['otp' => $random]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
if (is_array($otp_token_used) || is_object($otp_token_used)){
|
if (is_array($otp_token_used) || is_object($otp_token_used)) {
|
||||||
if($otp_token_used){
|
if ($otp_token_used) {
|
||||||
return response(['error' => "Pelanggan Sudah Mendaftar Pada Customer Portal"]);
|
return response(['error' => "Pelanggan Sudah Mendaftar Pada Customer Portal"]);
|
||||||
}else{
|
} else {
|
||||||
$random = token(6);
|
$random = token(6);
|
||||||
|
|
||||||
$otp_baru = Http::withOptions(['verify' => config('app.api_verify')])->post(config('api.url'). '/api/otp/generateotp/' . $nokp,[
|
$otp_baru = Http::withOptions(['verify' => config('app.api_verify')])->post(config('api.url') . '/api/otp/generateotp/' . $nokp, [
|
||||||
'otptoken' => $random,
|
'otptoken' => $random,
|
||||||
'expired' => $expired,
|
'expired' => $expired,
|
||||||
'kodcaw' => $auth_user['cawangan']
|
'kodcaw' => $auth_user['cawangan']
|
||||||
@@ -312,12 +529,12 @@ class CustomersController extends Controller
|
|||||||
// $message = "Your OTP code is " . $random;
|
// $message = "Your OTP code is " . $random;
|
||||||
$message = 'AR-RAHN PKB ' . $nama_cawangan . ' : OTP: ' . $random . ' ' . $currentDateTime . '. AR-RAHN CARELINE CENTRE 1300-22-4343';
|
$message = 'AR-RAHN PKB ' . $nama_cawangan . ' : OTP: ' . $random . ' ' . $currentDateTime . '. AR-RAHN CARELINE CENTRE 1300-22-4343';
|
||||||
$this->sendWhatsAppMessage($message, $recipient);
|
$this->sendWhatsAppMessage($message, $recipient);
|
||||||
return response()->json(['otp'=>$random]);
|
return response()->json(['otp' => $random]);
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
$random = token(6);
|
$random = token(6);
|
||||||
|
|
||||||
$otp_baru = Http::withOptions(['verify' => config('app.api_verify')])->post(config('api.url'). '/api/otp/generateotp/' . $nokp,[
|
$otp_baru = Http::withOptions(['verify' => config('app.api_verify')])->post(config('api.url') . '/api/otp/generateotp/' . $nokp, [
|
||||||
'otptoken' => $random,
|
'otptoken' => $random,
|
||||||
'expired' => $expired,
|
'expired' => $expired,
|
||||||
'kodcaw' => $auth_user['cawangan']
|
'kodcaw' => $auth_user['cawangan']
|
||||||
@@ -325,23 +542,36 @@ class CustomersController extends Controller
|
|||||||
// $message = "Your OTP code is " . $random;
|
// $message = "Your OTP code is " . $random;
|
||||||
$message = 'AR-RAHN PKB ' . $nama_cawangan . ' : OTP: ' . $random . ' ' . $currentDateTime . '. AR-RAHN CARELINE CENTRE 1300-22-4343';
|
$message = 'AR-RAHN PKB ' . $nama_cawangan . ' : OTP: ' . $random . ' ' . $currentDateTime . '. AR-RAHN CARELINE CENTRE 1300-22-4343';
|
||||||
$this->sendWhatsAppMessage($message, $recipient);
|
$this->sendWhatsAppMessage($message, $recipient);
|
||||||
return response()->json(['otp'=>$random]);
|
return response()->json(['otp' => $random]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function sendWhatsAppMessage(string $message, string $recipient)
|
public function sendWhatsAppMessage(string $message, string $recipient)
|
||||||
{
|
{
|
||||||
$status = Http::withOptions(['verify' => config('app.api_verify')])->get('http://gateway.onewaysms.com.my:10001/api.aspx',[
|
$status = Http::withOptions(['verify' => config('app.api_verify')])->get('http://gateway.onewaysms.com.my:10001/api.aspx', [
|
||||||
'apiusername' => 'APIUK330HDAFO',
|
'apiusername' => 'APIUK330HDAFO',
|
||||||
'apipassword' => 'APIUK330HDAFOUK330',
|
'apipassword' => 'APIUK330HDAFOUK330',
|
||||||
'senderid' => 'INFO',
|
'senderid' => 'INFO',
|
||||||
'mobileno' => $recipient,
|
'mobileno' => $recipient,
|
||||||
'message'=> $message,
|
'message' => $message,
|
||||||
'languagetype'=> 1
|
'languagetype' => 1
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return ($status);
|
return ($status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function assignAnggota(Request $request)
|
||||||
|
{
|
||||||
|
$noic = $request->noic;
|
||||||
|
|
||||||
|
$response = Http::withOptions(['verify' => config('app.api_verify')])
|
||||||
|
->put(config('api.url') . '/api/customers/' . $noic . '/assign-anggota');
|
||||||
|
|
||||||
|
if ($response->successful()) {
|
||||||
|
return redirect()->back()->with('success', 'Pelanggan berjaya ditandakan sebagai anggota koperasi.');
|
||||||
|
} else {
|
||||||
|
return redirect()->back()->with('error', 'Gagal mengemaskini status anggota. Sila cuba semula.');
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,63 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use App\Services\CustomerService;
|
||||||
|
use Illuminate\Support\Facades\Session;
|
||||||
|
use Illuminate\Support\Facades\Http;
|
||||||
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
use Carbon\Carbon;
|
||||||
|
use PDO;
|
||||||
|
|
||||||
|
class HapusAnsuranController extends Controller
|
||||||
|
{
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->middleware('auth');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function createApproval(Request $request)
|
||||||
|
{
|
||||||
|
$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();
|
||||||
|
|
||||||
|
$norujukan = $request->norujukan;
|
||||||
|
$komen = $request->komen;
|
||||||
|
$marg = $request->margin;
|
||||||
|
$ber = $request->berat;
|
||||||
|
$nm = $request->nilaimarhun;
|
||||||
|
$status = $request->status;
|
||||||
|
$jumpinjam = $request->jumpinjam;
|
||||||
|
$teller = $request->teller;
|
||||||
|
$ansuran = $request->ansuran;
|
||||||
|
|
||||||
|
// Get the approval data
|
||||||
|
$approvalData = Http::withOptions(['verify' => config('app.api_verify')])
|
||||||
|
->get($api_url . '/api/hapusansuran/create', [
|
||||||
|
'cawangan' => $auth_user['cawangan'],
|
||||||
|
"norujukan" => $norujukan,
|
||||||
|
"komen" => $komen,
|
||||||
|
"margin" => $marg,
|
||||||
|
"berat" => $ber,
|
||||||
|
"nilaimarhun" => $nm,
|
||||||
|
"status" => $status,
|
||||||
|
"jumpinjam" => $jumpinjam,
|
||||||
|
"teller" => $teller,
|
||||||
|
"ansuran" => $ansuran,
|
||||||
|
])
|
||||||
|
->json();
|
||||||
|
|
||||||
|
if (isset($approvalData['status']) && $approvalData['status'] === 'success') {
|
||||||
|
Session::flash('success', 'Kelulusan berjaya dibuat.');
|
||||||
|
return redirect()->route('operasi.kelulusan');
|
||||||
|
} else {
|
||||||
|
Session::flash('error', 'Gagal membuat kelulusan. Sila cuba lagi.');
|
||||||
|
return redirect()->back();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -13,6 +13,7 @@ use App\Events\NotifikasiKelulusan;
|
|||||||
use App\Events\NotifikasiUbahHapus;
|
use App\Events\NotifikasiUbahHapus;
|
||||||
use App\Events\NotifikasiAGH;
|
use App\Events\NotifikasiAGH;
|
||||||
use App\Events\NotifikasiPetiBesi;
|
use App\Events\NotifikasiPetiBesi;
|
||||||
|
use App\Events\AutoSerahan;
|
||||||
|
|
||||||
use App\User;
|
use App\User;
|
||||||
use App\Cawangan;
|
use App\Cawangan;
|
||||||
@@ -215,7 +216,11 @@ class KhazanahController extends Controller
|
|||||||
$denominasi=$denominasi[0];
|
$denominasi=$denominasi[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
return view('khazanah.pendahuluanserahanmain',compact('cawangan_info','listgldetail','denominasi'));
|
$proses = Http::withOptions(['verify' => config('app.api_verify')])->get( config('api.url_koop') .'/api/autoserahan/checkapproval',[
|
||||||
|
'pc_name' => $auth_user['name']
|
||||||
|
])->json();
|
||||||
|
|
||||||
|
return view('khazanah.pendahuluanserahanmain',compact('cawangan_info','listgldetail','denominasi','proses'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -570,15 +575,9 @@ class KhazanahController extends Controller
|
|||||||
{
|
{
|
||||||
$auth_user = Auth::user();
|
$auth_user = Auth::user();
|
||||||
|
|
||||||
$api_url = config('api.url');
|
|
||||||
|
|
||||||
$norujukan = $request->norujukan;
|
$norujukan = $request->norujukan;
|
||||||
$pelulus = $request->pelulus;
|
$pelulus = $request->pelulus;
|
||||||
|
|
||||||
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
|
||||||
|
|
||||||
$getlulus = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/GetLulus/'. $auth_user['cawangan'],['norujukan' => $norujukan])->json();
|
|
||||||
|
|
||||||
if($request->khazanah != null)
|
if($request->khazanah != null)
|
||||||
{
|
{
|
||||||
if($request->batal != null)
|
if($request->batal != null)
|
||||||
@@ -587,25 +586,35 @@ class KhazanahController extends Controller
|
|||||||
$updatelulus = Http::withOptions(['verify' => config('app.api_verify')])->put(config('api.url') . '/api/UpdateKelulusan/kepohonan/' . $auth_user['cawangan'] . '/' . $norujukan,[
|
$updatelulus = Http::withOptions(['verify' => config('app.api_verify')])->put(config('api.url') . '/api/UpdateKelulusan/kepohonan/' . $auth_user['cawangan'] . '/' . $norujukan,[
|
||||||
"pembatalan" => $request->batal,
|
"pembatalan" => $request->batal,
|
||||||
"komen" => $request->komenubahhapus,
|
"komen" => $request->komenubahhapus,
|
||||||
"khazanah" => $request->khazanah
|
"khazanah" => $request->khazanah,
|
||||||
|
"recno" => isset($request->recno) ? $request->recno : null,
|
||||||
])->json();
|
])->json();
|
||||||
|
|
||||||
if($updatelulus)
|
if($updatelulus)
|
||||||
{
|
{
|
||||||
|
if(isset($request->tagoperasi) && $request->tagoperasi == 1){
|
||||||
|
event(new NotifikasiKelulusan($norujukan,"batal",$request->recno,$request->komenubahhapus,$request->teller));
|
||||||
|
}else{
|
||||||
event(new NotifikasiUbahHapus($norujukan,"batal",$request->komenubahhapus,$request->teller));
|
event(new NotifikasiUbahHapus($norujukan,"batal",$request->komenubahhapus,$request->teller));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
$updatelulus = Http::withOptions(['verify' => config('app.api_verify')])->put(config('api.url') . '/api/UpdateKelulusan/kepohonan/' . $auth_user['cawangan'] . '/' . $norujukan,[
|
$updatelulus = Http::withOptions(['verify' => config('app.api_verify')])->put(config('api.url') . '/api/UpdateKelulusan/kepohonan/' . $auth_user['cawangan'] . '/' . $norujukan,[
|
||||||
"khazanah" => $request->khazanah
|
"khazanah" => $request->khazanah,
|
||||||
|
"recno" => isset($request->recno) ? $request->recno : null,
|
||||||
])->json();
|
])->json();
|
||||||
|
|
||||||
if($updatelulus)
|
if($updatelulus)
|
||||||
{
|
{
|
||||||
|
if(isset($request->tagoperasi) && $request->tagoperasi == 1){
|
||||||
|
event(new NotifikasiKelulusan($norujukan,"lulus",$request->recno,$request->komenubahhapus,$request->teller,1));
|
||||||
|
}else{
|
||||||
event(new NotifikasiUbahHapus($norujukan,"lulus","tiada",$request->teller));
|
event(new NotifikasiUbahHapus($norujukan,"lulus","tiada",$request->teller));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if($pelulus == 'khazanah')
|
if($pelulus == 'khazanah')
|
||||||
@@ -3072,7 +3081,9 @@ class KhazanahController extends Controller
|
|||||||
$cawangan = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/cawangan/detail/'.$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];
|
$cawangan_detail=$cawangan[0];
|
||||||
|
|
||||||
return view('print.laporan_pendahuluanserahan', compact('pendser','cawangan_detail','tarikh_cetak','mula_date','hingga_date','api_url'));
|
$jenisLaporan = $request->radpendser;
|
||||||
|
|
||||||
|
return view('print.laporan_pendahuluanserahan', compact('pendser','cawangan_detail','tarikh_cetak','mula_date','hingga_date','api_url','jenisLaporan'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function laporanDenominasi()
|
public function laporanDenominasi()
|
||||||
@@ -4117,9 +4128,13 @@ class KhazanahController extends Controller
|
|||||||
|
|
||||||
if($request->radaktif === 'aktif')
|
if($request->radaktif === 'aktif')
|
||||||
{
|
{
|
||||||
$stokaudit = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/stokauditkhas/aktif/'. $auth_user['cawangan'],
|
// $stokaudit = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/stokauditkhas/aktif/'. $auth_user['cawangan'],
|
||||||
|
$stokaudit = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/stokauditkhasbynorujukan/aktif/'. $auth_user['cawangan'],
|
||||||
['daritempoh' => $daritempoh, 'hinggatempoh' => $hinggatempoh])->json();
|
['daritempoh' => $daritempoh, 'hinggatempoh' => $hinggatempoh])->json();
|
||||||
return view('print.laporan_stokauditkhas', compact('stokaudit','cawangan_detail','tarikh_cetak','daritempoh','hinggatempoh','api_url','cawangan_info'));
|
$stokaudit = collect($stokaudit)->sortByDesc('norujukan')->values()->all();
|
||||||
|
// dd($stokaudit);
|
||||||
|
// return view('print.laporan_stokauditkhas', compact('stokaudit','cawangan_detail','tarikh_cetak','daritempoh','hinggatempoh','api_url','cawangan_info'));
|
||||||
|
return view('print.laporan_stokauditkhasbysag', compact('stokaudit','cawangan_detail','tarikh_cetak','daritempoh','hinggatempoh','api_url','cawangan_info'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4137,11 +4152,13 @@ class KhazanahController extends Controller
|
|||||||
$cawangan=Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/cawangan/detail/'.$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];
|
$cawangan_detail=$cawangan[0];
|
||||||
|
|
||||||
$stokaudit = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/stokauditkhas/aktif/'. $auth_user['cawangan'],['daritempoh' => $daritempoh, 'hinggatempoh' => $hinggatempoh])->json();
|
// $stokaudit = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/stokauditkhas/aktif/'. $auth_user['cawangan'],['daritempoh' => $daritempoh, 'hinggatempoh' => $hinggatempoh])->json();
|
||||||
|
$stokaudit = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/stokauditkhasbynorujukan/aktif/'. $auth_user['cawangan'],['daritempoh' => $daritempoh, 'hinggatempoh' => $hinggatempoh])->json();
|
||||||
|
$stokaudit = collect($stokaudit)->sortByDesc('norujukan')->values()->all();
|
||||||
if($request->type == 'excel')
|
if($request->type == 'excel')
|
||||||
{
|
{
|
||||||
return view('excel.excel_stokauditkhas', compact('stokaudit','cawangan_detail','tarikh_cetak','daritempoh','hinggatempoh','api_url','cawangan_info'));
|
// return view('excel.excel_stokauditkhas', compact('stokaudit','cawangan_detail','tarikh_cetak','daritempoh','hinggatempoh','api_url','cawangan_info'));
|
||||||
|
return view('excel.excel_stokauditkhasbysag', compact('stokaudit','cawangan_detail','tarikh_cetak','daritempoh','hinggatempoh','api_url','cawangan_info'));
|
||||||
}
|
}
|
||||||
elseif($request->type == 'whatsapp')
|
elseif($request->type == 'whatsapp')
|
||||||
{
|
{
|
||||||
@@ -4160,8 +4177,11 @@ class KhazanahController extends Controller
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$stokaudit = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/stokauditkhas/aktif/'. $auth_user['cawangan'],['daritempoh' => $daritempoh, 'hinggatempoh' => $hinggatempoh])->json();
|
// $stokaudit = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/stokauditkhas/aktif/'. $auth_user['cawangan'],['daritempoh' => $daritempoh, 'hinggatempoh' => $hinggatempoh])->json();
|
||||||
return view('pdf.pdf_stokauditkhas', compact('stokaudit','cawangan_detail','tarikh_cetak','daritempoh','hinggatempoh','api_url','cawangan_info'));
|
$stokaudit = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/stokauditkhasbynorujukan/aktif/'. $auth_user['cawangan'],['daritempoh' => $daritempoh, 'hinggatempoh' => $hinggatempoh])->json();
|
||||||
|
$stokaudit = collect($stokaudit)->sortByDesc('norujukan')->values()->all();
|
||||||
|
// return view('pdf.pdf_stokauditkhas', compact('stokaudit','cawangan_detail','tarikh_cetak','daritempoh','hinggatempoh','api_url','cawangan_info'));
|
||||||
|
return view('pdf.pdf_stokauditkhasbysag', compact('stokaudit','cawangan_detail','tarikh_cetak','daritempoh','hinggatempoh','api_url','cawangan_info'));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4291,4 +4311,117 @@ class KhazanahController extends Controller
|
|||||||
$val = preg_replace('/\.(?=.*\.)/', '', $val);
|
$val = preg_replace('/\.(?=.*\.)/', '', $val);
|
||||||
return floatval($val);
|
return floatval($val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function AutoSerahan(Request $request)
|
||||||
|
{
|
||||||
|
if(isset($request->do_delete) && $request->do_delete == true){
|
||||||
|
|
||||||
|
$teller = $request->teller;
|
||||||
|
|
||||||
|
if ($teller !== html_entity_decode($teller, ENT_QUOTES | ENT_HTML5, 'UTF-8'))
|
||||||
|
$teller = html_entity_decode($teller, ENT_QUOTES | ENT_HTML5, 'UTF-8');
|
||||||
|
|
||||||
|
$call_approval_v3 = Http::withOptions(['verify' => config('app.api_verify')])
|
||||||
|
->post(config('api.url_koop') . '/api/autoserahan/delete', [
|
||||||
|
'recno' => $request->recno,
|
||||||
|
'version' => 'v3',
|
||||||
|
'kodcaw' => $request->kodcaw,
|
||||||
|
'teller' => $teller,
|
||||||
|
'amaun' => $request->amaun,
|
||||||
|
])->json();
|
||||||
|
|
||||||
|
return response()->json([
|
||||||
|
'status' => 'success',
|
||||||
|
'message' => 'Approval process completed successfully',
|
||||||
|
'id' => $call_approval_v3['id'],
|
||||||
|
]);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
$teller = $request->arraysend['teller'];
|
||||||
|
|
||||||
|
if ($teller !== html_entity_decode($teller, ENT_QUOTES | ENT_HTML5, 'UTF-8'))
|
||||||
|
$teller = html_entity_decode($teller, ENT_QUOTES | ENT_HTML5, 'UTF-8');
|
||||||
|
|
||||||
|
|
||||||
|
// Step 1: Call API v3 First
|
||||||
|
$call_approval_v3 = Http::withOptions(['verify' => config('app.api_verify')])
|
||||||
|
->post(config('api.url_koop') . '/api/autoserahan/create', [
|
||||||
|
'kodcaw' => $request->arraysend['kodcaw'],
|
||||||
|
'teller' => $teller,
|
||||||
|
'amaun' => $request->arraysend['amaun'],
|
||||||
|
'txtring1' => $request->arraysend['ambilanring1'],
|
||||||
|
'txtring5' => $request->arraysend['ambilanring5'],
|
||||||
|
'txtring10' => $request->arraysend['ambilanring10'],
|
||||||
|
'txtring20' => $request->arraysend['ambilanring20'],
|
||||||
|
'txtring50' => $request->arraysend['ambilanring50'],
|
||||||
|
'txtring100' => $request->arraysend['ambilanring100'],
|
||||||
|
'txtsen1' => $request->arraysend['ambilansen1'],
|
||||||
|
'txtsen5' => $request->arraysend['ambilansen5'],
|
||||||
|
'txtsen10' => $request->arraysend['ambilansen10'],
|
||||||
|
'txtsen20' => $request->arraysend['ambilansen20'],
|
||||||
|
'txtsen50' => $request->arraysend['ambilansen50'],
|
||||||
|
'jenis' => 'pendahuluan',
|
||||||
|
'action' => 'create',
|
||||||
|
'version' => 'v3',
|
||||||
|
])->json();
|
||||||
|
|
||||||
|
// Check if API v3 was successful before proceeding
|
||||||
|
if (!isset($call_approval_v3['id']) || $call_approval_v3['status'] !== 'success') {
|
||||||
|
return response()->json([
|
||||||
|
'status' => 'failed',
|
||||||
|
'message' => 'API v3 failed. Cannot proceed to API v2.',
|
||||||
|
'error' => $call_approval_v3
|
||||||
|
], 400);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Step 2: Call API v2 using response from API v3
|
||||||
|
$call_approval_v2 = Http::withOptions(['verify' => config('app.api_verify')])
|
||||||
|
->post(config('api.url_pkb') . '/api/autoserahan/create', [
|
||||||
|
'id' => $call_approval_v3['id'], // Use ID from API v3 response
|
||||||
|
'kodcaw' => $request->arraysend['kodcaw'],
|
||||||
|
'teller' => $teller,
|
||||||
|
'amaun' => $request->arraysend['amaun'],
|
||||||
|
'txtring1' => $request->arraysend['ambilanring1'],
|
||||||
|
'txtring5' => $request->arraysend['ambilanring5'],
|
||||||
|
'txtring10' => $request->arraysend['ambilanring10'],
|
||||||
|
'txtring20' => $request->arraysend['ambilanring20'],
|
||||||
|
'txtring50' => $request->arraysend['ambilanring50'],
|
||||||
|
'txtring100' => $request->arraysend['ambilanring100'],
|
||||||
|
'txtsen1' => $request->arraysend['ambilansen1'],
|
||||||
|
'txtsen5' => $request->arraysend['ambilansen5'],
|
||||||
|
'txtsen10' => $request->arraysend['ambilansen10'],
|
||||||
|
'txtsen20' => $request->arraysend['ambilansen20'],
|
||||||
|
'txtsen50' => $request->arraysend['ambilansen50'],
|
||||||
|
'jenis' => 'serahan',
|
||||||
|
'version' => 'v2',
|
||||||
|
])->json();
|
||||||
|
|
||||||
|
$call_set_approval_v3 = Http::withOptions(['verify' => config('app.api_verify')])
|
||||||
|
->put(config('api.url_koop') . '/api/autoserahan/setapproval', [
|
||||||
|
'jenis' => 'create',
|
||||||
|
'id' => $call_approval_v3['id'],
|
||||||
|
'deno_id' => $call_approval_v2['denoid']
|
||||||
|
])->json();
|
||||||
|
|
||||||
|
|
||||||
|
// Step 3: Check if both API v3 and API v2 were successful
|
||||||
|
if ($call_approval_v2['status'] === 'success' && $call_approval_v3['status'] === 'success' && $call_set_approval_v3['status'] === 'success') {
|
||||||
|
event(new AutoSerahan("Operasi",$call_approval_v3['id'],$request->arraysend['kodcaw'],$teller));
|
||||||
|
|
||||||
|
return response()->json([
|
||||||
|
'status' => 'success',
|
||||||
|
'message' => 'Approval process completed successfully',
|
||||||
|
'id' => $call_approval_v3['id'],
|
||||||
|
]);
|
||||||
|
} else {
|
||||||
|
return response()->json([
|
||||||
|
'status' => 'failed',
|
||||||
|
'message' => 'One of the approvals failed',
|
||||||
|
], 400);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ namespace App\Http\Controllers;
|
|||||||
use App\Events\OperasiNotice;
|
use App\Events\OperasiNotice;
|
||||||
use App\Events\StatusLiked;
|
use App\Events\StatusLiked;
|
||||||
use App\Events\NotifikasiKelulusan;
|
use App\Events\NotifikasiKelulusan;
|
||||||
|
use App\Events\NotifikasiAnggota;
|
||||||
use App\Events\Dashboard\KomoditiNotify;
|
use App\Events\Dashboard\KomoditiNotify;
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
@@ -16,6 +17,7 @@ use Illuminate\Support\Facades\Hash;
|
|||||||
|
|
||||||
|
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
class OperasiController extends Controller
|
class OperasiController extends Controller
|
||||||
{
|
{
|
||||||
@@ -24,26 +26,29 @@ class OperasiController extends Controller
|
|||||||
$this->middleware('auth');
|
$this->middleware('auth');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function kelulusan(Request $request){
|
public function kelulusan(Request $request)
|
||||||
|
{
|
||||||
$auth_user = Auth::user();
|
$auth_user = Auth::user();
|
||||||
$api_url = config('api.url');
|
$api_url = config('api.url');
|
||||||
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/' . $auth_user['cawangan'])->json();
|
||||||
|
|
||||||
$kelulusan = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/ListOperasi/')->json();
|
$kelulusan = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/ListOperasi/')->json();
|
||||||
|
|
||||||
$arraykelulusan = [];
|
$arraykelulusan = [];
|
||||||
|
|
||||||
|
|
||||||
foreach($kelulusan as $index=>$lulus)
|
foreach ($kelulusan as $index => $lulus) {
|
||||||
{
|
foreach ($lulus['kelulusanall'] as $index => $kel) {
|
||||||
foreach($lulus['kelulusanall'] as $index=>$kel)
|
array_push($arraykelulusan, ["cawangan" => $lulus['cawangan'], "cawangankod" => $lulus['cawangankod'], "namateller" => $kel['teller'], 'siri' => $kel['siri'], "norujukan" => $kel['norujukan'], 'pinjaman' => $kel['jumpinj'], 'komen' => $kel['komen'], 'nilaimarhun' => ($kel['nilaimarhun'] ?? '-'), 'berat' => ($kel['berat'] ?? '-'), 'margin' => ($kel['margin'] ?? '-'), 'status' => ($kel['status'] ?? '-'), 'pelulus' => $kel['pelulus']]);
|
||||||
{
|
}
|
||||||
array_push($arraykelulusan,["cawangan" => $lulus['cawangan'], "cawangankod" => $lulus['cawangankod'],"namateller" => $kel['teller'], 'siri' => $kel['siri'] , "norujukan" => $kel['norujukan'], 'pinjaman' => $kel['jumpinj'],'komen' => $kel['komen'], 'nilaimarhun' => ($kel['nilaimarhun'] ?? '-'), 'berat' => ($kel['berat'] ?? '-'),'margin' => ($kel['margin'] ?? '-'), 'status' => ($kel['status'] ?? '-'), 'pelulus' => $kel['pelulus']]);
|
|
||||||
|
foreach ($lulus['kelulusanMohonid'] as $index => $mohon) {
|
||||||
|
array_push($arraykelulusan, ["mohonid" => true, "ansuran" => $mohon['ansuran'], "cawangan" => $lulus['cawangan'], "cawangankod" => $lulus['cawangankod'], "namateller" => $mohon['teller'], 'recno' => $mohon['recno'], "norujukan" => $mohon['norujukan'], 'pinjaman' => $mohon['pinjaman'], 'komen' => $mohon['katalaluan'], 'nilaimarhun' => ($mohon['nilaimarhun'] ?? '-'), 'berat' => ($mohon['berat'] ?? '-'), 'margin' => ($mohon['margin'] ?? '-'), 'status' => ($mohon['mohon'] ?? '-')]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return view('operasi.kelulusan',compact('cawangan_info','api_url','arraykelulusan'));
|
return view('operasi.kelulusan', compact('cawangan_info', 'api_url', 'arraykelulusan'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getkelulusan(Request $request)
|
public function getkelulusan(Request $request)
|
||||||
@@ -53,16 +58,13 @@ class OperasiController extends Controller
|
|||||||
|
|
||||||
$norujukan = $request->norujukan;
|
$norujukan = $request->norujukan;
|
||||||
|
|
||||||
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/' . $auth_user['cawangan'])->json();
|
||||||
|
|
||||||
$kelulusan = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/SenaraiDahLulus/' . $auth_user['cawangan'] . '/' . $norujukan)->json();
|
$kelulusan = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/SenaraiDahLulus/' . $auth_user['cawangan'] . '/' . $norujukan)->json();
|
||||||
|
|
||||||
if(sizeof($kelulusan) > 0)
|
if (sizeof($kelulusan) > 0) {
|
||||||
{
|
|
||||||
$kelulusan = $kelulusan[0]['masalulus'];
|
$kelulusan = $kelulusan[0]['masalulus'];
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
$kelulusan = '';
|
$kelulusan = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,48 +80,147 @@ class OperasiController extends Controller
|
|||||||
$norujukan = $request->norujukan;
|
$norujukan = $request->norujukan;
|
||||||
|
|
||||||
|
|
||||||
if($request->pembatalan == null)
|
if ($request->pembatalan == null) {
|
||||||
{
|
if (!$request->taglulus) {
|
||||||
$updatelulus = Http::withOptions(['verify' => config('app.api_verify')])->put(config('api.url') . '/api/UpdateKelulusanKomen/' . $request->kodcaw . '/' . $norujukan,[
|
$updatelulus = Http::withOptions(['verify' => config('app.api_verify')])->put(config('api.url') . '/api/UpdateKelulusanKomen/' . $request->kodcaw . '/' . $norujukan, [
|
||||||
"komen" => $request->komenkelulusan,
|
"komen" => $request->komenkelulusan,
|
||||||
'siri' => $request->siri
|
'siri' => $request->siri
|
||||||
])->json();
|
])->json();
|
||||||
|
|
||||||
$updatelulus = Http::withOptions(['verify' => config('app.api_verify')])->put(config('api.url') . '/api/UpdateKelulusan/' . $request->kodcaw . '/' . $norujukan,[
|
$updatelulus = Http::withOptions(['verify' => config('app.api_verify')])->put(config('api.url') . '/api/UpdateKelulusan/' . $request->kodcaw . '/' . $norujukan, [
|
||||||
'sahkan' => 1,
|
'sahkan' => 1,
|
||||||
'namaoperasi' => $request->namaoperasi,
|
'namaoperasi' => $request->namaoperasi,
|
||||||
'siri' => $request->siri
|
'siri' => $request->siri
|
||||||
])->json();
|
])->json();
|
||||||
|
} else {
|
||||||
|
$updatelulus = Http::withOptions(['verify' => config('app.api_verify')])->put(config('api.url') . '/api/UpdateHapusAnsuran', [
|
||||||
|
'siri' => $request->siri,
|
||||||
|
"kodcaw" => $request->kodcaw,
|
||||||
|
"norujukan" => $request->norujukan,
|
||||||
|
'namaoperasi' => $request->namaoperasi,
|
||||||
|
'sahkan' => 1,
|
||||||
|
])->json();
|
||||||
|
}
|
||||||
|
|
||||||
if($updatelulus)
|
|
||||||
{
|
if ($updatelulus) {
|
||||||
event(new NotifikasiKelulusan($norujukan,"lulus",$request->siri,$request->komenkelulusan,$request->teller));
|
event(new NotifikasiKelulusan($norujukan, "lulus", $request->siri, $request->komenkelulusan, $request->teller));
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else
|
if (!$request->taglulus) {
|
||||||
{
|
$updatelulus = Http::withOptions(['verify' => config('app.api_verify')])->put(config('api.url') . '/api/UpdateKelulusanKomen/' . $request->kodcaw . '/' . $norujukan, [
|
||||||
$updatelulus = Http::withOptions(['verify' => config('app.api_verify')])->put(config('api.url') . '/api/UpdateKelulusanKomen/' . $request->kodcaw . '/' . $norujukan,[
|
|
||||||
"komen" => $request->komenkelulusan,
|
"komen" => $request->komenkelulusan,
|
||||||
'siri' => $request->siri
|
'siri' => $request->siri
|
||||||
])->json();
|
])->json();
|
||||||
|
|
||||||
$updatelulus = Http::withOptions(['verify' => config('app.api_verify')])->put(config('api.url') . '/api/UpdateKelulusan/' . $request->kodcaw . '/' . $norujukan,[
|
$updatelulus = Http::withOptions(['verify' => config('app.api_verify')])->put(config('api.url') . '/api/UpdateKelulusan/' . $request->kodcaw . '/' . $norujukan, [
|
||||||
'sahkan' => 2,
|
'sahkan' => 2,
|
||||||
'namaoperasi' => $request->namaoperasi,
|
'namaoperasi' => $request->namaoperasi,
|
||||||
'siri' => $request->siri
|
'siri' => $request->siri
|
||||||
])->json();
|
])->json();
|
||||||
|
} else {
|
||||||
|
$updatelulus = Http::withOptions(['verify' => config('app.api_verify')])->put(config('api.url') . '/api/UpdateHapusAnsuran', [
|
||||||
|
'siri' => $request->siri,
|
||||||
|
"kodcaw" => $request->kodcaw,
|
||||||
|
"norujukan" => $request->norujukan,
|
||||||
|
'namaoperasi' => $request->namaoperasi,
|
||||||
|
'sahkan' => 2,
|
||||||
|
])->json();
|
||||||
|
}
|
||||||
|
|
||||||
if($updatelulus)
|
if ($updatelulus) {
|
||||||
|
event(new NotifikasiKelulusan($norujukan, "batal", $request->siri, $request->komenkelulusan, $request->teller));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return response()->json($updatelulus, 200);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function updatekelulusananggota(Request $request)
|
||||||
{
|
{
|
||||||
event(new NotifikasiKelulusan($norujukan,"batal",$request->siri,$request->komenkelulusan,$request->teller));
|
$auth_user = Auth::user();
|
||||||
|
$api_url = config('api.url');
|
||||||
|
|
||||||
|
// Data asas
|
||||||
|
$nokp = $request->nokp;
|
||||||
|
$kodcaw = $request->kodcaw;
|
||||||
|
$komen = $request->komenkelulusan;
|
||||||
|
$namaoperasi = $request->namaoperasi;
|
||||||
|
$taglulus = $request->taglulus; // contoh: 'Y' = lulus, 'N' = batal
|
||||||
|
|
||||||
|
// 1️⃣ Tentukan status kelulusan
|
||||||
|
$status = ($taglulus == 'Y') ? 1 : 2; // 1 = Lulus, 2 = Batal/Tolak
|
||||||
|
|
||||||
|
try {
|
||||||
|
// 2️⃣ Panggil API baru — ikut route baru dengan {kodcaw}
|
||||||
|
$endpoint = $api_url . '/api/UpdateKelulusanAnggota/' . $kodcaw;
|
||||||
|
|
||||||
|
$payload = [
|
||||||
|
'nokp' => $nokp,
|
||||||
|
'komenkelulusan' => $komen,
|
||||||
|
'namaoperasi' => $namaoperasi,
|
||||||
|
'sahkan' => $status
|
||||||
|
];
|
||||||
|
|
||||||
|
Log::info('Menghantar permintaan ke API UpdateKelulusanAnggota', [
|
||||||
|
'endpoint' => $endpoint,
|
||||||
|
'payload' => $payload
|
||||||
|
]);
|
||||||
|
|
||||||
|
$response = Http::withOptions(['verify' => config('app.api_verify')])
|
||||||
|
->put($endpoint, $payload);
|
||||||
|
|
||||||
|
$updatelulus = $response->json();
|
||||||
|
|
||||||
|
// 3️⃣ Log hasil respon API
|
||||||
|
Log::info('Respon dari API UpdateKelulusanAnggota', [
|
||||||
|
'status' => $response->status(),
|
||||||
|
'body' => $updatelulus
|
||||||
|
]);
|
||||||
|
|
||||||
|
// 4️⃣ Jika berjaya, cipta event notifikasi
|
||||||
|
if ($response->successful() && $updatelulus && isset($updatelulus['success']) && $updatelulus['success'] === true) {
|
||||||
|
// $jenis = ($status == 1) ? 'lulus' : 'batal';
|
||||||
|
// event(new NotifikasiAnggota($nokp, $jenis, null, $komen, $namaoperasi));
|
||||||
|
|
||||||
|
$statusText = ($status == 1) ? 'DILULUSKAN' : 'DITOLAK';
|
||||||
|
event(new NotifikasiAnggota($nokp, $statusText, $komen, $namaoperasi));
|
||||||
|
|
||||||
|
|
||||||
|
Log::info('Event NotifikasiAnggota dispatched', [
|
||||||
|
'nokp' => $nokp,
|
||||||
|
'komen' => $komen,
|
||||||
|
'namaoperasi' => $namaoperasi
|
||||||
|
]);
|
||||||
|
} else {
|
||||||
|
Log::warning('Gagal kemas kini kelulusan anggota', [
|
||||||
|
'nokp' => $nokp,
|
||||||
|
'kodcaw' => $kodcaw,
|
||||||
|
'response' => $updatelulus
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return response()->json($updatelulus, $response->status());
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
Log::error('Ralat UpdateKelulusanAnggota (frontend)', [
|
||||||
|
'message' => $e->getMessage(),
|
||||||
|
'line' => $e->getLine()
|
||||||
|
]);
|
||||||
|
|
||||||
|
return response()->json([
|
||||||
|
'success' => false,
|
||||||
|
'message' => 'Ralat semasa menghantar kelulusan anggota.',
|
||||||
|
'error' => $e->getMessage()
|
||||||
|
], 500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return response()->json($updatelulus,200);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function createkelulusan(Request $request)
|
public function createkelulusan(Request $request)
|
||||||
{
|
{
|
||||||
@@ -131,14 +232,13 @@ class OperasiController extends Controller
|
|||||||
|
|
||||||
$norujukan = $request->norujukan;
|
$norujukan = $request->norujukan;
|
||||||
|
|
||||||
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/' . $auth_user['cawangan'])->json();
|
||||||
|
|
||||||
$getsiri = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/ListLatestLulus/'. $auth_user['cawangan'] . '/' . $norujukan)->json();
|
$getsiri = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/ListLatestLulus/' . $auth_user['cawangan'] . '/' . $norujukan)->json();
|
||||||
|
|
||||||
if(isset($getsiri['siri']))
|
if (isset($getsiri['siri'])) {
|
||||||
{
|
|
||||||
$siri = $getsiri['siri'] + 1;
|
$siri = $getsiri['siri'] + 1;
|
||||||
}else{
|
} else {
|
||||||
$siri = 1;
|
$siri = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -158,57 +258,110 @@ class OperasiController extends Controller
|
|||||||
|
|
||||||
])->json();
|
])->json();
|
||||||
|
|
||||||
event(new StatusLiked($auth_user['cawangan'],$auth_user['name']));
|
event(new StatusLiked($auth_user['cawangan'], $auth_user['name']));
|
||||||
|
|
||||||
return response()->json($siri,201);
|
return response()->json($siri, 201);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function createkelulusanAnggota(Request $request)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$auth_user = Auth::user();
|
||||||
|
$api_url = config('api.url');
|
||||||
|
$current = Carbon::now();
|
||||||
|
|
||||||
|
Log::info('createkelulusanAnggota', $request->all());
|
||||||
|
|
||||||
|
// Dapatkan maklumat cawangan
|
||||||
|
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])
|
||||||
|
->get($api_url . '/api/cawangan/' . $auth_user['cawangan'])
|
||||||
|
->json();
|
||||||
|
|
||||||
|
// Generate siri baru
|
||||||
|
$getsiri = Http::withOptions(['verify' => config('app.api_verify')])
|
||||||
|
->get($api_url . '/api/ListLatestLulus/' . $auth_user['cawangan'] . '/anggota')
|
||||||
|
->json();
|
||||||
|
|
||||||
|
$siri = isset($getsiri['siri']) ? $getsiri['siri'] + 1 : 1;
|
||||||
|
|
||||||
|
// Hantar ke API
|
||||||
|
$createlulus = Http::withOptions(['verify' => config('app.api_verify')])
|
||||||
|
->post($api_url . '/api/CreateKelulusanAnggota/' . $auth_user['cawangan'] . '/roles/operasi', [
|
||||||
|
'komen' => $request->komen,
|
||||||
|
'date_mohon' => $current->toDateString(),
|
||||||
|
'siri' => $siri,
|
||||||
|
'nokp' => $request->nokp,
|
||||||
|
'teller' => $request->teller,
|
||||||
|
'peloperasi' => 'operasi'
|
||||||
|
])
|
||||||
|
->json();
|
||||||
|
|
||||||
|
event(new StatusLiked($auth_user['cawangan'], $auth_user['name']));
|
||||||
|
|
||||||
|
return response()->json([
|
||||||
|
'success' => true,
|
||||||
|
'message' => 'Permohonan kelulusan anggota berjaya dihantar.',
|
||||||
|
'siri' => $siri,
|
||||||
|
'data' => $createlulus,
|
||||||
|
], 201);
|
||||||
|
|
||||||
|
Log::info('🛰️ API CreateKelulusanAnggota Response:', [
|
||||||
|
'status' => $response->status(),
|
||||||
|
'body' => $response->body(),
|
||||||
|
]);
|
||||||
|
} catch (\Throwable $th) {
|
||||||
|
Log::error('❌ createkelulusanAnggota error: ' . $th->getMessage());
|
||||||
|
return response()->json([
|
||||||
|
'success' => false,
|
||||||
|
'message' => $th->getMessage(),
|
||||||
|
], 500);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function mintakatalaluansemula(Request $request)
|
public function mintakatalaluansemula(Request $request)
|
||||||
{
|
{
|
||||||
|
|
||||||
if(Hash::check($request->passsemula, Auth::user()->password))
|
if (Hash::check($request->passsemula, Auth::user()->password)) {
|
||||||
{
|
|
||||||
return "True";
|
return "True";
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
return "False";
|
return "False";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function parameter()
|
public function parameter()
|
||||||
{
|
{
|
||||||
$auth_user = Auth::user();
|
$auth_user = Auth::user();
|
||||||
$api_url = config('api.url');
|
$api_url = config('api.url');
|
||||||
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/' . $auth_user['cawangan'])->json();
|
||||||
|
|
||||||
return view('operasi.parameter',compact('cawangan_info','api_url'));
|
return view('operasi.parameter', compact('cawangan_info', 'api_url'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function hargaemas()
|
public function hargaemas()
|
||||||
{
|
{
|
||||||
$auth_user = Auth::user();
|
$auth_user = Auth::user();
|
||||||
$api_url = config('api.url');
|
$api_url = config('api.url');
|
||||||
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/' . $auth_user['cawangan'])->json();
|
||||||
$harga_emas = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/harga_emas/')->json();
|
$harga_emas = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/harga_emas/')->json();
|
||||||
|
|
||||||
return view('operasi.hargaemas',compact('cawangan_info','api_url','harga_emas'));
|
return view('operasi.hargaemas', compact('cawangan_info', 'api_url', 'harga_emas'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function margin(){
|
public function margin()
|
||||||
|
{
|
||||||
$auth_user = Auth::user();
|
$auth_user = Auth::user();
|
||||||
$api_url = config('api.url');
|
$api_url = config('api.url');
|
||||||
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/' . $auth_user['cawangan'])->json();
|
||||||
$margin_pembiayaan = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/maxpinjaman')->json();
|
$margin_pembiayaan = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/maxpinjaman')->json();
|
||||||
return view('operasi.margin_pembiayaan',compact('cawangan_info','api_url','margin_pembiayaan'));
|
return view('operasi.margin_pembiayaan', compact('cawangan_info', 'api_url', 'margin_pembiayaan'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function kelulusanrekodlepas()
|
public function kelulusanrekodlepas()
|
||||||
{
|
{
|
||||||
$auth_user = Auth::user();
|
$auth_user = Auth::user();
|
||||||
$api_url = config('api.url');
|
$api_url = config('api.url');
|
||||||
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/' . $auth_user['cawangan'])->json();
|
||||||
|
|
||||||
//declare array baru
|
//declare array baru
|
||||||
$arraykelulusan = [];
|
$arraykelulusan = [];
|
||||||
@@ -216,29 +369,36 @@ class OperasiController extends Controller
|
|||||||
$kelulusan = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/ListOperasiKelulusan/')->json();
|
$kelulusan = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/ListOperasiKelulusan/')->json();
|
||||||
|
|
||||||
|
|
||||||
foreach($kelulusan as $index=>$k)
|
foreach ($kelulusan as $index => $k) {
|
||||||
{
|
foreach ($k['kelulusanall'] as $index1 => $kel) {
|
||||||
foreach($k['kelulusanall'] as $index1=>$kel)
|
$komen = explode("|", $kel['komen']);
|
||||||
{
|
|
||||||
$komen = explode("|",$kel['komen']);
|
|
||||||
|
|
||||||
$results=array_search("",$komen,true);
|
$results = array_search("", $komen, true);
|
||||||
if($results !== false) {
|
if ($results !== false) {
|
||||||
unset($komen[$results]);
|
unset($komen[$results]);
|
||||||
}
|
}
|
||||||
|
|
||||||
array_push($arraykelulusan,['norujukan' => $kel['norujukan'], 'pinjaman' => $kel['jumpinj'], 'nilaimarhun' => ($komen[1] ?? $kel['nilaimarhun'] ?? '-'), 'berat' => ($komen[2] ?? $kel['berat'] ?? '-'),'margin' => ($komen[3] ?? $kel['margin'] ?? '-'), 'komen' => ($komen[0] ?? $kel['komen'] ?? '-'), 'status' => ($kel['status'] ?? '-'), 'pelulus' => $kel['operasi'],]);
|
array_push($arraykelulusan, ['norujukan' => $kel['norujukan'], 'pinjaman' => $kel['jumpinj'], 'nilaimarhun' => ($komen[1] ?? $kel['nilaimarhun'] ?? '-'), 'berat' => ($komen[2] ?? $kel['berat'] ?? '-'), 'margin' => ($komen[3] ?? $kel['margin'] ?? '-'), 'komen' => ($komen[0] ?? $kel['komen'] ?? '-'), 'status' => ($kel['status'] ?? '-'), 'pelulus' => $kel['operasi'],]);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return view('operasi.rekodtelahlulus',compact('cawangan_info','api_url','arraykelulusan'));
|
return view('operasi.rekodtelahlulus', compact('cawangan_info', 'api_url', 'arraykelulusan'));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function notifyKomoditi()
|
public function notifyKomoditi()
|
||||||
{
|
{
|
||||||
$auth_user = Auth::user();
|
$auth_user = Auth::user();
|
||||||
event(new KomoditiNotify('lulus',$auth_user['cawangan']));
|
event(new KomoditiNotify('lulus', $auth_user['cawangan']));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function kelulusananggota(Request $request)
|
||||||
|
{
|
||||||
|
$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();
|
||||||
|
|
||||||
|
$arraykelulusan = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/list/approval/anggota')->json();
|
||||||
|
|
||||||
|
return view('operasi.kelulusan_anggota', compact('cawangan_info', 'api_url', 'arraykelulusan'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Imports;
|
||||||
|
|
||||||
|
use App\Anggota;
|
||||||
|
use Maatwebsite\Excel\Concerns\ToModel;
|
||||||
|
|
||||||
|
class AnggotaImport implements ToModel
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @param array $row
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Database\Eloquent\Model|null
|
||||||
|
*/
|
||||||
|
public function model(array $row)
|
||||||
|
{
|
||||||
|
return new Anggota([
|
||||||
|
//
|
||||||
|
'noic' => $row['noic'],
|
||||||
|
'nama' => $row['nama'],
|
||||||
|
'status' => $row['status'] ?? 'aktif',
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -287,7 +287,12 @@ class ImbangdugaServices
|
|||||||
foreach($response as $variable=>$res)
|
foreach($response as $variable=>$res)
|
||||||
{
|
{
|
||||||
if($variable !== 'recno' && $variable !== 'kodcaw' && $variable !== 'tarikh' && $variable !== 'totalharta' && $variable !== 'totaltanggungan' && $variable !== 'tagtally' && $variable !== 'created_at' && $variable !== 'updated_at'){
|
if($variable !== 'recno' && $variable !== 'kodcaw' && $variable !== 'tarikh' && $variable !== 'totalharta' && $variable !== 'totaltanggungan' && $variable !== 'tagtally' && $variable !== 'created_at' && $variable !== 'updated_at'){
|
||||||
|
//$imbangdugadata = ImbangDuga::orderBy('glcode')->where('variable',$variable)->orWhere('single_var',$variable)->first()->toArray();
|
||||||
|
if($variable == 'bakilelong'){
|
||||||
|
$imbangdugadata = ImbangDuga::orderBy('glcode')->where([['single_var',$variable],['variable',$variable]])->first()->toArray();
|
||||||
|
}else{
|
||||||
$imbangdugadata = ImbangDuga::orderBy('glcode')->where('variable',$variable)->orWhere('single_var',$variable)->first()->toArray();
|
$imbangdugadata = ImbangDuga::orderBy('glcode')->where('variable',$variable)->orWhere('single_var',$variable)->first()->toArray();
|
||||||
|
}
|
||||||
if($imbangdugadata['jenis'] == 'harta'){
|
if($imbangdugadata['jenis'] == 'harta'){
|
||||||
array_push($array_harta,['glcode' => $imbangdugadata['glcode'],'descpt' => $imbangdugadata['descpt'],'amaun' => $res]);
|
array_push($array_harta,['glcode' => $imbangdugadata['glcode'],'descpt' => $imbangdugadata['descpt'],'amaun' => $res]);
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\View\Components;
|
||||||
|
|
||||||
|
use Illuminate\View\Component;
|
||||||
|
|
||||||
|
class AutoSerah extends Component
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Create a new component instance.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the view / contents that represent the component.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\View\View|string
|
||||||
|
*/
|
||||||
|
public function render()
|
||||||
|
{
|
||||||
|
return view('components.auto-serah');
|
||||||
|
}
|
||||||
|
}
|
||||||
+3
-1
@@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
return [
|
return [
|
||||||
'url' => env('API_URL')
|
'url' => env('API_URL'),
|
||||||
|
'url_koop' => env('API_URL_KOOP','https://apiujrah.erahn.com.my'),
|
||||||
|
'url_pkb' => env('API_URL_PKB','http://localhost:8000'),
|
||||||
];
|
];
|
||||||
@@ -1,9 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
return [
|
return [
|
||||||
'enable_tambahpinjam' => env('ENABLE_TAMBAHPINJAM',1),
|
'enable_tambahpinjam' => env('ENABLE_TAMBAHPINJAM',0),
|
||||||
'enable_separuh' => env('ENABLE_SEPARUH',1),
|
'enable_separuh' => env('ENABLE_SEPARUH',0),
|
||||||
'enable_pembiayaansemula' => env('ENABLE_AUTOTAWARRUQ',1),
|
'enable_pembiayaansemula' => env('ENABLE_AUTOTAWARRUQ',0),
|
||||||
// 'enable_specific_block' => env('ENABLE_BLOCK',0),
|
// 'enable_specific_block' => env('ENABLE_BLOCK',0),
|
||||||
'cawangan_block' => explode(',', env('CAWANGAN_BLOCK', '1STOP,010915,010219,011013,011412,010621,010620,010617,010618')),
|
'ansuran_block' => explode(',', env('ANSURAN_BLOCK', '011227')),
|
||||||
|
'cawangan_block' => explode(',', env('CAWANGAN_BLOCK', 'KB2,WCY,1STOP,020301,WB,ALS,020306,ARM,APM,010311,GC,JLI,ARP,010621,011227,010620,010617,010915,011228,010219,011229,011230,011013,011412,011231,011232,020303,010618,KB1,011238,011235,010136,011233,011234,011237')),
|
||||||
];
|
];
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -0,0 +1,50 @@
|
|||||||
|
APP_NAME=Laravel
|
||||||
|
APP_ENV=local
|
||||||
|
APP_KEY=base64:FFRogE6mJj8FaDSSHl/KpXpzqi2M+P4plxVSRgVM8JI=
|
||||||
|
APP_DEBUG=true
|
||||||
|
APP_URL=http://kaunterv2.localhost
|
||||||
|
API_URL=http://apiv2.localhost
|
||||||
|
API_ARRAHNBID=http://lelong.localhost/api/
|
||||||
|
|
||||||
|
LOG_CHANNEL=stack
|
||||||
|
|
||||||
|
DB_CONNECTION=mysql
|
||||||
|
DB_HOST=database_zone2
|
||||||
|
DB_PORT=3306
|
||||||
|
DB_DATABASE=kaunterpkb
|
||||||
|
DB_USERNAME=root
|
||||||
|
DB_PASSWORD=secret
|
||||||
|
|
||||||
|
BROADCAST_DRIVER=pusher
|
||||||
|
CACHE_DRIVER=file
|
||||||
|
QUEUE_CONNECTION=sync
|
||||||
|
SESSION_DRIVER=file
|
||||||
|
SESSION_LIFETIME=120
|
||||||
|
|
||||||
|
REDIS_HOST=127.0.0.1
|
||||||
|
REDIS_PASSWORD=null
|
||||||
|
REDIS_PORT=6379
|
||||||
|
|
||||||
|
PUSHER_APP_ID=1132718
|
||||||
|
PUSHER_APP_KEY=26b0ec2f297f94b7aa9b
|
||||||
|
PUSHER_APP_SECRET=421b61fb5a8ecce477a6
|
||||||
|
|
||||||
|
MAIL_MAILER=smtp
|
||||||
|
MAIL_HOST=smtp.mailtrap.io
|
||||||
|
MAIL_PORT=2525
|
||||||
|
MAIL_USERNAME=null
|
||||||
|
MAIL_PASSWORD=null
|
||||||
|
MAIL_ENCRYPTION=null
|
||||||
|
MAIL_FROM_ADDRESS=null
|
||||||
|
MAIL_FROM_NAME="${APP_NAME}"
|
||||||
|
|
||||||
|
AWS_ACCESS_KEY_ID=
|
||||||
|
AWS_SECRET_ACCESS_KEY=
|
||||||
|
AWS_DEFAULT_REGION=us-east-1
|
||||||
|
AWS_BUCKET=
|
||||||
|
|
||||||
|
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
|
||||||
|
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
|
||||||
|
|
||||||
|
MYKAD_READER_PORT=8085
|
||||||
|
MYKAD_READER_ENABLED_CAWANGAN='' # IF NO CAWANGAN STATED, ALL CAWANGAN IS ENABLED
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
APP_NAME=Laravel
|
||||||
|
APP_ENV=local
|
||||||
|
APP_KEY=base64:FFRogE6mJj8FaDSSHl/KpXpzqi2M+P4plxVSRgVM8JI=
|
||||||
|
APP_DEBUG=true
|
||||||
|
APP_URL=http://kaunterv2.localhost
|
||||||
|
API_URL=http://apiv2.kgmk.localhost
|
||||||
|
API_ARRAHNBID=http://lelong.localhost/api/
|
||||||
|
|
||||||
|
LOG_CHANNEL=stack
|
||||||
|
|
||||||
|
DB_CONNECTION=mysql
|
||||||
|
DB_HOST=database_zone_franchise
|
||||||
|
DB_PORT=3306
|
||||||
|
DB_DATABASE=kaunter_koopguru
|
||||||
|
DB_USERNAME=root
|
||||||
|
DB_PASSWORD=secret
|
||||||
|
|
||||||
|
BROADCAST_DRIVER=pusher
|
||||||
|
CACHE_DRIVER=file
|
||||||
|
QUEUE_CONNECTION=sync
|
||||||
|
SESSION_DRIVER=file
|
||||||
|
SESSION_LIFETIME=120
|
||||||
|
|
||||||
|
REDIS_HOST=127.0.0.1
|
||||||
|
REDIS_PASSWORD=null
|
||||||
|
REDIS_PORT=6379
|
||||||
|
|
||||||
|
PUSHER_APP_ID=1132718
|
||||||
|
PUSHER_APP_KEY=26b0ec2f297f94b7aa9b
|
||||||
|
PUSHER_APP_SECRET=421b61fb5a8ecce477a6
|
||||||
|
|
||||||
|
MAIL_MAILER=smtp
|
||||||
|
MAIL_HOST=smtp.mailtrap.io
|
||||||
|
MAIL_PORT=2525
|
||||||
|
MAIL_USERNAME=null
|
||||||
|
MAIL_PASSWORD=null
|
||||||
|
MAIL_ENCRYPTION=null
|
||||||
|
MAIL_FROM_ADDRESS=null
|
||||||
|
MAIL_FROM_NAME="${APP_NAME}"
|
||||||
|
|
||||||
|
AWS_ACCESS_KEY_ID=
|
||||||
|
AWS_SECRET_ACCESS_KEY=
|
||||||
|
AWS_DEFAULT_REGION=us-east-1
|
||||||
|
AWS_BUCKET=
|
||||||
|
|
||||||
|
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
|
||||||
|
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
|
||||||
|
|
||||||
|
MYKAD_READER_PORT=8085
|
||||||
|
MYKAD_READER_ENABLED_CAWANGAN='' # IF NO CAWANGAN STATED, ALL CAWANGAN IS ENABLED
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
APP_NAME=Laravel
|
||||||
|
APP_ENV=local
|
||||||
|
APP_KEY=base64:FFRogE6mJj8FaDSSHl/KpXpzqi2M+P4plxVSRgVM8JI=
|
||||||
|
APP_DEBUG=true
|
||||||
|
APP_URL=http://kaunterv2.localhost
|
||||||
|
API_URL=http://apiv2.krk.localhost
|
||||||
|
API_ARRAHNBID=http://lelong.localhost/api/
|
||||||
|
|
||||||
|
LOG_CHANNEL=stack
|
||||||
|
|
||||||
|
DB_CONNECTION=mysql
|
||||||
|
DB_HOST=database_zone_franchise
|
||||||
|
DB_PORT=3306
|
||||||
|
DB_DATABASE=kaunter_krk
|
||||||
|
DB_USERNAME=root
|
||||||
|
DB_PASSWORD=secret
|
||||||
|
|
||||||
|
BROADCAST_DRIVER=pusher
|
||||||
|
CACHE_DRIVER=file
|
||||||
|
QUEUE_CONNECTION=sync
|
||||||
|
SESSION_DRIVER=file
|
||||||
|
SESSION_LIFETIME=120
|
||||||
|
|
||||||
|
REDIS_HOST=127.0.0.1
|
||||||
|
REDIS_PASSWORD=null
|
||||||
|
REDIS_PORT=6379
|
||||||
|
|
||||||
|
PUSHER_APP_ID=1132718
|
||||||
|
PUSHER_APP_KEY=26b0ec2f297f94b7aa9b
|
||||||
|
PUSHER_APP_SECRET=421b61fb5a8ecce477a6
|
||||||
|
|
||||||
|
MAIL_MAILER=smtp
|
||||||
|
MAIL_HOST=smtp.mailtrap.io
|
||||||
|
MAIL_PORT=2525
|
||||||
|
MAIL_USERNAME=null
|
||||||
|
MAIL_PASSWORD=null
|
||||||
|
MAIL_ENCRYPTION=null
|
||||||
|
MAIL_FROM_ADDRESS=null
|
||||||
|
MAIL_FROM_NAME="${APP_NAME}"
|
||||||
|
|
||||||
|
AWS_ACCESS_KEY_ID=
|
||||||
|
AWS_SECRET_ACCESS_KEY=
|
||||||
|
AWS_DEFAULT_REGION=us-east-1
|
||||||
|
AWS_BUCKET=
|
||||||
|
|
||||||
|
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
|
||||||
|
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
|
||||||
|
|
||||||
|
MYKAD_READER_PORT=8085
|
||||||
|
MYKAD_READER_ENABLED_CAWANGAN='' # IF NO CAWANGAN STATED, ALL CAWANGAN IS ENABLED
|
||||||
Vendored
+3
-3
@@ -17,14 +17,14 @@ const Toast = Swal.mixin({
|
|||||||
|
|
||||||
const notify = new NotifyKhazanah(channel,event,apikey);
|
const notify = new NotifyKhazanah(channel,event,apikey);
|
||||||
notify.channel_subscribe((data) => {
|
notify.channel_subscribe((data) => {
|
||||||
console.log(data);
|
const currentPath = window.location.pathname;
|
||||||
|
|
||||||
|
if(window.kodcaw == data.cawangan){
|
||||||
Toast.fire({
|
Toast.fire({
|
||||||
icon: 'info',
|
icon: 'info',
|
||||||
title: 'Permohonan Kelulusan Wang Tunai Teller!'
|
title: 'Permohonan Kelulusan Wang Tunai Teller!'
|
||||||
});
|
});
|
||||||
const currentPath = window.location.pathname;
|
|
||||||
|
|
||||||
if(window.kodcaw == data.cawangan){
|
|
||||||
if (currentPath === "/home") {
|
if (currentPath === "/home") {
|
||||||
notify_main();
|
notify_main();
|
||||||
} else if (currentPath === "/menu") {
|
} else if (currentPath === "/menu") {
|
||||||
|
|||||||
@@ -81,8 +81,10 @@
|
|||||||
<div class="card card-plain mt-8">
|
<div class="card card-plain mt-8">
|
||||||
<div class="card-header pb-0 text-left">
|
<div class="card-header pb-0 text-left">
|
||||||
<div style="display: flex; justify-content:space-between; align-items:center">
|
<div style="display: flex; justify-content:space-between; align-items:center">
|
||||||
<h1 class="font-weight-bolder text-info text-gradient">arOS v2.2</h1>
|
<h1 class="font-weight-bolder text-info text-gradient" style="word-break: break-word; white-space: nowrap;">
|
||||||
<img src="{{ asset('img/icon_pkb.png') }}" alt="logo-arrahn" style="width: 85px">
|
Kaunter arOS v2.2
|
||||||
|
</h1>
|
||||||
|
<img src="{{ asset('img/icon_pkb.png') }}" alt="logo-arrahn" style="width: 85px; margin-left: 30px;">
|
||||||
</div>
|
</div>
|
||||||
<p class="mb-0">Adil . Telus . Mudah</p>
|
<p class="mb-0">Adil . Telus . Mudah</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -230,17 +230,17 @@
|
|||||||
dom: 'Bfrtip',
|
dom: 'Bfrtip',
|
||||||
buttons: [
|
buttons: [
|
||||||
|
|
||||||
// {
|
{
|
||||||
// className: 'btn btn-outline-success pl-4 pr-4 btn-sm export',
|
className: 'btn btn-outline-success pl-4 pr-4 btn-sm export',
|
||||||
// target: "_blank",
|
target: "_blank",
|
||||||
// titleAttr: 'Export to Excel',
|
titleAttr: 'Export to Excel',
|
||||||
// text: '<h8><b>EXCEL</b></h8>',
|
text: '<h8><b>EXCEL</b></h8>',
|
||||||
// action: function ( e, dt, node, config ) {
|
action: function ( e, dt, node, config ) {
|
||||||
// $('#typedonwload').val('excel');
|
$('#typedonwload').val('excel');
|
||||||
// $("#exportpdf").submit();
|
$("#exportpdf").submit();
|
||||||
// // window.open("_blank");
|
// window.open("_blank");
|
||||||
// }
|
}
|
||||||
// },
|
},
|
||||||
{
|
{
|
||||||
className: 'btn btn-outline-danger pl-4 pr-4 btn-sm export',
|
className: 'btn btn-outline-danger pl-4 pr-4 btn-sm export',
|
||||||
titleAttr: 'Export to PDF',
|
titleAttr: 'Export to PDF',
|
||||||
@@ -251,22 +251,22 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
className: 'btn btn-outline-info pl-4 pr-4 btn-sm export',
|
// className: 'btn btn-outline-info pl-4 pr-4 btn-sm export',
|
||||||
target: "_blank",
|
// target: "_blank",
|
||||||
titleAttr: 'Blast Whatsapp',
|
// titleAttr: 'Blast Whatsapp',
|
||||||
text: '<h8><b>WHATSAPP & SMS</b></h8>',
|
// text: '<h8><b>WHATSAPP & SMS</b></h8>',
|
||||||
action: function ( e, dt, node, config ) {
|
// action: function ( e, dt, node, config ) {
|
||||||
|
// // $('#typedonwload').val('whatsapp');
|
||||||
|
// // $("#exportpdf").submit();
|
||||||
|
// $("#exportpdf").click(function() {
|
||||||
|
// $('[data-toggle="tooltip"]').tooltip()
|
||||||
|
// alert("ADAKAH ANDA PASTI?");
|
||||||
// $('#typedonwload').val('whatsapp');
|
// $('#typedonwload').val('whatsapp');
|
||||||
// $("#exportpdf").submit();
|
// $("#exportpdf").submit();
|
||||||
$("#exportpdf").click(function() {
|
// });
|
||||||
$('[data-toggle="tooltip"]').tooltip()
|
// }
|
||||||
alert("ADAKAH ANDA PASTI?");
|
// }
|
||||||
$('#typedonwload').val('whatsapp');
|
|
||||||
$("#exportpdf").submit();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -284,22 +284,22 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
className: 'btn btn-outline-info pl-4 pr-4 btn-sm export',
|
// className: 'btn btn-outline-info pl-4 pr-4 btn-sm export',
|
||||||
target: "_blank",
|
// target: "_blank",
|
||||||
titleAttr: 'Blast Whatsapp',
|
// titleAttr: 'Blast Whatsapp',
|
||||||
text: '<h8><b>WHATSAPP & SMS</b></h8>',
|
// text: '<h8><b>WHATSAPP & SMS</b></h8>',
|
||||||
action: function ( e, dt, node, config ) {
|
// action: function ( e, dt, node, config ) {
|
||||||
|
// // $('#typedonwload').val('whatsapp');
|
||||||
|
// // $("#exportpdf").submit();
|
||||||
|
// $("#exportpdf").click(function() {
|
||||||
|
// $('[data-toggle="tooltip"]').tooltip()
|
||||||
|
// alert("ADAKAH ANDA PASTI?");
|
||||||
// $('#typedonwload').val('whatsapp');
|
// $('#typedonwload').val('whatsapp');
|
||||||
// $("#exportpdf").submit();
|
// $("#exportpdf").submit();
|
||||||
$("#exportpdf").click(function() {
|
// });
|
||||||
$('[data-toggle="tooltip"]').tooltip()
|
// }
|
||||||
alert("ADAKAH ANDA PASTI?");
|
// }
|
||||||
$('#typedonwload').val('whatsapp');
|
|
||||||
$("#exportpdf").submit();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,33 @@
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
<style>
|
||||||
|
#loadingOverlay {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
z-index: 9999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.overlay-background {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
background-color: rgba(0, 0, 0, 0.5);
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.overlay-spinner {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
@@ -21,16 +48,17 @@
|
|||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<h5 class="text-uppercase">Pilih Cawangan Dan Masukkan nombor kad pengenalan</h5>
|
<h5 class="text-uppercase">Pilih Cawangan Dan Nombor Kad Pengenalan</h5>
|
||||||
<form name="frmsearch" onsubmit="verifynokp()" action="{{ route('arcc.searchpelanggan') }}" method="GET">
|
<form id="searchForm" name="frmsearch" onsubmit="return verifynokp(event)" action="{{ route('arcc.searchpelanggan') }}" method="GET">
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
<div class="input-group my-3">
|
<div class="input-group my-3">
|
||||||
<div class='col-md-4'>
|
<!-- Cawangan dropdown tetap sama -->
|
||||||
|
<div class="col-md-4">
|
||||||
@php
|
@php
|
||||||
$cawangan_all = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/arcc/cawangan')->json();
|
$cawangan_all = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/arcc/cawangan')->json();
|
||||||
@endphp
|
@endphp
|
||||||
<select class="form-control" name="cawangan" data-placeholder="Pilih Cawangan" id="cawangan">
|
<select class="form-control" name="cawangan" id="cawangan">
|
||||||
<option disabled selected value>--Cawangan--</option>
|
<option disabled selected value>--Cawangan--</option>
|
||||||
@foreach($cawangan_all as $cawangan)
|
@foreach($cawangan_all as $cawangan)
|
||||||
<option value="{{ $cawangan['kodcaw'] }}">{{ $cawangan['details_caw'] }}</option>
|
<option value="{{ $cawangan['kodcaw'] }}">{{ $cawangan['details_caw'] }}</option>
|
||||||
@@ -38,20 +66,39 @@
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- KP atau Passport -->
|
||||||
|
<input type="text" class="form-control" id="noic" name="noic" placeholder="No.KP/Passport"
|
||||||
|
value="{{ $search == false ? '' : $noic ?? '' }}" autocomplete="off">
|
||||||
|
|
||||||
<input type="text" class="form-control" id="noic" name="noic" placeholder="No.KP Pelanggan" aria-label="No Kad Pengenalan Pelanggan" autocomplete="off" value="{{$search == false ? '' : $noic ?? ''}}" aria-describedby="button-addon2">
|
<!-- Jenis ID -->
|
||||||
<div class="input-group-append">
|
<div class="input-group-append">
|
||||||
<select class="form-select" id="customerIDType" name="customerIDType" class="form-control">
|
<select class="form-select" id="customerIDType" name="customerIDType">
|
||||||
<option value="nokp" {{ $idtype == 'nokp' ? 'selected' : ''}}>No.KP</option>
|
<option value="nokp" {{ $idtype == 'nokp' ? 'selected' : '' }}>No.KP</option>
|
||||||
<option value="passport" {{ $idtype == 'passport' ? 'selected' : ''}}>Passport</option>
|
<option value="passport" {{ $idtype == 'passport' ? 'selected' : '' }}>Passport</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="input-group-append">
|
|
||||||
<button class="btn btn-outline-primary" type="submit" id="button-addon2">Cari</button>
|
|
||||||
</div>
|
</div>
|
||||||
<br>
|
|
||||||
|
|
||||||
|
<!-- Nama pelanggan -->
|
||||||
|
<!-- <div class="col-md-12">
|
||||||
|
<input type="text" size='10' class="form-control" id="nama" name="nama" placeholder="Nama Pelanggan"
|
||||||
|
value="{{ $search == false ? '' : $nama ?? '' }}">
|
||||||
|
</div> -->
|
||||||
|
|
||||||
|
<!-- Butang cari -->
|
||||||
|
<div class="row">
|
||||||
|
<div class="col text-center">
|
||||||
|
<button type="submit" style="margin-top: 10px;" class="btn btn-outline-primary">Cari</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Spinner Overlay -->
|
||||||
|
<div id="loadingOverlay" style="display: none;">
|
||||||
|
<div class="overlay-background"></div>
|
||||||
|
<div class="overlay-spinner">
|
||||||
|
<div class="spinner-border text-light" role="status"></div>
|
||||||
|
<div style="color: white; margin-top: 10px;">Carian sedang diproses...</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -330,6 +377,17 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<script>
|
||||||
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
|
const form = document.getElementById('searchForm');
|
||||||
|
const overlay = document.getElementById('loadingOverlay');
|
||||||
|
|
||||||
|
form.addEventListener('submit', function () {
|
||||||
|
overlay.style.display = 'block';
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var api_url = "<?php echo $api_url ?>";
|
var api_url = "<?php echo $api_url ?>";
|
||||||
var search = "<?php echo $search ?>";
|
var search = "<?php echo $search ?>";
|
||||||
@@ -832,8 +890,8 @@
|
|||||||
function verifynokp(){
|
function verifynokp(){
|
||||||
var id_type = $('#customerIDType').val();
|
var id_type = $('#customerIDType').val();
|
||||||
var nokp = $('#noic').val();
|
var nokp = $('#noic').val();
|
||||||
if(id_type=='nokp'){
|
if(id_type === 'nokp'){
|
||||||
if($.isNumeric(nokp) == false){
|
if(!$.isNumeric(nokp)){
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
icon: 'error',
|
icon: 'error',
|
||||||
title: 'Amaran!',
|
title: 'Amaran!',
|
||||||
@@ -842,6 +900,7 @@
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(nokp.length != 12){
|
if(nokp.length != 12){
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
icon: 'error',
|
icon: 'error',
|
||||||
@@ -851,34 +910,35 @@
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}else if(id_type=='passport'){
|
}else if(id_type=='passport'){
|
||||||
if(nokp.length < 5){
|
// if(nokp.length < 5){
|
||||||
Swal.fire({
|
// Swal.fire({
|
||||||
icon: 'error',
|
// icon: 'error',
|
||||||
title: 'Amaran!',
|
// title: 'Amaran!',
|
||||||
text: 'Sila Periksa Passport Pelanggan'
|
// text: 'Sila Periksa Passport Pelanggan'
|
||||||
});
|
// });
|
||||||
event.preventDefault();
|
// event.preventDefault();
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
if(nokp.indexOf(' ') > 0){
|
// if(nokp.indexOf(' ') > 0){
|
||||||
Swal.fire({
|
// Swal.fire({
|
||||||
icon: 'error',
|
// icon: 'error',
|
||||||
title: 'Amaran!',
|
// title: 'Amaran!',
|
||||||
text: 'Sila Masukkan Passport Tanpa Ruang \'Kosong\' \n e.g(AP1111111)'
|
// text: 'Sila Masukkan Passport Tanpa Ruang \'Kosong\' \n e.g(AP1111111)'
|
||||||
});
|
// });
|
||||||
event.preventDefault();
|
// event.preventDefault();
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
if(regex.test(nokp) == false){
|
// if(regex.test(nokp) == false){
|
||||||
Swal.fire({
|
// Swal.fire({
|
||||||
icon: 'error',
|
// icon: 'error',
|
||||||
title: 'Amaran!',
|
// title: 'Amaran!',
|
||||||
text: 'Sila Periksa Passport Pelanggan'
|
// text: 'Sila Periksa Passport Pelanggan'
|
||||||
});
|
// });
|
||||||
event.preventDefault();
|
// event.preventDefault();
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -0,0 +1,943 @@
|
|||||||
|
@extends('layouts.app_callcenter')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<style>
|
||||||
|
.file {
|
||||||
|
visibility: hidden;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<style>
|
||||||
|
#loadingOverlay {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
z-index: 9999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.overlay-background {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
background-color: rgba(0, 0, 0, 0.5);
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.overlay-spinner {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<div class="container">
|
||||||
|
<div class="row justify-content-center">
|
||||||
|
<div class="col-md-8">
|
||||||
|
|
||||||
|
<nav aria-label="breadcrumb">
|
||||||
|
<ol class="breadcrumb pb-3">
|
||||||
|
<li class="breadcrumb-item"><a href="{{ route('home') }}">Home</a></li>
|
||||||
|
<li class="breadcrumb-item active" aria-current="page">Pengenalan Diri</li>
|
||||||
|
</ol>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="text-center">
|
||||||
|
<h5 class="text-uppercase">Masukkan Nombor Kad Pengenalan Atau Nama Pelanggan</h5>
|
||||||
|
<form id="searchForm" action="{{ route('arcc.searchpelanggannama') }}" method="GET" class="mb-3">
|
||||||
|
<div class="row justify-content-center">
|
||||||
|
<div class="col-md-9">
|
||||||
|
<div class="input-group">
|
||||||
|
<!-- Input IC/Passport -->
|
||||||
|
<input type="text" class="form-control" id="noic" name="noic"
|
||||||
|
placeholder="No.KP/Passport" autocomplete="off">
|
||||||
|
|
||||||
|
<!-- Dropdown jenis ID -->
|
||||||
|
<select class="form-select" id="idType" name="idType" style="max-width: 120px;">
|
||||||
|
<option value="nokp">No.KP</option>
|
||||||
|
<option value="passport">Passport</option>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- Butang Cari -->
|
||||||
|
<button class="btn btn-outline-primary" type="submit">Cari</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<div class="text-center">Atau</div>
|
||||||
|
|
||||||
|
{{-- Form carian Nama --}}
|
||||||
|
<form id="searchForm2" action="{{ route('arcc.cariannama') }}" method="GET">
|
||||||
|
<div class="row justify-content-center mt-2">
|
||||||
|
<div class="col-md-9">
|
||||||
|
<div class="input-group">
|
||||||
|
<input type="text" class="form-control" id="nama" name="nama"
|
||||||
|
placeholder="Nama Pelanggan">
|
||||||
|
<button class="btn btn-outline-primary" type="submit">Cari</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Spinner Overlay -->
|
||||||
|
<div id="loadingOverlay" style="display: none;">
|
||||||
|
<div class="overlay-background"></div>
|
||||||
|
<div class="overlay-spinner">
|
||||||
|
<div class="spinner-border text-light" role="status"></div>
|
||||||
|
<div style="color: white; margin-top: 10px;">Carian sedang diproses...</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="row justify-content-center mt-2">
|
||||||
|
@if ($message = Session::get('success'))
|
||||||
|
<div class="alert alert-success">
|
||||||
|
<p>{{ $message }}</p>
|
||||||
|
</div>
|
||||||
|
@elseif ($message = Session::get('failed'))
|
||||||
|
<div class="alert alert-danger">
|
||||||
|
<p>{{ $message }}</p>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- Modal No KP -->
|
||||||
|
<div class="modal fade" id="daftar_pelanggan" tabindex="-1" data-backdrop="static" aria-labelledby="ModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-lg">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h5 class="modal-title" id="ModalLabel">Daftar Pelanggan</h5>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<form action="{{ route('customer.store') }}" onsubmit="verifycustomer()" method="POST">
|
||||||
|
@csrf
|
||||||
|
<div class="row form-group">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="row form-group">
|
||||||
|
<div class="col-md-4">Nama</div>
|
||||||
|
<div class="col-md-8"><input class="form-control" type="text" name="name" id="name" autocomplete="off" placeholder="Nama"></div>
|
||||||
|
<div class="col-md-4">No KP</div>
|
||||||
|
<div class="col-md-8"><input class="form-control" type="text" name="noic" id="noic" value="{{$noic ?? ''}}" readonly></div>
|
||||||
|
<div class="col-md-4">Tarikh Lahir</div>
|
||||||
|
<div class="col-md-8"><input class="form-control" type="text" name="tarikh_lahir" id="tarikh_lahir" readonly></div>
|
||||||
|
<div class="col-md-4">Negeri Lahir</div>
|
||||||
|
<div class="col-md-8"><input class="form-control" type="text" name="negeri_lahir" id="negeri_lahir" readonly></div>
|
||||||
|
<div class="col-md-4">Jantina</div>
|
||||||
|
<div class="col-md-8"><input class="form-control" type="text" name="jantina" id="jantina" readonly></div>
|
||||||
|
<div class="col-md-4">No Telefon 1</div>
|
||||||
|
<div class="col-md-8"><input class="form-control" type="text" name="main_phone" id="main_phone" autocomplete="off" placeholder="No Telefon"></div>
|
||||||
|
<div class="col-md-4">No Telefon 2</div>
|
||||||
|
<div class="col-md-8"><input class="form-control" type="text" name="alternate_phone" id="alternate_phone" autocomplete="off" placeholder="No Telefon"></div>
|
||||||
|
<div class="col-md-12 ml-4">
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="form-check form-check-inline">
|
||||||
|
<input checked class="form-check-input" type="checkbox" id="warganegara" name="warganegara" value="warganegara">
|
||||||
|
<label class="form-check-label" for="warganegara">Warganegara</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-check form-check-inline">
|
||||||
|
<input checked class="form-check-input" type="checkbox" id="bumiputera" name="bumiputera" value="bumiputera">
|
||||||
|
<label class="form-check-label" for="bumiputera">Bumiputera</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">Agama</div>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<select class="form-control" name="agama" id="agama">
|
||||||
|
<option selected value="01">Islam</option>
|
||||||
|
<option value="02">Hindu</option>
|
||||||
|
<option value="03">Buddha</option>
|
||||||
|
<option value="04">Kristian</option>
|
||||||
|
<option value="05">Lain-lain</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">Ahli</div>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<select class="form-control" name="kumpulan_sahabat" id="kumpulan_sahabat">
|
||||||
|
<option value="0">Tidak</option>
|
||||||
|
<option value="1">Kumpulan PKINK</option>
|
||||||
|
<option value="2">Sahabat</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="row form-group">
|
||||||
|
<div class="col-md-4">Alamat</div>
|
||||||
|
<div class="col-md-8"><textarea class="form-control" style="resize:none" name="alamat" id="alamat" cols="30" rows="3" placeholder="Alamat Pelanggan"></textarea></div>
|
||||||
|
<div class="col-md-4">Poskod</div>
|
||||||
|
<div class="col-md-8"><input class="form-control" type="text" name="poskod" id="poskod" autocomplete="off" placeholder="Poskod"></div>
|
||||||
|
<div class="col-md-4">Daerah</div>
|
||||||
|
<div class="col-md-8"><input class="form-control" type="text" name="daerah" id="daerah" readonly autocomplete="off"></div>
|
||||||
|
<div class="col-md-4">Negeri</div>
|
||||||
|
<div class="col-md-8"><input class="form-control" type="text" name="negeri" id="negeri" readonly autocomplete="off"></div>
|
||||||
|
<div class="col-md-4">Umur</div>
|
||||||
|
<div class="col-md-8"><input class="form-control" type="text" name="age" id="age" readonly></div>
|
||||||
|
<div class="col-md-4">Bangsa</div>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<select class="form-control" name="bangsa" id="bangsa">
|
||||||
|
<option selected value="M">Melayu</option>
|
||||||
|
<option value="C">Cina</option>
|
||||||
|
<option value="I">India</option>
|
||||||
|
<option value="L">Lain-lain</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4"> Nama Bank</div>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<select class="form-control" name="bank_name" data-placeholder="Pilih Bank" id="bank_name">
|
||||||
|
<option disabled selected value> -- Pilih Bank -- </option>
|
||||||
|
@foreach($bank as $banks)
|
||||||
|
<option value="{{ $banks['abbreviation'] }}">{{ $banks['name'] }}</option>
|
||||||
|
@endforeach
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">No Akaun Bank</div>
|
||||||
|
<div class="col-md-8"><input class="form-control" type="text" name="no_akaun" id="no_akaun" placeholder="No Akaun Bank"></div>
|
||||||
|
<div class="col-md-4">Tujuan Pembiayaan</div>
|
||||||
|
@php
|
||||||
|
$tujuangadai = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/tujuangadai')->json();
|
||||||
|
@endphp
|
||||||
|
<div class="col-md-8">
|
||||||
|
<select class="form-control" name="tujuan_gadai" data-placeholder="Pilih Tujuan Gadai" id="tujuan_gadai">
|
||||||
|
<option disabled selected value> -- Pilih Tujuan Pembiayaan -- </option>
|
||||||
|
@foreach($tujuangadai as $tujuan)
|
||||||
|
<option value="{{ $tujuan['keterangan'] }}">{{ $tujuan['keterangan'] }}</option>
|
||||||
|
@endforeach
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">Pekerjaan</div>
|
||||||
|
@php
|
||||||
|
$pekerjaan = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/pekerjaan')->json();
|
||||||
|
@endphp
|
||||||
|
<div class="col-md-8">
|
||||||
|
<select class="form-control" name="pekerjaan" data-placeholder="Pilih Pekerjaan" id="pekerjaan">
|
||||||
|
<option disabled selected value> -- Pilih Pekerjaan -- </option>
|
||||||
|
@foreach($pekerjaan as $kerja)
|
||||||
|
<option value="{{ $kerja['kodkerja'] }}">{{ $kerja['keterangan'] }}</option>
|
||||||
|
@endforeach
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">Nota</div>
|
||||||
|
<div class="col-md-8"><input class="form-control" type="text" name="nota" id="nota" placeholder="Nota"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<input type="text" hidden name="idtype" value="nokp">
|
||||||
|
<button type="button" class="btn btn-danger" data-dismiss="modal">Batal</button>
|
||||||
|
<input type="submit" name="submit" class="btn btn-primary" value="Terima">
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Modal Passport -->
|
||||||
|
<div class="modal fade" id="passport_pelanggan" tabindex="-1" data-backdrop="static" aria-labelledby="ModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-lg">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h5 class="modal-title" id="ModalLabel">Daftar Pelanggan</h5>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<form action="{{ route('customer.store') }}" onsubmit="verifycustomerpassport()" method="POST">
|
||||||
|
@csrf
|
||||||
|
<div class="row form-group">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="row form-group">
|
||||||
|
<div class="col-md-4">Nama</div>
|
||||||
|
<div class="col-md-8"><input class="form-control" type="text" name="name" id="passport_name" autocomplete="off" placeholder="Nama"></div>
|
||||||
|
<div class="col-md-4">No Passport</div>
|
||||||
|
<div class="col-md-8"><input class="form-control" readonly type="text" name="noic" id="passport_noic" value="{{$noic ?? ''}}"></div>
|
||||||
|
<div class="col-md-4">Tarikh Lahir</div>
|
||||||
|
<div class="col-md-8"><input class="form-control" type="text" placeholder="Tarikh Lahir" onchange="calculatePassportAge()" name="tarikh_lahir" id="passport_tarikh_lahir"></div>
|
||||||
|
<div class="col-md-4">Jantina</div>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<select name="jantina" id="jantina_passport" class="form-control">
|
||||||
|
<option value="Lelaki" selected>Lelaki</option>
|
||||||
|
<option value="Perempuan">Perempuan</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">No Telefon 1</div>
|
||||||
|
<div class="col-md-8"><input class="form-control" type="text" name="main_phone" id="passport_main_phone" autocomplete="off" placeholder="No Telefon"></div>
|
||||||
|
<div class="col-md-4">No Telefon 2</div>
|
||||||
|
<div class="col-md-8"><input class="form-control" type="text" name="alternate_phone" id="passport_alternate_phone" autocomplete="off" placeholder="No Telefon"></div>
|
||||||
|
<div class="col-md-4">Agama</div>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<select class="form-control" name="agama" id="passport_agama">
|
||||||
|
<option selected value="01">Islam</option>
|
||||||
|
<option value="02">Hindu</option>
|
||||||
|
<option value="03">Buddha</option>
|
||||||
|
<option value="04">Kristian</option>
|
||||||
|
<option value="05">Lain-lain</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">Ahli</div>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<select class="form-control" name="kumpulan_sahabat" id="passport_kumpulan_sahabat">
|
||||||
|
<option value="0">Tidak</option>
|
||||||
|
<option value="1">Kumpulan PKINK</option>
|
||||||
|
<option value="2">Sahabat</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="row form-group">
|
||||||
|
<div class="col-md-4">Alamat</div>
|
||||||
|
<div class="col-md-8"><textarea class="form-control" style="resize:none" name="alamat" id="passport_alamat" cols="30" rows="3" placeholder="Alamat Pelanggan"></textarea></div>
|
||||||
|
<div class="col-md-4">Poskod</div>
|
||||||
|
<div class="col-md-8"><input class="form-control" type="text" name="poskod" id="passport_poskod" autocomplete="off" placeholder="Poskod"></div>
|
||||||
|
<div class="col-md-4">Daerah</div>
|
||||||
|
<div class="col-md-8"><input class="form-control" type="text" name="daerah" id="passport_daerah" readonly autocomplete="off"></div>
|
||||||
|
<div class="col-md-4">Negeri</div>
|
||||||
|
<div class="col-md-8"><input class="form-control" type="text" name="negeri" id="passport_negeri" readonly autocomplete="off"></div>
|
||||||
|
<div class="col-md-4">Umur</div>
|
||||||
|
<div class="col-md-8"><input class="form-control" type="text" name="age" id="passport_age" readonly></div>
|
||||||
|
<div class="col-md-4">Bangsa</div>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<select class="form-control" name="bangsa" id="passport_bangsa">
|
||||||
|
<option selected value="M">Melayu</option>
|
||||||
|
<option value="C">Cina</option>
|
||||||
|
<option value="I">India</option>
|
||||||
|
<option value="L">Lain-lain</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">Bank</div>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<select class="form-control" name="bank_name" data-placeholder="Pilih Bank" id="passport_bank_name">
|
||||||
|
<option disabled selected value> -- Pilih Bank -- </option>
|
||||||
|
@foreach($bank as $banks)
|
||||||
|
<option value="{{ $banks['abbreviation'] }}">{{ $banks['name'] }}</option>
|
||||||
|
@endforeach
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">No Akaun Bank</div>
|
||||||
|
<div class="col-md-8"><input class="form-control" type="text" name="no_akaun" id="passport_no_akaun" placeholder="No Akaun Bank"></div>
|
||||||
|
<div class="col-md-4">Tujuan Pembiayaan</div>
|
||||||
|
@php
|
||||||
|
$tujuangadai = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/tujuangadai')->json();
|
||||||
|
@endphp
|
||||||
|
<div class="col-md-8">
|
||||||
|
<select class="form-control" name="tujuan_gadai" data-placeholder="Pilih Tujuan Gadai" id="passport_tujuan_gadai">
|
||||||
|
<option disabled selected value> -- Pilih Tujuan Pembiayaan -- </option>
|
||||||
|
@foreach($tujuangadai as $tujuan)
|
||||||
|
<option value="{{ $tujuan['keterangan'] }}">{{ $tujuan['keterangan'] }}</option>
|
||||||
|
@endforeach
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">Pekerjaan</div>
|
||||||
|
@php
|
||||||
|
$pekerjaan = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/pekerjaan')->json();
|
||||||
|
@endphp
|
||||||
|
<div class="col-md-8">
|
||||||
|
<select class="form-control" name="pekerjaan" data-placeholder="Pilih Pekerjaan" id="passport_pekerjaan">
|
||||||
|
<option disabled selected value> -- Pilih Pekerjaan -- </option>
|
||||||
|
@foreach($pekerjaan as $kerja)
|
||||||
|
<option value="{{ $kerja['kodkerja'] }}">{{ $kerja['keterangan'] }}</option>
|
||||||
|
@endforeach
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">Nota</div>
|
||||||
|
<div class="col-md-8"><input class="form-control" type="text" name="nota" id="passport_nota" placeholder="Nota"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<input type="text" hidden name="idtype" value="passport">
|
||||||
|
<button type="button" class="btn btn-danger" data-dismiss="modal">Batal</button>
|
||||||
|
<input type="submit" name="submit" class="btn btn-primary" value="Terima">
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
|
const form = document.getElementById('searchForm');
|
||||||
|
const overlay = document.getElementById('loadingOverlay');
|
||||||
|
|
||||||
|
form.addEventListener('submit', function () {
|
||||||
|
overlay.style.display = 'block';
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
|
const form = document.getElementById('searchForm2');
|
||||||
|
const overlay = document.getElementById('loadingOverlay');
|
||||||
|
|
||||||
|
form.addEventListener('submit', function () {
|
||||||
|
overlay.style.display = 'block';
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var api_url = "<?php echo $api_url ?>";
|
||||||
|
var search = "<?php echo $search ?>";
|
||||||
|
var type_id = "<?php echo $idtype ?>";
|
||||||
|
$(document).ready(function(){
|
||||||
|
$('#passport_tarikh_lahir').datepicker({
|
||||||
|
format: 'dd/mm/yyyy',
|
||||||
|
endDate: new Date()
|
||||||
|
});
|
||||||
|
var noic = $('#noic').val();
|
||||||
|
identifyIC(noic);
|
||||||
|
|
||||||
|
if(search == true){
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'info',
|
||||||
|
title: 'Pelanggan Tiada Dalam Rekod!',
|
||||||
|
text: 'Sila Daftar Pelanggan'
|
||||||
|
});
|
||||||
|
event.preventDefault();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
function calculatePassportAge(){
|
||||||
|
var passport_lahir = $('#passport_tarikh_lahir').val();
|
||||||
|
var split_date = passport_lahir.split('/');
|
||||||
|
var count_leap_year = countLeapYears(split_date[2],split_date[1],split_date[0]) - 1;
|
||||||
|
|
||||||
|
var start = new Date(split_date[2] + '-' + split_date[1] + '-' + split_date[0]),
|
||||||
|
end = new Date(),
|
||||||
|
diff = new Date(end - start),
|
||||||
|
days = ((diff/1000/60/60/24)- count_leap_year)/365;
|
||||||
|
|
||||||
|
var age = parseInt(days);
|
||||||
|
$('#passport_age').val(age);
|
||||||
|
}
|
||||||
|
|
||||||
|
function newcustomer(){
|
||||||
|
var id_type = $('#customerIDType').val();
|
||||||
|
if(id_type=='nokp'){
|
||||||
|
$('#daftar_pelanggan').modal('show');
|
||||||
|
}else if(id_type=='passport'){
|
||||||
|
$('#passport_pelanggan').modal('show');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#warganegara').on('click',function(){
|
||||||
|
if(this.checked == false) {
|
||||||
|
$('#bumiputera').prop('checked',false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#bumiputera').on('click',function(){
|
||||||
|
if(this.checked) {
|
||||||
|
$('#warganegara').prop('checked',true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on("click", ".browse", function() {
|
||||||
|
var file = $(this).parents().find(".file");
|
||||||
|
file.trigger("click");
|
||||||
|
});
|
||||||
|
$('input[type="file"]').change(function(e) {
|
||||||
|
var fileName = e.target.files[0].name;
|
||||||
|
$("#file").val(fileName);
|
||||||
|
|
||||||
|
var reader = new FileReader();
|
||||||
|
reader.onload = function(e) {
|
||||||
|
// get loaded data and render thumbnail.
|
||||||
|
document.getElementById("preview").src = e.target.result;
|
||||||
|
};
|
||||||
|
// read the image file as a data URL.
|
||||||
|
reader.readAsDataURL(this.files[0]);
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#poskod').change(function(){
|
||||||
|
var poskod = this.value;
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
method:'GET',
|
||||||
|
url:api_url+'/api/poskod/'+poskod,
|
||||||
|
success:function(poskod_detail){
|
||||||
|
var koddaerah = poskod_detail['koddaerah'];
|
||||||
|
var kodnegeri = poskod_detail['kodnegeri'];
|
||||||
|
$.ajax({
|
||||||
|
url:api_url+'/api/negeri/'+kodnegeri,
|
||||||
|
method:'GET',
|
||||||
|
success:function(negeri){
|
||||||
|
$('#negeri').val(negeri['negeri']);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$.ajax({
|
||||||
|
url:api_url+'/api/daerah/'+koddaerah,
|
||||||
|
method:'GET',
|
||||||
|
success:function(daerah){
|
||||||
|
$('#daerah').val(daerah['namadaerah']);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#passport_poskod').change(function(){
|
||||||
|
var poskod = this.value;
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
method:'GET',
|
||||||
|
url:api_url+'/api/poskod/'+poskod,
|
||||||
|
success:function(poskod_detail){
|
||||||
|
var koddaerah = poskod_detail['koddaerah'];
|
||||||
|
var kodnegeri = poskod_detail['kodnegeri'];
|
||||||
|
$.ajax({
|
||||||
|
url:api_url+'/api/negeri/'+kodnegeri,
|
||||||
|
method:'GET',
|
||||||
|
success:function(negeri){
|
||||||
|
$('#passport_negeri').val(negeri['negeri']);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$.ajax({
|
||||||
|
url:api_url+'/api/daerah/'+koddaerah,
|
||||||
|
method:'GET',
|
||||||
|
success:function(daerah){
|
||||||
|
$('#passport_daerah').val(daerah['namadaerah']);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
function verifycustomer(){
|
||||||
|
var customername = $('#name').val();
|
||||||
|
var customeralamat = $('#alamat').val();
|
||||||
|
var customerposkod = $('#poskod').val();
|
||||||
|
var customerphone = $('#main_phone').val();
|
||||||
|
var customerphone_alternate = $('#alternate_phone').val();
|
||||||
|
var age = $('#age').val();
|
||||||
|
if(age < 18){
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'error',
|
||||||
|
title: 'Amaran!',
|
||||||
|
text: 'Umur Pelanggan Tidak Mencukupi 18 Tahun'
|
||||||
|
});
|
||||||
|
event.preventDefault();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(customername == ''){
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'error',
|
||||||
|
title: 'Amaran!',
|
||||||
|
text: 'Sila Masukkan Nama Pelanggan'
|
||||||
|
});
|
||||||
|
event.preventDefault();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(customeralamat == ''){
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'error',
|
||||||
|
title: 'Amaran!',
|
||||||
|
text: 'Sila Masukkan Alamat Pelanggan'
|
||||||
|
});
|
||||||
|
event.preventDefault();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(customerposkod == ''){
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'error',
|
||||||
|
title: 'Amaran!',
|
||||||
|
text: 'Sila Masukkan Poskod'
|
||||||
|
});
|
||||||
|
event.preventDefault();
|
||||||
|
return false;
|
||||||
|
}else{
|
||||||
|
if(customerposkod.length != 5){
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'error',
|
||||||
|
title: 'Amaran!',
|
||||||
|
text: 'Sila Periksa Poskod'
|
||||||
|
});
|
||||||
|
event.preventDefault();
|
||||||
|
return false;
|
||||||
|
}else{
|
||||||
|
if($.isNumeric(customerposkod) == false){
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'error',
|
||||||
|
title: 'Amaran!',
|
||||||
|
text: 'Sila Periksa Poskod'
|
||||||
|
});
|
||||||
|
event.preventDefault();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(customerphone == ''){
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'error',
|
||||||
|
title: 'Amaran!',
|
||||||
|
text: 'Sila Masukkan No Telefon Pelanggan'
|
||||||
|
});
|
||||||
|
event.preventDefault();
|
||||||
|
return false;
|
||||||
|
}else{
|
||||||
|
if((customerphone.length < 9 || customerphone.length >= 12)){
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'error',
|
||||||
|
title: 'Amaran!',
|
||||||
|
text: 'Sila Periksa No Telefon Pelanggan'
|
||||||
|
});
|
||||||
|
event.preventDefault();
|
||||||
|
return false;
|
||||||
|
}else{
|
||||||
|
if($.isNumeric(customerphone) == false){
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'error',
|
||||||
|
title: 'Amaran!',
|
||||||
|
text: 'Sila Masukkan Nombor Sahaja Pada No Telefon Pelanggan'
|
||||||
|
});
|
||||||
|
event.preventDefault();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(customerphone_alternate != ''){
|
||||||
|
if(customerphone_alternate.length < 8 && customerphone_alternate.length > 12){
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'error',
|
||||||
|
title: 'Amaran!',
|
||||||
|
text: 'Sila Periksa No Telefon Pelanggan'
|
||||||
|
});
|
||||||
|
event.preventDefault();
|
||||||
|
return false;
|
||||||
|
}else{
|
||||||
|
if($.isNumeric(customerphone_alternate) == false){
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'error',
|
||||||
|
title: 'Amaran!',
|
||||||
|
text: 'Sila Masukkan Nombor Sahaja Pada No Telefon Pelanggan'
|
||||||
|
});
|
||||||
|
event.preventDefault();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function verifycustomerpassport(){
|
||||||
|
var customername = $('#passport_name').val();
|
||||||
|
var customeralamat = $('#passport_alamat').val();
|
||||||
|
var customerposkod = $('#passport_poskod').val();
|
||||||
|
var customerphone = $('#passport_main_phone').val();
|
||||||
|
var customerphone_alternate = $('#passport_alternate_phone').val();
|
||||||
|
var tarikh_lahir = $('#passport_tarikh_lahir').val();
|
||||||
|
var age = $('#passport_age').val();
|
||||||
|
|
||||||
|
if(age < 18){
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'error',
|
||||||
|
title: 'Amaran!',
|
||||||
|
text: 'Umur Pelanggan Tidak Mencukupi 18 Tahun'
|
||||||
|
});
|
||||||
|
event.preventDefault();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(customername == ''){
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'error',
|
||||||
|
title: 'Amaran!',
|
||||||
|
text: 'Sila Masukkan Nama Pelanggan'
|
||||||
|
});
|
||||||
|
event.preventDefault();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(tarikh_lahir == ''){
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'error',
|
||||||
|
title: 'Amaran!',
|
||||||
|
text: 'Sila Masukkan Tarikh Lahir Pelanggan'
|
||||||
|
});
|
||||||
|
event.preventDefault();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(customeralamat == ''){
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'error',
|
||||||
|
title: 'Amaran!',
|
||||||
|
text: 'Sila Masukkan Alamat Pelanggan'
|
||||||
|
});
|
||||||
|
event.preventDefault();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(customerposkod == ''){
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'error',
|
||||||
|
title: 'Amaran!',
|
||||||
|
text: 'Sila Masukkan Poskod'
|
||||||
|
});
|
||||||
|
event.preventDefault();
|
||||||
|
return false;
|
||||||
|
}else{
|
||||||
|
if(customerposkod.length != 5){
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'error',
|
||||||
|
title: 'Amaran!',
|
||||||
|
text: 'Sila Periksa Poskod'
|
||||||
|
});
|
||||||
|
event.preventDefault();
|
||||||
|
return false;
|
||||||
|
}else{
|
||||||
|
if($.isNumeric(customerposkod) == false){
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'error',
|
||||||
|
title: 'Amaran!',
|
||||||
|
text: 'Sila Periksa Poskod'
|
||||||
|
});
|
||||||
|
event.preventDefault();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(customerphone == ''){
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'error',
|
||||||
|
title: 'Amaran!',
|
||||||
|
text: 'Sila Masukkan No Telefon Pelanggan'
|
||||||
|
});
|
||||||
|
event.preventDefault();
|
||||||
|
return false;
|
||||||
|
}else{
|
||||||
|
if(customerphone.length <= 9 || customerphone.length >= 12){
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'error',
|
||||||
|
title: 'Amaran!',
|
||||||
|
text: 'Sila Periksa No Telefon Pelanggan'
|
||||||
|
});
|
||||||
|
event.preventDefault();
|
||||||
|
return false;
|
||||||
|
}else{
|
||||||
|
if($.isNumeric(customerphone) == false){
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'error',
|
||||||
|
title: 'Amaran!',
|
||||||
|
text: 'Sila Masukkan Nombor Sahaja Pada No Telefon Pelanggan'
|
||||||
|
});
|
||||||
|
event.preventDefault();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(customerphone_alternate != ''){
|
||||||
|
if(customerphone_alternate.length <= 8 && customerphone_alternate.length >= 12){
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'error',
|
||||||
|
title: 'Amaran!',
|
||||||
|
text: 'Sila Periksa No Telefon Pelanggan'
|
||||||
|
});
|
||||||
|
event.preventDefault();
|
||||||
|
return false;
|
||||||
|
}else{
|
||||||
|
if($.isNumeric(customerphone_alternate) == false){
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'error',
|
||||||
|
title: 'Amaran!',
|
||||||
|
text: 'Sila Masukkan Nombor Sahaja Pada No Telefon Pelanggan'
|
||||||
|
});
|
||||||
|
event.preventDefault();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function identifyIC(noic){
|
||||||
|
if(noic.match(/^(\d{2})(\d{2})(\d{2})-?\d{2}-?\d{4}$/)) {
|
||||||
|
var year = noic.slice(0,2);
|
||||||
|
var month = noic.slice(2,4);
|
||||||
|
var day = noic.slice(4,6);
|
||||||
|
var nl = noic.slice(6,8);
|
||||||
|
var last_ic = noic.slice(8,12);
|
||||||
|
|
||||||
|
var now = new Date().getFullYear().toString();
|
||||||
|
|
||||||
|
var decade = now.substr(0, 2);
|
||||||
|
if (now.substr(2,2) > year) {
|
||||||
|
year = parseInt(decade.concat(year.toString()), 10);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (parseInt(last_ic,10)%2 != 0){
|
||||||
|
var jantina = 'Lelaki';
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
var jantina = 'Perempuan';
|
||||||
|
}
|
||||||
|
|
||||||
|
var johor_ic = ['01','21','22','23','24'];
|
||||||
|
var kedah_ic = ['02','25','26','27'];
|
||||||
|
var kelantan_ic = ['03','28','29'];
|
||||||
|
var melaka_ic = ['04','30'];
|
||||||
|
var negeri_ic = ['05','31','59'];
|
||||||
|
var pahang_ic = ['06','32','33'];
|
||||||
|
var penang_ic = ['07','34','35'];
|
||||||
|
var perak_ic = ['08','36','37','38','39'];
|
||||||
|
var perlis_ic = ['09','40'];
|
||||||
|
var selangor_ic = ['10','41','42','43','44'];
|
||||||
|
var terengganu_ic = ['11','45','46'];
|
||||||
|
var sabah_ic = ['12','47','48','49'];
|
||||||
|
var sarawak_ic = ['13','50','51','52','53'];
|
||||||
|
var kl_ic = ['14','54','55','56','57'];
|
||||||
|
var labuan_ic = ['15','58'];
|
||||||
|
var putrajaya_ic = ['16'];
|
||||||
|
var unknown_ic = ['82'];
|
||||||
|
|
||||||
|
if(johor_ic.indexOf(nl)>=0){
|
||||||
|
var negeri_lahir = 'Johor';
|
||||||
|
}else if(kedah_ic.indexOf(nl)>=0){
|
||||||
|
var negeri_lahir = 'Kedah';
|
||||||
|
}else if(kelantan_ic.indexOf(nl)>=0){
|
||||||
|
var negeri_lahir = 'Kelantan';
|
||||||
|
}else if(melaka_ic.indexOf(nl)>=0){
|
||||||
|
var negeri_lahir = 'Melaka';
|
||||||
|
}else if(negeri_ic.indexOf(nl)>=0){
|
||||||
|
var negeri_lahir = 'Negeri Sembilan';
|
||||||
|
}else if(pahang_ic.indexOf(nl)>=0){
|
||||||
|
var negeri_lahir = 'Pahang';
|
||||||
|
}else if(penang_ic.indexOf(nl)>=0){
|
||||||
|
var negeri_lahir = 'Pulau Pinang';
|
||||||
|
}else if(perak_ic.indexOf(nl)>=0){
|
||||||
|
var negeri_lahir = 'Perak';
|
||||||
|
}else if(perlis_ic.indexOf(nl)>=0){
|
||||||
|
var negeri_lahir = 'Perlis';
|
||||||
|
}else if(selangor_ic.indexOf(nl)>=0){
|
||||||
|
var negeri_lahir = 'Selangor';
|
||||||
|
}else if(terengganu_ic.indexOf(nl)>=0){
|
||||||
|
var negeri_lahir = 'Terengganu';
|
||||||
|
}else if(sabah_ic.indexOf(nl)>=0){
|
||||||
|
var negeri_lahir = 'Sabah';
|
||||||
|
}else if(sarawak_ic.indexOf(nl)>=0){
|
||||||
|
var negeri_lahir = 'Sarawak';
|
||||||
|
}else if(kl_ic.indexOf(nl)>=0){
|
||||||
|
var negeri_lahir = 'Kuala Lumpur';
|
||||||
|
}else if(labuan_ic.indexOf(nl)>=0){
|
||||||
|
var negeri_lahir = 'Labuan';
|
||||||
|
}else if(putrajaya_ic.indexOf(nl)>=0){
|
||||||
|
var negeri_lahir = 'Putrajaya';
|
||||||
|
}else if(unknown_ic.indexOf(nl)>=0){
|
||||||
|
var negeri_lahir = 'Negeri Tidak Diketahui';
|
||||||
|
}
|
||||||
|
var date = new Date(year, (month - 1), day, 0, 0, 0, 0);
|
||||||
|
var tarikh_lahir_test = date.getFullYear() + '-' + month + '-' + day;
|
||||||
|
|
||||||
|
var count_leap_year = countLeapYears(date.getFullYear(),month,day) - 1;
|
||||||
|
|
||||||
|
var start = new Date(tarikh_lahir_test),
|
||||||
|
end = new Date(),
|
||||||
|
diff = new Date(end - start),
|
||||||
|
days = ((diff/1000/60/60/24)- count_leap_year)/365;
|
||||||
|
|
||||||
|
var age = parseInt(days);
|
||||||
|
$('#age').val(age);
|
||||||
|
var tarikh_lahir = day + '/' + month + '/' + date.getFullYear();
|
||||||
|
$('#jantina').val(jantina);
|
||||||
|
$('#tarikh_lahir').val(tarikh_lahir);
|
||||||
|
$('#negeri_lahir').val(negeri_lahir);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var countLeapYears = function(y,m,d){
|
||||||
|
var yearNow = new Date().getFullYear(),
|
||||||
|
yearThen = y,
|
||||||
|
beginYear = 0,
|
||||||
|
endYear = 0,
|
||||||
|
leapYearCount = 0;
|
||||||
|
|
||||||
|
var isLeapYear = function(year){
|
||||||
|
return ((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(yearNow < y){
|
||||||
|
beginYear = yearNow;
|
||||||
|
endYear = y;
|
||||||
|
}else if(yearNow > y){
|
||||||
|
beginYear = y;
|
||||||
|
endYear = yearNow;
|
||||||
|
}else if(yearNow == y){
|
||||||
|
beginYear = y;
|
||||||
|
endYear = y;
|
||||||
|
}
|
||||||
|
|
||||||
|
for(i = beginYear; i <= endYear; i++){
|
||||||
|
if(isLeapYear(i)){
|
||||||
|
leapYearCount++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return leapYearCount;
|
||||||
|
}
|
||||||
|
var regex = /^[a-zA-Z0-9]+$/g;
|
||||||
|
|
||||||
|
function verifynokp(){
|
||||||
|
var id_type = $('#customerIDType').val();
|
||||||
|
var nokp = $('#noic').val();
|
||||||
|
if(id_type === 'nokp'){
|
||||||
|
if(!$.isNumeric(nokp)){
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'error',
|
||||||
|
title: 'Amaran!',
|
||||||
|
text: 'Sila Masukkan Nombor Sahaja Pada No KP Pelanggan'
|
||||||
|
});
|
||||||
|
event.preventDefault();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(nokp.length != 12){
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'error',
|
||||||
|
title: 'Amaran!',
|
||||||
|
text: 'Sila Periksa No KP Pelanggan'
|
||||||
|
});
|
||||||
|
event.preventDefault();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}else if(id_type=='passport'){
|
||||||
|
if(nokp.length < 5){
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'error',
|
||||||
|
title: 'Amaran!',
|
||||||
|
text: 'Sila Periksa Passport Pelanggan'
|
||||||
|
});
|
||||||
|
event.preventDefault();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(nokp.indexOf(' ') > 0){
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'error',
|
||||||
|
title: 'Amaran!',
|
||||||
|
text: 'Sila Masukkan Passport Tanpa Ruang \'Kosong\' \n e.g(AP1111111)'
|
||||||
|
});
|
||||||
|
event.preventDefault();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(regex.test(nokp) == false){
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'error',
|
||||||
|
title: 'Amaran!',
|
||||||
|
text: 'Sila Periksa Passport Pelanggan'
|
||||||
|
});
|
||||||
|
event.preventDefault();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
@endsection
|
||||||
@@ -0,0 +1,277 @@
|
|||||||
|
<script src="{{ asset('js/table2excel.js') }}"></script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#header {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header td, #customers th {
|
||||||
|
|
||||||
|
padding:4px;
|
||||||
|
font-size:10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header tr:nth-child(even){background-color: #ffffff;}
|
||||||
|
|
||||||
|
#header tr:hover {background-color: #ddd;}
|
||||||
|
|
||||||
|
#header th {
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
text-align: left;
|
||||||
|
padding:4px;
|
||||||
|
color:black;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#scan {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#scan td, #scan th {
|
||||||
|
|
||||||
|
padding: 8px;
|
||||||
|
font-size:11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#scan tr:nth-child(even){background-color: #ffffff;}
|
||||||
|
|
||||||
|
#scan tr:hover {background-color: #ddd;}
|
||||||
|
|
||||||
|
#scan th {
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
text-align: left;
|
||||||
|
padding:4px;
|
||||||
|
color:black;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#scan {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#scan td, #scan th {
|
||||||
|
border-collapse: collapse;
|
||||||
|
padding: 8px;
|
||||||
|
font-size:11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#scan tr:nth-child(even){background-color: #ffffff;}
|
||||||
|
|
||||||
|
#scan tr:hover {background-color: #ddd;}
|
||||||
|
|
||||||
|
#scan th {
|
||||||
|
border-collapse: collapse;
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
text-align: left;
|
||||||
|
padding:4px;
|
||||||
|
color:black;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#details {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#details td, #details th {
|
||||||
|
|
||||||
|
padding: 8px;
|
||||||
|
font-size:11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#details tr:nth-child(even){background-color: #ffffff;}
|
||||||
|
|
||||||
|
#details tr:hover {background-color: #ddd;}
|
||||||
|
|
||||||
|
#details th {
|
||||||
|
padding-top: 12px;
|
||||||
|
font-style:bold;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
text-align: left;
|
||||||
|
padding:4px;
|
||||||
|
color:black;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#sign {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sign td, #sign th {
|
||||||
|
padding: 8px;
|
||||||
|
font-size:11px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sign tr:nth-child(even){background-color: #ffffff;}
|
||||||
|
|
||||||
|
#sign tr:hover {background-color: #ddd;}
|
||||||
|
|
||||||
|
#sign th {
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
text-align: left;
|
||||||
|
padding:4px;
|
||||||
|
color:black;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<table width="100%" id="header">
|
||||||
|
<tr>
|
||||||
|
<th rowspan="4" style="width:50px"><br><img src="{{ asset('img/ARRAHN1.png') }}" style="width:70px"></img></th>
|
||||||
|
<th colspan="1">KOPERASI PERMODALAN KELANTAN BERHAD</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{{ $cawangan_detail['namacaw'] }}</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{{ $cawangan_detail['alamat1'] }}</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{{ $cawangan_detail['alamat2'].' No Tel : '. $cawangan_detail['notel'].' No Faks : '. $cawangan_detail['nofaks'] }}</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<table border="0" width="100%" id="scan">
|
||||||
|
<tr>
|
||||||
|
<th colspan ="5"><b>Senarai Notis Peringatan Pertama</b></th>
|
||||||
|
<th> </th>
|
||||||
|
<th><b> Tarikh Cetak:</b>
|
||||||
|
@php
|
||||||
|
$myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_cetak);
|
||||||
|
$formattedweddingdate = $myDateTime->format('d-m-Y');
|
||||||
|
echo($formattedweddingdate)
|
||||||
|
@endphp
|
||||||
|
</th>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
<table border="0" width="100%" height="80" align="left" id="details">
|
||||||
|
<thead>
|
||||||
|
<th>Bil</th>
|
||||||
|
<th>No.Rujukan</th>
|
||||||
|
<th>Nama</th>
|
||||||
|
<th>No.KP</th>
|
||||||
|
<th>No.Telefon</th>
|
||||||
|
<th>Tempoh</th>
|
||||||
|
<th>Baki Pembiayaan (RM)</th>
|
||||||
|
<th>Keuntungan 6Bulan (RM)</th>
|
||||||
|
<th>Amaun Telah Bayar (RM)</th>
|
||||||
|
<th>Keuntungan Semasa (RM)</th>
|
||||||
|
<th>Tarikh Matang</th>
|
||||||
|
<th>Tarikh Tamat Kontrak</th>
|
||||||
|
<th>Tarikh Blast</th>
|
||||||
|
|
||||||
|
|
||||||
|
</thead>
|
||||||
|
@foreach ($bycawnotisperingatan as $index => $item)
|
||||||
|
<tr>
|
||||||
|
<td>{{ $loop->iteration }}</td>
|
||||||
|
<td style="white-space: nowrap;">{{$item['norujukan']}}</td>
|
||||||
|
<td style="white-space: nowrap;">{{$item['namacust']['nama'] ?? ''}}</td>
|
||||||
|
<td style="white-space: nowrap;">{{$item['nokp']}}</td>
|
||||||
|
<td style="white-space: nowrap;">6{{$item['namacust']['telefon'] ?? ''}}</td>
|
||||||
|
<td align = 'right' style="white-space: nowrap;">{{$item['jbg']}}</td>
|
||||||
|
<td align = 'right' style="white-space: nowrap;">{{number_format($item['datagadai']['bakipjm'], 2, '.', ',')}}</td>
|
||||||
|
<td align = 'right' style="white-space: nowrap;">{{number_format($item['datagadai']['bakiupah'], 2, '.', ',')}}</td>
|
||||||
|
<td align = 'right' style="white-space: nowrap;">{{number_format($item['datagadai']['hargajualan']-$item['datagadai']['bakihargajualan'], 2, '.', ',')}}</td>
|
||||||
|
@if($item['datagadai']['tagbaru'] == '0')
|
||||||
|
<td align = 'right' style="white-space: nowrap;">{{number_format($item['keuntungan'], 2, '.', ',')}}</td>
|
||||||
|
@elseif($item['datagadai']['tagbaru'] == '1')
|
||||||
|
<td align = 'right' style="white-space: nowrap;">{{number_format($item['keuntungan']['ujrah']+$item['keuntungan']['onepercent'], 2, '.', ',')}}</td>
|
||||||
|
@endif
|
||||||
|
<td align = 'right' style="white-space: nowrap;"><b>
|
||||||
|
@if($item['tmatang'] == null)
|
||||||
|
@else
|
||||||
|
@php
|
||||||
|
$myDateTime = DateTime::createFromFormat('Y-m-d', $item['tmatang']);
|
||||||
|
$formattedweddingdate = $myDateTime->format('d-m-Y');
|
||||||
|
echo($formattedweddingdate);
|
||||||
|
@endphp</b></td>
|
||||||
|
@endif
|
||||||
|
<td align = 'right' style="white-space: nowrap;"><b>
|
||||||
|
@if($item['tmatang1'] == null)
|
||||||
|
@else
|
||||||
|
@php
|
||||||
|
$myDateTime = DateTime::createFromFormat('Y-m-d', $item['tmatang1']);
|
||||||
|
$formattedweddingdate = $myDateTime->format('d-m-Y');
|
||||||
|
echo($formattedweddingdate);
|
||||||
|
@endphp</b></td>
|
||||||
|
@endif
|
||||||
|
<td align = 'right' style="white-space: nowrap;"><b>
|
||||||
|
@if($item['tarikhnotis1'] == null)
|
||||||
|
|
||||||
|
@else
|
||||||
|
@php
|
||||||
|
$myDateTime = DateTime::createFromFormat('Y-m-d', $item['tarikhnotis1']);
|
||||||
|
$formattedweddingdate = $myDateTime->format('d-m-Y');
|
||||||
|
echo($formattedweddingdate);
|
||||||
|
@endphp</b></td>
|
||||||
|
@endif
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
|
||||||
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
$(document).ready(function () {
|
||||||
|
// window.print();
|
||||||
|
// window.onfocus=function(){ window.close();}
|
||||||
|
var table2excel = new Table2Excel();
|
||||||
|
table2excel.export(document.querySelectorAll("#details"),'Senarai Notis Peringatan Pertama');
|
||||||
|
setTimeout(function(){ window.close() }, 1000);
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
@if(count($customers) > 0)
|
||||||
|
<table class="table table-bordered table-hover" style="background-color: #f9f9f9;">
|
||||||
|
<thead class="thead-light">
|
||||||
|
<tr>
|
||||||
|
<th>Nama</th>
|
||||||
|
<th>No KP</th>
|
||||||
|
<th>Kod Cawangan</th>
|
||||||
|
<th>Tindakan</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@foreach($customers as $customer)
|
||||||
|
<tr>
|
||||||
|
<td>{{ $customer['nama'] }}</td>
|
||||||
|
<td>{{ $customer['kpbaru'] ?? $customer['kplama'] ?? '-' }}</td>
|
||||||
|
<td>{{ $customer['kodcaw'] }}</td>
|
||||||
|
<td>
|
||||||
|
<form action="{{ route('arcc.pilihpelanggan.proceed') }}" method="POST">
|
||||||
|
@csrf
|
||||||
|
<input type="hidden" name="customer" value="{{ base64_encode(json_encode($customer)) }}">
|
||||||
|
<input type="hidden" name="kodcaw" value="{{ $customer['kodcaw'] }}">
|
||||||
|
<input type="hidden" name="nokp" value="{{ $customer['kpbaru'] ?? $customer['kplama'] ?? '-' }}">
|
||||||
|
<button type="submit" class="btn btn-sm btn-primary">Pilih</button>
|
||||||
|
</form>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
@else
|
||||||
|
<div class="alert alert-warning">Tiada pelanggan dijumpai.</div>
|
||||||
|
@endif
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
@extends('layouts.app_callcenter')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="container">
|
||||||
|
<a href="javascript:window.history.go(-1);" class="btn btn-secondary mt-3">Kembali</a>
|
||||||
|
<h4 class="text-center mb-4">Senarai Cawangan Dijumpai</h4>
|
||||||
|
@if(session('customer_list') && count(session('customer_list')) > 0)
|
||||||
|
<table class="table table-bordered table-hover" style="background-color: #f9f9f9;">
|
||||||
|
<thead class="thead-light">
|
||||||
|
<tr>
|
||||||
|
<th>Nama</th>
|
||||||
|
<th>No KP</th>
|
||||||
|
<th>Nama Cawangan</th>
|
||||||
|
<th>Tindakan</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@foreach(session('customer_list') as $customer)
|
||||||
|
<tr>
|
||||||
|
<td>{{ $customer['nama'] }}</td>
|
||||||
|
<td> @php
|
||||||
|
if($customer['kpbaru'] != null){
|
||||||
|
$noic = $customer['kpbaru'];
|
||||||
|
}else{
|
||||||
|
$noic = $customer['kplama'];
|
||||||
|
}
|
||||||
|
@endphp
|
||||||
|
{{ $noic }}</td>
|
||||||
|
<td>{{ $customer['nama_cawangan'] }}</td>
|
||||||
|
<td>
|
||||||
|
<form action="{{ route('arcc.pilihpelanggan.proceed') }}" method="POST">
|
||||||
|
@csrf
|
||||||
|
<input type="hidden" name="customer" value="{{ base64_encode(json_encode($customer)) }}">
|
||||||
|
<input type="hidden" name="kodcaw" value="{{ $customer['kodcaw'] ?? '' }}">
|
||||||
|
<button type="submit" class="btn btn-sm btn-primary">Pilih</button>
|
||||||
|
</form>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
@else
|
||||||
|
<div class="alert alert-warning">Tiada pelanggan dijumpai.</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
<a href="javascript:window.history.go(-1);" class="btn btn-secondary mt-3">Kembali</a>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
@extends('layouts.app_callcenter')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="container">
|
||||||
|
<a href="javascript:window.history.go(-1);" class="btn btn-secondary mt-3">Kembali</a>
|
||||||
|
<h4 class="text-center mb-4">Senarai Nama Pelanggan Dijumpai</h4>
|
||||||
|
@if(session('customer_list') && count(session('customer_list')) > 0)
|
||||||
|
<table class="table table-bordered table-hover" style="background-color: #f9f9f9;">
|
||||||
|
<thead class="thead-light">
|
||||||
|
<tr>
|
||||||
|
<th>Nama</th>
|
||||||
|
<th>No KP</th>
|
||||||
|
<!-- <th>Nama Cawangan</th> -->
|
||||||
|
<th>Tindakan</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@foreach(session('customer_list') as $customer)
|
||||||
|
<tr>
|
||||||
|
<td>{{ $customer['nama'] }}</td>
|
||||||
|
<td> @php
|
||||||
|
if($customer['kpbaru'] != null){
|
||||||
|
$noic = $customer['kpbaru'];
|
||||||
|
}else{
|
||||||
|
$noic = $customer['kplama'];
|
||||||
|
}
|
||||||
|
@endphp
|
||||||
|
{{ $noic }}</td>
|
||||||
|
<!-- <td>{{ $customer['nama_cawangan'] }}</td> -->
|
||||||
|
<td>
|
||||||
|
<form action="{{ route('arcc.searchpelanggannama') }}" method="GET">
|
||||||
|
@csrf
|
||||||
|
<input type="hidden" name="customer" value="{{ base64_encode(json_encode($customer)) }}">
|
||||||
|
<input type="hidden" name="kodcaw" value="{{ $customer['kodcaw'] ?? '' }}">
|
||||||
|
<input type="hidden" name="noic" value="{{ $noic ?? '' }}">
|
||||||
|
<button type="submit" class="btn btn-sm btn-primary">Pilih</button>
|
||||||
|
</form>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
@else
|
||||||
|
<div class="alert alert-warning">Tiada pelanggan dijumpai.</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
<a href="javascript:window.history.go(-1);" class="btn btn-secondary mt-3">Kembali</a>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
@include('modal.agh')
|
@include('modal.agh')
|
||||||
|
|
||||||
|
|
||||||
<div class="container">
|
<div class="container-fluid">
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col-md-12 col-lg-12">
|
<div class="col-md-12 col-lg-12">
|
||||||
|
|
||||||
@@ -156,6 +156,7 @@
|
|||||||
<th>Tempoh</th>
|
<th>Tempoh</th>
|
||||||
<th>Keuntungan</th>
|
<th>Keuntungan</th>
|
||||||
<th>Lelong</th>
|
<th>Lelong</th>
|
||||||
|
<th>Pembayaran Terakhir</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
</table>
|
</table>
|
||||||
@@ -722,6 +723,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
var taglel = '';
|
var taglel = '';
|
||||||
|
var lastbayar = '';
|
||||||
if(gadai_detail['taglel'] == 1){
|
if(gadai_detail['taglel'] == 1){
|
||||||
if(tagarrahnbid == 1){
|
if(tagarrahnbid == 1){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
@@ -731,6 +733,7 @@
|
|||||||
|
|
||||||
success: function(data){
|
success: function(data){
|
||||||
taglel = data.lelong.t_lelong;
|
taglel = data.lelong.t_lelong;
|
||||||
|
lastbayar = data.lelong.lastbayar;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@@ -744,6 +747,7 @@
|
|||||||
},
|
},
|
||||||
success: function(v){
|
success: function(v){
|
||||||
taglel = v.t_lelong;
|
taglel = v.t_lelong;
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -777,6 +781,7 @@
|
|||||||
gadai_detail['tempoh'],
|
gadai_detail['tempoh'],
|
||||||
'RM '+ formatter.format(upahsemasa),
|
'RM '+ formatter.format(upahsemasa),
|
||||||
'<div style="white-space: nowrap; color:red; font-weight: bolder">' + taglel + '</div>',
|
'<div style="white-space: nowrap; color:red; font-weight: bolder">' + taglel + '</div>',
|
||||||
|
'<div style="white-space: nowrap; color:red; font-weight: bolder">' + lastbayar + '</div>',
|
||||||
]).draw();
|
]).draw();
|
||||||
}
|
}
|
||||||
}else if(jenistebus == "sudah_tebus"){
|
}else if(jenistebus == "sudah_tebus"){
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
@include('modal.historytebus')
|
@include('modal.historytebusarcc')
|
||||||
@include('modal.wakil')
|
@include('modal.wakil')
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
@@ -119,15 +119,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-12 d-flex justify-content-end mt-3">
|
{{-- <div class="col-md-12 d-flex justify-content-end mt-3">
|
||||||
<button class="btn btn-primary" data-toggle="modal" data-target="#customer_detail">Maklumat Pelanggan</button>
|
<button class="btn btn-primary" data-toggle="modal" data-target="#customer_detail">Maklumat Pelanggan</button>
|
||||||
|
</div> --}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-12 mt-md-3 justify-content-between form-group row">
|
<div class="col-md-12 mt-md-3 justify-content-between form-group row">
|
||||||
<div class="btn-group btn-group-toggle col-md-6" data-toggle="buttons">
|
<div class="btn-group btn-group-toggle col-md-6" data-toggle="buttons">
|
||||||
<label class="btn btn-primary">
|
<label class="btn btn-secondary">
|
||||||
<input type="radio" name="options" id="option1" value="belum_tebus" autocomplete="off" checked>Pembiayaan Belum Selesai
|
<input type="radio" name="options" id="option1" value="belum_tebus" autocomplete="off" checked>Pembiayaan Belum Selesai
|
||||||
</label>
|
</label>
|
||||||
<label class="btn btn-secondary">
|
<label class="btn btn-secondary">
|
||||||
@@ -136,6 +135,7 @@
|
|||||||
<label class="btn btn-secondary">
|
<label class="btn btn-secondary">
|
||||||
<input type="radio" name="options" id="option3" value="lelong" autocomplete="off">Lelong
|
<input type="radio" name="options" id="option3" value="lelong" autocomplete="off">Lelong
|
||||||
</label>
|
</label>
|
||||||
|
<button class="btn btn-secondary" data-toggle="modal" data-target="#arcc_detail">Maklumat Pelanggan</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -156,7 +156,7 @@
|
|||||||
|
|
||||||
@endphp
|
@endphp
|
||||||
<a class="nav-item nav-link {{ $activate_tab_SAG_baru }}" id="nav-tawarruq-tab" data-toggle="tab" href="#nav-tawarruq" role="tab" aria-controls="nav-tawarruq" aria-selected="{{ $aria_selected_SAG_baru }}">SAG Baru</a>
|
<a class="nav-item nav-link {{ $activate_tab_SAG_baru }}" id="nav-tawarruq-tab" data-toggle="tab" href="#nav-tawarruq" role="tab" aria-controls="nav-tawarruq" aria-selected="{{ $aria_selected_SAG_baru }}">SAG Baru</a>
|
||||||
<a class="nav-item nav-link {{ $activate_tab_SAG_lama }}" " id="nav-xtawarruq-tab" data-toggle="tab" href="#nav-xtawarruq" role="tab" aria-controls="nav-xtawarruq" aria-selected="{{ $aria_selected_SAG_lama }}"><span id="textnavsag">SAG Lama</span></a>
|
<a class="nav-item nav-link {{ $activate_tab_SAG_lama }}" id="nav-xtawarruq-tab" data-toggle="tab" href="#nav-xtawarruq" role="tab" aria-controls="nav-xtawarruq" aria-selected="{{ $aria_selected_SAG_lama }}"><span id="textnavsag">SAG Lama</span></a>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
<div class="tab-content" id="navtawarruqdannottawarruq">
|
<div class="tab-content" id="navtawarruqdannottawarruq">
|
||||||
@@ -255,6 +255,52 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="modal fade" id="arcc_detail" tabindex="-1" aria-labelledby="arcc_detailLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-dialog-centered modal-xl">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h5 class="modal-title" id="arcc_detailLabel">Maklumat Pelanggan</h5>
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
|
||||||
|
<!-- Maklumat Pelanggan -->
|
||||||
|
@php
|
||||||
|
if($customer_info['kpbaru'] != null){
|
||||||
|
$noic = $customer_info['kpbaru'];
|
||||||
|
} else {
|
||||||
|
$noic = $customer_info['kplama'];
|
||||||
|
}
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
<div class="bg-light p-3 rounded border">
|
||||||
|
<p><strong>Nama:</strong> {{ $customer_info['nama'] }}</p>
|
||||||
|
<p><strong>No. K/P:</strong> {{ $noic }}</p>
|
||||||
|
<p><strong>No. Telefon:</strong> {{ $customer_info['telefon'] ? $customer_info['telefon'] : '' }}</p>
|
||||||
|
<p><strong>Alamat:</strong> {{ $customer_info['alamat1'] }}</p>
|
||||||
|
<p><strong>No. Pelanggan:</strong> {{ $customer_info['nopelanggan'] }}</p>
|
||||||
|
<p><strong>Nota Pelanggan:</strong> {{ $customer_info['nota'] }}</p>
|
||||||
|
|
||||||
|
<div class="ms-12 mt-2">
|
||||||
|
<strong>Nota Arcc:</strong>
|
||||||
|
<textarea style="resize:none; width:100%; padding: 10px;" name="nota_arcc" id="nota_arcc" rows="2" readonly class="form-control">{{ $customer_info['nota_arcc'] }}</textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-primary" onclick="kemaskinifunc()" id="btnkemaskini">Ubah</button>
|
||||||
|
<button type="button" class="btn btn-primary" onclick="kemaskinipelanggan()" id="btnsave">Terima</button>
|
||||||
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">Tutup</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<!-- Modal -->
|
<!-- Modal -->
|
||||||
<div class="modal fade" id="customer_detail" tabindex="-1" aria-labelledby="customer_detailLabel" aria-hidden="true">
|
<div class="modal fade" id="customer_detail" tabindex="-1" aria-labelledby="customer_detailLabel" aria-hidden="true">
|
||||||
<div class="modal-dialog modal-dialog-centered modal-xl">
|
<div class="modal-dialog modal-dialog-centered modal-xl">
|
||||||
@@ -274,7 +320,9 @@
|
|||||||
Nama
|
Nama
|
||||||
</div>
|
</div>
|
||||||
<div class='col-md-7'>
|
<div class='col-md-7'>
|
||||||
<input type="text" readonly name='nama' id='nama' value="{{ $customer_info['nama'] }}" class='form-control'>
|
<label id="nama" class="form-control" style="background: none; border: none; padding-left: 0;">
|
||||||
|
{{ $customer_info['nama'] }}
|
||||||
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class='form-group row col-md-12'>
|
<div class='form-group row col-md-12'>
|
||||||
@@ -282,7 +330,10 @@
|
|||||||
No KP
|
No KP
|
||||||
</div>
|
</div>
|
||||||
<div class='col-md-7'>
|
<div class='col-md-7'>
|
||||||
<input type="text" readonly name='icno' id='icno' value="{{ $customer_info['kpbaru'] ? $customer_info['kpbaru'] : $customer_info['kplama'] }}" class='form-control'>
|
{{-- <input type="text" readonly name='icno' id='icno' value="{{ $customer_info['kpbaru'] ? $customer_info['kpbaru'] : $customer_info['kplama'] }}" class='form-control'> --}}
|
||||||
|
<label id="icno" class="form-control" style="background: none; border: none; padding-left: 0;">
|
||||||
|
{{ $customer_info['kpbaru'] ? $customer_info['kpbaru'] : $customer_info['kplama'] }}
|
||||||
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class='form-group row col-md-12'>
|
<div class='form-group row col-md-12'>
|
||||||
@@ -290,7 +341,10 @@
|
|||||||
No Pelanggan
|
No Pelanggan
|
||||||
</div>
|
</div>
|
||||||
<div class='col-md-7'>
|
<div class='col-md-7'>
|
||||||
<input type="text" readonly name='nopelanggan' id='nopelanggan' value="{{ $customer_info['nopelanggan'] }}" class='form-control'>
|
{{-- <input type="text" readonly name='nopelanggan' id='nopelanggan' value="{{ $customer_info['nopelanggan'] }}" class='form-control'> --}}
|
||||||
|
<label id="nopelanggan" class="form-control" style="background: none; border: none; padding-left: 0;">
|
||||||
|
{{ $customer_info['nopelanggan'] }}
|
||||||
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class='form-group row col-md-12'>
|
<div class='form-group row col-md-12'>
|
||||||
@@ -298,7 +352,10 @@
|
|||||||
No Telefon 1
|
No Telefon 1
|
||||||
</div>
|
</div>
|
||||||
<div class='col-md-7'>
|
<div class='col-md-7'>
|
||||||
<input type="text" readonly name='' id='telefon' value="{{ $customer_info['telefon'] ? $customer_info['telefon'] : '' }}" class='form-control'>
|
{{-- <input type="text" readonly name='' id='telefon' value="{{ $customer_info['telefon'] ? $customer_info['telefon'] : '' }}" class='form-control'> --}}
|
||||||
|
<label id="telefon" class="form-control" style="background: none; border: none; padding-left: 0;">
|
||||||
|
{{ $customer_info['telefon'] ? $customer_info['telefon'] : '' }}
|
||||||
|
</label>
|
||||||
<span id="errortelefon" style="color:red;"></span>
|
<span id="errortelefon" style="color:red;"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -307,7 +364,10 @@
|
|||||||
No Telefon 2
|
No Telefon 2
|
||||||
</div>
|
</div>
|
||||||
<div class='col-md-7'>
|
<div class='col-md-7'>
|
||||||
<input type="text" readonly name='telefon2' id='telefon2' value="{{ $customer_info['telefon2'] ? $customer_info['telefon2'] : '' }}" class='form-control'>
|
{{-- <input type="text" readonly name='telefon2' id='telefon2' value="{{ $customer_info['telefon2'] ? $customer_info['telefon2'] : '' }}" class='form-control'> --}}
|
||||||
|
<label id="telefon2" class="form-control" style="background: none; border: none; padding-left: 0;">
|
||||||
|
{{ $customer_info['telefon2'] ? $customer_info['telefon2'] : '' }}
|
||||||
|
</label>
|
||||||
<span id="errortelefon2" style="color:red;"></span>
|
<span id="errortelefon2" style="color:red;"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -316,7 +376,7 @@
|
|||||||
Bank
|
Bank
|
||||||
</div>
|
</div>
|
||||||
<div class='col-md-7'>
|
<div class='col-md-7'>
|
||||||
@php
|
{{-- @php
|
||||||
$bank = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/bank')->json();
|
$bank = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/bank')->json();
|
||||||
@endphp
|
@endphp
|
||||||
<select class="form-control" name="kodbank" data-placeholder="Pilih Bank" id="kodbank" disabled="true">
|
<select class="form-control" name="kodbank" data-placeholder="Pilih Bank" id="kodbank" disabled="true">
|
||||||
@@ -324,7 +384,22 @@
|
|||||||
@foreach($bank as $banks)
|
@foreach($bank as $banks)
|
||||||
<option value="{{ $banks['abbreviation'] }}" {{ $banks['abbreviation'] == $customer_info['kodbank'] ? 'selected' : ''}}>{{ $banks['name'] }}</option>
|
<option value="{{ $banks['abbreviation'] }}" {{ $banks['abbreviation'] == $customer_info['kodbank'] ? 'selected' : ''}}>{{ $banks['name'] }}</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
</select>
|
</select> --}}
|
||||||
|
@php
|
||||||
|
$bank = Http::withOptions(['verify' => config('app.api_verify')])
|
||||||
|
->get($api_url . '/api/bank')
|
||||||
|
->json();
|
||||||
|
$selectedBank = '-';
|
||||||
|
foreach ($bank as $banks) {
|
||||||
|
if ($banks['abbreviation'] == $customer_info['kodbank']) {
|
||||||
|
$selectedBank = $banks['name'];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@endphp
|
||||||
|
<label id="kodbank" class="form-control" style="background: none; border: none; padding-left: 0;">
|
||||||
|
{{ $selectedBank }}
|
||||||
|
</label>
|
||||||
<span id="errorkodbank" style="color:red;"></span>
|
<span id="errorkodbank" style="color:red;"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -333,7 +408,10 @@
|
|||||||
No Akaun
|
No Akaun
|
||||||
</div>
|
</div>
|
||||||
<div class='col-md-7'>
|
<div class='col-md-7'>
|
||||||
<input type="text" readonly name='noakaun' id='noakaun' value="{{ $customer_info['noakaun'] }}" class='form-control'>
|
{{-- <input type="text" readonly name='noakaun' id='noakaun' value="{{ $customer_info['noakaun'] }}" class='form-control'> --}}
|
||||||
|
<label id="noakaun" class="form-control" style="background: none; border: none; padding-left: 0;">
|
||||||
|
{{ $customer_info['noakaun'] }}
|
||||||
|
</label>
|
||||||
<span id="errornoakaun" style="color:red;"></span>
|
<span id="errornoakaun" style="color:red;"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -343,8 +421,13 @@
|
|||||||
<div class='col-md-4'>
|
<div class='col-md-4'>
|
||||||
Alamat
|
Alamat
|
||||||
</div>
|
</div>
|
||||||
<div class='col-md-8'>
|
{{-- <div class='col-md-8'>
|
||||||
<textarea style="resize:none" name="alamat" id="alamat" cols="30" rows="3" readonly class='form-control'>{{ $customer_info['alamat1'] ? $customer_info['alamat1'] : 'NIL' }}</textarea>
|
<textarea style="resize:none" name="alamat" id="alamat" cols="30" rows="3" readonly class='form-control'>{{ $customer_info['alamat1'] ? $customer_info['alamat1'] : 'NIL' }}</textarea>
|
||||||
|
</div> --}}
|
||||||
|
<div class='col-md-8'>
|
||||||
|
<label id="alamat" class="form-control" style="background: none; border: none; padding-left: 0;">
|
||||||
|
{{ $customer_info['alamat1'] ? $customer_info['alamat1'] : 'NIL' }}
|
||||||
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class='form-group row col-md-12'>
|
<div class='form-group row col-md-12'>
|
||||||
@@ -352,49 +435,61 @@
|
|||||||
Poskod
|
Poskod
|
||||||
</div>
|
</div>
|
||||||
<div class='col-md-8'>
|
<div class='col-md-8'>
|
||||||
<input type="text" readonly name='poskod' id='poskod' value="{{ $customer_info['poskod'] ? $customer_info['poskod'] : 'NIL' }}" class='form-control'>
|
{{-- <input type="text" readonly name='poskod' id='poskod' value="{{ $customer_info['poskod'] ? $customer_info['poskod'] : 'NIL' }}" class='form-control'> --}}
|
||||||
|
<label id="poskod" class="form-control" style="background: none; border: none; padding-left: 0;">
|
||||||
|
{{ $customer_info['poskod'] ? $customer_info['poskod'] : 'NIL' }}
|
||||||
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class='form-group row col-md-12'>
|
<div class='form-group row col-md-12'>
|
||||||
<div class='col-md-4'>
|
<div class='col-md-4'>
|
||||||
Daerah
|
Daerah
|
||||||
</div>
|
</div>
|
||||||
<div class='col-md-8'>
|
{{-- <div class='col-md-8'>
|
||||||
@php
|
@php
|
||||||
$poskod = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/poskod/'. $customer_info['poskod'])->json();
|
$poskod = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/poskod/'. $customer_info['poskod'])->json();
|
||||||
if(empty($poskod)){
|
if(empty($poskod)){
|
||||||
$poskod = array('koddaerah'=>'NIL','kodnegeri' => 'NIL');
|
$poskod = array('koddaerah'=>'NIL','kodnegeri' => 'NIL');
|
||||||
}
|
}
|
||||||
$daerah = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/daerah/' . $poskod['koddaerah'])->json();
|
$daerah = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/daerah/' . $poskod['koddaerah'])->json();
|
||||||
@endphp
|
@endphp --}}
|
||||||
<input type="text" readonly name='koddaerah' id='koddaerah' value="{{ $daerah ? $daerah['namadaerah'] : 'NIL' }}" class='form-control'>
|
{{-- <input type="text" readonly name='koddaerah' id='koddaerah' value="{{ $daerah ? $daerah['namadaerah'] : 'NIL' }}" class='form-control'> --}}
|
||||||
|
{{-- <label id="koddaerah" class="form-control" style="background: none; border: none; padding-left: 0;">
|
||||||
|
{{ $daerah ? $daerah['namadaerah'] : 'NIL' }}
|
||||||
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> --}}
|
||||||
<div class='form-group row col-md-12'>
|
{{-- <div class='form-group row col-md-12'>
|
||||||
<div class='col-md-4'>
|
<div class='col-md-4'>
|
||||||
Negeri
|
Negeri
|
||||||
</div>
|
</div>
|
||||||
<div class='col-md-8'>
|
<div class='col-md-8'>
|
||||||
@php
|
@php
|
||||||
$negeri = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/negeri/' . $poskod['kodnegeri'])->json();
|
$negeri = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/negeri/' . $poskod['kodnegeri'])->json();
|
||||||
@endphp
|
@endphp --}}
|
||||||
<input type="text" readonly name='kodnegeri' id='kodnegeri' value="{{ $negeri ? $negeri['negeri'] : 'NIL' }}" class='form-control'>
|
{{-- <input type="text" readonly name='kodnegeri' id='kodnegeri' value="{{ $negeri ? $negeri['negeri'] : 'NIL' }}" class='form-control'> --}}
|
||||||
</div>
|
{{-- <label id="kodnegeri" class="form-control" style="background: none; border: none; padding-left: 0;">
|
||||||
|
{{ $negeri ? $negeri['negeri'] : 'NIL' }}
|
||||||
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
</div> --}}
|
||||||
<div class='form-group row col-md-12'>
|
<div class='form-group row col-md-12'>
|
||||||
<div class='col-md-4'>
|
<div class='col-md-4'>
|
||||||
Nota
|
Nota
|
||||||
</div>
|
</div>
|
||||||
<div class='col-md-8'>
|
<div class='col-md-8'>
|
||||||
<textarea style="resize:none" name="nota" id="nota" cols="30" rows="3" readonly class='form-control'>{{ $customer_info['nota'] }}</textarea>
|
{{-- <textarea style="resize:none" name="nota" id="nota" cols="30" rows="3" readonly class='form-control'>{{ $customer_info['nota'] }}</textarea> --}}
|
||||||
|
<label id="nota" class="form-control" style="background: none; border: none; padding-left: 0;">
|
||||||
|
{{ $customer_info['nota'] }}
|
||||||
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<div class="mr-5 form-group float-right">
|
<div class="mr-5 form-group float-right">
|
||||||
{{-- <button type="button" class="btn btn-primary" onclick="kemaskinifunc()" id="btnkemaskini">Ubah</button> --}}
|
{{-- <button type="button" class="btn btn-primary" onclick="kemaskinifunc()" id="btnkemaskini">Ubah</button>
|
||||||
<button type="button" class="btn btn-primary" onclick="kemaskinipelanggan()" id="btnsave">Terima</button>
|
<button type="button" class="btn btn-primary" onclick="kemaskinipelanggan()" id="btnsave">Terima</button> --}}
|
||||||
{{-- <button type="button" class="btn btn-primary" id="btnotp">Daftar Akaun Online</button> --}}
|
{{-- <button type="button" class="btn btn-primary" id="btnotp">Daftar Akaun Online</button> --}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -867,11 +962,12 @@
|
|||||||
urlroute = urlroute.replace(':id', gadai_detail["norujukan"]);
|
urlroute = urlroute.replace(':id', gadai_detail["norujukan"]);
|
||||||
|
|
||||||
var tuntutan = '';
|
var tuntutan = '';
|
||||||
if(gadai_detail['datatuntut']['teller'] == 'DM')
|
if(gadai_detail['datatuntut'] && gadai_detail['datatuntut']['teller'] == 'DM') {
|
||||||
{
|
|
||||||
tuntutan = 'WTD';
|
tuntutan = 'WTD';
|
||||||
}else{
|
}else if (gadai_detail['trkhtuntut'] !== null) {
|
||||||
tuntutan = 'Pelanggan';
|
tuntutan = 'Pelanggan';
|
||||||
|
}else {
|
||||||
|
tuntutan = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
if(gadai_detail['trkhtuntut'] == null){
|
if(gadai_detail['trkhtuntut'] == null){
|
||||||
@@ -1254,10 +1350,10 @@
|
|||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
method:'get',
|
method:'get',
|
||||||
url:'{{ route("arcc.history") }}',
|
url: '{{ route("arcc.history", ":kodcaw") }}'.replace(':kodcaw', kodcaw),
|
||||||
data:{ "norujukan" : histid},
|
data:{ "norujukan" : histid},
|
||||||
success:function(data){
|
success:function(data){
|
||||||
historytebustable(data);
|
historytebustable(data,histid);
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
method: 'get',
|
method: 'get',
|
||||||
@@ -1336,7 +1432,10 @@
|
|||||||
urlroute = urlroute.replace(':id', bayaran['id']);
|
urlroute = urlroute.replace(':id', bayaran['id']);
|
||||||
historybayarandatatable.row.add([
|
historybayarandatatable.row.add([
|
||||||
counter,
|
counter,
|
||||||
|
bayaran['norujukan'],
|
||||||
bayaran['created_at'],
|
bayaran['created_at'],
|
||||||
|
"RM " + bayaran['bayaran_pembiayaan'],
|
||||||
|
"RM " + bayaran['bayaran_keuntungan'],
|
||||||
"RM " + bayaran['duit_masuk'],
|
"RM " + bayaran['duit_masuk'],
|
||||||
bayaranteller,
|
bayaranteller,
|
||||||
bayaran['trans_type'],
|
bayaran['trans_type'],
|
||||||
@@ -1350,54 +1449,54 @@
|
|||||||
"ordering": false
|
"ordering": false
|
||||||
});
|
});
|
||||||
|
|
||||||
function historytebustable(data){
|
function historytebustable(data, histid)
|
||||||
|
{
|
||||||
|
console.log("Full data returned tebus:", histid); // Debug
|
||||||
|
|
||||||
var counter = 1;
|
var counter = 1;
|
||||||
historytebusbayaran.clear().draw();
|
historytebusbayaran.clear().draw();
|
||||||
|
|
||||||
$.each(data,function(index,tebusaz){
|
// TAPIS hanya entry yang sama dengan norujukan klik user
|
||||||
|
let filtered = data.filter(tebusaz => tebusaz.norujukan === histid);
|
||||||
|
|
||||||
|
$.each(filtered, function(index, tebusaz){
|
||||||
|
console.log("Tebus untuk:", tebusaz.norujukan);
|
||||||
|
|
||||||
|
var urlroute = '';
|
||||||
switch(tebusaz['jenistebus']) {
|
switch(tebusaz['jenistebus']) {
|
||||||
case 'P':
|
case 'P':
|
||||||
var urlroute = '{{ route("resit.tambahpinjam", ":id") }}';
|
urlroute = '{{ route("resit.tambahpinjam", ":id") }}'.replace(':id', tebusaz['norujukan']);
|
||||||
urlroute = urlroute.replace(':id', tebusaz['norujukan']);
|
|
||||||
break;
|
break;
|
||||||
case 'T':
|
case 'T':
|
||||||
|
urlroute = (tebusaz['hargajualan'] === '')
|
||||||
if(tebusaz['hargajualan'] === '')
|
? '{{ route("resit.belumtebus", ":id") }}'.replace(':id', tebusaz['norujukan'])
|
||||||
{
|
: '{{ route("resit.tebus", ":id") }}'.replace(':id', tebusaz['norujukan']);
|
||||||
var urlroute = '{{ route("resit.belumtebus", ":id") }}';
|
|
||||||
urlroute = urlroute.replace(':id', tebusaz['norujukan']);
|
|
||||||
|
|
||||||
}else{
|
|
||||||
var urlroute = '{{ route("resit.tebus", ":id") }}';
|
|
||||||
urlroute = urlroute.replace(':id', tebusaz['norujukan']);
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 'A':
|
case 'A':
|
||||||
var urlroute = '{{ route("resit.belumansurans", ":id") }}';
|
urlroute = '{{ route("resit.belumansurans", ":id") }}'.replace(':id', tebusaz['norujukan']);
|
||||||
urlroute = urlroute.replace(':id', tebusaz['norujukan']);
|
|
||||||
break;
|
break;
|
||||||
case 'S':
|
case 'S':
|
||||||
var urlroute = '{{ route("resit.tebusseparuh", ":id") }}';
|
urlroute = '{{ route("resit.tebusseparuh", ":id") }}'.replace(':id', tebusaz['id']);
|
||||||
urlroute = urlroute.replace(':id', tebusaz['norujukan']);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
historytebusbayaran.row.add([
|
historytebusbayaran.row.add([
|
||||||
counter,
|
counter,
|
||||||
tebusaz['norujukan'],
|
histid,
|
||||||
tebusaz['jenistebus'],
|
tebusaz['trans_type'],
|
||||||
tebusaz['pinjaman'],
|
"RM " + tebusaz['bayaran_pembiayaan'],
|
||||||
|
"RM " + tebusaz['bayaran_keuntungan'],
|
||||||
|
"RM " + tebusaz['duit_masuk'],
|
||||||
tebusaz['jbg'],
|
tebusaz['jbg'],
|
||||||
tebusaz['t_tebus'],
|
tebusaz['t_tebus'],
|
||||||
''
|
''
|
||||||
]).draw();
|
]).draw();
|
||||||
counter = counter + 1;
|
|
||||||
|
counter++;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function daftarwakil()
|
function daftarwakil()
|
||||||
{
|
{
|
||||||
let nopelanggan = $('#nopelangganwakil').val();
|
let nopelanggan = $('#nopelangganwakil').val();
|
||||||
@@ -2343,6 +2442,7 @@
|
|||||||
$('#kodbank').attr('disabled', false);
|
$('#kodbank').attr('disabled', false);
|
||||||
$('#noakaun').attr('readonly', false);
|
$('#noakaun').attr('readonly', false);
|
||||||
$('#nota').attr('readonly', false);
|
$('#nota').attr('readonly', false);
|
||||||
|
$('#nota_arcc').attr('readonly', false);
|
||||||
$('#alamat').attr('readonly', false);
|
$('#alamat').attr('readonly', false);
|
||||||
$('#poskod').attr('readonly', false);
|
$('#poskod').attr('readonly', false);
|
||||||
|
|
||||||
@@ -2364,6 +2464,7 @@
|
|||||||
$('#kodbank').attr('disabled', true);
|
$('#kodbank').attr('disabled', true);
|
||||||
$('#noakaun').attr('readonly', true);
|
$('#noakaun').attr('readonly', true);
|
||||||
$('#nota').attr('readonly', true);
|
$('#nota').attr('readonly', true);
|
||||||
|
$('#nota_arcc').attr('readonly', true);
|
||||||
$('#alamat').attr('readonly', true);
|
$('#alamat').attr('readonly', true);
|
||||||
$('#poskod').attr('readonly', true);
|
$('#poskod').attr('readonly', true);
|
||||||
}
|
}
|
||||||
@@ -2371,18 +2472,20 @@
|
|||||||
$("#kemaskiniform").submit(function(event) {
|
$("#kemaskiniform").submit(function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
var nokp = $('#icno').val();
|
var nokp = $('#noic').val();
|
||||||
var telefon1 = $('#telefon').val();
|
var telefon1 = $('#telefon').val();
|
||||||
var telefon2 = $('#telefon2').val();
|
var telefon2 = $('#telefon2').val();
|
||||||
var kodbank = $('#kodbank').val();
|
var kodbank = $('#kodbank').val();
|
||||||
var noakaun = $('#noakaun').val();
|
var noakaun = $('#noakaun').val();
|
||||||
var nota = $('#nota').val();
|
var nota = $('#nota').val();
|
||||||
|
var nota_arcc = $('#nota_arcc').val();
|
||||||
var alamat = $('#alamat').val();
|
var alamat = $('#alamat').val();
|
||||||
var poskod = $('#poskod').val();
|
var poskod = $('#poskod').val();
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
method:"put",
|
method:"put",
|
||||||
url: api_url + "/api/customers/update/kaunter/" + nokp,
|
// url: api_url + "/api/customers/update/kaunter/" + nokp + "/" + kodcaw,
|
||||||
|
url: api_url + "/api/callcenter/customers/update/kaunter/" + nokp + "/" + kodcaw,
|
||||||
data:{
|
data:{
|
||||||
"namateller" : "{{ Auth::user()->name }}",
|
"namateller" : "{{ Auth::user()->name }}",
|
||||||
"telefon1": telefon1,
|
"telefon1": telefon1,
|
||||||
@@ -2390,6 +2493,7 @@
|
|||||||
"kodbank":kodbank,
|
"kodbank":kodbank,
|
||||||
"noakaun":noakaun,
|
"noakaun":noakaun,
|
||||||
'nota':nota,
|
'nota':nota,
|
||||||
|
'nota_arcc':nota_arcc,
|
||||||
'alamat':alamat,
|
'alamat':alamat,
|
||||||
'poskod':poskod
|
'poskod':poskod
|
||||||
},
|
},
|
||||||
@@ -2426,40 +2530,99 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// function kemaskinipelanggan(){
|
||||||
|
|
||||||
|
// var errortelefon1 = 0;
|
||||||
|
// var errortelefon2 = 0;
|
||||||
|
|
||||||
|
// if(!($('#telefon').val().length >= 9 && $('#telefon').val().length < 12)){
|
||||||
|
// $('#errortelefon').show();
|
||||||
|
// $('#errortelefon').text("*lebih kecil dari 10 dan lebih besar dari 12");
|
||||||
|
// $('#telefon').addClass('is-invalid');
|
||||||
|
// errortelefon1++;
|
||||||
|
// }else{
|
||||||
|
// $('#errortelefon').hide();
|
||||||
|
// $('#telefon').removeClass('is-invalid');
|
||||||
|
// errortelefon1--;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if($('#telefon2').val() != ''){
|
||||||
|
// if(!($('#telefon2').val().length >= 9 && $('#telefon2').val().length < 12)){
|
||||||
|
// $('#errortelefon2').show();
|
||||||
|
// $('#errortelefon2').text("*lebih kecil dari 10 dan lebih besar dari 12");
|
||||||
|
// $('#telefon2').addClass('is-invalid');
|
||||||
|
// errortelefon2++;
|
||||||
|
// }else{
|
||||||
|
// $('#errortelefon2').hide();
|
||||||
|
// $('#telefon2').removeClass('is-invalid');
|
||||||
|
// errortelefon2--;
|
||||||
|
// }
|
||||||
|
// }else{
|
||||||
|
// $('#errortelefon2').hide();
|
||||||
|
// $('#telefon2').removeClass('is-invalid');
|
||||||
|
// errortelefon2--;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if(errortelefon1 <= 0 && errortelefon2 <= 0){
|
||||||
|
// $('#btnkemaskini').removeClass('btn-danger');
|
||||||
|
// $('#btnkemaskini').addClass('btn-primary');
|
||||||
|
// $('#btnkemaskini').text('Ubah');
|
||||||
|
// $('#btnkemaskini').attr('onclick','kemaskinifunc()');
|
||||||
|
// $('#btnotp').text('Daftar Akuan Online');
|
||||||
|
// $('#btnotp').attr('onclick','#');
|
||||||
|
|
||||||
|
// //attribute nak readonly false
|
||||||
|
// $('#telefon').attr('readonly', true);
|
||||||
|
// $('#telefon2').attr('readonly', true);
|
||||||
|
// $('#noakaun').attr('readonly', true);
|
||||||
|
// $('#kodbank').attr('readonly', true);
|
||||||
|
// $('#nota').attr('readonly', true);
|
||||||
|
// $('#nota_arcc').attr('readonly', true);
|
||||||
|
// $('#alamat').attr('readonly', true);
|
||||||
|
// $('#poskod').attr('readonly', true);
|
||||||
|
|
||||||
|
// $('#kemaskiniform').trigger('submit');
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// $('#btnotp').click(function(){
|
||||||
|
// $('#customer_detail').modal('hide');
|
||||||
|
// var noic = $('#noic').val();
|
||||||
|
// $('#noic_otp').val(noic);
|
||||||
|
// $('#opt_modal').modal('show');
|
||||||
|
// });
|
||||||
|
|
||||||
|
// $('#jana_otp').click(function(){
|
||||||
|
// var noic = $('#noic_otp').val();
|
||||||
|
|
||||||
|
// $.ajax({
|
||||||
|
// method:'get',
|
||||||
|
// url: "{{ route('customer.otp') }}",
|
||||||
|
// data:{
|
||||||
|
// 'noic_otp' : noic
|
||||||
|
// },
|
||||||
|
// dataType:'json',
|
||||||
|
// success: function(otp_token){
|
||||||
|
// if(otp_token['error']){
|
||||||
|
// Swal.fire({
|
||||||
|
// icon: 'error',
|
||||||
|
// title: 'Amaran!',
|
||||||
|
// text: otp_token['error']
|
||||||
|
// });
|
||||||
|
// }else if(otp_token['otp']){
|
||||||
|
// $('#otp_form').hide();
|
||||||
|
// $('#otp_generate').show();
|
||||||
|
// $('#otp_number').text(otp_token['otp']);
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// error: function(xhRequest, ErrorText, thrownError){
|
||||||
|
// console.log(xhRequest);
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// });
|
||||||
|
|
||||||
function kemaskinipelanggan(){
|
function kemaskinipelanggan(){
|
||||||
|
// Tukar butang "Batal" jadi "Ubah" semula
|
||||||
var errortelefon1 = 0;
|
|
||||||
var errortelefon2 = 0;
|
|
||||||
|
|
||||||
if(!($('#telefon').val().length >= 9 && $('#telefon').val().length < 12)){
|
|
||||||
$('#errortelefon').show();
|
|
||||||
$('#errortelefon').text("*lebih kecil dari 10 dan lebih besar dari 12");
|
|
||||||
$('#telefon').addClass('is-invalid');
|
|
||||||
errortelefon1++;
|
|
||||||
}else{
|
|
||||||
$('#errortelefon').hide();
|
|
||||||
$('#telefon').removeClass('is-invalid');
|
|
||||||
errortelefon1--;
|
|
||||||
}
|
|
||||||
|
|
||||||
if($('#telefon2').val() != ''){
|
|
||||||
if(!($('#telefon2').val().length >= 9 && $('#telefon2').val().length < 12)){
|
|
||||||
$('#errortelefon2').show();
|
|
||||||
$('#errortelefon2').text("*lebih kecil dari 10 dan lebih besar dari 12");
|
|
||||||
$('#telefon2').addClass('is-invalid');
|
|
||||||
errortelefon2++;
|
|
||||||
}else{
|
|
||||||
$('#errortelefon2').hide();
|
|
||||||
$('#telefon2').removeClass('is-invalid');
|
|
||||||
errortelefon2--;
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
$('#errortelefon2').hide();
|
|
||||||
$('#telefon2').removeClass('is-invalid');
|
|
||||||
errortelefon2--;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(errortelefon1 <= 0 && errortelefon2 <= 0){
|
|
||||||
$('#btnkemaskini').removeClass('btn-danger');
|
$('#btnkemaskini').removeClass('btn-danger');
|
||||||
$('#btnkemaskini').addClass('btn-primary');
|
$('#btnkemaskini').addClass('btn-primary');
|
||||||
$('#btnkemaskini').text('Ubah');
|
$('#btnkemaskini').text('Ubah');
|
||||||
@@ -2467,53 +2630,19 @@
|
|||||||
$('#btnotp').text('Daftar Akuan Online');
|
$('#btnotp').text('Daftar Akuan Online');
|
||||||
$('#btnotp').attr('onclick','#');
|
$('#btnotp').attr('onclick','#');
|
||||||
|
|
||||||
//attribute nak readonly false
|
// Lock balik semua field
|
||||||
$('#telefon').attr('readonly', true);
|
$('#telefon').attr('readonly', true);
|
||||||
$('#telefon2').attr('readonly', true);
|
$('#telefon2').attr('readonly', true);
|
||||||
$('#noakaun').attr('readonly', true);
|
$('#noakaun').attr('readonly', true);
|
||||||
$('#kodbank').attr('disabled', true);
|
$('#kodbank').attr('disabled', true);
|
||||||
$('#nota').attr('readonly', true);
|
$('#nota').attr('readonly', true);
|
||||||
|
$('#nota_arcc').attr('readonly', true);
|
||||||
$('#alamat').attr('readonly', true);
|
$('#alamat').attr('readonly', true);
|
||||||
$('#poskod').attr('readonly', true);
|
$('#poskod').attr('readonly', true);
|
||||||
|
|
||||||
|
console.log("👉 Hantar form kemaskini (nota_arcc)");
|
||||||
$('#kemaskiniform').trigger('submit');
|
$('#kemaskiniform').trigger('submit');
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
$('#btnotp').click(function(){
|
|
||||||
$('#customer_detail').modal('hide');
|
|
||||||
var noic = $('#noic').val();
|
|
||||||
$('#noic_otp').val(noic);
|
|
||||||
$('#opt_modal').modal('show');
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#jana_otp').click(function(){
|
|
||||||
var noic = $('#noic_otp').val();
|
|
||||||
|
|
||||||
$.ajax({
|
|
||||||
method:'get',
|
|
||||||
url: "{{ route('customer.otp') }}",
|
|
||||||
data:{
|
|
||||||
'noic_otp' : noic
|
|
||||||
},
|
|
||||||
dataType:'json',
|
|
||||||
success: function(otp_token){
|
|
||||||
if(otp_token['error']){
|
|
||||||
Swal.fire({
|
|
||||||
icon: 'error',
|
|
||||||
title: 'Amaran!',
|
|
||||||
text: otp_token['error']
|
|
||||||
});
|
|
||||||
}else if(otp_token['otp']){
|
|
||||||
$('#otp_form').hide();
|
|
||||||
$('#otp_generate').show();
|
|
||||||
$('#otp_number').text(otp_token['otp']);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
error: function(xhRequest, ErrorText, thrownError){
|
|
||||||
console.log(xhRequest);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
<!-- Modal Auto Serah -->
|
||||||
|
<button class="btn btn-info mt-4" data-toggle="modal" data-target="#autoSerahanModal" data-input="AutoSerahan">Serahan V3</button>
|
||||||
@@ -72,11 +72,26 @@
|
|||||||
</div>
|
</div>
|
||||||
@if($search == true && $blacklist_search == false)
|
@if($search == true && $blacklist_search == false)
|
||||||
<div class="text-center mt-3">
|
<div class="text-center mt-3">
|
||||||
<button type="button" style="margin:auto" class="btn btn-primary" onclick="newcustomer()">
|
|
||||||
|
{{-- ✅ Jika anggota tapi belum daftar pelanggan --}}
|
||||||
|
@if(isset($showDaftarPelangganBtn) && $showDaftarPelangganBtn)
|
||||||
|
<button type="button" style="margin:auto" class="btn btn-success" onclick="newcustomer()">
|
||||||
Daftar Pelanggan
|
Daftar Pelanggan
|
||||||
</button>
|
</button>
|
||||||
</div>
|
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
{{-- ✅ Jika pelanggan dah ada tapi belum anggota --}}
|
||||||
|
@if(isset($showAssignAnggotaBtn) && $showAssignAnggotaBtn)
|
||||||
|
<form action="{{ route('customers.assignAnggota') }}" method="POST" style="display:inline-block;">
|
||||||
|
@csrf
|
||||||
|
<input type="hidden" name="noic" value="{{ $noic }}">
|
||||||
|
<button type="submit" class="btn btn-primary">Assign sebagai Anggota</button>
|
||||||
|
</form>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Modal No KP -->
|
<!-- Modal No KP -->
|
||||||
@@ -478,42 +493,73 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var api_url = "<?php echo $api_url ?>";
|
var api_url = @json($api_url ?? '');
|
||||||
var search = "<?php echo $search ?>";
|
var search = @json($search ?? false);
|
||||||
var type_id = "<?php echo $idtype ?>";
|
var type_id = @json($idtype ?? '');
|
||||||
var blacklist_search = "<?php echo $blacklist_search ?>";
|
var isAnggota = @json($isAnggota ?? false);
|
||||||
|
var isPelanggan = @json($isPelanggan ?? false);
|
||||||
|
var blacklist_search = @json($blacklist_search ?? false);
|
||||||
|
var showAssignAnggotaBtn = @json($showAssignAnggotaBtn ?? false);
|
||||||
|
var showDaftarPelangganBtn = @json($showDaftarPelangganBtn ?? false);
|
||||||
|
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
// Datepicker
|
||||||
$('#passport_tarikh_lahir').datepicker({
|
$('#passport_tarikh_lahir').datepicker({
|
||||||
format: 'dd/mm/yyyy',
|
format: 'dd/mm/yyyy',
|
||||||
endDate: new Date()
|
endDate: new Date()
|
||||||
});
|
});
|
||||||
var noic = $('#noic').val();
|
|
||||||
identifyIC(noic);
|
|
||||||
|
|
||||||
if(search == true){
|
var noic = $('#noic').val();
|
||||||
if(blacklist_search == true){
|
if (typeof identifyIC === 'function') {
|
||||||
|
identifyIC(noic);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Debug: Papar semua nilai dalam console
|
||||||
|
console.log({
|
||||||
|
search,
|
||||||
|
blacklist_search,
|
||||||
|
showAssignAnggotaBtn,
|
||||||
|
showDaftarPelangganBtn
|
||||||
|
});
|
||||||
|
|
||||||
|
// Logik amaran SweetAlert
|
||||||
|
if (search === true) {
|
||||||
|
if (blacklist_search === true) {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
icon: 'warning',
|
icon: 'warning',
|
||||||
title: 'Amaran!',
|
title: 'Amaran!',
|
||||||
text: 'Pelanggan telah disenarai hitamkan dari Pembiayaan'
|
text: 'Pelanggan telah disenarai hitamkan dari Pembiayaan.'
|
||||||
});
|
});
|
||||||
event.preventDefault();
|
}
|
||||||
return false;
|
else if (isAnggota && !isPelanggan) {
|
||||||
}else{
|
Swal.fire({
|
||||||
|
icon: 'info',
|
||||||
|
title: 'Anggota Belum Didaftarkan!',
|
||||||
|
text: 'Pelanggan ini adalah anggota koperasi tetapi belum berdaftar sebagai pelanggan.'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else if (isPelanggan && !isAnggota) {
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'info',
|
||||||
|
title: 'Pelanggan Bukan Anggota!',
|
||||||
|
text: 'Pelanggan ini berdaftar tetapi belum menjadi anggota koperasi.'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else if (!isAnggota && !isPelanggan) {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
icon: 'info',
|
icon: 'info',
|
||||||
title: 'Pelanggan Tiada Dalam Rekod!',
|
title: 'Pelanggan Tiada Dalam Rekod!',
|
||||||
text: 'Sila Daftar Pelanggan'
|
text: 'Sila Daftar Pelanggan.'
|
||||||
});
|
});
|
||||||
event.preventDefault();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function calculatePassportAge(){
|
function calculatePassportAge(){
|
||||||
var passport_lahir = $('#passport_tarikh_lahir').val();
|
var passport_lahir = $('#passport_tarikh_lahir').val();
|
||||||
var split_date = passport_lahir.split('/');
|
var split_date = passport_lahir.split('/');
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,58 @@
|
|||||||
|
@if($errorapproval)
|
||||||
|
<script>
|
||||||
|
|
||||||
|
let jenis = "{{ $errorapproval['mohon'] }}";
|
||||||
|
|
||||||
|
if(jenis == 'Hapus Ansuran'){
|
||||||
|
Swal.fire({
|
||||||
|
title: 'Tunggu Pengesahan Daripada Khazanah-Operasi.',
|
||||||
|
icon: 'info',
|
||||||
|
width: 600,
|
||||||
|
padding: '3em',
|
||||||
|
background: '#fffff',
|
||||||
|
showCancelButton: false,
|
||||||
|
showConfirmButton: false,
|
||||||
|
allowOutsideClick: false,
|
||||||
|
allowEscapeKey: false,
|
||||||
|
allowEnterKey: false
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
Swal.fire({
|
||||||
|
title: 'Tunggu Pengesahan Daripada Khazanah.',
|
||||||
|
icon: 'info',
|
||||||
|
width: 600,
|
||||||
|
padding: '3em',
|
||||||
|
background: '#fffff',
|
||||||
|
showCancelButton: false,
|
||||||
|
showConfirmButton: false,
|
||||||
|
allowOutsideClick: false,
|
||||||
|
allowEscapeKey: false,
|
||||||
|
allowEnterKey: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
getPusherResponse();
|
||||||
|
|
||||||
|
async function getPusherResponse(){
|
||||||
|
let api_url = "<?php echo $api_url ?>";
|
||||||
|
const jsonData = {
|
||||||
|
norujukan: "{{ $errorapproval['norujukan'] }}",
|
||||||
|
kodcaw: "{{ Auth::user()->cawangan }}",
|
||||||
|
};
|
||||||
|
|
||||||
|
const queryString = new URLSearchParams(jsonData).toString();
|
||||||
|
|
||||||
|
let ansuranlatest = await fetch(api_url + '/admin/ansuran/getLatest?' + queryString)
|
||||||
|
.then(response => response.json())
|
||||||
|
.then(response => {return response});
|
||||||
|
|
||||||
|
try{
|
||||||
|
let pusherresponse = await PusherResponse("{{ $errorapproval['norujukan'] }}","{{ $errorapproval['recno'] }}",ansuranlatest['created_at'],ansuranlatest['id']);
|
||||||
|
|
||||||
|
}catch(error){
|
||||||
|
console.error("Error:", error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
@endif
|
||||||
@@ -0,0 +1,344 @@
|
|||||||
|
|
||||||
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||||
|
<script src="{{ asset('js/table2excel.js') }}"></script>
|
||||||
|
<style>
|
||||||
|
|
||||||
|
.radiostyle .radio-green {
|
||||||
|
background-color: #27ae60;
|
||||||
|
color:white;
|
||||||
|
box-shadow: 5px 10px #888888;
|
||||||
|
width:200px;
|
||||||
|
margin-right:5px;
|
||||||
|
transition: 0.5s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.radiostyle .radio-red {
|
||||||
|
background-color: #e74c3c;
|
||||||
|
color:white;
|
||||||
|
width:200px;
|
||||||
|
margin-right:5px;
|
||||||
|
box-shadow: 5px 10px #888888;
|
||||||
|
transition: 0.5s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.radiostyle .radio-yellow {
|
||||||
|
background-color: #3498db;
|
||||||
|
color:white;
|
||||||
|
width:200px;
|
||||||
|
margin-right:5px;
|
||||||
|
box-shadow: 5px 10px #888888;
|
||||||
|
transition: 0.5s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.radiostyle .radio-green:hover {
|
||||||
|
box-shadow: 5px 5px #888888;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.radiostyle .radio-red:hover {
|
||||||
|
box-shadow: 5px 5px #888888;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.radiostyle .radio-yellow:hover {
|
||||||
|
box-shadow: 5px 5px #888888;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.radiostyle .radio-green input[type="radio"]:checked{
|
||||||
|
box-shadow: 5px 10px #888888;
|
||||||
|
}
|
||||||
|
|
||||||
|
.radiostyle .radio-yellow input[type="radio"]:checked{
|
||||||
|
box-shadow: 5px 10px #888888;
|
||||||
|
}
|
||||||
|
|
||||||
|
.radiostyle .radio-red input[type="radio"]:checked{
|
||||||
|
box-shadow: 5px 10px #888888;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#header {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header td,
|
||||||
|
#customers th {
|
||||||
|
|
||||||
|
padding: 4px;
|
||||||
|
font-size: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header tr:nth-child(even) {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header tr:hover {
|
||||||
|
background-color: #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header th {
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
text-align: left;
|
||||||
|
padding: 4px;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#scan {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#scan td,
|
||||||
|
#scan th {
|
||||||
|
|
||||||
|
padding: 8px;
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#scan tr:nth-child(even) {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#scan tr:hover {
|
||||||
|
background-color: #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
#scan th {
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
text-align: left;
|
||||||
|
padding: 4px;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#scan {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#scan td,
|
||||||
|
#scan th {
|
||||||
|
border-collapse: collapse;
|
||||||
|
padding: 8px;
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#scan tr:nth-child(even) {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#scan tr:hover {
|
||||||
|
background-color: #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
#scan th {
|
||||||
|
border-collapse: collapse;
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
text-align: left;
|
||||||
|
padding: 4px;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#details {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#details td,
|
||||||
|
#details th {
|
||||||
|
|
||||||
|
padding: 8px;
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#details tr:nth-child(even) {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#details tr:hover {
|
||||||
|
background-color: #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
#details th {
|
||||||
|
padding-top: 12px;
|
||||||
|
font-style: bold;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
text-align: left;
|
||||||
|
padding: 4px;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#sign {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sign td,
|
||||||
|
#sign th {
|
||||||
|
|
||||||
|
padding: 8px;
|
||||||
|
font-size: 11px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sign tr:nth-child(even) {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sign tr:hover {
|
||||||
|
background-color: #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sign th {
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
text-align: left;
|
||||||
|
padding: 4px;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<table id="header">
|
||||||
|
<tr>
|
||||||
|
<th rowspan="4" style="width:50px"><br><img src="{{ asset('img/ARRAHN1.png') }}" style="width:70px"></img></th>
|
||||||
|
<th colspan="1">KOPERASI PERMODALAN KELANTAN BERHAD</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{{ $cawangan_detail['namacaw'] }}</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{{ $cawangan_detail['alamat1'] }}</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{{ $cawangan_detail['alamat2'].' No Tel : '. $cawangan_detail['notel'].' No Faks : '. $cawangan_detail['nofaks'] }}</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<table id="scan">
|
||||||
|
<tr>
|
||||||
|
<th colspan ="5"><b>Laporan Stok Audit</b></th>
|
||||||
|
<th> </th>
|
||||||
|
<th> </th>
|
||||||
|
<th><b> Tarikh Cetak:</b>
|
||||||
|
@php
|
||||||
|
$myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_cetak);
|
||||||
|
$formattedweddingdate = $myDateTime->format('d-m-Y');
|
||||||
|
echo($formattedweddingdate)
|
||||||
|
@endphp
|
||||||
|
</th>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
<table id="details" class="table table-bordered">
|
||||||
|
<thead>
|
||||||
|
<th>Bil</th>
|
||||||
|
<!-- <th>Status</th> -->
|
||||||
|
<th>Nama</th>
|
||||||
|
<th>No. KP</th>
|
||||||
|
<th>No. Telefon</th>
|
||||||
|
<th>Norujukan</th>
|
||||||
|
<th>Tempoh</th>
|
||||||
|
<th>Berat</th>
|
||||||
|
<th>Nilai Marhun (RM)</th>
|
||||||
|
<th>Pembiayaan Asal (RM)</th>
|
||||||
|
<th>Baki Pembiayaan (RM)</th>
|
||||||
|
<th>Keuntungan Belum Bayar (RM)</th>
|
||||||
|
</thead>
|
||||||
|
@php
|
||||||
|
$counter = 1;
|
||||||
|
$totalpinjaman = 0;
|
||||||
|
|
||||||
|
// Sort ikut norujukan
|
||||||
|
$rekod = collect($stokaudit[0])->sortBy('norujukan')->values();
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
@foreach ($rekod as $item)
|
||||||
|
@php
|
||||||
|
$status = $item['blasted'] == null ? 'Belum' : 'Selesai';
|
||||||
|
$totalpinjaman += $item['pinjaman'];
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>{{ $counter }}</td>
|
||||||
|
<!-- <td style="white-space: nowrap">{{ $status }}</td> -->
|
||||||
|
<td style="white-space: nowrap;">{{ $item['customer']['nama'] ?? '-' }}</td>
|
||||||
|
<td>{{ $item['nokp'] }}</td>
|
||||||
|
<td>{{ $item['customer']['telefon'] ?? '-' }}</td>
|
||||||
|
<td style="white-space: nowrap;">{{ $item['norujukan'] }}</td>
|
||||||
|
<td>{{ $item['tempoh'] }}</td>
|
||||||
|
<td>{{ $item['berat'] }}</td>
|
||||||
|
<td align="right">{{ number_format($item['nilaimarhun'], 2) }}</td>
|
||||||
|
<td align="right">{{ number_format($item['pinjaman'], 2) }}</td>
|
||||||
|
<td align="right">{{ number_format($item['bakipjm'], 2) }}</td>
|
||||||
|
<td align="right">{{ number_format($item['tunggakan'], 2) }}</td>
|
||||||
|
</tr>
|
||||||
|
@php $counter++; @endphp
|
||||||
|
@endforeach
|
||||||
|
|
||||||
|
<tfoot>
|
||||||
|
<th colspan='6'>Jumlah</th>
|
||||||
|
<th>{{ number_format(collect($rekod)->sum('berat'), 2) }}</th>
|
||||||
|
<th style="text-align:right; font-weight:bold;">{{ number_format(collect($rekod)->sum('nilaimarhun'), 2) }}</th>
|
||||||
|
<th style="text-align:right; font-weight:bold;">{{ number_format(collect($rekod)->sum('pinjaman'), 2) }}</th>
|
||||||
|
<th style="text-align:right; font-weight:bold;">{{ number_format(collect($rekod)->sum('bakipjm'), 2) }}</th>
|
||||||
|
<th style="text-align:right; font-weight:bold;">{{ number_format(collect($rekod)->sum('tunggakan'), 2) }}</th>
|
||||||
|
</tfoot>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
<script src="{{ asset('js/jquery.min.js') }}"></script>
|
||||||
|
<script>
|
||||||
|
|
||||||
|
$(document).ready(function () {
|
||||||
|
|
||||||
|
var table2excel = new Table2Excel();
|
||||||
|
table2excel.export(document.querySelectorAll("#details"),'stok_audit_khas');
|
||||||
|
setTimeout(function(){ window.close() }, 10);
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||||
|
<script src="{{ asset('js/table2excel.js') }}"></script>
|
||||||
@@ -876,7 +876,7 @@
|
|||||||
'harga' : harga_edit,
|
'harga' : harga_edit,
|
||||||
'n_marhun' : nilai_marhun_edit,
|
'n_marhun' : nilai_marhun_edit,
|
||||||
'marhun' : marhun_edit,
|
'marhun' : marhun_edit,
|
||||||
// 'nota' : nota,
|
'nota' : nota,
|
||||||
'tag_permata' : tagpermata_edit,
|
'tag_permata' : tagpermata_edit,
|
||||||
'berat_batu_permata' : beratpermata_edit,
|
'berat_batu_permata' : beratpermata_edit,
|
||||||
"teller": "{{ Auth::user()->name }}",
|
"teller": "{{ Auth::user()->name }}",
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
<div class="form-group row col-12">
|
<div class="form-group row col-12">
|
||||||
<input type="hidden" name="kodcaw" id="kodcaw" value="{{$cawangan_info['kodcaw']}}">
|
<input type="hidden" name="kodcaw" id="kodcaw" value="{{$cawangan_info['kodcaw']}}">
|
||||||
<input type="hidden" name="nokp" id="nokp" value="{{ $customer_info['kpbaru'] }}">
|
<input type="hidden" name="nokp" id="nokp" value="{{ $customer_info['kpbaru'] }}">
|
||||||
|
<input type="hidden" name="tag_anggota" id="tag_anggota" value="{{ $customer_info['tag_anggota'] ?? 0 }}">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 mb-2">
|
<div class="col-12 mb-2">
|
||||||
@@ -198,6 +199,7 @@
|
|||||||
<input type="text" name="kadarkeuntungan" id="kadarkeuntungan" value="" hidden>
|
<input type="text" name="kadarkeuntungan" id="kadarkeuntungan" value="" hidden>
|
||||||
<input type="text" name="kuantiti_marhun" id="kuantiti_marhun" value="" hidden>
|
<input type="text" name="kuantiti_marhun" id="kuantiti_marhun" value="" hidden>
|
||||||
<input type="text" name="total_nilai_marhun" id="total_nilai_marhun" value="" hidden>
|
<input type="text" name="total_nilai_marhun" id="total_nilai_marhun" value="" hidden>
|
||||||
|
<input type="text" name="nokp" id="nokp" value="{{ !empty($customer_info['kpbaru']) ? $customer_info['kpbaru'] : ($customer_info['kplama'] ?? '') }}" hidden>
|
||||||
<a href="{{ route('gadai.batal',['norujukan'=>$norujukan]) }}" class="float-right btn btn-danger mr-2">Batal</a>
|
<a href="{{ route('gadai.batal',['norujukan'=>$norujukan]) }}" class="float-right btn btn-danger mr-2">Batal</a>
|
||||||
<input type="submit" name="terima_gadai" id="terima_gadai" class="float-right btn btn-primary mr-2" value="Terima">
|
<input type="submit" name="terima_gadai" id="terima_gadai" class="float-right btn btn-primary mr-2" value="Terima">
|
||||||
</div>
|
</div>
|
||||||
@@ -597,13 +599,19 @@
|
|||||||
url: api_url + '/api/kadarujrah',
|
url: api_url + '/api/kadarujrah',
|
||||||
async:false,
|
async:false,
|
||||||
data:{
|
data:{
|
||||||
|
'nokp': $('#nokp').val(),
|
||||||
'nilaimarhun' : total_nilai_marhun,
|
'nilaimarhun' : total_nilai_marhun,
|
||||||
'kodcaw' : kodcaw_ujrah
|
'kodcaw' : kodcaw_ujrah
|
||||||
},
|
},
|
||||||
success:function(data){
|
success:function(data){
|
||||||
kadarupah = data;
|
kadarupah = data;
|
||||||
|
|
||||||
|
// Jika anggota (tag_anggota = 1), kadar ujrah dipaksa 0.00
|
||||||
|
if(Number($('#tag_anggota').val()) === 1){
|
||||||
|
kadarupah = 0;
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
|
||||||
$('#total_nilai_marhun').val(formatter.format(total_nilai_marhun));
|
$('#total_nilai_marhun').val(formatter.format(total_nilai_marhun));
|
||||||
$('#marhun_detail').val(marhun_details);
|
$('#marhun_detail').val(marhun_details);
|
||||||
@@ -636,24 +644,30 @@
|
|||||||
$('#pinjaman').on('input', function () {
|
$('#pinjaman').on('input', function () {
|
||||||
var pinjaman = Number(this.value);
|
var pinjaman = Number(this.value);
|
||||||
var nilaimarhun = Number($('#jumlah_nilai_marhun').val());
|
var nilaimarhun = Number($('#jumlah_nilai_marhun').val());
|
||||||
|
var nokp = $('#nokp').val();
|
||||||
|
//console.log('DEBUG NOKP:', nokp, kadarupah);
|
||||||
|
|
||||||
|
|
||||||
var percent_pinjaman = (pinjaman / total_nilai_marhun) * 100;
|
var percent_pinjaman = (pinjaman / total_nilai_marhun) * 100;
|
||||||
|
|
||||||
let array_keuntungan = {}; // Initialize as an object
|
let array_keuntungan = {}; // Initialize as an object
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
method: 'POST',
|
method:'POST',
|
||||||
url: api_url + '/api/onepercent',
|
url: api_url + '/api/onepercent',
|
||||||
async: false,
|
async:false,
|
||||||
data: {
|
data:{
|
||||||
'nilaimarhun': total_nilai_marhun,
|
'nokp': nokp,
|
||||||
'pembiayaan': pinjaman,
|
'nilaimarhun' : total_nilai_marhun,
|
||||||
'kadarujrah': kadarupah,
|
'pembiayaan' : pinjaman,
|
||||||
'margin': percent_pinjaman,
|
'kadarujrah' : kadarupah,
|
||||||
'kodcaw': "{{ Auth::user()->cawangan }}"
|
'margin' : percent_pinjaman,
|
||||||
|
'kodcaw' : "{{ Auth::user()->cawangan }}"
|
||||||
},
|
},
|
||||||
success: function (data) {
|
success:function(data){
|
||||||
array_keuntungan = data;
|
array_keuntungan = data;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
var keuntungan_sebulan = getRoundedMethod(array_keuntungan['keuntungan']);
|
var keuntungan_sebulan = getRoundedMethod(array_keuntungan['keuntungan']);
|
||||||
var keuntungan_6bln = getRoundedMethod(keuntungan_sebulan * 6);
|
var keuntungan_6bln = getRoundedMethod(keuntungan_sebulan * 6);
|
||||||
@@ -1196,7 +1210,7 @@
|
|||||||
});
|
});
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
let dataCawangan = await getDataCawangan();
|
let dataCawangan = await getDataCawangan();
|
||||||
let bakiAkhir = dataCawangan.baki;
|
let bakiAkhir = dataCawangan.baki;
|
||||||
|
|||||||
@@ -3,24 +3,27 @@
|
|||||||
@section('content')
|
@section('content')
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row justify-content-center mt-5">
|
<div class="row justify-content-center mt-5">
|
||||||
<div class="col-md-8">
|
<div class="col-md-10">
|
||||||
<div class="card">
|
<div class="card shadow-sm">
|
||||||
|
|
||||||
<nav aria-label="breadcrumb">
|
<nav aria-label="breadcrumb">
|
||||||
<ol class="breadcrumb pb-3">
|
<ol class="breadcrumb mb-0">
|
||||||
<li class="breadcrumb-item"><a href="#">Home</a></li>
|
<li class="breadcrumb-item"><a href="#">Home</a></li>
|
||||||
<li class="breadcrumb-item active" aria-current="page">Call Center</li>
|
<li class="breadcrumb-item active" aria-current="page">Call Center</li>
|
||||||
</ol>
|
</ol>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<div class="card-body text-center">
|
<div class="card-body text-center px-4">
|
||||||
<a href="{{ route('arcc.pelanggan') }}" class="btn btn-info btn-lg">Pelanggan</a>
|
<div class="d-flex flex-wrap justify-content-center gap-3">
|
||||||
<a href="{{ route('arcc.notisperingatanpertama') }}" class="btn btn-info btn-lg">Notis Peringatan Pertama</a>
|
<a href="{{ route('arcc.pelanggan') }}" class="btn btn-info btn-lg m-2">Pelanggan</a>
|
||||||
<a href="{{ route('arcc.notisperingatankedua') }}" class="btn btn-info btn-lg">Notis Peringatan Kedua</a>
|
<a href="{{ route('arcc.notisperingatanpertama') }}" class="btn btn-info btn-lg m-2">Notis Peringatan Pertama</a>
|
||||||
{{-- <a href="{{ route('daftar.kakitangan') }}" class="btn btn-info btn-lg">Kakitangan</a>
|
<a href="{{ route('arcc.notisperingatankedua') }}" class="btn btn-info btn-lg m-2">Notis Peringatan Kedua</a>
|
||||||
<a href="{{ route('parameter') }}" class="btn btn-info btn-lg">Parameter</a>
|
<a href="{{ route('arcc.pelanggannew') }}" class="btn btn-info btn-lg m-2">Carian Nama Pelanggan</a>
|
||||||
<a href="{{ route('komuditi') }}" class="btn btn-info btn-lg">Komoditi</a> --}}
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
@section('content')
|
@section('content')
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row justify-content-center mt-5">
|
<div class="row justify-content-center mt-5">
|
||||||
<div class="col-md-8">
|
<div class="col-md-12">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
|
|
||||||
<nav aria-label="breadcrumb">
|
<nav aria-label="breadcrumb">
|
||||||
@@ -14,6 +14,7 @@
|
|||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<div class="card-body text-center">
|
<div class="card-body text-center">
|
||||||
|
<a href="{{ route('operasi.kelulusananggota') }}" class="btn btn-info btn-lg">Kelulusan Anggota</a>
|
||||||
<a href="{{ route('operasi.kelulusan') }}" class="btn btn-info btn-lg">Kelulusan</a>
|
<a href="{{ route('operasi.kelulusan') }}" class="btn btn-info btn-lg">Kelulusan</a>
|
||||||
<a href="{{ route('daftar.kakitangan') }}" class="btn btn-info btn-lg">Kakitangan</a>
|
<a href="{{ route('daftar.kakitangan') }}" class="btn btn-info btn-lg">Kakitangan</a>
|
||||||
<a href="{{ route('parameter') }}" class="btn btn-info btn-lg">Parameter</a>
|
<a href="{{ route('parameter') }}" class="btn btn-info btn-lg">Parameter</a>
|
||||||
|
|||||||
@@ -112,11 +112,12 @@
|
|||||||
<th>No Rujukan</th>
|
<th>No Rujukan</th>
|
||||||
<th>Teller</th>
|
<th>Teller</th>
|
||||||
<th>Status</th>
|
<th>Status</th>
|
||||||
<th>Nilai Pembiayaan (RM)</th>
|
<th width="10%">Nilai Pembiayaan (RM)</th>
|
||||||
<th>Nilai Marhun (RM)</th>
|
<th width="10%">Ansuran (RM)</th>
|
||||||
<th>Berat</th>
|
<th width="10%">Nilai Marhun (RM)</th>
|
||||||
<th>Margin</th>
|
<th width="10%">Berat</th>
|
||||||
<th>Tindakan</th>
|
<th width="10%">Margin</th>
|
||||||
|
<th width="10%">Tindakan</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@@ -133,6 +134,7 @@
|
|||||||
<td>{{ $k['teller'] }}</td>
|
<td>{{ $k['teller'] }}</td>
|
||||||
<td>{{ $k['status'] }}</td>
|
<td>{{ $k['status'] }}</td>
|
||||||
<td>{{ Helper::formatNumber($k['jumpinj']) }}</td>
|
<td>{{ Helper::formatNumber($k['jumpinj']) }}</td>
|
||||||
|
<td></td>
|
||||||
<td>{{ Helper::formatNumber($k['nilaimarhun']) }}</td>
|
<td>{{ Helper::formatNumber($k['nilaimarhun']) }}</td>
|
||||||
<td>{{ $k['berat'] }}</td>
|
<td>{{ $k['berat'] }}</td>
|
||||||
<td>{{ $k['margin'] }}</td>
|
<td>{{ $k['margin'] }}</td>
|
||||||
@@ -141,11 +143,12 @@
|
|||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
@foreach($kelulusanmohonid as $index=>$km)
|
@foreach($kelulusanmohonid as $index=>$km)
|
||||||
<tr>
|
<tr data-recno="{{ $km['recno'] }}" data-tagoperasi = "{{ $km['tagoperasi'] }}">
|
||||||
<td><a href="#" data-toggle="modal" data-target="#kelulusanmodal" data-norujukan="{{ $km['norujukan'] }}">{{ $km['norujukan'] }} </a></td>
|
<td><a href="#" data-toggle="modal" data-target="#kelulusanmodal" data-norujukan="{{ $km['norujukan'] }}">{{ $km['norujukan'] }} </a></td>
|
||||||
<td>{{ $km['teller'] }}</td>
|
<td>{{ $km['teller'] }}</td>
|
||||||
<td>{{ $km['mohon'] }}</td>
|
<td>{{ $km['mohon'] }}</td>
|
||||||
<td>{{ Helper::formatNumber($km['pinjaman']) }}</td>
|
<td>{{ Helper::formatNumber($km['pinjaman']) }}</td>
|
||||||
|
<td>{{ Helper::formatNumber($km['ansuran']) }}</td>
|
||||||
<td>{{ Helper::formatNumber($km['nilaimarhun']) }}</td>
|
<td>{{ Helper::formatNumber($km['nilaimarhun']) }}</td>
|
||||||
<td>{{ $km['berat'] }}</td>
|
<td>{{ $km['berat'] }}</td>
|
||||||
<td>{{ $km['margin'] }}</td>
|
<td>{{ $km['margin'] }}</td>
|
||||||
@@ -514,6 +517,8 @@
|
|||||||
let norujukan = $(e).data('norujukan');
|
let norujukan = $(e).data('norujukan');
|
||||||
let teller = $(e).closest('tr').children('td:eq(1)').text();
|
let teller = $(e).closest('tr').children('td:eq(1)').text();
|
||||||
let namakhazanah = "{{ $auth_user = Auth::user()->name }}";
|
let namakhazanah = "{{ $auth_user = Auth::user()->name }}";
|
||||||
|
let recno = $(e).closest('tr').data('recno');
|
||||||
|
let tagoperasi = $(e).closest('tr').data('tagoperasi');
|
||||||
|
|
||||||
teller = String(teller);
|
teller = String(teller);
|
||||||
|
|
||||||
@@ -524,7 +529,9 @@
|
|||||||
"_token": "{{ csrf_token() }}",
|
"_token": "{{ csrf_token() }}",
|
||||||
"norujukan" : norujukan,
|
"norujukan" : norujukan,
|
||||||
"khazanah" : namakhazanah,
|
"khazanah" : namakhazanah,
|
||||||
'teller' : teller
|
'teller' : teller,
|
||||||
|
"recno" : recno,
|
||||||
|
"tagoperasi" : tagoperasi,
|
||||||
},
|
},
|
||||||
success:function(data){
|
success:function(data){
|
||||||
|
|
||||||
@@ -593,6 +600,8 @@
|
|||||||
let norujukan = $(e).data('norujukan');
|
let norujukan = $(e).data('norujukan');
|
||||||
let namakhazanah = "{{ $auth_user = Auth::user()->name }}";
|
let namakhazanah = "{{ $auth_user = Auth::user()->name }}";
|
||||||
let teller = $(e).closest('tr').children('td:eq(1)').text();
|
let teller = $(e).closest('tr').children('td:eq(1)').text();
|
||||||
|
let recno = $(e).closest('tr').data('recno');
|
||||||
|
let tagoperasi = $(e).closest('tr').data('tagoperasi');
|
||||||
|
|
||||||
teller = String(teller);
|
teller = String(teller);
|
||||||
|
|
||||||
@@ -605,7 +614,9 @@
|
|||||||
"khazanah" : namakhazanah,
|
"khazanah" : namakhazanah,
|
||||||
"komenubahhapus" : komenkelulusan,
|
"komenubahhapus" : komenkelulusan,
|
||||||
"batal" : 'batal',
|
"batal" : 'batal',
|
||||||
'teller' : teller
|
'teller' : teller,
|
||||||
|
"recno" : recno,
|
||||||
|
"tagoperasi" : tagoperasi
|
||||||
|
|
||||||
},
|
},
|
||||||
success:function(data){
|
success:function(data){
|
||||||
|
|||||||
@@ -1,15 +1,13 @@
|
|||||||
@extends('layouts.app')
|
@extends('layouts.app')
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
<style>
|
<style>.custom-btn {
|
||||||
.custom-btn {
|
|
||||||
width: 10px;
|
width: 10px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</style>
|
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
@@ -22,11 +20,26 @@
|
|||||||
|
|
||||||
@php
|
@php
|
||||||
$auth_user = Auth::user();
|
$auth_user = Auth::user();
|
||||||
$cawangan = 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/' . $auth_user['cawangan'])
|
||||||
|
->json();
|
||||||
$version = $cawangan['version'];
|
$version = $cawangan['version'];
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
<div class="card-body text-center">
|
<div class="card-body text-center">
|
||||||
|
|
||||||
|
<div class="row mb-3">
|
||||||
|
<div class="col-md-12 d-flex justify-content-start align-items-center">
|
||||||
|
<button id="toggle-search" class="btn btn-outline-secondary mr-2" type="button"
|
||||||
|
style="height: 38px;">
|
||||||
|
<i class="fa fa-search"></i>
|
||||||
|
</button>
|
||||||
|
<input type="text" id="search-laporan" class="form-control"
|
||||||
|
style="width: 300px; max-width: 100%; display: none; transition: all 0.3s;"
|
||||||
|
placeholder="Cari laporan apa ya ?">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row form-group">
|
<div class="row form-group">
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
</div>
|
</div>
|
||||||
@@ -37,110 +50,149 @@
|
|||||||
<div class="row form-group justify-content-center col-12 mx-12 ">
|
<div class="row form-group justify-content-center col-12 mx-12 ">
|
||||||
<div class="col-md-3 ">
|
<div class="col-md-3 ">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@if($version == 'v1')
|
@if ($version == 'v1')
|
||||||
<a href="{{ route('laporan.gadaian') }}" class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Pembiayaan</a>
|
<a href="{{ route('laporan.gadaian') }}"
|
||||||
|
class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Pembiayaan</a>
|
||||||
@else
|
@else
|
||||||
<a href="{{ route('laporan.gadaianujrah') }}" class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Pembiayaan</a>
|
<a href="{{ route('laporan.gadaianujrah') }}"
|
||||||
|
class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Pembiayaan</a>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
<div class="row d-none">
|
<div class="row d-none">
|
||||||
<a href="#" class="btn btn-danger btn-lg btn-block mb-3 custom-btn">Lelongan</a>
|
<a href="#" class="btn btn-danger btn-lg btn-block mb-3 custom-btn">Lelongan</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<a href="{{ route('laporan.pelangganbaru') }}" class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Pelanggan Baru</a>
|
<a href="{{ route('laporan.pelangganbaru') }}"
|
||||||
|
class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Pelanggan Baru</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<a href="{{ route('laporan.ringkasanterkumpul') }}" class="btn btn-dark btn-lg btn-block mb-3 custom-btn">
|
<a href="{{ route('laporan.ringkasanterkumpul') }}"
|
||||||
|
class="btn btn-dark btn-lg btn-block mb-3 custom-btn">
|
||||||
<span>Ringkasan Terkumpul</a></span>
|
<span>Ringkasan Terkumpul</a></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<a href="{{route('laporan.agingbulanan')}}" class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Aging Bulan</a>
|
<a href="{{ route('laporan.agingbulanan') }}"
|
||||||
|
class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Aging Bulan</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<a href="{{ route('laporan.pendserahan') }}" class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Laporan HQ</a>
|
<a href="{{ route('laporan.pendserahan') }}"
|
||||||
|
class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Laporan HQ</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<a href="{{route('laporan.tuntutbaki')}}" class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Tuntut Baki</a>
|
<a href="{{ route('laporan.tuntutbaki') }}"
|
||||||
|
class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Tuntut Baki</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<a href="{{ route('laporan.hargaemas') }}" class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Harga Emas</a>
|
<a href="{{ route('laporan.hargaemas') }}"
|
||||||
|
class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Harga Emas</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<a href="{{route('laporan.wakil')}}" class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Senarai Wakil</a>
|
<a href="{{ route('laporan.wakil') }}"
|
||||||
|
class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Senarai Wakil</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<a href="{{route('laporan.stokauditbackdate')}}" class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Stok Audit Backdate</a>
|
<a href="{{ route('laporan.stokauditbackdate') }}"
|
||||||
|
class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Stok Audit Backdate</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<a href="{{ route('laporan.stokauditkhas') }}" class="btn btn-dark btn-lg btn-block mb-3 custom-btn">SA(Whatsapp & SMS)</a>
|
<a href="{{ route('laporan.stokauditkhas') }}"
|
||||||
|
class="btn btn-dark btn-lg btn-block mb-3 custom-btn">SA(Whatsapp & SMS)</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4 mx-1">
|
<div class="col-4 mx-1">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@if($version == 'v1')
|
@if ($version == 'v1')
|
||||||
<a href="{{ route('laporan.tebus') }}" class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Penyelesaian Penuh</a>
|
<a href="{{ route('laporan.tebus') }}"
|
||||||
|
class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Penyelesaian Penuh</a>
|
||||||
@else
|
@else
|
||||||
<a href="{{ route('laporan.tebusujrah') }}" class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Penyelesaian Penuh</a>
|
<a href="{{ route('laporan.tebusujrah') }}"
|
||||||
|
class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Penyelesaian Penuh</a>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<a href="{{ route('laporan.kawalanstok') }}" class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Kawalan Stok Produk</a>
|
<a href="{{ route('laporan.kawalanstok') }}"
|
||||||
|
class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Kawalan Stok Produk</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<a href="{{ route('laporan.ringkasanharianujrah') }}" class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Ringkasan Harian (Lain-lain Caj)</a>
|
<a href="{{ route('laporan.ringkasanharianujrah') }}"
|
||||||
|
class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Ringkasan Harian (Lain-lain
|
||||||
|
Caj)</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<a href="{{ route('laporan.batalsuratgadai') }}" class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Batal Surat Pembiayaan</a>
|
<a href="{{ route('laporan.batalsuratgadai') }}"
|
||||||
|
class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Batal Surat Pembiayaan</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<a href="{{ route('laporan.marhunharian') }}" class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Marhun Harian</a>
|
<a href="{{ route('laporan.marhunharian') }}"
|
||||||
|
class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Marhun Harian</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<a href="{{ route('laporan.senaraipetibesi') }}" class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Senarai Peti Besi</a>
|
<a href="{{ route('laporan.senaraipetibesi') }}"
|
||||||
|
class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Senarai Peti Besi</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<a href="{{ route('laporan.datalejer_am') }}" class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Lejer Am</a>
|
<a href="{{ route('laporan.datalejer_am') }}"
|
||||||
|
class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Lejer Am</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<a href="{{ route('laporan.denominasi') }}" class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Denominasi</a>
|
<a href="{{ route('laporan.denominasi') }}"
|
||||||
|
class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Denominasi</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<a href="{{ route('laporan.saghilang') }}" class="btn btn-dark btn-lg btn-block mb-3 custom-btn">SAG Hilang</a>
|
<a href="{{ route('laporan.saghilang') }}"
|
||||||
|
class="btn btn-dark btn-lg btn-block mb-3 custom-btn">SAG Hilang</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<a href="{{ route('laporan.serahmarhuntebus') }}" class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Serah Marhun (Penyelesaian Pembiayaan)</a>
|
<a href="{{ route('laporan.serahmarhuntebus') }}"
|
||||||
|
class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Serah Marhun (Penyelesaian
|
||||||
|
Pembiayaan)</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-3 mx-1">
|
<div class="col-3 mx-1">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<a href="{{ route('laporan.ansuran') }}" class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Ansuran Pembiayaan</a>
|
<a href="{{ route('laporan.ansuran') }}"
|
||||||
|
class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Ansuran Pembiayaan</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<a href="{{ route('laporan.stokauditcombine') }}" class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Stok Audit</a>
|
<a href="{{ route('laporan.stokauditcombine') }}"
|
||||||
|
class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Stok Audit</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<a href="{{ route('laporan.ringkasanharian') }}" class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Ringkasan Harian</a>
|
<a href="{{ route('laporan.ringkasanharian') }}"
|
||||||
|
class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Ringkasan Harian</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<a href="{{ route('laporan.marhunterkumpul') }}" class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Marhun Terkumpul</a>
|
<a href="{{ route('laporan.marhunterkumpul') }}"
|
||||||
|
class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Marhun Terkumpul</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<a href="{{ route('laporan.audittrail') }}" class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Audit Trail</a>
|
<a href="{{ route('laporan.audittrail') }}"
|
||||||
|
class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Audit Trail</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<a href="{{ route('laporan.serahmarhungadai') }}" class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Serah Marhun Pembiayaan</a>
|
<a href="{{ route('laporan.serahmarhungadai') }}"
|
||||||
|
class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Serah Marhun Pembiayaan</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<a href="{{route('laporan.petibesi')}}" class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Peti Besi</a>
|
<a href="{{ route('laporan.petibesi') }}"
|
||||||
|
class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Peti Besi</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<a href="{{ route('laporan.perbelanjaan') }}" class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Perbelanjaan</a>
|
<a href="{{ route('laporan.perbelanjaan') }}"
|
||||||
|
class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Perbelanjaan</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<a href="{{ route('laporan.imbangdugaakru') }}" class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Imbang Duga Akru</a>
|
<a href="{{ route('laporan.imbangdugaakru') }}"
|
||||||
|
class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Imbang Duga Akru</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<a href="{{ route('laporan.notisperingatan') }}" class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Notis Peringatan</a>
|
<a href="{{ route('laporan.notisperingatan') }}"
|
||||||
|
class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Notis Peringatan</a>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<a href="{{ route('laporan.imbangduga') }}"
|
||||||
|
class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Imbang Duga</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<a href="{{ route('laporan.imbangduga') }}" class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Imbang Duga</a>
|
<a href="{{ route('laporan.imbangduga') }}" class="btn btn-dark btn-lg btn-block mb-3 custom-btn">Imbang Duga</a>
|
||||||
@@ -151,6 +203,39 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.addEventListener("DOMContentLoaded", function() {
|
||||||
|
const searchInput = document.getElementById('search-laporan');
|
||||||
|
const toggleBtn = document.getElementById('toggle-search');
|
||||||
|
if (toggleBtn && searchInput) {
|
||||||
|
toggleBtn.addEventListener('click', function() {
|
||||||
|
if (searchInput.style.display === 'none' || searchInput.style.display === '') {
|
||||||
|
searchInput.style.display = 'block';
|
||||||
|
searchInput.focus();
|
||||||
|
} else {
|
||||||
|
searchInput.value = '';
|
||||||
|
searchInput.style.display = 'none';
|
||||||
|
// Show all rows when hiding search
|
||||||
|
document.querySelectorAll('.custom-btn').forEach(function(btn) {
|
||||||
|
const row = btn.closest('.row');
|
||||||
|
row.style.display = '';
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
searchInput.addEventListener('keyup', function() {
|
||||||
|
const searchTerm = this.value.toLowerCase();
|
||||||
|
document.querySelectorAll('.custom-btn').forEach(function(btn) {
|
||||||
|
const text = btn.textContent.toLowerCase();
|
||||||
|
const row = btn.closest('.row');
|
||||||
|
if (text.includes(searchTerm)) {
|
||||||
|
row.style.display = '';
|
||||||
|
} else {
|
||||||
|
row.style.display = 'none';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@@ -96,11 +96,24 @@
|
|||||||
<input type="text" class="form-control" placeholder="Pilih Tarikh" aria-label="Tarikh" id="datehingga" name="datehingga">
|
<input type="text" class="form-control" placeholder="Pilih Tarikh" aria-label="Tarikh" id="datehingga" name="datehingga">
|
||||||
<input type="submit" class="btn btn-primary ml-md-5" id="submit_button" name="submit_button" value="Cetak">
|
<input type="submit" class="btn btn-primary ml-md-5" id="submit_button" name="submit_button" value="Cetak">
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12 col-sm-8 mb-4">
|
||||||
|
<label for="radpendser">Pilih Jenis Laporan:</label>
|
||||||
|
<select name="radpendser" id="radpendser" class="form-control">
|
||||||
|
<option value="pendahuluan" selected>Pendahuluan</option>
|
||||||
|
<option value="serahan">Serahan</option>
|
||||||
|
<option value="serahankepadav3">Serahan Kepada V3</option>
|
||||||
|
<option value="online">Serahan Online</option>
|
||||||
|
<option value="serahanlelong">Serahan Lelong</option>
|
||||||
|
<option value="serahanonline">Serahan Keseluruhan</option>
|
||||||
|
<option value="all">Keseluruhan</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br><br>
|
<br><br>
|
||||||
<div class="row">
|
{{-- <div class="row">
|
||||||
|
|
||||||
<div class="col-md-12 col-sm-12 mb-4">
|
<div class="col-md-12 col-sm-12 mb-4">
|
||||||
|
|
||||||
@@ -114,7 +127,7 @@
|
|||||||
<span>Serahan-Online</span>
|
<span>Serahan-Online</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div> --}}
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -126,7 +126,8 @@
|
|||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
method:'get',
|
method:'get',
|
||||||
url: api_url + '/api/gadai/norujukan/' + tb['norujukan'],
|
// url: api_url + '/api/gadai/norujukan/' + tb['norujukan'],
|
||||||
|
url: api_url + '/api/gadai/norujukankodcaw/' + tb['kodcaw'] + '/' + tb['norujukan'],
|
||||||
success: function(gadai){
|
success: function(gadai){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
method:'get',
|
method:'get',
|
||||||
|
|||||||
@@ -3,8 +3,26 @@
|
|||||||
@section('content')
|
@section('content')
|
||||||
|
|
||||||
@include('modal.pendahuluanserahan')
|
@include('modal.pendahuluanserahan')
|
||||||
|
@include('modal.autoserahan')
|
||||||
@include('modal.denominasimodalpendahuluanserahan')
|
@include('modal.denominasimodalpendahuluanserahan')
|
||||||
|
|
||||||
|
@if(count($proses) > 0)
|
||||||
|
<script>
|
||||||
|
Swal.fire({
|
||||||
|
title: 'Tunggu Pengesahan Daripada Operasi.',
|
||||||
|
text: 'Menunggu Pengesahan Daripada Operasi!',
|
||||||
|
icon: 'info',
|
||||||
|
width: 600,
|
||||||
|
padding: '3em',
|
||||||
|
background: '#fffff',
|
||||||
|
showCancelButton: false,
|
||||||
|
showConfirmButton: false,
|
||||||
|
allowOutsideClick: false,
|
||||||
|
allowEscapeKey: false,
|
||||||
|
allowEnterKey: false
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
@endif
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
@@ -51,7 +69,7 @@
|
|||||||
<td>{{ $gldetail['descpt'] }}</td>
|
<td>{{ $gldetail['descpt'] }}</td>
|
||||||
<td>{{ ($gldetail['pendahuluan'] == 0 && ($gldetail['ktacct'] == '7000/102' || $gldetail['ktacct'] == '7000/106')) ? number_format($gldetail['amaun'],2) : number_format($gldetail['pendahuluan'],2) }}</td>
|
<td>{{ ($gldetail['pendahuluan'] == 0 && ($gldetail['ktacct'] == '7000/102' || $gldetail['ktacct'] == '7000/106')) ? number_format($gldetail['amaun'],2) : number_format($gldetail['pendahuluan'],2) }}</td>
|
||||||
<td>{{ ($gldetail['serahan'] == 0 && ($gldetail['dtacct'] == '1000/026' || $gldetail['dtacct'] == '1000/020' || $gldetail['dtacct'] == '1000/090')) ? number_format($gldetail['amaun'],2) : number_format($gldetail['serahan'],2) }}</td>
|
<td>{{ ($gldetail['serahan'] == 0 && ($gldetail['dtacct'] == '1000/026' || $gldetail['dtacct'] == '1000/020' || $gldetail['dtacct'] == '1000/090')) ? number_format($gldetail['amaun'],2) : number_format($gldetail['serahan'],2) }}</td>
|
||||||
@if($date === $gldetail['tarikh'] && !fnmatch('SERAHAN BAYAR ONLINE*',$gldetail['descpt'])) <td class="text-center"><button onclick="deletependser(this);" data-pend="{{ $gldetail['pendahuluan'] }}" data-ser="{{ $gldetail['serahan'] }}" data-recno="{{ $gldetail['recno'] }}" class="btn btn-danger fas fa-minus-square"></button></td>@else<td></td> @endif
|
@if($date === $gldetail['tarikh'] && !fnmatch('SERAHAN BAYAR ONLINE*',$gldetail['descpt'])) <td class="text-center"><button onclick="{{ strpos($gldetail['teller'], 'AUTO') !== false ? 'deleteautoserahan(this);' : 'deletependser(this);' }}" data-pend="{{ $gldetail['pendahuluan'] }}" data-ser="{{ $gldetail['serahan'] }}" data-recno="{{ $gldetail['recno'] }}" class="btn btn-danger fas fa-minus-square"></button></td>@else<td></td> @endif
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
</tbody>
|
</tbody>
|
||||||
@@ -61,7 +79,9 @@
|
|||||||
|
|
||||||
|
|
||||||
<button class="btn btn-primary mt-4" data-toggle="modal" data-target="#pendahuluanserahanModal">Daftar</button>
|
<button class="btn btn-primary mt-4" data-toggle="modal" data-target="#pendahuluanserahanModal">Daftar</button>
|
||||||
|
@if(Auth::user()->cawangan != '011227')
|
||||||
|
<x-auto-serah />
|
||||||
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -205,7 +225,25 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
$('#pendahuluanserahanModal').on('shown.bs.modal', function (e) {
|
$('#pendahuluanserahanModal').on('shown.bs.modal', function (e) {
|
||||||
|
let input = $(e.relatedTarget);
|
||||||
|
let inputselected = input.data('input');
|
||||||
|
|
||||||
|
|
||||||
|
if(inputselected == 'AutoSerahan')
|
||||||
|
{
|
||||||
|
$('#jenisserahan').val('auto');
|
||||||
|
$('input[name="radwang"][value="pendahuluan"]').prop('disabled', true);
|
||||||
|
$('input[name="radwang"][value="serahan"]').prop('checked', true);
|
||||||
|
$('input[name="radwang"][value="serahan"]').prop('disabled', true);
|
||||||
|
$('#keterangan').val('Serahan Kepada V3');
|
||||||
|
$('#keterangan').attr('readonly', true);
|
||||||
|
$('#dtacct').val('1000/010');
|
||||||
|
$('#ktacct').val('1000/020');
|
||||||
|
$('input[name="denominasi"]').attr('style','display: block');
|
||||||
|
$('.denominasi').attr('style','display: block');
|
||||||
|
}else{
|
||||||
|
$('#jenisserahan').val('biasa');
|
||||||
|
$('input[name="radwang"][value="pendahuluan"]').prop('disabled', false);
|
||||||
$('#bundle1').val('');
|
$('#bundle1').val('');
|
||||||
$('#totalb1').val(0.00);
|
$('#totalb1').val(0.00);
|
||||||
$('#bundle5').val('');
|
$('#bundle5').val('');
|
||||||
@@ -223,7 +261,11 @@
|
|||||||
$('#ktacct').val('');
|
$('#ktacct').val('');
|
||||||
$('#keterangan').val('');
|
$('#keterangan').val('');
|
||||||
$('#amaun').val('');
|
$('#amaun').val('');
|
||||||
|
$('#keterangan').attr('readonly', false);
|
||||||
$('input[name="radwang"]').prop('checked', false);
|
$('input[name="radwang"]').prop('checked', false);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -314,7 +356,7 @@
|
|||||||
function funcbatal()
|
function funcbatal()
|
||||||
{
|
{
|
||||||
$('#denominasiHQModal').modal('hide');
|
$('#denominasiHQModal').modal('hide');
|
||||||
$('#pendahuluanserahanModal').modal('show');
|
// $('#pendahuluanserahanModal').modal('show');
|
||||||
|
|
||||||
$("#terima_transaksi").prop('disabled', false);
|
$("#terima_transaksi").prop('disabled', false);
|
||||||
|
|
||||||
@@ -343,6 +385,7 @@
|
|||||||
let dtacct = $('#dtacct').val();
|
let dtacct = $('#dtacct').val();
|
||||||
let ktacct = $('#ktacct').val();
|
let ktacct = $('#ktacct').val();
|
||||||
let auth_user = $('#auth_user').val(); //letak user
|
let auth_user = $('#auth_user').val(); //letak user
|
||||||
|
let jenisserahan = $('#jenisserahan').val();
|
||||||
|
|
||||||
// Denominasi bundle
|
// Denominasi bundle
|
||||||
let bundle1 = $('#bundle1').val();
|
let bundle1 = $('#bundle1').val();
|
||||||
@@ -372,7 +415,10 @@
|
|||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
let SwalPengesahan = '';
|
||||||
|
|
||||||
|
if(jenisserahan == 'biasa')
|
||||||
|
{
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
title: 'Memuatkan...',
|
title: 'Memuatkan...',
|
||||||
allowEscapeKey: false,
|
allowEscapeKey: false,
|
||||||
@@ -382,31 +428,75 @@
|
|||||||
$('#denominasiHQModal').modal('hide');
|
$('#denominasiHQModal').modal('hide');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}else{
|
||||||
|
let SwalPengesahan = Swal.fire({
|
||||||
|
title: 'Tunggu Pengesahan Daripada Operasi.',
|
||||||
|
icon: 'info',
|
||||||
|
width: 600,
|
||||||
|
padding: '3em',
|
||||||
|
background: '#fffff',
|
||||||
|
showCancelButton: false,
|
||||||
|
showConfirmButton: false,
|
||||||
|
allowOutsideClick: false,
|
||||||
|
allowEscapeKey: false,
|
||||||
|
allowEnterKey: false,
|
||||||
|
didOpen: function () {
|
||||||
|
$('#denominasiHQModal').modal('hide');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
let array_send = {
|
||||||
|
amaun: amaun,
|
||||||
|
jenisgldetail: jenis,
|
||||||
|
keterangan: keterangan,
|
||||||
|
kodcaw: kodcaw,
|
||||||
|
teller: teller,
|
||||||
|
dtacct: dtacct,
|
||||||
|
ktacct: ktacct,
|
||||||
|
auth_user: auth_user,
|
||||||
|
ambilansen1: sen1,
|
||||||
|
ambilansen5: sen5,
|
||||||
|
ambilansen10: sen10,
|
||||||
|
ambilansen20: sen20,
|
||||||
|
ambilansen50: sen50,
|
||||||
|
ambilanring1: ringgit1,
|
||||||
|
ambilanring5: ringgit5,
|
||||||
|
ambilanring10: ringgit10,
|
||||||
|
ambilanring20: ringgit20,
|
||||||
|
ambilanring50: ringgit50,
|
||||||
|
ambilanring100: ringgit100
|
||||||
|
};
|
||||||
|
this.sendRequest(array_send,jenisserahan);
|
||||||
|
}
|
||||||
|
|
||||||
|
function sendRequest(arraysend,jenisserahan){
|
||||||
|
if(jenisserahan == 'biasa'){
|
||||||
|
console.log(arraysend);
|
||||||
$.ajax({
|
$.ajax({
|
||||||
method: 'post',
|
method: 'post',
|
||||||
url: '{{ route("khazanah.pendahuluanserahanHQ") }}',
|
url: '{{ route("khazanah.pendahuluanserahanHQ") }}',
|
||||||
data: {
|
data: {
|
||||||
"_token": "{{ csrf_token() }}",
|
"_token": "{{ csrf_token() }}",
|
||||||
'amaun': amaun,
|
'amaun': arraysend['amaun'],
|
||||||
'jenisgldetail': jenis,
|
'jenisgldetail': arraysend['jenisgldetail'],
|
||||||
'keterangan': keterangan,
|
'keterangan': arraysend['keterangan'],
|
||||||
'kodcaw': kodcaw,
|
'kodcaw': arraysend['kodcaw'],
|
||||||
'teller': teller,
|
'teller': arraysend['teller'],
|
||||||
'dtacct': dtacct,
|
'dtacct': arraysend['dtacct'],
|
||||||
'ktacct': ktacct,
|
'ktacct': arraysend['ktacct'],
|
||||||
'auth_user': auth_user, // mskkan auth_user
|
'auth_user': arraysend['auth_user'],
|
||||||
'ambilansen1': sen1,
|
'ambilansen1': arraysend['ambilansen1'],
|
||||||
'ambilansen5': sen5,
|
'ambilansen5': arraysend['ambilansen5'],
|
||||||
'ambilansen10': sen10,
|
'ambilansen10': arraysend['ambilansen10'],
|
||||||
'ambilansen20': sen20,
|
'ambilansen20': arraysend['ambilansen20'],
|
||||||
'ambilansen50': sen50,
|
'ambilansen50': arraysend['ambilansen50'],
|
||||||
'ambilanring1': ringgit1,
|
'ambilanring1': arraysend['ambilanring1'],
|
||||||
'ambilanring5': ringgit5,
|
'ambilanring5': arraysend['ambilanring5'],
|
||||||
'ambilanring10': ringgit10,
|
'ambilanring10': arraysend['ambilanring10'],
|
||||||
'ambilanring20': ringgit20,
|
'ambilanring20': arraysend['ambilanring20'],
|
||||||
'ambilanring50': ringgit50,
|
'ambilanring50': arraysend['ambilanring50'],
|
||||||
'ambilanring100': ringgit100
|
'ambilanring100': arraysend['ambilanring100']
|
||||||
},
|
},
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
if (data == 'LULUS') {
|
if (data == 'LULUS') {
|
||||||
@@ -437,7 +527,204 @@
|
|||||||
console.log(textStatus, errorThrown);
|
console.log(textStatus, errorThrown);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}else{
|
||||||
|
let approvalid = '';
|
||||||
|
$.ajax({
|
||||||
|
method: 'post',
|
||||||
|
url: '{{ route("khazanah.autoserahan") }}',
|
||||||
|
data: {
|
||||||
|
"_token": "{{ csrf_token() }}",
|
||||||
|
'arraysend': arraysend
|
||||||
|
},
|
||||||
|
success:function(e){
|
||||||
|
approvalid = e.id;
|
||||||
|
if(e.status == 'success'){
|
||||||
|
Swal.update({
|
||||||
|
text: 'Menunggu Pengesahan Daripada Operasi!',
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var pusher = new Pusher("{{ env('PUSHER_APP_KEY') }}", {
|
||||||
|
cluster: 'ap1',
|
||||||
|
encrypted: true
|
||||||
|
});
|
||||||
|
|
||||||
|
var channel = pusher.subscribe('autoserahan-notice');
|
||||||
|
channel.bind('autoserahan-event', function(data) {
|
||||||
|
console.log(data,approvalid,kodcaw,teller);
|
||||||
|
if(data.pengesahan === 'Lulus' && data.id == approvalid && data.kodlaluan == teller)
|
||||||
|
{
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'success',
|
||||||
|
title: 'Serahan V3/Auto Pendahuluan V2 Berjaya',
|
||||||
|
text: 'Operasi berjaya meluluskan Serahan ke V3 dan Auto Pendahuluan dari V2!'
|
||||||
|
}).then(function(){
|
||||||
|
location.reload();
|
||||||
|
});
|
||||||
|
}else if(data.pengesahan == 'Batal' && data.id == approvalid && data.kodlaluan == teller){
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'error',
|
||||||
|
title: 'Serahan V3/Auto Pendahuluan V2 Dibatalkan',
|
||||||
|
text: 'Operasi membatalkan Serahan ke V3 dan Auto Pendahuluan dari V2!'
|
||||||
|
}).then(function(){
|
||||||
|
location.reload();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteautoserahan(e){
|
||||||
|
let recno = $(e).data('recno');
|
||||||
|
let pend = $(e).data('pend');
|
||||||
|
let ser = $(e).data('ser');
|
||||||
|
|
||||||
|
let SwalPengesahan = Swal.fire({
|
||||||
|
title: 'Tunggu Pengesahan Daripada Operasi.',
|
||||||
|
icon: 'info',
|
||||||
|
width: 600,
|
||||||
|
padding: '3em',
|
||||||
|
background: '#fffff',
|
||||||
|
showCancelButton: false,
|
||||||
|
showConfirmButton: false,
|
||||||
|
allowOutsideClick: false,
|
||||||
|
allowEscapeKey: false,
|
||||||
|
allowEnterKey: false,
|
||||||
|
});
|
||||||
|
|
||||||
|
let approvalid = '';
|
||||||
|
$.ajax({
|
||||||
|
method: 'post',
|
||||||
|
url: '{{ route("khazanah.autoserahan") }}',
|
||||||
|
data: {
|
||||||
|
"_token": "{{ csrf_token() }}",
|
||||||
|
'do_delete': true,
|
||||||
|
'recno' : recno,
|
||||||
|
'kodcaw' : kodcaw,
|
||||||
|
'teller' : teller,
|
||||||
|
'amaun' : (pend > 0 ) ? pend : ser
|
||||||
|
},
|
||||||
|
success:function(e){
|
||||||
|
approvalid = e.id;
|
||||||
|
if(e.status == 'success'){
|
||||||
|
Swal.update({
|
||||||
|
text: 'Menunggu Pengesahan Daripada Operasi!',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var pusher = new Pusher("{{ env('PUSHER_APP_KEY') }}", {
|
||||||
|
cluster: 'ap1',
|
||||||
|
encrypted: true
|
||||||
|
});
|
||||||
|
|
||||||
|
var channel = pusher.subscribe('autoserahan-notice');
|
||||||
|
channel.bind('autoserahan-event', function(data) {
|
||||||
|
console.log(data,approvalid,teller,kodcaw);
|
||||||
|
if(data.pengesahan === 'Lulus' && data.id == approvalid && data.kodlaluan == teller)
|
||||||
|
{
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'success',
|
||||||
|
title: 'Serahan V3/Auto Pendahuluan V2 Berjaya',
|
||||||
|
text: 'Operasi berjaya meluluskan Serahan ke V3 dan Auto Pendahuluan dari V2!'
|
||||||
|
}).then(function(){
|
||||||
|
location.reload();
|
||||||
|
});
|
||||||
|
}else if(data.pengesahan == 'Batal' && data.id == approvalid && data.kodlaluan == teller){
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'error',
|
||||||
|
title: 'Serahan V3/Auto Pendahuluan V2 Dibatalkan',
|
||||||
|
text: 'Operasi membatalkan Serahan ke V3 dan Auto Pendahuluan dari V2!'
|
||||||
|
}).then(function(){
|
||||||
|
location.reload();
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'error',
|
||||||
|
title: 'Auto Serahan Mengalami Ralat',
|
||||||
|
text: 'Auto Serahan tidak berjaya!'
|
||||||
|
}).then(function(){
|
||||||
|
location.reload();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const getCurrentDate = () => {
|
||||||
|
const today = new Date();
|
||||||
|
const day = String(today.getDate()).padStart(2, '0');
|
||||||
|
const month = String(today.getMonth() + 1).padStart(2, '0');
|
||||||
|
const year = today.getFullYear();
|
||||||
|
|
||||||
|
return `${day}/${month}/${year}`;
|
||||||
|
};
|
||||||
|
|
||||||
|
function triggerValue(){
|
||||||
|
let form = $('form[name="autoserah"]');
|
||||||
|
form.find('[name="tarikh"]').val(getCurrentDate());
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#autoSerahanModal').on('shown.bs.modal', function () {
|
||||||
|
$('input[name="denominasi"]').attr('style','display: block');
|
||||||
|
$('.denominasi').attr('style','display: block');
|
||||||
|
triggerValue();
|
||||||
|
});
|
||||||
|
|
||||||
|
function terima_autoserah(){
|
||||||
|
let form = $('form[name="autoserah"]');
|
||||||
|
|
||||||
|
let amaun = form.find('[name="amaun"]').val();
|
||||||
|
let keterangan = form.find('[name="keterangan"]').val();
|
||||||
|
let dtacct = form.find('[name="dtacct"]').val();
|
||||||
|
let ktacct = form.find('[name="ktacct"]').val();
|
||||||
|
|
||||||
|
if(!amaun){
|
||||||
|
$("[name='erroramaun']").show();
|
||||||
|
$("[name='erroramaun']").text("*Isikan amaun dalam input!");
|
||||||
|
$("[name='amaun']").addClass('is-invalid');
|
||||||
|
boolamaun = true;
|
||||||
|
}else{
|
||||||
|
$("[name='erroramaun']").hide();
|
||||||
|
$("[name='amaun']").removeClass('is-invalid');
|
||||||
|
boolamaun = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!keterangan){
|
||||||
|
$("[name='errorketerangan']").show();
|
||||||
|
$("[name='errorketerangan']").text("*Isikan keterangan dalam input!");
|
||||||
|
$("[name='keterangan']").addClass('is-invalid');
|
||||||
|
boolketerangan = true;
|
||||||
|
}else{
|
||||||
|
$("[name='errorketerangan']").hide();
|
||||||
|
$("[name='keterangan']").removeClass('is-invalid');
|
||||||
|
boolketerangan = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If all validations pass
|
||||||
|
if(boolamaun === false && boolketerangan === false) {
|
||||||
|
// Carry all validated values, including auth_user
|
||||||
|
|
||||||
|
$('#amaundiminta').val(amaun);
|
||||||
|
$('#denominasiHQModal').modal('show');
|
||||||
|
$('#autoSerahanModal').modal('hide');
|
||||||
|
$('#jenisjenis').val('serahan');
|
||||||
|
$('#jenisserahan').val('auto');
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}else{
|
||||||
|
$("#terima_transaksi_autoserah").prop('disabled', false);
|
||||||
|
event.preventDefault();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@@ -8,7 +8,15 @@
|
|||||||
<!-- CSRF Token -->
|
<!-- CSRF Token -->
|
||||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||||
|
|
||||||
<title>SISTEM AR-RAHN</title>
|
<title>
|
||||||
|
@if (isset($cawangan_info['details_caw']) && $cawangan_info['details_caw'] == 'Putatan')
|
||||||
|
v2 Putatan Lama
|
||||||
|
@elseif (isset($cawangan_info['details_caw']) && $cawangan_info['details_caw'] == 'Putatan 2')
|
||||||
|
v2 Putatan Baru
|
||||||
|
@else
|
||||||
|
SISTEM AR-RAHN
|
||||||
|
@endif
|
||||||
|
</title>
|
||||||
|
|
||||||
<!-- Scripts -->
|
<!-- Scripts -->
|
||||||
<script src="{{ asset('js/app.js') }}" defer></script>
|
<script src="{{ asset('js/app.js') }}" defer></script>
|
||||||
@@ -114,6 +122,10 @@
|
|||||||
border-bottom:none;
|
border-bottom:none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.text-gold {
|
||||||
|
color: gold !important;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
@@ -131,21 +143,49 @@
|
|||||||
@endphp
|
@endphp
|
||||||
<div id="app">
|
<div id="app">
|
||||||
<div id="page_loader" class="not-loading"></div>
|
<div id="page_loader" class="not-loading"></div>
|
||||||
<nav class="navbar navbar-expand-md navbar-light bg-white shadow-sm" style="height:100px;">
|
<nav class="navbar navbar-expand-md navbar-light shadow-sm"
|
||||||
|
style="height:100px;
|
||||||
|
background-color:
|
||||||
|
{{ isset($cawangan_info['details_caw']) && $cawangan_info['details_caw'] == 'Putatan' ? 'red' :
|
||||||
|
(isset($cawangan_info['details_caw']) && $cawangan_info['details_caw'] == 'Putatan 2' ? '#FF6961' : 'white') }};">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<a class="navbar-brand" href="#" style="cursor:not-allowed;">
|
<a class="navbar-brand" href="#" style="cursor:not-allowed;">
|
||||||
<img src="{{ asset('img/icon_pkb.png') }}" class="logo-arrahn-header" alt="Logo Ar Rahn" />
|
<img src="{{ asset('img/icon_pkb.png') }}" class="logo-arrahn-header" alt="Logo Ar Rahn" />
|
||||||
|
<span style="color: {{ isset($cawangan_info['details_caw']) && $cawangan_info['details_caw'] == 'Putatan 2' ? 'black' : 'white' }}; font-weight: bold;">
|
||||||
|
@if (isset($cawangan_info['details_caw']) && $cawangan_info['details_caw'] == 'Putatan')
|
||||||
|
arOS v2
|
||||||
|
@elseif (isset($cawangan_info['details_caw']) && $cawangan_info['details_caw'] == 'Putatan 2')
|
||||||
|
arOS v2
|
||||||
|
@endif
|
||||||
|
</span>
|
||||||
</a>
|
</a>
|
||||||
|
<!-- Display Time -->
|
||||||
<div class="col-2">
|
<div class="col-2">
|
||||||
<div style="color:#eb2f06;font-weight:bold;" id="displaytime"></div>
|
<div
|
||||||
|
id="displaytime"
|
||||||
|
style="color: {{ isset($cawangan_info['details_caw']) && ($cawangan_info['details_caw'] == 'Putatan' || $cawangan_info['details_caw'] == 'Putatan 2') ? 'gold' : '#eb2f06' }}; font-weight:bold;">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="navbar-brand ml-3">
|
<div class="navbar-brand ml-3">
|
||||||
<b class="text-secondary">Cawangan : </b><span style="color:#1abc9c;font-weight:bold;">{{ $cawangan_info["details_caw"] }}</span>
|
<b class="{{ isset($cawangan_info['details_caw']) && $cawangan_info['details_caw'] == 'Putatan 2' ? 'text-black' :
|
||||||
</div>
|
(isset($cawangan_info['details_caw']) && $cawangan_info['details_caw'] == 'Putatan' ? 'text-gold' : 'text-secondary') }}">
|
||||||
<div class="navbar-brand ml-md-3">
|
Cawangan :
|
||||||
<b class="text-secondary">Kod Cawangan : </b><span style="color:#1abc9c;font-weight:bold;">{{ $cawangan_info['kodcaw'] }}</span>
|
</b>
|
||||||
<input type="text" hidden name="kodcaw" id="kodcaw" value="{{ $cawangan_info['kodcaw'] }}">
|
<span style="color: {{ isset($cawangan_info['details_caw']) && $cawangan_info['details_caw'] == 'Putatan 2' ? 'black' :
|
||||||
|
(isset($cawangan_info['details_caw']) && $cawangan_info['details_caw'] == 'Putatan' ? 'white' : '#1abc9c') }}; font-weight:bold;">
|
||||||
|
{{ $cawangan_info["details_caw"] }}
|
||||||
|
</span>
|
||||||
|
@if (isset($cawangan_info['details_caw']) && ($cawangan_info['details_caw'] == 'Putatan' || $cawangan_info['details_caw'] == 'Putatan 2'))
|
||||||
|
<span class="badge badge-info">
|
||||||
|
@if ($cawangan_info['details_caw'] == 'Putatan')
|
||||||
|
Lama
|
||||||
|
@elseif ($cawangan_info['details_caw'] == 'Putatan 2')
|
||||||
|
Baru
|
||||||
|
@endif
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="{{ __('Toggle navigation') }}">
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="{{ __('Toggle navigation') }}">
|
||||||
<span class="navbar-toggler-icon"></span>
|
<span class="navbar-toggler-icon"></span>
|
||||||
</button>
|
</button>
|
||||||
@@ -164,7 +204,15 @@
|
|||||||
@php $auth_user = Auth::user(); @endphp
|
@php $auth_user = Auth::user(); @endphp
|
||||||
@if ($auth_user['roles'] == 'ppc' || $auth_user['roles'] == 'pc')
|
@if ($auth_user['roles'] == 'ppc' || $auth_user['roles'] == 'pc')
|
||||||
<li class="nav-item dropdown" style="margin-right:10px;">
|
<li class="nav-item dropdown" style="margin-right:10px;">
|
||||||
<a id="navbarDropdown" class="nav-link " href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" v-pre>
|
<a id="navbarDropdown"
|
||||||
|
class="nav-link"
|
||||||
|
href="#"
|
||||||
|
role="button"
|
||||||
|
data-toggle="dropdown"
|
||||||
|
aria-haspopup="true"
|
||||||
|
aria-expanded="false"
|
||||||
|
v-pre
|
||||||
|
style="color: {{ isset($cawangan_info['details_caw']) && $cawangan_info['details_caw'] == 'Putatan 2' ? 'black' : '#1abc9c' }};">
|
||||||
<i id="bell" class="fa fa-bell"></i>
|
<i id="bell" class="fa fa-bell"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
@@ -235,7 +283,15 @@
|
|||||||
</script>
|
</script>
|
||||||
@elseif($auth_user['role_harian'] == 'teller')
|
@elseif($auth_user['role_harian'] == 'teller')
|
||||||
<li class="nav-item dropdown" style="margin-right:10px;">
|
<li class="nav-item dropdown" style="margin-right:10px;">
|
||||||
<a id="navbarDropdown" class="nav-link " href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" v-pre>
|
<a id="navbarDropdown"
|
||||||
|
class="nav-link"
|
||||||
|
href="#"
|
||||||
|
role="button"
|
||||||
|
data-toggle="dropdown"
|
||||||
|
aria-haspopup="true"
|
||||||
|
aria-expanded="false"
|
||||||
|
v-pre
|
||||||
|
style="color: {{ isset($cawangan_info['details_caw']) && $cawangan_info['details_caw'] == 'Putatan' ? 'white' : (isset($cawangan_info['details_caw']) && $cawangan_info['details_caw'] == 'Putatan 2' ? 'black' : '#1abc9c') }};">
|
||||||
<i id="bell" class="fa fa-bell"></i>
|
<i id="bell" class="fa fa-bell"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
@@ -307,7 +363,17 @@
|
|||||||
@endif
|
@endif
|
||||||
@else
|
@else
|
||||||
<li class="nav-item dropdown">
|
<li class="nav-item dropdown">
|
||||||
<a id="navbarDropdown" style="color:#1abc9c;font-weight:bold;" class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" v-pre>
|
<!-- User Name at Top Right Corner -->
|
||||||
|
<a id="navbarDropdown"
|
||||||
|
class="nav-link dropdown-toggle"
|
||||||
|
href="#"
|
||||||
|
role="button"
|
||||||
|
data-toggle="dropdown"
|
||||||
|
aria-haspopup="true"
|
||||||
|
aria-expanded="false"
|
||||||
|
v-pre
|
||||||
|
style="color: {{ isset($cawangan_info['details_caw']) && $cawangan_info['details_caw'] == 'Putatan' ? 'white' :
|
||||||
|
(isset($cawangan_info['details_caw']) && $cawangan_info['details_caw'] == 'Putatan 2' ? 'black' : '#1abc9c') }}; font-weight:bold;">
|
||||||
{{ Auth::user()->name }}
|
{{ Auth::user()->name }}
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
@@ -342,7 +408,11 @@
|
|||||||
<div class="col-12 pl-5">
|
<div class="col-12 pl-5">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<h5 class="pr-3">G : <span class="text-success">' .$gadaiNumber. '</span></h5>
|
<h5 class="pr-3">G : <span class="text-success">' .$gadaiNumber. '</span></h5>
|
||||||
<h5>T : <span class="text-danger">' .$listSerahNumber. '</span></h5>
|
<h5>T :
|
||||||
|
<span style="color: '.(isset($cawangan_info['details_caw']) && $cawangan_info['details_caw'] == 'Putatan' ? 'white' : 'red').';">
|
||||||
|
'.$listSerahNumber.'
|
||||||
|
</span>
|
||||||
|
</h5>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>';
|
</div>';
|
||||||
|
|||||||
@@ -126,6 +126,18 @@
|
|||||||
var audio = new Audio("{{ asset('sound/3.wav') }}");
|
var audio = new Audio("{{ asset('sound/3.wav') }}");
|
||||||
audio.muted = true;
|
audio.muted = true;
|
||||||
|
|
||||||
|
const Toast = Swal.mixin({
|
||||||
|
toast: true,
|
||||||
|
position: 'top-end',
|
||||||
|
showConfirmButton: false,
|
||||||
|
timer: 5000,
|
||||||
|
timerProgressBar: true,
|
||||||
|
didOpen: (toast) => {
|
||||||
|
toast.addEventListener('mouseenter', Swal.stopTimer)
|
||||||
|
toast.addEventListener('mouseleave', Swal.resumeTimer)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// Enable pusher logging - don't include this in production
|
// Enable pusher logging - don't include this in production
|
||||||
Pusher.logToConsole = false;
|
Pusher.logToConsole = false;
|
||||||
|
|
||||||
@@ -134,6 +146,35 @@
|
|||||||
encrypted: true
|
encrypted: true
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var kelulusanhapus = pusher.subscribe('notice-kelulusan');
|
||||||
|
kelulusanhapus.bind('my-kelulusan', function(data) {
|
||||||
|
if(data.tagoperasi == 1){
|
||||||
|
let message = JSON.stringify(data);
|
||||||
|
|
||||||
|
$('#bell').css("color", "red");
|
||||||
|
$('#linkz').text(data.namateller + " Pohon Kelulusan Dihapuskan");
|
||||||
|
$("#linkz").attr("href", "{{ url('kelulusan') }}");
|
||||||
|
if(window.location.pathname === '/operasi/kelulusan')
|
||||||
|
location.reload();
|
||||||
|
else{
|
||||||
|
audio.play();
|
||||||
|
audio.muted = false;
|
||||||
|
var countlagu = 1;
|
||||||
|
audio.onended = function() {
|
||||||
|
if(countlagu <= 3){
|
||||||
|
countlagu++;
|
||||||
|
this.play();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Toast.fire({
|
||||||
|
icon: 'info',
|
||||||
|
title: 'Kelulusan Dipohon Sekarang!'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
var channel = pusher.subscribe('operasi-notify');
|
var channel = pusher.subscribe('operasi-notify');
|
||||||
channel.bind('operasi-event', function(data) {
|
channel.bind('operasi-event', function(data) {
|
||||||
let message = JSON.stringify(data);
|
let message = JSON.stringify(data);
|
||||||
@@ -156,17 +197,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const Toast = Swal.mixin({
|
|
||||||
toast: true,
|
|
||||||
position: 'top-end',
|
|
||||||
showConfirmButton: false,
|
|
||||||
timer: 5000,
|
|
||||||
timerProgressBar: true,
|
|
||||||
didOpen: (toast) => {
|
|
||||||
toast.addEventListener('mouseenter', Swal.stopTimer)
|
|
||||||
toast.addEventListener('mouseleave', Swal.resumeTimer)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
Toast.fire({
|
Toast.fire({
|
||||||
icon: 'error',
|
icon: 'error',
|
||||||
|
|||||||
@@ -0,0 +1,49 @@
|
|||||||
|
<!-- Modal Wakil -->
|
||||||
|
<div class="modal fade" id="autoSerahanModal" tabindex="-1" role="dialog" aria-labelledby="autoSerahanModalCenterTitle" aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-lg modal-dialog-centered" role="document">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h5 class="modal-title" id="autoSerahanModalTitle">Daftar Serahan V3</h5>
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<form name="autoserah" onsubmit="return false;">
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="text-center mx-auto mt-4">
|
||||||
|
<div class="row">
|
||||||
|
<label class="col-2 mt-2">Tarikh</label>
|
||||||
|
<input type="text" class="form-control col-4 mt-2" name="tarikh" readonly/>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<label class="col-2 mt-2">Debit Akaun</label>
|
||||||
|
<input type="text" class="form-control col-4 mt-2" value="1000/010" name="dtacct" readonly/>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<label class="col-2 mt-2">Kredit Akaun</label>
|
||||||
|
<input type="text" class="form-control col-4 mt-2" value="1000/020" name="ktacct" readonly/>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<label class="col-2 mt-2">Keterangan</label>
|
||||||
|
<input type="text" class="form-control col-8 mt-2" value="Serahan Kepada V3" name="keterangan" readonly/>
|
||||||
|
<span name="errorketerangan" style="color:red;margin-left:130px;" class="col-12 text-left"></span>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<label class="col-2 mt-2">Amaun (RM)</label>
|
||||||
|
<input type="text" class="form-control col-4 mt-2" name="amaun" onkeypress="return validateformat(event)"/>
|
||||||
|
<span name="erroramaun" style="color:red;margin-left:130px;" class="col-12 text-left"></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<input type="hidden" id="auth_user" name="auth_user" value="{{ Auth::user()->id }}">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-danger btn-lg" data-dismiss="modal">Batal</button>
|
||||||
|
<button type="button" id="terima_transaksi_autoserah" onclick="terima_autoserah()" class="btn btn-success btn-lg">Terima</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -132,6 +132,7 @@
|
|||||||
<input type="hidden" id="jenisjenis"/>
|
<input type="hidden" id="jenisjenis"/>
|
||||||
<input type="hidden" id="kodcawangan"/>
|
<input type="hidden" id="kodcawangan"/>
|
||||||
<input type="hidden" id="tellerla"/>
|
<input type="hidden" id="tellerla"/>
|
||||||
|
<input type="hidden" id="jenisserahan"/>
|
||||||
<input type="hidden" id="auth_user" name="auth_user" value="{{ Auth::user()->id }}">
|
<input type="hidden" id="auth_user" name="auth_user" value="{{ Auth::user()->id }}">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
|
<style>
|
||||||
|
.modal-custom-size {
|
||||||
|
max-width: 95%; /* atau 100% */
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<!-- Modal HistoryBayaran -->
|
<!-- Modal HistoryBayaran -->
|
||||||
<div class="modal fade" id="historytebusModal" tabindex="-1" role="dialog" aria-labelledby="ModalCenterTitle" aria-hidden="true">
|
<div class="modal fade" id="historytebusModal" tabindex="-1" role="dialog" aria-labelledby="ModalCenterTitle" aria-hidden="true">
|
||||||
<div class="modal-dialog modal-dialog-centered modal-lg" role="document">
|
<!-- <div class="modal-dialog modal-dialog-centered modal-lg" role="document"> -->
|
||||||
|
<div class="modal-dialog modal-dialog-centered modal-xl" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
{{-- <h5 class="modal-title" id="ModalTitle">Rekod Tebus</h5> --}}
|
{{-- <h5 class="modal-title" id="ModalTitle">Rekod Tebus</h5> --}}
|
||||||
@@ -41,6 +47,7 @@
|
|||||||
<thead class="thead-dark">
|
<thead class="thead-dark">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Bil</th>
|
<th>Bil</th>
|
||||||
|
<th>Norujukan</th>
|
||||||
<th>Tarikh Bayaran</th>
|
<th>Tarikh Bayaran</th>
|
||||||
<th>Bayaran</th>
|
<th>Bayaran</th>
|
||||||
<th>Jenis Bayaran</th>
|
<th>Jenis Bayaran</th>
|
||||||
|
|||||||
@@ -0,0 +1,108 @@
|
|||||||
|
<style>
|
||||||
|
.modal-custom-size {
|
||||||
|
max-width: 95%; /* atau 100% */
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<!-- Modal HistoryBayaran -->
|
||||||
|
<div class="modal fade" id="historytebusModal" tabindex="-1" role="dialog" aria-labelledby="ModalCenterTitle" aria-hidden="true">
|
||||||
|
<!-- <div class="modal-dialog modal-dialog-centered modal-lg" role="document"> -->
|
||||||
|
<div class="modal-dialog modal-dialog-centered modal-xl" role="document">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
{{-- <h5 class="modal-title" id="ModalTitle">Rekod Tebus</h5> --}}
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-3">
|
||||||
|
<div class="small-box bg-warning text-center"><div class="inner"><b>Harga Jualan : <span id="hargajualanmodal"></span></b></div></div>
|
||||||
|
</div>
|
||||||
|
<div class="col-3">
|
||||||
|
<div class="small-box bg-warning text-center"><div class="inner"><b>Pembiayaan : <span id="pembiayaanmodal"></span></b></div></div>
|
||||||
|
</div>
|
||||||
|
<div class="col-3">
|
||||||
|
<div class="small-box bg-warning text-center"><div class="inner"><b>Nilai Marhun : <span id="nilaimarhunmodal"></span></b></div></div>
|
||||||
|
</div>
|
||||||
|
<div class="col-3">
|
||||||
|
<div class="small-box bg-warning text-center"><div class="inner"><b>Marhun : <span id="marhunmodal"></span></b></div></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<ul class="nav nav-tabs" id="custom-tabs-one-tab" role="tablist">
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link active" id="custom-tabs-one-home-tab" data-toggle="pill" href="#custom-tabs-one-home" role="tab" aria-controls="custom-tabs-one-home" aria-selected="true">Ansuran Pembiayaan</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" id="custom-tabs-upah-tab" data-toggle="pill" href="#custom-tabs-upah" role="tab" aria-controls="custom-tabs-upah" aria-selected="false">Keuntungan</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" id="custom-tabs-one-profile-tab" data-toggle="pill" href="#custom-tabs-one-profile" role="tab" aria-controls="custom-tabs-one-profile" aria-selected="false">Penyelesaian Pembiayaan</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div class="tab-content" id="custom-content-below-tabContent">
|
||||||
|
<div class="tab-pane fade show active" id="custom-tabs-one-home" role="tabpanel" aria-labelledby="custom-content-below-home-tab">
|
||||||
|
<hr>
|
||||||
|
<table id="tablehistorybayaran" class="table table-striped table-hover table-bordered text-center">
|
||||||
|
<thead class="thead-dark">
|
||||||
|
<tr>
|
||||||
|
<th>Bil</th>
|
||||||
|
<th>Norujukan</th>
|
||||||
|
<th>Tarikh Bayaran</th>
|
||||||
|
<th>Pembiayaan</th>
|
||||||
|
<th>Keuntungan</th>
|
||||||
|
<th>Jumlah Bayaran</th>
|
||||||
|
<th>Jenis Bayaran</th>
|
||||||
|
<th>Tindakan</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="tab-pane fade show" id="custom-tabs-upah" role="tabpanel" aria-labelledby="custom-content-below-home-tab">
|
||||||
|
<hr>
|
||||||
|
<table id="tablehistoryupah" class="table table-striped table-hover table-bordered text-center">
|
||||||
|
<thead class="thead-dark">
|
||||||
|
<tr>
|
||||||
|
<th>Bil</th>
|
||||||
|
<th>Tarikh</th>
|
||||||
|
<th>Keuntungan</th>
|
||||||
|
<th>Tindakan</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="tab-pane fade" id="custom-tabs-one-profile" role="tabpanel" aria-labelledby="custom-content-below-profile-tab">
|
||||||
|
<hr>
|
||||||
|
<table id="tablehistorytebus" class="table table-striped table-hover table-bordered text-center">
|
||||||
|
<thead class="thead-dark">
|
||||||
|
<tr>
|
||||||
|
<th>Bil</th>
|
||||||
|
<th>No Rujukan</th>
|
||||||
|
<th>Jenis Penyelesaian<br>Pembiayaan</th>
|
||||||
|
<th>Bayaran Pembiayaan</th>
|
||||||
|
<th>Keuntungan</th>
|
||||||
|
<th>Jumlah Penyelesaian<br>Pembiayaan</th>
|
||||||
|
<th>JBG</th>
|
||||||
|
<th>Tarikh Penyelesaian<br>Pembiayaan</th>
|
||||||
|
<th>Tindakan</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-danger" data-dismiss="modal">Batal</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="container">
|
<div class="container col-12">
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
@@ -113,6 +113,7 @@
|
|||||||
<th>Komen</th>
|
<th>Komen</th>
|
||||||
<th>Status</th>
|
<th>Status</th>
|
||||||
<th>Nilai Pembiayaan</th>
|
<th>Nilai Pembiayaan</th>
|
||||||
|
<th>Ansuran</th>
|
||||||
<th>Nilai Marhun</th>
|
<th>Nilai Marhun</th>
|
||||||
<th>Berat</th>
|
<th>Berat</th>
|
||||||
<th>Margin</th>
|
<th>Margin</th>
|
||||||
@@ -128,11 +129,16 @@
|
|||||||
<th>{{ $k['komen'] }}</th>
|
<th>{{ $k['komen'] }}</th>
|
||||||
<td>{{ $k['status'] }}</td>
|
<td>{{ $k['status'] }}</td>
|
||||||
<td>{{ number_format($k['pinjaman'],2) }}</td>
|
<td>{{ number_format($k['pinjaman'],2) }}</td>
|
||||||
|
@if(isset($k['ansuran']) && $k['ansuran'] != 0)
|
||||||
|
<td>{{ number_format($k['ansuran'],2) }}</td>
|
||||||
|
@else
|
||||||
|
<td></td>
|
||||||
|
@endif
|
||||||
<td>{{ $k['nilaimarhun'] }}</td>
|
<td>{{ $k['nilaimarhun'] }}</td>
|
||||||
<td>{{ $k['berat'] }}</td>
|
<td>{{ $k['berat'] }}</td>
|
||||||
<td>{{ $k['margin'] }}</td>
|
<td>{{ $k['margin'] }}</td>
|
||||||
<td><button class="btn btn-primary mr-2" onclick="updatelulus(this)" data-kodcaw="{{ $k['cawangankod'] }}" data-pelulus="{{ $k['pelulus'] }}" data-norujukan="{{ $k['norujukan'] }}" data-siri="{{ $k['siri'] }}"><i class="fas fa-thumbs-up"></i></button>
|
<td><button class="btn btn-primary mr-2" onclick="updatelulus(this)" data-taglulus="{{ isset($k['mohonid']) ? true : false }}" data-kodcaw="{{ $k['cawangankod'] }}" data-norujukan="{{ $k['norujukan'] }}" data-siri="{{ isset($k['siri']) ? $k['siri'] : $k['recno'] }}"><i class="fas fa-thumbs-up"></i></button>
|
||||||
<button class="btn btn-danger" onclick="updatebatal(this)" data-kodcaw="{{ $k['cawangankod'] }}" data-norujukan="{{ $k['norujukan'] }}" data-pelulus="{{ $k['pelulus'] }}" data-siri="{{ $k['siri'] }}" ><i class="fas fa-thumbs-down"></i></button></td>
|
<button class="btn btn-danger" onclick="updatebatal(this)" data-taglulus="{{ isset($k['mohonid']) ? true : false }}" data-kodcaw="{{ $k['cawangankod'] }}" data-norujukan="{{ $k['norujukan'] }}" data-siri="{{ isset($k['siri']) ? $k['siri'] : $k['recno'] }}" ><i class="fas fa-thumbs-down"></i></button></td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
</tbody>
|
</tbody>
|
||||||
@@ -346,6 +352,7 @@
|
|||||||
let siri = $(e).data('siri');
|
let siri = $(e).data('siri');
|
||||||
let namaoperasi = "{{ Auth::user()->name }}";
|
let namaoperasi = "{{ Auth::user()->name }}";
|
||||||
let teller = $(e).closest('tr').children('td:eq(2)').text();
|
let teller = $(e).closest('tr').children('td:eq(2)').text();
|
||||||
|
let taglulus = $(e).data('taglulus');
|
||||||
|
|
||||||
teller = String(teller);
|
teller = String(teller);
|
||||||
|
|
||||||
@@ -354,6 +361,7 @@
|
|||||||
url: "{{ route('operasi.updatekelulusan') }}",
|
url: "{{ route('operasi.updatekelulusan') }}",
|
||||||
data: {
|
data: {
|
||||||
"_token": "{{ csrf_token() }}",
|
"_token": "{{ csrf_token() }}",
|
||||||
|
"taglulus" : taglulus,
|
||||||
"norujukan" : norujukan,
|
"norujukan" : norujukan,
|
||||||
"kodcaw" : cawangankod,
|
"kodcaw" : cawangankod,
|
||||||
"komenkelulusan" : komenkelulusan,
|
"komenkelulusan" : komenkelulusan,
|
||||||
|
|||||||
@@ -0,0 +1,518 @@
|
|||||||
|
@extends('layouts.app_operasi')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="container col-12">
|
||||||
|
<div class="row justify-content-center">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="card">
|
||||||
|
<nav aria-label="breadcrumb">
|
||||||
|
<ol class="breadcrumb pb-3">
|
||||||
|
<li class="breadcrumb-item"><a href="{{ url('/') }}">Home</a></li>
|
||||||
|
<li class="breadcrumb-item active" aria-current="page">Kelulusan Anggota</li>
|
||||||
|
</ol>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<div class="card-body text-center">
|
||||||
|
|
||||||
|
<div class="row mb-4">
|
||||||
|
<div class="col-2 justify-content-start">
|
||||||
|
</div>
|
||||||
|
<div class="col-8 mt-3 justify-content-center">
|
||||||
|
</div>
|
||||||
|
<div class="col-2">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<table class='table mt-2 table-striped table-hover' id='table-kelulusan' style="width:100%;">
|
||||||
|
<thead class="thead-dark">
|
||||||
|
<tr>
|
||||||
|
<th>Cawangan</th>
|
||||||
|
<th>No Kad Pengenalan</th>
|
||||||
|
<th>Nama Anggota</th>
|
||||||
|
<th>Status</th>
|
||||||
|
<th>Tarikh/Masa</th>
|
||||||
|
<th>Tindakan</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@foreach ($arraykelulusan as $index => $k)
|
||||||
|
@foreach ($k['kelulusanall'] as $indexapp => $approval)
|
||||||
|
@php
|
||||||
|
$status = strtolower($approval['status'] ?? '');
|
||||||
|
$statusLabel = $approval['status'] ?? '—';
|
||||||
|
|
||||||
|
// Gunakan strpos() supaya compatible dengan PHP 7.x juga
|
||||||
|
if (
|
||||||
|
strpos($status, 'lulus') !== false ||
|
||||||
|
strpos($status, 'diluluskan') !== false ||
|
||||||
|
strpos($status, 'selesai') !== false
|
||||||
|
) {
|
||||||
|
$statusStyle = 'background-color:#7ee4b8; color:white;';
|
||||||
|
} elseif (
|
||||||
|
strpos($status, 'tolak') !== false ||
|
||||||
|
strpos($status, 'batal') !== false
|
||||||
|
) {
|
||||||
|
$statusStyle = 'background-color:#f58c8c; color:white;';
|
||||||
|
} elseif (
|
||||||
|
strpos($status, 'menunggu') !== false ||
|
||||||
|
strpos($status, 'pending') !== false
|
||||||
|
) {
|
||||||
|
$statusStyle = 'background-color:#ffd166; color:#333;';
|
||||||
|
} else {
|
||||||
|
$statusStyle = 'background-color:#d1d5db; color:#333;';
|
||||||
|
}
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>{{ $k['cawangan'] }}</td>
|
||||||
|
<td>{{ $approval['nokp'] }}</td>
|
||||||
|
<td>{{ $approval['nama'] ?? '-' }}</td>
|
||||||
|
<td>
|
||||||
|
<span class="px-3 py-2 d-inline-block text-center fw-bold"
|
||||||
|
style="{{ $statusStyle }} border-radius:8px; min-width:130px; display:inline-block;">
|
||||||
|
{{ $statusLabel }}
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
<td>{{ \Carbon\Carbon::parse($approval['created_at'])->timezone('Asia/Kuala_Lumpur')->format('d/m/Y h:i A') }}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@if ($statusLabel != 'DILULUSKAN')
|
||||||
|
<!-- Button Lulus -->
|
||||||
|
<button class="btn btn-success btn-sm me-2"
|
||||||
|
onclick="updatelulusAnggota(this)"
|
||||||
|
data-nokp="{{ $approval['nokp'] }}"
|
||||||
|
data-kodcaw="{{ $k['cawangankod'] }}" data-taglulus="Y"
|
||||||
|
title="Lulus Anggota">
|
||||||
|
<i class="fas fa-thumbs-up"></i>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<!-- Button Tolak -->
|
||||||
|
<button class="btn btn-danger btn-sm" onclick="updatelulusAnggota(this)"
|
||||||
|
data-nokp="{{ $approval['nokp'] }}"
|
||||||
|
data-kodcaw="{{ $k['cawangankod'] }}" data-taglulus="N"
|
||||||
|
title="Batal / Tolak Kelulusan">
|
||||||
|
<i class="fas fa-thumbs-down"></i>
|
||||||
|
</button>
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
@endforeach
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
var tablekelulusan = $('#table-kelulusan').DataTable({
|
||||||
|
"scrollX": true
|
||||||
|
});
|
||||||
|
|
||||||
|
let api = "{{ config('api.url') }}";
|
||||||
|
|
||||||
|
const formatter = new Intl.NumberFormat('en-US', {
|
||||||
|
minimumFractionDigits: 2
|
||||||
|
});
|
||||||
|
|
||||||
|
var audio = new Audio("{{ asset('sound/3.wav') }}");
|
||||||
|
|
||||||
|
if (tablekelulusan.data().any()) {
|
||||||
|
audio.play();
|
||||||
|
audio.addEventListener('ended', function() {
|
||||||
|
this.currentTime = 0;
|
||||||
|
this.play();
|
||||||
|
}, false);
|
||||||
|
} else {
|
||||||
|
audio.loop = false;
|
||||||
|
audio.muted = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$('#kelulusanmodal').on('show.bs.modal', function(event) {
|
||||||
|
let button = $(event.relatedTarget);
|
||||||
|
let norujukan = $(button).data('norujukan');
|
||||||
|
let kodcaw = $(button).data('kodcawangan');
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
method: 'GET',
|
||||||
|
url: api + '/api/gadai/norujukan/' + norujukan,
|
||||||
|
dataType: 'json',
|
||||||
|
success: function(datagadaiwithnorujukan) {
|
||||||
|
|
||||||
|
let nokp = datagadaiwithnorujukan[0][0].nokp;
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
method: 'GET',
|
||||||
|
url: api + '/api/customers/' + nokp,
|
||||||
|
dataType: 'json',
|
||||||
|
success: function(datagadaiwithnokp) {
|
||||||
|
|
||||||
|
let nama = datagadaiwithnokp.nama;
|
||||||
|
|
||||||
|
$('#namalanjut').text(nama);
|
||||||
|
$('#nokplanjut').text(nokp);
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
method: 'GET',
|
||||||
|
url: api + '/api/gadai/customers/' + nokp +
|
||||||
|
'/outstandingsemasa/' + kodcaw,
|
||||||
|
dataType: 'json',
|
||||||
|
success: function(outstandingsemasa) {
|
||||||
|
|
||||||
|
$('#pinjterkumpul').text('RM' + formatter
|
||||||
|
.format(outstandingsemasa));
|
||||||
|
|
||||||
|
},
|
||||||
|
error: function(xhr, status, error) {
|
||||||
|
var err = eval("(" + xhr.responseText +
|
||||||
|
")");
|
||||||
|
alert(xhr.responseText);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
method: 'GET',
|
||||||
|
url: api + '/api/customers/' + nokp + '/gadai/belum_tebus',
|
||||||
|
dataType: 'json',
|
||||||
|
success: function(data) {
|
||||||
|
let bilanganaktif = 0;
|
||||||
|
if (data == null) {
|
||||||
|
bilanganaktif = 0;
|
||||||
|
} else {
|
||||||
|
bilanganaktif = data[0].length;
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#bilaktif').text(bilanganaktif);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
method: 'GET',
|
||||||
|
url: api + '/api/customers/' + nokp + '/gadai/lelong',
|
||||||
|
dataType: 'json',
|
||||||
|
success: function(data) {
|
||||||
|
|
||||||
|
let bilanganlelong = 0;
|
||||||
|
|
||||||
|
if (data == null) {
|
||||||
|
bilanganlelong = 0;
|
||||||
|
} else {
|
||||||
|
bilanganlelong = data.length;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$('#billelong').text(bilanganlelong);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
async function updatelulus(e) {
|
||||||
|
console.log(e);
|
||||||
|
return;
|
||||||
|
|
||||||
|
const {
|
||||||
|
value: katalaluan
|
||||||
|
} = await Swal.fire({
|
||||||
|
title: 'Masukkan Katalaluan Semula',
|
||||||
|
input: 'password',
|
||||||
|
inputPlaceholder: 'Katalaluan',
|
||||||
|
confirmButtonText: 'Hantar',
|
||||||
|
showCancelButton: true,
|
||||||
|
cancelButtonText: 'Batal',
|
||||||
|
allowOutsideClick: true
|
||||||
|
})
|
||||||
|
|
||||||
|
let dataminta = '';
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
method: 'get',
|
||||||
|
url: "{{ route('operasi.getmintasemulakelulusan') }}",
|
||||||
|
async: false,
|
||||||
|
data: {
|
||||||
|
passsemula: katalaluan
|
||||||
|
},
|
||||||
|
success: function(data) {
|
||||||
|
if (data == "False") {
|
||||||
|
dataminta = data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (dataminta == 'False') {
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'error',
|
||||||
|
title: 'Pengesahan Katalaluan Tidak Berjaya'
|
||||||
|
})
|
||||||
|
event.preventDefault();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// var { value: komenkelulusan } = await Swal.fire({
|
||||||
|
// title: 'Masukkan Komen!',
|
||||||
|
// input: 'radio',
|
||||||
|
// customClass: {
|
||||||
|
// input: 'custom-radio'
|
||||||
|
// },
|
||||||
|
// inputOptions: {
|
||||||
|
// 'Pelanggan Baru': 'Pelanggan Baru',
|
||||||
|
// 'Pelanggan Tetap': 'Pelanggan Tetap',
|
||||||
|
// 'Rekod Gadaian Baik': 'Rekod Gadaian Baik',
|
||||||
|
// 'Lain2': 'Lain-Lain'
|
||||||
|
// },
|
||||||
|
// confirmButtonText: 'Hantar',
|
||||||
|
// showCancelButton:false,
|
||||||
|
// allowOutsideClick: false
|
||||||
|
// })
|
||||||
|
|
||||||
|
// if(komenkelulusan === 'Lain2')
|
||||||
|
// {
|
||||||
|
// var { value: komenkelulusan } = await Swal.fire({
|
||||||
|
// title: 'Masukkan Komen!',
|
||||||
|
// input: 'text',
|
||||||
|
// inputPlaceholder: 'Komen',
|
||||||
|
// confirmButtonText: 'Hantar',
|
||||||
|
// showCancelButton:false,
|
||||||
|
// allowOutsideClick: false
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
|
||||||
|
const {
|
||||||
|
value: komenkelulusan
|
||||||
|
} = await Swal.fire({
|
||||||
|
title: 'Masukkan Komen!',
|
||||||
|
input: 'text',
|
||||||
|
inputPlaceholder: 'Komen',
|
||||||
|
confirmButtonText: 'Hantar',
|
||||||
|
showCancelButton: false,
|
||||||
|
allowOutsideClick: false
|
||||||
|
})
|
||||||
|
|
||||||
|
let norujukan = $(e).data('norujukan');
|
||||||
|
let cawangankod = $(e).data('kodcaw');
|
||||||
|
let siri = $(e).data('siri');
|
||||||
|
let namaoperasi = "{{ Auth::user()->name }}";
|
||||||
|
let teller = $(e).closest('tr').children('td:eq(2)').text();
|
||||||
|
let taglulus = $(e).data('taglulus');
|
||||||
|
|
||||||
|
teller = String(teller);
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
method: 'put',
|
||||||
|
url: "{{ route('operasi.updatekelulusan') }}",
|
||||||
|
data: {
|
||||||
|
"_token": "{{ csrf_token() }}",
|
||||||
|
"taglulus": taglulus,
|
||||||
|
"norujukan": norujukan,
|
||||||
|
"kodcaw": cawangankod,
|
||||||
|
"komenkelulusan": komenkelulusan,
|
||||||
|
"siri": siri,
|
||||||
|
'namaoperasi': namaoperasi,
|
||||||
|
'teller': teller
|
||||||
|
},
|
||||||
|
success: function(data) {
|
||||||
|
console.log(data);
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'success',
|
||||||
|
title: 'Pengesahan Berjaya'
|
||||||
|
}).then(function() {
|
||||||
|
location.reload();
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
|
error: function(xhr, status, error) {
|
||||||
|
var err = eval("(" + xhr.responseText + ")");
|
||||||
|
alert(xhr.responseText);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
async function updatelulusAnggota(e) {
|
||||||
|
|
||||||
|
// 1️⃣ Semak katalaluan semula
|
||||||
|
const {
|
||||||
|
value: katalaluan
|
||||||
|
} = await Swal.fire({
|
||||||
|
title: 'Masukkan Katalaluan Semula',
|
||||||
|
input: 'password',
|
||||||
|
inputPlaceholder: 'Katalaluan',
|
||||||
|
confirmButtonText: 'Hantar',
|
||||||
|
showCancelButton: true,
|
||||||
|
cancelButtonText: 'Batal',
|
||||||
|
allowOutsideClick: true
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!katalaluan) return;
|
||||||
|
|
||||||
|
let sah = true;
|
||||||
|
await $.ajax({
|
||||||
|
method: 'get',
|
||||||
|
url: "{{ route('operasi.getmintasemulakelulusan') }}",
|
||||||
|
async: false,
|
||||||
|
data: {
|
||||||
|
passsemula: katalaluan
|
||||||
|
},
|
||||||
|
success: function(data) {
|
||||||
|
if (data == "False") sah = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!sah) {
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'error',
|
||||||
|
title: 'Pengesahan Katalaluan Tidak Berjaya'
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2️⃣ Dapatkan komen kelulusan
|
||||||
|
const {
|
||||||
|
value: komenkelulusan
|
||||||
|
} = await Swal.fire({
|
||||||
|
title: 'Masukkan Komen Kelulusan',
|
||||||
|
input: 'text',
|
||||||
|
inputPlaceholder: 'Contoh: Anggota layak diluluskan',
|
||||||
|
confirmButtonText: 'Hantar',
|
||||||
|
showCancelButton: false,
|
||||||
|
allowOutsideClick: false
|
||||||
|
});
|
||||||
|
|
||||||
|
// 3️⃣ Ambil data daripada butang / row
|
||||||
|
let nokp = $(e).data('nokp'); // data-nokp perlu ada dalam butang
|
||||||
|
let kodcaw = $(e).data('kodcaw');
|
||||||
|
let siri = $(e).data('siri');
|
||||||
|
let taglulus = $(e).data('taglulus');
|
||||||
|
let namaoperasi = "{{ Auth::user()->name }}";
|
||||||
|
|
||||||
|
// 4️⃣ Hantar ke backend (route khas kelulusan anggota)
|
||||||
|
$.ajax({
|
||||||
|
method: 'put',
|
||||||
|
url: "{{ route('operasi.updatekelulusananggota') }}",
|
||||||
|
data: {
|
||||||
|
"_token": "{{ csrf_token() }}",
|
||||||
|
"nokp": nokp,
|
||||||
|
"kodcaw": kodcaw,
|
||||||
|
"siri": siri,
|
||||||
|
"taglulus": taglulus,
|
||||||
|
"komenkelulusan": komenkelulusan,
|
||||||
|
"namaoperasi": namaoperasi
|
||||||
|
},
|
||||||
|
success: function(data) {
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'success',
|
||||||
|
title: 'Kelulusan Anggota Berjaya'
|
||||||
|
}).then(function() {
|
||||||
|
location.reload();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
error: function(xhr, status, error) {
|
||||||
|
alert("Ralat: " + xhr.responseText);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
async function updatebatal(e) {
|
||||||
|
const {
|
||||||
|
value: katalaluan
|
||||||
|
} = await Swal.fire({
|
||||||
|
title: 'Masukkan Katalaluan Semula',
|
||||||
|
input: 'password',
|
||||||
|
inputPlaceholder: 'Katalaluan',
|
||||||
|
confirmButtonText: 'Hantar',
|
||||||
|
showCancelButton: true,
|
||||||
|
cancelButtonText: 'Batal',
|
||||||
|
allowOutsideClick: true
|
||||||
|
})
|
||||||
|
|
||||||
|
let dataminta = '';
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
method: 'get',
|
||||||
|
url: "{{ route('operasi.getmintasemulakelulusan') }}",
|
||||||
|
async: false,
|
||||||
|
data: {
|
||||||
|
passsemula: katalaluan
|
||||||
|
},
|
||||||
|
success: function(data) {
|
||||||
|
if (data == "False") {
|
||||||
|
dataminta = data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (dataminta == 'False') {
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'error',
|
||||||
|
title: 'Pengesahan Katalaluan Tidak Berjaya'
|
||||||
|
})
|
||||||
|
event.preventDefault();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
const {
|
||||||
|
value: komenkelulusan
|
||||||
|
} = await Swal.fire({
|
||||||
|
title: 'Masukkan Komen',
|
||||||
|
input: 'text',
|
||||||
|
inputPlaceholder: 'Komen',
|
||||||
|
confirmButtonText: 'Hantar',
|
||||||
|
showCancelButton: false,
|
||||||
|
allowOutsideClick: false
|
||||||
|
})
|
||||||
|
|
||||||
|
let norujukan = $(e).data('norujukan');
|
||||||
|
let siri = $(e).data('siri');
|
||||||
|
let cawangankod = $(e).data('kodcaw');
|
||||||
|
let namaoperasi = "{{ Auth::user()->name }}";
|
||||||
|
let teller = $(e).closest('tr').children('td:eq(2)').text();
|
||||||
|
|
||||||
|
teller = String(teller);
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
method: 'put',
|
||||||
|
url: "{{ route('operasi.updatekelulusan') }}",
|
||||||
|
data: {
|
||||||
|
"_token": "{{ csrf_token() }}",
|
||||||
|
"norujukan": norujukan,
|
||||||
|
"siri": siri,
|
||||||
|
"kodcaw": cawangankod,
|
||||||
|
"komenkelulusan": komenkelulusan,
|
||||||
|
"pembatalan": "batal",
|
||||||
|
'namaoperasi': namaoperasi,
|
||||||
|
'teller': teller
|
||||||
|
},
|
||||||
|
success: function(data) {
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'success',
|
||||||
|
title: 'Pengesahan Berjaya'
|
||||||
|
}).then(function() {
|
||||||
|
location.reload();
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
|
error: function(xhr, status, error) {
|
||||||
|
var err = eval("(" + xhr.responseText + ")");
|
||||||
|
alert(xhr.responseText);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
@endsection
|
||||||
@@ -0,0 +1,344 @@
|
|||||||
|
|
||||||
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||||
|
<style>
|
||||||
|
#sim {
|
||||||
|
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
|
||||||
|
font-size:10px;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sim td {padding:3px 5px 3px 5px; padding-right:10px;}, #sim th {
|
||||||
|
border: 0px solid;
|
||||||
|
padding: 1px;
|
||||||
|
/* text-align: left; */
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#sim tr:nth-child(even){}
|
||||||
|
|
||||||
|
#sim tr {
|
||||||
|
border-bottom: 1px black;
|
||||||
|
}
|
||||||
|
#sim th {
|
||||||
|
border: 1px black;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sim2 th {
|
||||||
|
text-align: center;
|
||||||
|
border: 0px solid ;
|
||||||
|
table-layout:auto;
|
||||||
|
color: black;
|
||||||
|
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
* {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.row {
|
||||||
|
margin-right:-5px;
|
||||||
|
margin-right:-5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.column {
|
||||||
|
float: right;
|
||||||
|
width: 100%;
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Clearfix (clear floats) */
|
||||||
|
.row::after {
|
||||||
|
content: "";
|
||||||
|
clear: both;
|
||||||
|
display: table;
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
border-collapse: collapse;
|
||||||
|
border-spacing: 0;
|
||||||
|
width: 200%;
|
||||||
|
border: 0px solid #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
td {
|
||||||
|
/* text-align: right; */
|
||||||
|
padding: 16px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
th{
|
||||||
|
/* text-align: center; */
|
||||||
|
padding: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr:nth-child(even) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.font{
|
||||||
|
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
|
||||||
|
font-size:12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
/** Define now the real margins of every page in the PDF **/
|
||||||
|
body {
|
||||||
|
margin-top: 1cm;
|
||||||
|
/* margin-left: 2cm; */
|
||||||
|
/* margin-right: 2cm; */
|
||||||
|
margin-bottom: 2cm;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Define the header rules **/
|
||||||
|
header {
|
||||||
|
position: fixed;
|
||||||
|
top: -1cm;
|
||||||
|
left: 0cm;
|
||||||
|
right: 0cm;
|
||||||
|
height: 0cm;
|
||||||
|
/** Extra personal styles **/
|
||||||
|
/* background-color: #eaeaea; */
|
||||||
|
color: black;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 1.5cm;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Define the footer rules **/
|
||||||
|
footer {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0cm;
|
||||||
|
left: 0cm;
|
||||||
|
right: 0cm;
|
||||||
|
height: 2cm;
|
||||||
|
|
||||||
|
/** Extra personal styles **/
|
||||||
|
/* background-color: #eaeaea; */
|
||||||
|
color: black;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 1.5cm;
|
||||||
|
}
|
||||||
|
footer .pagenum:before {
|
||||||
|
content: counter(page);
|
||||||
|
}
|
||||||
|
|
||||||
|
.font{
|
||||||
|
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
|
||||||
|
font-size:12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#header {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header td,
|
||||||
|
#customers th {
|
||||||
|
|
||||||
|
padding: 4px;
|
||||||
|
font-size: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header tr:nth-child(even) {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header tr:hover {
|
||||||
|
background-color: #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header th {
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
/* text-align: left; */
|
||||||
|
padding: 4px;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#scan {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#scan td,
|
||||||
|
#scan th {
|
||||||
|
border-collapse: collapse;
|
||||||
|
padding: 8px;
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#scan tr:nth-child(even) {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#scan tr:hover {
|
||||||
|
background-color: #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
#scan th {
|
||||||
|
border-collapse: collapse;
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
/* text-align: left; */
|
||||||
|
padding: 4px;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#details {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#details td,
|
||||||
|
#details th {
|
||||||
|
|
||||||
|
padding: 8px;
|
||||||
|
font-size: 11px;
|
||||||
|
border: 1px solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
#details tr:nth-child(even) {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#details tr:hover {
|
||||||
|
background-color: #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
#details th {
|
||||||
|
padding-top: 12px;
|
||||||
|
font-style: bold;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
text-align: left;
|
||||||
|
padding: 4px;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<table width="100%" id="header">
|
||||||
|
<tr>
|
||||||
|
<th rowspan="4" style="width:50px"><br><img src="{{ asset('img/ARRAHN1.png') }}" style="width:70px"></img></th>
|
||||||
|
<th colspan="1">KOPERASI PERMODALAN KELANTAN BERHAD</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{{ $cawangan_detail['namacaw'] }}</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{{ $cawangan_detail['alamat1'] }}</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{{ $cawangan_detail['alamat2'].' No Tel : '. $cawangan_detail['notel'].' No Faks : '. $cawangan_detail['nofaks'] }}</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<table border="0" width="100%" id="scan">
|
||||||
|
<tr>
|
||||||
|
<th colspan ="5"><b>Laporan Stok Audit Khas</b></th>
|
||||||
|
<th> Tempoh : {{$daritempoh}} hingga tempoh : {{$hinggatempoh}}</th>
|
||||||
|
<th> </th>
|
||||||
|
<th><b> Tarikh Cetak:</b>
|
||||||
|
@php
|
||||||
|
$myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_cetak);
|
||||||
|
$formattedweddingdate = $myDateTime->format('d-m-Y');
|
||||||
|
echo($formattedweddingdate)
|
||||||
|
@endphp
|
||||||
|
</th>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
<table border="0" width="100%" height="80" align="left" id="details">
|
||||||
|
<thead>
|
||||||
|
<th>Bil</th>
|
||||||
|
<th>Nama</th>
|
||||||
|
<th>No. KP</th>
|
||||||
|
<th>No. Telefon</th>
|
||||||
|
<th>Norujukan</th>
|
||||||
|
<th>Tempoh</th>
|
||||||
|
<th>Berat</th>
|
||||||
|
<th>Nilai Marhun (RM)</th>
|
||||||
|
<th>Pembiayaan Asal (RM)</th>
|
||||||
|
<th>Baki Pembiayaan (RM)</th>
|
||||||
|
<th>Keuntungan Belum Bayar (RM)</th>
|
||||||
|
</thead>
|
||||||
|
@php
|
||||||
|
$counter = 1;
|
||||||
|
$totalpinjaman = 0;
|
||||||
|
|
||||||
|
// Sort ikut norujukan
|
||||||
|
$rekod = collect($stokaudit[0])->sortBy('norujukan')->values();
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
@foreach ($rekod as $item)
|
||||||
|
@php
|
||||||
|
$status = $item['blasted'] == null ? 'Belum' : 'Selesai';
|
||||||
|
$totalpinjaman += $item['pinjaman'];
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>{{ $counter }}</td>
|
||||||
|
<td style="white-space: nowrap;">{{ $item['customer']['nama'] ?? '-' }}</td>
|
||||||
|
<td>{{ $item['nokp'] }}</td>
|
||||||
|
<td>{{ $item['customer']['telefon'] ?? '-' }}</td>
|
||||||
|
<td style="white-space: nowrap;">{{ $item['norujukan'] }}</td>
|
||||||
|
<td>{{ $item['tempoh'] }}</td>
|
||||||
|
<td>{{ $item['berat'] }}</td>
|
||||||
|
<td align="right">{{ number_format($item['nilaimarhun'], 2) }}</td>
|
||||||
|
<td align="right">{{ number_format($item['pinjaman'], 2) }}</td>
|
||||||
|
<td align="right">{{ number_format($item['bakipjm'], 2) }}</td>
|
||||||
|
<td align="right">{{ number_format($item['tunggakan'], 2) }}</td>
|
||||||
|
</tr>
|
||||||
|
@php $counter++; @endphp
|
||||||
|
@endforeach
|
||||||
|
|
||||||
|
<tfoot>
|
||||||
|
<th colspan='6'>Jumlah</th>
|
||||||
|
<th>{{ number_format(collect($rekod)->sum('berat'), 2) }}</th>
|
||||||
|
<th style="text-align:right; font-weight:bold;">{{ number_format(collect($rekod)->sum('nilaimarhun'), 2) }}</th>
|
||||||
|
<th style="text-align:right; font-weight:bold;">{{ number_format(collect($rekod)->sum('pinjaman'), 2) }}</th>
|
||||||
|
<th style="text-align:right; font-weight:bold;">{{ number_format(collect($rekod)->sum('bakipjm'), 2) }}</th>
|
||||||
|
<th style="text-align:right; font-weight:bold;">{{ number_format(collect($rekod)->sum('tunggakan'), 2) }}</th>
|
||||||
|
</tfoot>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
<script src="{{ asset('js/jquery.min.js') }}"></script>
|
||||||
|
<script>
|
||||||
|
|
||||||
|
$(document).ready(function () {
|
||||||
|
|
||||||
|
var table2excel = new Table2Excel();
|
||||||
|
table2excel.export(document.querySelectorAll("#customers"),'senarai_notis');
|
||||||
|
setTimeout(function(){ window.close() }, 10);
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||||
|
<script src="{{ asset('js/table2excel.js') }}"></script>
|
||||||
@@ -90,10 +90,10 @@
|
|||||||
<div class="col-8">
|
<div class="col-8">
|
||||||
<select class="form-control" id="sltjenistebus">
|
<select class="form-control" id="sltjenistebus">
|
||||||
<option value="T">T = Penyelesaian Pembiayaan</option>
|
<option value="T">T = Penyelesaian Pembiayaan</option>
|
||||||
@if($gadai['tagbaru'] == 1)
|
@if(!in_array(Auth::user()->cawangan, config('redeemoption.ansuran_block', [])))
|
||||||
@if(!in_array(Auth::user()->cawangan, config('redeemoption.cawangan_block', [])))
|
|
||||||
<option value="A" {{ $gadai['tempoh'] >= 12 ? 'disabled' : '' }}>A = Ansuran Pembiayaan</option>
|
<option value="A" {{ $gadai['tempoh'] >= 12 ? 'disabled' : '' }}>A = Ansuran Pembiayaan</option>
|
||||||
@endif
|
@endif
|
||||||
|
@if($gadai['tagbaru'] == 1)
|
||||||
@if(config('redeemoption.enable_separuh') == 1)
|
@if(config('redeemoption.enable_separuh') == 1)
|
||||||
@if(!in_array(Auth::user()->cawangan, config('redeemoption.cawangan_block', [])))
|
@if(!in_array(Auth::user()->cawangan, config('redeemoption.cawangan_block', [])))
|
||||||
<option value="S">S = Sebahagian</option>
|
<option value="S">S = Sebahagian</option>
|
||||||
|
|||||||
@@ -201,8 +201,8 @@
|
|||||||
@foreach($senaraipelanggan as $index=>$item)
|
@foreach($senaraipelanggan as $index=>$item)
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ $counter }}</td>
|
<td>{{ $counter }}</td>
|
||||||
<td>{{$item['kpbaru']}}</td>
|
<td>{{ !empty($item['kpbaru']) ? $item['kpbaru'] : $item['kplama'] }}</td>
|
||||||
<td>{{$item['nama']}}</td>
|
<td>{{ $item['nama']}}</td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
@php $counter++;@endphp
|
@php $counter++;@endphp
|
||||||
|
|||||||
@@ -169,10 +169,25 @@
|
|||||||
</tr> --}}
|
</tr> --}}
|
||||||
</table>
|
</table>
|
||||||
<br>
|
<br>
|
||||||
|
@php
|
||||||
|
$reportNames = [
|
||||||
|
'serahan' => 'LAPORAN SERAHAN HQ',
|
||||||
|
'serahankepadav3' => 'LAPORAN SERAHAN KEPADA V3',
|
||||||
|
'pendahuluan' => 'LAPORAN PENDAHULUAN HQ',
|
||||||
|
'online' => 'LAPORAN SERAHAN ONLINE HQ',
|
||||||
|
'serahankepadav3' => 'LAPORAN SERAHAN KEPADA V3',
|
||||||
|
'serahanlelong' => 'LAPORAN SERAHAN LELONG HQ',
|
||||||
|
'serahanonline' => 'LAPORAN SERAHAN DAN SERAHAN ONLINE HQ',
|
||||||
|
'all' => 'LAPORAN KESELURUHAN HQ'
|
||||||
|
];
|
||||||
|
|
||||||
|
$displayJenisLaporan = $reportNames[$jenisLaporan] ?? 'Laporan Tidak Diketahui';
|
||||||
|
@endphp
|
||||||
|
|
||||||
<table id="scan">
|
<table id="scan">
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan ="5"><b>LAPORAN PENDAHULUAN/SERAHAN HQ</b></th>
|
{{-- <th colspan ="5"><b>LAPORAN PENDAHULUAN/SERAHAN HQ</b></th> --}}
|
||||||
|
<th colspan ="5"><b>{{ $displayJenisLaporan }} (arOSv2)</b></th>
|
||||||
<th> </th>
|
<th> </th>
|
||||||
<th> </th>
|
<th> </th>
|
||||||
<th></th>
|
<th></th>
|
||||||
|
|||||||
@@ -0,0 +1,428 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
<style>
|
||||||
|
|
||||||
|
.radiostyle .radio-green {
|
||||||
|
background-color: #27ae60;
|
||||||
|
color:white;
|
||||||
|
box-shadow: 5px 10px #888888;
|
||||||
|
width:200px;
|
||||||
|
margin-right:5px;
|
||||||
|
transition: 0.5s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.radiostyle .radio-red {
|
||||||
|
background-color: #e74c3c;
|
||||||
|
color:white;
|
||||||
|
width:200px;
|
||||||
|
margin-right:5px;
|
||||||
|
box-shadow: 5px 10px #888888;
|
||||||
|
transition: 0.5s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.radiostyle .radio-yellow {
|
||||||
|
background-color: #3498db;
|
||||||
|
color:white;
|
||||||
|
width:200px;
|
||||||
|
margin-right:5px;
|
||||||
|
box-shadow: 5px 10px #888888;
|
||||||
|
transition: 0.5s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.radiostyle .radio-green:hover {
|
||||||
|
box-shadow: 5px 5px #888888;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.radiostyle .radio-red:hover {
|
||||||
|
box-shadow: 5px 5px #888888;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.radiostyle .radio-yellow:hover {
|
||||||
|
box-shadow: 5px 5px #888888;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.radiostyle .radio-green input[type="radio"]:checked{
|
||||||
|
box-shadow: 5px 10px #888888;
|
||||||
|
}
|
||||||
|
|
||||||
|
.radiostyle .radio-yellow input[type="radio"]:checked{
|
||||||
|
box-shadow: 5px 10px #888888;
|
||||||
|
}
|
||||||
|
|
||||||
|
.radiostyle .radio-red input[type="radio"]:checked{
|
||||||
|
box-shadow: 5px 10px #888888;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#header {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header td,
|
||||||
|
#customers th {
|
||||||
|
|
||||||
|
padding: 4px;
|
||||||
|
font-size: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header tr:nth-child(even) {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header tr:hover {
|
||||||
|
background-color: #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header th {
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
text-align: left;
|
||||||
|
padding: 4px;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#scan {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#scan td,
|
||||||
|
#scan th {
|
||||||
|
|
||||||
|
padding: 8px;
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#scan tr:nth-child(even) {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#scan tr:hover {
|
||||||
|
background-color: #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
#scan th {
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
text-align: left;
|
||||||
|
padding: 4px;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#scan {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#scan td,
|
||||||
|
#scan th {
|
||||||
|
border-collapse: collapse;
|
||||||
|
padding: 8px;
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#scan tr:nth-child(even) {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#scan tr:hover {
|
||||||
|
background-color: #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
#scan th {
|
||||||
|
border-collapse: collapse;
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
text-align: left;
|
||||||
|
padding: 4px;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#details {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#details td,
|
||||||
|
#details th {
|
||||||
|
|
||||||
|
padding: 8px;
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#details tr:nth-child(even) {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#details tr:hover {
|
||||||
|
background-color: #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
#details th {
|
||||||
|
padding-top: 12px;
|
||||||
|
font-style: bold;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
text-align: left;
|
||||||
|
padding: 4px;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#sign {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sign td,
|
||||||
|
#sign th {
|
||||||
|
|
||||||
|
padding: 8px;
|
||||||
|
font-size: 11px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sign tr:nth-child(even) {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sign tr:hover {
|
||||||
|
background-color: #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sign th {
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
text-align: left;
|
||||||
|
padding: 4px;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row justify-content-center">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="card">
|
||||||
|
<nav aria-label="breadcrumb">
|
||||||
|
<ol class="breadcrumb pb-3">
|
||||||
|
<li class="breadcrumb-item"><a href="{{ route('home') }}">Home</a></li>
|
||||||
|
<li class="breadcrumb-item"><a href="{{ route('laporan') }}">Laporan</a></li>
|
||||||
|
<li class="breadcrumb-item"><a href="{{ route('laporan.stokauditkhas') }}">SA(Blast Whatsapp)</a></li>
|
||||||
|
<li class="breadcrumb-item active" aria-current="page">Stok Audit Khas (Blast Whatsapp)</li>
|
||||||
|
</ol>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="card-body text-center">
|
||||||
|
|
||||||
|
<form id="exportpdf" action="{{route('stokaudit.exportlaporancetakkhas')}}" target="_blank" method="POST">
|
||||||
|
{{-- <a class="btn m-1 btn-success confirmdel" href="{{route('stokaudit.exportlaporancetakkhas')}}" data-toggle="tooltip" data-placement="top" title="Blast"><i class="far fa-mail-alt"></i>Blast Whatsapp & SMS</a> --}}
|
||||||
|
@csrf
|
||||||
|
<input type="hidden" name="type" id="typedonwload" value="">
|
||||||
|
<input type="hidden" name="daritempoh" value="{{ $daritempoh}}">
|
||||||
|
<input type="hidden" name="hinggatempoh" value="{{ $hinggatempoh}}">
|
||||||
|
<input type='hidden' name="radaktif" value="aktif">
|
||||||
|
<table id="scan">
|
||||||
|
<tr>
|
||||||
|
<th colspan ="5"><b>Laporan Stok Audit Khas (Blast Whatsapp)</b></th>
|
||||||
|
|
||||||
|
<th><b> Tarikh Cetak:</b>
|
||||||
|
@php
|
||||||
|
$myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_cetak);
|
||||||
|
$formattedweddingdate = $myDateTime->format('d-m-Y');
|
||||||
|
echo $formattedweddingdate;
|
||||||
|
@endphp
|
||||||
|
</th>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th> <b>Dari Tempoh: {{$daritempoh}} hingga Tempoh: {{$hinggatempoh}}</b></th>
|
||||||
|
<td></td>
|
||||||
|
<td style="width:50px"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<table class="table table-bordered" id="details" style="width:100%">
|
||||||
|
<thead>
|
||||||
|
<th>Bil</th>
|
||||||
|
<!-- <th>Status</th> -->
|
||||||
|
<th>Nama</th>
|
||||||
|
<th>No. KP</th>
|
||||||
|
<th>No. Telefon</th>
|
||||||
|
<th>Norujukan</th>
|
||||||
|
<th>Tempoh</th>
|
||||||
|
<th>Berat</th>
|
||||||
|
<th>Nilai Marhun (RM)</th>
|
||||||
|
<th>Pembiayaan Asal (RM)</th>
|
||||||
|
<th>Baki Pembiayaan (RM)</th>
|
||||||
|
<th>Keuntungan Belum Bayar (RM)</th>
|
||||||
|
</thead>
|
||||||
|
@php
|
||||||
|
$counter = 1;
|
||||||
|
$totalpinjaman = 0;
|
||||||
|
|
||||||
|
// Sort ikut norujukan
|
||||||
|
$rekod = collect($stokaudit[0])->sortBy('norujukan')->values();
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
@foreach ($rekod as $item)
|
||||||
|
@php
|
||||||
|
$status = $item['blasted'] == null ? 'Belum' : 'Selesai';
|
||||||
|
$totalpinjaman += $item['pinjaman'];
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>{{ $counter }}</td>
|
||||||
|
<!-- <td style="white-space: nowrap">{{ $status }}</td> -->
|
||||||
|
<td style="white-space: nowrap;">{{ $item['customer']['nama'] ?? '-' }}</td>
|
||||||
|
<td>{{ $item['nokp'] }}</td>
|
||||||
|
<td>{{ $item['customer']['telefon'] ?? '-' }}</td>
|
||||||
|
<td style="white-space: nowrap;">{{ $item['norujukan'] }}</td>
|
||||||
|
<td>{{ $item['tempoh'] }}</td>
|
||||||
|
<td>{{ $item['berat'] }}</td>
|
||||||
|
<td align="right">{{ number_format($item['nilaimarhun'], 2) }}</td>
|
||||||
|
<td align="right">{{ number_format($item['pinjaman'], 2) }}</td>
|
||||||
|
<td align="right">{{ number_format($item['bakipjm'], 2) }}</td>
|
||||||
|
<td align="right">{{ number_format($item['tunggakan'], 2) }}</td>
|
||||||
|
</tr>
|
||||||
|
@php $counter++; @endphp
|
||||||
|
@endforeach
|
||||||
|
|
||||||
|
<tfoot>
|
||||||
|
<th colspan='6'>Jumlah</th>
|
||||||
|
<th>{{ number_format(collect($rekod)->sum('berat'), 2) }}</th>
|
||||||
|
<th style="text-align:right; font-weight:bold;">{{ number_format(collect($rekod)->sum('nilaimarhun'), 2) }}</th>
|
||||||
|
<th style="text-align:right; font-weight:bold;">{{ number_format(collect($rekod)->sum('pinjaman'), 2) }}</th>
|
||||||
|
<th style="text-align:right; font-weight:bold;">{{ number_format(collect($rekod)->sum('bakipjm'), 2) }}</th>
|
||||||
|
<th style="text-align:right; font-weight:bold;">{{ number_format(collect($rekod)->sum('tunggakan'), 2) }}</th>
|
||||||
|
</tfoot>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
{{-- <table id="sign">
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td colspan="2"> .................................................................. </td>
|
||||||
|
<td> </td>
|
||||||
|
<td colspan="2">.................................................................. </td>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td colspan="2"><B> DI SEMAK</B> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td colspan="2"><B>DI SAHKAN </B></td>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
</table> --}}
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
var tablelelongbid= $('#details').DataTable( {
|
||||||
|
"columnDefs": [
|
||||||
|
{
|
||||||
|
"targets": 0,
|
||||||
|
"target": '_blank',
|
||||||
|
"orderable": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"targets": 5,
|
||||||
|
"orderable": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
// order: [[1, 'asc']],
|
||||||
|
// // "ordering": false,
|
||||||
|
"info": false,
|
||||||
|
"lengthChange": false,
|
||||||
|
"pageLength": 9999999,
|
||||||
|
dom: 'Bfrtip',
|
||||||
|
buttons: [
|
||||||
|
|
||||||
|
{
|
||||||
|
className: 'btn btn-outline-success pl-4 pr-4 btn-sm export',
|
||||||
|
target: "_blank",
|
||||||
|
titleAttr: 'Export to Excel',
|
||||||
|
text: '<h8><b>EXCEL</b></h8>',
|
||||||
|
action: function ( e, dt, node, config ) {
|
||||||
|
$('#typedonwload').val('excel');
|
||||||
|
$("#exportpdf").submit();
|
||||||
|
// window.open("_blank");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
className: 'btn btn-outline-danger pl-4 pr-4 btn-sm export',
|
||||||
|
titleAttr: 'Export to PDF',
|
||||||
|
text: '<h8><b>PDF</b></h8>',
|
||||||
|
action: function ( e, dt, node, config ) {
|
||||||
|
$('#typedonwload').val('pdf');
|
||||||
|
$("#exportpdf").submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// className: 'btn btn-outline-info pl-4 pr-4 btn-sm export',
|
||||||
|
// target: "_blank",
|
||||||
|
// titleAttr: 'Blast Whatsapp',
|
||||||
|
// text: '<h8><b>WHATSAPP & SMS</b></h8>',
|
||||||
|
// action: function ( e, dt, node, config ) {
|
||||||
|
// // $('#typedonwload').val('whatsapp');
|
||||||
|
// // $("#exportpdf").submit();
|
||||||
|
// $("#exportpdf").click(function() {
|
||||||
|
// $('[data-toggle="tooltip"]').tooltip()
|
||||||
|
// alert("ADAKAH ANDA PASTI?");
|
||||||
|
// $('#typedonwload').val('whatsapp');
|
||||||
|
// $("#exportpdf").submit();
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.export').tooltip();
|
||||||
|
$( '.export').removeClass('dt-button');
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
@endsection
|
||||||
@@ -230,8 +230,8 @@
|
|||||||
<td>{{ $counter }}</td>
|
<td>{{ $counter }}</td>
|
||||||
<td>
|
<td>
|
||||||
@php
|
@php
|
||||||
|
// $gadaidetail = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/gadai/norujukan/' . $item['norujukan'])->json();
|
||||||
$gadaidetail = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/gadai/norujukan/' . $item['norujukan'])->json();
|
$gadaidetail = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/gadai/norujukankodcaw/' . $item['kodcaw'] . '/' . $item['norujukan'])->json();
|
||||||
$customer_detail = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/customers/' . $gadaidetail[0][0]['nokp'])->json();
|
$customer_detail = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/customers/' . $gadaidetail[0][0]['nokp'])->json();
|
||||||
echo $customer_detail['nama'];
|
echo $customer_detail['nama'];
|
||||||
@endphp
|
@endphp
|
||||||
|
|||||||
@@ -464,11 +464,21 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<div class="header-style">
|
<div class="header-style">
|
||||||
<div style="display: flex; align-items:center">
|
<!-- Logo Section -->
|
||||||
<img src="{{ asset('img/kopkb.png') }}" style="width:80px; margin-right: 10px" alt="User Image" class="center">
|
<div style="display: flex; align-items: center;">
|
||||||
<img src="{{ asset('img/ARRAHN1.png') }}" style="width:50px" alt="User Image" class="center">
|
<img src="{{ asset('img/kopkb.png') }}" style="width: 80px; margin-right: 10px;" alt="KOPKB Logo" class="center">
|
||||||
|
<img src="{{ asset('img/ARRAHN1.png') }}" style="width: 50px;" alt="ARRAHN Logo" class="center">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
|
||||||
|
<!-- Cawangan Info -->
|
||||||
|
<div style="display: flex; align-items: center; margin-top: 10px;">
|
||||||
|
<span style="color: #0a0b0b; font-weight: bold;">
|
||||||
|
<strong>{{ $cawangan_info["details_caw"] }}</strong>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Notice Section -->
|
||||||
|
<div style="margin-top: 10px;">
|
||||||
<span><strong>UNTUK KEGUNAAN PELANGGAN</strong></span>
|
<span><strong>UNTUK KEGUNAAN PELANGGAN</strong></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -695,6 +705,11 @@
|
|||||||
class="center">
|
class="center">
|
||||||
<img src="{{ asset('img/ARRAHN1.png') }}" style="width:50px" alt="User Image" class="center">
|
<img src="{{ asset('img/ARRAHN1.png') }}" style="width:50px" alt="User Image" class="center">
|
||||||
</div>
|
</div>
|
||||||
|
<div style="display: flex; align-items: center;">
|
||||||
|
<span style="color: #0a0b0b; font-weight: bold;">
|
||||||
|
<strong>{{ $cawangan_info["details_caw"] }} (arOS V2)</strong>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span><strong>UNTUK KEGUNAAN PEJABAT</strong></span>
|
<span><strong>UNTUK KEGUNAAN PEJABAT</strong></span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -430,11 +430,21 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<div class="header-style">
|
<div class="header-style">
|
||||||
<div style="display: flex; align-items:center">
|
<!-- Logo Section -->
|
||||||
<img src="{{ asset('img/kopkb.png') }}" style="width:80px; margin-right: 10px" alt="User Image" class="center" >
|
<div style="display: flex; align-items: center;">
|
||||||
<img src="{{ asset('img/ARRAHN1.png') }}" style="width:50px" alt="User Image" class="center" >
|
<img src="{{ asset('img/kopkb.png') }}" style="width: 80px; margin-right: 10px;" alt="KOPKB Logo" class="center">
|
||||||
|
<img src="{{ asset('img/ARRAHN1.png') }}" style="width: 50px;" alt="ARRAHN Logo" class="center">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
|
||||||
|
<!-- Cawangan Info -->
|
||||||
|
<div style="display: flex; align-items: center; margin-top: 10px;">
|
||||||
|
<span style="color: #0a0b0b; font-weight: bold;">
|
||||||
|
<strong>{{ $cawangan_info["details_caw"] }}</strong>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Notice Section -->
|
||||||
|
<div style="margin-top: 10px;">
|
||||||
<span><strong>UNTUK KEGUNAAN PELANGGAN</strong></span>
|
<span><strong>UNTUK KEGUNAAN PELANGGAN</strong></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -548,8 +558,14 @@
|
|||||||
</table>
|
</table>
|
||||||
<div class="header-style">
|
<div class="header-style">
|
||||||
<div style="display: flex; align-items:center">
|
<div style="display: flex; align-items:center">
|
||||||
<img src="{{ asset('img/kopkb.png') }}" style="width:80px; margin-right: 10px" alt="User Image" class="center" >
|
<img src="{{ asset('img/kopkb.png') }}" style="width:80px; margin-right: 10px" alt="User Image"
|
||||||
<img src="{{ asset('img/ARRAHN1.png') }}" style="width:50px" alt="User Image" class="center" >
|
class="center">
|
||||||
|
<img src="{{ asset('img/ARRAHN1.png') }}" style="width:50px" alt="User Image" class="center">
|
||||||
|
</div>
|
||||||
|
<div style="display: flex; align-items: center;">
|
||||||
|
<span style="color: #0a0b0b; font-weight: bold;">
|
||||||
|
<strong>{{ $cawangan_info["details_caw"] }} (arOS V2)</strong>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span><strong>UNTUK KEGUNAAN PEJABAT</strong></span>
|
<span><strong>UNTUK KEGUNAAN PEJABAT</strong></span>
|
||||||
|
|||||||
@@ -464,14 +464,25 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<div class="header-style">
|
<div class="header-style">
|
||||||
<div style="display: flex; align-items:center">
|
<!-- Logo Section -->
|
||||||
<img src="{{ asset('img/kopkb.png') }}" style="width:80px; margin-right: 10px" alt="User Image" class="center">
|
<div style="display: flex; align-items: center;">
|
||||||
<img src="{{ asset('img/ARRAHN1.png') }}" style="width:50px" alt="User Image" class="center">
|
<img src="{{ asset('img/kopkb.png') }}" style="width: 80px; margin-right: 10px;" alt="KOPKB Logo" class="center">
|
||||||
|
<img src="{{ asset('img/ARRAHN1.png') }}" style="width: 50px;" alt="ARRAHN Logo" class="center">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
|
||||||
|
<!-- Cawangan Info -->
|
||||||
|
<div style="display: flex; align-items: center; margin-top: 10px;">
|
||||||
|
<span style="color: #0a0b0b; font-weight: bold;">
|
||||||
|
<strong>{{ $cawangan_info["details_caw"] }}</strong>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Notice Section -->
|
||||||
|
<div style="margin-top: 10px;">
|
||||||
<span><strong>UNTUK KEGUNAAN PELANGGAN</strong></span>
|
<span><strong>UNTUK KEGUNAAN PELANGGAN</strong></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<div style="position: relative">
|
<div style="position: relative">
|
||||||
@@ -614,7 +625,7 @@
|
|||||||
<table id="payment" class="{{ sizeof($wakil) != 0 ? 'custom-table-right' : '' }}">
|
<table id="payment" class="{{ sizeof($wakil) != 0 ? 'custom-table-right' : '' }}">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width:10px">Baki Pembiayaan</td>
|
<td style="width:10px">Baki Pembiayaan</td>
|
||||||
<td style="width:10px">: RM {{ number_format($gadai['bakipjm'], 2) }} </td>
|
<td style="width:10px">: <strong>RM {{ number_format($gadai['bakipjm'], 2) }} </td></strong>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width:10px">Keuntungan</td>
|
<td style="width:10px">Keuntungan</td>
|
||||||
@@ -641,7 +652,10 @@
|
|||||||
{{ number_format($gadai['diskaun'], 2) }} </td>
|
{{ number_format($gadai['diskaun'], 2) }} </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td style="width:10px">Jumlah Keuntungan + Lain-Lain Caj</td>
|
||||||
|
<td style="width:10px">: <strong>RM
|
||||||
|
{{ number_format($penebusan['onepercent'] + $penebusan['ujrah'], 2) }}</strong>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td></td>
|
||||||
@@ -699,6 +713,11 @@
|
|||||||
class="center">
|
class="center">
|
||||||
<img src="{{ asset('img/ARRAHN1.png') }}" style="width:50px" alt="User Image" class="center">
|
<img src="{{ asset('img/ARRAHN1.png') }}" style="width:50px" alt="User Image" class="center">
|
||||||
</div>
|
</div>
|
||||||
|
<div style="display: flex; align-items: center;">
|
||||||
|
<span style="color: #0a0b0b; font-weight: bold;">
|
||||||
|
<strong>{{ $cawangan_info["details_caw"] }} (arOS V2)</strong>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span><strong>UNTUK KEGUNAAN PEJABAT</strong></span>
|
<span><strong>UNTUK KEGUNAAN PEJABAT</strong></span>
|
||||||
</div>
|
</div>
|
||||||
@@ -844,7 +863,7 @@
|
|||||||
<table id="payment" class="{{ sizeof($wakil) != 0 ? 'custom-table-right' : '' }}">
|
<table id="payment" class="{{ sizeof($wakil) != 0 ? 'custom-table-right' : '' }}">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width:10px">Baki Pembiayaan</td>
|
<td style="width:10px">Baki Pembiayaan</td>
|
||||||
<td style="width:10px">: RM {{ number_format($gadai['bakipjm'], 2) }} </td>
|
<td style="width:10px">: <strong>RM {{ number_format($gadai['bakipjm'], 2) }} </strong></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width:10px">Keuntungan</td>
|
<td style="width:10px">Keuntungan</td>
|
||||||
@@ -865,6 +884,12 @@
|
|||||||
<td style="width:10px">: RM
|
<td style="width:10px">: RM
|
||||||
{{ number_format($totalrebate['ujrah'], 2) }} </td>
|
{{ number_format($totalrebate['ujrah'], 2) }} </td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="width:10px">Jumlah Keuntungan + Lain-Lain Caj</td>
|
||||||
|
<td style="width:10px">: <strong>RM
|
||||||
|
{{ number_format($penebusan['onepercent'] + $penebusan['ujrah'], 2) }}</strong>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width:10px">(-) Diskaun Promosi</td>
|
<td style="width:10px">(-) Diskaun Promosi</td>
|
||||||
<td style="width:10px">: RM
|
<td style="width:10px">: RM
|
||||||
|
|||||||
@@ -376,11 +376,21 @@ hr.new5 {
|
|||||||
|
|
||||||
|
|
||||||
<div class="header-style">
|
<div class="header-style">
|
||||||
<div style="display: flex; align-items:center">
|
<!-- Logo Section -->
|
||||||
<img src="{{ asset('img/kopkb.png') }}" style="width:80px; margin-right: 10px" alt="User Image" class="center" >
|
<div style="display: flex; align-items: center;">
|
||||||
<img src="{{ asset('img/ARRAHN1.png') }}" style="width:50px" alt="User Image" class="center" >
|
<img src="{{ asset('img/kopkb.png') }}" style="width: 80px; margin-right: 10px;" alt="KOPKB Logo" class="center">
|
||||||
|
<img src="{{ asset('img/ARRAHN1.png') }}" style="width: 50px;" alt="ARRAHN Logo" class="center">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
|
||||||
|
<!-- Cawangan Info -->
|
||||||
|
<div style="display: flex; align-items: center; margin-top: 10px;">
|
||||||
|
<span style="color: #0a0b0b; font-weight: bold;">
|
||||||
|
<strong>{{ $cawangan_info["details_caw"] }}</strong>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Notice Section -->
|
||||||
|
<div style="margin-top: 10px;">
|
||||||
<span><strong>UNTUK KEGUNAAN PELANGGAN</strong></span>
|
<span><strong>UNTUK KEGUNAAN PELANGGAN</strong></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -522,8 +532,14 @@ hr.new5 {
|
|||||||
|
|
||||||
<div class="header-style">
|
<div class="header-style">
|
||||||
<div style="display: flex; align-items:center">
|
<div style="display: flex; align-items:center">
|
||||||
<img src="{{ asset('img/kopkb.png') }}" style="width:80px; margin-right: 10px" alt="User Image" class="center" >
|
<img src="{{ asset('img/kopkb.png') }}" style="width:80px; margin-right: 10px" alt="User Image"
|
||||||
<img src="{{ asset('img/ARRAHN1.png') }}" style="width:50px" alt="User Image" class="center" >
|
class="center">
|
||||||
|
<img src="{{ asset('img/ARRAHN1.png') }}" style="width:50px" alt="User Image" class="center">
|
||||||
|
</div>
|
||||||
|
<div style="display: flex; align-items: center;">
|
||||||
|
<span style="color: #0a0b0b; font-weight: bold;">
|
||||||
|
<strong>{{ $cawangan_info["details_caw"] }} (arOS V2)</strong>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span><strong>UNTUK KEGUNAAN PEJABAT</strong></span>
|
<span><strong>UNTUK KEGUNAAN PEJABAT</strong></span>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -10,18 +10,20 @@
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
.grid-container {
|
.grid-container {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid: 75px / 33% 33% 33%;
|
grid-template-columns: 45% 25% 30%;
|
||||||
|
align-items: start;
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#header_surat1 {
|
#header_surat1 {
|
||||||
font-family: Arial, Helvetica, sans-serif;
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
border-collapse: collapse;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
}
|
padding-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#header_surat1 p {
|
#header_surat1 p {
|
||||||
margin: 2px;
|
margin: 2px;
|
||||||
@@ -80,19 +82,34 @@
|
|||||||
font-family: Arial, Helvetica, sans-serif;
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
font-size: 12px;
|
font-size: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#note p {
|
#note p {
|
||||||
margin: 2px;
|
margin: 2px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
<style>
|
||||||
|
.custom-box {
|
||||||
|
width: 15px;
|
||||||
|
height: 15px;
|
||||||
|
border: 50px solid black;
|
||||||
|
display: inline-block;
|
||||||
|
cursor: pointer;
|
||||||
|
user-select: none;
|
||||||
|
margin-right: 4px;
|
||||||
|
background-color: white;
|
||||||
|
}
|
||||||
|
.custom-box.checked {
|
||||||
|
background-color: black;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div class="grid-container" style="margin-bottom: 10px">
|
<div class="grid-container" style="margin-bottom: 10px">
|
||||||
<div id="header_surat1">
|
<div id="header_surat1">
|
||||||
<p style="text-wrap:nowrap">KOPERASI PERMODALAN KELANTAN BERHAD (D-5-0228)</p>
|
<p style="word-break: break-word;">KOPERASI PERMODALAN KELANTAN BERHAD (D-5-0228)</p>
|
||||||
<p>{{ $cawangan_detail['namacaw'] }}</p>
|
<p>{{ $cawangan_detail['namacaw'] }}</p>
|
||||||
<p style="text-wrap:nowrap">{{ $cawangan_detail['alamat1'] }}</p>
|
<p style="text-wrap:nowrap">{{ $cawangan_detail['alamat1'] }}</p>
|
||||||
<p>{{ $cawangan_detail['alamat2'] }}</p>
|
<p>{{ $cawangan_detail['alamat2'] }}</p>
|
||||||
@@ -104,11 +121,24 @@
|
|||||||
<img src="{{ asset('img/ARRAHN1.png') }}" style="width:50px; margin:0 5px" alt="User Image" class="center">
|
<img src="{{ asset('img/ARRAHN1.png') }}" style="width:50px; margin:0 5px" alt="User Image" class="center">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="nosiri" style="text-align:right">
|
<div id="nosiri" style="text-align:left">
|
||||||
<b><div class="arial-sans-serif f-10">Tarikh Cetak: {{$tarikh_cetak}}</div>
|
<div style="margin-left: 15px;">
|
||||||
<br>
|
@php
|
||||||
<div class="arial-sans-serif f-10">No Siri: {{$nosiri}}</div></b>
|
echo '<img src="data:image/png;base64,' .
|
||||||
|
DNS1D::getBarcodePNG($gadai_details['norujukan'], 'C128', 1, 30) .
|
||||||
|
'" alt="barcode" />';
|
||||||
|
@endphp
|
||||||
|
</div>
|
||||||
|
<!-- <div class="arial-sans-serif f-10">Tarikh Cetak: {{$tarikh_cetak}}</div> -->
|
||||||
|
<div style="display: flex; align-items: center; margin-left: 14px;">
|
||||||
|
<div class="arial-sans-serif f-10">Tarikh Cetak: {{$tarikh_cetak}}</div>
|
||||||
|
</div>
|
||||||
|
<div style="display: flex; align-items: center; margin-left: 15px;">
|
||||||
|
<div class="arial-sans-serif f-10">No Siri: {{$nosiri}}</div>
|
||||||
|
</div>
|
||||||
|
<div style="display: flex; align-items: center; margin-left: 15px;">
|
||||||
|
<div class="arial-sans-serif f-10">Cetakan: arOS V2</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -159,7 +189,9 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<input type="checkbox"><strong>Penyelesaian Penuh</strong>
|
<!-- <input type="checkbox"><strong>Penyelesaian Penuh</strong> -->
|
||||||
|
<input type="checkbox" id="agree-box" class="custom-box"><strong>Penyelesaian Penuh</strong>
|
||||||
|
<input type="checkbox" id="agree-box" class="custom-box"><strong>Penyelesaian Penuh dan Permohonan Pembiayaan Baru</strong>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -264,11 +296,10 @@
|
|||||||
|
|
||||||
<div id="note"><b>
|
<div id="note"><b>
|
||||||
<p>*Penting:</p>
|
<p>*Penting:</p>
|
||||||
<p> a) Sila lampirkan bersama:</p>
|
<p> a) Sila lampirkan bersama:</p>
|
||||||
<p> i. Salinan kad pengenalan diri pelanggan dan kad pengenalan diri wakil yang dilantik.
|
<p> i. Salinan kad pengenalan diri pelanggan dan kad pengenalan diri wakil yang dilantik.</p>
|
||||||
</p>
|
|
||||||
<p> ii. SAG asal pelanggan</p>
|
<p> ii. SAG asal pelanggan</p>
|
||||||
<p> b) Pastikan tandatangan pelanggan adalah sama dengan tandatangan di Surat Akuan Gadai.</p>
|
<p> b) Pastikan tandatangan pelanggan di dalam Surat Perlantikan Wakil ini adalah sama dengan tandatangan di Surat Akuan Gadai.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -110,6 +110,7 @@ Route::post('/createwakil',['as'=>'wakil.create','uses'=>'PenebusanController@cr
|
|||||||
Route::get('/firstwakil',['as'=>'wakil.first','uses'=>'PenebusanController@getfirstWakil'])->middleware('auth','teller');
|
Route::get('/firstwakil',['as'=>'wakil.first','uses'=>'PenebusanController@getfirstWakil'])->middleware('auth','teller');
|
||||||
Route::get('/history',['as'=>'gadai.history','uses'=>'GadaianController@history'])->middleware('auth','teller');
|
Route::get('/history',['as'=>'gadai.history','uses'=>'GadaianController@history'])->middleware('auth','teller');
|
||||||
Route::get('/history/khazanah',['as'=>'gadai.history.khazanah','uses'=>'GadaianController@history'])->middleware('auth','khazanah');
|
Route::get('/history/khazanah',['as'=>'gadai.history.khazanah','uses'=>'GadaianController@history'])->middleware('auth','khazanah');
|
||||||
|
Route::post('/customer/assign-anggota', ['as' => 'customer.assignAnggota','uses' => 'CustomersController@assignAnggota'])->middleware('auth', 'teller');
|
||||||
|
|
||||||
//Kemaskini Upah
|
//Kemaskini Upah
|
||||||
Route::get('/kemaskiniupah',['as'=>'kemaskini.upah','uses'=>'AliranTunaiController@kemaskiniupah'])->middleware('auth','teller');
|
Route::get('/kemaskiniupah',['as'=>'kemaskini.upah','uses'=>'AliranTunaiController@kemaskiniupah'])->middleware('auth','teller');
|
||||||
@@ -161,6 +162,8 @@ Route::post('/permohonan/simpan',['as'=>'permohonan.simpan','uses' => 'KhazanahC
|
|||||||
Route::get('/permohonan/status/{mohonid}',['as'=>'permohonan.status','uses' => 'KhazanahController@StatusPermohonan'])->middleware('auth','khazanah');
|
Route::get('/permohonan/status/{mohonid}',['as'=>'permohonan.status','uses' => 'KhazanahController@StatusPermohonan'])->middleware('auth','khazanah');
|
||||||
Route::post('/permohonan/cit',['as'=>'permohonan.cit','uses' => 'KhazanahController@CITPermohonan'])->middleware('auth','khazanah');
|
Route::post('/permohonan/cit',['as'=>'permohonan.cit','uses' => 'KhazanahController@CITPermohonan'])->middleware('auth','khazanah');
|
||||||
Route::post('/permohonan/download',['as'=>'permohonan.download','uses' => 'KhazanahController@DownloadFiles'])->middleware('auth','khazanah');
|
Route::post('/permohonan/download',['as'=>'permohonan.download','uses' => 'KhazanahController@DownloadFiles'])->middleware('auth','khazanah');
|
||||||
|
Route::post('/khazanah/autoserahan',['as'=>'khazanah.autoserahan','uses'=>'KhazanahController@AutoSerahan'])->middleware('auth','khazanah');
|
||||||
|
|
||||||
|
|
||||||
Route::post('/kakitangan/harian',['as'=>'kakitangan.harian','uses'=>'KakitanganController@kakitanganHarian'])->middleware('auth','khazanah');
|
Route::post('/kakitangan/harian',['as'=>'kakitangan.harian','uses'=>'KakitanganController@kakitanganHarian'])->middleware('auth','khazanah');
|
||||||
Route::get('/lelong',['as'=>'lelong','uses'=>'LelongController@lelong']);
|
Route::get('/lelong',['as'=>'lelong','uses'=>'LelongController@lelong']);
|
||||||
@@ -201,6 +204,8 @@ Route::post('/deletependahuluanserahan',['as'=>'khazanah.deletependser','uses'=>
|
|||||||
//Ubah dan Hapus
|
//Ubah dan Hapus
|
||||||
Route::get('/getkelulu',['as'=>'teller.getkelulusan','uses'=>'GadaianController@getkelulusan'])->middleware('auth','teller');
|
Route::get('/getkelulu',['as'=>'teller.getkelulusan','uses'=>'GadaianController@getkelulusan'])->middleware('auth','teller');
|
||||||
Route::post('/createkelulu',['as'=>'teller.createkelulusan','uses'=>'GadaianController@createkelulusan'])->middleware('auth');
|
Route::post('/createkelulu',['as'=>'teller.createkelulusan','uses'=>'GadaianController@createkelulusan'])->middleware('auth');
|
||||||
|
Route::post('/createkeluluanggota',['as'=>'teller.createkelulusan-anggota','uses'=>'GadaianController@createkelulusanAnggota'])->middleware('auth');
|
||||||
|
|
||||||
Route::put('/updatekelulu',['as'=>'teller.updatekelulusan','uses'=>'GadaianController@updatekelulusan'])->middleware('auth','khazanah');
|
Route::put('/updatekelulu',['as'=>'teller.updatekelulusan','uses'=>'GadaianController@updatekelulusan'])->middleware('auth','khazanah');
|
||||||
|
|
||||||
|
|
||||||
@@ -332,9 +337,12 @@ Route::post('/barcodescanned',['as'=>'barcode.scanned','uses'=>'KhazanahControll
|
|||||||
|
|
||||||
//Operasi
|
//Operasi
|
||||||
Route::get('/operasi/kelulusan','OperasiController@kelulusan')->name('operasi.kelulusan')->middleware('auth','operasi');
|
Route::get('/operasi/kelulusan','OperasiController@kelulusan')->name('operasi.kelulusan')->middleware('auth','operasi');
|
||||||
|
Route::get('/operasi/kelulusan/anggota','OperasiController@kelulusanAnggota')->name('operasi.kelulusananggota')->middleware('auth','operasi');
|
||||||
Route::post('/operasi/createkelulusan',['as'=>'operasi.createkelulusan','uses'=>'OperasiController@createkelulusan'])->middleware('auth','teller');
|
Route::post('/operasi/createkelulusan',['as'=>'operasi.createkelulusan','uses'=>'OperasiController@createkelulusan'])->middleware('auth','teller');
|
||||||
|
Route::post('/operasi/createkelulusan-anggota',['as'=>'operasi.createkelulusan-anggota','uses'=>'OperasiController@createkelulusanAnggota'])->middleware('auth','teller');
|
||||||
Route::get('/operasi/getkelulusan',['as'=>'operasi.getkelulusan','uses'=>'OperasiController@getkelulusan'])->middleware('auth','teller');
|
Route::get('/operasi/getkelulusan',['as'=>'operasi.getkelulusan','uses'=>'OperasiController@getkelulusan'])->middleware('auth','teller');
|
||||||
Route::put('/operasi/updatekelulusan',['as'=>'operasi.updatekelulusan','uses'=>'OperasiController@updatekelulusan'])->middleware('auth','operasi');
|
Route::put('/operasi/updatekelulusan',['as'=>'operasi.updatekelulusan','uses'=>'OperasiController@updatekelulusan'])->middleware('auth','operasi');
|
||||||
|
Route::put('/operasi/updatekelulusananggota',['as'=>'operasi.updatekelulusananggota','uses'=>'OperasiController@updatekelulusananggota'])->middleware('auth','operasi');
|
||||||
Route::get('/operasi/parameter','OperasiController@parameter')->name('parameter')->middleware('auth','operasi');
|
Route::get('/operasi/parameter','OperasiController@parameter')->name('parameter')->middleware('auth','operasi');
|
||||||
Route::get('/operasi/hargaemas',['as'=>'operasi.hargaemas','uses'=>'OperasiController@hargaemas'])->middleware('auth','operasi');
|
Route::get('/operasi/hargaemas',['as'=>'operasi.hargaemas','uses'=>'OperasiController@hargaemas'])->middleware('auth','operasi');
|
||||||
Route::post('/operasi/hargaemas/update',['as'=>'hargaemas.update','uses'=>'OperasiController@updatehargaemas'])->middleware('auth','operasi');
|
Route::post('/operasi/hargaemas/update',['as'=>'hargaemas.update','uses'=>'OperasiController@updatehargaemas'])->middleware('auth','operasi');
|
||||||
@@ -435,6 +443,15 @@ Route::get('/kemaskininotisperingatankedua/{notisid}',['as'=>'arcc.kemaskininoti
|
|||||||
Route::get('/kemaskininotisperingatanbycaw/{kodcaw}/{notisid}',['as'=>'arcc.kemaskininotisperingatanbycaw','uses'=>'CallCenterController@kemaskininotisperingatanbycaw'])->middleware('auth','callcenter');
|
Route::get('/kemaskininotisperingatanbycaw/{kodcaw}/{notisid}',['as'=>'arcc.kemaskininotisperingatanbycaw','uses'=>'CallCenterController@kemaskininotisperingatanbycaw'])->middleware('auth','callcenter');
|
||||||
Route::get('/kemaskininotisperingatankeduabycaw/{kodcaw}/{notisid}',['as'=>'arcc.kemaskininotisperingatankeduabycaw','uses'=>'CallCenterController@kemaskininotisperingatankeduabycaw'])->middleware('auth','callcenter');
|
Route::get('/kemaskininotisperingatankeduabycaw/{kodcaw}/{notisid}',['as'=>'arcc.kemaskininotisperingatankeduabycaw','uses'=>'CallCenterController@kemaskininotisperingatankeduabycaw'])->middleware('auth','callcenter');
|
||||||
Route::get('/arcc/tanyaupah/{norujukan}',['as'=>'tanyaupah','uses' => 'CallCenterController@tanyaupah'])->middleware('auth','callcenter');
|
Route::get('/arcc/tanyaupah/{norujukan}',['as'=>'tanyaupah','uses' => 'CallCenterController@tanyaupah'])->middleware('auth','callcenter');
|
||||||
|
Route::get('/pilihpelanggan',['as'=>'arcc.pilihpelanggan','uses' => 'CallCenterController@pilihPelanggan'])->middleware('auth','callcenter');
|
||||||
|
Route::post('/pilihpelanggan/proceed', ['as'=>'arcc.pilihpelanggan.proceed','uses' => 'CallCenterController@pilihPelangganProceed'])->middleware('auth','callcenter');
|
||||||
|
Route::get('/ajax/search-customer',['as'=>'arcc.ajaxSearchCustomer','uses' => 'CallCenterController@ajaxSearchCustomer'])->middleware('auth','callcenter');
|
||||||
|
Route::get('/arcc/cariannama',['as'=>'arcc.cariannama','uses'=>'CallCenterController@cariannama'])->middleware('auth','callcenter');
|
||||||
|
Route::get('/pilihpelanggannama',['as'=>'arcc.pilihpelanggannama','uses' => 'CallCenterController@pilihpelanggannama'])->middleware('auth','callcenter');
|
||||||
|
Route::post('/pilihpelanggannamacaw', ['as'=>'arcc.pilihpelanggannamacaw','uses' => 'CallCenterController@pilihPelanggannamacaw'])->middleware('auth','callcenter');
|
||||||
|
Route::get('/arcc/pelanggannew',['as'=>'arcc.pelanggannew','uses'=>'CallCenterController@pelanggannew'])->middleware('auth','callcenter');
|
||||||
|
Route::get('/arcc/searchpelanggannama',['as'=>'arcc.searchpelanggannama','uses'=>'CallCenterController@searchnama'])->middleware('auth','callcenter');
|
||||||
|
Route::get('/arcc/customer_info_nama',['as'=>'arcc.customer_info_nama','uses'=>'CallCenterController@infonama'])->middleware('auth','callcenter');
|
||||||
|
|
||||||
//taraf pc atau ppc
|
//taraf pc atau ppc
|
||||||
Route::get('/cawangan/notisperingatan',['as'=>'laporan.notisperingatan','uses'=>'KhazanahController@notisperingatan'])->middleware('auth','khazanah');
|
Route::get('/cawangan/notisperingatan',['as'=>'laporan.notisperingatan','uses'=>'KhazanahController@notisperingatan'])->middleware('auth','khazanah');
|
||||||
|
|||||||
Reference in New Issue
Block a user