diff --git a/htdocs/compta/recap-compta.php b/htdocs/compta/recap-compta.php index 7fe2ba4b5aa..af4c824fbb7 100644 --- a/htdocs/compta/recap-compta.php +++ b/htdocs/compta/recap-compta.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2001-2006 Rodolphe Quiedeville * Copyright (C) 2004-2006 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify @@ -21,10 +21,10 @@ */ /** - \file htdocs/compta/recap-compta.php - \ingroup compta - \brief Page de fiche recap compta - \version $Revision$ + \file htdocs/compta/recap-compta.php + \ingroup compta + \brief Page de fiche recap compta + \version $Revision$ */ require("./pre.inc.php"); @@ -44,8 +44,6 @@ if ($user->societe_id > 0) $user->getrights('facture'); - - /* * * Mode fiche @@ -66,7 +64,6 @@ if ($socid > 0) dolibarr_fiche_head($head, 'compta', $societe->nom); - print "\n"; print '"; @@ -152,14 +149,14 @@ if ($socid > 0) print ''; print '\n"; - // Auteur - print ''; - + // Auteur + print ''; + print "\n"; - + // Paiements $sql = "SELECT p.rowid,".$db->pdate("p.datep")." as dp, pf.amount, p.statut,"; - $sql.= " p.fk_user_creat, u.code"; + $sql.= " p.fk_user_creat, u.code, u.rowid as userid"; $sql.= " FROM ".MAIN_DB_PREFIX."paiement_facture as pf,"; $sql.= " ".MAIN_DB_PREFIX."paiement as p"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u ON p.fk_user_creat = u.rowid"; @@ -188,7 +185,7 @@ if ($socid > 0) print '\n"; // Auteur - print ''; + print ''; print '';
'; @@ -96,7 +93,7 @@ if ($socid > 0) $sql = "SELECT s.nom, s.idp, f.facnumber, f.amount, ".$db->pdate("f.datef")." as df,"; $sql.= " f.paye as paye, f.fk_statut as statut, f.rowid as facid,"; - $sql.= " u.code"; + $sql.= " u.code, u.rowid as userid"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f,".MAIN_DB_PREFIX."user as u"; $sql.= " WHERE f.fk_soc = s.idp AND s.idp = ".$societe->id; $sql.= " AND f.fk_user_valid = u.rowid"; @@ -127,18 +124,18 @@ if ($socid > 0) // Boucle sur chaque facture for ($i = 0 ; $i < $num ; $i++) - { - $objf = $db->fetch_object($resql); - - $fac = new Facture($db); - $ret=$fac->fetch($objf->facid); + { + $objf = $db->fetch_object($resql); + + $fac = new Facture($db); + $ret=$fac->fetch($objf->facid); if ($ret < 0) - { - print $fac->error."
"; - continue; - } - $totalpaye = $fac->getSommePaiement(); - + { + print $fac->error."
"; + continue; + } + $totalpaye = $fac->getSommePaiement(); + $var=!$var; print "
 '.price($solde)."'.img_object($langs->trans("ShowUser"),'user').' '.$objf->code.''.img_object($langs->trans("ShowUser"),'user').' '.$objf->code.'
'.price($solde)."'.img_object($langs->trans("ShowUser"),'user').' '.$objp->code.''.img_object($langs->trans("ShowUser"),'user').' '.$objp->code.'