This commit is contained in:
Regis Houssin 2009-07-09 03:55:23 +00:00
parent e6a1a797a3
commit d7bf4aaf6c

View File

@ -21,7 +21,7 @@
/** /**
\file htdocs/compta/stats/casoc.php \file htdocs/compta/stats/casoc.php
\brief Page reporting CA par société \brief Page reporting CA par societe
\version $Id$ \version $Id$
*/ */
@ -41,7 +41,7 @@ $sortfield=isset($_GET["sortfield"])?$_GET["sortfield"]:$_POST["sortfield"];
if (! $sortorder) $sortorder="asc"; if (! $sortorder) $sortorder="asc";
if (! $sortfield) $sortfield="nom"; if (! $sortfield) $sortfield="nom";
// Sécurité accés client // Securite acces client
if ($user->societe_id > 0) $socid = $user->societe_id; if ($user->societe_id > 0) $socid = $user->societe_id;
@ -49,13 +49,13 @@ llxHeader();
$html=new Form($db); $html=new Form($db);
// Affiche en-tête de rapport // Affiche en-tete de rapport
if ($modecompta=="CREANCES-DETTES") if ($modecompta=="CREANCES-DETTES")
{ {
$nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByThirdParties"); $nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByThirdParties");
$nom.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=RECETTES-DEPENSES">','</a>').')'; $nom.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=RECETTES-DEPENSES">','</a>').')';
$period=$langs->trans("Year")." ".$year; $period=$langs->trans("Year")." ".$year;
$periodlink='<a href='.$_SERVER["PHP_SELF"].'?year='.($year-1).'&modecompta='.$modecompta.'">'.img_previous().'</a> <a href="'.$_SERVER["PHP_SELF"].'?year='.($year+1).'&modecompta='.$modecompta.'">'.img_next().'</a>'; $periodlink='<a href="'.$_SERVER["PHP_SELF"].'?year='.($year-1).'&modecompta='.$modecompta.'">'.img_previous().'</a> <a href="'.$_SERVER["PHP_SELF"].'?year='.($year+1).'&modecompta='.$modecompta.'">'.img_next().'</a>';
$description=$langs->trans("RulesCADue"); $description=$langs->trans("RulesCADue");
$builddate=time(); $builddate=time();
$exportlink=$langs->trans("NotYetAvailable"); $exportlink=$langs->trans("NotYetAvailable");
@ -122,7 +122,7 @@ else {
dol_print_error($db); dol_print_error($db);
} }
// On ajoute les paiements anciennes version, non liés par paiement_facture // On ajoute les paiements anciennes version, non lies par paiement_facture
if ($modecompta != 'CREANCES-DETTES') if ($modecompta != 'CREANCES-DETTES')
{ {
$sql = "SELECT 'Autres' as nom, '0' as idp, sum(p.amount) as amount_ttc"; $sql = "SELECT 'Autres' as nom, '0' as idp, sum(p.amount) as amount_ttc";
@ -171,7 +171,7 @@ if (sizeof($amount))
{ {
$arrayforsort=$name; $arrayforsort=$name;
// On définit tableau arrayforsort // On d<EFBFBD>finit tableau arrayforsort
if ($sortfield == 'nom' && $sortorder == 'asc') { if ($sortfield == 'nom' && $sortorder == 'asc') {
asort($name); asort($name);
$arrayforsort=$name; $arrayforsort=$name;
@ -220,4 +220,4 @@ print '<br>';
$db->close(); $db->close();
llxFooter('$Date$ - $Revision$'); llxFooter('$Date$ - $Revision$');
?> ?>