| Card
Transaction Report |
| Location
: |
if (isset($hidd_locationID))echo $hidd_locationID;else echo "Not Available";?>
|
|
Report
Date :
echo date("d/m/Y g:i:s A"); ?>
|
| Term
ID : |
if (isset($hidd_termid))echo $hidd_termid;else echo "Not Available";?>
|
|
|
|
|
|
|
|
|
|
|
|
|
| Staff
No : |
$tngusersql= new sql();
$tngusersql->query("select loginid,username from tnguser where tnguserid=$userid");
if ($userid)echo mssql_result($tngusersql->result,0,"loginid")," (",mssql_result($tngusersql->result,0,"username"),")";else echo "Not Available";
?>
|
|
|
|
| BOJ
Date : |
if (isset($BOJdate))echo $BOJdate;else echo "Not Available";?>
|
if (isset($BOJtime))echo $BOJtime;else echo "Not Available";?>
|
|
|
|
|
| EOJ
Date : |
if (isset($EOJdate))echo $EOJdate;else echo "Not Available";?>
|
if (isset($EOJtime))echo $EOJtime;else echo "Not Available";?>
|
|
|
|
|
| Batch
No : |
if (isset($batchno)) echo $batchno;else echo "Not Available";?>
|
|
|
|
|
|
| Job
No : |
if (isset($jobno))echo $jobno;else echo "Not Available";?>
|
|
|
|
|
|
|   |
|
|
|
|
|
|
| Trans
Type |
Time |
Mfg
No |
Corp
ID |
Bearer Name
|
Vehicle No |
Initial
Amt |
ANN/RPL
Fee |
|
//--------- transaction details --------- ?>
for ($i=0; $i < $postransql->count();$i++)
{ ?>
|
$ttype=mssql_result($postransql->result,$i,"Ttype");
$seqid=mssql_result($postransql->result,$i,"transactionid");
$tfcsql= new tfcsql();
switch ($ttype)
{
case '11' : echo "$seqid RETURN";$dtype=31;break;
case '45' : echo "$seqid CARD SALE";$dtype=49;break;
case '46' : echo "$seqid REPLACE";$dtype=48;break;
default : echo "NON FCARD";
}
?>
|
//$datetmp=explode(" ",mssql_result($postransql->result,$i,"tdatetime"));
//echo $datetmp[1]," ",$datetmp[2];
$ttime=explode(":",mssql_result($postransql->result,$i,"ttime"));
echo $ttime[0],":",$ttime[1],":",$ttime[2];
?>
|
$mfgno=mssql_result($postransql->result,$i,"Mfgno");
echo $mfgno;
?>
|
$tfcregid="N/A";
$tfcbearername="N/A";
$vahicleno = "N/A";
$tfcsql->query("select tfcacctid,bearername, vehicleno from TFCacctdtl where mfgno=$mfgno");
if($tfcsql->result)
if($tfcsql->count()>0)
$tfcregid = mssql_result($tfcsql->result,0,"tfcacctid");
echo $tfcregid;
?>
|
if($tfcsql->result)
if($tfcsql->count()>0)
$tfcbearername = mssql_result($tfcsql->result,0,"bearername");
echo " $tfcbearername";
?>
|
if($tfcsql->result)
if($tfcsql->count()>0)
$vahicleno = mssql_result($tfcsql->result,0,"vehicleno");
echo " $vahicleno";
?>
|
$transactedamt=mssql_result($postransql->result,$i,"Transactedamt");
if ($transactedamt)
printf("%.2f",$transactedamt);
else echo "0.00";
?>
|
$depositsql=new sql();
$tdate=mssql_result($postransql->result,$i,"tdate");
$ttime=mssql_result($postransql->result,$i,"ttime");
if ($bgen=="")
{
$depositsql->query("select Transactedamt from POSTransaction where batchno=$batchno AND Terminalid=$hidd_termdbid AND mfgno=$mfgno and CONVERT (varchar(20),Trandatetime,101) = '$tdate' AND CONVERT (char(20),Trandatetime,114)= '$ttime' AND Ttype=$dtype");
}else
{
$depositsql->query("select Transactedamt from MainPOSTransaction where batchno=$batchno AND Terminalid=$hidd_termdbid AND mfgno=$mfgno and CONVERT (varchar(20),Trandatetime,101) = '$tdate' AND CONVERT (char(20),Trandatetime,114)= '$ttime' AND Ttype=$dtype");
}
if ($depositsql->count() == 0)
{
echo "N/A";
$carddeposit=0;
}
else
{
$carddeposit=mssql_result($depositsql->result,0,"Transactedamt");
printf("%.2f",$carddeposit);
}
if ($dtype == 49)
$annualfeetotal= $annualfeetotal + $carddeposit;
?>
|
} ?>
//--------- End transaction details --------- ?>
| |
|
|
|
|
|
|
|
| Grand
Total : |
| Transaction
Type |
Qty |
Initial
Amt
RM |
Annual
Fee
RM |
Replaced
Amt
RM |
|
//--------------- Grand totals ---------------- ?>
| Total
No of Cards Sold |
$postransql->query("select SCCardSalesQty, SCCardSaleAmt,SCardReimburseQty,SCardReimburseAmt,SCardReturnQty,SCardReturnAmt from POSBatchMaster where Terminalid=$hidd_termdbid and batchno=$batchno");
$total=mssql_result($postransql->result,0,"SCCardSalesQty");
echo $total;
?>
|
$total=mssql_result($postransql->result,0,"SCCardSaleAmt");
printf("%.2f", $total);
$transsum= $transsum +$total;
?>
|
printf("%.2f",$annualfeetotal); ?>
|
|
|
| Total
No of Cards Replaced |
$total=mssql_result($postransql->result,0,"SCardReimburseQty");
echo $total;
?>
|
|
|
$total=mssql_result($postransql->result,0,"SCardReimburseAmt");
printf("%.2f",$total);
?>
|
|
| Total
No of Cards Returned |
$total=mssql_result($postransql->result,0,"SCardReturnQty");
echo $total;
?>
|
$total=mssql_result($postransql->result,0,"SCardReturnAmt");
printf("%.2f",$total);
$transsum= $transsum -$total;
?>
|
|
|
|
|
| Total
Transaction Fees: |
|
printf("%.2f",$transsum);
?>
|
|
|
|
|
|