fadlyshafa

Untitled

Jun 17th, 2020
60
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. defined('BASEPATH') OR exit('No direct script access allowed');
  3. $p = array('1','21','22','51','52');
  4. if(!(in_array($this->session->userdata('type'),$p))){
  5. redirect('auth/dashboard');
  6. }
  7. $this->load->view('layout/header');
  8. ?>
  9. <!-- Content Wrapper. Contains page content -->
  10. <div class="content-wrapper">
  11. <!-- Content Header (Page header) -->
  12. <section class="content-header">
  13. <h5>
  14. <ol class="breadcrumb">
  15. <li><a href="<?php echo base_url('auth/dashboard'); ?>"><i class="fa fa-dashboard"></i> <?php echo $this->lang->line('header_dashboard'); ?></a></li>
  16. <li><a href="<?php echo base_url('sales'); ?>"><?php echo $this->lang->line('header_sales'); ?></a></li>
  17. <li class="active"><?php echo 'Edit Sales'; ?></li>
  18. </ol>
  19. </h5>
  20. </section>
  21. <!-- Main content -->
  22. <section class="content">
  23. <div class="row">
  24. <!-- right column -->
  25. <div class="col-sm-12">
  26. <div class="box">
  27. <div class="box-header with-border">
  28. <h3 class="box-title"><?php echo $this->lang->line('sales_edit_sales'); ?></h3>
  29. </div>
  30. <!-- /.box-header -->
  31. <div class="box-body">
  32. <div class="row">
  33. <form role="form" id="form" method="post" action="<?php echo base_url('sales/editSales'); ?>">
  34. <?php
  35. foreach ($data as $row) {
  36. $diskon = $row->diskon;
  37. $diskonpersen = $row->diskonpersen;
  38. $datawarehouse_id = $row->warehouse_id;
  39. $shipping = $row->shipping_charge;
  40. $snote = $row->note;
  41. $sinternal_note = $row->internal_note;
  42. $sterm_and_condition = $row->term_and_condition;
  43. ?>
  44. <input type="hidden" name="sales_id" value="<?php echo $row->sales_id; ?>">
  45.  
  46. <div class="col-sm-6">
  47. <div class="form-group">
  48. <?php if ($data[0]->status_rev == 3) { ?>
  49.  
  50. <p class="alert alert-warning">
  51. Keterangan Di Tolak : <?= $data[0]->revisitolak ?>
  52. </p>
  53. <?php } ?>
  54. </div>
  55.  
  56. <div class="form-group">
  57. <label for="medrep">MedRep<span class="validation-color">*</span></label>
  58. <select class="form-control select2" id="medrep" name="biller_id" style="width: 100%;">
  59. <option value=""><?php echo $this->lang->line('product_select'); ?></option>
  60. <?php
  61. foreach ($biller as $biller_row) {
  62. echo "<option value='$biller_row->biller_id'>$biller_row->biller_name</option>";
  63. }
  64. ?>
  65. </select>
  66. <span class="validation-color" id="err_customer"><?php echo form_error('customer'); ?></span>
  67. </div>
  68.  
  69. <div class="form-group">
  70. <label for="so">Sales Order Number : <span class="validation-color">*</span></label>
  71. <input type="text" class="form-control" id="sales_order" name="so" value="<?= $row->po; ?>">
  72. <span class="validation-color" id="err_so"><?php echo form_error('so'); ?></span>
  73. </div>
  74.  
  75. <div class="form-group">
  76. <label for="ketnama">Nomor Revisi :</label>
  77. <input disabled="" type="text" class="form-control" id="so_new" name="so_new" value="<?= $row->po_new; ?>">
  78. </div>
  79.  
  80. <div class="form-group">
  81. <label for="sales_date">Sales Order Date : <span class="validation-color">*</span></label>
  82. <input type="text" class="form-control datepicker" id="sales_date" name="sales_date" value="<?= date("Y-m-d", strtotime($data[0]->currentdate)) ?>">
  83. <span class="validation-color" id="err_salesdate"><?php echo form_error('sales_date'); ?></span>
  84. </div>
  85.  
  86. <div class="form-group">
  87. <label for="customer"><?php echo $this->lang->line('sales_select_customer'); ?> <span class="validation-color">*</span></label>
  88. <select class="form-control select2" id="customer" name="customer" style="width: 100%;">
  89. <option value=""><?php echo $this->lang->line('product_select'); ?></option>
  90. <?php
  91. foreach ($customer as $customer_row) {
  92. echo "<option value='$customer_row->customer_id'>$customer_row->customer_name</option>";
  93. }
  94. ?>
  95. </select>
  96. <a href="" data-toggle="modal" data-target="#myModal">Add New Customer</a>
  97. <span class="validation-color" id="err_customer"><?php echo form_error('customer'); ?></span>
  98. </div>
  99.  
  100. <div class="form-group">
  101. <label for="validdate">Reference :</label>
  102. <input type="text" class="form-control" id="reference" name="reference" value="<?= $row->ketnama ?>">
  103. </div>
  104.  
  105. <div class="form-group">
  106. <label for="selectmultiple">Jenis Quotation</label>
  107. <select class="form-control select2" name="selectmultiple" id="selectmultiple" style="width: 100%;">
  108. <option value="1">Single</option>
  109. <option value="0">Multiple</option>
  110. </select>
  111. </div>
  112.  
  113. <div class="form-group single" style="display: none;">
  114. <label for="reference_no">Quotation Number : <span class="validation-color">*</span></label>
  115. <select class="form-control select2" id="single-input" name="reference_no[]" style="width: 100%;">
  116.  
  117. </select>
  118. <span class="validation-color" id="err_category"><?php echo form_error('category'); ?></span>
  119. </div>
  120.  
  121. <div class="form-group multiple" style="display: none;">
  122. <label for="reference_no">Quotation Number : <span class="validation-color">*</span></label>
  123. <select class="form-control select2" multiple id="multiple-input" name="reference_no[]" style="width: 100%;">
  124.  
  125. </select>
  126. <span class="validation-color" id="err_category"><?php echo form_error('category'); ?></span>
  127. </div>
  128.  
  129. <div class="form-group" id="preference_no">
  130. <label for="reference_no">Quotation Number : <span class="validation-color">*</span></label>
  131. <select disabled="" class="form-control select2" multiple="multiple" id="reference_no" name="reference_no[]" style="width: 100%;">
  132. </select>
  133. </div>
  134.  
  135. <div class="form-group">
  136. <label for="po_cust">PO Customer : <span class="validation-color">*</span></label>
  137. <input type="text" name="po_cust" class="form-control" value="<?php echo $row->po_cust; ?>">
  138. </div>
  139.  
  140. <div class="form-group">
  141. <label for="date">PO Customer Date :</label>
  142. <input type="text" class="form-control datepicker" id="cust_date" name="cust_date" value="<?= date("Y-m-d", strtotime($data[0]->date)) ?>" >
  143. </div>
  144.  
  145.  
  146. <div class="form-group">
  147. <label for="dateestimate">Due Date :</label>
  148. <input type="text" class="form-control datepicker" id="dateestimate" name="dateestimate" value="<?= date("Y-m-d", strtotime($data[0]->dateestimate)) ?>">
  149. </div>
  150.  
  151. <div class="form-group">
  152. <label for="quotaattn">Quotation ATTN to :</label>
  153. <div class="row">
  154. <div class="col-md-6">
  155. <label for="main">Main</label>
  156. <input type="text" class="form-control" name="main" value="<?= $row->upcc ?>">
  157. </div>
  158. <div class="col-md-6">
  159. <label for="cc">CC</label>
  160. <input type="text" class="form-control" name="cc" value="<?= $row->upcc2 ?>">
  161. </div>
  162. </div>
  163. </div>
  164.  
  165. <div class="form-group">
  166. <label for="tax">Tax : </label>
  167. <select name="tax" class="form-control">
  168. <option value='1' <?= $row->ATTN == 1 ? "selected='selected'" : ''; ?>>Tax Include</option>
  169. <option value='2' <?= $row->ATTN == 2 ? "selected='selected'" : ''; ?>>Tax Exclude</option>
  170. <option value='0' <?= $row->ATTN == 0 ? "selected='selected'" : ''; ?>>No-Tax</option>
  171. </select>
  172. </div>
  173.  
  174. <div class="form-group">
  175. <label for="paymenterms">Payment Terms : <span class="validation-color">*</span></label>
  176. <div class="row">
  177. <div class="col-md-12">
  178. <label class="radio-inline">
  179. <input type="radio" name="paymenterms" value="advance" onclick="showo1()" checked> Advance
  180. </label>
  181. <label class="radio-inline">
  182. <input type="radio" name="paymenterms" value="termin" onclick="showo2()"> Termin
  183. </label>
  184. <label class="radio-inline">
  185. <input type="radio" name="paymenterms" value="others" onclick="showo3()"> Others
  186. </label>
  187. </div>
  188. </div>
  189. <div id="divo1" style="display: none;">
  190. </div>
  191. <div id="divo3" style="display: none;">
  192. <input type="text" class="form-control" id="others" name="others" value="<?= $row->salesdesc ?>">
  193. </div>
  194. <div id="divo2" style="display: none;position: relative;top: 7px">
  195. <label class="control-label nopadding">Jumlah Termin Kredit</label>
  196. <div class="input-group">
  197. <select id="terminnumber" name="terminnumber" onclick="addFields()" class="form-control" >
  198. <?php
  199. for ($i = 1; $i <= 100; $i++) {
  200. $selected = (count($termin) == $i) ? 'selected ' : '';
  201. echo "<option " . $selected . "value='" . $i . "'>" . $i . "</option>";
  202. }
  203. ?>
  204. </select>
  205. </div>
  206. </div>
  207. <br>
  208. <br>
  209. <div id="termincontainer">
  210. </div>
  211. </div>
  212.  
  213. <div class="form-group">
  214. <label for="kursdata"><?php echo "Kurs"; ?> <span class="validation-color">*</span></label>
  215. <select class="form-control" id="kursdata" name="kursdata">
  216. <?php
  217. foreach ($kursdata as $kursd) { ?>
  218. <option value='<?= $kursd->kurs_id ?>' <?= ($row->kurs_id == $kursd->kurs_id) ? "selected='selected'" : "" ;?>><?= $kursd->kurs ?></option>
  219. <?php } ?>
  220. </select>
  221. </div>
  222.  
  223. <div class="form-group">
  224.  
  225.  
  226. <div id="divc1" style="display: block;">
  227. <div class="col s12" style="position: relative;top: 38px;">
  228. <label class="control-label nopadding"></label>
  229. <div class="input-group" style="position: relative;bottom: 2px;" class="form-control" >
  230.  
  231. </div>
  232. </div>
  233. </div>
  234.  
  235. <div id="divc2" style="display: none;">
  236. <div class="col s12" style="position: relative;top: 38px;">
  237. <label class="control-label nopadding">Multiple Kurs</label>
  238. <div class="input-group" style="position: relative;bottom: 2px;">
  239.  
  240. <select id="kursid2" name="kursid2[]" multiple="multiple" onkeyup="addKursFields()" onchange="addKursFields()" class="form-control" >
  241. <?php
  242. foreach ($kursdata as $kursd) {
  243. echo "<option value='" . $kursd->kurs_id . "'>" . $kursd->kurs . "</option>";
  244. }
  245. ?>
  246. </select>
  247. </div>
  248. </div>
  249. </div>
  250.  
  251. <br>
  252. <br>
  253.  
  254. <div class="col s12" id="kurscontainer" name="kurscontainer" style="margin-top:30px;">
  255.  
  256. </div>
  257.  
  258. <br>
  259. <br>
  260. </div>
  261.  
  262. <div class="form-group">
  263. <input type="checkbox" name="transporter" id="transporter" onchange="transport()"> <label> Enable Transport Details</label>
  264. </div>
  265.  
  266. <div class="transporter">
  267. <div class="form-group">
  268. <label for="mode_of_transport">Mode of Transport</label>
  269. <input type="text" class="form-control" id="mode_of_transport" name="mode_of_transport" value="<?php echo $row->mode_of_transport; ?>">
  270. <span class="validation-color" id="err_mode_of_transport"><?php echo form_error('mode_of_transport'); ?></span>
  271. </div>
  272. <div class="form-group">
  273. <label for="transporter_name">Transporter Name</label>
  274. <input type="text" class="form-control" id="transporter_name" name="transporter_name" value="<?php echo $row->transporter_name; ?>">
  275. <span class="validation-color" id="err_transporter_name"><?php echo form_error('transporter_name'); ?></span>
  276. </div>
  277. <div class="form-group">
  278. <label for="transporter_code">Transporter Code</label>
  279. <input type="text" class="form-control" id="transporter_code" name="transporter_code" value="<?php echo $row->transporter_code ?>">
  280. <span class="validation-color" id="err_transporter_code"><?php echo form_error('transporter_code'); ?></span>
  281. </div>
  282. <div class="form-group">
  283. <label for="vehicle_regn_no">Vehicle Regn No.</label>
  284. <input type="text" class="form-control" id="vehicle_regn_no" name="vehicle_regn_no" value="<?php echo $row->vehicle_regn_no ?>">
  285. <span class="validation-color" id="err_vehicle_regn_no"><?php echo form_error('vehicle_regn_no'); ?></span>
  286. </div>
  287. </div>
  288. <script>
  289. $('.transporter').hide();
  290. </script>
  291. </div>
  292.  
  293. <div class="col-sm-6">
  294. <div class="well well-small">
  295. <h4>Detail Costumer</h4>
  296.  
  297. <div class="form-group">
  298. <label for="company_id">Costumer ID :</label>
  299. <input type="text" class="form-control" id="company_id" name="company_id" readonly="">
  300. </div>
  301.  
  302. <div class="form-group">
  303. <label for="company_name">
  304. <?php echo "Company Name"; ?>
  305. </label>
  306. <input type="text" class="form-control" id="company_name" name="company_name" readonly="">
  307. </div>
  308. <div class="form-group">
  309. <label for="customer_name">
  310. <?php echo "Customer Name"; ?>
  311. </label>
  312. <input type="text" class="form-control" id="customer_name" name="customer_name" readonly="">
  313. </div>
  314. <div class="form-group">
  315. <label for="mobilephone">
  316. <?php echo "Phone"; ?>
  317. </label>
  318. <input type="text" class="form-control" id="mobilephone" name="mobilephone" readonly="">
  319. </div>
  320. <div class="form-group">
  321. <label for="email">
  322. <?php echo "Email"; ?>
  323. </label>
  324. <input type="text" class="form-control" id="email" name="email" readonly="">
  325. </div>
  326. </div>
  327.  
  328. <div class="well well-small">
  329. <h4>Tax Info</h4>
  330.  
  331. <div class="form-group">
  332. <label for="no_npwp">
  333. <?php echo "NPWP"; ?>
  334. </label>
  335. <input type="text" class="form-control" id="npwp" name="npwp" readonly="">
  336. </div>
  337. <div class="form-group">
  338. <label for="mobilephone">
  339. <?php echo "Alamat"; ?>
  340. </label>
  341. <input type="text" class="form-control" id="alamat_npwp" name="alamat_npwp" readonly="">
  342. </div>
  343. </div>
  344.  
  345. <div class="well well-small">
  346. <h4>Shipping Address</h4>
  347. <br>
  348. <div class="form-group">
  349. <label for="customer_address">
  350. Choose Address :
  351. </label>
  352. <select class="form-control select2" id="customer_address" name="shipto" style="width: 100%;">
  353. <option value="">
  354. <?php echo $this->lang->line('add_biller_select'); ?>
  355. </option>
  356. </select>
  357. </div>
  358. <div class="form-group">
  359. <label for="country">
  360. <?php echo $this->lang->line('biller_lable_country'); ?>
  361. </label>
  362. <input type="text" class="form-control" id="country" name="country" readonly="">
  363. </div>
  364. <div class="form-group">
  365. <label for="state">
  366. <?php echo $this->lang->line('add_biller_state'); ?>
  367. </label>
  368. <input type="text" class="form-control" id="state" name="state" readonly="">
  369. </div>
  370. <div class="form-group">
  371. <label for="city">
  372. <?php echo $this->lang->line('biller_lable_city'); ?>
  373. </label>
  374. <input type="text" class="form-control" id="city" name="city" readonly="">
  375. </div>
  376. <div class="form-group">
  377. <label for="address">
  378. <!-- Address -->
  379. <?php echo $this->lang->line('add_biller_address'); ?>
  380. </label>
  381. <textarea class="form-control" id="addresscustomer" name="address"></textarea>
  382. </div>
  383. </div>
  384. <div class="well well-small">
  385. <h4>Billing Address</h4>
  386. <br>
  387. <div class="form-group">
  388. <label for="customer_address">
  389. Choose Address :
  390. </label>
  391. <select class="form-control select2" id="customer_addressa" name="billto" style="width: 100%;">
  392. <option value="">
  393. <?php echo $this->lang->line('add_biller_select'); ?>
  394. </option>
  395. </select>
  396. </div>
  397. <div class="form-group">
  398. <label for="country">
  399. <?php echo $this->lang->line('biller_lable_country'); ?>
  400. </label>
  401. <input type="text" class="form-control" id="countrya" name="country" readonly="">
  402. </div>
  403. <div class="form-group">
  404. <label for="state">
  405. <?php echo $this->lang->line('add_biller_state'); ?>
  406. </label>
  407. <input type="text" class="form-control" id="statea" name="state" readonly="">
  408. </div>
  409. <div class="form-group">
  410. <label for="city">
  411. <?php echo $this->lang->line('biller_lable_city'); ?>
  412. </label>
  413. <input type="text" class="form-control" id="citya" name="city" readonly="">
  414. </div>
  415. <div class="form-group">
  416. <label for="address">
  417. <?php echo $this->lang->line('add_biller_address'); ?>
  418. </label>
  419. <textarea class="form-control" id="addresscustomera" name="address"></textarea>
  420. </div>
  421. </div>
  422. </div>
  423.  
  424. <div class="col-sm-12">
  425. <div class="control-group">
  426. <div class="controls">
  427. <div class="tabbable">
  428. <ul class="nav nav-tabs">
  429. <li class="active">
  430. <a href="#product_note" data-toggle="tab"><?php echo "Product"; ?></a>
  431. </li>
  432. <li><a href="#additional_note" data-toggle="tab">Additional Product</a></li>
  433. <li><a href="#service_note" data-toggle="tab"><?php echo "Service"; ?></a></li>
  434. </ul>
  435. <div class="tab-content">
  436.  
  437. <div class="tab-pane" id="additional_note">
  438. <div class="col-sm-12">
  439. <div class="form-group form-inline">
  440. <label>Additional Description</label>
  441. <textarea class="form-control" id="additional_description" name="additional_description"><?= $row->additional_description ?></textarea>
  442. </div>
  443. </div>
  444. <div class="col-sm-12">
  445.  
  446. <div class="col-sm-3">
  447. <div class="form-group">
  448. <select class="form-control select2" id="a_brand" name="a_brand" style="width: 100%;">
  449. <option value="">Select Brand</option>
  450. <?php foreach ($brands as $brand) { ?>
  451. <option value='<?= $brand->id ?>'><?= $brand->brand_name ?></option>
  452. <?php } ?>
  453. </select>
  454. <span class="validation-color" id="err_a_brand"><?php echo form_error('brand'); ?></span>
  455. </div>
  456. </div>
  457.  
  458. <div class="col-sm-3">
  459. <div class="form-group">
  460. <select class="form-control select2" id="a_code_item" name="a_code_item" style="width: 100%;">
  461. <option value="">Select Part Number</option>
  462. </select>
  463. </div>
  464. </div>
  465.  
  466. <div class="col-sm-3">
  467. <div class="form-group">
  468. <select class="form-control select2" id="a_product" name="a_product" style="width: 100%;">
  469. <option value="" ><?php echo $this->lang->line('purchase_select_product'); ?></option>
  470. </select>
  471. </div>
  472. </div>
  473.  
  474. <div class="col-sm-3">
  475. <a href="<?php echo base_url('product/add'); ?>" target="_blank" class="btn btn-info"><?php echo $this->lang->line('header_add'); ?> New Products</a>
  476. <span class="validation-color" id="err_a_product">
  477. </span>
  478. </div>
  479.  
  480. </div>
  481. <!--/col-md-12 -->
  482. <div class="col-sm-12">
  483.  
  484. <div class="form-group">
  485. <label><?php echo $this->lang->line('purchase_inventory_items'); ?></label>
  486. <table class="table items table-striped table-bordered table-condensed table-hover additional_table" name="additional_data" id="additional_data">
  487. <thead>
  488. <tr>
  489. <th width="3%"><img src="<?php echo base_url(); ?>assets/images/bin1.png" /></th>
  490. <th class="span2" width="5%">Part Number</th>
  491. <th class="span2" width="8%">Item Name</th>
  492. <th class="span2" width="10%">Vendor or Item Name</th>
  493. <th class="span2" width="8%">Item Sales Name</th>
  494. <th class="span2" width="8%">Qty</th>
  495. <th class="span2" width="5%">Stock</th>
  496. <th class="span2" width="5%">UOM</th>
  497. <th class="span2" width="8%">Price</th>
  498. <th class="span2" width="8%">Sales Total</th>
  499. <th class="span2" width="8%">Discount</th>
  500. <th class="span2" width="8%">Total</th>
  501. </tr>
  502. </thead>
  503. <tbody id="additional_table_body">
  504. </tbody>
  505. </table>
  506. </div>
  507. </div>
  508. </div>
  509.  
  510. <div class="tab-pane active" id="product_note">
  511. <br>
  512. <div class="col-sm-12">
  513. <div class="col-sm-3">
  514. <div class="form-group">
  515. <select class="form-control select2" id="brand" name="brand" style="width: 100%;">
  516. <option value="">Select Brand</option>
  517. <?php foreach ($brands as $brand) { ?>
  518. <option value='<?= $brand->id ?>'><?= $brand->brand_name ?></option>
  519. <?php } ?>
  520. </select>
  521. <span class="validation-color" id="err_warehouse"><?php echo form_error('warehouse'); ?></span>
  522. </div>
  523. </div>
  524. <div class="col-sm-3">
  525. <div class="form-group">
  526. <select class="form-control select2" id="code_item" name="code_item" style="width: 100%;">
  527. <option value="">Select Part Number</option>
  528. </select>
  529. </div>
  530. </div>
  531. <div class="col-sm-3">
  532. <div class="form-group">
  533. <select class="form-control" id="product" name="product" style="width: 100%;">
  534. <option value=""><?php echo $this->lang->line('purchase_select_product'); ?></option>
  535. </select>
  536. </div>
  537. </div>
  538. <div class="col-sm-3">
  539. <a href="<?php echo base_url('product/add'); ?>" target="_blank" class="btn btn-info"><?php echo $this->lang->line('header_add'); ?> New Products</a>
  540. <span class="validation-color" id="err_product"></span>
  541. </div>
  542. </div>
  543. <!--/col-md-12 -->
  544. <div class="col-sm-12">
  545. <div class="form-group">
  546. <label><?php echo $this->lang->line('purchase_inventory_items'); ?></label>
  547. <table class="table items table-striped table-bordered table-condensed table-hover product_table" name="product_data" id="product_data">
  548. <thead>
  549. <tr>
  550. <th width="3%"><img src="<?php echo base_url(); ?>assets/images/bin1.png" /></th>
  551. <th class="span2" width="5%">Part Number</th>
  552. <th class="span2" width="8%">Item Name</th>
  553. <th class="span2" width="10%">Vendor or Item Name</th>
  554. <th class="span2" width="8%">Item Sales Name</th>
  555. <th class="span2" width="8%">Qty</th>
  556. <th class="span2" width="5%">Stock</th>
  557. <th class="span2" width="5%">UOM</th>
  558. <th class="span2" width="8%">Price</th>
  559. <th class="span2" width="8%">Sales Total</th>
  560. <th class="span2" width="8%">Discount</th>
  561. <th class="span2" width="8%">Total</th>
  562. </tr>
  563. </thead>
  564. <tbody id="product_table_body">
  565. </tbody>
  566. </table>
  567. </div>
  568. </div>
  569. </div>
  570. <div class="tab-pane" id="service_note">
  571. <div class="col-sm-12">
  572. <div class="form-group form-inline">
  573. <label>Service Description</label>
  574. <textarea class="form-control" id="service_description" name="service_description"><?= $row->service_description ?></textarea>
  575. </div>
  576. </div>
  577. <div class="col-sm-12">
  578. <br><br><br><br>
  579. <div class="col-sm-2"></div>
  580. <div class="col-sm-5">
  581. <div class="form-group">
  582. <select class="form-control select2" id="service" name="service" style="width: 100%;">
  583. <option value=""><?php echo "Data Service"; ?></option>
  584. <?php
  585. foreach ($service as $value) {
  586. echo "<option value='$value->service_id'" . set_select('service_id', $value->service_id) . ">$value->service_title</option>";
  587. }
  588. ?>
  589. </select>
  590. </div>
  591. <!--/form group -->
  592. </div>
  593. <!--/col-md-6 -->
  594. <div class="col-sm-4">
  595. <span class="validation-color" id="err_service">
  596. </span>
  597. </div>
  598. </div>
  599. <div class="col-sm-12">
  600. <div class="form-group">
  601. <label><?php echo $this->lang->line('purchase_inventory_items'); ?></label>
  602. <table class="table items table-striped table-bordered table-condensed table-hover service_table" name="service_data" id="service_data">
  603. <thead>
  604. <tr>
  605. <th style="width: 20px;"><img src="<?php echo base_url(); ?>assets/images/bin1.png" /></th>
  606. <th class="span2"><?php echo $this->lang->line('product_code'); ?></th>
  607. <th class="span2"><?php echo $this->lang->line('purchase_product_description'); ?></th>
  608. <th class="span2" width="10%"><?php echo $this->lang->line('product_quantity') . '/Jumlah'; ?></th>
  609. <th class="span2"><?php echo $this->lang->line('product_price') . '/Harga'; ?></th>
  610. <th class="span2" width="10%"><?php echo $this->lang->line('sales_total_sales'); ?></th>
  611. <th class="span2" width="15%"><?php echo $this->lang->line('header_discount'); ?></th>
  612. <th class="span2" width="10%"><?php echo $this->lang->line('purchase_total'); ?>
  613. </tr>
  614. </thead>
  615. <tbody id="service_table_body">
  616. </tbody>
  617. </table>
  618. </div>
  619. </div>
  620. </div>
  621. </div>
  622. <!-- /controls -->
  623. </div>
  624. <!-- /control-group -->
  625. </div>
  626. <input type="hidden" name="total_value" id="total_value">
  627. <input type="hidden" name="total_discount" id="total_discount">
  628. <input type="hidden" name="total_tax" id="total_tax">
  629. <input type="hidden" name="grand_total" id="grand_total">
  630. <input type="hidden" name="grand_currency" id="grand_currency">
  631. <input type="hidden" name="table_data" id="table_data">
  632. <input type="hidden" name="tableadditional_data" id="tableadditional_data">
  633. <input type="hidden" name="tableservice_data" id="tableservice_data">
  634. <table class="table table-striped table-bordered table-condensed table-hover summary_table">
  635. <tr>
  636. <td align="right" width="80%"><?php echo $this->lang->line('purchase_total_value') . '/Total Harga'; ?></td>
  637. <td align='right'><span id="kurs_symbol"></span>
  638. <span id="totalValue">&nbsp;0.00</span></td>
  639. </tr>
  640. <tr>
  641. <td align="right"><?php echo $this->lang->line('purchase_product_discount'); ?></td>
  642. <td align='right'><span id="kurs_symbol1"></span>
  643. <span id="DiscountProduct">&nbsp;0.00</span>
  644. </td>
  645. </tr>
  646.  
  647. <tr>
  648. <td align="right"><?php echo "Diskon %"; ?></td>
  649. <td align='right'>
  650. <input type="number" class="text-right" onkeypress="return isNumber(event)" id="DiscountPersen" step="0.01" name="DiscountPersen" value="<?php echo $diskonpersen; ?>">
  651. </td>
  652. </tr>
  653.  
  654. <tr style="display:none;">
  655. <td align="right"><?php echo 'Jumlah Diskon %'; ?></td>
  656. <td align='right'><span id="kurs_symbol2"></span>
  657. <span id="JumlahDiskonPersen">&nbsp;0.00</span>
  658. </td>
  659. </tr>
  660.  
  661. <tr>
  662. <td align="right"><?php echo "Diskon Fix"; ?></td>
  663. <td align='right'><span id="kurs_symbol3"></span>
  664. <input step='0.01' type="number" class="text-right" onkeypress="return isNumber(event)" id="DiscountFix" value="<?php echo $diskon; ?>" name="diskonfix">
  665. </td>
  666. </tr>
  667.  
  668. <tr>
  669. <td align="right"><?php echo $this->lang->line('purchase_shipping_charge'); ?></td>
  670. <td align='right'><span id="kurs_symbol4"></span>
  671. <input step='0.01' type="number" class="text-right" onkeypress="return isNumber(event)" id="shipping_charge" name="shipping_charge" value="<?php echo $shipping; ?>">
  672. </td>
  673. </tr>
  674.  
  675. <tr>
  676. <td align="right"><?php echo $this->lang->line('purchase_total_discount'); ?></td>
  677. <td align='right'><span id="kurs_symbol5"></span>
  678. <span id="totalDiscount">&nbsp;0.00</span>
  679. </td>
  680. </tr>
  681.  
  682. <tr>
  683. <td align="right">Tax</td>
  684. <td align='right'>
  685. <select class="form-control" name="taxx" id="taxx">
  686. <option value="">Select Tax</option>
  687. <?php foreach ($tax as $value) { ?>
  688. <option value="<?= $value->tax_value ?>"><?= $value->tax_name ?></option>
  689. <?php } ?>
  690. </select>
  691. </td>
  692. </tr>
  693.  
  694. <tr>
  695. <td align="right"><?php echo $this->lang->line('purchase_total_tax') . '/Pajak'; ?></td>
  696. <td align='right'><span id="kurs_symbol6"></span>
  697. <span id="totalTax">&nbsp;0.00</span>
  698. </td>
  699. </tr>
  700.  
  701. <tr>
  702. <td align="right"><?php echo $this->lang->line('purchase_total') . '/Total Harga'; ?> </td>
  703. <td align='right'><span id="kurs_symbol7"></span><span id="grandTotal">&nbsp;0.00</span></td>
  704. </tr>
  705.  
  706. <tr>
  707. <td align="right"><?php echo 'Currency Total :'; ?> </td>
  708. <td align='right'><span id="grandCurrency"></span></td>
  709. </tr>
  710.  
  711. </table>
  712. </div>
  713. </div>
  714.  
  715.  
  716. <div class="col-sm-12">
  717. <div class="control-group">
  718. <div class="controls">
  719. <div class="tabbable">
  720. <ul class="nav nav-tabs">
  721. <li>
  722. <a href="#note" data-toggle="tab"><?php echo $this->lang->line('purchase_note'); ?></a>
  723. </li>
  724. <li class="active"><a href="#internal_note" data-toggle="tab"><?php echo $this->lang->line('sales_internal_note'); ?></a></li>
  725. <li><a href="#term_and_condition" data-toggle="tab"><?php echo $this->lang->line('sales_term_and_condition'); ?></a></li>
  726. </ul>
  727. <br>
  728. <div class="tab-content">
  729. <div class="tab-pane" id="note">
  730. <textarea class="col-sm-12 form-control" id="note" name="note" value=""><?php echo $snote; ?></textarea>
  731. <span style="color:red;" id="err_note"></span>
  732. </div>
  733. <div class="tab-pane active" id="internal_note">
  734. <textarea class="col-sm-12 form-control" id="note" name="internal_note" value=""><?php echo $sinternal_note; ?></textarea>
  735. <span style="color:red;" id="err_note"></span>
  736. </div>
  737. <div class="tab-pane" id="term_and_condition">
  738. <textarea class="col-sm-12 form-control" id="term_and_condition" name="term_and_condition" value=""><?php echo $sterm_and_condition; ?></textarea>
  739. <span style="color:red;" id="err_term_and_condition"></span>
  740. </div>
  741. </div>
  742. </div>
  743. </div>
  744. <!-- /controls -->
  745. </div>
  746. <!-- /control-group -->
  747. </div>
  748. <div class="col-sm-12">
  749. <div class="box-footer">
  750. <input type="submit" name="submit" id="submit" class="btn btn-info" value="Update">
  751. <input type="submit" name="submit" id="submit" value="Save As Draft" class="btn btn-warning">
  752. <a href="#" data-toggle="modal" data-target="#previewmodal" id="preview" class="btn btn-default">Preview</a>
  753. <span class="btn btn-default" id="cancel" style="margin-left: 2%" onclick="cancel('sales')"><?php echo $this->lang->line('product_cancel'); ?></span>
  754. </div>
  755. </div>
  756. <?php } ?>
  757. </form>
  758. </div>
  759. <!-- /.box-body -->
  760. </div>
  761. <!--/.col (right) -->
  762. </div>
  763. <!-- /.row -->
  764. </section>
  765. <!-- /.content -->
  766. </div>
  767. <!-- /.content-wrapper -->
  768.  
  769. <?php $this->load->view('sales/modal/customer'); ?>
  770. <?php $this->load->view('sales/modal/booking'); ?>
  771. <?php $this->load->view('sales/modal/preview'); ?>
  772. <?php $this->load->view('layout/product_footer'); ?>
  773. <?php $this->load->view('sales/script/edit'); ?>
RAW Paste Data