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 InventoryItemPurchase</title> |
---|
8 | <nav:resources override="true"/> |
---|
9 | <resource:dateChooser /> |
---|
10 | </head> |
---|
11 | <body> |
---|
12 | <div class="nav"> |
---|
13 | <h1>Order Inventory</h1> |
---|
14 | </div> |
---|
15 | <div class="body"> |
---|
16 | <g:render template="/shared/messages" /> |
---|
17 | <g:if test="${!costCodes}" > |
---|
18 | <div class="errors"> |
---|
19 | <ul> |
---|
20 | <li><g:message code="inventoryItemPurchase.costCodes.not.found" /><li> |
---|
21 | </div> |
---|
22 | </g:if> |
---|
23 | <g:hasErrors bean="${inventoryItemPurchaseInstance}"> |
---|
24 | <div class="errors"> |
---|
25 | <g:renderErrors bean="${inventoryItemPurchaseInstance}" as="list" /> |
---|
26 | </div> |
---|
27 | </g:hasErrors> |
---|
28 | <g:form action="save" method="post" > |
---|
29 | <g:hiddenField name="inventoryItem.id" value="${inventoryItemPurchaseInstance?.inventoryItem?.id}" /> |
---|
30 | <g:hiddenField name="returnTo" value="${params.returnTo}" /> |
---|
31 | <div class="dialog"> |
---|
32 | <table> |
---|
33 | <tbody> |
---|
34 | |
---|
35 | <tr class="prop"> |
---|
36 | <td valign="top" class="name"> |
---|
37 | <label for="inventoryItem">Inventory Item:</label> |
---|
38 | </td> |
---|
39 | <td valign="top" class="value"> |
---|
40 | <g:link controller="inventoryItemDetailed" |
---|
41 | action="show" |
---|
42 | id="${inventoryItemPurchaseInstance.inventoryItem.id}"> |
---|
43 | ${inventoryItemPurchaseInstance.inventoryItem.encodeAsHTML()} |
---|
44 | </g:link> |
---|
45 | </td> |
---|
46 | </tr> |
---|
47 | |
---|
48 | <tr class="prop"> |
---|
49 | <td valign="top" class="name"> |
---|
50 | <label for="purchaseOrderNumber.id">Purchase Order #:</label> |
---|
51 | </td> |
---|
52 | <td valign="top" class="value ${hasErrors(bean:inventoryItemPurchaseInstance,field:'purchaseOrderNumber','errors')}"> |
---|
53 | <g:select from="${purchaseOrderNumbers}" |
---|
54 | optionKey="id" |
---|
55 | optionValue="description" |
---|
56 | name="purchaseOrderNumber.id" |
---|
57 | value="${inventoryItemPurchaseInstance?.purchaseOrder?.purchaseOrderNumber?.id}" |
---|
58 | noSelection="['null':/${g.message(code:'default.please.select.text')}/]"> |
---|
59 | </g:select> |
---|
60 | <g:helpBalloon code="inventoryItemPurchase.purchaseOrderNumber" /> |
---|
61 | </td> |
---|
62 | </tr> |
---|
63 | |
---|
64 | <tr class="prop"> |
---|
65 | <td valign="top" class="name"> |
---|
66 | <label for="date">Date:</label> |
---|
67 | </td> |
---|
68 | <td valign="top" class="value ${hasErrors(bean:inventoryItemPurchaseInstance,field:'date','errors')}"> |
---|
69 | <richui:dateChooser name="date" format="dd-MM-yyyy" value="${inventoryItemPurchaseInstance.date}" /> |
---|
70 | <g:helpBalloon code="inventoryItemPurchase.order.placed.date" /> |
---|
71 | </td> |
---|
72 | </tr> |
---|
73 | |
---|
74 | <tr class="prop"> |
---|
75 | <td valign="top" class="name"> |
---|
76 | <label for="costCode">Cost Code:</label> |
---|
77 | </td> |
---|
78 | <td valign="top" class="value ${hasErrors(bean:inventoryItemPurchaseInstance,field:'costCode','errors')}"> |
---|
79 | <g:select optionKey="id" |
---|
80 | from="${ costCodes }" |
---|
81 | name="costCode.id" |
---|
82 | value="${inventoryItemPurchaseInstance?.costCode?.id}" |
---|
83 | noSelection="['null':/${g.message(code:'default.please.select.text')}/]"> |
---|
84 | </g:select> |
---|
85 | <g:helpBalloon code="inventoryItemPurchase.cost.code" /> |
---|
86 | </td> |
---|
87 | </tr> |
---|
88 | |
---|
89 | <tr class="prop"> |
---|
90 | <td valign="top" class="name"> |
---|
91 | <label for="taskBudgetStatus">Budget Status:</label> |
---|
92 | </td> |
---|
93 | <td valign="top" class="value ${hasErrors(bean:inventoryItemPurchaseInstance,field:'taskBudgetStatus','errors')}"> |
---|
94 | <g:select optionKey="id" |
---|
95 | from="${ TaskBudgetStatus.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }" |
---|
96 | name="taskBudgetStatus.id" |
---|
97 | value="${inventoryItemPurchaseInstance?.taskBudgetStatus?.id}" |
---|
98 | noSelection="['null':/${g.message(code:'default.please.select.text')}/]"> |
---|
99 | </g:select> |
---|
100 | <g:helpBalloon code="inventoryItemPurchase.task.budget.status" /> |
---|
101 | </td> |
---|
102 | </tr> |
---|
103 | |
---|
104 | <tr class="prop"> |
---|
105 | <td valign="top" class="name"> |
---|
106 | <label for="supplier">Supplier:</label> |
---|
107 | </td> |
---|
108 | <td valign="top" class="value ${hasErrors(bean:inventoryItemPurchaseInstance,field:'supplier','errors')}"> |
---|
109 | <g:select optionKey="id" |
---|
110 | from="${ Supplier.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }" |
---|
111 | name="supplier.id" |
---|
112 | value="${inventoryItemPurchaseInstance?.supplier?.id}" |
---|
113 | noSelection="['null':/${g.message(code:'default.please.select.text')}/]"> |
---|
114 | </g:select> |
---|
115 | <g:helpBalloon code="inventoryItemPurchase.supplier" /> |
---|
116 | <p><g:link controller="supplierDetailed" action="create">+Add Supplier</g:link></p> |
---|
117 | </td> |
---|
118 | </tr> |
---|
119 | |
---|
120 | <tr class="prop"> |
---|
121 | <td valign="top" class="name"> |
---|
122 | <label for="quantity">Quantity:</label> |
---|
123 | </td> |
---|
124 | <td valign="top" class="value ${hasErrors(bean:inventoryItemPurchaseInstance,field:'quantity','errors')}"> |
---|
125 | <input type="text" id="quantity" name="quantity" value="${fieldValue(bean:inventoryItemPurchaseInstance,field:'quantity')}" /> |
---|
126 | ${inventoryItemPurchaseInstance.inventoryItem.unitOfMeasure.encodeAsHTML()} |
---|
127 | <g:helpBalloon code="inventoryItemPurchase.quantity" /> |
---|
128 | </td> |
---|
129 | </tr> |
---|
130 | |
---|
131 | <tr class="prop"> |
---|
132 | <td valign="top" class="name"> |
---|
133 | <label for="orderValue">Order Value:</label> |
---|
134 | </td> |
---|
135 | <td valign="top" class="value"> |
---|
136 | <input class="medium ${hasErrors(bean:inventoryItemPurchaseInstance,field:'orderValueAmount','errors')}" |
---|
137 | type="text" id="orderValueAmount" name="orderValueAmount" |
---|
138 | value="${inventoryItemPurchaseInstance.orderValueAmount}" /> |
---|
139 | <g:currencySelect name="orderValueCurrency" |
---|
140 | value="${inventoryItemPurchaseInstance?.orderValueCurrency}" |
---|
141 | from="${grailsApplication.config.currencyList}"> |
---|
142 | </g:currencySelect> |
---|
143 | <g:helpBalloon code="inventoryItemPurchase.order.value" /> |
---|
144 | </td> |
---|
145 | </tr> |
---|
146 | |
---|
147 | <tr class="prop"> |
---|
148 | <td valign="top" class="name"> |
---|
149 | <label for="comment">Comment:</label> |
---|
150 | </td> |
---|
151 | <td valign="top" class="value ${hasErrors(bean:inventoryItemPurchaseInstance,field:'comment','errors')}"> |
---|
152 | <textarea rows="5" cols="40" name="comment">${fieldValue(bean:inventoryItemPurchaseInstance, field:'comment')}</textarea> |
---|
153 | </td> |
---|
154 | </tr> |
---|
155 | |
---|
156 | </tbody> |
---|
157 | </table> |
---|
158 | </div> |
---|
159 | <div class="buttons"> |
---|
160 | <span class="button"><input class="save" type="submit" value="Create" /></span> |
---|
161 | </div> |
---|
162 | </g:form> |
---|
163 | </div> |
---|
164 | </body> |
---|
165 | </html> |
---|