Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8eef16eeed | |||
| 6e1ce76c50 | |||
| a127b9d8ce | |||
| be96576f3d |
+1
-1
@@ -46,5 +46,5 @@ AWS_BUCKET=
|
||||
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
|
||||
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
|
||||
|
||||
MYKAD_READER_PORT=17321
|
||||
MYKAD_READER_PORT=8085
|
||||
MYKAD_READER_ENABLED_CAWANGAN='' # IF NO CAWANGAN STATED, ALL CAWANGAN IS ENABLED
|
||||
|
||||
+5
-5
@@ -3,14 +3,14 @@ APP_ENV=staging
|
||||
APP_VERSION=v2.2-staging
|
||||
APP_KEY=base64:O1XZDqK4H6+3GdrODgCaLr2l+OoWvgVhYr0GJ1KizW8=
|
||||
APP_DEBUG=true
|
||||
APP_URL=https://staging.erahn.com.my
|
||||
APP_URL=http://172.16.6.200:8091
|
||||
|
||||
HTTP_PORT=8091
|
||||
MYSQL_PUBLISH_PORT=3309
|
||||
|
||||
API_URL=https://api-staging.erahn.com.my
|
||||
API_URL_KOOP=https://api-staging.erahn.com.my
|
||||
API_URL_PKB=https://api-staging.erahn.com.my
|
||||
API_URL=http://172.16.6.200:8090
|
||||
API_URL_KOOP=http://172.16.6.200:8090
|
||||
API_URL_PKB=http://172.16.6.200:8090
|
||||
API_ARRAHNBID=http://lelong.test/api/
|
||||
|
||||
LOG_CHANNEL=stack
|
||||
@@ -54,5 +54,5 @@ AWS_BUCKET=
|
||||
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
|
||||
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
|
||||
|
||||
MYKAD_READER_PORT=17321
|
||||
MYKAD_READER_PORT=8085
|
||||
MYKAD_READER_ENABLED_CAWANGAN='' # IF NO CAWANGAN STATED, ALL CAWANGAN IS ENABLED
|
||||
@@ -1,50 +0,0 @@
|
||||
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
|
||||
@@ -105,7 +105,7 @@ class AliranTunaiController extends Controller
|
||||
|
||||
$gadai_tebus = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/gadaitebus/listharini/'.$auth_user['cawangan'],['tarikh' => $harini->toDateString()])->json();
|
||||
|
||||
$addtunai = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/getAddTunai/' . $auth_user['cawangan'] . '/kodlaluan/',['kodlaluan' => $auth_user['name']])->json();
|
||||
$addtunai = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/getAddTunai/' . $auth_user['cawangan'] . '/kodlaluan',['kodlaluan' => $auth_user['name']])->json();
|
||||
|
||||
$tuntutbaki = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/TuntutBaki/'.$auth_user['cawangan'])->json();
|
||||
|
||||
@@ -361,7 +361,8 @@ class AliranTunaiController extends Controller
|
||||
$pendahuluan = $alirantunai['tambah'];
|
||||
$serahan = $alirantunai['kurang'];
|
||||
|
||||
$addtunai = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/getAddTunai/' . $auth_user['cawangan'] . '/kodlaluan/',['kodlaluan' => $auth_user['name']])->json();
|
||||
$addtunai = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/getAddTunai/' . $auth_user['cawangan'] . '/kodlaluan',['kodlaluan' => $auth_user['name']])->json();
|
||||
$addtunai = is_array($addtunai) ? $addtunai : [];
|
||||
|
||||
$gadai = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/gadai/laporan/'. $auth_user['cawangan'] .'/'. $current->toDateString())->json();
|
||||
$tebus = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/tebus/laporan/'. $auth_user['cawangan'] .'/'. $current->toDateString())->json();
|
||||
@@ -617,7 +618,7 @@ class AliranTunaiController extends Controller
|
||||
|
||||
$alirantunai = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/GetCurrentTunai/' . $auth_user['cawangan'],['kodlaluan' => $auth_user['name']])->json();
|
||||
|
||||
$addtunai = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/getAddTunai/' . $auth_user['cawangan'] . '/kodlaluan/',['kodlaluan' => $auth_user['name']])->json();
|
||||
$addtunai = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/getAddTunai/' . $auth_user['cawangan'] . '/kodlaluan',['kodlaluan' => $auth_user['name']])->json();
|
||||
|
||||
$teller = $auth_user['name'];
|
||||
|
||||
@@ -658,7 +659,7 @@ class AliranTunaiController extends Controller
|
||||
$cawangan=Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json();
|
||||
$cawangan_detail=$cawangan[0];
|
||||
|
||||
$addtunai = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/getAddTunai/' . $auth_user['cawangan'] . '/kodlaluan/',['kodlaluan' => $auth_user['name']])->json();
|
||||
$addtunai = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/getAddTunai/' . $auth_user['cawangan'] . '/kodlaluan',['kodlaluan' => $auth_user['name']])->json();
|
||||
|
||||
$teller = $auth_user['name'];
|
||||
|
||||
|
||||
@@ -358,7 +358,7 @@ class CustomersController extends Controller
|
||||
])->json();
|
||||
}
|
||||
|
||||
$customer_payload = [
|
||||
$customer_info = Http::withOptions(['verify' => config('app.api_verify')])->post(config('api.url') . '/api/customers/create/' . $auth_user['cawangan'], [
|
||||
'kodcaw' => $auth_user['cawangan'],
|
||||
'nopelanggan' => $no_pelanggan,
|
||||
'nokpbaru' => $nokpbaru,
|
||||
@@ -385,14 +385,7 @@ class CustomersController extends Controller
|
||||
'nota_pekerjaan' => $request->nota_pekerjaan,
|
||||
'notaarcc' => $request->notaarcc,
|
||||
'tujuangadai' => $request->tujuan_gadai,
|
||||
];
|
||||
|
||||
if ($request->filled('photo_base64')) {
|
||||
$customer_payload['photo_base64'] = $request->input('photo_base64');
|
||||
$customer_payload['photo_mime'] = $request->input('photo_mime') ?: 'image/jpeg';
|
||||
}
|
||||
|
||||
$customer_info = Http::withOptions(['verify' => config('app.api_verify')])->post(config('api.url') . '/api/customers/create/' . $auth_user['cawangan'], $customer_payload);
|
||||
]);
|
||||
|
||||
Session::put('customer_info', $customer_info);
|
||||
Session::put('noic', $request->noic);
|
||||
@@ -581,113 +574,4 @@ class CustomersController extends Controller
|
||||
return redirect()->back()->with('error', 'Gagal mengemaskini status anggota. Sila cuba semula.');
|
||||
}
|
||||
}
|
||||
|
||||
public function printMaklumat(Request $request)
|
||||
{
|
||||
$noic = $request->query('noic') ?: Session::get('noic');
|
||||
if (empty($noic)) {
|
||||
return redirect('/pelanggan');
|
||||
}
|
||||
|
||||
$auth_user = Auth::user();
|
||||
$api_url = config('api.url');
|
||||
$verify = ['verify' => config('app.api_verify')];
|
||||
$kodcaw = $auth_user['cawangan'];
|
||||
|
||||
$customer = Http::withOptions($verify)->get($api_url . '/api/customers/' . $noic)->json();
|
||||
if (!is_array($customer) || (empty($customer['nama']) && empty($customer['nopelanggan']) && empty($customer['kpbaru']) && empty($customer['kplama']))) {
|
||||
abort(404, 'Pelanggan tidak dijumpai.');
|
||||
}
|
||||
|
||||
$cawanganResp = Http::withOptions($verify)->get($api_url . '/api/cawangan/detail/' . $kodcaw)->json();
|
||||
$cawangan_detail = (is_array($cawanganResp) && isset($cawanganResp[0]))
|
||||
? $cawanganResp[0]
|
||||
: (is_array($cawanganResp) ? $cawanganResp : []);
|
||||
|
||||
$banks = Http::withOptions($verify)->get($api_url . '/api/bank')->json();
|
||||
$pekerjaanList = Http::withOptions($verify)->get($api_url . '/api/pekerjaan')->json();
|
||||
|
||||
$poskodKod = $customer['poskod'] ?? '';
|
||||
$poskod = [];
|
||||
if ($poskodKod !== '' && $poskodKod !== null) {
|
||||
$poskodResp = Http::withOptions($verify)->get($api_url . '/api/poskod/' . $poskodKod)->json();
|
||||
if (is_array($poskodResp)) {
|
||||
$poskod = $poskodResp;
|
||||
}
|
||||
}
|
||||
|
||||
$daerahNama = 'NIL';
|
||||
$negeriNama = 'NIL';
|
||||
if (!empty($poskod['koddaerah'])) {
|
||||
$daerahResp = Http::withOptions($verify)->get($api_url . '/api/daerah/' . $poskod['koddaerah'])->json();
|
||||
$daerahNama = is_array($daerahResp) ? ($daerahResp['namadaerah'] ?? 'NIL') : 'NIL';
|
||||
}
|
||||
if (!empty($poskod['kodnegeri'])) {
|
||||
$negeriResp = Http::withOptions($verify)->get($api_url . '/api/negeri/' . $poskod['kodnegeri'])->json();
|
||||
$negeriNama = is_array($negeriResp) ? ($negeriResp['negeri'] ?? 'NIL') : 'NIL';
|
||||
}
|
||||
|
||||
$bankNama = $this->lookupListValue($banks, 'abbreviation', $customer['kodbank'] ?? null, 'name');
|
||||
$pekerjaanNama = $this->lookupListValue($pekerjaanList, 'kodkerja', $customer['kodkerja'] ?? null, 'keterangan');
|
||||
if (($customer['kodkerja'] ?? '') == '6' && !empty($customer['nota_pekerjaan'])) {
|
||||
$pekerjaanNama = $customer['nota_pekerjaan'];
|
||||
}
|
||||
|
||||
$photo_svg = '<svg xmlns="http://www.w3.org/2000/svg" width="240" height="320" viewBox="0 0 240 320">'
|
||||
. '<rect fill="#d9dee5" width="240" height="320"/>'
|
||||
. '<circle cx="120" cy="118" r="52" fill="#8b949e"/>'
|
||||
. '<ellipse cx="120" cy="286" rx="90" ry="92" fill="#8b949e"/>'
|
||||
. '</svg>';
|
||||
$photo_src = 'data:image/svg+xml;base64,' . base64_encode($photo_svg);
|
||||
if (!empty($customer['photo_base64'])) {
|
||||
$mime = $customer['photo_mime'] ?? 'image/jpeg';
|
||||
$photo_src = 'data:' . $mime . ';base64,' . $customer['photo_base64'];
|
||||
}
|
||||
|
||||
return view('print.maklumat_pelanggan', [
|
||||
'cawangan' => $cawangan_detail['namacaw'] ?? ($cawangan_detail['details_caw'] ?? $kodcaw),
|
||||
'kodcaw' => $kodcaw,
|
||||
'alamat1' => $cawangan_detail['alamat1'] ?? '',
|
||||
'alamat2' => $cawangan_detail['alamat2'] ?? '',
|
||||
'notel' => $cawangan_detail['notel'] ?? '',
|
||||
'tarikh' => Carbon::now()->format('d/m/Y'),
|
||||
'nama' => $this->printBlank($customer['nama'] ?? null),
|
||||
'nokp' => $this->printBlank(!empty($customer['kpbaru']) ? $customer['kpbaru'] : ($customer['kplama'] ?? $noic)),
|
||||
'nopelanggan' => $this->printBlank($customer['nopelanggan'] ?? null),
|
||||
'status' => (!empty($customer['tag_anggota']) && $customer['tag_anggota'] == 1) ? 'Anggota Koperasi' : 'Pelanggan',
|
||||
'telefon' => $this->printBlank($customer['telefon'] ?? null),
|
||||
'telefon2' => $this->printBlank($customer['telefon2'] ?? null),
|
||||
'alamat' => $this->printBlank($customer['alamat1'] ?? null),
|
||||
'poskod' => $this->printBlank($customer['poskod'] ?? null),
|
||||
'daerah' => $daerahNama,
|
||||
'negeri' => $negeriNama,
|
||||
'bank' => $this->printBlank($bankNama),
|
||||
'noakaun' => $this->printBlank($customer['noakaun'] ?? null),
|
||||
'pekerjaan' => $this->printBlank($pekerjaanNama),
|
||||
'nota' => $this->printBlank($customer['nota'] ?? null),
|
||||
'photo_src' => $photo_src,
|
||||
]);
|
||||
}
|
||||
|
||||
private function printBlank($value)
|
||||
{
|
||||
if ($value === null) {
|
||||
return 'NIL';
|
||||
}
|
||||
$value = is_string($value) ? trim($value) : $value;
|
||||
return $value === '' ? 'NIL' : $value;
|
||||
}
|
||||
|
||||
private function lookupListValue($list, $key, $match, $nameKey)
|
||||
{
|
||||
if (!is_array($list) || $match === null || $match === '' || $match === '-') {
|
||||
return '';
|
||||
}
|
||||
foreach ($list as $item) {
|
||||
if (is_array($item) && ($item[$key] ?? null) == $match) {
|
||||
return $item[$nameKey] ?? '';
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -259,121 +259,6 @@ class GadaianController extends Controller
|
||||
return redirect()->route('customer_info');
|
||||
}
|
||||
|
||||
public function printBorangPengesahanOnline($norujukan)
|
||||
{
|
||||
$auth_user = Auth::user();
|
||||
$kodcaw = $auth_user['cawangan'];
|
||||
|
||||
$onlineResp = Http::withOptions(['verify' => config('app.api_verify')])
|
||||
->get(config('api.url') . '/api/pembiayaan-online/' . $kodcaw . '/by-norujukan/' . $norujukan);
|
||||
|
||||
if (!$onlineResp->successful()) {
|
||||
abort(404, 'Pembiayaan online tidak dijumpai.');
|
||||
}
|
||||
|
||||
$line = $onlineResp->json();
|
||||
if (!is_array($line) || empty($line['norujukan'])) {
|
||||
abort(404, 'Pembiayaan online tidak dijumpai.');
|
||||
}
|
||||
|
||||
return $this->renderBorangPengesahanOnline($line, $kodcaw);
|
||||
}
|
||||
|
||||
public function previewBorangPengesahanOnline(Request $request)
|
||||
{
|
||||
$auth_user = Auth::user();
|
||||
$kodcaw = $auth_user['cawangan'];
|
||||
|
||||
$line = [
|
||||
'norujukan' => $request->input('norujukan'),
|
||||
'nokp' => $request->input('nokp'),
|
||||
'nopelanggan' => $request->input('nopelanggan'),
|
||||
'nama_pelanggan' => $request->input('nama_pelanggan'),
|
||||
'pinjaman' => $request->input('pinjaman'),
|
||||
'kodbank' => $request->input('kodbank'),
|
||||
'nama_bank' => $request->input('nama_bank'),
|
||||
'noakaun' => $request->input('noakaun'),
|
||||
'nama_akaun' => $request->input('nama_akaun'),
|
||||
'created_by' => $auth_user['name'] ?? '',
|
||||
'created_at' => Carbon::now()->toDateTimeString(),
|
||||
];
|
||||
|
||||
if (empty($line['norujukan']) || empty($line['noakaun'])) {
|
||||
abort(422, 'Sila lengkapkan maklumat bank sebelum cetak borang.');
|
||||
}
|
||||
|
||||
return $this->renderBorangPengesahanOnline($line, $kodcaw);
|
||||
}
|
||||
|
||||
private function renderBorangPengesahanOnline(array $line, $kodcaw)
|
||||
{
|
||||
$auth_user = Auth::user();
|
||||
|
||||
$cawanganResp = Http::withOptions(['verify' => config('app.api_verify')])
|
||||
->get(config('api.url') . '/api/cawangan/detail/' . $kodcaw)
|
||||
->json();
|
||||
$cawangan_detail = (is_array($cawanganResp) && isset($cawanganResp[0]))
|
||||
? $cawanganResp[0]
|
||||
: (is_array($cawanganResp) ? $cawanganResp : []);
|
||||
|
||||
$nokpRaw = $line['nokp'] ?? '';
|
||||
$customer = [];
|
||||
if ($nokpRaw !== '') {
|
||||
$customerResp = Http::withOptions(['verify' => config('app.api_verify')])
|
||||
->get(config('api.url') . '/api/customers/' . $nokpRaw)
|
||||
->json();
|
||||
if (is_array($customerResp)) {
|
||||
$customer = $customerResp;
|
||||
}
|
||||
}
|
||||
|
||||
$cawangan = $cawangan_detail['namacaw']
|
||||
?? $cawangan_detail['details_caw']
|
||||
?? $kodcaw;
|
||||
$alamat1 = $cawangan_detail['alamat1'] ?? '';
|
||||
$alamat2 = $cawangan_detail['alamat2'] ?? '';
|
||||
$notel = $cawangan_detail['notel'] ?? '';
|
||||
|
||||
$nama = $line['nama_pelanggan'] ?? ($customer['nama'] ?? '');
|
||||
$nokp = !empty($customer['kpbaru']) ? $customer['kpbaru'] : ($customer['kplama'] ?? $nokpRaw);
|
||||
$nopelanggan = $line['nopelanggan'] ?? ($customer['nopelanggan'] ?? '');
|
||||
$telefon = $customer['telefon'] ?? '';
|
||||
$teller = $line['created_by'] ?? ($auth_user['name'] ?? '');
|
||||
$bank = $line['nama_bank'] ?? ($line['kodbank'] ?? '');
|
||||
$noakaun = $line['noakaun'] ?? '';
|
||||
$nama_akaun = $line['nama_akaun'] ?? $nama;
|
||||
$pinjaman = number_format((float) ($line['pinjaman'] ?? 0), 2);
|
||||
$norujukan = $line['norujukan'] ?? '';
|
||||
|
||||
$tarikhSumber = $line['created_at'] ?? null;
|
||||
try {
|
||||
$tarikh = $tarikhSumber
|
||||
? Carbon::parse($tarikhSumber)->format('d/m/Y')
|
||||
: Carbon::now()->format('d/m/Y');
|
||||
} catch (\Exception $e) {
|
||||
$tarikh = Carbon::now()->format('d/m/Y');
|
||||
}
|
||||
|
||||
return view('print.borang_pengesahan_online', compact(
|
||||
'cawangan',
|
||||
'kodcaw',
|
||||
'alamat1',
|
||||
'alamat2',
|
||||
'notel',
|
||||
'norujukan',
|
||||
'tarikh',
|
||||
'teller',
|
||||
'nama',
|
||||
'nokp',
|
||||
'nopelanggan',
|
||||
'telefon',
|
||||
'pinjaman',
|
||||
'bank',
|
||||
'noakaun',
|
||||
'nama_akaun'
|
||||
));
|
||||
}
|
||||
|
||||
public function editstore(Request $request)
|
||||
{
|
||||
$auth_user = Auth::user();
|
||||
|
||||
@@ -20,43 +20,10 @@ class KakitanganController extends Controller
|
||||
public function daftarKakitangan(){
|
||||
$api_url = config('api.url');
|
||||
$auth_user = Auth::user();
|
||||
$http = Http::withOptions(['verify' => config('app.api_verify')]);
|
||||
|
||||
$cawangan_all = $http->get($api_url . '/api/cawangan')->json();
|
||||
$cawangan_all = is_array($cawangan_all) ? $cawangan_all : [];
|
||||
$cawangan_by_kod = collect($cawangan_all)->keyBy('kodcaw');
|
||||
$cawangan_info = $cawangan_by_kod->get($auth_user['cawangan'], []);
|
||||
|
||||
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
||||
$role = Role::get();
|
||||
$kakitangan_rows = User::where('roles', '!=', 'admin')
|
||||
->get()
|
||||
->values()
|
||||
->map(function ($staff) use ($cawangan_by_kod) {
|
||||
$kod = (string) $staff->cawangan;
|
||||
if (in_array($kod, ['operasi', 'callcenter', 'admin'], true)) {
|
||||
$cawangan_nama = ucwords($kod);
|
||||
} else {
|
||||
$cawangan_nama = ucwords((string) data_get($cawangan_by_kod, $kod . '.details_caw', $kod));
|
||||
}
|
||||
|
||||
return [
|
||||
'id' => $staff->id,
|
||||
'name' => $staff->name,
|
||||
'roles' => strtoupper((string) $staff->roles),
|
||||
'role_harian' => $staff->role_harian ? strtoupper($staff->role_harian) : '-',
|
||||
'role_asal' => $staff->role_asal ? strtoupper($staff->role_asal) : '-',
|
||||
'cawangan' => $cawangan_nama,
|
||||
];
|
||||
});
|
||||
|
||||
return view('operasi.daftar_kakitangan', compact(
|
||||
'cawangan_info',
|
||||
'api_url',
|
||||
'role',
|
||||
'kakitangan_rows',
|
||||
'auth_user',
|
||||
'cawangan_all'
|
||||
));
|
||||
$kakitangan = User::all();
|
||||
return view('operasi.daftar_kakitangan',compact('cawangan_info','api_url','role','kakitangan','auth_user'));
|
||||
}
|
||||
|
||||
public function registerStaff(Request $request){
|
||||
|
||||
@@ -349,7 +349,7 @@ class KhazanahController extends Controller
|
||||
|
||||
$gadai_tebus = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/gadaitebus/listharini/'.$auth_user['cawangan'].'/teller/',['tarikh' => $harini->toDateString(),'teller' => $ls['kodlaluan']])->json();
|
||||
$tuntutbaki = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/TuntutBaki/'.$auth_user['cawangan'].'/teller/',['teller' => $ls['kodlaluan']])->json();
|
||||
$addtunai = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/getAddTunai/'.$auth_user['cawangan'].'/kodlaluan/',['kodlaluan' => $ls['kodlaluan']])->json();
|
||||
$addtunai = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/getAddTunai/'.$auth_user['cawangan'].'/kodlaluan',['kodlaluan' => $ls['kodlaluan']])->json();
|
||||
|
||||
array_push($arraygadaitebus,$gadai_tebus);
|
||||
array_push($arraytuntutbaki,$tuntutbaki);
|
||||
@@ -3990,7 +3990,7 @@ class KhazanahController extends Controller
|
||||
|
||||
}
|
||||
|
||||
public function cetakLaporanGadaiUjrah(Request $request){
|
||||
public function cetakLaporanGadaiUjrah(Request $request){
|
||||
|
||||
$api_url = config('api.url');
|
||||
$auth_user = Auth::user();
|
||||
@@ -4012,21 +4012,12 @@ class KhazanahController extends Controller
|
||||
$hingga_date = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0];
|
||||
}
|
||||
|
||||
$reportGadai = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/gadailaporanRangeDate/'. $auth_user['cawangan'] ,['mula' => $mula_date,'akhir' => $hingga_date])->json();
|
||||
$gadai = $reportGadai['gadai'];
|
||||
$statistik =$reportGadai['statistik'];
|
||||
$reportPembiayaan= $statistik['reportPembiayaan'];
|
||||
$reportLoanAmount=$statistik['reportLoanAmount'];
|
||||
$reportMarhunValue=$statistik['reportMarhunValue'];
|
||||
$reportMarhunMargin=$statistik['reportMarhunMargin'];
|
||||
$reportCustomerJob=$statistik['reportCustomerJob'];
|
||||
$reportCustomerRace=$statistik['reportCustomerRace'];
|
||||
// dd($reportCustomerRace);
|
||||
|
||||
|
||||
$gadai = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/gadailaporanRangeDate/'. $auth_user['cawangan'] ,['mula' => $mula_date,'akhir' => $hingga_date])->json();
|
||||
$cawangan=Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json();
|
||||
$cawangan_detail=$cawangan[0];
|
||||
|
||||
return view('print.laporan_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','tarikh_cetak','mula_date','api_url','hingga_date'));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -87,19 +87,13 @@ class OperasiController extends Controller
|
||||
'siri' => $request->siri
|
||||
])->json();
|
||||
|
||||
$updateData = [
|
||||
$updatelulus = Http::withOptions(['verify' => config('app.api_verify')])->put(config('api.url') . '/api/UpdateKelulusan/' . $request->kodcaw . '/' . $norujukan, [
|
||||
'sahkan' => 1,
|
||||
'namaoperasi' => $request->namaoperasi,
|
||||
'siri' => $request->siri
|
||||
];
|
||||
|
||||
if ($request->has('actions')) {
|
||||
$updateData['actions'] = $request->actions;
|
||||
}
|
||||
|
||||
$updatelulus = Http::withOptions(['verify' => config('app.api_verify')])->put(config('api.url') . '/api/UpdateKelulusan/' . $request->kodcaw . '/' . $norujukan, $updateData)->json();
|
||||
}else{
|
||||
$updatelulus = Http::withOptions(['verify' => config('app.api_verify')])->put(config('api.url') . '/api/UpdateHapusAnsuran',[
|
||||
])->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,
|
||||
@@ -145,49 +139,6 @@ class OperasiController extends Controller
|
||||
return response()->json($updatelulus, 200);
|
||||
}
|
||||
|
||||
public function createKelulusanByKhazanah(Request $request)
|
||||
{
|
||||
$auth_user = Auth::user();
|
||||
$api_url = config('api.url');
|
||||
|
||||
$current = Carbon::now();
|
||||
$current = new Carbon();
|
||||
|
||||
$norujukan = $request->norujukan;
|
||||
|
||||
$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();
|
||||
|
||||
if(isset($getsiri['siri']))
|
||||
{
|
||||
$siri = $getsiri['siri'] + 1;
|
||||
}else{
|
||||
$siri = 1;
|
||||
}
|
||||
|
||||
$createlulus = Http::withOptions(['verify' => config('app.api_verify')])->post(config('api.url') . '/api/CreateKelulusan/' . $auth_user['cawangan'] . '/' . $norujukan . '/roles/khazanah', [
|
||||
'komen' => $request->komen,
|
||||
'dategadai' => $current->toDateString(),
|
||||
'bilgadai' => 1,
|
||||
'siri' => $siri,
|
||||
'margin' => $request->margin,
|
||||
'berat' => $request->berat,
|
||||
'nilaimarhun' => $request->nilaimarhun,
|
||||
'status' => $request->status,
|
||||
'jumpinjam' => $request->jumpinjam,
|
||||
'jenistebus' => "G",
|
||||
'teller' => $request->teller,
|
||||
'peloperasi' => "operasi",
|
||||
'pelulus' => "operasi",
|
||||
'actions' => "Mohon Pengesahan Pembayaran Pampasan"
|
||||
])->json();
|
||||
|
||||
event(new OperasiNotice($auth_user['cawangan'],$auth_user['name']));
|
||||
|
||||
return response()->json($siri,201);
|
||||
}
|
||||
|
||||
public function updatekelulusananggota(Request $request)
|
||||
{
|
||||
$auth_user = Auth::user();
|
||||
@@ -198,7 +149,7 @@ class OperasiController extends Controller
|
||||
$kodcaw = $request->kodcaw;
|
||||
$komen = $request->komenkelulusan;
|
||||
$namaoperasi = $request->namaoperasi;
|
||||
$taglulus = $request->taglulus; // contoh: 'Y' = lulus, 'N' = batalmarginmutu()
|
||||
$taglulus = $request->taglulus; // contoh: 'Y' = lulus, 'N' = batal
|
||||
|
||||
// 1️⃣ Tentukan status kelulusan
|
||||
$status = ($taglulus == 'Y') ? 1 : 2; // 1 = Lulus, 2 = Batal/Tolak
|
||||
@@ -453,103 +404,4 @@ class OperasiController extends Controller
|
||||
|
||||
return view('operasi.kelulusan_anggota', compact('cawangan_info', 'api_url', 'arraykelulusan'));
|
||||
}
|
||||
|
||||
public function marginmutu()
|
||||
{
|
||||
$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();
|
||||
|
||||
// Get MaxMutuEmas data from API
|
||||
$maxmutuemas = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/maxmutuemas')->json();
|
||||
|
||||
return view('operasi.marginmutu', compact('cawangan_info', 'api_url', 'maxmutuemas'));
|
||||
}
|
||||
|
||||
public function editMarginMutu()
|
||||
{
|
||||
$auth_user = Auth::user();
|
||||
$api_url = config('api.url');
|
||||
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
||||
|
||||
return view('operasi.edit_marginmutu', compact('cawangan_info', 'api_url'));
|
||||
}
|
||||
|
||||
public function laporanAudit()
|
||||
{
|
||||
$auth_user = Auth::user();
|
||||
$api_url = config('api.url');
|
||||
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
||||
|
||||
return view('homepage.operasi.laporan-audit', compact('cawangan_info', 'api_url'));
|
||||
}
|
||||
|
||||
public function cetakLaporanAuditTrail(Request $request)
|
||||
{
|
||||
$api_url = config('api.url');
|
||||
$auth_user = Auth::user();
|
||||
$current = Carbon::now();
|
||||
$current = new Carbon();
|
||||
$tarikh_cetak = $current->toDateString();
|
||||
|
||||
if($request->dateaudit == null){
|
||||
$date = $current->toDateString();
|
||||
}else{
|
||||
$split_date = explode('-', $request->dateaudit);
|
||||
$date = $split_date[0] . '-' . $split_date[1] . '-' . $split_date[2];
|
||||
}
|
||||
|
||||
if($request->dateaudit_till == null){
|
||||
$date_till = $current->toDateString();
|
||||
}else{
|
||||
$split_date_till = explode('-', $request->dateaudit_till);
|
||||
$date_till = $split_date_till[0] . '-' . $split_date_till[1] . '-' . $split_date_till[2];
|
||||
}
|
||||
|
||||
$audittrail_raw = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/reports/audittrail/operasi',['date' => $date,'date_till' => $date_till])->json();
|
||||
if(!$audittrail_raw){
|
||||
return redirect()->back()->with('errormessage', 'Tiada data pada tarikh tersebut.');
|
||||
}
|
||||
|
||||
// Transform the data to match view format
|
||||
$audittrail = [];
|
||||
foreach($audittrail_raw as $item) {
|
||||
$created_at = \Carbon\Carbon::parse($item['created_at']);
|
||||
|
||||
// Format differences for display
|
||||
$differences_text = '-';
|
||||
if (isset($item['differences']) && !empty($item['differences'])) {
|
||||
$diff_parts = [];
|
||||
foreach ($item['differences'] as $field => $changes) {
|
||||
$old = $changes['old'] ?? 'null';
|
||||
$new = $changes['new'] ?? 'null';
|
||||
$diff_parts[] = "{$field}: {$old} → {$new}";
|
||||
}
|
||||
$differences_text = implode('; ', $diff_parts);
|
||||
}
|
||||
|
||||
$audittrail[] = [
|
||||
'tarikh' => $created_at->format('d/m/Y'),
|
||||
'masa' => $created_at->format('H:i:s'),
|
||||
'users' => $item['users'],
|
||||
'actions' => $item['actions'],
|
||||
'differ' => $differences_text
|
||||
];
|
||||
}
|
||||
|
||||
$cawangan_detail = [
|
||||
'kodcaw' => 'operasi',
|
||||
'namacaw' => 'Operasi Ar-Rahn',
|
||||
'alamat1' => 'Lot 107, Jalan Parit Dalam,',
|
||||
'alamat2' => 'Seksyen 8',
|
||||
'poskod' => '15000',
|
||||
'bandar' => 'Kota Bahru',
|
||||
'negeri' => 'Kelantan',
|
||||
'notel' => '03-12345678',
|
||||
'nofaks' => '03-12345678',
|
||||
];
|
||||
|
||||
return view('print.laporan_audittrail_operasi', compact('audittrail','cawangan_detail','tarikh_cetak','date','date_till','api_url'));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
@@ -132,14 +131,9 @@ class PembiayaanOnlineController extends Controller
|
||||
return redirect()->back()->with('error', $msg);
|
||||
}
|
||||
|
||||
$payload = $res->json();
|
||||
$batchNo = is_array($payload) ? ($payload['batch']['batch_no'] ?? '') : '';
|
||||
$appended = is_array($payload) && !empty($payload['appended']);
|
||||
$message = $appended
|
||||
? ('Rekod ditambah ke batch' . ($batchNo ? ' ' . $batchNo : '') . '.')
|
||||
: ('Batch dihantar ke Operasi' . ($batchNo ? ': ' . $batchNo : '.'));
|
||||
|
||||
return redirect()->route('pembiayaan.online.pc')->with('message', $message);
|
||||
$batchNo = $res->json()['batch']['batch_no'] ?? '';
|
||||
return redirect()->route('pembiayaan.online.pc')
|
||||
->with('message', 'Batch dihantar ke Operasi' . ($batchNo ? ': ' . $batchNo : '.'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -352,98 +346,6 @@ class PembiayaanOnlineController extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Operasi: printable batch kelulusan form.
|
||||
*/
|
||||
public function operasiPrintBatch($kodcaw, $batchId)
|
||||
{
|
||||
$api_url = config('api.url');
|
||||
|
||||
$detail = $this->api()
|
||||
->get($api_url . '/api/pembiayaan-online/operasi/' . $kodcaw . '/batches/' . $batchId)
|
||||
->json();
|
||||
|
||||
if (!is_array($detail) || empty($detail['batch'])) {
|
||||
return redirect()
|
||||
->route('pembiayaan.online.operasi')
|
||||
->with('error', 'Batch tidak dijumpai.');
|
||||
}
|
||||
|
||||
$batch = $detail['batch'];
|
||||
$lines = $detail['lines'] ?? [];
|
||||
if (!is_array($lines)) {
|
||||
$lines = [];
|
||||
}
|
||||
|
||||
$cawanganResp = $this->api()
|
||||
->get($api_url . '/api/cawangan/detail/' . $kodcaw)
|
||||
->json();
|
||||
$cawangan_detail = (is_array($cawanganResp) && isset($cawanganResp[0]))
|
||||
? $cawanganResp[0]
|
||||
: (is_array($cawanganResp) ? $cawanganResp : []);
|
||||
|
||||
$cawangan = $cawangan_detail['namacaw']
|
||||
?? $cawangan_detail['details_caw']
|
||||
?? $cawangan_detail['nama']
|
||||
?? $kodcaw;
|
||||
$alamat1 = $cawangan_detail['alamat1'] ?? '';
|
||||
$alamat2 = $cawangan_detail['alamat2'] ?? '';
|
||||
$notel = $cawangan_detail['notel'] ?? '';
|
||||
|
||||
$batchNo = $batch['batch_no'] ?? '-';
|
||||
$slot = $batch['slot'] ?? '-';
|
||||
$status = $batch['status'] ?? '-';
|
||||
$dihantarOleh = $batch['pc_submitted_by'] ?? '-';
|
||||
|
||||
$jumlah = (float) ($batch['jumlah_keseluruhan'] ?? 0);
|
||||
if ($jumlah <= 0 && count($lines) > 0) {
|
||||
$jumlah = (float) collect($lines)->sum(function ($line) {
|
||||
return (float) ($line['pinjaman'] ?? 0);
|
||||
});
|
||||
}
|
||||
|
||||
$opsBy = Auth::user()['name'] ?? '';
|
||||
foreach ($lines as $line) {
|
||||
if (!empty($line['ops_by'])) {
|
||||
$opsBy = $line['ops_by'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$tarikh = $this->formatPrintDate($batch['tarikh'] ?? null);
|
||||
$dihantarPada = $this->formatPrintDate($batch['submitted_at'] ?? null, true);
|
||||
|
||||
return view('print.borang_batch_pembiayaan_online', compact(
|
||||
'cawangan',
|
||||
'kodcaw',
|
||||
'alamat1',
|
||||
'alamat2',
|
||||
'notel',
|
||||
'tarikh',
|
||||
'batchNo',
|
||||
'slot',
|
||||
'status',
|
||||
'dihantarOleh',
|
||||
'dihantarPada',
|
||||
'opsBy',
|
||||
'lines',
|
||||
'jumlah'
|
||||
));
|
||||
}
|
||||
|
||||
protected function formatPrintDate($value, $withTime = false)
|
||||
{
|
||||
if ($value === null || $value === '' || $value === '-') {
|
||||
return '-';
|
||||
}
|
||||
|
||||
try {
|
||||
return Carbon::parse($value)->format($withTime ? 'd/m/Y H:i' : 'd/m/Y');
|
||||
} catch (\Exception $e) {
|
||||
return (string) $value;
|
||||
}
|
||||
}
|
||||
|
||||
public function operasiApproveLine(Request $request, $kodcaw, $id)
|
||||
{
|
||||
$res = $this->api()
|
||||
|
||||
@@ -12,7 +12,7 @@ class TrustProxies extends Middleware
|
||||
*
|
||||
* @var array|string|null
|
||||
*/
|
||||
protected $proxies = '*';
|
||||
protected $proxies;
|
||||
|
||||
/**
|
||||
* The headers that should be used to detect proxies.
|
||||
|
||||
@@ -23,8 +23,6 @@ class AppServiceProvider extends ServiceProvider
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
if (strpos((string) config('app.url'), 'https://') === 0) {
|
||||
\Illuminate\Support\Facades\URL::forceScheme('https');
|
||||
}
|
||||
//
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
return [
|
||||
'url' => env('API_URL'),
|
||||
'url_koop' => env('API_URL_KOOP','https://apiujrah.erahn.com.my'),
|
||||
'url_koop' => env('API_URL_KOOP','http://localhost:8000'),
|
||||
'url_pkb' => env('API_URL_PKB','http://localhost:8000'),
|
||||
];
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
$default_port = '17321';
|
||||
$getReaderEndpoint = fn($x) => 'http://localhost:' . $x . '/read';
|
||||
$default_port = '8085';
|
||||
$getReaderEndpoint = fn($x) => 'http://localhost:' . $x . '/?MYKADJSON';
|
||||
|
||||
return[
|
||||
'endpoint' => env('MYKAD_READER_ENDPOINT', $getReaderEndpoint(env('MYKAD_READER_PORT', $default_port))),
|
||||
|
||||
@@ -9,9 +9,6 @@ server {
|
||||
client_max_body_size 50M;
|
||||
|
||||
location / {
|
||||
# Production Apache public/.htaccess 301-strips trailing slashes.
|
||||
# Nginx ignores .htaccess, so without this /path/ 404s while /path works.
|
||||
rewrite ^/(.*)/$ /$1 last;
|
||||
try_files $uri @php;
|
||||
}
|
||||
|
||||
|
||||
Vendored
+254
-364
@@ -1,403 +1,293 @@
|
||||
|
||||
let button_read_mykad = document.getElementById("button_read_mykad");
|
||||
let button_close_modal = document.querySelector("#daftar_pelanggan_mykad_reader button.btn.btn-danger");
|
||||
let photo_mykad = document.querySelector("#photo-mykad");
|
||||
let original_photo_loader = photo_mykad ? photo_mykad.src : "";
|
||||
let original_photo_loader = document.querySelector("#photo-mykad").src;
|
||||
|
||||
const MYKAD_READER_TIMEOUT_MS = 45000;
|
||||
const MYKAD_READER_DEFAULT_ENDPOINT = "http://localhost:17321/read";
|
||||
|
||||
let showLoader = () => {
|
||||
let pageLoader = document.getElementById('page_loader');
|
||||
if (!pageLoader) {
|
||||
return;
|
||||
}
|
||||
pageLoader.removeAttribute('class');
|
||||
pageLoader.classList.add('loading');
|
||||
};
|
||||
|
||||
let hideLoader = () => {
|
||||
let pageLoader = document.getElementById('page_loader');
|
||||
if (!pageLoader) {
|
||||
return;
|
||||
}
|
||||
pageLoader.removeAttribute('class');
|
||||
};
|
||||
|
||||
function getMyKadReaderEndpoint() {
|
||||
let endpoint = (typeof mykad_reader_endpoint !== 'undefined' && mykad_reader_endpoint)
|
||||
? String(mykad_reader_endpoint).trim()
|
||||
: '';
|
||||
|
||||
if (!endpoint || endpoint.includes('MYKADJSON') || endpoint.includes(':8085')) {
|
||||
return MYKAD_READER_DEFAULT_ENDPOINT;
|
||||
}
|
||||
|
||||
return endpoint;
|
||||
}
|
||||
|
||||
async function parseJsonResponse(response) {
|
||||
let text = await response.text();
|
||||
let trimmed = (text || '').trim();
|
||||
|
||||
if (!trimmed) {
|
||||
throw new Error('Pembaca MyKad tidak memulangkan data. Sila cuba lagi.');
|
||||
}
|
||||
|
||||
if (trimmed.charAt(0) === '<') {
|
||||
throw new Error('Pembaca MyKad memulangkan halaman web, bukan data kad. Sila pastikan perkhidmatan mykad-helper sedang berjalan di localhost:17321.');
|
||||
}
|
||||
|
||||
try {
|
||||
return JSON.parse(trimmed);
|
||||
} catch (error) {
|
||||
throw new Error('Pembaca MyKad memulangkan data yang tidak sah. Sila cuba lagi.');
|
||||
}
|
||||
}
|
||||
|
||||
function getMyKadNumberWithoutHyphens(nric) {
|
||||
return String(nric || '').replace(/-/g, '');
|
||||
}
|
||||
|
||||
function titleCase(value) {
|
||||
return String(value || '')
|
||||
.toLowerCase()
|
||||
.split(' ')
|
||||
.filter(Boolean)
|
||||
.map(word => word.charAt(0).toUpperCase() + word.slice(1))
|
||||
.join(' ');
|
||||
}
|
||||
|
||||
function getCodeFromValue(needle, haystack, fallback) {
|
||||
let normalised = titleCase(needle);
|
||||
let match = haystack.find(item => item[1].toLowerCase() === normalised.toLowerCase());
|
||||
|
||||
return match ? match[0] : fallback;
|
||||
}
|
||||
|
||||
function mapGender(gender) {
|
||||
let value = String(gender || '').toLowerCase();
|
||||
|
||||
if (['male', 'lelaki', 'l', 'm'].includes(value)) {
|
||||
return 'Lelaki';
|
||||
}
|
||||
|
||||
if (['female', 'perempuan', 'p', 'f'].includes(value)) {
|
||||
return 'Perempuan';
|
||||
}
|
||||
|
||||
return gender || '';
|
||||
}
|
||||
|
||||
function formatDateOfBirth(dob) {
|
||||
if (!dob) {
|
||||
return '';
|
||||
}
|
||||
|
||||
let hyphenated = String(dob).includes('-')
|
||||
? String(dob)
|
||||
: String(dob).replace(/(\d{4})(\d{2})(\d{2})/, '$1-$2-$3');
|
||||
|
||||
let [year, month, day] = hyphenated.split('-');
|
||||
|
||||
if (!year || !month || !day) {
|
||||
return dob;
|
||||
}
|
||||
|
||||
return day + '/' + month + '/' + year;
|
||||
}
|
||||
|
||||
function getAgeFromDateOfBirth(dob) {
|
||||
if (!dob) {
|
||||
return '';
|
||||
}
|
||||
|
||||
let hyphenated = String(dob).includes('-')
|
||||
? String(dob)
|
||||
: String(dob).replace(/(\d{4})(\d{2})(\d{2})/, '$1-$2-$3');
|
||||
|
||||
let birthDate = new Date(hyphenated);
|
||||
if (Number.isNaN(birthDate.getTime())) {
|
||||
return '';
|
||||
}
|
||||
|
||||
let today = new Date();
|
||||
let age = today.getFullYear() - birthDate.getFullYear();
|
||||
let monthDiff = today.getMonth() - birthDate.getMonth();
|
||||
|
||||
if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
|
||||
age -= 1;
|
||||
}
|
||||
|
||||
return age;
|
||||
}
|
||||
|
||||
function getBumiputeraStatus(race) {
|
||||
const non_bumiputera_ethnicity = ['INDIA', 'CINA', 'INDIAN', 'CHINESE'];
|
||||
return !non_bumiputera_ethnicity.includes(String(race || '').toUpperCase());
|
||||
}
|
||||
|
||||
function joinAddress(data) {
|
||||
return [data.address1, data.address2, data.address3]
|
||||
.map(line => String(line || '').trim())
|
||||
.filter(Boolean)
|
||||
.join(', ');
|
||||
}
|
||||
|
||||
function mapReaderErrorCode(rawMessage) {
|
||||
const error_handler_dictionary = {
|
||||
'0x80100069': 'Tiada MyKad dikesan, sila masukkan MyKad untuk dibaca',
|
||||
'0x8010000C': 'Tiada MyKad dikesan, sila masukkan MyKad untuk dibaca',
|
||||
'0x80100066': 'MyKad mungkin dimasukkan terbalik, sila masukkan dengan betul',
|
||||
'0x80100067': 'MyKad tidak dapat dikesan. Sila cabut dan masukkan semula kad',
|
||||
'0x80100016': 'Gagal membaca MyKad. Sila pastikan kad dimasukkan dengan betul dan cuba lagi',
|
||||
'0x8010002E': 'Pembaca MyKad tidak dapat dikesan, sila periksa sambungan',
|
||||
'0x80100017': 'Pembaca MyKad tidak dapat dikesan, sila periksa sambungan',
|
||||
let showLoader = () => {
|
||||
let pageLoader = document.getElementById('page_loader');
|
||||
pageLoader.removeAttribute('class');
|
||||
pageLoader.classList.add('loading');
|
||||
};
|
||||
|
||||
let message = String(rawMessage || '');
|
||||
let codes = message.match(/0x[0-9a-fA-F]+/g) || [];
|
||||
let matched = codes.reverse().find(code => error_handler_dictionary[code]);
|
||||
let hideLoader = () => {
|
||||
let pageLoader = document.getElementById('page_loader');
|
||||
pageLoader.removeAttribute('class');
|
||||
};
|
||||
|
||||
return matched ? error_handler_dictionary[matched] : (message || null);
|
||||
}
|
||||
|
||||
function getReaderErrorMessage(payload) {
|
||||
if (!payload) {
|
||||
return 'Pembaca MyKad tidak dapat membaca kad. Sila cuba lagi.';
|
||||
function handleMyKadReader()
|
||||
{
|
||||
showLoader();
|
||||
WebSocketManager.init("wss://localhost:5963/mykadwebsocket");
|
||||
WebSocketManager.listReader(callbackDoneGetListCardReader);
|
||||
}
|
||||
|
||||
let raw = payload.message || payload.error || payload.detail || '';
|
||||
return mapReaderErrorCode(raw)
|
||||
|| 'Pembaca MyKad tidak dapat membaca kad. Sila pastikan MyKad dimasukkan dengan betul.';
|
||||
}
|
||||
function callbackDoneGetListCardReader(data, respcode)
|
||||
{
|
||||
console.log('done get list card reader');
|
||||
|
||||
function getFetchErrorTitle(error) {
|
||||
if (error && error.name === 'AbortError') {
|
||||
return 'Masa menunggu pembaca MyKad telah tamat. Sila cuba lagi.';
|
||||
}
|
||||
|
||||
return 'Pembaca MyKad tidak dapat dikesan. Sila pastikan perkhidmatan pembaca MyKad sedang berjalan.';
|
||||
}
|
||||
|
||||
function getDisplayError(error) {
|
||||
if (!error) {
|
||||
return getFetchErrorTitle(error);
|
||||
}
|
||||
|
||||
if (error.name === 'AbortError') {
|
||||
return getFetchErrorTitle(error);
|
||||
}
|
||||
|
||||
let message = String(error.message || '');
|
||||
if (!message || message.startsWith('Failed to fetch') || message.includes('NetworkError')) {
|
||||
return getFetchErrorTitle(error);
|
||||
}
|
||||
|
||||
return message;
|
||||
}
|
||||
|
||||
async function handleMyKadReader() {
|
||||
showLoader();
|
||||
|
||||
const controller = new AbortController();
|
||||
const timeoutId = setTimeout(() => controller.abort(), MYKAD_READER_TIMEOUT_MS);
|
||||
|
||||
try {
|
||||
const response = await fetch(getMyKadReaderEndpoint(), {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Accept': 'application/json',
|
||||
},
|
||||
signal: controller.signal,
|
||||
});
|
||||
|
||||
const payload = await parseJsonResponse(response);
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(getReaderErrorMessage(payload));
|
||||
if(respcode === -1){
|
||||
console.log({'location': 'callbackDoneGetListCardReader', 'data' : data} );
|
||||
}
|
||||
|
||||
if (!payload || payload.ok !== true || !payload.data) {
|
||||
throw new Error(getReaderErrorMessage(payload));
|
||||
let isDevicesConnected = Object.keys(data).length > 0;
|
||||
|
||||
if(! isDevicesConnected){
|
||||
hideLoader();
|
||||
|
||||
Swal.fire({ icon: 'error', title: 'Pembaca MyKad tidak dapat dikesan, sila periksa sambungan', });
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
await handleMyKadData(payload.data);
|
||||
} catch (error) {
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: getDisplayError(error),
|
||||
});
|
||||
} finally {
|
||||
clearTimeout(timeoutId);
|
||||
let slots = data.toString().split(',');
|
||||
WebSocketManager.open(doneOpenReaderConnection, slots[0]);
|
||||
}
|
||||
|
||||
function doneOpenReaderConnection()
|
||||
{
|
||||
WebSocketManager.readAllText(callBackAfterReadMykad);
|
||||
}
|
||||
|
||||
function handleMyKadReaderError(sw12AndApiName)
|
||||
{
|
||||
hideLoader();
|
||||
|
||||
let error_handler_dictionary = {
|
||||
'0x80100069' : 'Tiada MyKad dikesan, sila masukkan Mykad untuk dibaca',
|
||||
'0x80100066' : 'MyKad mungkin dimasukkan terbalik, sila masukkan dengan betul',
|
||||
'default' : sw12AndApiName,
|
||||
};
|
||||
|
||||
let error_data = sw12AndApiName.split(" ");
|
||||
|
||||
let error_code = error_data.filter(x => x.startsWith('0x')).splice(-1)
|
||||
|
||||
let error_message = error_handler_dictionary['default'];
|
||||
|
||||
let hasDefinedError = error_handler_dictionary.hasOwnProperty(error_code);
|
||||
|
||||
if(hasDefinedError){
|
||||
error_message = error_handler_dictionary[error_code];
|
||||
}
|
||||
|
||||
Swal.fire({ icon: 'error', title: error_message, });
|
||||
}
|
||||
}
|
||||
|
||||
function handleMyKadData(data) {
|
||||
return checkIfMyKadExists(data.nric)
|
||||
.then(response => {
|
||||
let isResponseArray = Array.isArray(response);
|
||||
let resolved_response = isResponseArray ? response.pop() : response;
|
||||
|
||||
if (!resolved_response || resolved_response === 'no-data') {
|
||||
populateDaftarPelangganModal(data);
|
||||
} else {
|
||||
let input_search_noic = document.querySelector("form[name='frmsearch'] input[name='noic']");
|
||||
let form_search_noic = document.querySelector("form[name='frmsearch']");
|
||||
|
||||
input_search_noic.value = getMyKadNumberWithoutHyphens(data.nric);
|
||||
form_search_noic.submit();
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
populateDaftarPelangganModal(data);
|
||||
});
|
||||
}
|
||||
|
||||
function checkIfMyKadExists(myKadNumber) {
|
||||
let myKadNumberWithoutHyphens = getMyKadNumberWithoutHyphens(myKadNumber);
|
||||
let lookupUrl = new URL(wakil_caricustomer_endpoint, window.location.origin);
|
||||
lookupUrl.searchParams.set('icno', myKadNumberWithoutHyphens);
|
||||
|
||||
const csrfToken = document.querySelector('input[name="_token"]');
|
||||
|
||||
return fetch(lookupUrl.toString(), {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
"Accept": "application/json",
|
||||
"X-Requested-With": "XMLHttpRequest",
|
||||
"X-CSRF-Token": csrfToken ? csrfToken.value : ""
|
||||
},
|
||||
credentials: "same-origin",
|
||||
}).then(async response => {
|
||||
let text = await response.text();
|
||||
let trimmed = (text || '').trim();
|
||||
|
||||
if (!trimmed || trimmed.charAt(0) === '<') {
|
||||
return 'no-data';
|
||||
function callBackAfterReadMykad(data, respcode, sw12AndApiName)
|
||||
{
|
||||
if(respcode !== 0){
|
||||
handleMyKadReaderError(sw12AndApiName);
|
||||
return
|
||||
}
|
||||
|
||||
try {
|
||||
return JSON.parse(trimmed);
|
||||
} catch (error) {
|
||||
return 'no-data';
|
||||
checkIfMyKadExists(data.IDNum)
|
||||
.then(response => {
|
||||
let isResponseArray = Array.isArray(response);
|
||||
resolved_response = isResponseArray ? response.pop() : response;
|
||||
|
||||
if (resolved_response === 'no-data') {
|
||||
populateDaftarPelangganModal(data, handleReadPhoto);
|
||||
} else {
|
||||
let input_search_noic = document.getElementById("noic");
|
||||
let form_search_noic = document.querySelector("form[name='frmsearch']");
|
||||
|
||||
let getMyKadNumberWithoutHypens = myKadNumber => myKadNumber.replace(/-/g, '');
|
||||
input_search_noic.value = getMyKadNumberWithoutHypens(data.IDNum);
|
||||
form_search_noic.submit();
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: error,
|
||||
});
|
||||
});
|
||||
|
||||
hideLoader();
|
||||
}
|
||||
|
||||
function checkIfMyKadExists(myKadNumber) {
|
||||
let myKadNumberWithoutHyphens = myKadNumber.replace(/-/g, '');
|
||||
|
||||
const url = wakil_caricustomer_endpoint + '/?icno=' + myKadNumberWithoutHyphens;
|
||||
|
||||
const connectionConfig = {
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"Accept": "application/json",
|
||||
"X-Requested-With": "XMLHttpRequest",
|
||||
"X-CSRF-Token": document.querySelector('input[name="_token"]').value
|
||||
},
|
||||
credentials: "same-origin",
|
||||
};
|
||||
|
||||
return fetch(url, connectionConfig)
|
||||
.then(response => response.json())
|
||||
}
|
||||
|
||||
let populateDaftarPelangganModal = (data, callbackAfterPopulateDaftarPelanggan) => {
|
||||
$('#daftar_pelanggan_mykad_reader').modal('show');
|
||||
let modal_form = document.querySelector("#daftar_pelanggan_mykad_reader .modal-body .row.form-group");
|
||||
|
||||
const religions = [
|
||||
['01', 'Islam'],
|
||||
['02', 'Hindu'],
|
||||
['03', 'Buddha'],
|
||||
['04', 'Kristian'],
|
||||
['05', 'Lain-lain'],
|
||||
];
|
||||
|
||||
const races = [
|
||||
['M', 'Melayu'],
|
||||
['C', 'Cina'],
|
||||
['I', 'India'],
|
||||
['L', 'Lain-lain'],
|
||||
];
|
||||
|
||||
let getCodeFromValue = (needle, haystack) => {
|
||||
let title_cased_text = needle.split(' ')
|
||||
.map(w => w[0].toUpperCase() + w.substring(1).toLowerCase())
|
||||
.join(' ');
|
||||
|
||||
return haystack.filter(x => x[1] == title_cased_text)[0][0];
|
||||
};
|
||||
|
||||
let getMyKadNumberWithoutHypens = (IDNum) => {
|
||||
return IDNum.replace(/-/g, '');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
let populateDaftarPelangganModal = (data) => {
|
||||
$('#daftar_pelanggan_mykad_reader').modal('show');
|
||||
let modal_form = document.querySelector("#daftar_pelanggan_mykad_reader .modal-body .row.form-group");
|
||||
let getFormattedDateOfBirth = (date_of_birth) => {
|
||||
|
||||
const religions = [
|
||||
['01', 'Islam'],
|
||||
['02', 'Hindu'],
|
||||
['03', 'Buddha'],
|
||||
['04', 'Kristian'],
|
||||
['05', 'Lain-lain'],
|
||||
];
|
||||
let date_of_birth_hyphenated = date_of_birth.replace(/(\d{4})(\d{2})(\d{2})/, "$1-$2-$3");
|
||||
|
||||
const races = [
|
||||
['M', 'Melayu'],
|
||||
['C', 'Cina'],
|
||||
['I', 'India'],
|
||||
['L', 'Lain-lain'],
|
||||
];
|
||||
const [year, month, day] = date_of_birth_hyphenated.split('-');
|
||||
return day + '/' + month + '/' + year;
|
||||
};
|
||||
|
||||
let disablePointerEventsOnClickableInputs = () => {
|
||||
modal_form.querySelector("input[name='bumiputera']").style.pointerEvents = 'none';
|
||||
modal_form.querySelector("input[name='warganegara']").style.pointerEvents = 'none';
|
||||
modal_form.querySelector("select[name='bangsa']").style.pointerEvents = 'none';
|
||||
modal_form.querySelector("select[name='agama']").style.pointerEvents = 'none';
|
||||
};
|
||||
let getAgeFromDateOfBirth = (date_of_birth) => {
|
||||
|
||||
let mykad_modal = document.querySelector("#daftar_pelanggan_mykad_reader");
|
||||
let photo_container = mykad_modal.querySelector("#photo-mykad-container");
|
||||
let photo = mykad_modal.querySelector("#photo-mykad");
|
||||
let date_of_birth_hyphenated = date_of_birth.replace(/(\d{4})(\d{2})(\d{2})/, "$1-$2-$3");
|
||||
|
||||
modal_form.querySelector("textarea[name='name']").value = data.name || data.gmpc_name || '';
|
||||
modal_form.querySelector("input[name='noic']").value = getMyKadNumberWithoutHyphens(data.nric);
|
||||
modal_form.querySelector("input[name='tarikh_lahir']").value = formatDateOfBirth(data.dob);
|
||||
modal_form.querySelector("input[name='negeri_lahir']").value = data.birth_place || '';
|
||||
modal_form.querySelector("input[name='jantina']").value = mapGender(data.gender);
|
||||
modal_form.querySelector("input[name='warganegara']").checked = String(data.citizenship || '').toUpperCase() === 'WARGANEGARA';
|
||||
modal_form.querySelector("input[name='bumiputera']").checked = getBumiputeraStatus(data.race);
|
||||
modal_form.querySelector("select[name='agama']").value = getCodeFromValue(data.religion, religions, '05');
|
||||
modal_form.querySelector("textarea[name='alamat']").value = joinAddress(data);
|
||||
modal_form.querySelector("input[name='poskod']").value = data.postcode || '';
|
||||
modal_form.querySelector("input[name='daerah']").value = data.city || '';
|
||||
modal_form.querySelector("input[name='negeri']").value = data.state || '';
|
||||
modal_form.querySelector("input[name='age']").value = data.age != null && data.age !== ''
|
||||
? data.age
|
||||
: getAgeFromDateOfBirth(data.dob);
|
||||
modal_form.querySelector("select[name='bangsa']").value = getCodeFromValue(data.race, races, 'L');
|
||||
const [birth_year, birth_month, birth_day] = date_of_birth_hyphenated.split('-');
|
||||
|
||||
let formatBirthMonth = (birth_month) => {
|
||||
let newbirthMonth = birth_month < 9 ? birth_month[1] : birth_month;
|
||||
return newbirthMonth;
|
||||
};
|
||||
|
||||
const count_leap_year = countLeapYears(birth_year, formatBirthMonth(birth_month), birth_day) - 1;
|
||||
|
||||
const start = new Date(date_of_birth_hyphenated),
|
||||
end = new Date(),
|
||||
diff = new Date(end - start),
|
||||
days = ((diff / 1000 / 60 / 60 / 24) - count_leap_year) / 365;
|
||||
|
||||
return parseInt(days);
|
||||
};
|
||||
|
||||
let getBumiputeraStatus = (race) => {
|
||||
|
||||
const non_bumiputera_ethnicity = ['INDIA', 'CINA'];
|
||||
|
||||
let isBumiputera = !non_bumiputera_ethnicity.includes(race);
|
||||
|
||||
return isBumiputera;
|
||||
};
|
||||
|
||||
let disablePointerEventsOnClickableInputs = () => {
|
||||
modal_form.querySelector("input[name='bumiputera']").style.pointerEvents = 'none';
|
||||
modal_form.querySelector("input[name='warganegara']").style.pointerEvents = 'none';
|
||||
|
||||
modal_form.querySelector("select[name='bangsa']").style.pointerEvents = 'none';
|
||||
modal_form.querySelector("select[name='agama']").style.pointerEvents = 'none';
|
||||
}
|
||||
|
||||
let mykad_modal = document.querySelector("#daftar_pelanggan_mykad_reader");
|
||||
let photo_container = mykad_modal.querySelector("#photo-mykad-container");
|
||||
|
||||
modal_form.querySelector("textarea[name='name']").value = data.OrgName;
|
||||
modal_form.querySelector("input[name='noic']").value = getMyKadNumberWithoutHypens(data.IDNum);
|
||||
modal_form.querySelector("input[name='tarikh_lahir']").value = getFormattedDateOfBirth(data.BirthDate);
|
||||
modal_form.querySelector("input[name='negeri_lahir']").value = data.BirthPlace;
|
||||
modal_form.querySelector("input[name='jantina']").value = data.Gender == 'LELAKI' ? 'Lelaki' : 'Perempuan';
|
||||
modal_form.querySelector("input[name='warganegara']").checked = data.Citizenship === 'WARGANEGARA' ? true : false;
|
||||
modal_form.querySelector("input[name='bumiputera']").checked = getBumiputeraStatus(data.Race);
|
||||
modal_form.querySelector("select[name='agama']").value = getCodeFromValue(data.Religion, religions);
|
||||
modal_form.querySelector("textarea[name='alamat']").value = [data.Address1, data.Address2, data.Address3].join(", ");
|
||||
|
||||
let getPostCode = (postCodeCity) => postCodeCity.replace(/\D/g, '');
|
||||
modal_form.querySelector("input[name='poskod']").value = getPostCode(data.PostcodeCity);
|
||||
|
||||
let getCityName = (postCodeCity) => postCodeCity.replace(/\d/g, '');
|
||||
modal_form.querySelector("input[name='daerah']").value = getCityName(data.PostcodeCity).trim();
|
||||
|
||||
modal_form.querySelector("input[name='negeri']").value = data.State;
|
||||
modal_form.querySelector("input[name='age']").value = getAgeFromDateOfBirth(data.BirthDate);
|
||||
modal_form.querySelector("select[name='bangsa']").value = getCodeFromValue(data.Race, races);
|
||||
|
||||
calculatePassportAge();
|
||||
|
||||
if (data.has_photo && data.photo_base64) {
|
||||
let mime = data.photo_mime || 'image/jpeg';
|
||||
photo.src = 'data:' + mime + ';base64,' + data.photo_base64;
|
||||
photo_container.classList.remove('d-none');
|
||||
photo_container.classList.add('d-flex');
|
||||
setMykadPhotoFields(data.photo_base64, mime);
|
||||
} else {
|
||||
photo.src = original_photo_loader;
|
||||
photo_container.classList.add('d-none');
|
||||
photo_container.classList.remove('d-flex');
|
||||
setMykadPhotoFields('', '');
|
||||
|
||||
$('#daftar_pelanggan_mykad_reader').modal('show');
|
||||
|
||||
|
||||
disablePointerEventsOnClickableInputs();
|
||||
callbackAfterPopulateDaftarPelanggan();
|
||||
}
|
||||
|
||||
|
||||
function handleReadPhoto()
|
||||
{
|
||||
WebSocketManager.init("wss://localhost:5963/mykadwebsocket");
|
||||
WebSocketManager.listReader(callbackDoneGetListCardReader2);
|
||||
}
|
||||
|
||||
function callbackDoneGetListCardReader2(data, respcode)
|
||||
{
|
||||
if(respcode === -1){
|
||||
console.log({'location': 'callbackDoneGetListCardReader', 'data' : data} );
|
||||
}
|
||||
|
||||
disablePointerEventsOnClickableInputs();
|
||||
$(modal_form.querySelector("input[name='poskod']")).trigger('change');
|
||||
};
|
||||
let slots = data.toString().split(',');
|
||||
WebSocketManager.open(doneOpenReaderConnection2, slots[0]);
|
||||
}
|
||||
|
||||
function doneOpenReaderConnection2()
|
||||
{
|
||||
WebSocketManager.readPhoto(callbackAfterReadPhoto2);
|
||||
}
|
||||
|
||||
function callbackAfterReadPhoto2(data, RespCode, RespSW12AndApiName)
|
||||
{
|
||||
let mykad_modal = document.querySelector("#daftar_pelanggan_mykad_reader");
|
||||
let photo = mykad_modal.querySelector("#photo-mykad");
|
||||
|
||||
let isDataEmpty = data
|
||||
&& Object.keys(data).length === 0
|
||||
&& Object.getPrototypeOf(data) === Object.prototype;
|
||||
|
||||
if(isDataEmpty){
|
||||
photo.src = original_photo_loader;
|
||||
return;
|
||||
}
|
||||
|
||||
photo.src = 'data:image/jpeg;base64, ' + data.Base64Photo;
|
||||
}
|
||||
|
||||
let hideMykadPhoto = () => {
|
||||
|
||||
WebSocketManager.close(() => console.log('Websocket closed'));
|
||||
|
||||
let photo = document.getElementById("photo-mykad");
|
||||
let photo_container = document.getElementById("photo-mykad-container");
|
||||
|
||||
if (photo) {
|
||||
photo.src = original_photo_loader;
|
||||
}
|
||||
photo.src = original_photo_loader;
|
||||
|
||||
if (photo_container) {
|
||||
photo_container.classList.add('d-none');
|
||||
photo_container.classList.remove('d-flex');
|
||||
}
|
||||
|
||||
setMykadPhotoFields('', '');
|
||||
photo_container.classList.add('d-none');
|
||||
photo_container.classList.remove('d-flex');
|
||||
};
|
||||
|
||||
function setMykadPhotoFields(base64, mime) {
|
||||
let form = document.querySelector("#daftar_pelanggan_mykad_reader form")
|
||||
|| document.getElementById("form-mykad-reader");
|
||||
let photoInput = (form && form.querySelector("input[name='photo_base64']"))
|
||||
|| document.getElementById("photo_base64");
|
||||
let mimeInput = (form && form.querySelector("input[name='photo_mime']"))
|
||||
|| document.getElementById("photo_mime");
|
||||
|
||||
if (photoInput) {
|
||||
photoInput.value = base64 || '';
|
||||
}
|
||||
|
||||
if (mimeInput) {
|
||||
mimeInput.value = mime || '';
|
||||
}
|
||||
}
|
||||
|
||||
function copyMykadPhotoFromImage() {
|
||||
let photo = document.querySelector("#daftar_pelanggan_mykad_reader #photo-mykad");
|
||||
if (!photo || !photo.src || photo.src.indexOf("base64,") === -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
let parts = photo.src.split("base64,");
|
||||
let mimeMatch = photo.src.match(/^data:([^;]+);/);
|
||||
setMykadPhotoFields(parts[1] || "", mimeMatch ? mimeMatch[1] : "image/jpeg");
|
||||
}
|
||||
|
||||
if (button_read_mykad) {
|
||||
button_read_mykad.addEventListener("click", handleMyKadReader);
|
||||
}
|
||||
|
||||
if (button_close_modal) {
|
||||
button_close_modal.addEventListener("click", hideMykadPhoto);
|
||||
}
|
||||
button_read_mykad.addEventListener("click", handleMyKadReader);
|
||||
button_close_modal.addEventListener("click", hideMykadPhoto);
|
||||
|
||||
@@ -1,137 +0,0 @@
|
||||
@props([
|
||||
'id',
|
||||
'columns' => [],
|
||||
'exportable' => true,
|
||||
'filename' => '',
|
||||
'skipExport' => ['Bil', 'Cetak'],
|
||||
])
|
||||
|
||||
<style>
|
||||
.erahn-datatable {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
}
|
||||
.erahn-datatable .dataTables_wrapper {
|
||||
width: 100%;
|
||||
overflow-x: auto;
|
||||
}
|
||||
.erahn-datatable table {
|
||||
width: 100% !important;
|
||||
margin: 0;
|
||||
}
|
||||
.erahn-datatable table th,
|
||||
.erahn-datatable table td {
|
||||
white-space: nowrap;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.erahn-datatable .dt-buttons {
|
||||
margin: 0 0 8px 8px;
|
||||
}
|
||||
.erahn-datatable .dt-button {
|
||||
border: 0;
|
||||
border-radius: 4px;
|
||||
padding: 6px 12px;
|
||||
margin-left: 4px;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
background: #17a2b8;
|
||||
color: #fff;
|
||||
}
|
||||
.erahn-datatable .dt-button:hover {
|
||||
opacity: 0.9;
|
||||
}
|
||||
.erahn-datatable .buttons-excel {
|
||||
background: #28a745;
|
||||
}
|
||||
.erahn-datatable .buttons-csv {
|
||||
background: #6c757d;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
if (typeof window.initErahnDatatable !== 'function') {
|
||||
window.initErahnDatatable = function (selector, options) {
|
||||
var $table = $(selector);
|
||||
var exportable = $table.data('exportable');
|
||||
var filename = $table.data('export-filename') || $table.attr('id') || 'export';
|
||||
var defaults = {
|
||||
scrollX: true,
|
||||
autoWidth: false,
|
||||
language: {
|
||||
emptyTable: 'Tiada rekod'
|
||||
}
|
||||
};
|
||||
|
||||
if ((exportable === undefined || exportable === 1 || exportable === true) &&
|
||||
$.fn.dataTable && $.fn.dataTable.Buttons) {
|
||||
defaults.dom = 'lBfrtip';
|
||||
defaults.buttons = [
|
||||
{
|
||||
extend: 'excelHtml5',
|
||||
text: 'Excel',
|
||||
className: 'buttons-excel',
|
||||
title: filename,
|
||||
filename: filename,
|
||||
exportOptions: {
|
||||
columns: ':not(.no-export)',
|
||||
format: {
|
||||
body: function (data) {
|
||||
return $('<div>').html(data).text().replace(/\s+/g, ' ').trim();
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'csvHtml5',
|
||||
text: 'CSV',
|
||||
className: 'buttons-csv',
|
||||
bom: true,
|
||||
title: filename,
|
||||
filename: filename,
|
||||
exportOptions: {
|
||||
columns: ':not(.no-export)',
|
||||
format: {
|
||||
body: function (data) {
|
||||
return $('<div>').html(data).text().replace(/\s+/g, ' ').trim();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
return $table.DataTable($.extend(true, {}, defaults, options || {}));
|
||||
};
|
||||
}
|
||||
if (typeof window.adjustErahnDatatables !== 'function') {
|
||||
window.adjustErahnDatatables = function () {
|
||||
if (!$.fn.dataTable) {
|
||||
return;
|
||||
}
|
||||
setTimeout(function () {
|
||||
$.fn.dataTable.tables({ visible: true, api: true }).columns.adjust();
|
||||
}, 50);
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="erahn-datatable">
|
||||
<table
|
||||
id="{{ $id }}"
|
||||
{{ $attributes->merge(['class' => 'table table-striped table-hover nowrap']) }}
|
||||
style="width:100%"
|
||||
data-exportable="{{ $exportable ? 1 : 0 }}"
|
||||
data-export-filename="{{ $filename !== '' ? $filename : $id }}"
|
||||
>
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
@foreach ($columns as $column)
|
||||
<th @if(in_array($column, $skipExport, true)) class="no-export" @endif>{{ $column }}</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
{{ $slot }}
|
||||
</table>
|
||||
</div>
|
||||
@@ -1,44 +0,0 @@
|
||||
@props([
|
||||
'showCopies' => true,
|
||||
])
|
||||
|
||||
<style>
|
||||
.print-footer {
|
||||
margin-top: 14px;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
color: #222;
|
||||
}
|
||||
.print-footer .copies {
|
||||
margin-top: 10px;
|
||||
font-size: 10px;
|
||||
}
|
||||
.print-footer .copies span {
|
||||
display: inline-block;
|
||||
border: 1px solid #111;
|
||||
width: 11px;
|
||||
height: 11px;
|
||||
margin-right: 4px;
|
||||
vertical-align: -1px;
|
||||
}
|
||||
.print-footer .notes {
|
||||
margin-top: 10px;
|
||||
font-size: 9.5px;
|
||||
line-height: 1.45;
|
||||
}
|
||||
.print-footer .notes b { font-size: 10px; }
|
||||
.print-footer .notes p { margin: 2px 0; }
|
||||
</style>
|
||||
|
||||
<div {{ $attributes->merge(['class' => 'print-footer']) }}>
|
||||
@if($showCopies)
|
||||
<div class="copies">
|
||||
Salinan: <span></span> Kad Pengenalan <span></span> Akaun Bank/ Slip/ Penyata Bank
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if(trim($slot) !== '')
|
||||
<div class="notes">
|
||||
{{ $slot }}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@@ -1,101 +0,0 @@
|
||||
@props([
|
||||
'cawangan' => '',
|
||||
'kodcaw' => '',
|
||||
'alamat1' => '',
|
||||
'alamat2' => '',
|
||||
'notel' => '',
|
||||
'tarikh' => '',
|
||||
'norujukan' => '',
|
||||
'rujukanLabel' => 'No. Rujukan SAG',
|
||||
'showDummyBadge' => false,
|
||||
])
|
||||
|
||||
<style>
|
||||
.print-header {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
|
||||
align-items: start;
|
||||
column-gap: 12px;
|
||||
border-bottom: 2px solid #111;
|
||||
padding-bottom: 8px;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
color: #111;
|
||||
}
|
||||
.print-header .org {
|
||||
min-width: 0;
|
||||
}
|
||||
.print-header .org p {
|
||||
margin: 0;
|
||||
font-size: 10px;
|
||||
line-height: 1.35;
|
||||
}
|
||||
.print-header .org .name {
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.print-header .logos {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
padding-top: 2px;
|
||||
}
|
||||
.print-header .logos img {
|
||||
display: block;
|
||||
height: 40px;
|
||||
width: auto;
|
||||
max-width: 70px;
|
||||
object-fit: contain;
|
||||
}
|
||||
.print-header .meta {
|
||||
text-align: right;
|
||||
font-size: 10px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
.print-header .meta .label { color: #444; }
|
||||
.print-header .dummy-badge {
|
||||
display: inline-block;
|
||||
margin-top: 4px;
|
||||
padding: 1px 6px;
|
||||
border: 1px solid #c0392b;
|
||||
color: #c0392b;
|
||||
font-size: 9px;
|
||||
font-weight: bold;
|
||||
letter-spacing: 0.08em;
|
||||
}
|
||||
@media print {
|
||||
.print-header .dummy-badge { display: none !important; }
|
||||
}
|
||||
</style>
|
||||
|
||||
<div {{ $attributes->merge(['class' => 'print-header']) }}>
|
||||
<div class="org">
|
||||
<p class="name">KOPERASI PERMODALAN KELANTAN BERHAD (D-5-0228)</p>
|
||||
<p>Ar-Rahn {{ $cawangan }}</p>
|
||||
<p>{{ $alamat1 }}</p>
|
||||
<p>{{ $alamat2 }}</p>
|
||||
<p>Tel: {{ $notel }}</p>
|
||||
</div>
|
||||
<div class="logos">
|
||||
<img src="{{ asset('img/kopkb.png') }}" alt="KPKB">
|
||||
<img src="{{ asset('img/logo-arrahn.jpeg') }}" alt="Ar-Rahn">
|
||||
</div>
|
||||
<div class="meta">
|
||||
@if($kodcaw || $cawangan)
|
||||
<div>
|
||||
<span class="label">Cawangan</span><br>
|
||||
<b>{{ trim(implode(' — ', array_filter([$kodcaw, $cawangan]))) }}</b>
|
||||
</div>
|
||||
@endif
|
||||
@if($tarikh)
|
||||
<div style="{{ ($kodcaw || $cawangan) ? 'margin-top:6px' : '' }}"><span class="label">Tarikh</span><br><b>{{ $tarikh }}</b></div>
|
||||
@endif
|
||||
@if($norujukan)
|
||||
<div style="margin-top:6px"><span class="label">{{ $rujukanLabel }}</span><br><b>{{ $norujukan }}</b></div>
|
||||
@endif
|
||||
{{ $slot }}
|
||||
@if($showDummyBadge)
|
||||
<div class="dummy-badge">CONTOH SAHAJA</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,25 +0,0 @@
|
||||
<style>
|
||||
.print-watermark {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 12px;
|
||||
pointer-events: none;
|
||||
z-index: 0;
|
||||
}
|
||||
.print-watermark img {
|
||||
height: 160px;
|
||||
max-width: 240px;
|
||||
object-fit: contain;
|
||||
opacity: 0.12;
|
||||
-webkit-print-color-adjust: exact;
|
||||
print-color-adjust: exact;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="print-watermark" aria-hidden="true">
|
||||
<img src="{{ asset('img/logo_kad.jpeg') }}" alt="">
|
||||
<img src="{{ asset('img/logo-arrahn.jpeg') }}" alt="">
|
||||
</div>
|
||||
@@ -210,17 +210,15 @@
|
||||
<div class="modal fade" id="daftar_pelanggan_mykad_reader" tabindex="-1" data-backdrop="static" aria-labelledby="ModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<form id="form-mykad-reader" action="{{ route('customer.store') }}" onsubmit="verifycustomerMyKadReader()" method="POST">
|
||||
@csrf
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="ModalLabel">Daftar Pelanggan</h5>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form action="{{ route('customer.store') }}" onsubmit="verifycustomerMyKadReader()" method="POST">
|
||||
@csrf
|
||||
<div class="row form-group">
|
||||
<div class="col-md-12 d-flex justify-content-center pb-3 d-none" id="photo-mykad-container">
|
||||
<img src="{{ asset('img/spinner-loader.gif') }}" alt="" id="photo-mykad" width="150" height="200" object-fit="cover">
|
||||
<input type="hidden" name="photo_base64" id="photo_base64" value="">
|
||||
<input type="hidden" name="photo_mime" id="photo_mime" value="">
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="row form-group">
|
||||
@@ -813,8 +811,6 @@
|
||||
|
||||
function verifycustomerMyKadReader(){
|
||||
|
||||
copyMykadPhotoFromImage();
|
||||
|
||||
let myKadModal = $('#daftar_pelanggan_mykad_reader');
|
||||
|
||||
// Construct URLSearchParams object instance from current URL querystring.
|
||||
@@ -1281,7 +1277,8 @@
|
||||
let wakil_caricustomer_endpoint = "{{ route('wakil.caricustomer') }}";
|
||||
let mykad_reader_driver_endpoint = "{{ route('mykadreader.driver') }}";
|
||||
</script>
|
||||
<script src="{{ asset('js/mykad-reader-customer.js') }}?v=4"></script>
|
||||
<script src="{{ asset('js/iris-mykad-websocket-client-api.js') }}"></script>
|
||||
<script src="{{ asset('js/mykad-reader-customer.js') }}"></script>
|
||||
<script src="{{ asset('js/postcode-concerns.js') }}"></script>
|
||||
@endpush
|
||||
|
||||
|
||||
@@ -21,22 +21,6 @@
|
||||
</ol>
|
||||
</nav>
|
||||
|
||||
@if(session()->has('message'))
|
||||
<div class="alert alert-success">{{ session('message') }}</div>
|
||||
@endif
|
||||
|
||||
@if(!empty($customer_info['photo_base64']))
|
||||
<div class="form-group row col-md-12">
|
||||
<div class="col-md-12 d-flex justify-content-center pb-3">
|
||||
<img src="data:{{ $customer_info['photo_mime'] ?? 'image/jpeg' }};base64,{{ $customer_info['photo_base64'] }}"
|
||||
alt="Gambar MyKad"
|
||||
width="120"
|
||||
height="160"
|
||||
style="object-fit: cover;">
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="form-group row col-md-12">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group row">
|
||||
|
||||
@@ -229,17 +229,15 @@
|
||||
<div class="modal fade" id="daftar_pelanggan_mykad_reader" tabindex="-1" data-backdrop="static" aria-labelledby="ModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<form id="form-mykad-reader" action="{{ route('customer.store') }}" onsubmit="verifycustomerMyKadReader()" method="POST">
|
||||
@csrf
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="ModalLabel">Daftar Pelanggan</h5>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form action="{{ route('customer.store') }}" onsubmit="verifycustomerMyKadReader()" method="POST">
|
||||
@csrf
|
||||
<div class="row form-group">
|
||||
<div class="col-md-12 d-flex justify-content-center pb-3 d-none" id="photo-mykad-container">
|
||||
<img src="{{ asset('img/spinner-loader.gif') }}" alt="" id="photo-mykad" width="150" height="200" object-fit="cover">
|
||||
<input type="hidden" name="photo_base64" id="photo_base64" value="">
|
||||
<input type="hidden" name="photo_mime" id="photo_mime" value="">
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="row form-group">
|
||||
@@ -526,36 +524,38 @@
|
||||
});
|
||||
|
||||
// Logik amaran SweetAlert
|
||||
if (search === true) {
|
||||
if (blacklist_search === true) {
|
||||
Swal.fire({
|
||||
icon: 'warning',
|
||||
title: 'Amaran!',
|
||||
text: 'Pelanggan telah disenarai hitamkan dari Pembiayaan.'
|
||||
});
|
||||
}
|
||||
else if (isAnggota && !isPelanggan) {
|
||||
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({
|
||||
icon: 'info',
|
||||
title: 'Pelanggan Tiada Dalam Rekod!',
|
||||
text: 'Sila Daftar Pelanggan.'
|
||||
});
|
||||
}
|
||||
}
|
||||
if("{{ auth()->user()->cawangan }}" == 'X0301'){
|
||||
if (search === true) {
|
||||
if (blacklist_search === true) {
|
||||
Swal.fire({
|
||||
icon: 'warning',
|
||||
title: 'Amaran!',
|
||||
text: 'Pelanggan telah disenarai hitamkan dari Pembiayaan.'
|
||||
});
|
||||
}
|
||||
else if (isAnggota && !isPelanggan) {
|
||||
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({
|
||||
icon: 'info',
|
||||
title: 'Pelanggan Tiada Dalam Rekod!',
|
||||
text: 'Sila Daftar Pelanggan.'
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@@ -892,8 +892,6 @@
|
||||
|
||||
function verifycustomerMyKadReader(){
|
||||
|
||||
copyMykadPhotoFromImage();
|
||||
|
||||
let myKadModal = $('#daftar_pelanggan_mykad_reader');
|
||||
|
||||
// Construct URLSearchParams object instance from current URL querystring.
|
||||
@@ -1419,7 +1417,8 @@ document.getElementsByName('form-store')[0].addEventListener('keypress', functio
|
||||
let wakil_caricustomer_endpoint = "{{ route('wakil.caricustomer') }}";
|
||||
let mykad_reader_driver_endpoint = "{{ route('mykadreader.driver') }}";
|
||||
</script>
|
||||
<script src="{{ asset('js/mykad-reader-customer.js') }}?v=4"></script>
|
||||
<script src="{{ asset('js/iris-mykad-websocket-client-api.js') }}"></script>
|
||||
<script src="{{ asset('js/mykad-reader-customer.js') }}"></script>
|
||||
<script src="{{ asset('js/postcode-concerns.js') }}"></script>
|
||||
@endpush
|
||||
|
||||
|
||||
@@ -22,22 +22,6 @@
|
||||
</ol>
|
||||
</nav>
|
||||
|
||||
@if(session()->has('message'))
|
||||
<div class="alert alert-success">{{ session('message') }}</div>
|
||||
@endif
|
||||
|
||||
@if(!empty($customer_info['photo_base64']))
|
||||
<div class="form-group row col-md-12">
|
||||
<div class="col-md-12 d-flex justify-content-center pb-3">
|
||||
<img src="data:{{ $customer_info['photo_mime'] ?? 'image/jpeg' }};base64,{{ $customer_info['photo_base64'] }}"
|
||||
alt="Gambar MyKad"
|
||||
width="120"
|
||||
height="160"
|
||||
style="object-fit: cover;">
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="form-group row col-md-12">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group row">
|
||||
@@ -91,8 +75,7 @@
|
||||
->json();
|
||||
@endphp
|
||||
<input type="text" class="form-control" name="outstanding_semasa"
|
||||
id="outstanding_semasa" readonly
|
||||
value="{{ number_format($outstanding_semasa, 2) }}">
|
||||
id="outstanding_semasa" readonly value="{{ number_format($outstanding_semasa, 2) }}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -171,15 +154,10 @@
|
||||
<i class="fas fa-info-circle me-1"></i> Maklumat Pelanggan
|
||||
</button>
|
||||
|
||||
<button class="btn btn-info d-flex align-items-center" data-toggle="modal"
|
||||
data-target="#export_maklumat_modal" style="margin-right: 12px;">
|
||||
<i class="fas fa-print me-1"></i> Cetak Maklumat Pelanggan
|
||||
</button>
|
||||
|
||||
|
||||
|
||||
<!-- Butang Assign Sebagai Anggota -->
|
||||
@if (isset($showAssignAnggotaBtn) && $showAssignAnggotaBtn)
|
||||
@if (isset($showAssignAnggotaBtn) && $showAssignAnggotaBtn && auth()->user()->cawangan == 'X0301')
|
||||
<div class="m-0 p-2">
|
||||
<button type="button" class="btn btn-success d-flex align-items-center"
|
||||
data-noic="{{ $noic }}" onclick="assignAnggota(this)">
|
||||
@@ -368,7 +346,7 @@
|
||||
</div>
|
||||
<div class="nav nav-tabs" id="nav-tab" role="tablist">
|
||||
@php
|
||||
$activate_tab = request()->session()->pull('activate_tab', 'SAG_baru');
|
||||
$activate_tab = request()->session()->pull('activate_tab', 'SAG_lama');
|
||||
|
||||
$activate_tab_SAG_baru = $activate_tab === 'SAG_baru' ? 'active' : '';
|
||||
$aria_selected_SAG_baru = $activate_tab === 'SAG_baru' ? 'true' : 'false';
|
||||
@@ -383,123 +361,173 @@
|
||||
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>
|
||||
</div>
|
||||
</nav>
|
||||
<div class="tab-content" id="navtawarruqdannottawarruq">
|
||||
<div class="tab-pane fade {{ $activate_pane_SAG_baru }}" id="nav-tawarruq" role="tabpanel" aria-labelledby="nav-tawarruq-tab">
|
||||
<x-datatable
|
||||
id="myTable"
|
||||
filename="SAG_Baru"
|
||||
:columns="['Bil', 'No Rujukan', 'Tarikh Pembiayaan', 'Tarikh Matang', 'Baki Harga Jualan', 'Baki Pembiayaan', 'Margin', 'Tempoh', 'Keuntungan', 'Lelong', 'Borang Online']"
|
||||
/>
|
||||
</div>
|
||||
<div class="tab-pane fade {{ $activate_pane_SAG_lama }}" id="nav-xtawarruq" role="tabpanel" aria-labelledby="nav-xtawarruq-tab">
|
||||
<x-datatable
|
||||
id="xtawarruq"
|
||||
filename="SAG_Lama"
|
||||
:columns="['Bil', 'No Rujukan', 'Tarikh Pembiayaan', 'Tarikh Matang', 'Baki Harga Jualan', 'Baki Pembiayaan', 'Margin', 'Tempoh', 'Keuntungan', 'Lelong', 'Borang Online']"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Sudah Tebus --}}
|
||||
|
||||
<x-datatable
|
||||
id="dahtebusTable"
|
||||
filename="SAG_Sudah_Tebus"
|
||||
:columns="['Bil', 'No Rujukan', 'Tarikh Penyelesaian Pembiayaan', 'Baki Pembiayaan', 'Margin', 'Tempoh']"
|
||||
/>
|
||||
|
||||
<x-datatable
|
||||
id="lelongTable"
|
||||
filename="SAG_Lelong"
|
||||
:columns="['Bil', 'No Rujukan', 'Tarikh Lelong', 'Tarikh Tuntut', 'Pembiayaan', 'Harga Jual', 'Jum Tuntut/Bayar', 'Keuntungan', 'Caj Lelong', 'Status Tuntutan', 'Cetak']"
|
||||
/>
|
||||
|
||||
<div class="text-center">
|
||||
<button class="btn btn-primary" onclick="ubahfunc(this)" id="button-edit-gadaian">Ubah</button>
|
||||
<button class="btn btn-primary" onclick="hapusfunc()">Hapus</button>
|
||||
<button class="btn btn-primary" onclick="histfunc()">Rekod Pembiayaan</button>
|
||||
<button class="btn btn-primary" onclick="removeansuran(this)" id="button-remove-ansuran">Hapus Ansuran</button>
|
||||
<button class="btn btn-info" type="button" onclick="cetakBorangOnlineSelected()">Cetak Borang Online</button>
|
||||
</nav>
|
||||
<div class="tab-content" id="navtawarruqdannottawarruq">
|
||||
<div class="tab-pane fade {{ $activate_pane_SAG_baru }}" id="nav-tawarruq" role="tabpanel" aria-labelledby="nav-tawarruq-tab">
|
||||
<table class="table table-striped table-hover" id="myTable">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
<th>No Rujukan</th>
|
||||
<th>Tarikh Pembiayaan</th>
|
||||
<th>Tarikh Matang</th>
|
||||
<th>Baki Harga Jualan</th>
|
||||
<th>Baki Pembiayaan</th>
|
||||
<th>Margin</th>
|
||||
<th>Tempoh</th>
|
||||
<th>Keuntungan</th>
|
||||
<th>Lelong</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
<div class="tab-pane fade {{ $activate_pane_SAG_lama }}" id="nav-xtawarruq" role="tabpanel" aria-labelledby="nav-xtawarruq-tab">
|
||||
<table id="xtawarruq" class="table table-striped table-hover">
|
||||
<thead class="thead-dark">
|
||||
{{-- <tr>
|
||||
<th>Bil</th>
|
||||
<th>No Rujukan</th>
|
||||
<th>Tarikh Gadai</th>
|
||||
<th>Tarikh Matang</th>
|
||||
<th>Pembiayaan</th>
|
||||
<th>Margin</th>
|
||||
<th>Tempoh</th>
|
||||
<th>Lelong</th>
|
||||
</tr> --}}
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
<th>No Rujukan</th>
|
||||
<th>Tarikh Pembiayaan</th>
|
||||
<th>Tarikh Matang</th>
|
||||
<th>Baki Harga Jualan</th>
|
||||
<th>Baki Pembiayaan</th>
|
||||
<th>Margin</th>
|
||||
<th>Tempoh</th>
|
||||
<th>Keuntungan</th>
|
||||
<th>Lelong</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{{-- Sudah Tebus --}}
|
||||
|
||||
<table id="dahtebusTable" class="table table-striped table-hover">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
<th>No Rujukan</th>
|
||||
<th>Tarikh Penyelesaian Pembiayaan</th>
|
||||
<th>Baki Pembiayaan</th>
|
||||
<th>Margin</th>
|
||||
<th>Tempoh</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<table id="lelongTable" class="table table-striped table-hover">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
<th>No Rujukan</th>
|
||||
<th>Tarikh Lelong</th>
|
||||
<th>Tarikh Tuntut</th>
|
||||
<th>Pembiayaan</th>
|
||||
<th>Harga Jual</th>
|
||||
<th>Jum Tuntut/Bayar</th>
|
||||
<th>Keuntungan</th>
|
||||
<th>Caj Lelong</th>
|
||||
<th>Status Tuntutan</th>
|
||||
<th>Cetak</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<div class="text-center">
|
||||
<button class="btn btn-primary" onclick="ubahfunc(this)" id="button-edit-gadaian">Ubah</button>
|
||||
<button class="btn btn-primary" onclick="hapusfunc()">Hapus</button>
|
||||
<button class="btn btn-primary" onclick="histfunc()">Rekod Pembiayaan</button>
|
||||
<button class="btn btn-primary" onclick="removeansuran(this)" id="button-remove-ansuran">Hapus Ansuran</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal -->
|
||||
<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-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="customer_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">
|
||||
<form id="kemaskiniform">
|
||||
<div class='row form-group'>
|
||||
<div class='col-md-6'>
|
||||
<div class='form-group row col-md-12'>
|
||||
<div class='col-md-5'>
|
||||
Nama
|
||||
</div>
|
||||
<div class='col-md-7'>
|
||||
<input type="text" readonly name='nama' id='nama' value="{{ $customer_info['nama'] }}" class='form-control'>
|
||||
</div>
|
||||
<!-- Modal -->
|
||||
<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-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="customer_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">
|
||||
<form id="kemaskiniform">
|
||||
<div class='row form-group'>
|
||||
<div class='col-md-6'>
|
||||
<div class='form-group row col-md-12'>
|
||||
<div class='col-md-5'>
|
||||
Nama
|
||||
</div>
|
||||
<div class='form-group row col-md-12'>
|
||||
<div class='col-md-5'>
|
||||
No KP
|
||||
</div>
|
||||
<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'>
|
||||
</div>
|
||||
<div class='col-md-7'>
|
||||
<input type="text" readonly name='nama' id='nama' value="{{ $customer_info['nama'] }}" class='form-control'>
|
||||
</div>
|
||||
<div class='form-group row col-md-12'>
|
||||
<div class='col-md-5'>
|
||||
No Pelanggan
|
||||
</div>
|
||||
<div class='col-md-7'>
|
||||
<input type="text" readonly name='nopelanggan' id='nopelanggan' value="{{ $customer_info['nopelanggan'] }}" class='form-control'>
|
||||
</div>
|
||||
</div>
|
||||
<div class='form-group row col-md-12'>
|
||||
<div class='col-md-5'>
|
||||
No KP
|
||||
</div>
|
||||
<div class='form-group row col-md-12'>
|
||||
<div class='col-md-5'>
|
||||
No Telefon 1
|
||||
</div>
|
||||
<div class='col-md-7'>
|
||||
<input type="text" readonly name='' id='telefon' value="{{ $customer_info['telefon'] ? $customer_info['telefon'] : '' }}" class='form-control'>
|
||||
<span id="errortelefon" style="color:red;"></span>
|
||||
</div>
|
||||
<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'>
|
||||
</div>
|
||||
<div class='form-group row col-md-12'>
|
||||
<div class='col-md-5'>
|
||||
No Telefon 2
|
||||
</div>
|
||||
<div class='col-md-7'>
|
||||
<input type="text" readonly name='telefon2' id='telefon2' value="{{ $customer_info['telefon2'] ? $customer_info['telefon2'] : '' }}" class='form-control'>
|
||||
<span id="errortelefon2" style="color:red;"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class='form-group row col-md-12'>
|
||||
<div class='col-md-5'>
|
||||
No Pelanggan
|
||||
</div>
|
||||
<div class='form-group row col-md-12'>
|
||||
<div class='col-md-5'>
|
||||
Bank
|
||||
</div>
|
||||
<div class='col-md-7'>
|
||||
@php
|
||||
$bank = Http::withOptions(['verify' => config('app.api_verify')])
|
||||
->get($api_url . '/api/bank')
|
||||
->json();
|
||||
@endphp
|
||||
<select class="form-control" name="kodbank" data-placeholder="Pilih Bank" id="kodbank" disabled="true">
|
||||
<option value="-" selected disabled>-</option>
|
||||
@foreach ($bank as $banks)
|
||||
<div class='col-md-7'>
|
||||
<input type="text" readonly name='nopelanggan' id='nopelanggan' value="{{ $customer_info['nopelanggan'] }}" class='form-control'>
|
||||
</div>
|
||||
</div>
|
||||
<div class='form-group row col-md-12'>
|
||||
<div class='col-md-5'>
|
||||
No Telefon 1
|
||||
</div>
|
||||
<div class='col-md-7'>
|
||||
<input type="text" readonly name='' id='telefon' value="{{ $customer_info['telefon'] ? $customer_info['telefon'] : '' }}" class='form-control'>
|
||||
<span id="errortelefon" style="color:red;"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class='form-group row col-md-12'>
|
||||
<div class='col-md-5'>
|
||||
No Telefon 2
|
||||
</div>
|
||||
<div class='col-md-7'>
|
||||
<input type="text" readonly name='telefon2' id='telefon2' value="{{ $customer_info['telefon2'] ? $customer_info['telefon2'] : '' }}" class='form-control'>
|
||||
<span id="errortelefon2" style="color:red;"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class='form-group row col-md-12'>
|
||||
<div class='col-md-5'>
|
||||
Bank
|
||||
</div>
|
||||
<div class='col-md-7'>
|
||||
@php
|
||||
$bank = Http::withOptions(['verify' => config('app.api_verify')])
|
||||
->get($api_url . '/api/bank')
|
||||
->json();
|
||||
@endphp
|
||||
<select class="form-control" name="kodbank" data-placeholder="Pilih Bank" id="kodbank" disabled="true">
|
||||
<option value="-" selected disabled>-</option>
|
||||
@foreach ($bank as $banks)
|
||||
<option value="{{ $banks['abbreviation'] }}"
|
||||
{{ $banks['abbreviation'] == $customer_info['kodbank'] ? 'selected' : '' }}>
|
||||
{{ $banks['name'] }}</option>
|
||||
@@ -640,33 +668,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="export_maklumat_modal" tabindex="-1" aria-labelledby="export_maklumat_modalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-xl modal-dialog-centered" style="max-width: 920px;">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="export_maklumat_modalLabel">Eksport 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 p-0" style="height: 80vh; background: #e8eaed;">
|
||||
<iframe id="export_maklumat_iframe"
|
||||
src="about:blank"
|
||||
title="Maklumat Pelanggan"
|
||||
style="width: 100%; height: 100%; border: 0;"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$('#export_maklumat_modal').on('show.bs.modal', function () {
|
||||
$('#export_maklumat_iframe').attr('src', '{{ route('customer.print.maklumat', ['noic' => $noic]) }}');
|
||||
});
|
||||
$('#export_maklumat_modal').on('hidden.bs.modal', function () {
|
||||
$('#export_maklumat_iframe').attr('src', 'about:blank');
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="modal fade" id="opt_modal" tabindex="-1" aria-labelledby="opt_modalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered modal-lg">
|
||||
<div class="modal-content">
|
||||
@@ -717,14 +718,14 @@
|
||||
var kodcaw = "{{ $cawangan_info['kodcaw'] }}";
|
||||
var tagarrahnbid = "{{ $cawangan_info['tagarrahnbid'] }}";
|
||||
var min_komoditi = "{{ $min_komoditi }}";
|
||||
$('#daftar_gadai').on('click', function() {
|
||||
$('#daftar_gadai').on('click',function(){
|
||||
$("#daftar_gadai").prop('disabled', true);
|
||||
var noic = $('#noic').val();
|
||||
var iclama = "{{ $customer_info['kplama'] }}";
|
||||
var icbaru = "{{ $customer_info['kpbaru'] }}";
|
||||
var outstanding_semasa = "{{ $outstanding_semasa }}";
|
||||
event.preventDefault();
|
||||
if (outstanding_semasa >= 300000) {
|
||||
if(outstanding_semasa >= 300000){
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Had Pembiayaan',
|
||||
@@ -732,73 +733,77 @@
|
||||
});
|
||||
$("#daftar_gadai").prop('disabled', false);
|
||||
event.preventDefault();
|
||||
return false;
|
||||
} else {
|
||||
$.ajax({
|
||||
method: 'get',
|
||||
url: api_url + '/api/komuditi/check',
|
||||
success: function(data) {
|
||||
var check_komuditi = Object.keys(data).length;
|
||||
if (check_komuditi == 0) {
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Unit Komoditi Berbaki Minima',
|
||||
text: 'Sila Hubungi Operasi Untuk Membuat Pembelian Komoditi'
|
||||
});
|
||||
$("#daftar_gadai").prop('disabled', false);
|
||||
event.preventDefault();
|
||||
return false;
|
||||
} else {
|
||||
if (Number(data['unit_komuditi']) <= min_komoditi) {
|
||||
$("#daftar_gadai").prop('disabled', false);
|
||||
if (outstanding_semasa >= 300000) {
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Had Pembiayaan',
|
||||
text: 'Outstanding Pembiayaan Pelanggan Telah Melebihi Had'
|
||||
});
|
||||
$("#daftar_gadai").prop('disabled', false);
|
||||
event.preventDefault();
|
||||
return false;
|
||||
} else {
|
||||
$.ajax({
|
||||
method: 'get',
|
||||
url: api_url + '/api/komuditi/check',
|
||||
success: function(data) {
|
||||
var check_komuditi = Object.keys(data).length;
|
||||
if (check_komuditi == 0) {
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Unit Komoditi Berbaki Minima',
|
||||
text: 'Sila Hubungi Operasi Untuk Membuat Pembelian Komoditi'
|
||||
});
|
||||
$("#daftar_gadai").prop('disabled', false);
|
||||
event.preventDefault();
|
||||
return false;
|
||||
} else {
|
||||
if (icbaru.length > 0) {
|
||||
window.location.href =
|
||||
"{{ route('gadaian', ['noic' => $customer_info['kpbaru']]) }}";
|
||||
if (Number(data['unit_komuditi']) <= min_komoditi) {
|
||||
$("#daftar_gadai").prop('disabled', false);
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Unit Komoditi Berbaki Minima',
|
||||
text: 'Sila Hubungi Operasi Untuk Membuat Pembelian Komoditi'
|
||||
});
|
||||
event.preventDefault();
|
||||
return false;
|
||||
} else {
|
||||
window.location.href =
|
||||
"{{ route('gadaian', ['noic' => $customer_info['kplama']]) }}";
|
||||
if (icbaru.length > 0) {
|
||||
window.location.href =
|
||||
"{{ route('gadaian', ['noic' => $customer_info['kpbaru']]) }}";
|
||||
} else {
|
||||
window.location.href =
|
||||
"{{ route('gadaian', ['noic' => $customer_info['kplama']]) }}";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$('a[data-toggle="tab"]').on('shown.bs.tab', function () {
|
||||
if (typeof adjustErahnDatatables === 'function') {
|
||||
adjustErahnDatatables();
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
var tablegadai = initErahnDatatable('#myTable', {
|
||||
order: [[1, 'desc']],
|
||||
columnDefs: [
|
||||
{ targets: 0, orderable: false, width: '40px' },
|
||||
{ targets: -1, orderable: false, searchable: false, width: '70px' }
|
||||
$('a[data-toggle="tab"]').on('shown.bs.tab', function(e) {
|
||||
// here is the new selected tab id
|
||||
var selectedTabId = e.target.id;
|
||||
|
||||
});
|
||||
|
||||
var tablegadai = $('#myTable').DataTable({
|
||||
"scrollX": false,
|
||||
order: [
|
||||
[1, 'desc']
|
||||
]
|
||||
});
|
||||
|
||||
var xtawarruq = initErahnDatatable('#xtawarruq', {
|
||||
columnDefs: [
|
||||
{ targets: 0, orderable: false, width: '40px' }
|
||||
]
|
||||
var xtawarruq = $('#xtawarruq').DataTable({
|
||||
"scrollX": false
|
||||
});
|
||||
|
||||
var tabledahtebus = initErahnDatatable('#dahtebusTable');
|
||||
var tabledahtebus = $('#dahtebusTable').DataTable({});
|
||||
|
||||
var tablelelong = initErahnDatatable('#lelongTable', {
|
||||
columnDefs: [
|
||||
{ targets: -1, orderable: false, searchable: false, width: '80px' }
|
||||
]
|
||||
var tablelelong = $('#lelongTable').DataTable({
|
||||
"scrollX": false
|
||||
});
|
||||
|
||||
var historybayarandatatable = $('#tablehistorybayaran').DataTable({
|
||||
@@ -813,41 +818,6 @@
|
||||
minimumFractionDigits: 2
|
||||
});
|
||||
|
||||
function urlBorangOnline(norujukan) {
|
||||
return '{{ url("/gadai/borang-pengesahan-online") }}/' + encodeURIComponent(norujukan);
|
||||
}
|
||||
|
||||
function cetakBorangOnlineCell(gadai_detail) {
|
||||
var cara = String(gadai_detail['cara_terima'] || '').toUpperCase();
|
||||
if (cara !== 'ONLINE') {
|
||||
return '';
|
||||
}
|
||||
return '<a class="btn btn-sm btn-info" href="' + urlBorangOnline(gadai_detail['norujukan']) +
|
||||
'" target="_blank" title="Cetak borang pengesahan online"><i class="fas fa-print"></i></a>';
|
||||
}
|
||||
|
||||
function cetakBorangOnlineSelected() {
|
||||
var selected = $('input[name="belum"]:checked');
|
||||
if (!selected.length) {
|
||||
Swal.fire({
|
||||
icon: 'warning',
|
||||
title: 'Sila pilih SAG',
|
||||
text: 'Pilih pembiayaan untuk cetak borang pengesahan.'
|
||||
});
|
||||
return;
|
||||
}
|
||||
var cara = String(selected.data('cara-terima') || '').toUpperCase();
|
||||
if (cara !== 'ONLINE') {
|
||||
Swal.fire({
|
||||
icon: 'info',
|
||||
title: 'Bukan pembiayaan online',
|
||||
text: 'Borang ini hanya untuk SAG yang terima pembiayaan secara online.'
|
||||
});
|
||||
return;
|
||||
}
|
||||
window.open(urlBorangOnline(selected.val()), '_blank');
|
||||
}
|
||||
|
||||
function getGadaiByNorujukan(norujukan) {
|
||||
console.log(norujukan);
|
||||
let gadai_tawarruq = fetch(api_url + '/api/gadai/norujukan/' + norujukan);
|
||||
@@ -1007,7 +977,7 @@
|
||||
var channel = pusher.subscribe(
|
||||
'notice-kelulusan');
|
||||
channel.bind('my-kelulusan', function(
|
||||
data) {
|
||||
data) {
|
||||
|
||||
|
||||
if (data.norujukan ==
|
||||
@@ -1031,7 +1001,7 @@
|
||||
},
|
||||
success: function(
|
||||
data
|
||||
) {
|
||||
) {
|
||||
location
|
||||
.reload();
|
||||
|
||||
@@ -1040,18 +1010,17 @@
|
||||
xhr,
|
||||
status,
|
||||
error
|
||||
) {
|
||||
) {
|
||||
var err =
|
||||
eval(
|
||||
"(" +
|
||||
xhr
|
||||
.responseText +
|
||||
")"
|
||||
);
|
||||
);
|
||||
alert
|
||||
(xhr
|
||||
.responseText
|
||||
);
|
||||
.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -1249,8 +1218,8 @@
|
||||
|
||||
let table_norujukan = gadai_detail["norujukan"];
|
||||
tablegadai.row.add([
|
||||
'<input type="radio" value="' + gadai_detail["norujukan"] +
|
||||
'" name="belum" data-cara-terima="' + (gadai_detail['cara_terima'] || '') + '"/>',
|
||||
'<input type="radio" value=' + gadai_detail["norujukan"] +
|
||||
' name="belum"/>',
|
||||
'<a href="#" onclick="checkserah(this)" data-pinjaman=' +
|
||||
gadai_detail['pinjaman'] + ' data-hargajualan=' +
|
||||
gadai_detail['hargajualan'] + ' data-norujukan=' +
|
||||
@@ -1267,7 +1236,6 @@
|
||||
'RM ' + formatter.format(upahsemasa['pendapatan']),
|
||||
'<div style="white-space: nowrap; color:red; font-weight: bolder">' +
|
||||
taglel + '</div>',
|
||||
cetakBorangOnlineCell(gadai_detail),
|
||||
]).draw();
|
||||
}
|
||||
} else if (jenistebus == "sudah_tebus") {
|
||||
@@ -1280,7 +1248,7 @@
|
||||
'RM ' + formatter.format(gadai_detail['bakipjm']),
|
||||
(((Number(gadai_detail['pinjaman']) / Number(gadai_detail[
|
||||
'nilaimarhun'])) * 100).toFixed(2)).toLocaleString(
|
||||
"en-GB") + '%',
|
||||
"en-GB") + '%',
|
||||
gadai_detail['tempoh']
|
||||
]).draw();
|
||||
} else if (jenistebus == "lelong") {
|
||||
@@ -1311,7 +1279,7 @@
|
||||
'<a href="#" onclick="checktuntutbaki(this)" data-norujukan=' +
|
||||
gadai_detail['norujukan'] + ' data-tarikhtuntut=' +
|
||||
gadai_detail['trkhtuntut'] + '>' + gadai_detail[
|
||||
'norujukan'] + '</a>',
|
||||
'norujukan'] + '</a>',
|
||||
gadai_detail['t_lelong'],
|
||||
gadai_detail['trkhtuntut'],
|
||||
'RM ' + formatter.format(gadai_detail['pinjaman']),
|
||||
@@ -1328,7 +1296,7 @@
|
||||
'<a href="#" onclick="checktuntutbaki(this)" data-norujukan=' +
|
||||
gadai_detail['norujukan'] + ' data-tarikhtuntut=' +
|
||||
gadai_detail['trkhtuntut'] + '>' + gadai_detail[
|
||||
'norujukan'] + '</a>',
|
||||
'norujukan'] + '</a>',
|
||||
gadai_detail['t_lelong'],
|
||||
gadai_detail['trkhtuntut'],
|
||||
'RM ' + formatter.format(gadai_detail['pinjaman']),
|
||||
@@ -1587,9 +1555,6 @@
|
||||
success: function(data) {
|
||||
$('#myTable').parents('div.dataTables_wrapper').first().show();
|
||||
gadaiTable(data, "belum_tebus");
|
||||
if (typeof adjustErahnDatatables === 'function') {
|
||||
adjustErahnDatatables();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -2205,10 +2170,10 @@
|
||||
cancelButtonText: 'Salah',
|
||||
reverseButtons: true
|
||||
}).then((
|
||||
result) => {
|
||||
result) => {
|
||||
if (result
|
||||
.isConfirmed
|
||||
) {
|
||||
) {
|
||||
|
||||
$.ajax({
|
||||
method: 'put',
|
||||
@@ -2222,11 +2187,11 @@
|
||||
},
|
||||
success: function(
|
||||
data
|
||||
) {
|
||||
) {
|
||||
|
||||
if (data ===
|
||||
1
|
||||
) {
|
||||
) {
|
||||
Swal.fire({
|
||||
icon: 'success',
|
||||
title: 'Berjaya!',
|
||||
@@ -2261,7 +2226,7 @@
|
||||
Swal
|
||||
.DismissReason
|
||||
.cancel
|
||||
) {
|
||||
) {
|
||||
PengesahanAkhirWakil
|
||||
.fire(
|
||||
'Batal',
|
||||
@@ -2283,12 +2248,12 @@
|
||||
daftarwakilfunction
|
||||
(amaun,
|
||||
norujukan
|
||||
);
|
||||
);
|
||||
});
|
||||
}
|
||||
},
|
||||
error: function(xhr, status,
|
||||
error) {
|
||||
error) {
|
||||
var err = eval("(" + xhr
|
||||
.responseText + ")");
|
||||
alert(xhr.responseText);
|
||||
@@ -2520,7 +2485,7 @@
|
||||
success: function(data) {},
|
||||
error: function(xhr, status, error) {
|
||||
var err = eval("(" + xhr.responseText +
|
||||
")");
|
||||
")");
|
||||
alert(xhr.responseText);
|
||||
}
|
||||
});
|
||||
@@ -2568,7 +2533,7 @@
|
||||
location
|
||||
.reload();
|
||||
}
|
||||
);
|
||||
);
|
||||
} else {
|
||||
swalWithBootstrapButtons
|
||||
.fire(
|
||||
@@ -2581,7 +2546,7 @@
|
||||
location
|
||||
.reload();
|
||||
}
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -2595,10 +2560,10 @@
|
||||
xhr
|
||||
.responseText +
|
||||
")"
|
||||
);
|
||||
);
|
||||
alert(xhr
|
||||
.responseText
|
||||
);
|
||||
);
|
||||
}
|
||||
});
|
||||
return true;
|
||||
@@ -2757,10 +2722,10 @@
|
||||
'Maklumat Pembiayaan telah dihapuskan.',
|
||||
'success'
|
||||
).then(
|
||||
function() {
|
||||
location
|
||||
.reload();
|
||||
});
|
||||
function() {
|
||||
location
|
||||
.reload();
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -2846,9 +2811,6 @@
|
||||
url: api_url + "/api/customers/" + noic + "/gadai/belum_tebus/" + kodcaw,
|
||||
success: function(data) {
|
||||
gadaiTable(data, "belum_tebus");
|
||||
if (typeof adjustErahnDatatables === 'function') {
|
||||
adjustErahnDatatables();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,354 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ms">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Dummy — Borang Kelulusan Batch Pembiayaan Online</title>
|
||||
<style>
|
||||
* { box-sizing: border-box; }
|
||||
body {
|
||||
margin: 0;
|
||||
background: #e8eaed;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
color: #111;
|
||||
}
|
||||
|
||||
.toolbar {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
padding: 10px 16px;
|
||||
background: #1f3a5f;
|
||||
color: #fff;
|
||||
font-size: 13px;
|
||||
}
|
||||
.toolbar b { letter-spacing: 0.04em; }
|
||||
.toolbar .hint { opacity: 0.85; }
|
||||
.toolbar button {
|
||||
border: 0;
|
||||
background: #fff;
|
||||
color: #1f3a5f;
|
||||
font-weight: bold;
|
||||
padding: 8px 16px;
|
||||
cursor: pointer;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.sheet-wrap {
|
||||
padding: 24px 0 48px;
|
||||
}
|
||||
|
||||
.sheet {
|
||||
width: 210mm;
|
||||
min-height: 297mm;
|
||||
margin: 0 auto;
|
||||
background: #fff;
|
||||
padding: 14mm 12mm 16mm;
|
||||
box-shadow: 0 2px 12px rgba(0,0,0,.18);
|
||||
}
|
||||
|
||||
.title {
|
||||
text-align: center;
|
||||
margin: 14px 0 4px;
|
||||
}
|
||||
.title h1 {
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
letter-spacing: 0.04em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.title p {
|
||||
margin: 4px 0 0;
|
||||
font-size: 10px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.section {
|
||||
margin-top: 12px;
|
||||
}
|
||||
.section-title {
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
background: #eef1f4;
|
||||
border: 1px solid #111;
|
||||
border-bottom: 0;
|
||||
padding: 5px 8px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
table.fields {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
font-size: 11px;
|
||||
}
|
||||
table.fields th,
|
||||
table.fields td {
|
||||
border: 1px solid #111;
|
||||
padding: 6px 8px;
|
||||
vertical-align: top;
|
||||
text-align: left;
|
||||
}
|
||||
table.fields th {
|
||||
width: 22%;
|
||||
font-weight: normal;
|
||||
background: #fafbfc;
|
||||
color: #222;
|
||||
}
|
||||
table.fields td.amt {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
letter-spacing: 0.02em;
|
||||
}
|
||||
|
||||
table.lines {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
font-size: 9.5px;
|
||||
}
|
||||
table.lines th,
|
||||
table.lines td {
|
||||
border: 1px solid #111;
|
||||
padding: 4px 5px;
|
||||
vertical-align: top;
|
||||
}
|
||||
table.lines thead th {
|
||||
background: #eef1f4;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
text-transform: uppercase;
|
||||
font-size: 8.5px;
|
||||
letter-spacing: 0.02em;
|
||||
}
|
||||
table.lines td.num { text-align: center; }
|
||||
table.lines td.amt { text-align: right; white-space: nowrap; }
|
||||
table.lines tfoot td {
|
||||
font-weight: bold;
|
||||
background: #fafbfc;
|
||||
}
|
||||
|
||||
.akuan {
|
||||
font-size: 11px;
|
||||
line-height: 1.55;
|
||||
border: 1px solid #111;
|
||||
padding: 10px 12px;
|
||||
}
|
||||
.akuan ol {
|
||||
margin: 6px 0 0;
|
||||
padding-left: 18px;
|
||||
}
|
||||
.akuan li { margin-bottom: 4px; }
|
||||
|
||||
.signs {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 16px;
|
||||
margin-top: 16px;
|
||||
}
|
||||
.sign-box {
|
||||
border: 1px solid #111;
|
||||
min-height: 160px;
|
||||
padding: 8px 10px;
|
||||
font-size: 10px;
|
||||
}
|
||||
.sign-box .role {
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
text-transform: uppercase;
|
||||
border-bottom: 1px solid #ccc;
|
||||
padding-bottom: 4px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.sign-line {
|
||||
margin-top: 72px;
|
||||
border-top: 1px solid #111;
|
||||
padding-top: 6px;
|
||||
}
|
||||
.sign-line p { margin: 2px 0; }
|
||||
|
||||
@page {
|
||||
size: A4;
|
||||
margin: 10mm;
|
||||
}
|
||||
|
||||
@media print {
|
||||
body { background: #fff; }
|
||||
.toolbar { display: none !important; }
|
||||
.sheet-wrap { padding: 0; }
|
||||
.sheet {
|
||||
width: auto;
|
||||
min-height: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@php
|
||||
$cawangan = 'KOTA BHARU 2';
|
||||
$kodcaw = 'KB2';
|
||||
$alamat1 = 'Lot 123, Jalan Sultan Yahya Petra';
|
||||
$alamat2 = '15200 Kota Bharu, Kelantan';
|
||||
$notel = '09-123 4567';
|
||||
$tarikh = '03/09/2026';
|
||||
$batchNo = 'KB2-PO-20260903-B1-001';
|
||||
$slot = 'BATCH1';
|
||||
$status = 'SUBMITTED';
|
||||
$dihantarOleh = 'NUR AINA BINTI HASSAN';
|
||||
$dihantarPada = '03/09/2026 10:42';
|
||||
$opsBy = 'MOHD FAIZ BIN ISMAIL';
|
||||
|
||||
$lines = [
|
||||
['norujukan' => 'KB2-260903-0001', 'nama' => 'AHMAD BIN ABDULLAH', 'nokp' => '900101-03-1234', 'bank' => 'MAYBANK', 'noakaun' => '123456789012', 'nama_akaun' => 'AHMAD BIN ABDULLAH', 'pinjaman' => 15000.00],
|
||||
['norujukan' => 'KB2-260903-0004', 'nama' => 'SITI MARIAM BINTI YUSOF', 'nokp' => '850215-03-5678', 'bank' => 'CIMB', 'noakaun' => '800123456789', 'nama_akaun' => 'SITI MARIAM BINTI YUSOF', 'pinjaman' => 8200.50],
|
||||
['norujukan' => 'KB2-260903-0007', 'nama' => 'MOHD RAZAK BIN ALI', 'nokp' => '780930-03-1122', 'bank' => 'BANK ISLAM', 'noakaun' => '140234567890', 'nama_akaun' => 'MOHD RAZAK BIN ALI', 'pinjaman' => 5000.00],
|
||||
['norujukan' => 'KB2-260903-0010', 'nama' => 'FATIMAH BINTI OMAR', 'nokp' => '920408-03-3344', 'bank' => 'RHB', 'noakaun' => '212345678901', 'nama_akaun' => 'FATIMAH BINTI OMAR', 'pinjaman' => 12500.00],
|
||||
['norujukan' => 'KB2-260903-0012', 'nama' => 'HASSAN BIN IBRAHIM', 'nokp' => '700112-03-5566', 'bank' => 'MAYBANK', 'noakaun' => '156789012345', 'nama_akaun' => 'HASSAN BIN IBRAHIM', 'pinjaman' => 3400.00],
|
||||
];
|
||||
$jumlah = array_sum(array_column($lines, 'pinjaman'));
|
||||
@endphp
|
||||
|
||||
<div class="toolbar">
|
||||
<div>
|
||||
<b>DUMMY FORM</b>
|
||||
<span class="hint"> — reka bentuk borang kelulusan batch pembiayaan online (Operasi). Data ini contoh sahaja.</span>
|
||||
</div>
|
||||
<button type="button" onclick="window.print()">Cetak / Pratinjau</button>
|
||||
</div>
|
||||
|
||||
<div class="sheet-wrap">
|
||||
<div class="sheet">
|
||||
<x-print.header
|
||||
:cawangan="$cawangan"
|
||||
:kodcaw="$kodcaw"
|
||||
:alamat1="$alamat1"
|
||||
:alamat2="$alamat2"
|
||||
:notel="$notel"
|
||||
:tarikh="$tarikh"
|
||||
:norujukan="$batchNo"
|
||||
rujukan-label="No. Batch"
|
||||
:show-dummy-badge="true"
|
||||
/>
|
||||
|
||||
<div class="title">
|
||||
<h1>Borang Kelulusan Pembiayaan Online<br>Senarai Batch Pembayaran</h1>
|
||||
<p>Untuk semakan Operasi dan kelulusan Pengurus Besar. Bukan untuk tandatangan pelanggan.</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<div class="section-title">A. Maklumat Batch</div>
|
||||
<table class="fields">
|
||||
<tr>
|
||||
<th>No. Batch</th>
|
||||
<td>{{ $batchNo }}</td>
|
||||
<th>Cawangan</th>
|
||||
<td>{{ $kodcaw }} — {{ $cawangan }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Tarikh / Slot</th>
|
||||
<td>{{ $tarikh }} · {{ $slot }}</td>
|
||||
<th>Status Batch</th>
|
||||
<td>{{ $status }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Dihantar Oleh (PC)</th>
|
||||
<td>{{ $dihantarOleh }}</td>
|
||||
<th>Dihantar Pada</th>
|
||||
<td>{{ $dihantarPada }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Bilangan Rekod</th>
|
||||
<td>{{ count($lines) }}</td>
|
||||
<th>Jumlah Keseluruhan</th>
|
||||
<td class="amt">RM {{ number_format($jumlah, 2) }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<div class="section-title">B. Senarai Penerima Dalam Batch</div>
|
||||
<table class="lines">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:4%">Bil</th>
|
||||
<th style="width:14%">No. SAG</th>
|
||||
<th>Pelanggan</th>
|
||||
<th style="width:13%">No. KP</th>
|
||||
<th style="width:11%">Bank</th>
|
||||
<th style="width:13%">No. Akaun</th>
|
||||
<th>Nama Akaun</th>
|
||||
<th style="width:12%">Pinjaman (RM)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($lines as $i => $line)
|
||||
<tr>
|
||||
<td class="num">{{ $i + 1 }}</td>
|
||||
<td class="num">{{ $line['norujukan'] }}</td>
|
||||
<td>{{ $line['nama'] }}</td>
|
||||
<td class="num">{{ $line['nokp'] }}</td>
|
||||
<td>{{ $line['bank'] }}</td>
|
||||
<td class="num">{{ $line['noakaun'] }}</td>
|
||||
<td>{{ $line['nama_akaun'] }}</td>
|
||||
<td class="amt">{{ number_format($line['pinjaman'], 2) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="7" style="text-align:right">JUMLAH</td>
|
||||
<td class="amt">{{ number_format($jumlah, 2) }}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<div class="section-title">C. Pengesahan Operasi</div>
|
||||
<div class="akuan">
|
||||
Dengan ini disahkan bahawa senarai di Bahagian B telah disemak dan amaun pembiayaan
|
||||
sebanyak <b>RM {{ number_format($jumlah, 2) }}</b> ({{ count($lines) }} rekod)
|
||||
bagi batch <b>{{ $batchNo }}</b> cawangan <b>{{ $cawangan }}</b> adalah lengkap
|
||||
untuk proses pembayaran ke akaun bank pelanggan.
|
||||
<ol>
|
||||
<li>Maklumat SAG, nama, no. KP, bank dan no. akaun telah disemak terhadap rekod sistem.</li>
|
||||
<li>Pembayaran akan dikreditkan ke akaun penerima seperti senarai, bukan tunai di kaunter.</li>
|
||||
<li>Sebarang ralat akaun yang dikesan selepas kelulusan hendaklah dilaporkan serta-merta.</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="signs">
|
||||
<div class="sign-box">
|
||||
<div class="role">Tandatangan Operasi</div>
|
||||
<div class="sign-line">
|
||||
<p>Nama: {{ $opsBy }}</p>
|
||||
<p>Jawatan: Operasi</p>
|
||||
<p>Tarikh: {{ $tarikh }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sign-box">
|
||||
<div class="role">Pengurus Besar</div>
|
||||
<div class="sign-line">
|
||||
<p>Nama:</p>
|
||||
<p>Cop / Paraf:</p>
|
||||
<p>Tarikh:</p>
|
||||
</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>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,322 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ms">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Dummy — Borang Pengesahan Pembiayaan Online</title>
|
||||
<style>
|
||||
* { box-sizing: border-box; }
|
||||
body {
|
||||
margin: 0;
|
||||
background: #e8eaed;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
color: #111;
|
||||
}
|
||||
|
||||
.toolbar {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
padding: 10px 16px;
|
||||
background: #1f3a5f;
|
||||
color: #fff;
|
||||
font-size: 13px;
|
||||
}
|
||||
.toolbar b { letter-spacing: 0.04em; }
|
||||
.toolbar .hint { opacity: 0.85; }
|
||||
.toolbar button {
|
||||
border: 0;
|
||||
background: #fff;
|
||||
color: #1f3a5f;
|
||||
font-weight: bold;
|
||||
padding: 8px 16px;
|
||||
cursor: pointer;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.sheet-wrap {
|
||||
padding: 24px 0 48px;
|
||||
}
|
||||
|
||||
.sheet {
|
||||
width: 210mm;
|
||||
min-height: 297mm;
|
||||
margin: 0 auto;
|
||||
background: #fff;
|
||||
padding: 14mm 14mm 16mm;
|
||||
box-shadow: 0 2px 12px rgba(0,0,0,.18);
|
||||
}
|
||||
|
||||
.title {
|
||||
text-align: center;
|
||||
margin: 14px 0 4px;
|
||||
}
|
||||
.title h1 {
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
letter-spacing: 0.04em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.title p {
|
||||
margin: 4px 0 0;
|
||||
font-size: 10px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.section {
|
||||
margin-top: 12px;
|
||||
}
|
||||
.section-title {
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
background: #eef1f4;
|
||||
border: 1px solid #111;
|
||||
border-bottom: 0;
|
||||
padding: 5px 8px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
table.fields {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
font-size: 11px;
|
||||
}
|
||||
table.fields th,
|
||||
table.fields td {
|
||||
border: 1px solid #111;
|
||||
padding: 6px 8px;
|
||||
vertical-align: top;
|
||||
text-align: left;
|
||||
}
|
||||
table.fields th {
|
||||
width: 28%;
|
||||
font-weight: normal;
|
||||
background: #fafbfc;
|
||||
color: #222;
|
||||
}
|
||||
table.fields td.amt {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
letter-spacing: 0.02em;
|
||||
}
|
||||
|
||||
.akuan {
|
||||
font-size: 11px;
|
||||
line-height: 1.55;
|
||||
border: 1px solid #111;
|
||||
padding: 10px 12px;
|
||||
}
|
||||
.akuan ol {
|
||||
margin: 6px 0 0;
|
||||
padding-left: 18px;
|
||||
}
|
||||
.akuan li { margin-bottom: 4px; }
|
||||
|
||||
.signs {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr 1fr;
|
||||
gap: 10px;
|
||||
margin-top: 16px;
|
||||
}
|
||||
.sign-box {
|
||||
border: 1px solid #111;
|
||||
min-height: 150px;
|
||||
padding: 8px;
|
||||
font-size: 10px;
|
||||
}
|
||||
.sign-box .role {
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
text-transform: uppercase;
|
||||
border-bottom: 1px solid #ccc;
|
||||
padding-bottom: 4px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.sign-line {
|
||||
margin-top: 62px;
|
||||
border-top: 1px solid #111;
|
||||
padding-top: 6px;
|
||||
}
|
||||
.sign-line p { margin: 2px 0; }
|
||||
|
||||
@page {
|
||||
size: A4;
|
||||
margin: 10mm;
|
||||
}
|
||||
|
||||
@media print {
|
||||
body { background: #fff; }
|
||||
.toolbar { display: none !important; }
|
||||
.sheet-wrap { padding: 0; }
|
||||
.sheet {
|
||||
width: auto;
|
||||
min-height: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@php
|
||||
// Dummy data — replace later with real gadai / customer / bank values
|
||||
$cawangan = 'KOTA BHARU 2';
|
||||
$kodcaw = 'KB2';
|
||||
$alamat1 = 'Lot 123, Jalan Sultan Yahya Petra';
|
||||
$alamat2 = '15200 Kota Bharu, Kelantan';
|
||||
$notel = '09-123 4567';
|
||||
$norujukan = 'KB2-260903-0001';
|
||||
$tarikh = '03/09/2026';
|
||||
$teller = 'SITI AMINAH BINTI ALI';
|
||||
$nama = 'AHMAD BIN ABDULLAH';
|
||||
$nokp = '900101-03-1234';
|
||||
$nopelanggan = 'KB2001234';
|
||||
$telefon = '012-3456789';
|
||||
$pinjaman = '15,000.00';
|
||||
$bank = 'Malayan Banking Berhad (MAYBANK)';
|
||||
$noakaun = '123456789012';
|
||||
$nama_akaun = 'AHMAD BIN ABDULLAH';
|
||||
@endphp
|
||||
|
||||
<div class="toolbar">
|
||||
<div>
|
||||
<b>DUMMY FORM</b>
|
||||
<span class="hint"> — reka bentuk borang pengesahan pembiayaan online. Data ini contoh sahaja.</span>
|
||||
</div>
|
||||
<button type="button" onclick="window.print()">Cetak / Pratinjau</button>
|
||||
</div>
|
||||
|
||||
<div class="sheet-wrap">
|
||||
<div class="sheet">
|
||||
<x-print.header
|
||||
:cawangan="$cawangan"
|
||||
:kodcaw="$kodcaw"
|
||||
:alamat1="$alamat1"
|
||||
:alamat2="$alamat2"
|
||||
:notel="$notel"
|
||||
:tarikh="$tarikh"
|
||||
:show-dummy-badge="true"
|
||||
/>
|
||||
|
||||
<div class="title">
|
||||
<h1>Borang Pengesahan Penerimaan Pembiayaan<br>Secara Online (Akaun Bank)</h1>
|
||||
<p>Untuk diisi dan ditandatangani oleh pelanggan semasa transaksi gadai.</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<div class="section-title">A. Maklumat Pelanggan</div>
|
||||
<table class="fields">
|
||||
<tr>
|
||||
<th>Nama Pelanggan</th>
|
||||
<td colspan="3">{{ $nama }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>No. MyKad / Passport</th>
|
||||
<td>{{ $nokp }}</td>
|
||||
<th style="width:22%">No. Pelanggan</th>
|
||||
<td>{{ $nopelanggan }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>No. Telefon</th>
|
||||
<td>{{ $telefon }}</td>
|
||||
<th>Cawangan</th>
|
||||
<td>{{ $cawangan }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<div class="section-title">B. Maklumat Pembiayaan</div>
|
||||
<table class="fields">
|
||||
<tr>
|
||||
<th>No. Surat Akuan Gadai</th>
|
||||
<td>{{ $norujukan }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Amaun Pembiayaan</th>
|
||||
<td class="amt">RM {{ $pinjaman }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Cara Terima Pembiayaan</th>
|
||||
<td>Online (kredit ke akaun bank) — bukan tunai</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Teller</th>
|
||||
<td>{{ $teller }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<div class="section-title">C. Maklumat Akaun Bank Penerima</div>
|
||||
<table class="fields">
|
||||
<tr>
|
||||
<th>Nama Bank</th>
|
||||
<td>{{ $bank }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>No. Akaun</th>
|
||||
<td>{{ $noakaun }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Nama Pemegang Akaun</th>
|
||||
<td>{{ $nama_akaun }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<div class="section-title">D. Akuan Pelanggan</div>
|
||||
<div class="akuan">
|
||||
Saya, <b>{{ $nama }}</b> (No. KP: <b>{{ $nokp }}</b>), dengan ini mengesahkan bahawa:
|
||||
<ol>
|
||||
<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 faham kredit ke akaun tertakluk kepada semakan Pengurus Cawangan dan proses pembayaran pihak Koperasi.</li>
|
||||
<li>Saya bertanggungjawab sepenuhnya jika maklumat akaun tidak tepat, dan tidak akan menuntut ganti rugi atas kelewatan atau ralat yang berpunca daripadanya.</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="signs">
|
||||
<div class="sign-box">
|
||||
<div class="role">Tandatangan Pelanggan</div>
|
||||
<div class="sign-line">
|
||||
<p>Nama: {{ $nama }}</p>
|
||||
<p>No. KP: {{ $nokp }}</p>
|
||||
<p>Tarikh: {{ $tarikh }}</p>
|
||||
</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>
|
||||
|
||||
<x-print.footer>
|
||||
<b>Nota:</b>
|
||||
<p>1. Borang ini dicetak semasa pelanggan memilih cara terima pembiayaan secara Online.</p>
|
||||
<p>2. Pembiayaan akan dikreditkan ke akaun selepas semakan PC. Pelanggan tidak menerima wang tunai di kaunter.</p>
|
||||
<p>3. Sila pastikan nama pemegang akaun sepadan dengan nama pelanggan pada MyKad.</p>
|
||||
</x-print.footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,292 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ms">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Dummy — Maklumat Pelanggan</title>
|
||||
<style>
|
||||
* { box-sizing: border-box; }
|
||||
body {
|
||||
margin: 0;
|
||||
background: #e8eaed;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
color: #111;
|
||||
}
|
||||
|
||||
.toolbar {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
padding: 10px 16px;
|
||||
background: #1f3a5f;
|
||||
color: #fff;
|
||||
font-size: 13px;
|
||||
}
|
||||
.toolbar b { letter-spacing: 0.04em; }
|
||||
.toolbar .hint { opacity: 0.85; }
|
||||
.toolbar button {
|
||||
border: 0;
|
||||
background: #fff;
|
||||
color: #1f3a5f;
|
||||
font-weight: bold;
|
||||
padding: 8px 16px;
|
||||
cursor: pointer;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.sheet-wrap {
|
||||
padding: 24px 0 48px;
|
||||
}
|
||||
|
||||
.sheet {
|
||||
width: 210mm;
|
||||
min-height: 297mm;
|
||||
margin: 0 auto;
|
||||
background: #fff;
|
||||
padding: 14mm 14mm 16mm;
|
||||
box-shadow: 0 2px 12px rgba(0,0,0,.18);
|
||||
}
|
||||
|
||||
.title {
|
||||
text-align: center;
|
||||
margin: 14px 0 4px;
|
||||
}
|
||||
.title h1 {
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
letter-spacing: 0.04em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.title p {
|
||||
margin: 4px 0 0;
|
||||
font-size: 10px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.identity {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) 32mm;
|
||||
gap: 12px;
|
||||
align-items: start;
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
.photo-box {
|
||||
width: 32mm;
|
||||
text-align: center;
|
||||
}
|
||||
.photo-box img {
|
||||
display: block;
|
||||
width: 32mm;
|
||||
height: 42mm;
|
||||
object-fit: cover;
|
||||
border: 1px solid #111;
|
||||
background: #eef1f4;
|
||||
}
|
||||
.photo-box .caption {
|
||||
margin-top: 4px;
|
||||
font-size: 8.5px;
|
||||
color: #444;
|
||||
letter-spacing: 0.04em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.section {
|
||||
margin-top: 12px;
|
||||
}
|
||||
.section-title {
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
background: #eef1f4;
|
||||
border: 1px solid #111;
|
||||
border-bottom: 0;
|
||||
padding: 5px 8px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
table.fields {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
font-size: 11px;
|
||||
}
|
||||
table.fields th,
|
||||
table.fields td {
|
||||
border: 1px solid #111;
|
||||
padding: 6px 8px;
|
||||
vertical-align: top;
|
||||
text-align: left;
|
||||
}
|
||||
table.fields th {
|
||||
width: 28%;
|
||||
font-weight: normal;
|
||||
background: #fafbfc;
|
||||
color: #222;
|
||||
}
|
||||
|
||||
@page {
|
||||
size: A4;
|
||||
margin: 10mm;
|
||||
}
|
||||
|
||||
@media print {
|
||||
body { background: #fff; }
|
||||
.toolbar { display: none !important; }
|
||||
.sheet-wrap { padding: 0; }
|
||||
.sheet {
|
||||
width: auto;
|
||||
min-height: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@php
|
||||
$cawangan = 'KOTA BHARU 2';
|
||||
$kodcaw = 'KB2';
|
||||
$alamat1 = 'Lot 123, Jalan Sultan Yahya Petra';
|
||||
$alamat2 = '15200 Kota Bharu, Kelantan';
|
||||
$notel = '09-123 4567';
|
||||
$tarikh = now()->format('d/m/Y');
|
||||
|
||||
$nama = 'AHMAD BIN ABDULLAH';
|
||||
$nokp = '900101-03-1234';
|
||||
$nopelanggan = 'KB2001234';
|
||||
$telefon = '012-3456789';
|
||||
$telefon2 = '09-765 4321';
|
||||
$alamat = 'Lot 45, Kampung Sireh';
|
||||
$poskod = '15050';
|
||||
$daerah = 'Kota Bharu';
|
||||
$negeri = 'Kelantan';
|
||||
$bank = 'Malayan Banking Berhad (MAYBANK)';
|
||||
$noakaun = '123456789012';
|
||||
$pekerjaan = 'Kakitangan Kerajaan';
|
||||
$nota = 'Pelanggan tetap cawangan KB2.';
|
||||
$status = 'Anggota Koperasi';
|
||||
|
||||
$photo_svg = '<svg xmlns="http://www.w3.org/2000/svg" width="240" height="320" viewBox="0 0 240 320">'
|
||||
. '<rect fill="#d9dee5" width="240" height="320"/>'
|
||||
. '<circle cx="120" cy="118" r="52" fill="#8b949e"/>'
|
||||
. '<ellipse cx="120" cy="286" rx="90" ry="92" fill="#8b949e"/>'
|
||||
. '</svg>';
|
||||
$photo_src = 'data:image/svg+xml;base64,' . base64_encode($photo_svg);
|
||||
@endphp
|
||||
|
||||
<div class="toolbar">
|
||||
<div>
|
||||
<b>DUMMY FORM</b>
|
||||
<span class="hint"> — reka bentuk cetakan A4 maklumat pelanggan. Data ini contoh sahaja.</span>
|
||||
</div>
|
||||
<button type="button" onclick="window.print()">Cetak / Pratinjau</button>
|
||||
</div>
|
||||
|
||||
<div class="sheet-wrap">
|
||||
<div class="sheet">
|
||||
<x-print.header
|
||||
:cawangan="$cawangan"
|
||||
:kodcaw="$kodcaw"
|
||||
:alamat1="$alamat1"
|
||||
:alamat2="$alamat2"
|
||||
:notel="$notel"
|
||||
:tarikh="$tarikh"
|
||||
:norujukan="$nopelanggan"
|
||||
rujukan-label="No. Pelanggan"
|
||||
:show-dummy-badge="true"
|
||||
/>
|
||||
|
||||
<div class="title">
|
||||
<h1>Maklumat Pelanggan</h1>
|
||||
<p>Salinan maklumat pengenalan diri pelanggan untuk rujukan cawangan.</p>
|
||||
</div>
|
||||
|
||||
<div class="identity">
|
||||
<div>
|
||||
<div class="section-title">A. Pengenalan Diri</div>
|
||||
<table class="fields">
|
||||
<tr>
|
||||
<th>Nama</th>
|
||||
<td>{{ $nama }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>No. Kad Pengenalan</th>
|
||||
<td>{{ $nokp }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>No. Pelanggan</th>
|
||||
<td>{{ $nopelanggan }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Status</th>
|
||||
<td>{{ $status }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="photo-box">
|
||||
<img src="{{ $photo_src }}" alt="Gambar MyKad">
|
||||
<div class="caption">Gambar MyKad</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<div class="section-title">B. Maklumat Hubungan & Alamat</div>
|
||||
<table class="fields">
|
||||
<tr>
|
||||
<th>No. Telefon 1</th>
|
||||
<td>{{ $telefon }}</td>
|
||||
<th style="width:22%">No. Telefon 2</th>
|
||||
<td>{{ $telefon2 }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Alamat</th>
|
||||
<td colspan="3">{{ $alamat }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Poskod</th>
|
||||
<td>{{ $poskod }}</td>
|
||||
<th>Daerah</th>
|
||||
<td>{{ $daerah }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Negeri</th>
|
||||
<td colspan="3">{{ $negeri }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<div class="section-title">C. Bank & Pekerjaan</div>
|
||||
<table class="fields">
|
||||
<tr>
|
||||
<th>Bank</th>
|
||||
<td colspan="3">{{ $bank }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>No. Akaun</th>
|
||||
<td colspan="3">{{ $noakaun }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Pekerjaan</th>
|
||||
<td colspan="3">{{ $pekerjaan }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Nota</th>
|
||||
<td colspan="3">{{ $nota }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<x-print.footer :show-copies="false">
|
||||
<b>Nota:</b>
|
||||
<p>1. Borang ini dicetak dari skrin Maklumat Pelanggan untuk rujukan cawangan.</p>
|
||||
<p>2. Gambar diambil daripada rekod MyKad pelanggan dalam sistem.</p>
|
||||
</x-print.footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -29,7 +29,6 @@
|
||||
<div class="form-group row col-12">
|
||||
<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="tag_anggota" id="tag_anggota" value="{{ $customer_info['tag_anggota'] ?? 0 }}">
|
||||
|
||||
</div>
|
||||
<div class="col-12 mb-2">
|
||||
@@ -290,7 +289,6 @@
|
||||
<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>
|
||||
<input type="submit" name="terima_gadai" id="terima_gadai" class="float-right btn btn-primary mr-2" value="Terima">
|
||||
<button type="button" id="cetak_borang_online" class="float-right btn btn-info mr-2" style="display:none;">Cetak Borang</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -694,23 +692,18 @@
|
||||
|
||||
|
||||
$.ajax({
|
||||
method:'GET',
|
||||
url: api_url + '/api/kadarujrah',
|
||||
async:false,
|
||||
data:{
|
||||
'nokp': $('#nokp').val(),
|
||||
'nilaimarhun' : total_nilai_marhun,
|
||||
'kodcaw' : kodcaw_ujrah
|
||||
},
|
||||
success:function(data){
|
||||
kadarupah = data;
|
||||
|
||||
// Jika anggota (tag_anggota = 1), kadar ujrah dipaksa 0.00
|
||||
if(Number($('#tag_anggota').val()) === 1){
|
||||
kadarupah = 0;
|
||||
}
|
||||
}
|
||||
});
|
||||
method:'GET',
|
||||
url: api_url + '/api/kadarujrah',
|
||||
async:false,
|
||||
data:{
|
||||
'nokp': $('#nokp').val(),
|
||||
'nilaimarhun' : total_nilai_marhun,
|
||||
'kodcaw' : kodcaw_ujrah
|
||||
},
|
||||
success:function(data){
|
||||
kadarupah = data;
|
||||
}
|
||||
});
|
||||
|
||||
$('#total_nilai_marhun').val(formatter.format(total_nilai_marhun));
|
||||
$('#marhun_detail').val(marhun_details);
|
||||
@@ -1272,7 +1265,6 @@
|
||||
} else {
|
||||
$('#cara_terima_section').hide();
|
||||
$('#bank_online_section').hide();
|
||||
$('#cetak_borang_online').hide();
|
||||
$('#cara_terima_tunai').prop('checked', true);
|
||||
}
|
||||
}
|
||||
@@ -1280,13 +1272,11 @@
|
||||
function toggleBankOnlineSection() {
|
||||
if ($('input[name="cara_terima"]:checked').val() === 'ONLINE') {
|
||||
$('#bank_online_section').show();
|
||||
$('#cetak_borang_online').show();
|
||||
var nama = $('#gadai_kodbank option:selected').data('nama') || '';
|
||||
$('#gadai_nama_bank').val(nama);
|
||||
refreshModalOnlineStatus();
|
||||
} else {
|
||||
$('#bank_online_section').hide();
|
||||
$('#cetak_borang_online').hide();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1298,40 +1288,6 @@
|
||||
$('#gadai_nama_bank').val($('#gadai_kodbank option:selected').data('nama') || '');
|
||||
});
|
||||
|
||||
$(document).on('click', '#cetak_borang_online', function () {
|
||||
var kodbank = $('#gadai_kodbank').val();
|
||||
var noakaun = ($('#gadai_noakaun').val() || '').trim();
|
||||
var namaAkaun = ($('#gadai_nama_akaun').val() || '').trim();
|
||||
var namaBank = $('#gadai_kodbank option:selected').data('nama') || $('#gadai_nama_bank').val() || '';
|
||||
var pinjaman = String($('#pinjaman').val() || '').replace(/,/g, '');
|
||||
|
||||
if (!kodbank || !noakaun) {
|
||||
Swal.fire({
|
||||
icon: 'warning',
|
||||
title: 'Maklumat bank tidak lengkap',
|
||||
text: 'Sila lengkapkan bank dan no. akaun sebelum cetak borang. Anda boleh betulkan dan cetak semula tanpa tekan Terima.'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
var form = $('<form>', {
|
||||
method: 'POST',
|
||||
action: '{{ route("gadai.print.borang.online.preview") }}',
|
||||
target: '_blank'
|
||||
});
|
||||
form.append($('<input>', { type: 'hidden', name: '_token', value: '{{ csrf_token() }}' }));
|
||||
form.append($('<input>', { type: 'hidden', name: 'norujukan', value: $('#norujukan_gadai').val() || $('#norujukan').val() || '' }));
|
||||
form.append($('<input>', { type: 'hidden', name: 'nokp', value: $('#nokp').val() || '' }));
|
||||
form.append($('<input>', { type: 'hidden', name: 'nopelanggan', value: $('#nopelanggan').val() || '' }));
|
||||
form.append($('<input>', { type: 'hidden', name: 'nama_pelanggan', value: $('input[name="nama_pelanggan"]').val() || '' }));
|
||||
form.append($('<input>', { type: 'hidden', name: 'pinjaman', value: pinjaman }));
|
||||
form.append($('<input>', { type: 'hidden', name: 'kodbank', value: kodbank }));
|
||||
form.append($('<input>', { type: 'hidden', name: 'nama_bank', value: namaBank }));
|
||||
form.append($('<input>', { type: 'hidden', name: 'noakaun', value: noakaun }));
|
||||
form.append($('<input>', { type: 'hidden', name: 'nama_akaun', value: namaAkaun }));
|
||||
form.appendTo('body').trigger('submit').remove();
|
||||
});
|
||||
|
||||
async function getModalOnline() {
|
||||
let kodcaw = $('#kodcaw').val();
|
||||
let apiUrl = api_url + '/api/modal-online/' + kodcaw;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<li class="breadcrumb-item"><a href="{{ route('laporan') }}">Laporan</a></li>
|
||||
<li class="breadcrumb-item active" aria-current="page">Pembiayaan</li>
|
||||
</ol>
|
||||
</nav>
|
||||
</nav>
|
||||
|
||||
<div class="card-body text-center">
|
||||
<div class="row form-group">
|
||||
@@ -22,7 +22,7 @@
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-">
|
||||
<form action="{{ route('gadaianujrah.laporancetak') }}" target="_blank" method="post">
|
||||
@csrf
|
||||
<div class="input-group mb-3">
|
||||
@@ -86,8 +86,7 @@
|
||||
var tablegadai = $('#myTable').DataTable({
|
||||
"ordering": false
|
||||
});
|
||||
|
||||
$(document).ready(function () {
|
||||
$(document).ready( function () {
|
||||
$('#datemula').datepicker({
|
||||
format: 'dd-mm-yyyy'
|
||||
});
|
||||
@@ -100,7 +99,7 @@
|
||||
var current_date = current.getDate();
|
||||
var current_month = current.getMonth()+1;
|
||||
var current_year = current.getFullYear();
|
||||
var today_date = current_year + '-' + current_month + '-' + current_date;
|
||||
var today_date = current_year + '-' +current_month+'-'+current_date;
|
||||
|
||||
$.ajax({
|
||||
method:'get',
|
||||
@@ -109,46 +108,18 @@
|
||||
mula:today_date,
|
||||
akhir:today_date,
|
||||
},
|
||||
success: function(response){
|
||||
console.log('=== RESPONSE PENUH ===');
|
||||
console.log('Type:', typeof response);
|
||||
console.log('Is Array:', Array.isArray(response));
|
||||
console.log('Response:', response);
|
||||
|
||||
// Check jika response adalah array terus
|
||||
var gadai;
|
||||
if (Array.isArray(response)) {
|
||||
gadai = response;
|
||||
} else if (response.gadai && Array.isArray(response.gadai)) {
|
||||
gadai = response.gadai;
|
||||
} else {
|
||||
gadai = [];
|
||||
}
|
||||
|
||||
console.log('=== DATA GADAI ===');
|
||||
console.log('Jumlah rekod:', gadai.length);
|
||||
console.log('Data gadai:', gadai);
|
||||
|
||||
if(gadai.length > 0) {
|
||||
console.log('Contoh rekod pertama:', gadai[0]);
|
||||
console.log('Field yang ada:', Object.keys(gadai[0]));
|
||||
}
|
||||
|
||||
success: function(gadai){
|
||||
gadaitable(gadai);
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error('Error AJAX:', error);
|
||||
console.error('Status:', status);
|
||||
console.error('Response:', xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#datemula').change(function(){
|
||||
|
||||
//mula
|
||||
var input_date = this.value;
|
||||
var split_date = input_date.split('-');
|
||||
var mula_date = split_date[2] + '-' + split_date[1] + '-' + split_date[0];
|
||||
var mula_date = split_date[2] + '-' +split_date[1]+'-'+split_date[0];
|
||||
|
||||
var mula = mula_date;
|
||||
|
||||
@@ -159,7 +130,7 @@
|
||||
{
|
||||
var input_date = hinggainput;
|
||||
var split_date = input_date.split('-');
|
||||
var hingga_date = split_date[2] + '-' + split_date[1] + '-' + split_date[0];
|
||||
var hingga_date = split_date[2] + '-' +split_date[1]+'-'+split_date[0];
|
||||
|
||||
var akhir = hingga_date;
|
||||
|
||||
@@ -168,7 +139,7 @@
|
||||
var current_date = current.getDate();
|
||||
var current_month = current.getMonth()+1;
|
||||
var current_year = current.getFullYear();
|
||||
var today_date = current_year + '-' + current_month + '-' + current_date;
|
||||
var today_date = current_year + '-' +current_month+'-'+current_date;
|
||||
|
||||
var akhir = today_date;
|
||||
}
|
||||
@@ -180,18 +151,7 @@
|
||||
mula:mula,
|
||||
akhir:akhir,
|
||||
},
|
||||
success: function(response){
|
||||
console.log('Response datemula:', response);
|
||||
|
||||
var gadai;
|
||||
if (Array.isArray(response)) {
|
||||
gadai = response;
|
||||
} else if (response.gadai && Array.isArray(response.gadai)) {
|
||||
gadai = response.gadai;
|
||||
} else {
|
||||
gadai = [];
|
||||
}
|
||||
|
||||
success: function(gadai){
|
||||
gadaitable(gadai);
|
||||
}
|
||||
});
|
||||
@@ -200,7 +160,7 @@
|
||||
$('#datehingga').change(function(){
|
||||
var input_date = this.value;
|
||||
var split_date = input_date.split('-');
|
||||
var hingga_date = split_date[2] + '-' + split_date[1] + '-' + split_date[0];
|
||||
var hingga_date = split_date[2] + '-' +split_date[1]+'-'+split_date[0];
|
||||
|
||||
var akhir = hingga_date;
|
||||
|
||||
@@ -211,7 +171,7 @@
|
||||
{
|
||||
var input_date = mulainput;
|
||||
var split_date = input_date.split('-');
|
||||
var mula_date = split_date[2] + '-' + split_date[1] + '-' + split_date[0];
|
||||
var mula_date = split_date[2] + '-' +split_date[1]+'-'+split_date[0];
|
||||
|
||||
var mula = mula_date;
|
||||
|
||||
@@ -229,18 +189,7 @@
|
||||
mula:mula,
|
||||
akhir:akhir,
|
||||
},
|
||||
success: function(response){
|
||||
console.log('Response datehingga:', response);
|
||||
|
||||
var gadai;
|
||||
if (Array.isArray(response)) {
|
||||
gadai = response;
|
||||
} else if (response.gadai && Array.isArray(response.gadai)) {
|
||||
gadai = response.gadai;
|
||||
} else {
|
||||
gadai = [];
|
||||
}
|
||||
|
||||
success: function(gadai){
|
||||
gadaitable(gadai);
|
||||
}
|
||||
});
|
||||
@@ -259,72 +208,55 @@
|
||||
var total_onepercent = 0;
|
||||
var total_ujrah = 0;
|
||||
|
||||
tablegadai.clear().draw();
|
||||
|
||||
// Semak jika data kosong
|
||||
if(!data || data.length === 0) {
|
||||
console.log('Tiada data untuk dipaparkan');
|
||||
return;
|
||||
}
|
||||
|
||||
// TAMBAH INI: Log structure data pertama
|
||||
console.log('=== STRUKTUR DATA ===');
|
||||
console.log('Data pertama:', data[0]);
|
||||
console.log('Keys yang ada:', Object.keys(data[0]));
|
||||
|
||||
$.each(data,function(index,gadai){
|
||||
// Log setiap item untuk debug
|
||||
console.log('Item ' + index + ':', gadai);
|
||||
|
||||
// Validasi data sebelum gunakan
|
||||
var pinjaman = gadai['pinjaman'] ? Number(gadai['pinjaman']) : 0;
|
||||
var nilaimarhun = gadai['nilaimarhun'] ? Number(gadai['nilaimarhun']) : 0;
|
||||
var berat = gadai['berat'] ? Number(gadai['berat']) : 0;
|
||||
var onepercent = gadai['onepercent'] ? Number(gadai['onepercent']) : 0;
|
||||
var ujrah = gadai['ujrah'] ? Number(gadai['ujrah']) : 0;
|
||||
|
||||
console.log('Nilai processed:', {pinjaman, nilaimarhun, berat, onepercent, ujrah});
|
||||
|
||||
total_pinjaman += pinjaman;
|
||||
total_nm += nilaimarhun;
|
||||
total_berat += berat;
|
||||
total_onepercent += (onepercent * 12);
|
||||
total_ujrah += (ujrah * 12);
|
||||
|
||||
var upah12 = 0;
|
||||
if (gadai['tagbaru'] == 0) {
|
||||
upah12 = gadai['upah12'] ? Number(gadai['upah12']) : 0;
|
||||
} else {
|
||||
upah12 = (ujrah * 12) + (onepercent * 12);
|
||||
}
|
||||
|
||||
total_upah12 += upah12;
|
||||
|
||||
// Pastikan semua nilai ada sebelum add row
|
||||
tablegadai.row.add([
|
||||
counter,
|
||||
gadai['nama'] || '-',
|
||||
gadai['nokp'] || '-',
|
||||
gadai['t_gadai'] || '-',
|
||||
gadai['norujukan'] || '-',
|
||||
formatter.format(pinjaman),
|
||||
formatter.format(ujrah * 12),
|
||||
formatter.format(onepercent * 12),
|
||||
formatter.format(upah12),
|
||||
formatter.format(nilaimarhun),
|
||||
formatter.format(berat)
|
||||
]).draw(false);
|
||||
|
||||
|
||||
counter++;
|
||||
tablegadai.clear().draw();
|
||||
$.each(data,function(index,gadai){
|
||||
total_pinjaman += Number(gadai['pinjaman']);
|
||||
total_nm += Number(gadai['nilaimarhun']);
|
||||
total_berat += Number(gadai['berat']);
|
||||
total_onepercent += Number(gadai['onepercent']*12);
|
||||
total_ujrah += Number(gadai['ujrah']*12);
|
||||
|
||||
if (gadai['tagbaru'] == 0) {
|
||||
|
||||
var upah12 = gadai['upah12'];
|
||||
|
||||
} else {
|
||||
|
||||
var upah12 = gadai['ujrah']*12 + gadai['onepercent']*12;
|
||||
|
||||
}
|
||||
|
||||
total_upah12 += Number(upah12) ;
|
||||
|
||||
tablegadai.row.add([
|
||||
counter,
|
||||
gadai['nama'],
|
||||
gadai['nokp'],
|
||||
gadai['t_gadai'],
|
||||
gadai['norujukan'],
|
||||
formatter.format(gadai['pinjaman']),
|
||||
formatter.format(gadai['ujrah']*12),
|
||||
formatter.format(gadai['onepercent']*12),
|
||||
formatter.format(upah12),
|
||||
formatter.format(gadai['nilaimarhun']),
|
||||
formatter.format(gadai['berat'])
|
||||
]).draw();
|
||||
$('#pinjamantotal').text(formatter.format(total_pinjaman.toFixed(2)));
|
||||
$('#upah12total').text(formatter.format(total_upah12.toFixed(2)));
|
||||
$('#nmtotal').text(formatter.format(total_nm.toFixed(2)));
|
||||
$('#berattotal').text(formatter.format(total_berat.toFixed(2)));
|
||||
$('#berattotal').text(formatter.format(total_berat.toFixed(2)));
|
||||
$('#onepercenttotal').text(formatter.format(total_onepercent.toFixed(2)));
|
||||
$('#ujrahtotal').text(formatter.format(total_ujrah.toFixed(2)));
|
||||
|
||||
|
||||
|
||||
counter = counter + 1;
|
||||
});
|
||||
|
||||
// Update total selepas loop selesai
|
||||
$('#pinjamantotal').text(formatter.format(total_pinjaman.toFixed(2)));
|
||||
$('#upah12total').text(formatter.format(total_upah12.toFixed(2)));
|
||||
$('#nmtotal').text(formatter.format(total_nm.toFixed(2)));
|
||||
$('#berattotal').text(formatter.format(total_berat.toFixed(2)));
|
||||
$('#onepercenttotal').text(formatter.format(total_onepercent.toFixed(2)));
|
||||
$('#ujrahtotal').text(formatter.format(total_ujrah.toFixed(2)));
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
@endsection
|
||||
|
||||
|
||||
@@ -43,6 +43,9 @@
|
||||
<b>Cawangan</b>
|
||||
</div>
|
||||
<div class='col-md-7'>
|
||||
@php
|
||||
$cawangan_all = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/cawangan')->json();
|
||||
@endphp
|
||||
<select class="form-control" name="cawangan" data-placeholder="Pilih Cawangan" id="cawangan">
|
||||
<option disabled selected value> -- Pilih Cawangan -- </option>
|
||||
<option value="operasi">Operasi</option>
|
||||
@@ -103,12 +106,81 @@
|
||||
<div class="card-body text-center">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<x-datatable
|
||||
id="rekod_kakitangan"
|
||||
filename="Senarai_Kakitangan"
|
||||
:columns="['Bil', 'Tindakan', 'Nama Staff', 'Jawatan', 'Role Harian', 'Role Asal', 'Cawangan']"
|
||||
:skipExport="['Bil', 'Tindakan']"
|
||||
/>
|
||||
<table id="rekod_kakitangan" class="table table-striped table-hover">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
<th>Nama Staff</th>
|
||||
<th>Jawatan</th>
|
||||
<th>Cawangan</th>
|
||||
<th>Tindakan</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($kakitangan as $index=>$staff)
|
||||
@if($staff->roles != 'admin')
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $staff->name }}</td>
|
||||
<td>{{ strtoupper($staff->roles) }}</td>
|
||||
<td>
|
||||
@if($staff->cawangan == 'operasi' || $staff->cawangan == 'callcenter' || $staff->cawangan == 'admin')
|
||||
{{ ucwords($staff->cawangan) }}
|
||||
@else
|
||||
@php
|
||||
$cawangan_staff = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $staff->cawangan)->json();
|
||||
echo (isset($cawangan_staff['details_caw'])) ? ucwords($cawangan_staff['details_caw']) : 'test';
|
||||
@endphp
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if($auth_user->roles == 'operasi')
|
||||
<a href="{{ route('kakitangan.tukartaraf',['id'=>$staff->id]) }}" class="btn btn-warning" title="Tukar Taraf"><i class="material-icons">edit</i></a>
|
||||
<a href="{{ route('kakitangan.tukarcawangan',['id'=>$staff->id]) }}" class="btn btn-info" title="Tukar Cawangan"><i class="material-icons">work</i></a>
|
||||
<a href="{{ route('operasi.kakitangan.edit',['id'=>$staff->id]) }}" class="btn btn-success" title="Edit Maklumat"><i class="material-icons">settings</i></a>
|
||||
@if(
|
||||
app()->environment(['local', 'staging'])
|
||||
&&
|
||||
in_array($auth_user->roles, ['admin'])
|
||||
&& $staff->roles != 'admin'
|
||||
&& $staff->id != $auth_user->id
|
||||
&& !(Auth::check() && method_exists(Auth::user(), 'isImpersonated') && Auth::user()->isImpersonated())
|
||||
)
|
||||
<form method="post" action="{{ route('impersonate.start', ['id' => $staff->id]) }}" style="display:inline;">
|
||||
@csrf
|
||||
<button type="button" class="btn btn-secondary btn-impersonate" data-staff-name="{{ $staff->name }}" title="Impersonate"><i class="material-icons">supervised_user_circle</i></button>
|
||||
</form>
|
||||
@endif
|
||||
<button type="button" class="btn btn-danger btn-delete" data-roles="{{ $auth_user->roles }}" data-staff-id="{{ $staff->id }}" data-token="{{ csrf_token() }}" title="Delete Kakitangan"><i class="material-icons">delete</i></button>
|
||||
@elseif($auth_user->roles == 'admin')
|
||||
{{-- <form method="post" action="{{ route('admin.kakitangan.delete') }}">
|
||||
{{ @csrf_field() }} --}}
|
||||
<input type="hidden" name="staff_id" value="{{ $staff->id }}"/>
|
||||
<a href="{{ route('admin.kakitangan.tukartaraf',['id'=>$staff->id]) }}" class="btn btn-warning" title="Tukar Taraf"><i class="material-icons">edit</i></a>
|
||||
<a href="{{ route('admin.kakitangan.tukarcawangan',['id'=>$staff->id]) }}" class="btn btn-info" title="Tukar Cawangan"><i class="material-icons">work</i></a>
|
||||
<a href="{{ route('admin.kakitangan.edit',['id'=>$staff->id]) }}" class="btn btn-success" title="Edit Maklumat"><i class="material-icons">settings</i></a>
|
||||
<a href="{{ route('admin.kakitangan.resetcredentials',['id'=>$staff->id]) }}" class="btn btn-primary" title="Reset Password"><i class="material-icons">restore</i></a>
|
||||
@if(
|
||||
app()->environment(['local', 'staging'])
|
||||
&&
|
||||
$staff->roles != 'admin'
|
||||
&& $staff->id != $auth_user->id
|
||||
&& !(Auth::check() && method_exists(Auth::user(), 'isImpersonated') && Auth::user()->isImpersonated())
|
||||
)
|
||||
<form method="post" action="{{ route('impersonate.start', ['id' => $staff->id]) }}" style="display:inline;">
|
||||
@csrf
|
||||
<button type="button" class="btn btn-secondary btn-impersonate" data-staff-name="{{ $staff->name }}" title="Impersonate"><i class="material-icons">supervised_user_circle</i></button>
|
||||
</form>
|
||||
@endif
|
||||
<button type="button" class="btn btn-danger btn-delete" data-staff-id="{{ $staff->id }}" data-token="{{ csrf_token() }}" title="Delete Kakitangan"><i class="material-icons">delete</i></button>
|
||||
{{-- </form> --}}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -117,72 +189,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
@php
|
||||
$isOperasi = $auth_user->roles == 'operasi';
|
||||
$canImpersonate = app()->environment(['local', 'staging'])
|
||||
&& $auth_user->roles === 'admin'
|
||||
&& !(Auth::check() && method_exists(Auth::user(), 'isImpersonated') && Auth::user()->isImpersonated());
|
||||
@endphp
|
||||
|
||||
function escapeHtml(value) {
|
||||
return $('<div>').text(value == null ? '' : String(value)).html();
|
||||
}
|
||||
|
||||
function staffTindakanHtml(staff) {
|
||||
var id = staff.id;
|
||||
var html = '';
|
||||
|
||||
html += '<a href="' + staffRoutes.tukarTaraf.replace('__ID__', id) + '" class="btn btn-warning" title="Tukar Taraf"><i class="material-icons">edit</i></a> ';
|
||||
html += '<a href="' + staffRoutes.tukarCawangan.replace('__ID__', id) + '" class="btn btn-info" title="Tukar Cawangan"><i class="material-icons">work</i></a> ';
|
||||
html += '<a href="' + staffRoutes.edit.replace('__ID__', id) + '" class="btn btn-success" title="Edit Maklumat"><i class="material-icons">settings</i></a> ';
|
||||
|
||||
if (authRole === 'admin') {
|
||||
html += '<a href="' + staffRoutes.reset.replace('__ID__', id) + '" class="btn btn-primary" title="Reset Password"><i class="material-icons">restore</i></a> ';
|
||||
}
|
||||
|
||||
if (canImpersonate && id !== authUserId) {
|
||||
html += '<form method="post" action="' + staffRoutes.impersonate.replace('__ID__', id) + '" style="display:inline;">' +
|
||||
csrfField +
|
||||
'<button type="button" class="btn btn-secondary btn-impersonate" data-staff-name="' + escapeHtml(staff.name) + '" title="Impersonate"><i class="material-icons">supervised_user_circle</i></button>' +
|
||||
'</form> ';
|
||||
}
|
||||
|
||||
html += '<button type="button" class="btn btn-danger btn-delete" data-roles="' + authRole + '" data-staff-id="' + id + '" title="Delete Kakitangan"><i class="material-icons">delete</i></button>';
|
||||
|
||||
return html;
|
||||
}
|
||||
|
||||
var authRole = @json($auth_user->roles);
|
||||
var authUserId = @json($auth_user->id);
|
||||
var canImpersonate = @json($canImpersonate);
|
||||
var csrfField = '<input type="hidden" name="_token" value="' + @json(csrf_token()) + '">';
|
||||
var staffRoutes = {
|
||||
tukarTaraf: @json($isOperasi ? route('kakitangan.tukartaraf', ['id' => '__ID__']) : route('admin.kakitangan.tukartaraf', ['id' => '__ID__'])),
|
||||
tukarCawangan: @json($isOperasi ? route('kakitangan.tukarcawangan', ['id' => '__ID__']) : route('admin.kakitangan.tukarcawangan', ['id' => '__ID__'])),
|
||||
edit: @json($isOperasi ? route('operasi.kakitangan.edit', ['id' => '__ID__']) : route('admin.kakitangan.edit', ['id' => '__ID__'])),
|
||||
reset: @json(route('admin.kakitangan.resetcredentials', ['id' => '__ID__'])),
|
||||
impersonate: @json(route('impersonate.start', ['id' => '__ID__']))
|
||||
};
|
||||
|
||||
var tablerekod = initErahnDatatable('#rekod_kakitangan', {
|
||||
columnDefs: [
|
||||
{ targets: 0, orderable: false, width: '40px' },
|
||||
{ targets: 1, orderable: false, searchable: false }
|
||||
]
|
||||
});
|
||||
|
||||
$.each(@json($kakitangan_rows), function (index, staff) {
|
||||
tablerekod.row.add([
|
||||
index + 1,
|
||||
staffTindakanHtml(staff),
|
||||
escapeHtml(staff.name),
|
||||
escapeHtml(staff.roles),
|
||||
escapeHtml(staff.role_harian),
|
||||
escapeHtml(staff.role_asal),
|
||||
escapeHtml(staff.cawangan)
|
||||
]);
|
||||
});
|
||||
tablerekod.draw();
|
||||
var tablerekod = $('#rekod_kakitangan').DataTable();
|
||||
|
||||
$("#rekod_kakitangan").on('click', ".btn-delete", function(){
|
||||
//$('.btn-delete').on('click', function(){
|
||||
@@ -245,7 +253,7 @@
|
||||
var staffName = $(this).data('staff-name');
|
||||
|
||||
Swal.fire({
|
||||
title: 'Menyamar sebagai ' + staffName + '?',
|
||||
title: 'Menyamar sebagai Kakitangan?',
|
||||
text: "Anda akan log masuk sebagai " + staffName + ".",
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
@php
|
||||
$pendingCount = collect($lines)->whereIn('status', ['IN_BATCH', 'OPS_REVIEW'])->count();
|
||||
$approvedCount = collect($lines)->where('status', 'APPROVED')->count();
|
||||
$cawName = $cawangan_info['details_caw'] ?? $cawangan_info['namacaw'] ?? $kodcaw;
|
||||
$cawName = $cawangan_info['nama'] ?? $cawangan_info['namacaw'] ?? $kodcaw;
|
||||
@endphp
|
||||
<div class="container-fluid">
|
||||
<div class="row justify-content-center">
|
||||
@@ -45,11 +45,6 @@
|
||||
<div class="card-header d-flex justify-content-between align-items-center flex-wrap">
|
||||
<h5 class="mb-0">Senarai Dalam Batch</h5>
|
||||
<div class="mt-2 mt-md-0">
|
||||
<a href="{{ route('pembiayaan.online.operasi.batch.print', ['kodcaw' => $kodcaw, 'batchId' => $batch['id']]) }}"
|
||||
class="btn btn-outline-dark btn-sm"
|
||||
target="_blank">
|
||||
Cetak Borang
|
||||
</a>
|
||||
<a href="{{ route('pembiayaan.online.operasi') }}" class="btn btn-secondary btn-sm">Kembali</a>
|
||||
@if($pendingCount > 0)
|
||||
<form method="post"
|
||||
|
||||
@@ -1,336 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ms">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Borang Kelulusan Batch — {{ $batchNo }}</title>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
window.print();
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
* { box-sizing: border-box; }
|
||||
body {
|
||||
margin: 0;
|
||||
background: #e8eaed;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
color: #111;
|
||||
}
|
||||
|
||||
.toolbar {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
padding: 10px 16px;
|
||||
background: #1f3a5f;
|
||||
color: #fff;
|
||||
font-size: 13px;
|
||||
}
|
||||
.toolbar button {
|
||||
border: 0;
|
||||
background: #fff;
|
||||
color: #1f3a5f;
|
||||
font-weight: bold;
|
||||
padding: 8px 16px;
|
||||
cursor: pointer;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.sheet-wrap {
|
||||
padding: 24px 0 48px;
|
||||
}
|
||||
|
||||
.sheet {
|
||||
width: 210mm;
|
||||
min-height: 297mm;
|
||||
margin: 0 auto;
|
||||
background: #fff;
|
||||
padding: 14mm 12mm 16mm;
|
||||
box-shadow: 0 2px 12px rgba(0,0,0,.18);
|
||||
}
|
||||
|
||||
.title {
|
||||
text-align: center;
|
||||
margin: 14px 0 4px;
|
||||
}
|
||||
.title h1 {
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
letter-spacing: 0.04em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.title p {
|
||||
margin: 4px 0 0;
|
||||
font-size: 10px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.section {
|
||||
margin-top: 12px;
|
||||
}
|
||||
.section-title {
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
background: #eef1f4;
|
||||
border: 1px solid #111;
|
||||
border-bottom: 0;
|
||||
padding: 5px 8px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
table.fields {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
font-size: 11px;
|
||||
}
|
||||
table.fields th,
|
||||
table.fields td {
|
||||
border: 1px solid #111;
|
||||
padding: 6px 8px;
|
||||
vertical-align: top;
|
||||
text-align: left;
|
||||
}
|
||||
table.fields th {
|
||||
width: 22%;
|
||||
font-weight: normal;
|
||||
background: #fafbfc;
|
||||
color: #222;
|
||||
}
|
||||
table.fields td.amt {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
letter-spacing: 0.02em;
|
||||
}
|
||||
|
||||
table.lines {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
font-size: 9.5px;
|
||||
}
|
||||
table.lines th,
|
||||
table.lines td {
|
||||
border: 1px solid #111;
|
||||
padding: 4px 5px;
|
||||
vertical-align: top;
|
||||
}
|
||||
table.lines thead th {
|
||||
background: #eef1f4;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
text-transform: uppercase;
|
||||
font-size: 8.5px;
|
||||
letter-spacing: 0.02em;
|
||||
}
|
||||
table.lines td.num { text-align: center; }
|
||||
table.lines td.amt { text-align: right; white-space: nowrap; }
|
||||
table.lines tfoot td {
|
||||
font-weight: bold;
|
||||
background: #fafbfc;
|
||||
}
|
||||
|
||||
.akuan {
|
||||
font-size: 11px;
|
||||
line-height: 1.55;
|
||||
border: 1px solid #111;
|
||||
padding: 10px 12px;
|
||||
}
|
||||
.akuan ol {
|
||||
margin: 6px 0 0;
|
||||
padding-left: 18px;
|
||||
}
|
||||
.akuan li { margin-bottom: 4px; }
|
||||
|
||||
.signs {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 16px;
|
||||
margin-top: 16px;
|
||||
}
|
||||
.sign-box {
|
||||
border: 1px solid #111;
|
||||
min-height: 160px;
|
||||
padding: 8px 10px;
|
||||
font-size: 10px;
|
||||
}
|
||||
.sign-box .role {
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
text-transform: uppercase;
|
||||
border-bottom: 1px solid #ccc;
|
||||
padding-bottom: 4px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.sign-line {
|
||||
margin-top: 72px;
|
||||
border-top: 1px solid #111;
|
||||
padding-top: 6px;
|
||||
}
|
||||
.sign-line p { margin: 2px 0; }
|
||||
|
||||
@page {
|
||||
size: A4;
|
||||
margin: 10mm;
|
||||
}
|
||||
|
||||
@media print {
|
||||
body { background: #fff; }
|
||||
.toolbar { display: none !important; }
|
||||
.sheet-wrap { padding: 0; }
|
||||
.sheet {
|
||||
width: auto;
|
||||
min-height: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-shadow: none;
|
||||
}
|
||||
table.lines thead { display: table-header-group; }
|
||||
table.lines tfoot { display: table-footer-group; }
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="toolbar">
|
||||
<div><b>Borang Kelulusan Batch Pembiayaan Online</b></div>
|
||||
<button type="button" onclick="window.print()">Cetak</button>
|
||||
</div>
|
||||
|
||||
<div class="sheet-wrap">
|
||||
<div class="sheet">
|
||||
<x-print.header
|
||||
:cawangan="$cawangan"
|
||||
:kodcaw="$kodcaw"
|
||||
:alamat1="$alamat1"
|
||||
:alamat2="$alamat2"
|
||||
:notel="$notel"
|
||||
:tarikh="$tarikh"
|
||||
:norujukan="$batchNo"
|
||||
rujukan-label="No. Batch"
|
||||
/>
|
||||
|
||||
<div class="title">
|
||||
<h1>Borang Kelulusan Pembiayaan Online<br>Senarai Batch Pembayaran</h1>
|
||||
<p>Untuk semakan Operasi dan kelulusan Pengurus Besar. Bukan untuk tandatangan pelanggan.</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<div class="section-title">A. Maklumat Batch</div>
|
||||
<table class="fields">
|
||||
<tr>
|
||||
<th>No. Batch</th>
|
||||
<td>{{ $batchNo }}</td>
|
||||
<th>Cawangan</th>
|
||||
<td>{{ $kodcaw }} — {{ $cawangan }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Tarikh / Slot</th>
|
||||
<td>{{ $tarikh }} · {{ $slot }}</td>
|
||||
<th>Status Batch</th>
|
||||
<td>{{ $status }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Dihantar Oleh (PC)</th>
|
||||
<td>{{ $dihantarOleh }}</td>
|
||||
<th>Dihantar Pada</th>
|
||||
<td>{{ $dihantarPada }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Bilangan Rekod</th>
|
||||
<td>{{ count($lines) }}</td>
|
||||
<th>Jumlah Keseluruhan</th>
|
||||
<td class="amt">RM {{ number_format((float) $jumlah, 2) }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<div class="section-title">B. Senarai Penerima Dalam Batch</div>
|
||||
<table class="lines">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:4%">Bil</th>
|
||||
<th style="width:14%">No. SAG</th>
|
||||
<th>Pelanggan</th>
|
||||
<th style="width:13%">No. KP</th>
|
||||
<th style="width:11%">Bank</th>
|
||||
<th style="width:13%">No. Akaun</th>
|
||||
<th>Nama Akaun</th>
|
||||
<th style="width:12%">Pinjaman (RM)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@forelse($lines as $i => $line)
|
||||
<tr>
|
||||
<td class="num">{{ $i + 1 }}</td>
|
||||
<td class="num">{{ $line['norujukan'] ?? '-' }}</td>
|
||||
<td>{{ $line['nama_pelanggan'] ?? '-' }}</td>
|
||||
<td class="num">{{ $line['nokp'] ?? '-' }}</td>
|
||||
<td>{{ $line['nama_bank'] ?? ($line['kodbank'] ?? '-') }}</td>
|
||||
<td class="num">{{ $line['noakaun'] ?? '-' }}</td>
|
||||
<td>{{ $line['nama_akaun'] ?? '-' }}</td>
|
||||
<td class="amt">{{ number_format((float) ($line['pinjaman'] ?? 0), 2) }}</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="8" class="num">Tiada rekod dalam batch.</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="7" style="text-align:right">JUMLAH</td>
|
||||
<td class="amt">{{ number_format((float) $jumlah, 2) }}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<div class="section-title">C. Pengesahan Operasi</div>
|
||||
<div class="akuan">
|
||||
Dengan ini disahkan bahawa senarai di Bahagian B telah disemak dan amaun pembiayaan
|
||||
sebanyak <b>RM {{ number_format((float) $jumlah, 2) }}</b> ({{ count($lines) }} rekod)
|
||||
bagi batch <b>{{ $batchNo }}</b> cawangan <b>{{ $cawangan }}</b> adalah lengkap
|
||||
untuk proses pembayaran ke akaun bank pelanggan.
|
||||
<ol>
|
||||
<li>Maklumat SAG, nama, no. KP, bank dan no. akaun telah disemak terhadap rekod sistem.</li>
|
||||
<li>Pembayaran akan dikreditkan ke akaun penerima seperti senarai, bukan tunai di kaunter.</li>
|
||||
<li>Sebarang ralat akaun yang dikesan selepas kelulusan hendaklah dilaporkan serta-merta.</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="signs">
|
||||
<div class="sign-box">
|
||||
<div class="role">Tandatangan Operasi</div>
|
||||
<div class="sign-line">
|
||||
<p>Nama: {{ $opsBy }}</p>
|
||||
<p>Jawatan: Operasi</p>
|
||||
<p>Tarikh: {{ $tarikh }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sign-box">
|
||||
<div class="role">Pengurus Besar</div>
|
||||
<div class="sign-line">
|
||||
<p>Nama:</p>
|
||||
<p>Cop / Paraf:</p>
|
||||
<p>Tarikh:</p>
|
||||
</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>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,302 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ms">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Borang Pengesahan Online — {{ $norujukan }}</title>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
window.print();
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
* { box-sizing: border-box; }
|
||||
body {
|
||||
margin: 0;
|
||||
background: #e8eaed;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
color: #111;
|
||||
}
|
||||
|
||||
.toolbar {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
padding: 10px 16px;
|
||||
background: #1f3a5f;
|
||||
color: #fff;
|
||||
font-size: 13px;
|
||||
}
|
||||
.toolbar button {
|
||||
border: 0;
|
||||
background: #fff;
|
||||
color: #1f3a5f;
|
||||
font-weight: bold;
|
||||
padding: 8px 16px;
|
||||
cursor: pointer;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.sheet-wrap {
|
||||
padding: 24px 0 48px;
|
||||
}
|
||||
|
||||
.sheet {
|
||||
width: 210mm;
|
||||
min-height: 297mm;
|
||||
margin: 0 auto;
|
||||
background: #fff;
|
||||
padding: 14mm 14mm 16mm;
|
||||
box-shadow: 0 2px 12px rgba(0,0,0,.18);
|
||||
}
|
||||
|
||||
.title {
|
||||
text-align: center;
|
||||
margin: 14px 0 4px;
|
||||
}
|
||||
.title h1 {
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
letter-spacing: 0.04em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.title p {
|
||||
margin: 4px 0 0;
|
||||
font-size: 10px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.section {
|
||||
margin-top: 12px;
|
||||
}
|
||||
.section-title {
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
background: #eef1f4;
|
||||
border: 1px solid #111;
|
||||
border-bottom: 0;
|
||||
padding: 5px 8px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
table.fields {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
font-size: 11px;
|
||||
}
|
||||
table.fields th,
|
||||
table.fields td {
|
||||
border: 1px solid #111;
|
||||
padding: 6px 8px;
|
||||
vertical-align: top;
|
||||
text-align: left;
|
||||
}
|
||||
table.fields th {
|
||||
width: 28%;
|
||||
font-weight: normal;
|
||||
background: #fafbfc;
|
||||
color: #222;
|
||||
}
|
||||
table.fields td.amt {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
letter-spacing: 0.02em;
|
||||
}
|
||||
|
||||
.akuan {
|
||||
font-size: 11px;
|
||||
line-height: 1.55;
|
||||
border: 1px solid #111;
|
||||
padding: 10px 12px;
|
||||
}
|
||||
.akuan ol {
|
||||
margin: 6px 0 0;
|
||||
padding-left: 18px;
|
||||
}
|
||||
.akuan li { margin-bottom: 4px; }
|
||||
|
||||
.signs {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr 1fr;
|
||||
gap: 10px;
|
||||
margin-top: 16px;
|
||||
}
|
||||
.sign-box {
|
||||
border: 1px solid #111;
|
||||
min-height: 150px;
|
||||
padding: 8px;
|
||||
font-size: 10px;
|
||||
}
|
||||
.sign-box .role {
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
text-transform: uppercase;
|
||||
border-bottom: 1px solid #ccc;
|
||||
padding-bottom: 4px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.sign-line {
|
||||
margin-top: 62px;
|
||||
border-top: 1px solid #111;
|
||||
padding-top: 6px;
|
||||
}
|
||||
.sign-line p { margin: 2px 0; }
|
||||
|
||||
@page {
|
||||
size: A4;
|
||||
margin: 10mm;
|
||||
}
|
||||
|
||||
@media print {
|
||||
body { background: #fff; }
|
||||
.toolbar { display: none !important; }
|
||||
.sheet-wrap { padding: 0; }
|
||||
.sheet {
|
||||
width: auto;
|
||||
min-height: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="toolbar">
|
||||
<div><b>Borang Pengesahan Pembiayaan Online</b></div>
|
||||
<button type="button" onclick="window.print()">Cetak</button>
|
||||
</div>
|
||||
|
||||
<div class="sheet-wrap">
|
||||
<div class="sheet">
|
||||
<x-print.header
|
||||
:cawangan="$cawangan"
|
||||
:kodcaw="$kodcaw"
|
||||
:alamat1="$alamat1"
|
||||
:alamat2="$alamat2"
|
||||
:notel="$notel"
|
||||
:tarikh="$tarikh"
|
||||
/>
|
||||
|
||||
<div class="title">
|
||||
<h1>Borang Pengesahan Penerimaan Pembiayaan<br>Secara Online (Akaun Bank)</h1>
|
||||
<p>Untuk diisi dan ditandatangani oleh pelanggan semasa transaksi gadai.</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<div class="section-title">A. Maklumat Pelanggan</div>
|
||||
<table class="fields">
|
||||
<tr>
|
||||
<th>Nama Pelanggan</th>
|
||||
<td colspan="3">{{ $nama }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>No. MyKad / Passport</th>
|
||||
<td>{{ $nokp }}</td>
|
||||
<th style="width:22%">No. Pelanggan</th>
|
||||
<td>{{ $nopelanggan }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>No. Telefon</th>
|
||||
<td>{{ $telefon }}</td>
|
||||
<th>Cawangan</th>
|
||||
<td>{{ $cawangan }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<div class="section-title">B. Maklumat Pembiayaan</div>
|
||||
<table class="fields">
|
||||
<tr>
|
||||
<th>No. Surat Akuan Gadai</th>
|
||||
<td>{{ $norujukan }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Amaun Pembiayaan</th>
|
||||
<td class="amt">RM {{ $pinjaman }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Cara Terima Pembiayaan</th>
|
||||
<td>Online (kredit ke akaun bank) — bukan tunai</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Teller</th>
|
||||
<td>{{ $teller }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<div class="section-title">C. Maklumat Akaun Bank Penerima</div>
|
||||
<table class="fields">
|
||||
<tr>
|
||||
<th>Nama Bank</th>
|
||||
<td>{{ $bank }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>No. Akaun</th>
|
||||
<td>{{ $noakaun }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Nama Pemegang Akaun</th>
|
||||
<td>{{ $nama_akaun }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<div class="section-title">D. Akuan Pelanggan</div>
|
||||
<div class="akuan">
|
||||
Saya, <b>{{ $nama }}</b> (No. KP: <b>{{ $nokp }}</b>), dengan ini mengesahkan bahawa:
|
||||
<ol>
|
||||
<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 faham kredit ke akaun tertakluk kepada semakan Pengurus Cawangan dan proses pembayaran pihak Koperasi.</li>
|
||||
<li>Saya bertanggungjawab sepenuhnya jika maklumat akaun tidak tepat, dan tidak akan menuntut ganti rugi atas kelewatan atau ralat yang berpunca daripadanya.</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="signs">
|
||||
<div class="sign-box">
|
||||
<div class="role">Tandatangan Pelanggan</div>
|
||||
<div class="sign-line">
|
||||
<p>Nama: {{ $nama }}</p>
|
||||
<p>No. KP: {{ $nokp }}</p>
|
||||
<p>Tarikh: {{ $tarikh }}</p>
|
||||
</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>
|
||||
|
||||
<x-print.footer>
|
||||
<b>Nota:</b>
|
||||
<p>1. Borang ini dicetak semasa pelanggan memilih cara terima pembiayaan secara Online.</p>
|
||||
<p>2. Pembiayaan akan dikreditkan ke akaun selepas semakan PC. Pelanggan tidak menerima wang tunai di kaunter.</p>
|
||||
<p>3. Sila pastikan nama pemegang akaun sepadan dengan nama pelanggan pada MyKad.</p>
|
||||
</x-print.footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,260 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ms">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Maklumat Pelanggan — {{ $nopelanggan }}</title>
|
||||
<style>
|
||||
* { box-sizing: border-box; }
|
||||
body {
|
||||
margin: 0;
|
||||
background: #e8eaed;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
color: #111;
|
||||
}
|
||||
|
||||
.toolbar {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
padding: 10px 16px;
|
||||
background: #1f3a5f;
|
||||
color: #fff;
|
||||
font-size: 13px;
|
||||
}
|
||||
.toolbar b { letter-spacing: 0.04em; }
|
||||
.toolbar .hint { opacity: 0.85; }
|
||||
.toolbar button {
|
||||
border: 0;
|
||||
background: #fff;
|
||||
color: #1f3a5f;
|
||||
font-weight: bold;
|
||||
padding: 8px 16px;
|
||||
cursor: pointer;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.sheet-wrap {
|
||||
padding: 24px 0 48px;
|
||||
}
|
||||
|
||||
.sheet {
|
||||
width: 210mm;
|
||||
min-height: 297mm;
|
||||
margin: 0 auto;
|
||||
background: #fff;
|
||||
padding: 14mm 14mm 16mm;
|
||||
box-shadow: 0 2px 12px rgba(0,0,0,.18);
|
||||
}
|
||||
|
||||
.title {
|
||||
text-align: center;
|
||||
margin: 14px 0 4px;
|
||||
}
|
||||
.title h1 {
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
letter-spacing: 0.04em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.title p {
|
||||
margin: 4px 0 0;
|
||||
font-size: 10px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.identity {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) 32mm;
|
||||
gap: 12px;
|
||||
align-items: start;
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
.photo-box {
|
||||
width: 32mm;
|
||||
text-align: center;
|
||||
}
|
||||
.photo-box img {
|
||||
display: block;
|
||||
width: 32mm;
|
||||
height: 42mm;
|
||||
object-fit: cover;
|
||||
border: 1px solid #111;
|
||||
background: #eef1f4;
|
||||
}
|
||||
.photo-box .caption {
|
||||
margin-top: 4px;
|
||||
font-size: 8.5px;
|
||||
color: #444;
|
||||
letter-spacing: 0.04em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.section {
|
||||
margin-top: 12px;
|
||||
}
|
||||
.section-title {
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
background: #eef1f4;
|
||||
border: 1px solid #111;
|
||||
border-bottom: 0;
|
||||
padding: 5px 8px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
table.fields {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
font-size: 11px;
|
||||
}
|
||||
table.fields th,
|
||||
table.fields td {
|
||||
border: 1px solid #111;
|
||||
padding: 6px 8px;
|
||||
vertical-align: top;
|
||||
text-align: left;
|
||||
}
|
||||
table.fields th {
|
||||
width: 28%;
|
||||
font-weight: normal;
|
||||
background: #fafbfc;
|
||||
color: #222;
|
||||
}
|
||||
|
||||
@page {
|
||||
size: A4;
|
||||
margin: 10mm;
|
||||
}
|
||||
|
||||
@media print {
|
||||
body { background: #fff; }
|
||||
.toolbar { display: none !important; }
|
||||
.sheet-wrap { padding: 0; }
|
||||
.sheet {
|
||||
width: auto;
|
||||
min-height: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="toolbar">
|
||||
<div>
|
||||
<b>Maklumat Pelanggan</b>
|
||||
<span class="hint"> — {{ $nama }}</span>
|
||||
</div>
|
||||
<button type="button" onclick="window.print()">Cetak / Pratinjau</button>
|
||||
</div>
|
||||
|
||||
<div class="sheet-wrap">
|
||||
<div class="sheet">
|
||||
<x-print.header
|
||||
:cawangan="$cawangan"
|
||||
:kodcaw="$kodcaw"
|
||||
:alamat1="$alamat1"
|
||||
:alamat2="$alamat2"
|
||||
:notel="$notel"
|
||||
:tarikh="$tarikh"
|
||||
:norujukan="$nopelanggan"
|
||||
rujukan-label="No. Pelanggan"
|
||||
/>
|
||||
|
||||
<div class="title">
|
||||
<h1>Maklumat Pelanggan</h1>
|
||||
<p>Salinan maklumat pengenalan diri pelanggan untuk rujukan cawangan.</p>
|
||||
</div>
|
||||
|
||||
<div class="identity">
|
||||
<div>
|
||||
<div class="section-title">A. Pengenalan Diri</div>
|
||||
<table class="fields">
|
||||
<tr>
|
||||
<th>Nama</th>
|
||||
<td>{{ $nama }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>No. Kad Pengenalan</th>
|
||||
<td>{{ $nokp }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>No. Pelanggan</th>
|
||||
<td>{{ $nopelanggan }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Status</th>
|
||||
<td>{{ $status }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="photo-box">
|
||||
<img src="{{ $photo_src }}" alt="Gambar MyKad">
|
||||
<div class="caption">Gambar MyKad</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<div class="section-title">B. Maklumat Hubungan & Alamat</div>
|
||||
<table class="fields">
|
||||
<tr>
|
||||
<th>No. Telefon 1</th>
|
||||
<td>{{ $telefon }}</td>
|
||||
<th style="width:22%">No. Telefon 2</th>
|
||||
<td>{{ $telefon2 }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Alamat</th>
|
||||
<td colspan="3">{{ $alamat }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Poskod</th>
|
||||
<td>{{ $poskod }}</td>
|
||||
<th>Daerah</th>
|
||||
<td>{{ $daerah }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Negeri</th>
|
||||
<td colspan="3">{{ $negeri }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<div class="section-title">C. Bank & Pekerjaan</div>
|
||||
<table class="fields">
|
||||
<tr>
|
||||
<th>Bank</th>
|
||||
<td colspan="3">{{ $bank }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>No. Akaun</th>
|
||||
<td colspan="3">{{ $noakaun }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Pekerjaan</th>
|
||||
<td colspan="3">{{ $pekerjaan }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Nota</th>
|
||||
<td colspan="3">{{ $nota }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<x-print.footer :show-copies="false">
|
||||
<b>Nota:</b>
|
||||
<p>1. Borang ini dicetak dari skrin Maklumat Pelanggan untuk rujukan cawangan.</p>
|
||||
<p>2. Gambar diambil daripada rekod MyKad pelanggan dalam sistem.</p>
|
||||
</x-print.footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -634,7 +634,7 @@
|
||||
<tr>
|
||||
<td style="width:10px">(-) Rebat Untung</td>
|
||||
<td style="width:10px">: RM
|
||||
{{ number_format($keuntungan_rebate,2) }}
|
||||
{{ number_format($totalrebate['onepercent'], 2) }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -644,7 +644,7 @@
|
||||
<tr>
|
||||
<td style="width:10px">(-) Rebat Lain-Lain Caj</td>
|
||||
<td style="width:10px">: RM
|
||||
{{ number_format($ujrah_rebate, 2) }} </td>
|
||||
{{ number_format($totalrebate['ujrah'], 2) }} </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:10px">Jumlah Keuntungan + Lain-Lain Caj</td>
|
||||
@@ -867,7 +867,7 @@
|
||||
<tr>
|
||||
<td style="width:10px">(-) Rebat Untung</td>
|
||||
<td style="width:10px">: RM
|
||||
{{ number_format($keuntungan_rebate, 2) }}
|
||||
{{ number_format($totalrebate['onepercent'], 2) }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -877,7 +877,7 @@
|
||||
<tr>
|
||||
<td style="width:10px">(-) Rebat Lain-Lain Caj</td>
|
||||
<td style="width:10px">: RM
|
||||
{{ number_format($ujrah_rebate, 2) }} </td>
|
||||
{{ number_format($totalrebate['ujrah'], 2) }} </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:10px">Jumlah Keuntungan + Lain-Lain Caj</td>
|
||||
|
||||
@@ -655,7 +655,7 @@
|
||||
</table>
|
||||
<table class="main-table text-center" style="border-top: none !important">
|
||||
<tr>
|
||||
<th colspan="5">JUMLAH KEUNTUNGAN BERDASARKAN TEMPOH PEMBIAYAAN</th>
|
||||
<th colspan="5">JUMLAH KEUNTUNGAN DAN LAIN-LAIN CAJ BERDASARKAN TEMPOH PEMBIAYAAN</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>TEMPOH PEMBIAYAAN</th>
|
||||
@@ -670,13 +670,13 @@
|
||||
<td>{{ $formatted_t_matang_1 }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="text-left">JUMLAH KEUNTUNGAN YANG PERLU DIBAYAR</th>
|
||||
<th class="text-left">JUMLAH KEUNTUNGAN (1%) DAN LAIN-LAIN CAJ YANG PERLU DIBAYAR</th>
|
||||
<td style="font-size:12px"><b>RM{{ number_format($gadai_detail['bakiupah'] / 6, 2) }}</b></td>
|
||||
<td style="font-size:12px"><b>RM{{ number_format($gadai_detail['bakiupah'], 2) }}</b></td>
|
||||
<td>RM{{ number_format($gadai_detail['bakiupah'], 2) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="text-left">JUMLAH KEUNTUNGAN TERKUMPUL<br> SEPANJANG TEMPOH
|
||||
<th class="text-left">JUMLAH KEUNTUNGAN (1%) DAN LAIN-LAIN CAJ TERKUMPUL<br> SEPANJANG TEMPOH
|
||||
PEMBIAYAAN
|
||||
</th>
|
||||
<td>-</td>
|
||||
@@ -717,7 +717,7 @@
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
Pelanggan bersetuju dan dengan ini menggadaikan Marhun sebagai cagaran kepada
|
||||
Jumlah Pembiayaan termasuk Jumlah Keuntungan Terkumpul
|
||||
Jumlah Pembiayaan termasuk Jumlah Keuntungan dan Lain-Lain Caj Terkumpul
|
||||
mengikut
|
||||
syarat-syarat pembiayaan dalam SAG ini. KoPKB dengan ini menerima gadaian Marhun
|
||||
tersebut.
|
||||
@@ -731,12 +731,14 @@
|
||||
<td style="vertical-align: top">
|
||||
<table class="akad-table">
|
||||
<tr>
|
||||
<td colspan="4"><b><u>KADAR KEUNTUNGAN BULANAN</u></b></td>
|
||||
<td colspan="4"><b><u>AKAD (SIMPAN MARHUN)</u></b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
Kadar keuntungan Pembiayaan Ar-Rahn Tawarruq adalah berdasarkan jumlah
|
||||
pembiayaan seperti berikut :
|
||||
Pelanggan dengan ini bersetuju marhun disimpan oleh KoPKB dan bersetuju membayar
|
||||
lain-lain caj
|
||||
sebagaimana jadual dibawah bagi setiap
|
||||
RM100.00 Jumlah Marhun Keseluruhan:
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -744,35 +746,35 @@
|
||||
<table class="main-table text-center"
|
||||
style="font-size: 9px; width: 100%; margin-top: 5px;">
|
||||
<tr>
|
||||
<th>KADAR KEUNTUNGAN SEBULAN (%)</th>
|
||||
<th>KADAR LAIN-LAIN CAJ / RM100</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1.00</td>
|
||||
<td>RM{{ $kadar_ujrah[0]['kadarujrah'] }}/sebulan</td>
|
||||
</tr>
|
||||
</table>
|
||||
@else
|
||||
<table class="main-table text-center"
|
||||
style="font-size: 9px; width: 100%; margin-top: 5px;">
|
||||
<tr>
|
||||
<th>JUMLAH PEMBIAYAAN</th>
|
||||
<th>NILAI MARHUN KESELURUHAN</th>
|
||||
<th></th>
|
||||
<th>KADAR KEUNTUNGAN SEBULAN (%)</th>
|
||||
<th>KADAR LAIN-LAIN CAJ / RM100</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
< RM400.99</td>
|
||||
<td>-</td>
|
||||
<td>{{ $kadar_ujrah[0]['kadarupdah'] }}</td>
|
||||
<td>RM{{ $kadar_ujrah[0]['kadarujrah'] }}/sebulan</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>RM401.00 - RM2000.99</td>
|
||||
<td>-</td>
|
||||
<td>{{ $kadar_ujrah[1]['kadarupdah'] }}</td>
|
||||
<td>RM{{ $kadar_ujrah[1]['kadarujrah'] }}/sebulan</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>> RM2001.00</td>
|
||||
<td>-</td>
|
||||
<td>{{ $kadar_ujrah[2]['kadarupdah'] }}</td>
|
||||
<td>RM{{ $kadar_ujrah[2]['kadarujrah'] }}/sebulan</td>
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
@@ -827,15 +829,15 @@
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>e.</td>
|
||||
<td colspan="2">Membayar Jumlah Pembiayaan termasuk Jumlah Keuntungan yang diberi
|
||||
mengikut dalam tempoh seperti di SAG ini;
|
||||
<td colspan="2">Membayar Jumlah Pembiayaan termasuk Jumlah Keuntungan dan
|
||||
Lain-Lain Caj Terkumpul yang diberi mengikut dalam tempoh seperti di SAG ini;
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>f.</td>
|
||||
<td colspan="2">Tertakluk kepada pembayaran penuh Jumlah Pembiayaan termasuk
|
||||
Jumlah Keuntungan Terkumpul, Pelanggan perlu hadir sendiri
|
||||
Jumlah Keuntungan dan Lain-Lain Caj Terkumpul, Pelanggan perlu hadir sendiri
|
||||
menyelesaikan Pembiayaan;</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -1064,7 +1066,8 @@
|
||||
<td colspan="1"></td>
|
||||
<td colspan="1">o.</td>
|
||||
<td colspan="2">KoPKB berhak menuntut Jumlah Pembiayaan termasuk Jumlah Keuntungan
|
||||
setelah tamat tempoh yang dinyatakan pada notis berkaitan;
|
||||
dan
|
||||
Lain-Lain Caj Terkumpul setelah tamat tempoh yang dinyatakan pada notis berkaitan;
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -1209,7 +1212,8 @@
|
||||
<td colspan="1">a.</td>
|
||||
<td colspan="2">Marhun akan dilelong atau dijual. KoPKB akan membatalkan
|
||||
lelongan Marhun sekiranya Pelanggan membayar tunggakan Jumlah Pembiayaan
|
||||
termasuk Jumlah Keuntungan
|
||||
termasuk Jumlah Keuntungan dan
|
||||
Lain-Lain Caj
|
||||
sepenuhnya tiga (3) hari sebelum tarikh lelongan;</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -1229,7 +1233,7 @@
|
||||
<td colspan="1">c.</td>
|
||||
<td colspan="2">Sebarang lebihan hasil lelongan atau jualan (jika ada) setelah
|
||||
ditolak
|
||||
Jumlah Pembiayaan termasuk Jumlah Keuntungan Terkumpul
|
||||
Jumlah Pembiayaan termasuk Jumlah Keuntungan dan Lain-Lain Caj Terkumpul
|
||||
yang tertunggak dan kos-kos berkaitan akan
|
||||
dikembalikan
|
||||
kepada Pelanggan dan;</td>
|
||||
@@ -1260,7 +1264,7 @@
|
||||
<td>=</td>
|
||||
<td><b>BAKI TEMPOH PEMBIAYAAN <br></td>
|
||||
<td>X</td>
|
||||
<td><b>JUMLAH KEUNTUNGAN YANG PERLU DIBAYAR</b></td>
|
||||
<td><b>JUMLAH KEUNTUNGAN 1% DAN LAIN-LAIN CAJ YANG PERLU DIBAYAR</b></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
@@ -1276,7 +1280,7 @@
|
||||
<td colspan="1"></td>
|
||||
<td colspan="1">a.</td>
|
||||
<td colspan="2">Pelanggan gagal dan/ingkar menjelaskan Jumlah Pembiayaan,
|
||||
Jumlah Keuntungan Terkumpul pada tarikh yang ditetapkan;
|
||||
Jumlah Keuntungan dan Lain-Lain Caj Terkumpul pada tarikh yang ditetapkan;
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -1302,45 +1306,6 @@
|
||||
<tr>
|
||||
<td colspan="1"></td>
|
||||
<td colspan="1"><b>6.</b></td>
|
||||
<td colspan="2"><b>Pelanggan dengan ini bersetuju, memberi kuasa dan melantik
|
||||
Ar-Rahn sebagai wakil (wakil di bawah prinsip Wakalah) untuk menguruskan baki
|
||||
hasil lelongan yang menjadi hak Pelanggan,
|
||||
sekiranya ada, yang bernilai RM10.00 (Ringgit Malaysia: Sepuluh) atau kurang,
|
||||
dan tidak dituntut oleh Pelanggan dalam tempoh tuntutan yang ditetapkan oleh
|
||||
Ar-Rahn setelah usaha munasabah telah diambil untuk memaklumkan kepada
|
||||
Pelanggan.</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1"></td>
|
||||
<td colspan="1"><b>7.</b></td>
|
||||
<td colspan="2">
|
||||
<b>
|
||||
Pelanggan selanjutnya bersetuju bahawa baki hasil lelongan tersebut boleh
|
||||
disalurkan oleh Ar-Rahn, bagi pihak Pelanggan, sebagai infaq kepada mana-mana
|
||||
institusi agama Islam, badan kebajikan atau institusi lain yang diluluskan
|
||||
oleh Jawatankuasa Syariah dan/atau pihak berkuasa yang berkaitan, tanpa
|
||||
sebarang liabiliti ke atas Ar-Rahn selepas penyaluran tersebut dibuat dengan
|
||||
jumlah tidak melebihi RM10.00.
|
||||
</b>
|
||||
|
||||
<div style="margin-top: 8px;">
|
||||
<span
|
||||
style="
|
||||
display: inline-block;
|
||||
width: 13px;
|
||||
height: 13px;
|
||||
border: 1px solid #000;
|
||||
margin-right: 6px;
|
||||
vertical-align: middle;
|
||||
"></span>
|
||||
<b>Tandakan (✓) jika tidak bersetuju.</b>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="1"></td>
|
||||
<td colspan="1"><b>8.</b></td>
|
||||
<td colspan="2"><b>Sekiranya Pelanggan mempunyai sebarang pertanyaan atau
|
||||
aduan, Pelanggan boleh menghubungi KoPKB sebagaimana berikut:</b></td>
|
||||
</tr>
|
||||
@@ -1748,7 +1713,6 @@
|
||||
{{-- MARHUN DETAIL SECTION --}}
|
||||
<div class="main-marhun">
|
||||
<table class="main-table text-center" style="width: 75%">
|
||||
|
||||
<tr>
|
||||
<th>BIL</th>
|
||||
<th>JENIS MARHUN</th>
|
||||
@@ -1882,7 +1846,7 @@
|
||||
</table>
|
||||
<table class="main-table text-center" style="border-top: none !important">
|
||||
<tr>
|
||||
<th colspan="5">JUMLAH KEUNTUNGAN BERDASARKAN TEMPOH PEMBIAYAAN</th>
|
||||
<th colspan="5">JUMLAH KEUNTUNGAN DAN LAIN-LAIN CAJ BERDASARKAN TEMPOH PEMBIAYAAN</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>TEMPOH PEMBIAYAAN</th>
|
||||
@@ -1897,27 +1861,19 @@
|
||||
<td>{{ $formatted_t_matang_1 }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="text-left">JUMLAH KEUNTUNGAN YANG PERLU DIBAYAR BULANAN</th>
|
||||
<th class="text-left">JUMLAH KEUNTUNGAN DAN LAIN-LAIN CAJ YANG PERLU DIBAYAR BULANAN</th>
|
||||
<td style="font-size:12px"><b>RM{{ number_format($gadai_detail['bakiupah'] / 6, 2) }}</b></td>
|
||||
<td style="font-size:12px"><b>RM{{ number_format($gadai_detail['bakiupah'], 2) }}</b></td>
|
||||
<td>RM {{ number_format($gadai_detail['bakiupah'], 2) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="text-left">JUMLAH KEUNTUNGAN TERKUMPUL <br> SEPANJANG TEMPOH
|
||||
<th class="text-left">JUMLAH KEUNTUNGAN DAN LAIN-LAIN CAJ TERKUMPUL <br> SEPANJANG TEMPOH
|
||||
PEMBIAYAAN</th>
|
||||
<td>-</td>
|
||||
<td>RM{{ number_format($gadai_detail['bakiupah'], 2) }}</td>
|
||||
<td>RM{{ number_format($gadai_detail['upah12'], 2) }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div style="color: black; font-weight: bold; margin-top: 0px; width: 100%;">
|
||||
<span>PENGURUSAN HASIL LELONGAN YANG TIDAK DITUNTUT</span>
|
||||
|
||||
<span>
|
||||
<input type="checkbox" name="hasil_lelongan_tidak_dituntut">
|
||||
</span>
|
||||
</div>
|
||||
{{-- SIGNATURE SECTION --}}
|
||||
<table class="main-table mt-10">
|
||||
<tr>
|
||||
@@ -2182,8 +2138,8 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 50px;">Nama:</td>
|
||||
<td>
|
||||
<td style="width: 50px;">Nama:</td>
|
||||
<td>
|
||||
{{ $customer_detail['nama'] }}
|
||||
</td>
|
||||
</tr>
|
||||
@@ -2215,12 +2171,12 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 50px;">Nama:</td>
|
||||
<td>
|
||||
@if ($gadai_detail['penilai'] == '')
|
||||
{{ $auth_username }}
|
||||
@else
|
||||
{{ $gadai_detail['penilai'] }}
|
||||
@endif
|
||||
<td>
|
||||
@if ($gadai_detail['penilai'] == '')
|
||||
{{ $auth_username }}
|
||||
@else
|
||||
{{ $gadai_detail['penilai'] }}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -19,19 +19,6 @@ Route::get('/health', function () {
|
||||
return response()->json(['status' => 'ok']);
|
||||
});
|
||||
|
||||
// Dummy print form — no auth, for layout design only
|
||||
Route::get('/dummy/borang-pengesahan-online', function () {
|
||||
return view('dummy.borang_pengesahan_online');
|
||||
});
|
||||
|
||||
Route::get('/dummy/borang-batch-pembiayaan-online', function () {
|
||||
return view('dummy.borang_batch_pembiayaan_online');
|
||||
});
|
||||
|
||||
Route::get('/dummy/maklumat-pelanggan', function () {
|
||||
return view('dummy.maklumat_pelanggan');
|
||||
});
|
||||
|
||||
Route::get('/',['as'=>'login','uses'=>'HomeController@index']);
|
||||
|
||||
Route::get('/testtry',function(ImbangdugaServices $imbangduga){
|
||||
@@ -106,7 +93,6 @@ Route::get('/home', 'HomeController@index')->name('home');
|
||||
//Teller
|
||||
Route::get('/pelanggan','CustomersController@index')->middleware('auth','teller');
|
||||
Route::get('/customer_info',['as'=>'customer_info','uses'=>'CustomersController@info'])->middleware('auth','teller');
|
||||
Route::get('/customer/maklumat/cetak',['as'=>'customer.print.maklumat','uses'=>'CustomersController@printMaklumat'])->middleware('auth','teller');
|
||||
Route::get('/gadaian',['as'=>'gadaian','uses'=>'GadaianController@index'])->middleware('auth','teller');
|
||||
Route::get('/daftar_marhun',['as'=>'daftar_marhun','uses'=>'MarhunController@index'])->middleware('auth','teller');
|
||||
Route::get('/penebusan/{norujukan}',['as'=>'penebusan','uses' => 'PenebusanController@index'])->middleware('auth');
|
||||
@@ -127,8 +113,6 @@ Route::post('/profile/edit/store',['as'=>'profile.editstore','uses'=>'UserContro
|
||||
Route::get('/customer/search',['as'=>'customer.search','uses'=>'CustomersController@search'])->middleware('auth','teller');
|
||||
Route::post('/customer/store',['as'=>'customer.store','uses'=>'CustomersController@store'])->middleware('auth','teller');
|
||||
Route::post('/gadai/store',['as'=>'gadai.store','uses'=>'GadaianController@store'])->middleware('auth','teller');
|
||||
Route::get('/gadai/borang-pengesahan-online/{norujukan}',['as'=>'gadai.print.borang.online','uses'=>'GadaianController@printBorangPengesahanOnline'])->middleware('auth','teller');
|
||||
Route::post('/gadai/borang-pengesahan-online/preview',['as'=>'gadai.print.borang.online.preview','uses'=>'GadaianController@previewBorangPengesahanOnline'])->middleware('auth','teller');
|
||||
Route::get('/gadai/batal',['as'=>'gadai.batal','uses'=>'GadaianController@batal'])->middleware('auth','teller');
|
||||
Route::get('/customer/otp',['as'=>'customer.otp','uses'=>'CustomersController@getOTP'])->middleware('auth','teller');
|
||||
Route::get('/getwakil',['as'=>'wakil.search','uses'=>'PenebusanController@getWakil'])->middleware('auth','teller');
|
||||
@@ -210,7 +194,6 @@ Route::get('/pembiayaan-online/operasi/eod',['as'=>'pembiayaan.online.operasi.eo
|
||||
Route::post('/pembiayaan-online/operasi/eod/close-all',['as'=>'pembiayaan.online.operasi.eod.closeall','uses'=>'PembiayaanOnlineController@operasiCloseAllModal'])->middleware('auth','operasi');
|
||||
Route::post('/pembiayaan-online/operasi/eod/{kodcaw}/close',['as'=>'pembiayaan.online.operasi.eod.close','uses'=>'PembiayaanOnlineController@operasiCloseModal'])->middleware('auth','operasi');
|
||||
Route::get('/pembiayaan-online/operasi/{kodcaw}/batches/{batchId}',['as'=>'pembiayaan.online.operasi.batch','uses'=>'PembiayaanOnlineController@operasiShowBatch'])->middleware('auth','operasi');
|
||||
Route::get('/pembiayaan-online/operasi/{kodcaw}/batches/{batchId}/print',['as'=>'pembiayaan.online.operasi.batch.print','uses'=>'PembiayaanOnlineController@operasiPrintBatch'])->middleware('auth','operasi');
|
||||
Route::post('/pembiayaan-online/operasi/{kodcaw}/lines/{id}/approve',['as'=>'pembiayaan.online.operasi.approve','uses'=>'PembiayaanOnlineController@operasiApproveLine'])->middleware('auth','operasi');
|
||||
Route::post('/pembiayaan-online/operasi/{kodcaw}/lines/{id}/reject',['as'=>'pembiayaan.online.operasi.reject','uses'=>'PembiayaanOnlineController@operasiRejectLine'])->middleware('auth','operasi');
|
||||
Route::post('/pembiayaan-online/operasi/{kodcaw}/batches/{batchId}/approve',['as'=>'pembiayaan.online.operasi.approve.batch','uses'=>'PembiayaanOnlineController@operasiApproveBatch'])->middleware('auth','operasi');
|
||||
|
||||
Reference in New Issue
Block a user