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:if test="${flash.message}"> |
---|
16 | <div class="message">${flash.message}</div> |
---|
17 | </g:if> |
---|
18 | <g:hasErrors bean="${inventoryItemInstance}"> |
---|
19 | <div class="errors"> |
---|
20 | <g:renderErrors bean="${inventoryItemInstance}" as="list" /> |
---|
21 | </div> |
---|
22 | </g:hasErrors> |
---|
23 | <g:form action="save" method="post" > |
---|
24 | <div class="dialog"> |
---|
25 | <table> |
---|
26 | <tbody> |
---|
27 | |
---|
28 | <tr class="prop"> |
---|
29 | <td valign="top" class="name"> |
---|
30 | <label for="name">Name:</label> |
---|
31 | </td> |
---|
32 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'name','errors')}"> |
---|
33 | <input type="text" class="description" maxlength="50" id="name" name="name" value="${fieldValue(bean:inventoryItemInstance,field:'name')}"/> |
---|
34 | </td> |
---|
35 | </tr> |
---|
36 | |
---|
37 | <tr class="prop"> |
---|
38 | <td valign="top" class="name"> |
---|
39 | <label for="description">Description:</label> |
---|
40 | </td> |
---|
41 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'description','errors')}"> |
---|
42 | <input type="text" class="description" id="description" name="description" value="${fieldValue(bean:inventoryItemInstance,field:'description')}"/> |
---|
43 | </td> |
---|
44 | </tr> |
---|
45 | |
---|
46 | <tr class="prop"> |
---|
47 | <td valign="top" class="name"> |
---|
48 | <label for="inventoryLocation">Inventory Location:</label> |
---|
49 | </td> |
---|
50 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'inventoryLocation','errors')}"> |
---|
51 | <g:select optionKey="id" |
---|
52 | from="${ InventoryLocation.list().sort { p1, p2 -> p1.toString().compareToIgnoreCase(p2.toString()) } }" |
---|
53 | name="inventoryLocation.id" value="${inventoryItemInstance?.inventoryLocation?.id}" |
---|
54 | optionValue="${{it.name+ ' in ' + it.inventoryStore}}"> |
---|
55 | </g:select> |
---|
56 | |
---|
57 | <p><g:link controller="inventoryLocationDetailed" action="create">add Location</g:link></p> |
---|
58 | </td> |
---|
59 | </tr> |
---|
60 | |
---|
61 | <tr class="prop"> |
---|
62 | <td valign="top" class="name"> |
---|
63 | <label for="reorderPoint">Reorder Point:</label> |
---|
64 | </td> |
---|
65 | <td valign="top"> |
---|
66 | <input class="medium ${hasErrors(bean:inventoryItemInstance,field:'reorderPoint','errors')}" |
---|
67 | type="text" id="reorderPoint" name="reorderPoint" |
---|
68 | value="${fieldValue(bean:inventoryItemInstance,field:'reorderPoint')}" /> |
---|
69 | <g:select optionKey="id" |
---|
70 | from="${UnitOfMeasure.list()}" |
---|
71 | name="unitOfMeasure.id" |
---|
72 | value="${inventoryItemInstance?.unitOfMeasure?.id}" > |
---|
73 | </g:select> |
---|
74 | </td> |
---|
75 | </tr> |
---|
76 | |
---|
77 | <tr class="prop"> |
---|
78 | <td valign="top" class="name"> |
---|
79 | <label for="enableReorder">Enable Reorder:</label> |
---|
80 | </td> |
---|
81 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'enableReorder','errors')}"> |
---|
82 | <g:checkBox name="enableReorder" value="${inventoryItemInstance?.enableReorder}" ></g:checkBox> |
---|
83 | </td> |
---|
84 | </tr> |
---|
85 | |
---|
86 | <tr class="prop"> |
---|
87 | <td valign="top" class="name"> |
---|
88 | <label for="inventoryGroup">Inventory Group:</label> |
---|
89 | </td> |
---|
90 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'inventoryGroup','errors')}"> |
---|
91 | <g:select optionKey="id" from="${InventoryGroup.list()}" name="inventoryGroup.id" value="${inventoryItemInstance?.inventoryGroup?.id}" ></g:select> |
---|
92 | |
---|
93 | <p><g:link controller="inventoryGroupDetailed" action="create">add Group</g:link></p> |
---|
94 | </td> |
---|
95 | </tr> |
---|
96 | |
---|
97 | <tr class="prop"> |
---|
98 | <td valign="top" class="name"> |
---|
99 | <label for="inventoryType">Inventory Type:</label> |
---|
100 | </td> |
---|
101 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'inventoryType','errors')}"> |
---|
102 | <g:select optionKey="id" from="${InventoryType.list()}" name="inventoryType.id" value="${inventoryItemInstance?.inventoryType?.id}" ></g:select> |
---|
103 | </td> |
---|
104 | </tr> |
---|
105 | |
---|
106 | <tr class="prop"> |
---|
107 | <td valign="top" class="name"> |
---|
108 | <label for="averageDeliveryTime">Average Delivery Time:</label> |
---|
109 | </td> |
---|
110 | <td valign="top"> |
---|
111 | <input class="medium ${hasErrors(bean:inventoryItemInstance,field:'averageDeliveryTime','errors')}" |
---|
112 | type="text" id="averageDeliveryTime" name="averageDeliveryTime" |
---|
113 | value="${fieldValue(bean:inventoryItemInstance,field:'averageDeliveryTime')}" /> |
---|
114 | <g:select optionKey="id" from="${Period.list()}" name="averageDeliveryPeriod.id" value="${inventoryItemInstance?.averageDeliveryPeriod?.id}" noSelection="['null':'--None--']"></g:select> |
---|
115 | </td> |
---|
116 | </tr> |
---|
117 | |
---|
118 | <tr class="prop"> |
---|
119 | <td valign="top" class="name"> |
---|
120 | <label for="suppliersPartNumber">Suppliers Part Number:</label> |
---|
121 | </td> |
---|
122 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'suppliersPartNumber','errors')}"> |
---|
123 | <input type="text" id="suppliersPartNumber" name="suppliersPartNumber" value="${fieldValue(bean:inventoryItemInstance,field:'suppliersPartNumber')}"/> |
---|
124 | </td> |
---|
125 | </tr> |
---|
126 | |
---|
127 | <tr class="prop"> |
---|
128 | <td valign="top" class="name"> |
---|
129 | <label for="suppliers">Suppliers:</label> |
---|
130 | </td> |
---|
131 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'suppliers','errors')}"> |
---|
132 | <g:select id="suppliers" name="suppliers" |
---|
133 | from="${ Supplier.list().sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }" |
---|
134 | size="5" multiple="yes" optionKey="id" |
---|
135 | value="${inventoryItemInstance?.suppliers?.id}" noSelection="['':'--None--']"/> |
---|
136 | |
---|
137 | <p><g:link controller="supplierDetailed" action="create">add Supplier</g:link></p> |
---|
138 | </td> |
---|
139 | </tr> |
---|
140 | |
---|
141 | <tr class="prop"> |
---|
142 | <td valign="top" class="name"> |
---|
143 | <label for="manufacturersPartNumber">Manufacturers Part Number:</label> |
---|
144 | </td> |
---|
145 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'manufacturersPartNumber','errors')}"> |
---|
146 | <input type="text" id="manufacturersPartNumber" name="manufacturersPartNumber" value="${fieldValue(bean:inventoryItemInstance,field:'manufacturersPartNumber')}"/> |
---|
147 | </td> |
---|
148 | </tr> |
---|
149 | |
---|
150 | <tr class="prop"> |
---|
151 | <td valign="top" class="name"> |
---|
152 | <label for="manufacturers">Manufacturers:</label> |
---|
153 | </td> |
---|
154 | <td valign="top" class="value ${hasErrors(bean:inventoryItemInstance,field:'manufacturers','errors')}"> |
---|
155 | <g:select id="manufacturers" name="manufacturers" |
---|
156 | from="${ Manufacturer.list().sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }" |
---|
157 | size="5" multiple="yes" optionKey="id" |
---|
158 | value="${inventoryItemInstance?.manufacturers?.id}" noSelection="['':'--None--']" /> |
---|
159 | |
---|
160 | <p><g:link controller="manufacturerDetailed" action="create">add Manufacturer</g:link></p> |
---|
161 | </td> |
---|
162 | </tr> |
---|
163 | |
---|
164 | </tbody> |
---|
165 | </table> |
---|
166 | </div> |
---|
167 | <div class="buttons"> |
---|
168 | <span class="button"><input class="save" type="submit" value="Create" /></span> |
---|
169 | </div> |
---|
170 | </g:form> |
---|
171 | </div> |
---|
172 | </body> |
---|
173 | </html> |
---|