FIX formate currency
This commit is contained in:
@ -81,8 +81,9 @@ class Account extends Model
|
|||||||
// ->where('INACTIV_MARKER', NULL)
|
// ->where('INACTIV_MARKER', NULL)
|
||||||
->where('AC.BATCH_DATE',$startDate)
|
->where('AC.BATCH_DATE',$startDate)
|
||||||
->whereIn('AC.ACCOUNT_NUMBER', $arrAccount)
|
->whereIn('AC.ACCOUNT_NUMBER', $arrAccount)
|
||||||
->whereIn(DB::raw("LEFT(CATEGORY, 3)"),['100','600','660','101'])
|
//->whereIn(DB::raw("LEFT(CATEGORY, 3)"),['100','600','660','101'])
|
||||||
->groupBy('CUSTOMER_NO','ACCOUNT_NUMBER','SHORT_TITLE','SHORT_NAME','COMPANY_NAME')
|
->groupBy('CUSTOMER_NO','ACCOUNT_NUMBER','SHORT_TITLE','SHORT_NAME','COMPANY_NAME')
|
||||||
|
->orderBy('SHORT_NAME', 'ASC')
|
||||||
->limit(100);
|
->limit(100);
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
@ -213,4 +214,4 @@ class Account extends Model
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -32,6 +32,9 @@
|
|||||||
use Illuminate\Support\Facades\Validator;
|
use Illuminate\Support\Facades\Validator;
|
||||||
use Illuminate\Support\Facades\Storage;
|
use Illuminate\Support\Facades\Storage;
|
||||||
use Modules\Konfirmasibank\Http\Requests\Fasilitas\StoreFasilitasRequest;
|
use Modules\Konfirmasibank\Http\Requests\Fasilitas\StoreFasilitasRequest;
|
||||||
|
use Akaunting\Money\Currency;
|
||||||
|
use Akaunting\Money\Money;
|
||||||
|
|
||||||
class KonfirmasiBankController extends Controller
|
class KonfirmasiBankController extends Controller
|
||||||
{
|
{
|
||||||
public $user;
|
public $user;
|
||||||
@ -402,13 +405,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
$fasilitas = Fasilitas::where('nomor_cif',$request['cusNo'] )->where('status',1)->get();
|
$fasilitas = Fasilitas::where('nomor_cif',$request['cusNo'] )->where('status',1)->get();
|
||||||
|
|
||||||
foreach ($fasilitas as $key3 => $val3) {
|
foreach ($fasilitas as $key3 => $val3) {
|
||||||
$saldo1 = str_replace(',', '.',$val3->saldo);
|
|
||||||
$saldo2 = str_replace('.', '',$saldo1);
|
|
||||||
$DataFasilitas[$key3]['jenis_fasilitas'] = $val3->jenis_fasilitas;
|
$DataFasilitas[$key3]['jenis_fasilitas'] = $val3->jenis_fasilitas;
|
||||||
$DataFasilitas[$key3]['start_date'] = $val3->start_date;
|
$DataFasilitas[$key3]['start_date'] = $val3->start_date;
|
||||||
$DataFasilitas[$key3]['mata_uang'] = $val3->mata_uang;
|
$DataFasilitas[$key3]['mata_uang'] = $val3->mata_uang;
|
||||||
$DataFasilitas[$key3]['saldo'] = number_format($saldo2, 2, ',', '.') ?? '';;
|
$DataFasilitas[$key3]['saldo'] = number_format(floatval($val3->saldo), 2, ',', '.');
|
||||||
$DataFasilitas[$key3]['jangka_waktu'] = $val3->jangka_waktu;
|
$DataFasilitas[$key3]['jangka_waktu'] = $val3->jangka_waktu;
|
||||||
$DataFasilitas[$key3]['fixed_rate'] = $val3->fixed_rate ?? '';
|
$DataFasilitas[$key3]['fixed_rate'] = $val3->fixed_rate ?? '';
|
||||||
$DataFasilitas[$key3]['due_date'] = $val3->due_date ?? '';
|
$DataFasilitas[$key3]['due_date'] = $val3->due_date ?? '';
|
||||||
@ -647,4 +649,4 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<meta name="csrf-token" content="{{ csrf_token() }}" />
|
<meta name="csrf-token" content="{{ csrf_token() }}" />
|
||||||
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.bd-example-modal-lg .modal-dialog{
|
.bd-example-modal-lg .modal-dialog{
|
||||||
display: table;
|
display: table;
|
||||||
@ -67,7 +68,7 @@
|
|||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<input type="hidden" id="pastYear" value="{{$data['pastYear']}}">
|
<input type="hidden" id="pastYear" value="{{$data['pastYear']}}">
|
||||||
<input type="hidden" id="currentYear" value="{{$data['currentYear']}}">
|
<input type="hidden" id="currentYear" value="{{$data['currentYear']}}">
|
||||||
<input type="text" class="form-control form-control-sm datepicker" name="startDate" clear id="startDate" placeholder="DD/MM/YYYY">
|
<input type="text" class="form-control form-control-sm datepicker" name="startDate" placeholder="DD/MM/YYYY">
|
||||||
</div>
|
</div>
|
||||||
{{-- <div class="col-sm-1">
|
{{-- <div class="col-sm-1">
|
||||||
<label for="colFormLabelSm" class="col-form-label col-form-label-sm">S/D</label>
|
<label for="colFormLabelSm" class="col-form-label col-form-label-sm">S/D</label>
|
||||||
@ -260,7 +261,7 @@
|
|||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label for="inputName" class="col-sm-4 col-form-label">Tgl Req Surat</label>
|
<label for="inputName" class="col-sm-4 col-form-label">Tgl Req Surat</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input type="text" class="form-control form-control-sm datepicker" name="tgl_req_surat" placeholder="DD/MM/YYYY" onfocus="this.type='date'" onblur="this.type='text'" required>
|
<input type="text" class="form-control form-control-sm datepicker" name="tgl_req_surat" placeholder="DD/MM/YYYY" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
@ -328,8 +329,8 @@
|
|||||||
var pasYear = $('#pastYear').val();
|
var pasYear = $('#pastYear').val();
|
||||||
var currentYear = $('#currentYear').val();
|
var currentYear = $('#currentYear').val();
|
||||||
|
|
||||||
|
|
||||||
$('.datepicker').flatpickr({
|
$('.datepicker').flatpickr({
|
||||||
enableTime: !0,
|
|
||||||
dateFormat: "d-m-Y",
|
dateFormat: "d-m-Y",
|
||||||
minDate: pasYear,
|
minDate: pasYear,
|
||||||
maxDate: currentYear
|
maxDate: currentYear
|
||||||
@ -567,6 +568,7 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@endpush
|
@endpush
|
||||||
</x-default-layout>
|
</x-default-layout>
|
||||||
|
@ -132,7 +132,7 @@
|
|||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label for="inputName" class="col-sm-3 col-form-label">Balance</label>
|
<label for="inputName" class="col-sm-3 col-form-label">Balance</label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input type="number" class="form-control form-control-sm " name="saldo" placeholder="Balance">
|
<input type="text" class="form-control form-control-sm " name="saldo" placeholder="Balance">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
@ -265,7 +265,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label for="inputName" class="col-sm-3 col-form-label">Saldo</label>
|
<label for="inputName" class="col-sm-3 col-form-label">Balance</label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input type="text" class="form-control form-control-sm " id="saldo" name="saldo_edit"
|
<input type="text" class="form-control form-control-sm " id="saldo" name="saldo_edit"
|
||||||
placeholder="Saldo">
|
placeholder="Saldo">
|
||||||
@ -275,14 +275,14 @@
|
|||||||
<label for="inputName" class="col-sm-3 col-form-label">Start Date</label>
|
<label for="inputName" class="col-sm-3 col-form-label">Start Date</label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input type="text" class="form-control form-control-sm datepicker" id="startDate" name="start_date_edit"
|
<input type="text" class="form-control form-control-sm datepicker" id="startDate" name="start_date_edit"
|
||||||
placeholder="DD/MM/YYYY">>
|
placeholder="DD/MM/YYYY">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label for="inputName" class="col-sm-3 col-form-label">End Date</label>
|
<label for="inputName" class="col-sm-3 col-form-label">End Date</label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input type="text" class="form-control form-control-sm datepicker" id="dueDatae" name="due_date_edit"
|
<input type="text" class="form-control form-control-sm datepicker" id="dueDatae" name="due_date_edit"
|
||||||
placeholder="DD/MM/YYYY" onfocus="this.type='date'" onblur="this.type='text'">>
|
placeholder="DD/MM/YYYY">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
@ -317,9 +317,7 @@
|
|||||||
@push('customscript')
|
@push('customscript')
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
$('.datepicker').flatpickr({
|
$('.datepicker').flatpickr({
|
||||||
enableTime: !0,
|
|
||||||
dateFormat: "d-m-Y"
|
dateFormat: "d-m-Y"
|
||||||
})
|
})
|
||||||
// Open the modal when the "Open Modal" button is clicked
|
// Open the modal when the "Open Modal" button is clicked
|
||||||
|
@ -55,13 +55,14 @@
|
|||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label for="inputName" class="col-sm-4 col-form-label">Deputy Director</label>
|
<label for="inputName" class="col-sm-4 col-form-label">Deputy Director</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input type="text" class="form-control form-control-sm " name="deputy_director" placeholder="Nama Deputy Director">
|
<input type="text" class="form-control form-control-sm " name="deputy_director" placeholder="Nama Deputy Director" style="text-transform:uppercase">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label for="inputName" class="col-sm-4 col-form-label">Executive Officer</label>
|
<label for="inputName" class="col-sm-4 col-form-label">Executive Officer</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input type="text" class="form-control form-control-sm " name="executive_officer" placeholder="Nama Executive Officer">
|
<input type="text" class="form-control form-control-sm " name="executive_officer" placeholder="Nama Executive Officer" id="executive_officer" style="text-transform:uppercase">
|
||||||
|
<span id="note" style="color:darkred;display:none" ><small>Nama Tidak Boleh Sama .. !</small></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
@ -105,13 +106,14 @@
|
|||||||
<label for="inputName" class="col-sm-4 col-form-label">Deputy Director</label>
|
<label for="inputName" class="col-sm-4 col-form-label">Deputy Director</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input type="hidden" class="form-control form-control-sm " name="id" placeholder="Nama Deputy Director">
|
<input type="hidden" class="form-control form-control-sm " name="id" placeholder="Nama Deputy Director">
|
||||||
<input type="text" class="form-control form-control-sm " name="deputy_director" placeholder="Nama Deputy Director">
|
<input type="text" class="form-control form-control-sm " name="deputy_director" placeholder="Nama Deputy Director" style="text-transform:uppercase">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label for="inputName" class="col-sm-4 col-form-label">Executive Officer</label>
|
<label for="inputName" class="col-sm-4 col-form-label">Executive Officer</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input type="text" class="form-control form-control-sm " name="executive_officer" placeholder="Nama Executive Officer">
|
<input type="text" class="form-control form-control-sm " id="executive_officer2" name="executive_officer" placeholder="Nama Executive Officer" style="text-transform:uppercase">
|
||||||
|
<span id="note2" style="color:darkred;display:none" ><small>Nama Tidak Boleh Sama .. !</small></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
@ -146,12 +148,45 @@
|
|||||||
$("#myModalEditSigner").modal("hide");
|
$("#myModalEditSigner").modal("hide");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('#executive_officer').on('keyup', function() {
|
||||||
|
let deputy_eirector = $('input[name="deputy_director"]').val();
|
||||||
|
let executive_officer = $(this).val();
|
||||||
|
if (executive_officer == deputy_eirector ) {
|
||||||
|
// alert('Penandatangan Tidak Boleh Sama');
|
||||||
|
$('#executive_officer').css('border-color', 'red');
|
||||||
|
$('#submitSigner').attr('disabled', 'disabled');
|
||||||
|
$('#note').show();
|
||||||
|
}else{
|
||||||
|
$('#executive_officer').css('border-color', '');
|
||||||
|
$('#submitSigner').attr('disabled', false);
|
||||||
|
$('#note').hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#executive_officer2').on('keyup', function() {
|
||||||
|
let deputy_eirector = $('input[name="deputy_director"]').val().toUpperCase();
|
||||||
|
let executive_officer = $(this).val();
|
||||||
|
if (executive_officer == deputy_eirector ) {
|
||||||
|
$('#executive_officer2').css('border-color', 'red');
|
||||||
|
$('#submitFormUpdateSigner').attr('disabled', 'disabled');
|
||||||
|
$('#note2').show();
|
||||||
|
}else{
|
||||||
|
$('#executive_officer2').css('border-color', '');
|
||||||
|
$('#submitFormUpdateSigner').attr('disabled', false);
|
||||||
|
$('#note2').hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// Handle form submission when the "Submit" button inside the modal is clicked
|
// Handle form submission when the "Submit" button inside the modal is clicked
|
||||||
$("#submitSigner").click(function(e) {
|
$("#submitSigner").click(function(e) {
|
||||||
// Serialize the form data
|
// Serialize the form data
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var formData = $("#formSigner").serialize();
|
var formData = $("#formSigner").serialize();
|
||||||
|
// var executive_officer = $('input[name="executive_officer"]').val();
|
||||||
|
// var deputy_director = $('input[name="executive_officer"]').val();
|
||||||
|
// if(executive_officer == deputy_director){
|
||||||
|
// alert();
|
||||||
|
// }
|
||||||
// Send an AJAX request to the form submission route
|
// Send an AJAX request to the form submission route
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
|
Reference in New Issue
Block a user