<?php

session_start();


if (!isset($_SESSION['admin_userName'])) {
    header('Location: login.php');
    }
    include '../Admin_controllers/receipt.php';

    include '../Admin_modules/receipt_edit.php';
?>
<?php include("header.php");


//print_r($_POST);
?>
<style>
     .f {
        background-color: rgba(0,0,0,0.5);
    }
     #nav  .d1
    {
        color: #f9a825;
        font-weight: 600;
    }
        nav a:hover {
    background-color: #721418;
    color: #f9a825;
        font-weight: 600;
}
</style>
<body>
    <p style="width: 100%;
       font-size: 1.1em; background-color: #00AC8B; color: #FFFFFF; font-weight: bold; border-radius: 5px;  text-align: center; padding: 4px 8px;">
      Opening Balance: ₹ <?php echo number_format(($balances['open']-$balances['close'])); ?>     

       Closing Balance: ₹ <?php echo number_format(($balances['open']-($balances['close']+$balances['today']))); ?> </p>
            
   <div class="row" style="margin: 10px 5px 0px 5px"> 
      <div class="col-md-12" >
         
          <div class="col-md-4" style="float: left;"></div>
          <div class="col-md-4" style="float: left;">
          <div id="search">
              <form class="form-inline mr-auto" method="post" action="payment.php">
                <label style="margin-right: 10px; font-family: sans-serif; font-size: 20px">Receipt No :</label>
                <input class="form-control mr-sm-2" type="text" placeholder="Search" id="receiptno" name="rc_edit" aria-label="Search">
                <button class="btn  btn-rounded btn-sm my-0" name="submit" type="submit" style="background-color: #00AC8B;font-size: 14px">Search</button>
              </form>
          </div>
          </div>
          <div class="col-md-4" style="float: left;"></div>
      
      </div>
    </div>
<p class="solid1" style="width: 100%;
       font-size: 1.1em; background-color: #00AC8B; color: #FFFFFF; font-weight: bold; border-radius: 5px;  text-align: center; padding: 4px 8px;" >
    Payment by Client
    </p>

<div class="row_page" id="rowpage" style="padding: 0px;">
  <div class="col-md-12">
   
   

     
      <div class="col-md-12 ">
<?php ?>
        <!-- <div style="float: right; margin-top: 5px ; text-align: center;">
          <span style="font-weight: bold;">Type :<?php echo strtoupper($receipt_fetch['rc_type']);?></span>
        </div> -->

      
      <fieldset style=" border: 1px solid #095D92;  background-color:#F0EEEE;border-radius: 6px">
            <div class="data" style=" padding: 10px">
                
                <!--Grid row-->
                <div class="row" style="margin-top: 10px; padding: 10px;">

                    <div class="col-md-3">
                        <div class="border-light">
                            <span>From : <b>MUMBAI</b></span>
                        </div>
                    </div>

                    <div class="col-md-3">
                        <div class="border-light">
                             <span>To : <b><?php echo strtoupper($receipt_fetch['rc_toBranch']);?></b></span>
                        </div>
                    </div>

                    <div class="col-md-3">
                        <div class=" border-light ">
                             <span>Date : <b><?php echo $receipt_fetch['rc_date'];?></b></span>
                        </div>
                    </div>

                    <div class="col-md-3">
                        <div class="border-light">
                            <span>Receipt Number : <b><?php echo $receipt_fetch['rc_number'];?></b></span>
                        </div>
                    </div>

                </div>

                <div class="row" style="padding: 10px;">

                    <!--Grid column-->
                    <div class="col-md-3">
                        <div class="border-light">
                            <span>From : <b><?php echo strtoupper($receipt_fetch['rc_from']);?></b></span>
                        </div>
                    </div>

                    <div class="col-md-3">
                        <div class="border-light">
                            <span>To : <b><?php echo strtoupper($receipt_fetch['rc_to']);?></b></span>
                        </div>
                    </div>

                    <div class="col-md-3">
                        <div class="border-light">
                              <span>Mobile Number : <b><?php echo $receipt_fetch['rc_mob'];?></b></span>
                        </div>
                    </div>

                    <div class="col-md-3">
                        <div class="border-light">
                             <span>GST No : <b><?php echo $receipt_fetch['rc_gst'];?></b></span>
                        </div>
                    </div>
                    <!--Grid column-->
            
                </div>

                <div class="row" style="padding: 10px;">

                    <!--Grid column-->
                    <div class="col-md-3">
                        <div class="border-light">
                            <span>Courier Type : <b>
                                <?php 

                                    $des=$receipt_fetch['rc_particulars'];
                                    $ex=explode('_', $des);
                                    $new = strtoupper(end($ex));
                                    echo $new;
                                ?>
                                    
                                </b></span>
                        </div>
                    </div>

                    <div class="col-md-3">
                        <div class="border-light">
                            <span>VPP : <b><?php echo $receipt_fetch['rc_vvp'];?></b></span>
                        </div>
                    </div>

                    <div class="col-md-3">
                        <div class="border-light">
                             <span>Weight : <b><?php echo $receipt_fetch['rc_kg']; echo " KG"?></b></span>
                        </div>
                    </div>

                    <div class="col-md-3">
                        <div class="border-light">
                             <span>No of Parcels : <b><?php echo $receipt_fetch['rc_parcels'];?></b></span>
                        </div>
                    </div>

                </div>

            </div>
      </fieldset>
