Last change
on this file since 210 was
210,
checked in by gav, 15 years ago
|
Make date calculations and formatting more groovy.
|
File size:
482 bytes
|
Rev | Line | |
---|
[116] | 1 | class InventoryMovement { |
---|
| 2 | InventoryItem inventoryItem |
---|
| 3 | InventoryMovementType inventoryMovementType |
---|
| 4 | Task task |
---|
[175] | 5 | Integer quantity |
---|
[116] | 6 | Date date = new Date() |
---|
| 7 | |
---|
[177] | 8 | // static belongsTo = [] |
---|
[116] | 9 | |
---|
| 10 | static constraints = { |
---|
| 11 | inventoryItem() |
---|
[175] | 12 | quantity(min:1) |
---|
[116] | 13 | inventoryMovementType() |
---|
[146] | 14 | task(nullable:true) |
---|
[116] | 15 | date() |
---|
| 16 | } |
---|
| 17 | |
---|
[175] | 18 | String toString() { |
---|
[210] | 19 | "${this.quantity} ${inventoryMovementType.name} on ${date.format('EEE, dd-MMM-yyyy')}" |
---|
[175] | 20 | } |
---|
[116] | 21 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.