<? include("inc/check_session.php"); include('inc/dbconnection.php'); include('inc/adm_function.php'); ?> <? if(isset($_GET['id'])) { $sql = "select * from ".$mysql_adm_table_prefix."dispatch_number 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']; $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)); } ?>
?> </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 echo getProduct("ProductName", "rec_id", $row['ProductId']); ?> </td> <td align="center"><?php echo $row['Quantity']; ?> </td> <td align="center"><?php echo $row['Price']; ?> </td> <?
include('inc/adm_function.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; }
///// ///// ///// case 'saveBuyer': $buyer_id = saveBuyer($_REQUEST['user_id']); echo json_encode($buyer_id); break; case 'rateBuyer': $rating_id = rateBuyer($_REQUEST['buyer_id'], $_REQUEST['user_id'], $_REQUEST['rateup']); $output = array(); $output['buyer_id'] = $_REQUEST['buyer_id']; $output['rateup'] = $_REQUEST['rateup']; echo json_encode($output); break; case 'getBuyer': $results = getBuyer($_REQUEST['user_id']); echo json_encode($results); break; case 'delBuyer': delBuyer($_REQUEST['user_id']); break; ///// } mysql_close(); } //////////// // Hauls // ////////// function saveHaul($op_id, $userid) { $fields = _getFields('mm_hauls');
<a href="download.php?file_id=<?php echo $row['AttachedFile']; ?> "><img src="images/Excel-icon.png" border="0" alt="PI Excel" title="PI Excel" /></a> <?php } } else { if (getBuyer('BuyerType', 'rec_id', $row['BuyerId']) == 'Export') { ?> <a href="pi_exportexcel.php?pi_id=<?php echo $row['rec_id']; ?> "><img src="images/Excel-icon.png" border="0" alt="PI Excel" title="PI Excel" /></a> <?php } else { if (getBuyer('BuyerType', 'rec_id', $row['BuyerId']) == 'Domestic') { ?> <a href="pi_domesticexcel.php?pi_id=<?php echo $row['rec_id']; ?> "><img src="images/Excel-icon.png" border="0" alt="PI Excel" title="PI Excel" /></a> <?php } } } ?> </td> <td align="center"> <a href="javascript:;" onClick="return hs.htmlExpand(this, {headingText: 'Upload XLS File', width: 400, height: 100 })"><img src="images/upload_icon.jpg" border="0" /></a> <div class="highslide-maincontent">
if(mysql_num_rows($result_dn)>0) { $sno = 1; while($row_dn = mysql_fetch_array($result_dn)) { $sql_1 = "select dm.rec_id , dm.PiId , dm.DispatchNumberId from mo_adm_dispatch_master as dm where dm.DispatchNumberId = '".$row_dn["rec_id"]."'"; $result_1 = mysql_query($sql_1)or die("Error in Query: ".$sql_1."<br/>".mysql_error()."<br/>".mysql_errno()); if(mysql_num_rows($result_1)>0) { $row_1 = mysql_fetch_array($result_1); ?> <tr> <td align="center"><?=getPINumber('PiNumber','rec_id',$row_1['PiId'])?></td> <td align="center"><?=$row_dn['DispatchNumber']?></td> <td align="center" class="text_1"><?=getBuyer('BuyerName','rec_id',getDispatchNumber('BuyerId','rec_id',$row_1['DispatchNumberId']))?></td> </tr> <? } ?> <tr> <td align="center" colspan="4"> <table align="center" width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <? $sql = "select ddl.rec_id , ddl.DispatchMasterId , ddl.DocId , ddl.DocStatus , ddl.DocDate , dm.rec_id , dm.PiId , dm.DispatchNumberId from mo_adm_despatch_doclist as ddl , mo_adm_dispatch_master as dm where ddl.DocStatus = '0' and ddl.DispatchMasterId = dm.rec_id and dm.DispatchNumberId = '".$row_dn["rec_id"]."'"; $result = mysql_query($sql)or die("Error in Query: ".$sql."<br/>".mysql_error()."<br/>".mysql_errno()); if(mysql_num_rows($result)>0) { while($row = mysql_fetch_array($result)) //$row = mysql_fetch_array($result);
echo $pi_number; ?> " /></td> </tr>--> <tr> <td width="11%" align="left" class="text_1"><b>PI Date</b></td> <td width="31%" align="left"> <input type="text" name="txt_pidate" id="txt_pidate" value="<?php echo $pi_date; ?> " style="width:150px; height:22px;"/> <a href="javascript:void(0)" onClick="gfPop.fPopCalendar(document.frm_addpi.txt_pidate);return false;" HIDEFOCUS> <img name="popcal" align="absbottom" src="./calendar/calbtn.gif" width="34" height="22" border="0" alt=""></a> </td> <td width="13%" align="left" class="text_1"><b>Buyer Name</b></td> <td width="45%" align="left"><input type="text" name="txt_buyer" id="txt_buyer" value="<?php echo getBuyer('BuyerName', 'rec_id', $buyer); ?> " onkeyup="ajax_showOptions(this,'getBuyerByLetters',event)" onblur="show_reporttype('div_report','txt_buyer_type_hidden')" autocomplete="off" style="width:150px; height:22px;"/> <input type="hidden" id="txt_buyer_hidden" name="txt_buyer_hidden" value="<?php echo $buyer; ?> "> <input type="hidden" id="txt_buyer_type_hidden" name="txt_buyer_type_hidden" value="<?php echo $buyer_type; ?> "> </td> </tr> <tr> <td align="center" class="text_1" colspan="4"><b>Confirmed</b> <input type="checkbox" name="chk_cnfrm" id="chk_cnfrm" value="1" <? if($confirm_flag=='1'){?> checked="checked"<? } ?> /> <b>Free Sample</b> <input type="checkbox" name="chk_freesample" id="chk_freesample" value="1" <? if($freesample_flag=='1'){?> checked="checked"<? } ?> /></td> </tr>
<?php session_start(); include 'inc/dbconnection.php'; include 'inc/adm_function.php'; $result_current = array(); if (isset($_GET['pi_id'])) { $pi_id = $_GET['pi_id']; $sql = "select * from " . $mysql_adm_table_prefix . "pi_master where rec_id = '{$pi_id}'"; $result = mysql_query($sql) or die("Error in Query: " . $sql . "<br/>" . mysql_error() . "<br/>" . mysql_errno()); $row = mysql_fetch_array($result); $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'])); $strContent = '<HTML> <body> <table align="center" width="100%" cellspacing="0" cellpadding="0" class="border"> <tr> <td align="center" colspan="2" style="border-bottom:#000000 solid 1px;"><span><b>PROFORMA INVOICE</b></span></td> </tr> <tr> <td width="60%" valign="top" style="border-right:#000000 solid 1px"> </td> <td valign="top"> </td> </tr> </table> </body> </html> '; }
?> </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"> <? 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> <? } else {
<?php include "inc/check_session.php"; include 'inc/dbconnection.php'; include 'inc/adm_function.php'; if (isset($_GET['id'])) { $sql = "select * from " . $mysql_adm_table_prefix . "dispatch_number 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']; $buyername = getBuyer('BuyerName', 'rec_id', $row['BuyerId']); $buyercountry = getCountry(getBuyer('CountryId', 'rec_id', $row['BuyerId'])); $buyeraddress = getBuyer('Address', 'rec_id', $row['BuyerId']); $buyertinno = getBuyer('TinNumber', 'rec_id', $row['BuyerId']); $invoiceno = $row['DispatchNumber']; $invoicedate = getDateFormate($row['DespatchDate'], 1); $transport = $row['TransportNo']; $vechileno = $row['VechileNo']; $lr_no = $row['LrNo']; $lr_date = $row['LrDate']; $Other_ref = $row['OtherRef']; $FreightCharges = $row['FreightCharges']; $pi_id = getDispatchDetail('PiId', 'DispatchNumberId', $rec_id); $report_type = getPINumber('ReportType', 'rec_id', $pi_id); $FinalNetAmount = $row['FinalNetAmount']; } header("Content-type: application/vnd.ms-excel"); header("Content-Disposition: attachment; filename=domestic_dispatch_excel.xls"); ?> <style type="text/css"> .headingSmallPrint
<td align="center"><b>Port</b></td> <td align="center"><input type="text" name="txt_port" id="txt_port" style="width:100px;" /></td> <?php } ?> </tr> </table> </td> </tr> <tr> <td style="padding-top:5px;"> <table cellpadding="0" cellspacing="0" border="0" align="center" style="border:1px solid #C6B4AE;" bgcolor="#EAE3E1" width="100%" height="50"> <?php if (getBuyer('BuyerType', 'rec_id', $buyer_id) == 'Export') { $Lot_no = ""; $lotsr_no = ""; $lot_master_id = ""; $lot_number = ""; $IdentificationMarks = ""; if (isset($_GET["mode"])) { //$lot_master_id = $_GET["lot_master_id"]; $sql_lot1 = "select rec_id from mo_adm_pi_detail where PiId = '" . $_GET['id'] . "'"; $result_lot1 = mysql_query($sql_lot1) or die("Error in Query :" . $sql_lot1 . "<br>" . mysql_error() . ":" . mysql_errno()); $row_lot1 = mysql_fetch_array($result_lot1); $pi_detail_id = $row_lot1['rec_id']; $sql_lot2 = "select LotNumber,IdentificationMarks,PiDetailId from mo_adm_lot_master where PiDetailId = '{$pi_detail_id}' and DispatchMasterId = ''"; $result_lot2 = mysql_query($sql_lot2) or die("Error in Query :" . $sql_lot2 . "<br>" . mysql_error() . ":" . mysql_errno()); while ($row_lot2 = mysql_fetch_array($result_lot2)) { $lot_number[] = $row_lot2['LotNumber'];
?> </td> </tr> <?php $s++; } ?> </table> </td> </tr> </table> </div> </td> <td align="center"><span class="text_1"><?php echo getBuyer('BuyerName', 'rec_id', getDispatchNumber('BuyerId', 'rec_id', $row_1['DispatchNumberId'])); ?> </span></td> </tr> <?php } ?> <tr> <td align="center" colspan="4"> <table align="center" width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <?php $sql = "select ddl.rec_id , ddl.DispatchMasterId , ddl.DocId , ddl.DocStatus , ddl.DocDate , dm.rec_id , dm.PiId , dm.DispatchNumberId from mo_adm_despatch_doclist as ddl , mo_adm_dispatch_master as dm where ddl.DocStatus = '0' and ddl.DispatchMasterId = dm.rec_id and dm.DispatchNumberId = '" . $row_dn["rec_id"] . "'"; $result = mysql_query($sql) or die("Error in Query: " . $sql . "<br/>" . mysql_error() . "<br/>" . mysql_errno()); if (mysql_num_rows($result) > 0) { while ($row = mysql_fetch_array($result)) {