diff --git a/application/models/Mdmutasi.php b/application/models/Mdmutasi.php index acf9859..5baab35 100644 --- a/application/models/Mdmutasi.php +++ b/application/models/Mdmutasi.php @@ -31,7 +31,7 @@ public function get_current_mutasi($list, $iddiv=0){ - $sql2 = query("SELECT id_master, id_divisi, SUM(jml) AS jml_kirim FROM cc_kirim $imp GROUP BY id_master"); + $sql2 = query("SELECT id_master, id_divisi, SUM(jml) AS jml_kirim FROM cc_kirim $imp GROUP BY id_master, id_divisi"); foreach($sql2->result_array() as $row){ if($iddiv == 0){ if(isset($arr[$row['id_master']])){ diff --git a/application/models/Mdreport.php b/application/models/Mdreport.php index 45f0178..836ec9c 100644 --- a/application/models/Mdreport.php +++ b/application/models/Mdreport.php @@ -46,7 +46,7 @@ public function report_master($detail=0){ $sql3 = query("SELECT * FROM cc_kirim WHERE stat <> 9 ORDER BY tgl"); foreach($sql3->result_array() as $row3){ - $tgl = strtotime($row3['tgl'] + $n); + $tgl = strtotime($row3['tgl']) + $n; $arr[$row3['id_master']][$tgl]["kirim"] = $row3['jml']; $arr[$row3['id_master']][$tgl]["ket"] = $row3['ket']; $n++; diff --git a/application/models/Mdsetting.php b/application/models/Mdsetting.php index 1a4123e..9496978 100644 --- a/application/models/Mdsetting.php +++ b/application/models/Mdsetting.php @@ -49,7 +49,7 @@ public function report_master($idproj, $detail=0){ $sql3 = query("SELECT * FROM cc_temp WHERE tb = 'cc_kirim' AND id_project = ".quote($idproj)." AND stat <> 9 ORDER BY tgl"); foreach($sql3->result_array() as $row3){ - $tgl = strtotime($row3['tgl'] + $n); + $tgl = strtotime($row3['tgl']) + $n; $arr[$row3['id_master']][$tgl]["kirim"] = $row3['jml']; $arr[$row3['id_master']][$tgl]["ket"] = $row3['ket']; $n++; diff --git a/application/views/laporan.php b/application/views/laporan.php index 56d2d74..f739e24 100644 --- a/application/views/laporan.php +++ b/application/views/laporan.php @@ -130,8 +130,8 @@ $n++; } else{ - $masuk += $terima; - $keluar += $kirim; + $masuk += intval($terima); + $keluar += intval($kirim); } } @@ -229,8 +229,8 @@ $n++; } else{ - $masuk += $kirim; - $keluar += $jual; + $masuk += intval($kirim); + $keluar += intval($jual); } }