Passed
Branch master (c66316)
by Saepul
06:04
created
modul/mod_kasir/xcetak_kasir.php 3 patches
Indentation   +102 added lines, -102 removed lines patch added patch discarded remove patch
@@ -313,37 +313,37 @@  discard block
 block discarded – undo
313 313
 
314 314
 {
315 315
 
316
-  $abil = array("", "satu", "dua", "tiga", "empat", "lima", "enam", "tujuh", "delapan", "sembilan", "sepuluh", "sebelas");
316
+    $abil = array("", "satu", "dua", "tiga", "empat", "lima", "enam", "tujuh", "delapan", "sembilan", "sepuluh", "sebelas");
317 317
 
318
-  if ($x < 12)
318
+    if ($x < 12)
319 319
 
320 320
     return " " . $abil[$x];
321 321
 
322
-  elseif ($x < 20)
322
+    elseif ($x < 20)
323 323
 
324 324
     return Terbilang($x - 10) . "belas";
325 325
 
326
-  elseif ($x < 100)
326
+    elseif ($x < 100)
327 327
 
328 328
     return Terbilang($x / 10) . " puluh" . Terbilang($x % 10);
329 329
 
330
-  elseif ($x < 200)
330
+    elseif ($x < 200)
331 331
 
332 332
     return " seratus" . Terbilang($x - 100);
333 333
 
334
-  elseif ($x < 1000)
334
+    elseif ($x < 1000)
335 335
 
336 336
     return Terbilang($x / 100) . " ratus" . Terbilang($x % 100);
337 337
 
338
-  elseif ($x < 2000)
338
+    elseif ($x < 2000)
339 339
 
340 340
     return " seribu" . Terbilang($x - 1000);
341 341
 
342
-  elseif ($x < 1000000)
342
+    elseif ($x < 1000000)
343 343
 
344 344
     return Terbilang($x / 1000) . " ribu" . Terbilang($x % 1000);
345 345
 
346
-  elseif ($x < 1000000000)
346
+    elseif ($x < 1000000000)
347 347
 
348 348
     return Terbilang($x / 1000000) . " juta" . Terbilang($x % 1000000);
349 349
 
@@ -409,19 +409,19 @@  discard block
 block discarded – undo
409 409
 
410 410
 
411 411
 
412
- $gtampil=mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'");
412
+    $gtampil=mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'");
413 413
 
414
- $g=mysql_fetch_array($gtampil);
414
+    $g=mysql_fetch_array($gtampil);
415 415
 
416 416
 
417 417
 
418 418
 if ($g['pict']) {
419 419
 
420
-	$pict = $g['pict'];
420
+    $pict = $g['pict'];
421 421
 
422 422
 } else {
423 423
 
424
-	$pict = '';
424
+    $pict = '';
425 425
 
426 426
 }
427 427
 
@@ -433,13 +433,13 @@  discard block
 block discarded – undo
433 433
 
434 434
 
435 435
 
436
- $otampil=mysql_query("SELECT * FROM  outlet where id_outlet = '$outlet'");
436
+    $otampil=mysql_query("SELECT * FROM  outlet where id_outlet = '$outlet'");
437 437
 
438
- $o=mysql_fetch_array($otampil);
438
+    $o=mysql_fetch_array($otampil);
439 439
 
440 440
 
441 441
 
442
- ?>
442
+    ?>
443 443
 
444 444
 
445 445
 
@@ -551,23 +551,23 @@  discard block
 block discarded – undo
551 551
 
552 552
 if($r['status'] == '0'){
553 553
 
554
-  $istatus = 'Baru';
554
+    $istatus = 'Baru';
555 555
 
556 556
 } else if($r['status'] == '1'){
557 557
 
558
-  $istatus = 'Disetujui';
558
+    $istatus = 'Disetujui';
559 559
 
560 560
 } else if($r['status'] == '2'){
561 561
 
562
-  $istatus = 'Ditolak';
562
+    $istatus = 'Ditolak';
563 563
 
564
- } else if($r['status'] == '9'){
564
+    } else if($r['status'] == '9'){
565 565
 
566
-  $istatus = 'Posting'; 
566
+    $istatus = 'Posting'; 
567 567
 
568
- } else {
568
+    } else {
569 569
 
570
- $istatus = 'Dibatalkan';
570
+    $istatus = 'Dibatalkan';
571 571
 
572 572
 }
573 573
 
@@ -597,19 +597,19 @@  discard block
 block discarded – undo
597 597
 
598 598
 <?
599 599
 
600
-	echo"<table width='100%' border=0 cellpadding=0 cellspacing=0>";	
600
+    echo"<table width='100%' border=0 cellpadding=0 cellspacing=0>";	
601 601
 
602
-	echo"<tr>";
602
+    echo"<tr>";
603 603
 
604
-	echo"<td width='72%' style='text-align:right;'>No. Pemesanan</td>";
604
+    echo"<td width='72%' style='text-align:right;'>No. Pemesanan</td>";
605 605
 
606
-	echo"<td width='1%'>:</td>";
606
+    echo"<td width='1%'>:</td>";
607 607
 
608
-	echo"<td width='27%' style='text-align:left;'>".$r['kode']."".$r['notrans']."</td>";
608
+    echo"<td width='27%' style='text-align:left;'>".$r['kode']."".$r['notrans']."</td>";
609 609
 
610
-	echo"</tr>";
610
+    echo"</tr>";
611 611
 
612
-	echo"</table>";
612
+    echo"</table>";
613 613
 
614 614
 ?>	
615 615
 
@@ -621,19 +621,19 @@  discard block
 block discarded – undo
621 621
 
622 622
  <?
623 623
 
624
-	echo"<table width='100%' border=0 cellpadding=0 cellspacing=0>";	
624
+    echo"<table width='100%' border=0 cellpadding=0 cellspacing=0>";	
625 625
 
626
-	echo"<tr>";
626
+    echo"<tr>";
627 627
 
628
-	echo"<td width='72%' style='text-align:right;'>Tanggal</td>";
628
+    echo"<td width='72%' style='text-align:right;'>Tanggal</td>";
629 629
 
630
-	echo"<td width='1%'>:</td>";
630
+    echo"<td width='1%'>:</td>";
631 631
 
632
-	echo"<td width='27%' style='text-align:left;'>".$tgl."</td>";
632
+    echo"<td width='27%' style='text-align:left;'>".$tgl."</td>";
633 633
 
634
-	echo"</tr>";
634
+    echo"</tr>";
635 635
 
636
-	echo"</table>";
636
+    echo"</table>";
637 637
 
638 638
 ?>	
639 639
 
@@ -649,19 +649,19 @@  discard block
 block discarded – undo
649 649
 
650 650
 <?
651 651
 
652
-	echo"<table width='100%' border=0 cellpadding=0 cellspacing=0>";	
652
+    echo"<table width='100%' border=0 cellpadding=0 cellspacing=0>";	
653 653
 
654
-	echo"<tr>";
654
+    echo"<tr>";
655 655
 
656
-	echo"<td width='72%' style='text-align:right;'>Term</td>";
656
+    echo"<td width='72%' style='text-align:right;'>Term</td>";
657 657
 
658
-	echo"<td width='1%'>:</td>";
658
+    echo"<td width='1%'>:</td>";
659 659
 
660
-	echo"<td width='27%' style='text-align:left;'>".$r['term']." Hari</td>";
660
+    echo"<td width='27%' style='text-align:left;'>".$r['term']." Hari</td>";
661 661
 
662
-	echo"</tr>";
662
+    echo"</tr>";
663 663
 
664
-	echo"</table>";
664
+    echo"</table>";
665 665
 
666 666
 ?>	
667 667
 
@@ -897,95 +897,95 @@  discard block
 block discarded – undo
897 897
 
898 898
  
899 899
 
900
- $d_id    = $d['id_pemesanan_barang_detail'];     
900
+    $d_id    = $d['id_pemesanan_barang_detail'];     
901 901
 
902
- $ibarang = $d['kode_bar'].'&nbsp&nbsp&nbsp&nbsp'.$d['barang'];
902
+    $ibarang = $d['kode_bar'].'&nbsp&nbsp&nbsp&nbsp'.$d['barang'];
903 903
 
904
- $iqty = number_format($d['qty'], 2, ".", ",");
904
+    $iqty = number_format($d['qty'], 2, ".", ",");
905 905
 
906
- $qty = number_format($d['qty'], 2, ".", "");
906
+    $qty = number_format($d['qty'], 2, ".", "");
907 907
 
908 908
 
909 909
 
910
-  $harga = number_format($d['harga'], 0, ".", ",");
910
+    $harga = number_format($d['harga'], 0, ".", ",");
911 911
 
912 912
 
913 913
 
914
- $total = number_format($d['total'], 0, ".", ",");
914
+    $total = number_format($d['total'], 0, ".", ",");
915 915
 
916
- $ctotal = number_format($d['ctotal'], 2, ".", ",");
916
+    $ctotal = number_format($d['ctotal'], 2, ".", ",");
917 917
 
918 918
  
919 919
 
920
- echo"<tr>";
920
+    echo"<tr>";
921 921
 
922 922
 
923 923
 
924 924
 echo" <td class='border' style='text-align: center;'>"; 
925 925
 
926
- echo $no.'.' ;
926
+    echo $no.'.' ;
927 927
 
928
- echo"</td>"; 
928
+    echo"</td>"; 
929 929
 
930 930
 
931 931
 
932
- echo" <td class='border'>"; 
932
+    echo" <td class='border'>"; 
933 933
 
934
- echo $ibarang ;
934
+    echo $ibarang ;
935 935
 
936
- echo"</td>";  
936
+    echo"</td>";  
937 937
 
938 938
 
939 939
 
940
- echo" <td  class='border' style='text-align:right;'>"; 
940
+    echo" <td  class='border' style='text-align:right;'>"; 
941 941
 
942
- echo $iqty;
942
+    echo $iqty;
943 943
 
944
- echo"</td>";   
944
+    echo"</td>";   
945 945
 
946 946
 
947 947
 
948
- echo" <td class='border'>"; 
948
+    echo" <td class='border'>"; 
949 949
 
950
- echo $d['unit_barang'];
950
+    echo $d['unit_barang'];
951 951
 
952
- echo"</td>";    
952
+    echo"</td>";    
953 953
 
954 954
 
955 955
 
956
-  echo" <td  class='border' style='text-align:right;'>"; 
956
+    echo" <td  class='border' style='text-align:right;'>"; 
957 957
 
958
- echo $harga;
958
+    echo $harga;
959 959
 
960
- echo"</td>";   
960
+    echo"</td>";   
961 961
 
962 962
 
963 963
 
964
- if ($mata_uang == '1') {
964
+    if ($mata_uang == '1') {
965 965
 
966
-	 echo" <td  class='border' style='text-align:right;'>"; 
966
+        echo" <td  class='border' style='text-align:right;'>"; 
967 967
 
968
-	 echo $total;
968
+        echo $total;
969 969
 
970
-	 echo"</td>";   
970
+        echo"</td>";   
971 971
 
972
- } else {
972
+    } else {
973 973
 
974
- 	 echo" <td  class='border' style='text-align:right;'>"; 
974
+        echo" <td  class='border' style='text-align:right;'>"; 
975 975
 
976
-	 echo $ctotal;
976
+        echo $ctotal;
977 977
 
978
-	 echo"</td>";  
978
+        echo"</td>";  
979 979
 
980
-	 echo" <td  class='border' style='text-align:right;'>"; 
980
+        echo" <td  class='border' style='text-align:right;'>"; 
981 981
 
982
-	 echo $total;
982
+        echo $total;
983 983
 
984
-	 echo"</td>";   
984
+        echo"</td>";   
985 985
 
986 986
 
987 987
 
988
- } 
988
+    } 
989 989
 
990 990
 
991 991
 
@@ -999,19 +999,19 @@  discard block
 block discarded – undo
999 999
 
1000 1000
 if ($no < 10) {
1001 1001
 
1002
-		while ($no < 10)  {
1002
+        while ($no < 10)  {
1003 1003
 
1004
-			   echo "<tr>";
1004
+                echo "<tr>";
1005 1005
 
1006
-			   echo"<td colspan=4>&nbsp</td>";
1006
+                echo"<td colspan=4>&nbsp</td>";
1007 1007
 
1008
-			   echo"</tr>";
1008
+                echo"</tr>";
1009 1009
 
1010
-			$no++;
1010
+            $no++;
1011 1011
 
1012
-		};
1012
+        };
1013 1013
 
1014
-	};	
1014
+    };	
1015 1015
 
1016 1016
 
1017 1017
 
@@ -1029,37 +1029,37 @@  discard block
 block discarded – undo
1029 1029
 
1030 1030
 
1031 1031
 
1032
-   $total = number_format($r['total'], 0, ".", ",");
1032
+    $total = number_format($r['total'], 0, ".", ",");
1033 1033
 
1034
-   $ppn   = number_format($r['totaltax'], 0, ".", ",");
1034
+    $ppn   = number_format($r['totaltax'], 0, ".", ",");
1035 1035
 
1036
-   $gtotal = number_format($r['gtotal'], 0, ".", ",");
1036
+    $gtotal = number_format($r['gtotal'], 0, ".", ",");
1037 1037
 
1038 1038
 
1039 1039
 
1040
-   $igtotal = $r['gtotal'];
1040
+    $igtotal = $r['gtotal'];
1041 1041
 
1042 1042
 
1043 1043
 
1044
-   $ctotal = number_format($r['ctotal'], 2, ".", ",");
1044
+    $ctotal = number_format($r['ctotal'], 2, ".", ",");
1045 1045
 
1046
-   $cppn   = number_format($r['ctotaltax'], 2, ".", ",");
1046
+    $cppn   = number_format($r['ctotaltax'], 2, ".", ",");
1047 1047
 
1048
-   $cgtotal = number_format($r['cgtotal'], 2, ".", ",");
1048
+    $cgtotal = number_format($r['cgtotal'], 2, ".", ",");
1049 1049
 
1050 1050
 
1051 1051
 
1052
-   $icgtotal = $r['cgtotal'];
1052
+    $icgtotal = $r['cgtotal'];
1053 1053
 
1054 1054
 
1055 1055
 
1056 1056
 if ($mata_uang == '1') {
1057 1057
 
1058
-	$rterbilang = ucwords(Terbilang($igtotal)).' Rupiah';
1058
+    $rterbilang = ucwords(Terbilang($igtotal)).' Rupiah';
1059 1059
 
1060 1060
 } else {
1061 1061
 
1062
-	$rterbilang = ucwords(Terbilang($icgtotal)).' '.$cnote;
1062
+    $rterbilang = ucwords(Terbilang($icgtotal)).' '.$cnote;
1063 1063
 
1064 1064
 }
1065 1065
 
@@ -1187,7 +1187,7 @@  discard block
 block discarded – undo
1187 1187
 
1188 1188
 	
1189 1189
 
