Merge remote main
This commit is contained in:
@@ -0,0 +1,70 @@
|
|||||||
|
APP_NAME=Laravel
|
||||||
|
APP_ENV=production
|
||||||
|
#APP_KEY=base64:x3sTPftRy/BL+DsI7+jXtiiCtUxO9Bei0OcjM15I1rQ=
|
||||||
|
APP_KEY=WbPGkYNmXZ6ZQplGlvl0iZ7zyW1b09xa
|
||||||
|
APP_DEBUG=false
|
||||||
|
APP_URL=http://admin.arrahn
|
||||||
|
API_ARRAHN_PORTAL_URL=https://pay.arrahn.com.my
|
||||||
|
API_URL=http://apiujrah.arrahn
|
||||||
|
|
||||||
|
LOG_CHANNEL=stack
|
||||||
|
|
||||||
|
DB_CONNECTION=mysql
|
||||||
|
DB_HOST=172.16.4.102
|
||||||
|
DB_PORT=3306
|
||||||
|
DB_DATABASE=kaunterpkb
|
||||||
|
DB_USERNAME=zone2
|
||||||
|
DB_PASSWORD=G0dz!ll4@2020
|
||||||
|
|
||||||
|
BROADCAST_DRIVER=pusher
|
||||||
|
CACHE_DRIVER=file
|
||||||
|
QUEUE_CONNECTION=sync
|
||||||
|
SESSION_DRIVER=file
|
||||||
|
SESSION_LIFETIME=480
|
||||||
|
|
||||||
|
REDIS_HOST=127.0.0.1
|
||||||
|
REDIS_PASSWORD=null
|
||||||
|
REDIS_PORT=6379
|
||||||
|
|
||||||
|
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=
|
||||||
|
|
||||||
|
#PUSHER_APP_ID=1132716
|
||||||
|
#PUSHER_APP_KEY=27b70f118373dcb31ab3
|
||||||
|
#PUSHER_APP_SECRET=ef2e62ddbc1647979bf4
|
||||||
|
|
||||||
|
#PUSHER_APP_ID=1220266
|
||||||
|
#PUSHER_APP_KEY=3fb52a0bf6cc1363c736
|
||||||
|
#PUSHER_APP_SECRET=0a27feb7c4b2f0177467
|
||||||
|
|
||||||
|
#PUSHER_APP_ID=4163674
|
||||||
|
#PUSHER_APP_KEY=3nqb1ss0jlhi9w9vpi8v
|
||||||
|
#PUSHER_APP_SECRET=7dfx03w2i7ue0z6qoit3
|
||||||
|
|
||||||
|
PUSHER_APP_ID=1220266
|
||||||
|
PUSHER_APP_KEY=da67a7e1a3a138b9b28e
|
||||||
|
PUSHER_APP_SECRET=114c38f6edcf085e4d7f
|
||||||
|
|
||||||
|
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
|
||||||
|
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
|
||||||
|
# MIX_API_URL=http://api.arrahn
|
||||||
|
MIX_API_URL=http://apiujrah.arrahn
|
||||||
|
MIX_API_URL_ZONE1=http://apiujrah.arrahn
|
||||||
|
MIX_API_URL_ZONE2=http://apiujrah.arrahn
|
||||||
|
MIX_API_URL_ZONE3=http://apiujrah.arrahn
|
||||||
|
|
||||||
|
|
||||||
|
#TWILIO_WHATSAPP_NUMBER="+14155238886"
|
||||||
|
#TWILIO_SID="AC0b21863a1f21c39f153f9f7ce2551479"
|
||||||
|
#TWILIO_AUTH_TOKEN="ce474f07f586b3b150bf15a560e6d3b3"
|
||||||
@@ -0,0 +1,130 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Exports;
|
||||||
|
|
||||||
|
use Illuminate\Support\Collection;
|
||||||
|
use Maatwebsite\Excel\Concerns\FromCollection;
|
||||||
|
use Maatwebsite\Excel\Concerns\WithHeadings;
|
||||||
|
use Maatwebsite\Excel\Concerns\WithMapping;
|
||||||
|
use Maatwebsite\Excel\Concerns\WithStyles;
|
||||||
|
use Maatwebsite\Excel\Concerns\WithCustomStartCell;
|
||||||
|
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
|
||||||
|
|
||||||
|
class DataPelangganBycawDetailExport implements
|
||||||
|
FromCollection,
|
||||||
|
WithHeadings,
|
||||||
|
WithMapping,
|
||||||
|
WithStyles,
|
||||||
|
WithCustomStartCell
|
||||||
|
{
|
||||||
|
protected $pelanggan;
|
||||||
|
protected $year;
|
||||||
|
protected $no = 0;
|
||||||
|
|
||||||
|
public function __construct($pelanggan, $year)
|
||||||
|
{
|
||||||
|
$this->pelanggan = collect($pelanggan);
|
||||||
|
$this->year = $year;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Data source
|
||||||
|
*/
|
||||||
|
public function collection(): Collection
|
||||||
|
{
|
||||||
|
return $this->pelanggan;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Start data from row 5 (sebab ada tajuk)
|
||||||
|
*/
|
||||||
|
public function startCell(): string
|
||||||
|
{
|
||||||
|
return 'A5';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Header column
|
||||||
|
*/
|
||||||
|
public function headings(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'No',
|
||||||
|
'Cawangan',
|
||||||
|
'No.Pelanggan',
|
||||||
|
'Umur',
|
||||||
|
'Jantina',
|
||||||
|
'Pekerjaan',
|
||||||
|
'Lokasi',
|
||||||
|
'Tempoh Pajakan',
|
||||||
|
'Tarikh Mula',
|
||||||
|
'Tarikh Tamat',
|
||||||
|
'Hari Sejak Transaksi Terakhir',
|
||||||
|
'Bil Transaksi',
|
||||||
|
'Bil Outstanding',
|
||||||
|
'Bil Tebus',
|
||||||
|
'Jumlah Pinjaman (RM)',
|
||||||
|
'Jumlah Ujrah (RM)',
|
||||||
|
'Tujuan Gadaian',
|
||||||
|
'Status Aktif',
|
||||||
|
'Cara Bayaran',
|
||||||
|
'Tarikh Lelong',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Map setiap row
|
||||||
|
*/
|
||||||
|
public function map($row): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
++$this->no,
|
||||||
|
$row['cawangan'],
|
||||||
|
$row['nopelanggan'],
|
||||||
|
$row['umur'],
|
||||||
|
$row['jantina'],
|
||||||
|
$row['pekerjaan'],
|
||||||
|
$row['daerah'],
|
||||||
|
$row['tempoh_pajakan'],
|
||||||
|
$row['tarikh_mula'],
|
||||||
|
$row['tarikh_tamat'],
|
||||||
|
$row['hari_sejak_transaksi'],
|
||||||
|
$row['bil_transaksi'],
|
||||||
|
$row['bil_outstanding'],
|
||||||
|
$row['bil_tebus'],
|
||||||
|
number_format($row['jumlah_pinjaman'], 2),
|
||||||
|
number_format($row['jumlah_ujrah'], 2),
|
||||||
|
$row['tujuan_gadai'],
|
||||||
|
$row['status_aktif'],
|
||||||
|
$row['cara_bayaran'],
|
||||||
|
$row['tarikh_lelong'] ?? '-',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Styling Excel
|
||||||
|
*/
|
||||||
|
public function styles(Worksheet $sheet)
|
||||||
|
{
|
||||||
|
// Tajuk utama
|
||||||
|
$sheet->mergeCells('A1:R1');
|
||||||
|
$sheet->setCellValue('A1', 'LAPORAN DATA PELANGGAN MENGIKUT CAWANGAN');
|
||||||
|
$sheet->getStyle('A1')->getFont()->setBold(true)->setSize(14);
|
||||||
|
$sheet->getStyle('A1')->getAlignment()->setHorizontal('center');
|
||||||
|
|
||||||
|
// Tahun
|
||||||
|
$sheet->mergeCells('A2:R2');
|
||||||
|
$sheet->setCellValue('A2', 'TAHUN : ' . $this->year);
|
||||||
|
$sheet->getStyle('A2')->getFont()->setBold(true);
|
||||||
|
$sheet->getStyle('A2')->getAlignment()->setHorizontal('center');
|
||||||
|
|
||||||
|
// Header table
|
||||||
|
$sheet->getStyle('A5:R5')->getFont()->setBold(true);
|
||||||
|
$sheet->getStyle('A5:R5')->getAlignment()->setHorizontal('center');
|
||||||
|
|
||||||
|
// Auto width
|
||||||
|
foreach (range('A', 'R') as $col) {
|
||||||
|
$sheet->getColumnDimension($col)->setAutoSize(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,130 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Exports;
|
||||||
|
|
||||||
|
use Illuminate\Support\Collection;
|
||||||
|
use Maatwebsite\Excel\Concerns\FromCollection;
|
||||||
|
use Maatwebsite\Excel\Concerns\WithHeadings;
|
||||||
|
use Maatwebsite\Excel\Concerns\WithMapping;
|
||||||
|
use Maatwebsite\Excel\Concerns\WithStyles;
|
||||||
|
use Maatwebsite\Excel\Concerns\WithCustomStartCell;
|
||||||
|
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
|
||||||
|
|
||||||
|
class DataPelangganDetailExport implements
|
||||||
|
FromCollection,
|
||||||
|
WithHeadings,
|
||||||
|
WithMapping,
|
||||||
|
WithStyles,
|
||||||
|
WithCustomStartCell
|
||||||
|
{
|
||||||
|
protected $pelanggan;
|
||||||
|
protected $year;
|
||||||
|
protected $no = 0;
|
||||||
|
|
||||||
|
public function __construct($pelanggan, $year)
|
||||||
|
{
|
||||||
|
$this->pelanggan = collect($pelanggan);
|
||||||
|
$this->year = $year;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Data source
|
||||||
|
*/
|
||||||
|
public function collection(): Collection
|
||||||
|
{
|
||||||
|
return $this->pelanggan;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Start data from row 5 (sebab ada tajuk)
|
||||||
|
*/
|
||||||
|
public function startCell(): string
|
||||||
|
{
|
||||||
|
return 'A5';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Header column
|
||||||
|
*/
|
||||||
|
public function headings(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'No',
|
||||||
|
'Nama Pelanggan',
|
||||||
|
'No.Pelanggan',
|
||||||
|
'Umur',
|
||||||
|
'Jantina',
|
||||||
|
'Pekerjaan',
|
||||||
|
'Lokasi',
|
||||||
|
'Tempoh Pajakan',
|
||||||
|
'Tarikh Mula',
|
||||||
|
'Tarikh Tamat',
|
||||||
|
'Hari Sejak Transaksi Terakhir',
|
||||||
|
'Bil Transaksi',
|
||||||
|
'Bil Outstanding',
|
||||||
|
'Bil Tebus',
|
||||||
|
'Jumlah Pinjaman (RM)',
|
||||||
|
'Jumlah Ujrah (RM)',
|
||||||
|
'Tujuan Gadaian',
|
||||||
|
'Status Aktif',
|
||||||
|
'Cara Bayaran',
|
||||||
|
'Tarikh Lelong',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Map setiap row
|
||||||
|
*/
|
||||||
|
public function map($row): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
++$this->no,
|
||||||
|
strtoupper($row['nama']),
|
||||||
|
$row['nopelanggan'],
|
||||||
|
$row['umur'],
|
||||||
|
$row['jantina'],
|
||||||
|
$row['pekerjaan'],
|
||||||
|
$row['daerah'],
|
||||||
|
$row['tempoh_pajakan'],
|
||||||
|
$row['tarikh_mula'],
|
||||||
|
$row['tarikh_tamat'],
|
||||||
|
$row['hari_sejak_transaksi'],
|
||||||
|
$row['bil_transaksi'],
|
||||||
|
$row['bil_outstanding'],
|
||||||
|
$row['bil_tebus'],
|
||||||
|
number_format($row['jumlah_pinjaman'], 2),
|
||||||
|
number_format($row['jumlah_ujrah'], 2),
|
||||||
|
$row['tujuan_gadai'],
|
||||||
|
$row['status_aktif'],
|
||||||
|
$row['cara_bayaran'],
|
||||||
|
$row['tarikh_lelong'] ?? '-',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Styling Excel
|
||||||
|
*/
|
||||||
|
public function styles(Worksheet $sheet)
|
||||||
|
{
|
||||||
|
// Tajuk utama
|
||||||
|
$sheet->mergeCells('A1:R1');
|
||||||
|
$sheet->setCellValue('A1', 'LAPORAN DATA PELANGGAN');
|
||||||
|
$sheet->getStyle('A1')->getFont()->setBold(true)->setSize(14);
|
||||||
|
$sheet->getStyle('A1')->getAlignment()->setHorizontal('center');
|
||||||
|
|
||||||
|
// Tahun
|
||||||
|
$sheet->mergeCells('A2:R2');
|
||||||
|
$sheet->setCellValue('A2', 'TAHUN : ' . $this->year);
|
||||||
|
$sheet->getStyle('A2')->getFont()->setBold(true);
|
||||||
|
$sheet->getStyle('A2')->getAlignment()->setHorizontal('center');
|
||||||
|
|
||||||
|
// Header table
|
||||||
|
$sheet->getStyle('A5:R5')->getFont()->setBold(true);
|
||||||
|
$sheet->getStyle('A5:R5')->getAlignment()->setHorizontal('center');
|
||||||
|
|
||||||
|
// Auto width
|
||||||
|
foreach (range('A', 'R') as $col) {
|
||||||
|
$sheet->getColumnDimension($col)->setAutoSize(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Exports;
|
||||||
|
|
||||||
|
use Illuminate\Contracts\View\View;
|
||||||
|
use Maatwebsite\Excel\Concerns\FromView;
|
||||||
|
use Illuminate\Support\Facades\Http;
|
||||||
|
|
||||||
|
class GadaianDetailExport implements FromView
|
||||||
|
{
|
||||||
|
protected $kodcaw;
|
||||||
|
protected $startDate;
|
||||||
|
protected $endDate;
|
||||||
|
|
||||||
|
public function __construct($kodcaw, $startDate, $endDate)
|
||||||
|
{
|
||||||
|
$this->kodcaw = $kodcaw;
|
||||||
|
$this->startDate = $startDate;
|
||||||
|
$this->endDate = $endDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function view(): View
|
||||||
|
{
|
||||||
|
$generatedAt = now()->format('d-m-Y');
|
||||||
|
|
||||||
|
$data = Http::get(config('api.url') . '/api/reports/saringan/gadaian', [
|
||||||
|
'startDate' => $this->startDate,
|
||||||
|
'endDate' => $this->endDate,
|
||||||
|
])->json();
|
||||||
|
|
||||||
|
$branch = collect($data)->firstWhere('kodcaw', $this->kodcaw);
|
||||||
|
$details = collect($branch['details'] ?? []);
|
||||||
|
|
||||||
|
$tgb_lelong = $details->where('jenis', 'TGB_LELONG')->values();
|
||||||
|
$tgb_biasa = $details->where('jenis', 'TGB_BIASA')->values();
|
||||||
|
$gadai_biasa = $details->where('jenis', 'GADAI_BIASA')->values();
|
||||||
|
|
||||||
|
$subtotal = [
|
||||||
|
'tgb_lelong' => [
|
||||||
|
'berat' => $tgb_lelong->sum('berat'),
|
||||||
|
'nilai' => $tgb_lelong->sum('nilaimarhun'),
|
||||||
|
'pinjaman' => $tgb_lelong->sum('pinjaman'),
|
||||||
|
],
|
||||||
|
'tgb_biasa' => [
|
||||||
|
'berat' => $tgb_biasa->sum('berat'),
|
||||||
|
'nilai' => $tgb_biasa->sum('nilaimarhun'),
|
||||||
|
'pinjaman' => $tgb_biasa->sum('pinjaman'),
|
||||||
|
],
|
||||||
|
'gadai_biasa' => [
|
||||||
|
'berat' => $gadai_biasa->sum('berat'),
|
||||||
|
'nilai' => $gadai_biasa->sum('nilaimarhun'),
|
||||||
|
'pinjaman' => $gadai_biasa->sum('pinjaman'),
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
$grandTotal = [
|
||||||
|
'berat' => $subtotal['tgb_lelong']['berat']
|
||||||
|
+ $subtotal['tgb_biasa']['berat']
|
||||||
|
+ $subtotal['gadai_biasa']['berat'],
|
||||||
|
|
||||||
|
'nilai' => $subtotal['tgb_lelong']['nilai']
|
||||||
|
+ $subtotal['tgb_biasa']['nilai']
|
||||||
|
+ $subtotal['gadai_biasa']['nilai'],
|
||||||
|
|
||||||
|
'pinjaman' => $subtotal['tgb_lelong']['pinjaman']
|
||||||
|
+ $subtotal['tgb_biasa']['pinjaman']
|
||||||
|
+ $subtotal['gadai_biasa']['pinjaman'],
|
||||||
|
];
|
||||||
|
|
||||||
|
return view('reports.saringan-gadaian.excel', compact(
|
||||||
|
'branch',
|
||||||
|
'generatedAt',
|
||||||
|
'tgb_lelong',
|
||||||
|
'tgb_biasa',
|
||||||
|
'gadai_biasa',
|
||||||
|
'subtotal',
|
||||||
|
'grandTotal'
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,222 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Exports\LaporanKeseluruhan;
|
||||||
|
|
||||||
|
use Maatwebsite\Excel\Concerns\FromArray;
|
||||||
|
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
|
||||||
|
use Maatwebsite\Excel\Concerns\WithCustomValueBinder;
|
||||||
|
use Maatwebsite\Excel\Concerns\WithHeadings;
|
||||||
|
use Maatwebsite\Excel\Concerns\WithStrictNullComparison;
|
||||||
|
use PhpOffice\PhpSpreadsheet\Cell\Cell;
|
||||||
|
use PhpOffice\PhpSpreadsheet\Cell\DataType;
|
||||||
|
use PhpOffice\PhpSpreadsheet\Cell\DefaultValueBinder;
|
||||||
|
use PhpOffice\PhpSpreadsheet\Style\NumberFormat;
|
||||||
|
use Maatwebsite\Excel\Concerns\WithColumnFormatting;
|
||||||
|
use Maatwebsite\Excel\Concerns\WithMultipleSheets;
|
||||||
|
use Maatwebsite\Excel\Concerns\WithCustomStartCell;
|
||||||
|
use Maatwebsite\Excel\Events\AfterSheet;
|
||||||
|
use Maatwebsite\Excel\Concerns\WithEvents;
|
||||||
|
|
||||||
|
class AgingTebusAllExportExcel extends DefaultValueBinder implements
|
||||||
|
FromArray,
|
||||||
|
WithStrictNullComparison,
|
||||||
|
WithHeadings,
|
||||||
|
ShouldAutoSize,
|
||||||
|
WithCustomValueBinder,
|
||||||
|
WithColumnFormatting,
|
||||||
|
WithEvents,
|
||||||
|
WithCustomStartCell
|
||||||
|
{
|
||||||
|
protected $aging;
|
||||||
|
protected $startDate;
|
||||||
|
protected $endDate;
|
||||||
|
|
||||||
|
|
||||||
|
public function __construct($aging,$startDate,$endDate)
|
||||||
|
{
|
||||||
|
$this->aging = $aging;
|
||||||
|
$this->startDate = $startDate;
|
||||||
|
$this->endDate = $endDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function array(): array
|
||||||
|
{
|
||||||
|
$rows = [];
|
||||||
|
$totals = [];
|
||||||
|
|
||||||
|
foreach ($this->aging as $branch) {
|
||||||
|
$row = [$branch['cawangan']];
|
||||||
|
$i = 0;
|
||||||
|
|
||||||
|
foreach ($branch['summary_by_tempoh'] as $summary) {
|
||||||
|
$row[] = $summary['count'];
|
||||||
|
$row[] = $summary['sum_bayaran_keuntungan_rebet'];
|
||||||
|
|
||||||
|
// Totals per column
|
||||||
|
$totals[$i]['count'] = ($totals[$i]['count'] ?? 0) + $summary['count'];
|
||||||
|
$totals[$i]['sum_bayaran_keuntungan_rebet'] = ($totals[$i]['sum_bayaran_keuntungan_rebet'] ?? 0) + $summary['sum_bayaran_keuntungan_rebet'];
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Total per row (cawangan)
|
||||||
|
$jumlahBil = collect($branch['summary_by_tempoh'])->sum('count');
|
||||||
|
$jumlahRM = collect($branch['summary_by_tempoh'])->sum('sum_bayaran_keuntungan_rebet');
|
||||||
|
$row[] = $jumlahBil;
|
||||||
|
$row[] = $jumlahRM;
|
||||||
|
|
||||||
|
// Add to column totals
|
||||||
|
$totals['jumlah']['count'] = ($totals['jumlah']['count'] ?? 0) + $jumlahBil;
|
||||||
|
$totals['jumlah']['sum_bayaran_keuntungan_rebet'] = ($totals['jumlah']['sum_bayaran_keuntungan_rebet'] ?? 0) + $jumlahRM;
|
||||||
|
|
||||||
|
$rows[] = $row;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add final total row
|
||||||
|
$totalRow = ['Jumlah'];
|
||||||
|
foreach ($totals as $key => $val) {
|
||||||
|
$totalRow[] = $val['count'];
|
||||||
|
$totalRow[] = $val['sum_bayaran_keuntungan_rebet'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$rows[] = $totalRow;
|
||||||
|
|
||||||
|
return $rows;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Multi-row headings (2 rows)
|
||||||
|
*/
|
||||||
|
public function headings(): array
|
||||||
|
{
|
||||||
|
$row1 = ['Cawangan'];
|
||||||
|
$row2 = [''];
|
||||||
|
|
||||||
|
if (!empty($this->aging[0]['summary_by_tempoh'])) {
|
||||||
|
foreach ($this->aging[0]['summary_by_tempoh'] as $summary) {
|
||||||
|
$row1[] = $summary['label'];
|
||||||
|
$row1[] = ''; // empty to allow merged cell
|
||||||
|
$row2[] = 'Bil';
|
||||||
|
$row2[] = 'RM';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$row1[] = 'Jumlah';
|
||||||
|
$row1[] = ''; // for merged "Jumlah" cell
|
||||||
|
$row2[] = 'Bil';
|
||||||
|
$row2[] = 'RM';
|
||||||
|
|
||||||
|
return [$row1, $row2];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function columnFormats(): array
|
||||||
|
{
|
||||||
|
$formats = [];
|
||||||
|
$colIndex = 2; // Start at column B (Cawangan is A)
|
||||||
|
|
||||||
|
$tempohCount = count($this->aging[0]['summary_by_tempoh'] ?? []);
|
||||||
|
for ($i = 0; $i < $tempohCount; $i++) {
|
||||||
|
// Bil column
|
||||||
|
$bilCol = \PhpOffice\PhpSpreadsheet\Cell\Coordinate::stringFromColumnIndex($colIndex++);
|
||||||
|
$formats[$bilCol] = NumberFormat::FORMAT_NUMBER; // ✅ No decimal
|
||||||
|
|
||||||
|
// RM column
|
||||||
|
$rmCol = \PhpOffice\PhpSpreadsheet\Cell\Coordinate::stringFromColumnIndex($colIndex++);
|
||||||
|
$formats[$rmCol] = NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1; // RM with comma and decimals
|
||||||
|
}
|
||||||
|
|
||||||
|
// Jumlah Bil
|
||||||
|
$jumlahBilCol = \PhpOffice\PhpSpreadsheet\Cell\Coordinate::stringFromColumnIndex($colIndex++);
|
||||||
|
$formats[$jumlahBilCol] = NumberFormat::FORMAT_NUMBER; // ✅ No decimal
|
||||||
|
|
||||||
|
// Jumlah RM
|
||||||
|
$jumlahRMCol = \PhpOffice\PhpSpreadsheet\Cell\Coordinate::stringFromColumnIndex($colIndex++);
|
||||||
|
$formats[$jumlahRMCol] = NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1;
|
||||||
|
|
||||||
|
return $formats;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function bindValue(Cell $cell, $value)
|
||||||
|
{
|
||||||
|
if (is_numeric($value)) {
|
||||||
|
$cell->setValueExplicit($value, DataType::TYPE_NUMERIC);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return parent::bindValue($cell, $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Merge heading cells using AfterSheet event
|
||||||
|
*/
|
||||||
|
public function registerEvents(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
AfterSheet::class => function(AfterSheet $event) {
|
||||||
|
|
||||||
|
$sheet = $event->sheet->getDelegate();
|
||||||
|
|
||||||
|
// Tajuk laporan
|
||||||
|
$sheet->setCellValue('A1', 'KEUNTUNGAN PENYELESAIAN PEMBIAYAAN BY TEMPOH');
|
||||||
|
|
||||||
|
// Tarikh laporan
|
||||||
|
$sheet->setCellValue(
|
||||||
|
'A2',
|
||||||
|
'Tarikh : ' .
|
||||||
|
\Carbon\Carbon::parse($this->startDate)->format('d/m/Y') .
|
||||||
|
' hingga ' .
|
||||||
|
\Carbon\Carbon::parse($this->endDate)->format('d/m/Y')
|
||||||
|
);
|
||||||
|
|
||||||
|
// Merge tajuk
|
||||||
|
$lastColumn = \PhpOffice\PhpSpreadsheet\Cell\Coordinate::stringFromColumnIndex(
|
||||||
|
(count($this->aging[0]['summary_by_tempoh'] ?? []) * 2) + 3
|
||||||
|
);
|
||||||
|
|
||||||
|
$sheet->mergeCells("A1:{$lastColumn}1");
|
||||||
|
|
||||||
|
// Style tajuk
|
||||||
|
$sheet->getStyle("A1:{$lastColumn}1")->applyFromArray([
|
||||||
|
'font' => [
|
||||||
|
'bold' => true,
|
||||||
|
'size' => 14,
|
||||||
|
],
|
||||||
|
'alignment' => [
|
||||||
|
'horizontal' => \PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_CENTER,
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
|
||||||
|
// Merge header tempoh
|
||||||
|
$colIndex = 2; // Start from column B
|
||||||
|
$tempohCount = count($this->aging[0]['summary_by_tempoh'] ?? []);
|
||||||
|
|
||||||
|
$headingRow = 3;
|
||||||
|
|
||||||
|
for ($i = 0; $i < $tempohCount; $i++) {
|
||||||
|
|
||||||
|
$startCol = \PhpOffice\PhpSpreadsheet\Cell\Coordinate::stringFromColumnIndex($colIndex);
|
||||||
|
|
||||||
|
$endCol = \PhpOffice\PhpSpreadsheet\Cell\Coordinate::stringFromColumnIndex($colIndex + 1);
|
||||||
|
|
||||||
|
$sheet->mergeCells("{$startCol}{$headingRow}:{$endCol}{$headingRow}");
|
||||||
|
|
||||||
|
$colIndex += 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Merge Jumlah
|
||||||
|
$startCol = \PhpOffice\PhpSpreadsheet\Cell\Coordinate::stringFromColumnIndex($colIndex);
|
||||||
|
|
||||||
|
$endCol = \PhpOffice\PhpSpreadsheet\Cell\Coordinate::stringFromColumnIndex($colIndex + 1);
|
||||||
|
|
||||||
|
$sheet->mergeCells("{$startCol}{$headingRow}:{$endCol}{$headingRow}");
|
||||||
|
},
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Mulakan sel untuk data bermula dari A4 (Baris 3 adalah header)
|
||||||
|
public function startCell(): string
|
||||||
|
{
|
||||||
|
return 'A3'; // Data bermula dari baris 4
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -34,6 +34,7 @@ class LelonganAllExportExcel extends DefaultValueBinder implements FromArray, Wi
|
|||||||
'Baki Pembiayaan (RM)',
|
'Baki Pembiayaan (RM)',
|
||||||
'Keuntungan (RM)',
|
'Keuntungan (RM)',
|
||||||
'Caj Lelong (RM)',
|
'Caj Lelong (RM)',
|
||||||
|
'Harga Asas (RM)',
|
||||||
'Harga Jual (RM)',
|
'Harga Jual (RM)',
|
||||||
'Baki (RM)',
|
'Baki (RM)',
|
||||||
];
|
];
|
||||||
@@ -57,6 +58,7 @@ class LelonganAllExportExcel extends DefaultValueBinder implements FromArray, Wi
|
|||||||
$sum_pinjaman = 0;
|
$sum_pinjaman = 0;
|
||||||
$sum_bakiupah = 0;
|
$sum_bakiupah = 0;
|
||||||
$sum_cajlelong = 0;
|
$sum_cajlelong = 0;
|
||||||
|
$sum_hargaasas = 0;
|
||||||
$sum_hargajual = 0;
|
$sum_hargajual = 0;
|
||||||
$sum_baki = 0;
|
$sum_baki = 0;
|
||||||
|
|
||||||
@@ -73,6 +75,7 @@ class LelonganAllExportExcel extends DefaultValueBinder implements FromArray, Wi
|
|||||||
number_format((float) ($data['sum_bakipjm'] ?? 0), 2),
|
number_format((float) ($data['sum_bakipjm'] ?? 0), 2),
|
||||||
number_format((float) ($data['sum_bakiupah'] ?? 0), 2),
|
number_format((float) ($data['sum_bakiupah'] ?? 0), 2),
|
||||||
number_format((float) ($data['sum_cajlelong'] ?? 0), 2),
|
number_format((float) ($data['sum_cajlelong'] ?? 0), 2),
|
||||||
|
number_format((float) ($data['sum_hargaasas'] ?? 0), 2),
|
||||||
number_format((float) ($data['sum_hargajual'] ?? 0), 2),
|
number_format((float) ($data['sum_hargajual'] ?? 0), 2),
|
||||||
number_format((float) ($data['sum_baki'] ?? 0), 2),
|
number_format((float) ($data['sum_baki'] ?? 0), 2),
|
||||||
|
|
||||||
@@ -87,6 +90,7 @@ class LelonganAllExportExcel extends DefaultValueBinder implements FromArray, Wi
|
|||||||
$sum_bakipjm += (float) $data['sum_bakipjm'];
|
$sum_bakipjm += (float) $data['sum_bakipjm'];
|
||||||
$sum_bakiupah += (float) $data['sum_bakiupah'];
|
$sum_bakiupah += (float) $data['sum_bakiupah'];
|
||||||
$sum_cajlelong += (float) $data['sum_cajlelong'];
|
$sum_cajlelong += (float) $data['sum_cajlelong'];
|
||||||
|
$sum_hargaasas += (float) $data['sum_hargaasas'];
|
||||||
$sum_hargajual += (float) $data['sum_hargajual'];
|
$sum_hargajual += (float) $data['sum_hargajual'];
|
||||||
$sum_baki += (float) $data['sum_baki'];
|
$sum_baki += (float) $data['sum_baki'];
|
||||||
|
|
||||||
@@ -102,6 +106,7 @@ class LelonganAllExportExcel extends DefaultValueBinder implements FromArray, Wi
|
|||||||
number_format($sum_bakipjm, 2),
|
number_format($sum_bakipjm, 2),
|
||||||
number_format($sum_bakiupah, 2),
|
number_format($sum_bakiupah, 2),
|
||||||
number_format($sum_cajlelong, 2),
|
number_format($sum_cajlelong, 2),
|
||||||
|
number_format($sum_hargaasas, 2),
|
||||||
number_format($sum_hargajual, 2),
|
number_format($sum_hargajual, 2),
|
||||||
number_format($sum_baki, 2),
|
number_format($sum_baki, 2),
|
||||||
|
|
||||||
@@ -128,6 +133,7 @@ class LelonganAllExportExcel extends DefaultValueBinder implements FromArray, Wi
|
|||||||
(float) str_replace(',', '', $data[7] ?? 0), // Total Untung 1%
|
(float) str_replace(',', '', $data[7] ?? 0), // Total Untung 1%
|
||||||
(float) str_replace(',', '', $data[8] ?? 0), // Total Ujrah
|
(float) str_replace(',', '', $data[8] ?? 0), // Total Ujrah
|
||||||
(float) str_replace(',', '', $data[9] ?? 0), // Total Ujrah
|
(float) str_replace(',', '', $data[9] ?? 0), // Total Ujrah
|
||||||
|
(float) str_replace(',', '', $data[10] ?? 0), // Total Ujrah
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ class OutstandingAllExportExcel implements FromCollection, WithHeadings
|
|||||||
return [
|
return [
|
||||||
'Kod Cawangan',
|
'Kod Cawangan',
|
||||||
'Cawangan',
|
'Cawangan',
|
||||||
|
'Bil Pembiayaan (BRG KES)',
|
||||||
|
'Jumlah Pembiayaan (RM)',
|
||||||
'Bil Pembiayaan (SAG LAMA)',
|
'Bil Pembiayaan (SAG LAMA)',
|
||||||
'Jumlah Pembiayaan (RM)',
|
'Jumlah Pembiayaan (RM)',
|
||||||
'Bil Pembiayaan (SAG BARU)',
|
'Bil Pembiayaan (SAG BARU)',
|
||||||
|
|||||||
@@ -48,6 +48,24 @@ class LelonganExport implements WithMultipleSheets
|
|||||||
$sheets[] = new LelonganPerTellerExport($this->cawangan_detail, $this->query, $teller_with_lelongan_data);
|
$sheets[] = new LelonganPerTellerExport($this->cawangan_detail, $this->query, $teller_with_lelongan_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Sheet untuk senarai penuh lelongan (gabung semua teller)
|
||||||
|
$full_lelongan_data = [];
|
||||||
|
|
||||||
|
foreach ($this->lelongan as $teller => $data) {
|
||||||
|
if (isset($data['lelongan']) && is_array($data['lelongan'])) {
|
||||||
|
foreach ($data['lelongan'] as $item) {
|
||||||
|
$item['teller'] = $teller; // optional: simpan info teller
|
||||||
|
$full_lelongan_data[] = $item;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$sheets[] = new LelonganFullExport(
|
||||||
|
$this->cawangan_detail,
|
||||||
|
$this->query,
|
||||||
|
$full_lelongan_data
|
||||||
|
);
|
||||||
|
|
||||||
return $sheets;
|
return $sheets;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,56 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Exports;
|
||||||
|
|
||||||
|
use Illuminate\Contracts\View\View;
|
||||||
|
use Maatwebsite\Excel\Concerns\FromView;
|
||||||
|
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
|
||||||
|
use Maatwebsite\Excel\Concerns\WithTitle;
|
||||||
|
use Maatwebsite\Excel\Concerns\WithColumnFormatting;
|
||||||
|
use PhpOffice\PhpSpreadsheet\Style\NumberFormat;
|
||||||
|
|
||||||
|
class LelonganFullExport implements FromView, ShouldAutoSize, WithTitle, WithColumnFormatting
|
||||||
|
{
|
||||||
|
protected $cawangan_detail;
|
||||||
|
protected $query;
|
||||||
|
protected $lelongan_full_data;
|
||||||
|
|
||||||
|
public function __construct($cawangan_detail, $query, $lelongan_full_data)
|
||||||
|
{
|
||||||
|
$this->cawangan_detail = $cawangan_detail;
|
||||||
|
$this->query = $query;
|
||||||
|
$this->lelongan_full_data = $lelongan_full_data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function view(): View
|
||||||
|
{
|
||||||
|
return view('exports.lelongan.full', [
|
||||||
|
'cawangan_detail' => $this->cawangan_detail,
|
||||||
|
'query' => $this->query,
|
||||||
|
'lelongan_data' => $this->lelongan_full_data,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function title(): string
|
||||||
|
{
|
||||||
|
return 'SENARAI LELONGAN PENUH';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function columnFormats(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'E' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1, // Berat
|
||||||
|
'F' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1, // Nilai Marhun
|
||||||
|
'G' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1, // Pinjaman
|
||||||
|
'H' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1, // Keuntungan
|
||||||
|
'I' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1, // caj lelong
|
||||||
|
'J' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1, // baki
|
||||||
|
'K' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1, // baki
|
||||||
|
'L' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1, // baki
|
||||||
|
'M' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1, // baki
|
||||||
|
'N' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1, // baki
|
||||||
|
'O' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1, // baki
|
||||||
|
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -71,6 +71,7 @@ class LelonganPerTellerExport extends DefaultValueBinder implements FromView, Sh
|
|||||||
'J' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
'J' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||||
'K' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
'K' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||||
'L' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
'L' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||||
|
'M' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -68,6 +68,7 @@ class LelonganSummaryExport extends DefaultValueBinder implements FromView, Shou
|
|||||||
'J' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
'J' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||||
'C' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
'C' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||||
'D' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
'D' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||||
|
'K' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,189 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Exports;
|
||||||
|
|
||||||
|
use Maatwebsite\Excel\Concerns\WithHeadings;
|
||||||
|
use Maatwebsite\Excel\Concerns\FromCollection;
|
||||||
|
use Maatwebsite\Excel\Concerns\WithTitle;
|
||||||
|
use Maatwebsite\Excel\Concerns\WithMapping;
|
||||||
|
use Maatwebsite\Excel\Concerns\WithStyles;
|
||||||
|
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
|
||||||
|
use Maatwebsite\Excel\Concerns\WithCustomStartCell;
|
||||||
|
use Maatwebsite\Excel\Concerns\WithColumnFormatting;
|
||||||
|
use PhpOffice\PhpSpreadsheet\Style\NumberFormat;
|
||||||
|
use PhpOffice\PhpSpreadsheet\Style\Border;
|
||||||
|
use PhpOffice\PhpSpreadsheet\Style\Alignment;
|
||||||
|
|
||||||
|
class SAExportAudit implements FromCollection, WithHeadings, WithTitle, WithMapping, WithStyles, WithCustomStartCell, WithColumnFormatting
|
||||||
|
{
|
||||||
|
protected $stokaudit;
|
||||||
|
protected $jenisLaporan;
|
||||||
|
protected $tebus_date;
|
||||||
|
protected $namacaw;
|
||||||
|
|
||||||
|
public function __construct($stokaudit, $jenisLaporan = 'LAPORAN STOK AUDIT', $tebus_date, $namacaw)
|
||||||
|
{
|
||||||
|
$this->stokaudit = $stokaudit;
|
||||||
|
$this->jenisLaporan = strtoupper($jenisLaporan);
|
||||||
|
$this->tebus_date = $tebus_date;
|
||||||
|
$this->namacaw = $namacaw;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function collection()
|
||||||
|
{
|
||||||
|
$data = collect($this->stokaudit);
|
||||||
|
|
||||||
|
$totals = [
|
||||||
|
'No Rujukan' => 'TOTAL',
|
||||||
|
'No KP' => '',
|
||||||
|
'Marhun' => '',
|
||||||
|
'Tempoh' => '',
|
||||||
|
'Berat (g)' => $data->sum(fn($row) => floatval($row['Berat (g)'] ?? 0)),
|
||||||
|
'Nilai Marhun' => $data->sum(fn($row) => floatval($row['Nilai Marhun'] ?? 0)),
|
||||||
|
'Pinjaman' => $data->sum(fn($row) => floatval($row['Pinjaman'] ?? 0)),
|
||||||
|
'Baki Pinjaman' => $data->sum(fn($row) => floatval($row['Baki Pinjaman'] ?? 0)),
|
||||||
|
];
|
||||||
|
|
||||||
|
$data->push($totals);
|
||||||
|
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function headings(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
['LAPORAN STOK AUDIT'],
|
||||||
|
["CAWANGAN:", $this->namacaw],
|
||||||
|
["TARIKH:", $this->tebus_date],
|
||||||
|
[],
|
||||||
|
[
|
||||||
|
'BIL',
|
||||||
|
'NORUJUKAN',
|
||||||
|
'NO KP',
|
||||||
|
'MARHUN',
|
||||||
|
'BERAT (G)',
|
||||||
|
'BERAT AUDIT',
|
||||||
|
'NILAI MARHUN (RM)',
|
||||||
|
'PEMBIAYAAN (RM)',
|
||||||
|
'BAKI PEMBIAYAAN (RM)',
|
||||||
|
'JBG',
|
||||||
|
'CATATAN'
|
||||||
|
]
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function startCell(): string
|
||||||
|
{
|
||||||
|
return 'A1';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function map($row): array
|
||||||
|
{
|
||||||
|
static $counter = 1;
|
||||||
|
|
||||||
|
if (($row['No Rujukan'] ?? '') === 'TOTAL') {
|
||||||
|
return [
|
||||||
|
'',
|
||||||
|
'JUMLAH',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
$row['Berat (g)'] ?? 0,
|
||||||
|
'',
|
||||||
|
$row['Nilai Marhun'] ?? 0,
|
||||||
|
$row['Pinjaman'] ?? 0,
|
||||||
|
$row['Baki Pinjaman'] ?? 0,
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
return [
|
||||||
|
$row['Bil'] ?? $counter++,
|
||||||
|
$row['No Rujukan'] ?? '',
|
||||||
|
isset($row['No KP']) ? "'" . $row['No KP'] : '',
|
||||||
|
$row['Marhun'] ?? '',
|
||||||
|
$row['Berat (g)'] ?? 0,
|
||||||
|
'',
|
||||||
|
$row['Nilai Marhun'] ?? 0,
|
||||||
|
$row['Pinjaman'] ?? 0,
|
||||||
|
$row['Baki Pinjaman'] ?? 0,
|
||||||
|
$row['Tempoh'] ?? '',
|
||||||
|
'',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function title(): string
|
||||||
|
{
|
||||||
|
return $this->jenisLaporan;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function styles(Worksheet $sheet)
|
||||||
|
{
|
||||||
|
$sheet->mergeCells('A1:K1');
|
||||||
|
$sheet->getStyle('A1')->getFont()->setBold(true)->setSize(16);
|
||||||
|
$sheet->getStyle('A1')->getAlignment()->setHorizontal(Alignment::HORIZONTAL_CENTER);
|
||||||
|
|
||||||
|
$sheet->getStyle('A5:K5')->getFont()->setBold(true);
|
||||||
|
|
||||||
|
$lastRow = $sheet->getHighestRow();
|
||||||
|
$lastCol = 'K';
|
||||||
|
|
||||||
|
// Border untuk semua data
|
||||||
|
$sheet->getStyle("A5:{$lastCol}{$lastRow}")
|
||||||
|
->getBorders()
|
||||||
|
->getAllBorders()
|
||||||
|
->setBorderStyle(Border::BORDER_THIN);
|
||||||
|
|
||||||
|
// Bold TOTAL row
|
||||||
|
$sheet->getStyle("A{$lastRow}:{$lastCol}{$lastRow}")->getFont()->setBold(true);
|
||||||
|
|
||||||
|
// Align center untuk column tertentu
|
||||||
|
$sheet->getStyle("A5:A{$lastRow}")->getAlignment()->setHorizontal(Alignment::HORIZONTAL_CENTER);
|
||||||
|
$sheet->getStyle("B5:B{$lastRow}")->getAlignment()->setHorizontal(Alignment::HORIZONTAL_CENTER);
|
||||||
|
$sheet->getStyle("C5:C{$lastRow}")->getAlignment()->setHorizontal(Alignment::HORIZONTAL_CENTER);
|
||||||
|
$sheet->getStyle("D5:D{$lastRow}")->getAlignment()->setHorizontal(Alignment::HORIZONTAL_CENTER);
|
||||||
|
|
||||||
|
// Wrap text untuk semua column
|
||||||
|
$sheet->getStyle("A5:{$lastCol}{$lastRow}")->getAlignment()->setWrapText(true);
|
||||||
|
|
||||||
|
// Auto-fit semua column kecuali Marhun
|
||||||
|
foreach (range('A', $lastCol) as $col) {
|
||||||
|
if ($col !== 'D') { // skip Marhun
|
||||||
|
$sheet->getColumnDimension($col)->setAutoSize(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Untuk column Marhun (D), kita boleh set width minimum supaya tak terlalu besar
|
||||||
|
$sheet->getColumnDimension('D')->setWidth(18); // boleh adjust ikut perlu
|
||||||
|
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function columnWidths(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'A' => 5,
|
||||||
|
'B' => 20,
|
||||||
|
'C' => 18,
|
||||||
|
'D' => 18,
|
||||||
|
'E' => 12,
|
||||||
|
'F' => 15,
|
||||||
|
'G' => 18,
|
||||||
|
'H' => 18,
|
||||||
|
'I' => 18,
|
||||||
|
'J' => 12,
|
||||||
|
'K' => 15,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function columnFormats(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'E' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||||
|
'F' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||||
|
'G' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||||
|
'H' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||||
|
'I' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Exports;
|
||||||
|
|
||||||
|
use Illuminate\Contracts\View\View;
|
||||||
|
use Maatwebsite\Excel\Concerns\FromView;
|
||||||
|
use Illuminate\Support\Facades\Http;
|
||||||
|
|
||||||
|
class WTDDetailExport implements FromView
|
||||||
|
{
|
||||||
|
protected $kodcaw;
|
||||||
|
protected $startDate;
|
||||||
|
protected $endDate;
|
||||||
|
|
||||||
|
public function __construct($kodcaw, $startDate, $endDate)
|
||||||
|
{
|
||||||
|
$this->kodcaw = $kodcaw;
|
||||||
|
$this->startDate = $startDate;
|
||||||
|
$this->endDate = $endDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function view(): View
|
||||||
|
{
|
||||||
|
$data = Http::get(config('api.url') . '/admin/wtd/summaryWtd', [
|
||||||
|
'startDate' => $this->startDate,
|
||||||
|
'endDate' => $this->endDate,
|
||||||
|
])->json();
|
||||||
|
|
||||||
|
$branch = collect($data)->firstWhere('kodcaw', $this->kodcaw);
|
||||||
|
$details = collect($branch['details'] ?? []);
|
||||||
|
|
||||||
|
return view('reports.wtd.excel', [
|
||||||
|
'details' => $details, // data WTD
|
||||||
|
'branch' => $branch,
|
||||||
|
'generatedAt' => now()->format('d/m/Y H:i'),
|
||||||
|
'startDate' => $this->startDate,
|
||||||
|
'endDate' => $this->endDate,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Http;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class AccountStatementController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Display the bank statement view with mock data.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\View\View
|
||||||
|
*/
|
||||||
|
public function showStatement(Request $request)
|
||||||
|
{
|
||||||
|
$gadaian = Http::get(config('api.url').'/api/gadai/norujukan/'.$request->norujukan)->json()[0][0];
|
||||||
|
$transaction = Http::get(config('api.url').'/portal/transaksipelanggan',['norujukan' => $request->norujukan])->json();
|
||||||
|
$cawangan=Http::get(config('api.url').'/api/cawangan/detail/'. $gadaian['kodcaw'])->json()[0];
|
||||||
|
$customer = Http::get(config('api.url') . '/api/customers/' . $gadaian['nokp'])->json();
|
||||||
|
$poskod = Http::get(config('api.url') . '/api/poskod/' . $customer['poskod'])->json();
|
||||||
|
|
||||||
|
$accountHolder = [
|
||||||
|
'name' => $customer['nama'],
|
||||||
|
'address' => $customer['alamat1'] . '<br>' . $customer['alamat2'],
|
||||||
|
'city_state_zip' => $customer['poskod'] . ', ' . $poskod['daerah']['namadaerah'] . ', ' . $poskod['negeri']['negeri'],
|
||||||
|
];
|
||||||
|
|
||||||
|
$bankDetails = [
|
||||||
|
'name' => $cawangan['cawangan'],
|
||||||
|
'address' => $cawangan['alamat1'] . '<br>' . $cawangan['alamat2'],
|
||||||
|
'branch' => $cawangan['namacaw'],
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
$transaction_count = count(array_filter($transaction, fn($trans) => $trans['trans_type'] == 'A'));
|
||||||
|
$totalPages = ceil($transaction_count / 10);
|
||||||
|
|
||||||
|
$ansuranTransaction = array_values(array_filter($transaction, fn($trans) => $trans['trans_type'] == 'A'));
|
||||||
|
$originLoan = $gadaian['pinjaman'];
|
||||||
|
$bakipinjaman = $originLoan;
|
||||||
|
$ansuranTransaction = array_map(function($trans) use(&$bakipinjaman) {
|
||||||
|
$bakipinjaman -= $trans['bayaran_pembiayaan'];
|
||||||
|
return array_merge($trans, ['bakipinjaman' => $bakipinjaman]);
|
||||||
|
}, $ansuranTransaction);
|
||||||
|
|
||||||
|
$tebusTransaction = array_values(array_filter($transaction, fn($trans) => $trans['trans_type'] == 'T'))[0];
|
||||||
|
|
||||||
|
return view('accounts-statements', compact('tebusTransaction','ansuranTransaction','transaction_count','gadaian','transaction','accountHolder', 'bankDetails'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper function to format currency.
|
||||||
|
* In a real app, this would be a Blade helper or filter.
|
||||||
|
* We'll format it directly in the view for simplicity in this example.
|
||||||
|
*/
|
||||||
|
}
|
||||||
@@ -5,6 +5,7 @@ namespace App\Http\Controllers;
|
|||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\Http;
|
use Illuminate\Support\Facades\Http;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
|
|
||||||
use Barryvdh\DomPDF\Facade as PDF;
|
use Barryvdh\DomPDF\Facade as PDF;
|
||||||
@@ -22,6 +23,7 @@ use Maatwebsite\Excel\Facades\Excel;
|
|||||||
use App\Exports\PendSerExport;
|
use App\Exports\PendSerExport;
|
||||||
use App\Exports\SAExport;
|
use App\Exports\SAExport;
|
||||||
use App\Exports\SAcombineExport;
|
use App\Exports\SAcombineExport;
|
||||||
|
use App\Exports\SAExportAudit;
|
||||||
|
|
||||||
class AkaunController extends Controller
|
class AkaunController extends Controller
|
||||||
{
|
{
|
||||||
@@ -314,7 +316,7 @@ class AkaunController extends Controller
|
|||||||
|
|
||||||
// return view('akaun.laporan_imbanduga',compact('tarikh_imbangan', 'tarikh_imbangan2','hartasemasa','untungrugifield','tanggungansemasa','totalhartasemasa','totaluntungrugi','totaltanggungansemasa','tarikh_cetak','cawangan_info','cawangan','api_url','cawangan_detail'));
|
// return view('akaun.laporan_imbanduga',compact('tarikh_imbangan', 'tarikh_imbangan2','hartasemasa','untungrugifield','tanggungansemasa','totalhartasemasa','totaluntungrugi','totaltanggungansemasa','tarikh_cetak','cawangan_info','cawangan','api_url','cawangan_detail'));
|
||||||
}
|
}
|
||||||
|
////ainizazi
|
||||||
public function cetakLaporanGadai(Request $request){
|
public function cetakLaporanGadai(Request $request){
|
||||||
$api_url = $request->hostname;
|
$api_url = $request->hostname;
|
||||||
$auth_user = Auth::user();
|
$auth_user = Auth::user();
|
||||||
@@ -337,7 +339,17 @@ class AkaunController extends Controller
|
|||||||
}
|
}
|
||||||
// $gadai = Http::get($request->hostname. '/api/gadai/laporan/'. $request->kodcaw .'/'. $gadai_date)->json();
|
// $gadai = Http::get($request->hostname. '/api/gadai/laporan/'. $request->kodcaw .'/'. $gadai_date)->json();
|
||||||
|
|
||||||
$gadai = Http::get($request->hostname. '/api/gadailaporanRangeDate/'. $request->kodcaw,['mula' => $tarikh_mula,'akhir' => $tarikh_akhir])->json();
|
$reportGadai = Http::get($request->hostname. '/api/gadailaporanRangeDate/'. $request->kodcaw,['mula' => $tarikh_mula,'akhir' => $tarikh_akhir])->json();
|
||||||
|
$gadai = $reportGadai['gadai'];
|
||||||
|
// dd($reportsGadai);
|
||||||
|
$statistik =$reportGadai['statistik'];
|
||||||
|
$reportPembiayaan= $statistik['reportPembiayaan'];
|
||||||
|
$reportLoanAmount=$statistik['reportLoanAmount'];
|
||||||
|
$reportMarhunValue=$statistik['reportMarhunValue'];
|
||||||
|
$reportMarhunMargin=$statistik['reportMarhunMargin'];
|
||||||
|
$reportCustomerJob=$statistik['reportCustomerJob'];
|
||||||
|
$reportCustomerRace=$statistik['reportCustomerRace'];
|
||||||
|
|
||||||
|
|
||||||
$cawangan=Http::get($request->hostname.'/api/cawangan/detail/'.$request->kodcaw)->json();
|
$cawangan=Http::get($request->hostname.'/api/cawangan/detail/'.$request->kodcaw)->json();
|
||||||
$cawangan_detail=$cawangan[0];
|
$cawangan_detail=$cawangan[0];
|
||||||
@@ -349,10 +361,9 @@ class AkaunController extends Controller
|
|||||||
$pdf = PDF::loadView('akaun.laporan_gadaian', compact('gadai','cawangan_detail','tarikh_cetak','tarikh_mula','tarikh_akhir','api_url'))->setPaper('a4', 'landscape');
|
$pdf = PDF::loadView('akaun.laporan_gadaian', compact('gadai','cawangan_detail','tarikh_cetak','tarikh_mula','tarikh_akhir','api_url'))->setPaper('a4', 'landscape');
|
||||||
return $pdf->download('laporan_gadaian_' . $request->kodcaw .'_'. $tarikh_mula .'-'. $tarikh_akhir .'.pdf');
|
return $pdf->download('laporan_gadaian_' . $request->kodcaw .'_'. $tarikh_mula .'-'. $tarikh_akhir .'.pdf');
|
||||||
}else{
|
}else{
|
||||||
return view('akaun.laporan_gadaian', compact('gadai','cawangan_detail','tarikh_cetak','tarikh_mula','tarikh_akhir','api_url'));
|
return view('akaun.laporan_gadaian', compact('gadai','cawangan_detail','tarikh_cetak','tarikh_mula','tarikh_akhir','api_url','reportGadai','gadai','statistik','reportPembiayaan','reportLoanAmount','reportMarhunValue','reportMarhunMargin','reportCustomerJob','reportCustomerRace'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function cetakLaporanPenebusan(Request $request){
|
public function cetakLaporanPenebusan(Request $request){
|
||||||
@@ -417,8 +428,6 @@ class AkaunController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function cetaklaporan_Upah(Request $request)
|
public function cetaklaporan_Upah(Request $request)
|
||||||
@@ -572,9 +581,9 @@ class AkaunController extends Controller
|
|||||||
|
|
||||||
$request->hostname = config('app.env') == 'production' ? 'http://apiujrah.arrahn' : $request->hostname;
|
$request->hostname = config('app.env') == 'production' ? 'http://apiujrah.arrahn' : $request->hostname;
|
||||||
|
|
||||||
$tuntutbaki = Http::get($request->hostname. '/api/TuntutBakiRangeDate/'. $request->kodcaw,['mula' => $tarikh_mula,'akhir' => $tarikh_akhir])->json();
|
$tuntutbaki = Http::get($api_url. '/api/TuntutBakiRangeDate/'. $request->kodcaw,['mula' => $tarikh_mula,'akhir' => $tarikh_akhir])->json();
|
||||||
|
|
||||||
$cawangan=Http::get($request->hostname.'/api/cawangan/detail/'.$request->kodcaw)->json();
|
$cawangan=Http::get($api_url.'/api/cawangan/detail/'.$request->kodcaw)->json();
|
||||||
$cawangan_detail=$cawangan[0];
|
$cawangan_detail=$cawangan[0];
|
||||||
|
|
||||||
if(isset($request->jenis))
|
if(isset($request->jenis))
|
||||||
@@ -760,6 +769,49 @@ class AkaunController extends Controller
|
|||||||
$cawangan_detail['namacaw']// ✅ Use the correct branch name from API
|
$cawangan_detail['namacaw']// ✅ Use the correct branch name from API
|
||||||
), 'laporan_stokaudit_' . $request->kodcaw . '_' . $tebus_date . '.xlsx');
|
), 'laporan_stokaudit_' . $request->kodcaw . '_' . $tebus_date . '.xlsx');
|
||||||
}
|
}
|
||||||
|
elseif ($request->jenis == 'excelaudit') {
|
||||||
|
|
||||||
|
if ($request->radaktif === 'aktif') {
|
||||||
|
$stokaudit = Http::get($api_url . '/api/stokaudit/aktif/' . $request->kodcaw, [
|
||||||
|
'tarikh' => $tebus_date
|
||||||
|
])->json();
|
||||||
|
} else {
|
||||||
|
$stokaudit = Http::get($api_url . '/api/stokaudit/takaktif/' . $request->kodcaw, [
|
||||||
|
'tarikh' => $tebus_date
|
||||||
|
])->json();
|
||||||
|
}
|
||||||
|
|
||||||
|
$stokauditRecords = $stokaudit['rekod'] ?? [];
|
||||||
|
|
||||||
|
if (empty($stokauditRecords)) {
|
||||||
|
return back()->with('error', 'No records found to export.');
|
||||||
|
}
|
||||||
|
|
||||||
|
// pilih column untuk audit sahaja
|
||||||
|
$auditRecords = collect($stokauditRecords)->values()->map(function ($item, $index) {
|
||||||
|
return [
|
||||||
|
'Bil' => $index + 1,
|
||||||
|
'No Rujukan' => $item['norujukan'] ?? '',
|
||||||
|
'No KP' => $item['nokp'] ?? '',
|
||||||
|
'Marhun' => $item['marhun'] ?? '',
|
||||||
|
'Berat (g)' => $item['berat'] ?? '',
|
||||||
|
'Nilai Marhun' => $item['nilaimarhun'] ?? '',
|
||||||
|
'Pinjaman' => $item['pinjaman'] ?? '',
|
||||||
|
'Baki Pinjaman' => $item['bakipjm'] ?? '',
|
||||||
|
'Tempoh' => $item['tempoh'] ?? '',
|
||||||
|
];
|
||||||
|
});
|
||||||
|
|
||||||
|
return Excel::download(
|
||||||
|
new SAExportAudit(
|
||||||
|
$auditRecords,
|
||||||
|
'Laporan Stok Audit',
|
||||||
|
$tebus_date,
|
||||||
|
$cawangan_detail['namacaw']
|
||||||
|
),
|
||||||
|
'laporan_stokaudit_audit_' . $request->kodcaw . '_' . $tebus_date . '.xlsx'
|
||||||
|
);
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
if ($request->radaktif === 'aktif') {
|
if ($request->radaktif === 'aktif') {
|
||||||
$stokaudit = Http::get($api_url . '/api/stokaudit/aktif/' . $request->kodcaw, ['tarikh' => $tebus_date])->json();
|
$stokaudit = Http::get($api_url . '/api/stokaudit/aktif/' . $request->kodcaw, ['tarikh' => $tebus_date])->json();
|
||||||
@@ -831,7 +883,6 @@ class AkaunController extends Controller
|
|||||||
// ])->json();
|
// ])->json();
|
||||||
|
|
||||||
// $laporan_ringkasan = $laporan_ringkasan[0];
|
// $laporan_ringkasan = $laporan_ringkasan[0];
|
||||||
|
|
||||||
$cawangan=Http::get(config('api.url').'/api/cawangan/detail/'.$request->kodcaw)->json();
|
$cawangan=Http::get(config('api.url').'/api/cawangan/detail/'.$request->kodcaw)->json();
|
||||||
$cawangan_detail=$cawangan[0];
|
$cawangan_detail=$cawangan[0];
|
||||||
|
|
||||||
@@ -860,9 +911,8 @@ class AkaunController extends Controller
|
|||||||
|
|
||||||
$petibesi = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/laporanpetibesi/'. $request->kodcaw .'/'. $tebus_date)->json();
|
$petibesi = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/laporanpetibesi/'. $request->kodcaw .'/'. $tebus_date)->json();
|
||||||
|
|
||||||
if(!$petibesi)
|
if (($petibesi['error'] ?? null) === 'Tiada data pada tarikh tersebut') {
|
||||||
{
|
return redirect()->back()->with('peti_besi_error_message', 'Tiada data pada tarikh tersebut.');
|
||||||
return redirect()->back()->with('errormessage', 'Tiada data pada tarikh tersebut.');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($request->jenis))
|
if(isset($request->jenis))
|
||||||
@@ -1660,39 +1710,66 @@ class AkaunController extends Controller
|
|||||||
$api_url = $request->hostname;
|
$api_url = $request->hostname;
|
||||||
$auth_user = Auth::user();
|
$auth_user = Auth::user();
|
||||||
$current = Carbon::now();
|
$current = Carbon::now();
|
||||||
$current = new Carbon();
|
|
||||||
$tarikh_cetak = $current->toDateString();
|
$tarikh_cetak = $current->toDateString();
|
||||||
|
|
||||||
|
// Tarikh mula
|
||||||
if ($request->datemula == null) {
|
if ($request->datemula == null) {
|
||||||
$mula_date = $current->toDateString();
|
$mula_date = $current->toDateString();
|
||||||
} else {
|
} else {
|
||||||
$split_date = explode('-',$request->datemula);
|
|
||||||
$mula_date = $request->datemula;
|
$mula_date = $request->datemula;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Tarikh hingga
|
||||||
if ($request->datehingga == null) {
|
if ($request->datehingga == null) {
|
||||||
$hingga_date = $current->toDateString();
|
$hingga_date = $current->toDateString();
|
||||||
} else {
|
} else {
|
||||||
$split_date2 = explode('-',$request->datehingga);
|
|
||||||
$hingga_date = $request->datehingga;
|
$hingga_date = $request->datehingga;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Tetapkan hostname ikut environment
|
||||||
$request->hostname = config('app.env') == 'production' ? 'http://apiujrah.arrahn' : $request->hostname;
|
$request->hostname = config('app.env') == 'production' ? 'http://apiujrah.arrahn' : $request->hostname;
|
||||||
$tebus = Http::get($request->hostname. '/api/ansuranujrah/laporan/'. $request->kodcaw,['mula' => $mula_date,'akhir' => $hingga_date])->json();
|
|
||||||
$cawangan=Http::get($request->hostname.'/api/cawangan/detail/'.$request->kodcaw)->json();
|
|
||||||
$cawangan_detail=$cawangan[0];
|
|
||||||
if(isset($request->jenis))
|
|
||||||
{
|
|
||||||
if($request->jenis == 'pdf')
|
|
||||||
{
|
|
||||||
$pdf = PDF::loadView('akaun.laporan_ansuran', compact('tebus','cawangan_detail','tarikh_cetak','mula_date','hingga_date','api_url'))->setPaper('a4', 'potrait');
|
|
||||||
return $pdf->download('laporan_ansuran_' . $request->kodcaw .'_'. $mula_date .'-'. $hingga_date .'.pdf');
|
|
||||||
|
|
||||||
|
$response = Http::get($api_url . '/api/ansuranujrah/laporan/' . $request->kodcaw, [
|
||||||
|
'mula' => $mula_date,
|
||||||
|
'akhir' => $hingga_date,
|
||||||
|
'jenis' => $request->laporanansuran
|
||||||
|
]);
|
||||||
|
|
||||||
|
if ($response->failed() || !$response->json()) {
|
||||||
|
$tebus = []; // fallback elak error di view
|
||||||
} else {
|
} else {
|
||||||
return view('akaun.laporan_ansuran', compact('tebus','cawangan_detail','tarikh_cetak','api_url','mula_date','hingga_date'));
|
$tebus = $response->json();
|
||||||
|
}
|
||||||
|
|
||||||
|
$cawangan = Http::get($api_url . '/api/cawangan/detail/' . $request->kodcaw)->json();
|
||||||
|
$cawangan_detail = $cawangan[0] ?? ['nama' => 'Tiada data'];
|
||||||
|
|
||||||
|
// Tajuk laporan ikut jenis
|
||||||
|
$reportTitles = [
|
||||||
|
'online' => 'Laporan Ansuran Pembiayaan (Arrahn Pay)',
|
||||||
|
'kaunter' => 'Laporan Ansuran Pembiayaan (Kaunter aros)',
|
||||||
|
'all' => 'Laporan Ansuran Pembiayaan Semua'
|
||||||
|
];
|
||||||
|
|
||||||
|
$jenisLaporan = $request->laporanansuran;
|
||||||
|
$fileTitle = $reportTitles[$jenisLaporan] ?? 'Laporan_Tidak_Diketahui';
|
||||||
|
|
||||||
|
// PDF atau view biasa
|
||||||
|
if (isset($request->jenis)) {
|
||||||
|
if ($request->jenis == 'pdf') {
|
||||||
|
$pdf = PDF::loadView('akaun.laporan_ansuran', compact(
|
||||||
|
'tebus', 'cawangan_detail', 'tarikh_cetak', 'mula_date', 'hingga_date', 'api_url', 'jenisLaporan'
|
||||||
|
))->setPaper('a4', 'potrait');
|
||||||
|
|
||||||
|
return $pdf->download('laporan_ansuran_' . $request->kodcaw . '_' . $mula_date . '-' . $hingga_date . '.pdf');
|
||||||
|
} else {
|
||||||
|
return view('akaun.laporan_ansuran', compact(
|
||||||
|
'tebus', 'cawangan_detail', 'tarikh_cetak', 'api_url', 'jenisLaporan', 'mula_date', 'hingga_date'
|
||||||
|
));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public function cetakLaporanPenebusanRangeDate(Request $request){
|
public function cetakLaporanPenebusanRangeDate(Request $request){
|
||||||
$api_url = $request->hostname;
|
$api_url = $request->hostname;
|
||||||
@@ -1890,6 +1967,55 @@ class AkaunController extends Controller
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function cetak_laporanbarangkes(Request $request)
|
||||||
|
|
||||||
|
{
|
||||||
|
$api_url = $request->hostname;
|
||||||
|
// $api_url = ($request->hostname) ? $request->hostname : config('api.url');
|
||||||
|
$auth_user = Auth::user();
|
||||||
|
$current = Carbon::now();
|
||||||
|
$current = new Carbon();
|
||||||
|
$tarikh_cetak = $current->toDateString();
|
||||||
|
|
||||||
|
if($request->datemula == null){
|
||||||
|
$mula_date = '2017-01-01';
|
||||||
|
}else{
|
||||||
|
$mula_date = $request->datemula;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($request->datehingga == null){
|
||||||
|
$hingga_date = $current->toDateString();
|
||||||
|
}else{
|
||||||
|
$hingga_date = $request->datehingga;
|
||||||
|
}
|
||||||
|
|
||||||
|
$status = $request->status ?? 'all';
|
||||||
|
// $barangkes = Http::get($request->hostname . '/api/barangkes/laporan/', ['kodcaw' => $request->kodcaw,'alasan' => $request->sltalasan,'tarikh_mula' => $mula_date,'tarikh_akhir' => $hingga_date, 'status' => $status,])->json();
|
||||||
|
$palsu = Http::get($request->hostname . '/api/palsu/laporan/', ['kodcaw' => $request->kodcaw,'tarikh_mula' => $mula_date,'tarikh_akhir' => $hingga_date, 'status' => $status,])->json();
|
||||||
|
|
||||||
|
if (!is_array($palsu)) {
|
||||||
|
$palsu = []; // utk nak tengok data tubik ke dok
|
||||||
|
}
|
||||||
|
|
||||||
|
$cawangan_info = Http::get($request->hostname . '/api/cawangan/'. $request->kodcaw)->json();
|
||||||
|
$cawangan = Http::get($request->hostname . '/api/cawangan/detail/'. $request->kodcaw)->json();
|
||||||
|
$cawangan_detail=$cawangan[0];
|
||||||
|
|
||||||
|
$hostname = $request->hostname;
|
||||||
|
|
||||||
|
if(isset($request->jenis))
|
||||||
|
{
|
||||||
|
if($request->jenis == 'pdf')
|
||||||
|
{
|
||||||
|
$pdf = PDF::loadView('akaun.laporan_brgkes', compact('hostname','palsu','cawangan_detail','tarikh_cetak','mula_date','hingga_date','api_url','status'))->setPaper('a4', 'potrait');
|
||||||
|
return $pdf->download('laporan_brgkes' . $request->kodcaw .'_'. $mula_date .'_'. $hingga_date . '.pdf');
|
||||||
|
}else{
|
||||||
|
return view('akaun.laporan_brgkes', compact('hostname','palsu','cawangan_detail','tarikh_cetak','mula_date','hingga_date','api_url','status'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return view('akaun.laporan_brgkes', compact('hostname','cawangan_detail','mula_date','hingga_date','tarikh_cetak','api_url','palsu','status'));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,56 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
use Illuminate\Support\Facades\Session;
|
||||||
|
use Illuminate\Support\Facades\Http;
|
||||||
|
use Carbon\Carbon;
|
||||||
|
|
||||||
|
class BarangkesController extends Controller
|
||||||
|
{
|
||||||
|
// lebih kurg mcm index
|
||||||
|
public function AdminBarangKes(Request $request)
|
||||||
|
{
|
||||||
|
$api_url = config('api.url');
|
||||||
|
$auth_user = Auth::user();
|
||||||
|
// dd($api_url);
|
||||||
|
return view('barangkes.barangkes',compact('api_url','auth_user'));
|
||||||
|
// return view('barangkes.index', compact('data'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function Detailssag(Request $request, $id)
|
||||||
|
{
|
||||||
|
$api_url = config('api.url');
|
||||||
|
$auth_user = Auth::user();
|
||||||
|
|
||||||
|
// ambil customer info
|
||||||
|
$customer_info = Http::get($api_url . '/admin/Customers/' . $id)->json();
|
||||||
|
// dd($customer_info);
|
||||||
|
// ambil gadai info (by kodcaw + norujukan dari route)
|
||||||
|
// $gadai = null;
|
||||||
|
if (!empty($customer_info['kodcaw']) && !empty($norujukan)) {
|
||||||
|
$gadai = Http::get($api_url . '/api/gadai/norujukan/'
|
||||||
|
. $customer_info['kodcaw'] . '/' . $norujukan)->json();
|
||||||
|
}
|
||||||
|
|
||||||
|
$gadai = Http::get($api_url . '/api/gadai/norujukan/' . $request->kodcaw . '/' . $request->norujukan)->json();
|
||||||
|
$gadai = $gadai[0];
|
||||||
|
|
||||||
|
return view('pelanggan.detailssag', compact('api_url', 'auth_user', 'customer_info', 'gadai'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function store(Request $request, $id){
|
||||||
|
|
||||||
|
$api_url = config('api.url');
|
||||||
|
$customer_info = Http::get($api_url . '/admin/Customers/' . $id)->json();
|
||||||
|
// $auth_user = Auth::user();
|
||||||
|
// dd($customer_info);
|
||||||
|
|
||||||
|
return view('pelanggan.detailssag', ['customer' => $customer_info,'kodcaw' => $request->query('kodcaw'),'norujukan' => $request->query('norujukan'),
|
||||||
|
]);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -9,7 +9,7 @@ use Illuminate\Support\Facades\App;
|
|||||||
use Illuminate\Support\Facades\Http;
|
use Illuminate\Support\Facades\Http;
|
||||||
use Maatwebsite\Excel\Facades\Excel;
|
use Maatwebsite\Excel\Facades\Excel;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
use App\Exports\LaporanKeseluruhan\AgingAllExportExcel;
|
use App\Exports\LaporanKeseluruhan\AgingTebusAllExportExcel;
|
||||||
|
|
||||||
class AgingController extends Controller
|
class AgingController extends Controller
|
||||||
{
|
{
|
||||||
@@ -81,4 +81,77 @@ class AgingController extends Controller
|
|||||||
}
|
}
|
||||||
return view('reports.aging.index', compact('aging', 'endDate'));
|
return view('reports.aging.index', compact('aging', 'endDate'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function agingtebus(Request $request)
|
||||||
|
{
|
||||||
|
$current = new Carbon();
|
||||||
|
$request->hostname = config('api.url');
|
||||||
|
// dd($request->hostname );
|
||||||
|
$kod_cawangan = $request->kod_cawangan;
|
||||||
|
$action = $request->input('action', 'search');
|
||||||
|
// dd($action);
|
||||||
|
|
||||||
|
$getReportDate = function ($date_string) use ($current) {
|
||||||
|
if ($date_string == null) {
|
||||||
|
return $current->toDateString();
|
||||||
|
}
|
||||||
|
|
||||||
|
return $date_string;
|
||||||
|
};
|
||||||
|
|
||||||
|
$request->hostname = config('api.url');
|
||||||
|
|
||||||
|
$startDate = $getReportDate($request->startDate);
|
||||||
|
|
||||||
|
$endDate = $getReportDate($request->endDate);
|
||||||
|
|
||||||
|
$aging = Http::get($request->hostname . '/api/reports/agingtebus', [
|
||||||
|
'startDate' => $startDate,
|
||||||
|
'endDate' => $endDate,
|
||||||
|
])->json();
|
||||||
|
|
||||||
|
$aging = $aging ?? [];
|
||||||
|
|
||||||
|
if ($action === 'excel') {
|
||||||
|
$file_title = sprintf("LaporanAging(%s).xlsx", $kod_cawangan, $startDate, $endDate);
|
||||||
|
return Excel::download(new AgingTebusAllExportExcel($aging,$startDate,$endDate), $file_title);
|
||||||
|
}
|
||||||
|
|
||||||
|
return view('reports.agingtebus.index', compact('aging', 'startDate', 'endDate'));
|
||||||
|
}
|
||||||
|
public function showagingtebus(Request $request)
|
||||||
|
{
|
||||||
|
$current = Carbon::now();
|
||||||
|
$action = $request->input('action', 'search');
|
||||||
|
|
||||||
|
$getReportDate = function ($date_string) use ($current) {
|
||||||
|
return $date_string ? $date_string : $current->toDateString();
|
||||||
|
};
|
||||||
|
|
||||||
|
$hostname = config('api.url');
|
||||||
|
|
||||||
|
$startDate = $getReportDate($request->startDate);
|
||||||
|
$endDate = $getReportDate($request->endDate);
|
||||||
|
|
||||||
|
$response = Http::get("$hostname/api/reports/agingtebus", [
|
||||||
|
'startDate' => $startDate,
|
||||||
|
'endDate' => $endDate,
|
||||||
|
]);
|
||||||
|
|
||||||
|
$aging = $response->json() ?? []; // Ensure it's an array
|
||||||
|
|
||||||
|
// Debugging: Check the response before using it
|
||||||
|
if (empty($aging)) {
|
||||||
|
return back()->with('error', 'Failed to fetch data from API.');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($action === 'excel') {
|
||||||
|
// Ensure $kod_cawangan is defined (Modify as per your data structure)
|
||||||
|
$kod_cawangan = $request->input('kod_cawangan', 'DEFAULT');
|
||||||
|
|
||||||
|
$file_title = sprintf("LaporanAgingTebus(%s).xlsx", $kod_cawangan, $startDate, $endDate);
|
||||||
|
return Excel::download(new AgingTebusAllExportExcel($aging, $startDate, $endDate), $file_title);
|
||||||
|
}
|
||||||
|
return view('reports.agingtebus.index', compact('aging', 'startDate', 'endDate'));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ use Maatwebsite\Excel\Facades\Excel;
|
|||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
use App\Exports\LaporanKeseluruhan\PelangganbaruAllExportExcel;
|
use App\Exports\LaporanKeseluruhan\PelangganbaruAllExportExcel;
|
||||||
use App\Exports\LaporanKeseluruhan\PelangganaktifAllExportExcel;
|
use App\Exports\LaporanKeseluruhan\PelangganaktifAllExportExcel;
|
||||||
|
use App\Exports\DataPelangganDetailExport;
|
||||||
|
use App\Exports\DataPelangganBycawDetailExport;
|
||||||
|
|
||||||
class AnalisaController extends Controller
|
class AnalisaController extends Controller
|
||||||
{
|
{
|
||||||
@@ -90,5 +92,114 @@ class AnalisaController extends Controller
|
|||||||
return view('reports.pelangganaktif.index', compact('pelangganaktif', 'startDate', 'endDate'));
|
return view('reports.pelangganaktif.index', compact('pelangganaktif', 'startDate', 'endDate'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function dataPelanggan(Request $request)
|
||||||
|
{
|
||||||
|
$request->hostname = config('api.url');
|
||||||
|
$current = new Carbon();
|
||||||
|
|
||||||
|
$month = $request->filled('month') ? $request->month : $current->month;
|
||||||
|
$year = $request->filled('year') ? $request->year : $current->year;
|
||||||
|
|
||||||
|
return view('reports.data-pelanggan.index', compact('month', 'year'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function dataPelangganShow(Request $request)
|
||||||
|
{
|
||||||
|
$validated = $request->validate([
|
||||||
|
'year' => 'required|digits:4'
|
||||||
|
]);
|
||||||
|
|
||||||
|
$year = $validated['year'];
|
||||||
|
$tarikh_cetak = now()->format('d/m/Y');
|
||||||
|
$tebus_date = 'Tahun ' . $year;
|
||||||
|
|
||||||
|
$request->hostname = config('api.url');
|
||||||
|
|
||||||
|
$response = Http::get($request->hostname . '/api/reports/data-pelanggan', [
|
||||||
|
'year' => $year,
|
||||||
|
])->json();
|
||||||
|
|
||||||
|
$summary = $response['summary'];
|
||||||
|
$pelanggan = $response['pelanggan'];
|
||||||
|
|
||||||
|
if ($request->generateType === 'pdf') {
|
||||||
|
return view(
|
||||||
|
'reports.data-pelanggan.show',
|
||||||
|
compact('summary','pelanggan','tarikh_cetak','tebus_date','year')
|
||||||
|
);
|
||||||
|
}
|
||||||
|
elseif ($request->generateType === 'excel') {
|
||||||
|
return Excel::download(
|
||||||
|
new DataPelangganDetailExport($pelanggan, $year),
|
||||||
|
"Laporan-Data-Pelanggan-{$year}.xlsx"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function dataPelangganBycaw(Request $request)
|
||||||
|
{
|
||||||
|
$request->hostname = config('api.url');
|
||||||
|
$current = new Carbon();
|
||||||
|
|
||||||
|
$month = $request->filled('month') ? $request->month : $current->month;
|
||||||
|
$year = $request->filled('year') ? $request->year : $current->year;
|
||||||
|
|
||||||
|
return view('reports.data-pelanggan-bycaw.index', compact('month', 'year'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function dataPelangganBycawShow(Request $request)
|
||||||
|
{
|
||||||
|
$validated = $request->validate([
|
||||||
|
'year' => 'required|digits:4',
|
||||||
|
'cawangan' => 'required|array|min:1'
|
||||||
|
]);
|
||||||
|
|
||||||
|
$year = $validated['year'];
|
||||||
|
$cawangan = $validated['cawangan']; // array kod cawangan
|
||||||
|
|
||||||
|
$tarikh_cetak = now()->format('d/m/Y');
|
||||||
|
$tebus_date = 'Tahun ' . $year;
|
||||||
|
|
||||||
|
$request->hostname = config('api.url');
|
||||||
|
|
||||||
|
// 🔑 Forward ke API
|
||||||
|
$response = Http::get(
|
||||||
|
$request->hostname . '/api/reports/data-pelanggan-bycaw',
|
||||||
|
[
|
||||||
|
'year' => $year,
|
||||||
|
'cawangan' => $cawangan, // array terus
|
||||||
|
]
|
||||||
|
)->json();
|
||||||
|
|
||||||
|
if (!isset($response['summary'], $response['pelanggan'])) {
|
||||||
|
abort(500, 'Data API tidak sah');
|
||||||
|
}
|
||||||
|
|
||||||
|
$summary = $response['summary'];
|
||||||
|
$pelanggan = $response['pelanggan'];
|
||||||
|
|
||||||
|
if ($request->generateType === 'pdf') {
|
||||||
|
return view(
|
||||||
|
'reports.data-pelanggan-bycaw.show',
|
||||||
|
compact('summary','pelanggan','tarikh_cetak','tebus_date','year','cawangan')
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->generateType === 'excel') {
|
||||||
|
return Excel::download(
|
||||||
|
new DataPelangganBycawDetailExport($pelanggan, $year, $cawangan),
|
||||||
|
"Laporan-Data-Pelanggan-Bycaw-{$year}.xlsx"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
abort(400, 'Jenis laporan tidak sah');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,38 +25,53 @@ class StokAuditController extends Controller
|
|||||||
|
|
||||||
public function show(Request $request)
|
public function show(Request $request)
|
||||||
{
|
{
|
||||||
|
$tarikh_cetak = Carbon::now()->toDateString(); // tarikh cetak
|
||||||
|
|
||||||
|
if ($request->dateOption === 'current') {
|
||||||
|
$date = Carbon::now();
|
||||||
|
$tebus_date = $date->format('d-m-Y'); // tarikh semasa
|
||||||
|
$monthName = $date->translatedFormat('F'); // bulan semasa
|
||||||
|
} else {
|
||||||
$validated = $request->validate(
|
$validated = $request->validate(
|
||||||
['monthYear' => 'required'],
|
['monthYear' => 'required'],
|
||||||
['monthYear.required' => 'Sila isi tarikh sebelum hantar',
|
['monthYear.required' => 'Sila isi tarikh sebelum hantar',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$current = Carbon::now();
|
|
||||||
$tarikh_cetak = $current->toDateString();
|
|
||||||
$tokens = explode('-', $validated['monthYear']);
|
$tokens = explode('-', $validated['monthYear']);
|
||||||
$month = ltrim($tokens[0], '0');
|
$month = ltrim($tokens[0], '0');
|
||||||
$year = $tokens[1];
|
$year = $tokens[1];
|
||||||
|
|
||||||
// Set the locale to Malaysian
|
$date = Carbon::createFromDate($year, $month, 1); // set day = 1
|
||||||
App::setLocale('ms');
|
|
||||||
|
|
||||||
// Create a Carbon instance representing the date
|
|
||||||
$date = Carbon::createFromDate($year, $month, 1); // Set the day to 1st of the month
|
|
||||||
|
|
||||||
// Get the name of the month in Malaysian local
|
|
||||||
$monthName = $date->translatedFormat('F');
|
$monthName = $date->translatedFormat('F');
|
||||||
|
$tebus_date = $monthName . ' ' . $year;
|
||||||
|
}
|
||||||
|
|
||||||
|
$month = $date->month;
|
||||||
|
$year = $date->year;
|
||||||
|
|
||||||
$request->hostname = config('api.url');
|
$request->hostname = config('api.url');
|
||||||
|
|
||||||
$stokAudit = Http::get($request->hostname . '/api/reports/stok-audit', [
|
$stokAudit = Http::get($request->hostname . '/api/reports/stok-audit', [
|
||||||
'month' => $month,
|
'month' => $month,
|
||||||
'year' => $year,
|
'year' => $year,
|
||||||
|
'dateOption' => $request->dateOption
|
||||||
])->json();
|
])->json();
|
||||||
|
|
||||||
$tebus_date = $monthName . ' ' . $year;
|
$file_title = sprintf(
|
||||||
$file_title = sprintf("Laporan-StokAudit %s (%s - %s).xlsx", 'Semua cawangan', $monthName, $year);
|
"Laporan-StokAudit %s (%s).xlsx",
|
||||||
|
'Semua cawangan',
|
||||||
|
$tebus_date
|
||||||
|
);
|
||||||
|
|
||||||
if ($request->generateType === 'pdf') {
|
if ($request->generateType === 'pdf') {
|
||||||
return view('reports.stok-audit.show', compact('tebus_date', 'tarikh_cetak', 'stokAudit', 'month', 'year'));
|
return view('reports.stok-audit.show', compact(
|
||||||
|
'stokAudit',
|
||||||
|
'month',
|
||||||
|
'year',
|
||||||
|
'monthName',
|
||||||
|
'tarikh_cetak',
|
||||||
|
'tebus_date'
|
||||||
|
));
|
||||||
} else {
|
} else {
|
||||||
return Excel::download(new StokAuditExport($stokAudit), $file_title);
|
return Excel::download(new StokAuditExport($stokAudit), $file_title);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Models\User;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
use Illuminate\Support\Facades\Session;
|
use Illuminate\Support\Facades\Session;
|
||||||
@@ -17,7 +18,7 @@ class ResitController extends Controller
|
|||||||
|
|
||||||
public function resit($id)
|
public function resit($id)
|
||||||
{
|
{
|
||||||
|
$auth_user = Auth::user();
|
||||||
$totaltransaction = 0;
|
$totaltransaction = 0;
|
||||||
|
|
||||||
$transaction = Http::get(config('api.url') . '/api/transaction/id/'. $id)->json();
|
$transaction = Http::get(config('api.url') . '/api/transaction/id/'. $id)->json();
|
||||||
@@ -32,7 +33,16 @@ class ResitController extends Controller
|
|||||||
|
|
||||||
$customers_info = Http::get(config('api.url') . '/api/customers/'. $gadai['nokp'])->json();
|
$customers_info = Http::get(config('api.url') . '/api/customers/'. $gadai['nokp'])->json();
|
||||||
|
|
||||||
return view('resit.resitansuran',compact('transaction','gadai','customers_info'));
|
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/' . $gadai['kodcaw'])->json();
|
||||||
|
|
||||||
|
$wakil = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/getwakil/' . $auth_user['cawangan'] . '/code/' . $transaction['nowakil'])->json();
|
||||||
|
|
||||||
|
if($gadai['tagbaru'] == 1){
|
||||||
|
return view('resit.resitansuran_ujrah',compact('transaction','gadai','customers_info','cawangan_info','wakil'));
|
||||||
|
|
||||||
|
}else{
|
||||||
|
return view('resit.resitansuran',compact('transaction','gadai','customers_info','cawangan_info','wakil'));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function resittebusseparuh($id)
|
public function resittebusseparuh($id)
|
||||||
@@ -114,7 +124,7 @@ class ResitController extends Controller
|
|||||||
|
|
||||||
public function resittebus($id)
|
public function resittebus($id)
|
||||||
{
|
{
|
||||||
|
$auth_user = Auth::user();
|
||||||
$gadai = Http::get(config('api.url') . '/api/gadai/norujukan/'. $id)->json();
|
$gadai = Http::get(config('api.url') . '/api/gadai/norujukan/'. $id)->json();
|
||||||
|
|
||||||
if(sizeof($gadai) != 0)
|
if(sizeof($gadai) != 0)
|
||||||
@@ -126,6 +136,8 @@ class ResitController extends Controller
|
|||||||
|
|
||||||
$transaction = Http::get(config('api.url') . '/api/transaction/'. $id)->json();
|
$transaction = Http::get(config('api.url') . '/api/transaction/'. $id)->json();
|
||||||
|
|
||||||
|
$transaction_tebus = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/transaction/one/'. $id)->json();
|
||||||
|
|
||||||
foreach($transaction as $trans)
|
foreach($transaction as $trans)
|
||||||
{
|
{
|
||||||
$totaltransaction += $trans['duit_masuk'];
|
$totaltransaction += $trans['duit_masuk'];
|
||||||
@@ -142,10 +154,25 @@ class ResitController extends Controller
|
|||||||
|
|
||||||
$totalBayaranAnsuran = Http::get(config('api.url') . '/api/transaction/norujukan/total/ansuran',['norujukan'=>$id])->json();
|
$totalBayaranAnsuran = Http::get(config('api.url') . '/api/transaction/norujukan/total/ansuran',['norujukan'=>$id])->json();
|
||||||
|
|
||||||
if(sizeof($wakil) != 0)
|
// $totalrebate = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/reports/totalrebate',['norujukan'=>$id])->json();
|
||||||
$wakil = $wakil[0];
|
|
||||||
|
|
||||||
return view('resit.resittebus',compact('transaction','gadai','cawangan_info','customers_info','penebusan','wakil','totaltransaction','totalBayaranAnsuran'));
|
$surat_wakil = [];
|
||||||
|
if(sizeof($wakil) != 0) {
|
||||||
|
$wakil = $wakil[0];
|
||||||
|
$surat_wakil = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/getsuratwakil/' . $auth_user['cawangan'] . '/' . $id)->json();
|
||||||
|
}
|
||||||
|
|
||||||
|
$transaction_tebus = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/transaction/one/'. $id)->json();
|
||||||
|
$totalrebate = ['ujrah' => ($transaction_tebus['ujrah'] - $transaction_tebus['ujrah_rebet']), 'onepercent' => ($transaction_tebus['onepercent'] - $transaction_tebus['onepercent_rebet'])];
|
||||||
|
|
||||||
|
$khazanah_user = User::where('role_harian', 'khazanah')->where('cawangan', $auth_user['cawangan'])->select('name')->first();
|
||||||
|
|
||||||
|
if($gadai['tagbaru'] == 1){
|
||||||
|
return view('resit.resittebus_ujrah',compact('transaction','transaction_tebus','totalrebate','khazanah_user','gadai','cawangan_info','customers_info','penebusan','wakil','totaltransaction','totalBayaranAnsuran'));
|
||||||
|
|
||||||
|
}else{
|
||||||
|
return view('resit.resittebus',compact('transaction','transaction_tebus','totalrebate','khazanah_user','gadai','cawangan_info','customers_info','penebusan','wakil','totaltransaction','totalBayaranAnsuran'));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function resitbelumtebus($id)
|
public function resitbelumtebus($id)
|
||||||
|
|||||||
@@ -0,0 +1,115 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Carbon\Carbon;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\Http;
|
||||||
|
use Maatwebsite\Excel\Facades\Excel;
|
||||||
|
use App\Exports\GadaianDetailExport;
|
||||||
|
|
||||||
|
class SaringanGadaianController extends Controller
|
||||||
|
{
|
||||||
|
|
||||||
|
public function index(Request $request)
|
||||||
|
{
|
||||||
|
$current = Carbon::now();
|
||||||
|
|
||||||
|
$getReportDate = function ($date_string) use ($current) {
|
||||||
|
return $date_string ? $date_string : $current->toDateString();
|
||||||
|
};
|
||||||
|
|
||||||
|
$request->hostname = config('api.url');
|
||||||
|
|
||||||
|
$startDate = $getReportDate($request->startDate);
|
||||||
|
$endDate = $getReportDate($request->endDate);
|
||||||
|
|
||||||
|
|
||||||
|
$gadaian = Http::get($request->hostname . '/api/reports/saringan/gadaian', [
|
||||||
|
'startDate' => $startDate,
|
||||||
|
'endDate' => $endDate,
|
||||||
|
])->json();
|
||||||
|
|
||||||
|
return view('reports.saringan-gadaian.index', compact('gadaian', 'startDate', 'endDate'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function exportExcel(Request $request, $kodcaw)
|
||||||
|
{
|
||||||
|
return Excel::download(
|
||||||
|
new GadaianDetailExport(
|
||||||
|
$kodcaw,
|
||||||
|
$request->startDate,
|
||||||
|
$request->endDate
|
||||||
|
),
|
||||||
|
"Saringan_Gadaian_{$kodcaw}.xlsx"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for creating a new resource.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function create()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Store a newly created resource in storage.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function store(Request $request)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display the specified resource.
|
||||||
|
*
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function show($id)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for editing the specified resource.
|
||||||
|
*
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function edit($id)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the specified resource in storage.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function update(Request $request, $id)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove the specified resource from storage.
|
||||||
|
*
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function destroy($id)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,105 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Carbon\Carbon;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\Http;
|
||||||
|
use Maatwebsite\Excel\Facades\Excel;
|
||||||
|
use App\Exports\GadaianDetailExport;
|
||||||
|
|
||||||
|
class StatistikController extends Controller
|
||||||
|
{
|
||||||
|
|
||||||
|
public function index(Request $request)
|
||||||
|
{
|
||||||
|
$current = Carbon::now();
|
||||||
|
|
||||||
|
$getReportDate = function ($date_string) use ($current) {
|
||||||
|
return $date_string ? $date_string : $current->toDateString();
|
||||||
|
};
|
||||||
|
|
||||||
|
$request->hostname = config('api.url');
|
||||||
|
|
||||||
|
$startDate = $getReportDate($request->startDate);
|
||||||
|
$endDate = $getReportDate($request->endDate);
|
||||||
|
|
||||||
|
|
||||||
|
$gadaian = Http::get($request->hostname . '/api/statistik', [
|
||||||
|
'startDate' => $startDate,
|
||||||
|
'endDate' => $endDate,
|
||||||
|
])->json();
|
||||||
|
dd($gadaian);
|
||||||
|
|
||||||
|
return view('akaun.laporan_gadaian', compact('gadaian', 'startDate', 'endDate'));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for creating a new resource.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function create()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Store a newly created resource in storage.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function store(Request $request)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display the specified resource.
|
||||||
|
*
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function show($id)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for editing the specified resource.
|
||||||
|
*
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function edit($id)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the specified resource in storage.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function update(Request $request, $id)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove the specified resource from storage.
|
||||||
|
*
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function destroy($id)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
use Illuminate\Support\Facades\Session;
|
use Illuminate\Support\Facades\Session;
|
||||||
@@ -10,7 +9,8 @@ use Illuminate\Support\Facades\Http;
|
|||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
|
|
||||||
use PDF;
|
use PDF;
|
||||||
use Maatwebsite\Excel\Excel;
|
use Maatwebsite\Excel\Facades\Excel;
|
||||||
|
use App\Exports\WTDDetailExport;
|
||||||
|
|
||||||
class WTDController extends Controller
|
class WTDController extends Controller
|
||||||
{
|
{
|
||||||
@@ -19,8 +19,8 @@ class WTDController extends Controller
|
|||||||
// $this->middleware('auth');
|
// $this->middleware('auth');
|
||||||
// }
|
// }
|
||||||
|
|
||||||
public function index(){
|
public function index()
|
||||||
|
{
|
||||||
return view('wtd.index');
|
return view('wtd.index');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -43,10 +43,8 @@ class WTDController extends Controller
|
|||||||
// $myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_cetak);
|
// $myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_cetak);
|
||||||
// $tarikhcetakan = $myDateTime->format('d-m-Y');
|
// $tarikhcetakan = $myDateTime->format('d-m-Y');
|
||||||
|
|
||||||
if(isset($request->jenis))
|
if (isset($request->jenis)) {
|
||||||
{
|
if ($request->jenis == 'pdf') {
|
||||||
if($request->jenis == 'pdf')
|
|
||||||
{
|
|
||||||
$pdf = PDF::loadView('wtd.cetakan', compact('tuntutbaki', 'cawangan_detail', 'tarikh_cetak', 'api_url', 'mula', 'hingga'))->setPaper('a4', 'potrait');
|
$pdf = PDF::loadView('wtd.cetakan', compact('tuntutbaki', 'cawangan_detail', 'tarikh_cetak', 'api_url', 'mula', 'hingga'))->setPaper('a4', 'potrait');
|
||||||
return $pdf->download('wtd_' . $request->cawangan . '_' . $tarikh_cetak . '.pdf');
|
return $pdf->download('wtd_' . $request->cawangan . '_' . $tarikh_cetak . '.pdf');
|
||||||
} else {
|
} else {
|
||||||
@@ -65,10 +63,8 @@ class WTDController extends Controller
|
|||||||
$cawangan_detail = $cawangan[0];
|
$cawangan_detail = $cawangan[0];
|
||||||
|
|
||||||
$wtdDalamProses = Http::get(config('api.url') . '/admin/wtd/dalamproses', ['batchno' => $request->batchno, 'kodcaw' => $request->cawangan])->json();
|
$wtdDalamProses = Http::get(config('api.url') . '/admin/wtd/dalamproses', ['batchno' => $request->batchno, 'kodcaw' => $request->cawangan])->json();
|
||||||
if(isset($request->jenis))
|
if (isset($request->jenis)) {
|
||||||
{
|
if ($request->jenis == 'pdf') {
|
||||||
if($request->jenis == 'pdf')
|
|
||||||
{
|
|
||||||
$pdf = PDF::loadView('wtd.dalamprosespdf', compact('tarikh_cetak', 'cawangan_detail', 'wtdDalamProses', 'api_url'))->setPaper('a4', 'landscape');
|
$pdf = PDF::loadView('wtd.dalamprosespdf', compact('tarikh_cetak', 'cawangan_detail', 'wtdDalamProses', 'api_url'))->setPaper('a4', 'landscape');
|
||||||
return $pdf->download('wtd_' . $request->cawangan . '_' . $tarikh_cetak . '.pdf');
|
return $pdf->download('wtd_' . $request->cawangan . '_' . $tarikh_cetak . '.pdf');
|
||||||
} else {
|
} else {
|
||||||
@@ -78,4 +74,181 @@ class WTDController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function janaSimulasi(Request $request)
|
||||||
|
{
|
||||||
|
$cawangan = Http::get(config('api.url') . '/api/cawangan/')->json();
|
||||||
|
|
||||||
|
return view('wtd.simulasi.janaSimulasi', compact('cawangan'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function showSimulasi(Request $request)
|
||||||
|
{
|
||||||
|
$request->validate([
|
||||||
|
'kodcaw' => 'required',
|
||||||
|
'tahun' => 'required',
|
||||||
|
], [
|
||||||
|
'kodcaw.required' => 'Sila Pilih Cawangan Terlebih Dahulu.',
|
||||||
|
'tahun.required' => 'Sila Masukkan Tahun Terlebih Dahulu.',
|
||||||
|
]);
|
||||||
|
|
||||||
|
$senaraiSimulasi = Http::get(config('api.url') . '/admin/wtd/janaSimulasi', ['kodcaw' => $request->kodcaw, 'tahun' => $request->tahun])->json();
|
||||||
|
|
||||||
|
$year = $request->tahun;
|
||||||
|
|
||||||
|
// dd($senaraiSimulasi, $request->kodcaw, $request->tahun);
|
||||||
|
|
||||||
|
return view('wtd.simulasi.show', compact('senaraiSimulasi', 'year'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function showRekod(Request $request)
|
||||||
|
{
|
||||||
|
$bulan = $request->input('month');
|
||||||
|
$bulanNumber = date('n', strtotime($bulan));
|
||||||
|
|
||||||
|
$rekod = Http::get(config('api.url') . '/admin/wtd/rekodSimulasi', ['kodcaw' => $request->kodcaw, 'month' => $bulanNumber, 'year' => $request->year])->json();
|
||||||
|
|
||||||
|
$totalBaki = collect($rekod)->sum('baki');
|
||||||
|
|
||||||
|
// dd($rekod, $bulanNumber, $totalBaki, $bulan);
|
||||||
|
|
||||||
|
return view('wtd.simulasi.rekod', compact('bulan', 'rekod', 'totalBaki'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function prosesWTD(Request $request)
|
||||||
|
{
|
||||||
|
// dd($request->input());
|
||||||
|
$request->validate([
|
||||||
|
'data.*.bulan' => 'required|string',
|
||||||
|
'data.*.jumlah_norujukan' => 'required|numeric',
|
||||||
|
'data.*.pembiayaan' => 'required|numeric',
|
||||||
|
'data.*.baki' => 'required|numeric',
|
||||||
|
'data.*.selected' => 'nullable',
|
||||||
|
]);
|
||||||
|
|
||||||
|
// Process the selected data
|
||||||
|
$data = $request->input('data', []);
|
||||||
|
$insertedRecords = [];
|
||||||
|
$kodcaw = $request->data[0]['kodcaw'];
|
||||||
|
|
||||||
|
foreach ($data as $item) {
|
||||||
|
if (isset($item['selected'])) {
|
||||||
|
$insertedRecords[] = [
|
||||||
|
'bulan' => $item['bulan'],
|
||||||
|
'tahun' => $request->tahun,
|
||||||
|
'kodcaw' => $kodcaw,
|
||||||
|
'jumlah_sag' => $item['jumlah_norujukan'],
|
||||||
|
'pembiayaan' => $item['pembiayaan'],
|
||||||
|
'baki' => $item['baki'],
|
||||||
|
'created_at' => now(),
|
||||||
|
'updated_at' => now(),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$response = Http::post(config('api.url') . '/admin/wtd/prosesSimulasi', [
|
||||||
|
'input' => $insertedRecords
|
||||||
|
])->json();
|
||||||
|
|
||||||
|
// dd($data, $insertedRecords, $kodcaw, $response);
|
||||||
|
|
||||||
|
return view('wtd.simulasi.pengesahan', compact('insertedRecords', 'response', 'kodcaw'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function pengesahanSimulasi(Request $request)
|
||||||
|
{
|
||||||
|
$response = Http::post(config('api.url') . '/admin/wtd/pengesahanSimulasi', [
|
||||||
|
'records' => $request->records,
|
||||||
|
'kodcaw' => $request->kodcaw,
|
||||||
|
])->json();
|
||||||
|
|
||||||
|
return view('wtd.index');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function serahbaki()
|
||||||
|
{
|
||||||
|
return view('wtd.simulasi.serahbaki');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function simulasiToDraft(Request $request)
|
||||||
|
{
|
||||||
|
$response = Http::post(config('api.url') . '/admin/wtd/simulasiToDraft', [
|
||||||
|
'bulan' => $request->bulan,
|
||||||
|
|
||||||
|
])->json();
|
||||||
|
|
||||||
|
dd($response);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function summaryWtd(Request $request)
|
||||||
|
{
|
||||||
|
$current = Carbon::now();
|
||||||
|
|
||||||
|
$getReportDate = function ($date_string) use ($current) {
|
||||||
|
return $date_string ? $date_string : $current->toDateString();
|
||||||
|
};
|
||||||
|
|
||||||
|
$request->hostname = config('api.url');
|
||||||
|
|
||||||
|
$startDate = $getReportDate($request->startDate);
|
||||||
|
$endDate = $getReportDate($request->endDate);
|
||||||
|
|
||||||
|
// $summarywtd = Http::get($request->hostname . '/admin/wtd/summaryWtd', [
|
||||||
|
// 'startDate' => $startDate,
|
||||||
|
// 'endDate' => $endDate,
|
||||||
|
// ])->effectiveUri()->__toString();
|
||||||
|
|
||||||
|
$summarywtd = Http::get($request->hostname . '/admin/wtd/summaryWtd', [
|
||||||
|
'startDate' => $startDate,
|
||||||
|
'endDate' => $endDate,
|
||||||
|
])->json();
|
||||||
|
|
||||||
|
|
||||||
|
if (!is_array($summarywtd)) {
|
||||||
|
$summarywtd = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
return view('reports.wtd.index', compact('summarywtd', 'startDate', 'endDate'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function exportExcel(Request $request, $kodcaw)
|
||||||
|
{
|
||||||
|
return Excel::download(
|
||||||
|
new WTDDetailExport(
|
||||||
|
$kodcaw,
|
||||||
|
$request->startDate,
|
||||||
|
$request->endDate
|
||||||
|
),"Detail_Laporan_WTD_{$kodcaw}.xlsx");
|
||||||
|
}
|
||||||
|
|
||||||
|
public function home()
|
||||||
|
{
|
||||||
|
return view('wtd.debug.home');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function trail(Request $request)
|
||||||
|
{
|
||||||
|
$current = Carbon::now();
|
||||||
|
|
||||||
|
$getReportDate = function ($date_string) use ($current) {
|
||||||
|
return $date_string ? $date_string : $current->toDateString();
|
||||||
|
};
|
||||||
|
|
||||||
|
$request->hostname = config('api.url');
|
||||||
|
|
||||||
|
$startDate = $getReportDate($request->startDate);
|
||||||
|
$endDate = $getReportDate($request->endDate);
|
||||||
|
|
||||||
|
$debugwtd = Http::get($request->hostname . '/admin/wtd/debugWtd', [
|
||||||
|
'startDate' => $startDate,
|
||||||
|
'endDate' => $endDate,
|
||||||
|
])->json();
|
||||||
|
|
||||||
|
|
||||||
|
if (!is_array($debugwtd)) {
|
||||||
|
$debugwtd = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
return view('wtd.debug.index', compact('debugwtd', 'startDate', 'endDate'));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -277,10 +277,12 @@ class ImbangdugaServices
|
|||||||
{
|
{
|
||||||
if($variable !== 'recno' && $variable !== 'kodcaw' && $variable !== 'tarikh' && $variable !== 'totalharta' && $variable !== 'totaltanggungan' && $variable !== 'tagtally' && $variable !== 'created_at' && $variable !== 'updated_at'){
|
if($variable !== 'recno' && $variable !== 'kodcaw' && $variable !== 'tarikh' && $variable !== 'totalharta' && $variable !== 'totaltanggungan' && $variable !== 'tagtally' && $variable !== 'created_at' && $variable !== 'updated_at'){
|
||||||
if($variable == 'bakilelong'){
|
if($variable == 'bakilelong'){
|
||||||
$imbangdugadata = ImbangDuga::orderBy('glcode')->where([['single_var',$variable],['variable',$variable]])->first()->toArray();
|
$imbangdugaRow = ImbangDuga::orderBy('glcode')->where([['single_var',$variable],['variable',$variable]])->first();
|
||||||
}else{
|
}else{
|
||||||
$imbangdugadata = ImbangDuga::orderBy('glcode')->where('variable',$variable)->orWhere('single_var',$variable)->first()->toArray();
|
$imbangdugaRow = ImbangDuga::orderBy('glcode')->where('variable',$variable)->orWhere('single_var',$variable)->first();
|
||||||
}
|
}
|
||||||
|
if(!$imbangdugaRow) continue;
|
||||||
|
$imbangdugadata = $imbangdugaRow->toArray();
|
||||||
if($imbangdugadata['jenis'] == 'harta'){
|
if($imbangdugadata['jenis'] == 'harta'){
|
||||||
array_push($array_harta,['glcode' => $imbangdugadata['glcode'],'descpt' => $imbangdugadata['descpt'],'amaun' => $res]);
|
array_push($array_harta,['glcode' => $imbangdugadata['glcode'],'descpt' => $imbangdugadata['descpt'],'amaun' => $res]);
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\View\Components;
|
||||||
|
|
||||||
|
use Illuminate\View\Component;
|
||||||
|
|
||||||
|
class JanaSimulasi extends Component
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Create a new component instance.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the view / contents that represent the component.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Contracts\View\View|\Closure|string
|
||||||
|
*/
|
||||||
|
public function render()
|
||||||
|
{
|
||||||
|
return view('components.jana-simulasi');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\View\Components;
|
||||||
|
|
||||||
|
use Illuminate\View\Component;
|
||||||
|
|
||||||
|
class SenaraiSimulasi extends Component
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Create a new component instance.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the view / contents that represent the component.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Contracts\View\View|\Closure|string
|
||||||
|
*/
|
||||||
|
public function render()
|
||||||
|
{
|
||||||
|
return view('components.senarai-simulasi');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,153 @@
|
|||||||
|
/*!
|
||||||
|
* Bootstrap v4.6.2 (https://getbootstrap.com/)
|
||||||
|
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||||
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* ApexCharts v3.35.4
|
||||||
|
* (c) 2018-2022 ApexCharts
|
||||||
|
* Released under the MIT License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* Pusher JavaScript Library v5.1.1
|
||||||
|
* https://pusher.com/
|
||||||
|
*
|
||||||
|
* Copyright 2017, Pusher
|
||||||
|
* Released under the MIT licence.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* Pusher JavaScript Library v7.3.0
|
||||||
|
* https://pusher.com/
|
||||||
|
*
|
||||||
|
* Copyright 2020, Pusher
|
||||||
|
* Released under the MIT licence.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* Sizzle CSS Selector Engine v2.3.6
|
||||||
|
* https://sizzlejs.com/
|
||||||
|
*
|
||||||
|
* Copyright JS Foundation and other contributors
|
||||||
|
* Released under the MIT license
|
||||||
|
* https://js.foundation/
|
||||||
|
*
|
||||||
|
* Date: 2021-02-16
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* The buffer module from node.js, for the browser.
|
||||||
|
*
|
||||||
|
* @author Feross Aboukhadijeh <http://feross.org>
|
||||||
|
* @license MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* Vue.js v2.7.8
|
||||||
|
* (c) 2014-2022 Evan You
|
||||||
|
* Released under the MIT License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* jQuery JavaScript Library v3.6.0
|
||||||
|
* https://jquery.com/
|
||||||
|
*
|
||||||
|
* Includes Sizzle.js
|
||||||
|
* https://sizzlejs.com/
|
||||||
|
*
|
||||||
|
* Copyright OpenJS Foundation and other contributors
|
||||||
|
* Released under the MIT license
|
||||||
|
* https://jquery.org/license
|
||||||
|
*
|
||||||
|
* Date: 2021-03-02T17:08Z
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* vue-friendly-iframe v0.20.0 (https://github.com/officert/vue-friendly-iframe)
|
||||||
|
* (c) 2021 Tim Officer
|
||||||
|
* Released under the MIT License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* vuex v3.6.2
|
||||||
|
* (c) 2021 Evan You
|
||||||
|
* @license MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*! *****************************************************************************
|
||||||
|
Copyright (c) Microsoft Corporation.
|
||||||
|
|
||||||
|
Permission to use, copy, modify, and/or distribute this software for any
|
||||||
|
purpose with or without fee is hereby granted.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||||
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||||
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||||
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||||
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||||
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||||
|
PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
***************************************************************************** */
|
||||||
|
|
||||||
|
/*! *****************************************************************************
|
||||||
|
Copyright (c) Microsoft Corporation.
|
||||||
|
|
||||||
|
Permission to use, copy, modify, and/or distribute this software for any
|
||||||
|
purpose with or without fee is hereby granted.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||||
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||||
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||||
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||||
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||||
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||||
|
PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
***************************************************************************** */
|
||||||
|
|
||||||
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||||||
|
|
||||||
|
/*! svg.draggable.js - v2.2.2 - 2019-01-08
|
||||||
|
* https://github.com/svgdotjs/svg.draggable.js
|
||||||
|
* Copyright (c) 2019 Wout Fierens; Licensed MIT */
|
||||||
|
|
||||||
|
/*! svg.filter.js - v2.0.2 - 2016-02-24
|
||||||
|
* https://github.com/wout/svg.filter.js
|
||||||
|
* Copyright (c) 2016 Wout Fierens; Licensed MIT */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @license
|
||||||
|
* Lodash <https://lodash.com/>
|
||||||
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
||||||
|
* Released under MIT license <https://lodash.com/license>
|
||||||
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**!
|
||||||
|
* @fileOverview Kickass library to create and place poppers near their reference elements.
|
||||||
|
* @version 1.16.1
|
||||||
|
* @license
|
||||||
|
* Copyright (c) 2016 Federico Zivolo and contributors
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
|
* copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
* SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
//! moment.js
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"/js/app.js": "/js/app.js?id=41f31e4c4d0a3f1615de3f2a5b78988c",
|
"/js/app.js": "/js/app.js",
|
||||||
"/css/app.css": "/css/app.css?id=9cdabf7932d415c4f5598da3580b0fa1"
|
"/css/app.css": "/css/app.css"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,8 +20,7 @@
|
|||||||
<select name="year" id="year"
|
<select name="year" id="year"
|
||||||
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500">
|
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500">
|
||||||
<option selected disabled>Tahun</option>
|
<option selected disabled>Tahun</option>
|
||||||
<option value="2022">2022</option>
|
<option v-for="year in upcomingYears" :value="year" :key="year">{{ year }}</option>
|
||||||
<option value="2023">2023</option>
|
|
||||||
</select>
|
</select>
|
||||||
<div class="flex justify-center mt-10">
|
<div class="flex justify-center mt-10">
|
||||||
<button @click.prevent="generatepdf"
|
<button @click.prevent="generatepdf"
|
||||||
@@ -43,10 +42,20 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
jenisgenerate: 'none',
|
jenisgenerate: 'none',
|
||||||
kodcaw: ''
|
kodcaw: '',
|
||||||
|
upcomingYears: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
this.calculateUpcomingYears();
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
calculateUpcomingYears() {
|
||||||
|
const currentYear = new Date().getFullYear();
|
||||||
|
for (let i = 0; i <= 1; i++) {
|
||||||
|
this.upcomingYears.push(currentYear - i);
|
||||||
|
}
|
||||||
|
},
|
||||||
async generatepdf() {
|
async generatepdf() {
|
||||||
await this.setJenis('pdf');
|
await this.setJenis('pdf');
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<div class="rounded bg-white shadow p-6">
|
<div class="rounded bg-white shadow p-6">
|
||||||
<div class="pb-6">
|
<div class="pb-6">
|
||||||
<label for="username" class="font-semibold text-gray-700 block pb-1">Tarikh</label>
|
<label for="username" class="font-semibold text-gray-700 block pb-1">Tarikh</label>
|
||||||
<div class="flex">
|
<div class="flex flex-wrap mb-12">
|
||||||
<input :value="jenisgenerate" type="hidden" name="jenis" />
|
<input :value="jenisgenerate" type="hidden" name="jenis" />
|
||||||
<input :value="$kodcaw" name="kodcaw" hidden/>
|
<input :value="$kodcaw" name="kodcaw" hidden/>
|
||||||
<input :value="$hostname" name="hostname" hidden/>
|
<input :value="$hostname" name="hostname" hidden/>
|
||||||
@@ -22,6 +22,23 @@
|
|||||||
<span style="background-color: #F9FAFB" class="text-gray-600 border border-2 rounded-l px-4 py-2 whitespace-no-wrap">Hingga</span>
|
<span style="background-color: #F9FAFB" class="text-gray-600 border border-2 rounded-l px-4 py-2 whitespace-no-wrap">Hingga</span>
|
||||||
<input id="tarikhhingga" name="datehingga" @change="dateChecking()" class="border border-2 border-l-0 rounded-r px-4 py-2 w-80r mr-2" type="date"/>
|
<input id="tarikhhingga" name="datehingga" @change="dateChecking()" class="border border-2 border-l-0 rounded-r px-4 py-2 w-80r mr-2" type="date"/>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="flex justify-center mb-4">
|
||||||
|
<div class="mx-2 radio">
|
||||||
|
<input type="radio" id="arrahnpay" name="laporanansuran" value="arrahnpay" class="hidden focus:bg-gray-500" v-model="selected">
|
||||||
|
<label for="arrahnpay" class="cursor-pointer text-gray-500 focus:bg-gray-500 hover:bg-gray-200 focus:bg-purple-500 focus:bg-purple-500 focus:outline-none border px-10 py-4 border-solid border-gray-500 rounded">Arrahn Pay</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mx-2 radio cursor-pointer">
|
||||||
|
<input type="radio" id="kaunter" name="laporanansuran" value="kaunter" class="hidden focus:bg-gray-500" v-model="selected">
|
||||||
|
<label for="kaunter" class="cursor-pointer text-gray-500 focus:bg-gray-500 hover:bg-gray-200 focus:bg-purple-500 focus:outline-none border px-10 py-4 border-solid border-gray-500 rounded">Kaunter (aros)</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mx-2 radio cursor-pointer">
|
||||||
|
<input type="radio" id="all" name="laporanansuran" value="all" class="hidden focus:bg-gray-500" v-model="selected">
|
||||||
|
<label for="all" class="cursor-pointer text-gray-500 focus:bg-gray-500 hover:bg-gray-200 focus:bg-purple-500 focus:outline-none border px-10 py-4 border-solid border-gray-500 rounded">Semua</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="flex justify-end mt-10">
|
<div class="flex justify-end mt-10">
|
||||||
<button @click.prevent="generatepdf" class=" mr-2 border border-yellow-600 text-yellow-600 font-montserrat py-2 px-8 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300"><i class="fas fa-file-pdf mr-2"></i>PDF</button>
|
<button @click.prevent="generatepdf" class=" mr-2 border border-yellow-600 text-yellow-600 font-montserrat py-2 px-8 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300"><i class="fas fa-file-pdf mr-2"></i>PDF</button>
|
||||||
<button @click.prevent="generateview" class="border border-yellow-600 text-yellow-600 font-montserrat py-2 px-8 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300"><i class="fas fa-eye mr-2"></i>View</button>
|
<button @click.prevent="generateview" class="border border-yellow-600 text-yellow-600 font-montserrat py-2 px-8 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300"><i class="fas fa-eye mr-2"></i>View</button>
|
||||||
@@ -34,11 +51,21 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.radio input:checked + label{
|
||||||
|
border-color:#F6D860;
|
||||||
|
background-color:#FFF1BD;
|
||||||
|
outline:none;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
jenisgenerate: 'none',
|
jenisgenerate: 'none',
|
||||||
|
selected: '', // ini untuk radio button
|
||||||
kodcaw: ''
|
kodcaw: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -0,0 +1,189 @@
|
|||||||
|
<template>
|
||||||
|
<div class="container">
|
||||||
|
<div class="flex w-full">
|
||||||
|
<div class="xl:w-2/3 2xl:w-1/2 p-8 mx-auto">
|
||||||
|
<!-- Tajuk -->
|
||||||
|
<div class="bg-yellow-600 text-gray-200 text-lg px-6 py-4 rounded-t-lg">
|
||||||
|
<router-link to="/akaunhome">
|
||||||
|
<i class="fas fa-backspace text-white"></i>
|
||||||
|
</router-link>
|
||||||
|
<span class="text-center mx-auto text-white font-bold">
|
||||||
|
Laporan Barang Kes
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Borang laporan -->
|
||||||
|
<form method="get" id="formringter" :action="Urlredirect()" target="_blank">
|
||||||
|
<div class="rounded bg-white shadow p-6">
|
||||||
|
|
||||||
|
<!-- Pilihan Tarikh -->
|
||||||
|
<div class="pb-6">
|
||||||
|
<div class="flex justify-center mb-4">
|
||||||
|
<input :value="jenisgenerate" type="hidden" name="jenis" />
|
||||||
|
<input :value="$kodcaw" name="kodcaw" hidden />
|
||||||
|
<input :value="$hostname" name="hostname" hidden />
|
||||||
|
<input type="hidden" name="status" :value="status" /> <!-- masih simpan status -->
|
||||||
|
|
||||||
|
<span style="background-color: #F9FAFB"
|
||||||
|
class="text-gray-600 border-2 rounded-l px-4 py-2 whitespace-no-wrap">Mula</span>
|
||||||
|
<input
|
||||||
|
id="tarikhmula"
|
||||||
|
name="datemula"
|
||||||
|
class="border-2 border-l-0 rounded-r px-4 py-2 w-80r mr-2"
|
||||||
|
type="date"
|
||||||
|
min="2023-01-01"
|
||||||
|
:max="maxDate"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<span style="background-color: #F9FAFB"
|
||||||
|
class="text-gray-600 border-2 rounded-l px-4 py-2 whitespace-no-wrap">Hingga</span>
|
||||||
|
<input
|
||||||
|
id="tarikhhingga"
|
||||||
|
name="datehingga"
|
||||||
|
class="border-2 border-l-0 rounded-r px-4 py-2 w-80r mr-2"
|
||||||
|
type="date"
|
||||||
|
min="2023-01-01"
|
||||||
|
:max="maxDate"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Pilihan Status -->
|
||||||
|
<div class="flex flex-col items-center mb-6">
|
||||||
|
<!-- <label class="font-semibold text-gray-700 mb-2">Status:</label> -->
|
||||||
|
<div class="flex space-x-6">
|
||||||
|
<label class="flex items-center space-x-2">
|
||||||
|
<input
|
||||||
|
type="radio"
|
||||||
|
value="all"
|
||||||
|
v-model="status"
|
||||||
|
class="text-yellow-600 focus:ring-yellow-500"
|
||||||
|
/>
|
||||||
|
<span>Semua</span>
|
||||||
|
</label>
|
||||||
|
<label class="flex items-center space-x-2">
|
||||||
|
<input
|
||||||
|
type="radio"
|
||||||
|
value="belum-tuntut"
|
||||||
|
v-model="status"
|
||||||
|
class="text-yellow-600 focus:ring-yellow-500"
|
||||||
|
/>
|
||||||
|
<span>Belum Tuntut</span>
|
||||||
|
</label>
|
||||||
|
<label class="flex items-center space-x-2">
|
||||||
|
<input
|
||||||
|
type="radio"
|
||||||
|
value="dituntut"
|
||||||
|
v-model="status"
|
||||||
|
class="text-yellow-600 focus:ring-yellow-500"
|
||||||
|
/>
|
||||||
|
<span>Dah Tuntut</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Butang Action -->
|
||||||
|
<div class="flex justify-end mt-10">
|
||||||
|
<button
|
||||||
|
@click.prevent="generatepdf"
|
||||||
|
class="mr-2 border border-yellow-600 text-yellow-600 font-montserrat py-2 px-8 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300"
|
||||||
|
>
|
||||||
|
<i class="fas fa-file-pdf mr-2"></i>PDF
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
@click.prevent="generateview"
|
||||||
|
class="border border-yellow-600 text-yellow-600 font-montserrat py-2 px-8 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300"
|
||||||
|
>
|
||||||
|
<i class="fas fa-eye mr-2"></i>View
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { required } from 'vuelidate/lib/validators'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
jenisgenerate: 'none',
|
||||||
|
kodcaw: '',
|
||||||
|
hostname: '',
|
||||||
|
maxDate: null,
|
||||||
|
yesterday: null,
|
||||||
|
selectedalasan: '',
|
||||||
|
jenisalasan: {},
|
||||||
|
status: 'all', // default status
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.setMaxDate();
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.senaraiAlasan();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
setMaxDate() {
|
||||||
|
const today = new Date();
|
||||||
|
today.setDate(today.getDate() - 1);
|
||||||
|
this.yesterday = today.toISOString().split('T')[0];
|
||||||
|
this.maxDate = this.yesterday;
|
||||||
|
},
|
||||||
|
async generatepdf() {
|
||||||
|
await this.setJenis('pdf');
|
||||||
|
Vue.swal({
|
||||||
|
title: 'Memuatkan...',
|
||||||
|
allowEscapeKey: false,
|
||||||
|
allowOutsideClick: false,
|
||||||
|
showCancelButton: false,
|
||||||
|
showConfirmButton: false,
|
||||||
|
timer: 8000,
|
||||||
|
});
|
||||||
|
document.getElementById("formringter").submit();
|
||||||
|
},
|
||||||
|
async generateview() {
|
||||||
|
await this.setJenis('view');
|
||||||
|
Vue.swal({
|
||||||
|
title: 'Memuatkan...',
|
||||||
|
allowEscapeKey: false,
|
||||||
|
allowOutsideClick: false,
|
||||||
|
showCancelButton: false,
|
||||||
|
showConfirmButton: false,
|
||||||
|
timer: 8000,
|
||||||
|
});
|
||||||
|
document.getElementById("formringter").submit();
|
||||||
|
},
|
||||||
|
Urlredirect() {
|
||||||
|
return window.route('cetak.laporanbarangkes');
|
||||||
|
},
|
||||||
|
setJenis(value) {
|
||||||
|
this.jenisgenerate = value;
|
||||||
|
},
|
||||||
|
senaraiAlasan() {
|
||||||
|
this.axios.get(this.$hostname + '/api/lookupalasan').then(response => {
|
||||||
|
this.jenisalasan = response.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
validations: {
|
||||||
|
selectedalasan: {
|
||||||
|
required
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
select {
|
||||||
|
min-width: 180px;
|
||||||
|
}
|
||||||
|
input[type="radio"] {
|
||||||
|
accent-color: #eab308; /* warna kuning */
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
+98
-184
@@ -1,200 +1,114 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mx-auto content-center flex justify-center items-center">
|
<div class="container mx-auto">
|
||||||
|
|
||||||
<div class="grid grid-rows-1">
|
<div class="flex items-center mb-6">
|
||||||
<div class="grid grid-cols-3 gap-1 mx-auto">
|
<button
|
||||||
|
id="toggle-search"
|
||||||
|
class="btn btn-outline-secondary mr-2"
|
||||||
|
type="button"
|
||||||
|
@click="toggleSearch">
|
||||||
|
<i class="fa fa-search"></i>
|
||||||
|
</button>
|
||||||
|
|
||||||
<div class="bg-white shadow border border-solid px-6 py-4 rounded-lg hover:bg-yellow-300 hover:transition-all mb-2 cursor-pointer">
|
<input
|
||||||
<!-- <router-link to="/akaunhome/imbangduga/extended"> -->
|
v-show="showSearch"
|
||||||
<router-link to="/akaunhome/imbangduga/akru">
|
v-model="searchQuery"
|
||||||
<img src="/img/balance-sheet.png" class="h-20 w-20 mx-auto" alt="Windster Logo">
|
type="text"
|
||||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Imbang Duga Akru</h2>
|
id="search-laporan"
|
||||||
</router-link>
|
class="form-control transition-all duration-300"
|
||||||
</div>
|
style="width: 300px; height: 38px;"
|
||||||
|
placeholder="Cari laporan apa ya?"/>
|
||||||
<div class="bg-white shadow border border-solid px-6 py-4 rounded-lg hover:bg-yellow-300 hover:transition-all mb-2 cursor-pointer">
|
|
||||||
<router-link to="/akaunhome/lejeram">
|
|
||||||
<img src="/img/ledger.png" class="h-20 w-20 mx-auto" alt="Windster Logo">
|
|
||||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Lejer Am</h2>
|
|
||||||
</router-link>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="bg-white shadow border border-solid px-6 py-4 rounded-lg hover:bg-yellow-300 hover:transition-all mb-2 cursor-pointer">
|
|
||||||
<router-link to="/akaunhome/kawalanstok">
|
|
||||||
<img src="/img/kawalanstok.png" class="h-20 w-30 mx-auto" alt="Windster Logo">
|
|
||||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Kawalan Stok</h2>
|
|
||||||
</router-link>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="bg-white shadow border border-solid px-6 py-4 rounded-lg hover:bg-yellow-300 hover:transition-all mb-2 cursor-pointer">
|
|
||||||
<router-link to="/akaunhome/stokaudit">
|
|
||||||
<img src="/img/audit.png" class="h-20 w-20 mx-auto" alt="Windster Logo">
|
|
||||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Stok Audit</h2>
|
|
||||||
</router-link>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="bg-white shadow border border-solid px-6 py-4 rounded-lg hover:bg-yellow-300 hover:transition-all mb-2 cursor-pointer">
|
|
||||||
<router-link to="/akaunhome/stokauditCombine">
|
|
||||||
<img src="/img/audit.png" class="h-20 w-20 mx-auto" alt="Windster Logo">
|
|
||||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Stok Audit Combine</h2>
|
|
||||||
</router-link>
|
|
||||||
</div>
|
|
||||||
<div class="bg-white shadow border border-solid px-6 py-4 rounded-lg hover:bg-yellow-300 hover:transition-all mb-2 cursor-pointer">
|
|
||||||
<router-link to="/akaunhome/auditTrail">
|
|
||||||
<img src="/img/audittrail.png" class="h-20 w-20 mx-auto" alt="Windster Logo">
|
|
||||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Audit Trail</h2>
|
|
||||||
</router-link>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
<div class="grid grid-cols-3 gap-3">
|
||||||
<br>
|
<div
|
||||||
|
v-for="item in filteredMenu"
|
||||||
<div class="ml-3 grid grid-cols-3">
|
:key="item.title"
|
||||||
<div class="bg-white ml-2 shadow border border-solid px-6 py-4 rounded-lg hover:bg-yellow-300 hover:transition-all mb-2 cursor-pointer">
|
class="bg-white shadow border border-solid px-6 py-4 rounded-lg hover:bg-yellow-300 hover:transition-all cursor-pointer">
|
||||||
<router-link to="/akaunhome/gadaian">
|
<router-link :to="item.link" class="block text-center">
|
||||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Pembiayaan</h2>
|
<img
|
||||||
</router-link>
|
v-if="item.img"
|
||||||
</div>
|
:src="item.img"
|
||||||
<div class="bg-white ml-2 shadow border border-solid px-6 py-4 rounded-lg hover:bg-yellow-300 hover:transition-all mb-2 cursor-pointer">
|
class="h-20 w-20 mx-auto mb-2"
|
||||||
<router-link to="/akaunhome/penebusan">
|
:alt="item.title"
|
||||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Penyelesaian Pembiayaan</h2>
|
/>
|
||||||
</router-link>
|
<h2 class="font-bold text-2xl uppercase">{{ item.title }}</h2>
|
||||||
</div>
|
|
||||||
<div class="bg-white ml-2 shadow border border-solid px-6 py-4 rounded-lg hover:bg-yellow-300 hover:transition-all mb-2 cursor-pointer">
|
|
||||||
<router-link to="/akaunhome/Pendahuluanserahan">
|
|
||||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Pendahuluan & Serahan</h2>
|
|
||||||
</router-link>
|
|
||||||
</div>
|
|
||||||
<div class="bg-white ml-2 shadow border border-solid px-6 py-4 rounded-lg hover:bg-yellow-300 hover:transition-all mb-2 cursor-pointer">
|
|
||||||
<router-link to="/akaunhome/Tuntutbaki">
|
|
||||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Tuntut Baki</h2>
|
|
||||||
</router-link>
|
|
||||||
</div>
|
|
||||||
<div class="bg-white ml-2 shadow border border-solid px-6 py-4 rounded-lg hover:bg-yellow-300 hover:transition-all mb-2 cursor-pointer">
|
|
||||||
<router-link to="/akaunhome/ansuran">
|
|
||||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Ansuran Pembiayaan</h2>
|
|
||||||
</router-link>
|
|
||||||
</div>
|
|
||||||
<div class="bg-white ml-2 shadow border border-solid px-6 py-4 rounded-lg hover:bg-yellow-300 hover:transition-all mb-2 cursor-pointer">
|
|
||||||
<router-link to="/akaunhome/perbelanjaan">
|
|
||||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Perbelanjaan</h2>
|
|
||||||
</router-link>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="bg-white ml-2 shadow border border-solid px-6 py-4 rounded-lg hover:bg-yellow-300 hover:transition-all mb-2 cursor-pointer">
|
|
||||||
<router-link to="/akaunhome/online">
|
|
||||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Online</h2>
|
|
||||||
</router-link>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="bg-white ml-2 shadow border border-solid px-6 py-4 rounded-lg hover:bg-yellow-300 hover:transition-all mb-2 cursor-pointer">
|
|
||||||
<router-link to="/akaunhome/upah">
|
|
||||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Keuntungan</h2>
|
|
||||||
</router-link>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="bg-white ml-2 shadow border border-solid px-6 py-4 rounded-lg hover:bg-yellow-300 hover:transition-all mb-2 cursor-pointer">
|
|
||||||
<router-link to="/akaunhome/ringkasanharian">
|
|
||||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Ringkasan Harian</h2>
|
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ml-3 grid grid-cols-3">
|
|
||||||
<div class="bg-white ml-2 shadow border border-solid px-6 py-4 rounded-lg hover:bg-yellow-300 hover:transition-all mb-2 cursor-pointer">
|
|
||||||
<router-link to="/akaunhome/RingkasanTerkumpul">
|
|
||||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Ringkasan Terkumpul</h2>
|
|
||||||
</router-link>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="bg-white ml-2 shadow border border-solid px-6 py-4 rounded-lg hover:bg-yellow-300 hover:transition-all mb-2 cursor-pointer">
|
|
||||||
<router-link to="/akaunhome/StokAuditBackdate">
|
|
||||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Stok Audit Back-date</h2>
|
|
||||||
</router-link>
|
|
||||||
</div>
|
|
||||||
<div class="bg-white ml-2 shadow border border-solid px-6 py-4 rounded-lg hover:bg-yellow-300 hover:transition-all mb-2 cursor-pointer">
|
|
||||||
<router-link to="/akaunhome/Aging">
|
|
||||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Aging</h2>
|
|
||||||
</router-link>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="ml-3 grid grid-cols-3">
|
|
||||||
<div class="bg-white ml-2 shadow border border-solid px-6 py-4 rounded-lg hover:bg-yellow-300 hover:transition-all mb-2 cursor-pointer">
|
|
||||||
<router-link to="/akaunhome/PetiBesi">
|
|
||||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Peti Besi</h2>
|
|
||||||
</router-link>
|
|
||||||
</div>
|
|
||||||
<div class="bg-white ml-2 shadow border border-solid px-6 py-4 rounded-lg hover:bg-yellow-300 hover:transition-all mb-2 cursor-pointer">
|
|
||||||
<router-link to="/akaunhome/imbangduga">
|
|
||||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Imbang Duga</h2>
|
|
||||||
</router-link>
|
|
||||||
</div>
|
|
||||||
<div class="bg-white ml-2 shadow border border-solid px-6 py-4 rounded-lg hover:bg-yellow-300 hover:transition-all mb-2 cursor-pointer">
|
|
||||||
<router-link to="/akaunhome/prestasi">
|
|
||||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">PRESTASI AR-RAHN</h2>
|
|
||||||
</router-link>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="ml-3 grid grid-cols-3">
|
|
||||||
<div class="bg-white ml-2 shadow border border-solid px-6 py-4 rounded-lg hover:bg-yellow-300 hover:transition-all mb-2 cursor-pointer">
|
|
||||||
<router-link to="/akaunhome/akrubulan">
|
|
||||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Akru Bulanan</h2>
|
|
||||||
</router-link>
|
|
||||||
</div>
|
|
||||||
<div class="bg-white ml-2 shadow border border-solid px-6 py-4 rounded-lg hover:bg-yellow-300 hover:transition-all mb-2 cursor-pointer">
|
|
||||||
<router-link to="/akaunhome/akrubulanpecahan">
|
|
||||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Akru Bulanan Pecahan</h2>
|
|
||||||
</router-link>
|
|
||||||
</div>
|
|
||||||
<div class="bg-white ml-2 shadow border border-solid px-6 py-4 rounded-lg hover:bg-yellow-300 hover:transition-all mb-2 cursor-pointer">
|
|
||||||
<router-link to="/akaunhome/serahgadai">
|
|
||||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Serah Marhun Pembiayaan </h2>
|
|
||||||
</router-link>
|
|
||||||
</div>
|
|
||||||
<div class="bg-white ml-2 shadow border border-solid px-6 py-4 rounded-lg hover:bg-yellow-300 hover:transition-all mb-2 cursor-pointer">
|
|
||||||
<router-link to="/akaunhome/serahtebus">
|
|
||||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Serah Marhun Penyelesaian Pembiayaan</h2>
|
|
||||||
</router-link>
|
|
||||||
</div>
|
|
||||||
<div class="bg-white ml-2 shadow border border-solid px-6 py-4 rounded-lg hover:bg-yellow-300 hover:transition-all mb-2 cursor-pointer">
|
|
||||||
<router-link to="/akaunhome/tuntutrugi">
|
|
||||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Baki Rugi Lelong</h2>
|
|
||||||
</router-link>
|
|
||||||
</div>
|
|
||||||
<div class="bg-white ml-2 shadow border border-solid px-6 py-4 rounded-lg hover:bg-yellow-300 hover:transition-all mb-2 cursor-pointer">
|
|
||||||
<router-link to="/akaunhome/BilanganPengadai">
|
|
||||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Bilangan Pelanggan</h2>
|
|
||||||
</router-link>
|
|
||||||
</div>
|
|
||||||
<div class="bg-white ml-2 shadow border border-solid px-6 py-4 rounded-lg hover:bg-yellow-300 hover:transition-all mb-2 cursor-pointer">
|
|
||||||
<router-link to="/akaunhome/imbangdugabackup">
|
|
||||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Imbang Duga Backup</h2>
|
|
||||||
</router-link>
|
|
||||||
</div>
|
|
||||||
<div class="bg-white ml-2 shadow border border-solid px-6 py-4 rounded-lg hover:bg-yellow-300 hover:transition-all mb-2 cursor-pointer">
|
|
||||||
<router-link to="/akaunhome/saghilang">
|
|
||||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Sag Hilang</h2>
|
|
||||||
</router-link>
|
|
||||||
</div>
|
|
||||||
<div class="bg-white ml-2 shadow border border-solid px-6 py-4 rounded-lg hover:bg-yellow-300 hover:transition-all mb-2 cursor-pointer">
|
|
||||||
<router-link to="/akaunhome/laporanlelong">
|
|
||||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Laporan Lelong</h2>
|
|
||||||
</router-link>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
showSearch: false,
|
||||||
|
searchQuery: "",
|
||||||
|
menuItems: [
|
||||||
|
{ title: "Imbang Duga Akru", link: "/akaunhome/imbangduga/akru", img: "/img/balance-sheet.png" },
|
||||||
|
{ title: "Lejer Am", link: "/akaunhome/lejeram", img: "/img/ledger.png" },
|
||||||
|
{ title: "Kawalan Stok", link: "/akaunhome/kawalanstok", img: "/img/kawalanstok.png" },
|
||||||
|
{ title: "Stok Audit", link: "/akaunhome/stokaudit", img: "/img/audit.png" },
|
||||||
|
{ title: "Stok Audit Combine", link: "/akaunhome/stokauditCombine", img: "/img/audit.png" },
|
||||||
|
{ title: "Audit Trail", link: "/akaunhome/auditTrail", img: "/img/audittrail.png" },
|
||||||
|
{ title: "Pembiayaan", link: "/akaunhome/gadaian" },
|
||||||
|
{ title: "Penyelesaian Pembiayaan", link: "/akaunhome/penebusan" },
|
||||||
|
{ title: "Pendahuluan & Serahan", link: "/akaunhome/Pendahuluanserahan" },
|
||||||
|
{ title: "Tuntut Baki", link: "/akaunhome/Tuntutbaki" },
|
||||||
|
{ title: "Ansuran Pembiayaan", link: "/akaunhome/ansuran" },
|
||||||
|
{ title: "Perbelanjaan", link: "/akaunhome/perbelanjaan" },
|
||||||
|
{ title: "Online", link: "/akaunhome/online" },
|
||||||
|
{ title: "Keuntungan", link: "/akaunhome/upah" },
|
||||||
|
{ title: "Ringkasan Harian", link: "/akaunhome/ringkasanharian" },
|
||||||
|
{ title: "Ringkasan Terkumpul", link: "/akaunhome/RingkasanTerkumpul" },
|
||||||
|
{ title: "Stok Audit Back-date", link: "/akaunhome/StokAuditBackdate" },
|
||||||
|
{ title: "Aging", link: "/akaunhome/Aging" },
|
||||||
|
{ title: "Peti Besi", link: "/akaunhome/PetiBesi" },
|
||||||
|
{ title: "Imbang Duga", link: "/akaunhome/imbangduga" },
|
||||||
|
{ title: "Prestasi Ar-Rahn", link: "/akaunhome/prestasi" },
|
||||||
|
{ title: "Akru Bulanan", link: "/akaunhome/akrubulan" },
|
||||||
|
{ title: "Akru Bulanan Pecahan", link: "/akaunhome/akrubulanpecahan" },
|
||||||
|
{ title: "Serah Marhun Pembiayaan", link: "/akaunhome/serahgadai" },
|
||||||
|
{ title: "Serah Marhun Penyelesaian Pembiayaan", link: "/akaunhome/serahtebus" },
|
||||||
|
{ title: "Baki Rugi Lelong", link: "/akaunhome/tuntutrugi" },
|
||||||
|
{ title: "Bilangan Pelanggan", link: "/akaunhome/BilanganPengadai" },
|
||||||
|
{ title: "Imbang Duga Backup", link: "/akaunhome/imbangdugabackup" },
|
||||||
|
{ title: "Sag Hilang", link: "/akaunhome/saghilang" },
|
||||||
|
{ title: "Laporan Lelong", link: "/akaunhome/laporanlelong" },
|
||||||
|
{ title: "Barang Kes", link: "/akaunhome/barangkes" },
|
||||||
|
],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
filteredMenu() {
|
||||||
|
const q = this.searchQuery.toLowerCase();
|
||||||
|
return this.menuItems.filter((item) =>
|
||||||
|
item.title.toLowerCase().includes(q)
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
toggleSearch() {
|
||||||
|
this.showSearch = !this.showSearch;
|
||||||
|
if (this.showSearch) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
document.getElementById("search-laporan").focus();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.btn {
|
||||||
|
height: 38px;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
background: white;
|
||||||
|
padding: 0 10px;
|
||||||
|
border-radius: 6px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
@@ -35,16 +35,22 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex justify-end mt-10">
|
<div class="flex justify-end mt-10 gap-3">
|
||||||
<button @click.prevent="generatepdf" class="mr-2 border border-yellow-600 text-yellow-600 font-montserrat py-2 px-8 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300">
|
<button @click.prevent="generatepdf" class="border border-yellow-600 text-yellow-600 font-montserrat py-2 px-8 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300">
|
||||||
<i class="fas fa-file-pdf mr-2"></i>PDF
|
<i class="fas fa-file-pdf mr-2"></i>PDF
|
||||||
</button>
|
</button>
|
||||||
<button @click.prevent="generateview" class="mr-2 border border-yellow-600 text-yellow-600 font-montserrat py-2 px-8 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300">
|
|
||||||
|
<button @click.prevent="generateview" class="border border-yellow-600 text-yellow-600 font-montserrat py-2 px-8 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300">
|
||||||
<i class="fas fa-eye mr-2"></i>View
|
<i class="fas fa-eye mr-2"></i>View
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button @click.prevent="generateexcel" class="border border-green-600 text-green-600 font-montserrat py-2 px-8 font-medium rounded-xl hover:bg-green-600 hover:text-white transition-all duration-300">
|
<button @click.prevent="generateexcel" class="border border-green-600 text-green-600 font-montserrat py-2 px-8 font-medium rounded-xl hover:bg-green-600 hover:text-white transition-all duration-300">
|
||||||
<i class="fas fa-file-excel mr-2"></i>Excel
|
<i class="fas fa-file-excel mr-2"></i>Excel
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
<button @click.prevent="generateexcelaudit" class="border border-green-600 text-green-600 font-montserrat py-2 px-8 font-medium rounded-xl hover:bg-green-600 hover:text-white transition-all duration-300">
|
||||||
|
<i class="fas fa-file-excel mr-2"></i>Excel Audit
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@@ -111,6 +117,18 @@ export default {
|
|||||||
});
|
});
|
||||||
document.getElementById("formstokaudit").submit();
|
document.getElementById("formstokaudit").submit();
|
||||||
},
|
},
|
||||||
|
async generateexcelaudit(){
|
||||||
|
await this.setJenis('excelaudit');
|
||||||
|
Vue.swal({
|
||||||
|
title: 'Memuatkan...',
|
||||||
|
allowEscapeKey : false,
|
||||||
|
allowOutsideClick: false,
|
||||||
|
showCancelButton: false,
|
||||||
|
showConfirmButton: false,
|
||||||
|
timer: 8000,
|
||||||
|
});
|
||||||
|
document.getElementById("formstokaudit").submit();
|
||||||
|
},
|
||||||
Urlredirect: function() {
|
Urlredirect: function() {
|
||||||
return window.route('cetak.stokaudit');
|
return window.route('cetak.stokaudit');
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -14,14 +14,35 @@
|
|||||||
<div class="flex flex-row font-normal text-gray-700 dark:text-gray-400">
|
<div class="flex flex-row font-normal text-gray-700 dark:text-gray-400">
|
||||||
<div class="w-1/3">Jumlah WTD</div>
|
<div class="w-1/3">Jumlah WTD</div>
|
||||||
<div>:</div>
|
<div>:</div>
|
||||||
<div class="ml-2 w-1/3"><b>RM {{ formattext(sb.baki) }} </b></div>
|
<!-- <div class="flex items-center ml-2 w-1/3"><b>RM {{ formattext(sb.baki) }} </b></div> -->
|
||||||
|
<div class="flex items-baseline ml-2 w-1/3">
|
||||||
|
<span class="text-sm mr-1">RM</span><span class="text-lg font-bold">{{ formattext(sb.baki) }}</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-row font-normal text-gray-700 dark:text-gray-400">
|
<div class="flex flex-row font-normal text-gray-700 dark:text-gray-400">
|
||||||
<div class="w-1/3">Tarikh Proses WTD
|
<div class="w-1/3">Tahun Lelong
|
||||||
|
</div>
|
||||||
|
<div>:</div>
|
||||||
|
<div class="ml-2 w-1/3"><b> {{ (sb.tahun) ? sb.tahun : 'Tiada' }} </b></div>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-row font-normal text-gray-700 dark:text-gray-400">
|
||||||
|
<div class="w-1/3">Bulan Lelong
|
||||||
|
</div>
|
||||||
|
<div>:</div>
|
||||||
|
<div class="ml-2 w-1/3"><b> {{ (sb.bulan) ? sb.bulan : 'Tiada' }} </b></div>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-row font-normal text-gray-700 dark:text-gray-400">
|
||||||
|
<div class="w-1/3">Tarikh Proses
|
||||||
</div>
|
</div>
|
||||||
<div>:</div>
|
<div>:</div>
|
||||||
<div class="ml-2 w-1/3"><b> {{ (sb.t_jual) ? sb.t_jual : 'Tiada' }} </b></div>
|
<div class="ml-2 w-1/3"><b> {{ (sb.t_jual) ? sb.t_jual : 'Tiada' }} </b></div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="flex flex-row font-normal text-gray-700 dark:text-gray-400">
|
||||||
|
<div class="w-1/3">Tarikh Hantar
|
||||||
|
</div>
|
||||||
|
<div>:</div>
|
||||||
|
<div class="ml-2 w-1/3"><b> {{ (sb.t_htr_ag) ? sb.t_htr_ag : 'Tiada' }} </b></div>
|
||||||
|
</div>
|
||||||
<div class="flex flex-row font-normal text-gray-700 dark:text-gray-400">
|
<div class="flex flex-row font-normal text-gray-700 dark:text-gray-400">
|
||||||
<div class="w-1/3">Status
|
<div class="w-1/3">Status
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="p-4">
|
<div class="p-4">
|
||||||
<button @click.prevent="promptdeletewtd" :disabled="aktif == 1" :class="{'hover:bg-red-600 bg-red-600 border-red-600': aktif == 0}" class="border border-red-300 text-white bg-red-300 font-montserrat py-2 px-8 font-medium rounded-xl transition-all duration-300"><i class="fas fa-trash-alt"></i></button>
|
<button @click.prevent="promptdeletewtd" :disabled="aktif == 1" :class="{'hover:bg-red-600 bg-red-600 border-red-600': aktif == 0}" class="border border-red-300 text-white bg-red-300 font-montserrat py-2 px-8 font-medium rounded-xl transition-all duration-300"><i class="fas fa-trash-alt"></i></button>
|
||||||
<button @click.prevent="promptwtd" :disabled="aktif == 1" :class="{'hover:bg-yellow-600 bg-yellow-600 border-yellow-600': aktif == 0}" class="border border-yellow-300 text-white bg-yellow-300 font-montserrat py-2 px-8 font-medium rounded-xl transition-all duration-300">Proses WTD</button>
|
<button @click.prevent="promptwtd" :disabled="aktif == 1" :class="{'hover:bg-yellow-600 bg-yellow-600 border-yellow-600': aktif == 0}" class="border border-yellow-300 text-white bg-yellow-300 font-montserrat py-2 px-8 font-medium rounded-xl transition-all duration-300">Serahan WTD</button>
|
||||||
<span v-if="batchno != 0" class="text-lg font-bold ml-3">Batchno: {{ this.batchno }}</span>
|
<span v-if="batchno != 0" class="text-lg font-bold ml-3">Batchno: {{ this.batchno }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -38,9 +38,9 @@
|
|||||||
<th scope="col" class="px-6 py-3">
|
<th scope="col" class="px-6 py-3">
|
||||||
Tarikh Lelong
|
Tarikh Lelong
|
||||||
</th>
|
</th>
|
||||||
<th scope="col" class="px-6 py-3">
|
<!-- <th scope="col" class="px-6 py-3">
|
||||||
Pembiayaan
|
Pembiayaan
|
||||||
</th>
|
</th> -->
|
||||||
<th scope="col" class="px-6 py-3">
|
<th scope="col" class="px-6 py-3">
|
||||||
Baki
|
Baki
|
||||||
</th>
|
</th>
|
||||||
@@ -60,9 +60,9 @@
|
|||||||
<td class="px-6 py-4">
|
<td class="px-6 py-4">
|
||||||
{{ bl.t_jual }}
|
{{ bl.t_jual }}
|
||||||
</td>
|
</td>
|
||||||
<td class="px-6 py-4">
|
<!-- <td class="px-6 py-4">
|
||||||
{{ formattext(bl.pinjaman) }}
|
{{ formattext(bl.pinjaman) }}
|
||||||
</td>
|
</td> -->
|
||||||
<td class="px-6 py-4">
|
<td class="px-6 py-4">
|
||||||
{{ formattext(bl.baki) }}
|
{{ formattext(bl.baki) }}
|
||||||
</td>
|
</td>
|
||||||
@@ -103,7 +103,7 @@ export default {
|
|||||||
kodcaw: this.$kodcaw,
|
kodcaw: this.$kodcaw,
|
||||||
}
|
}
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
console.log(response);
|
//console.log(response);
|
||||||
this.arraybakilelong = response.data;
|
this.arraybakilelong = response.data;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -153,7 +153,7 @@ export default {
|
|||||||
|
|
||||||
if (boolkatalaluan == 1) {
|
if (boolkatalaluan == 1) {
|
||||||
await this.$swal({
|
await this.$swal({
|
||||||
title: 'Proses WTD?',
|
title: 'Serahan WTD?',
|
||||||
text: "anda tidak boleh ulang kembali setelah di proses!",
|
text: "anda tidak boleh ulang kembali setelah di proses!",
|
||||||
icon: 'warning',
|
icon: 'warning',
|
||||||
showCancelButton: true,
|
showCancelButton: true,
|
||||||
@@ -165,16 +165,59 @@ export default {
|
|||||||
|
|
||||||
if (result.isConfirmed) {
|
if (result.isConfirmed) {
|
||||||
|
|
||||||
|
//new added
|
||||||
this.$swal({
|
this.$swal({
|
||||||
title: "Masukkan No Cek:",
|
title: 'Sila Isi Butiran Berikut',
|
||||||
// text: "Write something interesting:",
|
html: `
|
||||||
input: 'text',
|
<div class="swal-form">
|
||||||
showCancelButton: true
|
<div class="swal-row">
|
||||||
|
<label>No Cek</label>
|
||||||
|
<input id="noCek" class="swal2-input" placeholder="Masukkan No Cek">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="swal-row">
|
||||||
|
<label>Tarikh Hantar ke AG</label>
|
||||||
|
<input
|
||||||
|
id="tarikhAG"
|
||||||
|
type="date"
|
||||||
|
class="swal2-input"
|
||||||
|
max="${new Date().toISOString().split('T')[0]}"
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
`,
|
||||||
|
focusConfirm: false,
|
||||||
|
showCancelButton: true,
|
||||||
|
confirmButtonText: 'Simpan',
|
||||||
|
cancelButtonText: 'Batal',
|
||||||
|
|
||||||
|
customClass: {
|
||||||
|
popup: 'swal-popup',
|
||||||
|
confirmButton: 'swal-confirm',
|
||||||
|
cancelButton: 'swal-cancel'
|
||||||
|
},
|
||||||
|
|
||||||
|
preConfirm: () => {
|
||||||
|
const noCek = document.getElementById('noCek').value.trim();
|
||||||
|
const tarikhAG = document.getElementById('tarikhAG').value;
|
||||||
|
|
||||||
|
if (!noCek || !tarikhAG) {
|
||||||
|
this.$swal.showValidationMessage(
|
||||||
|
'Sila masukkan No Cek dan Tarikh Hantar ke AG'
|
||||||
|
);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return { noCek, tarikhAG };
|
||||||
|
}
|
||||||
}).then((result) => {
|
}).then((result) => {
|
||||||
if (result.value) {
|
if (result.isConfirmed) {
|
||||||
this.proseswtd(result.value);
|
this.proseswtd(result.value.noCek, result.value.tarikhAG);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
//end new added
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@@ -197,11 +240,12 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
proseswtd: function (nocek) {
|
proseswtd: function (nocek,tarikhAG) {
|
||||||
this.axios.post(this.$hostname + '/admin/wtd/process', {
|
this.axios.post(this.$hostname + '/admin/wtd/process', {
|
||||||
kodcaw: this.$kodcaw,
|
kodcaw: this.$kodcaw,
|
||||||
batch: this.batchno,
|
batch: this.batchno,
|
||||||
nocek: nocek
|
nocek: nocek,
|
||||||
|
tarikhAG: tarikhAG
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
|
|
||||||
if (response.data == 'success') {
|
if (response.data == 'success') {
|
||||||
|
|||||||
@@ -2,12 +2,17 @@
|
|||||||
<div>
|
<div>
|
||||||
<div class="mx-auto mt-10 mb-10 flex justify-center">
|
<div class="mx-auto mt-10 mb-10 flex justify-center">
|
||||||
|
|
||||||
|
<a href="/wtd/simulasi/janaSimulasi">
|
||||||
|
<button class="bg-yellow-500 p-4 rounded text-white mr-4">Jana Simulasi</button>
|
||||||
|
</a>
|
||||||
|
|
||||||
<router-link to="/wtd/rekod">
|
<router-link to="/wtd/rekod">
|
||||||
<button class="bg-yellow-500 p-4 rounded text-white mr-4">Rekod WTD</button>
|
<button class="bg-yellow-500 p-4 rounded text-white mr-4">Rekod WTD</button>
|
||||||
</router-link>
|
</router-link>
|
||||||
<router-link to="/wtd/tambah">
|
<!-- <router-link to="/wtd/tambah">
|
||||||
<button class="bg-yellow-500 p-4 rounded text-white">Tambah WTD</button>
|
<button class="bg-yellow-500 p-4 rounded text-white">Tambah WTD</button>
|
||||||
</router-link>
|
</router-link> -->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Vendored
+8
-2
@@ -215,14 +215,20 @@ Vue.component('tunai-component', require('./components/Tunai.vue').default)
|
|||||||
Vue.component('petibesi-component', require('./components/Petibesi.vue').default)
|
Vue.component('petibesi-component', require('./components/Petibesi.vue').default)
|
||||||
Vue.component('cawangan-component', require('./components/Cawangan.vue').default)
|
Vue.component('cawangan-component', require('./components/Cawangan.vue').default)
|
||||||
Vue.component('modal-component', require('./components/util/Modal.vue').default)
|
Vue.component('modal-component', require('./components/util/Modal.vue').default)
|
||||||
Vue.component('searchpelanggan-component', require('./components/Searchpelanggan.vue').default)
|
Vue.component('searchpelanggan-component', require('./components/Searchpelanggan.vue').default) //refer sini nnti
|
||||||
|
|
||||||
|
Vue.component('searchbarangkes-component', require('./components/Searchbarangkes.vue').default) //refer sini nnti copy nnti buat utk sag
|
||||||
|
|
||||||
Vue.component('laporanakaun-component', require('./Akaun/Laporan.vue').default)
|
Vue.component('laporanakaun-component', require('./Akaun/Laporan.vue').default)
|
||||||
Vue.component('online-component', require('./Online/Online.vue').default)
|
Vue.component('online-component', require('./Online/Online.vue').default)
|
||||||
Vue.component('noticelelong-component', require('./pages/NotisLelong.vue').default)
|
Vue.component('noticelelong-component', require('./pages/NotisLelong.vue').default)
|
||||||
Vue.component('noticelelong2-component', require('./pages/NotisLelongFasa2.vue').default)
|
Vue.component('noticelelong2-component', require('./pages/NotisLelongFasa2.vue').default)
|
||||||
Vue.component('kelulusan-component', require('./Kelulusan/TableKelulusan.vue').default)
|
Vue.component('kelulusan-component', require('./Kelulusan/TableKelulusan.vue').default)
|
||||||
|
|
||||||
Vue.component('details-pelanggan', require('./pages/Detailspelanggan.vue').default)
|
Vue.component('details-pelanggan', require('./pages/Detailspelanggan.vue').default) // refer sini jugak nnti utk sag searching
|
||||||
|
|
||||||
|
Vue.component('details-sag', require('./pages/Detailssag.vue').default) // refer sini jugak nnnti utk sag searching
|
||||||
|
|
||||||
Vue.component('blacklist-pelanggan', require('./pages/Blacklist.vue').default)
|
Vue.component('blacklist-pelanggan', require('./pages/Blacklist.vue').default)
|
||||||
|
|
||||||
Vue.component('harian-component', require('./components/Analisa/Harian.vue').default)
|
Vue.component('harian-component', require('./components/Analisa/Harian.vue').default)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mx-auto">
|
<div id="cawangan_selector" class="mx-auto">
|
||||||
<a v-if="route === 'ada'" class="text-yellow-200 rounded bg-gray-400 px-6 py-3 font-bold mr-4 uppercase sm:invisible lg:visible xl:visible">
|
<a v-if="route === 'ada'" class="text-yellow-200 rounded bg-gray-400 px-6 py-3 font-bold mr-4 uppercase sm:invisible lg:visible xl:visible">
|
||||||
CAWANGAN :
|
CAWANGAN :
|
||||||
<select v-model="caw" @change="tukarcawangan" class="rounded-md border bg-gray-400 font-bold border-gray-400 focus:outline-none rounded-md focus:ring-1 ring-cyan-500 uppercase">
|
<select v-model="caw" @change="tukarcawangan" class="rounded-md border bg-gray-400 font-bold border-gray-400 focus:outline-none rounded-md focus:ring-1 ring-cyan-500 uppercase">
|
||||||
@@ -40,11 +40,19 @@
|
|||||||
this.cawangan = response.data;
|
this.cawangan = response.data;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.$on('updateCawangan', (newCaw) => {
|
||||||
|
this.caw = newCaw; // Update the header branch
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
fetch('/api/check/cawangan')
|
fetch('/api/check/cawangan')
|
||||||
.then(response => response.json()).then(response => this.cawangan = response);
|
.then(response => response.json()).then(response => this.cawangan = response);
|
||||||
|
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
getText: function(){
|
||||||
|
alert('emit triggered');
|
||||||
|
},
|
||||||
tukarcawangan: function(){
|
tukarcawangan: function(){
|
||||||
|
|
||||||
this.setkodcaw(this.caw)
|
this.setkodcaw(this.caw)
|
||||||
|
|||||||
@@ -0,0 +1,189 @@
|
|||||||
|
<template>
|
||||||
|
<div class="container w-full max-w-xl mx-auto mt-10 px-4 font-sans">
|
||||||
|
<form class="bg-white w-full shadow-md rounded-lg px-8 pt-6 pb-4 mb-4" onclick="return false">
|
||||||
|
<div class="mb-4 w-96 mx-auto">
|
||||||
|
<label class="block text-gray-500 font-medium text-sm mb-2">SAG</label>
|
||||||
|
<div class="flex flex-wrap">
|
||||||
|
<div class="flex flex-row w-96 mx-auto">
|
||||||
|
|
||||||
|
<div class="flex flex-col w-96">
|
||||||
|
<input id="frminput" type="text" ref="btnDropdownRef" placeholder="Masukkan No Rujukan SAG" class="mr-2 bg-gray-200 appearance-none border-2 border-gray-200 rounded w-full py-2 px-4 text-gray-700 leading-tight focus:outline-none focus:bg-white focus:border-blue-500" v-model="inputValue" @input="validateInput"/>
|
||||||
|
<p v-if="warningMessage" class="text-red-500 text-sm mt-1">{{ warningMessage }}</p>
|
||||||
|
<div ref="popoverDropdownRef" v-bind:class="{'hidden': !dropdownShow, 'block': dropdownShow}" class="origin-top-right w-96 right-0 mt-2 w-56 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 focus:outline-none" role="menu" aria-orientation="vertical" aria-labelledby="menu-button" tabindex="-1">
|
||||||
|
<div class="py-1" role="none">
|
||||||
|
<a v-for="(cust,i) in arrayCustomer" :key="i" class="text-gray-700 block px-4 py-2 text-sm hover:bg-yellow-500" role="menuitem" tabindex="-1" id="menu-item-0" :href="Urlredirect({ cust: cust.id })" v-on:click="ClickUrl($event)">{{ cust.nama }}<br><b>{{ (cust.kpbaru) ? cust.kpbaru : cust.kplama }}</b></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button id="buttonsearch" class="px-4 py-2 bg-blue-600 rounded ml-2" v-on:click="toggleDropdown()"><i class="fas fa-search text-white"></i></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { createPopper } from "@popperjs/core";
|
||||||
|
|
||||||
|
export default{
|
||||||
|
props: {
|
||||||
|
placement: {
|
||||||
|
type: String,
|
||||||
|
default: "bottom-start"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dropdownShow: false,
|
||||||
|
param1: "",
|
||||||
|
arrayCustomer: [],
|
||||||
|
tempcaw: '',
|
||||||
|
tempnorujukan: '',
|
||||||
|
inputValue: '',
|
||||||
|
warningMessage: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
document.addEventListener('click', this.onClick);
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
document.removeEventListener('click', this.onClick);
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
validateInput() {
|
||||||
|
const length = this.inputValue.length;
|
||||||
|
|
||||||
|
if (length > 0 && length < 10) {
|
||||||
|
this.warningMessage = 'Input terlalu pendek. Minimum 10 aksara.';
|
||||||
|
} else if (length > 30) {
|
||||||
|
this.warningMessage = 'Input terlalu panjang.';
|
||||||
|
} else {
|
||||||
|
this.warningMessage = '';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
async toggleDropdown() {
|
||||||
|
// Check validation before searching
|
||||||
|
if (this.warningMessage) {
|
||||||
|
return; // Don't proceed if there's a warning
|
||||||
|
}
|
||||||
|
|
||||||
|
await this.getData();
|
||||||
|
await this.$nextTick();
|
||||||
|
|
||||||
|
if (this.arrayCustomer.length > 0) {
|
||||||
|
console.log('masuk');
|
||||||
|
this.dropdownShow = true;
|
||||||
|
createPopper(this.$refs.btnDropdownRef, this.$refs.popoverDropdownRef, {
|
||||||
|
placement: "bottom-start",
|
||||||
|
modifiers: [{ name: "preventOverflow" }]
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
console.log('siap');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
async getPrefix(value){
|
||||||
|
let tempcaw = '';
|
||||||
|
let kodcaw = '';
|
||||||
|
tempcaw = value.slice(0,6)
|
||||||
|
|
||||||
|
kodcaw = await this.compareCawangan(tempcaw)
|
||||||
|
|
||||||
|
if(kodcaw) return kodcaw; else null;
|
||||||
|
|
||||||
|
// return null; // fallback kalau tak match
|
||||||
|
},
|
||||||
|
|
||||||
|
compareCawangan: function(kodcaw){
|
||||||
|
return this.axios.get('/api/check/cawangan')
|
||||||
|
.then(response => {
|
||||||
|
let cawanganlist = response.data;
|
||||||
|
let prefix = kodcaw;
|
||||||
|
let exactMatch = cawanganlist.find(item =>
|
||||||
|
item.kodcaw.toLowerCase() === prefix.toLowerCase()
|
||||||
|
);
|
||||||
|
|
||||||
|
// if (exactMatch) return { ...exactMatch, matchType: 'exact' };
|
||||||
|
if (exactMatch) return exactMatch.kodcaw;
|
||||||
|
|
||||||
|
|
||||||
|
// Contains match
|
||||||
|
let containsMatch = cawanganlist.find(item =>
|
||||||
|
item.kodcaw.toLowerCase().includes(prefix.toLowerCase()) ||
|
||||||
|
prefix.toLowerCase().includes(item.kodcaw.toLowerCase())
|
||||||
|
);
|
||||||
|
|
||||||
|
return containsMatch ? containsMatch.kodcaw : null;
|
||||||
|
// return containsMatch ? { ...containsMatch, matchType: 'contains' } : null;
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
console.error('Error fetching cawangan:', error);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
async getData() {
|
||||||
|
let inputvalue = document.getElementById("frminput").value;
|
||||||
|
let kodcaw = await this.getPrefix(inputvalue);
|
||||||
|
|
||||||
|
this.tempcaw = kodcaw;
|
||||||
|
this.tempnorujukan = inputvalue;
|
||||||
|
|
||||||
|
if (inputvalue && /-/.test(inputvalue)) {
|
||||||
|
try {
|
||||||
|
let response = await this.axios.get(this.$hostname + '/admin/searchBySag', {
|
||||||
|
params: {
|
||||||
|
norujukan: inputvalue,
|
||||||
|
kodcaw: kodcaw
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.arrayCustomer = response.data;
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
hasNumber: function(inputString){
|
||||||
|
return /\d/.test(inputString);
|
||||||
|
},
|
||||||
|
onClick: function(){
|
||||||
|
let isClickInside = this.$refs.popoverDropdownRef.contains(event.target);
|
||||||
|
let searchInside = this.$refs.btnDropdownRef.contains(event.target);
|
||||||
|
let buttonSearch = document.getElementById('buttonsearch');
|
||||||
|
|
||||||
|
if (isClickInside || searchInside || buttonSearch.contains(event.target)) {
|
||||||
|
if(buttonSearch.value !== '')
|
||||||
|
{
|
||||||
|
this.dropdownShow = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
|
||||||
|
if(this.$refs.btnDropdownRef.value != '')
|
||||||
|
{
|
||||||
|
this.dropdownShow = false
|
||||||
|
}else{
|
||||||
|
this.dropdownShow = false
|
||||||
|
this.arrayCustomer = []
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
Urlredirect: function(options) {
|
||||||
|
// const inputElement = document.getElementById('frminput');
|
||||||
|
// const value = inputElement.value;
|
||||||
|
// return window.route('pelanggan.detailssag', options.cust)
|
||||||
|
return window.route('pelanggan.detailssag', options.cust) + '?norujukan=' + this.tempnorujukan + '&kodcaw=' + this.tempcaw;
|
||||||
|
},
|
||||||
|
|
||||||
|
ClickUrl: function(e){
|
||||||
|
window.location.href = e.target.getAttribute('href');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -0,0 +1,187 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<transition name="modal-fade">
|
||||||
|
<div v-if="showModal" class="overflow-x-hidden overflow-y-auto fixed inset-0 z-50 outline-none focus:outline-none justify-center items-center flex">
|
||||||
|
<div class="relative w-1/3 my-6 mx-auto max-w-6xl">
|
||||||
|
<!-- content -->
|
||||||
|
<div class="border-0 rounded-lg shadow-lg relative flex flex-col w-full bg-white outline-none focus:outline-none">
|
||||||
|
<div class="relative p-4 flex-auto">
|
||||||
|
<h3 class="text-center text-3xl font-semibold">
|
||||||
|
Daftar Barang Kes
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="flex flex-wrap mt-4">
|
||||||
|
<div class="w-full max-w-lg mx-auto">
|
||||||
|
|
||||||
|
<!-- No Rujukan -->
|
||||||
|
<div class="mb-4">
|
||||||
|
<label class="block text-gray-700 text-sm font-bold mb-2" for="norujukan">
|
||||||
|
No Rujukan:
|
||||||
|
</label>
|
||||||
|
<input
|
||||||
|
id="norujukan"
|
||||||
|
type="text"
|
||||||
|
v-model="norujukan"
|
||||||
|
class="bg-white appearance-none border-2 border-gray-400 rounded w-full py-2 px-4 text-gray-700 leading-tight focus:outline-none focus:bg-white focus:border-blue-500 border-black"
|
||||||
|
placeholder="isi no rujukan"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- IC dan SAG -->
|
||||||
|
<div class="flex flex-wrap items-end mb-6 gap-4">
|
||||||
|
<!-- IC -->
|
||||||
|
<div class="w-full md:w-1/2">
|
||||||
|
<label class="block text-gray-700 text-sm font-bold mb-2" for="nama">
|
||||||
|
IC:
|
||||||
|
</label>
|
||||||
|
<input
|
||||||
|
id="frminput"
|
||||||
|
type="text"
|
||||||
|
ref="btnDropdownRef"
|
||||||
|
class="bg-white appearance-none border-2 border-gray-400 rounded w-full py-2 px-4 text-gray-700 leading-tight focus:outline-none focus:bg-white focus:border-blue-500 border-black"
|
||||||
|
placeholder="isi nama / IC"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- SAG -->
|
||||||
|
<div class="w-full md:w-1/2">
|
||||||
|
<label class="block text-gray-700 text-sm font-bold mb-2" for="sag">
|
||||||
|
SAG:
|
||||||
|
</label>
|
||||||
|
<input
|
||||||
|
id="saginput"
|
||||||
|
type="text"
|
||||||
|
v-model="kodcaw"
|
||||||
|
class="bg-white appearance-none border-2 border-gray-400 rounded w-full py-2 px-4 text-gray-700 leading-tight focus:outline-none focus:bg-white focus:border-blue-500 border-black"
|
||||||
|
placeholder="isi kod SAG / cawangan"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Button Carian -->
|
||||||
|
<div class="flex justify-end mb-6 gap-2">
|
||||||
|
<button
|
||||||
|
class="flex items-center gap-2 px-6 py-3 bg-blue-600 hover:bg-blue-700 text-white text-sm font-semibold rounded shadow"
|
||||||
|
@click="cariMarhun"
|
||||||
|
>
|
||||||
|
<i class="fas fa-search"></i>
|
||||||
|
Cari Marhun
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Tunjuk hasil carian -->
|
||||||
|
<div v-if="marhunData" class="mt-4 bg-gray-100 p-4 rounded">
|
||||||
|
<p><strong>No Rujukan:</strong> {{ marhunData.norujukan }}</p>
|
||||||
|
<p><strong>Nama Marhun:</strong> {{ marhunData.nama }}</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Footer button -->
|
||||||
|
<div class="flex items-center justify-end p-6 border-t border-solid border-blueGray-200 rounded-b">
|
||||||
|
<button class="bg-gray-500 hover:bg-gray-700 text-white font-bold py-2 px-4 border border-gray-700 rounded mr-1" v-on:click="toggleModal" type="button">
|
||||||
|
Batal
|
||||||
|
</button>
|
||||||
|
<button class="bg-yellow-500 hover:bg-yellow-700 text-white font-bold py-2 px-4 border border-green-700 rounded" @click="addfunc" type="button">
|
||||||
|
Daftar
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</transition>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "modal",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
showModal: false,
|
||||||
|
kodcaw: '',
|
||||||
|
norujukan: '',
|
||||||
|
marhunData: null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
toggleModal() {
|
||||||
|
this.showModal = !this.showModal;
|
||||||
|
},
|
||||||
|
async cariMarhun() {
|
||||||
|
if (!this.norujukan) {
|
||||||
|
this.$toast.warning("Sila isi No Rujukan dahulu.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
const response = await this.axios.get(this.$hostname + '/marhun/' + this.norujukan);
|
||||||
|
this.marhunData = response.data;
|
||||||
|
this.$toast.success("Maklumat berjaya dijumpai!");
|
||||||
|
} catch (error) {
|
||||||
|
this.marhunData = null;
|
||||||
|
this.$toast.error("Rujukan tidak dijumpai atau berlaku ralat.");
|
||||||
|
console.error("Gagal dapatkan data marhun:", error);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
addfunc: function(){
|
||||||
|
|
||||||
|
let dataHantar = {
|
||||||
|
kodcaw: this.kodcaw,
|
||||||
|
nokp: (this.specCust.kpbaru) ? this.specCust.kpbaru : this.specCust.kplama,
|
||||||
|
nota: this.nota
|
||||||
|
};
|
||||||
|
|
||||||
|
console.log("Hantar ke backend:", dataHantar);
|
||||||
|
|
||||||
|
axios.post(this.$hostname + '/admin/AddBarangKes', dataHantar)
|
||||||
|
.then(response => {
|
||||||
|
if(response.data == 'berjaya') {
|
||||||
|
this.showModal = false;
|
||||||
|
this.$toast.success("tambah Sudah Berjaya!");
|
||||||
|
this.$emit('clickEvent_', this.pageNumber);
|
||||||
|
} else {
|
||||||
|
this.showModal = false;
|
||||||
|
this.$toast.error("tambah tidak berjaya");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
console.error("Gagal hantar:", error);
|
||||||
|
|
||||||
|
|
||||||
|
}).then(response => {
|
||||||
|
|
||||||
|
if(response.data == 'berjaya')
|
||||||
|
{
|
||||||
|
this.showModal = false;
|
||||||
|
this.$toast.success("tambah Sudah Berjaya!")
|
||||||
|
// vm.$forceUpdate();
|
||||||
|
|
||||||
|
this.$emit('clickEvent_', this.pageNumber)
|
||||||
|
|
||||||
|
// setTimeout("window.location.reload()", 3000);
|
||||||
|
}else{
|
||||||
|
|
||||||
|
this.showModal = false;
|
||||||
|
this.$toast.error("tambah tidak berjaya")
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.modal-fade-enter,
|
||||||
|
.modal-fade-leave-to {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-fade-enter-active,
|
||||||
|
.modal-fade-leave-active {
|
||||||
|
transition: opacity .5s ease;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -115,12 +115,19 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toggleModal: function(){
|
toggleModal: function(){
|
||||||
|
|
||||||
this.showModal = !this.showModal;
|
this.showModal = !this.showModal;
|
||||||
|
|
||||||
this.arrayCustomer = [];
|
this.arrayCustomer = [];
|
||||||
this.specCust = [];
|
this.specCust = {};
|
||||||
|
this.nota = '';
|
||||||
|
|
||||||
|
if(this.$refs.btnDropdownRef){
|
||||||
|
this.$refs.btnDropdownRef.value = '';
|
||||||
|
}
|
||||||
},
|
},
|
||||||
async toggleDropdown() {
|
async toggleDropdown() {
|
||||||
|
this.specCust = {};
|
||||||
await this.getData()
|
await this.getData()
|
||||||
|
|
||||||
if(this.arrayCustomer.length > 0)
|
if(this.arrayCustomer.length > 0)
|
||||||
@@ -137,42 +144,52 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
getData: function() {
|
async getData() {
|
||||||
|
|
||||||
let inputvalue = document.getElementById("frminput").value;
|
let inputvalue = document.getElementById("frminput").value;
|
||||||
|
|
||||||
if(inputvalue)
|
if(!inputvalue)
|
||||||
{
|
{
|
||||||
if(this.hasNumber(inputvalue))
|
this.arrayCustomer = [];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
let response;
|
||||||
|
|
||||||
|
if (this.hasNumber(inputvalue)) {
|
||||||
|
|
||||||
|
response = await this.axios.get(
|
||||||
|
this.$api1 + '/admin/searchByIC',
|
||||||
{
|
{
|
||||||
this.axios.get(this.$api1 + '/admin/searchByIC', {
|
|
||||||
params: {
|
params: {
|
||||||
ic: inputvalue,
|
ic: inputvalue,
|
||||||
kodcaw: this.$kodcaw
|
kodcaw: this.$kodcaw
|
||||||
}
|
}
|
||||||
}).then(response => {
|
}
|
||||||
this.arrayCustomer = response.data
|
);
|
||||||
|
|
||||||
}).catch(error => {
|
|
||||||
console.log(error)
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.axios.get(this.$api1 + '/admin/searchByName', {
|
|
||||||
|
response = await this.axios.get(
|
||||||
|
this.$api1 + '/admin/searchByName',
|
||||||
|
{
|
||||||
params: {
|
params: {
|
||||||
nama: inputvalue,
|
nama: inputvalue,
|
||||||
kodcaw: this.$kodcaw
|
kodcaw: this.$kodcaw
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
}).then(response => {
|
|
||||||
this.arrayCustomer = response.data
|
|
||||||
|
|
||||||
}).catch(error => {
|
this.arrayCustomer = response.data || [];
|
||||||
console.log(error)
|
|
||||||
})
|
} catch (error) {
|
||||||
}
|
|
||||||
|
console.log(error);
|
||||||
|
this.arrayCustomer = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
@@ -221,6 +238,13 @@ export default {
|
|||||||
},
|
},
|
||||||
kemaskinifunc: function(){
|
kemaskinifunc: function(){
|
||||||
|
|
||||||
|
if (!this.specCust || !this.specCust.id) {
|
||||||
|
this.$toast.error(
|
||||||
|
"Sila pilih pelanggan daripada senarai carian terlebih dahulu."
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
axios.post(this.$hostname + '/admin/AddSenaraiHitam',
|
axios.post(this.$hostname + '/admin/AddSenaraiHitam',
|
||||||
{
|
{
|
||||||
kodcaw: this.$kodcaw,
|
kodcaw: this.$kodcaw,
|
||||||
@@ -229,19 +253,18 @@ export default {
|
|||||||
|
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
|
|
||||||
if(response.data == 'berjaya')
|
if(response.data && response.data.id)
|
||||||
{
|
{
|
||||||
this.showModal = false;
|
this.showModal = false;
|
||||||
this.$toast.success("Kemaskini Sudah Berjaya!")
|
this.$toast.success("Kemaskini Sudah Berjaya!");
|
||||||
// vm.$forceUpdate();
|
// vm.$forceUpdate();
|
||||||
|
|
||||||
this.$emit('clickEvent_', this.pageNumber)
|
this.$emit('clickEvent_', this.pageNumber);
|
||||||
|
|
||||||
// setTimeout("window.location.reload()", 3000);
|
// setTimeout("window.location.reload()", 3000);
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
this.showModal = false;
|
this.showModal = false;
|
||||||
this.$toast.error("Kemaskini tidak berjaya")
|
this.$toast.error("Kemaskini tidak berjaya");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -43,6 +43,9 @@
|
|||||||
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||||
Tarikh Bayaran
|
Tarikh Bayaran
|
||||||
</th>
|
</th>
|
||||||
|
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||||
|
Masa Bayaran
|
||||||
|
</th>
|
||||||
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||||
Bayaran
|
Bayaran
|
||||||
</th>
|
</th>
|
||||||
@@ -54,12 +57,11 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr v-if="objbayaran.length === 0">
|
<tr v-if="objbayaran.length === 0">
|
||||||
<td colspan="9" class="text-center px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
<td colspan="9" class="text-center px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
<div class="flex items-center">
|
<div class="flex flex-col items-center justify-center py-8">
|
||||||
<div class="ml-3">
|
<svg class="w-16 h-16 text-gray-300 mb-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||||
<p class="text-gray-900 whitespace-no-wrap">
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path>
|
||||||
Tiada Data Diperolehi
|
</svg>
|
||||||
</p>
|
<p class="text-gray-700 font-semibold text-lg">Tiada Data Diperolehi</p>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -75,7 +77,15 @@
|
|||||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<div class="ml-3">
|
<div class="ml-3">
|
||||||
<p class="text-gray-900 whitespace-no-wrap" v-text="bayaran.created_at">
|
<p class="text-gray-900 whitespace-no-wrap" v-text="formatDate(bayaran.created_at,'date')">
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
<div class="flex items-center">
|
||||||
|
<div class="ml-3">
|
||||||
|
<p class="text-gray-900 whitespace-no-wrap" v-text="formatDate(bayaran.created_at,'time')">
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -125,12 +135,11 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr v-if="objupah.length === 0">
|
<tr v-if="objupah.length === 0">
|
||||||
<td colspan="9" class="text-center px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
<td colspan="9" class="text-center px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
<div class="flex items-center">
|
<div class="flex flex-col items-center justify-center py-8">
|
||||||
<div class="ml-3">
|
<svg class="w-16 h-16 text-gray-300 mb-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||||
<p class="text-gray-900 whitespace-no-wrap">
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path>
|
||||||
Tiada Data Diperolehi
|
</svg>
|
||||||
</p>
|
<p class="text-gray-700 font-semibold text-lg">Tiada Data Diperolehi</p>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -179,25 +188,25 @@
|
|||||||
<table class="min-w-full leading-normal">
|
<table class="min-w-full leading-normal">
|
||||||
<thead class="text-center">
|
<thead class="text-center">
|
||||||
<tr>
|
<tr>
|
||||||
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
<th class="w-1/8 px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||||
Bil
|
Bil
|
||||||
</th>
|
</th>
|
||||||
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
<th class="w-1/8 px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||||
No Rujukan
|
No Rujukan
|
||||||
</th>
|
</th>
|
||||||
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
<th class="w-1/8 px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||||
Jenis Penyelesaian Pembiayaan
|
Jenis
|
||||||
</th>
|
</th>
|
||||||
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
<th class="w-1/8 px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||||
Pembiayaan Asal
|
Pembiayaan Asal
|
||||||
</th>
|
</th>
|
||||||
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
<th class="w-1/8 px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||||
Tempoh
|
Tempoh
|
||||||
</th>
|
</th>
|
||||||
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
<th class="w-1/8 px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||||
Tarikh Penyelesaian Pembiayaan
|
Tarikh
|
||||||
</th>
|
</th>
|
||||||
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
<th class="w-1/8 px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||||
Action
|
Action
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -205,12 +214,11 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr v-if="objrekod.length === 0">
|
<tr v-if="objrekod.length === 0">
|
||||||
<td colspan="9" class="text-center px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
<td colspan="9" class="text-center px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
<div class="flex items-center">
|
<div class="flex flex-col items-center justify-center py-8">
|
||||||
<div class="ml-3">
|
<svg class="w-16 h-16 text-gray-300 mb-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||||
<p class="text-gray-900 whitespace-no-wrap">
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path>
|
||||||
Tiada Data Diperolehi
|
</svg>
|
||||||
</p>
|
<p class="text-gray-700 font-semibold text-lg">Tiada Data Diperolehi</p>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -266,12 +274,15 @@
|
|||||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<div class="ml-3">
|
<div class="ml-3">
|
||||||
<button type="button" @click="rekodfunc(rekod.norujukan,rekod.jenistebus,rekod.hargajualan)" data-modal-toggle="popup-modal" class="border border-yellow-600 text-yellow-600 font-montserrat py-2 px-4 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300">
|
<button type="button" @click="rekodfunc(rekod.norujukan,rekod.jenistebus,rekod.hargajualan)" data-modal-toggle="popup-modal" class="mt-2 border border-yellow-600 text-yellow-600 font-montserrat py-2 px-4 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" />
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" />
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z" />
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z" />
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
|
<button v-if="rekod.ujrah != 0" type="button" @click="rekodSAGStatements(rekod.norujukan)" data-modal-toggle="popup-modal" class="border border-green-600 text-green-600 font-montserrat py-2 px-4 font-medium rounded-xl hover:bg-green-600 hover:text-white transition-all duration-300">
|
||||||
|
<i class="fa-solid fa-box-archive"></i>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@@ -390,6 +401,53 @@ export default {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
rekodSAGStatements: function(norujukan){
|
||||||
|
let urlroute = window.route('accountstatement.rekod', norujukan)
|
||||||
|
window.open(urlroute, '_blank');
|
||||||
|
},
|
||||||
|
formatDate(datetime, type) {
|
||||||
|
if (!datetime) return '';
|
||||||
|
|
||||||
|
const date = new Date(datetime);
|
||||||
|
|
||||||
|
if (type === 'date') {
|
||||||
|
// Return date only in dd/mm/yyyy format
|
||||||
|
const day = String(date.getDate()).padStart(2, '0');
|
||||||
|
const month = String(date.getMonth() + 1).padStart(2, '0');
|
||||||
|
const year = date.getFullYear();
|
||||||
|
return `${day}/${month}/${year}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (type === 'time') {
|
||||||
|
// Return time in 12-hour format with AM/PM
|
||||||
|
let hours = date.getHours();
|
||||||
|
const minutes = String(date.getMinutes()).padStart(2, '0');
|
||||||
|
const seconds = String(date.getSeconds()).padStart(2, '0');
|
||||||
|
const ampm = hours >= 12 ? 'PM' : 'AM';
|
||||||
|
|
||||||
|
hours = hours % 12;
|
||||||
|
hours = hours ? hours : 12; // the hour '0' should be '12'
|
||||||
|
hours = String(hours).padStart(2, '0');
|
||||||
|
|
||||||
|
return `${hours}:${minutes}:${seconds} ${ampm}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Default: return both date and time
|
||||||
|
const day = String(date.getDate()).padStart(2, '0');
|
||||||
|
const month = String(date.getMonth() + 1).padStart(2, '0');
|
||||||
|
const year = date.getFullYear();
|
||||||
|
|
||||||
|
let hours = date.getHours();
|
||||||
|
const minutes = String(date.getMinutes()).padStart(2, '0');
|
||||||
|
const seconds = String(date.getSeconds()).padStart(2, '0');
|
||||||
|
const ampm = hours >= 12 ? 'PM' : 'AM';
|
||||||
|
|
||||||
|
hours = hours % 12;
|
||||||
|
hours = hours ? hours : 12;
|
||||||
|
hours = String(hours).padStart(2, '0');
|
||||||
|
|
||||||
|
return `${day}/${month}/${year} ${hours}:${minutes}:${seconds} ${ampm}`;
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -0,0 +1,100 @@
|
|||||||
|
<template>
|
||||||
|
<div class="">
|
||||||
|
|
||||||
|
<deletemodal ref="delmodal" @clickDelete_="getBarangKes"></deletemodal>
|
||||||
|
<modal ref="modal" @clickEvent_="getBarangKes"></modal>
|
||||||
|
|
||||||
|
<div class="flex justify-between mb-2">
|
||||||
|
<div>
|
||||||
|
<button @click.prevent="showModal" class="border border-green-600 text-green-600 font-montserrat py-2 px-3 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300">
|
||||||
|
<i class="fas fa-plus mr-2"></i>Daftar
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<input v-model="search" class="border border-2 rounded px-4 py-2 w-80r mr-2" type="text" />
|
||||||
|
<button @click.prevent="searchname" class="mr-2 border border-yellow-600 text-yellow-600 font-montserrat py-2 px-8 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300">
|
||||||
|
<i class="fas fa-search mr-2"></i>Cari
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<table class="min-w-full leading-normal">
|
||||||
|
<thead class="text-center">
|
||||||
|
<tr>
|
||||||
|
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">Bil</th>
|
||||||
|
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">Nama</th>
|
||||||
|
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">IC</th>
|
||||||
|
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">Nota</th>
|
||||||
|
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">Action</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr v-for="(barangkes, i) in showBarangKes.data" :key="i">
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
<p class="text-gray-900 whitespace-no-wrap" v-text="(showBarangKes.from + i)"></p>
|
||||||
|
</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
<p class="text-gray-900 whitespace-no-wrap" v-text="barangkes.nama"></p>
|
||||||
|
</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
<p class="text-gray-900 whitespace-no-wrap" v-text="barangkes.nokp"></p>
|
||||||
|
</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
<p class="text-gray-900 whitespace-no-wrap" v-text="barangkes.nota"></p>
|
||||||
|
</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
<button @click="deleteBarangKes(barangkes.id, barangkes.nama, barangkes.nokp)" class="border border-red-600 text-red-600 font-montserrat py-2 px-4 font-medium rounded-xl hover:bg-red-600 hover:text-white transition-all duration-300">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<pagination :data="paginate" @clickEvent_="getBarangKes"></pagination>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import pagination from '../components/pagination.vue'
|
||||||
|
import modal from '../components/util/BarangkesModal.vue'
|
||||||
|
import deletemodal from '../components/util/Deletemodal.vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
pagination,
|
||||||
|
modal,
|
||||||
|
deletemodal
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
currentPage: 1,
|
||||||
|
showBarangKes: [],
|
||||||
|
paginate: {},
|
||||||
|
search: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getBarangKes(this.currentPage)
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getBarangKes(pageNumber) {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
showModal() {
|
||||||
|
this.$refs.modal.showModal = true;
|
||||||
|
this.$refs.modal.kodcaw = this.$kodcaw;
|
||||||
|
},
|
||||||
|
deleteBarangKes(id, nama, nokp) {
|
||||||
|
this.$refs.delmodal.deleteid = id;
|
||||||
|
this.$refs.delmodal.nama = nama;
|
||||||
|
this.$refs.delmodal.nokp = nokp;
|
||||||
|
this.$refs.delmodal.showDelete = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<modal ref="modal" @clickEvent_="getDataSenaraiSAG"></modal>
|
<modal ref="modal" @clickEvent_="getDataSenaraiSAG"></modal>
|
||||||
|
|
||||||
<form :class="{ 'w-2/3' : this.showsag}" class="w-1/2 mt-10 p-6 bg-white rounded-xl shadow mx-auto">
|
<form :class="{ 'w-2/3' : this.showsag}" class="min-h-[50vh] w-1/2 mt-10 p-6 bg-white rounded-xl shadow mx-auto">
|
||||||
|
|
||||||
<ul class="flex hidden rounded-lg divide-x divide-gray-200 shadow sm:flex dark:divide-gray-700 mb-4">
|
<ul class="flex hidden rounded-lg divide-x divide-gray-200 shadow sm:flex dark:divide-gray-700 mb-4">
|
||||||
<li class="w-full">
|
<li class="w-full">
|
||||||
@@ -131,7 +131,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex items-center justify-between mt-4">
|
<!-- <div class="flex items-center justify-between mt-4">
|
||||||
|
|
||||||
<a class="inline-block align-baseline font-bold text-sm text-blue-500 hover:text-blue-800" href="#">
|
<a class="inline-block align-baseline font-bold text-sm text-blue-500 hover:text-blue-800" href="#">
|
||||||
</a>
|
</a>
|
||||||
@@ -140,7 +140,7 @@
|
|||||||
<span v-else @click="submit">Kemaskini</span>
|
<span v-else @click="submit">Kemaskini</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="tabs-2" v-if="this.showsag">
|
<div id="tabs-2" v-if="this.showsag">
|
||||||
@@ -207,13 +207,14 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr v-if="objbelumtebus.from === null">
|
<tr v-if="objbelumtebus.from === null">
|
||||||
<td colspan="9" class="text-center px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
<td colspan="9" class="text-center px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
<div class="flex items-center">
|
<div class="flex flex-col items-center justify-center py-8">
|
||||||
<div class="ml-3">
|
<svg class="w-14 h-14 text-gray-400 mb-3" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path>
|
||||||
|
</svg>
|
||||||
<p class="text-gray-900 whitespace-no-wrap">
|
<p class="text-gray-900 whitespace-no-wrap">
|
||||||
Tiada data yang diperolehi dalam carian
|
Tiada data yang diperolehi dalam carian
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr v-for="(belumtebus,i) in objbelumtebus.data" :key="i">
|
<tr v-for="(belumtebus,i) in objbelumtebus.data" :key="i">
|
||||||
@@ -334,13 +335,14 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr v-if="objsudahtebus.from === null">
|
<tr v-if="objsudahtebus.from === null">
|
||||||
<td colspan="9" class="text-center px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
<td colspan="9" class="text-center px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
<div class="flex items-center">
|
<div class="flex flex-col items-center justify-center py-8">
|
||||||
<div class="ml-3">
|
<svg class="w-14 h-14 text-gray-400 mb-3" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path>
|
||||||
|
</svg>
|
||||||
<p class="text-gray-900 whitespace-no-wrap">
|
<p class="text-gray-900 whitespace-no-wrap">
|
||||||
Tiada data yang diperolehi dalam carian
|
Tiada data yang diperolehi dalam carian
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr v-for="(sudahtebus,i) in objsudahtebus.data" :key="i">
|
<tr v-for="(sudahtebus,i) in objsudahtebus.data" :key="i">
|
||||||
@@ -457,13 +459,14 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr v-if="objlelong.from === null">
|
<tr v-if="objlelong.from === null">
|
||||||
<td colspan="9" class="text-center px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
<td colspan="9" class="text-center px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
<div class="flex items-center">
|
<div class="flex flex-col items-center justify-center py-8">
|
||||||
<div class="ml-3">
|
<svg class="w-14 h-14 text-gray-400 mb-3" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path>
|
||||||
|
</svg>
|
||||||
<p class="text-gray-900 whitespace-no-wrap">
|
<p class="text-gray-900 whitespace-no-wrap">
|
||||||
Tiada data yang diperolehi dalam carian
|
Tiada data yang diperolehi dalam carian
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr v-for="(lelong,i) in objlelong.data" :key="i">
|
<tr v-for="(lelong,i) in objlelong.data" :key="i">
|
||||||
|
|||||||
@@ -0,0 +1,267 @@
|
|||||||
|
<template>
|
||||||
|
<div class="container w-full max-w-7xl mx-auto mt-10 px-4 font-sans">
|
||||||
|
<div class="bg-white shadow rounded-lg">
|
||||||
|
<!-- Customer Info -->
|
||||||
|
<div v-if="customer" class="p-6 border-b">
|
||||||
|
<h2 class="text-lg font-bold mb-2">Maklumat Customer</h2>
|
||||||
|
<p><strong>Nama:</strong> {{ customer.nama }}</p>
|
||||||
|
<p><strong>No Telefon:</strong> {{ customer.telefon }}</p>
|
||||||
|
<p><strong>KP Baru:</strong> {{ customer.kpbaru }}</p>
|
||||||
|
<p><strong>No Rujukan:</strong> {{ gadaiItem.norujukan }}</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Tab Title -->
|
||||||
|
<div class="border-b flex">
|
||||||
|
<a id="sag"
|
||||||
|
href="#"
|
||||||
|
class="px-6 py-3 font-semibold text-blue-600 border-b-2 border-blue-600">
|
||||||
|
Maklumat SAG
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-if="gadaiItem" class="p-6">
|
||||||
|
<div class="grid grid-cols-2 gap-6">
|
||||||
|
<div>
|
||||||
|
<label class="block text-sm font-medium text-gray-700">No Rujukan</label>
|
||||||
|
<input
|
||||||
|
class="bg-gray-200 appearance-none border-2 border-gray-200 rounded w-full py-2 px-4 text-gray-700 leading-tight focus:outline-none focus:bg-white focus:border-blue
|
||||||
|
-500"
|
||||||
|
type="text"
|
||||||
|
v-model="gadaiItem.norujukan"
|
||||||
|
:readonly="!isEditing"
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label class="block text-sm font-medium text-gray-700">Tarikh</label>
|
||||||
|
<input
|
||||||
|
class="bg-gray-200 appearance-none border-2 border-gray-200 rounded w-full py-2 px-4 text-gray-700 leading-tight focus:outline-none focus:bg-white focus:border-blue
|
||||||
|
-500"
|
||||||
|
type="date"
|
||||||
|
v-model="gadaiItem.t_gadai"
|
||||||
|
:readonly="!isEditing"
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label class="block text-sm font-medium text-gray-700">Pinjaman (RM)</label>
|
||||||
|
<input
|
||||||
|
class="bg-gray-200 appearance-none border-2 border-gray-200 rounded w-full py-2 px-4 text-gray-700 leading-tight focus:outline-none focus:bg-white focus:border-blue
|
||||||
|
-500"
|
||||||
|
type="number"
|
||||||
|
step="0.01"
|
||||||
|
v-model="gadaiItem.pinjaman"
|
||||||
|
:readonly="!isEditing"
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label class="block text-sm font-medium text-gray-700">Nilai Marhun (RM)</label>
|
||||||
|
<input
|
||||||
|
class="bg-gray-200 appearance-none border-2 border-gray-200 rounded w-full py-2 px-4 text-gray-700 leading-tight focus:outline-none focus:bg-white focus:border-blue
|
||||||
|
-500"
|
||||||
|
type="number"
|
||||||
|
step="0.01"
|
||||||
|
v-model="gadaiItem.nilaimarhun"
|
||||||
|
:readonly="!isEditing"
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label class="block text-sm font-medium text-gray-700">JBG</label>
|
||||||
|
<input
|
||||||
|
class="bg-gray-200 appearance-none border-2 border-gray-200 rounded w-full py-2 px-4 text-gray-700 leading-tight focus:outline-none focus:bg-white focus:border-blue
|
||||||
|
-500"
|
||||||
|
type="number"
|
||||||
|
v-model="gadaiItem.jbg"
|
||||||
|
:readonly="!isEditing"
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label class="block text-sm font-medium text-gray-700">Keuntungan 1% (RM)</label>
|
||||||
|
<input
|
||||||
|
class="bg-gray-200 appearance-none border-2 border-gray-200 rounded w-full py-2 px-4 text-gray-700 leading-tight focus:outline-none focus:bg-white focus:border-blue
|
||||||
|
-500"
|
||||||
|
type="number"
|
||||||
|
step="0.01"
|
||||||
|
v-model="gadaiItem.tunggakanonepercent"
|
||||||
|
:readonly="!isEditing"
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label class="block text-sm font-medium text-gray-700">Lain-lain caj (RM)</label>
|
||||||
|
<input
|
||||||
|
class="bg-gray-200 appearance-none border-2 border-gray-200 rounded w-full py-2 px-4 text-gray-700 leading-tight focus:outline-none focus:bg-white focus:border-blue
|
||||||
|
-500"
|
||||||
|
type="number"
|
||||||
|
step="0.01"
|
||||||
|
v-model="gadaiItem.tunggakanujrah"
|
||||||
|
:readonly="!isEditing"
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- BUTTONS -->
|
||||||
|
<div class="flex justify-end space-x-2 mt-6">
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
@click="toggleEdit"
|
||||||
|
:class="isEditing ? 'bg-red-600 hover:bg-red-700' : 'bg-gray-600 hover:bg-blue-700'"
|
||||||
|
class="px-4 py-2 text-white rounded-md shadow"
|
||||||
|
>
|
||||||
|
{{ isEditing ? 'Batal' : 'Ubah' }}
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button
|
||||||
|
v-if="isEditing"
|
||||||
|
type="button"
|
||||||
|
@click="kemaskini"
|
||||||
|
class="px-4 py-2 bg-gray-600 text-white rounded-md shadow hover:bg-blue-700"
|
||||||
|
>
|
||||||
|
Kemaskini
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button
|
||||||
|
v-if="!isEditing"
|
||||||
|
type="button"
|
||||||
|
@click="daftar"
|
||||||
|
class="px-4 py-2 bg-gray-600 text-white rounded-md shadow hover:bg-blue-700"
|
||||||
|
>
|
||||||
|
Daftar
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import Swal from 'sweetalert2'
|
||||||
|
import axios from 'axios'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
kodcaw: { type: String, required: true },
|
||||||
|
customer: { type: Object, required: true },
|
||||||
|
gadai: { type: Object, default: () => ({}) }
|
||||||
|
},
|
||||||
|
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
gadaiItem: {
|
||||||
|
norujukan: '',
|
||||||
|
t_gadai: '',
|
||||||
|
pinjaman: '',
|
||||||
|
teller: '',
|
||||||
|
nilaimarhun: '',
|
||||||
|
jbg: '',
|
||||||
|
nota: '',
|
||||||
|
tunggakan: '',
|
||||||
|
tunggakanonepercent: '',
|
||||||
|
tunggakanujrah: ''
|
||||||
|
},
|
||||||
|
originalGadaiItem: {},
|
||||||
|
showSag: true,
|
||||||
|
loading: false,
|
||||||
|
isEditing: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
mounted() {
|
||||||
|
console.log("Props diterima:", this.customer)
|
||||||
|
console.log('gadai Item:', this.gadai);
|
||||||
|
|
||||||
|
if (this.gadai && Object.keys(this.gadai).length > 0) {
|
||||||
|
this.gadaiItem = { ...this.gadai }
|
||||||
|
this.originalGadaiItem = { ...this.gadai }
|
||||||
|
} else if (this.customer?.norujukan) {
|
||||||
|
this.fetchGadaiByNorujukan(this.customer.norujukan)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
async fetchGadaiByNorujukan(norujukan) {
|
||||||
|
this.loading = true
|
||||||
|
try {
|
||||||
|
const url = this.$hostname + '/api/gadai/norujukan/' + this.customer.kodcaw + '/' + norujukan
|
||||||
|
const res = await axios.get(url)
|
||||||
|
this.gadaiItem = res.data || {}
|
||||||
|
this.originalGadaiItem = { ...res.data }
|
||||||
|
} catch (e) {
|
||||||
|
console.error("Gagal fetch data gadai:", e)
|
||||||
|
} finally {
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
toggleEdit() {
|
||||||
|
// Jika sedang edit → klik Batal, reset data asal
|
||||||
|
if (this.isEditing) {
|
||||||
|
this.gadaiItem = { ...this.originalGadaiItem }
|
||||||
|
this.isEditing = false
|
||||||
|
} else {
|
||||||
|
// Jika belum edit → klik Ubah, enable field
|
||||||
|
this.isEditing = true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
async daftar() {
|
||||||
|
try {
|
||||||
|
this.loading = true
|
||||||
|
console.log("Customer data:", this.customer)
|
||||||
|
console.log("Gadai Item:", this.gadaiItem)
|
||||||
|
console.log("kod caw:", this.kodcaw)
|
||||||
|
|
||||||
|
let response = await axios.post(this.$hostname + '/api/barangkes/store', {
|
||||||
|
...this.gadaiItem,
|
||||||
|
})
|
||||||
|
|
||||||
|
if (response.data.success) {
|
||||||
|
Swal.fire({ icon: 'success', title: 'Berjaya', text: response.data.message })
|
||||||
|
this.originalGadaiItem = { ...this.gadaiItem }
|
||||||
|
this.isEditing = false
|
||||||
|
} else {
|
||||||
|
Swal.fire({ icon: 'error', title: 'Ralat', text: response.data.message })
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.error("Error daftar:", e)
|
||||||
|
Swal.fire({ icon: 'error', title: 'Server Error', text: 'Pendaftaran gagal' })
|
||||||
|
} finally {
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
async kemaskini() {
|
||||||
|
try {
|
||||||
|
this.loading = true
|
||||||
|
let response = await axios.put(this.$hostname + '/api/barangkes/update/' + this.gadaiItem.recno, {
|
||||||
|
...this.gadaiItem,
|
||||||
|
})
|
||||||
|
|
||||||
|
if (response.data.success) {
|
||||||
|
Swal.fire({ icon: 'success', title: 'Berjaya', text: response.data.message })
|
||||||
|
this.originalGadaiItem = { ...this.gadaiItem }
|
||||||
|
this.isEditing = false
|
||||||
|
} else {
|
||||||
|
Swal.fire({ icon: 'error', title: 'Ralat', text: response.data.message })
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.error("Error kemaskini:", e)
|
||||||
|
Swal.fire({ icon: 'error', title: 'Server Error', text: 'Kemaskini gagal' })
|
||||||
|
} finally {
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
Vendored
+2
@@ -61,6 +61,7 @@ import AuditPage from './Audit/Audit'
|
|||||||
import KeuntunganSebenarPage from './Audit/KeuntunganSebenar'
|
import KeuntunganSebenarPage from './Audit/KeuntunganSebenar'
|
||||||
import UpahSimpanPage from './Audit/UpahSimpan'
|
import UpahSimpanPage from './Audit/UpahSimpan'
|
||||||
import LaporanLelong from './Akaun/LaporanLelong.vue'
|
import LaporanLelong from './Akaun/LaporanLelong.vue'
|
||||||
|
import Barangkes from './Akaun/Barangkes.vue'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -105,6 +106,7 @@ export default new VueRouter({
|
|||||||
{ path: '/akaunhome/imbangdugabackup', component: ImbangDugaBackup },
|
{ path: '/akaunhome/imbangdugabackup', component: ImbangDugaBackup },
|
||||||
{ path: '/akaunhome/saghilang', component: SagHilang },
|
{ path: '/akaunhome/saghilang', component: SagHilang },
|
||||||
{ path: '/akaunhome/laporanlelong', component: LaporanLelong },
|
{ path: '/akaunhome/laporanlelong', component: LaporanLelong },
|
||||||
|
{ path: '/akaunhome/barangkes', component: Barangkes },
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,501 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Account Statements - {{ $bankDetails['name'] }}</title>
|
||||||
|
<!-- Load Tailwind CSS -->
|
||||||
|
<script src="https://cdn.tailwindcss.com"></script>
|
||||||
|
<style>
|
||||||
|
/* Custom styles for the Inter font */
|
||||||
|
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');
|
||||||
|
|
||||||
|
body {
|
||||||
|
font-family: 'Inter', sans-serif;
|
||||||
|
background-color: #f3f4f6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.statement-table {
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* A4 Print Optimization */
|
||||||
|
@media print {
|
||||||
|
@page {
|
||||||
|
size: A4;
|
||||||
|
margin: 8mm; /* Minimal margin to prevent printer cutoff */
|
||||||
|
padding: 8mm;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
background-color: white;
|
||||||
|
font-size: 9pt;
|
||||||
|
-webkit-print-color-adjust: exact;
|
||||||
|
color-adjust: exact;
|
||||||
|
}
|
||||||
|
|
||||||
|
.statement-container {
|
||||||
|
width: 100%;
|
||||||
|
max-width: 100%;
|
||||||
|
margin: 0 !important;
|
||||||
|
padding: 3mm 5mm !important; /* Minimal padding */
|
||||||
|
box-shadow: none;
|
||||||
|
border: none;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.no-print {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
header {
|
||||||
|
border-color: #1f2937 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Optimize table for print */
|
||||||
|
.statement-table {
|
||||||
|
font-size: 8pt;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.statement-table th {
|
||||||
|
padding: 4px 6px !important;
|
||||||
|
font-size: 7pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
.statement-table td {
|
||||||
|
padding: 3px 6px !important;
|
||||||
|
font-size: 8pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Reduce header size */
|
||||||
|
header h1 {
|
||||||
|
font-size: 20pt !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
header .text-sm {
|
||||||
|
font-size: 8pt !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Reduce summary section */
|
||||||
|
.bg-blue-50 {
|
||||||
|
padding: 8px !important;
|
||||||
|
margin-bottom: 12px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-blue-50 h2 {
|
||||||
|
font-size: 14pt !important;
|
||||||
|
margin-bottom: 8px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-blue-50 .text-sm {
|
||||||
|
font-size: 8pt !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Reduce final summary box */
|
||||||
|
.max-w-lg {
|
||||||
|
max-width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Prevent page breaks inside table rows */
|
||||||
|
.statement-table tr {
|
||||||
|
page-break-inside: avoid;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Keep header rows on every page if table spans multiple pages */
|
||||||
|
.statement-table thead {
|
||||||
|
display: table-header-group;
|
||||||
|
}
|
||||||
|
|
||||||
|
.statement-table tfoot {
|
||||||
|
display: table-footer-group;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Reduce margins and padding throughout */
|
||||||
|
header {
|
||||||
|
padding-bottom: 4mm !important;
|
||||||
|
margin-bottom: 4mm !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mb-8 {
|
||||||
|
margin-bottom: 4mm !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mb-6 {
|
||||||
|
margin-bottom: 3mm !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.p-8 {
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.p-4 {
|
||||||
|
padding: 6px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.p-6 {
|
||||||
|
padding: 8px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.statement-container {
|
||||||
|
max-width: 80rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.print\:page-break-before {
|
||||||
|
page-break-before: always;
|
||||||
|
break-before: page;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="p-8">
|
||||||
|
|
||||||
|
@php
|
||||||
|
// Helper function to format currency for the template
|
||||||
|
function formatCurrency($amount, $currency = 'RM')
|
||||||
|
{
|
||||||
|
return is_numeric($amount) ? `$currency ` . number_format($amount, 2) : '-';
|
||||||
|
}
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
<div class="statement-container mx-auto bg-white p-8 shadow-lg rounded-lg border border-gray-200">
|
||||||
|
|
||||||
|
<!-- Header Section -->
|
||||||
|
<header class="flex justify-between items-start pb-6 border-b-4 border-gray-800 mb-6">
|
||||||
|
<div class="flex-shrink-0">
|
||||||
|
<h1 class="text-xl font-extrabold text-gray-800 uppercase tracking-widest">{{ $bankDetails['name'] }}
|
||||||
|
</h1>
|
||||||
|
<p class="text-sm mt-1 text-gray-600">{!! $bankDetails['address'] !!}</p>
|
||||||
|
</div>
|
||||||
|
<div class="text-right flex flex-col items-end">
|
||||||
|
<div class="text-xl font-bold text-gray-700 mb-2">{{ $gadaian['norujukan'] }}</div>
|
||||||
|
<div class="bg-gray-100 p-3 rounded-lg text-sm grid grid-cols-2 gap-x-4 gap-y-1 w-full">
|
||||||
|
<span class="font-semibold text-gray-700">IC:</span>
|
||||||
|
<span class="text-gray-900 font-mono">{{ $gadaian['nokp'] }}</span>
|
||||||
|
|
||||||
|
<span class="font-semibold text-gray-700">Tarikh Pembiayaan:</span>
|
||||||
|
<span class="text-gray-900">{{ $gadaian['t_gadai'] }}</span>
|
||||||
|
|
||||||
|
<span class="font-semibold text-gray-700">Tempoh Pembiayaan:</span>
|
||||||
|
<span class="text-gray-900 text-xs">{{ $gadaian['tempoh'] }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<!-- Address and Statement Info -->
|
||||||
|
<div class="flex justify-between items-start mb-8">
|
||||||
|
<!-- Account Holder Address -->
|
||||||
|
<div class="w-1/2 pr-4">
|
||||||
|
<p class="text-lg font-bold text-gray-900 uppercase">{{ $accountHolder['name'] }}</p>
|
||||||
|
<p class="text-sm text-gray-700 uppercase">{!! $accountHolder['address'] !!}</p>
|
||||||
|
<p class="text-sm text-gray-700 uppercase">{{ $accountHolder['city_state_zip'] }}</p>
|
||||||
|
</div>
|
||||||
|
<!-- Branch Info (from PDF structure) -->
|
||||||
|
<div class="w-1/2 text-right">
|
||||||
|
<p class="text-sm font-semibold text-gray-700">{{ $bankDetails['branch'] }}</p>
|
||||||
|
<p class="text-xs text-gray-500 mt-1">Page 1 of 1</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Account Summary -->
|
||||||
|
<div class="mb-8 p-4 bg-blue-50 rounded-lg shadow-inner">
|
||||||
|
<h2 class="text-xl font-bold text-blue-800 mb-3 border-b pb-2">Ringkasan Pembiayaan</h2>
|
||||||
|
<div class="grid grid-cols-2 sm:grid-cols-3 gap-4 text-sm">
|
||||||
|
<!-- Row 1 -->
|
||||||
|
<div>
|
||||||
|
<div class="font-semibold text-gray-700">Pembiayaan:</div>
|
||||||
|
<div class="text-gray-900 font-bold text-lg">{{ formatCurrency($gadaian['pinjaman']) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="font-semibold text-gray-700">Nilai Marhun:</div>
|
||||||
|
<div class="text-green-600 font-bold text-lg">{{ formatCurrency($gadaian['nilaimarhun']) }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="flex justify-between">
|
||||||
|
<div>
|
||||||
|
<div class="font-semibold text-gray-700">1 Percent:</div>
|
||||||
|
<div class="text-red-600 font-bold text-lg">{{ formatCurrency($gadaian['ujrah']) }}</div>
|
||||||
|
<div class="font-semibold text-gray-700">Ujrah:</div>
|
||||||
|
<div class="text-red-600 font-bold text-lg">{{ formatCurrency($gadaian['onepercent']) }}</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="font-semibold text-gray-700">Keuntungan:</div>
|
||||||
|
<div class="text-red-600 font-bold text-lg">{{ formatCurrency($gadaian['ujrah'] + $gadaian['onepercent']) }}</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Row 2 -->
|
||||||
|
<div>
|
||||||
|
<div class="font-semibold text-gray-700">Harga Jualan:</div>
|
||||||
|
<div class="text-gray-900">{{ formatCurrency($gadaian['hargajualan']) }}</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="font-semibold text-gray-700">Jumlah Transaksi:</div>
|
||||||
|
<div class="text-gray-900">{{ $transaction_count }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="bg-blue-200 p-2 rounded-md shadow-md">
|
||||||
|
<div class="font-semibold text-blue-900">Harga Tebus:</div>
|
||||||
|
<div class="text-blue-900 font-extrabold text-xl">{{ formatCurrency($tebusTransaction['duit_masuk']) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Transactions Table -->
|
||||||
|
<div class="mb-6">
|
||||||
|
<h2 class="text-xl font-bold text-gray-800 mb-3 border-b pb-2">Transaksi</h2>
|
||||||
|
|
||||||
|
<table class="w-full statement-table text-left text-sm">
|
||||||
|
<thead>
|
||||||
|
<tr class="bg-gray-100 text-gray-700 uppercase tracking-wider">
|
||||||
|
<th class="py-3 px-4 border border-gray-300 w-1/12">Tarikh</th>
|
||||||
|
<th class="py-3 px-4 border border-gray-300 w-2/12">Deskripsi</th>
|
||||||
|
<th class="py-3 px-4 border border-gray-300 w-1/12">Tempoh</th>
|
||||||
|
<th class="py-3 px-4 border border-gray-300 w-2/12 text-right">Bayaran (RM)</th>
|
||||||
|
<th class="py-3 px-4 border border-gray-300 w-1/12 text-right">Upah (RM)</th>
|
||||||
|
<th class="py-3 px-4 border border-gray-300 w-2/12 text-right">Pembiayaan (RM)</th>
|
||||||
|
<th class="py-3 px-4 border border-gray-300 w-1/12 text-right">Rebet (RM)</th>
|
||||||
|
<th class="py-3 px-4 border border-gray-300 w-2/12 text-right">Baki (RM)</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@php $totalUpahRebet=0;$totalUpah = 0; $totalBayaran = 0; $totalPembiayaan = 0; $totalRebet = 0; @endphp
|
||||||
|
@foreach ($ansuranTransaction as $transaction)
|
||||||
|
<tr class="hover:bg-gray-50">
|
||||||
|
<td class="py-2 px-4 border border-gray-300">{{ date('d/m/Y', strtotime($transaction['created_at'])) }}</td>
|
||||||
|
<td class="py-2 px-4 border border-gray-300">{{ ($transaction['teller'] == 'Online') ? 'Bayaran Online' : 'Bayaran Kaunter' }}</td>
|
||||||
|
<td class="py-2 px-4 border border-gray-300 text-right font-semibold text-gray-800">
|
||||||
|
{{ $transaction['beza_tempoh'] }}
|
||||||
|
</td>
|
||||||
|
<td class="py-2 px-4 border border-gray-300 text-right text-green-700 font-medium">
|
||||||
|
@if ($transaction['duit_masuk'])
|
||||||
|
{{ formatCurrency($transaction['duit_masuk']) }}
|
||||||
|
@else
|
||||||
|
-
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
|
<td class="py-2 px-4 border border-gray-300 text-right text-red-700 font-medium">
|
||||||
|
@if ($transaction['bayaran_keuntungan'])
|
||||||
|
{{ formatCurrency($transaction['bayaran_keuntungan']) }}
|
||||||
|
@else
|
||||||
|
-
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
|
<td class="py-2 px-4 border border-gray-300 text-right text-red-700 font-medium">
|
||||||
|
@if ($transaction['bayaran_pembiayaan'])
|
||||||
|
{{ formatCurrency($transaction['bayaran_pembiayaan']) }}
|
||||||
|
@else
|
||||||
|
-
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
|
<td class="py-2 px-4 border border-gray-300 text-right font-semibold text-gray-800">
|
||||||
|
{{ formatCurrency($transaction['bayaran_keuntungan'] - $transaction['keuntungan_rebet']) }}
|
||||||
|
</td>
|
||||||
|
<td class="py-2 px-4 border border-gray-300 text-right font-semibold text-gray-800">
|
||||||
|
{{ formatCurrency($transaction['bakipinjaman']) }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@php $totalUpahRebet += $transaction['keuntungan_rebet']; $totalUpah += $transaction['bayaran_keuntungan']; $totalBayaran += $transaction['duit_masuk']; $totalPembiayaan += $transaction['bayaran_pembiayaan']; $totalRebet += ($transaction['bayaran_keuntungan'] - $transaction['keuntungan_rebet']);@endphp
|
||||||
|
@endforeach
|
||||||
|
|
||||||
|
<!-- Tebus Transaction Row -->
|
||||||
|
<tr class="hover:bg-gray-50">
|
||||||
|
<td class="py-2 px-4 border border-gray-300">{{ date('d/m/Y', strtotime($tebusTransaction['created_at'])) }}</td>
|
||||||
|
<td class="py-2 px-4 border border-gray-300">Tebus Kaunter</td>
|
||||||
|
<td class="py-2 px-4 border border-gray-300 text-right font-semibold text-gray-800">
|
||||||
|
{{ $tebusTransaction['beza_tempoh'] }}
|
||||||
|
</td>
|
||||||
|
<td class="py-2 px-4 border border-gray-300 text-right text-green-700 font-medium">
|
||||||
|
@if ($tebusTransaction['duit_masuk'])
|
||||||
|
{{-- {{ formatCurrency($tebusTransaction['duit_masuk']) }} --}}
|
||||||
|
-
|
||||||
|
@else
|
||||||
|
-
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
|
<td class="py-2 px-4 border border-gray-300 text-right text-red-700 font-medium">
|
||||||
|
@if ($tebusTransaction['bayaran_keuntungan'])
|
||||||
|
{{ formatCurrency($tebusTransaction['bayaran_keuntungan']) }}
|
||||||
|
@else
|
||||||
|
-
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
|
<td class="py-2 px-4 border border-gray-300 text-right text-red-700 font-medium">
|
||||||
|
@if ($tebusTransaction['bayaran_pembiayaan'])
|
||||||
|
{{-- {{ formatCurrency($tebusTransaction['bayaran_pembiayaan']) }} --}}
|
||||||
|
-
|
||||||
|
@else
|
||||||
|
-
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
|
<td class="py-2 px-4 border border-gray-300 text-right font-semibold text-gray-800">
|
||||||
|
@php $tebusRebet = ($tebusTransaction['bayaran_keuntungan'] - $tebusTransaction['keuntungan_rebet']) - $totalRebet;@endphp
|
||||||
|
{{ formatCurrency($tebusRebet) }}
|
||||||
|
</td>
|
||||||
|
<td class="py-2 px-4 border border-gray-300 text-right font-semibold text-gray-800">
|
||||||
|
0
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<!-- Closing Balance Row -->
|
||||||
|
<tr class="bg-blue-100 font-bold text-base text-blue-900">
|
||||||
|
<td colspan="3" class="py-3 px-4 border border-gray-300 text-center">Jumlah</td>
|
||||||
|
<td class="py-3 px-4 border border-gray-300 text-right">
|
||||||
|
{{ formatCurrency($totalBayaran) }}</td>
|
||||||
|
<td class="py-3 px-4 border border-gray-300 text-right">
|
||||||
|
{{ formatCurrency($totalUpah + $tebusTransaction['bayaran_keuntungan']) }}</td>
|
||||||
|
<td class="py-3 px-4 border border-gray-300 text-right">
|
||||||
|
{{ formatCurrency($totalPembiayaan) }}</td>
|
||||||
|
<td class="py-3 px-4 border border-gray-300 text-right">
|
||||||
|
{{ formatCurrency($totalRebet + $tebusRebet) }}</td>
|
||||||
|
<td class="py-3 px-4 border border-gray-300 text-right">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="print:page-break-before flex">
|
||||||
|
<div class="p-6 bg-white border border-gray-200 rounded-lg shadow-md max-w-lg mx-auto font-sans">
|
||||||
|
<div class="flex items-center mb-4 border-b-2 border-black pb-1">
|
||||||
|
<h2 class="text-xl font-bold bg-white px-2 py-1 border border-black inline-block tracking-widest">
|
||||||
|
SEMAKAN BAKI PEMBIAYAAN</h2>
|
||||||
|
</div>
|
||||||
|
@php
|
||||||
|
/*Calculation Baki Pembiayaan*/
|
||||||
|
$bakiPembiayaan = $tebusTransaction['bayaran_pembiayaan'];
|
||||||
|
$onePercent = $tebusTransaction['onepercent'];
|
||||||
|
$onePercentRebet = $tebusTransaction['onepercent'] - $tebusTransaction['onepercent_rebet'];
|
||||||
|
$ujrah = $tebusTransaction['ujrah'];
|
||||||
|
$ujrahRebet = $tebusTransaction['ujrah'] - $tebusTransaction['ujrah_rebet'];
|
||||||
|
$totalBayaranPembiayaan = $bakiPembiayaan + $onePercent - $onePercentRebet + $ujrah - $ujrahRebet;
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
<div class="grid grid-cols-2 gap-y-2 text-sm">
|
||||||
|
<div class="col-span-1"></div>
|
||||||
|
<div class="col-span-1 text-right font-bold tracking-widest text-xs">JUMLAH</div>
|
||||||
|
|
||||||
|
{{-- Beginning Balance --}}
|
||||||
|
<div class="col-span-1 font-semibold">Baki Pembiayaan</div>
|
||||||
|
<div class="col-span-1 text-right font-bold text-base border-b border-black">
|
||||||
|
{{ formatCurrency($bakiPembiayaan) }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- Deposits and Additions --}}
|
||||||
|
<div class="col-span-1">(+) Keuntungan 1%</div>
|
||||||
|
<div class="col-span-1 text-right">
|
||||||
|
{{ formatCurrency($onePercent) }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- ATM & Debit Card Withdrawals --}}
|
||||||
|
<div class="col-span-1">(-) Rebet Keuntungan 1%</div>
|
||||||
|
<div class="col-span-1 text-right text-red-600">
|
||||||
|
{{ formatCurrency($onePercentRebet) }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- Deposits and Additions --}}
|
||||||
|
<div class="col-span-1">(+) Ujrah</div>
|
||||||
|
<div class="col-span-1 text-right">
|
||||||
|
{{ formatCurrency($ujrah) }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- ATM & Debit Card Withdrawals --}}
|
||||||
|
<div class="col-span-1">(-) Rebet Ujrah</div>
|
||||||
|
<div class="col-span-1 text-right text-red-600">
|
||||||
|
{{ formatCurrency($ujrahRebet) }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- Separator Line (Visual emphasis for Ending Balance calculation) --}}
|
||||||
|
<div class="col-span-2 my-2"></div>
|
||||||
|
|
||||||
|
{{-- Ending Balance --}}
|
||||||
|
<div class="col-span-1 font-extrabold text-base">Jumlah Bayaran</div>
|
||||||
|
<div class="col-span-1 text-right font-bold text-lg">
|
||||||
|
{{ formatCurrency($totalBayaranPembiayaan) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="p-6 bg-white border border-gray-200 rounded-lg shadow-md max-w-lg mx-auto font-sans">
|
||||||
|
<div class="flex items-center mb-4 border-b-2 border-black pb-1">
|
||||||
|
<h2 class="text-xl font-bold bg-white px-2 py-1 border border-black inline-block tracking-widest">
|
||||||
|
SEMAKAN BAKI HARGA JUALAN</h2>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@php
|
||||||
|
/*Calculation Baki Harga Jualan*/
|
||||||
|
$bakiHargaJualan = $gadaian['hargajualan'] - $totalBayaran;
|
||||||
|
$upah12 = $gadaian['upah12'];
|
||||||
|
$totalUpahRebet = $totalUpahRebet;
|
||||||
|
$tebusRebet = ($tebusTransaction['bayaran_keuntungan'] - $tebusRebet);
|
||||||
|
$totalBayaranBakiHargaJualan = $bakiHargaJualan - $upah12 + $totalUpahRebet + $tebusRebet;
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
<div class="grid grid-cols-2 gap-y-2 text-sm">
|
||||||
|
<div class="col-span-1"></div>
|
||||||
|
<div class="col-span-1 text-right font-bold tracking-widest text-xs">JUMLAH</div>
|
||||||
|
|
||||||
|
{{-- Beginning Balance --}}
|
||||||
|
<div class="col-span-1 font-semibold">Baki Harga Jualan</div>
|
||||||
|
<div class="col-span-1 text-right font-bold text-base border-b border-black">
|
||||||
|
{{ formatCurrency($bakiHargaJualan) }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- Deposits and Additions --}}
|
||||||
|
<div class="col-span-1">(-) Upah 12</div>
|
||||||
|
<div class="col-span-1 text-right text-red-600">
|
||||||
|
{{ formatCurrency($upah12) }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- ATM & Debit Card Withdrawals --}}
|
||||||
|
<div class="col-span-1">(+) Jumlah Rebet</div>
|
||||||
|
<div class="col-span-1 text-right ">
|
||||||
|
{{ formatCurrency($totalUpahRebet) }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- Deposits and Additions --}}
|
||||||
|
<div class="col-span-1">(+) Upah Tebus Rebet</div>
|
||||||
|
<div class="col-span-1 text-right">
|
||||||
|
{{ formatCurrency($tebusRebet) }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- Separator Line (Visual emphasis for Ending Balance calculation) --}}
|
||||||
|
<div class="col-span-2 my-2"></div>
|
||||||
|
|
||||||
|
{{-- Ending Balance --}}
|
||||||
|
<div class="col-span-1 font-extrabold text-base">Jumlah Bayaran</div>
|
||||||
|
<div class="col-span-1 text-right font-bold text-lg">
|
||||||
|
{{ formatCurrency($totalBayaranBakiHargaJualan) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Footer / Notices -->
|
||||||
|
<footer class="pt-6 border-t border-gray-300 text-center text-xs text-gray-500">
|
||||||
|
<p>Ini ialah penyata akaun yang dijana secara automatik. Sila hubungi kami untuk sebarang percanggahan</p>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Print Button (non-functional in this environment, but useful in a real app) -->
|
||||||
|
<div class="no-print max-w-4xl mx-auto mt-4 text-center">
|
||||||
|
<button onclick="window.print()"
|
||||||
|
class="px-6 py-2 bg-indigo-600 text-white font-semibold rounded-lg shadow-md hover:bg-indigo-700 transition duration-150">
|
||||||
|
<svg class="w-4 h-4 inline-block mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"
|
||||||
|
xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||||
|
d="M17 17h2a2 2 0 002-2v-4a2 2 0 00-2-2H5a2 2 0 00-2 2v4a2 2 0 002 2h2m2 4h6a2 2 0 002-2v-4a2 2 0 00-2-2H9a2 2 0 00-2 2v4a2 2 0 002 2z">
|
||||||
|
</path>
|
||||||
|
</svg>
|
||||||
|
Print Statement
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
@@ -164,6 +164,16 @@
|
|||||||
</table>
|
</table>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
@php
|
||||||
|
$reportNames = [
|
||||||
|
'arrahnpay' => 'Laporan Ansuran Pembiayaan (Arrahn Pay)',
|
||||||
|
'kaunter' => 'Laporan Ansuran Pembiayaan (Kaunter aros)',
|
||||||
|
'all' => 'Laporan Ansuran Pembiayaan Semua'
|
||||||
|
];
|
||||||
|
|
||||||
|
$displayJenisLaporan = $reportNames[$jenisLaporan] ?? 'Laporan Tidak Diketahui';
|
||||||
|
@endphp
|
||||||
|
|
||||||
<table id="scan">
|
<table id="scan">
|
||||||
<tr>
|
<tr>
|
||||||
@php
|
@php
|
||||||
@@ -171,10 +181,10 @@
|
|||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
@if(Str::contains($api_url, 'apiv3.arrahn'))
|
@if(Str::contains($api_url, 'apiv3.arrahn'))
|
||||||
<th colspan="5"><b>LAPORAN ANSURAN PEMBIAYAAN (arOSv3)</b></th>
|
<th colspan="5"><b>{{ $displayJenisLaporan }} (arOSv3)</b></th>
|
||||||
@else
|
@else
|
||||||
<th> </th>
|
<th> </th>
|
||||||
<th colspan ="5"><b>LAPORAN ANSURAN PEMBIAYAAN</b></thh>
|
<th colspan ="5"><b>{{ $displayJenisLaporan }}</b></thh>
|
||||||
@endif
|
@endif
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -233,6 +243,8 @@
|
|||||||
$totalbulansama = 0;
|
$totalbulansama = 0;
|
||||||
@endphp
|
@endphp
|
||||||
@foreach($tebus as $index=>$item)
|
@foreach($tebus as $index=>$item)
|
||||||
|
{{-- @foreach($tebus as $index=>$item)
|
||||||
|
@continue($item['teller'] === 'Online') --}}
|
||||||
@php
|
@php
|
||||||
$tarikh_tebus = new DateTime($item['tarikh_bayaran']);
|
$tarikh_tebus = new DateTime($item['tarikh_bayaran']);
|
||||||
$tarikh_gadai = new DateTime($item['t_gadai']);
|
$tarikh_gadai = new DateTime($item['t_gadai']);
|
||||||
@@ -385,3 +397,12 @@
|
|||||||
<td> </td>
|
<td> </td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function filterLaporan(jenis) {
|
||||||
|
// Dapatkan tarikh mula dan hingga jika ada dalam form
|
||||||
|
const mula = '{{ $mula_date }}';
|
||||||
|
const hingga = '{{ $hingga_date }}';
|
||||||
|
window.location.href = `?jenis=${jenis}&mula=${mula}&hingga=${hingga}`;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -0,0 +1,339 @@
|
|||||||
|
<style>
|
||||||
|
#header {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header td, #customers th {
|
||||||
|
|
||||||
|
padding:4px;
|
||||||
|
font-size:10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header tr:nth-child(even){background-color: #ffffff;}
|
||||||
|
|
||||||
|
#header tr:hover {background-color: #ddd;}
|
||||||
|
|
||||||
|
#header th {
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
text-align: left;
|
||||||
|
padding:4px;
|
||||||
|
color:black;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#scan {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#scan td, #scan th {
|
||||||
|
|
||||||
|
padding: 8px;
|
||||||
|
font-size:11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#scan tr:nth-child(even){background-color: #ffffff;}
|
||||||
|
|
||||||
|
#scan tr:hover {background-color: #ddd;}
|
||||||
|
|
||||||
|
#scan th {
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
text-align: left;
|
||||||
|
padding:4px;
|
||||||
|
color:black;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#scan {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#scan td, #scan th {
|
||||||
|
border-collapse: collapse;
|
||||||
|
padding: 8px;
|
||||||
|
font-size:11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#scan tr:nth-child(even){background-color: #ffffff;}
|
||||||
|
|
||||||
|
#scan tr:hover {background-color: #ddd;}
|
||||||
|
|
||||||
|
#scan th {
|
||||||
|
border-collapse: collapse;
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
text-align: left;
|
||||||
|
padding:4px;
|
||||||
|
color:black;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#details {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#details td, #details th {
|
||||||
|
|
||||||
|
padding: 8px;
|
||||||
|
font-size:8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#details tr:nth-child(even){background-color: #ffffff;}
|
||||||
|
|
||||||
|
#details tr:hover {background-color: #ddd;}
|
||||||
|
|
||||||
|
#details th {
|
||||||
|
padding-top: 12px;
|
||||||
|
font-style:bold;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
text-align: left;
|
||||||
|
padding:4px;
|
||||||
|
color:black;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#sign {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sign td, #sign th {
|
||||||
|
|
||||||
|
padding: 8px;
|
||||||
|
font-size:11px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sign tr:nth-child(even){background-color: #ffffff;}
|
||||||
|
|
||||||
|
#sign tr:hover {background-color: #ddd;}
|
||||||
|
|
||||||
|
#sign th {
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
text-align: left;
|
||||||
|
padding:4px;
|
||||||
|
color:black;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media print {
|
||||||
|
.new-page {
|
||||||
|
page-break-before: always;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<table id="header">
|
||||||
|
<tr>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="font-size:20px;font-weight:bold;">{{ $cawangan_detail['namacaw'] }}</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<table id="scan">
|
||||||
|
<tr>
|
||||||
|
@php
|
||||||
|
$api_url = request()->hostname;
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
@if(Str::contains($api_url, 'apiv3.arrahn'))
|
||||||
|
<th colspan ="5"><b>LAPORAN BARANG KES(arOSv3)</b></th>
|
||||||
|
@else
|
||||||
|
<th colspan ="5"><b>LAPORAN BARANG KES</b></th>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
<th> </th>
|
||||||
|
<th> </th>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th colspan="5"><b> TARIKH CETAK:</b>
|
||||||
|
@php
|
||||||
|
$myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_cetak);
|
||||||
|
$formattedweddingdate = $myDateTime->format('d-m-Y');
|
||||||
|
echo($formattedweddingdate);
|
||||||
|
@endphp
|
||||||
|
</th>
|
||||||
|
<td> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th style="width:20px"> <b>TARIKH:</b></th>
|
||||||
|
<th>@php
|
||||||
|
$myDateTime = DateTime::createFromFormat('Y-m-d', $mula_date);
|
||||||
|
$formattedweddingdate = $myDateTime->format('d-m-Y');
|
||||||
|
echo($formattedweddingdate);
|
||||||
|
@endphp</th>
|
||||||
|
<th style="width:20px"> <b>HINGGA:</b></th>
|
||||||
|
<th>@php
|
||||||
|
$myDateTime = DateTime::createFromFormat('Y-m-d', $hingga_date);
|
||||||
|
$formattedweddingdate = $myDateTime->format('d-m-Y');
|
||||||
|
echo($formattedweddingdate);
|
||||||
|
@endphp</th>
|
||||||
|
<td> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
{{-- <table id="details">
|
||||||
|
<tr>
|
||||||
|
<th>Bil</th>
|
||||||
|
<th>Tarikh</th>
|
||||||
|
<th>IC Pelanggan</th>
|
||||||
|
<th>Nama Pelanggan</th>
|
||||||
|
<th>Norujukan</th>
|
||||||
|
<th>Alasan</th>
|
||||||
|
<th>Nilai Marhun(RM)</th>
|
||||||
|
<th>Pembiayaan</th>
|
||||||
|
<th>Sebulan</th>
|
||||||
|
<th>Jumlah</th>
|
||||||
|
<th>Margin</th>
|
||||||
|
</tr>
|
||||||
|
@foreach($polis as $index=>$sh)
|
||||||
|
<tr>
|
||||||
|
<td>{{ $loop->iteration}}</td>
|
||||||
|
<td> {{ $sh['tarikh'] }}</td>
|
||||||
|
<td> {{ $sh['nokp'] }}</td>
|
||||||
|
@php
|
||||||
|
$noic = Http::withOptions(['verify' => config('app.api_verify')])->get($hostname . '/api/customers/' .$sh['nokp'] )->json();
|
||||||
|
@endphp
|
||||||
|
<td> {{ $noic['nama'] }} </td>
|
||||||
|
<td> {{ $sh['norujukan'] }}</td>
|
||||||
|
<td> {{ $sh['komen1'] }}</td>
|
||||||
|
<td>{{ number_format($item['nilaimarhun'],2) }}</td>
|
||||||
|
<td>{{ number_format($item['pinjaman'],2) }}</td>
|
||||||
|
|
||||||
|
@php
|
||||||
|
$koddaerah = Http::withOptions(['verify' => config('app.api_verify')])->get($hostname . '/api/daerah/' .$sh['koddaerah'] )->json();
|
||||||
|
$kodnegeri = Http::withOptions(['verify' => config('app.api_verify')])->get($hostname . '/api/negeri/' .$sh['kodnegeri'] )->json();
|
||||||
|
@endphp
|
||||||
|
<td> {{ $koddaerah['namadaerah'] }}</td>
|
||||||
|
<td> {{ $kodnegeri['negeri'] }}</td>
|
||||||
|
<td> {{ $sh['sttebus'] }}</td>
|
||||||
|
<td> {{ $sh['t_update'] }}</td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</table> --}}
|
||||||
|
{{-- <table id="details">
|
||||||
|
<tr>
|
||||||
|
<th>Bil</th>
|
||||||
|
<th>Tarikh</th>
|
||||||
|
<th>No Rujukan</th>
|
||||||
|
<th>Nota</th>
|
||||||
|
<th>Pembiayaan (RM)</th>
|
||||||
|
<th>Nilai Marhun (RM)</th>
|
||||||
|
<th>JBG</th>
|
||||||
|
<th>Untung (RM)</th>
|
||||||
|
<th>1% (RM)</th>
|
||||||
|
<th>Caj Lain (RM)</th>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
@foreach($palsu as $index => $item)
|
||||||
|
<tr>
|
||||||
|
<td>{{ $loop->iteration }}</td>
|
||||||
|
<td>{{ $item['tarikh'] }}</td>
|
||||||
|
<td>{{ $item['norujukan'] }}</td>
|
||||||
|
<td>{{ $item['nota'] }}</td>
|
||||||
|
<td>{{ number_format($item['pembiayaan'], 2) }}</td>
|
||||||
|
<td>{{ number_format($item['nilaimarhun'], 2) }}</td>
|
||||||
|
<td>{{ number_format($item['jbg'], 2) }}</td>
|
||||||
|
<td>{{ number_format($item['untung'], 2) }}</td>
|
||||||
|
<td>{{ number_format($item['untungonepercent'], 2) }}</td>
|
||||||
|
<td>{{ number_format($item['untungcajlain'], 2) }}</td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</table> --}}
|
||||||
|
<table id="details">
|
||||||
|
<tr>
|
||||||
|
<th>Bil</th>
|
||||||
|
<th>Tarikh</th>
|
||||||
|
<th>No Rujukan</th>
|
||||||
|
<th>Nota</th>
|
||||||
|
<th>Pembiayaan (RM)</th>
|
||||||
|
<th>Nilai Marhun (RM)</th>
|
||||||
|
<th>JBG</th>
|
||||||
|
<th>Untung (RM)</th>
|
||||||
|
<th>1% (RM)</th>
|
||||||
|
<th>Caj Lain (RM)</th>
|
||||||
|
</tr>
|
||||||
|
@php $bil = 1; @endphp
|
||||||
|
|
||||||
|
@foreach($palsu as $item)
|
||||||
|
<tr>
|
||||||
|
<td>{{ $bil++ }}</td>
|
||||||
|
<td>{{ $item['tarikh'] }}</td>
|
||||||
|
<td>{{ $item['norujukan'] }}</td>
|
||||||
|
<td>{{ $item['nota'] }}</td>
|
||||||
|
<td>{{ number_format($item['pembiayaan'], 2) }}</td>
|
||||||
|
<td>{{ number_format($item['nilaimarhun'], 2) }}</td>
|
||||||
|
<td>{{ number_format($item['jbg'], 2) }}</td>
|
||||||
|
<td>{{ number_format($item['untung'], 2) }}</td>
|
||||||
|
<td>{{ number_format($item['untungonepercent'], 2) }}</td>
|
||||||
|
<td>{{ number_format($item['untungcajlain'], 2) }}</td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<br><br><br>
|
||||||
|
<table id="sign">
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td colspan="2"> .................................................................. </td>
|
||||||
|
<td> </td>
|
||||||
|
<td colspan="2"> .................................................................. </td>
|
||||||
|
<td> </td>
|
||||||
|
<td colspan="2">.................................................................. </td>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td colspan="2"><B> Disediakan </B> </td>
|
||||||
|
<td></td>
|
||||||
|
<td colspan="2"><B> Disemak </B> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td colspan="2"><B> Disahkan </B></td>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,19 +1,33 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="ms">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Laporan Pembiayaan & Statistik</title>
|
||||||
<style>
|
<style>
|
||||||
#header {
|
body {
|
||||||
font-family: Arial, Helvetica, sans-serif;
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
margin: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Header Table Styles */
|
||||||
|
#header {
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
#header td, #customers th {
|
#header td, #header th {
|
||||||
|
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#header tr:nth-child(even){background-color: #ffffff;}
|
#header tr:nth-child(even) {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
#header tr:hover {background-color: #ddd;}
|
#header tr:hover {
|
||||||
|
background-color: #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
#header th {
|
#header th {
|
||||||
padding-top: 12px;
|
padding-top: 12px;
|
||||||
@@ -22,27 +36,25 @@
|
|||||||
padding: 4px;
|
padding: 4px;
|
||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
</style>
|
|
||||||
|
|
||||||
|
/* Scan Table Styles */
|
||||||
|
|
||||||
|
|
||||||
<style>
|
|
||||||
#scan {
|
#scan {
|
||||||
font-family: Arial, Helvetica, sans-serif;
|
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
#scan td, #scan th {
|
#scan td, #scan th {
|
||||||
|
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#scan tr:nth-child(even){background-color: #ffffff;}
|
#scan tr:nth-child(even) {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
#scan tr:hover {background-color: #ddd;}
|
#scan tr:hover {
|
||||||
|
background-color: #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
#scan th {
|
#scan th {
|
||||||
padding-top: 12px;
|
padding-top: 12px;
|
||||||
@@ -51,82 +63,54 @@
|
|||||||
padding: 4px;
|
padding: 4px;
|
||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
</style>
|
|
||||||
|
|
||||||
|
/* Details Table Styles */
|
||||||
<style>
|
|
||||||
#scan {
|
|
||||||
font-family: Arial, Helvetica, sans-serif;
|
|
||||||
border-collapse: collapse;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
#scan td, #scan th {
|
|
||||||
border-collapse: collapse;
|
|
||||||
padding: 8px;
|
|
||||||
font-size:11px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#scan tr:nth-child(even){background-color: #ffffff;}
|
|
||||||
|
|
||||||
#scan tr:hover {background-color: #ddd;}
|
|
||||||
|
|
||||||
#scan th {
|
|
||||||
border-collapse: collapse;
|
|
||||||
padding-top: 12px;
|
|
||||||
padding-bottom: 12px;
|
|
||||||
text-align: left;
|
|
||||||
padding:4px;
|
|
||||||
color:black;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<style>
|
|
||||||
#details {
|
#details {
|
||||||
font-family: Arial, Helvetica, sans-serif;
|
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
#details td, #details th {
|
#details td, #details th {
|
||||||
|
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
font-size: 8px;
|
font-size: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#details tr:nth-child(even){background-color: #ffffff;}
|
#details tr:nth-child(even) {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
#details tr:hover {background-color: #ddd;}
|
#details tr:hover {
|
||||||
|
background-color: #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
#details th {
|
#details th {
|
||||||
padding-top: 12px;
|
padding-top: 12px;
|
||||||
font-style:bold;
|
font-weight: bold;
|
||||||
padding-bottom: 12px;
|
padding-bottom: 12px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
</style>
|
|
||||||
|
|
||||||
<style>
|
/* Sign Table Styles */
|
||||||
#sign {
|
#sign {
|
||||||
font-family: Arial, Helvetica, sans-serif;
|
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
#sign td, #sign th {
|
#sign td, #sign th {
|
||||||
|
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
#sign tr:nth-child(even){background-color: #ffffff;}
|
#sign tr:nth-child(even) {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
#sign tr:hover {background-color: #ddd;}
|
#sign tr:hover {
|
||||||
|
background-color: #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
#sign th {
|
#sign th {
|
||||||
padding-top: 12px;
|
padding-top: 12px;
|
||||||
@@ -135,32 +119,58 @@
|
|||||||
padding: 4px;
|
padding: 4px;
|
||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Statistics Table Styles */
|
||||||
|
#statistik {
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: collapse;
|
||||||
|
margin: 20px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#statistik th, #statistik td {
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
padding: 12px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#statistik th {
|
||||||
|
background-color: #f2f2f2;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-row {
|
||||||
|
background-color: #e0e0e0;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bangsa { background-color: #fce4ec; }
|
||||||
|
.pekerjaan { background-color: #e8f5e9; }
|
||||||
|
.nilai { background-color: #e1f5fe; }
|
||||||
|
.pembiayaan-col { background-color: #ffe4d9; }
|
||||||
|
.jenis { background-color: #e8eaf6; }
|
||||||
|
|
||||||
|
.page-break {
|
||||||
|
page-break-after: always;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-title {
|
||||||
|
font-size: 20px;
|
||||||
|
font-weight: bold;
|
||||||
|
margin: 30px 0 20px 0;
|
||||||
|
padding: 10px;
|
||||||
|
background-color: #f0f0f0;
|
||||||
|
border-left: 5px solid #333;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<!-- SECTION 1: LAPORAN PEMBIAYAAN -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<table id="header">
|
<table id="header">
|
||||||
<tr>
|
|
||||||
{{-- <th rowspan="4" style="width:50px"><br><img src="{{ asset('img/ARRAHN1.png') }}" style="width:70px"></img></th> --}}
|
|
||||||
{{-- <th colspan="1">KOPERASI PERMODALAN KELANTAN BERHAD</th> --}}
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style="font-size:20px;font-weight:bold;">{{ $cawangan_detail['namacaw'] }}</td>
|
<td style="font-size:20px;font-weight:bold;">{{ $cawangan_detail['namacaw'] }}</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
{{-- <tr>
|
|
||||||
<td>{{ $cawangan_detail['alamat1'] }}</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>{{ $cawangan_detail['alamat2'].' No Tel : '. $cawangan_detail['notel'].' No Faks : '. $cawangan_detail['nofaks'] }}</td>
|
|
||||||
<td></td>
|
|
||||||
</tr> --}}
|
|
||||||
</table>
|
</table>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
@@ -170,41 +180,44 @@
|
|||||||
$api_url = request()->hostname;
|
$api_url = request()->hostname;
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
@if(Str::contains($api_url, 'apiv3.arrahn'))
|
@if(Str::contains($api_url, 'api_arrahnv3.test'))
|
||||||
<th colspan="5"><b>LAPORAN PEMBIAYAAN (arOSv3)</b></th>
|
<th colspan="5"><b>LAPORAN PEMBIAYAAN (arOSv3)</b></th>
|
||||||
@else
|
@else
|
||||||
<th colspan="5"><b>LAPORAN PEMBIAYAAN</b></th>
|
<th colspan="5"><b>LAPORAN PEMBIAYAAN</b></th>
|
||||||
@endif
|
@endif
|
||||||
<th> </th>
|
<th> </th>
|
||||||
<th> </th>
|
<th> </th>
|
||||||
<th>
|
<th></th>
|
||||||
</th>
|
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width:100px"><b> Tarikh Mula: </b></td>
|
<td style="width:100px"><b> Tarikh Mula: </b></td>
|
||||||
<td style="text-align:left;"> @php
|
<td style="text-align:left;">
|
||||||
|
@php
|
||||||
$myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_mula);
|
$myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_mula);
|
||||||
$formattedweddingdate = $myDateTime->format('d-m-Y');
|
$formattedweddingdate = $myDateTime->format('d-m-Y');
|
||||||
echo($formattedweddingdate)
|
echo($formattedweddingdate)
|
||||||
@endphp</td>
|
@endphp
|
||||||
|
</td>
|
||||||
<td style="width:100px"><b> Tarikh Hingga: </b></td>
|
<td style="width:100px"><b> Tarikh Hingga: </b></td>
|
||||||
<td style="text-align:left;"> @php
|
<td style="text-align:left;">
|
||||||
|
@php
|
||||||
$myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_akhir);
|
$myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_akhir);
|
||||||
$formattedweddingdate = $myDateTime->format('d-m-Y');
|
$formattedweddingdate = $myDateTime->format('d-m-Y');
|
||||||
echo($formattedweddingdate)
|
echo($formattedweddingdate)
|
||||||
@endphp</td>
|
@endphp
|
||||||
|
</td>
|
||||||
<td style="width:100px"> <b>Tarikh Cetak: </b></td>
|
<td style="width:100px"> <b>Tarikh Cetak: </b></td>
|
||||||
<td style="text-align:left;">@php
|
<td style="text-align:left;">
|
||||||
|
@php
|
||||||
$myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_cetak);
|
$myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_cetak);
|
||||||
$formattedweddingdate = $myDateTime->format('d-m-Y');
|
$formattedweddingdate = $myDateTime->format('d-m-Y');
|
||||||
echo($formattedweddingdate)
|
echo($formattedweddingdate)
|
||||||
@endphp</td>
|
@endphp
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td style="width:50px">
|
|
||||||
</td>
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="width:50px"></td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
@@ -227,7 +240,7 @@
|
|||||||
<th>Berat</th>
|
<th>Berat</th>
|
||||||
<th>N Marhun</th>
|
<th>N Marhun</th>
|
||||||
<th>Pembiayaan</th>
|
<th>Pembiayaan</th>
|
||||||
<th>Caj-caj Lain</th>
|
<th>Lain-Lain Caj</th>
|
||||||
<th>Keuntungan 1%</th>
|
<th>Keuntungan 1%</th>
|
||||||
<th>Keuntungan</th>
|
<th>Keuntungan</th>
|
||||||
<th>Peratus (%)</th>
|
<th>Peratus (%)</th>
|
||||||
@@ -279,14 +292,11 @@
|
|||||||
$totalujrah = 0;
|
$totalujrah = 0;
|
||||||
$totalonepercent= 0;
|
$totalonepercent= 0;
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
@endif
|
@endif
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ $counter }}</td>
|
<td>{{ $counter }}</td>
|
||||||
<td style="width:100px">{{$item['norujukan']}}</td>
|
<td style="width:100px">{{$item['norujukan']}}</td>
|
||||||
<td>
|
<td>{{ $item['nama'] }}</td>
|
||||||
{{ $item['nama'] }}
|
|
||||||
</td>
|
|
||||||
<td>{{ $item['alamat1'] }}</td>
|
<td>{{ $item['alamat1'] }}</td>
|
||||||
<td>{{ $item['t_gadai'] }}</td>
|
<td>{{ $item['t_gadai'] }}</td>
|
||||||
<td>{{ $item['nokp'] }}</td>
|
<td>{{ $item['nokp'] }}</td>
|
||||||
@@ -319,7 +329,6 @@
|
|||||||
<td><b>{{ number_format($totalujrah,2) }}</b></td>
|
<td><b>{{ number_format($totalujrah,2) }}</b></td>
|
||||||
<td><b>{{ number_format($totalonepercent,2) }}</b></td>
|
<td><b>{{ number_format($totalonepercent,2) }}</b></td>
|
||||||
<td><b>{{ number_format($totalupah12,2) }} </b></td>
|
<td><b>{{ number_format($totalupah12,2) }} </b></td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
@php
|
@php
|
||||||
$counter = 1;
|
$counter = 1;
|
||||||
@@ -340,11 +349,11 @@
|
|||||||
<td><b>{{ number_format($totalujrah,2) }}</b></td>
|
<td><b>{{ number_format($totalujrah,2) }}</b></td>
|
||||||
<td><b>{{ number_format($totalonepercent,2) }}</b></td>
|
<td><b>{{ number_format($totalonepercent,2) }}</b></td>
|
||||||
<td><b>{{ number_format($totalupah12,2) }} </b></td>
|
<td><b>{{ number_format($totalupah12,2) }} </b></td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
@endif
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<br><br>
|
<br><br>
|
||||||
<table id="details" style="border-top:1px solid black;border-bottom:1px solid black;text-align:center;">
|
<table id="details" style="border-top:1px solid black;border-bottom:1px solid black;text-align:center;">
|
||||||
<tr>
|
<tr>
|
||||||
@@ -367,10 +376,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
{{-- <h5 style="float:right;">JUMLAH KESELURUHAN GADAIAN : RM {{ number_format($totalpinjaman,2) }}</h5> --}}
|
<br><br>
|
||||||
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
<table id="sign">
|
<table id="sign">
|
||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td></td>
|
||||||
@@ -389,7 +395,134 @@
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- PAGE BREAK FOR PRINT -->
|
||||||
|
<div class="page-break"></div>
|
||||||
|
|
||||||
|
<!-- SECTION 2: STATISTIK JENIS -->
|
||||||
|
<div class="section-title">STATISTIK JENIS PEMBIAYAAN</div>
|
||||||
|
|
||||||
|
<table id="statistik" class="min-w-full border border-gray-300">
|
||||||
|
<thead>
|
||||||
|
<tr class="header-row bg-gray-100 text-center">
|
||||||
|
<th colspan="2">Bangsa</th>
|
||||||
|
<th colspan="2">Pekerjaan</th>
|
||||||
|
<th colspan="2">Nilai Marhun</th>
|
||||||
|
<th colspan="2">Pembiayaan</th>
|
||||||
|
<th colspan="2">Pembiayaan Margin</th>
|
||||||
|
<th colspan="2">Jenis Pembiayaan</th>
|
||||||
|
</tr>
|
||||||
|
<tr class="bg-gray-50 text-center text-sm">
|
||||||
|
<th>Jenis</th>
|
||||||
|
<th>Bil</th>
|
||||||
|
<th>Jenis</th>
|
||||||
|
<th>Bil</th>
|
||||||
|
<th>RM</th>
|
||||||
|
<th>Bil</th>
|
||||||
|
<th>RM</th>
|
||||||
|
<th>Bil</th>
|
||||||
|
<th>%</th>
|
||||||
|
<th>Bil</th>
|
||||||
|
<th>Jenis</th>
|
||||||
|
<th>Bil</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody class="text-sm text-center">
|
||||||
|
@php
|
||||||
|
// Get all arrays from statistik
|
||||||
|
$bangsaData = $statistik['reportCustomerRace'];
|
||||||
|
$pekerjaanData = $statistik['reportCustomerJob'];
|
||||||
|
$marhunData = $statistik['reportMarhunValue'];
|
||||||
|
$pembiayaanData = $statistik['reportLoanAmount'];
|
||||||
|
$marginData = $statistik['reportMarhunMargin'];
|
||||||
|
$jenisPembiayaanData = $statistik['reportPembiayaan'];
|
||||||
|
|
||||||
|
// Get maximum rows needed
|
||||||
|
$maxRows = max(
|
||||||
|
count($bangsaData),
|
||||||
|
count($pekerjaanData),
|
||||||
|
count($marhunData),
|
||||||
|
count($pembiayaanData),
|
||||||
|
count($marginData),
|
||||||
|
count($jenisPembiayaanData)
|
||||||
|
);
|
||||||
|
|
||||||
|
// Convert to indexed arrays (preserving order)
|
||||||
|
$bangsaKeys = array_keys($bangsaData);
|
||||||
|
$bangsa = array_values($bangsaData);
|
||||||
|
|
||||||
|
$pekerjaanKeys = array_keys($pekerjaanData);
|
||||||
|
$pekerjaan = array_values($pekerjaanData);
|
||||||
|
|
||||||
|
$marhunKeys = array_keys($marhunData);
|
||||||
|
$marhun = array_values($marhunData);
|
||||||
|
|
||||||
|
$pembiayaanKeys = array_keys($pembiayaanData);
|
||||||
|
$pembiayaan = array_values($pembiayaanData);
|
||||||
|
|
||||||
|
$marginKeys = array_keys($marginData);
|
||||||
|
$margin = array_values($marginData);
|
||||||
|
|
||||||
|
$jenisPembiayaanKeys = array_keys($jenisPembiayaanData);
|
||||||
|
$jenisPembiayaan = array_values($jenisPembiayaanData);
|
||||||
|
|
||||||
|
// Labels for jenis pembiayaan
|
||||||
|
$jenisLabels = [
|
||||||
|
'pembiayaanbaru' => 'Pembiayaan Baru',
|
||||||
|
'pembiayaansemula' => 'Pembiayaan Semula',
|
||||||
|
'lelongan' => 'Lelongan'
|
||||||
|
];
|
||||||
|
|
||||||
|
// Check if there's any data at all
|
||||||
|
$hasAnyData = count($bangsaData) > 0 || count($pekerjaanData) > 0 ||
|
||||||
|
count($marhunData) > 0 || count($pembiayaanData) > 0 ||
|
||||||
|
count($marginData) > 0 || count($jenisPembiayaanData) > 0;
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
@if($hasAnyData)
|
||||||
|
@for($i = 0; $i < $maxRows; $i++)
|
||||||
|
<tr>
|
||||||
|
{{-- Bangsa: Nama | Jumlah --}}
|
||||||
|
<td>{{ $bangsaKeys[$i] ?? '-' }}</td>
|
||||||
|
<td>{{ $bangsa[$i] ?? '-' }}</td>
|
||||||
|
|
||||||
|
{{-- Pekerjaan: Jenis | Jumlah --}}
|
||||||
|
<td>{{ $pekerjaanKeys[$i] ?? '-' }}</td>
|
||||||
|
<td>{{ $pekerjaan[$i] ?? '-' }}</td>
|
||||||
|
|
||||||
|
{{-- Nilai Marhun: RM | Berat (g) --}}
|
||||||
|
<td>{{ $marhunKeys[$i] ?? '-' }}</td>
|
||||||
|
<td>{{ isset($marhun[$i]) ? number_format($marhun[$i]) : '-' }}</td>
|
||||||
|
|
||||||
|
{{-- Pembiayaan: RM | Bil --}}
|
||||||
|
<td>{{ $pembiayaanKeys[$i] ?? '-' }}</td>
|
||||||
|
<td>{{ isset($pembiayaan[$i]) ? number_format($pembiayaan[$i]) : '-' }}</td>
|
||||||
|
|
||||||
|
{{-- Pembiayaan Margin: RM | % --}}
|
||||||
|
<td>{{ $marginKeys[$i] ?? '-' }}</td>
|
||||||
|
<td>{{ isset($margin[$i]) ? number_format($margin[$i]) : '-' }}</td>
|
||||||
|
|
||||||
|
{{-- Jenis Pembiayaan: Jenis | Bil --}}
|
||||||
|
<td>
|
||||||
|
@if(isset($jenisPembiayaanKeys[$i]))
|
||||||
|
{{ $jenisLabels[$jenisPembiayaanKeys[$i]] ?? ucfirst($jenisPembiayaanKeys[$i]) }}
|
||||||
|
@else
|
||||||
|
-
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
|
<td>{{ $jenisPembiayaan[$i] ?? '-' }}</td>
|
||||||
|
</tr>
|
||||||
|
@endfor
|
||||||
|
@else
|
||||||
|
{{-- Show "Not Available" if no data at all --}}
|
||||||
|
<tr>
|
||||||
|
<td colspan="12" style="text-align: center; color: #999; font-style: italic;">
|
||||||
|
Not Available
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endif
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -164,7 +164,7 @@
|
|||||||
<table id="scan">
|
<table id="scan">
|
||||||
<tr>
|
<tr>
|
||||||
@php
|
@php
|
||||||
$api_url = request()->hostname;
|
$api_url = $api_url;
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
@if(Str::contains($api_url, 'apiv3.arrahn'))
|
@if(Str::contains($api_url, 'apiv3.arrahn'))
|
||||||
@@ -227,7 +227,7 @@
|
|||||||
@foreach($tuntutbaki as $index=>$item)
|
@foreach($tuntutbaki as $index=>$item)
|
||||||
@php $totaljumlah += $item['jumlah'] @endphp
|
@php $totaljumlah += $item['jumlah'] @endphp
|
||||||
@if($index > 0)
|
@if($index > 0)
|
||||||
@if($item['teller'] != $tuntutbaki[$index - 1]['teller'])
|
@if($item['teller'] != ($tuntutbaki[$index - 1]['teller'] ?? null))
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan=10>Teller : <b>{{ $item['teller'] }}</b></td>
|
<td colspan=10>Teller : <b>{{ $item['teller'] }}</b></td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -240,17 +240,20 @@
|
|||||||
@php $totalpinjamanteller = 0;$totalcajlelong = 0; @endphp
|
@php $totalpinjamanteller = 0;$totalcajlelong = 0; @endphp
|
||||||
|
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ $counter }}</td>
|
<td>{{ $counter }}</td>
|
||||||
<td style="width:100px">
|
<td style="width:100px">
|
||||||
@php
|
@php
|
||||||
|
//// $gadaidetail = Http::get($api_url . '/api/gadai/norujukan/' . $item['norujukan'])->json(); - code asal
|
||||||
$gadaidetail = Http::get($api_url . '/api/gadai/norujukan/' . $item['norujukan'])->json();
|
//// $gadaidetail = Http::withOptions(['verify' => config('app.api_verify')])->get($api_url . '/api/gadai/norujukankodcaw/' . $item['kodcaw'] . '/' . $item['norujukan'])->json();
|
||||||
$customer_detail = Http::get($api_url . '/api/customers/' . $gadaidetail[0][0]['nokp'])->json();
|
$gadaidetail = Http::get($api_url . '/api/gadai/norujukan/' . $item['kodcaw'] . '/' . $item['norujukan'])->json();
|
||||||
|
$customer_detail = Http::get($api_url . '/api/customers/' . $gadaidetail[0]['nokp'])->json();
|
||||||
echo $customer_detail['nama'];
|
echo $customer_detail['nama'];
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
<td style="width:100px">{{$gadaidetail[0][0]['nokp']}}</td>
|
<td style="width:100px">{{$gadaidetail[0]['nokp']}}</td>
|
||||||
<td style="width:100px">{{$item['norujukan']}}</td>
|
<td style="width:100px">{{$item['norujukan']}}</td>
|
||||||
<td>{{ $item['tarikh'] }}</td>
|
<td>{{ $item['tarikh'] }}</td>
|
||||||
<td>{{ $item['cajlelong'] }}</td>
|
<td>{{ $item['cajlelong'] }}</td>
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="bg-gray-900 opacity-50 hidden fixed inset-0 z-10" id="sidebarBackdrop"></div>
|
||||||
|
<div id="main-content" class="h-full w-full bg-gray-50 relative overflow-y-auto">
|
||||||
|
<main>
|
||||||
|
|
||||||
|
<div class="pt-6 px-4">
|
||||||
|
|
||||||
|
<breadcrumb :items="[{ 'title' : 'Pelanggan', 'icon' : 'fas fa-users' },{ 'title' : 'Barangkes', 'icon' : 'fas fa-box' }]"></breadcrumb>
|
||||||
|
|
||||||
|
<searchbarangkes-component kodcaw="{{ Auth::user()->cawangan }}"></searchbarangkes-component>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
@include('layouts.footer')
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<div>
|
||||||
|
<button type="button"
|
||||||
|
onclick="window.location.href='{{ route('simulate.generate') }}'"
|
||||||
|
class="bg-yellow-500 p-4 rounded text-white mr-4">
|
||||||
|
Jana Simulasi
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
{{-- <div class="bg-white p-6 shadow rounded-lg">
|
||||||
|
<button type="button"
|
||||||
|
onclick="window.location.href='{{ route('simulate.list') }}'"
|
||||||
|
class="focus:outline-none text-white bg-yellow-400 hover:bg-yellow-500 focus:ring-4 focus:ring-yellow-300 font-medium rounded-lg text-sm px-5 py-2.5 me-2 mb-2 dark:focus:ring-yellow-900">
|
||||||
|
Senarai Simulasi
|
||||||
|
</button>
|
||||||
|
</div> --}}
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<button type="button"
|
||||||
|
onclick="window.location.href='{{ route('simulate.list') }}'"
|
||||||
|
class="bg-yellow-500 p-4 rounded text-white">
|
||||||
|
Senarai Simulasi
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
@@ -48,6 +48,7 @@
|
|||||||
<th>Baki Pembiayaan (RM)</th>
|
<th>Baki Pembiayaan (RM)</th>
|
||||||
<th>Keuntungan (RM)</th>
|
<th>Keuntungan (RM)</th>
|
||||||
<th>Caj Lelong (RM)</th>
|
<th>Caj Lelong (RM)</th>
|
||||||
|
<th>Harga Asas (RM)</th>
|
||||||
<th>Harga Jual (RM)</th>
|
<th>Harga Jual (RM)</th>
|
||||||
<th>Baki(RM)</th>
|
<th>Baki(RM)</th>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -68,6 +69,7 @@
|
|||||||
<td>{{ $lelongan_detail['bakipjm'] }}</td>
|
<td>{{ $lelongan_detail['bakipjm'] }}</td>
|
||||||
<td>{{ $lelongan_detail['keuntungan'] }}</td>
|
<td>{{ $lelongan_detail['keuntungan'] }}</td>
|
||||||
<td>{{ $lelongan_detail['cajlelong'] }}</td>
|
<td>{{ $lelongan_detail['cajlelong'] }}</td>
|
||||||
|
<td>{{ $lelongan_detail['hargaasas'] }}</td>
|
||||||
<td>{{ $lelongan_detail['hargajual'] }}</td>
|
<td>{{ $lelongan_detail['hargajual'] }}</td>
|
||||||
<td>{{ $lelongan_detail['baki'] }}</td>
|
<td>{{ $lelongan_detail['baki'] }}</td>
|
||||||
|
|
||||||
@@ -87,6 +89,7 @@
|
|||||||
<td>{{ $teller_with_lelongan_data['data']['summary_lelongan_teller']['total_bakipjm'] }}</td>
|
<td>{{ $teller_with_lelongan_data['data']['summary_lelongan_teller']['total_bakipjm'] }}</td>
|
||||||
<td>{{ $teller_with_lelongan_data['data']['summary_lelongan_teller']['total_keuntungan'] }}</td>
|
<td>{{ $teller_with_lelongan_data['data']['summary_lelongan_teller']['total_keuntungan'] }}</td>
|
||||||
<td>{{ $teller_with_lelongan_data['data']['summary_lelongan_teller']['total_cajlelong'] }}</td>
|
<td>{{ $teller_with_lelongan_data['data']['summary_lelongan_teller']['total_cajlelong'] }}</td>
|
||||||
|
<td>{{ $teller_with_lelongan_data['data']['summary_lelongan_teller']['total_hargaasas'] }}</td>
|
||||||
<td>{{ $teller_with_lelongan_data['data']['summary_lelongan_teller']['total_hargajual'] }}</td>
|
<td>{{ $teller_with_lelongan_data['data']['summary_lelongan_teller']['total_hargajual'] }}</td>
|
||||||
<td>{{ $teller_with_lelongan_data['data']['summary_lelongan_teller']['total_baki'] }}</td>
|
<td>{{ $teller_with_lelongan_data['data']['summary_lelongan_teller']['total_baki'] }}</td>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,91 @@
|
|||||||
|
<table border="1" cellspacing="0" cellpadding="3">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th colspan="14" style="text-align: center; font-weight: bold; font-size: 16px;">
|
||||||
|
SENARAI LELONGAN KESELURUHAN
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th colspan="14" style="text-align: center;">
|
||||||
|
Cawangan: {{ $cawangan_detail['nama'] ?? '-' }} |
|
||||||
|
Tarikh: {{ $query['startDate'] ?? '-' }} hingga {{ $query['endDate'] ?? '-' }}
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
<tr><td colspan="14"> </td></tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<th>#</th>
|
||||||
|
<th>No Rujukan</th>
|
||||||
|
<th>Nama</th>
|
||||||
|
<th>No KP</th>
|
||||||
|
<th>Marhun</th>
|
||||||
|
<th>Berat</th>
|
||||||
|
<th>Nilai Marhun (RM)</th>
|
||||||
|
<th>Pembiayaan (RM)</th>
|
||||||
|
<th>%</th>
|
||||||
|
<th>Baki Pembiayaan (RM)</th>
|
||||||
|
<th>Keuntungan (RM)</th>
|
||||||
|
<th>Caj Lelong (RM)</th>
|
||||||
|
<th>Harga Asas (RM)</th>
|
||||||
|
<th>Harga Jual (RM)</th>
|
||||||
|
<th>Baki (RM)</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@php
|
||||||
|
$total_berat = 0;
|
||||||
|
$total_nilaimarhun = 0;
|
||||||
|
$total_pinjaman = 0;
|
||||||
|
$total_hargajual = 0;
|
||||||
|
$total_keuntungan = 0;
|
||||||
|
$total_cajlelong = 0;
|
||||||
|
$total_baki = 0;
|
||||||
|
$total_hargaasas = 0;
|
||||||
|
$row_no = 1;
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
@foreach ($lelongan_data as $item)
|
||||||
|
@php
|
||||||
|
$total_berat += (float) $item['berat'];
|
||||||
|
$total_nilaimarhun += (float) $item['nilai_marhun'];
|
||||||
|
$total_pinjaman += (float) $item['pinjaman'];
|
||||||
|
$total_hargajual += (float) $item['hargajual'];
|
||||||
|
$total_keuntungan += (float) ($item['keuntungan'] ?? 0);
|
||||||
|
$total_cajlelong += (float) ($item['cajlelong'] ?? 0);
|
||||||
|
$total_baki += (float) ($item['baki'] ?? 0);
|
||||||
|
$total_hargaasas += (float) ($item['hargaasas'] ?? 0);
|
||||||
|
@endphp
|
||||||
|
<tr>
|
||||||
|
<td>{{ $row_no++ }}</td>
|
||||||
|
<td>{{ $item['no_rujukan'] ?? '' }}</td>
|
||||||
|
<td>{{ $item['nama'] ?? '' }}</td>
|
||||||
|
<td>'{{ $item['no_kp'] ?? '' }}</td>
|
||||||
|
<td>{{ $item['marhun'] ?? 0 }}</td>
|
||||||
|
<td>{{ $item['berat'] ?? 0 }}</td>
|
||||||
|
<td>{{ $item['nilai_marhun'] ?? 0 }}</td>
|
||||||
|
<td>{{ $item['pinjaman'] ?? 0 }}</td>
|
||||||
|
<td>{{ $item['peratusan_margin_pinjaman'] ?? 0 }}</td>
|
||||||
|
<td>{{ $item['bakipjm'] ?? 0 }}</td>
|
||||||
|
<td>{{ $item['keuntungan'] ?? 0 }}</td>
|
||||||
|
<td>{{ $item['cajlelong'] ?? 0 }}</td>
|
||||||
|
<td>{{ $item['hargaasas'] ?? 0 }}</td>
|
||||||
|
<td>{{ $item['hargajual'] ?? 0 }}</td>
|
||||||
|
<td>{{ $item['baki'] ?? 0 }}</td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td colspan="5"><strong>Jumlah</strong></td>
|
||||||
|
<td><strong>{{ number_format($total_berat, 2) }}</strong></td>
|
||||||
|
<td><strong>{{ number_format($total_nilaimarhun, 2) }}</strong></td>
|
||||||
|
<td><strong>{{ number_format($total_pinjaman, 2) }}</strong></td>
|
||||||
|
<td></td>
|
||||||
|
<td><strong>{{ number_format($total_pinjaman, 2) }}</strong></td>
|
||||||
|
<td><strong>{{ number_format($total_keuntungan, 2) }}</strong></td>
|
||||||
|
<td><strong>{{ number_format($total_cajlelong, 2) }}</strong></td>
|
||||||
|
<td><strong>{{ number_format($total_hargaasas ?? 0, 2) }}</strong></td>
|
||||||
|
<td><strong>{{ number_format($total_hargajual, 2) }}</strong></td>
|
||||||
|
<td><strong>{{ number_format($total_baki, 2) }}</strong></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
@@ -35,6 +35,7 @@
|
|||||||
<th>Baki Pembiayaan(RM)</th>
|
<th>Baki Pembiayaan(RM)</th>
|
||||||
<th>Keuntungan(RM)</th>
|
<th>Keuntungan(RM)</th>
|
||||||
<th>Caj Lelong(RM)</th>
|
<th>Caj Lelong(RM)</th>
|
||||||
|
<th>Harga Asas(RM)</th>
|
||||||
<th>Harga Jual(RM)</th>
|
<th>Harga Jual(RM)</th>
|
||||||
<th>Baki(RM)</th>
|
<th>Baki(RM)</th>
|
||||||
|
|
||||||
@@ -49,6 +50,7 @@
|
|||||||
<td>{{ $data['summary_lelongan_teller']['total_bakipjm'] }}</td>
|
<td>{{ $data['summary_lelongan_teller']['total_bakipjm'] }}</td>
|
||||||
<td>{{ $data['summary_lelongan_teller']['total_keuntungan'] }}</td>
|
<td>{{ $data['summary_lelongan_teller']['total_keuntungan'] }}</td>
|
||||||
<td>{{ $data['summary_lelongan_teller']['total_cajlelong'] }}</td>
|
<td>{{ $data['summary_lelongan_teller']['total_cajlelong'] }}</td>
|
||||||
|
<td>{{ $data['summary_lelongan_teller']['total_hargaasas'] }}</td>
|
||||||
<td>{{ $data['summary_lelongan_teller']['total_hargajual'] }}</td>
|
<td>{{ $data['summary_lelongan_teller']['total_hargajual'] }}</td>
|
||||||
<td>{{ $data['summary_lelongan_teller']['total_baki'] }}</td>
|
<td>{{ $data['summary_lelongan_teller']['total_baki'] }}</td>
|
||||||
|
|
||||||
@@ -64,6 +66,7 @@
|
|||||||
<td>{{ $summary_lelongan['total_bakipjm'] }}</td>
|
<td>{{ $summary_lelongan['total_bakipjm'] }}</td>
|
||||||
<td>{{ $summary_lelongan['total_keuntungan'] }}</td>
|
<td>{{ $summary_lelongan['total_keuntungan'] }}</td>
|
||||||
<td>{{ $summary_lelongan['total_cajlelong'] }}</td>
|
<td>{{ $summary_lelongan['total_cajlelong'] }}</td>
|
||||||
|
<td>{{ $summary_lelongan['total_hargaasas'] }}</td>
|
||||||
<td>{{ $summary_lelongan['total_hargajual'] }}</td>
|
<td>{{ $summary_lelongan['total_hargajual'] }}</td>
|
||||||
<td>{{ $summary_lelongan['total_baki'] }}</td>
|
<td>{{ $summary_lelongan['total_baki'] }}</td>
|
||||||
|
|
||||||
|
|||||||
@@ -104,6 +104,36 @@
|
|||||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Transaksi Segera(By Masa)</h2>
|
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Transaksi Segera(By Masa)</h2>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
<div
|
||||||
|
class="bg-white ml-2 shadow border border-solid px-6 py-4 rounded-lg hover:bg-yellow-300 hover:transition-all mb-2 cursor-pointer">
|
||||||
|
<a href="{{ route('reports.saringan-gadaian.index', ['startDate' => now()->toDateString(), 'endDate' => now()->toDateString()]) }}" class="">
|
||||||
|
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Saringan Gadaian</h2>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="bg-white ml-2 shadow border border-solid px-6 py-4 rounded-lg hover:bg-yellow-300 hover:transition-all mb-2 cursor-pointer">
|
||||||
|
<a href="{{ route('reports.summary-wtd.index', ['startDate' => now()->toDateString(), 'endDate' => now()->toDateString()]) }}" class="">
|
||||||
|
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Selesai WTD</h2>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="bg-white ml-2 shadow border border-solid px-6 py-4 rounded-lg hover:bg-yellow-300 hover:transition-all mb-2 cursor-pointer">
|
||||||
|
<a href="{{ route('reports.dataPelanggan.index', ['startDate' => now()->toDateString(), 'endDate' => now()->toDateString()]) }}" class="">
|
||||||
|
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Data Pelanggan</h2>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="bg-white ml-2 shadow border border-solid px-6 py-4 rounded-lg hover:bg-yellow-300 hover:transition-all mb-2 cursor-pointer">
|
||||||
|
<a href="{{ route('reports.dataPelangganBycaw.index', ['startDate' => now()->toDateString(), 'endDate' => now()->toDateString()]) }}" class="">
|
||||||
|
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Data Pelanggan By Cawangan</h2>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="px-6 py-4 mb-2 ml-2 bg-white border border-solid rounded-lg shadow cursor-pointer hover:bg-yellow-300 hover:transition-all">
|
||||||
|
<a href="{{ route('reports.agingtebus.index', ['startDate' => now()->toDateString(), 'endDate' => now()->toDateString()]) }}" class="">
|
||||||
|
<h2 class="mx-auto text-2xl font-bold text-center uppercase">Keuntungan Penyelesaian Pembiayaan By Tempoh</h2>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -151,12 +151,14 @@
|
|||||||
|
|
||||||
@auth
|
@auth
|
||||||
<clock-component></clock-component>
|
<clock-component></clock-component>
|
||||||
<cawangan-component roles={{ Auth::user()->roles }}
|
<cawangan-component @clickEvent_="getText()" roles={{ Auth::user()->roles }}
|
||||||
route={{ Route::is('home') || Route::is('akaun.home') || Route::is('audit.index') ? 'ada' : 'tiada' }}
|
route={{ Route::is('home') || Route::is('akaun.home') || Route::is('audit.index') ? 'ada' : 'tiada' }}
|
||||||
akaun={{ Route::is('akaun.home') || Route::is('audit.index') ? 'yes' : 'no' }}>
|
akaun={{ Route::is('akaun.home') || Route::is('audit.index') ? 'yes' : 'no' }}
|
||||||
|
>
|
||||||
</cawangan-component>
|
</cawangan-component>
|
||||||
<div class="mx-auto">
|
<div class="mx-auto">
|
||||||
<a class="text-yellow-200 rounded bg-gray-400 px-6 py-3 font-bold mr-4 uppercase sm:invisible lg:visible xl:visible">
|
<a
|
||||||
|
class="text-yellow-200 rounded bg-gray-400 px-6 py-3 font-bold mr-4 uppercase sm:invisible lg:visible xl:visible">
|
||||||
{{ Auth::user()->roles }} : {{ Auth::user()->name }}
|
{{ Auth::user()->roles }} : {{ Auth::user()->name }}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -255,6 +257,15 @@
|
|||||||
<script>
|
<script>
|
||||||
let response_status = {!! json_encode(\Session::get('response_status')) !!};
|
let response_status = {!! json_encode(\Session::get('response_status')) !!};
|
||||||
let response_message = {!! json_encode(\Session::get('response_message')) !!};
|
let response_message = {!! json_encode(\Session::get('response_message')) !!};
|
||||||
|
let peti_besi_error_message = {!! json_encode(\Session::get('peti_besi_error_message')) !!};
|
||||||
|
|
||||||
|
if(peti_besi_error_message){
|
||||||
|
Swal.fire({
|
||||||
|
title: "Tiada Data",
|
||||||
|
text: peti_besi_error_message,
|
||||||
|
icon: "warning"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
let successToastMessage = document.querySelector('#success-toast-message')
|
let successToastMessage = document.querySelector('#success-toast-message')
|
||||||
let failToastMessage = document.querySelector('#fail-toast-message')
|
let failToastMessage = document.querySelector('#fail-toast-message')
|
||||||
|
|||||||
@@ -129,6 +129,18 @@
|
|||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
<a href="{{ route('wtd.debugWTD.home') }}" class="rounded mb-2 mr-2 {{ Route::is('wtd.debugWTD') || Route::is('wtd.debugWTD.home') ? 'bg-gray-200 rounded text-white-500' : 'hover:bg-yellow-300 ' }}">
|
||||||
|
<li class="flex w-full justify-between text-gray-600 hover:text-gray-500 cursor-pointer items-center ">
|
||||||
|
<div class="flex items-center">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10" />
|
||||||
|
</svg>
|
||||||
|
<span class="ml-2 text-lg">Debug Proses WTD</span>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</a>
|
||||||
|
|
||||||
{{-- <a href="#" class="rounded mb-2 mr-2 {{ Route::is('online') || Route::is('online.*') ? 'bg-gray-200 rounded text-white-500' : 'hover:bg-yellow-300 ' }}">
|
{{-- <a href="#" class="rounded mb-2 mr-2 {{ Route::is('online') || Route::is('online.*') ? 'bg-gray-200 rounded text-white-500' : 'hover:bg-yellow-300 ' }}">
|
||||||
<li class="flex w-full justify-between text-gray-600 hover:text-gray-500 cursor-pointer items-center ">
|
<li class="flex w-full justify-between text-gray-600 hover:text-gray-500 cursor-pointer items-center ">
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
@@ -179,7 +191,18 @@
|
|||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</a>
|
</a>
|
||||||
|
<a href="{{ route('barangkes') }}"
|
||||||
|
class="rounded mb-2 mr-2 {{ Route::is('barangkes') || Route::is('barangkes.*') ? 'bg-gray-200 text-white-500' : 'hover:bg-yellow-300' }}">
|
||||||
|
<li class="flex w-full justify-between text-gray-600 hover:text-gray-500 cursor-pointer items-center ">
|
||||||
|
<div class="flex items-center">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
|
||||||
|
class="bi bi-box-seam" viewBox="0 0 16 16">
|
||||||
|
<path d="M3.5 0a.5.5 0 0 0-.5.5v1.086l-1.553.777A.5.5 0 0 0 1 2.8v10.4a.5.5 0 0 0 .276.447l6 3a.5.5 0 0 0 .448 0l6-3A.5.5 0 0 0 14 13.2V2.8a.5.5 0 0 0-.447-.447L12 1.586V.5a.5.5 0 0 0-.5-.5h-8zM2 3.515 7.5 6.309v7.918L2 11.433V3.515zm6 10.712V6.309L14 3.515v7.918l-6 3.294zM12 2v.5L8 4.691 4 2.5V2h8z"/>
|
||||||
|
</svg>
|
||||||
|
<span class="ml-2 text-lg">Barang Kes</span>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</a>
|
||||||
<a href="{{ route('lelong') }}" class="rounded mb-2 mr-2 {{ Route::is('lelong') || Route::is('lelong.*') ? 'bg-gray-200 rounded text-white-500' : 'hover:bg-yellow-300 ' }}">
|
<a href="{{ route('lelong') }}" class="rounded mb-2 mr-2 {{ Route::is('lelong') || Route::is('lelong.*') ? 'bg-gray-200 rounded text-white-500' : 'hover:bg-yellow-300 ' }}">
|
||||||
<li class="flex w-full justify-between text-gray-600 hover:text-gray-500 cursor-pointer items-center ">
|
<li class="flex w-full justify-between text-gray-600 hover:text-gray-500 cursor-pointer items-center ">
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="bg-gray-900 opacity-50 hidden fixed inset-0 z-10" id="sidebarBackdrop"></div>
|
||||||
|
<div id="main-content" class="h-full w-full bg-gray-50 relative overflow-y-auto">
|
||||||
|
<main>
|
||||||
|
|
||||||
|
<div class="pt-6 px-4">
|
||||||
|
|
||||||
|
<breadcrumb :items="[{ 'title' : 'Pelanggan', 'icon' : 'fas fa-users' },{ 'title' : 'Barangkes', 'icon' : 'fas fa-box' }]"></breadcrumb>
|
||||||
|
|
||||||
|
<barangkes-pelanggan kodcaw="{{ Auth::user()->cawangan }}"></barangkes-pelanggan>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
@include('layouts.footer')
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="bg-gray-900 opacity-50 hidden fixed inset-0 z-10" id="sidebarBackdrop"></div>
|
||||||
|
<div id="main-content" class="h-full w-full bg-gray-50 relative overflow-y-auto">
|
||||||
|
<main >
|
||||||
|
|
||||||
|
<div class="pt-6 px-4">
|
||||||
|
|
||||||
|
<breadcrumb :items="[{ 'title' : 'Pelanggan', 'icon' : 'fas fa-users' },{ 'title' : 'Butiran', 'icon' : 'fas fa-users' }]"></breadcrumb>
|
||||||
|
|
||||||
|
<details-sag :customer="{{ json_encode($customer_info) }}" :gadai="{{ json_encode($gadai) }}" kodcaw="{{ Auth::user()->cawangan }}"></details-sag>
|
||||||
|
{{-- <details-sag :customer="{{ json_encode($customer_info) }}" :gadai="{{ json_encode($gadai) }}" kodcaw="{{ Auth::user()->cawangan }}" norujukan="{{ $norujukan }}"></details-sag> --}}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
@include('layouts.footer')
|
||||||
|
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
|
|
||||||
@@ -0,0 +1,276 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="bg-gray-900 opacity-50 hidden fixed inset-0 z-10" id="sidebarBackdrop"></div>
|
||||||
|
<div id="main-content" class="h-full w-full bg-gray-50 relative overflow-y-auto">
|
||||||
|
<main>
|
||||||
|
|
||||||
|
<div class="pt-6 px-4">
|
||||||
|
|
||||||
|
<breadcrumb
|
||||||
|
:items="[{ 'title': 'Laporan Keseluruhan', 'icon': 'fas fa-users', 'url': '{{ route('reports') }}' }, { 'title': 'Keuntungan Penyelesaian Pembiayaan By Tempoh', 'icon': 'fas fa-file' }]">
|
||||||
|
</breadcrumb>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<div class="flex w-full">
|
||||||
|
<div class="w-full xl:w-4/5 2xl:w-5/6 p-12 mx-auto">
|
||||||
|
<div class="bg-yellow-600 text-gray-200 text-lg px-6 py-4 rounded-t-lg">
|
||||||
|
<a href="/reports" class="router-link-active">
|
||||||
|
<i class="fas fa-backspace text-white"></i>
|
||||||
|
</a>
|
||||||
|
<span class="text-center mx-auto text-white font-bold">Keuntungan Penyelesaian Pembiayaan By Tempoh</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<form id="formAging" method="GET" action="{{ route('reports.agingtebus.show') }}">
|
||||||
|
|
||||||
|
<div class="rounded bg-white shadow p-6">
|
||||||
|
<div class="pb-6">
|
||||||
|
|
||||||
|
<label class="font-semibold text-gray-700 block pb-3">
|
||||||
|
Pilih Tarikh
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<div class="flex flex-wrap lg:flex-nowrap items-end gap-4">
|
||||||
|
|
||||||
|
{{-- Dari --}}
|
||||||
|
<div>
|
||||||
|
<label class="text-gray-600 block pb-1">
|
||||||
|
Dari
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<input
|
||||||
|
id="startDate"
|
||||||
|
name="startDate"
|
||||||
|
type="date"
|
||||||
|
value="{{ request()->startDate ?? $startDate ?? '' }}"
|
||||||
|
class="border border-yellow-600 rounded-lg px-4 py-3 bg-white text-gray-800 focus:ring-2 focus:ring-yellow-500 focus:outline-none transition-all duration-300 hover:border-yellow-500"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- Hingga --}}
|
||||||
|
<div>
|
||||||
|
<label class="text-gray-600 block pb-1">
|
||||||
|
Hingga
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<input
|
||||||
|
id="endDate"
|
||||||
|
name="endDate"
|
||||||
|
type="date"
|
||||||
|
value="{{ request()->endDate ?? $endDate ?? '' }}"
|
||||||
|
class="border border-yellow-600 rounded-lg px-4 py-3 bg-white text-gray-800 focus:ring-2 focus:ring-yellow-500 focus:outline-none transition-all duration-300 hover:border-yellow-500"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<input type="hidden" name="action" id="formAction" value="search">
|
||||||
|
|
||||||
|
{{-- Button Group --}}
|
||||||
|
<div class="flex gap-3 w-full md:w-auto">
|
||||||
|
|
||||||
|
{{-- Button Group --}}
|
||||||
|
<div class="flex gap-3">
|
||||||
|
|
||||||
|
{{-- Search --}}
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
onclick="setAction('search')"
|
||||||
|
class="border border-yellow-600 text-yellow-600 font-montserrat py-3 px-8 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300 whitespace-nowrap">
|
||||||
|
|
||||||
|
<i class="fas fa-magnifying-glass mr-2"></i>
|
||||||
|
Search
|
||||||
|
</button>
|
||||||
|
|
||||||
|
{{-- Excel --}}
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
onclick="setAction('excel')"
|
||||||
|
class="border border-yellow-600 text-yellow-600 py-3 px-8 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300 whitespace-nowrap">
|
||||||
|
|
||||||
|
<i class="fas fa-file-excel mr-2"></i>
|
||||||
|
Excel
|
||||||
|
</button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div kodcaw="operasi">
|
||||||
|
<div>
|
||||||
|
<!---->
|
||||||
|
<!---->
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<!---->
|
||||||
|
<!---->
|
||||||
|
</div>
|
||||||
|
<div class="flex justify-between mb-2">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@if(empty($aging))
|
||||||
|
<div class="alert alert-warning">
|
||||||
|
Tiada data dijumpai untuk tarikh {{ $endDate }}.
|
||||||
|
</div>
|
||||||
|
@else
|
||||||
|
<!-- <h1>Summary Report</h1> -->
|
||||||
|
|
||||||
|
<div class="overflow-x-auto">
|
||||||
|
<!-- Create a table with horizontal headers -->
|
||||||
|
<table class="table-auto w-full border-collapse border border-gray-200">
|
||||||
|
<thead class="bg-yellow-500 text-white">
|
||||||
|
<tr>
|
||||||
|
<th class="px-4 py-2 border">Bil.</th> <!-- Add Bilangan here -->
|
||||||
|
<th class="px-4 py-2 border">Cawangan</th>
|
||||||
|
@foreach ($aging[0]['summary_by_tempoh'] as $summary)
|
||||||
|
<th class="px-4 py-2 border" colspan="2">{{ $summary['label'] }}</th> <!-- Merge Tempoh with Bilangan and Jumlah -->
|
||||||
|
@endforeach
|
||||||
|
<th class="px-4 py-2 border" colspan="2">Keseluruhan</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th class="px-4 py-2 border"> </th> <!-- Empty for Bilangan Row -->
|
||||||
|
<th class="px-4 py-2 border"> </th> <!-- Empty for Cawangan Row -->
|
||||||
|
@foreach ($aging[0]['summary_by_tempoh'] as $summary)
|
||||||
|
<th class="px-4 py-2 border">Bil</th> <!-- Bilangan Column Title -->
|
||||||
|
<th class="px-4 py-2 border">RM</th> <!-- Jumlah Column Title -->
|
||||||
|
@endforeach
|
||||||
|
<th class="px-4 py-2 border">Bil</th>
|
||||||
|
<th class="px-4 py-2 border">RM</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
@php
|
||||||
|
$counter = 1;
|
||||||
|
|
||||||
|
$totalGrandCountByTempoh = array_fill(
|
||||||
|
0,
|
||||||
|
count($aging[0]['summary_by_tempoh']),
|
||||||
|
0
|
||||||
|
);
|
||||||
|
|
||||||
|
$totalGrandKeuntunganByTempoh = array_fill(
|
||||||
|
0,
|
||||||
|
count($aging[0]['summary_by_tempoh']),
|
||||||
|
0
|
||||||
|
);
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
@foreach ($aging as $branch)
|
||||||
|
|
||||||
|
@php
|
||||||
|
$totalCount = 0;
|
||||||
|
$totalKeuntungan = 0;
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="px-4 py-2 border">
|
||||||
|
{{ $counter++ }}
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td class="px-4 py-2 border font-bold">
|
||||||
|
{{ $branch['cawangan'] }}
|
||||||
|
</td>
|
||||||
|
|
||||||
|
@foreach ($branch['summary_by_tempoh'] as $index => $summary)
|
||||||
|
|
||||||
|
{{-- Bil --}}
|
||||||
|
<td class="px-4 py-2 border">
|
||||||
|
{{ $summary['count'] }}
|
||||||
|
</td>
|
||||||
|
|
||||||
|
{{-- RM --}}
|
||||||
|
<td class="px-4 py-2 border">
|
||||||
|
{{ number_format($summary['sum_bayaran_keuntungan_rebet'], 2) }}
|
||||||
|
</td>
|
||||||
|
|
||||||
|
@php
|
||||||
|
// Total per cawangan
|
||||||
|
$totalCount += $summary['count'];
|
||||||
|
|
||||||
|
$totalKeuntungan +=
|
||||||
|
$summary['sum_bayaran_keuntungan_rebet'];
|
||||||
|
|
||||||
|
// Grand total
|
||||||
|
$totalGrandCountByTempoh[$index] +=
|
||||||
|
$summary['count'];
|
||||||
|
|
||||||
|
$totalGrandKeuntunganByTempoh[$index] +=
|
||||||
|
$summary['sum_bayaran_keuntungan_rebet'];
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
@endforeach
|
||||||
|
|
||||||
|
{{-- Keseluruhan --}}
|
||||||
|
<td class="px-4 py-2 border">
|
||||||
|
{{ $totalCount }}
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td class="px-4 py-2 border">
|
||||||
|
{{ number_format($totalKeuntungan, 2) }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
@endforeach
|
||||||
|
</tbody>
|
||||||
|
|
||||||
|
<tfoot>
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<td class="px-4 py-2 border font-bold" colspan="2">
|
||||||
|
Total
|
||||||
|
</td>
|
||||||
|
|
||||||
|
@foreach ($totalGrandCountByTempoh as $index => $grandCount)
|
||||||
|
|
||||||
|
{{-- Grand total bil --}}
|
||||||
|
<td class="px-4 py-2 border">
|
||||||
|
{{ $grandCount }}
|
||||||
|
</td>
|
||||||
|
|
||||||
|
{{-- Grand total RM --}}
|
||||||
|
<td class="px-4 py-2 border">
|
||||||
|
{{ number_format($totalGrandKeuntunganByTempoh[$index], 2) }}
|
||||||
|
</td>
|
||||||
|
|
||||||
|
@endforeach
|
||||||
|
|
||||||
|
{{-- Total keseluruhan --}}
|
||||||
|
<td class="px-4 py-2 border">
|
||||||
|
{{ array_sum($totalGrandCountByTempoh) }}
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td class="px-4 py-2 border">
|
||||||
|
{{ number_format(array_sum($totalGrandKeuntunganByTempoh), 2) }}
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
@include('layouts.footer')
|
||||||
|
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
<!-- JavaScript to Change Action -->
|
||||||
|
<script>
|
||||||
|
function setAction(action) {
|
||||||
|
document.getElementById('formAction').value = action;
|
||||||
|
document.getElementById('formAging').submit();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -0,0 +1,241 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="bg-gray-900 opacity-50 hidden fixed inset-0 z-10" id="sidebarBackdrop"></div>
|
||||||
|
|
||||||
|
<div id="main-content" class="h-full w-full bg-gray-50 relative overflow-y-auto">
|
||||||
|
<main>
|
||||||
|
<div class="pt-6 px-4">
|
||||||
|
|
||||||
|
{{-- Breadcrumb --}}
|
||||||
|
<breadcrumb
|
||||||
|
:items="[
|
||||||
|
{ 'title': 'Laporan Keseluruhan', 'icon': 'fas fa-users', 'url': '{{ route('reports') }}' },
|
||||||
|
{ 'title': 'Data Pelanggan By Cawangan', 'icon': 'fas fa-users' }
|
||||||
|
]">
|
||||||
|
</breadcrumb>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
|
||||||
|
{{-- Error Alert --}}
|
||||||
|
@if ($errors->any())
|
||||||
|
<div class="flex justify-center mb-4">
|
||||||
|
<div class="flex items-center p-4 text-red-800 border-t-4 border-red-300 bg-red-50 px-10"
|
||||||
|
role="alert">
|
||||||
|
<svg class="w-4 h-4" xmlns="http://www.w3.org/2000/svg" fill="currentColor"
|
||||||
|
viewBox="0 0 20 20">
|
||||||
|
<path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5Z"/>
|
||||||
|
</svg>
|
||||||
|
<div class="ml-3 text-sm font-medium">
|
||||||
|
@foreach ($errors->all() as $error)
|
||||||
|
{{ $error }}
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
<div class="flex w-full">
|
||||||
|
<div class="xl:w-2/3 2xl:w-1/2 p-8 mx-auto">
|
||||||
|
|
||||||
|
{{-- Header --}}
|
||||||
|
<div class="bg-yellow-600 text-gray-200 text-lg px-6 py-4 rounded-t-lg">
|
||||||
|
<a href="{{ route('reports') }}">
|
||||||
|
<i class="fas fa-backspace text-white"></i>
|
||||||
|
</a>
|
||||||
|
<span class="text-white font-bold ml-2">
|
||||||
|
Laporan Data Pelanggan By Cawangan
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- FORM --}}
|
||||||
|
<form method="GET"
|
||||||
|
id="formStokAudit"
|
||||||
|
action="{{ route('reports.dataPelangganBycaw.show') }}">
|
||||||
|
|
||||||
|
<iframe name="downloadFrame" class="hidden"></iframe>
|
||||||
|
|
||||||
|
<div class="rounded bg-white shadow p-6">
|
||||||
|
|
||||||
|
{{-- Tahun --}}
|
||||||
|
<div class="pb-6">
|
||||||
|
<label class="font-semibold text-gray-700 block pb-1">
|
||||||
|
Tahun Laporan
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<div class="flex items-center">
|
||||||
|
<span class="text-gray-600 border rounded-l px-4 py-2 bg-gray-50">
|
||||||
|
Tahun
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<select name="year"
|
||||||
|
id="report_year"
|
||||||
|
class="border border-l-0 rounded-r px-4 py-2 w-40 mr-4"
|
||||||
|
required>
|
||||||
|
<option value="">-- Pilih Tahun --</option>
|
||||||
|
@for ($y = now()->year; $y >= 2019; $y--)
|
||||||
|
<option value="{{ $y }}">{{ $y }}</option>
|
||||||
|
@endfor
|
||||||
|
</select>
|
||||||
|
|
||||||
|
{{-- Hidden generate type --}}
|
||||||
|
<input type="radio" name="generateType" id="generateTypePdf" value="pdf" hidden>
|
||||||
|
<input type="radio" name="generateType" id="generateTypeExcel" value="excel" hidden>
|
||||||
|
|
||||||
|
{{-- Excel --}}
|
||||||
|
<button type="button" id="generateExcel"
|
||||||
|
class="border border-yellow-600 text-yellow-600 py-2 px-6
|
||||||
|
rounded-xl hover:bg-yellow-600 hover:text-white transition-all">
|
||||||
|
<i class="fas fa-file-excel mr-2"></i> Excel
|
||||||
|
</button>
|
||||||
|
|
||||||
|
{{-- PDF --}}
|
||||||
|
<button type="button" id="generatePdf"
|
||||||
|
class="border border-yellow-600 text-yellow-600 py-2 px-6 ml-4
|
||||||
|
rounded-xl hover:bg-yellow-600 hover:text-white transition-all">
|
||||||
|
<i class="fas fa-eye mr-2"></i> View
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- Pilih Cawangan --}}
|
||||||
|
<div class="pb-6">
|
||||||
|
<label class="font-semibold text-gray-700 block pb-2">
|
||||||
|
Pilih Cawangan
|
||||||
|
</label>
|
||||||
|
|
||||||
|
{{-- Select All --}}
|
||||||
|
<div class="mb-2">
|
||||||
|
<label class="inline-flex items-center">
|
||||||
|
<input type="checkbox" id="checkAllCawangan"
|
||||||
|
class="rounded border-gray-300">
|
||||||
|
<span class="ml-2 text-sm font-medium">Pilih Semua</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="cawanganContainer"
|
||||||
|
class="grid grid-cols-2 gap-3 max-h-64 overflow-y-auto
|
||||||
|
border rounded p-4 bg-gray-50 text-sm text-gray-500">
|
||||||
|
Memuatkan senarai cawangan...
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
@include('layouts.footer')
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- Loading Overlay --}}
|
||||||
|
<div id="loadingOverlay"
|
||||||
|
class="hidden fixed inset-0 bg-black bg-opacity-50 z-50 flex items-center justify-center">
|
||||||
|
<div class="bg-white p-6 rounded-xl flex flex-col items-center">
|
||||||
|
<svg class="animate-spin h-10 w-10 text-yellow-600 mb-4"
|
||||||
|
xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
|
||||||
|
<circle class="opacity-25" cx="12" cy="12" r="10"
|
||||||
|
stroke="currentColor" stroke-width="4"></circle>
|
||||||
|
</svg>
|
||||||
|
<span class="text-gray-700 font-semibold">
|
||||||
|
Sedang menjana laporan..
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
@push('additional_scripts')
|
||||||
|
<script>
|
||||||
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
|
|
||||||
|
const form = document.getElementById('formStokAudit');
|
||||||
|
const loading = document.getElementById('loadingOverlay');
|
||||||
|
|
||||||
|
const container = document.getElementById('cawanganContainer');
|
||||||
|
const checkAll = document.getElementById('checkAllCawangan');
|
||||||
|
|
||||||
|
let downloadFrame = null;
|
||||||
|
let forceHideTimeout = null;
|
||||||
|
|
||||||
|
// =====================
|
||||||
|
// Fetch Cawangan API
|
||||||
|
// =====================
|
||||||
|
fetch("{{ config('api.url') }}/api/cawangan")
|
||||||
|
.then(res => res.json())
|
||||||
|
.then(data => {
|
||||||
|
container.innerHTML = '';
|
||||||
|
if (!data.length) {
|
||||||
|
container.innerHTML = '<span class="text-gray-400">Tiada cawangan</span>';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
data.forEach(caw => {
|
||||||
|
container.innerHTML += `
|
||||||
|
<label class="flex items-center space-x-2">
|
||||||
|
<input type="checkbox"
|
||||||
|
name="cawangan[]"
|
||||||
|
value="${caw.kodcaw}"
|
||||||
|
class="cawangan-item rounded border-gray-300">
|
||||||
|
<span>${caw.kodcaw} - ${caw.details_caw}</span>
|
||||||
|
</label>
|
||||||
|
`;
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
container.innerHTML = '<span class="text-red-500">Gagal load cawangan</span>';
|
||||||
|
});
|
||||||
|
|
||||||
|
// =====================
|
||||||
|
// Select All Checkbox
|
||||||
|
// =====================
|
||||||
|
checkAll.addEventListener('change', function () {
|
||||||
|
document.querySelectorAll('.cawangan-item').forEach(cb => cb.checked = this.checked);
|
||||||
|
});
|
||||||
|
|
||||||
|
// =====================
|
||||||
|
// Submit Form Function
|
||||||
|
// =====================
|
||||||
|
function submitForm(isExcel = false) {
|
||||||
|
|
||||||
|
if (document.querySelectorAll('.cawangan-item:checked').length === 0) {
|
||||||
|
alert('Sila pilih sekurang-kurangnya satu cawangan');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// set generateType
|
||||||
|
if (isExcel) document.getElementById('generateTypeExcel').checked = true;
|
||||||
|
else document.getElementById('generateTypePdf').checked = true;
|
||||||
|
|
||||||
|
// Show loading
|
||||||
|
loading.classList.remove('hidden');
|
||||||
|
|
||||||
|
// Excel via iframe
|
||||||
|
if (isExcel) {
|
||||||
|
if (downloadFrame) downloadFrame.remove();
|
||||||
|
downloadFrame = document.createElement('iframe');
|
||||||
|
downloadFrame.name = 'downloadFrame';
|
||||||
|
downloadFrame.style.display = 'none';
|
||||||
|
document.body.appendChild(downloadFrame);
|
||||||
|
form.target = 'downloadFrame';
|
||||||
|
} else {
|
||||||
|
form.removeAttribute('target');
|
||||||
|
}
|
||||||
|
|
||||||
|
form.submit();
|
||||||
|
|
||||||
|
// Hide overlay after max 15 sec
|
||||||
|
forceHideTimeout = setTimeout(() => loading.classList.add('hidden'), 15000);
|
||||||
|
}
|
||||||
|
|
||||||
|
// =====================
|
||||||
|
// Button Handlers
|
||||||
|
// =====================
|
||||||
|
document.getElementById('generateExcel').addEventListener('click', () => submitForm(true));
|
||||||
|
document.getElementById('generatePdf').addEventListener('click', () => submitForm(false));
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
@endpush
|
||||||
@@ -0,0 +1,247 @@
|
|||||||
|
<style>
|
||||||
|
#header {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header td, #customers th {
|
||||||
|
|
||||||
|
padding:4px;
|
||||||
|
font-size:10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header tr:nth-child(even){background-color: #ffffff;}
|
||||||
|
|
||||||
|
#header tr:hover {background-color: #030101;}
|
||||||
|
|
||||||
|
#header th {
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
text-align: left;
|
||||||
|
padding:4px;
|
||||||
|
color:black;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#scan {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#scan td, #scan th {
|
||||||
|
|
||||||
|
padding: 8px;
|
||||||
|
font-size:11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#scan tr:nth-child(even){background-color: #ffffff;}
|
||||||
|
|
||||||
|
#scan tr:hover {background-color: #ddd;}
|
||||||
|
|
||||||
|
#scan th {
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
text-align: left;
|
||||||
|
padding:4px;
|
||||||
|
color:black;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#scan {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#scan td, #scan th {
|
||||||
|
border-collapse: collapse;
|
||||||
|
padding: 8px;
|
||||||
|
font-size:11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#scan tr:nth-child(even){background-color: #ffffff;}
|
||||||
|
|
||||||
|
#scan tr:hover {background-color: #ddd;}
|
||||||
|
|
||||||
|
#scan th {
|
||||||
|
border-collapse: collapse;
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
text-align: left;
|
||||||
|
padding:4px;
|
||||||
|
color:black;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#details {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#details td, #details th {
|
||||||
|
|
||||||
|
padding: 8px;
|
||||||
|
font-size:11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#details tr:nth-child(even){background-color: #ffffff;}
|
||||||
|
|
||||||
|
#details tr:hover {background-color: #ddd;}
|
||||||
|
|
||||||
|
#details th {
|
||||||
|
padding-top: 12px;
|
||||||
|
font-style:bold;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
text-align: left;
|
||||||
|
padding:4px;
|
||||||
|
color:black;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#sign {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sign td, #sign th {
|
||||||
|
|
||||||
|
padding: 8px;
|
||||||
|
font-size:11px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sign tr:nth-child(even){background-color: #ffffff;}
|
||||||
|
|
||||||
|
#sign tr:hover {background-color: #ddd;}
|
||||||
|
|
||||||
|
#sign th {
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
text-align: left;
|
||||||
|
padding:4px;
|
||||||
|
color:black;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<table id="header">
|
||||||
|
<tr>
|
||||||
|
<th rowspan="4" style="width:50px"><br><img src="{{ asset('img/ARRAHN1.png') }}" style="width:70px"></img></th>
|
||||||
|
<th colspan="1">KOPERASI PERMODALAN KELANTAN BERHAD</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Semua Cawangan</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<table id="scan">
|
||||||
|
<tr>
|
||||||
|
<th colspan="6"><b>Laporan Data Pelanggan</b></th>
|
||||||
|
<th colspan="3" style="text-align:right">
|
||||||
|
<b>Tarikh Cetak:</b> {{ $tarikh_cetak }}
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td style="width:120px"><b>TAHUN LAPORAN</b></td>
|
||||||
|
<td colspan="8">{{ $tebus_date }}</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<table id="details">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>No</th>
|
||||||
|
<th>Cawangan</th>
|
||||||
|
<!-- <th>Nama Pelanggan</th> -->
|
||||||
|
<th>No.Pelanggan</th>
|
||||||
|
<th>Umur</th>
|
||||||
|
<th>Jantina</th>
|
||||||
|
<th>Pekerjaan</th>
|
||||||
|
<th>Lokasi</th>
|
||||||
|
<th>Tempoh Pajakan</th>
|
||||||
|
<th>Tarikh Mula</th>
|
||||||
|
<th>Tarikh Tamat</th>
|
||||||
|
<th>Hari Sejak Transaksi Terakhir</th>
|
||||||
|
<th>Bil Transaksi</th>
|
||||||
|
<th>Bil Outstanding</th>
|
||||||
|
<th>Bil Tebus</th>
|
||||||
|
<th>Jumlah Pinjaman (RM)</th>
|
||||||
|
<th>Jumlah Ujrah (RM)</th>
|
||||||
|
<th>Tujuan Gadaian</th>
|
||||||
|
<th>Status Aktif</th>
|
||||||
|
<th>Cara Bayaran</th>
|
||||||
|
<th>Tarikh Lelong</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
@foreach($pelanggan as $index => $row)
|
||||||
|
<tr>
|
||||||
|
<td>{{ $index + 1 }}</td>
|
||||||
|
<td>{{ $row['cawangan'] }}</td>
|
||||||
|
<!-- <td>{{ strtoupper($row['nama']) }}</td> -->
|
||||||
|
<td>{{ $row['nopelanggan'] }}</td>
|
||||||
|
<td>{{ $row['umur'] }}</td>
|
||||||
|
<td>{{ $row['jantina'] }}</td>
|
||||||
|
<td>{{ $row['pekerjaan'] }}</td>
|
||||||
|
<td>{{ $row['daerah'] }}</td>
|
||||||
|
<td>{{ $row['tempoh_pajakan'] }}</td>
|
||||||
|
<td>{{ $row['tarikh_mula'] }}</td>
|
||||||
|
<td>{{ $row['tarikh_tamat'] }}</td>
|
||||||
|
<td>{{ $row['hari_sejak_transaksi'] }}</td>
|
||||||
|
<td>{{ $row['bil_transaksi'] }}</td>
|
||||||
|
<td>{{ $row['bil_outstanding'] }}</td>
|
||||||
|
<td>{{ $row['bil_tebus'] }}</td>
|
||||||
|
<td>{{ number_format($row['jumlah_pinjaman'], 2) }}</td>
|
||||||
|
<td>{{ number_format($row['jumlah_ujrah'], 2) }}</td>
|
||||||
|
<td>{{ $row['tujuan_gadai'] }}</td>
|
||||||
|
<td>{{ $row['status_aktif'] }}</td>
|
||||||
|
<td>{{ $row['cara_bayaran'] }}</td>
|
||||||
|
<td>{{ $row['tarikh_lelong'] }}</td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<table id="sign">
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td colspan="2"> .................................................................. </td>
|
||||||
|
<td> </td>
|
||||||
|
<td colspan="2">.................................................................. </td>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td colspan="2"><B> DI SEMAK</B> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td colspan="2"><B>DI SAHKAN </B></td>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
@@ -0,0 +1,223 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="bg-gray-900 opacity-50 hidden fixed inset-0 z-10" id="sidebarBackdrop"></div>
|
||||||
|
|
||||||
|
<div id="main-content" class="h-full w-full bg-gray-50 relative overflow-y-auto">
|
||||||
|
<main>
|
||||||
|
<div class="pt-6 px-4">
|
||||||
|
|
||||||
|
{{-- Breadcrumb --}}
|
||||||
|
<breadcrumb
|
||||||
|
:items="[
|
||||||
|
{ 'title': 'Laporan Keseluruhan', 'icon': 'fas fa-users', 'url': '{{ route('reports') }}' },
|
||||||
|
{ 'title': 'Data Pelanggan', 'icon': 'fas fa-users' }
|
||||||
|
]">
|
||||||
|
</breadcrumb>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
|
||||||
|
{{-- Error Alert --}}
|
||||||
|
@if ($errors->any())
|
||||||
|
<div id="error-alert" class="flex justify-center">
|
||||||
|
<div class="flex items-center p-4 text-red-800 border-t-4 border-red-300 bg-red-50 px-10"
|
||||||
|
role="alert">
|
||||||
|
<svg class="flex-shrink-0 w-4 h-4" xmlns="http://www.w3.org/2000/svg" fill="currentColor"
|
||||||
|
viewBox="0 0 20 20">
|
||||||
|
<path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM9.5 4a1.5 1.5 0 1 1 0 3
|
||||||
|
1.5 1.5 0 0 1 0-3ZM12 15H8a1 1 0 0 1 0-2h1v-3H8a1 1 0 0 1 0-2h2a1
|
||||||
|
1 0 0 1 1 1v4h1a1 1 0 0 1 0 2Z"/>
|
||||||
|
</svg>
|
||||||
|
<div class="ms-3 text-sm font-medium ml-2">
|
||||||
|
@foreach ($errors->all() as $error)
|
||||||
|
{{ $error }}
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
<div class="flex w-full">
|
||||||
|
<div class="xl:w-2/3 2xl:w-1/2 p-8 mx-auto">
|
||||||
|
|
||||||
|
{{-- Header --}}
|
||||||
|
<div class="bg-yellow-600 text-gray-200 text-lg px-6 py-4 rounded-t-lg">
|
||||||
|
<a href="{{ route('reports') }}">
|
||||||
|
<i class="fas fa-backspace text-white"></i>
|
||||||
|
</a>
|
||||||
|
<span class="text-white font-bold ml-2">
|
||||||
|
Laporan Data Pelanggan
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- FORM --}}
|
||||||
|
<form method="GET" id="formStokAudit"
|
||||||
|
action="{{ route('reports.dataPelanggan.show') }}">
|
||||||
|
<iframe name="downloadFrame" class="hidden"></iframe>
|
||||||
|
|
||||||
|
<div class="rounded bg-white shadow p-6">
|
||||||
|
|
||||||
|
{{-- Tahun --}}
|
||||||
|
<div class="pb-6">
|
||||||
|
<label class="font-semibold text-gray-700 block pb-1">
|
||||||
|
Tahun Laporan
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<div class="flex items-center">
|
||||||
|
<span
|
||||||
|
class="text-gray-600 border border-2 rounded-l px-4 py-2"
|
||||||
|
style="background-color: rgb(249, 250, 251);">
|
||||||
|
Tahun
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<select name="year" id="report_year"
|
||||||
|
class="border border-2 border-l-0 rounded-r px-4 py-2 w-40 mr-4"
|
||||||
|
required>
|
||||||
|
<option value="">-- Pilih Tahun --</option>
|
||||||
|
@for ($y = now()->year; $y >= 2019; $y--)
|
||||||
|
<option value="{{ $y }}">{{ $y }}</option>
|
||||||
|
@endfor
|
||||||
|
</select>
|
||||||
|
|
||||||
|
{{-- Hidden generate type --}}
|
||||||
|
<div class="hidden">
|
||||||
|
<input type="radio" name="generateType"
|
||||||
|
id="generateTypePdf" value="pdf">
|
||||||
|
<input type="radio" name="generateType"
|
||||||
|
id="generateTypeExcel" value="excel">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- Excel --}}
|
||||||
|
<button id="generateExcel" type="button"
|
||||||
|
class="border border-yellow-600 text-yellow-600 py-2 px-6
|
||||||
|
rounded-xl hover:bg-yellow-600 hover:text-white transition-all">
|
||||||
|
<i class="fas fa-file-excel mr-2"></i> Excel
|
||||||
|
</button>
|
||||||
|
|
||||||
|
{{-- PDF --}}
|
||||||
|
<button id="generatePdf" type="button"
|
||||||
|
class="border border-yellow-600 text-yellow-600 py-2 px-6 ml-4
|
||||||
|
rounded-xl hover:bg-yellow-600 hover:text-white transition-all">
|
||||||
|
<i class="fas fa-eye mr-2"></i> View
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
@include('layouts.footer')
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- Loading Overlay --}}
|
||||||
|
<div id="loadingOverlay"
|
||||||
|
class="hidden fixed inset-0 bg-black bg-opacity-50 z-50 flex items-center justify-center">
|
||||||
|
<div class="bg-white p-6 rounded-xl flex flex-col items-center">
|
||||||
|
<svg class="animate-spin h-10 w-10 text-yellow-600 mb-4"
|
||||||
|
xmlns="http://www.w3.org/2000/svg" fill="none"
|
||||||
|
viewBox="0 0 24 24">
|
||||||
|
<circle class="opacity-25" cx="12" cy="12" r="10"
|
||||||
|
stroke="currentColor" stroke-width="4"></circle>
|
||||||
|
<path class="opacity-75" fill="currentColor"
|
||||||
|
d="M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z">
|
||||||
|
</path>
|
||||||
|
</svg>
|
||||||
|
<span class="text-gray-700 font-semibold">
|
||||||
|
Sedang menjana laporan..
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
{{-- =======================
|
||||||
|
| Scripts
|
||||||
|
|======================= --}}
|
||||||
|
@push('additional_scripts')
|
||||||
|
<script>
|
||||||
|
document.addEventListener("DOMContentLoaded", function () {
|
||||||
|
|
||||||
|
const form = document.getElementById('formStokAudit');
|
||||||
|
const loading = document.getElementById('loadingOverlay');
|
||||||
|
|
||||||
|
let downloadFrame = null;
|
||||||
|
let forceHideTimeout = null;
|
||||||
|
let minLoadingTimeout = null;
|
||||||
|
|
||||||
|
function showLoading() {
|
||||||
|
loading.classList.remove('hidden');
|
||||||
|
}
|
||||||
|
|
||||||
|
function hideLoading() {
|
||||||
|
loading.classList.add('hidden');
|
||||||
|
|
||||||
|
clearTimeout(forceHideTimeout);
|
||||||
|
clearTimeout(minLoadingTimeout);
|
||||||
|
}
|
||||||
|
|
||||||
|
// =====================
|
||||||
|
// EXCEL DOWNLOAD
|
||||||
|
// =====================
|
||||||
|
document.getElementById('generateExcel').addEventListener("click", function () {
|
||||||
|
|
||||||
|
document.getElementById('generateTypeExcel').checked = true;
|
||||||
|
|
||||||
|
showLoading();
|
||||||
|
|
||||||
|
// Remove iframe lama
|
||||||
|
if (downloadFrame) downloadFrame.remove();
|
||||||
|
|
||||||
|
downloadFrame = document.createElement('iframe');
|
||||||
|
downloadFrame.name = 'downloadFrame';
|
||||||
|
downloadFrame.style.display = 'none';
|
||||||
|
document.body.appendChild(downloadFrame);
|
||||||
|
|
||||||
|
form.target = 'downloadFrame';
|
||||||
|
form.submit();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 🔐 Minimum loading time
|
||||||
|
* elak tutup terlalu awal
|
||||||
|
*/
|
||||||
|
minLoadingTimeout = setTimeout(() => {
|
||||||
|
// Lepas 5 saat, barulah loading boleh ditutup
|
||||||
|
}, 10000);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 🧯 Fallback safety
|
||||||
|
* Tutup paksa selepas 20 saat
|
||||||
|
*/
|
||||||
|
forceHideTimeout = setTimeout(() => {
|
||||||
|
hideLoading();
|
||||||
|
}, 20000);
|
||||||
|
});
|
||||||
|
|
||||||
|
// =====================
|
||||||
|
// PDF VIEW
|
||||||
|
// =====================
|
||||||
|
document.getElementById('generatePdf').addEventListener("click", function () {
|
||||||
|
|
||||||
|
document.getElementById('generateTypePdf').checked = true;
|
||||||
|
|
||||||
|
form.removeAttribute('target');
|
||||||
|
showLoading();
|
||||||
|
|
||||||
|
form.submit();
|
||||||
|
|
||||||
|
// PDF cepat → tutup awal
|
||||||
|
setTimeout(() => {
|
||||||
|
hideLoading();
|
||||||
|
}, 10000);
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
@endpush
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,245 @@
|
|||||||
|
<style>
|
||||||
|
#header {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header td, #customers th {
|
||||||
|
|
||||||
|
padding:4px;
|
||||||
|
font-size:10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header tr:nth-child(even){background-color: #ffffff;}
|
||||||
|
|
||||||
|
#header tr:hover {background-color: #ddd;}
|
||||||
|
|
||||||
|
#header th {
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
text-align: left;
|
||||||
|
padding:4px;
|
||||||
|
color:black;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#scan {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#scan td, #scan th {
|
||||||
|
|
||||||
|
padding: 8px;
|
||||||
|
font-size:11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#scan tr:nth-child(even){background-color: #ffffff;}
|
||||||
|
|
||||||
|
#scan tr:hover {background-color: #ddd;}
|
||||||
|
|
||||||
|
#scan th {
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
text-align: left;
|
||||||
|
padding:4px;
|
||||||
|
color:black;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#scan {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#scan td, #scan th {
|
||||||
|
border-collapse: collapse;
|
||||||
|
padding: 8px;
|
||||||
|
font-size:11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#scan tr:nth-child(even){background-color: #ffffff;}
|
||||||
|
|
||||||
|
#scan tr:hover {background-color: #ddd;}
|
||||||
|
|
||||||
|
#scan th {
|
||||||
|
border-collapse: collapse;
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
text-align: left;
|
||||||
|
padding:4px;
|
||||||
|
color:black;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#details {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#details td, #details th {
|
||||||
|
|
||||||
|
padding: 8px;
|
||||||
|
font-size:11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#details tr:nth-child(even){background-color: #ffffff;}
|
||||||
|
|
||||||
|
#details tr:hover {background-color: #ddd;}
|
||||||
|
|
||||||
|
#details th {
|
||||||
|
padding-top: 12px;
|
||||||
|
font-style:bold;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
text-align: left;
|
||||||
|
padding:4px;
|
||||||
|
color:black;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#sign {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sign td, #sign th {
|
||||||
|
|
||||||
|
padding: 8px;
|
||||||
|
font-size:11px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sign tr:nth-child(even){background-color: #ffffff;}
|
||||||
|
|
||||||
|
#sign tr:hover {background-color: #ddd;}
|
||||||
|
|
||||||
|
#sign th {
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
text-align: left;
|
||||||
|
padding:4px;
|
||||||
|
color:black;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<table id="header">
|
||||||
|
<tr>
|
||||||
|
<th rowspan="4" style="width:50px"><br><img src="{{ asset('img/ARRAHN1.png') }}" style="width:70px"></img></th>
|
||||||
|
<th colspan="1">KOPERASI PERMODALAN KELANTAN BERHAD</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Semua Cawangan</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<table id="scan">
|
||||||
|
<tr>
|
||||||
|
<th colspan="6"><b>Laporan Data Pelanggan</b></th>
|
||||||
|
<th colspan="3" style="text-align:right">
|
||||||
|
<b>Tarikh Cetak:</b> {{ $tarikh_cetak }}
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td style="width:120px"><b>TAHUN LAPORAN</b></td>
|
||||||
|
<td colspan="8">{{ $tebus_date }}</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<table id="details">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>No</th>
|
||||||
|
<th>Nama Pelanggan</th>
|
||||||
|
<th>No.Pelanggan</th>
|
||||||
|
<th>Umur</th>
|
||||||
|
<th>Jantina</th>
|
||||||
|
<th>Pekerjaan</th>
|
||||||
|
<th>Lokasi</th>
|
||||||
|
<th>Tempoh Pajakan</th>
|
||||||
|
<th>Tarikh Mula</th>
|
||||||
|
<th>Tarikh Tamat</th>
|
||||||
|
<th>Hari Sejak Transaksi Terakhir</th>
|
||||||
|
<th>Bil Transaksi</th>
|
||||||
|
<th>Bil Outstanding</th>
|
||||||
|
<th>Bil Tebus</th>
|
||||||
|
<th>Jumlah Pinjaman (RM)</th>
|
||||||
|
<th>Jumlah Ujrah (RM)</th>
|
||||||
|
<th>Tujuan Gadaian</th>
|
||||||
|
<th>Status Aktif</th>
|
||||||
|
<th>Cara Bayaran</th>
|
||||||
|
<th>Tarikh Lelong</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
@foreach($pelanggan as $index => $row)
|
||||||
|
<tr>
|
||||||
|
<td>{{ $index + 1 }}</td>
|
||||||
|
<td>{{ strtoupper($row['nama']) }}</td>
|
||||||
|
<td>{{ $row['nopelanggan'] }}</td>
|
||||||
|
<td>{{ $row['umur'] }}</td>
|
||||||
|
<td>{{ $row['jantina'] }}</td>
|
||||||
|
<td>{{ $row['pekerjaan'] }}</td>
|
||||||
|
<td>{{ $row['daerah'] }}</td>
|
||||||
|
<td>{{ $row['tempoh_pajakan'] }}</td>
|
||||||
|
<td>{{ $row['tarikh_mula'] }}</td>
|
||||||
|
<td>{{ $row['tarikh_tamat'] }}</td>
|
||||||
|
<td>{{ $row['hari_sejak_transaksi'] }}</td>
|
||||||
|
<td>{{ $row['bil_transaksi'] }}</td>
|
||||||
|
<td>{{ $row['bil_outstanding'] }}</td>
|
||||||
|
<td>{{ $row['bil_tebus'] }}</td>
|
||||||
|
<td>{{ number_format($row['jumlah_pinjaman'], 2) }}</td>
|
||||||
|
<td>{{ number_format($row['jumlah_ujrah'], 2) }}</td>
|
||||||
|
<td>{{ $row['tujuan_gadai'] }}</td>
|
||||||
|
<td>{{ $row['status_aktif'] }}</td>
|
||||||
|
<td>{{ $row['cara_bayaran'] }}</td>
|
||||||
|
<td>{{ $row['tarikh_lelong'] }}</td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<table id="sign">
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td colspan="2"> .................................................................. </td>
|
||||||
|
<td> </td>
|
||||||
|
<td colspan="2">.................................................................. </td>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td colspan="2"><B> DI SEMAK</B> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td colspan="2"><B>DI SAHKAN </B></td>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
@@ -89,6 +89,10 @@
|
|||||||
<th
|
<th
|
||||||
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||||
Pinjaman(RM)
|
Pinjaman(RM)
|
||||||
|
</th>
|
||||||
|
<th
|
||||||
|
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||||
|
Pendapatan 12 Bulan(RM)
|
||||||
</th>
|
</th>
|
||||||
<th
|
<th
|
||||||
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||||
@@ -101,6 +105,7 @@
|
|||||||
$totalberat = 0;
|
$totalberat = 0;
|
||||||
$totalnm = 0;
|
$totalnm = 0;
|
||||||
$totalpinjaman = 0;
|
$totalpinjaman = 0;
|
||||||
|
$totalupah12 = 0;
|
||||||
@endphp
|
@endphp
|
||||||
<tbody>
|
<tbody>
|
||||||
@forelse ($gadaian as $gadai)
|
@forelse ($gadaian as $gadai)
|
||||||
@@ -109,6 +114,8 @@
|
|||||||
$totalberat += $gadai['sum_berat'];
|
$totalberat += $gadai['sum_berat'];
|
||||||
$totalnm += $gadai['sum_nilai_marhun'];
|
$totalnm += $gadai['sum_nilai_marhun'];
|
||||||
$totalpinjaman += $gadai['sum_pinjaman'];
|
$totalpinjaman += $gadai['sum_pinjaman'];
|
||||||
|
$totalupah12 += $gadai['sum_upah_12'];
|
||||||
|
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
@@ -164,6 +171,14 @@
|
|||||||
{{ number_format($gadai['sum_pinjaman'], 2) }}</p>
|
{{ number_format($gadai['sum_pinjaman'], 2) }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
<div class="flex items-center">
|
||||||
|
<div class="ml-3">
|
||||||
|
<p class="text-gray-900 whitespace-no-wrap">
|
||||||
|
{{ number_format($gadai['sum_upah_12'], 2) }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
@@ -228,6 +243,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
<div class="flex items-center">
|
||||||
|
<div class="ml-3">
|
||||||
|
<p class="text-gray-900 whitespace-no-wrap">
|
||||||
|
{{ number_format($totalupah12,2) }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<div class="ml-3">
|
<div class="ml-3">
|
||||||
|
|||||||
@@ -110,6 +110,10 @@
|
|||||||
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||||
Caj Lelong(RM)
|
Caj Lelong(RM)
|
||||||
</th>
|
</th>
|
||||||
|
<th
|
||||||
|
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||||
|
Harga Asas(RM)
|
||||||
|
</th>
|
||||||
<th
|
<th
|
||||||
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||||
Harga Jual(RM)
|
Harga Jual(RM)
|
||||||
@@ -133,6 +137,7 @@
|
|||||||
$totalkeuntungan = 0;
|
$totalkeuntungan = 0;
|
||||||
$totalcajlelong = 0;
|
$totalcajlelong = 0;
|
||||||
$totalhargajual= 0;
|
$totalhargajual= 0;
|
||||||
|
$totalhargaasas= 0;
|
||||||
$totalbaki= 0;
|
$totalbaki= 0;
|
||||||
@endphp
|
@endphp
|
||||||
<tbody>
|
<tbody>
|
||||||
@@ -146,6 +151,7 @@
|
|||||||
$totalkeuntungan += $lelong['sum_bakiupah'];
|
$totalkeuntungan += $lelong['sum_bakiupah'];
|
||||||
$totalcajlelong+= $lelong['sum_cajlelong'];
|
$totalcajlelong+= $lelong['sum_cajlelong'];
|
||||||
$totalhargajual+= $lelong['sum_hargajual'];
|
$totalhargajual+= $lelong['sum_hargajual'];
|
||||||
|
$totalhargaasas+= $lelong['sum_hargaasas'];
|
||||||
$totalbaki+= $lelong['sum_baki'];
|
$totalbaki+= $lelong['sum_baki'];
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
@@ -227,6 +233,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
<div class="flex items-center">
|
||||||
|
<div class="ml-3">
|
||||||
|
<p class="text-gray-900 whitespace-no-wrap">
|
||||||
|
{{ number_format($lelong['sum_hargaasas'], 2) }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<div class="ml-3">
|
<div class="ml-3">
|
||||||
@@ -330,6 +344,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
<div class="flex items-center">
|
||||||
|
<div class="ml-3">
|
||||||
|
<p class="text-gray-900 whitespace-no-wrap">
|
||||||
|
{{ number_format($totalhargaasas,2) }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<div class="ml-3">
|
<div class="ml-3">
|
||||||
|
|||||||
@@ -51,6 +51,8 @@
|
|||||||
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-xs font-semibold text-gray-600 uppercase tracking-wider">No</th>
|
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-xs font-semibold text-gray-600 uppercase tracking-wider">No</th>
|
||||||
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-xs font-semibold text-gray-600 uppercase tracking-wider">Kod Cawangan</th>
|
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-xs font-semibold text-gray-600 uppercase tracking-wider">Kod Cawangan</th>
|
||||||
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-xs font-semibold text-gray-600 uppercase tracking-wider">Cawangan</th>
|
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-xs font-semibold text-gray-600 uppercase tracking-wider">Cawangan</th>
|
||||||
|
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-xs font-semibold text-gray-600 uppercase tracking-wider">Bil Pembiayaan (BRG KES)</th>
|
||||||
|
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-xs font-semibold text-gray-600 uppercase tracking-wider">Jumlah Pembiayaan (RM)</th>
|
||||||
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-xs font-semibold text-gray-600 uppercase tracking-wider">Bil Pembiayaan (SAG LAMA)</th>
|
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-xs font-semibold text-gray-600 uppercase tracking-wider">Bil Pembiayaan (SAG LAMA)</th>
|
||||||
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-xs font-semibold text-gray-600 uppercase tracking-wider">Jumlah Pembiayaan (RM)</th>
|
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-xs font-semibold text-gray-600 uppercase tracking-wider">Jumlah Pembiayaan (RM)</th>
|
||||||
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-xs font-semibold text-gray-600 uppercase tracking-wider">Bil Pembiayaan (SAG BARU)</th>
|
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-xs font-semibold text-gray-600 uppercase tracking-wider">Bil Pembiayaan (SAG BARU)</th>
|
||||||
@@ -61,8 +63,10 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@php
|
@php
|
||||||
|
$totalbilgadaikes = 0; // KES
|
||||||
$totalbilgadai = 0; // LAMA
|
$totalbilgadai = 0; // LAMA
|
||||||
$totalbilgadai2 = 0; // BARU
|
$totalbilgadai2 = 0; // BARU
|
||||||
|
$totalpinjamankes = 0; // KES
|
||||||
$totalpinjaman = 0; // LAMA
|
$totalpinjaman = 0; // LAMA
|
||||||
$totalpinjaman2 = 0; // BARU
|
$totalpinjaman2 = 0; // BARU
|
||||||
|
|
||||||
@@ -72,6 +76,8 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
@forelse ($outstanding as $outs)
|
@forelse ($outstanding as $outs)
|
||||||
@php
|
@php
|
||||||
|
$totalbilgadaikes += $outs['total_gadaian_kes'];
|
||||||
|
$totalpinjamankes += $outs['sum_pinjaman_kes'];
|
||||||
$totalbilgadai += $outs['total_gadaian'];
|
$totalbilgadai += $outs['total_gadaian'];
|
||||||
$totalpinjaman += $outs['sum_pinjaman'];
|
$totalpinjaman += $outs['sum_pinjaman'];
|
||||||
$totalbilgadai2 += $outs['total_gadaian2'];
|
$totalbilgadai2 += $outs['total_gadaian2'];
|
||||||
@@ -84,6 +90,8 @@
|
|||||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">{{ $loop->iteration }}</td>
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">{{ $loop->iteration }}</td>
|
||||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">{{ $outs['kodcaw'] }}</td>
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">{{ $outs['kodcaw'] }}</td>
|
||||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">{{ $outs['details_caw'] }}</td>
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">{{ $outs['details_caw'] }}</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">{{ $outs['total_gadaian_kes'] }}</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">{{ number_format($outs['sum_pinjaman_kes'], 2) }}</td>
|
||||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">{{ $outs['total_gadaian'] }}</td>
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">{{ $outs['total_gadaian'] }}</td>
|
||||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">{{ number_format($outs['sum_pinjaman'], 2) }}</td>
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">{{ number_format($outs['sum_pinjaman'], 2) }}</td>
|
||||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">{{ $outs['total_gadaian2'] }}</td>
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">{{ $outs['total_gadaian2'] }}</td>
|
||||||
@@ -99,6 +107,8 @@
|
|||||||
@endforelse
|
@endforelse
|
||||||
<tr class="font-semibold bg-gray-50">
|
<tr class="font-semibold bg-gray-50">
|
||||||
<td colspan="3" class="px-5 py-5 border-b border-gray-200 text-sm">Jumlah Keseluruhan</td>
|
<td colspan="3" class="px-5 py-5 border-b border-gray-200 text-sm">Jumlah Keseluruhan</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 text-sm">{{ $totalbilgadaikes }}</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 text-sm">{{ number_format($totalpinjamankes,2) }}</td>
|
||||||
<td class="px-5 py-5 border-b border-gray-200 text-sm">{{ $totalbilgadai }}</td>
|
<td class="px-5 py-5 border-b border-gray-200 text-sm">{{ $totalbilgadai }}</td>
|
||||||
<td class="px-5 py-5 border-b border-gray-200 text-sm">{{ number_format($totalpinjaman,2) }}</td>
|
<td class="px-5 py-5 border-b border-gray-200 text-sm">{{ number_format($totalpinjaman,2) }}</td>
|
||||||
<td class="px-5 py-5 border-b border-gray-200 text-sm">{{ $totalbilgadai2 }}</td>
|
<td class="px-5 py-5 border-b border-gray-200 text-sm">{{ $totalbilgadai2 }}</td>
|
||||||
|
|||||||
@@ -0,0 +1,176 @@
|
|||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td colspan="9" style="font-weight:bold; font-size:16px; text-align:center;">
|
||||||
|
LAPORAN SARINGAN PEMBIAYAAN
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="9" style="text-align:center;">
|
||||||
|
Cawangan : {{ $branch['details_caw'] ?? '-' }} ({{ $branch['kodcaw'] ?? '-' }})
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="9" style="text-align:center;">
|
||||||
|
Tempoh : {{ request()->startDate }} hingga {{ request()->endDate }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="9" style="text-align:center;">
|
||||||
|
Tarikh Dijana : {{ $generatedAt }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
|
||||||
|
<table border="1">
|
||||||
|
<thead>
|
||||||
|
<tr style="font-weight:bold; background:#f3f3f3;">
|
||||||
|
<th>Bil</th>
|
||||||
|
<th>No Rujukan Tebus</th>
|
||||||
|
<th>No Rujukan Gadai Balik</th>
|
||||||
|
<th>No KP</th>
|
||||||
|
<th>Berat (g)</th>
|
||||||
|
<th>Nilai Marhun (RM)</th>
|
||||||
|
<th>Pinjaman (RM)</th>
|
||||||
|
<th>Tag Lelong</th>
|
||||||
|
<th>Tarikh Gadai</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
{{-- ================= TGB LELONG ================= --}}
|
||||||
|
<tr>
|
||||||
|
<td colspan="9" style="font-weight:bold;">TGB LELONG</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
@php
|
||||||
|
$bil = 1;
|
||||||
|
$subBerat = $subNM = $subPinjam = 0;
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
@foreach ($tgb_lelong as $item)
|
||||||
|
<tr>
|
||||||
|
<td>{{ $bil++ }}</td>
|
||||||
|
<td>{{ $item['norujukan_tebus'] ?? null }}</td>
|
||||||
|
<td>{{ $item['norujukan_gadai_balik'] ?? null }}</td>
|
||||||
|
<td>{{ $item['nokp'] ?? null }}</td>
|
||||||
|
<td>{{ $item['berat'] ?? 0 }}</td>
|
||||||
|
<td>{{ $item['nilaimarhun'] ?? 0 }}</td>
|
||||||
|
<td>{{ $item['pinjaman'] ?? 0 }}</td>
|
||||||
|
<td>Ya</td>
|
||||||
|
<td>{{ $item['t_gadai'] ?? null }}</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
@php
|
||||||
|
$subBerat += $item['berat'] ?? 0;
|
||||||
|
$subNM += $item['nilaimarhun'] ?? 0;
|
||||||
|
$subPinjam += $item['pinjaman'] ?? 0;
|
||||||
|
@endphp
|
||||||
|
@endforeach
|
||||||
|
|
||||||
|
<tr style="font-weight:bold;">
|
||||||
|
<td colspan="4">Subtotal</td>
|
||||||
|
<td>{{ number_format($subBerat, 2) }}</td>
|
||||||
|
<td>{{ number_format($subNM, 2) }}</td>
|
||||||
|
<td>{{ number_format($subPinjam, 2) }}</td>
|
||||||
|
<td colspan="2"></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
{{-- ================= TGB BIASA ================= --}}
|
||||||
|
<tr>
|
||||||
|
<td colspan="9" style="font-weight:bold;">TGB BIASA</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
@php
|
||||||
|
$bil = 1;
|
||||||
|
$subBerat = $subNM = $subPinjam = 0;
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
@foreach ($tgb_biasa as $item)
|
||||||
|
<tr>
|
||||||
|
<td>{{ $bil++ }}</td>
|
||||||
|
<td>{{ $item['norujukan_tebus'] ?? null }}</td>
|
||||||
|
<td>{{ $item['norujukan_gadai_balik'] ?? null }}</td>
|
||||||
|
<td>{{ $item['nokp'] ?? null }}</td>
|
||||||
|
<td>{{ $item['berat'] ?? 0 }}</td>
|
||||||
|
<td>{{ $item['nilaimarhun'] ?? 0 }}</td>
|
||||||
|
<td>{{ $item['pinjaman'] ?? 0 }}</td>
|
||||||
|
<td>Tidak</td>
|
||||||
|
<td>{{ $item['t_gadai'] ?? null }}</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
@php
|
||||||
|
$subBerat += $item['berat'] ?? 0;
|
||||||
|
$subNM += $item['nilaimarhun'] ?? 0;
|
||||||
|
$subPinjam += $item['pinjaman'] ?? 0;
|
||||||
|
@endphp
|
||||||
|
@endforeach
|
||||||
|
|
||||||
|
<tr style="font-weight:bold;">
|
||||||
|
<td colspan="4">Subtotal</td>
|
||||||
|
<td>{{ number_format($subBerat, 2) }}</td>
|
||||||
|
<td>{{ number_format($subNM, 2) }}</td>
|
||||||
|
<td>{{ number_format($subPinjam, 2) }}</td>
|
||||||
|
<td colspan="2"></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
{{-- ================= GADAI BIASA ================= --}}
|
||||||
|
<tr>
|
||||||
|
<td colspan="9" style="font-weight:bold;">GADAI BIASA</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
@php
|
||||||
|
$bil = 1;
|
||||||
|
$subBerat = $subNM = $subPinjam = 0;
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
@foreach ($gadai_biasa as $item)
|
||||||
|
<tr>
|
||||||
|
<td>{{ $bil++ }}</td>
|
||||||
|
<td></td>
|
||||||
|
<td>{{ $item['norujukan_gadai_balik'] ?? null }}</td>
|
||||||
|
<td>{{ $item['nokp'] ?? null }}</td>
|
||||||
|
<td>{{ $item['berat'] ?? 0 }}</td>
|
||||||
|
<td>{{ $item['nilaimarhun'] ?? 0 }}</td>
|
||||||
|
<td>{{ $item['pinjaman'] ?? 0 }}</td>
|
||||||
|
<td></td>
|
||||||
|
<td>{{ $item['t_gadai'] ?? null }}</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
@php
|
||||||
|
$subBerat += $item['berat'] ?? 0;
|
||||||
|
$subNM += $item['nilaimarhun'] ?? 0;
|
||||||
|
$subPinjam += $item['pinjaman'] ?? 0;
|
||||||
|
@endphp
|
||||||
|
@endforeach
|
||||||
|
|
||||||
|
<tr style="font-weight:bold;">
|
||||||
|
<td colspan="4">Subtotal</td>
|
||||||
|
<td>{{ number_format($subBerat, 2) }}</td>
|
||||||
|
<td>{{ number_format($subNM, 2) }}</td>
|
||||||
|
<td>{{ number_format($subPinjam, 2) }}</td>
|
||||||
|
<td colspan="2"></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td colspan="4" style="font-weight:bold; background:#eee;">
|
||||||
|
JUMLAH KESELURUHAN
|
||||||
|
</td>
|
||||||
|
<td style="font-weight:bold;">
|
||||||
|
{{ number_format($grandTotal['berat'], 2) }}
|
||||||
|
</td>
|
||||||
|
<td style="font-weight:bold;">
|
||||||
|
{{ number_format($grandTotal['nilai'], 2) }}
|
||||||
|
</td>
|
||||||
|
<td style="font-weight:bold;">
|
||||||
|
{{ number_format($grandTotal['pinjaman'], 2) }}
|
||||||
|
</td>
|
||||||
|
<td colspan="2"></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
@@ -0,0 +1,328 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="bg-gray-900 opacity-50 hidden fixed inset-0 z-10" id="sidebarBackdrop"></div>
|
||||||
|
<div id="main-content" class="h-full w-full bg-gray-50 relative overflow-y-auto">
|
||||||
|
<main>
|
||||||
|
|
||||||
|
<div class="pt-6 px-4">
|
||||||
|
|
||||||
|
<breadcrumb
|
||||||
|
:items="[{ 'title': 'Laporan Keseluruhan', 'icon': 'fas fa-users', 'url': '{{ route('reports') }}' },
|
||||||
|
{ 'title': 'Gadaian', 'icon': 'fas fa-users' }
|
||||||
|
]">
|
||||||
|
</breadcrumb>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<div class="flex w-full">
|
||||||
|
<div class="xl:w-2/3 2xl:w-1/2 p-8 mx-auto">
|
||||||
|
<div class="bg-yellow-600 text-gray-200 text-lg px-6 py-4 rounded-t-lg"><a href="/reports"
|
||||||
|
class="router-link-active"><i class="fas fa-backspace text-white"></i></a> <span
|
||||||
|
class="text-center mx-auto text-white font-bold">Laporan Saringan Pembiayaan</span>
|
||||||
|
</div>
|
||||||
|
<form method="get" id="formgadaian" action="{{ route('reports.saringan-gadaian.index') }}">
|
||||||
|
<div class="rounded bg-white shadow p-6">
|
||||||
|
<div class="pb-6"><label for="username"
|
||||||
|
class="font-semibold text-gray-700 block pb-1">Tarikh</label>
|
||||||
|
<div class="flex">
|
||||||
|
<span
|
||||||
|
class="text-gray-600 border border-2 rounded-l px-4 py-2 whitespace-no-wrap"
|
||||||
|
style="background-color: rgb(249, 250, 251);">Mula</span>
|
||||||
|
<input id="tarikhmula" name="startDate" type="date"
|
||||||
|
value="{{ request()->startDate ?? $startDate }}"
|
||||||
|
class="border border-2 border-l-0 rounded-r px-4 py-2 w-80r mr-2">
|
||||||
|
<span
|
||||||
|
class="text-gray-600 border border-2 rounded-l px-4 py-2 whitespace-no-wrap"
|
||||||
|
style="background-color: rgb(249, 250, 251);">Hingga</span>
|
||||||
|
<input id="tarikhhingga" name="endDate" type="date"
|
||||||
|
value="{{ request()->endDate ?? $endDate }}"
|
||||||
|
class="border border-2 border-l-0 rounded-r px-4 py-2 w-80r mr-2">
|
||||||
|
<button
|
||||||
|
class="border border-yellow-600 text-yellow-600 font-montserrat py-2 px-8 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300 ml-5">
|
||||||
|
<i class="fas fa-magnifying-glass mr-2"></i>Search
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div kodcaw="operasi">
|
||||||
|
<div>
|
||||||
|
<!---->
|
||||||
|
<!---->
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<!---->
|
||||||
|
<!---->
|
||||||
|
</div>
|
||||||
|
<div class="flex justify-between mb-2">
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<table class="min-w-full leading-normal">
|
||||||
|
<thead class="text-center">
|
||||||
|
<tr>
|
||||||
|
<th
|
||||||
|
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||||
|
No
|
||||||
|
</th>
|
||||||
|
<th
|
||||||
|
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||||
|
Kod Cawangan
|
||||||
|
</th>
|
||||||
|
<th
|
||||||
|
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||||
|
Cawangan
|
||||||
|
</th>
|
||||||
|
<th
|
||||||
|
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||||
|
Jumlah Surat
|
||||||
|
</th>
|
||||||
|
|
||||||
|
<th
|
||||||
|
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||||
|
TGB Lelong
|
||||||
|
</th>
|
||||||
|
|
||||||
|
<th
|
||||||
|
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||||
|
TGB Biasa
|
||||||
|
</th>
|
||||||
|
|
||||||
|
<th
|
||||||
|
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||||
|
Gadai Biasa
|
||||||
|
</th>
|
||||||
|
|
||||||
|
|
||||||
|
<th
|
||||||
|
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||||
|
Berat (g)
|
||||||
|
</th>
|
||||||
|
<th
|
||||||
|
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||||
|
Nilai Marhun(RM)
|
||||||
|
</th>
|
||||||
|
<th
|
||||||
|
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||||
|
Pinjaman(RM)
|
||||||
|
</th>
|
||||||
|
<th
|
||||||
|
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||||
|
NM TGB Lelong
|
||||||
|
</th>
|
||||||
|
<th
|
||||||
|
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||||
|
NM TGB Biasa
|
||||||
|
</th>
|
||||||
|
<th
|
||||||
|
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||||
|
NM Gadai Biasa
|
||||||
|
</th>
|
||||||
|
<th
|
||||||
|
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||||
|
Pinjaman TGB Lelong(RM)
|
||||||
|
</th>
|
||||||
|
<th
|
||||||
|
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||||
|
Pinjaman TGB Biasa(RM)
|
||||||
|
</th>
|
||||||
|
<th
|
||||||
|
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||||
|
Pinjaman Gadai Biasa(RM)
|
||||||
|
</th>
|
||||||
|
<th
|
||||||
|
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||||
|
Action
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
@php
|
||||||
|
$totalbilgadai = 0; // jumlah semua surat
|
||||||
|
$total_tgb_lelong = 0;
|
||||||
|
$total_tgb_biasa = 0;
|
||||||
|
$total_gadai_biasa = 0;
|
||||||
|
$totalberat = 0;
|
||||||
|
$totalnm = 0;
|
||||||
|
$totalpinjaman = 0;
|
||||||
|
|
||||||
|
$total_nm_tgb_lelong = 0;
|
||||||
|
$total_nm_tgb_biasa = 0;
|
||||||
|
$total_nm_gadai_biasa = 0;
|
||||||
|
|
||||||
|
$total_pinjaman_tgb_lelong = 0;
|
||||||
|
$total_pinjaman_tgb_biasa = 0;
|
||||||
|
$total_pinjaman_gadai_biasa = 0;
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
@forelse ($gadaian as $gadai)
|
||||||
|
@php
|
||||||
|
// Jumlah semua surat
|
||||||
|
$totalbilgadai += $gadai['jumlah_surat'] ?? 0;
|
||||||
|
|
||||||
|
// Jumlah per kategori
|
||||||
|
$total_tgb_lelong += $gadai['total_tgb_lelong'] ?? 0;
|
||||||
|
$total_tgb_biasa += $gadai['total_tgb_biasa'] ?? 0;
|
||||||
|
$total_gadai_biasa += $gadai['total_gadai_biasa'] ?? 0;
|
||||||
|
|
||||||
|
// Jumlah nilai
|
||||||
|
$totalberat += $gadai['sum_berat'] ?? 0;
|
||||||
|
$totalnm += $gadai['sum_nilai_marhun'] ?? 0;
|
||||||
|
$totalpinjaman += $gadai['sum_pinjaman'] ?? 0;
|
||||||
|
|
||||||
|
$nm_tgb_lelong = $gadai['details'] ?? [];
|
||||||
|
$nm_tgb_lelong = collect($nm_tgb_lelong)
|
||||||
|
->where('jenis', 'TGB_LELONG')
|
||||||
|
->sum('nilaimarhun');
|
||||||
|
|
||||||
|
$nm_tgb_biasa = collect($gadai['details'] ?? [])
|
||||||
|
->where('jenis', 'TGB_BIASA')
|
||||||
|
->sum('nilaimarhun');
|
||||||
|
$nm_gadai_biasa = collect($gadai['details'] ?? [])
|
||||||
|
->where('jenis', 'GADAI_BIASA')
|
||||||
|
->sum('nilaimarhun');
|
||||||
|
|
||||||
|
$pinjaman_tgb_lelong = collect($gadai['details'] ?? [])
|
||||||
|
->where('jenis', 'TGB_LELONG')
|
||||||
|
->sum('pinjaman');
|
||||||
|
$pinjaman_tgb_biasa = collect($gadai['details'] ?? [])
|
||||||
|
->where('jenis', 'TGB_BIASA')
|
||||||
|
->sum('pinjaman');
|
||||||
|
$pinjaman_gadai_biasa = collect($gadai['details'] ?? [])
|
||||||
|
->where('jenis', 'GADAI_BIASA')
|
||||||
|
->sum('pinjaman');
|
||||||
|
|
||||||
|
$total_nm_tgb_lelong += $nm_tgb_lelong;
|
||||||
|
$total_nm_tgb_biasa += $nm_tgb_biasa;
|
||||||
|
$total_nm_gadai_biasa += $nm_gadai_biasa;
|
||||||
|
|
||||||
|
$total_pinjaman_tgb_lelong += $pinjaman_tgb_lelong;
|
||||||
|
$total_pinjaman_tgb_biasa += $pinjaman_tgb_biasa;
|
||||||
|
$total_pinjaman_gadai_biasa += $pinjaman_gadai_biasa;
|
||||||
|
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
<div class="ml-3">{{ $loop->iteration }}</div>
|
||||||
|
</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
<div class="ml-3">{{ $gadai['kodcaw'] }}</div>
|
||||||
|
</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
<div class="ml-3">{{ $gadai['details_caw'] }}</div>
|
||||||
|
</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
<div class="ml-3">{{ $gadai['jumlah_surat'] }}</div>
|
||||||
|
</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
<div class="ml-3">{{ $gadai['total_tgb_lelong'] }}</div>
|
||||||
|
</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
<div class="ml-3">{{ $gadai['total_tgb_biasa'] }}</div>
|
||||||
|
</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
<div class="ml-3">{{ $gadai['total_gadai_biasa'] }}</div>
|
||||||
|
</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
<div class="ml-3">{{ number_format($gadai['sum_berat'], 2) }}</div>
|
||||||
|
</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
<div class="ml-3">{{ number_format($gadai['sum_nilai_marhun'], 2) }}</div>
|
||||||
|
</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
<div class="ml-3">{{ number_format($gadai['sum_pinjaman'], 2) }}</div>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
{{ number_format($nm_tgb_lelong, 2) }}</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
{{ number_format($nm_tgb_biasa, 2) }}</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
{{ number_format($nm_gadai_biasa, 2) }}</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
{{ number_format($pinjaman_tgb_lelong, 2) }}</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
{{ number_format($pinjaman_tgb_biasa, 2) }}</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
{{ number_format($pinjaman_gadai_biasa, 2) }}</td>
|
||||||
|
|
||||||
|
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
<div class="ml-3">
|
||||||
|
<a href="{{ route('reports.saringan.gadaian.cawangan.excel', [$gadai['kodcaw'], 'startDate' => request()->startDate, 'endDate' => request()->endDate]) }}"
|
||||||
|
target="_blank" rel="noopener noreferrer"
|
||||||
|
class="border border-blue-600 text-blue-600 font-montserrat py-2 px-4 font-medium rounded-xl hover:bg-blue-600 hover:text-white transition-all duration-300">
|
||||||
|
<i class="fas fa-download mr-2"></i>Download
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@empty
|
||||||
|
<tr>
|
||||||
|
<td colspan="11"
|
||||||
|
class="px-5 py-5 border-b border-gray-200 bg-white text-sm text-center">
|
||||||
|
Data not available
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endforelse
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td colspan="3" class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
Jumlah Keseluruhan
|
||||||
|
</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
{{ $totalbilgadai }}
|
||||||
|
</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
{{ $total_tgb_lelong }}
|
||||||
|
</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
{{ $total_tgb_biasa }}
|
||||||
|
</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
{{ $total_gadai_biasa }}
|
||||||
|
</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
{{ number_format($totalberat, 2) }}
|
||||||
|
</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
{{ number_format($totalnm, 2) }}
|
||||||
|
</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
{{ number_format($totalpinjaman, 2) }}
|
||||||
|
</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
{{ number_format($total_nm_tgb_lelong, 2) }}</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
{{ number_format($total_nm_tgb_biasa, 2) }}</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
{{ number_format($total_nm_gadai_biasa, 2) }}</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
{{ number_format($total_pinjaman_tgb_lelong, 2) }}</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
{{ number_format($total_pinjaman_tgb_biasa, 2) }}</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
{{ number_format($total_pinjaman_gadai_biasa, 2) }}</td>
|
||||||
|
|
||||||
|
<td colspan="1"
|
||||||
|
class="px-5 py-5 border-b border-gray-200 bg-white text-sm text-center">
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
@include('layouts.footer')
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
@@ -15,10 +15,7 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
<div id="error-alert" class="flex justify-center">
|
<div id="error-alert" class="flex justify-center">
|
||||||
<div id="alert-border-2" class="flex items-center p-4 text-red-800 border-t-4 border-red-300 bg-red-50 dark:text-red-400 dark:bg-gray-800 dark:border-red-800 px-10" role="alert">
|
<div class="flex items-center p-4 text-red-800 border-t-4 border-red-300 bg-red-50 px-10" role="alert">
|
||||||
<svg class="flex-shrink-0 w-4 h-4" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20">
|
|
||||||
<path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM9.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM12 15H8a1 1 0 0 1 0-2h1v-3H8a1 1 0 0 1 0-2h2a1 1 0 0 1 1 1v4h1a1 1 0 0 1 0 2Z"/>
|
|
||||||
</svg>
|
|
||||||
<div class="ms-3 text-sm font-medium ml-2 ">
|
<div class="ms-3 text-sm font-medium ml-2 ">
|
||||||
@foreach ($errors->all() as $error)
|
@foreach ($errors->all() as $error)
|
||||||
{{ $error }}
|
{{ $error }}
|
||||||
@@ -29,58 +26,75 @@
|
|||||||
@endif
|
@endif
|
||||||
<div class="flex w-full">
|
<div class="flex w-full">
|
||||||
<div class="xl:w-2/3 2xl:w-1/2 p-8 mx-auto">
|
<div class="xl:w-2/3 2xl:w-1/2 p-8 mx-auto">
|
||||||
<div class="bg-yellow-600 text-gray-200 text-lg px-6 py-4 rounded-t-lg"><a href="/reports"
|
<div class="bg-yellow-600 text-gray-200 text-lg px-6 py-4 rounded-t-lg">
|
||||||
class="router-link-active"><i class="fas fa-backspace text-white"></i></a> <span
|
<a href="/reports">
|
||||||
class="text-center mx-auto text-white font-bold">Laporan Stok Audit</span></div>
|
<i class="fas fa-backspace text-white"></i>
|
||||||
|
</a>
|
||||||
|
<span class="text-center mx-auto text-white font-bold">
|
||||||
|
Laporan Stok Audit
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
<form method="get" id="formStokAudit" action="{{ route('reports.stok-audit.show') }}">
|
<form method="get" id="formStokAudit" action="{{ route('reports.stok-audit.show') }}">
|
||||||
<div class="rounded bg-white shadow p-6">
|
<div class="rounded bg-white shadow p-6">
|
||||||
<div class="pb-6"><label for="username"
|
|
||||||
class="font-semibold text-gray-700 block pb-1">Tarikh</label>
|
{{-- PILIHAN TARIKH --}}
|
||||||
|
<div class="pb-4">
|
||||||
|
<label class="font-semibold text-gray-700 block pb-1">
|
||||||
|
Pilihan Tarikh
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<div class="flex items-center space-x-6 mb-3">
|
||||||
|
<label class="flex items-center">
|
||||||
|
<input type="radio" name="dateOption" value="manual" checked class="mr-2">
|
||||||
|
Pilih Tarikh
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label class="flex items-center">
|
||||||
|
<input type="radio" name="dateOption" value="current" class="mr-2">
|
||||||
|
Tarikh Semasa (Hari Ini)
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<label class="font-semibold text-gray-700 block pb-1">
|
||||||
|
Tarikh
|
||||||
|
</label>
|
||||||
|
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<span
|
<span
|
||||||
class="text-gray-600 border border-2 rounded-l px-4 py-2 whitespace-no-wrap"
|
class="text-gray-600 border border-2 rounded-l px-4 py-2"
|
||||||
style="background-color: rgb(249, 250, 251);">Mula</span>
|
style="background-color: rgb(249, 250, 251);">
|
||||||
<input id="stock_audit_monthYear" name="monthYear" value=""
|
Pilih
|
||||||
class="border border-2 border-l-0 rounded-r px-4 py-2 w-80r mr-2">
|
</span>
|
||||||
|
|
||||||
|
<input type="date"
|
||||||
|
id="stock_audit_monthYear"
|
||||||
|
name="monthYear"
|
||||||
|
value=""
|
||||||
|
class="border border-2 border-l-0 rounded-r px-4 py-2 w-80 mr-2">
|
||||||
|
|
||||||
<div class="hidden">
|
<div class="hidden">
|
||||||
<input type="radio" name="generateType" id="generateTypePdf"
|
<input type="radio" name="generateType" id="generateTypePdf" value="pdf">
|
||||||
value="pdf">
|
<input type="radio" name="generateType" id="generateTypeExcel" value="excel">
|
||||||
<input type="radio" name="generateType" id="generateTypeExcel"
|
|
||||||
value="excel">
|
|
||||||
</div>
|
</div>
|
||||||
<button id="generateExcel"
|
<button id="generateExcel"
|
||||||
class="border border-yellow-600 text-yellow-600 font-montserrat py-2 px-8 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300 ml-5"
|
class="border border-yellow-600 text-yellow-600 py-2 px-8 rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300 ml-5"
|
||||||
type="button">
|
type="button">
|
||||||
<i class="fas fa-file-excel mr-2"></i>Excel
|
<i class="fas fa-file-excel mr-2"></i>Excel
|
||||||
</button>
|
</button>
|
||||||
<button id="generatePdf"
|
<button id="generatePdf"
|
||||||
class="border border-yellow-600 text-yellow-600 font-montserrat py-2 px-8 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300 ml-5"
|
class="border border-yellow-600 text-yellow-600 py-2 px-8 rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300 ml-5"
|
||||||
type="button">
|
type="button">
|
||||||
<i class="fas fa-eye mr-2"></i>View
|
<i class="fas fa-eye mr-2"></i>View
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div kodcaw="operasi">
|
|
||||||
<div>
|
|
||||||
<!---->
|
|
||||||
<!---->
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<!---->
|
|
||||||
<!---->
|
|
||||||
</div>
|
|
||||||
<div class="flex justify-between mb-2">
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
@include('layouts.footer')
|
@include('layouts.footer')
|
||||||
@@ -90,30 +104,58 @@
|
|||||||
|
|
||||||
@push('additional_scripts')
|
@push('additional_scripts')
|
||||||
<script>
|
<script>
|
||||||
document.addEventListener("DOMContentLoaded", function(event) {
|
document.addEventListener("DOMContentLoaded", function() {
|
||||||
|
|
||||||
let form = document.querySelector('#formStokAudit')
|
let form = document.querySelector('#formStokAudit');
|
||||||
|
|
||||||
document.querySelector('button#generatePdf').addEventListener("click", function(event) {
|
// ===== BUTTON PDF =====
|
||||||
|
document.querySelector('#generatePdf').addEventListener("click", function() {
|
||||||
document.querySelector('#generateTypePdf').checked = true;
|
document.querySelector('#generateTypePdf').checked = true;
|
||||||
form.submit();
|
form.submit();
|
||||||
})
|
});
|
||||||
|
|
||||||
document.querySelector('button#generateExcel').addEventListener("click", function(event) {
|
// ===== BUTTON EXCEL =====
|
||||||
|
document.querySelector('#generateExcel').addEventListener("click", function() {
|
||||||
document.querySelector('#generateTypeExcel').checked = true;
|
document.querySelector('#generateTypeExcel').checked = true;
|
||||||
form.submit();
|
form.submit();
|
||||||
})
|
});
|
||||||
|
|
||||||
|
// ===== TARIKH OPTION =====
|
||||||
|
const dateInput = document.getElementById('stock_audit_monthYear');
|
||||||
|
const dateOptions = document.querySelectorAll('input[name="dateOption"]');
|
||||||
|
|
||||||
|
dateOptions.forEach(option => {
|
||||||
|
option.addEventListener('change', function () {
|
||||||
|
|
||||||
|
if (this.value === 'current') {
|
||||||
|
|
||||||
|
let today = new Date();
|
||||||
|
let day = String(today.getDate()).padStart(2, '0');
|
||||||
|
let month = String(today.getMonth() + 1).padStart(2, '0');
|
||||||
|
let year = today.getFullYear();
|
||||||
|
|
||||||
|
dateInput.value = year + '-' + month + '-' + day;
|
||||||
|
|
||||||
|
// Ganti readOnly dengan disable
|
||||||
|
dateInput.disabled = true;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
dateInput.disabled = false;
|
||||||
|
dateInput.value = '';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// ===== AUTO HIDE ERROR =====
|
||||||
const errorAlert = document.getElementById("error-alert");
|
const errorAlert = document.getElementById("error-alert");
|
||||||
|
|
||||||
if (errorAlert) {
|
if (errorAlert) {
|
||||||
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
errorAlert.classList.add = "opacity-0";
|
errorAlert.classList.add("opacity-0");
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
errorAlert.style.display = "none";
|
errorAlert.style.display = "none";
|
||||||
}, 500)
|
}, 500);
|
||||||
}, 5000); // 5000 milliseconds = 5 seconds
|
}, 5000);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -0,0 +1,80 @@
|
|||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td colspan="9" style="font-weight:bold; font-size:16px; text-align:center;">
|
||||||
|
LAPORAN RUMUSAN WTD
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="9" style="text-align:center;">
|
||||||
|
Cawangan : {{ $branch['details_caw'] ?? '-' }} ({{ $branch['kodcaw'] ?? '-' }})
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="9" style="text-align:center;">
|
||||||
|
Tarikh : {{ $startDate }} hingga {{ $endDate }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="9" style="text-align:center;">
|
||||||
|
Tarikh Dijana : {{ $generatedAt }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<table border="1">
|
||||||
|
<thead>
|
||||||
|
<tr style="font-weight:bold; background:#f3f3f3;">
|
||||||
|
<th>Bil</th>
|
||||||
|
<th>Batch WTD</th>
|
||||||
|
<th>No Rujukan</th>
|
||||||
|
<th>No KP</th>
|
||||||
|
<th>Nama</th>
|
||||||
|
<th>Tarikh Proses</th>
|
||||||
|
<th>Jumlah (RM)</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
@php
|
||||||
|
$bil = 1;
|
||||||
|
$sum_baki = 0;
|
||||||
|
$jumlah = 0;
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
@foreach ($details as $item)
|
||||||
|
|
||||||
|
@php
|
||||||
|
$jumlah = $item['jumlah'];
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>{{ $bil++ }}</td>
|
||||||
|
<td>{{ $item['batchno'] ?? 0 }}</td>
|
||||||
|
<td>{{ $item['norujukan'] ?? null }}</td>
|
||||||
|
<td>{{ $item['nokp'] ?? null }}</td>
|
||||||
|
<td>{{ $item['nama_cust'] ?? null }}</td>
|
||||||
|
<td>{{ $item['t_proses'] ?? null }}</td>
|
||||||
|
<td>{{ number_format($jumlah, 2) }}</td>
|
||||||
|
</tr>
|
||||||
|
@php
|
||||||
|
$sum_baki += $item['jumlah'];
|
||||||
|
@endphp
|
||||||
|
@endforeach
|
||||||
|
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td colspan="6" style="font-weight:bold; background:#eee;">
|
||||||
|
JUMLAH KESELURUHAN
|
||||||
|
</td>
|
||||||
|
<td style="font-weight:bold;">
|
||||||
|
{{ number_format($sum_baki, 2) }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,165 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="bg-gray-900 opacity-50 hidden fixed inset-0 z-10" id="sidebarBackdrop"></div>
|
||||||
|
<div id="main-content" class="h-full w-full bg-gray-50 relative overflow-y-auto">
|
||||||
|
<main>
|
||||||
|
|
||||||
|
<div class="pt-6 px-4">
|
||||||
|
|
||||||
|
<breadcrumb
|
||||||
|
:items="[{ 'title': 'Laporan Keseluruhan', 'icon': 'fas fa-users', 'url': '{{ route('reports') }}' },
|
||||||
|
{ 'title': 'WTD', 'icon': 'fas fa-users' }
|
||||||
|
]">
|
||||||
|
</breadcrumb>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<div class="flex w-full">
|
||||||
|
<div class="xl:w-2/3 2xl:w-1/2 p-8 mx-auto">
|
||||||
|
<div class="bg-yellow-600 text-gray-200 text-lg px-6 py-4 rounded-t-lg"><a href="/reports"
|
||||||
|
class="router-link-active"><i class="fas fa-backspace text-white"></i></a> <span
|
||||||
|
class="text-center mx-auto text-white font-bold">Laporan Selesai WTD</span>
|
||||||
|
</div>
|
||||||
|
<form method="get" id="formwtd" action="{{ route('reports.summary-wtd.index') }}">
|
||||||
|
<div class="rounded bg-white shadow p-6">
|
||||||
|
<div class="pb-6"><label for="username"
|
||||||
|
class="font-semibold text-gray-700 block pb-1">Tarikh</label>
|
||||||
|
<div class="flex">
|
||||||
|
<span
|
||||||
|
class="text-gray-600 border border-2 rounded-l px-4 py-2 whitespace-no-wrap"
|
||||||
|
style="background-color: rgb(249, 250, 251);">Mula</span>
|
||||||
|
<input id="tarikhmula" name="startDate" type="date"
|
||||||
|
value="{{ request()->startDate ?? $startDate }}"
|
||||||
|
class="border border-2 border-l-0 rounded-r px-4 py-2 w-80r mr-2">
|
||||||
|
<span
|
||||||
|
class="text-gray-600 border border-2 rounded-l px-4 py-2 whitespace-no-wrap"
|
||||||
|
style="background-color: rgb(249, 250, 251);">Hingga</span>
|
||||||
|
<input id="tarikhhingga" name="endDate" type="date"
|
||||||
|
value="{{ request()->endDate ?? $endDate }}"
|
||||||
|
class="border border-2 border-l-0 rounded-r px-4 py-2 w-80r mr-2">
|
||||||
|
<button
|
||||||
|
class="border border-yellow-600 text-yellow-600 font-montserrat py-2 px-8 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300 ml-5">
|
||||||
|
<i class="fas fa-magnifying-glass mr-2"></i>Search
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div kodcaw="operasi">
|
||||||
|
<div>
|
||||||
|
<!---->
|
||||||
|
<!---->
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<!---->
|
||||||
|
<!---->
|
||||||
|
</div>
|
||||||
|
<div class="flex justify-between mb-2">
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<table class="min-w-full leading-normal">
|
||||||
|
<thead class="text-center">
|
||||||
|
<tr>
|
||||||
|
<th
|
||||||
|
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||||
|
No
|
||||||
|
</th>
|
||||||
|
<th
|
||||||
|
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||||
|
Kod Cawangan
|
||||||
|
</th>
|
||||||
|
<th
|
||||||
|
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||||
|
Cawangan
|
||||||
|
</th>
|
||||||
|
<th
|
||||||
|
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-center text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||||
|
Jumlah Surat
|
||||||
|
</th>
|
||||||
|
<th
|
||||||
|
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-center text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||||
|
Jumlah WTD Dihantar
|
||||||
|
</th>
|
||||||
|
<th
|
||||||
|
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-center text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||||
|
Action
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
@php
|
||||||
|
$totalsag = 0; // jumlah semua surat
|
||||||
|
$totalbaki = 0;
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
@forelse ($summarywtd ?? [] as $wtd)
|
||||||
|
@php
|
||||||
|
// Jumlah semua surat
|
||||||
|
$totalsag += $wtd['jumlah_surat'] ?? 0;
|
||||||
|
$totalbaki += $wtd['sum_baki'] ?? 0;
|
||||||
|
@endphp
|
||||||
|
<tr>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
<div class="ml-3">{{ $loop->iteration }}</div>
|
||||||
|
</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
<div class="ml-3">{{ $wtd['kodcaw'] }}</div>
|
||||||
|
</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
<div class="ml-3">{{ $wtd['details_caw'] }}</div>
|
||||||
|
</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
<div class="ml-3 text-right">{{ $wtd['jumlah_surat'] }}</div>
|
||||||
|
</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
<div class="ml-3 text-right">{{ number_format($wtd['sum_baki'], 2) }}</div>
|
||||||
|
</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
<div class="ml-3 text-center">
|
||||||
|
<a href="{{ route('reports.wtd.cawangan.excel', [$wtd['kodcaw'], 'startDate' => request()->startDate, 'endDate' => request()->endDate]) }}"
|
||||||
|
target="_blank" rel="noopener noreferrer"
|
||||||
|
class="border border-blue-600 text-blue-600 font-montserrat py-2 px-4 font-medium rounded-xl hover:bg-blue-600 hover:text-white transition-all duration-300">
|
||||||
|
<i class="fas fa-download mr-2"></i>Download
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@empty
|
||||||
|
<tr>
|
||||||
|
<td colspan="11"
|
||||||
|
class="px-5 py-5 border-b border-gray-200 bg-white text-sm text-center">
|
||||||
|
Data not available
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endforelse
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td colspan="3" class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
Jumlah Keseluruhan
|
||||||
|
</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm text-right">
|
||||||
|
{{ $totalsag }}
|
||||||
|
</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm text-right">
|
||||||
|
{{ number_format($totalbaki, 2) }}
|
||||||
|
</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm text-right"></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
@include('layouts.footer')
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
@@ -446,8 +446,7 @@ hr.new5 {
|
|||||||
<td></td>
|
<td></td>
|
||||||
<td colspan="3">Cagaran Diterima </td>
|
<td colspan="3">Cagaran Diterima </td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td colspan="3"> Ar-Rahn <br> <b>{{ Auth::user()->name }}</b></td>
|
<td colspan="3"> Ar-Rahn <br> <b>{{ optional(Auth::user())->name ?? '' }}</b></td>
|
||||||
|
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -549,7 +548,7 @@ hr.new5 {
|
|||||||
<td></td>
|
<td></td>
|
||||||
<td colspan="3">Cagaran Diterima </td>
|
<td colspan="3">Cagaran Diterima </td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td colspan="3"> Ar-Rahn <br> <b>{{ Auth::user()->name }}</b></td>
|
<td colspan="3"> Ar-Rahn <br> <b>{{ optional(Auth::user())->name ?? '' }}</b></td>
|
||||||
|
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -0,0 +1,702 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
window.print();
|
||||||
|
window.onfocus = function() {
|
||||||
|
window.close();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<style>
|
||||||
|
/* Red border */
|
||||||
|
hr.new1 {
|
||||||
|
border-top: 1px solid red;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Dashed red border */
|
||||||
|
hr.new2 {
|
||||||
|
border-top: 1px dashed red;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Dotted red border */
|
||||||
|
hr.new3 {
|
||||||
|
border-top: 1px dotted red;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Thick red border */
|
||||||
|
hr.new4 {
|
||||||
|
border: 1px solid red;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Large rounded green border */
|
||||||
|
hr.new5 {
|
||||||
|
border: 10px solid green;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#cust {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 20%;
|
||||||
|
font-size: 12px;
|
||||||
|
border: 1px solid black;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#cust td,
|
||||||
|
#cust th {
|
||||||
|
border: 0px solid;
|
||||||
|
padding: 3px;
|
||||||
|
font-size: 10px;
|
||||||
|
text-align: right;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#cust tr:nth-child(even) {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#cust tr:hover {
|
||||||
|
background-color: #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
#cust th {
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
text-align: right;
|
||||||
|
background-color: #d9deda;
|
||||||
|
color: black;
|
||||||
|
padding: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#cust {
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr.new1 {
|
||||||
|
border-top: 1px dotted black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.khazanah {
|
||||||
|
border: 1px solid black;
|
||||||
|
margin-left: 20px;
|
||||||
|
padding: 10px;
|
||||||
|
width: 250px;
|
||||||
|
transform: rotate(-90deg);
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#inside {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#inside td,
|
||||||
|
#inside th {
|
||||||
|
border: none;
|
||||||
|
padding: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#inside tr:nth-child(even) {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#inside tr:hover {
|
||||||
|
background-color: #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
#inside th {
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
text-align: left;
|
||||||
|
background-color: #4CAF50;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#semakan {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
margin-top: 40px;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#semakan td,
|
||||||
|
#semakan th {
|
||||||
|
border: none;
|
||||||
|
padding: 2px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#semakan tr:nth-child(even) {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#semakan tr:hover {
|
||||||
|
background-color: #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
#semakan th {
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
text-align: left;
|
||||||
|
background-color: #4CAF50;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
#salinan {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#salinan td,
|
||||||
|
#salinan th {
|
||||||
|
padding: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#salinan tr:nth-child(even) {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#salinan tr:hover {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#salinan th {
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
text-align: right;
|
||||||
|
background-color: #ffffff;
|
||||||
|
color: black;
|
||||||
|
padding: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#perjanjian {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
font-size: 12px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#perjanjian td,
|
||||||
|
#perjanjian th {
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
padding: 2px;
|
||||||
|
font-size: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#perjanjian tr:nth-child(even) {
|
||||||
|
background-color: #ffffff
|
||||||
|
}
|
||||||
|
|
||||||
|
#perjanjian tr:hover {
|
||||||
|
background-color: #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
#perjanjian th {
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
text-align: center;
|
||||||
|
background-color: #d9deda;
|
||||||
|
color: black;
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#keuntungan {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
font-size: 12px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#keuntungan td,
|
||||||
|
#keuntungan th {
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
padding: 2px;
|
||||||
|
font-size: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#keuntungan tr:nth-child(even) {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#keuntungan tr:hover {
|
||||||
|
background-color: #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
#keuntungan th {
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
text-align: center;
|
||||||
|
background-color: #d9deda;
|
||||||
|
color: black;
|
||||||
|
padding: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#payment {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 90%;
|
||||||
|
font-size: 13px;
|
||||||
|
border: 1px solid black;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#payment td,
|
||||||
|
#payment th {
|
||||||
|
border: 0px solid;
|
||||||
|
padding: 3px;
|
||||||
|
font-size: 15px;
|
||||||
|
text-align: left;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#payment tr:nth-child(even) {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#payment tr:hover {
|
||||||
|
background-color: #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
#payment th {
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
text-align: left;
|
||||||
|
background-color: #d9deda;
|
||||||
|
color: black;
|
||||||
|
padding: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#payment {
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
#akuan td,
|
||||||
|
#akuan th {
|
||||||
|
padding: 7px;
|
||||||
|
font-size: 10px;
|
||||||
|
padding: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#akuan tr:nth-child(even) {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#akuan tr:hover {
|
||||||
|
background-color: #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
#akuan th {
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
text-align: center;
|
||||||
|
background-color: #d9deda;
|
||||||
|
color: black;
|
||||||
|
padding: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-break {
|
||||||
|
page-break-before: always;
|
||||||
|
}
|
||||||
|
|
||||||
|
.formula {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#copy_cust {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 10%;
|
||||||
|
font-size: 12px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#copy_cust tr:nth-child(even) {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#copy_cust tr:hover {
|
||||||
|
background-color: #ffffff
|
||||||
|
}
|
||||||
|
|
||||||
|
#copy_cust th {
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
text-align: center;
|
||||||
|
background-color: #d9deda;
|
||||||
|
color: black;
|
||||||
|
padding: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#copy_cust {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 50%;
|
||||||
|
font-size: 12px;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#copy_cust td,
|
||||||
|
#copy_cust th {
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
padding: 2px;
|
||||||
|
font-size: 9px;
|
||||||
|
text-align: right;
|
||||||
|
width: 10%;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#copy_cust {
|
||||||
|
margin-right: 0px;
|
||||||
|
margin-left: auto
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#inside tr:nth-child(even) {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#inside tr:hover {
|
||||||
|
background-color: #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
#inside th {
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
text-align: center;
|
||||||
|
background-color: #d9deda;
|
||||||
|
color: black;
|
||||||
|
padding: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-style {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-style span {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
text-align: right;
|
||||||
|
background-color: #d9deda;
|
||||||
|
color: black;
|
||||||
|
padding: 2px;
|
||||||
|
font-size: 10px;
|
||||||
|
border: 1px solid black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.receipt-type-style {
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
height: 100%;
|
||||||
|
width:40px;
|
||||||
|
display:flex;
|
||||||
|
justify-content:center;
|
||||||
|
align-items:end;
|
||||||
|
font-size: 45px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<div class="header-style">
|
||||||
|
<!-- Logo Section -->
|
||||||
|
<div style="display: flex; align-items: center;">
|
||||||
|
<img src="{{ asset('img/pkb.png') }}" style="width: 80px; margin-right: 10px;" alt="KOPKB Logo" class="center">
|
||||||
|
<img src="{{ asset('img/ARRAHN1.png') }}" style="width: 50px;" alt="ARRAHN Logo" class="center">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Cawangan Info -->
|
||||||
|
<div style="display: flex; align-items: center; margin-top: 10px;">
|
||||||
|
<span style="color: #0a0b0b; font-weight: bold;">
|
||||||
|
<strong>{{ $cawangan_info["details_caw"] }}</strong>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Notice Section -->
|
||||||
|
<div style="margin-top: 10px;">
|
||||||
|
<span><strong>UNTUK KEGUNAAN PELANGGAN</strong></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<div style="position: relative">
|
||||||
|
<div class="receipt-type-style">A</div>
|
||||||
|
<table id="inside">
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">Nama</td>
|
||||||
|
<td>: {{ $customers_info['nama'] }} </td>
|
||||||
|
<td colspan="3"> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td><b> No SAG</b></td>
|
||||||
|
<td>: <b style="font-size:15px">{{ $transaction['norujukan'] }}</b> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">No K/P </td>
|
||||||
|
<td>: @php
|
||||||
|
if ($customers_info['kpbaru'] == '') {
|
||||||
|
echo $customers_info['kplama'];
|
||||||
|
} else {
|
||||||
|
echo $customers_info['kpbaru'];
|
||||||
|
}
|
||||||
|
@endphp </td>
|
||||||
|
<td colspan="3"> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td> Tarikh Bayar</td>
|
||||||
|
<td>: @php
|
||||||
|
$time = new DateTime($transaction['created_at']);
|
||||||
|
$date = $time->format('d/m/Y');
|
||||||
|
echo $date;
|
||||||
|
@endphp</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="7"> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td>Masa Bayaran</td>
|
||||||
|
@php
|
||||||
|
$masa_bayaran = strtotime($transaction['tarikh_bayaran']);
|
||||||
|
$masa = date('H:i:s', $masa_bayaran);
|
||||||
|
@endphp
|
||||||
|
<td>: {{ $masa }}</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<table id="payment" style="width: 60%">
|
||||||
|
<tr>
|
||||||
|
<td>Ansuran Pembiayaan</td>
|
||||||
|
<td>: RM {{ number_format($transaction['bayaran_pembiayaan'], 2) }} </td>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Keuntungan</td>
|
||||||
|
<td>: RM {{ number_format($transaction['onepercent'], 2) }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Lain-Lain Caj</td>
|
||||||
|
<td>: RM {{ number_format($transaction['ujrah'], 2) }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="font-size: 17px"><strong>Jumlah Bayaran</strong></td>
|
||||||
|
@php
|
||||||
|
$jumlah_perlu_dibayar = $transaction['bayaran_pembiayaan'] + $transaction['bayaran_keuntungan'] + $transaction['ujrah'];
|
||||||
|
@endphp
|
||||||
|
<td><strong>: RM {{ number_format($transaction['duit_masuk'], 2) }}</strong></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
{{-- <table id="payment" style="border: none; margin-top:20px; width: 60%">
|
||||||
|
<tr>
|
||||||
|
<td>Marhun: {{ $gadai['marhun'] }}</td>
|
||||||
|
</tr>
|
||||||
|
</table> --}}
|
||||||
|
<br>
|
||||||
|
<table id="semakan">
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">.................................................... </td>
|
||||||
|
<td colspan="9"></td>
|
||||||
|
<td colspan="3">.................................................... </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<td colspan="3">Pelanggan</td>
|
||||||
|
<td colspan="9"></td>
|
||||||
|
<td colspan="3">Teller</td>
|
||||||
|
</tr>
|
||||||
|
{{-- <tr>
|
||||||
|
<td colspan="3">{{ $customers_info['nama'] }}</td>
|
||||||
|
<td colspan="9"></td>
|
||||||
|
<td colspan="3">{{ Auth::user()->name }}</td>
|
||||||
|
</tr> --}}
|
||||||
|
</table>
|
||||||
|
<hr class="new2">
|
||||||
|
</hr>
|
||||||
|
</table>
|
||||||
|
<div class="header-style">
|
||||||
|
<div style="display: flex; align-items:center">
|
||||||
|
<img src="{{ asset('img/pkb.png') }}" style="width:80px; margin-right: 10px" alt="User Image"class="center">
|
||||||
|
<img src="{{ asset('img/ARRAHN1.png') }}" style="width:50px" alt="User Image" class="center">
|
||||||
|
</div>
|
||||||
|
<div style="display: flex; align-items: center;">
|
||||||
|
<span style="color: #0a0b0b; font-weight: bold;">
|
||||||
|
<strong>{{ $cawangan_info["details_caw"] }} (arOS V2)</strong>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<span><strong>UNTUK KEGUNAAN PEJABAT</strong></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<div style="position: relative">
|
||||||
|
<div class="receipt-type-style">A</div>
|
||||||
|
<table id="inside">
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">Nama</td>
|
||||||
|
<td>: {{ $customers_info['nama'] }} </td>
|
||||||
|
<td colspan="3"> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td><b> No SAG</b></td>
|
||||||
|
<td>: <b style="font-size:15px">{{ $transaction['norujukan'] }}</b> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">No K/P </td>
|
||||||
|
<td>: @php
|
||||||
|
if ($customers_info['kpbaru'] == '') {
|
||||||
|
echo $customers_info['kplama'];
|
||||||
|
} else {
|
||||||
|
echo $customers_info['kpbaru'];
|
||||||
|
}
|
||||||
|
@endphp </td>
|
||||||
|
<td colspan="3"> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td> Tarikh Bayar</td>
|
||||||
|
<td>: @php
|
||||||
|
$time = new DateTime($transaction['created_at']);
|
||||||
|
$date = $time->format('d/m/Y');
|
||||||
|
echo $date;
|
||||||
|
@endphp</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td colspan="7"> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td>Masa Bayaran</td>
|
||||||
|
@php
|
||||||
|
$masa_bayaran = strtotime($transaction['tarikh_bayaran']);
|
||||||
|
$masa = date('H:i:s', $masa_bayaran);
|
||||||
|
@endphp
|
||||||
|
<td>: {{ $masa }}</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<table id="payment" style="width: 60%">
|
||||||
|
<tr>
|
||||||
|
<td>Ansuran Pembiayaan</td>
|
||||||
|
<td>: RM {{ number_format($transaction['bayaran_pembiayaan'], 2) }} </td>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Keuntungan</td>
|
||||||
|
<td>: RM {{ number_format($transaction['onepercent'], 2) }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Lain-Lain Caj</td>
|
||||||
|
<td>: RM {{ number_format($transaction['ujrah'], 2) }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="font-size: 17px"><strong>Jumlah Bayaran</strong></td>
|
||||||
|
@php
|
||||||
|
$jumlah_perlu_dibayar = $transaction['bayaran_pembiayaan'] + $transaction['bayaran_keuntungan'] + $transaction['ujrah'];
|
||||||
|
@endphp
|
||||||
|
<td><strong>: RM {{ number_format($transaction['duit_masuk'], 2) }}</strong></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
{{-- <table id="payment" style="border: none; margin-top:20px; width: 60%">
|
||||||
|
<tr>
|
||||||
|
<td>Marhun: {{ $gadai['marhun'] }}</td>
|
||||||
|
</tr>
|
||||||
|
</table> --}}
|
||||||
|
<br>
|
||||||
|
<table id="semakan">
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">.................................................... </td>
|
||||||
|
<td colspan="9"></td>
|
||||||
|
<td colspan="3">.................................................... </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<td colspan="3">Pelanggan</td>
|
||||||
|
<td colspan="9"></td>
|
||||||
|
<td colspan="3">Teller</td>
|
||||||
|
</tr>
|
||||||
|
{{-- <tr>
|
||||||
|
<td colspan="3">{{ $customers_info['nama'] }}</td>
|
||||||
|
<td colspan="9"></td>
|
||||||
|
<td colspan="3">{{ Auth::user()->name }}</td>
|
||||||
|
</tr> --}}
|
||||||
|
</table>
|
||||||
|
<table id="inside" style="width: 45%; margin-top:20px">
|
||||||
|
<tr>
|
||||||
|
<td>Duit Pelanggan</td>
|
||||||
|
<td>: RM {{ number_format($transaction['duitpelanggan'], 2) }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Jumlah Perlu Dibayar</td>
|
||||||
|
<td>: RM {{ number_format($transaction['duit_masuk'], 2) }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Baki</td>
|
||||||
|
<td>: RM {{ number_format($transaction['bakipelanggan'], 2) }}</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table id="semakan">
|
||||||
|
<tr style="visibility: hidden">
|
||||||
|
<td colspan="3">.................................................... </td>
|
||||||
|
<td></td>
|
||||||
|
<td colspan="3">.................................................... </td>
|
||||||
|
<td></td>
|
||||||
|
<td colspan="3">.................................................... </td>
|
||||||
|
<td></td>
|
||||||
|
<td colspan="3">.................................................... </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
@@ -473,7 +473,7 @@ hr.new5 {
|
|||||||
<td></td>
|
<td></td>
|
||||||
<td colspan="3">Cagaran Diterima </td>
|
<td colspan="3">Cagaran Diterima </td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td colspan="3"> Ar-Rahn <br> <b>{{ Auth::user()->name }}</b></td>
|
<td colspan="3">Ar-Rahn <br> <b>{{ optional(Auth::user())->name ?? '' }}</b></td>
|
||||||
|
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
@@ -575,7 +575,7 @@ hr.new5 {
|
|||||||
<td></td>
|
<td></td>
|
||||||
<td colspan="3">Cagaran Diterima </td>
|
<td colspan="3">Cagaran Diterima </td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td colspan="3"> Ar-Rahn <br> <b>{{ Auth::user()->name }}</b></td>
|
<td colspan="3"> Ar-Rahn <br> <b>{{ optional(Auth::user())->name ?? '' }}</b></td>
|
||||||
|
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -0,0 +1,947 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
window.print();
|
||||||
|
window.onfocus = function() {
|
||||||
|
window.close();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<style>
|
||||||
|
/* Red border */
|
||||||
|
hr.new1 {
|
||||||
|
border-top: 1px solid red;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Dashed red border */
|
||||||
|
hr.new2 {
|
||||||
|
border-top: 1px dashed red;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Dotted red border */
|
||||||
|
hr.new3 {
|
||||||
|
border-top: 1px dotted red;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Thick red border */
|
||||||
|
hr.new4 {
|
||||||
|
border: 1px solid red;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Large rounded green border */
|
||||||
|
hr.new5 {
|
||||||
|
border: 10px solid green;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#cust {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 20%;
|
||||||
|
font-size: 12px;
|
||||||
|
border: 1px solid black;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#cust td,
|
||||||
|
#cust th {
|
||||||
|
border: 0px solid;
|
||||||
|
padding: 3px;
|
||||||
|
font-size: 10px;
|
||||||
|
text-align: right;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#cust tr:nth-child(even) {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#cust tr:hover {
|
||||||
|
background-color: #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
#cust th {
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
text-align: right;
|
||||||
|
background-color: #d9deda;
|
||||||
|
color: black;
|
||||||
|
padding: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#cust {
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<style>
|
||||||
|
hr.new1 {
|
||||||
|
border-top: 1px dotted black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.khazanah {
|
||||||
|
border: 1px solid black;
|
||||||
|
margin-left: 20px;
|
||||||
|
padding: 10px;
|
||||||
|
width: 250px;
|
||||||
|
transform: rotate(-90deg);
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#inside {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#inside td,
|
||||||
|
#inside th {
|
||||||
|
border: none;
|
||||||
|
padding: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#inside tr:nth-child(even) {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#inside tr:hover {
|
||||||
|
background-color: #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
#inside th {
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
text-align: left;
|
||||||
|
background-color: #4CAF50;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#semakan {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
margin-top: 40px;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#semakan td,
|
||||||
|
#semakan th {
|
||||||
|
border: none;
|
||||||
|
padding: 2px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#semakan tr:nth-child(even) {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#semakan tr:hover {
|
||||||
|
background-color: #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
#semakan th {
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
text-align: left;
|
||||||
|
background-color: #4CAF50;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#salinan {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#salinan td,
|
||||||
|
#salinan th {
|
||||||
|
padding: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#salinan tr:nth-child(even) {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#salinan tr:hover {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#salinan th {
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
text-align: right;
|
||||||
|
background-color: #ffffff;
|
||||||
|
color: black;
|
||||||
|
padding: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#perjanjian {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
font-size: 12px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#perjanjian td,
|
||||||
|
#perjanjian th {
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
padding: 2px;
|
||||||
|
font-size: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#perjanjian tr:nth-child(even) {
|
||||||
|
background-color: #ffffff
|
||||||
|
}
|
||||||
|
|
||||||
|
#perjanjian tr:hover {
|
||||||
|
background-color: #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
#perjanjian th {
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
text-align: center;
|
||||||
|
background-color: #d9deda;
|
||||||
|
color: black;
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#keuntungan {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
font-size: 12px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#keuntungan td,
|
||||||
|
#keuntungan th {
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
padding: 2px;
|
||||||
|
font-size: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#keuntungan tr:nth-child(even) {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#keuntungan tr:hover {
|
||||||
|
background-color: #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
#keuntungan th {
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
text-align: center;
|
||||||
|
background-color: #d9deda;
|
||||||
|
color: black;
|
||||||
|
padding: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#payment {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 60%;
|
||||||
|
font-size: 12px;
|
||||||
|
border: 1px solid black;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#payment td,
|
||||||
|
#payment th {
|
||||||
|
border: 0px solid;
|
||||||
|
padding: 3px;
|
||||||
|
font-size: 15px;
|
||||||
|
text-align: left;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#payment tr:nth-child(even) {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#payment tr:hover {
|
||||||
|
background-color: #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
#payment th {
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
text-align: left;
|
||||||
|
background-color: #d9deda;
|
||||||
|
color: black;
|
||||||
|
padding: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#payment {
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
#akuan td,
|
||||||
|
#akuan th {
|
||||||
|
padding: 7px;
|
||||||
|
font-size: 10px;
|
||||||
|
padding: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#akuan tr:nth-child(even) {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#akuan tr:hover {
|
||||||
|
background-color: #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
#akuan th {
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
text-align: center;
|
||||||
|
background-color: #d9deda;
|
||||||
|
color: black;
|
||||||
|
padding: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-break {
|
||||||
|
page-break-before: always;
|
||||||
|
}
|
||||||
|
|
||||||
|
.formula {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#copy_cust {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 10%;
|
||||||
|
font-size: 12px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#copy_cust tr:nth-child(even) {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#copy_cust tr:hover {
|
||||||
|
background-color: #ffffff
|
||||||
|
}
|
||||||
|
|
||||||
|
#copy_cust th {
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
text-align: center;
|
||||||
|
background-color: #d9deda;
|
||||||
|
color: black;
|
||||||
|
padding: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#copy_cust {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 50%;
|
||||||
|
font-size: 12px;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#copy_cust td,
|
||||||
|
#copy_cust th {
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
padding: 2px;
|
||||||
|
font-size: 10px;
|
||||||
|
text-align: right;
|
||||||
|
width: 10%;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#copy_cust {
|
||||||
|
margin-right: 0px;
|
||||||
|
margin-left: auto
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#inside tr:nth-child(even) {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#inside tr:hover {
|
||||||
|
background-color: #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
#inside th {
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
text-align: center;
|
||||||
|
background-color: #d9deda;
|
||||||
|
color: black;
|
||||||
|
padding: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-style {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-style span {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
text-align: right;
|
||||||
|
background-color: #d9deda;
|
||||||
|
color: black;
|
||||||
|
padding: 2px;
|
||||||
|
font-size: 10px;
|
||||||
|
border: 1px solid black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.center-table-style-border {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
border: 1px solid black
|
||||||
|
}
|
||||||
|
|
||||||
|
.center-table-style {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.receipt-type-style {
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
height: 100%;
|
||||||
|
width: 40px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: end;
|
||||||
|
font-size: 45px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-table-right {
|
||||||
|
border: none !important;
|
||||||
|
border-left: 1px solid !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-center {
|
||||||
|
text-align: center !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vertical-baseline {
|
||||||
|
vertical-align: baseline !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<div class="header-style">
|
||||||
|
<!-- Logo Section -->
|
||||||
|
<div style="display: flex; align-items: center;">
|
||||||
|
<img src="{{ asset('img/pkb.png') }}" style="width: 80px; margin-right: 10px;" alt="KOPKB Logo" class="center">
|
||||||
|
<img src="{{ asset('img/ARRAHN1.png') }}" style="width: 50px;" alt="ARRAHN Logo" class="center">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Cawangan Info -->
|
||||||
|
<div style="display: flex; align-items: center; margin-top: 10px;">
|
||||||
|
<span style="color: #0a0b0b; font-weight: bold;">
|
||||||
|
<strong>{{ $cawangan_info["details_caw"] }}</strong>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Notice Section -->
|
||||||
|
<div style="margin-top: 10px;">
|
||||||
|
<span><strong>UNTUK KEGUNAAN PELANGGAN</strong></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<div style="position: relative">
|
||||||
|
<div class="receipt-type-style">T</div>
|
||||||
|
<table id="inside">
|
||||||
|
|
||||||
|
@if (sizeof($wakil) != 0)
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">Nama Wakil</td>
|
||||||
|
<td class="text-center vertical-baseline">:</td>
|
||||||
|
<td class="vertical-baseline">{{ $wakil['nama'] }}</td>
|
||||||
|
<td colspan="2"> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td> <b>No SAG</b></td>
|
||||||
|
<td>: <b>{{ $gadai['norujukan'] }}</b> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">No K/P Wakil</td>
|
||||||
|
<td class="text-center vertical-baseline">:</td>
|
||||||
|
<td>{{ $wakil['nokp'] }}</td>
|
||||||
|
<td colspan="2"> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td> Tarikh Bayar</td>
|
||||||
|
<td>: @php
|
||||||
|
$time = new DateTime($penebusan['t_tebus']);
|
||||||
|
$date = $time->format('d/m/Y');
|
||||||
|
echo $date;
|
||||||
|
@endphp</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">No Telefon</td>
|
||||||
|
<td class="text-center vertical-baseline">:</td>
|
||||||
|
<td>{{ $wakil['telefon'] }}</td>
|
||||||
|
<td colspan="3"> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td>Masa Bayaran </td>
|
||||||
|
@php
|
||||||
|
$masa_bayaran = strtotime($transaction_tebus['tarikh_bayaran']);
|
||||||
|
$masa = date('H:i:s', $masa_bayaran);
|
||||||
|
@endphp
|
||||||
|
<td>: {{ $masa }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3" class="vertical-baseline">Alamat </td>
|
||||||
|
<td class="text-center vertical-baseline">:</td>
|
||||||
|
<td style="max-width: 180px">{{ $wakil['alamat1'] }}</td>
|
||||||
|
<td colspan="3"> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td class="vertical-baseline">Tempoh Simpan</td>
|
||||||
|
<td class="vertical-baseline">: {{ $gadai['tempoh'] }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">No Wakil</td>
|
||||||
|
<td class="text-center vertical-baseline">:</td>
|
||||||
|
<td>{{ sizeof($surat_wakil) == 0 ? '-' : $surat_wakil['no_surat'] }}</td>
|
||||||
|
<td colspan="7"> </td>
|
||||||
|
</tr>
|
||||||
|
@else
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">Nama</td>
|
||||||
|
<td>: {{ $customers_info['nama'] }} </td>
|
||||||
|
<td colspan="3"> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td><strong>No SAG</strong></td>
|
||||||
|
<td>: <strong>{{ $gadai['norujukan'] }}</strong></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">No K/P </td>
|
||||||
|
<td>: @php
|
||||||
|
if ($customers_info['kpbaru'] == '') {
|
||||||
|
echo $customers_info['kplama'];
|
||||||
|
} else {
|
||||||
|
echo $customers_info['kpbaru'];
|
||||||
|
}
|
||||||
|
@endphp</td>
|
||||||
|
<td colspan="3"> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td> Tarikh Bayar</td>
|
||||||
|
<td>: @php
|
||||||
|
$time = new DateTime($penebusan['t_tebus']);
|
||||||
|
$date = $time->format('d/m/Y');
|
||||||
|
echo $date;
|
||||||
|
@endphp</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td colspan="7"></td>
|
||||||
|
<td> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td>Masa Bayaran</td>
|
||||||
|
@php
|
||||||
|
$masa_bayaran = strtotime($transaction_tebus['tarikh_bayaran']);
|
||||||
|
$masa = date('H:i:s', $masa_bayaran);
|
||||||
|
@endphp
|
||||||
|
<td>: {{ $masa }}</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td colspan="7"></td>
|
||||||
|
<td> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td>Tempoh Simpan</td>
|
||||||
|
<td>: {{ $gadai['tempoh'] }}</td>
|
||||||
|
</tr>
|
||||||
|
@endif
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="{{ sizeof($wakil) != 0 ? 'center-table-style-border' : 'center-table-style' }}" style="margin-top: 10px">
|
||||||
|
@if (sizeof($wakil) != 0)
|
||||||
|
<table id="payment" style="border: none; height: fit-content">
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">Maklumat Pelanggan</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="width:75px" class="vertical-baseline">Nama</td>
|
||||||
|
<td style="width: 1px" class="text-center vertical-baseline">:</td>
|
||||||
|
<td style="">{{ $customers_info['nama'] }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="width:75px" class="vertical-baseline">No K/P</td>
|
||||||
|
<td style="width: 1px" class="text-center vertical-baseline">:</td>
|
||||||
|
<td>
|
||||||
|
@php
|
||||||
|
if ($customers_info['kpbaru'] == '') {
|
||||||
|
echo $customers_info['kplama'];
|
||||||
|
} else {
|
||||||
|
echo $customers_info['kpbaru'];
|
||||||
|
}
|
||||||
|
@endphp
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
@endif
|
||||||
|
<table id="payment" class="{{ sizeof($wakil) != 0 ? 'custom-table-right' : '' }}">
|
||||||
|
<tr>
|
||||||
|
<td style="width:10px">Baki Pembiayaan</td>
|
||||||
|
<td style="width:10px">: RM {{ number_format($gadai['bakipjm'], 2) }} </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="width:10px">Keuntungan</td>
|
||||||
|
<td style="width:10px">: RM {{ number_format($transaction_tebus['onepercent'], 2) }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="width:10px">(-) Rebat Untung</td>
|
||||||
|
<td style="width:10px">: RM
|
||||||
|
{{ number_format($totalrebate['onepercent'], 2) }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="width:10px">Lain-Lain Caj</td>
|
||||||
|
<td style="width:10px">: RM {{ number_format($transaction_tebus['ujrah'], 2) }} </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="width:10px">(-) Rebat Lain-Lain Caj</td>
|
||||||
|
<td style="width:10px">: RM
|
||||||
|
{{ number_format($totalrebate['ujrah'], 2) }} </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="font-size:17px"><strong>Jumlah Bayaran</strong></td>
|
||||||
|
<td style="font-size: 17px"><strong>: RM
|
||||||
|
{{ number_format($transaction_tebus['duit_masuk'], 2) }}</strong></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<table id="payment" style="border: none; margin-top:10px; width: 60%">
|
||||||
|
<tr>
|
||||||
|
<td>Marhun: {{ $gadai['marhun'] }}</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table id="semakan">
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">.................................................... </td>
|
||||||
|
<td></td>
|
||||||
|
<td colspan="3">.................................................... </td>
|
||||||
|
<td></td>
|
||||||
|
<td colspan="3">.................................................... </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">Teller</td>
|
||||||
|
<td></td>
|
||||||
|
<td colspan="3">{{ sizeof($wakil) != 0 ? 'Wakil' : 'Pelanggan' }}</td>
|
||||||
|
<td></td>
|
||||||
|
<td colspan="3">Khazanah</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
{{-- <tr> --}}
|
||||||
|
{{-- <td colspan="3">{{ Auth::user()->name }}</td> --}}
|
||||||
|
|
||||||
|
{{-- <td></td> --}}
|
||||||
|
{{-- <td colspan="3">{{ sizeof($wakil) != 0 ? $wakil['nama'] : $customers_info['nama'] }}</td> --}}
|
||||||
|
{{-- <td></td> --}}
|
||||||
|
{{-- <td colspan="3"> {{ $khazanah_user->name }}</td> --}} {{-- <td colspan="3">{{ $khazanah_user->name ?? '' }}</td> --}}
|
||||||
|
{{-- </tr> --}}
|
||||||
|
</table>
|
||||||
|
<hr class="new2">
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div class="header-style">
|
||||||
|
<div style="display: flex; align-items:center">
|
||||||
|
<img src="{{ asset('img/pkb.png') }}" style="width:80px; margin-right: 10px" alt="User Image"class="center">
|
||||||
|
<img src="{{ asset('img/ARRAHN1.png') }}" style="width:50px" alt="User Image" class="center">
|
||||||
|
</div>
|
||||||
|
<div style="display: flex; align-items: center;">
|
||||||
|
<span style="color: #0a0b0b; font-weight: bold;">
|
||||||
|
<strong>{{ $cawangan_info["details_caw"] }} (arOS V2)</strong>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<span><strong>UNTUK KEGUNAAN PEJABAT</strong></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<div style="position: relative">
|
||||||
|
<div class="receipt-type-style">T</div>
|
||||||
|
<table id="inside">
|
||||||
|
|
||||||
|
@if (sizeof($wakil) != 0)
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">Nama Wakil</td>
|
||||||
|
<td class="text-center vertical-baseline">:</td>
|
||||||
|
<td class="vertical-baseline">{{ $wakil['nama'] }}</td>
|
||||||
|
<td colspan="2"> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td> <b>No SAG</b></td>
|
||||||
|
<td>: <b>{{ $gadai['norujukan'] }}</b> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">No K/P Wakil</td>
|
||||||
|
<td class="text-center vertical-baseline">:</td>
|
||||||
|
<td>{{ $wakil['nokp'] }}</td>
|
||||||
|
<td colspan="2"> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td> Tarikh Bayar</td>
|
||||||
|
<td>: @php
|
||||||
|
$time = new DateTime($penebusan['t_tebus']);
|
||||||
|
$date = $time->format('d/m/Y');
|
||||||
|
echo $date;
|
||||||
|
@endphp</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">No Telefon</td>
|
||||||
|
<td class="text-center vertical-baseline">:</td>
|
||||||
|
<td>{{ $wakil['telefon'] }}</td>
|
||||||
|
<td colspan="3"> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td>Masa Bayaran </td>
|
||||||
|
@php
|
||||||
|
$masa_bayaran = strtotime($transaction_tebus['tarikh_bayaran']);
|
||||||
|
$masa = date('H:i:s', $masa_bayaran);
|
||||||
|
@endphp
|
||||||
|
<td>: {{ $masa }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3" class="vertical-baseline">Alamat </td>
|
||||||
|
<td class="text-center vertical-baseline">:</td>
|
||||||
|
<td style="max-width: 180px">{{ $wakil['alamat1'] }}</td>
|
||||||
|
<td colspan="3"> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td class="vertical-baseline">Tempoh Simpan</td>
|
||||||
|
<td class="vertical-baseline">: {{ $gadai['tempoh'] }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">No Wakil</td>
|
||||||
|
<td class="text-center vertical-baseline">:</td>
|
||||||
|
<td>{{ sizeof($surat_wakil) == 0 ? '-' : $surat_wakil['no_surat'] }}</td>
|
||||||
|
<td colspan="7"> </td>
|
||||||
|
</tr>
|
||||||
|
@else
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">Nama</td>
|
||||||
|
<td>: {{ $customers_info['nama'] }} </td>
|
||||||
|
<td colspan="3"> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td><strong>No SAG</strong></td>
|
||||||
|
<td>: <strong>{{ $gadai['norujukan'] }}</strong></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">No K/P </td>
|
||||||
|
<td>: @php
|
||||||
|
if ($customers_info['kpbaru'] == '') {
|
||||||
|
echo $customers_info['kplama'];
|
||||||
|
} else {
|
||||||
|
echo $customers_info['kpbaru'];
|
||||||
|
}
|
||||||
|
@endphp</td>
|
||||||
|
<td colspan="3"> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td> Tarikh Bayar</td>
|
||||||
|
<td>: @php
|
||||||
|
$time = new DateTime($penebusan['t_tebus']);
|
||||||
|
$date = $time->format('d/m/Y');
|
||||||
|
echo $date;
|
||||||
|
@endphp</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td colspan="7"></td>
|
||||||
|
<td> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td>Masa Bayaran</td>
|
||||||
|
@php
|
||||||
|
$masa_bayaran = strtotime($transaction_tebus['tarikh_bayaran']);
|
||||||
|
$masa = date('H:i:s', $masa_bayaran);
|
||||||
|
@endphp
|
||||||
|
<td>: {{ $masa }}</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td colspan="7"></td>
|
||||||
|
<td> </td>
|
||||||
|
<td> </td>
|
||||||
|
<td>Tempoh Simpan</td>
|
||||||
|
<td>: {{ $gadai['tempoh'] }}</td>
|
||||||
|
</tr>
|
||||||
|
@endif
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="{{ sizeof($wakil) != 0 ? 'center-table-style-border' : 'center-table-style' }}" style="margin-top: 10px">
|
||||||
|
@if (sizeof($wakil) != 0)
|
||||||
|
<table id="payment" style="border: none; height: fit-content">
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">Maklumat Pelanggan</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="width:75px" class="vertical-baseline">Nama</td>
|
||||||
|
<td style="width: 1px" class="text-center vertical-baseline">:</td>
|
||||||
|
<td style="">{{ $customers_info['nama'] }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="width:75px" class="vertical-baseline">No K/P</td>
|
||||||
|
<td style="width: 1px" class="text-center vertical-baseline">:</td>
|
||||||
|
<td>
|
||||||
|
@php
|
||||||
|
if ($customers_info['kpbaru'] == '') {
|
||||||
|
echo $customers_info['kplama'];
|
||||||
|
} else {
|
||||||
|
echo $customers_info['kpbaru'];
|
||||||
|
}
|
||||||
|
@endphp
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
@endif
|
||||||
|
<table id="payment" class="{{ sizeof($wakil) != 0 ? 'custom-table-right' : '' }}">
|
||||||
|
<tr>
|
||||||
|
<td style="width:10px">Baki Pembiayaan</td>
|
||||||
|
<td style="width:10px">: RM {{ number_format($gadai['bakipjm'], 2) }} </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="width:10px">Keuntungan</td>
|
||||||
|
<td style="width:10px">: RM {{ number_format($transaction_tebus['onepercent'], 2) }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="width:10px">(-) Rebat Untung</td>
|
||||||
|
<td style="width:10px">: RM
|
||||||
|
{{ number_format($totalrebate['onepercent'], 2) }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="width:10px">Lain-Lain Caj</td>
|
||||||
|
<td style="width:10px">: RM {{ number_format($transaction_tebus['ujrah'], 2) }} </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="width:10px">(-) Rebat Lain-Lain Caj</td>
|
||||||
|
<td style="width:10px">: RM
|
||||||
|
{{ number_format($totalrebate['ujrah'], 2) }} </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="font-size:17px"><strong>Jumlah Bayaran</strong></td>
|
||||||
|
<td style="font-size: 17px"><strong>: RM
|
||||||
|
{{ number_format($transaction_tebus['duit_masuk'], 2) }}</strong></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<table id="payment" style="border: none; margin-top:10px; width: 60%">
|
||||||
|
<tr>
|
||||||
|
<td>Marhun: {{ $gadai['marhun'] }}</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table id="semakan">
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">.................................................... </td>
|
||||||
|
<td></td>
|
||||||
|
<td colspan="3">.................................................... </td>
|
||||||
|
<td></td>
|
||||||
|
<td colspan="3">.................................................... </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">Teller</td>
|
||||||
|
<td></td>
|
||||||
|
<td colspan="3">{{ sizeof($wakil) != 0 ? 'Wakil' : 'Pelanggan' }}</td>
|
||||||
|
<td></td>
|
||||||
|
<td colspan="3">Khazanah</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
{{-- <tr>
|
||||||
|
<td colspan="3"> {{ Auth::user()->name }}</td>
|
||||||
|
<td></td>
|
||||||
|
<td colspan="3">{{ sizeof($wakil) != 0 ? $wakil['nama'] : $customers_info['nama'] }}</td>
|
||||||
|
<td></td> --}}
|
||||||
|
{{-- <td colspan="3">{{ $khazanah_user->name }}</td> --}}
|
||||||
|
{{-- <td colspan="3">{{ $khazanah_user->name ?? '-' }}</td>
|
||||||
|
</tr> --}}
|
||||||
|
</table>
|
||||||
|
<table id="inside" style="width: 45%; margin-top:20px">
|
||||||
|
<tr>
|
||||||
|
<td>Duit Pelanggan</td>
|
||||||
|
<td>: RM {{ number_format($transaction_tebus['duitpelanggan'], 2) }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Jumlah Perlu Dibayar</td>
|
||||||
|
<td>: RM {{ number_format($transaction_tebus['duit_masuk'], 2) }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Baki</td>
|
||||||
|
<td>: RM {{ number_format($transaction_tebus['bakipelanggan'], 2) }}</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table id="semakan" style="margin-top: 0">
|
||||||
|
<tr style="visibility: hidden">
|
||||||
|
<td colspan="3">.................................................... </td>
|
||||||
|
<td></td>
|
||||||
|
<td colspan="3">.................................................... </td>
|
||||||
|
<td></td>
|
||||||
|
<td colspan="3">.................................................... </td>
|
||||||
|
<td></td>
|
||||||
|
<td colspan="3">.................................................... </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="fixed inset-0 z-10 hidden bg-gray-900 opacity-50" id="sidebarBackdrop"></div>
|
||||||
|
<div id="main-content" class="relative w-full h-full overflow-y-auto bg-gray-50">
|
||||||
|
<main>
|
||||||
|
|
||||||
|
<div class="px-4 pt-6">
|
||||||
|
|
||||||
|
<breadcrumb :items="[{'title' : 'Debug Proses WTD', 'icon' : 'fas fa-file-invoice','url' : {{ json_encode(route('wtd.debugWTD.home')) }}}]"></breadcrumb>
|
||||||
|
|
||||||
|
|
||||||
|
@if (Session::has('type'))
|
||||||
|
<div class="@if(Session::get('type') == 'error') bg-red-100 border-red-500 text-red-900 @else bg-yellow-100 border-green-500 text-green-900 @endif border-t-4 rounded-b px-4 py-3 shadow-md w-96 mx-auto mb-5" role="alert">
|
||||||
|
<div class="flex">
|
||||||
|
<div class="py-1">
|
||||||
|
@if(Session::get('type') == 'error')
|
||||||
|
<svg class="w-6 h-6 mr-4 text-red-500 fill-current" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.93 17.07A10 10 0 1 1 17.07 2.93 10 10 0 0 1 2.93 17.07zm12.73-1.41A8 8 0 1 0 4.34 4.34a8 8 0 0 0 11.32 11.32zM9 11V9h2v6H9v-4zm0-6h2v2H9V5z"/></svg>
|
||||||
|
@else
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6 mr-4 text-green-500 fill-current" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4M7.835 4.697a3.42 3.42 0 001.946-.806 3.42 3.42 0 014.438 0 3.42 3.42 0 001.946.806 3.42 3.42 0 013.138 3.138 3.42 3.42 0 00.806 1.946 3.42 3.42 0 010 4.438 3.42 3.42 0 00-.806 1.946 3.42 3.42 0 01-3.138 3.138 3.42 3.42 0 00-1.946.806 3.42 3.42 0 01-4.438 0 3.42 3.42 0 00-1.946-.806 3.42 3.42 0 01-3.138-3.138 3.42 3.42 0 00-.806-1.946 3.42 3.42 0 010-4.438 3.42 3.42 0 00.806-1.946 3.42 3.42 0 013.138-3.138z" />
|
||||||
|
</svg>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<p class="font-bold">{{ Session::get('message') }}</p>
|
||||||
|
<p class="text-sm">{{ Session::get('title') }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
<div class="flex items-center justify-center pt-5 mx-auto mr-3 ">
|
||||||
|
<a href="{{ route('wtd.debugWTD.trail', ['startDate' => \Carbon\Carbon::yesterday()->format('Y-m-d'), 'endDate' => \Carbon\Carbon::yesterday()->format('Y-m-d')]) }}" class="w-1/6 px-6 py-4 mr-3 transition transform bg-white border border-solid rounded-lg shadow cursor-pointer hover:bg-yellow-300 hover:transition-all hover:-translate-y-1 ">
|
||||||
|
<div class="flex items-center justify-center">
|
||||||
|
<svg fill="#000000" width="128px" height="128px" viewBox="0 0 256 256" id="Flat" xmlns="http://www.w3.org/2000/svg"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <path d="M208,72V184a7.99989,7.99989,0,0,1-8,8H176V104L136,64H80V40.00006a7.99989,7.99989,0,0,1,8-8L168,32Z" opacity="0.2"></path> <path d="M213.65723,66.34326l-40-40A8.00076,8.00076,0,0,0,168,24H88A16.01833,16.01833,0,0,0,72,40V56H56A16.01833,16.01833,0,0,0,40,72V216a16.01833,16.01833,0,0,0,16,16H168a16.01833,16.01833,0,0,0,16-16V200h16a16.01833,16.01833,0,0,0,16-16V72A8.00035,8.00035,0,0,0,213.65723,66.34326ZM168,216H56V72h76.68652L168,107.314l.00781,84.53083c-.001.05212-.00781.10284-.00781.15521,0,.05255.00684.10345.00781.15576l.002,23.84375Zm32-32H184V104a8.00035,8.00035,0,0,0-2.34277-5.65674l-40-40A8.00076,8.00076,0,0,0,136,56H88V40h76.68652L200,75.314Zm-56-32a8.00008,8.00008,0,0,1-8,8H88a8,8,0,0,1,0-16h48A8.00008,8.00008,0,0,1,144,152Zm0,32a8.00008,8.00008,0,0,1-8,8H88a8,8,0,0,1,0-16h48A8.00008,8.00008,0,0,1,144,184Z"></path> </g></svg>
|
||||||
|
</div>
|
||||||
|
<h2 class="mx-auto mt-4 text-2xl font-bold text-center uppercase">Trail Proses WTD</h2>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
@include('layouts.footer')
|
||||||
|
@endsection
|
||||||
@@ -0,0 +1,198 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="bg-gray-900 opacity-50 hidden fixed inset-0 z-10" id="sidebarBackdrop"></div>
|
||||||
|
<div id="main-content" class="h-full w-full bg-gray-50 relative overflow-y-auto">
|
||||||
|
<main>
|
||||||
|
|
||||||
|
<div class="pt-6 px-4">
|
||||||
|
|
||||||
|
<breadcrumb
|
||||||
|
:items="[{ 'title': 'Debug Proses WTD', 'icon': 'fas fa-users', 'url': '{{ route('wtd.debugWTD.home') }}' },
|
||||||
|
{ 'title': 'Data WTD', 'icon': 'fas fa-users' }
|
||||||
|
]">
|
||||||
|
</breadcrumb>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<div class="flex w-full">
|
||||||
|
<div class="xl:w-2/3 2xl:w-1/2 p-8 mx-auto">
|
||||||
|
<div class="bg-yellow-600 text-gray-200 text-lg px-6 py-4 rounded-t-lg"><a href=""
|
||||||
|
class="router-link-active"><i class="fas fa-backspace text-white"></i></a> <span
|
||||||
|
class="text-center mx-auto text-white font-bold">Selesai WTD</span>
|
||||||
|
</div>
|
||||||
|
<form method="get" id="formwtd" action="{{ route('wtd.debugWTD.trail') }}">
|
||||||
|
<div class="rounded bg-white shadow p-6">
|
||||||
|
<div class="pb-6"><label for="username"
|
||||||
|
class="font-semibold text-gray-700 block pb-1">Tarikh</label>
|
||||||
|
<div class="flex">
|
||||||
|
<span
|
||||||
|
class="text-gray-600 border border-2 rounded-l px-4 py-2 whitespace-no-wrap"
|
||||||
|
style="background-color: rgb(249, 250, 251);">Mula</span>
|
||||||
|
<input id="tarikhmula" name="startDate" type="date"
|
||||||
|
value="{{ request()->startDate ?? $startDate }}"
|
||||||
|
class="border border-2 border-l-0 rounded-r px-4 py-2 w-80r mr-2">
|
||||||
|
<span
|
||||||
|
class="text-gray-600 border border-2 rounded-l px-4 py-2 whitespace-no-wrap"
|
||||||
|
style="background-color: rgb(249, 250, 251);">Hingga</span>
|
||||||
|
<input id="tarikhhingga" name="endDate" type="date"
|
||||||
|
value="{{ request()->endDate ?? $endDate }}"
|
||||||
|
class="border border-2 border-l-0 rounded-r px-4 py-2 w-80r mr-2">
|
||||||
|
<button
|
||||||
|
class="border border-yellow-600 text-yellow-600 font-montserrat py-2 px-8 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300 ml-5">
|
||||||
|
<i class="fas fa-magnifying-glass mr-2"></i>Search
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div kodcaw="operasi">
|
||||||
|
<div>
|
||||||
|
<!---->
|
||||||
|
<!---->
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<!---->
|
||||||
|
<!---->
|
||||||
|
</div>
|
||||||
|
<div class="flex justify-between mb-2">
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<table class="min-w-full leading-normal">
|
||||||
|
<thead class="text-center">
|
||||||
|
<tr>
|
||||||
|
<th
|
||||||
|
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||||
|
No
|
||||||
|
</th>
|
||||||
|
<th
|
||||||
|
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||||
|
Kod Cawangan
|
||||||
|
</th>
|
||||||
|
<th
|
||||||
|
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||||
|
Cawangan
|
||||||
|
</th>
|
||||||
|
<th
|
||||||
|
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-center text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||||
|
Table Serahbaki
|
||||||
|
</th>
|
||||||
|
<th
|
||||||
|
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-center text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||||
|
Table Tuntutbaki
|
||||||
|
</th>
|
||||||
|
<th
|
||||||
|
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-center text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||||
|
Table WTD
|
||||||
|
</th>
|
||||||
|
<th
|
||||||
|
class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-center text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
||||||
|
Action
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
@php
|
||||||
|
$totalserahbaki = 0;
|
||||||
|
$totaltuntutbaki = 0;
|
||||||
|
$totalwtd = 0;
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
@forelse ($debugwtd ?? [] as $dwtd)
|
||||||
|
@php
|
||||||
|
// Total
|
||||||
|
$totalserahbaki += $dwtd['serahb'] ?? 0;
|
||||||
|
$totaltuntutbaki += $dwtd['tuntutb'] ?? 0;
|
||||||
|
$totalwtd += $dwtd['twtd'] ?? 0;
|
||||||
|
@endphp
|
||||||
|
<tr>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
<div class="ml-3">{{ $loop->iteration }}</div>
|
||||||
|
</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
<div class="ml-3">{{ $dwtd['kodcaw'] }}</div>
|
||||||
|
</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
<div class="ml-3">{{ $dwtd['details_caw'] }}</div>
|
||||||
|
</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
<div class="ml-3 text-right">{{ number_format($dwtd['serahb'], 2) }}
|
||||||
|
@if($dwtd['serahb'] == $dwtd['tuntutb'] && $dwtd['serahb'] == $dwtd['twtd'])
|
||||||
|
<span class="inline-block w-3 h-3 bg-green-500 rounded-full"></span>
|
||||||
|
@else
|
||||||
|
<span class="inline-block w-3 h-3 bg-red-500 rounded-full"></span>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
<div class="ml-3 text-right">{{ number_format($dwtd['tuntutb'], 2) }}
|
||||||
|
@if($dwtd['serahb'] == $dwtd['tuntutb'] && $dwtd['serahb'] == $dwtd['twtd'])
|
||||||
|
<span class="inline-block w-3 h-3 bg-green-500 rounded-full"></span>
|
||||||
|
@else
|
||||||
|
<span class="inline-block w-3 h-3 bg-red-500 rounded-full"></span>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
<div class="ml-3 text-right">{{ number_format($dwtd['twtd'], 2) }}
|
||||||
|
@if($dwtd['serahb'] == $dwtd['tuntutb'] && $dwtd['serahb'] == $dwtd['twtd'])
|
||||||
|
<span class="inline-block w-3 h-3 bg-green-500 rounded-full"></span>
|
||||||
|
@else
|
||||||
|
<span class="inline-block w-3 h-3 bg-red-500 rounded-full"></span>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
<div class="ml-3 text-center">
|
||||||
|
|
||||||
|
@if($dwtd['serahb'] == $dwtd['tuntutb'] && $dwtd['serahb'] == $dwtd['twtd'])
|
||||||
|
<span class="inline-block w-3 h-3"></span>
|
||||||
|
@else
|
||||||
|
<span style="color: red;">Perlu Semakan</span>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@empty
|
||||||
|
<tr>
|
||||||
|
<td colspan="11"
|
||||||
|
class="px-5 py-5 border-b border-gray-200 bg-white text-sm text-center">
|
||||||
|
Data not available
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endforelse
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td colspan="3" class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||||
|
Jumlah Keseluruhan
|
||||||
|
</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm text-right">
|
||||||
|
{{ number_format($totalserahbaki, 2) }}
|
||||||
|
</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm text-right">
|
||||||
|
{{ number_format($totaltuntutbaki, 2) }}
|
||||||
|
</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm text-right">
|
||||||
|
{{ number_format($totalwtd, 2) }}
|
||||||
|
</td>
|
||||||
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm text-right"></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
@include('layouts.footer')
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
<div class="pt-6 px-4">
|
<div class="pt-6 px-4">
|
||||||
<breadcrumb :items="[{ 'title' : 'Wang Tak Dituntut', 'icon' : 'fas fa-gavel' }]"></breadcrumb>
|
<breadcrumb :items="[{ 'title' : 'Wang Tak Dituntut', 'icon' : 'fas fa-gavel' }]"></breadcrumb>
|
||||||
|
|
||||||
<wtdindex-component></wtd-component>
|
<wtdindex-component></wtdindex-component>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|||||||
@@ -0,0 +1,105 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="flex justify-center mt-10">
|
||||||
|
|
||||||
|
<div class="p-6 bg-white border border-gray-200 rounded-lg shadow-lg max-w-md w-full">
|
||||||
|
|
||||||
|
<h5 class="mb-6 text-2xl font-bold tracking-tight text-gray-900 text-center">Jana Simulasi</h5>
|
||||||
|
|
||||||
|
<form method="GET" action="{{ route('wtd.simulasi.show') }}">
|
||||||
|
@csrf
|
||||||
|
|
||||||
|
<div class="mb-4">
|
||||||
|
<label for="branch" class="block mb-2 text-sm font-medium text-gray-900">Sila Pilih Cawangan</label>
|
||||||
|
<select id="branch" name="kodcaw" required
|
||||||
|
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5">
|
||||||
|
<option disabled {{ old('kodcaw') ? '' : 'selected' }}>Pilih Cawangan</option>
|
||||||
|
@foreach ($cawangan as $cawanganItem)
|
||||||
|
<option value="{{ $cawanganItem['kodcaw'] }}"
|
||||||
|
{{ old('kodcaw') == $cawanganItem['kodcaw'] ? 'selected' : '' }}>
|
||||||
|
{{ $cawanganItem['details_caw'] }}
|
||||||
|
</option>
|
||||||
|
@endforeach
|
||||||
|
</select>
|
||||||
|
|
||||||
|
@error('kodcaw')
|
||||||
|
<p class="text-sm text-red-600 mt-1">{{ $message }}</p>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-4">
|
||||||
|
<label for="year" class="block mb-2 text-sm font-medium text-gray-900">Sila Pilih Tahun</label>
|
||||||
|
<select id="year" name="tahun" required
|
||||||
|
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5">
|
||||||
|
<option disabled {{ old('tahun') ? '' : 'selected' }}>Pilih Tahun</option>
|
||||||
|
@for ($year = 2020; $year <= now()->year; $year++)
|
||||||
|
<option value="{{ $year }}" {{ old('tahun') == $year ? 'selected' : '' }}>
|
||||||
|
{{ $year }}</option>
|
||||||
|
@endfor
|
||||||
|
</select>
|
||||||
|
@error('tahun')
|
||||||
|
<p class="text-sm text-red-600 mt-1">{{ $message }}</p>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button type="submit"
|
||||||
|
class="w-full px-4 py-2 text-white bg-yellow-600 rounded-lg hover:bg-yellow-700 focus:ring-4 focus:ring-yellow-300">
|
||||||
|
Submit
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// let branch = document.getElementById('branch');
|
||||||
|
// // alert(branch);
|
||||||
|
// branch.addEventListener('change',function(){
|
||||||
|
// alert('Hello');
|
||||||
|
// } )
|
||||||
|
|
||||||
|
// Ensure the DOM is fully loaded before accessing elements
|
||||||
|
// document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
// let branch = document.getElementById('branch');
|
||||||
|
|
||||||
|
// // Check if the element exists
|
||||||
|
// if (branch) {
|
||||||
|
// branch.addEventListener('change', function(e) {
|
||||||
|
// alert('Hello');
|
||||||
|
// alert(branch.value);
|
||||||
|
// let q = document.getElementById('cawangan_selector')
|
||||||
|
// console.log(e);
|
||||||
|
// q.innerText = branch.value;
|
||||||
|
// });
|
||||||
|
// } else {
|
||||||
|
// console.error('Element with ID "branch" not found.');
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
|
||||||
|
|
||||||
|
// function updateHeaderCawangan(selectedCawangan) {
|
||||||
|
// alert('hello');
|
||||||
|
// let componentElement = document.querySelector('cawangan-component');
|
||||||
|
|
||||||
|
// // Create a custom event
|
||||||
|
// let event = new CustomEvent('clickEvent_', {
|
||||||
|
// detail: 'Some data', // Pass any data you need
|
||||||
|
// });
|
||||||
|
|
||||||
|
// // Dispatch the event on the component's DOM element
|
||||||
|
// componentElement.dispatchEvent(event);
|
||||||
|
|
||||||
|
// axios.post('/update-cawangan', {
|
||||||
|
// kodcaw: selectedCawangan
|
||||||
|
// }).then(response => {
|
||||||
|
// console.log('Cawangan updated successfully');
|
||||||
|
// }).catch(error => {
|
||||||
|
// console.error('Error updating cawangan:', error);
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
@include('layouts.footer')
|
||||||
|
@endsection
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="container mx-auto mt-10">
|
||||||
|
<h1 class="text-2xl font-bold text-center my-4">Pengesahan Simulasi WTD</h1>
|
||||||
|
{{-- Display success or error messages --}}
|
||||||
|
@if (session('success'))
|
||||||
|
<div class="bg-green-500 text-white px-4 py-2 rounded mb-4">
|
||||||
|
{{ session('success') }}
|
||||||
|
</div>
|
||||||
|
@elseif (session('error'))
|
||||||
|
<div class="bg-red-500 text-white px-4 py-2 rounded mb-4">
|
||||||
|
{{ session('error') }}
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
<div class="overflow-x-auto">
|
||||||
|
<div>
|
||||||
|
<h5 class="text-lg font-semibold">Maklumat Simulasi yang Dipilih</h5>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="py-2">
|
||||||
|
<a href="{{ url()->previous() }}"
|
||||||
|
class="inline-block bg-gray-500 hover:bg-gray-600 text-white px-4 py-2 rounded">
|
||||||
|
Kembali
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@if (!empty($insertedRecords) && count($insertedRecords) > 0)
|
||||||
|
@php
|
||||||
|
// Calculate total baki
|
||||||
|
$totalBakiLelong = array_reduce(
|
||||||
|
$insertedRecords,
|
||||||
|
function ($sum, $record) {
|
||||||
|
return $sum + $record['baki'];
|
||||||
|
},
|
||||||
|
0,
|
||||||
|
);
|
||||||
|
@endphp
|
||||||
|
<table class="table-auto w-full border-collapse border border-gray-300">
|
||||||
|
<thead>
|
||||||
|
<tr class="bg-yellow-600 text-white">
|
||||||
|
<th class="border border-gray-200 px-4 py-2">Bulan</th>
|
||||||
|
<th class="border border-gray-200 px-4 py-2">Jumlah No Rujukan</th>
|
||||||
|
<th class="border border-gray-200 px-4 py-2">Pembiayaan</th>
|
||||||
|
<th class="border border-gray-200 px-4 py-2">Baki</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@foreach ($insertedRecords as $index => $record)
|
||||||
|
<tr class="{{ $index % 2 == 0 ? 'bg-gray-100' : 'bg-white' }}">
|
||||||
|
<td class="border border-gray-300 px-4 py-2 text-center">{{ $record['bulan'] }}</td>
|
||||||
|
<td class="border border-gray-300 px-4 py-2 text-center">{{ $record['jumlah_sag'] }}</td>
|
||||||
|
<td class="border border-gray-300 px-4 py-2 text-center">
|
||||||
|
{{ number_format($record['pembiayaan'], 2) }}
|
||||||
|
</td>
|
||||||
|
<td class="border border-gray-300 px-4 py-2 text-center">
|
||||||
|
{{ number_format($record['baki'], 2) }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
<!-- Add the total row -->
|
||||||
|
<tr class="bg-gray-200 font-bold">
|
||||||
|
<td class="border border-gray-300 px-4 py-2 text-center" colspan="3">Jumlah Baki Lelong</td>
|
||||||
|
<td class="border border-gray-300 px-4 py-2 text-center">
|
||||||
|
{{ number_format($totalBakiLelong, 2) }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
@else
|
||||||
|
<p class="text-center text-gray-600 mt-4">Tiada data yang dipilih untuk pengesahan.</p>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex justify-center mt-6">
|
||||||
|
<form action="{{ route('wtd.simulasi.proses-pengesahan') }}" method="POST">
|
||||||
|
@csrf
|
||||||
|
<input type="hidden" name="records" value="{{ json_encode($insertedRecords) }}">
|
||||||
|
<input type="hidden" name="kodcaw" value="{{ json_encode($kodcaw) }}">
|
||||||
|
<button type="submit" class="bg-blue-600 text-white px-6 py-2 rounded hover:bg-blue-700">
|
||||||
|
Sahkan
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
@include('layouts.footer')
|
||||||
|
@endsection
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="container mx-auto mt-10">
|
||||||
|
<h1 class="text2xl font-bold">
|
||||||
|
Senarai Surat Akuan Gadaian: <span class="underline hover:underline-offset-auto 2xl: uppercase font-extrabold">{{ $bulan }}</span>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<div class="flex justify-end">
|
||||||
|
<h3 class="text-lg font-semibold">Jumlah Baki Lelong:
|
||||||
|
<span id="total-baki" class="text-yellow-600">
|
||||||
|
RM {{ number_format($totalBaki, 2) }}
|
||||||
|
</span>
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="overflow-x-auto">
|
||||||
|
<table class="table-auto w-full border-collapse border border-gray-300">
|
||||||
|
<thead>
|
||||||
|
<tr class="bg-yellow-600 text-white">
|
||||||
|
<th class="border border-gray-200 px-4 py-2">#</th>
|
||||||
|
<th class="border border-gray-200 px-4 py-2">No Rujukan</th>
|
||||||
|
<th class="border border-gray-200 px-4 py-2">Tarikh Lelong</th>
|
||||||
|
<th class="border border-gray-200 px-4 py-2">Pembiayaan</th>
|
||||||
|
<th class="border border-gray-200 px-4 py-2">Baki Lelong</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@foreach ($rekod as $index => $item)
|
||||||
|
<tr class="{{ $index % 2 == 0 ? 'bg-gray-100' : 'bg-white' }}">
|
||||||
|
<td class="border border-gray-300 px-4 py-2 text-center">{{ $index + 1 }}</td>
|
||||||
|
|
||||||
|
<td class="px-4 py-2 border">{{ $item['norujukan'] }}</td>
|
||||||
|
<td class="px-4 py-2 border">{{ $item['t_lelong'] }}</td>
|
||||||
|
<td class="px-4 py-2 border">{{ number_format($item['pinjaman'], 2) }}</td>
|
||||||
|
<td class="px-4 py-2 border">{{ number_format($item['baki'], 2) }}</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mt-6">
|
||||||
|
<a href="{{ url()->previous() }}" class="inline-block bg-gray-500 hover:bg-gray-600 text-white px-4 py-2 rounded">
|
||||||
|
Kembali
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@include('layouts.footer');
|
||||||
|
@endsection
|
||||||
@@ -0,0 +1,131 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="container mx-auto mt-10">
|
||||||
|
@if (session('success'))
|
||||||
|
<div class="bg-green-100 text-green-800 px-4 py-3 rounded mb-4">
|
||||||
|
{{ session('success') }}
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
<h2 class="text-2xl font-bold mb-6">Senarai Batch Simulasi Untuk Tahun: {{ $year }}</h2>
|
||||||
|
|
||||||
|
<div class="flex justify-end items-center mb-4">
|
||||||
|
<h3 class="text-lg font-semibold">Jumlah Baki Lelong:
|
||||||
|
<span id="total-baki" class="text-yellow-600">RM 0.00</span>
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<form id="proses-wtd-form" method="POST" action="{{ route('wtd.simulasi.pengesahan') }}">
|
||||||
|
@csrf
|
||||||
|
<div class="overflow-x-auto">
|
||||||
|
<table class="table-auto w-full border-collapse border border-gray-300">
|
||||||
|
<thead>
|
||||||
|
<tr class="bg-yellow-600 text-white">
|
||||||
|
<th class="border border-gray-200 px-4 py-2">#</th>
|
||||||
|
<th class="border border-gray-200 px-4 py-2">Bulan</th>
|
||||||
|
<th class="border border-gray-200 px-4 py-2">Jumlah SAG</th>
|
||||||
|
<th class="border border-gray-200 px-4 py-2">Pembiayaan</th>
|
||||||
|
<th class="border border-gray-200 px-4 py-2">Baki</th>
|
||||||
|
<th class="border border-gray-200 px-4 py-2 text-center">
|
||||||
|
<input id="select-all" type="checkbox" class="cursor-pointer">
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{{-- @dd($senaraiSimulasi); --}}
|
||||||
|
@foreach ($senaraiSimulasi as $index => $item)
|
||||||
|
<input type="hidden" name="tahun" value="{{ $year }}"/>
|
||||||
|
<tr class="{{ $index % 2 == 0 ? 'bg-gray-100' : 'bg-white' }}">
|
||||||
|
<td class="border border-gray-300 px-4 py-2 text-center">{{ $index + 1 }}</td>
|
||||||
|
|
||||||
|
<td class="border border-gray-300 px-4 py-2">
|
||||||
|
<a href="{{ route('wtd.simulasi.rekod', [
|
||||||
|
'month' => $item['bulan'],
|
||||||
|
'year' => $year,
|
||||||
|
'kodcaw' => $item['kodcaw'],
|
||||||
|
]) }}"
|
||||||
|
class="text-yellow-600 hover:underline">
|
||||||
|
{{ $item['bulan'] }}
|
||||||
|
</a>
|
||||||
|
<input type="hidden" name="data[{{ $index }}][kodcaw]"
|
||||||
|
value="{{ $item['kodcaw'] }}">
|
||||||
|
|
||||||
|
<input type="hidden" name="data[{{ $index }}][bulan]"
|
||||||
|
value="{{ $item['bulan'] }}">
|
||||||
|
</td>
|
||||||
|
<td class="border border-gray-300 px-4 py-2 text-center">
|
||||||
|
{{ $item['jumlah_norujukan'] ?? 0 }}
|
||||||
|
<input type="hidden" name="data[{{ $index }}][jumlah_norujukan]"
|
||||||
|
value="{{ $item['jumlah_norujukan'] }}">
|
||||||
|
</td>
|
||||||
|
<td class="border border-gray-300 px-4 py-2">
|
||||||
|
{{ number_format($item['pembiayaan'], 2) }}
|
||||||
|
<input type="hidden" name="data[{{ $index }}][pembiayaan]"
|
||||||
|
value="{{ $item['pembiayaan'] }}">
|
||||||
|
</td>
|
||||||
|
<td class="border border-gray-300 px-4 py-2" data-baki="{{ $item['baki'] }}">
|
||||||
|
{{ number_format($item['baki'], 2) }}
|
||||||
|
<input type="hidden" name="data[{{ $index }}][baki]"
|
||||||
|
value="{{ $item['baki'] }}">
|
||||||
|
</td>
|
||||||
|
<td class="border border-gray-300 px-4 py-2 text-center">
|
||||||
|
<input type="checkbox" class="row-checkbox" data-baki="{{ $item['baki'] }}"
|
||||||
|
name="data[{{ $index }}][selected]">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex justify-end mt-4">
|
||||||
|
<button type="submit" id="proses-wtd-btn"
|
||||||
|
class="bg-yellow-600 text-white px-6 py-2 rounded cursor-pointer hover:bg-yellow-700">
|
||||||
|
Jana Simulasi
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
@include('layouts.footer')
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
const selectAllCheckbox = document.getElementById('select-all');
|
||||||
|
const rowCheckboxes = document.querySelectorAll('.row-checkbox');
|
||||||
|
const totalBakiElement = document.getElementById('total-baki');
|
||||||
|
|
||||||
|
function formatCurrency(amount) {
|
||||||
|
return `RM ${amount.toFixed(2).replace(/\d(?=(\d{3})+\.)/g, '$&,')}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
function calculateTotalBaki() {
|
||||||
|
let total = 0;
|
||||||
|
rowCheckboxes.forEach(checkbox => {
|
||||||
|
if (checkbox.checked) {
|
||||||
|
total += parseFloat(checkbox.dataset.baki);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
totalBakiElement.textContent = formatCurrency(total);
|
||||||
|
}
|
||||||
|
|
||||||
|
selectAllCheckbox.addEventListener('change', function() {
|
||||||
|
rowCheckboxes.forEach(checkbox => {
|
||||||
|
checkbox.checked = this.checked;
|
||||||
|
});
|
||||||
|
calculateTotalBaki();
|
||||||
|
});
|
||||||
|
|
||||||
|
rowCheckboxes.forEach(checkbox => {
|
||||||
|
checkbox.addEventListener('change', function() {
|
||||||
|
if (!this.checked) {
|
||||||
|
selectAllCheckbox.checked = false;
|
||||||
|
}
|
||||||
|
if (Array.from(rowCheckboxes).every(cb => cb.checked)) {
|
||||||
|
selectAllCheckbox.checked = true;
|
||||||
|
}
|
||||||
|
calculateTotalBaki();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
@@ -13,6 +13,8 @@ use App\Http\Controllers\Reports\OutstandingController;
|
|||||||
use App\Http\Controllers\Reports\PetibesiController;
|
use App\Http\Controllers\Reports\PetibesiController;
|
||||||
use App\Http\Controllers\Reports\AnalisaController;
|
use App\Http\Controllers\Reports\AnalisaController;
|
||||||
use App\Http\Controllers\Reports\BakiLelongController;
|
use App\Http\Controllers\Reports\BakiLelongController;
|
||||||
|
use App\Http\Controllers\SaringanGadaianController;
|
||||||
|
use App\Http\Controllers\WTDController;
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
|
|
||||||
Route::middleware(['roleChecker:admin,akaun,operasi,kpo,callcenter, null'])->group(function () {
|
Route::middleware(['roleChecker:admin,akaun,operasi,kpo,callcenter, null'])->group(function () {
|
||||||
@@ -45,4 +47,19 @@ Route::middleware(['roleChecker:admin,akaun,operasi,kpo,callcenter, null'])->gro
|
|||||||
Route::get('gadaitebus', [GadaianController::class, 'gadaitebus'])->name('reports.gadaitebus.index');
|
Route::get('gadaitebus', [GadaianController::class, 'gadaitebus'])->name('reports.gadaitebus.index');
|
||||||
Route::get('gadaitebusmasa', [GadaianController::class, 'gadaitebusmasa'])->name('reports.gadaitebusmasa.index');
|
Route::get('gadaitebusmasa', [GadaianController::class, 'gadaitebusmasa'])->name('reports.gadaitebusmasa.index');
|
||||||
Route::get('gadaitebusmasa/{kod_cawangan}', [GadaianController::class, 'downloadGadaiTebusMasaCawanganExcel'])->name('reports.gadaitebusmasa.cawangan.excel');
|
Route::get('gadaitebusmasa/{kod_cawangan}', [GadaianController::class, 'downloadGadaiTebusMasaCawanganExcel'])->name('reports.gadaitebusmasa.cawangan.excel');
|
||||||
|
|
||||||
|
Route::get('saringan-gadaian-index', [SaringanGadaianController::class, 'index'])->name('reports.saringan-gadaian.index');
|
||||||
|
Route::get('saringan-gadaian-excel/{kodcaw}', [SaringanGadaianController::class, 'exportExcel'])->name('reports.saringan.gadaian.cawangan.excel');
|
||||||
|
|
||||||
|
Route::get('summary-wtd-index', [WTDController::class, 'summaryWtd'])->name('reports.summary-wtd.index');
|
||||||
|
Route::get('summary-wtd-excel/{kodcaw}', [WTDController::class, 'exportExcel'])->name('reports.wtd.cawangan.excel');
|
||||||
|
|
||||||
|
Route::get('data-pelanggan-index', [AnalisaController::class, 'dataPelanggan'])->name('reports.dataPelanggan.index');
|
||||||
|
Route::get('data-pelanggan-show', [AnalisaController::class, 'dataPelangganShow'])->name('reports.dataPelanggan.show');
|
||||||
|
|
||||||
|
Route::get('data-pelanggan-bycaw-index', [AnalisaController::class, 'dataPelangganBycaw'])->name('reports.dataPelangganBycaw.index');
|
||||||
|
Route::get('data-pelanggan-bycaw-show', [AnalisaController::class, 'dataPelangganBycawShow'])->name('reports.dataPelangganBycaw.show');
|
||||||
|
|
||||||
|
Route::get('agingtebus/view', [AgingController::class, 'agingtebus'])->name('reports.agingtebus.index');
|
||||||
|
Route::get('laporan-agingtebus/view', [AgingController::class, 'showagingtebus'])->name('reports.agingtebus.show');
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ use App\Http\Controllers\OnlineTransactionController;
|
|||||||
use App\Http\Controllers\OnlineTransactionGadaianController;
|
use App\Http\Controllers\OnlineTransactionGadaianController;
|
||||||
use App\Http\Controllers\OnlineTransactionLogController;
|
use App\Http\Controllers\OnlineTransactionLogController;
|
||||||
use App\Http\Controllers\OnlineTransactionTrailController;
|
use App\Http\Controllers\OnlineTransactionTrailController;
|
||||||
|
use App\Http\Controllers\AccountStatementController;
|
||||||
use App\Http\Controllers\AutoSerahanController;
|
use App\Http\Controllers\AutoSerahanController;
|
||||||
|
use App\Http\Controllers\SimulasiWTDController;
|
||||||
|
use App\Http\Controllers\WTDController;
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
use Illuminate\Support\Facades\Http;
|
use Illuminate\Support\Facades\Http;
|
||||||
|
|
||||||
@@ -66,6 +69,11 @@ Route::get('pelanggan',['as'=>'pelanggan','uses'=>'App\Http\Controllers\Pelangga
|
|||||||
Route::get('/pelanggan/{id}',['as'=>'pelanggan.detailspelanggan','uses'=>'App\Http\Controllers\PelangganController@DetailsPelanggan'])->middleware(['roleChecker:admin,null,null,null,callcenter']);
|
Route::get('/pelanggan/{id}',['as'=>'pelanggan.detailspelanggan','uses'=>'App\Http\Controllers\PelangganController@DetailsPelanggan'])->middleware(['roleChecker:admin,null,null,null,callcenter']);
|
||||||
Route::get('/blacklist',['as'=>'blacklist','uses'=>'App\Http\Controllers\PelangganController@DetailsBlacklist'])->middleware(['roleChecker:null,null,operasi,null,callcenter']);
|
Route::get('/blacklist',['as'=>'blacklist','uses'=>'App\Http\Controllers\PelangganController@DetailsBlacklist'])->middleware(['roleChecker:null,null,operasi,null,callcenter']);
|
||||||
|
|
||||||
|
//barangkes
|
||||||
|
Route::get('barangkes', ['as' => 'barangkes','uses' => 'App\Http\Controllers\BarangkesController@AdminBarangKes'])->middleware(['roleChecker:admin,null,operasi,null,callcenter']);
|
||||||
|
Route::get('/barangkes/{id}',['as'=>'pelanggan.detailssag','uses'=>'App\Http\Controllers\BarangkesController@Detailssag'])->middleware(['roleChecker:admin,null,operasi,null,callcenter']);
|
||||||
|
Route::post('/barangkes/store/{id}',['as'=>'barangkes.store','uses' => 'App\Http\Controllers\BarangkesController@store'])->middleware(['roleChecker:admin,null,operasi,null,callcenter']);
|
||||||
|
|
||||||
//Carian Pelanggan ARCC
|
//Carian Pelanggan ARCC
|
||||||
Route::get('pelanggan_arcc',['as'=>'pelanggan_arcc','uses'=>'App\Http\Controllers\PelangganController@AdminPelanggan'])->middleware(['roleChecker:admin,null,null,null,callcenter']);
|
Route::get('pelanggan_arcc',['as'=>'pelanggan_arcc','uses'=>'App\Http\Controllers\PelangganController@AdminPelanggan'])->middleware(['roleChecker:admin,null,null,null,callcenter']);
|
||||||
|
|
||||||
@@ -131,6 +139,7 @@ Route::get('/akaunhome/cetakpenebusanRangeDate',['as'=>'cetak.penebusanRangeDate
|
|||||||
Route::get('/akaunhome/imbangdugabackup',['as'=>'cetak.imbangdugabackup','uses'=>'App\Http\Controllers\AkaunController@cetak_imbangdugaharian'])->middleware(['roleChecker:admin,akaun,operasi,kpo,callcenter']);
|
Route::get('/akaunhome/imbangdugabackup',['as'=>'cetak.imbangdugabackup','uses'=>'App\Http\Controllers\AkaunController@cetak_imbangdugaharian'])->middleware(['roleChecker:admin,akaun,operasi,kpo,callcenter']);
|
||||||
Route::get('/akaunhome/cetak_saghilang',['as'=>'cetak.saghilang','uses'=>'App\Http\Controllers\AkaunController@cetak_laporansaghilang'])->middleware(['roleChecker:admin,akaun,operasi,kpo,callcenter']);
|
Route::get('/akaunhome/cetak_saghilang',['as'=>'cetak.saghilang','uses'=>'App\Http\Controllers\AkaunController@cetak_laporansaghilang'])->middleware(['roleChecker:admin,akaun,operasi,kpo,callcenter']);
|
||||||
Route::get('/akaunhome/cetak_laporanlelong',['as'=>'cetak.laporanlelong','uses'=>'App\Http\Controllers\AkaunController@cetak_laporanlelong'])->middleware(['roleChecker:admin,akaun,operasi,kpo,callcenter']);
|
Route::get('/akaunhome/cetak_laporanlelong',['as'=>'cetak.laporanlelong','uses'=>'App\Http\Controllers\AkaunController@cetak_laporanlelong'])->middleware(['roleChecker:admin,akaun,operasi,kpo,callcenter']);
|
||||||
|
Route::get('/akaunhome/cetak_barangkes',['as'=>'cetak.laporanbarangkes','uses'=>'App\Http\Controllers\AkaunController@cetak_laporanbarangkes'])->middleware(['roleChecker:admin,akaun,operasi,kpo,callcenter']);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -160,6 +169,27 @@ Route::get('/wtd',['as'=>'wtd.index','uses'=>'App\Http\Controllers\WTDController
|
|||||||
Route::get('/wtd/cetakan', ['as'=>'wtd.cetak','uses'=>'App\Http\Controllers\WTDController@CetakSenarai']);
|
Route::get('/wtd/cetakan', ['as'=>'wtd.cetak','uses'=>'App\Http\Controllers\WTDController@CetakSenarai']);
|
||||||
Route::get('/wtd/dalamproses', ['as'=>'wtd.dalamproses','uses'=>'App\Http\Controllers\WTDController@CetakWtdDalamProses']);
|
Route::get('/wtd/dalamproses', ['as'=>'wtd.dalamproses','uses'=>'App\Http\Controllers\WTDController@CetakWtdDalamProses']);
|
||||||
|
|
||||||
|
//Aiman WTD
|
||||||
|
Route::get('/wtd/simulasi/janaSimulasi', [WTDController::class, 'janaSimulasi'])->name('wtd.simulasi.janaSimulasi');
|
||||||
|
|
||||||
|
Route::get('/wtd/simulasi/show', [WTDController::class, 'showSimulasi'])->name('wtd.simulasi.show');
|
||||||
|
|
||||||
|
Route::get('/wtd/simulasi/rekod', [WTDController::class, 'showRekod'])->name('wtd.simulasi.rekod');
|
||||||
|
|
||||||
|
// Route::post('/wtd/simulasi/proses', [WTDController::class, 'prosesWTD'])->name('wtd.simulasi.proses');
|
||||||
|
|
||||||
|
Route::post('/wtd/simulasi/pengesahan', [WTDController::class, 'prosesWTD'])->name('wtd.simulasi.pengesahan');
|
||||||
|
|
||||||
|
Route::post('/wtd/rekod', [WTDController::class, 'pengesahanSimulasi'])->name('wtd.simulasi.proses-pengesahan');
|
||||||
|
|
||||||
|
Route::post('/wtd/simulasi/simulasiToDraft', [WTDController::class, 'simulasiToDraft']);
|
||||||
|
|
||||||
|
Route::get('/wtd/simulasi/serahbaki', [WTDController::class, 'serahbaki']);
|
||||||
|
|
||||||
|
//debug proses wtd
|
||||||
|
Route::get('/wtd/debugWTD/home', [WTDController::class, 'home'])->name('wtd.debugWTD.home');
|
||||||
|
Route::get('/wtd/debugWTD/trail', [WTDController::class, 'trail'])->name('wtd.debugWTD.trail');
|
||||||
|
|
||||||
|
|
||||||
//Audit
|
//Audit
|
||||||
Route::get('/audit',['as'=>'audit.index','uses'=>'App\Http\Controllers\AkaunController@AuditGenerator']);
|
Route::get('/audit',['as'=>'audit.index','uses'=>'App\Http\Controllers\AkaunController@AuditGenerator']);
|
||||||
@@ -195,6 +225,9 @@ Route::get('/autoserahan/reject', [AutoSerahanController::class,'reject'])->nam
|
|||||||
Route::get('/autoserahan/list', [AutoSerahanController::class,'getList'])->name('autoserahan.get');
|
Route::get('/autoserahan/list', [AutoSerahanController::class,'getList'])->name('autoserahan.get');
|
||||||
Route::get('/autoserahan/rekod', [AutoSerahanController::class,'record'])->name('autoserahan.rekod');
|
Route::get('/autoserahan/rekod', [AutoSerahanController::class,'record'])->name('autoserahan.rekod');
|
||||||
|
|
||||||
|
//Account Statements
|
||||||
|
Route::get('/accounts/statements/{norujukan}', [AccountStatementController::class,'showStatement'])->name('accountstatement.rekod');
|
||||||
|
|
||||||
Route::get('{any}', function () {
|
Route::get('{any}', function () {
|
||||||
return view('home');
|
return view('home');
|
||||||
})->where('any','.*');
|
})->where('any','.*');
|
||||||
|
|||||||
Reference in New Issue
Block a user