</div>





<fieldset style="  /*margin: 5px 15px 5px 15px*/; border: 1px solid #095D92;  background-color:#F0EEEE;border-radius: 6px" >
  <!--  <fieldset style="margin: 5px 0 5px 0; border: 1px solid #095D92; width: 100%; background-color:#F0EEEE;border-radius: 6px"> -->
      <legend style="width: 30%;
       font-size: 1.1em; background-color: #00AC8B; color: #FFFFFF; font-weight: bold; border-radius: 5px;  text-align: center; padding: 4px 8px;">Total Amount </legend>
        
                <div class="col-md-12 ">

      
      
            <div class="data" style=" padding: 10px">
                
                <!--Grid row-->
                <div class="row text-center" style="margin-top: 10px; padding: 10px;">

                    <div class="col-md-4">
                        <div class="border-light">
                            <span>Courier Charges : <b><?php echo "&#8377; "; echo $receipt_fetch['rc_cour_total'];?></b></span>
                        </div>
                    </div>
<!--Array ( [sr_id] => 31 [receipt_id] => rc_09 [rc_number] => RC-GST/000008 [rc_type] => gst [rc_fromBranch] => Mumbai [rc_toBranch] => Ratnagiri -->
<!--[rc_date] => 2019-01-28 [rc_from] => nilesh thengane [rc_to] => pranay [rc_mob] => 7977245859 [rc_gst] => 27AOGTT5029N1ZI [rc_particulars] => br_parcel -->
<!--[rc_kg] => 4 [rc_parcels] => 1 [rc_vvp] => 15000 [rc_cour_total] => 0 [rc_gst_total] => 0 [rc_total] => 155 [rc_remarks] => [vvp_amount] => [vvp_date] => [to_name] => -->
<!--[vvp_payment_status] => pending )-->
                    <div class="col-md-4">
                        <div class="border-light">
                             <span>VPP Charges : <b><?php echo "&#8377; "; echo $receipt_fetch['vpp_charges'];?></b></span>
                        </div>
                    </div>

                    <div class="col-md-4">
                        <div class="border-light">
                             <span>Grand Total : <b><?php echo "&#8377; "; echo $receipt_fetch['rc_total'];?></b></span>
                        </div>
                    </div>

                </div>

            </div>
</div>
    </fieldset>

<form action="../Admin_modules/edit_payment.php" method="post">
      <fieldset style="  border: 1px solid #095D92;  background-color:#F0EEEE;border-radius: 6px" >
      <legend style="width: 30%;font-size: 1.1em; background-color: #00AC8B; color: #FFFFFF; font-weight: bold;border-radius: 5px;  text-align: center; padding: 4px 8px;"> VPP Payment </legend>
        
               <div class="data" style=" padding: 10px">
                
                <!--Grid row-->
                <div class="row text-center" style="margin-top: 10px; padding: 10px;">

<div class="col-md-2"></div>
                  <div class="col-md-2">
                  <div class="border-light">
                            <input id="newName" name="newName" class="form-control mb-4" placeholder="To Name">
                            <div ></div>
                        </div></div>

                    <!-- <div class="col-md-4">
                        <div class="border-light">
                            <span>To: <b><?php echo $receipt_fetch['rc_to'];?></b></span>
                        </div>
                    </div> -->
<div class="col-md-1"></div>
                    <div class="col-md-2">
                    <div class="border-light">
                            <input type="date" id="rc_date" name="newDate" data-date-inline-picker="true" class="form-control mb-4" value="<?php echo date("Y-m-d");?>" max="<?php echo date("Y-m-d");?>">
                        </div></div>
                    <!-- <div class="col-md-4">
                        <div class="border-light">
                             <span>Date: <b><?php echo $receipt_fetch['rc_date'];?></b></span>
                        </div>
                    </div> -->
<div class="col-md-1"></div>
                    <div class="col-md-2">
                    <div class="border-light">
                            <input id="vvpAmount" name="vvpAmount" class="form-control mb-4" placeholder="VVP Amount" value="<?php echo $receipt_fetch['rc_vvp'];?>">
                            <div ></div>
                        </div></div>

                        <div class="col-md-2"></div>
                   <!--  <div class="col-md-4">
                        <div class="border-light">
                             <span>VVP Amount: <b><?php echo "&#8377; "; echo $receipt_fetch['rc_vvp'];?></b></span>
                        </div>
                    </div> -->

                </div>

            </div>
    </fieldset>
<input type="hidden" name="new_rc" value="<?php echo $receipt_fetch['rc_number'];?>">
          </div>
        </div>
      </div>

<div class="row">
  <div class="col-md-4"></div>
  <div class="col-md-4" style="text-align: center;"><div class="col-md-12"><button type="submit" class="btn btn-info" name="editPayment" style="font-size: 15px; ">Payment Done</button></div>
</div>
  <div class="col-md-4"></div>
</div>

</form>
      
</div>
 



</body>
</html>