<?php
include("common/connection.php");
$fetch_inv=mysqli_fetch_array(mysqli_query($con,"select * from invoice_master where Invoice_No='".$_REQUEST['inv']."'"));
$fetch_roaster=mysqli_fetch_array(mysqli_query($con,"select * from roster_master where Patient_Id='".$fetch_inv['Patient_Id']."' and Treatment_Service_Date='".$fetch_inv['End_Date']."'"));
$fetch_patient=mysqli_fetch_array(mysqli_query($con,"Select * from patient_master where Patient_Id='".$fetch_inv['Patient_Id']."'"));
$fetch_aggrement=mysqli_fetch_array(mysqli_query($con,"Select * from patient_agreement where SLN='".$fetch_inv['Aggrement_Id']."'"));
$fetch_service=mysqli_fetch_array(mysqli_query($con,"Select * from service_master where SLN='".$fetch_aggrement['Service_Type']."'"));

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<script>
function print_div() { 
//$("#prntbtn").hide();
var divToPrint = document.getElementById('printdiv');
var popupWin = window.open('', '_blank');
popupWin.document.open();
popupWin.document.write('<html><body onload="window.print()">' + divToPrint.innerHTML + '</html>');
popupWin.document.close();
           }

</script>
<body>
<div id="printdiv">
<table width="800" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td style="padding-bottom:40px;"><img src="https://buurtzorgindia.com/images/logo.png" width="300" /></td>
  </tr>
  <tr>
  <td style="font-family:Arial, Helvetica, sans-serif; text-align:center; font-size:18px; font-weight:800; padding-bottom:40px;">INVOICE</td>
  </tr>
  <tr>
    <td>
    <table width="800" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="40%" style="font-family:Arial, Helvetica, sans-serif; text-align:left; font-size:15px; font-weight:500; line-height:20px; "><span style="font-size:16px; font-weight:600;">BUURTZORG EDUGREEN NEIGHBOURHOOD
CARE<br />
 INDIA PRIVATE LTD</span><br />
<strong>Address :</strong><br />
603, Tower 2, P S Srijan Corporate Park II<br />
Block GP, Sector V, Salt Lake City<br />
Kolkata – 700 0091<br />
Ph : +91 33 4600 4479<br />
Email : care@buurtzorgindia.com</td>
    <td valign="top" width="20%"  style="font-family:Arial, Helvetica, sans-serif; text-align:left; font-size:15px; font-weight:500; line-height:20px; "><span style="font-size:16px; font-weight:600;">BILL TO</span><br />
<strong>Address :</strong><br />
<br />
Invoice Number<br />
Invoice Date</td>
   <td valign="top" width="40%"  style="font-family:Arial, Helvetica, sans-serif; text-align:left; font-size:15px; font-weight:500; line-height:20px; "><span style="font-size:16px; font-weight:600;"><?php echo $fetch_patient['Patient_Name'] ?></span><br />
<?php echo $fetch_patient['Address'] ?><br />
<?php echo $fetch_patient['State'] ?><br />
<?php echo $_REQUEST['inv'] ?><br />
<?php echo date('d-m-Y',strtotime($fetch_inv['Invoice_Date'])) ?><br /></td>
  </tr>
