Ir para conteúdo
  • Cadastre-se

Relatório de futuras faturas


Posts Recomendados

Pessoal,

Estava procurando uma solução para editar a data de vencimento dos clientes e não estava com saco (ou seja, estava com preguiça de verificar um por um)

Precisava de uma solução para centralizar a data de vencimento dos clientes sem ser pelo pró-rata do whmcs.

Então pesquisei no whmcs.com e achei este script que me pareceu ser bem legal.

O tópico original e os creditos do user que criou o script estão neste link:

WHMCS Forums

Procedimento para utilizar este script é simples

Crie um arquivo php (exemplo: upcoming_automatic_invoices.php) e coloque o seguinte codigo nele:

<?php 

if (!defined("WHMCS")) 

    die("This file cannot be accessed directly"); 


if(!isset($calculate)) 

{ 

    $startday = date("d"); 

    $startmonth = date("m"); 

    $startyear=date("Y"); 

    $endday = date("d",mktime(0,0,0,date("m"),date("d")+7,date("Y"))); 

    $endmonth = date("m",mktime(0,0,0,date("m"),date("d")+7,date("Y"))); 

    $endyear=date("Y",mktime(0,0,0,date("m"),date("d")+7,date("Y"))); 

    $startdate = $startyear.$startmonth.$startday; 

    $enddate=mktime(23,59,59,date("m"),date("d")+7,date("Y")); 

    $enddate = date("Y-m-d",$enddate); 

} 


$reportdata["title"] = "Upcoming Automatic Invoices"; 

$reportdata["description"] = "A summary of invoices that are due to be automatically created."; 


$reportdata["headertext"] = "<form method=\"post\" action=\"$PHP_SELF?report=$report&calculate=true\"><center>Start Date: <select name=\"startday\">"; 


for ( $counter = 1; $counter <= 31; $counter += 1) { 


    $reportdata["headertext"] .= "<option"; 


    if ($counter==$startday) { $reportdata["headertext"] .= " selected"; } 


    $reportdata["headertext"] .= ">$counter"; 


} 


$reportdata["headertext"] .= "</select> <select name=\"startmonth\">"; 


for ( $counter = 1; $counter <= 12; $counter += 1) { 


    $reportdata["headertext"] .= "<option"; 


    if ($counter==$startmonth) { $reportdata["headertext"] .= " selected"; } 


    $reportdata["headertext"] .= ">$counter"; 


} 


$reportdata["headertext"] .= "</select> <select name=\"startyear\">"; 


for ( $counter = 1998; $counter <= 2010; $counter += 1) { 


    $reportdata["headertext"] .= "<option"; 


    if ($counter==$startyear) { $reportdata["headertext"] .= " selected"; } 


    $reportdata["headertext"] .= ">$counter"; 


} 


$reportdata["headertext"] .= "</select> End Date: <select name=\"endday\">"; 


for ( $counter = 1; $counter <= 31; $counter += 1) { 


    $reportdata["headertext"] .= "<option"; 


    if ($counter==$endday) { $reportdata["headertext"] .= " selected"; } 


    $reportdata["headertext"] .= ">$counter"; 


} 


$reportdata["headertext"] .= "</select> <select name=\"endmonth\">"; 


for ( $counter = 1; $counter <= 12; $counter += 1) { 


    $reportdata["headertext"] .= "<option"; 


    if ($counter==$endmonth) { $reportdata["headertext"] .= " selected"; } 


    $reportdata["headertext"] .= ">$counter"; 


} 


$reportdata["headertext"] .= "</select> <select name=\"endyear\">"; 


for ( $counter = date("Y"); $counter <= date("Y")+1; $counter += 1) { 


    $reportdata["headertext"] .= "<option"; 


    if ($counter==$endyear) { $reportdata["headertext"] .= " selected"; } 


    $reportdata["headertext"] .= ">$counter"; 


} 


