Merged in afiqhamzah/feat/overall-report (pull request #6)
Gadaian overall reports
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Ansuran;
|
||||
|
||||
use Maatwebsite\Excel\Concerns\WithMultipleSheets;
|
||||
|
||||
class AnsuranExport implements WithMultipleSheets
|
||||
{
|
||||
public $cawangan_detail;
|
||||
public $query;
|
||||
public $ansuran;
|
||||
public $summary_ansuran;
|
||||
|
||||
public function __construct($data)
|
||||
{
|
||||
$this->cawangan_detail = $data['cawangan_detail'];
|
||||
$this->query = $data['query'];
|
||||
$this->ansuran = $data['total_ansuran'];
|
||||
$this->summary_ansuran = $data['summary_ansuran'];
|
||||
}
|
||||
|
||||
public function sheets(): array
|
||||
{
|
||||
$sheets = [];
|
||||
|
||||
// Use array_reduce to calculate the sum of values
|
||||
$data = $this->ansuran;
|
||||
$teller_with_gadaian_summary_data = array_reduce(array_keys($data), function ($accumulator, $key) use ($data) {
|
||||
$accumulator[] = [
|
||||
'teller' => $key,
|
||||
'summary_ansuran_teller' => $data[$key]['summary_ansuran_teller'],
|
||||
];
|
||||
return $accumulator;
|
||||
}, []);
|
||||
|
||||
|
||||
$sheets[] = new AnsuranSummaryExport($this->cawangan_detail, $this->query, $teller_with_gadaian_summary_data, $this->summary_ansuran);
|
||||
|
||||
foreach ($this->ansuran as $teller => $data) {
|
||||
|
||||
$teller_with_gadaian_data = [
|
||||
'teller' => $teller,
|
||||
'data' => $data,
|
||||
];
|
||||
|
||||
$sheets[] = new AnsuranPerTellerExport($this->cawangan_detail, $this->query, $teller_with_gadaian_data);
|
||||
}
|
||||
|
||||
return $sheets;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Ansuran;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
|
||||
use Maatwebsite\Excel\Concerns\WithColumnFormatting;
|
||||
use Maatwebsite\Excel\Concerns\WithColumnWidths;
|
||||
use Maatwebsite\Excel\Concerns\WithCustomValueBinder;
|
||||
use Maatwebsite\Excel\Concerns\WithEvents;
|
||||
use Maatwebsite\Excel\Concerns\WithTitle;
|
||||
use PhpOffice\PhpSpreadsheet\Cell\Cell;
|
||||
use PhpOffice\PhpSpreadsheet\Cell\DataType;
|
||||
use PhpOffice\PhpSpreadsheet\Cell\DefaultValueBinder;
|
||||
use PhpOffice\PhpSpreadsheet\Style\NumberFormat;
|
||||
|
||||
class AnsuranPerTellerExport extends DefaultValueBinder implements FromView, ShouldAutoSize, WithCustomValueBinder, WithColumnWidths, WithEvents, WithColumnFormatting, WithTitle
|
||||
{
|
||||
public $cawangan_detail;
|
||||
public $query;
|
||||
public $teller_with_ansuran_data;
|
||||
|
||||
public function __construct($cawangan_detail, $query, $teller_with_ansuran_data)
|
||||
{
|
||||
$this->cawangan_detail = $cawangan_detail;
|
||||
$this->query = $query;
|
||||
$this->teller_with_ansuran_data = $teller_with_ansuran_data;
|
||||
}
|
||||
|
||||
public function title(): string
|
||||
{
|
||||
return sprintf("TELLER %s", $this->teller_with_ansuran_data['teller']);
|
||||
}
|
||||
|
||||
public function bindValue(Cell $cell, $value)
|
||||
{
|
||||
if (is_numeric($value)) {
|
||||
$cell->setValueExplicit($value, DataType::TYPE_NUMERIC);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
$datePattern = '/^\d{4}-\d{2}-\d{2}$/';
|
||||
if (preg_match($datePattern, $value)) {
|
||||
$cell->setValueExplicit( (new Carbon($value))->format('d/m/Y'), DataType::TYPE_STRING);
|
||||
return true;
|
||||
}
|
||||
|
||||
// else return default behavior
|
||||
return parent::bindValue($cell, $value);
|
||||
}
|
||||
|
||||
public function columnWidths(): array
|
||||
{
|
||||
return [
|
||||
'A' => 20.5,
|
||||
'B' => 42,
|
||||
'C' => 14.50,
|
||||
'D' => 21.33,
|
||||
'E' => 21.67,
|
||||
'F' => 20.50,
|
||||
];
|
||||
}
|
||||
|
||||
public function columnFormats(): array
|
||||
{
|
||||
return [
|
||||
'C' => NumberFormat::FORMAT_NUMBER,
|
||||
'D' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||
'E' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||
'F' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||
];
|
||||
}
|
||||
|
||||
public function registerEvents(): array
|
||||
{
|
||||
$table_style = [
|
||||
'borders' => [
|
||||
'allBorders' => [
|
||||
'borderStyle' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THIN,
|
||||
'color' => ['argb' => '#000000'],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
$main_table_row_count = count($this->teller_with_ansuran_data) + 1;
|
||||
$main_table_start_at_row = 9;
|
||||
|
||||
$main_table_range = 'A' . $main_table_start_at_row . ':J' . ($main_table_row_count + $main_table_start_at_row);
|
||||
|
||||
$summary_table_row_count = 1;
|
||||
$summary_table_start_at_row = $main_table_row_count + $main_table_start_at_row + 5;
|
||||
|
||||
$summary_table_range = 'A' . $summary_table_start_at_row . ':I' . ($summary_table_row_count + $summary_table_start_at_row);
|
||||
|
||||
$summary_table_column_head = 'A' . $summary_table_start_at_row . ':F' . $summary_table_start_at_row;
|
||||
|
||||
// return [
|
||||
// AfterSheet::class => function (AfterSheet $event) use ($main_table_range, $summary_table_range, $summary_table_column_head, $table_style) {
|
||||
|
||||
// $event->sheet->getStyle($main_table_range)->applyFromArray($table_style);
|
||||
// $event->sheet->getStyle($summary_table_range)->applyFromArray($table_style);
|
||||
|
||||
// $event->sheet->mergeCells($summary_table_column_head);
|
||||
|
||||
// },
|
||||
|
||||
// ];
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
return view('exports.ansuran.cawangan', [
|
||||
'cawangan_detail' => $this->cawangan_detail,
|
||||
'query' => $this->query,
|
||||
'teller_with_ansuran_data' => $this->teller_with_ansuran_data,
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Ansuran;
|
||||
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
|
||||
use Maatwebsite\Excel\Concerns\WithColumnFormatting;
|
||||
use Maatwebsite\Excel\Concerns\WithColumnWidths;
|
||||
use Maatwebsite\Excel\Concerns\WithCustomValueBinder;
|
||||
use Maatwebsite\Excel\Concerns\WithEvents;
|
||||
use PhpOffice\PhpSpreadsheet\Cell\Cell;
|
||||
use PhpOffice\PhpSpreadsheet\Cell\DataType;
|
||||
use PhpOffice\PhpSpreadsheet\Cell\DefaultValueBinder;
|
||||
use PhpOffice\PhpSpreadsheet\Style\NumberFormat;
|
||||
use Maatwebsite\Excel\Concerns\WithTitle;
|
||||
|
||||
class AnsuranSummaryExport extends DefaultValueBinder implements FromView, ShouldAutoSize, WithCustomValueBinder, WithColumnWidths, WithEvents, WithColumnFormatting, WithTitle
|
||||
{
|
||||
public $cawangan_detail;
|
||||
public $query;
|
||||
public $teller_with_ansuran_summary_data;
|
||||
public $summary_ansuran;
|
||||
|
||||
public function __construct($cawangan_detail, $query, $teller_with_ansuran_data, $summary_ansuran)
|
||||
{
|
||||
$this->cawangan_detail = $cawangan_detail;
|
||||
$this->query = $query;
|
||||
$this->teller_with_ansuran_summary_data = $teller_with_ansuran_data;
|
||||
$this->summary_ansuran = $summary_ansuran;
|
||||
}
|
||||
|
||||
public function title(): string
|
||||
{
|
||||
return 'SUMMARY ANSURAN';
|
||||
}
|
||||
|
||||
public function bindValue(Cell $cell, $value)
|
||||
{
|
||||
if (is_numeric($value)) {
|
||||
$cell->setValueExplicit($value, DataType::TYPE_NUMERIC);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// else return default behavior
|
||||
return parent::bindValue($cell, $value);
|
||||
}
|
||||
|
||||
public function columnWidths(): array
|
||||
{
|
||||
return [
|
||||
'A' => 27,
|
||||
'B' => 21.30,
|
||||
'C' => 21.33,
|
||||
'D' => 24.67,
|
||||
'E' => 17.0,
|
||||
];
|
||||
}
|
||||
|
||||
public function columnFormats(): array
|
||||
{
|
||||
return [
|
||||
'B' => NumberFormat::FORMAT_NUMBER,
|
||||
'C' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||
'D' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||
'E' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||
];
|
||||
}
|
||||
|
||||
public function registerEvents(): array
|
||||
{
|
||||
$table_style = [
|
||||
'borders' => [
|
||||
'allBorders' => [
|
||||
'borderStyle' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THIN,
|
||||
'color' => ['argb' => '#000000'],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
$main_table_row_count = count($this->teller_with_ansuran_summary_data) + 1;
|
||||
$main_table_start_at_row = 9;
|
||||
|
||||
$main_table_range = 'A' . $main_table_start_at_row . ':J' . ($main_table_row_count + $main_table_start_at_row);
|
||||
|
||||
$summary_table_row_count = 1;
|
||||
$summary_table_start_at_row = $main_table_row_count + $main_table_start_at_row + 5;
|
||||
|
||||
$summary_table_range = 'A' . $summary_table_start_at_row . ':I' . ($summary_table_row_count + $summary_table_start_at_row);
|
||||
|
||||
$summary_table_column_head = 'A' . $summary_table_start_at_row . ':F' . $summary_table_start_at_row;
|
||||
|
||||
// return [
|
||||
// AfterSheet::class => function (AfterSheet $event) use ($main_table_range, $summary_table_range, $summary_table_column_head, $table_style) {
|
||||
|
||||
// $event->sheet->getStyle($main_table_range)->applyFromArray($table_style);
|
||||
// $event->sheet->getStyle($summary_table_range)->applyFromArray($table_style);
|
||||
|
||||
// $event->sheet->mergeCells($summary_table_column_head);
|
||||
|
||||
// },
|
||||
|
||||
// ];
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
return view('exports.ansuran.summary', [
|
||||
'cawangan_detail' => $this->cawangan_detail,
|
||||
'query' => $this->query,
|
||||
'teller_with_ansuran_data' => $this->teller_with_ansuran_summary_data,
|
||||
'summary_ansuran' => $this->summary_ansuran,
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports;
|
||||
|
||||
use Maatwebsite\Excel\Concerns\WithMultipleSheets;
|
||||
|
||||
class GadaianExport implements WithMultipleSheets
|
||||
{
|
||||
public $cawangan_detail;
|
||||
public $query;
|
||||
public $gadaian;
|
||||
public $summary_gadaian;
|
||||
|
||||
public function __construct($data)
|
||||
{
|
||||
$this->cawangan_detail = $data['cawangan_detail'];
|
||||
$this->query = $data['query'];
|
||||
$this->gadaian = $data['gadaian'];
|
||||
$this->summary_gadaian = $data['summary_gadaian'];
|
||||
}
|
||||
|
||||
public function sheets(): array
|
||||
{
|
||||
$sheets = [];
|
||||
|
||||
// Use array_reduce to calculate the sum of values
|
||||
$data = $this->gadaian;
|
||||
$teller_with_gadaian_summary_data = array_reduce(array_keys($data), function ($accumulator, $key) use ($data) {
|
||||
$accumulator[] = [
|
||||
'teller' => $key,
|
||||
'summary_gadaian_teller' => $data[$key]['summary_gadaian_teller'],
|
||||
];
|
||||
return $accumulator;
|
||||
}, []);
|
||||
|
||||
|
||||
|
||||
|
||||
$sheets[] = new GadaianSummaryExport($this->cawangan_detail, $this->query, $teller_with_gadaian_summary_data, $this->summary_gadaian);
|
||||
|
||||
foreach ($this->gadaian as $teller => $data) {
|
||||
|
||||
$teller_with_gadaian_data = [
|
||||
'teller' => $teller,
|
||||
'data' => $data,
|
||||
];
|
||||
|
||||
$sheets[] = new GadaianPerTellerExport($this->cawangan_detail, $this->query, $teller_with_gadaian_data);
|
||||
}
|
||||
|
||||
return $sheets;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports;
|
||||
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
|
||||
use Maatwebsite\Excel\Concerns\WithColumnFormatting;
|
||||
use Maatwebsite\Excel\Concerns\WithColumnWidths;
|
||||
use Maatwebsite\Excel\Concerns\WithCustomValueBinder;
|
||||
use Maatwebsite\Excel\Concerns\WithEvents;
|
||||
use Maatwebsite\Excel\Concerns\WithMultipleSheets;
|
||||
use Maatwebsite\Excel\Events\AfterSheet;
|
||||
use PhpOffice\PhpSpreadsheet\Cell\Cell;
|
||||
use PhpOffice\PhpSpreadsheet\Cell\DataType;
|
||||
use PhpOffice\PhpSpreadsheet\Cell\DefaultValueBinder;
|
||||
use PhpOffice\PhpSpreadsheet\Style\NumberFormat;
|
||||
use Maatwebsite\Excel\Concerns\WithTitle;
|
||||
|
||||
class GadaianPerTellerExport extends DefaultValueBinder implements FromView, ShouldAutoSize, WithCustomValueBinder, WithColumnWidths, WithEvents, WithColumnFormatting, WithTitle
|
||||
{
|
||||
public $cawangan_detail;
|
||||
public $query;
|
||||
public $teller_with_gadaian_data;
|
||||
|
||||
public function __construct($cawangan_detail, $query, $teller_with_gadaian_data)
|
||||
{
|
||||
$this->cawangan_detail = $cawangan_detail;
|
||||
$this->query = $query;
|
||||
$this->teller_with_gadaian_data = $teller_with_gadaian_data;
|
||||
}
|
||||
|
||||
public function title(): string
|
||||
{
|
||||
return sprintf("TELLER %s", $this->teller_with_gadaian_data['teller']);
|
||||
}
|
||||
|
||||
public function bindValue(Cell $cell, $value)
|
||||
{
|
||||
if (is_numeric($value)) {
|
||||
$cell->setValueExplicit($value, DataType::TYPE_NUMERIC);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// else return default behavior
|
||||
return parent::bindValue($cell, $value);
|
||||
}
|
||||
|
||||
public function columnWidths(): array
|
||||
{
|
||||
return [
|
||||
'A' => 20.5,
|
||||
'B' => 42,
|
||||
'C' => 60,
|
||||
'D' => 14.18,
|
||||
'E' => 9.19,
|
||||
'F' => 27.5,
|
||||
];
|
||||
}
|
||||
|
||||
public function columnFormats(): array
|
||||
{
|
||||
return [
|
||||
'D' => NumberFormat::FORMAT_NUMBER,
|
||||
'G' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||
'H' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||
'I' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||
'J' => NumberFormat::FORMAT_NUMBER_00,
|
||||
];
|
||||
}
|
||||
|
||||
public function registerEvents(): array
|
||||
{
|
||||
$table_style = [
|
||||
'borders' => [
|
||||
'allBorders' => [
|
||||
'borderStyle' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THIN,
|
||||
'color' => ['argb' => '#000000'],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
$main_table_row_count = count($this->teller_with_gadaian_data) + 1;
|
||||
$main_table_start_at_row = 9;
|
||||
|
||||
$main_table_range = 'A' . $main_table_start_at_row . ':J' . ($main_table_row_count + $main_table_start_at_row);
|
||||
|
||||
$summary_table_row_count = 1;
|
||||
$summary_table_start_at_row = $main_table_row_count + $main_table_start_at_row + 5;
|
||||
|
||||
$summary_table_range = 'A' . $summary_table_start_at_row . ':I' . ($summary_table_row_count + $summary_table_start_at_row);
|
||||
|
||||
$summary_table_column_head = 'A' . $summary_table_start_at_row . ':F' . $summary_table_start_at_row;
|
||||
|
||||
// return [
|
||||
// AfterSheet::class => function (AfterSheet $event) use ($main_table_range, $summary_table_range, $summary_table_column_head, $table_style) {
|
||||
|
||||
// $event->sheet->getStyle($main_table_range)->applyFromArray($table_style);
|
||||
// $event->sheet->getStyle($summary_table_range)->applyFromArray($table_style);
|
||||
|
||||
// $event->sheet->mergeCells($summary_table_column_head);
|
||||
|
||||
// },
|
||||
|
||||
// ];
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
return view('exports.gadaian.cawangan', [
|
||||
'cawangan_detail' => $this->cawangan_detail,
|
||||
'query' => $this->query,
|
||||
'teller_with_gadaian_data' => $this->teller_with_gadaian_data,
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports;
|
||||
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
|
||||
use Maatwebsite\Excel\Concerns\WithColumnFormatting;
|
||||
use Maatwebsite\Excel\Concerns\WithColumnWidths;
|
||||
use Maatwebsite\Excel\Concerns\WithCustomValueBinder;
|
||||
use Maatwebsite\Excel\Concerns\WithEvents;
|
||||
use PhpOffice\PhpSpreadsheet\Cell\Cell;
|
||||
use PhpOffice\PhpSpreadsheet\Cell\DataType;
|
||||
use PhpOffice\PhpSpreadsheet\Cell\DefaultValueBinder;
|
||||
use PhpOffice\PhpSpreadsheet\Style\NumberFormat;
|
||||
use Maatwebsite\Excel\Concerns\WithTitle;
|
||||
|
||||
class GadaianSummaryExport extends DefaultValueBinder implements FromView, ShouldAutoSize, WithCustomValueBinder, WithColumnWidths, WithEvents, WithColumnFormatting, WithTitle
|
||||
{
|
||||
public $cawangan_detail;
|
||||
public $query;
|
||||
public $teller_with_gadaian_summary_data;
|
||||
public $summary_gadaian;
|
||||
|
||||
public function __construct($cawangan_detail, $query, $teller_with_gadaian_data, $summary_gadaian)
|
||||
{
|
||||
$this->cawangan_detail = $cawangan_detail;
|
||||
$this->query = $query;
|
||||
$this->teller_with_gadaian_summary_data = $teller_with_gadaian_data;
|
||||
$this->summary_gadaian = $summary_gadaian;
|
||||
}
|
||||
|
||||
public function title(): string
|
||||
{
|
||||
return 'SUMMARY GADAIAN';
|
||||
}
|
||||
|
||||
public function bindValue(Cell $cell, $value)
|
||||
{
|
||||
if (is_numeric($value)) {
|
||||
$cell->setValueExplicit($value, DataType::TYPE_NUMERIC);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// else return default behavior
|
||||
return parent::bindValue($cell, $value);
|
||||
}
|
||||
|
||||
public function columnWidths(): array
|
||||
{
|
||||
return [
|
||||
'A' => 28,
|
||||
'B' => 14.67,
|
||||
'C' => 16.00,
|
||||
'D' => 14.18,
|
||||
];
|
||||
}
|
||||
|
||||
public function columnFormats(): array
|
||||
{
|
||||
return [
|
||||
'B' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||
'C' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||
'D' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||
];
|
||||
}
|
||||
|
||||
public function registerEvents(): array
|
||||
{
|
||||
$table_style = [
|
||||
'borders' => [
|
||||
'allBorders' => [
|
||||
'borderStyle' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THIN,
|
||||
'color' => ['argb' => '#000000'],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
$main_table_row_count = count($this->teller_with_gadaian_summary_data) + 1;
|
||||
$main_table_start_at_row = 9;
|
||||
|
||||
$main_table_range = 'A' . $main_table_start_at_row . ':J' . ($main_table_row_count + $main_table_start_at_row);
|
||||
|
||||
$summary_table_row_count = 1;
|
||||
$summary_table_start_at_row = $main_table_row_count + $main_table_start_at_row + 5;
|
||||
|
||||
$summary_table_range = 'A' . $summary_table_start_at_row . ':I' . ($summary_table_row_count + $summary_table_start_at_row);
|
||||
|
||||
$summary_table_column_head = 'A' . $summary_table_start_at_row . ':F' . $summary_table_start_at_row;
|
||||
|
||||
// return [
|
||||
// AfterSheet::class => function (AfterSheet $event) use ($main_table_range, $summary_table_range, $summary_table_column_head, $table_style) {
|
||||
|
||||
// $event->sheet->getStyle($main_table_range)->applyFromArray($table_style);
|
||||
// $event->sheet->getStyle($summary_table_range)->applyFromArray($table_style);
|
||||
|
||||
// $event->sheet->mergeCells($summary_table_column_head);
|
||||
|
||||
// },
|
||||
|
||||
// ];
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
return view('exports.gadaian.summary', [
|
||||
'cawangan_detail' => $this->cawangan_detail,
|
||||
'query' => $this->query,
|
||||
'teller_with_gadaian_data' => $this->teller_with_gadaian_summary_data,
|
||||
'summary_gadaian' => $this->summary_gadaian,
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Penebusan;
|
||||
|
||||
use Maatwebsite\Excel\Concerns\WithMultipleSheets;
|
||||
|
||||
class PenebusanExport implements WithMultipleSheets
|
||||
{
|
||||
public $cawangan_detail;
|
||||
public $query;
|
||||
public $penebusan;
|
||||
public $summary_penebusan;
|
||||
|
||||
public function __construct($data)
|
||||
{
|
||||
$this->cawangan_detail = $data['cawangan_detail'];
|
||||
$this->query = $data['query'];
|
||||
$this->penebusan = $data['penebusan'];
|
||||
$this->summary_penebusan = $data['summary_penebusan'];
|
||||
}
|
||||
|
||||
public function sheets(): array
|
||||
{
|
||||
$sheets = [];
|
||||
|
||||
// Use array_reduce to calculate the sum of values
|
||||
$data = $this->penebusan;
|
||||
$teller_with_gadaian_summary_data = array_reduce(array_keys($data), function ($accumulator, $key) use ($data) {
|
||||
$accumulator[] = [
|
||||
'teller' => $key,
|
||||
'summary_penebusan_teller' => $data[$key]['summary_penebusan_teller'],
|
||||
];
|
||||
return $accumulator;
|
||||
}, []);
|
||||
|
||||
|
||||
$sheets[] = new PenebusanSummaryExport($this->cawangan_detail, $this->query, $teller_with_gadaian_summary_data, $this->summary_penebusan);
|
||||
|
||||
foreach ($this->penebusan as $teller => $data) {
|
||||
|
||||
$teller_with_gadaian_data = [
|
||||
'teller' => $teller,
|
||||
'data' => $data,
|
||||
];
|
||||
|
||||
$sheets[] = new PenebusanPerTellerExport($this->cawangan_detail, $this->query, $teller_with_gadaian_data);
|
||||
}
|
||||
|
||||
return $sheets;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Penebusan;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
|
||||
use Maatwebsite\Excel\Concerns\WithColumnFormatting;
|
||||
use Maatwebsite\Excel\Concerns\WithColumnWidths;
|
||||
use Maatwebsite\Excel\Concerns\WithCustomValueBinder;
|
||||
use Maatwebsite\Excel\Concerns\WithEvents;
|
||||
use Maatwebsite\Excel\Concerns\WithTitle;
|
||||
use PhpOffice\PhpSpreadsheet\Cell\Cell;
|
||||
use PhpOffice\PhpSpreadsheet\Cell\DataType;
|
||||
use PhpOffice\PhpSpreadsheet\Cell\DefaultValueBinder;
|
||||
use PhpOffice\PhpSpreadsheet\Style\NumberFormat;
|
||||
|
||||
class PenebusanPerTellerExport extends DefaultValueBinder implements FromView, ShouldAutoSize, WithCustomValueBinder, WithColumnWidths, WithEvents, WithColumnFormatting, WithTitle
|
||||
{
|
||||
public $cawangan_detail;
|
||||
public $query;
|
||||
public $teller_with_penebusan_data;
|
||||
|
||||
public function __construct($cawangan_detail, $query, $teller_with_penebusan_data)
|
||||
{
|
||||
$this->cawangan_detail = $cawangan_detail;
|
||||
$this->query = $query;
|
||||
$this->teller_with_penebusan_data = $teller_with_penebusan_data;
|
||||
}
|
||||
|
||||
public function title(): string
|
||||
{
|
||||
return sprintf("TELLER %s", $this->teller_with_penebusan_data['teller']);
|
||||
}
|
||||
|
||||
public function bindValue(Cell $cell, $value)
|
||||
{
|
||||
if (is_numeric($value)) {
|
||||
$cell->setValueExplicit($value, DataType::TYPE_NUMERIC);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
$datePattern = '/^\d{4}-\d{2}-\d{2}$/';
|
||||
if (preg_match($datePattern, $value)) {
|
||||
$cell->setValueExplicit( (new Carbon($value))->format('d/m/Y'), DataType::TYPE_STRING);
|
||||
return true;
|
||||
}
|
||||
|
||||
// else return default behavior
|
||||
return parent::bindValue($cell, $value);
|
||||
}
|
||||
|
||||
public function columnWidths(): array
|
||||
{
|
||||
return [
|
||||
'A' => 20.5,
|
||||
'B' => 42,
|
||||
'C' => 60,
|
||||
'D' => 14.18,
|
||||
'E' => 9.19,
|
||||
'F' => 27.5,
|
||||
];
|
||||
}
|
||||
|
||||
public function columnFormats(): array
|
||||
{
|
||||
return [
|
||||
'C' => NumberFormat::FORMAT_NUMBER,
|
||||
'D' => NumberFormat::FORMAT_DATE_DDMMYYYY,
|
||||
'F' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||
'G' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||
'H' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||
'I' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||
'J' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||
'K' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||
];
|
||||
}
|
||||
|
||||
public function registerEvents(): array
|
||||
{
|
||||
$table_style = [
|
||||
'borders' => [
|
||||
'allBorders' => [
|
||||
'borderStyle' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THIN,
|
||||
'color' => ['argb' => '#000000'],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
$main_table_row_count = count($this->teller_with_penebusan_data) + 1;
|
||||
$main_table_start_at_row = 9;
|
||||
|
||||
$main_table_range = 'A' . $main_table_start_at_row . ':J' . ($main_table_row_count + $main_table_start_at_row);
|
||||
|
||||
$summary_table_row_count = 1;
|
||||
$summary_table_start_at_row = $main_table_row_count + $main_table_start_at_row + 5;
|
||||
|
||||
$summary_table_range = 'A' . $summary_table_start_at_row . ':I' . ($summary_table_row_count + $summary_table_start_at_row);
|
||||
|
||||
$summary_table_column_head = 'A' . $summary_table_start_at_row . ':F' . $summary_table_start_at_row;
|
||||
|
||||
// return [
|
||||
// AfterSheet::class => function (AfterSheet $event) use ($main_table_range, $summary_table_range, $summary_table_column_head, $table_style) {
|
||||
|
||||
// $event->sheet->getStyle($main_table_range)->applyFromArray($table_style);
|
||||
// $event->sheet->getStyle($summary_table_range)->applyFromArray($table_style);
|
||||
|
||||
// $event->sheet->mergeCells($summary_table_column_head);
|
||||
|
||||
// },
|
||||
|
||||
// ];
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
return view('exports.penebusan.cawangan', [
|
||||
'cawangan_detail' => $this->cawangan_detail,
|
||||
'query' => $this->query,
|
||||
'teller_with_penebusan_data' => $this->teller_with_penebusan_data,
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\Penebusan;
|
||||
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
|
||||
use Maatwebsite\Excel\Concerns\WithColumnFormatting;
|
||||
use Maatwebsite\Excel\Concerns\WithColumnWidths;
|
||||
use Maatwebsite\Excel\Concerns\WithCustomValueBinder;
|
||||
use Maatwebsite\Excel\Concerns\WithEvents;
|
||||
use PhpOffice\PhpSpreadsheet\Cell\Cell;
|
||||
use PhpOffice\PhpSpreadsheet\Cell\DataType;
|
||||
use PhpOffice\PhpSpreadsheet\Cell\DefaultValueBinder;
|
||||
use PhpOffice\PhpSpreadsheet\Style\NumberFormat;
|
||||
use Maatwebsite\Excel\Concerns\WithTitle;
|
||||
|
||||
class PenebusanSummaryExport extends DefaultValueBinder implements FromView, ShouldAutoSize, WithCustomValueBinder, WithColumnWidths, WithEvents, WithColumnFormatting, WithTitle
|
||||
{
|
||||
public $cawangan_detail;
|
||||
public $query;
|
||||
public $teller_with_penebusan_summary_data;
|
||||
public $summary_penebusan;
|
||||
|
||||
public function __construct($cawangan_detail, $query, $teller_with_penebusan_data, $summary_penebusan)
|
||||
{
|
||||
$this->cawangan_detail = $cawangan_detail;
|
||||
$this->query = $query;
|
||||
$this->teller_with_penebusan_summary_data = $teller_with_penebusan_data;
|
||||
$this->summary_penebusan = $summary_penebusan;
|
||||
}
|
||||
|
||||
public function title(): string
|
||||
{
|
||||
return 'SUMMARY PENEBUSAN';
|
||||
}
|
||||
|
||||
public function bindValue(Cell $cell, $value)
|
||||
{
|
||||
if (is_numeric($value)) {
|
||||
$cell->setValueExplicit($value, DataType::TYPE_NUMERIC);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// else return default behavior
|
||||
return parent::bindValue($cell, $value);
|
||||
}
|
||||
|
||||
public function columnWidths(): array
|
||||
{
|
||||
return [
|
||||
'A' => 28,
|
||||
'B' => 14.67,
|
||||
'C' => 16.00,
|
||||
'D' => 14.18,
|
||||
];
|
||||
}
|
||||
|
||||
public function columnFormats(): array
|
||||
{
|
||||
return [
|
||||
'B' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||
'C' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||
'D' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||
'E' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||
'F' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||
'G' => NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1,
|
||||
];
|
||||
}
|
||||
|
||||
public function registerEvents(): array
|
||||
{
|
||||
$table_style = [
|
||||
'borders' => [
|
||||
'allBorders' => [
|
||||
'borderStyle' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THIN,
|
||||
'color' => ['argb' => '#000000'],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
$main_table_row_count = count($this->teller_with_penebusan_summary_data) + 1;
|
||||
$main_table_start_at_row = 9;
|
||||
|
||||
$main_table_range = 'A' . $main_table_start_at_row . ':J' . ($main_table_row_count + $main_table_start_at_row);
|
||||
|
||||
$summary_table_row_count = 1;
|
||||
$summary_table_start_at_row = $main_table_row_count + $main_table_start_at_row + 5;
|
||||
|
||||
$summary_table_range = 'A' . $summary_table_start_at_row . ':I' . ($summary_table_row_count + $summary_table_start_at_row);
|
||||
|
||||
$summary_table_column_head = 'A' . $summary_table_start_at_row . ':F' . $summary_table_start_at_row;
|
||||
|
||||
// return [
|
||||
// AfterSheet::class => function (AfterSheet $event) use ($main_table_range, $summary_table_range, $summary_table_column_head, $table_style) {
|
||||
|
||||
// $event->sheet->getStyle($main_table_range)->applyFromArray($table_style);
|
||||
// $event->sheet->getStyle($summary_table_range)->applyFromArray($table_style);
|
||||
|
||||
// $event->sheet->mergeCells($summary_table_column_head);
|
||||
|
||||
// },
|
||||
|
||||
// ];
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
return view('exports.penebusan.summary', [
|
||||
'cawangan_detail' => $this->cawangan_detail,
|
||||
'query' => $this->query,
|
||||
'teller_with_penebusan_data' => $this->teller_with_penebusan_summary_data,
|
||||
'summary_penebusan' => $this->summary_penebusan,
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
namespace App;
|
||||
|
||||
use DateTime;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class Helper
|
||||
{
|
||||
|
||||
public static function formatNumber($amount)
|
||||
{
|
||||
$formattedAmount = number_format($amount, 2, '.', ',');
|
||||
|
||||
return $formattedAmount;
|
||||
}
|
||||
|
||||
public static function formatDate($date_string)
|
||||
{
|
||||
return (new DateTime($date_string))->format("d-m-Y");
|
||||
}
|
||||
|
||||
public static function getActiveCawanganDbConnection()
|
||||
{
|
||||
|
||||
$all_active_db_keys = array_filter(array_keys(config('database.connections')), function ($connection) {
|
||||
try {
|
||||
DB::connection($connection)->getPdo();
|
||||
return true;
|
||||
} catch (\Throwable $th) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$non_cawangan_database = ['lelong', 'online_arrahn', 'kaunterpkb'];
|
||||
|
||||
$all_cawangan_db = array_filter($all_active_db_keys, function ($db_key) use ($non_cawangan_database) {
|
||||
$isNotCawangan = in_array(config('database.connections.' . $db_key . '.database'), $non_cawangan_database);
|
||||
|
||||
if ($isNotCawangan) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
});
|
||||
|
||||
return $all_cawangan_db;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Reports;
|
||||
|
||||
use App\Exports\Ansuran\AnsuranExport;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use Maatwebsite\Excel\Facades\Excel;
|
||||
|
||||
class AnsuranController extends Controller
|
||||
{
|
||||
public function index(Request $request)
|
||||
{
|
||||
$current = new Carbon();
|
||||
|
||||
$getReportDate = function ($date_string) use ($current) {
|
||||
if ($date_string == null) {
|
||||
return $current->toDateString();
|
||||
}
|
||||
|
||||
return $date_string;
|
||||
};
|
||||
|
||||
$request->hostname = config('api.url');
|
||||
|
||||
$data = Http::get($request->hostname . '/api/reports/ansuran', [
|
||||
'startDate' => $getReportDate($request->startDate),
|
||||
'endDate' => $getReportDate($request->endDate),
|
||||
])->json();
|
||||
|
||||
$summary_ansuran_by_cawangan = $data['summary_ansuran_by_cawangan'];
|
||||
$summary_ansuran = $data['summary_ansuran'];
|
||||
|
||||
$startDate = $getReportDate($request->startDate);
|
||||
$endDate = $getReportDate($request->endDate);
|
||||
|
||||
return view('reports.ansuran.index', compact('summary_ansuran_by_cawangan', 'summary_ansuran', 'startDate', 'endDate'));
|
||||
}
|
||||
|
||||
public function downloadAnsuranCawanganExcel(Request $request)
|
||||
{
|
||||
$api_url = $request->hostname;
|
||||
$auth_user = Auth::user();
|
||||
$current = Carbon::now();
|
||||
$current = new Carbon();
|
||||
$tarikh_cetak = $current->toDateString();
|
||||
|
||||
$getReportDate = function ($date_string) use ($current) {
|
||||
if ($date_string == null) {
|
||||
return $current->toDateString();
|
||||
}
|
||||
|
||||
return $date_string;
|
||||
};
|
||||
|
||||
$request->hostname = config('api.url');
|
||||
$kod_cawangan = $request->kod_cawangan;
|
||||
|
||||
$data = Http::get($request->hostname . '/api/reports/ansuran/' . $kod_cawangan, [
|
||||
'startDate' => $getReportDate($request->startDate),
|
||||
'endDate' => $getReportDate($request->endDate),
|
||||
])->json();
|
||||
|
||||
$file_title = sprintf("LaporanAnsuran %s (%s - %s).xlsx", $kod_cawangan, $request->startDate, $request->endDate);
|
||||
return Excel::download(new AnsuranExport($data), $file_title);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Reports;
|
||||
|
||||
use App\Exports\GadaianExport;
|
||||
use App\Helper;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use Maatwebsite\Excel\Facades\Excel;
|
||||
|
||||
class GadaianController extends Controller
|
||||
{
|
||||
public function index(Request $request)
|
||||
{
|
||||
$current = new Carbon();
|
||||
|
||||
$getReportDate = function ($date_string) use ($current) {
|
||||
if ($date_string == null) {
|
||||
return $current->toDateString();
|
||||
}
|
||||
|
||||
return $date_string;
|
||||
};
|
||||
|
||||
$request->hostname = config('api.url');
|
||||
|
||||
$gadaian = Http::get($request->hostname . '/api/reports/gadaian', [
|
||||
'startDate' => $getReportDate($request->startDate),
|
||||
'endDate' => $getReportDate($request->endDate),
|
||||
])->json();
|
||||
|
||||
$startDate = $getReportDate($request->startDate);
|
||||
$endDate = $getReportDate($request->endDate);
|
||||
|
||||
return view('reports.gadaian.index', compact('gadaian', 'startDate', 'endDate'));
|
||||
}
|
||||
|
||||
public function downloadGadaianCawanganExcel(Request $request)
|
||||
{
|
||||
$api_url = $request->hostname;
|
||||
$auth_user = Auth::user();
|
||||
$current = Carbon::now();
|
||||
$current = new Carbon();
|
||||
$tarikh_cetak = $current->toDateString();
|
||||
|
||||
$getReportDate = function ($date_string) use ($current) {
|
||||
if ($date_string == null) {
|
||||
return $current->toDateString();
|
||||
}
|
||||
|
||||
return $date_string;
|
||||
};
|
||||
|
||||
$request->hostname = config('api.url');
|
||||
$kod_cawangan = $request->kod_cawangan;
|
||||
|
||||
$data = Http::get($request->hostname . '/api/reports/gadaian/' . $kod_cawangan, [
|
||||
'startDate' => $getReportDate($request->startDate),
|
||||
'endDate' => $getReportDate($request->endDate),
|
||||
])->json();
|
||||
|
||||
|
||||
$file_title = sprintf("LaporanGadaian %s (%s - %s).xlsx", $kod_cawangan, $request->startDate, $request->endDate);
|
||||
return Excel::download(new GadaianExport($data), $file_title);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Reports;
|
||||
|
||||
use App\Exports\Penebusan\PenebusanExport;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use Maatwebsite\Excel\Facades\Excel;
|
||||
|
||||
class PenebusanController extends Controller
|
||||
{
|
||||
public function index(Request $request)
|
||||
{
|
||||
$current = new Carbon();
|
||||
|
||||
$getReportDate = function ($date_string) use ($current) {
|
||||
if ($date_string == null) {
|
||||
return $current->toDateString();
|
||||
}
|
||||
|
||||
return $date_string;
|
||||
};
|
||||
|
||||
$request->hostname = config('api.url');
|
||||
|
||||
$penebusan = Http::get($request->hostname . '/api/reports/penebusan', [
|
||||
'startDate' => $getReportDate($request->startDate),
|
||||
'endDate' => $getReportDate($request->endDate),
|
||||
])->json();
|
||||
|
||||
$startDate = $getReportDate($request->startDate);
|
||||
$endDate = $getReportDate($request->endDate);
|
||||
|
||||
return view('reports.penebusan.index', compact('penebusan', 'startDate', 'endDate'));
|
||||
}
|
||||
|
||||
public function downloadPenebusanCawanganExcel(Request $request)
|
||||
{
|
||||
$api_url = $request->hostname;
|
||||
$auth_user = Auth::user();
|
||||
$current = Carbon::now();
|
||||
$current = new Carbon();
|
||||
$tarikh_cetak = $current->toDateString();
|
||||
|
||||
$getReportDate = function ($date_string) use ($current) {
|
||||
if ($date_string == null) {
|
||||
return $current->toDateString();
|
||||
}
|
||||
|
||||
return $date_string;
|
||||
};
|
||||
|
||||
$request->hostname = config('api.url');
|
||||
$kod_cawangan = $request->kod_cawangan;
|
||||
|
||||
$data = Http::get($request->hostname . '/api/reports/penebusan/' . $kod_cawangan, [
|
||||
'startDate' => $getReportDate($request->startDate),
|
||||
'endDate' => $getReportDate($request->endDate),
|
||||
])->json();
|
||||
|
||||
$file_title = sprintf("LaporanPenebusan %s (%s - %s).xlsx", $kod_cawangan, $request->startDate, $request->endDate);
|
||||
return Excel::download(new PenebusanExport($data), $file_title);
|
||||
}
|
||||
}
|
||||
@@ -43,10 +43,17 @@ class RouteServiceProvider extends ServiceProvider
|
||||
->namespace($this->namespace)
|
||||
->group(base_path('routes/api.php'));
|
||||
|
||||
Route::middleware('web')
|
||||
->namespace($this->namespace)
|
||||
->prefix('reports')
|
||||
->group(base_path('routes/reports.php'));
|
||||
|
||||
Route::middleware('web')
|
||||
->namespace($this->namespace)
|
||||
->group(base_path('routes/web.php'));
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
<table>
|
||||
<tr>
|
||||
<td>{{ $cawangan_detail['nama'] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ $cawangan_detail['code'] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ $cawangan_detail['alamat'] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ $cawangan_detail['waktu_operasi'] }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<strong>LAPORAN ANSURAN</strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
TARIKH DARI {{ $query['startDate'] }} hingga {{ $query['endDate'] }}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table>
|
||||
<td colspan="2">
|
||||
<strong>TELLER : {{ $teller_with_ansuran_data['teller'] }}</strong>
|
||||
</td>
|
||||
</table>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No rujukan</th>
|
||||
<th>Nama</th>
|
||||
<th>No KP</th>
|
||||
<th>Bayaran Pembiayaan(RM)</th>
|
||||
<th>Bayaran Keuntungan(RM)</th>
|
||||
<th>Jumlah Ansuran(RM)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($teller_with_ansuran_data['data']['ansuran'] as $ansuran_detail)
|
||||
<tr>
|
||||
<td>{{ $ansuran_detail['norujukan'] }}</td>
|
||||
<td>{{ $ansuran_detail['nama'] }}</td>
|
||||
<td>{{ $ansuran_detail['no_kp'] }}</td>
|
||||
<td>{{ $ansuran_detail['bayaran_pembiayaan'] }}</td>
|
||||
<td>{{ $ansuran_detail['bayaran_keuntungan'] }}</td>
|
||||
<td>{{ $ansuran_detail['jumlah_ansuran'] }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<tr>
|
||||
<td colspan="3" align="right">Jumlah</td>
|
||||
<td>{{ $teller_with_ansuran_data['data']['summary_ansuran_teller']['sum_bayaran_pembiayaan'] }}</td>
|
||||
<td>{{ $teller_with_ansuran_data['data']['summary_ansuran_teller']['sum_bayaran_kos_keuntungan'] }}</td>
|
||||
<td>{{ $teller_with_ansuran_data['data']['summary_ansuran_teller']['sum_jumlah_bayaran'] }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -0,0 +1,52 @@
|
||||
<table>
|
||||
<tr>
|
||||
<td>{{ $cawangan_detail['nama'] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ $cawangan_detail['code'] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ $cawangan_detail['alamat'] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ $cawangan_detail['waktu_operasi'] }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<strong>LAPORAN ANSURAN</strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
TARIKH DARI {{ $query['startDate'] }} hingga {{ $query['endDate'] }}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Jumlah Nombor Rujukan</th>
|
||||
<th>Bayaran Pembiayaan(RM)</th>
|
||||
<th>Bayaran Kos Keuntungan(RM)</th>
|
||||
<th>Jumlah Bayaran(RM)</th>
|
||||
</tr>
|
||||
@foreach ($teller_with_ansuran_data as $data)
|
||||
<tr>
|
||||
<td>{{ $data['teller'] }}</td>
|
||||
<td>{{ $data['summary_ansuran_teller']['sum_norujukan'] }}</td>
|
||||
<td>{{ $data['summary_ansuran_teller']['sum_bayaran_pembiayaan'] }}</td>
|
||||
<td>{{ $data['summary_ansuran_teller']['sum_bayaran_kos_keuntungan'] }}</td>
|
||||
<td>{{ $data['summary_ansuran_teller']['sum_jumlah_bayaran'] }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>{{ $summary_ansuran['sum_norujukan'] }}</td>
|
||||
<td>{{ $summary_ansuran['sum_bayaran_pembiayaan'] }}</td>
|
||||
<td>{{ $summary_ansuran['sum_bayaran_kos_keuntungan'] }}</td>
|
||||
<td>{{ $summary_ansuran['sum_jumlah_bayaran'] }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -0,0 +1,72 @@
|
||||
<table>
|
||||
<tr>
|
||||
<td>{{ $cawangan_detail['nama'] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ $cawangan_detail['code'] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ $cawangan_detail['alamat'] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ $cawangan_detail['waktu_operasi'] }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<strong>LAPORAN GADAI</strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
TARIKH DARI {{ $query['startDate'] }} hingga {{ $query['endDate'] }}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table>
|
||||
<td colspan="2">
|
||||
<strong>TELLER : {{ $teller_with_gadaian_data['teller'] }}</strong>
|
||||
</td>
|
||||
</table>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No rujukan</th>
|
||||
<th>Nama</th>
|
||||
<th>Alamat</th>
|
||||
<th>No KP</th>
|
||||
<th>Masa</th>
|
||||
<th>Marhun</th>
|
||||
<th>Berat</th>
|
||||
<th>Nilai Marhun</th>
|
||||
<th>Pembiayaan</th>
|
||||
<th>%</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($teller_with_gadaian_data['data']['gadaian'] as $gadaian_detail)
|
||||
<tr>
|
||||
<td>{{ $gadaian_detail['no_rujukan'] }}</td>
|
||||
<td>{{ $gadaian_detail['nama'] }}</td>
|
||||
<td>{{ $gadaian_detail['alamat'] }}</td>
|
||||
<td>{{ $gadaian_detail['no_kp'] }}</td>
|
||||
<td>{{ $gadaian_detail['masa'] }}</td>
|
||||
<td>{{ $gadaian_detail['marhun'] }}</td>
|
||||
<td>{{ $gadaian_detail['berat'] }}</td>
|
||||
<td>{{ $gadaian_detail['nilai_marhun'] }}</td>
|
||||
<td>{{ $gadaian_detail['pembiayaan'] }}</td>
|
||||
<td>{{ $gadaian_detail['peratusan_margin_pinjaman'] }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<tr>
|
||||
<td colspan="6" align="right">Jumlah</td>
|
||||
<td>{{ $teller_with_gadaian_data['data']['summary_gadaian_teller']['total_berat'] }}</td>
|
||||
<td>{{ $teller_with_gadaian_data['data']['summary_gadaian_teller']['total_nilai_marhun'] }}</td>
|
||||
<td>{{ $teller_with_gadaian_data['data']['summary_gadaian_teller']['total_pembiayaan'] }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -0,0 +1,49 @@
|
||||
<table>
|
||||
<tr>
|
||||
<td>{{ $cawangan_detail['nama'] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ $cawangan_detail['code'] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ $cawangan_detail['alamat'] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ $cawangan_detail['waktu_operasi'] }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<strong>LAPORAN GADAI</strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
TARIKH DARI {{ $query['startDate'] }} hingga {{ $query['endDate'] }}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Berat</th>
|
||||
<th>N.Marhun</th>
|
||||
<th>Pembiayaan(RM)</th>
|
||||
</tr>
|
||||
@foreach ($teller_with_gadaian_data as $data)
|
||||
<tr>
|
||||
<td>{{ $data['teller'] }}</td>
|
||||
<td>{{ $data['summary_gadaian_teller']['total_berat'] }}</td>
|
||||
<td>{{ $data['summary_gadaian_teller']['total_nilai_marhun'] }}</td>
|
||||
<td>{{ $data['summary_gadaian_teller']['total_pembiayaan'] }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>{{ $summary_gadaian['total_berat'] }}</td>
|
||||
<td>{{ $summary_gadaian['total_nilai_marhun'] }}</td>
|
||||
<td>{{ $summary_gadaian['total_pembiayaan'] }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -0,0 +1,79 @@
|
||||
<table>
|
||||
<tr>
|
||||
<td>{{ $cawangan_detail['nama'] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ $cawangan_detail['code'] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ $cawangan_detail['alamat'] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ $cawangan_detail['waktu_operasi'] }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<strong>LAPORAN GADAI</strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
TARIKH DARI {{ $query['startDate'] }} hingga {{ $query['endDate'] }}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table>
|
||||
<td colspan="2">
|
||||
<strong>TELLER : {{ $teller_with_penebusan_data['teller'] }}</strong>
|
||||
</td>
|
||||
</table>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No rujukan</th>
|
||||
<th>Nama</th>
|
||||
<th>No KP</th>
|
||||
<th>Tarikh Gadai</th>
|
||||
<th>JBG</th>
|
||||
<th>Nilai Pinjaman(RM)</th>
|
||||
<th>Baki Pinjaman(RM)</th>
|
||||
<th>Kos Keuntungan(RM)</th>
|
||||
<th>Kos Keuntungan Rebet(RM)</th>
|
||||
<th>Bayaran Penebusan(RM)</th>
|
||||
<th>Nilai Marhun(RM)</th>
|
||||
<th>Jenis Tebus</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($teller_with_penebusan_data['data']['penebusan'] as $penebusan_detail)
|
||||
<tr>
|
||||
<td>{{ $penebusan_detail['no_rujukan'] }}</td>
|
||||
<td>{{ $penebusan_detail['nama'] }}</td>
|
||||
<td>{{ $penebusan_detail['no_kp'] }}</td>
|
||||
<td>{{ $penebusan_detail['tarikh_gadai'] }}</td>
|
||||
<td>{{ $penebusan_detail['jbg'] }}</td>
|
||||
<td>{{ $penebusan_detail['nilai_pinjaman'] }}</td>
|
||||
<td>{{ $penebusan_detail['baki_pinjaman'] }}</td>
|
||||
<td>{{ $penebusan_detail['kos_keuntungan'] }}</td>
|
||||
<td>{{ $penebusan_detail['kos_keuntungan_rebet'] }}</td>
|
||||
<td>{{ $penebusan_detail['bayaran_penebusan'] }}</td>
|
||||
<td>{{ $penebusan_detail['nilai_marhun'] }}</td>
|
||||
<td>{{ $penebusan_detail['jenis_tebus'] }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<tr>
|
||||
<td colspan="5" align="right">Jumlah</td>
|
||||
<td>{{ $teller_with_penebusan_data['data']['summary_penebusan_teller']['nilai_pinjaman'] }}</td>
|
||||
<td>{{ $teller_with_penebusan_data['data']['summary_penebusan_teller']['baki_pinjaman'] }}</td>
|
||||
<td>{{ $teller_with_penebusan_data['data']['summary_penebusan_teller']['kos_keuntungan'] }}</td>
|
||||
<td>{{ $teller_with_penebusan_data['data']['summary_penebusan_teller']['kos_keuntungan_rebet'] }}</td>
|
||||
<td>{{ $teller_with_penebusan_data['data']['summary_penebusan_teller']['bayaran_penebusan'] }}</td>
|
||||
<td>{{ $teller_with_penebusan_data['data']['summary_penebusan_teller']['nilai_marhun'] }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -0,0 +1,58 @@
|
||||
<table>
|
||||
<tr>
|
||||
<td>{{ $cawangan_detail['nama'] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ $cawangan_detail['code'] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ $cawangan_detail['alamat'] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ $cawangan_detail['waktu_operasi'] }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<strong>LAPORAN GADAI</strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
TARIKH DARI {{ $query['startDate'] }} hingga {{ $query['endDate'] }}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Nilai Pinjaman(RM)</th>
|
||||
<th>Baki Pinjaman(RM)</th>
|
||||
<th>Kos Keuntungan(RM)</th>
|
||||
<th>Kos Keuntungan Rebet(RM)</th>
|
||||
<th>Bayaran Penebusan(RM)</th>
|
||||
<th>Nilai Marhun(RM)</th>
|
||||
</tr>
|
||||
@foreach ($teller_with_penebusan_data as $data)
|
||||
<tr>
|
||||
<td>{{ $data['teller'] }}</td>
|
||||
<td>{{ $data['summary_penebusan_teller']['nilai_pinjaman'] }}</td>
|
||||
<td>{{ $data['summary_penebusan_teller']['baki_pinjaman'] }}</td>
|
||||
<td>{{ $data['summary_penebusan_teller']['kos_keuntungan'] }}</td>
|
||||
<td>{{ $data['summary_penebusan_teller']['kos_keuntungan_rebet'] }}</td>
|
||||
<td>{{ $data['summary_penebusan_teller']['bayaran_penebusan'] }}</td>
|
||||
<td>{{ $data['summary_penebusan_teller']['nilai_marhun'] }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>{{ $summary_penebusan['nilai_pinjaman'] }}</td>
|
||||
<td>{{ $summary_penebusan['baki_pinjaman'] }}</td>
|
||||
<td>{{ $summary_penebusan['kos_keuntungan'] }}</td>
|
||||
<td>{{ $summary_penebusan['kos_keuntungan_rebet'] }}</td>
|
||||
<td>{{ $summary_penebusan['bayaran_penebusan'] }}</td>
|
||||
<td>{{ $summary_penebusan['nilai_marhun'] }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -0,0 +1,42 @@
|
||||
@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-file-alt' }]"></breadcrumb>
|
||||
|
||||
<div class="mx-auto content-center flex justify-center items-center">
|
||||
<div class="grid grid-rows-1">
|
||||
<br>
|
||||
<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">
|
||||
<a href="{{ route('reports.gadaian.index') }}" class="">
|
||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">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.penebusan.index') }}" class="">
|
||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Penebusan</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.ansuran.index') }}" class="">
|
||||
<h2 class="mx-auto text-center font-bold text-2xl uppercase">Ansuran</h2>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</main>
|
||||
@include('layouts.footer')
|
||||
@endsection
|
||||
@@ -280,6 +280,19 @@
|
||||
</li>
|
||||
</a>
|
||||
|
||||
<a href="{{ route('reports') }}"
|
||||
class="rounded mb-2 mr-2 {{ Route::is('reports') || Route::is('reports.*') ? '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="text-sm ml-2 text-lg">Laporan Keseluruhan</span>
|
||||
</div>
|
||||
</li>
|
||||
</a>
|
||||
{{-- <a href="{{ route('permohonan.index') }}" class="rounded mb-2 mr-2
|
||||
{{ Route::is('permohonan') || Route::is('permohonan.*') ? '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 ">
|
||||
@@ -337,7 +350,7 @@
|
||||
</div>
|
||||
</li>
|
||||
</a> --}}
|
||||
|
||||
|
||||
@elseif(Auth::user()->roles == 'kpo')
|
||||
<a href="{{ route('home') }}"
|
||||
class="rounded mr-2 mb-2 {{ Route::is('home') || Route::is('home.*') ? 'bg-gray-200 rounded text-white-500' : 'hover:bg-yellow-300 ' }}">
|
||||
|
||||
@@ -0,0 +1,231 @@
|
||||
@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', 'icon': 'fas fa-users' }, { 'title': 'Ansuran', '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="/akaunhome"
|
||||
class="router-link-active"><i class="fas fa-backspace text-white"></i></a> <span
|
||||
class="text-center mx-auto text-white font-bold">Laporan Ansuran</span></div>
|
||||
<form method="get" id="formansuran" action="{{ route('reports.ansuran.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">
|
||||
Bil Ansuran
|
||||
</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">
|
||||
Bayaran Pembiayaan
|
||||
</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">
|
||||
Bayaran Kos Keuntungan
|
||||
</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 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">
|
||||
Action
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@forelse ($summary_ansuran_by_cawangan as $ansuran)
|
||||
<tr>
|
||||
<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">{{ $loop->iteration }}</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">
|
||||
{{ $ansuran['kod_cawangan'] }}
|
||||
</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">
|
||||
{{ $ansuran['cawangan_detail'] }}
|
||||
</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">
|
||||
{{ $ansuran['bilangan_ansuran'] }}
|
||||
</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">
|
||||
{{ number_format($ansuran['bayaran_pembiayaan'], 2) }}
|
||||
</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">
|
||||
{{ number_format($ansuran['bayaran_kos_keuntungan'], 2) }}
|
||||
</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">
|
||||
{{ number_format($ansuran['jumlah_bayaran'], 2) }}
|
||||
</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">
|
||||
<a href="{{ route('reports.ansuran.cawangan.excel', [$ansuran['kod_cawangan'], '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>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="8" 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">Data not available</p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
@if (count($summary_ansuran_by_cawangan) !== 0)
|
||||
<tr>
|
||||
<td colspan="3" class="px-5 py-5 border-b border-gray-200 bg-white text-sm"></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">
|
||||
{{ $summary_ansuran['bilangan_ansuran'] }}
|
||||
</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">
|
||||
{{ number_format($summary_ansuran['bayaran_pembiayaan'], 2) }}
|
||||
</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">
|
||||
{{ number_format($summary_ansuran['bayaran_kos_keuntungan'], 2) }}
|
||||
</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">
|
||||
{{ number_format($summary_ansuran['jumlah_bayaran'], 2) }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm"></td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
@include('layouts.footer')
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
@@ -0,0 +1,183 @@
|
||||
@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', 'icon': 'fas fa-users' }, { '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="/akaunhome"
|
||||
class="router-link-active"><i class="fas fa-backspace text-white"></i></a> <span
|
||||
class="text-center mx-auto text-white font-bold">Laporan Gadaian</span></div>
|
||||
<form method="get" id="formgadaian" action="{{ route('reports.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">
|
||||
Bil Gadai
|
||||
</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">
|
||||
Action
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@forelse ($gadaian as $gadai)
|
||||
<tr>
|
||||
<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">{{ $loop->iteration }}</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">{{ $gadai['kodcaw'] }}</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">{{ $gadai['details_caw'] }}</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">{{ $gadai['total_gadaian'] }}
|
||||
</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">
|
||||
{{ number_format($gadai['sum_berat'], 2) }}</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">
|
||||
{{ number_format($gadai['sum_nilai_marhun'], 2) }}</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">
|
||||
{{ number_format($gadai['sum_pinjaman'], 2) }}</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">
|
||||
<a
|
||||
href="{{ route('reports.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>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="6" 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">Data not available</p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
@include('layouts.footer')
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
@@ -0,0 +1,228 @@
|
||||
@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', 'icon': 'fas fa-users' }, { 'title': 'Penebusan', '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="/akaunhome"
|
||||
class="router-link-active"><i class="fas fa-backspace text-white"></i></a> <span
|
||||
class="text-center mx-auto text-white font-bold">Laporan Penebusan</span></div>
|
||||
<form method="get" id="formpenebusan" action="{{ route('reports.penebusan.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">
|
||||
Bil Tebus
|
||||
</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">
|
||||
Nilai 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">
|
||||
Baki 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">
|
||||
Keuntungan Asal(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">
|
||||
Keuntungan Rebet(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">
|
||||
Bayaran Penebusan(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>
|
||||
<tbody>
|
||||
@forelse ($penebusan as $tebus)
|
||||
<tr>
|
||||
<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">{{ $loop->iteration }}</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">{{ $tebus['kodcaw'] }}</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">{{ $tebus['details_caw'] }}</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">{{ $tebus['bilangan_tebus'] }}
|
||||
</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">
|
||||
{{ number_format($tebus['berat'], 2) }}</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">
|
||||
{{ number_format($tebus['nilai_pinjaman'], 2) }}</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">
|
||||
{{ number_format($tebus['baki_pinjaman'], 2) }}</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">
|
||||
{{ number_format($tebus['nilai_marhun'], 2) }}</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">
|
||||
{{ number_format($tebus['keuntungan_asal'], 2) }}</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">
|
||||
{{ number_format($tebus['keuntungan_rebet'], 2) }}</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">
|
||||
{{ number_format($tebus['bayaran_penebusan'], 2) }}</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">
|
||||
<a href="{{ route('reports.penebusan.cawangan.excel', [$tebus['kodcaw'], 'startDate' => request()->startDate, 'endDate' => request()->endDate]) }}"
|
||||
target="_blank" rel="noopener noreferrer"
|
||||
class="flex 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>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="6" 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">Data not available</p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
@include('layouts.footer')
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
use App\Http\Controllers\Reports\GadaianController;
|
||||
use App\Http\Controllers\Reports\PenebusanController;
|
||||
use App\Http\Controllers\Reports\AnsuranController;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
Route::middleware(['roleChecker:admin,akaun,operasi,kpo'])->group(function () {
|
||||
Route::get('', [App\Http\Controllers\HomeController::class, 'indexOverallReport'])->name('reports');
|
||||
Route::get('gadaian', [GadaianController::class, 'index'])->name('reports.gadaian.index');
|
||||
Route::get('gadaian/{kod_cawangan}', [GadaianController::class, 'downloadGadaianCawanganExcel'])->name('reports.gadaian.cawangan.excel');
|
||||
Route::get('penebusan', [PenebusanController::class, 'index'])->name('reports.penebusan.index');
|
||||
Route::get('penebusan/{kod_cawangan}', [PenebusanController::class, 'downloadPenebusanCawanganExcel'])->name('reports.penebusan.cawangan.excel');
|
||||
Route::get('ansuran', [AnsuranController::class, 'index'])->name('reports.ansuran.index');
|
||||
Route::get('ansuran/{kod_cawangan}', [AnsuranController::class, 'downloadAnsuranCawanganExcel'])->name('reports.ansuran.cawangan.excel');
|
||||
});
|
||||
Reference in New Issue
Block a user