$godown='';$rate='';$disc_perc='';$p_and_f='';$duty_perc='';$ecess_perc='';
$vat_perc='';$sc_perc='';$add_amt='';$less_amt='';$net_rate='';


if(isset($_GET[$PageKey]))
{
	$sql = "select ms_GRN_master.*,ms_bill_pass_master_new.bill_pass_id,ms_bill_pass_master_new.bill_pass_date from ms_GRN_master ,ms_bill_pass_master_new where ms_bill_pass_master_new.$PageKey = '".$_GET[$PageKey]."'";
	$result = mysql_query ($sql) or die ("Invalid query : ".$sql."<br>".mysql_errno()." : ".mysql_error());
	if(mysql_num_rows($result)>0)
	{
		$row=mysql_fetch_array($result);
		$PageKeyValue=$row['bill_pass_id'];$bill_pass_date=getDateFormate($row['bill_pass_date']);
		$GRN_id=$row['GRN_id'];$grn_date=getDateFormate($row['GRN_date']);
		$supplier_id=$row['supplier_id'];$order_id=$row['order_id'];
		$dc_no=$row['dc_number'];$dc_date=getDateFormate($row['dc_date']);
		$inv_no=$row['inv_number'];$inv_date=getDateFormate($row['inv_date']);
		$remarks=$row['remarks'];$disc_amount=$row['disc_amount'];$duty_amount=$row['duty_amount'];
		$vat_amount=$row['vat_amount'];$ecess_amount=$row['ecess_amount'];
		$gross_amount=$row['gross_amount'];$othersamount=$row['others_amount'];
		$netamount=$row['net_amount'];$totalamount=$row['total_amount'];
	}
}
?>
<?
if(isset($_GET["bill_pass_id"]))
{
	$bill_pass_id = $_GET["bill_pass_id"];
}
$sql_count = "select count(*) as count from ms_GRN_master,ms_GRN_transaction 
where ms_GRN_master.GRN_id=ms_GRN_transaction.GRN_id and ms_GRN_master.GRN_id='".$GRN_id."'";
$result_count = mysql_query($sql_count) or die ("Invalid query : ".$sql_count."<br>".mysql_errno()." : ".mysql_error());
Esempio n. 2
0
$query_count = $query_count;
$result = mysql_query($query_count);
$row_count = mysql_fetch_array($result);
$numrows = $row_count['count'];
$count = ceil($numrows / $row_limit);
/////////////////// ********************* Select For Count Edit *************** ///////////////
if (isset($_GET['StockId'])) {
    $StockId = $_GET['StockId'];
    $sql = "select * from " . $mysql_adm_table_prefix . "stock_master where rec_id = '{$StockId}'";
    $result = mysql_query($sql) or die("Error in query:" . $sql . "<br>" . mysql_error() . ":" . mysql_errno());
    $row = mysql_fetch_array($result);
    $CountId = $row['CountId'];
    $StockInKgs = $row['StockInKgs'];
    $StockInBale = $row['StockInBale'];
    $ProductId = getCount("ProductId", "rec_id", $CountId);
    $Date = getDateFormate($row['Date'], 1);
}
?>
<table width="98%" cellpadding="0" cellspacing="0" align="center" border="0">
  <tr>
    	<td align="left" valign="top" width="230px" style="padding-top:5px;">
			<?php 
include "inc/adm0_snb.php";
?>
        </td>
        
        <td style="padding-left:5px; padding-top:5px;" valign="top">
        	<table align="center" width="100%" cellpadding="0" cellspacing="0" border="0">
            	<tr>
                	<td align="center" class="gray_bg"><img src="images/bullet.gif" width="15" height="22"/> &nbsp; Add Stock</td>
                </tr>
        if ($sno % 2 == 1) {
            ?>
 bgcolor="#F5F2F1" <?php 
        }
        ?>
>
      <td align="center"><?php 
        echo $sno;
        ?>
</td>
      <td align="center"><?php 
        echo $row['RGP_GRN_id'];
        ?>
</td>
      <td align="center"><?php 
        echo getDateFormate($row['RGP_GRN_date']);
        ?>
</td>
      <td align="center"><?php 
        echo $row['RGP_id'];
        ?>
</td>
      <td align="left" style="padding-left:5px">
      <?php 
        $sql_S = "select * from ms_supplier where supplier_id='" . $row['supplier_id'] . "'";
        $res_S = mysql_query($sql_S) or die(mysql_error());
        $row_S = mysql_fetch_array($res_S);
        echo $row_S['name'];
        ?>
      </td>
      <td align="left" style="padding-left:5px">