$reportdata["headertext"] .= "</select> <input type=\"submit\" value=\"Generate Report\"></form>";  






    $startday = str_pad($startday,2,"0",STR_PAD_LEFT); 


    $startmonth = str_pad($startmonth,2,"0",STR_PAD_LEFT); 


    $endday = str_pad($endday,2,"0",STR_PAD_LEFT); 


    $endmonth = str_pad($endmonth,2,"0",STR_PAD_LEFT); 




    $startdate = $startyear."-".$startmonth."-".$startday; 


    $enddate = $endyear."-".$endmonth."-".$endday; 


$reportdata["tableheadings"] = array("Next Invoice Due","Client","Product/Service","OrderID","Total"); 

$reportdata["tablevalues"][] = array("**<B>Upcoming/Active</B>"); 

$cancelrequests=mysql_query("SELECT relid FROM tblcancelrequests"); 

while($cancelrequestsrow=mysql_fetch_array($cancelrequests)) 

{ 

    $cancellations[]=$cancelrequestsrow[0]; 

} 

$sql="SELECT DATE_FORMAT(tblhosting.nextinvoicedate,'%d/%m/%Y') AS NextDue, tblclients.id, tblclients.firstname, tblclients.lastname, tblproducts.name, tblhosting.orderid, tblhosting.amount, tblhosting.id AS hostingid FROM tblhosting, tblclients, tblproducts WHERE tblhosting.userid = tblclients.id AND tblhosting.packageid = tblproducts.id AND tblhosting.billingcycle != 'Free Account' AND tblhosting.nextinvoicedate>='$startdate' AND tblhosting.nextinvoicedate<='$enddate' AND (tblhosting.domainstatus='Active' OR tblhosting.domainstatus='Pending' OR tblhosting.domainstatus='Suspended') ORDER BY tblhosting.nextinvoicedate"; 

$result=mysql_query($sql); 

while($row=mysql_fetch_array($result)) 

{ 

    if(!in_array($row[7],$cancellations)) 

    { 

        if($row['orderid']) 

            $reportdata["tablevalues"][] = array($row['NextDue'],'<a href="clientssummary.php?userid='.$row['id'].'">'.$row['firstname']." ".$row['lastname'].'</a>','<a href="clientshosting.php?userid='.$row['id'].'&hostingid='.$row['hostingid'].'">'.$row['name'].'</a>','<a href="orders.php?action=view&id='.$row['orderid'].'">'.$row['orderid'].'</a>',$CONFIG["CurrencySymbol"].format_as_currency($row['amount'])); 

        else 

            $reportdata["tablevalues"][] = array($row['NextDue'],'<a href="clientssummary.php?userid='.$row['id'].'">'.$row['firstname']." ".$row['lastname'].'</a>','<a href="clientshosting.php?userid='.$row['id'].'&hostingid='.$row['hostingid'].'">'.$row['name'],'-',$CONFIG["CurrencySymbol"].format_as_currency($row['amount'])); 

        $amount+=$row['amount']; 

    } 

} 

$reportdata["tablevalues"][] = array("**<B>Overdue/Pending</B>"); 

$sql="SELECT DATE_FORMAT(tblhosting.nextinvoicedate,'%d/%m/%Y') AS NextDue, tblclients.id, tblclients.firstname, tblclients.lastname, tblproducts.name, tblhosting.orderid, tblhosting.amount, tblhosting.id AS hostingid FROM tblhosting, tblclients, tblproducts WHERE tblhosting.userid = tblclients.id AND tblhosting.packageid = tblproducts.id AND tblhosting.billingcycle != 'Free Account' AND tblhosting.nextinvoicedate<='$startdate' AND (tblhosting.domainstatus='Active' OR tblhosting.domainstatus='Pending' OR tblhosting.domainstatus='Suspended') ORDER BY tblhosting.nextinvoicedate"; 

$result=mysql_query($sql); 

while($row=mysql_fetch_array($result)) 

