add condition upah12 tawarruq & keuntungan baru
This commit is contained in:
@@ -4198,7 +4198,7 @@ class KhazanahController extends Controller
|
||||
$tarikh_cetak = $current->toDateString();
|
||||
|
||||
if($request->datemula == null){
|
||||
$mula_date = '2017-01-01';
|
||||
$mula_date = $current->toDateString();
|
||||
}else{
|
||||
$split_date = explode('-', $request->datemula);
|
||||
$mula_date = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0];
|
||||
|
||||
@@ -53,9 +53,9 @@
|
||||
<th>Tarikh Gadai</th>
|
||||
<th>No Rujukan</th>
|
||||
<th>Pembiayaan (RM)</th>
|
||||
<th>Ujrah (RM) </th>
|
||||
<th>Keuntungan Ujrah (RM) </th>
|
||||
<th>Keuntungan 1% (RM)</th>
|
||||
<th>Keuntungan Sebenar (RM)</th>
|
||||
<th>Jumlah Keuntungan (RM)</th>
|
||||
<th>Nilai Marhun (RM)</th>
|
||||
<th>Berat (g)</th>
|
||||
</tr>
|
||||
@@ -213,12 +213,23 @@
|
||||
tablegadai.clear().draw();
|
||||
$.each(data,function(index,gadai){
|
||||
total_pinjaman += Number(gadai['pinjaman']);
|
||||
total_upah12 += Number(gadai['upah12']);
|
||||
total_nm += Number(gadai['nilaimarhun']);
|
||||
total_berat += Number(gadai['berat']);
|
||||
total_onepercent += Number(gadai['onepercent']*12);
|
||||
total_ujrah += Number(gadai['ujrah']*12);
|
||||
|
||||
|
||||
if (gadai['tagbaru'] == 0) {
|
||||
|
||||
var upah12 = gadai['upah12'];
|
||||
|
||||
} else {
|
||||
|
||||
var upah12 = gadai['ujrah']*12 + gadai['onepercent']*12;
|
||||
|
||||
}
|
||||
|
||||
total_upah12 += Number(upah12) ;
|
||||
|
||||
tablegadai.row.add([
|
||||
counter,
|
||||
gadai['nama'],
|
||||
@@ -227,8 +238,8 @@
|
||||
gadai['norujukan'],
|
||||
formatter.format(gadai['pinjaman']),
|
||||
formatter.format(gadai['ujrah']*12),
|
||||
formatter.format(gadai['onepercent']*12),
|
||||
formatter.format(gadai['upah12']),
|
||||
formatter.format(gadai['onepercent']*12),
|
||||
formatter.format(upah12),
|
||||
formatter.format(gadai['nilaimarhun']),
|
||||
formatter.format(gadai['berat'])
|
||||
]).draw();
|
||||
|
||||
Reference in New Issue
Block a user