<%@ Page Title="" Language="C#" MasterPageFile="~/SunMaster.Master" AutoEventWireup="true" CodeBehind="RetailPayment.aspx.cs" Inherits="SUNWEB.RetailPayment" %>
<%@ Register Assembly="AjaxControlToolkit" TagPrefix="asp" Namespace="AjaxControlToolkit" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<link type="text/css" rel="Stylesheet" href="css/NestedDG.css" />
     <style type="text/css">
         @media only screen and (max-width: 600px) 
         {
             table, th, td 
             {
                 font-size: 20px;
                 font-weight: bold;
                 color: black;
             }

        .Labels{font-size:10px; }
        .alnright { text-align: right; }
       
         }
         @media only screen and (min-width: 1200px) 
        {


           table, th, td 
             {
                 font-size: 20px;
                 font-weight: bold;
                 color: black;
             }
         .Labels{font-size:13px; }
         .alnright { text-align: right; }

            
        }



         table {
             font-family: arial, sans-serif;
             border-collapse: collapse;
             width: 100%;
             font-size: 20px;
             table-layout: fixed;
         }

         td, th {
             border: 1px solid #dddddd;
             text-align: justify;
             padding: 3px;
             width: 35%;
         }
              

             
    
    
    
    </style>

    
    <style type="text/css">
        .overlay
        {
            position: fixed;
            top: 0px;
            left: 0px;
            z-index: 0;
            height: 100%;
            width: 100%;
            top: 0;
            background-color: White;
            filter: alpha(opacity=60);
            opacity: 0.9;
            -moz-opacity: 1;
        }
        
        .LoadingDivCss
        {
            margin: 0;
            position: absolute;
            top: 50%;
            left: 50%;
            margin-right: -50%;
            transform: translate(-50%, -50%);
        }
        
        .LoadingImgCss
        {
            height: 100px;
            width: 100px;
        }
    </style>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">


              <div align="left">
               
                <asp:Button ID="btnExcel" runat="server" Text="Export"    
                 ToolTip="To Export the Report Click Here"  CssClass="btn btn-success btn-xs" 
                 onclick="btnExcel_Click"/>
            </div>

     <asp:UpdatePanel ID="updatepanel1" runat="server">
     <ContentTemplate>

              <div class="section-block">
                <h6 class="section-title">
                 RETAIL PAYMENT REPORT     
                </h6>
            </div>

              <div class="row">
                 
                          <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
                            <div class="card">
                                                    
                                <div class="card-body">
                                  <div class="form-row">
                                            <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                                                <caption>
                                                    <label for="validationCustom03">
                                                      From 
                                                   </label>

                                                   <asp:TextBox ID="txtFromDt" class="form-control" runat="server" 
                                                   Font-Size="Small"></asp:TextBox>
                                                <asp:CalendarExtender ID="calFirstDueDate" Format="yyyy-MM-dd" runat="server" TargetControlID="txtFromDt"
                                                PopupPosition="BottomLeft" FirstDayOfWeek="Sunday"></asp:CalendarExtender>
    
                                                     
                                                </caption>
 
                                                    
                                                
                                            </div>
                                            <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                                                <label for="validationCustom03"> To
                                                 </label>

                                                 <asp:TextBox ID="txtToDt" runat="server" class="form-control" 
                                                 ></asp:TextBox>
                                                <asp:CalendarExtender ID="CalendarExtender1" Format="yyyy-MM-dd" runat="server" TargetControlID="txtToDt"
                                                PopupPosition="BottomLeft" FirstDayOfWeek="Sunday"></asp:CalendarExtender>

                                                  

                                                
                                            </div>
                                            <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                                                <label for="validationCustom03">Branch
                                               <asp:Label ID="lblBranchAliasName"  ForeColor="Blue" runat="server"></asp:Label></label>
                                              <asp:DropDownList ID="cmbBranches" CssClass="custom-select"  
                                               runat="server" AutoPostBack="true" 
                                              onselectedindexchanged="cmbBranches_SelectedIndexChanged"></asp:DropDownList>
                      
                                            </div>
                                              <div class="col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 mb-2">
                                                <asp:Button ID="btnGenerate" runat="server" Text="Apply" Class="btn btn-primary"
                                                    OnClick="btnGenerate_Click"  />
                                              </div>

                                        </div>
                                
                                 </div>
                                 
                                
                                                         
                                </div>
                            </div>
                        </div>
            
             <div class="row">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<h4 class="card-header" id="idGenReport" runat="server"> 
       
        <asp:Label ID="lblMsgTotalSelection" runat="server" CssClass="Labels"> </asp:Label>
           <%--<asp:Button ID="btnPdf" runat="server" Text="PDF" 
            ToolTip="To Export  the Report Click Here"  CssClass="btn btn-secondary" 
            onclick="btnPdf_Click"/>--%>  
        
          