{ 

    if(!in_array($row[7],$cancellations)) 

    { 

        if($row['orderid']) 

            $reportdata["tablevalues"][] = array($row['NextDue'],'<a href="clientssummary.php?userid='.$row['id'].'">'.$row['firstname']." ".$row['lastname'].'</a>','<a href="clientshosting.php?userid='.$row['id'].'&hostingid='.$row['hostingid'].'">'.$row['name'].'</a>','<a href="orders.php?action=view&id='.$row['orderid'].'">'.$row['orderid'].'</a>',$CONFIG["CurrencySymbol"].format_as_currency($row['amount'])); 

        else 

            $reportdata["tablevalues"][] = array($row['NextDue'],'<a href="clientssummary.php?userid='.$row['id'].'">'.$row['firstname']." ".$row['lastname'].'</a>','<a href="clientshosting.php?userid='.$row['id'].'&hostingid='.$row['hostingid'].'">'.$row['name'],'-',$CONFIG["CurrencySymbol"].format_as_currency($row['amount'])); 

        $amount+=$row['amount']; 

    } 

} 

$data["footertext"]="<p align=\"right\"><b>Total Income:</b> ".$CONFIG["CurrencySymbol"].format_as_currency($amount)."</p>"; 

?>

Depois disso, coloque este arquivo dentro deste da pasta report do seu whmcs:

whmcs/modules/reports/

Depois disso, acesse seu whmcs, clique na aba reports e poderá acompanhar ao lado esquerdo o link deste relatório.

Deve ficar + ou - Assim:

WHMCS - Reports | Awesome Screenshot

Abraços

:)

AtarWeb.com.br • Hospedagem de Site + SSL Grátis
█ Revenda de Hospedagem CPanel e DirectAdmin SSD + SSL Grátis
Link para o comentário
Compartilhar em outros sites

Fala pessoal,

@Chuva

Traduzi o relatório para português e corrigi a data inicial, pois no ano só ia até 2010, alterei para aceitar até 2012, se quizer personalizar o nome que irá aparecer no WHMCS é só definir no nome do script, ex.: para aparecer "Relatorio de Futuras Faturas" salve o script com o nome relatorio_futuras_faturas.php, segue o script abaixo:

<?php

if (!defined("WHMCS"))

die("Este arquivo não pode ser acessado diretamente");

if(!isset($calculate))

{

$startday = date("d");

$startmonth = date("m");

$startyear=date("Y");

$endday = date("d",mktime(0,0,0,date("m"),date("d")+7,date("Y")));

$endmonth = date("m",mktime(0,0,0,date("m"),date("d")+7,date("Y")));

$endyear=date("Y",mktime(0,0,0,date("m"),date("d")+7,date("Y")));

$startdate = $startyear.$startmonth.$startday;

$enddate=mktime(23,59,59,date("m"),date("d")+7,date("Y"));

$enddate = date("Y-m-d",$enddate);

}

$reportdata["title"] = "Próximas Faturas Automáticas";

$reportdata["description"] = "Um resumo das faturas que deverão ser criadas automaticamente.";

$reportdata["headertext"] = "<form method=\"post\" action=\"$PHP_SELF?report=$report&calculate=true\"><center>Data Inicial: <select name=\"startday\">";

for ( $counter = 1; $counter <= 31; $counter += 1) {

$reportdata["headertext"] .= "<option";

if ($counter==$startday) { $reportdata["headertext"] .= " selected"; }

$reportdata["headertext"] .= ">$counter";

}

$reportdata["headertext"] .= "</select> <select name=\"startmonth\">";

for ( $counter = 1; $counter <= 12; $counter += 1) {

$reportdata["headertext"] .= "<option";

if ($counter==$startmonth) { $reportdata["headertext"] .= " selected"; }

$reportdata["headertext"] .= ">$counter";

}

$reportdata["headertext"] .= "</select> <select name=\"startyear\">";

for ( $counter = 1998; $counter <= 2012; $counter += 1) {

$reportdata["headertext"] .= "<option";

if ($counter==$startyear) { $reportdata["headertext"] .= " selected"; }

$reportdata["headertext"] .= ">$counter";

}

