fix penebusan resit

This commit is contained in:
MUHD HAFIFIE
2021-05-30 19:39:06 +08:00
parent 18a8f57186
commit f04a4debf7
2 changed files with 11 additions and 8 deletions
@@ -472,8 +472,6 @@ class GadaianController extends Controller
$cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
dd($cawangan_info);
$gadai = Http::get(config('api.url') . '/api/gadai/norujukan/'. $id)->json();
$totaltransaction = 0;
+11 -6
View File
@@ -1010,18 +1010,13 @@
}
let jenisbayarantebus = '';
if(hargajualan == '')
{
jenisbayarantebus = "nottawarruq";
var urlroute = '{{ route("resit.belumtebus", ":id") }}';
urlroute = urlroute.replace(':id', norujukan);
}
else if (hargajualan != ''){
jenisbayarantebus = "tawarruq";
var urlroute = '{{ route("resit.tebus", ":id") }}';
urlroute = urlroute.replace(':id', norujukan);
}
var nopelanggan = "{{ $gadai['nopelanggan'] }}";
@@ -1066,6 +1061,16 @@
if(success_data == 'success')
{
if(jenisbayarantebus == "tawarruq")
{
var urlroute = '{{ route("resit.tebus", ":id") }}';
urlroute = urlroute.replace(':id', norujukan);
}else{
var urlroute = '{{ route("resit.belumtebus", ":id") }}';
urlroute = urlroute.replace(':id', norujukan);
}
$.ajax({
method: 'put',
url: "{{ route('alirantunai.tebus') }}",