Changeset 599
- Timestamp:
- Jun 18, 2010, 3:58:43 PM (15 years ago)
- Location:
- trunk/grails-app
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/domain/InventoryItemPurchase.groovy
r441 r599 22 22 static constraints = { 23 23 quantity(min:0) 24 purchaseOrderNumber(blank:false, maxSize:50) 24 purchaseOrderNumber(blank:false, maxSize:50, validator: {val, obj -> 25 // For orders the purchaseOrderNumber must be unique for an inventoryItem. 26 if(obj.inventoryItemPurchaseType.id == 1L) { 27 def list = InventoryItemPurchase.withCriteria { 28 eq('inventoryItem', obj.inventoryItem) 29 eq('purchaseOrderNumber', obj.purchaseOrderNumber) 30 eq('inventoryItemPurchaseType', obj.inventoryItemPurchaseType) 31 if(obj.id) 32 notEqual('id', obj.id) 33 } 34 if(list.size() > 0) 35 return 'not.unique.for.inventory.item.order' 36 } 37 // Success. 38 return true 39 }) 25 40 invoiceNumber(maxSize:50) 26 41 orderValueAmount(max: new BigDecimal(1000000000000)) -
trunk/grails-app/i18n/messages.properties
r592 r599 175 175 inventoryMovement.still.associated=Could not complete operation as inventory movements are still associated with this item. 176 176 177 inventoryItemPurchase.purchaseOrderNumber.not.unique.for.inventory.item.order=Purchase Order Number must be unique for this inventory item order. 177 178 inventoryItemPurchase.invoiceNumber.required=An invoice number must be supplied to approve payment. 178 179 inventoryItemPurchase.delete.failure.received.exists=Could not delete, items have been received.
Note: See TracChangeset
for help on using the changeset viewer.