Last change
on this file since 450 was
408,
checked in by gav, 15 years ago
|
Make a note on InventoryMovement belongsTo.
Small correction to InventoryItem controller.
|
File size:
605 bytes
|
Rev | Line | |
---|
[116] | 1 | class InventoryMovement { |
---|
[217] | 2 | Person person |
---|
[116] | 3 | InventoryItem inventoryItem |
---|
| 4 | InventoryMovementType inventoryMovementType |
---|
| 5 | Task task |
---|
[175] | 6 | Integer quantity |
---|
[116] | 7 | Date date = new Date() |
---|
| 8 | |
---|
[408] | 9 | // We do not want deletion of inventory items to cascade. |
---|
| 10 | //static belongsTo = [InventoryItem] |
---|
[116] | 11 | |
---|
| 12 | static constraints = { |
---|
| 13 | inventoryItem() |
---|
[175] | 14 | quantity(min:1) |
---|
[116] | 15 | inventoryMovementType() |
---|
[146] | 16 | task(nullable:true) |
---|
[217] | 17 | person() |
---|
[116] | 18 | date() |
---|
| 19 | } |
---|
| 20 | |
---|
[175] | 21 | String toString() { |
---|
[217] | 22 | "${this.quantity} ${inventoryMovementType.name} on ${date.format('EEE, dd-MMM-yyyy')} by ${person}." |
---|
[175] | 23 | } |
---|
[116] | 24 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.