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

Last change on this file since 893 was 892, checked in by gav, 14 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.