Changeset 718
- Timestamp:
- Nov 24, 2010, 7:07:48 PM (14 years ago)
- Location:
- trunk/grails-app
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/domain/InventoryItem.groovy
r715 r718 4 4 UnitOfMeasure unitOfMeasure 5 5 InventoryLocation inventoryLocation 6 Period averageDeliveryPeriod7 6 Picture picture 8 7 Supplier preferredSupplier … … 18 17 Integer reorderPoint 19 18 Integer reorderQuantity 20 Integer averageDeliveryTime21 19 boolean isActive = true 22 20 boolean isObsolete = false … … 55 53 preferredSupplier(nullable:true) 56 54 preferredManufacturer(nullable:true) 57 averageDeliveryTime(nullable:true)58 averageDeliveryPeriod(nullable:true)59 55 } 60 56 -
trunk/grails-app/i18n/messages.properties
r716 r718 247 247 Infers the max holding quantity (Reorder Point + Reorder Quantity). \ 248 248 Often determined by a price break or minimum order quantity. 249 inventory.item.average.delivery.time=Delivery Time250 inventory.item.average.delivery.time.help=The average or expected delivery time from the supplier to site.251 249 inventory.item.is.active=Active 252 250 inventory.item.is.active.help=Disable to remove from searches. -
trunk/grails-app/services/InventoryCsvService.groovy
r715 r718 52 52 def line = [] 53 53 def lineNumber = 0 54 def maxNumberOfColumns = 2 554 def maxNumberOfColumns = 23 55 55 def inventoryParams = [:] 56 56 def inventoryProperties = ["name", "description", "comment", "unitsInStock", "reorderPoint", "reorderQuantity", 57 57 "unitOfMeasure", "estimatedUnitPriceAmount", "estimatedUnitPriceCurrency", 58 58 "enableReorderListing", "inventoryLocation", "inventoryStore", "site", 59 "inventoryGroup", "inventoryType", "averageDeliveryTime", "averageDeliveryPeriod",59 "inventoryGroup", "inventoryType", 60 60 "suppliersPartNumber", "preferredSupplier", "alternateSuppliers", 61 61 "manufacturersPartNumber", "preferredManufacturer", "alternateManufacturers", … … 79 79 def inventoryStoreInstance 80 80 def inventoryLocationInstance 81 def averageDeliveryPeriodInstance82 81 83 82 def tempPreferredSupplierItemAndType = '' … … 237 236 if(!unitOfMeasureInstance.save()) { 238 237 log.error "Failed to create unit of measure on line: " + lineNumber 239 return fail(code: "inventory.import.failure", args: [lineNumber, logFileLink])240 }241 }242 243 // AverageDeliveryPeriod.244 if(inventoryParams.averageDeliveryPeriod) {245 averageDeliveryPeriodInstance = Period.findByPeriod(inventoryParams.averageDeliveryPeriod)246 if(!averageDeliveryPeriodInstance) {247 log.error "Failed, not a valid delivery period on line: " + lineNumber248 238 return fail(code: "inventory.import.failure", args: [lineNumber, logFileLink]) 249 239 } … … 426 416 inventoryParams.inventoryType = inventoryTypeInstance 427 417 inventoryParams.unitOfMeasure = unitOfMeasureInstance 428 inventoryParams.averageDeliveryPeriod = averageDeliveryPeriodInstance429 418 inventoryParams.preferredSupplier = preferredSupplierInstance 430 419 inventoryParams.preferredManufacturer = preferredManufacturerInstance … … 524 513 "Mechanical Stock", 525 514 "Consumable", 526 "7", "Week(s)",527 515 "123", "Multi Supplier@Local", 528 516 "Multi Distributors1@OEM; Multi Distributors2@Local", … … 540 528 "Mechanical Stock", 541 529 "Consumable", 542 "2", "Month(s)",543 530 "456KL", "Multi Supplier", 544 531 "Multi Distributors1; Multi Distributors2", … … 584 571 row.add(inventoryItem.inventoryGroup) 585 572 row.add(inventoryItem.inventoryType) 586 row.add(inventoryItem.averageDeliveryTime)587 row.add(inventoryItem.averageDeliveryPeriod)588 573 row.add(inventoryItem.suppliersPartNumber) 589 574 … … 827 812 ["Name*", "Description", "Comment", "Units In Stock", "Reorder Point*", "Reorder Quantity", "Unit Of Measure*", 828 813 "Estimated Unit Price", "Currency", "Enable Reorder", "Location*", "Store*", "Site*", "Group*", "Type*", 829 " Average Delivery Time", "Average Delivery Period", "Supplier's Part Number", "Preferred Supplier", "Alternate Suppliers",814 "Supplier's Part Number", "Preferred Supplier", "Alternate Suppliers", 830 815 "Manufacturer's Part Number", "Preferred Manufacturer", "Alternate Manufacturers", "Alternate Item", "Spare For"] 831 816 } -
trunk/grails-app/views/inventoryItemDetailed/create.gsp
r716 r718 121 121 <tr class="prop"> 122 122 <td valign="top" class="name"> 123 <label for="averageDeliveryTime">Average Delivery Time:</label> 124 </td> 125 <td valign="top"> 126 <input class="medium ${hasErrors(bean:inventoryItemInstance,field:'averageDeliveryTime','errors')}" 127 type="text" id="averageDeliveryTime" name="averageDeliveryTime" 128 value="${fieldValue(bean:inventoryItemInstance,field:'averageDeliveryTime')}" /> 129 <g:select optionKey="id" from="${Period.list()}" name="averageDeliveryPeriod.id" value="${inventoryItemInstance?.averageDeliveryPeriod?.id}" noSelection="['null':'--None--']"></g:select> 130 <g:helpBalloon class="helpballoon" code="inventory.item.average.delivery.time" /> 131 </td> 132 </tr> 133 134 <tr class="prop"> 135 <td valign="top" class="name"> 136 <label for="averageDeliveryTime">Estimated Unit Price:</label> 123 <label for="estimatedUnitPriceAmount">Estimated Unit Price:</label> 137 124 </td> 138 125 <td valign="top"> -
trunk/grails-app/views/inventoryItemDetailed/edit.gsp
r716 r718 157 157 <tr class="prop"> 158 158 <td valign="top" class="name"> 159 <label for="averageDeliveryTime">Average Delivery Time:</label> 160 </td> 161 <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'averageDeliveryTime','errors')}"> 162 <input type="text" id="averageDeliveryTime" name="averageDeliveryTime" value="${fieldValue(bean:inventoryItemInstance,field:'averageDeliveryTime')}" /> 163 <g:select optionKey="id" 164 from="${Period.list()}" 165 name="averageDeliveryPeriod.id" 166 value="${inventoryItemInstance?.averageDeliveryPeriod?.id}" 167 noSelection="['null':'--None--']"> 168 </g:select> 169 <g:helpBalloon class="helpballoon" code="inventory.item.average.delivery.time" /> 170 </td> 171 </tr> 172 173 <tr class="prop"> 174 <td valign="top" class="name"> 175 <label for="averageDeliveryTime">Estimated Unit Price:</label> 159 <label for="estimatedUnitPriceAmount">Estimated Unit Price:</label> 176 160 </td> 177 161 <td valign="top" class="value"> -
trunk/grails-app/views/inventoryItemDetailed/search.gsp
r645 r718 240 240 action="search" 241 241 class="overlayPane" 242 excludeProperties="estimatedUnitPriceCurrency, 243 averageDeliveryTime" 242 excludeProperties="estimatedUnitPriceCurrency" 244 243 associatedProperties="inventoryLocation.name, 245 244 spareFor.name, -
trunk/grails-app/views/inventoryItemDetailed/show.gsp
r716 r718 300 300 301 301 <tr class="prop"> 302 <td valign="top" class="name">Average Delivery Time:</td>303 <td valign="top" class="value">304 ${fieldValue(bean:inventoryItemInstance, field:'averageDeliveryTime')}305 ${fieldValue(bean:inventoryItemInstance, field:'averageDeliveryPeriod')}306 </td>307 </tr>308 309 <tr class="prop">310 302 <td valign="top" class="name">Manufacturers Part Number:</td> 311 303 <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'manufacturersPartNumber')}</td>
Note: See TracChangeset
for help on using the changeset viewer.