fork download
  1. <!DOCTYPE html>
  2. <head>
  3. <title>Tortilla Daily Sell 1</title>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6.  
  7. <!--for online also works on ofline-->
  8. <link rel="stylesheet" href="http://m...content-available-to-author-only...n.com/bootstrap/3.3.6/css/bootstrap.min.css">
  9. <script src="https://a...content-available-to-author-only...s.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
  10. <script src="http://m...content-available-to-author-only...n.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
  11.  
  12. </head>
  13. <body>
  14. <table border="1">
  15. <tr>
  16. <th>Product Title</th>
  17. <th>PIECE and RATE</th>
  18. <td>DISTRIB. PACKET</td>
  19. <td>(BONUS) (PACKET)</td>
  20. <td>(REPLACE) (PACKET)</td>
  21. <td>(RETURN)(PACKET)</td>
  22. <td>TOTAL SALE (PACKET)</td>
  23. <td>SALES IN AMOUNT</td>
  24. <td>EXT. SALE (PACKET)</td>
  25. <td>TOTAL SALE (AMOUNT)</td>
  26. <td>DUE RECEIVED</td>
  27. <td>(DUE IN AMOUNT)</td>
  28. <td>(EXP. & COM.)</td>
  29. <td>TOTAL RECEIVED</td>
  30. </tr>
  31. <!-- ROTI -->
  32. <tr class="product-row">
  33. <th rowspan="2">ROTI</th>
  34. <td>6p@20</td>
  35. <td>
  36. <input type="text"
  37. class="form-control distrb-pak" id="distributedPacketForRoti6p20tk"
  38. name='distributedPacketForRoti6p20tk'
  39. value="0">
  40.  
  41. <input type="hidden" class="price" name="price" value="20">
  42. </td>
  43. <td>
  44. <input type="text"
  45. class="form-control bonus-pak" id="bonusForRoti6p20tk" name='bonusForRoti6p20tk'
  46. value="0">
  47. </td>
  48. <td><input type="text"
  49. class="form-control replace-pak" id="replaceForRoti6p20tk" name='replaceForRoti6p20tk'
  50. value="0">
  51. </td>
  52. <td>
  53. <input type="text"
  54. class="form-control return-pak" id="returnForRoti6p20tk" name='returnForRoti6p20tk'
  55. value="0">
  56. </td>
  57.  
  58. <td>
  59. <input type="text"
  60. class="form-control total-sale-pak" id="totalSalePacketForRoti6p20tk"
  61. name='totalSalePacketForRoti6p20tk'
  62. value="0" readonly>
  63.  
  64. </td>
  65.  
  66. <td>
  67. <input type="text"
  68. class="form-control sales-in-amount" id="salesInAmountForRoti6p20tk"
  69. name='salesInAmountForRoti6p20tk'
  70. value="0" readonly>
  71. </td>
  72. <td>
  73. <input type="text"
  74. class="form-control extSale" id="extSaleForRoti6p20tk" name='extSaleForRoti6p20tk'
  75. value="0">
  76. </td>
  77. <td rowspan="2">
  78. <input type="text"
  79. class="form-control totalSale" id="totalSaleAmountForRoti"
  80. name='totalSaleAmountForRoti'
  81. value="0" readonly>
  82. </td>
  83.  
  84. <td rowspan="2">
  85.  
  86. <input type="text"
  87. class="form-control dueReceived" id="dueReceivedForRoti" name='dueReceivedForRoti'
  88. value="0">
  89.  
  90. </td>
  91.  
  92. <td rowspan="2">
  93.  
  94. <input type="text"
  95. class="form-control dueAmount" id="dueInAmountForRoti" name='dueInAmountForRoti'
  96. value="0">
  97.  
  98. </td>
  99. <td rowspan="2">
  100.  
  101. <input type="text"
  102. class="form-control expAndCom" id="expAndComForRoti" name='expAndComForRoti'
  103. value="0">
  104.  
  105. </td>
  106. <td rowspan="2">
  107. <input type="text"
  108. class="form-control totalReceived" id="totalReceivedForRoti" name='totalReceivedForRoti'
  109. value="0" readonly>
  110.  
  111. </td>
  112.  
  113. </tr>
  114.  
  115.  
  116. <!-- ROTI -->
  117. <tr class="product-row">
  118. <td>4p@14</td>
  119. <td>
  120. <input type="text"
  121. class="form-control distrb-pak" name='distributedPacketForRoti4p14tk'
  122. id="distributedPacketForRoti4p14tk" value="0">
  123. <input type="hidden" class="price" name="price" value="14">
  124. </td>
  125. <td>
  126. <input type="text"
  127. class="form-control bonus-pak" name='bonusForRoti4p14tk'
  128. id="bonusForRoti4p14tk" value="0">
  129. </td>
  130. <td><input type="text"
  131. class="form-control replace-pak" name='replaceForRoti4p14tk'
  132. id="replaceForRoti4p14tk" value="0">
  133. </td>
  134. <td>
  135. <input type="text"
  136. class="form-control return-pak" name='returnForRoti4p14tk'
  137. id="returnForRoti4p14tk" value="0">
  138. </td>
  139. <td>
  140. <input type="text"
  141. class="form-control total-sale-pak" name='totalSalePacketForRoti4p14tk'
  142. id="totalSalePacketForRoti4p14tk" value="0" readonly>
  143.  
  144. </td>
  145.  
  146. <td>
  147. <input type="text"
  148. class="form-control sales-in-amount" name='salesInAmountForRoti4p14tk'
  149. id="salesInAmountForRoti4p14tk" value="0" readonly>
  150.  
  151. </td>
  152. <td>
  153. <input type="text"
  154. class="form-control extSale" id="extSalesForRoti4p14tk"
  155. name='extSalesForRoti4p14tk'
  156. value="0">
  157. </td>
  158.  
  159.  
  160. </tr>
  161. <script>
  162.  
  163. $('.distrb-pak, .bonus-pak, .replace-pak, .return-pak, .dueReceived, .dueAmount, .extSale, .expAndCom').on('keydown keyup', function () {
  164.  
  165. var distPakCount = $(this).parents('.product-row').find('.distrb-pak').val();
  166. var bonusPakCount = $(this).parents('.product-row').find('.bonus-pak').val();
  167. var replacePakCount = $(this).parents('.product-row').find('.replace-pak').val();
  168. var returnPakCount = $(this).parents('.product-row').find('.return-pak').val();
  169. var totalSalePak = $(this).parents('.product-row').find('.total-sale-pak');
  170. var salesInAmount = $(this).parents('.product-row').find('.sales-in-amount');
  171. var extSale = $(this).parents('.product-row').find('.extSale').val();
  172. var totalSale = $(this).parents('.product-row').find('.totalSale');
  173. var dueReceived = $(this).parents('.product-row').find('.dueReceived').val();
  174. var dueAmount = $(this).parents('.product-row').find('.dueAmount').val();
  175. var totalReceived = $(this).parents('.product-row').find('.totalReceived');
  176. var expCom = $(this).parents('.product-row').find('.expAndCom').val();
  177. var price = $(this).parents('.product-row').find('.price').val();
  178.  
  179.  
  180. var totalSalePakCount = distPakCount - bonusPakCount - returnPakCount - replacePakCount;
  181. totalSalePak.val(totalSalePakCount);
  182.  
  183. var salesInAmount_ = totalSalePakCount * price;
  184. salesInAmount.val(salesInAmount_);
  185.  
  186. var totalSaleInAmount = salesInAmount_ + extSale;
  187. totalSale.val(totalSaleInAmount);
  188.  
  189.  
  190.  
  191.  
  192. var totalReceivedAmount = parseInt(totalSaleInAmount) + parseInt(dueReceived) - parseInt(dueAmount)
  193. - parseInt(expCom);
  194.  
  195. totalReceived.val(totalReceivedAmount);
  196.  
  197. //totalSale
  198. });
  199.  
  200.  
  201. </script>
  202.  
  203.  
  204. </body>your text goes here
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty