Ignore:
Timestamp:
Jun 21, 2010, 12:23:21 PM (14 years ago)
Author:
gav
Message:

Domain change, several changes to InventoryItemPurchase.
Update views and logic to suite.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/views/inventoryItemPurchaseDetailed/create.gsp

    r595 r605  
    77        <title>Create InventoryItemPurchase</title>
    88        <nav:resources override="true"/>
     9        <resource:dateChooser />
    910    </head>
    1011    <body>
     
    5051                            <tr class="prop">
    5152                                <td valign="top" class="name">
     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">
    5262                                    <label for="costCode">Cost Code:</label>
    5363                                </td>
     
    5767                                                        name="costCode.id"
    5868                                                        value="${inventoryItemPurchaseInstance?.costCode?.id}"
    59                                                         noSelection="['null':'']"></g:select>
     69                                                        noSelection="['null':/${g.message(code:'default.please.select.text')}/]"></g:select>
    6070                                </td>
    61                             </tr>
     71                            </tr>
     72                       
     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>
    6287                       
    6388                            <tr class="prop">
     
    7398                            <tr class="prop">
    7499                                <td valign="top" class="name">
    75                                     <label for="orderValue">Purchase Order $:</label>
     100                                    <label for="orderValue">Order Value:</label>
    76101                                </td>
    77102                                <td valign="top" class="value">
     
    80105                                                    value="${inventoryItemPurchaseInstance.orderValueAmount}" />
    81106                                    <g:currencySelect name="orderValueCurrency"
    82                                                                         value="${inventoryItemPurchaseInstance.orderValueCurrency}" />
     107                                                                        value="${inventoryItemPurchaseInstance?.orderValueCurrency}"
     108                                                                        from="${grailsApplication.config.currencyList}">
     109                                    </g:currencySelect>
    83110                                </td>
    84                             </tr>
     111                            </tr>
     112                       
     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>
    85121                       
    86122                        </tbody>
Note: See TracChangeset for help on using the changeset viewer.