<%@ page language="C#" autoeventwireup="true" inherits="Forms_InvoiceEntry, App_Web_txr1i55a" enableeventvalidation="false" %>

<%@ Register Src="~/UserControls/Notification_List.ascx" TagPrefix="uc3" TagName="NotificationsList" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="~/UserControls/TrinetraGrid.ascx" TagName="FleetGrid" TagPrefix="uc5" %>
<%@ Register Src="~/UserControls/TrinetraGrid.ascx" TagName="EmailGrid" TagPrefix="uc4" %>
<%@ Register Src="~/UserControls/New_Header.ascx" TagName="Header" TagPrefix="uc1" %>
<%@ Register Src="~/UserControls/New_Footer.ascx" TagName="Footer" TagPrefix="uc2" %>
<%--<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>--%>

<%--<%@ Register Assembly="DevExpress.Web.v8.2, Version=8.2.10.0, Culture=neutral, PublicKeyToken=9b171c9fd64da1d1"
    Namespace="DevExpress.Web.ASPxMenu" TagPrefix="dxm" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v8.2" Namespace="DevExpress.Web.ASPxGridView"
    TagPrefix="dxgv" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v8.2, Version=8.2.10.0, Culture=neutral, PublicKeyToken=9b171c9fd64da1d1"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dxe" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v8.2" Namespace="DevExpress.Web.ASPxEditors"
    TagPrefix="dxe" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v8.2.Export" Namespace="DevExpress.Web.ASPxGridView.Export"
    TagPrefix="exp" %>
<%@ Register Assembly="DevExpress.Web.v8.2" Namespace="DevExpress.Web.ASPxPopupControl"
    TagPrefix="dxpc" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v8.2, Version=8.2.10.0, Culture=neutral, PublicKeyToken=9B171C9FD64DA1D1"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>--%>

<%@ Register Assembly="DevExpress.Web.v14.2" Namespace="DevExpress.Web" TagPrefix="dxw" %>

<!DOCTYPE html>
<html lang="en">
<head runat="server">
    <title>tSense-IoT Manage Receipt</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <%--<meta http-equiv="Page-Enter" content="blendTrans(Duration=0)" />
    <meta http-equiv="Page-Exit" content="blendTrans(Duration=0)" />
    <meta http-equiv="X-UA-Compatible" content="IE=7" />--%>

    <link href="../css/CustomeAlert/demos.css" rel="stylesheet" type="text/css" />
    <link href="../css/CustomeAlert/themes/jquery.ui.all.css" rel="stylesheet" type="text/css" />
    <link id="reset" runat="server" href="../css/reset.css" rel="stylesheet" type="text/css" />
    <link id="stylesheet2" runat="server" href="../css/stylesheet2.css" rel="stylesheet" type="text/css" />
    <link id="dropdown" runat="server" href="../css/dropdown.css" rel="stylesheet" type="text/css" />
    <link rel="SHORTCUT ICON" href="../images/favicon.ico" />
    <link id="ieonly" runat="server" rel="stylesheet" type="text/css" href="" />
    <link id="datepicker" runat="server" type="text/css" href="../css/ui.datepicker.css" rel="stylesheet" />
    <link id="uicore" runat="server" type="text/css" href="../css/ui.core.css" rel="stylesheet" />
    <link id="uitheme" runat="server" type="text/css" href="../css/ui.theme.css" rel="stylesheet" />

    <%--Custom Theme for DevEx 14.2--%>
    <link id="GridView" runat="server" type="text/css" href="~/App_Themes/Office2003Blue/GridView/grid.css" rel="stylesheet" />
    <link id="Editors" runat="server" type="text/css" href="~/App_Themes/Office2003Blue/Editors/styles.css" rel="stylesheet" />

    <%--********* For Bootstrap Implementation *************--%>
    <link id="BootStrapCss" href="../css/bootstrap.css" runat="server" rel="stylesheet" type="text/css" />
    <link id="mainstyle" runat="server" href="../css/mainstyle.css" rel="stylesheet" type="text/css" />
    <%--********* End of Bootstrap Implementation *************--%>

    <script src="../js/CustomAlert/jquery.min.js" type="text/javascript"></script>
    <script src="../js/CustomAlert/jquery-ui-1.10.3.custom.min.js" type="text/javascript"></script>
    <script src="../js/CustomAlert/jquery-ui-1.10.3.custom.js" type="text/javascript"></script>
    <script src="../js/CustomAlert/CustomAlert.js" type="text/javascript"></script>
    <script type="text/javascript" src="../js/jquery-1.5.1.min.js"></script>
    <script type="text/javascript" src="../js/ui.datepicker.js"></script>
    <script type="text/javascript" src="../js/JQQueryDatePicker.js"></script>
    <script src="../js/myformvalidations.js" type="text/javascript"></script>
    <script src="../js/InventoryMgmt.js" type="text/javascript"></script>
    <script src="../js/wow.min.js"></script>
