perubahan sikit

This commit is contained in:
MUHD HAFIFIE
2021-08-12 23:41:54 +08:00
parent 29b18c19cf
commit c637ddd318
15 changed files with 222 additions and 156 deletions
Vendored
BIN
View File
Binary file not shown.
@@ -446,7 +446,8 @@ class AliranTunaiController extends Controller
$gadaian = floatval($totalgadai);
if(strtoupper(Auth::user()->name) === 'LELONG'){
$bakisemasa = $lelongan;
$penebusanbarcodescanned = floatval($lelongan);
$bakisemasa = floatval($lelongan) - floatval($totalserahan);
}else{
$bakisemasa = floatval($bakiawal) + floatval($totalpendahuluan) + floatval($penebusan) - (floatval($gadaian) + floatval($totalserahan)) - floatval($totaltuntutbaki);
}
+1 -6
View File
@@ -1268,7 +1268,6 @@ class KhazanahController extends Controller
]);
return redirect()->route('khazanah.serahan');
}
public function kemaskiniPendahuluan(Request $request) //Daftar Pendahuluan kepada Kaunter
@@ -1430,9 +1429,6 @@ class KhazanahController extends Controller
$amount = $request->amt;
// if($amount>$baki_awal){
// return redirect()->route('khazanah.serahan')->with('message', 'Jumlah yang dipinta melebihi baki dalam peti besi!.');
// }else{
$tarikh=$request->tarikh;
$kodlaluan=$request->teller;
@@ -1544,8 +1540,6 @@ class KhazanahController extends Controller
}
// }
$GetLatestBakiTunai=Http::get( config('api.url').'/api/getLatestBaki/'.$auth_user['cawangan'])->json();
$sumBaki=$GetLatestBakiTunai;
@@ -2316,6 +2310,7 @@ class KhazanahController extends Controller
public function pendahuluanserahanHQ(Request $request)
{
$auth_user = Auth::user();
$gldetail = Http::post(config('api.url').'/api/gldetailkaunter/'. $auth_user['cawangan'],[
+14 -5
View File
@@ -544,8 +544,12 @@ class PenebusanController extends Controller
'marhun' => $request->marhun,
'jenisbayarantebus' => $request->jenisbayarantebus,
'teller' => $request->teller
])->json();
])->successful();
if(!$updatetebus)
{
return response('fail');
}
//////////////////////
/// MAKING NEW SAG////
@@ -566,7 +570,12 @@ class PenebusanController extends Controller
'nopelanggan' => $request->nopelanggan,
'nokp' => $request->noic,
'sirig' => $new_sirig
]);
])->successful();
if(!$gadai)
{
return response('fail');
}
//////////////////////
@@ -596,7 +605,7 @@ class PenebusanController extends Controller
'upah12' => $keuntungan12bulan,
'hargajualan' => $hargajualan,
'kuantiti_marhun' => $request->kuantiti_marhun
])->json();
])->successful();
$komuditi = Http::put(config('api.url').'/api/komuditi/transaksi',[
'unit_komuditi' => round($request->pinjaman, 2),
@@ -611,7 +620,7 @@ class PenebusanController extends Controller
$updatehistorygadaian = Http::put(config('api.url').'/api/gadai/updatehistory/'. $auth_user['cawangan'] .'/' . $norujukanbaru,[
'historygadaian' => $request->norujukan
])->json();
])->successful();
///////////////////////////
/// MARHUN UPDATE TABLE////
@@ -648,7 +657,7 @@ class PenebusanController extends Controller
'berat_emas' => $array1['berat'],
'harga' => $array1['harga'],
'nilai_marhun' => $array1['n_marhun']
])->json();
])->successful();
}
+1
View File
@@ -61,6 +61,7 @@ return [
'options' => extension_loaded('pdo_mysql') ? array_filter([
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
]) : [],
'unix_socket' => env('UNIX_SOCKET', '/Applications/MAMP/tmp/mysql/mysql.sock'),
],
'pgsql' => [
BIN
View File
Binary file not shown.
@@ -520,7 +520,7 @@
</table>
<h5>CATATAN:</h5> Serahan kepada peti besi ialah sebanyak <span>RM </span>
Baki Tunai Semasa sebanyak <span>RM </span>
Baki Tunai Semasa sebanyak <span>RM {{ number_format($totalsemua,2) }}</span>
<br>
<br>
+153 -7
View File
@@ -454,6 +454,12 @@
});
});
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
// here is the new selected tab id
var selectedTabId = e.target.id;
});
var tablegadai = $('#myTable').DataTable({
"scrollX": true
});
@@ -1494,14 +1500,154 @@
if($("input[name='options']:checked").val() == 'belum_tebus'){
let test1 = $('input[name="belum"]:checked').closest('tr').children('td:eq(2)').text();
let tarikhgadai2 = new Date(test1);tarikhgadai2.setHours(0, 0, 0, 0);
if(+harini !== +tarikhgadai2){
Swal.fire({
icon: 'error',
title: 'Amaran',
text: 'Hapus Gadai Tidak Dibenarkan'
});
return false;
var id = $('.tab-content .active').attr('id');
if(id == "nav-tawarruq-tab") {
if(+harini !== +tarikhgadai2){
Swal.fire({
icon: 'error',
title: 'Amaran',
text: 'Hapus Gadai Tidak Dibenarkan'
});
return false;
}
}
else {
$.ajax({
method:'get',
url: api_url + '/api/upahlamatoday/' + kodcaw + '/' + hapusid,
success:function(data){
console.log(data);
if(data == 1){
const swalWithBootstrapButtons = Swal.mixin({
customClass: {
confirmButton: 'btn btn-success',
cancelButton: 'btn btn-danger'
},
buttonsStyling: false
});
swalWithBootstrapButtons.fire({
title: 'Dapatkan Pengesahan Khazanah',
text: "Hapus Upah Lama!",
icon: 'info',
showCancelButton: true,
confirmButtonText: 'Hantar',
cancelButtonText: 'Batal',
reverseButtons: true
}).then((result) => {
if(result.isConfirmed) {
Swal.fire({
title: 'Tunggu Pengesahan Daripada Khazanah.',
icon: 'info',
width: 600,
padding: '3em',
background: '#fffff',
showCancelButton: false,
showConfirmButton: false,
allowOutsideClick: false,
allowEscapeKey: false,
allowEnterKey: false
})
let mohon = "Hapus Upah Lama";
let id = hapusid;
$.ajax({
method:'post',
url: '{{ route("teller.createkelulusan") }}',
data: {
"_token": "{{ csrf_token() }}",
"norujukan" : id,
"mohon" : mohon
},
success:function(data){
},error: function(xhr, status, error) {
var err = eval("(" + xhr.responseText + ")");
alert(xhr.responseText);
}
});
let teller = "{{ Auth::user()->name }}";
var pusher = new Pusher("{{ env('PUSHER_APP_KEY') }}", {
cluster: 'ap1',
encrypted: true
});
var channel = pusher.subscribe('notice-ubahhapus');
channel.bind('my-ubahhapus', function(data) {
if(data.norujukan == id && data.teller == teller)
{
if(data.kelulusan == 'lulus')
{
Swal.fire({
icon: 'success',
title: 'Telah Disahkan'
}).then(function(){
$.ajax({
method:'post',
url: api_url + '/api/removeupahlamatoday/' + kodcaw + '/' + id,
success:function(data){
if(data == 1)
{
swalWithBootstrapButtons.fire(
'Hapus!',
'Maklumat upah lama telah dihapuskan.',
'success'
).then(function(){
location.reload();
});
}else{
swalWithBootstrapButtons.fire(
'Hapus!',
'Maklumat Upah lama tidak berjaya untuk dihapuskan.',
'error'
).then(function(){
location.reload();
});
}
},error: function(xhr, status, error) {
var err = eval("(" + xhr.responseText + ")");
alert(xhr.responseText);
}
});
return true;
});
}
}
});
}
});
return false;
}
else{
Swal.fire({
icon: 'error',
title: 'Amaran',
text: 'Hapus Upah Tidak Dibenarkan'
});
return false;
}
},error: function(xhr, status, error) {
var err = eval("(" + xhr.responseText + ")");
alert(xhr.responseText);
}
});
}
return false;
}else if($("input[name='options']:checked").val() == 'sudah_tebus'){
let test = $('input[name="sudahtebus"]:checked').closest('tr').children('td:eq(2)').text();
let tarikhgadai1 = new Date(test);tarikhgadai1.setHours(0, 0, 0, 0);
@@ -345,6 +345,8 @@
});
}
},error: function(jqXHR, textStatus, errorThrown) {
console.log(textStatus, errorThrown);
}
});
}
-2
View File
@@ -328,8 +328,6 @@
cluster: 'ap1',
encrypted: true
});
//let teller = "{{ Auth::user()->name }}";
var channel = pusher.subscribe('notice-ubahhapus');
channel.bind('my-ubahhapus', function(data) {
+21 -1
View File
@@ -2428,6 +2428,17 @@
function wakilfunction(e)
{
let wakil = $('#wakiltxt').val();
console.log(wakil);
if(wakil === null || wakil === '')
{
Swal.fire(
'Amaran!',
'Sila masukkan nilai di dalam kotak wakil!',
'error'
)
return false;
}
var patternregex = /\s+|[-,\/]/g;
@@ -2499,7 +2510,16 @@
let nota = $('#notawakil').val();
let nokp = $('#nokpwakil').val();
if(nowakil === null || nowakil === '')
{
Swal.fire(
'Amaran!',
'Sila tunggu no wakil untuk proses dahulu sebelum tekan terima!',
'error'
)
return false;
}
$.ajax({
method:'POST',
url: "{{ route('wakil.create') }}",
@@ -313,135 +313,6 @@
<br>
<br>
<table id="title">
<td> <b><u>LEJER AM</u></b></td>
</table>
<br>
<table id="tarikh_cetak">
<tr>
<td style="width:5px" ><b>TARIKH DARI</b></td ><td style="width:1px"> {{$tarikh_mula}} </td>
<td style="width:5px" ><b>HINGGA</b></td><td style="width:1px"> {{$tarikh_akhir}} </td>
</tr>
</table>
<br>
<table id="glejer">
<tr>
<th style="width:10px">KOD GL</th><th colspan="2" style="width:50px"> KETERANGAN</th> <th style="width:5px">DEBIT</th> <th style="width:5px" >KREDIT</th><th style="width:10px">JUMLAH</th>
</tr>
@foreach($data as $index=>$var)
<tr>
<td style="width:10px">{{ $var['glcode']}}</td><td colspan="2" style="width:50px" >{{$var['descpt']}}</td><td style="width:5px" > {{$var['total_debit']}}</td><td style="width:5px"> {{$var['total_kredit']}} </td>
@if($var['totalharini'] >0 )
<td style="width:10px"> {{
$var['totalharini']
}}
</td>
@else
<td>
( {{ number_format(abs($var['totalharini']),2)}} )
</td>
@endif
</tr>
@endforeach
<tr>
<td colspan="3" style="width:60px"><B>JUMLAH: </B></td><td><b>@foreach($debit as $db=>$vr) {{ number_format($vr['totalDebit'],2)}} @endforeach
</b></td><td> <b> @foreach($kredit as $db=>$vr) {{ number_format($vr['totalKredit'],2)}} @endforeach </b> </td>
<td> <b>
@foreach($kredit as $db=>$vr)
@foreach($debit as $db2=>$vr2)
{{ number_format($vr['totalKredit'] -$vr2['totalDebit'] ,2) }}
@endforeach
@endforeach
</b> </td>
</tr>
</table>
<br>
<br>
<table id="details">
<tr>
<th> </th><th> DISEMAK </th><th></th> <th> DISAHKAN </th><th></th>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
<br>
<br>
<table id="title">
<td> <b><u>LEJER AM</u></b></td>
</table>
+2 -2
View File
@@ -394,11 +394,11 @@ hr.new5 {
</tr>
<tr>
<td colspan="3">Nama Wakil </td> <td>: </td> <td colspan="3"> </td> <td> </td><td> </td><td> </td><td> </td>
<td colspan="3">Nama Wakil </td> <td>: @php if(sizeof($wakil) != 0){ echo $wakil['nama'];} else echo ''; @endphp</td> <td colspan="3"> </td> <td> </td><td> </td><td> </td><td> </td>
</tr>
<tr>
<td colspan="3">No K/P Wakil </td> <td>: </td> <td colspan="3"> </td> <td> </td><td> </td><td> </td><td> </td>
<td colspan="3">No K/P Wakil </td> <td>: @php if(sizeof($wakil) != 0) echo $wakil['nokp']; else echo ''; @endphp</td> <td colspan="3"> </td> <td> </td><td> </td><td> </td><td> </td>
</tr>
</table>
<br>
+2 -2
View File
@@ -68,7 +68,7 @@ Route::get('/daftar_marhun',['as'=>'daftar_marhun','uses'=>'MarhunController@ind
Route::get('/penebusan/{norujukan}',['as'=>'penebusan','uses' => 'PenebusanController@index'])->middleware('auth','teller');
Route::get('/lelongan/{norujukan}',['as'=>'lelongan','uses' => 'LelongController@index'])->middleware('auth','teller');
Route::get('/aliran_tunai','AliranTunaiController@index')->middleware('auth','teller');
Route::get('/aliran_tunai/laporanserahan}',['as'=>'laporan.serahanteller','uses' => 'AliranTunaiController@LaporanSerahan'])->middleware('auth','teller');
Route::get('/aliran_tunai/laporanserahan',['as'=>'laporan.serahanteller','uses' => 'AliranTunaiController@LaporanSerahan'])->middleware('auth','teller');
Route::put('/aliran_tunai/Gadaian',['as'=>'alirantunai.gadai','uses' => 'AliranTunaiController@alirantunaiGadai'])->middleware('auth','teller');
Route::put('/aliran_tunai/Tebusan',['as'=>'alirantunai.tebus','uses' => 'AliranTunaiController@alirantunaiTebus'])->middleware('auth','teller');
Route::put('/aliran_tunai/advansur',['as'=>'alirantunai.advansur','uses' => 'AliranTunaiController@alirantunaiUpahBknTawarruq'])->middleware('auth','teller');
@@ -126,7 +126,7 @@ Route::post('laporan/tebus/cetak',['as'=>'tebus.laporancetak','uses'=>'KhazanahC
Route::get('/khazanah/pelanggan',['as'=>'khazanah.pelanggan','uses'=>'KhazanahController@index'])->middleware('auth','khazanah');
Route::get('/khazanah/customer_info',['as'=>'khazanah.customer_info','uses'=>'KhazanahController@info'])->middleware('auth','khazanah');
Route::get('/khazanah/searchpelanggan',['as'=>'khazanah.searchpelanggan','uses'=>'KhazanahController@search'])->middleware('auth','khazanah');
Route::get('/khazanah/pendahuluanserahanHQ',['as'=>'khazanah.pendahuluanserahanHQ','uses'=>'KhazanahController@pendahuluanserahanHQ'])->middleware('auth','khazanah');
Route::post('/khazanah/pendahuluanserahanHQ',['as'=>'khazanah.pendahuluanserahanHQ','uses'=>'KhazanahController@pendahuluanserahanHQ'])->middleware('auth','khazanah');
Route::get('/penebusankhazanah/{norujukan}',['as'=>'penebusan.khazanah','uses' => 'PenebusanController@PenebusanKhazanah'])->middleware('auth','khazanah');
Route::post('/kakitangan/harian',['as'=>'kakitangan.harian','uses'=>'KakitanganController@kakitanganHarian'])->middleware('auth','khazanah');
+23
View File
@@ -0,0 +1,23 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Foundation\Testing\WithFaker;
use Tests\TestCase;
class DenominasiTest extends TestCase
{
/**
* A basic feature test example.
*
* @return void
*/
public function testExample()
{
$this->actingAs($user);
$response = $this->get('/');
$response->assertStatus(200);
}
}