summaryrefslogtreecommitdiff
path: root/UI/payments/payments_detail.html
blob: 96210ef128fb28b7a1f8e8b8a25a0e3f90aa8b10 (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 PROCESS elements.html # Include form elements helper. ?>
  9. <?lsmb contact_type = (account_class == 1) ? text('Vendor') : text('Customer')
  10. ?>
  11. <?lsmb payment_type = (account_class == 1) ? text('Payments') : text('Receipts')
  12. ?>
  13. <body id="payment_2_body">
  14. <div class="listtop"><?lsmb payment_type ?></div>
  15. <form name="pay_dues" method="post" action="payment.pl">
  16. <!-- Moving all hidden variables to the top. -CT -->
  17. <?lsmb INCLUDE input element_data = {
  18. type = "hidden"
  19. name = "project_id"
  20. value = project_id
  21. } ?>
  22. <?lsmb INCLUDE input element_data = {
  23. type = "hidden"
  24. name = "department_id"
  25. value = department_id
  26. } ?>
  27. <?lsmb INCLUDE input element_data = {
  28. type = "hidden"
  29. name = "approved"
  30. value = approved
  31. } ?>
  32. <?lsmb INCLUDE input element_data = {
  33. type = "hidden"
  34. name = "currency"
  35. value = currency
  36. } ?>
  37. <?lsmb INCLUDE input element_data = {
  38. type = "hidden"
  39. name = "payable_id"
  40. value = payable_id
  41. } ?>
  42. <?lsmb INCLUDE input element_data = {
  43. type = "hidden"
  44. name = "batch_id"
  45. value = batch_id
  46. } ?>
  47. <table width=100% id="info_table">
  48. <tr valign=top id="info_row">
  49. <td width=50% id="info_data">
  50. <table>
  51. <!-- the department will be shown if it was selected in the first step -->
  52. <?lsmb IF department.value # Only process element if one exists. As in project above ?>
  53. <tr id="department-row">
  54. <th align="right" nowrap id="department_label_column"><?lsmb text('Department') ?>:</th>
  55. <td colspan="2" id="department_column">
  56. <?lsmb department ?>
  57. </td>
  58. </tr>
  59. <?lsmb END ?>
  60. <tr id="account_row">
  61. <th align="right" nowrap id="account_label_column"><?lsmb text('Account') ?></th>
  62. <td colspan="2" id="account_column"><?lsmb payable_accno ?>--<?lsmb payable_description ?></td>
  63. </tr>
  64. <tr id="date_row">
  65. <th align="right" nowrap id="date_label_column"><?lsmb text('Date') ?></th>
  66. <td colspan="2" id="date_column">
  67. <?lsmb IF batch_id ?>
  68. <?lsmb date_paid ?>
  69. <?lsmb END ?>
  70. <?lsmb INCLUDE input element_data= {
  71. value = datepaid
  72. name = "datepaid"
  73. size = 20
  74. class = (batch_id) ? "hidden" : "date"
  75. type = (batch_id) ? "hidden" : "text"
  76. } ?> </td>
  77. </tr>
  78. <?lsmb IF defaultcurrency != curr ?>
  79. <tr id="exrate_row">
  80. <th valig="top" align="right" id="exrate_label_column"><?lsmb text('Exchange Rate') ?>:</th>
  81. <td id="exrate_column">
  82. <?lsmb PROCESS input element_data= {
  83. label = text('Exchange Rate')
  84. type = text
  85. class = "numeric"
  86. name = 'exchange_rate'
  87. value = exchange_rate
  88. size = 20
  89. } # ' ?>
  90. </td>
  91. </tr>
  92. <?lsmb END ?>
  93. </table>
  94. </td>
  95. </tr>
  96. </table>
  97. <table width="100%" border="1">
  98. <tr class="listheading">
  99. <?lsmb FOREACH column IN column_headers # Loop through columns ?>
  100. <th class="listheading"><?lsmb column.text ?></th>
  101. <?lsmb END ?>
  102. </tr>
  103. <?lsmb # We have to clear i for later usage :) ?>
  104. <?lsmb i = '0' ?>
  105. <?lsmb FOREACH row IN rows ?>
  106. <?lsmb i = i + 1; j = i % 2; alterning_style = "listrow$j"
  107. # TODO: Refactor -- CT ?>
  108. <tr class="<?lsmb alterning_style ?>"=>
  109. <td><a href="<?lsmb row.invoice.href ?>"><?lsmb row.invoice.number ?></a>
  110. <input type="hidden" value="<?lsmb row.invoice.id ?>" /> </td>
  111. <!-- we can use an href to link this invoice number to the invoice - DM -->
  112. <td><?lsmb row.invoice_date ?></td>
  113. <td><?lsmb row.amount ?></td>
  114. <td><?lsmb row.paid ?></td>
  115. <td><?lsmb row.due ?></td>
  116. <?lsmb IF defaultcurrency.text != curr.text ?>
  117. <td><?lsmb row.exchange_rate ?></td>
  118. <td><?lsmb row.due_fx ?></td>
  119. <td><div id="<?lsmb "div_topay_invoice_$i" ?>"><?lsmb row.topay ?></div></td>
  120. <?lsmb END ?>
  121. <!-- DM: This should be computed and updated to the div using -->
  122. <td><?lsmb PROCESS input element_data=row.topay_fx ?><div id="<?lsmb "div_topay_$i" ?>">
  123. <hr />
  124. <table>
  125. <!-- Row for payment cash accounts -->
  126. <tr id="<?lsmb "account-row$i"?>">
  127. <th align="right" nowrap id="<?lsmb "account_label_column$i" ?>"><?lsmb text('Account') ?></th>
  128. <td colspan="2" id="<?lsmb "account_column$i" ?>"><?lsmb PROCESS select element_data=account ?></td>
  129. </tr>
  130. <tr id="<?lsmb "source_row$i" ?>">
  131. <?lsmb # here goes all the posible sources wich we can used ?>
  132. <th align="right" nowrap id="<?lsmb "source_label_column$i" ?>"><?lsmb text('Source') ?></th>
  133. <td width="28%" id="<?lsmb "source_column$i" ?>"><?lsmb PROCESS select element_data=source ?></td>
  134. <td><?lsmb PROCESS input element_data=source_text ?></td>
  135. <td nowrap align="left"><input name="<?lsmb "optionalpay_$i" ?>" type="checkbox" class="checkbox"></td>
  136. </tr>
  137. </table>
  138. </div>
  139. <?lsmb END ?>
  140. </table>
  141. <hr />
  142. <?lsmb PROCESS button element_data=post ?>
  143. <?lsmb PROCESS button element_data=post_and_print ?>
  144. <?lsmb PROCESS select element_data=format ?>
  145. <?lsmb PROCESS select element_data=media ?>
  146. </form>
  147. </body>
  148. </html>