$reportdata["headertext"] .= "</select> Data Final: <select name=\"endday\">";

for ( $counter = 1; $counter <= 31; $counter += 1) {

$reportdata["headertext"] .= "<option";

if ($counter==$endday) { $reportdata["headertext"] .= " selected"; }

$reportdata["headertext"] .= ">$counter";

}

$reportdata["headertext"] .= "</select> <select name=\"endmonth\">";

for ( $counter = 1; $counter <= 12; $counter += 1) {

$reportdata["headertext"] .= "<option";

if ($counter==$endmonth) { $reportdata["headertext"] .= " selected"; }

$reportdata["headertext"] .= ">$counter";

}

$reportdata["headertext"] .= "</select> <select name=\"endyear\">";

for ( $counter = date("Y"); $counter <= date("Y")+1; $counter += 1) {

$reportdata["headertext"] .= "<option";

if ($counter==$endyear) { $reportdata["headertext"] .= " selected"; }

$reportdata["headertext"] .= ">$counter";

}

$reportdata["headertext"] .= "</select> <input type=\"submit\" value=\"Gerar Relatório\"></form>";

$startday = str_pad($startday,2,"0",STR_PAD_LEFT);

$startmonth = str_pad($startmonth,2,"0",STR_PAD_LEFT);

$endday = str_pad($endday,2,"0",STR_PAD_LEFT);

$endmonth = str_pad($endmonth,2,"0",STR_PAD_LEFT);

$startdate = $startyear."-".$startmonth."-".$startday;

$enddate = $endyear."-".$endmonth."-".$endday;

$reportdata["tableheadings"] = array("Próximo Vencimento da Fatura","Cliente","Produto/Serviço","ID do Pedido","Total");

$reportdata["tablevalues"][] = array("**<B>Próximos/Ativos</B>");

$cancelrequests=mysql_query("SELECT relid FROM tblcancelrequests");

while($cancelrequestsrow=mysql_fetch_array($cancelrequests))

{

$cancellations[]=$cancelrequestsrow[0];

}

$sql="SELECT DATE_FORMAT(tblhosting.nextinvoicedate,'%d/%m/%Y') AS NextDue, tblclients.id, tblclients.firstname, tblclients.lastname, tblproducts.name, tblhosting.orderid, tblhosting.amount, tblhosting.id AS hostingid FROM tblhosting, tblclients, tblproducts WHERE tblhosting.userid = tblclients.id AND tblhosting.packageid = tblproducts.id AND tblhosting.billingcycle != 'Free Account' AND tblhosting.nextinvoicedate>='$startdate' AND tblhosting.nextinvoicedate<='$enddate' AND (tblhosting.domainstatus='Active' OR tblhosting.domainstatus='Pending' OR tblhosting.domainstatus='Suspended') ORDER BY tblhosting.nextinvoicedate";

$result=mysql_query($sql);

while($row=mysql_fetch_array($result))