Esempio n. 4
0
                                $sql_idate="select * from maint_job where insert_date='".date('Y-m-d')."' and job_id='".$row['job_id']."'";
                                $res_idate=mysql_query($sql_idate);
                                $row_idate=mysql_fetch_array($res_idate);
                                $insert_date=$row_idate['insert_date'];
                              ?>
                              <tr <? if ($sno%2==1) { ?> bgcolor="#F5F2F1" <? } ?>>
                                <td align="center"><?php 
echo $sno;
?>
</td>
                                <td align="center"><?php 
echo $row['job_code'];
?>
</td>
                                <td align="center"><b><?php 
echo getDateFormate($row['schedule_date']);
?>
</b></td>
                                <td align="left" style="padding-left:5px">
                                <?
                                  $sql_M = "select mmm.name from maint_machine_master mmm,maint_job mj where mmm.machine_code= '".$row['machine_id']."' and mj.job_code='".$row['job_code']."' and mmm.machine_code=mj.machine_id";
                                  $res_M = mysql_query($sql_M) or die ("Invalid query : ".$sql_M."<br>".mysql_errno().":".mysql_error());
                                  $row_M = mysql_fetch_array($res_M);
                                  echo $row_M['name'];
                                ?>
                                </td>
                                <td align="left" style="padding-left:5px">
                                <?
                                  $sql_S = "select ms.name from maint_services ms,maint_job mj where ms.s_code =mj.service_id and mj.job_code='".$row['job_code']."' and mj.service_id=ms.s_code";
                                  $res_S = mysql_query($sql_S) or die ("Invalid query : ".$sql_S."<br>".mysql_errno().":".mysql_error());
                                  $row_S = mysql_fetch_array($res_S);
