Changeset 726 for trunk/grails-app/domain
- Timestamp:
- Nov 28, 2010, 12:19:28 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/domain/InventoryItem.groovy
r720 r726 13 13 String suppliersPartNumber 14 14 Integer unitsInStock = 0 15 Integer reorderPoint 16 Integer reorderQuantity 15 Integer reorderPoint = 0 16 Integer reorderQuantity = 1 17 17 boolean isActive = true 18 18 boolean isObsolete = false … … 36 36 unitsInStock(min:0) 37 37 unitOfMeasure() 38 inventoryLocation() 39 inventoryGroup() 40 inventoryType() 41 isActive() 42 isObsolete() 43 enableReorderListing() 44 reorderPoint(min:0) 45 reorderQuantity(min:1) 38 46 estimatedUnitPriceAmount(nullable:true, max: new BigDecimal(1000000000000)) 39 47 estimatedUnitPriceCurrency(nullable:true) 40 reorderPoint() 41 enableReorderListing() 42 reorderQuantity(nullable:true) 43 isActive() 44 isObsolete() 45 inventoryGroup() 46 inventoryType() 47 suppliersPartNumber(blank:true, nullable:true) 48 suppliersPartNumber(blank:true, nullable:true, maxSize:50) 48 49 preferredSupplier(nullable:true) 49 50 } … … 59 60 } 60 61 62 // This additional setter is used to convert the checkBoxList string or string array 63 // of ids selected to the corresponding domain objects. 64 public void setAlternateSuppliersFromCheckBoxList(ids) { 65 def idList = [] 66 if(ids instanceof String) { 67 if(ids.isInteger()) 68 idList << ids.toLong() 69 } 70 else { 71 ids.each() { 72 if(it.isInteger()) 73 idList << it.toLong() 74 } 75 } 76 this.alternateSuppliers = idList.collect { Supplier.get( it ) } 77 } 78 79 // This additional setter is used to convert the checkBoxList string or string array 80 // of ids selected to the corresponding domain objects. 81 public void setSpareForFromCheckBoxList(ids) { 82 def idList = [] 83 if(ids instanceof String) { 84 if(ids.isInteger()) 85 idList << ids.toLong() 86 } 87 else { 88 ids.each() { 89 if(it.isInteger()) 90 idList << it.toLong() 91 } 92 } 93 this.spareFor = idList.collect { Asset.get( it ) } 94 } 95 61 96 }
Note: See TracChangeset
for help on using the changeset viewer.