<%@ page title="" language="C#" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" autoeventwireup="true" inherits="MaterialManagement_Procurement_PurchaseOrder, App_Web_tvvzwpls" uiculture="auto" meta:resourcekey="PageResource1" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="~/UserControls/MaterialManagement/Procurement/GetReorderControl.ascx"
    TagPrefix="ReOrderLevel" TagName="ReOrderLevel" %>
<%@ Register Src="~/UserControls/AutoComplete/AutoCompleteControl.ascx" TagName="AutoCompleteControl"
    TagPrefix="acc" %>
<%@ Register Src="~/UserControls/Common/CommonSearch/CommonSearch.ascx" TagName="CommonSearchUserControl"
    TagPrefix="Common" %>
<%@ Register Src="~/UserControls/Common/CommonSearch/AlphabetSearchCommonControl.ascx" TagName="AlphabetSearchCommonControl"
    TagPrefix="ACS" %>
<%@ Register Src="~/UserControls/Common/ScreenGroup/ScreenGroup.ascx" TagName="ScreenGroupControl"
    TagPrefix="ScreenGroup" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <asp:UpdatePanel ID="PurchaseOrderUPanel" runat="server">
        <ContentTemplate>
            <Common:CommonSearchUserControl ID="CommonSearchControl" runat="server" Visible="false" />
            <ACS:AlphabetSearchCommonControl ID="AlphabetCommonSearch" runat="server" Visible="false" />
            <div id="divContentPage" class="divcontentpagemargin">
                <!-- ContentPlaceHolder Box Starts -->
                <div style="width: 100%; padding: 2px; margin: 2px">
                    <table width="100%" border="0" style="vertical-align: top; margin-top: -1px" cellpadding="0"
                        cellspacing="0">
                        <tr>
                            <td class="dashBoardLeftCont" valign="top">
                                <div class="himssuHeader3WireBox">
                                    <%-- <div class="himsBoxHeader">
                                        <div class="leftdiv">
                                        </div>
                                        <div class="himsBoxTitle">
                                            <div class="headerText">
                                            <asp:Label runat="server" ID="ScreenGroupNameLabel"></asp:Label>    
                                            </div>
                                        </div>
                                    </div>--%>
                                    <table width="0px" cellpadding="0" cellspacing="0">
                                        <tr>
                                            <td>
                                                <div class="himsBoxContent">
                                                    <div class="leftUlMenu">
                                                        <ScreenGroup:ScreenGroupControl EnableViewState="true" ID="ScreenGroupControl" ScreenGroupId="160"
                                                            Visible="true" runat="server" />
                                                    </div>
                                                </div>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </td>
                            <td style="vertical-align: top;" width="100%" class="">
                                <div class="whitebox">
                                <div class="himssuHeader1WireBox">
                                    <div class="himsBoxHeader note note1 box box-danger">
                                        <div class="leftdiv">
                                        </div>
                                        <div class="himsBoxTitle">
                                            <div class="headerText fLeft">
                                                PO Request Details
                                            </div>
                                            <div class="fRight pRight5">
                                                <asp:ImageButton ID="ReorderlistImageButton" runat="server" ImageUrl="~/Images/icons/icon_reOrder.png"
                                                    ToolTip="Re-Order List" TabIndex="2"
                                                    OnClick="ReorderlistImageButton_Click"
                                                    meta:resourcekey="ReorderlistImageButtonResource1" />
                                            </div>
                                        </div>
                                    </div>
                                    <div class="himsBoxContent">
                                        <div class="contentHolder">
                                            <div class="outerBox pTop5">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="PONumberLabel" runat="server" Text="PO No"
                                                        meta:resourcekey="PONumberLabelResource1"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <acc:AutoCompleteControl ID="PONumberTextBox" runat="server" SkinID="CustomWidthTextBox"
                                                        MaxLength="20" Width="150px" ContextKey="Procurement.PurchaseOrderNumber" MinimumPrefixLength="2"
                                                        TabIndex="1" AutoPostBack="true" DisplayLoadingStatus="true" FirstRowSelected="false"
                                                        ValidateOnTextChanged="false" OnTextChanged="PONumberTextBox_TextChanged" />
                                                    <asp:ImageButton ID="PONumberSearchButton" runat="server" SkinID="FindImage" ToolTip="PO Number Search"
                                                        TabIndex="2" OnClick="PONumberSearchButton_OnClick"
                                                        meta:resourcekey="PONumberSearchButtonResource1" />
                                                </div>
                                            </div>
                                            <div class="outerBox pTop5">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="DraftPoNumberLabel" runat="server" Text="Draft PO No"
                                                        meta:resourcekey="DraftPoNumberLabelResource1"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <acc:AutoCompleteControl ID="DraftPoNumberTextBox" runat="server" SkinID="CustomWidthTextBox"
                                                        MaxLength="20" Width="150px" ContextKey="Procurement.PurchaseOrderDraftNumber"
                                                        MinimumPrefixLength="2" TabIndex="3" AutoPostBack="true" DisplayLoadingStatus="true"
                                                        FirstRowSelected="false" ValidateOnTextChanged="false" OnTextChanged="DraftPoNumberTextBox_TextChanged" />
                                                    <asp:ImageButton ID="DraftPoNumberSearchButton" runat="server" SkinID="FindImage"
                                                        ToolTip="Draft PO Number Search" TabIndex="4"
                                                        OnClick="DraftPoNumberSearchButton_OnClick"
                                                        meta:resourcekey="DraftPoNumberSearchButtonResource1" />
                                                </div>
                                            </div>
                                            <div class="outerBox pTop5">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="PoStatusLabel" runat="server" Text="PO Status"
                                                        meta:resourcekey="PoStatusLabelResource1"></asp:Label>
                                                </div>
                                                <div class="fLeft">
                                                    <asp:TextBox SkinID="DisabledTextbox" ReadOnly="True" ID="PoStatusDisplayLabel"
                                                        runat="server" meta:resourcekey="PoStatusDisplayLabelResource1"></asp:TextBox>
                                                </div>
                                            </div>
                                            <div class="cBoth">
                                            </div>
                                            <div class="outerBox pTop5">
                                                <div class="controlLabelWidth">
                                                </div>
                                                <div class="fLeft">
                                                </div>
                                            </div>
                                            <div class="outerBox pTop5">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="RequestedByLabel" runat="server" Text="Requested By"
                                                        CssClass="mandatory" meta:resourcekey="RequestedByLabelResource1"></asp:Label>
                                                </div>
                                                <div class="fLeft">
                                                    <asp:TextBox ID="RequestedByTextBox" runat="server" Width="150px" SkinID="CustomWidthTextbox"
                                                        onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" MaxLength="50"
                                                        AutoCompleteType="Disabled" TabIndex="6" AutoPostBack="True"
                                                        meta:resourcekey="RequestedByTextBoxResource1"></asp:TextBox>
                                                </div>
                                            </div>
                                            <div class="outerBox pTop5">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="SubmittedDateLabel" runat="server" Text="Submitted Date"
                                                        meta:resourcekey="SubmittedDateLabelResource1"></asp:Label>
                                                </div>
                                                <div class="fLeft">
                                                    <asp:TextBox SkinID="DisabledTextbox" ReadOnly="True" ID="SubmittedDateDisplayLabel"
                                                        runat="server" meta:resourcekey="SubmittedDateDisplayLabelResource1"></asp:TextBox>
                                                </div>
                                            </div>
                                            <div class="cBoth">
                                            </div>
                                            <div class="outerBox pTop5">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="RequestedDepartmentLabel" runat="server" Text="Requested Department"
                                                        CssClass="mandatory" meta:resourcekey="RequestedDepartmentLabelResource1"></asp:Label>
                                                </div>
                                                <div class="fLeft">
                                                    <asp:DropDownList ID="RequestedDepartmentDropDownList" runat="server" AutoPostBack="True"
                                                        Width="154px" SkinID="CustomWidthDropDownList" TabIndex="7" onmouseleave="showHideTooltip()"
                                                        onmouseenter="showHideTooltip()"
                                                        OnSelectedIndexChanged="RequestedDepartmentDropDownList_SelectedIndexChanged"
                                                        meta:resourcekey="RequestedDepartmentDropDownListResource1">
                                                    </asp:DropDownList>
                                                </div>
                                            </div>
                                            <div id="Div1" class="outerBox pTop5" runat="server" visible="false">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="LocationLabel" runat="server" Text="Location"
                                                        CssClass="mandatory" meta:resourcekey="LocationLabelResource1"></asp:Label>
                                                </div>
                                                <div class="fLeft">
                                                    <asp:DropDownList ID="StoreLocationDropDownList" runat="server" AutoPostBack="True"
                                                        Width="154px" SkinID="CustomWidthDropDownList" TabIndex="8" onmouseleave="showHideTooltip()"
                                                        onmouseenter="showHideTooltip()"
                                                        meta:resourcekey="StoreLocationDropDownListResource1">
                                                    </asp:DropDownList>
                                                </div>
                                            </div>
                                            <div class="outerBox pTop5" runat="server" visible="false">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="ShipToLocationLabel" runat="server" Text="Ship To"
                                                        meta:resourcekey="ShipToLocationLabelResource1"></asp:Label>
                                                </div>
                                                <div class="fLeft">
                                                    <asp:DropDownList ID="ShipToLocationDropDownList" runat="server" AutoPostBack="True"
                                                        Width="104px" SkinID="CustomWidthDropDownList" TabIndex="9" onmouseleave="showHideTooltip()"
                                                        onmouseenter="showHideTooltip()"
                                                        meta:resourcekey="ShipToLocationDropDownListResource1">
                                                    </asp:DropDownList>
                                                </div>
                                            </div>
                                            <div class="cBoth">
                                            </div>
                                            <div class="outerBox pTop5">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="VendorLabel" runat="server" Text="Vendor" CssClass="mandatory"
                                                        meta:resourcekey="VendorLabelResource1"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <acc:AutoCompleteControl ID="VendorTextBox" runat="server" OnTextChanged="VendorTextBox_TextChanged"
                                                        AutoPostBack="true" TabIndex="10" MinimumPrefixLength="2" ContextKey="Procurement.VendorName"
                                                        DisplayLoadingStatus="true" FirstRowSelected="true" ValidateOnTextChanged="false"
                                                        Width="150px" />
                                                    <asp:ImageButton ID="VendorSearchButton" runat="server" SkinID="FindImage" ToolTip="Vendor Search"
                                                        TabIndex="11" OnClick="VendorSearchButton_Click"
                                                        meta:resourcekey="VendorSearchButtonResource1" />
                                                </div>
                                            </div>
                                            <div class="outerBox pTop5">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="PaymentTermsLabel" runat="server" Text="Credit Term (Days)"
                                                        CssClass="mandatory" meta:resourcekey="PaymentTermsLabelResource1"></asp:Label>
                                                </div>
                                                <div class="fLeft">
                                                    <asp:TextBox ID="PaymentTermsTextBox" runat="server" Width="150px" SkinID="CustomWidthTextbox"
                                                        AutoPostBack="True" MaxLength="3" AutoCompleteType="Disabled"
                                                        TabIndex="12" onkeypress="return fnNumeric(event)"
                                                        onblur="return fnNumericCheckOnTextChange(this)" onmouseleave="showHideTooltip()"
                                                        onmouseenter="showHideTooltip()"
                                                        meta:resourcekey="PaymentTermsTextBoxResource1"></asp:TextBox>
                                                </div>
                                            </div>
                                            <div class="cBoth">
                                            </div>
                                            <div class="outerBoxRemark pTop5 divcontentpagemargin">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="RemarksLabel" runat="server" Text="Remarks"
                                                        meta:resourcekey="RemarksLabelResource1"></asp:Label>
                                                </div>
                                                <div class="fLeft">
                                                    <asp:TextBox ID="RemarksTextBox" runat="server" SkinID="MultiLineTextbox" Width="440px"
                                                        onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" MaxLength="300"
                                                        TextMode="MultiLine" Height="44px" onkeypress="return textboxMultilineMaxNumber(this,300)"
                                                        onchange="return textboxmultilinetextchangeMaxNumber(this,300)"
                                                        TabIndex="13" meta:resourcekey="RemarksTextBoxResource1"></asp:TextBox>
                                                </div>
                                            </div>
                                            <div class="cBoth">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="spacer">
                                    <asp:Image ID="Image5" runat="server" ImageUrl="~/Images/spacer.gif"
                                        meta:resourcekey="Image5Resource1" />
                                </div>
                                <div class="himssuHeader5WireBox">
                                    <div class="himsBoxHeader divcontentpagemargin note note1 box box-danger">
                                        <div class="leftdiv">
                                        </div>
                                        <div class="himsBoxTitle">
                                            <div class="headerText fLeft">
                                                Item Request
                                            </div>
                                        </div>
                                    </div>
                                    <div id="itemContainer">
                                        <div class="himsBoxContent pTop5">
                                            <div class=" contentHolder">

                                                <div class=" pTop5">
                                                    <div class="outerBox">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="ItemCodeLabel" runat="server" Text="Item Code"
                                                            CssClass="mandatory" meta:resourcekey="ItemCodeLabelResource1"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <acc:AutoCompleteControl ID="ItemCodeTextBox" runat="server" OnTextChanged="ItemCodeTextBox_TextChanged"
                                                            AutoPostBack="true" TabIndex="14" MinimumPrefixLength="2" ContextKey="Ip.StockItemMasterCode"
                                                            DisplayLoadingStatus="true" FirstRowSelected="false" ValidateOnTextChanged="false"
                                                            Width="150px" IsCacheEnabled="false" />
                                                        <asp:ImageButton ID="ItemCodeSearchButton" runat="server" SkinID="FindImage" ToolTip="Item Code Search"
                                                            TabIndex="15" OnClick="ItemCodeSearchButton_Click"
                                                            meta:resourcekey="ItemCodeSearchButtonResource1" />
                                                    </div>
                                                    </div>
                                                    <div class="outerBox">
                                                    <div class="controlLabelWidth">
                                                        <asp:Label ID="NameLabel" runat="server" Text="Item Name" CssClass="mandatory"
                                                            meta:resourcekey="NameLabelResource1"></asp:Label>
                                                    </div>
                                                    <div class="fLeft pRight5">
                                                        <acc:AutoCompleteControl ID="ItemNameTextBox" runat="server" OnTextChanged="ItemNameTextBox_TextChanged"
                                                            AutoPostBack="true" MinimumPrefixLength="2" TabIndex="16" ContextKey="InventoryPlanning.ItemTitleAll"
                                                            DisplayLoadingStatus="true" FirstRowSelected="false" ValidateOnTextChanged="false"
                                                            MaxLength="50" Width="150px" IsCacheEnabled="false" />
                                                          <asp:ImageButton ID="ItemNameSearchButton" runat="server" SkinID="FindImage" ToolTip="Name Search"
                                                            TabIndex="17" OnClick="ItemNameSearchButton_OnClick"
                                                            meta:resourcekey="ItemNameSearchButtonResource1" />
                                                    </div>
                                                        </div>
                                                </div>
                                                <div class="outerBox">
                                                    
                                                </div>
                                                <div class="outerBox pTop5">
                                                   
                                                    <div class="searchBoxBtn">
                                                        <asp:Button ID="AddButton" runat="server" Width="60px" Text="Add" TabIndex="18"
                                                            OnClick="AddButton_Click" meta:resourcekey="AddButtonResource1" />
                                                        <asp:Button ID="ClearDetailButton" runat="server" class="buttonLBlue" Text="Clear" Width="60px"
                                                            OnClick="ClearDetail_Click" meta:resourcekey="ClearButtonResource1" />
                                                    </div>
                                                </div>
                                                <div class="cBoth">
                                                </div>
                                                <div class="himssuHeader6WireBox box-body box-solid gridviewfont" id="PurchasOrderItemDetailDiv" runat="server" visible="false">

                                                    <div class="himsBoxHeader">
                                                    </div>

                                                    <div class="himsBoxContent">

                                                        <asp:GridView ID="PurchaseOrderDetailsGridView" runat="server" SkinID=""
                                                            AutoGenerateColumns="False" TabIndex="6" Width="100%" ShowHeader="True" EmptyDataText="No Records Found!!"
                                                            DataKeyNames="Id" CssClass="table table-bordered table-striped">
                                                            <Columns>
                                                                <asp:TemplateField HeaderText="Item Code" HeaderStyle-HorizontalAlign="Left"
                                                                    meta:resourcekey="TemplateFieldResource1">
                                                                    <ItemTemplate>
                                                                        <asp:Label Text='<%# DataBinder.Eval(Container.DataItem, "PurchaseItemData.Code") %>'
                                                                            ID="ItemCodeLabel" runat="server"
                                                                            meta:resourcekey="ItemCodeLabelResource2"></asp:Label>
                                                                    </ItemTemplate>
                                                                  
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="UOM" meta:resourcekey="TemplateFieldResource2" HeaderStyle-HorizontalAlign="Left">
                                                                    <ItemTemplate>
                                                                        <asp:DropDownList ID="PurchaseUomDropDownList" runat="server" AutoPostBack="True"
                                                                            SkinID="CustomWidthDropDownList" TabIndex="3" onmouseleave="showHideTooltip()"
                                                                            onmouseenter="showHideTooltip()" OnSelectedIndexChanged="PurchaseUomDropDownList_SelectedIndexChanged"
                                                                            Width="88px" meta:resourcekey="PurchaseUomDropDownListResource1">
                                                                        </asp:DropDownList>
                                                                    </ItemTemplate>
                                                               
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="C Fac" meta:resourcekey="TemplateFieldResource3">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="ConversionFactorLabel" runat="server" Width="100%" dir="rtl"
                                                                            meta:resourcekey="ConversionFactorLabelResource1"></asp:Label>
                                                                    </ItemTemplate>
                                                                    <HeaderStyle Width="5%"  HorizontalAlign="Right" />
                                                                    <ItemStyle/>
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Order Qty." HeaderStyle-HorizontalAlign="Left"
                                                                    meta:resourcekey="TemplateFieldResource4">
                                                                    <ItemTemplate>
                                                                        <asp:TextBox ID="OrderQtyTextBox" runat="server" Width="91%" SkinID="CustomWidthTextbox"
                                                                            AutoPostBack="True" MaxLength="8" AutoCompleteType="Disabled" TabIndex="1" Style="text-align: right;"
                                                                            OnTextChanged="OrderQtyTextBox_TextChange" onKeypress="javascript:return MaskDecimal(event,8,2)"
                                                                            onBlur="javascript:return fnValidateDecimal(this,8,2)" onmouseleave="showHideTooltip()"
                                                                            onmouseenter="showHideTooltip()"
                                                                            meta:resourcekey="OrderQtyTextBoxResource1"></asp:TextBox>
                                                                    </ItemTemplate>
                                                                    
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Bonus Qty." HeaderStyle-HorizontalAlign="Left"
                                                                    meta:resourcekey="TemplateFieldResource5">
                                                                    <ItemTemplate>
                                                                        <asp:TextBox ID="BonusQtyTextBox" runat="server" SkinID="CustomWidthTextbox" Width="95%"
                                                                            AutoPostBack="True" MaxLength="8" AutoCompleteType="Disabled" TabIndex="1" Style="text-align: right;"
                                                                            onKeypress="javascript:return MaskDecimal(event,8,2)" onBlur="javascript:return fnValidateDecimal(this,8,2)"
                                                                            OnTextChanged="BonusQtyTextBox_TextChanged" onmouseleave="showHideTooltip()"
                                                                            onmouseenter="showHideTooltip()"
                                                                            meta:resourcekey="BonusQtyTextBoxResource1"></asp:TextBox>
                                                                    </ItemTemplate>
                                                                   
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Unit Price" HeaderStyle-HorizontalAlign="Left"
                                                                    meta:resourcekey="TemplateFieldResource6">
                                                                    <ItemTemplate>
                                                                        <asp:TextBox ID="UntiPriceTextBox" runat="server" Width="95%" SkinID="CustomWidthTextbox"
                                                                            AutoPostBack="True" MaxLength="12" AutoCompleteType="Disabled"
                                                                            TabIndex="1" Style="text-align: right;"
                                                                            onKeypress="javascript:return MaskDecimal(event,8,2)" onBlur="javascript:return fnValidateDecimal(this,8,2)"
                                                                            OnTextChanged="UntiPriceTextBox_TextChanged" onmouseleave="showHideTooltip()"
                                                                            onmouseenter="showHideTooltip()"
                                                                            meta:resourcekey="UntiPriceTextBoxResource1"></asp:TextBox>
                                                                    </ItemTemplate>
                                                                   
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Amount"
                                                                    meta:resourcekey="TemplateFieldResource7">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="AmountLabel" runat="server" dir="rtl" Width="99%"
                                                                            meta:resourcekey="AmountLabelResource1"></asp:Label>
                                                                    </ItemTemplate>
                                                                    <HeaderStyle  HorizontalAlign="Right" />
                                                                    <ItemStyle />
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Disc %" HeaderStyle-HorizontalAlign="Left"
                                                                    meta:resourcekey="TemplateFieldResource8">
                                                                    <ItemTemplate>
                                                                        <asp:TextBox ID="DiscountPercentageTextBox" Width="91%" runat="server" SkinID="CustomWidthTextbox"
                                                                            AutoPostBack="True" MaxLength="6" AutoCompleteType="Disabled" TabIndex="1" onKeypress="javascript:return MaskDecimal(event,8,2)"
                                                                            Style="text-align: right;" onBlur="javascript:return fnValidateDecimal(this,8,2)"
                                                                            OnTextChanged="DiscountPercentageTextBox_TextChanged" onmouseleave="showHideTooltip()"
                                                                            onmouseenter="showHideTooltip()"
                                                                            meta:resourcekey="DiscountPercentageTextBoxResource1"></asp:TextBox>
                                                                    </ItemTemplate>
                                                                   
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Disc Amt." HeaderStyle-HorizontalAlign="Left"
                                                                    meta:resourcekey="TemplateFieldResource9">
                                                                    <ItemTemplate>
                                                                        <asp:TextBox ID="DiscountAmountTextBox" Width="91%" runat="server" SkinID="CustomWidthTextbox"
                                                                            AutoPostBack="True" MaxLength="12" AutoCompleteType="Disabled"
                                                                            TabIndex="1" onKeypress="javascript:return MaskDecimal(event,8,2)"
                                                                            onBlur="javascript:return fnValidateDecimal(this,8,2)" OnTextChanged="DiscountAmountTextBox_TextChanged"
                                                                            Style="text-align: right;" onmouseleave="showHideTooltip()"
                                                                            onmouseenter="showHideTooltip()"
                                                                            meta:resourcekey="DiscountAmountTextBoxResource1"></asp:TextBox>
                                                                    </ItemTemplate>
                                                                   
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Tax Code" HeaderStyle-HorizontalAlign="Left"
                                                                    meta:resourcekey="TemplateFieldResource10">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="TaxCodeLabel" runat="server" Width="99%"
                                                                            meta:resourcekey="TaxCodeLabelResource1"></asp:Label>
                                                                    </ItemTemplate>
                                                                   
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Tax Amount"
                                                                    meta:resourcekey="TemplateFieldResource11">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="TaxAmountLabel" runat="server" Width="97%" dir="rtl"
                                                                            meta:resourcekey="TaxAmountLabelResource1"></asp:Label>
                                                                    </ItemTemplate>
                                                                    <HeaderStyle  HorizontalAlign="Right" />
                                                                    <ItemStyle />
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Other Tax" HeaderStyle-HorizontalAlign="Left"
                                                                    meta:resourcekey="TemplateFieldResource12">
                                                                    <ItemTemplate>
                                                                        <asp:TextBox ID="OtherTaxTextBox" Width="91%" runat="server" SkinID="CustomWidthTextbox"
                                                                            AutoPostBack="True" MaxLength="12" AutoCompleteType="Disabled"
                                                                            TabIndex="1" Style="text-align: right;"
                                                                            onKeypress="javascript:return MaskDecimal(event,8,2)" onBlur="javascript:return fnValidateDecimal(this,8,2)"
                                                                            OnTextChanged="OtherTaxTextBox_TextChanged" onmouseleave="showHideTooltip()"
                                                                            onmouseenter="showHideTooltip()"
                                                                            meta:resourcekey="OtherTaxTextBoxResource1"></asp:TextBox>
                                                                    </ItemTemplate>
                                                                  
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Net Amount"
                                                                    meta:resourcekey="TemplateFieldResource13">
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="NetAmountLabel" runat="server" dir="rtl" Width="96%"
                                                                            meta:resourcekey="NetAmountLabelResource1"></asp:Label>
                                                                    </ItemTemplate>
                                                                    <HeaderStyle HorizontalAlign="Right" />
                                                                    <ItemStyle />
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Req. Del. Date" HeaderStyle-HorizontalAlign="Left"
                                                                    meta:resourcekey="TemplateFieldResource14">
                                                                    <ItemTemplate>
                                                                        <div class="fLeft">
                                                                            <asp:TextBox ID="RequestedDeliveryDateTextBox" runat="server" SkinID="CustomWidthTextBox"
                                                                                TabIndex="1" Width="87%" OnTextChanged="RequestedDeliveryDateTextBox_TextChanged"
                                                                                AutoPostBack="True" onmouseleave="showHideTooltip()"
                                                                                onmouseenter="showHideTooltip()"
                                                                                meta:resourcekey="RequestedDeliveryDateTextBoxResource1"></asp:TextBox>
                                                                        </div>
                                                                    </ItemTemplate>
                                                                    <HeaderStyle/>
                                                                    <ItemStyle HorizontalAlign="Left" />
                                                                </asp:TemplateField>
                                                                <asp:TemplateField HeaderText="Delete"
                                                                    meta:resourcekey="TemplateFieldResource15">
                                                                    <HeaderStyle HorizontalAlign="Center" Width="5%" />
                                                                    <ItemStyle HorizontalAlign="Center" Width="4%" />
                                                                    <ItemTemplate>
                                                                        <asp:ImageButton ID="DeleteImageButton" SkinID="DeleteImage" ToolTip="Delete" runat="server"
                                                                            OnClick="DeleteImageButton_OnClick"
                                                                            meta:resourcekey="DeleteImageButtonResource1"></asp:ImageButton>
                                                                    </ItemTemplate>
                                                                </asp:TemplateField>
                                                            </Columns>
                                                        </asp:GridView>
                                                        <%-- </div>--%>
                                                    </div>
                                                </div>


                                                <div class="cBoth">
                                                </div>
                                            </div>
                                        </div>
                                        <div class="spacer">
                                            <asp:Image ID="Image6" runat="server" ImageUrl="~/Images/spacer.gif"
                                                meta:resourcekey="Image6Resource1" />
                                        </div>
                                        <!--Grid starts-->

                                    </div>
                                    <div class="himsDisplayBoxBottom" id="PageFooterDiv" runat="server"
                                        visible="False">
                                        <div class="himsBoxContent messageMessage">
                                            <div class="topdisplayContainer alignRight" style="padding-right: 88px;">
                                                <table cellpadding="0" cellspacing="0">
                                                    <tr>
                                                        <td class="bold pLeft10">
                                                            <asp:Label ID="NetTotal" runat="server" Text="Net Total:"
                                                                meta:resourcekey="NetTotalResource1"></asp:Label>
                                                        </td>
                                                        <td style="width: 100px" class="pLeft10">
                                                            <asp:TextBox ID="NetTotalValueLabel" dir="rtl" SkinID="DisabledTextbox" Width="100px"
                                                                ReadOnly="True" runat="server"
                                                                meta:resourcekey="NetTotalValueLabelResource1" />
                                                        </td>
                                                    </tr>
                                                    <tr visible="false">
                                                        <td class="bold pLeft10">
                                                            <asp:Label ID="DiscountPercentageLabel" runat="server" Visible="False"
                                                                Text="Discount %:" meta:resourcekey="DiscountPercentageLabelResource1"></asp:Label>
                                                        </td>
                                                        <td style="width: 79px">
                                                            <asp:TextBox ID="PurchaseOrderDiscountPercentageTextBox" runat="server" Visible="False"
                                                                onKeypress="javascript:return MaskDecimal(event,8,2)" AutoPostBack="True" Style="text-align: right;"
                                                                onBlur="javascript:return fnValidateDecimal(this,8,2)" MaxLength="6" SkinID="CustomWidthTextBox"
                                                                Width="65px" OnTextChanged="PurchaseOrderDiscountPercentageTextBox_TextChange"
                                                                onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                                                meta:resourcekey="PurchaseOrderDiscountPercentageTextBoxResource1"></asp:TextBox>
                                                        </td>
                                                    </tr>
                                                    <tr visible="false">
                                                        <td class="bold pLeft10">
                                                            <asp:Label ID="DiscountAmountLabel" runat="server" Text="Discount Amount:"
                                                                Visible="False" meta:resourcekey="DiscountAmountLabelResource1"></asp:Label>
                                                        </td>
                                                        <td style="width: 79px">
                                                            <asp:TextBox ID="PurchaseOrderDiscountAmountTextBox" Visible="False" runat="server"
                                                                onKeypress="javascript:return MaskDecimal(event,8,2)" AutoPostBack="True" Style="text-align: right;"
                                                                onBlur="javascript:return fnValidateDecimal(this,8,2)" MaxLength="12" SkinID="CustomWidthTextBox"
                                                                Width="65px" OnTextChanged="PurchaseOrderDiscountAmountTextBox_TextChange" onmouseleave="showHideTooltip()"
                                                                onmouseenter="showHideTooltip()"
                                                                meta:resourcekey="PurchaseOrderDiscountAmountTextBoxResource1"></asp:TextBox>
                                                        </td>
                                                    </tr>
                                                    <tr visible="false">
                                                        <td class="bold pLeft10">
                                                            <asp:Label ID="GrandTotalLabel" runat="server" Text="Grand Total:"
                                                                Visible="False" meta:resourcekey="GrandTotalLabelResource1"></asp:Label>
                                                        </td>
                                                        <td style="width: 100px">
                                                            <asp:Label ID="GrandTotalValueLabel" runat="server" Visible="False"
                                                                meta:resourcekey="GrandTotalValueLabelResource1"></asp:Label>
                                                        </td>
                                                    </tr>
                                                    <tr style="padding-bottom:10px">
                                                        <td class="bold pLeft10 pTop5">
                                                            <asp:Label ID="RoudedOffAmountLabel" runat="server" Text="RoundedOff Amount:"
                                                                meta:resourcekey="RoudedOffAmountLabelResource1"></asp:Label>
                                                        </td>
                                                        <td style="width: 100px" class="pTop5 pLeft10">
                                                            <asp:TextBox ID="RoudedOffAmountValueLabel" dir="rtl" SkinID="DisabledTextbox" Width="100px"
                                                                ReadOnly="True" runat="server"
                                                                meta:resourcekey="RoudedOffAmountValueLabelResource1" />
                                                        </td>
                                                    </tr>
                                                </table>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                    </div>
                            </td>
                        </tr>
                    </table>
                    <%--HEDP History Ends Here--%>
                </div>
            </div>
            <div class="spacer">
                <img src="../../../Images/spacer.gif" />
            </div>
            <asp:UpdatePanel ID="ReorderLevelUpdatePnl" runat="server">
                <ContentTemplate>
                    <ReOrderLevel:ReOrderLevel ID="ReOrderLevelControlControl" runat="server" />
                </ContentTemplate>
            </asp:UpdatePanel>
        </ContentTemplate>
    </asp:UpdatePanel>
    <%--<script data-main="../../../JavaScript/rjs/encrypt/purchase-order-encrypt" src="../../../JavaScript/rjs/require.js"></script> --%>
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/purchase-order")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>    
</asp:Content>