</h4>

<div class="card-body">
<div class="table-responsive">
<div align="center" >
<table id="example4" class="table table-striped table-bordered" style="width:100%">
<tbody>

<div align="center">
<caption>
<table>
<tr>
<td>


   <asp:Panel ID="Panel8" runat="server" BackColor="white" Height="520px" ScrollBars="Auto"
   Width="1550px">
   <asp:GridView ID="GridView1" EmptyDataText="No Data Found !"
    runat="server" showfooter="true"  BorderColor="Transparent" 
    DataKeyNames="Date" AutoGenerateColumns="True" Font-Size="5px"
    Width="100%"
    OnPageIndexChanging="GridView1_PageIndexChanging" AllowPaging="True" PageSize="32">

    <HeaderStyle CssClass="dataTable"  />
    <HeaderStyle BackColor = "White" ForeColor="Black" />
    <footerstyle backcolor= "White" ForeColor="Black" />
    <%--<AlternatingRowStyle CssClass="dataTableAlt" />--%>
    <RowStyle CssClass="dataTable" />

<%--    <Columns>
 
    <asp:BoundField DataField="InventoryID" HeaderText="InvID"  HeaderStyle-HorizontalAlign="Left"  HtmlEncode="False" ItemStyle-HorizontalAlign="left" ItemStyle-Width="2%"  />
    <asp:BoundField DataField="Barcode" HeaderText="Barcode"  HeaderStyle-HorizontalAlign="Left" HeaderStyle-CssClass="text-left" HtmlEncode="False" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="12%" />
    <asp:BoundField DataField="InventoryName" HeaderText="Name"  HeaderStyle-HorizontalAlign="Left" HeaderStyle-CssClass="text-left" HtmlEncode="False" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="20%" />
    <asp:BoundField DataField="CategoryName" HeaderText="Category"  HeaderStyle-HorizontalAlign="Left" HeaderStyle-CssClass="text-left" HtmlEncode="False" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="15%" />
    <asp:BoundField DataField="OpeningBalance" HeaderText="Op.Bal"  HeaderStyle-HorizontalAlign="Right" HeaderStyle-CssClass="text-right" HtmlEncode="False" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="4%" />
    <asp:BoundField DataField="StockIn" HeaderText="StockIn"  HeaderStyle-HorizontalAlign="Right" HeaderStyle-CssClass="text-right" HtmlEncode="False" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="4%" />
    <asp:BoundField DataField="PInvoice" HeaderText="P.Inv"  HeaderStyle-HorizontalAlign="Right" HeaderStyle-CssClass="text-right" HtmlEncode="False" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="4%" />
    <asp:BoundField DataField="Receive" HeaderText="Rec.Stk"  HeaderStyle-HorizontalAlign="Right" HeaderStyle-CssClass="text-right" HtmlEncode="False" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="4%" />    
    <asp:BoundField DataField="TransferRet" HeaderText="Tfr.Ret"  HeaderStyle-HorizontalAlign="Right" HeaderStyle-CssClass="text-right" HtmlEncode="False" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="4%" />    
    <asp:BoundField DataField="StockOut" HeaderText="Stk.Out"  HeaderStyle-HorizontalAlign="Right" HeaderStyle-CssClass="text-right" HtmlEncode="False" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="4%" />
    <asp:BoundField DataField="PReturn" HeaderText="P.Ret"  HeaderStyle-HorizontalAlign="Right" HeaderStyle-CssClass="text-right" HtmlEncode="False" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="4%" />
    <asp:BoundField DataField="Transfer" HeaderText="Tfr"  HeaderStyle-HorizontalAlign="Right" HeaderStyle-CssClass="text-right" HtmlEncode="False" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="4%" />
    <asp:BoundField DataField="RetailSales" HeaderText="R.Sales"  HeaderStyle-HorizontalAlign="Right" HeaderStyle-CssClass="text-right" HtmlEncode="False" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="4%" />
    <asp:BoundField DataField="StockCheck" HeaderText="StkChk"  HeaderStyle-HorizontalAlign="Right" HeaderStyle-CssClass="text-right" HtmlEncode="False" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="4%" />
    <asp:BoundField DataField="ClosingBalance" HeaderText="Cl.Bal"  HeaderStyle-HorizontalAlign="Right" HeaderStyle-CssClass="text-right" HtmlEncode="False" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="4%" />

     
    </Columns>--%>

   <PagerStyle CssClass="gridview5" ></PagerStyle>
   <PagerStyle HorizontalAlign="Left" CssClass="GridPager" />
   <HeaderStyle BackColor="White" Font-Bold="True" ForeColor="Black"></HeaderStyle>
   <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
   <SortedAscendingCellStyle BackColor="#F1F1F1" />
   <SortedAscendingHeaderStyle BackColor="#007DBB" />
   <SortedDescendingCellStyle BackColor="#CAC9C9" />
   <SortedDescendingHeaderStyle BackColor="#00547E" />
