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

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

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

File size: 531 bytes
RevLine 
[116]1class 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
[177]9//     static belongsTo = []
[116]10
11    static constraints = {
12        inventoryItem()
[175]13        quantity(min:1)
[116]14        inventoryMovementType()
[146]15        task(nullable:true)
[217]16        person()
[116]17        date()
18    }
19
[175]20    String toString() {
[217]21        "${this.quantity} ${inventoryMovementType.name} on ${date.format('EEE, dd-MMM-yyyy')} by ${person}."
[175]22    }
[116]23}
Note: See TracBrowser for help on using the repository browser.