Changeset 610 for trunk/grails-app/services/InventoryPurchaseService.groovy
- Timestamp:
- Jun 22, 2010, 5:55:31 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/services/InventoryPurchaseService.groovy
r605 r610 264 264 result.inventoryItemPurchaseInstance.inventoryItem.unitOfMeasure 265 265 266 // Prevent ordering on obsolete or inactive inventoryItem. 267 def isObsolete = result.inventoryItemPurchaseInstance.inventoryItem?.isObsolete 268 def isActive = result.inventoryItemPurchaseInstance.inventoryItem?.isActive 269 if(isObsolete || !isActive) 270 return fail(code:"inventoryItemPurchase.operation.not.permitted.on.inactive.or.obsolete.item") 271 266 272 if(result.inventoryItemPurchaseInstance.hasErrors() || !result.inventoryItemPurchaseInstance.save()) 267 273 return fail(code:"default.create.failure")
Note: See TracChangeset
for help on using the changeset viewer.