$po_number = '';
$quantity = '';
$amount = '';
$mode = "";
if (isset($_GET["mode"])) {
    $mode = $_GET["mode"];
}
if (isset($_GET[$PageKey])) {
    $sql = "select * from ms_frieght_entry_master where {$PageKey} = '" . $_GET[$PageKey] . "'";
    $result = mysql_query($sql) or die("Invalid query : " . $sql . "<br>" . mysql_errno() . " : " . mysql_error());
    if (mysql_num_rows($result) > 0) {
        $row = mysql_fetch_array($result);
        $PageKeyValue = $row['frieght_id'];
        $frieght_date = getDateFormate($row['frieght_date']);
        $reference_number = $row['reference_number'];
        $reference_date = getDateFormate($row['reference_date']);
        $remarks = $row['remarks'];
        $total_amount = $row['total_amount'];
    }
}
if (isset($_GET["Message"])) {
    $Message = $_GET["Message"];
}
if (isset($_GET["frieght_id"])) {
    $frieght_id = $_GET["frieght_id"];
}
?>
<table width="98%" cellpadding="0" cellspacing="0" align="center" border="0">
	<tr>
		<td align="left" valign="top" width="230px" style="padding-top:5px;">
			<?php 
    {
      $sno=1;
      while($row=mysql_fetch_array($result))
      {
        $sql_idate="select * from elec_MM where insert_date='".date('Y-m-d')."' and MM_id='".$row['MM_id']."'";
        $res_idate=mysql_query($sql_idate);
        $row_idate=mysql_fetch_array($res_idate);
        $insert_date=$row_idate['insert_date'];
        ?>
        <tr>
            <td align="center"><?php 
echo $sno++;
?>
</td>
            <td align="center"><?php 
echo getDateFormate($row['MM_date']);
?>
</td>
            <td align="left" style="padding-left:2px">
            <?
            $sqlD="select name from elec_department where department_id='".$row['department_id']."'";
            $resD=mysql_query($sqlD);
            $dname='';
            if(mysql_num_rows($resD)>0)
            {
              $rowD=mysql_fetch_array($resD);
              $dname=$rowD['name'];
            }
            echo $dname;
            ?>
            </td>
Esempio n. 7
0
	<?php 
if (mysql_num_rows($result) > 0) {
    $sno = 1;
    while ($row = mysql_fetch_array($result)) {
        $sql_idate = "select * from elec_HPS_master where insert_date='" . date('Y-m-d') . "' and HPS_id='" . $row['HPS_id'] . "'";
        $res_idate = mysql_query($sql_idate);
        $row_idate = mysql_fetch_array($res_idate);
        $insert_date = $row_idate['insert_date'];
        ?>
        <tr>
        	<td align="center"><?php 
        echo $sno++;
        ?>
</td>
          <td align="center"><?php 
        echo getDateFormate($row['reading_date']);
        ?>
</td>
          <td align="center"><?php 
        echo $row['power_failure'];
        ?>
</td>
          <td align="center"><?php 
        echo $row['plantname'];
        ?>
</td>
          <td align="center"><?php 
        echo $row['pumpname'];
        ?>
</td>
          <td align="center"><?php 
<?
if(isset($_GET['id']))
{
	$sql = "select * from ".$mysql_adm_table_prefix."pi_master where rec_id = '".$_GET['id']."'";
	$result = mysql_query($sql) or die("Error in Query : ".$sql."<br/>".mysql_error()."<br/>".mysql_errno());
	$row = mysql_fetch_array($result);
	$rec_id = $row['rec_id'];
	$pi_number = $row['PiNumber'];
	$pi_date = getDateFormate($row['PiDate'],1);
	$buyername = getBuyer('BuyerName','rec_id',$row['BuyerId']);
	$buyercountry = getCountry(getBuyer('CountryId','rec_id',$row['BuyerId']));
	$buyeraddress = getBuyer('Address','rec_id',$row['BuyerId']);
	$tinno = getBuyer('TinNumber','rec_id',$row['BuyerId']);
	$cstno = getBuyer('CstNumber','rec_id',$row['BuyerId']);
	$pino = $row['PiNumber'];
	$pidate = getDateFormate($row['PiDate'],1);
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>DOMESTIC PURCHASE INVOICE</title>
<link href="style/adm0_style.css" rel="stylesheet" type="text/css">
<style type="text/css" media="print">

#div_print_btn
{
 visibility:hidden;
}
</style>
<style media="print" type="text/css">
        ?>
</td>
                      <td align="center"><?php 
        echo $row['order_id'];
        ?>
</td>
                      <td align="center"><?php 
        echo $row['indent_id'];
        ?>
</td>
                      <td align="center" width="8%"><?php 
        echo $row['inv_number'];
        ?>
</td>
	                  <td align="center" width="8%"><?php 
        echo getDateFormate($row['inv_date']);
        ?>
</td>
                      <?php 
        if ($SearchType == 'ItemName') {
            ?>
                        <td align="left" style="padding-left:2px">
                          <?php 
            $sql_S = "select * from ms_supplier where supplier_id='" . $row['supplier_id'] . "' ";
            $res_S = mysql_query($sql_S) or die(mysql_error());
            $row_S = mysql_fetch_array($res_S);
            echo $row_S['name'];
            ?>
                        </td>
                      <?php 
        }
                                                                                                         and ms_purchaser_master.purchaser_id = ms_buyer_master.purchaser_id
                                                                                                          and ms_purchase_form_master.form_id = ms_buyer_master.form_id
                                                                                                            $form_search_string
                                                                                                        
                                                                                                         $buy_search_string $tostockSeachString order by ms_buyer_master.buyer_date
                                                                                                         ";
                                                                                    
                                                                                    $result_buy = mysql_query($sql_buy) or die("Error in : ".$sql_buy."<br>".mysql_errno()." : ".mysql_error());
                                                                                    if(mysql_num_rows($result_buy)>0)
                                                                                    {
                                                                                        while($row_buy = mysql_fetch_array($result_buy))
                                                                                        {
                                                                                        ?>
                                                    <tr valign="top" class="tableTxt">
                                                      <td align="center" width="25%" >
                                                          <?=getDateFormate($row_buy["buyer_date"])?>
                                                        </td>
                                                        <td align="center" width="25%">
															<?
                                                                if($row_buy["fromWhat"]==0)
                                                                {
                                                                    echo "To Stock";
                                                                }
                                                                else
                                                                {
                                                                    echo $row_buy["name"];
                                                                }
                                                            ?>
                                                        </td>
                                                        <td align="center" width="25%">
                                                         <?=$row_buy["form_name"]?>
Esempio n. 11
0
																		}
																	}
																	?>
                                                              	</tr>
                                                     <?
                                                        while($row=mysql_fetch_array($result_prj))
                                                        {	
														
                                                    ?>
                                                                <tr <? if ($sno%2==1) { ?> bgcolor="#F5F2F1" <? } ?> class="text_1">
                                                                    <td align="center"><?php 
echo getDispatchNumber("DispatchNumber", "rec_id", $row['DispatchNumberId']);
?>
</td>
                                                                    <td align="center"><?php 
echo getDateFormate(getDispatchNumber("DespatchDate", "rec_id", $row['DispatchNumberId']), 1);
?>
</td>
                                                                    <td align="center"><?php 
echo getBuyer('BuyerName', 'rec_id', getDispatchNumber("BuyerId", "rec_id", $row['DispatchNumberId']));
?>
</td>
                                                                    <td align="center"><?php 
echo $row['Port'];
?>
</td>
                                                                    <td align="center"><?php 
echo getCountry(getBuyer('CountryId', 'rec_id', $row['BuyerId']));
?>
</td>
                                                                    <td align="center"><?php 
	$mode=$_GET['mode'];
}
//////////////////////////////////////////////////////////
$issue_id='';$purpose='';$issue_date='';
$item_id='';$stk_qty='';$req_qty='';$iss_qty='';$godown='';$department_id='';$machinary_id='';
//////////////////////////////////////////////////////////
if(isset($_GET[$PageKey]))
{
	$sql = "select * from ms_IE_master where $PageKey = '".$_GET[$PageKey]."'";
	$result = mysql_query ($sql) or die ("Invalid query : ".$sql."<br>".mysql_errno()." : ".mysql_error());
	if(mysql_num_rows($result)>0)
	{
		$row = mysql_fetch_array($result);
		$PageKeyValue = $row[$PageKey];
		$purpose=stripslashes($row['purpose']);
		$issue_date=getDateFormate($row['IE_date']);		
	}
}

if(isset($_GET["IE_id"]))
{
	$issue_id = $_GET["IE_id"];
}

?>
<!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>Print Issue Entry</title>
                                                                    	<input type="text" name="Date" id="Date" value="<?php 
echo $Date;
?>
" style="width:150px; height:22px;"/>
                                                                    	<a href="javascript:void(0)" onClick="gfPop.fPopCalendar(document.frm_stock_check.Date);return false;" HIDEFOCUS><img name="popcal" align="absbottom" src="./calendar/calbtn.gif" width="34" height="22" border="0" alt=""></a>
                                                                    	<input type="submit" id="button_check" name="button_check" value="Check">    
                                                                    </td>
                                                                    
                                                                    	
                                                                </tr>
															</table>
                                                            </form>
                                                            <?
                                                            if(isset($_POST["button_check"]))
															{
																$Date = getDateFormate($_POST["Date"],1);
																$prdid = $_POST["txt_product"];
                                                            ?>
                                                            
                                                            
                                                            <table align="center" width="100%" border="0" class="border">
                                                                <tr>
                                                                	<td colspan="10" class="gredBg">
                                                                    	REPORT SUMMARY AS ON <?php 
echo $Date;
?>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                	<td width="22%" rowspan="3"  class="gredBg">
																		<?php 
$item_id = '';
$remarks = '';
$quantity = '';
$value = '';
$duedate = '';
//////////////////////////////////////////////////////////
if (isset($_GET[$PageKey])) {
    $sql = "select * from ms_NRGP_master where {$PageKey} = '" . $_GET[$PageKey] . "'";
    $result = mysql_query($sql) or die("Invalid query : " . $sql . "<br>" . mysql_errno() . " : " . mysql_error());
    if (mysql_num_rows($result) > 0) {
        $row = mysql_fetch_array($result);
        $PageKeyValue = $row[$PageKey];
        $NRGP_date = getDateFormate($row['NRGP_date']);
        $supplier_id = $row['supplier_id'];
        $ref_quot_no = $row['ref_quot_no'];
        $ref_quot_date = getDateFormate($row['ref_quot_date']);
        $despatch_through = $row['despatch_through'];
        $special_instr = stripslashes($row['special_instr']);
    }
}
?>
<!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>Print NON RETURNABLE GATE PASS</title>
<style>
.note
{
padding-left:35px;
font: Arial, Helvetica, sans-serif;
Esempio n. 15
0
                                                                     <td align="center">
                                                                     	Is EC
                                                                     </td>
                                                                     <td>
                                                                     </td>
                                                                 </tr>
                                                                 <?php 
 $sql_buy = "select * from \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tms_buyer_master,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tms_purchase_product_master,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tms_purchaser_master,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tms_purchase_form_master\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t where \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t company_id = '" . $row_company["company_id"] . "'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t and ms_purchase_product_master.product_id = ms_buyer_master.product_id\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t and ms_purchaser_master.purchaser_id = ms_buyer_master.purchaser_id\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t and ms_purchase_form_master.form_id = ms_buyer_master.form_id\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t {$buy_search_string} order by ms_buyer_master.buyer_date\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ";
 $result_buy = mysql_query($sql_buy) or die("Error in : " . $sql_buy . "<br>" . mysql_errno() . " : " . mysql_error());
 if (mysql_num_rows($result_buy) > 0) {
     while ($row_buy = mysql_fetch_array($result_buy)) {
         ?>
                                                                     <tr valign="top" class="tableTxt">
                                                                       <td align="center" >
                                                                           <?php 
         echo getDateFormate($row_buy["buyer_date"]);
         ?>
                                                                         </td>
                                                                         <td align="center">
                                                                           <?php 
         echo $row_buy["name"];
         ?>
                                                                         </td>
                                                                         <td align="center">
                                                                           <?php 
         echo $row_buy["form_name"];
         ?>
                                                                         </td>
                                                                         <td align="center">
                                                                           <?php 
         echo $row_buy["product_name"];
Esempio n. 16
0
}
if (isset($_GET[$PageKey])) {
    $sql = "select * from ms_RGP_GRN_master where {$PageKey} = '" . $_GET[$PageKey] . "'";
    $result = mysql_query($sql) or die("Invalid query : " . $sql . "<br>" . mysql_errno() . " : " . mysql_error());
    if (mysql_num_rows($result) > 0) {
        $row = mysql_fetch_array($result);
        $PageKeyValue = $row['RGP_GRN_id'];
        $supplier_id = $row['supplier_id'];
        $RGP_id = $row['RGP_id'];
        $RGP_GRN_date = getDateFormate($row['RGP_GRN_date']);
        $dc_no = $row['dc_number'];
        $dc_date = getDateFormate($row['dc_date']);
        $inv_no = $row['inv_number'];
        $inv_date = getDateFormate($row['inv_date']);
        $gp_no = $row['gp_number'];
        $gp_date = getDateFormate($row['gp_date']);
        $purpose = $row['purpose'];
        $vat_amount = $row['vat_amount'];
        $grossamount = $row['gross_amount'];
        $vatamount = $row['vat_amount'];
        $othersamount = $row['others_amount'];
        $netamount = $row['net_amount'];
    }
}
?>
<script type="text/javascript">
function overlay(MasterId,RecordId) 
{
	e1 = document.getElementById("overlay");
	document.getElementById("hidden_overlay_master").value=MasterId;
	document.getElementById("hidden_overlay").value=RecordId;
 </tr>	
  <?  
  if(mysql_num_rows($result)>0)
  {
    $sno = 1;$oldid = "";$count =1;
    while($row=mysql_fetch_array($result))
    {	
      $sql_idate="select * from ms_NRGP_master where insert_date='".date('Y-m-d')."' and NRGP_id='".$row['NRGP_id']."'";
      $res_idate=mysql_query($sql_idate);	
      $row_idate=mysql_fetch_array($res_idate);
      $insert_date=$row_idate['insert_date'];
      ?>
      <tr <? if ($sno%2==1) { ?> bgcolor="#F5F2F1" <? } ?>>
        <td align="center"><?=$sno?></td>
        <td align="center"><?= $row['NRGP_id']?></td>
        <td align="center"><?=getDateFormate($row['NRGP_date']);?></td>
        <td align="left" style="padding-left:5px">
        <?
          $sql_sup= "select * from ms_supplier where supplier_id='".$row['supplier_id']."'";
          $res_sup = mysql_query ($sql_sup) or die (mysql_error());
          $row_sup = mysql_fetch_array($res_sup);
          echo $row_sup['name'];
         ?>
        </td>
        <td align="left" style="padding-left:5px"><?= $row['item_name']?></td>
        <?
        if($row['NRGP_id']!=$oldid)
        {
          $oldid = $row['NRGP_id'];
          $count=1;
        }
    <td style="padding-left:5px; padding-top:5px;" valign="top">
      <table align="center" width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td align="center" class="gray_bg">
            <img src="images/bullet.gif" width="15" height="22"/> &nbsp; Stock Ledger Machine Report
          </td>
        </tr>
        <tr>
          <td valign="top" id="test">
            <table align="center" width="100%" cellpadding="0" cellspacing="0" border="0">
            	<tr>
                        <td align="center" colspan="4"><b>Search</b> From <?php 
echo getDateFormate($from);
?>
 To <?php 
echo getDateFormate($to);
?>
</td>
                      </tr>
              <tr>
                <td align="center" class="border" >
                	<form name="frm" action="" method="post">
                    <table align="center" width="100%" border="1" class="table1 text_1">
                      
                      <tr>
                        <td align="left"><b>From</b></td>
                        <td align="left">
                          <input type="text" name="dateFrom" id="dateFrom"/>
                          <a href="javascript:void(0)" HIDEFOCUS
                              onClick="gfPop.fPopCalendar(document.getElementById('dateFrom'));return false;">
                              <img name="popcal" align="absbottom" src="./calendar/calbtn.gif" width="34" height="22" border="0" alt="">
Esempio n. 19
0
   <td align="center">Supplier Name</td>
 </tr>
 <?  
 if(mysql_num_rows($result)>0)
 {
   $sno = 1;
   while($row=mysql_fetch_array($result))
   {	
   ?>
     <tr class="particulars">
       <td align="center"><?=$sno?></td>
       <td align="center"><?=$row['Id']?></td>
       <td align="center"><?=getDateFormate($row['form_date'])?></td>
       <td align="left" style="padding-left:2px"><?=$row['form_no']?></td>
       <td align="center"><?=$row['GRN_no']?></td>
       <td align="center"><?=getDateFormate($row['GRN_date'])?></td>
       <td align="left" style="padding-left:2px">
         <?
         $select_supp= "select * from ms_supplier where supplier_id='".$row['supplier_id']."' ";
         $result_supp = mysql_query ($select_supp) or die (mysql_error());
         $row_supp = mysql_fetch_array($result_supp);
         echo $row_supp['name'];
         ?>
       </td>
     </tr>
   <?
   $sno++;
   }	
 }
 else
 {
Esempio n. 20
0
        $DieselLevel = $row["DieselLevel"];
        $KWH = $row["KWH"];
    }
} else {
    if (!isset($_GET[$PageKey])) {
        $sql = "select max(DG_reading_id) as DG_reading_id from elec_DG_reading";
        $res = mysql_query($sql);
        @($row = mysql_fetch_array($res));
        $DG_reading_id = $row['DG_reading_id'] + 1;
    }
}
if (isset($_POST["btn_submit"])) {
    #	echo '<pre>';	print_r($_POST);	echo '</pre>';
    $PageKeyValue = $_POST[$PageKey];
    $DG_id = $_POST["DG_id"];
    $reading_date = getDateFormate($_POST["reading_date"]);
    $RunningHours = $_POST["RunningHours"];
    $OilTemp = $_POST["OilTemp"];
    $DieselLevel = $_POST["DieselLevel"];
    $KWH = $_POST["KWH"];
    if ($PageKeyValue == "") {
        $tableName = "elec_DG_reading";
        $tableData = array("''", "'{$DG_id}'", "'{$reading_date}'", "'{$RunningHours}'", "'{$OilTemp}'", "'{$DieselLevel}'", "'{$KWH}'", "now()", "''");
        //print_r($tableData);
        addDataIntoTable($tableName, $tableData);
        $Message = "{$PageFor} Inserted";
        redirect("{$Page}?Message={$Message}");
    } else {
        if ($mode == "edit") {
            $tableName = "elec_DG_reading";
            $tableColumns = array("DG_reading_id", "DG_id", "ReadingDate", "RunningHours", "OilTemp", "DieselLevel", "KWH");
include("inc/dbconnection.php");
include("inc/store_function.php");
include("inc/check_session.php");

$value=(isset($_REQUEST['str']))?$_REQUEST['str'] : "";
//echo $val;
if($value!='')
{
	$val=explode(",",$value);
	$SearchIEDate="";
	$SearchDepartment="";
	$SearchMachinary="";
	$SearchItem="";
	if($val[0]!= "" and $val[1]!="")
	{
		$FromDate=getDateFormate($val[0]);$ToDate=getDateFormate($val[1]);
		$SearchGRNDate = "and ms_GRN_master.GRN_date between '".$FromDate."' and '".$ToDate."'";
		$SearchIEDate = "and ms_IE_master.IE_date between '".$FromDate."' and '".$ToDate."'";
	}
	if($_REQUEST['byControl']=='Department' and $val[2]!="")
	{
		$SearchDepartment=" and ms_department.department_id='".$val[2]."' ";
	}
	if($_REQUEST['byControl']=='Item' and $val[2]!="")
	{
		$SearchItem=" and ms_item_master.item_id='".$val[2]."' ";
	}
	

}
$sql="SELECT 
            <th align="center" class="borderRight"><b>Item No.</b></th>
            <th align="center" class="borderRight"><b>Item Name</b></th>
            <th align="center" class="borderRight"><b>UOM</b></th>
            <th align="center" class="borderRight"><b>Rec. Qty.</b></th>
            <th align="center" class="borderRight"><b>Rate/Unit</b></th>
            <th align="center" class="borderRight"><b>Value</b></th>
            <th align="center"><b>Net Rate</b></th>
          </tr>
          <?
					$sql_t="select ms_GRN_master.GRN_id,ms_GRN_master.GRN_date,
					ms_GRN_master.inv_number,ms_GRN_master.others_amount,ms_supplier.name as SupplierName,
					ms_uom.name as UOM,ms_item_master.name as ItemName,ms_GRN_transaction.rec_qty,
					ms_GRN_transaction.rate,ms_GRN_transaction.item_id,ms_GRN_transaction.net_rate
					FROM ms_item_master,ms_GRN_master,ms_uom,ms_GRN_transaction,ms_supplier
					where 
						ms_GRN_master.GRN_id=ms_GRN_transaction.GRN_id and ms_GRN_master.GRN_date='".getDateFormate($GRN_date)."'
						and ms_item_master.item_id=ms_GRN_transaction.item_id and ms_item_master.uom_id=ms_uom.uom_id
						and ms_GRN_master.supplier_id=ms_supplier.supplier_id
					";
					$result_t = mysql_query($sql_t) or die ("Invalid query : ".$sql_t."<br>".mysql_errno()." : ".mysql_error());
					if(mysql_num_rows($result_t)>0)
					{
					$totalNetRate=0;
						while($row_t=mysql_fetch_array($result_t))
						{
						?>
            <tr class="particulars">
              <td align="center" class="borderRight"><?= $row_t['GRN_id']?></td>
              <td align="center" class="borderRight"><?= $row_t['inv_number']?></td>
              <td align="left" style="padding-left:2px" class="borderRight"><?= $row_t['SupplierName']?></td>
              <td align="center" class="borderRight"><?= $row_t['item_id']?></td>
        ?>
>
                               <td align="center"><?php 
        echo $sno;
        ?>
</td>
                               <td align="center"><?php 
        if ($row["indent_number"] == "") {
            echo $row["indent_id"];
        } else {
            echo $row["indent_number"];
        }
        ?>
</td>
                               <td align="center"><?php 
        echo getDateFormate($row["indent_date"]);
        ?>
</td>
                               <td align="center">
                               <?php 
        $sql_dept = "select * from ms_department where department_id='" . $row['department_id'] . "'";
        $res_dept = mysql_query($sql_dept) or die(mysql_error());
        if (mysql_num_rows($res_dept) > 0) {
            $row_dept = mysql_fetch_array($res_dept);
            echo $row_dept['name'];
        }
        ?>
                               </td>
                               <?php 
        $sql_item = "select * from ms_item_master where item_id='" . $row['item_id'] . "'";
        $res_item = mysql_query($sql_item) or die(mysql_error());
        if ($sno % 2 == 1) {
            ?>
 bgcolor="#F5F2F1" <?php 
        }
        ?>
>
																	<td align="center"><?php 
        echo $sno;
        ?>
</td>
																	<td align="center"><?php 
        echo $row['DailyReportId'];
        ?>
</td>
																	<td align="center"><?php 
        echo getDateFormate($row['DailyReportDate']);
        ?>
</td>
																	<td align="center"><?php 
        echo $row['UnitConsumption'];
        ?>
</td>
																	<td align="center"><?php 
        echo $row['MaxDemand'];
        ?>
</td>
																	<td align="center"><?php 
        echo $row['LoadFactor'];
        ?>
</td>
																	<td align="center"><?php 
				updateDataIntoTable($tableName,$tableColumns,$tableData);
			}	
			$Message = "$PageFor Updated";
			redirect("elec_list_Compressor.php?Message=$Message");
		}
	}
}
if(isset($_GET[$PageKey]))
{
	$sql = "select * from elec_Compressor_master where $PageKey = '".$_GET[$PageKey]."'";
	$result = mysql_query ($sql) or die ("Invalid query : ".$sql."<br>".mysql_errno()." : ".mysql_error());
	if(mysql_num_rows($result)>0)
	{
		$row = mysql_fetch_array($result);
		$PageKeyValue = $row[$PageKey];
		$reading_date = getDateFormate($row["reading_date"]);				
	}
}

?>
<?
if(isset($_GET["Message"]))
{
	$Message = $_GET["Message"];
}
if(isset($_GET["Compressor_id"]))
{
	$Compressor_id = $_GET["Compressor_id"];
}
else
{
	$rec_id = $row['rec_id'];
	$buyername = getBuyer('BuyerName','rec_id',$row['BuyerId']);
	$buyercountry = getCountry(getBuyer('CountryId','rec_id',$row['BuyerId']));
	$buyeraddress = getBuyer('Address','rec_id',$row['BuyerId']);
	$invoiceno = $row['DispatchNumber'];
	$invoicedate = getDateFormate($row['DespatchDate'],1);
	$freightcharges = $row['FreightCharges'];
	$port = $row['Port'];
	$container_no = $row['TransportNo'];
	$seal_no = $row['VechileNo'];
	//$lot_no = $row['LrNo'];
	$no_pkg = count(explode(",",$row['SrNo']));
	$agent_seal_no = $row['AgentSealNo'];
	$hs_code = $row['HSCode'];
	$pi_no = getPINumber('PiNumber','rec_id',getDispatchDetail('PiId','DispatchNumberId',$rec_id));
	$PiDate = getDateFormate(getPINumber('PiDate','rec_id',getDispatchDetail('PiId','DispatchNumberId',$rec_id)),1);
	$pi_detailid = getPiDetail('rec_id','PiId',getDispatchDetail('PiId','DispatchNumberId',$rec_id));
	
}	
?>	
<?
header("Content-type: application/vnd.ms-excel");
header("Content-Disposition: attachment; filename=export_dispatch_excel.xls");
?>
<!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>Export Dispatch</title>
</head>
<style type="text/css">
Esempio n. 27
0
                }
                $Message = "{$PageFor} Updated";
            }
        }
        $Message = "{$PageFor} Updated";
        redirect("maint_list_item_received.php?Message={$Message}");
    }
}
if (isset($_GET[$PageKey])) {
    $sql = "select * from maint_item_received_master where {$PageKey} = '" . $_GET[$PageKey] . "'";
    $result = mysql_query($sql) or die("Invalid query : " . $sql . "<br>" . mysql_errno() . " : " . mysql_error());
    if (mysql_num_rows($result) > 0) {
        $row = mysql_fetch_array($result);
        $PageKeyValue = $row[$PageKey];
        $IR_id = $row[$PageKey];
        $IR_date = getDateFormate($row['IR_date']);
    }
} else {
    if (!isset($_GET[$PageKey])) {
        $sql = "select max(IR_id) as IR_id from maint_item_received_master";
        $res = mysql_query($sql);
        $row = mysql_fetch_array($res);
        $IR_id = $row['IR_id'] + 1;
    }
}
if (isset($_GET["Message"])) {
    $Message = $_GET["Message"];
}
?>
<table width="98%" cellpadding="0" cellspacing="0" align="center" border="0">
	<tr>
                    </td>
                   </tr>
                   <?php 
            }
            ?>
                  <tr>
                    <td align="center"><?php 
            echo $sno;
            ?>
</td>
                    <td align="left" style="padding-left:5px"><?php 
            echo $row['Description'];
            ?>
</td>
                    <td align="center"><b><?php 
            echo getDateFormate($row_G['GRN_date']);
            ?>
</b></td>
                    <td align="right" style="padding-right:5px" >
                    <?php 
            echo number_format($row_G['PurchaseQty'], 2, '.', '');
            $totalValue += $row_G['PurchaseQty'];
            ?>
                    </td>
                  </tr>
                  <?php 
            $sno++;
            $count++;
            $remain--;
            if ($remain == 0) {
                ?>
Esempio n. 29
0
                $tableColumns = array("machine_maint_id", "machine_maint_date", "department_id", "machine_id", "details");
                $tableData = array("'{$PageKeyValue}'", "'{$machine_maint_date}'", "'{$department_id}'", "'{$machine_id}'", "'{$details}'");
                updateDataIntoTable($tableName, $tableColumns, $tableData);
                $Message = "{$PageFor} Updated";
                redirect("elec_list_machine_maint.php?Message={$Message}");
            }
        }
    }
}
if (isset($_GET[$PageKey])) {
    $sql = "select * from elec_machine_maint where {$PageKey} = '" . $_GET[$PageKey] . "'";
    $result = mysql_query($sql) or die("Invalid query : " . $sql . "<br>" . mysql_errno() . " : " . mysql_error());
    if (mysql_num_rows($result) > 0) {
        $row = mysql_fetch_array($result);
        $PageKeyValue = $row[$PageKey];
        $machine_maint_date = getDateFormate($row["machine_maint_date"]);
        $details = $row["details"];
        $department_id = $row['department_id'];
        $machine_id = $row['machine_id'];
    }
}
if (isset($_GET["Message"])) {
    $Message = $_GET["Message"];
}
if (isset($_GET["machine_maint_id"])) {
    $machine_maint_id = $_GET["machine_maint_id"];
} else {
    $sql = "select max(machine_maint_id) as machine_maint_id from elec_machine_maint";
    $res = mysql_query($sql);
    $row = mysql_fetch_array($res);
    $machine_maint_id = $row['machine_maint_id'] + 1;
Esempio n. 30
0
        ?>
 class="text_1">
                                                                    <td align="center"><?php 
        echo $sno;
        ?>
</td>
                                                                    <td align="center"><?php 
        echo getBuyer('BuyerName', 'rec_id', $row['BuyerId']);
        ?>
</td>
                                                                    <td align="center"><?php 
        echo $row['PiNumber'];
        ?>
</td>
                                                                    <td align="center"><?php 
        echo getDateFormate($row['PiDate'], 1);
        ?>
</td>
                                                                    <td align="center"><?php 
        echo getBuyer('BuyerType', 'rec_id', $row['BuyerId']);
        ?>
</td>
                                                                    <td align="center">
                                                                    <?php 
        if ($row['ConfirmFlag'] == 1) {
            ?>
	
                                                                    	<a href="dispatch.php?id=<?php 
            echo $row["rec_id"];
            ?>
"><img src="images/Next.png" border="0" alt="Despatch" title="Despatch"/></a>