summaryrefslogtreecommitdiff
path: root/UI/payments/payments_detail.html
blob: f1b4c04af03bd7f6d80e43a6819b82e4f0eacee8 (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. <!-- CT: This template produces invalid XHTML due to the use of nested tables.
  17. Because nested tables are widely used (perhaps improperly) for layout,
  18. most browsers should have no issues with them. Furthermore, I cannot find
  19. any cleaner solution to embedding tabular data within tabular data than
  20. this -->
  21. <div class="listtop"><?lsmb payment_type ?></div>
  22. <form name="pay_dues" method="post" action="payment.pl">
  23. <!-- Moving all hidden variables to the top. -CT -->
  24. <?lsmb INCLUDE input element_data = {
  25. type = "hidden"
  26. name = "project_id"
  27. value = project_id
  28. } ?>
  29. <?lsmb INCLUDE input element_data = {
  30. type = "hidden"
  31. name = "account_class"
  32. value = account_class
  33. } ?>
  34. <?lsmb INCLUDE input element_data = {
  35. type = "hidden"
  36. name = "department_id"
  37. value = department_id
  38. } ?>
  39. <?lsmb INCLUDE input element_data = {
  40. type = "hidden"
  41. name = "source_start"
  42. value = source_start
  43. } ?>
  44. <?lsmb INCLUDE input element_data = {
  45. type = "hidden"
  46. name = "approved"
  47. value = approved
  48. } ?>
  49. <?lsmb INCLUDE input element_data = {
  50. type = "hidden"
  51. name = "currency"
  52. value = currency
  53. } ?>
  54. <?lsmb INCLUDE input element_data = {
  55. type = "hidden"
  56. name = "ar_ap_accno"
  57. value = ar_ap_accno
  58. } ?>
  59. <?lsmb INCLUDE input element_data = {
  60. type = "hidden"
  61. name = "date_from"
  62. value = date_from
  63. } ?>
  64. <?lsmb INCLUDE input element_data = {
  65. type = "hidden"
  66. name = "date_to"
  67. value = date_to
  68. } ?>
  69. <?lsmb INCLUDE input element_data = {
  70. type = "hidden"
  71. name = "business_id"
  72. value = business_id
  73. } ?>
  74. <?lsmb INCLUDE input element_data = {
  75. type = "hidden"
  76. name = "batch_id"
  77. value = batch_id
  78. } ?>
  79. <div class="container">
  80. <div id="date_row">
  81. <label for="date_paid"><?lsmb text('Posting Date:') ?></label>
  82. <?lsmb IF batch_id ?>
  83. <?lsmb IF ! datepaid ?><?lsmb datepaid = batch_date
  84. ?><?lsmb END ?>
  85. <span id="date_paid"><?lsmb datepaid ?></span>
  86. <?lsmb END ?>
  87. <?lsmb INCLUDE input element_data= {
  88. value = datepaid
  89. name = "datepaid"
  90. size = 20
  91. class = (batch_id) ? "hidden" : "date"
  92. type = (batch_id) ? "hidden" : "text"
  93. } ?>
  94. </div>
  95. <div id="date_filter_row">
  96. <label for="filter_from"><?lsmb text('Filtering From:') ?></label>
  97. <span id="filter_from"><?lsmb date_from ?> </span>
  98. <label for="filter_to"><?lsmb text('To:') ?></label>
  99. <span id="filter_to"><?lsmb date_to ?> </span>
  100. <!-- the department will be shown if it was selected in the first step -->
  101. <?lsmb IF department.value # Only process element if one exists. As in project above ?>
  102. <div class="info">
  103. <label for="department_info"><?lsmb text('Department') ?></label>
  104. <span id="department_info">
  105. <?lsmb department ?>
  106. </span>
  107. </div>
  108. <?lsmb END ?>
  109. <div class="info" id="account_row">
  110. <label for="account_info">
  111. <?lsmb text('Account:'); ?>
  112. </label>
  113. <span id="account_info"></td>
  114. <?lsmb FOREACH a = debt_accounts ?><?lsmb
  115. IF a.accno == ar_ap_accno
  116. ?><?lsmb a.accno ?>--<?lsmb a.description ?><?lsmb
  117. END # If a.accno... ?><?lsmb
  118. END # FOREACH a ?>
  119. </span>
  120. </div>
  121. <?lsmb IF defaultcurrency != curr ?>
  122. <div class="info" id="exrate_row">
  123. <?lsmb PROCESS input element_data= {
  124. label = text('Exchange Rate')
  125. type = text
  126. class = "numeric"
  127. name = 'exchange_rate'
  128. value = exchange_rate
  129. size = 20
  130. } # ' ?>
  131. </div>
  132. <?lsmb END ?>
  133. <?lsmb IF business ?>
  134. <div class="info">
  135. <label for="business_info"><?lsmb text('Business:') ?></label>
  136. <span id="business_info"><?lsmb FOREACH b = businesses ?>
  137. <?lsmb IF b.id == business ?>
  138. <?lsmb b.id ?> -- <?lsmb b.description ?>
  139. <?lsmb END # if b.id... ?>
  140. <?lsmb END # foreach b ?></span>
  141. </div>
  142. <?lsmb END # if business ?>
  143. <div class="info" id="cash_account_div">
  144. <?lsmb INCLUDE input element_data = {
  145. type = "hidden"
  146. name = "cash_accno"
  147. value = cash_accno
  148. } ?>
  149. <label><?lsmb text('Pay From') ?></label>
  150. <?lsmb FOR c = cash_accounts -?>
  151. <?lsmb IF c.accno == cash_accno -?>
  152. <?lsmb c.accno ?>--<?lsmb c.description ?>
  153. <?lsmb END # if c.accno -?>
  154. <?lsmb END # for c -?>
  155. </div>
  156. <table id="payments_table">
  157. <tr class="listheading">
  158. <th class="account_number"><?lsmb text('Account_number') ?></th>
  159. <th class="entity_name"><?lsmb text('Name') ?></th>
  160. <th class="invoice"><?lsmb text('Invoice Total') ?></th>
  161. <th class="payment"><?lsmb text('Payment') ?></th>
  162. <th class="payment"><?lsmb text('Details') ?></th>
  163. </tr>
  164. <?lsmb rc = 1 ?><?lsmb count = 0 ?>
  165. <?lsmb FOREACH r = contact_invoices ?>
  166. <?lsmb rc = (rc + 1) % 2; count = count + 1 ?>
  167. <tr class="listrow<?lsmb rc ?>">
  168. <td class="account_number" rowspan="2" >
  169. <?lsmb INCLUDE input element_data = {
  170. type = "hidden"
  171. name = "contact_$count"
  172. value = r.contact_id
  173. } ?>
  174. <?lsmb INCLUDE input element_data = {
  175. type = "checkbox"
  176. name = "id_$r.contact_id"
  177. value = r.contact_id
  178. checked = (r.unselected) ? "" : "checked"
  179. } ?>
  180. <?lsmb r.account_number ?>
  181. </td>
  182. <td class="entity_name"><span class="<?lsmb
  183. IF r.has_vouchers; 'name_has_vouchers' ;
  184. ELSE ; 'name_has_no_vouchers' ;
  185. END
  186. ?>"><?lsmb r.contact_name ?></span></td>
  187. <td class="invoice"><?lsmb r.total_due ?> <?lsmb currency ?></td>
  188. <td class="payment" class="details_select">
  189. <?lsmb INCLUDE input element_data = {
  190. name = "paid_$r.contact_id"
  191. value = "some"
  192. label = text('Some')
  193. checked = ("${paid_$r.contact_id}" == 'some') ? checked : ""
  194. type = "radio"
  195. } ?>
  196. <?lsmb INCLUDE input element_data = {
  197. name = "paid_$r.contact_id"
  198. value = "all"
  199. label = text('All')
  200. checked = ("${paid_$r.contact_id}" != 'some') ? checked : ""
  201. type = "radio"
  202. } ?>
  203. </td>
  204. <td rowspan = 2><?lsmb INCLUDE input element_data = {
  205. name = "source_$r.contact_id"
  206. value = r.source
  207. type = "text"
  208. size = "20"
  209. label = text('Source')
  210. } ?></td>
  211. </tr>
  212. <tr class="listrow<?lsmb rc ?>">
  213. <td class="invoice_detail_list" colspan="3">
  214. <table id = "invoice_data_table_<?lsmb r.contact_id ?>" width="100%" class = "detail_table_visible">
  215. <tr class="listheading">
  216. <th class="invoice_date_list"><?lsmb text('Date') ?>
  217. </th>
  218. <th class="invoice_list">
  219. <?lsmb text('Invoice Number') ?>
  220. </th>
  221. <th class="total_due_list"><?lsmb text('Total') ?></th>
  222. <th class="paid_list"><?lsmb text('Paid') ?></th>
  223. <th class="net_due_list"><?lsmb text('Net Due') ?> </th>
  224. <th class="to_pay_list"><?lsmb text('To Pay') ?></th>
  225. </tr>
  226. <?lsmb icount = 0 ?>
  227. <?lsmb FOREACH i = r.invoices ?>
  228. <?lsmb icount = icount + 1 ?>
  229. <tr>
  230. <td class="invoice_date_list">&nbsp;<?lsmb i.2 ?></td>
  231. <?lsmb PROCESS input element_data = {
  232. name = "invdate_$i.0"
  233. type = "hidden"
  234. value = i.2
  235. } ?>
  236. <td class="invoice_list">&nbsp;<?lsmb i.1 ?></td>
  237. <?lsmb PROCESS input element_data = {
  238. name = "invnumber_$i.0"
  239. type = "hidden"
  240. value = i.1
  241. } ?>
  242. <td class="total_due_list">&nbsp;
  243. <?lsmb INCLUDE format_money number=i.3 ?></td>
  244. <td class="paid_list">&nbsp;
  245. <?lsmb INCLUDE format_money number=i.4 ?></td>
  246. <td class="net_due_list">&nbsp;
  247. <?lsmb INCLUDE format_money number= i.6 ?>
  248. <?lsmb currency ?></td>
  249. <td class="to_pay_list">
  250. <?lsmb IF ! ${"payment_$r.contact_id_$i.0"} ?>
  251. <?lsmb ${"payment_$r.contact_id_$i.0"} =
  252. INCLUDE format_money number= i.6 ?>
  253. <?lsmb END # if ?>
  254. <?lsmb INCLUDE input element_data = {
  255. name = "payment_$r.contact_id_$i.0"
  256. value = ${"payment_$r.contact_id_$i.0"}
  257. size = 20
  258. type = "text"
  259. class = "monetary"
  260. } ?>
  261. <?lsmb INCLUDE input element_data = {
  262. type = "hidden"
  263. name = "invoice_${r.contact_id}_$icount"
  264. value = i.0
  265. } ?>
  266. <?lsmb INCLUDE input element_data = {
  267. type = "hidden"
  268. name = "net_$i.0"
  269. value = ${"payment_$r.contact_id_$i.0"}
  270. } ?>
  271. </td>
  272. </tr>
  273. <?lsmb END # foreach i ?>
  274. <?lsmb INCLUDE input element_data = {
  275. type = "hidden"
  276. name = "invoice_count_${r.contact_id}"
  277. value = icount
  278. } ?>
  279. </table>
  280. </tr>
  281. <?lsmb END # foreach r ?>
  282. </table>
  283. <?lsmb INCLUDE input element_data = {
  284. type = "hidden"
  285. name = "contact_count"
  286. value = count
  287. } ?>
  288. <?lsmb PROCESS input element_data = {
  289. name = "multiple"
  290. type = "hidden"
  291. value = '1'
  292. } ?>
  293. <?lsmb INCLUDE button element_data = {
  294. text = text((batch_id) ? 'Save' : 'Post'),
  295. value = 'post_payments_bulk'
  296. class = "submit"
  297. name = 'action'
  298. } ?>
  299. <?lsmb INCLUDE button element_data = {
  300. text = text('Add Payment Fees') # '
  301. value = 'paycom_add_fees'
  302. class = 'submit'
  303. name = 'action'
  304. } ?>
  305. <?lsmb IF can_print ?>
  306. <?lsmb INCLUDE select element_data = {
  307. name = "media"
  308. class = "select"
  309. options = media_options
  310. value = media
  311. } ?>
  312. <?lsmb INCLUDE select element_data = {
  313. name = "format"
  314. class = "select"
  315. options = format_options
  316. value = format
  317. } ?>
  318. <?lsmb INCLUDE button element_data = {
  319. text = text('Print')
  320. value = 'print'
  321. class = 'submit'
  322. name = 'action'
  323. } ?>
  324. <?lsmb END # IF can_print ?>
  325. </form>
  326. </body>
  327. </html>