PageRenderTime 21ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/grails-app/domain/contabilidad/Movimiento.groovy

http://github.com/jdmr/mateo
Groovy | 32 lines | 26 code | 6 blank | 0 comment | 0 complexity | eecd6f3cad9675415d45dbec70758d9b MD5 | raw file
  1. package contabilidad
  2. class Movimiento {
  3. BigDecimal importe = new BigDecimal('0')
  4. Cuenta cuenta
  5. Auxiliar auxiliar
  6. Date dateCreated
  7. Date lastUpdated
  8. boolean padre = false
  9. boolean ultimo = false
  10. Transaccion origen
  11. Transaccion destino
  12. static transients = ['padre','ultimo']
  13. static belongsTo = [cuenta:Cuenta, origen:Transaccion, destino:Transaccion]
  14. static constraints = {
  15. importe scale:2, precision:8
  16. auxiliar nullable:true
  17. origen nullable:true
  18. destino nullable:true
  19. }
  20. static mapping = {
  21. table 'movimientos'
  22. }
  23. String toString() {
  24. return "$cuenta : $importe"
  25. }
  26. }