| 1 | |
|---|
| 2 | |
|---|
| 3 | <html> |
|---|
| 4 | <head> |
|---|
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
|---|
| 6 | <meta name="layout" content="main" /> |
|---|
| 7 | <title>Create InventoryItem</title> |
|---|
| 8 | <nav:resources override="true"/> |
|---|
| 9 | </head> |
|---|
| 10 | <body> |
|---|
| 11 | <div class="nav"> |
|---|
| 12 | <nav:renderSubItems group="nav"/> |
|---|
| 13 | </div> |
|---|
| 14 | <div class="body"> |
|---|
| 15 | <g:render template="/shared/messages" /> |
|---|
| 16 | <g:hasErrors bean="${inventoryItemInstance}"> |
|---|
| 17 | <div class="errors"> |
|---|
| 18 | <g:renderErrors bean="${inventoryItemInstance}" as="list" /> |
|---|
| 19 | </div> |
|---|
| 20 | </g:hasErrors> |
|---|
| 21 | <g:form action="save" method="post" > |
|---|
| 22 | <div class="dialog"> |
|---|
| 23 | <table> |
|---|
| 24 | <tbody> |
|---|
| 25 | |
|---|
| 26 | <tr class="prop"> |
|---|
| 27 | <td valign="top" class="name"> |
|---|
| 28 | <label for="name">Name:</label> |
|---|
| 29 | </td> |
|---|
| 30 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'name','errors')}"> |
|---|
| 31 | <input type="text" class="description" maxlength="50" id="name" name="name" value="${fieldValue(bean:inventoryItemInstance,field:'name')}"/> |
|---|
| 32 | <g:helpBalloon class="helpballoon" code="inventory.item.name" /> |
|---|
| 33 | </td> |
|---|
| 34 | </tr> |
|---|
| 35 | |
|---|
| 36 | <tr class="prop"> |
|---|
| 37 | <td valign="top" class="name"> |
|---|
| 38 | <label for="description">Description:</label> |
|---|
| 39 | </td> |
|---|
| 40 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'description','errors')}"> |
|---|
| 41 | <textarea rows="5" cols="40" name="description">${fieldValue(bean:inventoryItemInstance, field:'description')}</textarea> |
|---|
| 42 | <g:helpBalloon class="helpballoon" code="inventory.item.description" /> |
|---|
| 43 | </td> |
|---|
| 44 | </tr> |
|---|
| 45 | |
|---|
| 46 | <tr class="prop"> |
|---|
| 47 | <td valign="top" class="name"> |
|---|
| 48 | <label for="comment">Comment:</label> |
|---|
| 49 | </td> |
|---|
| 50 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'comment','errors')}"> |
|---|
| 51 | <textarea rows="5" cols="40" name="comment">${fieldValue(bean:inventoryItemInstance, field:'comment')}</textarea> |
|---|
| 52 | <g:helpBalloon class="helpballoon" code="inventory.item.comment" /> |
|---|
| 53 | </td> |
|---|
| 54 | </tr> |
|---|
| 55 | |
|---|
| 56 | <tr class="prop"> |
|---|
| 57 | <td valign="top" class="name"> |
|---|
| 58 | <label for="inventoryLocation">Inventory Location:</label> |
|---|
| 59 | </td> |
|---|
| 60 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'inventoryLocation','errors')}"> |
|---|
| 61 | <g:select optionKey="id" |
|---|
| 62 | from="${ InventoryLocation.list().sort { p1, p2 -> p1.toString().compareToIgnoreCase(p2.toString()) } }" |
|---|
| 63 | name="inventoryLocation.id" value="${inventoryItemInstance?.inventoryLocation?.id}" |
|---|
| 64 | optionValue="${{it.name+ ' in ' + it.inventoryStore}}"> |
|---|
| 65 | </g:select> |
|---|
| 66 | <g:helpBalloon class="helpballoon" code="inventory.item.inventory.location" /> |
|---|
| 67 | |
|---|
| 68 | <p><g:link controller="inventoryLocationDetailed" action="create">+Add Location</g:link></p> |
|---|
| 69 | </td> |
|---|
| 70 | </tr> |
|---|
| 71 | |
|---|
| 72 | <tr class="prop"> |
|---|
| 73 | <td valign="top" class="name"> |
|---|
| 74 | <label for="reorderPoint">Reorder Point:</label> |
|---|
| 75 | </td> |
|---|
| 76 | <td valign="top"> |
|---|
| 77 | <input class="medium ${hasErrors(bean:inventoryItemInstance,field:'reorderPoint','errors')}" |
|---|
| 78 | type="text" id="reorderPoint" name="reorderPoint" |
|---|
| 79 | value="${fieldValue(bean:inventoryItemInstance,field:'reorderPoint')}" /> |
|---|
| 80 | <g:helpBalloon class="helpballoon" code="inventory.item.reorder.point" /> |
|---|
| 81 | <g:select optionKey="id" |
|---|
| 82 | from="${UnitOfMeasure.list()}" |
|---|
| 83 | name="unitOfMeasure.id" |
|---|
| 84 | value="${inventoryItemInstance?.unitOfMeasure?.id}" > |
|---|
| 85 | </g:select> |
|---|
| 86 | <g:helpBalloon class="helpballoon" code="inventory.item.unit.of.measure" /> |
|---|
| 87 | </td> |
|---|
| 88 | </tr> |
|---|
| 89 | |
|---|
| 90 | <tr class="prop"> |
|---|
| 91 | <td valign="top" class="name"> |
|---|
| 92 | <label for="enableReorderListing">Enable Reorder Listing:</label> |
|---|
| 93 | </td> |
|---|
| 94 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'enableReorderListing','errors')}"> |
|---|
| 95 | <g:checkBox name="enableReorderListing" value="${inventoryItemInstance?.enableReorderListing}" ></g:checkBox> |
|---|
| 96 | <g:helpBalloon class="helpballoon" code="inventory.item.enable.reorder.listing" /> |
|---|
| 97 | </td> |
|---|
| 98 | </tr> |
|---|
| 99 | |
|---|
| 100 | <tr class="prop"> |
|---|
| 101 | <td valign="top" class="name"> |
|---|
| 102 | <label for="inventoryGroup">Inventory Group:</label> |
|---|
| 103 | </td> |
|---|
| 104 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'inventoryGroup','errors')}"> |
|---|
| 105 | <g:select optionKey="id" from="${InventoryGroup.list()}" name="inventoryGroup.id" value="${inventoryItemInstance?.inventoryGroup?.id}" ></g:select> |
|---|
| 106 | <g:helpBalloon class="helpballoon" code="inventory.item.inventory.group" /> |
|---|
| 107 | <p><g:link controller="inventoryGroupDetailed" action="create">+Add Group</g:link></p> |
|---|
| 108 | </td> |
|---|
| 109 | </tr> |
|---|
| 110 | |
|---|
| 111 | <tr class="prop"> |
|---|
| 112 | <td valign="top" class="name"> |
|---|
| 113 | <label for="inventoryType">Inventory Type:</label> |
|---|
| 114 | </td> |
|---|
| 115 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'inventoryType','errors')}"> |
|---|
| 116 | <g:select optionKey="id" from="${InventoryType.list()}" name="inventoryType.id" value="${inventoryItemInstance?.inventoryType?.id}" ></g:select> |
|---|
| 117 | <g:helpBalloon class="helpballoon" code="inventory.item.inventory.type" /> |
|---|
| 118 | </td> |
|---|
| 119 | </tr> |
|---|
| 120 | |
|---|
| 121 | <tr class="prop"> |
|---|
| 122 | <td valign="top" class="name"> |
|---|
| 123 | <label for="estimatedUnitPriceAmount">Estimated Unit Price:</label> |
|---|
| 124 | </td> |
|---|
| 125 | <td valign="top"> |
|---|
| 126 | <input class="medium ${hasErrors(bean:inventoryItemInstance,field:'estimatedUnitPriceAmount','errors')}" |
|---|
| 127 | type="text" id="estimatedUnitPriceAmount" name="estimatedUnitPriceAmount" |
|---|
| 128 | value="${fieldValue(bean:inventoryItemInstance,field:'estimatedUnitPriceAmount')}" /> |
|---|
| 129 | <g:currencySelect name="estimatedUnitPriceCurrency" |
|---|
| 130 | value="${inventoryItemInstance?.estimatedUnitPriceCurrency}" |
|---|
| 131 | from="${grailsApplication.config.currencyList}"> |
|---|
| 132 | </g:currencySelect> |
|---|
| 133 | <g:helpBalloon class="helpballoon" code="inventory.item.estimated.unit.price.amount" /> |
|---|
| 134 | </td> |
|---|
| 135 | </tr> |
|---|
| 136 | |
|---|
| 137 | <tr class="prop"> |
|---|
| 138 | <td valign="top" class="name"> |
|---|
| 139 | <label for="suppliersPartNumber">Suppliers Part Number:</label> |
|---|
| 140 | </td> |
|---|
| 141 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'suppliersPartNumber','errors')}"> |
|---|
| 142 | <input type="text" id="suppliersPartNumber" name="suppliersPartNumber" value="${fieldValue(bean:inventoryItemInstance,field:'suppliersPartNumber')}"/> |
|---|
| 143 | <g:helpBalloon class="helpballoon" code="inventory.item.suppliers.part.number" /> |
|---|
| 144 | </td> |
|---|
| 145 | </tr> |
|---|
| 146 | |
|---|
| 147 | <tr class="prop"> |
|---|
| 148 | <td valign="top" class="name"> |
|---|
| 149 | <label for="preferredSupplier">Preferred Supplier:</label> |
|---|
| 150 | </td> |
|---|
| 151 | <td valign="top"> |
|---|
| 152 | <g:select optionKey="id" from="${suppliers}" name="preferredSupplier.id" value="${inventoryItemInstance.preferredSupplier?.id}" noSelection="['null':'--None--']"></g:select> |
|---|
| 153 | <g:helpBalloon class="helpballoon" code="inventory.item.preferred.supplier" /> |
|---|
| 154 | <p><g:link controller="supplierDetailed" action="create">+Add Supplier</g:link></p> |
|---|
| 155 | </td> |
|---|
| 156 | </tr> |
|---|
| 157 | |
|---|
| 158 | <tr class="prop"> |
|---|
| 159 | <td valign="top" class="name"> |
|---|
| 160 | <label for="alternateSuppliers">Alternate Suppliers:</label> |
|---|
| 161 | </td> |
|---|
| 162 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'alternateSuppliers','errors')}"> |
|---|
| 163 | <g:select id="alternateSuppliers" name="alternateSuppliers" |
|---|
| 164 | from="${suppliers}" |
|---|
| 165 | size="5" multiple="yes" optionKey="id" |
|---|
| 166 | value="${inventoryItemInstance.alternateSuppliers?.id}" noSelection="['':'--None--']"/> |
|---|
| 167 | <g:helpBalloon class="helpballoon" code="inventory.item.alternate.suppliers" /> |
|---|
| 168 | </td> |
|---|
| 169 | </tr> |
|---|
| 170 | |
|---|
| 171 | </tbody> |
|---|
| 172 | </table> |
|---|
| 173 | </div> |
|---|
| 174 | <div class="buttons"> |
|---|
| 175 | <span class="button"><input class="save" type="submit" value="Create" /></span> |
|---|
| 176 | </div> |
|---|
| 177 | </g:form> |
|---|
| 178 | </div> |
|---|
| 179 | </body> |
|---|
| 180 | </html> |
|---|