{

if(!in_array($row[7],$cancellations))

{

if($row['orderid'])

$reportdata["tablevalues"][] = array($row['NextDue'],'<a href=clientssummary.php?userid='.$row['id].'">'.$row['firstname']." ".$row['lastname'].'</a>','<a href=clientshosting.php?userid='.$row['id].'&hostingid='.$row['hostingid'].'">'.$row['name'].'</a>','<a href=orders.php?action=view&id='.$row['orderid].'">'.$row['orderid'].'</a>',$CONFIG["CurrencySymbol"].format_as_currency($row['amount']));

else

$reportdata["tablevalues"][] = array($row['NextDue'],'<a href=clientssummary.php?userid='.$row['id].'">'.$row['firstname']." ".$row['lastname'].'</a>','<a href=clientshosting.php?userid='.$row['id].'&hostingid='.$row['hostingid'].'">'.$row['name'],'-',$CONFIG["CurrencySymbol"].format_as_currency($row['amount']));

$amount+=$row['amount'];

}

}

$reportdata["tablevalues"][] = array("**<B>Vencido/Pendente</B>");

$sql="SELECT DATE_FORMAT(tblhosting.nextinvoicedate,'%d/%m/%Y') AS NextDue, tblclients.id, tblclients.firstname, tblclients.lastname, tblproducts.name, tblhosting.orderid, tblhosting.amount, tblhosting.id AS hostingid FROM tblhosting, tblclients, tblproducts WHERE tblhosting.userid = tblclients.id AND tblhosting.packageid = tblproducts.id AND tblhosting.billingcycle != 'Free Account' AND tblhosting.nextinvoicedate<='$startdate' AND (tblhosting.domainstatus='Active' OR tblhosting.domainstatus='Pending' OR tblhosting.domainstatus='Suspended') ORDER BY tblhosting.nextinvoicedate";

$result=mysql_query($sql);

while($row=mysql_fetch_array($result))

{

if(!in_array($row[7],$cancellations))

{

if($row['orderid'])

$reportdata["tablevalues"][] = array($row['NextDue'],'<a href=clientssummary.php?userid='.$row['id].'">'.$row['firstname']." ".$row['lastname'].'</a>','<a href=clientshosting.php?userid='.$row['id].'&hostingid='.$row['hostingid'].'">'.$row['name'].'</a>','<a href=orders.php?action=view&id='.$row['orderid].'">'.$row['orderid'].'</a>',$CONFIG["CurrencySymbol"].format_as_currency($row['amount']));

else

$reportdata["tablevalues"][] = array($row['NextDue'],'<a href=clientssummary.php?userid='.$row['id].'">'.$row['firstname']." ".$row['lastname'].'</a>','<a href=clientshosting.php?userid='.$row['id].'&hostingid='.$row['hostingid'].'">'.$row['name'],'-',$CONFIG["CurrencySymbol"].format_as_currency($row['amount']));

$amount+=$row['amount'];

}

}

$data["footertext"]=<p align=\"right\"><b>Total de Receitas:</b> ".$CONFIG["CurrencySymbol].format_as_currency($amount)."</p>";

?>

Link para o comentário
Compartilhar em outros sites

Parabéns Chuva... Muito Bom! Obrigado por compartilhar!!!

Fala pessoal,

@Chuva

Traduzi o relatório para português e corrigi a data inicial, pois no ano só ia até 2010, alterei para aceitar até 2012, se quizer personalizar o nome que irá aparecer no WHMCS é só definir no nome do script, ex.: para aparecer "Relatorio de Futuras Faturas" salve o script com o nome relatorio_futuras_faturas.php, segue o script abaixo:

Muito Obrigado também Jesmarcelo pela tradução e ajustes...

Aqui não tinha funcionado, então fui verificar o código e achei um espaço extra na linha 14 e um na linha 116. Segue abaixo o código já corrigido! ;-)


<?php 

if (!defined("WHMCS")) 

die("Este arquivo não pode ser acessado diretamente"); 


if(!isset($calculate)) 

{ 

$startday = date("d"); 

$startmonth = date("m"); 

$startyear=date("Y"); 

$endday = date("d",mktime(0,0,0,date("m"),date("d")+7,date(" Y"))); 

$endmonth = date("m",mktime(0,0,0,date("m"),date("d")+7,date(" Y"))); 

$endyear=date("Y",mktime(0,0,0,date("m"),date("d") +7,date("Y"))); 

$startdate = $startyear.$startmonth.$startday; 

$enddate=mktime(23,59,59,date("m"),date("d")+7,date("Y")); 

$enddate = date("Y-m-d",$enddate); 

} 


$reportdata["title"] = "Próximas Faturas Automáticas"; 

$reportdata["description"] = "Um resumo das faturas que deverão ser criadas automaticamente."; 


$reportdata["headertext"] = "<form method=\"post\" action=\"$PHP_SELF?report=$report&calculate=true\" ><center>Data Inicial: <select name=\"startday\">"; 


for ( $counter = 1; $counter <= 31; $counter += 1) { 


$reportdata["headertext"] .= "<option"; 


if ($counter==$startday) { $reportdata["headertext"] .= " selected"; } 


$reportdata["headertext"] .= ">$counter"; 


} 


$reportdata["headertext"] .= "</select> <select name=\"startmonth\">"; 


for ( $counter = 1; $counter <= 12; $counter += 1) { 


$reportdata["headertext"] .= "<option"; 


if ($counter==$startmonth) { $reportdata["headertext"] .= " selected"; } 


$reportdata["headertext"] .= ">$counter"; 


} 


$reportdata["headertext"] .= "</select> <select name=\"startyear\">"; 


for ( $counter = 1998; $counter <= 2012; $counter += 1) { 


$reportdata["headertext"] .= "<option"; 


if ($counter==$startyear) { $reportdata["headertext"] .= " selected"; } 


$reportdata["headertext"] .= ">$counter"; 


} 


$reportdata["headertext"] .= "</select> Data Final: <select name=\"endday\">"; 


for ( $counter = 1; $counter <= 31; $counter += 1) { 


$reportdata["headertext"] .= "<option"; 


if ($counter==$endday) { $reportdata["headertext"] .= " selected"; } 


$reportdata["headertext"] .= ">$counter"; 


} 


$reportdata["headertext"] .= "</select> <select name=\"endmonth\">"; 


for ( $counter = 1; $counter <= 12; $counter += 1) { 


$reportdata["headertext"] .= "<option"; 


if ($counter==$endmonth) { $reportdata["headertext"] .= " selected"; } 


$reportdata["headertext"] .= ">$counter"; 


} 


$reportdata["headertext"] .= "</select> <select name=\"endyear\">"; 


for ( $counter = date("Y"); $counter <= date("Y")+1; $counter += 1) { 


$reportdata["headertext"] .= "<option"; 


if ($counter==$endyear) { $reportdata["headertext"] .= " selected"; } 


$reportdata["headertext"] .= ">$counter"; 


} 


$reportdata["headertext"] .= "</select> <input type=\"submit\" value=\"Gerar Relatório\"></form>"; 






$startday = str_pad($startday,2,"0",STR_PAD_LEFT); 


$startmonth = str_pad($startmonth,2,"0",STR_PAD_LEFT); 


$endday = str_pad($endday,2,"0",STR_PAD_LEFT); 


$endmonth = str_pad($endmonth,2,"0",STR_PAD_LEFT); 




$startdate = $startyear."-".$startmonth."-".$startday; 


$enddate = $endyear."-".$endmonth."-".$endday; 


$reportdata["tableheadings"] = array("Próximo Vencimento da Fatura","Cliente","Produto/Serviço","ID do Pedido","Total"); 

$reportdata["tablevalues"][] = array("**<B>Próximos/Ativos</B>"); 

$cancelrequests=mysql_query("SELECT relid FROM tblcancelrequests"); 

while($cancelrequestsrow=mysql_fetch_array($cancelrequests)) 

{ 

$cancellations[]=$cancelrequestsrow[0]; 

} 

$sql="SELECT DATE_FORMAT(tblhosting.nextinvoicedate,'%d/%m/%Y') AS NextDue, tblclients.id, tblclients.firstname, tblclients.lastname, tblproducts.name, tblhosting.orderid, tblhosting.amount, tblhosting.id AS hostingid FROM tblhosting, tblclients, tblproducts WHERE tblhosting.userid = tblclients.id AND tblhosting.packageid = tblproducts.id AND tblhosting.billingcycle != 'Free Account' AND tblhosting.nextinvoicedate>='$startdate' AND tblhosting.nextinvoicedate<='$enddate' AND (tblhosting.domainstatus='Active' OR tblhosting.domainstatus='Pending' OR tblhosting.domainstatus='Suspended') ORDER BY tblhosting.nextinvoicedate"; 

$result=mysql_query($sql); 

while($row=mysql_fetch_array($result)) 

{ 

if(!in_array($row[7],$cancellations)) 

{ 

if($row['orderid']) 

$reportdata["tablevalues"][] = array($row['NextDue'],'<a href="clientssummary.php?userid='.$row['id'].'">'.$row['firstname']." ".$row['lastname'].'</a>','<a href="clientshosting.php?userid='.$row['id'].'&hostingid='.$row['hostingid'].'">'.$row['name'].'</a>','<a href="orders.php?action=view&id='.$row['orderid'].'">'.$row['orderid'].'</a>',$CONFIG["CurrencySymbol"].format_as_currency($row['amount'])); 

else 

$reportdata["tablevalues"][] = array($row['NextDue'],'<a href="clientssummary.php?userid='.$row['id'].'">'.$row['firstname']." ".$row['lastname'].'</a>','<a href="clientshosting.php?userid='.$row['id'].'&hostingid='.$row['hostingid'].'">'.$row['name'],'-',$CONFIG["CurrencySymbol"].format_as_currency($row['amount'])); 

$amount+=$row['amount']; 

} 

} 

$reportdata["tablevalues"][] = array("**<B>Vencido/Pendente</B>"); 

$sql="SELECT DATE_FORMAT(tblhosting.nextinvoicedate,'%d/%m/%Y') AS NextDue, tblclients.id, tblclients.firstname, tblclients.lastname, tblproducts.name, tblhosting.orderid, tblhosting.amount, tblhosting.id AS hostingid FROM tblhosting, tblclients, tblproducts WHERE tblhosting.userid = tblclients.id AND tblhosting.packageid = tblproducts.id AND tblhosting.billingcycle != 'Free Account' AND tblhosting.nextinvoicedate<='$startdate' AND (tblhosting.domainstatus='Active' OR tblhosting.domainstatus='Pending' OR tblhosting.domainstatus='Suspended') ORDER BY tblhosting.nextinvoicedate"; 

$result=mysql_query($sql); 

while($row=mysql_fetch_array($result)) 

{ 

if(!in_array($row[7],$cancellations)) 

{ 

if($row['orderid']) 

$reportdata["tablevalues"][] = array($row['NextDue'],'<a href="clientssummary.php?userid='.$row['id'].'">'.$row['firstname']." ".$row['lastname'].'</a>','<a href="clientshosting.php?userid='.$row['id'].'&hostingid='.$row['hostingid'].'">'.$row['name'].'</a>','<a href="orders.php?action=view&id='.$row['orderid'].'">'.$row['orderid'].'</a>',$CONFIG["CurrencySymbol"].format_as_currency($row['amount'])); 

else 

$reportdata["tablevalues"][] = array($row['NextDue'],'<a href="clientssummary.php?userid='.$row['id'].'">'.$row['firstname']." ".$row['lastname'].'</a>','<a href="clientshosting.php?userid='.$row['id'].'&hostingid='.$row['hostingid'].'">'.$row['name'],'-',$CONFIG["CurrencySymbol"].format_as_currency($row['amount'])); 

$amount+=$row['amount']; 

} 

} 

$data["footertext"]="<p align=\"right\"><b>Total de Receitas:</b> ".$CONFIG["CurrencySymbol"].format_as_currency($amount)."</p>"; 

?>

Link para o comentário
Compartilhar em outros sites

Opa,

Testei o codigo do onze, fica em branco mesmo, o codigo do McGuyver está funcionando :D

Acho conveniente comentar, que a linha que altera a data de inicio da pesquisa é a 47:

for ( $counter = 1998; $counter <= 2010; $counter += 1) {

:)

AtarWeb.com.br • Hospedagem de Site + SSL Grátis
█ Revenda de Hospedagem CPanel e DirectAdmin SSD + SSL Grátis
Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...

Informação Importante

Concorda com os nossos termos?