

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main" />
        <title>Show InventoryItemPurchase</title>
        <nav:resources override="true"/>
    </head>
    <body>
        <div class="nav">
            <nav:renderSubItems group="navAlt"/>
        </div>
        <div class="body">
            <g:render template="/shared/messages" />
            <div class="dialog">
                <table>
                    <tbody>
                    
                        <tr class="prop">
                            <td valign="top" class="name">Inventory Item:</td>
                            
                            <td valign="top" class="value"><g:link controller="inventoryItemDetailed" action="show" id="${inventoryItemPurchaseInstance?.inventoryItem?.id}">${inventoryItemPurchaseInstance?.inventoryItem?.encodeAsHTML()}</g:link></td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name">Purchase Type:</td>
                            
                            <td valign="top" class="value">${inventoryItemPurchaseInstance?.inventoryItemPurchaseType?.encodeAsHTML()}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name">Purchase Order #:</td>
                            
                            <td valign="top" class="value">${fieldValue(bean:inventoryItemPurchaseInstance, field:'purchaseOrderNumber')}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name">Date:</td>
                            <td valign="top" class="value">
                                <g:formatDate date="${inventoryItemPurchaseInstance?.date}" format="EEE, dd-MMM-yyyy"/>
                            </td>
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name">Cost Code:</td>
                            
                            <td valign="top" class="value"><g:link controller="costCodeDetailed" action="show" id="${inventoryItemPurchaseInstance?.costCode?.id}">${inventoryItemPurchaseInstance?.costCode?.encodeAsHTML()}</g:link></td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name">Budget Status:</td>
                            
                            <td valign="top" class="value">${inventoryItemPurchaseInstance?.taskBudgetStatus?.encodeAsHTML()}</td>
                            
                        </tr>
                        
                         <tr class="prop">
                            <td valign="top" class="name">Supplier:</td>
                            
                            <td valign="top" class="value"><g:link controller="supplierDetailed" action="show" id="${inventoryItemPurchaseInstance?.supplier?.id}">${inventoryItemPurchaseInstance?.supplier?.encodeAsHTML()}</g:link></td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name">Quantity:</td>
                            
                            <td valign="top" class="value">${fieldValue(bean:inventoryItemPurchaseInstance, field:'quantity')}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name">Order Value:</td>
                            
                            <td valign="top" class="value">
                                ${fieldValue(bean:inventoryItemPurchaseInstance, field:'orderValueAmount')}
                                ${inventoryItemPurchaseInstance.orderValueCurrency?.encodeAsHTML()}
                            </td>
                            
                        </tr>

                        <g:if test="${inventoryItemPurchaseInstance.inventoryItemPurchaseType?.id == 4}">
                            <tr class="prop">
                                <td valign="top" class="name">Invoice Number:</td>
                                <td valign="top" class="value">${fieldValue(bean:inventoryItemPurchaseInstance, field:'invoiceNumber')}</td>
                            </tr>
                        </g:if>
                        
                        <tr class="prop">
                            <td valign="top" class="name">
                                <label for="receivedComplete">Received Complete:</label>
                            </td>
                            <td valign="top" class="value">
                                ${inventoryItemPurchaseInstance?.receivedComplete}
                            </td>
                        </tr>
                        
                        <tr class="prop">
                            <td valign="top" class="name">
                                <label for="invoicePaymentApproved">Invoice Payment Approved:</label>
                            </td>
                            <td valign="top" class="value">
                                ${inventoryItemPurchaseInstance?.invoicePaymentApproved}
                            </td>
                        </tr>
                        
                        <tr class="prop">
                            <td valign="top" class="name">Comment:</td>
                            <td valign="top" class="value">${fieldValue(bean:inventoryItemPurchaseInstance, field:'comment')}</td>
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name">Entered By:</td>
                            <td valign="top" class="value">
                                <g:link controller="person" action="show" id="${inventoryItemPurchaseInstance?.enteredBy?.id}">
                                    ${inventoryItemPurchaseInstance?.enteredBy?.encodeAsHTML()}
                                </g:link>
                                    on <g:formatDate date="${inventoryItemPurchaseInstance?.dateCreated}" format="EEE, dd-MMM-yyyy @ HH:mm"/>
                            </td>
                        </tr>

                        <g:if test="${inventoryItemPurchaseInstance.lastUpdatedBy}">
                            <tr class="prop">
                                <td valign="top" class="name">Last Updated By:</td>
                                <td valign="top" class="value">
                                    <g:link controller="person" action="show" id="${inventoryItemPurchaseInstance?.lastUpdatedBy?.id}">
                                        ${inventoryItemPurchaseInstance?.lastUpdatedBy.encodeAsHTML()}
                                    </g:link>
                                    on <g:formatDate date="${inventoryItemPurchaseInstance?.lastUpdated}" format="EEE, dd-MMM-yyyy @ HH:mm"/>
                                </td>
                            </tr>
                        </g:if >
                    
                    </tbody>
                </table>
            </div>
            <div class="buttons">
                <g:form>
                    <g:hiddenField name="id" value="${inventoryItemPurchaseInstance?.id}" />
                    <g:hiddenField name="returnTo" value="${params.returnTo}" />
                    <span class="button"><g:actionSubmit class="edit" value="Edit" /></span>
                    <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span>
                </g:form>
            </div>
        </div>
    </body>
</html>
