Changeset 892 for branches/features
- Timestamp:
- Apr 21, 2011, 5:57:17 PM (14 years ago)
- Location:
- branches/features/purchaseOrders/grails-app/domain
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/features/purchaseOrders/grails-app/domain/InventoryItem.groovy
r726 r892 1 1 class InventoryItem { 2 2 3 InventoryGroup inventoryGroup 3 4 InventoryType inventoryType … … 6 7 Picture picture 7 8 Supplier preferredSupplier 9 8 10 String name 9 11 String description = "" -
branches/features/purchaseOrders/grails-app/domain/InventoryItemPurchase.groovy
r891 r892 1 1 class InventoryItemPurchase { 2 2 3 PurchaseOrder purchaseOrder 3 4 Person enteredBy 4 5 Person lastUpdatedBy … … 14 15 15 16 Integer quantity 16 PurchaseOrder purchaseOrder17 17 BigDecimal orderValueAmount 18 18 Currency orderValueCurrency … … 29 29 static constraints = { 30 30 quantity(min:0) 31 /// @todo: check constraints. 31 32 // purchaseOrderNumber(blank:false, maxSize:50, validator: {val, obj -> 32 33 // // For orders the purchaseOrderNumber must be unique for an inventoryItem. -
branches/features/purchaseOrders/grails-app/domain/PurchaseOrder.groovy
r891 r892 1 class PurchaseOrder { 1 2 2 class PurchaseOrder { 3 Supplier supplier 4 3 5 String comments 4 Supplier supplier5 6 Date ordered 7 6 8 static hasMany = [inventoryItemPurchases: InventoryItemPurchase] 7 9 8 10 static belongsTo = [purchaseOrderNumber: PurchaseOrderNumber] 9 10 11 11 12 static constraints = { -
branches/features/purchaseOrders/grails-app/domain/PurchaseOrderNumber.groovy
r891 r892 1 class PurchaseOrderNumber { 1 2 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 { 3 PurchaseOrder purchaseOrder 4 10 5 String value 11 PurchaseOrder purchaseOrder12 6 13 7 static transients = ['description'] … … 18 12 19 13 String getDescription() { 20 if (!purchaseOrder) {21 return value + "- new"22 } else {14 if (!purchaseOrder) 15 return "${value} - new" 16 else 23 17 return "${value} for ${purchaseOrder.supplier}" 24 }25 18 } 26 19 }
Note: See TracChangeset
for help on using the changeset viewer.