add module konfirmasibank
This commit is contained in:
0
Config/.gitkeep
Normal file
0
Config/.gitkeep
Normal file
5
Config/config.php
Normal file
5
Config/config.php
Normal file
@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'name' => 'KonfirmasiBank'
|
||||
];
|
0
Console/.gitkeep
Normal file
0
Console/.gitkeep
Normal file
160
DataTables/AccountDataTable.php
Normal file
160
DataTables/AccountDataTable.php
Normal file
@ -0,0 +1,160 @@
|
||||
<?php
|
||||
|
||||
//namespace App\DataTables;
|
||||
namespace Modules\Konfirmasibank\DataTables;
|
||||
|
||||
use Modules\Konfirmasibank\Entities\Account;
|
||||
use Illuminate\Database\Eloquent\Builder as QueryBuilder;
|
||||
use Yajra\DataTables\EloquentDataTable;
|
||||
use Yajra\DataTables\Html\Builder as HtmlBuilder;
|
||||
use Yajra\DataTables\Html\Button;
|
||||
use Yajra\DataTables\Html\Column;
|
||||
use Carbon\Carbon;
|
||||
use Yajra\DataTables\Html\Editor\Editor;
|
||||
use Yajra\DataTables\Html\Editor\Fields;
|
||||
use Yajra\DataTables\Services\DataTable;
|
||||
|
||||
class AccountDataTable extends DataTable
|
||||
{
|
||||
/**
|
||||
* Build the DataTable class.
|
||||
*
|
||||
* @param QueryBuilder $query Results from query() method.
|
||||
*/
|
||||
public function dataTable(QueryBuilder $query)
|
||||
: EloquentDataTable
|
||||
{
|
||||
|
||||
// $query = $query->with(['ViewCustomer']);
|
||||
return (new EloquentDataTable($query))
|
||||
->filter(function ($query) {
|
||||
if (request()->has('search')) {
|
||||
$search = request()->get('search');
|
||||
$dataSearch = explode(',', $search['value']);
|
||||
$query->where(function($query) use ($dataSearch){
|
||||
if($dataSearch[0] != "" && $dataSearch[1] == "" && $dataSearch[2] == ""){
|
||||
$query->where('CUSTOMER_NO', $dataSearch[0]);
|
||||
} else if($dataSearch[0] != "" && $dataSearch[1] != "" && $dataSearch[2] == ""){
|
||||
$query->where('CUSTOMER_NO', $dataSearch[0]);
|
||||
$query->Where('CO_CODE', $dataSearch[1]);
|
||||
}else if($dataSearch[0] != "" && $dataSearch[1] != "" && $dataSearch[2] != ""){
|
||||
$query->where('CUSTOMER_NO', $dataSearch[0]);
|
||||
$query->Where('CO_CODE', $dataSearch[1]);
|
||||
$query->where('BATCH_DATE', 'like', "%" . Carbon::parse($dataSearch[2])->format('m'). "%" );
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
})
|
||||
->addColumn('customer_no', function ($model) {
|
||||
return $model->CUSTOMER_NO;
|
||||
})
|
||||
->addColumn('account_number', function ($model) {
|
||||
return $model->ACCOUNT_NUMBER;
|
||||
})
|
||||
->addColumn('account_name', function ($model) {
|
||||
return $model->ACCOUNT_TITLE_1;
|
||||
})
|
||||
->addColumn('co_code', function ($model) {
|
||||
return $model->CO_CODE;
|
||||
})
|
||||
->addColumn('currency', function ($model) {
|
||||
return $model->CURRENCY;
|
||||
// $dt = Carbon::create($model->tanggal_upload);
|
||||
// return $dt->isoFormat('D MMMM Y H:mm:ss');
|
||||
})
|
||||
->addColumn('batch_date', function ($model) {
|
||||
$dt = Carbon::create($model->BATCH_DATE);
|
||||
return $dt->isoFormat('DD/MM/YYYY');
|
||||
})
|
||||
->addColumn('status', function ($model) {
|
||||
return '<span class="badge badge-light-success">Approved</span>';
|
||||
// if ($model->status == 1) {
|
||||
// return '<span class="badge badge-light-success">Approved</span>';
|
||||
// } else if ($model->status == 0) {
|
||||
// return '<span class="badge badge-light-warning">Menunggu Approval</span>';
|
||||
// } else if ($model->status == 3) {
|
||||
// return '<span class="badge badge-light-danger">Rejected</span>';
|
||||
// } else if ($model->status == 4) {
|
||||
// return '<span class="badge badge-light-success">Approved</span> <span class="badge badge-light-warning">Request Download</span>';
|
||||
// } else if ($model->status == 5) {
|
||||
// return '<span class="badge badge-light-success">Approved</span> <span class="badge badge-light-info">Download Approved</span>';
|
||||
// } else if ($model->status == 6) {
|
||||
// return '<span class="badge badge-light-success">Approved</span> <span class="badge badge-light-warning">Request Delete</span>';
|
||||
// } else if ($model->status == 7) {
|
||||
// return '<span class="badge badge-light-success">Approved</span> <span class="badge badge-light-danger">Request Delete</span>';
|
||||
// } else if ($model->status == 8) {
|
||||
// return '<span class="badge badge-light-success">Deleted</span>';
|
||||
// } else if ($model->status == 9) {
|
||||
// return '<span class="badge badge-light-success">Approved</span> <span class="badge badge-light-danger">Request Non-Aktif</span>';
|
||||
// }
|
||||
})
|
||||
->addIndexColumn()
|
||||
->rawColumns(['status', 'action'])
|
||||
->addColumn('action', 'konfirmasibank::._action')
|
||||
->setRowId('id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the query source of dataTable.
|
||||
*/
|
||||
public function query(Account $model)
|
||||
: QueryBuilder
|
||||
{
|
||||
$currentYear = Carbon::now()->format('Y');
|
||||
|
||||
return $model->newQuery()->where('BATCH_DATE', 'like', "%" . $currentYear. "%");
|
||||
}
|
||||
|
||||
/**
|
||||
* Optional method if you want to use the html builder.
|
||||
*/
|
||||
public function html()
|
||||
: HtmlBuilder
|
||||
{
|
||||
return $this->builder()
|
||||
->setTableId('konfirmasibank-table')
|
||||
->columns($this->getColumns())
|
||||
->minifiedAjax()
|
||||
->stateSave(false)
|
||||
->responsive()
|
||||
->autoWidth(true)
|
||||
->orderBy(1)
|
||||
->parameters([
|
||||
'scrollX' => true,
|
||||
'drawCallback' => 'function() { KTMenu.createInstances(); }',
|
||||
])
|
||||
->addTableClass('align-middle table-row-dashed fs-6 gy-5');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the dataTable columns definition.
|
||||
*/
|
||||
public function getColumns()
|
||||
: array
|
||||
{
|
||||
return [
|
||||
Column::make('DT_RowIndex')->title('No')->orderable(false)->searchable(false)->addClass('text-center'),
|
||||
Column::make('customer_no')->title('NO CIF')->addClass('text-center'),
|
||||
Column::make('account_number')->title('No Account')->addClass('text-center'),
|
||||
Column::make('account_name')->title('Nama Account')->addClass('text-center'),
|
||||
Column::make('co_code')->title('Kode Cabang')->addClass('text-center'),
|
||||
Column::make('currency')->title('Mata Uang')->addClass('text-center'),
|
||||
Column::make('batch_date')->title('Periode')->addClass('text-center'),
|
||||
// Column::computed('status'),
|
||||
Column::computed('action')
|
||||
->exportable(false)
|
||||
->printable(false)
|
||||
->addClass('text-center'),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the filename for export.
|
||||
*/
|
||||
protected function filename()
|
||||
: string
|
||||
{
|
||||
return 'Document_' . date('YmdHis');
|
||||
}
|
||||
}
|
100
DataTables/CustomerDataTable.php
Normal file
100
DataTables/CustomerDataTable.php
Normal file
@ -0,0 +1,100 @@
|
||||
<?php
|
||||
|
||||
//namespace App\DataTables;
|
||||
namespace Modules\Konfirmasibank\DataTables;
|
||||
|
||||
use Modules\Konfirmasibank\Entities\Customer;
|
||||
use Illuminate\Database\Eloquent\Builder as QueryBuilder;
|
||||
use Yajra\DataTables\EloquentDataTable;
|
||||
use Yajra\DataTables\Html\Builder as HtmlBuilder;
|
||||
use Yajra\DataTables\Html\Button;
|
||||
use Yajra\DataTables\Html\Column;
|
||||
use Yajra\DataTables\Html\Editor\Editor;
|
||||
use Yajra\DataTables\Html\Editor\Fields;
|
||||
use Yajra\DataTables\Services\DataTable;
|
||||
|
||||
class CustomerDataTable extends DataTable
|
||||
{
|
||||
/**
|
||||
* Build the DataTable class.
|
||||
*
|
||||
* @param QueryBuilder $query Results from query() method.
|
||||
*/
|
||||
public function dataTable(QueryBuilder $query): EloquentDataTable
|
||||
{
|
||||
|
||||
return (new EloquentDataTable($query))
|
||||
->filter(function ($query) {
|
||||
if (request()->has('search')) {
|
||||
$search = request()->get('search');
|
||||
$query->where('customer_no', 'like', "%" . $search['value'] . "%")
|
||||
->orWhere('customer_name', 'like', "%" . $search['value'] . "%");
|
||||
}
|
||||
})
|
||||
->addColumn('customer',function($model){
|
||||
return $model->ACCOUNT_NUMBER;
|
||||
})
|
||||
->addColumn('customer',function($model){
|
||||
return $model->customer;
|
||||
})
|
||||
->addIndexColumn()
|
||||
->addColumn('action', 'customer::_action')
|
||||
->setRowId('id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the query source of dataTable.
|
||||
*/
|
||||
public function query(Customer $model): QueryBuilder
|
||||
{
|
||||
|
||||
return $model->newQuery();
|
||||
}
|
||||
|
||||
/**
|
||||
* Optional method if you want to use the html builder.
|
||||
*/
|
||||
public function html(): HtmlBuilder
|
||||
{
|
||||
return $this->builder()
|
||||
->setTableId('customer-table')
|
||||
->columns($this->getColumns())
|
||||
->minifiedAjax()
|
||||
->stateSave(false)
|
||||
->responsive()
|
||||
->autoWidth(true)
|
||||
->orderBy(1)
|
||||
->parameters([
|
||||
'scrollX' => true,
|
||||
'drawCallback' => 'function() { KTMenu.createInstances(); }',
|
||||
])
|
||||
->addTableClass('align-middle table-row-dashed fs-6 gy-5');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the dataTable columns definition.
|
||||
*/
|
||||
public function getColumns(): array
|
||||
{
|
||||
return [
|
||||
Column::make('DT_RowIndex')->title('No')->orderable(false)->searchable(false),
|
||||
// Column::make('ID')->title('CIF'),
|
||||
Column::make('CUSTOMER_NO')->title('CUSTOMER NO'),
|
||||
Column::make('NAME_1')->title('NAME'),
|
||||
Column::make('ADDRESS')->title('ADDRESS'),
|
||||
Column::computed('action')
|
||||
->exportable(false)
|
||||
->printable(false)
|
||||
->width(60)
|
||||
->addClass('text-center'),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the filename for export.
|
||||
*/
|
||||
protected function filename(): string
|
||||
{
|
||||
return 'Customer_' . date('YmdHis');
|
||||
}
|
||||
}
|
161
DataTables/ViewAccountDataTable.php
Normal file
161
DataTables/ViewAccountDataTable.php
Normal file
@ -0,0 +1,161 @@
|
||||
<?php
|
||||
|
||||
//namespace App\DataTables;
|
||||
namespace Modules\Konfirmasibank\DataTables;
|
||||
|
||||
use Modules\Konfirmasibank\Entities\ViewAccount;
|
||||
use Illuminate\Database\Eloquent\Builder as QueryBuilder;
|
||||
use Yajra\DataTables\EloquentDataTable;
|
||||
use Yajra\DataTables\Html\Builder as HtmlBuilder;
|
||||
use Yajra\DataTables\Html\Button;
|
||||
use Yajra\DataTables\Html\Column;
|
||||
use Carbon\Carbon;
|
||||
use Yajra\DataTables\Html\Editor\Editor;
|
||||
use Yajra\DataTables\Html\Editor\Fields;
|
||||
use Yajra\DataTables\Services\DataTable;
|
||||
|
||||
class ViewAccountDataTable extends DataTable
|
||||
{
|
||||
/**
|
||||
* Build the DataTable class.
|
||||
*
|
||||
* @param QueryBuilder $query Results from query() method.
|
||||
*/
|
||||
public function dataTable(QueryBuilder $query)
|
||||
: EloquentDataTable
|
||||
{
|
||||
|
||||
// $query = $query->with(['ViewCustomer']);
|
||||
return (new EloquentDataTable($query))
|
||||
->filter(function ($query) {
|
||||
if (request()->has('search')) {
|
||||
$search = request()->get('search');
|
||||
$dataSearch = explode(',', $search['value']);
|
||||
$query->where(function($query) use ($dataSearch){
|
||||
if($dataSearch[0] != "" && $dataSearch[1] == "" && $dataSearch[2] == ""){
|
||||
$query->where('CUSTOMER_NO', $dataSearch[0]);
|
||||
} else if($dataSearch[0] != "" && $dataSearch[1] != "" && $dataSearch[2] == ""){
|
||||
$query->where('CUSTOMER_NO', $dataSearch[0]);
|
||||
$query->where('COMPANY_NAME', 'LIKE', "%" . $dataSearch[1] . "%");
|
||||
}else if($dataSearch[0] != "" && $dataSearch[1] != "" && $dataSearch[2] != ""){
|
||||
$query->where('CUSTOMER_NO', $dataSearch[0]);
|
||||
$query->Where('COMPANY_NAME', 'LIKE', "%" . $dataSearch[1] . "%");
|
||||
$query->where('BATCH_DATE', 'like', "%" . Carbon::parse($dataSearch[2])->format('m'). "%" );
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
})
|
||||
->addColumn('account_number', function ($model) {
|
||||
return $model->ACCOUNT_NUMBER;
|
||||
})
|
||||
->addColumn('co_code', function ($model) {
|
||||
return $model->COMPANY_NAME;
|
||||
})
|
||||
->addColumn('product', function ($model) {
|
||||
return $model->PRODUCT;
|
||||
})
|
||||
->addColumn('currency', function ($model) {
|
||||
return $model->CURRENCY;
|
||||
})
|
||||
->addColumn('working_balance', function ($model) {
|
||||
return $model->WORKING_BALANCE;
|
||||
})
|
||||
->addColumn('batch_date', function ($model) {
|
||||
return $model->BATCH_DATE;
|
||||
})
|
||||
// ->addColumn('', function ($model) {
|
||||
// $dt = Carbon::create($model->BATCH_DATE);
|
||||
// return $dt->isoFormat('DD/MM/YYYY');
|
||||
// })
|
||||
->addColumn('status', function ($model) {
|
||||
return '<span class="badge badge-light-success">Approved</span>';
|
||||
// if ($model->status == 1) {
|
||||
// return '<span class="badge badge-light-success">Approved</span>';
|
||||
// } else if ($model->status == 0) {
|
||||
// return '<span class="badge badge-light-warning">Menunggu Approval</span>';
|
||||
// } else if ($model->status == 3) {
|
||||
// return '<span class="badge badge-light-danger">Rejected</span>';
|
||||
// } else if ($model->status == 4) {
|
||||
// return '<span class="badge badge-light-success">Approved</span> <span class="badge badge-light-warning">Request Download</span>';
|
||||
// } else if ($model->status == 5) {
|
||||
// return '<span class="badge badge-light-success">Approved</span> <span class="badge badge-light-info">Download Approved</span>';
|
||||
// } else if ($model->status == 6) {
|
||||
// return '<span class="badge badge-light-success">Approved</span> <span class="badge badge-light-warning">Request Delete</span>';
|
||||
// } else if ($model->status == 7) {
|
||||
// return '<span class="badge badge-light-success">Approved</span> <span class="badge badge-light-danger">Request Delete</span>';
|
||||
// } else if ($model->status == 8) {
|
||||
// return '<span class="badge badge-light-success">Deleted</span>';
|
||||
// } else if ($model->status == 9) {
|
||||
// return '<span class="badge badge-light-success">Approved</span> <span class="badge badge-light-danger">Request Non-Aktif</span>';
|
||||
// }
|
||||
})
|
||||
->addIndexColumn()
|
||||
->rawColumns(['status', 'action'])
|
||||
->addColumn('action', 'konfirmasibank::._action')
|
||||
->setRowId('id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the query source of dataTable.
|
||||
*/
|
||||
public function query(ViewAccount $model)
|
||||
: QueryBuilder
|
||||
{
|
||||
$currentYear = Carbon::now()->format('Y');
|
||||
|
||||
return $model->newQuery()->where('BATCH_DATE', 'like', "%" . $currentYear. "%");
|
||||
}
|
||||
|
||||
/**
|
||||
* Optional method if you want to use the html builder.
|
||||
*/
|
||||
public function html()
|
||||
: HtmlBuilder
|
||||
{
|
||||
return $this->builder()
|
||||
->setTableId('konfirmasibank-table')
|
||||
->columns($this->getColumns())
|
||||
->minifiedAjax()
|
||||
->stateSave(false)
|
||||
->responsive()
|
||||
->autoWidth(true)
|
||||
->orderBy(1)
|
||||
->parameters([
|
||||
'scrollX' => true,
|
||||
'drawCallback' => 'function() { KTMenu.createInstances(); }',
|
||||
])
|
||||
->addTableClass('align-middle table-row-dashed fs-6 gy-5');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the dataTable columns definition.
|
||||
*/
|
||||
public function getColumns()
|
||||
: array
|
||||
{
|
||||
return [
|
||||
Column::make('DT_RowIndex')->title('No')->orderable(false)->searchable(false)->addClass('text-center'),
|
||||
Column::make('account_number')->title('NO Rekening')->addClass('text-center'),
|
||||
Column::make('co_code')->title('Cabang')->addClass('text-center'),
|
||||
Column::make('product')->title('Jenis Rekening')->addClass('text-center'),
|
||||
Column::make('currency')->title('Mata uang')->addClass('text-center'),
|
||||
Column::make('working_balance')->title('Saldo')->addClass('text-center'),
|
||||
Column::make('batch_date')->title('Periode')->addClass('text-center'),
|
||||
// Column::computed('status'),
|
||||
Column::computed('action')
|
||||
->exportable(false)
|
||||
->printable(false)
|
||||
->addClass('text-center'),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the filename for export.
|
||||
*/
|
||||
protected function filename()
|
||||
: string
|
||||
{
|
||||
return 'Document_' . date('YmdHis');
|
||||
}
|
||||
}
|
175
DataTables/ViewCustomerDataTable.php
Normal file
175
DataTables/ViewCustomerDataTable.php
Normal file
@ -0,0 +1,175 @@
|
||||
<?php
|
||||
|
||||
//namespace App\DataTables;
|
||||
namespace Modules\Konfirmasibank\DataTables;
|
||||
|
||||
use Modules\Konfirmasibank\Entities\ViewCustomer;
|
||||
use Illuminate\Database\Eloquent\Builder as QueryBuilder;
|
||||
use Yajra\DataTables\EloquentDataTable;
|
||||
use Yajra\DataTables\Html\Builder as HtmlBuilder;
|
||||
use Yajra\DataTables\Html\Button;
|
||||
use Yajra\DataTables\Html\Column;
|
||||
use Carbon\Carbon;
|
||||
use Yajra\DataTables\Html\Editor\Editor;
|
||||
use Yajra\DataTables\Html\Editor\Fields;
|
||||
use Yajra\DataTables\Services\DataTable;
|
||||
|
||||
class ViewCustomerDataTable extends DataTable
|
||||
{
|
||||
/**
|
||||
* Build the DataTable class.
|
||||
*
|
||||
* @param QueryBuilder $query Results from query() method.
|
||||
*/
|
||||
public function dataTable(QueryBuilder $query)
|
||||
: EloquentDataTable
|
||||
{
|
||||
|
||||
// $query = $query->with(['ViewCustomer']);
|
||||
return (new EloquentDataTable($query))
|
||||
->filter(function ($query) {
|
||||
|
||||
|
||||
if (request()->has('search')) {
|
||||
$search = request()->get('search');
|
||||
|
||||
$dataSearch = explode(',', $search['value']);
|
||||
//dd(int)$dataSearch[1]);
|
||||
$query->where(function($query) use ($dataSearch){
|
||||
if($dataSearch[0] != "" && $dataSearch[1] == "" && $dataSearch[2] == ""){
|
||||
$query->where('CUSTOMER_CODE', $dataSearch[0]);
|
||||
} else if($dataSearch[0] != "" && $dataSearch[1] != "" && $dataSearch[2] == ""){
|
||||
$query->where('CUSTOMER_CODE', $dataSearch[0]);
|
||||
$query->Where('BRANCH_CODE', $dataSearch[1]);
|
||||
}else if($dataSearch[0] != "" && $dataSearch[1] != "" && $dataSearch[2] != ""){
|
||||
$query->where('CUSTOMER_CODE', $dataSearch[0]);
|
||||
$query->Where('BRANCH_CODE', $dataSearch[1]);
|
||||
$query->Where('OPENING_DATE', 'like', "%" . $dataSearch[2] . "%");
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
if(request()->has('kodecabang')){
|
||||
if(request()->get('kodecabang') != null){
|
||||
$query->where('BRANCH_CODE', '>=', request()->get('kodecabang'));
|
||||
}
|
||||
}
|
||||
|
||||
if(request()->has('periode')){
|
||||
if(request()->get('periode') != null){
|
||||
$query->where('OPENING_DATE', 'like', "%" . Carbon::parse(request()->get('periode'))->format('Y-m-d') . "%" );
|
||||
}
|
||||
}
|
||||
})
|
||||
->addColumn('customer_code', function ($model) {
|
||||
return $model->customer_code;
|
||||
})
|
||||
->addColumn('account_number', function ($model) {
|
||||
return $model->account_number;
|
||||
})
|
||||
->addColumn('account_name', function ($model) {
|
||||
return $model->account_name;
|
||||
})
|
||||
->addColumn('branch_code', function ($model) {
|
||||
return $model->branch_code;
|
||||
})
|
||||
->addColumn('currency_code', function ($model) {
|
||||
return $model->currency_code;
|
||||
// $dt = Carbon::create($model->tanggal_upload);
|
||||
// return $dt->isoFormat('D MMMM Y H:mm:ss');
|
||||
})
|
||||
->addColumn('periode', function ($model) {
|
||||
$dt = Carbon::create($model->opening_date);
|
||||
return $dt->isoFormat('D MMMM Y');
|
||||
})
|
||||
->addColumn('status', function ($model) {
|
||||
return '<span class="badge badge-light-success">Approved</span>';
|
||||
// if ($model->status == 1) {
|
||||
// return '<span class="badge badge-light-success">Approved</span>';
|
||||
// } else if ($model->status == 0) {
|
||||
// return '<span class="badge badge-light-warning">Menunggu Approval</span>';
|
||||
// } else if ($model->status == 3) {
|
||||
// return '<span class="badge badge-light-danger">Rejected</span>';
|
||||
// } else if ($model->status == 4) {
|
||||
// return '<span class="badge badge-light-success">Approved</span> <span class="badge badge-light-warning">Request Download</span>';
|
||||
// } else if ($model->status == 5) {
|
||||
// return '<span class="badge badge-light-success">Approved</span> <span class="badge badge-light-info">Download Approved</span>';
|
||||
// } else if ($model->status == 6) {
|
||||
// return '<span class="badge badge-light-success">Approved</span> <span class="badge badge-light-warning">Request Delete</span>';
|
||||
// } else if ($model->status == 7) {
|
||||
// return '<span class="badge badge-light-success">Approved</span> <span class="badge badge-light-danger">Request Delete</span>';
|
||||
// } else if ($model->status == 8) {
|
||||
// return '<span class="badge badge-light-success">Deleted</span>';
|
||||
// } else if ($model->status == 9) {
|
||||
// return '<span class="badge badge-light-success">Approved</span> <span class="badge badge-light-danger">Request Non-Aktif</span>';
|
||||
// }
|
||||
})
|
||||
->addIndexColumn()
|
||||
->rawColumns(['status', 'action'])
|
||||
->addColumn('action', 'konfirmasibank::._action')
|
||||
->setRowId('id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the query source of dataTable.
|
||||
*/
|
||||
public function query(ViewCustomer $model)
|
||||
: QueryBuilder
|
||||
{
|
||||
|
||||
return $model->newQuery();
|
||||
}
|
||||
|
||||
/**
|
||||
* Optional method if you want to use the html builder.
|
||||
*/
|
||||
public function html()
|
||||
: HtmlBuilder
|
||||
{
|
||||
return $this->builder()
|
||||
->setTableId('konfirmasibank-table')
|
||||
->columns($this->getColumns())
|
||||
->minifiedAjax()
|
||||
->stateSave(false)
|
||||
->responsive()
|
||||
->autoWidth(true)
|
||||
->orderBy(1)
|
||||
->parameters([
|
||||
'scrollX' => true,
|
||||
'drawCallback' => 'function() { KTMenu.createInstances(); }',
|
||||
])
|
||||
->addTableClass('align-middle table-row-dashed fs-6 gy-5');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the dataTable columns definition.
|
||||
*/
|
||||
public function getColumns()
|
||||
: array
|
||||
{
|
||||
return [
|
||||
Column::make('DT_RowIndex')->title('No')->orderable(false)->searchable(false)->addClass('text-center'),
|
||||
Column::make('customer_code')->title('NO CIF')->addClass('text-center'),
|
||||
Column::make('account_number')->title('No Account')->addClass('text-center'),
|
||||
Column::make('account_name')->title('Nama Account')->addClass('text-center'),
|
||||
Column::make('branch_code')->title('Kode Cabang')->addClass('text-center'),
|
||||
Column::make('currency_code')->title('Mata Uang')->addClass('text-center'),
|
||||
Column::make('opening_date')->title('Periode')->addClass('text-center'),
|
||||
// Column::computed('status'),
|
||||
Column::computed('action')
|
||||
->exportable(false)
|
||||
->printable(false)
|
||||
->addClass('text-center'),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the filename for export.
|
||||
*/
|
||||
protected function filename()
|
||||
: string
|
||||
{
|
||||
return 'Document_' . date('YmdHis');
|
||||
}
|
||||
}
|
0
Database/Migrations/.gitkeep
Normal file
0
Database/Migrations/.gitkeep
Normal file
0
Database/Seeders/.gitkeep
Normal file
0
Database/Seeders/.gitkeep
Normal file
21
Database/Seeders/KonfirmasiBankDatabaseSeeder.php
Normal file
21
Database/Seeders/KonfirmasiBankDatabaseSeeder.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\KonfirmasiBank\Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class KonfirmasiBankDatabaseSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
Model::unguard();
|
||||
|
||||
// $this->call("OthersTableSeeder");
|
||||
}
|
||||
}
|
0
Database/factories/.gitkeep
Normal file
0
Database/factories/.gitkeep
Normal file
0
Entities/.gitkeep
Normal file
0
Entities/.gitkeep
Normal file
35
Entities/Account.php
Normal file
35
Entities/Account.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\KonfirmasiBank\Entities;
|
||||
|
||||
use Spatie\Activitylog\LogOptions;
|
||||
use Spatie\Activitylog\Traits\LogsActivity;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class Account extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $connection = 'db2';
|
||||
protected $table = 'STG_DB.ACCOUNT';
|
||||
protected $primaryKey = '@ID';
|
||||
|
||||
//public $incrementing = false;
|
||||
|
||||
protected $fillable = [
|
||||
"'CUSTOMER_NO',
|
||||
'MNEMONIC'
|
||||
'CATEGORY'"
|
||||
];
|
||||
|
||||
|
||||
public function customers(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Customer::class, 'CUSTOMER_NO');
|
||||
}
|
||||
|
||||
|
||||
}
|
65
Entities/Customer.php
Normal file
65
Entities/Customer.php
Normal file
@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Konfirmasibank\Entities;
|
||||
|
||||
use Spatie\Activitylog\LogOptions;
|
||||
use Spatie\Activitylog\Traits\LogsActivity;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
|
||||
class Customer extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
// protected $table = 'customer';
|
||||
// protected $primaryKey = 'ID';
|
||||
protected $connection = 'db2';
|
||||
protected $table = 'STG_DB.CUSTOMER';
|
||||
protected $primaryKey = '@ID';
|
||||
|
||||
//public $incrementing = false;
|
||||
|
||||
protected $fillable = [
|
||||
"'CUSTOMER_NO',
|
||||
'MNEMONIC'
|
||||
'NAME_1'"
|
||||
];
|
||||
|
||||
public function getAccount(){
|
||||
// $store = DB::connection('oracle');
|
||||
$data = DB::connection("oracle")->table("T24DWH.V_CUSTOMER")->limit(20)->get()->map(function($item) {return (array) $item;});
|
||||
return $data;
|
||||
|
||||
}
|
||||
|
||||
public function getCustomer(){
|
||||
$data = [];
|
||||
$data = DB::connection("oracle")->table("T24DWH.V_CUSTOMER")->select('CUSTOMER_CODE')->limit(50);
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function exportPdf($cus_no,$account,$kodecabang,$periode){
|
||||
$data = [];
|
||||
$data = DB::table('view_customers')
|
||||
->where('CUSTOMER_NO',$cus_no)
|
||||
->whereIn('ACCOUNT_NUMBER', $account)
|
||||
->where('SECTOR',$kodecabang)
|
||||
->where('LEGAL_ISS_DATE','LIKE','%'.$periode.'%')
|
||||
->get();
|
||||
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
||||
public function accounts(): HasMany
|
||||
{
|
||||
return $this->hasMany(Account::class, 'CUSTOMER_CODE');
|
||||
}
|
||||
|
||||
|
||||
}
|
105
Entities/ViewAccount.php
Normal file
105
Entities/ViewAccount.php
Normal file
@ -0,0 +1,105 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Konfirmasibank\Entities;
|
||||
|
||||
use Spatie\Activitylog\LogOptions;
|
||||
use Spatie\Activitylog\Traits\LogsActivity;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
|
||||
class ViewAccount extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $connection = 'db2';
|
||||
protected $table = 'STG_DB.VW_ACCOUNTS';
|
||||
protected $primaryKey = 'CUSTOMER_NO';
|
||||
|
||||
//public $incrementing = false;
|
||||
|
||||
protected $fillable = [
|
||||
"' ACCOUNT_NUMBER',
|
||||
'CUSTOMER_NO',
|
||||
'WORKING_BALANCE',
|
||||
'BATCH_DATE',
|
||||
'CO_CODE',
|
||||
'ACCOUNT_TITLE_1',
|
||||
'PRODUCT',
|
||||
'ARR_STATUS',
|
||||
'PRODUCT_LINE',
|
||||
'CURRENCY',
|
||||
'MATURITY_DATE'"
|
||||
];
|
||||
|
||||
public function getAccount($cus_no,$account,$kodecabang,$periode){
|
||||
$data = [];
|
||||
$data = DB::connection("db2")->table("STG_DB.VW_ACCOUNTS")->select('*')->where('CUSTOMER_NO',$cus_no)->whereIn('ACCOUNT_NUMBER',$account)->get();
|
||||
return $data;
|
||||
|
||||
}
|
||||
|
||||
public function getPinjaman($cus_no){
|
||||
$data = [];
|
||||
$data = DB::connection("db2")->table("STG_DB.VW_AA_ARRANGEMENT")->select('CUSTOMER','STREET','ADDRESS','SHORT_NAME','CO_CODE','PRODUCT_LINE','PRODUCT','CURRENCY','COMPANY_NAME',DB::raw('MAX(CATEGORY) AS CATEGORY'),DB::raw('MAX(BATCH_DATE) AS BATCH_DATE'),DB::raw('MAX(WORKING_BALANCE) AS WORKING_BALANCE'),DB::raw('MAX(OPENING_DATE) AS OPENING_DATE'),DB::raw('MAX(MATURITY_DATE) AS MATURITY_DATE'),DB::raw('MAX(MATURITY_DATE) AS MATURITY_DATE'), DB::raw('MAX(ARRANGEMENT_ID) AS ARRANGEMENT_ID'))->where('CUSTOMER',$cus_no)->groupBy('CUSTOMER','STREET','ADDRESS','SHORT_NAME','CO_CODE','PRODUCT_LINE','PRODUCT','CURRENCY','COMPANY_NAME')->get();
|
||||
return $data;
|
||||
|
||||
}
|
||||
|
||||
public function getFasilitas($cus_no){
|
||||
$data = [];
|
||||
$data =DB::connection("db2")->table("STG_DB.LIMIT")->select('*')->where('@ID', 'like', "%" .$cus_no. "%")->get();
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function getTerm($arr_id){
|
||||
$data = [];
|
||||
$data =DB::connection("db2")->table("STG_DB.AA_ARR_TERM_AMOUNT")->select(DB::raw('MAX(ID) AS ID'),DB::raw('MAX(TERM) AS TERM'))->where('ID', 'like', "%" .$arr_id."%")->orderBy('ID','DESC')->get();
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function getInterest($arr_id){
|
||||
$data = [];
|
||||
$data =DB::connection("db2")->table("STG_DB.AA_ARR_INTEREST")->select(DB::raw('MAX(ID) AS ID'),DB::raw('MAX(FIXED_RATE) AS FIXED_RATE'))->where('ID', 'like', "%".$arr_id."%")->orderBy('ID','DESC')->get();
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function getCategory($category_id){
|
||||
|
||||
$data = [];
|
||||
$data =DB::connection("db2")->table("STG_DB.CATEGORY")->select('ID','SHORT_NAME')->where('ID',$category_id)->get();
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function getAA($aa_id){
|
||||
|
||||
$data = [];
|
||||
$data =DB::connection("db2")->table("STG_DB.AA_ARRANGEMENENT")->select('ID')->where('ID', 'like',"%".$aa_id."%")->orderBy('ID','DESC')->get();
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function getLimit($cus_id,$periode){
|
||||
|
||||
$data = [];
|
||||
$data =DB::connection("db2")->table("STG_DB.LIMIT AS LM")
|
||||
->join('STG_DB.LIMIT_REFERENCE AS LR', 'LM.LIMIT_PRODUCT', '=', 'LR.ID')
|
||||
->join('STG_DB.COMPANY AS CP', 'LM.CO_CODE', '=', 'CP.ID')
|
||||
->join('STG_DB.CATEGORY AS CT', 'LM.LIMIT_PRODUCT', '=', 'CT.ID')
|
||||
->select('LM.LIMIT_CURRENCY','LM.APPROVAL_DATE','LM.EXPIRY_DATE','LM.AVAIL_AMT','LM.BATCH_DATE','LM.EXPIRY_DATE','LR.SHORT_NAME','LR.LIMIT_PERCENTAGE','CP.COMPANY_NAME','CT.SHORT_NAME AS ACCOUNT_TYPE')
|
||||
->where('LM.@ID', 'like',"%".$cus_id."%")
|
||||
->where('LM.BATCH_DATE', 'like',"%".$periode."%")
|
||||
->orderBy('LM.@ID','DESC')->get();
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function getLimitProduct($limit_product_id){
|
||||
|
||||
$data = [];
|
||||
$data =DB::connection("db2")->table("STG_DB.LIMIT_REFERENCE")->select('ID','SHORT_NAME','LIMIT_PERCENTAGE')->where('ID',$limit_product_id)->first();
|
||||
return $data;
|
||||
}
|
||||
|
||||
}
|
34
Entities/ViewCustomer.php
Normal file
34
Entities/ViewCustomer.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Konfirmasibank\Entities;
|
||||
|
||||
use Spatie\Activitylog\LogOptions;
|
||||
use Spatie\Activitylog\Traits\LogsActivity;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
|
||||
class ViewCustomer extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $connection = 'oracle';
|
||||
protected $table = 'T24DWH.V_CUSTOMER';
|
||||
protected $primaryKey = 'CUSTOMER_CODE';
|
||||
|
||||
//public $incrementing = false;
|
||||
|
||||
protected $fillable = [
|
||||
"'CUSTOMER_CODE',
|
||||
'CUSTOMER_NAME',
|
||||
'CUSTOMER_TYPE'"
|
||||
];
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
0
Http/Controllers/.gitkeep
Normal file
0
Http/Controllers/.gitkeep
Normal file
149
Http/Controllers/KonfirmasiBankController.php
Normal file
149
Http/Controllers/KonfirmasiBankController.php
Normal file
@ -0,0 +1,149 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\KonfirmasiBank\Http\Controllers;
|
||||
|
||||
use Illuminate\Contracts\Support\Renderable;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Routing\Controller;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Modules\KonfirmasiBank\DataTables\ViewAccountDataTable;
|
||||
use Modules\KonfirmasiBank\Entities\ViewAccount;
|
||||
use Dompdf\Dompdf;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Support\Facades\View;
|
||||
class KonfirmasiBankController extends Controller
|
||||
{
|
||||
public $user;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware(function ($request, $next) {
|
||||
$this->user = Auth::guard('web')->user();
|
||||
return $next($request);
|
||||
});
|
||||
|
||||
addVendor('chained-select');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
public function index(ViewAccountDataTable $dataTable)
|
||||
{
|
||||
|
||||
if (is_null($this->user) || !$this->user->can('konfirmasibank.read')) {
|
||||
abort(403, 'Sorry !! You are Unauthorized to view any master data !');
|
||||
}
|
||||
|
||||
return $dataTable->render('konfirmasibank::index');
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
----- export pdf -----
|
||||
*/
|
||||
public function export(Request $request) {
|
||||
if (is_null($this->user) || !$this->user->can('konfirmasibank.report')) {
|
||||
abort(403, 'Sorry !! You are Unauthorized to view any master data !');
|
||||
}
|
||||
|
||||
$account = explode("," , $request['acc_no']);
|
||||
|
||||
$ViewAccount = new ViewAccount;
|
||||
$data = [];
|
||||
$DataAccounts = [];
|
||||
$DataPinjaman = [];
|
||||
$DataLimit = [];
|
||||
$ListAccount = $ViewAccount->getAccount($request['cus_no'],$account,$request['kode_cabang'],$request['periode']);
|
||||
|
||||
foreach ($ListAccount as $key1 => $account) {
|
||||
$DataAccounts[$key1]['ACCOUNT_NUMBER'] = $account->ACCOUNT_NUMBER;
|
||||
$DataAccounts[$key1]['CUSTOMER_NO'] = $account->CUSTOMER_NO;
|
||||
$DataAccounts[$key1]['CURRENCY'] = $account->CURRENCY;
|
||||
$DataAccounts[$key1]['PRODUCT'] = $account->PRODUCT;
|
||||
$DataAccounts[$key1]['COMPANY_NAME'] = $account->COMPANY_NAME;
|
||||
$DataAccounts[$key1]['WORKING_BALANCE'] = $account->WORKING_BALANCE;
|
||||
$DataAccounts[$key1]['BATCH_DATE'] = $account->BATCH_DATE;
|
||||
$DataAccounts[$key1]['MATURITY_DATE'] = $account->MATURITY_DATE;
|
||||
$ListBunga =$ViewAccount->getInterest($account->ARRANGEMENT_ID);
|
||||
$ListTenor =$ViewAccount->getTerm($account->ARRANGEMENT_ID);
|
||||
foreach ($ListBunga as $bunga) {
|
||||
if (strpos($bunga->ID ,$account->ARRANGEMENT_ID) !== false) {
|
||||
$DataAccounts[$key1]['FIXED_RATE'] = $bunga->FIXED_RATE;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
$ListPinjaman =$ViewAccount->getPinjaman($ListAccount[0]->CUSTOMER_NO);
|
||||
$pinjaman = [];
|
||||
foreach ($ListPinjaman as $key => $item) {
|
||||
$ListTenor =$ViewAccount->getTerm($item->ARRANGEMENT_ID);
|
||||
$ListBunga =$ViewAccount->getInterest($item->ARRANGEMENT_ID);
|
||||
$ListCategory =$ViewAccount->getCategory($item->CATEGORY);
|
||||
$pinjaman[$key]['CUSTOMER'] = $item->CUSTOMER;
|
||||
$pinjaman[$key]['SHORT_NAME'] = $item->SHORT_NAME;
|
||||
$pinjaman[$key]['STREET'] = $item->STREET;
|
||||
$pinjaman[$key]['ADDRESS'] = $item->ADDRESS;
|
||||
$pinjaman[$key]['COMPANY_NAME'] = $item->COMPANY_NAME;
|
||||
$pinjaman[$key]['CURRENCY'] = $item->CURRENCY;
|
||||
$pinjaman[$key]['PRODUCT_LINE'] = $item->PRODUCT_LINE;
|
||||
$pinjaman[$key]['PRODUCT'] = $item->PRODUCT;
|
||||
$pinjaman[$key]['WORKING_BALANCE'] = $item->WORKING_BALANCE;
|
||||
$pinjaman[$key]['BATCH_DATE'] = $item->OPENING_DATE;
|
||||
$pinjaman[$key]['MATURITY_DATE'] = $item->MATURITY_DATE;
|
||||
|
||||
foreach ($ListBunga as $bunga) {
|
||||
if (strpos($bunga->ID ,$item->ARRANGEMENT_ID) !== false) {
|
||||
$pinjaman[$key]['FIXED_RATE'] = $bunga->FIXED_RATE;
|
||||
}
|
||||
}
|
||||
foreach ($ListTenor as $tenor) {
|
||||
if (strpos($tenor->ID ,$item->ARRANGEMENT_ID) !== false) {
|
||||
$pinjaman[$key]['TERM'] = $tenor->TERM;
|
||||
}
|
||||
}
|
||||
foreach ($ListCategory as $category) {
|
||||
if ($category->ID == $item->CATEGORY) {
|
||||
$pinjaman[$key]['CATEGORY'] = $category->SHORT_NAME;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$DataProducts = [];
|
||||
$ListLimits = $ViewAccount->getLimit($request['cus_no'],$request['periode']);
|
||||
|
||||
$data['DataAccounts'] = $DataAccounts;
|
||||
$data['DataPinjaman'] = $pinjaman;
|
||||
$data['DataLimit'] = $ListLimits;
|
||||
|
||||
$currentDate = Carbon::now();
|
||||
$formattedDate = $currentDate->format('Y-m-d');
|
||||
|
||||
$html = View::make('konfirmasibank::exportPdf', ['data' => $data])->render();
|
||||
|
||||
$pdf = new Dompdf();
|
||||
$pdf->loadHtml($html);
|
||||
|
||||
// Mengatur jenis kertas
|
||||
$pdf->setPaper('f4', 'landscape')->set_option('defaultFont', 'Arial');
|
||||
|
||||
// Render HTML menjadi PDF
|
||||
$pdf->render();
|
||||
|
||||
// Keluarkan file PDF ke browser
|
||||
$pdf->stream('"Konfirmasi_bank_"'.$ListPinjaman[0]->SHORT_NAME.'"'. $formattedDate.'".pdf"');
|
||||
|
||||
// $pdf->render();
|
||||
// return $pdf->stream('Konfirmasi_bank_"'.$ListPinjaman[0]->SHORT_NAME.'"'. $formattedDate.'""');
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
0
Http/Middleware/.gitkeep
Normal file
0
Http/Middleware/.gitkeep
Normal file
0
Http/Requests/.gitkeep
Normal file
0
Http/Requests/.gitkeep
Normal file
0
Providers/.gitkeep
Normal file
0
Providers/.gitkeep
Normal file
114
Providers/KonfirmasiBankServiceProvider.php
Normal file
114
Providers/KonfirmasiBankServiceProvider.php
Normal file
@ -0,0 +1,114 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\KonfirmasiBank\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Illuminate\Database\Eloquent\Factory;
|
||||
|
||||
class KonfirmasiBankServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* @var string $moduleName
|
||||
*/
|
||||
protected $moduleName = 'KonfirmasiBank';
|
||||
|
||||
/**
|
||||
* @var string $moduleNameLower
|
||||
*/
|
||||
protected $moduleNameLower = 'konfirmasibank';
|
||||
|
||||
/**
|
||||
* Boot the application events.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
$this->registerTranslations();
|
||||
$this->registerConfig();
|
||||
$this->registerViews();
|
||||
$this->loadMigrationsFrom(module_path($this->moduleName, 'Database/Migrations'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the service provider.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
$this->app->register(RouteServiceProvider::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register config.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function registerConfig()
|
||||
{
|
||||
$this->publishes([
|
||||
module_path($this->moduleName, 'Config/config.php') => config_path($this->moduleNameLower . '.php'),
|
||||
], 'config');
|
||||
$this->mergeConfigFrom(
|
||||
module_path($this->moduleName, 'Config/config.php'), $this->moduleNameLower
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register views.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function registerViews()
|
||||
{
|
||||
$viewPath = resource_path('views/modules/' . $this->moduleNameLower);
|
||||
|
||||
$sourcePath = module_path($this->moduleName, 'Resources/views');
|
||||
|
||||
$this->publishes([
|
||||
$sourcePath => $viewPath
|
||||
], ['views', $this->moduleNameLower . '-module-views']);
|
||||
|
||||
$this->loadViewsFrom(array_merge($this->getPublishableViewPaths(), [$sourcePath]), $this->moduleNameLower);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register translations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function registerTranslations()
|
||||
{
|
||||
$langPath = resource_path('lang/modules/' . $this->moduleNameLower);
|
||||
|
||||
if (is_dir($langPath)) {
|
||||
$this->loadTranslationsFrom($langPath, $this->moduleNameLower);
|
||||
$this->loadJsonTranslationsFrom($langPath);
|
||||
} else {
|
||||
$this->loadTranslationsFrom(module_path($this->moduleName, 'Resources/lang'), $this->moduleNameLower);
|
||||
$this->loadJsonTranslationsFrom(module_path($this->moduleName, 'Resources/lang'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the services provided by the provider.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function provides()
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
private function getPublishableViewPaths(): array
|
||||
{
|
||||
$paths = [];
|
||||
foreach (\Config::get('view.paths') as $path) {
|
||||
if (is_dir($path . '/modules/' . $this->moduleNameLower)) {
|
||||
$paths[] = $path . '/modules/' . $this->moduleNameLower;
|
||||
}
|
||||
}
|
||||
return $paths;
|
||||
}
|
||||
}
|
69
Providers/RouteServiceProvider.php
Normal file
69
Providers/RouteServiceProvider.php
Normal file
@ -0,0 +1,69 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\KonfirmasiBank\Providers;
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
|
||||
|
||||
class RouteServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* The module namespace to assume when generating URLs to actions.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $moduleNamespace = 'Modules\KonfirmasiBank\Http\Controllers';
|
||||
|
||||
/**
|
||||
* Called before routes are registered.
|
||||
*
|
||||
* Register any model bindings or pattern based filters.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
parent::boot();
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the routes for the application.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function map()
|
||||
{
|
||||
$this->mapApiRoutes();
|
||||
|
||||
$this->mapWebRoutes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the "web" routes for the application.
|
||||
*
|
||||
* These routes all receive session state, CSRF protection, etc.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function mapWebRoutes()
|
||||
{
|
||||
Route::middleware('web')
|
||||
->namespace($this->moduleNamespace)
|
||||
->group(module_path('KonfirmasiBank', '/Routes/web.php'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the "api" routes for the application.
|
||||
*
|
||||
* These routes are typically stateless.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function mapApiRoutes()
|
||||
{
|
||||
Route::prefix('api')
|
||||
->middleware('api')
|
||||
->namespace($this->moduleNamespace)
|
||||
->group(module_path('KonfirmasiBank', '/Routes/api.php'));
|
||||
}
|
||||
}
|
0
Resources/assets/.gitkeep
Normal file
0
Resources/assets/.gitkeep
Normal file
0
Resources/assets/js/app.js
Normal file
0
Resources/assets/js/app.js
Normal file
0
Resources/assets/sass/app.scss
Normal file
0
Resources/assets/sass/app.scss
Normal file
0
Resources/lang/.gitkeep
Normal file
0
Resources/lang/.gitkeep
Normal file
0
Resources/views/.gitkeep
Normal file
0
Resources/views/.gitkeep
Normal file
18
Resources/views/_action.blade.php
Normal file
18
Resources/views/_action.blade.php
Normal file
@ -0,0 +1,18 @@
|
||||
@php
|
||||
$route = explode('.', Route::currentRouteName());
|
||||
|
||||
@endphp
|
||||
|
||||
<div class="d-flex flex-row flex-center">
|
||||
{{-- <a href="{{ route($route[0].'customer.show',['customer' => $model->account_number]) }}"
|
||||
class="kt_edit_form btn btn-icon btn-bg-light btn-active-light-info btn-sm me-1">
|
||||
{!! getIcon("eye", "fs-1 text-info","duotune") !!}
|
||||
</a> --}}
|
||||
<div class="form-check text-center ">
|
||||
<input class="form-check-input" type="checkbox" value="{{$model->ACCOUNT_NUMBER}}" id="flexCheckDefault" name='account_number' />
|
||||
</div>
|
||||
|
||||
{{-- {!! Form::open(['method' => 'DELETE','route' => [$route[0].'.destroy', $model->ID],'class'=>'']) !!} --}}
|
||||
{{-- {{ Form::button(getIcon("trash", "fs-1 text-danger","duotune"), ['type' => 'submit', 'class' => 'delete btn btn-icon btn-bg-light btn-active-light-danger btn-sm'] ) }} --}}
|
||||
{{-- {!! Form::close() !!} --}}
|
||||
</div>
|
70
Resources/views/_form.blade.php
Normal file
70
Resources/views/_form.blade.php
Normal file
@ -0,0 +1,70 @@
|
||||
@php
|
||||
$route = explode('.', Route::currentRouteName());
|
||||
@endphp
|
||||
|
||||
<!--begin::Modal - New Target-->
|
||||
<div class="modal fade" id="kt_modal_{{$route[0]}}" tabindex="-1" aria-hidden="true">
|
||||
<!--begin::Modal dialog-->
|
||||
<div class="modal-dialog modal-dialog-centered mw-650px">
|
||||
<!--begin::Modal content-->
|
||||
<div class="modal-content rounded">
|
||||
<!--begin::Modal header-->
|
||||
<div class="modal-header pb-0 border-0 justify-content-end">
|
||||
<!--begin::Close-->
|
||||
<div class="btn btn-sm btn-icon btn-active-color-primary" data-bs-dismiss="modal">{!! getIcon('cross', 'fs-1') !!}</div>
|
||||
<!--end::Close-->
|
||||
</div>
|
||||
<!--begin::Modal header-->
|
||||
<!--begin::Modal body-->
|
||||
<div class="modal-body scroll-y px-10 px-lg-15 pt-0 pb-15">
|
||||
<!--begin:Form-->
|
||||
<form class="form_{{$route[0]}}" method="POST" action="{{ route($route[0].'.store') }}">
|
||||
@csrf
|
||||
<!--begin::Heading-->
|
||||
<div class="mb-13 text-center">
|
||||
<!--begin::Title-->
|
||||
<h1 class="mb-3 text-capitalize" id="title_form">{{ str_replace('-',' ',$route[0]) }}</h1>
|
||||
<!--end::Title-->
|
||||
</div>
|
||||
<!--end::Heading-->
|
||||
<!--begin::Input group-->
|
||||
<div class="d-flex flex-column mb-8 fv-row">
|
||||
<!--begin::Label-->
|
||||
<label class="d-flex align-items-center fs-6 fw-semibold mb-2">
|
||||
<span class="required">Kode</span>
|
||||
<span class="ms-1" data-bs-toggle="tooltip" title="Specify a target name for future usage and reference"></span>
|
||||
</label>
|
||||
<!--end::Label-->
|
||||
<input type="hidden" id="customer_id" name="id" />
|
||||
<input type="text" id="customer_kode" minlength="2" maxlength="2" pattern="[0-9]{2,2}" class="form-control form-control-solid" placeholder="Enter Kode customer" name="kode" />
|
||||
</div>
|
||||
<!--end::Input group-->
|
||||
|
||||
<!--begin::Input group-->
|
||||
<div class="d-flex flex-column mb-8 fv-row">
|
||||
<!--begin::Label-->
|
||||
<label class="d-flex align-items-center fs-6 fw-semibold mb-2">
|
||||
<span class="required">Name</span>
|
||||
<span class="ms-1" data-bs-toggle="tooltip" title="Specify a target name for future usage and reference"></span>
|
||||
</label>
|
||||
<!--end::Label-->
|
||||
<input type="text" id="customer_name" maxlength="50" class="form-control form-control-solid" placeholder="Enter customer Name" name="name" />
|
||||
</div>
|
||||
<!--end::Input group-->
|
||||
|
||||
<!--begin::Actions-->
|
||||
<div class="text-center">
|
||||
<button type="reset" data-bs-dismiss="modal" class="btn btn-light me-3">Cancel</button>
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
<!--end::Actions-->
|
||||
</form>
|
||||
<!--end:Form-->
|
||||
</div>
|
||||
<!--end::Modal body-->
|
||||
</div>
|
||||
<!--end::Modal content-->
|
||||
</div>
|
||||
<!--end::Modal dialog-->
|
||||
</div>
|
||||
<!--end::Modal - New Target-->
|
218
Resources/views/_table.blade.php
Normal file
218
Resources/views/_table.blade.php
Normal file
@ -0,0 +1,218 @@
|
||||
<!--begin::Table-->
|
||||
{{ $dataTable->table() }}
|
||||
<!--end::Table-->
|
||||
|
||||
{{-- Inject Scripts --}}
|
||||
@section('scripts')
|
||||
<script>
|
||||
$(function() {
|
||||
var keterangan = "";
|
||||
window.LaravelDataTables = window.LaravelDataTables || {};
|
||||
window.LaravelDataTables["konfirmasibank-table"] = $("#konfirmasibank-table").DataTable({
|
||||
"serverSide": true,
|
||||
"processing": true,
|
||||
"ajax": {
|
||||
"url": "{{ route('konfirmasibank.index') }}",
|
||||
"type": "GET",
|
||||
"data": function(data) {
|
||||
for (var i = 0, len = data.columns.length; i < len; i++) {
|
||||
if (!data.columns[i].search.value) delete data.columns[i].search;
|
||||
if (data.columns[i].searchable === true) delete data.columns[i].searchable;
|
||||
if (data.columns[i].orderable === true) delete data.columns[i].orderable;
|
||||
if (data.columns[i].data === data.columns[i].name) delete data.columns[i]
|
||||
.name;
|
||||
}
|
||||
delete data.search.regex;
|
||||
data.kodebank = $('#kodebank').val();
|
||||
data.periode = $('#periode').val();
|
||||
}
|
||||
},
|
||||
"columns": [{
|
||||
"data": "DT_RowIndex",
|
||||
"name": "DT_RowIndex",
|
||||
"title": "No",
|
||||
"orderable": false,
|
||||
"searchable": false
|
||||
}, {
|
||||
"data": "account_number",
|
||||
"name": "account_number",
|
||||
"title": "No Rekening",
|
||||
"orderable": true,
|
||||
"searchable": true,
|
||||
"className": "text-center"
|
||||
}, {
|
||||
"data": "co_code",
|
||||
"name": "co_code",
|
||||
"title": "Cabang",
|
||||
"orderable": true,
|
||||
"searchable": true,
|
||||
"className": "text-left"
|
||||
}, {
|
||||
"data": "product",
|
||||
"name": "product",
|
||||
"title": "Jenis Rekening",
|
||||
"orderable": true,
|
||||
"searchable": true,
|
||||
"className": "text-center"
|
||||
}, {
|
||||
"data": "currency",
|
||||
"name": "currency",
|
||||
"title": "Mata Uang",
|
||||
"orderable": true,
|
||||
"searchable": true,
|
||||
"className": "text-center"
|
||||
}, {
|
||||
"data": "working_balance",
|
||||
"name": "working_balance",
|
||||
"title": "Saldo",
|
||||
"orderable": true,
|
||||
"searchable": true,
|
||||
"className": "text-center"
|
||||
}, {
|
||||
"data": "batch_date",
|
||||
"name": "batch_date",
|
||||
"title": "Periode",
|
||||
"orderable": true,
|
||||
"searchable": true,
|
||||
"className": "text-center"
|
||||
}, {
|
||||
"data": "action",
|
||||
"name": "action",
|
||||
"title": "Action",
|
||||
"orderable": false,
|
||||
"searchable": false,
|
||||
"className": "text-center accNo"
|
||||
}],
|
||||
"stateSave": false,
|
||||
"responsive": true,
|
||||
"autoWidth": true,
|
||||
"order": [
|
||||
[1, "desc"]
|
||||
],
|
||||
"scrollX": true,
|
||||
"drawCallback": function() {
|
||||
KTMenu.createInstances();
|
||||
}
|
||||
});
|
||||
})
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
@push('customscript')
|
||||
@php
|
||||
$route = explode('.', Route::currentRouteName());
|
||||
@endphp
|
||||
|
||||
<script>
|
||||
$("#btnSearch").on("click", function() {
|
||||
var cif = $("#cif").val();
|
||||
var kodecabang = $("#kodeCabang").val();
|
||||
var periode = $("#peridoe").val();
|
||||
$("input[name=cus_no]").val(cif)
|
||||
$("input[name=kode_cabang]").val(kodecabang)
|
||||
$("input[name=periode]").val(periode)
|
||||
var data = [cif,kodecabang,periode];
|
||||
LaravelDataTables["{{ $route[0] }}-table"].search(data).draw();
|
||||
});
|
||||
|
||||
$(function() {
|
||||
const documentTitle = '{{ ucfirst($route[0]) }} Report';
|
||||
var buttons = new $.fn.dataTable.Buttons(LaravelDataTables["{{ $route[0] }}-table"], {
|
||||
buttons: [{
|
||||
extend: 'copyHtml5',
|
||||
title: documentTitle
|
||||
},
|
||||
{
|
||||
extend: 'excelHtml5',
|
||||
title: documentTitle
|
||||
},
|
||||
{
|
||||
extend: 'csvHtml5',
|
||||
title: documentTitle
|
||||
},
|
||||
{
|
||||
extend: 'pdfHtml5',
|
||||
title: documentTitle
|
||||
},
|
||||
{
|
||||
extend: 'print',
|
||||
title: documentTitle
|
||||
}
|
||||
]
|
||||
}).container().appendTo($('#kt_datatable_example_buttons'));
|
||||
|
||||
// Hook dropdown menu click event to datatable export buttons
|
||||
const exportButtons = document.querySelectorAll('#kt_datatable_example_export_menu [data-kt-export]');
|
||||
exportButtons.forEach(exportButton => {
|
||||
exportButton.addEventListener('click', e => {
|
||||
e.preventDefault();
|
||||
// Get clicked export value
|
||||
const exportValue = e.target.getAttribute('data-kt-export');
|
||||
const target = document.querySelector('.dt-buttons .buttons-' + exportValue);
|
||||
|
||||
// Trigger click event on hidden datatable export buttons
|
||||
target.click();
|
||||
});
|
||||
});
|
||||
|
||||
LaravelDataTables["{{ $route[0] }}-table"].on('click', '.btn-download', function(event) {
|
||||
var form = $(this).closest("a");
|
||||
event.preventDefault();
|
||||
Swal.fire({
|
||||
title: 'Are you sure?',
|
||||
text: "Request download file?",
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes'
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: form.attr('href'), // serializes the form's elements.
|
||||
success: function(data) {
|
||||
toastr.success(
|
||||
'{{ ucfirst($route[0]) }} menunggu approval untuk mencetak dokumen.',
|
||||
'Success!', {
|
||||
timeOut: 5000
|
||||
});
|
||||
LaravelDataTables["{{ $route[0] }}-table"].draw();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
var acc_no = [];
|
||||
LaravelDataTables["{{ $route[0] }}-table"].on('change', 'tr td.accNo input[type=checkbox]', function(event) {
|
||||
var form = $(this).closest("form");
|
||||
event.preventDefault();
|
||||
if ($(this).is(':checked')) {
|
||||
// Do something...
|
||||
acc_no.push($(this).val());
|
||||
$("input[name=acc_no]").val(acc_no)
|
||||
};
|
||||
})
|
||||
|
||||
var arr = [];
|
||||
$("#selectAll").on('click', function() {
|
||||
$("input[type=checkbox]").prop('checked', $(this).prop('checked'));
|
||||
$.each($("input[name='account_number']:checked"), function() {
|
||||
arr.push($(this).val());
|
||||
$("input[name=acc_no]").val(arr)
|
||||
});
|
||||
});
|
||||
})
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
@section('styles')
|
||||
<style>
|
||||
.dataTables_filter {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
@endsection
|
236
Resources/views/exportPdf.blade.php
Normal file
236
Resources/views/exportPdf.blade.php
Normal file
@ -0,0 +1,236 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
|
||||
|
||||
<head>
|
||||
<title>Membuat Laporan PDF Dengan DOMPDF Laravel</title>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<style>
|
||||
.space1 {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
font-size: 12px;
|
||||
|
||||
},
|
||||
p {
|
||||
font-size: 12px;
|
||||
border: none;
|
||||
},
|
||||
.text-center{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.custom-table {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.tr-custom{
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@php
|
||||
$route = explode('.', Route::currentRouteName());
|
||||
@endphp
|
||||
|
||||
<div class="container">
|
||||
<table style="width:100%;">
|
||||
<tr style="height:80px">
|
||||
<td style="width:35%;font-size:12px;" >
|
||||
<img style="width:200px; height:90px" src="{{ public_path('assets/media/bag.png') }}" alt="">
|
||||
<p>Nomor : </p>
|
||||
<p>Tanggal :</p>
|
||||
</td>
|
||||
<td style="width:30%">
|
||||
|
||||
</td>
|
||||
<td style="width:35%;font-size:12px">
|
||||
<P><u> BANK ARTHA GRAHA INTERNATIONAL</u></P>
|
||||
<p>Kawasan Niaga Terpadu Sudirman (SCBD)
|
||||
Jl. Jendral Sudirman Kav. 52 – 53 , Jakarta Indonesia
|
||||
</p>
|
||||
<p>Phone :</p>
|
||||
<p>Faxmail :</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table><br>
|
||||
|
||||
|
||||
<p>Kepada Yth</p>
|
||||
<p>Bp. ...</p>
|
||||
<p>{{$data['DataPinjaman'][0]['STREET']}}, {{$data['DataPinjaman'][0]['ADDRESS']}}</p>
|
||||
|
||||
<p>Sesuai dengan surat saudara Nomor …. tanggal … dengan ini kami smpaikan data – data nasbah sesuai permintaan saudara sebagai berikut : </p>
|
||||
|
||||
<table class="custom-table">
|
||||
<tr class="tr-custom">
|
||||
<td style="text-align: left">
|
||||
<p>Nama Nasabah</p>
|
||||
</td>
|
||||
<td >
|
||||
:
|
||||
</td>
|
||||
<td style="text-align: left">
|
||||
<P>{{$data['DataPinjaman'][0]['SHORT_NAME']}}</P>
|
||||
</td>
|
||||
</tr class="tr-custom">
|
||||
<tr >
|
||||
<td style="text-align: left">
|
||||
<p>Nomor CIF</p>
|
||||
</td>
|
||||
<td >
|
||||
:
|
||||
</td>
|
||||
<td style="text-align: left">
|
||||
<P> {{$data['DataAccounts'][0]['CUSTOMER_NO']}}</P>
|
||||
</td>
|
||||
</tr>
|
||||
</table><br>
|
||||
|
||||
<p style="font-size: 12px;"> SIMPAMAN NASABAH YANG BERSANGKUTAN PADA BANK</p>
|
||||
<p style="font-size: 12px;">POSISI ....</p>
|
||||
<table class="space1" style="width:100%;">
|
||||
<thead style="background-color: dimgrey">
|
||||
<tr class="space1" >
|
||||
<th class="text-center space1">No</th>
|
||||
<th class="space1">Rekening</th>
|
||||
<th class="space1">Cabang</th>
|
||||
<th class="space1">Jenis Rekening</th>
|
||||
<th class="space1">Mata Uang</th>
|
||||
<th class="space1">Saldo</th>
|
||||
<th class="space1">Jangka Waktu</th>
|
||||
<th class="space1">Suku Bung</th>
|
||||
<th class="space1">Tgl Jatuh Tempo</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if (count($data['DataAccounts'])>0)
|
||||
@php $i=1 @endphp
|
||||
@foreach ($data['DataAccounts'] as $val)
|
||||
<tr class="space1">
|
||||
<td class="text-center space1">{{ $i++ }}</td>
|
||||
<td class="space1">{{ $val['ACCOUNT_NUMBER'] }}</td>
|
||||
<td class="space1">{{ $val['COMPANY_NAME'] }}</td>
|
||||
<td class="space1">{{ $val['PRODUCT'] }}</td>
|
||||
<td class="space1 texet-center">{{ $val['CURRENCY'] }}</td>
|
||||
<td class="space1">{{ $val['WORKING_BALANCE'] }}</td>
|
||||
<td class="space1">{{ $val['BATCH_DATE'] }}</td>
|
||||
<td class="space1">{{ $val['FIXED_RATE'] }}</td>
|
||||
<td class="space1">{{ $val['MATURITY_DATE'] }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
<tr class="space1">
|
||||
<td class="space1" colspan="9" style="text-align: center;">Tidak Ada Account</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
</tbody>
|
||||
</table><br>
|
||||
|
||||
<p style="font-size: 12px;">PINJAMAN YANG DI BERIKAN OLEH BANK KEPADA NASABAH</p>
|
||||
<p style="font-size: 12px;">POSISI ....</p>
|
||||
<table class="space1" style="width:100%;">
|
||||
<thead style="background-color: dimgrey">
|
||||
<tr class="space1" >
|
||||
<th class="space1 text-center">No</th>
|
||||
<th class="space1">Jenis Pinjaman</th>
|
||||
<th class="space1">Cabang</th>
|
||||
<th class="space1">Jenis Rekening</th>
|
||||
<th class="space1 ">Mata Uang</th>
|
||||
<th class="space1">Saldo</th>
|
||||
<th class="space1">Jangka Waktu</th>
|
||||
<th class="space1">Suku Bung</th>
|
||||
<th class="space1">Tgl Jatuh Tempo</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if (count($data['DataPinjaman'])>0)
|
||||
@php $i=1 @endphp
|
||||
@foreach ($data['DataPinjaman'] as $pinjaman)
|
||||
<tr class="space1">
|
||||
<td class="text-center space1">{{ $i++ }}</td>
|
||||
<td class="space1">{{ $pinjaman['PRODUCT_LINE'] }}</td>
|
||||
<td class="space1">{{ $pinjaman['COMPANY_NAME'] }}</td>
|
||||
<td class="space1">{{ $pinjaman['CATEGORY'] }}</td>
|
||||
<td class="space1 texet-center">{{ $pinjaman['CURRENCY'] }}</td>
|
||||
<td class="space1">{{ $pinjaman['WORKING_BALANCE'] }}</td>
|
||||
<td class="space1">{{ $pinjaman['BATCH_DATE'] }}</td>
|
||||
<td class="space1">{{ $pinjaman['FIXED_RATE'] }}</td>
|
||||
<td class="space1">{{ $pinjaman['MATURITY_DATE'] }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
<tr class="space1">
|
||||
<td class="space1" colspan="9" style="text-align: center;">Tidak Ada Pinjaman</td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table><br>
|
||||
|
||||
<p style="font-size: 12px;">FASILITAS LAIN YANG DI TERIMA OLEH NASABAH</p>
|
||||
<p style="font-size: 12px;">POSISI ....</p>
|
||||
<table class="space1" style="width:100%;">
|
||||
<thead style="background-color: dimgrey">
|
||||
<tr class="space1" >
|
||||
<th class="text-center space1">No</th>
|
||||
<th class="space1">Jenis Fasilitas</th>
|
||||
<th class="space1">Cabang</th>
|
||||
<th class="space1">Jenis Rekening</th>
|
||||
<th class="space1">Mata Uang</th>
|
||||
<th class="space1">Saldo</th>
|
||||
<th class="space1">Jangka Waktu</th>
|
||||
<th class="space1">Suku Bung</th>
|
||||
<th class="space1">Tgl Jatuh Tempo</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if (count($data['DataLimit']) > 0)
|
||||
@php $i=1 @endphp
|
||||
@foreach ($data['DataLimit'] as $limit)
|
||||
<tr class="space1">
|
||||
<td class="text-center space1">{{ $i++ }}</td>
|
||||
<td class="space1">{{ $limit->SHORT_NAME }}</td>
|
||||
<td class="space1">{{ $limit->COMPANY_NAME }}</td>
|
||||
<td class="space1">{{ $limit->ACCOUNT_TYPE }}</td>
|
||||
<td class="space1 texet-center">{{ $limit->LIMIT_CURRENCY }}</td>
|
||||
<td class="space1">{{ $limit->AVAIL_AMT }}</td>
|
||||
<td class="space1">{{ $limit->BATCH_DATE }}</td>
|
||||
<td class="space1">{{ $limit->LIMIT_PERCENTAGE }}</td>
|
||||
<td class="space1">{{ $limit->EXPIRY_DATE}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
<tr class="space1">
|
||||
<td class="space1" colspan="9" style="text-align: center;">Tidak Ada Fasilitas</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
</tbody>
|
||||
</table><br><br>
|
||||
|
||||
<div style="width:300px">
|
||||
<table style="width:100%;" class="space1">
|
||||
<tr class="space1" style="height:500px">
|
||||
<td class="space1" style="width:20%;font-size:12px;" >
|
||||
<p style="margin-top:100px; text-align: center;">Nama Pejabat 1</p>
|
||||
<p style="text-align: center;">Jabatan</p>
|
||||
</td>
|
||||
<td class="space1" style="width:20%;font-size:12px;" >
|
||||
<p style="margin-top:100px; text-align: center;">Nama Pejabat 2</p>
|
||||
<p style="text-align: center;">Jabatan</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
67
Resources/views/index.blade.php
Normal file
67
Resources/views/index.blade.php
Normal file
@ -0,0 +1,67 @@
|
||||
<x-default-layout>
|
||||
@php
|
||||
$route = explode('.', Route::currentRouteName());
|
||||
@endphp
|
||||
<!--begin::Card-->
|
||||
<div class="card card-xxl-stretch mb-5 mb-xl-8">
|
||||
<!--begin::Card body-->
|
||||
<div class="card-header border-0 pt-5">
|
||||
<div class="card-title align-items-start flex-column">
|
||||
<div class="d-flex align-items-center position-relative my-1">
|
||||
<span> No CIF : </span><input type="text" id="cif"
|
||||
class="form-control form-control-solid border border-gray-300 w-200px ps-15" name="cif"
|
||||
placeholder="No Cif" >
|
||||
|
||||
<span> Kode Cabang : </span><input type="text" id="kodeCabang"
|
||||
class="form-control form-control-solid border border-gray-300 w-200px ps-15" name="kodeCabang"
|
||||
placeholder="Kode Cabang">
|
||||
|
||||
<span> Periode : </span><input type="number" id="periode" min="{{date('Y')}}" max="{{date('Y') + 3 }}"
|
||||
class="form-control form-control-solid border border-gray-300 w-200px ps-15 ml-10"
|
||||
placeholder="Periode">
|
||||
<button type="button" id="btnSearch" class="btn btn-light-primary"><i class="search fs-2"><span class="path1"></span><span class="path2"></span></i>Cari</button>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="card-toolbar">
|
||||
<!--begin::Export dropdown-->
|
||||
<form class="form_customer2" method="POST" action="{{ route($route[0] . '.export') }}">
|
||||
@csrf
|
||||
<div class="d-flex flex-column mb-8 fv-row">
|
||||
<input type="hidden" style="margin-bottom: 5px" name="cus_no" id="acc_no2" />
|
||||
<input type="hidden" style="margin-bottom: 5px" name="acc_no" />
|
||||
<input type="hidden" style="margin-bottom: 5px" name="kode_cabang" />
|
||||
<input type="hidden" style="margin-bottom: 5px" name="periode" />
|
||||
<div class="text-right d-flex justify-content-end">
|
||||
{{-- <a href="#" class="btn btn-secondary search">Cari</a> --}}
|
||||
<button type="submit" class="btn btn-light-primary exportPdf">
|
||||
<i class="ki-duotone ki-exit-down fs-2"><span class="path1"></span><span
|
||||
class="path2"></span></i>
|
||||
Export Report
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
{{-- <!--begin::Hide default export buttons-->
|
||||
<div id="kt_datatable_example_buttons" class="d-none"></div>
|
||||
<!--end::Hide default export buttons--> --}}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body pt-6">
|
||||
<div class="form-check d-flex justify-content-end">
|
||||
<input class="form-check-input" type="checkbox" value="" id="selectAll" />
|
||||
<label class="form-check-label" style="margin-left:5px">
|
||||
Check All
|
||||
</label>
|
||||
</div>
|
||||
@include('konfirmasibank::_table')
|
||||
</div>
|
||||
<!--end::Card body-->
|
||||
</div>
|
||||
<!--end::Card-->
|
||||
</x-default-layout>
|
19
Resources/views/layouts/master.blade.php
Normal file
19
Resources/views/layouts/master.blade.php
Normal file
@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Module KonfirmasiBank</title>
|
||||
|
||||
{{-- Laravel Vite - CSS File --}}
|
||||
{{-- {{ module_vite('build-konfirmasibank', 'Resources/assets/sass/app.scss') }} --}}
|
||||
|
||||
</head>
|
||||
<body>
|
||||
@yield('content')
|
||||
|
||||
{{-- Laravel Vite - JS File --}}
|
||||
{{-- {{ module_vite('build-konfirmasibank', 'Resources/assets/js/app.js') }} --}}
|
||||
</body>
|
||||
</html>
|
0
Routes/.gitkeep
Normal file
0
Routes/.gitkeep
Normal file
18
Routes/api.php
Normal file
18
Routes/api.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| API Routes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here is where you can register API routes for your application. These
|
||||
| routes are loaded by the RouteServiceProvider within a group which
|
||||
| is assigned the "api" middleware group. Enjoy building your API!
|
||||
|
|
||||
*/
|
||||
|
||||
Route::middleware('auth:api')->get('/konfirmasibank', function (Request $request) {
|
||||
return $request->user();
|
||||
});
|
23
Routes/web.php
Normal file
23
Routes/web.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Web Routes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here is where you can register web routes for your application. These
|
||||
| routes are loaded by the RouteServiceProvider within a group which
|
||||
| contains the "web" middleware group. Now create something great!
|
||||
|
|
||||
*/
|
||||
|
||||
use Modules\KonfirmasiBank\Http\Controllers\KonfirmasiBankController;
|
||||
|
||||
$module = file_get_contents(dirname(__FILE__, 2) . '/module.json');
|
||||
$module = json_decode($module);
|
||||
|
||||
Route::group(['middleware' => ['auth', 'verified']], function () {
|
||||
Route::resource('konfirmasibank', KonfirmasiBankController::class);
|
||||
// Route::post('konfirmasibank/getPdf', [KonfirmasiBankController::class, 'getPdf'])->name('getPdf');
|
||||
Route::Post('/export',[KonfirmasiBankController::class,'export'])->name('konfirmasibank.export');
|
||||
});
|
0
Tests/Feature/.gitkeep
Normal file
0
Tests/Feature/.gitkeep
Normal file
0
Tests/Unit/.gitkeep
Normal file
0
Tests/Unit/.gitkeep
Normal file
21
composer.json
Normal file
21
composer.json
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
"name": "katam/konfirmasibank-module",
|
||||
"description": "",
|
||||
"authors": [{
|
||||
"name": "Katam Nugraha",
|
||||
"email": "katam.iat2023@gmail.com"
|
||||
}],
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"providers": [],
|
||||
"aliases": {
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Modules\\KonfirmasiBank\\": ""
|
||||
}
|
||||
}
|
||||
}
|
11
module.json
Normal file
11
module.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "KonfirmasiBank",
|
||||
"alias": "konfirmasibank",
|
||||
"description": "",
|
||||
"keywords": [],
|
||||
"priority": 0,
|
||||
"providers": [
|
||||
"Modules\\KonfirmasiBank\\Providers\\KonfirmasiBankServiceProvider"
|
||||
],
|
||||
"files": []
|
||||
}
|
16
package.json
Normal file
16
package.json
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"axios": "^0.21.4",
|
||||
"dotenv": "^10.0.0",
|
||||
"dotenv-expand": "^5.1.0",
|
||||
"laravel-vite-plugin": "^0.6.0",
|
||||
"lodash": "^4.17.21",
|
||||
"postcss": "^8.3.7",
|
||||
"vite": "^3.0.9"
|
||||
}
|
||||
}
|
24
vite.config.js
Normal file
24
vite.config.js
Normal file
@ -0,0 +1,24 @@
|
||||
const dotenvExpand = require('dotenv-expand');
|
||||
dotenvExpand(require('dotenv').config({ path: '../../.env'/*, debug: true*/}));
|
||||
|
||||
import { defineConfig } from 'vite';
|
||||
import laravel from 'laravel-vite-plugin';
|
||||
|
||||
export default defineConfig({
|
||||
build: {
|
||||
outDir: '../../public/build-konfirmasibank',
|
||||
emptyOutDir: true,
|
||||
manifest: true,
|
||||
},
|
||||
plugins: [
|
||||
laravel({
|
||||
publicDirectory: '../../public',
|
||||
buildDirectory: 'build-konfirmasibank',
|
||||
input: [
|
||||
__dirname + '/Resources/assets/sass/app.scss',
|
||||
__dirname + '/Resources/assets/js/app.js'
|
||||
],
|
||||
refresh: true,
|
||||
}),
|
||||
],
|
||||
});
|
Reference in New Issue
Block a user