From fe7555d24296b85a49fd6821297b46df918159ea Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 2 May 2004 13:49:15 +0000 Subject: [PATCH] =?UTF-8?q?New:=20Possibilit=E9=20de=20trier=20sur=20tous?= =?UTF-8?q?=20les=20champs=20du=20tableau=20pour=20l'=E9cran=20de=20liste?= =?UTF-8?q?=20des=20charges=20sociales.=20New:=20La=20colonne=20pay=E9/non?= =?UTF-8?q?=20pay=E9=20s'affiche=20en=20rouge=20si=20impay=E9=20(comme=20l?= =?UTF-8?q?es=20factures).=20New:=20Le=20type=20et=20libell=E9=20s=E9par?= =?UTF-8?q?=E9=20en=202=20colonnes=20distinctes=20plutot=20qu'une=20commun?= =?UTF-8?q?e=20contenant=202=20valeurs=20l'une=20=E0=20c=F4t=E9=20de=20l'a?= =?UTF-8?q?utre.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/compta/sociales/index.php | 58 +++++++++++++++++++------------- 1 file changed, 35 insertions(+), 23 deletions(-) diff --git a/htdocs/compta/sociales/index.php b/htdocs/compta/sociales/index.php index 4f8fca43f72..89230e8053a 100644 --- a/htdocs/compta/sociales/index.php +++ b/htdocs/compta/sociales/index.php @@ -64,12 +64,8 @@ if ($_GET["action"] == 'del') } } -if ($_GET["action"] == 'edit') -{ - print "La modification est le paiement des charges n'est pas encore disponible.\nSeule leur saisie est possible, sans interaction avec le compte pour l'instant.\n"; -} - - +$year=$_GET["year"]; +$filtre=$_GET["filtre"]; /* * Affichage liste et formulaire des charges. @@ -77,20 +73,36 @@ if ($_GET["action"] == 'edit') print_titre("Charges sociales $year"); +print "
\n"; + print ""; print ""; -print ''; +print ''; print "\n"; -$sql = "SELECT s.rowid as id, c.libelle as nom, s.amount,".$db->pdate("s.date_ech")." as de, s.date_pai, s.libelle, s.paye,".$db->pdate("s.periode")." as periode,".$db->pdate("s.date_pai")." as dp"; +$sql = "SELECT s.rowid as id, c.libelle as type, s.amount,".$db->pdate("s.date_ech")." as de, s.date_pai, s.libelle, s.paye,".$db->pdate("s.periode")." as periode,".$db->pdate("s.date_pai")." as dp"; $sql .= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c, ".MAIN_DB_PREFIX."chargesociales as s"; $sql .= " WHERE s.fk_type = c.id"; if ($year > 0) { - $sql .= " AND date_format(s.periode, '%Y') = $year"; + $sql .= " AND date_format(s.periode, '%Y') = $year"; +} +if ($filtre) { + $filtre=ereg_replace(":","=",$filtre); + $sql .= " AND $filtre"; } $sql .= " ORDER BY lower(s.date_ech) DESC"; @@ -102,6 +114,7 @@ if ( $db->query($sql) ) while ($i < $num) { $obj = $db->fetch_object( $i); + $var = !$var; print ""; print ''; @@ -112,16 +125,16 @@ if ( $db->query($sql) ) print ' '; } print ''; - print ''; + print ''; print ''; if ($obj->paye) { - print ''; + print ''; print ''; } else { - print ''; - print ''; + print ''; } print ''; @@ -132,9 +145,9 @@ else { print $db->error(); } + /* - * - * + * Forumalaire d'ajout d'une charge * */ print ''; @@ -142,10 +155,9 @@ print ''; print ''; print ''; -print ''; +print ''; +print ''; print ''; print '';
Echeance/DatePériode'; -print_liste_field_titre("Libellé",$PHP_SELF,"c.libelle"); -print 'MontantPayé '; +print_liste_field_titre("Echéance/Date",$PHP_SELF,"de"); +print ''; +print_liste_field_titre("Période",$PHP_SELF,"periode"); +print ''; +print_liste_field_titre("Type",$PHP_SELF,"type"); +print ''; +print_liste_field_titre("Libellé",$PHP_SELF,"s.libelle"); +print ''; +print_liste_field_titre("Montant",$PHP_SELF,"s.amount"); +print ''; +print_liste_field_titre("Payé",$PHP_SELF,"s.paye"); +print ' 
'.strftime("%d %b %y",$obj->de).''.$obj->nom.''.$obj->libelle.''.$obj->type.''.$obj->libelle.''.price($obj->amount).''.strftime("%d/%m/%y",$obj->dp).''.strftime("%d/%m/%y",$obj->dp).' Non'.img_edit().''; + print 'Non'.img_edit().''; print '   '.img_delete().'
YYYYMMDD '; - -print '