update total show simulasi
This commit is contained in:
@@ -370,6 +370,8 @@ class SimulasiController extends Controller
|
||||
$total14Kp = 0;
|
||||
$total14K = 0;
|
||||
$total9K = 0;
|
||||
$total_upahkeuntungan2 = 0;
|
||||
$total_nilaimarhun = 0;
|
||||
|
||||
foreach($cawangansim as $cawsim)
|
||||
{
|
||||
@@ -389,10 +391,7 @@ class SimulasiController extends Controller
|
||||
|
||||
$keuntungan = 0;
|
||||
$total_upahkeuntungan = 0;
|
||||
$total_nilaimarhun = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
foreach($databid as $index1=>$bid)
|
||||
{
|
||||
$marhun = SimulasiBidMarhun::where('simulasibid_id','=',$bid['id'])->get();
|
||||
@@ -470,7 +469,7 @@ class SimulasiController extends Controller
|
||||
}
|
||||
|
||||
//total keuntungaan full
|
||||
|
||||
|
||||
array_push($arraycaw,[
|
||||
'id_cawangan'=> $cawangan['id'],
|
||||
'cawangan'=>$cawangan['caw_name'],
|
||||
@@ -490,11 +489,13 @@ class SimulasiController extends Controller
|
||||
$total_marhun = $total_marhun + sizeof($databid);
|
||||
$total_berat = $total_berat + $berat;
|
||||
$total_nilaimarhun = $total_nilaimarhun + $nilai_marhun;
|
||||
//dd($nilai_marhun);
|
||||
$total_pinjaman = $total_pinjaman + $pinjaman;
|
||||
$total_hargaasas = $total_hargaasas + $hargaasas;
|
||||
$total_cazlelong = $total_cazlelong + $cajlelong;
|
||||
$total_rugilelong = $total_rugilelong + $rugilelong;
|
||||
$total_bakilelong = $total_bakilelong + $bakilelong;
|
||||
$total_upahkeuntungan2 = $total_upahkeuntungan2 + $total_upahkeuntungan;
|
||||
|
||||
|
||||
$data = Simulasi::where('simulasi.id','=',$simulasi_id)
|
||||
@@ -531,7 +532,8 @@ class SimulasiController extends Controller
|
||||
'jeniskarat',
|
||||
'data',
|
||||
'total_upahkeuntungan',
|
||||
'total_nilaimarhun'
|
||||
'total_nilaimarhun',
|
||||
'total_upahkeuntungan2'
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
<td>{{ number_format($total_berat, 2, '.', ',') }}</td>
|
||||
<td>{{ number_format($total_nilaimarhun, 2, '.', ',') }}</td>
|
||||
<td>{{ number_format($total_pinjaman, 2, '.', ',') }}</td>
|
||||
<td>{{ number_format($total_upahkeuntungan, 2, '.', ',') }}</td>
|
||||
<td>{{ number_format($total_upahkeuntungan2, 2, '.', ',') }}</td>
|
||||
<td>{{ number_format($total_hargaasas, 2, '.', ',') }}</td>
|
||||
<td>{{ number_format($total_cazlelong, 2, '.', ',') }}</td>
|
||||
<td>{{ number_format($total_bakilelong, 2, '.', ',') }}</td>
|
||||
|
||||
Reference in New Issue
Block a user