</table>

    
    
    </td>
  </tr>
  <tr>
    <td style="padding-top:60px;">
    <table width="800" border="1" cellspacing="0" cellpadding="0" bordercolor="#000000" style="border-collapse:collapse;">
  <tr>
    <td style="text-align:center; padding:10px; font-family:Arial, Helvetica, sans-serif; font-size:15px; font-weight:600;">Patient Id</td>
     <td style="text-align:center; padding:10px; font-family:Arial, Helvetica, sans-serif; font-size:15px; font-weight:600;">Patient Name</td>
     <td style="text-align:center; padding:10px; font-family:Arial, Helvetica, sans-serif; font-size:15px; font-weight:600;">Service Type</td>
     <td style="text-align:center; padding:10px; font-family:Arial, Helvetica, sans-serif; font-size:15px; font-weight:600;">Start Date</td>
     <td style="text-align:center; padding:10px; font-family:Arial, Helvetica, sans-serif; font-size:15px; font-weight:600;">End Date</td>
     <td style="text-align:center; padding:10px; font-family:Arial, Helvetica, sans-serif; font-size:15px; font-weight:600;">Service Duration</td>
     <td style="text-align:center; padding:10px; font-family:Arial, Helvetica, sans-serif; font-size:15px; font-weight:600;">Service Days</td>
     <td style="text-align:center; padding:10px; font-family:Arial, Helvetica, sans-serif; font-size:15px; font-weight:600;">Rate/ Day</td>
     <td style="text-align:center; padding:10px; font-family:Arial, Helvetica, sans-serif; font-size:15px; font-weight:600;">Total Payable</td>
  </tr>
  <tr>
    <td style="text-align:center; padding:5px 10px; font-family:Arial, Helvetica, sans-serif; font-size:15px; font-weight:500;"><?php echo $fetch_patient['Patient_Id'] ?></td>
    <td style="text-align:center; padding:5px 10px; font-family:Arial, Helvetica, sans-serif; font-size:15px; font-weight:500;"><?php echo $fetch_patient['Patient_Name'] ?></td>
    <td style="text-align:center; padding:5px 10px; font-family:Arial, Helvetica, sans-serif; font-size:15px; font-weight:500;"><?php echo $fetch_service['Service'] ?></td>
    <td style="text-align:center; padding:5px 10px; font-family:Arial, Helvetica, sans-serif; font-size:15px; font-weight:500;"><?php echo date('d-m-Y',strtotime($fetch_inv['Start_Date'])) ?></td>
    <td style="text-align:center; padding:5px 10px; font-family:Arial, Helvetica, sans-serif; font-size:15px; font-weight:500;"><?php echo date('d-m-Y',strtotime($fetch_inv['End_Date'])) ?></td>
    <td style="text-align:center; padding:5px 10px; font-family:Arial, Helvetica, sans-serif; font-size:15px; font-weight:500;"><?php echo $fetch_roaster['Number_Of_Working_Hour'] ?> Hrs</td>
   <td style="text-align:center; padding:5px 10px; font-family:Arial, Helvetica, sans-serif; font-size:15px; font-weight:500;"><?php echo $fetch_inv['Total_Days'] ?></td>
    <td style="text-align:center; padding:5px 10px; font-family:Arial, Helvetica, sans-serif; font-size:15px; font-weight:500;"><?php echo $fetch_inv['Rate'] ?></td>
    <td style="text-align:center; padding:5px 10px; font-family:Arial, Helvetica, sans-serif; font-size:15px; font-weight:500;"><?php echo $fetch_inv['Amount'] ?></td>
  </tr>
  <tr>
    <td colspan="8" style="text-align:center; padding:10px; font-family:Arial, Helvetica, sans-serif; font-size:15px; font-weight:600;">Total Payable</td>
    <td style="text-align:center; padding:10px; font-family:Arial, Helvetica, sans-serif; font-size:15px; font-weight:600;"><?php echo $fetch_inv['Amount'] ?></td>
  </tr>
</table>

    
    
    </td>
  </tr>
  <tr>
    <td style="text-align:left; padding-top:40px; font-family:Arial, Helvetica, sans-serif; font-size:15px; font-weight:500; line-height:23px;">
    
    All fees are inclusive of applicable taxes.<br />
<br />
<br />

Cheque / DD to be issued in the name of<br />

“Buurtzorg Edugreen Neighborhood Care India Pvt. Ltd “, payable at Kolkata.<br />

Our Bank Details:<br />

Bank Name: ICICI Bank Ltd<br />

Account Number: 105605004117<br />

Branch Name: Sector V Kolkata<br />

IFSC Code: ICIC0001056<br />
<br />
<br />
<br />
<br />
<br />

    
    
    
    </td>
  </tr>
  
   <tr>
    <td style="text-align:center; font-family:Arial, Helvetica, sans-serif; font-size:17px; font-weight:600; line-height:23px;">
    
    BUURTZORG EDUGREEN NEIGBORHOOD CARE INDIA PRIVATE LIMITED<br />

603, Tower 2, P S Srijan Corporate Park, Block GP, Sector V,<br />

Salt Lake City, Kolkata – 700 0091<br />

www.buurtzorgindia.com<br />

CIN No. U85320WB2018PTC227910
    
    
    </td>
  </tr>
  
  
  
</table>
</div>
<table width="100" border="0" cellspacing="0" cellpadding="0" align="center" >
<tr><td id="prntbtn"><input name="" type="button" value="Print" onclick="print_div()" style="width:100%; margin-bottom:30px;" /></td></tr>
</table>


</body>
</html>
