@@ -33,5 +33,5 @@ |
||
| 33 | 33 | // |
| 34 | 34 | //?> |
| 35 | 35 | <?php |
| 36 | - echo" <link href='css/i_style.css' type='text/css' rel='stylesheet'>"; |
|
| 37 | - ?> |
|
| 38 | 36 | \ No newline at end of file |
| 37 | + echo" <link href='css/i_style.css' type='text/css' rel='stylesheet'>"; |
|
| 38 | + ?> |
|
| 39 | 39 | \ No newline at end of file |
@@ -35,12 +35,12 @@ |
||
| 35 | 35 | ////Define Function |
| 36 | 36 | function bar128($text) |
| 37 | 37 | { // Part 1, make list of widths |
| 38 | - global $char128asc,$char128wid; |
|
| 38 | + global $char128asc,$char128wid; |
|
| 39 | 39 | $w = $char128wid[$sum = 104]; // START symbol |
| 40 | 40 | $onChar = 1; |
| 41 | 41 | for ($x = 0; $x < strlen($text); $x++) { // GO THRU TEXT GET LETTERS |
| 42 | 42 | if (!(($pos = strpos($char128asc, $text[$x])) === false)) { // SKIP NOT FOUND CHARS |
| 43 | - $w .= $char128wid[$pos]; |
|
| 43 | + $w .= $char128wid[$pos]; |
|
| 44 | 44 | $sum += $onChar++ * $pos; |
| 45 | 45 | } |
| 46 | 46 | } |
@@ -109,16 +109,16 @@ discard block |
||
| 109 | 109 | <p class="pull-right"> |
| 110 | 110 | <select name="itipe_barang" class="form-control" onChange="document.myform.submit();"> |
| 111 | 111 | <?php |
| 112 | - $query = mysql_query('SELECT * FROM tipe_barang ORDER BY id_tipe_barang'); |
|
| 113 | - if ($query && mysql_num_rows($query) > 0) { |
|
| 114 | - while ($row = mysql_fetch_object($query)) { |
|
| 115 | - echo '<option value="'.$row->id_tipe_barang.'"'; |
|
| 116 | - if ($row->id_tipe_barang == $tipe_barang) { |
|
| 117 | - echo ' selected'; |
|
| 118 | - } |
|
| 119 | - echo '>'.$row->tipe_barang.'</option>'; |
|
| 120 | - } |
|
| 121 | - } |
|
| 112 | + $query = mysql_query('SELECT * FROM tipe_barang ORDER BY id_tipe_barang'); |
|
| 113 | + if ($query && mysql_num_rows($query) > 0) { |
|
| 114 | + while ($row = mysql_fetch_object($query)) { |
|
| 115 | + echo '<option value="'.$row->id_tipe_barang.'"'; |
|
| 116 | + if ($row->id_tipe_barang == $tipe_barang) { |
|
| 117 | + echo ' selected'; |
|
| 118 | + } |
|
| 119 | + echo '>'.$row->tipe_barang.'</option>'; |
|
| 120 | + } |
|
| 121 | + } |
|
| 122 | 122 | ?> |
| 123 | 123 | </select> |
| 124 | 124 | </p> |
@@ -126,16 +126,16 @@ discard block |
||
| 126 | 126 | <p class="pull-right"> |
| 127 | 127 | <select name="ioutlet" class="form-control" onChange="document.myform.submit();"> |
| 128 | 128 | <?php |
| 129 | - $query = mysql_query('SELECT * FROM outlet ORDER BY id_outlet'); |
|
| 130 | - if ($query && mysql_num_rows($query) > 0) { |
|
| 131 | - while ($row = mysql_fetch_object($query)) { |
|
| 132 | - echo '<option value="'.$row->id_outlet.'"'; |
|
| 133 | - if ($row->id_outlet == $outlet) { |
|
| 134 | - echo ' selected'; |
|
| 135 | - } |
|
| 136 | - echo '>'.$row->outlet.'</option>'; |
|
| 137 | - } |
|
| 138 | - } |
|
| 129 | + $query = mysql_query('SELECT * FROM outlet ORDER BY id_outlet'); |
|
| 130 | + if ($query && mysql_num_rows($query) > 0) { |
|
| 131 | + while ($row = mysql_fetch_object($query)) { |
|
| 132 | + echo '<option value="'.$row->id_outlet.'"'; |
|
| 133 | + if ($row->id_outlet == $outlet) { |
|
| 134 | + echo ' selected'; |
|
| 135 | + } |
|
| 136 | + echo '>'.$row->outlet.'</option>'; |
|
| 137 | + } |
|
| 138 | + } |
|
| 139 | 139 | ?> |
| 140 | 140 | </select> |
| 141 | 141 | </p> |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | |
| 176 | 176 | <?php |
| 177 | 177 | |
| 178 | - $SQL = "SELECT b.jenis_barang |
|
| 178 | + $SQL = "SELECT b.jenis_barang |
|
| 179 | 179 | ,c.unit_barang |
| 180 | 180 | ,a.kode as kode_barang |
| 181 | 181 | ,a.id_barang |
@@ -208,15 +208,15 @@ discard block |
||
| 208 | 208 | ,d.harga_jual |
| 209 | 209 | ORDER BY a.id_jenis_barang,a.kode"; |
| 210 | 210 | |
| 211 | - $tampil = mysql_query($SQL); |
|
| 211 | + $tampil = mysql_query($SQL); |
|
| 212 | 212 | |
| 213 | - $no = 1; |
|
| 213 | + $no = 1; |
|
| 214 | 214 | |
| 215 | - while ($r = mysql_fetch_array($tampil)) { |
|
| 216 | - $id_barang = $r['id_barang']; |
|
| 217 | - $kode_barang = $r['kode_barang']; |
|
| 215 | + while ($r = mysql_fetch_array($tampil)) { |
|
| 216 | + $id_barang = $r['id_barang']; |
|
| 217 | + $kode_barang = $r['kode_barang']; |
|
| 218 | 218 | |
| 219 | - $dsql = mysql_query("SELECT sum(qty) as reserve
|
|
| 219 | + $dsql = mysql_query("SELECT sum(qty) as reserve
|
|
| 220 | 220 | FROM stok_reserved |
| 221 | 221 | WHERE id_barang_promosi = '$id_barang' |
| 222 | 222 | AND id_outlet = '$outlet' |
@@ -224,35 +224,35 @@ discard block |
||
| 224 | 224 | and prd = '$prd' |
| 225 | 225 | "); |
| 226 | 226 | |
| 227 | - $d = mysql_fetch_array($dsql); |
|
| 227 | + $d = mysql_fetch_array($dsql); |
|
| 228 | 228 | |
| 229 | - if ($d['reserve']) { |
|
| 230 | - $reserve = $d['reserve']; |
|
| 231 | - } else { |
|
| 232 | - $reserve = 0; |
|
| 233 | - } |
|
| 229 | + if ($d['reserve']) { |
|
| 230 | + $reserve = $d['reserve']; |
|
| 231 | + } else { |
|
| 232 | + $reserve = 0; |
|
| 233 | + } |
|
| 234 | 234 | |
| 235 | - $sisa_stok = $r['stok'] - $reserve; |
|
| 235 | + $sisa_stok = $r['stok'] - $reserve; |
|
| 236 | 236 | |
| 237 | - if ($sisa_stok == '0') { |
|
| 238 | - echo ''; |
|
| 239 | - } else { |
|
| 240 | - echo'<tr>'; |
|
| 241 | - echo" <td style='text-align:center;'>"; |
|
| 242 | - echo"<a href='../../modul/mod_$module/aksi_$module.php?module=$module&act=add&barcode=$kode_barang&prd=$prd¬rans=$notrans&kode=$kode&tanggal=$tanggal&customer=$customer&outlet=$outlet&id_outlet=$id_outlet&id_module=$id_module&look=1' title=''><span class='icon'><i class='fa fa-check'></i></span></a>"; |
|
| 237 | + if ($sisa_stok == '0') { |
|
| 238 | + echo ''; |
|
| 239 | + } else { |
|
| 240 | + echo'<tr>'; |
|
| 241 | + echo" <td style='text-align:center;'>"; |
|
| 242 | + echo"<a href='../../modul/mod_$module/aksi_$module.php?module=$module&act=add&barcode=$kode_barang&prd=$prd¬rans=$notrans&kode=$kode&tanggal=$tanggal&customer=$customer&outlet=$outlet&id_outlet=$id_outlet&id_module=$id_module&look=1' title=''><span class='icon'><i class='fa fa-check'></i></span></a>"; |
|
| 243 | 243 | |
| 244 | - echo'</td>'; |
|
| 245 | - echo'<td>'.$r['jenis_barang'].'</td>'; |
|
| 246 | - echo'<td>'.$r['kode_barang'].'</td>'; |
|
| 247 | - echo'<td>'.$r['barang'].'</td>'; |
|
| 248 | - echo'<td>'.$r['unit_barang'].'</td>'; |
|
| 249 | - echo"<td style='text-align:right;'>".number_format($r['harga_jual'], 0, '.', ',').'</td>'; |
|
| 244 | + echo'</td>'; |
|
| 245 | + echo'<td>'.$r['jenis_barang'].'</td>'; |
|
| 246 | + echo'<td>'.$r['kode_barang'].'</td>'; |
|
| 247 | + echo'<td>'.$r['barang'].'</td>'; |
|
| 248 | + echo'<td>'.$r['unit_barang'].'</td>'; |
|
| 249 | + echo"<td style='text-align:right;'>".number_format($r['harga_jual'], 0, '.', ',').'</td>'; |
|
| 250 | 250 | |
| 251 | - echo'</tr>'; |
|
| 252 | - } |
|
| 251 | + echo'</tr>'; |
|
| 252 | + } |
|
| 253 | 253 | |
| 254 | - $no++; |
|
| 255 | - } |
|
| 254 | + $no++; |
|
| 255 | + } |
|
| 256 | 256 | ?> |
| 257 | 257 | </tbody> |
| 258 | 258 | </table> |
@@ -146,49 +146,49 @@ discard block |
||
| 146 | 146 | |
| 147 | 147 | <?php |
| 148 | 148 | |
| 149 | - $gtampil = mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'"); |
|
| 149 | + $gtampil = mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'"); |
|
| 150 | 150 | |
| 151 | - $g = mysql_fetch_array($gtampil); |
|
| 151 | + $g = mysql_fetch_array($gtampil); |
|
| 152 | 152 | |
| 153 | - if ($g['pict']) { |
|
| 154 | - $pict = $g['pict']; |
|
| 155 | - } else { |
|
| 156 | - $pict = ''; |
|
| 157 | - } |
|
| 153 | + if ($g['pict']) { |
|
| 154 | + $pict = $g['pict']; |
|
| 155 | + } else { |
|
| 156 | + $pict = ''; |
|
| 157 | + } |
|
| 158 | 158 | |
| 159 | - $company = ucwords($g['company']); |
|
| 159 | + $company = ucwords($g['company']); |
|
| 160 | 160 | |
| 161 | - $jsql = mysql_query("SELECT * FROM jenis_transaksi
|
|
| 161 | + $jsql = mysql_query("SELECT * FROM jenis_transaksi
|
|
| 162 | 162 | WHERE id_jenis_transaksi = '$jenis_transaksi' |
| 163 | 163 | |
| 164 | 164 | "); |
| 165 | 165 | |
| 166 | - $j = mysql_fetch_array($jsql); |
|
| 166 | + $j = mysql_fetch_array($jsql); |
|
| 167 | 167 | |
| 168 | - $jenis_transaksi = $j['jenis_transaksi']; |
|
| 168 | + $jenis_transaksi = $j['jenis_transaksi']; |
|
| 169 | 169 | |
| 170 | - $sql = mysql_query("SELECT a.*,b.shift FROM kasir a LEFT JOIN shift b
|
|
| 170 | + $sql = mysql_query("SELECT a.*,b.shift FROM kasir a LEFT JOIN shift b
|
|
| 171 | 171 | ON a.id_shift = b.id_shift |
| 172 | 172 | WHERE a.id_kasir = '$k_ID' |
| 173 | 173 | |
| 174 | 174 | "); |
| 175 | 175 | |
| 176 | - $r = mysql_fetch_array($sql); |
|
| 176 | + $r = mysql_fetch_array($sql); |
|
| 177 | 177 | |
| 178 | - $penjualan_barang = $r['id_kasir']; |
|
| 178 | + $penjualan_barang = $r['id_kasir']; |
|
| 179 | 179 | |
| 180 | - $shift = $r['shift']; |
|
| 180 | + $shift = $r['shift']; |
|
| 181 | 181 | |
| 182 | - $petugas = $r['petugas']; |
|
| 182 | + $petugas = $r['petugas']; |
|
| 183 | 183 | |
| 184 | - $status = $r['status']; |
|
| 184 | + $status = $r['status']; |
|
| 185 | 185 | |
| 186 | - $tanggal = date('d/m/Y', strtotime($r['tanggal'])); |
|
| 186 | + $tanggal = date('d/m/Y', strtotime($r['tanggal'])); |
|
| 187 | 187 | |
| 188 | - ?> |
|
| 188 | + ?> |
|
| 189 | 189 | |
| 190 | 190 | <?php if ($tipe == 'R') { |
| 191 | - ?> |
|
| 191 | + ?> |
|
| 192 | 192 | |
| 193 | 193 | |
| 194 | 194 | <table width="100%"> |
@@ -214,14 +214,14 @@ discard block |
||
| 214 | 214 | <?php |
| 215 | 215 | $htampil = mysql_query("SELECT * FROM jenis_transaksi where aktif = 'Y' ORDER BY id_jenis_transaksi"); |
| 216 | 216 | |
| 217 | - $hjml = mysql_num_rows($htampil); |
|
| 217 | + $hjml = mysql_num_rows($htampil); |
|
| 218 | 218 | |
| 219 | - while ($h = mysql_fetch_array($htampil)) { |
|
| 220 | - echo '<tr>'; |
|
| 221 | - echo '<td>'.$h['jenis_transaksi'].'</td>'; |
|
| 219 | + while ($h = mysql_fetch_array($htampil)) { |
|
| 220 | + echo '<tr>'; |
|
| 221 | + echo '<td>'.$h['jenis_transaksi'].'</td>'; |
|
| 222 | 222 | |
| 223 | - //transaksi umum tunai |
|
| 224 | - $dtampil = mysql_query("SELECT COUNT(c.jumlah) as jml
|
|
| 223 | + //transaksi umum tunai |
|
| 224 | + $dtampil = mysql_query("SELECT COUNT(c.jumlah) as jml
|
|
| 225 | 225 | , IFNULL(SUM(c.jumlah),0) as rp |
| 226 | 226 | FROM kasir b LEFT JOIN kasir_detail c |
| 227 | 227 | ON b.id_kasir = c.id_kasir |
@@ -230,13 +230,13 @@ discard block |
||
| 230 | 230 | AND c.id_jenis_transaksi = '".$h['id_jenis_transaksi']."' |
| 231 | 231 | AND b.status != '4'"); |
| 232 | 232 | |
| 233 | - $d = mysql_fetch_array($dtampil); |
|
| 233 | + $d = mysql_fetch_array($dtampil); |
|
| 234 | 234 | |
| 235 | - echo '<th>'.$d['jml'].'</th>'; |
|
| 236 | - echo "<th style='text-align:right;'>".number_format($d['rp'], 0, '.', ',').'</th>'; |
|
| 235 | + echo '<th>'.$d['jml'].'</th>'; |
|
| 236 | + echo "<th style='text-align:right;'>".number_format($d['rp'], 0, '.', ',').'</th>'; |
|
| 237 | 237 | |
| 238 | - echo '</tr>'; |
|
| 239 | - } ?> |
|
| 238 | + echo '</tr>'; |
|
| 239 | + } ?> |
|
| 240 | 240 | |
| 241 | 241 | |
| 242 | 242 | <tr> |
@@ -250,10 +250,10 @@ discard block |
||
| 250 | 250 | WHERE b.tanggal like '$prd%' |
| 251 | 251 | AND b.status != '4'"); |
| 252 | 252 | |
| 253 | - $d = mysql_fetch_array($dtampil); |
|
| 253 | + $d = mysql_fetch_array($dtampil); |
|
| 254 | 254 | |
| 255 | - echo '<th>'.$d['jml'].'</th>'; |
|
| 256 | - echo "<th style='text-align:right;'>".number_format($d['rp'], 0, '.', ',').'</th>'; ?> |
|
| 255 | + echo '<th>'.$d['jml'].'</th>'; |
|
| 256 | + echo "<th style='text-align:right;'>".number_format($d['rp'], 0, '.', ',').'</th>'; ?> |
|
| 257 | 257 | |
| 258 | 258 | </tr> |
| 259 | 259 | |
@@ -291,8 +291,8 @@ discard block |
||
| 291 | 291 | |
| 292 | 292 | |
| 293 | 293 | <?php |
| 294 | - } else { |
|
| 295 | - ?> |
|
| 294 | + } else { |
|
| 295 | + ?> |
|
| 296 | 296 | |
| 297 | 297 | <table width="100%"> |
| 298 | 298 | <tr> |
@@ -323,11 +323,11 @@ discard block |
||
| 323 | 323 | |
| 324 | 324 | $htampil = mysql_query("SELECT * FROM penjamin where aktif = 'Y' ORDER BY id_penjamin"); |
| 325 | 325 | |
| 326 | - $hjml = mysql_num_rows($htampil); |
|
| 326 | + $hjml = mysql_num_rows($htampil); |
|
| 327 | 327 | |
| 328 | - while ($h = mysql_fetch_array($htampil)) { |
|
| 329 | - echo "<th colspan='2' rowspan='2'>".$h['penjamin'].'</th>'; |
|
| 330 | - } ?> |
|
| 328 | + while ($h = mysql_fetch_array($htampil)) { |
|
| 329 | + echo "<th colspan='2' rowspan='2'>".$h['penjamin'].'</th>'; |
|
| 330 | + } ?> |
|
| 331 | 331 | |
| 332 | 332 | <th colspan ="4" >UMUM</th> |
| 333 | 333 | <th colspan ="2" rowspan='2'>TOTAL</th> |
@@ -367,15 +367,15 @@ discard block |
||
| 367 | 367 | |
| 368 | 368 | $htampil = mysql_query("SELECT * FROM jenis_transaksi where aktif = 'Y' ORDER BY id_jenis_transaksi"); |
| 369 | 369 | |
| 370 | - $hjml = mysql_num_rows($htampil); |
|
| 370 | + $hjml = mysql_num_rows($htampil); |
|
| 371 | 371 | |
| 372 | - while ($h = mysql_fetch_array($htampil)) { |
|
| 373 | - echo'<tr>'; |
|
| 372 | + while ($h = mysql_fetch_array($htampil)) { |
|
| 373 | + echo'<tr>'; |
|
| 374 | 374 | |
| 375 | - echo'<td>'.$h['jenis_transaksi'].'</td>'; |
|
| 375 | + echo'<td>'.$h['jenis_transaksi'].'</td>'; |
|
| 376 | 376 | |
| 377 | - //transaksi asuransi |
|
| 378 | - $dtampil1 = mysql_query("SELECT a.id_penjamin
|
|
| 377 | + //transaksi asuransi |
|
| 378 | + $dtampil1 = mysql_query("SELECT a.id_penjamin
|
|
| 379 | 379 | , COUNT(c.jumlah) as jml |
| 380 | 380 | , IFNULL(SUM(c.jumlah),0) as rp |
| 381 | 381 | FROM penjamin a LEFT JOIN kasir b |
@@ -391,12 +391,12 @@ discard block |
||
| 391 | 391 | GROUP BY a.id_penjamin |
| 392 | 392 | ORDER BY a.id_penjamin"); |
| 393 | 393 | |
| 394 | - while ($d1 = mysql_fetch_array($dtampil1)) { |
|
| 395 | - echo "<td style='text-align:center;'>".$d1['jml'].'</td>'; |
|
| 396 | - echo "<td style='text-align:right;'>".number_format($d1['rp'], 0, '.', ',').'</td>'; |
|
| 397 | - } |
|
| 394 | + while ($d1 = mysql_fetch_array($dtampil1)) { |
|
| 395 | + echo "<td style='text-align:center;'>".$d1['jml'].'</td>'; |
|
| 396 | + echo "<td style='text-align:right;'>".number_format($d1['rp'], 0, '.', ',').'</td>'; |
|
| 397 | + } |
|
| 398 | 398 | |
| 399 | - $dtampil2 = mysql_query("SELECT COUNT(c.jumlah) as jml
|
|
| 399 | + $dtampil2 = mysql_query("SELECT COUNT(c.jumlah) as jml
|
|
| 400 | 400 | , IFNULL(SUM(c.jumlah),0) as rp |
| 401 | 401 | FROM kasir b LEFT JOIN kasir_detail c |
| 402 | 402 | ON b.id_kasir = c.id_kasir |
@@ -406,12 +406,12 @@ discard block |
||
| 406 | 406 | AND c.id_jenis_transaksi = '".$h['id_jenis_transaksi']."' |
| 407 | 407 | AND b.status != '4'"); |
| 408 | 408 | |
| 409 | - $d2 = mysql_fetch_array($dtampil2); |
|
| 409 | + $d2 = mysql_fetch_array($dtampil2); |
|
| 410 | 410 | |
| 411 | - echo "<td style='text-align:center;'>".$d2['jml'].'</td>'; |
|
| 412 | - echo "<td style='text-align:right;'>".number_format($d2['rp'], 0, '.', ',').'</td>'; |
|
| 411 | + echo "<td style='text-align:center;'>".$d2['jml'].'</td>'; |
|
| 412 | + echo "<td style='text-align:right;'>".number_format($d2['rp'], 0, '.', ',').'</td>'; |
|
| 413 | 413 | |
| 414 | - $dtampil3 = mysql_query("SELECT COUNT(c.jumlah) as jml
|
|
| 414 | + $dtampil3 = mysql_query("SELECT COUNT(c.jumlah) as jml
|
|
| 415 | 415 | , IFNULL(SUM(c.jumlah),0) as rp |
| 416 | 416 | FROM kasir b LEFT JOIN kasir_detail c |
| 417 | 417 | ON b.id_kasir = c.id_kasir |
@@ -421,12 +421,12 @@ discard block |
||
| 421 | 421 | AND c.id_jenis_transaksi = '".$h['id_jenis_transaksi']."' |
| 422 | 422 | AND b.status != '4'"); |
| 423 | 423 | |
| 424 | - $d3 = mysql_fetch_array($dtampil3); |
|
| 424 | + $d3 = mysql_fetch_array($dtampil3); |
|
| 425 | 425 | |
| 426 | - echo "<td style='text-align:center;'>".$d3['jml'].'</td>'; |
|
| 427 | - echo "<td style='text-align:right;'>".number_format($d3['rp'], 0, '.', ',').'</td>'; |
|
| 426 | + echo "<td style='text-align:center;'>".$d3['jml'].'</td>'; |
|
| 427 | + echo "<td style='text-align:right;'>".number_format($d3['rp'], 0, '.', ',').'</td>'; |
|
| 428 | 428 | |
| 429 | - $dtampil = mysql_query("SELECT COUNT(c.jumlah) as jml
|
|
| 429 | + $dtampil = mysql_query("SELECT COUNT(c.jumlah) as jml
|
|
| 430 | 430 | , IFNULL(SUM(c.jumlah),0) as rp |
| 431 | 431 | FROM kasir b LEFT JOIN kasir_detail c |
| 432 | 432 | ON b.id_kasir = c.id_kasir |
@@ -435,13 +435,13 @@ discard block |
||
| 435 | 435 | AND c.id_jenis_transaksi = '".$h['id_jenis_transaksi']."' |
| 436 | 436 | AND b.status != '4'"); |
| 437 | 437 | |
| 438 | - $d = mysql_fetch_array($dtampil); |
|
| 438 | + $d = mysql_fetch_array($dtampil); |
|
| 439 | 439 | |
| 440 | - echo "<td style='text-align:center;'>".$d['jml'].'</td>'; |
|
| 441 | - echo "<td style='text-align:right;'>".number_format($d['rp'], 0, '.', ',').'</td>'; |
|
| 440 | + echo "<td style='text-align:center;'>".$d['jml'].'</td>'; |
|
| 441 | + echo "<td style='text-align:right;'>".number_format($d['rp'], 0, '.', ',').'</td>'; |
|
| 442 | 442 | |
| 443 | - echo'</tr>'; |
|
| 444 | - } ?> |
|
| 443 | + echo'</tr>'; |
|
| 444 | + } ?> |
|
| 445 | 445 | |
| 446 | 446 | </tbody> |
| 447 | 447 | |
@@ -449,12 +449,12 @@ discard block |
||
| 449 | 449 | |
| 450 | 450 | <?php |
| 451 | 451 | |
| 452 | - echo'<tr>'; |
|
| 452 | + echo'<tr>'; |
|
| 453 | 453 | |
| 454 | - echo'<th>TOTAL</th>'; |
|
| 454 | + echo'<th>TOTAL</th>'; |
|
| 455 | 455 | |
| 456 | - //transaksi asuransi |
|
| 457 | - $dtampil1 = mysql_query("SELECT a.id_penjamin
|
|
| 456 | + //transaksi asuransi |
|
| 457 | + $dtampil1 = mysql_query("SELECT a.id_penjamin
|
|
| 458 | 458 | , COUNT(c.jumlah) as jml |
| 459 | 459 | , IFNULL(SUM(c.jumlah),0) as rp |
| 460 | 460 | FROM penjamin a LEFT JOIN kasir b |
@@ -469,12 +469,12 @@ discard block |
||
| 469 | 469 | GROUP BY a.id_penjamin |
| 470 | 470 | ORDER BY a.id_penjamin"); |
| 471 | 471 | |
| 472 | - while ($d1 = mysql_fetch_array($dtampil1)) { |
|
| 473 | - echo '<th>'.$d1['jml'].'</th>'; |
|
| 474 | - echo "<th style='text-align:right;'>".number_format($d1['rp'], 0, '.', ',').'</th>'; |
|
| 475 | - } |
|
| 472 | + while ($d1 = mysql_fetch_array($dtampil1)) { |
|
| 473 | + echo '<th>'.$d1['jml'].'</th>'; |
|
| 474 | + echo "<th style='text-align:right;'>".number_format($d1['rp'], 0, '.', ',').'</th>'; |
|
| 475 | + } |
|
| 476 | 476 | |
| 477 | - $dtampil2 = mysql_query("SELECT COUNT(c.jumlah) as jml
|
|
| 477 | + $dtampil2 = mysql_query("SELECT COUNT(c.jumlah) as jml
|
|
| 478 | 478 | , IFNULL(SUM(c.jumlah),0) as rp |
| 479 | 479 | FROM kasir b LEFT JOIN kasir_detail c |
| 480 | 480 | ON b.id_kasir = c.id_kasir |
@@ -483,12 +483,12 @@ discard block |
||
| 483 | 483 | WHERE b.tanggal LIKE '$prd%' |
| 484 | 484 | AND b.status != '4'"); |
| 485 | 485 | |
| 486 | - $d2 = mysql_fetch_array($dtampil2); |
|
| 486 | + $d2 = mysql_fetch_array($dtampil2); |
|
| 487 | 487 | |
| 488 | - echo '<th>'.$d2['jml'].'</th>'; |
|
| 489 | - echo "<th style='text-align:right;'>".number_format($d2['rp'], 0, '.', ',').'</th>'; |
|
| 488 | + echo '<th>'.$d2['jml'].'</th>'; |
|
| 489 | + echo "<th style='text-align:right;'>".number_format($d2['rp'], 0, '.', ',').'</th>'; |
|
| 490 | 490 | |
| 491 | - $dtampil3 = mysql_query("SELECT COUNT(c.jumlah) as jml
|
|
| 491 | + $dtampil3 = mysql_query("SELECT COUNT(c.jumlah) as jml
|
|
| 492 | 492 | , IFNULL(SUM(c.jumlah),0) as rp |
| 493 | 493 | FROM kasir b LEFT JOIN kasir_detail c |
| 494 | 494 | ON b.id_kasir = c.id_kasir |
@@ -497,12 +497,12 @@ discard block |
||
| 497 | 497 | WHERE b.tanggal LIKE '$prd%' |
| 498 | 498 | AND b.status != '4'"); |
| 499 | 499 | |
| 500 | - $d3 = mysql_fetch_array($dtampil3); |
|
| 500 | + $d3 = mysql_fetch_array($dtampil3); |
|
| 501 | 501 | |
| 502 | - echo '<th>'.$d3['jml'].'</th>'; |
|
| 503 | - echo "<th style='text-align:right;'>".number_format($d3['rp'], 0, '.', ',').'</th>'; |
|
| 502 | + echo '<th>'.$d3['jml'].'</th>'; |
|
| 503 | + echo "<th style='text-align:right;'>".number_format($d3['rp'], 0, '.', ',').'</th>'; |
|
| 504 | 504 | |
| 505 | - $dtampil = mysql_query("SELECT COUNT(c.jumlah) as jml
|
|
| 505 | + $dtampil = mysql_query("SELECT COUNT(c.jumlah) as jml
|
|
| 506 | 506 | , IFNULL(SUM(c.jumlah),0) as rp |
| 507 | 507 | FROM kasir b LEFT JOIN kasir_detail c |
| 508 | 508 | ON b.id_kasir = c.id_kasir |
@@ -510,12 +510,12 @@ discard block |
||
| 510 | 510 | WHERE b.tanggal like '$prd%' |
| 511 | 511 | AND b.status != '4'"); |
| 512 | 512 | |
| 513 | - $d = mysql_fetch_array($dtampil); |
|
| 513 | + $d = mysql_fetch_array($dtampil); |
|
| 514 | 514 | |
| 515 | - echo '<th>'.$d['jml'].'</th>'; |
|
| 516 | - echo "<th style='text-align:right;'>".number_format($d['rp'], 0, '.', ',').'</th>'; |
|
| 515 | + echo '<th>'.$d['jml'].'</th>'; |
|
| 516 | + echo "<th style='text-align:right;'>".number_format($d['rp'], 0, '.', ',').'</th>'; |
|
| 517 | 517 | |
| 518 | - echo'</tr>'; ?> |
|
| 518 | + echo'</tr>'; ?> |
|
| 519 | 519 | |
| 520 | 520 | |
| 521 | 521 | |
@@ -529,17 +529,17 @@ discard block |
||
| 529 | 529 | |
| 530 | 530 | $lastday = date('t', strtotime($iprd)); |
| 531 | 531 | |
| 532 | - $year = date('Y', strtotime($iprd)); |
|
| 532 | + $year = date('Y', strtotime($iprd)); |
|
| 533 | 533 | |
| 534 | - $month = date('m', strtotime($iprd)) * 1; |
|
| 534 | + $month = date('m', strtotime($iprd)) * 1; |
|
| 535 | 535 | |
| 536 | - if ($month == '1') { |
|
| 537 | - $imonth = 12; |
|
| 538 | - } else { |
|
| 539 | - $imonth = $month - 1; |
|
| 540 | - } |
|
| 536 | + if ($month == '1') { |
|
| 537 | + $imonth = 12; |
|
| 538 | + } else { |
|
| 539 | + $imonth = $month - 1; |
|
| 540 | + } |
|
| 541 | 541 | |
| 542 | - $nprd = $lastday.' '.getBulan1($imonth).' '.$year; ?> |
|
| 542 | + $nprd = $lastday.' '.getBulan1($imonth).' '.$year; ?> |
|
| 543 | 543 | |
| 544 | 544 | <table width="100%"> |
| 545 | 545 | <tr> |
@@ -570,7 +570,7 @@ discard block |
||
| 570 | 570 | |
| 571 | 571 | |
| 572 | 572 | <?php |
| 573 | - } ?> |
|
| 573 | + } ?> |
|
| 574 | 574 | |
| 575 | 575 | |
| 576 | 576 | |
@@ -244,50 +244,50 @@ discard block |
||
| 244 | 244 | |
| 245 | 245 | <?php |
| 246 | 246 | |
| 247 | - $gtampil = mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'"); |
|
| 247 | + $gtampil = mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'"); |
|
| 248 | 248 | |
| 249 | - $g = mysql_fetch_array($gtampil); |
|
| 249 | + $g = mysql_fetch_array($gtampil); |
|
| 250 | 250 | |
| 251 | - if ($g['pict']) { |
|
| 252 | - $pict = $g['pict']; |
|
| 253 | - } else { |
|
| 254 | - $pict = ''; |
|
| 255 | - } |
|
| 251 | + if ($g['pict']) { |
|
| 252 | + $pict = $g['pict']; |
|
| 253 | + } else { |
|
| 254 | + $pict = ''; |
|
| 255 | + } |
|
| 256 | 256 | |
| 257 | - $company = ucwords($g['company']); |
|
| 257 | + $company = ucwords($g['company']); |
|
| 258 | 258 | |
| 259 | - $jsql = mysql_query("SELECT * FROM jenis_transaksi
|
|
| 259 | + $jsql = mysql_query("SELECT * FROM jenis_transaksi
|
|
| 260 | 260 | WHERE id_jenis_transaksi = '$jenis_transaksi' |
| 261 | 261 | |
| 262 | 262 | |
| 263 | 263 | "); |
| 264 | 264 | |
| 265 | - $j = mysql_fetch_array($jsql); |
|
| 265 | + $j = mysql_fetch_array($jsql); |
|
| 266 | 266 | |
| 267 | - $jenis_transaksi = $j['jenis_transaksi']; |
|
| 267 | + $jenis_transaksi = $j['jenis_transaksi']; |
|
| 268 | 268 | |
| 269 | - $sql = mysql_query("SELECT a.*,b.shift FROM kasir a LEFT JOIN shift b
|
|
| 269 | + $sql = mysql_query("SELECT a.*,b.shift FROM kasir a LEFT JOIN shift b
|
|
| 270 | 270 | ON a.id_shift = b.id_shift |
| 271 | 271 | WHERE a.id_kasir = '$k_ID' |
| 272 | 272 | |
| 273 | 273 | "); |
| 274 | 274 | |
| 275 | - $r = mysql_fetch_array($sql); |
|
| 275 | + $r = mysql_fetch_array($sql); |
|
| 276 | 276 | |
| 277 | - $penjualan_barang = $r['id_kasir']; |
|
| 277 | + $penjualan_barang = $r['id_kasir']; |
|
| 278 | 278 | |
| 279 | - $shift = $r['shift']; |
|
| 279 | + $shift = $r['shift']; |
|
| 280 | 280 | |
| 281 | - $petugas = $r['petugas']; |
|
| 281 | + $petugas = $r['petugas']; |
|
| 282 | 282 | |
| 283 | - $status = $r['status']; |
|
| 283 | + $status = $r['status']; |
|
| 284 | 284 | |
| 285 | - $tanggal = date('d/m/Y', strtotime($r['tanggal'])); |
|
| 285 | + $tanggal = date('d/m/Y', strtotime($r['tanggal'])); |
|
| 286 | 286 | |
| 287 | - ?> |
|
| 287 | + ?> |
|
| 288 | 288 | |
| 289 | 289 | <?php if ($tipe == 'R') { |
| 290 | - ?> |
|
| 290 | + ?> |
|
| 291 | 291 | |
| 292 | 292 | |
| 293 | 293 | <table width="100%"> |
@@ -314,14 +314,14 @@ discard block |
||
| 314 | 314 | <?php |
| 315 | 315 | $htampil = mysql_query("SELECT * FROM jenis_transaksi where aktif = 'Y' AND id_jenis_transaksi != '6' ORDER BY id_jenis_transaksi"); |
| 316 | 316 | |
| 317 | - $hjml = mysql_num_rows($htampil); |
|
| 317 | + $hjml = mysql_num_rows($htampil); |
|
| 318 | 318 | |
| 319 | - while ($h = mysql_fetch_array($htampil)) { |
|
| 320 | - echo '<tr>'; |
|
| 321 | - echo '<td>'.$h['jenis_transaksi'].'</td>'; |
|
| 319 | + while ($h = mysql_fetch_array($htampil)) { |
|
| 320 | + echo '<tr>'; |
|
| 321 | + echo '<td>'.$h['jenis_transaksi'].'</td>'; |
|
| 322 | 322 | |
| 323 | - //transaksi umum tunai |
|
| 324 | - $dtampil = mysql_query("SELECT COUNT(c.jumlah) as jml
|
|
| 323 | + //transaksi umum tunai |
|
| 324 | + $dtampil = mysql_query("SELECT COUNT(c.jumlah) as jml
|
|
| 325 | 325 | , IFNULL(SUM(c.jumlah),0) as rp |
| 326 | 326 | FROM kasir b LEFT JOIN kasir_detail c |
| 327 | 327 | ON b.id_kasir = c.id_kasir |
@@ -330,13 +330,13 @@ discard block |
||
| 330 | 330 | AND c.id_jenis_transaksi = '".$h['id_jenis_transaksi']."' |
| 331 | 331 | AND b.status != '4'"); |
| 332 | 332 | |
| 333 | - $d = mysql_fetch_array($dtampil); |
|
| 333 | + $d = mysql_fetch_array($dtampil); |
|
| 334 | 334 | |
| 335 | - echo '<th>'.$d['jml'].'</th>'; |
|
| 336 | - echo "<th style='text-align:right;'>".number_format($d['rp'], 0, '.', ',').'</th>'; |
|
| 335 | + echo '<th>'.$d['jml'].'</th>'; |
|
| 336 | + echo "<th style='text-align:right;'>".number_format($d['rp'], 0, '.', ',').'</th>'; |
|
| 337 | 337 | |
| 338 | - echo '</tr>'; |
|
| 339 | - } ?> |
|
| 338 | + echo '</tr>'; |
|
| 339 | + } ?> |
|
| 340 | 340 | |
| 341 | 341 | </tbody> |
| 342 | 342 | |
@@ -351,10 +351,10 @@ discard block |
||
| 351 | 351 | WHERE b.tanggal like '$prd%' |
| 352 | 352 | AND b.status != '4'"); |
| 353 | 353 | |
| 354 | - $d = mysql_fetch_array($dtampil); |
|
| 354 | + $d = mysql_fetch_array($dtampil); |
|
| 355 | 355 | |
| 356 | - echo '<th>'.$d['jml'].'</th>'; |
|
| 357 | - echo "<th style='text-align:right;'>".number_format($d['rp'], 0, '.', ',').'</th>'; ?> |
|
| 356 | + echo '<th>'.$d['jml'].'</th>'; |
|
| 357 | + echo "<th style='text-align:right;'>".number_format($d['rp'], 0, '.', ',').'</th>'; ?> |
|
| 358 | 358 | |
| 359 | 359 | </tr> |
| 360 | 360 | |
@@ -382,8 +382,8 @@ discard block |
||
| 382 | 382 | |
| 383 | 383 | |
| 384 | 384 | <?php |
| 385 | - } else { |
|
| 386 | - ?> |
|
| 385 | + } else { |
|
| 386 | + ?> |
|
| 387 | 387 | |
| 388 | 388 | <table width="100%"> |
| 389 | 389 | <tr> |
@@ -404,11 +404,11 @@ discard block |
||
| 404 | 404 | |
| 405 | 405 | $htampil = mysql_query("SELECT * FROM penjamin where aktif = 'Y' ORDER BY id_penjamin"); |
| 406 | 406 | |
| 407 | - $hjml = mysql_num_rows($htampil); |
|
| 407 | + $hjml = mysql_num_rows($htampil); |
|
| 408 | 408 | |
| 409 | - while ($h = mysql_fetch_array($htampil)) { |
|
| 410 | - echo "<th colspan='2' rowspan='2'>".$h['penjamin'].'</th>'; |
|
| 411 | - } ?> |
|
| 409 | + while ($h = mysql_fetch_array($htampil)) { |
|
| 410 | + echo "<th colspan='2' rowspan='2'>".$h['penjamin'].'</th>'; |
|
| 411 | + } ?> |
|
| 412 | 412 | |
| 413 | 413 | <th colspan ="4" >UMUM</th> |
| 414 | 414 | <th colspan ="2" rowspan='2'>TOTAL</th> |
@@ -425,10 +425,10 @@ discard block |
||
| 425 | 425 | |
| 426 | 426 | |
| 427 | 427 | <?php |
| 428 | - for ($j = 1; $j <= $hjml; $j++) { |
|
| 429 | - echo '<th>KUNJ</th>'; |
|
| 430 | - echo '<th>REV</th>'; |
|
| 431 | - } ?> |
|
| 428 | + for ($j = 1; $j <= $hjml; $j++) { |
|
| 429 | + echo '<th>KUNJ</th>'; |
|
| 430 | + echo '<th>REV</th>'; |
|
| 431 | + } ?> |
|
| 432 | 432 | |
| 433 | 433 | |
| 434 | 434 | <th>KUNJ</th> |
@@ -448,15 +448,15 @@ discard block |
||
| 448 | 448 | |
| 449 | 449 | $htampil = mysql_query("SELECT * FROM jenis_transaksi where aktif = 'Y' ORDER BY id_jenis_transaksi"); |
| 450 | 450 | |
| 451 | - $hjml = mysql_num_rows($htampil); |
|
| 451 | + $hjml = mysql_num_rows($htampil); |
|
| 452 | 452 | |
| 453 | - while ($h = mysql_fetch_array($htampil)) { |
|
| 454 | - echo'<tr>'; |
|
| 453 | + while ($h = mysql_fetch_array($htampil)) { |
|
| 454 | + echo'<tr>'; |
|
| 455 | 455 | |
| 456 | - echo'<td>'.$h['jenis_transaksi'].'</td>'; |
|
| 456 | + echo'<td>'.$h['jenis_transaksi'].'</td>'; |
|
| 457 | 457 | |
| 458 | - //transaksi asuransi |
|
| 459 | - $dtampil1 = mysql_query("SELECT a.id_penjamin
|
|
| 458 | + //transaksi asuransi |
|
| 459 | + $dtampil1 = mysql_query("SELECT a.id_penjamin
|
|
| 460 | 460 | , COUNT(c.jumlah) as jml |
| 461 | 461 | , IFNULL(SUM(c.jumlah),0) as rp |
| 462 | 462 | FROM penjamin a LEFT JOIN kasir b |
@@ -472,12 +472,12 @@ discard block |
||
| 472 | 472 | GROUP BY a.id_penjamin |
| 473 | 473 | ORDER BY a.id_penjamin"); |
| 474 | 474 | |
| 475 | - while ($d1 = mysql_fetch_array($dtampil1)) { |
|
| 476 | - echo "<td style='text-align:center;'>".$d1['jml'].'</td>'; |
|
| 477 | - echo "<td style='text-align:right;'>".number_format($d1['rp'], 0, '.', ',').'</td>'; |
|
| 478 | - } |
|
| 475 | + while ($d1 = mysql_fetch_array($dtampil1)) { |
|
| 476 | + echo "<td style='text-align:center;'>".$d1['jml'].'</td>'; |
|
| 477 | + echo "<td style='text-align:right;'>".number_format($d1['rp'], 0, '.', ',').'</td>'; |
|
| 478 | + } |
|
| 479 | 479 | |
| 480 | - $dtampil2 = mysql_query("SELECT COUNT(c.jumlah) as jml
|
|
| 480 | + $dtampil2 = mysql_query("SELECT COUNT(c.jumlah) as jml
|
|
| 481 | 481 | , IFNULL(SUM(c.jumlah),0) as rp |
| 482 | 482 | FROM kasir b LEFT JOIN kasir_detail c |
| 483 | 483 | ON b.id_kasir = c.id_kasir |
@@ -487,12 +487,12 @@ discard block |
||
| 487 | 487 | AND c.id_jenis_transaksi = '".$h['id_jenis_transaksi']."' |
| 488 | 488 | AND b.status != '4'"); |
| 489 | 489 | |
| 490 | - $d2 = mysql_fetch_array($dtampil2); |
|
| 490 | + $d2 = mysql_fetch_array($dtampil2); |
|
| 491 | 491 | |
| 492 | - echo "<td style='text-align:center;'>".$d2['jml'].'</td>'; |
|
| 493 | - echo "<td style='text-align:right;'>".number_format($d2['rp'], 0, '.', ',').'</td>'; |
|
| 492 | + echo "<td style='text-align:center;'>".$d2['jml'].'</td>'; |
|
| 493 | + echo "<td style='text-align:right;'>".number_format($d2['rp'], 0, '.', ',').'</td>'; |
|
| 494 | 494 | |
| 495 | - $dtampil3 = mysql_query("SELECT COUNT(c.jumlah) as jml
|
|
| 495 | + $dtampil3 = mysql_query("SELECT COUNT(c.jumlah) as jml
|
|
| 496 | 496 | , IFNULL(SUM(c.jumlah),0) as rp |
| 497 | 497 | FROM kasir b LEFT JOIN kasir_detail c |
| 498 | 498 | ON b.id_kasir = c.id_kasir |
@@ -502,12 +502,12 @@ discard block |
||
| 502 | 502 | AND c.id_jenis_transaksi = '".$h['id_jenis_transaksi']."' |
| 503 | 503 | AND b.status != '4'"); |
| 504 | 504 | |
| 505 | - $d3 = mysql_fetch_array($dtampil3); |
|
| 505 | + $d3 = mysql_fetch_array($dtampil3); |
|
| 506 | 506 | |
| 507 | - echo "<td style='text-align:center;'>".$d3['jml'].'</td>'; |
|
| 508 | - echo "<td style='text-align:right;'>".number_format($d3['rp'], 0, '.', ',').'</td>'; |
|
| 507 | + echo "<td style='text-align:center;'>".$d3['jml'].'</td>'; |
|
| 508 | + echo "<td style='text-align:right;'>".number_format($d3['rp'], 0, '.', ',').'</td>'; |
|
| 509 | 509 | |
| 510 | - $dtampil = mysql_query("SELECT COUNT(c.jumlah) as jml
|
|
| 510 | + $dtampil = mysql_query("SELECT COUNT(c.jumlah) as jml
|
|
| 511 | 511 | , IFNULL(SUM(c.jumlah),0) as rp |
| 512 | 512 | FROM kasir b LEFT JOIN kasir_detail c |
| 513 | 513 | ON b.id_kasir = c.id_kasir |
@@ -516,13 +516,13 @@ discard block |
||
| 516 | 516 | AND c.id_jenis_transaksi = '".$h['id_jenis_transaksi']."' |
| 517 | 517 | AND b.status != '4'"); |
| 518 | 518 | |
| 519 | - $d = mysql_fetch_array($dtampil); |
|
| 519 | + $d = mysql_fetch_array($dtampil); |
|
| 520 | 520 | |
| 521 | - echo "<td style='text-align:center;'>".$d['jml'].'</td>'; |
|
| 522 | - echo "<td style='text-align:right;'>".number_format($d['rp'], 0, '.', ',').'</td>'; |
|
| 521 | + echo "<td style='text-align:center;'>".$d['jml'].'</td>'; |
|
| 522 | + echo "<td style='text-align:right;'>".number_format($d['rp'], 0, '.', ',').'</td>'; |
|
| 523 | 523 | |
| 524 | - echo'</tr>'; |
|
| 525 | - } ?> |
|
| 524 | + echo'</tr>'; |
|
| 525 | + } ?> |
|
| 526 | 526 | |
| 527 | 527 | </tbody> |
| 528 | 528 | |
@@ -530,12 +530,12 @@ discard block |
||
| 530 | 530 | |
| 531 | 531 | <?php |
| 532 | 532 | |
| 533 | - echo'<tr>'; |
|
| 533 | + echo'<tr>'; |
|
| 534 | 534 | |
| 535 | - echo'<th>TOTAL</th>'; |
|
| 535 | + echo'<th>TOTAL</th>'; |
|
| 536 | 536 | |
| 537 | - //transaksi asuransi |
|
| 538 | - $dtampil1 = mysql_query("SELECT a.id_penjamin
|
|
| 537 | + //transaksi asuransi |
|
| 538 | + $dtampil1 = mysql_query("SELECT a.id_penjamin
|
|
| 539 | 539 | , COUNT(c.jumlah) as jml |
| 540 | 540 | , IFNULL(SUM(c.jumlah),0) as rp |
| 541 | 541 | FROM penjamin a LEFT JOIN kasir b |
@@ -550,12 +550,12 @@ discard block |
||
| 550 | 550 | GROUP BY a.id_penjamin |
| 551 | 551 | ORDER BY a.id_penjamin"); |
| 552 | 552 | |
| 553 | - while ($d1 = mysql_fetch_array($dtampil1)) { |
|
| 554 | - echo '<th>'.$d1['jml'].'</th>'; |
|
| 555 | - echo "<th style='text-align:right;'>".number_format($d1['rp'], 0, '.', ',').'</th>'; |
|
| 556 | - } |
|
| 553 | + while ($d1 = mysql_fetch_array($dtampil1)) { |
|
| 554 | + echo '<th>'.$d1['jml'].'</th>'; |
|
| 555 | + echo "<th style='text-align:right;'>".number_format($d1['rp'], 0, '.', ',').'</th>'; |
|
| 556 | + } |
|
| 557 | 557 | |
| 558 | - $dtampil2 = mysql_query("SELECT COUNT(c.jumlah) as jml
|
|
| 558 | + $dtampil2 = mysql_query("SELECT COUNT(c.jumlah) as jml
|
|
| 559 | 559 | , IFNULL(SUM(c.jumlah),0) as rp |
| 560 | 560 | FROM kasir b LEFT JOIN kasir_detail c |
| 561 | 561 | ON b.id_kasir = c.id_kasir |
@@ -564,12 +564,12 @@ discard block |
||
| 564 | 564 | WHERE b.tanggal LIKE '$prd%' |
| 565 | 565 | AND b.status != '4'"); |
| 566 | 566 | |
| 567 | - $d2 = mysql_fetch_array($dtampil2); |
|
| 567 | + $d2 = mysql_fetch_array($dtampil2); |
|
| 568 | 568 | |
| 569 | - echo '<th>'.$d2['jml'].'</th>'; |
|
| 570 | - echo "<th style='text-align:right;'>".number_format($d2['rp'], 0, '.', ',').'</th>'; |
|
| 569 | + echo '<th>'.$d2['jml'].'</th>'; |
|
| 570 | + echo "<th style='text-align:right;'>".number_format($d2['rp'], 0, '.', ',').'</th>'; |
|
| 571 | 571 | |
| 572 | - $dtampil3 = mysql_query("SELECT COUNT(c.jumlah) as jml
|
|
| 572 | + $dtampil3 = mysql_query("SELECT COUNT(c.jumlah) as jml
|
|
| 573 | 573 | , IFNULL(SUM(c.jumlah),0) as rp |
| 574 | 574 | FROM kasir b LEFT JOIN kasir_detail c |
| 575 | 575 | ON b.id_kasir = c.id_kasir |
@@ -578,12 +578,12 @@ discard block |
||
| 578 | 578 | WHERE b.tanggal LIKE '$prd%' |
| 579 | 579 | AND b.status != '4'"); |
| 580 | 580 | |
| 581 | - $d3 = mysql_fetch_array($dtampil3); |
|
| 581 | + $d3 = mysql_fetch_array($dtampil3); |
|
| 582 | 582 | |
| 583 | - echo '<th>'.$d3['jml'].'</th>'; |
|
| 584 | - echo "<th style='text-align:right;'>".number_format($d3['rp'], 0, '.', ',').'</th>'; |
|
| 583 | + echo '<th>'.$d3['jml'].'</th>'; |
|
| 584 | + echo "<th style='text-align:right;'>".number_format($d3['rp'], 0, '.', ',').'</th>'; |
|
| 585 | 585 | |
| 586 | - $dtampil = mysql_query("SELECT COUNT(c.jumlah) as jml
|
|
| 586 | + $dtampil = mysql_query("SELECT COUNT(c.jumlah) as jml
|
|
| 587 | 587 | , IFNULL(SUM(c.jumlah),0) as rp |
| 588 | 588 | FROM kasir b LEFT JOIN kasir_detail c |
| 589 | 589 | ON b.id_kasir = c.id_kasir |
@@ -591,12 +591,12 @@ discard block |
||
| 591 | 591 | WHERE b.tanggal like '$prd%' |
| 592 | 592 | AND b.status != '4'"); |
| 593 | 593 | |
| 594 | - $d = mysql_fetch_array($dtampil); |
|
| 594 | + $d = mysql_fetch_array($dtampil); |
|
| 595 | 595 | |
| 596 | - echo '<th>'.$d['jml'].'</th>'; |
|
| 597 | - echo "<th style='text-align:right;'>".number_format($d['rp'], 0, '.', ',').'</th>'; |
|
| 596 | + echo '<th>'.$d['jml'].'</th>'; |
|
| 597 | + echo "<th style='text-align:right;'>".number_format($d['rp'], 0, '.', ',').'</th>'; |
|
| 598 | 598 | |
| 599 | - echo'</tr>'; ?> |
|
| 599 | + echo'</tr>'; ?> |
|
| 600 | 600 | |
| 601 | 601 | |
| 602 | 602 | |
@@ -610,17 +610,17 @@ discard block |
||
| 610 | 610 | |
| 611 | 611 | $lastday = date('t', strtotime($iprd)); |
| 612 | 612 | |
| 613 | - $year = date('Y', strtotime($iprd)); |
|
| 613 | + $year = date('Y', strtotime($iprd)); |
|
| 614 | 614 | |
| 615 | - $month = date('m', strtotime($iprd)) * 1; |
|
| 615 | + $month = date('m', strtotime($iprd)) * 1; |
|
| 616 | 616 | |
| 617 | - if ($month == '1') { |
|
| 618 | - $imonth = 12; |
|
| 619 | - } else { |
|
| 620 | - $imonth = $month - 1; |
|
| 621 | - } |
|
| 617 | + if ($month == '1') { |
|
| 618 | + $imonth = 12; |
|
| 619 | + } else { |
|
| 620 | + $imonth = $month - 1; |
|
| 621 | + } |
|
| 622 | 622 | |
| 623 | - $nprd = $lastday.' '.getBulan1($imonth).' '.$year; ?> |
|
| 623 | + $nprd = $lastday.' '.getBulan1($imonth).' '.$year; ?> |
|
| 624 | 624 | |
| 625 | 625 | <table width="100%"> |
| 626 | 626 | |
@@ -643,7 +643,7 @@ discard block |
||
| 643 | 643 | |
| 644 | 644 | |
| 645 | 645 | <?php |
| 646 | - } ?> |
|
| 646 | + } ?> |
|
| 647 | 647 | |
| 648 | 648 | </body> |
| 649 | 649 | |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | |
| 167 | 167 | <?php |
| 168 | 168 | $gtampil = mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'"); |
| 169 | - $g = mysql_fetch_array($gtampil); |
|
| 169 | + $g = mysql_fetch_array($gtampil); |
|
| 170 | 170 | |
| 171 | 171 | if ($g['pict']) { |
| 172 | 172 | $pict = $g['pict']; |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | |
| 211 | 211 | <?php |
| 212 | 212 | |
| 213 | - $tampil = mysql_query("SELECT b.obat
|
|
| 213 | + $tampil = mysql_query("SELECT b.obat
|
|
| 214 | 214 | , c.satuan |
| 215 | 215 | , sum(a.qty) as jumlah |
| 216 | 216 | FROM kunjungan_berobat h inner join kunjungan_berobat_detail a |
@@ -371,11 +371,11 @@ |
||
| 371 | 371 | <!-- /editor --> |
| 372 | 372 | |
| 373 | 373 | <?php |
| 374 | - if (empty($pict)) { |
|
| 375 | - $ipict = 'logo.png'; |
|
| 376 | - } else { |
|
| 377 | - $ipict = $pict; |
|
| 378 | - } ?> |
|
| 374 | + if (empty($pict)) { |
|
| 375 | + $ipict = 'logo.png'; |
|
| 376 | + } else { |
|
| 377 | + $ipict = $pict; |
|
| 378 | + } ?> |
|
| 379 | 379 | |
| 380 | 380 | <script> |
| 381 | 381 | var btnCust = '<button type="button" class="btn btn-default" title="Add picture tags" ' + |
@@ -256,7 +256,7 @@ discard block |
||
| 256 | 256 | <?php |
| 257 | 257 | |
| 258 | 258 | |
| 259 | - $SQL = "SELECT p.tanggal,a.*,c.id_unit_barang,c.unit_barang,b.kode as kode_bar,b.barang |
|
| 259 | + $SQL = "SELECT p.tanggal,a.*,c.id_unit_barang,c.unit_barang,b.kode as kode_bar,b.barang |
|
| 260 | 260 | |
| 261 | 261 | ,a.qty-a.qty_ps as iqty, b.id_merk, b.id_barang |
| 262 | 262 | ,ifnull((SELECT sum(saldo_akhir) |
@@ -314,7 +314,7 @@ discard block |
||
| 314 | 314 | |
| 315 | 315 | while ($r = mysql_fetch_array($tampil)) { |
| 316 | 316 | |
| 317 | - //selectPR(no_pr,id_permintaan_barang_detail,ibarang,id_barang,unit_barang,iqty,qty) |
|
| 317 | + //selectPR(no_pr,id_permintaan_barang_detail,ibarang,id_barang,unit_barang,iqty,qty) |
|
| 318 | 318 | |
| 319 | 319 | $hsql = mysql_query("SELECT harga as last_price
|
| 320 | 320 | FROM pemesanan_barang_detail |
@@ -49,37 +49,37 @@ discard block |
||
| 49 | 49 | |
| 50 | 50 | <?php |
| 51 | 51 | |
| 52 | - $gtampil = mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'"); |
|
| 52 | + $gtampil = mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'"); |
|
| 53 | 53 | |
| 54 | - $g = mysql_fetch_array($gtampil); |
|
| 54 | + $g = mysql_fetch_array($gtampil); |
|
| 55 | 55 | |
| 56 | - if ($g['pict']) { |
|
| 57 | - $pict = $g['pict']; |
|
| 58 | - } else { |
|
| 59 | - $pict = ''; |
|
| 60 | - } |
|
| 56 | + if ($g['pict']) { |
|
| 57 | + $pict = $g['pict']; |
|
| 58 | + } else { |
|
| 59 | + $pict = ''; |
|
| 60 | + } |
|
| 61 | 61 | |
| 62 | - $company = ucwords($g['company']); |
|
| 62 | + $company = ucwords($g['company']); |
|
| 63 | 63 | |
| 64 | - $sql = mysql_query("SELECT a.*,b.shift FROM kasir a LEFT JOIN shift b
|
|
| 64 | + $sql = mysql_query("SELECT a.*,b.shift FROM kasir a LEFT JOIN shift b
|
|
| 65 | 65 | ON a.id_shift = b.id_shift |
| 66 | 66 | WHERE a.id_kasir = '$k_ID' |
| 67 | 67 | |
| 68 | 68 | "); |
| 69 | 69 | |
| 70 | - $r = mysql_fetch_array($sql); |
|
| 70 | + $r = mysql_fetch_array($sql); |
|
| 71 | 71 | |
| 72 | - $penjualan_barang = $r['id_kasir']; |
|
| 72 | + $penjualan_barang = $r['id_kasir']; |
|
| 73 | 73 | |
| 74 | - $shift = $r['shift']; |
|
| 74 | + $shift = $r['shift']; |
|
| 75 | 75 | |
| 76 | - $petugas = $r['petugas']; |
|
| 76 | + $petugas = $r['petugas']; |
|
| 77 | 77 | |
| 78 | - $status = $r['status']; |
|
| 78 | + $status = $r['status']; |
|
| 79 | 79 | |
| 80 | - $tanggal = date('d/m/Y', strtotime($r['tanggal'])); |
|
| 80 | + $tanggal = date('d/m/Y', strtotime($r['tanggal'])); |
|
| 81 | 81 | |
| 82 | - ?> |
|
| 82 | + ?> |
|
| 83 | 83 | |
| 84 | 84 | <table width="100%"> |
| 85 | 85 | <tr> |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | while ($i = mysql_fetch_array($itampil)) { |
| 117 | 117 | echo "<th>$i[jenis_transaksi]</th>"; |
| 118 | 118 | } |
| 119 | - ?> |
|
| 119 | + ?> |
|
| 120 | 120 | |
| 121 | 121 | <?php |
| 122 | 122 | |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | while ($i = mysql_fetch_array($itampil)) { |
| 126 | 126 | echo "<th>$i[jenis_pembayaran]</th>"; |
| 127 | 127 | } |
| 128 | - ?> |
|
| 128 | + ?> |
|
| 129 | 129 | |
| 130 | 130 | |
| 131 | 131 | </tr> |
@@ -287,7 +287,7 @@ discard block |
||
| 287 | 287 | |
| 288 | 288 | $no++; |
| 289 | 289 | } |
| 290 | - ?> |
|
| 290 | + ?> |
|
| 291 | 291 | </tbody> |
| 292 | 292 | |
| 293 | 293 | <tfoot> |
@@ -300,7 +300,7 @@ discard block |
||
| 300 | 300 | |
| 301 | 301 | <?php |
| 302 | 302 | |
| 303 | - $itampil = mysql_query("SELECT * FROM jenis_transaksi where aktif = 'Y' ORDER BY id_jenis_transaksi"); |
|
| 303 | + $itampil = mysql_query("SELECT * FROM jenis_transaksi where aktif = 'Y' ORDER BY id_jenis_transaksi"); |
|
| 304 | 304 | |
| 305 | 305 | while ($i = mysql_fetch_array($itampil)) { |
| 306 | 306 | $jtampil = mysql_query("SELECT sum(b.jumlah) as jumlah FROM kasir a INNER JOIN kasir_detail b
|
@@ -325,10 +325,10 @@ discard block |
||
| 325 | 325 | ?> |
| 326 | 326 | |
| 327 | 327 | <?php |
| 328 | - $itampil = mysql_query("SELECT * FROM jenis_pembayaran where aktif = 'Y' ORDER BY id_jenis_pembayaran"); |
|
| 328 | + $itampil = mysql_query("SELECT * FROM jenis_pembayaran where aktif = 'Y' ORDER BY id_jenis_pembayaran"); |
|
| 329 | 329 | |
| 330 | - while ($i = mysql_fetch_array($itampil)) { |
|
| 331 | - $pSQL = "SELECT sum(a.jumlah) as jumlah |
|
| 330 | + while ($i = mysql_fetch_array($itampil)) { |
|
| 331 | + $pSQL = "SELECT sum(a.jumlah) as jumlah |
|
| 332 | 332 | |
| 333 | 333 | FROM kasir_detail a LEFT JOIN jenis_transaksi b |
| 334 | 334 | |
@@ -356,20 +356,20 @@ discard block |
||
| 356 | 356 | |
| 357 | 357 | "; |
| 358 | 358 | |
| 359 | - $ptampil = mysql_query($pSQL); |
|
| 359 | + $ptampil = mysql_query($pSQL); |
|
| 360 | 360 | |
| 361 | - $p = mysql_fetch_array($ptampil); |
|
| 361 | + $p = mysql_fetch_array($ptampil); |
|
| 362 | 362 | |
| 363 | - if ($p[jumlah]) { |
|
| 364 | - $jml = number_format($p['jumlah'], 0, '.', ','); |
|
| 365 | - } else { |
|
| 366 | - $jml = 0; |
|
| 367 | - } |
|
| 363 | + if ($p[jumlah]) { |
|
| 364 | + $jml = number_format($p['jumlah'], 0, '.', ','); |
|
| 365 | + } else { |
|
| 366 | + $jml = 0; |
|
| 367 | + } |
|
| 368 | 368 | |
| 369 | - echo"<th style='text-align:right;'>$jml </th>"; |
|
| 370 | - } |
|
| 369 | + echo"<th style='text-align:right;'>$jml </th>"; |
|
| 370 | + } |
|
| 371 | 371 | |
| 372 | - ?> |
|
| 372 | + ?> |
|
| 373 | 373 | |
| 374 | 374 | <th></th> |
| 375 | 375 | |
@@ -389,16 +389,16 @@ discard block |
||
| 389 | 389 | |
| 390 | 390 | <?php |
| 391 | 391 | |
| 392 | - if ($r[id_shift] == '1') { |
|
| 393 | - $id_shift = '1'; |
|
| 394 | - } else { |
|
| 395 | - $id_shift = '%'; |
|
| 396 | - } |
|
| 392 | + if ($r[id_shift] == '1') { |
|
| 393 | + $id_shift = '1'; |
|
| 394 | + } else { |
|
| 395 | + $id_shift = '%'; |
|
| 396 | + } |
|
| 397 | 397 | |
| 398 | - $itampil = mysql_query("SELECT * FROM shift where aktif = 'Y' and id_shift LIKE '$id_shift' ORDER BY id_shift"); |
|
| 398 | + $itampil = mysql_query("SELECT * FROM shift where aktif = 'Y' and id_shift LIKE '$id_shift' ORDER BY id_shift"); |
|
| 399 | 399 | |
| 400 | - while ($i = mysql_fetch_array($itampil)) { |
|
| 401 | - $shift = $i['shift']; ?> |
|
| 400 | + while ($i = mysql_fetch_array($itampil)) { |
|
| 401 | + $shift = $i['shift']; ?> |
|
| 402 | 402 | |
| 403 | 403 | <tr> |
| 404 | 404 | <th></th> |
@@ -437,15 +437,15 @@ discard block |
||
| 437 | 437 | |
| 438 | 438 | "; |
| 439 | 439 | |
| 440 | - $ptampil = mysql_query($pSQL); |
|
| 440 | + $ptampil = mysql_query($pSQL); |
|
| 441 | 441 | |
| 442 | - $p = mysql_fetch_array($ptampil); |
|
| 442 | + $p = mysql_fetch_array($ptampil); |
|
| 443 | 443 | |
| 444 | - if ($p[jumlah]) { |
|
| 445 | - $cash = number_format($p['jumlah'], 0, '.', ','); |
|
| 446 | - } else { |
|
| 447 | - $cash = 0; |
|
| 448 | - } ?> |
|
| 444 | + if ($p[jumlah]) { |
|
| 445 | + $cash = number_format($p['jumlah'], 0, '.', ','); |
|
| 446 | + } else { |
|
| 447 | + $cash = 0; |
|
| 448 | + } ?> |
|
| 449 | 449 | <th style="text-align: right;"><?=$cash; ?></th> |
| 450 | 450 | <th style="text-align: left;">Credit</th> |
| 451 | 451 | |
@@ -480,15 +480,15 @@ discard block |
||
| 480 | 480 | |
| 481 | 481 | "; |
| 482 | 482 | |
| 483 | - $ptampil = mysql_query($pSQL); |
|
| 483 | + $ptampil = mysql_query($pSQL); |
|
| 484 | 484 | |
| 485 | - $p = mysql_fetch_array($ptampil); |
|
| 485 | + $p = mysql_fetch_array($ptampil); |
|
| 486 | 486 | |
| 487 | - if ($p[jumlah]) { |
|
| 488 | - $credit = number_format($p['jumlah'], 0, '.', ','); |
|
| 489 | - } else { |
|
| 490 | - $credit = 0; |
|
| 491 | - } ?> |
|
| 487 | + if ($p[jumlah]) { |
|
| 488 | + $credit = number_format($p['jumlah'], 0, '.', ','); |
|
| 489 | + } else { |
|
| 490 | + $credit = 0; |
|
| 491 | + } ?> |
|
| 492 | 492 | |
| 493 | 493 | <th style="text-align: right;"><?=$credit; ?></th> |
| 494 | 494 | <th colspan="4"></th> |
@@ -496,12 +496,12 @@ discard block |
||
| 496 | 496 | |
| 497 | 497 | |
| 498 | 498 | <?php |
| 499 | - } |
|
| 499 | + } |
|
| 500 | 500 | |
| 501 | - ?> |
|
| 501 | + ?> |
|
| 502 | 502 | |
| 503 | 503 | <?php if ($id_shift == '%') { |
| 504 | - ?> |
|
| 504 | + ?> |
|
| 505 | 505 | <tr> |
| 506 | 506 | <th></th> |
| 507 | 507 | <th></th> |
@@ -537,15 +537,15 @@ discard block |
||
| 537 | 537 | |
| 538 | 538 | "; |
| 539 | 539 | |
| 540 | - $ptampil = mysql_query($pSQL); |
|
| 540 | + $ptampil = mysql_query($pSQL); |
|
| 541 | 541 | |
| 542 | - $p = mysql_fetch_array($ptampil); |
|
| 542 | + $p = mysql_fetch_array($ptampil); |
|
| 543 | 543 | |
| 544 | - if ($p[jumlah]) { |
|
| 545 | - $cash = number_format($p['jumlah'], 0, '.', ','); |
|
| 546 | - } else { |
|
| 547 | - $cash = 0; |
|
| 548 | - } ?> |
|
| 544 | + if ($p[jumlah]) { |
|
| 545 | + $cash = number_format($p['jumlah'], 0, '.', ','); |
|
| 546 | + } else { |
|
| 547 | + $cash = 0; |
|
| 548 | + } ?> |
|
| 549 | 549 | <th style="text-align: right;"><?=$cash; ?></th> |
| 550 | 550 | <th style="text-align: left;">Credit</th> |
| 551 | 551 | |
@@ -578,22 +578,22 @@ discard block |
||
| 578 | 578 | |
| 579 | 579 | "; |
| 580 | 580 | |
| 581 | - $ptampil = mysql_query($pSQL); |
|
| 581 | + $ptampil = mysql_query($pSQL); |
|
| 582 | 582 | |
| 583 | - $p = mysql_fetch_array($ptampil); |
|
| 583 | + $p = mysql_fetch_array($ptampil); |
|
| 584 | 584 | |
| 585 | - if ($p[jumlah]) { |
|
| 586 | - $credit = number_format($p['jumlah'], 0, '.', ','); |
|
| 587 | - } else { |
|
| 588 | - $credit = 0; |
|
| 589 | - } ?> |
|
| 585 | + if ($p[jumlah]) { |
|
| 586 | + $credit = number_format($p['jumlah'], 0, '.', ','); |
|
| 587 | + } else { |
|
| 588 | + $credit = 0; |
|
| 589 | + } ?> |
|
| 590 | 590 | |
| 591 | 591 | <th style="text-align: right;"><?=$credit; ?></th> |
| 592 | 592 | <th colspan="4"></th> |
| 593 | 593 | </tr> |
| 594 | 594 | |
| 595 | 595 | <?php |
| 596 | - } ?> |
|
| 596 | + } ?> |
|
| 597 | 597 | |
| 598 | 598 | <tr><td colspan="12"> </td></tr> |
| 599 | 599 | |
@@ -644,13 +644,13 @@ discard block |
||
| 644 | 644 | |
| 645 | 645 | $p = mysql_fetch_array($ptampil); |
| 646 | 646 | |
| 647 | - if ($p[jumlah]) { |
|
| 648 | - $total = number_format($p['jumlah'], 0, '.', ','); |
|
| 649 | - } else { |
|
| 650 | - $total = 0; |
|
| 651 | - } |
|
| 647 | + if ($p[jumlah]) { |
|
| 648 | + $total = number_format($p['jumlah'], 0, '.', ','); |
|
| 649 | + } else { |
|
| 650 | + $total = 0; |
|
| 651 | + } |
|
| 652 | 652 | |
| 653 | - ?> |
|
| 653 | + ?> |
|
| 654 | 654 | |
| 655 | 655 | |
| 656 | 656 | <tr> |