PageRenderTime 180ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

/grails-app/views/poliza/editaEgreso.gsp

http://github.com/jdmr/mateo
text | 172 lines | 172 code | 0 blank | 0 comment | 0 complexity | 438abb7a5d85d62cd2fda4d31a66101b MD5 | raw file
  1. <%@ page import="contabilidad.Poliza" %>
  2. <!doctype html>
  3. <html>
  4. <head>
  5. <meta name="layout" content="main">
  6. <g:set var="entityName" value="${message(code: 'poliza.label', default: 'Poliza')}" />
  7. <title><g:message code="poliza.edita.egreso.label" args="[poliza.folio]" /></title>
  8. <r:require module="jquery" />
  9. </head>
  10. <body>
  11. <a href="#edit-poliza" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content&hellip;"/></a>
  12. <div class="nav" role="navigation">
  13. <ul>
  14. <li><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></li>
  15. <li><g:link class="list" action="lista"><g:message code="default.list.label" args="[entityName]" /></g:link></li>
  16. <li><g:link class="create" controller="transaccion" action="nueva" id="${poliza.id}"><g:message code="poliza.button.nuevaTransaccion.label" /></g:link></li>
  17. </ul>
  18. </div>
  19. <div id="edit-poliza" class="content scaffold-edit" role="main">
  20. <h1><g:message code="poliza.edita.egreso.label" args="[poliza.folio]" /></h1>
  21. <g:if test="${flash.message}">
  22. <div class="message" role="status">${flash.message}</div>
  23. </g:if>
  24. <g:hasErrors bean="${poliza}">
  25. <ul class="errors" role="alert">
  26. <g:eachError bean="${poliza}" var="error">
  27. <li <g:if test="${error in org.springframework.validation.FieldError}">data-field-id="${error.field}"</g:if>><g:message error="${error}"/></li>
  28. </g:eachError>
  29. </ul>
  30. </g:hasErrors>
  31. <g:form method="post" >
  32. <g:hiddenField name="id" value="${poliza?.id}" />
  33. <g:hiddenField name="version" value="${poliza?.version}" />
  34. <fieldset class="form">
  35. <g:render template="form"/>
  36. </fieldset>
  37. <g:if test="${poliza.transacciones}">
  38. <fieldset class="form" style="margin:0;padding:0;">
  39. <ol class="property-list poliza" style="margin:0;padding:0;">
  40. <li class="fieldcontain"><span>
  41. <div id="transacciones">
  42. <table>
  43. <thead>
  44. <tr>
  45. <th style="width:200px;"><g:message code="transaccion.folio.label" /></th>
  46. <th><g:message code="transaccion.descripcion.label" /></th>
  47. <th><g:message code="transaccion.tags.label" /></th>
  48. <th style="text-align:right; width:150px;"></th>
  49. </tr>
  50. </thead>
  51. <tbody>
  52. <g:each var="transaccion" in="${poliza.transacciones}">
  53. <g:set var="transaccionId" value="${transaccion.id}"/>
  54. <tr>
  55. <td>${transaccion.folio}</td>
  56. <td>${transaccion.descripcion}</td>
  57. <td>${transaccion.tags}</td>
  58. <td style="text-align:right; width:150px;"><g:link controller="transaccion" action="edita" id="${transaccion.id}"><g:message code="default.button.edit.label" /></g:link> | <g:link controller="transaccion" action="elimina" id="${transaccion.id}"><g:message code="default.button.delete.label" /></g:link></td>
  59. </tr>
  60. <tr>
  61. <td colspan="4">
  62. <table>
  63. <thead>
  64. <tr>
  65. <th style="width:100px;">${message(code:'transaccion.cuenta.label')}</th>
  66. <th style="width:100px;">${message(code:'transaccion.auxiliar.label')}</th>
  67. <th>${message(code:'transaccion.nombre.label')}</th>
  68. <th style='text-align:right;width:130px;'>${message(code:'transaccion.parcial.label')}</th>
  69. <th style='text-align:right;width:130px;'>${message(code:'transaccion.debe.label')}</th>
  70. <th style='text-align:right;width:130px;'>${message(code:'transaccion.haber.label')}</th>
  71. </tr>
  72. </thead>
  73. <tbody>
  74. <g:set var="counter" value="${1}" />
  75. <g:set var="counter2" value="${1}" />
  76. <g:set var="movimientos" value="${origenes[transaccion.id]}"/>
  77. <g:each var="movimiento" in="${movimientos}">
  78. <tr>
  79. <td <g:if test="${movimiento.padre}">style="text-decoration:underline;"</g:if>><g:if test="${!movimiento.auxiliar}">${movimiento.cuenta.numero}</g:if></td>
  80. <td>${movimiento.auxiliar?.numero}</td>
  81. <td <g:if test="${movimiento.padre}">style="text-decoration:underline;"</g:if>><g:if test="${!movimiento.auxiliar}">${movimiento.cuenta.descripcion}</g:if><g:else>${movimiento.auxiliar.descripcion}</g:else></td>
  82. <td style='text-align:right;<g:if test="${movimiento.ultimo}">text-decoration:underline;</g:if>'>
  83. <g:if test="${movimiento.auxiliar}">
  84. <g:if test="${(counter2++) == 1}">
  85. <g:formatNumber type="currency" number="${movimiento.importe}" />
  86. </g:if>
  87. <g:else>
  88. <g:formatNumber type="currency" number="${movimiento.importe}" currencySymbol="" />
  89. </g:else>
  90. </g:if>
  91. </td>
  92. <td style='text-align:right;'>
  93. <g:if test="${!movimiento.auxiliar}">
  94. <g:if test="${(counter++) == 1}">
  95. <g:formatNumber type="currency" number="${movimiento.importe}" />
  96. </g:if>
  97. <g:else>
  98. <g:formatNumber type="currency" number="${movimiento.importe}" currencySymbol="" />
  99. </g:else>
  100. </g:if>
  101. </td>
  102. <td>&nbsp;</td>
  103. </tr>
  104. <g:if test="${movimiento.ultimo}"><g:set var="counter2" value="${1}" /></g:if>
  105. </g:each>
  106. <g:set var="counter" value="${1}" />
  107. <g:set var="counter2" value="${1}" />
  108. <g:set var="movimientos" value="${destinos[transaccion.id]}"/>
  109. <g:each var="movimiento" in="${movimientos}">
  110. <tr>
  111. <td <g:if test="${movimiento.padre}">style="text-decoration:underline;"</g:if>><g:if test="${!movimiento.auxiliar}">${movimiento.cuenta.numero}</g:if></td>
  112. <td>${movimiento.auxiliar?.numero}</td>
  113. <td style='padding-left:30px;<g:if test="${movimiento.padre}">text-decoration:underline;</g:if>'><g:if test="${!movimiento.auxiliar}">${movimiento.cuenta.descripcion}</g:if><g:else>${movimiento.auxiliar.descripcion}</g:else></td>
  114. <td style='text-align:right;<g:if test="${movimiento.ultimo}">text-decoration:underline;</g:if>'>
  115. <g:if test="${movimiento.auxiliar}">
  116. <g:if test="${(counter2++) == 1}">
  117. <g:formatNumber type="currency" number="${movimiento.importe}" />
  118. </g:if>
  119. <g:else>
  120. <g:formatNumber type="currency" number="${movimiento.importe}" currencySymbol="" />
  121. </g:else>
  122. </g:if>
  123. </td>
  124. <td>&nbsp;</td>
  125. <td style='text-align:right;'>
  126. <g:if test="${!movimiento.auxiliar}">
  127. <g:if test="${(counter++) == 1}">
  128. <g:formatNumber type="currency" number="${movimiento.importe}" />
  129. </g:if>
  130. <g:else>
  131. <g:formatNumber type="currency" number="${movimiento.importe}" currencySymbol="" />
  132. </g:else>
  133. </g:if>
  134. </td>
  135. </tr>
  136. <g:if test="${movimiento.ultimo}"><g:set var="counter2" value="${1}" /></g:if>
  137. </g:each>
  138. </tbody>
  139. <tfoot>
  140. <tr>
  141. <th colspan="4" style="text-align:right;">TOTAL</th>
  142. <th style="text-align:right;"><g:formatNumber type="currency" number="${transaccion.importe}" /></th>
  143. <th style="text-align:right;"><g:formatNumber type="currency" number="${transaccion.importe}" /></th>
  144. </tr>
  145. </tfoot>
  146. </table>
  147. </td>
  148. </tr>
  149. </g:each>
  150. </tbody>
  151. </table>
  152. </div>
  153. </span>
  154. </li>
  155. </ol>
  156. </fieldset>
  157. </g:if>
  158. <fieldset class="buttons">
  159. <g:actionSubmit class="save" action="nuevaTransaccion" value="${message(code: 'poliza.button.nuevaTransaccion.label', default: 'Update')}" />
  160. <g:actionSubmit class="save" action="actualiza" value="${message(code: 'default.button.update.label', default: 'Update')}" />
  161. <g:actionSubmit class="save" action="cierra" value="${message(code: 'poliza.button.cierra.label', default: 'Cierra')}" onclick="return confirm('${message(code: 'poliza.button.cierra.confirm.message', default: 'Are you sure?')}');" />
  162. <g:actionSubmit class="delete" action="elimina" value="${message(code: 'default.button.delete.label', default: 'Delete')}" formnovalidate="" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" />
  163. </fieldset>
  164. </g:form>
  165. </div>
  166. <r:script>
  167. $(document).ready(function() {
  168. $('#descripcion').focus();
  169. });
  170. </r:script>
  171. </body>
  172. </html>