Sebuahhobi98

view-error-500

Feb 10th, 2019
346
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 111.48 KB | None | 0 0
  1. <?php defined('BASEPATH') OR exit('No direct script access allowed'); ?><!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title><?=lang('pos_module') . " | " . $Settings->site_name;?></title>
  6. <script type="text/javascript">if(parent.frames.length !== 0){top.location = '<?=admin_url('pos')?>';}</script>
  7. <base href="<?=base_url()?>"/>
  8. <meta http-equiv="cache-control" content="max-age=0"/>
  9. <meta http-equiv="cache-control" content="no-cache"/>
  10. <meta http-equiv="expires" content="0"/>
  11. <meta http-equiv="pragma" content="no-cache"/>
  12. <link rel="shortcut icon" href="<?=$assets?>images/icon.png"/>
  13. <link rel="stylesheet" href="<?=$assets?>styles/theme.css" type="text/css"/>
  14. <link rel="stylesheet" href="<?=$assets?>styles/style.css" type="text/css"/>
  15. <link rel="stylesheet" href="<?=$assets?>pos/css/posajax.css" type="text/css"/>
  16. <link rel="stylesheet" href="<?=$assets?>pos/css/print.css" type="text/css" media="print"/>
  17. <script type="text/javascript" src="<?=$assets?>js/jquery-2.0.3.min.js"></script>
  18. <script type="text/javascript" src="<?=$assets?>js/jquery-migrate-1.2.1.min.js"></script>
  19. <script type="text/javascript" src="<?php echo base_url('assets/bs/jquery.min.js') ?>"></script>
  20. <!--[if lt IE 9]>
  21. <script src="<?=$assets?>js/jquery.js"></script>
  22. <![endif]-->
  23. <?php if ($Settings->user_rtl) {?>
  24. <link href="<?=$assets?>styles/helpers/bootstrap-rtl.min.css" rel="stylesheet"/>
  25. <link href="<?=$assets?>styles/style-rtl.css" rel="stylesheet"/>
  26. <script type="text/javascript">
  27. $(document).ready(function () {
  28. $('.pull-right, .pull-left').addClass('flip');
  29. });
  30. </script>
  31. <?php }
  32. ?>
  33. </head>
  34. <body>
  35. <noscript>
  36. <div class="global-site-notice noscript">
  37. <div class="notice-inner">
  38. <p><strong>JavaScript seems to be disabled in your browser.</strong><br>You must have JavaScript enabled in
  39. your browser to utilize the functionality of this website.</p>
  40. </div>
  41. </div>
  42. </noscript>
  43.  
  44. <div id="wrapper">
  45. <header id="header" class="navbar">
  46. <div class="container">
  47. <a class="navbar-brand" href="<?=admin_url()?>"><span class="logo"><span class="pos-logo-lg"><?=$Settings->site_name?></span><span class="pos-logo-sm"><?=lang('pos')?></span></span></a>
  48.  
  49. <div class="header-nav">
  50. <ul class="nav navbar-nav pull-right">
  51. <li class="dropdown">
  52. <a class="btn account dropdown-toggle" data-toggle="dropdown" href="#">
  53. <img alt="" src="<?=$this->session->userdata('avatar') ? base_url() . 'assets/uploads/avatars/thumbs/' . $this->session->userdata('avatar') : $assets . 'images/' . $this->session->userdata('gender') . '.png';?>" class="mini_avatar img-rounded">
  54.  
  55. <div class="user">
  56. <span><?=lang('welcome')?>! <?=$this->session->userdata('username');?></span>
  57. </div>
  58. </a>
  59. <ul class="dropdown-menu pull-right">
  60. <li>
  61. <a href="<?=admin_url('auth/profile/' . $this->session->userdata('user_id'));?>">
  62. <i class="fa fa-user"></i> <?=lang('profile');?>
  63. </a>
  64. </li>
  65. <li>
  66. <a href="<?=admin_url('auth/profile/' . $this->session->userdata('user_id') . '/#cpassword');?>">
  67. <i class="fa fa-key"></i> <?=lang('change_password');?>
  68. </a>
  69. </li>
  70. <li class="divider"></li>
  71. <li>
  72. <a href="<?=admin_url('auth/logout');?>">
  73. <i class="fa fa-sign-out"></i> <?=lang('logout');?>
  74. </a>
  75. </li>
  76. </ul>
  77. </li>
  78. </ul>
  79.  
  80. <ul class="nav navbar-nav pull-right">
  81. <li class="dropdown">
  82. <a class="btn bblue pos-tip" title="<?=lang('dashboard')?>" data-placement="bottom" href="<?=admin_url('welcome')?>">
  83. <i class="fa fa-dashboard"></i>
  84. </a>
  85. </li>
  86. <?php if ($Owner) {?>
  87. <li class="dropdown hidden-sm">
  88. <a class="btn pos-tip" title="<?=lang('settings')?>" data-placement="bottom" href="<?=admin_url('pos/settings')?>">
  89. <i class="fa fa-cogs"></i>
  90. </a>
  91. </li>
  92. <?php }
  93. ?>
  94. <li class="dropdown hidden-xs">
  95. <a class="btn pos-tip" title="<?=lang('calculator')?>" data-placement="bottom" href="#" data-toggle="dropdown">
  96. <i class="fa fa-calculator"></i>
  97. </a>
  98. <ul class="dropdown-menu pull-right calc">
  99. <li class="dropdown-content">
  100. <span id="inlineCalc"></span>
  101. </li>
  102. </ul>
  103. </li>
  104. <li class="dropdown hidden-sm">
  105. <a class="btn pos-tip" title="<?=lang('shortcuts')?>" data-placement="bottom" href="#" data-toggle="modal" data-target="#sckModal">
  106. <i class="fa fa-key"></i>
  107. </a>
  108. </li>
  109. <li class="dropdown">
  110. <a class="btn pos-tip" title="<?=lang('view_bill_screen')?>" data-placement="bottom" href="<?=admin_url('pos/view_bill')?>" target="_blank">
  111. <i class="fa fa-laptop"></i>
  112. </a>
  113. </li>
  114. <li class="dropdown">
  115. <a class="btn blightOrange pos-tip" id="opened_bills" title="<span><?=lang('suspended_sales')?></span>" data-placement="bottom" data-html="true" href="<?=admin_url('pos/opened_bills')?>" data-toggle="ajax">
  116. <i class="fa fa-th"></i>
  117. </a>
  118. </li>
  119. <li class="dropdown">
  120. <a class="btn bdarkGreen pos-tip" id="register_details" title="<span><?=lang('register_details')?></span>" data-placement="bottom" data-html="true" href="<?=admin_url('pos/register_details')?>" data-toggle="modal" data-target="#myModal">
  121. <i class="fa fa-check-circle"></i>
  122. </a>
  123. </li>
  124. <li class="dropdown">
  125. <a class="btn borange pos-tip" id="close_register" title="<span><?=lang('close_register')?></span>" data-placement="bottom" data-html="true" data-backdrop="static" href="<?=admin_url('pos/close_register')?>" data-toggle="modal" data-target="#myModal">
  126. <i class="fa fa-times-circle"></i>
  127. </a>
  128. </li>
  129. <li class="dropdown">
  130. <a class="btn borange pos-tip" id="add_expense" title="<span><?=lang('add_expense')?></span>" data-placement="bottom" data-html="true" href="<?=admin_url('purchases/add_expense')?>" data-toggle="modal" data-target="#myModal">
  131. <i class="fa fa-dollar"></i>
  132. </a>
  133. </li>
  134. <?php if ($Owner) {?>
  135. <li class="dropdown">
  136. <a class="btn bdarkGreen pos-tip" id="today_profit" title="<span><?=lang('today_profit')?></span>" data-placement="bottom" data-html="true" href="<?=admin_url('reports/profit')?>" data-toggle="modal" data-target="#myModal">
  137. <i class="fa fa-hourglass-half"></i>
  138. </a>
  139. </li>
  140. <?php }
  141. ?>
  142. <?php if ($Owner || $Admin) {?>
  143. <li class="dropdown">
  144. <a class="btn bdarkGreen pos-tip" id="today_sale" title="<span><?=lang('today_sale')?></span>" data-placement="bottom" data-html="true" href="<?=admin_url('pos/today_sale')?>" data-toggle="modal" data-target="#myModal">
  145. <i class="fa fa-heart"></i>
  146. </a>
  147. </li>
  148. <li class="dropdown hidden-xs">
  149. <a class="btn bblue pos-tip" title="<?=lang('list_open_registers')?>" data-placement="bottom" href="<?=admin_url('pos/registers')?>">
  150. <i class="fa fa-list"></i>
  151. </a>
  152. </li>
  153. <?php }
  154. ?>
  155. <li class="dropdown hidden-xs">
  156. <a class="btn bred pos-tip" title="<?=lang('clear_ls')?>" data-placement="bottom" id="clearLS" href="#">
  157. <i class="fa fa-eraser"></i>
  158. </a>
  159. </li>
  160. </ul>
  161.  
  162. <ul class="nav navbar-nav pull-right">
  163. <li class="dropdown">
  164. <a class="btn bblack" style="cursor: default;"><span id="display_time"></span></a>
  165. </li>
  166. </ul>
  167. </div>
  168. </div>
  169. </header>
  170.  
  171. <div id="content">
  172. <div class="c1">
  173. <div class="pos">
  174. <?php
  175. if ($error) {
  176. echo "<div class=\"alert alert-danger\"><button type=\"button\" class=\"close fa-2x\" data-dismiss=\"alert\">&times;</button>" . $error . "</div>";
  177. }
  178. ?>
  179. <?php
  180. if ($message) {
  181. echo "<div class=\"alert alert-success\"><button type=\"button\" class=\"close fa-2x\" data-dismiss=\"alert\">&times;</button>" . $message . "</div>";
  182. }
  183. ?>
  184. <div id="pos">
  185. <?php $attrib = array('data-toggle' => 'validator', 'role' => 'form', 'id' => 'pos-sale-form');
  186. echo admin_form_open("pos", $attrib);?>
  187. <div id="leftdiv">
  188. <div id="printhead">
  189. <h4 style="text-transform:uppercase;"><?php echo $Settings->site_name; ?></h4>
  190. <?php
  191. echo "<h5 style=\"text-transform:uppercase;\">" . $this->lang->line('order_list') . "</h5>";
  192. echo $this->lang->line("date") . " " . $this->sma->hrld(date('Y-m-d H:i:s'));
  193. ?>
  194. </div>
  195. <div id="left-top">
  196. <div
  197. style="position: absolute; <?=$Settings->user_rtl ? 'right:-9999px;' : 'left:-9999px;';?>"><?php echo form_input('test', '', 'id="test" class="kb-pad"'); ?></div>
  198. <div class="form-group">
  199. <div class="input-group">
  200. <?php
  201. echo form_input('customer', (isset($_POST['customer']) ? $_POST['customer'] : ""), 'id="poscustomer" data-placeholder="' . $this->lang->line("select") . ' ' . $this->lang->line("customer") . '" required="required" class="form-control pos-input-tip" style="width:100%;"');
  202. ?>
  203. <div class="input-group-addon no-print" style="padding: 2px 8px; border-left: 0;">
  204. <a href="#" id="toogle-customer-read-attr" class="external">
  205. <i class="fa fa-pencil" id="addIcon" style="font-size: 1.2em;"></i>
  206. </a>
  207. </div>
  208. <div class="input-group-addon no-print" style="padding: 2px 7px; border-left: 0;">
  209. <a href="#" id="view-customer" class="external" data-toggle="modal" data-target="#myModal">
  210. <i class="fa fa-eye" id="addIcon" style="font-size: 1.2em;"></i>
  211. </a>
  212. </div>
  213. <?php if ($Owner || $Admin || $GP['customers-add']) { ?>
  214. <div class="input-group-addon no-print" style="padding: 2px 8px;">
  215. <a href="<?=admin_url('customers/add');?>" id="add-customer" class="external" data-toggle="modal" data-target="#myModal">
  216. <i class="fa fa-plus-circle" id="addIcon" style="font-size: 1.5em;"></i>
  217. </a>
  218. </div>
  219. <?php } ?>
  220. </div>
  221. <div style="clear:both;"></div>
  222. </div>
  223. <div class="no-print">
  224. <?php if ($Owner || $Admin || !$this->session->userdata('warehouse_id')) {
  225. ?>
  226. <div class="form-group">
  227. <?php
  228. $wh[''] = '';
  229. foreach ($warehouses as $warehouse) {
  230. $wh[$warehouse->id] = $warehouse->name;
  231. }
  232. echo form_dropdown('warehouse', $wh, (isset($_POST['warehouse']) ? $_POST['warehouse'] : $Settings->default_warehouse), 'id="poswarehouse" class="form-control pos-input-tip" data-placeholder="' . $this->lang->line("select") . ' ' . $this->lang->line("warehouse") . '" required="required" style="width:100%;" ');
  233. ?>
  234. </div>
  235. <?php } else {
  236.  
  237. $warehouse_input = array(
  238. 'type' => 'hidden',
  239. 'name' => 'warehouse',
  240. 'id' => 'poswarehouse',
  241. 'value' => $this->session->userdata('warehouse_id'),
  242. );
  243.  
  244. echo form_input($warehouse_input);
  245. }
  246. ?>
  247. <div class="form-group" id="ui">
  248. <?php if ($Owner || $Admin || $GP['products-add']) { ?>
  249. <div class="input-group">
  250. <?php } ?>
  251. <?php echo form_input('add_item', '', 'class="form-control pos-tip" id="add_item" data-placement="top" data-trigger="focus" placeholder="' . $this->lang->line("search_product_by_name_code") . '" title="' . $this->lang->line("au_pr_name_tip") . '"'); ?>
  252. <?php if ($Owner || $Admin || $GP['products-add']) { ?>
  253. <div class="input-group-addon" style="padding: 2px 8px;">
  254. <a href="#" id="addManually">
  255. <i class="fa fa-plus-circle" id="addIcon" style="font-size: 1.5em;"></i>
  256. </a>
  257. </div>
  258. </div>
  259. <?php } ?>
  260. <div style="clear:both;"></div>
  261. </div>
  262. </div>
  263. </div>
  264. <div id="print">
  265. <div id="left-middle">
  266. <div id="product-list">
  267. <table class="table items table-striped table-bordered table-condensed table-hover sortable_table"
  268. id="posTable" style="margin-bottom: 0;">
  269. <thead>
  270. <tr>
  271. <th width="40%"><?=lang("product");?></th>
  272. <th width="15%"><?=lang("price");?></th>
  273. <th width="15%"><?=lang("qty");?></th>
  274. <th width="20%"><?=lang("subtotal");?></th>
  275. <th style="width: 5%; text-align: center;">
  276. <i class="fa fa-trash-o" style="opacity:0.5; filter:alpha(opacity=50);"></i>
  277. </th>
  278. </tr>
  279. </thead>
  280. <tbody>
  281. </tbody>
  282. </table>
  283. <div style="clear:both;"></div>
  284. </div>
  285. </div>
  286. <div style="clear:both;"></div>
  287. <div id="left-bottom">
  288. <table id="totalTable"
  289. style="width:100%; float:right; padding:5px; color:#000; background: #FFF;">
  290. <tr>
  291. <td style="padding: 5px 10px;border-top: 1px solid #DDD;"><?=lang('items');?></td>
  292. <td class="text-right" style="padding: 5px 10px;font-size: 14px; font-weight:bold;border-top: 1px solid #DDD;">
  293. <span id="titems">0</span>
  294. </td>
  295. <td style="padding: 5px 10px;border-top: 1px solid #DDD;"><?=lang('total');?></td>
  296. <td class="text-right" style="padding: 5px 10px;font-size: 14px; font-weight:bold;border-top: 1px solid #DDD;">
  297. <span id="total">0.00</span>
  298. </td>
  299. </tr>
  300. <tr>
  301. <td style="padding: 5px 10px;"><?=lang('order_tax');?>
  302. <a href="#" id="pptax2">
  303. <i class="fa fa-edit"></i>
  304. </a>
  305. </td>
  306. <td class="text-right" style="padding: 5px 10px;font-size: 14px; font-weight:bold;">
  307. <span id="ttax2">0.00</span>
  308. </td>
  309. <td style="padding: 5px 10px;"><?=lang('discount');?>
  310. <?php if ($Owner || $Admin || $this->session->userdata('allow_discount')) { ?>
  311. <a href="#" id="ppdiscount">
  312. <i class="fa fa-edit"></i>
  313. </a>
  314. <?php } ?>
  315. </td>
  316. <td class="text-right" style="padding: 5px 10px;font-weight:bold;">
  317. <span id="tds">0.00</span>
  318. </td>
  319. </tr>
  320. <tr>
  321. <td style="padding: 5px 10px; border-top: 1px solid #666; border-bottom: 1px solid #333; font-weight:bold; background:#333; color:#FFF;" colspan="2">
  322. <?=lang('total_payable');?>
  323. <a href="#" id="pshipping">
  324. <i class="fa fa-plus-square"></i>
  325. </a>
  326. <span id="tship"></span>
  327. </td>
  328. <td class="text-right" style="padding:5px 10px 5px 10px; font-size: 14px;border-top: 1px solid #666; border-bottom: 1px solid #333; font-weight:bold; background:#333; color:#FFF;" colspan="2">
  329. <span id="gtotal">0.00</span>
  330. </td>
  331. </tr>
  332. </table>
  333.  
  334. <div class="clearfix"></div>
  335. <div id="botbuttons" class="col-xs-12 text-center">
  336. <input type="hidden" name="biller" id="biller" value="<?= ($Owner || $Admin || !$this->session->userdata('biller_id')) ? $pos_settings->default_biller : $this->session->userdata('biller_id')?>"/>
  337. <div class="row">
  338. <div class="col-xs-4" style="padding: 0;">
  339. <div class="btn-group-vertical btn-block">
  340. <button type="button" class="btn btn-warning btn-block btn-flat"
  341. id="suspend">
  342. <?=lang('suspend'); ?>
  343. </button>
  344. <button type="button" class="btn btn-danger btn-block btn-flat"
  345. id="reset">
  346. <?= lang('cancel'); ?>
  347. </button>
  348. </div>
  349.  
  350. </div>
  351. <div class="col-xs-4" style="padding: 0;">
  352. <div class="btn-group-vertical btn-block">
  353. <button type="button" class="btn btn-info btn-block" id="print_order">
  354. <?=lang('order');?>
  355. </button>
  356.  
  357. <button type="button" class="btn btn-primary btn-block" id="print_bill">
  358. <?=lang('bill');?>
  359. </button>
  360. </div>
  361. </div>
  362. <div class="col-xs-4" style="padding: 0;">
  363. <button type="button" class="btn btn-success btn-block" id="payment" style="height:67px;">
  364. <i class="fa fa-money" style="margin-right: 5px;"></i><?=lang('payment');?>
  365. </button>
  366. </div>
  367. </div>
  368. </div>
  369. <div style="clear:both; height:5px;"></div>
  370. <div id="num">
  371. <div id="icon"></div>
  372. </div>
  373. <span id="hidesuspend"></span>
  374. <input type="hidden" name="pos_note" value="" id="pos_note">
  375. <input type="hidden" name="staff_note" value="" id="staff_note">
  376.  
  377. <div id="payment-con">
  378. <?php for ($i = 1; $i <= 5; $i++) {?>
  379. <input type="hidden" name="amount[]" id="amount_val_<?=$i?>" value=""/>
  380. <input type="hidden" name="balance_amount[]" id="balance_amount_<?=$i?>" value=""/>
  381. <input type="hidden" name="paid_by[]" id="paid_by_val_<?=$i?>" value="cash"/>
  382. <input type="hidden" name="cc_no[]" id="cc_no_val_<?=$i?>" value=""/>
  383. <input type="hidden" name="paying_gift_card_no[]" id="paying_gift_card_no_val_<?=$i?>" value=""/>
  384. <input type="hidden" name="cc_holder[]" id="cc_holder_val_<?=$i?>" value=""/>
  385. <input type="hidden" name="cheque_no[]" id="cheque_no_val_<?=$i?>" value=""/>
  386. <input type="hidden" name="cc_month[]" id="cc_month_val_<?=$i?>" value=""/>
  387. <input type="hidden" name="cc_year[]" id="cc_year_val_<?=$i?>" value=""/>
  388. <input type="hidden" name="cc_type[]" id="cc_type_val_<?=$i?>" value=""/>
  389. <input type="hidden" name="cc_cvv2[]" id="cc_cvv2_val_<?=$i?>" value=""/>
  390. <input type="hidden" name="payment_note[]" id="payment_note_val_<?=$i?>" value=""/>
  391. <?php }
  392. ?>
  393. </div>
  394. <input name="order_tax" type="hidden" value="<?=$suspend_sale ? $suspend_sale->order_tax_id : ($old_sale ? $old_sale->order_tax_id : $Settings->default_tax_rate2);?>" id="postax2">
  395. <input name="discount" type="hidden" value="<?=$suspend_sale ? $suspend_sale->order_discount_id : ($old_sale ? $old_sale->order_discount_id : '');?>" id="posdiscount">
  396. <input name="shipping" type="hidden" value="<?=$suspend_sale ? $suspend_sale->shipping : ($old_sale ? $old_sale->shipping : '0');?>" id="posshipping">
  397. <input type="hidden" name="rpaidby" id="rpaidby" value="cash" style="display: none;"/>
  398. <input type="hidden" name="total_items" id="total_items" value="0" style="display: none;"/>
  399. <input type="submit" id="submit_sale" value="Submit Sale" style="display: none;"/>
  400. </div>
  401. </div>
  402.  
  403. </div>
  404. <?php echo form_close(); ?>
  405. <div id="cp">
  406. <div id="cpinner">
  407. <div class="quick-menu">
  408. <div id="proContainer">
  409. <div id="ajaxproducts">
  410. <div id="item-list">
  411. <?php echo $products; ?>
  412. </div>
  413. <div class="btn-group btn-group-justified pos-grid-nav">
  414. <div class="btn-group">
  415. <button style="z-index:10002;" class="btn btn-primary pos-tip" title="<?=lang('previous')?>" type="button" id="previous">
  416. <i class="fa fa-chevron-left"></i>
  417. </button>
  418. </div>
  419. <?php if ($Owner || $Admin || $GP['sales-add_gift_card']) {?>
  420. <div class="btn-group">
  421. <button style="z-index:10003;" class="btn btn-primary pos-tip" type="button" id="sellGiftCard" title="<?=lang('sell_gift_card')?>">
  422. <i class="fa fa-credit-card" id="addIcon"></i> <?=lang('sell_gift_card')?>
  423. </button>
  424. </div>
  425. <?php }
  426. ?>
  427. <div class="btn-group">
  428. <button style="z-index:10004;" class="btn btn-primary pos-tip" title="<?=lang('next')?>" type="button" id="next">
  429. <i class="fa fa-chevron-right"></i>
  430. </button>
  431. </div>
  432. </div>
  433. </div>
  434. <div style="clear:both;"></div>
  435. </div>
  436. </div>
  437. </div>
  438. <div style="clear:both;"></div>
  439. </div>
  440. <div style="clear:both;"></div>
  441. </div>
  442. <div style="clear:both;"></div>
  443. </div>
  444. </div>
  445. </div>
  446. </div>
  447. <div class="rotate btn-cat-con">
  448. <button type="button" id="open-brands" class="btn btn-info open-brands"><?= lang('brands'); ?></button>
  449. <button type="button" id="open-subcategory" class="btn btn-warning open-subcategory"><?= lang('subcategories'); ?></button>
  450. <button type="button" id="open-category" class="btn btn-primary open-category"><?= lang('categories'); ?></button>
  451. </div>
  452. <div id="brands-slider">
  453. <div id="brands-list">
  454. <?php
  455. // for ($i = 1; $i <= 40; $i++) {
  456. foreach ($brands as $brand) {
  457. echo "<button id=\"brand-" . $brand->id . "\" type=\"button\" value='" . $brand->id . "' class=\"btn-prni brand\" ><img src=\"assets/uploads/thumbs/" . ($brand->image ? $brand->image : 'no_image.png') . "\" class='img-rounded img-thumbnail' /><span>" . $brand->name . "</span></button>";
  458. }
  459. // }
  460. ?>
  461. </div>
  462. </div>
  463. <div id="category-slider">
  464. <!--<button type="button" class="close open-category"><i class="fa fa-2x">&times;</i></button>-->
  465. <div id="category-list">
  466. <?php
  467. //for ($i = 1; $i <= 40; $i++) {
  468. foreach ($categories as $category) {
  469. echo "<button id=\"category-" . $category->id . "\" type=\"button\" value='" . $category->id . "' class=\"btn-prni category\" ><img src=\"assets/uploads/thumbs/" . ($category->image ? $category->image : 'no_image.png') . "\" class='img-rounded img-thumbnail' /><span>" . $category->name . "</span></button>";
  470. }
  471. //}
  472. ?>
  473. </div>
  474. </div>
  475. <div id="subcategory-slider">
  476. <!--<button type="button" class="close open-category"><i class="fa fa-2x">&times;</i></button>-->
  477. <div id="subcategory-list">
  478. <?php
  479. if (!empty($subcategories)) {
  480. foreach ($subcategories as $category) {
  481. echo "<button id=\"subcategory-" . $category->id . "\" type=\"button\" value='" . $category->id . "' class=\"btn-prni subcategory\" ><img src=\"assets/uploads/thumbs/" . ($category->image ? $category->image : 'no_image.png') . "\" class='img-rounded img-thumbnail' /><span>" . $category->name . "</span></button>";
  482. }
  483. }
  484. ?>
  485. </div>
  486. </div>
  487. <div class="modal fade in" id="paymentModal" tabindex="-1" role="dialog" aria-labelledby="payModalLabel"
  488. aria-hidden="true">
  489. <div class="modal-dialog modal-lg">
  490. <div class="modal-content">
  491. <div class="modal-header">
  492. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true"><i
  493. class="fa fa-2x">&times;</i></span><span class="sr-only"><?=lang('close');?></span></button>
  494. <h4 class="modal-title" id="payModalLabel"><?=lang('finalize_sale');?></h4>
  495. </div>
  496. <div class="modal-body" id="payment_content">
  497. <div class="row">
  498. <div class="col-md-10 col-sm-9">
  499. <?php if ($Owner || $Admin || !$this->session->userdata('biller_id')) { ?>
  500. <div class="form-group">
  501. <?=lang("biller", "biller");?>
  502. <?php
  503. foreach ($billers as $biller) {
  504. $btest = ($biller->company && $biller->company != '-' ? $biller->company : $biller->name);
  505. $bl[$biller->id] = $btest;
  506. $posbillers[] = array('logo' => $biller->logo, 'company' => $btest);
  507. if ($biller->id == $pos_settings->default_biller) {
  508. $posbiller = array('logo' => $biller->logo, 'company' => $btest);
  509. }
  510. }
  511. echo form_dropdown('biller', $bl, (isset($_POST['biller']) ? $_POST['biller'] : $pos_settings->default_biller), 'class="form-control" id="posbiller" required="required"');
  512. ?>
  513. </div>
  514. <?php } else {
  515. $biller_input = array(
  516. 'type' => 'hidden',
  517. 'name' => 'biller',
  518. 'id' => 'posbiller',
  519. 'value' => $this->session->userdata('biller_id'),
  520. );
  521.  
  522. echo form_input($biller_input);
  523.  
  524. foreach ($billers as $biller) {
  525. $btest = ($biller->company && $biller->company != '-' ? $biller->company : $biller->name);
  526. $posbillers[] = array('logo' => $biller->logo, 'company' => $btest);
  527. if ($biller->id == $this->session->userdata('biller_id')) {
  528. $posbiller = array('logo' => $biller->logo, 'company' => $btest);
  529. }
  530. }
  531. }
  532. ?>
  533. <div class="form-group">
  534. <div class="row">
  535. <div class="col-sm-6">
  536. <?=form_textarea('sale_note', '', 'id="sale_note" class="form-control kb-text skip" style="height: 100px;" placeholder="' . lang('sale_note') . '" maxlength="250"');?>
  537. </div>
  538. <div class="col-sm-6">
  539. <?=form_textarea('staffnote', '', 'id="staffnote" class="form-control kb-text skip" style="height: 100px;" placeholder="' . lang('staff_note') . '" maxlength="250"');?>
  540. </div>
  541. </div>
  542. </div>
  543. <div class="clearfir"></div>
  544. <div id="payments">
  545. <div class="well well-sm well_1">
  546. <div class="payment">
  547. <div class="row">
  548. <div class="col-sm-5">
  549. <div class="form-group">
  550. <?=lang("amount", "amount_1");?>
  551. <input name="amount[]" type="text" id="amount_1"
  552. class="pa form-control kb-pad1 amount"/>
  553. </div>
  554. </div>
  555. <div class="col-sm-5 col-sm-offset-1">
  556. <div class="form-group">
  557. <?=lang("paying_by", "paid_by_1");?>
  558. <select name="paid_by[]" id="paid_by_1" class="form-control paid_by">
  559. <?= $this->sma->paid_opts(); ?>
  560. <?=$pos_settings->paypal_pro ? '<option value="ppp">' . lang("paypal_pro") . '</option>' : '';?>
  561. <?=$pos_settings->stripe ? '<option value="stripe">' . lang("stripe") . '</option>' : '';?>
  562. <?=$pos_settings->authorize ? '<option value="authorize">' . lang("authorize") . '</option>' : '';?>
  563. </select>
  564. </div>
  565. </div>
  566. </div>
  567. <div class="row">
  568. <div class="col-sm-11">
  569. <div class="form-group gc_1" style="display: none;">
  570. <?=lang("gift_card_no", "gift_card_no_1");?>
  571. <input name="paying_gift_card_no[]" type="text" id="gift_card_no_1"
  572. class="pa form-control kb-pad gift_card_no"/>
  573.  
  574. <div id="gc_details_1"></div>
  575. </div>
  576. <div class="pcc_1" style="display:none;">
  577. <div class="form-group">
  578. <input type="text" id="swipe_1" class="form-control swipe"
  579. placeholder="<?=lang('swipe')?>"/>
  580. </div>
  581. <div class="row">
  582. <div class="col-md-6">
  583. <div class="form-group">
  584. <input name="cc_no[]" type="text" id="pcc_no_1"
  585. class="form-control"
  586. placeholder="<?=lang('cc_no')?>"/>
  587. </div>
  588. </div>
  589. <div class="col-md-6">
  590. <div class="form-group">
  591.  
  592. <input name="cc_holer[]" type="text" id="pcc_holder_1"
  593. class="form-control"
  594. placeholder="<?=lang('cc_holder')?>"/>
  595. </div>
  596. </div>
  597. <div class="col-md-3">
  598. <div class="form-group">
  599. <select name="cc_type[]" id="pcc_type_1"
  600. class="form-control pcc_type"
  601. placeholder="<?=lang('card_type')?>">
  602. <option value="Visa"><?=lang("Visa");?></option>
  603. <option
  604. value="MasterCard"><?=lang("MasterCard");?></option>
  605. <option value="Amex"><?=lang("Amex");?></option>
  606. <option
  607. value="Discover"><?=lang("Discover");?></option>
  608. </select>
  609. <!-- <input type="text" id="pcc_type_1" class="form-control" placeholder="<?=lang('card_type')?>" />-->
  610. </div>
  611. </div>
  612. <div class="col-md-3">
  613. <div class="form-group">
  614. <input name="cc_month[]" type="text" id="pcc_month_1"
  615. class="form-control"
  616. placeholder="<?=lang('month')?>"/>
  617. </div>
  618. </div>
  619. <div class="col-md-3">
  620. <div class="form-group">
  621.  
  622. <input name="cc_year" type="text" id="pcc_year_1"
  623. class="form-control"
  624. placeholder="<?=lang('year')?>"/>
  625. </div>
  626. </div>
  627. <div class="col-md-3">
  628. <div class="form-group">
  629.  
  630. <input name="cc_cvv2" type="text" id="pcc_cvv2_1"
  631. class="form-control"
  632. placeholder="<?=lang('cvv2')?>"/>
  633. </div>
  634. </div>
  635. </div>
  636. </div>
  637. <div class="pcheque_1" style="display:none;">
  638. <div class="form-group"><?=lang("cheque_no", "cheque_no_1");?>
  639. <input name="cheque_no[]" type="text" id="cheque_no_1"
  640. class="form-control cheque_no"/>
  641. </div>
  642. </div>
  643. <div class="form-group">
  644. <?=lang('payment_note', 'payment_note');?>
  645. <textarea name="payment_note[]" id="payment_note_1"
  646. class="pa form-control kb-text payment_note"></textarea>
  647. </div>
  648. </div>
  649. </div>
  650. </div>
  651. </div>
  652. </div>
  653. <div id="multi-payment"></div>
  654. <button type="button" class="btn btn-primary col-md-12 addButton"><i
  655. class="fa fa-plus"></i> <?=lang('add_more_payments')?></button>
  656. <div style="clear:both; height:15px;"></div>
  657. <div class="font16">
  658. <table class="table table-bordered table-condensed table-striped" style="margin-bottom: 0;">
  659. <tbody>
  660. <tr>
  661. <td width="25%"><?=lang("total_items");?></td>
  662. <td width="25%" class="text-right"><span id="item_count">0.00</span></td>
  663. <td width="25%"><?=lang("total_payable");?></td>
  664. <td width="25%" class="text-right"><span id="twt">0.00</span></td>
  665. </tr>
  666. <tr>
  667. <td><?=lang("total_paying");?></td>
  668. <td class="text-right"><span id="total_paying">0.00</span></td>
  669. <td><?=lang("balance");?></td>
  670. <td class="text-right"><span id="balance">0.00</span></td>
  671. </tr>
  672. </tbody>
  673. </table>
  674. <div class="clearfix"></div>
  675. </div>
  676. </div>
  677. <div class="col-md-2 col-sm-3 text-center">
  678. <span style="font-size: 1.2em; font-weight: bold;"><?=lang('quick_cash');?></span>
  679.  
  680. <div class="btn-group btn-group-vertical">
  681. <button type="button" class="btn btn-lg btn-info quick-cash" id="quick-payable">0.00
  682. </button>
  683. <?php
  684. foreach (lang('quick_cash_notes') as $cash_note_amount) {
  685. echo '<button type="button" class="btn btn-lg btn-warning quick-cash">' . $cash_note_amount . '</button>';
  686. }
  687. ?>
  688. <button type="button" class="btn btn-lg btn-danger"
  689. id="clear-cash-notes"><?=lang('clear');?></button>
  690. </div>
  691. </div>
  692. </div>
  693. </div>
  694. <div class="modal-footer">
  695. <button class="btn btn-block btn-lg btn-primary" id="submit-sale"><?=lang('submit');?></button>
  696. </div>
  697. </div>
  698. </div>
  699. </div>
  700.  
  701. <div class="modal" id="cmModal" tabindex="-1" role="dialog" aria-labelledby="cmModalLabel" aria-hidden="true">
  702. <div class="modal-dialog">
  703. <div class="modal-content">
  704. <div class="modal-header">
  705. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">
  706. <i class="fa fa-2x">&times;</i></span>
  707. <span class="sr-only"><?=lang('close');?></span>
  708. </button>
  709. <h4 class="modal-title" id="cmModalLabel"></h4>
  710. </div>
  711. <div class="modal-body" id="pr_popover_content">
  712. <div class="form-group">
  713. <?= lang('comment', 'icomment'); ?>
  714. <?= form_textarea('comment', '', 'class="form-control" id="icomment" style="height:80px;"'); ?>
  715. </div>
  716. <div class="form-group">
  717. <?= lang('ordered', 'iordered'); ?>
  718. <?php
  719. $opts = array(0 => lang('no'), 1 => lang('yes'));
  720. ?>
  721. <?= form_dropdown('ordered', $opts, '', 'class="form-control" id="iordered" style="width:100%;"'); ?>
  722. </div>
  723. <input type="hidden" id="irow_id" value=""/>
  724. </div>
  725. <div class="modal-footer">
  726. <button type="button" class="btn btn-primary" id="editComment"><?=lang('submit')?></button>
  727. </div>
  728. </div>
  729. </div>
  730. </div>
  731.  
  732. <div class="modal" id="prModal" tabindex="-1" role="dialog" aria-labelledby="prModalLabel" aria-hidden="true">
  733. <div class="modal-dialog">
  734. <div class="modal-content">
  735. <div class="modal-header">
  736. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true"><i
  737. class="fa fa-2x">&times;</i></span><span class="sr-only"><?=lang('close');?></span></button>
  738. <h4 class="modal-title" id="prModalLabel"></h4>
  739. </div>
  740. <div class="modal-body" id="pr_popover_content">
  741. <form class="form-horizontal" role="form">
  742. <?php if ($Settings->tax1) {
  743. ?>
  744. <div class="form-group">
  745. <label class="col-sm-4 control-label"><?=lang('product_tax')?></label>
  746. <div class="col-sm-8">
  747. <?php
  748. $tr[""] = "";
  749. foreach ($tax_rates as $tax) {
  750. $tr[$tax->id] = $tax->name;
  751. }
  752. echo form_dropdown('ptax', $tr, "", 'id="ptax" class="form-control pos-input-tip" style="width:100%;"');
  753. ?>
  754. </div>
  755. </div>
  756. <?php } ?>
  757. <?php if ($Settings->product_serial) { ?>
  758. <div class="form-group">
  759. <label for="pserial" class="col-sm-4 control-label"><?=lang('serial_no')?></label>
  760. <div class="col-sm-8">
  761. <input type="text" class="form-control kb-text" id="pserial">
  762. </div>
  763. </div>
  764. <?php } ?>
  765. <div class="form-group">
  766. <label for="pquantity" class="col-sm-4 control-label"><?=lang('quantity')?></label>
  767. <div class="col-sm-8">
  768. <input type="text" class="form-control kb-pad" id="pquantity">
  769. </div>
  770. </div>
  771. <div class="form-group">
  772. <label for="eceran" class="col-sm-4 control-label"></label>
  773. <div class="col-sm-8">
  774. <input type="checkbox" id="cek_eceran" name="cek_eceran"/>
  775. <label for="eceran" class="control-label">Harga Eceran</label>
  776. </div>
  777. </div>
  778. <div class="form-group" id="tampil_meter">
  779. <label for="h_eceran" class="col-sm-4 control-label">Pilih Group Harga</label>
  780. <div class="col-sm-8">
  781. <?php echo group_eceran('groups_eceran', 'sma_price_groups', 'name', 'id', $groups_eceran); //style="display: none"?>
  782. </div>
  783. </div>
  784.  
  785. <div class="form-group">
  786. <label for="h_eceran" class="col-sm-4 control-label">Group Harga</label>
  787. <div class="col-sm-8">
  788. <input type="text" class="form-control" id="grup_h" name="grup_h">
  789. </div>
  790. </div>
  791. <div class="form-group" id="ngilang1">
  792. <label for="punit" class="col-sm-4 control-label"><?= lang('product_unit') ?></label>
  793. <div class="col-sm-8">
  794. <div id="punits-div"></div>
  795. </div>
  796. </div>
  797. <div class="form-group">
  798. <label for="poption" class="col-sm-4 control-label"><?=lang('product_option')?></label>
  799. <div class="col-sm-8">
  800. <div id="poptions-div"></div>
  801. </div>
  802. </div>
  803. <?php if ($Settings->product_discount && ($Owner || $Admin || $this->session->userdata('allow_discount'))) { ?>
  804. <div class="form-group">
  805. <label for="pdiscount" class="col-sm-4 control-label"><?=lang('product_discount')?></label>
  806. <div class="col-sm-8">
  807. <input type="text" class="form-control kb-pad" id="pdiscount">
  808. </div>
  809. </div>
  810. <?php } ?>
  811. <div class="form-group">
  812. <label for="pprice" class="col-sm-4 control-label"><?=lang('unit_price')?></label>
  813.  
  814. <div class="col-sm-8">
  815. <input type="text" class="form-control kb-pad" id="pprice" <?= ($Owner || $Admin || $GP['edit_price']) ? '' : 'readonly'; ?>>
  816. </div>
  817. </div>
  818. <table class="table table-bordered table-striped">
  819. <tr>
  820. <th style="width:25%;"><?=lang('net_unit_price');?></th>
  821. <th style="width:25%;"><span id="net_price"></span></th>
  822. <th style="width:25%;"><?=lang('product_tax');?></th>
  823. <th style="width:25%;"><span id="pro_tax"></span></th>
  824. </tr>
  825. </table>
  826. <input type="hidden" id="punit_price" value=""/>
  827. <input type="hidden" id="old_tax" value=""/>
  828. <input type="hidden" id="old_qty" value=""/>
  829. <input type="hidden" id="old_price" value=""/>
  830. <input type="hidden" id="row_id" value=""/>
  831. </form>
  832. </div>
  833. <div class="modal-footer">
  834. <button type="button" class="btn btn-primary" id="editItem"><?=lang('submit')?></button>
  835. </div>
  836. </div>
  837. </div>
  838. </div>
  839.  
  840. <div class="modal fade in" id="gcModal" tabindex="-1" role="dialog" aria-labelledby="mModalLabel" aria-hidden="true">
  841. <div class="modal-dialog">
  842. <div class="modal-content">
  843. <div class="modal-header">
  844. <button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i
  845. class="fa fa-2x">&times;</i></button>
  846. <h4 class="modal-title" id="myModalLabel"><?=lang('sell_gift_card');?></h4>
  847. </div>
  848. <div class="modal-body">
  849. <p><?=lang('enter_info');?></p>
  850.  
  851. <div class="alert alert-danger gcerror-con" style="display: none;">
  852. <button data-dismiss="alert" class="close" type="button">×</button>
  853. <span id="gcerror"></span>
  854. </div>
  855. <div class="form-group">
  856. <?=lang("card_no", "gccard_no");?> *
  857. <div class="input-group">
  858. <?php echo form_input('gccard_no', '', 'class="form-control" id="gccard_no"'); ?>
  859. <div class="input-group-addon" style="padding-left: 10px; padding-right: 10px;">
  860. <a href="#" id="genNo"><i class="fa fa-cogs"></i></a>
  861. </div>
  862. </div>
  863. </div>
  864. <input type="hidden" name="gcname" value="<?=lang('gift_card')?>" id="gcname"/>
  865.  
  866. <div class="form-group">
  867. <?=lang("value", "gcvalue");?> *
  868. <?php echo form_input('gcvalue', '', 'class="form-control" id="gcvalue"'); ?>
  869. </div>
  870. <div class="form-group">
  871. <?=lang("price", "gcprice");?> *
  872. <?php echo form_input('gcprice', '', 'class="form-control" id="gcprice"'); ?>
  873. </div>
  874. <div class="form-group">
  875. <?=lang("customer", "gccustomer");?>
  876. <?php echo form_input('gccustomer', '', 'class="form-control" id="gccustomer"'); ?>
  877. </div>
  878. <div class="form-group">
  879. <?=lang("expiry_date", "gcexpiry");?>
  880. <?php echo form_input('gcexpiry', $this->sma->hrsd(date("Y-m-d", strtotime("+2 year"))), 'class="form-control date" id="gcexpiry"'); ?>
  881. </div>
  882.  
  883. </div>
  884. <div class="modal-footer">
  885. <button type="button" id="addGiftCard" class="btn btn-primary"><?=lang('sell_gift_card')?></button>
  886. </div>
  887. </div>
  888. </div>
  889. </div>
  890.  
  891. <div class="modal fade in" id="mModal" tabindex="-1" role="dialog" aria-labelledby="mModalLabel" aria-hidden="true">
  892. <div class="modal-dialog">
  893. <div class="modal-content">
  894. <div class="modal-header">
  895. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true"><i
  896. class="fa fa-2x">&times;</i></span><span class="sr-only"><?=lang('close');?></span></button>
  897. <h4 class="modal-title" id="mModalLabel"><?=lang('add_product_manually')?></h4>
  898. </div>
  899. <div class="modal-body" id="pr_popover_content">
  900. <form class="form-horizontal" role="form">
  901. <div class="form-group">
  902. <label for="mcode" class="col-sm-4 control-label"><?=lang('product_code')?> *</label>
  903.  
  904. <div class="col-sm-8">
  905. <input type="text" class="form-control kb-text" id="mcode">
  906. </div>
  907. </div>
  908. <div class="form-group">
  909. <label for="mname" class="col-sm-4 control-label"><?=lang('product_name')?> *</label>
  910.  
  911. <div class="col-sm-8">
  912. <input type="text" class="form-control kb-text" id="mname">
  913. </div>
  914. </div>
  915. <?php if ($Settings->tax1) {
  916. ?>
  917. <div class="form-group">
  918. <label for="mtax" class="col-sm-4 control-label"><?=lang('product_tax')?> *</label>
  919.  
  920. <div class="col-sm-8">
  921. <?php
  922. $tr[""] = "";
  923. foreach ($tax_rates as $tax) {
  924. $tr[$tax->id] = $tax->name;
  925. }
  926. echo form_dropdown('mtax', $tr, "", 'id="mtax" class="form-control pos-input-tip" style="width:100%;"');
  927. ?>
  928. </div>
  929. </div>
  930. <?php }
  931. ?>
  932. <div class="form-group">
  933. <label for="mquantity" class="col-sm-4 control-label"><?=lang('quantity')?> *</label>
  934.  
  935. <div class="col-sm-8">
  936. <input type="text" class="form-control kb-pad" id="mquantity">
  937. </div>
  938. </div>
  939. <?php if ($Settings->product_discount && ($Owner || $Admin || $this->session->userdata('allow_discount'))) {?>
  940. <div class="form-group">
  941. <label for="mdiscount"
  942. class="col-sm-4 control-label"><?=lang('product_discount')?></label>
  943.  
  944. <div class="col-sm-8">
  945. <input type="text" class="form-control kb-pad" id="mdiscount">
  946. </div>
  947. </div>
  948. <?php }
  949. ?>
  950. <div class="form-group">
  951. <label for="mprice" class="col-sm-4 control-label"><?=lang('unit_price')?> *</label>
  952.  
  953. <div class="col-sm-8">
  954. <input type="text" class="form-control kb-pad" id="mprice">
  955. </div>
  956. </div>
  957. <table class="table table-bordered table-striped">
  958. <tr>
  959. <th style="width:25%;"><?=lang('net_unit_price');?></th>
  960. <th style="width:25%;"><span id="mnet_price"></span></th>
  961. <th style="width:25%;"><?=lang('product_tax');?></th>
  962. <th style="width:25%;"><span id="mpro_tax"></span></th>
  963. </tr>
  964. </table>
  965. </form>
  966. </div>
  967. <div class="modal-footer">
  968. <button type="button" class="btn btn-primary" id="addItemManually"><?=lang('submit')?></button>
  969. </div>
  970. </div>
  971. </div>
  972. </div>
  973.  
  974. <div class="modal fade in" id="sckModal" tabindex="-1" role="dialog" aria-labelledby="ModalLabel" aria-hidden="true">
  975. <div class="modal-dialog">
  976. <div class="modal-content">
  977. <div class="modal-header">
  978. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">
  979. <i class="fa fa-2x">&times;</i></span><span class="sr-only"><?=lang('close');?></span>
  980. </button>
  981. <button type="button" class="btn btn-xs btn-default no-print pull-right" style="margin-right:15px;" onclick="window.print();">
  982. <i class="fa fa-print"></i> <?= lang('print'); ?>
  983. </button>
  984. <h4 class="modal-title" id="mModalLabel"><?=lang('shortcut_keys')?></h4>
  985. </div>
  986. <div class="modal-body" id="pr_popover_content">
  987. <table class="table table-bordered table-striped table-condensed table-hover"
  988. style="margin-bottom: 0px;">
  989. <thead>
  990. <tr>
  991. <th><?=lang('shortcut_keys')?></th>
  992. <th><?=lang('actions')?></th>
  993. </tr>
  994. </thead>
  995. <tbody>
  996. <tr>
  997. <td><?=$pos_settings->focus_add_item?></td>
  998. <td><?=lang('focus_add_item')?></td>
  999. </tr>
  1000. <tr>
  1001. <td><?=$pos_settings->add_manual_product?></td>
  1002. <td><?=lang('add_manual_product')?></td>
  1003. </tr>
  1004. <tr>
  1005. <td><?=$pos_settings->customer_selection?></td>
  1006. <td><?=lang('customer_selection')?></td>
  1007. </tr>
  1008. <tr>
  1009. <td><?=$pos_settings->add_customer?></td>
  1010. <td><?=lang('add_customer')?></td>
  1011. </tr>
  1012. <tr>
  1013. <td><?=$pos_settings->toggle_category_slider?></td>
  1014. <td><?=lang('toggle_category_slider')?></td>
  1015. </tr>
  1016. <tr>
  1017. <td><?=$pos_settings->toggle_subcategory_slider?></td>
  1018. <td><?=lang('toggle_subcategory_slider')?></td>
  1019. </tr>
  1020. <tr>
  1021. <td><?=$pos_settings->cancel_sale?></td>
  1022. <td><?=lang('cancel_sale')?></td>
  1023. </tr>
  1024. <tr>
  1025. <td><?=$pos_settings->suspend_sale?></td>
  1026. <td><?=lang('suspend_sale')?></td>
  1027. </tr>
  1028. <tr>
  1029. <td><?=$pos_settings->print_items_list?></td>
  1030. <td><?=lang('print_items_list')?></td>
  1031. </tr>
  1032. <tr>
  1033. <td><?=$pos_settings->finalize_sale?></td>
  1034. <td><?=lang('finalize_sale')?></td>
  1035. </tr>
  1036. <tr>
  1037. <td><?=$pos_settings->today_sale?></td>
  1038. <td><?=lang('today_sale')?></td>
  1039. </tr>
  1040. <tr>
  1041. <td><?=$pos_settings->open_hold_bills?></td>
  1042. <td><?=lang('open_hold_bills')?></td>
  1043. </tr>
  1044. <tr>
  1045. <td><?=$pos_settings->close_register?></td>
  1046. <td><?=lang('close_register')?></td>
  1047. </tr>
  1048. </tbody>
  1049. </table>
  1050. </div>
  1051. </div>
  1052. </div>
  1053. </div>
  1054.  
  1055. <div class="modal fade in" id="dsModal" tabindex="-1" role="dialog" aria-labelledby="dsModalLabel" aria-hidden="true">
  1056. <div class="modal-dialog modal-sm">
  1057. <div class="modal-content">
  1058. <div class="modal-header">
  1059. <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
  1060. <i class="fa fa-2x">&times;</i>
  1061. </button>
  1062. <h4 class="modal-title" id="dsModalLabel"><?=lang('edit_order_discount');?></h4>
  1063. </div>
  1064. <div class="modal-body">
  1065. <div class="form-group">
  1066. <?=lang("order_discount", "order_discount_input");?>
  1067. <?php echo form_input('order_discount_input', '', 'class="form-control kb-pad" id="order_discount_input"'); ?>
  1068. </div>
  1069.  
  1070. </div>
  1071. <div class="modal-footer">
  1072. <button type="button" id="updateOrderDiscount" class="btn btn-primary"><?=lang('update')?></button>
  1073. </div>
  1074. </div>
  1075. </div>
  1076. </div>
  1077.  
  1078. <div class="modal fade in" id="sModal" tabindex="-1" role="dialog" aria-labelledby="sModalLabel" aria-hidden="true">
  1079. <div class="modal-dialog modal-sm">
  1080. <div class="modal-content">
  1081. <div class="modal-header">
  1082. <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
  1083. <i class="fa fa-2x">&times;</i>
  1084. </button>
  1085. <h4 class="modal-title" id="sModalLabel"><?=lang('shipping');?></h4>
  1086. </div>
  1087. <div class="modal-body">
  1088. <div class="form-group">
  1089. <?=lang("shipping", "shipping_input");?>
  1090. <?php echo form_input('shipping_input', '', 'class="form-control kb-pad" id="shipping_input"'); ?>
  1091. </div>
  1092.  
  1093. </div>
  1094. <div class="modal-footer">
  1095. <button type="button" id="updateShipping" class="btn btn-primary"><?=lang('update')?></button>
  1096. </div>
  1097. </div>
  1098. </div>
  1099. </div>
  1100.  
  1101. <div class="modal fade in" id="txModal" tabindex="-1" role="dialog" aria-labelledby="txModalLabel" aria-hidden="true">
  1102. <div class="modal-dialog modal-sm">
  1103. <div class="modal-content">
  1104. <div class="modal-header">
  1105. <button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i
  1106. class="fa fa-2x">&times;</i></button>
  1107. <h4 class="modal-title" id="txModalLabel"><?=lang('edit_order_tax');?></h4>
  1108. </div>
  1109. <div class="modal-body">
  1110. <div class="form-group">
  1111. <?=lang("order_tax", "order_tax_input");?>
  1112. <?php
  1113. $tr[""] = "";
  1114. foreach ($tax_rates as $tax) {
  1115. $tr[$tax->id] = $tax->name;
  1116. }
  1117. echo form_dropdown('order_tax_input', $tr, "", 'id="order_tax_input" class="form-control pos-input-tip" style="width:100%;"');
  1118. ?>
  1119. </div>
  1120.  
  1121. </div>
  1122. <div class="modal-footer">
  1123. <button type="button" id="updateOrderTax" class="btn btn-primary"><?=lang('update')?></button>
  1124. </div>
  1125. </div>
  1126. </div>
  1127. </div>
  1128.  
  1129. <div class="modal fade in" id="susModal" tabindex="-1" role="dialog" aria-labelledby="susModalLabel" aria-hidden="true">
  1130. <div class="modal-dialog">
  1131. <div class="modal-content">
  1132. <div class="modal-header">
  1133. <button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i
  1134. class="fa fa-2x">&times;</i></button>
  1135. <h4 class="modal-title" id="susModalLabel"><?=lang('suspend_sale');?></h4>
  1136. </div>
  1137. <div class="modal-body">
  1138. <p><?=lang('type_reference_note');?></p>
  1139.  
  1140. <div class="form-group">
  1141. <?=lang("reference_note", "reference_note");?>
  1142. <?= form_input('reference_note', (!empty($reference_note) ? $reference_note : ''), 'class="form-control kb-text" id="reference_note"'); ?>
  1143. </div>
  1144.  
  1145. </div>
  1146. <div class="modal-footer">
  1147. <button type="button" id="suspend_sale" class="btn btn-primary"><?=lang('submit')?></button>
  1148. </div>
  1149. </div>
  1150. </div>
  1151. </div>
  1152. <div id="order_tbl"><span id="order_span"></span>
  1153. <table id="order-table" class="prT table table-striped" style="margin-bottom:0;" width="100%"></table>
  1154. </div>
  1155. <div id="bill_tbl"><span id="bill_span"></span>
  1156. <table id="bill-table" width="100%" class="prT table table-striped" style="margin-bottom:0;"></table>
  1157. <table id="bill-total-table" class="prT table" style="margin-bottom:0;" width="100%"></table>
  1158. <span id="bill_footer"></span>
  1159. </div>
  1160. <div class="modal fade in" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
  1161. aria-hidden="true"></div>
  1162. <div class="modal fade in" id="myModal2" tabindex="-1" role="dialog" aria-labelledby="myModalLabel2"
  1163. aria-hidden="true"></div>
  1164. <div id="modal-loading" style="display: none;">
  1165. <div class="blackbg"></div>
  1166. <div class="loader"></div>
  1167. </div>
  1168. <?php unset($Settings->setting_id, $Settings->smtp_user, $Settings->smtp_pass, $Settings->smtp_port, $Settings->update, $Settings->reg_ver, $Settings->allow_reg, $Settings->default_email, $Settings->mmode, $Settings->timezone, $Settings->restrict_calendar, $Settings->restrict_user, $Settings->auto_reg, $Settings->reg_notification, $Settings->protocol, $Settings->mailpath, $Settings->smtp_crypto, $Settings->corn, $Settings->customer_group, $Settings->envato_username, $Settings->purchase_code);?>
  1169. <script type="text/javascript">
  1170. var site = <?=json_encode(array('url' => base_url(), 'base_url' => admin_url('/'), 'assets' => $assets, 'settings' => $Settings, 'dateFormats' => $dateFormats))?>, pos_settings = <?=json_encode($pos_settings);?>;
  1171. var lang = {
  1172. unexpected_value: '<?=lang('unexpected_value');?>',
  1173. select_above: '<?=lang('select_above');?>',
  1174. r_u_sure: '<?=lang('r_u_sure');?>',
  1175. bill: '<?=lang('bill');?>',
  1176. order: '<?=lang('order');?>',
  1177. total: '<?=lang('total');?>',
  1178. items: '<?=lang('items');?>',
  1179. discount: '<?=lang('discount');?>',
  1180. order_tax: '<?=lang('order_tax');?>',
  1181. grand_total: '<?=lang('grand_total');?>',
  1182. total_payable: '<?=lang('total_payable');?>',
  1183. rounding: '<?=lang('rounding');?>',
  1184. merchant_copy: '<?=lang('merchant_copy');?>'
  1185. };
  1186. </script>
  1187.  
  1188. <script type="text/javascript">
  1189.  
  1190. $(document).ready(function(){
  1191. $('#cek_eceran').click(function(){
  1192. if(this.checked){
  1193. $('#ngilang1').hide();
  1194. $('#tampil_meter').show();
  1195. }else{
  1196. $('#ngilang1').show();
  1197. $('#tampil_meter').hide();
  1198. }
  1199. });
  1200. });
  1201.  
  1202. $(function(){
  1203. $.ajaxSetup({
  1204. type:"POST",
  1205. url: "<?php echo base_url('Get_eceran/ambil_data') ?>",
  1206. cache: false,
  1207. });
  1208.  
  1209. $("#groups_eceran").change(function(){
  1210. var value=$(this).val();
  1211. //if(value>0){
  1212. $.ajax({
  1213. data:{modul:'eceran',id:value},
  1214. success: function(respond){
  1215. //$("#grup_h").val(respond);
  1216. }
  1217. })
  1218. //}
  1219. });
  1220.  
  1221. });
  1222.  
  1223. var product_variant = 0, shipping = 0, p_page = 0, per_page = 0, tcp = "<?=$tcp?>", pro_limit = <?= $pos_settings->pro_limit; ?>,
  1224. brand_id = 0, obrand_id = 0, cat_id = "<?=$pos_settings->default_category?>", ocat_id = "<?=$pos_settings->default_category?>", sub_cat_id = 0, osub_cat_id,
  1225. count = 1, an = 1, DT = <?=$Settings->default_tax_rate?>,
  1226. product_tax = 0, invoice_tax = 0, product_discount = 0, order_discount = 0, total_discount = 0, total = 0, total_paid = 0, grand_total = 0,
  1227. KB = <?=$pos_settings->keyboard?>, tax_rates =<?php echo json_encode($tax_rates); ?>;
  1228. var protect_delete = <?php if (!$Owner && !$Admin) {echo $pos_settings->pin_code ? '1' : '0';} else {echo '0';} ?>, billers = <?= json_encode($posbillers); ?>, biller = <?= json_encode($posbiller); ?>;
  1229. var username = '<?=$this->session->userdata('username');?>', order_data = '', bill_data = '';
  1230.  
  1231. function widthFunctions(e) {
  1232. var wh = $(window).height(),
  1233. lth = $('#left-top').height(),
  1234. lbh = $('#left-bottom').height();
  1235. $('#item-list').css("height", wh - 140);
  1236. $('#item-list').css("min-height", 515);
  1237. $('#left-middle').css("height", wh - lth - lbh - 102);
  1238. $('#left-middle').css("min-height", 278);
  1239. $('#product-list').css("height", wh - lth - lbh - 107);
  1240. $('#product-list').css("min-height", 278);
  1241. }
  1242. $(window).bind("resize", widthFunctions);
  1243. $(document).ready(function () {
  1244. $('#view-customer').click(function(){
  1245. $('#myModal').modal({remote: site.base_url + 'customers/view/' + $("input[name=customer]").val()});
  1246. $('#myModal').modal('show');
  1247. });
  1248. $('textarea').keydown(function (e) {
  1249. if (e.which == 13) {
  1250. var s = $(this).val();
  1251. $(this).val(s+'\n').focus();
  1252. e.preventDefault();
  1253. return false;
  1254. }
  1255. });
  1256. <?php if ($sid) { ?>
  1257. localStorage.setItem('positems', JSON.stringify(<?=$items;?>));
  1258. <?php } ?>
  1259.  
  1260. <?php if ($oid) { ?>
  1261. localStorage.setItem('positems', JSON.stringify(<?=$items;?>));
  1262. <?php } ?>
  1263.  
  1264. <?php if ($this->session->userdata('remove_posls')) {?>
  1265. if (localStorage.getItem('positems')) {
  1266. localStorage.removeItem('positems');
  1267. }
  1268. if (localStorage.getItem('posdiscount')) {
  1269. localStorage.removeItem('posdiscount');
  1270. }
  1271. if (localStorage.getItem('postax2')) {
  1272. localStorage.removeItem('postax2');
  1273. }
  1274. if (localStorage.getItem('posshipping')) {
  1275. localStorage.removeItem('posshipping');
  1276. }
  1277. if (localStorage.getItem('poswarehouse')) {
  1278. localStorage.removeItem('poswarehouse');
  1279. }
  1280. if (localStorage.getItem('posnote')) {
  1281. localStorage.removeItem('posnote');
  1282. }
  1283. if (localStorage.getItem('poscustomer')) {
  1284. localStorage.removeItem('poscustomer');
  1285. }
  1286. if (localStorage.getItem('posbiller')) {
  1287. localStorage.removeItem('posbiller');
  1288. }
  1289. if (localStorage.getItem('poscurrency')) {
  1290. localStorage.removeItem('poscurrency');
  1291. }
  1292. if (localStorage.getItem('posnote')) {
  1293. localStorage.removeItem('posnote');
  1294. }
  1295. if (localStorage.getItem('staffnote')) {
  1296. localStorage.removeItem('staffnote');
  1297. }
  1298. <?php $this->sma->unset_data('remove_posls');}
  1299. ?>
  1300. widthFunctions();
  1301. <?php if ($suspend_sale) {?>
  1302. localStorage.setItem('postax2', '<?=$suspend_sale->order_tax_id;?>');
  1303. localStorage.setItem('posdiscount', '<?=$suspend_sale->order_discount_id;?>');
  1304. localStorage.setItem('poswarehouse', '<?=$suspend_sale->warehouse_id;?>');
  1305. localStorage.setItem('poscustomer', '<?=$suspend_sale->customer_id;?>');
  1306. localStorage.setItem('posbiller', '<?=$suspend_sale->biller_id;?>');
  1307. localStorage.setItem('posshipping', '<?=$suspend_sale->shipping;?>');
  1308. <?php }
  1309. ?>
  1310. <?php if ($old_sale) {?>
  1311. localStorage.setItem('postax2', '<?=$old_sale->order_tax_id;?>');
  1312. localStorage.setItem('posdiscount', '<?=$old_sale->order_discount_id;?>');
  1313. localStorage.setItem('poswarehouse', '<?=$old_sale->warehouse_id;?>');
  1314. localStorage.setItem('poscustomer', '<?=$old_sale->customer_id;?>');
  1315. localStorage.setItem('posbiller', '<?=$old_sale->biller_id;?>');
  1316. localStorage.setItem('posshipping', '<?=$old_sale->shipping;?>');
  1317. <?php }
  1318. ?>
  1319. <?php if ($this->input->get('customer')) {?>
  1320. if (!localStorage.getItem('positems')) {
  1321. localStorage.setItem('poscustomer', <?=$this->input->get('customer');?>);
  1322. } else if (!localStorage.getItem('poscustomer')) {
  1323. localStorage.setItem('poscustomer', <?=$customer->id;?>);
  1324. }
  1325. <?php } else {?>
  1326. if (!localStorage.getItem('poscustomer')) {
  1327. localStorage.setItem('poscustomer', <?=$customer->id;?>);
  1328. }
  1329. <?php }
  1330. ?>
  1331. if (!localStorage.getItem('postax2')) {
  1332. localStorage.setItem('postax2', <?=$Settings->default_tax_rate2;?>);
  1333. }
  1334. $('.select').select2({minimumResultsForSearch: 7});
  1335. // var customers = [{
  1336. // id: <?=$customer->id;?>,
  1337. // text: '<?=$customer->company == '-' ? $customer->name : $customer->company;?>'
  1338. // }];
  1339. $('#poscustomer').val(localStorage.getItem('poscustomer')).select2({
  1340. minimumInputLength: 1,
  1341. data: [],
  1342. initSelection: function (element, callback) {
  1343. $.ajax({
  1344. type: "get", async: false,
  1345. url: "<?=admin_url('customers/getCustomer')?>/" + $(element).val(),
  1346. dataType: "json",
  1347. success: function (data) {
  1348. callback(data[0]);
  1349. }
  1350. });
  1351. },
  1352. ajax: {
  1353. url: site.base_url + "customers/suggestions",
  1354. dataType: 'json',
  1355. quietMillis: 15,
  1356. data: function (term, page) {
  1357. return {
  1358. term: term,
  1359. limit: 10
  1360. };
  1361. },
  1362. results: function (data, page) {
  1363. if (data.results != null) {
  1364. return {results: data.results};
  1365. } else {
  1366. return {results: [{id: '', text: 'No Match Found'}]};
  1367. }
  1368. }
  1369. }
  1370. });
  1371. if (KB) {
  1372. display_keyboards();
  1373.  
  1374. var result = false, sct = '';
  1375. $('#poscustomer').on('select2-opening', function () {
  1376. sct = '';
  1377. $('.select2-input').addClass('kb-text');
  1378. display_keyboards();
  1379. $('.select2-input').bind('change.keyboard', function (e, keyboard, el) {
  1380. if (el && el.value != '' && el.value.length > 0 && sct != el.value) {
  1381. sct = el.value;
  1382. }
  1383. if(!el && sct.length > 0) {
  1384. $('.select2-input').addClass('select2-active');
  1385. setTimeout(function() {
  1386. $.ajax({
  1387. type: "get",
  1388. async: false,
  1389. url: "<?=admin_url('customers/suggestions')?>/?term=" + sct,
  1390. dataType: "json",
  1391. success: function (res) {
  1392. if (res.results != null) {
  1393. $('#poscustomer').select2({data: res}).select2('open');
  1394. $('.select2-input').removeClass('select2-active');
  1395. } else {
  1396. // bootbox.alert('no_match_found');
  1397. $('#poscustomer').select2('close');
  1398. $('#test').click();
  1399. }
  1400. }
  1401. });
  1402. }, 500);
  1403. }
  1404. });
  1405. });
  1406.  
  1407. $('#poscustomer').on('select2-close', function () {
  1408. $('.select2-input').removeClass('kb-text');
  1409. $('#test').click();
  1410. $('select, .select').select2('destroy');
  1411. $('select, .select').select2({minimumResultsForSearch: 7});
  1412. });
  1413. $(document).bind('click', '#test', function () {
  1414. var kb = $('#test').keyboard().getkeyboard();
  1415. kb.close();
  1416. });
  1417.  
  1418. }
  1419.  
  1420. $(document).on('change', '#posbiller', function () {
  1421. var sb = $(this).val();
  1422. $.each(billers, function () {
  1423. if(this.id == sb) {
  1424. biller = this;
  1425. }
  1426. });
  1427. $('#biller').val(sb);
  1428. });
  1429.  
  1430. <?php for ($i = 1; $i <= 5; $i++) {?>
  1431. $('#paymentModal').on('change', '#amount_<?=$i?>', function (e) {
  1432. $('#amount_val_<?=$i?>').val($(this).val());
  1433. });
  1434. $('#paymentModal').on('blur', '#amount_<?=$i?>', function (e) {
  1435. $('#amount_val_<?=$i?>').val($(this).val());
  1436. });
  1437. $('#paymentModal').on('select2-close', '#paid_by_<?=$i?>', function (e) {
  1438. $('#paid_by_val_<?=$i?>').val($(this).val());
  1439. });
  1440. $('#paymentModal').on('change', '#pcc_no_<?=$i?>', function (e) {
  1441. $('#cc_no_val_<?=$i?>').val($(this).val());
  1442. });
  1443. $('#paymentModal').on('change', '#pcc_holder_<?=$i?>', function (e) {
  1444. $('#cc_holder_val_<?=$i?>').val($(this).val());
  1445. });
  1446. $('#paymentModal').on('change', '#gift_card_no_<?=$i?>', function (e) {
  1447. $('#paying_gift_card_no_val_<?=$i?>').val($(this).val());
  1448. });
  1449. $('#paymentModal').on('change', '#pcc_month_<?=$i?>', function (e) {
  1450. $('#cc_month_val_<?=$i?>').val($(this).val());
  1451. });
  1452. $('#paymentModal').on('change', '#pcc_year_<?=$i?>', function (e) {
  1453. $('#cc_year_val_<?=$i?>').val($(this).val());
  1454. });
  1455. $('#paymentModal').on('change', '#pcc_type_<?=$i?>', function (e) {
  1456. $('#cc_type_val_<?=$i?>').val($(this).val());
  1457. });
  1458. $('#paymentModal').on('change', '#pcc_cvv2_<?=$i?>', function (e) {
  1459. $('#cc_cvv2_val_<?=$i?>').val($(this).val());
  1460. });
  1461. $('#paymentModal').on('change', '#cheque_no_<?=$i?>', function (e) {
  1462. $('#cheque_no_val_<?=$i?>').val($(this).val());
  1463. });
  1464. $('#paymentModal').on('change', '#payment_note_<?=$i?>', function (e) {
  1465. $('#payment_note_val_<?=$i?>').val($(this).val());
  1466. });
  1467. <?php }
  1468. ?>
  1469.  
  1470. $('#payment').click(function () {
  1471. <?php if ($sid) {?>
  1472. suspend = $('<span></span>');
  1473. suspend.html('<input type="hidden" name="delete_id" value="<?php echo $sid; ?>" />');
  1474. suspend.appendTo("#hidesuspend");
  1475. <?php }
  1476. ?>
  1477. var twt = formatDecimal((total + invoice_tax) - order_discount + shipping);
  1478. if (count == 1) {
  1479. bootbox.alert('<?=lang('x_total');?>');
  1480. return false;
  1481. }
  1482. gtotal = formatDecimal(twt);
  1483. <?php if ($pos_settings->rounding) {?>
  1484. round_total = roundNumber(gtotal, <?=$pos_settings->rounding?>);
  1485. var rounding = formatDecimal(0 - (gtotal - round_total));
  1486. $('#twt').text(formatMoney(round_total) + ' (' + formatMoney(rounding) + ')');
  1487. $('#quick-payable').text(round_total);
  1488. <?php } else {?>
  1489. $('#twt').text(formatMoney(gtotal));
  1490. $('#quick-payable').text(gtotal);
  1491. <?php }
  1492. ?>
  1493. $('#item_count').text(count - 1);
  1494. $('#paymentModal').appendTo("body").modal('show');
  1495. $('#amount_1').focus();
  1496. });
  1497. $('#paymentModal').on('show.bs.modal', function(e) {
  1498. $('#submit-sale').text('<?=lang('submit');?>').attr('disabled', false);
  1499. });
  1500. $('#paymentModal').on('shown.bs.modal', function(e) {
  1501. $('#amount_1').focus().val(0);
  1502. $('#quick-payable').click();
  1503. });
  1504. var pi = 'amount_1', pa = 2;
  1505. $(document).on('click', '.quick-cash', function () {
  1506. if ($('#quick-payable').find('span.badge').length) {
  1507. $('#clear-cash-notes').click();
  1508. }
  1509. var $quick_cash = $(this);
  1510. var amt = $quick_cash.contents().filter(function () {
  1511. return this.nodeType == 3;
  1512. }).text();
  1513. var th = ',';
  1514. var $pi = $('#' + pi);
  1515. amt = formatDecimal(amt.split(th).join("")) * 1 + $pi.val() * 1;
  1516. $pi.val(formatDecimal(amt)).focus();
  1517. var note_count = $quick_cash.find('span');
  1518. if (note_count.length == 0) {
  1519. $quick_cash.append('<span class="badge">1</span>');
  1520. } else {
  1521. note_count.text(parseInt(note_count.text()) + 1);
  1522. }
  1523. });
  1524. $(document).on('click', '#quick-payable', function () {
  1525. $('#clear-cash-notes').click();
  1526. $(this).append('<span class="badge">1</span>');
  1527. $('#amount_1').val(grand_total);
  1528. });
  1529. $(document).on('click', '#clear-cash-notes', function () {
  1530. $('.quick-cash').find('.badge').remove();
  1531. $('#' + pi).val('0').focus();
  1532. });
  1533.  
  1534. $(document).on('change', '.gift_card_no', function () {
  1535. var cn = $(this).val() ? $(this).val() : '';
  1536. var payid = $(this).attr('id'),
  1537. id = payid.substr(payid.length - 1);
  1538. if (cn != '') {
  1539. $.ajax({
  1540. type: "get", async: false,
  1541. url: site.base_url + "sales/validate_gift_card/" + cn,
  1542. dataType: "json",
  1543. success: function (data) {
  1544. if (data === false) {
  1545. $('#gift_card_no_' + id).parent('.form-group').addClass('has-error');
  1546. bootbox.alert('<?=lang('incorrect_gift_card')?>');
  1547. } else if (data.customer_id !== null && data.customer_id !== $('#poscustomer').val()) {
  1548. $('#gift_card_no_' + id).parent('.form-group').addClass('has-error');
  1549. bootbox.alert('<?=lang('gift_card_not_for_customer')?>');
  1550. } else {
  1551. $('#gc_details_' + id).html('<small>Card No: ' + data.card_no + '<br>Value: ' + data.value + ' - Balance: ' + data.balance + '</small>');
  1552. $('#gift_card_no_' + id).parent('.form-group').removeClass('has-error');
  1553. //calculateTotals();
  1554. $('#amount_' + id).val(gtotal >= data.balance ? data.balance : gtotal).focus();
  1555. }
  1556. }
  1557. });
  1558. }
  1559. });
  1560.  
  1561. $(document).on('click', '.addButton', function () {
  1562. if (pa <= 5) {
  1563. $('#paid_by_1, #pcc_type_1').select2('destroy');
  1564. var phtml = $('#payments').html(),
  1565. update_html = phtml.replace(/_1/g, '_' + pa);
  1566. pi = 'amount_' + pa;
  1567. $('#multi-payment').append('<button type="button" class="close close-payment" style="margin: -10px 0px 0 0;"><i class="fa fa-2x">&times;</i></button>' + update_html);
  1568. $('#paid_by_1, #pcc_type_1, #paid_by_' + pa + ', #pcc_type_' + pa).select2({minimumResultsForSearch: 7});
  1569. read_card();
  1570. pa++;
  1571. } else {
  1572. bootbox.alert('<?=lang('max_reached')?>');
  1573. return false;
  1574. }
  1575. if (KB) { display_keyboards(); }
  1576. $('#paymentModal').css('overflow-y', 'scroll');
  1577. });
  1578.  
  1579. $(document).on('click', '.close-payment', function () {
  1580. $(this).next().remove();
  1581. $(this).remove();
  1582. pa--;
  1583. });
  1584.  
  1585. $(document).on('focus', '.amount', function () {
  1586. pi = $(this).attr('id');
  1587. calculateTotals();
  1588. }).on('blur', '.amount', function () {
  1589. calculateTotals();
  1590. });
  1591.  
  1592. function calculateTotals() {
  1593. var total_paying = 0;
  1594. var ia = $(".amount");
  1595. $.each(ia, function (i) {
  1596. var this_amount = formatCNum($(this).val() ? $(this).val() : 0);
  1597. total_paying += parseFloat(this_amount);
  1598. });
  1599. $('#total_paying').text(formatMoney(total_paying));
  1600. <?php if ($pos_settings->rounding) {?>
  1601. $('#balance').text(formatMoney(total_paying - round_total));
  1602. $('#balance_' + pi).val(formatDecimal(total_paying - round_total));
  1603. total_paid = total_paying;
  1604. grand_total = round_total;
  1605. <?php } else {?>
  1606. $('#balance').text(formatMoney(total_paying - gtotal));
  1607. $('#balance_' + pi).val(formatDecimal(total_paying - gtotal));
  1608. total_paid = total_paying;
  1609. grand_total = gtotal;
  1610. <?php }
  1611. ?>
  1612. }
  1613.  
  1614. $("#add_item").autocomplete({
  1615. source: function (request, response) {
  1616. if (!$('#poscustomer').val()) {
  1617. $('#add_item').val('').removeClass('ui-autocomplete-loading');
  1618. bootbox.alert('<?=lang('select_above');?>');
  1619. //response('');
  1620. $('#add_item').focus();
  1621. return false;
  1622. }
  1623. $.ajax({
  1624. type: 'get',
  1625. url: '<?=admin_url('sales/suggestions');?>',
  1626. dataType: "json",
  1627. data: {
  1628. term: request.term,
  1629. warehouse_id: $("#poswarehouse").val(),
  1630. customer_id: $("#poscustomer").val()
  1631. },
  1632. success: function (data) {
  1633. $(this).removeClass('ui-autocomplete-loading');
  1634. response(data);
  1635. }
  1636. });
  1637. },
  1638. minLength: 1,
  1639. autoFocus: false,
  1640. delay: 250,
  1641. response: function (event, ui) {
  1642. if ($(this).val().length >= 16 && ui.content[0].id == 0) {
  1643. bootbox.alert('<?=lang('no_match_found')?>', function () {
  1644. $('#add_item').focus();
  1645. });
  1646. $(this).val('');
  1647. }
  1648. else if (ui.content.length == 1 && ui.content[0].id != 0) {
  1649. ui.item = ui.content[0];
  1650. $(this).data('ui-autocomplete')._trigger('select', 'autocompleteselect', ui);
  1651. $(this).autocomplete('close');
  1652. }
  1653. else if (ui.content.length == 1 && ui.content[0].id == 0) {
  1654. bootbox.alert('<?=lang('no_match_found')?>', function () {
  1655. $('#add_item').focus();
  1656. });
  1657. $(this).val('');
  1658.  
  1659. }
  1660. },
  1661. select: function (event, ui) {
  1662. event.preventDefault();
  1663. if (ui.item.id !== 0) {
  1664. var row = add_invoice_item(ui.item);
  1665. if (row)
  1666. $(this).val('');
  1667. } else {
  1668. bootbox.alert('<?=lang('no_match_found')?>');
  1669. }
  1670. }
  1671. });
  1672.  
  1673. <?php if ($pos_settings->tooltips) {echo '$(".pos-tip").tooltip();';}
  1674. ?>
  1675. // $('#posTable').stickyTableHeaders({fixedOffset: $('#product-list')});
  1676. $('#posTable').stickyTableHeaders({scrollableArea: $('#product-list')});
  1677. $('#product-list, #category-list, #subcategory-list, #brands-list').perfectScrollbar({suppressScrollX: true});
  1678. $('select, .select').select2({minimumResultsForSearch: 7});
  1679.  
  1680. $(document).on('click', '.product', function (e) {
  1681. $('#modal-loading').show();
  1682. code = $(this).val(),
  1683. wh = $('#poswarehouse').val(),
  1684. cu = $('#poscustomer').val();
  1685. $.ajax({
  1686. type: "get",
  1687. url: "<?=admin_url('pos/getProductDataByCode')?>",
  1688. data: {code: code, warehouse_id: wh, customer_id: cu},
  1689. dataType: "json",
  1690. success: function (data) {
  1691. e.preventDefault();
  1692. if (data !== null) {
  1693. add_invoice_item(data);
  1694. $('#modal-loading').hide();
  1695. } else {
  1696. bootbox.alert('<?=lang('no_match_found')?>');
  1697. $('#modal-loading').hide();
  1698. }
  1699. }
  1700. });
  1701. });
  1702.  
  1703. $(document).on('click', '.category', function () {
  1704. if (cat_id != $(this).val()) {
  1705. $('#open-category').click();
  1706. $('#modal-loading').show();
  1707. cat_id = $(this).val();
  1708. $.ajax({
  1709. type: "get",
  1710. url: "<?=admin_url('pos/ajaxcategorydata');?>",
  1711. data: {category_id: cat_id},
  1712. dataType: "json",
  1713. success: function (data) {
  1714. $('#item-list').empty();
  1715. var newPrs = $('<div></div>');
  1716. newPrs.html(data.products);
  1717. newPrs.appendTo("#item-list");
  1718. $('#subcategory-list').empty();
  1719. var newScs = $('<div></div>');
  1720. newScs.html(data.subcategories);
  1721. newScs.appendTo("#subcategory-list");
  1722. tcp = data.tcp;
  1723. nav_pointer();
  1724. }
  1725. }).done(function () {
  1726. p_page = 'n';
  1727. $('#category-' + cat_id).addClass('active');
  1728. $('#category-' + ocat_id).removeClass('active');
  1729. ocat_id = cat_id;
  1730. $('#modal-loading').hide();
  1731. nav_pointer();
  1732. });
  1733. }
  1734. });
  1735. $('#category-' + cat_id).addClass('active');
  1736.  
  1737. $(document).on('click', '.brand', function () {
  1738. if (brand_id != $(this).val()) {
  1739. $('#open-brands').click();
  1740. $('#modal-loading').show();
  1741. brand_id = $(this).val();
  1742. $.ajax({
  1743. type: "get",
  1744. url: "<?=admin_url('pos/ajaxbranddata');?>",
  1745. data: {brand_id: brand_id},
  1746. dataType: "json",
  1747. success: function (data) {
  1748. $('#item-list').empty();
  1749. var newPrs = $('<div></div>');
  1750. newPrs.html(data.products);
  1751. newPrs.appendTo("#item-list");
  1752. tcp = data.tcp;
  1753. nav_pointer();
  1754. }
  1755. }).done(function () {
  1756. p_page = 'n';
  1757. $('#brand-' + brand_id).addClass('active');
  1758. $('#brand-' + obrand_id).removeClass('active');
  1759. obrand_id = brand_id;
  1760. $('#category-' + cat_id).removeClass('active');
  1761. $('#subcategory-' + sub_cat_id).removeClass('active');
  1762. cat_id = 0; sub_cat_id = 0;
  1763. $('#modal-loading').hide();
  1764. nav_pointer();
  1765. });
  1766. }
  1767. });
  1768.  
  1769. $(document).on('click', '.subcategory', function () {
  1770. if (sub_cat_id != $(this).val()) {
  1771. $('#open-subcategory').click();
  1772. $('#modal-loading').show();
  1773. sub_cat_id = $(this).val();
  1774. $.ajax({
  1775. type: "get",
  1776. url: "<?=admin_url('pos/ajaxproducts');?>",
  1777. data: {category_id: cat_id, subcategory_id: sub_cat_id, per_page: p_page != 0 ? p_page : 'n' },
  1778. dataType: "html",
  1779. success: function (data) {
  1780. $('#item-list').empty();
  1781. var newPrs = $('<div></div>');
  1782. newPrs.html(data);
  1783. newPrs.appendTo("#item-list");
  1784. }
  1785. }).done(function () {
  1786. p_page = 'n';
  1787. $('#subcategory-' + sub_cat_id).addClass('active');
  1788. $('#subcategory-' + osub_cat_id).removeClass('active');
  1789. $('#modal-loading').hide();
  1790. });
  1791. }
  1792. });
  1793.  
  1794.  
  1795. $('#next').click(function () {
  1796. if (p_page == 'n') {
  1797. p_page = 0
  1798. }
  1799. p_page = p_page + pro_limit;
  1800. if (tcp >= pro_limit && p_page < tcp) {
  1801. $('#modal-loading').show();
  1802. $.ajax({
  1803. type: "get",
  1804. url: "<?=admin_url('pos/ajaxproducts');?>",
  1805. data: {category_id: cat_id, subcategory_id: sub_cat_id, per_page: p_page != 0 ? p_page : 'n'},
  1806. dataType: "html",
  1807. success: function (data) {
  1808. $('#item-list').empty();
  1809. var newPrs = $('<div></div>');
  1810. newPrs.html(data);
  1811. newPrs.appendTo("#item-list");
  1812. nav_pointer();
  1813. }
  1814. }).done(function () {
  1815. $('#modal-loading').hide();
  1816. });
  1817. } else {
  1818. p_page = p_page - pro_limit;
  1819. }
  1820. });
  1821.  
  1822. $('#previous').click(function () {
  1823. if (p_page == 'n') {
  1824. p_page = 0;
  1825. }
  1826. if (p_page != 0) {
  1827. $('#modal-loading').show();
  1828. p_page = p_page - pro_limit;
  1829. if (p_page == 0) {
  1830. p_page = 'n'
  1831. }
  1832. $.ajax({
  1833. type: "get",
  1834. url: "<?=admin_url('pos/ajaxproducts');?>",
  1835. data: {category_id: cat_id, subcategory_id: sub_cat_id, per_page: p_page != 0 ? p_page : 'n'},
  1836. dataType: "html",
  1837. success: function (data) {
  1838. $('#item-list').empty();
  1839. var newPrs = $('<div></div>');
  1840. newPrs.html(data);
  1841. newPrs.appendTo("#item-list");
  1842. nav_pointer();
  1843. }
  1844.  
  1845. }).done(function () {
  1846. $('#modal-loading').hide();
  1847. });
  1848. }
  1849. });
  1850.  
  1851. $(document).on('change', '.paid_by', function () {
  1852. $('#clear-cash-notes').click();
  1853. $('#amount_1').val(grand_total);
  1854. var p_val = $(this).val(),
  1855. id = $(this).attr('id'),
  1856. pa_no = id.substr(id.length - 1);
  1857. $('#rpaidby').val(p_val);
  1858. if (p_val == 'cash' || p_val == 'other') {
  1859. $('.pcheque_' + pa_no).hide();
  1860. $('.pcc_' + pa_no).hide();
  1861. $('.pcash_' + pa_no).show();
  1862. $('#amount_' + pa_no).focus();
  1863. } else if (p_val == 'CC' || p_val == 'stripe' || p_val == 'ppp' || p_val == 'authorize') {
  1864. $('.pcheque_' + pa_no).hide();
  1865. $('.pcash_' + pa_no).hide();
  1866. $('.pcc_' + pa_no).show();
  1867. $('#swipe_' + pa_no).focus();
  1868. } else if (p_val == 'Cheque') {
  1869. $('.pcc_' + pa_no).hide();
  1870. $('.pcash_' + pa_no).hide();
  1871. $('.pcheque_' + pa_no).show();
  1872. $('#cheque_no_' + pa_no).focus();
  1873. } else {
  1874. $('.pcheque_' + pa_no).hide();
  1875. $('.pcc_' + pa_no).hide();
  1876. $('.pcash_' + pa_no).hide();
  1877. }
  1878. if (p_val == 'gift_card') {
  1879. $('.gc_' + pa_no).show();
  1880. $('.ngc_' + pa_no).hide();
  1881. $('#gift_card_no_' + pa_no).focus();
  1882. } else {
  1883. $('.ngc_' + pa_no).show();
  1884. $('.gc_' + pa_no).hide();
  1885. $('#gc_details_' + pa_no).html('');
  1886. }
  1887. });
  1888.  
  1889. $(document).on('click', '#submit-sale', function () {
  1890. if (total_paid == 0 || total_paid < grand_total) {
  1891. bootbox.confirm("<?=lang('paid_l_t_payable');?>", function (res) {
  1892. if (res == true) {
  1893. $('#pos_note').val(localStorage.getItem('posnote'));
  1894. $('#staff_note').val(localStorage.getItem('staffnote'));
  1895. $('#submit-sale').text('<?=lang('loading');?>').attr('disabled', true);
  1896. $('#pos-sale-form').submit();
  1897. }
  1898. });
  1899. return false;
  1900. } else {
  1901. $('#pos_note').val(localStorage.getItem('posnote'));
  1902. $('#staff_note').val(localStorage.getItem('staffnote'));
  1903. $(this).text('<?=lang('loading');?>').attr('disabled', true);
  1904. $('#pos-sale-form').submit();
  1905. }
  1906. });
  1907. $('#suspend').click(function () {
  1908. if (count <= 1) {
  1909. bootbox.alert('<?=lang('x_suspend');?>');
  1910. return false;
  1911. } else {
  1912. $('#susModal').modal();
  1913. }
  1914. });
  1915. $('#suspend_sale').click(function () {
  1916. ref = $('#reference_note').val();
  1917. if (!ref || ref == '') {
  1918. bootbox.alert('<?=lang('type_reference_note');?>');
  1919. return false;
  1920. } else {
  1921. suspend = $('<span></span>');
  1922. <?php if ($sid) {?>
  1923. suspend.html('<input type="hidden" name="delete_id" value="<?php echo $sid; ?>" /><input type="hidden" name="suspend" value="yes" /><input type="hidden" name="suspend_note" value="' + ref + '" />');
  1924. <?php } else {?>
  1925. suspend.html('<input type="hidden" name="suspend" value="yes" /><input type="hidden" name="suspend_note" value="' + ref + '" />');
  1926. <?php }
  1927. ?>
  1928. suspend.appendTo("#hidesuspend");
  1929. $('#total_items').val(count - 1);
  1930. $('#pos-sale-form').submit();
  1931.  
  1932. }
  1933. });
  1934. });
  1935.  
  1936. $(document).ready(function () {
  1937. $('#print_order').click(function () {
  1938. if (count == 1) {
  1939. bootbox.alert('<?=lang('x_total');?>');
  1940. return false;
  1941. }
  1942. <?php if ($pos_settings->remote_printing != 1) { ?>
  1943. printOrder();
  1944. <?php } else { ?>
  1945. Popup($('#order_tbl').html());
  1946. <?php } ?>
  1947. });
  1948. $('#print_bill').click(function () {
  1949. if (count == 1) {
  1950. bootbox.alert('<?=lang('x_total');?>');
  1951. return false;
  1952. }
  1953. <?php if ($pos_settings->remote_printing != 1) { ?>
  1954. printBill();
  1955. <?php } else { ?>
  1956. Popup($('#bill_tbl').html());
  1957. <?php } ?>
  1958. });
  1959. });
  1960.  
  1961. $(function () {
  1962. $(".alert").effect("shake");
  1963. setTimeout(function () {
  1964. $(".alert").hide('blind', {}, 500)
  1965. }, 15000);
  1966. <?php if ($pos_settings->display_time) {?>
  1967. var now = new moment();
  1968. $('#display_time').text(now.format((site.dateFormats.js_sdate).toUpperCase() + " HH:mm"));
  1969. setInterval(function () {
  1970. var now = new moment();
  1971. $('#display_time').text(now.format((site.dateFormats.js_sdate).toUpperCase() + " HH:mm"));
  1972. }, 1000);
  1973. <?php }
  1974. ?>
  1975. });
  1976. <?php if ($pos_settings->remote_printing == 1) { ?>
  1977. function Popup(data) {
  1978. var mywindow = window.open('', 'sma_pos_print', 'height=500,width=300');
  1979. mywindow.document.write('<html><head><title>Print</title>');
  1980. mywindow.document.write('<link rel="stylesheet" href="<?=$assets?>styles/helpers/bootstrap.min.css" type="text/css" />');
  1981. mywindow.document.write('</head><body >');
  1982. mywindow.document.write(data);
  1983. mywindow.document.write('</body></html>');
  1984. mywindow.print();
  1985. mywindow.close();
  1986. return true;
  1987. }
  1988. <?php }
  1989. ?>
  1990. </script>
  1991. <?php
  1992. $s2_lang_file = read_file('./assets/config_dumps/s2_lang.js');
  1993. foreach (lang('select2_lang') as $s2_key => $s2_line) {
  1994. $s2_data[$s2_key] = str_replace(array('{', '}'), array('"+', '+"'), $s2_line);
  1995. }
  1996. $s2_file_date = $this->parser->parse_string($s2_lang_file, $s2_data, true);
  1997. ?>
  1998. <script type="text/javascript" src="<?=$assets?>js/bootstrap.min.js"></script>
  1999. <script type="text/javascript" src="<?=$assets?>js/jquery-ui.min.js"></script>
  2000. <script type="text/javascript" src="<?=$assets?>js/perfect-scrollbar.min.js"></script>
  2001. <script type="text/javascript" src="<?=$assets?>js/select2.min.js"></script>
  2002. <script type="text/javascript" src="<?=$assets?>js/jquery.dataTables.min.js"></script>
  2003. <script type="text/javascript" src="<?=$assets?>js/custom.js"></script>
  2004. <script type="text/javascript" src="<?=$assets?>js/jquery.calculator.min.js"></script>
  2005. <script type="text/javascript" src="<?=$assets?>js/bootstrapValidator.min.js"></script>
  2006. <script type="text/javascript" src="<?=$assets?>pos/js/plugins.min.js"></script>
  2007. <script type="text/javascript" src="<?=$assets?>pos/js/parse-track-data.js"></script>
  2008. <script type="text/javascript" src="<?=$assets?>pos/js/pos.ajax.js"></script>
  2009. <?php
  2010. if ( ! $pos_settings->remote_printing) {
  2011. ?>
  2012. <script type="text/javascript">
  2013. var order_printers = <?= json_encode($order_printers); ?>;
  2014. function printOrder() {
  2015. $.each(order_printers, function() {
  2016. var socket_data = { 'printer': this,
  2017. 'logo': (biller && biller.logo ? biller.logo : ''),
  2018. 'text': order_data };
  2019. $.get('<?= admin_url('pos/p/order'); ?>', {data: JSON.stringify(socket_data)});
  2020. });
  2021. return false;
  2022. }
  2023.  
  2024. function printBill() {
  2025. var socket_data = {
  2026. 'printer': <?= json_encode($printer); ?>,
  2027. 'logo': (biller && biller.logo ? biller.logo : ''),
  2028. 'text': bill_data
  2029. };
  2030. $.get('<?= admin_url('pos/p'); ?>', {data: JSON.stringify(socket_data)});
  2031. return false;
  2032. }
  2033. </script>
  2034. <?php
  2035. } elseif ($pos_settings->remote_printing == 2) {
  2036. ?>
  2037. <script src="<?= $assets ?>js/socket.io.min.js" type="text/javascript"></script>
  2038. <script type="text/javascript">
  2039. socket = io.connect('http://localhost:6440', {'reconnection': false});
  2040.  
  2041. function printBill() {
  2042. if (socket.connected) {
  2043. var socket_data = {'printer': <?= json_encode($printer); ?>, 'text': bill_data};
  2044. socket.emit('print-now', socket_data);
  2045. return false;
  2046. } else {
  2047. bootbox.alert('<?= lang('pos_print_error'); ?>');
  2048. return false;
  2049. }
  2050. }
  2051.  
  2052. var order_printers = <?= json_encode($order_printers); ?>;
  2053. function printOrder() {
  2054. if (socket.connected) {
  2055. $.each(order_printers, function() {
  2056. var socket_data = {'printer': this, 'text': order_data};
  2057. socket.emit('print-now', socket_data);
  2058. });
  2059. return false;
  2060. } else {
  2061. bootbox.alert('<?= lang('pos_print_error'); ?>');
  2062. return false;
  2063. }
  2064. }
  2065. </script>
  2066. <?php
  2067.  
  2068. } elseif ($pos_settings->remote_printing == 3) {
  2069.  
  2070. ?>
  2071. <script type="text/javascript">
  2072. try {
  2073. socket = new WebSocket('ws://127.0.0.1:6441');
  2074. socket.onopen = function () {
  2075. console.log('Connected');
  2076. return;
  2077. };
  2078. socket.onclose = function () {
  2079. console.log('Not Connected');
  2080. return;
  2081. };
  2082. } catch (e) {
  2083. console.log(e);
  2084. }
  2085.  
  2086. var order_printers = <?= $pos_settings->local_printers ? "''" : json_encode($order_printers); ?>;
  2087. function printOrder() {
  2088. if (socket.readyState == 1) {
  2089.  
  2090. if (order_printers == '') {
  2091.  
  2092. var socket_data = { 'printer': false, 'order': true,
  2093. 'logo': (biller && biller.logo ? site.url+'assets/uploads/logos/'+biller.logo : ''),
  2094. 'text': order_data };
  2095. socket.send(JSON.stringify({type: 'print-receipt', data: socket_data}));
  2096.  
  2097. } else {
  2098.  
  2099. $.each(order_printers, function() {
  2100. var socket_data = { 'printer': this,
  2101. 'logo': (biller && biller.logo ? site.url+'assets/uploads/logos/'+biller.logo : ''),
  2102. 'text': order_data };
  2103. socket.send(JSON.stringify({type: 'print-receipt', data: socket_data}));
  2104. });
  2105.  
  2106. }
  2107. return false;
  2108. } else {
  2109. bootbox.alert('<?= lang('pos_print_error'); ?>');
  2110. return false;
  2111. }
  2112. }
  2113.  
  2114. function printBill() {
  2115. if (socket.readyState == 1) {
  2116. var socket_data = {
  2117. 'printer': <?= $pos_settings->local_printers ? "''" : json_encode($printer); ?>,
  2118. 'logo': (biller && biller.logo ? site.url+'assets/uploads/logos/'+biller.logo : ''),
  2119. 'text': bill_data
  2120. };
  2121. socket.send(JSON.stringify({type: 'print-receipt', data: socket_data}));
  2122. return false;
  2123. } else {
  2124. bootbox.alert('<?= lang('pos_print_error'); ?>');
  2125. return false;
  2126. }
  2127. }
  2128. </script>
  2129. <?php
  2130. }
  2131. ?>
  2132. <script type="text/javascript">
  2133. $('.sortable_table tbody').sortable({
  2134. containerSelector: 'tr'
  2135. });
  2136. </script>
  2137. <script type="text/javascript" charset="UTF-8"><?=$s2_file_date?></script>
  2138. <div id="ajaxCall"><i class="fa fa-spinner fa-pulse"></i></div>
  2139. <?php
  2140. if (isset($print) && !empty($print)) {
  2141. /* include FCPATH.'themes'.DIRECTORY_SEPARATOR.$Settings->theme.DIRECTORY_SEPARATOR.'views'.DIRECTORY_SEPARATOR.'pos'.DIRECTORY_SEPARATOR.'remote_printing.php'; */
  2142. include 'remote_printing.php';
  2143. }
  2144. ?>
  2145. </body>
  2146. </html>
Add Comment
Please, Sign In to add comment