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:hasErrors bean="${inventoryItemPurchaseInstance}"> |
---|
18 | <div class="errors"> |
---|
19 | <g:renderErrors bean="${inventoryItemPurchaseInstance}" as="list" /> |
---|
20 | </div> |
---|
21 | </g:hasErrors> |
---|
22 | <g:form action="save" method="post" > |
---|
23 | <g:hiddenField name="inventoryItem.id" value="${inventoryItemPurchaseInstance?.inventoryItem?.id}" /> |
---|
24 | <g:hiddenField name="returnTo" value="${params.returnTo}" /> |
---|
25 | <div class="dialog"> |
---|
26 | <table> |
---|
27 | <tbody> |
---|
28 | |
---|
29 | <tr class="prop"> |
---|
30 | <td valign="top" class="name"> |
---|
31 | <label for="inventoryItem">Inventory Item:</label> |
---|
32 | </td> |
---|
33 | <td valign="top" class="value"> |
---|
34 | <g:link controller="inventoryItemDetailed" |
---|
35 | action="show" |
---|
36 | id="${inventoryItemPurchaseInstance.inventoryItem.id}"> |
---|
37 | ${inventoryItemPurchaseInstance.inventoryItem.encodeAsHTML()} |
---|
38 | </g:link> |
---|
39 | </td> |
---|
40 | </tr> |
---|
41 | |
---|
42 | <tr class="prop"> |
---|
43 | <td valign="top" class="name"> |
---|
44 | <label for="purchaseOrderNumber">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 | noSelection="['null':/${g.message(code:'default.please.select.text')}/]"> |
---|
72 | </g:select> |
---|
73 | <g:helpBalloon code="inventoryItemPurchase.cost.code" /> |
---|
74 | </td> |
---|
75 | </tr> |
---|
76 | |
---|
77 | <tr class="prop"> |
---|
78 | <td valign="top" class="name"> |
---|
79 | <label for="taskBudgetStatus">Budget Status:</label> |
---|
80 | </td> |
---|
81 | <td valign="top" class="value ${hasErrors(bean:inventoryItemPurchaseInstance,field:'taskBudgetStatus','errors')}"> |
---|
82 | <g:select optionKey="id" |
---|
83 | from="${ TaskBudgetStatus.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }" |
---|
84 | name="taskBudgetStatus.id" |
---|
85 | value="${inventoryItemPurchaseInstance?.taskBudgetStatus?.id}" |
---|
86 | noSelection="['null':/${g.message(code:'default.please.select.text')}/]"> |
---|
87 | </g:select> |
---|
88 | <g:helpBalloon code="inventoryItemPurchase.task.budget.status" /> |
---|
89 | </td> |
---|
90 | </tr> |
---|
91 | |
---|
92 | <tr class="prop"> |
---|
93 | <td valign="top" class="name"> |
---|
94 | <label for="supplier">Supplier:</label> |
---|
95 | </td> |
---|
96 | <td valign="top" class="value ${hasErrors(bean:inventoryItemPurchaseInstance,field:'supplier','errors')}"> |
---|
97 | <g:select optionKey="id" |
---|
98 | from="${ Supplier.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }" |
---|
99 | name="supplier.id" |
---|
100 | value="${inventoryItemPurchaseInstance?.supplier?.id}" |
---|
101 | noSelection="['null':/${g.message(code:'default.please.select.text')}/]"> |
---|
102 | </g:select> |
---|
103 | <g:helpBalloon code="inventoryItemPurchase.supplier" /> |
---|
104 | <p><g:link controller="supplierDetailed" action="create">+Add Supplier</g:link></p> |
---|
105 | </td> |
---|
106 | </tr> |
---|
107 | |
---|
108 | <tr class="prop"> |
---|
109 | <td valign="top" class="name"> |
---|
110 | <label for="quantity">Quantity:</label> |
---|
111 | </td> |
---|
112 | <td valign="top" class="value ${hasErrors(bean:inventoryItemPurchaseInstance,field:'quantity','errors')}"> |
---|
113 | <input type="text" id="quantity" name="quantity" value="${fieldValue(bean:inventoryItemPurchaseInstance,field:'quantity')}" /> |
---|
114 | ${inventoryItemPurchaseInstance.inventoryItem.unitOfMeasure.encodeAsHTML()} |
---|
115 | <g:helpBalloon code="inventoryItemPurchase.quantity" /> |
---|
116 | </td> |
---|
117 | </tr> |
---|
118 | |
---|
119 | <tr class="prop"> |
---|
120 | <td valign="top" class="name"> |
---|
121 | <label for="orderValue">Order Value:</label> |
---|
122 | </td> |
---|
123 | <td valign="top" class="value"> |
---|
124 | <input class="medium ${hasErrors(bean:inventoryItemPurchaseInstance,field:'orderValueAmount','errors')}" |
---|
125 | type="text" id="orderValueAmount" name="orderValueAmount" |
---|
126 | value="${inventoryItemPurchaseInstance.orderValueAmount}" /> |
---|
127 | <g:currencySelect name="orderValueCurrency" |
---|
128 | value="${inventoryItemPurchaseInstance?.orderValueCurrency}" |
---|
129 | from="${grailsApplication.config.currencyList}"> |
---|
130 | </g:currencySelect> |
---|
131 | <g:helpBalloon code="inventoryItemPurchase.order.value" /> |
---|
132 | </td> |
---|
133 | </tr> |
---|
134 | |
---|
135 | <tr class="prop"> |
---|
136 | <td valign="top" class="name"> |
---|
137 | <label for="comment">Comment:</label> |
---|
138 | </td> |
---|
139 | <td valign="top" class="value ${hasErrors(bean:inventoryItemPurchaseInstance,field:'comment','errors')}"> |
---|
140 | <textarea rows="5" cols="40" name="comment">${fieldValue(bean:inventoryItemPurchaseInstance, field:'comment')}</textarea> |
---|
141 | </td> |
---|
142 | </tr> |
---|
143 | |
---|
144 | </tbody> |
---|
145 | </table> |
---|
146 | </div> |
---|
147 | <div class="buttons"> |
---|
148 | <span class="button"><input class="save" type="submit" value="Create" /></span> |
---|
149 | </div> |
---|
150 | </g:form> |
---|
151 | </div> |
---|
152 | </body> |
---|
153 | </html> |
---|