<?php
require_once "../magic/session_config.php";
bdr_start_session();
  ob_start();
  $branch_d = $_SESSION['branch'];
  include "../actions/dbPDO.php";

  ?>
<div  class="panel panel-primary">
  <div class="panel-heading"style="font-size:1.2em;">الحسابات</div>
  <div class="panel-body"style="background-color:#00324d;color:#f9feff;">
    <div class="container-fluid">
      <br /><br />
      <div class="row">
        <div class="col-sm-2" style="float:right;">
          <button class="btn btn-info btn-block" id="tree" name="tree">شجرة الحسابات</button>
        </div>
        <div class="col-sm-2" style="float:right;"></div>
        <div class="col-sm-3" style="float:right;">
          <button class="btn btn-info btn-block" id="ledger" name="ledger">الدفتر الأستاذ</button>
        </div>
        <div class="col-sm-2" style="float:right;"></div>
        <div class="col-sm-2" style="float:right;">
          <button class="btn btn-info btn-block" id="balance" name="balance">ميزان المراجعة</button> 
        </div>
      </div>

    </div>
</div>
</div>
<script>
$(document).ready(function(){

$("#contt_btn").click(function() {
event.preventDefault();
  var contract_id  = $("#id2").val();
    if(contract_id !=""){
      $.ajax({
          url     : "rent/contt_info.php",
          method  : "POST",
          data    :{contract_id:contract_id},
          dataType:"json",
          success : function(data){
                  $('#contt_info').css('display','block');
                  $("#cust_name").val(data.cust_name);
                  $("#phone").val(data.phone);
                  $("#phone2").val(data.phone2);
                  $("#kind").val(data.kind);
                  $("#numbers").val(data.numbers);
                  $("#model").val(data.model);
        },
        error   :function(result){
    alert(result.statusText);
    }
    });
  }
});// CUSTOMER 2 info_comm2

$("#trans").click(function(event){
  event.preventDefault();
  var myday = $("#myday").val();
    window.open("rent/day_transaction.php?dd="+myday, '_blank');
});
$("#box_trns").click(function(event){
  event.preventDefault();
  var myday = $("#myday").val();
    window.open("rent/box_statement.php?dd="+myday, '_blank');
});

$("#month_bank").click(function(event){
  event.preventDefault();
  var myday = $("#myday").val();
    window.open("rent/month_bank.php?dd="+myday, '_blank');
});
$("#month_cash").click(function(event){
  event.preventDefault();
  var myday = $("#myday").val();
    window.open("rent/month_cash.php?dd="+myday, '_blank');
});

})//end off page code
</script>
