summaryrefslogtreecommitdiff
path: root/UI/payments/payments_detail.html
blob: d46cfe646a5ce109ab247211ab5ec9ba8baf0cf6 (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 = "department_id"
  27. value = department_id
  28. } ?>
  29. <?lsmb INCLUDE input element_data = {
  30. type = "hidden"
  31. name = "source_start"
  32. value = source_start
  33. } ?>
  34. <?lsmb INCLUDE input element_data = {
  35. type = "hidden"
  36. name = "approved"
  37. value = approved
  38. } ?>
  39. <?lsmb INCLUDE input element_data = {
  40. type = "hidden"
  41. name = "currency"
  42. value = currency
  43. } ?>
  44. <?lsmb INCLUDE input element_data = {
  45. type = "hidden"
  46. name = "ar_ap_accno"
  47. value = ar_ap_accno
  48. } ?>
  49. <?lsmb INCLUDE input element_data = {
  50. type = "hidden"
  51. name = "date_from"
  52. value = date_from
  53. } ?>
  54. <?lsmb INCLUDE input element_data = {
  55. type = "hidden"
  56. name = "date_to"
  57. value = date_to
  58. } ?>
  59. <?lsmb INCLUDE input element_data = {
  60. type = "hidden"
  61. name = "business"
  62. value = business
  63. } ?>
  64. <?lsmb INCLUDE input element_data = {
  65. type = "hidden"
  66. name = "batch_id"
  67. value = batch_id
  68. } ?>
  69. <div class="container">
  70. <div id="date_row">
  71. <label for="date_paid"><?lsmb text('Posting Date:') ?></label>
  72. <?lsmb IF batch_id ?>
  73. <span id="date_paid"><?lsmb date_paid ?></span>
  74. <?lsmb END ?>
  75. <?lsmb INCLUDE input element_data= {
  76. value = datepaid
  77. name = "datepaid"
  78. size = 20
  79. class = (batch_id) ? "hidden" : "date"
  80. type = (batch_id) ? "hidden" : "text"
  81. } ?>
  82. </div>
  83. <div id="date_filter_row">
  84. <label for="filter_from"><?lsmb text('Filtering From:') ?></label>
  85. <span id="filter_from"><?lsmb date_from ?> </span>
  86. <label for="filter_to"><?lsmb text('To:') ?></label>
  87. <span id="filter_to"><?lsmb date_to ?> </span>
  88. <!-- the department will be shown if it was selected in the first step -->
  89. <?lsmb IF department.value # Only process element if one exists. As in project above ?>
  90. <div class="info">
  91. <label for="department_info"><?lsmb text('Department') ?></label>
  92. <span id="department_info">
  93. <?lsmb department ?>
  94. </span>
  95. </div>
  96. <?lsmb END ?>
  97. <div class="info" id="account_row">
  98. <label for="account_info">
  99. <?lsmb text('Account:'); ?>
  100. </label>
  101. <span id="account_info"></td>
  102. <?lsmb FOREACH a = debt_accounts ?><?lsmb
  103. IF a.accno == ar_ap_accno
  104. ?><?lsmb a.accno ?>--<?lsmb a.description ?><?lsmb
  105. END # If a.accno... ?><?lsmb
  106. END # FOREACH a ?>
  107. </span>
  108. </div>
  109. <?lsmb IF defaultcurrency != curr ?>
  110. <div class="info" id="exrate_row">
  111. <?lsmb PROCESS input element_data= {
  112. label = text('Exchange Rate')
  113. type = text
  114. class = "numeric"
  115. name = 'exchange_rate'
  116. value = exchange_rate
  117. size = 20
  118. } # ' ?>
  119. </div>
  120. <?lsmb END ?>
  121. <?lsmb IF business ?>
  122. <div class="info">
  123. <label for="business_info"><?lsmb text('Business:') ?></label>
  124. <span id="business_info"><?lsmb FOREACH b = businesses ?>
  125. <?lsmb IF b.id == business ?>
  126. <?lsmb b.id ?> -- <?lsmb b.description ?>
  127. <?lsmb END # if b.id... ?>
  128. <?lsmb END # foreach b ?></span>
  129. </div>
  130. <?lsmb END # if business ?>
  131. <table id="payments_table">
  132. <tr class="listheading">
  133. <th class="account_number"><?lsmb text('Account_number') ?></th>
  134. <th class="entity_name"><?lsmb text('Name') ?></th>
  135. <th class="invoice"><?lsmb text('Invoice Total') ?></th>
  136. <th class="payment"><?lsmb text('Payment') ?></th>
  137. <th class="payment"><?lsmb text('Details') ?></th>
  138. </tr>
  139. <?lsmb rc = 1 ?>
  140. <?lsmb FOREACH r = contact_invoices ?>
  141. <?lsmb rc = rc + 1; rc = rc % 2 ?>
  142. <tr class="listrow<?lsmb rc ?>">
  143. <td class="account_number" rowspan="2" ><?lsmb r.account_number ?></td>
  144. <td class="entity_name"><?lsmb r.contact_name ?></td>
  145. <td class="invoice"><?lsmb r.total_due ?> <?lsmb currency ?></td>
  146. <td class="payment">
  147. <?lsmb INCLUDE input element_data = {
  148. name = "paid_$r.contact_id"
  149. value = "some"
  150. label = text('Some')
  151. checked = ("${paid_$r.contact_id}" == 'some') ? checked : ""
  152. type = "radio"
  153. } ?>
  154. <?lsmb INCLUDE input element_data = {
  155. name = "paid_$r.contact_id"
  156. value = "all"
  157. label = text('All')
  158. checked = ("${paid_$r.contact_id}" != 'some') ? checked : ""
  159. type = "radio"
  160. } ?>
  161. </td>
  162. <td rowspan = 2><?lsmb INCLUDE input element_data = {
  163. name = "source_$r.contact_id"
  164. value = r.source
  165. type = "text"
  166. size = "20"
  167. label = text('Source')
  168. } ?></td>
  169. </tr>
  170. <tr class="listrow<?lsmb rc ?>">
  171. <td class="invoice_detail_list" colspan="3">
  172. <table id = "invoice_data_table_<?lsmb r.contact_id ?>" width="100%">
  173. <tr class="listheading">
  174. <th class="invoice_date_list"><?lsmb text('Date') ?>
  175. </th>
  176. <th class="invoice_list">
  177. <?lsmb text('Invoice Number') ?>
  178. </th>
  179. <th class="total_due_list"><?lsmb text('Total') ?></th>
  180. <th class="paid_list"><?lsmb text('Paid') ?></th>
  181. <th class="net_due_list"><?lsmb text('Net Due') ?> </th>
  182. <th class="to_pay_list"><?lsmb text('To Pay') ?></th>
  183. </tr>
  184. <?lsmb FOREACH i = r.invoices ?>
  185. <tr>
  186. <td class="invoice_date_list">&nbsp;<?lsmb i.2 ?></td>
  187. <td class="invoice_list">&nbsp;<?lsmb i.1 ?></td>
  188. <td class="total_due_list">&nbsp;<?lsmb i.3 ?></td>
  189. <td class="paid_list">&nbsp;<?lsmb i.4 ?></td>
  190. <td class="net_due_list">&nbsp;
  191. <?lsmb INCLUDE format_money number= i.6 ?>
  192. <?lsmb currency ?></td>
  193. <td class="to_pay_list">
  194. <?lsmb IF ! ${"payment_$r.contact_id_$i.0"} ?>
  195. <?lsmb ${"payment_$r.contact_id_$i.0"} =
  196. INCLUDE format_money number= i.6 ?>
  197. <?lsmb END # if ?>
  198. <?lsmb INCLUDE input element_data = {
  199. name = "payment_$r.contact_id_$i.0"
  200. value = ${"payment_$r.contact_id_$i.0"}
  201. size = 20
  202. type = "text"
  203. class = "monetary"
  204. } ?>
  205. </td>
  206. </tr>
  207. <?lsmb END # foreach i ?>
  208. </table>
  209. </tr>
  210. <?lsmb END # foreach r ?>
  211. </table>
  212. <?lsmb INCLUDE button element_data = {
  213. text = text('Post'),
  214. value = 'post_payments_bulk'
  215. class = "submit"
  216. name = 'action'
  217. } ?>
  218. </form>
  219. </body>
  220. </html>