| 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:if test="${costCodes}"> |
|---|
| 68 | <g:select optionKey="id" |
|---|
| 69 | from="${ costCodes }" |
|---|
| 70 | name="costCode.id" |
|---|
| 71 | value="${inventoryItemPurchaseInstance.costCode?.id}" > |
|---|
| 72 | </g:select> |
|---|
| 73 | </g:if> |
|---|
| 74 | <g:else> |
|---|
| 75 | <g:link controller="costCodeDetailed" action="show" id="${inventoryItemPurchaseInstance?.costCode?.id}"> |
|---|
| 76 | ${inventoryItemPurchaseInstance?.costCode?.encodeAsHTML()} |
|---|
| 77 | </g:link> |
|---|
| 78 | </g:else> |
|---|
| 79 | <g:helpBalloon code="inventoryItemPurchase.cost.code" /> |
|---|
| 80 | </td> |
|---|
| 81 | </tr> |
|---|
| 82 | |
|---|
| 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 | </g:select> |
|---|
| 93 | <g:helpBalloon code="inventoryItemPurchase.task.budget.status" /> |
|---|
| 94 | </td> |
|---|
| 95 | </tr> |
|---|
| 96 | |
|---|
| 97 | <tr class="prop"> |
|---|
| 98 | <td valign="top" class="name"> |
|---|
| 99 | <label for="supplier">Supplier:</label> |
|---|
| 100 | </td> |
|---|
| 101 | <td valign="top" class="value ${hasErrors(bean:inventoryItemPurchaseInstance,field:'supplier','errors')}"> |
|---|
| 102 | <g:select optionKey="id" |
|---|
| 103 | from="${ Supplier.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }" |
|---|
| 104 | name="supplier.id" |
|---|
| 105 | value="${inventoryItemPurchaseInstance?.supplier?.id}"> |
|---|
| 106 | </g:select> |
|---|
| 107 | <g:helpBalloon code="inventoryItemPurchase.supplier" /> |
|---|
| 108 | <p><g:link controller="supplierDetailed" action="create">+Add Supplier</g:link></p> |
|---|
| 109 | </td> |
|---|
| 110 | </tr> |
|---|
| 111 | |
|---|
| 112 | <tr class="prop"> |
|---|
| 113 | <td valign="top" class="name">Quantity:</td> |
|---|
| 114 | |
|---|
| 115 | <td valign="top" class="value"> |
|---|
| 116 | ${fieldValue(bean:inventoryItemPurchaseInstance, field:'quantity')} |
|---|
| 117 | <g:helpBalloon code="inventoryItemPurchase.quantity" /> |
|---|
| 118 | </td> |
|---|
| 119 | |
|---|
| 120 | </tr> |
|---|
| 121 | |
|---|
| 122 | <tr class="prop"> |
|---|
| 123 | <td valign="top" class="name"> |
|---|
| 124 | <label for="orderValueAmount">Order Value:</label> |
|---|
| 125 | </td> |
|---|
| 126 | <td valign="top" class="value ${hasErrors(bean:inventoryItemPurchaseInstance,field:'orderValueAmount','errors')}"> |
|---|
| 127 | <input type="text" id="orderValueAmount" name="orderValueAmount" value="${fieldValue(bean:inventoryItemPurchaseInstance,field:'orderValueAmount')}" /> |
|---|
| 128 | <g:currencySelect name="orderValueCurrency" |
|---|
| 129 | value="${inventoryItemPurchaseInstance?.orderValueCurrency}" |
|---|
| 130 | from="${grailsApplication.config.currencyList}"> |
|---|
| 131 | </g:currencySelect> |
|---|
| 132 | <g:helpBalloon code="inventoryItemPurchase.order.value" /> |
|---|
| 133 | </td> |
|---|
| 134 | </tr> |
|---|
| 135 | |
|---|
| 136 | <g:if test="${inventoryItemPurchaseInstance.inventoryItemPurchaseType?.id == 4}"> |
|---|
| 137 | <tr class="prop"> |
|---|
| 138 | <td valign="top" class="name"> |
|---|
| 139 | <label for="invoiceNumber">Invoice Number:</label> |
|---|
| 140 | </td> |
|---|
| 141 | <td valign="top" class="value ${hasErrors(bean:inventoryItemPurchaseInstance,field:'invoiceNumber','errors')}"> |
|---|
| 142 | <input type="text" maxlength="50" id="invoiceNumber" name="invoiceNumber" value="${fieldValue(bean:inventoryItemPurchaseInstance,field:'invoiceNumber')}"/> |
|---|
| 143 | <g:helpBalloon code="inventoryItemPurchase.invoice.number" /> |
|---|
| 144 | </td> |
|---|
| 145 | </tr> |
|---|
| 146 | </g:if> |
|---|
| 147 | |
|---|
| 148 | <g:if test="${inventoryItemPurchaseInstance?.inventoryItemPurchaseType?.id > 0}"> |
|---|
| 149 | <tr class="prop"> |
|---|
| 150 | <td valign="top" class="name"> |
|---|
| 151 | <label for="receivedComplete">Received Complete:</label> |
|---|
| 152 | </td> |
|---|
| 153 | <td valign="top" class="value"> |
|---|
| 154 | <g:checkBox name="receivedComplete" value="${inventoryItemPurchaseInstance?.receivedComplete}" ></g:checkBox> |
|---|
| 155 | </td> |
|---|
| 156 | </tr> |
|---|
| 157 | |
|---|
| 158 | <tr class="prop"> |
|---|
| 159 | <td valign="top" class="name"> |
|---|
| 160 | <label for="invoicePaymentApproved">Invoice Payment Approved:</label> |
|---|
| 161 | </td> |
|---|
| 162 | <td valign="top" class="value"> |
|---|
| 163 | <g:checkBox name="invoicePaymentApproved" value="${inventoryItemPurchaseInstance?.invoicePaymentApproved}" ></g:checkBox> |
|---|
| 164 | </td> |
|---|
| 165 | </tr> |
|---|
| 166 | </g:if> |
|---|
| 167 | <g:else> |
|---|
| 168 | <tr class="prop"> |
|---|
| 169 | <td valign="top" class="name"> |
|---|
| 170 | <label for="receivedComplete">Received Complete:</label> |
|---|
| 171 | </td> |
|---|
| 172 | <td valign="top" class="value"> |
|---|
| 173 | ${fieldValue(bean:inventoryItemPurchaseInstance, field:'receivedComplete')} |
|---|
| 174 | </td> |
|---|
| 175 | </tr> |
|---|
| 176 | |
|---|
| 177 | <tr class="prop"> |
|---|
| 178 | <td valign="top" class="name"> |
|---|
| 179 | <label for="invoicePaymentApproved">Invoice Payment Approved:</label> |
|---|
| 180 | </td> |
|---|
| 181 | <td valign="top" class="value"> |
|---|
| 182 | ${fieldValue(bean:inventoryItemPurchaseInstance, field:'invoicePaymentApproved')} |
|---|
| 183 | </td> |
|---|
| 184 | </tr> |
|---|
| 185 | </g:else> |
|---|
| 186 | |
|---|
| 187 | <tr class="prop"> |
|---|
| 188 | <td valign="top" class="name"> |
|---|
| 189 | <label for="comment">Comment:</label> |
|---|
| 190 | </td> |
|---|
| 191 | <td valign="top" class="value ${hasErrors(bean:inventoryItemPurchaseInstance,field:'comment','errors')}"> |
|---|
| 192 | <textarea rows="5" cols="40" name="comment">${fieldValue(bean:inventoryItemPurchaseInstance, field:'comment')}</textarea> |
|---|
| 193 | </td> |
|---|
| 194 | </tr> |
|---|
| 195 | |
|---|
| 196 | <tr class="prop"> |
|---|
| 197 | <td valign="top" class="name">Entered By:</td> |
|---|
| 198 | <td valign="top" class="value"> |
|---|
| 199 | <g:link controller="person" action="show" id="${inventoryItemPurchaseInstance?.enteredBy?.id}"> |
|---|
| 200 | ${inventoryItemPurchaseInstance?.enteredBy?.encodeAsHTML()} |
|---|
| 201 | </g:link> |
|---|
| 202 | on <g:formatDate date="${inventoryItemPurchaseInstance?.dateCreated}" format="EEE, dd-MMM-yyyy @ HH:mm"/> |
|---|
| 203 | </td> |
|---|
| 204 | </tr> |
|---|
| 205 | |
|---|
| 206 | <g:if test="${inventoryItemPurchaseInstance.lastUpdatedBy}"> |
|---|
| 207 | <tr class="prop"> |
|---|
| 208 | <td valign="top" class="name">Last Updated By:</td> |
|---|
| 209 | <td valign="top" class="value"> |
|---|
| 210 | <g:link controller="person" action="show" id="${inventoryItemPurchaseInstance?.lastUpdatedBy?.id}"> |
|---|
| 211 | ${inventoryItemPurchaseInstance?.lastUpdatedBy.encodeAsHTML()} |
|---|
| 212 | </g:link> |
|---|
| 213 | on <g:formatDate date="${inventoryItemPurchaseInstance?.lastUpdated}" format="EEE, dd-MMM-yyyy @ HH:mm"/> |
|---|
| 214 | </td> |
|---|
| 215 | </tr> |
|---|
| 216 | </g:if > |
|---|
| 217 | |
|---|
| 218 | </tbody> |
|---|
| 219 | </table> |
|---|
| 220 | </div> |
|---|
| 221 | <div class="buttons"> |
|---|
| 222 | <span class="button"><g:actionSubmit class="save" value="Update" /></span> |
|---|
| 223 | <span class="button"><g:actionSubmit class="cancel" value="Cancel" action="Show"/></span> |
|---|
| 224 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
|---|
| 225 | </div> |
|---|
| 226 | </g:form> |
|---|
| 227 | </div> |
|---|
| 228 | </body> |
|---|
| 229 | </html> |
|---|