</asp:GridView>
  </asp:Panel>

</td>
</tr> 
    
</table>
    
 </caption>
</div> 


</tbody> 
    
</table>

</div>



</div>
</div> 
</div>
</div>
</div>
    
         </ContentTemplate>
   </asp:UpdatePanel>


 <script type="text/javascript">
     function switchViews(obj, row) {
         var div = document.getElementById(obj);
         var img = document.getElementById('img' + obj);

         if (div.style.display == "none") {
             div.style.display = "inline";
             img.src = "IMG/minus.gif";
         } else {
             div.style.display = "none";
             img.src = "IMG/plus.gif";
         }
     }
</script>


       <%--Grid Pager CSS :--%>
 <style type="text/css">
     .GridPager a,
     .GridPager span {
         display: inline-block;
         padding: 0px 9px;
         margin-right: 4px;
         border-radius: 3px;
         border: solid 1px #c0c0c0;
         background: #e9e9e9;
         box-shadow: inset 0px 1px 0px rgba(255,255,255, .8), 0px 1px 3px rgba(0,0,0, .1);
         font-size:12PX;
         font-weight: bold;
         text-decoration: none;
         color: #717171;
         text-shadow: 0px 1px 0px rgba(255,255,255, 1);
     }

     .GridPager a {
         background-color: #f5f5f5;
         color: #969696;
         border: 1px solid #969696;
     }

     .GridPager span {

         background: #616161;
         box-shadow: inset 0px 0px 8px rgba(0,0,0, .5), 0px 1px 0px rgba(255,255,255, .8);
         color: #f0f0f0;
         text-shadow: 0px 0px 3px rgba(0,0,0, .5);
         border: 1px solid #3AC0F2;
     }

 </style>







  <asp:UpdateProgress ID="UpdateProgress" runat="server" AssociatedUpdatePanelID="updatepanel1">
        <ProgressTemplate>
            <div class="overlay">
               
                <div class="LoadingDivCss">
                    <img alt="" src="IMG/Spinner.gif" class="LoadingImgCss" />
                </div>
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress> 
  
 <script src="https://code.jquery.com/jquery-3.7.0.min.js"></script>
 <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
 <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css?v=1.1" rel="stylesheet" />
  <!-- Bootstrap 5 -->
 <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" />
 <!-- Optional Bootstrap Icons -->
 <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css" rel="stylesheet" />
</asp:Content>