resit ujrah align with keuntungan

This commit is contained in:
Cyclone
2025-11-23 20:49:23 +08:00
parent 5b3bd0ea5a
commit 98ad8a585e
2 changed files with 7 additions and 5 deletions
+3 -1
View File
@@ -612,8 +612,10 @@ class GadaianController extends Controller
$khazanah_user = User::where('role_harian', 'khazanah')->where('cawangan', $auth_user['cawangan'])->select('name')->first(); $khazanah_user = User::where('role_harian', 'khazanah')->where('cawangan', $auth_user['cawangan'])->select('name')->first();
$transaction_keuntungan = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/transaksi_keuntungan_latest/'. $id)->json();
if($gadai['tagbaru'] == 1) { if($gadai['tagbaru'] == 1) {
return view('print.resittebus_ujrah',compact('surat_wakil','totalrebate','transaction_tebus', 'transaction','gadai','cawangan_info','customers_info','penebusan','wakil','totaltransaction','totalBayaranAnsuran', 'khazanah_user')); return view('print.resittebus_ujrah',compact('transaction_keuntungan','surat_wakil','totalrebate','transaction_tebus', 'transaction','gadai','cawangan_info','customers_info','penebusan','wakil','totaltransaction','totalBayaranAnsuran', 'khazanah_user'));
} else { } else {
return view('print.resittebus',compact('surat_wakil', 'transaction_tebus', 'transaction','gadai','cawangan_info','customers_info','penebusan','wakil','totaltransaction','totalBayaranAnsuran', 'khazanah_user')); return view('print.resittebus',compact('surat_wakil', 'transaction_tebus', 'transaction','gadai','cawangan_info','customers_info','penebusan','wakil','totaltransaction','totalBayaranAnsuran', 'khazanah_user'));
} }
@@ -629,22 +629,22 @@
</tr> </tr>
<tr> <tr>
<td style="width:10px">Keuntungan</td> <td style="width:10px">Keuntungan</td>
<td style="width:10px">: RM {{ number_format($penebusan['onepercent'], 2) }}</td> <td style="width:10px">: RM {{ number_format($transaction_keuntungan['onepercent'],2) }}</td>
</tr> </tr>
<tr> <tr>
<td style="width:10px">(-) Rebat Untung</td> <td style="width:10px">(-) Rebat Untung</td>
<td style="width:10px">: RM <td style="width:10px">: RM
{{ number_format($totalrebate['onepercent'], 2) }} {{ number_format(($transaction_keuntungan['onepercent'] - $transaction_keuntungan['onepercent_rebet']),2) }}
</td> </td>
</tr> </tr>
<tr> <tr>
<td style="width:10px">Lain-Lain Caj</td> <td style="width:10px">Lain-Lain Caj</td>
<td style="width:10px">: RM {{ number_format($penebusan['ujrah'], 2) }} </td> <td style="width:10px">: RM {{ number_format($transaction_keuntungan['ujrah'],2) }} </td>
</tr> </tr>
<tr> <tr>
<td style="width:10px">(-) Rebat Lain-Lain Caj</td> <td style="width:10px">(-) Rebat Lain-Lain Caj</td>
<td style="width:10px">: RM <td style="width:10px">: RM
{{ number_format($totalrebate['ujrah'], 2) }} </td> {{ number_format(($transaction_keuntungan['ujrah'] - $transaction_keuntungan['ujrah_rebet']), 2) }} </td>
</tr> </tr>
<tr> <tr>
<td></td> <td></td>