<%@ page language="C#" autoeventwireup="true" inherits="IntPaymentRequest, App_Web_j58pc9zj" enableEventValidation="false" %>

<%@ Register Assembly="DevExpress.Web.ASPxGrid.v6.3, Version=6.3.1.0, Culture=neutral, PublicKeyToken=79868b8147b5eae4"
    Namespace="DevExpress.Web.ASPxGrid" TagPrefix="dxwg" %>
<%@ Register Assembly="DevExpress.Web.ASPxDataControls.v6.3, Version=6.3.1.0, Culture=neutral, PublicKeyToken=79868b8147b5eae4"
    Namespace="DevExpress.Web.ASPxDataControls" TagPrefix="dxwdc" %>
<% @Outputcache Location="none" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head runat="server">
    <title>Internal Payment Request</title>
    <base target="_self" />
    <style type="text/css">
    .clsLabel
    {
        FONT-SIZE: 8.5pt;
        FONT-FAMILY:Tahoma;
        FONT-WEIGHT: Bold;
    }
    .clsInput
    {
       FONT-SIZE:8.5pt;
       FONT-FAMILY:Tahoma;
    }
    
    .clsLink
    {
        FONT-SIZE:8.5pt;
        FONT-FAMILY:Tahoma;
        TEXT-DECORATION:underline;
        COLOR: black;
    }        
    </style>
    <script language="javascript" src="./scriptsw.js" type="text/javascript"></script>
    <script type="text/javascript">                
        function viewDetailInfo(pkid)
        {
            // routine to popup Detail Information Dialog
            var url = 'IntPaymentRequestDetail.aspx?rowId=' + pkid;
            var returnValue = openDialog(url,630,560,'Internal Payment Request - Detail Information', processViewDetail);
            if (returnValue != 'NOTIE')
                processViewDetail(returnValue);
        }
        
        function processViewDetail(returnValue)
        {
            // routine to process the returned value from the dialog
            if (returnValue == null) {returnValue = 'undefined';}
            if (returnValue != 'undefined')
            {
               document.forms[0].submit();
            }
        } 
        
        function viewHistory()
        {
            // routine to popup History Information Dialog
            var url = 'AuditHistory.aspx';
            var returnValue = openDialog(url,630,300,'Internal Payment Request - History Information', processHistory);
            if (returnValue != 'NOTIE')
                processHistory(returnValue);
         }
         
         function processHistory(returnValue)
         {
            // do nothing
         }
         
         function viewAudit(url)
         {
            // routine to view the audit report
            window.open('./UploadTemp/' + url,'_blank');
         }         
function viewTable_onclick() {

}

    </script>

