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>Edit InventoryItemPurchase</title> |
---|
8 | <resource:dateChooser /> |
---|
9 | </head> |
---|
10 | <body> |
---|
11 | <div class="nav"> |
---|
12 | <h1>Edit InventoryItemPurchase</h1> |
---|
13 | </div> |
---|
14 | <div class="body"> |
---|
15 | <g:render template="/shared/messages" /> |
---|
16 | <g:hasErrors bean="${inventoryItemPurchaseInstance}"> |
---|
17 | <div class="errors"> |
---|
18 | <g:renderErrors bean="${inventoryItemPurchaseInstance}" as="list" /> |
---|
19 | </div> |
---|
20 | </g:hasErrors> |
---|
21 | <g:form method="post" > |
---|
22 | <input type="hidden" name="id" value="${inventoryItemPurchaseInstance?.id}" /> |
---|
23 | <input type="hidden" name="version" value="${inventoryItemPurchaseInstance?.version}" /> |
---|
24 | <div class="dialog"> |
---|
25 | <table> |
---|
26 | <tbody> |
---|
27 | |
---|
28 | <tr class="prop"> |
---|
29 | <td valign="top" class="name">Inventory Item:</td> |
---|
30 | |
---|
31 | <td valign="top" class="value"><g:link controller="inventoryItemDetailed" action="show" id="${inventoryItemPurchaseInstance?.inventoryItem?.id}">${inventoryItemPurchaseInstance?.inventoryItem?.encodeAsHTML()}</g:link></td> |
---|
32 | |
---|
33 | </tr> |
---|
34 | |
---|
35 | <tr class="prop"> |
---|
36 | <td valign="top" class="name">Purchase Type:</td> |
---|
37 | |
---|
38 | <td valign="top" class="value">${inventoryItemPurchaseInstance?.inventoryItemPurchaseType?.encodeAsHTML()}</td> |
---|
39 | |
---|
40 | </tr> |
---|
41 | |
---|
42 | <tr class="prop"> |
---|
43 | <td valign="top" class="name"> |
---|
44 | <label for="invoiceNumber">Purchase Order #:</label> |
---|
45 | </td> |
---|
46 | <td valign="top" class="value ${hasErrors(bean:inventoryItemPurchaseInstance,field:'purchaseOrderNumber','errors')}"> |
---|
47 | <input type="text" maxlength="50" id="purchaseOrderNumber" name="purchaseOrderNumber" value="${fieldValue(bean:inventoryItemPurchaseInstance,field:'purchaseOrderNumber')}"/> |
---|
48 | <g:helpBalloon code="inventoryItemPurchase.purchaseOrderNumber" /> |
---|
49 | </td> |
---|
50 | </tr> |
---|
51 | |
---|
52 | <tr class="prop"> |
---|
53 | <td valign="top" class="name"> |
---|
54 | <label for="date">Date:</label> |
---|
55 | </td> |
---|
56 | <td valign="top" class="value ${hasErrors(bean:inventoryItemPurchaseInstance,field:'date','errors')}"> |
---|
57 | <richui:dateChooser name="date" format="dd-MM-yyyy" value="${inventoryItemPurchaseInstance.date}" /> |
---|
58 | <g:helpBalloon code="inventoryItemPurchase.order.placed.date" /> |
---|
59 | </td> |
---|
60 | </tr> |
---|
61 | |
---|
62 | <tr class="prop"> |
---|
63 | <td valign="top" class="name"> |
---|
64 | <label for="costCode">Cost Code:</label> |
---|
65 | </td> |
---|
66 | <td valign="top" class="value ${hasErrors(bean:inventoryItemPurchaseInstance,field:'costCode','errors')}"> |
---|
67 | <g:select optionKey="id" |
---|
68 | from="${ CostCode.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }" |
---|
69 | name="costCode.id" |
---|
70 | value="${inventoryItemPurchaseInstance?.costCode?.id}" > |
---|
71 | </g:select> |
---|
72 | <g:helpBalloon code="inventoryItemPurchase.cost.code" /> |
---|
73 | </td> |
---|
74 | </tr> |
---|
75 | |
---|
76 | <tr class="prop"> |
---|
77 | <td valign="top" class="name"> |
---|
78 | <label for="taskBudgetStatus">Budget Status:</label> |
---|
79 | </td> |
---|
80 | <td valign="top" class="value ${hasErrors(bean:inventoryItemPurchaseInstance,field:'taskBudgetStatus','errors')}"> |
---|
81 | <g:select optionKey="id" |
---|
82 | from="${ TaskBudgetStatus.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }" |
---|
83 | name="taskBudgetStatus.id" |
---|
84 | value="${inventoryItemPurchaseInstance?.taskBudgetStatus?.id}" > |
---|
85 | </g:select> |
---|
86 | <g:helpBalloon code="inventoryItemPurchase.task.budget.status" /> |
---|
87 | </td> |
---|
88 | </tr> |
---|
89 | |
---|
90 | <tr class="prop"> |
---|
91 | <td valign="top" class="name"> |
---|
92 | <label for="supplier">Supplier:</label> |
---|
93 | </td> |
---|
94 | <td valign="top" class="value ${hasErrors(bean:inventoryItemPurchaseInstance,field:'supplier','errors')}"> |
---|
95 | <g:select optionKey="id" |
---|
96 | from="${ Supplier.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }" |
---|
97 | name="supplier.id" |
---|
98 | value="${inventoryItemPurchaseInstance?.supplier?.id}" |
---|
99 | noSelection="['null':/${g.message(code:'default.please.select.text')}/]"> |
---|
100 | </g:select> |
---|
101 | <g:helpBalloon code="inventoryItemPurchase.supplier" /> |
---|
102 | <p><g:link controller="supplierDetailed" action="create">+Add Supplier</g:link></p> |
---|
103 | </td> |
---|
104 | </tr> |
---|
105 | |
---|
106 | <tr class="prop"> |
---|
107 | <td valign="top" class="name">Quantity:</td> |
---|
108 | |
---|
109 | <td valign="top" class="value"> |
---|
110 | ${fieldValue(bean:inventoryItemPurchaseInstance, field:'quantity')} |
---|
111 | <g:helpBalloon code="inventoryItemPurchase.quantity" /> |
---|
112 | </td> |
---|
113 | |
---|
114 | </tr> |
---|
115 | |
---|
116 | <tr class="prop"> |
---|
117 | <td valign="top" class="name"> |
---|
118 | <label for="orderValueAmount">Order Value:</label> |
---|
119 | </td> |
---|
120 | <td valign="top" class="value ${hasErrors(bean:inventoryItemPurchaseInstance,field:'orderValueAmount','errors')}"> |
---|
121 | <input type="text" id="orderValueAmount" name="orderValueAmount" value="${fieldValue(bean:inventoryItemPurchaseInstance,field:'orderValueAmount')}" /> |
---|
122 | <g:currencySelect name="orderValueCurrency" |
---|
123 | value="${inventoryItemPurchaseInstance?.orderValueCurrency}" |
---|
124 | from="${grailsApplication.config.currencyList}"> |
---|
125 | </g:currencySelect> |
---|
126 | <g:helpBalloon code="inventoryItemPurchase.order.value" /> |
---|
127 | </td> |
---|
128 | </tr> |
---|
129 | |
---|
130 | <g:if test="${inventoryItemPurchaseInstance.inventoryItemPurchaseType?.id == 4}"> |
---|
131 | <tr class="prop"> |
---|
132 | <td valign="top" class="name"> |
---|
133 | <label for="invoiceNumber">Invoice Number:</label> |
---|
134 | </td> |
---|
135 | <td valign="top" class="value ${hasErrors(bean:inventoryItemPurchaseInstance,field:'invoiceNumber','errors')}"> |
---|
136 | <input type="text" maxlength="50" id="invoiceNumber" name="invoiceNumber" value="${fieldValue(bean:inventoryItemPurchaseInstance,field:'invoiceNumber')}"/> |
---|
137 | <g:helpBalloon code="inventoryItemPurchase.invoice.number" /> |
---|
138 | </td> |
---|
139 | </tr> |
---|
140 | </g:if> |
---|
141 | |
---|
142 | <g:if test="${inventoryItemPurchaseInstance?.inventoryItemPurchaseType?.id > 0}"> |
---|
143 | <tr class="prop"> |
---|
144 | <td valign="top" class="name"> |
---|
145 | <label for="receivedComplete">Received Complete:</label> |
---|
146 | </td> |
---|
147 | <td valign="top" class="value"> |
---|
148 | <g:checkBox name="receivedComplete" value="${inventoryItemPurchaseInstance?.receivedComplete}" ></g:checkBox> |
---|
149 | </td> |
---|
150 | </tr> |
---|
151 | |
---|
152 | <tr class="prop"> |
---|
153 | <td valign="top" class="name"> |
---|
154 | <label for="invoicePaymentApproved">Invoice Payment Approved:</label> |
---|
155 | </td> |
---|
156 | <td valign="top" class="value"> |
---|
157 | <g:checkBox name="invoicePaymentApproved" value="${inventoryItemPurchaseInstance?.invoicePaymentApproved}" ></g:checkBox> |
---|
158 | </td> |
---|
159 | </tr> |
---|
160 | </g:if> |
---|
161 | <g:else> |
---|
162 | <tr class="prop"> |
---|
163 | <td valign="top" class="name"> |
---|
164 | <label for="receivedComplete">Received Complete:</label> |
---|
165 | </td> |
---|
166 | <td valign="top" class="value"> |
---|
167 | ${fieldValue(bean:inventoryItemPurchaseInstance, field:'receivedComplete')} |
---|
168 | </td> |
---|
169 | </tr> |
---|
170 | |
---|
171 | <tr class="prop"> |
---|
172 | <td valign="top" class="name"> |
---|
173 | <label for="invoicePaymentApproved">Invoice Payment Approved:</label> |
---|
174 | </td> |
---|
175 | <td valign="top" class="value"> |
---|
176 | ${fieldValue(bean:inventoryItemPurchaseInstance, field:'invoicePaymentApproved')} |
---|
177 | </td> |
---|
178 | </tr> |
---|
179 | </g:else> |
---|
180 | |
---|
181 | <tr class="prop"> |
---|
182 | <td valign="top" class="name"> |
---|
183 | <label for="comment">Comment:</label> |
---|
184 | </td> |
---|
185 | <td valign="top" class="value ${hasErrors(bean:inventoryItemPurchaseInstance,field:'comment','errors')}"> |
---|
186 | <textarea rows="5" cols="40" name="comment">${fieldValue(bean:inventoryItemPurchaseInstance, field:'comment')}</textarea> |
---|
187 | </td> |
---|
188 | </tr> |
---|
189 | |
---|
190 | <tr class="prop"> |
---|
191 | <td valign="top" class="name">Entered By:</td> |
---|
192 | <td valign="top" class="value"> |
---|
193 | <g:link controller="person" action="show" id="${inventoryItemPurchaseInstance?.enteredBy?.id}"> |
---|
194 | ${inventoryItemPurchaseInstance?.enteredBy?.encodeAsHTML()} |
---|
195 | </g:link> |
---|
196 | on <g:formatDate date="${inventoryItemPurchaseInstance?.dateCreated}" format="EEE, dd-MMM-yyyy @ HH:mm"/> |
---|
197 | </td> |
---|
198 | </tr> |
---|
199 | |
---|
200 | <g:if test="${inventoryItemPurchaseInstance.lastUpdatedBy}"> |
---|
201 | <tr class="prop"> |
---|
202 | <td valign="top" class="name">Last Updated By:</td> |
---|
203 | <td valign="top" class="value"> |
---|
204 | <g:link controller="person" action="show" id="${inventoryItemPurchaseInstance?.lastUpdatedBy?.id}"> |
---|
205 | ${inventoryItemPurchaseInstance?.lastUpdatedBy.encodeAsHTML()} |
---|
206 | </g:link> |
---|
207 | on <g:formatDate date="${inventoryItemPurchaseInstance?.lastUpdated}" format="EEE, dd-MMM-yyyy @ HH:mm"/> |
---|
208 | </td> |
---|
209 | </tr> |
---|
210 | </g:if > |
---|
211 | |
---|
212 | </tbody> |
---|
213 | </table> |
---|
214 | </div> |
---|
215 | <div class="buttons"> |
---|
216 | <span class="button"><g:actionSubmit class="save" value="Update" /></span> |
---|
217 | <span class="button"><g:actionSubmit class="cancel" value="Cancel" action="Show"/></span> |
---|
218 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
219 | </div> |
---|
220 | </g:form> |
---|
221 | </div> |
---|
222 | </body> |
---|
223 | </html> |
---|