From 2dbeeedd145e72158466e9da78141d8aba4f4565 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Sat, 24 Sep 2016 06:48:40 +0200 Subject: [PATCH 1/3] Move tab menu for subscription in member.lib Move all pages for subscription member in adherent/subscription (Card / Info / List) Rename llx_cotisation in llx_subscription Rename all db field cotisation in subscription Rename class Cotisation in class Subscription --- htdocs/adherents/admin/index.html | 0 htdocs/adherents/canvas/default/index.html | 0 htdocs/adherents/card.php | 12 +-- htdocs/adherents/class/adherent.class.php | 60 +++++++------- .../adherents/class/adherent_type.class.php | 10 +-- .../adherents/class/adherentstats.class.php | 12 +-- ...ation.class.php => subscription.class.php} | 43 +++++----- htdocs/adherents/index.php | 50 ++++++------ htdocs/adherents/list.php | 6 +- htdocs/adherents/stats/index.html | 0 ...ard_subscriptions.php => subscription.php} | 78 +++++++++---------- .../card.php} | 60 ++++---------- htdocs/adherents/subscription/index.html | 0 .../info.php} | 31 +++----- .../list.php} | 28 +++---- htdocs/adherents/type.php | 44 +++++------ htdocs/core/boxes/box_members.php | 4 +- htdocs/core/class/commonobject.class.php | 2 +- htdocs/core/class/conf.class.php | 4 +- htdocs/core/lib/member.lib.php | 52 ++++++++++--- htdocs/core/menus/init_menu_auguria.sql | 2 +- htdocs/core/menus/standard/eldy.lib.php | 2 +- htdocs/core/modules/modAdherent.class.php | 14 ++-- .../install/mysql/migration/4.0.0-5.0.0.sql | 5 ++ htdocs/install/mysql/migration/repair.sql | 2 +- .../mysql/tables/llx_adherent_type.sql | 2 +- ...ation.key.sql => llx_subscription.key.sql} | 2 +- ...lx_cotisation.sql => llx_subscription.sql} | 4 +- htdocs/install/pgsql/functions/functions.sql | 2 +- htdocs/public/members/public_list.php | 2 +- htdocs/public/paybox/newpayment.php | 4 +- htdocs/public/paypal/newpayment.php | 4 +- htdocs/societe/societecontact.php | 6 +- 33 files changed, 273 insertions(+), 274 deletions(-) create mode 100644 htdocs/adherents/admin/index.html create mode 100644 htdocs/adherents/canvas/default/index.html rename htdocs/adherents/class/{cotisation.class.php => subscription.class.php} (84%) create mode 100644 htdocs/adherents/stats/index.html rename htdocs/adherents/{card_subscriptions.php => subscription.php} (94%) rename htdocs/adherents/{fiche_subscription.php => subscription/card.php} (87%) create mode 100644 htdocs/adherents/subscription/index.html rename htdocs/adherents/{info_subscription.php => subscription/info.php} (67%) rename htdocs/adherents/{cotisations.php => subscription/list.php} (93%) rename htdocs/install/mysql/tables/{llx_cotisation.key.sql => llx_subscription.key.sql} (91%) rename htdocs/install/mysql/tables/{llx_cotisation.sql => llx_subscription.sql} (95%) diff --git a/htdocs/adherents/admin/index.html b/htdocs/adherents/admin/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/adherents/canvas/default/index.html b/htdocs/adherents/canvas/default/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index ba1a06c9f17..05a6772163e 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php'; -require_once DOL_DOCUMENT_ROOT.'/adherents/class/cotisation.class.php'; +require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -47,7 +47,7 @@ $langs->load("users"); $langs->load('other'); $action=GETPOST('action','alpha'); -$cancel=GETPOST('cancel'); +$cancel=GETPOST('cancel','alpha'); $backtopage=GETPOST('backtopage','alpha'); $confirm=GETPOST('confirm','alpha'); $rowid=GETPOST('rowid','int'); @@ -424,10 +424,10 @@ if (empty($reshook)) { $birthdate=dol_mktime(12, 0, 0, $_POST["birthmonth"], $_POST["birthday"], $_POST["birthyear"]); } - $datecotisation=''; + $datesubscription=''; if (isset($_POST["reday"]) && isset($_POST["remonth"]) && isset($_POST["reyear"])) { - $datecotisation=dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); + $datesubscription=dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); } $typeid=$_POST["typeid"]; @@ -451,7 +451,7 @@ if (empty($reshook)) $photo=$_POST["photo"]; //$comment=$_POST["comment"]; $morphy=$_POST["morphy"]; - $cotisation=$_POST["cotisation"]; + $subscription=$_POST["subscription"]; $public=$_POST["public"]; $userid=$_POST["userid"]; @@ -1497,7 +1497,7 @@ else } else { - if (! $adht->cotisation) + if (! $adht->subscription) { print $langs->trans("SubscriptionNotRecorded"); if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // displays delay Pictogram only if not a draft and not terminated diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 5c950b06e13..b55a33f71f2 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -5,11 +5,11 @@ * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2009-2012 Regis Houssin - * Copyright (C) 2014-2015 Alexandre Spangaro - * Copyright (C) 2015 Marcos García - * Copyright (C) 2015 Frederic France - * Copyright (C) 2015 Raphaël Doursenaud - * Copyright (C) 2016 Juanjo Menent + * Copyright (C) 2014-2016 Alexandre Spangaro + * Copyright (C) 2015 Marcos García + * Copyright (C) 2015 Frederic France + * Copyright (C) 2015 Raphaël Doursenaud + * Copyright (C) 2016 Juanjo Menent * * 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 @@ -643,7 +643,7 @@ class Adherent extends CommonObject // Search for last subscription id and end date $sql = "SELECT rowid, datec as dateop, dateadh as datedeb, datef as datefin"; - $sql.= " FROM ".MAIN_DB_PREFIX."cotisation"; + $sql.= " FROM ".MAIN_DB_PREFIX."subscription"; $sql.= " WHERE fk_adherent='".$this->id."'"; $sql.= " ORDER by dateadh DESC"; // Sort by start subscription date @@ -717,10 +717,10 @@ class Adherent extends CommonObject } - // Remove cotisation + // Remove subscription if (! $error) { - $sql = "DELETE FROM ".MAIN_DB_PREFIX."cotisation WHERE fk_adherent = ".$rowid; + $sql = "DELETE FROM ".MAIN_DB_PREFIX."subscription WHERE fk_adherent = ".$rowid; dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) @@ -1072,7 +1072,7 @@ class Adherent extends CommonObject $sql.= " d.state_id,"; $sql.= " c.rowid as country_id, c.code as country_code, c.label as country,"; $sql.= " dep.nom as state, dep.code_departement as state_code,"; - $sql.= " t.libelle as type, t.cotisation as cotisation,"; + $sql.= " t.libelle as type, t.subscription as subscription,"; $sql.= " u.rowid as user_id, u.login as user_login"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent_type as t, ".MAIN_DB_PREFIX."adherent as d"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON d.country = c.rowid"; @@ -1150,7 +1150,7 @@ class Adherent extends CommonObject $this->typeid = $obj->fk_adherent_type; $this->type = $obj->type; - $this->need_subscription = ($obj->cotisation=='yes'?1:0); + $this->need_subscription = ($obj->subscription=='yes'?1:0); $this->user_id = $obj->user_id; $this->user_login = $obj->user_login; @@ -1193,14 +1193,14 @@ class Adherent extends CommonObject { global $langs; - require_once DOL_DOCUMENT_ROOT.'/adherents/class/cotisation.class.php'; + require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php'; - $sql = "SELECT c.rowid, c.fk_adherent, c.cotisation, c.note, c.fk_bank,"; + $sql = "SELECT c.rowid, c.fk_adherent, c.subscription, c.note, c.fk_bank,"; $sql.= " c.tms as datem,"; $sql.= " c.datec as datec,"; $sql.= " c.dateadh as dateh,"; $sql.= " c.datef as datef"; - $sql.= " FROM ".MAIN_DB_PREFIX."cotisation as c"; + $sql.= " FROM ".MAIN_DB_PREFIX."subscription as c"; $sql.= " WHERE c.fk_adherent = ".$this->id; $sql.= " ORDER BY c.dateadh"; dol_syslog(get_class($this)."::fetch_subscriptions", LOG_DEBUG); @@ -1216,15 +1216,15 @@ class Adherent extends CommonObject if ($i==0) { $this->first_subscription_date=$obj->dateh; - $this->first_subscription_amount=$obj->cotisation; + $this->first_subscription_amount=$obj->subscription; } $this->last_subscription_date=$obj->dateh; - $this->last_subscription_amount=$obj->cotisation; + $this->last_subscription_amount=$obj->subscription; - $subscription=new Cotisation($this->db); + $subscription=new Subscription($this->db); $subscription->id=$obj->rowid; $subscription->fk_adherent=$obj->fk_adherent; - $subscription->amount=$obj->cotisation; + $subscription->amount=$obj->subscription; $subscription->note=$obj->note; $subscription->fk_bank=$obj->fk_bank; $subscription->datem=$this->db->jdate($obj->datem); @@ -1260,11 +1260,11 @@ class Adherent extends CommonObject * @param int $datesubend Date end subscription * @return int rowid of record added, <0 if KO */ - function cotisation($date, $montant, $accountid=0, $operation='', $label='', $num_chq='', $emetteur_nom='', $emetteur_banque='', $datesubend=0) + function subscription($date, $montant, $accountid=0, $operation='', $label='', $num_chq='', $emetteur_nom='', $emetteur_banque='', $datesubend=0) { global $conf,$langs,$user; - require_once DOL_DOCUMENT_ROOT.'/adherents/class/cotisation.class.php'; + require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php'; $error=0; @@ -1285,14 +1285,14 @@ class Adherent extends CommonObject } // Create subscription - $cotisation=new Cotisation($this->db); - $cotisation->fk_adherent=$this->id; - $cotisation->dateh=$date; // Date of new subscription - $cotisation->datef=$datefin; // End data of new subscription - $cotisation->amount=$montant; - $cotisation->note=$label; + $subscription=new Subscription($this->db); + $subscription->fk_adherent=$this->id; + $subscription->dateh=$date; // Date of new subscription + $subscription->datef=$datefin; // End data of new subscription + $subscription->amount=$montant; + $subscription->note=$label; - $rowid=$cotisation->create($user); + $rowid=$subscription->create($user); if ($rowid > 0) { // Update denormalized subscription end date (read database subscription to find values) @@ -1325,7 +1325,7 @@ class Adherent extends CommonObject } else { - $this->error=$cotisation->error; + $this->error=$subscription->error; $this->db->rollback(); return -1; } @@ -1587,7 +1587,7 @@ class Adherent extends CommonObject } if ($option == 'subscription') { - $link = ''; } @@ -1753,7 +1753,7 @@ class Adherent extends CommonObject $langs->load("members"); $response = new WorkboardResponse(); - $response->warning_delay=$conf->adherent->cotisation->warning_delay/60/60/24; + $response->warning_delay=$conf->adherent->subscription->warning_delay/60/60/24; $response->label=$langs->trans("MembersWithSubscriptionToReceive"); $response->url=DOL_URL_ROOT.'/adherents/list.php?mainmenu=members&statut=1&filter=outofdate'; $response->img=img_object($langs->trans("Members"),"user"); @@ -2039,7 +2039,7 @@ class Adherent extends CommonObject $now = dol_now(); - return $this->datefin < ($now - $conf->adherent->cotisation->warning_delay); + return $this->datefin < ($now - $conf->adherent->subscription->warning_delay); } } diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php index 71f41d84e00..6281177505f 100644 --- a/htdocs/adherents/class/adherent_type.class.php +++ b/htdocs/adherents/class/adherent_type.class.php @@ -2,7 +2,7 @@ /* Copyright (C) 2002 Rodolphe Quiedeville * Copyright (C) 2004-2008 Laurent Destailleur * Copyright (C) 2009 Regis Houssin - * Copyright (C) 2016 Charlie Benke + * Copyright (C) 2016 Charlie Benke * * 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 @@ -39,7 +39,7 @@ class AdherentType extends CommonObject var $id; var $ref; var $libelle; - var $cotisation; // Soumis a la cotisation + var $subscription; // Soumis a la cotisation var $note; var $vote; // droit de vote var $mail_valid; //mail envoye lors de la validation @@ -111,7 +111,7 @@ class AdherentType extends CommonObject $sql.= "SET "; $sql.= "statut = ".$this->statut.","; $sql.= "libelle = '".$this->db->escape($this->libelle) ."',"; - $sql.= "cotisation = '".$this->cotisation."',"; + $sql.= "subscription = '".$this->subscription."',"; $sql.= "note = '".$this->db->escape($this->note)."',"; $sql.= "vote = '".$this->vote."',"; $sql.= "mail_valid = '".$this->db->escape($this->mail_valid)."'"; @@ -188,7 +188,7 @@ class AdherentType extends CommonObject */ function fetch($rowid) { - $sql = "SELECT d.rowid, d.libelle, d.statut, d.cotisation, d.mail_valid, d.note, d.vote"; + $sql = "SELECT d.rowid, d.libelle, d.statut, d.subscription, d.mail_valid, d.note, d.vote"; $sql .= " FROM ".MAIN_DB_PREFIX."adherent_type as d"; $sql .= " WHERE d.rowid = ".$rowid; @@ -205,7 +205,7 @@ class AdherentType extends CommonObject $this->ref = $obj->rowid; $this->libelle = $obj->libelle; $this->statut = $obj->statut; - $this->cotisation = $obj->cotisation; + $this->subscription = $obj->subscription; $this->mail_valid = $obj->mail_valid; $this->note = $obj->note; $this->vote = $obj->vote; diff --git a/htdocs/adherents/class/adherentstats.class.php b/htdocs/adherents/class/adherentstats.class.php index d3f72d2ea5d..97a4c8201a7 100644 --- a/htdocs/adherents/class/adherentstats.class.php +++ b/htdocs/adherents/class/adherentstats.class.php @@ -24,7 +24,7 @@ */ include_once DOL_DOCUMENT_ROOT . '/core/class/stats.class.php'; -include_once DOL_DOCUMENT_ROOT . '/adherents/class/cotisation.class.php'; +include_once DOL_DOCUMENT_ROOT . '/adherents/class/subscription.class.php'; /** @@ -57,12 +57,12 @@ class AdherentStats extends Stats $this->socid = $socid; $this->userid = $userid; - $object=new Cotisation($this->db); + $object=new Subscription($this->db); $this->from = MAIN_DB_PREFIX.$object->table_element." as p"; $this->from.= ", ".MAIN_DB_PREFIX."adherent as m"; - $this->field='cotisation'; + $this->field='subscription'; $this->where.= " m.statut != 0"; $this->where.= " AND p.fk_adherent = m.rowid AND m.entity IN (".getEntity('adherent', 1).")"; @@ -76,7 +76,7 @@ class AdherentStats extends Stats /** - * Renvoie le nombre de proposition par mois pour une annee donnee + * Return the number of proposition by month for a given year * * @param int $year Year * @return array Array of nb each month @@ -97,7 +97,7 @@ class AdherentStats extends Stats } /** - * Renvoie le nombre de cotisation par annee + * Return the number of subscriptions by year * * @return array Array of nb each year */ @@ -116,7 +116,7 @@ class AdherentStats extends Stats } /** - * Renvoie le nombre de cotisation par mois pour une annee donnee + * Return the number of subscriptions by month for a given year * * @param int $year Year * @return array Array of amount each month diff --git a/htdocs/adherents/class/cotisation.class.php b/htdocs/adherents/class/subscription.class.php similarity index 84% rename from htdocs/adherents/class/cotisation.class.php rename to htdocs/adherents/class/subscription.class.php index 9fe26727c25..a01db4308d9 100644 --- a/htdocs/adherents/class/cotisation.class.php +++ b/htdocs/adherents/class/subscription.class.php @@ -17,9 +17,9 @@ */ /** - * \file htdocs/adherents/class/cotisation.class.php - * \ingroup member - * \brief File of class to manage subscriptions of foundation members + * \file htdocs/adherents/class/subscription.class.php + * \ingroup member + * \brief File of class to manage subscriptions of foundation members */ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; @@ -28,10 +28,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; /** * Class to manage subscriptions of foundation members */ -class Cotisation extends CommonObject +class Subscription extends CommonObject { public $element='subscription'; - public $table_element='cotisation'; + public $table_element='subscription'; var $datec; // Date creation var $datem; // Date modification @@ -54,7 +54,7 @@ class Cotisation extends CommonObject /** - * Fonction qui permet de creer la cotisation + * Function who permitted cretaion of the subscription * * @param int $userid userid de celui qui insere * @return int <0 if KO, Id subscription created if OK @@ -72,17 +72,18 @@ class Cotisation extends CommonObject return -1; } - $sql = "INSERT INTO ".MAIN_DB_PREFIX."cotisation (fk_adherent, datec, dateadh, datef, cotisation, note)"; + $sql = "INSERT INTO ".MAIN_DB_PREFIX."subscription (fk_adherent, datec, dateadh, datef, subscription, note)"; $sql.= " VALUES (".$this->fk_adherent.", '".$this->db->idate($now)."',"; $sql.= " '".$this->db->idate($this->dateh)."',"; $sql.= " '".$this->db->idate($this->datef)."',"; - $sql.= " ".$this->amount.",'".$this->db->escape($this->note)."')"; + $sql.= " ".$this->amount.","; + $sql.= " '".$this->db->escape($this->note)."')"; dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { - return $this->db->last_insert_id(MAIN_DB_PREFIX."cotisation"); + return $this->db->last_insert_id(MAIN_DB_PREFIX."subscription"); } else { @@ -104,8 +105,8 @@ class Cotisation extends CommonObject $sql.=" tms,"; $sql.=" dateadh as dateh,"; $sql.=" datef,"; - $sql.=" cotisation, note, fk_bank"; - $sql.=" FROM ".MAIN_DB_PREFIX."cotisation"; + $sql.=" subscription, note, fk_bank"; + $sql.=" FROM ".MAIN_DB_PREFIX."subscription"; $sql.=" WHERE rowid=".$rowid; dol_syslog(get_class($this)."::fetch", LOG_DEBUG); @@ -124,7 +125,7 @@ class Cotisation extends CommonObject $this->datem = $this->db->jdate($obj->tms); $this->dateh = $this->db->jdate($obj->dateh); $this->datef = $this->db->jdate($obj->datef); - $this->amount = $obj->cotisation; + $this->amount = $obj->subscription; $this->note = $obj->note; $this->fk_bank = $obj->fk_bank; return 1; @@ -143,20 +144,20 @@ class Cotisation extends CommonObject /** - * Met a jour en base la cotisation + * Update subscription * - * @param User $user Objet user qui met a jour - * @param int $notrigger 0=Desactive les triggers + * @param User $user User who updated + * @param int $notrigger 0=Disable triggers * @return int <0 if KO, >0 if OK */ function update($user,$notrigger=0) { $this->db->begin(); - $sql = "UPDATE ".MAIN_DB_PREFIX."cotisation SET "; + $sql = "UPDATE ".MAIN_DB_PREFIX."subscription SET "; $sql .= " fk_adherent = ".$this->fk_adherent.","; $sql .= " note=".($this->note ? "'".$this->db->escape($this->note)."'" : 'null').","; - $sql .= " cotisation = '".price2num($this->amount)."',"; + $sql .= " subscription = '".price2num($this->amount)."',"; $sql .= " dateadh='".$this->db->idate($this->dateh)."',"; $sql .= " datef='".$this->db->idate($this->datef)."',"; $sql .= " datec='".$this->db->idate($this->datec)."',"; @@ -201,7 +202,7 @@ class Cotisation extends CommonObject $this->db->begin(); - $sql = "DELETE FROM ".MAIN_DB_PREFIX."cotisation WHERE rowid = ".$this->id; + $sql = "DELETE FROM ".MAIN_DB_PREFIX."subscription WHERE rowid = ".$this->id; dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) @@ -263,7 +264,7 @@ class Cotisation extends CommonObject $result=''; $label=$langs->trans("ShowSubscription").': '.$this->ref; - $link = ''; + $link = ''; $linkend=''; $picto='payment'; @@ -276,7 +277,7 @@ class Cotisation extends CommonObject /** - * Charge les informations d'ordre info dans l'objet cotisation + * Load information of the subscription object * * @param int $id Id subscription * @return void @@ -285,7 +286,7 @@ class Cotisation extends CommonObject { $sql = 'SELECT c.rowid, c.datec,'; $sql.= ' c.tms as datem'; - $sql.= ' FROM '.MAIN_DB_PREFIX.'cotisation as c'; + $sql.= ' FROM '.MAIN_DB_PREFIX.'subscription as c'; $sql.= ' WHERE c.rowid = '.$id; $result=$this->db->query($sql); diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php index 8515dc1d2c8..af259296c37 100644 --- a/htdocs/adherents/index.php +++ b/htdocs/adherents/index.php @@ -27,7 +27,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php'; -require_once DOL_DOCUMENT_ROOT.'/adherents/class/cotisation.class.php'; +require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php'; $langs->load("companies"); $langs->load("members"); @@ -44,7 +44,7 @@ llxHeader('',$langs->trans("Members"),'EN:Module_Foundations|FR:Module_Adh&eacut $staticmember=new Adherent($db); $statictype=new AdherentType($db); -$subscriptionstatic=new Cotisation($db); +$subscriptionstatic=new Subscription($db); print load_fiche_titre($langs->trans("MembersArea")); @@ -59,14 +59,14 @@ $AdherentsResilies=array(); $AdherentType=array(); // Liste les adherents -$sql = "SELECT t.rowid, t.libelle, t.cotisation,"; +$sql = "SELECT t.rowid, t.libelle, t.subscription,"; $sql.= " d.statut, count(d.rowid) as somme"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent_type as t"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."adherent as d"; $sql.= " ON t.rowid = d.fk_adherent_type"; $sql.= " AND d.entity IN (".getEntity().")"; $sql.= " WHERE t.entity IN (".getEntity().")"; -$sql.= " GROUP BY t.rowid, t.libelle, t.cotisation, d.statut"; +$sql.= " GROUP BY t.rowid, t.libelle, t.subscription, d.statut"; dol_syslog("index.php::select nb of members by type", LOG_DEBUG); $result = $db->query($sql); @@ -80,7 +80,7 @@ if ($result) $adhtype=new AdherentType($db); $adhtype->id=$objp->rowid; - $adhtype->cotisation=$objp->cotisation; + $adhtype->subscription=$objp->subscription; $adhtype->libelle=$objp->libelle; $AdherentType[$objp->rowid]=$adhtype; @@ -101,7 +101,7 @@ $now=dol_now(); $sql = "SELECT count(*) as somme , d.fk_adherent_type"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."adherent_type as t"; $sql.= " WHERE d.entity IN (".getEntity().")"; -//$sql.= " AND d.statut = 1 AND ((t.cotisation = 0 AND d.datefin IS NULL) OR d.datefin >= '".$db->idate($now)."')"; +//$sql.= " AND d.statut = 1 AND ((t.subscription = 0 AND d.datefin IS NULL) OR d.datefin >= '".$db->idate($now)."')"; $sql.= " AND d.statut = 1 AND d.datefin >= '".$db->idate($now)."'"; $sql.= " AND t.rowid = d.fk_adherent_type"; $sql.= " GROUP BY d.fk_adherent_type"; @@ -212,7 +212,7 @@ $max=5; $sql = "SELECT a.rowid, a.statut, a.lastname, a.firstname, a.societe as company, a.fk_soc,"; $sql.= " a.tms as datem, datefin as date_end_subscription,"; -$sql.= " ta.rowid as typeid, ta.libelle, ta.cotisation"; +$sql.= " ta.rowid as typeid, ta.libelle, ta.subscription"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."adherent_type as ta"; $sql.= " WHERE a.entity IN (".getEntity().")"; $sql.= " AND a.fk_adherent_type = ta.rowid"; @@ -255,7 +255,7 @@ if ($resql) print ''.$staticmember->getNomUrl(1,32).''; print ''.$statictype->getNomUrl(1,32).''; print ''.dol_print_date($db->jdate($obj->datem),'dayhour').''; - print ''.$staticmember->LibStatut($obj->statut,($obj->cotisation=='yes'?1:0),$db->jdate($obj->date_end_subscription),5).''; + print ''.$staticmember->LibStatut($obj->statut,($obj->subscription=='yes'?1:0),$db->jdate($obj->date_end_subscription),5).''; print ''; $i++; } @@ -275,8 +275,8 @@ $max=5; $sql = "SELECT a.rowid, a.statut, a.lastname, a.firstname, a.societe as company, a.fk_soc,"; $sql.= " datefin as date_end_subscription,"; -$sql.= " c.rowid as cid, c.tms as datem, c.datec as datec, c.dateadh as date_start, c.datef as date_end, c.cotisation"; -$sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."cotisation as c"; +$sql.= " c.rowid as cid, c.tms as datem, c.datec as datec, c.dateadh as date_start, c.datef as date_end, c.subscription"; +$sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."subscription as c"; $sql.= " WHERE a.entity IN (".getEntity().")"; $sql.= " AND c.fk_adherent = a.rowid"; $sql.= $db->order("c.tms","DESC"); @@ -315,8 +315,8 @@ if ($resql) print ''.$subscriptionstatic->getNomUrl(1).''; print ''.$staticmember->getNomUrl(1,32,'subscription').''; print ''.get_date_range($db->jdate($obj->date_start),$db->jdate($obj->date_end)).''; - print ''.price($obj->cotisation).''; - //print ''.$staticmember->LibStatut($obj->statut,($obj->cotisation=='yes'?1:0),$db->jdate($obj->date_end_subscription),5).''; + print ''.price($obj->subscription).''; + //print ''.$staticmember->LibStatut($obj->statut,($obj->subscription=='yes'?1:0),$db->jdate($obj->date_end_subscription),5).''; print ''.dol_print_date($db->jdate($obj->datem?$obj->datem:$obj->datec),'dayhour').''; print ''; $i++; @@ -345,18 +345,18 @@ foreach ($AdherentType as $key => $adhtype) $var=!$var; print ""; print ''.$adhtype->getNomUrl(1, dol_size(32)).''; - print ''.(isset($MemberToValidate[$key]) && $MemberToValidate[$key] > 0?$MemberToValidate[$key]:'').' '.$staticmember->LibStatut(-1,$adhtype->cotisation,0,3).''; - print ''.(isset($MembersValidated[$key]) && ($MembersValidated[$key]-(isset($MemberUpToDate[$key])?$MemberUpToDate[$key]:0) > 0) ? $MembersValidated[$key]-(isset($MemberUpToDate[$key])?$MemberUpToDate[$key]:0):'').' '.$staticmember->LibStatut(1,$adhtype->cotisation,0,3).''; - print ''.(isset($MemberUpToDate[$key]) && $MemberUpToDate[$key] > 0 ? $MemberUpToDate[$key]:'').' '.$staticmember->LibStatut(1,$adhtype->cotisation,$now,3).''; - print ''.(isset($MembersResiliated[$key]) && $MembersResiliated[$key]> 0 ?$MembersResiliated[$key]:'').' '.$staticmember->LibStatut(0,$adhtype->cotisation,0,3).''; + print ''.(isset($MemberToValidate[$key]) && $MemberToValidate[$key] > 0?$MemberToValidate[$key]:'').' '.$staticmember->LibStatut(-1,$adhtype->subscription,0,3).''; + print ''.(isset($MembersValidated[$key]) && ($MembersValidated[$key]-(isset($MemberUpToDate[$key])?$MemberUpToDate[$key]:0) > 0) ? $MembersValidated[$key]-(isset($MemberUpToDate[$key])?$MemberUpToDate[$key]:0):'').' '.$staticmember->LibStatut(1,$adhtype->subscription,0,3).''; + print ''.(isset($MemberUpToDate[$key]) && $MemberUpToDate[$key] > 0 ? $MemberUpToDate[$key]:'').' '.$staticmember->LibStatut(1,$adhtype->subscription,$now,3).''; + print ''.(isset($MembersResiliated[$key]) && $MembersResiliated[$key]> 0 ?$MembersResiliated[$key]:'').' '.$staticmember->LibStatut(0,$adhtype->subscription,0,3).''; print "\n"; } print ''; print ''.$langs->trans("Total").''; -print ''.$SommeA.' '.$staticmember->LibStatut(-1,$adhtype->cotisation,0,3).''; -print ''.$SommeB.' '.$staticmember->LibStatut(1,$adhtype->cotisation,0,3).''; -print ''.$SommeC.' '.$staticmember->LibStatut(1,$adhtype->cotisation,$now,3).''; -print ''.$SommeD.' '.$staticmember->LibStatut(0,$adhtype->cotisation,0,3).''; +print ''.$SommeA.' '.$staticmember->LibStatut(-1,$adhtype->subscription,0,3).''; +print ''.$SommeB.' '.$staticmember->LibStatut(1,$adhtype->subscription,0,3).''; +print ''.$SommeC.' '.$staticmember->LibStatut(1,$adhtype->subscription,$now,3).''; +print ''.$SommeD.' '.$staticmember->LibStatut(0,$adhtype->subscription,0,3).''; print ''; print "\n"; @@ -369,8 +369,8 @@ $Number=array(); $tot=0; $numb=0; -$sql = "SELECT c.cotisation, c.dateadh as dateh"; -$sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."cotisation as c"; +$sql = "SELECT c.subscription, c.dateadh as dateh"; +$sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."subscription as c"; $sql.= " WHERE d.entity IN (".getEntity().")"; $sql.= " AND d.rowid = c.fk_adherent"; if(isset($date_select) && $date_select != '') @@ -386,9 +386,9 @@ if ($result) { $objp = $db->fetch_object($result); $year=dol_print_date($db->jdate($objp->dateh),"%Y"); - $Total[$year]=(isset($Total[$year])?$Total[$year]:0)+$objp->cotisation; + $Total[$year]=(isset($Total[$year])?$Total[$year]:0)+$objp->subscription; $Number[$year]=(isset($Number[$year])?$Number[$year]:0)+1; - $tot+=$objp->cotisation; + $tot+=$objp->subscription; $numb+=1; $i++; } @@ -408,7 +408,7 @@ foreach ($Total as $key=>$value) { $var=!$var; print ""; - print "$key"; + print "$key"; print "".$Number[$key].""; print "".price($value).""; print "".price(price2num($value/$Number[$key],'MT')).""; diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index 2297b155634..d3e7e96a793 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -187,7 +187,7 @@ $sql = "SELECT d.rowid, d.login, d.lastname, d.firstname, d.societe as company, $sql.= " d.datefin, d.address, d.zip, d.town, d.state_id, d.country,"; $sql.= " d.email, d.phone, d.phone_perso, d.phone_mobile, d.skype, d.birth, d.public, d.photo,"; $sql.= " d.fk_adherent_type as type_id, d.morphy, d.statut, d.datec as date_creation, d.tms as date_update,"; -$sql.= " t.libelle as type, t.cotisation,"; +$sql.= " t.libelle as type, t.subscription,"; $sql.= " state.code_departement as state_code, state.nom as state_name"; // Add fields for extrafields foreach ($extrafields->attribute_list as $key => $val) $sql.=",ef.".$key.' as options_'.$key; @@ -736,7 +736,7 @@ if ($resql) else { print ''; - if ($obj->cotisation == 'yes') + if ($obj->subscription == 'yes') { print $langs->trans("SubscriptionNotReceived"); if ($obj->statut > 0) print " ".img_warning(); @@ -790,7 +790,7 @@ if ($resql) if (! empty($arrayfields['d.statut']['checked'])) { print ''; - print $memberstatic->LibStatut($obj->statut,$obj->cotisation,$datefin,2); + print $memberstatic->LibStatut($obj->statut,$obj->subscription,$datefin,2); print ''; if (! $i) $totalarray['nbfield']++; } diff --git a/htdocs/adherents/stats/index.html b/htdocs/adherents/stats/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/adherents/card_subscriptions.php b/htdocs/adherents/subscription.php similarity index 94% rename from htdocs/adherents/card_subscriptions.php rename to htdocs/adherents/subscription.php index 838ba49c6a9..8c1f371c90a 100644 --- a/htdocs/adherents/card_subscriptions.php +++ b/htdocs/adherents/subscription.php @@ -3,7 +3,7 @@ * Copyright (C) 2002-2003 Jean-Louis Bergamo * Copyright (C) 2004-2014 Laurent Destailleur * Copyright (C) 2012 Regis Houssin - * Copyright (C) 2015-2016 Alexandre Spangaro + * Copyright (C) 2015-2016 Alexandre Spangaro * * 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 @@ -20,7 +20,7 @@ */ /** - * \file htdocs/adherents/card_subscriptions.php + * \file htdocs/adherents/subscription.php * \ingroup member * \brief Onglet d'ajout, edition, suppression des adhesions d'un adherent */ @@ -30,7 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php'; -require_once DOL_DOCUMENT_ROOT.'/adherents/class/cotisation.class.php'; +require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -186,7 +186,7 @@ if ($action == 'setsocid') } } -if ($user->rights->adherent->cotisation->creer && $action == 'cotisation' && ! $_POST["cancel"]) +if ($user->rights->adherent->cotisation->creer && $action == 'subscription' && ! $_POST["cancel"]) { $error=0; @@ -196,12 +196,12 @@ if ($user->rights->adherent->cotisation->creer && $action == 'cotisation' && ! $ $result=$adht->fetch($object->typeid); // Subscription informations - $datecotisation=0; + $datesubscription=0; $datesubend=0; $paymentdate=0; if ($_POST["reyear"] && $_POST["remonth"] && $_POST["reday"]) { - $datecotisation=dol_mktime(0, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); + $datesubscription=dol_mktime(0, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); } if ($_POST["endyear"] && $_POST["endmonth"] && $_POST["endday"]) { @@ -211,7 +211,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'cotisation' && ! $ { $paymentdate=dol_mktime(0, 0, 0, $_POST["paymentmonth"], $_POST["paymentday"], $_POST["paymentyear"]); } - $cotisation=$_POST["cotisation"]; // Amount of subscription + $subscription=$_POST["subscription"]; // Amount of subscription $label=$_POST["label"]; // Payment informations @@ -224,7 +224,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'cotisation' && ! $ if (empty($option)) $option='none'; // Check parameters - if (! $datecotisation) + if (! $datesubscription) { $error++; $langs->load("errors"); @@ -240,7 +240,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'cotisation' && ! $ } if (! $datesubend) { - $datesubend=dol_time_plus_duree(dol_time_plus_duree($datecotisation,$defaultdelay,$defaultdelayunit),-1,'d'); + $datesubend=dol_time_plus_duree(dol_time_plus_duree($datesubscription,$defaultdelay,$defaultdelayunit),-1,'d'); } if (($option == 'bankviainvoice' || $option == 'bankdirect') && ! $paymentdate) { @@ -250,9 +250,9 @@ if ($user->rights->adherent->cotisation->creer && $action == 'cotisation' && ! $ } // Check if a payment is mandatory or not - if (! $error && $adht->cotisation) // Type adherent soumis a cotisation + if (! $error && $adht->subscription) // Type adherent soumis a cotisation { - if (! is_numeric($_POST["cotisation"])) + if (! is_numeric($_POST["subscription"])) { // If field is '' or not a numeric value $errmsg=$langs->trans("ErrorFieldRequired",$langs->transnoentities("Amount")); @@ -263,7 +263,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'cotisation' && ! $ { if (! empty($conf->banque->enabled) && $_POST["paymentsave"] != 'none') { - if ($_POST["cotisation"]) + if ($_POST["subscription"]) { if (! $_POST["label"]) $errmsg=$langs->trans("ErrorFieldRequired",$langs->transnoentities("Label")); if ($_POST["paymentsave"] != 'invoiceonly' && ! $_POST["operation"]) $errmsg=$langs->trans("ErrorFieldRequired",$langs->transnoentities("PaymentMode")); @@ -278,12 +278,12 @@ if ($user->rights->adherent->cotisation->creer && $action == 'cotisation' && ! $ } } - if (! $error && $action=='cotisation') + if (! $error && $action=='subscription') { $db->begin(); // Create subscription - $crowid=$object->cotisation($datecotisation, $cotisation, $accountid, $operation, $label, $num_chq, $emetteur_nom, $emetteur_banque, $datesubend); + $crowid=$object->subscription($datesubscription, $subscription, $accountid, $operation, $label, $num_chq, $emetteur_nom, $emetteur_banque, $datesubend); if ($crowid <= 0) { $error++; @@ -293,7 +293,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'cotisation' && ! $ if (! $error) { - // Insert into bank account directlty (if option choosed for) + link to llx_cotisation if option is 'bankdirect' + // Insert into bank account directlty (if option choosed for) + link to llx_subscription if option is 'bankdirect' if ($option == 'bankdirect' && $accountid) { require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; @@ -303,17 +303,17 @@ if ($user->rights->adherent->cotisation->creer && $action == 'cotisation' && ! $ $dateop=$paymentdate; - $insertid=$acct->addline($dateop, $operation, $label, $cotisation, $num_chq, '', $user, $emetteur_nom, $emetteur_banque); + $insertid=$acct->addline($dateop, $operation, $label, $subscription, $num_chq, '', $user, $emetteur_nom, $emetteur_banque); if ($insertid > 0) { $inserturlid=$acct->add_url_line($insertid, $object->id, DOL_URL_ROOT.'/adherents/card.php?rowid=', $object->getFullname($langs), 'member'); if ($inserturlid > 0) { - // Met a jour la table cotisation - $sql ="UPDATE ".MAIN_DB_PREFIX."cotisation SET fk_bank=".$insertid; + // Update table subscription + $sql ="UPDATE ".MAIN_DB_PREFIX."subscription SET fk_bank=".$insertid; $sql.=" WHERE rowid=".$crowid; - dol_syslog("card_subscriptions::cotisation", LOG_DEBUG); + dol_syslog("subscription::subscription", LOG_DEBUG); $resql = $db->query($sql); if (! $resql) { @@ -381,7 +381,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'cotisation' && ! $ } } $invoice->socid=$object->fk_soc; - $invoice->date=$datecotisation; + $invoice->date=$datesubscription; // Possibility to add external linked objects with hooks $invoice->linked_objects['subscription'] = $crowid; @@ -411,7 +411,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'cotisation' && ! $ $vattouse=get_default_tva($mysoc, $mysoc, $idprodsubscription); } //print xx".$vattouse." - ".$mysoc." - ".$customer;exit; - $result=$invoice->addline($label,0,1,$vattouse,0,0,$idprodsubscription,0,$datecotisation,$datesubend,0,0,'','TTC',$cotisation,1); + $result=$invoice->addline($label,0,1,$vattouse,0,0,$idprodsubscription,0,$datesubscription,$datesubend,0,0,'','TTC',$subscription,1); if ($result <= 0) { $errmsg=$invoice->error; @@ -438,7 +438,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'cotisation' && ! $ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php'; - $amounts[$invoice->id] = price2num($cotisation); + $amounts[$invoice->id] = price2num($subscription); $paiement = new Paiement($db); $paiement->datepaye = $paymentdate; $paiement->amounts = $amounts; @@ -474,7 +474,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'cotisation' && ! $ if (! $error) { // Update fk_bank into subscription table - $sql = 'UPDATE '.MAIN_DB_PREFIX.'cotisation SET fk_bank='.$bank_line_id; + $sql = 'UPDATE '.MAIN_DB_PREFIX.'subscription SET fk_bank='.$bank_line_id; $sql.= ' WHERE rowid='.$crowid; $result = $db->query($sql); @@ -538,7 +538,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'cotisation' && ! $ } } - $_POST["cotisation"]=''; + $_POST["subscription"]=''; $_POST["accountid"]=''; $_POST["operation"]=''; $_POST["label"]=''; @@ -665,7 +665,7 @@ if ($rowid > 0) } else { - if (! $adht->cotisation) + if (! $adht->subscription) { print $langs->trans("SubscriptionNotRecorded"); if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // Affiche picto retard uniquement si non brouillon et non resilie @@ -786,14 +786,14 @@ if ($rowid > 0) if ($action != 'addsubscription' && $action != 'create_thirdparty') { $sql = "SELECT d.rowid, d.firstname, d.lastname, d.societe,"; - $sql.= " c.rowid as crowid, c.cotisation,"; + $sql.= " c.rowid as crowid, c.subscription,"; $sql.= " c.datec,"; $sql.= " c.dateadh as dateh,"; $sql.= " c.datef,"; $sql.= " c.fk_bank,"; $sql.= " b.rowid as bid,"; $sql.= " ba.rowid as baid, ba.label, ba.bank"; - $sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."cotisation as c"; + $sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."subscription as c"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON c.fk_bank = b.rowid"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank_account as ba ON b.fk_account = ba.rowid"; $sql.= " WHERE d.rowid = c.fk_adherent AND d.rowid=".$rowid; @@ -801,7 +801,7 @@ if ($rowid > 0) $result = $db->query($sql); if ($result) { - $cotisationstatic=new Cotisation($db); + $subscriptionstatic=new Subscription($db); $accountstatic=new Account($db); $num = $db->num_rows($result); @@ -827,13 +827,13 @@ if ($rowid > 0) $objp = $db->fetch_object($result); $var=!$var; print ""; - $cotisationstatic->ref=$objp->crowid; - $cotisationstatic->id=$objp->crowid; - print ''.$cotisationstatic->getNomUrl(1).''; + $subscriptionstatic->ref=$objp->crowid; + $subscriptionstatic->id=$objp->crowid; + print ''.$subscriptionstatic->getNomUrl(1).''; print ''.dol_print_date($db->jdate($objp->datec),'dayhour')."\n"; print ''.dol_print_date($db->jdate($objp->dateh),'day')."\n"; print ''.dol_print_date($db->jdate($objp->datef),'day')."\n"; - print ''.price($objp->cotisation).''; + print ''.price($objp->subscription).''; if (! empty($conf->banque->enabled)) { print ''; @@ -954,9 +954,9 @@ if ($rowid > 0) } - print '
'; + print ''; print ''; - print ''; + print ''; print ''; print ''; print ''; @@ -995,7 +995,7 @@ if ($rowid > 0) $datefrom=$object->datevalid; } } - print $form->select_date($datefrom,'','','','',"cotisation",1,1,1); + print $form->select_date($datefrom,'','','','',"subscription",1,1,1); print ""; // Date end subscription @@ -1008,13 +1008,13 @@ if ($rowid > 0) $dateto=-1; // By default, no date is suggested } print ''.$langs->trans("DateEndSubscription").''; - print $form->select_date($dateto,'end','','','',"cotisation",1,0,1); + print $form->select_date($dateto,'end','','','',"subscription",1,0,1); print ""; - if ($adht->cotisation) + if ($adht->subscription) { // Amount - print ''.$langs->trans("Amount").' '.$langs->trans("Currency".$conf->currency).''; + print ''.$langs->trans("Amount").' '.$langs->trans("Currency".$conf->currency).''; // Label print ''.$langs->trans("Label").''; @@ -1109,7 +1109,7 @@ if ($rowid > 0) // Date of payment print ''.$langs->trans("DatePayment").''; - print $form->select_date(isset($paymentdate)?$paymentdate:-1,'payment',0,0,1,'cotisation',1,1,1); + print $form->select_date(isset($paymentdate)?$paymentdate:-1,'payment',0,0,1,'subscription',1,1,1); print "\n"; print ''.$langs->trans('Numero'); diff --git a/htdocs/adherents/fiche_subscription.php b/htdocs/adherents/subscription/card.php similarity index 87% rename from htdocs/adherents/fiche_subscription.php rename to htdocs/adherents/subscription/card.php index a0f9f09ff0b..fb762a24345 100644 --- a/htdocs/adherents/fiche_subscription.php +++ b/htdocs/adherents/subscription/card.php @@ -16,7 +16,7 @@ */ /** - * \file htdocs/adherents/fiche_subscription.php + * \file htdocs/adherents/subscription/card.php * \ingroup member * \brief Page to add/edit/remove a member subscription */ @@ -24,7 +24,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; -require_once DOL_DOCUMENT_ROOT.'/adherents/class/cotisation.class.php'; +require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $langs->load("companies"); @@ -33,7 +33,7 @@ $langs->load("members"); $langs->load("users"); $adh = new Adherent($db); -$object = new Cotisation($db); +$object = new Subscription($db); $errmsg=''; $action=GETPOST("action",'alpha'); @@ -109,7 +109,7 @@ if ($user->rights->adherent->cotisation->creer && $_REQUEST["action"] == 'update { $db->commit(); - header("Location: fiche_subscription.php?rowid=".$object->id); + header("Location: card.php?rowid=".$object->id); exit; } else @@ -172,28 +172,14 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit') { /******************************************** * - * Fiche en mode edition + * Subscription card in edit mode * ********************************************/ $object->fetch($rowid); $result=$adh->fetch($object->fk_adherent); - /* - * Affichage onglets - */ - $h = 0; - $head = array(); - - $head[$h][0] = DOL_URL_ROOT.'/adherents/fiche_subscription.php?rowid='.$object->id; - $head[$h][1] = $langs->trans("SubscriptionCard"); - $head[$h][2] = 'general'; - $h++; - - $head[$h][0] = DOL_URL_ROOT.'/adherents/info_subscription.php?rowid='.$object->id; - $head[$h][1] = $langs->trans("Info"); - $head[$h][2] = 'info'; - $h++; + $head = subscription_prepare_head($object); print ''; print ''; @@ -206,10 +192,10 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit') print "\n"; print ''; - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; // Ref - print ''; + print ''; print ''; @@ -276,30 +262,16 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit') if ($rowid && $action != 'edit') { - /* ************************************************************************** */ - /* */ - /* Mode affichage */ - /* */ - /* ************************************************************************** */ + /******************************************** + * + * Subscription card in view mode + * + ********************************************/ $result=$object->fetch($rowid); $result=$adh->fetch($object->fk_adherent); - /* - * Affichage onglets - */ - $h = 0; - $head = array(); - - $head[$h][0] = DOL_URL_ROOT.'/adherents/fiche_subscription.php?rowid='.$object->id; - $head[$h][1] = $langs->trans("SubscriptionCard"); - $head[$h][2] = 'general'; - $h++; - - $head[$h][0] = DOL_URL_ROOT.'/adherents/info_subscription.php?rowid='.$object->id; - $head[$h][1] = $langs->trans("Info"); - $head[$h][2] = 'info'; - $h++; + $head = subscription_prepare_head($object); dol_fiche_head($head, 'general', $langs->trans("Subscription"), '', 'payment'); @@ -317,10 +289,10 @@ if ($rowid && $action != 'edit') print ''; print '
'.$langs->trans("Ref").'
'.$langs->trans("Ref").''; print $form->showrefnav($object, 'rowid', $linkback, 1); print '
'; - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; // Ref - print ''; + print ''; print ''; diff --git a/htdocs/adherents/subscription/index.html b/htdocs/adherents/subscription/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/adherents/info_subscription.php b/htdocs/adherents/subscription/info.php similarity index 67% rename from htdocs/adherents/info_subscription.php rename to htdocs/adherents/subscription/info.php index f9dc5ff17af..4e82d959a28 100644 --- a/htdocs/adherents/info_subscription.php +++ b/htdocs/adherents/subscription/info.php @@ -17,16 +17,16 @@ */ /** - * \file htdocs/adherents/info_subscription.php + * \file htdocs/adherents/subscription/info.php * \ingroup member - * \brief Page with information of subscriptions of a member + * \brief Page with information of subscriptions of a member */ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/adherents/class/cotisation.class.php'; +require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php'; $langs->load("companies"); $langs->load("bills"); @@ -41,37 +41,24 @@ $rowid=isset($_GET["rowid"])?$_GET["rowid"]:$_POST["rowid"]; /* - * Visualisation de la fiche - * + * View */ llxHeader(); $form = new Form($db); -$subscription = new Cotisation($db); -$result=$subscription->fetch($rowid); - -$h = 0; -$head = array(); - -$head[$h][0] = DOL_URL_ROOT.'/adherents/fiche_subscription.php?rowid='.$subscription->id; -$head[$h][1] = $langs->trans("SubscriptionCard"); -$head[$h][2] = 'general'; -$h++; - -$head[$h][0] = DOL_URL_ROOT.'/adherents/info_subscription.php?rowid='.$subscription->id; -$head[$h][1] = $langs->trans("Info"); -$head[$h][2] = 'info'; -$h++; +$object = new Subscription($db); +$result = $object->fetch($rowid); +$head = subscription_prepare_head($object); dol_fiche_head($head, 'info', $langs->trans("Subscription"), '', 'payment'); -$subscription->info($rowid); +$object->info($rowid); print '
'.$langs->trans("Ref").'
'.$langs->trans("Ref").''; print $form->showrefnav($object, 'rowid', $linkback, 1); print '
'; -dol_print_object_info($subscription); +dol_print_object_info($object); print '
'; print ''; diff --git a/htdocs/adherents/cotisations.php b/htdocs/adherents/subscription/list.php similarity index 93% rename from htdocs/adherents/cotisations.php rename to htdocs/adherents/subscription/list.php index 2e4f4b1994f..346c80ee993 100644 --- a/htdocs/adherents/cotisations.php +++ b/htdocs/adherents/subscription/list.php @@ -18,14 +18,14 @@ */ /** - * \file htdocs/adherents/cotisations.php + * \file htdocs/adherents/subscription/list.php * \ingroup member - * \brief Page de consultation et insertion d'une cotisation + * \brief list of subscription */ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; -require_once DOL_DOCUMENT_ROOT.'/adherents/class/cotisation.class.php'; +require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $langs->load("members"); @@ -85,12 +85,12 @@ llxHeader('',$langs->trans("ListOfSubscriptions"),'EN:Module_Foundations|FR:Modu // List of subscriptions $sql = "SELECT d.rowid, d.login, d.firstname, d.lastname, d.societe,"; -$sql.= " c.rowid as crowid, c.cotisation,"; +$sql.= " c.rowid as crowid, c.subscription,"; $sql.= " c.dateadh,"; $sql.= " c.datef,"; $sql.= " c.fk_bank as bank, c.note,"; $sql.= " b.fk_account"; -$sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."cotisation as c"; +$sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."subscription as c"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON c.fk_bank=b.rowid"; $sql.= " WHERE d.rowid = c.fk_adherent"; if (isset($date_select) && $date_select != '') @@ -103,10 +103,10 @@ if ($search_ref) else $sql.=" AND 1 = 2"; // Always wrong } if ($search_lastname) $sql.= natural_search(array('d.firstname','d.lastname','d.societe'), $search_lastname); -if ($search_login) $sql.= natural_search('c.cotisation', $search_login); +if ($search_login) $sql.= natural_search('c.subscription', $search_login); if ($search_note) $sql.= natural_search('c.note', $search_note); if ($search_account > 0) $sql.= " AND b.fk_account = ".$search_account; -if ($search_amount) $sql.= natural_search('c.cotisation', $search_amount, 1); +if ($search_amount) $sql.= natural_search('c.subscription', $search_amount, 1); $sql.= $db->order($sortfield,$sortorder); $nbtotalofrecords = 0; @@ -166,7 +166,7 @@ if ($result) } print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"c.dateadh",$param,"",'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateEnd"),$_SERVER["PHP_SELF"],"c.datef",$param,"",'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Amount"),$_SERVER["PHP_SELF"],"c.cotisation",$param,"",'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Amount"),$_SERVER["PHP_SELF"],"c.subscription",$param,"",'align="right"',$sortfield,$sortorder); print_liste_field_titre(''); print "\n"; @@ -211,7 +211,7 @@ if ($result) // Static objects - $cotisation=new Cotisation($db); + $subscription=new Subscription($db); $adherent=new Adherent($db); $accountstatic=new Account($db); @@ -220,10 +220,10 @@ if ($result) while ($i < min($num, $limit)) { $objp = $db->fetch_object($result); - $total+=$objp->cotisation; + $total+=$objp->subscription; - $cotisation->ref=$objp->crowid; - $cotisation->id=$objp->crowid; + $subscription->ref=$objp->crowid; + $subscription->id=$objp->crowid; $adherent->lastname=$objp->lastname; $adherent->firstname=$objp->firstname; @@ -236,7 +236,7 @@ if ($result) print ""; // Ref - print ''.$cotisation->getNomUrl(1).''; + print ''.$subscription->getNomUrl(1).''; // Lastname print ''.$adherent->getNomUrl(1).''; @@ -273,7 +273,7 @@ if ($result) print ''.dol_print_date($db->jdate($objp->datef),'day')."\n"; // Price - print ''.price($objp->cotisation).''; + print ''.price($objp->subscription).''; print ''; diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index dbc700a6778..ccf4d1dfa3f 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -3,7 +3,7 @@ * Copyright (C) 2003 Jean-Louis Bergamo * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2013 Florian Henry + * Copyright (C) 2013 Florian Henry * Copyright (C) 2015 Alexandre Spangaro * * This program is free software; you can redistribute it and/or modify @@ -23,7 +23,7 @@ /** * \file htdocs/adherents/type.php * \ingroup member - * \brief Member's type setup + * \brief Member's type setup */ require '../main.inc.php'; @@ -55,7 +55,7 @@ if (! $sortorder) { $sortorder="DESC"; } if (! $sortfield) { $sortfield="d.lastname"; } $label=GETPOST("libelle","alpha"); -$cotisation=GETPOST("cotisation","int"); +$subscription=GETPOST("subscription","int"); $vote=GETPOST("vote","int"); $comment=GETPOST("comment"); $mail_valid=GETPOST("mail_valid"); @@ -90,11 +90,11 @@ if ($action == 'add' && $user->rights->adherent->configurer) { $object = new AdherentType($db); - $object->libelle = trim($label); - $object->cotisation = trim($cotisation); - $object->note = trim($comment); - $object->mail_valid = trim($mail_valid); - $object->vote = trim($vote); + $object->libelle = trim($label); + $object->subscription = trim($subscription); + $object->note = trim($comment); + $object->mail_valid = trim($mail_valid); + $object->vote = trim($vote); // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost($extralabels,$object); @@ -127,12 +127,12 @@ if ($action == 'update' && $user->rights->adherent->configurer) if (! $cancel) { $object = new AdherentType($db); - $object->id = $rowid; - $object->libelle = trim($label); - $object->cotisation = trim($cotisation); - $object->note = trim($comment); - $object->mail_valid = trim($mail_valid); - $object->vote = trim($vote); + $object->id = $rowid; + $object->libelle = trim($label); + $object->subscription = trim($subscription); + $object->note = trim($comment); + $object->mail_valid = trim($mail_valid); + $object->vote = trim($vote); // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost($extralabels,$object); @@ -171,7 +171,7 @@ if (! $rowid && $action != 'create' && $action != 'edit') //dol_fiche_head(''); - $sql = "SELECT d.rowid, d.libelle, d.cotisation, d.vote"; + $sql = "SELECT d.rowid, d.libelle, d.subscription, d.vote"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent_type as d"; $sql.= " WHERE d.entity IN (".getEntity().")"; @@ -199,7 +199,7 @@ if (! $rowid && $action != 'create' && $action != 'edit') print ""; print ''.img_object($langs->trans("ShowType"),'group').' '.$objp->rowid.''; print ''.dol_escape_htmltag($objp->libelle).''; - print ''.yn($objp->cotisation).''; + print ''.yn($objp->subscription).''; print ''.yn($objp->vote).''; if ($user->rights->adherent->configurer) print 'rowid.'">'.img_edit().''; @@ -240,7 +240,7 @@ if ($action == 'create') print ''.$langs->trans("Label").''; print ''.$langs->trans("SubscriptionRequired").''; - print $form->selectyesno("cotisation",1,1); + print $form->selectyesno("subscription",1,1); print ''; print ''.$langs->trans("VoteAllowed").''; @@ -308,7 +308,7 @@ if ($rowid > 0) print ''.$langs->trans("Label").''.dol_escape_htmltag($object->libelle).''; print ''.$langs->trans("SubscriptionRequired").''; - print yn($object->cotisation); + print yn($object->subscription); print ''; print ''.$langs->trans("VoteAllowed").''; @@ -367,7 +367,7 @@ if ($rowid > 0) $sql = "SELECT d.rowid, d.login, d.firstname, d.lastname, d.societe, "; $sql.= " d.datefin,"; $sql.= " d.email, d.fk_adherent_type as type_id, d.morphy, d.statut,"; - $sql.= " t.libelle as type, t.cotisation"; + $sql.= " t.libelle as type, t.subscription"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."adherent_type as t"; $sql.= " WHERE d.fk_adherent_type = t.rowid "; $sql.= " AND d.entity IN (".getEntity().")"; @@ -546,7 +546,7 @@ if ($rowid > 0) // Statut print ''; - print $adh->LibStatut($objp->statut,$objp->cotisation,$datefin,2); + print $adh->LibStatut($objp->statut,$objp->subscription,$datefin,2); print ""; // Date fin cotisation @@ -566,7 +566,7 @@ if ($rowid > 0) else { print ''; - if ($objp->cotisation == 'yes') + if ($objp->subscription == 'yes') { print $langs->trans("SubscriptionNotReceived"); if ($objp->statut > 0) print " ".img_warning(); @@ -638,7 +638,7 @@ if ($rowid > 0) print ''.$langs->trans("Label").''; print ''.$langs->trans("SubscriptionRequired").''; - print $form->selectyesno("cotisation",$object->cotisation,1); + print $form->selectyesno("subscription",$object->subscription,1); print ''; print ''.$langs->trans("VoteAllowed").''; diff --git a/htdocs/core/boxes/box_members.php b/htdocs/core/boxes/box_members.php index d5d8f1243f5..afcbe8e68a6 100644 --- a/htdocs/core/boxes/box_members.php +++ b/htdocs/core/boxes/box_members.php @@ -84,7 +84,7 @@ class box_members extends ModeleBoxes { $sql = "SELECT a.rowid, a.lastname, a.firstname, a.societe as company, a.fk_soc,"; $sql.= " a.datec, a.tms, a.statut as status, a.datefin as date_end_subscription,"; - $sql.= " t.cotisation"; + $sql.= " t.subscription"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."adherent_type as t"; $sql.= " WHERE a.entity = ".$conf->entity; $sql.= " AND a.fk_adherent_type = t.rowid"; @@ -135,7 +135,7 @@ class box_members extends ModeleBoxes $this->info_box_contents[$line][] = array( 'td' => 'align="right" width="18"', - 'text' => $memberstatic->LibStatut($objp->status,$objp->cotisation,$db->jdate($objp->date_end_subscription),3), + 'text' => $memberstatic->LibStatut($objp->status,$objp->subscription,$db->jdate($objp->date_end_subscription),3), ); $line++; diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 3e7d02ed67a..4be8e03a00f 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -2606,7 +2606,7 @@ abstract class CommonObject $classfile = 'facture-rec'; $classname = 'FactureRec'; } else if ($objecttype == 'subscription') { - $classfile = 'cotisation'; $classname = 'Cotisation'; + $classfile = 'subscription'; $classname = 'Subscription'; } // Here $module, $classfile and $classname are set diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 4b7e2a3d79b..d7d142c7420 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -508,8 +508,8 @@ class Conf // Delay before warnings // Avoid strict errors. TODO: Replace xxx->warning_delay with a property ->warning_delay_xxx if (isset($this->agenda)) { - $this->adherent->cotisation = new stdClass(); - $this->adherent->cotisation->warning_delay=(isset($this->global->MAIN_DELAY_MEMBERS)?$this->global->MAIN_DELAY_MEMBERS:0)*24*60*60; + $this->adherent->subscription = new stdClass(); + $this->adherent->subscription->warning_delay=(isset($this->global->MAIN_DELAY_MEMBERS)?$this->global->MAIN_DELAY_MEMBERS:0)*24*60*60; } if (isset($this->agenda)) $this->agenda->warning_delay=(isset($this->global->MAIN_DELAY_ACTIONS_TODO)?$this->global->MAIN_DELAY_ACTIONS_TODO:7)*24*60*60; if (isset($this->projet)) diff --git a/htdocs/core/lib/member.lib.php b/htdocs/core/lib/member.lib.php index 9b90821883f..47986ac8ee8 100644 --- a/htdocs/core/lib/member.lib.php +++ b/htdocs/core/lib/member.lib.php @@ -20,14 +20,14 @@ /** * \file htdocs/core/lib/member.lib.php - * \brief Ensemble de fonctions de base pour les adherents + * \brief Functions for module members */ /** * Return array head with list of tabs to view object informations * - * @param Adherent $object Member - * @return array head + * @param Adherent $object Member + * @return array head */ function member_prepare_head(Adherent $object) { @@ -51,9 +51,9 @@ function member_prepare_head(Adherent $object) $h++; } - if (! empty($user->rights->adherent->cotisation->lire)) + if (! empty($user->rights->adherent->cotisation->lire)) { - $head[$h][0] = DOL_URL_ROOT.'/adherents/card_subscriptions.php?rowid='.$object->id; + $head[$h][0] = DOL_URL_ROOT.'/adherents/subscription.php?rowid='.$object->id; $head[$h][1] = $langs->trans("Subscriptions"); $head[$h][2] = 'subscription'; $h++; @@ -62,10 +62,10 @@ function member_prepare_head(Adherent $object) // Show agenda tab if (! empty($conf->agenda->enabled)) { - $head[$h][0] = DOL_URL_ROOT."/adherents/agenda.php?id=".$object->id; - $head[$h][1] = $langs->trans('Agenda'); - $head[$h][2] = 'agenda'; - $h++; + $head[$h][0] = DOL_URL_ROOT."/adherents/agenda.php?id=".$object->id; + $head[$h][1] = $langs->trans('Agenda'); + $head[$h][2] = 'agenda'; + $h++; } // Show more tabs from modules @@ -233,3 +233,37 @@ function member_stats_prepare_head($object) return $head; } + +/** + * Return array head with list of tabs to view object informations + * + * @param Subscription $object Subscription + * @return array head + */ +function subscription_prepare_head(Subscription $object) +{ + global $db, $langs, $conf, $user; + + $h = 0; + $head = array(); + + $head[$h][0] = DOL_URL_ROOT.'/adherents/subscription/card.php?rowid='.$object->id; + $head[$h][1] = $langs->trans("Card"); + $head[$h][2] = 'general'; + $h++; + + $head[$h][0] = DOL_URL_ROOT.'/adherents/subscription/info.php?rowid='.$object->id; + $head[$h][1] = $langs->trans("Info"); + $head[$h][2] = 'info'; + $h++; + + // Show more tabs from modules + // Entries must be declared in modules descriptor with line + // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab + // $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab + complete_head_from_modules($conf,$langs,$object,$head,$h,'subscription'); + + complete_head_from_modules($conf,$langs,$object,$head,$h,'subscription','remove'); + + return $head; +} diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql index 66e2f1ddddc..7e1c378279e 100644 --- a/htdocs/core/menus/init_menu_auguria.sql +++ b/htdocs/core/menus/init_menu_auguria.sql @@ -309,7 +309,7 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left -- Members - Subscriptions insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4300__+MAX_llx_menu__, 'members', '', 13__+MAX_llx_menu__, '/adherents/index.php?leftmenu=members&mainmenu=members', 'Subscriptions', 0, 'compta', '$user->rights->adherent->cotisation->lire', '', 2, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4301__+MAX_llx_menu__, 'members', '', 4300__+MAX_llx_menu__, '/adherents/list.php?statut=-1&leftmenu=accountancy&mainmenu=members', 'NewSubscription', 1, 'compta', '$user->rights->adherent->cotisation->creer', '', 2, 0, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4302__+MAX_llx_menu__, 'members', '', 4300__+MAX_llx_menu__, '/adherents/cotisations.php?leftmenu=members', 'List', 1, 'compta', '$user->rights->adherent->cotisation->lire', '', 2, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4302__+MAX_llx_menu__, 'members', '', 4300__+MAX_llx_menu__, '/adherents/subscription/list.php?leftmenu=members', 'List', 1, 'compta', '$user->rights->adherent->cotisation->lire', '', 2, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4303__+MAX_llx_menu__, 'members', '', 4300__+MAX_llx_menu__, '/adherents/stats/index.php?leftmenu=members', 'MenuMembersStats', 1, 'members', '$user->rights->adherent->lire', '', 2, 7, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4500__+MAX_llx_menu__, 'members', 'export', 13__+MAX_llx_menu__, '/adherents/index.php?leftmenu=export&mainmenu=members', 'Exports', 0, 'members', '$user->rights->adherent->export', '', 2, 3, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled && $conf->export->enabled', __HANDLER__, 'left', 4501__+MAX_llx_menu__, 'members', '', 4500__+MAX_llx_menu__, '/exports/index.php?leftmenu=export', 'Datas', 1, 'members', '$user->rights->adherent->export', '', 2, 0, __ENTITY__); diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index a0feb509339..f16c2a1da72 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -1328,7 +1328,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $newmenu->add("/adherents/index.php?leftmenu=members&mainmenu=members",$langs->trans("Subscriptions"),0,$user->rights->adherent->cotisation->lire); $newmenu->add("/adherents/list.php?leftmenu=members&statut=-1,1&mainmenu=members",$langs->trans("NewSubscription"),1,$user->rights->adherent->cotisation->creer); - $newmenu->add("/adherents/cotisations.php?leftmenu=members",$langs->trans("List"),1,$user->rights->adherent->cotisation->lire); + $newmenu->add("/adherents/subscription/list.php?leftmenu=members",$langs->trans("List"),1,$user->rights->adherent->cotisation->lire); $newmenu->add("/adherents/stats/index.php?leftmenu=members",$langs->trans("MenuMembersStats"),1,$user->rights->adherent->lire); diff --git a/htdocs/core/modules/modAdherent.class.php b/htdocs/core/modules/modAdherent.class.php index ea611fe947a..bcf7c32b74e 100644 --- a/htdocs/core/modules/modAdherent.class.php +++ b/htdocs/core/modules/modAdherent.class.php @@ -4,7 +4,7 @@ * Copyright (C) 2004-2012 Laurent Destailleur * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier - * Copyright (C) 2013 Juanjo Menent + * Copyright (C) 2013 Juanjo Menent * Copyright (C) 2014-2015 Raphaël Doursenaud * * This program is free software; you can redistribute it and/or modify @@ -156,7 +156,7 @@ class modAdherent extends DolibarrModules $this->const[$r][0] = "ADHERENT_BANK_USE_AUTO"; $this->const[$r][1] = "yesno"; $this->const[$r][2] = ""; - $this->const[$r][3] = "Insertion automatique des cotisations dans le compte banquaire"; + $this->const[$r][3] = "Insertion automatique des cotisations dans le compte bancaire"; $this->const[$r][4] = 0; $r++; @@ -170,7 +170,7 @@ class modAdherent extends DolibarrModules $this->const[$r][0] = "ADHERENT_BANK_CATEGORIE"; $this->const[$r][1] = "chaine"; $this->const[$r][2] = ""; - $this->const[$r][3] = "ID de la catégorie banquaire des cotisations"; + $this->const[$r][3] = "ID de la catégorie bancaire des cotisations"; $this->const[$r][4] = 0; $r++; @@ -271,9 +271,9 @@ class modAdherent extends DolibarrModules $this->export_code[$r]=$this->rights_class.'_'.$r; $this->export_label[$r]='MembersAndSubscriptions'; $this->export_permission[$r]=array(array("adherent","export")); - $this->export_fields_array[$r]=array('a.rowid'=>'Id','a.civility'=>"UserTitle",'a.lastname'=>"Lastname",'a.firstname'=>"Firstname",'a.login'=>"Login",'a.morphy'=>'Nature','a.societe'=>'Company','a.address'=>"Address",'a.zip'=>"Zip",'a.town'=>"Town",'d.nom'=>"State",'co.code'=>"CountryCode",'co.label'=>"Country",'a.phone'=>"PhonePro",'a.phone_perso'=>"PhonePerso",'a.phone_mobile'=>"PhoneMobile",'a.email'=>"Email",'a.birth'=>"Birthday",'a.statut'=>"Status",'a.photo'=>"Photo",'a.note_public'=>"NotePublic",'a.note_private'=>"NotePrivate",'a.datec'=>'DateCreation','a.datevalid'=>'DateValidation','a.tms'=>'DateLastModification','a.datefin'=>'DateEndSubscription','ta.rowid'=>'MemberTypeId','ta.libelle'=>'MemberTypeLabel','c.rowid'=>'SubscriptionId','c.dateadh'=>'DateSubscription','c.cotisation'=>'Amount'); - $this->export_TypeFields_array[$r]=array('a.civility'=>"Text",'a.lastname'=>"Text",'a.firstname'=>"Text",'a.login'=>"Text",'a.morphy'=>'Text','a.societe'=>'Text','a.address'=>"Text",'a.zip'=>"Text",'a.town'=>"Text",'d.nom'=>"Text",'co.code'=>'Text','co.label'=>"Text",'a.phone'=>"Text",'a.phone_perso'=>"Text",'a.phone_mobile'=>"Text",'a.email'=>"Text",'a.birth'=>"Date",'a.statut'=>"Status",'a.note_public'=>"Text",'a.note_private'=>"Text",'a.datec'=>'Date','a.datevalid'=>'Date','a.tms'=>'Date','a.datefin'=>'Date','ta.rowid'=>'List:adherent_type:libelle','ta.libelle'=>'Text','c.dateadh'=>'Date','c.cotisation'=>'Numeric'); - $this->export_entities_array[$r]=array('a.rowid'=>'member','a.civility'=>"member",'a.lastname'=>"member",'a.firstname'=>"member",'a.login'=>"member",'a.morphy'=>'member','a.societe'=>'member','a.address'=>"member",'a.zip'=>"member",'a.town'=>"member",'d.nom'=>"member",'co.code'=>"member",'co.label'=>"member",'a.phone'=>"member",'a.phone_perso'=>"member",'a.phone_mobile'=>"member",'a.email'=>"member",'a.birth'=>"member",'a.statut'=>"member",'a.photo'=>"member",'a.note_public'=>"member",'a.note_private'=>"member",'a.datec'=>'member','a.datevalid'=>'member','a.tms'=>'member','a.datefin'=>'member','ta.rowid'=>'member_type','ta.libelle'=>'member_type','c.rowid'=>'subscription','c.dateadh'=>'subscription','c.cotisation'=>'subscription'); + $this->export_fields_array[$r]=array('a.rowid'=>'Id','a.civility'=>"UserTitle",'a.lastname'=>"Lastname",'a.firstname'=>"Firstname",'a.login'=>"Login",'a.morphy'=>'Nature','a.societe'=>'Company','a.address'=>"Address",'a.zip'=>"Zip",'a.town'=>"Town",'d.nom'=>"State",'co.code'=>"CountryCode",'co.label'=>"Country",'a.phone'=>"PhonePro",'a.phone_perso'=>"PhonePerso",'a.phone_mobile'=>"PhoneMobile",'a.email'=>"Email",'a.birth'=>"Birthday",'a.statut'=>"Status",'a.photo'=>"Photo",'a.note_public'=>"NotePublic",'a.note_private'=>"NotePrivate",'a.datec'=>'DateCreation','a.datevalid'=>'DateValidation','a.tms'=>'DateLastModification','a.datefin'=>'DateEndSubscription','ta.rowid'=>'MemberTypeId','ta.libelle'=>'MemberTypeLabel','c.rowid'=>'SubscriptionId','c.dateadh'=>'DateSubscription','c.subscription'=>'Amount'); + $this->export_TypeFields_array[$r]=array('a.civility'=>"Text",'a.lastname'=>"Text",'a.firstname'=>"Text",'a.login'=>"Text",'a.morphy'=>'Text','a.societe'=>'Text','a.address'=>"Text",'a.zip'=>"Text",'a.town'=>"Text",'d.nom'=>"Text",'co.code'=>'Text','co.label'=>"Text",'a.phone'=>"Text",'a.phone_perso'=>"Text",'a.phone_mobile'=>"Text",'a.email'=>"Text",'a.birth'=>"Date",'a.statut'=>"Status",'a.note_public'=>"Text",'a.note_private'=>"Text",'a.datec'=>'Date','a.datevalid'=>'Date','a.tms'=>'Date','a.datefin'=>'Date','ta.rowid'=>'List:adherent_type:libelle','ta.libelle'=>'Text','c.dateadh'=>'Date','c.subscription'=>'Numeric'); + $this->export_entities_array[$r]=array('a.rowid'=>'member','a.civility'=>"member",'a.lastname'=>"member",'a.firstname'=>"member",'a.login'=>"member",'a.morphy'=>'member','a.societe'=>'member','a.address'=>"member",'a.zip'=>"member",'a.town'=>"member",'d.nom'=>"member",'co.code'=>"member",'co.label'=>"member",'a.phone'=>"member",'a.phone_perso'=>"member",'a.phone_mobile'=>"member",'a.email'=>"member",'a.birth'=>"member",'a.statut'=>"member",'a.photo'=>"member",'a.note_public'=>"member",'a.note_private'=>"member",'a.datec'=>'member','a.datevalid'=>'member','a.tms'=>'member','a.datefin'=>'member','ta.rowid'=>'member_type','ta.libelle'=>'member_type','c.rowid'=>'subscription','c.dateadh'=>'subscription','c.subscription'=>'subscription'); // Add extra fields $sql="SELECT name, label FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'adherent' AND entity = ".$conf->entity; @@ -289,7 +289,7 @@ class modAdherent extends DolibarrModules $this->export_sql_start[$r]='SELECT DISTINCT '; $this->export_sql_end[$r] =' FROM ('.MAIN_DB_PREFIX.'adherent_type as ta, '.MAIN_DB_PREFIX.'adherent as a)'; $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'adherent_extrafields as extra ON a.rowid = extra.fk_object'; - $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'cotisation as c ON c.fk_adherent = a.rowid'; + $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'subscription as c ON c.fk_adherent = a.rowid'; $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_departements as d ON a.state_id = d.rowid'; $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as co ON a.country = co.rowid'; $this->export_sql_end[$r] .=' WHERE a.fk_adherent_type = ta.rowid'; diff --git a/htdocs/install/mysql/migration/4.0.0-5.0.0.sql b/htdocs/install/mysql/migration/4.0.0-5.0.0.sql index 5c78d7aacc9..819fdc2e2e0 100644 --- a/htdocs/install/mysql/migration/4.0.0-5.0.0.sql +++ b/htdocs/install/mysql/migration/4.0.0-5.0.0.sql @@ -85,6 +85,11 @@ create table llx_expensereport_extrafields ALTER TABLE llx_expensereport_extrafields ADD INDEX idx_expensereport_extrafields (fk_object); +ALTER TABLE llx_cotisation RENAME TO llx_subscription; +ALTER TABLE llx_subscription ADD UNIQUE INDEX uk_subscription (fk_adherent,dateadh); +ALTER TABLE llx_subscription CHANGE COLUMN cotisation subscription real; +ALTER TABLE llx_adherent_type CHANGE COLUMN cotisation subscription varchar(3) NOT NULL DEFAULT 'yes'; + create table llx_product_lot_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, diff --git a/htdocs/install/mysql/migration/repair.sql b/htdocs/install/mysql/migration/repair.sql index 9cc35e50b0d..04eb75f8b51 100755 --- a/htdocs/install/mysql/migration/repair.sql +++ b/htdocs/install/mysql/migration/repair.sql @@ -45,7 +45,7 @@ delete from llx_holiday_logs where fk_user_update not IN (select rowid from llx_ update llx_deplacement set dated='2010-01-01' where dated < '2000-01-01'; -update llx_cotisation set fk_bank = null where fk_bank not in (select rowid from llx_bank); +update llx_subscription set fk_bank = null where fk_bank not in (select rowid from llx_bank); update llx_propal set fk_projet = null where fk_projet not in (select rowid from llx_projet); update llx_commande set fk_projet = null where fk_projet not in (select rowid from llx_projet); diff --git a/htdocs/install/mysql/tables/llx_adherent_type.sql b/htdocs/install/mysql/tables/llx_adherent_type.sql index 1602f441cde..c20eade92d6 100644 --- a/htdocs/install/mysql/tables/llx_adherent_type.sql +++ b/htdocs/install/mysql/tables/llx_adherent_type.sql @@ -29,7 +29,7 @@ create table llx_adherent_type tms timestamp, statut smallint NOT NULL DEFAULT 0, libelle varchar(50) NOT NULL, - cotisation varchar(3) NOT NULL DEFAULT 'yes', + subscription varchar(3) NOT NULL DEFAULT 'yes', vote varchar(3) NOT NULL DEFAULT 'yes', note text, mail_valid text -- mail envoye a la validation diff --git a/htdocs/install/mysql/tables/llx_cotisation.key.sql b/htdocs/install/mysql/tables/llx_subscription.key.sql similarity index 91% rename from htdocs/install/mysql/tables/llx_cotisation.key.sql rename to htdocs/install/mysql/tables/llx_subscription.key.sql index 00998fc69fe..bf84246e8f4 100644 --- a/htdocs/install/mysql/tables/llx_cotisation.key.sql +++ b/htdocs/install/mysql/tables/llx_subscription.key.sql @@ -16,4 +16,4 @@ -- -- ============================================================================ -ALTER TABLE llx_cotisation ADD UNIQUE INDEX uk_cotisation (fk_adherent,dateadh); +ALTER TABLE llx_subscription ADD UNIQUE INDEX uk_subscription (fk_adherent,dateadh); diff --git a/htdocs/install/mysql/tables/llx_cotisation.sql b/htdocs/install/mysql/tables/llx_subscription.sql similarity index 95% rename from htdocs/install/mysql/tables/llx_cotisation.sql rename to htdocs/install/mysql/tables/llx_subscription.sql index 69b1b4167e0..3f54e487060 100644 --- a/htdocs/install/mysql/tables/llx_cotisation.sql +++ b/htdocs/install/mysql/tables/llx_subscription.sql @@ -16,7 +16,7 @@ -- -- =================================================================== -create table llx_cotisation +create table llx_subscription ( rowid integer AUTO_INCREMENT PRIMARY KEY, tms timestamp, @@ -24,7 +24,7 @@ create table llx_cotisation fk_adherent integer, dateadh datetime, datef date, - cotisation real, + subscription real, fk_bank integer DEFAULT NULL, note text )ENGINE=innodb; diff --git a/htdocs/install/pgsql/functions/functions.sql b/htdocs/install/pgsql/functions/functions.sql index cbacf7454c7..b54dbbbb00f 100644 --- a/htdocs/install/pgsql/functions/functions.sql +++ b/htdocs/install/pgsql/functions/functions.sql @@ -86,7 +86,7 @@ CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_contrat_extrafields CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_contratdet FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_contratdet_extrafields FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_contratdet_log FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); -CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_cotisation FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); +CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_subscription FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_cronjob FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_deplacement FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_don FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); diff --git a/htdocs/public/members/public_list.php b/htdocs/public/members/public_list.php index 4171bbab2e1..404b7085bdb 100644 --- a/htdocs/public/members/public_list.php +++ b/htdocs/public/members/public_list.php @@ -114,7 +114,7 @@ $sql.= " AND statut = 1"; $sql.= " AND public = 1"; $sql.= $db->order($sortfield,$sortorder); $sql.= $db->plimit($conf->liste_limit+1, $offset); -//$sql = "SELECT d.rowid, d.firstname, d.lastname, d.societe, zip, town, d.email, t.libelle as type, d.morphy, d.statut, t.cotisation"; +//$sql = "SELECT d.rowid, d.firstname, d.lastname, d.societe, zip, town, d.email, t.libelle as type, d.morphy, d.statut, t.subscription"; //$sql .= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."adherent_type as t"; //$sql .= " WHERE d.fk_adherent_type = t.rowid AND d.statut = $statut"; //$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit, $offset); diff --git a/htdocs/public/paybox/newpayment.php b/htdocs/public/paybox/newpayment.php index 481fd17f049..1945aa6c8cf 100644 --- a/htdocs/public/paybox/newpayment.php +++ b/htdocs/public/paybox/newpayment.php @@ -649,7 +649,7 @@ if (GETPOST("source") == 'membersubscription' && $valid) $langs->load("members"); require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; - require_once DOL_DOCUMENT_ROOT.'/adherents/class/cotisation.class.php'; + require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php'; $member=new Adherent($db); $result=$member->fetch('',$ref); @@ -660,7 +660,7 @@ if (GETPOST("source") == 'membersubscription' && $valid) } else { - $subscription=new Cotisation($db); + $subscription=new Subscription($db); } $amount=$subscription->total_ttc; diff --git a/htdocs/public/paypal/newpayment.php b/htdocs/public/paypal/newpayment.php index dcb43c07170..b5d105d6cf6 100644 --- a/htdocs/public/paypal/newpayment.php +++ b/htdocs/public/paypal/newpayment.php @@ -804,7 +804,7 @@ if (GETPOST("source") == 'membersubscription' && $valid) $langs->load("members"); require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; - require_once DOL_DOCUMENT_ROOT.'/adherents/class/cotisation.class.php'; + require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php'; $member=new Adherent($db); $result=$member->fetch('',$ref); @@ -815,7 +815,7 @@ if (GETPOST("source") == 'membersubscription' && $valid) } else { - $subscription=new Cotisation($db); + $subscription=new Subscription($db); } $amount=$subscription->total_ttc; diff --git a/htdocs/societe/societecontact.php b/htdocs/societe/societecontact.php index 4ed1852da80..876c383031a 100644 --- a/htdocs/societe/societecontact.php +++ b/htdocs/societe/societecontact.php @@ -213,7 +213,7 @@ if ($id > 0 || ! empty($ref)) $sql = "SELECT d.rowid, d.login, d.lastname, d.firstname, d.societe as company, d.fk_soc,"; $sql.= " d.datefin,"; $sql.= " d.email, d.fk_adherent_type as type_id, d.morphy, d.statut,"; - $sql.= " t.libelle as type, t.cotisation"; + $sql.= " t.libelle as type, t.subscription"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent as d"; $sql.= ", ".MAIN_DB_PREFIX."adherent_type as t"; $sql.= " WHERE d.fk_soc=".$id; @@ -292,7 +292,7 @@ if ($id > 0 || ! empty($ref)) // Statut print ''; - print $memberstatic->LibStatut($objp->statut,$objp->cotisation,$datefin,2); + print $memberstatic->LibStatut($objp->statut,$objp->subscription,$datefin,2); print ""; // End of subscription date @@ -308,7 +308,7 @@ if ($id > 0 || ! empty($ref)) else { print ''; - if ($objp->cotisation == 'yes') + if ($objp->subscription == 'yes') { print $langs->trans("SubscriptionNotReceived"); if ($objp->statut > 0) print " ".img_warning(); From 922495d72d52354c70eae9a0fb446267c2f22c63 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Sat, 24 Sep 2016 07:18:38 +0200 Subject: [PATCH 2/3] Correct travis & typo "Execuete" --- htdocs/comm/propal/class/propal.class.php | 34 +++++++++---------- htdocs/commande/class/api_orders.class.php | 1 + htdocs/commande/class/commande.class.php | 20 +++++------ htdocs/compta/facture/class/facture.class.php | 10 +++--- htdocs/contrat/class/contrat.class.php | 2 +- htdocs/expedition/class/expedition.class.php | 4 +-- htdocs/fichinter/class/fichinter.class.php | 2 +- .../class/fournisseur.commande.class.php | 6 ++-- .../fourn/class/fournisseur.facture.class.php | 2 +- .../class/supplier_proposal.class.php | 12 +++---- 10 files changed, 47 insertions(+), 46 deletions(-) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index f3eccc2a9be..f4387ebb71a 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -779,7 +779,7 @@ class Propal extends CommonObject * this->ref can be set or empty. If empty, we will use "(PROVid)" * * @param User $user User that create - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >=0 if OK */ function create($user, $notrigger=0) @@ -1627,7 +1627,7 @@ class Propal extends CommonObject * * @param User $user Object user that modify * @param int $date Date - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ function set_date($user, $date, $notrigger=0) @@ -1694,7 +1694,7 @@ class Propal extends CommonObject * * @param User $user Object user that modify * @param int $date_fin_validite End of validity date - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ function set_echeance($user, $date_fin_validite, $notrigger=0) @@ -1754,7 +1754,7 @@ class Propal extends CommonObject * * @param User $user Object user that modify * @param int $date_livraison Delivery date - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if ko, >0 if ok */ function set_date_livraison($user, $date_livraison, $notrigger=0) @@ -1814,7 +1814,7 @@ class Propal extends CommonObject * * @param User $user Object user that modify * @param int $id Availability id - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ function set_availability($user, $id, $notrigger=0) @@ -1874,7 +1874,7 @@ class Propal extends CommonObject * * @param User $user Object user that modify * @param int $id Input reason id - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ function set_demand_reason($user, $id, $notrigger=0) @@ -1936,7 +1936,7 @@ class Propal extends CommonObject * * @param User $user Object user that modify * @param string $ref_client Customer reference - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if ko, >0 if ok */ function set_ref_client($user, $ref_client, $notrigger=0) @@ -1999,7 +1999,7 @@ class Propal extends CommonObject * * @param User $user Object user that modify * @param double $remise Amount discount - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if ko, >0 if ok */ function set_remise_percent($user, $remise, $notrigger=0) @@ -2064,7 +2064,7 @@ class Propal extends CommonObject * * @param User $user Object user that modify * @param double $remise Amount discount - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if ko, >0 if ok */ function set_remise_absolue($user, $remise, $notrigger=0) @@ -2132,7 +2132,7 @@ class Propal extends CommonObject * @param User $user Object user that close * @param int $statut Statut * @param string $note Comment - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ function reopen($user, $statut, $note='', $notrigger=0) @@ -2193,7 +2193,7 @@ class Propal extends CommonObject * @param User $user Object user that close * @param int $statut Statut * @param string $note Comment - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ function cloture($user, $statut, $note, $notrigger=0) @@ -2290,7 +2290,7 @@ class Propal extends CommonObject * Class invoiced the Propal * * @param User $user Object user - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 si ko, >0 si ok */ function classifyBilled(User $user, $notrigger=0) @@ -2360,7 +2360,7 @@ class Propal extends CommonObject * Set draft status * * @param User $user Object user that modify - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ function set_draft($user, $notrigger=0) @@ -2588,7 +2588,7 @@ class Propal extends CommonObject * Delete proposal * * @param User $user Object user that delete - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int 1 if ok, otherwise if error */ function delete($user, $notrigger=0) @@ -2711,7 +2711,7 @@ class Propal extends CommonObject * Change the delivery time * * @param int $availability_id Id of new delivery time - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int >0 if OK, <0 if KO */ function availability($availability_id, $notrigger=0) @@ -2778,7 +2778,7 @@ class Propal extends CommonObject * Change source demand * * @param int $demand_reason_id Id of new source demand - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int >0 si ok, <0 si ko */ function demand_reason($demand_reason_id, $notrigger=0) @@ -3605,7 +3605,7 @@ class PropaleLigne extends CommonObjectLine /** * Insert object line propal in database * - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ function insert($notrigger=0) diff --git a/htdocs/commande/class/api_orders.class.php b/htdocs/commande/class/api_orders.class.php index ad3c17d1187..50a0ca2ab80 100644 --- a/htdocs/commande/class/api_orders.class.php +++ b/htdocs/commande/class/api_orders.class.php @@ -441,6 +441,7 @@ class Orders extends DolibarrApi * * @param int $id Order ID * @param int $idwarehouse Warehouse ID + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * * @url POST {id}/validate * diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index c0d4ab66a81..894f58f930e 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -259,7 +259,7 @@ class Commande extends CommonOrder * * @param User $user User making status change * @param int $idwarehouse Id of warehouse to use for stock decrease - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <=0 if OK, 0=Nothing done, >0 if KO */ function valid($user, $idwarehouse=0, $notrigger=0) @@ -2049,7 +2049,7 @@ class Commande extends CommonOrder * * @param User $user User qui positionne la remise * @param float $remise Discount (percent) - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ function set_remise($user, $remise, $notrigger=0) @@ -2115,7 +2115,7 @@ class Commande extends CommonOrder * * @param User $user User qui positionne la remise * @param float $remise Discount - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ function set_remise_absolue($user, $remise, $notrigger=0) @@ -2181,7 +2181,7 @@ class Commande extends CommonOrder * * @param User $user Object user making change * @param int $date Date - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ function set_date($user, $date, $notrigger=0) @@ -2245,7 +2245,7 @@ class Commande extends CommonOrder * * @param User $user Objet utilisateur qui modifie * @param int $date_livraison Date de livraison - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 si ko, >0 si ok */ function set_date_livraison($user, $date_livraison, $notrigger=0) @@ -2381,7 +2381,7 @@ class Commande extends CommonOrder * Update delivery delay * * @param int $availability_id Id du nouveau mode - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int >0 if OK, <0 if KO */ function availability($availability_id, $notrigger=0) @@ -2451,7 +2451,7 @@ class Commande extends CommonOrder * Update order demand_reason * * @param int $demand_reason_id Id of new demand - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int >0 if ok, <0 if ko */ function demand_reason($demand_reason_id, $notrigger=0) @@ -2522,7 +2522,7 @@ class Commande extends CommonOrder * * @param User $user User that make change * @param string $ref_client Customer ref - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ function set_ref_client($user, $ref_client, $notrigger=0) @@ -2584,7 +2584,7 @@ class Commande extends CommonOrder * Classify the order as invoiced * * @param User $user Object user making the change - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ function classifyBilled(User $user, $notrigger=0) @@ -3045,7 +3045,7 @@ class Commande extends CommonOrder * Delete the customer order * * @param User $user User object - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <=0 if KO, >0 if OK */ function delete($user, $notrigger=0) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index e0ceb287ea9..85c6c9b67da 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -1511,7 +1511,7 @@ class Facture extends CommonInvoice * Set customer ref * * @param string $ref_client Customer ref - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ function set_ref_client($ref_client, $notrigger=0) @@ -1910,7 +1910,7 @@ class Facture extends CommonInvoice * @param User $user Object user that validate * @param string $force_number Reference to force on invoice * @param int $idwarehouse Id of warehouse to use for stock decrease if option to decreasenon stock is on (0=no decrease) - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ function validate($user, $force_number='', $idwarehouse=0, $notrigger=0) @@ -2822,7 +2822,7 @@ class Facture extends CommonInvoice * * @param User $user User that set discount * @param double $remise Discount - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if ko, >0 if ok */ function set_remise($user, $remise, $notrigger=0) @@ -2886,7 +2886,7 @@ class Facture extends CommonInvoice * * @param User $user User that set discount * @param double $remise Discount - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ function set_remise_absolue($user, $remise, $notrigger=0) @@ -3941,7 +3941,7 @@ class Facture extends CommonInvoice * Sets the invoice as a final situation * * @param User $user Object user - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ function setFinal(User $user, $notrigger=0) diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index ba2c60fc013..1a6733880a1 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -354,7 +354,7 @@ class Contrat extends CommonObject * * @param User $user Objet User * @param string $force_number Reference to force on contract (not implemented yet) - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ function validate($user, $force_number='', $notrigger=0) diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 3341befe89a..e8578e21bc0 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -180,7 +180,7 @@ class Expedition extends CommonObject * Create expedition en base * * @param User $user Objet du user qui cree - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 si erreur, id expedition creee si ok */ function create($user, $notrigger=0) @@ -597,7 +597,7 @@ class Expedition extends CommonObject * Validate object and update stock if option enabled * * @param User $user Object user that validate - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if OK, >0 if KO */ function valid($user, $notrigger=0) diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index acbc6b24083..f1ae7af5309 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -427,7 +427,7 @@ class Fichinter extends CommonObject * Validate a intervention * * @param User $user User that validate - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ function setValid($user, $notrigger=0) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index a8a7c6e930f..3066d793a0c 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -374,7 +374,7 @@ class CommandeFournisseur extends CommonOrder * * @param User $user Validator User * @param int $idwarehouse Id of warehouse to use for stock decrease - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ public function valid($user,$idwarehouse=0,$notrigger=0) @@ -1971,7 +1971,7 @@ class CommandeFournisseur extends CommonOrder * * @param User $user Objet user making change * @param timestamp $date_livraison Planned delivery date - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ function set_date_livraison($user, $date_livraison, $notrigger=0) @@ -2035,7 +2035,7 @@ class CommandeFournisseur extends CommonOrder * * @param User $user Objet utilisateur qui modifie * @param int $id_projet Date de livraison - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 si ko, >0 si ok */ function set_id_projet($user, $id_projet, $notrigger=0) diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 4a9960d49a4..792e6e106aa 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -955,7 +955,7 @@ class FactureFournisseur extends CommonInvoice * @param User $user Object user that validate * @param string $force_number Reference to force on invoice * @param int $idwarehouse Id of warehouse for stock change - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, =0 if nothing to do, >0 if OK */ public function validate($user, $force_number='', $idwarehouse=0, $notrigger=0) diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index 14fbcb3110a..5a848654b7c 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -728,7 +728,7 @@ class SupplierProposal extends CommonObject * this->ref can be set or empty. If empty, we will use "(PROVid)" * * @param User $user User that create - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >=0 if OK */ function create($user, $notrigger=0) @@ -1335,7 +1335,7 @@ class SupplierProposal extends CommonObject * Set status to validated * * @param User $user Object user that validate - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >=0 if OK */ function valid($user, $notrigger=0) @@ -1543,7 +1543,7 @@ class SupplierProposal extends CommonObject * @param User $user Object user that close * @param int $statut Statut * @param string $note Comment - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ function reopen($user, $statut, $note='', $notrigger=0) @@ -1891,7 +1891,7 @@ class SupplierProposal extends CommonObject * Delete askprice * * @param User $user Object user that delete - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int 1 if ok, otherwise if error */ function delete($user, $notrigger=0) @@ -2725,7 +2725,7 @@ class SupplierProposalLine extends CommonObject /** * Insert object line propal in database * - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ function insert($notrigger=0) @@ -2907,7 +2907,7 @@ class SupplierProposalLine extends CommonObject /** * Update propal line object into DB * - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if ko, >0 if ok */ function update($notrigger=0) From 8dc6a8fd1d7b160f225e3fde03d4e08406cbcc14 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Sat, 24 Sep 2016 14:47:51 +0200 Subject: [PATCH 3/3] Correct presentation --- htdocs/compta/paiement/cheque/card.php | 24 +++++++++++++----------- htdocs/compta/prelevement/create.php | 2 +- htdocs/ecm/docdir.php | 12 ++++++------ 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/htdocs/compta/paiement/cheque/card.php b/htdocs/compta/paiement/cheque/card.php index b7e7af581de..8d43e573696 100644 --- a/htdocs/compta/paiement/cheque/card.php +++ b/htdocs/compta/paiement/cheque/card.php @@ -3,8 +3,8 @@ * Copyright (C) 2007-2011 Laurent Destailleur * Copyright (C) 2009-2012 Regis Houssin * Copyright (C) 2011-2016 Juanjo Menent - * Copyright (C) 2013 Philippe Grand - * Copyright (C) 2015 Alexandre Spangaro + * Copyright (C) 2013 Philippe Grand + * Copyright (C) 2015-2016 Alexandre Spangaro * * 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 @@ -21,9 +21,9 @@ */ /** - * \file htdocs/compta/paiement/cheque/card.php - * \ingroup bank, invoice - * \brief Page for cheque deposits + * \file htdocs/compta/paiement/cheque/card.php + * \ingroup bank, invoice + * \brief Page for cheque deposits */ require '../../../main.inc.php'; @@ -298,7 +298,9 @@ if (GETPOST('removefilter')) $filteraccountid=0; } -llxHeader(); +$title=$langs->trans("Cheques") . " - " . $langs->trans("Card"); +$helpurl=""; +llxHeader("",$title,$helpurl); $form = new Form($db); $formfile = new FormFile($db); @@ -386,7 +388,7 @@ if ($action == 'new') print ''; //print ''; // Filter - print ''; print '\n"; print '\n"; print ''; - + // Link to payment print ''; - + print '' ; @@ -563,7 +565,7 @@ else $accountstatic->label=$object->account_label; print '
'.$langs->trans('Date').''.dol_print_date($now,'day').'
'.$langs->trans("DateChequeReceived").''; + print '
'.$langs->trans("DateChequeReceived").''; print $form->select_date($filterdate,'fd',0,0,1,'',1,1,1); print '
'.$langs->trans("BankAccount").''; @@ -502,7 +504,7 @@ if ($action == 'new') print ''.$value["emetteur"]."'.$value["banque"]."'.price($value["amount"], 0, $langs, 1, -1, -1, $conf->currency).''; $paymentstatic->id=$value["paymentid"]; @@ -528,7 +530,7 @@ if ($action == 'new') print ' '; } print ''; print ''; print '
'; - print '
'; + print '
'; print '
'; print $langs->trans('Ref'); @@ -760,7 +762,7 @@ else dol_print_error($db); } - dol_fiche_end(); + dol_fiche_end(); } diff --git a/htdocs/compta/prelevement/create.php b/htdocs/compta/prelevement/create.php index 3350f5c34a3..8be897990ed 100644 --- a/htdocs/compta/prelevement/create.php +++ b/htdocs/compta/prelevement/create.php @@ -122,7 +122,7 @@ if ($nb < 0 || $nb1 < 0 || $nb11 < 0) } print ''; -print ''; +print ''; print ''; diff --git a/htdocs/ecm/docdir.php b/htdocs/ecm/docdir.php index 7cd3a235c6b..26372b7994d 100644 --- a/htdocs/ecm/docdir.php +++ b/htdocs/ecm/docdir.php @@ -1,7 +1,7 @@ * Copyright (C) 2008-2012 Regis Houssin - * Copyright (C) 2015 Alexandre Spangaro + * Copyright (C) 2015-2016 Alexandre Spangaro * * 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 @@ -18,9 +18,9 @@ */ /** - * \file htdocs/ecm/docdir.php - * \ingroup ecm - * \brief Main page for ECM section area + * \file htdocs/ecm/docdir.php + * \ingroup ecm + * \brief Main page for ECM section area */ require '../main.inc.php'; @@ -160,7 +160,7 @@ if ($action == 'create') print '
'.$langs->trans("NbOfInvoiceToWithdraw").'
'.$langs->trans("NbOfInvoiceToWithdraw").''; print $nb; print '
'; // Label - print ''."\n"; + print ''."\n"; print ''."\n"; print '
'.$langs->trans("Label").'
'.$langs->trans("Label").'
'.$langs->trans("AddIn").''; print $formecm->select_all_sections(! empty($_GET["catParent"])?$_GET["catParent"]:$ecmdir->fk_parent,'catParent'); @@ -176,7 +176,7 @@ if ($action == 'create') print '

'; - + dol_fiche_end(); print '
';