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
|
Line | |
---|
1 | class InventoryMovement { |
---|
2 | InventoryItem inventoryItem |
---|
3 | InventoryMovementType inventoryMovementType |
---|
4 | Task task |
---|
5 | Integer quantity |
---|
6 | Date date = new Date() |
---|
7 | |
---|
8 | // static belongsTo = [] |
---|
9 | |
---|
10 | static constraints = { |
---|
11 | inventoryItem() |
---|
12 | quantity(min:1) |
---|
13 | inventoryMovementType() |
---|
14 | task(nullable:true) |
---|
15 | date() |
---|
16 | } |
---|
17 | |
---|
18 | String toString() { |
---|
19 | "${this.quantity} ${inventoryMovementType.name} on ${date.format('EEE, dd-MMM-yyyy')}" |
---|
20 | } |
---|
21 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.