Advertisement
Guest User

Untitled

a guest
Apr 18th, 2016
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 44.15 KB | None | 0 0
  1. <?php
  2. session_start();
  3. include "database.php";
  4. include "inc/func.php";
  5. ?>
  6. <!DOCTYPE html>
  7. <html>
  8. <head>
  9. <meta charset="UTF-8">
  10. <meta name="viewport" content="width=device-width, initial-scale=1">
  11. <title>RAMOS</title>
  12. <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
  13. <link href="css/bootstrap.min.css" rel="stylesheet" type="text/css" />
  14. <link href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
  15.  
  16. <!--link href="css/bootstrap.min.css" rel="stylesheet" type="text/css" />
  17. <link href="css/font-awesome.min.css" rel="stylesheet" type="text/css" /-->
  18. <!-- Ionicons -->
  19. <link href="css/ionicons.min.css" rel="stylesheet" type="text/css" />
  20. <!-- Ionicons >
  21. <link href="css/ionicons.min.css" rel="stylesheet" type="text/css" /-->
  22. <!-- Morris chart -->
  23. <link href="css/morris/morris.css" rel="stylesheet" type="text/css" />
  24. <!-- jvectormap -->
  25. <link href="css/jvectormap/jquery-jvectormap-1.2.2.css" rel="stylesheet" type="text/css" />
  26. <!-- Date Picker -->
  27. <link href="css/datepicker/datepicker3.css" rel="stylesheet" type="text/css" />
  28. <!-- Daterange picker -->
  29. <link href="css/daterangepicker/daterangepicker-bs3.css" rel="stylesheet" type="text/css" />
  30.  
  31. <!-- Theme style -->
  32. <link href="css/AdminLTE.css" rel="stylesheet" type="text/css" />
  33.  
  34.  
  35. <!-- fancybox style -->
  36. <link href="css/jquery.fancybox.css" rel="stylesheet" type="text/css" />
  37. <link rel="stylesheet" href="css/jquery.numpad.css">
  38.  
  39. <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  40. <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  41. <!--[if lt IE 9]>
  42. <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
  43. <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
  44. <![endif]-->
  45.  
  46. </head>
  47. <?php if(isset($_SESSION['login']) == true){ ?>
  48. <body class="skin-blue">
  49.  
  50.  
  51.  
  52. <!-- header logo: style can be found in header.less -->
  53. <header class="header">
  54.  
  55. <!-- Add the class icon to your logo image or logo icon to add the margining -->
  56. <?php if(isset($_GET['meja']) != ''){
  57. echo "<a href='index.php' class='logo'>BACK</a>";
  58. }else{
  59. echo "<a href='index.php' class='logo'>RAMOS</a>";
  60. }
  61. ?>
  62.  
  63. <!-- Header Navbar: style can be found in header.less -->
  64. <nav class="navbar navbar-static-top" role="navigation">
  65. <ul class="nav navbar-nav">
  66. <?php
  67. if($_GET['page'] == 'menu' || $_GET['page'] == 'review'){}else{
  68.  
  69.  
  70. if(getModule(getProfileA($_SESSION['logged_id'],'keterangan'),'m_kitchen') == '1'){ ?>
  71. <li>
  72. <a onclick="KITCHEN()">
  73. <i class="fa fa-dashboard hidden-xs hidden-sm"></i> <span class="hidden-xs hidden-sm"><font color="white">Kitchen Display</font></span>
  74. <i class="fa fa-dashboard hidden-md hidden-lg"></i> <span class="hidden-md hidden-lg">Kitc</span></a>
  75. </li>
  76. <?php } ?>
  77. <li>
  78. <!--a href="?page=meja"--><a onclick="ORDER()">
  79. <i class="fa fa-edit hidden-xs hidden-sm"></i> <span class="hidden-xs hidden-sm"><font color="white">Order</font></span>
  80. <i class="fa fa-edit hidden-md hidden-lg"></i> <span class="hidden-md hidden-lg">Ord</span></a>
  81. </li>
  82. <?php if(getModule(getProfileA($_SESSION['logged_id'],'keterangan'),'m_admin') == '1'){ ?>
  83. <li class="dropdown messages-menu">
  84. <a href="#" class="dropdown-toggle" data-toggle="dropdown">
  85. <i class="fa fa-bar-chart-o hidden-xs hidden-sm"> Admin Menu</i>
  86. <i class="fa fa-bar-chart-o hidden-md hidden-lg"><span class="hidden-md hidden-lg">Adm</span></i>
  87.  
  88. </a>
  89. <ul class="dropdown-menu">
  90. <li class="header">Admin Menus</li>
  91.  
  92. <li>
  93. <!-- inner menu: contains the actual data -->
  94. <ul class="menu">
  95. <li><!-- start message -->
  96. <a onClick="Conf()">
  97. <div class="pull-left">
  98. <img src="img/avatar3.png" class="img-circle" alt="User Image"/>
  99. </div>
  100. <h4>
  101. Configuration
  102. <small><i class="fa fa-clock-o"></i> 5 mins</small>
  103. </h4>
  104. <p>Module for Configuration apps</p>
  105. </a>
  106. </li><!-- end message -->
  107. <li><!-- start message -->
  108. <a onClick="mPrd()">
  109. <div class="pull-left">
  110. <img src="img/avatar3.png" class="img-circle" alt="User Image"/>
  111. </div>
  112. <h4>
  113. Master Product
  114. <small><i class="fa fa-clock-o"></i> 5 mins</small>
  115. </h4>
  116. <p>Module for Product</p>
  117. </a>
  118. </li><!-- end message -->
  119.  
  120. <li><!-- start message -->
  121. <a onClick="mCat()">
  122. <div class="pull-left">
  123. <img src="img/avatar3.png" class="img-circle" alt="User Image"/>
  124. </div>
  125. <h4>
  126. Master Category
  127. <small><i class="fa fa-clock-o"></i> 5 mins</small>
  128. </h4>
  129. <p>Module for Product</p>
  130. </a>
  131. </li><!-- end message -->
  132.  
  133. <li><!-- start message -->
  134. <a onClick="mIssuer()">
  135. <div class="pull-left">
  136. <img src="img/avatar3.png" class="img-circle" alt="User Image"/>
  137. </div>
  138. <h4>
  139. Master Issuer
  140. <small><i class="fa fa-clock-o"></i> 5 mins</small>
  141. </h4>
  142. <p>Module for Issuer Bank</p>
  143. </a>
  144. </li><!-- end message -->
  145.  
  146. <li><!-- start message -->
  147. <a onClick="mBank()">
  148. <div class="pull-left">
  149. <img src="img/avatar3.png" class="img-circle" alt="User Image"/>
  150. </div>
  151. <h4>
  152. Master Bank
  153. <small><i class="fa fa-clock-o"></i> 5 mins</small>
  154. </h4>
  155. <p>Module for Bank</p>
  156. </a>
  157. </li><!-- end message -->
  158.  
  159. <li><!-- start message -->
  160. <a onClick="mLoc()">
  161. <div class="pull-left">
  162. <img src="img/avatar3.png" class="img-circle" alt="User Image"/>
  163. </div>
  164. <h4>
  165. Master Location
  166. <small><i class="fa fa-clock-o"></i> 5 mins</small>
  167. </h4>
  168. <p>Module for Location</p>
  169. </a>
  170. </li><!-- end message -->
  171.  
  172. <li><!-- start message -->
  173. <a onClick="mMeja()">
  174. <div class="pull-left">
  175. <img src="img/avatar3.png" class="img-circle" alt="User Image"/>
  176. </div>
  177. <h4>
  178. Master Meja
  179. <small><i class="fa fa-clock-o"></i> 5 mins</small>
  180. </h4>
  181. <p>Module for Meja</p>
  182. </a>
  183. </li><!-- end message -->
  184. <li><!-- start message -->
  185. <a onClick="mDisc()">
  186. <div class="pull-left">
  187. <img src="img/avatar3.png" class="img-circle" alt="User Image"/>
  188. </div>
  189. <h4>
  190. Master Discount
  191. <small><i class="fa fa-clock-o"></i> 5 mins</small>
  192. </h4>
  193. <p>Module for Discount</p>
  194. </a>
  195. </li><!-- end message -->
  196.  
  197. <li><!-- start message -->
  198. <a onClick="mCust()">
  199. <div class="pull-left">
  200. <img src="img/avatar3.png" class="img-circle" alt="User Image"/>
  201. </div>
  202. <h4>
  203. Master Customer
  204. <small><i class="fa fa-clock-o"></i> 5 mins</small>
  205. </h4>
  206. <p>Module for Customer</p>
  207. </a>
  208. </li><!-- end message -->
  209. <li><!-- start message -->
  210. <a onClick="mCustType()">
  211. <div class="pull-left">
  212. <img src="img/avatar3.png" class="img-circle" alt="User Image"/>
  213. </div>
  214. <h4>
  215. Master Customer Type
  216. <small><i class="fa fa-clock-o"></i> 5 mins</small>
  217. </h4>
  218. <p>Module for Customer Type</p>
  219. </a>
  220. </li><!-- end message -->
  221.  
  222. <li><!-- start message -->
  223. <a onClick="mUser()">
  224. <div class="pull-left">
  225. <img src="img/avatar3.png" class="img-circle" alt="User Image"/>
  226. </div>
  227. <h4>
  228. Master User
  229. <small><i class="fa fa-clock-o"></i> 5 mins</small>
  230. </h4>
  231. <p>Module for User</p>
  232. </a>
  233. </li><!-- end message -->
  234.  
  235. <li><!-- start message -->
  236. <a onClick="mAccess()">
  237. <div class="pull-left">
  238. <img src="img/avatar3.png" class="img-circle" alt="User Image"/>
  239. </div>
  240. <h4>
  241. Master Access
  242. <small><i class="fa fa-clock-o"></i> 5 mins</small>
  243. </h4>
  244. <p>Module for Access</p>
  245. </a>
  246. </li><!-- end message -->
  247.  
  248. <li><!-- start message -->
  249. <a onClick="Cprd()">
  250. <div class="pull-left">
  251. <img src="img/avatar3.png" class="img-circle" alt="User Image"/>
  252. </div>
  253. <h4>
  254. Connect Products
  255. <small><i class="fa fa-clock-o"></i> 5 mins</small>
  256. </h4>
  257. <p>Module to connect product with Inventory</p>
  258. </a>
  259. </li><!-- end message -->
  260.  
  261.  
  262. </ul>
  263. </li>
  264. <!--li class="footer"><a href="#">See All Messages</a></li-->
  265. </ul>
  266. </li> <?php }
  267. }?>
  268. <!-- Admin print -->
  269. <li class="dropdown messages-menu" id="auth_mn">
  270. <a href="#" class="dropdown-toggle" data-toggle="dropdown">
  271. <i class="fa fa-bar-chart-o"> Authorized Menu</i>
  272.  
  273. </a>
  274. <ul class="dropdown-menu">
  275. <li class="header">Authorized Menu</li>
  276.  
  277. <li>
  278. <!-- inner menu: contains the actual data -->
  279. <ul class="menu">
  280. <li><!-- start message -->
  281. <a class="fancybox fancybox.ajax" href="themes/reprint.php?reprint=bill&staff=<?php echo $_SESSION['logged_id']; ?>">
  282. <div class="pull-left">
  283. <img src="img/avatar3.png" class="img-circle" alt="User Image"/>
  284. </div>
  285. <h4>
  286. Billing
  287. <small><i class="fa fa-clock-o"></i> 5 mins</small>
  288. </h4>
  289. <p>Module to display paid billing</p>
  290. </a>
  291. </li><!-- end message -->
  292. <li><!-- start message -->
  293. <a class="fancybox fancybox.ajax" href="inc/zreport.php">
  294. <div class="pull-left">
  295. <img src="img/avatar3.png" class="img-circle" alt="User Image"/>
  296. </div>
  297. <h4>
  298. Reprint Z-Report
  299. <small><i class="fa fa-clock-o"></i> 5 mins</small>
  300. </h4>
  301. <p>Module to display Z-Report</p>
  302. </a>
  303. </li><!-- end message -->
  304.  
  305. <li><!-- start message -->
  306. <a onClick="RPT()">
  307. <div class="pull-left">
  308. <img src="img/avatar3.png" class="img-circle" alt="User Image"/>
  309. </div>
  310. <h4>
  311. Reports
  312. <small><i class="fa fa-clock-o"></i> 5 mins</small>
  313. </h4>
  314. <p>Module to generate Report</p>
  315. </a>
  316. </li><!-- end message -->
  317.  
  318.  
  319. </ul>
  320. </li>
  321. <!--li class="footer"><a href="#">See All Messages</a></li-->
  322. </ul>
  323. </li>
  324.  
  325.  
  326. </ul>
  327. <div class="navbar-right">
  328. <ul class="nav navbar-nav">
  329. <?php if($_GET['page'] == 'menu' || $_GET['page'] == 'review'){}else{ ?>
  330. <li class="dropdown user user-menu" id="login_manager">
  331. <a href="#" class="dropdown-toggle" data-toggle="dropdown">
  332. <i class="glyphicon glyphicon-cog"></i>
  333. <span><i class="caret"></i></span>
  334. </a>
  335. <ul class="dropdown-menu">
  336. <div>
  337. <div class="box box-info">
  338. <div class="box-header with-border">
  339. <h3 class="box-title">Authorization Manager</h3>
  340. </div><!-- /.box-header -->
  341. <!-- form start -->
  342. <form class="form-horizontal">
  343. <div class="box-body">
  344. <div class="form-group">
  345. <label for="inputEmail3" class="col-sm-3 control-label">Username</label>
  346. <div class="col-sm-9">
  347. <input type="text" class="form-control" id="auth_user" placeholder="Username">
  348. </div>
  349. </div>
  350. <div class="form-group">
  351. <label for="inputPassword3" class="col-sm-3 control-label">Password</label>
  352. <div class="col-sm-9">
  353. <input type="password" class="form-control" id="auth_pass" placeholder="Password">
  354. </div>
  355. </div>
  356. </form>
  357. </div><!-- /.box-body -->
  358. <div class="box-footer">
  359.  
  360. <button onClick="Authorized('<?php echo $_SESSION['logged_id'];?>')" class="btn btn-info pull-right">Sign in</button>
  361. </div><!-- /.box-footer -->
  362.  
  363. </div></div>
  364. </ul>
  365. </li> <?php } ?>
  366.  
  367.  
  368. <li class="dropdown user user-menu">
  369. <a href="#" class="dropdown-toggle" data-toggle="dropdown">
  370. <i class="glyphicon glyphicon-user"></i>
  371. <span><?php echo $_SESSION['nama_waiter'];?> <i class="caret"></i></span>
  372. </a>
  373. <ul class="dropdown-menu">
  374. <!-- User image -->
  375. <li class="user-header bg-light-blue">
  376. <img src="img/avatar3.png" class="img-circle"/>
  377. <p>
  378. <?php echo $_SESSION['nama_waiter']." - ".$_SESSION['keterangan'];?>
  379. <small>Code <?php echo $_SESSION['logged_id']; ?></small>
  380. </p>
  381. </li>
  382. <!-- Menu Body -->
  383. <!--li class="user-body">
  384. <div class="col-xs-4 text-center">
  385. <a href="#">Followers</a>
  386. </div>
  387. <div class="col-xs-4 text-center">
  388. <a href="#">Sales</a>
  389. </div>
  390. <div class="col-xs-4 text-center">
  391. <a href="#">Friends</a>
  392. </div>
  393. </li-->
  394. <!-- Menu Footer-->
  395. <li class="user-footer">
  396. <div class="pull-left">
  397. <a class="btn btn-default btn-flat fancybox fancybox.ajax" href="inc/xreport.php?staff=<?php echo $_SESSION['logged_id']; ?>">X-Report</a>
  398. </div>
  399. <div class="pull-left">
  400. <a class="btn btn-default btn-flat" onClick="ZReport('<?php echo $_SESSION['logged_id'] ?>')">Z-Report</a>
  401. </div>
  402. <div class="pull-right">
  403. <a href="inc/login.php?action=doLogout" class="btn btn-default btn-flat">Sign out</a>
  404. </div>
  405. </li>
  406. </ul>
  407. </li>
  408.  
  409. </ul>
  410. </div>
  411. </nav>
  412. </header>
  413.  
  414. <!-- Content Header (Page header) -->
  415. <!--section class="content-header">
  416. <h1>
  417. Dashboard
  418. <small>Control panel</small>
  419. </h1>
  420. <ol class="breadcrumb">
  421. <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
  422. <li class="active">Dashboard</li>
  423. </ol>
  424. </section-->
  425.  
  426. <!-- Main content -->
  427.  
  428. <section class="col-lg-12 connectedSortable">
  429.  
  430.  
  431.  
  432. <!-- Main row -->
  433. <div class="row">
  434. <div class="box">
  435. <div id="billing"></div>
  436.  
  437. <?php
  438.  
  439. if($_GET['page'] == 'menu'){
  440. include"themes/menu.php";
  441. }elseif($_GET['page'] == 'c_prd'){
  442. include"themes/c_prd.php";
  443.  
  444. }elseif($_GET['page'] == 'review'){
  445. include"themes/order_preview.php";
  446.  
  447. }else{
  448.  
  449. ?>
  450. <!--div class="box-header">
  451. <h3 class="box-title">RAMOS</h3>
  452. </div-->
  453. <div class="box-body table-responsive">
  454. <div class="container-fluid">
  455. <div>
  456. <div id="isi"> <?php
  457. if(getModule(getProfileA($_SESSION['logged_id'],'keterangan'),'m_kitchen') == '1'){
  458. ?>
  459. <!--div id="transkitchen"></div-->
  460. </div></div></div>
  461.  
  462. <!-- Left col -->
  463. <?php }
  464. } ?>
  465.  
  466. <!-- right col (We are only adding the ID to make the widgets sortable)-->
  467.  
  468. </div><!-- /.row (main row) -->
  469.  
  470. </section><!-- /.content -->
  471. <!-- /.right-side -->
  472. </div>
  473. </div><!-- ./wrapper -->
  474.  
  475. <!-- add new calendar event modal -->
  476. <?php }else{ ?>
  477. <body class="bg-black">
  478. <div><?php if(isset($_SESSION['error_msg'])) { echo $_SESSION['error_msg']; }?></div>
  479. <div class="form-box" id="login-box">
  480. <div class="header">Sign In</div>
  481. <form action="inc/login.php?action=doLogin" method="post">
  482. <div class="body bg-gray">
  483. <div class="form-group">
  484. <input type="text" name="userid" id="userid" class="form-control" placeholder="User ID"/>
  485. </div>
  486. <div class="form-group">
  487. <input type="password" name="password" id="password" class="form-control" placeholder="Password"/>
  488. </div>
  489. <div class="form-group">
  490. <input type="checkbox" name="remember_me"/> Remember me
  491. </div>
  492. </div>
  493. <div class="footer">
  494. <button type="submit" class="btn bg-olive btn-block">Sign me in</button>
  495. </div>
  496. </form>
  497.  
  498. <div class="margin text-center">
  499. <span>Powered by Willertindo</span>
  500. <br/>
  501.  
  502.  
  503. </div>
  504. </div>
  505.  
  506. <script src="js/loginJS/jquery.min.js"></script>
  507. <script src="js/loginJS/bootstrap.min.js" type="text/javascript"></script>
  508.  
  509. <?php } ?>
  510. </body>
  511. </html>
  512.  
  513. <script src="js/MainJS/jquery.min.js"></script>
  514. <script src="js/MainJS/bootstrap.min.js" type="text/javascript"></script>
  515. <script src="js/MainJS/jquery-ui.min.js" type="text/javascript"></script>
  516. <!-- daterangepicker -->
  517. <script src="js/plugins/daterangepicker/daterangepicker.js" type="text/javascript"></script>
  518. <!-- datepicker -->
  519. <script src="js/plugins/datepicker/bootstrap-datepicker.js" type="text/javascript"></script>
  520. <!-- bootstrap time picker -->
  521. <script src="js/plugins/timepicker/bootstrap-timepicker.min.js" type="text/javascript"></script>
  522.  
  523. <!-- AdminLTE App -->
  524. <script src="js/AdminLTE/app.js" type="text/javascript"></script>
  525.  
  526. <!-- Fancybox App -->
  527. <script src="js/jquery.fancybox.js" type="text/javascript"></script>
  528.  
  529. <!-- AdminLTE dashboard demo (This is only for demo purposes) -->
  530. <!--script src="js/AdminLTE/dashboard.jss" type="text/javascript"></script>
  531.  
  532. <!-- AdminLTE for demo purposes -->
  533. <script src="js/AdminLTE/demo.js" type="text/javascript"></script>
  534. <!-- DATA TABES SCRIPT -->
  535. <script src="js/plugins/datatables/jquery.dataTables.js" type="text/javascript"></script>
  536. <script src="js/plugins/datatables/dataTables.bootstrap.js" type="text/javascript"></script>
  537.  
  538. <script type="text/javascript" src="js/jquery.numpad.js"></script>
  539. <script type="text/javascript">
  540. // Set NumPad defaults for jQuery mobile.
  541. // These defaults will be applied to all NumPads within this document!
  542. $.fn.numpad.defaults.gridTpl = '<table class="table modal-content"></table>';
  543. $.fn.numpad.defaults.backgroundTpl = '<div class="modal-backdrop in"></div>';
  544. $.fn.numpad.defaults.displayTpl = '<input type="text" class="form-control" />';
  545. $.fn.numpad.defaults.buttonNumberTpl = '<button type="button" class="btn btn-default"></button>';
  546. $.fn.numpad.defaults.buttonFunctionTpl = '<button type="button" class="btn" style="width: 100%;"></button>';
  547. $.fn.numpad.defaults.onKeypadCreate = function(){$(this).find('.done').addClass('btn-primary');};
  548.  
  549.  
  550. </script>
  551. <script>
  552.  
  553. $(function() {
  554. $("#example1").dataTable();
  555. $('#example2').dataTable({
  556. "bPaginate": true,
  557. "bLengthChange": false,
  558. "bFilter": false,
  559. "bSort": true,
  560. "bInfo" : false,
  561. "bAutoWidth": false
  562. });
  563. });
  564.  
  565. /* $(document).ready(function() {
  566. var refreshId = setInterval(function() {
  567. $("#transkitchen").load('themes/kitchen_lagi.php?randval='+ Math.random());
  568. }, 5000);
  569. $.ajaxSetup({ cache: false });
  570. });
  571. */
  572. $(document).ready(function() {
  573. $("#tbltransfer").load("table/tbl_transfer.php");
  574. $("#isi").load("themes/pettycash.php");
  575. $('#div_issuer').css({'display':'none'});
  576. $('#auth_mn').css({'display':'none'});
  577. $( "#start_date" ).datepicker({ dateFormat: 'yyyy-mm-dd' }).val();
  578. $( "#end_date" ).datepicker({ dateFormat: 'yyyy-mm-dd' }).val();
  579. $('#nominal').numpad();
  580.  
  581.  
  582. });
  583.  
  584. // $(document).ready(function(){
  585. // $("#responsecontainerstt").load("themes/list_meja.php");
  586. // });
  587. function previewBill(trx,st,disc_bill,svc,tax,gt){
  588. $.ajax({
  589. type: "POST",
  590. url: "inc/proses_add.php",
  591. data: "action=preview_bill&trx="+trx+"&st="+st+"&disc_bill="+disc_bill+"&svc="+svc+"&tax="+tax+"&gt="+gt,
  592. cache: false,
  593. success: function(msg){
  594. //$("#fancybox").hide();
  595. alert("Preview berhasil diprint");
  596.  
  597.  
  598. }});
  599.  
  600. }
  601. function BILL(meja,trx) {
  602. var petty = $("#petty").val();
  603. if(petty == ''){
  604. alert("Anda belum mengaktifkan pettycash!");
  605. }else{
  606. $("#billing").css({'display':''});
  607. $("#billing").load("inc/billing.php?meja="+meja+"&trx="+trx);
  608. $("#isi").css({'display':'none'});
  609. $("#pilihan").hide();
  610.  
  611. }
  612. $.fancybox.close();
  613. }
  614. function Conf() {
  615. $("#billing").css({'display':'none'});
  616. $("#isi").load("themes/configuration.php");
  617. $("#isi").css({'display':''});
  618. $.fancybox.close();
  619. }
  620. function KITCHEN() {
  621. $("#billing").css({'display':'none'});
  622. $("#isi").load("themes/kitchen.php");
  623. $("#isi").css({'display':''});
  624. $.fancybox.close();
  625. }
  626. function mPrd() {
  627. $("#billing").css({'display':'none'});
  628. $("#isi").load("themes/master_product.php");
  629. $("#isi").css({'display':''});
  630. $.fancybox.close();
  631. }
  632. function mCat() {
  633. $("#billing").css({'display':'none'});
  634. $("#isi").load("themes/master_category.php");
  635. $("#isi").css({'display':''});
  636. $.fancybox.close();
  637. }
  638. function mIssuer() {
  639. $("#billing").css({'display':'none'});
  640. $("#isi").load("themes/master_issuer.php");
  641. $("#isi").css({'display':''});
  642. $.fancybox.close();
  643. }
  644. function mBank() {
  645. $("#billing").css({'display':'none'});
  646. $("#isi").load("themes/master_bank.php");
  647. $("#isi").css({'display':''});
  648. $.fancybox.close();
  649. }
  650.  
  651. function mLoc() {
  652. $("#billing").css({'display':'none'});
  653. $("#isi").load("themes/master_location.php");
  654. $("#isi").css({'display':''});
  655. $.fancybox.close();
  656. }
  657. function mMeja() {
  658. $("#billing").css({'display':'none'});
  659. $("#isi").load("themes/master_meja.php");
  660. $("#isi").css({'display':''});
  661. $.fancybox.close();
  662. }
  663. function mCust() {
  664. $("#billing").css({'display':'none'});
  665. $("#isi").load("themes/master_customer.php");
  666. $("#isi").css({'display':''});
  667. $.fancybox.close();
  668. }
  669.  
  670. function mDisc() {
  671. $("#billing").css({'display':'none'});
  672. $("#isi").load("themes/master_discount.php");
  673. $("#isi").css({'display':''});
  674. $.fancybox.close();
  675. }
  676. function mCustType() {
  677. $("#billing").css({'display':'none'});
  678. $("#isi").load("themes/master_customer_type.php");
  679. $("#isi").css({'display':''});
  680. $.fancybox.close();
  681. }
  682. function mUser() {
  683. $("#billing").css({'display':'none'});
  684. $("#isi").load("themes/master_user.php");
  685. $("#isi").css({'display':''});
  686. $.fancybox.close();
  687. }
  688.  
  689. function mAccess() {
  690. $("#billing").css({'display':'none'});
  691. $("#isi").load("themes/master_access.php");
  692. $("#isi").css({'display':''});
  693. $.fancybox.close();
  694. }
  695.  
  696.  
  697. function Cprd() {
  698. $("#billing").css({'display':'none'});
  699. $("#isi").load("themes/c_prd.php");
  700. $("#isi").css({'display':''});
  701. $.fancybox.close();
  702. }
  703. function ORDER() {
  704. $("#billing").css({'display':'none'});
  705. $("#isi").load("themes/meja.php");
  706. $("#isi").css({'display':''});
  707. $.fancybox.close();
  708. }
  709. function RPT() {
  710. $("#billing").css({'display':'none'});
  711. $("#isi").load("themes/report.php");
  712. $("#isi").css({'display':''});
  713. $.fancybox.close();
  714. }
  715.  
  716. function deleteItem(id,menu,trx,meja) {
  717. var konfirmasi=confirm("Anda yakin ingin hapus Item ? ");
  718. if (konfirmasi==true)
  719. {
  720. $.ajax({
  721. type: "POST",
  722. url: "inc/proses_add.php",
  723. data: "action=deleteItem&menu="+menu+"&trx="+trx+"&id="+id,
  724. cache: false,
  725. success: function(msg){
  726. //$("#fancybox").hide();
  727. alert("Pesanan berhasil dihapus");
  728. //$("#previewOrder").load("themes/order_preview.php?trx="+trx);
  729. window.location.href = "?page=review&trx="+trx+"&meja="+meja;
  730.  
  731. }});
  732. }
  733. }
  734. function AddMenu(menu,id,trx) {
  735. var qty = $("#qty").val();
  736. var harga = $("#harga").val();
  737. var keterangan = $("#keterangan").val();
  738. $.ajax({
  739. type: "POST",
  740. url: "inc/proses_add.php",
  741. data: "action=addMenu&menu="+menu+"&id="+id+"&trx="+trx+"&qty="+qty+"&harga="+harga+"&keterangan="+keterangan,
  742. cache: false,
  743. success: function(msg){
  744. //$("#fancybox").hide();
  745. alert("Pesanan berhasil ditambah");
  746. $("#previewOrder").load("themes/order_preview.php");
  747.  
  748. }});
  749. $.fancybox.close();
  750. }
  751. function doStartKitchen(id,trx) {
  752. var konfirmasi=confirm("Apakah Menu Sudah Selesai ? ");
  753. if (konfirmasi==true)
  754. {
  755. $.ajax({
  756. type: "POST",
  757. url: "inc/cook.php",
  758. data: "action=doStartKitchen&id="+id+"&trx="+trx,
  759. cache: false,
  760. success: function(msg){
  761. $("#order_list").load("themes/kitchen_lagi.php");
  762. alert("Pesanan Telah Selesai");
  763. }});
  764. }
  765. }
  766.  
  767. function printOrder(trx,id) {
  768. var konfirmasi=confirm("Apakah Input Menu Sudah Selesai ? ");
  769. if (konfirmasi==true)
  770. {
  771. $.ajax({
  772. type: "POST",
  773. url: "inc/proses_add.php",
  774. data: "action=printOrder&id="+id+"&trx="+trx,
  775. cache: false,
  776. success: function(msg){
  777. alert("Slip Order berhasil diprint");
  778. //$("#previewOrder").load("themes/order_preview.php");
  779. window.location.reload(true);
  780. }});
  781. }
  782. }
  783.  
  784. function addTrf() {
  785. var pilih1 = $("#pilih1").val();
  786. var pilih2 = $("#pilih2").val();
  787. if (pilih1 == '' || pilih2 == ''){
  788. alert("Data ada yang kosong.");
  789. }else{
  790.  
  791. var konfirmasi=confirm("Apakah Data Sudah Benar ? ");
  792. if (konfirmasi==true)
  793. {
  794. $.ajax({
  795. type: "POST",
  796. url: "inc/proses.php?action=addtrf",
  797. data: "pilih1="+pilih1+"&pilih2="+pilih2,
  798. cache: false,
  799. success: function(msg){
  800. alert("Data berhasil disimpan.");
  801. $("#tbltransfer").load("table/tbl_transfer.php");
  802. var pilih1 = $("#pilih1").val('');
  803. var pilih2 = $("#pilih2").val('');
  804.  
  805.  
  806. }});
  807. }
  808. }
  809. }
  810.  
  811.  
  812. function CancelMenu(){
  813. $.fancybox.close();
  814.  
  815. }
  816. function pilihMeja(id) {
  817. $.ajax({
  818. type: "GET",
  819. url: "themes/list_meja.php",
  820. cache: false,
  821. success: function(msg){
  822. $("#responsecontainerstt").load("themes/list_meja.php?id="+id);
  823.  
  824. }});
  825. }
  826. function pilihCateg(id) {
  827. $.ajax({
  828. type: "GET",
  829. url: "themes/list_menu.php",
  830. cache: false,
  831. success: function(msg){
  832. $("#responsecontainermeja").load("themes/list_menu.php?id="+id);
  833.  
  834.  
  835. }});
  836. }
  837. function toMenu(id,trx,meja){
  838. $.ajax({
  839. type: "POST",
  840. url: "inc/proses.php",
  841. data: "action=toMenu&id="+id+"&trx="+trx+"&meja="+meja,
  842. cache: false,
  843. success: function(msg){
  844. window.location.href = "?page=menu&meja="+id+"&trx="+trx+"&no_meja="+meja;
  845.  
  846. }});
  847. }
  848.  
  849. $(function(){
  850. jQuery(".fancybox").fancybox();
  851. });
  852.  
  853. function ReviewOrder(meja,trx,mj){
  854. window.location.href = "?page=review&meja="+meja+"&trx="+trx;
  855. }
  856.  
  857.  
  858.  
  859.  
  860. function HoldItem(menu,trx,meja,nama){
  861. var konfirmasi=confirm("Apakah Anda Yakin Hold "+nama+" ?");
  862. if (konfirmasi==true)
  863. {
  864. $.ajax({
  865. type: "POST",
  866. url: "inc/proses_add.php",
  867. data: "action=HoldItem&menu="+menu+"&trx="+trx+"&meja="+meja,
  868. cache: false,
  869. success: function(msg){
  870. alert("Item berhasil di hold");
  871. //$("#previewOrder").load("themes/order_preview.php");
  872. window.location.reload(true);
  873. }});
  874. }
  875. }
  876. function UnHoldItem(menu,trx,meja,nama){
  877. var konfirmasi=confirm("Apakah Anda Yakin Un Hold "+nama+" ?");
  878. if (konfirmasi==true)
  879. {
  880. $.ajax({
  881. type: "POST",
  882. url: "inc/proses_add.php",
  883. data: "action=UnHoldItem&menu="+menu+"&trx="+trx+"&meja="+meja,
  884. cache: false,
  885. success: function(msg){
  886. alert("Item berhasil di hold");
  887. //$("#previewOrder").load("themes/order_preview.php");
  888. window.location.reload(true);
  889. }});
  890. }
  891. }
  892. function editDetailItem(id,menu,trx,nama,cmt){
  893. var new_qty = $("#e_qty").val();
  894. var new_price = $("#e_price").val();
  895. var ket = $("#keterangan").val();
  896.  
  897. var konfirmasi=confirm("Apakah Anda Yakin Mengubah "+nama+" ?");
  898. if (konfirmasi==true)
  899. {
  900. $.ajax({
  901. type: "POST",
  902. url: "inc/proses_add.php",
  903. data: "action=editDetailMenu&menu="+menu+"&trx="+trx+"&qty="+new_qty+"&price="+new_price+"&id="+id+"&ket="+ket+"&cmt="+cmt,
  904. cache: false,
  905. success: function(msg){
  906. alert("Detail berhasil di ubah");
  907. //$("#previewOrder").load("themes/order_preview.php");
  908. window.location.reload(true);
  909. }});
  910. }
  911. }
  912.  
  913. function ZReport(id){
  914. var konfirmasi=confirm("Apakah Anda Yakin Ingin Closing Period ?");
  915. if (konfirmasi==true)
  916. {
  917. $.ajax({
  918. type: "POST",
  919. url: "inc/proses_add.php",
  920. data: "action=printZReport&id="+id,
  921. cache: false,
  922. success: function(msg){
  923. alert(msg);
  924. //$("#previewOrder").load("themes/order_preview.php");
  925. // window.location.reload(true);
  926. }});
  927. }
  928. }
  929.  
  930. function Authorized(id){
  931. var auth_user = $("#auth_user").val();
  932. var auth_pass = $("#auth_pass").val();
  933. if(auth_user == '' || auth_pass == ''){
  934. alert("Username / Password ada yang kosong");
  935. }else{
  936. $.ajax({
  937. type: "POST",
  938. url: "inc/login.php",
  939. data: "action=authorized&id="+id+"&usr="+auth_user+"&pss="+auth_pass,
  940. cache: false,
  941. success: function(msg){
  942. if(msg == 1){
  943. $('#login_manager').css({'display':'none'});
  944. $('#auth_mn').css({'display':''});
  945. alert("Anda Berhasil Login");
  946. }else{
  947. alert("Password salah / tidak memiliki access");
  948. $("#auth_pass").val('');
  949. $("#auth_user").val('');
  950. }
  951. //$("#previewOrder").load("themes/order_preview.php");
  952. // window.location.reload(true);
  953. }});
  954. }
  955. }
  956.  
  957. function disc_bill(trx,id,type,nom,meja){
  958. if (type == 'P'){
  959. txt = '%';
  960. }else{
  961. txt ='';
  962. }
  963. var konfirmasi=confirm("Apakah Anda yakin memberi discount "+nom+txt+" ? ");
  964. if (konfirmasi==true)
  965. {
  966. $.ajax({
  967. type: "POST",
  968. url: "inc/proses_add.php",
  969. data: "action=addDiscBill&trx="+trx+"&id="+id+"&type="+type+"&nom="+nom+"&meja="+meja,
  970. cache: false,
  971. success: function(msg){
  972. //$("#fancybox").hide();
  973.  
  974. $("#billing").load("inc/billing.php?meja="+meja+"&trx="+trx);
  975. alert("Berhasil menambah discount");
  976. $.fancybox.close();
  977.  
  978. }});
  979.  
  980. }
  981.  
  982. }
  983. function disc_item(id,trx,kd_disc,type_disc,nom,meja,menu,qty,harga,disc){
  984. if (type_disc == 'P'){
  985. txt = '%';
  986. }else{
  987. txt ='';
  988. }
  989. var konfirmasi=confirm("Apakah Anda yakin memberi discount "+nom+txt+" ? ");
  990. if (konfirmasi==true)
  991. {
  992. $.ajax({
  993. type: "POST",
  994. url: "inc/proses_add.php",
  995. data: "action=addDiscItem&trx="+trx+"&kd_disc="+kd_disc+"&type="+type_disc+"&nom="+nom+"&meja="+meja+"&menu="+menu+"&qty="+qty+"&harga="+harga+"&disc="+disc+"&id="+id,
  996. cache: false,
  997. success: function(msg){
  998. //$("#fancybox").hide();
  999.  
  1000. //$("#billing").load("inc/billing.php?meja="+meja+"&trx="+trx);
  1001. alert("Berhasil menambahkan discount");
  1002. window.location.href = "?page=review&trx="+trx+"&meja="+meja;
  1003.  
  1004.  
  1005. }});
  1006.  
  1007. }
  1008.  
  1009. }
  1010.  
  1011. function discMember(trx,meja){
  1012. var pin = $("#pin").val();
  1013. if(pin == ''){
  1014. alert("Pin tidak boleh kosong");
  1015. }else{
  1016. var konfirmasi=confirm("Apakah Anda yakin ? ");
  1017. if (konfirmasi==true)
  1018. {
  1019.  
  1020. $.ajax({
  1021. type: "POST",
  1022. url: "inc/proses_add.php",
  1023. data: "action=addDiscMember&trx="+trx+"&pin="+pin,
  1024. cache: false,
  1025. success: function(msg){
  1026. //$("#fancybox").hide();
  1027.  
  1028. $("#billing").load("inc/billing.php?meja="+meja+"&trx="+trx);
  1029. alert(msg);
  1030. $.fancybox.close();
  1031.  
  1032. }});
  1033. }
  1034. }
  1035. }
  1036.  
  1037. function Booktable(meja){
  1038. $.ajax({
  1039. type: "POST",
  1040. url: "inc/proses_add.php",
  1041. data: "action=Booktable&meja="+meja,
  1042. cache: false,
  1043. success: function(msg){
  1044. //$("#fancybox").hide();
  1045.  
  1046. $("#responsecontainerstt").load("themes/list_meja.php");
  1047. alert(msg);
  1048. $.fancybox.close();
  1049.  
  1050. }});
  1051. }
  1052. function UNBooktable(meja){
  1053. $.ajax({
  1054. type: "POST",
  1055. url: "inc/proses_add.php",
  1056. data: "action=UNBooktable&meja="+meja,
  1057. cache: false,
  1058. success: function(msg){
  1059. //$("#fancybox").hide();
  1060.  
  1061. $("#responsecontainerstt").load("themes/list_meja.php");
  1062. alert(msg);
  1063. $.fancybox.close();
  1064.  
  1065. }});
  1066. }
  1067. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement