[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" /> |
---|
| 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}" /> |
---|
[595] | 24 | <g:hiddenField name="returnTo" value="${params.returnTo}" /> |
---|
[441] | 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 | </td> |
---|
| 49 | </tr> |
---|
| 50 | |
---|
| 51 | <tr class="prop"> |
---|
| 52 | <td valign="top" class="name"> |
---|
[605] | 53 | <label for="date">Date:</label> |
---|
| 54 | </td> |
---|
| 55 | <td valign="top" class="value ${hasErrors(bean:inventoryItemPurchaseInstance,field:'date','errors')}"> |
---|
| 56 | <richui:dateChooser name="date" format="dd-MM-yyyy" value="${inventoryItemPurchaseInstance.date}" /> |
---|
| 57 | </td> |
---|
| 58 | </tr> |
---|
| 59 | |
---|
| 60 | <tr class="prop"> |
---|
| 61 | <td valign="top" class="name"> |
---|
[441] | 62 | <label for="costCode">Cost Code:</label> |
---|
| 63 | </td> |
---|
| 64 | <td valign="top" class="value ${hasErrors(bean:inventoryItemPurchaseInstance,field:'costCode','errors')}"> |
---|
| 65 | <g:select optionKey="id" |
---|
| 66 | from="${ CostCode.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }" |
---|
| 67 | name="costCode.id" |
---|
| 68 | value="${inventoryItemPurchaseInstance?.costCode?.id}" |
---|
[605] | 69 | noSelection="['null':/${g.message(code:'default.please.select.text')}/]"></g:select> |
---|
[441] | 70 | </td> |
---|
[605] | 71 | </tr> |
---|
[441] | 72 | |
---|
[605] | 73 | <tr class="prop"> |
---|
| 74 | <td valign="top" class="name"> |
---|
| 75 | <label for="supplier">Supplier:</label> |
---|
| 76 | </td> |
---|
| 77 | <td valign="top" class="value ${hasErrors(bean:inventoryItemPurchaseInstance,field:'supplier','errors')}"> |
---|
| 78 | <g:select optionKey="id" |
---|
| 79 | from="${ Supplier.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }" |
---|
| 80 | name="supplier.id" |
---|
| 81 | value="${inventoryItemPurchaseInstance?.supplier?.id}" |
---|
| 82 | noSelection="['null':/${g.message(code:'default.please.select.text')}/]"> |
---|
| 83 | </g:select> |
---|
| 84 | <p><g:link controller="supplierDetailed" action="create">+Add Supplier</g:link></p> |
---|
| 85 | </td> |
---|
| 86 | </tr> |
---|
| 87 | |
---|
[441] | 88 | <tr class="prop"> |
---|
| 89 | <td valign="top" class="name"> |
---|
| 90 | <label for="quantity">Quantity:</label> |
---|
| 91 | </td> |
---|
| 92 | <td valign="top" class="value ${hasErrors(bean:inventoryItemPurchaseInstance,field:'quantity','errors')}"> |
---|
| 93 | <input type="text" id="quantity" name="quantity" value="${fieldValue(bean:inventoryItemPurchaseInstance,field:'quantity')}" /> |
---|
| 94 | ${inventoryItemPurchaseInstance.inventoryItem.unitOfMeasure.encodeAsHTML()} |
---|
| 95 | </td> |
---|
| 96 | </tr> |
---|
| 97 | |
---|
| 98 | <tr class="prop"> |
---|
| 99 | <td valign="top" class="name"> |
---|
[605] | 100 | <label for="orderValue">Order Value:</label> |
---|
[441] | 101 | </td> |
---|
| 102 | <td valign="top" class="value"> |
---|
| 103 | <input class="medium ${hasErrors(bean:inventoryItemPurchaseInstance,field:'orderValueAmount','errors')}" |
---|
| 104 | type="text" id="orderValueAmount" name="orderValueAmount" |
---|
| 105 | value="${inventoryItemPurchaseInstance.orderValueAmount}" /> |
---|
| 106 | <g:currencySelect name="orderValueCurrency" |
---|
[605] | 107 | value="${inventoryItemPurchaseInstance?.orderValueCurrency}" |
---|
| 108 | from="${grailsApplication.config.currencyList}"> |
---|
| 109 | </g:currencySelect> |
---|
[441] | 110 | </td> |
---|
[605] | 111 | </tr> |
---|
[441] | 112 | |
---|
[605] | 113 | <tr class="prop"> |
---|
| 114 | <td valign="top" class="name"> |
---|
| 115 | <label for="comment">Comment:</label> |
---|
| 116 | </td> |
---|
| 117 | <td valign="top" class="value ${hasErrors(bean:inventoryItemPurchaseInstance,field:'comment','errors')}"> |
---|
| 118 | <textarea rows="5" cols="40" name="comment">${fieldValue(bean:inventoryItemPurchaseInstance, field:'comment')}</textarea> |
---|
| 119 | </td> |
---|
| 120 | </tr> |
---|
| 121 | |
---|
[441] | 122 | </tbody> |
---|
| 123 | </table> |
---|
| 124 | </div> |
---|
| 125 | <div class="buttons"> |
---|
| 126 | <span class="button"><input class="save" type="submit" value="Create" /></span> |
---|
| 127 | </div> |
---|
| 128 | </g:form> |
---|
| 129 | </div> |
---|
| 130 | </body> |
---|
| 131 | </html> |
---|