<?php

//require "config/configDB.php"; 




$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>";

}

$sqlexplosiveQuery = mysqli_query($conn,"SELECT em.id,em.explosivename,psd.explosiveqty FROM explosive_master em LEFT JOIN  purchase_explosiveinvoice_dtl as psd ON em.id=psd.explosiveID
WHERE em.isdelete=1  and psd.explosiveqty>0 and psd.isdelete=1 GROUP BY psd.explosiveID ");

$sqlexplosiveName = '';
//$prow = mysqli_fetch_array($sqlBrandQuery,MYSQLI_NUM))
while($prow = mysqli_fetch_array($sqlexplosiveQuery)){

    $explosiveName= $prow['explosivename'];
    $sqlexplosiveName =$sqlexplosiveName."<option value='".$prow['id']."'>".$explosiveName."</option>";

}

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


?>