Experiment/merge annur (#20)
Build Docker Image / build-frontend (push) Successful in 55s

Co-authored-by: ISMAIL MASSERAN <topaz@Mac.dlinkrouter.local>
Reviewed-on: #20
This commit was merged in pull request #20.
This commit is contained in:
2026-09-20 12:49:39 +08:00
parent 8a2bae7a88
commit 918502b504
30 changed files with 1011 additions and 190 deletions
+50
View File
@@ -0,0 +1,50 @@
APP_NAME=Laravel
APP_ENV=production
APP_KEY=base64:FFRogE6mJj8FaDSSHl/KpXpzqi2M+P4plxVSRgVM8JI=
APP_DEBUG=false
APP_URL=https://annurv2.erahn.com.my
API_URL=https://apiannurv2.erahn.com.my
API_ARRAHNBID=http://lelong.test/api/
LOG_CHANNEL=stack
DB_CONNECTION=mysql
DB_HOST=192.168.1.216
DB_PORT=3306
DB_DATABASE=kaunter_annur
DB_USERNAME=spider
DB_PASSWORD=arrahn@123
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
+50
View File
@@ -0,0 +1,50 @@
APP_NAME=Laravel
APP_ENV=production
APP_VERSION=v3.3
APP_KEY=base64:WRTHcFTq5YARKVdA8YDUzsh9Ue8vD63ivgZgXNNBiGo=
APP_DEBUG=false
APP_URL=https://ujrah.erahn.com.my
API_URL=https://apiujrah.erahn.com.my
LOG_CHANNEL=stack
DB_CONNECTION=mysql
DB_HOST=192.168.1.216
DB_PORT=3306
DB_DATABASE=kaunter_erahn
DB_USERNAME=spider
DB_PASSWORD=arrahn@123
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=17321
MYKAD_READER_ENABLED_CAWANGAN='' # IF NO CAWANGAN STATED, ALL CAWANGAN IS ENABLED
@@ -23,9 +23,10 @@ class AdminFeatureController extends Controller
$metaRes = $this->api()->get($api_url . '/api/features'); $metaRes = $this->api()->get($api_url . '/api/features');
$meta = $metaRes->successful() ? $metaRes->json() : []; $meta = $metaRes->successful() ? $metaRes->json() : [];
$keys = is_array($meta) && !empty($meta['keys']) ? $meta['keys'] : ['pembiayaan_online']; $keys = is_array($meta) && !empty($meta['keys']) ? $meta['keys'] : ['pembiayaan_online', 'rebet_annur'];
$labels = is_array($meta) && !empty($meta['labels']) ? $meta['labels'] : [ $labels = is_array($meta) && !empty($meta['labels']) ? $meta['labels'] : [
'pembiayaan_online' => 'Pembiayaan Online', 'pembiayaan_online' => 'Pembiayaan Online',
'rebet_annur' => 'Rebet / diskaun Annur',
]; ];
$listRes = $this->api()->get($api_url . '/api/features/cawangan'); $listRes = $this->api()->get($api_url . '/api/features/cawangan');
+22 -2
View File
@@ -32,14 +32,30 @@ class GadaianController extends Controller
$this->AliranTunaiController = new AliranTunaiController(); $this->AliranTunaiController = new AliranTunaiController();
} }
protected function isPembiayaanOnlineEnabled($kodcaw) protected function isFeatureEnabled($kodcaw, $feature)
{ {
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')]) $cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])
->get(config('api.url') . '/api/cawangan/' . $kodcaw) ->get(config('api.url') . '/api/cawangan/' . $kodcaw)
->json(); ->json();
$features = is_array($cawangan_info) ? ($cawangan_info['features'] ?? []) : []; $features = is_array($cawangan_info) ? ($cawangan_info['features'] ?? []) : [];
return !empty($features['pembiayaan_online']); return !empty($features[$feature]);
}
protected function isPembiayaanOnlineEnabled($kodcaw)
{
return $this->isFeatureEnabled($kodcaw, 'pembiayaan_online');
}
protected function parseMoney($value)
{
if ($value === null || $value === '') {
return 0.0;
}
$cleaned = preg_replace('/[^0-9.\-]/', '', str_replace([',', '%', ' '], '', (string) $value));
return is_numeric($cleaned) ? (float) $cleaned : 0.0;
} }
public function index(Request $request) public function index(Request $request)
@@ -211,6 +227,8 @@ class GadaianController extends Controller
'onepercent' => $onepercent, 'onepercent' => $onepercent,
'margin_semasa' => $margin_pinjaman, 'margin_semasa' => $margin_pinjaman,
'nokp' => $request->nokp, 'nokp' => $request->nokp,
'kadar_rebate' => $this->parseMoney($request->kadar_rebate),
'rebate' => $this->parseMoney($request->rebate),
])->json(); ])->json();
@@ -423,6 +441,8 @@ class GadaianController extends Controller
'ujrah' => $ujrah, 'ujrah' => $ujrah,
'onepercent' => $onepercent, 'onepercent' => $onepercent,
'margin_semasa' => $margin_pinjaman, 'margin_semasa' => $margin_pinjaman,
'kadar_rebate' => $this->parseMoney($request->kadar_rebate),
'rebate' => $this->parseMoney($request->rebate),
])->json(); ])->json();
$update_komuditi = Http::withOptions(['verify' => config('app.api_verify')])->put(config('api.url') . '/api/komuditi/update', [ $update_komuditi = Http::withOptions(['verify' => config('app.api_verify')])->put(config('api.url') . '/api/komuditi/update', [
'unit_komuditi' => round($request->pinjaman, 2), 'unit_komuditi' => round($request->pinjaman, 2),
+15 -2
View File
@@ -2473,6 +2473,14 @@ class KhazanahController extends Controller
$hapuskira = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/CalculationHapusKira/' . $auth_user['cawangan'],['tarikh' => $tarikh_imbangan2])->json(); $hapuskira = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/CalculationHapusKira/' . $auth_user['cawangan'],['tarikh' => $tarikh_imbangan2])->json();
$xtra = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/Xtra/' . $auth_user['cawangan'],['tarikh' => $tarikh_imbangan2])->json(); $xtra = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/Xtra/' . $auth_user['cawangan'],['tarikh' => $tarikh_imbangan2])->json();
$rebetAnnur = !empty(($cawangan_info['features'] ?? [])['rebet_annur']);
$rebetpromo = 0;
$pelarasanrebate = 0;
if ($rebetAnnur) {
$rebetpromo = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/RebetPromoCalculation/' . $auth_user['cawangan'],['tarikh' => $tarikh_imbangan2])->json();
$pelarasanrebate = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/PelarasanRebate/' . $auth_user['cawangan'],['tarikh' => $tarikh_imbangan2])->json();
}
//TunaiDitangan Sementara Upah //TunaiDitangan Sementara Upah
if($tarikh_imbangan2 >= '2021-04-22' && $tarikh_imbangan2 < '2021-05-05') if($tarikh_imbangan2 >= '2021-04-22' && $tarikh_imbangan2 < '2021-05-05')
@@ -2523,6 +2531,7 @@ class KhazanahController extends Controller
if($imbangduga['pindahkekpkb'] > 0) array_push($hartasemasa,['glcode' => '1000/090','descpt' => 'Pindah Ke KPKB(IP)', 'amaun' => $imbangduga['pindahkekpkb']]); if($imbangduga['pindahkekpkb'] > 0) array_push($hartasemasa,['glcode' => '1000/090','descpt' => 'Pindah Ke KPKB(IP)', 'amaun' => $imbangduga['pindahkekpkb']]);
if($peruntukanhapuskira > 0) array_push($hartasemasa,['glcode' => '1000/015','descpt' => 'Peruntukan Hapus Kira', 'amaun' => $peruntukanhapuskira]); if($peruntukanhapuskira > 0) array_push($hartasemasa,['glcode' => '1000/015','descpt' => 'Peruntukan Hapus Kira', 'amaun' => $peruntukanhapuskira]);
if($belian1stop > 0) array_push($hartasemasa,['glcode' => '8000/501','descpt' => 'Belian 1 Stop', 'amaun' => $belian1stop]); if($belian1stop > 0) array_push($hartasemasa,['glcode' => '8000/501','descpt' => 'Belian 1 Stop', 'amaun' => $belian1stop]);
if($rebetpromo > 0) array_push($hartasemasa,['glcode' => '5000/242','descpt' => 'Diskaun Promosi', 'amaun' => ($rebetpromo * -1)]);
$totalhartasemasa = 0; $totalhartasemasa = 0;
foreach($hartasemasa as $index => $hs) foreach($hartasemasa as $index => $hs)
@@ -2554,6 +2563,8 @@ class KhazanahController extends Controller
if($utgterkumpulxtra > 0) array_push($tanggungansemasa,['glcode' => '7000/201','descpt' => 'Untung/Rugi Terkumpul Xtra','amaun' => $utgterkumpulxtra]); if($utgterkumpulxtra > 0) array_push($tanggungansemasa,['glcode' => '7000/201','descpt' => 'Untung/Rugi Terkumpul Xtra','amaun' => $utgterkumpulxtra]);
if($jualan1stop > 0) array_push($tanggungansemasa,['glcode' => '9000/501','descpt' => 'Jualan 1 Stop','amaun' => $jualan1stop]); if($jualan1stop > 0) array_push($tanggungansemasa,['glcode' => '9000/501','descpt' => 'Jualan 1 Stop','amaun' => $jualan1stop]);
if($hapuskira > 0) array_push($tanggungansemasa,['glcode' => '3000/011','descpt' => 'Hapus Kira','amaun' => -$hapuskira]); if($hapuskira > 0) array_push($tanggungansemasa,['glcode' => '3000/011','descpt' => 'Hapus Kira','amaun' => -$hapuskira]);
if($rebetpromo > 0) array_push($tanggungansemasa,['glcode' => '5000/242','descpt' => 'Diskaun Promosi', 'amaun' => ($rebetpromo * -1)]);
if($pelarasanrebate > 0) array_push($tanggungansemasa,['glcode' => '5000/243','descpt' => 'Pelarasan Rebate', 'amaun' => ($pelarasanrebate * -1)]);
$totaltanggungansemasa = 0; $totaltanggungansemasa = 0;
foreach($tanggungansemasa as $index => $ts) foreach($tanggungansemasa as $index => $ts)
@@ -4031,8 +4042,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];
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/' . $auth_user['cawangan'])->json();
return view('print.laporan_gadaian_ujrah', compact('gadai','cawangan_detail','tarikh_cetak','mula_date','api_url','hingga_date','statistik','reportPembiayaan','reportLoanAmount','reportMarhunValue','reportMarhunMargin','reportCustomerJob','reportCustomerRace','reportCustomerRace')); return view('print.laporan_gadaian_ujrah', compact('gadai','cawangan_detail','cawangan_info','tarikh_cetak','mula_date','api_url','hingga_date','statistik','reportPembiayaan','reportLoanAmount','reportMarhunValue','reportMarhunMargin','reportCustomerJob','reportCustomerRace','reportCustomerRace'));
} }
@@ -4075,7 +4087,8 @@ 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_tebus_ujrah', compact('tebus','cawangan_detail','tarikh_cetak','mula_date','hingga_date','tebuspengasingan','api_url','upahlama','ansuran','totalkeuntunganrebet')); $cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
return view('print.laporan_tebus_ujrah', compact('tebus','cawangan_detail','cawangan_info','tarikh_cetak','mula_date','hingga_date','tebuspengasingan','api_url','upahlama','ansuran','totalkeuntunganrebet'));
} }
public function laporanAnsuranUjrah(){ public function laporanAnsuranUjrah(){
@@ -115,6 +115,19 @@ class PembiayaanOnlineController extends Controller
'update_customer_bank' => true, 'update_customer_bank' => true,
]; ];
if ($request->hasFile('bukti_akaun')) {
$file = $request->file('bukti_akaun');
if (!$file->isValid()) {
return redirect()->back()->with('error', 'Fail slip bank tidak sah.');
}
if ($file->getSize() > 4 * 1024 * 1024) {
return redirect()->back()->with('error', 'Saiz fail maksimum 4MB.');
}
$payload['bukti_akaun_data'] = base64_encode(file_get_contents($file->getRealPath()));
$payload['bukti_akaun_filename'] = $file->getClientOriginalName();
$payload['bukti_akaun_type'] = $file->getMimeType() ?: 'application/octet-stream';
}
$res = $this->api() $res = $this->api()
->asForm() ->asForm()
->put($api_url . '/api/pembiayaan-online/' . $kodcaw . '/lines/' . $id, $payload); ->put($api_url . '/api/pembiayaan-online/' . $kodcaw . '/lines/' . $id, $payload);
@@ -125,7 +138,55 @@ class PembiayaanOnlineController extends Controller
return redirect()->back()->with('error', $msg); return redirect()->back()->with('error', $msg);
} }
return redirect()->route('pembiayaan.online.pc')->with('message', 'Rekod dikemaskini.'); return redirect()->route('pembiayaan.online.pc')
->with('message', 'Rekod dikemaskini. Sila semak semula sebelum hantar ke Operasi.');
}
/**
* PC verifies one queue line before it can be submitted to Operasi.
*/
public function verifyLine(Request $request, $id)
{
$this->abortUnlessPembiayaanOnline();
$kodcaw = $this->kodcaw();
$api_url = config('api.url');
$auth_user = Auth::user();
$res = $this->api()
->asForm()
->post($api_url . '/api/pembiayaan-online/' . $kodcaw . '/lines/' . $id . '/verify', [
'pc_verified_by' => $auth_user['name'],
]);
if (!$res->successful()) {
$body = $res->json();
$msg = is_array($body) && isset($body['message']) ? $body['message'] : 'Gagal semak rekod.';
return redirect()->back()->with('error', $msg);
}
return redirect()->route('pembiayaan.online.pc')->with('message', 'Rekod disahkan. Boleh dipilih untuk hantar ke Operasi.');
}
/**
* Undo PC verification on a queue line.
*/
public function unverifyLine(Request $request, $id)
{
$this->abortUnlessPembiayaanOnline();
$kodcaw = $this->kodcaw();
$api_url = config('api.url');
$res = $this->api()
->asForm()
->post($api_url . '/api/pembiayaan-online/' . $kodcaw . '/lines/' . $id . '/unverify');
if (!$res->successful()) {
$body = $res->json();
$msg = is_array($body) && isset($body['message']) ? $body['message'] : 'Gagal batal semakan.';
return redirect()->back()->with('error', $msg);
}
return redirect()->route('pembiayaan.online.pc')->with('message', 'Semakan dibatalkan. Sila semak semula sebelum hantar.');
} }
/** /**
@@ -259,17 +320,87 @@ class PembiayaanOnlineController extends Controller
return redirect()->back()->with('error', 'Fail bukti kosong.'); return redirect()->back()->with('error', 'Fail bukti kosong.');
} }
$raw = $bukti['data']; return $this->streamBase64File($bukti, 'bukti-' . $id);
}
/**
* PC: view uploaded customer bank slip.
*/
public function viewBuktiAkaun($id)
{
$this->abortUnlessPembiayaanOnline();
$kodcaw = $this->kodcaw();
$res = $this->api()
->get(config('api.url') . '/api/pembiayaan-online/' . $kodcaw . '/lines/' . $id . '/bukti-akaun');
if (!$res->successful()) {
$body = $res->json();
$msg = is_array($body) && isset($body['message']) ? $body['message'] : 'Slip bank tidak dijumpai.';
return redirect()->back()->with('error', $msg);
}
$payload = $res->json();
$file = $payload['file'] ?? null;
if (!$file || empty($file['data'])) {
return redirect()->back()->with('error', 'Fail slip bank kosong.');
}
return $this->streamBase64File($file, 'slip-bank-' . $id);
}
/**
* PC: view SAG for a queue line (does not mark SAG as printed).
*/
public function viewSag($id)
{
$this->abortUnlessPembiayaanOnline();
return $this->renderLineSag($this->kodcaw(), $id);
}
/**
* Operasi: view uploaded customer bank slip.
*/
public function operasiViewBuktiAkaun($kodcaw, $id)
{
$res = $this->api()
->get(config('api.url') . '/api/pembiayaan-online/' . $kodcaw . '/lines/' . $id . '/bukti-akaun');
if (!$res->successful()) {
$body = $res->json();
$msg = is_array($body) && isset($body['message']) ? $body['message'] : 'Slip bank tidak dijumpai.';
return redirect()->back()->with('error', $msg);
}
$payload = $res->json();
$file = $payload['file'] ?? null;
if (!$file || empty($file['data'])) {
return redirect()->back()->with('error', 'Fail slip bank kosong.');
}
return $this->streamBase64File($file, 'slip-bank-' . $id);
}
/**
* Operasi: view SAG for a batch line.
*/
public function operasiViewSag($kodcaw, $id)
{
return $this->renderLineSag($kodcaw, $id);
}
protected function streamBase64File(array $file, $fallbackName)
{
$raw = $file['data'];
if (strpos($raw, 'base64,') !== false) { if (strpos($raw, 'base64,') !== false) {
$raw = substr($raw, strpos($raw, 'base64,') + 7); $raw = substr($raw, strpos($raw, 'base64,') + 7);
} }
$binary = base64_decode($raw, true); $binary = base64_decode($raw, true);
if ($binary === false) { if ($binary === false) {
$binary = base64_decode($bukti['data']); $binary = base64_decode($file['data']);
} }
$type = $bukti['type'] ?? 'application/octet-stream'; $type = $file['type'] ?? 'application/octet-stream';
$filename = $bukti['filename'] ?? ('bukti-' . $id); $filename = $file['filename'] ?? $fallbackName;
return response($binary, 200, [ return response($binary, 200, [
'Content-Type' => $type, 'Content-Type' => $type,
@@ -277,6 +408,115 @@ class PembiayaanOnlineController extends Controller
]); ]);
} }
protected function renderLineSag($kodcaw, $id)
{
$api_url = config('api.url');
$res = $this->api()->get($api_url . '/api/pembiayaan-online/' . $kodcaw . '/lines/' . $id);
if (!$res->successful()) {
$body = $res->json();
$msg = is_array($body) && isset($body['message']) ? $body['message'] : 'Rekod tidak dijumpai.';
return redirect()->back()->with('error', $msg);
}
$line = $res->json();
$norujukan = is_array($line) ? trim((string) ($line['norujukan'] ?? '')) : '';
if ($norujukan === '') {
return redirect()->back()->with('error', 'No. SAG tidak dijumpai.');
}
return $this->renderSagByNorujukan($kodcaw, $norujukan);
}
protected function renderSagByNorujukan($kodcaw, $norujukan)
{
$api_url = config('api.url');
$auth_user = Auth::user();
$auth_username = $auth_user['name'] ?? '';
$gadai = $this->api()
->get($api_url . '/api/gadai/norujukan/' . $kodcaw . '/' . $norujukan)
->json();
$gadai_detail = is_array($gadai) ? ($gadai[0] ?? null) : null;
if (!is_array($gadai_detail) || empty($gadai_detail['norujukan'])) {
return redirect()->back()->with('error', 'SAG tidak dijumpai.');
}
$kakitangan = \App\User::where([['role_harian', 'khazanah'], ['cawangan', $kodcaw]])->first();
$customer = $this->api()
->get($api_url . '/api/customers/' . ($gadai_detail['nokp'] ?? ''))
->json();
$customer_detail = is_array($customer) ? $customer : [];
$marhun = $this->api()
->get($api_url . '/api/marhun/' . $norujukan)
->json();
$marhun_detail = is_array($marhun) ? ($marhun[0] ?? []) : [];
if (!is_array($marhun_detail)) {
$marhun_detail = [];
}
$mutu = $this->api()
->get($api_url . '/api/marhun/mutu/sag', [
'kodcaw' => $kodcaw,
'norujukan' => $norujukan,
])
->json();
$cawangan = $this->api()
->get($api_url . '/api/cawangan/detail/' . $kodcaw)
->json();
$cawangan_detail = is_array($cawangan) ? ($cawangan[0] ?? []) : [];
$kadar_ujrah = $this->api()
->get($api_url . '/api/kadarujrah/by_group_id/', [
'kodcaw' => $cawangan_detail['kodcaw'] ?? $kodcaw,
])
->json();
$pembayaran_segera = 'https://pay.arrahn.com.my';
$komoditi = $this->api()->get($api_url . '/api/komuditi/check')->json();
$product = $this->api()
->get($api_url . '/api/komuditi/description', [
'kodproduk' => is_array($komoditi) ? ($komoditi['kodproduct'] ?? '') : '',
])
->json();
$nilai = is_array($komoditi) ? (float) ($komoditi['nilai'] ?? 0) : 0;
$kuantiti = $nilai > 0 ? ((float) ($gadai_detail['pinjaman'] ?? 0) / $nilai) : 0;
if (($gadai_detail['tagbaru'] ?? 0) == 1) {
return view('print.sag_ujrah_3', compact(
'komoditi',
'product',
'kuantiti',
'gadai_detail',
'customer_detail',
'marhun_detail',
'cawangan_detail',
'api_url',
'pembayaran_segera',
'auth_username',
'mutu',
'kadar_ujrah',
'kakitangan'
));
}
return view('print.sag', compact(
'gadai_detail',
'customer_detail',
'marhun_detail',
'cawangan_detail',
'api_url',
'pembayaran_segera',
'auth_username',
'mutu',
'kakitangan'
));
}
/** /**
* PC: tanda rekod PAID sebagai selesai semak / blast. * PC: tanda rekod PAID sebagai selesai semak / blast.
*/ */
+1 -1
View File
@@ -412,7 +412,7 @@
</div> </div>
<script> <script>
var api_arrahnbid = "<?php echo config('app.api_arrahnbid') ?>"; var api_arrahnbid = @json($cawangan_info['api_arrahnbid'] ?? config('app.api_arrahnbid'));
var api_url = "{{ api_url_for_browser() }}"; var api_url = "{{ api_url_for_browser() }}";
var kodcaw = "{{ $cawangan_info['kodcaw'] }}"; var kodcaw = "{{ $cawangan_info['kodcaw'] }}";
var tagarrahnbid = "{{ $cawangan_info['tagarrahnbid'] }}"; var tagarrahnbid = "{{ $cawangan_info['tagarrahnbid'] }}";
+1 -1
View File
@@ -541,7 +541,7 @@
</div> </div>
<script> <script>
var api_arrahnbid = "<?php echo config('app.api_arrahnbid') ?>"; var api_arrahnbid = @json($cawangan_info['api_arrahnbid'] ?? config('app.api_arrahnbid'));
var api_url = "{{ api_url_for_browser() }}"; var api_url = "{{ api_url_for_browser() }}";
var kodcaw = "{{ $cawangan_info['kodcaw'] }}"; var kodcaw = "{{ $cawangan_info['kodcaw'] }}";
var tagarrahnbid = "{{ $cawangan_info['tagarrahnbid'] }}"; var tagarrahnbid = "{{ $cawangan_info['tagarrahnbid'] }}";
@@ -131,7 +131,8 @@
@endforeach @endforeach
</tr> </tr>
</thead> </thead>
<tbody></tbody> <tbody>
{{ $slot }} {{ $slot }}
</tbody>
</table> </table>
</div> </div>
+1 -1
View File
@@ -437,7 +437,7 @@
</div> </div>
<script> <script>
var api_arrahnbid = "<?php echo config('app.api_arrahnbid') ?>"; var api_arrahnbid = @json($cawangan_info['api_arrahnbid'] ?? config('app.api_arrahnbid'));
var api_url = "{{ api_url_for_browser() }}"; var api_url = "{{ api_url_for_browser() }}";
var kodcaw = "{{ $cawangan_info['kodcaw'] }}"; var kodcaw = "{{ $cawangan_info['kodcaw'] }}";
var tagarrahnbid = "{{ $cawangan_info['tagarrahnbid'] }}"; var tagarrahnbid = "{{ $cawangan_info['tagarrahnbid'] }}";
+20 -5
View File
@@ -390,14 +390,14 @@
<x-datatable <x-datatable
id="myTable" id="myTable"
filename="SAG_Baru" filename="SAG_Baru"
:columns="['Bil', 'No Rujukan', 'Tarikh Pembiayaan', 'Tarikh Matang', 'Baki Harga Jualan', 'Baki Pembiayaan', 'Margin', 'Tempoh', 'Keuntungan', 'Lelong', 'Borang Online']" :columns="['Bil', 'No Rujukan', 'Cara Terima', 'Tarikh Pembiayaan', 'Tarikh Matang', 'Baki Harga Jualan', 'Baki Pembiayaan', 'Margin', 'Tempoh', 'Keuntungan', 'Lelong', 'Borang Online']"
/> />
</div> </div>
<div class="tab-pane fade {{ $activate_pane_SAG_lama }}" id="nav-xtawarruq" role="tabpanel" aria-labelledby="nav-xtawarruq-tab"> <div class="tab-pane fade {{ $activate_pane_SAG_lama }}" id="nav-xtawarruq" role="tabpanel" aria-labelledby="nav-xtawarruq-tab">
<x-datatable <x-datatable
id="xtawarruq" id="xtawarruq"
filename="SAG_Lama" filename="SAG_Lama"
:columns="['Bil', 'No Rujukan', 'Tarikh Pembiayaan', 'Tarikh Matang', 'Baki Harga Jualan', 'Baki Pembiayaan', 'Margin', 'Tempoh', 'Keuntungan', 'Lelong', 'Borang Online']" :columns="['Bil', 'No Rujukan', 'Cara Terima', 'Tarikh Pembiayaan', 'Tarikh Matang', 'Baki Harga Jualan', 'Baki Pembiayaan', 'Margin', 'Tempoh', 'Keuntungan', 'Lelong', 'Borang Online']"
/> />
</div> </div>
</div> </div>
@@ -712,11 +712,12 @@
</div> </div>
<script> <script>
var api_arrahnbid = "<?php echo config('app.api_arrahnbid') ?>"; var api_arrahnbid = @json($cawangan_info['api_arrahnbid'] ?? config('app.api_arrahnbid'));
var api_url = "{{ api_url_for_browser() }}"; var api_url = "{{ api_url_for_browser() }}";
var kodcaw = "{{ $cawangan_info['kodcaw'] }}"; var kodcaw = "{{ $cawangan_info['kodcaw'] }}";
var tagarrahnbid = "{{ $cawangan_info['tagarrahnbid'] }}"; var tagarrahnbid = "{{ $cawangan_info['tagarrahnbid'] }}";
var min_komoditi = "{{ $min_komoditi }}"; var min_komoditi = "{{ $min_komoditi }}";
console.log('test api_arrahnbid: ', api_arrahnbid);
$('#daftar_gadai').on('click', function() { $('#daftar_gadai').on('click', function() {
$("#daftar_gadai").prop('disabled', true); $("#daftar_gadai").prop('disabled', true);
var noic = $('#noic').val(); var noic = $('#noic').val();
@@ -817,6 +818,10 @@
return '{{ url("/gadai/borang-pengesahan-online") }}/' + encodeURIComponent(norujukan); return '{{ url("/gadai/borang-pengesahan-online") }}/' + encodeURIComponent(norujukan);
} }
function formatCaraTerima(value) {
return String(value || 'TUNAI').toUpperCase() === 'ONLINE' ? 'Online' : 'Tunai';
}
function cetakBorangOnlineCell(gadai_detail) { function cetakBorangOnlineCell(gadai_detail) {
var cara = String(gadai_detail['cara_terima'] || '').toUpperCase(); var cara = String(gadai_detail['cara_terima'] || '').toUpperCase();
if (cara !== 'ONLINE') { if (cara !== 'ONLINE') {
@@ -1133,6 +1138,13 @@
text: 'Pembiayaan Sedang Dilelong..' text: 'Pembiayaan Sedang Dilelong..'
}); });
} }
},
error: function() {
Swal.fire({
icon: 'error',
title: 'Amaran',
text: 'Tidak dapat semak status lelong. Sila cuba semula.'
});
} }
}); });
@@ -1198,13 +1210,14 @@
let table_norujukan = gadai_detail["norujukan"]; let table_norujukan = gadai_detail["norujukan"];
if (gadai_detail["percentpinj"] != 0) if (gadai_detail["percentpinj"] != 0)
xtawarruq.row.add([ xtawarruq.row.add([
'<input type="radio" value=' + gadai_detail["norujukan"] + '<input type="radio" value="' + gadai_detail["norujukan"] +
' name="belum"/>', '" name="belum" data-cara-terima="' + (gadai_detail['cara_terima'] || '') + '"/>',
'<a href="#" onclick="checkserah(this)" data-pinjaman=' + '<a href="#" onclick="checkserah(this)" data-pinjaman=' +
gadai_detail['pinjaman'] + ' data-hargajualan=' + gadai_detail['pinjaman'] + ' data-hargajualan=' +
gadai_detail['hargajualan'] + ' data-norujukan=' + gadai_detail['hargajualan'] + ' data-norujukan=' +
gadai_detail['norujukan'] + ' data-url=' + urlroute + '>' + gadai_detail['norujukan'] + ' data-url=' + urlroute + '>' +
gadai_detail['norujukan'] + '</a>', gadai_detail['norujukan'] + '</a>',
formatCaraTerima(gadai_detail['cara_terima']),
gadai_detail['t_gadai'], gadai_detail['t_gadai'],
tarikh_matang, tarikh_matang,
'RM ' + formatter.format(gadai_detail['bakihargajualan']), 'RM ' + formatter.format(gadai_detail['bakihargajualan']),
@@ -1216,6 +1229,7 @@
'RM ' + formatter.format(upahsemasa), 'RM ' + formatter.format(upahsemasa),
'<div style="white-space: nowrap; color:red; font-weight: bolder">' + '<div style="white-space: nowrap; color:red; font-weight: bolder">' +
taglel + '</div>', taglel + '</div>',
cetakBorangOnlineCell(gadai_detail),
]).draw(); ]).draw();
} else { } else {
var taglel = ''; var taglel = '';
@@ -1256,6 +1270,7 @@
gadai_detail['hargajualan'] + ' data-norujukan=' + gadai_detail['hargajualan'] + ' data-norujukan=' +
gadai_detail['norujukan'] + ' data-url=' + urlroute + '>' + gadai_detail['norujukan'] + ' data-url=' + urlroute + '>' +
gadai_detail['norujukan'] + '</a>', gadai_detail['norujukan'] + '</a>',
formatCaraTerima(gadai_detail['cara_terima']),
gadai_detail['t_gadai'], gadai_detail['t_gadai'],
tarikh_matang, tarikh_matang,
'RM ' + formatter.format(gadai_detail['bakihargajualan']), 'RM ' + formatter.format(gadai_detail['bakihargajualan']),
@@ -243,7 +243,7 @@
</tr> </tr>
<tr> <tr>
<th>Cara Terima Pembiayaan</th> <th>Cara Terima Pembiayaan</th>
<td>Online (kredit ke akaun bank) — bukan tunai</td> <td>Atas Talian (Online)</td>
</tr> </tr>
<tr> <tr>
<th>Teller</th> <th>Teller</th>
+36 -1
View File
@@ -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" id="pembiayaan_online_enabled" value="{{ !empty(($cawangan_info['features'] ?? [])['pembiayaan_online']) ? '1' : '0' }}"> <input type="hidden" id="pembiayaan_online_enabled" value="{{ !empty(($cawangan_info['features'] ?? [])['pembiayaan_online']) ? '1' : '0' }}">
<input type="hidden" id="rebet_annur_enabled" value="{{ !empty(($cawangan_info['features'] ?? [])['rebet_annur']) ? '1' : '0' }}">
<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 }}"> <input type="hidden" name="tag_anggota" id="tag_anggota" value="{{ $customer_info['tag_anggota'] ?? 0 }}">
@@ -186,6 +187,19 @@
</div> </div>
</diV> </diV>
</div> </div>
@if(!empty(($cawangan_info['features'] ?? [])['rebet_annur']))
<div class="col-4">
<div class="form-group row">
<div class="col-md-6">
Kadar Rebet
</div>
<div class="col-md-6">
<input type="text" class="form-control" readonly name="rebate" id="rebate">
<input type="text" class="form-control" readonly name="kadar_rebate" id="kadar_rebate">
</div>
</div>
</div>
@endif
<div class="col-4"> <div class="col-4">
<div class="form-group row"> <div class="form-group row">
<div class="col-md-6"> <div class="col-md-6">
@@ -789,6 +803,26 @@
$('#ujrah').val(formatter.format(getRoundedMethod(array_keuntungan['ujrah']).toFixed(2))); $('#ujrah').val(formatter.format(getRoundedMethod(array_keuntungan['ujrah']).toFixed(2)));
$('#onepercent').val(formatter.format(getRoundedMethod(array_keuntungan['onepercent']).toFixed(2))); $('#onepercent').val(formatter.format(getRoundedMethod(array_keuntungan['onepercent']).toFixed(2)));
if ($('#rebet_annur_enabled').val() === '1') {
var rebate, kadar_rebate;
if (pinjaman < 20000) {
rebate = keuntungan_sebulan * 0.05;
kadar_rebate = 5;
} else if (pinjaman >= 20000 && pinjaman <= 50000) {
rebate = keuntungan_sebulan * 0.10;
kadar_rebate = 10;
} else if (pinjaman > 50000 && pinjaman <= 100000) {
rebate = keuntungan_sebulan * 0.15;
kadar_rebate = 15;
} else {
rebate = keuntungan_sebulan * 0.20;
kadar_rebate = 20;
}
rebate = getRoundedMethod(rebate);
$('#rebate').val(formatter.format(rebate.toFixed(2)));
$('#kadar_rebate').val(formatter.format(kadar_rebate.toFixed(2)) + ' %');
}
}); });
const formatter = new Intl.NumberFormat('en-US', { const formatter = new Intl.NumberFormat('en-US', {
@@ -1268,7 +1302,8 @@
function toggleCaraTerima(pinjaman) { function toggleCaraTerima(pinjaman) {
var pembiayaanOnlineEnabled = $('#pembiayaan_online_enabled').val() === '1'; var pembiayaanOnlineEnabled = $('#pembiayaan_online_enabled').val() === '1';
if (pembiayaanOnlineEnabled && pinjaman >= 5000 && pinjaman <= 50000) { // MIN PINJAMAN = 1.00
if (pembiayaanOnlineEnabled && pinjaman >= 1 && pinjaman <= 50000) {
$('#cara_terima_section').show(); $('#cara_terima_section').show();
toggleBankOnlineSection(); toggleBankOnlineSection();
} else { } else {
+1 -1
View File
@@ -414,7 +414,7 @@
var kodcaw = "{{ $cawangan_info['kodcaw'] }}"; var kodcaw = "{{ $cawangan_info['kodcaw'] }}";
var ppc = "{{ Auth::user()->name }}"; var ppc = "{{ Auth::user()->name }}";
var tagarrahnbid = "{{ $cawangan_info['tagarrahnbid'] }}"; var tagarrahnbid = "{{ $cawangan_info['tagarrahnbid'] }}";
var api_arrahnbid = "<?php echo config('app.api_arrahnbid') ?>"; var api_arrahnbid = @json($cawangan_info['api_arrahnbid'] ?? config('app.api_arrahnbid'));
@@ -52,6 +52,7 @@
<th>No K/P</th> <th>No K/P</th>
<th>Tarikh Pembiayaan</th> <th>Tarikh Pembiayaan</th>
<th>No Rujukan</th> <th>No Rujukan</th>
<th>Cara Terima</th>
<th>Pembiayaan (RM)</th> <th>Pembiayaan (RM)</th>
<th>Keuntungan Lain-lain Caj (RM) </th> <th>Keuntungan Lain-lain Caj (RM) </th>
<th>Keuntungan 1% (RM)</th> <th>Keuntungan 1% (RM)</th>
@@ -61,7 +62,7 @@
</tr> </tr>
</thead> </thead>
<tfoot class="thead-dark"> <tfoot class="thead-dark">
<th colspan="5">TOTAL</th> <th colspan="6">TOTAL</th>
<th id="pinjamantotal"></th> <th id="pinjamantotal"></th>
<th id="ujrahtotal"></th> <th id="ujrahtotal"></th>
<th id="onepercenttotal"></th> <th id="onepercenttotal"></th>
@@ -300,6 +301,10 @@
total_upah12 += upah12; total_upah12 += upah12;
var caraTerima = String(gadai['cara_terima'] || 'TUNAI').toUpperCase() === 'ONLINE'
? 'Online'
: 'Tunai';
// Pastikan semua nilai ada sebelum add row // Pastikan semua nilai ada sebelum add row
tablegadai.row.add([ tablegadai.row.add([
counter, counter,
@@ -307,6 +312,7 @@
gadai['nokp'] || '-', gadai['nokp'] || '-',
gadai['t_gadai'] || '-', gadai['t_gadai'] || '-',
gadai['norujukan'] || '-', gadai['norujukan'] || '-',
caraTerima,
formatter.format(pinjaman), formatter.format(pinjaman),
formatter.format(ujrah * 12), formatter.format(ujrah * 12),
formatter.format(onepercent * 12), formatter.format(onepercent * 12),
+1 -1
View File
@@ -103,7 +103,7 @@
<script> <script>
var api_arrahnbid = "<?php echo config('app.api_arrahnbid') ?>"; var api_arrahnbid = @json($cawangan_info['api_arrahnbid'] ?? config('app.api_arrahnbid'));
var api_url = "{{ api_url_for_browser() }}"; var api_url = "{{ api_url_for_browser() }}";
var kodcaw = "{{ $cawangan_info['kodcaw'] }}"; var kodcaw = "{{ $cawangan_info['kodcaw'] }}";
var tagarrahnbid = "{{ $cawangan_info['tagarrahnbid'] }}"; var tagarrahnbid = "{{ $cawangan_info['tagarrahnbid'] }}";
+1 -1
View File
@@ -414,7 +414,7 @@
var kodcaw = "{{ $cawangan_info['kodcaw'] }}"; var kodcaw = "{{ $cawangan_info['kodcaw'] }}";
var ppc = "{{ Auth::user()->name }}"; var ppc = "{{ Auth::user()->name }}";
var tagarrahnbid = "{{ $cawangan_info['tagarrahnbid'] }}"; var tagarrahnbid = "{{ $cawangan_info['tagarrahnbid'] }}";
var api_arrahnbid = "<?php echo config('app.api_arrahnbid') ?>"; var api_arrahnbid = @json($cawangan_info['api_arrahnbid'] ?? config('app.api_arrahnbid'));
+1 -1
View File
@@ -470,7 +470,7 @@
var kodcaw = "{{ $cawangan_info['kodcaw'] }}"; var kodcaw = "{{ $cawangan_info['kodcaw'] }}";
var ppc = "{{ Auth::user()->name }}"; var ppc = "{{ Auth::user()->name }}";
var tagarrahnbid = "{{ $cawangan_info['tagarrahnbid'] }}"; var tagarrahnbid = "{{ $cawangan_info['tagarrahnbid'] }}";
var api_arrahnbid = "<?php echo config('app.api_arrahnbid') ?>"; var api_arrahnbid = @json($cawangan_info['api_arrahnbid'] ?? config('app.api_arrahnbid'));
@@ -67,24 +67,15 @@
@endif @endif
</div> </div>
</div> </div>
<div class="card-body table-responsive"> <div class="card-body">
<table class="table table-striped table-sm text-center"> <x-datatable
<thead class="thead-dark"> id="batch_lines"
<tr> class="table-sm text-center"
<th>Status</th> :filename="'Batch_' . ($batch['batch_no'] ?? $batch['id'])"
<th>SAG</th> :columns="['Bil', 'Status', 'SAG', 'Pelanggan', 'No KP', 'Bank', 'No Akaun', 'Nama Akaun', 'Pinjaman (RM)', 'Rujukan Bayaran', 'Dokumen', 'Tindakan']"
<th>Pelanggan</th> :skipExport="['Dokumen', 'Tindakan']"
<th>No KP</th> >
<th>Bank</th> @foreach($lines as $line)
<th>No Akaun</th>
<th>Nama Akaun</th>
<th>Pinjaman (RM)</th>
<th>Rujukan Bayaran</th>
<th>Tindakan</th>
</tr>
</thead>
<tbody>
@forelse($lines as $line)
@php @php
$st = $line['status'] ?? ''; $st = $line['status'] ?? '';
$badge = 'badge-secondary'; $badge = 'badge-secondary';
@@ -94,6 +85,7 @@
elseif (in_array($st, ['IN_BATCH', 'OPS_REVIEW'], true)) $badge = 'badge-primary'; elseif (in_array($st, ['IN_BATCH', 'OPS_REVIEW'], true)) $badge = 'badge-primary';
@endphp @endphp
<tr> <tr>
<td>{{ $loop->iteration }}</td>
<td><span class="badge {{ $badge }}">{{ $st ?: '-' }}</span></td> <td><span class="badge {{ $badge }}">{{ $st ?: '-' }}</span></td>
<td>{{ $line['norujukan'] ?? '-' }}</td> <td>{{ $line['norujukan'] ?? '-' }}</td>
<td class="text-left">{{ $line['nama_pelanggan'] ?? '-' }}</td> <td class="text-left">{{ $line['nama_pelanggan'] ?? '-' }}</td>
@@ -103,6 +95,23 @@
<td class="text-left">{{ $line['nama_akaun'] ?? '-' }}</td> <td class="text-left">{{ $line['nama_akaun'] ?? '-' }}</td>
<td class="text-right">{{ number_format((float)($line['pinjaman'] ?? 0), 2) }}</td> <td class="text-right">{{ number_format((float)($line['pinjaman'] ?? 0), 2) }}</td>
<td>{{ $line['no_rujukan_bayaran'] ?? '-' }}</td> <td>{{ $line['no_rujukan_bayaran'] ?? '-' }}</td>
<td class="text-nowrap">
<button type="button"
class="btn btn-sm btn-outline-dark btn-preview-sag"
data-url="{{ route('pembiayaan.online.operasi.sag', ['kodcaw' => $kodcaw, 'id' => $line['id']]) }}"
data-norujukan="{{ $line['norujukan'] ?? '' }}">
SAG
</button>
@if(!empty($line['bukti_akaun_file_id']))
<a class="btn btn-sm btn-outline-primary"
href="{{ route('pembiayaan.online.operasi.bukti.akaun', ['kodcaw' => $kodcaw, 'id' => $line['id']]) }}"
target="_blank">
Slip Bank
</a>
@else
<span class="text-muted small">Tiada slip</span>
@endif
</td>
<td class="text-nowrap"> <td class="text-nowrap">
@if(in_array($st, ['IN_BATCH', 'OPS_REVIEW'], true)) @if(in_array($st, ['IN_BATCH', 'OPS_REVIEW'], true))
<form method="post" <form method="post"
@@ -139,19 +148,33 @@
@endif @endif
</td> </td>
</tr> </tr>
@empty @endforeach
<tr> </x-datatable>
<td colspan="10">Tiada rekod dalam batch.</td>
</tr>
@endforelse
</tbody>
</table>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
{{-- SAG preview modal --}}
<div class="modal fade" id="sagPreviewModal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-xl" role="document" style="max-width:1140px;">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Pratinjau SAG — <span id="sagPreviewTitle"></span></h5>
<button type="button" class="close" data-dismiss="modal"><span>&times;</span></button>
</div>
<div class="modal-body p-2">
<iframe id="sagPreviewFrame" title="Pratinjau SAG" src="about:blank"
style="width:100%;height:75vh;border:1px solid #dee2e6;background:#f8f9fa;"></iframe>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Tutup</button>
</div>
</div>
</div>
</div>
{{-- Reject modal --}} {{-- Reject modal --}}
<div class="modal fade" id="rejectModal" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal fade" id="rejectModal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog" role="document"> <div class="modal-dialog" role="document">
@@ -252,7 +275,28 @@
</div> </div>
<script> <script>
$('.btn-reject').on('click', function () { var table = initErahnDatatable('#batch_lines', {
columnDefs: [
{ targets: 0, orderable: false, searchable: false, width: '40px' },
{ targets: [10, 11], orderable: false, searchable: false }
]
});
table.on('draw.dt', function () {
table.column(0, { search: 'applied', order: 'applied' }).nodes().each(function (cell, i) {
cell.innerHTML = i + 1;
});
}).draw();
$('#batch_lines').on('click', '.btn-preview-sag', function () {
$('#sagPreviewTitle').text($(this).data('norujukan') || '');
$('#sagPreviewFrame').attr('src', $(this).data('url'));
$('#sagPreviewModal').modal('show');
});
$('#sagPreviewModal').on('hidden.bs.modal', function () {
$('#sagPreviewFrame').attr('src', 'about:blank');
});
$('#batch_lines').on('click', '.btn-reject', function () {
var id = $(this).data('id'); var id = $(this).data('id');
$('#rejectForm').attr( $('#rejectForm').attr(
'action', 'action',
@@ -263,7 +307,7 @@
$('#rejectModal').modal('show'); $('#rejectModal').modal('show');
}); });
$('.btn-paid').on('click', function () { $('#batch_lines').on('click', '.btn-paid', function () {
var id = $(this).data('id'); var id = $(this).data('id');
$('#paidForm').attr( $('#paidForm').attr(
'action', 'action',
@@ -40,6 +40,7 @@
<th>No Akaun</th> <th>No Akaun</th>
<th>Pinjaman (RM)</th> <th>Pinjaman (RM)</th>
<th>Rujukan Bayaran</th> <th>Rujukan Bayaran</th>
<th>Dokumen</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@@ -53,6 +54,23 @@
<td>{{ $line['noakaun'] ?? '-' }}</td> <td>{{ $line['noakaun'] ?? '-' }}</td>
<td class="text-right">{{ number_format((float)($line['pinjaman'] ?? 0), 2) }}</td> <td class="text-right">{{ number_format((float)($line['pinjaman'] ?? 0), 2) }}</td>
<td>{{ $line['no_rujukan_bayaran'] ?? '-' }}</td> <td>{{ $line['no_rujukan_bayaran'] ?? '-' }}</td>
<td class="text-nowrap">
<button type="button"
class="btn btn-sm btn-outline-dark btn-preview-sag"
data-url="{{ route('pembiayaan.online.pc.sag', ['id' => $line['id']]) }}"
data-norujukan="{{ $line['norujukan'] ?? '' }}">
SAG
</button>
@if(!empty($line['bukti_akaun_file_id']))
<a class="btn btn-sm btn-outline-primary"
href="{{ route('pembiayaan.online.pc.bukti.akaun', ['id' => $line['id']]) }}"
target="_blank">
Slip Bank
</a>
@else
<span class="text-muted small">Tiada slip</span>
@endif
</td>
</tr> </tr>
@endforeach @endforeach
</tbody> </tbody>
@@ -62,4 +80,32 @@
</div> </div>
</div> </div>
</div> </div>
<div class="modal fade" id="sagPreviewModal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-xl" role="document" style="max-width:1140px;">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Pratinjau SAG — <span id="sagPreviewTitle"></span></h5>
<button type="button" class="close" data-dismiss="modal"><span>&times;</span></button>
</div>
<div class="modal-body p-2">
<iframe id="sagPreviewFrame" title="Pratinjau SAG" src="about:blank"
style="width:100%;height:75vh;border:1px solid #dee2e6;background:#f8f9fa;"></iframe>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Tutup</button>
</div>
</div>
</div>
</div>
<script>
$('.btn-preview-sag').on('click', function () {
$('#sagPreviewTitle').text($(this).data('norujukan') || '');
$('#sagPreviewFrame').attr('src', $(this).data('url'));
$('#sagPreviewModal').modal('show');
});
$('#sagPreviewModal').on('hidden.bs.modal', function () {
$('#sagPreviewFrame').attr('src', 'about:blank');
});
</script>
@endsection @endsection
@@ -33,6 +33,9 @@
if (is_object($pendingReq)) { if (is_object($pendingReq)) {
$pendingReq = json_decode(json_encode($pendingReq), true); $pendingReq = json_decode(json_encode($pendingReq), true);
} }
$lineRows = collect($lines);
$verifiedCount = $lineRows->where('status', 'VERIFIED_PC')->count();
$unverifiedCount = $lineRows->count() - $verifiedCount;
@endphp @endphp
@if($isClosed) @if($isClosed)
@@ -84,7 +87,11 @@
<div class="card-body text-center"> <div class="card-body text-center">
<div class="text-muted">Queue PC</div> <div class="text-muted">Queue PC</div>
<h4 class="mb-0">{{ count($lines) }} rekod</h4> <h4 class="mb-0">{{ count($lines) }} rekod</h4>
<small>Jumlah RM {{ number_format((float)($queue['jumlah'] ?? 0), 2) }}</small> <small>
{{ $verifiedCount }} sudah sah
/ {{ $unverifiedCount }} belum semak
&middot; Jumlah RM {{ number_format((float)($queue['jumlah'] ?? 0), 2) }}
</small>
</div> </div>
</div> </div>
</div> </div>
@@ -101,10 +108,14 @@
<div class="card mb-4"> <div class="card mb-4">
<div class="card-header d-flex justify-content-between align-items-center"> <div class="card-header d-flex justify-content-between align-items-center">
<h5 class="mb-0">Senarai Menunggu (PENDING / REJECTED)</h5> <h5 class="mb-0">Senarai Menunggu (PENDING / REJECTED / SAH)</h5>
<button type="button" class="btn btn-primary" id="btnSubmitBatch" disabled>Hantar Batch ke Operasi</button> <button type="button" class="btn btn-primary" id="btnSubmitBatch" disabled>Hantar Batch ke Operasi</button>
</div> </div>
<div class="card-body"> <div class="card-body">
<p class="small text-muted">
Semak setiap rekod <b>satu-satu</b> (maklumat pelanggan, bank, amaun).
Hanya rekod berstatus <span class="badge badge-success">SAH</span> boleh dipilih dan dihantar ke Operasi.
</p>
<form id="formSubmitBatch" method="post" action="{{ route('pembiayaan.online.pc.submit') }}"> <form id="formSubmitBatch" method="post" action="{{ route('pembiayaan.online.pc.submit') }}">
@csrf @csrf
<input type="hidden" name="slot" value="{{ $slot['slot'] ?? 'BATCH1' }}"> <input type="hidden" name="slot" value="{{ $slot['slot'] ?? 'BATCH1' }}">
@@ -112,7 +123,7 @@
<table class="table table-striped table-hover table-sm text-center" id="queueTable"> <table class="table table-striped table-hover table-sm text-center" id="queueTable">
<thead class="thead-dark"> <thead class="thead-dark">
<tr> <tr>
<th><input type="checkbox" id="checkAll"></th> <th><input type="checkbox" id="checkAll" title="Pilih semua yang sudah sah"></th>
<th>Status</th> <th>Status</th>
<th>SAG</th> <th>SAG</th>
<th>Pelanggan</th> <th>Pelanggan</th>
@@ -126,15 +137,31 @@
</thead> </thead>
<tbody> <tbody>
@forelse($lines as $line) @forelse($lines as $line)
<tr class="{{ ($line['status'] ?? '') === 'REJECTED_PC' ? 'table-warning' : '' }}"> @php
$st = $line['status'] ?? '';
$isVerified = $st === 'VERIFIED_PC';
$isRejected = $st === 'REJECTED_PC';
$bankOk = !empty($line['kodbank']) && !empty($line['noakaun']);
@endphp
<tr class="{{ $isRejected ? 'table-warning' : ($isVerified ? 'table-success' : '') }}">
<td> <td>
<input type="checkbox" class="row-check" name="ids[]" value="{{ $line['id'] }}"> <input type="checkbox"
class="row-check"
name="ids[]"
value="{{ $line['id'] }}"
{{ $isVerified ? '' : 'disabled' }}
title="{{ $isVerified ? '' : 'Sahkan rekod ini dahulu' }}">
</td> </td>
<td> <td>
@if(($line['status'] ?? '') === 'REJECTED_PC') @if($isRejected)
<span class="badge badge-danger">REJECTED</span> <span class="badge badge-danger">REJECTED</span>
@elseif($isVerified)
<span class="badge badge-success">SAH</span>
@if(!empty($line['pc_verified_by']))
<div class="small text-muted">{{ $line['pc_verified_by'] }}</div>
@endif
@else @else
<span class="badge badge-secondary">PENDING</span> <span class="badge badge-secondary">BELUM SEMAK</span>
@endif @endif
</td> </td>
<td>{{ $line['norujukan'] ?? '-' }}</td> <td>{{ $line['norujukan'] ?? '-' }}</td>
@@ -144,7 +171,33 @@
<td>{{ $line['noakaun'] ?? '-' }}</td> <td>{{ $line['noakaun'] ?? '-' }}</td>
<td class="text-right">{{ number_format((float)($line['pinjaman'] ?? 0), 2) }}</td> <td class="text-right">{{ number_format((float)($line['pinjaman'] ?? 0), 2) }}</td>
<td class="text-left small">{{ $line['reject_reason'] ?? '-' }}</td> <td class="text-left small">{{ $line['reject_reason'] ?? '-' }}</td>
<td> <td class="text-nowrap">
@if($isVerified)
<button type="button"
class="btn btn-sm btn-outline-secondary btn-unverify"
data-id="{{ $line['id'] }}"
data-norujukan="{{ $line['norujukan'] ?? '' }}">
Batal
</button>
@else
<button type="button"
class="btn btn-sm btn-success btn-verify"
{{ $bankOk ? '' : 'disabled' }}
title="{{ $bankOk ? 'Semak maklumat pelanggan' : 'Lengkapkan maklumat bank dahulu' }}"
data-id="{{ $line['id'] }}"
data-norujukan="{{ $line['norujukan'] ?? '' }}"
data-nama="{{ $line['nama_pelanggan'] ?? '' }}"
data-nokp="{{ $line['nokp'] ?? '' }}"
data-namabank="{{ $line['nama_bank'] ?? $line['kodbank'] ?? '' }}"
data-noakaun="{{ $line['noakaun'] ?? '' }}"
data-namaakaun="{{ $line['nama_akaun'] ?? '' }}"
data-pinjaman="{{ number_format((float)($line['pinjaman'] ?? 0), 2) }}"
data-nota="{{ $line['nota'] ?? '' }}"
data-sebab="{{ $line['reject_reason'] ?? '' }}"
data-bukti-akaun="{{ $line['bukti_akaun_file_id'] ?? '' }}">
Semak
</button>
@endif
<button type="button" class="btn btn-sm btn-info btn-edit" <button type="button" class="btn btn-sm btn-info btn-edit"
data-id="{{ $line['id'] }}" data-id="{{ $line['id'] }}"
data-kodbank="{{ $line['kodbank'] ?? '' }}" data-kodbank="{{ $line['kodbank'] ?? '' }}"
@@ -152,7 +205,8 @@
data-namaakaun="{{ $line['nama_akaun'] ?? '' }}" data-namaakaun="{{ $line['nama_akaun'] ?? '' }}"
data-namabank="{{ $line['nama_bank'] ?? '' }}" data-namabank="{{ $line['nama_bank'] ?? '' }}"
data-nota="{{ $line['nota'] ?? '' }}" data-nota="{{ $line['nota'] ?? '' }}"
data-norujukan="{{ $line['norujukan'] ?? '' }}"> data-norujukan="{{ $line['norujukan'] ?? '' }}"
data-bukti-akaun="{{ $line['bukti_akaun_file_id'] ?? '' }}">
Edit Edit
</button> </button>
</td> </td>
@@ -166,6 +220,9 @@
</table> </table>
</div> </div>
</form> </form>
<form id="formUnverify" method="post" action="" class="d-none">
@csrf
</form>
</div> </div>
</div> </div>
@@ -221,8 +278,8 @@
{{-- Edit modal --}} {{-- Edit modal --}}
<div class="modal fade" id="editModal" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal fade" id="editModal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog" role="document"> <div class="modal-dialog modal-xl" role="document" style="max-width:1140px;">
<form method="post" id="editForm" action=""> <form method="post" id="editForm" action="" enctype="multipart/form-data">
@csrf @csrf
@method('PUT') @method('PUT')
<div class="modal-content"> <div class="modal-content">
@@ -231,6 +288,8 @@
<button type="button" class="close" data-dismiss="modal"><span>&times;</span></button> <button type="button" class="close" data-dismiss="modal"><span>&times;</span></button>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<div class="row">
<div class="col-md-4">
<div class="form-group"> <div class="form-group">
<label>Bank</label> <label>Bank</label>
<select name="kodbank" id="editKodbank" class="form-control" required> <select name="kodbank" id="editKodbank" class="form-control" required>
@@ -251,10 +310,29 @@
<label>Nama Akaun</label> <label>Nama Akaun</label>
<input type="text" name="nama_akaun" id="editNamaakaun" class="form-control"> <input type="text" name="nama_akaun" id="editNamaakaun" class="form-control">
</div> </div>
<div class="form-group">
<label>Slip Bank / Bukti Akaun</label>
<input type="file" name="bukti_akaun" id="editBuktiAkaun" class="form-control-file"
accept=".pdf,.jpg,.jpeg,.png,.gif">
<div id="editBuktiAkaunExisting" class="mt-2" style="display:none;">
<a href="#" id="editBuktiAkaunLink" class="btn btn-sm btn-outline-primary" target="_blank">
Lihat slip sedia ada
</a>
</div>
<small class="text-muted">PDF / imej slip akaun bank pelanggan (maks 4MB)</small>
</div>
<div class="form-group"> <div class="form-group">
<label>Nota</label> <label>Nota</label>
<textarea name="nota" id="editNota" class="form-control" rows="2"></textarea> <textarea name="nota" id="editNota" class="form-control" rows="2"></textarea>
</div> </div>
<p class="small text-muted mb-0">Jika rekod sudah SAH, simpan akan batal semakan. Sila semak semula sebelum hantar.</p>
</div>
<div class="col-md-8">
<label class="d-block">Pratinjau SAG</label>
<iframe id="editSagFrame" title="Pratinjau SAG" src="about:blank"
style="width:100%;height:70vh;border:1px solid #dee2e6;background:#f8f9fa;"></iframe>
</div>
</div>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Tutup</button> <button type="button" class="btn btn-secondary" data-dismiss="modal">Tutup</button>
@@ -265,26 +343,149 @@
</div> </div>
</div> </div>
{{-- Verify one-by-one modal --}}
<div class="modal fade" id="verifyModal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-xl" role="document" style="max-width:1140px;">
<form method="post" id="verifyForm" action="">
@csrf
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Semak Rekod — <span id="verifyNorujukan"></span></h5>
<button type="button" class="close" data-dismiss="modal"><span>&times;</span></button>
</div>
<div class="modal-body">
<p class="small text-muted">Bandingkan maklumat pelanggan dengan SAG / slip bank sebelum sahkan.</p>
<div class="row">
<div class="col-md-4">
<table class="table table-sm table-bordered mb-3">
<tr>
<th style="width:40%">SAG</th>
<td id="verifySag"></td>
</tr>
<tr>
<th>Pelanggan</th>
<td id="verifyNama"></td>
</tr>
<tr>
<th>No KP</th>
<td id="verifyNokp"></td>
</tr>
<tr>
<th>Bank</th>
<td id="verifyBank"></td>
</tr>
<tr>
<th>No Akaun</th>
<td id="verifyNoakaun"></td>
</tr>
<tr>
<th>Nama Akaun</th>
<td id="verifyNamaakaun"></td>
</tr>
<tr>
<th>Pinjaman</th>
<td>RM <span id="verifyPinjaman"></span></td>
</tr>
<tr>
<th>Nota</th>
<td id="verifyNota"></td>
</tr>
</table>
<div class="alert alert-warning py-2" id="verifySebabBox" style="display:none;">
<b>Sebab tolak Operasi:</b>
<div id="verifySebab"></div>
</div>
<div class="form-check mb-3">
<input type="checkbox" class="form-check-input" id="verifyConfirm" required>
<label class="form-check-label" for="verifyConfirm">
Saya sahkan maklumat pelanggan, bank dan amaun adalah betul.
</label>
</div>
<a href="#" id="verifyBuktiAkaunLink" class="btn btn-sm btn-outline-primary" target="_blank" style="display:none;">
Lihat Slip Bank
</a>
</div>
<div class="col-md-8">
<label class="d-block">Pratinjau SAG</label>
<iframe id="verifySagFrame" title="Pratinjau SAG" src="about:blank"
style="width:100%;height:70vh;border:1px solid #dee2e6;background:#f8f9fa;"></iframe>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Batal</button>
<button type="submit" class="btn btn-success">Sahkan Rekod Ini</button>
</div>
</div>
</form>
</div>
</div>
<script> <script>
function syncSubmitButton() { function syncSubmitButton() {
var n = $('.row-check:checked').length; var n = $('.row-check:not(:disabled):checked').length;
$('#btnSubmitBatch').prop('disabled', n === 0); $('#btnSubmitBatch').prop('disabled', n === 0);
$('#btnSubmitBatch').text(n ? ('Hantar Batch ke Operasi (' + n + ')') : 'Hantar Batch ke Operasi'); $('#btnSubmitBatch').text(n ? ('Hantar Batch ke Operasi (' + n + ')') : 'Hantar Batch ke Operasi');
} }
$('#checkAll').on('change', function () { $('#checkAll').on('change', function () {
$('.row-check').prop('checked', this.checked); $('.row-check:not(:disabled)').prop('checked', this.checked);
syncSubmitButton(); syncSubmitButton();
}); });
$(document).on('change', '.row-check', syncSubmitButton); $(document).on('change', '.row-check', function () {
var enabled = $('.row-check:not(:disabled)');
$('#checkAll').prop('checked', enabled.length > 0 && enabled.filter(':checked').length === enabled.length);
syncSubmitButton();
});
$('#btnSubmitBatch').on('click', function () { $('#btnSubmitBatch').on('click', function () {
if ($('.row-check:checked').length === 0) return; if ($('.row-check:not(:disabled):checked').length === 0) return;
if (!confirm('Hantar rekod dipilih ke Operasi?')) return; if (!confirm('Hantar rekod yang sudah disahkan ke Operasi?')) return;
$('#formSubmitBatch').submit(); $('#formSubmitBatch').submit();
}); });
$('.btn-unverify').on('click', function () {
var id = $(this).data('id');
var sag = $(this).data('norujukan') || '';
if (!confirm('Batal semakan ' + sag + '? Rekod ini tidak boleh dihantar sehingga disemak semula.')) return;
$('#formUnverify').attr('action', "{{ url('/pembiayaan-online/pc/lines') }}/" + id + "/unverify");
$('#formUnverify').submit();
});
$('.btn-verify').on('click', function () {
var id = $(this).data('id');
var sebab = $(this).data('sebab') || '';
$('#verifyForm').attr('action', "{{ url('/pembiayaan-online/pc/lines') }}/" + id + "/verify");
$('#verifyNorujukan').text($(this).data('norujukan'));
$('#verifySag').text($(this).data('norujukan') || '-');
$('#verifyNama').text($(this).data('nama') || '-');
$('#verifyNokp').text($(this).data('nokp') || '-');
$('#verifyBank').text($(this).data('namabank') || '-');
$('#verifyNoakaun').text($(this).data('noakaun') || '-');
$('#verifyNamaakaun').text($(this).data('namaakaun') || '-');
$('#verifyPinjaman').text($(this).data('pinjaman') || '0.00');
$('#verifyNota').text($(this).data('nota') || '-');
if (sebab) {
$('#verifySebab').text(sebab);
$('#verifySebabBox').show();
} else {
$('#verifySebabBox').hide();
}
$('#verifyConfirm').prop('checked', false);
$('#verifySagFrame').attr('src', "{{ url('/pembiayaan-online/pc/lines') }}/" + id + "/sag");
if ($(this).data('buktiAkaun')) {
$('#verifyBuktiAkaunLink').attr('href', "{{ url('/pembiayaan-online/pc/lines') }}/" + id + "/bukti-akaun").show();
} else {
$('#verifyBuktiAkaunLink').hide();
}
$('#verifyModal').modal('show');
});
$('#verifyModal').on('hidden.bs.modal', function () {
$('#verifySagFrame').attr('src', 'about:blank');
});
$('.btn-edit').on('click', function () { $('.btn-edit').on('click', function () {
var id = $(this).data('id'); var id = $(this).data('id');
$('#editForm').attr('action', "{{ url('/pembiayaan-online/pc/lines') }}/" + id); $('#editForm').attr('action', "{{ url('/pembiayaan-online/pc/lines') }}/" + id);
@@ -294,9 +495,21 @@
$('#editNamaakaun').val($(this).data('namaakaun')); $('#editNamaakaun').val($(this).data('namaakaun'));
$('#editNamabank').val($(this).data('namabank')); $('#editNamabank').val($(this).data('namabank'));
$('#editNota').val($(this).data('nota')); $('#editNota').val($(this).data('nota'));
$('#editBuktiAkaun').val('');
$('#editSagFrame').attr('src', "{{ url('/pembiayaan-online/pc/lines') }}/" + id + "/sag");
if ($(this).data('buktiAkaun')) {
$('#editBuktiAkaunLink').attr('href', "{{ url('/pembiayaan-online/pc/lines') }}/" + id + "/bukti-akaun");
$('#editBuktiAkaunExisting').show();
} else {
$('#editBuktiAkaunExisting').hide();
}
$('#editModal').modal('show'); $('#editModal').modal('show');
}); });
$('#editModal').on('hidden.bs.modal', function () {
$('#editSagFrame').attr('src', 'about:blank');
});
$('#editKodbank').on('change', function () { $('#editKodbank').on('change', function () {
$('#editNamabank').val($('#editKodbank option:selected').data('nama') || ''); $('#editNamabank').val($('#editKodbank option:selected').data('nama') || '');
}); });
@@ -326,6 +326,16 @@
<input type="text" id="jumlahtelahdibayar" class="form-control" readonly/> <input type="text" id="jumlahtelahdibayar" class="form-control" readonly/>
</div> </div>
</div> </div>
@if(!empty(($cawangan_info['features'] ?? [])['rebet_annur']))
<div class="form-group row">
<div class="col-4">
REBET DISKAUN (RM)
</div>
<div class="col-8">
<input type="text" id="jumlahDiskaun" value="{{ number_format($gadai['diskaun'] ?? 0, 2) }}" class="form-control" readonly/>
</div>
</div>
@endif
</div> </div>
</div> </div>
@@ -441,6 +451,16 @@
<input type="text" id="jumlahupah" class="form-control" readonly/> <input type="text" id="jumlahupah" class="form-control" readonly/>
</div> </div>
</div> </div>
@if(!empty(($cawangan_info['features'] ?? [])['rebet_annur']))
<div class="form-group row">
<div class="col-4">
REBET DISKAUN (RM)
</div>
<div class="col-8">
<input type="text" id="jumlahDiskaun" value="{{ number_format($gadai['diskaun'] ?? 0, 2) }}" class="form-control" readonly/>
</div>
</div>
@endif
<div id="divbakipinjaman"> <div id="divbakipinjaman">
<div class="form-group row"> <div class="form-group row">
@@ -467,6 +487,17 @@
<input type="text" id="jumlahtelahdibayar" class="form-control" readonly/> <input type="text" id="jumlahtelahdibayar" class="form-control" readonly/>
</div> </div>
</div> </div>
@if(!empty(($cawangan_info['features'] ?? [])['rebet_annur']))
<div class="form-group row">
<div class="col-4">
REBET DISKAUN (RM)
</div>
<div class="col-8">
<input type="text" id="jumlahDiskaun" value="{{ number_format($gadai['diskaun'] ?? 0, 2) }}" class="form-control" readonly/>
</div>
</div>
@endif
<div class="form-group row" id="divbayaran"> <div class="form-group row" id="divbayaran">
@@ -214,8 +214,7 @@
/> />
<div class="title"> <div class="title">
<h1>Borang Kelulusan Pembiayaan Online<br>Senarai Batch Pembayaran</h1> <h1>Borang Kelulusan Batch Pembiayaan Online</h1>
<p>Untuk semakan Operasi dan kelulusan Pengurus Besar. Bukan untuk tandatangan pelanggan.</p>
</div> </div>
<div class="section"> <div class="section">
@@ -298,8 +297,8 @@
bagi batch <b>{{ $batchNo }}</b> cawangan <b>{{ $cawangan }}</b> adalah lengkap bagi batch <b>{{ $batchNo }}</b> cawangan <b>{{ $cawangan }}</b> adalah lengkap
untuk proses pembayaran ke akaun bank pelanggan. untuk proses pembayaran ke akaun bank pelanggan.
<ol> <ol>
<li>Maklumat SAG, nama, no. KP, bank dan no. akaun telah disemak terhadap rekod sistem.</li> <li>Maklumat SAG, nama, no. KP, bank dan no. akaun telah disemak didalam sistem.</li>
<li>Pembayaran akan dikreditkan ke akaun penerima seperti senarai, bukan tunai di kaunter.</li> <li>Pembayaran akan dikreditkan ke akaun penerima seperti didalam senarai.</li>
<li>Sebarang ralat akaun yang dikesan selepas kelulusan hendaklah dilaporkan serta-merta.</li> <li>Sebarang ralat akaun yang dikesan selepas kelulusan hendaklah dilaporkan serta-merta.</li>
</ol> </ol>
</div> </div>
@@ -318,18 +317,11 @@
<div class="role">Pengurus Besar</div> <div class="role">Pengurus Besar</div>
<div class="sign-line"> <div class="sign-line">
<p>Nama:</p> <p>Nama:</p>
<p>Cop / Paraf:</p> <p>Cop:</p>
<p>Tarikh:</p> <p>Tarikh:</p>
</div> </div>
</div> </div>
</div> </div>
<x-print.footer :show-copies="false">
<b>Nota:</b>
<p>1. Borang ini dicetak dari skrin Operasi — Pembiayaan Online (Batch) untuk kelulusan pembayaran.</p>
<p>2. Hanya dua tandatangan diperlukan: Operasi dan Pengurus Besar.</p>
<p>3. Simpan salinan bersama bukti pindahan bank selepas status PAID.</p>
</x-print.footer>
</div> </div>
</div> </div>
</body> </body>
@@ -108,6 +108,19 @@
letter-spacing: 0.02em; letter-spacing: 0.02em;
} }
.copies {
margin-top: 12px;
font-size: 10px;
}
.copies span {
display: inline-block;
border: 1px solid #111;
width: 11px;
height: 11px;
margin-right: 4px;
vertical-align: -1px;
}
.akuan { .akuan {
font-size: 11px; font-size: 11px;
line-height: 1.55; line-height: 1.55;
@@ -121,10 +134,8 @@
.akuan li { margin-bottom: 4px; } .akuan li { margin-bottom: 4px; }
.signs { .signs {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
gap: 10px;
margin-top: 16px; margin-top: 16px;
max-width: 34%;
} }
.sign-box { .sign-box {
border: 1px solid #111; border: 1px solid #111;
@@ -214,7 +225,7 @@
<div class="section-title">B. Maklumat Pembiayaan</div> <div class="section-title">B. Maklumat Pembiayaan</div>
<table class="fields"> <table class="fields">
<tr> <tr>
<th>No. Surat Akuan Gadai</th> <th>No. Surat Akuan Gadaian (SAG)</th>
<td>{{ $norujukan }}</td> <td>{{ $norujukan }}</td>
</tr> </tr>
<tr> <tr>
@@ -222,8 +233,8 @@
<td class="amt">RM {{ $pinjaman }}</td> <td class="amt">RM {{ $pinjaman }}</td>
</tr> </tr>
<tr> <tr>
<th>Cara Terima Pembiayaan</th> <th>Cara Pembiayaan</th>
<td>Online (kredit ke akaun bank) — bukan tunai</td> <td>Atas Talian (Online)</td>
</tr> </tr>
<tr> <tr>
<th>Teller</th> <th>Teller</th>
@@ -250,15 +261,19 @@
</table> </table>
</div> </div>
<div class="copies">
Salinan: <span></span> Kad Pengenalan &nbsp;&nbsp; <span></span> Akaun Bank/ Slip/ Penyata Bank
</div>
<div class="section"> <div class="section">
<div class="section-title">D. Akuan Pelanggan</div> <div class="section-title">D. Akuan Pelanggan</div>
<div class="akuan"> <div class="akuan">
Saya, <b>{{ $nama }}</b> (No. KP: <b>{{ $nokp }}</b>), dengan ini mengesahkan bahawa: Saya, <b>{{ $nama }}</b> (No. KP: <b>{{ $nokp }}</b>), dengan ini mengesahkan bahawa:
<ol> <ol>
<li>Maklumat akaun bank di Bahagian C adalah benar, tepat, dan milik saya sendiri.</li> <li>Maklumat akaun bank di Bahagian C adalah benar, tepat, dan milik saya sendiri.</li>
<li>Saya memohon supaya amaun pembiayaan gadai sebanyak <b>RM {{ $pinjaman }}</b> dikreditkan ke akaun tersebut dan <b>bukan</b> diterima secara tunai.</li> <li>Saya bersetuju menerima pembayaran pembiayaan Ar-Rahn KoPKB sebanyak <b>RM {{ $pinjaman }}</b> secara atas talian (Online) ke akaun tersebut.</li>
<li>Saya faham kredit ke akaun tertakluk kepada semakan Pengurus Cawangan dan proses pembayaran pihak Koperasi.</li> <li>Saya memahami bahawa pihak Ar-Rahn KoPKB tidak akan bertanggungjawab atas sebarang kesilapan akibat maklumat akaun yang diberikan oleh saya.</li>
<li>Saya bertanggungjawab sepenuhnya jika maklumat akaun tidak tepat, dan tidak akan menuntut ganti rugi atas kelewatan atau ralat yang berpunca daripadanya.</li> <li>Saya mengesahkan bahawa segala maklumat yang diberikan adalah benar dan tepat.</li>
</ol> </ol>
</div> </div>
</div> </div>
@@ -272,29 +287,13 @@
<p>Tarikh: {{ $tarikh }}</p> <p>Tarikh: {{ $tarikh }}</p>
</div> </div>
</div> </div>
<div class="sign-box">
<div class="role">Tandatangan Teller</div>
<div class="sign-line">
<p>Nama: {{ $teller }}</p>
<p>Cop / Paraf:</p>
<p>Tarikh: {{ $tarikh }}</p>
</div>
</div>
<div class="sign-box">
<div class="role">Pengurus Cawangan</div>
<div class="sign-line">
<p>Nama:</p>
<p>Cop cawangan:</p>
<p>Tarikh:</p>
</div>
</div>
</div> </div>
<x-print.footer> <x-print.footer :show-copies="false">
<b>Nota:</b> <b>Nota:</b>
<p>1. Borang ini dicetak semasa pelanggan memilih cara terima pembiayaan secara Online.</p> <p>1. Pembayaran hanya dibuat ke akaun pelanggan sendiri.</p>
<p>2. Pembiayaan akan dikreditkan ke akaun selepas semakan PC. Pelanggan tidak menerima wang tunai di kaunter.</p> <p>2. Sebarang pembetulan maklumat hendaklah disahkan semula oleh pelanggan.</p>
<p>3. Sila pastikan nama pemegang akaun sepadan dengan nama pelanggan pada MyKad.</p> <p>3. Borang ini hendaklah dilampirkan bersama dokumen transaksi gadaian untuk tujuan audit dan rekod.</p>
</x-print.footer> </x-print.footer>
</div> </div>
</div> </div>
@@ -1,3 +1,4 @@
@php $rebetAnnur = !empty(($cawangan_info['features'] ?? [])['rebet_annur']); @endphp
<style> <style>
#header { #header {
font-family: Arial, Helvetica, sans-serif; font-family: Arial, Helvetica, sans-serif;
@@ -219,6 +220,7 @@
<tr> <tr>
<th>Bil</th> <th>Bil</th>
<th>Norujukan</th> <th>Norujukan</th>
<th>Cara Terima</th>
<th>Nama</th> <th>Nama</th>
<th>Alamat</th> <th>Alamat</th>
<th>No K/P</th> <th>No K/P</th>
@@ -230,6 +232,9 @@
<th>Lain-Lain Caj (RM)</th> <th>Lain-Lain Caj (RM)</th>
<th>Keuntungan 1% (RM)</th> <th>Keuntungan 1% (RM)</th>
<th>Keuntungan</th> <th>Keuntungan</th>
@if($rebetAnnur)
<th>Diskaun Rebet</th>
@endif
<th>Peratus (%)</th> <th>Peratus (%)</th>
</tr> </tr>
@php @php
@@ -241,6 +246,7 @@
$bil = 0; $bil = 0;
$full_total_ujrah = 0; $full_total_ujrah = 0;
$full_total_onepercent = 0; $full_total_onepercent = 0;
$totaldiskaun = 0;
@endphp @endphp
@foreach($gadai as $index=>$item) @foreach($gadai as $index=>$item)
@@ -251,12 +257,13 @@
$totalupah += $item['upah12']; $totalupah += $item['upah12'];
$full_total_ujrah += $item['ujrah']*12; $full_total_ujrah += $item['ujrah']*12;
$full_total_onepercent += $item['onepercent']*12; $full_total_onepercent += $item['onepercent']*12;
$totaldiskaun += $item['diskaun'] ?? 0;
@endphp @endphp
@if($index > 0) @if($index > 0)
@if($item['teller'] != $gadai[$index - 1]['teller']) @if($item['teller'] != $gadai[$index - 1]['teller'])
<tr> <tr>
<td colspan=10>Teller : <b>{{ $item['teller'] }}</b></td> <td colspan=11>Teller : <b>{{ $item['teller'] }}</b></td>
</tr> </tr>
@php @php
$totalpinjamanteller = 0; $totalpinjamanteller = 0;
@@ -264,12 +271,13 @@
$totalberatteller = 0; $totalberatteller = 0;
$totalujrah = 0; $totalujrah = 0;
$totalonepercent = 0; $totalonepercent = 0;
$totaldiskaunteller = 0;
@endphp @endphp
@endif @endif
@else @else
<tr> <tr>
<td colspan=10>Teller : <b>{{ $item['teller'] }}</b></td> <td colspan=11>Teller : <b>{{ $item['teller'] }}</b></td>
</tr> </tr>
@php @php
$totalpinjamanteller = 0; $totalpinjamanteller = 0;
@@ -278,6 +286,7 @@
$totalupah12 = 0; $totalupah12 = 0;
$totalujrah = 0; $totalujrah = 0;
$totalonepercent= 0; $totalonepercent= 0;
$totaldiskaunteller = 0;
@endphp @endphp
@endif @endif
@@ -303,6 +312,9 @@
<td>{{ number_format($item['ujrah']*12,2) }}</td> <td>{{ number_format($item['ujrah']*12,2) }}</td>
<td>{{ number_format($item['onepercent']*12,2) }}</td> <td>{{ number_format($item['onepercent']*12,2) }}</td>
<td>{{ number_format($item['upah12'],2) }}</td> <td>{{ number_format($item['upah12'],2) }}</td>
@if($rebetAnnur)
<td>{{ number_format($item['diskaun'] ?? 0,2) }}</td>
@endif
<td>{{ $item['percentpinj'] }}</td> <td>{{ $item['percentpinj'] }}</td>
</tr> </tr>
@php $counter++; @endphp @php $counter++; @endphp
@@ -313,6 +325,7 @@
$totalupah12 += $item['upah12']; $totalupah12 += $item['upah12'];
$totalujrah += $item['ujrah']*12; $totalujrah += $item['ujrah']*12;
$totalonepercent += $item['onepercent']*12; $totalonepercent += $item['onepercent']*12;
$totaldiskaunteller += $item['diskaun'] ?? 0;
@endphp @endphp
@@ -320,13 +333,16 @@
@if($item['teller'] != $gadai[$index + 1]['teller']) @if($item['teller'] != $gadai[$index + 1]['teller'])
@php if($item['teller'] != '')$bil += ($counter-1); @endphp @php if($item['teller'] != '')$bil += ($counter-1); @endphp
<tr> <tr>
<td colspan="7"><b>{{ $counter-1 }}</b> Jumlah surat bagi teller : <b>{{ $item['teller'] }}</b></td> <td colspan="8"><b>{{ $counter-1 }}</b> Jumlah surat bagi teller : <b>{{ $item['teller'] }}</b></td>
<td><b>{{ number_format($totalberatteller,2) }} </b></td> <td><b>{{ number_format($totalberatteller,2) }} </b></td>
<td><b>{{ number_format($totalnmteller,2) }} </b></td> <td><b>{{ number_format($totalnmteller,2) }} </b></td>
<td><b>{{ number_format($totalpinjamanteller,2) }} </b></td> <td><b>{{ number_format($totalpinjamanteller,2) }} </b></td>
<td><b>{{ number_format($totalujrah,2) }}</b></td> <td><b>{{ number_format($totalujrah,2) }}</b></td>
<td><b>{{ number_format($totalonepercent,2) }}</b></td> <td><b>{{ number_format($totalonepercent,2) }}</b></td>
<td><b>{{ number_format($totalupah12,2) }} </b></td> <td><b>{{ number_format($totalupah12,2) }} </b></td>
@if($rebetAnnur)
<td><b>{{ number_format($totaldiskaunteller,2) }} </b></td>
@endif
</tr> </tr>
@@ -337,19 +353,23 @@
$totalnmteller = 0; $totalnmteller = 0;
$totalujrah = 0; $totalujrah = 0;
$totalonepercent = 0; $totalonepercent = 0;
$totaldiskaunteller = 0;
@endphp @endphp
@endif @endif
@else @else
@php $bil += ($counter-1); @endphp @php $bil += ($counter-1); @endphp
<tr> <tr>
<td colspan="7"><b>{{ $counter-1 }}</b> Jumlah surat bagi teller : <b>{{ $item['teller'] }}</b></td> <td colspan="8"><b>{{ $counter-1 }}</b> Jumlah surat bagi teller : <b>{{ $item['teller'] }}</b></td>
<td><b>{{ number_format($totalberatteller,2) }} </b></td> <td><b>{{ number_format($totalberatteller,2) }} </b></td>
<td><b>{{ number_format($totalnmteller,2) }} </b></td> <td><b>{{ number_format($totalnmteller,2) }} </b></td>
<td><b>{{ number_format($totalpinjamanteller,2) }} </b></td> <td><b>{{ number_format($totalpinjamanteller,2) }} </b></td>
<td><b>{{ number_format($totalujrah,2) }}</b></td> <td><b>{{ number_format($totalujrah,2) }}</b></td>
<td><b>{{ number_format($totalonepercent,2) }}</b></td> <td><b>{{ number_format($totalonepercent,2) }}</b></td>
<td><b>{{ number_format($totalupah12,2) }} </b></td> <td><b>{{ number_format($totalupah12,2) }} </b></td>
@if($rebetAnnur)
<td><b>{{ number_format($totaldiskaunteller,2) }} </b></td>
@endif
</tr> </tr>
@endif @endif
@@ -1,3 +1,4 @@
@php $rebetAnnur = !empty(($cawangan_info['features'] ?? [])['rebet_annur']); @endphp
<style> <style>
#header { #header {
font-family: Arial, Helvetica, sans-serif; font-family: Arial, Helvetica, sans-serif;
@@ -241,6 +242,9 @@
<th>B.Pembiayaan(RM)</th> <th>B.Pembiayaan(RM)</th>
<th>Lain-Lain Caj (RM)</th> <th>Lain-Lain Caj (RM)</th>
<th>Untung 1% (RM)</th> <th>Untung 1% (RM)</th>
@if($rebetAnnur)
<th>Diskaun Rebet (RM)</th>
@endif
<th>Pendapatan(RM)</th> <th>Pendapatan(RM)</th>
<th>Bayaran(RM)</th> <th>Bayaran(RM)</th>
<th>Jumlah(RM)</th> <th>Jumlah(RM)</th>
@@ -254,6 +258,7 @@
$totalupah = 0; $totalupah = 0;
$totalujrah = 0; $totalujrah = 0;
$totalonepercent = 0; $totalonepercent = 0;
$totaldiskaunrebate = 0;
@endphp @endphp
@foreach ($tebus as $index => $item) @foreach ($tebus as $index => $item)
@@ -266,6 +271,7 @@
$totalnm += $item['nilaimarhun']; $totalnm += $item['nilaimarhun'];
$totalujrah += $item['ujrah']; $totalujrah += $item['ujrah'];
$totalonepercent += $item['onepercent']; $totalonepercent += $item['onepercent'];
$totaldiskaunrebate += $item['diskaun_rebate'] ?? 0;
@endphp @endphp
@@ -282,6 +288,7 @@
$totalbayaranteller = 0; $totalbayaranteller = 0;
$totalujrahteller = 0; $totalujrahteller = 0;
$totalonepercentteller = 0; $totalonepercentteller = 0;
$totaldiskaunrebateteller = 0;
@endphp @endphp
@endif @endif
@else @else
@@ -297,6 +304,7 @@
$totaljumlahteller = 0; $totaljumlahteller = 0;
$totalujrahteller = 0; $totalujrahteller = 0;
$totalonepercentteller = 0; $totalonepercentteller = 0;
$totaldiskaunrebateteller = 0;
@endphp @endphp
@endif @endif
@@ -336,6 +344,9 @@
</td> </td>
<td>{{ number_format($item['ujrah'], 2) }}</td> <td>{{ number_format($item['ujrah'], 2) }}</td>
<td>{{ number_format($item['onepercent'], 2) }}</td> <td>{{ number_format($item['onepercent'], 2) }}</td>
@if($rebetAnnur)
<td>{{ number_format($item['diskaun_rebate'] ?? 0, 2) }}</td>
@endif
{{-- <td>{{ number_format($item['bakiupah'], 2) }}</td> --}} {{-- <td>{{ number_format($item['bakiupah'], 2) }}</td> --}}
<td> <td>
@php @php
@@ -371,6 +382,7 @@
$totalbayaranteller += $item['bakipjm']; // $totalbayaranteller += $item['bakipjm']; //
$totalujrahteller += $item['ujrah']; $totalujrahteller += $item['ujrah'];
$totalonepercentteller += $item['onepercent']; $totalonepercentteller += $item['onepercent'];
$totaldiskaunrebateteller += $item['diskaun_rebate'] ?? 0;
@endphp @endphp
@php @php
@@ -388,6 +400,9 @@
<td><b>{{ number_format($totalpinjamanteller, 2) }} </b></td> <td><b>{{ number_format($totalpinjamanteller, 2) }} </b></td>
<td><b>{{ number_format($totalujrahteller, 2) }} </b></td> <td><b>{{ number_format($totalujrahteller, 2) }} </b></td>
<td><b>{{ number_format($totalonepercentteller, 2) }} </b></td> <td><b>{{ number_format($totalonepercentteller, 2) }} </b></td>
@if($rebetAnnur)
<td><b>{{ number_format($totaldiskaunrebateteller ?? 0, 2) }} </b></td>
@endif
<td><b>{{ number_format($totalupahteller, 2) }} </b></td> <td><b>{{ number_format($totalupahteller, 2) }} </b></td>
<td><b>{{ number_format($totalbayaranteller, 2) }} </b></td> <td><b>{{ number_format($totalbayaranteller, 2) }} </b></td>
<td><b>{{ number_format($totaljumlahteller, 2) }} </b></td> <td><b>{{ number_format($totaljumlahteller, 2) }} </b></td>
@@ -402,6 +417,7 @@
$totaljumlahteller = 0; $totaljumlahteller = 0;
$totalujrahteller = 0; $totalujrahteller = 0;
$totalonepercentteller = 0; $totalonepercentteller = 0;
$totaldiskaunrebateteller = 0;
@endphp @endphp
@endif @endif
@else @else
@@ -412,6 +428,9 @@
<td><b>{{ number_format($totalpinjamanteller, 2) }} </b></td> <td><b>{{ number_format($totalpinjamanteller, 2) }} </b></td>
<td><b>{{ number_format($totalujrahteller, 2) }} </b></td> <td><b>{{ number_format($totalujrahteller, 2) }} </b></td>
<td><b>{{ number_format($totalonepercentteller, 2) }} </b></td> <td><b>{{ number_format($totalonepercentteller, 2) }} </b></td>
@if($rebetAnnur)
<td><b>{{ number_format($totaldiskaunrebateteller ?? 0, 2) }} </b></td>
@endif
<td><b>{{ number_format($totalupahteller, 2) }} </b></td> <td><b>{{ number_format($totalupahteller, 2) }} </b></td>
<td><b>{{ number_format($totalbayaranteller, 2) }} </b></td> <td><b>{{ number_format($totalbayaranteller, 2) }} </b></td>
<td><b>{{ number_format($totaljumlahteller, 2) }} </b></td> <td><b>{{ number_format($totaljumlahteller, 2) }} </b></td>
@@ -652,6 +652,13 @@
{{ number_format($penebusan['onepercent'] + $penebusan['ujrah'], 2) }}</strong> {{ number_format($penebusan['onepercent'] + $penebusan['ujrah'], 2) }}</strong>
</td> </td>
</tr> </tr>
@if(!empty(($cawangan_info['features'] ?? [])['rebet_annur']))
<tr>
<td style="width:10px">(-) Diskaun Promosi</td>
<td style="width:10px">: RM
{{ number_format($gadai['diskaun'] ?? 0, 2) }} </td>
</tr>
@endif
<tr> <tr>
<td></td> <td></td>
</tr> </tr>
@@ -885,6 +892,13 @@
{{ number_format($penebusan['onepercent'] + $penebusan['ujrah'], 2) }}</strong> {{ number_format($penebusan['onepercent'] + $penebusan['ujrah'], 2) }}</strong>
</td> </td>
</tr> </tr>
@if(!empty(($cawangan_info['features'] ?? [])['rebet_annur']))
<tr>
<td style="width:10px">(-) Diskaun Promosi</td>
<td style="width:10px">: RM
{{ number_format($gadai['diskaun'] ?? 0, 2) }} </td>
</tr>
@endif
<tr> <tr>
<td></td> <td></td>
</tr> </tr>
+3
View File
@@ -6,6 +6,9 @@
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script> <script>
$(document).ready(function () { $(document).ready(function () {
if (window.self !== window.top) {
return;
}
window.print(); window.print();
window.onfocus=function(){ window.close();} window.onfocus=function(){ window.close();}
}); });
@@ -395,6 +395,9 @@
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script> <script>
$(document).ready(function() { $(document).ready(function() {
if (window.self !== window.top) {
return;
}
window.print(); window.print();
window.onfocus = function() { window.onfocus = function() {
window.close(); window.close();
+6
View File
@@ -193,6 +193,10 @@ Route::get('/permohonan',['as'=>'permohonan.index','uses' => 'KhazanahController
// Pembiayaan Online — PC // Pembiayaan Online — PC
Route::get('/pembiayaan-online/pc',['as'=>'pembiayaan.online.pc','uses'=>'PembiayaanOnlineController@index'])->middleware('auth','khazanah'); Route::get('/pembiayaan-online/pc',['as'=>'pembiayaan.online.pc','uses'=>'PembiayaanOnlineController@index'])->middleware('auth','khazanah');
Route::put('/pembiayaan-online/pc/lines/{id}',['as'=>'pembiayaan.online.pc.update','uses'=>'PembiayaanOnlineController@updateLine'])->middleware('auth','khazanah'); Route::put('/pembiayaan-online/pc/lines/{id}',['as'=>'pembiayaan.online.pc.update','uses'=>'PembiayaanOnlineController@updateLine'])->middleware('auth','khazanah');
Route::post('/pembiayaan-online/pc/lines/{id}/verify',['as'=>'pembiayaan.online.pc.verify','uses'=>'PembiayaanOnlineController@verifyLine'])->middleware('auth','khazanah');
Route::post('/pembiayaan-online/pc/lines/{id}/unverify',['as'=>'pembiayaan.online.pc.unverify','uses'=>'PembiayaanOnlineController@unverifyLine'])->middleware('auth','khazanah');
Route::get('/pembiayaan-online/pc/lines/{id}/bukti-akaun',['as'=>'pembiayaan.online.pc.bukti.akaun','uses'=>'PembiayaanOnlineController@viewBuktiAkaun'])->middleware('auth','khazanah');
Route::get('/pembiayaan-online/pc/lines/{id}/sag',['as'=>'pembiayaan.online.pc.sag','uses'=>'PembiayaanOnlineController@viewSag'])->middleware('auth','khazanah');
Route::post('/pembiayaan-online/pc/batches/submit',['as'=>'pembiayaan.online.pc.submit','uses'=>'PembiayaanOnlineController@submitBatch'])->middleware('auth','khazanah'); Route::post('/pembiayaan-online/pc/batches/submit',['as'=>'pembiayaan.online.pc.submit','uses'=>'PembiayaanOnlineController@submitBatch'])->middleware('auth','khazanah');
Route::get('/pembiayaan-online/pc/batches/{batchId}',['as'=>'pembiayaan.online.pc.batch','uses'=>'PembiayaanOnlineController@showBatch'])->middleware('auth','khazanah'); Route::get('/pembiayaan-online/pc/batches/{batchId}',['as'=>'pembiayaan.online.pc.batch','uses'=>'PembiayaanOnlineController@showBatch'])->middleware('auth','khazanah');
Route::get('/pembiayaan-online/pc/paid',['as'=>'pembiayaan.online.pc.paid','uses'=>'PembiayaanOnlineController@paidIndex'])->middleware('auth','khazanah'); Route::get('/pembiayaan-online/pc/paid',['as'=>'pembiayaan.online.pc.paid','uses'=>'PembiayaanOnlineController@paidIndex'])->middleware('auth','khazanah');
@@ -217,6 +221,8 @@ Route::post('/pembiayaan-online/operasi/{kodcaw}/lines/{id}/reject',['as'=>'pemb
Route::post('/pembiayaan-online/operasi/{kodcaw}/batches/{batchId}/approve',['as'=>'pembiayaan.online.operasi.approve.batch','uses'=>'PembiayaanOnlineController@operasiApproveBatch'])->middleware('auth','operasi'); Route::post('/pembiayaan-online/operasi/{kodcaw}/batches/{batchId}/approve',['as'=>'pembiayaan.online.operasi.approve.batch','uses'=>'PembiayaanOnlineController@operasiApproveBatch'])->middleware('auth','operasi');
Route::post('/pembiayaan-online/operasi/{kodcaw}/lines/{id}/paid',['as'=>'pembiayaan.online.operasi.paid','uses'=>'PembiayaanOnlineController@operasiMarkPaid'])->middleware('auth','operasi'); Route::post('/pembiayaan-online/operasi/{kodcaw}/lines/{id}/paid',['as'=>'pembiayaan.online.operasi.paid','uses'=>'PembiayaanOnlineController@operasiMarkPaid'])->middleware('auth','operasi');
Route::post('/pembiayaan-online/operasi/{kodcaw}/batches/{batchId}/paid',['as'=>'pembiayaan.online.operasi.paid.batch','uses'=>'PembiayaanOnlineController@operasiMarkPaidBatch'])->middleware('auth','operasi'); Route::post('/pembiayaan-online/operasi/{kodcaw}/batches/{batchId}/paid',['as'=>'pembiayaan.online.operasi.paid.batch','uses'=>'PembiayaanOnlineController@operasiMarkPaidBatch'])->middleware('auth','operasi');
Route::get('/pembiayaan-online/operasi/{kodcaw}/lines/{id}/bukti-akaun',['as'=>'pembiayaan.online.operasi.bukti.akaun','uses'=>'PembiayaanOnlineController@operasiViewBuktiAkaun'])->middleware('auth','operasi');
Route::get('/pembiayaan-online/operasi/{kodcaw}/lines/{id}/sag',['as'=>'pembiayaan.online.operasi.sag','uses'=>'PembiayaanOnlineController@operasiViewSag'])->middleware('auth','operasi');
Route::get('/permohonan/rekod',['as'=>'permohonan.rekod','uses' => 'KhazanahController@RekodPermohonan'])->middleware('auth','khazanah'); Route::get('/permohonan/rekod',['as'=>'permohonan.rekod','uses' => 'KhazanahController@RekodPermohonan'])->middleware('auth','khazanah');
Route::post('/permohonan/simpan',['as'=>'permohonan.simpan','uses' => 'KhazanahController@SimpanPermohonan'])->middleware('auth','khazanah'); Route::post('/permohonan/simpan',['as'=>'permohonan.simpan','uses' => 'KhazanahController@SimpanPermohonan'])->middleware('auth','khazanah');
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');