From 98b893c14c9ae1688a25d0d9902ff983b7de28ad Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Sun, 17 Mar 2019 17:57:06 +0100 Subject: [PATCH 1/9] Update list.php --- htdocs/don/list.php | 41 +++++++++++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/htdocs/don/list.php b/htdocs/don/list.php index 52525009516..1e31a883ef8 100644 --- a/htdocs/don/list.php +++ b/htdocs/don/list.php @@ -86,7 +86,7 @@ llxHeader('', $langs->trans("Donations"), 'EN:Module_Donations|FR:Module_Dons|ES $donationstatic=new Don($db); // Genere requete de liste des dons -$sql = "SELECT d.rowid, d.datedon, d.fk_soc, d.firstname, d.lastname, d.societe,"; +$sql = "SELECT d.rowid, d.datedon, d.fk_soc as socid, d.firstname, d.lastname, d.societe,"; $sql.= " d.amount, d.fk_statut as statut, "; $sql.= " p.rowid as pid, p.ref, p.title, p.public"; $sql.= " FROM ".MAIN_DB_PREFIX."don as d LEFT JOIN ".MAIN_DB_PREFIX."projet AS p"; @@ -148,12 +148,12 @@ if ($resql) } print '
'."\n"; - if ($optioncss != '') print ''; + if ($optioncss != '') print ''; print ''; print ''; print ''; print ''; - print ''; + print ''; print ''; print_barre_liste($langs->trans("Donations"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_generic.png', 0, $newcardbutton); @@ -172,12 +172,18 @@ if ($resql) print ''; print ''; print ''; + if (! empty($conf->global->DONATION_USE_THIRDPARTIES)) { + print ''; + print ''; + print ''; + } else { print ''; print ''; print ''; print ''; print ''; print ''; + } print ''; print ' '; print ''; @@ -193,12 +199,16 @@ if ($resql) $searchpicto=$form->showFilterAndCheckAddButtons(0); print $searchpicto; print ''; - print "\n"; - - print ''; - print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "d.rowid", "", $param, "", $sortfield, $sortorder); + print "\n"; + + print ''; + print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "d.rowid", "", $param, "", $sortfield, $sortorder); + if (! empty($conf->global->DONATION_USE_THIRDPARTIES)) { + print_liste_field_titre("ThirdParty", $_SERVER["PHP_SELF"], "d.fk_soc", "", $param, "", $sortfield, $sortorder); + } else { print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "d.societe", "", $param, "", $sortfield, $sortorder); print_liste_field_titre("Name", $_SERVER["PHP_SELF"], "d.lastname", "", $param, "", $sortfield, $sortorder); +} print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "d.datedon", "", $param, '', $sortfield, $sortorder, 'center '); if (! empty($conf->projet->enabled)) { @@ -219,9 +229,20 @@ if ($resql) $donationstatic->ref=$objp->rowid; $donationstatic->lastname=$objp->lastname; $donationstatic->firstname=$objp->firstname; - print "".$donationstatic->getNomUrl(1)."\n"; - print "".$objp->societe."\n"; - print "".$donationstatic->getFullName($langs)."\n"; + print "".$donationstatic->getNomUrl(1).""; + if (! empty($conf->global->DONATION_USE_THIRDPARTIES)) { + + $company=new Societe($db); + $result=$company->fetch($objp->socid); + if (!empty($objp->socid) && $company->id > 0) { + print "".$company->getNomUrl(1).""; + } else { + print "".$objp->societe." ".$donationstatic->getFullName($langs).""; + } + } else { + print "".$objp->societe.""; + print "".$donationstatic->getFullName($langs).""; + } print ''.dol_print_date($db->jdate($objp->datedon), 'day').''; if (! empty($conf->projet->enabled)) { From c7f162a056b3358343844a0763d5ded5ff58adbf Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Sun, 17 Mar 2019 17:59:46 +0100 Subject: [PATCH 2/9] Update list.php --- htdocs/don/list.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/don/list.php b/htdocs/don/list.php index 1e31a883ef8..d63c28e6c58 100644 --- a/htdocs/don/list.php +++ b/htdocs/don/list.php @@ -148,13 +148,13 @@ if ($resql) } print ''."\n"; - if ($optioncss != '') print ''; + if ($optioncss != '') print ''; print ''; print ''; print ''; print ''; - print ''; - print ''; + print ''; + print ''; print_barre_liste($langs->trans("Donations"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_generic.png', 0, $newcardbutton); From aa98f79e51d9917a6ec757fedd25057c81b6fc88 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Mon, 18 Mar 2019 00:59:12 +0100 Subject: [PATCH 3/9] Update list.php --- htdocs/don/list.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/don/list.php b/htdocs/don/list.php index d63c28e6c58..10a0dab5af3 100644 --- a/htdocs/don/list.php +++ b/htdocs/don/list.php @@ -201,14 +201,14 @@ if ($resql) print ''; print "\n"; - print ''; - print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "d.rowid", "", $param, "", $sortfield, $sortorder); + print ''; + print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "d.rowid", "", $param, "", $sortfield, $sortorder); if (! empty($conf->global->DONATION_USE_THIRDPARTIES)) { print_liste_field_titre("ThirdParty", $_SERVER["PHP_SELF"], "d.fk_soc", "", $param, "", $sortfield, $sortorder); } else { print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "d.societe", "", $param, "", $sortfield, $sortorder); print_liste_field_titre("Name", $_SERVER["PHP_SELF"], "d.lastname", "", $param, "", $sortfield, $sortorder); -} + } print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "d.datedon", "", $param, '', $sortfield, $sortorder, 'center '); if (! empty($conf->projet->enabled)) { @@ -237,8 +237,8 @@ if ($resql) if (!empty($objp->socid) && $company->id > 0) { print "".$company->getNomUrl(1).""; } else { - print "".$objp->societe." ".$donationstatic->getFullName($langs).""; - } + print "".$objp->societe." ".$donationstatic->getFullName($langs).""; + } } else { print "".$objp->societe.""; print "".$donationstatic->getFullName($langs).""; From c4a7e63aeaf84b94cb04492b47a7003d4cf2dd79 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Mon, 18 Mar 2019 12:38:58 +0100 Subject: [PATCH 4/9] Update list.php --- htdocs/don/list.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/don/list.php b/htdocs/don/list.php index 10a0dab5af3..15648375677 100644 --- a/htdocs/don/list.php +++ b/htdocs/don/list.php @@ -180,10 +180,10 @@ if ($resql) print ''; print ''; print ''; + } print ''; print ''; print ''; - } print ''; print ' '; print ''; @@ -207,8 +207,8 @@ if ($resql) print_liste_field_titre("ThirdParty", $_SERVER["PHP_SELF"], "d.fk_soc", "", $param, "", $sortfield, $sortorder); } else { print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "d.societe", "", $param, "", $sortfield, $sortorder); - print_liste_field_titre("Name", $_SERVER["PHP_SELF"], "d.lastname", "", $param, "", $sortfield, $sortorder); } + print_liste_field_titre("Name", $_SERVER["PHP_SELF"], "d.lastname", "", $param, "", $sortfield, $sortorder); print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "d.datedon", "", $param, '', $sortfield, $sortorder, 'center '); if (! empty($conf->projet->enabled)) { @@ -235,14 +235,14 @@ if ($resql) $company=new Societe($db); $result=$company->fetch($objp->socid); if (!empty($objp->socid) && $company->id > 0) { - print "".$company->getNomUrl(1).""; + print "".$company->getNomUrl(1).""; } else { - print "".$objp->societe." ".$donationstatic->getFullName($langs).""; + print "".$objp->societe.""; } } else { - print "".$objp->societe.""; + print "".$objp->societe.""; + } print "".$donationstatic->getFullName($langs).""; - } print ''.dol_print_date($db->jdate($objp->datedon), 'day').''; if (! empty($conf->projet->enabled)) { From 544934f3225b66a8e5927e027a8821e564b118df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 19 Mar 2019 12:48:44 +0100 Subject: [PATCH 5/9] phpcs fix --- htdocs/adherents/class/subscription.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/adherents/class/subscription.class.php b/htdocs/adherents/class/subscription.class.php index 236a118ab4b..71660c0cd8c 100644 --- a/htdocs/adherents/class/subscription.class.php +++ b/htdocs/adherents/class/subscription.class.php @@ -52,14 +52,14 @@ class Subscription extends CommonObject * * @var integer */ - public $datec; + public $datec; /** * Date modification record (tms) * * @var integer */ - public $datem; + public $datem; /** * Subscription start date (date subscription) From 013e536f32d972b2aeaea4ee780bc3ec042d388d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 19 Mar 2019 12:49:54 +0100 Subject: [PATCH 6/9] Update actioncomm.class.php --- htdocs/comm/action/class/actioncomm.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 9917736bdc8..96aaa17fdd2 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -93,14 +93,14 @@ class ActionComm extends CommonObject * * @var integer */ - public $datec; + public $datec; /** * Date modification record (tms) * * @var integer */ - public $datem; + public $datem; /** * Object user that create action @@ -142,7 +142,7 @@ class ActionComm extends CommonObject * * @var integer */ - public $datep2; + public $datep2; /** * @var int -1=Unkown duration From 2fddf38da1805dcb5c42c0d0574e8da2c16e0e49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 19 Mar 2019 12:55:33 +0100 Subject: [PATCH 7/9] correct replacement of align --- htdocs/fourn/class/fournisseur.product.class.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index 6de51fdc359..caad933dd1e 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -6,6 +6,7 @@ * Copyright (C) 2012 Christophe Battarel * Copyright (C) 2015 Marcos García * Copyright (C) 2016 Charlie Benke + * Copyright (C) 2019 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -996,9 +997,9 @@ class ProductFournisseur extends Product //$out .= ''.$langs->trans("QtyMin").''; $out .= ''.$langs->trans("User").''; foreach ($productFournLogList as $productFournLog) { - $out.= ''.dol_print_date($productFournLog['datec'], 'dayhour', 'tzuser').''; - $out.= ''.price($productFournLog['price']).''; - //$out.= ''.$productFournLog['quantity'].''; + $out.= ''.dol_print_date($productFournLog['datec'], 'dayhour', 'tzuser').''; + $out.= ''.price($productFournLog['price']).''; + //$out.= ''.$productFournLog['quantity'].''; $out.= ''.$productFournLog['lastname'].''; } $out .= ''; From 9af5aa8eaacfa1ba86cbd03201ddffcf7b48bdb2 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 19 Mar 2019 13:41:55 +0100 Subject: [PATCH 8/9] update with html5 compliant code --- dev/tools/test/testdiv.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dev/tools/test/testdiv.php b/dev/tools/test/testdiv.php index b529af4eb60..438df80b69e 100644 --- a/dev/tools/test/testdiv.php +++ b/dev/tools/test/testdiv.php @@ -21,14 +21,14 @@
-