</head>
<body style="margin: 0; padding: 0; border: 0;" scroll="auto" onload="if(opener){opener.blockEvents();}" onunload="if(opener){opener.unblockEvents();}">
    <form id="form1" runat="server">
        <table border="0" cellpadding="0" cellspacing="0" style="width: 900px;">
            <tr>
                <td id="mainview" style="vertical-align: top; width: 900px; height: 100%;">
                    <table border="0" cellpadding="0" cellspacing="0" id="viewTable" style="width: 900px; height: 579px;">
                        <tr style="vertical-align: top; background-color: #666666; font-weight: bold; color: White;
                            font-family: Tahoma; width:900px">
                            <td id="viewheader" style="width: 800px; height: 30px; background-color: #ffcc00;
                                font-size: 10pt; color: white;" class="clsLabel">
                                <asp:Label ID="lblHeader" runat="server" Text="Internal Payment Request"></asp:Label>
                                <dxwdc:ASPxLookAndFeelController ID="ASPxLookAndFeelController1" runat="server" AutoFormatName="Office2003 Silver">
                                    <LookAndFeel Kind="Office2003">
                                        <ElementsSettings DropDownButtonWidth="17px" ScrollBarBackColor="240, 242, 246" ScrollBarMargin="1"
                                            ScrollBarSize="17px" />
                                        <PopupStyle BorderColor="#9595AA" Font-Names="Verdana" Font-Size="8pt">
                                        </PopupStyle>
                                        <ButtonStyle BackColor="#9997B6" BorderColor="#9595AA" Font-Names="Verdana" Font-Size="8pt"
                                            ForeColor="Black" Margin="1" UseHotTrackStyle="True" UsePressedStyle="True" Wrap="False">
                                            <PressedStyle BackColor="#FFCA86" BorderColor="Navy" ForeColor="Black">
                                                <Filters>
                                                    <dxwdc:LookAndFeelStyleGradientFilter EndColor="255, 202, 134" StartColor="254, 148, 80" />
                                                </Filters>
                                            </PressedStyle>
                                            <Filters>
                                                <dxwdc:LookAndFeelStyleGradientFilter EndColor="153, 151, 182" StartColor="242, 243, 249" />
                                            </Filters>
                                            <HotTrackStyle BackColor="#FFD599" BorderColor="Navy" ForeColor="Black">
                                                <Filters>
                                                    <dxwdc:LookAndFeelStyleGradientFilter EndColor="255, 213, 153" StartColor="255, 243, 202" />
                                                </Filters>
                                            </HotTrackStyle>
                                        </ButtonStyle>
                                        <LabelStyle Font-Names="Verdana" Font-Size="8pt" ForeColor="Black" />
                                        <EditorStyle BackColor="White" BorderColor="#9595AA" Font-Names="Verdana" Font-Size="8pt"
                                            ForeColor="Black">
                                        </EditorStyle>
                                        <ScrollBarButtonStyle>
                                            <Filters>
                                                <dxwdc:LookAndFeelStyleGradientFilter EndColor="153, 151, 182" GradientMode="Horizontal"
                                                    StartColor="242, 243, 249" />
                                            </Filters>
                                        </ScrollBarButtonStyle>
                                    </LookAndFeel>
                                </dxwdc:ASPxLookAndFeelController>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 900px">
                                <table id="Summary Table" cellpadding="0" cellspacing="0" style="height: 86px;
                                    margin: 0px; width: 832px;">
                                    <tr>
                                        <td style="width: 300px; vertical-align: top; height: 176px;">
                                            <fieldset style="height:140px; width: 300px;">
                                                <legend style="font-weight: bold; font-size: 8pt; color: Black; font-family: Arial">
                                                    Internal Payment Request Details</legend>
                                                <table id="taskInfoTable" border="0" cellpadding="1" cellspacing="3" style="width: 100%;">
                                                    <tr>
                                                        <td class="clsLabel">
                                                            Requested By:
                                                        </td>
                                                        <td>
                                                            <asp:Label ID="lblRequestor" runat="server" CssClass="clsInput"></asp:Label>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td class="clsLabel" style="height: 21px">
                                                            Request Date:
                                                        </td>
                                                        <td style="height: 21px">
                                                            <asp:Label ID="lblRequestDate" runat="server" CssClass="clsInput"></asp:Label>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td class="clsLabel">
                                                            Status:
                                                        </td>
                                                        <td>
                                                            <asp:Label ID="lblStatus" runat="server" CssClass="clsInput"></asp:Label>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td class="clsLabel">
                                                            Assigned To:
                                                        </td>
                                                        <td>
                                                            <asp:Label ID="lblAssignTo" runat="server" CssClass="clsInput"></asp:Label>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td class="clsLabel" style="height: 21px">
                                                            Assigned Date:
                                                        </td>
                                                        <td style="height: 21px">
                                                            <asp:Label ID="lblAssignDate" runat="server" CssClass="clsInput"></asp:Label>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td style="height: 15px" class="clsLabel">
                                                            Previous User:
                                                        </td>
                                                        <td style="height: 15px">
                                                            <asp:Label ID="lblPrevUser" runat="server" CssClass="clsInput"></asp:Label>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </fieldset>
                                        </td>
                                        <td style="width: 300px; vertical-align: top; height: 176px;">
                                            <fieldset style="width: 300px;height:140px">
                                                <legend style="font-weight: bold; font-size: 8pt; color: Black; font-family: Arial">
                                                    History Details</legend>
                                                <table id="requestInfo" border="0" cellpadding="1" cellspacing="3" style="width: 100%;">
                                                    <tr>
                                                        <td class="clsLabel">
                                                            Last Update:
                                                        </td>
                                                        <td style="width: 80px">
                                                            <asp:Label ID="lblLastUpdate" runat="server" CssClass="clsInput"></asp:Label>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2" class="clsLabel">
                                                            Last Notes:
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2" style="height: 62px">
                                                            <asp:Label ID="lblOldNotes" runat="server" Height="100%" Width="100%"
                                                                CssClass="clsInput"></asp:Label>
                                                        </td>
                                                    </tr>
                                                    <tr>                                                    
                                                        <td colspan="2" style="height: 28px">
                                                            <dxwdc:ASPxButton ID="butViewHist" runat="server" TabIndex="0" Text="View History"
                                                                Width="100%" ToolTip="click here to View Request History" AutoPostBack="False">
                                                                <ClientSideEvents>
                                                                    <Click>
                                                                        function(source,e){ viewHistory(); }</Click>
                                                                </ClientSideEvents>
                                                            </dxwdc:ASPxButton>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </fieldset>
                                        </td>
                                        <td style="width: 300px; vertical-align: top; height: 176px;">
                                            <fieldset style="height:140px;width: 290px;">
                                                <legend style="font-weight: bold; font-size: 8pt; color: Black; font-family: Arial">
                                                    Payment Details</legend>
                                                <table id="payInfo" border="0" cellpadding="1" cellspacing="3" width="300px">
                                                    <tr>
                                                        <td class="clsLabel">
                                                            Authorised By:
                                                        </td>
                                                        <td style="width: 67px">
                                                            <asp:Label ID="lblAuthUser" runat="server" CssClass="clsInput"></asp:Label>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td class="clsLabel">
                                                            Authorised Date:
                                                        </td>
                                                        <td style="width: 67px">
                                                            <asp:Label ID="lblAuthDate" runat="server" CssClass="clsInput"></asp:Label>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td class="clsLabel" style="width: 200px">
                                                            Reference:
                                                        </td>
                                                        <td style="width: 67px">
                                                            <asp:Label ID="lblRefNo" runat="server" CssClass="clsInput"></asp:Label>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2" style="height: 28px" rowspan="2">
                                                            <dxwdc:ASPxButton ID="butViewAudit" runat="server" TabIndex="0" Text="View Audit Document"
                                                                Width="100%" ToolTip="click here to View Audit Document" OnClick="butViewAudit_Click">
                                                            </dxwdc:ASPxButton>
                                                        </td>
                                                    </tr>

                                                </table>
                                            </fieldset>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 832px; vertical-align: top; height: 135px;">
                                <fieldset style="margin-left: 3px; width: 900px;">
                                    <legend style="font-weight: bold; font-size: 8pt; color: Black; font-family: Arial">
                                        Request Details</legend>
                                    <table id="HeaderTable" border="0" cellpadding="1" cellspacing="3" style="width: 69%;">
                                        <tr>
                                            <td style="width: 109px; height: 43px;" class="clsLabel">
                                                Programme:
                                            </td>
                                            <td style="width: 591px; height: 43px;">
                                                <asp:DropDownList ID="ddProgramme" runat="server" DataSourceID="ProgrammeDataSource"
                                                    DataTextField="cDescription" DataValueField="idSegment" Width="419px" CssClass="clsInput" Enabled="False">
                                                </asp:DropDownList>
                                            </td>
                                            <td style="width: 356px; height: 43px;" class="clsLabel">
                                                Notes:
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="width: 109px;" class="clsLabel">
                                                Project:
                                            </td>
                                            <td style="width: 591px;">
                                                <asp:DropDownList ID="ddProject" runat="server" Width="419px" CssClass="clsInput" Enabled="False">
                                                    <asp:ListItem Value="0">[Please select Project]</asp:ListItem>
                                                    <asp:ListItem>Project1</asp:ListItem>
                                                    <asp:ListItem>Project2</asp:ListItem>
                                                </asp:DropDownList>
                                            </td>
                                            <td style="width: 356px">
                                               <asp:TextBox ID="memNotes" runat="server" Height="41px" TextMode="MultiLine" Width="353px"
                                                    CssClass="clsInput"></asp:TextBox>
                                            </td>
 
                                        </tr>
                                    </table>
                                </fieldset>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 832px; vertical-align: top; height: 243px;">
                                <fieldset style="margin-left: 3px; width: 900px;">
                                    <legend style="font-weight: bold; font-size: 8pt; color: black; font-family: Arial">
                                        Detail Information</legend>
                                    <table id="detailTable" border="0" cellpadding="1" cellspacing="0" style="width: 100%; height: 171px;">
                                        <tr id="addRow" runat="server">
                                            <td style="width: 900px; height: 28px;">
                                                <dxwdc:ASPxButton ID="btnAdd" runat="server" TabIndex="0" Text="Add Entry" AutoPostBack="False">
                                                    <ClientSideEvents>
                                                        <Click>
                                                            function(source,e){ viewDetailInfo('newId'); e.processOnServer = false;}</Click>
                                                    </ClientSideEvents>
                                                </dxwdc:ASPxButton>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="width: 900px">
                                                <asp:DataGrid ID="aspGridDetailList" runat="server" AutoGenerateColumns="False" Font-Bold="False"
                                                    Font-Italic="False" Font-Names="Tahoma" Font-Overline="False" Font-Size="8pt"
                                                    Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Left" OnItemDataBound="aspGridDetailList_ItemDataBound"
                                                    Width="895px" BorderColor="Black" BorderWidth="1px" ShowFooter="True" Height="127px">
                                                    <HeaderStyle BackColor="DarkGray" Font-Bold="True" Font-Italic="False" Font-Overline="False"
                                                        Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Center" />
                                                    <Columns>
                                                        <asp:BoundColumn DataField="Description" HeaderText="Description" ReadOnly="True"></asp:BoundColumn>
                                                        <asp:BoundColumn DataField="ActivityDesc" HeaderText="Debit Activity" ReadOnly="True">
                                                            <HeaderStyle Width="140px" />
                                                        </asp:BoundColumn>
                                                        <asp:BoundColumn DataField="CreditProgrammeDesc" HeaderText="Credit Programme/Project"
                                                            ReadOnly="True">
                                                            <HeaderStyle Width="140px" />
                                                        </asp:BoundColumn>
                                                        <asp:BoundColumn DataField="CreditActivityDesc" HeaderText="Credit Activity" FooterText="Totals:" ReadOnly="True">
                                                            <FooterStyle BackColor="DarkGray" Font-Bold="True" Font-Italic="False" Font-Overline="False"
                                                                Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Left" />
                                                            <HeaderStyle Width="140px" />
                                                        </asp:BoundColumn>
                                                        <asp:BoundColumn DataField="USDRate" DataFormatString="{0:N2}" HeaderText="Amount"
                                                            ReadOnly="True">
                                                            <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                                Font-Underline="False" HorizontalAlign="Right" />
                                                            <HeaderStyle Font-Bold="True" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                                                Font-Underline="False" HorizontalAlign="Right" />
                                                            <FooterStyle BackColor="DarkGray" Font-Bold="False" Font-Italic="False" Font-Overline="False"
                                                                Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Right" />
                                                        </asp:BoundColumn>
                                                        <asp:BoundColumn DataField="CreditProjectDesc" HeaderText="CreditProjectDesc" ReadOnly="True"
                                                            Visible="False"></asp:BoundColumn>
                                                    </Columns>
                                                    <FooterStyle BorderColor="Black" Font-Bold="False" Font-Italic="False" Font-Overline="False"
                                                        Font-Strikeout="False" Font-Underline="False" />
                                                </asp:DataGrid>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="width: 900px; height: 39px;">
                                                <table border="0" cellpadding="0" cellspacing="1">
                                                    <tr>
                                                        <td style="width: 87px; height: 22px">
                                                            <dxwdc:ASPxButton ID="btnAccept" runat="server" TabIndex="0" Text="Accept" Width="98px"
                                                                OnClick="btnAccept_Click">
                                                            </dxwdc:ASPxButton>
                                                        </td>
                                                        <td style="width: 85px; height: 22px;">
                                                            <dxwdc:ASPxButton ID="btnReject" runat="server" TabIndex="0" Text="Reject" Width="98px"
                                                                OnClick="btnReject_Click">
                                                            </dxwdc:ASPxButton>
                                                        </td>
                                                        <td style="width: 85px; height: 22px;">
                                                            <dxwdc:ASPxButton ID="btnCancel" runat="server" TabIndex="0" Text="Cancel" Width="98px"
                                                                Default="True" OnClick="btnCancel_Click">
                                                            </dxwdc:ASPxButton>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                    </table>
        <asp:ObjectDataSource ID="ProgrammeDataSource" runat="server" OldValuesParameterFormatString="original_{0}"
            SelectMethod="GetDataForSegmentNo" TypeName="UtilityDataTableAdapters.GLSegmentTableAdapter">
            <SelectParameters>
                <asp:Parameter DefaultValue="1" Name="segmentNo" Type="Int32" />
            </SelectParameters>
        </asp:ObjectDataSource>
                                </fieldset>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </form>
</body>
</html>
