Compare commits
10 Commits
4c3feea703
...
00cb02aee9
Author | SHA1 | Date | |
---|---|---|---|
00cb02aee9 | |||
8cab040e0e | |||
806b403596 | |||
9f709bfb25 | |||
93571603e5 | |||
17e7cbfe3d | |||
739e9e88d5 | |||
142517c4a6 | |||
306a812b23 | |||
fb1d60bbf2 |
@ -354,4 +354,4 @@ class Account extends Model
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
40
Entities/Holiday.php
Normal file
40
Entities/Holiday.php
Normal file
@ -0,0 +1,40 @@
|
||||
<?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 Holiday extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $primaryKey = 'id';
|
||||
protected $connection = 'pgsql';
|
||||
protected $table = 'holiday';
|
||||
|
||||
//public $incrementing = false;
|
||||
|
||||
protected $fillable = [
|
||||
"'holiday_code',
|
||||
'january'
|
||||
'february',
|
||||
'march',
|
||||
'april',
|
||||
'may',
|
||||
'june',
|
||||
'july',
|
||||
'august',
|
||||
'september',
|
||||
'october',
|
||||
'november',
|
||||
'december',
|
||||
'weekend_days',
|
||||
'batch_date'"
|
||||
];
|
||||
|
||||
}
|
38
Entities/VwAccount.php
Normal file
38
Entities/VwAccount.php
Normal file
@ -0,0 +1,38 @@
|
||||
<?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;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class VwAccount extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $primaryKey = 'cif';
|
||||
protected $connection = 'pgsql';
|
||||
protected $table = 'vw_account';
|
||||
|
||||
//public $incrementing = false;
|
||||
|
||||
protected $fillable = [
|
||||
"'cif',
|
||||
'no_rek'
|
||||
'kode_cabang',
|
||||
'nama_cabang',
|
||||
'suku_bunga',
|
||||
'jumlah_nominal'
|
||||
'jenis_rekening',
|
||||
'period',
|
||||
'jatuh_tempo',
|
||||
'kode_mata_uang',
|
||||
'tenor',
|
||||
'tgl_mulai'"
|
||||
];
|
||||
|
||||
}
|
38
Entities/VwDeposito.php
Normal file
38
Entities/VwDeposito.php
Normal file
@ -0,0 +1,38 @@
|
||||
<?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;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class VwDeposito extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $primaryKey = 'cif';
|
||||
protected $connection = 'pgsql';
|
||||
protected $table = 'vw_deposito';
|
||||
|
||||
//public $incrementing = false;
|
||||
|
||||
protected $fillable = [
|
||||
"'cif',
|
||||
'no_rek'
|
||||
'kode_cabang',
|
||||
'nama_cabang',
|
||||
'suku_bunga',
|
||||
'jumlah_nominal'
|
||||
'jenis_rekening',
|
||||
'period',
|
||||
'jatuh_tempo',
|
||||
'kode_mata_uang',
|
||||
'tenor',
|
||||
'tgl_mulai'"
|
||||
];
|
||||
|
||||
}
|
@ -14,6 +14,7 @@ use Modules\Konfirmasibank\Entities\Loan;
|
||||
use Modules\Konfirmasibank\Entities\Letters;
|
||||
use Modules\Konfirmasibank\Entities\Company;
|
||||
use Modules\Konfirmasibank\Entities\Account;
|
||||
use Modules\Konfirmasibank\Entities\VwDeposito;
|
||||
use Modules\Konfirmasibank\Entities\Category;
|
||||
use Modules\Konfirmasibank\Entities\LimitReference;
|
||||
use PDF;
|
||||
@ -98,76 +99,134 @@ class KonfirmasiBankController extends Controller
|
||||
public function getData(Request $request)
|
||||
{
|
||||
|
||||
$data = [];
|
||||
$Account = new Account();
|
||||
$arrAccount = [];
|
||||
$data = [];
|
||||
$dataAccount = [];
|
||||
$dataLoan = [];
|
||||
$startDate = Carbon::parse($request->startDate);
|
||||
$startDateLoan = Carbon::parse($request->startDate);
|
||||
|
||||
//$dateCore = $startDate->format('m/d/Y');
|
||||
$Loans =Loan::where('sk_nasabah',$request->cif)
|
||||
->whereDate('periode',$startDateLoan )
|
||||
//->where('kode_status_lunas', '<>', 'EXPIRED')
|
||||
->where('nama_cabang','like', '%'.$request->kodecabang.'%')
|
||||
->get();
|
||||
|
||||
// $Accounts = $Account->getSearchAccount($request->cif, $arrAccount, $request->kodecabang, $startDate)->get();
|
||||
$Accounts = Dpk::where('cif',$request->cif)
|
||||
if ($Loans->isEmpty()) {
|
||||
$Loans =Loan::where('sk_nasabah',$request->cif)
|
||||
->whereDate('periode',$startDateLoan->subDays(1)->format('m/d/Y') )
|
||||
// ->where('kode_status_lunas', '<>', 'EXPIRED')
|
||||
->where('nama_cabang','like', '%'.$request->kodecabang.'%')
|
||||
//->whereIn('no_rek', $arrAccount)
|
||||
->whereDate('period',$startDate )
|
||||
->get();
|
||||
|
||||
if ($Loans->isEmpty()) {
|
||||
$Loans =Loan::where('sk_nasabah',$request->cif)
|
||||
->whereDate('periode',$startDateLoan->subDays(2)->format('m/d/Y') )
|
||||
// ->where('kode_status_lunas', '<>', 'EXPIRED')
|
||||
//->where('outstanding', '<>', 0)
|
||||
->where('nama_cabang','like', '%'.$request->kodecabang.'%')
|
||||
->get();
|
||||
if ($Loans->isEmpty()) {
|
||||
$Loans =Loan::where('sk_nasabah',$request->cif)
|
||||
->whereDate('periode',$startDateLoan->subDays(3)->format('m/d/Y') )
|
||||
// ->where('kode_status_lunas', '<>', 'EXPIRED')
|
||||
//->where('outstanding', '<>', 0)
|
||||
->where('nama_cabang','like', '%'.$request->kodecabang.'%')
|
||||
->get();
|
||||
if ($Loans->isEmpty()) {
|
||||
$Loans =Loan::where('sk_nasabah',$request->cif)
|
||||
->whereDate('periode',$startDateLoan->subDays(4)->format('m/d/Y') )
|
||||
// ->where('kode_status_lunas','CURRENT')
|
||||
//->where('outstanding', '<>', 0)
|
||||
->where('nama_cabang','like', '%'.$request->kodecabang.'%')
|
||||
->get();
|
||||
if ($Loans->isEmpty()) {
|
||||
$Loans =Loan::where('sk_nasabah',$request->cif)
|
||||
->whereDate('periode',$startDateLoan->subDays(5)->format('m/d/Y') )
|
||||
// ->where('kode_status_lunas','CURRENT')
|
||||
//->where('outstanding', '<>', 0)
|
||||
->where('nama_cabang','like', '%'.$request->kodecabang.'%')
|
||||
->get();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$Accounts = Dpk::where('cif',$request->cif)
|
||||
->where('nama_cabang','like', '%'.$request->kodecabang.'%')
|
||||
//->whereIn('no_rek', $arrAccount)
|
||||
->whereDate('period',$startDate )
|
||||
->get();
|
||||
|
||||
if ($Accounts->isEmpty()) {
|
||||
// $Accounts = $Account->getSearchAccount($request->cif, $arrAccount, $request->kodecabang, $startDate->subDays(1)->format('m/d/Y'))->get();
|
||||
$Accounts = DPK::where('cif',$request->cif)
|
||||
->where('nama_cabang','like', '%'.$request->kodecabang.'%')
|
||||
//->whereIn('no_rek', $arrAccount)
|
||||
->whereDate('period',$startDate->subDays(1)->format('m/d/Y') )
|
||||
->get();
|
||||
if($Accounts->isEmpty()){
|
||||
|
||||
|
||||
if($Accounts->isEmpty() ){
|
||||
// $Accounts = $Account->getSearchAccount($request->cif, $arrAccount, $request->kodecabang, $startDate->subDays(2)->format('m/d/Y'))->get();
|
||||
$Accounts = DPK::where('cif',$request->cif)
|
||||
->where('nama_cabang','like', '%'.$request->kodecabang.'%')
|
||||
//->whereIn('no_rek', $arrAccount)
|
||||
->whereDate('period',$startDate->subDays(2)->format('m/d/Y') )
|
||||
->get();
|
||||
|
||||
if ($Accounts->isEmpty()) {
|
||||
// $Accounts = $Account->getSearchAccount($request->cif, $arrAccount, $request->kodecabang, $startDate->subDays(3)->format('m/d/Y'))->get();
|
||||
$Accounts = DPK::where('cif',$request->cif)
|
||||
->where('nama_cabang','like', '%'.$request->kodecabang.'%')
|
||||
//->whereIn('no_rek', $arrAccount)
|
||||
->whereDate('period',$startDate->subDays(3)->format('m/d/Y') )
|
||||
->get();
|
||||
if ($Accounts->isEmpty()) {
|
||||
//$Accounts = $Account->getSearchAccount($request->cif, $arrAccount, $request->kodecabang, $startDate->subDays(4)->format('m/d/Y'))->get();
|
||||
$Accounts = DPK::where('cif',$request->cif)
|
||||
->where('nama_cabang','like', '%'.$request->kodecabang.'%')
|
||||
//->whereIn('no_rek', $arrAccount)
|
||||
->whereDate('period',$startDate->subDays(4)->format('m/d/Y') )
|
||||
->get();
|
||||
if ($Accounts->isEmpty()) {
|
||||
//$Accounts = $Account->getSearchAccount($request->cif, $arrAccount, $request->kodecabang, $startDate->subDays(5)->format('m/d/Y'))->get();
|
||||
$Accounts = DPK::where('cif',$request->cif)
|
||||
->where('nama_cabang','like', '%'.$request->kodecabang.'%')
|
||||
//->whereIn('no_rek', $arrAccount)
|
||||
->whereDate('period',$startDate->subDays(5)->format('m/d/Y') )
|
||||
->get();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$Accounts = $Account->getSearchAccount($request->cif, $arrAccount, $request->kodecabang, $startDate)->get();
|
||||
}
|
||||
|
||||
|
||||
|
||||
foreach ($Accounts as $key => $value) {
|
||||
$data[$key]['ACCOUNT_NUMBER'] = $value->no_rek;
|
||||
$data[$key]['COMPANY_NAME'] = $value->nama_cabang;
|
||||
$data[$key]['SHORT_NAME'] = $value->jenis_rekening;
|
||||
$data[$key]['CURRENCY'] = $value->kode_mata_uang;
|
||||
$data[$key]['WORKING_BALANCE'] = number_format($value->jumlah_nominal, 2, ',', '.') ;
|
||||
$dataAccount[$key]['ACCOUNT_NUMBER'] = $value->no_rek;
|
||||
$dataAccount[$key]['COMPANY_NAME'] = $value->nama_cabang;
|
||||
$dataAccount[$key]['SHORT_NAME'] = $value->jenis_rekening;
|
||||
$dataAccount[$key]['CURRENCY'] = $value->kode_mata_uang;
|
||||
$dataAccount[$key]['WORKING_BALANCE'] = number_format(abs($value->jumlah_nominal), 2, ',', '.') ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
return json_encode($data);
|
||||
foreach ($Loans as $key2 => $loan) {
|
||||
if ($loan->kode_status_lunas != 'EXPIRED') {
|
||||
$dataLoan[$key2]['ACCOUNT_NUMBER'] = $loan->no_rek;
|
||||
$dataLoan[$key2]['COMPANY_NAME'] = $loan->nama_cabang;
|
||||
$dataLoan[$key2]['SHORT_NAME'] = $loan->product_loan;
|
||||
$dataLoan[$key2]['CURRENCY'] = $loan->kode_mata_uang;
|
||||
$dataLoan[$key2]['WORKING_BALANCE'] = number_format(abs($loan->outstanding), 2, ',', '.') ;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
$data = array_merge($dataAccount, $dataLoan);
|
||||
|
||||
return json_encode($data );
|
||||
}
|
||||
|
||||
|
||||
@ -398,9 +457,11 @@ class KonfirmasiBankController extends Controller
|
||||
|
||||
public function export(Request $request)
|
||||
{
|
||||
|
||||
$arrAccount = explode(",", $request['accNo']);
|
||||
$dateCoreAccount = Carbon::parse($request['startDate2']);
|
||||
$dateCoreDepo = Carbon::parse($request['startDate2']);
|
||||
$startDateLoan = Carbon::parse($request['startDate2']);
|
||||
$cabang = $request['cabang'];
|
||||
$Account = new Account();
|
||||
$data = [];
|
||||
@ -412,6 +473,61 @@ class KonfirmasiBankController extends Controller
|
||||
$DataDepo = [];
|
||||
$GetCustomer = Nasabah::where('cif',$request['cusNo'])->first();
|
||||
|
||||
$Loans =Loan::whereIn('no_rek',$arrAccount)
|
||||
->whereDate('periode',$startDateLoan )
|
||||
//->where('kode_status_lunas', '<>', 'EXPIRED')
|
||||
->where('nama_cabang','like', '%'.$cabang.'%')
|
||||
->get();
|
||||
|
||||
$Depos =Loan::whereIn('no_rek',$arrAccount)
|
||||
->whereDate('periode',$startDateLoan )
|
||||
//->where('kode_status_lunas', '<>', 'EXPIRED')
|
||||
->where('nama_cabang','like', '%'.$cabang.'%')
|
||||
->get();
|
||||
|
||||
|
||||
|
||||
|
||||
if ($Loans->isEmpty()) {
|
||||
$Loans =Loan::whereIn('no_rek',$arrAccount)
|
||||
->whereDate('periode',$startDateLoan->subDays(1)->format('m/d/Y') )
|
||||
//->where('kode_status_lunas', '<>', 'EXPIRED')
|
||||
->where('nama_cabang','like', '%'.$cabang.'%')
|
||||
->get();
|
||||
|
||||
|
||||
|
||||
|
||||
if ($Loans->isEmpty()) {
|
||||
$Loans =Loan::whereIn('no_rek',$arrAccount)
|
||||
->whereDate('periode',$startDateLoan->subDays(2)->format('m/d/Y') )
|
||||
//->where('kode_status_lunas', '<>', 'EXPIRED')
|
||||
->where('nama_cabang','like', '%'.$cabang.'%')
|
||||
->get();
|
||||
if ($Loans->isEmpty()) {
|
||||
$Loans =Loan::whereIn('no_rek',$arrAccount)
|
||||
->whereDate('periode',$startDateLoan->subDays(3)->format('m/d/Y') )
|
||||
//->where('kode_status_lunas', '<>', 'EXPIRED')
|
||||
->where('nama_cabang','like', '%'.$cabang.'%')
|
||||
->get();
|
||||
if ($Loans->isEmpty()) {
|
||||
$Loans =Loan::whereIn('no_rek',$arrAccount)
|
||||
->whereDate('periode',$startDateLoan->subDays(4)->format('m/d/Y') )
|
||||
//->where('kode_status_lunas', '<>', 'EXPIRED')
|
||||
->where('nama_cabang','like', '%'.$cabang.'%')
|
||||
->get();
|
||||
if ($Loans->isEmpty()) {
|
||||
$Loans =Loan::whereIn('no_rek',$arrAccount)
|
||||
->whereDate('periode',$startDateLoan->subDays(5)->format('m/d/Y') )
|
||||
//->where('kode_status_lunas', '<>', 'EXPIRED')
|
||||
->where('nama_cabang','like', '%'.$cabang.'%')
|
||||
->get();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$listAccount = DPK::where('cif',$request['cusNo'])
|
||||
->whereIn('no_rek', $arrAccount)
|
||||
->whereDate('period', $dateCoreAccount )
|
||||
@ -419,11 +535,12 @@ class KonfirmasiBankController extends Controller
|
||||
->orderBy('jenis_rekening', 'DESC')
|
||||
->get();
|
||||
|
||||
|
||||
if ($listAccount->isEmpty()) {
|
||||
$dateCoreDepo = $dateCoreDepo->addDays(1)->format('m/d/Y');
|
||||
$dateCoreAccount = $dateCoreAccount->subDays(1)->format('m/d/Y');
|
||||
$listAccount = DPK::where('cif',$request['cusNo'])
|
||||
->whereIn('no_rek', $arrAccount)
|
||||
// ->whereIn('no_rek', $arrAccount)
|
||||
->whereDate('period', $dateCoreAccount )
|
||||
->where('nama_cabang','like', '%'.$cabang.'%')
|
||||
->orderBy('jenis_rekening', 'DESC')
|
||||
@ -461,8 +578,8 @@ class KonfirmasiBankController extends Controller
|
||||
$listAccount = DPK::where('cif',$request['cusNo'])
|
||||
->whereIn('no_rek', $arrAccount)
|
||||
->whereDate('period', $dateCoreAccount )
|
||||
->where('nama_cabang','like', '%'.$cabang.'%')
|
||||
->orderBy('jenis_rekening', 'DESC')
|
||||
// ->where('nama_cabang','like', '%'.$cabang.'%')
|
||||
->orderBy('jatuh_tempo', 'DESC')
|
||||
->get();
|
||||
}
|
||||
}
|
||||
@ -470,7 +587,18 @@ class KonfirmasiBankController extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
//listdeposito
|
||||
$listDepo = VwDeposito::where('cif',$request['cusNo'])
|
||||
->whereDate('period', $dateCoreAccount )
|
||||
->where('nama_cabang','like', '%'.$cabang.'%')
|
||||
->orderBy('jenis_rekening', 'DESC')
|
||||
->get();
|
||||
|
||||
// dd($listDepo);
|
||||
|
||||
|
||||
|
||||
// try {
|
||||
foreach ($listAccount as $key1 => $account) {
|
||||
|
||||
if ($account->jenis_rekening != 'DEPOSITO') {
|
||||
@ -488,29 +616,54 @@ class KonfirmasiBankController extends Controller
|
||||
$DataAccounts[$key1]['TERM'] = '';
|
||||
}
|
||||
|
||||
if ($account->jenis_rekening == 'DEPOSITO') {
|
||||
$tanggalMulai = Carbon::parse($account->tgl_mulai);
|
||||
$tanggalJatuhTempo = Carbon::parse($account->jatuh_tempo);
|
||||
$selisihHari = $tanggalMulai->diffInMonths($tanggalJatuhTempo);
|
||||
$DataDepo[$key1]['ACCOUNT_NUMBER'] = $account->no_rek;
|
||||
$DataDepo[$key1]['BATCH_DATE'] = $account->period;
|
||||
$DataDepo[$key1]['CUSTOMER_NO'] = $account->cif;
|
||||
$DataDepo[$key1]['SHORT_NAME'] = $account->jenis_rekening; //$depo->SHORT_NAME;
|
||||
$DataDepo[$key1]['CURRENCY'] = $account->kode_mata_uang;
|
||||
$DataDepo[$key1]['PRODUCT'] = $account->jenis_rekening;
|
||||
$DataDepo[$key1]['COMPANY_NAME'] = $account->nama_cabang;
|
||||
$DataDepo[$key1]['WORKING_BALANCE'] = $account->jumlah_nominal != null ? number_format(abs($account->jumlah_nominal), 2, ',', '.') : 'NIHIL';
|
||||
$DataDepo[$key1]['MATURITY_DATE'] = Carbon::parse($account->jatuh_tempo)->format('d-m-Y');
|
||||
$DataDepo[$key1]['FIXED_RATE'] = $account->suku_bunga . ' %' ;
|
||||
$DataDepo[$key1]['TERM'] = $selisihHari . ' BLN';
|
||||
}
|
||||
// if ($account->jenis_rekening == 'DEPOSITO') {
|
||||
// $tanggalMulai = Carbon::parse($account->tgl_mulai);
|
||||
// $tanggalJatuhTempo = Carbon::parse($account->jatuh_tempo);
|
||||
// $selisihHari = $tanggalMulai->diffInMonths($tanggalJatuhTempo);
|
||||
// $DataDepo[$key1]['ACCOUNT_NUMBER'] = $account->no_rek;
|
||||
// $DataDepo[$key1]['BATCH_DATE'] = $account->period;
|
||||
// $DataDepo[$key1]['CUSTOMER_NO'] = $account->cif;
|
||||
// $DataDepo[$key1]['SHORT_NAME'] = $account->jenis_rekening; //$depo->SHORT_NAME;
|
||||
// $DataDepo[$key1]['CURRENCY'] = $account->kode_mata_uang;
|
||||
// $DataDepo[$key1]['PRODUCT'] = $account->jenis_rekening;
|
||||
// $DataDepo[$key1]['COMPANY_NAME'] = $account->nama_cabang;
|
||||
// $DataDepo[$key1]['WORKING_BALANCE'] = $account->jumlah_nominal != null ? number_format(abs($account->jumlah_nominal), 2, ',', '.') : 'NIHIL';
|
||||
// $DataDepo[$key1]['MATURITY_DATE'] = Carbon::parse($account->jatuh_tempo)->format('d-m-Y');
|
||||
// $DataDepo[$key1]['FIXED_RATE'] = $account->suku_bunga . ' %' ;
|
||||
// $DataDepo[$key1]['TERM'] = $selisihHari . ' BLN';
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
foreach ($listDepo as $key2 => $depo) {
|
||||
$termDate = substr($depo->tenor, -1);
|
||||
$tenor = '';
|
||||
if($termDate == 'M'){
|
||||
$tenor = 'BLN';
|
||||
}else if($termDate == 'Y'){
|
||||
$tenor = 'THN';
|
||||
}else{
|
||||
$tenor = 'HRI';
|
||||
}
|
||||
|
||||
$DataDepo[$key2]['ACCOUNT_NUMBER'] = $depo->no_rek;
|
||||
$DataDepo[$key2]['BATCH_DATE'] = $depo->period;
|
||||
$DataDepo[$key2]['CUSTOMER_NO'] = $depo->cif;
|
||||
$DataDepo[$key2]['SHORT_NAME'] = $depo->jenis_rekening; //$depo->SHORT_NAME;
|
||||
$DataDepo[$key2]['CURRENCY'] = $depo->kode_mata_uang;
|
||||
$DataDepo[$key2]['PRODUCT'] = $depo->jenis_rekening;
|
||||
$DataDepo[$key2]['COMPANY_NAME'] = $depo->nama_cabang;
|
||||
$DataDepo[$key2]['WORKING_BALANCE'] = $depo->jumlah_nominal != null ? number_format(abs($depo->jumlah_nominal), 2, ',', '.') : 'NIHIL';
|
||||
$DataDepo[$key2]['MATURITY_DATE'] = Carbon::parse($depo->jatuh_tempo)->format('d-m-Y');
|
||||
$DataDepo[$key2]['FIXED_RATE'] = $depo->suku_bunga . ' %' ;
|
||||
$DataDepo[$key2]['TERM'] = substr($depo->tenor, 0, -1) . " " . $tenor;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$loans = loan::where('sk_nasabah',$request['cusNo'])->whereDate('periode', $dateCoreAccount )->whereNot('outstanding', 0)->where('nama_cabang','like', '%'.$cabang.'%')->get();
|
||||
$DataLoan = [];
|
||||
foreach ($loans as $keyLon => $lon) {
|
||||
foreach ($Loans as $keyLon => $lon) {
|
||||
if ($lon->kode_status_lunas != 'EXPIRED') {
|
||||
$DataLoan[$keyLon]['ACCOUNT_NUMBER'] = $lon->no_rek;
|
||||
$DataLoan[$keyLon]['BATCH_DATE'] = $lon->periode;
|
||||
$DataLoan[$keyLon]['SHORT_NAME'] = $lon->product_loan;
|
||||
@ -520,6 +673,7 @@ class KonfirmasiBankController extends Controller
|
||||
$DataLoan[$keyLon]['ARRANGEMENT_ID'] = '';
|
||||
$DataLoan[$keyLon]['FIXED_RATE'] = number_format($lon->interest_rate, 2, ',', '.') ?? '';
|
||||
$DataLoan[$keyLon]['TERM'] = intval($lon->tenor) ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -543,8 +697,6 @@ class KonfirmasiBankController extends Controller
|
||||
$letter = new Letters();
|
||||
$infoSuratNew = $letter->where('no_cif', $request['cusNo'])->orderBy('id', 'DESC')->first();
|
||||
|
||||
|
||||
|
||||
$data['DataAccounts'] = $DataAccounts ?? '';
|
||||
$data['DataLoan'] = $DataLoan ?? '';
|
||||
$data['DataDepo'] = $DataDepo ?? '';
|
||||
@ -596,11 +748,11 @@ class KonfirmasiBankController extends Controller
|
||||
|
||||
return $pdf->stream($filename);
|
||||
|
||||
} catch (Exception $e) {
|
||||
return redirect()->route('konfirmasibank.timeout');
|
||||
}
|
||||
// } catch (Exception $e) {
|
||||
// return redirect()->route('konfirmasibank.timeout');
|
||||
// }
|
||||
|
||||
return false;
|
||||
// return false;
|
||||
|
||||
|
||||
}
|
||||
@ -845,4 +997,4 @@ class KonfirmasiBankController extends Controller
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Export Konfrimasi Bank</title>
|
||||
<title>Export Konfrimasi Bank </title>
|
||||
<style>
|
||||
@page {
|
||||
margin-top: 3.5cm;
|
||||
@ -110,7 +110,7 @@
|
||||
<li>Tanggal : {{ $data['today'] }}</li>
|
||||
</ul><br>
|
||||
<ul class="no-bullets">
|
||||
<table style="width:100%;border: none !important" class="space1 " >
|
||||
<table style="width:30%;border: none !important" class="space1 " >
|
||||
<tr>
|
||||
<td style="width:50%">Kepada Yth</td>
|
||||
</tr>
|
||||
@ -118,7 +118,7 @@
|
||||
<td style="width:50%">{{$data['infoSuratNew']['nama_tujuan']}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:50%">{{$data['infoSuratNew']['alamat']}}</td>
|
||||
<td style="width:30%">{{$data['infoSuratNew']['alamat']}}</td>
|
||||
</tr>
|
||||
<tr >
|
||||
<td style="width:50%">Email : {{$data['infoSuratNew']['email']}}</td>
|
||||
@ -172,10 +172,16 @@
|
||||
</tr>
|
||||
|
||||
@endforeach
|
||||
@else
|
||||
<tr class="">
|
||||
<td class="space1" colspan="9" style="text-align: center;">NIHIL</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
@if (count($data['DataDepo']) > 0)
|
||||
|
||||
@if (count($data['DataDepo']) > 0)
|
||||
@php
|
||||
$no= count($data['DataAccounts']);
|
||||
$no= count($data['DataAccounts']) +1;
|
||||
@endphp
|
||||
@foreach ($data['DataDepo'] as $item)
|
||||
<tr class="space1">
|
||||
@ -209,11 +215,7 @@
|
||||
|
||||
@endif
|
||||
|
||||
@else
|
||||
<tr class="">
|
||||
<td class="space1" colspan="9" style="text-align: center;">NIHIL</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
<!-- Add more rows here if needed -->
|
||||
</tbody>
|
||||
</table><br>
|
||||
|
@ -385,6 +385,7 @@
|
||||
data: $(this).serialize(),
|
||||
dataType: "json",
|
||||
success: function (items) {
|
||||
|
||||
$('.loading1').hide();
|
||||
let dateString ='';
|
||||
$.each(items, function(i, index) {
|
||||
|
Reference in New Issue
Block a user