<?php

//require "config/configDB.php"; 

$sqlVehicleQuery    = mysqli_query($conn,"SELECT id, vehicleno  FROM vehicle_master WHERE isdelete=1");
$sqlVehicleNo       = '';
//$prow = mysqli_fetch_array($sqlBrandQuery,MYSQLI_NUM))
while($prow = mysqli_fetch_array($sqlVehicleQuery)){
    $sqlVehicleNo   =   $sqlVehicleNo."<option value='".$prow['id']."'>".$prow['vehicleno']."</option>";

}


$sqlSupplierQuery = mysqli_query($conn,"SELECT id, sname   FROM supplier_master WHERE isdelete=1 ");
$sqlSupplierName = '';
//$prow = mysqli_fetch_array($sqlBrandQuery,MYSQLI_NUM))
while($prow = mysqli_fetch_array($sqlSupplierQuery)){

    $sqlSupplierName =$sqlSupplierName."<option value='".$prow['id']."'>".$prow['sname']."</option>";

}

$sqlSpareQuery = mysqli_query($conn,"SELECT sm.id,sm.productname FROM product_master sm 



WHERE  sm.isdelete=1   and sm.product_type='Spare' GROUP BY sm.productname ");

$sqlSpareName = '';
//$prow = mysqli_fetch_array($sqlBrandQuery,MYSQLI_NUM))
while($prow = mysqli_fetch_array($sqlSpareQuery)){

    $spareName= $prow['productname'];
    $sqlSpareName =$sqlSpareName."<option value='".$prow['id']."'>".$spareName."</option>";

}

$accountyear        = $financialYearStart."-".$financialYearEnd;
$sql_InvoiceQuery   = mysqli_query($conn,"SELECT count(*) as invoice FROM internalpro_spare_hdr WHERE accountyear='$accountyear' ");
$rowInvoiceCount    = mysqli_fetch_array($sql_InvoiceQuery,MYSQLI_ASSOC);
$invoice_count      = $rowInvoiceCount['invoice']+1;


?>