summaryrefslogtreecommitdiff
path: root/UI/payments/payments_detail.html
blob: bd41fcd22dea2aeb482249b2c75966575c2f5e55 (plain)
  1. <?lsmb INCLUDE 'ui-header.html'
  2. titlebar = 'Payments'
  3. include_stylesheet = [
  4. 'css/global.css'
  5. 'UI/payments/payments.css'
  6. ]
  7. ?>
  8. <?lsmb BLOCK format_money ?><?lsmb FILTER format('%15.2f') ?><?lsmb number
  9. ?><?lsmb END # filter ?><?lsmb END # block ?>
  10. <?lsmb PROCESS elements.html # Include form elements helper. ?>
  11. <?lsmb contact_type = (account_class == 1) ? text('Vendor') : text('Customer')
  12. ?>
  13. <?lsmb payment_type = (account_class == 1) ? text('Payments') : text('Receipts')
  14. ?>
  15. <body id="payment_2_body">
  16. <div class="listtop"><?lsmb payment_type ?></div>
  17. <form name="pay_dues" method="post" action="payment.pl">
  18. <!-- Moving all hidden variables to the top. -CT -->
  19. <?lsmb INCLUDE input element_data = {
  20. type = "hidden"
  21. name = "project_id"
  22. value = project_id
  23. } ?>
  24. <?lsmb INCLUDE input element_data = {
  25. type = "hidden"
  26. name = "account_class"
  27. value = account_class
  28. } ?>
  29. <?lsmb INCLUDE input element_data = {
  30. type = "hidden"
  31. name = "department_id"
  32. value = department_id
  33. } ?>
  34. <?lsmb INCLUDE input element_data = {
  35. type = "hidden"
  36. name = "source_start"
  37. value = source_start
  38. } ?>
  39. <?lsmb INCLUDE input element_data = {
  40. type = "hidden"
  41. name = "approved"
  42. value = approved
  43. } ?>
  44. <?lsmb INCLUDE input element_data = {
  45. type = "hidden"
  46. name = "currency"
  47. value = currency
  48. } ?>
  49. <?lsmb INCLUDE input element_data = {
  50. type = "hidden"
  51. name = "ar_ap_accno"
  52. value = ar_ap_accno
  53. } ?>
  54. <?lsmb INCLUDE input element_data = {
  55. type = "hidden"
  56. name = "date_from"
  57. value = date_from
  58. } ?>
  59. <?lsmb INCLUDE input element_data = {
  60. type = "hidden"
  61. name = "date_to"
  62. value = date_to
  63. } ?>
  64. <?lsmb INCLUDE input element_data = {
  65. type = "hidden"
  66. name = "business_id"
  67. value = business_id
  68. } ?>
  69. <?lsmb INCLUDE input element_data = {
  70. type = "hidden"
  71. name = "batch_id"
  72. value = batch_id
  73. } ?>
  74. <div class="container">
  75. <div id="date_row">
  76. <label for="date_paid"><?lsmb text('Posting Date:') ?></label>
  77. <?lsmb IF batch_id ?>
  78. <?lsmb IF ! datepaid ?><?lsmb datepaid = batch_date
  79. ?><?lsmb END ?>
  80. <span id="date_paid"><?lsmb datepaid ?></span>
  81. <?lsmb END ?>
  82. <?lsmb INCLUDE input element_data= {
  83. value = datepaid
  84. name = "datepaid"
  85. size = 20
  86. class = (batch_id) ? "hidden" : "date"
  87. type = (batch_id) ? "hidden" : "text"
  88. } ?>
  89. </div>
  90. <div id="date_filter_row">
  91. <label for="filter_from"><?lsmb text('Filtering From:') ?></label>
  92. <span id="filter_from"><?lsmb date_from ?> </span>
  93. <label for="filter_to"><?lsmb text('To:') ?></label>
  94. <span id="filter_to"><?lsmb date_to ?> </span>
  95. <!-- the department will be shown if it was selected in the first step -->
  96. <?lsmb IF department.value # Only process element if one exists. As in project above ?>
  97. <div class="info">
  98. <label for="department_info"><?lsmb text('Department') ?></label>
  99. <span id="department_info">
  100. <?lsmb department ?>
  101. </span>
  102. </div>
  103. <?lsmb END ?>
  104. <div class="info" id="account_row">
  105. <label for="account_info">
  106. <?lsmb text('Account:'); ?>
  107. </label>
  108. <span id="account_info"></td>
  109. <?lsmb FOREACH a = debt_accounts ?><?lsmb
  110. IF a.accno == ar_ap_accno
  111. ?><?lsmb a.accno ?>--<?lsmb a.description ?><?lsmb
  112. END # If a.accno... ?><?lsmb
  113. END # FOREACH a ?>
  114. </span>
  115. </div>
  116. <?lsmb IF defaultcurrency != curr ?>
  117. <div class="info" id="exrate_row">
  118. <?lsmb PROCESS input element_data= {
  119. label = text('Exchange Rate')
  120. type = text
  121. class = "numeric"
  122. name = 'exchange_rate'
  123. value = exchange_rate
  124. size = 20
  125. } # ' ?>
  126. </div>
  127. <?lsmb END ?>
  128. <?lsmb IF business ?>
  129. <div class="info">
  130. <label for="business_info"><?lsmb text('Business:') ?></label>
  131. <span id="business_info"><?lsmb FOREACH b = businesses ?>
  132. <?lsmb IF b.id == business ?>
  133. <?lsmb b.id ?> -- <?lsmb b.description ?>
  134. <?lsmb END # if b.id... ?>
  135. <?lsmb END # foreach b ?></span>
  136. </div>
  137. <?lsmb END # if business ?>
  138. <div class="info" id="cash_account_div">
  139. <?lsmb INCLUDE input element_data = {
  140. type = "hidden"
  141. name = "cash_accno"
  142. value = cash_accno
  143. } ?>
  144. <label><?lsmb text('Pay From') ?></label>
  145. <?lsmb FOR c = cash_accounts -?>
  146. <?lsmb IF c.accno == cash_accno -?>
  147. <?lsmb c.accno ?>--<?lsmb c.description ?>
  148. <?lsmb END # if c.accno -?>
  149. <?lsmb END # for c -?>
  150. </div>
  151. <table id="payments_table">
  152. <tr class="listheading">
  153. <th class="account_number"><?lsmb text('Account_number') ?></th>
  154. <th class="entity_name"><?lsmb text('Name') ?></th>
  155. <th class="invoice"><?lsmb text('Invoice Total') ?></th>
  156. <th class="payment"><?lsmb text('Payment') ?></th>
  157. <th class="payment"><?lsmb text('Details') ?></th>
  158. </tr>
  159. <?lsmb rc = 1 ?><?lsmb count = 0 ?>
  160. <?lsmb FOREACH r = contact_invoices ?>
  161. <?lsmb rc = (rc + 1) % 2; count = count + 1 ?>
  162. <tr class="listrow<?lsmb rc ?>">
  163. <td class="account_number" rowspan="2" >
  164. <?lsmb INCLUDE input element_data = {
  165. type = "hidden"
  166. name = "contact_$count"
  167. value = r.contact_id
  168. } ?>
  169. <?lsmb INCLUDE input element_data = {
  170. type = "checkbox"
  171. name = "id_$r.contact_id"
  172. value = r.contact_id
  173. checked = (r.unselected) ? "" : "checked"
  174. } ?>
  175. <?lsmb r.account_number ?>
  176. </td>
  177. <td class="entity_name"><?lsmb r.contact_name ?></td>
  178. <td class="invoice"><?lsmb r.total_due ?> <?lsmb currency ?></td>
  179. <td class="payment">
  180. <?lsmb INCLUDE input element_data = {
  181. name = "paid_$r.contact_id"
  182. value = "some"
  183. label = text('Some')
  184. checked = ("${paid_$r.contact_id}" == 'some') ? checked : ""
  185. type = "radio"
  186. } ?>
  187. <?lsmb INCLUDE input element_data = {
  188. name = "paid_$r.contact_id"
  189. value = "all"
  190. label = text('All')
  191. checked = ("${paid_$r.contact_id}" != 'some') ? checked : ""
  192. type = "radio"
  193. } ?>
  194. </td>
  195. <td rowspan = 2><?lsmb INCLUDE input element_data = {
  196. name = "source_$r.contact_id"
  197. value = r.source
  198. type = "text"
  199. size = "20"
  200. label = text('Source')
  201. } ?></td>
  202. </tr>
  203. <tr class="listrow<?lsmb rc ?>">
  204. <td class="invoice_detail_list" colspan="3">
  205. <table id = "invoice_data_table_<?lsmb r.contact_id ?>" width="100%">
  206. <tr class="listheading">
  207. <th class="invoice_date_list"><?lsmb text('Date') ?>
  208. </th>
  209. <th class="invoice_list">
  210. <?lsmb text('Invoice Number') ?>
  211. </th>
  212. <th class="total_due_list"><?lsmb text('Total') ?></th>
  213. <th class="paid_list"><?lsmb text('Paid') ?></th>
  214. <th class="net_due_list"><?lsmb text('Net Due') ?> </th>
  215. <th class="to_pay_list"><?lsmb text('To Pay') ?></th>
  216. </tr>
  217. <?lsmb icount = 0 ?>
  218. <?lsmb FOREACH i = r.invoices ?>
  219. <?lsmb icount = icount + 1 ?>
  220. <tr>
  221. <td class="invoice_date_list">&nbsp;<?lsmb i.2 ?></td>
  222. <td class="invoice_list">&nbsp;<?lsmb i.1 ?></td>
  223. <td class="total_due_list">&nbsp;<?lsmb i.3 ?></td>
  224. <td class="paid_list">&nbsp;<?lsmb i.4 ?></td>
  225. <td class="net_due_list">&nbsp;
  226. <?lsmb INCLUDE format_money number= i.6 ?>
  227. <?lsmb currency ?></td>
  228. <td class="to_pay_list">
  229. <?lsmb IF ! ${"payment_$r.contact_id_$i.0"} ?>
  230. <?lsmb ${"payment_$r.contact_id_$i.0"} =
  231. INCLUDE format_money number= i.6 ?>
  232. <?lsmb END # if ?>
  233. <?lsmb INCLUDE input element_data = {
  234. name = "payment_$r.contact_id_$i.0"
  235. value = ${"payment_$r.contact_id_$i.0"}
  236. size = 20
  237. type = "text"
  238. class = "monetary"
  239. } ?>
  240. <?lsmb INCLUDE input element_data = {
  241. type = "hidden"
  242. name = "invoice_${r.contact_id}_$icount"
  243. value = i.0
  244. } ?>
  245. <?lsmb INCLUDE input element_data = {
  246. type = "hidden"
  247. name = "net_$i.0"
  248. value = i.6
  249. } ?>
  250. </td>
  251. </tr>
  252. <?lsmb END # foreach i ?>
  253. <?lsmb INCLUDE input element_data = {
  254. type = "hidden"
  255. name = "invoice_count_${r.contact_id}"
  256. value = icount
  257. } ?>
  258. </table>
  259. </tr>
  260. <?lsmb END # foreach r ?>
  261. </table>
  262. <?lsmb INCLUDE input element_data = {
  263. type = "hidden"
  264. name = "contact_count"
  265. value = count
  266. } ?>
  267. <?lsmb INCLUDE button element_data = {
  268. text = text((batch_id) ? 'Save' : 'Post'),
  269. value = 'post_payments_bulk'
  270. class = "submit"
  271. name = 'action'
  272. } ?>
  273. </form>
  274. </body>
  275. </html>