diff --git a/htdocs/bookmarks/class/bookmark.class.php b/htdocs/bookmarks/class/bookmark.class.php index 5422e7d7190..f66ef8e4d80 100644 --- a/htdocs/bookmarks/class/bookmark.class.php +++ b/htdocs/bookmarks/class/bookmark.class.php @@ -159,7 +159,7 @@ class Bookmark extends CommonObject $sql.= ", ".$this->db->escape($conf->entity); $sql.= ")"; - dol_syslog("Bookmark::update", LOG_DEBUG); + dol_syslog("Bookmark::create", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index b9d19ba5b64..6edb9a42110 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -171,6 +171,10 @@ class Account extends CommonObject * @var string */ public $account_number; + + /** + * @var int ID + */ public $fk_accountancy_journal; /** @@ -1704,16 +1708,37 @@ class AccountLine extends CommonObject public $label; public $note; + + /** + * @var int ID + */ public $fk_user_author; + + /** + * @var int ID + */ public $fk_user_rappro; + + /** + * @var int ID + */ public $fk_type; + public $rappro; // Is it conciliated public $num_releve; // If conciliated, what is bank statement public $num_chq; // Num of cheque public $bank_chq; // Bank of cheque - public $fk_bordereau; // Id of cheque receipt - public $fk_account; // Id of bank account + /** + * @var int ID of cheque receipt + */ + public $fk_bordereau; + + /** + * @var int ID of bank account + */ + public $fk_account; + public $bank_account_label; // Label of bank account /** diff --git a/htdocs/compta/bank/class/paymentvarious.class.php b/htdocs/compta/bank/class/paymentvarious.class.php index c3b6e942e1a..45a992b5cb8 100644 --- a/htdocs/compta/bank/class/paymentvarious.class.php +++ b/htdocs/compta/bank/class/paymentvarious.class.php @@ -69,9 +69,25 @@ class PaymentVarious extends CommonObject public $label; public $accountancy_code; + + /** + * @var int ID + */ public $fk_project; + + /** + * @var int ID + */ public $fk_bank; + + /** + * @var int ID + */ public $fk_user_author; + + /** + * @var int ID + */ public $fk_user_modif; diff --git a/htdocs/compta/deplacement/class/deplacement.class.php b/htdocs/compta/deplacement/class/deplacement.class.php index cf08960d99e..2476f65b09f 100644 --- a/htdocs/compta/deplacement/class/deplacement.class.php +++ b/htdocs/compta/deplacement/class/deplacement.class.php @@ -59,6 +59,10 @@ class Deplacement extends CommonObject public $datec; // Creation date public $dated; + + /** + * @var int ID + */ public $fk_user_author; /** diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 98222fafc00..5912e8b6489 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -98,8 +98,17 @@ class Facture extends CommonInvoice public $socid; public $author; + + /** + * @var int ID + */ public $fk_user_author; + + /** + * @var int ID + */ public $fk_user_valid; + public $date; // Date invoice public $date_creation; // Creation date public $date_validation; // Validation date @@ -138,7 +147,11 @@ class Facture extends CommonInvoice public $date_lim_reglement; public $cond_reglement_code; // Code in llx_c_paiement public $mode_reglement_code; // Code in llx_c_paiement - public $fk_bank; // Field to store bank id to use when payment mode is withdraw + + /** + * @var int ID Field to store bank id to use when payment mode is withdraw + */ + public $fk_bank; /** * @deprecated @@ -157,7 +170,11 @@ class Facture extends CommonInvoice public $fac_rec; // Multicurrency + /** + * @var int ID + */ public $fk_multicurrency; + public $multicurrency_code; public $multicurrency_tx; public $multicurrency_total_ht; @@ -4318,42 +4335,42 @@ class FactureLigne extends CommonInvoiceLine */ public $table_element='facturedet'; - var $oldline; + public $oldline; //! From llx_facturedet //! Id facture - var $fk_facture; + public $fk_facture; //! Id parent line - var $fk_parent_line; + public $fk_parent_line; /** * @deprecated */ - var $label; + public $label; //! Description ligne - var $desc; + public $desc; - var $localtax1_type; // Local tax 1 type - var $localtax2_type; // Local tax 2 type - var $fk_remise_except; // Link to line into llx_remise_except - var $rang = 0; + public $localtax1_type; // Local tax 1 type + public $localtax2_type; // Local tax 2 type + public $fk_remise_except; // Link to line into llx_remise_except + public $rang = 0; - var $fk_fournprice; - var $pa_ht; - var $marge_tx; - var $marque_tx; + public $fk_fournprice; + public $pa_ht; + public $marge_tx; + public $marque_tx; - var $special_code; // Liste d'options non cumulabels: + public $special_code; // Liste d'options non cumulabels: // 1: frais de port // 2: ecotaxe // 3: ?? - var $origin; - var $origin_id; + public $origin; + public $origin_id; - var $fk_code_ventilation = 0; + public $fk_code_ventilation = 0; - var $date_start; - var $date_end; + public $date_start; + public $date_end; // Ne plus utiliser //var $price; // P.U. HT apres remise % de ligne (exemple 80) @@ -4364,17 +4381,17 @@ class FactureLigne extends CommonInvoiceLine * @deprecated * @see product_ref */ - var $ref; // Product ref (deprecated) - var $product_ref; // Product ref + public $ref; // Product ref (deprecated) + public $product_ref; // Product ref /** * @deprecated * @see product_label */ - var $libelle; // Product label (deprecated) - var $product_label; // Product label - var $product_desc; // Description produit + public $libelle; // Product label (deprecated) + public $product_label; // Product label + public $product_desc; // Description produit - var $skip_update_total; // Skip update price total for special lines + public $skip_update_total; // Skip update price total for special lines /** * @var int Situation advance percentage @@ -4387,12 +4404,12 @@ class FactureLigne extends CommonInvoiceLine public $fk_prev_id; // Multicurrency - var $fk_multicurrency; - var $multicurrency_code; - var $multicurrency_subprice; - var $multicurrency_total_ht; - var $multicurrency_total_tva; - var $multicurrency_total_ttc; + public $fk_multicurrency; + public $multicurrency_code; + public $multicurrency_subprice; + public $multicurrency_total_ht; + public $multicurrency_total_tva; + public $multicurrency_total_ttc; /** * Load invoice line from database diff --git a/htdocs/compta/localtax/class/localtax.class.php b/htdocs/compta/localtax/class/localtax.class.php index 6838f9a65b2..49c95c26c2e 100644 --- a/htdocs/compta/localtax/class/localtax.class.php +++ b/htdocs/compta/localtax/class/localtax.class.php @@ -55,8 +55,19 @@ class Localtax extends CommonObject */ public $label; + /** + * @var int ID + */ public $fk_bank; + + /** + * @var int ID + */ public $fk_user_creat; + + /** + * @var int ID + */ public $fk_user_modif; /** diff --git a/htdocs/compta/salaries/class/paymentsalary.class.php b/htdocs/compta/salaries/class/paymentsalary.class.php index ea67873c2ee..4da78cb492d 100644 --- a/htdocs/compta/salaries/class/paymentsalary.class.php +++ b/htdocs/compta/salaries/class/paymentsalary.class.php @@ -56,7 +56,12 @@ class PaymentSalary extends CommonObject public $datep; public $datev; public $amount; + + /** + * @var int ID + */ public $fk_project; + public $type_payment; public $num_payment; @@ -67,8 +72,20 @@ class PaymentSalary extends CommonObject public $datesp; public $dateep; + + /** + * @var int ID + */ public $fk_bank; + + /** + * @var int ID + */ public $fk_user_author; + + /** + * @var int ID + */ public $fk_user_modif; diff --git a/htdocs/compta/sociales/class/cchargesociales.class.php b/htdocs/compta/sociales/class/cchargesociales.class.php index 9013edee195..a8f5c430691 100644 --- a/htdocs/compta/sociales/class/cchargesociales.class.php +++ b/htdocs/compta/sociales/class/cchargesociales.class.php @@ -48,7 +48,12 @@ class Cchargesociales public $deductible; public $active; public $code; + + /** + * @var int ID + */ public $fk_pays; + public $module; public $accountancy_code; diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php index aa5786d0eb5..e44d02f83e2 100644 --- a/htdocs/compta/sociales/class/chargesociales.class.php +++ b/htdocs/compta/sociales/class/chargesociales.class.php @@ -64,7 +64,15 @@ class ChargeSociales extends CommonObject public $date_creation; public $date_modification; public $date_validation; + + /** + * @var int ID + */ public $fk_account; + + /** + * @var int ID + */ public $fk_project; diff --git a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php index 442e63efe11..b6ff4a49337 100644 --- a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php +++ b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php @@ -46,7 +46,11 @@ class PaymentSocialContribution extends CommonObject */ public $picto = 'payment'; + /** + * @var int ID + */ public $fk_charge; + public $datec=''; public $tms=''; public $datep=''; @@ -59,10 +63,27 @@ class PaymentSocialContribution extends CommonObject public $amount; // Total amount of payment public $amounts=array(); // Array of amounts + + /** + * @var int ID + */ public $fk_typepaiement; + public $num_paiement; + + /** + * @var int ID + */ public $fk_bank; + + /** + * @var int ID + */ public $fk_user_creat; + + /** + * @var int ID + */ public $fk_user_modif; /** diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php index 8b407c9be61..df5e8dfe76c 100644 --- a/htdocs/compta/tva/class/tva.class.php +++ b/htdocs/compta/tva/class/tva.class.php @@ -60,8 +60,19 @@ class Tva extends CommonObject */ public $label; + /** + * @var int ID + */ public $fk_bank; + + /** + * @var int ID + */ public $fk_user_creat; + + /** + * @var int ID + */ public $fk_user_modif; /** diff --git a/htdocs/core/modules/modDataPolicies.class.php b/htdocs/core/modules/modDataPolicies.class.php index f8727d46f83..74bbe0ba7d2 100644 --- a/htdocs/core/modules/modDataPolicies.class.php +++ b/htdocs/core/modules/modDataPolicies.class.php @@ -91,8 +91,6 @@ class modDataPolicies extends DolibarrModules { 'tpl' => 0, // Set this to 1 if module overwrite template dir (core/tpl) 'barcode' => 0, // Set this to 1 if module has its own barcode directory (core/modules/barcode) 'models' => 0, // Set this to 1 if module has its own models directory (core/modules/xxx) - 'css' => array('/datapolicies/css/datapolicies.css.php'), // Set this to relative path of css file if module has its own css file - 'js' => array('/datapolicies/js/datapolicies.js.php'), // Set this to relative path of js file if module must load a js on all pages 'hooks' => array('data' => array('membercard', 'contactcard', 'thirdpartycard'), 'entity' => $conf->entity) // Set here all hooks context managed by module. To find available hook context, make a "grep -r '>initHooks(' *" on source code. You can also set hook context 'all' ); @@ -121,17 +119,17 @@ class modDataPolicies extends DolibarrModules { // 1=>array('datapolicies_MYNEWCONST2','chaine','myvalue','This is another constant to add',0, 'current', 1) // ); $this->const = array( - array('DATAPOLICIES_TIERS_CLIENT', 'chaine', '', 'Nombre de mois avant suppression des données', 0), - array('DATAPOLICIES_TIERS_PROSPECT', 'chaine', '', 'Nombre de mois avant suppression des données', 0), - array('DATAPOLICIES_TIERS_PROSPECT_CLIENT', 'chaine', '', 'Nombre de mois avant suppression des données', 0), - array('DATAPOLICIES_TIERS_NIPROSPECT_NICLIENT', 'chaine', '', 'Nombre de mois avant suppression des données', 0), - array('DATAPOLICIES_TIERS_FOURNISSEUR', 'chaine', '', 'Nombre de mois avant suppression des données', 0), - array('DATAPOLICIES_CONTACT_CLIENT', 'chaine', '', 'Nombre de mois avant suppression des données', 0), - array('DATAPOLICIES_CONTACT_PROSPECT', 'chaine', '', 'Nombre de mois avant suppression des données', 0), - array('DATAPOLICIES_CONTACT_PROSPECT_CLIENT', 'chaine', '', 'Nombre de mois avant suppression des données', 0), - array('DATAPOLICIES_CONTACT_NIPROSPECT_NICLIENT', 'chaine', '', 'Nombre de mois avant suppression des données', 0), - array('DATAPOLICIES_CONTACT_FOURNISSEUR', 'chaine', '', 'Nombre de mois avant suppression des données', 0), - array('DATAPOLICIES_ADHERENT', 'chaine', '', 'Nombre de mois avant suppression des données', 0), + array('DATAPOLICIES_TIERS_CLIENT', 'chaine', '', $langs->trans('NUMBER_MONTH_BEFORE_DELETION'), 0), + array('DATAPOLICIES_TIERS_PROSPECT', 'chaine', '', $langs->trans('NUMBER_MONTH_BEFORE_DELETION'), 0), + array('DATAPOLICIES_TIERS_PROSPECT_CLIENT', 'chaine', '', $langs->trans('NUMBER_MONTH_BEFORE_DELETION'), 0), + array('DATAPOLICIES_TIERS_NIPROSPECT_NICLIENT', 'chaine', '', $langs->trans('NUMBER_MONTH_BEFORE_DELETION'), 0), + array('DATAPOLICIES_TIERS_FOURNISSEUR', 'chaine', '', $langs->trans('NUMBER_MONTH_BEFORE_DELETION'), 0), + array('DATAPOLICIES_CONTACT_CLIENT', 'chaine', '', $langs->trans('NUMBER_MONTH_BEFORE_DELETION'), 0), + array('DATAPOLICIES_CONTACT_PROSPECT', 'chaine', '', $langs->trans('NUMBER_MONTH_BEFORE_DELETION'), 0), + array('DATAPOLICIES_CONTACT_PROSPECT_CLIENT', 'chaine', '', $langs->trans('NUMBER_MONTH_BEFORE_DELETION'), 0), + array('DATAPOLICIES_CONTACT_NIPROSPECT_NICLIENT', 'chaine', '', $langs->trans('NUMBER_MONTH_BEFORE_DELETION'), 0), + array('DATAPOLICIES_CONTACT_FOURNISSEUR', 'chaine', '', $langs->trans('NUMBER_MONTH_BEFORE_DELETION'), 0), + array('DATAPOLICIES_ADHERENT', 'chaine', '', $langs->trans('NUMBER_MONTH_BEFORE_DELETION'), 0), ); $country = explode(":", $conf->global->MAIN_INFO_SOCIETE_COUNTRY); @@ -235,25 +233,25 @@ class modDataPolicies extends DolibarrModules { // Extrafield contact //$result1=$extrafields->addExtraField('datapolicies_separate', "DATAPOLICIES_BLOCKCHECKBOX", 'separate', 100, 1, 'thirdparty', 0, 0, '', '', 1, '', '1', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled'); - $result1 = $extrafields->addExtraField('datapolicies_consentement', "DATAPOLICIES_consentement", 'boolean', 101, 3, 'thirdparty', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled'); - $result1 = $extrafields->addExtraField('datapolicies_opposition_traitement', "DATAPOLICIES_opposition_traitement", 'boolean', 102, 3, 'thirdparty', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled'); - $result1 = $extrafields->addExtraField('datapolicies_opposition_prospection', "DATAPOLICIES_opposition_prospection", 'boolean', 103, 3, 'thirdparty', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled'); + $result1 = $extrafields->addExtraField('datapolicies_consentement', $langs->trans("DATAPOLICIES_consentement"), 'boolean', 101, 3, 'thirdparty', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled'); + $result1 = $extrafields->addExtraField('datapolicies_opposition_traitement', $langs->trans("DATAPOLICIES_opposition_traitement"), 'boolean', 102, 3, 'thirdparty', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled'); + $result1 = $extrafields->addExtraField('datapolicies_opposition_prospection', $langs->trans("DATAPOLICIES_opposition_prospection"), 'boolean', 103, 3, 'thirdparty', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled'); $result1 = $extrafields->addExtraField('datapolicies_date', $langs->trans("DATAPOLICIES_date"), 'date', 104, 3, 'thirdparty', 0, 0, '', '', 1, '', '3', 0); $result1 = $extrafields->addExtraField('datapolicies_send', $langs->trans("DATAPOLICIES_send"), 'date', 105, 3, 'thirdparty', 0, 0, '', '', 0, '', '0', 0); // Extrafield Tiers //$result1=$extrafields->addExtraField('datapolicies_separate', "DATAPOLICIES_BLOCKCHECKBOX", 'separate', 100, 1, 'contact', 0, 0, '', '', 1, '', '1', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled'); - $result1 = $extrafields->addExtraField('datapolicies_consentement', "DATAPOLICIES_consentement", 'boolean', 101, 3, 'contact', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled'); - $result1 = $extrafields->addExtraField('datapolicies_opposition_traitement', "DATAPOLICIES_opposition_traitement", 'boolean', 102, 3, 'contact', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled'); - $result1 = $extrafields->addExtraField('datapolicies_opposition_prospection', "DATAPOLICIES_opposition_prospection", 'boolean', 103, 3, 'contact', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled'); + $result1 = $extrafields->addExtraField('datapolicies_consentement', $langs->trans("DATAPOLICIES_consentement"), 'boolean', 101, 3, 'contact', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled'); + $result1 = $extrafields->addExtraField('datapolicies_opposition_traitement', $langs->trans("DATAPOLICIES_opposition_traitement"), 'boolean', 102, 3, 'contact', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled'); + $result1 = $extrafields->addExtraField('datapolicies_opposition_prospection', $langs->trans("DATAPOLICIES_opposition_prospection"), 'boolean', 103, 3, 'contact', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled'); $result1 = $extrafields->addExtraField('datapolicies_date', $langs->trans("DATAPOLICIES_date"), 'date', 104, 3, 'contact', 0, 0, '', '', 1, '', '3', 0); $result1 = $extrafields->addExtraField('datapolicies_send', $langs->trans("DATAPOLICIES_send"), 'date', 105, 3, 'contact', 0, 0, '', '', 0, '', '0', 0); // Extrafield Adherent //$result1=$extrafields->addExtraField('datapolicies_separate', "DATAPOLICIES_BLOCKCHECKBOX", 'separate', 100, 1, 'adherent', 0, 0, '', '', 1, '', '1', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled'); - $result1 = $extrafields->addExtraField('datapolicies_consentement', "DATAPOLICIES_consentement", 'boolean', 101, 3, 'adherent', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled'); - $result1 = $extrafields->addExtraField('datapolicies_opposition_traitement', "DATAPOLICIES_opposition_traitement", 'boolean', 102, 3, 'adherent', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled'); - $result1 = $extrafields->addExtraField('datapolicies_opposition_prospection', "DATAPOLICIES_opposition_prospection", 'boolean', 103, 3, 'adherent', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled'); + $result1 = $extrafields->addExtraField('datapolicies_consentement', $langs->trans("DATAPOLICIES_consentement"), 'boolean', 101, 3, 'adherent', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled'); + $result1 = $extrafields->addExtraField('datapolicies_opposition_traitement', $langs->trans("DATAPOLICIES_opposition_traitement"), 'boolean', 102, 3, 'adherent', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled'); + $result1 = $extrafields->addExtraField('datapolicies_opposition_prospection', $langs->trans("DATAPOLICIES_opposition_prospection"), 'boolean', 103, 3, 'adherent', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled'); $result1 = $extrafields->addExtraField('datapolicies_date', $langs->trans("DATAPOLICIES_date"), 'date', 104, 3, 'adherent', 0, 0, '', '', 1, '', '3', 0); $result1 = $extrafields->addExtraField('datapolicies_send', $langs->trans("DATAPOLICIES_send"), 'date', 105, 3, 'adherent', 0, 0, '', '', 0, '', '0', 0); diff --git a/htdocs/datapolicies/class/actions_datapolicies.class.php b/htdocs/datapolicies/class/actions_datapolicies.class.php index 839d3f8ae07..d65de390b8c 100644 --- a/htdocs/datapolicies/class/actions_datapolicies.class.php +++ b/htdocs/datapolicies/class/actions_datapolicies.class.php @@ -1,5 +1,5 @@ * Copyright (C) 2018 Frédéric France * * This program is free software: you can redistribute it and/or modify @@ -134,7 +134,7 @@ class ActionsDatapolicies header('Content-Disposition: attachment; filename=datapolicies_portabilite.csv'); header('Pragma: no-cache'); $object->fetch(GETPOST('socid')); - echo 'Nom;Prénom;Civilite;Tiers;Poste/Fonction;Adresse;CP;Ville;Département;Pays;Email;Tel Pro;Tel Perso;Tel Portable;Messagerie instantanée;Date de naissance;' . PHP_EOL; + echo 'Name;Fistname;Civility;Thirdparty;Function;Address;ZipCode;City;Department;Country;Email;Pro Phone;Perso Phone;Mobile Phone;Instant Mail;Birthday;' . PHP_EOL; echo $object->name . ';'; echo ';'; echo ';'; @@ -158,7 +158,7 @@ class ActionsDatapolicies header('Pragma: no-cache'); $soc = $object->fetch_thirdparty(); - echo 'Nom;Prénom;Civilite;Tiers;Poste/Fonction;Adresse;CP;Ville;Département;Pays;Email;Tel Pro;Tel Perso;Tel Portable;Messagerie instantanée;Date de naissance;' . PHP_EOL; + echo 'Name;Fistname;Civility;Thirdparty;Function;Address;ZipCode;City;Department;Country;Email;Pro Phone;Perso Phone;Mobile Phone;Instant Mail;Birthday;' . PHP_EOL; echo $object->lastname . ';'; echo $object->firstname . ';'; echo $object->getCivilityLabel() . ';'; @@ -182,7 +182,7 @@ class ActionsDatapolicies header('Content-Disposition: attachment; filename=datapolicies_portabilite.csv'); header('Pragma: no-cache'); $soc = $object->fetch_thirdparty(); - echo 'Nom;Prénom;Civilite;Tiers;Poste/Fonction;Adresse;CP;Ville;Département;Pays;Email;Tel Pro;Tel Perso;Tel Portable;Messagerie instantanée;Date de naissance;' . PHP_EOL; + echo 'Name;Fistname;Civility;Thirdparty;Function;Address;ZipCode;City;Department;Country;Email;Pro Phone;Perso Phone;Mobile Phone;Instant Mail;Birthday;' . PHP_EOL; echo $object->lastname . ';'; echo $object->firstname . ';'; echo $object->getCivilityLabel() . ';'; diff --git a/htdocs/datapolicies/class/datapolicies.class.php b/htdocs/datapolicies/class/datapolicies.class.php index 1fbf1f71d45..4b21dba1d9a 100644 --- a/htdocs/datapolicies/class/datapolicies.class.php +++ b/htdocs/datapolicies/class/datapolicies.class.php @@ -1,5 +1,5 @@ * * 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 @@ -56,7 +56,6 @@ Class DataPolicies extends Contact $i = 0; while ($i < $num) { $obj = $this->db->fetch_object($resql); - //echo "
".print_r($obj,1)."
"; $contact = new Contact($db); $contact->fetch($obj->rowid); @@ -92,7 +91,6 @@ Class DataPolicies extends Contact $i = 0; while ($i < $num) { $obj = $this->db->fetch_object($resql); - //echo "
".print_r($obj,1)."
"; $societe = new Societe($db); $societe->fetch($obj->rowid); @@ -128,7 +126,6 @@ Class DataPolicies extends Contact $i = 0; while ($i < $num) { $obj = $this->db->fetch_object($resql); - //echo "
".print_r($obj,1)."
"; $adherent = new Adherent($db); $adherent->fetch($obj->rowid); @@ -153,7 +150,6 @@ Class DataPolicies extends Contact $from = $user->getFullName($langs) . ' <' . $user->email . '>'; $replyto = $from; $sendto = $contact->email; - //echo "
".print_r($contact,1)."
"; $code= md5($contact->email); if (!empty($contact->default_lang)) { $l = $contact->default_lang; @@ -243,8 +239,8 @@ Class DataPolicies extends Contact $substitutionarray = array( - '__LINKACCEPT__' => ''.$linka.'', - '__LINKREFUSED__' => ''.$linkr.'', + '__LINKACCEPT__' => ''.$linka.'', + '__LINKREFUSED__' => ''.$linkr.'', ); $subject = make_substitutions($subject, $substitutionarray); $message = make_substitutions($message, $substitutionarray); @@ -308,8 +304,8 @@ Class DataPolicies extends Contact $substitutionarray = array( - '__LINKACCEPT__' => ''.$linka.'', - '__LINKREFUSED__' => ''.$linkr.'', + '__LINKACCEPT__' => ''.$linka.'', + '__LINKREFUSED__' => ''.$linkr.'', ); $subject = make_substitutions($subject, $substitutionarray); $message = make_substitutions($message, $substitutionarray); diff --git a/htdocs/datapolicies/class/datapoliciescron.class.php b/htdocs/datapolicies/class/datapoliciescron.class.php index 0de8e0b0635..c87df67498d 100644 --- a/htdocs/datapolicies/class/datapoliciescron.class.php +++ b/htdocs/datapolicies/class/datapoliciescron.class.php @@ -1,5 +1,5 @@ * Copyright (C) 2018 Frédéric France * * This program is free software: you can redistribute it and/or modify diff --git a/htdocs/datapolicies/css/datapolicies.css.php b/htdocs/datapolicies/css/datapolicies.css.php deleted file mode 100644 index 2e573ef92c3..00000000000 --- a/htdocs/datapolicies/css/datapolicies.css.php +++ /dev/null @@ -1,61 +0,0 @@ -. - */ - -/** - * \file rgpd/css/rgpd.css.php - * \ingroup rgpd - * \brief CSS file for module rgpd. - */ - -//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled because need to load personalized language -//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled. Language code is found on url. -if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Not disabled because need to do translations -if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK',1); -if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL',1); -if (! defined('NOLOGIN')) define('NOLOGIN',1); // File must be accessed by logon page so without login -//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1); // We need top menu content -if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1); -if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); - -require '../../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - -session_cache_limiter(false); - -// Load user to have $user->conf loaded (not done by default here because of NOLOGIN constant defined) and load permission if we need to use them in CSS -/*if (empty($user->id) && ! empty($_SESSION['dol_login'])) -{ - $user->fetch('',$_SESSION['dol_login']); - $user->getrights(); -}*/ - - -// Define css type -header('Content-type: text/css'); -// Important: Following code is to cache this file to avoid page request by browser at each Dolibarr page access. -// You can use CTRL+F5 to refresh your browser cache. -if (empty($dolibarr_nocache)) header('Cache-Control: max-age=3600, public, must-revalidate'); -else header('Cache-Control: no-cache'); - -?> - -.myclasscss { - /* ... */ -} - - diff --git a/htdocs/datapolicies/js/datapolicies.js.php b/htdocs/datapolicies/js/datapolicies.js.php deleted file mode 100644 index 4433ab8ab81..00000000000 --- a/htdocs/datapolicies/js/datapolicies.js.php +++ /dev/null @@ -1,59 +0,0 @@ -. - * - * Library javascript to enable Browser notifications - */ - -if (!defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); -if (!defined('NOREQUIREDB')) define('NOREQUIREDB','1'); -if (!defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); -if (!defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); -if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', 1); -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', 1); -if (!defined('NOLOGIN')) define('NOLOGIN', 1); -if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', 1); -if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', 1); -if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); - - -/** - * \file datapolicies/js/datapolicies.js.php - * \ingroup datapolicies - * \brief JavaScript file for module datapolicies. - */ - -// Load Dolibarr environment -$res=0; -// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) -if (! $res && ! empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) $res=@include($_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"); -// Try main.inc.php into web root detected using web root caluclated from SCRIPT_FILENAME -$tmp=empty($_SERVER['SCRIPT_FILENAME'])?'':$_SERVER['SCRIPT_FILENAME'];$tmp2=realpath(__FILE__); $i=strlen($tmp)-1; $j=strlen($tmp2)-1; -while($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i]==$tmp2[$j]) { $i--; $j--; } -if (! $res && $i > 0 && file_exists(substr($tmp, 0, ($i+1))."/main.inc.php")) $res=@include(substr($tmp, 0, ($i+1))."/main.inc.php"); -if (! $res && $i > 0 && file_exists(substr($tmp, 0, ($i+1))."/../main.inc.php")) $res=@include(substr($tmp, 0, ($i+1))."/../main.inc.php"); -// Try main.inc.php using relative path -if (! $res && file_exists("../../main.inc.php")) $res=@include("../../main.inc.php"); -if (! $res && file_exists("../../../main.inc.php")) $res=@include("../../../main.inc.php"); -if (! $res) die("Include of main fails"); - -// Define js type -header('Content-Type: application/javascript'); -// Important: Following code is to cache this file to avoid page request by browser at each Dolibarr page access. -// You can use CTRL+F5 to refresh your browser cache. -if (empty($dolibarr_nocache)) header('Cache-Control: max-age=3600, public, must-revalidate'); -else header('Cache-Control: no-cache'); -?> - diff --git a/htdocs/datapolicies/langs/en_US/datapolicies.lang b/htdocs/datapolicies/langs/en_US/datapolicies.lang index 0afff450b38..164581bcca5 100644 --- a/htdocs/datapolicies/langs/en_US/datapolicies.lang +++ b/htdocs/datapolicies/langs/en_US/datapolicies.lang @@ -1,4 +1,4 @@ -# Copyright (C) 2018 SuperAdmin +# Copyright (C) 2018 Nicolas ZABOURI # # 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 @@ -90,3 +90,4 @@ MailSent = Email has been sent #ERROR ErrorSubjectIsRequired= Error : The subject of email is required. Indicate it in the module setup =Due to a technical problem, we were unable to register your choice. We apologize for that. Contact us to send us your choice. +NUMBER_MONTH_BEFORE_DELETION = Number of month before deletion diff --git a/htdocs/datapolicies/langs/fr_FR/datapolicies.lang b/htdocs/datapolicies/langs/fr_FR/datapolicies.lang index ba024fbb2fb..916cdffb776 100644 --- a/htdocs/datapolicies/langs/fr_FR/datapolicies.lang +++ b/htdocs/datapolicies/langs/fr_FR/datapolicies.lang @@ -1,4 +1,4 @@ -# Copyright (C) 2018 INOVEA CONSEIl info@inovea-conseil.com +# Copyright (C) 2018 INOVEA CONSEil info@inovea-conseil.com # # 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 @@ -94,3 +94,4 @@ MailSent=L'email a bien été envoyé #ERROR ErrorSubjectIsRequired=Erreur : vous n'avez pas indiqué l'objet de l'email dans la configuration =Suite à un problème technique, nous n'avons pas pu enregistrer votre choix. Nous nous en excusons. Contactez-nous pour nous transmettre votre choix. +NUMBER_MONTH_BEFORE_DELETION = Nombre de mois avant suppression des données diff --git a/htdocs/datapolicies/lib/datapolicies.lib.php b/htdocs/datapolicies/lib/datapolicies.lib.php index d02668d40fc..59366d1f93d 100644 --- a/htdocs/datapolicies/lib/datapolicies.lib.php +++ b/htdocs/datapolicies/lib/datapolicies.lib.php @@ -1,5 +1,5 @@ * * 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 @@ -45,14 +45,6 @@ function datapoliciesAdminPrepareHead() $head[$h][2] = 'settings'; $h++; - // Show more tabs from modules - // Entries must be declared in modules descriptor with line - //$this->tabs = array( - // 'entity:+tabname:Title:@datapolicies:/datapolicies/mypage.php?id=__ID__' - //); // to add new tab - //$this->tabs = array( - // 'entity:-tabname:Title:@datapolicies:/datapolicies/mypage.php?id=__ID__' - //); // to remove a tab complete_head_from_modules($conf, $langs, $object, $head, $h, 'datapolicies'); return $head; diff --git a/htdocs/install/mysql/migration/8.0.0-9.0.0.sql b/htdocs/install/mysql/migration/8.0.0-9.0.0.sql index 476eac1c4d9..09908ac86f5 100644 --- a/htdocs/install/mysql/migration/8.0.0-9.0.0.sql +++ b/htdocs/install/mysql/migration/8.0.0-9.0.0.sql @@ -73,6 +73,9 @@ ALTER TABLE llx_payment_salary ADD COLUMN fk_projet integer DEFAULT NULL after a ALTER TABLE llx_categorie ADD COLUMN ref_ext varchar(255); +ALTER TABLE llx_paiement ADD COLUMN ext_payment_id varchar(128); +ALTER TABLE llx_paiement ADD COLUMN ext_payment_site varchar(128); + ALTER TABLE llx_societe ADD COLUMN twitter varchar(255) after skype; ALTER TABLE llx_societe ADD COLUMN facebook varchar(255) after skype; ALTER TABLE llx_societe ADD COLUMN instagram varchar(255) after skype; diff --git a/htdocs/install/mysql/tables/llx_paiement.sql b/htdocs/install/mysql/tables/llx_paiement.sql index 2a287ac7e89..eb372366fc9 100644 --- a/htdocs/install/mysql/tables/llx_paiement.sql +++ b/htdocs/install/mysql/tables/llx_paiement.sql @@ -31,6 +31,8 @@ create table llx_paiement fk_paiement integer NOT NULL, num_paiement varchar(50), note text, + ext_payment_id varchar(128), -- external id of payment (for example Stripe charge id) + ext_payment_site varchar(128), -- name of external paymentmode (for example "stripe") fk_bank integer NOT NULL DEFAULT 0, fk_user_creat integer, -- utilisateur qui a cree l'info fk_user_modif integer, -- utilisateur qui a modifie l'info diff --git a/htdocs/user/list.php b/htdocs/user/list.php index ebdf19b638e..64c63c05426 100644 --- a/htdocs/user/list.php +++ b/htdocs/user/list.php @@ -26,6 +26,9 @@ */ require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; +if (! empty($conf->categorie->enabled)) + require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; if (! $user->rights->user->user->lire && ! $user->admin) accessforbidden(); @@ -123,6 +126,8 @@ $search_thirdparty=GETPOST('search_thirdparty','alpha'); $search_supervisor=GETPOST('search_supervisor','intcomma'); $search_previousconn=GETPOST('search_previousconn','alpha'); $optioncss = GETPOST('optioncss','alpha'); +$search_categ = GETPOST("search_categ",'int'); +$catid = GETPOST('catid','int'); // Default search if ($search_statut == '') $search_statut='1'; @@ -165,6 +170,7 @@ if (empty($reshook)) $search_date_creation=""; $search_date_update=""; $search_array_options=array(); + $search_categ=0; } } @@ -173,6 +179,8 @@ if (empty($reshook)) * View */ +$htmlother=new FormOther($db); + $user2=new User($db); $buttonviewhierarchy='
'; @@ -193,6 +201,7 @@ $sql.= " FROM ".MAIN_DB_PREFIX."user as u"; if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user_extrafields as ef on (u.rowid = ef.fk_object)"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON u.fk_soc = s.rowid"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u2 ON u.fk_user = u2.rowid"; +if (! empty($search_categ) || ! empty($catid)) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_user as cu ON u.rowid = cu.fk_user"; // We'll need this table joined to the select in order to filter by categ // Add fields from hooks $parameters=array(); $reshook=$hookmanager->executeHooks('printUserListWhere',$parameters); // Note that $action and $object may have been modified by hook @@ -216,6 +225,10 @@ if ($search_accountancy_code != '') $sql.= natural_search("u.accountancy_code", if ($search_email != '') $sql.= natural_search("u.email", $search_email); if ($search_statut != '' && $search_statut >= 0) $sql.= " AND u.statut IN (".$db->escape($search_statut).")"; if ($sall) $sql.= natural_search(array_keys($fieldstosearchall), $sall); +if ($catid > 0) $sql.= " AND cu.fk_categorie = ".$catid; +if ($catid == -2) $sql.= " AND cu.fk_categorie IS NULL"; +if ($search_categ > 0) $sql.= " AND cu.fk_categorie = ".$db->escape($search_categ); +if ($search_categ == -2) $sql.= " AND cu.fk_categorie IS NULL"; // Add where from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; // Add where from hooks @@ -268,6 +281,7 @@ if ($search_supervisor > 0) $param.="&search_supervisor=".$search_supervisor; if ($search_statut != '') $param.="&search_statut=".$search_statut; if ($optioncss != '') $param.='&optioncss='.$optioncss; if ($mode != '') $param.='&mode='.$mode; +if ($search_categ > 0) $param.="&search_categ=".urlencode($search_categ); // Add $param from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; @@ -296,6 +310,15 @@ $morehtmlright = '"; + $c = new Categorie($db); + $ways = $c->print_all_ways(' > ','user/list.php'); + print " > ".$ways[0]."
\n"; + print "
"; +} + if ($sall) { foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val); @@ -304,7 +327,29 @@ if ($sall) $moreforfilter=''; +// Filter on categories +if (! empty($conf->categorie->enabled)) +{ + $moreforfilter.='
'; + $moreforfilter.=$langs->trans('Categories'). ': '; + $moreforfilter.=$htmlother->select_categories(Categorie::TYPE_USER,$search_categ,'search_categ',1); + $moreforfilter.='
'; +} + +$parameters=array(); +$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook +if (empty($reshook)) $moreforfilter.=$hookmanager->resPrint; +else $moreforfilter=$hookmanager->resPrint; + +if ($moreforfilter) +{ + print '
'; + print $moreforfilter; + print '
'; +} + $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; + $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields