Last change
on this file since 891 was
891,
checked in by gav, 14 years ago
|
Purchase Order first draft as per ticket #30, by John Yesberg.
|
File size:
534 bytes
|
Line | |
---|
1 | |
---|
2 | /** |
---|
3 | * Created by IntelliJ IDEA. |
---|
4 | * User: John |
---|
5 | * Date: 18/04/2011 |
---|
6 | * Time: 3:01:53 PM |
---|
7 | * To change this template use File | Settings | File Templates. |
---|
8 | */ |
---|
9 | class PurchaseOrderNumber { |
---|
10 | String value |
---|
11 | PurchaseOrder purchaseOrder |
---|
12 | |
---|
13 | static transients = ['description'] |
---|
14 | |
---|
15 | static constraints = { |
---|
16 | purchaseOrder(nullable:true) |
---|
17 | } |
---|
18 | |
---|
19 | String getDescription() { |
---|
20 | if (!purchaseOrder) { |
---|
21 | return value + " - new" |
---|
22 | } else { |
---|
23 | return "${value} for ${purchaseOrder.supplier}" |
---|
24 | } |
---|
25 | } |
---|
26 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.