1190
-	$tanda_tangan	= mysql_query("SELECT a.judul,a.penanda_tangan FROM tanda_tangan a LEFT JOIN kode_transaksi b 
1190
+    $tanda_tangan	= mysql_query("SELECT a.judul,a.penanda_tangan FROM tanda_tangan a LEFT JOIN kode_transaksi b 
1191 1191
 
1192 1192
 							ON a.id_kode_transaksi = b.id_kode_transaksi
1193 1193
 
@@ -1195,21 +1195,21 @@  discard block
 block discarded – undo
1195 1195
 
1196 1196
 
1197 1197
 
1198
-	$jml		= mysql_num_rows($tanda_tangan);
1198
+    $jml		= mysql_num_rows($tanda_tangan);
1199 1199
 
1200 1200
 	
1201 1201
 
1202
-	$cp			= $jml +1 ;
1202
+    $cp			= $jml +1 ;
1203 1203
 
1204 1204
     
1205 1205
 
1206
-	$ps			= 100/$cp;   
1206
+    $ps			= 100/$cp;   
1207 1207
 
1208 1208
     $user		= $_SESSION['userid'];
1209 1209
 
1210 1210
 	
1211 1211
 
1212
-   ?> 
1212
+    ?> 
1213 1213
 
1214 1214
     
1215 1215
 
@@ -1247,13 +1247,13 @@  discard block
 block discarded – undo
1247 1247
 
1248 1248
     <?
1249 1249
 
1250
-	$tanda_tangan	= mysql_query("SELECT a.judul,a.penanda_tangan FROM tanda_tangan a LEFT JOIN kode_transaksi b 
1250
+    $tanda_tangan	= mysql_query("SELECT a.judul,a.penanda_tangan FROM tanda_tangan a LEFT JOIN kode_transaksi b 
1251 1251
 
1252 1252
 							ON a.id_kode_transaksi = b.id_kode_transaksi
1253 1253
 
1254 1254
 							WHERE b.kode = '$kode' AND a.aktif = 'Y'");
1255 1255
 
1256
-	?>    
1256
+    ?>    
1257 1257
 
1258 1258
     <?php while($s   = mysql_fetch_array($tanda_tangan)) { ?>
1259 1259
 
Please login to merge, or discard this patch.
Spacing   +81 added lines, -81 removed lines patch added patch discarded remove patch
@@ -12,9 +12,9 @@  discard block
 block discarded – undo
12 12
 
13 13
 $SQL = "SELECT* FROM periode ";
14 14
 
15
-$tampil=mysql_query($SQL);
15
+$tampil = mysql_query($SQL);
16 16
 
17
-$p=mysql_fetch_array($tampil);
17
+$p = mysql_fetch_array($tampil);
18 18
 
19 19
 
20 20
 
@@ -24,23 +24,23 @@  discard block
 block discarded – undo
24 24
 
25 25
 
26 26
 
27
-$tampil=mysql_query("SELECT * FROM modul WHERE id_modul ='".$_GET[report_id]."'");
27
+$tampil = mysql_query("SELECT * FROM modul WHERE id_modul ='".$_GET[report_id]."'");
28 28
 
29 29
 						
30 30
 
31
-$r=mysql_fetch_array($tampil);
31
+$r = mysql_fetch_array($tampil);
32 32
 
33 33
 
34 34
 
35
-$module 	= $_GET['module'];
35
+$module = $_GET['module'];
36 36
 
37
-$imodule 	= ucwords($r['nama_modul']);
37
+$imodule = ucwords($r['nama_modul']);
38 38
 
39
-$nmmodule 	= ucwords($r['nama_modul']);
39
+$nmmodule = ucwords($r['nama_modul']);
40 40
 
41
-$id     	= $r['id_modul'];
41
+$id = $r['id_modul'];
42 42
 
43
-$fa_icon   	= $r['fa_icon'];
43
+$fa_icon = $r['fa_icon'];
44 44
 
45 45
 
46 46
 
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
 
64 64
 
65
-$status		= $_GET['status'];
65
+$status = $_GET['status'];
66 66
 
67 67
 
68 68
 
@@ -315,37 +315,37 @@  discard block
 block discarded – undo
315 315
 
316 316
   $abil = array("", "satu", "dua", "tiga", "empat", "lima", "enam", "tujuh", "delapan", "sembilan", "sepuluh", "sebelas");
317 317
 
318
-  if ($x < 12)
318
+  if ($x<12)
319 319
 
320
-    return " " . $abil[$x];
320
+    return " ".$abil[$x];
321 321
 
322
-  elseif ($x < 20)
322
+  elseif ($x<20)
323 323
 
324
-    return Terbilang($x - 10) . "belas";
324
+    return Terbilang($x - 10)."belas";
325 325
 
326
-  elseif ($x < 100)
326
+  elseif ($x<100)
327 327
 
328
-    return Terbilang($x / 10) . " puluh" . Terbilang($x % 10);
328
+    return Terbilang($x / 10)." puluh".Terbilang($x % 10);
329 329
 
330
-  elseif ($x < 200)
330
+  elseif ($x<200)
331 331
 
332
-    return " seratus" . Terbilang($x - 100);
332
+    return " seratus".Terbilang($x - 100);
333 333
 
334
-  elseif ($x < 1000)
334
+  elseif ($x<1000)
335 335
 
336
-    return Terbilang($x / 100) . " ratus" . Terbilang($x % 100);
336
+    return Terbilang($x / 100)." ratus".Terbilang($x % 100);
337 337
 
338
-  elseif ($x < 2000)
338
+  elseif ($x<2000)
339 339
 
340
-    return " seribu" . Terbilang($x - 1000);
340
+    return " seribu".Terbilang($x - 1000);
341 341
 
342
-  elseif ($x < 1000000)
342
+  elseif ($x<1000000)
343 343
 
344
-    return Terbilang($x / 1000) . " ribu" . Terbilang($x % 1000);
344
+    return Terbilang($x / 1000)." ribu".Terbilang($x % 1000);
345 345
 
346
-  elseif ($x < 1000000000)
346
+  elseif ($x<1000000000)
347 347
 
348
-    return Terbilang($x / 1000000) . " juta" . Terbilang($x % 1000000);
348
+    return Terbilang($x / 1000000)." juta".Terbilang($x % 1000000);
349 349
 
350 350
 }
351 351
 
@@ -409,9 +409,9 @@  discard block
 block discarded – undo
409 409
 
410 410
 
411 411
 
412
- $gtampil=mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'");
412
+ $gtampil = mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'");
413 413
 
414
- $g=mysql_fetch_array($gtampil);
414
+ $g = mysql_fetch_array($gtampil);
415 415
 
416 416
 
417 417
 
@@ -433,9 +433,9 @@  discard block
 block discarded – undo
433 433
 
434 434
 
435 435
 
436
- $otampil=mysql_query("SELECT * FROM  outlet where id_outlet = '$outlet'");
436
+ $otampil = mysql_query("SELECT * FROM  outlet where id_outlet = '$outlet'");
437 437
 
438
- $o=mysql_fetch_array($otampil);
438
+ $o = mysql_fetch_array($otampil);
439 439
 
440 440
 
441 441
 
@@ -449,7 +449,7 @@  discard block
 block discarded – undo
449 449
 
450 450
 <td width='10%'>
451 451
 
452
-<img src="../../images/logo/<?php echo $pict;?>" width='150px'>
452
+<img src="../../images/logo/<?php echo $pict; ?>" width='150px'>
453 453
 
454 454
 </td>
455 455
 
@@ -483,17 +483,17 @@  discard block
 block discarded – undo
483 483
 
484 484
 <?
485 485
 
486
-$prd    = $_GET['prd']; 
486
+$prd = $_GET['prd']; 
487 487
 
488 488
 $notrans = $_GET['notrans'];
489 489
 
490 490
 $kode    = $_GET['kode']; 
491 491
 
492
-$Outlet    = $_GET['outlet']; 
492
+$Outlet = $_GET['outlet']; 
493 493
 
494 494
 
495 495
 
496
-$SQL =	'SELECT a.*,b.outlet,c.supplier,d.mata_uang,d.ket as cnote 
496
+$SQL = 'SELECT a.*,b.outlet,c.supplier,d.mata_uang,d.ket as cnote 
497 497
 
498 498
 	 FROM pemesanan_barang a left join outlet b
499 499
 
@@ -527,11 +527,11 @@  discard block
 block discarded – undo
527 527
 
528 528
 
529 529
 
530
-$tampil=mysql_query($SQL);         
530
+$tampil = mysql_query($SQL);         
531 531
 
532 532
                    
533 533
 
534
-$r=mysql_fetch_array($tampil);	
534
+$r = mysql_fetch_array($tampil);	
535 535
 
536 536
 
537 537
 
@@ -549,19 +549,19 @@  discard block
 block discarded – undo
549 549
 
550 550
 
551 551
 
552
-if($r['status'] == '0'){
552
+if ($r['status']=='0') {
553 553
 
554 554
   $istatus = 'Baru';
555 555
 
556
-} else if($r['status'] == '1'){
556
+} else if ($r['status']=='1') {
557 557
 
558 558
   $istatus = 'Disetujui';
559 559
 
560
-} else if($r['status'] == '2'){
560
+} else if ($r['status']=='2') {
561 561
 
562 562
   $istatus = 'Ditolak';
563 563
 
564
- } else if($r['status'] == '9'){
564
+ } else if ($r['status']=='9') {
565 565
 
566 566
   $istatus = 'Posting'; 
567 567
 
@@ -685,7 +685,7 @@  discard block
 block discarded – undo
685 685
 
686 686
 <?
687 687
 
688
-$sSQL =	'SELECT c.*
688
+$sSQL = 'SELECT c.*
689 689
 
690 690
 	 FROM pemesanan_barang a left join outlet b
691 691
 
@@ -719,11 +719,11 @@  discard block
 block discarded – undo
719 719
 
720 720
 
721 721
 
722
-$stampil=mysql_query($sSQL);         
722
+$stampil = mysql_query($sSQL);         
723 723
 
724 724
                    
725 725
 
726
-$s=mysql_fetch_array($stampil);	
726
+$s = mysql_fetch_array($stampil);	
727 727
 
728 728
 
729 729
 
@@ -739,7 +739,7 @@  discard block
 block discarded – undo
739 739
 
740 740
         </tr>
741 741
 
742
-        <tr><td width="30%">Telepon</td><td width="1%">:</td><td><?php echo $s['phone'];?></td></tr>
742
+        <tr><td width="30%">Telepon</td><td width="1%">:</td><td><?php echo $s['phone']; ?></td></tr>
743 743
 
744 744
 </table>        
745 745
 
@@ -749,7 +749,7 @@  discard block
 block discarded – undo
749 749
 
750 750
 <?
751 751
 
752
-$cSQL =	'SELECT b.*
752
+$cSQL = 'SELECT b.*
753 753
 
754 754
 	 FROM pemesanan_barang a left join outlet b
755 755
 
@@ -783,11 +783,11 @@  discard block
 block discarded – undo
783 783
 
784 784
 
785 785
 
786
-$ctampil=mysql_query($cSQL);         
786
+$ctampil = mysql_query($cSQL);         
787 787
 
788 788
                    
789 789
 
790
-$c=mysql_fetch_array($ctampil);	
790
+$c = mysql_fetch_array($ctampil);	
791 791
 
792 792
 
793 793
 
@@ -845,13 +845,13 @@  discard block
 block discarded – undo
845 845
 
846 846
      <th width='15%'  class="iborder" style="text-align: right">Harga</th> 
847 847
 
848
-     <?php if ($mata_uang == '1') { ?> 
848
+     <?php if ($mata_uang=='1') { ?> 
849 849
 
850 850
      <th width='15%'  class="lborder" style="text-align: right">Total</th>
851 851
 
852 852
      <?php } else { ?>
853 853
 
854
-     <th width='10%'  class="iborder" style="text-align: right">Total (<?php echo $curr;?>)</th>
854
+     <th width='10%'  class="iborder" style="text-align: right">Total (<?php echo $curr; ?>)</th>
855 855
 
856 856
      <th width='10%'  class="lborder" style="text-align: right">Total (IDR)</th>
857 857
 
@@ -887,13 +887,13 @@  discard block
 block discarded – undo
887 887
 
888 888
          ";
889 889
 
890
-$dtampil=mysql_query($dSQL);
890
+$dtampil = mysql_query($dSQL);
891 891
 
892 892
 $no = 1;
893 893
 
894 894
             
895 895
 
896
-while ($d=mysql_fetch_array($dtampil)){  
896
+while ($d = mysql_fetch_array($dtampil)) {  
897 897
 
898 898
  
899 899
 
@@ -923,7 +923,7 @@  discard block
 block discarded – undo
923 923
 
924 924
 echo" <td class='border' style='text-align: center;'>"; 
925 925
 
926
- echo $no.'.' ;
926
+ echo $no.'.';
927 927
 
928 928
  echo"</td>"; 
929 929
 
@@ -931,7 +931,7 @@  discard block
 block discarded – undo
931 931
 
932 932
  echo" <td class='border'>"; 
933 933
 
934
- echo $ibarang ;
934
+ echo $ibarang;
935 935
 
936 936
  echo"</td>";  
937 937
 
@@ -961,7 +961,7 @@  discard block
 block discarded – undo
961 961
 
962 962
 
963 963
 
964
- if ($mata_uang == '1') {
964
+ if ($mata_uang=='1') {
965 965
 
966 966
 	 echo" <td  class='border' style='text-align:right;'>"; 
967 967
 
@@ -997,9 +997,9 @@  discard block
 block discarded – undo
997 997
 
998 998
 
999 999
 
1000
-if ($no < 10) {
1000
+if ($no<10) {
1001 1001
 
1002
-		while ($no < 10)  {
1002
+		while ($no<10) {
1003 1003
 
1004 1004
 			   echo "<tr>";
1005 1005
 
@@ -1017,7 +1017,7 @@  discard block
 block discarded – undo
1017 1017
 
1018 1018
 
1019 1019
 
1020
-$sql   = mysql_query("SELECT * FROM pemesanan_barang 
1020
+$sql = mysql_query("SELECT * FROM pemesanan_barang 
1021 1021
 
1022 1022
                         WHERE prd = '$prd' and notrans = '$notrans' and kode = '$kode'
1023 1023
 
@@ -1025,7 +1025,7 @@  discard block
 block discarded – undo
1025 1025
 
1026 1026
                         ");
1027 1027
 
1028
-$r     = mysql_fetch_array($sql); 
1028
+$r = mysql_fetch_array($sql); 
1029 1029
 
1030 1030
 
1031 1031
 
@@ -1053,7 +1053,7 @@  discard block
 block discarded – undo
1053 1053
 
1054 1054
 
1055 1055
 
1056
-if ($mata_uang == '1') {
1056
+if ($mata_uang=='1') {
1057 1057
 
1058 1058
 	$rterbilang = ucwords(Terbilang($igtotal)).' Rupiah';
1059 1059
 
@@ -1087,17 +1087,17 @@  discard block
 block discarded – undo
1087 1087
 
1088 1088
 <td style="text-align:right;border-bottom:1px black solid;">
1089 1089
 
1090
-<?php echo $ctotal;?>
1090
+<?php echo $ctotal; ?>
1091 1091
 
1092 1092
 
1093 1093
 
1094 1094
 </td>
1095 1095
 
1096
-<?php if ($mata_uang != '1') { ?> 
1096
+<?php if ($mata_uang!='1') { ?> 
1097 1097
 
1098 1098
 <td style="text-align:right;border-bottom:1px black solid;">
1099 1099
 
1100
-<?php echo $total;?>
1100
+<?php echo $total; ?>
1101 1101
 
1102 1102
 </td>
1103 1103
 
@@ -1115,29 +1115,29 @@  discard block
 block discarded – undo
1115 1115
 
1116 1116
 <?
1117 1117
 
1118
-$pg_sql   = mysql_query("SELECT * FROM pg_lainnya");
1118
+$pg_sql = mysql_query("SELECT * FROM pg_lainnya");
1119 1119
 
1120
-$pg     = mysql_fetch_array($pg_sql); 
1120
+$pg = mysql_fetch_array($pg_sql); 
1121 1121
 
1122 1122
 $ippn = $pg['ppn'];
1123 1123
 
1124 1124
 ?>
1125 1125
 
1126
-PPN <?php echo $ippn;?> %
1126
+PPN <?php echo $ippn; ?> %
1127 1127
 
1128 1128
 </td>
1129 1129
 
1130 1130
 <td style="text-align:right;border-bottom:1px black solid;">
1131 1131
 
1132
-<?php echo $cppn;?>
1132
+<?php echo $cppn; ?>
1133 1133
 
1134 1134
 </td>
1135 1135
 
1136
-<?php if ($mata_uang != '1') { ?> 
1136
+<?php if ($mata_uang!='1') { ?> 
1137 1137
 
1138 1138
 <td style="text-align:right;border-bottom:1px black solid;">
1139 1139
 
1140
-<?php echo $ppn;?>
1140
+<?php echo $ppn; ?>
1141 1141
 
1142 1142
 </td>
1143 1143
 
@@ -1157,15 +1157,15 @@  discard block
 block discarded – undo
1157 1157
 
1158 1158
 <td style="text-align:right;border-bottom:1px black solid;">
1159 1159
 
1160
-<?php echo $cgtotal;?>
1160
+<?php echo $cgtotal; ?>
1161 1161
 
1162 1162
 </td>
1163 1163
 
1164
-<?php if ($mata_uang != '1') { ?> 
1164
+<?php if ($mata_uang!='1') { ?> 
1165 1165
 
1166 1166
 <td style="text-align:right;border-bottom:1px black solid;">
1167 1167
 
1168
-<?php echo $gtotal;?>
1168
+<?php echo $gtotal; ?>
1169 1169
 
1170 1170
 </td>
1171 1171
 
@@ -1175,7 +1175,7 @@  discard block
 block discarded – undo
1175 1175
 
1176 1176
 
1177 1177
 
1178
-<tr><td colspan="6"><br>Catatan : <?php echo $r['note'];?></td></tr>
1178
+<tr><td colspan="6"><br>Catatan : <?php echo $r['note']; ?></td></tr>
1179 1179
 
1180 1180
 </table>
1181 1181
 
@@ -1187,7 +1187,7 @@  discard block
 block discarded – undo
1187 1187
 
1188 1188
 	
1189 1189
 
1190
-	$tanda_tangan	= mysql_query("SELECT a.judul,a.penanda_tangan FROM tanda_tangan a LEFT JOIN kode_transaksi b 
1190
+	$tanda_tangan = mysql_query("SELECT a.judul,a.penanda_tangan FROM tanda_tangan a LEFT JOIN kode_transaksi b 
1191 1191
 
1192 1192
 							ON a.id_kode_transaksi = b.id_kode_transaksi
1193 1193
 
@@ -1195,17 +1195,17 @@  discard block
 block discarded – undo
1195 1195
 
1196 1196
 
1197 1197
 
1198
-	$jml		= mysql_num_rows($tanda_tangan);
1198
+	$jml = mysql_num_rows($tanda_tangan);
1199 1199
 
1200 1200
 	
1201 1201
 
1202
-	$cp			= $jml +1 ;
1202
+	$cp = $jml + 1;
1203 1203
 
1204 1204
     
1205 1205
 
1206
-	$ps			= 100/$cp;   
1206
+	$ps = 100 / $cp;   
1207 1207
 
1208
-    $user		= $_SESSION['userid'];
1208
+    $user = $_SESSION['userid'];
1209 1209
 
1210 1210
 	
1211 1211
 
@@ -1227,7 +1227,7 @@  discard block
 block discarded – undo
1227 1227
 
1228 1228
     
1229 1229
 
1230
-    <?php while($s   = mysql_fetch_array($tanda_tangan)) { ?>
1230
+    <?php while ($s = mysql_fetch_array($tanda_tangan)) { ?>
1231 1231
 
1232 1232
     <td align="center" width="<?php echo $ps?>%" valign="bottom"><?php echo $s['judul']?></td>
1233 1233
 
@@ -1247,7 +1247,7 @@  discard block
 block discarded – undo
1247 1247
 
1248 1248
     <?
1249 1249
 
1250
-	$tanda_tangan	= mysql_query("SELECT a.judul,a.penanda_tangan FROM tanda_tangan a LEFT JOIN kode_transaksi b 
1250
+	$tanda_tangan = mysql_query("SELECT a.judul,a.penanda_tangan FROM tanda_tangan a LEFT JOIN kode_transaksi b 
1251 1251
 
1252 1252
 							ON a.id_kode_transaksi = b.id_kode_transaksi
1253 1253
 
@@ -1255,7 +1255,7 @@  discard block
 block discarded – undo
1255 1255
 
1256 1256
 	?>    
1257 1257
 
1258
-    <?php while($s   = mysql_fetch_array($tanda_tangan)) { ?>
1258
+    <?php while ($s = mysql_fetch_array($tanda_tangan)) { ?>
1259 1259
 
1260 1260
     <td align="center" width="<?php echo $ps?>%" valign="bottom" style="padding-top:60px;">(<span style="padding-left:10px; padding-right:10px;";><?php echo $s['penanda_tangan']?></span>)</td>
1261 1261
 
@@ -1271,7 +1271,7 @@  discard block
 block discarded – undo
1271 1271
 
1272 1272
     <br><br><br>
1273 1273
 
1274
-    <div>Status Dokumen : <?php echo $istatus;?></div>
1274
+    <div>Status Dokumen : <?php echo $istatus; ?></div>
1275 1275
 
1276 1276
 
1277 1277
 
Please login to merge, or discard this patch.
Braces   +17 added lines, -23 removed lines patch added patch discarded remove patch
@@ -315,37 +315,31 @@
 block discarded – undo
315 315
 
316 316
   $abil = array("", "satu", "dua", "tiga", "empat", "lima", "enam", "tujuh", "delapan", "sembilan", "sepuluh", "sebelas");
317 317
 
318
-  if ($x < 12)
319
-
318
+  if ($x < 12) {
319
+  
320 320
     return " " . $abil[$x];
321
-
322
-  elseif ($x < 20)
323
-
321
+  } elseif ($x < 20) {
322
+  
324 323
     return Terbilang($x - 10) . "belas";
325
-
326
-  elseif ($x < 100)
327
-
324
+  } elseif ($x < 100) {
325
+  
328 326
     return Terbilang($x / 10) . " puluh" . Terbilang($x % 10);
329
-
330
-  elseif ($x < 200)
331
-
327
+  } elseif ($x < 200) {
328
+  
332 329
     return " seratus" . Terbilang($x - 100);
333
-
334
-  elseif ($x < 1000)
335
-
330
+  } elseif ($x < 1000) {
331
+  
336 332
     return Terbilang($x / 100) . " ratus" . Terbilang($x % 100);
337
-
338
-  elseif ($x < 2000)
339
-
333
+  } elseif ($x < 2000) {
334
+  
340 335
     return " seribu" . Terbilang($x - 1000);
341
-
342
-  elseif ($x < 1000000)
343
-
336
+  } elseif ($x < 1000000) {
337
+  
344 338
     return Terbilang($x / 1000) . " ribu" . Terbilang($x % 1000);
345
-
346
-  elseif ($x < 1000000000)
347
-
339
+  } elseif ($x < 1000000000) {
340
+  
348 341
     return Terbilang($x / 1000000) . " juta" . Terbilang($x % 1000000);
342
+  }
349 343
 
350 344
 }
351 345
 
Please login to merge, or discard this patch.
modul/mod_kasir/ecetak_kasir.php 2 patches
Indentation   +105 added lines, -105 removed lines patch added patch discarded remove patch
@@ -54,28 +54,28 @@  discard block
 block discarded – undo
54 54
   
55 55
       <?
56 56
 
57
-       $gtampil=mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'");
57
+        $gtampil=mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'");
58 58
 
59
-       $g=mysql_fetch_array($gtampil);
59
+        $g=mysql_fetch_array($gtampil);
60 60
 
61 61
 
62 62
 
63
-      if ($g['pict']) {
63
+        if ($g['pict']) {
64 64
 
65 65
         $pict = $g['pict'];
66 66
 
67
-      } else {
67
+        } else {
68 68
 
69 69
         $pict = '';
70 70
 
71
-      }
71
+        }
72 72
 
73 73
 
74
-      $company = ucwords($g['company']);
74
+        $company = ucwords($g['company']);
75 75
 
76 76
 
77 77
 
78
-      $sql   = mysql_query("SELECT a.*,b.shift FROM kasir  a LEFT JOIN shift b 
78
+        $sql   = mysql_query("SELECT a.*,b.shift FROM kasir  a LEFT JOIN shift b 
79 79
                             ON a.id_shift = b.id_shift
80 80
                             WHERE a.id_kasir = '$k_ID' 
81 81
 
@@ -83,20 +83,20 @@  discard block
 block discarded – undo
83 83
 
84 84
 
85 85
 
86
-      $r     = mysql_fetch_array($sql); 
86
+        $r     = mysql_fetch_array($sql); 
87 87
 
88 88
 
89
-      $penjualan_barang   = $r['id_kasir'];  
89
+        $penjualan_barang   = $r['id_kasir'];  
90 90
 
91
-      $shift   = $r['shift'];  
91
+        $shift   = $r['shift'];  
92 92
 
93
-      $petugas   = $r['petugas'];  
93
+        $petugas   = $r['petugas'];  
94 94
 
95
-      $status   = $r['status']; 
95
+        $status   = $r['status']; 
96 96
 
97
-      $tanggal   = DATE('d/m/Y',strtotime($r['tanggal']));  
97
+        $tanggal   = DATE('d/m/Y',strtotime($r['tanggal']));  
98 98
 
99
-      ?>
99
+        ?>
100 100
 
101 101
       <table width="100%">
102 102
       <tr>
@@ -132,10 +132,10 @@  discard block
 block discarded – undo
132 132
           
133 133
                 while ($i=mysql_fetch_array($itampil)){  
134 134
 
135
-                  echo "<th>$i[jenis_transaksi]</th>";
135
+                    echo "<th>$i[jenis_transaksi]</th>";
136 136
 
137 137
                 }
138
-               ?>
138
+                ?>
139 139
 
140 140
                <?
141 141
 
@@ -143,10 +143,10 @@  discard block
 block discarded – undo
143 143
           
144 144
                 while ($i=mysql_fetch_array($itampil)){  
145 145
 
146
-                  echo "<th>$i[jenis_pembayaran]</th>";
146
+                    echo "<th>$i[jenis_pembayaran]</th>";
147 147
 
148 148
                 }
149
-               ?>
149
+                ?>
150 150
 
151 151
 
152 152
             </tr> 
@@ -191,46 +191,46 @@  discard block
 block discarded – undo
191 191
 
192 192
              
193 193
 
194
-             $d_id    = $d['id_kasir_detail'];    
194
+                $d_id    = $d['id_kasir_detail'];    
195 195
 
196 196
 
197 197
 
198
-             $ijumlah = number_format($d['jumlah'], 0, ".", ",");
198
+                $ijumlah = number_format($d['jumlah'], 0, ".", ",");
199 199
 
200
-             $jumlah = number_format($d['jumlah'], 0, ".", ",");
200
+                $jumlah = number_format($d['jumlah'], 0, ".", ",");
201 201
 
202
-             $total =  $total+$d['jumlah'];
202
+                $total =  $total+$d['jumlah'];
203 203
 
204
-             $itotal = number_format($total, 0, ".", ",");
204
+                $itotal = number_format($total, 0, ".", ",");
205 205
 
206 206
 
207
-             echo"<tr>";
207
+                echo"<tr>";
208 208
 
209
-             echo" <td>"; 
209
+                echo" <td>"; 
210 210
 
211
-             echo $no ;
211
+                echo $no ;
212 212
 
213
-             echo"</td>";  
213
+                echo"</td>";  
214 214
 
215 215
 
216
-             echo" <td>"; 
216
+                echo" <td>"; 
217 217
 
218
-             echo $d['notrans'] ;
218
+                echo $d['notrans'] ;
219 219
 
220
-             echo"</td>";  
220
+                echo"</td>";  
221 221
 
222
-             echo" <td>"; 
222
+                echo" <td>"; 
223 223
 
224
-             echo $d['pasien'] ;
224
+                echo $d['pasien'] ;
225 225
 
226
-             echo"</td>"; 
226
+                echo"</td>"; 
227 227
 
228 228
 
229
-              $itampil=mysql_query("SELECT * FROM jenis_transaksi where aktif = 'Y' ORDER BY id_jenis_transaksi");
229
+                $itampil=mysql_query("SELECT * FROM jenis_transaksi where aktif = 'Y' ORDER BY id_jenis_transaksi");
230 230
           
231 231
                 while ($i=mysql_fetch_array($itampil)){  
232 232
 
233
-                  $jtampil=mysql_query("SELECT b.jumlah FROM kasir a INNER JOIN kasir_detail b 
233
+                    $jtampil=mysql_query("SELECT b.jumlah FROM kasir a INNER JOIN kasir_detail b 
234 234
                                          ON a.id_kasir = b.id_kasir 
235 235
                                          where a.tanggal = '$r[tanggal]'
236 236
                                          AND a.id_shift  = '$r[id_shift]'
@@ -239,26 +239,26 @@  discard block
 block discarded – undo
239 239
                                          AND b.status <> '4'
240 240
                                          "); 
241 241
 
242
-                  $j=mysql_fetch_array($jtampil);
242
+                    $j=mysql_fetch_array($jtampil);
243 243
 
244
-                  if ($j[jumlah]) {
244
+                    if ($j[jumlah]) {
245 245
                     $jml = number_format($j['jumlah'], 0, ".", ",");
246
-                  } else {
246
+                    } else {
247 247
                     $jml = 0;
248
-                  }
248
+                    }
249 249
                   
250
-                  echo "<td  style='text-align:right;'>$jml</td>";
250
+                    echo "<td  style='text-align:right;'>$jml</td>";
251 251
 
252
-             }
252
+                }
253 253
 
254 254
              
255
-               $itampil=mysql_query("SELECT * FROM jenis_pembayaran where aktif = 'Y' ORDER BY id_jenis_pembayaran");
255
+                $itampil=mysql_query("SELECT * FROM jenis_pembayaran where aktif = 'Y' ORDER BY id_jenis_pembayaran");
256 256
           
257 257
                 while ($i=mysql_fetch_array($itampil)){  
258 258
 
259 259
                 
260 260
 
261
-                  $pSQL = "SELECT  sum(a.jumlah) as jumlah 
261
+                    $pSQL = "SELECT  sum(a.jumlah) as jumlah 
262 262
 
263 263
                          FROM kasir_detail a LEFT JOIN jenis_transaksi b
264 264
 
@@ -295,22 +295,22 @@  discard block
 block discarded – undo
295 295
                                
296 296
                 $p=mysql_fetch_array($ptampil);
297 297
 
298
-                     if ($p[jumlah]) {
298
+                        if ($p[jumlah]) {
299 299
                         $jml = number_format($p['jumlah'], 0, ".", ",");
300
-                     } else {
300
+                        } else {
301 301
                         $jml = 0;
302
-                     }
302
+                        }
303 303
 
304
-                     echo"<td  style='text-align:right;'>$jml </td>"; 
304
+                        echo"<td  style='text-align:right;'>$jml </td>"; 
305 305
 
306 306
                 
307 307
 
308
-             }    
308
+                }    
309 309
              
310 310
            
311
-             echo" <td>"; 
311
+                echo" <td>"; 
312 312
 
313
-              $jtampil=mysql_query("SELECT b.ket  FROM kasir a INNER JOIN kasir_detail b 
313
+                $jtampil=mysql_query("SELECT b.ket  FROM kasir a INNER JOIN kasir_detail b 
314 314
                                          ON a.id_kasir = b.id_kasir 
315 315
                                          where a.tanggal = '$r[tanggal]'
316 316
                                          AND a.id_shift  = '$r[id_shift]'
@@ -319,20 +319,20 @@  discard block
 block discarded – undo
319 319
 
320 320
                 $j=mysql_fetch_array($jtampil);
321 321
 
322
-              echo $j[ket];
322
+                echo $j[ket];
323 323
 
324
-              if ($d['penjamin']) {
324
+                if ($d['penjamin']) {
325 325
                 echo'<br>'.'('.$d['penjamin'].')';
326
-              }
326
+                }
327 327
                 
328
-             echo"</td>";    
328
+                echo"</td>";    
329 329
 
330 330
 
331
-                 echo "</tr>";  
331
+                    echo "</tr>";  
332 332
                
333
-               $no++;
334
-               } 
335
-             ?>
333
+                $no++;
334
+                } 
335
+                ?>
336 336
              </tbody> 
337 337
 
338 338
              <tfoot>
@@ -345,11 +345,11 @@  discard block
 block discarded – undo
345 345
 
346 346
                <?
347 347
 
348
-                          $itampil=mysql_query("SELECT * FROM jenis_transaksi where aktif = 'Y' ORDER BY id_jenis_transaksi");
348
+                            $itampil=mysql_query("SELECT * FROM jenis_transaksi where aktif = 'Y' ORDER BY id_jenis_transaksi");
349 349
                       
350 350
                             while ($i=mysql_fetch_array($itampil)){  
351 351
 
352
-                              $jtampil=mysql_query("SELECT sum(b.jumlah) as jumlah FROM kasir a INNER JOIN kasir_detail b 
352
+                                $jtampil=mysql_query("SELECT sum(b.jumlah) as jumlah FROM kasir a INNER JOIN kasir_detail b 
353 353
                                                      ON a.id_kasir = b.id_kasir 
354 354
                                                      where a.tanggal = '$r[tanggal]'
355 355
                                                      AND a.id_shift  = '$r[id_shift]'
@@ -357,25 +357,25 @@  discard block
 block discarded – undo
357 357
                                                      AND b.status <> '4'
358 358
                                                      "); 
359 359
 
360
-                              $j=mysql_fetch_array($jtampil);
360
+                                $j=mysql_fetch_array($jtampil);
361 361
 
362
-                              if ($j[jumlah]) {
362
+                                if ($j[jumlah]) {
363 363
                                 $jml = number_format($j['jumlah'], 0, ".", ",");
364
-                              } else {
364
+                                } else {
365 365
                                 $jml = 0;
366
-                              }
366
+                                }
367 367
                               
368
-                              echo "<th  style='text-align:right;'>$jml</th>";
368
+                                echo "<th  style='text-align:right;'>$jml</th>";
369 369
 
370
-                         }
370
+                            }
371 371
 
372 372
                 
373 373
                 ?>        
374 374
 
375 375
                  <?
376
-                 $itampil=mysql_query("SELECT * FROM jenis_pembayaran where aktif = 'Y' ORDER BY id_jenis_pembayaran");
376
+                    $itampil=mysql_query("SELECT * FROM jenis_pembayaran where aktif = 'Y' ORDER BY id_jenis_pembayaran");
377 377
             
378
-                  while ($i=mysql_fetch_array($itampil)){  
378
+                    while ($i=mysql_fetch_array($itampil)){  
379 379
 
380 380
                   
381 381
 
@@ -409,24 +409,24 @@  discard block
 block discarded – undo
409 409
 
410 410
 
411 411
 
412
-                  $ptampil=mysql_query($pSQL);
412
+                    $ptampil=mysql_query($pSQL);
413 413
 
414 414
                                  
415
-                  $p=mysql_fetch_array($ptampil);
415
+                    $p=mysql_fetch_array($ptampil);
416 416
 
417
-                       if ($p[jumlah]) {
418
-                          $jml = number_format($p['jumlah'], 0, ".", ",");
419
-                       } else {
420
-                          $jml = 0;
421
-                       }
417
+                        if ($p[jumlah]) {
418
+                            $jml = number_format($p['jumlah'], 0, ".", ",");
419
+                        } else {
420
+                            $jml = 0;
421
+                        }
422 422
 
423
-                       echo"<th  style='text-align:right;'>$jml </th>"; 
423
+                        echo"<th  style='text-align:right;'>$jml </th>"; 
424 424
 
425 425
                   
426 426
 
427
-               }    
427
+                }    
428 428
                
429
-               ?> 
429
+                ?> 
430 430
        
431 431
                <th></th> 
432 432
 
@@ -446,20 +446,20 @@  discard block
 block discarded – undo
446 446
 
447 447
             <?    
448 448
 
449
-                 if($r[id_shift] == '1') {
450
-                  $id_shift = '1';
451
-                 } else {
452
-                  $id_shift = '%';
453
-                 }
449
+                    if($r[id_shift] == '1') {
450
+                    $id_shift = '1';
451
+                    } else {
452
+                    $id_shift = '%';
453
+                    }
454 454
 
455 455
     
456
-                 $itampil=mysql_query("SELECT * FROM shift where aktif = 'Y' and id_shift LIKE '$id_shift' ORDER BY id_shift");
456
+                    $itampil=mysql_query("SELECT * FROM shift where aktif = 'Y' and id_shift LIKE '$id_shift' ORDER BY id_shift");
457 457
             
458
-                  while ($i=mysql_fetch_array($itampil)){  
458
+                    while ($i=mysql_fetch_array($itampil)){  
459 459
 
460
-                  $shift = $i['shift'];
460
+                    $shift = $i['shift'];
461 461
 
462
-             ?>       
462
+                ?>       
463 463
 
464 464
                     <tr>
465 465
                     <th></th>
@@ -505,11 +505,11 @@  discard block
 block discarded – undo
505 505
                                        
506 506
                         $p=mysql_fetch_array($ptampil);
507 507
 
508
-                             if ($p[jumlah]) {
508
+                                if ($p[jumlah]) {
509 509
                                 $cash = number_format($p['jumlah'], 0, ".", ",");
510
-                             } else {
510
+                                } else {
511 511
                                 $cash = 0;
512
-                             }
512
+                                }
513 513
 
514 514
                         ?>
515 515
                     <th style="text-align: right;"><?=$cash;?></th>
@@ -553,11 +553,11 @@  discard block
 block discarded – undo
553 553
                                        
554 554
                         $p=mysql_fetch_array($ptampil);
555 555
 
556
-                             if ($p[jumlah]) {
556
+                                if ($p[jumlah]) {
557 557
                                 $credit = number_format($p['jumlah'], 0, ".", ",");
558
-                             } else {
558
+                                } else {
559 559
                                 $credit= 0;
560
-                             }
560
+                                }
561 561
 
562 562
                         ?>
563 563
 
@@ -569,9 +569,9 @@  discard block
 block discarded – undo
569 569
                <?     
570 570
                   
571 571
 
572
-               }    
572
+                }    
573 573
                
574
-               ?> 
574
+                ?> 
575 575
 
576 576
                <? if ($id_shift == '%') { ?>
577 577
                <tr>
@@ -616,11 +616,11 @@  discard block
 block discarded – undo
616 616
                                        
617 617
                         $p=mysql_fetch_array($ptampil);
618 618
 
619
-                             if ($p[jumlah]) {
619
+                                if ($p[jumlah]) {
620 620
                                 $cash = number_format($p['jumlah'], 0, ".", ",");
621
-                             } else {
621
+                                } else {
622 622
                                 $cash = 0;
623
-                             }
623
+                                }
624 624
 
625 625
                         ?>
626 626
                     <th style="text-align: right;"><?=$cash;?></th>
@@ -662,11 +662,11 @@  discard block
 block discarded – undo
662 662
                                        
663 663
                         $p=mysql_fetch_array($ptampil);
664 664
 
665
-                             if ($p[jumlah]) {
665
+                                if ($p[jumlah]) {
666 666
                                 $credit = number_format($p['jumlah'], 0, ".", ",");
667
-                             } else {
667
+                                } else {
668 668
                                 $credit= 0;
669
-                             }
669
+                                }
670 670
 
671 671
                         ?>
672 672
 
@@ -728,13 +728,13 @@  discard block
 block discarded – undo
728 728
                                        
729 729
                         $p=mysql_fetch_array($ptampil);
730 730
 
731
-                             if ($p[jumlah]) {
731
+                                if ($p[jumlah]) {
732 732
                                 $total = number_format($p['jumlah'], 0, ".", ",");
733
-                             } else {
733
+                                } else {
734 734
                                 $total = 0;
735
-                             }
735
+                                }
736 736
 
737
-              ?>
737
+                ?>
738 738
 
739 739
 
740 740
                 <tr>
Please login to merge, or discard this patch.
Spacing   +72 added lines, -72 removed lines patch added patch discarded remove patch
@@ -16,11 +16,11 @@  discard block
 block discarded – undo
16 16
 
17 17
 
18 18
 $report_id = $_GET[report_id];
19
-$tampil=mysql_query("SELECT * FROM modul WHERE id_modul ='".$report_id."'");
19
+$tampil = mysql_query("SELECT * FROM modul WHERE id_modul ='".$report_id."'");
20 20
 
21 21
             
22 22
 
23
-$r=mysql_fetch_array($tampil);
23
+$r = mysql_fetch_array($tampil);
24 24
 
25 25
 //module=$module&report_id=$report_id&k_ID=$k_ID
26 26
 
@@ -28,14 +28,14 @@  discard block
 block discarded – undo
28 28
 
29 29
 $imodule  = ucwords($r['nama_modul']);
30 30
 
31
-$nmmodule   = ucwords($r['nama_modul']);
31
+$nmmodule = ucwords($r['nama_modul']);
32 32
 
33
-$id       = $r['id_modul'];
33
+$id = $r['id_modul'];
34 34
 
35
-$fa_icon    = $r['fa_icon'];
35
+$fa_icon = $r['fa_icon'];
36 36
 
37 37
 
38
-$k_ID  = $_GET['k_ID'];
38
+$k_ID = $_GET['k_ID'];
39 39
  
40 40
 ?>
41 41
 
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 <meta charset="utf-8">
45 45
 <meta http-equiv="X-UA-Compatible" content="IE=edge">
46 46
 <link rel="shortcut icon" type="image/x-icon" href="../images/favicon.png">
47
-<title><?php echo $imodule ;?> </title>
47
+<title><?php echo $imodule; ?> </title>
48 48
 
49 49
 </head>
50 50
 
@@ -54,9 +54,9 @@  discard block
 block discarded – undo
54 54
   
55 55
       <?
56 56
 
57
-       $gtampil=mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'");
57
+       $gtampil = mysql_query("SELECT * FROM informasi_perusahaan where id_informasi_perusahaan = '1'");
58 58
 
59
-       $g=mysql_fetch_array($gtampil);
59
+       $g = mysql_fetch_array($gtampil);
60 60
 
61 61
 
62 62
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 
76 76
 
77 77
 
78
-      $sql   = mysql_query("SELECT a.*,b.shift FROM kasir  a LEFT JOIN shift b 
78
+      $sql = mysql_query("SELECT a.*,b.shift FROM kasir  a LEFT JOIN shift b 
79 79
                             ON a.id_shift = b.id_shift
80 80
                             WHERE a.id_kasir = '$k_ID' 
81 81
 
@@ -83,30 +83,30 @@  discard block
 block discarded – undo
83 83
 
84 84
 
85 85
 
86
-      $r     = mysql_fetch_array($sql); 
86
+      $r = mysql_fetch_array($sql); 
87 87
 
88 88
 
89
-      $penjualan_barang   = $r['id_kasir'];  
89
+      $penjualan_barang = $r['id_kasir'];  
90 90
 
91
-      $shift   = $r['shift'];  
91
+      $shift = $r['shift'];  
92 92
 
93
-      $petugas   = $r['petugas'];  
93
+      $petugas = $r['petugas'];  
94 94
 
95
-      $status   = $r['status']; 
95
+      $status = $r['status']; 
96 96
 
97
-      $tanggal   = DATE('d/m/Y',strtotime($r['tanggal']));  
97
+      $tanggal = DATE('d/m/Y', strtotime($r['tanggal']));  
98 98
 
99 99
       ?>
100 100
 
101 101
       <table width="100%">
102 102
       <tr>
103
-      <td style="text-align: center;" colspan="12"><h4 ><?=$company;?><br><?=$nmmodule;?></h4></td>
103
+      <td style="text-align: center;" colspan="12"><h4 ><?=$company; ?><br><?=$nmmodule; ?></h4></td>
104 104
       </tr>
105 105
        <tr><td>&nbsp</td></tr>
106 106
        <tr>
107
-        <td width="20%" style="font-size: 11px;" colspan="2">Tanggal : <?=$tanggal;?></td>
107
+        <td width="20%" style="font-size: 11px;" colspan="2">Tanggal : <?=$tanggal; ?></td>
108 108
         <td width="2%">&nbsp&nbsp</td>
109
-        <td style="font-size: 11px;">Shift : <?=$shift;?></td>
109
+        <td style="font-size: 11px;">Shift : <?=$shift; ?></td>
110 110
         <td width="7%">&nbsp&nbsp</td>
111 111
         </tr>
112 112
         <tr><td>&nbsp</td></tr>
@@ -128,9 +128,9 @@  discard block
 block discarded – undo
128 128
             <tr>
129 129
                <?
130 130
 
131
-                $itampil=mysql_query("SELECT * FROM jenis_transaksi where aktif = 'Y' ORDER BY id_jenis_transaksi");
131
+                $itampil = mysql_query("SELECT * FROM jenis_transaksi where aktif = 'Y' ORDER BY id_jenis_transaksi");
132 132
           
133
-                while ($i=mysql_fetch_array($itampil)){  
133
+                while ($i = mysql_fetch_array($itampil)) {  
134 134
 
135 135
                   echo "<th>$i[jenis_transaksi]</th>";
136 136
 
@@ -139,9 +139,9 @@  discard block
 block discarded – undo
139 139
 
140 140
                <?
141 141
 
142
-                $itampil=mysql_query("SELECT * FROM jenis_pembayaran where aktif = 'Y' ORDER BY id_jenis_pembayaran");
142
+                $itampil = mysql_query("SELECT * FROM jenis_pembayaran where aktif = 'Y' ORDER BY id_jenis_pembayaran");
143 143
           
144
-                while ($i=mysql_fetch_array($itampil)){  
144
+                while ($i = mysql_fetch_array($itampil)) {  
145 145
 
146 146
                   echo "<th>$i[jenis_pembayaran]</th>";
147 147
 
@@ -183,15 +183,15 @@  discard block
 block discarded – undo
183 183
 
184 184
 
185 185
 
186
-            $dtampil=mysql_query($dSQL);
186
+            $dtampil = mysql_query($dSQL);
187 187
 
188 188
             $no = 1;                        
189 189
 
190
-            while ($d=mysql_fetch_array($dtampil)){  
190
+            while ($d = mysql_fetch_array($dtampil)) {  
191 191
 
192 192
              
193 193
 
194
-             $d_id    = $d['id_kasir_detail'];    
194
+             $d_id = $d['id_kasir_detail'];    
195 195
 
196 196
 
197 197
 
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
 
200 200
              $jumlah = number_format($d['jumlah'], 0, ".", ",");
201 201
 
202
-             $total =  $total+$d['jumlah'];
202
+             $total = $total + $d['jumlah'];
203 203
 
204 204
              $itotal = number_format($total, 0, ".", ",");
205 205
 
@@ -208,29 +208,29 @@  discard block
 block discarded – undo
208 208
 
209 209
              echo" <td>"; 
210 210
 
211
-             echo $no ;
211
+             echo $no;
212 212
 
213 213
              echo"</td>";  
214 214
 
215 215
 
216 216
              echo" <td>"; 
217 217
 
218
-             echo $d['notrans'] ;
218
+             echo $d['notrans'];
219 219
 
220 220
              echo"</td>";  
221 221
 
222 222
              echo" <td>"; 
223 223
 
224
-             echo $d['pasien'] ;
224
+             echo $d['pasien'];
225 225
 
226 226
              echo"</td>"; 
227 227
 
228 228
 
229
-              $itampil=mysql_query("SELECT * FROM jenis_transaksi where aktif = 'Y' ORDER BY id_jenis_transaksi");
229
+              $itampil = mysql_query("SELECT * FROM jenis_transaksi where aktif = 'Y' ORDER BY id_jenis_transaksi");
230 230
           
231
-                while ($i=mysql_fetch_array($itampil)){  
231
+                while ($i = mysql_fetch_array($itampil)) {  
232 232
 
233
-                  $jtampil=mysql_query("SELECT b.jumlah FROM kasir a INNER JOIN kasir_detail b 
233
+                  $jtampil = mysql_query("SELECT b.jumlah FROM kasir a INNER JOIN kasir_detail b 
234 234
                                          ON a.id_kasir = b.id_kasir 
235 235
                                          where a.tanggal = '$r[tanggal]'
236 236
                                          AND a.id_shift  = '$r[id_shift]'
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
                                          AND b.status <> '4'
240 240
                                          "); 
241 241
 
242
-                  $j=mysql_fetch_array($jtampil);
242
+                  $j = mysql_fetch_array($jtampil);
243 243
 
244 244
                   if ($j[jumlah]) {
245 245
                     $jml = number_format($j['jumlah'], 0, ".", ",");
@@ -252,9 +252,9 @@  discard block
 block discarded – undo
252 252
              }
253 253
 
254 254
              
255
-               $itampil=mysql_query("SELECT * FROM jenis_pembayaran where aktif = 'Y' ORDER BY id_jenis_pembayaran");
255
+               $itampil = mysql_query("SELECT * FROM jenis_pembayaran where aktif = 'Y' ORDER BY id_jenis_pembayaran");
256 256
           
257
-                while ($i=mysql_fetch_array($itampil)){  
257
+                while ($i = mysql_fetch_array($itampil)) {  
258 258
 
259 259
                 
260 260
 
@@ -290,10 +290,10 @@  discard block
 block discarded – undo
290 290
 
291 291
 
292 292
 
293
-                $ptampil=mysql_query($pSQL);
293
+                $ptampil = mysql_query($pSQL);
294 294
 
295 295
                                
296
-                $p=mysql_fetch_array($ptampil);
296
+                $p = mysql_fetch_array($ptampil);
297 297
 
298 298
                      if ($p[jumlah]) {
299 299
                         $jml = number_format($p['jumlah'], 0, ".", ",");
@@ -310,14 +310,14 @@  discard block
 block discarded – undo
310 310
            
311 311
              echo" <td>"; 
312 312
 
313
-              $jtampil=mysql_query("SELECT b.ket  FROM kasir a INNER JOIN kasir_detail b 
313
+              $jtampil = mysql_query("SELECT b.ket  FROM kasir a INNER JOIN kasir_detail b 
314 314
                                          ON a.id_kasir = b.id_kasir 
315 315
                                          where a.tanggal = '$r[tanggal]'
316 316
                                          AND a.id_shift  = '$r[id_shift]'
317 317
                                          AND b.notrans  = '$d[notrans]'
318 318
                                          "); 
319 319
 
320
-                $j=mysql_fetch_array($jtampil);
320
+                $j = mysql_fetch_array($jtampil);
321 321
 
322 322
               echo $j[ket];
323 323
 
@@ -345,11 +345,11 @@  discard block
 block discarded – undo
345 345
 
346 346
                <?
347 347
 
348
-                          $itampil=mysql_query("SELECT * FROM jenis_transaksi where aktif = 'Y' ORDER BY id_jenis_transaksi");
348
+                          $itampil = mysql_query("SELECT * FROM jenis_transaksi where aktif = 'Y' ORDER BY id_jenis_transaksi");
349 349
                       
350
-                            while ($i=mysql_fetch_array($itampil)){  
350
+                            while ($i = mysql_fetch_array($itampil)) {  
351 351
 
352
-                              $jtampil=mysql_query("SELECT sum(b.jumlah) as jumlah FROM kasir a INNER JOIN kasir_detail b 
352
+                              $jtampil = mysql_query("SELECT sum(b.jumlah) as jumlah FROM kasir a INNER JOIN kasir_detail b 
353 353
                                                      ON a.id_kasir = b.id_kasir 
354 354
                                                      where a.tanggal = '$r[tanggal]'
355 355
                                                      AND a.id_shift  = '$r[id_shift]'
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
                                                      AND b.status <> '4'
358 358
                                                      "); 
359 359
 
360
-                              $j=mysql_fetch_array($jtampil);
360
+                              $j = mysql_fetch_array($jtampil);
361 361
 
362 362
                               if ($j[jumlah]) {
363 363
                                 $jml = number_format($j['jumlah'], 0, ".", ",");
@@ -373,9 +373,9 @@  discard block
 block discarded – undo
373 373
                 ?>        
374 374
 
375 375
                  <?
376
-                 $itampil=mysql_query("SELECT * FROM jenis_pembayaran where aktif = 'Y' ORDER BY id_jenis_pembayaran");
376
+                 $itampil = mysql_query("SELECT * FROM jenis_pembayaran where aktif = 'Y' ORDER BY id_jenis_pembayaran");
377 377
             
378
-                  while ($i=mysql_fetch_array($itampil)){  
378
+                  while ($i = mysql_fetch_array($itampil)) {  
379 379
 
380 380
                   
381 381
 
@@ -409,10 +409,10 @@  discard block
 block discarded – undo
409 409
 
410 410
 
411 411
 
412
-                  $ptampil=mysql_query($pSQL);
412
+                  $ptampil = mysql_query($pSQL);
413 413
 
414 414
                                  
415
-                  $p=mysql_fetch_array($ptampil);
415
+                  $p = mysql_fetch_array($ptampil);
416 416
 
417 417
                        if ($p[jumlah]) {
418 418
                           $jml = number_format($p['jumlah'], 0, ".", ",");
@@ -446,16 +446,16 @@  discard block
 block discarded – undo
446 446
 
447 447
             <?    
448 448
 
449
-                 if($r[id_shift] == '1') {
449
+                 if ($r[id_shift]=='1') {
450 450
                   $id_shift = '1';
451 451
                  } else {
452 452
                   $id_shift = '%';
453 453
                  }
454 454
 
455 455
     
456
-                 $itampil=mysql_query("SELECT * FROM shift where aktif = 'Y' and id_shift LIKE '$id_shift' ORDER BY id_shift");
456
+                 $itampil = mysql_query("SELECT * FROM shift where aktif = 'Y' and id_shift LIKE '$id_shift' ORDER BY id_shift");
457 457
             
458
-                  while ($i=mysql_fetch_array($itampil)){  
458
+                  while ($i = mysql_fetch_array($itampil)) {  
459 459
 
460 460
                   $shift = $i['shift'];
461 461
 
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
                     <th></th>
466 466
                     <th></th>
467 467
                     <th colspan="3" style="text-align: left;">Total Seluruh Omzet 
468
-                    <span style='text-transform: capitalize;'><? echo ucfirst(strtolower(($shift)));?></span></th>
468
+                    <span style='text-transform: capitalize;'><? echo ucfirst(strtolower(($shift))); ?></span></th>
469 469
                     <th style="text-align: left;">Cash</th>
470 470
                     <?
471 471
                             
@@ -500,10 +500,10 @@  discard block
 block discarded – undo
500 500
 
501 501
 
502 502
 
503
-                        $ptampil=mysql_query($pSQL);
503
+                        $ptampil = mysql_query($pSQL);
504 504
 
505 505
                                        
506
-                        $p=mysql_fetch_array($ptampil);
506
+                        $p = mysql_fetch_array($ptampil);
507 507
 
508 508
                              if ($p[jumlah]) {
509 509
                                 $cash = number_format($p['jumlah'], 0, ".", ",");
@@ -512,7 +512,7 @@  discard block
 block discarded – undo
512 512
                              }
513 513
 
514 514
                         ?>
515
-                    <th style="text-align: right;"><?=$cash;?></th>
515
+                    <th style="text-align: right;"><?=$cash; ?></th>
516 516
                     <th style="text-align: left;">Credit</th>
517 517
 
518 518
                     <?
@@ -548,20 +548,20 @@  discard block
 block discarded – undo
548 548
 
549 549
 
550 550
 
551
-                        $ptampil=mysql_query($pSQL);
551
+                        $ptampil = mysql_query($pSQL);
552 552
 
553 553
                                        
554
-                        $p=mysql_fetch_array($ptampil);
554
+                        $p = mysql_fetch_array($ptampil);
555 555
 
556 556
                              if ($p[jumlah]) {
557 557
                                 $credit = number_format($p['jumlah'], 0, ".", ",");
558 558
                              } else {
559
-                                $credit= 0;
559
+                                $credit = 0;
560 560
                              }
561 561
 
562 562
                         ?>
563 563
 
564
-                    <th style="text-align: right;"><?=$credit;?></th>
564
+                    <th style="text-align: right;"><?=$credit; ?></th>
565 565
                     <th colspan="4"></th>
566 566
                     </tr> 
567 567
 
@@ -573,11 +573,11 @@  discard block
 block discarded – undo
573 573
                
574 574
                ?> 
575 575
 
576
-               <? if ($id_shift == '%') { ?>
576
+               <? if ($id_shift=='%') { ?>
577 577
                <tr>
578 578
                     <th></th>
579 579
                     <th></th>
580
-                    <th colspan="3" style="text-align: left;">Total Omzet Tgl. <?=$tanggal;?>  </th>
580
+                    <th colspan="3" style="text-align: left;">Total Omzet Tgl. <?=$tanggal; ?>  </th>
581 581
                     <th style="text-align: left;">Cash</th>
582 582
                     <?
583 583
                             
@@ -611,10 +611,10 @@  discard block
 block discarded – undo
611 611
 
612 612
 
613 613
 
614
-                        $ptampil=mysql_query($pSQL);
614
+                        $ptampil = mysql_query($pSQL);
615 615
 
616 616
                                        
617
-                        $p=mysql_fetch_array($ptampil);
617
+                        $p = mysql_fetch_array($ptampil);
618 618
 
619 619
                              if ($p[jumlah]) {
620 620
                                 $cash = number_format($p['jumlah'], 0, ".", ",");
@@ -623,7 +623,7 @@  discard block
 block discarded – undo
623 623
                              }
624 624
 
625 625
                         ?>
626
-                    <th style="text-align: right;"><?=$cash;?></th>
626
+                    <th style="text-align: right;"><?=$cash; ?></th>
627 627
                     <th style="text-align: left;">Credit</th>
628 628
 
629 629
                     <?
@@ -657,20 +657,20 @@  discard block
 block discarded – undo
657 657
 
658 658
 
659 659
 
660
-                        $ptampil=mysql_query($pSQL);
660
+                        $ptampil = mysql_query($pSQL);
661 661
 
662 662
                                        
663
-                        $p=mysql_fetch_array($ptampil);
663
+                        $p = mysql_fetch_array($ptampil);
664 664
 
665 665
                              if ($p[jumlah]) {
666 666
                                 $credit = number_format($p['jumlah'], 0, ".", ",");
667 667
                              } else {
668
-                                $credit= 0;
668
+                                $credit = 0;
669 669
                              }
670 670
 
671 671
                         ?>
672 672
 
673
-                    <th style="text-align: right;"><?=$credit;?></th>
673
+                    <th style="text-align: right;"><?=$credit; ?></th>
674 674
                     <th colspan="4"></th>
675 675
                     </tr> 
676 676
 
@@ -723,10 +723,10 @@  discard block
 block discarded – undo
723 723
 
724 724
 
725 725
 
726
-                        $ptampil=mysql_query($pSQL);
726
+                        $ptampil = mysql_query($pSQL);
727 727
 
728 728
                                        
729
-                        $p=mysql_fetch_array($ptampil);
729
+                        $p = mysql_fetch_array($ptampil);
730 730
 
731 731
                              if ($p[jumlah]) {
732 732
                                 $total = number_format($p['jumlah'], 0, ".", ",");
@@ -740,7 +740,7 @@  discard block
 block discarded – undo
740 740
                 <tr>
741 741
                     <th style="border:none;">&nbsp</th>
742 742
                     <th colspan="5" style="text-align: left;">Disetorkan Ke Bendahara</th>
743
-                    <th style="text-align: right;"><?=$total;?></th>  
743
+                    <th style="text-align: right;"><?=$total; ?></th>  
744 744
                     <th style="" colspan="6">&nbsp</th>  
745 745
                 </tr>    
746 746
 
@@ -775,7 +775,7 @@  discard block
 block discarded – undo
775 775
         <tr>
776 776
                     <th style="border:none;">&nbsp</th>
777 777
                     <th style="border:none;">&nbsp</th>
778
-                    <th style="text-align: center;">(<?=$petugas;?>)</th>
778
+                    <th style="text-align: center;">(<?=$petugas; ?>)</th>
779 779
                     <th style="border:none;">&nbsp</th>
780 780
                     <th style="border:none;">&nbsp</th>
781 781
                     <th style="text-align: center;">
Please login to merge, or discard this patch.
modul/mod_kategori/kategori.php 3 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -56,13 +56,13 @@
 block discarded – undo
56 56
             echo" <td  style='text-align:center;'>";
57 57
 
58 58
             if($r_edit == 'Y') {
59
-               echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_kategori=$r[id_kategori]&id_module=$id&width=720&height=560&module=$module&TB_iframe=true' title='Update $nmmodule'><span class='icon'><i class='fa fa-pencil'></i></span></a>";
60
-               }
59
+                echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_kategori=$r[id_kategori]&id_module=$id&width=720&height=560&module=$module&TB_iframe=true' title='Update $nmmodule'><span class='icon'><i class='fa fa-pencil'></i></span></a>";
60
+                }
61 61
 
62 62
                
63
-               // if($r_delete == 'Y') {
64
-               // echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$r[id_kategori]&id_module=$id' onClick=\"return confirm('Hapus data ?')\" title='Delete $nmmodule'><span class='icon'><i class='fa fa-trash'></i></span></a>";
65
-               // }  
63
+                // if($r_delete == 'Y') {
64
+                // echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$r[id_kategori]&id_module=$id' onClick=\"return confirm('Hapus data ?')\" title='Delete $nmmodule'><span class='icon'><i class='fa fa-trash'></i></span></a>";
65
+                // }  
66 66
             echo"</td>";              
67 67
                                 echo"</tr>";
68 68
                                 $no++;
Please login to merge, or discard this patch.
Switch Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@  discard block
 block discarded – undo
2 2
 <?php
3 3
 switch($_GET[act]){
4 4
 
5
-default:  
6
-  ?>
5
+    default:  
6
+      ?>
7 7
 
8 8
  <div class="">
9 9
                    
@@ -43,32 +43,32 @@  discard block
 block discarded – undo
43 43
                             
44 44
                          <?
45 45
                         
46
-            $tampil=mysql_query("SELECT * FROM kategori ORDER BY id_kategori");
46
+                $tampil=mysql_query("SELECT * FROM kategori ORDER BY id_kategori");
47 47
             
48
-            $no = 1;
48
+                $no = 1;
49 49
             
50
-            while ($r=mysql_fetch_array($tampil)){  
50
+                while ($r=mysql_fetch_array($tampil)){  
51 51
 
52 52
             
53
-            echo"<tr>";
54
-            echo"<td>$r[kategori]</td>";
55
-            echo"<td style='text-align:center;'>$r[aktif]</td>";  
56
-            echo" <td  style='text-align:center;'>";
53
+                echo"<tr>";
54
+                echo"<td>$r[kategori]</td>";
55
+                echo"<td style='text-align:center;'>$r[aktif]</td>";  
56
+                echo" <td  style='text-align:center;'>";
57 57
 
58
-            if($r_edit == 'Y') {
59
-               echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_kategori=$r[id_kategori]&id_module=$id&width=720&height=560&module=$module&TB_iframe=true' title='Update $nmmodule'><span class='icon'><i class='fa fa-pencil'></i></span></a>";
60
-               }
58
+                if($r_edit == 'Y') {
59
+                   echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_kategori=$r[id_kategori]&id_module=$id&width=720&height=560&module=$module&TB_iframe=true' title='Update $nmmodule'><span class='icon'><i class='fa fa-pencil'></i></span></a>";
60
+                   }
61 61
 
62 62
                
63
-               // if($r_delete == 'Y') {
64
-               // echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$r[id_kategori]&id_module=$id' onClick=\"return confirm('Hapus data ?')\" title='Delete $nmmodule'><span class='icon'><i class='fa fa-trash'></i></span></a>";
65
-               // }  
66
-            echo"</td>";              
67
-                                echo"</tr>";
68
-                                $no++;
63
+                   // if($r_delete == 'Y') {
64
+                   // echo"<a href='modul/mod_$module/aksi_$module.php?module=$module&act=hapus&id=$r[id_kategori]&id_module=$id' onClick=\"return confirm('Hapus data ?')\" title='Delete $nmmodule'><span class='icon'><i class='fa fa-trash'></i></span></a>";
65
+                   // }  
66
+                echo"</td>";              
67
+                                    echo"</tr>";
68
+                                    $no++;
69 69
                                 
70
-                                }
71
-                                ?>
70
+                                    }
71
+                                    ?>
72 72
                          </tbody>
73 73
                     </table>
74 74
                   </div>
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
   
2 2
 <?php
3
-switch($_GET[act]){
3
+switch ($_GET[act]) {
4 4
 
5 5
 default:  
6 6
   ?>
@@ -12,8 +12,8 @@  discard block
 block discarded – undo
12 12
                         <div class="col-md-12 col-sm-12 col-xs-12">
13 13
                             <div class="x_panel">
14 14
                                 <div class="x_title">
15
-                                    <h2><?php echo $nmmodule;?></h2>
16
-                                      <p class="pull-right"><a href='<?php echo"modul/mod_$module/form_$module.php?width=720&height=560&module=$module&id_module=$id_module&TB_iframe=true";?>' title='<?php echo $nmmodule;?> Baru' class='thickbox btn btn-sm btn-success'><i class="fa fa-plus"></i> Baru</a></p>
15
+                                    <h2><?php echo $nmmodule; ?></h2>
16
+                                      <p class="pull-right"><a href='<?php echo"modul/mod_$module/form_$module.php?width=720&height=560&module=$module&id_module=$id_module&TB_iframe=true"; ?>' title='<?php echo $nmmodule; ?> Baru' class='thickbox btn btn-sm btn-success'><i class="fa fa-plus"></i> Baru</a></p>
17 17
                                     <div class="clearfix"></div>
18 18
                                 </div>
19 19
                                 <div class="x_content">
@@ -43,11 +43,11 @@  discard block
 block discarded – undo
43 43
                             
44 44
                          <?
45 45
                         
46
-            $tampil=mysql_query("SELECT * FROM kategori ORDER BY id_kategori");
46
+            $tampil = mysql_query("SELECT * FROM kategori ORDER BY id_kategori");
47 47
             
48 48
             $no = 1;
49 49
             
50
-            while ($r=mysql_fetch_array($tampil)){  
50
+            while ($r = mysql_fetch_array($tampil)) {  
51 51
 
52 52
             
53 53
             echo"<tr>";
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
             echo"<td style='text-align:center;'>$r[aktif]</td>";  
56 56
             echo" <td  style='text-align:center;'>";
57 57
 
58
-            if($r_edit == 'Y') {
58
+            if ($r_edit=='Y') {
59 59
                echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_kategori=$r[id_kategori]&id_module=$id&width=720&height=560&module=$module&TB_iframe=true' title='Update $nmmodule'><span class='icon'><i class='fa fa-pencil'></i></span></a>";
60 60
                }
61 61
 
Please login to merge, or discard this patch.
modul/mod_kategori/form_kategori.php 3 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?
2 2
 session_start();
3 3
 if (empty($_SESSION['username']) AND empty($_SESSION['password'])){
4
-  echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
4
+    echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
5 5
 } else{
6 6
 include "./../../config/koneksi.php";
7 7
 ?>
@@ -41,27 +41,27 @@  discard block
 block discarded – undo
41 41
 
42 42
 $id_module = $_GET['id_module']; 
43 43
 
44
-  $id = isset($_GET['id_kategori']) ? intval($_GET['id_kategori']) : false;
44
+    $id = isset($_GET['id_kategori']) ? intval($_GET['id_kategori']) : false;
45 45
   
46
-  if($id){
47
-     $query = mysql_query('SELECT * FROM kategori WHERE id_kategori = "'.$id.'"');
48
-     if($query && mysql_num_rows($query) == 1){
46
+    if($id){
47
+        $query = mysql_query('SELECT * FROM kategori WHERE id_kategori = "'.$id.'"');
48
+        if($query && mysql_num_rows($query) == 1){
49 49
         $data = mysql_fetch_object($query);
50
-     }else 
50
+        }else 
51 51
         die('Data modul tidak ditemukan');
52
-  }
52
+    }
53 53
   
54 54
 if ($_GET['igroup']) {
55
-  $group  = $_GET['igroup'];
55
+    $group  = $_GET['igroup'];
56 56
 } else {
57
-  $group  = $data->id_kategori;
57
+    $group  = $data->id_kategori;
58 58
   
59 59
 }
60 60
 
61 61
 if ($_GET['imenu']) {
62
-  $imenu  = $_GET['imenu'];
62
+    $imenu  = $_GET['imenu'];
63 63
 } else {
64
-  $imenu  = $data->id_modul;  
64
+    $imenu  = $data->id_modul;  
65 65
   
66 66
 }
67 67
 
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?
2 2
 session_start();
3
-if (empty($_SESSION['username']) AND empty($_SESSION['password'])){
3
+if (empty($_SESSION['username']) AND empty($_SESSION['password'])) {
4 4
   echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
5
-} else{
5
+} else {
6 6
 include "./../../config/koneksi.php";
7 7
 ?>
8 8
 <!doctype html>
@@ -37,17 +37,17 @@  discard block
 block discarded – undo
37 37
 $modul = $_GET['module'];
38 38
 $title = $_GET['title'];
39 39
 
40
-$role   = $_SESSION['role'];
40
+$role = $_SESSION['role'];
41 41
 
42 42
 $id_module = $_GET['id_module']; 
43 43
 
44 44
   $id = isset($_GET['id_kategori']) ? intval($_GET['id_kategori']) : false;
45 45
   
46
-  if($id){
46
+  if ($id) {
47 47
      $query = mysql_query('SELECT * FROM kategori WHERE id_kategori = "'.$id.'"');
48
-     if($query && mysql_num_rows($query) == 1){
48
+     if ($query && mysql_num_rows($query)==1) {
49 49
         $data = mysql_fetch_object($query);
50
-     }else 
50
+     } else 
51 51
         die('Data modul tidak ditemukan');
52 52
   }
53 53
   
@@ -85,9 +85,9 @@  discard block
 block discarded – undo
85 85
          
86 86
 
87 87
         
88
-          <?php if ($id){ ?>  
88
+          <?php if ($id) { ?>  
89 89
     
90
-            <?php if (@$data->aktif=='Y'){ ?>
90
+            <?php if (@$data->aktif=='Y') { ?>
91 91
               
92 92
                 <div class="form-group">
93 93
 	               <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Aktif :</label>
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
                     <input type=radio name='aktif' value='N' class="flat"> T                
97 97
                   </div>
98 98
               </div>  
99
-            <?php   }else{ ?>  
99
+            <?php   } else { ?>  
100 100
               
101 101
                 <div class="form-group">
102 102
 	               <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Aktif :</label>
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
               </div>  
108 108
              <?php } ?>
109 109
 
110
-        <?php   }else{ ?>  
110
+        <?php   } else { ?>  
111 111
 
112 112
            
113 113
                 <div class="form-group">
Please login to merge, or discard this patch.
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -47,8 +47,9 @@  discard block
 block discarded – undo
47 47
      $query = mysql_query('SELECT * FROM kategori WHERE id_kategori = "'.$id.'"');
48 48
      if($query && mysql_num_rows($query) == 1){
49 49
         $data = mysql_fetch_object($query);
50
-     }else 
51
-        die('Data modul tidak ditemukan');
50
+     } else {
51
+             die('Data modul tidak ditemukan');
52
+     }
52 53
   }
53 54
   
54 55
 if ($_GET['igroup']) {
@@ -96,7 +97,7 @@  discard block
 block discarded – undo
96 97
                     <input type=radio name='aktif' value='N' class="flat"> T                
97 98
                   </div>
98 99
               </div>  
99
-            <?php   }else{ ?>  
100
+            <?php   } else{ ?>  
100 101
               
101 102
                 <div class="form-group">
102 103
 	               <label class="control-label col-md-3 col-sm-3 col-xs-12" style='padding-top:10px;'>Aktif :</label>
@@ -107,7 +108,7 @@  discard block
 block discarded – undo
107 108
               </div>  
108 109
              <?php } ?>
109 110
 
110
-        <?php   }else{ ?>  
111
+        <?php   } else{ ?>  
111 112
 
112 113
            
113 114
                 <div class="form-group">
Please login to merge, or discard this patch.
modul/mod_kategori/aksi_kategori.php 2 patches
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 session_start();
3 3
 if (empty($_SESSION['username']) AND empty($_SESSION['password'])){
4
-  echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
4
+    echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
5 5
 } else{
6 6
 include "./../../config/koneksi.php";
7 7
 include "./../../config/fungsi_thumb.php";
@@ -18,14 +18,14 @@  discard block
 block discarded – undo
18 18
 
19 19
 // Hapus modul
20 20
 if ($module=='kategori' AND $act=='hapus'){
21
-  $id = $_GET['id'];
22
-  $id_module = $_GET['id_module'];
21
+    $id = $_GET['id'];
22
+    $id_module = $_GET['id_module'];
23 23
    
24
-  mysql_query("DELETE FROM ".$module." WHERE id_".$module." = $id");
24
+    mysql_query("DELETE FROM ".$module." WHERE id_".$module." = $id");
25 25
 
26
-   //header('location:../../main.php?module='.$module.'&id_module='.$id_module);          
26
+    //header('location:../../main.php?module='.$module.'&id_module='.$id_module);          
27 27
 
28
-  ?>
28
+    ?>
29 29
    
30 30
   <script language="javascript">
31 31
      window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module";?>";  
@@ -34,16 +34,16 @@  discard block
 block discarded – undo
34 34
   
35 35
   <?php                 
36 36
    
37
- }
37
+    }
38 38
 
39
-  // Input group
39
+    // Input group
40 40
 elseif ($module=='kategori' AND $act=='input'){
41 41
 
42
-  $id_module = $_POST['id_module'];
42
+    $id_module = $_POST['id_module'];
43 43
 
44 44
 
45
-   if($_POST['ID']){
46
-   mysql_query("UPDATE kategori SET kategori   = '$_POST[kategori]'
45
+    if($_POST['ID']){
46
+    mysql_query("UPDATE kategori SET kategori   = '$_POST[kategori]'
47 47
                     ,upddt   = '$datetime' 
48 48
                   ,updby   = '$userid' 
49 49
                   ,aktif     = '$_POST[aktif]'  
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
                            
53 53
 
54 54
       
55
-   } else {
56
-   mysql_query("INSERT INTO kategori(kategori
55
+    } else {
56
+    mysql_query("INSERT INTO kategori(kategori
57 57
                    ,crtdt
58 58
                    ,crtby
59 59
                    ,upddt
@@ -67,12 +67,12 @@  discard block
 block discarded – undo
67 67
                     ,'$_POST[aktif]')");
68 68
   
69 69
                 
70
-   }
70
+    }
71 71
    
72 72
 
73
-   //header('location:../../main.php?module='.$module.'&id_module='.$id_module);          
73
+    //header('location:../../main.php?module='.$module.'&id_module='.$id_module);          
74 74
 
75
-  ?>
75
+    ?>
76 76
    
77 77
   <script language="javascript">
78 78
      window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module";?>";  
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,23 +1,23 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 session_start();
3
-if (empty($_SESSION['username']) AND empty($_SESSION['password'])){
3
+if (empty($_SESSION['username']) AND empty($_SESSION['password'])) {
4 4
   echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
5
-} else{
5
+} else {
6 6
 include "./../../config/koneksi.php";
7 7
 include "./../../config/fungsi_thumb.php";
8 8
 
9
-$module=$_GET[module];
10
-$act=$_GET[act];
9
+$module = $_GET[module];
10
+$act = $_GET[act];
11 11
 
12 12
 $date     = date("d/m/Y");  
13 13
 $idate    = date("Y-m-d");
14 14
 $hour = time() - (1 * 1 * 60 * 60);
15
-$datetime   = date("Y-m-d G:i:s", $hour);
15
+$datetime = date("Y-m-d G:i:s", $hour);
16 16
 $userid   = $_SESSION['userid'];
17 17
 
18 18
 
19 19
 // Hapus modul
20
-if ($module=='kategori' AND $act=='hapus'){
20
+if ($module=='kategori' AND $act=='hapus') {
21 21
   $id = $_GET['id'];
22 22
   $id_module = $_GET['id_module'];
23 23
    
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
   ?>
29 29
    
30 30
   <script language="javascript">
31
-     window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module";?>";  
31
+     window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module"; ?>";  
32 32
      window.parent.tb_remove();
33 33
    </script>
34 34
   
@@ -37,12 +37,12 @@  discard block
 block discarded – undo
37 37
  }
38 38
 
39 39
   // Input group
40
-elseif ($module=='kategori' AND $act=='input'){
40
+elseif ($module=='kategori' AND $act=='input') {
41 41
 
42 42
   $id_module = $_POST['id_module'];
43 43
 
44 44
 
45
-   if($_POST['ID']){
45
+   if ($_POST['ID']) {
46 46
    mysql_query("UPDATE kategori SET kategori   = '$_POST[kategori]'
47 47
                     ,upddt   = '$datetime' 
48 48
                   ,updby   = '$userid' 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
   ?>
76 76
    
77 77
   <script language="javascript">
78
-     window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module";?>";  
78
+     window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module"; ?>";  
79 79
      window.parent.tb_remove();
80 80
    </script>
81 81
   
Please login to merge, or discard this patch.
modul/mod_resep_obat/aksi_resep_obat.php 2 patches
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 session_start();
3 3
 if (empty($_SESSION['username']) AND empty($_SESSION['password'])){
4
-  echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
4
+    echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
5 5
 } else{
6 6
 include "./../../config/koneksi.php";
7 7
 include "./../../config/fungsi_thumb.php";
@@ -18,30 +18,30 @@  discard block
 block discarded – undo
18 18
 
19 19
 // Hapus modul
20 20
 if ($module=='resep_obat' AND $act=='dhapus'){
21
-  $id = $_GET['id'];
22
-  $id_module = $_GET['id_module'];
23
-  $id_kunjungan_berobat = $_GET['id_kunjungan_berobat'];
21
+    $id = $_GET['id'];
22
+    $id_module = $_GET['id_module'];
23
+    $id_kunjungan_berobat = $_GET['id_kunjungan_berobat'];
24 24
    
25
-  mysql_query("DELETE FROM kunjungan_berobat_detail WHERE id_kunjungan_berobat_detail = $id");
25
+    mysql_query("DELETE FROM kunjungan_berobat_detail WHERE id_kunjungan_berobat_detail = $id");
26 26
 
27
-  mysql_query("UPDATE obat SET jumlah   = jumlah+'$_GET[qty]'
27
+    mysql_query("UPDATE obat SET jumlah   = jumlah+'$_GET[qty]'
28 28
                             ,upddt   = '$datetime'
29 29
                             ,updby   = '$userid' 
30 30
                       WHERE id_obat    = '$_GET[obat]'");  
31 31
 
32
-   header('location:form_'.$module.'.php?id_kunjungan_berobat='.$id_kunjungan_berobat.'&module='.$module.'&id_module='.$id_modul);       
32
+    header('location:form_'.$module.'.php?id_kunjungan_berobat='.$id_kunjungan_berobat.'&module='.$module.'&id_module='.$id_modul);       
33 33
    
34
- }
34
+    }
35 35
 
36
-  // Input group
36
+    // Input group
37 37
 elseif ($module=='resep_obat' AND $act=='input'){
38 38
 
39
-  $id_module = $_POST['id_module'];
40
-  $id_kunjungan_berobat = $_POST['id_kunjungan_berobat'];
39
+    $id_module = $_POST['id_module'];
40
+    $id_kunjungan_berobat = $_POST['id_kunjungan_berobat'];
41 41
 
42 42
 
43
-  if($_POST['ID']){
44
-           mysql_query("UPDATE kunjungan_berobat_detail SET id_obat   = '$_POST[obat]'
43
+    if($_POST['ID']){
44
+            mysql_query("UPDATE kunjungan_berobat_detail SET id_obat   = '$_POST[obat]'
45 45
                             ,qty   = '$_POST[qty]'  
46 46
                             ,descr   = '$_POST[descr]'
47 47
                           ,upddt   = '$datetime'
@@ -59,9 +59,9 @@  discard block
 block discarded – undo
59 59
                     WHERE id_obat    = '$_POST[obat]'");  
60 60
              
61 61
          
62
-       } else {
62
+        } else {
63 63
 
64
-         mysql_query("INSERT INTO kunjungan_berobat_detail(id_obat
64
+            mysql_query("INSERT INTO kunjungan_berobat_detail(id_obat
65 65
                           ,qty
66 66
                           ,descr
67 67
                           ,id_kunjungan_berobat
@@ -78,18 +78,18 @@  discard block
 block discarded – undo
78 78
                         ,'$datetime'      
79 79
                         ,'$userid')");
80 80
 
81
-         mysql_query("UPDATE obat SET jumlah   = jumlah-'$_POST[qty]'
81
+            mysql_query("UPDATE obat SET jumlah   = jumlah-'$_POST[qty]'
82 82
                             ,upddt   = '$datetime'
83 83
                             ,updby   = '$userid' 
84 84
                       WHERE id_obat    = '$_POST[obat]'");  
85 85
                     
86
-       }
86
+        }
87 87
   
88 88
 
89 89
    
90
-   header('location:form_'.$module.'.php?id_kunjungan_berobat='.$id_kunjungan_berobat.'&module='.$module.'&id_module='.$id_modul); 
90
+    header('location:form_'.$module.'.php?id_kunjungan_berobat='.$id_kunjungan_berobat.'&module='.$module.'&id_module='.$id_modul); 
91 91
 
92
-  ?>
92
+    ?>
93 93
    
94 94
 
95 95
   <!-- <script language="javascript">
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,23 +1,23 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 session_start();
3
-if (empty($_SESSION['username']) AND empty($_SESSION['password'])){
3
+if (empty($_SESSION['username']) AND empty($_SESSION['password'])) {
4 4
   echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
5
-} else{
5
+} else {
6 6
 include "./../../config/koneksi.php";
7 7
 include "./../../config/fungsi_thumb.php";
8 8
 
9
-$module=$_GET[module];
10
-$act=$_GET[act];
9
+$module = $_GET[module];
10
+$act = $_GET[act];
11 11
 
12 12
 $date     = date("d/m/Y");  
13 13
 $idate    = date("Y-m-d");
14 14
 $hour = time() - (1 * 1 * 60 * 60);
15
-$datetime   = date("Y-m-d G:i:s", $hour);
15
+$datetime = date("Y-m-d G:i:s", $hour);
16 16
 $userid   = $_SESSION['userid'];
17 17
 $business_type = $_SESSION['business_type']; 
18 18
 
19 19
 // Hapus modul
20
-if ($module=='resep_obat' AND $act=='dhapus'){
20
+if ($module=='resep_obat' AND $act=='dhapus') {
21 21
   $id = $_GET['id'];
22 22
   $id_module = $_GET['id_module'];
23 23
   $id_kunjungan_berobat = $_GET['id_kunjungan_berobat'];
@@ -34,13 +34,13 @@  discard block
 block discarded – undo
34 34
  }
35 35
 
36 36
   // Input group
37
-elseif ($module=='resep_obat' AND $act=='input'){
37
+elseif ($module=='resep_obat' AND $act=='input') {
38 38
 
39 39
   $id_module = $_POST['id_module'];
40 40
   $id_kunjungan_berobat = $_POST['id_kunjungan_berobat'];
41 41
 
42 42
 
43
-  if($_POST['ID']){
43
+  if ($_POST['ID']) {
44 44
            mysql_query("UPDATE kunjungan_berobat_detail SET id_obat   = '$_POST[obat]'
45 45
                             ,qty   = '$_POST[qty]'  
46 46
                             ,descr   = '$_POST[descr]'
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
    
94 94
 
95 95
   <!-- <script language="javascript">
96
-     window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module";?>";  
96
+     window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module"; ?>";  
97 97
      window.parent.tb_remove();
98 98
    </script> -->
99 99
   
@@ -101,13 +101,13 @@  discard block
 block discarded – undo
101 101
  
102 102
 
103 103
 }  // Input group
104
-elseif ($module=='resep_obat' AND $act=='close'){
104
+elseif ($module=='resep_obat' AND $act=='close') {
105 105
 
106 106
 $id_module = $_POST['id_module'];
107 107
 ?>
108 108
 
109 109
   <script language="javascript">
110
-     window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module";?>";  
110
+     window.parent.location.href = "<?php echo"./../../main.php?module=$module&id_module=$id_module"; ?>";  
111 111
      window.parent.tb_remove();
112 112
    </script> 
113 113
 
Please login to merge, or discard this patch.
modul/mod_resep_obat/resep_obat.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -99,8 +99,8 @@
 block discarded – undo
99 99
             echo" <td  style='text-align:center;'>";
100 100
 
101 101
             if($r_edit == 'Y') {
102
-               echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_kunjungan_berobat=$r[id_kunjungan_berobat]&id_module=$id&width=720&height=620&module=$module&TB_iframe=true' title='Tambah $nmmodule'><span class='icon'><i class='fa fa-pencil'></i></span></a>";
103
-               }
102
+                echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_kunjungan_berobat=$r[id_kunjungan_berobat]&id_module=$id&width=720&height=620&module=$module&TB_iframe=true' title='Tambah $nmmodule'><span class='icon'><i class='fa fa-pencil'></i></span></a>";
103
+                }
104 104
 
105 105
                
106 106
                
Please login to merge, or discard this patch.
Switch Indentation   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 switch($_GET[act]){
3 3
 
4
-default:  
5
-  ?>
4
+    default:  
5
+      ?>
6 6
 
7 7
  <div class="">
8 8
                    
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
                             
48 48
                          <?
49 49
                         
50
-            $tampil=mysql_query("SELECT a.*,b.nama,b.tgl_lahir,b.ktp,c.poli,d.kategori                                  
50
+                $tampil=mysql_query("SELECT a.*,b.nama,b.tgl_lahir,b.ktp,c.poli,d.kategori                                  
51 51
                                 FROM kunjungan_berobat a left join pasien b 
52 52
                                  ON a.id_pasien = b.id_pasien
53 53
                                  left join poli c 
@@ -56,25 +56,25 @@  discard block
 block discarded – undo
56 56
                                  ON b.id_kategori = d.id_kategori                                
57 57
                                  ORDER BY a.tanggal,a.id_poli,a.no_urut ASC");
58 58
             
59
-            $no = 1;
59
+                $no = 1;
60 60
             
61
-            while ($r=mysql_fetch_array($tampil)){  
61
+                while ($r=mysql_fetch_array($tampil)){  
62 62
 
63
-            $id        = $r[id_kunjungan_berobat];    
64
-            $tgl       = DATE('d/m/Y',strtotime($r[tanggal]));
65
-            $tgl_lahir = DATE('d/m/Y',strtotime($r[tgl_lahir]));
63
+                $id        = $r[id_kunjungan_berobat];    
64
+                $tgl       = DATE('d/m/Y',strtotime($r[tanggal]));
65
+                $tgl_lahir = DATE('d/m/Y',strtotime($r[tgl_lahir]));
66 66
 
67
-            echo"<tr>";
68
-            echo"<td>$tgl</td>";
69
-            echo"<td>$r[poli]</td>";
70
-            echo"<td>$r[no_urut]</td>";            
71
-            echo"<td>$r[nama]</td>";
72
-            echo"<td>$r[kategori]</td>";
73
-            echo"<td>$r[keluhan]</td>";
74
-            echo"<td>$r[diagnosa]</td>";
75
-            echo"<td>";
67
+                echo"<tr>";
68
+                echo"<td>$tgl</td>";
69
+                echo"<td>$r[poli]</td>";
70
+                echo"<td>$r[no_urut]</td>";            
71
+                echo"<td>$r[nama]</td>";
72
+                echo"<td>$r[kategori]</td>";
73
+                echo"<td>$r[keluhan]</td>";
74
+                echo"<td>$r[diagnosa]</td>";
75
+                echo"<td>";
76 76
 
77
-                $dtampil=mysql_query("SELECT a.*,b.obat,c.satuan
77
+                    $dtampil=mysql_query("SELECT a.*,b.obat,c.satuan
78 78
                                       FROM kunjungan_berobat_detail  a LEFT JOIN obat b
79 79
                                       ON a.id_obat = b.id_obat  
80 80
                                       LEFT JOIN satuan c
@@ -84,32 +84,32 @@  discard block
 block discarded – undo
84 84
             
85 85
             
86 86
             
87
-                while ($d=mysql_fetch_array($dtampil)){  
87
+                    while ($d=mysql_fetch_array($dtampil)){  
88 88
 
89
-                    echo"<table width='100%'>";
90
-                    echo"<tr>";
91
-                    echo"<td width='70%'>$d[obat]</td>";    
92
-                    echo"<td width='30%'>$d[qty] $d[satuan]</td>";    
93
-                    echo"</tr>";
94
-                    echo"</table>";
89
+                        echo"<table width='100%'>";
90
+                        echo"<tr>";
91
+                        echo"<td width='70%'>$d[obat]</td>";    
92
+                        echo"<td width='30%'>$d[qty] $d[satuan]</td>";    
93
+                        echo"</tr>";
94
+                        echo"</table>";
95 95
 
96
-                }    
96
+                    }    
97 97
 
98
-            echo"</td>";
99
-            echo" <td  style='text-align:center;'>";
98
+                echo"</td>";
99
+                echo" <td  style='text-align:center;'>";
100 100
 
101
-            if($r_edit == 'Y') {
102
-               echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_kunjungan_berobat=$r[id_kunjungan_berobat]&id_module=$id&width=720&height=620&module=$module&TB_iframe=true' title='Tambah $nmmodule'><span class='icon'><i class='fa fa-pencil'></i></span></a>";
103
-               }
101
+                if($r_edit == 'Y') {
102
+                   echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_kunjungan_berobat=$r[id_kunjungan_berobat]&id_module=$id&width=720&height=620&module=$module&TB_iframe=true' title='Tambah $nmmodule'><span class='icon'><i class='fa fa-pencil'></i></span></a>";
103
+                   }
104 104
 
105 105
                
106 106
                
107
-            echo"</td>";              
108
-                                echo"</tr>";
109
-                                $no++;
107
+                echo"</td>";              
108
+                                    echo"</tr>";
109
+                                    $no++;
110 110
                                 
111
-                                }
112
-                                ?>
111
+                                    }
112
+                                    ?>
113 113
                          </tbody>
114 114
                     </table>
115 115
                   </div>
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-switch($_GET[act]){
2
+switch ($_GET[act]) {
3 3
 
4 4
 default:  
5 5
   ?>
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
                         <div class="col-md-12 col-sm-12 col-xs-12">
12 12
                             <div class="x_panel">
13 13
                                 <div class="x_title">
14
-                                    <h2><?php echo $nmmodule;?></h2>
14
+                                    <h2><?php echo $nmmodule; ?></h2>
15 15
                                      <div class="clearfix"></div>
16 16
                                 </div>
17 17
                                 <div class="x_content">
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
                             
48 48
                          <?
49 49
                         
50
-            $tampil=mysql_query("SELECT a.*,b.nama,b.tgl_lahir,b.ktp,c.poli,d.kategori                                  
50
+            $tampil = mysql_query("SELECT a.*,b.nama,b.tgl_lahir,b.ktp,c.poli,d.kategori                                  
51 51
                                 FROM kunjungan_berobat a left join pasien b 
52 52
                                  ON a.id_pasien = b.id_pasien
53 53
                                  left join poli c 
@@ -58,11 +58,11 @@  discard block
 block discarded – undo
58 58
             
59 59
             $no = 1;
60 60
             
61
-            while ($r=mysql_fetch_array($tampil)){  
61
+            while ($r = mysql_fetch_array($tampil)) {  
62 62
 
63 63
             $id        = $r[id_kunjungan_berobat];    
64
-            $tgl       = DATE('d/m/Y',strtotime($r[tanggal]));
65
-            $tgl_lahir = DATE('d/m/Y',strtotime($r[tgl_lahir]));
64
+            $tgl       = DATE('d/m/Y', strtotime($r[tanggal]));
65
+            $tgl_lahir = DATE('d/m/Y', strtotime($r[tgl_lahir]));
66 66
 
67 67
             echo"<tr>";
68 68
             echo"<td>$tgl</td>";
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
             echo"<td>$r[diagnosa]</td>";
75 75
             echo"<td>";
76 76
 
77
-                $dtampil=mysql_query("SELECT a.*,b.obat,c.satuan
77
+                $dtampil = mysql_query("SELECT a.*,b.obat,c.satuan
78 78
                                       FROM kunjungan_berobat_detail  a LEFT JOIN obat b
79 79
                                       ON a.id_obat = b.id_obat  
80 80
                                       LEFT JOIN satuan c
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
             
85 85
             
86 86
             
87
-                while ($d=mysql_fetch_array($dtampil)){  
87
+                while ($d = mysql_fetch_array($dtampil)) {  
88 88
 
89 89
                     echo"<table width='100%'>";
90 90
                     echo"<tr>";
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
             echo"</td>";
99 99
             echo" <td  style='text-align:center;'>";
100 100
 
101
-            if($r_edit == 'Y') {
101
+            if ($r_edit=='Y') {
102 102
                echo"<a class='thickbox' href='modul/mod_$module/form_$module.php?id_kunjungan_berobat=$r[id_kunjungan_berobat]&id_module=$id&width=720&height=620&module=$module&TB_iframe=true' title='Tambah $nmmodule'><span class='icon'><i class='fa fa-pencil'></i></span></a>";
103 103
                }
104 104
 
Please login to merge, or discard this patch.
modul/mod_resep_obat/form_resep_obat.php 3 patches
Indentation   +53 added lines, -53 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?
2 2
 session_start();
3 3
 if (empty($_SESSION['username']) AND empty($_SESSION['password'])){
4
-  echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
4
+    echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
5 5
 } else{
6 6
 include "./../../config/koneksi.php";
7 7
 ?>
@@ -41,34 +41,34 @@  discard block
 block discarded – undo
41 41
 
42 42
 $id_module = $_GET['id_module']; 
43 43
 
44
-  $id = isset($_GET['id_kunjungan_berobat']) ? intval($_GET['id_kunjungan_berobat']) : false;
44
+    $id = isset($_GET['id_kunjungan_berobat']) ? intval($_GET['id_kunjungan_berobat']) : false;
45 45
   
46
-  if($id){
47
-     $query = mysql_query('SELECT * FROM kunjungan_berobat WHERE id_kunjungan_berobat = "'.$id.'"');
48
-     if($query && mysql_num_rows($query) == 1){
46
+    if($id){
47
+        $query = mysql_query('SELECT * FROM kunjungan_berobat WHERE id_kunjungan_berobat = "'.$id.'"');
48
+        if($query && mysql_num_rows($query) == 1){
49 49
         $data = mysql_fetch_object($query);
50
-     }else 
50
+        }else 
51 51
         die('Data modul tidak ditemukan');
52
-  }
52
+    }
53 53
   
54 54
 if ($_GET['igroup']) {
55
-  $group  = $_GET['igroup'];
55
+    $group  = $_GET['igroup'];
56 56
 } else {
57
-  $group  = $data->id_kunjungan_berobat;
57
+    $group  = $data->id_kunjungan_berobat;
58 58
   
59 59
 }
60 60
 
61 61
 if ($_GET['imenu']) {
62
-  $imenu  = $_GET['imenu'];
62
+    $imenu  = $_GET['imenu'];
63 63
 } else {
64
-  $imenu  = $data->id_modul;  
64
+    $imenu  = $data->id_modul;  
65 65
   
66 66
 }
67 67
 
68 68
 if ($data->tanggal) {
69
-  $tanggal = $data->tanggal;
69
+    $tanggal = $data->tanggal;
70 70
 } else {
71
-  $tanggal = DATE('Y-m-d');
71
+    $tanggal = DATE('Y-m-d');
72 72
 }
73 73
 
74 74
   
@@ -105,17 +105,17 @@  discard block
 block discarded – undo
105 105
                  <select required name="pasien" class="form-control" disabled>
106 106
                  <option>--Pilih Pasien--</option>                
107 107
                     <?
108
-                      $query = mysql_query('SELECT * FROM pasien ORDER BY nama');
109
-                       if($query && mysql_num_rows($query) > 0){
110
-                          while($row = mysql_fetch_object($query)){
108
+                        $query = mysql_query('SELECT * FROM pasien ORDER BY nama');
109
+                        if($query && mysql_num_rows($query) > 0){
110
+                            while($row = mysql_fetch_object($query)){
111 111
 
112 112
                             $pasien = $row->ktp.'-'.$row->nama;
113 113
 
114
-                             echo '<option value="'.$row->id_pasien.'"';
115
-                             if($row->id_pasien == @$data->id_pasien) echo ' selected';
116
-                             echo '>'.$pasien.'</option>';
117
-                          }
118
-                       }        
114
+                                echo '<option value="'.$row->id_pasien.'"';
115
+                                if($row->id_pasien == @$data->id_pasien) echo ' selected';
116
+                                echo '>'.$pasien.'</option>';
117
+                            }
118
+                        }        
119 119
                     ?>
120 120
                     </select>
121 121
               </div>
@@ -132,14 +132,14 @@  discard block
 block discarded – undo
132 132
                  <select name="poli" class="form-control" disabled>     
133 133
                  <option>--Pilih Poliklinik --</option>                          
134 134
                     <?
135
-                      $query = mysql_query('SELECT * FROM poli ORDER BY poli');
136
-                       if($query && mysql_num_rows($query) > 0){
137
-                          while($row = mysql_fetch_object($query)){
138
-                             echo '<option value="'.$row->id_poli.'"';
139
-                             if($row->id_poli == @$data->id_poli) echo ' selected';
140
-                             echo '>'.$row->poli.'</option>';
141
-                          }
142
-                       }        
135
+                        $query = mysql_query('SELECT * FROM poli ORDER BY poli');
136
+                        if($query && mysql_num_rows($query) > 0){
137
+                            while($row = mysql_fetch_object($query)){
138
+                                echo '<option value="'.$row->id_poli.'"';
139
+                                if($row->id_poli == @$data->id_poli) echo ' selected';
140
+                                echo '>'.$row->poli.'</option>';
141
+                            }
142
+                        }        
143 143
                     ?>
144 144
                     </select>
145 145
               </div> -->
@@ -194,14 +194,14 @@  discard block
 block discarded – undo
194 194
                                           <select name="obat" id="obat" class="form-control" required>
195 195
                                          <option value='0'></option>
196 196
                                             <?
197
-                                              $query = mysql_query('SELECT * FROM obat ORDER BY obat');
198
-                                               if($query && mysql_num_rows($query) > 0){
199
-                                                  while($row = mysql_fetch_object($query)){
200
-                                                     echo '<option value="'.$row->id_obat.'"';
201
-                                                     if($row->id_obat == @$r['id_obat']) echo ' selected';
202
-                                                     echo '>'.$row->obat.'</option>';
203
-                                                  }
204
-                                               }        
197
+                                                $query = mysql_query('SELECT * FROM obat ORDER BY obat');
198
+                                                if($query && mysql_num_rows($query) > 0){
199
+                                                    while($row = mysql_fetch_object($query)){
200
+                                                        echo '<option value="'.$row->id_obat.'"';
201
+                                                        if($row->id_obat == @$r['id_obat']) echo ' selected';
202
+                                                        echo '>'.$row->obat.'</option>';
203
+                                                    }
204
+                                                }        
205 205
                                             ?>
206 206
                                             </select> 
207 207
                             
@@ -234,12 +234,12 @@  discard block
 block discarded – undo
234 234
                                   <input type="hidden" name="imodule" value="<?php echo $imodule?>" /> 
235 235
 
236 236
                                 <?
237
-                               echo"</form>";
237
+                                echo"</form>";
238 238
                                 ?>
239 239
 
240 240
                                   <?
241 241
 
242
-                                   $SQL = "SELECT a.*,b.obat
242
+                                    $SQL = "SELECT a.*,b.obat
243 243
                                              FROM kunjungan_berobat_detail  a LEFT JOIN obat b
244 244
                                             ON a.id_obat = b.id_obat  
245 245
                                             WHERE a.id_kunjungan_berobat = '$id' 
@@ -247,11 +247,11 @@  discard block
 block discarded – undo
247 247
 
248 248
 
249 249
 
250
-                                  $tampil=mysql_query($SQL);
250
+                                    $tampil=mysql_query($SQL);
251 251
 
252
-                                  $jml = mysql_num_rows($tampil);
252
+                                    $jml = mysql_num_rows($tampil);
253 253
                                     
254
-                                  $no = 1;
254
+                                    $no = 1;
255 255
             
256 256
                                     while ($r=mysql_fetch_array($tampil)){  
257 257
 
@@ -271,14 +271,14 @@  discard block
 block discarded – undo
271 271
                                         <select name="obat" id="obat<?php echo $no;?>" class="form-control" required>
272 272
                                          <option value='0'></option>
273 273
                                             <?
274
-                                              $query = mysql_query('SELECT * FROM obat ORDER BY obat');
275
-                                               if($query && mysql_num_rows($query) > 0){
276
-                                                  while($row = mysql_fetch_object($query)){
277
-                                                     echo '<option value="'.$row->id_obat.'"';
278
-                                                     if($row->id_obat == @$r['id_obat']) echo ' selected';
279
-                                                     echo '>'.$row->obat.'</option>';
280
-                                                  }
281
-                                               }        
274
+                                                $query = mysql_query('SELECT * FROM obat ORDER BY obat');
275
+                                                if($query && mysql_num_rows($query) > 0){
276
+                                                    while($row = mysql_fetch_object($query)){
277
+                                                        echo '<option value="'.$row->id_obat.'"';
278
+                                                        if($row->id_obat == @$r['id_obat']) echo ' selected';
279
+                                                        echo '>'.$row->obat.'</option>';
280
+                                                    }
281
+                                                }        
282 282
                                             ?>
283 283
                                             </select> 
284 284
                                        </td>
@@ -315,11 +315,11 @@  discard block
 block discarded – undo
315 315
                                   <input type="hidden" name="imodule" value="<?php echo $imodule?>" /> 
316 316
 
317 317
                                 <?
318
-                               echo"</form>";
318
+                                echo"</form>";
319 319
                                 
320
-                               }
320
+                                }
321 321
 
322
-                                  ?>  
322
+                                    ?>  
323 323
 
324 324
 
325 325
 
Please login to merge, or discard this patch.
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?
2 2
 session_start();
3
-if (empty($_SESSION['username']) AND empty($_SESSION['password'])){
3
+if (empty($_SESSION['username']) AND empty($_SESSION['password'])) {
4 4
   echo "<script>window.alert('Please login first.'); window.location=('../../index.php.php')</script>";
5
-} else{
5
+} else {
6 6
 include "./../../config/koneksi.php";
7 7
 ?>
8 8
 <!doctype html>
@@ -37,17 +37,17 @@  discard block
 block discarded – undo
37 37
 $modul = $_GET['module'];
38 38
 $title = $_GET['title'];
39 39
 $business_type = $_SESSION['business_type']; 
40
-$role   = $_SESSION['role'];
40
+$role = $_SESSION['role'];
41 41
 
42 42
 $id_module = $_GET['id_module']; 
43 43
 
44 44
   $id = isset($_GET['id_kunjungan_berobat']) ? intval($_GET['id_kunjungan_berobat']) : false;
45 45
   
46
-  if($id){
46
+  if ($id) {
47 47
      $query = mysql_query('SELECT * FROM kunjungan_berobat WHERE id_kunjungan_berobat = "'.$id.'"');
48
-     if($query && mysql_num_rows($query) == 1){
48
+     if ($query && mysql_num_rows($query)==1) {
49 49
         $data = mysql_fetch_object($query);
50
-     }else 
50
+     } else 
51 51
         die('Data modul tidak ditemukan');
52 52
   }
53 53
   
@@ -106,13 +106,13 @@  discard block
 block discarded – undo
106 106
                  <option>--Pilih Pasien--</option>                
107 107
                     <?
108 108
                       $query = mysql_query('SELECT * FROM pasien ORDER BY nama');
109
-                       if($query && mysql_num_rows($query) > 0){
110
-                          while($row = mysql_fetch_object($query)){
109
+                       if ($query && mysql_num_rows($query)>0) {
110
+                          while ($row = mysql_fetch_object($query)) {
111 111
 
112 112
                             $pasien = $row->ktp.'-'.$row->nama;
113 113
 
114 114
                              echo '<option value="'.$row->id_pasien.'"';
115
-                             if($row->id_pasien == @$data->id_pasien) echo ' selected';
115
+                             if ($row->id_pasien==@$data->id_pasien) echo ' selected';
116 116
                              echo '>'.$pasien.'</option>';
117 117
                           }
118 118
                        }        
@@ -133,10 +133,10 @@  discard block
 block discarded – undo
133 133
                  <option>--Pilih Poliklinik --</option>                          
134 134
                     <?
135 135
                       $query = mysql_query('SELECT * FROM poli ORDER BY poli');
136
-                       if($query && mysql_num_rows($query) > 0){
137
-                          while($row = mysql_fetch_object($query)){
136
+                       if ($query && mysql_num_rows($query)>0) {
137
+                          while ($row = mysql_fetch_object($query)) {
138 138
                              echo '<option value="'.$row->id_poli.'"';
139
-                             if($row->id_poli == @$data->id_poli) echo ' selected';
139
+                             if ($row->id_poli==@$data->id_poli) echo ' selected';
140 140
                              echo '>'.$row->poli.'</option>';
141 141
                           }
142 142
                        }        
@@ -195,10 +195,10 @@  discard block
 block discarded – undo
195 195
                                          <option value='0'></option>
196 196
                                             <?
197 197
                                               $query = mysql_query('SELECT * FROM obat ORDER BY obat');
198
-                                               if($query && mysql_num_rows($query) > 0){
199
-                                                  while($row = mysql_fetch_object($query)){
198
+                                               if ($query && mysql_num_rows($query)>0) {
199
+                                                  while ($row = mysql_fetch_object($query)) {
200 200
                                                      echo '<option value="'.$row->id_obat.'"';
201
-                                                     if($row->id_obat == @$r['id_obat']) echo ' selected';
201
+                                                     if ($row->id_obat==@$r['id_obat']) echo ' selected';
202 202
                                                      echo '>'.$row->obat.'</option>';
203 203
                                                   }
204 204
                                                }        
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
                                     <?php   
222 222
                                     echo" <td  style='text-align:right;'>";     
223 223
                                     ?>                               
224
-                                    <button type="submit" <?php if(!$id) { echo 'disabled';} ?>  class="btn btn-success btn-sm">
224
+                                    <button type="submit" <?php if (!$id) { echo 'disabled'; } ?>  class="btn btn-success btn-sm">
225 225
                                                   <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
226 226
                                     </button>
227 227
                                     <?php            
@@ -247,13 +247,13 @@  discard block
 block discarded – undo
247 247
 
248 248
 
249 249
 
250
-                                  $tampil=mysql_query($SQL);
250
+                                  $tampil = mysql_query($SQL);
251 251
 
252 252
                                   $jml = mysql_num_rows($tampil);
253 253
                                     
254 254
                                   $no = 1;
255 255
             
256
-                                    while ($r=mysql_fetch_array($tampil)){  
256
+                                    while ($r = mysql_fetch_array($tampil)) {  
257 257
 
258 258
                                     $ID = $r['id_kunjungan_berobat'];                                       
259 259
                                     
@@ -268,14 +268,14 @@  discard block
 block discarded – undo
268 268
                                         <input type="hidden" name="ID" value="<?php echo @$ID?>" />
269 269
                             
270 270
                                      <td>
271
-                                        <select name="obat" id="obat<?php echo $no;?>" class="form-control" required>
271
+                                        <select name="obat" id="obat<?php echo $no; ?>" class="form-control" required>
272 272
                                          <option value='0'></option>
273 273
                                             <?
274 274
                                               $query = mysql_query('SELECT * FROM obat ORDER BY obat');
275
-                                               if($query && mysql_num_rows($query) > 0){
276
-                                                  while($row = mysql_fetch_object($query)){
275
+                                               if ($query && mysql_num_rows($query)>0) {
276
+                                                  while ($row = mysql_fetch_object($query)) {
277 277
                                                      echo '<option value="'.$row->id_obat.'"';
278
-                                                     if($row->id_obat == @$r['id_obat']) echo ' selected';
278
+                                                     if ($row->id_obat==@$r['id_obat']) echo ' selected';
279 279
                                                      echo '>'.$row->obat.'</option>';
280 280
                                                   }
281 281
                                                }        
@@ -284,13 +284,13 @@  discard block
 block discarded – undo
284 284
                                        </td>
285 285
 
286 286
                                       <td>
287
-                                          <input type="number" required name='qty' id='iqty<?php echo $no;?>' min = '0' value="<?php if ($jml > 0) { echo number_format($r['qty'], 0, ".", ""); } else { echo 1; } ?>" style='text-align:right;' class="form-control col-md-7 col-xs-12">  
288
-                                          <input type="hidden" name='eqty' id='eiqty<?php echo $no;?>' min = '0' value="<?php if ($jml > 0) { echo number_format($r['qty'], 0, ".", ""); } else { echo 1; } ?>" style='text-align:right;' class="form-control col-md-7 col-xs-12">    
287
+                                          <input type="number" required name='qty' id='iqty<?php echo $no; ?>' min = '0' value="<?php if ($jml>0) { echo number_format($r['qty'], 0, ".", ""); } else { echo 1; } ?>" style='text-align:right;' class="form-control col-md-7 col-xs-12">  
288
+                                          <input type="hidden" name='eqty' id='eiqty<?php echo $no; ?>' min = '0' value="<?php if ($jml>0) { echo number_format($r['qty'], 0, ".", ""); } else { echo 1; } ?>" style='text-align:right;' class="form-control col-md-7 col-xs-12">    
289 289
 
290 290
                                        </td>
291 291
 
292 292
                                        <td>
293
-                                          <input type="text" name='descr' id='descr' value="<?=$r['descr'];?>" class="form-control col-md-7 col-xs-12">                                              
293
+                                          <input type="text" name='descr' id='descr' value="<?=$r['descr']; ?>" class="form-control col-md-7 col-xs-12">                                              
294 294
 
295 295
                                        </td>
296 296
                                                                               
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
                                     <?php   
300 300
                                     echo" <td  style='text-align:right;'>";     
301 301
                                     ?>                               
302
-                                    <button type="submit" <?php if(!$id) { echo 'disabled';} ?>  class="btn btn-primary btn-sm">
302
+                                    <button type="submit" <?php if (!$id) { echo 'disabled'; } ?>  class="btn btn-primary btn-sm">
303 303
                                         <span class="glyphicon glyphicon-floppy-disk" aria-hidden="true"></span>
304 304
                                     </button>
305 305
                                     <?php      
Please login to merge, or discard this patch.
Braces   +15 added lines, -6 removed lines patch added patch discarded remove patch
@@ -47,8 +47,9 @@  discard block
 block discarded – undo
47 47
      $query = mysql_query('SELECT * FROM kunjungan_berobat WHERE id_kunjungan_berobat = "'.$id.'"');
48 48
      if($query && mysql_num_rows($query) == 1){
49 49
         $data = mysql_fetch_object($query);
50
-     }else 
51
-        die('Data modul tidak ditemukan');
50
+     } else {
51
+             die('Data modul tidak ditemukan');
52
+     }
52 53
   }
53 54
   
54 55
 if ($_GET['igroup']) {
@@ -112,7 +113,9 @@  discard block
 block discarded – undo
112 113
                             $pasien = $row->ktp.'-'.$row->nama;
113 114
 
114 115
                              echo '<option value="'.$row->id_pasien.'"';
115
-                             if($row->id_pasien == @$data->id_pasien) echo ' selected';
116
+                             if($row->id_pasien == @$data->id_pasien) {
117
+                                 echo ' selected';
118
+                             }
116 119
                              echo '>'.$pasien.'</option>';
117 120
                           }
118 121
                        }        
@@ -136,7 +139,9 @@  discard block
 block discarded – undo
136 139
                        if($query && mysql_num_rows($query) > 0){
137 140
                           while($row = mysql_fetch_object($query)){
138 141
                              echo '<option value="'.$row->id_poli.'"';
139
-                             if($row->id_poli == @$data->id_poli) echo ' selected';
142
+                             if($row->id_poli == @$data->id_poli) {
143
+                                 echo ' selected';
144
+                             }
140 145
                              echo '>'.$row->poli.'</option>';
141 146
                           }
142 147
                        }        
@@ -198,7 +203,9 @@  discard block
 block discarded – undo
198 203
                                                if($query && mysql_num_rows($query) > 0){
199 204
                                                   while($row = mysql_fetch_object($query)){
200 205
                                                      echo '<option value="'.$row->id_obat.'"';
201
-                                                     if($row->id_obat == @$r['id_obat']) echo ' selected';
206
+                                                     if($row->id_obat == @$r['id_obat']) {
207
+                                                         echo ' selected';
208
+                                                     }
202 209
                                                      echo '>'.$row->obat.'</option>';
203 210
                                                   }
204 211
                                                }        
@@ -275,7 +282,9 @@  discard block
 block discarded – undo
275 282
                                                if($query && mysql_num_rows($query) > 0){
276 283
                                                   while($row = mysql_fetch_object($query)){
277 284
                                                      echo '<option value="'.$row->id_obat.'"';
278
-                                                     if($row->id_obat == @$r['id_obat']) echo ' selected';
285
+                                                     if($row->id_obat == @$r['id_obat']) {
286
+                                                         echo ' selected';
287
+                                                     }
279 288
                                                      echo '>'.$row->obat.'</option>';
280 289
                                                   }
281 290
                                                }        
Please login to merge, or discard this patch.
mod_approval_diskon_penjualan_barang/approval_diskon_penjualan_barang.php 4 patches
Indentation   +66 added lines, -66 removed lines patch added patch discarded remove patch
@@ -94,11 +94,11 @@  discard block
 block discarded – undo
94 94
 
95 95
 if ($_SESSION['outlet'] == '0') {
96 96
 
97
-  $d_outlet = '%'; 
97
+    $d_outlet = '%'; 
98 98
 
99 99
 }  else {
100 100
 
101
-   $d_outlet = $_SESSION['outlet'];
101
+    $d_outlet = $_SESSION['outlet'];
102 102
 
103 103
 } 
104 104
 
@@ -108,21 +108,21 @@  discard block
 block discarded – undo
108 108
 
109 109
 if ($_GET['ioutlet']) {
110 110
 
111
-  $outlet = $_GET['ioutlet'];   
111
+    $outlet = $_GET['ioutlet'];   
112 112
 
113 113
 } else {
114 114
 
115
-  if ($_SESSION['outlet'] == '0') {
115
+    if ($_SESSION['outlet'] == '0') {
116 116
 
117 117
     $outlet = '1';    
118 118
 
119
-  }  else {
119
+    }  else {
120 120
 
121
-     $outlet = $_SESSION['outlet'];
121
+        $outlet = $_SESSION['outlet'];
122 122
 
123 123
      
124 124
 
125
-  } 
125
+    } 
126 126
 
127 127
 }
128 128
 
@@ -136,9 +136,9 @@  discard block
 block discarded – undo
136 136
 
137 137
 if($query && mysql_num_rows($query) == 1){
138 138
 
139
-  $data = mysql_fetch_object($query);
139
+    $data = mysql_fetch_object($query);
140 140
 
141
- }
141
+    }
142 142
 
143 143
   
144 144
 
@@ -148,11 +148,11 @@  discard block
 block discarded – undo
148 148
 
149 149
 if ($_GET['prd']) {
150 150
 
151
-  $prd = $_GET['prd'];
151
+    $prd = $_GET['prd'];
152 152
 
153 153
 } else {
154 154
 
155
-  $prd = $prd;
155
+    $prd = $prd;
156 156
 
157 157
 }
158 158
 
@@ -160,11 +160,11 @@  discard block
 block discarded – undo
160 160
 
161 161
 if ($_GET['istatus']) {
162 162
 
163
-  $status = $_GET['istatus'];   
163
+    $status = $_GET['istatus'];   
164 164
 
165 165
 } else {
166 166
 
167
-  $status = '0';
167
+    $status = '0';
168 168
 
169 169
    
170 170
 
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 
173 173
 
174 174
 
175
-  ?>
175
+    ?>
176 176
 
177 177
 
178 178
 
@@ -226,23 +226,23 @@  discard block
 block discarded – undo
226 226
 
227 227
        <?
228 228
 
229
-         $query = mysql_query("SELECT * FROM outlet where id_outlet like '$d_outlet' ORDER BY id_outlet");
229
+            $query = mysql_query("SELECT * FROM outlet where id_outlet like '$d_outlet' ORDER BY id_outlet");
230 230
 
231
-          if($query && mysql_num_rows($query) > 0){
231
+            if($query && mysql_num_rows($query) > 0){
232 232
 
233
-             while($row = mysql_fetch_object($query)){
233
+                while($row = mysql_fetch_object($query)){
234 234
 
235
-             echo '<option value="'.$row->id_outlet.'"';
235
+                echo '<option value="'.$row->id_outlet.'"';
236 236
 
237
-             if($row->id_outlet == $outlet) echo ' selected';
237
+                if($row->id_outlet == $outlet) echo ' selected';
238 238
 
239
-             echo '>'.$row->outlet.'</option>';
239
+                echo '>'.$row->outlet.'</option>';
240 240
 
241
-             }
241
+                }
242 242
 
243
-          }        
243
+            }        
244 244
 
245
-       ?>  
245
+        ?>  
246 246
 
247 247
        </select>        
248 248
 
@@ -256,21 +256,21 @@  discard block
 block discarded – undo
256 256
 
257 257
         <?
258 258
 
259
-          $query = mysql_query('SELECT * FROM status ORDER BY id_status');
259
+            $query = mysql_query('SELECT * FROM status ORDER BY id_status');
260 260
 
261
-           if($query && mysql_num_rows($query) > 0){
261
+            if($query && mysql_num_rows($query) > 0){
262 262
 
263
-              while($row = mysql_fetch_object($query)){
263
+                while($row = mysql_fetch_object($query)){
264 264
 
265
-              echo '<option value="'.$row->id_status.'"';
265
+                echo '<option value="'.$row->id_status.'"';
266 266
 
267
-              if($row->id_status == $status) echo ' selected';
267
+                if($row->id_status == $status) echo ' selected';
268 268
 
269
-              echo '>'.$row->status.'</option>';
269
+                echo '>'.$row->status.'</option>';
270 270
 
271
-              }
271
+                }
272 272
 
273
-           }        
273
+            }        
274 274
 
275 275
         ?>  
276 276
 
@@ -338,17 +338,17 @@  discard block
 block discarded – undo
338 338
 
339 339
 
340 340
 
341
-   $pj=mysql_num_rows($pjSQL);
341
+    $pj=mysql_num_rows($pjSQL);
342 342
 
343 343
 
344 344
 
345
-   if ($iprd == $prd) {
345
+    if ($iprd == $prd) {
346 346
 
347
-      $disabled = ''; 
347
+        $disabled = ''; 
348 348
 
349 349
     } else {
350 350
 
351
-      $disabled = 'disabled';
351
+        $disabled = 'disabled';
352 352
 
353 353
     }
354 354
 
@@ -356,11 +356,11 @@  discard block
 block discarded – undo
356 356
 
357 357
     if ($pj == 0) {
358 358
 
359
-      $disabled1 = 'disabled'; 
359
+        $disabled1 = 'disabled'; 
360 360
 
361 361
     } else {
362 362
 
363
-      $disabled1 = '';
363
+        $disabled1 = '';
364 364
 
365 365
     }
366 366
 
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
 
449 449
 
450 450
 
451
-         $tampil=mysql_query("SELECT b.*,c.customer,a.tanggal 
451
+            $tampil=mysql_query("SELECT b.*,c.customer,a.tanggal 
452 452
 
453 453
                                 , case when b.id_barang = '0' then e.paket else d.barang end as barang 
454 454
 
@@ -492,61 +492,61 @@  discard block
 block discarded – undo
492 492
 
493 493
          
494 494
 
495
-         $no = 1;
495
+            $no = 1;
496 496
 
497 497
          
498 498
 
499
-         while ($r=mysql_fetch_array($tampil)){  
499
+            while ($r=mysql_fetch_array($tampil)){  
500 500
 
501 501
 
502 502
 
503 503
           
504 504
 
505
-          $tgl = date("d/m/y", strtotime($r['tanggal']));
505
+            $tgl = date("d/m/y", strtotime($r['tanggal']));
506 506
 
507 507
 
508 508
 
509 509
              
510 510
 
511
-         echo"<tr>";
511
+            echo"<tr>";
512 512
 
513 513
 
514 514
 
515
-         echo"<td>$tgl </td>";
515
+            echo"<td>$tgl </td>";
516 516
 
517
-         echo"<td>$r[notrans]</td>";
517
+            echo"<td>$r[notrans]</td>";
518 518
 
519
-         echo"<td>$r[customer]</td>";
519
+            echo"<td>$r[customer]</td>";
520 520
 
521
-         echo"<td>$r[barang]</td>";
521
+            echo"<td>$r[barang]</td>";
522 522
 
523
-         echo"<td  style='text-align:right;'>".number_format($r[total],'0','.',',')."</td>";
523
+            echo"<td  style='text-align:right;'>".number_format($r[total],'0','.',',')."</td>";
524 524
 
525
-         echo"<td  style='text-align:right;'>".number_format($r[disc1],'2','.',',')." % | Rp. ".number_format($r[disc_value1],'0','.',',')."</td>";
525
+            echo"<td  style='text-align:right;'>".number_format($r[disc1],'2','.',',')." % | Rp. ".number_format($r[disc_value1],'0','.',',')."</td>";
526 526
 
527
-         echo"<td>";
527
+            echo"<td>";
528 528
 
529
-         ?>
529
+            ?>
530 530
 
531 531
          <select name="status<?php echo $no;?>" class="form-control" onchange="Getstatus<?php echo $no;?>(this.value)">
532 532
 
533 533
         <?
534 534
 
535
-          $query = mysql_query('SELECT * FROM status ORDER BY id_status');
535
+            $query = mysql_query('SELECT * FROM status ORDER BY id_status');
536 536
 
537
-           if($query && mysql_num_rows($query) > 0){
537
+            if($query && mysql_num_rows($query) > 0){
538 538
 
539
-              while($row = mysql_fetch_object($query)){
539
+                while($row = mysql_fetch_object($query)){
540 540
 
541
-              echo '<option value="'.$row->id_status.'"';
541
+                echo '<option value="'.$row->id_status.'"';
542 542
 
543
-              if($row->id_status == $r[status_diskon]) echo ' selected';
543
+                if($row->id_status == $r[status_diskon]) echo ' selected';
544 544
 
545
-              echo '>'.$row->status.'</option>';
545
+                echo '>'.$row->status.'</option>';
546 546
 
547
-              }
547
+                }
548 548
 
549
-           }        
549
+            }        
550 550
 
551 551
         ?>  
552 552
 
@@ -558,9 +558,9 @@  discard block
 block discarded – undo
558 558
 
559 559
          <?
560 560
 
561
-         echo"</td>";  
561
+            echo"</td>";  
562 562
 
563
-         echo"<td style='text-align:center;'>";  
563
+            echo"<td style='text-align:center;'>";  
564 564
 
565 565
        
566 566
 
@@ -578,23 +578,23 @@  discard block
 block discarded – undo
578 578
 
579 579
          
580 580
 
581
-  // echo"<a class='btn btn-default btn-sm' href='?module=$module&id_module=$id_module&id_pemesanan_barang=$r[id_pemesanan_barang]&prd=$prd&outlet=$outlet&act=detail' title='Detail Penarikan Simpanan'><span class='icon'><i class='fa fa-pencil-square-o'></i></span></a>"; 
581
+    // echo"<a class='btn btn-default btn-sm' href='?module=$module&id_module=$id_module&id_pemesanan_barang=$r[id_pemesanan_barang]&prd=$prd&outlet=$outlet&act=detail' title='Detail Penarikan Simpanan'><span class='icon'><i class='fa fa-pencil-square-o'></i></span></a>"; 
582 582
 
583 583
  
584 584
 
585
-         echo"</td>";          
585
+            echo"</td>";          
586 586
 
587 587
 
588 588
 
589
-         echo"</tr>";
589
+            echo"</tr>";
590 590
 
591
-         $no++;            
591
+            $no++;            
592 592
 
593
-         }
593
+            }
594 594
 
595 595
        
596 596
 
597
-         ?>
597
+            ?>
598 598
 
599 599
 
600 600
 
Please login to merge, or discard this patch.
Switch Indentation   +91 added lines, -91 removed lines patch added patch discarded remove patch
@@ -86,19 +86,19 @@  discard block
 block discarded – undo
86 86
 
87 87
 
88 88
 
89
-default:  
89
+    default:  
90 90
 
91 91
 
92 92
 
93 93
 
94 94
 
95
-if ($_SESSION['outlet'] == '0') {
95
+    if ($_SESSION['outlet'] == '0') {
96 96
 
97
-  $d_outlet = '%'; 
97
+      $d_outlet = '%'; 
98 98
 
99 99
 }  else {
100 100
 
101
-   $d_outlet = $_SESSION['outlet'];
101
+       $d_outlet = $_SESSION['outlet'];
102 102
 
103 103
 } 
104 104
 
@@ -106,23 +106,23 @@  discard block
 block discarded – undo
106 106
 
107 107
 
108 108
 
109
-if ($_GET['ioutlet']) {
109
+    if ($_GET['ioutlet']) {
110 110
 
111
-  $outlet = $_GET['ioutlet'];   
111
+      $outlet = $_GET['ioutlet'];   
112 112
 
113 113
 } else {
114 114
 
115
-  if ($_SESSION['outlet'] == '0') {
115
+      if ($_SESSION['outlet'] == '0') {
116 116
 
117
-    $outlet = '1';    
117
+        $outlet = '1';    
118 118
 
119
-  }  else {
119
+      }  else {
120 120
 
121
-     $outlet = $_SESSION['outlet'];
121
+         $outlet = $_SESSION['outlet'];
122 122
 
123 123
      
124 124
 
125
-  } 
125
+      } 
126 126
 
127 127
 }
128 128
 
@@ -130,41 +130,41 @@  discard block
 block discarded – undo
130 130
 
131 131
 
132 132
 
133
-$query = mysql_query('SELECT * FROM periode ');
133
+    $query = mysql_query('SELECT * FROM periode ');
134 134
 
135 135
 
136 136
 
137
-if($query && mysql_num_rows($query) == 1){
137
+    if($query && mysql_num_rows($query) == 1){
138 138
 
139
-  $data = mysql_fetch_object($query);
139
+      $data = mysql_fetch_object($query);
140 140
 
141
- }
141
+     }
142 142
 
143 143
   
144 144
 
145
-$iprd  =  $data->periode; 
145
+    $iprd  =  $data->periode; 
146 146
 
147 147
 
148 148
 
149
-if ($_GET['prd']) {
149
+    if ($_GET['prd']) {
150 150
 
151
-  $prd = $_GET['prd'];
151
+      $prd = $_GET['prd'];
152 152
 
153 153
 } else {
154 154
 
155
-  $prd = $prd;
155
+      $prd = $prd;
156 156
 
157 157
 }
158 158
 
159 159
 
160 160
 
161
-if ($_GET['istatus']) {
161
+    if ($_GET['istatus']) {
162 162
 
163
-  $status = $_GET['istatus'];   
163
+      $status = $_GET['istatus'];   
164 164
 
165 165
 } else {
166 166
 
167
-  $status = '0';
167
+      $status = '0';
168 168
 
169 169
    
170 170
 
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 
173 173
 
174 174
 
175
-  ?>
175
+      ?>
176 176
 
177 177
 
178 178
 
@@ -226,23 +226,23 @@  discard block
 block discarded – undo
226 226
 
227 227
        <?
228 228
 
229
-         $query = mysql_query("SELECT * FROM outlet where id_outlet like '$d_outlet' ORDER BY id_outlet");
229
+             $query = mysql_query("SELECT * FROM outlet where id_outlet like '$d_outlet' ORDER BY id_outlet");
230 230
 
231
-          if($query && mysql_num_rows($query) > 0){
231
+              if($query && mysql_num_rows($query) > 0){
232 232
 
233
-             while($row = mysql_fetch_object($query)){
233
+                 while($row = mysql_fetch_object($query)){
234 234
 
235
-             echo '<option value="'.$row->id_outlet.'"';
235
+                 echo '<option value="'.$row->id_outlet.'"';
236 236
 
237
-             if($row->id_outlet == $outlet) echo ' selected';
237
+                 if($row->id_outlet == $outlet) echo ' selected';
238 238
 
239
-             echo '>'.$row->outlet.'</option>';
239
+                 echo '>'.$row->outlet.'</option>';
240 240
 
241
-             }
241
+                 }
242 242
 
243
-          }        
243
+              }        
244 244
 
245
-       ?>  
245
+           ?>  
246 246
 
247 247
        </select>        
248 248
 
@@ -256,23 +256,23 @@  discard block
 block discarded – undo
256 256
 
257 257
         <?
258 258
 
259
-          $query = mysql_query('SELECT * FROM status ORDER BY id_status');
259
+              $query = mysql_query('SELECT * FROM status ORDER BY id_status');
260 260
 
261
-           if($query && mysql_num_rows($query) > 0){
261
+               if($query && mysql_num_rows($query) > 0){
262 262
 
263
-              while($row = mysql_fetch_object($query)){
263
+                  while($row = mysql_fetch_object($query)){
264 264
 
265
-              echo '<option value="'.$row->id_status.'"';
265
+                  echo '<option value="'.$row->id_status.'"';
266 266
 
267
-              if($row->id_status == $status) echo ' selected';
267
+                  if($row->id_status == $status) echo ' selected';
268 268
 
269
-              echo '>'.$row->status.'</option>';
269
+                  echo '>'.$row->status.'</option>';
270 270
 
271
-              }
271
+                  }
272 272
 
273
-           }        
273
+               }        
274 274
 
275
-        ?>  
275
+            ?>  
276 276
 
277 277
         </select>        
278 278
 
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
 
329 329
 
330 330
 
331
-    $pjSQL = mysql_query("SELECT * FROM penjualan_barang_detail 
331
+        $pjSQL = mysql_query("SELECT * FROM penjualan_barang_detail 
332 332
 
333 333
                           WHERE status_diskon = '$status' and prd = '$prd' and disc1 > 0
334 334
 
@@ -338,35 +338,35 @@  discard block
 block discarded – undo
338 338
 
339 339
 
340 340
 
341
-   $pj=mysql_num_rows($pjSQL);
341
+       $pj=mysql_num_rows($pjSQL);
342 342
 
343 343
 
344 344
 
345
-   if ($iprd == $prd) {
345
+       if ($iprd == $prd) {
346 346
 
347
-      $disabled = ''; 
347
+          $disabled = ''; 
348 348
 
349
-    } else {
349
+        } else {
350 350
 
351
-      $disabled = 'disabled';
351
+          $disabled = 'disabled';
352 352
 
353
-    }
353
+        }
354 354
 
355 355
 
356 356
 
357
-    if ($pj == 0) {
357
+        if ($pj == 0) {
358 358
 
359
-      $disabled1 = 'disabled'; 
359
+          $disabled1 = 'disabled'; 
360 360
 
361
-    } else {
361
+        } else {
362 362
 
363
-      $disabled1 = '';
363
+          $disabled1 = '';
364 364
 
365
-    }
365
+        }
366 366
 
367 367
 
368 368
 
369
-    ?>
369
+        ?>
370 370
 
371 371
 
372 372
 
@@ -413,7 +413,7 @@  discard block
 block discarded – undo
413 413
                   <button type="submit"   class="btn btn-success btn-sm   "
414 414
 
415 415
                   <?php echo $disabled?>
416
-
416
+    
417 417
                 <?php echo $disabled1?>
418 418
 
419 419
                   >
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
 
449 449
 
450 450
 
451
-         $tampil=mysql_query("SELECT b.*,c.customer,a.tanggal 
451
+             $tampil=mysql_query("SELECT b.*,c.customer,a.tanggal 
452 452
 
453 453
                                 , case when b.id_barang = '0' then e.paket else d.barang end as barang 
454 454
 
@@ -492,63 +492,63 @@  discard block
 block discarded – undo
492 492
 
493 493
          
494 494
 
495
-         $no = 1;
495
+             $no = 1;
496 496
 
497 497
          
498 498
 
499
-         while ($r=mysql_fetch_array($tampil)){  
499
+             while ($r=mysql_fetch_array($tampil)){  
500 500
 
501 501
 
502 502
 
503 503
           
504 504
 
505
-          $tgl = date("d/m/y", strtotime($r['tanggal']));
505
+              $tgl = date("d/m/y", strtotime($r['tanggal']));
506 506
 
507 507
 
508 508
 
509 509
              
510 510
 
511
-         echo"<tr>";
511
+             echo"<tr>";
512 512
 
513 513
 
514 514
 
515
-         echo"<td>$tgl </td>";
515
+             echo"<td>$tgl </td>";
516 516
 
517
-         echo"<td>$r[notrans]</td>";
517
+             echo"<td>$r[notrans]</td>";
518 518
 
519
-         echo"<td>$r[customer]</td>";
519
+             echo"<td>$r[customer]</td>";
520 520
 
521
-         echo"<td>$r[barang]</td>";
521
+             echo"<td>$r[barang]</td>";
522 522
 
523
-         echo"<td  style='text-align:right;'>".number_format($r[total],'0','.',',')."</td>";
523
+             echo"<td  style='text-align:right;'>".number_format($r[total],'0','.',',')."</td>";
524 524
 
525
-         echo"<td  style='text-align:right;'>".number_format($r[disc1],'2','.',',')." % | Rp. ".number_format($r[disc_value1],'0','.',',')."</td>";
525
+             echo"<td  style='text-align:right;'>".number_format($r[disc1],'2','.',',')." % | Rp. ".number_format($r[disc_value1],'0','.',',')."</td>";
526 526
 
527
-         echo"<td>";
527
+             echo"<td>";
528 528
 
529
-         ?>
529
+             ?>
530 530
 
531 531
          <select name="status<?php echo $no;?>" class="form-control" onchange="Getstatus<?php echo $no;?>(this.value)">
532 532
 
533 533
         <?
534 534
 
535
-          $query = mysql_query('SELECT * FROM status ORDER BY id_status');
535
+              $query = mysql_query('SELECT * FROM status ORDER BY id_status');
536 536
 
537
-           if($query && mysql_num_rows($query) > 0){
537
+               if($query && mysql_num_rows($query) > 0){
538 538
 
539
-              while($row = mysql_fetch_object($query)){
539
+                  while($row = mysql_fetch_object($query)){
540 540
 
541
-              echo '<option value="'.$row->id_status.'"';
541
+                  echo '<option value="'.$row->id_status.'"';
542 542
 
543
-              if($row->id_status == $r[status_diskon]) echo ' selected';
543
+                  if($row->id_status == $r[status_diskon]) echo ' selected';
544 544
 
545
-              echo '>'.$row->status.'</option>';
545
+                  echo '>'.$row->status.'</option>';
546 546
 
547
-              }
547
+                  }
548 548
 
549
-           }        
549
+               }        
550 550
 
551
-        ?>  
551
+            ?>  
552 552
 
553 553
         </select>        
554 554
 
@@ -558,43 +558,43 @@  discard block
 block discarded – undo
558 558
 
559 559
          <?
560 560
 
561
-         echo"</td>";  
561
+             echo"</td>";  
562 562
 
563
-         echo"<td style='text-align:center;'>";  
563
+             echo"<td style='text-align:center;'>";  
564 564
 
565 565
        
566 566
 
567
-        echo"<input type='hidden' name='id".$no."' value = '$r[id_penjualan_barang_detail]'>";
567
+            echo"<input type='hidden' name='id".$no."' value = '$r[id_penjualan_barang_detail]'>";
568 568
 
569
-        echo"<input type='hidden' name='prd".$no."' value = '$r[prd]'>"; 
569
+            echo"<input type='hidden' name='prd".$no."' value = '$r[prd]'>"; 
570 570
 
571
-        echo"<input type='hidden' name='notrans".$no."' value = '$r[notrans]'>";
571
+            echo"<input type='hidden' name='notrans".$no."' value = '$r[notrans]'>";
572 572
 
573
-        echo"<input type='hidden' name='outlet".$no."' value = '$r[id_outlet]'>"; 
573
+            echo"<input type='hidden' name='outlet".$no."' value = '$r[id_outlet]'>"; 
574 574
 
575
-        echo"<input type='hidden' name='p_status".$no."' id='p_status".$no."' value = '$status'>"; 
575
+            echo"<input type='hidden' name='p_status".$no."' id='p_status".$no."' value = '$status'>"; 
576 576
 
577 577
 
578 578
 
579 579
          
580 580
 
581
-  // echo"<a class='btn btn-default btn-sm' href='?module=$module&id_module=$id_module&id_pemesanan_barang=$r[id_pemesanan_barang]&prd=$prd&outlet=$outlet&act=detail' title='Detail Penarikan Simpanan'><span class='icon'><i class='fa fa-pencil-square-o'></i></span></a>"; 
581
+      // echo"<a class='btn btn-default btn-sm' href='?module=$module&id_module=$id_module&id_pemesanan_barang=$r[id_pemesanan_barang]&prd=$prd&outlet=$outlet&act=detail' title='Detail Penarikan Simpanan'><span class='icon'><i class='fa fa-pencil-square-o'></i></span></a>"; 
582 582
 
583 583
  
584 584
 
585
-         echo"</td>";          
585
+             echo"</td>";          
586 586
 
587 587
 
588 588
 
589
-         echo"</tr>";
589
+             echo"</tr>";
590 590
 
591
-         $no++;            
591
+             $no++;            
592 592
 
593
-         }
593
+             }
594 594
 
595 595
        
596 596
 
597
-         ?>
597
+             ?>
598 598
 
599 599
 
600 600
 
@@ -692,7 +692,7 @@  discard block
 block discarded – undo
692 692
 
693 693
     <?
694 694
 
695
-break;
695
+    break;
696 696
 
697 697
 }
698 698
 
Please login to merge, or discard this patch.
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -6,11 +6,11 @@  discard block
 block discarded – undo
6 6
 
7 7
 <script type="text/javascript">
8 8
 
9
-<?php for($i = 1; $i <= 100; $i++)  { ?>  
9
+<?php for ($i = 1; $i<=100; $i++) { ?>  
10 10
 
11
-function Getstatus<?php echo $i;?>(str) {
11
+function Getstatus<?php echo $i; ?>(str) {
12 12
 
13
-    document.getElementById("p_status<?php echo $i;?>").value = str;
13
+    document.getElementById("p_status<?php echo $i; ?>").value = str;
14 14
 
15 15
 }
16 16
 
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 
25 25
 
26 26
 
27
-<?php for($i = 1; $i <= 100; $i++)  { ?>  
27
+<?php for ($i = 1; $i<=100; $i++) { ?>  
28 28
 
29 29
 <script>
30 30
 
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 
83 83
 <?php
84 84
 
85
-switch($_GET[act]){
85
+switch ($_GET[act]) {
86 86
 
87 87
 
88 88
 
@@ -92,11 +92,11 @@  discard block
 block discarded – undo
92 92
 
93 93
 
94 94
 
95
-if ($_SESSION['outlet'] == '0') {
95
+if ($_SESSION['outlet']=='0') {
96 96
 
97 97
   $d_outlet = '%'; 
98 98
 
99
-}  else {
99
+} else {
100 100
 
101 101
    $d_outlet = $_SESSION['outlet'];
102 102
 
@@ -112,11 +112,11 @@  discard block
 block discarded – undo
112 112
 
113 113
 } else {
114 114
 
115
-  if ($_SESSION['outlet'] == '0') {
115
+  if ($_SESSION['outlet']=='0') {
116 116
 
117 117
     $outlet = '1';    
118 118
 
119
-  }  else {
119
+  } else {
120 120
 
121 121
      $outlet = $_SESSION['outlet'];
122 122
 
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 
135 135
 
136 136
 
137
-if($query && mysql_num_rows($query) == 1){
137
+if ($query && mysql_num_rows($query)==1) {
138 138
 
139 139
   $data = mysql_fetch_object($query);
140 140
 
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 
143 143
   
144 144
 
145
-$iprd  =  $data->periode; 
145
+$iprd = $data->periode; 
146 146
 
147 147
 
148 148
 
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 
193 193
     <div class="col-md-6 col-sm-12 col-xs-12">  
194 194
 
195
-    <h2><?php echo $nmmodule;?></h2>
195
+    <h2><?php echo $nmmodule; ?></h2>
196 196
 
197 197
     </div>
198 198
 
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 
215 215
     <div class="col-md-6 col-sm-12 col-xs-12">
216 216
 
217
-      <input type="month" name="prd" id="prd" value="<?php echo $prd;?>" onChange="document.myform.submit();" class="form-control"  required>
217
+      <input type="month" name="prd" id="prd" value="<?php echo $prd; ?>" onChange="document.myform.submit();" class="form-control"  required>
218 218
 
219 219
     </div>
220 220
 
@@ -228,13 +228,13 @@  discard block
 block discarded – undo
228 228
 
229 229
          $query = mysql_query("SELECT * FROM outlet where id_outlet like '$d_outlet' ORDER BY id_outlet");
230 230
 
231
-          if($query && mysql_num_rows($query) > 0){
231
+          if ($query && mysql_num_rows($query)>0) {
232 232
 
233
-             while($row = mysql_fetch_object($query)){
233
+             while ($row = mysql_fetch_object($query)) {
234 234
 
235 235
              echo '<option value="'.$row->id_outlet.'"';
236 236
 
237
-             if($row->id_outlet == $outlet) echo ' selected';
237
+             if ($row->id_outlet==$outlet) echo ' selected';
238 238
 
239 239
              echo '>'.$row->outlet.'</option>';
240 240
 
@@ -258,13 +258,13 @@  discard block
 block discarded – undo
258 258
 
259 259
           $query = mysql_query('SELECT * FROM status ORDER BY id_status');
260 260
 
261
-           if($query && mysql_num_rows($query) > 0){
261
+           if ($query && mysql_num_rows($query)>0) {
262 262
 
263
-              while($row = mysql_fetch_object($query)){
263
+              while ($row = mysql_fetch_object($query)) {
264 264
 
265 265
               echo '<option value="'.$row->id_status.'"';
266 266
 
267
-              if($row->id_status == $status) echo ' selected';
267
+              if ($row->id_status==$status) echo ' selected';
268 268
 
269 269
               echo '>'.$row->status.'</option>';
270 270
 
@@ -338,11 +338,11 @@  discard block
 block discarded – undo
338 338
 
339 339
 
340 340
 
341
-   $pj=mysql_num_rows($pjSQL);
341
+   $pj = mysql_num_rows($pjSQL);
342 342
 
343 343
 
344 344
 
345
-   if ($iprd == $prd) {
345
+   if ($iprd==$prd) {
346 346
 
347 347
       $disabled = ''; 
348 348
 
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
 
355 355
 
356 356
 
357
-    if ($pj == 0) {
357
+    if ($pj==0) {
358 358
 
359 359
       $disabled1 = 'disabled'; 
360 360
 
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
 
449 449
 
450 450
 
451
-         $tampil=mysql_query("SELECT b.*,c.customer,a.tanggal 
451
+         $tampil = mysql_query("SELECT b.*,c.customer,a.tanggal 
452 452
 
453 453
                                 , case when b.id_barang = '0' then e.paket else d.barang end as barang 
454 454
 
@@ -496,7 +496,7 @@  discard block
 block discarded – undo
496 496
 
497 497
          
498 498
 
499
-         while ($r=mysql_fetch_array($tampil)){  
499
+         while ($r = mysql_fetch_array($tampil)) {  
500 500
 
501 501
 
502 502
 
@@ -520,27 +520,27 @@  discard block
 block discarded – undo
520 520
 
521 521
          echo"<td>$r[barang]</td>";
522 522
 
523
-         echo"<td  style='text-align:right;'>".number_format($r[total],'0','.',',')."</td>";
523
+         echo"<td  style='text-align:right;'>".number_format($r[total], '0', '.', ',')."</td>";
524 524
 
525
-         echo"<td  style='text-align:right;'>".number_format($r[disc1],'2','.',',')." % | Rp. ".number_format($r[disc_value1],'0','.',',')."</td>";
525
+         echo"<td  style='text-align:right;'>".number_format($r[disc1], '2', '.', ',')." % | Rp. ".number_format($r[disc_value1], '0', '.', ',')."</td>";
526 526
 
527 527
          echo"<td>";
528 528
 
529 529
          ?>
530 530
 
531
-         <select name="status<?php echo $no;?>" class="form-control" onchange="Getstatus<?php echo $no;?>(this.value)">
531
+         <select name="status<?php echo $no; ?>" class="form-control" onchange="Getstatus<?php echo $no; ?>(this.value)">
532 532
 
533 533
         <?
534 534
 
535 535
           $query = mysql_query('SELECT * FROM status ORDER BY id_status');
536 536
 
537
-           if($query && mysql_num_rows($query) > 0){
537
+           if ($query && mysql_num_rows($query)>0) {
538 538
 
539
-              while($row = mysql_fetch_object($query)){
539
+              while ($row = mysql_fetch_object($query)) {
540 540
 
541 541
               echo '<option value="'.$row->id_status.'"';
542 542
 
543
-              if($row->id_status == $r[status_diskon]) echo ' selected';
543
+              if ($row->id_status==$r[status_diskon]) echo ' selected';
544 544
 
545 545
               echo '>'.$row->status.'</option>';
546 546
 
@@ -602,9 +602,9 @@  discard block
 block discarded – undo
602 602
 
603 603
    </table>
604 604
 
605
-    <input type='hidden' name='jum' value='<?php echo $no;?>' />
605
+    <input type='hidden' name='jum' value='<?php echo $no; ?>' />
606 606
 
607
-    <input type='hidden' name='istatus' value='<?php echo $status;?>' />
607
+    <input type='hidden' name='istatus' value='<?php echo $status; ?>' />
608 608
 
609 609
    </form>
610 610
 
Please login to merge, or discard this patch.
Braces   +11 added lines, -5 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 
97 97
   $d_outlet = '%'; 
98 98
 
99
-}  else {
99
+} else {
100 100
 
101 101
    $d_outlet = $_SESSION['outlet'];
102 102
 
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 
117 117
     $outlet = '1';    
118 118
 
119
-  }  else {
119
+  } else {
120 120
 
121 121
      $outlet = $_SESSION['outlet'];
122 122
 
@@ -234,7 +234,9 @@  discard block
 block discarded – undo
234 234
 
235 235
              echo '<option value="'.$row->id_outlet.'"';
236 236
 
237
-             if($row->id_outlet == $outlet) echo ' selected';
237
+             if($row->id_outlet == $outlet) {
238
+                 echo ' selected';
239
+             }
238 240
 
239 241
              echo '>'.$row->outlet.'</option>';
240 242
 
@@ -264,7 +266,9 @@  discard block
 block discarded – undo
264 266
 
265 267
               echo '<option value="'.$row->id_status.'"';
266 268
 
267
-              if($row->id_status == $status) echo ' selected';
269
+              if($row->id_status == $status) {
270
+                  echo ' selected';
271
+              }
268 272
 
269 273
               echo '>'.$row->status.'</option>';
270 274
 
@@ -540,7 +544,9 @@  discard block
 block discarded – undo
540 544
 
541 545
               echo '<option value="'.$row->id_status.'"';
542 546
 
543
-              if($row->id_status == $r[status_diskon]) echo ' selected';
547
+              if($row->id_status == $r[status_diskon]) {
548
+                  echo ' selected';
549
+              }
544 550
 
545 551
               echo '>'.$row->status.'</option>';
546 552
 
Please login to merge, or discard this patch.