
<?php 
  require ("bpms_pdf_invoice.php");

error_reporting(E_ALL);
ini_set('display_errors', 1);

$invoiceid = $_REQUEST['srqid'];
$srqid = "SRQ-".$invoiceid;
$name = $_REQUEST['name']. ",";
$mobile = $_REQUEST['mobile']. ".";
$flatno = $_REQUEST['doorno'];
$blockno = $_REQUEST['blockno'];
$apartment = $_REQUEST['apartment'];
$city = $_REQUEST['city'];
$state = $_REQUEST['state'];
$address1 =$flatno . "," . $blockno . "," . $apartment.",";
$address2 = $city. "," . $state. ",";
$date = $_REQUEST['date'];
$service_request = $_REQUEST['service_request'];
$costinfo = $_REQUEST['costinfo'];
$cost_info = json_decode($costinfo);
$total = $_REQUEST['total'];

//customer and invoice details
  $info=[
    "customer"=>$name,
    "mobno"=>$mobile,
    "address1"=>$address1,
    "address2"=>$address2,
    "invoice_no"=>$srqid,
    "date"=>$date,
    "service_request"=>$service_request,
    "total_amt"=>$total,
  ];

  //Create A4 Page with Portrait 
  $pdf=new PDF("P","mm","A4");
  $pdf->AddPage();
  $pdf->body($info,$cost_info);
  $pdf->Output();
?> 
  
  