[441] | 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> |
---|
[595] | 8 | <nav:resources override="true"/> |
---|
[605] | 9 | <resource:dateChooser /> |
---|
[441] | 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" /> |
---|
[633] | 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> |
---|
[441] | 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}" /> |
---|
[595] | 30 | <g:hiddenField name="returnTo" value="${params.returnTo}" /> |
---|
[441] | 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">Purchase Order #:</label> |
---|
| 51 | </td> |
---|
| 52 | <td valign="top" class="value ${hasErrors(bean:inventoryItemPurchaseInstance,field:'purchaseOrderNumber','errors')}"> |
---|
| 53 | <input type="text" maxlength="50" id="purchaseOrderNumber" name="purchaseOrderNumber" value="${fieldValue(bean:inventoryItemPurchaseInstance,field:'purchaseOrderNumber')}"/> |
---|
[609] | 54 | <g:helpBalloon code="inventoryItemPurchase.purchaseOrderNumber" /> |
---|
[441] | 55 | </td> |
---|
| 56 | </tr> |
---|
| 57 | |
---|
| 58 | <tr class="prop"> |
---|
| 59 | <td valign="top" class="name"> |
---|
[605] | 60 | <label for="date">Date:</label> |
---|
| 61 | </td> |
---|
| 62 | <td valign="top" class="value ${hasErrors(bean:inventoryItemPurchaseInstance,field:'date','errors')}"> |
---|
| 63 | <richui:dateChooser name="date" format="dd-MM-yyyy" value="${inventoryItemPurchaseInstance.date}" /> |
---|
[609] | 64 | <g:helpBalloon code="inventoryItemPurchase.order.placed.date" /> |
---|
[605] | 65 | </td> |
---|
| 66 | </tr> |
---|
| 67 | |
---|
| 68 | <tr class="prop"> |
---|
| 69 | <td valign="top" class="name"> |
---|
[441] | 70 | <label for="costCode">Cost Code:</label> |
---|
| 71 | </td> |
---|
| 72 | <td valign="top" class="value ${hasErrors(bean:inventoryItemPurchaseInstance,field:'costCode','errors')}"> |
---|
| 73 | <g:select optionKey="id" |
---|
[633] | 74 | from="${ costCodes }" |
---|
[441] | 75 | name="costCode.id" |
---|
| 76 | value="${inventoryItemPurchaseInstance?.costCode?.id}" |
---|
[609] | 77 | noSelection="['null':/${g.message(code:'default.please.select.text')}/]"> |
---|
| 78 | </g:select> |
---|
| 79 | <g:helpBalloon code="inventoryItemPurchase.cost.code" /> |
---|
[441] | 80 | </td> |
---|
[605] | 81 | </tr> |
---|
[441] | 82 | |
---|
[609] | 83 | <tr class="prop"> |
---|
| 84 | <td valign="top" class="name"> |
---|
| 85 | <label for="taskBudgetStatus">Budget Status:</label> |
---|
| 86 | </td> |
---|
| 87 | <td valign="top" class="value ${hasErrors(bean:inventoryItemPurchaseInstance,field:'taskBudgetStatus','errors')}"> |
---|
| 88 | <g:select optionKey="id" |
---|
| 89 | from="${ TaskBudgetStatus.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }" |
---|
| 90 | name="taskBudgetStatus.id" |
---|
| 91 | value="${inventoryItemPurchaseInstance?.taskBudgetStatus?.id}" |
---|
| 92 | noSelection="['null':/${g.message(code:'default.please.select.text')}/]"> |
---|
| 93 | </g:select> |
---|
| 94 | <g:helpBalloon code="inventoryItemPurchase.task.budget.status" /> |
---|
| 95 | </td> |
---|
| 96 | </tr> |
---|
| 97 | |
---|
[605] | 98 | <tr class="prop"> |
---|
| 99 | <td valign="top" class="name"> |
---|
| 100 | <label for="supplier">Supplier:</label> |
---|
| 101 | </td> |
---|
| 102 | <td valign="top" class="value ${hasErrors(bean:inventoryItemPurchaseInstance,field:'supplier','errors')}"> |
---|
| 103 | <g:select optionKey="id" |
---|
| 104 | from="${ Supplier.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }" |
---|
| 105 | name="supplier.id" |
---|
| 106 | value="${inventoryItemPurchaseInstance?.supplier?.id}" |
---|
| 107 | noSelection="['null':/${g.message(code:'default.please.select.text')}/]"> |
---|
| 108 | </g:select> |
---|
[609] | 109 | <g:helpBalloon code="inventoryItemPurchase.supplier" /> |
---|
[605] | 110 | <p><g:link controller="supplierDetailed" action="create">+Add Supplier</g:link></p> |
---|
| 111 | </td> |
---|
| 112 | </tr> |
---|
| 113 | |
---|
[441] | 114 | <tr class="prop"> |
---|
| 115 | <td valign="top" class="name"> |
---|
| 116 | <label for="quantity">Quantity:</label> |
---|
| 117 | </td> |
---|
| 118 | <td valign="top" class="value ${hasErrors(bean:inventoryItemPurchaseInstance,field:'quantity','errors')}"> |
---|
| 119 | <input type="text" id="quantity" name="quantity" value="${fieldValue(bean:inventoryItemPurchaseInstance,field:'quantity')}" /> |
---|
| 120 | ${inventoryItemPurchaseInstance.inventoryItem.unitOfMeasure.encodeAsHTML()} |
---|
[609] | 121 | <g:helpBalloon code="inventoryItemPurchase.quantity" /> |
---|
[441] | 122 | </td> |
---|
| 123 | </tr> |
---|
| 124 | |
---|
| 125 | <tr class="prop"> |
---|
| 126 | <td valign="top" class="name"> |
---|
[605] | 127 | <label for="orderValue">Order Value:</label> |
---|
[441] | 128 | </td> |
---|
| 129 | <td valign="top" class="value"> |
---|
| 130 | <input class="medium ${hasErrors(bean:inventoryItemPurchaseInstance,field:'orderValueAmount','errors')}" |
---|
| 131 | type="text" id="orderValueAmount" name="orderValueAmount" |
---|
| 132 | value="${inventoryItemPurchaseInstance.orderValueAmount}" /> |
---|
| 133 | <g:currencySelect name="orderValueCurrency" |
---|
[605] | 134 | value="${inventoryItemPurchaseInstance?.orderValueCurrency}" |
---|
| 135 | from="${grailsApplication.config.currencyList}"> |
---|
| 136 | </g:currencySelect> |
---|
[609] | 137 | <g:helpBalloon code="inventoryItemPurchase.order.value" /> |
---|
[441] | 138 | </td> |
---|
[605] | 139 | </tr> |
---|
[441] | 140 | |
---|
[605] | 141 | <tr class="prop"> |
---|
| 142 | <td valign="top" class="name"> |
---|
| 143 | <label for="comment">Comment:</label> |
---|
| 144 | </td> |
---|
| 145 | <td valign="top" class="value ${hasErrors(bean:inventoryItemPurchaseInstance,field:'comment','errors')}"> |
---|
| 146 | <textarea rows="5" cols="40" name="comment">${fieldValue(bean:inventoryItemPurchaseInstance, field:'comment')}</textarea> |
---|
| 147 | </td> |
---|
| 148 | </tr> |
---|
| 149 | |
---|
[441] | 150 | </tbody> |
---|
| 151 | </table> |
---|
| 152 | </div> |
---|
| 153 | <div class="buttons"> |
---|
| 154 | <span class="button"><input class="save" type="submit" value="Create" /></span> |
---|
| 155 | </div> |
---|
| 156 | </g:form> |
---|
| 157 | </div> |
---|
| 158 | </body> |
---|
| 159 | </html> |
---|