aepnat /
simpuskesmas
| 1 | <? |
||
|
0 ignored issues
–
show
|
|||
| 2 | include "config/koneksi.php"; |
||
| 3 | ?> |
||
| 4 | <!DOCTYPE html> |
||
| 5 | <html lang="en"> |
||
| 6 | <head> |
||
| 7 | <title>Bootstrap Example</title> |
||
| 8 | <meta charset="utf-8"> |
||
| 9 | <meta name="viewport" content="width=device-width, initial-scale=1"> |
||
| 10 | <!-- <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> |
||
| 11 | <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> |
||
| 12 | <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> --> |
||
| 13 | |||
| 14 | <link href="css/bootstrap.min.css" rel="stylesheet"> |
||
| 15 | |||
| 16 | <link href="fonts/css/font-awesome.min.css" rel="stylesheet"> |
||
| 17 | <link href="css/animate.min.css" rel="stylesheet"> |
||
| 18 | |||
| 19 | <!-- Custom styling plus plugins --> |
||
| 20 | <link href="css/custom.css" rel="stylesheet"> |
||
| 21 | <link href="css/icheck/flat/green.css" rel="stylesheet"> |
||
| 22 | <!-- editor --> |
||
| 23 | |||
| 24 | <link href="css/editor/external/google-code-prettify/prettify.css" rel="stylesheet"> |
||
| 25 | <link href="css/editor/index.css" rel="stylesheet"> |
||
| 26 | <!-- select2 --> |
||
| 27 | <link href="css/select/select2.min.css" rel="stylesheet"> |
||
| 28 | <!-- switchery --> |
||
| 29 | <link rel="stylesheet" href="css/switchery/switchery.min.css" /> |
||
| 30 | |||
| 31 | <script src="js/jquery.min.js"></script> |
||
| 32 | <script src="js/bootstrap.min.js"></script> |
||
| 33 | <link href="config/css/tiny_table.css" rel="stylesheet" type="text/css" /> |
||
| 34 | |||
| 35 | </head> |
||
| 36 | <body> |
||
| 37 | |||
| 38 | <div class="container"> |
||
| 39 | <h2>Modal Example</h2> |
||
| 40 | <!-- Trigger the modal with a button --> |
||
| 41 | <button type="button" class="btn btn-info btn-lg" data-toggle="modal" data-target="#myModal">Open Modal</button> |
||
| 42 | |||
| 43 | <!-- Modal --> |
||
| 44 | <div class="modal fade" id="myModal" role="dialog"> |
||
| 45 | <div class="modal-dialog modal-lg"> |
||
| 46 | |||
| 47 | <!-- Modal content--> |
||
| 48 | <div class="modal-content"> |
||
| 49 | <div class="modal-header"> |
||
| 50 | <button type="button" class="close" data-dismiss="modal">×</button> |
||
| 51 | <h4 class="modal-title">Modal Header</h4> |
||
| 52 | </div> |
||
| 53 | <div class="modal-body"> |
||
| 54 | <?// start grid ?> |
||
| 55 | |||
| 56 | |||
| 57 | <? |
||
| 58 | |||
| 59 | |||
| 60 | // $module = $_GET['module']; |
||
| 61 | // $id_module = $_GET['id_module']; |
||
| 62 | // $title = $_GET['title']; |
||
| 63 | |||
| 64 | $prd = '2016-01';//$_GET['prd']; |
||
| 65 | $kode = 'PJ';//$_GET['kode']; |
||
| 66 | |||
| 67 | $id_outlet = '1';//$_GET['id_outlet']; |
||
| 68 | $outlet = '';//$_GET['outlet']; |
||
| 69 | $tanggal = 'A44-1601-0002';//$_GET['tanggal']; |
||
| 70 | $notrans = '2016-09-04';//$_GET['notrans']; |
||
| 71 | $customer = '3';//$_GET['customer']; |
||
| 72 | |||
| 73 | if ($_GET['ioutlet']) {
|
||
| 74 | $outlet = $_GET['ioutlet']; |
||
| 75 | } else {
|
||
| 76 | $outlet = '1'; |
||
| 77 | } |
||
| 78 | |||
| 79 | if ($_GET['itipe_barang']) {
|
||
| 80 | $tipe_barang = $_GET['itipe_barang']; |
||
| 81 | } else {
|
||
| 82 | $tipe_barang = '1'; |
||
| 83 | } |
||
| 84 | |||
| 85 | ?> |
||
| 86 | |||
| 87 | |||
| 88 | <div class="table-responsive"> |
||
| 89 | |||
| 90 | <div class="row"> |
||
| 91 | |||
| 92 | <div class="col-md-12 col-sm-12 col-xs-12"> |
||
| 93 | <div class="x_panel"> |
||
| 94 | <div class="x_title"> |
||
| 95 | <h2></h2> |
||
| 96 | |||
| 97 | |||
| 98 | <form method=get action='<?php echo $_SERVER[PHP_SELF]?>' name='myform'> |
||
| 99 | <input type="hidden" name="id_module" value="<?php echo $id_module?>" /> |
||
| 100 | <input type="hidden" name="module" value="<?php echo $module?>" /> |
||
| 101 | <input type="hidden" name="prd" value="<?php echo $prd?>" /> |
||
| 102 | |||
| 103 | <input type="hidden" name="kode" id="kode" value="<?php echo $kode;?>"> |
||
| 104 | <input type="hidden" name="id_outlet" id="id_outlet" value="<?php echo $id_outlet;?>"> |
||
| 105 | <input type="hidden" name="tanggal" id="tanggal" value="<?php echo $tanggal;?>"> |
||
| 106 | <input type="hidden" name="customer" id="customer" value="<?php echo $customer;?>"> |
||
| 107 | <input type="hidden" name="notrans" id="notrans" value="<?php echo $notrans;?>"> |
||
| 108 | |||
| 109 | <p class="pull-right"> |
||
| 110 | <select name="itipe_barang" class="form-control" onChange="document.myform.submit();"> |
||
| 111 | <? |
||
| 112 | $query = mysql_query('SELECT * FROM tipe_barang ORDER BY id_tipe_barang');
|
||
| 113 | if($query && mysql_num_rows($query) > 0){
|
||
| 114 | while($row = mysql_fetch_object($query)){
|
||
| 115 | echo '<option value="'.$row->id_tipe_barang.'"'; |
||
| 116 | if($row->id_tipe_barang == $tipe_barang) echo ' selected'; |
||
| 117 | echo '>'.$row->tipe_barang.'</option>'; |
||
| 118 | } |
||
| 119 | } |
||
| 120 | ?> |
||
| 121 | </select> |
||
| 122 | </p> |
||
| 123 | |||
| 124 | <p class="pull-right"> |
||
| 125 | <select name="ioutlet" class="form-control" onChange="document.myform.submit();"> |
||
| 126 | <? |
||
| 127 | $query = mysql_query('SELECT * FROM outlet ORDER BY id_outlet');
|
||
| 128 | if($query && mysql_num_rows($query) > 0){
|
||
| 129 | while($row = mysql_fetch_object($query)){
|
||
| 130 | echo '<option value="'.$row->id_outlet.'"'; |
||
| 131 | if($row->id_outlet == $outlet) echo ' selected'; |
||
| 132 | echo '>'.$row->outlet.'</option>'; |
||
| 133 | } |
||
| 134 | } |
||
| 135 | ?> |
||
| 136 | </select> |
||
| 137 | </p> |
||
| 138 | |||
| 139 | |||
| 140 | </form> |
||
| 141 | <div class="clearfix"></div> |
||
| 142 | </div> |
||
| 143 | <div class="x_content"> |
||
| 144 | <div id="tablewrapper"> |
||
| 145 | |||
| 146 | <div id="tableheader"> |
||
| 147 | |||
| 148 | <div class="search"> <select id="columns" onchange="sorter.search('query')"></select>
|
||
| 149 | <input type="text" id="query" onkeyup="sorter.search('query');" value="Search By ...." onclick="this.value=''"/>
|
||
| 150 | </div> |
||
| 151 | <span class="details"> |
||
| 152 | <div>Records <span id="startrecord"></span>-<span id="endrecord"></span> of <span id="totalrecords"></span></div> |
||
| 153 | <!--<div><a href="javascript:sorter.reset()">reset</a></div>--> |
||
| 154 | </span> |
||
| 155 | </div> <div> |
||
| 156 | |||
| 157 | |||
| 158 | |||
| 159 | <table cellpadding="0" cellspacing="0" border="0" id="table" class="table table-striped responsive-utilities jambo_table" > |
||
| 160 | <thead> |
||
| 161 | <tr> |
||
| 162 | <th ><h3 style='font-size:12px;' width='20px'></h3></th> |
||
| 163 | <th><h3 style='font-size:12px;'>Jenis Barang</h3></th> |
||
| 164 | <th width="150px;"><h3 style='font-size:12px;'>Kode Barang</h3></th> |
||
| 165 | <th><h3 style='font-size:12px;'>Barang</h3></th> |
||
| 166 | <th><h3 style='font-size:12px;'>Satuan</h3></th> |
||
| 167 | <th class='nosort' ><h3 style='font-size:12px;text-align: right;'>Harga</h3></th> |
||
| 168 | </tr> |
||
| 169 | </thead> |
||
| 170 | <tbody> |
||
| 171 | |||
| 172 | <? |
||
| 173 | |||
| 174 | $SQL= "SELECT b.jenis_barang |
||
| 175 | ,c.unit_barang |
||
| 176 | ,a.kode as kode_barang |
||
| 177 | ,a.id_barang |
||
| 178 | ,a.barang |
||
| 179 | ,d.harga_jual |
||
| 180 | ,sum(saldo_akhir) as stok |
||
| 181 | FROM barang a INNER JOIN jenis_barang b |
||
| 182 | ON a.id_jenis_barang = b.id_jenis_barang |
||
| 183 | AND b.aktif = 'Y' |
||
| 184 | INNER JOIN unit_barang c |
||
| 185 | ON a.id_unit_barang = c.id_unit_barang |
||
| 186 | AND c.aktif = 'Y' |
||
| 187 | LEFT JOIN harga_barang d |
||
| 188 | ON a.id_barang = d.id_barang |
||
| 189 | AND d.status = '0' |
||
| 190 | AND d.id_outlet = '$outlet' |
||
| 191 | LEFT JOIN stok e |
||
| 192 | ON '$prd' = e.prd |
||
| 193 | AND a.id_barang = e.id_barang |
||
| 194 | and '$outlet' = e.id_outlet |
||
| 195 | WHERE a.aktif = 'Y' |
||
| 196 | AND a.id_tipe_barang = '$tipe_barang' |
||
| 197 | and d.harga_jual > 0 |
||
| 198 | and e.saldo_akhir > 0 |
||
| 199 | group by b.jenis_barang |
||
| 200 | ,c.unit_barang |
||
| 201 | ,a.id_barang |
||
| 202 | ,a.kode |
||
| 203 | ,a.barang |
||
| 204 | ,d.harga_jual |
||
| 205 | ORDER BY a.id_jenis_barang,a.kode"; |
||
| 206 | |||
| 207 | |||
| 208 | $tampil=mysql_query($SQL); |
||
| 209 | |||
| 210 | |||
| 211 | $no = 1; |
||
| 212 | |||
| 213 | while($r=mysql_fetch_array($tampil)){
|
||
| 214 | |||
| 215 | $id_barang = $r['id_barang']; |
||
| 216 | $kode_barang = $r['kode_barang']; |
||
| 217 | |||
| 218 | $dsql = mysql_query("SELECT sum(qty) as reserve
|
||
| 219 | FROM stok_reserved |
||
| 220 | WHERE id_barang_promosi = '$id_barang' |
||
| 221 | AND id_outlet = '$outlet' |
||
| 222 | AND tipe = 'B' |
||
| 223 | and prd = '$prd' |
||
| 224 | "); |
||
| 225 | |||
| 226 | $d = mysql_fetch_array($dsql); |
||
| 227 | |||
| 228 | if ($d['reserve']) {
|
||
| 229 | $reserve = $d['reserve']; |
||
| 230 | } else {
|
||
| 231 | $reserve = 0; |
||
| 232 | } |
||
| 233 | |||
| 234 | $sisa_stok = $r['stok']-$reserve; |
||
| 235 | |||
| 236 | if ($sisa_stok == '0') {
|
||
| 237 | |||
| 238 | echo ""; |
||
| 239 | } else {
|
||
| 240 | |||
| 241 | |||
| 242 | |||
| 243 | echo"<tr>"; |
||
| 244 | echo" <td style='text-align:center;'>"; |
||
| 245 | echo"<a href='../../modul/mod_$module/aksi_$module.php?module=$module&act=add&barcode=$kode_barang&prd=$prd¬rans=$notrans&kode=$kode&tanggal=$tanggal&customer=$customer&outlet=$outlet&id_outlet=$id_outlet&id_module=$id_module&look=1' title=''><span class='icon'><i class='fa fa-check'></i></span></a>"; |
||
| 246 | |||
| 247 | echo"</td>"; |
||
| 248 | echo"<td>".$r['jenis_barang']."</td>"; |
||
| 249 | echo"<td>".$r['kode_barang']."</td>"; |
||
| 250 | echo"<td>".$r['barang']."</td>"; |
||
| 251 | echo"<td>".$r['unit_barang']."</td>"; |
||
| 252 | echo"<td style='text-align:right;'>".number_format($r['harga_jual'], 0, ".", ",")."</td>"; |
||
| 253 | |||
| 254 | echo"</tr>"; |
||
| 255 | |||
| 256 | } |
||
| 257 | |||
| 258 | |||
| 259 | $no++; |
||
| 260 | |||
| 261 | } |
||
| 262 | ?> |
||
| 263 | </tbody> |
||
| 264 | </table> |
||
| 265 | |||
| 266 | </div> |
||
| 267 | <div id="tablefooter"> |
||
| 268 | <div id="tablenav"> |
||
| 269 | <div> |
||
| 270 | <span class="glyphicon glyphicon-fast-backward" onclick="sorter.move(-1,true)" /></span> |
||
| 271 | <span class="glyphicon glyphicon-step-backward" onclick="sorter.move(-1)" /></span> |
||
| 272 | <span class="glyphicon glyphicon-step-forward" onclick="sorter.move(1)" /></span> |
||
| 273 | <span class="glyphicon glyphicon-fast-forward" onclick="sorter.move(1,true)" /></span> |
||
| 274 | </div> |
||
| 275 | <div> |
||
| 276 | <select id="pagedropdown" style="width:40px;"></select> |
||
| 277 | </div> |
||
| 278 | <!-- <div> |
||
| 279 | <a href="javascript:sorter.showall()">view all</a> |
||
| 280 | </div> --> |
||
| 281 | </div> |
||
| 282 | |||
| 283 | <div id="tablelocation"> |
||
| 284 | <div> |
||
| 285 | <select onchange="sorter.size(this.value)" style="width:50px;"> |
||
| 286 | <option value="5">5</option> |
||
| 287 | <option value="10" selected="selected">10</option> |
||
| 288 | <option value="20">20</option> |
||
| 289 | <option value="50">50</option> |
||
| 290 | <option value="100">100</option> |
||
| 291 | </select> |
||
| 292 | <span>Entries Per Page</span> </div> <div>| Page <span id="currentpage"></span> of <span id="totalpages"></span> |   </div> |
||
| 293 | </div> |
||
| 294 | </div> |
||
| 295 | </div> |
||
| 296 | </div> |
||
| 297 | </div> |
||
| 298 | </div> |
||
| 299 | |||
| 300 | <br /> |
||
| 301 | <br /> |
||
| 302 | <br /> |
||
| 303 | </div> |
||
| 304 | </div> |
||
| 305 | |||
| 306 | <?//end frif ?> |
||
| 307 | </div> |
||
| 308 | <div class="modal-footer"> |
||
| 309 | <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> |
||
| 310 | </div> |
||
| 311 | </div> |
||
| 312 | |||
| 313 | </div> |
||
| 314 | </div> |
||
| 315 | |||
| 316 | </div> |
||
| 317 | |||
| 318 | </body> |
||
| 319 | </html> |
||
| 320 | |||
| 321 | |||
| 322 | |||
| 323 | <script type="text/javascript" src="config/js/script.js"></script> |
||
| 324 | <script type="text/javascript"> |
||
| 325 | var sorter = new TINY.table.sorter('sorter','table',{
|
||
| 326 | headclass:'head', |
||
| 327 | ascclass:'asc', |
||
| 328 | descclass:'desc', |
||
| 329 | evenclass:'evenrow', |
||
| 330 | oddclass:'oddrow', |
||
| 331 | evenselclass:'evenselected', |
||
| 332 | oddselclass:'oddselected', |
||
| 333 | paginate:true, |
||
| 334 | size:1, |
||
| 335 | colddid:'columns', |
||
| 336 | currentid:'currentpage', |
||
| 337 | totalid:'totalpages', |
||
| 338 | startingrecid:'startrecord', |
||
| 339 | endingrecid:'endrecord', |
||
| 340 | totalrecid:'totalrecords', |
||
| 341 | hoverid:'selectedrow', |
||
| 342 | pageddid:'pagedropdown', |
||
| 343 | navid:'tablenav', |
||
| 344 | <!--sortcolumn:1,--> |
||
| 345 | sortdir:1, |
||
| 346 | /*sum:[8], |
||
| 347 | avg:[6,7,8,9], |
||
| 348 | columns:[{index:7, format:'%', decimals:1},{index:8, format:'$', decimals:0}],*/
|
||
| 349 | init:true |
||
| 350 | }); |
||
| 351 | </script> |
||
| 352 |
Short opening tags are disabled in PHP?s default configuration. In such a case, all content of this file is output verbatim to the browser without being parsed, or executed.
As a precaution to avoid these problems better use the long opening tag
<?php.