source: branches/features/purchaseOrders/grails-app/domain/PurchaseOrderNumber.groovy @ 892

Last change on this file since 892 was 892, checked in by gav, 13 years ago

Formatting only, no domain change.

File size: 367 bytes
RevLine 
[892]1class PurchaseOrderNumber {
[891]2
3    PurchaseOrder purchaseOrder
4
[892]5    String value
6
[891]7    static transients = ['description']
8
9    static constraints = {
10        purchaseOrder(nullable:true)
11    }
12
13    String getDescription() {
[892]14        if (!purchaseOrder)
15            return "${value} - new"
16        else
[891]17            return "${value} for ${purchaseOrder.supplier}"
18    }
19}
Note: See TracBrowser for help on using the repository browser.