source: trunk/grails-app/domain/InventoryMovement.groovy @ 263

Last change on this file since 263 was 217, checked in by gav, 15 years ago

Record person performing the inventory movement as per ticket #24.

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