</head>
<body>
    <div class="pageContainer">
        <form id="form1" runat="server">
            <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true" ScriptMode="Release">
            </asp:ScriptManager>
            <asp:UpdatePanel runat="server" ID="updVenDetails">
                <ContentTemplate>
                    <!-- Header Starts Here -->
                    <uc1:Header ID="ucHeader" runat="server" />
                    <!-- Nav Ends Here -->
                    <!-- Content Starts Here -->
                    <div id="outer">
                        <div id="inner">
                            <div id="float-wrap">
                                <!-- Main Content Starts Here -->
                                <div id="content">
                                    <div class="content-wrap">
                                        <div id="top-content" class="head-part">
                                            <div id="heading" class="col-sm-3">
                                                <img class="icon" src="../images/configuration-icon.jpg" alt="" />
                                                <h1>
                                                    <asp:Literal ID="lblConfigurationCaption" runat="server">Configuration</asp:Literal>
                                                </h1>
                                                <asp:LinkButton ID="lnkHomeCaption" runat="server">Home</asp:LinkButton>
                                                <span>&gt;</span>
                                                <asp:LinkButton ID="lnkItemMgmt" PostBackUrl="InvoiceEntry.aspx" runat="server"
                                                    Text="Reciept Entry" OnClick="lnkItemMgmt_Click">
                                                </asp:LinkButton>
                                            </div>
                                            <div class="col-sm-9 head-part-btns">
                                                <div class="pull-right">
                                                    <asp:ImageButton ID="lbtnAddVendor1" runat="server" CausesValidation="false" OnClick="lbtnAddItem_Click"
                                                        ImageUrl="~/images/btn-add-vehicle.jpg" Visible="false" />
                                                    <asp:LinkButton ID="lbtnAddItem" runat="server" CssClass="MultilingualBtn" CausesValidation="false"
                                                        OnClick="lbtnAddItem_Click">
                                                        <span id="Span1" runat="server" class="MultilingualBtnspan">
                                                            <div class="AddVehicle">
                                                                <div id="AddVendorDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                    Add Receipt
                                                                </div>
                                                            </div>
                                                        </span>
                                                    </asp:LinkButton>
                                                    <asp:ImageButton ID="lbtnVehSeveritySetting1" PostBackUrl="MsgSeveritySettings.aspx"
                                                        runat="server" CausesValidation="false" ImageUrl="~/images/btn-vehicle-msg.jpg"
                                                        Visible="false" />
                                                    <asp:LinkButton ID="lbtnVehSeveritySetting" runat="server" CssClass="MultilingualBtn"
                                                        CausesValidation="false" PostBackUrl="~/Forms/VendorVehicleMapping.aspx" Visible="false">
                                                        <span id="Span3" runat="server" class="MultilingualBtnspan">
                                                            <div class="SeveritySettings">
                                                                <div id="SeveritySettingsDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                    Vehicle Assignment
                                                                </div>
                                                            </div>
                                                        </span>
                                                    </asp:LinkButton>
                                                    <asp:ImageButton ID="btnBack1" runat="server" OnClick="btnBack_Click" CausesValidation="false"
                                                        ImageUrl="~/images/btn-back-to-configuration.jpg" Visible="false" />
                                                    <asp:LinkButton ID="btnBack" runat="server" CssClass="MultilingualBtn" CausesValidation="false"
                                                        PostBackUrl="~/Forms/ConfigurationSetup.aspx">
                                                        <span id="Span4" runat="server" class="MultilingualBtnspan">
                                                            <div class="Back">
                                                                <div id="BacktoConfigurationDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                    Back to Configuration
                                                                </div>
                                                            </div>
                                                        </span>
                                                    </asp:LinkButton>
                                                </div>
                                            </div>
                                            <div class="clear clearfix"></div>
                                        </div>
                                        <div class="clear clearfix"></div>
                                        <asp:Panel ID="pnlItemInfo" runat="server" Visible="false">
                                            <div class="form-box">
                                                <h1>
                                                    <span class="icon" style="padding-top: 5">
                                                        <img src="../images/vehicle-icon.gif" alt="" title="" />
                                                    </span>
                                                    <asp:Label ID="lblVenInfoHeading" runat="server" Text="Receipt Details"></asp:Label>
                                                </h1>
                                                <div class="form-tbl col-sm-10 col-lg-8 padding-sm-lrt">
                                                    <div class="form-horizontal">
                                                        <div class="form-group">
                                                            <div class="col-sm-3 col-md-2 padding-width-sm icon-img">
                                                                <asp:Label ID="lblItemCode" runat="server" Text="Receipt #" CssClass="label"></asp:Label>
                                                                <span style="color: red">*</span>
                                                            </div>
                                                            <div class="col-sm-3 padding-width-sm">
                                                                <asp:TextBox ID="txtInvc" runat="server" onpaste="return false" onkeypress="return chkDescription(event,this,49);"
                                                                    CssClass="form-control" TabIndex="1" MaxLength="49"></asp:TextBox>
                                                            </div>
                                                        </div>
                                                        <div class="form-group">
                                                            <div class="col-sm-3 col-md-2 padding-width-sm icon-img">
                                                                <asp:Label ID="lblInvdate" runat="server" Text="Receipt Date"></asp:Label>
                                                                <span style="color: red">*</span>
                                                            </div>
                                                            <div class="col-sm-3 padding-width-sm">
                                                                <asp:TextBox ID="txtInvcDate" runat="server" onpaste="return false" CssClass="form-control"
                                                                    onkeypress="return CalendarTab(event);" TabIndex="2"></asp:TextBox>
                                                                <%--  <cc1:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" BehaviorID="BAutoCompleteExtender1"
                                                            FirstRowSelected="false" ServiceMethod="GetItems" MinimumPrefixLength="1" CompletionInterval="100"
                                                            EnableCaching="false" CompletionSetCount="10" TargetControlID="txtItemName" CompletionListElementID="divItems"
                                                            CompletionListCssClass="autocomplete_completionListElement" CompletionListHighlightedItemCssClass="autocomplete_highlightedListItem"
                                                            CompletionListItemCssClass="autocomplete_listItem" OnClientItemSelected="GetItemNo">
                                                        </cc1:AutoCompleteExtender>--%>
                                                                <div id="divItems" style="background-color: White">
                                                                </div>
                                                            </div>
                                                            <td>&nbsp;<asp:HiddenField ID="hdnItemNo" runat="server" />
                                                                &nbsp;<asp:HiddenField ID="hdnUoM" runat="server" />
                                                                &nbsp;<asp:HiddenField ID="hdnUnitPrice" runat="server" />
                                                            </td>
                                                        </div>
                                                        <div class="form-group" style="display: none">
                                                            <div class="col-sm-3 col-md-2 padding-width-sm icon-img">
                                                                <asp:Label ID="lblDueDate" runat="server" Text="Receipt closed Date"></asp:Label>
                                                            </div>
                                                            <div class="col-sm-3 padding-width-sm">
                                                                <asp:TextBox ID="txtDueDate" runat="server" oncopy="return false" TabIndex="3" CssClass="form-control"
                                                                    onkeypress="return CalendarTab(event);" ondrop="return false" onpaste="return false"
                                                                    MaxLength="15" Width="149" onblur="" />
                                                            </div>
                                                        </div>
                                                        <div class="form-group">
                                                            <div class="col-sm-3 col-md-2 padding-width-sm icon-img">
                                                                <asp:Label ID="lblDHT" runat="server" Text="Vendor"></asp:Label>
                                                                <span style="color: red">*</span>
                                                            </div>
                                                            <div class="col-sm-3 padding-width-sm">
                                                                <asp:TextBox ID="txtvendor" runat="server" onpaste="return false" TabIndex="2" CssClass="form-control"></asp:TextBox>
                                                                <cc1:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" BehaviorID="BAutoCompleteExtender1"
                                                                    FirstRowSelected="false" ServiceMethod="Getvendors" MinimumPrefixLength="1" CompletionInterval="100"
                                                                    EnableCaching="false" CompletionSetCount="10" TargetControlID="txtvendor" CompletionListElementID="divItems1"
                                                                    CompletionListCssClass="autocomplete_completionListElement" CompletionListHighlightedItemCssClass="autocomplete_highlightedListItem"
                                                                    CompletionListItemCssClass="autocomplete_listItem" OnClientItemSelected="GetVendorNo">
                                                                </cc1:AutoCompleteExtender>
                                                                <div id="divItems1" style="background-color: White">
                                                                </div>
                                                            </div>
                                                            <div>
                                                                <asp:HiddenField ID="hdnVendorCode" runat="server" Value="" />
                                                                <asp:DropDownList ID="ddlVendor" runat="server" TabIndex="4" CssClass="form-control" Visible="false">
                                                                    <asp:ListItem Text="- Select -" Value="- Select -"></asp:ListItem>
                                                                </asp:DropDownList>
                                                            </div>
                                                        </div>
                                                        <div class="form-group">
                                                            <div id="dvGrid">
                                                                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                                                    <ContentTemplate>
                                                                        <%--<asp:Panel runat="server" GroupingText="Purchased Item Details">
                                                                        </asp:Panel>--%>
                                                                        <div class="panel panel-default override-col-width">
                                                                            <div class="panel-heading padding-sm">
                                                                                <strong>
                                                                                    <span id="lblPolicyName">Purchased Item Details</span>
                                                                                </strong>
                                                                            </div>
                                                                            <div class="form-box">
                                                                                <h1>
                                                                                    <asp:Label ID="lblRouteDetails" runat="server" Text="Items Details *"></asp:Label>
                                                                                </h1>
                                                                                <div class="clearfix"></div>
                                                                                <div class="table-responsive">
                                                                                    <asp:GridView ID="GridView1" runat="server" Width="100%" AutoGenerateColumns="false"
                                                                                        Font-Names="Arial" Font-Size="9pt" AlternatingRowStyle-BackColor="#FAFAFA" RowStyle-BackColor="#FFFFFF"
                                                                                        HeaderStyle-BackColor="green" AllowPaging="true" ShowFooter="true" OnRowCancelingEdit="GridView1_RowCancelingEdit"
                                                                                        OnRowEditing="GridView1_RowEditing" OnRowCommand="GridView1_RowCommand" OnRowUpdating="GridView1_RowUpdating"
                                                                                        OnRowDataBound="GridView1_RowDataBound" DataKeyNames="Index" RowStyle-Height="20px"
                                                                                        GridLines="Both" CssClass="asp-gridview-responsive">
                                                                                        <HeaderStyle BackColor="#F2F2F2" VerticalAlign="Middle" HorizontalAlign="Center" Height="25px" Font-Bold="false" />
                                                                                        <Columns>
                                                                                            <asp:TemplateField HeaderText="S.No." HeaderStyle-Font-Bold="false" HeaderStyle-HorizontalAlign="Center">
                                                                                                <ItemTemplate>
                                                                                                    <span>
                                                                                                        <%#Container.DataItemIndex + 1 %>
                                                                                                    </span>
                                                                                                </ItemTemplate>
                                                                                                <ItemStyle HorizontalAlign="Center" Height="18px" VerticalAlign="Middle" />
                                                                                            </asp:TemplateField>
                                                                                            <asp:TemplateField ItemStyle-Width="19%" HeaderText="Item code" HeaderStyle-Font-Bold="false">
                                                                                                <ItemTemplate>
                                                                                                    <asp:Label ID="lblItemcode" runat="server" Text='<%# Eval("ItemCode")%>'></asp:Label>
                                                                                                </ItemTemplate>
                                                                                                <FooterTemplate>
                                                                                                    <%--<asp:TextBox ID="txtItemcode" Width="40px" MaxLength="5" runat="server" Visible="false"></asp:TextBox>--%>
                                                                                                    <asp:Label ID="lblItemcode" runat="server"></asp:Label>
                                                                                                </FooterTemplate>
                                                                                                <ItemStyle HorizontalAlign="Left" Height="18px" />
                                                                                            </asp:TemplateField>
                                                                                            <asp:TemplateField ItemStyle-Width="19%" HeaderText="Item Name">
                                                                                                <ItemTemplate>
                                                                                                    <asp:Label ID="lblItemname" runat="server" Text='<%# Eval("ItemName")%>'></asp:Label>
                                                                                                </ItemTemplate>
                                                                                                <EditItemTemplate>
                                                                                                    <asp:TextBox ID="txtItemname" runat="server" Text='<%# Eval("ItemName")%>' CssClass="form-control"
                                                                                                        AutoCompleteType="Disabled" onblur="fun_ItemCode(this,'txtItemname');" MaxLength="149"></asp:TextBox>
                                                                                                    <cc1:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" BehaviorID="BAutoCompleteExtender1"
                                                                                                        FirstRowSelected="false" ServiceMethod="GetItems" MinimumPrefixLength="1" CompletionInterval="100"
                                                                                                        EnableCaching="false" CompletionSetCount="10" TargetControlID="txtItemname" CompletionListElementID="divItems"
                                                                                                        CompletionListCssClass="autocomplete_completionListElement" CompletionListHighlightedItemCssClass="autocomplete_highlightedListItem"
                                                                                                        CompletionListItemCssClass="autocomplete_listItem" OnClientItemSelected="GetItemNo">
                                                                                                    </cc1:AutoCompleteExtender>
                                                                                                </EditItemTemplate>
                                                                                                <FooterTemplate>
                                                                                                    <asp:TextBox ID="txtItemname" runat="server" MaxLength="149" Visible="false" CssClass="form-control"
                                                                                                        onblur="fun_ItemCode(this,'txtItemname');" AutoCompleteType="Disabled"></asp:TextBox>
                                                                                                    <cc1:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" BehaviorID="BAutoCompleteExtender1"
                                                                                                        FirstRowSelected="false" ServiceMethod="GetItems" MinimumPrefixLength="1" CompletionInterval="100"
                                                                                                        EnableCaching="false" CompletionSetCount="10" TargetControlID="txtItemname" CompletionListElementID="divItems"
                                                                                                        CompletionListCssClass="autocomplete_completionListElement" CompletionListHighlightedItemCssClass="autocomplete_highlightedListItem"
                                                                                                        CompletionListItemCssClass="autocomplete_listItem" OnClientItemSelected="GetItemNo">
                                                                                                    </cc1:AutoCompleteExtender>
                                                                                                </FooterTemplate>
                                                                                                <HeaderStyle BackColor="#F2F2F2" Height="25px" VerticalAlign="Middle" HorizontalAlign="Center"
                                                                                                    Font-Bold="false" />
                                                                                                <ItemStyle HorizontalAlign="Left" Height="18px" />
                                                                                            </asp:TemplateField>
                                                                                            <asp:TemplateField ItemStyle-Width="9%" HeaderText="Ordered Qty">
                                                                                                <ItemTemplate>
                                                                                                    <asp:Label ID="lblOrderQty" runat="server" Text='<%# Eval("OrderQty")%>'></asp:Label>
                                                                                                </ItemTemplate>
                                                                                                <EditItemTemplate>
                                                                                                    <asp:TextBox ID="txtOrderQty" runat="server" Text='<%# Eval("OrderQty")%>' CssClass="form-control"
                                                                                                        MaxLength="6" onkeypress="return chkNumeric_only(event);" AutoCompleteType="Disabled"></asp:TextBox>
                                                                                                </EditItemTemplate>
                                                                                                <FooterTemplate>
                                                                                                    <asp:TextBox ID="txtOrderQty" runat="server" Visible="false" CssClass="form-control" MaxLength="6"
                                                                                                        onkeypress="return chkNumeric_only(event);" AutoCompleteType="Disabled"></asp:TextBox>
                                                                                                </FooterTemplate>
                                                                                                <HeaderStyle BackColor="#F2F2F2" Height="25px" VerticalAlign="Middle" HorizontalAlign="Center"
                                                                                                    Font-Bold="false" />
                                                                                                <ItemStyle HorizontalAlign="Right" Height="18px" />
                                                                                            </asp:TemplateField>
                                                                                            <asp:TemplateField ItemStyle-Width="9%" HeaderText="Received Qty.">
                                                                                                <ItemTemplate>
                                                                                                    <asp:Label ID="lblRevdQty" runat="server" Text='<%# Eval("ReceivedQty")%>'></asp:Label>
                                                                                                </ItemTemplate>
                                                                                                <EditItemTemplate>
                                                                                                    <asp:TextBox ID="txtRevdQty" runat="server" CssClass="form-control" Text='<%# Eval("ReceivedQty")%>'
                                                                                                        AutoCompleteType="Disabled" onblur="fun_val(this,'txtRevdQty');" MaxLength="6"
                                                                                                        onkeypress="return chkNumeric_only(event);"></asp:TextBox>
                                                                                                </EditItemTemplate>
                                                                                                <FooterTemplate>
                                                                                                    <asp:TextBox ID="txtRevdQty" runat="server" CssClass="form-control" Visible="false" MaxLength="6"
                                                                                                        onkeypress="return chkNumeric_only(event);" onblur="fun_val(this,'txtRevdQty');"></asp:TextBox>
                                                                                                </FooterTemplate>
                                                                                                <HeaderStyle BackColor="#F2F2F2" Height="25px" VerticalAlign="Middle" HorizontalAlign="Center"
                                                                                                    Font-Bold="false" />
                                                                                                <ItemStyle HorizontalAlign="Right" Height="18px" VerticalAlign="Middle" />
                                                                                            </asp:TemplateField>
                                                                                            <asp:TemplateField ItemStyle-Width="6%" HeaderText="UoM">
                                                                                                <ItemTemplate>
                                                                                                    <asp:Label ID="lblUoM" runat="server" Text='<%# Eval("UOM")%>'></asp:Label>
                                                                                                </ItemTemplate>
                                                                                                <FooterTemplate>
                                                                                                    <asp:Label ID="lblUoM" runat="server"></asp:Label>
                                                                                                </FooterTemplate>
                                                                                                <HeaderStyle BackColor="#F2F2F2" Height="25px" VerticalAlign="Middle" HorizontalAlign="Center"
                                                                                                    Font-Bold="false" />
                                                                                                <ItemStyle HorizontalAlign="Center" Height="18px" />
                                                                                            </asp:TemplateField>
                                                                                            <asp:TemplateField ItemStyle-Width="9%" HeaderText="Unit Price">
                                                                                                <ItemTemplate>
                                                                                                    <asp:Label ID="lblUnitprice" runat="server" Text='<%# Eval("UnitPrice","{0:#,#0.00}")%>'></asp:Label>
                                                                                                </ItemTemplate>
                                                                                                <EditItemTemplate>
                                                                                                    <asp:TextBox ID="txtUnitprice" runat="server" Text='<%# Eval("UnitPrice")%>' CssClass="form-control"
                                                                                                        AutoCompleteType="Disabled" onkeypress="return CalendarTab(event);" MaxLength="18"></asp:TextBox>
                                                                                                </EditItemTemplate>
                                                                                                <FooterTemplate>
                                                                                                    <asp:TextBox ID="txtUnitprice" runat="server" Visible="false" CssClass="form-control" onkeypress="return CalendarTab(event);"
                                                                                                        MaxLength="18"></asp:TextBox>
                                                                                                </FooterTemplate>
                                                                                                <HeaderStyle BackColor="#F2F2F2" Height="25px" VerticalAlign="Middle" HorizontalAlign="Center"
                                                                                                    Font-Bold="false" />
                                                                                                <ItemStyle HorizontalAlign="Right" Height="18px" />
                                                                                            </asp:TemplateField>
                                                                                            <asp:TemplateField ItemStyle-Width="9%" HeaderText="Net Price">
                                                                                                <ItemTemplate>
                                                                                                    <asp:Label ID="lblAmount" runat="server" Text='<%# Eval("Amount","{0:#,#0.00}")%>'></asp:Label>
                                                                                                </ItemTemplate>
                                                                                                <EditItemTemplate>
                                                                                                    <asp:TextBox ID="txtAmount" runat="server" Text='<%# Eval("Amount")%>' onblur="fun_val(this,'txtAmount');"
                                                                                                        AutoCompleteType="Disabled" CssClass="form-control" onkeypress="return chkDecNums(event, this);"
                                                                                                        MaxLength="18"></asp:TextBox>
                                                                                                </EditItemTemplate>
                                                                                                <FooterTemplate>
                                                                                                    <asp:TextBox ID="txtAmount" runat="server" Visible="false" onblur="fun_val(this,'txtAmount');"
                                                                                                        AutoCompleteType="Disabled" CssClass="form-control" onkeypress="return chkDecNums(event, this);"
                                                                                                        MaxLength="18"></asp:TextBox>
                                                                                                </FooterTemplate>
                                                                                                <HeaderStyle BackColor="#F2F2F2" Height="25px" VerticalAlign="Middle" HorizontalAlign="Center"
                                                                                                    Font-Bold="false" />
                                                                                                <ItemStyle HorizontalAlign="Right" Height="18px" />
                                                                                            </asp:TemplateField>
                                                                                            <asp:TemplateField ItemStyle-Width="9%" HeaderText="Total Amount">
                                                                                                <ItemTemplate>
                                                                                                    <%--<asp:Label ID="lblTotalAmt" runat="server" Text='<%# Eval("TotalAmount","{0:#,#0.00}")%>'></asp:Label>--%>
                                                                                                    <asp:Label ID="lblTotalAmt" runat="server" Text='<%# String.Format("{0:#,#0.00}", Eval("TotalAmount"))%>'></asp:Label>
                                                                                                </ItemTemplate>
                                                                                                <EditItemTemplate>
                                                                                                    <asp:Label ID="lblTotalAmt" runat="server" Text='<%# Eval("TotalAmount")%>'></asp:Label>
                                                                                                </EditItemTemplate>
                                                                                                <FooterTemplate>
                                                                                                    <asp:Label ID="lblTotalAmt" runat="server" Visible="false"></asp:Label>
                                                                                                    <asp:Label ID="lblTotal" runat="server"></asp:Label>
                                                                                                </FooterTemplate>
                                                                                                <FooterStyle HorizontalAlign="Right" />
                                                                                                <HeaderStyle BackColor="#F2F2F2" Height="25px" VerticalAlign="Middle" HorizontalAlign="Center"
                                                                                                    Font-Bold="false" />
                                                                                                <ItemStyle HorizontalAlign="Right" Height="18px" />
                                                                                            </asp:TemplateField>
                                                                                            <asp:TemplateField ItemStyle-Width="10%">
                                                                                                <ItemTemplate>
                                                                                                    <%--  <asp:LinkButton ID="lnk_edit" runat="server" CommandName="Edit" >
                                                                                            <img src="../images/icn-edit.gif" class="handButton" alt="View" title="Click here to Edit"/></asp:LinkButton>--%>
                                                                                                    <asp:ImageButton ID="lnk_edit" runat="server" AlternateText="Edit" ImageUrl="~/images/icn-edit.gif"
                                                                                                        ToolTip="Click here to Delete" CommandName="Edit" ImageAlign="Middle" CssClass="handButton"
                                                                                                        Style="cursor: pointer" OnClientClick="ShowPopUp();" />

                                                                                                    <asp:ImageButton ID="btnDelete" runat="server" AlternateText="Delete" CommandArgument='<%#String.Format("{0}-{1}", Eval("Index"),Eval("InvL_Sno"))%>'
                                                                                                        ImageUrl="~/images/delete-icon.gif" OnClick="btnDeleteItem_click" ToolTip="Click here to Delete"
                                                                                                        ImageAlign="Middle" CssClass="handButton" Style="cursor: pointer" OnClientClick="ShowPopUp();" />
                                                                                                </ItemTemplate>
                                                                                                <EditItemTemplate>
                                                                                                    <asp:ImageButton ID="lnk_update" runat="server" AlternateText="Update" ImageUrl="~/images/save-icon.gif"
                                                                                                        ToolTip="Click here to save changes" CommandName="Update" ImageAlign="Middle"
                                                                                                        CssClass="handButton" Style="cursor: pointer" OnClientClick="return fun_ItemSave(this,'lnk_update');" />
                                                                                                    &nbsp;
                                                                                                <asp:ImageButton ID="lnk_Cancel" runat="server" AlternateText="Cancel" ImageUrl="~/images/cancel-icon.gif"
                                                                                                    ToolTip="Click here to cancel" CommandName="Cancel" ImageAlign="Middle" CssClass="handButton"
                                                                                                    Style="cursor: pointer" OnClientClick="ShowPopUp();" />
                                                                                                    <%--  <asp:LinkButton ID="lnk_update" runat="server" CommandName="Update">Update</asp:LinkButton>
                                                                                            <asp:LinkButton ID="lnk_Cancel" runat="server" CommandName="Cancel">Cancel</asp:LinkButton>--%>
                                                                                                </EditItemTemplate>
                                                                                                <FooterTemplate>
                                                                                                    <asp:LinkButton ID="lnk_addnew" runat="server" CommandName="addnew">Add Item</asp:LinkButton>
                                                                                                    <asp:ImageButton ID="lnk_Save" runat="server" AlternateText="save" Visible="false"
                                                                                                        ImageUrl="~/images/save-icon.gif" ToolTip="Click here to save" CommandName="save"
                                                                                                        CssClass="handButton" Style="cursor: pointer" OnClientClick="return fun_ItemSave(this,'lnk_Save');" />
                                                                                                    &nbsp;
                                                                                                    <asp:ImageButton ID="lnk_Cancel" runat="server" AlternateText="Cancel" Visible="false"
                                                                                                        ImageUrl="~/images/cancel-icon.gif" ToolTip="Click here to cancel" CommandName="Cancel"
                                                                                                        CssClass="handButton" Style="cursor: pointer" OnClientClick="ShowPopUp();" />
                                                                                                    <%-- <asp:LinkButton ID="lnk_Save" runat="server" Visible="false" CommandName="save">Save</asp:LinkButton>
                                                                                            <asp:LinkButton ID="lnk_Cancel" runat="server" Visible="false" CommandName="Cancel">Cancel</asp:LinkButton>--%>
                                                                                                </FooterTemplate>
                                                                                                <HeaderStyle BackColor="#F2F2F2" Height="25px" VerticalAlign="Middle" HorizontalAlign="Center"
                                                                                                    Font-Bold="false" />
                                                                                                <ItemStyle VerticalAlign="Middle" HorizontalAlign="Center" Height="18px" />
                                                                                            </asp:TemplateField>
                                                                                        </Columns>
                                                                                        <FooterStyle CssClass="PageFooter" />
                                                                                        <EmptyDataTemplate>
                                                                                            <table cellpadding="0" cellspacing="0" border="0" style="width: 100%; min-width: 768px;">
                                                                                                <tr style="background-color: #F2F2F2; height: 20px; vertical-align: middle">
                                                                                                    <td width="20%">
                                                                                                        <span>Item Code </span>
                                                                                                    </td>
                                                                                                    <td width="20%">Item Name
                                                                                                    </td>
                                                                                                    <td width="10%">Ordered Qty
                                                                                                    </td>
                                                                                                    <td width="10%">Received Qty
                                                                                                    </td>
                                                                                                    <td width="10%">UoM
                                                                                                    </td>
                                                                                                    <td width="10%">Unit Price(Rs.)
                                                                                                    </td>
                                                                                                    <td width="10%">Net Price(Rs.)
                                                                                                    </td>
                                                                                                    <td width="11%">Total Amount (Rs)
                                                                                                    </td>
                                                                                                    <td>&nbsp;
                                                                                                    </td>
                                                                                                </tr>
                                                                                                <tr class="PageFooter">
                                                                                                    <td>
                                                                                                        <asp:Label ID="lblItemcode" runat="server"></asp:Label>
                                                                                                    </td>
                                                                                                    <td>
                                                                                                        <asp:TextBox ID="txtItemname" TabIndex="5" runat="server" CssClass="form-control" onblur="fun_ItemCode(this,'txtItemname');"
                                                                                                            AutoCompleteType="Disabled"></asp:TextBox>
                                                                                                        <cc1:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" BehaviorID="BAutoCompleteExtender1"
                                                                                                            FirstRowSelected="false" ServiceMethod="GetItems" MinimumPrefixLength="1" CompletionInterval="100"
                                                                                                            EnableCaching="false" CompletionSetCount="10" TargetControlID="txtItemname" CompletionListElementID="divItems"
                                                                                                            CompletionListCssClass="autocomplete_completionListElement" CompletionListHighlightedItemCssClass="autocomplete_highlightedListItem"
                                                                                                            CompletionListItemCssClass="autocomplete_listItem" OnClientItemSelected="GetItemNo">
                                                                                                        </cc1:AutoCompleteExtender>
                                                                                                    </td>
                                                                                                    <td>
                                                                                                        <asp:TextBox ID="txtOrderQty" runat="server" CssClass="form-control" TabIndex="6" MaxLength="6"
                                                                                                            onblur="chk_Qty(this,'txtOrderQty');" onkeypress="return chkNumeric_only(event);"></asp:TextBox>
                                                                                                    </td>
                                                                                                    <td>
                                                                                                        <asp:TextBox ID="txtRevdQty" runat="server" CssClass="form-control" TabIndex="7" onblur="fun_val(this,'txtRevdQty');"
                                                                                                            MaxLength="6" onkeypress="return chkNumeric_only(event);"></asp:TextBox>
                                                                                                    </td>
                                                                                                    <td>
                                                                                                        <asp:Label ID="lblUoM" runat="server"></asp:Label>
                                                                                                    </td>
                                                                                                    <td>
                                                                                                        <asp:TextBox ID="txtUnitprice" runat="server" CssClass="form-control" AutoCompleteType="Disabled"
                                                                                                            TabIndex="8" onkeypress="return CalendarTab(event);" MaxLength="18"></asp:TextBox>
                                                                                                    </td>
                                                                                                    <td>
                                                                                                        <asp:TextBox ID="txtAmount" runat="server" TabIndex="9" onblur="fun_val(this,'txtAmount');"
                                                                                                            onkeypress="return chkDecNums(event, this);" MaxLength="18" CssClass="form-control"></asp:TextBox>
                                                                                                    </td>
                                                                                                    <td>
                                                                                                        <asp:Label ID="lblTotalAmt" runat="server"></asp:Label>
                                                                                                    </td>
                                                                                                    <td>
                                                                                                        <asp:LinkButton ID="lnk_Save" runat="server" CommandName="Esave" CommandArgument=""
                                                                                                            TabIndex="10" OnClientClick="return fun_ItemSave(this,'lnk_Save');">Add</asp:LinkButton>
                                                                                                    </td>
                                                                                                </tr>
                                                                                            </table>
                                                                                        </EmptyDataTemplate>
                                                                                    </asp:GridView>
                                                                                    <div class="clearfix"></div>
                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                    </ContentTemplate>
                                                                    <Triggers>
                                                                        <asp:AsyncPostBackTrigger ControlID="GridView1" />
                                                                    </Triggers>
                                                                </asp:UpdatePanel>
                                                            </div>
                                                        </div>
                                                        <div class="form-group" runat="server">
                                                            <div class="col-sm-3 col-md-2 padding-width-sm icon-img">
                                                                <asp:Label ID="lblTxAmt" runat="server" Text="Tax Amount (Rs.)"></asp:Label>
                                                            </div>
                                                            <div class="col-sm-3 padding-width-sm">
                                                                <asp:TextBox ID="txtTaxAmt" runat="server" onpaste="return false" onkeypress="return chkDecNums(event, this);"
                                                                    MaxLength="18" TabIndex="11" CssClass="form-control" onblur="fun_val(this, 'txtTaxAmt')"></asp:TextBox>
                                                            </div>
                                                        </div>
                                                        <div class="form-group">
                                                            <div class="col-sm-3 col-md-2 padding-width-sm icon-img">
                                                                <asp:Label ID="lblTotInvAmt" runat="server" Text="Total Receipt Amount (Rs.)"></asp:Label>
                                                            </div>
                                                            <div class="col-sm-3 padding-width-sm">
                                                                <asp:TextBox ID="txtTotInvAmt" runat="server" onpaste="return false" AutoComplete="off"
                                                                    CssClass="form-control" MaxLength="18" Text="0" onkeypress="return false"></asp:TextBox>
                                                            </div>
                                                        </div>
                                                        <div class="form-group">
                                                            <div class="col-sm-3 col-md-2 padding-width-sm icon-img">
                                                                <asp:Label ID="lblopenQty" runat="server" Text="Ref PO#"></asp:Label>
                                                                <span>(Enter PO# with comma separated)</span>
                                                            </div>
                                                            <div class="col-sm-3 padding-width-sm">
                                                                <asp:TextBox ID="txtRefPO" runat="server" onpaste="return false" onkeypress="return chkDescription(event,this,149);"
                                                                    AutoCompleteType="Disabled" TabIndex="12" CssClass="form-control" MaxLength="149"
                                                                    TextMode="MultiLine"></asp:TextBox>
                                                            </div>
                                                        </div>
                                                        <div class="form-group" runat="server">
                                                            <div class="col-sm-3 col-md-2 padding-width-sm icon-img">
                                                                <asp:Label ID="lblremarks" runat="server" Text="Remarks"></asp:Label>
                                                            </div>
                                                            <div class="col-sm-3 padding-width-sm">
                                                                <asp:TextBox ID="txtremarks" runat="server" onpaste="return false" onkeypress="return chkDescription(event,this,499);"
                                                                    TabIndex="13" CssClass="form-control" MaxLength="149" Text="0" TextMode="MultiLine"></asp:TextBox>
                                                            </div>
                                                        </div>
                                                        <div class="form-group">
                                                            <div class="col-sm-3 col-md-2 padding-width-sm icon-img">
                                                                <asp:Label ID="Label1" runat="server" ForeColor="Red">*</asp:Label>&nbsp;
                                                                <asp:Label ID="lblIndicatesMandatory" runat="server">Required Fields</asp:Label>
                                                            </div>
                                                            <div>
                                                                &nbsp;<asp:HiddenField ID="hdnTotalAmt" runat="server" Value="0" />
                                                                &nbsp;<asp:HiddenField ID="hdnItemsCount" runat="server" Value="0" />
                                                            </div>
                                                        </div>
                                                        <div class="form-group">
                                                            <div class="col-xs-3"></div>
                                                            <div class="col-xs-9">
                                                                <asp:LinkButton ID="ibtnUpdateItem" ValidationGroup="vgVeh" runat="server" CssClass="MultilingualBtn"
                                                                    TabIndex="14" CausesValidation="false" OnClientClick="return fun_InvoiceSave('ibtnUpdateItem');"
                                                                    OnClick="ibtnUpdateItem_Click">
                                                                    <span id="Span6" runat="server" class="MultilingualBtnspan">
                                                                        <div class="Update">
                                                                            <div id="UpdateVehicleButDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                                Update
                                                                            </div>
                                                                        </div>
                                                                    </span>
                                                                </asp:LinkButton>
                                                                <asp:LinkButton ID="ibtnAddItem" runat="server" CssClass="MultilingualBtn" ValidationGroup="vgVeh"
                                                                    TabIndex="15" OnClientClick="return fun_InvoiceSave('ibtnAddItem');" OnClick="ibtnAddItem_Click">
                                                                    <span id="Span7" runat="server" class="MultilingualBtnspan">
                                                                        <div class="Save">
                                                                            <div id="AddVehicleButDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                                Save
                                                                            </div>
                                                                        </div>
                                                                    </span>
                                                                </asp:LinkButton>&nbsp;
                                                                <asp:LinkButton ID="btnUserCancel" runat="server" CssClass="MultilingualBtn" OnClick="btnUserCancel_Click"
                                                                    CausesValidation="false" TabIndex="16">
                                                                    <span id="Span8" runat="server" class="MultilingualBtnspan">
                                                                        <div class="Cancel">
                                                                            <div id="UserCancelDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                                Cancel
                                                                            </div>
                                                                        </div>
                                                                    </span>
                                                                </asp:LinkButton>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="clear clearfix"></div>
                                            </div>
                                        </asp:Panel>
                                    </div>
                                    <div class="clear clearfix"></div>
                                    <asp:Panel ID="pnlItemDetailsList" runat="server">
                                        <div id="grid-dsply">
                                            <div id="top">
                                                <div class="right-col">
                                                    <span class="dropdown">
                                                        <dxw:ASPxComboBox ID="ASPxCboExport" runat="server" ValueType="System.String" Width="80px" Height="20px"
                                                            Visible="false" ShowImageInEditBox="false" ItemImage-Height="12px" ClientInstanceName="ASPxCboExport" SelectedIndex="0"
                                                            CssFilePath="~/App_Themes/Office2003Blue/Editors/styles.css" CssPostfix="Office2003_Blue"
                                                            EnableTheming="true" Theme="Office2003Blue">
                                                            <Items>
                                                                <dxw:ListEditItem ImageUrl="../images/icn-pdf.jpg" Text="pdf" Value="pdf" />
                                                                <dxw:ListEditItem ImageUrl="../images/icn-excel.jpg" Text="xls" Value="xls" />
                                                                <dxw:ListEditItem ImageUrl="../images/icn-excel-xlsx.png" Text="xlsx" Value="xlsx" />
                                                                <dxw:ListEditItem ImageUrl="../images/icn-word.jpg" Text="rtf" Value="rtf" />
                                                            </Items>
                                                        </dxw:ASPxComboBox>
                                                    </span>
                                                    <span class="txt">
                                                        <asp:ImageButton ID="btnExport1" runat="server" ImageUrl="~/images/btn-export.jpg"
                                                            OnClick="btnExport_Click" Visible="false" />
                                                        <asp:LinkButton ID="btnExport" runat="server" CssClass="MultilingualBtn" OnClick="btnExport_Click"
                                                            Visible="false">
                                                            <span id="Span9" runat="server" class="MultilingualBtnspan">
                                                                <div class="Export">
                                                                    <div id="ExportButDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                        Export
                                                                    </div>
                                                                </div>
                                                            </span>
                                                        </asp:LinkButton>
                                                    </span>
                                                </div>
                                            </div>
                                            <div class="clear clearfix"></div>
                                            <div class="table-responsive">
                                                <dxw:ASPxGridView ID="gvInvoice" runat="server" Width="100%" ClientInstanceName="gvInvoice" EnableViewState="true" KeyFieldName="InvSno"
                                                    CssFilePath="~/App_Themes/Office2003Blue/GridView/styles.css" CssPostfix="Office2003_Blue"
                                                    EnableTheming="true" Theme="Office2003Blue" OnHtmlRowCreated="gvInvoice_OnHtmlRowCreated" OnDataBinding="gvInvoice_DataBinding">
                                                    <%--<Images ImageFolder="~/App_Themes/Office2003Blue/GridView/">
                                                <CollapsedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvCollapsedButton.png"
                                                    Width="11px" />
                                                <ExpandedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvExpandedButton.png"
                                                    Width="11px" />
                                                <DetailCollapsedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvCollapsedButton.png"
                                                    Width="11px" />
                                                <DetailExpandedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvExpandedButton.png"
                                                    Width="11px" />
                                            </Images>--%>
                                                    <Styles CssFilePath="~/App_Themes/Office2003Blue/GridView/grid.css" AlternatingRow-Enabled="True"
                                                        CssPostfix="Office2003_Blue">
                                                        <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                                        </Header>
                                                        <LoadingPanel ImageSpacing="10px">
                                                        </LoadingPanel>
                                                        <PagerBottomPanel CssClass="PageFooter">
                                                        </PagerBottomPanel>
                                                        <PagerTopPanel CssClass="PageFooter">
                                                        </PagerTopPanel>
                                                    </Styles>
                                                    <SettingsPager PageSize="15" PrevPageButton-Image-Url="../App_Themes/Office2003Blue/GridView/pPrev.gif"
                                                        PrevPageButton-Image-UrlDisabled="../App_Themes/Office2003Blue/GridView/pPrevDisabled.gif"
                                                        NextPageButton-Image-UrlDisabled="../App_Themes/Office2003Blue/GridView/pNextDisabled.gif"
                                                        NextPageButton-Image-Url="../App_Themes/Office2003Blue/GridView/pNext.gif" AlwaysShowPager="true">
                                                    </SettingsPager>
                                                    <Columns>
                                                        <dxw:GridViewDataColumn FieldName="InvoiceNo" Caption="Receipt#" VisibleIndex="0"
                                                            Width="10%">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <img src="../Images/usermanage-icon.gif" align="top" alt="" title="" /></span>
                                                                <span class="label">
                                                                    <asp:Label ID="lblVendorNameCaption" runat="server" Text="Receipt#"></asp:Label></span>
                                                            </HeaderCaptionTemplate>
                                                        </dxw:GridViewDataColumn>
                                                        <dxw:GridViewDataColumn FieldName="InvoiceDate" Caption="Receipt Date" VisibleIndex="1"
                                                            CellStyle-Wrap="True" Width="10%" CellStyle-HorizontalAlign="Left">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <img src="../images/icn-vehicle-name.gif" alt="" title="" align="top" /></span>
                                                                <span class="label">
                                                                    <asp:Label ID="lblWrkOdrCaption" runat="server" Text="Receipt Date"></asp:Label></span>
                                                            </HeaderCaptionTemplate>
                                                        </dxw:GridViewDataColumn>
                                                        <dxw:GridViewDataColumn FieldName="DueDate" Caption="Due Date" VisibleIndex="2" Visible="false"
                                                            CellStyle-Wrap="True" Width="10%" HeaderStyle-HorizontalAlign="Center" CellStyle-HorizontalAlign="Left">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <img src="../images/calendar-rht-icon.gif" alt="" title="" align="middle" /></span>
                                                                <span class="label">
                                                                    <asp:Label ID="lblCntrctprdCaption" runat="server" Text="Due Date"></asp:Label></span>
                                                            </HeaderCaptionTemplate>
                                                            <Settings AllowAutoFilter="True" AllowSort="True" ShowFilterRowMenu="True" />
                                                        </dxw:GridViewDataColumn>
                                                        <dxw:GridViewDataColumn FieldName="VendorName" Caption="Vendor Name" VisibleIndex="3"
                                                            Width="10%" HeaderStyle-HorizontalAlign="Center" CellStyle-HorizontalAlign="Left">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <img src="../images/calendar-lft-icon.gif" alt="" title="" align="middle" /></span>
                                                                <span class="label">
                                                                    <asp:Label ID="lblCntrctprdCaption" runat="server" Text="Vendor Name"></asp:Label></span>
                                                            </HeaderCaptionTemplate>
                                                            <Settings AllowAutoFilter="False" />
                                                        </dxw:GridViewDataColumn>
                                                        <dxw:GridViewDataColumn FieldName="TotAmount" Caption="Receipt Amount" VisibleIndex="4"
                                                            Width="10%" HeaderStyle-HorizontalAlign="Center" CellStyle-HorizontalAlign="Right">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <img src="../images/calendar-lft-icon.gif" alt="" title="" align="middle" /></span>
                                                                <span class="label">
                                                                    <asp:Label ID="lblCntrctprdCaption" runat="server" Text="Receipt Amount"></asp:Label></span>
                                                            </HeaderCaptionTemplate>
                                                            <Settings AllowAutoFilter="False" />
                                                        </dxw:GridViewDataColumn>
                                                        <dxw:GridViewDataColumn FieldName="Ref_PONo" Caption="Ref PO.No" VisibleIndex="5"
                                                            CellStyle-Wrap="True" Width="10%" HeaderStyle-HorizontalAlign="Center" CellStyle-HorizontalAlign="Left">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <img src="../images/calendar-lft-icon.gif" alt="" title="" align="middle" /></span>
                                                                <span class="label">
                                                                    <asp:Label ID="lblCntrctprdCaption" runat="server" Text="Ref PONo"></asp:Label></span>
                                                            </HeaderCaptionTemplate>
                                                            <Settings AllowAutoFilter="False" />
                                                        </dxw:GridViewDataColumn>
                                                        <dxw:GridViewDataTextColumn Caption="View" Width="3%" Name="View" VisibleIndex="6"
                                                            CellStyle-HorizontalAlign="Center">
                                                            <HeaderTemplate>
                                                            </HeaderTemplate>
                                                            <DataItemTemplate>
                                                                <asp:LinkButton ID="ibView" runat="server" OnClick="ibtViewItem_click" CommandArgument='<%# Eval("InvSno") %>'
                                                                    Style="text-decoration: none;"><img src="../images/icn-view.gif"/></asp:LinkButton>
                                                            </DataItemTemplate>
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn Caption="Edit" VisibleIndex="7" Width="3%" Name="Edit"
                                                            CellStyle-HorizontalAlign="Center">
                                                            <HeaderTemplate>
                                                            </HeaderTemplate>
                                                            <DataItemTemplate>
                                                                <asp:LinkButton ID="btnUpdateItem" runat="server" CommandArgument='<%# Eval("InvSno") %>'
                                                                    OnClientClick="return ShowPopUp();" OnClick="btnUpdateItem_Click" Style="text-decoration: none;">
                                                            <img src="../images/icn-edit.gif" alt="View" title="Click here to Edit"/></asp:LinkButton>
                                                            </DataItemTemplate>
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn Caption="Delete" Width="3%" HeaderStyle-HorizontalAlign="Center"
                                                            CellStyle-HorizontalAlign="Center">
                                                            <HeaderTemplate>
                                                            </HeaderTemplate>
                                                            <DataItemTemplate>
                                                                <%--Delete();--%>
                                                                <asp:LinkButton ID="lbtnDelete" runat="server" OnClientClick="return ShowPopUp();"
                                                                    CommandArgument='<%#Eval("InvSno") %>' OnClick="lbtnDelete_click"><img src="../images/delete-icon.gif" alt="Delete" title="Click here to Delete"/></asp:LinkButton>
                                                            </DataItemTemplate>
                                                        </dxw:GridViewDataTextColumn>
                                                    </Columns>
                                                    <Settings ShowVerticalScrollBar="true" VerticalScrollableHeight="270" />
                                                    <Settings ShowFilterRow="true" ShowFilterRowMenu="True" />
                                                    <SettingsText EmptyDataRow="No Receipt details found" />
                                                    <SettingsBehavior AllowFocusedRow="false" />
                                                </dxw:ASPxGridView>
                                            </div>
                                            <div class="clear clearfix"></div>
                                            <dxw:ASPxGridViewExporter ID="ASPxGridViewExporter1" runat="server" GridViewID="gvInvoice"
                                                ReportHeader="{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Times New Roman;}
                                                {\f1\fnil\fcharset0 Arial;}}\viewkind4\uc1\pard\f0\fs20\b\f1\fs28 Item Details\par\par\par}"
                                                DetailHorizontalOffset="1" DetailVerticalOffset="1" MaxColumnWidth="120">
                                                <Styles>
                                                    <Default VerticalAlign="Middle">
                                                    </Default>
                                                    <Header BackColor="#D1D1D1" Font-Bold="True" Font-Names="Arial" Font-Size="10pt"
                                                        ForeColor="Black" HorizontalAlign="Center" VerticalAlign="Middle" Wrap="false">
                                                    </Header>
                                                    <Cell VerticalAlign="Middle" Wrap="True" Font-Size="8pt" Font-Names="Arial" HorizontalAlign="Left"
                                                        ForeColor="Black">
                                                    </Cell>
                                                </Styles>
                                                <PageHeader Center="Inventory Entry Details" VerticalAlignment="Far">
                                                    <Font Bold="True" Names="Arial" Size="10pt" Underline="True"></Font>
                                                </PageHeader>
                                                <PageFooter Right="[Page # of Pages #]">
                                                </PageFooter>
                                            </dxw:ASPxGridViewExporter>
                                        </div>
                                    </asp:Panel>
                                </div>
                            </div>
                            <%--</div>--%>
                            <!-- Main Content Ends Here -->
                            <div id="left">
                            </div>
                            <div class="clear clearfix">
                            </div>
                        </div>
                        <div id="right">
                        </div>
                        <div class="clear clearfix">
                        </div>
                    </div>
                    <asp:Button ID="btnLoadModel" runat="server" CssClass="btn" Style="display: none"></asp:Button>
                    <asp:Button ID="btnTest" runat="server" OnClick="btnTest_click" CssClass="ControlHide" Text="Test" />
                    <asp:HiddenField ID="hdnCancelsts" runat="server" />
                </ContentTemplate>
                <Triggers>
                    <asp:PostBackTrigger ControlID="ibtnAddItem" />
                    <asp:PostBackTrigger ControlID="btnUserCancel" />
                    <asp:PostBackTrigger ControlID="ibtnUpdateItem" />
                    <asp:PostBackTrigger ControlID="btnExport" />
                    <asp:PostBackTrigger ControlID="btnTest" />
                </Triggers>
            </asp:UpdatePanel>
            <cc1:ModalPopupExtender ID="mpeProgressIndicator" runat="server" PopupControlID="pnlProgress"
                TargetControlID="Button1" BackgroundCssClass="modalBackground">
            </cc1:ModalPopupExtender>
            <asp:Button ID="Button1" Style="display: none;" runat="server" />
            <asp:Panel ID="pnlProgress" runat="server" CssClass="processMessage" Style="z-index: 1000;">
                <center>
                    <br />
                    <img id="imgLoad" runat="server" alt="Please Wait ..." src="../images/47.gif" /><br />
                    <br />
                    <asp:Label ID="lbl_msg12" Text="Processing... Please Wait..." runat="server" CssClass="specialdisplay"></asp:Label>
                    <br />
                    <br />
                </center>
            </asp:Panel>

            <script src="../js/ScriptToClearCtrls.js" type="text/javascript"></script>
            <script src="../js/InventoryMgmt.js" type="text/javascript"></script>

            <%--<script type="text/javascript" src="../js/GridCheckBoxMaintaining.js"></script>--%>
            <%-- <script type="text/javascript" src="../js/DriverManagementScript.js"></script>--%>
            <%--<script type="text/javascript" src="../js/myformvalidations.js"></script>--%>
            <%--  <script type="text/javascript" src="../js/FormValidations.js"></script>--%>

            <script language="javascript" type="text/javascript">
                function HidePopUp() {
                    if ($find('mpeProgressIndicator') != undefined) {
                        $find('mpeProgressIndicator').hide();
                    }
                }
                function ShowPopUp() {
                    if ($find('mpeProgressIndicator') != undefined) {
                        $find('mpeProgressIndicator').show();
                    }
                }
            </script>
            <script type="text/javascript">
                Sys.Browser.WebKit = {}; //Safari 3 is considered WebKit
                if (navigator.userAgent.indexOf('WebKit/') > -1) {
                    Sys.Browser.agent = Sys.Browser.WebKit;
                    Sys.Browser.version = parseFloat(navigator.userAgent.match(/WebKit\/(\d+(\.\d+)?)/)[1]);
                    Sys.Browser.name = 'WebKit';
                }
            </script>
            <script type="text/javascript">
                var keyValue;
                function OnMoreInfoClick(element) {
                    popup.ShowAtElement(element);
                }
                function popup_Shown(s, e) {
                    popup.ShowAtPos(s, e);
                }

                function GetItemNo(source, eventArgs) {
                    document.getElementById('<%=hdnItemNo.ClientID %>').value = "";
                    document.getElementById('<%=hdnUnitPrice.ClientID %>').value = "";
                    document.getElementById('<%=hdnUoM.ClientID %>').value = "";
                    var hItemNo = eventArgs.get_value().split("_");

                    if (hItemNo[0] != "") {
                        document.getElementById('<%=hdnItemNo.ClientID %>').value = hItemNo[0];
                    }
                    if (hItemNo[1] != "") {
                        document.getElementById('<%=hdnUnitPrice.ClientID %>').value = hItemNo[1];
                    }
                    if (hItemNo[2] != "") {
                        document.getElementById('<%=hdnUoM.ClientID %>').value = hItemNo[2];
                    }
                    // document.getElementById('GridView1_ctl01_lblItemCode').innerHTML = hItemNo;               
                }

                function GetVendorNo(source, eventArgs) {
                    document.getElementById('<%=hdnVendorCode.ClientID %>').value = "";

                    var hItemNo = eventArgs.get_value();

                    if (hItemNo != "" && hItemNo != null) {
                        document.getElementById('<%=hdnVendorCode.ClientID %>').value = hItemNo;
                    }

                }
            </script>
        </form>
    </div>
    <!-- Content Ends Here -->
    <uc2:Footer ID="ucFooter" runat="server" />
</body>
</html>
