source: trunk/grails-app/views/inventoryItemPurchaseDetailed/create.gsp @ 441

Last change on this file since 441 was 441, checked in by gav, 14 years ago

Add CostCode and InventoryItemPurchase domain classes with import features.
Includes some fixes to inventory imports, where manufacturer and supplier were crossed.

File size: 5.2 KB
Line 
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    </head>
9    <body>
10        <div class="nav">
11            <h1>Order Inventory</h1>
12        </div>
13        <div class="body">
14            <g:render template="/shared/messages" />
15            <g:hasErrors bean="${inventoryItemPurchaseInstance}">
16            <div class="errors">
17                <g:renderErrors bean="${inventoryItemPurchaseInstance}" as="list" />
18            </div>
19            </g:hasErrors>
20            <g:form action="save" method="post" >
21                <g:hiddenField name="inventoryItem.id" value="${inventoryItemPurchaseInstance?.inventoryItem?.id}" />
22                <div class="dialog">
23                    <table>
24                        <tbody>
25                       
26                            <tr class="prop">
27                                <td valign="top" class="name">
28                                    <label for="inventoryItem">Inventory Item:</label>
29                                </td>
30                                <td valign="top" class="value">
31                                    <g:link controller="inventoryItemDetailed"
32                                                    action="show"
33                                                    id="${inventoryItemPurchaseInstance.inventoryItem.id}">
34                                        ${inventoryItemPurchaseInstance.inventoryItem.encodeAsHTML()}
35                                    </g:link>
36                                </td>
37                            </tr>
38                       
39                            <tr class="prop">
40                                <td valign="top" class="name">
41                                    <label for="purchaseOrderNumber">Purchase Order #:</label>
42                                </td>
43                                <td valign="top" class="value ${hasErrors(bean:inventoryItemPurchaseInstance,field:'purchaseOrderNumber','errors')}">
44                                    <input type="text" maxlength="50" id="purchaseOrderNumber" name="purchaseOrderNumber" value="${fieldValue(bean:inventoryItemPurchaseInstance,field:'purchaseOrderNumber')}"/>
45                                </td>
46                            </tr>
47                       
48                            <tr class="prop">
49                                <td valign="top" class="name">
50                                    <label for="costCode">Cost Code:</label>
51                                </td>
52                                <td valign="top" class="value ${hasErrors(bean:inventoryItemPurchaseInstance,field:'costCode','errors')}">
53                                    <g:select optionKey="id"
54                                                        from="${ CostCode.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }"
55                                                        name="costCode.id"
56                                                        value="${inventoryItemPurchaseInstance?.costCode?.id}"
57                                                        noSelection="['null':'']"></g:select>
58                                </td>
59                            </tr>
60                       
61                            <tr class="prop">
62                                <td valign="top" class="name">
63                                    <label for="quantity">Quantity:</label>
64                                </td>
65                                <td valign="top" class="value ${hasErrors(bean:inventoryItemPurchaseInstance,field:'quantity','errors')}">
66                                    <input type="text" id="quantity" name="quantity" value="${fieldValue(bean:inventoryItemPurchaseInstance,field:'quantity')}" />
67                                    ${inventoryItemPurchaseInstance.inventoryItem.unitOfMeasure.encodeAsHTML()}
68                                </td>
69                            </tr>
70                       
71                            <tr class="prop">
72                                <td valign="top" class="name">
73                                    <label for="orderValue">Purchase Order $:</label>
74                                </td>
75                                <td valign="top" class="value">
76                                    <input  class="medium ${hasErrors(bean:inventoryItemPurchaseInstance,field:'orderValueAmount','errors')}"
77                                                    type="text" id="orderValueAmount" name="orderValueAmount"
78                                                    value="${inventoryItemPurchaseInstance.orderValueAmount}" />
79                                    <g:currencySelect name="orderValueCurrency"
80                                                                        value="${inventoryItemPurchaseInstance.orderValueCurrency}" />
81                                </td>
82                            </tr>
83                       
84                        </tbody>
85                    </table>
86                </div>
87                <div class="buttons">
88                    <span class="button"><input class="save" type="submit" value="Create" /></span>
89                </div>
90            </g:form>
91        </div>
92    </body>
93</html>
Note: See TracBrowser for help on using the repository browser.