From 70603214d8d380681ae4ea8dd59d6dd8d127204c Mon Sep 17 00:00:00 2001 From: Peter Fontaine Date: Thu, 10 Oct 2013 22:03:46 +0200 Subject: [PATCH 001/107] ignore Thumbs.db files --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 3ec764dec5b..b5fd3da5961 100755 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,5 @@ doxygen_warnings.log .DS_Store .idea *.iml +Thumbs.db + From cb487a536205109574c9a88fdffa6732233e8d77 Mon Sep 17 00:00:00 2001 From: Peter Fontaine Date: Mon, 28 Oct 2013 10:12:52 +0100 Subject: [PATCH 002/107] no message --- htdocs/langs/cs_CZ/printipp.lang | 36 ++++++++++++++++---------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/htdocs/langs/cs_CZ/printipp.lang b/htdocs/langs/cs_CZ/printipp.lang index e8aac6b848f..7ef2cd5649d 100644 --- a/htdocs/langs/cs_CZ/printipp.lang +++ b/htdocs/langs/cs_CZ/printipp.lang @@ -1,18 +1,18 @@ -/* - * Language code: cs_CZ - * Automatic generated via autotranslator.php tool - * Generation date 2013-10-26 11:58:10 - */ - - -// START - Lines generated via autotranslator.php tool (2013-10-26 11:58:10). -// Reference language: en_US -> cs_CZ -PrintIPPSetup=Nastavení modulu Přímý tisk -PrintIPPDesc=Ce modul Permet d'un ajouter Bouton d'dojem přímé des dokumenty vers votre imprimante. Il requiert un systeme Linux Equipe de poháry. -PRINTIPP_ENABLED=Zobrazit Piktogram "Přímý tisk" do seznamu dokumentů -PRINTIPP_HOST=Tiskový server -PRINTIPP_PORT=Přístav -PRINTIPP_USER=Přihlášení -PRINTIPP_PASSWORD=Heslo -NoPrinterFound=Žádné tiskárny nalezeny (zkontrolujte poháry Nasta) -// STOP - Lines generated via autotranslator.php tool (2013-10-26 12:39:36). +/* + * Language code: cs_CZ + * Automatic generated via autotranslator.php tool + * Generation date 2013-10-26 11:58:10 + */ + + +// START - Lines generated via autotranslator.php tool (2013-10-26 11:58:10). +// Reference language: en_US -> cs_CZ +PrintIPPSetup=Nastavení modulu Přímý tisk +PrintIPPDesc=Ce modul Permet d'un ajouter Bouton d'dojem přímé des dokumenty vers votre imprimante. Il requiert un systeme Linux Equipe de poháry. +PRINTIPP_ENABLED=Zobrazit Piktogram "Přímý tisk" do seznamu dokumentů +PRINTIPP_HOST=Tiskový server +PRINTIPP_PORT=Přístav +PRINTIPP_USER=Přihlášení +PRINTIPP_PASSWORD=Heslo +NoPrinterFound=Žádné tiskárny nalezeny (zkontrolujte poháry Nasta) +// STOP - Lines generated via autotranslator.php tool (2013-10-26 12:39:36). From 399093f501f3c1226c66f2b7817b9c032554903a Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Fri, 1 Nov 2013 13:48:22 +0100 Subject: [PATCH 003/107] USe good status icon for thirdparty ActivityCeased --- htdocs/societe/class/societe.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 495f6ec6a5a..79a7e3d47b2 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -1513,22 +1513,22 @@ class Societe extends CommonObject } if ($mode == 2) { - if ($statut==0) return img_picto($langs->trans("ActivityCeased"),'statut6').' '.$langs->trans("ActivityCeased"); + if ($statut==0) return img_picto($langs->trans("ActivityCeased"),'statut1').' '.$langs->trans("ActivityCeased"); if ($statut==1) return img_picto($langs->trans("InActivity"),'statut4').' '.$langs->trans("InActivity"); } if ($mode == 3) { - if ($statut==0) return img_picto($langs->trans("ActivityCeased"),'statut6'); + if ($statut==0) return img_picto($langs->trans("ActivityCeased"),'statut1'); if ($statut==1) return img_picto($langs->trans("InActivity"),'statut4'); } if ($mode == 4) { - if ($statut==0) return img_picto($langs->trans("ActivityCeased"),'statut6').' '.$langs->trans("ActivityCeased"); + if ($statut==0) return img_picto($langs->trans("ActivityCeased"),'statut1').' '.$langs->trans("ActivityCeased"); if ($statut==1) return img_picto($langs->trans("InActivity"),'statut4').' '.$langs->trans("InActivity"); } if ($mode == 5) { - if ($statut==0) return $langs->trans("ActivityCeased").' '.img_picto($langs->trans("ActivityCeased"),'statut6'); + if ($statut==0) return $langs->trans("ActivityCeased").' '.img_picto($langs->trans("ActivityCeased"),'statut1'); if ($statut==1) return $langs->trans("InActivity").' '.img_picto($langs->trans("InActivity"),'statut4'); } } From e8a80e236504d134249d6e691570d25f3561ed0a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 1 Nov 2013 17:46:57 +0100 Subject: [PATCH 004/107] Now comments in changelog are concatenated --- build/debian/changelog | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/build/debian/changelog b/build/debian/changelog index f8cca0e8e41..cc9bd706d86 100644 --- a/build/debian/changelog +++ b/build/debian/changelog @@ -1,5 +1,19 @@ dolibarr (3.4.2) unstable; urgency=low + [ Laurent Destailleur (eldy) ] + * Maintenance release. + + -- Laurent Destailleur (eldy) Mon, 22 Apr 2013 12:00:00 +0100 + +dolibarr (3.4.1) unstable; urgency=low + + [ Laurent Destailleur (eldy) ] + * Maintenance release. + + -- Laurent Destailleur (eldy) Mon, 22 Apr 2013 12:00:00 +0100 + +dolibarr (3.4.0) unstable; urgency=low + [ Laurent Destailleur (eldy) ] * New upstream release. From 662f48ddc200b829369c521c0a1e376b86c54f6f Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Sat, 2 Nov 2013 02:21:45 +0100 Subject: [PATCH 005/107] Use good icons --- htdocs/societe/class/societe.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 79a7e3d47b2..80b65229f68 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -1513,22 +1513,22 @@ class Societe extends CommonObject } if ($mode == 2) { - if ($statut==0) return img_picto($langs->trans("ActivityCeased"),'statut1').' '.$langs->trans("ActivityCeased"); + if ($statut==0) return img_picto($langs->trans("ActivityCeased"),'statut8').' '.$langs->trans("ActivityCeased"); if ($statut==1) return img_picto($langs->trans("InActivity"),'statut4').' '.$langs->trans("InActivity"); } if ($mode == 3) { - if ($statut==0) return img_picto($langs->trans("ActivityCeased"),'statut1'); + if ($statut==0) return img_picto($langs->trans("ActivityCeased"),'statut8'); if ($statut==1) return img_picto($langs->trans("InActivity"),'statut4'); } if ($mode == 4) { - if ($statut==0) return img_picto($langs->trans("ActivityCeased"),'statut1').' '.$langs->trans("ActivityCeased"); + if ($statut==0) return img_picto($langs->trans("ActivityCeased"),'statut8').' '.$langs->trans("ActivityCeased"); if ($statut==1) return img_picto($langs->trans("InActivity"),'statut4').' '.$langs->trans("InActivity"); } if ($mode == 5) { - if ($statut==0) return $langs->trans("ActivityCeased").' '.img_picto($langs->trans("ActivityCeased"),'statut1'); + if ($statut==0) return $langs->trans("ActivityCeased").' '.img_picto($langs->trans("ActivityCeased"),'statut8'); if ($statut==1) return $langs->trans("InActivity").' '.img_picto($langs->trans("InActivity"),'statut4'); } } From 6aea0bf7a1e4f686feca224a43bf7e1ffe5161b5 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Sat, 2 Nov 2013 12:49:37 +0100 Subject: [PATCH 006/107] Fix [ bug #1105 ] Searching Boxes other search option --- ChangeLog | 2 ++ htdocs/compta/facture/list.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 763e3369203..41982d6ecf5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,8 @@ English Dolibarr ChangeLog ***** ChangeLog for 3.4.2 compared to 3.4.1 ***** Fix: Bad rounding on margin calculations and display. Fix: Option drpo table into backup was broken. +Fix: [ bug #1105 ] Searching Boxes other search option + ***** ChangeLog for 3.4.1 compared to 3.4.0 ***** Fix: Display buying price on line edit when no supplier price is defined diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index aa685e11ab3..998d4fab931 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -216,7 +216,7 @@ if (! $sall) } else { - $sql.= ' AND (s.nom LIKE \'%'.$db->escape($sall).'%\' OR f.facnumber LIKE \'%'.$db->escape($sall).'%\' OR f.note LIKE \'%'.$db->escape($sall).'%\' OR fd.description LIKE \'%'.$db->escape($sall).'%\')'; + $sql.= ' AND (s.nom LIKE \'%'.$db->escape($sall).'%\' OR f.facnumber LIKE \'%'.$db->escape($sall).'%\' OR f.note_private LIKE \'%'.$db->escape($sall).'%\' OR f.note_public LIKE \'%'.$db->escape($sall).'%\' OR fd.description LIKE \'%'.$db->escape($sall).'%\')'; } $sql.= ' ORDER BY '; $listfield=explode(',',$sortfield); From c5f29e14a452ac39aa30ca6135d94f149ad39bee Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sat, 2 Nov 2013 17:50:24 +0100 Subject: [PATCH 007/107] missing trad and fix language --- htdocs/adherents/admin/adherent.php | 2 +- htdocs/comm/propal/class/propal.class.php | 2 +- htdocs/comm/propal/document.php | 2 +- htdocs/commande/class/commande.class.php | 2 +- htdocs/commande/document.php | 2 +- htdocs/compta/facture/class/facture.class.php | 2 +- htdocs/cron/card.php | 8 ++++---- htdocs/cron/list.php | 2 +- htdocs/expedition/class/expedition.class.php | 2 +- htdocs/fourn/class/fournisseur.commande.class.php | 2 +- htdocs/fourn/class/fournisseur.facture.class.php | 2 +- htdocs/fourn/commande/document.php | 2 +- htdocs/langs/fr_FR/admin.lang | 12 ++++++------ htdocs/langs/fr_FR/cron.lang | 10 +++++----- htdocs/langs/fr_FR/projects.lang | 8 ++++---- 15 files changed, 30 insertions(+), 30 deletions(-) diff --git a/htdocs/adherents/admin/adherent.php b/htdocs/adherents/admin/adherent.php index cfb7372308a..71f6cbb52ad 100644 --- a/htdocs/adherents/admin/adherent.php +++ b/htdocs/adherents/admin/adherent.php @@ -265,7 +265,7 @@ print '
'; /* - * Edition des variables globales non rattache a un theme specifique + * Editing global variables not related to a specific theme */ $constantes=array( 'ADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT', diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 87db0d27f25..dd80dbe9bb4 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -1664,7 +1664,7 @@ class Propal extends CommonObject { if ($statut == 2) { - // Classe la societe rattachee comme client + // The connected company is classified as a client $soc=new Societe($this->db); $soc->id = $this->socid; $result=$soc->set_as_client(); diff --git a/htdocs/comm/propal/document.php b/htdocs/comm/propal/document.php index b0eca76345b..b5a9028e286 100644 --- a/htdocs/comm/propal/document.php +++ b/htdocs/comm/propal/document.php @@ -21,7 +21,7 @@ /** * \file htdocs/comm/propal/document.php * \ingroup propale - * \brief Page de gestion des documents attaches a une proposition commerciale + * \brief Management page of documents attached to a business proposal */ require '../../main.inc.php'; diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 4e00900d995..2f2e3c98a16 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -266,7 +266,7 @@ class Commande extends CommonOrder if (preg_match('/^[\(]?PROV/i', $this->ref)) { // On renomme repertoire ($this->ref = ancienne ref, $numfa = nouvelle ref) - // afin de ne pas perdre les fichiers attaches + // in order not to lose the attachments $comref = dol_sanitizeFileName($this->ref); $snum = dol_sanitizeFileName($num); $dirsource = $conf->commande->dir_output.'/'.$comref; diff --git a/htdocs/commande/document.php b/htdocs/commande/document.php index 1d599ee549d..c81c799ab1b 100644 --- a/htdocs/commande/document.php +++ b/htdocs/commande/document.php @@ -21,7 +21,7 @@ /** * \file htdocs/commande/document.php * \ingroup order - * \brief Page de gestion des documents attachees a une commande + * \brief Management page of documents attached to an order */ require '../main.inc.php'; diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index d7b17f3ac20..35b23dbc2a7 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -1793,7 +1793,7 @@ class Facture extends CommonInvoice if (preg_match('/^[\(]?PROV/i', $this->ref)) { // On renomme repertoire facture ($this->ref = ancienne ref, $num = nouvelle ref) - // afin de ne pas perdre les fichiers attaches + // in order not to lose the attachments $facref = dol_sanitizeFileName($this->ref); $snumfa = dol_sanitizeFileName($num); $dirsource = $conf->facture->dir_output.'/'.$facref; diff --git a/htdocs/cron/card.php b/htdocs/cron/card.php index 7b7dc26767a..626b90047d8 100644 --- a/htdocs/cron/card.php +++ b/htdocs/cron/card.php @@ -108,7 +108,7 @@ if ($action=='add') { $object->unitfrequency=GETPOST('unitfrequency','int'); $object->frequency=$object->unitfrequency * GETPOST('nbfrequency','int'); - //Ajout de la tache cron + //Adding cron task $result = $object->create($user); // test du Resultat de la requete @@ -141,7 +141,7 @@ if ($action=='update') { $object->unitfrequency=GETPOST('unitfrequency','int'); $object->frequency=$object->unitfrequency * GETPOST('nbfrequency','int'); - //Ajout de la tache cron + //Adding cron task $result = $object->update($user); // test du Resultat de la requete @@ -158,7 +158,7 @@ if ($action=='update') { if ($action=='activate') { $object->status=1; - //Ajout de la tache cron + //Adding cron task $result = $object->update($user); // test du Resultat de la requete @@ -174,7 +174,7 @@ if ($action=='activate') { if ($action=='inactive') { $object->status=0; - //Ajout de la tache cron + //Adding cron task $result = $object->update($user); // test du Resultat de la requete diff --git a/htdocs/cron/list.php b/htdocs/cron/list.php index f75fcb5754b..6d8f20e1aeb 100644 --- a/htdocs/cron/list.php +++ b/htdocs/cron/list.php @@ -77,7 +77,7 @@ if (!empty($search_label)) { // Delete jobs if ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->cron->delete){ - //Delete de la tache cron + //Delete cron task $object = new Cronjob($db); $object->id=$id; $result = $object->delete($user); diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 90b1b89d1a5..70a789d1f6a 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -569,7 +569,7 @@ class Expedition extends CommonObject if (preg_match('/^[\(]?PROV/i', $this->ref)) { // On renomme repertoire ($this->ref = ancienne ref, $numfa = nouvelle ref) - // afin de ne pas perdre les fichiers attaches + // In order not to loose attached files $oldref = dol_sanitizeFileName($this->ref); $newref = dol_sanitizeFileName($numref); $dirsource = $conf->expedition->dir_output.'/sending/'.$oldref; diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 633115fa373..013ab28c78b 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -354,7 +354,7 @@ class CommandeFournisseur extends CommonOrder if (preg_match('/^[\(]?PROV/i', $this->ref)) { // On renomme repertoire ($this->ref = ancienne ref, $num = nouvelle ref) - // afin de ne pas perdre les fichiers attaches + // In order not to loose attached files $oldref = dol_sanitizeFileName($this->ref); $newref = dol_sanitizeFileName($num); $dirsource = $conf->fournisseur->dir_output.'/commande/'.$oldref; diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index dbaf9ac2cea..c5767bd90ef 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -870,7 +870,7 @@ class FactureFournisseur extends CommonInvoice if (preg_match('/^[\(]?PROV/i', $this->ref)) { // On renomme repertoire facture ($this->ref = ancienne ref, $num = nouvelle ref) - // afin de ne pas perdre les fichiers attaches + // In order not to loose attached files $facref = dol_sanitizeFileName($this->ref); $snumfa = dol_sanitizeFileName($num); diff --git a/htdocs/fourn/commande/document.php b/htdocs/fourn/commande/document.php index d1fdaeb113e..315c6151b4a 100644 --- a/htdocs/fourn/commande/document.php +++ b/htdocs/fourn/commande/document.php @@ -22,7 +22,7 @@ /** * \file htdocs/fourn/commande/document.php * \ingroup supplier - * \brief Page de gestion des documents attachees a une commande fournisseur + * \brief Management page of attached documents to a supplier order */ require '../../main.inc.php'; diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index dacaf21cdf2..cfc86c45660 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -470,7 +470,7 @@ Module1780Desc= Gestion des catégories (produits, fournisseurs, clients et adh Module2000Name= Editeur WYSIWYG Module2000Desc= Permet la saisie de certaines zones de textes grace à un éditeur avancé Module2300Name= Cron -Module2300Desc= Gestionnaire de taches programmées +Module2300Desc= Gestionnaire de tâches programmées Module2400Name= Agenda Module2400Desc= Gestion des actions (événements et tâches) et de l'agenda Module2500Name= Gestion Electronique de Documents @@ -695,10 +695,10 @@ Permission1411= Lire les mouvements comptables Permission1412= Créer/modifier/annuler les mouvements comptables Permission1415= Lire CA, bilans, résultats, journaux, grands livres Permission1421= Exporter les commandes clients et attributs -Permission23001 = Voir les taches planifiée -Permission23002 = Créer/Modifier les taches planifiée -Permission23003 = Supprimer les taches planifiée -Permission23004 = Executer les taches planifiée +Permission23001 = Voir les tâches planifiée +Permission23002 = Créer/Modifier les tâches planifiée +Permission23003 = Supprimer les tâches planifiée +Permission23004 = Exécuter les tâches planifiée Permission2401= Lire les actions (événements ou tâches) liées à son compte Permission2402= Créer/modifier les actions (événements ou tâches) liées à son compte Permission2403= Supprimer les actions (événements ou tâches) liées à son compte @@ -964,7 +964,7 @@ ExtraFieldsCustomerInvoices=Attributs supplémentaires (factures clients) ExtraFieldsSupplierOrders=Attributs supplémentaires (commandes) ExtraFieldsSupplierInvoices=Attributs supplémentaires (factures) ExtraFieldsProject=Attributs supplémentaires (projets) -ExtraFieldsProjectTask=Attributs supplémentaires (taches) +ExtraFieldsProjectTask=Attributs supplémentaires (tâches) ExtraFieldHasWrongValue=L'attribut %s a une valeur incorrecte. AlphaNumOnlyCharsAndNoSpace=uniquement caractères alphanumériques sans espace SendingMailSetup=Configuration de l'envoi par mail diff --git a/htdocs/langs/fr_FR/cron.lang b/htdocs/langs/fr_FR/cron.lang index b5fa47b336a..9fe99f43ccc 100644 --- a/htdocs/langs/fr_FR/cron.lang +++ b/htdocs/langs/fr_FR/cron.lang @@ -5,12 +5,12 @@ CHARSET=UTF-8 # Admin # CronSetup = Page de configuration du module - Gestion de tâches planifiées -URLToLaunchCronJobs=URL pour lancer les taches automatiques -OrToLaunchASpecificJob=Ou pour lancer une tache spécifique -KeyForCronAccess=Clé de sécurité pour l'URL de lancement des taches automatiques -FileToLaunchCronJobs=Commande pour lancer les taches automatiques +URLToLaunchCronJobs=URL pour lancer les tâches automatiques +OrToLaunchASpecificJob=Ou pour lancer une tâche spécifique +KeyForCronAccess=Clé de sécurité pour l'URL de lancement des tâches automatiques +FileToLaunchCronJobs=Commande pour lancer les tâches automatiques CronExplainHowToRunUnix=Sur un environement Unix vous pouvez paramétrer CronTab pour executer cette commande toute les minutes. -CronExplainHowToRunWin=Sur un environement Microsoft(tm) Windows vous pouvez utiliser le planificateur de tache pour lancer cette commande toute les minutes. +CronExplainHowToRunWin=Sur un environement Microsoft(tm) Windows vous pouvez utiliser le planificateur de tâches pour lancer cette commande toute les minutes. # # Menu diff --git a/htdocs/langs/fr_FR/projects.lang b/htdocs/langs/fr_FR/projects.lang index e26e92322e5..03751234361 100644 --- a/htdocs/langs/fr_FR/projects.lang +++ b/htdocs/langs/fr_FR/projects.lang @@ -86,14 +86,14 @@ ErrorTimeSpentIsEmpty=Le temps consommé n'est pas renseigné ThisWillAlsoRemoveTasks=Cette opération détruira également les tâches du projet (%s tâches actuellement) et le suivi des consommés. IfNeedToUseOhterObjectKeepEmpty=Si des objets (facture, commande, ...), appartenant à un autre tiers que celui choisi, doivent être liés au projet à créer, laisser vide afin de laisser le projet multi-tiers. CloneProject=Cloner le projet -CloneTasks=Cloner les taches +CloneTasks=Cloner les tâches CloneContacts=Cloner les contacts CloneNotes=Cloner les notes CloneFiles=Cloner les pièces jointes ConfirmCloneProject=Êtes-vous sûr de vouloir cloner ce projet ? -ProjectReportDate=Reporter les dates des taches en fonction de la date de départ. -ErrorShiftTaskDate=Une erreur c'est produite dans le report des dates des taches. -ProjectsAndTasksLines=Projets et taches +ProjectReportDate=Reporter les dates des tâches en fonction de la date de départ. +ErrorShiftTaskDate=Une erreur c'est produite dans le report des dates des tâches. +ProjectsAndTasksLines=Projets et tâches ##### Types de contacts ##### TypeContact_project_internal_PROJECTLEADER=Chef de projet TypeContact_project_external_PROJECTLEADER=Chef de projet From aaf1dd1b27a6e2f2cb25a6c80bf80e33bd3b1a92 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Mon, 4 Nov 2013 10:41:02 +0100 Subject: [PATCH 008/107] fix some language error --- htdocs/langs/fr_FR/projects.lang | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/langs/fr_FR/projects.lang b/htdocs/langs/fr_FR/projects.lang index 03751234361..712ea544e8d 100644 --- a/htdocs/langs/fr_FR/projects.lang +++ b/htdocs/langs/fr_FR/projects.lang @@ -55,7 +55,7 @@ ListSupplierOrdersAssociatedProject=Liste des commandes fournisseurs associées ListSupplierInvoicesAssociatedProject=Liste des factures fournisseurs associées au projet ListContractAssociatedProject=Liste des contrats associés au projet ListFichinterAssociatedProject=Liste des interventions associées au projet -ListTripAssociatedProject=Liste des notes de frais associés au projet +ListTripAssociatedProject=Liste des notes de frais associées au projet ListActionsAssociatedProject=Liste des événements associés au projet ActivityOnProjectThisWeek=Activité sur les projets cette semaine ActivityOnProjectThisMonth=Activité sur les projets ce mois @@ -92,7 +92,7 @@ CloneNotes=Cloner les notes CloneFiles=Cloner les pièces jointes ConfirmCloneProject=Êtes-vous sûr de vouloir cloner ce projet ? ProjectReportDate=Reporter les dates des tâches en fonction de la date de départ. -ErrorShiftTaskDate=Une erreur c'est produite dans le report des dates des tâches. +ErrorShiftTaskDate=Une erreur s'est produite dans le report des dates des tâches. ProjectsAndTasksLines=Projets et tâches ##### Types de contacts ##### TypeContact_project_internal_PROJECTLEADER=Chef de projet @@ -105,6 +105,6 @@ TypeContact_project_task_internal_CONTRIBUTOR=Intervenant TypeContact_project_task_external_CONTRIBUTOR=Intervenant # Documents models DocumentModelBaleine=Modèle de rapport de projet complet (logo...) -SelectElement=Eléments associable au projet : +SelectElement=Eléments associables au projet : AddElement=Associer ProjectReferers=Objets associés \ No newline at end of file From 8653f3f0263e82f9940a1c52366b99f8c83dc676 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 4 Nov 2013 12:38:21 +0100 Subject: [PATCH 009/107] Add missing Country UK. --- htdocs/langs/en_US/dict.lang | 1 + htdocs/langs/fr_FR/dict.lang | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/dict.lang b/htdocs/langs/en_US/dict.lang index d5b302ca9c7..f06c6c5e337 100644 --- a/htdocs/langs/en_US/dict.lang +++ b/htdocs/langs/en_US/dict.lang @@ -7,6 +7,7 @@ CountryES=Spain CountryDE=Germany CountryCH=Switzerland CountryGB=Great Britain +CountryUK=United Kingdom CountryIE=Ireland CountryCN=China CountryTN=Tunisia diff --git a/htdocs/langs/fr_FR/dict.lang b/htdocs/langs/fr_FR/dict.lang index e0a8fd6f2ef..bace202e0de 100644 --- a/htdocs/langs/fr_FR/dict.lang +++ b/htdocs/langs/fr_FR/dict.lang @@ -6,7 +6,8 @@ CountryIT=Italie CountryES=Espagne CountryDE=Allemagne CountryCH=Suisse -CountryGB=Royaume-Uni +CountryGB=Grande-Bretagne +CountryUK=Royaume-Uni CountryIE=Irlande CountryCN=Chine CountryTN=Tunisie From b82cbf1385c424cee705fd08f1a97e5b0fd73b7a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 6 Nov 2013 15:35:10 +0100 Subject: [PATCH 010/107] Fix: current balance was visible when it should not Conflicts: htdocs/compta/bank/account.php --- htdocs/compta/bank/account.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php index 372ec9b6f8b..86e26612e2e 100644 --- a/htdocs/compta/bank/account.php +++ b/htdocs/compta/bank/account.php @@ -486,7 +486,7 @@ if ($id > 0 || ! empty($ref)) $var=true; $num = $db->num_rows($result); - $i = 0; $total = 0; $sep = 0; + $i = 0; $total = 0; $sep = -1; while ($i < $num) { @@ -499,13 +499,14 @@ if ($id > 0 || ! empty($ref)) // Is it a transaction in future ? $dos=dol_print_date($db->jdate($objp->do),'%Y%m%d'); //print "dos=".$dos." nows=".$nows; - if ($dos > $nows && !$sep) // Yes, we show a subtotal + if ($dos < $nows) $sep=0; // 0 means there was at least one line before current date + if ($dos > $nows && ! $sep) // We have found a line in future and we already found on line before current date { $sep = 1 ; print ''; print $langs->trans("CurrentBalance"); print ''; - print ''.price($total - $objp->amount).''; + print ''.price($total - $objp->amount).''; print " "; print ''; } @@ -747,10 +748,10 @@ if ($id > 0 || ! empty($ref)) if ($page == 0 && ! $mode_search) { print ''; - if ($sep) print ' '; + if ($sep > 0) print ' '; // If we had at least one line in future else print $langs->trans("CurrentBalance"); print ''; - print ''.price($total).''; + print ''.price($total).''; print ' '; print ''; } From 91702593513f12814cc84ea2d7b771e13c8255ac Mon Sep 17 00:00:00 2001 From: aspangaro Date: Sat, 9 Nov 2013 06:51:10 +0100 Subject: [PATCH 011/107] fix for language --- htdocs/compta/bank/account.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php index 372ec9b6f8b..591a3dc22e3 100644 --- a/htdocs/compta/bank/account.php +++ b/htdocs/compta/bank/account.php @@ -581,7 +581,7 @@ if ($id > 0 || ! empty($ref)) $banklinestatic->fetch($links[$key]['url_id']); $bankstatic->id=$banklinestatic->fk_account; $bankstatic->label=$banklinestatic->bank_account_label; - print ' ('.$langs->trans("From "); + print ' ('.$langs->trans("TransferFrom").' '; print $bankstatic->getNomUrl(1,'transactions'); print ' '.$langs->trans("toward").' '; $bankstatic->id=$objp->bankid; @@ -593,7 +593,7 @@ if ($id > 0 || ! empty($ref)) { $bankstatic->id=$objp->bankid; $bankstatic->label=$objp->bankref; - print ' ('.$langs->trans("From "); + print ' ('.$langs->trans("TransferFrom").' '; print $bankstatic->getNomUrl(1,''); print ' '.$langs->trans("toward").' '; $banklinestatic->fetch($links[$key]['url_id']); From 4b26d8441b66b251d2aba0c8a959566d07102206 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 9 Nov 2013 12:52:06 +0100 Subject: [PATCH 012/107] Fix: Entry lost --- htdocs/product/fiche.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index c58c15bed5e..f3817028e15 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -684,7 +684,7 @@ else $tmpcode=''; if (! empty($modCodeProduct->code_auto)) $tmpcode=$modCodeProduct->getNextValue($object,$type); - print ''.$langs->trans("Ref").''; + print ''.$langs->trans("Ref").''; if ($_error) { print $langs->trans("RefAlreadyExists"); @@ -692,7 +692,7 @@ else print ''; // Label - print ''.$langs->trans("Label").''; + print ''.$langs->trans("Label").''; // On sell print ''.$langs->trans("Status").' ('.$langs->trans("Sell").')'; From 6b6855dff502b76bb23f1d0a956eb244e239afff Mon Sep 17 00:00:00 2001 From: aspangaro Date: Sun, 10 Nov 2013 06:37:08 +0100 Subject: [PATCH 013/107] Fix for document cerfa into module Don --- htdocs/core/modules/dons/html_cerfafr.html | 2 +- htdocs/core/modules/dons/html_cerfafr.modules.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/dons/html_cerfafr.html b/htdocs/core/modules/dons/html_cerfafr.html index 2f21e1c0afe..9310ac46cb6 100644 --- a/htdocs/core/modules/dons/html_cerfafr.html +++ b/htdocs/core/modules/dons/html_cerfafr.html @@ -98,7 +98,7 @@ __Name__ :
- __DONATOR_NAME__
+ __DONATOR_FIRSTNAME__ __DONATOR_LASTNAME__
__Address__ :
__DONATOR_ADDRESS__
__Zip__ : __DONATOR_ZIP__
diff --git a/htdocs/core/modules/dons/html_cerfafr.modules.php b/htdocs/core/modules/dons/html_cerfafr.modules.php index 05c3dd96f24..a3811f51d6d 100644 --- a/htdocs/core/modules/dons/html_cerfafr.modules.php +++ b/htdocs/core/modules/dons/html_cerfafr.modules.php @@ -143,7 +143,8 @@ class html_cerfafr extends ModeleDon $form = str_replace('__MAIN_INFO_SOCIETE_ADDRESS__',$mysoc->address,$form); $form = str_replace('__MAIN_INFO_SOCIETE_ZIP__',$mysoc->zip,$form); $form = str_replace('__MAIN_INFO_SOCIETE_TOWN__',$mysoc->town,$form); - $form = str_replace('__DONATOR_NAME__',$don->nom,$form); + $form = str_replace('__DONATOR_FIRSTNAME__',$don->firstname,$form); + $form = str_replace('__DONATOR_LASTNAME__',$don->lastname,$form); $form = str_replace('__DONATOR_ADDRESS__',$don->address,$form); $form = str_replace('__DONATOR_ZIP__',$don->zip,$form); $form = str_replace('__DONATOR_TOWN__',$don->town,$form); From 53f01685e334e804292247c9a3511274ab054ed3 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Mon, 11 Nov 2013 16:23:11 +0100 Subject: [PATCH 014/107] Display customer code (according setting) into list --- htdocs/societe/societe.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/societe/societe.php b/htdocs/societe/societe.php index 28a3c5c2885..bf21bfecfa7 100644 --- a/htdocs/societe/societe.php +++ b/htdocs/societe/societe.php @@ -187,7 +187,7 @@ if ($socname) */ $title=$langs->trans("ListOfThirdParties"); -$sql = "SELECT s.rowid, s.nom as name, s.barcode, s.town, s.datec, s.datea,"; +$sql = "SELECT s.rowid, s.nom as name, s.barcode, s.town, s.datec, s.datea, s.code_client, s.code_fournisseur, "; $sql.= " st.libelle as stcomm, s.prefix_comm, s.client, s.fournisseur, s.canvas, s.status as status,"; $sql.= " s.siren as idprof1, s.siret as idprof2, ape as idprof3, idprof4 as idprof4"; // We'll need these fields in order to filter by sale (including the case where the user can only see his prospects) @@ -408,6 +408,9 @@ if ($resql) $companystatic->canvas=$obj->canvas; $companystatic->client=$obj->client; $companystatic->status=$obj->status; + $companystatic->fournisseur=$obj->fournisseur; + $companystatic->code_client=$obj->code_client; + $companystatic->code_fournisseur=$obj->code_fournisseur; print $companystatic->getNomUrl(1,'',100); print "\n"; // Barcode From a76d5f8a1d936bda0f59f44021fac2c1455cce23 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Mon, 11 Nov 2013 16:29:35 +0100 Subject: [PATCH 015/107] Fix getNomURL societe --- htdocs/societe/class/societe.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index e79242d35a9..effc67b004d 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -1438,7 +1438,7 @@ class Societe extends CommonObject $name=$this->name?$this->name:$this->nom; - if ($conf->global->SOCIETE_ADD_REF_IN_LIST) { + if ($conf->global->SOCIETE_ADD_REF_IN_LIST && empty($option)) { if (($this->client) && (! empty ( $this->code_client ))) { $code = $this->code_client . ' - '; } From 5b7f2e0c53acf9d0bf89d0b6150490ef139a5095 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Mon, 11 Nov 2013 17:35:36 +0100 Subject: [PATCH 016/107] Better nl_NL translation --- htdocs/langs/nl_NL/admin.lang | 4 +-- htdocs/langs/nl_NL/categories.lang | 2 +- htdocs/langs/nl_NL/commercial.lang | 4 +-- htdocs/langs/nl_NL/companies.lang | 8 +++--- htdocs/langs/nl_NL/dict.lang | 10 ++++---- htdocs/langs/nl_NL/main.lang | 2 +- htdocs/langs/nl_NL/margins.lang | 40 +++++++++++++++--------------- htdocs/langs/nl_NL/products.lang | 2 +- 8 files changed, 36 insertions(+), 36 deletions(-) diff --git a/htdocs/langs/nl_NL/admin.lang b/htdocs/langs/nl_NL/admin.lang index f24eac0b403..67a826f0d82 100644 --- a/htdocs/langs/nl_NL/admin.lang +++ b/htdocs/langs/nl_NL/admin.lang @@ -341,7 +341,7 @@ Module70Name = Interventies Module70Desc = Interventiesbeheer Module75Name = Reisnotities en -kosten Module75Desc = Beheer van reisnotities en -kosten -Module80Name = Verzendingen +Module80Name = Verzend Adviezen Module80Desc = Beheer afnemersverzending en -ontvangst Module85Name = Bank en Contant Module85Desc = Beheer van bank- en / of kasrekeningen @@ -1251,7 +1251,7 @@ ContractsNumberingModules=Contracten nummering modules AdherentLoginRequired=Beheren van een login voor elk lid ListOfAvailableNotifications=Lijst van beschikbare meldingen (Deze lijst is afhankelijk van geactiveerde modules) SendingsNumberingModules=Verzendingen nummering modules -FreeLegalTextOnShippings=Vrije tekst op verzendingen +FreeLegalTextOnShippings=Vrije tekst op verzend advies AdvancedEditor=Geavanceerde editor AccountancyCode=Accountancy Code // STOP - Lines generated via autotranslator.php tool (2011-10-10 01:54:18). diff --git a/htdocs/langs/nl_NL/categories.lang b/htdocs/langs/nl_NL/categories.lang index e1d2b67b6ac..67607bb1f85 100644 --- a/htdocs/langs/nl_NL/categories.lang +++ b/htdocs/langs/nl_NL/categories.lang @@ -75,7 +75,7 @@ ProductsCategoryShort = Productencategorie MembersCategoryShort = Ledencategorie SuppliersCategoriesShort = Leverancierscategorie CustomersCategoriesShort = Afnemerscategorie -CustomersProspectsCategoriesShort = Afnemers- / Prospectencategorie +CustomersProspectsCategoriesShort = Afnemers-/Prosp.categorie ProductsCategoriesShort = Productencategorie MembersCategoriesShort = Ledencategorie ThisCategoryHasNoProduct = Deze categorie bevat geen producten. diff --git a/htdocs/langs/nl_NL/commercial.lang b/htdocs/langs/nl_NL/commercial.lang index 85935408c81..c8cdd786de9 100644 --- a/htdocs/langs/nl_NL/commercial.lang +++ b/htdocs/langs/nl_NL/commercial.lang @@ -24,8 +24,8 @@ TaskRDVWith = Vergadering met %s ShowTask = Toon taak ShowAction = Toon actie ActionsReport = Actiesverslag -SalesRepresentative = Vertegenwoordiger -SalesRepresentatives = Vertegenwoordigers +SalesRepresentative = Account Manager +SalesRepresentatives = Accountmanagers SalesRepresentativeFollowUp = Vertegenwoordiger (opvolging) SalesRepresentativeSignature = Vertegenwoordiger (handtekening) CommercialInterlocutor = Zakelijke gesprekspartner diff --git a/htdocs/langs/nl_NL/companies.lang b/htdocs/langs/nl_NL/companies.lang index 3b2ad012bae..3a0f5ce1e51 100644 --- a/htdocs/langs/nl_NL/companies.lang +++ b/htdocs/langs/nl_NL/companies.lang @@ -34,8 +34,8 @@ CompanyName = Bedrijfsnaam Companies = Bedrijven CountryIsInEEC = Lidstaat van de Europese Unie ThirdPartyName = Naam van Klant -ThirdParty = Klant -ThirdParties = Klant +ThirdParty = Klant / Leverancier +ThirdParties = Klanten / Leveranciers ThirdPartyAll = Klanten (alle) ThirdPartyProspects = Prospecten ThirdPartyCustomers = Afnemers @@ -290,7 +290,7 @@ CardSupplier = Leverancierskaart CardCompany = Bedrijfskaart DeleteFile = Bestand verwijderen ConfirmDeleteFile = Weet u zeker dat u dit bestand wilt verwijderen? -AllocateCommercial = Toewijzing +AllocateCommercial = Account Manager SelectCountry = Selecteer een land SelectCompany = Selecteer een Klant Organization = Organisatie @@ -303,7 +303,7 @@ ListProspectsShort = Prospectenoverzicht ListCustomersShort = Afnemersoverzicht ThirdPartiesArea = Overzicht van derde partijen LastModifiedThirdParties = Laatste %s bewerkte derde partijen -UniqueThirdParties = Totaal aantal unieke derde partijen +UniqueThirdParties = Totaal aantal unieke klanten/leveranciers # Monkey = MonkeyNumRefModelDesc = Geeft een nummer als %syymm-nnnn voor afnemerscodes en %sjjmm-nnnn voor leverancierscodes waar jj het jaar is, mm de maand en nnnn een opeenvolgend nummer vanaf 0. # Leopard = diff --git a/htdocs/langs/nl_NL/dict.lang b/htdocs/langs/nl_NL/dict.lang index 37aa3207418..5132baf0151 100644 --- a/htdocs/langs/nl_NL/dict.lang +++ b/htdocs/langs/nl_NL/dict.lang @@ -247,11 +247,11 @@ CountryME = Montenegro CountryBL = Saint Barthelemy CountryMF = Saint Martin ##### Civilities ##### = -CivilityMME = Mevrouw -CivilityMR = Meneer -CivilityMLE = Mejuffrouw -CivilityMTRE = Meester -CivilityDR = Dokter +CivilityMME =Mw. +CivilityMR = Dhr. +CivilityMLE = Mw. +CivilityMTRE = Dhr. +CivilityDR = Dhr. ##### Currencies ##### = Currencyeuros = Euro CurrencyAUD = Australische Dollars diff --git a/htdocs/langs/nl_NL/main.lang b/htdocs/langs/nl_NL/main.lang index 7e57bc38417..0c9d189b04f 100644 --- a/htdocs/langs/nl_NL/main.lang +++ b/htdocs/langs/nl_NL/main.lang @@ -522,7 +522,7 @@ NeverReceived = Nooit ontvangen Canceled = Geannuleerd YouCanChangeValuesForThisListFromDictionnarySetup = U kunt deze waarden veranderen via het menu Home->Instellingen->Constanten Color = Kleur -Documents = Gekoppelde bestanden +Documents = Gekoppelde Bestanden DocumentsNb = Bijlagen (%s) Documents2 = Documenten BuildDocuments = Gegenereerde documenten diff --git a/htdocs/langs/nl_NL/margins.lang b/htdocs/langs/nl_NL/margins.lang index 3494ca6d643..21bda68dc86 100644 --- a/htdocs/langs/nl_NL/margins.lang +++ b/htdocs/langs/nl_NL/margins.lang @@ -4,49 +4,49 @@ CHARSET=UTF-8 Margin=Marge Margins=Marges TotalMargin=Marge Totaal -MarginOnProducts=Marge / Training -MarginOnServices=Marge / Dienst -MarginRate=Marge verhouding -MarkRate=Markerings verhouding +MarginOnProducts=Marge Training/Boeken +MarginOnServices=Marge Dienst +MarginRate=Marge Verhouding +MarkRate=Markerings Verhouding DisplayMarginRates=Toon Marge Verhouding DisplayMarkRates=Toon Markeringsverhouding InputPrice=Voer Prijs in -margin=Winst marge management -margesSetup=Winst marge management setup +margin=Winst Marge Management +margesSetup=Winst Marge Management setup -MarginDetails=Marge details +MarginDetails=Marge Details -ProductMargins=Product marge -CustomerMargins=Klant marges +ProductMargins=Product Marge +CustomerMargins=Klant Marges AgentMargins=Acc. Manager marges -ProductService=Trainning of Dienst +ProductService=Training/Product of Dienst AllProducts=Alle Trainingen en Diensten -ChooseProduct/Service=Kies Training of Dienst -CommercialAgent=Commerciel Agent +ChooseProduct/Service=Kies Training/Product of Dienst +CommercialAgent=Commercieël Agent StartDate=Start datum EndDate=Eind datum Launch=Start ForceBuyingPriceIfNull=Forceer een inkoopprijs indien null -ForceBuyingPriceIfNullDetails=indien "ON", marge wodt nul (inkoopprijs = verkoopprijs), anders("OFF"), marge is gelijk verkoopprijs (inkoopprijs = 0) +ForceBuyingPriceIfNullDetails=indien "ON", marge wordt null (inkoopprijs = verkoopprijs), anders("OFF"), marge is gelijk verkoopprijs (inkoopprijs = 0) MARGIN_METHODE_FOR_DISCOUNT=Marge methode voor globale discounts -UseDiscountAsProduct=Als een training +UseDiscountAsProduct=Als een training/dienst UseDiscountAsService=Als een dienst UseDiscountOnTotal=Op subtotaal -MARGIN_METHODE_FOR_DISCOUNT_DETAILS=Definieert als een globale discount wordt behandelt als een training, een dienst, of alleen een subtotaal voor marge berekening. +MARGIN_METHODE_FOR_DISCOUNT_DETAILS=Definieer als een globale discount, wordt behandelt als een training/product, een dienst, alleen een subtotaal voor marge berekening. MARGIN_TYPE=Marge type -MargeBrute=Groffe marge -MargeNette=Netto marge -MARGIN_TYPE_DETAILS=Groffe marge : Verkoopprijs - Inkoopprijs
Netto marge : Verkoopprijs - Kostprijs +MargeBrute=Groffe Marge +MargeNette=Netto Marge +MARGIN_TYPE_DETAILS=Groffe marge : Verkoopprijs - Inkoopprijs
Netto Marge : Verkoopprijs - Kostprijs CostPrice=Kostprijs BuyingCost=Kostprijs -UnitCharges=Unit toeslag +UnitCharges=Unit Toeslag Charges=Toeslag AgentContactType=Contact type used voor commissie -AgentContactTypeDetails=Definieer het contact type (gelinked op facturen) wordt geassocieerd met commercieel agent \ No newline at end of file +AgentContactTypeDetails=Definieër het contact type (gelinked op facturen) wordt geassocieerd met een commercieël agent \ No newline at end of file diff --git a/htdocs/langs/nl_NL/products.lang b/htdocs/langs/nl_NL/products.lang index 731630aa79b..f5649c1e9bb 100644 --- a/htdocs/langs/nl_NL/products.lang +++ b/htdocs/langs/nl_NL/products.lang @@ -161,7 +161,7 @@ CloneContentProduct = Kloon alle hoofdinformatie van het product / de dienst ClonePricesProduct = Kloon hoofdinformatie en prijzen ProductIsUsed = Dit product wordt gebruikt NewRefForClone = Referentie naar nieuw produkt / dienst -CustomerPrices = Consumentenprijs +CustomerPrices = Verkoopprijs SuppliersPrices = Leveranciersprijs CustomCode = Code op maat CountryOrigin = Land van herkomst From 6bf2220a67b4354b9661672943f4a9644012bc72 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Tue, 12 Nov 2013 15:22:11 +0100 Subject: [PATCH 017/107] Add status filter into prospect and customer list --- htdocs/comm/list.php | 24 ++++++++++++++++++++---- htdocs/comm/prospect/list.php | 17 ++++++++++++++--- 2 files changed, 34 insertions(+), 7 deletions(-) diff --git a/htdocs/comm/list.php b/htdocs/comm/list.php index 2c256ec2fda..ebb08916758 100644 --- a/htdocs/comm/list.php +++ b/htdocs/comm/list.php @@ -3,6 +3,7 @@ * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2013 Cédric Salvador + * Copyright (C) 2013 Florian Henry * * 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 @@ -52,6 +53,8 @@ $search_zipcode=GETPOST("search_zipcode"); $search_town=GETPOST("search_town"); $search_code=GETPOST("search_code"); $search_compta=GETPOST("search_compta"); +$search_status = GETPOST("search_status",'int'); +if ($search_status=='') $search_status=1; // always display activ customer first // Load sale and categ filters $search_sale = GETPOST("search_sale"); @@ -83,6 +86,7 @@ if (GETPOST("button_removefilter_x")) $search_idprof2=''; $search_idprof3=''; $search_idprof4=''; + $seach_status=1; } @@ -92,6 +96,7 @@ if (GETPOST("button_removefilter_x")) */ $formother=new FormOther($db); +$form = new Form($db); $thirdpartystatic=new Societe($db); $help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; @@ -125,6 +130,8 @@ if ($search_town) { } if ($search_code) $sql.= " AND s.code_client LIKE '%".$db->escape($search_code)."%'"; if ($search_compta) $sql.= " AND s.code_compta LIKE '%".$db->escape($search_compta)."%'"; + +if ($search_status!='') $sql .= " AND s.status = ".$db->escape($search_status); // Insert sale filter if ($search_sale) { @@ -152,6 +159,7 @@ if ($result) $param = "&search_nom=".$search_nom."&search_code=".$search_code."&search_zipcode=".$search_zipcode."&search_town=".$search_town; if ($search_categ != '') $param.='&search_categ='.$search_categ; if ($search_sale != '') $param.='&search_sale='.$search_sale; + if ($search_status != '') $param.='&search_status='.$search_status; print_barre_liste($langs->trans("ListOfCustomers"), $page, $_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords); @@ -190,7 +198,7 @@ if ($result) print_liste_field_titre($langs->trans("AccountancyCode"),$_SERVER["PHP_SELF"],"s.code_compta","",$param,'align="left"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"datec","",$param,'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"s.status","",$param,'align="right"',$sortfield,$sortorder); - + print ' '; $parameters=array(); $formconfirm=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook @@ -218,7 +226,13 @@ if ($result) print ''; print ''; - print ' '; + print ''; + print ' '; + print ''; + + print ''; + print $form->selectarray('search_status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$search_status); + print ''; print ''; print '  '; @@ -243,6 +257,7 @@ if ($result) $thirdpartystatic->id=$obj->rowid; $thirdpartystatic->name=$obj->name; $thirdpartystatic->client=$obj->client; + $thirdpartystatic->code_client=$obj->code_client; $thirdpartystatic->canvas=$obj->canvas; $thirdpartystatic->status=$obj->status; print $thirdpartystatic->getNomUrl(1); @@ -252,9 +267,10 @@ if ($result) print ''.$obj->code_client.''; print ''.$obj->code_compta.''; print ''.dol_print_date($db->jdate($obj->datec),'day').''; - print ''.$thirdpartystatic->getLibStatut(3); + print ''.$thirdpartystatic->getLibStatut(3); print ''; - + print ''; + $parameters=array('obj' => $obj); $formconfirm=$hookmanager->executeHooks('printFieldListValue',$parameters); // Note that $action and $object may have been modified by hook diff --git a/htdocs/comm/prospect/list.php b/htdocs/comm/prospect/list.php index 959c271b85e..75ace1c4acd 100644 --- a/htdocs/comm/prospect/list.php +++ b/htdocs/comm/prospect/list.php @@ -47,6 +47,8 @@ $search_town = GETPOST("search_town"); $search_state = GETPOST("search_state"); $search_datec = GETPOST("search_datec"); $search_categ = GETPOST("search_categ",'int'); +$search_status = GETPOST("search_status",'int'); +if ($search_status=='') $search_status=1; // always display activ customer first $catid = GETPOST("catid",'int'); $sortfield = GETPOST("sortfield",'alpha'); @@ -173,6 +175,7 @@ if ($action == 'cstc') */ $formother=new FormOther($db); +$form=new Form($db); $sql = "SELECT s.rowid, s.nom, s.zip, s.town, s.datec, s.datea, s.status as status,"; $sql.= " st.libelle as stcomm, s.prefix_comm, s.fk_stcomm, s.fk_prospectlevel,"; @@ -205,6 +208,7 @@ if ($search_state) { $sql .= natural_search('d.nom', $search_state); } if ($search_datec) $sql .= " AND s.datec LIKE '%".$db->escape($search_datec)."%'"; +if ($search_status!='') $sql .= " AND s.status = ".$db->escape($search_status); // Insert levels filters if ($search_levels) { @@ -231,7 +235,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) $sql.= " ORDER BY $sortfield $sortorder, s.nom ASC"; $sql.= $db->plimit($conf->liste_limit+1, $offset); - +dol_syslog('comm/prospect/list.php sql='.$sql,LOG_DEBUG); $resql = $db->query($sql); if ($resql) { @@ -265,6 +269,7 @@ if ($resql) if ($search_level_to != '') $param.='&search_level_to='.$search_level_to; if ($search_categ != '') $param.='&search_categ='.$search_categ; if ($search_sale != '') $param.='&search_sale='.$search_sale; + if ($search_status != '') $param.='&search_status='.$search_status; // $param and $urladd should have the same value $urladd = $param; @@ -306,7 +311,8 @@ if ($resql) print_liste_field_titre($langs->trans("ProspectLevelShort"),$_SERVER["PHP_SELF"],"s.fk_prospectlevel","",$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("StatusProsp"),$_SERVER["PHP_SELF"],"s.fk_stcomm","",$param,'align="center"',$sortfield,$sortorder); print ' '; - print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"s.status","",$param,'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"s.status","",$param,'align="center"',$sortfield,$sortorder); + print ' '; $parameters=array(); $formconfirm=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook @@ -368,6 +374,10 @@ if ($resql) print ' '; print ''; + print ''; + print $form->selectarray('search_status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$search_status); + print ''; + // Print the search button print ''; print ''; @@ -425,9 +435,10 @@ if ($resql) } print ''; - print ''; + print ''; print $prospectstatic->LibStatut($prospectstatic->status,3); print ''; + print ''; $parameters=array('obj' => $obj); $formconfirm=$hookmanager->executeHooks('printFieldListValue',$parameters); // Note that $action and $object may have been modified by hook From 4ad541316398353d86a67c018c701569e051e050 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Tue, 12 Nov 2013 15:34:12 +0100 Subject: [PATCH 018/107] Sync db upgrade with db install to avoid silly upgrade errors --- .../install/mysql/migration/3.3.0-3.4.0.sql | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql index 6bae41c0799..3af6c53cd79 100755 --- a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql +++ b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql @@ -58,7 +58,7 @@ ALTER TABLE llx_facture_fourn DROP INDEX uk_facture_fourn; ALTER TABLE llx_facture_fourn DROP INDEX uk_facture_fourn_ref; UPDATE llx_facture_fourn set ref = NULL where ref = ''; ALTER TABLE llx_facture_fourn ADD UNIQUE INDEX uk_facture_fourn_ref (ref, entity); -ALTER TABLE llx_facture_fourn CHANGE COLUMN facnumber ref_supplier varchar(30); +ALTER TABLE llx_facture_fourn CHANGE COLUMN facnumber ref_supplier varchar(50); ALTER TABLE llx_facture_fourn ADD UNIQUE INDEX uk_facture_fourn_ref_supplier (ref_supplier, fk_soc, entity); @@ -161,22 +161,22 @@ CREATE TABLE llx_c_revenuestamp insert into llx_c_revenuestamp(rowid,fk_pays,taux,note,active) values (101, 10, '0.4', 'Timbre fiscal', 1); -ALTER TABLE llx_c_tva MODIFY COLUMN localtax1_type varchar(10) NOT NULL DEFAULT '0'; -ALTER TABLE llx_c_tva MODIFY COLUMN localtax2_type varchar(10) NOT NULL DEFAULT '0'; -ALTER TABLE llx_commande_fournisseurdet MODIFY COLUMN localtax1_type varchar(10) NOT NULL DEFAULT '0'; -ALTER TABLE llx_commande_fournisseurdet MODIFY COLUMN localtax2_type varchar(10) NOT NULL DEFAULT '0'; -ALTER TABLE llx_commandedet MODIFY COLUMN localtax1_type varchar(10) NOT NULL DEFAULT '0'; -ALTER TABLE llx_commandedet MODIFY COLUMN localtax2_type varchar(10) NOT NULL DEFAULT '0'; -ALTER TABLE llx_contratdet MODIFY COLUMN localtax1_type varchar(10) NOT NULL DEFAULT '0'; -ALTER TABLE llx_contratdet MODIFY COLUMN localtax2_type varchar(10) NOT NULL DEFAULT '0'; -ALTER TABLE llx_facture_fourn_det MODIFY COLUMN localtax1_type varchar(10) NOT NULL DEFAULT '0'; -ALTER TABLE llx_facture_fourn_det MODIFY COLUMN localtax2_type varchar(10) NOT NULL DEFAULT '0'; -ALTER TABLE llx_facturedet_rec MODIFY COLUMN localtax1_type varchar(10) NOT NULL DEFAULT '0'; -ALTER TABLE llx_facturedet_rec MODIFY COLUMN localtax2_type varchar(10) NOT NULL DEFAULT '0'; -ALTER TABLE llx_facturedet MODIFY COLUMN localtax1_type varchar(10) NOT NULL DEFAULT '0'; -ALTER TABLE llx_facturedet MODIFY COLUMN localtax2_type varchar(10) NOT NULL DEFAULT '0'; -ALTER TABLE llx_propaldet MODIFY COLUMN localtax1_type varchar(10) NOT NULL DEFAULT '0'; -ALTER TABLE llx_propaldet MODIFY COLUMN localtax2_type varchar(10) NOT NULL DEFAULT '0'; +ALTER TABLE llx_c_tva MODIFY COLUMN localtax1_type varchar(10) DEFAULT NULL; +ALTER TABLE llx_c_tva MODIFY COLUMN localtax2_type varchar(10) DEFAULT NULL; +ALTER TABLE llx_commande_fournisseurdet MODIFY COLUMN localtax1_type varchar(10) DEFAULT NULL; +ALTER TABLE llx_commande_fournisseurdet MODIFY COLUMN localtax2_type varchar(10) DEFAULT NULL; +ALTER TABLE llx_commandedet MODIFY COLUMN localtax1_type varchar(10) DEFAULT NULL; +ALTER TABLE llx_commandedet MODIFY COLUMN localtax2_type varchar(10) DEFAULT NULL; +ALTER TABLE llx_contratdet MODIFY COLUMN localtax1_type varchar(10) DEFAULT NULL; +ALTER TABLE llx_contratdet MODIFY COLUMN localtax2_type varchar(10) DEFAULT NULL; +ALTER TABLE llx_facture_fourn_det MODIFY COLUMN localtax1_type varchar(10) DEFAULT NULL; +ALTER TABLE llx_facture_fourn_det MODIFY COLUMN localtax2_type varchar(10) DEFAULT NULL; +ALTER TABLE llx_facturedet_rec MODIFY COLUMN localtax1_type varchar(10) DEFAULT NULL; +ALTER TABLE llx_facturedet_rec MODIFY COLUMN localtax2_type varchar(10) DEFAULT NULL; +ALTER TABLE llx_facturedet MODIFY COLUMN localtax1_type varchar(10) DEFAULT NULL; +ALTER TABLE llx_facturedet MODIFY COLUMN localtax2_type varchar(10) DEFAULT NULL; +ALTER TABLE llx_propaldet MODIFY COLUMN localtax1_type varchar(10) DEFAULT NULL; +ALTER TABLE llx_propaldet MODIFY COLUMN localtax2_type varchar(10) DEFAULT NULL; -- No more use type 7, use revenuse stamp instead UPDATE llx_c_tva set localtax1=0, localtax1_type='0' where localtax1_type = '7'; UPDATE llx_c_tva set localtax2=0, localtax2_type='0' where localtax2_type = '7'; From 8fca860a2d63c5d24b23ca7c4d65adf4727738a3 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Tue, 12 Nov 2013 15:40:00 +0100 Subject: [PATCH 019/107] Add status filter on contact list --- htdocs/contact/list.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index dcaf4aaac4b..2b1c5e982df 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -52,7 +52,8 @@ $search_email=GETPOST("search_email"); $search_skype=GETPOST("search_skype"); $search_priv=GETPOST("search_priv"); $search_categ = GETPOST("search_categ",'int'); -$search_statut=GETPOST("search_statut"); +$search_status = GETPOST("search_status",'int'); +if ($search_status=='') $search_status=1; // always display activ customer first $type=GETPOST("type"); @@ -104,6 +105,7 @@ if (GETPOST('button_removefilter')) $search_skype=""; $search_priv=""; $sall=""; + $seach_status=1; } if ($search_priv < 0) $search_priv=''; @@ -192,6 +194,7 @@ if (strlen($search_skype)) // filtre sur skype { $sql .= " AND p.skype LIKE '%".$db->escape($search_skype)."%'"; } +if ($search_status!='') $sql .= " AND p.statut = ".$db->escape($search_status); if ($type == "o") // filtre sur type { $sql .= " AND p.fk_soc IS NULL"; @@ -245,6 +248,7 @@ if ($result) $param ='&begin='.urlencode($begin).'&view='.urlencode($view).'&userid='.urlencode($userid).'&contactname='.urlencode($sall); $param.='&type='.urlencode($type).'&view='.urlencode($view).'&search_lastname='.urlencode($search_lastname).'&search_firstname='.urlencode($search_firstname).'&search_societe='.urlencode($search_societe).'&search_email='.urlencode($search_email); if (!empty($search_categ)) $param.='&search_categ='.$search_categ; + if ($search_status != '') $param.='&search_status='.$search_status; if ($search_priv == '0' || $search_priv == '1') $param.="&search_priv=".urlencode($search_priv); $num = $db->num_rows($result); @@ -335,7 +339,9 @@ if ($result) $selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate")); print $form->selectarray('search_priv',$selectarray,$search_priv,1); print ''; - print ' '; + print ''; + print $form->selectarray('search_status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$search_status); + print ''; print ''; print ''; print '  '; From a73275b9c1be2057a752b70e4e8aa602a6bf9773 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Wed, 13 Nov 2013 13:17:32 +0100 Subject: [PATCH 020/107] Add prospect code client into prospect list --- htdocs/comm/prospect/list.php | 4 +++- htdocs/societe/class/societe.class.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/prospect/list.php b/htdocs/comm/prospect/list.php index 75ace1c4acd..7284827e657 100644 --- a/htdocs/comm/prospect/list.php +++ b/htdocs/comm/prospect/list.php @@ -177,7 +177,7 @@ if ($action == 'cstc') $formother=new FormOther($db); $form=new Form($db); -$sql = "SELECT s.rowid, s.nom, s.zip, s.town, s.datec, s.datea, s.status as status,"; +$sql = "SELECT s.rowid, s.nom, s.zip, s.town, s.datec, s.datea, s.status as status, s.code_client, s.client,"; $sql.= " st.libelle as stcomm, s.prefix_comm, s.fk_stcomm, s.fk_prospectlevel,"; $sql.= " d.nom as departement"; // Updated by Matelli @@ -405,6 +405,8 @@ if ($resql) $prospectstatic->id=$obj->rowid; $prospectstatic->nom=$obj->nom; $prospectstatic->status=$obj->status; + $prospectstatic->code_client=$obj->code_client; + $prospectstatic->client=$obj->client; $prospectstatic->fk_prospectlevel=$obj->fk_prospectlevel; print $prospectstatic->getNomUrl(1,'prospect'); print ''; diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index effc67b004d..3ed53f2692e 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -1438,7 +1438,7 @@ class Societe extends CommonObject $name=$this->name?$this->name:$this->nom; - if ($conf->global->SOCIETE_ADD_REF_IN_LIST && empty($option)) { + if ($conf->global->SOCIETE_ADD_REF_IN_LIST && (!empty($withpicto))) { if (($this->client) && (! empty ( $this->code_client ))) { $code = $this->code_client . ' - '; } From b965103fc3c5e0cd69469eb9d5662ef1016102c8 Mon Sep 17 00:00:00 2001 From: Peter Fontaine Date: Wed, 13 Nov 2013 15:40:17 +0100 Subject: [PATCH 021/107] Multiple Bank Account Number for Third Party --- .../install/mysql/migration/3.4.0-3.5.0.sql | 4 + .../install/mysql/tables/llx_societe_rib.sql | 2 + htdocs/langs/en_US/banks.lang | 6 +- htdocs/langs/fr_FR/banks.lang | 4 + .../class/companybankaccount.class.php | 106 +++++-- htdocs/societe/class/societe.class.php | 31 +- htdocs/societe/rib.php | 300 ++++++++++++++---- 7 files changed, 377 insertions(+), 76 deletions(-) diff --git a/htdocs/install/mysql/migration/3.4.0-3.5.0.sql b/htdocs/install/mysql/migration/3.4.0-3.5.0.sql index 81a61afbd81..1d2d3bea1d8 100755 --- a/htdocs/install/mysql/migration/3.4.0-3.5.0.sql +++ b/htdocs/install/mysql/migration/3.4.0-3.5.0.sql @@ -348,3 +348,7 @@ ALTER TABLE llx_user ADD skype VARCHAR(255) AFTER job; ALTER TABLE llx_socpeople ADD skype VARCHAR(255) AFTER jabberid; ALTER TABLE llx_societe ADD skype VARCHAR(255) AFTER email; ALTER TABLE llx_adherent ADD skype VARCHAR(255) AFTER email; + +-- multi-rib +ALTER TABLE llx_societe_rib ADD default_rib TINYINT NOT NULL DEFAULT 0 AFTER owner_address; +UPDATE llx_societe_rib SET default_rib = 1; diff --git a/htdocs/install/mysql/tables/llx_societe_rib.sql b/htdocs/install/mysql/tables/llx_societe_rib.sql index a526d5b82d7..d928da868ed 100644 --- a/htdocs/install/mysql/tables/llx_societe_rib.sql +++ b/htdocs/install/mysql/tables/llx_societe_rib.sql @@ -2,6 +2,7 @@ -- Copyright (C) 2000-2004 Rodolphe Quiedeville -- Copyright (C) 2005-2009 Regis Houssin -- Copyright (C) 2012 Juanjo Menent +-- Copyright (C) 2013 Peter Fontaine -- -- 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 @@ -35,6 +36,7 @@ create table llx_societe_rib domiciliation varchar(255), proprio varchar(60), owner_address varchar(255), + default_rib tinyint NOT NULL DEFAULT 0, import_key varchar(14) -- import key diff --git a/htdocs/langs/en_US/banks.lang b/htdocs/langs/en_US/banks.lang index 4d504db9794..3503ff11e62 100644 --- a/htdocs/langs/en_US/banks.lang +++ b/htdocs/langs/en_US/banks.lang @@ -149,4 +149,8 @@ InputReceiptNumber=Choose the bank statement related with the conciliation. Use EventualyAddCategory=Eventually, specify a category in which to classify the records ToConciliate=To conciliate? ThenCheckLinesAndConciliate=Then, check the lines present in the bank statement and click -BankDashboard=Bank accounts summary \ No newline at end of file +BankDashboard=Bank accounts summary +DefaultRIB=Default BAN +AllRIB=All BAN +LabelRIB=BAN Label +NoBANRecord=No BAN record diff --git a/htdocs/langs/fr_FR/banks.lang b/htdocs/langs/fr_FR/banks.lang index 2105cce24e1..29440edd862 100644 --- a/htdocs/langs/fr_FR/banks.lang +++ b/htdocs/langs/fr_FR/banks.lang @@ -150,3 +150,7 @@ EventualyAddCategory=Eventuellement, saisissez une catégorie dans laquelle clas ToConciliate=A rapprocher ? ThenCheckLinesAndConciliate=Ensuite, cochez les lignes présentes sur le relevé et cliquez sur BankDashboard=Synthèse comptes bancaires +DefaultRIB=RIB par défaut +AllRIB=Tous les RIB +LabelRIB=Nom du RIB +NoBANRecord=Aucun RIB enregistré diff --git a/htdocs/societe/class/companybankaccount.class.php b/htdocs/societe/class/companybankaccount.class.php index ce637588d8a..7b80b80f0bd 100644 --- a/htdocs/societe/class/companybankaccount.class.php +++ b/htdocs/societe/class/companybankaccount.class.php @@ -2,6 +2,7 @@ /* Copyright (C) 2004 Rodolphe Quiedeville * Copyright (C) 2010 Laurent Destailleur * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2013 Peter Fontaine * * 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 @@ -34,6 +35,7 @@ class CompanyBankAccount extends Account var $rowid; var $socid; + var $label; var $bank; var $courant; var $clos; @@ -46,6 +48,7 @@ class CompanyBankAccount extends Account var $iban_prefix; // deprecated var $proprio; var $owner_address; + var $default_rib; /** * Constructor @@ -60,6 +63,7 @@ class CompanyBankAccount extends Account $this->clos = 0; $this->solde = 0; $this->error_number = 0; + $this->default_rib = 0; return 1; } @@ -79,6 +83,8 @@ class CompanyBankAccount extends Account { if ($this->db->affected_rows($resql)) { + $this->default_rib = 1; + $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."societe_rib"); return 1; } } @@ -97,21 +103,25 @@ class CompanyBankAccount extends Account */ function update($user='') { - $sql = "SELECT fk_soc FROM ".MAIN_DB_PREFIX."societe_rib"; - $sql .= " WHERE fk_soc = ".$this->socid; +// $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe_rib"; +// $sql .= " WHERE rowid = ".$this->id; +// +// $result = $this->db->query($sql); +// if ($result) +// { +// if ($this->db->num_rows($result) == 0) +// { +// $this->create(); +// } +// } +// else +// { +// dol_print_error($this->db); +// return 0; +// } - $result = $this->db->query($sql); - if ($result) - { - if ($this->db->num_rows($result) == 0) - { - $this->create(); - } - } - else - { - dol_print_error($this->db); - return 0; + if (!$this->id) { + $this->create(); } $sql = "UPDATE ".MAIN_DB_PREFIX."societe_rib SET "; @@ -125,7 +135,12 @@ class CompanyBankAccount extends Account $sql .= ",domiciliation='".$this->db->escape($this->domiciliation)."'"; $sql .= ",proprio = '".$this->db->escape($this->proprio)."'"; $sql .= ",owner_address = '".$this->db->escape($this->owner_address)."'"; - $sql .= " WHERE fk_soc = ".$this->socid; + $sql .= ",default_rib = ".$this->default_rib; + if (trim($this->label) != '') + $sql .= ",label = '".$this->db->escape($this->label)."'"; + else + $sql .= ",label = NULL"; + $sql .= " WHERE rowid = ".$this->id; $result = $this->db->query($sql); if ($result) @@ -150,10 +165,10 @@ class CompanyBankAccount extends Account { if (empty($id) && empty($socid)) return -1; - $sql = "SELECT rowid, fk_soc, bank, number, code_banque, code_guichet, cle_rib, bic, iban_prefix as iban, domiciliation, proprio, owner_address"; + $sql = "SELECT rowid, fk_soc, bank, number, code_banque, code_guichet, cle_rib, bic, iban_prefix as iban, domiciliation, proprio, owner_address, default_rib, label"; $sql.= " FROM ".MAIN_DB_PREFIX."societe_rib"; if ($id) $sql.= " WHERE rowid = ".$id; - if ($socid) $sql.= " WHERE fk_soc = ".$socid; + if ($socid) $sql.= " WHERE fk_soc = ".$socid." AND default_rib = 1"; $resql = $this->db->query($sql); if ($resql) @@ -175,6 +190,8 @@ class CompanyBankAccount extends Account $this->domiciliation = $obj->domiciliation; $this->proprio = $obj->proprio; $this->owner_address = $obj->owner_address; + $this->label = $obj->label; + $this->default_rib = $obj->default_rib; } $this->db->free($resql); @@ -192,13 +209,15 @@ class CompanyBankAccount extends Account * * @return string RIB */ - function getRibLabel() + function getRibLabel($displayriblabel = true) { global $langs; - + if ($this->code_banque || $this->code_guichet || $this->number || $this->cle_rib) { - $rib = $this->code_banque." ".$this->code_guichet." ".$this->number; + if ($this->label && $displayriblabel) + $rib = $this->label." : "; + $rib.= $this->code_banque." ".$this->code_guichet." ".$this->number; $rib.=($this->cle_rib?" (".$this->cle_rib.")":""); } else @@ -208,6 +227,53 @@ class CompanyBankAccount extends Account return $rib; } + + /** + * Set RIB as Default + * + * @param int $id RIB id + * @return int 0 if KO, 1 if OK + */ + function setAsDefault($id) + { + if ($id) { + $sql1 = "SELECT fk_soc FROM ".MAIN_DB_PREFIX."societe_rib"; + $sql1.= " WHERE rowid = ".$id; + + $result1 = $this->db->query($sql1); + if ($result1) { + if ($this->db->num_rows($result1) == 0) { + return 0; + } else { + $obj = $this->db->fetch_object($result1); + $sql2 = "UPDATE ".MAIN_DB_PREFIX."societe_rib SET default_rib = 0 "; + $sql2.= "WHERE fk_soc = ".$obj->fk_soc; + + $sql3 = "UPDATE ".MAIN_DB_PREFIX."societe_rib SET default_rib = 1 "; + $sql3.= "WHERE rowid = ".$id; + + $this->db->begin(); + + $result2 = $this->db->query($sql2); + $result3 = $this->db->query($sql3); + + if (!$result2 || !$result3) { + dol_print_error($this->db); + $this->db->rollback(); + return 0; + } else { + $this->db->commit(); + return 1; + } + } + } else { + dol_print_error($this->db); + return 0; + } + } else { + return 0; + } + } } ?> diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index e79242d35a9..fc3e7b94ca3 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -8,7 +8,8 @@ * Copyright (C) 2008 Patrick Raguin * Copyright (C) 2010-2011 Juanjo Menent * Copyright (C) 2013 Florian Henry - * Copyright (C) 2013 Alexandre Spangaro + * Copyright (C) 2013 Alexandre Spangaro + * Copyright (C) 2013 Peter Fontaine * * 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 @@ -1753,6 +1754,34 @@ class Societe extends CommonObject return $bac->getRibLabel(); } + /** + * Return Array of RIB + * + * @return array|int 0 if KO, Array of CompanyBanckAccount if OK + */ + function get_all_rib() + { + require_once DOL_DOCUMENT_ROOT . '/societe/class/companybankaccount.class.php'; + $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe_rib WHERE fk_soc = ".$this->id; + $result = $this->db->query($sql); + if (!$result) { + $this->error++; + $this->errors[] = $this->db->lasterror; + return 0; + } else { + $num_rows = $this->db->num_rows($result); + $rib_array = array(); + if ($num_rows) { + while ($obj = $this->db->fetch_object($result)) { + $rib = new CompanyBankAccount($this->db); + $rib->fetch($obj->rowid); + $rib_array[] = $rib; + } + } + return $rib_array; + } + } + /** * Attribut un code client a partir du module de controle des codes. * Return value is stored into this->code_client diff --git a/htdocs/societe/rib.php b/htdocs/societe/rib.php index e85845c6a59..b3432d105a8 100644 --- a/htdocs/societe/rib.php +++ b/htdocs/societe/rib.php @@ -3,6 +3,7 @@ * Copyright (C) 2003 Jean-Louis Bergamo * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2013 Peter Fontaine * * 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 @@ -52,6 +53,8 @@ if ($_POST["action"] == 'update' && ! $_POST["cancel"]) // Modification $account = new CompanyBankAccount($db); + $account->fetch($_POST["id"]); + $account->socid = $soc->id; $account->bank = $_POST["bank"]; @@ -76,11 +79,59 @@ if ($_POST["action"] == 'update' && ! $_POST["cancel"]) } else { - $_GET["id"]=$_POST["id"]; // Force chargement page en mode visu + $url=DOL_URL_ROOT.'/societe/rib.php?socid='.$soc->id; + header('Location: '.$url); + exit; } } +if ($_POST["action"] == 'add' && ! $_POST["cancel"]) +{ + // Ajout + $account = new CompanyBankAccount($db); + $account->socid = $soc->id; + + $account->bank = $_POST["bank"]; + $account->label = $_POST["label"]; + $account->courant = $_POST["courant"]; + $account->clos = $_POST["clos"]; + $account->code_banque = $_POST["code_banque"]; + $account->code_guichet = $_POST["code_guichet"]; + $account->number = $_POST["number"]; + $account->cle_rib = $_POST["cle_rib"]; + $account->bic = $_POST["bic"]; + $account->iban_prefix = $_POST["iban_prefix"]; + $account->domiciliation = $_POST["domiciliation"]; + $account->proprio = $_POST["proprio"]; + $account->owner_address = $_POST["owner_address"]; + + $result = $account->update($user); + if (! $result) + { + $message=$account->error; + $_GET["action"]='create'; // Force chargement page création + } + else + { + $url=DOL_URL_ROOT.'/societe/rib.php?socid='.$soc->id; + header('Location: '.$url); + exit; + } +} + +if ($_GET['action'] == 'setasdefault') +{ + $account = new CompanyBankAccount($db); + $res = $account->setAsDefault($_GET['ribid']); + if ($res) { + $url=DOL_URL_ROOT.'/societe/rib.php?socid='.$soc->id; + header('Location: '.$url); + exit; + } else { + $message=$db->lasterror; + } +} /* * View @@ -93,7 +144,10 @@ $head=societe_prepare_head2($soc); dol_fiche_head($head, 'rib', $langs->trans("ThirdParty"),0,'company'); $account = new CompanyBankAccount($db); -$account->fetch(0,$soc->id); +if (!$_GET['id']) + $account->fetch(0,$soc->id); +else + $account->fetch($_GET['id']); if (empty($account->socid)) $account->socid=$soc->id; @@ -104,10 +158,14 @@ if (empty($account->socid)) $account->socid=$soc->id; /* */ /* ************************************************************************** */ -if ($_GET["socid"] && $_GET["action"] != 'edit') +if ($_GET["socid"] && $_GET["action"] != 'edit' && $_GET["action"] != "create") { + print_titre($langs->trans("DefaultRIB")); print ''; + print ''; + print ''; + print ''; print ''; @@ -165,6 +223,54 @@ if ($_GET["socid"] && $_GET["action"] != 'edit') print '
'.$langs->trans("RIBControlError").'
'; } + print "
"; + + print_titre($langs->trans("AllRIB")); + + $rib_list = $soc->get_all_rib(); + $var = false; + if (is_array($rib_list)) { + print '
'.$langs->trans("LabelRIB").''.$account->label.'
'.$langs->trans("Bank").''.$account->bank.'
'; + + print ''; + print_liste_field_titre($langs->trans("LabelRIB")); + print_liste_field_titre($langs->trans("Bank")); + print_liste_field_titre($langs->trans("RIB")); + print_liste_field_titre($langs->trans("DefaultRIB")); + print ''; + print ''; + + foreach ($rib_list as $rib) { + print ""; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + $var = !$var; + } + + if (count($rib_list) == 0) { + print ''; + } + + print '
'.$rib->label.''.$rib->bank.''.$rib->getRibLabel(false).''; + if (!$rib->default_rib) { + print ''; + print img_picto($langs->trans("Disabled"),'switch_off'); + print ''; + } else { + print img_picto($langs->trans("Enabled"),'switch_on'); + } + print ''; + print ''; + print img_picto($langs->trans("Modify"),'edit'); + print ''; + print '
'.$langs->trans("NoBANRecord").'
'; + } else { + dol_print_error($db); + } } /* ************************************************************************** */ @@ -176,31 +282,34 @@ if ($_GET["socid"] && $_GET["action"] != 'edit') if ($_GET["socid"] && $_GET["action"] == 'edit' && $user->rights->societe->creer) { - $form = new Form($db); + $form = new Form($db); - dol_htmloutput_mesg($message); + dol_htmloutput_mesg($message); - print '
'; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; - print ''; + print '
'; - print ''; - print ''; + print ''; + print ''; - // BBAN - if ($account->useDetailedBBAN() == 1) - { - print ''; - print ''; - print ''; + print ''; + print ''; - print ''; - print ''; - print ''; - } + // BBAN + if ($account->useDetailedBBAN() == 1) + { + print ''; + print ''; + print ''; + + print ''; + print ''; + print ''; + } if ($account->useDetailedBBAN() == 2) { print ''; @@ -208,52 +317,135 @@ if ($_GET["socid"] && $_GET["action"] == 'edit' && $user->rights->societe->creer print ''; } - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; - if ($account->useDetailedBBAN() == 1) - { - print ''; - print ''; - print ''; - } + if ($account->useDetailedBBAN() == 1) + { + print ''; + print ''; + print ''; + } - // IBAN - print ''; - print ''; + // IBAN + print ''; + print ''; - print ''; - print ''; + print ''; + print ''; - print '"; + print '"; - print ''; - print ''; - print "\n"; + print ''; + print ''; + print "\n"; - print '"; + print '"; - print '
'.$langs->trans("Bank").'
'.$langs->trans("LabelRIB").'
'.$langs->trans("BankCode").'
'.$langs->trans("Bank").'
'.$langs->trans("DeskCode").'
'.$langs->trans("BankCode").'
'.$langs->trans("DeskCode").'
'.$langs->trans("BankCode").'
'.$langs->trans("BankAccountNumber").'
'.$langs->trans("BankAccountNumber").'
'.$langs->trans("BankAccountNumberKey").'
'.$langs->trans("BankAccountNumberKey").'
'.$langs->trans("IBAN").'
'.$langs->trans("IBAN").'
'.$langs->trans("BIC").'
'.$langs->trans("BIC").'
'.$langs->trans("BankAccountDomiciliation").''; - print "
'.$langs->trans("BankAccountDomiciliation").''; + print "
'.$langs->trans("BankAccountOwner").'
'.$langs->trans("BankAccountOwner").'
'.$langs->trans("BankAccountOwnerAddress").''; - print "
'.$langs->trans("BankAccountOwnerAddress").''; + print "

'; + print '
'; - print '
'; - print '   '; - print '
'; + print '
'; + print '   '; + print '
'; - print '
'; + print ''; +} + + +/* ************************************************************************** */ +/* */ +/* Création */ +/* */ +/* ************************************************************************** */ + +if ($_GET["socid"] && $_GET["action"] == 'create' && $user->rights->societe->creer) +{ + + $form = new Form($db); + + dol_htmloutput_mesg($message); + + print '
'; + print ''; + print ''; + print ''; + + + print ''; + print ''; + + print ''; + print ''; + + // BBAN + if ($account->useDetailedBBAN() == 1) + { + print ''; + print ''; + print ''; + + print ''; + print ''; + print ''; + } + if ($account->useDetailedBBAN() == 2) + { + print ''; + print ''; + print ''; + } + + print ''; + print ''; + print ''; + + if ($account->useDetailedBBAN() == 1) + { + print ''; + print ''; + print ''; + } + + // IBAN + print ''; + print ''; + + print ''; + print ''; + + print '"; + + print ''; + print ''; + print "\n"; + + print '"; + + print '
'.$langs->trans("LabelRIB").'
'.$langs->trans("Bank").'
'.$langs->trans("BankCode").'
'.$langs->trans("DeskCode").'
'.$langs->trans("BankCode").'
'.$langs->trans("BankAccountNumber").'
'.$langs->trans("BankAccountNumberKey").'
'.$langs->trans("IBAN").'
'.$langs->trans("BIC").'
'.$langs->trans("BankAccountDomiciliation").''; + print "
'.$langs->trans("BankAccountOwner").'
'.$langs->trans("BankAccountOwnerAddress").''; + print "

'; + + print '
'; + print '   '; + print '
'; + + print '
'; } dol_fiche_end(); -if ($_GET["socid"] && $_GET["action"] != 'edit') +if ($_GET["socid"] && $_GET["action"] != 'edit' && $_GET["action"] != 'create') { /* * Barre d'actions @@ -262,7 +454,7 @@ if ($_GET["socid"] && $_GET["action"] != 'edit') if ($user->rights->societe->creer) { - print ''.$langs->trans("Modify").''; + print ''.$langs->trans("Add").''; } print ''; From 844531e1d2374e8819689e281f99a4988776e2d3 Mon Sep 17 00:00:00 2001 From: Peter Fontaine Date: Wed, 13 Nov 2013 16:20:52 +0100 Subject: [PATCH 022/107] missing param phpdoc --- htdocs/societe/class/companybankaccount.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/societe/class/companybankaccount.class.php b/htdocs/societe/class/companybankaccount.class.php index 7b80b80f0bd..1cc32d1ff50 100644 --- a/htdocs/societe/class/companybankaccount.class.php +++ b/htdocs/societe/class/companybankaccount.class.php @@ -207,6 +207,7 @@ class CompanyBankAccount extends Account /** * Return RIB * + * @param boolean $displayriblabel Show or Hide Label * @return string RIB */ function getRibLabel($displayriblabel = true) From 0065adc298748ff415e7db51633656c2fdb0ae62 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Wed, 13 Nov 2013 16:37:17 +0100 Subject: [PATCH 023/107] Wrong call of show_contact into fourn/fiche.php --- htdocs/fourn/fiche.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/fiche.php b/htdocs/fourn/fiche.php index 9f3b32166dc..089b540146d 100644 --- a/htdocs/fourn/fiche.php +++ b/htdocs/fourn/fiche.php @@ -467,7 +467,7 @@ if ($object->fetch($id)) { print '
'; // List of contacts - show_contacts($conf,$langs,$db,$object,$_SERVER["PHP_SELF"].'?id='.$object->id); + show_contacts($conf,$langs,$db,$object,$_SERVER["PHP_SELF"].'?socid='.$object->id); } // Addresses list From 6d8871b4cfdeaa36745a10d83eba4871aa90a9ae Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Wed, 13 Nov 2013 17:02:30 +0100 Subject: [PATCH 024/107] Add filter on show_contact company.lib.php --- htdocs/core/lib/company.lib.php | 80 ++++++++++++++++++++++++++++----- 1 file changed, 70 insertions(+), 10 deletions(-) diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 582922cd60e..f210e44be88 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -522,6 +522,17 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') global $user,$conf; global $bc; + $form= new Form($db); + + $sortfield = GETPOST("sortfield",'alpha'); + $sortorder = GETPOST("sortorder",'alpha'); + $search_status = GETPOST("search_status",'int'); + if ($search_status=='') $search_status=1; // always display activ customer first + $search_name = GETPOST("search_name",'alpha'); + + if (! $sortorder) $sortorder="ASC"; + if (! $sortfield) $sortfield="p.lastname"; + $i=-1; $contactstatic = new Contact($db); @@ -547,20 +558,30 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') print "\n".''."\n"; + + $param="socid=".$object->id; + if ($search_status != '') $param.='&search_status='.$search_status; + if ($search_name != '') $param.='&search_name='.urlencode($search_name); + + print ''; + print ''; + print ''; + print ''; + $colspan=8; print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; + print_liste_field_titre($langs->trans("Name"),$_SERVER["PHP_SELF"],"p.lastname","",$param,'',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Poste"),$_SERVER["PHP_SELF"],"p.poste","",$param,'',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("PhonePro"),$_SERVER["PHP_SELF"],"p.phone","",$param,'',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("PhoneMobile"),$_SERVER["PHP_SELF"],"p.phone_mobile","",$param,'',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Fax"),$_SERVER["PHP_SELF"],"p.fax","",$param,'',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("EMail"),$_SERVER["PHP_SELF"],"p.email","",$param,'',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"p.statut","",$param,'',$sortfield,$sortorder); if (! empty($conf->skype->enabled)) { $colspan++; print ''; } - print ''; print ""; if (! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create) { @@ -573,14 +594,54 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') print ''; } print ""; - + + + print ''; + print ''; + + print ''; + print ''; + + print ''; + + print ''; + + print ''; + + print ''; + + if (! empty($conf->skype->enabled)) + { + $colspan++; + print ''; + } + print ""; + if (! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create) + { + $colspan++; + print ''; + } + + print ''; + + print ""; + $sql = "SELECT p.rowid, p.lastname, p.firstname, p.fk_pays, p.poste, p.phone, p.phone_mobile, p.fax, p.email, p.skype, p.statut "; $sql .= ", p.civilite, p.address, p.zip, p.town"; $sql .= " FROM ".MAIN_DB_PREFIX."socpeople as p"; $sql .= " WHERE p.fk_soc = ".$object->id; - $sql .= " ORDER by p.datec"; + if ($search_status!='') $sql .= " AND p.statut = ".$db->escape($search_status); + if ($search_name) $sql .= " AND (p.lastname LIKE '%".$db->escape(strtolower($search_name))."%' OR p.firstname LIKE '%".$db->escape(strtolower($search_name))."%')"; + $sql.= " ORDER BY $sortfield $sortorder"; + dol_syslog('core/lib/company.lib.php :: show_contacts sql='.$sql,LOG_DEBUG); $result = $db->query($sql); $num = $db->num_rows($result); @@ -688,7 +749,6 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') } - print "\n"; $i++; } From 652d7db0b40927a73e59560f1202e2c30e744a1b Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Wed, 13 Nov 2013 17:26:29 +0100 Subject: [PATCH 025/107] Get Status from getLibStatus ! --- htdocs/core/lib/company.lib.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index f210e44be88..8a67e350115 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -658,6 +658,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') print ''; } - if ($obj->statut==0) print ''; - elseif ($obj->statut==1) print ''; + print ''; // copy in clipboard $coords = ''; From 7dbe2bcf2c23b8c54588b912de5e52f5728dd598 Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Wed, 13 Nov 2013 18:41:31 +0100 Subject: [PATCH 026/107] fix wrong buy price update --- htdocs/fourn/class/fournisseur.product.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index 884fcd8d4ad..80cd40942a0 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -222,7 +222,7 @@ class ProductFournisseur extends Product { // Add price for this quantity to supplier $sql = "INSERT INTO ".MAIN_DB_PREFIX."product_fournisseur_price("; - $sql.= "datec, fk_product, fk_soc, ref_fourn, fk_user, price, quantity, remise_percent, remise, unitprice, tva_tx, charges, unitcharges, fk_availability, entity, info_bits)"; + $sql.= "datec, fk_product, fk_soc, ref_fourn, fk_user, price, quantity, remise_percent, remise, unitprice, tva_tx, charges, unitcharges, fk_availability, info_bits, entity)"; $sql.= " values('".$this->db->idate($now)."',"; $sql.= " ".$this->id.","; $sql.= " ".$fourn->id.","; From d23130739b4714b49738b03b31adb09c024d01d3 Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Wed, 13 Nov 2013 18:43:31 +0100 Subject: [PATCH 027/107] update ChangeLog --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 41982d6ecf5..ab573ef4b12 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,7 +5,7 @@ English Dolibarr ChangeLog Fix: Bad rounding on margin calculations and display. Fix: Option drpo table into backup was broken. Fix: [ bug #1105 ] Searching Boxes other search option - +Fix: wrong buy price update ***** ChangeLog for 3.4.1 compared to 3.4.0 ***** Fix: Display buying price on line edit when no supplier price is defined From fe0006c71d1aec357c477db04c23afe67f3530e7 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Wed, 13 Nov 2013 21:34:02 +0100 Subject: [PATCH 028/107] Merge from dev --- htdocs/core/lib/company.lib.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index e748124c1a8..c08be97cac4 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -609,9 +609,6 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') print ''; print ''; - - - if (! empty($conf->skype->enabled)) { $colspan++; From 3d7d8c7d5d3550bdd714dddffd38eca9c92639d7 Mon Sep 17 00:00:00 2001 From: Peter Fontaine Date: Thu, 14 Nov 2013 10:48:36 +0100 Subject: [PATCH 029/107] add tests add default_rib column in mysqldump --- dev/initdata/mysqldump_dolibarr_3.5.0.sql | 1 + test/phpunit/CompanyBankAccountTest.php | 25 ++++++++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/dev/initdata/mysqldump_dolibarr_3.5.0.sql b/dev/initdata/mysqldump_dolibarr_3.5.0.sql index 6cebad53c22..990b6b984b9 100644 --- a/dev/initdata/mysqldump_dolibarr_3.5.0.sql +++ b/dev/initdata/mysqldump_dolibarr_3.5.0.sql @@ -6511,6 +6511,7 @@ CREATE TABLE `llx_societe_rib` ( `domiciliation` varchar(255) DEFAULT NULL, `proprio` varchar(60) DEFAULT NULL, `owner_address` text, + `default_rib` tinyint NOT NULL DEFAULT 0, `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/test/phpunit/CompanyBankAccountTest.php b/test/phpunit/CompanyBankAccountTest.php index 4c954e4e8b7..c85bb8272b5 100644 --- a/test/phpunit/CompanyBankAccountTest.php +++ b/test/phpunit/CompanyBankAccountTest.php @@ -140,7 +140,7 @@ class CompanyBankAccountTest extends PHPUnit_Framework_TestCase * testCompanyBankAccountFetch * * @param int $id Id of bank account - * @return void + * @return Object Bank account object * * @depends testCompanyBankAccountCreate * The depends says test is run only if previous is ok @@ -161,6 +161,29 @@ class CompanyBankAccountTest extends PHPUnit_Framework_TestCase return $localobject; } + /** + * testCompanyBankAccountSetAsDefault + * + * @param Object $localobject Bank account + * @return int + * + * @depends testCompanyBankAccountFetch + */ + public function testCompanyBankAccountSetAsDefault($localobject) + { + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + + $result=$localobject->setAsDefault($localobject->id); + + print __METHOD__." id=".$localobject->id." result=".$result."\n"; + $this->assertLessThan($result, 0); + return $localobject; + } + /** * testCompanyBankAccountUpdate * From 5a1df20c808f323125b1f08b84c3f7d116fabbe0 Mon Sep 17 00:00:00 2001 From: Peter Fontaine Date: Thu, 14 Nov 2013 17:16:27 +0100 Subject: [PATCH 030/107] fix contact creation --- htdocs/contact/class/contact.class.php | 5 +++++ htdocs/societe/soc.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index ef2cfba8480..f00d637d375 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -40,6 +40,7 @@ class Contact extends CommonObject protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe var $id; + var $ref_ext; var $civilite_id; // In fact we store civility_code var $lastname; var $firstname; @@ -64,9 +65,13 @@ class Contact extends CommonObject var $code; var $email; var $skype; + var $jabberid; var $phone_pro; var $phone_perso; var $phone_mobile; + var $fax; + + var $priv; var $birthday; var $default_lang; diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 9001894c149..07610bb88ba 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -266,7 +266,7 @@ if (empty($reshook)) $contact->state_id = $object->state_id; $contact->country_id = $object->country_id; $contact->socid = $object->id; // fk_soc - $contact->status = 1; + $contact->statut = 1; $contact->email = $object->email; $contact->skype = $object->skype; $contact->phone_pro = $object->phone; From 05e0af0f23f7db59a5bc2514fa661ddf84c864b4 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Thu, 14 Nov 2013 19:41:27 +0100 Subject: [PATCH 031/107] WebService contact with statut (the new field) --- htdocs/contact/class/contact.class.php | 1 + htdocs/webservices/server_contact.php | 14 ++++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index ef2cfba8480..39cc96a9f32 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -119,6 +119,7 @@ class Contact extends CommonObject if (! empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->firstname=ucwords($this->firstname); if (! $this->socid) $this->socid = 0; if (! $this->priv) $this->priv = 0; + if (empty($this->statut)) $this->statut = 0; $sql = "INSERT INTO ".MAIN_DB_PREFIX."socpeople ("; $sql.= " datec"; diff --git a/htdocs/webservices/server_contact.php b/htdocs/webservices/server_contact.php index a4538772e1a..126e4202018 100644 --- a/htdocs/webservices/server_contact.php +++ b/htdocs/webservices/server_contact.php @@ -113,7 +113,8 @@ $contact_fields = array( 'user_id' => array('name'=>'user_id','type'=>'xsd:string'), 'user_login' => array('name'=>'user_login','type'=>'xsd:string'), 'civility_id' => array('name'=>'civility_id','type'=>'xsd:string'), - 'poste' => array('name'=>'poste','type'=>'xsd:string') + 'poste' => array('name'=>'poste','type'=>'xsd:string'), + 'statut' => array('name'=>'statut','type'=>'xsd:string') //... ); //Retreive all extrafield for contact @@ -302,7 +303,8 @@ function getContact($authentication,$id,$ref='',$ref_ext='') 'user_id' => $contact->user_id, 'user_login' => $contact->user_login, 'civilite_id' => $contact->civility_id, - 'poste' => $contact->poste + 'poste' => $contact->poste, + 'statut' => $contact->statut ); //Retreive all extrafield for thirdsparty @@ -412,6 +414,7 @@ function createContact($authentication,$contact) $newobject->user_id=$contact['user_id']; $newobject->user_login=$contact['user_login']; $newobject->poste=$contact['poste']; + $newobject->statut=$contact['statut']; //Retreive all extrafield for thirdsparty // fetch optionals attributes and labels @@ -488,7 +491,7 @@ function getContactsForThirdParty($authentication,$idthirdparty) { $linesinvoice=array(); - $sql = "SELECT c.rowid, c.fk_soc, c.civilite as civility_id, c.lastname, c.firstname,"; + $sql = "SELECT c.rowid, c.fk_soc, c.civilite as civility_id, c.lastname, c.firstname, c.statut,"; $sql.= " c.address, c.zip, c.town,"; $sql.= " c.fk_pays as country_id,"; $sql.= " c.fk_departement,"; @@ -565,7 +568,8 @@ function getContactsForThirdParty($authentication,$idthirdparty) 'ref_commande' => $contact->ref_commande?$contact->ref_commande:'', 'ref_propal' => $contact->ref_propal?$contact->ref_propal:'', 'user_id' => $contact->user_id?$contact->user_id:'', - 'user_login' => $contact->no_email?$contact->user_login:'' + 'user_login' => $contact->user_login?$contact->user_login:'', + 'statut' => $contact->statut?$contact->statut:'' @@ -659,6 +663,8 @@ function updateContact($authentication,$contact) $object->civilite_id=$contact['civility_id']; $object->poste=$contact['poste']; + $object->statut=$contact['statut']; + //Retreive all extrafield for contact // fetch optionals attributes and labels From a0358dc0c246f51b7124666a4f5b948792b28487 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 14 Nov 2013 20:54:40 +0100 Subject: [PATCH 032/107] Better management of price of subproducts feature --- htdocs/product/composition/fiche.php | 39 +++++++--------------------- 1 file changed, 10 insertions(+), 29 deletions(-) diff --git a/htdocs/product/composition/fiche.php b/htdocs/product/composition/fiche.php index f94f831cc63..574aa1024e3 100644 --- a/htdocs/product/composition/fiche.php +++ b/htdocs/product/composition/fiche.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2014 Laurent Destailleur + * Copyright (C) 2004-2013 Laurent Destailleur * Copyright (C) 2005 Eric Seigne * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2006 Andre Cianfarani @@ -289,7 +289,7 @@ if ($id > 0 || ! empty($ref)) print ''; if (empty($conf->global->PRODUIT_MULTIPRICES)) - { + { // Price print ''; - + // Price minimum print ''; if ($value['level'] <= 1) { + $notdefined=0; $productstatic->ref=$value['fullpath']; print ''; print ''; $totalline=price2num($value['nb'] * $product_fourn->fourn_unitprice, 'MT'); $total+=$totalline; - print ''; + print ''; if (! empty($conf->stock->enabled)) print ''; // Real stock } else { @@ -361,16 +362,16 @@ if ($id > 0 || ! empty($ref)) print ''; - print ''; // Real stock } print ''; } - print ''; + print ''; print ''; print ''; if (! empty($conf->stock->enabled)) print ''; @@ -544,26 +545,6 @@ if ($id > 0 || ! empty($ref)) } - -/* ************************************************************************** */ -/* */ -/* Barre d'action */ -/* */ -/* ************************************************************************** */ -/* -print "\n
\n"; - -if ($action == '') -{ - if ($user->rights->produit->creer || $user->rights->service->creer) - { - print ''.$langs->trans("EditAssociate").''; - } -} - -print "\n
\n"; -*/ - llxFooter(); $db->close(); From e8c7bb9c6202abaec0c1d9e4b62550c705f48d5a Mon Sep 17 00:00:00 2001 From: aspangaro Date: Thu, 14 Nov 2013 21:02:33 +0100 Subject: [PATCH 033/107] Fix for language --- htdocs/compta/prelevement/bons.php | 2 +- htdocs/compta/prelevement/factures.php | 4 ++-- htdocs/compta/prelevement/fiche-rejet.php | 4 ++-- htdocs/compta/prelevement/fiche-stat.php | 4 ++-- htdocs/compta/prelevement/fiche.php | 4 ++-- htdocs/compta/prelevement/ligne.php | 2 +- htdocs/compta/prelevement/lignes.php | 4 ++-- htdocs/compta/prelevement/liste.php | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/htdocs/compta/prelevement/bons.php b/htdocs/compta/prelevement/bons.php index 8f2d336defe..eecc14711ea 100644 --- a/htdocs/compta/prelevement/bons.php +++ b/htdocs/compta/prelevement/bons.php @@ -79,7 +79,7 @@ if ($result) print '
'.$langs->trans("Name").''.$langs->trans("Poste").''.$langs->trans("PhonePro").''.$langs->trans("PhoneMobile").''.$langs->trans("Fax").''.$langs->trans("EMail").''.$langs->trans("Skype").''.$langs->trans("Status").'  
'; + print ''; + print '     '; + print $form->selectarray('search_status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$search_status); + print '   '; + print ''; + print '
'; $contactstatic->id = $obj->rowid; + $contactstatic->statut = $obj->statut; $contactstatic->lastname = $obj->lastname; $contactstatic->firstname = $obj->firstname; print $contactstatic->getNomUrl(1); @@ -687,8 +688,9 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') print ''.$langs->trans('Disabled').' '.img_picto($langs->trans('StatusContactDraftShort'),'statut0').''.$langs->trans('Enabled').' '.img_picto($langs->trans('StatusContactValidatedShort'),'statut1').''; + print $contactstatic->getLibStatut(3); + print '  
'.$langs->trans("SellingPrice").''; if ($object->price_base_type == 'TTC') @@ -301,7 +301,7 @@ if ($id > 0 || ! empty($ref)) print price($object->price).' '.$langs->trans($object->price_base_type); } print '
'.$langs->trans("MinPrice").''; if ($object->price_base_type == 'TTC') @@ -341,6 +341,7 @@ if ($id > 0 || ! empty($ref)) print '
'.$productstatic->getNomUrl(1,'composition').' ('.$value['nb'].')  '; @@ -348,12 +349,12 @@ if ($id > 0 || ! empty($ref)) { print $langs->trans("BuyingPriceMinShort").': '; if ($product_fourn->product_fourn_price_id > 0) print $product_fourn->display_price_product_fournisseur(0,0); - else print $langs->trans("NotDefined"); + else { print $langs->trans("NotDefined"); $notdefined=1; } } print ''.price($totalline,'','',0,0,-1,$conf->currency).''.($notdefined?'':price($totalline,'','',0,0,-1,$conf->currency)).''.$langs->trans("Stock").': '.$value['stock'].''; for ($i=0; $i < $value['level']; $i++) { - print '       '; + print '     '; } print $productstatic->getNomUrl(1,'composition').' ('.$value['nb'].')  '; - print ''; + print ''; + print ''; if (! empty($conf->stock->enabled)) print '
'.$langs->trans("BuyingPriceMin").': '.price($total,'','',0,0,-1,$conf->currency).' 
'; print ''; - print_liste_field_titre($langs->trans("WithdrawalReceipt"),"bons.php","p.ref",'','','class="liste_titre"'); + print_liste_field_titre($langs->trans("WithdrawalReceipts"),"bons.php","p.ref",'','','class="liste_titre"'); print_liste_field_titre($langs->trans("Date"),"bons.php","p.datec","","",'class="liste_titre" align="center"'); print ''; print ''; diff --git a/htdocs/compta/prelevement/factures.php b/htdocs/compta/prelevement/factures.php index 115a7829374..92a4464a635 100644 --- a/htdocs/compta/prelevement/factures.php +++ b/htdocs/compta/prelevement/factures.php @@ -47,7 +47,7 @@ $page = GETPOST('page','int'); $sortorder = ((GETPOST('sortorder','alpha')=="")) ? "DESC" : GETPOST('sortorder','alpha'); $sortfield = ((GETPOST('sortfield','alpha')=="")) ? "p.ref" : GETPOST('sortfield','alpha'); -llxHeader('',$langs->trans("WithdrawalReceipt")); +llxHeader('',$langs->trans("WithdrawalReceipts")); if ($prev_id) { @@ -56,7 +56,7 @@ if ($prev_id) if ($bon->fetch($prev_id) == 0) { $head = prelevement_prepare_head($bon); - dol_fiche_head($head, 'invoices', $langs->trans("WithdrawalReceipt"), '', 'payment'); + dol_fiche_head($head, 'invoices', $langs->trans("WithdrawalReceipts"), '', 'payment'); print '
'.$langs->trans("Amount").'
'; diff --git a/htdocs/compta/prelevement/fiche-rejet.php b/htdocs/compta/prelevement/fiche-rejet.php index 87516c3ad65..10d69c3434d 100644 --- a/htdocs/compta/prelevement/fiche-rejet.php +++ b/htdocs/compta/prelevement/fiche-rejet.php @@ -46,7 +46,7 @@ $page = GETPOST('page','int'); /* * View */ -llxHeader('',$langs->trans("WithdrawalReceipt")); +llxHeader('',$langs->trans("WithdrawalReceipts")); if ($prev_id) { @@ -55,7 +55,7 @@ if ($prev_id) if ($bon->fetch($prev_id) == 0) { $head = prelevement_prepare_head($bon); - dol_fiche_head($head, 'rejects', $langs->trans("WithdrawalReceipt"), '', 'payment'); + dol_fiche_head($head, 'rejects', $langs->trans("WithdrawalReceipts"), '', 'payment'); print '
'; diff --git a/htdocs/compta/prelevement/fiche-stat.php b/htdocs/compta/prelevement/fiche-stat.php index 5fcd70b1a9b..f349fe23230 100644 --- a/htdocs/compta/prelevement/fiche-stat.php +++ b/htdocs/compta/prelevement/fiche-stat.php @@ -44,7 +44,7 @@ $page = GETPOST('page','int'); * View */ -llxHeader('',$langs->trans("WithdrawalReceipt")); +llxHeader('',$langs->trans("WithdrawalReceipts")); if ($prev_id) { @@ -53,7 +53,7 @@ if ($prev_id) if ($bon->fetch($prev_id) == 0) { $head = prelevement_prepare_head($bon); - dol_fiche_head($head, 'statistics', $langs->trans("WithdrawalReceipt"), '', 'payment'); + dol_fiche_head($head, 'statistics', $langs->trans("WithdrawalReceipts"), '', 'payment'); print '
'; diff --git a/htdocs/compta/prelevement/fiche.php b/htdocs/compta/prelevement/fiche.php index 22af3b3548d..43e2e042456 100644 --- a/htdocs/compta/prelevement/fiche.php +++ b/htdocs/compta/prelevement/fiche.php @@ -133,7 +133,7 @@ if ($action == 'infocredit' && $user->rights->prelevement->bons->credit) $bon = new BonPrelevement($db,""); $form = new Form($db); -llxHeader('',$langs->trans("WithdrawalReceipt")); +llxHeader('',$langs->trans("WithdrawalReceipts")); if ($id > 0) @@ -141,7 +141,7 @@ if ($id > 0) $bon->fetch($id); $head = prelevement_prepare_head($bon); - dol_fiche_head($head, 'prelevement', $langs->trans("WithdrawalReceipt"), '', 'payment'); + dol_fiche_head($head, 'prelevement', $langs->trans("WithdrawalReceipts"), '', 'payment'); if (GETPOST('error','alpha')!='') { diff --git a/htdocs/compta/prelevement/ligne.php b/htdocs/compta/prelevement/ligne.php index 4ba08c10445..9d0d0fc3718 100644 --- a/htdocs/compta/prelevement/ligne.php +++ b/htdocs/compta/prelevement/ligne.php @@ -130,7 +130,7 @@ if ($id) print '
'; - print ''; print ''; print ''; diff --git a/htdocs/compta/prelevement/lignes.php b/htdocs/compta/prelevement/lignes.php index c322142b6a9..32f83b93906 100644 --- a/htdocs/compta/prelevement/lignes.php +++ b/htdocs/compta/prelevement/lignes.php @@ -54,7 +54,7 @@ $sortfield = ((GETPOST('sortfield','alpha')=="")) ? "pl.fk_soc" : GETPOST('sortf * View */ -llxHeader('',$langs->trans("WithdrawalReceipt")); +llxHeader('',$langs->trans("WithdrawalReceipts")); if ($prev_id) { @@ -63,7 +63,7 @@ if ($prev_id) if ($bon->fetch($prev_id) == 0) { $head = prelevement_prepare_head($bon); - dol_fiche_head($head, 'lines', $langs->trans("WithdrawalReceipt"), '', 'payment'); + dol_fiche_head($head, 'lines', $langs->trans("WithdrawalReceipts"), '', 'payment'); print '
'.$langs->trans("WithdrawalReceipt").''; + print '
'.$langs->trans("WithdrawalReceipts").''; print ''.$lipre->bon_ref.'
'.$langs->trans("Date").''.dol_print_date($bon->datec,'day').'
'.$langs->trans("Amount").''.price($lipre->amount).'
'; diff --git a/htdocs/compta/prelevement/liste.php b/htdocs/compta/prelevement/liste.php index cd09dc6cf25..33e2bfb71e1 100644 --- a/htdocs/compta/prelevement/liste.php +++ b/htdocs/compta/prelevement/liste.php @@ -111,7 +111,7 @@ if ($result) print ''; print ''; - print_liste_field_titre($langs->trans("WithdrawalReceipt"),$_SERVER["PHP_SELF"],"p.ref"); + print_liste_field_titre($langs->trans("WithdrawalReceipts"),$_SERVER["PHP_SELF"],"p.ref"); print_liste_field_titre($langs->trans("Bill"),$_SERVER["PHP_SELF"],"f.facnumber",'',$urladd); print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom"); print_liste_field_titre($langs->trans("CustomerCode"),$_SERVER["PHP_SELF"],"s.code_client",'','','align="center"'); From 8050f8e9fe3619430511a65c07400260aaa04bd0 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Thu, 14 Nov 2013 21:40:30 +0100 Subject: [PATCH 034/107] Fix problem field --- htdocs/societe/rib.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/societe/rib.php b/htdocs/societe/rib.php index 451209913aa..ab2b8f6dadd 100644 --- a/htdocs/societe/rib.php +++ b/htdocs/societe/rib.php @@ -66,7 +66,7 @@ if ($_POST["action"] == 'update' && ! $_POST["cancel"]) $account->iban_prefix = $_POST["iban_prefix"]; $account->domiciliation = $_POST["domiciliation"]; $account->proprio = $_POST["proprio"]; - $account->adresse_proprio = $_POST["adresse_proprio"]; + $account->owner_address = $_POST["owner_address"]; $result = $account->update($user); if (! $result) @@ -154,7 +154,7 @@ if ($_GET["socid"] && $_GET["action"] != 'edit') print "\n"; print '\n"; print '
'.$langs->trans("Line").'
'.$langs->trans("BankAccountOwnerAddress").''; - print $account->adresse_proprio; + print $account->owner_address; print "
'; @@ -236,8 +236,8 @@ if ($_GET["socid"] && $_GET["action"] == 'edit' && $user->rights->societe->creer print "\n"; print ''.$langs->trans("BankAccountOwnerAddress").''; - print ""; print '
'; From 200553c001264dc51e9fc214c7ce4f65ca65fa06 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Fri, 15 Nov 2013 04:58:59 +0100 Subject: [PATCH 035/107] Update ChangeLog --- ChangeLog | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 41982d6ecf5..41a34943ffc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,8 +2,10 @@ English Dolibarr ChangeLog -------------------------------------------------------------- ***** ChangeLog for 3.4.2 compared to 3.4.1 ***** +Fix: field's problem into company's page (RIB) +Fix: Document cerfa doesn't contained firstname & lastname from donator Fix: Bad rounding on margin calculations and display. -Fix: Option drpo table into backup was broken. +Fix: Option drop table into backup was broken. Fix: [ bug #1105 ] Searching Boxes other search option From b3a1d695cde0b56557af4fd2251cb8f4e3349452 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 15 Nov 2013 11:43:16 +0100 Subject: [PATCH 036/107] Qual: Better message for total of buying price Fix: Little debug of add link feature. Link was broken because of missing http, fix W3C making output wrong with some browsers. --- htdocs/core/class/html.formfile.class.php | 36 +++++++++++-------- htdocs/core/lib/functions2.lib.php | 2 +- .../tpl/document_actions_post_headers.tpl.php | 26 +++++++------- .../tpl/document_actions_pre_headers.tpl.php | 33 +++++++++++------ htdocs/langs/en_US/suppliers.lang | 2 ++ htdocs/langs/fr_FR/suppliers.lang | 2 ++ htdocs/link/class/link.class.php | 29 +++++++++------ htdocs/product/composition/fiche.php | 15 ++++---- 8 files changed, 90 insertions(+), 55 deletions(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 97ecce50a15..c578e5d9786 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -174,7 +174,7 @@ class FormFile $out .= ''; $out .= ''; $out .= $langs->trans("Link") . ': '; - $out .= ''; + $out .= ''; $out .= '   ' . $langs->trans("Label") . ': '; $out .= ''; $out .= ''; @@ -1063,6 +1063,9 @@ class FormFile // Show list of associated links print_titre($langs->trans("LinkedFiles")); + + print ''; + print ''; print ''; print_liste_field_titre( @@ -1076,7 +1079,7 @@ class FormFile $sortorder ); print_liste_field_titre( - $langs->trans("Size"), + "", "", "", "", @@ -1104,30 +1107,30 @@ class FormFile print_liste_field_titre('','',''); print ''; $nboflinks = count($links); - if ($nboflinks > 0) { - include_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; - } + if ($nboflinks > 0) include_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; $var = true; - foreach ($links as $link) { + foreach ($links as $link) + { $var =! $var; print ''; //edit mode - if ($action == 'update' && $selected === $link->id) { - print ''; + if ($action == 'update' && $selected === $link->id) + { + print ''; print ''; print ''; print ''; print ''; - print ''; + print ''; + print ''; } else { print '\n"; } - if ($nboflinks == 0) { + if ($nboflinks == 0) + { print ''; } print "
'; + print ''; print ''; print ''; - print ''; - print $langs->trans('Link') . ': '; + print $langs->trans('Link') . ': '; print ''; - print $langs->trans('Label') . ': '; + print $langs->trans('Label') . ': '; print '' . dol_print_date(dol_now(), "dayhour", "tzuser") . ''; - print ''; @@ -1142,7 +1145,7 @@ class FormFile print '' . img_edit().''; if ($permtodelete) { - print 'id . '&id=' . $object->id . '" class="deletefilelink" >' . img_delete() . ''; } else { print ' '; @@ -1151,13 +1154,16 @@ class FormFile } print "
'; print $langs->trans("NoLinkFound"); print '
"; + print ''; + return $nboflinks; } diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index 4727044ba45..22b90ef52e0 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -442,7 +442,7 @@ function isValidUrl($url,$http=0,$pass=0,$port=0,$path=0,$query=0,$anchor=0) * Clean an url string * * @param string $url Url - * @param string $http 1: keep http://, 0: remove also http:// + * @param string $http 1 = keep both http:// and https://, 0: remove http:// but not https:// * @return string Cleaned url */ function clean_url($url,$http=1) diff --git a/htdocs/core/tpl/document_actions_post_headers.tpl.php b/htdocs/core/tpl/document_actions_post_headers.tpl.php index 201355e60fe..5e06b585b57 100644 --- a/htdocs/core/tpl/document_actions_post_headers.tpl.php +++ b/htdocs/core/tpl/document_actions_post_headers.tpl.php @@ -20,22 +20,24 @@ /* * Confirm suppression */ -if ($action == 'delete') { - $ret = $form->form_confirm( - $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&urlfile=' . urlencode(GETPOST("urlfile")) . '&linkid=' . GETPOST('linkid', 'int'), - $langs->trans('DeleteFile'), - $langs->trans('ConfirmDeleteFile'), - 'confirm_deletefile', - '', - 0, - 1 - ); - if ($ret == 'html') print '
'; + +if ($action == 'delete') +{ + $ret = $form->form_confirm( + $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&urlfile=' . urlencode(GETPOST("urlfile")) . '&linkid=' . GETPOST('linkid', 'int'), + $langs->trans('DeleteFile'), + $langs->trans('ConfirmDeleteFile'), + 'confirm_deletefile', + '', + 0, + 1 + ); + if ($ret == 'html') print '
'; } $formfile=new FormFile($db); -// Show upload form +// Show upload form (document and links) $formfile->form_attach_new_file( $_SERVER["PHP_SELF"].'?id='.$object->id, '', diff --git a/htdocs/core/tpl/document_actions_pre_headers.tpl.php b/htdocs/core/tpl/document_actions_pre_headers.tpl.php index 18b7c18c4a5..96344944666 100644 --- a/htdocs/core/tpl/document_actions_pre_headers.tpl.php +++ b/htdocs/core/tpl/document_actions_pre_headers.tpl.php @@ -25,7 +25,8 @@ if (GETPOST('sendit') && ! empty($conf->global->MAIN_UPLOAD_DOC)) { } elseif (GETPOST('linkit') && ! empty($conf->global->MAIN_UPLOAD_DOC)) { if ($object->id) { $link = GETPOST('link', 'alpha'); - if ($link) { + if ($link) + { if (substr($link, 0, 7) != 'http://' && substr($link, 0, 8) != 'https://') { $link = 'http://' . $link; } @@ -36,11 +37,14 @@ if (GETPOST('sendit') && ! empty($conf->global->MAIN_UPLOAD_DOC)) { // Delete file/link -if ($action == 'confirm_deletefile' && $confirm == 'yes') { - if ($object->id) { +if ($action == 'confirm_deletefile' && $confirm == 'yes') +{ + if ($object->id) + { $urlfile = GETPOST('urlfile', 'alpha'); $linkid = GETPOST('linkid', 'int'); - if ($urlfile) { + if ($urlfile) + { $file = $upload_dir . "/" . $urlfile; // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP). $ret = dol_delete_file($file, 0, 0, 0, $object); @@ -49,7 +53,9 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes') { } else { setEventMessage($langs->trans("ErrorFailToDeleteFile", $urlfile), 'errors'); } - } elseif ($linkid) { + } + elseif ($linkid) + { require_once DOL_DOCUMENT_ROOT . '/link/class/link.class.php'; $link = new Link($db); $link->id = $linkid; @@ -65,23 +71,30 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes') { header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); exit; } -} elseif ($action == 'confirm_updateline' && GETPOST('save') && GETPOST('link', 'alpha')) { +} +elseif ($action == 'confirm_updateline' && GETPOST('save') && GETPOST('link', 'alpha')) +{ require_once DOL_DOCUMENT_ROOT . '/link/class/link.class.php'; $langs->load('link'); $link = new Link($db); $link->id = GETPOST('linkid', 'int'); $f = $link->fetch(); - if ($f) { + if ($f) + { $link->url = GETPOST('link', 'alpha'); - if (substr($link->url, 0, 7) != 'http://' && substr($link->url, 0, 8) != 'https://') { + if (substr($link->url, 0, 7) != 'http://' && substr($link->url, 0, 8) != 'https://') + { $link->url = 'http://' . $link->url; } $link->label = GETPOST('label', 'alpha'); $res = $link->update($user); - if (!$res) { + if (!$res) + { setEventMessage($langs->trans("ErrorFailedToUpdateLink", $link->label)); } - } else { + } + else + { //error fetching } } diff --git a/htdocs/langs/en_US/suppliers.lang b/htdocs/langs/en_US/suppliers.lang index 83a8e067d84..3561fd3e57e 100644 --- a/htdocs/langs/en_US/suppliers.lang +++ b/htdocs/langs/en_US/suppliers.lang @@ -12,6 +12,8 @@ OrderDate=Order date BuyingPrice=Buying price BuyingPriceMin=Minimum buying price BuyingPriceMinShort=Min buying price +TotalBuyingPriceMin=Total of subproducts buying prices +SomeSubProductHaveNoPrices=Some sub-products have no price defined AddSupplierPrice=Add supplier price ChangeSupplierPrice=Change supplier price ErrorQtyTooLowForThisSupplier=Quantity too low for this supplier or no price defined on this product for this supplier diff --git a/htdocs/langs/fr_FR/suppliers.lang b/htdocs/langs/fr_FR/suppliers.lang index 4e0514987f2..8e0f3475db4 100644 --- a/htdocs/langs/fr_FR/suppliers.lang +++ b/htdocs/langs/fr_FR/suppliers.lang @@ -12,6 +12,8 @@ OrderDate=Date de commande BuyingPrice=Prix d'achat BuyingPriceMin=Prix d'achat minimum BuyingPriceMinShort=Prix achat min. +TotalBuyingPriceMin=Total des prix d'achats des sous-produits +SomeSubProductHaveNoPrices=Certains sous-produits n'ont pas de prix définis AddSupplierPrice=Ajouter prix fournisseur ChangeSupplierPrice=Modifier prix fournisseur ErrorQtyTooLowForThisSupplier=Quantité trop basse pour ce fournisseur ou prix de ce produit non défini pour ce fournisseur diff --git a/htdocs/link/class/link.class.php b/htdocs/link/class/link.class.php index fb924eeec9d..0bb57c52cf6 100644 --- a/htdocs/link/class/link.class.php +++ b/htdocs/link/class/link.class.php @@ -154,22 +154,22 @@ class Link extends CommonObject { global $langs,$conf; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; + $langs->load("errors"); $error=0; dol_syslog(get_class($this)."::Update id = " . $this->id . " call_trigger = " . $call_trigger); // Check parameters - if (empty($this->url)) { + if (empty($this->url)) + { $this->error = $langs->trans("NoURL"); return -1; } // Clean parameters - $this->url = clean_url($this->url,0); - if(empty($this->label)) { - $this->label = basename($this->url); - } + $this->url = clean_url($this->url,1); + if (empty($this->label)) $this->label = basename($this->url); $this->label = trim($this->label); @@ -189,7 +189,8 @@ class Link extends CommonObject $resql = $this->db->query($sql); if ($resql) { - if ($call_trigger) { + if ($call_trigger) + { // Appel des triggers include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; $interface = new Interfaces($this->db); @@ -201,7 +202,8 @@ class Link extends CommonObject // Fin appel triggers } - if (! $error) { + if (! $error) + { dol_syslog(get_class($this) . "::Update success"); $this->db->commit(); return 1; @@ -209,14 +211,19 @@ class Link extends CommonObject $this->db->rollback(); return -1; } - } else { - if ($this->db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { + } + else + { + if ($this->db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') + { // Doublon $this->error = $langs->trans("ErrorDuplicateField"); $result = -1; - } else { + } + else + { $this->error = $langs->trans("Error sql = " . $sql); - dol_syslog(get_class($this) . "::Update fails update sql = " . $sql, LOG_ERR); + dol_syslog(get_class($this) . "::Update fails update = " . $this->error, LOG_ERR); $result = -2; } $this->db->rollback(); diff --git a/htdocs/product/composition/fiche.php b/htdocs/product/composition/fiche.php index 574aa1024e3..fac6402e300 100644 --- a/htdocs/product/composition/fiche.php +++ b/htdocs/product/composition/fiche.php @@ -71,7 +71,7 @@ $cancel <> $langs->trans("Cancel") && ($user->rights->produit->creer || $user->rights->service->creer)) { $error=0; - for($i=0;$i<$_POST["max_prod"];$i++) + for ($i=0; $i<$_POST["max_prod"]; $i++) { if ($_POST["prod_id_chk".$i] > 0) { @@ -328,6 +328,7 @@ if ($id > 0 || ! empty($ref)) // List of subproducts if (count($prods_arbo) > 0) { + $atleastonenotdefined=0; print ''; print $langs->trans("ProductAssociationList").'
'; print ''; @@ -343,13 +344,13 @@ if ($id > 0 || ! empty($ref)) { $notdefined=0; $productstatic->ref=$value['fullpath']; - print ''; + print ''; print ''; $totalline=price2num($value['nb'] * $product_fourn->fourn_unitprice, 'MT'); @@ -364,7 +365,7 @@ if ($id > 0 || ! empty($ref)) { print '     '; } - print $productstatic->getNomUrl(1,'composition').' ('.$value['nb'].')  '; + print $productstatic->getNomUrl(1,'composition').' ('.$value['nb'].')'; print ''; // Real stock @@ -372,8 +373,10 @@ if ($id > 0 || ! empty($ref)) print ''; } print ''; - print ''; - print ''; + print ''; + print ''; if (! empty($conf->stock->enabled)) print ''; print ''; print '
'.$productstatic->getNomUrl(1,'composition').' ('.$value['nb'].')  '.$productstatic->getNomUrl(1,'composition').' ('.$value['nb'].')'; if ($product_fourn->find_min_price_product_fournisseur($productstatic->id, $value['nb']) > 0) { print $langs->trans("BuyingPriceMinShort").': '; if ($product_fourn->product_fourn_price_id > 0) print $product_fourn->display_price_product_fournisseur(0,0); - else { print $langs->trans("NotDefined"); $notdefined=1; } + else { print $langs->trans("NotDefined"); $notdefined++; $atleastonenotdefined++; } } print ''; print ''; if (! empty($conf->stock->enabled)) print '
'.$langs->trans("BuyingPriceMin").': '.price($total,'','',0,0,-1,$conf->currency).''.$langs->trans("TotalBuyingPriceMin").': '; + if ($atleastonenotdefined) print $langs->trans("Unknown").' ('.$langs->trans("SomeSubProductHaveNoPrices").')'; + print ''.($atleastonenotdefined?'':price($total,'','',0,0,-1,$conf->currency)).' 
'; From 76967306809eb27fb4e49b3bceb5c6f729f3a602 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Fri, 15 Nov 2013 15:44:04 +0100 Subject: [PATCH 037/107] Fix output of extrafield select list from table (in case of filter with extrafields table) --- htdocs/core/class/extrafields.class.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index b26b050dfd4..39916775507 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -935,6 +935,10 @@ class ExtraFields $sql = 'SELECT '.$keyList; $sql.= ' FROM '.MAIN_DB_PREFIX .$InfoFieldList[0]; + if (strpos($InfoFieldList[4], 'extra')!==false) + { + $sql.= ' as main'; + } $sql.= ' WHERE '.$selectkey.'=\''.$this->db->escape($value).'\''; //$sql.= ' AND entity = '.$conf->entity; dol_syslog(get_class($this).':showOutputField:$type=sellist sql='.$sql); From 0aba9b02b8d0d9ff370c66fb07258e83e760e3c1 Mon Sep 17 00:00:00 2001 From: simnandez Date: Fri, 15 Nov 2013 17:43:13 +0100 Subject: [PATCH 038/107] Add alert for outstanding bill --- htdocs/compta/facture.php | 6 ++++-- htdocs/langs/en_US/companies.lang | 1 + htdocs/langs/es_ES/companies.lang | 1 + htdocs/langs/fr_FR/companies.lang | 1 + 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 191d48c4fdf..35ea16da826 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -2314,12 +2314,14 @@ if ($action == 'create') if ($soc->outstanding_limit) { + $outstandigBills=$soc->get_OutstandingBill(); // Outstanding Bill print ''; print $langs->trans('OutstandingBill'); print ''; - print price($soc->get_OutstandingBill()).' / '; - print price($soc->outstanding_limit).''; + print price($outstandigBills); + if (price($outstandigBills)>price($soc->outstanding_limit)) print img_warning($langs->trans("OutstandingBillReached")); + print ' / '.price($soc->outstanding_limit).''; print ''; print ''; } diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang index 94e6cb840c5..f20a3fe01dc 100644 --- a/htdocs/langs/en_US/companies.lang +++ b/htdocs/langs/en_US/companies.lang @@ -399,6 +399,7 @@ ActivityCeased=Closed ActivityStateFilter=Activity status ProductsIntoElements=List of products into OutstandingBill=Max. for outstanding bill +OutstandingBillReached=Reached max. for outstanding bill # Monkey MonkeyNumRefModelDesc=Return numero with format %syymm-nnnn for customer code and %syymm-nnnn for supplier code where yy is year, mm is month and nnnn is a sequence with no break and no return to 0. # Leopard diff --git a/htdocs/langs/es_ES/companies.lang b/htdocs/langs/es_ES/companies.lang index 7b1afbef15b..6b7a93c3aee 100644 --- a/htdocs/langs/es_ES/companies.lang +++ b/htdocs/langs/es_ES/companies.lang @@ -399,6 +399,7 @@ ActivityCeased=Cerrado ActivityStateFilter=Estado de actividad ProductsIntoElements=Listado de productos en %s OutstandingBill=Importe máximo para facturas pendientes +OutstandingBillReached=Importe máximo alcanzado # Monkey MonkeyNumRefModelDesc=Devuelve un número bajo el formato %syymm-nnnn para los códigos de clientes y %syymm-nnnn para los códigos de los proveedores, donde yy es el año, mm el mes y nnnn un contador secuencial sin ruptura y sin volver a 0. # Leopard diff --git a/htdocs/langs/fr_FR/companies.lang b/htdocs/langs/fr_FR/companies.lang index 7af13abdc52..41840c7b4ad 100644 --- a/htdocs/langs/fr_FR/companies.lang +++ b/htdocs/langs/fr_FR/companies.lang @@ -399,6 +399,7 @@ ActivityCeased=Clos ActivityStateFilter=Statut d'activité ProductsIntoElements=Liste des produits dans les %s OutstandingBill=Montant max. en attente +OutstandingBillReached=Montant max. endetté # Monkey MonkeyNumRefModelDesc=Renvoie le numéro sous la forme %syymm-nnnn pour les codes clients et %syymm-nnnn pour les codes fournisseurs où yy est l'année, mm le mois et nnnn un compteur séquentiel sans rupture et sans remise à 0. # Leopard From 618bf4d75ebb0b365ef431c0e1d0dfbe7e743931 Mon Sep 17 00:00:00 2001 From: simnandez Date: Fri, 15 Nov 2013 17:48:19 +0100 Subject: [PATCH 039/107] Remove td --- htdocs/compta/facture.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 35ea16da826..ee98cf98264 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -2321,8 +2321,7 @@ if ($action == 'create') print ''; print price($outstandigBills); if (price($outstandigBills)>price($soc->outstanding_limit)) print img_warning($langs->trans("OutstandingBillReached")); - print ' / '.price($soc->outstanding_limit).''; - print ''; + print ' / '.price($soc->outstanding_limit).''; print ''; } From c8f1a26d253905b9bf0edaf5650d5ac9a2814f6c Mon Sep 17 00:00:00 2001 From: simnandez Date: Fri, 15 Nov 2013 17:55:48 +0100 Subject: [PATCH 040/107] Format with price function --- htdocs/comm/fiche.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index c648a7d312b..c766cc54907 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -5,7 +5,7 @@ * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) - * Copyright (C) 2010-2012 Juanjo Menent + * Copyright (C) 2010-2013 Juanjo Menent * Copyright (C) 2013 Alexandre Spangaro * * This program is free software; you can redistribute it and/or modify @@ -389,7 +389,7 @@ if ($id > 0) print ''; print $form->editfieldkey("OutstandingBill",'OutstandingBill',$object->outstanding_limit,$object,$user->rights->societe->creer); print ''; - print $form->editfieldval("OutstandingBill",'OutstandingBill',$object->outstanding_limit,$object,$user->rights->societe->creer); + print price($form->editfieldval("OutstandingBill",'OutstandingBill',$object->outstanding_limit,$object,$user->rights->societe->creer)); print ''; print ''; } From d0d9cce1460ffa6ecf175951d00bfed1c6cf6f84 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 15 Nov 2013 22:15:48 +0100 Subject: [PATCH 041/107] Fix: price should not be used to compare amounts. Price is a formated string, not an amount. --- htdocs/compta/facture.php | 19 ++++++++++--------- htdocs/societe/class/societe.class.php | 16 ++++++++-------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index ee98cf98264..219887ebee5 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1929,7 +1929,7 @@ if ($action == 'update_extras') $ret = $extrafields->setOptionalsFromPost($extralabels,$object,GETPOST('attribute')); if ($ret < 0) $error++; - if (! $error) + if (! $error) { // Actions on extra fields (by external module or standard code) // FIXME le hook fait double emploi avec le trigger !! @@ -1946,7 +1946,7 @@ if ($action == 'update_extras') } else if ($reshook < 0) $error++; } - + if ($error) $action = 'edit_extras'; } @@ -2320,8 +2320,9 @@ if ($action == 'create') print $langs->trans('OutstandingBill'); print ''; print price($outstandigBills); - if (price($outstandigBills)>price($soc->outstanding_limit)) print img_warning($langs->trans("OutstandingBillReached")); - print ' / '.price($soc->outstanding_limit).''; + if ($outstandigBills > $soc->outstanding_limit) print img_warning($langs->trans("OutstandingBillReached")); + print ' / '.price($soc->outstanding_limit); + print ''; print ''; } @@ -3444,9 +3445,9 @@ else if ($id > 0 || ! empty($ref)) print ''; print ''; print ''; - + print $extrafields->showInputField($key,$value); - + print ''; print ''; } @@ -3792,7 +3793,7 @@ else if ($id > 0 || ! empty($ref)) print ''; print ''; } - + $i++; } print ''; @@ -3804,10 +3805,10 @@ else if ($id > 0 || ! empty($ref)) { dol_print_error($db); } - + print ''; } - + // Link for paypal payment if (! empty($conf->paypal->enabled) && $object->statut != 0) { diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 3b902be93f7..556bbe97041 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -2820,9 +2820,9 @@ class Societe extends CommonObject $this->db->begin(); $now=dol_now(); - + $outstanding = price2num($this->outstanding_limit); - + // Positionne l'encours de facturaiton $sql = "UPDATE ".MAIN_DB_PREFIX."societe SET "; $sql.= " outstanding_limit=".$outstanding; @@ -2843,13 +2843,13 @@ class Societe extends CommonObject } /** - * return amount of bill not paid + * Return amount of bill not paid * - * @return boolean Yes or no + * @return int Amount in debt for thirdparty */ function get_OutstandingBill() { - /* Accurate value of remain to pay is to sum remaintopay for each invoice + /* Accurate value of remain to pay is to sum remaintopay for each invoice $paiement = $invoice->getSommePaiement(); $creditnotes=$invoice->getSumCreditNotesUsed(); $deposits=$invoice->getSumDepositsUsed(); @@ -2857,7 +2857,7 @@ class Societe extends CommonObject $remaintopay=price2num($invoice->total_ttc - $paiement - $creditnotes - $deposits,'MT'); */ $sql = "SELECT sum(total) as amount FROM ".MAIN_DB_PREFIX."facture as f"; - $sql .= " WHERE fk_soc = ". $this->id; + $sql .= " WHERE fk_soc = ". $this->id; $sql .= " AND paye = 0"; $sql .= " AND fk_statut <> 0"; @@ -2873,9 +2873,9 @@ class Societe extends CommonObject } /** - * Return label of status customer is prospect/customer + * Return label of status customer is prospect/customer * - * @return string Libelle + * @return string Label */ function getLibCustProspStatut() { From c5230ea2ff8688c477e3754b50d4621179cd115a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 15 Nov 2013 23:39:44 +0100 Subject: [PATCH 042/107] Fix: option --skip on by default --- dev/translation/txpush.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dev/translation/txpush.sh b/dev/translation/txpush.sh index 30a40379ce3..4a62a660637 100755 --- a/dev/translation/txpush.sh +++ b/dev/translation/txpush.sh @@ -13,7 +13,7 @@ then echo "This push local files to transifex." echo "Note: If you push a language file (not source), file will be skipped if transifex file is newer." echo " Using -f will overwrite translation but not memory." - echo "Usage: txpush.sh (source|all|xx_XX) [-r dolibarr.file] [-f] [--skip] [--no-interactive]" + echo "Usage: txpush.sh (source|all|xx_XX) [-r dolibarr.file] [-f] [--no-interactive]" exit fi @@ -22,8 +22,8 @@ if [ "x$1" = "xall" ] then for fic in ar_SA bg_BG ca_ES da_DK de_DE el_GR es_ES et_EE fa_IR fi_FI fr_FR he_IL hu_HU is_IS it_IT ja_JP ko_KR nb_NO nl_NL pl_PL pt_PT ro_RO ru_RU ru_UA sl_SI sv_SE tr_TR vi_VN zh_CN zh_TW do - echo "tx push -t -l $fic $2 $3" - tx push -t -l $fic $2 $3 + echo "tx push --skip -t -l $fic $2 $3" + tx push --skip -t -l $fic $2 $3 done else if [ "x$1" = "xsource" ] @@ -31,7 +31,7 @@ then echo "tx push -s $2 $3" tx push -s $2 $3 else - echo "tx push -t -l $1 $2 $3 $4" - tx push -t -l $1 $2 $3 $4 + echo "tx push --skip -t -l $1 $2 $3 $4" + tx push --skip -t -l $1 $2 $3 $4 fi fi From 5b243abe4b82c3a5f04d1c15dbc5d511e0bd9ddc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 16 Nov 2013 12:00:08 +0100 Subject: [PATCH 043/107] Fix: Miscellaneous fixes --- htdocs/comm/fiche.php | 4 ++-- htdocs/compta/facture.php | 22 +++++++++++++------ htdocs/core/class/html.form.class.php | 10 ++++++--- htdocs/core/db/pgsql.class.php | 5 +++-- .../install/mysql/migration/3.4.0-3.5.0.sql | 2 +- .../install/mysql/tables/llx_societe_rib.sql | 2 +- 6 files changed, 29 insertions(+), 16 deletions(-) diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index c766cc54907..7467aee23b3 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2011 Laurent Destailleur + * Copyright (C) 2004-2013 Laurent Destailleur * Copyright (C) 2004 Eric Seigne * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2005-2012 Regis Houssin @@ -389,7 +389,7 @@ if ($id > 0) print ''; print $form->editfieldkey("OutstandingBill",'OutstandingBill',$object->outstanding_limit,$object,$user->rights->societe->creer); print ''; - print price($form->editfieldval("OutstandingBill",'OutstandingBill',$object->outstanding_limit,$object,$user->rights->societe->creer)); + print $form->editfieldval("OutstandingBill",'OutstandingBill',$object->outstanding_limit,$object,$user->rights->societe->creer,'amount',price($object->outstanding_limit)); print ''; print ''; } diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 219887ebee5..c54d6242fce 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -2312,19 +2312,22 @@ if ($action == 'create') print ''; } - if ($soc->outstanding_limit) + // TODO This is nt a roperty of invoice so should not appears here but as a warning on thirdparty + /* + if ($soc->outstanding_limit) { $outstandigBills=$soc->get_OutstandingBill(); // Outstanding Bill print ''; print $langs->trans('OutstandingBill'); - print ''; + print ''; print price($outstandigBills); if ($outstandigBills > $soc->outstanding_limit) print img_warning($langs->trans("OutstandingBillReached")); print ' / '.price($soc->outstanding_limit); print ''; print ''; } + */ // Other attributes $parameters=array('objectsrc' => $objectsrc, 'colspan' => ' colspan="3"'); @@ -3042,7 +3045,7 @@ else if ($id > 0 || ! empty($ref)) $nbrows=8; $nbcols=2; if (! empty($conf->projet->enabled)) $nbrows++; if (! empty($conf->banque->enabled)) $nbcols++; - if (! empty($soc->outstandingbill)) $nbrows++; + //if (! empty($soc->outstandingbill)) $nbrows++; if($mysoc->localtax1_assuj=="1") $nbrows++; if($mysoc->localtax2_assuj=="1") $nbrows++; if ($selleruserevenustamp) $nbrows++; @@ -3314,18 +3317,23 @@ else if ($id > 0 || ! empty($ref)) } print ''; + // TODO This is nt a roperty of invoice so should not appears here but as a warning on thirdparty + /* if ($soc->outstandingbill) { + $outstandingBills=$soc->get_OutstandingBill(); // Outstanding Bill print ''; print $langs->trans('OutstandingBill'); - print ''; - print price($soc->get_OutstandingBill()).' / '; - print price($soc->outstandingbill); + print ''; + print price($outstandingBills); + if ($outstandigBills > $soc->outstanding_limit) print img_warning($langs->trans("OutstandingBillReached")); + print ' / '.price($soc->outstandingbill); print ''; print ''; } - + */ + // Amount print ''.$langs->trans('AmountHT').''; print ''.price($object->total_ht,1,'',1,-1,-1,$conf->currency).''; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 296ae741e1b..36c1f838810 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -121,8 +121,8 @@ class Form * @param string $value Value to show/edit * @param object $object Object * @param boolean $perm Permission to allow button to edit parameter - * @param string $typeofdata Type of data ('string' by default, 'email', 'numeric:99', 'text' or 'textarea:rows:cols', 'day' or 'datepicker', 'ckeditor:dolibarr_zzz:width:height:savemethod:toolbarstartexpanded:rows:cols', 'select:xxx'...) - * @param string $editvalue When in edit mode, use this value as $value instead of value + * @param string $typeofdata Type of data ('string' by default, 'amount', 'email', 'numeric:99', 'text' or 'textarea:rows:cols', 'day' or 'datepicker', 'ckeditor:dolibarr_zzz:width:height:savemethod:toolbarstartexpanded:rows:cols', 'select:xxx'...) + * @param string $editvalue When in edit mode, use this value as $value instead of value (for example, you can provide here a formated price instead of value) * @param object $extObject External object * @param string $success Success message * @param string $moreparam More param to add on a href URL @@ -134,6 +134,9 @@ class Form $ret=''; + // Check parameters + if (empty($typeofdata)) return 'ErrorBadParameter'; + // When option to edit inline is activated if (! empty($conf->global->MAIN_USE_JQUERY_JEDITABLE) && ! preg_match('/^select;|datehourpicker/',$typeofdata)) // FIXME add jquery timepicker { @@ -150,7 +153,7 @@ class Form $ret.=''; $ret.=''; $ret.=''; -// TODO the precedent values are deleted after turn on this switch -$var=!$var; -print ''; - +// Constant to add salt into the unsubscribe and check read tag. +// It is also used as a security key parameter. $var=!$var; print ''; print '
'; - if (preg_match('/^(string|email|numeric)/',$typeofdata)) + if (preg_match('/^(string|email|numeric|amount)/',$typeofdata)) { $tmp=explode(':',$typeofdata); $ret.=''; @@ -193,6 +196,7 @@ class Form else { if ($typeofdata == 'email') $ret.=dol_print_email($value,0,0,0,0,1); + elseif ($typeofdata == 'amount') $ret.=price($value,'',$langs); elseif (preg_match('/^text/',$typeofdata) || preg_match('/^note/',$typeofdata)) $ret.=dol_htmlentitiesbr($value); elseif ($typeofdata == 'day' || $typeofdata == 'datepicker') $ret.=dol_print_date($value,'day'); elseif ($typeofdata == 'datehourpicker') $ret.=dol_print_date($value,'dayhour'); diff --git a/htdocs/core/db/pgsql.class.php b/htdocs/core/db/pgsql.class.php index 8159304f376..7c0366fb4a0 100644 --- a/htdocs/core/db/pgsql.class.php +++ b/htdocs/core/db/pgsql.class.php @@ -210,7 +210,8 @@ class DoliDBPgsql extends DoliDB // tinyint type conversion $line=preg_replace('/tinyint\(?[0-9]*\)?/','smallint',$line); - + $line=preg_replace('/tinyint/i','smallint',$line); + // nuke unsigned $line=preg_replace('/(int\w+|smallint)\s+unsigned/i','\\1',$line); @@ -875,7 +876,7 @@ class DoliDBPgsql extends DoliDB 42701=> 'DB_ERROR_COLUMN_ALREADY_EXISTS', '42710' => 'DB_ERROR_KEY_NAME_ALREADY_EXISTS', '23505' => 'DB_ERROR_RECORD_ALREADY_EXISTS', - '42704' => 'DB_ERROR_NO_INDEX_TO_DROP', + '42704' => 'DB_ERROR_NO_INDEX_TO_DROP', // May also be Type xxx does not exists '42601' => 'DB_ERROR_SYNTAX', '42P16' => 'DB_ERROR_PRIMARY_KEY_ALREADY_EXISTS', 1075 => 'DB_ERROR_CANT_DROP_PRIMARY_KEY', diff --git a/htdocs/install/mysql/migration/3.4.0-3.5.0.sql b/htdocs/install/mysql/migration/3.4.0-3.5.0.sql index 5fbd3dcc3f4..a091e7f089c 100755 --- a/htdocs/install/mysql/migration/3.4.0-3.5.0.sql +++ b/htdocs/install/mysql/migration/3.4.0-3.5.0.sql @@ -359,5 +359,5 @@ ALTER TABLE llx_societe ADD skype VARCHAR(255) AFTER email; ALTER TABLE llx_adherent ADD skype VARCHAR(255) AFTER email; -- multi-rib -ALTER TABLE llx_societe_rib ADD default_rib TINYINT NOT NULL DEFAULT 0 AFTER owner_address; +ALTER TABLE llx_societe_rib ADD default_rib smallint NOT NULL DEFAULT 0 AFTER owner_address; UPDATE llx_societe_rib SET default_rib = 1; diff --git a/htdocs/install/mysql/tables/llx_societe_rib.sql b/htdocs/install/mysql/tables/llx_societe_rib.sql index d928da868ed..1bedff6da4c 100644 --- a/htdocs/install/mysql/tables/llx_societe_rib.sql +++ b/htdocs/install/mysql/tables/llx_societe_rib.sql @@ -36,7 +36,7 @@ create table llx_societe_rib domiciliation varchar(255), proprio varchar(60), owner_address varchar(255), - default_rib tinyint NOT NULL DEFAULT 0, + default_rib smallint NOT NULL DEFAULT 0, import_key varchar(14) -- import key From b7190d26090ae8bfed8242bde8d3c9b687585d5b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 16 Nov 2013 13:00:21 +0100 Subject: [PATCH 044/107] Fix: Several bugs. --- htdocs/admin/mailing.php | 54 +++---------------- htdocs/admin/proxy.php | 13 ++--- htdocs/admin/security_other.php | 4 +- htdocs/comm/mailing/fiche.php | 28 ++++------ .../modules/mailings/modules_mailings.php | 30 +++++------ scripts/emailings/mailing-send.php | 2 +- 6 files changed, 38 insertions(+), 93 deletions(-) diff --git a/htdocs/admin/mailing.php b/htdocs/admin/mailing.php index ff945e2897e..3c9c2f5ad93 100644 --- a/htdocs/admin/mailing.php +++ b/htdocs/admin/mailing.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2012 Laurent Destailleur + * Copyright (C) 2005-2013 Laurent Destailleur * Copyright (C) 2011-2013 Juanjo Menent * * This program is free software; you can redistribute it and/or modify @@ -40,15 +40,6 @@ $action = GETPOST('action','alpha'); * Actions */ -if ($action == 'setMAILING_EMAIL_UNSUBSCRIBE') -{ - $res=dolibarr_set_const($db, "MAILING_EMAIL_UNSUBSCRIBE",1,'chaine',0,'',$conf->entity); -} -if ($action == 'unsetMAILING_EMAIL_UNSUBSCRIBE') -{ - $res=dolibarr_del_const($db, "MAILING_EMAIL_UNSUBSCRIBE"); -} - if ($action == 'setvalue') { $db->begin(); @@ -62,22 +53,8 @@ if ($action == 'setvalue') if (! $res > 0) $error++; $res=dolibarr_set_const($db, "MAILING_EMAIL_ERRORSTO",$mailerror,'chaine',0,'',$conf->entity); if (! $res > 0) $error++; - if ($checkread=='on') - { - $res=dolibarr_set_const($db, "MAILING_EMAIL_UNSUBSCRIBE",1,'chaine',0,'',$conf->entity); - if (! $res > 0) $error++; - } - else if ($checkread=='off') - { - $res=dolibarr_set_const($db, "MAILING_EMAIL_UNSUBSCRIBE",0,'chaine',0,'',$conf->entity); - if (! $res > 0) $error++; - } - //Create temporary encryption key if nedded - if (($conf->global->MAILING_EMAIL_UNSUBSCRIBE==1) && (empty($checkread_key))) - { - $checkread_key=getRandomPassword(true); - } + // Create temporary encryption key if nedded $res=dolibarr_set_const($db, "MAILING_EMAIL_UNSUBSCRIBE_KEY",$checkread_key,'chaine',0,'',$conf->entity); if (! $res > 0) $error++; @@ -157,32 +134,13 @@ print '
'; -print $langs->trans("ActivateCheckRead").''; -if (!empty($conf->global->MAILING_EMAIL_UNSUBSCRIBE)) -{ - print ''; - print img_picto($langs->trans("Enabled"),'switch_on'); - print ''; - $readonly=''; -} -else -{ - print ''; - print img_picto($langs->trans("Disabled"),'switch_off'); - print ''; - $readonly='disabled="disabled"'; -} -print '
'; print $langs->trans("ActivateCheckReadKey").''; -print ''; -if (! empty($conf->use_javascript_ajax)) - print ' '.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token" class="linkobject"'); +print ''; +if (! empty($conf->use_javascript_ajax)) print ' '.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token" class="linkobject"'); print '
'; diff --git a/htdocs/admin/proxy.php b/htdocs/admin/proxy.php index e78e86991cb..a292ae75e11 100644 --- a/htdocs/admin/proxy.php +++ b/htdocs/admin/proxy.php @@ -1,6 +1,6 @@ - * Copyright (C) 2013 Juanjo Menent +/* Copyright (C) 2011-2013 Laurent Destailleur + * Copyright (C) 2013 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 @@ -196,13 +196,14 @@ print ''; print ''; -dol_fiche_end(); - -print '
'; +print '
'; print ''; print '
'; -print '
'; +print ''; + +dol_fiche_end(); + $db->close(); diff --git a/htdocs/admin/security_other.php b/htdocs/admin/security_other.php index e32194d818f..6afc12949d6 100644 --- a/htdocs/admin/security_other.php +++ b/htdocs/admin/security_other.php @@ -1,7 +1,7 @@ * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2013 Juanjo Menent + * Copyright (C) 2013 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 @@ -327,7 +327,7 @@ dol_fiche_end(); // Form to test upload print '
'; $formfile=new FormFile($db); -$formfile->form_attach_new_file($_SERVER['PHP_SELF'], $langs->trans("FormToTestFileUploadForm"), 0, 0, 1); +$formfile->form_attach_new_file($_SERVER['PHP_SELF'], $langs->trans("FormToTestFileUploadForm"), 0, 0, 1, 50, '', '', 1, '', 0); // List of document $filearray=dol_dir_list($upload_dir, "files", 0, '', '', 'name', SORT_ASC, 1); diff --git a/htdocs/comm/mailing/fiche.php b/htdocs/comm/mailing/fiche.php index 71ea4cc5d93..3510df7339e 100644 --- a/htdocs/comm/mailing/fiche.php +++ b/htdocs/comm/mailing/fiche.php @@ -67,13 +67,10 @@ $object->substitutionarray=array( '__OTHER4__' => 'Other4', '__OTHER5__' => 'Other5', '__SIGNATURE__' => 'TagSignature', - '__CHECK_READ__' => 'TagCheckMail' + '__CHECK_READ__' => 'TagCheckMail', + '__UNSUBSCRIBE__' => 'TagUnsubscribe' //,'__PERSONALIZED__' => 'Personalized' // Hidden because not used yet ); -if (! empty($conf->global->MAILING_EMAIL_UNSUBSCRIBE)) -{ - $object->substitutionarray=array_merge($object->substitutionarray, array('__UNSUBSCRIBE__' => 'TagUnsubscribe')); -} $object->substitutionarrayfortest=array( '__ID__' => 'TESTIdRecord', @@ -86,19 +83,12 @@ $object->substitutionarrayfortest=array( '__OTHER3__' => 'TESTOther3', '__OTHER4__' => 'TESTOther4', '__OTHER5__' => 'TESTOther5', - '__SIGNATURE__' => (($user->signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN))?$user->signature:'') - //,'__PERSONALIZED__' => 'TESTPersonalized' // Not used yet + '__SIGNATURE__' => (($user->signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN))?$user->signature:''), + '__CHECK_READ__' => 'TagCheckMail', + '__UNSUBSCRIBE__' => 'TagUnsubscribe' +//,'__PERSONALIZED__' => 'TESTPersonalized' // Not used yet ); -if (!empty($conf->global->MAILING_EMAIL_UNSUBSCRIBE)) -{ - $object->substitutionarrayfortest=array_merge( - $object->substitutionarrayfortest, - array( - '__CHECK_READ__' => 'TESTCheckMail', - '__UNSUBSCRIBE__' => 'TESTUnsubscribe' - ) - ); -} + /* * Actions @@ -221,8 +211,8 @@ if ($action == 'sendallconfirmed' && $confirm == 'yes') $substitutionarray=array( '__ID__' => $obj->source_id, '__EMAIL__' => $obj->email, - '__CHECK_READ__' => '', - '__UNSUBSCRIBE__' => ''.$langs->trans("MailUnsubcribe").'', + '__CHECK_READ__' => '', + '__UNSUBSCRIBE__' => ''.$langs->trans("MailUnsubcribe").'', '__MAILTOEMAIL__' => ''.$obj->email.'', '__LASTNAME__' => $obj->lastname, '__FIRSTNAME__' => $obj->firstname, diff --git a/htdocs/core/modules/mailings/modules_mailings.php b/htdocs/core/modules/mailings/modules_mailings.php index 74d79547e2f..4f0599bfb3b 100644 --- a/htdocs/core/modules/mailings/modules_mailings.php +++ b/htdocs/core/modules/mailings/modules_mailings.php @@ -155,24 +155,20 @@ class MailingTargets // This can't be abstract as it is used for some method if (! empty($targetarray['email'])) // avoid empty email address { $sql = "INSERT INTO ".MAIN_DB_PREFIX."mailing_cibles"; - $sql .= " (fk_mailing,"; - $sql .= " fk_contact,"; - $sql .= " lastname, firstname, email, other, source_url, source_id,"; - if (! empty($conf->global->MAILING_EMAIL_UNSUBSCRIBE)) { - $sql .= " tag,"; - } + $sql.= " (fk_mailing,"; + $sql.= " fk_contact,"; + $sql.= " lastname, firstname, email, other, source_url, source_id,"; + $sql.= " tag,"; $sql.= " source_type)"; - $sql .= " VALUES (".$mailing_id.","; - $sql .= (empty($targetarray['fk_contact']) ? '0' : "'".$targetarray['fk_contact']."'") .","; - $sql .= "'".$this->db->escape($targetarray['lastname'])."',"; - $sql .= "'".$this->db->escape($targetarray['firstname'])."',"; - $sql .= "'".$this->db->escape($targetarray['email'])."',"; - $sql .= "'".$this->db->escape($targetarray['other'])."',"; - $sql .= "'".$this->db->escape($targetarray['source_url'])."',"; - $sql .= (empty($targetarray['source_id']) ? 'null' : "'".$this->db->escape($targetarray['source_id'])."'").","; - if (! empty($conf->global->MAILING_EMAIL_UNSUBSCRIBE)) { - $sql .= "'".$this->db->escape(md5($targetarray['email'].';'.$targetarray['name'].';'.$mailing_id.';'.$conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY))."',"; - } + $sql.= " VALUES (".$mailing_id.","; + $sql.= (empty($targetarray['fk_contact']) ? '0' : "'".$targetarray['fk_contact']."'") .","; + $sql.= "'".$this->db->escape($targetarray['lastname'])."',"; + $sql.= "'".$this->db->escape($targetarray['firstname'])."',"; + $sql.= "'".$this->db->escape($targetarray['email'])."',"; + $sql.= "'".$this->db->escape($targetarray['other'])."',"; + $sql.= "'".$this->db->escape($targetarray['source_url'])."',"; + $sql.= (empty($targetarray['source_id']) ? 'null' : "'".$this->db->escape($targetarray['source_id'])."'").","; + $sql .= "'".$this->db->escape(dol_hash($targetarray['email'].';'.$targetarray['name'].';'.$mailing_id.';'.$conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY))."',"; $sql .= "'".$this->db->escape($targetarray['source_type'])."')"; $result=$this->db->query($sql); if ($result) diff --git a/scripts/emailings/mailing-send.php b/scripts/emailings/mailing-send.php index 31cb141835c..c6fffdcc59f 100755 --- a/scripts/emailings/mailing-send.php +++ b/scripts/emailings/mailing-send.php @@ -227,7 +227,7 @@ if ($resql) $error++; } - //Update status communication of contact prospect + //Update status communication of contact prospect $sqlx = "UPDATE ".MAIN_DB_PREFIX."societe SET fk_stcomm=2 WHERE rowid IN (SELECT sc.fk_soc FROM ".MAIN_DB_PREFIX."socpeople AS sc INNER JOIN ".MAIN_DB_PREFIX."mailing_cibles AS mc ON mc.rowid=".$obj2->rowid." AND mc.source_type = 'contact' AND mc.source_id = sc.rowid)"; dol_syslog("fiche.php: set prospect contact status sql=".$sql, LOG_DEBUG); From 8ec50fce23543f6a86d7eca38d6fef44d1294f04 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 16 Nov 2013 14:26:42 +0100 Subject: [PATCH 045/107] Move warning at correct place. Fix: Reset of amount was not working --- htdocs/comm/fiche.php | 8 ++-- htdocs/compta/facture.php | 57 ++++++++++---------------- htdocs/core/class/html.form.class.php | 6 +-- htdocs/langs/en_US/companies.lang | 1 + htdocs/langs/fr_FR/companies.lang | 1 + htdocs/societe/class/societe.class.php | 17 ++++---- 6 files changed, 41 insertions(+), 49 deletions(-) diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index 7467aee23b3..1e084406ae0 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -6,7 +6,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) * Copyright (C) 2010-2013 Juanjo Menent - * Copyright (C) 2013 Alexandre Spangaro + * Copyright (C) 2013 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 @@ -198,7 +198,7 @@ if ($id > 0) print '
'; - + print ''; print ''; } - + // Assujeti a TVA ou pas print ''; print ''; print ''; } diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index c54d6242fce..7e1eb0d7445 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -2083,6 +2083,16 @@ if ($action == 'create') print ''; } else @@ -2312,23 +2322,6 @@ if ($action == 'create') print ''; } - // TODO This is nt a roperty of invoice so should not appears here but as a warning on thirdparty - /* - if ($soc->outstanding_limit) - { - $outstandigBills=$soc->get_OutstandingBill(); - // Outstanding Bill - print ''; - print ''; - } - */ - // Other attributes $parameters=array('objectsrc' => $objectsrc, 'colspan' => ' colspan="3"'); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook @@ -2877,7 +2870,18 @@ else if ($id > 0 || ! empty($ref)) else { print '  '.$soc->getNomUrl(1,'compta'); - print '   ('.$langs->trans('OtherBills').')'; + print '   '; + print '('.$langs->trans('OtherBills').''; + // Outstanding Bill + $outstandigBills=$soc->get_OutstandingBill(); + print ' - '.$langs->trans('CurrentOutstandingBill').': '; + print price($outstandigBills,'',$langs,0,0,-1,$conf->currency); + if ($soc->outstanding_limit != '') + { + if ($outstandigBills > $soc->outstanding_limit) print img_warning($langs->trans("OutstandingBillReached")); + print ' / '.price($soc->outstanding_limit); + } + print ')'; } print ''; @@ -3317,23 +3321,6 @@ else if ($id > 0 || ! empty($ref)) } print ''; - // TODO This is nt a roperty of invoice so should not appears here but as a warning on thirdparty - /* - if ($soc->outstandingbill) - { - $outstandingBills=$soc->get_OutstandingBill(); - // Outstanding Bill - print ''; - print ''; - } - */ - // Amount print ''; print ''; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 36c1f838810..f89142fe274 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -136,7 +136,7 @@ class Form // Check parameters if (empty($typeofdata)) return 'ErrorBadParameter'; - + // When option to edit inline is activated if (! empty($conf->global->MAIN_USE_JQUERY_JEDITABLE) && ! preg_match('/^select;|datehourpicker/',$typeofdata)) // FIXME add jquery timepicker { @@ -194,9 +194,9 @@ class Form $ret.=''."\n"; } else - { + { if ($typeofdata == 'email') $ret.=dol_print_email($value,0,0,0,0,1); - elseif ($typeofdata == 'amount') $ret.=price($value,'',$langs); + elseif ($typeofdata == 'amount') $ret.=($value != '' ? price($value,'',$langs) : ''); elseif (preg_match('/^text/',$typeofdata) || preg_match('/^note/',$typeofdata)) $ret.=dol_htmlentitiesbr($value); elseif ($typeofdata == 'day' || $typeofdata == 'datepicker') $ret.=dol_print_date($value,'day'); elseif ($typeofdata == 'datehourpicker') $ret.=dol_print_date($value,'dayhour'); diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang index f20a3fe01dc..cdf9c3e5770 100644 --- a/htdocs/langs/en_US/companies.lang +++ b/htdocs/langs/en_US/companies.lang @@ -398,6 +398,7 @@ InActivity=Open ActivityCeased=Closed ActivityStateFilter=Activity status ProductsIntoElements=List of products into +CurrentOutstandingBill=Current outstanding bill OutstandingBill=Max. for outstanding bill OutstandingBillReached=Reached max. for outstanding bill # Monkey diff --git a/htdocs/langs/fr_FR/companies.lang b/htdocs/langs/fr_FR/companies.lang index 41840c7b4ad..a25784951d2 100644 --- a/htdocs/langs/fr_FR/companies.lang +++ b/htdocs/langs/fr_FR/companies.lang @@ -398,6 +398,7 @@ InActivity=En activité ActivityCeased=Clos ActivityStateFilter=Statut d'activité ProductsIntoElements=Liste des produits dans les %s +CurrentOutstandingBill=Montant encours OutstandingBill=Montant max. en attente OutstandingBillReached=Montant max. endetté # Monkey diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 556bbe97041..66d40e480ba 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -2821,24 +2821,27 @@ class Societe extends CommonObject $now=dol_now(); + // Clean parameters $outstanding = price2num($this->outstanding_limit); - // Positionne l'encours de facturaiton + // Set outstanding amount $sql = "UPDATE ".MAIN_DB_PREFIX."societe SET "; - $sql.= " outstanding_limit=".$outstanding; + $sql.= " outstanding_limit= ".($outstanding!=''?$outstanding:'null'); $sql.= " WHERE rowid = ".$this->id; dol_syslog(get_class($this)."::set_outstanding sql=".$sql); $resql=$this->db->query($sql); - if (! $resql) + if ($resql) + { + $this->db->commit(); + return 1; + } + else { $this->db->rollback(); - $this->error=$this->db->error(); + $this->error=$this->db->lasterror(); return -1; } - - $this->db->commit(); - return 1; } } From d28eacebd7e4b6993cfedbcbcb17894a0337fbd8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 16 Nov 2013 14:53:08 +0100 Subject: [PATCH 046/107] Fix: Remove an edit button that is not implemented. --- htdocs/societe/localtaxes.php | 106 +++++++++++++++++----------------- 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/htdocs/societe/localtaxes.php b/htdocs/societe/localtaxes.php index 68a2957eeb8..4471c163f44 100644 --- a/htdocs/societe/localtaxes.php +++ b/htdocs/societe/localtaxes.php @@ -47,17 +47,14 @@ $parameters=array('id'=>$socid); $reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks $error=$hookmanager->error; $errors=array_merge($errors, (array) $hookmanager->errors); + /* * View */ $contactstatic = new Contact($db); - $form = new Form($db); -/* - * Fiche categorie de client et/ou fournisseur - */ if ($socid) { require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; @@ -140,43 +137,45 @@ if ($socid) print ''; print ''; - - if($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj=="1") - { - print ''; - print ''; - } - elseif($mysoc->localtax1_assuj=="1") - { - print ''; - } - elseif($mysoc->localtax2_assuj=="1") - { - print ''; - } - - + + if ($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj=="1") + { + print ''; + print ''; + } + elseif($mysoc->localtax1_assuj=="1") + { + print ''; + } + elseif($mysoc->localtax2_assuj=="1") + { + print ''; + } + print '
'.$langs->trans("ThirdPartyName").''; @@ -272,7 +272,7 @@ if ($id > 0) { print ''.$langs->trans('Skype').''.dol_print_skype($object->skype,0,$object->id,'AC_SKYPE').'
'.$langs->trans('VATIsUsed').''; @@ -389,7 +389,7 @@ if ($id > 0) print ''; print $form->editfieldkey("OutstandingBill",'OutstandingBill',$object->outstanding_limit,$object,$user->rights->societe->creer); print ''; - print $form->editfieldval("OutstandingBill",'OutstandingBill',$object->outstanding_limit,$object,$user->rights->societe->creer,'amount',price($object->outstanding_limit)); + print $form->editfieldval("OutstandingBill",'OutstandingBill',$object->outstanding_limit,$object,$user->rights->societe->creer,'amount',($object->outstanding_limit != '' ? price($object->outstanding_limit) : '')); print '
'; print $soc->getNomUrl(1); print ''; + // Outstanding Bill + $outstandigBills=$soc->get_OutstandingBill(); + print ' ('.$langs->trans('CurrentOutstandingBill').': '; + print price($outstandigBills,'',$langs,0,0,-1,$conf->currency); + if ($soc->outstanding_limit != '') + { + if ($outstandigBills > $soc->outstanding_limit) print img_warning($langs->trans("OutstandingBillReached")); + print ' / '.price($soc->outstanding_limit); + } + print ')'; print '
'; - print $langs->trans('OutstandingBill'); - print ''; - print price($outstandigBills); - if ($outstandigBills > $soc->outstanding_limit) print img_warning($langs->trans("OutstandingBillReached")); - print ' / '.price($soc->outstanding_limit); - print '
'; - print $langs->trans('OutstandingBill'); - print ''; - print price($outstandingBills); - if ($outstandigBills > $soc->outstanding_limit) print img_warning($langs->trans("OutstandingBillReached")); - print ' / '.price($soc->outstandingbill); - print '
'.$langs->trans('AmountHT').''.price($object->total_ht,1,'',1,-1,-1,$conf->currency).'
'.$langs->trans('Phone').''.dol_print_phone($soc->phone,$soc->country_code,0,$soc->id,'AC_TEL').''.$langs->trans('Fax').''.dol_print_phone($soc->fax,$soc->country_code,0,$soc->id,'AC_FAX').'
'.$langs->transcountry('LocalTax1IsUsed',$mysoc->country_code).''; - print yn($soc->localtax1_assuj); - print '
'.$langs->transcountry('LocalTax2IsUsed',$mysoc->country_code).''; - print yn($soc->localtax2_assuj); - print '
'.$langs->transcountry('LocalTax1IsUsed',$mysoc->country_code).''; - print yn($soc->localtax1_assuj); - print '
'.$langs->transcountry('LocalTax2IsUsed',$mysoc->country_code).''; - print yn($soc->localtax2_assuj); - print '
'.$langs->transcountry('LocalTax1IsUsed',$mysoc->country_code).''; + print yn($soc->localtax1_assuj); + print '
'.$langs->transcountry('LocalTax2IsUsed',$mysoc->country_code).''; + print yn($soc->localtax2_assuj); + print '
'.$langs->transcountry('LocalTax1IsUsed',$mysoc->country_code).''; + print yn($soc->localtax1_assuj); + print '
'.$langs->transcountry('LocalTax2IsUsed',$mysoc->country_code).''; + print yn($soc->localtax2_assuj); + print '
'; - print '
'; - - - // TODO: Improve and move to tpl - + dol_fiche_end(); + + + print '
'; + print ''; + print ''; + print ''; + // Localtaxes - + print ''; - + print ''; - + // Description print ''; @@ -195,8 +194,8 @@ if ($socid) print ''; // No width to allow autodim print "\n"; - - + + $sql = "SELECT DISTINCT t.rowid, t.note, t.taux, t.localtax1, t.localtax2, t.recuperableonly"; $sql.= " FROM ".MAIN_DB_PREFIX."c_tva as t, ".MAIN_DB_PREFIX."c_pays as p"; $sql.= " WHERE t.fk_pays = p.rowid"; @@ -215,21 +214,16 @@ if ($socid) { $var=!$var; - + $obj = $db->fetch_object($resql); - + if ($action == 'edit' && $obj->rowid==$vatid && $user->rights->societe->creer) { - print ''; - print ''; - print ''; - print ''; - print ''; - + print ''; print ''; - + if ($mysoc->localtax1_assuj=="1" && $soc->localtax1_assuj) print ''; if ($mysoc->localtax2_assuj=="1" && $soc->localtax2_assuj) @@ -238,27 +232,33 @@ if ($socid) print ''; print ''; - print ''; } - else + else { print ''; - + print ''; print ''; if ($mysoc->localtax1_assuj=="1" && $soc->localtax1_assuj) print ''; if ($mysoc->localtax2_assuj=="1" && $soc->localtax2_assuj) print ''; + print ''; + { + // TODO Comment this because the action to save is not supported + //print 'id.'&vatid='.$obj->rowid.'">'.img_edit().''; + } + print ''; print "\n"; } - - } } } + + print '
'.$langs->trans('Description').'
'.$obj->note.''.$obj->taux.''; print '
'.$obj->note.''.$obj->taux.''.$obj->localtax1.''.$obj->localtax2.''; if ($user->rights->societe->creer) - print 'id.'&vatid='.$obj->rowid.'">'.img_edit().'
'; + + print ''; } From 946c91dc723e05e0294e3e10c3978749874f4903 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 16 Nov 2013 15:08:57 +0100 Subject: [PATCH 047/107] Fix: Removed deprecated support links --- htdocs/langs/en_US/admin.lang | 2 +- htdocs/langs/fr_FR/help.lang | 2 +- htdocs/support/index.php | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 8fe0d7aabe2..396bbaf4cb5 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -228,7 +228,7 @@ OfficialWebSiteFr=French official web site OfficialWiki=Dolibarr documentation on Wiki OfficialDemo=Dolibarr online demo OfficialMarketPlace=Official market place for external modules/addons -OfficialWebHostingService=Official web hosting service (Cloud hosting) +OfficialWebHostingService=Official web hosting services (Cloud hosting) ForDocumentationSeeWiki=For user or developer documentation (Doc, FAQs...),
take a look at the Dolibarr Wiki:
%s ForAnswersSeeForum=For any other questions/help, you can use the Dolibarr forum:
%s HelpCenterDesc1=This area can help you to get a Help support service on Dolibarr. diff --git a/htdocs/langs/fr_FR/help.lang b/htdocs/langs/fr_FR/help.lang index 783d48ae8e3..6ef24db1128 100644 --- a/htdocs/langs/fr_FR/help.lang +++ b/htdocs/langs/fr_FR/help.lang @@ -26,4 +26,4 @@ LinkToGoldMember=Vous pouvez appeler immédiatement un des quelques accompagnate PossibleLanguages=Langues disponibles MakeADonation=Aidez le projet Dolibarr, faites un don SubscribeToFoundation=Aidez le projet Dolibarr, adhérez à l'association Dolibarr -SeeOfficalSupport=Pour un accompagnement officielle Dolibarr dans votre langue :
%s \ No newline at end of file +SeeOfficalSupport=Pour un accompagnement officiel Dolibarr dans votre langue :
%s \ No newline at end of file diff --git a/htdocs/support/index.php b/htdocs/support/index.php index fd574712600..10b12bf0f9c 100644 --- a/htdocs/support/index.php +++ b/htdocs/support/index.php @@ -103,6 +103,7 @@ print "\n"; print '
'; +/* // Official support print ''; @@ -136,9 +137,9 @@ print ''; print ''; print ''."\n"; print "\n"; + print '
'; -/* // Online support print ''; From 3c0ee646485aaebe0831de0984e1116bc05be60b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 16 Nov 2013 15:40:46 +0100 Subject: [PATCH 048/107] New: Add links to social networks --- htdocs/admin/system/about.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/htdocs/admin/system/about.php b/htdocs/admin/system/about.php index 1f1d80eb043..48b690a7198 100644 --- a/htdocs/admin/system/about.php +++ b/htdocs/admin/system/about.php @@ -105,6 +105,11 @@ $url='http://wiki.dolibarr.org/index.php/Subscribe'; if (preg_match('/^fr_/i',$langs->getDefaultLang())) $url='http://wiki.dolibarr.org/index.php/Adh%C3%A9rer'; if (preg_match('/^es_/i',$langs->getDefaultLang())) $url='http://wiki.dolibarr.org/index.php/Subscribirse'; print '
  • '.$langs->trans("SubscribeToFoundation").'
  • '; + +print '
  • FaceBook
  • '; +print '
  • Twitter
  • '; +print '
  • Google Plus page
  • '; + print ''; From 33d55faf6b7d419887f38bd00a11fd940da19e0c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 16 Nov 2013 15:42:05 +0100 Subject: [PATCH 049/107] Fix: error into dump file --- dev/initdata/mysqldump_dolibarr_3.5.0.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/initdata/mysqldump_dolibarr_3.5.0.sql b/dev/initdata/mysqldump_dolibarr_3.5.0.sql index 990b6b984b9..aabc855517c 100644 --- a/dev/initdata/mysqldump_dolibarr_3.5.0.sql +++ b/dev/initdata/mysqldump_dolibarr_3.5.0.sql @@ -4650,7 +4650,7 @@ CREATE TABLE `llx_menu` ( LOCK TABLES `llx_menu` WRITE; /*!40000 ALTER TABLE `llx_menu` DISABLE KEYS */; -INSERT INTO `llx_menu` VALUES (19289,'all',1,'cashdesk','top','cashdesk',0,NULL,NULL,100,'/cashdesk/index.php?user=__LOGIN__','pointofsale','CashDeskMenu','cashdesk',NULL,NULL,'1','$conf->cashdesk->enabled',0,'2012-12-08 13:11:09'),(87303,'all',1,'filemanager','top','filemanager',0,NULL,NULL,100,'/filemanager/index.php','','FileManager','filemanager@filemanager',NULL,NULL,'$user->rights->filemanager->read','$conf->filemanager->enabled',2,'2013-01-02 20:33:20'),(87422,'smartphone',1,NULL,'top','home',0,NULL,NULL,1,'/index.php?mainmenu=home&leftmenu=','','Home','',-1,'','','1',2,'2013-02-24 18:29:15'),(87423,'smartphone',1,NULL,'top','companies',0,NULL,NULL,2,'/societe/index.php?mainmenu=companies&leftmenu=','','ThirdParties','companies',-1,'','$user->rights->societe->lire || $user->rights->societe->contact->lire','$conf->societe->enabled || $conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(87424,'smartphone',1,NULL,'top','products',0,NULL,NULL,3,'/product/index.php?mainmenu=products&leftmenu=','','Products/Services','products',-1,'','$user->rights->produit->lire||$user->rights->service->lire','$conf->product->enabled || $conf->service->enabled',0,'2013-02-24 18:29:15'),(87426,'smartphone',1,NULL,'top','commercial',0,NULL,NULL,5,'/comm/index.php?mainmenu=commercial&leftmenu=','','Commercial','commercial',-1,'','$user->rights->societe->lire || $user->rights->societe->contact->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(87427,'smartphone',1,NULL,'top','accountancy',0,NULL,NULL,6,'/compta/index.php?mainmenu=accountancy&leftmenu=','','MenuFinancial','compta',-1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->plancompte->lire || $user->rights->commande->lire || $user->rights->facture->lire','$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->facture->enabled || $conf->deplacement->enabled || $conf->don->enabled',2,'2013-02-24 18:29:15'),(87428,'smartphone',1,NULL,'top','project',0,NULL,NULL,7,'/projet/index.php?mainmenu=project&leftmenu=','','Projects','projects',-1,'','$user->rights->projet->lire','$conf->projet->enabled',0,'2013-02-24 18:29:15'),(87429,'smartphone',1,NULL,'top','tools',0,NULL,NULL,8,'/core/tools.php?mainmenu=tools&leftmenu=','','Tools','other',-1,'','$user->rights->mailing->lire || $user->rights->export->lire || $user->rights->import->run','$conf->mailing->enabled || $conf->export->enabled || $conf->import->enabled',2,'2013-02-24 18:29:15'),(87432,'smartphone',1,NULL,'top','shop',0,NULL,NULL,11,'/boutique/index.php?mainmenu=shop&leftmenu=','','OSCommerce','shop',-1,'','','! empty($conf->boutique->enabled)',0,'2013-02-24 18:29:15'),(87434,'smartphone',1,NULL,'top','members',0,NULL,NULL,15,'/adherents/index.php?mainmenu=members&leftmenu=','','Members','members',-1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(87435,'smartphone',1,NULL,'top','bank',0,NULL,NULL,6,'/compta/bank/index.php?mainmenu=bank&leftmenu=bank','','MenuBankCash','banks',-1,'','$user->rights->banque->lire || $user->rights->prelevement->bons->lire','$conf->banque->enabled || $conf->prelevement->enabled',2,'2013-02-24 18:29:15'),(87521,'smartphone',1,NULL,'left','home',87422,NULL,NULL,0,'/admin/index.php?leftmenu=setup','','Setup','admin',0,'','','$user->admin',2,'2013-02-24 18:29:15'),(87522,'smartphone',1,NULL,'left','home',87521,NULL,NULL,1,'/admin/company.php?leftmenu=setup','','MenuCompanySetup','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87523,'smartphone',1,NULL,'left','home',87521,NULL,NULL,4,'/admin/ihm.php?leftmenu=setup','','GUISetup','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87524,'smartphone',1,NULL,'left','home',87521,NULL,NULL,2,'/admin/modules.php?leftmenu=setup','','Modules','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87525,'smartphone',1,NULL,'left','home',87521,NULL,NULL,5,'/admin/boxes.php?leftmenu=setup','','Boxes','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87526,'smartphone',1,NULL,'left','home',87521,NULL,NULL,3,'/admin/menus.php?leftmenu=setup','','Menus','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87527,'smartphone',1,NULL,'left','home',87521,NULL,NULL,6,'/admin/delais.php?leftmenu=setup','','Alerts','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87529,'smartphone',1,NULL,'left','home',87521,NULL,NULL,7,'/admin/perms.php?leftmenu=setup','','Security','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87530,'smartphone',1,NULL,'left','home',87521,NULL,NULL,9,'/admin/mails.php?leftmenu=setup','','Emails','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87531,'smartphone',1,NULL,'left','home',87521,NULL,NULL,8,'/admin/limits.php?leftmenu=setup','','MenuLimits','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87532,'smartphone',1,NULL,'left','home',87521,NULL,NULL,10,'/admin/dict.php?leftmenu=setup','','DictionnarySetup','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87533,'smartphone',1,NULL,'left','home',87521,NULL,NULL,11,'/admin/const.php?leftmenu=setup','','OtherSetup','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87621,'smartphone',1,NULL,'left','home',87422,NULL,NULL,1,'/admin/system/index.php?leftmenu=system','','SystemInfo','admin',0,'','','$user->admin',2,'2013-02-24 18:29:15'),(87622,'smartphone',1,NULL,'left','home',87621,NULL,NULL,0,'/admin/system/dolibarr.php?leftmenu=system','','Dolibarr','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87623,'smartphone',1,NULL,'left','home',87622,NULL,NULL,1,'/admin/system/constall.php?leftmenu=system','','AllParameters','admin',2,'','','1',2,'2013-02-24 18:29:15'),(87624,'smartphone',1,NULL,'left','home',87622,NULL,NULL,4,'/admin/system/about.php?leftmenu=system','','About','admin',2,'','','1',2,'2013-02-24 18:29:15'),(87625,'smartphone',1,NULL,'left','home',87621,NULL,NULL,1,'/admin/system/os.php?leftmenu=system','','OS','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87626,'smartphone',1,NULL,'left','home',87621,NULL,NULL,2,'/admin/system/web.php?leftmenu=system','','WebServer','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87627,'smartphone',1,NULL,'left','home',87621,NULL,NULL,3,'/admin/system/phpinfo.php?leftmenu=system','','Php','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87628,'smartphone',1,NULL,'left','home',87622,NULL,NULL,3,'/admin/triggers.php?leftmenu=system','','Triggers','admin',2,'','','1',2,'2013-02-24 18:29:15'),(87629,'smartphone',1,NULL,'left','home',87622,NULL,NULL,2,'/admin/system/modules.php?leftmenu=system','','Modules','admin',2,'','','1',2,'2013-02-24 18:29:15'),(87631,'smartphone',1,NULL,'left','home',87621,NULL,NULL,4,'/admin/system/database.php?leftmenu=system','','Database','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87632,'smartphone',1,NULL,'left','home',87631,NULL,NULL,0,'/admin/system/database-tables.php?leftmenu=system','','Tables','admin',2,'','','1',2,'2013-02-24 18:29:15'),(87721,'smartphone',1,NULL,'left','home',87422,NULL,NULL,2,'/admin/tools/index.php?leftmenu=admintools','','SystemTools','admin',0,'','','$user->admin',2,'2013-02-24 18:29:15'),(87722,'smartphone',1,NULL,'left','home',87721,NULL,NULL,0,'/admin/tools/dolibarr_export.php?leftmenu=admintools','','Backup','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87723,'smartphone',1,NULL,'left','home',87721,NULL,NULL,1,'/admin/tools/dolibarr_import.php?leftmenu=admintools','','Restore','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87724,'smartphone',1,NULL,'left','home',87721,NULL,NULL,6,'/admin/tools/purge.php?leftmenu=admintools','','Purge','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87725,'smartphone',1,NULL,'left','home',87721,NULL,NULL,3,'/admin/tools/eaccelerator.php?leftmenu=admintools','','EAccelerator','admin',1,'','','1 && function_exists(\'eaccelerator_info\')',2,'2013-02-24 18:29:15'),(87726,'smartphone',1,NULL,'left','home',87721,NULL,NULL,2,'/admin/tools/update.php?leftmenu=admintools','','MenuUpgrade','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87727,'smartphone',1,NULL,'left','home',87721,NULL,NULL,4,'/admin/tools/listevents.php?leftmenu=admintools','','Audit','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87728,'smartphone',1,NULL,'left','home',87721,NULL,NULL,7,'/support/index.php?leftmenu=admintools','_blank','HelpCenter','help',1,'','','1',2,'2013-02-24 18:29:15'),(87729,'smartphone',1,NULL,'left','home',87721,NULL,NULL,5,'/admin/tools/listsessions.php?leftmenu=admintools','','Sessions','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87821,'smartphone',1,NULL,'left','home',87422,NULL,NULL,3,'/user/home.php?leftmenu=users','','MenuUsersAndGroups','users',0,'','','1',2,'2013-02-24 18:29:15'),(87822,'smartphone',1,NULL,'left','home',87821,NULL,NULL,0,'/user/index.php?leftmenu=users','','Users','users',1,'','$user->rights->user->user->lire || $user->admin','1',2,'2013-02-24 18:29:15'),(87823,'smartphone',1,NULL,'left','home',87822,NULL,NULL,0,'/user/fiche.php?leftmenu=users&action=create','','NewUser','users',2,'','$user->rights->user->user->creer || $user->admin','1',2,'2013-02-24 18:29:15'),(87824,'smartphone',1,NULL,'left','home',87821,NULL,NULL,1,'/user/group/index.php?leftmenu=users','','Groups','users',1,'','($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->read:$user->rights->user->user->lire) || $user->admin','1',2,'2013-02-24 18:29:15'),(87825,'smartphone',1,NULL,'left','home',87824,NULL,NULL,0,'/user/group/fiche.php?leftmenu=users&action=create','','NewGroup','users',2,'','($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->write:$user->rights->user->user->creer) || $user->admin','1',2,'2013-02-24 18:29:15'),(87921,'smartphone',1,NULL,'left','companies',87423,NULL,NULL,0,'/societe/societe.php','','ThirdParty','companies',0,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(87922,'smartphone',1,NULL,'left','companies',87921,NULL,NULL,0,'/societe/soc.php?action=create','','MenuNewThirdParty','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(87924,'smartphone',1,NULL,'left','companies',87921,NULL,NULL,5,'/fourn/liste.php?leftmenu=suppliers','','ListSuppliersShort','suppliers',1,'','$user->rights->societe->lire && $user->rights->fournisseur->lire','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(87925,'smartphone',1,NULL,'left','companies',87924,NULL,NULL,0,'/societe/soc.php?leftmenu=supplier&action=create&type=f','','NewSupplier','suppliers',2,'','$user->rights->societe->creer','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(87927,'smartphone',1,NULL,'left','companies',87921,NULL,NULL,3,'/comm/prospect/list.php?leftmenu=prospects','','ListProspectsShort','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(87928,'smartphone',1,NULL,'left','companies',87927,NULL,NULL,0,'/societe/soc.php?leftmenu=prospects&action=create&type=p','','MenuNewProspect','companies',2,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(87930,'smartphone',1,NULL,'left','companies',87921,NULL,NULL,4,'/comm/list.php?leftmenu=customers','','ListCustomersShort','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(87931,'smartphone',1,NULL,'left','companies',87930,NULL,NULL,0,'/societe/soc.php?leftmenu=customers&action=create&type=c','','MenuNewCustomer','companies',2,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(88021,'smartphone',1,NULL,'left','companies',87423,NULL,NULL,1,'/contact/list.php?leftmenu=contacts','','ContactsAddresses||Contacts@$conf->global->SOCIETE_ADDRESSES_MANAGEMENT','companies',0,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(88022,'smartphone',1,NULL,'left','companies',88021,NULL,NULL,0,'/contact/fiche.php?leftmenu=contacts&action=create','','NewContactAddress||NewContact@$conf->global->SOCIETE_ADDRESSES_MANAGEMENT','companies',1,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(88023,'smartphone',1,NULL,'left','companies',88021,NULL,NULL,1,'/contact/list.php?leftmenu=contacts','','List','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(88025,'smartphone',1,NULL,'left','companies',88023,NULL,NULL,1,'/contact/list.php?leftmenu=contacts&type=p','','Prospects','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(88026,'smartphone',1,NULL,'left','companies',88023,NULL,NULL,2,'/contact/list.php?leftmenu=contacts&type=c','','Customers','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(88027,'smartphone',1,NULL,'left','companies',88023,NULL,NULL,3,'/contact/list.php?leftmenu=contacts&type=f','','Suppliers','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(88028,'smartphone',1,NULL,'left','companies',88023,NULL,NULL,4,'/contact/list.php?leftmenu=contacts&type=o','','Others','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(88071,'smartphone',1,NULL,'left','companies',87423,NULL,NULL,3,'/categories/index.php?leftmenu=cat&type=1','','SuppliersCategoriesShort','categories',0,'','$user->rights->categorie->lire','$conf->societe->enabled && $conf->categorie->enabled',2,'2013-02-24 18:29:15'),(88072,'smartphone',1,NULL,'left','companies',88071,NULL,NULL,0,'/categories/fiche.php?action=create&type=1','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->societe->enabled && $conf->categorie->enabled',2,'2013-02-24 18:29:15'),(88081,'smartphone',1,NULL,'left','companies',87423,NULL,NULL,4,'/categories/index.php?leftmenu=cat&type=2','','CustomersProspectsCategoriesShort','categories',0,'','$user->rights->categorie->lire','$conf->fournisseur->enabled && $conf->categorie->enabled',2,'2013-02-24 18:29:15'),(88082,'smartphone',1,NULL,'left','companies',88081,NULL,NULL,0,'/categories/fiche.php?action=create&type=2','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->fournisseur->enabled && $conf->categorie->enabled',2,'2013-02-24 18:29:15'),(88121,'smartphone',1,NULL,'left','commercial',87426,NULL,NULL,1,'/comm/prospect/index.php?leftmenu=prospects','','Prospects','companies',0,'','$user->rights->societe->lire','$conf->societe->enabled',0,'2013-02-24 18:29:15'),(88122,'smartphone',1,NULL,'left','commercial',88121,NULL,NULL,0,'/societe/soc.php?leftmenu=prospects&action=create&type=p','','MenuNewProspect','companies',1,'','$user->rights->societe->creer','$conf->societe->enabled',0,'2013-02-24 18:29:15'),(88123,'smartphone',1,NULL,'left','commercial',88121,NULL,NULL,1,'/comm/prospect/list.php?leftmenu=prospects','','List','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',0,'2013-02-24 18:29:15'),(88124,'smartphone',1,NULL,'left','commercial',88123,NULL,NULL,0,'/comm/prospect/list.php?sortfield=s.datec&sortorder=desc&begin=&stcomm=-1','','LastProspectDoNotContact','companies',2,'','$user->rights->societe->lire','$conf->societe->enabled && $leftmenu==\"prospects\"',0,'2013-02-24 18:29:15'),(88125,'smartphone',1,NULL,'left','commercial',88123,NULL,NULL,1,'/comm/prospect/list.php?sortfield=s.datec&sortorder=desc&begin=&stcomm=0','','LastProspectNeverContacted','companies',2,'','$user->rights->societe->lire','$conf->societe->enabled && $leftmenu==\"prospects\"',0,'2013-02-24 18:29:15'),(88126,'smartphone',1,NULL,'left','commercial',88123,NULL,NULL,2,'/comm/prospect/list.php?sortfield=s.datec&sortorder=desc&begin=&stcomm=1','','LastProspectToContact','companies',2,'','$user->rights->societe->lire','$conf->societe->enabled && $leftmenu==\"prospects\"',0,'2013-02-24 18:29:15'),(88127,'smartphone',1,NULL,'left','commercial',88123,NULL,NULL,3,'/comm/prospect/list.php?sortfield=s.datec&sortorder=desc&begin=&stcomm=2','','LastProspectContactInProcess','companies',2,'','$user->rights->societe->lire','$conf->societe->enabled && $leftmenu==\"prospects\"',0,'2013-02-24 18:29:15'),(88128,'smartphone',1,NULL,'left','commercial',88123,NULL,NULL,4,'/comm/prospect/list.php?sortfield=s.datec&sortorder=desc&begin=&stcomm=3','','LastProspectContactDone','companies',2,'','$user->rights->societe->lire','$conf->societe->enabled && $leftmenu==\"prospects\"',0,'2013-02-24 18:29:15'),(88129,'smartphone',1,NULL,'left','commercial',88121,NULL,NULL,2,'/contact/list.php?leftmenu=prospects&type=p','','Contacts','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',0,'2013-02-24 18:29:15'),(88221,'smartphone',1,NULL,'left','commercial',87426,NULL,NULL,2,'/comm/index.php?leftmenu=customers','','Customers','companies',0,'','$user->rights->societe->lire','$conf->societe->enabled',0,'2013-02-24 18:29:15'),(88222,'smartphone',1,NULL,'left','commercial',88221,NULL,NULL,0,'/societe/soc.php?leftmenu=customers&action=create&type=c','','MenuNewCustomer','companies',1,'','$user->rights->societe->creer','$conf->societe->enabled',0,'2013-02-24 18:29:15'),(88223,'smartphone',1,NULL,'left','commercial',88221,NULL,NULL,1,'/comm/list.php?leftmenu=customers','','List','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',0,'2013-02-24 18:29:15'),(88224,'smartphone',1,NULL,'left','commercial',88221,NULL,NULL,2,'/contact/list.php?leftmenu=customers&type=c','','Contacts','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',0,'2013-02-24 18:29:15'),(88321,'smartphone',1,NULL,'left','commercial',87426,NULL,NULL,3,'/contact/list.php?leftmenu=contacts','','Contacts','companies',0,'','$user->rights->societe->lire','$conf->societe->enabled',0,'2013-02-24 18:29:15'),(88322,'smartphone',1,NULL,'left','commercial',88321,NULL,NULL,0,'/contact/fiche.php?leftmenu=contacts&action=create','','NewContactAddress||NewContact@$conf->global->SOCIETE_ADDRESSES_MANAGEMENT','companies',1,'','$user->rights->societe->creer','$conf->societe->enabled',0,'2013-02-24 18:29:15'),(88323,'smartphone',1,NULL,'left','commercial',88321,NULL,NULL,1,'/contact/list.php?leftmenu=contacts&action=create','','List','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',0,'2013-02-24 18:29:15'),(88331,'smartphone',1,NULL,'left','commercial',88323,NULL,NULL,1,'/contact/list.php?leftmenu=contacts&type=p','','Prospects','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled && $leftmenu==\"prospects\"',0,'2013-02-24 18:29:15'),(88332,'smartphone',1,NULL,'left','commercial',88323,NULL,NULL,1,'/contact/list.php?leftmenu=contacts&type=c','','Customers','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled && $leftmenu==\"prospects\"',0,'2013-02-24 18:29:15'),(88333,'smartphone',1,NULL,'left','commercial',88323,NULL,NULL,1,'/contact/list.php?leftmenu=contacts&type=f','','Suppliers','companies',1,'','$user->rights->societe->lire && $user->rights->fournisseur->lire','$conf->societe->enabled && $conf->fournisseur->enabled && $leftmenu==\"prospects\"',0,'2013-02-24 18:29:15'),(88334,'smartphone',1,NULL,'left','commercial',88323,NULL,NULL,1,'/contact/list.php?leftmenu=contacts&type=o','','Other','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled && $leftmenu==\"prospects\"',0,'2013-02-24 18:29:15'),(88521,'smartphone',1,NULL,'left','commercial',87426,NULL,NULL,4,'/comm/propal.php?leftmenu=propals','','Prop','propal',0,'','$user->rights->propale->lire','$conf->propal->enabled',2,'2013-02-24 18:29:15'),(88522,'smartphone',1,NULL,'left','commercial',88521,NULL,NULL,0,'/societe/societe.php?leftmenu=propals','','NewPropal','propal',1,'','$user->rights->propale->creer','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2013-02-24 18:29:15'),(88523,'smartphone',1,NULL,'left','commercial',88521,NULL,NULL,1,'/comm/propal.php?viewstatut=0','','PropalsDraft','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2013-02-24 18:29:15'),(88524,'smartphone',1,NULL,'left','commercial',88521,NULL,NULL,2,'/comm/propal.php?viewstatut=1','','PropalsOpened','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2013-02-24 18:29:15'),(88525,'smartphone',1,NULL,'left','commercial',88521,NULL,NULL,3,'/comm/propal.php?viewstatut=2,3,4','','PropalStatusClosedShort','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2013-02-24 18:29:15'),(88526,'smartphone',1,NULL,'left','commercial',88521,NULL,NULL,4,'/comm/propal/stats/index.php?leftmenu=propals','','Statistics','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2013-02-24 18:29:15'),(88621,'smartphone',1,NULL,'left','commercial',87426,NULL,NULL,5,'/commande/index.php?leftmenu=orders','','CustomersOrders','orders',0,'','$user->rights->commande->lire','$conf->commande->enabled',2,'2013-02-24 18:29:15'),(88622,'smartphone',1,NULL,'left','commercial',88621,NULL,NULL,0,'/societe/societe.php?leftmenu=orders','','NewOrder','orders',1,'','$user->rights->commande->creer','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-02-24 18:29:15'),(88623,'smartphone',1,NULL,'left','commercial',88621,NULL,NULL,1,'/commande/liste.php?leftmenu=orders','','List','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-02-24 18:29:15'),(88624,'smartphone',1,NULL,'left','commercial',88623,NULL,NULL,2,'/commande/liste.php?leftmenu=orders&viewstatut=0','','StatusOrderDraftShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-02-24 18:29:15'),(88625,'smartphone',1,NULL,'left','commercial',88623,NULL,NULL,3,'/commande/liste.php?leftmenu=orders&viewstatut=1','','StatusOrderValidated','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-02-24 18:29:15'),(88626,'smartphone',1,NULL,'left','commercial',88623,NULL,NULL,4,'/commande/liste.php?leftmenu=orders&viewstatut=2','','StatusOrderOnProcessShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-02-24 18:29:15'),(88627,'smartphone',1,NULL,'left','commercial',88623,NULL,NULL,5,'/commande/liste.php?leftmenu=orders&viewstatut=3','','StatusOrderToBill','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-02-24 18:29:15'),(88628,'smartphone',1,NULL,'left','commercial',88623,NULL,NULL,6,'/commande/liste.php?leftmenu=orders&viewstatut=4','','StatusOrderProcessed','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-02-24 18:29:15'),(88629,'smartphone',1,NULL,'left','commercial',88623,NULL,NULL,7,'/commande/liste.php?leftmenu=orders&viewstatut=-1','','StatusOrderCanceledShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-02-24 18:29:15'),(88630,'smartphone',1,NULL,'left','commercial',88621,NULL,NULL,4,'/commande/stats/index.php?leftmenu=orders','','Statistics','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-02-24 18:29:15'),(88721,'smartphone',1,NULL,'left','commercial',87424,NULL,NULL,6,'/expedition/index.php?leftmenu=sendings','','Shipments','orders',0,'','$user->rights->expedition->lire','$conf->expedition->enabled',2,'2013-02-24 18:29:15'),(88722,'smartphone',1,NULL,'left','commercial',88721,NULL,NULL,0,'/expedition/liste.php?leftmenu=sendings','','List','orders',1,'','$user->rights->expedition->lire','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2013-02-24 18:29:15'),(88723,'smartphone',1,NULL,'left','commercial',88721,NULL,NULL,1,'/expedition/stats/index.php?leftmenu=sendings','','Statistics','orders',1,'','$user->rights->expedition->lire','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2013-02-24 18:29:15'),(88821,'smartphone',1,NULL,'left','commercial',87426,NULL,NULL,7,'/contrat/index.php?leftmenu=contracts','','Contracts','contracts',0,'','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2013-02-24 18:29:15'),(88822,'smartphone',1,NULL,'left','commercial',88821,NULL,NULL,0,'/societe/societe.php?leftmenu=contracts','','NewContract','contracts',1,'','$user->rights->contrat->creer','$conf->contrat->enabled',2,'2013-02-24 18:29:15'),(88823,'smartphone',1,NULL,'left','commercial',88821,NULL,NULL,1,'/contrat/liste.php?leftmenu=contracts','','List','contracts',1,'','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2013-02-24 18:29:15'),(88824,'smartphone',1,NULL,'left','commercial',88821,NULL,NULL,2,'/contrat/services.php?leftmenu=contracts','','MenuServices','contracts',1,'','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2013-02-24 18:29:15'),(88825,'smartphone',1,NULL,'left','commercial',88824,NULL,NULL,0,'/contrat/services.php?leftmenu=contracts&mode=0','','MenuInactiveServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled&&$leftmenu==\"contracts\"',2,'2013-02-24 18:29:15'),(88826,'smartphone',1,NULL,'left','commercial',88824,NULL,NULL,1,'/contrat/services.php?leftmenu=contracts&mode=4','','MenuRunningServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled&&$leftmenu==\"contracts\"',2,'2013-02-24 18:29:15'),(88827,'smartphone',1,NULL,'left','commercial',88824,NULL,NULL,2,'/contrat/services.php?leftmenu=contracts&mode=4&filter=expired','','MenuExpiredServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled&&$leftmenu==\"contracts\"',2,'2013-02-24 18:29:15'),(88828,'smartphone',1,NULL,'left','commercial',88824,NULL,NULL,3,'/contrat/services.php?leftmenu=contracts&mode=5','','MenuClosedServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled&&$leftmenu==\"contracts\"',2,'2013-02-24 18:29:15'),(88921,'smartphone',1,NULL,'left','commercial',87426,NULL,NULL,8,'/fichinter/list.php?leftmenu=ficheinter','','Interventions','interventions',0,'','$user->rights->ficheinter->lire','$conf->ficheinter->enabled',2,'2013-02-24 18:29:15'),(88922,'smartphone',1,NULL,'left','commercial',88921,NULL,NULL,0,'/fichinter/fiche.php?action=create&leftmenu=ficheinter','','NewIntervention','interventions',1,'','$user->rights->ficheinter->creer','$conf->ficheinter->enabled && $leftmenu==\"ficheinter\"',2,'2013-02-24 18:29:15'),(88923,'smartphone',1,NULL,'left','commercial',88921,NULL,NULL,1,'/fichinter/list.php?leftmenu=ficheinter','','List','interventions',1,'','$user->rights->ficheinter->lire','$conf->ficheinter->enabled && $leftmenu==\"ficheinter\"',2,'2013-02-24 18:29:15'),(89021,'smartphone',1,NULL,'left','accountancy',87427,NULL,NULL,3,'/fourn/facture/index.php?leftmenu=suppliers_bills','','BillsSuppliers','bills',0,'','$user->rights->fournisseur->facture->lire','$conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(89022,'smartphone',1,NULL,'left','accountancy',89021,NULL,NULL,0,'/fourn/facture/fiche.php?action=create&leftmenu=suppliers_bills','','NewBill','bills',1,'','$user->rights->fournisseur->facture->creer','$conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(89023,'smartphone',1,NULL,'left','accountancy',89021,NULL,NULL,1,'/fourn/facture/impayees.php?leftmenu=suppliers_bills','','Unpaid','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(89024,'smartphone',1,NULL,'left','accountancy',89021,NULL,NULL,2,'/fourn/facture/paiement.php?leftmenu=suppliers_bills','','Payments','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(89121,'smartphone',1,NULL,'left','accountancy',87427,NULL,NULL,3,'/compta/facture/list.php?leftmenu=customers_bills','','BillsCustomers','bills',0,'','$user->rights->facture->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(89122,'smartphone',1,NULL,'left','accountancy',89121,NULL,NULL,3,'/compta/clients.php?action=facturer&leftmenu=customers_bills','','NewBill','bills',1,'','$user->rights->facture->creer','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(89123,'smartphone',1,NULL,'left','accountancy',89121,NULL,NULL,4,'/compta/facture/fiche-rec.php?leftmenu=customers_bills','','Repeatable','bills',1,'','$user->rights->facture->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(89124,'smartphone',1,NULL,'left','accountancy',89121,NULL,NULL,5,'/compta/facture/impayees.php?action=facturer&leftmenu=customers_bills','','Unpaid','bills',1,'','$user->rights->facture->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(89125,'smartphone',1,NULL,'left','accountancy',89121,NULL,NULL,6,'/compta/paiement/liste.php?leftmenu=customers_bills','','Payments','bills',1,'','$user->rights->facture->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(89131,'smartphone',1,NULL,'left','accountancy',89125,NULL,NULL,1,'/compta/paiement/rapport.php?leftmenu=customers_bills','','Reportings','bills',2,'','$user->rights->facture->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(89132,'smartphone',1,NULL,'left','accountancy',87435,NULL,NULL,9,'/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank','','MenuChequeDeposits','bills',0,'','$user->rights->facture->lire','$conf->facture->enabled && $conf->banque->enabled',2,'2013-02-24 18:29:15'),(89133,'smartphone',1,NULL,'left','accountancy',89132,NULL,NULL,0,'/compta/paiement/cheque/fiche.php?leftmenu=checks&action=new','','NewCheckDeposit','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled && $conf->banque->enabled',2,'2013-02-24 18:29:15'),(89134,'smartphone',1,NULL,'left','accountancy',89132,NULL,NULL,1,'/compta/paiement/cheque/liste.php?leftmenu=checks','','List','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled && $conf->banque->enabled',2,'2013-02-24 18:29:15'),(89135,'smartphone',1,NULL,'left','accountancy',89121,NULL,NULL,8,'/compta/facture/stats/index.php?leftmenu=customers_bills','','Statistics','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled && $conf->banque->enabled',2,'2013-02-24 18:29:15'),(89321,'smartphone',1,NULL,'left','accountancy',87427,NULL,NULL,3,'/commande/liste.php?leftmenu=orders&viewstatut=3','','MenuOrdersToBill','orders',0,'','$user->rights->commande->lire','$conf->commande->enabled',0,'2013-02-24 18:29:15'),(89421,'smartphone',1,NULL,'left','accountancy',87427,NULL,NULL,4,'/compta/dons/index.php?leftmenu=donations&mainmenu=accountancy','','Donations','donations',0,'','$user->rights->don->lire','$conf->don->enabled',2,'2013-02-24 18:29:15'),(89422,'smartphone',1,NULL,'left','accountancy',89421,NULL,NULL,0,'/compta/dons/fiche.php?leftmenu=donations&mainmenu=accountancy&action=create','','NewDonation','donations',1,'','$user->rights->don->creer','$conf->don->enabled && $leftmenu==\"donations\"',2,'2013-02-24 18:29:15'),(89423,'smartphone',1,NULL,'left','accountancy',89421,NULL,NULL,1,'/compta/dons/liste.php?leftmenu=donations&mainmenu=accountancy','','List','donations',1,'','$user->rights->don->lire','$conf->don->enabled && $leftmenu==\"donations\"',2,'2013-02-24 18:29:15'),(89521,'smartphone',1,NULL,'left','accountancy',87427,NULL,NULL,5,'/compta/deplacement/index.php?leftmenu=tripsandexpenses','','TripsAndExpenses','trips',0,'','$user->rights->deplacement->lire','$conf->deplacement->enabled',0,'2013-02-24 18:29:15'),(89522,'smartphone',1,NULL,'left','accountancy',89521,NULL,NULL,1,'/compta/deplacement/fiche.php?action=create&leftmenu=tripsandexpenses','','New','trips',1,'','$user->rights->deplacement->creer','$conf->deplacement->enabled && $leftmenu==\"tripsandexpenses\"',0,'2013-02-24 18:29:15'),(89523,'smartphone',1,NULL,'left','accountancy',89521,NULL,NULL,2,'/compta/deplacement/index.php?leftmenu=tripsandexpenses','','List','trips',1,'','$user->rights->deplacement->lire','$conf->deplacement->enabled && $leftmenu==\"tripsandexpenses\"',0,'2013-02-24 18:29:15'),(89524,'smartphone',1,NULL,'left','accountancy',89521,NULL,NULL,2,'/compta/deplacement/stats/index.php?leftmenu=tripsandexpenses','','Statistics','trips',1,'','$user->rights->deplacement->lire','$conf->deplacement->enabled && $leftmenu==\"tripsandexpenses\"',0,'2013-02-24 18:29:15'),(89621,'smartphone',1,NULL,'left','accountancy',87427,NULL,NULL,6,'/compta/charges/index.php?leftmenu=tax&mainmenu=accountancy','','MenuTaxAndDividends','compta',0,'','$user->rights->tax->charges->lire','$conf->tax->enabled',0,'2013-02-24 18:29:15'),(89622,'smartphone',1,NULL,'left','accountancy',89621,NULL,NULL,1,'/compta/sociales/index.php?leftmenu=tax_social','','SocialContributions','',1,'','$user->rights->tax->charges->lire','$conf->tax->enabled',0,'2013-02-24 18:29:15'),(89623,'smartphone',1,NULL,'left','accountancy',89622,NULL,NULL,2,'/compta/sociales/charges.php?leftmenu=tax_social&action=create','','MenuNewSocialContribution','',2,'','$user->rights->tax->charges->creer','$conf->tax->enabled && $leftmenu==\"tax_social\"',0,'2013-02-24 18:29:15'),(89624,'smartphone',1,NULL,'left','accountancy',89622,NULL,NULL,3,'/compta/charges/index.php?leftmenu=tax_social&mainmenu=accountancy&mode=sconly','','Payments','',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && $leftmenu==\"tax_social\"',0,'2013-02-24 18:29:15'),(89721,'smartphone',1,NULL,'left','accountancy',89621,NULL,NULL,7,'/compta/tva/index.php?leftmenu=tax_vat&mainmenu=accountancy','','VAT','companies',1,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS)',0,'2013-02-24 18:29:15'),(89722,'smartphone',1,NULL,'left','accountancy',89721,NULL,NULL,0,'/compta/tva/fiche.php?leftmenu=tax_vat&action=create','','NewPayment','companies',2,'','$user->rights->tax->charges->creer','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2013-02-24 18:29:15'),(89723,'smartphone',1,NULL,'left','accountancy',89721,NULL,NULL,1,'/compta/tva/reglement.php?leftmenu=tax_vat','','Payments','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2013-02-24 18:29:15'),(89724,'smartphone',1,NULL,'left','accountancy',89721,NULL,NULL,2,'/compta/tva/clients.php?leftmenu=tax_vat','','ReportByCustomers','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2013-02-24 18:29:15'),(89725,'smartphone',1,NULL,'left','accountancy',89721,NULL,NULL,3,'/compta/tva/quadri_detail.php?leftmenu=tax_vat','','ReportByQuarter','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2013-02-24 18:29:15'),(89821,'smartphone',1,NULL,'left','accountancy',87427,NULL,NULL,8,'/compta/ventilation/index.php?leftmenu=ventil','','Ventilation','companies',0,'','$user->rights->compta->ventilation->lire','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-02-24 18:29:15'),(89822,'smartphone',1,NULL,'left','accountancy',89821,NULL,NULL,0,'/compta/ventilation/liste.php','','ToDispatch','companies',1,'','$user->rights->compta->ventilation->lire','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-02-24 18:29:15'),(89823,'smartphone',1,NULL,'left','accountancy',89821,NULL,NULL,1,'/compta/ventilation/lignes.php','','Dispatched','companies',1,'','$user->rights->compta->ventilation->lire','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-02-24 18:29:15'),(89824,'smartphone',1,NULL,'left','accountancy',89821,NULL,NULL,2,'/compta/param/','','Setup','companies',1,'','$user->rights->compta->ventilation->parametrer','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-02-24 18:29:15'),(89825,'smartphone',1,NULL,'left','accountancy',89824,NULL,NULL,0,'/compta/param/comptes/liste.php','','List','companies',2,'','$user->rights->compta->ventilation->parametrer','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-02-24 18:29:15'),(89826,'smartphone',1,NULL,'left','accountancy',89824,NULL,NULL,1,'/compta/param/comptes/fiche.php?action=create','','New','companies',2,'','$user->rights->compta->ventilation->parametrer','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-02-24 18:29:15'),(89827,'smartphone',1,NULL,'left','accountancy',89821,NULL,NULL,3,'/compta/export/','','Export','companies',1,'','$user->rights->compta->ventilation->lire','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-02-24 18:29:15'),(89828,'smartphone',1,NULL,'left','accountancy',89827,NULL,NULL,0,'/compta/export/index.php','','New','companies',2,'','$user->rights->compta->ventilation->lire','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-02-24 18:29:15'),(89829,'smartphone',1,NULL,'left','accountancy',89827,NULL,NULL,1,'/compta/export/liste.php','','List','companies',2,'','$user->rights->compta->ventilation->lire','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-02-24 18:29:15'),(89921,'smartphone',1,NULL,'left','accountancy',87435,NULL,NULL,9,'/compta/prelevement/index.php?leftmenu=withdraw&mainmenu=bank','','StandingOrders','withdrawals',0,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled',2,'2013-02-24 18:29:15'),(89922,'smartphone',1,NULL,'left','accountancy',89921,NULL,NULL,1,'/compta/prelevement/demandes.php?status=0&leftmenu=withdraw','','StandingOrderToProcess','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2013-02-24 18:29:15'),(89923,'smartphone',1,NULL,'left','accountancy',89921,NULL,NULL,0,'/compta/prelevement/create.php?leftmenu=withdraw','','NewStandingOrder','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2013-02-24 18:29:15'),(89924,'smartphone',1,NULL,'left','accountancy',89921,NULL,NULL,2,'/compta/prelevement/bons.php?leftmenu=withdraw','','WithdrawalsReceipts','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2013-02-24 18:29:15'),(89925,'smartphone',1,NULL,'left','accountancy',89921,NULL,NULL,3,'/compta/prelevement/liste.php?leftmenu=withdraw','','WithdrawalsLines','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2013-02-24 18:29:15'),(89927,'smartphone',1,NULL,'left','accountancy',89921,NULL,NULL,5,'/compta/prelevement/rejets.php?leftmenu=withdraw','','Rejects','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2013-02-24 18:29:15'),(89928,'smartphone',1,NULL,'left','accountancy',89921,NULL,NULL,6,'/compta/prelevement/stats.php?leftmenu=withdraw','','Statistics','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2013-02-24 18:29:15'),(90021,'smartphone',1,NULL,'left','accountancy',87435,NULL,NULL,1,'/compta/bank/index.php?leftmenu=bank&mainmenu=bank','','MenuBankCash','banks',0,'','$user->rights->banque->lire','$conf->banque->enabled',0,'2013-02-24 18:29:15'),(90022,'smartphone',1,NULL,'left','accountancy',90021,NULL,NULL,0,'/compta/bank/fiche.php?action=create&leftmenu=bank','','MenuNewFinancialAccount','banks',1,'','$user->rights->banque->configurer','$conf->banque->enabled && $leftmenu==bank',0,'2013-02-24 18:29:15'),(90023,'smartphone',1,NULL,'left','accountancy',90021,NULL,NULL,1,'/compta/bank/categ.php?leftmenu=bank','','Rubriques','categories',1,'','$user->rights->banque->configurer','$conf->banque->enabled && $leftmenu==bank',0,'2013-02-24 18:29:15'),(90024,'smartphone',1,NULL,'left','accountancy',90021,NULL,NULL,2,'/compta/bank/search.php?leftmenu=bank','','ListTransactions','banks',1,'','$user->rights->banque->lire','$conf->banque->enabled && $leftmenu==bank',0,'2013-02-24 18:29:15'),(90025,'smartphone',1,NULL,'left','accountancy',90021,NULL,NULL,3,'/compta/bank/budget.php?leftmenu=bank','','ListTransactionsByCategory','banks',1,'','$user->rights->banque->lire','$conf->banque->enabled && $leftmenu==bank',0,'2013-02-24 18:29:15'),(90027,'smartphone',1,NULL,'left','accountancy',90021,NULL,NULL,5,'/compta/bank/virement.php?leftmenu=bank','','BankTransfers','banks',1,'','$user->rights->banque->transfer','$conf->banque->enabled && $leftmenu==bank',0,'2013-02-24 18:29:15'),(90121,'smartphone',1,NULL,'left','accountancy',87427,NULL,NULL,11,'/compta/resultat/index.php?leftmenu=ca&mainmenu=accountancy','','Reportings','main',0,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2013-02-24 18:29:15'),(90122,'smartphone',1,NULL,'left','accountancy',90121,NULL,NULL,0,'/compta/resultat/index.php?leftmenu=ca','','ReportInOut','main',1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2013-02-24 18:29:15'),(90123,'smartphone',1,NULL,'left','accountancy',90122,NULL,NULL,0,'/compta/resultat/clientfourn.php?leftmenu=ca','','ByCompanies','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2013-02-24 18:29:15'),(90124,'smartphone',1,NULL,'left','accountancy',90121,NULL,NULL,1,'/compta/stats/index.php?leftmenu=ca','','ReportTurnover','main',1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2013-02-24 18:29:15'),(90125,'smartphone',1,NULL,'left','accountancy',90124,NULL,NULL,0,'/compta/stats/casoc.php?leftmenu=ca','','ByCompanies','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2013-02-24 18:29:15'),(90126,'smartphone',1,NULL,'left','accountancy',90124,NULL,NULL,1,'/compta/stats/cabyuser.php?leftmenu=ca','','ByUsers','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2013-02-24 18:29:15'),(90221,'smartphone',1,NULL,'left','products',87424,NULL,NULL,0,'/product/index.php?leftmenu=product&type=0','','Products','products',0,'','$user->rights->produit->lire','$conf->product->enabled',2,'2013-02-24 18:29:15'),(90222,'smartphone',1,NULL,'left','products',90221,NULL,NULL,0,'/product/fiche.php?leftmenu=product&action=create&type=0','','NewProduct','products',1,'','$user->rights->produit->creer','$conf->product->enabled',2,'2013-02-24 18:29:15'),(90223,'smartphone',1,NULL,'left','products',90221,NULL,NULL,1,'/product/liste.php?leftmenu=product&type=0','','List','products',1,'','$user->rights->produit->lire','$conf->product->enabled',2,'2013-02-24 18:29:15'),(90224,'smartphone',1,NULL,'left','products',90221,NULL,NULL,4,'/product/reassort.php?type=0','','Stocks','products',1,'','$user->rights->produit->lire && $user->rights->stock->lire','$conf->product->enabled',2,'2013-02-24 18:29:15'),(90321,'smartphone',1,NULL,'left','products',87424,NULL,NULL,1,'/product/index.php?leftmenu=service&type=1','','Services','products',0,'','$user->rights->service->lire','$conf->service->enabled',2,'2013-02-24 18:29:15'),(90322,'smartphone',1,NULL,'left','products',90321,NULL,NULL,0,'/product/fiche.php?leftmenu=service&action=create&type=1','','NewService','products',1,'','$user->rights->service->creer','$conf->service->enabled',2,'2013-02-24 18:29:15'),(90323,'smartphone',1,NULL,'left','products',90321,NULL,NULL,1,'/product/liste.php?leftmenu=service&type=1','','List','products',1,'','$user->rights->service->lire','$conf->service->enabled',2,'2013-02-24 18:29:15'),(90421,'smartphone',1,NULL,'left','products',87424,NULL,NULL,2,'/product/stats/index.php?leftmenu=stats','','Statistics','main',0,'','$user->rights->service->lire','$conf->product->enabled || $conf->service->enabled',2,'2013-02-24 18:29:15'),(90422,'smartphone',1,NULL,'left','products',90421,NULL,NULL,0,'/product/popuprop.php?leftmenu=stats','','Popularity','main',1,'','$user->rights->produit->lire && $user->rights->produit>lire','$conf->propal->enabled',2,'2013-02-24 18:29:15'),(90521,'smartphone',1,NULL,'left','products',87424,NULL,NULL,3,'/product/stock/index.php?leftmenu=stock','','Stock','stocks',0,'','$user->rights->stock->lire','$conf->stock->enabled',2,'2013-02-24 18:29:15'),(90522,'smartphone',1,NULL,'left','products',90521,NULL,NULL,0,'/product/stock/fiche.php?action=create','','MenuNewWarehouse','stocks',1,'','$user->rights->stock->creer','$conf->stock->enabled',2,'2013-02-24 18:29:15'),(90523,'smartphone',1,NULL,'left','products',90521,NULL,NULL,1,'/product/stock/liste.php','','List','stocks',1,'','$user->rights->stock->lire','$conf->stock->enabled',2,'2013-02-24 18:29:15'),(90524,'smartphone',1,NULL,'left','products',90521,NULL,NULL,2,'/product/stock/valo.php','','EnhancedValue','stocks',1,'','$user->rights->stock->lire','$conf->stock->enabled',2,'2013-02-24 18:29:15'),(90525,'smartphone',1,NULL,'left','products',90521,NULL,NULL,3,'/product/stock/mouvement.php','','Movements','stocks',1,'','$user->rights->stock->mouvement->lire','$conf->stock->enabled',2,'2013-02-24 18:29:15'),(90621,'smartphone',1,NULL,'left','products',87424,NULL,NULL,4,'/categories/index.php?leftmenu=cat&type=0','','Categories','categories',0,'','$user->rights->categorie->lire','$conf->categorie->enabled',2,'2013-02-24 18:29:15'),(90622,'smartphone',1,NULL,'left','products',90621,NULL,NULL,0,'/categories/fiche.php?action=create&type=0','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->categorie->enabled',2,'2013-02-24 18:29:15'),(91021,'smartphone',1,NULL,'left','project',87428,NULL,NULL,0,'/projet/index.php?leftmenu=projects','','Projects','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91022,'smartphone',1,NULL,'left','project',91021,NULL,NULL,1,'/projet/fiche.php?leftmenu=projects&action=create','','NewProject','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91023,'smartphone',1,NULL,'left','project',91021,NULL,NULL,2,'/projet/liste.php?leftmenu=projects','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91031,'smartphone',1,NULL,'left','project',87428,NULL,NULL,0,'/projet/index.php?leftmenu=projects&mode=mine','','MyProjects','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91032,'smartphone',1,NULL,'left','project',91031,NULL,NULL,1,'/projet/fiche.php?leftmenu=projects&action=create&mode=mine','','NewProject','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91033,'smartphone',1,NULL,'left','project',91031,NULL,NULL,2,'/projet/liste.php?leftmenu=projects&mode=mine','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91121,'smartphone',1,NULL,'left','project',87428,NULL,NULL,0,'/projet/activity/index.php?leftmenu=projects','','Activities','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91122,'smartphone',1,NULL,'left','project',91121,NULL,NULL,1,'/projet/tasks.php?leftmenu=projects&action=create','','NewTask','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91123,'smartphone',1,NULL,'left','project',91121,NULL,NULL,2,'/projet/tasks/index.php?leftmenu=projects','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91124,'smartphone',1,NULL,'left','project',91121,NULL,NULL,3,'/projet/activity/list.php?leftmenu=projects','','NewTimeSpent','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91221,'smartphone',1,NULL,'left','project',87428,NULL,NULL,0,'/projet/activity/index.php?leftmenu=projects&mode=mine','','MyActivities','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91222,'smartphone',1,NULL,'left','project',91221,NULL,NULL,1,'/projet/tasks.php?leftmenu=projects&action=create&mode=mine','','NewTask','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91223,'smartphone',1,NULL,'left','project',91221,NULL,NULL,2,'/projet/tasks/index.php?leftmenu=projects&mode=mine','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91224,'smartphone',1,NULL,'left','project',91221,NULL,NULL,3,'/projet/activity/list.php?leftmenu=projects&mode=mine','','NewTimeSpent','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91321,'smartphone',1,NULL,'left','tools',87429,NULL,NULL,0,'/comm/mailing/index.php?leftmenu=mailing','','EMailings','mails',0,'','$user->rights->mailing->lire','$conf->mailing->enabled',0,'2013-02-24 18:29:15'),(91322,'smartphone',1,NULL,'left','tools',91321,NULL,NULL,0,'/comm/mailing/fiche.php?leftmenu=mailing&action=create','','NewMailing','mails',1,'','$user->rights->mailing->creer','$conf->mailing->enabled',0,'2013-02-24 18:29:15'),(91323,'smartphone',1,NULL,'left','tools',91321,NULL,NULL,1,'/comm/mailing/liste.php?leftmenu=mailing','','List','mails',1,'','$user->rights->mailing->lire','$conf->mailing->enabled',0,'2013-02-24 18:29:15'),(91521,'smartphone',1,NULL,'left','tools',87429,NULL,NULL,2,'/exports/index.php?leftmenu=export','','FormatedExport','exports',0,'','$user->rights->export->lire','$conf->export->enabled',2,'2013-02-24 18:29:15'),(91522,'smartphone',1,NULL,'left','tools',91521,NULL,NULL,0,'/exports/export.php?leftmenu=export','','NewExport','exports',1,'','$user->rights->export->creer','$conf->export->enabled',2,'2013-02-24 18:29:15'),(91551,'smartphone',1,NULL,'left','tools',87429,NULL,NULL,2,'/imports/index.php?leftmenu=import','','FormatedImport','exports',0,'','$user->rights->import->run','$conf->import->enabled',2,'2013-02-24 18:29:15'),(91552,'smartphone',1,NULL,'left','tools',91551,NULL,NULL,0,'/imports/import.php?leftmenu=import','','NewImport','exports',1,'','$user->rights->import->run','$conf->import->enabled',2,'2013-02-24 18:29:15'),(91621,'smartphone',1,NULL,'left','members',87434,NULL,NULL,0,'/adherents/index.php?leftmenu=members&mainmenu=members','','Members','members',0,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91622,'smartphone',1,NULL,'left','members',91621,NULL,NULL,0,'/adherents/fiche.php?action=create','','NewMember','members',1,'','$user->rights->adherent->creer','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91623,'smartphone',1,NULL,'left','members',91621,NULL,NULL,1,'/adherents/liste.php','','List','members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91624,'smartphone',1,NULL,'left','members',91623,NULL,NULL,2,'/adherents/liste.php?statut=-1','','MenuMembersToValidate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91625,'smartphone',1,NULL,'left','members',91623,NULL,NULL,3,'/adherents/liste.php?statut=1','','MenuMembersValidated','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91626,'smartphone',1,NULL,'left','members',91623,NULL,NULL,4,'/adherents/liste.php?statut=1&filter=outofdate','','MenuMembersNotUpToDate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91627,'smartphone',1,NULL,'left','members',91623,NULL,NULL,5,'/adherents/liste.php?statut=1&filter=uptodate','','MenuMembersUpToDate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91628,'smartphone',1,NULL,'left','members',91623,NULL,NULL,6,'/adherents/liste.php?statut=0','','MenuMembersResiliated','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91721,'smartphone',1,NULL,'left','members',87434,NULL,NULL,1,'/adherents/index.php?leftmenu=accountancy&mainmenu=members','','Subscriptions','compta',0,'','$user->rights->adherent->cotisation->lire','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91722,'smartphone',1,NULL,'left','members',91721,NULL,NULL,0,'/adherents/liste.php?statut=-1&leftmenu=accountancy&mainmenu=members','','NewSubscription','compta',1,'','$user->rights->adherent->cotisation->creer','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91723,'smartphone',1,NULL,'left','members',91721,NULL,NULL,1,'/adherents/cotisations.php?leftmenu=accountancy','','List','compta',1,'','$user->rights->adherent->cotisation->lire','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91921,'smartphone',1,NULL,'left','members',87434,NULL,NULL,3,'/adherents/index.php?leftmenu=export&mainmenu=members','','Exports','members',0,'','$user->rights->adherent->export','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91922,'smartphone',1,NULL,'left','members',91921,NULL,NULL,0,'/exports/index.php?leftmenu=export','','Datas','members',1,'','$user->rights->adherent->export','$conf->adherent->enabled && $conf->export->enabled',2,'2013-02-24 18:29:15'),(91923,'smartphone',1,NULL,'left','members',91921,NULL,NULL,1,'/adherents/htpasswd.php?leftmenu=export','','Filehtpasswd','members',1,'','$user->rights->adherent->export','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91924,'smartphone',1,NULL,'left','members',91921,NULL,NULL,2,'/adherents/cartes/carte.php?leftmenu=export','','MembersCards','members',1,'','$user->rights->adherent->export','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(92121,'smartphone',1,NULL,'left','members',87434,NULL,NULL,5,'/adherents/index.php?leftmenu=setup&mainmenu=members','','Setup','members',0,'','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(92122,'smartphone',1,NULL,'left','members',92121,NULL,NULL,0,'/adherents/type.php?leftmenu=setup','','MembersTypes','members',1,'','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(92123,'smartphone',1,NULL,'left','members',92121,NULL,NULL,1,'/adherents/options.php?leftmenu=setup','','MembersAttributes','members',1,'','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(92421,'smartphone',1,NULL,'left','commercial',87426,NULL,NULL,0,'/compta/index.php?leftmenu=suppliers','','Suppliers','companies',0,'','$user->rights->societe->lire && $user->rights->fournisseur->lire','$conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(92422,'smartphone',1,NULL,'left','commercial',92421,NULL,NULL,0,'/societe/soc.php?leftmenu=suppliers&action=create&type=f','','NewSupplier','companies',1,'','$user->rights->societe->creer && $user->rights->fournisseur->lire','$conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(92423,'smartphone',1,NULL,'left','commercial',92421,NULL,NULL,1,'/fourn/liste.php?leftmenu=suppliers','','List','companies',1,'','$user->rights->societe->lire && $user->rights->fournisseur->lire','$conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(92424,'smartphone',1,NULL,'left','commercial',92421,NULL,NULL,2,'/contact/list.php?leftmenu=suppliers&type=f','','Contacts','companies',1,'','$user->rights->societe->lire && $user->rights->fournisseur->lire','$conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(92521,'smartphone',1,NULL,'left','commercial',87426,NULL,NULL,6,'/fourn/commande/index.php?leftmenu=orders_suppliers','','SuppliersOrders','orders',0,'','$user->rights->fournisseur->commande->lire','$conf->commande->enabled',2,'2013-02-24 18:29:15'),(92522,'smartphone',1,NULL,'left','commercial',92521,NULL,NULL,0,'/societe/societe.php?leftmenu=orders_suppliers','','NewOrder','orders',1,'','$user->rights->fournisseur->commande->creer','$conf->commande->enabled && $leftmenu==\"orders_suppliers\"',2,'2013-02-24 18:29:15'),(92523,'smartphone',1,NULL,'left','commercial',92521,NULL,NULL,1,'/fourn/commande/liste.php?leftmenu=orders_suppliers&viewstatut=0','','List','orders',1,'','$user->rights->fournisseur->commande->lire','$conf->commande->enabled && $leftmenu==\"orders_suppliers\"',2,'2013-02-24 18:29:15'),(92529,'smartphone',1,NULL,'left','commercial',92521,NULL,NULL,7,'/commande/stats/index.php?leftmenu=orders_suppliers&mode=supplier','','Statistics','orders',1,'','$user->rights->fournisseur->commande->lire','$conf->commande->enabled && $leftmenu==\"orders_suppliers\"',2,'2013-02-24 18:29:15'),(92621,'smartphone',1,NULL,'left','members',87434,NULL,NULL,3,'/categories/index.php?leftmenu=cat&type=3','','MembersCategoriesShort','categories',0,'','$user->rights->categorie->lire','$conf->adherent->enabled && $conf->categorie->enabled',2,'2013-02-24 18:29:15'),(92622,'smartphone',1,NULL,'left','members',92621,NULL,NULL,0,'/categories/fiche.php?action=create&type=3','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->adherent->enabled && $conf->categorie->enabled',2,'2013-02-24 18:29:15'),(103094,'all',2,'agenda','top','agenda',0,NULL,NULL,100,'/comm/action/index.php','','Agenda','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-03-13 15:29:19'),(103095,'all',2,'agenda','left','agenda',103094,NULL,NULL,100,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Actions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-03-13 15:29:19'),(103096,'all',2,'agenda','left','agenda',103095,NULL,NULL,101,'/comm/action/fiche.php?mainmenu=agenda&leftmenu=agenda&action=create','','NewAction','commercial',NULL,NULL,'($user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create)','$conf->agenda->enabled',2,'2013-03-13 15:29:19'),(103097,'all',2,'agenda','left','agenda',103095,NULL,NULL,102,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Calendar','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-03-13 15:29:19'),(103098,'all',2,'agenda','left','agenda',103097,NULL,NULL,103,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-03-13 15:29:19'),(103099,'all',2,'agenda','left','agenda',103097,NULL,NULL,104,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-03-13 15:29:19'),(103100,'all',2,'agenda','left','agenda',103097,NULL,NULL,105,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2013-03-13 15:29:19'),(103101,'all',2,'agenda','left','agenda',103097,NULL,NULL,106,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2013-03-13 15:29:19'),(103102,'all',2,'agenda','left','agenda',103095,NULL,NULL,112,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda','','List','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-03-13 15:29:19'),(103103,'all',2,'agenda','left','agenda',103102,NULL,NULL,113,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-03-13 15:29:19'),(103104,'all',2,'agenda','left','agenda',103102,NULL,NULL,114,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-03-13 15:29:19'),(103105,'all',2,'agenda','left','agenda',103102,NULL,NULL,115,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2013-03-13 15:29:19'),(103106,'all',2,'agenda','left','agenda',103102,NULL,NULL,116,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2013-03-13 15:29:19'),(103107,'all',2,'agenda','left','agenda',103095,NULL,NULL,120,'/comm/action/rapport/index.php?mainmenu=agenda&leftmenu=agenda','','Reportings','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$conf->agenda->enabled',2,'2013-03-13 15:29:19'),(103108,'all',2,'pos','top','pos',0,NULL,NULL,100,'/pos/backend/listefac.php','','POS','pos@pos',NULL,'1','1','1',2,'2013-03-13 20:33:09'),(103109,'all',2,'pos','left','pos',103108,NULL,NULL,100,'/pos/backend/liste.php','','Tickets','pos@pos',NULL,NULL,'$user->rights->pos->backend','$conf->global->POS_USE_TICKETS',0,'2013-03-13 20:33:09'),(103110,'all',2,'pos','left','pos',103109,NULL,NULL,100,'/pos/backend/liste.php','','List','main',NULL,NULL,'$user->rights->pos->backend','$conf->global->POS_USE_TICKETS',0,'2013-03-13 20:33:09'),(103111,'all',2,'pos','left','pos',103110,NULL,NULL,100,'/pos/backend/liste.php?viewstatut=0','','StatusTicketDraft','pos@pos',NULL,NULL,'$user->rights->pos->backend','$conf->global->POS_USE_TICKETS',0,'2013-03-13 20:33:09'),(103112,'all',2,'pos','left','@pos',103110,NULL,NULL,100,'/pos/backend/liste.php?viewstatut=1','','StatusTicketClosed','main',NULL,NULL,'$user->rights->pos->backend','$conf->global->POS_USE_TICKETS',0,'2013-03-13 20:33:09'),(103113,'all',2,'pos','left','@pos',103110,NULL,NULL,100,'/pos/backend/liste.php?viewstatut=2','','StatusTicketProcessed','main',NULL,NULL,'$user->rights->pos->backend','$conf->global->POS_USE_TICKETS',0,'2013-03-13 20:33:09'),(103114,'all',2,'pos','left','@pos',103110,NULL,NULL,100,'/pos/backend/liste.php?viewtype=1','','StatusTicketReturned','main',NULL,NULL,'$user->rights->pos->backend','$conf->global->POS_USE_TICKETS',0,'2013-03-13 20:33:09'),(103115,'all',2,'pos','left','pos',103108,NULL,NULL,100,'/pos/backend/listefac.php','','Factures','pos@pos',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103116,'all',2,'pos','left','pos',103115,NULL,NULL,100,'/pos/backend/listefac.php','','List','main',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103117,'all',2,'pos','left','pos',103116,NULL,NULL,100,'/pos/backend/listefac.php?viewstatut=0','','BillStatusDraft','bills',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103118,'all',2,'pos','left','@pos',103116,NULL,NULL,100,'/pos/backend/listefac.php?viewstatut=1','','BillStatusValidated','bills',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103119,'all',2,'pos','left','@pos',103116,NULL,NULL,100,'/pos/backend/listefac.php?viewstatut=2&viewtype=0','','BillStatusPaid','bills',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103120,'all',2,'pos','left','@pos',103116,NULL,NULL,100,'/pos/backend/listefac.php?viewtype=2','','BillStatusReturned','main',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103121,'all',2,'pos','left','@pos',103108,NULL,NULL,100,'/pos/frontend/index.php','','POS','main',NULL,NULL,'$user->rights->pos->frontend','1',0,'2013-03-13 20:33:09'),(103122,'all',2,'pos','left','@pos',103121,NULL,NULL,100,'/pos/frontend/index.php','','NewTicket','main',NULL,NULL,'$user->rights->pos->frontend','1',0,'2013-03-13 20:33:09'),(103123,'all',2,'pos','left','@pos',103121,NULL,NULL,101,'/pos/backend/closes.php','','CloseandArching','main',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103124,'all',2,'pos','left','@pos',103108,NULL,NULL,100,'/pos/backend/terminal/cash.php','','Terminal','main',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103125,'all',2,'pos','left','@pos',103124,NULL,NULL,100,'/pos/backend/terminal/fiche.php?action=create','','NewCash','main',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103126,'all',2,'pos','left','@pos',103124,NULL,NULL,101,'/pos/backend/terminal/cash.php','','List','main',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103127,'all',2,'pos','left','@pos',103123,NULL,NULL,101,'/pos/backend/closes.php?viewstatut=0','','Arqueo','main',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103128,'all',2,'pos','left','@pos',103123,NULL,NULL,102,'/pos/backend/closes.php?viewstatut=1','','Closes','main',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103129,'all',2,'pos','left','@pos',103108,NULL,NULL,102,'/pos/backend/transfers.php','','Transfer','main',NULL,NULL,'$user->rights->pos->transfer','1',0,'2013-03-13 20:33:09'),(103130,'all',2,'pos','left','@pos',103108,NULL,NULL,102,'/pos/backend/resultat/index.php','','Rapport','main',NULL,NULL,'$user->rights->pos->stats','1',0,'2013-03-13 20:33:09'),(103131,'all',2,'pos','left','@pos',103130,NULL,NULL,102,'/pos/backend/resultat/casoc.php','','ReportsCustomer','main',NULL,NULL,'$user->rights->pos->stats','1',0,'2013-03-13 20:33:09'),(103132,'all',2,'pos','left','@pos',103130,NULL,NULL,102,'/pos/backend/resultat/causer.php','','ReportsUser','main',NULL,NULL,'$user->rights->pos->stats','1',0,'2013-03-13 20:33:09'),(103133,'all',2,'pos','left','@pos',103130,NULL,NULL,102,'/pos/backend/resultat/sellsjournal.php','','ReportsSells','main',NULL,NULL,'$user->rights->pos->stats','1',0,'2013-03-13 20:33:09'),(103134,'all',2,'opensurvey','top','opensurvey',0,NULL,NULL,200,'/opensurvey/index.php','','Surveys','opensurvey@opensurvey',NULL,NULL,'$user->rights->opensurvey->survey->read','$conf->opensurvey->enabled',0,'2013-03-13 20:33:42'),(103135,'all',2,'opensurvey','left','opensurvey',-1,NULL,'opensurvey',200,'/opensurvey/index.php?mainmenu=opensurvey&leftmenu=opensurvey','','Survey','opensurvey@opensurvey',NULL,'opensurvey','','$conf->opensurvey->enabled',0,'2013-03-13 20:33:42'),(103136,'all',2,'opensurvey','left','opensurvey',-1,'opensurvey','opensurvey',210,'/opensurvey/public/index.php','_blank','NewSurvey','opensurvey@opensurvey',NULL,'opensurvey_new','','$conf->opensurvey->enabled',0,'2013-03-13 20:33:42'),(103137,'all',2,'opensurvey','left','opensurvey',-1,'opensurvey','opensurvey',220,'/opensurvey/list.php','','List','opensurvey@opensurvey',NULL,'opensurvey_list','','$conf->opensurvey->enabled',0,'2013-03-13 20:33:42'),(103160,'all',1,'cron','left','home',-1,'modulesadmintools','home',200,'/cron/list.php?status=1','','CronListActive','cron',NULL,NULL,'$user->rights->cron->read','$leftmenu==\'modulesadmintools\'',2,'2013-03-23 17:24:25'),(103161,'all',1,'cron','left','home',-1,'modulesadmintools','home',201,'/cron/list.php?status=0','','CronListInactive','cron',NULL,NULL,'$user->rights->cron->read','$leftmenu==\'modulesadmintools\'',2,'2013-03-23 17:24:25'),(103162,'auguria',1,'','top','home',0,NULL,NULL,1,'/index.php?mainmenu=home&leftmenu=','','Home','',-1,'','','1',2,'2013-03-24 02:31:47'),(103163,'auguria',1,'societe|fournisseur','top','companies',0,NULL,NULL,2,'/societe/index.php?mainmenu=companies&leftmenu=','','ThirdParties','companies',-1,'','$user->rights->societe->lire || $user->rights->societe->contact->lire','$conf->societe->enabled || $conf->fournisseur->enabled',2,'2013-03-24 02:31:47'),(103164,'auguria',1,'product|service','top','products',0,NULL,NULL,3,'/product/index.php?mainmenu=products&leftmenu=','','Products/Services','products',-1,'','$user->rights->produit->lire||$user->rights->service->lire','$conf->product->enabled || $conf->service->enabled',0,'2013-03-24 02:31:47'),(103166,'auguria',1,'propal|commande|fournisseur|contrat|ficheinter','top','commercial',0,NULL,NULL,5,'/comm/index.php?mainmenu=commercial&leftmenu=','','Commercial','commercial',-1,'','$user->rights->societe->lire || $user->rights->societe->contact->lire','$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->facture->enabled || $conf->deplacement->enabled || $conf->don->enabled || $conf->tax->enabled',2,'2013-03-24 02:31:47'),(103167,'auguria',1,'comptabilite|accounting|facture|deplacement|don|tax','top','accountancy',0,NULL,NULL,6,'/compta/index.php?mainmenu=accountancy&leftmenu=','','MenuFinancial','compta',-1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->plancompte->lire || $user->rights->facture->lire|| $user->rights->deplacement->lire || $user->rights->don->lire || $user->rights->tax->charges->lire','$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->facture->enabled || $conf->deplacement->enabled || $conf->don->enabled || $conf->tax->enabled',2,'2013-03-24 02:31:47'),(103168,'auguria',1,'projet','top','project',0,NULL,NULL,7,'/projet/index.php?mainmenu=project&leftmenu=','','Projects','projects',-1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-03-24 02:31:47'),(103169,'auguria',1,'mailing|export|import','top','tools',0,NULL,NULL,8,'/core/tools.php?mainmenu=tools&leftmenu=','','Tools','other',-1,'','$user->rights->mailing->lire || $user->rights->export->lire || $user->rights->import->run','$conf->mailing->enabled || $conf->export->enabled || $conf->import->enabled',2,'2013-03-24 02:31:47'),(103172,'auguria',1,'boutique','top','shop',0,NULL,NULL,11,'/boutique/index.php?mainmenu=shop&leftmenu=','','OSCommerce','shop',-1,'','','! empty($conf->boutique->enabled)',0,'2013-03-24 02:31:47'),(103174,'auguria',1,'adherent','top','members',0,NULL,NULL,15,'/adherents/index.php?mainmenu=members&leftmenu=','','Members','members',-1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-03-24 02:31:47'),(103175,'auguria',1,'banque|prelevement','top','bank',0,NULL,NULL,6,'/compta/bank/index.php?mainmenu=bank&leftmenu=bank','','MenuBankCash','banks',-1,'','$user->rights->banque->lire || $user->rights->prelevement->bons->lire','$conf->banque->enabled || $conf->prelevement->enabled',0,'2013-03-24 02:31:47'),(103261,'auguria',1,'','left','home',103162,NULL,NULL,0,'/admin/index.php?leftmenu=setup','','Setup','admin',0,'setup','','$user->admin',2,'2013-03-24 02:31:47'),(103262,'auguria',1,'','left','home',103261,NULL,NULL,1,'/admin/company.php?leftmenu=setup','','MenuCompanySetup','admin',1,'','','$leftmenu==\'setup\'',2,'2013-03-24 02:31:47'),(103263,'auguria',1,'','left','home',103261,NULL,NULL,4,'/admin/ihm.php?leftmenu=setup','','GUISetup','admin',1,'','','$leftmenu==\'setup\'',2,'2013-03-24 02:31:47'),(103264,'auguria',1,'','left','home',103261,NULL,NULL,2,'/admin/modules.php?leftmenu=setup','','Modules','admin',1,'','','$leftmenu==\'setup\'',2,'2013-03-24 02:31:47'),(103265,'auguria',1,'','left','home',103261,NULL,NULL,5,'/admin/boxes.php?leftmenu=setup','','Boxes','admin',1,'','','$leftmenu==\'setup\'',2,'2013-03-24 02:31:47'),(103266,'auguria',1,'','left','home',103261,NULL,NULL,3,'/admin/menus.php?leftmenu=setup','','Menus','admin',1,'','','$leftmenu==\'setup\'',2,'2013-03-24 02:31:47'),(103267,'auguria',1,'','left','home',103261,NULL,NULL,6,'/admin/delais.php?leftmenu=setup','','Alerts','admin',1,'','','$leftmenu==\'setup\'',2,'2013-03-24 02:31:47'),(103268,'auguria',1,'','left','home',103261,NULL,NULL,9,'/admin/pdf.php?leftmenu=setup','','PDF','admin',1,'','','$leftmenu==\'setup\'',2,'2013-03-24 02:31:47'),(103269,'auguria',1,'','left','home',103261,NULL,NULL,7,'/admin/proxy.php?leftmenu=setup','','Security','admin',1,'','','$leftmenu==\'setup\'',2,'2013-03-24 02:31:47'),(103270,'auguria',1,'','left','home',103261,NULL,NULL,10,'/admin/mails.php?leftmenu=setup','','Emails','admin',1,'','','$leftmenu==\'setup\'',2,'2013-03-24 02:31:47'),(103271,'auguria',1,'','left','home',103261,NULL,NULL,8,'/admin/limits.php?leftmenu=setup','','MenuLimits','admin',1,'','','$leftmenu==\'setup\'',2,'2013-03-24 02:31:47'),(103272,'auguria',1,'','left','home',103261,NULL,NULL,12,'/admin/dict.php?leftmenu=setup','','DictionnarySetup','admin',1,'','','$leftmenu==\'setup\'',2,'2013-03-24 02:31:47'),(103273,'auguria',1,'','left','home',103261,NULL,NULL,13,'/admin/const.php?leftmenu=setup','','OtherSetup','admin',1,'','','$leftmenu==\'setup\'',2,'2013-03-24 02:31:47'),(103274,'auguria',1,'','left','home',103261,NULL,NULL,11,'/admin/sms.php?leftmenu=setup','','Sms','admin',1,'','','$leftmenu==\'setup\'',2,'2013-03-24 02:31:47'),(103362,'auguria',1,'','left','home',103461,NULL,NULL,0,'/admin/system/dolibarr.php?leftmenu=admintools','','InfoDolibarr','admin',1,'','','$leftmenu==\'admintools\'',2,'2013-03-24 02:31:47'),(103364,'auguria',1,'','left','home',103461,NULL,NULL,13,'/admin/system/about.php?leftmenu=admintools','','About','admin',1,'','','$leftmenu==\'admintools\'',2,'2013-03-24 02:31:47'),(103365,'auguria',1,'','left','home',103461,NULL,NULL,1,'/admin/system/os.php?leftmenu=admintools','','InfoOS','admin',1,'','','$leftmenu==\'admintools\'',2,'2013-03-24 02:31:47'),(103366,'auguria',1,'','left','home',103461,NULL,NULL,2,'/admin/system/web.php?leftmenu=admintools','','InfoWebServer','admin',1,'','','$leftmenu==\'admintools\'',2,'2013-03-24 02:31:47'),(103367,'auguria',1,'','left','home',103461,NULL,NULL,3,'/admin/system/phpinfo.php?leftmenu=admintools','','InfoPHP','admin',1,'','','$leftmenu==\'admintools\'',2,'2013-03-24 02:31:47'),(103368,'auguria',1,'','left','home',103362,NULL,NULL,3,'/admin/triggers.php?leftmenu=admintools','','Triggers','admin',2,'','','$leftmenu==\'admintools\'',2,'2013-03-24 02:31:47'),(103369,'auguria',1,'','left','home',103362,NULL,NULL,2,'/admin/system/modules.php?leftmenu=admintools','','Modules','admin',2,'','','$leftmenu==\'admintools\'',2,'2013-03-24 02:31:47'),(103371,'auguria',1,'','left','home',103461,NULL,NULL,4,'/admin/system/database.php?leftmenu=admintools','','InfoDatabase','admin',1,'','','$leftmenu==\'admintools\'',2,'2013-03-24 02:31:47'),(103461,'auguria',1,'','left','home',103162,NULL,NULL,2,'/admin/tools/index.php?leftmenu=admintools','','SystemTools','admin',0,'admintools','','$user->admin',2,'2013-03-24 02:31:47'),(103462,'auguria',1,'','left','home',103461,NULL,NULL,5,'/admin/tools/dolibarr_export.php?leftmenu=admintools','','Backup','admin',1,'','','$leftmenu==\'admintools\'',2,'2013-03-24 02:31:47'),(103463,'auguria',1,'','left','home',103461,NULL,NULL,6,'/admin/tools/dolibarr_import.php?leftmenu=admintools','','Restore','admin',1,'','','$leftmenu==\'admintools\'',2,'2013-03-24 02:31:47'),(103464,'auguria',1,'','left','home',103461,NULL,NULL,11,'/admin/tools/purge.php?leftmenu=admintools','','Purge','admin',1,'','','$leftmenu==\'admintools\'',2,'2013-03-24 02:31:47'),(103465,'auguria',1,'','left','home',103461,NULL,NULL,8,'/admin/tools/eaccelerator.php?leftmenu=admintools','','EAccelerator','admin',1,'','','$leftmenu==\'admintools\' && function_exists(\'eaccelerator_info\')',2,'2013-03-24 02:31:47'),(103466,'auguria',1,'','left','home',103461,NULL,NULL,7,'/admin/tools/update.php?leftmenu=admintools','','MenuUpgrade','admin',1,'','','$leftmenu==\'admintools\'',2,'2013-03-24 02:31:47'),(103467,'auguria',1,'','left','home',103461,NULL,NULL,9,'/admin/tools/listevents.php?leftmenu=admintools','','Audit','admin',1,'','','$leftmenu==\'admintools\'',2,'2013-03-24 02:31:47'),(103468,'auguria',1,'','left','home',103461,NULL,NULL,12,'/support/index.php?leftmenu=admintools','_blank','HelpCenter','help',1,'','','$leftmenu==\'admintools\'',2,'2013-03-24 02:31:47'),(103469,'auguria',1,'','left','home',103461,NULL,NULL,10,'/admin/tools/listsessions.php?leftmenu=admintools','','Sessions','admin',1,'','','$leftmenu==\'admintools\'',2,'2013-03-24 02:31:47'),(103561,'auguria',1,'','left','home',103162,NULL,NULL,3,'/user/home.php?leftmenu=users','','MenuUsersAndGroups','users',0,'users','','1',2,'2013-03-24 02:31:47'),(103562,'auguria',1,'','left','home',103561,NULL,NULL,0,'/user/index.php?leftmenu=users','','Users','users',1,'','$user->rights->user->user->lire || $user->admin','$leftmenu==\'users\'',2,'2013-03-24 02:31:47'),(103563,'auguria',1,'','left','home',103562,NULL,NULL,0,'/user/fiche.php?leftmenu=users&action=create','','NewUser','users',2,'','$user->rights->user->user->creer || $user->admin','$leftmenu==\'users\'',2,'2013-03-24 02:31:47'),(103564,'auguria',1,'','left','home',103561,NULL,NULL,1,'/user/group/index.php?leftmenu=users','','Groups','users',1,'','($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->read:$user->rights->user->user->lire) || $user->admin','$leftmenu==\'users\'',2,'2013-03-24 02:31:47'),(103565,'auguria',1,'','left','home',103564,NULL,NULL,0,'/user/group/fiche.php?leftmenu=users&action=create','','NewGroup','users',2,'','($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->write:$user->rights->user->user->creer) || $user->admin','$leftmenu==\'users\'',2,'2013-03-24 02:31:47'),(103661,'auguria',1,'','left','companies',103163,NULL,NULL,0,'/societe/index.php?leftmenu=thirdparties','','ThirdParty','companies',0,'thirdparties','$user->rights->societe->lire','$conf->societe->enabled',2,'2013-03-24 02:31:47'),(103662,'auguria',1,'','left','companies',103661,NULL,NULL,0,'/societe/soc.php?action=create','','MenuNewThirdParty','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2013-03-24 02:31:47'),(103664,'auguria',1,'','left','companies',103661,NULL,NULL,5,'/fourn/liste.php?leftmenu=suppliers','','ListSuppliersShort','suppliers',1,'','$user->rights->societe->lire && $user->rights->fournisseur->lire','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2013-03-24 02:31:47'),(103665,'auguria',1,'','left','companies',103664,NULL,NULL,0,'/societe/soc.php?leftmenu=supplier&action=create&type=f','','NewSupplier','suppliers',2,'','$user->rights->societe->creer','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2013-03-24 02:31:47'),(103667,'auguria',1,'','left','companies',103661,NULL,NULL,3,'/comm/prospect/list.php?leftmenu=prospects','','ListProspectsShort','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2013-03-24 02:31:47'),(103668,'auguria',1,'','left','companies',103667,NULL,NULL,0,'/societe/soc.php?leftmenu=prospects&action=create&type=p','','MenuNewProspect','companies',2,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2013-03-24 02:31:47'),(103670,'auguria',1,'','left','companies',103661,NULL,NULL,4,'/comm/list.php?leftmenu=customers','','ListCustomersShort','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2013-03-24 02:31:47'),(103671,'auguria',1,'','left','companies',103670,NULL,NULL,0,'/societe/soc.php?leftmenu=customers&action=create&type=c','','MenuNewCustomer','companies',2,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2013-03-24 02:31:47'),(103761,'auguria',1,'','left','companies',103163,NULL,NULL,1,'/contact/list.php?leftmenu=contacts','','ContactsAddresses','companies',0,'contacts','$user->rights->societe->lire','$conf->societe->enabled',2,'2013-03-24 02:31:47'),(103762,'auguria',1,'','left','companies',103761,NULL,NULL,0,'/contact/fiche.php?leftmenu=contacts&action=create','','NewContactAddress','companies',1,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2013-03-24 02:31:47'),(103763,'auguria',1,'','left','companies',103761,NULL,NULL,1,'/contact/list.php?leftmenu=contacts','','List','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2013-03-24 02:31:47'),(103765,'auguria',1,'','left','companies',103763,NULL,NULL,1,'/contact/list.php?leftmenu=contacts&type=p','','Prospects','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2013-03-24 02:31:47'),(103766,'auguria',1,'','left','companies',103763,NULL,NULL,2,'/contact/list.php?leftmenu=contacts&type=c','','Customers','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2013-03-24 02:31:47'),(103767,'auguria',1,'','left','companies',103763,NULL,NULL,3,'/contact/list.php?leftmenu=contacts&type=f','','Suppliers','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2013-03-24 02:31:47'),(103768,'auguria',1,'','left','companies',103763,NULL,NULL,4,'/contact/list.php?leftmenu=contacts&type=o','','Others','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2013-03-24 02:31:47'),(103811,'auguria',1,'','left','companies',103163,NULL,NULL,3,'/categories/index.php?leftmenu=cat&type=1','','SuppliersCategoriesShort','categories',0,'cat','$user->rights->categorie->lire','$conf->societe->enabled && $conf->categorie->enabled',2,'2013-03-24 02:31:47'),(103812,'auguria',1,'','left','companies',103811,NULL,NULL,0,'/categories/fiche.php?action=create&type=1','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->societe->enabled && $conf->categorie->enabled',2,'2013-03-24 02:31:47'),(103821,'auguria',1,'','left','companies',103163,NULL,NULL,4,'/categories/index.php?leftmenu=cat&type=2','','CustomersProspectsCategoriesShort','categories',0,'cat','$user->rights->categorie->lire','$conf->fournisseur->enabled && $conf->categorie->enabled',2,'2013-03-24 02:31:47'),(103822,'auguria',1,'','left','companies',103821,NULL,NULL,0,'/categories/fiche.php?action=create&type=2','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->fournisseur->enabled && $conf->categorie->enabled',2,'2013-03-24 02:31:47'),(104261,'auguria',1,'','left','commercial',103166,NULL,NULL,4,'/comm/propal/index.php?leftmenu=propals','','Prop','propal',0,'propals','$user->rights->propale->lire','$conf->propal->enabled',2,'2013-03-24 02:31:47'),(104262,'auguria',1,'','left','commercial',104261,NULL,NULL,0,'/societe/societe.php?leftmenu=propals','','NewPropal','propal',1,'','$user->rights->propale->creer','$conf->propal->enabled',2,'2013-03-24 02:31:47'),(104263,'auguria',1,'','left','commercial',104261,NULL,NULL,1,'/comm/propal/list.php?leftmenu=propals','','List','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled',2,'2013-03-24 02:31:47'),(104264,'auguria',1,'','left','commercial',104263,NULL,NULL,2,'/comm/propal/list.php?leftmenu=propals&viewstatut=0','','PropalsDraft','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2013-03-24 02:31:47'),(104265,'auguria',1,'','left','commercial',104263,NULL,NULL,3,'/comm/propal/list.php?leftmenu=propals&viewstatut=1','','PropalsOpened','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2013-03-24 02:31:47'),(104266,'auguria',1,'','left','commercial',104263,NULL,NULL,4,'/comm/propal/list.php?leftmenu=propals&viewstatut=2','','PropalStatusSigned','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2013-03-24 02:31:47'),(104267,'auguria',1,'','left','commercial',104263,NULL,NULL,5,'/comm/propal/list.php?leftmenu=propals&viewstatut=3','','PropalStatusNotSigned','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2013-03-24 02:31:47'),(104268,'auguria',1,'','left','commercial',104263,NULL,NULL,6,'/comm/propal/list.php?leftmenu=propals&viewstatut=4','','PropalStatusBilled','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2013-03-24 02:31:47'),(104271,'auguria',1,'','left','commercial',104261,NULL,NULL,4,'/comm/propal/stats/index.php?leftmenu=propals','','Statistics','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled',2,'2013-03-24 02:31:47'),(104361,'auguria',1,'','left','commercial',103166,NULL,NULL,5,'/commande/index.php?leftmenu=orders','','CustomersOrders','orders',0,'orders','$user->rights->commande->lire','$conf->commande->enabled',2,'2013-03-24 02:31:47'),(104362,'auguria',1,'','left','commercial',104361,NULL,NULL,0,'/societe/societe.php?leftmenu=orders','','NewOrder','orders',1,'','$user->rights->commande->creer','$conf->commande->enabled',2,'2013-03-24 02:31:47'),(104363,'auguria',1,'','left','commercial',104361,NULL,NULL,1,'/commande/liste.php?leftmenu=orders','','List','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled',2,'2013-03-24 02:31:47'),(104364,'auguria',1,'','left','commercial',104363,NULL,NULL,2,'/commande/liste.php?leftmenu=orders&viewstatut=0','','StatusOrderDraftShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-03-24 02:31:47'),(104365,'auguria',1,'','left','commercial',104363,NULL,NULL,3,'/commande/liste.php?leftmenu=orders&viewstatut=1','','StatusOrderValidated','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-03-24 02:31:47'),(104366,'auguria',1,'','left','commercial',104363,NULL,NULL,4,'/commande/liste.php?leftmenu=orders&viewstatut=2','','StatusOrderOnProcessShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-03-24 02:31:47'),(104367,'auguria',1,'','left','commercial',104363,NULL,NULL,5,'/commande/liste.php?leftmenu=orders&viewstatut=3','','StatusOrderToBill','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-03-24 02:31:47'),(104368,'auguria',1,'','left','commercial',104363,NULL,NULL,6,'/commande/liste.php?leftmenu=orders&viewstatut=4','','StatusOrderProcessed','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-03-24 02:31:47'),(104369,'auguria',1,'','left','commercial',104363,NULL,NULL,7,'/commande/liste.php?leftmenu=orders&viewstatut=-1','','StatusOrderCanceledShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-03-24 02:31:47'),(104370,'auguria',1,'','left','commercial',104361,NULL,NULL,4,'/commande/stats/index.php?leftmenu=orders','','Statistics','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled',2,'2013-03-24 02:31:47'),(104461,'auguria',1,'','left','commercial',103164,NULL,NULL,6,'/expedition/index.php?leftmenu=sendings','','Shipments','sendings',0,'sendings','$user->rights->expedition->lire','$conf->expedition->enabled',2,'2013-03-24 02:31:47'),(104462,'auguria',1,'','left','commercial',104461,NULL,NULL,0,'/expedition/fiche.php?action=create2&leftmenu=sendings','','NewSending','sendings',1,'','$user->rights->expedition->creer','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2013-03-24 02:31:47'),(104463,'auguria',1,'','left','commercial',104461,NULL,NULL,1,'/expedition/liste.php?leftmenu=sendings','','List','sendings',1,'','$user->rights->expedition->lire','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2013-03-24 02:31:47'),(104464,'auguria',1,'','left','commercial',104461,NULL,NULL,2,'/expedition/stats/index.php?leftmenu=sendings','','Statistics','sendings',1,'','$user->rights->expedition->lire','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2013-03-24 02:31:47'),(104561,'auguria',1,'','left','commercial',103166,NULL,NULL,7,'/contrat/index.php?leftmenu=contracts','','Contracts','contracts',0,'contracts','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2013-03-24 02:31:47'),(104562,'auguria',1,'','left','commercial',104561,NULL,NULL,0,'/societe/societe.php?leftmenu=contracts','','NewContract','contracts',1,'','$user->rights->contrat->creer','$conf->contrat->enabled',2,'2013-03-24 02:31:47'),(104563,'auguria',1,'','left','commercial',104561,NULL,NULL,1,'/contrat/liste.php?leftmenu=contracts','','List','contracts',1,'','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2013-03-24 02:31:47'),(104564,'auguria',1,'','left','commercial',104561,NULL,NULL,2,'/contrat/services.php?leftmenu=contracts','','MenuServices','contracts',1,'','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2013-03-24 02:31:47'),(104565,'auguria',1,'','left','commercial',104564,NULL,NULL,0,'/contrat/services.php?leftmenu=contracts&mode=0','','MenuInactiveServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled&&$leftmenu==\"contracts\"',2,'2013-03-24 02:31:47'),(104566,'auguria',1,'','left','commercial',104564,NULL,NULL,1,'/contrat/services.php?leftmenu=contracts&mode=4','','MenuRunningServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled&&$leftmenu==\"contracts\"',2,'2013-03-24 02:31:47'),(104567,'auguria',1,'','left','commercial',104564,NULL,NULL,2,'/contrat/services.php?leftmenu=contracts&mode=4&filter=expired','','MenuExpiredServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled&&$leftmenu==\"contracts\"',2,'2013-03-24 02:31:47'),(104568,'auguria',1,'','left','commercial',104564,NULL,NULL,3,'/contrat/services.php?leftmenu=contracts&mode=5','','MenuClosedServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled&&$leftmenu==\"contracts\"',2,'2013-03-24 02:31:47'),(104661,'auguria',1,'','left','commercial',103166,NULL,NULL,8,'/fichinter/list.php?leftmenu=ficheinter','','Interventions','interventions',0,'ficheinter','$user->rights->ficheinter->lire','$conf->ficheinter->enabled',2,'2013-03-24 02:31:47'),(104662,'auguria',1,'','left','commercial',104661,NULL,NULL,0,'/fichinter/fiche.php?action=create&leftmenu=ficheinter','','NewIntervention','interventions',1,'','$user->rights->ficheinter->creer','$conf->ficheinter->enabled',2,'2013-03-24 02:31:47'),(104663,'auguria',1,'','left','commercial',104661,NULL,NULL,1,'/fichinter/list.php?leftmenu=ficheinter','','List','interventions',1,'','$user->rights->ficheinter->lire','$conf->ficheinter->enabled',2,'2013-03-24 02:31:47'),(104761,'auguria',1,'','left','accountancy',103167,NULL,NULL,3,'/fourn/facture/index.php?leftmenu=suppliers_bills','','BillsSuppliers','bills',0,'supplier_bills','$user->rights->fournisseur->facture->lire','$conf->fournisseur->enabled',2,'2013-03-24 02:31:47'),(104762,'auguria',1,'','left','accountancy',104761,NULL,NULL,0,'/fourn/facture/fiche.php?action=create&leftmenu=suppliers_bills','','NewBill','bills',1,'','$user->rights->fournisseur->facture->creer','$conf->fournisseur->enabled',2,'2013-03-24 02:31:47'),(104763,'auguria',1,'','left','accountancy',104761,NULL,NULL,1,'/fourn/facture/impayees.php?leftmenu=suppliers_bills','','Unpaid','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->fournisseur->enabled',2,'2013-03-24 02:31:47'),(104764,'auguria',1,'','left','accountancy',104761,NULL,NULL,2,'/fourn/facture/paiement.php?leftmenu=suppliers_bills','','Payments','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->fournisseur->enabled',2,'2013-03-24 02:31:47'),(104765,'auguria',1,'','left','accountancy',104761,NULL,NULL,8,'/compta/facture/stats/index.php?leftmenu=customers_bills&mode=supplier','','Statistics','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->fournisseur->enabled',2,'2013-03-24 02:31:47'),(104861,'auguria',1,'','left','accountancy',103167,NULL,NULL,3,'/compta/facture/list.php?leftmenu=customers_bills','','BillsCustomers','bills',0,'customer_bills','$user->rights->facture->lire','$conf->facture->enabled',2,'2013-03-24 02:31:47'),(104862,'auguria',1,'','left','accountancy',104861,NULL,NULL,3,'/compta/clients.php?action=facturer&leftmenu=customers_bills','','NewBill','bills',1,'','$user->rights->facture->creer','$conf->facture->enabled',2,'2013-03-24 02:31:47'),(104863,'auguria',1,'','left','accountancy',104861,NULL,NULL,4,'/compta/facture/fiche-rec.php?leftmenu=customers_bills','','Repeatable','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2013-03-24 02:31:47'),(104864,'auguria',1,'','left','accountancy',104861,NULL,NULL,5,'/compta/facture/impayees.php?action=facturer&leftmenu=customers_bills','','Unpaid','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2013-03-24 02:31:47'),(104865,'auguria',1,'','left','accountancy',104861,NULL,NULL,6,'/compta/paiement/liste.php?leftmenu=customers_bills','','Payments','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2013-03-24 02:31:47'),(104871,'auguria',1,'','left','accountancy',104865,NULL,NULL,1,'/compta/paiement/rapport.php?leftmenu=customers_bills','','Reportings','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2013-03-24 02:31:47'),(104872,'auguria',1,'','left','accountancy',103175,NULL,NULL,9,'/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank','','MenuChequeDeposits','bills',0,'checks','$user->rights->facture->lire','$conf->facture->enabled && $conf->banque->enabled',2,'2013-03-24 02:31:47'),(104873,'auguria',1,'','left','accountancy',104872,NULL,NULL,0,'/compta/paiement/cheque/fiche.php?leftmenu=checks&action=new','','NewCheckDeposit','compta',1,'','$user->rights->facture->lire','$conf->facture->enabled && $conf->banque->enabled',2,'2013-03-24 02:31:47'),(104874,'auguria',1,'','left','accountancy',104872,NULL,NULL,1,'/compta/paiement/cheque/liste.php?leftmenu=checks','','List','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled && $conf->banque->enabled',2,'2013-03-24 02:31:47'),(104875,'auguria',1,'','left','accountancy',104861,NULL,NULL,8,'/compta/facture/stats/index.php?leftmenu=customers_bills','','Statistics','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2013-03-24 02:31:47'),(105061,'auguria',1,'','left','accountancy',103167,NULL,NULL,3,'/commande/liste.php?leftmenu=orders&viewstatut=3','','MenuOrdersToBill','orders',0,'orders','$user->rights->commande->lire','$conf->commande->enabled',0,'2013-03-24 02:31:47'),(105161,'auguria',1,'','left','accountancy',103167,NULL,NULL,4,'/compta/dons/index.php?leftmenu=donations&mainmenu=accountancy','','Donations','donations',0,'donations','$user->rights->don->lire','$conf->don->enabled',2,'2013-03-24 02:31:47'),(105162,'auguria',1,'','left','accountancy',105161,NULL,NULL,0,'/compta/dons/fiche.php?leftmenu=donations&mainmenu=accountancy&action=create','','NewDonation','donations',1,'','$user->rights->don->creer','$conf->don->enabled && $leftmenu==\"donations\"',2,'2013-03-24 02:31:47'),(105163,'auguria',1,'','left','accountancy',105161,NULL,NULL,1,'/compta/dons/liste.php?leftmenu=donations&mainmenu=accountancy','','List','donations',1,'','$user->rights->don->lire','$conf->don->enabled && $leftmenu==\"donations\"',2,'2013-03-24 02:31:47'),(105261,'auguria',1,'','left','accountancy',103167,NULL,NULL,5,'/compta/deplacement/index.php?leftmenu=tripsandexpenses','','TripsAndExpenses','trips',0,'tripsandexpenses','$user->rights->deplacement->lire','$conf->deplacement->enabled',0,'2013-03-24 02:31:47'),(105262,'auguria',1,'','left','accountancy',105261,NULL,NULL,1,'/compta/deplacement/fiche.php?action=create&leftmenu=tripsandexpenses','','New','trips',1,'','$user->rights->deplacement->creer','$conf->deplacement->enabled && $leftmenu==\"tripsandexpenses\"',0,'2013-03-24 02:31:47'),(105263,'auguria',1,'','left','accountancy',105261,NULL,NULL,2,'/compta/deplacement/list.php?leftmenu=tripsandexpenses','','List','trips',1,'','$user->rights->deplacement->lire','$conf->deplacement->enabled && $leftmenu==\"tripsandexpenses\"',0,'2013-03-24 02:31:47'),(105264,'auguria',1,'','left','accountancy',105261,NULL,NULL,2,'/compta/deplacement/stats/index.php?leftmenu=tripsandexpenses','','Statistics','trips',1,'','$user->rights->deplacement->lire','$conf->deplacement->enabled && $leftmenu==\"tripsandexpenses\"',0,'2013-03-24 02:31:47'),(105361,'auguria',1,'','left','accountancy',103167,NULL,NULL,6,'/compta/charges/index.php?leftmenu=tax&mainmenu=accountancy','','MenuTaxAndDividends','compta',0,'tax','$user->rights->tax->charges->lire','$conf->tax->enabled',0,'2013-03-24 02:31:47'),(105362,'auguria',1,'','left','accountancy',105361,NULL,NULL,1,'/compta/sociales/index.php?leftmenu=tax_social','','SocialContributions','',1,'tax_social','$user->rights->tax->charges->lire','$conf->tax->enabled',0,'2013-03-24 02:31:47'),(105363,'auguria',1,'','left','accountancy',105362,NULL,NULL,2,'/compta/sociales/charges.php?leftmenu=tax_social&action=create','','MenuNewSocialContribution','',2,'','$user->rights->tax->charges->creer','$conf->tax->enabled && $leftmenu==\"tax_social\"',0,'2013-03-24 02:31:47'),(105364,'auguria',1,'','left','accountancy',105362,NULL,NULL,3,'/compta/charges/index.php?leftmenu=tax_social&mainmenu=accountancy&mode=sconly','','Payments','',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && $leftmenu==\"tax_social\"',0,'2013-03-24 02:31:47'),(105461,'auguria',1,'','left','accountancy',105361,NULL,NULL,7,'/compta/tva/index.php?leftmenu=tax_vat&mainmenu=accountancy','','VAT','companies',1,'tax_vat','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS)',0,'2013-03-24 02:31:47'),(105462,'auguria',1,'','left','accountancy',105461,NULL,NULL,0,'/compta/tva/fiche.php?leftmenu=tax_vat&action=create','','NewPayment','companies',2,'','$user->rights->tax->charges->creer','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2013-03-24 02:31:47'),(105463,'auguria',1,'','left','accountancy',105461,NULL,NULL,1,'/compta/tva/reglement.php?leftmenu=tax_vat','','Payments','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2013-03-24 02:31:47'),(105464,'auguria',1,'','left','accountancy',105461,NULL,NULL,2,'/compta/tva/clients.php?leftmenu=tax_vat','','ReportByCustomers','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2013-03-24 02:31:47'),(105465,'auguria',1,'','left','accountancy',105461,NULL,NULL,3,'/compta/tva/quadri_detail.php?leftmenu=tax_vat','','ReportByQuarter','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2013-03-24 02:31:47'),(105561,'auguria',1,'','left','accountancy',103167,NULL,NULL,8,'/compta/ventilation/index.php?leftmenu=ventil','','Ventilation','companies',0,'ventil','$user->rights->compta->ventilation->lire','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-03-24 02:31:47'),(105562,'auguria',1,'','left','accountancy',105561,NULL,NULL,0,'/compta/ventilation/liste.php','','ToDispatch','companies',1,'','$user->rights->compta->ventilation->lire','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-03-24 02:31:47'),(105563,'auguria',1,'','left','accountancy',105561,NULL,NULL,1,'/compta/ventilation/lignes.php','','Dispatched','companies',1,'','$user->rights->compta->ventilation->lire','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-03-24 02:31:47'),(105564,'auguria',1,'','left','accountancy',105561,NULL,NULL,2,'/compta/param/','','Setup','companies',1,'','$user->rights->compta->ventilation->parametrer','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-03-24 02:31:47'),(105565,'auguria',1,'','left','accountancy',105564,NULL,NULL,0,'/compta/param/comptes/liste.php','','List','companies',2,'','$user->rights->compta->ventilation->parametrer','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-03-24 02:31:47'),(105566,'auguria',1,'','left','accountancy',105564,NULL,NULL,1,'/compta/param/comptes/fiche.php?action=create','','New','companies',2,'','$user->rights->compta->ventilation->parametrer','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-03-24 02:31:47'),(105567,'auguria',1,'','left','accountancy',105561,NULL,NULL,3,'/compta/export/','','Export','companies',1,'','$user->rights->compta->ventilation->lire','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-03-24 02:31:47'),(105568,'auguria',1,'','left','accountancy',105567,NULL,NULL,0,'/compta/export/index.php','','New','companies',2,'','$user->rights->compta->ventilation->lire','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-03-24 02:31:47'),(105569,'auguria',1,'','left','accountancy',105567,NULL,NULL,1,'/compta/export/liste.php','','List','companies',2,'','$user->rights->compta->ventilation->lire','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-03-24 02:31:47'),(105661,'auguria',1,'','left','accountancy',103175,NULL,NULL,9,'/compta/prelevement/index.php?leftmenu=withdraw&mainmenu=bank','','StandingOrders','withdrawals',0,'withdraw','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled',2,'2013-03-24 02:31:47'),(105663,'auguria',1,'','left','accountancy',105661,NULL,NULL,0,'/compta/prelevement/create.php?leftmenu=withdraw','','NewStandingOrder','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2013-03-24 02:31:47'),(105664,'auguria',1,'','left','accountancy',105661,NULL,NULL,2,'/compta/prelevement/bons.php?leftmenu=withdraw','','WithdrawalsReceipts','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2013-03-24 02:31:47'),(105665,'auguria',1,'','left','accountancy',105661,NULL,NULL,3,'/compta/prelevement/liste.php?leftmenu=withdraw','','WithdrawalsLines','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2013-03-24 02:31:47'),(105667,'auguria',1,'','left','accountancy',105661,NULL,NULL,5,'/compta/prelevement/rejets.php?leftmenu=withdraw','','Rejects','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2013-03-24 02:31:47'),(105668,'auguria',1,'','left','accountancy',105661,NULL,NULL,6,'/compta/prelevement/stats.php?leftmenu=withdraw','','Statistics','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2013-03-24 02:31:47'),(105761,'auguria',1,'','left','accountancy',103175,NULL,NULL,1,'/compta/bank/index.php?leftmenu=bank&mainmenu=bank','','MenuBankCash','banks',0,'bank','$user->rights->banque->lire','$conf->banque->enabled',0,'2013-03-24 02:31:47'),(105762,'auguria',1,'','left','accountancy',105761,NULL,NULL,0,'/compta/bank/fiche.php?action=create&leftmenu=bank','','MenuNewFinancialAccount','banks',1,'','$user->rights->banque->configurer','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2013-03-24 02:31:47'),(105763,'auguria',1,'','left','accountancy',105761,NULL,NULL,1,'/compta/bank/categ.php?leftmenu=bank','','Rubriques','categories',1,'','$user->rights->banque->configurer','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2013-03-24 02:31:47'),(105764,'auguria',1,'','left','accountancy',105761,NULL,NULL,2,'/compta/bank/search.php?leftmenu=bank','','ListTransactions','banks',1,'','$user->rights->banque->lire','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2013-03-24 02:31:47'),(105765,'auguria',1,'','left','accountancy',105761,NULL,NULL,3,'/compta/bank/budget.php?leftmenu=bank','','ListTransactionsByCategory','banks',1,'','$user->rights->banque->lire','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2013-03-24 02:31:47'),(105767,'auguria',1,'','left','accountancy',105761,NULL,NULL,5,'/compta/bank/virement.php?leftmenu=bank','','BankTransfers','banks',1,'','$user->rights->banque->transfer','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2013-03-24 02:31:47'),(105861,'auguria',1,'','left','accountancy',103167,NULL,NULL,11,'/compta/resultat/index.php?leftmenu=ca&mainmenu=accountancy','','Reportings','main',0,'ca','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2013-03-24 02:31:47'),(105862,'auguria',1,'','left','accountancy',105861,NULL,NULL,0,'/compta/resultat/index.php?leftmenu=ca','','ReportInOut','main',1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2013-03-24 02:31:47'),(105863,'auguria',1,'','left','accountancy',105862,NULL,NULL,0,'/compta/resultat/clientfourn.php?leftmenu=ca','','ByCompanies','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2013-03-24 02:31:47'),(105864,'auguria',1,'','left','accountancy',105861,NULL,NULL,1,'/compta/stats/index.php?leftmenu=ca','','ReportTurnover','main',1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2013-03-24 02:31:47'),(105865,'auguria',1,'','left','accountancy',105864,NULL,NULL,0,'/compta/stats/casoc.php?leftmenu=ca','','ByCompanies','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2013-03-24 02:31:47'),(105866,'auguria',1,'','left','accountancy',105864,NULL,NULL,1,'/compta/stats/cabyuser.php?leftmenu=ca','','ByUsers','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2013-03-24 02:31:47'),(105867,'auguria',1,'','left','accountancy',105861,NULL,NULL,1,'/compta/journal/sellsjournal.php?leftmenu=ca','','SellsJournal','main',1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2013-03-24 02:31:47'),(105868,'auguria',1,'','left','accountancy',105861,NULL,NULL,1,'/compta/journal/purchasesjournal.php?leftmenu=ca','','PurchasesJournal','main',1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2013-03-24 02:31:47'),(105961,'auguria',1,'','left','products',103164,NULL,NULL,0,'/product/index.php?leftmenu=product&type=0','','Products','products',0,'product','$user->rights->produit->lire','$conf->product->enabled',2,'2013-03-24 02:31:47'),(105962,'auguria',1,'','left','products',105961,NULL,NULL,0,'/product/fiche.php?leftmenu=product&action=create&type=0','','NewProduct','products',1,'','$user->rights->produit->creer','$conf->product->enabled',2,'2013-03-24 02:31:47'),(105963,'auguria',1,'','left','products',105961,NULL,NULL,1,'/product/liste.php?leftmenu=product&type=0','','List','products',1,'','$user->rights->produit->lire','$conf->product->enabled',2,'2013-03-24 02:31:47'),(105964,'auguria',1,'','left','products',105961,NULL,NULL,4,'/product/reassort.php?type=0','','Stocks','products',1,'','$user->rights->produit->lire && $user->rights->stock->lire','$conf->product->enabled',2,'2013-03-24 02:31:47'),(105965,'auguria',1,'','left','products',105961,NULL,NULL,5,'/product/popuprop.php?leftmenu=stats&type=0','','Statistics','main',1,'','$user->rights->produit->lire','$conf->propal->enabled',2,'2013-03-24 02:31:47'),(106061,'auguria',1,'','left','products',103164,NULL,NULL,1,'/product/index.php?leftmenu=service&type=1','','Services','products',0,'service','$user->rights->service->lire','$conf->service->enabled',2,'2013-03-24 02:31:47'),(106062,'auguria',1,'','left','products',106061,NULL,NULL,0,'/product/fiche.php?leftmenu=service&action=create&type=1','','NewService','products',1,'','$user->rights->service->creer','$conf->service->enabled',2,'2013-03-24 02:31:47'),(106063,'auguria',1,'','left','products',106061,NULL,NULL,1,'/product/liste.php?leftmenu=service&type=1','','List','products',1,'','$user->rights->service->lire','$conf->service->enabled',2,'2013-03-24 02:31:47'),(106064,'auguria',1,'','left','products',106061,NULL,NULL,5,'/product/popuprop.php?leftmenu=stats&type=1','','Statistics','main',1,'','$user->rights->service->lire','$conf->propal->enabled',2,'2013-03-24 02:31:47'),(106261,'auguria',1,'','left','products',103164,NULL,NULL,3,'/product/stock/index.php?leftmenu=stock','','Stock','stocks',0,'stock','$user->rights->stock->lire','$conf->stock->enabled',2,'2013-03-24 02:31:47'),(106262,'auguria',1,'','left','products',106261,NULL,NULL,0,'/product/stock/fiche.php?action=create','','MenuNewWarehouse','stocks',1,'','$user->rights->stock->creer','$conf->stock->enabled',2,'2013-03-24 02:31:47'),(106263,'auguria',1,'','left','products',106261,NULL,NULL,1,'/product/stock/liste.php','','List','stocks',1,'','$user->rights->stock->lire','$conf->stock->enabled',2,'2013-03-24 02:31:47'),(106264,'auguria',1,'','left','products',106261,NULL,NULL,2,'/product/stock/valo.php','','EnhancedValue','stocks',1,'','$user->rights->stock->lire','$conf->stock->enabled',2,'2013-03-24 02:31:47'),(106265,'auguria',1,'','left','products',106261,NULL,NULL,3,'/product/stock/mouvement.php','','Movements','stocks',1,'','$user->rights->stock->mouvement->lire','$conf->stock->enabled',2,'2013-03-24 02:31:47'),(106361,'auguria',1,'','left','products',103164,NULL,NULL,4,'/categories/index.php?leftmenu=cat&type=0','','Categories','categories',0,'cat','$user->rights->categorie->lire','$conf->categorie->enabled',2,'2013-03-24 02:31:47'),(106362,'auguria',1,'','left','products',106361,NULL,NULL,0,'/categories/fiche.php?action=create&type=0','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->categorie->enabled',2,'2013-03-24 02:31:47'),(106761,'auguria',1,'','left','project',103168,NULL,NULL,0,'/projet/index.php?leftmenu=projects','','Projects','projects',0,'projects','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-03-24 02:31:47'),(106762,'auguria',1,'','left','project',106761,NULL,NULL,1,'/projet/fiche.php?leftmenu=projects&action=create','','NewProject','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled',2,'2013-03-24 02:31:47'),(106763,'auguria',1,'','left','project',106761,NULL,NULL,2,'/projet/liste.php?leftmenu=projects','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-03-24 02:31:47'),(106771,'auguria',1,'','left','project',103168,NULL,NULL,0,'/projet/index.php?leftmenu=projects&mode=mine','','MyProjects','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-03-24 02:31:47'),(106772,'auguria',1,'','left','project',106771,NULL,NULL,1,'/projet/fiche.php?leftmenu=projects&action=create&mode=mine','','NewProject','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled',2,'2013-03-24 02:31:47'),(106773,'auguria',1,'','left','project',106771,NULL,NULL,2,'/projet/liste.php?leftmenu=projects&mode=mine','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-03-24 02:31:47'),(106861,'auguria',1,'','left','project',103168,NULL,NULL,0,'/projet/activity/index.php?leftmenu=projects','','Activities','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-03-24 02:31:47'),(106862,'auguria',1,'','left','project',106861,NULL,NULL,1,'/projet/tasks.php?leftmenu=projects&action=create','','NewTask','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled',2,'2013-03-24 02:31:47'),(106863,'auguria',1,'','left','project',106861,NULL,NULL,2,'/projet/tasks/index.php?leftmenu=projects','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-03-24 02:31:47'),(106864,'auguria',1,'','left','project',106861,NULL,NULL,3,'/projet/activity/list.php?leftmenu=projects','','NewTimeSpent','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-03-24 02:31:47'),(106961,'auguria',1,'','left','project',103168,NULL,NULL,0,'/projet/activity/index.php?leftmenu=projects&mode=mine','','MyActivities','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-03-24 02:31:47'),(106962,'auguria',1,'','left','project',106961,NULL,NULL,1,'/projet/tasks.php?leftmenu=projects&action=create&mode=mine','','NewTask','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled',2,'2013-03-24 02:31:47'),(106963,'auguria',1,'','left','project',106961,NULL,NULL,2,'/projet/tasks/index.php?leftmenu=projects&mode=mine','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-03-24 02:31:47'),(106964,'auguria',1,'','left','project',106961,NULL,NULL,3,'/projet/activity/list.php?leftmenu=projects&mode=mine','','NewTimeSpent','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-03-24 02:31:47'),(107061,'auguria',1,'','left','tools',103169,NULL,NULL,0,'/comm/mailing/index.php?leftmenu=mailing','','EMailings','mails',0,'mailing','$user->rights->mailing->lire','$conf->mailing->enabled',0,'2013-03-24 02:31:47'),(107062,'auguria',1,'','left','tools',107061,NULL,NULL,0,'/comm/mailing/fiche.php?leftmenu=mailing&action=create','','NewMailing','mails',1,'','$user->rights->mailing->creer','$conf->mailing->enabled',0,'2013-03-24 02:31:47'),(107063,'auguria',1,'','left','tools',107061,NULL,NULL,1,'/comm/mailing/liste.php?leftmenu=mailing','','List','mails',1,'','$user->rights->mailing->lire','$conf->mailing->enabled',0,'2013-03-24 02:31:47'),(107261,'auguria',1,'','left','tools',103169,NULL,NULL,2,'/exports/index.php?leftmenu=export','','FormatedExport','exports',0,'export','$user->rights->export->lire','$conf->export->enabled',2,'2013-03-24 02:31:47'),(107262,'auguria',1,'','left','tools',107261,NULL,NULL,0,'/exports/export.php?leftmenu=export','','NewExport','exports',1,'','$user->rights->export->creer','$conf->export->enabled',2,'2013-03-24 02:31:47'),(107291,'auguria',1,'','left','tools',103169,NULL,NULL,2,'/imports/index.php?leftmenu=import','','FormatedImport','exports',0,'import','$user->rights->import->run','$conf->import->enabled',2,'2013-03-24 02:31:47'),(107292,'auguria',1,'','left','tools',107291,NULL,NULL,0,'/imports/import.php?leftmenu=import','','NewImport','exports',1,'','$user->rights->import->run','$conf->import->enabled',2,'2013-03-24 02:31:47'),(107361,'auguria',1,'','left','members',103174,NULL,NULL,0,'/adherents/index.php?leftmenu=members&mainmenu=members','','Members','members',0,'members','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-03-24 02:31:48'),(107362,'auguria',1,'','left','members',107361,NULL,NULL,0,'/adherents/fiche.php?leftmenu=members&action=create','','NewMember','members',1,'','$user->rights->adherent->creer','$conf->adherent->enabled',2,'2013-03-24 02:31:48'),(107363,'auguria',1,'','left','members',107361,NULL,NULL,1,'/adherents/liste.php','','List','members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-03-24 02:31:48'),(107364,'auguria',1,'','left','members',107363,NULL,NULL,2,'/adherents/liste.php?leftmenu=members&statut=-1','','MenuMembersToValidate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-03-24 02:31:48'),(107365,'auguria',1,'','left','members',107363,NULL,NULL,3,'/adherents/liste.php?leftmenu=members&statut=1','','MenuMembersValidated','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-03-24 02:31:48'),(107366,'auguria',1,'','left','members',107363,NULL,NULL,4,'/adherents/liste.php?leftmenu=members&statut=1&filter=outofdate','','MenuMembersNotUpToDate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-03-24 02:31:48'),(107367,'auguria',1,'','left','members',107363,NULL,NULL,5,'/adherents/liste.php?leftmenu=members&statut=1&filter=uptodate','','MenuMembersUpToDate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-03-24 02:31:48'),(107368,'auguria',1,'','left','members',107363,NULL,NULL,6,'/adherents/liste.php?leftmenu=members&statut=0','','MenuMembersResiliated','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-03-24 02:31:48'),(107369,'auguria',1,'','left','members',107361,NULL,NULL,7,'/adherents/stats/geo.php?leftmenu=members&mode=memberbycountry','','MenuMembersStats','members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-03-24 02:31:48'),(107461,'auguria',1,'','left','members',103174,NULL,NULL,1,'/adherents/index.php?leftmenu=members&mainmenu=members','','Subscriptions','compta',0,'','$user->rights->adherent->cotisation->lire','$conf->adherent->enabled',2,'2013-03-24 02:31:48'),(107462,'auguria',1,'','left','members',107461,NULL,NULL,0,'/adherents/liste.php?statut=-1&leftmenu=accountancy&mainmenu=members','','NewSubscription','compta',1,'','$user->rights->adherent->cotisation->creer','$conf->adherent->enabled',2,'2013-03-24 02:31:48'),(107463,'auguria',1,'','left','members',107461,NULL,NULL,1,'/adherents/cotisations.php?leftmenu=members','','List','compta',1,'','$user->rights->adherent->cotisation->lire','$conf->adherent->enabled',2,'2013-03-24 02:31:48'),(107464,'auguria',1,'','left','members',107461,NULL,NULL,7,'/adherents/stats/index.php?leftmenu=members','','MenuMembersStats','members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-03-24 02:31:48'),(107661,'auguria',1,'','left','members',103174,NULL,NULL,3,'/adherents/index.php?leftmenu=export&mainmenu=members','','Exports','members',0,'export','$user->rights->adherent->export','$conf->adherent->enabled',2,'2013-03-24 02:31:48'),(107662,'auguria',1,'','left','members',107661,NULL,NULL,0,'/exports/index.php?leftmenu=export','','Datas','members',1,'','$user->rights->adherent->export','$conf->adherent->enabled && $conf->export->enabled',2,'2013-03-24 02:31:48'),(107663,'auguria',1,'','left','members',107661,NULL,NULL,1,'/adherents/htpasswd.php?leftmenu=export','','Filehtpasswd','members',1,'','$user->rights->adherent->export','$conf->adherent->enabled',2,'2013-03-24 02:31:48'),(107664,'auguria',1,'','left','members',107661,NULL,NULL,2,'/adherents/cartes/carte.php?leftmenu=export','','MembersCards','members',1,'','$user->rights->adherent->export','$conf->adherent->enabled',2,'2013-03-24 02:31:48'),(107861,'auguria',1,'','left','members',103174,NULL,NULL,5,'/adherents/type.php?leftmenu=setup&mainmenu=members','','MembersTypes','members',0,'setup','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2013-03-24 02:31:48'),(107862,'auguria',1,'','left','members',107861,NULL,NULL,0,'/adherents/type.php?leftmenu=setup&mainmenu=members&action=create','','New','members',1,'','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2013-03-24 02:31:48'),(107863,'auguria',1,'','left','members',107861,NULL,NULL,1,'/adherents/type.php?leftmenu=setup&mainmenu=members','','List','members',1,'','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2013-03-24 02:31:48'),(108261,'auguria',1,'','left','commercial',103166,NULL,NULL,6,'/fourn/commande/index.php?leftmenu=orders_suppliers','','SuppliersOrders','orders',0,'orders_suppliers','$user->rights->fournisseur->commande->lire','$conf->fournisseur->enabled',2,'2013-03-24 02:31:47'),(108262,'auguria',1,'','left','commercial',108261,NULL,NULL,0,'/societe/societe.php?leftmenu=orders_suppliers','','NewOrder','orders',1,'','$user->rights->fournisseur->commande->creer','$conf->fournisseur->enabled',2,'2013-03-24 02:31:47'),(108263,'auguria',1,'','left','commercial',108261,NULL,NULL,1,'/fourn/commande/liste.php?leftmenu=orders_suppliers&viewstatut=0','','List','orders',1,'','$user->rights->fournisseur->commande->lire','$conf->fournisseur->enabled',2,'2013-03-24 02:31:47'),(108269,'auguria',1,'','left','commercial',108261,NULL,NULL,7,'/commande/stats/index.php?leftmenu=orders_suppliers&mode=supplier','','Statistics','orders',1,'','$user->rights->fournisseur->commande->lire','$conf->fournisseur->enabled',2,'2013-03-24 02:31:47'),(108361,'auguria',1,'','left','members',103174,NULL,NULL,3,'/categories/index.php?leftmenu=cat&type=3','','MembersCategoriesShort','categories',0,'cat','$user->rights->categorie->lire','$conf->adherent->enabled && $conf->categorie->enabled',2,'2013-03-24 02:31:48'),(108362,'auguria',1,'','left','members',108361,NULL,NULL,0,'/categories/fiche.php?action=create&type=3','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->adherent->enabled && $conf->categorie->enabled',2,'2013-03-24 02:31:48'),(108363,'all',1,'opensurvey','top','opensurvey',0,NULL,NULL,200,'/opensurvey/index.php','','Surveys','opensurvey@opensurvey',NULL,NULL,'$user->rights->opensurvey->survey->read','$conf->opensurvey->enabled',0,'2013-03-24 02:57:18'),(108364,'all',1,'opensurvey','left','opensurvey',-1,NULL,'opensurvey',200,'/opensurvey/index.php?mainmenu=opensurvey&leftmenu=opensurvey','','Survey','opensurvey@opensurvey',NULL,'opensurvey','','$conf->opensurvey->enabled',0,'2013-03-24 02:57:18'),(108365,'all',1,'opensurvey','left','opensurvey',-1,'opensurvey','opensurvey',210,'/opensurvey/public/index.php?origin=dolibarr','_blank','NewSurvey','opensurvey@opensurvey',NULL,'opensurvey_new','','$conf->opensurvey->enabled',0,'2013-03-24 02:57:18'),(108366,'all',1,'opensurvey','left','opensurvey',-1,'opensurvey','opensurvey',220,'/opensurvey/list.php','','List','opensurvey@opensurvey',NULL,'opensurvey_list','','$conf->opensurvey->enabled',0,'2013-03-24 02:57:18'),(108421,'all',1,'agenda','top','agenda',0,NULL,NULL,100,'/comm/action/index.php','','Agenda','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-11-07 01:19:05'),(108422,'all',1,'agenda','left','agenda',108421,NULL,NULL,100,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Actions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-11-07 01:19:05'),(108423,'all',1,'agenda','left','agenda',108422,NULL,NULL,101,'/comm/action/fiche.php?mainmenu=agenda&leftmenu=agenda&action=create','','NewAction','commercial',NULL,NULL,'($user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create)','$conf->agenda->enabled',2,'2013-11-07 01:19:05'),(108424,'all',1,'agenda','left','agenda',108422,NULL,NULL,102,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Calendar','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-11-07 01:19:05'),(108425,'all',1,'agenda','left','agenda',108424,NULL,NULL,103,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-11-07 01:19:05'),(108426,'all',1,'agenda','left','agenda',108424,NULL,NULL,104,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-11-07 01:19:05'),(108427,'all',1,'agenda','left','agenda',108424,NULL,NULL,105,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2013-11-07 01:19:05'),(108428,'all',1,'agenda','left','agenda',108424,NULL,NULL,106,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2013-11-07 01:19:05'),(108429,'all',1,'agenda','left','agenda',108422,NULL,NULL,112,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda','','List','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-11-07 01:19:05'),(108430,'all',1,'agenda','left','agenda',108429,NULL,NULL,113,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-11-07 01:19:05'),(108431,'all',1,'agenda','left','agenda',108429,NULL,NULL,114,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-11-07 01:19:05'),(108432,'all',1,'agenda','left','agenda',108429,NULL,NULL,115,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2013-11-07 01:19:05'),(108433,'all',1,'agenda','left','agenda',108429,NULL,NULL,116,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2013-11-07 01:19:05'),(108434,'all',1,'agenda','left','agenda',108422,NULL,NULL,120,'/comm/action/rapport/index.php?mainmenu=agenda&leftmenu=agenda','','Reportings','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$conf->agenda->enabled',2,'2013-11-07 01:19:05'),(108435,'all',1,'ecm','top','ecm',0,NULL,NULL,100,'/ecm/index.php','','MenuECM','ecm',NULL,NULL,'$user->rights->ecm->read || $user->rights->ecm->upload || $user->rights->ecm->setup','$conf->ecm->enabled',2,'2013-11-07 01:19:06'),(108436,'all',1,'ecm','left','ecm',108435,NULL,NULL,101,'/ecm/index.php','','ECMArea','ecm',NULL,NULL,'$user->rights->ecm->read || $user->rights->ecm->upload','$user->rights->ecm->read || $user->rights->ecm->upload',2,'2013-11-07 01:19:06'),(108437,'all',1,'ecm','left','ecm',108436,NULL,NULL,100,'/ecm/docdir.php?action=create','','ECMNewSection','ecm',NULL,NULL,'$user->rights->ecm->setup','$user->rights->ecm->setup',2,'2013-11-07 01:19:06'),(108438,'all',1,'ecm','left','ecm',108436,NULL,NULL,102,'/ecm/index.php?action=file_manager','','ECMFileManager','ecm',NULL,NULL,'$user->rights->ecm->read || $user->rights->ecm->upload','$user->rights->ecm->read || $user->rights->ecm->upload',2,'2013-11-07 01:19:06'); +INSERT INTO `llx_menu` VALUES (19289,'all',1,'cashdesk','top','cashdesk',0,NULL,NULL,100,'/cashdesk/index.php?user=__LOGIN__','pointofsale','CashDeskMenu','cashdesk',NULL,NULL,'1','$conf->cashdesk->enabled',0,'2012-12-08 13:11:09'),(87303,'all',1,'filemanager','top','filemanager',0,NULL,NULL,100,'/filemanager/index.php','','FileManager','filemanager@filemanager',NULL,NULL,'$user->rights->filemanager->read','$conf->filemanager->enabled',2,'2013-01-02 20:33:20'),(87422,'smartphone',1,NULL,'top','home',0,NULL,NULL,1,'/index.php?mainmenu=home&leftmenu=','','Home','',-1,'','','1',2,'2013-02-24 18:29:15'),(87423,'smartphone',1,NULL,'top','companies',0,NULL,NULL,2,'/societe/index.php?mainmenu=companies&leftmenu=','','ThirdParties','companies',-1,'','$user->rights->societe->lire || $user->rights->societe->contact->lire','$conf->societe->enabled || $conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(87424,'smartphone',1,NULL,'top','products',0,NULL,NULL,3,'/product/index.php?mainmenu=products&leftmenu=','','Products/Services','products',-1,'','$user->rights->produit->lire||$user->rights->service->lire','$conf->product->enabled || $conf->service->enabled',0,'2013-02-24 18:29:15'),(87426,'smartphone',1,NULL,'top','commercial',0,NULL,NULL,5,'/comm/index.php?mainmenu=commercial&leftmenu=','','Commercial','commercial',-1,'','$user->rights->societe->lire || $user->rights->societe->contact->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(87427,'smartphone',1,NULL,'top','accountancy',0,NULL,NULL,6,'/compta/index.php?mainmenu=accountancy&leftmenu=','','MenuFinancial','compta',-1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->plancompte->lire || $user->rights->commande->lire || $user->rights->facture->lire','$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->facture->enabled || $conf->deplacement->enabled || $conf->don->enabled',2,'2013-02-24 18:29:15'),(87428,'smartphone',1,NULL,'top','project',0,NULL,NULL,7,'/projet/index.php?mainmenu=project&leftmenu=','','Projects','projects',-1,'','$user->rights->projet->lire','$conf->projet->enabled',0,'2013-02-24 18:29:15'),(87429,'smartphone',1,NULL,'top','tools',0,NULL,NULL,8,'/core/tools.php?mainmenu=tools&leftmenu=','','Tools','other',-1,'','$user->rights->mailing->lire || $user->rights->export->lire || $user->rights->import->run','$conf->mailing->enabled || $conf->export->enabled || $conf->import->enabled',2,'2013-02-24 18:29:15'),(87432,'smartphone',1,NULL,'top','shop',0,NULL,NULL,11,'/boutique/index.php?mainmenu=shop&leftmenu=','','OSCommerce','shop',-1,'','','! empty($conf->boutique->enabled)',0,'2013-02-24 18:29:15'),(87434,'smartphone',1,NULL,'top','members',0,NULL,NULL,15,'/adherents/index.php?mainmenu=members&leftmenu=','','Members','members',-1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(87435,'smartphone',1,NULL,'top','bank',0,NULL,NULL,6,'/compta/bank/index.php?mainmenu=bank&leftmenu=bank','','MenuBankCash','banks',-1,'','$user->rights->banque->lire || $user->rights->prelevement->bons->lire','$conf->banque->enabled || $conf->prelevement->enabled',2,'2013-02-24 18:29:15'),(87521,'smartphone',1,NULL,'left','home',87422,NULL,NULL,0,'/admin/index.php?leftmenu=setup','','Setup','admin',0,'','','$user->admin',2,'2013-02-24 18:29:15'),(87522,'smartphone',1,NULL,'left','home',87521,NULL,NULL,1,'/admin/company.php?leftmenu=setup','','MenuCompanySetup','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87523,'smartphone',1,NULL,'left','home',87521,NULL,NULL,4,'/admin/ihm.php?leftmenu=setup','','GUISetup','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87524,'smartphone',1,NULL,'left','home',87521,NULL,NULL,2,'/admin/modules.php?leftmenu=setup','','Modules','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87525,'smartphone',1,NULL,'left','home',87521,NULL,NULL,5,'/admin/boxes.php?leftmenu=setup','','Boxes','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87526,'smartphone',1,NULL,'left','home',87521,NULL,NULL,3,'/admin/menus.php?leftmenu=setup','','Menus','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87527,'smartphone',1,NULL,'left','home',87521,NULL,NULL,6,'/admin/delais.php?leftmenu=setup','','Alerts','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87529,'smartphone',1,NULL,'left','home',87521,NULL,NULL,7,'/admin/perms.php?leftmenu=setup','','Security','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87530,'smartphone',1,NULL,'left','home',87521,NULL,NULL,9,'/admin/mails.php?leftmenu=setup','','Emails','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87531,'smartphone',1,NULL,'left','home',87521,NULL,NULL,8,'/admin/limits.php?leftmenu=setup','','MenuLimits','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87532,'smartphone',1,NULL,'left','home',87521,NULL,NULL,10,'/admin/dict.php?leftmenu=setup','','DictionnarySetup','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87533,'smartphone',1,NULL,'left','home',87521,NULL,NULL,11,'/admin/const.php?leftmenu=setup','','OtherSetup','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87621,'smartphone',1,NULL,'left','home',87422,NULL,NULL,1,'/admin/system/index.php?leftmenu=system','','SystemInfo','admin',0,'','','$user->admin',2,'2013-02-24 18:29:15'),(87622,'smartphone',1,NULL,'left','home',87621,NULL,NULL,0,'/admin/system/dolibarr.php?leftmenu=system','','Dolibarr','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87623,'smartphone',1,NULL,'left','home',87622,NULL,NULL,1,'/admin/system/constall.php?leftmenu=system','','AllParameters','admin',2,'','','1',2,'2013-02-24 18:29:15'),(87624,'smartphone',1,NULL,'left','home',87622,NULL,NULL,4,'/admin/system/about.php?leftmenu=system','','About','admin',2,'','','1',2,'2013-02-24 18:29:15'),(87625,'smartphone',1,NULL,'left','home',87621,NULL,NULL,1,'/admin/system/os.php?leftmenu=system','','OS','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87626,'smartphone',1,NULL,'left','home',87621,NULL,NULL,2,'/admin/system/web.php?leftmenu=system','','WebServer','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87627,'smartphone',1,NULL,'left','home',87621,NULL,NULL,3,'/admin/system/phpinfo.php?leftmenu=system','','Php','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87628,'smartphone',1,NULL,'left','home',87622,NULL,NULL,3,'/admin/triggers.php?leftmenu=system','','Triggers','admin',2,'','','1',2,'2013-02-24 18:29:15'),(87629,'smartphone',1,NULL,'left','home',87622,NULL,NULL,2,'/admin/system/modules.php?leftmenu=system','','Modules','admin',2,'','','1',2,'2013-02-24 18:29:15'),(87631,'smartphone',1,NULL,'left','home',87621,NULL,NULL,4,'/admin/system/database.php?leftmenu=system','','Database','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87632,'smartphone',1,NULL,'left','home',87631,NULL,NULL,0,'/admin/system/database-tables.php?leftmenu=system','','Tables','admin',2,'','','1',2,'2013-02-24 18:29:15'),(87721,'smartphone',1,NULL,'left','home',87422,NULL,NULL,2,'/admin/tools/index.php?leftmenu=admintools','','SystemTools','admin',0,'','','$user->admin',2,'2013-02-24 18:29:15'),(87722,'smartphone',1,NULL,'left','home',87721,NULL,NULL,0,'/admin/tools/dolibarr_export.php?leftmenu=admintools','','Backup','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87723,'smartphone',1,NULL,'left','home',87721,NULL,NULL,1,'/admin/tools/dolibarr_import.php?leftmenu=admintools','','Restore','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87724,'smartphone',1,NULL,'left','home',87721,NULL,NULL,6,'/admin/tools/purge.php?leftmenu=admintools','','Purge','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87725,'smartphone',1,NULL,'left','home',87721,NULL,NULL,3,'/admin/tools/eaccelerator.php?leftmenu=admintools','','EAccelerator','admin',1,'','','1 && function_exists(\'eaccelerator_info\')',2,'2013-02-24 18:29:15'),(87726,'smartphone',1,NULL,'left','home',87721,NULL,NULL,2,'/admin/tools/update.php?leftmenu=admintools','','MenuUpgrade','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87727,'smartphone',1,NULL,'left','home',87721,NULL,NULL,4,'/admin/tools/listevents.php?leftmenu=admintools','','Audit','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87728,'smartphone',1,NULL,'left','home',87721,NULL,NULL,7,'/support/index.php?leftmenu=admintools','_blank','HelpCenter','help',1,'','','1',2,'2013-02-24 18:29:15'),(87729,'smartphone',1,NULL,'left','home',87721,NULL,NULL,5,'/admin/tools/listsessions.php?leftmenu=admintools','','Sessions','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87821,'smartphone',1,NULL,'left','home',87422,NULL,NULL,3,'/user/home.php?leftmenu=users','','MenuUsersAndGroups','users',0,'','','1',2,'2013-02-24 18:29:15'),(87822,'smartphone',1,NULL,'left','home',87821,NULL,NULL,0,'/user/index.php?leftmenu=users','','Users','users',1,'','$user->rights->user->user->lire || $user->admin','1',2,'2013-02-24 18:29:15'),(87823,'smartphone',1,NULL,'left','home',87822,NULL,NULL,0,'/user/fiche.php?leftmenu=users&action=create','','NewUser','users',2,'','$user->rights->user->user->creer || $user->admin','1',2,'2013-02-24 18:29:15'),(87824,'smartphone',1,NULL,'left','home',87821,NULL,NULL,1,'/user/group/index.php?leftmenu=users','','Groups','users',1,'','($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->read:$user->rights->user->user->lire) || $user->admin','1',2,'2013-02-24 18:29:15'),(87825,'smartphone',1,NULL,'left','home',87824,NULL,NULL,0,'/user/group/fiche.php?leftmenu=users&action=create','','NewGroup','users',2,'','($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->write:$user->rights->user->user->creer) || $user->admin','1',2,'2013-02-24 18:29:15'),(87921,'smartphone',1,NULL,'left','companies',87423,NULL,NULL,0,'/societe/societe.php','','ThirdParty','companies',0,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(87922,'smartphone',1,NULL,'left','companies',87921,NULL,NULL,0,'/societe/soc.php?action=create','','MenuNewThirdParty','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(87924,'smartphone',1,NULL,'left','companies',87921,NULL,NULL,5,'/fourn/liste.php?leftmenu=suppliers','','ListSuppliersShort','suppliers',1,'','$user->rights->societe->lire && $user->rights->fournisseur->lire','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(87925,'smartphone',1,NULL,'left','companies',87924,NULL,NULL,0,'/societe/soc.php?leftmenu=supplier&action=create&type=f','','NewSupplier','suppliers',2,'','$user->rights->societe->creer','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(87927,'smartphone',1,NULL,'left','companies',87921,NULL,NULL,3,'/comm/prospect/list.php?leftmenu=prospects','','ListProspectsShort','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(87928,'smartphone',1,NULL,'left','companies',87927,NULL,NULL,0,'/societe/soc.php?leftmenu=prospects&action=create&type=p','','MenuNewProspect','companies',2,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(87930,'smartphone',1,NULL,'left','companies',87921,NULL,NULL,4,'/comm/list.php?leftmenu=customers','','ListCustomersShort','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(87931,'smartphone',1,NULL,'left','companies',87930,NULL,NULL,0,'/societe/soc.php?leftmenu=customers&action=create&type=c','','MenuNewCustomer','companies',2,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(88021,'smartphone',1,NULL,'left','companies',87423,NULL,NULL,1,'/contact/list.php?leftmenu=contacts','','ContactsAddresses||Contacts@$conf->global->SOCIETE_ADDRESSES_MANAGEMENT','companies',0,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(88022,'smartphone',1,NULL,'left','companies',88021,NULL,NULL,0,'/contact/fiche.php?leftmenu=contacts&action=create','','NewContactAddress||NewContact@$conf->global->SOCIETE_ADDRESSES_MANAGEMENT','companies',1,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(88023,'smartphone',1,NULL,'left','companies',88021,NULL,NULL,1,'/contact/list.php?leftmenu=contacts','','List','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(88025,'smartphone',1,NULL,'left','companies',88023,NULL,NULL,1,'/contact/list.php?leftmenu=contacts&type=p','','Prospects','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(88026,'smartphone',1,NULL,'left','companies',88023,NULL,NULL,2,'/contact/list.php?leftmenu=contacts&type=c','','Customers','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(88027,'smartphone',1,NULL,'left','companies',88023,NULL,NULL,3,'/contact/list.php?leftmenu=contacts&type=f','','Suppliers','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(88028,'smartphone',1,NULL,'left','companies',88023,NULL,NULL,4,'/contact/list.php?leftmenu=contacts&type=o','','Others','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(88071,'smartphone',1,NULL,'left','companies',87423,NULL,NULL,3,'/categories/index.php?leftmenu=cat&type=1','','SuppliersCategoriesShort','categories',0,'','$user->rights->categorie->lire','$conf->societe->enabled && $conf->categorie->enabled',2,'2013-02-24 18:29:15'),(88072,'smartphone',1,NULL,'left','companies',88071,NULL,NULL,0,'/categories/fiche.php?action=create&type=1','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->societe->enabled && $conf->categorie->enabled',2,'2013-02-24 18:29:15'),(88081,'smartphone',1,NULL,'left','companies',87423,NULL,NULL,4,'/categories/index.php?leftmenu=cat&type=2','','CustomersProspectsCategoriesShort','categories',0,'','$user->rights->categorie->lire','$conf->fournisseur->enabled && $conf->categorie->enabled',2,'2013-02-24 18:29:15'),(88082,'smartphone',1,NULL,'left','companies',88081,NULL,NULL,0,'/categories/fiche.php?action=create&type=2','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->fournisseur->enabled && $conf->categorie->enabled',2,'2013-02-24 18:29:15'),(88121,'smartphone',1,NULL,'left','commercial',87426,NULL,NULL,1,'/comm/prospect/index.php?leftmenu=prospects','','Prospects','companies',0,'','$user->rights->societe->lire','$conf->societe->enabled',0,'2013-02-24 18:29:15'),(88122,'smartphone',1,NULL,'left','commercial',88121,NULL,NULL,0,'/societe/soc.php?leftmenu=prospects&action=create&type=p','','MenuNewProspect','companies',1,'','$user->rights->societe->creer','$conf->societe->enabled',0,'2013-02-24 18:29:15'),(88123,'smartphone',1,NULL,'left','commercial',88121,NULL,NULL,1,'/comm/prospect/list.php?leftmenu=prospects','','List','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',0,'2013-02-24 18:29:15'),(88124,'smartphone',1,NULL,'left','commercial',88123,NULL,NULL,0,'/comm/prospect/list.php?sortfield=s.datec&sortorder=desc&begin=&stcomm=-1','','LastProspectDoNotContact','companies',2,'','$user->rights->societe->lire','$conf->societe->enabled && $leftmenu==\"prospects\"',0,'2013-02-24 18:29:15'),(88125,'smartphone',1,NULL,'left','commercial',88123,NULL,NULL,1,'/comm/prospect/list.php?sortfield=s.datec&sortorder=desc&begin=&stcomm=0','','LastProspectNeverContacted','companies',2,'','$user->rights->societe->lire','$conf->societe->enabled && $leftmenu==\"prospects\"',0,'2013-02-24 18:29:15'),(88126,'smartphone',1,NULL,'left','commercial',88123,NULL,NULL,2,'/comm/prospect/list.php?sortfield=s.datec&sortorder=desc&begin=&stcomm=1','','LastProspectToContact','companies',2,'','$user->rights->societe->lire','$conf->societe->enabled && $leftmenu==\"prospects\"',0,'2013-02-24 18:29:15'),(88127,'smartphone',1,NULL,'left','commercial',88123,NULL,NULL,3,'/comm/prospect/list.php?sortfield=s.datec&sortorder=desc&begin=&stcomm=2','','LastProspectContactInProcess','companies',2,'','$user->rights->societe->lire','$conf->societe->enabled && $leftmenu==\"prospects\"',0,'2013-02-24 18:29:15'),(88128,'smartphone',1,NULL,'left','commercial',88123,NULL,NULL,4,'/comm/prospect/list.php?sortfield=s.datec&sortorder=desc&begin=&stcomm=3','','LastProspectContactDone','companies',2,'','$user->rights->societe->lire','$conf->societe->enabled && $leftmenu==\"prospects\"',0,'2013-02-24 18:29:15'),(88129,'smartphone',1,NULL,'left','commercial',88121,NULL,NULL,2,'/contact/list.php?leftmenu=prospects&type=p','','Contacts','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',0,'2013-02-24 18:29:15'),(88221,'smartphone',1,NULL,'left','commercial',87426,NULL,NULL,2,'/comm/index.php?leftmenu=customers','','Customers','companies',0,'','$user->rights->societe->lire','$conf->societe->enabled',0,'2013-02-24 18:29:15'),(88222,'smartphone',1,NULL,'left','commercial',88221,NULL,NULL,0,'/societe/soc.php?leftmenu=customers&action=create&type=c','','MenuNewCustomer','companies',1,'','$user->rights->societe->creer','$conf->societe->enabled',0,'2013-02-24 18:29:15'),(88223,'smartphone',1,NULL,'left','commercial',88221,NULL,NULL,1,'/comm/list.php?leftmenu=customers','','List','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',0,'2013-02-24 18:29:15'),(88224,'smartphone',1,NULL,'left','commercial',88221,NULL,NULL,2,'/contact/list.php?leftmenu=customers&type=c','','Contacts','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',0,'2013-02-24 18:29:15'),(88321,'smartphone',1,NULL,'left','commercial',87426,NULL,NULL,3,'/contact/list.php?leftmenu=contacts','','Contacts','companies',0,'','$user->rights->societe->lire','$conf->societe->enabled',0,'2013-02-24 18:29:15'),(88322,'smartphone',1,NULL,'left','commercial',88321,NULL,NULL,0,'/contact/fiche.php?leftmenu=contacts&action=create','','NewContactAddress||NewContact@$conf->global->SOCIETE_ADDRESSES_MANAGEMENT','companies',1,'','$user->rights->societe->creer','$conf->societe->enabled',0,'2013-02-24 18:29:15'),(88323,'smartphone',1,NULL,'left','commercial',88321,NULL,NULL,1,'/contact/list.php?leftmenu=contacts&action=create','','List','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',0,'2013-02-24 18:29:15'),(88331,'smartphone',1,NULL,'left','commercial',88323,NULL,NULL,1,'/contact/list.php?leftmenu=contacts&type=p','','Prospects','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled && $leftmenu==\"prospects\"',0,'2013-02-24 18:29:15'),(88332,'smartphone',1,NULL,'left','commercial',88323,NULL,NULL,1,'/contact/list.php?leftmenu=contacts&type=c','','Customers','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled && $leftmenu==\"prospects\"',0,'2013-02-24 18:29:15'),(88333,'smartphone',1,NULL,'left','commercial',88323,NULL,NULL,1,'/contact/list.php?leftmenu=contacts&type=f','','Suppliers','companies',1,'','$user->rights->societe->lire && $user->rights->fournisseur->lire','$conf->societe->enabled && $conf->fournisseur->enabled && $leftmenu==\"prospects\"',0,'2013-02-24 18:29:15'),(88334,'smartphone',1,NULL,'left','commercial',88323,NULL,NULL,1,'/contact/list.php?leftmenu=contacts&type=o','','Other','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled && $leftmenu==\"prospects\"',0,'2013-02-24 18:29:15'),(88521,'smartphone',1,NULL,'left','commercial',87426,NULL,NULL,4,'/comm/propal.php?leftmenu=propals','','Prop','propal',0,'','$user->rights->propale->lire','$conf->propal->enabled',2,'2013-02-24 18:29:15'),(88522,'smartphone',1,NULL,'left','commercial',88521,NULL,NULL,0,'/societe/societe.php?leftmenu=propals','','NewPropal','propal',1,'','$user->rights->propale->creer','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2013-02-24 18:29:15'),(88523,'smartphone',1,NULL,'left','commercial',88521,NULL,NULL,1,'/comm/propal.php?viewstatut=0','','PropalsDraft','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2013-02-24 18:29:15'),(88524,'smartphone',1,NULL,'left','commercial',88521,NULL,NULL,2,'/comm/propal.php?viewstatut=1','','PropalsOpened','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2013-02-24 18:29:15'),(88525,'smartphone',1,NULL,'left','commercial',88521,NULL,NULL,3,'/comm/propal.php?viewstatut=2,3,4','','PropalStatusClosedShort','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2013-02-24 18:29:15'),(88526,'smartphone',1,NULL,'left','commercial',88521,NULL,NULL,4,'/comm/propal/stats/index.php?leftmenu=propals','','Statistics','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2013-02-24 18:29:15'),(88621,'smartphone',1,NULL,'left','commercial',87426,NULL,NULL,5,'/commande/index.php?leftmenu=orders','','CustomersOrders','orders',0,'','$user->rights->commande->lire','$conf->commande->enabled',2,'2013-02-24 18:29:15'),(88622,'smartphone',1,NULL,'left','commercial',88621,NULL,NULL,0,'/societe/societe.php?leftmenu=orders','','NewOrder','orders',1,'','$user->rights->commande->creer','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-02-24 18:29:15'),(88623,'smartphone',1,NULL,'left','commercial',88621,NULL,NULL,1,'/commande/liste.php?leftmenu=orders','','List','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-02-24 18:29:15'),(88624,'smartphone',1,NULL,'left','commercial',88623,NULL,NULL,2,'/commande/liste.php?leftmenu=orders&viewstatut=0','','StatusOrderDraftShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-02-24 18:29:15'),(88625,'smartphone',1,NULL,'left','commercial',88623,NULL,NULL,3,'/commande/liste.php?leftmenu=orders&viewstatut=1','','StatusOrderValidated','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-02-24 18:29:15'),(88626,'smartphone',1,NULL,'left','commercial',88623,NULL,NULL,4,'/commande/liste.php?leftmenu=orders&viewstatut=2','','StatusOrderOnProcessShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-02-24 18:29:15'),(88627,'smartphone',1,NULL,'left','commercial',88623,NULL,NULL,5,'/commande/liste.php?leftmenu=orders&viewstatut=3','','StatusOrderToBill','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-02-24 18:29:15'),(88628,'smartphone',1,NULL,'left','commercial',88623,NULL,NULL,6,'/commande/liste.php?leftmenu=orders&viewstatut=4','','StatusOrderProcessed','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-02-24 18:29:15'),(88629,'smartphone',1,NULL,'left','commercial',88623,NULL,NULL,7,'/commande/liste.php?leftmenu=orders&viewstatut=-1','','StatusOrderCanceledShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-02-24 18:29:15'),(88630,'smartphone',1,NULL,'left','commercial',88621,NULL,NULL,4,'/commande/stats/index.php?leftmenu=orders','','Statistics','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-02-24 18:29:15'),(88721,'smartphone',1,NULL,'left','commercial',87424,NULL,NULL,6,'/expedition/index.php?leftmenu=sendings','','Shipments','orders',0,'','$user->rights->expedition->lire','$conf->expedition->enabled',2,'2013-02-24 18:29:15'),(88722,'smartphone',1,NULL,'left','commercial',88721,NULL,NULL,0,'/expedition/liste.php?leftmenu=sendings','','List','orders',1,'','$user->rights->expedition->lire','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2013-02-24 18:29:15'),(88723,'smartphone',1,NULL,'left','commercial',88721,NULL,NULL,1,'/expedition/stats/index.php?leftmenu=sendings','','Statistics','orders',1,'','$user->rights->expedition->lire','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2013-02-24 18:29:15'),(88821,'smartphone',1,NULL,'left','commercial',87426,NULL,NULL,7,'/contrat/index.php?leftmenu=contracts','','Contracts','contracts',0,'','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2013-02-24 18:29:15'),(88822,'smartphone',1,NULL,'left','commercial',88821,NULL,NULL,0,'/societe/societe.php?leftmenu=contracts','','NewContract','contracts',1,'','$user->rights->contrat->creer','$conf->contrat->enabled',2,'2013-02-24 18:29:15'),(88823,'smartphone',1,NULL,'left','commercial',88821,NULL,NULL,1,'/contrat/liste.php?leftmenu=contracts','','List','contracts',1,'','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2013-02-24 18:29:15'),(88824,'smartphone',1,NULL,'left','commercial',88821,NULL,NULL,2,'/contrat/services.php?leftmenu=contracts','','MenuServices','contracts',1,'','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2013-02-24 18:29:15'),(88825,'smartphone',1,NULL,'left','commercial',88824,NULL,NULL,0,'/contrat/services.php?leftmenu=contracts&mode=0','','MenuInactiveServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled&&$leftmenu==\"contracts\"',2,'2013-02-24 18:29:15'),(88826,'smartphone',1,NULL,'left','commercial',88824,NULL,NULL,1,'/contrat/services.php?leftmenu=contracts&mode=4','','MenuRunningServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled&&$leftmenu==\"contracts\"',2,'2013-02-24 18:29:15'),(88827,'smartphone',1,NULL,'left','commercial',88824,NULL,NULL,2,'/contrat/services.php?leftmenu=contracts&mode=4&filter=expired','','MenuExpiredServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled&&$leftmenu==\"contracts\"',2,'2013-02-24 18:29:15'),(88828,'smartphone',1,NULL,'left','commercial',88824,NULL,NULL,3,'/contrat/services.php?leftmenu=contracts&mode=5','','MenuClosedServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled&&$leftmenu==\"contracts\"',2,'2013-02-24 18:29:15'),(88921,'smartphone',1,NULL,'left','commercial',87426,NULL,NULL,8,'/fichinter/list.php?leftmenu=ficheinter','','Interventions','interventions',0,'','$user->rights->ficheinter->lire','$conf->ficheinter->enabled',2,'2013-02-24 18:29:15'),(88922,'smartphone',1,NULL,'left','commercial',88921,NULL,NULL,0,'/fichinter/fiche.php?action=create&leftmenu=ficheinter','','NewIntervention','interventions',1,'','$user->rights->ficheinter->creer','$conf->ficheinter->enabled && $leftmenu==\"ficheinter\"',2,'2013-02-24 18:29:15'),(88923,'smartphone',1,NULL,'left','commercial',88921,NULL,NULL,1,'/fichinter/list.php?leftmenu=ficheinter','','List','interventions',1,'','$user->rights->ficheinter->lire','$conf->ficheinter->enabled && $leftmenu==\"ficheinter\"',2,'2013-02-24 18:29:15'),(89021,'smartphone',1,NULL,'left','accountancy',87427,NULL,NULL,3,'/fourn/facture/index.php?leftmenu=suppliers_bills','','BillsSuppliers','bills',0,'','$user->rights->fournisseur->facture->lire','$conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(89022,'smartphone',1,NULL,'left','accountancy',89021,NULL,NULL,0,'/fourn/facture/fiche.php?action=create&leftmenu=suppliers_bills','','NewBill','bills',1,'','$user->rights->fournisseur->facture->creer','$conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(89023,'smartphone',1,NULL,'left','accountancy',89021,NULL,NULL,1,'/fourn/facture/impayees.php?leftmenu=suppliers_bills','','Unpaid','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(89024,'smartphone',1,NULL,'left','accountancy',89021,NULL,NULL,2,'/fourn/facture/paiement.php?leftmenu=suppliers_bills','','Payments','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(89121,'smartphone',1,NULL,'left','accountancy',87427,NULL,NULL,3,'/compta/facture/list.php?leftmenu=customers_bills','','BillsCustomers','bills',0,'','$user->rights->facture->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(89122,'smartphone',1,NULL,'left','accountancy',89121,NULL,NULL,3,'/compta/clients.php?action=facturer&leftmenu=customers_bills','','NewBill','bills',1,'','$user->rights->facture->creer','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(89123,'smartphone',1,NULL,'left','accountancy',89121,NULL,NULL,4,'/compta/facture/fiche-rec.php?leftmenu=customers_bills','','Repeatable','bills',1,'','$user->rights->facture->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(89124,'smartphone',1,NULL,'left','accountancy',89121,NULL,NULL,5,'/compta/facture/impayees.php?action=facturer&leftmenu=customers_bills','','Unpaid','bills',1,'','$user->rights->facture->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(89125,'smartphone',1,NULL,'left','accountancy',89121,NULL,NULL,6,'/compta/paiement/liste.php?leftmenu=customers_bills','','Payments','bills',1,'','$user->rights->facture->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(89131,'smartphone',1,NULL,'left','accountancy',89125,NULL,NULL,1,'/compta/paiement/rapport.php?leftmenu=customers_bills','','Reportings','bills',2,'','$user->rights->facture->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(89132,'smartphone',1,NULL,'left','accountancy',87435,NULL,NULL,9,'/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank','','MenuChequeDeposits','bills',0,'','$user->rights->facture->lire','$conf->facture->enabled && $conf->banque->enabled',2,'2013-02-24 18:29:15'),(89133,'smartphone',1,NULL,'left','accountancy',89132,NULL,NULL,0,'/compta/paiement/cheque/fiche.php?leftmenu=checks&action=new','','NewCheckDeposit','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled && $conf->banque->enabled',2,'2013-02-24 18:29:15'),(89134,'smartphone',1,NULL,'left','accountancy',89132,NULL,NULL,1,'/compta/paiement/cheque/liste.php?leftmenu=checks','','List','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled && $conf->banque->enabled',2,'2013-02-24 18:29:15'),(89135,'smartphone',1,NULL,'left','accountancy',89121,NULL,NULL,8,'/compta/facture/stats/index.php?leftmenu=customers_bills','','Statistics','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled && $conf->banque->enabled',2,'2013-02-24 18:29:15'),(89321,'smartphone',1,NULL,'left','accountancy',87427,NULL,NULL,3,'/commande/liste.php?leftmenu=orders&viewstatut=3','','MenuOrdersToBill','orders',0,'','$user->rights->commande->lire','$conf->commande->enabled',0,'2013-02-24 18:29:15'),(89421,'smartphone',1,NULL,'left','accountancy',87427,NULL,NULL,4,'/compta/dons/index.php?leftmenu=donations&mainmenu=accountancy','','Donations','donations',0,'','$user->rights->don->lire','$conf->don->enabled',2,'2013-02-24 18:29:15'),(89422,'smartphone',1,NULL,'left','accountancy',89421,NULL,NULL,0,'/compta/dons/fiche.php?leftmenu=donations&mainmenu=accountancy&action=create','','NewDonation','donations',1,'','$user->rights->don->creer','$conf->don->enabled && $leftmenu==\"donations\"',2,'2013-02-24 18:29:15'),(89423,'smartphone',1,NULL,'left','accountancy',89421,NULL,NULL,1,'/compta/dons/liste.php?leftmenu=donations&mainmenu=accountancy','','List','donations',1,'','$user->rights->don->lire','$conf->don->enabled && $leftmenu==\"donations\"',2,'2013-02-24 18:29:15'),(89521,'smartphone',1,NULL,'left','accountancy',87427,NULL,NULL,5,'/compta/deplacement/index.php?leftmenu=tripsandexpenses','','TripsAndExpenses','trips',0,'','$user->rights->deplacement->lire','$conf->deplacement->enabled',0,'2013-02-24 18:29:15'),(89522,'smartphone',1,NULL,'left','accountancy',89521,NULL,NULL,1,'/compta/deplacement/fiche.php?action=create&leftmenu=tripsandexpenses','','New','trips',1,'','$user->rights->deplacement->creer','$conf->deplacement->enabled && $leftmenu==\"tripsandexpenses\"',0,'2013-02-24 18:29:15'),(89523,'smartphone',1,NULL,'left','accountancy',89521,NULL,NULL,2,'/compta/deplacement/index.php?leftmenu=tripsandexpenses','','List','trips',1,'','$user->rights->deplacement->lire','$conf->deplacement->enabled && $leftmenu==\"tripsandexpenses\"',0,'2013-02-24 18:29:15'),(89524,'smartphone',1,NULL,'left','accountancy',89521,NULL,NULL,2,'/compta/deplacement/stats/index.php?leftmenu=tripsandexpenses','','Statistics','trips',1,'','$user->rights->deplacement->lire','$conf->deplacement->enabled && $leftmenu==\"tripsandexpenses\"',0,'2013-02-24 18:29:15'),(89621,'smartphone',1,NULL,'left','accountancy',87427,NULL,NULL,6,'/compta/charges/index.php?leftmenu=tax&mainmenu=accountancy','','MenuTaxAndDividends','compta',0,'','$user->rights->tax->charges->lire','$conf->tax->enabled',0,'2013-02-24 18:29:15'),(89622,'smartphone',1,NULL,'left','accountancy',89621,NULL,NULL,1,'/compta/sociales/index.php?leftmenu=tax_social','','SocialContributions','',1,'','$user->rights->tax->charges->lire','$conf->tax->enabled',0,'2013-02-24 18:29:15'),(89623,'smartphone',1,NULL,'left','accountancy',89622,NULL,NULL,2,'/compta/sociales/charges.php?leftmenu=tax_social&action=create','','MenuNewSocialContribution','',2,'','$user->rights->tax->charges->creer','$conf->tax->enabled && $leftmenu==\"tax_social\"',0,'2013-02-24 18:29:15'),(89624,'smartphone',1,NULL,'left','accountancy',89622,NULL,NULL,3,'/compta/charges/index.php?leftmenu=tax_social&mainmenu=accountancy&mode=sconly','','Payments','',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && $leftmenu==\"tax_social\"',0,'2013-02-24 18:29:15'),(89721,'smartphone',1,NULL,'left','accountancy',89621,NULL,NULL,7,'/compta/tva/index.php?leftmenu=tax_vat&mainmenu=accountancy','','VAT','companies',1,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS)',0,'2013-02-24 18:29:15'),(89722,'smartphone',1,NULL,'left','accountancy',89721,NULL,NULL,0,'/compta/tva/fiche.php?leftmenu=tax_vat&action=create','','NewPayment','companies',2,'','$user->rights->tax->charges->creer','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2013-02-24 18:29:15'),(89723,'smartphone',1,NULL,'left','accountancy',89721,NULL,NULL,1,'/compta/tva/reglement.php?leftmenu=tax_vat','','Payments','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2013-02-24 18:29:15'),(89724,'smartphone',1,NULL,'left','accountancy',89721,NULL,NULL,2,'/compta/tva/clients.php?leftmenu=tax_vat','','ReportByCustomers','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2013-02-24 18:29:15'),(89725,'smartphone',1,NULL,'left','accountancy',89721,NULL,NULL,3,'/compta/tva/quadri_detail.php?leftmenu=tax_vat','','ReportByQuarter','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2013-02-24 18:29:15'),(89821,'smartphone',1,NULL,'left','accountancy',87427,NULL,NULL,8,'/compta/ventilation/index.php?leftmenu=ventil','','Ventilation','companies',0,'','$user->rights->compta->ventilation->lire','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-02-24 18:29:15'),(89822,'smartphone',1,NULL,'left','accountancy',89821,NULL,NULL,0,'/compta/ventilation/liste.php','','ToDispatch','companies',1,'','$user->rights->compta->ventilation->lire','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-02-24 18:29:15'),(89823,'smartphone',1,NULL,'left','accountancy',89821,NULL,NULL,1,'/compta/ventilation/lignes.php','','Dispatched','companies',1,'','$user->rights->compta->ventilation->lire','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-02-24 18:29:15'),(89824,'smartphone',1,NULL,'left','accountancy',89821,NULL,NULL,2,'/compta/param/','','Setup','companies',1,'','$user->rights->compta->ventilation->parametrer','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-02-24 18:29:15'),(89825,'smartphone',1,NULL,'left','accountancy',89824,NULL,NULL,0,'/compta/param/comptes/liste.php','','List','companies',2,'','$user->rights->compta->ventilation->parametrer','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-02-24 18:29:15'),(89826,'smartphone',1,NULL,'left','accountancy',89824,NULL,NULL,1,'/compta/param/comptes/fiche.php?action=create','','New','companies',2,'','$user->rights->compta->ventilation->parametrer','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-02-24 18:29:15'),(89827,'smartphone',1,NULL,'left','accountancy',89821,NULL,NULL,3,'/compta/export/','','Export','companies',1,'','$user->rights->compta->ventilation->lire','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-02-24 18:29:15'),(89828,'smartphone',1,NULL,'left','accountancy',89827,NULL,NULL,0,'/compta/export/index.php','','New','companies',2,'','$user->rights->compta->ventilation->lire','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-02-24 18:29:15'),(89829,'smartphone',1,NULL,'left','accountancy',89827,NULL,NULL,1,'/compta/export/liste.php','','List','companies',2,'','$user->rights->compta->ventilation->lire','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-02-24 18:29:15'),(89921,'smartphone',1,NULL,'left','accountancy',87435,NULL,NULL,9,'/compta/prelevement/index.php?leftmenu=withdraw&mainmenu=bank','','StandingOrders','withdrawals',0,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled',2,'2013-02-24 18:29:15'),(89922,'smartphone',1,NULL,'left','accountancy',89921,NULL,NULL,1,'/compta/prelevement/demandes.php?status=0&leftmenu=withdraw','','StandingOrderToProcess','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2013-02-24 18:29:15'),(89923,'smartphone',1,NULL,'left','accountancy',89921,NULL,NULL,0,'/compta/prelevement/create.php?leftmenu=withdraw','','NewStandingOrder','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2013-02-24 18:29:15'),(89924,'smartphone',1,NULL,'left','accountancy',89921,NULL,NULL,2,'/compta/prelevement/bons.php?leftmenu=withdraw','','WithdrawalsReceipts','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2013-02-24 18:29:15'),(89925,'smartphone',1,NULL,'left','accountancy',89921,NULL,NULL,3,'/compta/prelevement/liste.php?leftmenu=withdraw','','WithdrawalsLines','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2013-02-24 18:29:15'),(89927,'smartphone',1,NULL,'left','accountancy',89921,NULL,NULL,5,'/compta/prelevement/rejets.php?leftmenu=withdraw','','Rejects','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2013-02-24 18:29:15'),(89928,'smartphone',1,NULL,'left','accountancy',89921,NULL,NULL,6,'/compta/prelevement/stats.php?leftmenu=withdraw','','Statistics','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2013-02-24 18:29:15'),(90021,'smartphone',1,NULL,'left','accountancy',87435,NULL,NULL,1,'/compta/bank/index.php?leftmenu=bank&mainmenu=bank','','MenuBankCash','banks',0,'','$user->rights->banque->lire','$conf->banque->enabled',0,'2013-02-24 18:29:15'),(90022,'smartphone',1,NULL,'left','accountancy',90021,NULL,NULL,0,'/compta/bank/fiche.php?action=create&leftmenu=bank','','MenuNewFinancialAccount','banks',1,'','$user->rights->banque->configurer','$conf->banque->enabled && $leftmenu==bank',0,'2013-02-24 18:29:15'),(90023,'smartphone',1,NULL,'left','accountancy',90021,NULL,NULL,1,'/compta/bank/categ.php?leftmenu=bank','','Rubriques','categories',1,'','$user->rights->banque->configurer','$conf->banque->enabled && $leftmenu==bank',0,'2013-02-24 18:29:15'),(90024,'smartphone',1,NULL,'left','accountancy',90021,NULL,NULL,2,'/compta/bank/search.php?leftmenu=bank','','ListTransactions','banks',1,'','$user->rights->banque->lire','$conf->banque->enabled && $leftmenu==bank',0,'2013-02-24 18:29:15'),(90025,'smartphone',1,NULL,'left','accountancy',90021,NULL,NULL,3,'/compta/bank/budget.php?leftmenu=bank','','ListTransactionsByCategory','banks',1,'','$user->rights->banque->lire','$conf->banque->enabled && $leftmenu==bank',0,'2013-02-24 18:29:15'),(90027,'smartphone',1,NULL,'left','accountancy',90021,NULL,NULL,5,'/compta/bank/virement.php?leftmenu=bank','','BankTransfers','banks',1,'','$user->rights->banque->transfer','$conf->banque->enabled && $leftmenu==bank',0,'2013-02-24 18:29:15'),(90121,'smartphone',1,NULL,'left','accountancy',87427,NULL,NULL,11,'/compta/resultat/index.php?leftmenu=ca&mainmenu=accountancy','','Reportings','main',0,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2013-02-24 18:29:15'),(90122,'smartphone',1,NULL,'left','accountancy',90121,NULL,NULL,0,'/compta/resultat/index.php?leftmenu=ca','','ReportInOut','main',1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2013-02-24 18:29:15'),(90123,'smartphone',1,NULL,'left','accountancy',90122,NULL,NULL,0,'/compta/resultat/clientfourn.php?leftmenu=ca','','ByCompanies','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2013-02-24 18:29:15'),(90124,'smartphone',1,NULL,'left','accountancy',90121,NULL,NULL,1,'/compta/stats/index.php?leftmenu=ca','','ReportTurnover','main',1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2013-02-24 18:29:15'),(90125,'smartphone',1,NULL,'left','accountancy',90124,NULL,NULL,0,'/compta/stats/casoc.php?leftmenu=ca','','ByCompanies','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2013-02-24 18:29:15'),(90126,'smartphone',1,NULL,'left','accountancy',90124,NULL,NULL,1,'/compta/stats/cabyuser.php?leftmenu=ca','','ByUsers','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2013-02-24 18:29:15'),(90221,'smartphone',1,NULL,'left','products',87424,NULL,NULL,0,'/product/index.php?leftmenu=product&type=0','','Products','products',0,'','$user->rights->produit->lire','$conf->product->enabled',2,'2013-02-24 18:29:15'),(90222,'smartphone',1,NULL,'left','products',90221,NULL,NULL,0,'/product/fiche.php?leftmenu=product&action=create&type=0','','NewProduct','products',1,'','$user->rights->produit->creer','$conf->product->enabled',2,'2013-02-24 18:29:15'),(90223,'smartphone',1,NULL,'left','products',90221,NULL,NULL,1,'/product/liste.php?leftmenu=product&type=0','','List','products',1,'','$user->rights->produit->lire','$conf->product->enabled',2,'2013-02-24 18:29:15'),(90224,'smartphone',1,NULL,'left','products',90221,NULL,NULL,4,'/product/reassort.php?type=0','','Stocks','products',1,'','$user->rights->produit->lire && $user->rights->stock->lire','$conf->product->enabled',2,'2013-02-24 18:29:15'),(90321,'smartphone',1,NULL,'left','products',87424,NULL,NULL,1,'/product/index.php?leftmenu=service&type=1','','Services','products',0,'','$user->rights->service->lire','$conf->service->enabled',2,'2013-02-24 18:29:15'),(90322,'smartphone',1,NULL,'left','products',90321,NULL,NULL,0,'/product/fiche.php?leftmenu=service&action=create&type=1','','NewService','products',1,'','$user->rights->service->creer','$conf->service->enabled',2,'2013-02-24 18:29:15'),(90323,'smartphone',1,NULL,'left','products',90321,NULL,NULL,1,'/product/liste.php?leftmenu=service&type=1','','List','products',1,'','$user->rights->service->lire','$conf->service->enabled',2,'2013-02-24 18:29:15'),(90421,'smartphone',1,NULL,'left','products',87424,NULL,NULL,2,'/product/stats/index.php?leftmenu=stats','','Statistics','main',0,'','$user->rights->service->lire','$conf->product->enabled || $conf->service->enabled',2,'2013-02-24 18:29:15'),(90422,'smartphone',1,NULL,'left','products',90421,NULL,NULL,0,'/product/popuprop.php?leftmenu=stats','','Popularity','main',1,'','$user->rights->produit->lire && $user->rights->produit>lire','$conf->propal->enabled',2,'2013-02-24 18:29:15'),(90521,'smartphone',1,NULL,'left','products',87424,NULL,NULL,3,'/product/stock/index.php?leftmenu=stock','','Stock','stocks',0,'','$user->rights->stock->lire','$conf->stock->enabled',2,'2013-02-24 18:29:15'),(90522,'smartphone',1,NULL,'left','products',90521,NULL,NULL,0,'/product/stock/fiche.php?action=create','','MenuNewWarehouse','stocks',1,'','$user->rights->stock->creer','$conf->stock->enabled',2,'2013-02-24 18:29:15'),(90523,'smartphone',1,NULL,'left','products',90521,NULL,NULL,1,'/product/stock/liste.php','','List','stocks',1,'','$user->rights->stock->lire','$conf->stock->enabled',2,'2013-02-24 18:29:15'),(90524,'smartphone',1,NULL,'left','products',90521,NULL,NULL,2,'/product/stock/valo.php','','EnhancedValue','stocks',1,'','$user->rights->stock->lire','$conf->stock->enabled',2,'2013-02-24 18:29:15'),(90525,'smartphone',1,NULL,'left','products',90521,NULL,NULL,3,'/product/stock/mouvement.php','','Movements','stocks',1,'','$user->rights->stock->mouvement->lire','$conf->stock->enabled',2,'2013-02-24 18:29:15'),(90621,'smartphone',1,NULL,'left','products',87424,NULL,NULL,4,'/categories/index.php?leftmenu=cat&type=0','','Categories','categories',0,'','$user->rights->categorie->lire','$conf->categorie->enabled',2,'2013-02-24 18:29:15'),(90622,'smartphone',1,NULL,'left','products',90621,NULL,NULL,0,'/categories/fiche.php?action=create&type=0','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->categorie->enabled',2,'2013-02-24 18:29:15'),(91021,'smartphone',1,NULL,'left','project',87428,NULL,NULL,0,'/projet/index.php?leftmenu=projects','','Projects','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91022,'smartphone',1,NULL,'left','project',91021,NULL,NULL,1,'/projet/fiche.php?leftmenu=projects&action=create','','NewProject','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91023,'smartphone',1,NULL,'left','project',91021,NULL,NULL,2,'/projet/liste.php?leftmenu=projects','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91031,'smartphone',1,NULL,'left','project',87428,NULL,NULL,0,'/projet/index.php?leftmenu=projects&mode=mine','','MyProjects','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91032,'smartphone',1,NULL,'left','project',91031,NULL,NULL,1,'/projet/fiche.php?leftmenu=projects&action=create&mode=mine','','NewProject','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91033,'smartphone',1,NULL,'left','project',91031,NULL,NULL,2,'/projet/liste.php?leftmenu=projects&mode=mine','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91121,'smartphone',1,NULL,'left','project',87428,NULL,NULL,0,'/projet/activity/index.php?leftmenu=projects','','Activities','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91122,'smartphone',1,NULL,'left','project',91121,NULL,NULL,1,'/projet/tasks.php?leftmenu=projects&action=create','','NewTask','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91123,'smartphone',1,NULL,'left','project',91121,NULL,NULL,2,'/projet/tasks/index.php?leftmenu=projects','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91124,'smartphone',1,NULL,'left','project',91121,NULL,NULL,3,'/projet/activity/list.php?leftmenu=projects','','NewTimeSpent','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91221,'smartphone',1,NULL,'left','project',87428,NULL,NULL,0,'/projet/activity/index.php?leftmenu=projects&mode=mine','','MyActivities','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91222,'smartphone',1,NULL,'left','project',91221,NULL,NULL,1,'/projet/tasks.php?leftmenu=projects&action=create&mode=mine','','NewTask','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91223,'smartphone',1,NULL,'left','project',91221,NULL,NULL,2,'/projet/tasks/index.php?leftmenu=projects&mode=mine','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91224,'smartphone',1,NULL,'left','project',91221,NULL,NULL,3,'/projet/activity/list.php?leftmenu=projects&mode=mine','','NewTimeSpent','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91321,'smartphone',1,NULL,'left','tools',87429,NULL,NULL,0,'/comm/mailing/index.php?leftmenu=mailing','','EMailings','mails',0,'','$user->rights->mailing->lire','$conf->mailing->enabled',0,'2013-02-24 18:29:15'),(91322,'smartphone',1,NULL,'left','tools',91321,NULL,NULL,0,'/comm/mailing/fiche.php?leftmenu=mailing&action=create','','NewMailing','mails',1,'','$user->rights->mailing->creer','$conf->mailing->enabled',0,'2013-02-24 18:29:15'),(91323,'smartphone',1,NULL,'left','tools',91321,NULL,NULL,1,'/comm/mailing/liste.php?leftmenu=mailing','','List','mails',1,'','$user->rights->mailing->lire','$conf->mailing->enabled',0,'2013-02-24 18:29:15'),(91521,'smartphone',1,NULL,'left','tools',87429,NULL,NULL,2,'/exports/index.php?leftmenu=export','','FormatedExport','exports',0,'','$user->rights->export->lire','$conf->export->enabled',2,'2013-02-24 18:29:15'),(91522,'smartphone',1,NULL,'left','tools',91521,NULL,NULL,0,'/exports/export.php?leftmenu=export','','NewExport','exports',1,'','$user->rights->export->creer','$conf->export->enabled',2,'2013-02-24 18:29:15'),(91551,'smartphone',1,NULL,'left','tools',87429,NULL,NULL,2,'/imports/index.php?leftmenu=import','','FormatedImport','exports',0,'','$user->rights->import->run','$conf->import->enabled',2,'2013-02-24 18:29:15'),(91552,'smartphone',1,NULL,'left','tools',91551,NULL,NULL,0,'/imports/import.php?leftmenu=import','','NewImport','exports',1,'','$user->rights->import->run','$conf->import->enabled',2,'2013-02-24 18:29:15'),(91621,'smartphone',1,NULL,'left','members',87434,NULL,NULL,0,'/adherents/index.php?leftmenu=members&mainmenu=members','','Members','members',0,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91622,'smartphone',1,NULL,'left','members',91621,NULL,NULL,0,'/adherents/fiche.php?action=create','','NewMember','members',1,'','$user->rights->adherent->creer','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91623,'smartphone',1,NULL,'left','members',91621,NULL,NULL,1,'/adherents/liste.php','','List','members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91624,'smartphone',1,NULL,'left','members',91623,NULL,NULL,2,'/adherents/liste.php?statut=-1','','MenuMembersToValidate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91625,'smartphone',1,NULL,'left','members',91623,NULL,NULL,3,'/adherents/liste.php?statut=1','','MenuMembersValidated','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91626,'smartphone',1,NULL,'left','members',91623,NULL,NULL,4,'/adherents/liste.php?statut=1&filter=outofdate','','MenuMembersNotUpToDate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91627,'smartphone',1,NULL,'left','members',91623,NULL,NULL,5,'/adherents/liste.php?statut=1&filter=uptodate','','MenuMembersUpToDate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91628,'smartphone',1,NULL,'left','members',91623,NULL,NULL,6,'/adherents/liste.php?statut=0','','MenuMembersResiliated','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91721,'smartphone',1,NULL,'left','members',87434,NULL,NULL,1,'/adherents/index.php?leftmenu=accountancy&mainmenu=members','','Subscriptions','compta',0,'','$user->rights->adherent->cotisation->lire','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91722,'smartphone',1,NULL,'left','members',91721,NULL,NULL,0,'/adherents/liste.php?statut=-1&leftmenu=accountancy&mainmenu=members','','NewSubscription','compta',1,'','$user->rights->adherent->cotisation->creer','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91723,'smartphone',1,NULL,'left','members',91721,NULL,NULL,1,'/adherents/cotisations.php?leftmenu=accountancy','','List','compta',1,'','$user->rights->adherent->cotisation->lire','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91921,'smartphone',1,NULL,'left','members',87434,NULL,NULL,3,'/adherents/index.php?leftmenu=export&mainmenu=members','','Exports','members',0,'','$user->rights->adherent->export','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91922,'smartphone',1,NULL,'left','members',91921,NULL,NULL,0,'/exports/index.php?leftmenu=export','','Datas','members',1,'','$user->rights->adherent->export','$conf->adherent->enabled && $conf->export->enabled',2,'2013-02-24 18:29:15'),(91923,'smartphone',1,NULL,'left','members',91921,NULL,NULL,1,'/adherents/htpasswd.php?leftmenu=export','','Filehtpasswd','members',1,'','$user->rights->adherent->export','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91924,'smartphone',1,NULL,'left','members',91921,NULL,NULL,2,'/adherents/cartes/carte.php?leftmenu=export','','MembersCards','members',1,'','$user->rights->adherent->export','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(92121,'smartphone',1,NULL,'left','members',87434,NULL,NULL,5,'/adherents/index.php?leftmenu=setup&mainmenu=members','','Setup','members',0,'','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(92122,'smartphone',1,NULL,'left','members',92121,NULL,NULL,0,'/adherents/type.php?leftmenu=setup','','MembersTypes','members',1,'','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(92123,'smartphone',1,NULL,'left','members',92121,NULL,NULL,1,'/adherents/options.php?leftmenu=setup','','MembersAttributes','members',1,'','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(92421,'smartphone',1,NULL,'left','commercial',87426,NULL,NULL,0,'/compta/index.php?leftmenu=suppliers','','Suppliers','companies',0,'','$user->rights->societe->lire && $user->rights->fournisseur->lire','$conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(92422,'smartphone',1,NULL,'left','commercial',92421,NULL,NULL,0,'/societe/soc.php?leftmenu=suppliers&action=create&type=f','','NewSupplier','companies',1,'','$user->rights->societe->creer && $user->rights->fournisseur->lire','$conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(92423,'smartphone',1,NULL,'left','commercial',92421,NULL,NULL,1,'/fourn/liste.php?leftmenu=suppliers','','List','companies',1,'','$user->rights->societe->lire && $user->rights->fournisseur->lire','$conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(92424,'smartphone',1,NULL,'left','commercial',92421,NULL,NULL,2,'/contact/list.php?leftmenu=suppliers&type=f','','Contacts','companies',1,'','$user->rights->societe->lire && $user->rights->fournisseur->lire','$conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(92521,'smartphone',1,NULL,'left','commercial',87426,NULL,NULL,6,'/fourn/commande/index.php?leftmenu=orders_suppliers','','SuppliersOrders','orders',0,'','$user->rights->fournisseur->commande->lire','$conf->commande->enabled',2,'2013-02-24 18:29:15'),(92522,'smartphone',1,NULL,'left','commercial',92521,NULL,NULL,0,'/societe/societe.php?leftmenu=orders_suppliers','','NewOrder','orders',1,'','$user->rights->fournisseur->commande->creer','$conf->commande->enabled && $leftmenu==\"orders_suppliers\"',2,'2013-02-24 18:29:15'),(92523,'smartphone',1,NULL,'left','commercial',92521,NULL,NULL,1,'/fourn/commande/liste.php?leftmenu=orders_suppliers&viewstatut=0','','List','orders',1,'','$user->rights->fournisseur->commande->lire','$conf->commande->enabled && $leftmenu==\"orders_suppliers\"',2,'2013-02-24 18:29:15'),(92529,'smartphone',1,NULL,'left','commercial',92521,NULL,NULL,7,'/commande/stats/index.php?leftmenu=orders_suppliers&mode=supplier','','Statistics','orders',1,'','$user->rights->fournisseur->commande->lire','$conf->commande->enabled && $leftmenu==\"orders_suppliers\"',2,'2013-02-24 18:29:15'),(92621,'smartphone',1,NULL,'left','members',87434,NULL,NULL,3,'/categories/index.php?leftmenu=cat&type=3','','MembersCategoriesShort','categories',0,'','$user->rights->categorie->lire','$conf->adherent->enabled && $conf->categorie->enabled',2,'2013-02-24 18:29:15'),(92622,'smartphone',1,NULL,'left','members',92621,NULL,NULL,0,'/categories/fiche.php?action=create&type=3','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->adherent->enabled && $conf->categorie->enabled',2,'2013-02-24 18:29:15'),(103094,'all',2,'agenda','top','agenda',0,NULL,NULL,100,'/comm/action/index.php','','Agenda','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-03-13 15:29:19'),(103095,'all',2,'agenda','left','agenda',103094,NULL,NULL,100,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Actions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-03-13 15:29:19'),(103096,'all',2,'agenda','left','agenda',103095,NULL,NULL,101,'/comm/action/fiche.php?mainmenu=agenda&leftmenu=agenda&action=create','','NewAction','commercial',NULL,NULL,'($user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create)','$conf->agenda->enabled',2,'2013-03-13 15:29:19'),(103097,'all',2,'agenda','left','agenda',103095,NULL,NULL,102,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Calendar','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-03-13 15:29:19'),(103098,'all',2,'agenda','left','agenda',103097,NULL,NULL,103,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-03-13 15:29:19'),(103099,'all',2,'agenda','left','agenda',103097,NULL,NULL,104,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-03-13 15:29:19'),(103100,'all',2,'agenda','left','agenda',103097,NULL,NULL,105,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2013-03-13 15:29:19'),(103101,'all',2,'agenda','left','agenda',103097,NULL,NULL,106,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2013-03-13 15:29:19'),(103102,'all',2,'agenda','left','agenda',103095,NULL,NULL,112,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda','','List','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-03-13 15:29:19'),(103103,'all',2,'agenda','left','agenda',103102,NULL,NULL,113,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-03-13 15:29:19'),(103104,'all',2,'agenda','left','agenda',103102,NULL,NULL,114,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-03-13 15:29:19'),(103105,'all',2,'agenda','left','agenda',103102,NULL,NULL,115,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2013-03-13 15:29:19'),(103106,'all',2,'agenda','left','agenda',103102,NULL,NULL,116,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2013-03-13 15:29:19'),(103107,'all',2,'agenda','left','agenda',103095,NULL,NULL,120,'/comm/action/rapport/index.php?mainmenu=agenda&leftmenu=agenda','','Reportings','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$conf->agenda->enabled',2,'2013-03-13 15:29:19'),(103108,'all',2,'pos','top','pos',0,NULL,NULL,100,'/pos/backend/listefac.php','','POS','pos@pos',NULL,'1','1','1',2,'2013-03-13 20:33:09'),(103109,'all',2,'pos','left','pos',103108,NULL,NULL,100,'/pos/backend/liste.php','','Tickets','pos@pos',NULL,NULL,'$user->rights->pos->backend','$conf->global->POS_USE_TICKETS',0,'2013-03-13 20:33:09'),(103110,'all',2,'pos','left','pos',103109,NULL,NULL,100,'/pos/backend/liste.php','','List','main',NULL,NULL,'$user->rights->pos->backend','$conf->global->POS_USE_TICKETS',0,'2013-03-13 20:33:09'),(103111,'all',2,'pos','left','pos',103110,NULL,NULL,100,'/pos/backend/liste.php?viewstatut=0','','StatusTicketDraft','pos@pos',NULL,NULL,'$user->rights->pos->backend','$conf->global->POS_USE_TICKETS',0,'2013-03-13 20:33:09'),(103112,'all',2,'pos','left','@pos',103110,NULL,NULL,100,'/pos/backend/liste.php?viewstatut=1','','StatusTicketClosed','main',NULL,NULL,'$user->rights->pos->backend','$conf->global->POS_USE_TICKETS',0,'2013-03-13 20:33:09'),(103113,'all',2,'pos','left','@pos',103110,NULL,NULL,100,'/pos/backend/liste.php?viewstatut=2','','StatusTicketProcessed','main',NULL,NULL,'$user->rights->pos->backend','$conf->global->POS_USE_TICKETS',0,'2013-03-13 20:33:09'),(103114,'all',2,'pos','left','@pos',103110,NULL,NULL,100,'/pos/backend/liste.php?viewtype=1','','StatusTicketReturned','main',NULL,NULL,'$user->rights->pos->backend','$conf->global->POS_USE_TICKETS',0,'2013-03-13 20:33:09'),(103115,'all',2,'pos','left','pos',103108,NULL,NULL,100,'/pos/backend/listefac.php','','Factures','pos@pos',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103116,'all',2,'pos','left','pos',103115,NULL,NULL,100,'/pos/backend/listefac.php','','List','main',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103117,'all',2,'pos','left','pos',103116,NULL,NULL,100,'/pos/backend/listefac.php?viewstatut=0','','BillStatusDraft','bills',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103118,'all',2,'pos','left','@pos',103116,NULL,NULL,100,'/pos/backend/listefac.php?viewstatut=1','','BillStatusValidated','bills',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103119,'all',2,'pos','left','@pos',103116,NULL,NULL,100,'/pos/backend/listefac.php?viewstatut=2&viewtype=0','','BillStatusPaid','bills',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103120,'all',2,'pos','left','@pos',103116,NULL,NULL,100,'/pos/backend/listefac.php?viewtype=2','','BillStatusReturned','main',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103121,'all',2,'pos','left','@pos',103108,NULL,NULL,100,'/pos/frontend/index.php','','POS','main',NULL,NULL,'$user->rights->pos->frontend','1',0,'2013-03-13 20:33:09'),(103122,'all',2,'pos','left','@pos',103121,NULL,NULL,100,'/pos/frontend/index.php','','NewTicket','main',NULL,NULL,'$user->rights->pos->frontend','1',0,'2013-03-13 20:33:09'),(103123,'all',2,'pos','left','@pos',103121,NULL,NULL,101,'/pos/backend/closes.php','','CloseandArching','main',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103124,'all',2,'pos','left','@pos',103108,NULL,NULL,100,'/pos/backend/terminal/cash.php','','Terminal','main',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103125,'all',2,'pos','left','@pos',103124,NULL,NULL,100,'/pos/backend/terminal/fiche.php?action=create','','NewCash','main',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103126,'all',2,'pos','left','@pos',103124,NULL,NULL,101,'/pos/backend/terminal/cash.php','','List','main',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103127,'all',2,'pos','left','@pos',103123,NULL,NULL,101,'/pos/backend/closes.php?viewstatut=0','','Arqueo','main',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103128,'all',2,'pos','left','@pos',103123,NULL,NULL,102,'/pos/backend/closes.php?viewstatut=1','','Closes','main',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103129,'all',2,'pos','left','@pos',103108,NULL,NULL,102,'/pos/backend/transfers.php','','Transfer','main',NULL,NULL,'$user->rights->pos->transfer','1',0,'2013-03-13 20:33:09'),(103130,'all',2,'pos','left','@pos',103108,NULL,NULL,102,'/pos/backend/resultat/index.php','','Rapport','main',NULL,NULL,'$user->rights->pos->stats','1',0,'2013-03-13 20:33:09'),(103131,'all',2,'pos','left','@pos',103130,NULL,NULL,102,'/pos/backend/resultat/casoc.php','','ReportsCustomer','main',NULL,NULL,'$user->rights->pos->stats','1',0,'2013-03-13 20:33:09'),(103132,'all',2,'pos','left','@pos',103130,NULL,NULL,102,'/pos/backend/resultat/causer.php','','ReportsUser','main',NULL,NULL,'$user->rights->pos->stats','1',0,'2013-03-13 20:33:09'),(103133,'all',2,'pos','left','@pos',103130,NULL,NULL,102,'/pos/backend/resultat/sellsjournal.php','','ReportsSells','main',NULL,NULL,'$user->rights->pos->stats','1',0,'2013-03-13 20:33:09'),(103134,'all',2,'opensurvey','top','opensurvey',0,NULL,NULL,200,'/opensurvey/index.php','','Surveys','opensurvey',NULL,NULL,'$user->rights->opensurvey->survey->read','$conf->opensurvey->enabled',0,'2013-03-13 20:33:42'),(103135,'all',2,'opensurvey','left','opensurvey',-1,NULL,'opensurvey',200,'/opensurvey/index.php?mainmenu=opensurvey&leftmenu=opensurvey','','Survey','opensurvey@opensurvey',NULL,'opensurvey','','$conf->opensurvey->enabled',0,'2013-03-13 20:33:42'),(103136,'all',2,'opensurvey','left','opensurvey',-1,'opensurvey','opensurvey',210,'/opensurvey/public/index.php','_blank','NewSurvey','opensurvey@opensurvey',NULL,'opensurvey_new','','$conf->opensurvey->enabled',0,'2013-03-13 20:33:42'),(103137,'all',2,'opensurvey','left','opensurvey',-1,'opensurvey','opensurvey',220,'/opensurvey/list.php','','List','opensurvey@opensurvey',NULL,'opensurvey_list','','$conf->opensurvey->enabled',0,'2013-03-13 20:33:42'),(103160,'all',1,'cron','left','home',-1,'modulesadmintools','home',200,'/cron/list.php?status=1','','CronListActive','cron',NULL,NULL,'$user->rights->cron->read','$leftmenu==\'modulesadmintools\'',2,'2013-03-23 17:24:25'),(103161,'all',1,'cron','left','home',-1,'modulesadmintools','home',201,'/cron/list.php?status=0','','CronListInactive','cron',NULL,NULL,'$user->rights->cron->read','$leftmenu==\'modulesadmintools\'',2,'2013-03-23 17:24:25'),(103162,'auguria',1,'','top','home',0,NULL,NULL,1,'/index.php?mainmenu=home&leftmenu=','','Home','',-1,'','','1',2,'2013-03-24 02:31:47'),(103163,'auguria',1,'societe|fournisseur','top','companies',0,NULL,NULL,2,'/societe/index.php?mainmenu=companies&leftmenu=','','ThirdParties','companies',-1,'','$user->rights->societe->lire || $user->rights->societe->contact->lire','$conf->societe->enabled || $conf->fournisseur->enabled',2,'2013-03-24 02:31:47'),(103164,'auguria',1,'product|service','top','products',0,NULL,NULL,3,'/product/index.php?mainmenu=products&leftmenu=','','Products/Services','products',-1,'','$user->rights->produit->lire||$user->rights->service->lire','$conf->product->enabled || $conf->service->enabled',0,'2013-03-24 02:31:47'),(103166,'auguria',1,'propal|commande|fournisseur|contrat|ficheinter','top','commercial',0,NULL,NULL,5,'/comm/index.php?mainmenu=commercial&leftmenu=','','Commercial','commercial',-1,'','$user->rights->societe->lire || $user->rights->societe->contact->lire','$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->facture->enabled || $conf->deplacement->enabled || $conf->don->enabled || $conf->tax->enabled',2,'2013-03-24 02:31:47'),(103167,'auguria',1,'comptabilite|accounting|facture|deplacement|don|tax','top','accountancy',0,NULL,NULL,6,'/compta/index.php?mainmenu=accountancy&leftmenu=','','MenuFinancial','compta',-1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->plancompte->lire || $user->rights->facture->lire|| $user->rights->deplacement->lire || $user->rights->don->lire || $user->rights->tax->charges->lire','$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->facture->enabled || $conf->deplacement->enabled || $conf->don->enabled || $conf->tax->enabled',2,'2013-03-24 02:31:47'),(103168,'auguria',1,'projet','top','project',0,NULL,NULL,7,'/projet/index.php?mainmenu=project&leftmenu=','','Projects','projects',-1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-03-24 02:31:47'),(103169,'auguria',1,'mailing|export|import','top','tools',0,NULL,NULL,8,'/core/tools.php?mainmenu=tools&leftmenu=','','Tools','other',-1,'','$user->rights->mailing->lire || $user->rights->export->lire || $user->rights->import->run','$conf->mailing->enabled || $conf->export->enabled || $conf->import->enabled',2,'2013-03-24 02:31:47'),(103172,'auguria',1,'boutique','top','shop',0,NULL,NULL,11,'/boutique/index.php?mainmenu=shop&leftmenu=','','OSCommerce','shop',-1,'','','! empty($conf->boutique->enabled)',0,'2013-03-24 02:31:47'),(103174,'auguria',1,'adherent','top','members',0,NULL,NULL,15,'/adherents/index.php?mainmenu=members&leftmenu=','','Members','members',-1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-03-24 02:31:47'),(103175,'auguria',1,'banque|prelevement','top','bank',0,NULL,NULL,6,'/compta/bank/index.php?mainmenu=bank&leftmenu=bank','','MenuBankCash','banks',-1,'','$user->rights->banque->lire || $user->rights->prelevement->bons->lire','$conf->banque->enabled || $conf->prelevement->enabled',0,'2013-03-24 02:31:47'),(103261,'auguria',1,'','left','home',103162,NULL,NULL,0,'/admin/index.php?leftmenu=setup','','Setup','admin',0,'setup','','$user->admin',2,'2013-03-24 02:31:47'),(103262,'auguria',1,'','left','home',103261,NULL,NULL,1,'/admin/company.php?leftmenu=setup','','MenuCompanySetup','admin',1,'','','$leftmenu==\'setup\'',2,'2013-03-24 02:31:47'),(103263,'auguria',1,'','left','home',103261,NULL,NULL,4,'/admin/ihm.php?leftmenu=setup','','GUISetup','admin',1,'','','$leftmenu==\'setup\'',2,'2013-03-24 02:31:47'),(103264,'auguria',1,'','left','home',103261,NULL,NULL,2,'/admin/modules.php?leftmenu=setup','','Modules','admin',1,'','','$leftmenu==\'setup\'',2,'2013-03-24 02:31:47'),(103265,'auguria',1,'','left','home',103261,NULL,NULL,5,'/admin/boxes.php?leftmenu=setup','','Boxes','admin',1,'','','$leftmenu==\'setup\'',2,'2013-03-24 02:31:47'),(103266,'auguria',1,'','left','home',103261,NULL,NULL,3,'/admin/menus.php?leftmenu=setup','','Menus','admin',1,'','','$leftmenu==\'setup\'',2,'2013-03-24 02:31:47'),(103267,'auguria',1,'','left','home',103261,NULL,NULL,6,'/admin/delais.php?leftmenu=setup','','Alerts','admin',1,'','','$leftmenu==\'setup\'',2,'2013-03-24 02:31:47'),(103268,'auguria',1,'','left','home',103261,NULL,NULL,9,'/admin/pdf.php?leftmenu=setup','','PDF','admin',1,'','','$leftmenu==\'setup\'',2,'2013-03-24 02:31:47'),(103269,'auguria',1,'','left','home',103261,NULL,NULL,7,'/admin/proxy.php?leftmenu=setup','','Security','admin',1,'','','$leftmenu==\'setup\'',2,'2013-03-24 02:31:47'),(103270,'auguria',1,'','left','home',103261,NULL,NULL,10,'/admin/mails.php?leftmenu=setup','','Emails','admin',1,'','','$leftmenu==\'setup\'',2,'2013-03-24 02:31:47'),(103271,'auguria',1,'','left','home',103261,NULL,NULL,8,'/admin/limits.php?leftmenu=setup','','MenuLimits','admin',1,'','','$leftmenu==\'setup\'',2,'2013-03-24 02:31:47'),(103272,'auguria',1,'','left','home',103261,NULL,NULL,12,'/admin/dict.php?leftmenu=setup','','DictionnarySetup','admin',1,'','','$leftmenu==\'setup\'',2,'2013-03-24 02:31:47'),(103273,'auguria',1,'','left','home',103261,NULL,NULL,13,'/admin/const.php?leftmenu=setup','','OtherSetup','admin',1,'','','$leftmenu==\'setup\'',2,'2013-03-24 02:31:47'),(103274,'auguria',1,'','left','home',103261,NULL,NULL,11,'/admin/sms.php?leftmenu=setup','','Sms','admin',1,'','','$leftmenu==\'setup\'',2,'2013-03-24 02:31:47'),(103362,'auguria',1,'','left','home',103461,NULL,NULL,0,'/admin/system/dolibarr.php?leftmenu=admintools','','InfoDolibarr','admin',1,'','','$leftmenu==\'admintools\'',2,'2013-03-24 02:31:47'),(103364,'auguria',1,'','left','home',103461,NULL,NULL,13,'/admin/system/about.php?leftmenu=admintools','','About','admin',1,'','','$leftmenu==\'admintools\'',2,'2013-03-24 02:31:47'),(103365,'auguria',1,'','left','home',103461,NULL,NULL,1,'/admin/system/os.php?leftmenu=admintools','','InfoOS','admin',1,'','','$leftmenu==\'admintools\'',2,'2013-03-24 02:31:47'),(103366,'auguria',1,'','left','home',103461,NULL,NULL,2,'/admin/system/web.php?leftmenu=admintools','','InfoWebServer','admin',1,'','','$leftmenu==\'admintools\'',2,'2013-03-24 02:31:47'),(103367,'auguria',1,'','left','home',103461,NULL,NULL,3,'/admin/system/phpinfo.php?leftmenu=admintools','','InfoPHP','admin',1,'','','$leftmenu==\'admintools\'',2,'2013-03-24 02:31:47'),(103368,'auguria',1,'','left','home',103362,NULL,NULL,3,'/admin/triggers.php?leftmenu=admintools','','Triggers','admin',2,'','','$leftmenu==\'admintools\'',2,'2013-03-24 02:31:47'),(103369,'auguria',1,'','left','home',103362,NULL,NULL,2,'/admin/system/modules.php?leftmenu=admintools','','Modules','admin',2,'','','$leftmenu==\'admintools\'',2,'2013-03-24 02:31:47'),(103371,'auguria',1,'','left','home',103461,NULL,NULL,4,'/admin/system/database.php?leftmenu=admintools','','InfoDatabase','admin',1,'','','$leftmenu==\'admintools\'',2,'2013-03-24 02:31:47'),(103461,'auguria',1,'','left','home',103162,NULL,NULL,2,'/admin/tools/index.php?leftmenu=admintools','','SystemTools','admin',0,'admintools','','$user->admin',2,'2013-03-24 02:31:47'),(103462,'auguria',1,'','left','home',103461,NULL,NULL,5,'/admin/tools/dolibarr_export.php?leftmenu=admintools','','Backup','admin',1,'','','$leftmenu==\'admintools\'',2,'2013-03-24 02:31:47'),(103463,'auguria',1,'','left','home',103461,NULL,NULL,6,'/admin/tools/dolibarr_import.php?leftmenu=admintools','','Restore','admin',1,'','','$leftmenu==\'admintools\'',2,'2013-03-24 02:31:47'),(103464,'auguria',1,'','left','home',103461,NULL,NULL,11,'/admin/tools/purge.php?leftmenu=admintools','','Purge','admin',1,'','','$leftmenu==\'admintools\'',2,'2013-03-24 02:31:47'),(103465,'auguria',1,'','left','home',103461,NULL,NULL,8,'/admin/tools/eaccelerator.php?leftmenu=admintools','','EAccelerator','admin',1,'','','$leftmenu==\'admintools\' && function_exists(\'eaccelerator_info\')',2,'2013-03-24 02:31:47'),(103466,'auguria',1,'','left','home',103461,NULL,NULL,7,'/admin/tools/update.php?leftmenu=admintools','','MenuUpgrade','admin',1,'','','$leftmenu==\'admintools\'',2,'2013-03-24 02:31:47'),(103467,'auguria',1,'','left','home',103461,NULL,NULL,9,'/admin/tools/listevents.php?leftmenu=admintools','','Audit','admin',1,'','','$leftmenu==\'admintools\'',2,'2013-03-24 02:31:47'),(103468,'auguria',1,'','left','home',103461,NULL,NULL,12,'/support/index.php?leftmenu=admintools','_blank','HelpCenter','help',1,'','','$leftmenu==\'admintools\'',2,'2013-03-24 02:31:47'),(103469,'auguria',1,'','left','home',103461,NULL,NULL,10,'/admin/tools/listsessions.php?leftmenu=admintools','','Sessions','admin',1,'','','$leftmenu==\'admintools\'',2,'2013-03-24 02:31:47'),(103561,'auguria',1,'','left','home',103162,NULL,NULL,3,'/user/home.php?leftmenu=users','','MenuUsersAndGroups','users',0,'users','','1',2,'2013-03-24 02:31:47'),(103562,'auguria',1,'','left','home',103561,NULL,NULL,0,'/user/index.php?leftmenu=users','','Users','users',1,'','$user->rights->user->user->lire || $user->admin','$leftmenu==\'users\'',2,'2013-03-24 02:31:47'),(103563,'auguria',1,'','left','home',103562,NULL,NULL,0,'/user/fiche.php?leftmenu=users&action=create','','NewUser','users',2,'','$user->rights->user->user->creer || $user->admin','$leftmenu==\'users\'',2,'2013-03-24 02:31:47'),(103564,'auguria',1,'','left','home',103561,NULL,NULL,1,'/user/group/index.php?leftmenu=users','','Groups','users',1,'','($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->read:$user->rights->user->user->lire) || $user->admin','$leftmenu==\'users\'',2,'2013-03-24 02:31:47'),(103565,'auguria',1,'','left','home',103564,NULL,NULL,0,'/user/group/fiche.php?leftmenu=users&action=create','','NewGroup','users',2,'','($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->write:$user->rights->user->user->creer) || $user->admin','$leftmenu==\'users\'',2,'2013-03-24 02:31:47'),(103661,'auguria',1,'','left','companies',103163,NULL,NULL,0,'/societe/index.php?leftmenu=thirdparties','','ThirdParty','companies',0,'thirdparties','$user->rights->societe->lire','$conf->societe->enabled',2,'2013-03-24 02:31:47'),(103662,'auguria',1,'','left','companies',103661,NULL,NULL,0,'/societe/soc.php?action=create','','MenuNewThirdParty','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2013-03-24 02:31:47'),(103664,'auguria',1,'','left','companies',103661,NULL,NULL,5,'/fourn/liste.php?leftmenu=suppliers','','ListSuppliersShort','suppliers',1,'','$user->rights->societe->lire && $user->rights->fournisseur->lire','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2013-03-24 02:31:47'),(103665,'auguria',1,'','left','companies',103664,NULL,NULL,0,'/societe/soc.php?leftmenu=supplier&action=create&type=f','','NewSupplier','suppliers',2,'','$user->rights->societe->creer','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2013-03-24 02:31:47'),(103667,'auguria',1,'','left','companies',103661,NULL,NULL,3,'/comm/prospect/list.php?leftmenu=prospects','','ListProspectsShort','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2013-03-24 02:31:47'),(103668,'auguria',1,'','left','companies',103667,NULL,NULL,0,'/societe/soc.php?leftmenu=prospects&action=create&type=p','','MenuNewProspect','companies',2,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2013-03-24 02:31:47'),(103670,'auguria',1,'','left','companies',103661,NULL,NULL,4,'/comm/list.php?leftmenu=customers','','ListCustomersShort','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2013-03-24 02:31:47'),(103671,'auguria',1,'','left','companies',103670,NULL,NULL,0,'/societe/soc.php?leftmenu=customers&action=create&type=c','','MenuNewCustomer','companies',2,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2013-03-24 02:31:47'),(103761,'auguria',1,'','left','companies',103163,NULL,NULL,1,'/contact/list.php?leftmenu=contacts','','ContactsAddresses','companies',0,'contacts','$user->rights->societe->lire','$conf->societe->enabled',2,'2013-03-24 02:31:47'),(103762,'auguria',1,'','left','companies',103761,NULL,NULL,0,'/contact/fiche.php?leftmenu=contacts&action=create','','NewContactAddress','companies',1,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2013-03-24 02:31:47'),(103763,'auguria',1,'','left','companies',103761,NULL,NULL,1,'/contact/list.php?leftmenu=contacts','','List','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2013-03-24 02:31:47'),(103765,'auguria',1,'','left','companies',103763,NULL,NULL,1,'/contact/list.php?leftmenu=contacts&type=p','','Prospects','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2013-03-24 02:31:47'),(103766,'auguria',1,'','left','companies',103763,NULL,NULL,2,'/contact/list.php?leftmenu=contacts&type=c','','Customers','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2013-03-24 02:31:47'),(103767,'auguria',1,'','left','companies',103763,NULL,NULL,3,'/contact/list.php?leftmenu=contacts&type=f','','Suppliers','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2013-03-24 02:31:47'),(103768,'auguria',1,'','left','companies',103763,NULL,NULL,4,'/contact/list.php?leftmenu=contacts&type=o','','Others','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2013-03-24 02:31:47'),(103811,'auguria',1,'','left','companies',103163,NULL,NULL,3,'/categories/index.php?leftmenu=cat&type=1','','SuppliersCategoriesShort','categories',0,'cat','$user->rights->categorie->lire','$conf->societe->enabled && $conf->categorie->enabled',2,'2013-03-24 02:31:47'),(103812,'auguria',1,'','left','companies',103811,NULL,NULL,0,'/categories/fiche.php?action=create&type=1','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->societe->enabled && $conf->categorie->enabled',2,'2013-03-24 02:31:47'),(103821,'auguria',1,'','left','companies',103163,NULL,NULL,4,'/categories/index.php?leftmenu=cat&type=2','','CustomersProspectsCategoriesShort','categories',0,'cat','$user->rights->categorie->lire','$conf->fournisseur->enabled && $conf->categorie->enabled',2,'2013-03-24 02:31:47'),(103822,'auguria',1,'','left','companies',103821,NULL,NULL,0,'/categories/fiche.php?action=create&type=2','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->fournisseur->enabled && $conf->categorie->enabled',2,'2013-03-24 02:31:47'),(104261,'auguria',1,'','left','commercial',103166,NULL,NULL,4,'/comm/propal/index.php?leftmenu=propals','','Prop','propal',0,'propals','$user->rights->propale->lire','$conf->propal->enabled',2,'2013-03-24 02:31:47'),(104262,'auguria',1,'','left','commercial',104261,NULL,NULL,0,'/societe/societe.php?leftmenu=propals','','NewPropal','propal',1,'','$user->rights->propale->creer','$conf->propal->enabled',2,'2013-03-24 02:31:47'),(104263,'auguria',1,'','left','commercial',104261,NULL,NULL,1,'/comm/propal/list.php?leftmenu=propals','','List','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled',2,'2013-03-24 02:31:47'),(104264,'auguria',1,'','left','commercial',104263,NULL,NULL,2,'/comm/propal/list.php?leftmenu=propals&viewstatut=0','','PropalsDraft','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2013-03-24 02:31:47'),(104265,'auguria',1,'','left','commercial',104263,NULL,NULL,3,'/comm/propal/list.php?leftmenu=propals&viewstatut=1','','PropalsOpened','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2013-03-24 02:31:47'),(104266,'auguria',1,'','left','commercial',104263,NULL,NULL,4,'/comm/propal/list.php?leftmenu=propals&viewstatut=2','','PropalStatusSigned','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2013-03-24 02:31:47'),(104267,'auguria',1,'','left','commercial',104263,NULL,NULL,5,'/comm/propal/list.php?leftmenu=propals&viewstatut=3','','PropalStatusNotSigned','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2013-03-24 02:31:47'),(104268,'auguria',1,'','left','commercial',104263,NULL,NULL,6,'/comm/propal/list.php?leftmenu=propals&viewstatut=4','','PropalStatusBilled','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2013-03-24 02:31:47'),(104271,'auguria',1,'','left','commercial',104261,NULL,NULL,4,'/comm/propal/stats/index.php?leftmenu=propals','','Statistics','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled',2,'2013-03-24 02:31:47'),(104361,'auguria',1,'','left','commercial',103166,NULL,NULL,5,'/commande/index.php?leftmenu=orders','','CustomersOrders','orders',0,'orders','$user->rights->commande->lire','$conf->commande->enabled',2,'2013-03-24 02:31:47'),(104362,'auguria',1,'','left','commercial',104361,NULL,NULL,0,'/societe/societe.php?leftmenu=orders','','NewOrder','orders',1,'','$user->rights->commande->creer','$conf->commande->enabled',2,'2013-03-24 02:31:47'),(104363,'auguria',1,'','left','commercial',104361,NULL,NULL,1,'/commande/liste.php?leftmenu=orders','','List','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled',2,'2013-03-24 02:31:47'),(104364,'auguria',1,'','left','commercial',104363,NULL,NULL,2,'/commande/liste.php?leftmenu=orders&viewstatut=0','','StatusOrderDraftShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-03-24 02:31:47'),(104365,'auguria',1,'','left','commercial',104363,NULL,NULL,3,'/commande/liste.php?leftmenu=orders&viewstatut=1','','StatusOrderValidated','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-03-24 02:31:47'),(104366,'auguria',1,'','left','commercial',104363,NULL,NULL,4,'/commande/liste.php?leftmenu=orders&viewstatut=2','','StatusOrderOnProcessShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-03-24 02:31:47'),(104367,'auguria',1,'','left','commercial',104363,NULL,NULL,5,'/commande/liste.php?leftmenu=orders&viewstatut=3','','StatusOrderToBill','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-03-24 02:31:47'),(104368,'auguria',1,'','left','commercial',104363,NULL,NULL,6,'/commande/liste.php?leftmenu=orders&viewstatut=4','','StatusOrderProcessed','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-03-24 02:31:47'),(104369,'auguria',1,'','left','commercial',104363,NULL,NULL,7,'/commande/liste.php?leftmenu=orders&viewstatut=-1','','StatusOrderCanceledShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-03-24 02:31:47'),(104370,'auguria',1,'','left','commercial',104361,NULL,NULL,4,'/commande/stats/index.php?leftmenu=orders','','Statistics','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled',2,'2013-03-24 02:31:47'),(104461,'auguria',1,'','left','commercial',103164,NULL,NULL,6,'/expedition/index.php?leftmenu=sendings','','Shipments','sendings',0,'sendings','$user->rights->expedition->lire','$conf->expedition->enabled',2,'2013-03-24 02:31:47'),(104462,'auguria',1,'','left','commercial',104461,NULL,NULL,0,'/expedition/fiche.php?action=create2&leftmenu=sendings','','NewSending','sendings',1,'','$user->rights->expedition->creer','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2013-03-24 02:31:47'),(104463,'auguria',1,'','left','commercial',104461,NULL,NULL,1,'/expedition/liste.php?leftmenu=sendings','','List','sendings',1,'','$user->rights->expedition->lire','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2013-03-24 02:31:47'),(104464,'auguria',1,'','left','commercial',104461,NULL,NULL,2,'/expedition/stats/index.php?leftmenu=sendings','','Statistics','sendings',1,'','$user->rights->expedition->lire','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2013-03-24 02:31:47'),(104561,'auguria',1,'','left','commercial',103166,NULL,NULL,7,'/contrat/index.php?leftmenu=contracts','','Contracts','contracts',0,'contracts','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2013-03-24 02:31:47'),(104562,'auguria',1,'','left','commercial',104561,NULL,NULL,0,'/societe/societe.php?leftmenu=contracts','','NewContract','contracts',1,'','$user->rights->contrat->creer','$conf->contrat->enabled',2,'2013-03-24 02:31:47'),(104563,'auguria',1,'','left','commercial',104561,NULL,NULL,1,'/contrat/liste.php?leftmenu=contracts','','List','contracts',1,'','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2013-03-24 02:31:47'),(104564,'auguria',1,'','left','commercial',104561,NULL,NULL,2,'/contrat/services.php?leftmenu=contracts','','MenuServices','contracts',1,'','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2013-03-24 02:31:47'),(104565,'auguria',1,'','left','commercial',104564,NULL,NULL,0,'/contrat/services.php?leftmenu=contracts&mode=0','','MenuInactiveServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled&&$leftmenu==\"contracts\"',2,'2013-03-24 02:31:47'),(104566,'auguria',1,'','left','commercial',104564,NULL,NULL,1,'/contrat/services.php?leftmenu=contracts&mode=4','','MenuRunningServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled&&$leftmenu==\"contracts\"',2,'2013-03-24 02:31:47'),(104567,'auguria',1,'','left','commercial',104564,NULL,NULL,2,'/contrat/services.php?leftmenu=contracts&mode=4&filter=expired','','MenuExpiredServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled&&$leftmenu==\"contracts\"',2,'2013-03-24 02:31:47'),(104568,'auguria',1,'','left','commercial',104564,NULL,NULL,3,'/contrat/services.php?leftmenu=contracts&mode=5','','MenuClosedServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled&&$leftmenu==\"contracts\"',2,'2013-03-24 02:31:47'),(104661,'auguria',1,'','left','commercial',103166,NULL,NULL,8,'/fichinter/list.php?leftmenu=ficheinter','','Interventions','interventions',0,'ficheinter','$user->rights->ficheinter->lire','$conf->ficheinter->enabled',2,'2013-03-24 02:31:47'),(104662,'auguria',1,'','left','commercial',104661,NULL,NULL,0,'/fichinter/fiche.php?action=create&leftmenu=ficheinter','','NewIntervention','interventions',1,'','$user->rights->ficheinter->creer','$conf->ficheinter->enabled',2,'2013-03-24 02:31:47'),(104663,'auguria',1,'','left','commercial',104661,NULL,NULL,1,'/fichinter/list.php?leftmenu=ficheinter','','List','interventions',1,'','$user->rights->ficheinter->lire','$conf->ficheinter->enabled',2,'2013-03-24 02:31:47'),(104761,'auguria',1,'','left','accountancy',103167,NULL,NULL,3,'/fourn/facture/index.php?leftmenu=suppliers_bills','','BillsSuppliers','bills',0,'supplier_bills','$user->rights->fournisseur->facture->lire','$conf->fournisseur->enabled',2,'2013-03-24 02:31:47'),(104762,'auguria',1,'','left','accountancy',104761,NULL,NULL,0,'/fourn/facture/fiche.php?action=create&leftmenu=suppliers_bills','','NewBill','bills',1,'','$user->rights->fournisseur->facture->creer','$conf->fournisseur->enabled',2,'2013-03-24 02:31:47'),(104763,'auguria',1,'','left','accountancy',104761,NULL,NULL,1,'/fourn/facture/impayees.php?leftmenu=suppliers_bills','','Unpaid','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->fournisseur->enabled',2,'2013-03-24 02:31:47'),(104764,'auguria',1,'','left','accountancy',104761,NULL,NULL,2,'/fourn/facture/paiement.php?leftmenu=suppliers_bills','','Payments','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->fournisseur->enabled',2,'2013-03-24 02:31:47'),(104765,'auguria',1,'','left','accountancy',104761,NULL,NULL,8,'/compta/facture/stats/index.php?leftmenu=customers_bills&mode=supplier','','Statistics','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->fournisseur->enabled',2,'2013-03-24 02:31:47'),(104861,'auguria',1,'','left','accountancy',103167,NULL,NULL,3,'/compta/facture/list.php?leftmenu=customers_bills','','BillsCustomers','bills',0,'customer_bills','$user->rights->facture->lire','$conf->facture->enabled',2,'2013-03-24 02:31:47'),(104862,'auguria',1,'','left','accountancy',104861,NULL,NULL,3,'/compta/clients.php?action=facturer&leftmenu=customers_bills','','NewBill','bills',1,'','$user->rights->facture->creer','$conf->facture->enabled',2,'2013-03-24 02:31:47'),(104863,'auguria',1,'','left','accountancy',104861,NULL,NULL,4,'/compta/facture/fiche-rec.php?leftmenu=customers_bills','','Repeatable','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2013-03-24 02:31:47'),(104864,'auguria',1,'','left','accountancy',104861,NULL,NULL,5,'/compta/facture/impayees.php?action=facturer&leftmenu=customers_bills','','Unpaid','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2013-03-24 02:31:47'),(104865,'auguria',1,'','left','accountancy',104861,NULL,NULL,6,'/compta/paiement/liste.php?leftmenu=customers_bills','','Payments','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2013-03-24 02:31:47'),(104871,'auguria',1,'','left','accountancy',104865,NULL,NULL,1,'/compta/paiement/rapport.php?leftmenu=customers_bills','','Reportings','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2013-03-24 02:31:47'),(104872,'auguria',1,'','left','accountancy',103175,NULL,NULL,9,'/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank','','MenuChequeDeposits','bills',0,'checks','$user->rights->facture->lire','$conf->facture->enabled && $conf->banque->enabled',2,'2013-03-24 02:31:47'),(104873,'auguria',1,'','left','accountancy',104872,NULL,NULL,0,'/compta/paiement/cheque/fiche.php?leftmenu=checks&action=new','','NewCheckDeposit','compta',1,'','$user->rights->facture->lire','$conf->facture->enabled && $conf->banque->enabled',2,'2013-03-24 02:31:47'),(104874,'auguria',1,'','left','accountancy',104872,NULL,NULL,1,'/compta/paiement/cheque/liste.php?leftmenu=checks','','List','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled && $conf->banque->enabled',2,'2013-03-24 02:31:47'),(104875,'auguria',1,'','left','accountancy',104861,NULL,NULL,8,'/compta/facture/stats/index.php?leftmenu=customers_bills','','Statistics','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2013-03-24 02:31:47'),(105061,'auguria',1,'','left','accountancy',103167,NULL,NULL,3,'/commande/liste.php?leftmenu=orders&viewstatut=3','','MenuOrdersToBill','orders',0,'orders','$user->rights->commande->lire','$conf->commande->enabled',0,'2013-03-24 02:31:47'),(105161,'auguria',1,'','left','accountancy',103167,NULL,NULL,4,'/compta/dons/index.php?leftmenu=donations&mainmenu=accountancy','','Donations','donations',0,'donations','$user->rights->don->lire','$conf->don->enabled',2,'2013-03-24 02:31:47'),(105162,'auguria',1,'','left','accountancy',105161,NULL,NULL,0,'/compta/dons/fiche.php?leftmenu=donations&mainmenu=accountancy&action=create','','NewDonation','donations',1,'','$user->rights->don->creer','$conf->don->enabled && $leftmenu==\"donations\"',2,'2013-03-24 02:31:47'),(105163,'auguria',1,'','left','accountancy',105161,NULL,NULL,1,'/compta/dons/liste.php?leftmenu=donations&mainmenu=accountancy','','List','donations',1,'','$user->rights->don->lire','$conf->don->enabled && $leftmenu==\"donations\"',2,'2013-03-24 02:31:47'),(105261,'auguria',1,'','left','accountancy',103167,NULL,NULL,5,'/compta/deplacement/index.php?leftmenu=tripsandexpenses','','TripsAndExpenses','trips',0,'tripsandexpenses','$user->rights->deplacement->lire','$conf->deplacement->enabled',0,'2013-03-24 02:31:47'),(105262,'auguria',1,'','left','accountancy',105261,NULL,NULL,1,'/compta/deplacement/fiche.php?action=create&leftmenu=tripsandexpenses','','New','trips',1,'','$user->rights->deplacement->creer','$conf->deplacement->enabled && $leftmenu==\"tripsandexpenses\"',0,'2013-03-24 02:31:47'),(105263,'auguria',1,'','left','accountancy',105261,NULL,NULL,2,'/compta/deplacement/list.php?leftmenu=tripsandexpenses','','List','trips',1,'','$user->rights->deplacement->lire','$conf->deplacement->enabled && $leftmenu==\"tripsandexpenses\"',0,'2013-03-24 02:31:47'),(105264,'auguria',1,'','left','accountancy',105261,NULL,NULL,2,'/compta/deplacement/stats/index.php?leftmenu=tripsandexpenses','','Statistics','trips',1,'','$user->rights->deplacement->lire','$conf->deplacement->enabled && $leftmenu==\"tripsandexpenses\"',0,'2013-03-24 02:31:47'),(105361,'auguria',1,'','left','accountancy',103167,NULL,NULL,6,'/compta/charges/index.php?leftmenu=tax&mainmenu=accountancy','','MenuTaxAndDividends','compta',0,'tax','$user->rights->tax->charges->lire','$conf->tax->enabled',0,'2013-03-24 02:31:47'),(105362,'auguria',1,'','left','accountancy',105361,NULL,NULL,1,'/compta/sociales/index.php?leftmenu=tax_social','','SocialContributions','',1,'tax_social','$user->rights->tax->charges->lire','$conf->tax->enabled',0,'2013-03-24 02:31:47'),(105363,'auguria',1,'','left','accountancy',105362,NULL,NULL,2,'/compta/sociales/charges.php?leftmenu=tax_social&action=create','','MenuNewSocialContribution','',2,'','$user->rights->tax->charges->creer','$conf->tax->enabled && $leftmenu==\"tax_social\"',0,'2013-03-24 02:31:47'),(105364,'auguria',1,'','left','accountancy',105362,NULL,NULL,3,'/compta/charges/index.php?leftmenu=tax_social&mainmenu=accountancy&mode=sconly','','Payments','',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && $leftmenu==\"tax_social\"',0,'2013-03-24 02:31:47'),(105461,'auguria',1,'','left','accountancy',105361,NULL,NULL,7,'/compta/tva/index.php?leftmenu=tax_vat&mainmenu=accountancy','','VAT','companies',1,'tax_vat','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS)',0,'2013-03-24 02:31:47'),(105462,'auguria',1,'','left','accountancy',105461,NULL,NULL,0,'/compta/tva/fiche.php?leftmenu=tax_vat&action=create','','NewPayment','companies',2,'','$user->rights->tax->charges->creer','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2013-03-24 02:31:47'),(105463,'auguria',1,'','left','accountancy',105461,NULL,NULL,1,'/compta/tva/reglement.php?leftmenu=tax_vat','','Payments','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2013-03-24 02:31:47'),(105464,'auguria',1,'','left','accountancy',105461,NULL,NULL,2,'/compta/tva/clients.php?leftmenu=tax_vat','','ReportByCustomers','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2013-03-24 02:31:47'),(105465,'auguria',1,'','left','accountancy',105461,NULL,NULL,3,'/compta/tva/quadri_detail.php?leftmenu=tax_vat','','ReportByQuarter','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2013-03-24 02:31:47'),(105561,'auguria',1,'','left','accountancy',103167,NULL,NULL,8,'/compta/ventilation/index.php?leftmenu=ventil','','Ventilation','companies',0,'ventil','$user->rights->compta->ventilation->lire','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-03-24 02:31:47'),(105562,'auguria',1,'','left','accountancy',105561,NULL,NULL,0,'/compta/ventilation/liste.php','','ToDispatch','companies',1,'','$user->rights->compta->ventilation->lire','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-03-24 02:31:47'),(105563,'auguria',1,'','left','accountancy',105561,NULL,NULL,1,'/compta/ventilation/lignes.php','','Dispatched','companies',1,'','$user->rights->compta->ventilation->lire','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-03-24 02:31:47'),(105564,'auguria',1,'','left','accountancy',105561,NULL,NULL,2,'/compta/param/','','Setup','companies',1,'','$user->rights->compta->ventilation->parametrer','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-03-24 02:31:47'),(105565,'auguria',1,'','left','accountancy',105564,NULL,NULL,0,'/compta/param/comptes/liste.php','','List','companies',2,'','$user->rights->compta->ventilation->parametrer','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-03-24 02:31:47'),(105566,'auguria',1,'','left','accountancy',105564,NULL,NULL,1,'/compta/param/comptes/fiche.php?action=create','','New','companies',2,'','$user->rights->compta->ventilation->parametrer','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-03-24 02:31:47'),(105567,'auguria',1,'','left','accountancy',105561,NULL,NULL,3,'/compta/export/','','Export','companies',1,'','$user->rights->compta->ventilation->lire','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-03-24 02:31:47'),(105568,'auguria',1,'','left','accountancy',105567,NULL,NULL,0,'/compta/export/index.php','','New','companies',2,'','$user->rights->compta->ventilation->lire','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-03-24 02:31:47'),(105569,'auguria',1,'','left','accountancy',105567,NULL,NULL,1,'/compta/export/liste.php','','List','companies',2,'','$user->rights->compta->ventilation->lire','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-03-24 02:31:47'),(105661,'auguria',1,'','left','accountancy',103175,NULL,NULL,9,'/compta/prelevement/index.php?leftmenu=withdraw&mainmenu=bank','','StandingOrders','withdrawals',0,'withdraw','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled',2,'2013-03-24 02:31:47'),(105663,'auguria',1,'','left','accountancy',105661,NULL,NULL,0,'/compta/prelevement/create.php?leftmenu=withdraw','','NewStandingOrder','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2013-03-24 02:31:47'),(105664,'auguria',1,'','left','accountancy',105661,NULL,NULL,2,'/compta/prelevement/bons.php?leftmenu=withdraw','','WithdrawalsReceipts','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2013-03-24 02:31:47'),(105665,'auguria',1,'','left','accountancy',105661,NULL,NULL,3,'/compta/prelevement/liste.php?leftmenu=withdraw','','WithdrawalsLines','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2013-03-24 02:31:47'),(105667,'auguria',1,'','left','accountancy',105661,NULL,NULL,5,'/compta/prelevement/rejets.php?leftmenu=withdraw','','Rejects','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2013-03-24 02:31:47'),(105668,'auguria',1,'','left','accountancy',105661,NULL,NULL,6,'/compta/prelevement/stats.php?leftmenu=withdraw','','Statistics','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2013-03-24 02:31:47'),(105761,'auguria',1,'','left','accountancy',103175,NULL,NULL,1,'/compta/bank/index.php?leftmenu=bank&mainmenu=bank','','MenuBankCash','banks',0,'bank','$user->rights->banque->lire','$conf->banque->enabled',0,'2013-03-24 02:31:47'),(105762,'auguria',1,'','left','accountancy',105761,NULL,NULL,0,'/compta/bank/fiche.php?action=create&leftmenu=bank','','MenuNewFinancialAccount','banks',1,'','$user->rights->banque->configurer','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2013-03-24 02:31:47'),(105763,'auguria',1,'','left','accountancy',105761,NULL,NULL,1,'/compta/bank/categ.php?leftmenu=bank','','Rubriques','categories',1,'','$user->rights->banque->configurer','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2013-03-24 02:31:47'),(105764,'auguria',1,'','left','accountancy',105761,NULL,NULL,2,'/compta/bank/search.php?leftmenu=bank','','ListTransactions','banks',1,'','$user->rights->banque->lire','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2013-03-24 02:31:47'),(105765,'auguria',1,'','left','accountancy',105761,NULL,NULL,3,'/compta/bank/budget.php?leftmenu=bank','','ListTransactionsByCategory','banks',1,'','$user->rights->banque->lire','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2013-03-24 02:31:47'),(105767,'auguria',1,'','left','accountancy',105761,NULL,NULL,5,'/compta/bank/virement.php?leftmenu=bank','','BankTransfers','banks',1,'','$user->rights->banque->transfer','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2013-03-24 02:31:47'),(105861,'auguria',1,'','left','accountancy',103167,NULL,NULL,11,'/compta/resultat/index.php?leftmenu=ca&mainmenu=accountancy','','Reportings','main',0,'ca','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2013-03-24 02:31:47'),(105862,'auguria',1,'','left','accountancy',105861,NULL,NULL,0,'/compta/resultat/index.php?leftmenu=ca','','ReportInOut','main',1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2013-03-24 02:31:47'),(105863,'auguria',1,'','left','accountancy',105862,NULL,NULL,0,'/compta/resultat/clientfourn.php?leftmenu=ca','','ByCompanies','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2013-03-24 02:31:47'),(105864,'auguria',1,'','left','accountancy',105861,NULL,NULL,1,'/compta/stats/index.php?leftmenu=ca','','ReportTurnover','main',1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2013-03-24 02:31:47'),(105865,'auguria',1,'','left','accountancy',105864,NULL,NULL,0,'/compta/stats/casoc.php?leftmenu=ca','','ByCompanies','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2013-03-24 02:31:47'),(105866,'auguria',1,'','left','accountancy',105864,NULL,NULL,1,'/compta/stats/cabyuser.php?leftmenu=ca','','ByUsers','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2013-03-24 02:31:47'),(105867,'auguria',1,'','left','accountancy',105861,NULL,NULL,1,'/compta/journal/sellsjournal.php?leftmenu=ca','','SellsJournal','main',1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2013-03-24 02:31:47'),(105868,'auguria',1,'','left','accountancy',105861,NULL,NULL,1,'/compta/journal/purchasesjournal.php?leftmenu=ca','','PurchasesJournal','main',1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2013-03-24 02:31:47'),(105961,'auguria',1,'','left','products',103164,NULL,NULL,0,'/product/index.php?leftmenu=product&type=0','','Products','products',0,'product','$user->rights->produit->lire','$conf->product->enabled',2,'2013-03-24 02:31:47'),(105962,'auguria',1,'','left','products',105961,NULL,NULL,0,'/product/fiche.php?leftmenu=product&action=create&type=0','','NewProduct','products',1,'','$user->rights->produit->creer','$conf->product->enabled',2,'2013-03-24 02:31:47'),(105963,'auguria',1,'','left','products',105961,NULL,NULL,1,'/product/liste.php?leftmenu=product&type=0','','List','products',1,'','$user->rights->produit->lire','$conf->product->enabled',2,'2013-03-24 02:31:47'),(105964,'auguria',1,'','left','products',105961,NULL,NULL,4,'/product/reassort.php?type=0','','Stocks','products',1,'','$user->rights->produit->lire && $user->rights->stock->lire','$conf->product->enabled',2,'2013-03-24 02:31:47'),(105965,'auguria',1,'','left','products',105961,NULL,NULL,5,'/product/popuprop.php?leftmenu=stats&type=0','','Statistics','main',1,'','$user->rights->produit->lire','$conf->propal->enabled',2,'2013-03-24 02:31:47'),(106061,'auguria',1,'','left','products',103164,NULL,NULL,1,'/product/index.php?leftmenu=service&type=1','','Services','products',0,'service','$user->rights->service->lire','$conf->service->enabled',2,'2013-03-24 02:31:47'),(106062,'auguria',1,'','left','products',106061,NULL,NULL,0,'/product/fiche.php?leftmenu=service&action=create&type=1','','NewService','products',1,'','$user->rights->service->creer','$conf->service->enabled',2,'2013-03-24 02:31:47'),(106063,'auguria',1,'','left','products',106061,NULL,NULL,1,'/product/liste.php?leftmenu=service&type=1','','List','products',1,'','$user->rights->service->lire','$conf->service->enabled',2,'2013-03-24 02:31:47'),(106064,'auguria',1,'','left','products',106061,NULL,NULL,5,'/product/popuprop.php?leftmenu=stats&type=1','','Statistics','main',1,'','$user->rights->service->lire','$conf->propal->enabled',2,'2013-03-24 02:31:47'),(106261,'auguria',1,'','left','products',103164,NULL,NULL,3,'/product/stock/index.php?leftmenu=stock','','Stock','stocks',0,'stock','$user->rights->stock->lire','$conf->stock->enabled',2,'2013-03-24 02:31:47'),(106262,'auguria',1,'','left','products',106261,NULL,NULL,0,'/product/stock/fiche.php?action=create','','MenuNewWarehouse','stocks',1,'','$user->rights->stock->creer','$conf->stock->enabled',2,'2013-03-24 02:31:47'),(106263,'auguria',1,'','left','products',106261,NULL,NULL,1,'/product/stock/liste.php','','List','stocks',1,'','$user->rights->stock->lire','$conf->stock->enabled',2,'2013-03-24 02:31:47'),(106264,'auguria',1,'','left','products',106261,NULL,NULL,2,'/product/stock/valo.php','','EnhancedValue','stocks',1,'','$user->rights->stock->lire','$conf->stock->enabled',2,'2013-03-24 02:31:47'),(106265,'auguria',1,'','left','products',106261,NULL,NULL,3,'/product/stock/mouvement.php','','Movements','stocks',1,'','$user->rights->stock->mouvement->lire','$conf->stock->enabled',2,'2013-03-24 02:31:47'),(106361,'auguria',1,'','left','products',103164,NULL,NULL,4,'/categories/index.php?leftmenu=cat&type=0','','Categories','categories',0,'cat','$user->rights->categorie->lire','$conf->categorie->enabled',2,'2013-03-24 02:31:47'),(106362,'auguria',1,'','left','products',106361,NULL,NULL,0,'/categories/fiche.php?action=create&type=0','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->categorie->enabled',2,'2013-03-24 02:31:47'),(106761,'auguria',1,'','left','project',103168,NULL,NULL,0,'/projet/index.php?leftmenu=projects','','Projects','projects',0,'projects','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-03-24 02:31:47'),(106762,'auguria',1,'','left','project',106761,NULL,NULL,1,'/projet/fiche.php?leftmenu=projects&action=create','','NewProject','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled',2,'2013-03-24 02:31:47'),(106763,'auguria',1,'','left','project',106761,NULL,NULL,2,'/projet/liste.php?leftmenu=projects','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-03-24 02:31:47'),(106771,'auguria',1,'','left','project',103168,NULL,NULL,0,'/projet/index.php?leftmenu=projects&mode=mine','','MyProjects','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-03-24 02:31:47'),(106772,'auguria',1,'','left','project',106771,NULL,NULL,1,'/projet/fiche.php?leftmenu=projects&action=create&mode=mine','','NewProject','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled',2,'2013-03-24 02:31:47'),(106773,'auguria',1,'','left','project',106771,NULL,NULL,2,'/projet/liste.php?leftmenu=projects&mode=mine','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-03-24 02:31:47'),(106861,'auguria',1,'','left','project',103168,NULL,NULL,0,'/projet/activity/index.php?leftmenu=projects','','Activities','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-03-24 02:31:47'),(106862,'auguria',1,'','left','project',106861,NULL,NULL,1,'/projet/tasks.php?leftmenu=projects&action=create','','NewTask','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled',2,'2013-03-24 02:31:47'),(106863,'auguria',1,'','left','project',106861,NULL,NULL,2,'/projet/tasks/index.php?leftmenu=projects','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-03-24 02:31:47'),(106864,'auguria',1,'','left','project',106861,NULL,NULL,3,'/projet/activity/list.php?leftmenu=projects','','NewTimeSpent','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-03-24 02:31:47'),(106961,'auguria',1,'','left','project',103168,NULL,NULL,0,'/projet/activity/index.php?leftmenu=projects&mode=mine','','MyActivities','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-03-24 02:31:47'),(106962,'auguria',1,'','left','project',106961,NULL,NULL,1,'/projet/tasks.php?leftmenu=projects&action=create&mode=mine','','NewTask','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled',2,'2013-03-24 02:31:47'),(106963,'auguria',1,'','left','project',106961,NULL,NULL,2,'/projet/tasks/index.php?leftmenu=projects&mode=mine','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-03-24 02:31:47'),(106964,'auguria',1,'','left','project',106961,NULL,NULL,3,'/projet/activity/list.php?leftmenu=projects&mode=mine','','NewTimeSpent','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-03-24 02:31:47'),(107061,'auguria',1,'','left','tools',103169,NULL,NULL,0,'/comm/mailing/index.php?leftmenu=mailing','','EMailings','mails',0,'mailing','$user->rights->mailing->lire','$conf->mailing->enabled',0,'2013-03-24 02:31:47'),(107062,'auguria',1,'','left','tools',107061,NULL,NULL,0,'/comm/mailing/fiche.php?leftmenu=mailing&action=create','','NewMailing','mails',1,'','$user->rights->mailing->creer','$conf->mailing->enabled',0,'2013-03-24 02:31:47'),(107063,'auguria',1,'','left','tools',107061,NULL,NULL,1,'/comm/mailing/liste.php?leftmenu=mailing','','List','mails',1,'','$user->rights->mailing->lire','$conf->mailing->enabled',0,'2013-03-24 02:31:47'),(107261,'auguria',1,'','left','tools',103169,NULL,NULL,2,'/exports/index.php?leftmenu=export','','FormatedExport','exports',0,'export','$user->rights->export->lire','$conf->export->enabled',2,'2013-03-24 02:31:47'),(107262,'auguria',1,'','left','tools',107261,NULL,NULL,0,'/exports/export.php?leftmenu=export','','NewExport','exports',1,'','$user->rights->export->creer','$conf->export->enabled',2,'2013-03-24 02:31:47'),(107291,'auguria',1,'','left','tools',103169,NULL,NULL,2,'/imports/index.php?leftmenu=import','','FormatedImport','exports',0,'import','$user->rights->import->run','$conf->import->enabled',2,'2013-03-24 02:31:47'),(107292,'auguria',1,'','left','tools',107291,NULL,NULL,0,'/imports/import.php?leftmenu=import','','NewImport','exports',1,'','$user->rights->import->run','$conf->import->enabled',2,'2013-03-24 02:31:47'),(107361,'auguria',1,'','left','members',103174,NULL,NULL,0,'/adherents/index.php?leftmenu=members&mainmenu=members','','Members','members',0,'members','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-03-24 02:31:48'),(107362,'auguria',1,'','left','members',107361,NULL,NULL,0,'/adherents/fiche.php?leftmenu=members&action=create','','NewMember','members',1,'','$user->rights->adherent->creer','$conf->adherent->enabled',2,'2013-03-24 02:31:48'),(107363,'auguria',1,'','left','members',107361,NULL,NULL,1,'/adherents/liste.php','','List','members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-03-24 02:31:48'),(107364,'auguria',1,'','left','members',107363,NULL,NULL,2,'/adherents/liste.php?leftmenu=members&statut=-1','','MenuMembersToValidate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-03-24 02:31:48'),(107365,'auguria',1,'','left','members',107363,NULL,NULL,3,'/adherents/liste.php?leftmenu=members&statut=1','','MenuMembersValidated','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-03-24 02:31:48'),(107366,'auguria',1,'','left','members',107363,NULL,NULL,4,'/adherents/liste.php?leftmenu=members&statut=1&filter=outofdate','','MenuMembersNotUpToDate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-03-24 02:31:48'),(107367,'auguria',1,'','left','members',107363,NULL,NULL,5,'/adherents/liste.php?leftmenu=members&statut=1&filter=uptodate','','MenuMembersUpToDate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-03-24 02:31:48'),(107368,'auguria',1,'','left','members',107363,NULL,NULL,6,'/adherents/liste.php?leftmenu=members&statut=0','','MenuMembersResiliated','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-03-24 02:31:48'),(107369,'auguria',1,'','left','members',107361,NULL,NULL,7,'/adherents/stats/geo.php?leftmenu=members&mode=memberbycountry','','MenuMembersStats','members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-03-24 02:31:48'),(107461,'auguria',1,'','left','members',103174,NULL,NULL,1,'/adherents/index.php?leftmenu=members&mainmenu=members','','Subscriptions','compta',0,'','$user->rights->adherent->cotisation->lire','$conf->adherent->enabled',2,'2013-03-24 02:31:48'),(107462,'auguria',1,'','left','members',107461,NULL,NULL,0,'/adherents/liste.php?statut=-1&leftmenu=accountancy&mainmenu=members','','NewSubscription','compta',1,'','$user->rights->adherent->cotisation->creer','$conf->adherent->enabled',2,'2013-03-24 02:31:48'),(107463,'auguria',1,'','left','members',107461,NULL,NULL,1,'/adherents/cotisations.php?leftmenu=members','','List','compta',1,'','$user->rights->adherent->cotisation->lire','$conf->adherent->enabled',2,'2013-03-24 02:31:48'),(107464,'auguria',1,'','left','members',107461,NULL,NULL,7,'/adherents/stats/index.php?leftmenu=members','','MenuMembersStats','members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-03-24 02:31:48'),(107661,'auguria',1,'','left','members',103174,NULL,NULL,3,'/adherents/index.php?leftmenu=export&mainmenu=members','','Exports','members',0,'export','$user->rights->adherent->export','$conf->adherent->enabled',2,'2013-03-24 02:31:48'),(107662,'auguria',1,'','left','members',107661,NULL,NULL,0,'/exports/index.php?leftmenu=export','','Datas','members',1,'','$user->rights->adherent->export','$conf->adherent->enabled && $conf->export->enabled',2,'2013-03-24 02:31:48'),(107663,'auguria',1,'','left','members',107661,NULL,NULL,1,'/adherents/htpasswd.php?leftmenu=export','','Filehtpasswd','members',1,'','$user->rights->adherent->export','$conf->adherent->enabled',2,'2013-03-24 02:31:48'),(107664,'auguria',1,'','left','members',107661,NULL,NULL,2,'/adherents/cartes/carte.php?leftmenu=export','','MembersCards','members',1,'','$user->rights->adherent->export','$conf->adherent->enabled',2,'2013-03-24 02:31:48'),(107861,'auguria',1,'','left','members',103174,NULL,NULL,5,'/adherents/type.php?leftmenu=setup&mainmenu=members','','MembersTypes','members',0,'setup','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2013-03-24 02:31:48'),(107862,'auguria',1,'','left','members',107861,NULL,NULL,0,'/adherents/type.php?leftmenu=setup&mainmenu=members&action=create','','New','members',1,'','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2013-03-24 02:31:48'),(107863,'auguria',1,'','left','members',107861,NULL,NULL,1,'/adherents/type.php?leftmenu=setup&mainmenu=members','','List','members',1,'','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2013-03-24 02:31:48'),(108261,'auguria',1,'','left','commercial',103166,NULL,NULL,6,'/fourn/commande/index.php?leftmenu=orders_suppliers','','SuppliersOrders','orders',0,'orders_suppliers','$user->rights->fournisseur->commande->lire','$conf->fournisseur->enabled',2,'2013-03-24 02:31:47'),(108262,'auguria',1,'','left','commercial',108261,NULL,NULL,0,'/societe/societe.php?leftmenu=orders_suppliers','','NewOrder','orders',1,'','$user->rights->fournisseur->commande->creer','$conf->fournisseur->enabled',2,'2013-03-24 02:31:47'),(108263,'auguria',1,'','left','commercial',108261,NULL,NULL,1,'/fourn/commande/liste.php?leftmenu=orders_suppliers&viewstatut=0','','List','orders',1,'','$user->rights->fournisseur->commande->lire','$conf->fournisseur->enabled',2,'2013-03-24 02:31:47'),(108269,'auguria',1,'','left','commercial',108261,NULL,NULL,7,'/commande/stats/index.php?leftmenu=orders_suppliers&mode=supplier','','Statistics','orders',1,'','$user->rights->fournisseur->commande->lire','$conf->fournisseur->enabled',2,'2013-03-24 02:31:47'),(108361,'auguria',1,'','left','members',103174,NULL,NULL,3,'/categories/index.php?leftmenu=cat&type=3','','MembersCategoriesShort','categories',0,'cat','$user->rights->categorie->lire','$conf->adherent->enabled && $conf->categorie->enabled',2,'2013-03-24 02:31:48'),(108362,'auguria',1,'','left','members',108361,NULL,NULL,0,'/categories/fiche.php?action=create&type=3','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->adherent->enabled && $conf->categorie->enabled',2,'2013-03-24 02:31:48'),(108363,'all',1,'opensurvey','top','opensurvey',0,NULL,NULL,200,'/opensurvey/index.php','','Surveys','opensurvey@opensurvey',NULL,NULL,'$user->rights->opensurvey->survey->read','$conf->opensurvey->enabled',0,'2013-03-24 02:57:18'),(108364,'all',1,'opensurvey','left','opensurvey',-1,NULL,'opensurvey',200,'/opensurvey/index.php?mainmenu=opensurvey&leftmenu=opensurvey','','Survey','opensurvey@opensurvey',NULL,'opensurvey','','$conf->opensurvey->enabled',0,'2013-03-24 02:57:18'),(108365,'all',1,'opensurvey','left','opensurvey',-1,'opensurvey','opensurvey',210,'/opensurvey/public/index.php?origin=dolibarr','_blank','NewSurvey','opensurvey@opensurvey',NULL,'opensurvey_new','','$conf->opensurvey->enabled',0,'2013-03-24 02:57:18'),(108366,'all',1,'opensurvey','left','opensurvey',-1,'opensurvey','opensurvey',220,'/opensurvey/list.php','','List','opensurvey@opensurvey',NULL,'opensurvey_list','','$conf->opensurvey->enabled',0,'2013-03-24 02:57:18'),(108421,'all',1,'agenda','top','agenda',0,NULL,NULL,100,'/comm/action/index.php','','Agenda','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-11-07 01:19:05'),(108422,'all',1,'agenda','left','agenda',108421,NULL,NULL,100,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Actions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-11-07 01:19:05'),(108423,'all',1,'agenda','left','agenda',108422,NULL,NULL,101,'/comm/action/fiche.php?mainmenu=agenda&leftmenu=agenda&action=create','','NewAction','commercial',NULL,NULL,'($user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create)','$conf->agenda->enabled',2,'2013-11-07 01:19:05'),(108424,'all',1,'agenda','left','agenda',108422,NULL,NULL,102,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Calendar','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-11-07 01:19:05'),(108425,'all',1,'agenda','left','agenda',108424,NULL,NULL,103,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-11-07 01:19:05'),(108426,'all',1,'agenda','left','agenda',108424,NULL,NULL,104,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-11-07 01:19:05'),(108427,'all',1,'agenda','left','agenda',108424,NULL,NULL,105,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2013-11-07 01:19:05'),(108428,'all',1,'agenda','left','agenda',108424,NULL,NULL,106,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2013-11-07 01:19:05'),(108429,'all',1,'agenda','left','agenda',108422,NULL,NULL,112,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda','','List','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-11-07 01:19:05'),(108430,'all',1,'agenda','left','agenda',108429,NULL,NULL,113,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-11-07 01:19:05'),(108431,'all',1,'agenda','left','agenda',108429,NULL,NULL,114,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-11-07 01:19:05'),(108432,'all',1,'agenda','left','agenda',108429,NULL,NULL,115,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2013-11-07 01:19:05'),(108433,'all',1,'agenda','left','agenda',108429,NULL,NULL,116,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2013-11-07 01:19:05'),(108434,'all',1,'agenda','left','agenda',108422,NULL,NULL,120,'/comm/action/rapport/index.php?mainmenu=agenda&leftmenu=agenda','','Reportings','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$conf->agenda->enabled',2,'2013-11-07 01:19:05'),(108435,'all',1,'ecm','top','ecm',0,NULL,NULL,100,'/ecm/index.php','','MenuECM','ecm',NULL,NULL,'$user->rights->ecm->read || $user->rights->ecm->upload || $user->rights->ecm->setup','$conf->ecm->enabled',2,'2013-11-07 01:19:06'),(108436,'all',1,'ecm','left','ecm',108435,NULL,NULL,101,'/ecm/index.php','','ECMArea','ecm',NULL,NULL,'$user->rights->ecm->read || $user->rights->ecm->upload','$user->rights->ecm->read || $user->rights->ecm->upload',2,'2013-11-07 01:19:06'),(108437,'all',1,'ecm','left','ecm',108436,NULL,NULL,100,'/ecm/docdir.php?action=create','','ECMNewSection','ecm',NULL,NULL,'$user->rights->ecm->setup','$user->rights->ecm->setup',2,'2013-11-07 01:19:06'),(108438,'all',1,'ecm','left','ecm',108436,NULL,NULL,102,'/ecm/index.php?action=file_manager','','ECMFileManager','ecm',NULL,NULL,'$user->rights->ecm->read || $user->rights->ecm->upload','$user->rights->ecm->read || $user->rights->ecm->upload',2,'2013-11-07 01:19:06'); /*!40000 ALTER TABLE `llx_menu` ENABLE KEYS */; UNLOCK TABLES; From 45aac81b71a521c26fc1fb6e97334a49ed6badca Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 16 Nov 2013 18:12:13 +0100 Subject: [PATCH 050/107] Doc: More comments --- htdocs/core/js/lib_head.js | 29 +++++++++++++++++++---------- htdocs/core/tpl/ajaxrow.tpl.php | 6 +++--- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/htdocs/core/js/lib_head.js b/htdocs/core/js/lib_head.js index ae6182177d7..cfb2977c370 100644 --- a/htdocs/core/js/lib_head.js +++ b/htdocs/core/js/lib_head.js @@ -1,4 +1,4 @@ -// Copyright (C) 2005-2010 Laurent Destailleur +// Copyright (C) 2005-2013 Laurent Destailleur // Copyright (C) 2005-2012 Regis Houssin // // This program is free software; you can redistribute it and/or modify @@ -290,8 +290,10 @@ function loadXMLDoc(url,readyStateFunction,async) return req; } -// To hide/show select Boxes with IE6 (and only IE6 because IE6 has a bug and -// not put popup completely on the front) +/* To hide/show select Boxes with IE6 (and only IE6 because IE6 has a bug and + * not put popup completely on the front) + * Used only bu popup calendar + */ function hideSelectBoxes() { var brsVersion = parseInt(window.navigator.appVersion.charAt(0), 10); if (brsVersion <= 6 && window.navigator.userAgent.indexOf("MSIE 6") > -1) @@ -304,6 +306,10 @@ function hideSelectBoxes() { } } } +/* To hide/show select Boxes with IE6 (and only IE6 because IE6 has a bug and + * not put popup completely on the front) + * Used only bu popup calendar + */ function displaySelectBoxes() { var brsVersion = parseInt(window.navigator.appVersion.charAt(0), 10); if (brsVersion <= 6 && window.navigator.userAgent.indexOf("MSIE 6") > -1) @@ -354,9 +360,7 @@ function formatDate(date,format) c=format.charAt(i); // Recupere char du format substr=""; j=i; - while ((format.charAt(j)==c) && (j < format.length)) // Recupere char - // successif - // identiques + while ((format.charAt(j)==c) && (j < format.length)) // Recupere char successif identiques { substr += format.charAt(j++); } @@ -623,8 +627,9 @@ function hideMessage(fieldId,message) { if (textbox.value == message) textbox.value = ''; } + /* - * + * TODO Used by admin page only ? */ function setConstant(url, code, input, entity) { $.get( url, { @@ -679,7 +684,7 @@ function setConstant(url, code, input, entity) { } /* - * + * TODO Used by admin page only ? */ function delConstant(url, code, input, entity) { $.get( url, { @@ -733,7 +738,7 @@ function delConstant(url, code, input, entity) { } /* - * + * TODO Used by admin page only ? */ function confirmConstantAction(action, url, code, input, box, entity, yesButton, noButton) { var boxConfirm = box; @@ -784,7 +789,9 @@ function confirmConstantAction(action, url, code, input, box, entity, yesButton, /* * ================================================================= * This is to allow to transform all select box into ajax autocomplete box - * with just one line: $(function() { $( "#idofmylist" ).combobox(); }); + * with just one line: + * $(function() { $( "#idofmylist" ).combobox(); }); + * Do not use it on large combo boxes * ================================================================= */ (function( $ ) { @@ -894,6 +901,8 @@ function confirmConstantAction(action, url, code, input, box, entity, yesButton, /* * Timer for delayed keyup function + * + * TODO Who use this ? */ (function($){ $.widget("ui.onDelayedKeyup", { diff --git a/htdocs/core/tpl/ajaxrow.tpl.php b/htdocs/core/tpl/ajaxrow.tpl.php index aa96b46a859..27b14d859f3 100644 --- a/htdocs/core/tpl/ajaxrow.tpl.php +++ b/htdocs/core/tpl/ajaxrow.tpl.php @@ -17,11 +17,11 @@ * * Javascript code to activate drag and drop on lines * You can use this if you want to be abale to drag and drop rows of a table. - * You must add id="tablelines" ont table level tag and have count($object->lines) or count($taskarray) > 0 + * You must add id="tablelines" ont table level tag and have count($object->lines) or count($taskarray) > 0 */ ?> - + id; $fk_element=$object->fk_element; @@ -84,4 +84,4 @@ $(document).ready(function(){ }); - \ No newline at end of file + \ No newline at end of file From 0f4ceca8ec12a61ea370c57d42cc59eaf7a5dea8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 17 Nov 2013 02:59:01 +0100 Subject: [PATCH 051/107] Fix: tons of bugs into ecm module --- build/debian/README.howto | 11 +++-- htdocs/core/ajax/ajaxdirtree.php | 3 +- htdocs/core/class/html.formfile.class.php | 41 +++++++++-------- htdocs/ecm/index.php | 41 ++++++++++++----- htdocs/ecm/tpl/builddatabase.tpl.php | 44 ++++++++++++------- .../plugins/jqueryFileTree/jqueryFileTree.js | 4 +- 6 files changed, 92 insertions(+), 52 deletions(-) diff --git a/build/debian/README.howto b/build/debian/README.howto index 463ba111c46..b34d296d2e4 100644 --- a/build/debian/README.howto +++ b/build/debian/README.howto @@ -39,7 +39,13 @@ END # To use Alioth.debian.org -* Create a login +* Create an account login +* Update your ~/.ssh/config file to add: +Host svn.debian.org git.debian.org bzr.debian.org hg.debian.org darcs.debian.org arch.debian.org + User eldy-guest + IdentityFile ~/.ssh/id_rsa +* Check login on page https://alioth.debian.org/users/login +Ex: https://alioth.debian.org/users/eldy-guest * Setup your ssh as described into page: http://wiki.debian.org/Alioth/SSH * Ask to be included into project collab-maint: http://alioth.debian.org/projects/collab-maint/ @@ -192,8 +198,7 @@ To update dolibarr debian package * You can git clone debian git repo > git clone git.debian.org:/git/collab-maint/dolibarr.git [dolibarr-debian] or better -> mkdir gitdebian -> cd gitdebian +> cd ~; mkdir git-debian; cd git-debian > gbp-clone git.debian.org:/git/collab-maint/dolibarr.git * You can then create a PHP project from Eclipse called dolibarr-debian diff --git a/htdocs/core/ajax/ajaxdirtree.php b/htdocs/core/ajax/ajaxdirtree.php index db8af5ba265..640c64f40f7 100644 --- a/htdocs/core/ajax/ajaxdirtree.php +++ b/htdocs/core/ajax/ajaxdirtree.php @@ -207,6 +207,7 @@ if (file_exists($fullpathselecteddir)) // Enable jquery handlers on new generated HTML objects print ''; diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index c578e5d9786..45221876e91 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -64,9 +64,10 @@ class FormFile * @param boolean $useajax Use fileupload ajax (0=never, 1=if enabled, 2=always whatever is option). 2 should never be used. * @param string $savingdocmask Mask to use to define output filename. For example 'XXXXX-__YYYYMMDD__-__file__' * @param string $linkfiles 1=Also add form to link files, 0=Do not show form to link files + * @param string $htmlname Name and id of HTML form * @return int <0 if KO, >0 if OK */ - function form_attach_new_file($url, $title='', $addcancel=0, $sectionid=0, $perm=1, $size=50, $object='', $options='', $useajax=1, $savingdocmask='', $linkfiles=1) + function form_attach_new_file($url, $title='', $addcancel=0, $sectionid=0, $perm=1, $size=50, $object='', $options='', $useajax=1, $savingdocmask='', $linkfiles=1, $htmlname='formuserfile') { global $conf,$langs, $hookmanager; $hookmanager->initHooks(array('formfile')); @@ -90,9 +91,9 @@ class FormFile if (empty($title)) $title=$langs->trans("AttachANewFile"); if ($title != 'none') print_titre($title); - $out .= '
    '; - $out .= ''; - $out .= ''; + $out .= ''; + $out .= ''; + $out .= ''; $out .= ''; $out .= '
    '; @@ -165,9 +166,9 @@ class FormFile $langs->load('link'); $title = $langs->trans("LinkANewFile"); $out .= load_fiche_titre($title, null, null); - $out .= ''; - $out .= ''; - $out .= ''; + $out .= ''; + $out .= ''; + $out .= ''; $out .= ''; $out .= '
    '; @@ -770,14 +771,14 @@ class FormFile print ''; print img_mime($file['name'],$file['name'].' ('.dol_print_size($file['size'],0,0).')').' '; @@ -800,14 +801,16 @@ class FormFile // Delete or view link // ($param must start with &) print '"; @@ -831,7 +834,7 @@ class FormFile /** * Show list of documents in a directory * - * @param string $upload_dir Directory that was scanned + * @param string $upload_dir Directory that was scanned * @param array $filearray Array of files loaded by dol_dir_list function before calling this function * @param string $modulepart Value for modulepart used by download wrapper * @param string $param Parameters on sort links @@ -841,7 +844,7 @@ class FormFile * @param int $useinecm Change output for use in ecm module * @param int $textifempty Text to show if filearray is empty * @param int $maxlength Maximum length of file name shown - * @param string $url Full url to use for click links ('' = autodetect) + * @param string $url Full url to use for click links ('' = autodetect) * @return int <0 if KO, nb of files shown if OK */ function list_of_autoecmfiles($upload_dir,$filearray,$modulepart,$param,$forcedownload=0,$relativepath='',$permtodelete=1,$useinecm=0,$textifempty='',$maxlength=0,$url='') diff --git a/htdocs/ecm/index.php b/htdocs/ecm/index.php index 5368c1b52be..531138aaab9 100644 --- a/htdocs/ecm/index.php +++ b/htdocs/ecm/index.php @@ -53,6 +53,7 @@ $action=GETPOST("action"); $section=GETPOST("section")?GETPOST("section","int"):GETPOST("section_id","int"); $module=GETPOST("module"); if (! $section) $section=0; +$section_dir=GETPOST('section_dir'); $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); @@ -93,7 +94,7 @@ if (GETPOST("sendit") && ! empty($conf->global->MAIN_UPLOAD_DOC)) // Define relativepath and upload_dir $relativepath=''; if ($ecmdir->id) $relativepath=$ecmdir->getRelativePath(); - else $relativepath=GETPOST('section_dir'); + else $relativepath=$section_dir; $upload_dir = $conf->ecm->dir_output.'/'.$relativepath; if (empty($_FILES['userfile']['tmp_name'])) @@ -167,16 +168,20 @@ if ($action == 'confirm_deletefile') { if (GETPOST('confirm') == 'yes') { - $langs->load("other"); - $result=$ecmdir->fetch($section); - if (! ($result > 0)) + $langs->load("other"); + if ($section) { - dol_print_error($db,$ecmdir->error); - exit; + $result=$ecmdir->fetch($section); + if (! ($result > 0)) + { + dol_print_error($db,$ecmdir->error); + exit; + } + $relativepath=$ecmdir->getRelativePath(); } - $relativepath=$ecmdir->getRelativePath(); - $upload_dir = $conf->ecm->dir_output.'/'.$relativepath; - $file = $upload_dir . "/" . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP). + else $relativepath=''; + $upload_dir = $conf->ecm->dir_output.($relativepath?'/'.$relativepath:''); + $file = $upload_dir . "/" . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_POST are already decoded by PHP). $ret=dol_delete_file($file); if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile'))); @@ -391,7 +396,7 @@ if (!empty($conf->global->ECM_AUTO_TREE_ENABLED)) { if (! empty($conf->fournisseur->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'order_supplier', 'test'=>$conf->fournisseur->enabled, 'label'=>$langs->trans("SuppliersOrders"), 'desc'=>$langs->trans("ECMDocsByOrders")); } if (! empty($conf->fournisseur->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'invoice_supplier', 'test'=>$conf->fournisseur->enabled, 'label'=>$langs->trans("SuppliersInvoices"), 'desc'=>$langs->trans("ECMDocsByInvoices")); } if (! empty($conf->tax->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'tax', 'test'=>$conf->tax->enabled, 'label'=>$langs->trans("SocialContributions"), 'desc'=>$langs->trans("ECMDocsBySocialContributions")); } - if (! empty($conf->projet->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'project', 'test'=>$conf->projet->enabled, 'label'=>$langs->trans("Projects"), 'desc'=>$langs->trans("ECMDocsByProjects")); } + if (! empty($conf->projet->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'project', 'test'=>$conf->projet->enabled, 'label'=>$langs->trans("Projects"), 'desc'=>$langs->trans("ECMDocsByProjects")); } } print_fiche_titre($langs->trans("ECMArea").' - '.$langs->trans("ECMFileManager")); @@ -461,7 +466,6 @@ if ($action == 'delete_section') // End confirm - if (empty($action) || $action == 'file_manager' || preg_match('/refresh/i',$action) || $action == 'delete') { print '
    '; - if ($useinecm) print ''.img_view().'   '; + if ($useinecm) print ''.img_view().'   '; if ($permtodelete) { + /* if ($file['level1name'] <> $object->id) - $filepath=urlencode($file['level1name'].'/'.$file['name']); + $filepath=$file['level1name'].'/'.$file['name']; else - $filepath=urlencode($file['name']); - print ''.img_delete().''; + $filepath=$file['name']; + */ + print ''.img_delete().''; } else print ' '; print "
    '; @@ -774,8 +778,19 @@ include_once DOL_DOCUMENT_ROOT.'/core/ajax/ajaxdirpreview.php'; // To attach new file if ((! empty($conf->use_javascript_ajax) && empty($conf->global->MAIN_ECM_DISABLE_JS)) || ! empty($section)) { + if (empty($section) || $section == -1) + { + ?> + + form_attach_new_file(DOL_URL_ROOT.'/ecm/index.php', 'none', 0, ($section?$section:-1), $user->rights->ecm->upload, 48, null, '', 0, '', 0); + $formfile->form_attach_new_file(DOL_URL_ROOT.'/ecm/index.php', 'none', 0, ($section?$section:-1), $user->rights->ecm->upload, 48, null, '', 0, '', 0, 'formuserfile'); } else print ' '; @@ -789,6 +804,8 @@ else print ' '; use_javascript_ajax) && empty($conf->global->MAIN_ECM_DISABLE_JS)) { include 'tpl/builddatabase.tpl.php'; } diff --git a/htdocs/ecm/tpl/builddatabase.tpl.php b/htdocs/ecm/tpl/builddatabase.tpl.php index 7f997ed6209..4d5c0ab953a 100644 --- a/htdocs/ecm/tpl/builddatabase.tpl.php +++ b/htdocs/ecm/tpl/builddatabase.tpl.php @@ -13,28 +13,39 @@ * * You should have received a copy of the GNU General Public License * along with this program. If not, see . - * + * + * Output javascript for interactions code of ecm module */ - -$openeddir='/'; - -// TODO: just use ajaxdirtree.php for load database after ajax refresh and not scan directories -// too slow every page loaded ! - ?> - + + + - \ No newline at end of file + \ No newline at end of file diff --git a/htdocs/includes/jquery/plugins/jqueryFileTree/jqueryFileTree.js b/htdocs/includes/jquery/plugins/jqueryFileTree/jqueryFileTree.js index c9b0e3853df..390f71cda16 100755 --- a/htdocs/includes/jquery/plugins/jqueryFileTree/jqueryFileTree.js +++ b/htdocs/includes/jquery/plugins/jqueryFileTree/jqueryFileTree.js @@ -33,7 +33,7 @@ if(jQuery) (function($){ $.extend($.fn, { - fileTree: function(o, h) { + fileTree: function(o, h, hd) { // CHANGE DOL_LDR add hd param // Defaults if( !o ) var o = {}; if( o.root == undefined ) o.root = '/'; @@ -77,6 +77,8 @@ if(jQuery) (function($){ $(this).parent().find('UL').slideUp({ duration: o.collapseSpeed, easing: o.collapseEasing }); $(this).parent().removeClass('expanded').addClass('collapsed'); } + // CHANGE DOL_LDR use hd function provided in param + if (hd != null) hd($(this)); } else { h($(this).attr('rel')); } From 930328f235959e597a1d3d072f61f148fcd4876c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 17 Nov 2013 03:33:58 +0100 Subject: [PATCH 052/107] Prepare 3.5 beta --- htdocs/install/mysql/data/llx_c_tva.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/install/mysql/data/llx_c_tva.sql b/htdocs/install/mysql/data/llx_c_tva.sql index d96bc2d3f36..c8091e3889e 100644 --- a/htdocs/install/mysql/data/llx_c_tva.sql +++ b/htdocs/install/mysql/data/llx_c_tva.sql @@ -88,13 +88,13 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (80 insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (802,80, '0','0','VAT Rate 0',1); -- FRANCE (id country=1) -insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 11, 1,'19.6','0','VAT standard rate (France hors DOM-TOM)',1); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 11, 1, '20','0','VAT standard rate (France hors DOM-TOM)',1); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 12, 1, '8.5','0','VAT standard rate (DOM sauf Guyane et Saint-Martin)',0); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 13, 1, '8.5','1','VAT standard rate (DOM sauf Guyane et Saint-Martin), non perçu par le vendeur mais récupérable par acheteur',0); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 14, 1, '5.5','0','VAT reduced rate (France hors DOM-TOM)',1); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 15, 1, '0','0','VAT Rate 0 ou non applicable',1); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 16, 1, '2.1','0','VAT super-reduced rate',1); -insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 17, 1, '7','0','VAT reduced rate',1); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 17, 1, '10','0','VAT reduced rate',1); -- GERMANY (id country=5) insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 51, 5, '19.0','0','allgemeine Ust.',1); From 89a56389086e599f976ae81670d1040f45f84597 Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Sun, 17 Nov 2013 12:59:33 +0100 Subject: [PATCH 053/107] Fix bad translation on margin config --- htdocs/langs/en_US/margins.lang | 4 ++-- htdocs/langs/fr_FR/margins.lang | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/langs/en_US/margins.lang b/htdocs/langs/en_US/margins.lang index e8c5ab38b6b..bf65bf5d270 100644 --- a/htdocs/langs/en_US/margins.lang +++ b/htdocs/langs/en_US/margins.lang @@ -48,5 +48,5 @@ BuyingCost=Cost price UnitCharges=Unit charges Charges=Charges -AgentContactType=Contact type used for commissioning -AgentContactTypeDetails=Défine what contact type (linked on invoices) will be associated with commercial agents \ No newline at end of file +AgentContactType=Commercial agent contact type +AgentContactTypeDetails=Défine what contact type (linked on invoices) will be used for margin report by commercial agents \ No newline at end of file diff --git a/htdocs/langs/fr_FR/margins.lang b/htdocs/langs/fr_FR/margins.lang index dcfe51d6786..78e5e1c380e 100644 --- a/htdocs/langs/fr_FR/margins.lang +++ b/htdocs/langs/fr_FR/margins.lang @@ -48,5 +48,5 @@ CostPrice=Prix de revient UnitCharges=Charge unitaire Charges=Charges -AgentContactType=Type de contact commissionné -AgentContactTypeDetails=Permet de définir le type de contact associé aux factures qui sera associé aux agents commerciaux +AgentContactType=Type de contact agent commercial +AgentContactTypeDetails=Permet de définir le type de contact associé aux factures qui sera utilisé pour le rapport de marges par agent commercial From 00064ed500d3a13f949777469d31c8e1ec201ac2 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Sun, 17 Nov 2013 17:09:58 +0100 Subject: [PATCH 054/107] Add status filter into user list --- htdocs/user/index.php | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/htdocs/user/index.php b/htdocs/user/index.php index d5b34808b8f..11234719f0c 100644 --- a/htdocs/user/index.php +++ b/htdocs/user/index.php @@ -41,6 +41,8 @@ if ($user->societe_id > 0) $sall=GETPOST('sall','alpha'); $search_user=GETPOST('search_user','alpha'); +$search_statut=GETPOST('search_statut','alpha'); +if ($search_statut=='') $search_statut=1; // always display activ customer first $sortfield = GETPOST('sortfield','alpha'); $sortorder = GETPOST('sortorder','alpha'); @@ -55,6 +57,7 @@ if (! $sortorder) $sortorder="ASC"; $userstatic=new User($db); $companystatic = new Societe($db); +$form = new Form($db); /* @@ -86,6 +89,10 @@ if (! empty($search_user)) { $sql.= " AND (u.login LIKE '%".$db->escape($search_user)."%' OR u.lastname LIKE '%".$db->escape($search_user)."%' OR u.firstname LIKE '%".$db->escape($search_user)."%')"; } +if ($search_statut!='') +{ + $sql.= " AND (u.statut=".$search_statut.")"; +} if ($sall) $sql.= " AND (u.login LIKE '%".$db->escape($sall)."%' OR u.lastname LIKE '%".$db->escape($sall)."%' OR u.firstname LIKE '%".$db->escape($sall)."%' OR u.email LIKE '%".$db->escape($sall)."%' OR u.note LIKE '%".$db->escape($sall)."%')"; $sql.=$db->order($sortfield,$sortorder); @@ -95,6 +102,8 @@ if ($result) $num = $db->num_rows($result); $i = 0; + print ''."\n"; + $param="search_user=$search_user&sall=$sall"; print '
    '; print ''; @@ -104,7 +113,22 @@ if ($result) print_liste_field_titre($langs->trans("Company"),"index.php","u.fk_societe",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateCreation"),"index.php","u.datec",$param,"",'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("LastConnexion"),"index.php","u.datelastlogin",$param,"",'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Status"),"index.php","u.statut",$param,"",'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Status"),"index.php","u.statut",$param,"",'align="center"',$sortfield,$sortorder); + print ''; + print "\n"; + + //SearchBar + print ''; + print ''; + + print ''; + + print ''; + print "\n"; $var=True; while ($i < $num) @@ -168,11 +192,13 @@ if ($result) // Statut $userstatic->statut=$obj->statut; - print ''; + print ''; + print ''; print "\n"; $i++; } print "
     
     '; + print $form->selectarray('search_statut', array('0'=>$langs->trans('Disabled'),'1'=>$langs->trans('Enabled')),$search_statut); + print ''; + print ''; + print '
    '.$userstatic->getLibStatut(5).''.$userstatic->getLibStatut(5).' 
    "; + print "\n"; $db->free($result); } else From cc43fac0aa5ceaa54cf22bed3b1ec0923c7f99b8 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Sun, 17 Nov 2013 17:25:14 +0100 Subject: [PATCH 055/107] Add status filter into product list --- htdocs/product/liste.php | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/htdocs/product/liste.php b/htdocs/product/liste.php index af1dfea171b..efe4799bdee 100644 --- a/htdocs/product/liste.php +++ b/htdocs/product/liste.php @@ -7,6 +7,7 @@ * Copyright (C) 2013 Raphaël Doursenaud * Copyright (C) 2013 Jean Heimburger * Copyright (C) 2013 Cédric Salvador + * Copyright (C) 2013 Florian Henry * * 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 @@ -175,8 +176,8 @@ else } $sql .= natural_search($params, $snom); } - if (isset($tosell) && dol_strlen($tosell) > 0) $sql.= " AND p.tosell = ".$db->escape($tosell); - if (isset($tobuy) && dol_strlen($tobuy) > 0) $sql.= " AND p.tobuy = ".$db->escape($tobuy); + if (isset($tosell) && dol_strlen($tosell) > 0 && $tosell!=-1) $sql.= " AND p.tosell = ".$db->escape($tosell); + if (isset($tobuy) && dol_strlen($tobuy) > 0 && $tobuy!=-1) $sql.= " AND p.tobuy = ".$db->escape($tobuy); if (dol_strlen($canvas) > 0) $sql.= " AND p.canvas = '".$db->escape($canvas)."'"; if ($catid > 0) $sql.= " AND cp.fk_categorie = ".$catid; if ($catid == -2) $sql.= " AND cp.fk_categorie IS NULL"; @@ -297,8 +298,9 @@ else } if (! empty($conf->stock->enabled) && $user->rights->stock->lire && $type != 1) print ''.$langs->trans("DesiredStock").''; if (! empty($conf->stock->enabled) && $user->rights->stock->lire && $type != 1) print ''.$langs->trans("PhysicalStock").''; - print_liste_field_titre($langs->trans("Sell"), $_SERVER["PHP_SELF"], "p.tosell",$param,"",'align="right"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Buy"), $_SERVER["PHP_SELF"], "p.tobuy",$param,"",'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Sell"), $_SERVER["PHP_SELF"], "p.tosell",$param,"",'align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Buy"), $_SERVER["PHP_SELF"], "p.tobuy",$param,"",'align="center"',$sortfield,$sortorder); + print ' '; print "\n"; // Lignes des champs de filtre @@ -354,8 +356,12 @@ else print ''; } - print ''; - print ' '; + print ''; + print $form->selectarray('tosell', array('0'=>$langs->trans('ProductStatusNotOnSellShort'),'1'=>$langs->trans('ProductStatusOnSellShort')),$tosell,1); + print ''; + + print ''; + print $form->selectarray('tobuy', array('0'=>$langs->trans('ProductStatusNotOnBuyShort'),'1'=>$langs->trans('ProductStatusOnBuyShort')),$tobuy,1); print ''; print ''; @@ -475,11 +481,13 @@ else } // Status (to buy) - print ''.$product_static->LibStatut($objp->tosell,5,0).''; + print ''.$product_static->LibStatut($objp->tosell,5,0).''; // Status (to sell) - print ''.$product_static->LibStatut($objp->tobuy,5,1).''; + print ''.$product_static->LibStatut($objp->tobuy,5,1).''; + print ' '; + print "\n"; $i++; } From 48570f599a977de94980d031ac9f4687de89f9ed Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 17 Nov 2013 23:25:25 +0100 Subject: [PATCH 056/107] Fix: form is not allowed into a table. This break some javascript and make some browsers crazy. --- htdocs/comm/propal.php | 82 +- htdocs/commande/fiche.php | 95 +- htdocs/compta/facture.php | 2756 +++++++++-------- htdocs/contrat/class/contrat.class.php | 3 + htdocs/contrat/fiche.php | 131 +- htdocs/core/lib/ajax.lib.php | 2 +- .../core/tpl/freeproductline_create.tpl.php | 68 +- htdocs/core/tpl/objectline_edit.tpl.php | 219 +- .../tpl/predefinedproductline_create.tpl.php | 104 +- htdocs/fourn/commande/fiche.php | 371 ++- htdocs/fourn/facture/fiche.php | 174 +- 11 files changed, 2086 insertions(+), 1919 deletions(-) diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 8c2871426a4..685841560bd 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -634,13 +634,27 @@ else if ($action == "setabsolutediscount" && $user->rights->propal->creer) } // Add line -else if ($action == "addline" && $user->rights->propal->creer) +else if (($action == 'addline' || $action == 'addline_predef') && $user->rights->propal->creer) { - $idprod=GETPOST('idprod', 'int'); - $product_desc = (GETPOST('product_desc')?GETPOST('product_desc'):(GETPOST('np_desc')?GETPOST('np_desc'):(GETPOST('dp_desc')?GETPOST('dp_desc'):''))); - $price_ht = GETPOST('price_ht'); - $tva_tx = (GETPOST('tva_tx')?GETPOST('tva_tx'):0); - $predef=((! empty($idprod) && $conf->global->MAIN_FEATURES_LEVEL < 2) ? '_predef' : ''); + // Set if we used free entry or predefined product + if (GETPOST('addline_libre')) + { + $predef=''; + $idprod=0; + $product_desc=(GETPOST('dp_desc')?GETPOST('dp_desc'):''); + $price_ht = GETPOST('price_ht'); + $tva_tx=(GETPOST('tva_tx')?GETPOST('tva_tx'):0); + } + if (GETPOST('addline_predefined')) + { + $predef=(($conf->global->MAIN_FEATURES_LEVEL < 2) ? '_predef' : ''); + $idprod=GETPOST('idprod', 'int'); + $product_desc = (GETPOST('product_desc')?GETPOST('product_desc'):(GETPOST('np_desc')?GETPOST('np_desc'):'')); + $price_ht = ''; + $tva_tx = ''; + } + $qty = GETPOST('qty'.$predef); + $remise_percent=GETPOST('remise_percent'.$predef); //Extrafields $extrafieldsline = new ExtraFields($db); @@ -673,7 +687,7 @@ else if ($action == "addline" && $user->rights->propal->creer) $error++; } - if (! $error && (GETPOST('qty') >= 0) && (! empty($product_desc) || ! empty($idprod))) + if (! $error && ($qty >= 0) && (! empty($product_desc) || ! empty($idprod))) { $pu_ht=0; $pu_ttc=0; @@ -791,8 +805,8 @@ else if ($action == "addline" && $user->rights->propal->creer) } // Margin - $fournprice=(GETPOST('fournprice')?GETPOST('fournprice'):''); - $buyingprice=(GETPOST('buying_price')?GETPOST('buying_price'):''); + $fournprice=(GETPOST('fournprice'.$predef)?GETPOST('fournprice'.$predef):''); + $buyingprice=(GETPOST('buying_price'.$predef)?GETPOST('buying_price'.$predef):''); $date_start=dol_mktime(0, 0, 0, GETPOST('date_start'.$predef.'month'), GETPOST('date_start'.$predef.'day'), GETPOST('date_start'.$predef.'year')); $date_end=dol_mktime(0, 0, 0, GETPOST('date_end'.$predef.'month'), GETPOST('date_end'.$predef.'day'), GETPOST('date_end'.$predef.'year')); @@ -804,7 +818,7 @@ else if ($action == "addline" && $user->rights->propal->creer) $info_bits=0; if ($tva_npr) $info_bits |= 0x01; - if (! empty($price_min) && (price2num($pu_ht)*(1-price2num(GETPOST('remise_percent'))/100) < price2num($price_min))) + if (! empty($price_min) && (price2num($pu_ht)*(1-price2num($remise_percent)/100) < price2num($price_min))) { $mesg = $langs->trans("CantBeLessThanMinPrice",price(price2num($price_min,'MU'),0,$langs,0,0,-1,$conf->currency)); setEventMessage($mesg, 'errors'); @@ -815,12 +829,12 @@ else if ($action == "addline" && $user->rights->propal->creer) $result=$object->addline( $desc, $pu_ht, - GETPOST('qty'), + $qty, $tva_tx, $localtax1_tx, $localtax2_tx, $idprod, - GETPOST('remise_percent'), + $remise_percent, $price_base_type, $pu_ttc, $info_bits, @@ -854,7 +868,6 @@ else if ($action == "addline" && $user->rights->propal->creer) unset($_POST['qty']); unset($_POST['type']); - unset($_POST['idprod']); unset($_POST['remise_percent']); unset($_POST['price_ht']); unset($_POST['price_ttc']); @@ -866,10 +879,16 @@ else if ($action == "addline" && $user->rights->propal->creer) unset($_POST['buying_price']); unset($_POST['np_marginRate']); unset($_POST['np_markRate']); - - // old method - unset($_POST['np_desc']); unset($_POST['dp_desc']); + + unset($_POST['idprod']); + unset($_POST['qty_predef']); + unset($_POST['remise_percent_predef']); + unset($_POST['fournprice_predef']); + unset($_POST['buying_price_predef']); + unset($_POST['np_marginRate_predef']); + unset($_POST['np_markRate_predef']); + unset($_POST['np_desc']); } else { @@ -1162,7 +1181,7 @@ else if ($action == 'update_extras') $ret = $extrafields->setOptionalsFromPost($extralabels,$object,GETPOST('attribute')); if($ret < 0) $error++; - if (! $error) + if (! $error) { // Actions on extra fields (by external module or standard code) // FIXME le hook fait double emploi avec le trigger !! @@ -1179,7 +1198,7 @@ else if ($action == 'update_extras') } else if ($reshook < 0) $error++; } - + if ($error) $action = 'edit_extras'; } @@ -1924,11 +1943,11 @@ else print ''; print ''; print ''; - + print $extrafields->showInputField($key,$value); - + print ''; - + print ''; } else @@ -2003,15 +2022,25 @@ else * Lines */ + // Show object lines + $result = $object->getLinesArray(); + + + print '
    + + + + + '; + + if (! empty($conf->use_javascript_ajax) && $object->statut == 0) { include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; } - print ''; + print '
    '; - // Show object lines - $result = $object->getLinesArray(); if (! empty($object->lines)) $ret=$object->printObjectLines($action,$mysoc,$soc,$lineid,1); @@ -2047,8 +2076,9 @@ else print '
    '; - print '
    '; - print "\n"; + print "\n"; + + dol_fiche_end(); if ($action == 'statut') { diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 697d47c78bf..ccc2f13cbea 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -323,7 +323,7 @@ else if ($action == 'add' && $user->rights->commande->creer) $lines[$i]->fetch_optionals($lines[$i]->rowid); $array_option=$lines[$i]->array_options; } - + $result = $object->addline( $desc, $lines[$i]->subprice, @@ -564,18 +564,31 @@ else if ($action == 'setnote_private' && $user->rights->commande->creer) if ($result < 0) dol_print_error($db,$object->error); } -/* - * Ajout d'une ligne produit dans la commande -*/ +// Add a new line else if ($action == 'addline' && $user->rights->commande->creer) { $langs->load('errors'); $error = false; - $idprod=GETPOST('idprod', 'int'); - $product_desc = (GETPOST('product_desc')?GETPOST('product_desc'):(GETPOST('np_desc')?GETPOST('np_desc'):(GETPOST('dp_desc')?GETPOST('dp_desc'):''))); - $price_ht = GETPOST('price_ht'); - $tva_tx = (GETPOST('tva_tx')?GETPOST('tva_tx'):0); + // Set if we used free entry or predefined product + if (GETPOST('addline_libre')) + { + $predef=''; + $idprod=0; + $product_desc=(GETPOST('dp_desc')?GETPOST('dp_desc'):''); + $price_ht = GETPOST('price_ht'); + $tva_tx=(GETPOST('tva_tx')?GETPOST('tva_tx'):0); + } + if (GETPOST('addline_predefined')) + { + $predef=(($conf->global->MAIN_FEATURES_LEVEL < 2) ? '_predef' : ''); + $idprod=GETPOST('idprod', 'int'); + $product_desc = (GETPOST('product_desc')?GETPOST('product_desc'):(GETPOST('np_desc')?GETPOST('np_desc'):'')); + $price_ht = ''; + $tva_tx = ''; + } + $qty = GETPOST('qty'.$predef); + $remise_percent=GETPOST('remise_percent'.$predef); //Extrafields $extrafieldsline = new ExtraFields($db); @@ -591,7 +604,7 @@ else if ($action == 'addline' && $user->rights->commande->creer) } } - if ((empty($idprod) || GETPOST('usenewaddlineform')) && ($price_ht < 0) && (GETPOST('qty') < 0)) + if ((empty($idprod) || GETPOST('usenewaddlineform')) && ($price_ht < 0) && ($qty < 0)) { setEventMessage($langs->trans('ErrorBothFieldCantBeNegative', $langs->transnoentitiesnoconv('UnitPriceHT'), $langs->transnoentitiesnoconv('Qty')), 'errors'); $error = true; @@ -606,7 +619,7 @@ else if ($action == 'addline' && $user->rights->commande->creer) setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("UnitPriceHT")), 'errors'); $error++; } - if (! GETPOST('qty') && GETPOST('qty') == '') + if ($qty == '') { setEventMessage($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Qty')), 'errors'); $error = true; @@ -617,10 +630,9 @@ else if ($action == 'addline' && $user->rights->commande->creer) $error = true; } - if (! $error && (GETPOST('qty') >= 0) && (! empty($product_desc) || ! empty($idprod))) + if (! $error && ($qty >= 0) && (! empty($product_desc) || ! empty($idprod))) { // Clean parameters - $predef=((! empty($idprod) && $conf->global->MAIN_FEATURES_LEVEL < 2) ? '_predef' : ''); $date_start=dol_mktime(0, 0, 0, GETPOST('date_start'.$predef.'month'), GETPOST('date_start'.$predef.'day'), GETPOST('date_start'.$predef.'year')); $date_end=dol_mktime(0, 0, 0, GETPOST('date_end'.$predef.'month'), GETPOST('date_end'.$predef.'day'), GETPOST('date_end'.$predef.'year')); $price_base_type = (GETPOST('price_base_type', 'alpha')?GETPOST('price_base_type', 'alpha'):'HT'); @@ -737,8 +749,8 @@ else if ($action == 'addline' && $user->rights->commande->creer) } // Margin - $fournprice=(GETPOST('fournprice')?GETPOST('fournprice'):''); - $buyingprice=(GETPOST('buying_price')?GETPOST('buying_price'):''); + $fournprice=(GETPOST('fournprice'.$predef)?GETPOST('fournprice'.$predef):''); + $buyingprice=(GETPOST('buying_price'.$predef)?GETPOST('buying_price'.$predef):''); // Local Taxes $localtax1_tx= get_localtax($tva_tx, 1, $object->client); @@ -749,7 +761,7 @@ else if ($action == 'addline' && $user->rights->commande->creer) $info_bits=0; if ($tva_npr) $info_bits |= 0x01; - if (! empty($price_min) && (price2num($pu_ht)*(1-price2num(GETPOST('remise_percent'))/100) < price2num($price_min))) + if (! empty($price_min) && (price2num($pu_ht)*(1-price2num($remise_percent)/100) < price2num($price_min))) { $mesg = $langs->trans("CantBeLessThanMinPrice",price(price2num($price_min,'MU'),0,$langs,0,0,-1,$conf->currency)); setEventMessage($mesg, 'errors'); @@ -760,12 +772,12 @@ else if ($action == 'addline' && $user->rights->commande->creer) $result = $object->addline( $desc, $pu_ht, - GETPOST('qty'), + $qty, $tva_tx, $localtax1_tx, $localtax2_tx, $idprod, - GETPOST('remise_percent'), + $remise_percent, $info_bits, 0, $price_base_type, @@ -803,7 +815,6 @@ else if ($action == 'addline' && $user->rights->commande->creer) unset($_POST['qty']); unset($_POST['type']); - unset($_POST['idprod']); unset($_POST['remise_percent']); unset($_POST['price_ht']); unset($_POST['price_ttc']); @@ -815,10 +826,16 @@ else if ($action == 'addline' && $user->rights->commande->creer) unset($_POST['buying_price']); unset($_POST['np_marginRate']); unset($_POST['np_markRate']); - - // old method - unset($_POST['np_desc']); unset($_POST['dp_desc']); + + unset($_POST['idprod']); + unset($_POST['qty_predef']); + unset($_POST['remise_percent_predef']); + unset($_POST['fournprice_predef']); + unset($_POST['buying_price_predef']); + unset($_POST['np_marginRate_predef']); + unset($_POST['np_markRate_predef']); + unset($_POST['np_desc']); } else { @@ -1182,7 +1199,7 @@ else if ($action == 'update_extras') $ret = $extrafields->setOptionalsFromPost($extralabels,$object,GETPOST('attribute')); if($ret < 0) $error++; - if (! $error) + if (! $error) { // Actions on extra fields (by external module or standard code) // FIXME le hook fait double emploi avec le trigger !! @@ -1199,7 +1216,7 @@ else if ($action == 'update_extras') } else if ($reshook < 0) $error++; } - + if ($error) $action = 'edit_extras'; } @@ -1449,7 +1466,7 @@ if (! $error && ! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->righ /* * View -*/ + */ llxHeader('',$langs->trans('Order'),'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes'); @@ -1460,9 +1477,9 @@ $formorder = new FormOrder($db); /********************************************************************* * -* Mode creation -* -*********************************************************************/ + * Mode creation + * + *********************************************************************/ if ($action == 'create' && $user->rights->commande->creer) { print_fiche_titre($langs->trans('CreateOrder')); @@ -1506,7 +1523,7 @@ if ($action == 'create' && $user->rights->commande->creer) $objectsrc->fetch($originid); if (empty($objectsrc->lines) && method_exists($objectsrc,'fetch_lines')) $objectsrc->fetch_lines(); $objectsrc->fetch_thirdparty(); - + //Replicate extrafields $objectsrc->fetch_optionals($originid); $object->array_options=$objectsrc->array_options; @@ -2311,25 +2328,34 @@ else /* * Lines - */ + */ $result = $object->getLinesArray(); - $numlines = count($object->lines); + + print '
    + + + + + '; + if (! empty($conf->use_javascript_ajax) && $object->statut == 0) { include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; } - print ''; + print '
    '; // Show object lines if (! empty($object->lines)) $ret=$object->printObjectLines($action,$mysoc,$soc,$lineid,1); + $numlines = count($object->lines); + /* * Form to add new line - */ + */ if ($object->statut == 0 && $user->rights->commande->creer) { if ($action != 'editline') @@ -2359,7 +2385,10 @@ else } } print '
    '; - print ''; + + print "
    \n"; + + dol_fiche_end(); /* diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 7e1eb0d7445..dc573de6eca 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1128,10 +1128,25 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights- $langs->load('errors'); $error = 0; - $idprod=GETPOST('idprod', 'int'); - $product_desc = (GETPOST('product_desc')?GETPOST('product_desc'):(GETPOST('np_desc')?GETPOST('np_desc'):(GETPOST('dp_desc')?GETPOST('dp_desc'):''))); - $price_ht = GETPOST('price_ht'); - $tva_tx=(GETPOST('tva_tx')?GETPOST('tva_tx'):0); + // Set if we used free entry or predefined product + if (GETPOST('addline_libre')) + { + $predef=''; + $idprod=0; + $product_desc=(GETPOST('dp_desc')?GETPOST('dp_desc'):''); + $price_ht = GETPOST('price_ht'); + $tva_tx=(GETPOST('tva_tx')?GETPOST('tva_tx'):0); + } + if (GETPOST('addline_predefined')) + { + $predef=(($conf->global->MAIN_FEATURES_LEVEL < 2) ? '_predef' : ''); + $idprod=GETPOST('idprod', 'int'); + $product_desc = (GETPOST('product_desc')?GETPOST('product_desc'):(GETPOST('np_desc')?GETPOST('np_desc'):'')); + $price_ht = ''; + $tva_tx = ''; + } + $qty = GETPOST('qty'.$predef); + $remise_percent=GETPOST('remise_percent'.$predef); //Extrafields $extrafieldsline = new ExtraFields($db); @@ -1146,7 +1161,7 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights- } } - if ((empty($idprod) || GETPOST('usenewaddlineform')) && ($price_ht < 0) && (GETPOST('qty') < 0)) + if ((empty($idprod) || GETPOST('usenewaddlineform')) && ($price_ht < 0) && ($qty < 0)) { setEventMessage($langs->trans('ErrorBothFieldCantBeNegative', $langs->transnoentitiesnoconv('UnitPriceHT'), $langs->transnoentitiesnoconv('Qty')), 'errors'); $error++; @@ -1161,7 +1176,7 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights- setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("UnitPriceHT")), 'errors'); $error++; } - if (! GETPOST('qty') && GETPOST('qty') == '') + if ($qty == '') { setEventMessage($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Qty')), 'errors'); $error++; @@ -1172,7 +1187,7 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights- $error++; } - if (! $error && (GETPOST('qty') >= 0) && (! empty($product_desc) || ! empty($idprod))) + if (! $error && ($qty >= 0) && (! empty($product_desc) || ! empty($idprod))) { $ret=$object->fetch($id); if ($ret < 0) @@ -1183,7 +1198,6 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights- $ret=$object->fetch_thirdparty(); // Clean parameters - $predef=((! empty($idprod) && $conf->global->MAIN_FEATURES_LEVEL < 2) ? '_predef' : ''); $date_start=dol_mktime(GETPOST('date_start'.$predef.'hour'), GETPOST('date_start'.$predef.'min'), GETPOST('date_start'.$predef.'sec'), GETPOST('date_start'.$predef.'month'), GETPOST('date_start'.$predef.'day'), GETPOST('date_start'.$predef.'year')); $date_end=dol_mktime(GETPOST('date_end'.$predef.'hour'), GETPOST('date_end'.$predef.'min'), GETPOST('date_end'.$predef.'sec'), GETPOST('date_end'.$predef.'month'), GETPOST('date_end'.$predef.'day'), GETPOST('date_end'.$predef.'year')); $price_base_type = (GETPOST('price_base_type', 'alpha')?GETPOST('price_base_type', 'alpha'):'HT'); @@ -1304,8 +1318,8 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights- } // Margin - $fournprice=(GETPOST('fournprice')?GETPOST('fournprice'):''); - $buyingprice=(GETPOST('buying_price')?GETPOST('buying_price'):''); + $fournprice=(GETPOST('fournprice'.$predef)?GETPOST('fournprice'.$predef):''); + $buyingprice=(GETPOST('buying_price'.$predef)?GETPOST('buying_price'.$predef):''); // Local Taxes $localtax1_tx= get_localtax($tva_tx, 1, $object->client); @@ -1314,7 +1328,7 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights- $info_bits=0; if ($tva_npr) $info_bits |= 0x01; - if (! empty($price_min) && (price2num($pu_ht)*(1-price2num(GETPOST('remise_percent'))/100) < price2num($price_min))) + if (! empty($price_min) && (price2num($pu_ht)*(1-price2num($remise_percent)/100) < price2num($price_min))) { $mesg = $langs->trans("CantBeLessThanMinPrice",price(price2num($price_min,'MU'),0,$langs,0,0,-1,$conf->currency)); setEventMessage($mesg, 'errors'); @@ -1325,12 +1339,12 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights- $result = $object->addline( $desc, $pu_ht, - GETPOST('qty'), + $qty, $tva_tx, $localtax1_tx, $localtax2_tx, $idprod, - GETPOST('remise_percent'), + $remise_percent, $date_start, $date_end, 0, @@ -1370,7 +1384,6 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights- unset($_POST['qty']); unset($_POST['type']); - unset($_POST['idprod']); unset($_POST['remise_percent']); unset($_POST['price_ht']); unset($_POST['price_ttc']); @@ -1382,10 +1395,16 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights- unset($_POST['buying_price']); unset($_POST['np_marginRate']); unset($_POST['np_markRate']); - - // old method - unset($_POST['np_desc']); unset($_POST['dp_desc']); + + unset($_POST['idprod']); + unset($_POST['qty_predef']); + unset($_POST['remise_percent_predef']); + unset($_POST['fournprice_predef']); + unset($_POST['buying_price_predef']); + unset($_POST['np_marginRate_predef']); + unset($_POST['np_markRate_predef']); + unset($_POST['np_desc']); } else { @@ -1397,7 +1416,7 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights- } } -else if ($action == 'updateligne' && $user->rights->facture->creer && $_POST['save'] == $langs->trans('Save')) +elseif ($action == 'updateligne' && $user->rights->facture->creer && $_POST['save'] == $langs->trans('Save')) { if (! $object->fetch($id) > 0) dol_print_error($db); $object->fetch_thirdparty(); @@ -2388,9 +2407,9 @@ if ($action == 'create') print ''; $newclassname=$classname; - if ($newclassname == 'Propal') $newclassname = 'CommercialProposal'; - elseif ($newclassname == 'Commande') $newclassname = 'Order'; - elseif ($newclassname == 'Expedition') $newclassname = 'Sending'; + if ($newclassname == 'Propal') $newclassname = 'CommercialProposal'; + elseif ($newclassname == 'Commande') $newclassname = 'Order'; + elseif ($newclassname == 'Expedition') $newclassname = 'Sending'; print ''.$langs->trans($newclassname).''.$objectsrc->getNomUrl(1).''; print ''.$langs->trans('TotalHT').''.price($objectsrc->total_ht).''; @@ -2491,1463 +2510,1468 @@ else if ($id > 0 || ! empty($ref)) { /* * Show object in view mode - */ + */ $result=$object->fetch($id,$ref); + if ($result <= 0) { dol_print_error($db, $object->error); exit; } // fetch optionals attributes and labels $extralabels=$extrafields->fetch_name_optionals_label($object->table_element); - if ($result > 0) + if ($user->societe_id>0 && $user->societe_id!=$object->socid) accessforbidden('',0); + + $result=$object->fetch_thirdparty(); + + $soc = new Societe($db); + $soc->fetch($object->socid); + $selleruserevenustamp=$mysoc->useRevenueStamp(); + + $totalpaye = $object->getSommePaiement(); + $totalcreditnotes = $object->getSumCreditNotesUsed(); + $totaldeposits = $object->getSumDepositsUsed(); + //print "totalpaye=".$totalpaye." totalcreditnotes=".$totalcreditnotes." totaldeposts=".$totaldeposits." selleruserrevenuestamp=".$selleruserevenustamp; + + // We can also use bcadd to avoid pb with floating points + // For example print 239.2 - 229.3 - 9.9; does not return 0. + //$resteapayer=bcadd($object->total_ttc,$totalpaye,$conf->global->MAIN_MAX_DECIMALS_TOT); + //$resteapayer=bcadd($resteapayer,$totalavoir,$conf->global->MAIN_MAX_DECIMALS_TOT); + $resteapayer = price2num($object->total_ttc - $totalpaye - $totalcreditnotes - $totaldeposits,'MT'); + + if ($object->paye) $resteapayer=0; + $resteapayeraffiche=$resteapayer; + + if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { - if ($user->societe_id>0 && $user->societe_id!=$object->socid) accessforbidden('',0); + $filterabsolutediscount="fk_facture_source IS NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice + $filtercreditnote="fk_facture_source IS NOT NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice + } + else + { + $filterabsolutediscount="fk_facture_source IS NULL OR (fk_facture_source IS NOT NULL AND description='(DEPOSIT)')"; + $filtercreditnote="fk_facture_source IS NOT NULL AND description <> '(DEPOSIT)'"; + } - $result=$object->fetch_thirdparty(); + $absolute_discount=$soc->getAvailableDiscounts('',$filterabsolutediscount); + $absolute_creditnote=$soc->getAvailableDiscounts('',$filtercreditnote); + $absolute_discount=price2num($absolute_discount,'MT'); + $absolute_creditnote=price2num($absolute_creditnote,'MT'); - $soc = new Societe($db); - $soc->fetch($object->socid); - $selleruserevenustamp=$mysoc->useRevenueStamp(); + $author = new User($db); + if ($object->user_author) + { + $author->fetch($object->user_author); + } - $totalpaye = $object->getSommePaiement(); - $totalcreditnotes = $object->getSumCreditNotesUsed(); - $totaldeposits = $object->getSumDepositsUsed(); - //print "totalpaye=".$totalpaye." totalcreditnotes=".$totalcreditnotes." totaldeposts=".$totaldeposits." selleruserrevenuestamp=".$selleruserevenustamp; + $objectidnext=$object->getIdReplacingInvoice(); - // We can also use bcadd to avoid pb with floating points - // For example print 239.2 - 229.3 - 9.9; does not return 0. - //$resteapayer=bcadd($object->total_ttc,$totalpaye,$conf->global->MAIN_MAX_DECIMALS_TOT); - //$resteapayer=bcadd($resteapayer,$totalavoir,$conf->global->MAIN_MAX_DECIMALS_TOT); - $resteapayer = price2num($object->total_ttc - $totalpaye - $totalcreditnotes - $totaldeposits,'MT'); + $head = facture_prepare_head($object); - if ($object->paye) $resteapayer=0; - $resteapayeraffiche=$resteapayer; + dol_fiche_head($head, 'compta', $langs->trans('InvoiceCustomer'), 0, 'bill'); - if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) + $formconfirm=''; + + // Confirmation de la conversion de l'avoir en reduc + if ($action == 'converttoreduc') + { + $text=$langs->trans('ConfirmConvertToReduc'); + $formconfirm=$form->formconfirm($_SERVER['PHP_SELF'].'?facid='.$object->id,$langs->trans('ConvertToReduc'),$text,'confirm_converttoreduc','',"yes",2); + } + + // Confirmation to delete invoice + if ($action == 'delete') + { + $text=$langs->trans('ConfirmDeleteBill',$object->ref); + $formquestion=array(); + + $qualified_for_stock_change=0; + if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) { - $filterabsolutediscount="fk_facture_source IS NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice - $filtercreditnote="fk_facture_source IS NOT NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice + $qualified_for_stock_change=$object->hasProductsOrServices(2); } else { - $filterabsolutediscount="fk_facture_source IS NULL OR (fk_facture_source IS NOT NULL AND description='(DEPOSIT)')"; - $filtercreditnote="fk_facture_source IS NOT NULL AND description <> '(DEPOSIT)'"; + $qualified_for_stock_change=$object->hasProductsOrServices(1); } - $absolute_discount=$soc->getAvailableDiscounts('',$filterabsolutediscount); - $absolute_creditnote=$soc->getAvailableDiscounts('',$filtercreditnote); - $absolute_discount=price2num($absolute_discount,'MT'); - $absolute_creditnote=price2num($absolute_creditnote,'MT'); - - $author = new User($db); - if ($object->user_author) + if ($object->type != 3 && ! empty($conf->global->STOCK_CALCULATE_ON_BILL) && $qualified_for_stock_change && $object->statut>=1) { - $author->fetch($object->user_author); + $langs->load("stocks"); + require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; + $formproduct=new FormProduct($db); + $label=$object->type==2?$langs->trans("SelectWarehouseForStockDecrease"):$langs->trans("SelectWarehouseForStockIncrease"); + $formquestion=array( + //'text' => $langs->trans("ConfirmClone"), + //array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1), + //array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1), + array('type' => 'other', 'name' => 'idwarehouse', 'label' => $label, 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse'),'idwarehouse','',1,0,0,$langs->trans("NoStockAction")))); + $formconfirm=$form->formconfirm($_SERVER['PHP_SELF'].'?facid='.$object->id,$langs->trans('DeleteBill'),$text,'confirm_delete',$formquestion,"yes",1); + }else { + $formconfirm=$form->formconfirm($_SERVER['PHP_SELF'].'?facid='.$object->id,$langs->trans('DeleteBill'),$text,'confirm_delete','','',1); } + } - $objectidnext=$object->getIdReplacingInvoice(); - - $head = facture_prepare_head($object); - - dol_fiche_head($head, 'compta', $langs->trans('InvoiceCustomer'), 0, 'bill'); - - $formconfirm=''; - - // Confirmation de la conversion de l'avoir en reduc - if ($action == 'converttoreduc') + // Confirmation de la validation + if ($action == 'valid') + { + // on verifie si l'objet est en numerotation provisoire + $objectref = substr($object->ref, 1, 4); + if ($objectref == 'PROV') { - $text=$langs->trans('ConfirmConvertToReduc'); - $formconfirm=$form->formconfirm($_SERVER['PHP_SELF'].'?facid='.$object->id,$langs->trans('ConvertToReduc'),$text,'confirm_converttoreduc','',"yes",2); - } - - // Confirmation to delete invoice - if ($action == 'delete') - { - $text=$langs->trans('ConfirmDeleteBill',$object->ref); - $formquestion=array(); - - $qualified_for_stock_change=0; - if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) + $savdate=$object->date; + if (! empty($conf->global->FAC_FORCE_DATE_VALIDATION)) { - $qualified_for_stock_change=$object->hasProductsOrServices(2); - } - else - { - $qualified_for_stock_change=$object->hasProductsOrServices(1); + $object->date=dol_now(); + $object->date_lim_reglement=$object->calculate_date_lim_reglement(); } + $numref = $object->getNextNumRef($soc); + //$object->date=$savdate; + } + else + { + $numref = $object->ref; + } - if ($object->type != 3 && ! empty($conf->global->STOCK_CALCULATE_ON_BILL) && $qualified_for_stock_change && $object->statut>=1) - { - $langs->load("stocks"); - require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; - $formproduct=new FormProduct($db); + $text=$langs->trans('ConfirmValidateBill',$numref); + if (! empty($conf->notification->enabled)) + { + require_once DOL_DOCUMENT_ROOT .'/core/class/notify.class.php'; + $notify=new Notify($db); + $text.='
    '; + $text.=$notify->confirmMessage('BILL_VALIDATE',$object->socid); + } + $formquestion=array(); + + $qualified_for_stock_change=0; + if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) + { + $qualified_for_stock_change=$object->hasProductsOrServices(2); + } + else + { + $qualified_for_stock_change=$object->hasProductsOrServices(1); + } + + if ($object->type != 3 && ! empty($conf->global->STOCK_CALCULATE_ON_BILL) && $qualified_for_stock_change) + { + $langs->load("stocks"); + require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; + require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; + $formproduct=new FormProduct($db); + $warehouse = new Entrepot($db); + $warehouse_array = $warehouse->list_array(); + if (count($warehouse_array) == 1) { + $label = $object->type==2?$langs->trans("WarehouseForStockIncrease", current($warehouse_array)):$langs->trans("WarehouseForStockDecrease", current($warehouse_array)); + $value = ''; + } else { + $label = $object->type==2?$langs->trans("SelectWarehouseForStockIncrease"):$langs->trans("SelectWarehouseForStockDecrease"); + $value = $formproduct->selectWarehouses(GETPOST('idwarehouse'),'idwarehouse','',1); + } + $formquestion=array( + //'text' => $langs->trans("ConfirmClone"), + //array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1), + //array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1), + array('type' => 'other', 'name' => 'idwarehouse', 'label' => $label, 'value' => $value)); + } + if ($object->type != 2 && $object->total_ttc < 0) // Can happen only if $conf->global->FACTURE_ENABLE_NEGATIVE is on + { + $text.='
    '.img_warning().' '.$langs->trans("ErrorInvoiceOfThisTypeMustBePositive"); + } + $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id,$langs->trans('ValidateBill'),$text,'confirm_valid',$formquestion,(($object->type != 2 && $object->total_ttc < 0)?"no":"yes"),($conf->notification->enabled?0:2)); + } + + // Confirm back to draft status + if ($action == 'modif') + { + $text=$langs->trans('ConfirmUnvalidateBill',$object->ref); + $formquestion=array(); + + $qualified_for_stock_change=0; + if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) + { + $qualified_for_stock_change=$object->hasProductsOrServices(2); + } + else + { + $qualified_for_stock_change=$object->hasProductsOrServices(1); + } + if ($object->type != 3 && ! empty($conf->global->STOCK_CALCULATE_ON_BILL) && $qualified_for_stock_change) + { + $langs->load("stocks"); + require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; + require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; + $formproduct=new FormProduct($db); + $warehouse = new Entrepot($db); + $warehouse_array = $warehouse->list_array(); + if (count($warehouse_array) == 1) { + $label = $object->type==2?$langs->trans("WarehouseForStockDecrease", current($warehouse_array)):$langs->trans("WarehouseForStockIncrease", current($warehouse_array)); + $value = ''; + } else { $label=$object->type==2?$langs->trans("SelectWarehouseForStockDecrease"):$langs->trans("SelectWarehouseForStockIncrease"); - $formquestion=array( - //'text' => $langs->trans("ConfirmClone"), - //array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1), - //array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1), - array('type' => 'other', 'name' => 'idwarehouse', 'label' => $label, 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse'),'idwarehouse','',1,0,0,$langs->trans("NoStockAction")))); - $formconfirm=$form->formconfirm($_SERVER['PHP_SELF'].'?facid='.$object->id,$langs->trans('DeleteBill'),$text,'confirm_delete',$formquestion,"yes",1); - }else { - $formconfirm=$form->formconfirm($_SERVER['PHP_SELF'].'?facid='.$object->id,$langs->trans('DeleteBill'),$text,'confirm_delete','','',1); + $value = $formproduct->selectWarehouses(GETPOST('idwarehouse'),'idwarehouse','',1); } + $formquestion=array( + //'text' => $langs->trans("ConfirmClone"), + //array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1), + //array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1), + array('type' => 'other', 'name' => 'idwarehouse', 'label' => $label, 'value' => $value)); } - // Confirmation de la validation - if ($action == 'valid') + $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id,$langs->trans('UnvalidateBill'),$text,'confirm_modif',$formquestion,"yes",1); + } + + // Confirmation du classement paye + if ($action == 'paid' && $resteapayer <= 0) + { + $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id,$langs->trans('ClassifyPaid'),$langs->trans('ConfirmClassifyPaidBill',$object->ref),'confirm_paid','',"yes",1); + } + if ($action == 'paid' && $resteapayer > 0) + { + // Code + $i=0; + $close[$i]['code']='discount_vat';$i++; + $close[$i]['code']='badcustomer';$i++; + // Help + $i=0; + $close[$i]['label']=$langs->trans("HelpEscompte").'

    '.$langs->trans("ConfirmClassifyPaidPartiallyReasonDiscountVatDesc");$i++; + $close[$i]['label']=$langs->trans("ConfirmClassifyPaidPartiallyReasonBadCustomerDesc");$i++; + // Texte + $i=0; + $close[$i]['reason']=$form->textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonDiscountVat",$resteapayer,$langs->trans("Currency".$conf->currency)),$close[$i]['label'],1);$i++; + $close[$i]['reason']=$form->textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonBadCustomer",$resteapayer,$langs->trans("Currency".$conf->currency)),$close[$i]['label'],1);$i++; + // arrayreasons[code]=reason + foreach($close as $key => $val) { - // on verifie si l'objet est en numerotation provisoire - $objectref = substr($object->ref, 1, 4); - if ($objectref == 'PROV') - { - $savdate=$object->date; - if (! empty($conf->global->FAC_FORCE_DATE_VALIDATION)) - { - $object->date=dol_now(); - $object->date_lim_reglement=$object->calculate_date_lim_reglement(); - } - $numref = $object->getNextNumRef($soc); - //$object->date=$savdate; - } - else - { - $numref = $object->ref; - } - - $text=$langs->trans('ConfirmValidateBill',$numref); - if (! empty($conf->notification->enabled)) - { - require_once DOL_DOCUMENT_ROOT .'/core/class/notify.class.php'; - $notify=new Notify($db); - $text.='
    '; - $text.=$notify->confirmMessage('BILL_VALIDATE',$object->socid); - } - $formquestion=array(); - - $qualified_for_stock_change=0; - if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) - { - $qualified_for_stock_change=$object->hasProductsOrServices(2); - } - else - { - $qualified_for_stock_change=$object->hasProductsOrServices(1); - } - - if ($object->type != 3 && ! empty($conf->global->STOCK_CALCULATE_ON_BILL) && $qualified_for_stock_change) - { - $langs->load("stocks"); - require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; - require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; - $formproduct=new FormProduct($db); - $warehouse = new Entrepot($db); - $warehouse_array = $warehouse->list_array(); - if (count($warehouse_array) == 1) { - $label = $object->type==2?$langs->trans("WarehouseForStockIncrease", current($warehouse_array)):$langs->trans("WarehouseForStockDecrease", current($warehouse_array)); - $value = ''; - } else { - $label = $object->type==2?$langs->trans("SelectWarehouseForStockIncrease"):$langs->trans("SelectWarehouseForStockDecrease"); - $value = $formproduct->selectWarehouses(GETPOST('idwarehouse'),'idwarehouse','',1); - } - $formquestion=array( - //'text' => $langs->trans("ConfirmClone"), - //array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1), - //array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1), - array('type' => 'other', 'name' => 'idwarehouse', 'label' => $label, 'value' => $value)); - } - if ($object->type != 2 && $object->total_ttc < 0) // Can happen only if $conf->global->FACTURE_ENABLE_NEGATIVE is on - { - $text.='
    '.img_warning().' '.$langs->trans("ErrorInvoiceOfThisTypeMustBePositive"); - } - $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id,$langs->trans('ValidateBill'),$text,'confirm_valid',$formquestion,(($object->type != 2 && $object->total_ttc < 0)?"no":"yes"),($conf->notification->enabled?0:2)); + $arrayreasons[$close[$key]['code']]=$close[$key]['reason']; } - // Confirm back to draft status - if ($action == 'modif') + // Cree un tableau formulaire + $formquestion=array( + 'text' => $langs->trans("ConfirmClassifyPaidPartiallyQuestion"), + array('type' => 'radio', 'name' => 'close_code', 'label' => $langs->trans("Reason"), 'values' => $arrayreasons), + array('type' => 'text', 'name' => 'close_note', 'label' => $langs->trans("Comment"), 'value' => '', 'size' => '100') + ); + // Paiement incomplet. On demande si motif = escompte ou autre + $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id,$langs->trans('ClassifyPaid'),$langs->trans('ConfirmClassifyPaidPartially',$object->ref),'confirm_paid_partially',$formquestion,"yes"); + } + + // Confirmation du classement abandonne + if ($action == 'canceled') + { + // S'il y a une facture de remplacement pas encore validee (etat brouillon), + // on ne permet pas de classer abandonner la facture. + if ($objectidnext) { - $text=$langs->trans('ConfirmUnvalidateBill',$object->ref); - $formquestion=array(); - - $qualified_for_stock_change=0; - if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) - { - $qualified_for_stock_change=$object->hasProductsOrServices(2); - } - else - { - $qualified_for_stock_change=$object->hasProductsOrServices(1); - } - if ($object->type != 3 && ! empty($conf->global->STOCK_CALCULATE_ON_BILL) && $qualified_for_stock_change) - { - $langs->load("stocks"); - require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; - require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; - $formproduct=new FormProduct($db); - $warehouse = new Entrepot($db); - $warehouse_array = $warehouse->list_array(); - if (count($warehouse_array) == 1) { - $label = $object->type==2?$langs->trans("WarehouseForStockDecrease", current($warehouse_array)):$langs->trans("WarehouseForStockIncrease", current($warehouse_array)); - $value = ''; - } else { - $label=$object->type==2?$langs->trans("SelectWarehouseForStockDecrease"):$langs->trans("SelectWarehouseForStockIncrease"); - $value = $formproduct->selectWarehouses(GETPOST('idwarehouse'),'idwarehouse','',1); - } - $formquestion=array( - //'text' => $langs->trans("ConfirmClone"), - //array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1), - //array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1), - array('type' => 'other', 'name' => 'idwarehouse', 'label' => $label, 'value' => $value)); - } - - $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id,$langs->trans('UnvalidateBill'),$text,'confirm_modif',$formquestion,"yes",1); + $facturereplacement=new Facture($db); + $facturereplacement->fetch($objectidnext); + $statusreplacement=$facturereplacement->statut; } - - // Confirmation du classement paye - if ($action == 'paid' && $resteapayer <= 0) + if ($objectidnext && $statusreplacement == 0) { - $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id,$langs->trans('ClassifyPaid'),$langs->trans('ConfirmClassifyPaidBill',$object->ref),'confirm_paid','',"yes",1); + print '
    '.$langs->trans("ErrorCantCancelIfReplacementInvoiceNotValidated").'
    '; } - if ($action == 'paid' && $resteapayer > 0) + else { // Code - $i=0; - $close[$i]['code']='discount_vat';$i++; - $close[$i]['code']='badcustomer';$i++; + $close[1]['code']='badcustomer'; + $close[2]['code']='abandon'; // Help - $i=0; - $close[$i]['label']=$langs->trans("HelpEscompte").'

    '.$langs->trans("ConfirmClassifyPaidPartiallyReasonDiscountVatDesc");$i++; - $close[$i]['label']=$langs->trans("ConfirmClassifyPaidPartiallyReasonBadCustomerDesc");$i++; + $close[1]['label']=$langs->trans("ConfirmClassifyPaidPartiallyReasonBadCustomerDesc"); + $close[2]['label']=$langs->trans("ConfirmClassifyAbandonReasonOtherDesc"); // Texte - $i=0; - $close[$i]['reason']=$form->textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonDiscountVat",$resteapayer,$langs->trans("Currency".$conf->currency)),$close[$i]['label'],1);$i++; - $close[$i]['reason']=$form->textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonBadCustomer",$resteapayer,$langs->trans("Currency".$conf->currency)),$close[$i]['label'],1);$i++; - // arrayreasons[code]=reason - foreach($close as $key => $val) - { - $arrayreasons[$close[$key]['code']]=$close[$key]['reason']; - } + $close[1]['reason']=$form->textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonBadCustomer",$object->ref),$close[1]['label'],1); + $close[2]['reason']=$form->textwithpicto($langs->transnoentities("ConfirmClassifyAbandonReasonOther"),$close[2]['label'],1); + // arrayreasons + $arrayreasons[$close[1]['code']]=$close[1]['reason']; + $arrayreasons[$close[2]['code']]=$close[2]['reason']; // Cree un tableau formulaire $formquestion=array( - 'text' => $langs->trans("ConfirmClassifyPaidPartiallyQuestion"), + 'text' => $langs->trans("ConfirmCancelBillQuestion"), array('type' => 'radio', 'name' => 'close_code', 'label' => $langs->trans("Reason"), 'values' => $arrayreasons), array('type' => 'text', 'name' => 'close_note', 'label' => $langs->trans("Comment"), 'value' => '', 'size' => '100') ); - // Paiement incomplet. On demande si motif = escompte ou autre - $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id,$langs->trans('ClassifyPaid'),$langs->trans('ConfirmClassifyPaidPartially',$object->ref),'confirm_paid_partially',$formquestion,"yes"); - } - // Confirmation du classement abandonne - if ($action == 'canceled') + $formconfirm=$form->formconfirm($_SERVER['PHP_SELF'].'?facid='.$object->id,$langs->trans('CancelBill'),$langs->trans('ConfirmCancelBill',$object->ref),'confirm_canceled',$formquestion,"yes"); + } + } + + // Confirmation de la suppression d'une ligne produit + if ($action == 'ask_deleteline') + { + $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 'no', 1); + } + + // Clone confirmation + if ($action == 'clone') + { + // Create an array for form + $formquestion=array( + //'text' => $langs->trans("ConfirmClone"), + //array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1) + ); + // Paiement incomplet. On demande si motif = escompte ou autre + $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id,$langs->trans('CloneInvoice'),$langs->trans('ConfirmCloneInvoice',$object->ref),'confirm_clone',$formquestion,'yes',1); + } + + if (! $formconfirm) + { + $parameters=array('lineid'=>$lineid); + $formconfirm=$hookmanager->executeHooks('formConfirm',$parameters,$object,$action); // Note that $action and $object may have been modified by hook + } + + // Print form confirm + print $formconfirm; + + + + + // Invoice content + + print ''; + + $linkback = ''.$langs->trans("BackToList").''; + + // Ref + print ''; + print ''; + + // Ref customer + print ''; + print ''; + + // Third party + print ''; + + // Type + print ''; + + // Relative and absolute discounts + $addrelativediscount=''.$langs->trans("EditRelativeDiscounts").''; + $addabsolutediscount=''.$langs->trans("EditGlobalDiscounts").''; + $addcreditnote=''.$langs->trans("AddCreditNote").''; + + print ''; + print ''; + } - $resteapayeraffiche=$resteapayer; + // Link for paypal payment + if (! empty($conf->paypal->enabled) && $object->statut != 0) + { + include_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypal.lib.php'; + print showPaypalPaymentUrl('invoice',$object->ref); + } - // Loop on each credit note or deposit amount applied - $creditnoteamount=0; - $depositamount=0; - $sql = "SELECT re.rowid, re.amount_ht, re.amount_tva, re.amount_ttc,"; - $sql.= " re.description, re.fk_facture_source"; - $sql.= " FROM ".MAIN_DB_PREFIX ."societe_remise_except as re"; - $sql.= " WHERE fk_facture = ".$object->id; - $resql=$db->query($sql); - if ($resql) - { - $num = $db->num_rows($resql); - $i = 0; - $invoice=new Facture($db); - while ($i < $num) - { - $obj = $db->fetch_object($resql); - $invoice->fetch($obj->fk_facture_source); - print ''; - print ''; - print ''; - $i++; - if ($invoice->type == 2) $creditnoteamount += $obj->amount_ttc; - if ($invoice->type == 3) $depositamount += $obj->amount_ttc; - } - } - else - { - dol_print_error($db); - } + print '
    '; - // Paye partiellement 'escompte' - if (($object->statut == 2 || $object->statut == 3) && $object->close_code == 'discount_vat') - { - print '
    '; - $resteapayeraffiche=0; - } - // Paye partiellement ou Abandon 'badcustomer' - if (($object->statut == 2 || $object->statut == 3) && $object->close_code == 'badcustomer') - { - print ''; - //$resteapayeraffiche=0; - } - // Paye partiellement ou Abandon 'product_returned' - if (($object->statut == 2 || $object->statut == 3) && $object->close_code == 'product_returned') - { - print ''; - $resteapayeraffiche=0; - } - // Paye partiellement ou Abandon 'abandon' - if (($object->statut == 2 || $object->statut == 3) && $object->close_code == 'abandon') - { - print ''; - $resteapayeraffiche=0; - } + // List of actions on element + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; + $formactions=new FormActions($db); + $somethingshown=$formactions->showactions($object,'invoice',$socid); - // Billed - print ''; - - // Remainder to pay - print ''; - print ''; - print ''; - } - else // Credit note - { - // Total already paid back - print ''; - - // Billed - print ''; - - // Remainder to pay back - print ''; - print ''; - print ''; - - // Sold credit note - //print ''; - //print ''; - } - - print '
    '.$langs->trans('Ref').''; + $morehtmlref=''; + $discount=new DiscountAbsolute($db); + $result=$discount->fetch(0,$object->id); + if ($result > 0) + { + $morehtmlref=' ('.$langs->trans("CreditNoteConvertedIntoDiscount",$discount->getNomUrl(1,'discount')).')'; + } + if ($result < 0) + { + dol_print_error('',$discount->error); + } + print $form->showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); + print '
    '; + print ''; + if ($action != 'refclient' && ! empty($object->brouillon)) print ''; + print '
    '; + print $langs->trans('RefCustomer'); + print ''.img_edit($langs->trans('Modify')).'
    '; + print '
    '; + if ($user->rights->facture->creer && $action == 'refclient') + { + print '
    '; + print ''; + print ''; + print ''; + print ' '; + print '
    '; + } + else + { + print $object->ref_client; + } + print '
    '; + print ''; + print ''; + print ''; + print '
    '.$langs->trans('Company').''; + if (! empty($conf->global->FACTURE_CHANGE_THIRDPARTY) && $action != 'editthirdparty' && $object->brouillon && $user->rights->facture->creer) + print 'id.'">'.img_edit($langs->trans('SetLinkToThirdParty'),1).'
    '; + print '
    '; + if ($action == 'editthirdparty') + { + $form->form_thirdparty($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->socid,'socid'); + } + else + { + print '  '.$soc->getNomUrl(1,'compta'); + print '   '; + print '('.$langs->trans('OtherBills').''; + // Outstanding Bill + $outstandigBills=$soc->get_OutstandingBill(); + print ' - '.$langs->trans('CurrentOutstandingBill').': '; + print price($outstandigBills,'',$langs,0,0,-1,$conf->currency); + if ($soc->outstanding_limit != '') { - // S'il y a une facture de remplacement pas encore validee (etat brouillon), - // on ne permet pas de classer abandonner la facture. - if ($objectidnext) + if ($outstandigBills > $soc->outstanding_limit) print img_warning($langs->trans("OutstandingBillReached")); + print ' / '.price($soc->outstanding_limit); + } + print ')'; + } + print '
    '.$langs->trans('Type').''; + print $object->getLibType(); + if ($object->type == 1) + { + $facreplaced=new Facture($db); + $facreplaced->fetch($object->fk_facture_source); + print ' ('.$langs->transnoentities("ReplaceInvoice",$facreplaced->getNomUrl(1)).')'; + } + if ($object->type == 2) + { + $facusing=new Facture($db); + $facusing->fetch($object->fk_facture_source); + print ' ('.$langs->transnoentities("CorrectInvoice",$facusing->getNomUrl(1)).')'; + } + + $facidavoir=$object->getListIdAvoirFromInvoice(); + if (count($facidavoir) > 0) + { + print ' ('.$langs->transnoentities("InvoiceHasAvoir"); + $i=0; + foreach($facidavoir as $id) + { + if ($i==0) print ' '; + else print ','; + $facavoir=new Facture($db); + $facavoir->fetch($id); + print $facavoir->getNomUrl(1); + } + print ')'; + } + if ($objectidnext > 0) + { + $facthatreplace=new Facture($db); + $facthatreplace->fetch($objectidnext); + print ' ('.$langs->transnoentities("ReplacedByInvoice",$facthatreplace->getNomUrl(1)).')'; + } + print '
    '.$langs->trans('Discounts'); + print ''; + if ($soc->remise_percent) print $langs->trans("CompanyHasRelativeDiscount",$soc->remise_percent); + else print $langs->trans("CompanyHasNoRelativeDiscount"); + //print ' ('.$addrelativediscount.')'; + + if ($absolute_discount > 0) + { + print '. '; + if ($object->statut > 0 || $object->type == 2 || $object->type == 3) + { + if ($object->statut == 0) { - $facturereplacement=new Facture($db); - $facturereplacement->fetch($objectidnext); - $statusreplacement=$facturereplacement->statut; - } - if ($objectidnext && $statusreplacement == 0) - { - print '
    '.$langs->trans("ErrorCantCancelIfReplacementInvoiceNotValidated").'
    '; + print $langs->trans("CompanyHasAbsoluteDiscount",price($absolute_discount),$langs->transnoentities("Currency".$conf->currency)); + print '. '; } else { - // Code - $close[1]['code']='badcustomer'; - $close[2]['code']='abandon'; - // Help - $close[1]['label']=$langs->trans("ConfirmClassifyPaidPartiallyReasonBadCustomerDesc"); - $close[2]['label']=$langs->trans("ConfirmClassifyAbandonReasonOtherDesc"); - // Texte - $close[1]['reason']=$form->textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonBadCustomer",$object->ref),$close[1]['label'],1); - $close[2]['reason']=$form->textwithpicto($langs->transnoentities("ConfirmClassifyAbandonReasonOther"),$close[2]['label'],1); - // arrayreasons - $arrayreasons[$close[1]['code']]=$close[1]['reason']; - $arrayreasons[$close[2]['code']]=$close[2]['reason']; - - // Cree un tableau formulaire - $formquestion=array( - 'text' => $langs->trans("ConfirmCancelBillQuestion"), - array('type' => 'radio', 'name' => 'close_code', 'label' => $langs->trans("Reason"), 'values' => $arrayreasons), - array('type' => 'text', 'name' => 'close_note', 'label' => $langs->trans("Comment"), 'value' => '', 'size' => '100') - ); - - $formconfirm=$form->formconfirm($_SERVER['PHP_SELF'].'?facid='.$object->id,$langs->trans('CancelBill'),$langs->trans('ConfirmCancelBill',$object->ref),'confirm_canceled',$formquestion,"yes"); - } - } - - // Confirmation de la suppression d'une ligne produit - if ($action == 'ask_deleteline') - { - $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 'no', 1); - } - - // Clone confirmation - if ($action == 'clone') - { - // Create an array for form - $formquestion=array( - //'text' => $langs->trans("ConfirmClone"), - //array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1) - ); - // Paiement incomplet. On demande si motif = escompte ou autre - $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id,$langs->trans('CloneInvoice'),$langs->trans('ConfirmCloneInvoice',$object->ref),'confirm_clone',$formquestion,'yes',1); - } - - if (! $formconfirm) - { - $parameters=array('lineid'=>$lineid); - $formconfirm=$hookmanager->executeHooks('formConfirm',$parameters,$object,$action); // Note that $action and $object may have been modified by hook - } - - // Print form confirm - print $formconfirm; - - - - - // Invoice content - - print ''; - - $linkback = ''.$langs->trans("BackToList").''; - - // Ref - print ''; - print ''; - - // Ref customer - print ''; - print ''; - - // Third party - print ''; - - // Type - print ''; - - // Relative and absolute discounts - $addrelativediscount=''.$langs->trans("EditRelativeDiscounts").''; - $addabsolutediscount=''.$langs->trans("EditGlobalDiscounts").''; - $addcreditnote=''.$langs->trans("AddCreditNote").''; - - print ''; - - // Date invoice - print ''; + + // Date invoice + print ''; + + + // List of payments + + $sign=1; + if ($object->type == 2) $sign=-1; + + $nbrows=8; $nbcols=2; + if (! empty($conf->projet->enabled)) $nbrows++; + if (! empty($conf->banque->enabled)) $nbcols++; + //if (! empty($soc->outstandingbill)) $nbrows++; + if($mysoc->localtax1_assuj=="1") $nbrows++; + if($mysoc->localtax2_assuj=="1") $nbrows++; + if ($selleruserevenustamp) $nbrows++; + + print ''; + + // Conditions de reglement + print ''; + + // Date payment term + print ''; + + // Payment mode + print ''; + + // Amount + print ''; + print ''; + print ''; + print ''; + + // Amount Local Taxes + if ($mysoc->localtax1_assuj=="1" && $mysoc->useLocalTax(1)) //Localtax1 (example RE) + { + print ''; + print ''; + } + if ($mysoc->localtax2_assuj=="1" && $mysoc->useLocalTax(2)) //Localtax2 (example IRPF) + { + print ''; + print ''; + } + + // Revenue stamp + if ($selleruserevenustamp) // Test company use revenue stamp + { + print ''; + } + // Total with tax + print ''; - // List of payments + // Statut + print ''; + print ''; - $sign=1; - if ($object->type == 2) $sign=-1; + // Project + if (! empty($conf->projet->enabled)) + { + $langs->load('projects'); + print ''; + print ''; - $label=($langs->trans("PaymentType".$objp->payment_code)!=("PaymentType".$objp->payment_code))?$langs->trans("PaymentType".$objp->payment_code):$objp->payment_label; - print ''; - if (! empty($conf->banque->enabled)) + if (! $objectidnext) { - $bankaccountstatic->id=$objp->baid; - $bankaccountstatic->ref=$objp->ref; - $bankaccountstatic->label=$objp->ref; - print ''; + if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->rights->facture->valider) || $user->rights->facture->invoice_advance->unvalidate) + { + print ''; + } + else + { + print '
    '.$langs->trans('Modify').'
    '; + } } - print ''; - print ''; - print ''; - $i++; + else + { + print '
    '.$langs->trans('Modify').'
    '; + } + } + } + + // Reopen a standard paid invoice + if (($object->type == 0 || $object->type == 1) && ($object->statut == 2 || $object->statut == 3)) // A paid invoice (partially or completely) + { + if (! $objectidnext && $object->close_code != 'replaced') // Not replaced by another invoice + { + print ''; + } + else + { + print '
    '.$langs->trans('ReOpen').'
    '; + } + } + + // Validate + if ($object->statut == 0 && count($object->lines) > 0 && + ( + (($object->type == 0 || $object->type == 1 || $object->type == 3 || $object->type == 4) && (! empty($conf->global->FACTURE_ENABLE_NEGATIVE) || $object->total_ttc >= 0)) + || ($object->type == 2 && $object->total_ttc <= 0)) + ) + { + if ($user->rights->facture->valider) + { + print ''; + } + } + + // Send by mail + if (($object->statut == 1 || $object->statut == 2)) + { + if ($objectidnext) + { + print '
    '.$langs->trans('SendByMail').'
    '; + } + else + { + if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->facture->invoice_advance->send) + { + print ''; + } + else print ''; + } + } + + if (! empty($conf->global->FACTURE_SHOW_SEND_REMINDER)) // For backward compatibility + { + if (($object->statut == 1 || $object->statut == 2) && $resteapayer > 0) + { + if ($objectidnext) + { + print '
    '.$langs->trans('SendRemindByMail').'
    '; + } + else + { + if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->facture->invoice_advance->send) + { + print ''; + } + else print ''; + } + } + } + + // Create payment + if ($object->type != 2 && $object->statut == 1 && $object->paye == 0 && $user->rights->facture->paiement) + { + if ($objectidnext) + { + print '
    '.$langs->trans('DoPayment').'
    '; + } + else + { + if ($resteapayer == 0) + { + print '
    '.$langs->trans('DoPayment').'
    '; + } + else + { + print ''; + } + } + } + + // Reverse back money or convert to reduction + if ($object->type == 2 || $object->type == 3) + { + // For credit note only + if ($object->type == 2 && $object->statut == 1 && $object->paye == 0 && $user->rights->facture->paiement) + { + print ''; + } + // For credit note + if ($object->type == 2 && $object->statut == 1 && $object->paye == 0 && $user->rights->facture->creer && $object->getSommePaiement() == 0) + { + print ''; + } + // For deposit invoice + if ($object->type == 3 && $object->statut == 1 && $resteapayer == 0 && $user->rights->facture->creer) + { + print ''; + } + } + + // Classify paid (if not deposit and not credit note. Such invoice are "converted") + if ($object->statut == 1 && $object->paye == 0 && $user->rights->facture->paiement && + (($object->type != 2 && $object->type != 3 && $resteapayer <= 0) || ($object->type == 2 && $resteapayer >= 0)) ) + { + print ''; + } + + // Classify 'closed not completely paid' (possible si validee et pas encore classee payee) + if ($object->statut == 1 && $object->paye == 0 && $resteapayer > 0 + && $user->rights->facture->paiement) + { + if ($totalpaye > 0 || $totalcreditnotes > 0) + { + // If one payment or one credit note was linked to this invoice + print ''; + } + else + { + if ($objectidnext) + { + print '
    '.$langs->trans('ClassifyCanceled').'
    '; + } + else + { + print ''; + } + } + } + + // Clone + if (($object->type == 0 || $object->type == 3 || $object->type == 4) && $user->rights->facture->creer) + { + print ''; + } + + // Clone as predefined + if (($object->type == 0 || $object->type == 3 || $object->type == 4) && $object->statut == 0 && $user->rights->facture->creer) + { + if (! $objectidnext) + { + print ''; + } + } + + // Delete + if ($user->rights->facture->supprimer) + { + if (! $object->is_erasable()) + { + print ''; + } + else if ($objectidnext) + { + print ''; + } + elseif ($object->getSommePaiement()) + { + print ''; + } + else + { + print ''; } } else { - print ''; + print ''; } - //} - $db->free($result); + + print ''; + } + } + print '
    '; + + if ($action != 'prerelance' && $action != 'presend') + { + print '
    '; + print ''; // ancre + + // Documents generes + $filename=dol_sanitizeFileName($object->ref); + $filedir=$conf->facture->dir_output . '/' . dol_sanitizeFileName($object->ref); + $urlsource=$_SERVER['PHP_SELF'].'?facid='.$object->id; + $genallowed=$user->rights->facture->creer; + $delallowed=$user->rights->facture->supprimer; + + print $formfile->showdocuments('facture',$filename,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf,1,0,0,28,0,'','','',$soc->default_lang); + $somethingshown=$formfile->numoffiles; + + // Linked object block + $somethingshown=$object->showLinkedObjectBlock(); + + if (empty($somethingshown) && $object->statut > 0) + { + print '
    '.$langs->trans('LinkedOrder').''; + + print '
    '.$langs->trans('Ref').''; - $morehtmlref=''; - $discount=new DiscountAbsolute($db); - $result=$discount->fetch(0,$object->id); - if ($result > 0) - { - $morehtmlref=' ('.$langs->trans("CreditNoteConvertedIntoDiscount",$discount->getNomUrl(1,'discount')).')'; - } - if ($result < 0) - { - dol_print_error('',$discount->error); - } - print $form->showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); - print '
    '; - print ''; - if ($action != 'refclient' && ! empty($object->brouillon)) print ''; - print '
    '; - print $langs->trans('RefCustomer'); - print ''.img_edit($langs->trans('Modify')).'
    '; - print '
    '; - if ($user->rights->facture->creer && $action == 'refclient') - { - print '
    '; - print ''; - print ''; - print ''; - print ' '; - print '
    '; - } - else - { - print $object->ref_client; - } - print '
    '; - print ''; - print ''; - print ''; - print '
    '.$langs->trans('Company').''; - if (! empty($conf->global->FACTURE_CHANGE_THIRDPARTY) && $action != 'editthirdparty' && $object->brouillon && $user->rights->facture->creer) - print 'id.'">'.img_edit($langs->trans('SetLinkToThirdParty'),1).'
    '; - print '
    '; - if ($action == 'editthirdparty') - { - $form->form_thirdparty($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->socid,'socid'); - } - else - { - print '  '.$soc->getNomUrl(1,'compta'); - print '   '; - print '('.$langs->trans('OtherBills').''; - // Outstanding Bill - $outstandigBills=$soc->get_OutstandingBill(); - print ' - '.$langs->trans('CurrentOutstandingBill').': '; - print price($outstandigBills,'',$langs,0,0,-1,$conf->currency); - if ($soc->outstanding_limit != '') - { - if ($outstandigBills > $soc->outstanding_limit) print img_warning($langs->trans("OutstandingBillReached")); - print ' / '.price($soc->outstanding_limit); - } - print ')'; - } - print '
    '.$langs->trans('Type').''; - print $object->getLibType(); - if ($object->type == 1) - { - $facreplaced=new Facture($db); - $facreplaced->fetch($object->fk_facture_source); - print ' ('.$langs->transnoentities("ReplaceInvoice",$facreplaced->getNomUrl(1)).')'; - } - if ($object->type == 2) - { - $facusing=new Facture($db); - $facusing->fetch($object->fk_facture_source); - print ' ('.$langs->transnoentities("CorrectInvoice",$facusing->getNomUrl(1)).')'; - } - - $facidavoir=$object->getListIdAvoirFromInvoice(); - if (count($facidavoir) > 0) - { - print ' ('.$langs->transnoentities("InvoiceHasAvoir"); - $i=0; - foreach($facidavoir as $id) - { - if ($i==0) print ' '; - else print ','; - $facavoir=new Facture($db); - $facavoir->fetch($id); - print $facavoir->getNomUrl(1); - } - print ')'; - } - if ($objectidnext > 0) - { - $facthatreplace=new Facture($db); - $facthatreplace->fetch($objectidnext); - print ' ('.$langs->transnoentities("ReplacedByInvoice",$facthatreplace->getNomUrl(1)).')'; - } - print '
    '.$langs->trans('Discounts'); - print ''; - if ($soc->remise_percent) print $langs->trans("CompanyHasRelativeDiscount",$soc->remise_percent); - else print $langs->trans("CompanyHasNoRelativeDiscount"); - //print ' ('.$addrelativediscount.')'; - - if ($absolute_discount > 0) - { - print '. '; - if ($object->statut > 0 || $object->type == 2 || $object->type == 3) - { - if ($object->statut == 0) + if ($object->statut < 1 || $object->type == 2 || $object->type == 3) { - print $langs->trans("CompanyHasAbsoluteDiscount",price($absolute_discount),$langs->transnoentities("Currency".$conf->currency)); - print '. '; + $text=$langs->trans("CompanyHasAbsoluteDiscount",price($absolute_discount),$langs->transnoentities("Currency".$conf->currency)); + print '
    '.$text.'.
    '; } else { - if ($object->statut < 1 || $object->type == 2 || $object->type == 3) - { - $text=$langs->trans("CompanyHasAbsoluteDiscount",price($absolute_discount),$langs->transnoentities("Currency".$conf->currency)); - print '
    '.$text.'.
    '; - } - else - { - $text=$langs->trans("CompanyHasAbsoluteDiscount",price($absolute_discount),$langs->transnoentities("Currency".$conf->currency)); - $text2=$langs->trans("AbsoluteDiscountUse"); - print $form->textwithpicto($text,$text2); - } + $text=$langs->trans("CompanyHasAbsoluteDiscount",price($absolute_discount),$langs->transnoentities("Currency".$conf->currency)); + $text2=$langs->trans("AbsoluteDiscountUse"); + print $form->textwithpicto($text,$text2); } } - else - { - // Remise dispo de type remise fixe (not credit note) - print '
    '; - $form->form_remise_dispo($_SERVER["PHP_SELF"].'?facid='.$object->id, GETPOST('discountid'), 'remise_id', $soc->id, $absolute_discount, $filterabsolutediscount, $resteapayer, ' ('.$addabsolutediscount.')'); - } } else { - if ($absolute_creditnote > 0) // If not, link will be added later - { - if ($object->statut == 0 && $object->type != 2 && $object->type != 3) print ' ('.$addabsolutediscount.')
    '; - else print '. '; - } - else print '. '; + // Remise dispo de type remise fixe (not credit note) + print '
    '; + $form->form_remise_dispo($_SERVER["PHP_SELF"].'?facid='.$object->id, GETPOST('discountid'), 'remise_id', $soc->id, $absolute_discount, $filterabsolutediscount, $resteapayer, ' ('.$addabsolutediscount.')'); } - if ($absolute_creditnote > 0) + } + else + { + if ($absolute_creditnote > 0) // If not, link will be added later { - // If validated, we show link "add credit note to payment" - if ($object->statut != 1 || $object->type == 2 || $object->type == 3) - { - if ($object->statut == 0 && $object->type != 3) - { - $text=$langs->trans("CompanyHasCreditNote",price($absolute_creditnote),$langs->transnoentities("Currency".$conf->currency)); - print $form->textwithpicto($text,$langs->trans("CreditNoteDepositUse")); - } - else - { - print $langs->trans("CompanyHasCreditNote",price($absolute_creditnote),$langs->transnoentities("Currency".$conf->currency)).'.'; - } - } - else - { - // Remise dispo de type avoir - if (! $absolute_discount) print '
    '; - //$form->form_remise_dispo($_SERVER["PHP_SELF"].'?facid='.$object->id, 0, 'remise_id_for_payment', $soc->id, $absolute_creditnote, $filtercreditnote, $resteapayer); - $form->form_remise_dispo($_SERVER["PHP_SELF"].'?facid='.$object->id, 0, 'remise_id_for_payment', $soc->id, $absolute_creditnote, $filtercreditnote, 0); // We must allow credit not even if amount is higher - } - } - if (! $absolute_discount && ! $absolute_creditnote) - { - print $langs->trans("CompanyHasNoAbsoluteDiscount"); if ($object->statut == 0 && $object->type != 2 && $object->type != 3) print ' ('.$addabsolutediscount.')
    '; else print '. '; } - //if ($object->statut == 0 && $object->type != 2 && $object->type != 3) - // { - //if (! $absolute_discount && ! $absolute_creditnote) print '
    '; - //print '   -   '; - //print $addabsolutediscount; - //print '   -   '.$addcreditnote; // We disbale link to credit note - //} - print '
    '; - print ''; - if ($object->type != 2 && $action != 'editinvoicedate' && ! empty($object->brouillon) && $user->rights->facture->creer) print ''; - print '
    '; - print $langs->trans('Date'); - print 'id.'">'.img_edit($langs->trans('SetDate'),1).'
    '; - print '
    '; - - if ($object->type != 2) + else print '. '; + } + if ($absolute_creditnote > 0) + { + // If validated, we show link "add credit note to payment" + if ($object->statut != 1 || $object->type == 2 || $object->type == 3) { - if ($action == 'editinvoicedate') + if ($object->statut == 0 && $object->type != 3) { - $form->form_date($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->date,'invoicedate'); + $text=$langs->trans("CompanyHasCreditNote",price($absolute_creditnote),$langs->transnoentities("Currency".$conf->currency)); + print $form->textwithpicto($text,$langs->trans("CreditNoteDepositUse")); } else { - print dol_print_date($object->date,'daytext'); + print $langs->trans("CompanyHasCreditNote",price($absolute_creditnote),$langs->transnoentities("Currency".$conf->currency)).'.'; } } else + { + // Remise dispo de type avoir + if (! $absolute_discount) print '
    '; + //$form->form_remise_dispo($_SERVER["PHP_SELF"].'?facid='.$object->id, 0, 'remise_id_for_payment', $soc->id, $absolute_creditnote, $filtercreditnote, $resteapayer); + $form->form_remise_dispo($_SERVER["PHP_SELF"].'?facid='.$object->id, 0, 'remise_id_for_payment', $soc->id, $absolute_creditnote, $filtercreditnote, 0); // We must allow credit not even if amount is higher + } + } + if (! $absolute_discount && ! $absolute_creditnote) + { + print $langs->trans("CompanyHasNoAbsoluteDiscount"); + if ($object->statut == 0 && $object->type != 2 && $object->type != 3) print ' ('.$addabsolutediscount.')
    '; + else print '. '; + } + //if ($object->statut == 0 && $object->type != 2 && $object->type != 3) + // { + //if (! $absolute_discount && ! $absolute_creditnote) print '
    '; + //print '   -   '; + //print $addabsolutediscount; + //print '   -   '.$addcreditnote; // We disbale link to credit note + //} + print '
    '; + print ''; + if ($object->type != 2 && $action != 'editinvoicedate' && ! empty($object->brouillon) && $user->rights->facture->creer) print ''; + print '
    '; + print $langs->trans('Date'); + print 'id.'">'.img_edit($langs->trans('SetDate'),1).'
    '; + print '
    '; + + if ($object->type != 2) + { + if ($action == 'editinvoicedate') + { + $form->form_date($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->date,'invoicedate'); + } + else { print dol_print_date($object->date,'daytext'); } + } + else + { + print dol_print_date($object->date,'daytext'); + } + print ''; + + print ''; + + // List of payments already done + print ''; + print ''; + print ''; + if (! empty($conf->banque->enabled)) print ''; + print ''; + print ''; + print ''; + + $var=true; + + // Payments already done (from payment on this invoice) + $sql = 'SELECT p.datep as dp, p.num_paiement, p.rowid, p.fk_bank,'; + $sql.= ' c.code as payment_code, c.libelle as payment_label,'; + $sql.= ' pf.amount,'; + $sql.= ' ba.rowid as baid, ba.ref, ba.label'; + $sql.= ' FROM '.MAIN_DB_PREFIX.'c_paiement as c, '.MAIN_DB_PREFIX.'paiement_facture as pf, '.MAIN_DB_PREFIX.'paiement as p'; + $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank as b ON p.fk_bank = b.rowid'; + $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank_account as ba ON b.fk_account = ba.rowid'; + $sql.= ' WHERE pf.fk_facture = '.$object->id.' AND p.fk_paiement = c.id AND pf.fk_paiement = p.rowid'; + $sql.= ' ORDER BY p.datep, p.tms'; + + $result = $db->query($sql); + if ($result) + { + $num = $db->num_rows($result); + $i = 0; + + //if ($object->type != 2) + //{ + if ($num > 0) + { + while ($i < $num) + { + $objp = $db->fetch_object($result); + $var=!$var; + print ''; + $label=($langs->trans("PaymentType".$objp->payment_code)!=("PaymentType".$objp->payment_code))?$langs->trans("PaymentType".$objp->payment_code):$objp->payment_label; + print ''; + if (! empty($conf->banque->enabled)) + { + $bankaccountstatic->id=$objp->baid; + $bankaccountstatic->ref=$objp->ref; + $bankaccountstatic->label=$objp->ref; + print ''; + } + print ''; + print ''; + print ''; + $i++; + } + } + else + { + print ''; + } + //} + $db->free($result); + } + else + { + dol_print_error($db); + } + + if ($object->type != 2) + { + // Total already paid + print ''; + + $resteapayeraffiche=$resteapayer; + + // Loop on each credit note or deposit amount applied + $creditnoteamount=0; + $depositamount=0; + $sql = "SELECT re.rowid, re.amount_ht, re.amount_tva, re.amount_ttc,"; + $sql.= " re.description, re.fk_facture_source"; + $sql.= " FROM ".MAIN_DB_PREFIX ."societe_remise_except as re"; + $sql.= " WHERE fk_facture = ".$object->id; + $resql=$db->query($sql); + if ($resql) + { + $num = $db->num_rows($resql); + $i = 0; + $invoice=new Facture($db); + while ($i < $num) + { + $obj = $db->fetch_object($resql); + $invoice->fetch($obj->fk_facture_source); + print ''; + print ''; + print ''; + $i++; + if ($invoice->type == 2) $creditnoteamount += $obj->amount_ttc; + if ($invoice->type == 3) $depositamount += $obj->amount_ttc; + } + } + else + { + dol_print_error($db); + } + + // Paye partiellement 'escompte' + if (($object->statut == 2 || $object->statut == 3) && $object->close_code == 'discount_vat') + { + print ''; + $resteapayeraffiche=0; + } + // Paye partiellement ou Abandon 'badcustomer' + if (($object->statut == 2 || $object->statut == 3) && $object->close_code == 'badcustomer') + { + print ''; + //$resteapayeraffiche=0; + } + // Paye partiellement ou Abandon 'product_returned' + if (($object->statut == 2 || $object->statut == 3) && $object->close_code == 'product_returned') + { + print ''; + $resteapayeraffiche=0; + } + // Paye partiellement ou Abandon 'abandon' + if (($object->statut == 2 || $object->statut == 3) && $object->close_code == 'abandon') + { + print ''; + $resteapayeraffiche=0; + } + + // Billed + print ''; + + // Remainder to pay + print ''; + print ''; + print ''; + } + else // Credit note + { + // Total already paid back + print ''; + + // Billed + print ''; + + // Remainder to pay back + print ''; + print ''; + print ''; + + // Sold credit note + //print ''; + //print ''; + } + + print '
    '.($object->type == 2 ? $langs->trans("PaymentsBack") : $langs->trans('Payments')).''.$langs->trans('Type').''.$langs->trans('BankAccount').''.$langs->trans('Amount').' 
    '; + print ''.img_object($langs->trans('ShowPayment'),'payment').' '; + print dol_print_date($db->jdate($objp->dp),'day').''.$label.' '.$objp->num_paiement.''; + if ($bankaccountstatic->id) print $bankaccountstatic->getNomUrl(1,'transactions'); + print ''.price($sign * $objp->amount).' 
    '.$langs->trans("None").'
    '; + if ($object->type != 3) print $langs->trans('AlreadyPaidNoCreditNotesNoDeposits'); + else print $langs->trans('AlreadyPaid'); + print ' :'.price($totalpaye).' 
    '; + if ($invoice->type == 2) print $langs->trans("CreditNote").' '; + if ($invoice->type == 3) print $langs->trans("Deposit").' '; + print $invoice->getNomUrl(0); + print ' :'.price($obj->amount_ttc).''; + print 'rowid.'">'.img_delete().''; + print '
    '; + print $form->textwithpicto($langs->trans("Discount").':',$langs->trans("HelpEscompte"),-1); + print ''.price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye).' 
    '; + print $form->textwithpicto($langs->trans("Abandoned").':',$langs->trans("HelpAbandonBadCustomer"),-1); + print ''.price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye).' 
    '; + print $form->textwithpicto($langs->trans("ProductReturned").':',$langs->trans("HelpAbandonProductReturned"),-1); + print ''.price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye).' 
    '; + $text=$langs->trans("HelpAbandonOther"); + if ($object->close_note) $text.='

    '.$langs->trans("Reason").':'.$object->close_note; + print $form->textwithpicto($langs->trans("Abandoned").':',$text,-1); + print '
    '.price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye).' 
    '.$langs->trans("Billed").' :'.price($object->total_ttc).' 
    '; + if ($resteapayeraffiche >= 0) print $langs->trans('RemainderToPay'); + else print $langs->trans('ExcessReceived'); + print ' :'.price($resteapayeraffiche).' 
    '; + print $langs->trans('AlreadyPaidBack'); + print ' :'.price($sign * $totalpaye).' 
    '.$langs->trans("Billed").' :'.price($sign * $object->total_ttc).' 
    '; + if ($resteapayeraffiche <= 0) print $langs->trans('RemainderToPayBack'); + else print $langs->trans('ExcessPaydBack'); + print ' :'.price($sign * $resteapayeraffiche).' 
    '.$langs->trans('TotalTTC').' :'.price($sign * $object->total_ttc).' 
    '; + + // Margin Infos + if (! empty($conf->margin->enabled)) + { + print '
    '; + $object->displayMarginInfos($object->statut > 0); + } + + print '
    '; + print ''; + if ($object->type != 2 && $action != 'editconditions' && ! empty($object->brouillon) && $user->rights->facture->creer) print ''; + print '
    '; + print $langs->trans('PaymentConditionsShort'); + print 'id.'">'.img_edit($langs->trans('SetConditions'),1).'
    '; + print '
    '; + if ($object->type != 2) + { + if ($action == 'editconditions') + { + $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->cond_reglement_id,'cond_reglement_id'); + } + else + { + $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->cond_reglement_id,'none'); + } + } + else + { + print ' '; + } + print '
    '; + print ''; + if ($object->type != 2 && $action != 'editpaymentterm' && ! empty($object->brouillon) && $user->rights->facture->creer) print ''; + print '
    '; + print $langs->trans('DateMaxPayment'); + print 'id.'">'.img_edit($langs->trans('SetDate'),1).'
    '; + print '
    '; + if ($object->type != 2) + { + if ($action == 'editpaymentterm') + { + $form->form_date($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->date_lim_reglement,'paymentterm'); + } + else + { + print dol_print_date($object->date_lim_reglement,'daytext'); + if ($object->date_lim_reglement < ($now - $conf->facture->client->warning_delay) && ! $object->paye && $object->statut == 1 && ! isset($object->am)) print img_warning($langs->trans('Late')); + } + } + else + { + print ' '; + } + print '
    '; + print ''; + if ($action != 'editmode' && ! empty($object->brouillon) && $user->rights->facture->creer) print ''; + print '
    '; + print $langs->trans('PaymentMode'); + print 'id.'">'.img_edit($langs->trans('SetMode'),1).'
    '; + print '
    '; + if ($action == 'editmode') + { + $form->form_modes_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->mode_reglement_id,'mode_reglement_id'); + } + else + { + $form->form_modes_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->mode_reglement_id,'none'); + } + print '
    '.$langs->trans('AmountHT').''.price($object->total_ht,1,'',1,-1,-1,$conf->currency).'
    '.$langs->trans('AmountVAT').''.price($object->total_tva,1,'',1,-1,-1,$conf->currency).'
    '.$langs->transcountry("AmountLT1",$mysoc->country_code).''.price($object->total_localtax1,1,'',1,-1,-1,$conf->currency).'
    '.$langs->transcountry("AmountLT2",$mysoc->country_code).''.price($object->total_localtax2,1,'',1,-1,-1,$conf->currency).'
    '; + print ''; + if ($action != 'editrevenuestamp' && ! empty($object->brouillon) && $user->rights->facture->creer) print ''; + print '
    '; + print $langs->trans('RevenueStamp'); print 'id.'">'.img_edit($langs->trans('SetRevenuStamp'),1).'
    '; + print '
    '; + if ($action == 'editrevenuestamp') + { + print '
    '; + print ''; + print ''; + print $formother->select_revenue_stamp(GETPOST('revenuestamp'), 'revenuestamp', $mysoc->country_code); + //print ''; + print ' '; + print '
    '; + } + else + { + print price($object->revenuestamp,1,'',1,-1,-1,$conf->currency); + } + print '
    '.$langs->trans('AmountTTC').''.price($object->total_ttc,1,'',1,-1,-1,$conf->currency).'
    '.$langs->trans('Status').''.($object->getLibStatut(4,$totalpaye)).'
    '; - $nbrows=8; $nbcols=2; - if (! empty($conf->projet->enabled)) $nbrows++; - if (! empty($conf->banque->enabled)) $nbcols++; - //if (! empty($soc->outstandingbill)) $nbrows++; - if($mysoc->localtax1_assuj=="1") $nbrows++; - if($mysoc->localtax2_assuj=="1") $nbrows++; - if ($selleruserevenustamp) $nbrows++; + print ''; + if ($action != 'classify') + { + print ''; + } + print '
    '; + print $langs->trans('Project'); + print 'id.'">'; + print img_edit($langs->trans('SetProject'),1); + print '
    '; - print '
    '; - - print ''; - - // List of payments already done - print ''; - print ''; - print ''; - if (! empty($conf->banque->enabled)) print ''; - print ''; - print ''; + print ''; print ''; + } + // Other attributes (TODO Move this into an include) + $res=$object->fetch_optionals($object->id,$extralabels); + $parameters=array('colspan' => ' colspan="2"'); + $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook + if (empty($reshook) && ! empty($extrafields->attribute_label)) + { + + foreach($extrafields->attribute_label as $key=>$label) + { + if ($action == 'edit_extras') { + $value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]); + } else { + $value=$object->array_options["options_".$key]; + } + if ($extrafields->attribute_type[$key] == 'separate') + { + print $extrafields->showSeparator($key); + } + else + { + print 'attribute_required[$key])) print ' class="fieldrequired"'; + print '>'.$label.''."\n"; + } + } + } + + print '
    '.($object->type == 2 ? $langs->trans("PaymentsBack") : $langs->trans('Payments')).''.$langs->trans('Type').''.$langs->trans('BankAccount').''.$langs->trans('Amount').' '; + if ($action == 'classify') + { + $form->form_project($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->socid,$object->fk_project,'projectid'); + } + else + { + $form->form_project($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->socid,$object->fk_project,'none'); + } + print '
    '; + // Convert date into timestamp format + if (in_array($extrafields->attribute_type[$key],array('date','datetime'))) + { + $value = isset($_POST["options_".$key])?dol_mktime($_POST["options_".$key."hour"], $_POST["options_".$key."min"], 0, $_POST["options_".$key."month"], $_POST["options_".$key."day"], $_POST["options_".$key."year"]):$db->jdate($object->array_options['options_'.$key]); + } + + if ($action == 'edit_extras' && $user->rights->facture->creer && GETPOST('attribute') == $key) + { + print '
    '; + print ''; + print ''; + print ''; + print ''; + + print $extrafields->showInputField($key,$value); + + print ''; + print '
    '; + } + else + { + print $extrafields->showOutputField($key,$value); + if ($object->statut == 0 && $user->rights->facture->creer) print ''.img_picto('','edit').' '.$langs->trans('Modify').''; + } + print '

    '; + + if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) + { + $blocname = 'contacts'; + $title = $langs->trans('ContactsAddresses'); + include DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php'; + } + + if (! empty($conf->global->MAIN_DISABLE_NOTES_TAB)) + { + $blocname = 'notes'; + $title = $langs->trans('Notes'); + include DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php'; + } + + // Lines + $result = $object->getLinesArray(); + + + print '
    + + + + + '; + + + if (! empty($conf->use_javascript_ajax) && $object->statut == 0) + { + include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; + } + + print ''; + + // Show object lines + if (! empty($object->lines)) + $ret=$object->printObjectLines($action,$mysoc,$soc,$lineid,1); + + // Form to add new line + if ($object->statut == 0 && $user->rights->facture->creer && $action <> 'valid' && $action <> 'editline') + { $var=true; - // Payments already done (from payment on this invoice) - $sql = 'SELECT p.datep as dp, p.num_paiement, p.rowid, p.fk_bank,'; - $sql.= ' c.code as payment_code, c.libelle as payment_label,'; - $sql.= ' pf.amount,'; - $sql.= ' ba.rowid as baid, ba.ref, ba.label'; - $sql.= ' FROM '.MAIN_DB_PREFIX.'c_paiement as c, '.MAIN_DB_PREFIX.'paiement_facture as pf, '.MAIN_DB_PREFIX.'paiement as p'; - $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank as b ON p.fk_bank = b.rowid'; - $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank_account as ba ON b.fk_account = ba.rowid'; - $sql.= ' WHERE pf.fk_facture = '.$object->id.' AND p.fk_paiement = c.id AND pf.fk_paiement = p.rowid'; - $sql.= ' ORDER BY p.datep, p.tms'; - - $result = $db->query($sql); - if ($result) + if ($conf->global->MAIN_FEATURES_LEVEL > 1) { - $num = $db->num_rows($result); - $i = 0; + // Add free or predefined products/services + $object->formAddObjectLine(1,$mysoc,$soc); + } + else + { + // Add free products/services + $object->formAddFreeProduct(1,$mysoc,$soc); - //if ($object->type != 2) - //{ - if ($num > 0) + // Add predefined products/services + if (! empty($conf->product->enabled) || ! empty($conf->service->enabled)) { - while ($i < $num) + $var=!$var; + $object->formAddPredefinedProduct(1,$mysoc,$soc); + } + } + + $parameters=array(); + $reshook=$hookmanager->executeHooks('formAddObjectLine',$parameters,$object,$action); // Note that $action and $object may have been modified by hook + } + + print "
    \n"; + + print "
    \n"; + + dol_fiche_end(); + + + // Boutons actions + + if ($action != 'prerelance' && $action != 'presend') + { + if ($user->societe_id == 0 && $action <> 'valid' && $action <> 'editline') + { + print '
    '; + + // Editer une facture deja validee, sans paiement effectue et pas exporte en compta + if ($object->statut == 1) + { + // On verifie si les lignes de factures ont ete exportees en compta et/ou ventilees + $ventilExportCompta = $object->getVentilExportCompta(); + + if ($resteapayer == $object->total_ttc && $object->paye == 0 && $ventilExportCompta == 0) { - $objp = $db->fetch_object($result); - $var=!$var; - print '
    '; - print ''.img_object($langs->trans('ShowPayment'),'payment').' '; - print dol_print_date($db->jdate($objp->dp),'day').''.$label.' '.$objp->num_paiement.''; - if ($bankaccountstatic->id) print $bankaccountstatic->getNomUrl(1,'transactions'); - print ''.price($sign * $objp->amount).' 
    '.$langs->trans("None").'
    '; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + while ($i < $num) + { + $objp = $db->fetch_object($resqlorderlist); + if ($objp->socid == $soc->id) + { + $var=!$var; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + } + + $i++; + } + print '
    '.$langs->trans("Ref").''.$langs->trans("RefCustomer").''.$langs->trans("AmountHTShort").''.$langs->trans("Company").'
    '; + print ''; + print ''.$objp->ref.''.$objp->ref_client.''.price($objp->total_ht).''.$objp->name.'
    '; + print '
    '; + print ''; + $db->free($resqlorderlist); } else { dol_print_error($db); } - if ($object->type != 2) - { - // Total already paid - print '
    '; - if ($object->type != 3) print $langs->trans('AlreadyPaidNoCreditNotesNoDeposits'); - else print $langs->trans('AlreadyPaid'); - print ' :'.price($totalpaye).' 
    '; - if ($invoice->type == 2) print $langs->trans("CreditNote").' '; - if ($invoice->type == 3) print $langs->trans("Deposit").' '; - print $invoice->getNomUrl(0); - print ' :'.price($obj->amount_ttc).''; - print 'rowid.'">'.img_delete().''; - print '
    '; - print $form->textwithpicto($langs->trans("Discount").':',$langs->trans("HelpEscompte"),-1); - print ''.price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye).' 
    '; - print $form->textwithpicto($langs->trans("Abandoned").':',$langs->trans("HelpAbandonBadCustomer"),-1); - print ''.price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye).' 
    '; - print $form->textwithpicto($langs->trans("ProductReturned").':',$langs->trans("HelpAbandonProductReturned"),-1); - print ''.price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye).' 
    '; - $text=$langs->trans("HelpAbandonOther"); - if ($object->close_note) $text.='

    '.$langs->trans("Reason").':'.$object->close_note; - print $form->textwithpicto($langs->trans("Abandoned").':',$text,-1); - print '
    '.price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye).' 
    '.$langs->trans("Billed").' :'.price($object->total_ttc).' 
    '; - if ($resteapayeraffiche >= 0) print $langs->trans('RemainderToPay'); - else print $langs->trans('ExcessReceived'); - print ' :'.price($resteapayeraffiche).' 
    '; - print $langs->trans('AlreadyPaidBack'); - print ' :'.price($sign * $totalpaye).' 
    '.$langs->trans("Billed").' :'.price($sign * $object->total_ttc).' 
    '; - if ($resteapayeraffiche <= 0) print $langs->trans('RemainderToPayBack'); - else print $langs->trans('ExcessPaydBack'); - print ' :'.price($sign * $resteapayeraffiche).' 
    '.$langs->trans('TotalTTC').' :'.price($sign * $object->total_ttc).' 
    '; - - // Margin Infos - if (! empty($conf->margin->enabled)) - { - print '
    '; - $object->displayMarginInfos($object->statut > 0); - } - - print ''; - - // Conditions de reglement - print ''; - print ''; - if ($object->type != 2 && $action != 'editconditions' && ! empty($object->brouillon) && $user->rights->facture->creer) print ''; - print '
    '; - print $langs->trans('PaymentConditionsShort'); - print 'id.'">'.img_edit($langs->trans('SetConditions'),1).'
    '; - print ''; - if ($object->type != 2) - { - if ($action == 'editconditions') - { - $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->cond_reglement_id,'cond_reglement_id'); - } - else - { - $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->cond_reglement_id,'none'); - } - } - else - { - print ' '; - } - print ''; - - // Date payment term - print ''; - print ''; - if ($object->type != 2 && $action != 'editpaymentterm' && ! empty($object->brouillon) && $user->rights->facture->creer) print ''; - print '
    '; - print $langs->trans('DateMaxPayment'); - print 'id.'">'.img_edit($langs->trans('SetDate'),1).'
    '; - print ''; - if ($object->type != 2) - { - if ($action == 'editpaymentterm') - { - $form->form_date($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->date_lim_reglement,'paymentterm'); - } - else - { - print dol_print_date($object->date_lim_reglement,'daytext'); - if ($object->date_lim_reglement < ($now - $conf->facture->client->warning_delay) && ! $object->paye && $object->statut == 1 && ! isset($object->am)) print img_warning($langs->trans('Late')); - } - } - else - { - print ' '; - } - print ''; - - // Payment mode - print ''; - print ''; - if ($action != 'editmode' && ! empty($object->brouillon) && $user->rights->facture->creer) print ''; - print '
    '; - print $langs->trans('PaymentMode'); - print 'id.'">'.img_edit($langs->trans('SetMode'),1).'
    '; - print ''; - if ($action == 'editmode') - { - $form->form_modes_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->mode_reglement_id,'mode_reglement_id'); - } - else - { - $form->form_modes_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->mode_reglement_id,'none'); - } - print ''; - - // Amount - print ''.$langs->trans('AmountHT').''; - print ''.price($object->total_ht,1,'',1,-1,-1,$conf->currency).''; - print ''.$langs->trans('AmountVAT').''.price($object->total_tva,1,'',1,-1,-1,$conf->currency).''; - print ''; - - // Amount Local Taxes - if ($mysoc->localtax1_assuj=="1" && $mysoc->useLocalTax(1)) //Localtax1 (example RE) - { - print ''.$langs->transcountry("AmountLT1",$mysoc->country_code).''; - print ''.price($object->total_localtax1,1,'',1,-1,-1,$conf->currency).''; - } - if ($mysoc->localtax2_assuj=="1" && $mysoc->useLocalTax(2)) //Localtax2 (example IRPF) - { - print ''.$langs->transcountry("AmountLT2",$mysoc->country_code).''; - print ''.price($object->total_localtax2,1,'',1,-1,-1,$conf->currency).''; - } - - // Revenue stamp - if ($selleruserevenustamp) // Test company use revenue stamp - { - print ''; - print ''; - if ($action != 'editrevenuestamp' && ! empty($object->brouillon) && $user->rights->facture->creer) print ''; - print '
    '; - print $langs->trans('RevenueStamp'); - print 'id.'">'.img_edit($langs->trans('SetRevenuStamp'),1).'
    '; - print ''; - if ($action == 'editrevenuestamp') - { - print '
    '; - print ''; - print ''; - print $formother->select_revenue_stamp(GETPOST('revenuestamp'), 'revenuestamp', $mysoc->country_code); - //print ''; - print ' '; - print '
    '; - } - else - { - print price($object->revenuestamp,1,'',1,-1,-1,$conf->currency); - } - print ''; - } - - // Total with tax - print ''.$langs->trans('AmountTTC').''.price($object->total_ttc,1,'',1,-1,-1,$conf->currency).''; - - // Statut - print ''.$langs->trans('Status').''; - print ''.($object->getLibStatut(4,$totalpaye)).''; - - // Project - if (! empty($conf->projet->enabled)) - { - $langs->load('projects'); - print ''; - print ''; - - print ''; - if ($action != 'classify') - { - print ''; - } - print '
    '; - print $langs->trans('Project'); - print 'id.'">'; - print img_edit($langs->trans('SetProject'),1); - print '
    '; - - print ''; - if ($action == 'classify') - { - $form->form_project($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->socid,$object->fk_project,'projectid'); - } - else - { - $form->form_project($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->socid,$object->fk_project,'none'); - } - print ''; - print ''; - } - - // Other attributes (TODO Move this into an include) - $res=$object->fetch_optionals($object->id,$extralabels); - $parameters=array('colspan' => ' colspan="2"'); - $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook - if (empty($reshook) && ! empty($extrafields->attribute_label)) - { - - foreach($extrafields->attribute_label as $key=>$label) - { - if ($action == 'edit_extras') { - $value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]); - } else { - $value=$object->array_options["options_".$key]; - } - if ($extrafields->attribute_type[$key] == 'separate') - { - print $extrafields->showSeparator($key); - } - else - { - print 'attribute_required[$key])) print ' class="fieldrequired"'; - print '>'.$label.''; - // Convert date into timestamp format - if (in_array($extrafields->attribute_type[$key],array('date','datetime'))) - { - $value = isset($_POST["options_".$key])?dol_mktime($_POST["options_".$key."hour"], $_POST["options_".$key."min"], 0, $_POST["options_".$key."month"], $_POST["options_".$key."day"], $_POST["options_".$key."year"]):$db->jdate($object->array_options['options_'.$key]); - } - - if ($action == 'edit_extras' && $user->rights->facture->creer && GETPOST('attribute') == $key) - { - print '
    '; - print ''; - print ''; - print ''; - print ''; - - print $extrafields->showInputField($key,$value); - - print ''; - print '
    '; - } - else - { - print $extrafields->showOutputField($key,$value); - if ($object->statut == 0 && $user->rights->facture->creer) print ''.img_picto('','edit').' '.$langs->trans('Modify').''; - } - print ''."\n"; - } - } - } - - print '
    '; - - if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) - { - $blocname = 'contacts'; - $title = $langs->trans('ContactsAddresses'); - include DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php'; - } - - if (! empty($conf->global->MAIN_DISABLE_NOTES_TAB)) - { - $blocname = 'notes'; - $title = $langs->trans('Notes'); - include DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php'; - } - - // Lines - $result = $object->getLinesArray(); - - if (! empty($conf->use_javascript_ajax) && $object->statut == 0) - { - include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; - } - - print ''; - - // Show object lines - if (! empty($object->lines)) - $ret=$object->printObjectLines($action,$mysoc,$soc,$lineid,1); - - // Form to add new line - if ($object->statut == 0 && $user->rights->facture->creer && $action <> 'valid' && $action <> 'editline') - { - $var=true; - - if ($conf->global->MAIN_FEATURES_LEVEL > 1) - { - // Add free or predefined products/services - $object->formAddObjectLine(1,$mysoc,$soc); - } - else - { - // Add free products/services - $object->formAddFreeProduct(1,$mysoc,$soc); - - // Add predefined products/services - if (! empty($conf->product->enabled) || ! empty($conf->service->enabled)) - { - $var=!$var; - $object->formAddPredefinedProduct(1,$mysoc,$soc); - } - } - - $parameters=array(); - $reshook=$hookmanager->executeHooks('formAddObjectLine',$parameters,$object,$action); // Note that $action and $object may have been modified by hook - } - - print "
    \n"; - - print "\n"; - - - // Boutons actions - - if ($action != 'prerelance' && $action != 'presend') - { - if ($user->societe_id == 0 && $action <> 'valid' && $action <> 'editline') - { - print '
    '; - - // Editer une facture deja validee, sans paiement effectue et pas exporte en compta - if ($object->statut == 1) - { - // On verifie si les lignes de factures ont ete exportees en compta et/ou ventilees - $ventilExportCompta = $object->getVentilExportCompta(); - - if ($resteapayer == $object->total_ttc && $object->paye == 0 && $ventilExportCompta == 0) - { - if (! $objectidnext) - { - if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->rights->facture->valider) || $user->rights->facture->invoice_advance->unvalidate) - { - print ''; - } - else - { - print '
    '.$langs->trans('Modify').'
    '; - } - } - else - { - print '
    '.$langs->trans('Modify').'
    '; - } - } - } - - // Reopen a standard paid invoice - if (($object->type == 0 || $object->type == 1) && ($object->statut == 2 || $object->statut == 3)) // A paid invoice (partially or completely) - { - if (! $objectidnext && $object->close_code != 'replaced') // Not replaced by another invoice - { - print ''; - } - else - { - print '
    '.$langs->trans('ReOpen').'
    '; - } - } - - // Validate - if ($object->statut == 0 && count($object->lines) > 0 && - ( - (($object->type == 0 || $object->type == 1 || $object->type == 3 || $object->type == 4) && (! empty($conf->global->FACTURE_ENABLE_NEGATIVE) || $object->total_ttc >= 0)) - || ($object->type == 2 && $object->total_ttc <= 0)) - ) - { - if ($user->rights->facture->valider) - { - print ''; - } - } - - // Send by mail - if (($object->statut == 1 || $object->statut == 2)) - { - if ($objectidnext) - { - print '
    '.$langs->trans('SendByMail').'
    '; - } - else - { - if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->facture->invoice_advance->send) - { - print ''; - } - else print ''; - } - } - - if (! empty($conf->global->FACTURE_SHOW_SEND_REMINDER)) // For backward compatibility - { - if (($object->statut == 1 || $object->statut == 2) && $resteapayer > 0) - { - if ($objectidnext) - { - print '
    '.$langs->trans('SendRemindByMail').'
    '; - } - else - { - if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->facture->invoice_advance->send) - { - print ''; - } - else print ''; - } - } - } - - // Create payment - if ($object->type != 2 && $object->statut == 1 && $object->paye == 0 && $user->rights->facture->paiement) - { - if ($objectidnext) - { - print '
    '.$langs->trans('DoPayment').'
    '; - } - else - { - if ($resteapayer == 0) - { - print '
    '.$langs->trans('DoPayment').'
    '; - } - else - { - print ''; - } - } - } - - // Reverse back money or convert to reduction - if ($object->type == 2 || $object->type == 3) - { - // For credit note only - if ($object->type == 2 && $object->statut == 1 && $object->paye == 0 && $user->rights->facture->paiement) - { - print ''; - } - // For credit note - if ($object->type == 2 && $object->statut == 1 && $object->paye == 0 && $user->rights->facture->creer && $object->getSommePaiement() == 0) - { - print ''; - } - // For deposit invoice - if ($object->type == 3 && $object->statut == 1 && $resteapayer == 0 && $user->rights->facture->creer) - { - print ''; - } - } - - // Classify paid (if not deposit and not credit note. Such invoice are "converted") - if ($object->statut == 1 && $object->paye == 0 && $user->rights->facture->paiement && - (($object->type != 2 && $object->type != 3 && $resteapayer <= 0) || ($object->type == 2 && $resteapayer >= 0)) ) - { - print ''; - } - - // Classify 'closed not completely paid' (possible si validee et pas encore classee payee) - if ($object->statut == 1 && $object->paye == 0 && $resteapayer > 0 - && $user->rights->facture->paiement) - { - if ($totalpaye > 0 || $totalcreditnotes > 0) - { - // If one payment or one credit note was linked to this invoice - print ''; - } - else - { - if ($objectidnext) - { - print '
    '.$langs->trans('ClassifyCanceled').'
    '; - } - else - { - print ''; - } - } - } - - // Clone - if (($object->type == 0 || $object->type == 3 || $object->type == 4) && $user->rights->facture->creer) - { - print ''; - } - - // Clone as predefined - if (($object->type == 0 || $object->type == 3 || $object->type == 4) && $object->statut == 0 && $user->rights->facture->creer) - { - if (! $objectidnext) - { - print ''; - } - } - - // Delete - if ($user->rights->facture->supprimer) - { - if (! $object->is_erasable()) - { - print ''; - } - else if ($objectidnext) - { - print ''; - } - elseif ($object->getSommePaiement()) - { - print ''; - } - else - { - print ''; - } - } - else - { - print ''; - } - - print '
    '; - } - } - print '
    '; - - if ($action != 'prerelance' && $action != 'presend') - { - print '
    '; - print ''; // ancre - - // Documents generes - $filename=dol_sanitizeFileName($object->ref); - $filedir=$conf->facture->dir_output . '/' . dol_sanitizeFileName($object->ref); - $urlsource=$_SERVER['PHP_SELF'].'?facid='.$object->id; - $genallowed=$user->rights->facture->creer; - $delallowed=$user->rights->facture->supprimer; - - print $formfile->showdocuments('facture',$filename,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf,1,0,0,28,0,'','','',$soc->default_lang); - $somethingshown=$formfile->numoffiles; - - // Linked object block - $somethingshown=$object->showLinkedObjectBlock(); - - if (empty($somethingshown) && $object->statut > 0) - { - print '
    '.$langs->trans('LinkedOrder').''; - - print ''; - } - - // Link for paypal payment - if (! empty($conf->paypal->enabled) && $object->statut != 0) - { - include_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypal.lib.php'; - print showPaypalPaymentUrl('invoice',$object->ref); - } - - print '
    '; - - // List of actions on element - include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; - $formactions=new FormActions($db); - $somethingshown=$formactions->showactions($object,'invoice',$socid); - - print '
    '; - } - else - { - /* - * Affiche formulaire mail - */ - - // By default if $action=='presend' - $titreform='SendBillByMail'; - $topicmail='SendBillRef'; - $action='send'; - $modelmail='facture_send'; - - if ($action == 'prerelance') // For backward compatibility - { - $titrefrom='SendReminderBillByMail'; - $topicmail='SendReminderBillRef'; - $action='relance'; - $modelmail='facture_relance'; - } - - $ref = dol_sanitizeFileName($object->ref); - include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - $fileparams = dol_most_recent_file($conf->facture->dir_output . '/' . $ref, preg_quote($ref,'/')); - $file=$fileparams['fullname']; - - // Build document if it not exists - if (! $file || ! is_readable($file)) - { - // Define output language - $outputlangs = $langs; - $newlang=''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) $newlang=$_REQUEST['lang_id']; - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang; - if (! empty($newlang)) - { - $outputlangs = new Translate("",$conf); - $outputlangs->setDefaultLang($newlang); - } - - $result=facture_pdf_create($db, $object, GETPOST('model')?GETPOST('model'):$object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); - if ($result <= 0) - { - dol_print_error($db,$result); - exit; - } - $fileparams = dol_most_recent_file($conf->facture->dir_output . '/' . $ref, preg_quote($ref,'/')); - $file=$fileparams['fullname']; - } - - print '
    '; - print_titre($langs->trans($titreform)); - - // Cree l'objet formulaire mail - include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; - $formmail = new FormMail($db); - $formmail->fromtype = 'user'; - $formmail->fromid = $user->id; - $formmail->fromname = $user->getFullName($langs); - $formmail->frommail = $user->email; - $formmail->withfrom=1; - $liste=array(); - foreach ($object->thirdparty->thirdparty_and_contact_email_array(1) as $key=>$value) $liste[$key]=$value; - $formmail->withto=GETPOST('sendto')?GETPOST('sendto'):$liste; - $formmail->withtocc=$liste; - $formmail->withtoccc=$conf->global->MAIN_EMAIL_USECCC; - if(empty($object->ref_client)) - { - $formmail->withtopic=$langs->transnoentities($topicmail,'__FACREF__'); - } - else if(!empty($object->ref_client)) - { - $formmail->withtopic=$langs->transnoentities($topicmail,'__FACREF__(__REFCLIENT__)'); - } - $formmail->withfile=2; - $formmail->withbody=1; - $formmail->withdeliveryreceipt=1; - $formmail->withcancel=1; - // Tableau des substitutions - $formmail->substit['__FACREF__']=$object->ref; - $formmail->substit['__SIGNATURE__']=$user->signature; - $formmail->substit['__REFCLIENT__']=$object->ref_client; - $formmail->substit['__PERSONALIZED__']=''; - $formmail->substit['__CONTACTCIVNAME__']=''; - - //Find the good contact adress - $custcontact=''; - $contactarr=array(); - $contactarr=$object->liste_contact(-1,'external'); - - if (is_array($contactarr) && count($contactarr)>0) { - foreach($contactarr as $contact) { - if ($contact['libelle']==$langs->trans('TypeContact_facture_external_BILLING')) { - - require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php'; - - $contactstatic=new Contact($db); - $contactstatic->fetch($contact['id']); - $custcontact=$contactstatic->getFullName($langs,1); - } - } - - if (!empty($custcontact)) { - $formmail->substit['__CONTACTCIVNAME__']=$custcontact; - } - } - - - // Tableau des parametres complementaires du post - $formmail->param['action']=$action; - $formmail->param['models']=$modelmail; - $formmail->param['facid']=$object->id; - $formmail->param['returnurl']=$_SERVER["PHP_SELF"].'?id='.$object->id; - - // Init list of files - if (GETPOST("mode")=='init') - { - $formmail->clear_attached_files(); - $formmail->add_attached_files($file,basename($file),dol_mimetype($file)); - } - - $formmail->show_form(); - - print '
    '; - } + print ''; } else { - dol_print_error($db,$object->error); + /* + * Affiche formulaire mail + */ + + // By default if $action=='presend' + $titreform='SendBillByMail'; + $topicmail='SendBillRef'; + $action='send'; + $modelmail='facture_send'; + + if ($action == 'prerelance') // For backward compatibility + { + $titrefrom='SendReminderBillByMail'; + $topicmail='SendReminderBillRef'; + $action='relance'; + $modelmail='facture_relance'; + } + + $ref = dol_sanitizeFileName($object->ref); + include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + $fileparams = dol_most_recent_file($conf->facture->dir_output . '/' . $ref, preg_quote($ref,'/')); + $file=$fileparams['fullname']; + + // Build document if it not exists + if (! $file || ! is_readable($file)) + { + // Define output language + $outputlangs = $langs; + $newlang=''; + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) $newlang=$_REQUEST['lang_id']; + if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang; + if (! empty($newlang)) + { + $outputlangs = new Translate("",$conf); + $outputlangs->setDefaultLang($newlang); + } + + $result=facture_pdf_create($db, $object, GETPOST('model')?GETPOST('model'):$object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + if ($result <= 0) + { + dol_print_error($db,$result); + exit; + } + $fileparams = dol_most_recent_file($conf->facture->dir_output . '/' . $ref, preg_quote($ref,'/')); + $file=$fileparams['fullname']; + } + + print '
    '; + print_titre($langs->trans($titreform)); + + // Cree l'objet formulaire mail + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; + $formmail = new FormMail($db); + $formmail->fromtype = 'user'; + $formmail->fromid = $user->id; + $formmail->fromname = $user->getFullName($langs); + $formmail->frommail = $user->email; + $formmail->withfrom=1; + $liste=array(); + foreach ($object->thirdparty->thirdparty_and_contact_email_array(1) as $key=>$value) $liste[$key]=$value; + $formmail->withto=GETPOST('sendto')?GETPOST('sendto'):$liste; + $formmail->withtocc=$liste; + $formmail->withtoccc=$conf->global->MAIN_EMAIL_USECCC; + if(empty($object->ref_client)) + { + $formmail->withtopic=$langs->transnoentities($topicmail,'__FACREF__'); + } + else if(!empty($object->ref_client)) + { + $formmail->withtopic=$langs->transnoentities($topicmail,'__FACREF__(__REFCLIENT__)'); + } + $formmail->withfile=2; + $formmail->withbody=1; + $formmail->withdeliveryreceipt=1; + $formmail->withcancel=1; + // Tableau des substitutions + $formmail->substit['__FACREF__']=$object->ref; + $formmail->substit['__SIGNATURE__']=$user->signature; + $formmail->substit['__REFCLIENT__']=$object->ref_client; + $formmail->substit['__PERSONALIZED__']=''; + $formmail->substit['__CONTACTCIVNAME__']=''; + + //Find the good contact adress + $custcontact=''; + $contactarr=array(); + $contactarr=$object->liste_contact(-1,'external'); + + if (is_array($contactarr) && count($contactarr)>0) { + foreach($contactarr as $contact) { + if ($contact['libelle']==$langs->trans('TypeContact_facture_external_BILLING')) { + + require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php'; + + $contactstatic=new Contact($db); + $contactstatic->fetch($contact['id']); + $custcontact=$contactstatic->getFullName($langs,1); + } + } + + if (!empty($custcontact)) { + $formmail->substit['__CONTACTCIVNAME__']=$custcontact; + } + } + + + // Tableau des parametres complementaires du post + $formmail->param['action']=$action; + $formmail->param['models']=$modelmail; + $formmail->param['facid']=$object->id; + $formmail->param['returnurl']=$_SERVER["PHP_SELF"].'?id='.$object->id; + + // Init list of files + if (GETPOST("mode")=='init') + { + $formmail->clear_attached_files(); + $formmail->add_attached_files($file,basename($file),dol_mimetype($file)); + } + + $formmail->show_form(); + + print '
    '; } } diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 315a2b9edff..73403fd0755 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -999,6 +999,9 @@ class Contrat extends CommonObject $pu=$pu_ttc; } + // Check parameters + if (empty($remise_percent)) $remise_percent=0; + // Calcul du total TTC et de la TVA pour la ligne a partir de // qty, pu, remise_percent et txtva // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker diff --git a/htdocs/contrat/fiche.php b/htdocs/contrat/fiche.php index f096cac29c7..4a919ece44c 100644 --- a/htdocs/contrat/fiche.php +++ b/htdocs/contrat/fiche.php @@ -158,9 +158,9 @@ if (GETPOST('remonth') && GETPOST('reday') && GETPOST('reyear')) $datecontrat = dol_mktime(GETPOST('rehour'), GETPOST('remin'), 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')); } +// Add contract if ($action == 'add' && $user->rights->contrat->creer) { - // Check if (empty($datecontrat)) { @@ -339,9 +339,30 @@ else if ($action == 'classin' && $user->rights->contrat->creer) $object->setProject(GETPOST('projectid')); } +// Add a new line else if ($action == 'addline' && $user->rights->contrat->creer) { - if (! GETPOST('qty')) + // Set if we used free entry or predefined product + if (GETPOST('addline_libre')) + { + $predef=''; + $idprod=0; + $product_desc=(GETPOST('dp_desc')?GETPOST('dp_desc'):''); + $price_ht = GETPOST('price_ht'); + $tva_tx=(GETPOST('tva_tx')?GETPOST('tva_tx'):0); + } + if (GETPOST('addline_predefined')) + { + $predef=(($conf->global->MAIN_FEATURES_LEVEL < 2) ? '_predef' : ''); + $idprod=GETPOST('idprod', 'int'); + $product_desc = (GETPOST('product_desc')?GETPOST('product_desc'):(GETPOST('np_desc')?GETPOST('np_desc'):'')); + $price_ht = ''; + $tva_tx = ''; + } + $qty = GETPOST('qty'.$predef); + $remise_percent=GETPOST('remise_percent'.$predef); + + if ($qty == '') { setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Qty")),'errors'); $error++; @@ -362,41 +383,19 @@ else if ($action == 'addline' && $user->rights->contrat->creer) } $ret=$object->fetch_thirdparty(); - $date_start=''; - $date_end=''; - // Si ajout champ produit libre - if (GETPOST('mode') == 'libre') - { - if (GETPOST('date_start_slmonth') && GETPOST('date_start_slday') && GETPOST('date_start_slyear')) - { - $date_start=dol_mktime(GETPOST('date_start_slhour'), GETPOST('date_start_slmin'), 0, GETPOST('date_start_slmonth'), GETPOST('date_start_slday'), GETPOST('date_start_slyear')); - } - if (GETPOST('date_end_slmonth') && GETPOST('date_end_slday') && GETPOST('date_end_slyear')) - { - $date_end=dol_mktime(GETPOST('date_end_slhour'), GETPOST('date_end_slmin'), 0, GETPOST('date_end_slmonth'), GETPOST('date_end_slday'), GETPOST('date_end_slyear')); - } - } - // Si ajout champ produit predefini - if (GETPOST('mode') == 'predefined') - { - if (GETPOST('date_startmonth') && GETPOST('date_startday') && GETPOST('date_startyear')) - { - $date_start=dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), 0, GETPOST('date_startmonth'), GETPOST('date_startday'), GETPOST('date_startyear')); - } - if (GETPOST('date_endmonth') && GETPOST('date_endday') && GETPOST('date_endyear')) - { - $date_end=dol_mktime(GETPOST('date_endhour'), GETPOST('date_endmin'), 0, GETPOST('date_endmonth'), GETPOST('date_endday'), GETPOST('date_endyear')); - } - } + // Clean parameters + $date_start=dol_mktime(GETPOST('date_start'.$predef.'hour'), GETPOST('date_start'.$predef.'min'), GETPOST('date_start'.$predef.'sec'), GETPOST('date_start'.$predef.'month'), GETPOST('date_start'.$predef.'day'), GETPOST('date_start'.$predef.'year')); + $date_end=dol_mktime(GETPOST('date_end'.$predef.'hour'), GETPOST('date_end'.$predef.'min'), GETPOST('date_end'.$predef.'sec'), GETPOST('date_end'.$predef.'month'), GETPOST('date_end'.$predef.'day'), GETPOST('date_end'.$predef.'year')); + $price_base_type = (GETPOST('price_base_type', 'alpha')?GETPOST('price_base_type', 'alpha'):'HT'); // Ecrase $pu par celui du produit // Ecrase $desc par celui du produit // Ecrase $txtva par celui du produit // Ecrase $base_price_type par celui du produit - if (GETPOST('idprod')) + if ($idprod > 0) { $prod = new Product($db); - $prod->fetch(GETPOST('idprod')); + $prod->fetch($idprod); $tva_tx = get_default_tva($mysoc,$object->thirdparty,$prod->id); $tva_npr = get_default_npr($mysoc,$object->thirdparty,$prod->id); @@ -426,22 +425,21 @@ else if ($action == 'addline' && $user->rights->contrat->creer) $pu_ht = price2num($pu_ttc / (1 + ($tva_tx/100)), 'MU'); } else - { + { $pu_ttc = price2num($pu_ht * (1 + ($tva_tx/100)), 'MU'); } } - $desc = $prod->description; - $desc.= $prod->description && GETPOST('np_desc') ? "\n" : ""; - $desc.= GETPOST('np_desc'); + $desc=$prod->description; + $desc=dol_concatdesc($desc,$product_desc); } else - { + { $pu_ht=GETPOST('price_ht'); $price_base_type = 'HT'; $tva_tx=GETPOST('tva_tx')?str_replace('*','',GETPOST('tva_tx')):0; // tva_tx field may be disabled, so we use vat rate 0 $tva_npr=preg_match('/\*/',GETPOST('tva_tx'))?1:0; - $desc=GETPOST('dp_desc'); + $desc=$product_desc; } $localtax1_tx=get_localtax($tva_tx,1,$object->societe); @@ -457,23 +455,23 @@ else if ($action == 'addline' && $user->rights->contrat->creer) $info_bits=0; if ($tva_npr) $info_bits |= 0x01; - if($price_min && (price2num($pu_ht)*(1-price2num(GETPOST('remise_percent'))/100) < price2num($price_min))) + if($price_min && (price2num($pu_ht)*(1-price2num($remise_percent)/100) < price2num($price_min))) { $object->error = $langs->trans("CantBeLessThanMinPrice",price(price2num($price_min,'MU'),0,$langs,0,0,-1,$conf->currency)); $result = -1 ; } else - { + { // Insert line $result = $object->addline( $desc, $pu_ht, - GETPOST('qty'), + $qty, $tva_tx, $localtax1_tx, $localtax2_tx, - GETPOST('idprod'), - GETPOST('remise_percent'), + $idprod, + $remise_percent, $date_start, $date_end, $price_base_type, @@ -506,7 +504,6 @@ else if ($action == 'addline' && $user->rights->contrat->creer) unset($_POST['qty']); unset($_POST['type']); - unset($_POST['idprod']); unset($_POST['remise_percent']); unset($_POST['price_ht']); unset($_POST['price_ttc']); @@ -516,6 +513,16 @@ else if ($action == 'addline' && $user->rights->contrat->creer) unset($_POST['product_desc']); unset($_POST['fournprice']); unset($_POST['buying_price']); + unset($_POST['dp_desc']); + + unset($_POST['idprod']); + unset($_POST['qty_predef']); + unset($_POST['remise_percent_predef']); + unset($_POST['fournprice_predef']); + unset($_POST['buying_price_predef']); + unset($_POST['np_marginRate_predef']); + unset($_POST['np_markRate_predef']); + unset($_POST['np_desc']); } else { @@ -948,7 +955,7 @@ else if ($action == 'delete') { print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("DeleteAContract"),$langs->trans("ConfirmDeleteAContract"),"confirm_delete",'',0,1); - + } /* @@ -969,7 +976,7 @@ else $text=$langs->trans('ConfirmValidateContract',$numref); print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("ValidateAContract"),$text,"confirm_valid",'',0,1); - + } /* @@ -978,7 +985,7 @@ else if ($action == 'close') { print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("CloseAContract"),$langs->trans("ConfirmCloseContract"),"confirm_close",'',0,1); - + } /* @@ -1306,6 +1313,7 @@ else } print ""; + print "\n"; @@ -1472,6 +1480,7 @@ else * Desactiver la ligne de contrat */ print '
    '; + print ''; print ''; @@ -1525,13 +1534,22 @@ else } //print '
    '; + // Form to add new line if ($user->rights->contrat->creer && ($object->statut >= 0)) { $dateSelector=1; - print '
    '; - print ''; // Array with (n*2)+1 lines + print "\n"; + print ' + + + + + '; + + print '
    '; + print '
    '; // Array with (n*2)+1 lines // Trick to not show product entries $savproductenabled=$conf->product->enabled; @@ -1567,13 +1585,12 @@ else // Restore correct setup $conf->product->enabled = $savproductenabled; - print ''; - print '
    '; + + print ''; } - - print ''; + dol_fiche_end(); /* @@ -1642,11 +1659,13 @@ llxFooter(); $db->close(); ?> + margin->enabled) { +if ($conf->margin->enabled && $action == 'editline') +{ ?> + - + + diff --git a/htdocs/core/lib/ajax.lib.php b/htdocs/core/lib/ajax.lib.php index cf47c22d1fa..806a745e20b 100644 --- a/htdocs/core/lib/ajax.lib.php +++ b/htdocs/core/lib/ajax.lib.php @@ -33,7 +33,7 @@ * @param string $urloption More parameters on URL request * @param int $minLength Minimum number of chars to trigger that Ajax search * @param int $autoselect Automatic selection if just one value - * @param array $ajaxoptions Multiple options array + * @param array $ajaxoptions Multiple options array (Ex: array('update'=>array('field1','field2'...)) will reset field1 and field2 once select done * @return string Script */ function ajax_autocompleter($selected, $htmlname, $url, $urloption='', $minLength=2, $autoselect=0, $ajaxoptions=array()) diff --git a/htdocs/core/tpl/freeproductline_create.tpl.php b/htdocs/core/tpl/freeproductline_create.tpl.php index 214b1ac1472..5a9d17e217d 100644 --- a/htdocs/core/tpl/freeproductline_create.tpl.php +++ b/htdocs/core/tpl/freeproductline_create.tpl.php @@ -32,12 +32,6 @@ if (! empty($conf->margin->enabled) && ! empty($object->element) && in_array($ob -
    "> - - - - global->MAIN_VIEW_LINE_NUMBER) ? ' colspan="2"' : ''); ?>>
    @@ -116,7 +110,7 @@ else { tva_assuj == "0") echo '0'; + if ($seller->tva_assuj == "0") echo '0'; else echo $form->load_tva('tva_tx', (isset($_POST["tva_tx"])?$_POST["tva_tx"]:-1), $seller, $buyer); ?> @@ -137,7 +131,7 @@ else { if (! empty($conf->global->DISPLAY_MARGIN_RATES)) { echo '%'; } - elseif (! empty($conf->global->DISPLAY_MARK_RATES)) { + if (! empty($conf->global->DISPLAY_MARK_RATES)) { echo '%'; } } @@ -155,7 +149,7 @@ else { } ?> - + service->enabled) && $dateSelector) if (! empty($object->element) && $object->element == 'contrat') { print $langs->trans("DateStartPlanned").' '; - $form->select_date('',"date_start_sl",$usehm,$usehm,1,"addline_sl"); + $form->select_date('',"date_start",$usehm,$usehm,1,"addline_sl"); print '   '.$langs->trans("DateEndPlanned").' '; - $form->select_date('',"date_end_sl",$usehm,$usehm,1,"addline_sl"); + $form->select_date('',"date_end",$usehm,$usehm,1,"addline_sl"); } else { @@ -214,7 +208,6 @@ if (! empty($conf->service->enabled) && $dateSelector) } ?> - rights->margins->creer) @@ -223,34 +216,29 @@ if (! empty($usemargins) && $user->rights->margins->creer) -
    id; ?>" method="POST"> - - - - - - - -global->MAIN_VIEW_LINE_NUMBER)) { $coldisplay=2; } else { @@ -45,7 +38,11 @@ if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { ?> > global->MAIN_VIEW_LINE_NUMBER) ? ' colspan="2"' : ''); ?>> -
    +
    + + + + global->MAIN_FEATURES_LEVEL > 1) @@ -187,12 +184,15 @@ if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { - diff --git a/htdocs/core/tpl/predefinedproductline_create.tpl.php b/htdocs/core/tpl/predefinedproductline_create.tpl.php index 3306e995d58..4816c94e26d 100644 --- a/htdocs/core/tpl/predefinedproductline_create.tpl.php +++ b/htdocs/core/tpl/predefinedproductline_create.tpl.php @@ -32,12 +32,6 @@ if (! empty($conf->margin->enabled) && ! empty($object->element) && in_array($ob -
    "> - - - - global->MAIN_VIEW_LINE_NUMBER) ? ' colspan="4"' : ' colspan="3"'); ?>> - - % + + % - - "> + + "> rights->margins->creer) { if (! empty($conf->global->DISPLAY_MARGIN_RATES)) { - echo '%'; + echo '%'; } - elseif (! empty($conf->global->DISPLAY_MARK_RATES)) { - echo '%'; + if (! empty($conf->global->DISPLAY_MARK_RATES)) { + echo '%'; } } else @@ -163,7 +157,7 @@ else { } ?> - + service->enabled) && $dateSelector) if (! empty($object->element) && $object->element == 'contrat') { print $langs->trans("DateStartPlanned").' '; - $form->select_date('',"date_start",$usehm,$usehm,1,"addline"); + $form->select_date('',"date_start_predef",$usehm,$usehm,1,"addline"); print '   '.$langs->trans("DateEndPlanned").' '; - $form->select_date('',"date_end",$usehm,$usehm,1,"addline"); + $form->select_date('',"date_end_predef",$usehm,$usehm,1,"addline"); } else { @@ -221,7 +215,6 @@ if (! empty($conf->service->enabled) && $dateSelector) } ?> - rights->margins->creer) @@ -230,52 +223,48 @@ if (! empty($usemargins) && $user->rights->margins->creer) '; - $var=true; print ''; print ''; @@ -1611,14 +1642,20 @@ elseif (! empty($object->id)) print ''; print ''; print '%'; - print ''; + print ''; print ''; - print ''; - // Ajout de produits/services predefinis if (! empty($conf->product->enabled) || ! empty($conf->service->enabled)) { + print ''; + print ''; print ''; print $langs->trans("AddNewLine").' - '; @@ -1636,21 +1673,16 @@ elseif (! empty($object->id)) print ' '; print ''; - print '
    '; - print ''; - print ''; - print ''; - $var=!$var; print ''; print ''; $ajaxoptions=array( - 'update' => array('pqty' => 'qty', 'p_remise_percent' => 'discount'), + 'update' => array('qty_predef' => 'qty_predef', 'remise_percent_predef' => 'remise_percent_predef'), 'option_disabled' => 'addPredefinedProductButton', 'error' => $langs->trans("NoPriceDefinedForThisSupplier") ); - $form->select_produits_fournisseurs($object->fourn_id, '', 'idprodfournprice', '', '', $ajaxoptions); + $form->select_produits_fournisseurs($object->fourn_id, GETPOST('idprodfournprice'), 'idprodfournprice', '', '', $ajaxoptions); if (empty($conf->global->PRODUIT_USE_SEARCH_TO_SELECT)) print '
    '; @@ -1666,16 +1698,17 @@ elseif (! empty($object->id)) $doleditor->Create(); print ''; - print ''; - print '%'; - print ''; + print ''; + print '%'; + print ''; print ''; - - print '
    '; } } print ''; - print ''; + + print ''; + + dol_fiche_end(); if ($action != 'presend') @@ -1683,7 +1716,7 @@ elseif (! empty($object->id)) /** * Boutons actions */ - if ($user->societe_id == 0 && $action != 'editline' && $action != 'delete') + if ($user->societe_id == 0 && $action != 'edit_line' && $action != 'delete') { print '
    '; @@ -1801,9 +1834,9 @@ elseif (! empty($object->id)) * Linked object block */ $somethingshown=$object->showLinkedObjectBlock(); - + print '
    '; - + // List of actions on element include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index b6a232c2f54..18c515ac34e 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -477,7 +477,7 @@ elseif ($action == 'add' && $user->rights->fournisseur->facture->creer) } // Modification d'une ligne -elseif ($action == 'update_line') +elseif ($action == 'update_line' && $user->rights->fournisseur->facture->creer) { if (GETPOST('etat') == '1' && ! GETPOST('cancel')) // si on valide la modification { @@ -524,8 +524,32 @@ elseif ($action == 'update_line') } } -elseif ($action == 'addline') +elseif ($action == 'addline' && $user->rights->fournisseur->facture->creer) { + $langs->load('errors'); + $error=0; + + // Set if we used free entry or predefined product + if (GETPOST('addline_libre')) + { + $predef=''; + $idprod=0; + $product_desc=(GETPOST('dp_desc')?GETPOST('dp_desc'):''); + $price_ht = GETPOST('price_ht'); + $tva_tx=(GETPOST('tva_tx')?GETPOST('tva_tx'):0); + } + if (GETPOST('addline_predefined')) + { + $predef=(($conf->global->MAIN_FEATURES_LEVEL < 2) ? '_predef' : ''); + $idprod=GETPOST('idprod', 'int'); + $product_desc = (GETPOST('product_desc')?GETPOST('product_desc'):(GETPOST('np_desc')?GETPOST('np_desc'):'')); + $price_ht = ''; + $tva_tx = ''; + } + $qty = GETPOST('qty'.$predef); + $remise_percent=GETPOST('remise_percent'.$predef); + + $ret=$object->fetch($id); if ($ret < 0) { @@ -534,10 +558,10 @@ elseif ($action == 'addline') } $ret=$object->fetch_thirdparty(); - if (GETPOST('search_idprodfournprice') || GETPOST('idprodfournprice')) // With combolist idprodfournprice is > 0 or -1, with autocomplete, idprodfournprice is > 0 or '' + if (GETPOST('addline_predefined') || GETPOST('search_idprodfournprice') || GETPOST('idprodfournprice')) // With combolist idprodfournprice is > 0 or -1. With autocomplete, idprodfournprice is > 0 or '' { $idprod=0; - $product=new Product($db); + $productsupplier=new ProductFournisseur($db); if (GETPOST('idprodfournprice') == '') { @@ -545,33 +569,39 @@ elseif ($action == 'addline') } if (GETPOST('idprodfournprice') > 0) { - $idprod=$product->get_buyprice(GETPOST('idprodfournprice'), $_POST['qty']); // Just to see if a price exists for the quantity. Not used to found vat + $idprod=$productsupplier->get_buyprice(GETPOST('idprodfournprice'), $qty); // Just to see if a price exists for the quantity. Not used to found vat } if ($idprod > 0) { - $result=$product->fetch($idprod); + $result=$productsupplier->fetch($idprod); - // cas special pour lequel on a les meme reference que le fournisseur - // $label = '['.$product->ref.'] - '. $product->libelle; - $label = $product->description; - $label.= $product->description && $_POST['np_desc'] ? "\n" : ""; - $label.= $_POST['np_desc']; + $label = $productsupplier->libelle; - $tvatx=get_default_tva($object->thirdparty, $mysoc, $product->id, $_POST['idprodfournprice']); - $npr = get_default_npr($object->thirdparty, $mysoc, $product->id, $_POST['idprodfournprice']); + $desc = $productsupplier->description; + if (trim($product_desc) != trim($desc)) $desc = dol_concatdesc($desc, $product_desc); + + $tvatx=get_default_tva($object->thirdparty, $mysoc, $productsupplier->id, $_POST['idprodfournprice']); + $npr = get_default_npr($object->thirdparty, $mysoc, $productsupplier->id, $_POST['idprodfournprice']); $localtax1tx= get_localtax($tvatx, 1, $mysoc,$object->thirdparty); $localtax2tx= get_localtax($tvatx, 2, $mysoc,$object->thirdparty); - $remise_percent=GETPOST('remise_percent'); - $type = $product->type; - $result=$object->addline($label, $product->fourn_pu, $tvatx, $localtax1tx, $localtax2tx, $_POST['qty'], $idprod, $remise_percent, '', '', 0, $npr); + $type = $productsupplier->type; + $result=$object->addline($desc, $productsupplier->fourn_pu, $tvatx, $localtax1tx, $localtax2tx, $qty, $idprod, $remise_percent, '', '', 0, $npr); + } + if ($idprod == 0) + { + // Product not selected + $error++; + $langs->load("errors"); + $mesg='
    '.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("ProductOrService")).'
    '; } if ($idprod == -1) { // Quantity too low + $error++; $langs->load("errors"); $mesg='
    '.$langs->trans("ErrorQtyTooLowForThisSupplier").'
    '; } @@ -583,35 +613,37 @@ elseif ($action == 'addline') $tauxtva = price2num($tauxtva); $localtax1tx= get_localtax($tauxtva, 1, $mysoc,$object->thirdparty); $localtax2tx= get_localtax($tauxtva, 2, $mysoc,$object->thirdparty); - $remise_percent=GETPOST('remise_percent'); - if (! $_POST['dp_desc']) + if (! $product_desc) { + $error++; $mesg='
    '.$langs->trans("ErrorFieldRequired",$langs->transnoentities("Description")).'
    '; } else - { + { $type = $_POST["type"]; - if (! empty($_POST['amount'])) + + if (! empty($_POST['amount'])) { $ht = price2num($_POST['amount']); $price_base_type = 'HT'; - //$desc, $pu, $txtva, $qty, $fk_product=0, $remise_percent=0, $date_start='', $date_end='', $ventil=0, $info_bits='', $price_base_type='HT', $type=0) - $result=$object->addline($_POST['dp_desc'], $ht, $tauxtva, $localtax1tx, $localtax2tx, $_POST['qty'], 0, $remise_percent, $datestart, $dateend, 0, $npr, $price_base_type, $type); + //print $product_desc, $pu, $txtva, $qty, $fk_product=0, $remise_percent=0, $date_start='', $date_end='', $ventil=0, $info_bits='', $price_base_type='HT', $type=0 + $result=$object->addline($product_desc, $ht, $tauxtva, $localtax1tx, $localtax2tx, $qty, 0, $remise_percent, $datestart, $dateend, 0, $npr, $price_base_type, $type); } else { $ttc = price2num($_POST['amountttc']); $ht = $ttc / (1 + ($tauxtva / 100)); $price_base_type = 'HT'; - $result=$object->addline($_POST['dp_desc'], $ht, $tauxtva,$localtax1tx, $localtax2tx, $_POST['qty'], 0, $remise_percent, $datestart, $dateend, 0, $npr, $price_base_type, $type); + //print $product_desc, $pu, $txtva, $qty, $fk_product=0, $remise_percent=0, $date_start='', $date_end='', $ventil=0, $info_bits='', $price_base_type='HT', $type=0 + $result=$object->addline($product_desc, $ht, $tauxtva,$localtax1tx, $localtax2tx, $qty, 0, $remise_percent, $datestart, $dateend, 0, $npr, $price_base_type, $type); } } } //print "xx".$tva_tx; exit; - if ($result > 0) + if (! $error && $result > 0) { // Define output language $outputlangs = $langs; @@ -622,7 +654,8 @@ elseif ($action == 'addline') $outputlangs = new Translate("",$conf); $outputlangs->setDefaultLang($newlang); } - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) + { $result=supplier_invoice_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); if ($result <= 0) { @@ -633,15 +666,20 @@ elseif ($action == 'addline') unset($_POST['qty']); unset($_POST['type']); - unset($_POST['idprodfournprice']); unset($_POST['remise_percent']); unset($_POST['dp_desc']); - unset($_POST['np_desc']); unset($_POST['pu']); unset($_POST['tva_tx']); unset($_POST['label']); unset($localtax1_tx); unset($localtax2_tx); + + unset($_POST['idprodfournprice']); + unset($_POST['qty_predef']); + unset($_POST['remise_percent_predef']); + unset($_POST['fournprice_predef']); + unset($_POST['buying_price_predef']); + unset($_POST['np_desc']); } else if (empty($mesg)) { @@ -1103,6 +1141,7 @@ if ($action == 'create') print ''; print ''; print ''; + print ''; // Ref @@ -1374,6 +1413,7 @@ else */ $head = facturefourn_prepare_head($object); $titre=$langs->trans('SupplierInvoice'); + dol_fiche_head($head, 'card', $titre, 0, 'bill'); dol_htmloutput_mesg($mesg); @@ -1542,7 +1582,7 @@ else { if ($societe->localtax1_assuj=="1") $nbrows++; if ($societe->localtax2_assuj=="1") $nbrows++; - } + } print ''; - print '
    '; $sql = 'SELECT p.datep as dp, p.num_paiement, p.rowid, p.fk_bank,'; @@ -1790,8 +1830,21 @@ else /* * Lines */ + + + print '
    id.(($action != 'edit_line')?'#add':'#line_'.GETPOST('lineid')).'" method="POST"> + + + + + + + + '; + + print '
    '; - print ''; + print '
    '; $var=1; $num=count($object->lines); for ($i = 0; $i < $num; $i++) @@ -1833,13 +1886,13 @@ else // Edit line if ($object->statut == 0 && $action == 'edit_line' && $_GET['etat'] == '0' && $_GET['lineid'] == $object->lines[$i]->rowid) { - print 'lines[$i]->rowid.'" method="post">'; - print ''; - print ''; print ''; // Show product and description print ''; - print ''; print ''; - print ''; } else // Affichage simple de la ligne { @@ -1972,7 +2024,7 @@ else /* * Form to add new line - */ + */ if ($object->statut == 0 && $action != 'edit_line') { @@ -1992,11 +2044,6 @@ else print ''; // Add free products/services form - print ''; - print ''; - print ''; - print ''; - $var=true; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; - print ''; - print ''; + print ''; // Ajout de produits/services predefinis if (! empty($conf->product->enabled) || ! empty($conf->service->enabled)) { + print ''; + print ''; print ''; print ''; - // TODO Use the predefinedproductline_create.tpl.php file - print ''; - print ''; - print ''; - print ''; - - print ''; - $var=! $var; print ''; print ''; - print ''; - print ''; + print ''; + print ''; print ''; print ''; - print ''; + print ''; print ''; - print ''; } } print '
    '; + + print ''; + if ((! empty($conf->product->enabled) || ! empty($conf->service->enabled)) && $object->lines[$i]->fk_product) { print ''; @@ -1888,11 +1941,10 @@ else print ' '; + print ''; print '
    '; @@ -2022,23 +2069,30 @@ else print $form->load_tva('tauxtva',(GETPOST('tauxtva')?GETPOST('tauxtva'):-1),$societe,$mysoc); print ''; - print ''; + print ''; print ''; - print ''; + print ''; print ''; - print ''; + print ''; print '%  
    '; print $langs->trans("AddNewLine").' - '; @@ -2057,30 +2111,16 @@ else print ' 
    '; $ajaxoptions=array( - 'update' => array('pqty' => 'qty', 'p_remise_percent' => 'discount'), + 'update' => array('qty_predef' => 'qty_predef', 'remise_percent_predef' => 'remise_percent_predef'), 'disabled' => 'addPredefinedProductButton', 'error' => $langs->trans("NoPriceDefinedForThisSupplier") ); - $form->select_produits_fournisseurs($object->socid, '', 'idprodfournprice', '', '', $ajaxoptions); + $form->select_produits_fournisseurs($object->socid, GETPOST('idprodfournprice'), 'idprodfournprice', '', '', $ajaxoptions); if (empty($conf->global->PRODUIT_USE_SEARCH_TO_SELECT)) print '
    '; @@ -2096,19 +2136,21 @@ else $doleditor->Create(); print '
    %%  
    '; - print ''; + print ''; + + dol_fiche_end(); + if ($action != 'presend') { From 56867b6fd9a6fbd1c8953e6f674c2cdac07cd393 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 17 Nov 2013 23:45:17 +0100 Subject: [PATCH 057/107] Fix: Removed duplicate tests --- test/phpunit/WebservicesOrdersTest.php | 178 ------------------------- 1 file changed, 178 deletions(-) diff --git a/test/phpunit/WebservicesOrdersTest.php b/test/phpunit/WebservicesOrdersTest.php index c3e382a85e7..787a6086c27 100755 --- a/test/phpunit/WebservicesOrdersTest.php +++ b/test/phpunit/WebservicesOrdersTest.php @@ -174,183 +174,5 @@ class WebservicesOrdersTest extends PHPUnit_Framework_TestCase return $result; } - - - /** - * testWSOtherGetVersions - * - * @return int - */ - public function testWSOtherGetVersions() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; - - $WS_DOL_URL = DOL_MAIN_URL_ROOT.'/webservices/server_other.php'; - $WS_METHOD = 'getVersions'; - $ns='http://www.dolibarr.org/ns/'; - - // Set the WebService URL - print __METHOD__." create nusoap_client for URL=".$WS_DOL_URL."\n"; - $soapclient = new nusoap_client($WS_DOL_URL); - if ($soapclient) - { - $soapclient->soap_defencoding='UTF-8'; - $soapclient->decodeUTF8(false); - } - - // Call the WebService method and store its result in $result. - $authentication=array( - 'dolibarrkey'=>$conf->global->WEBSERVICES_KEY, - 'sourceapplication'=>'DEMO', - 'login'=>'admin', - 'password'=>'admin', - 'entity'=>''); - - // Test URL - $result=''; - if ($WS_METHOD) - { - $parameters = array('authentication'=>$authentication); - print __METHOD__." call method ".$WS_METHOD."\n"; - $result = $soapclient->call($WS_METHOD,$parameters,$ns,''); - if (! $result) - { - //var_dump($soapclient); - print $soapclient->error_str; - print "
    \n\n"; - print $soapclient->request; - print "
    \n\n"; - print $soapclient->response; - } - - print __METHOD__." result=".$result."\n"; - $this->assertEquals('OK',$result['result']['result_code']); - } - - return $result; - } - - - /** - * testWSThirdparty - * - * @return int - */ - public function testWSThirdparty() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; - - $WS_DOL_URL = DOL_MAIN_URL_ROOT.'/webservices/server_thirdparty.php'; - $WS_METHOD = ''; - $ns='http://www.dolibarr.org/ns/'; - - // Set the WebService URL - print __METHOD__."create nusoap_client for URL=".$WS_DOL_URL."\n"; - $soapclient = new nusoap_client($WS_DOL_URL); - if ($soapclient) - { - $soapclient->soap_defencoding='UTF-8'; - $soapclient->decodeUTF8(false); - } - - // Call the WebService method and store its result in $result. - $authentication=array( - 'dolibarrkey'=>$conf->global->WEBSERVICES_KEY, - 'sourceapplication'=>'DEMO', - 'login'=>'admin', - 'password'=>'admin', - 'entity'=>''); - - // Test URL - $result=''; - if ($WS_METHOD) - { - $parameters = array('authentication'=>$authentication); - print __METHOD__." call method ".$WS_METHOD."\n"; - $result = $soapclient->call($WS_METHOD,$parameters,$ns,''); - if (! $result) - { - //var_dump($soapclient); - print $soapclient->error_str; - print "
    \n\n"; - print $soapclient->request; - print "
    \n\n"; - print $soapclient->response; - } - - print __METHOD__." result=".$result."\n"; - $this->assertEquals('OK',$result['result']['result_code']); - } - - return $result; - } - - - /** - * testWSUser - * - * @return int - */ - public function testWSUser() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; - - $WS_DOL_URL = DOL_MAIN_URL_ROOT.'/webservices/server_user.php'; - $WS_METHOD = ''; - $ns='http://www.dolibarr.org/ns/'; - - // Set the WebService URL - print __METHOD__." create nusoap_client for URL=".$WS_DOL_URL."\n"; - $soapclient = new nusoap_client($WS_DOL_URL); - if ($soapclient) - { - $soapclient->soap_defencoding='UTF-8'; - $soapclient->decodeUTF8(false); - } - - // Call the WebService method and store its result in $result. - $authentication=array( - 'dolibarrkey'=>$conf->global->WEBSERVICES_KEY, - 'sourceapplication'=>'DEMO', - 'login'=>'admin', - 'password'=>'admin', - 'entity'=>''); - - // Test URL - $result=''; - if ($WS_METHOD) - { - $parameters = array('authentication'=>$authentication); - print __METHOD__." call method ".$WS_METHOD."\n"; - $result = $soapclient->call($WS_METHOD,$parameters,$ns,''); - if (! $result) - { - //var_dump($soapclient); - print $soapclient->error_str; - print "
    \n\n"; - print $soapclient->request; - print "
    \n\n"; - print $soapclient->response; - } - - print __METHOD__." result=".$result."\n"; - //$this->assertEquals('OK',$result['result']['result_code']); - } - - return $result; - } - } ?> \ No newline at end of file From afa5bdb837e34297d1986091d1a3c3f75f44eab1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 18 Nov 2013 00:12:13 +0100 Subject: [PATCH 058/107] Fix: phpunit error --- .../class/companybankaccount.class.php | 86 ++++++++++--------- test/phpunit/CompanyBankAccountTest.php | 8 +- 2 files changed, 50 insertions(+), 44 deletions(-) diff --git a/htdocs/societe/class/companybankaccount.class.php b/htdocs/societe/class/companybankaccount.class.php index 1cc32d1ff50..b40989336e9 100644 --- a/htdocs/societe/class/companybankaccount.class.php +++ b/htdocs/societe/class/companybankaccount.class.php @@ -1,8 +1,8 @@ - * Copyright (C) 2010 Laurent Destailleur - * Copyright (C) 2012 Regis Houssin - * Copyright (C) 2013 Peter Fontaine +/* Copyright (C) 2004 Rodolphe Quiedeville + * Copyright (C) 2010-2013 Laurent Destailleur + * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2013 Peter Fontaine * * 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 @@ -28,7 +28,7 @@ require_once DOL_DOCUMENT_ROOT .'/compta/bank/class/account.class.php'; /** - * \brief Class to manage bank accounts description of third parties + * Class to manage bank accounts description of third parties */ class CompanyBankAccount extends Account { @@ -232,48 +232,56 @@ class CompanyBankAccount extends Account /** * Set RIB as Default * - * @param int $id RIB id + * @param int $rid RIB id * @return int 0 if KO, 1 if OK */ - function setAsDefault($id) + function setAsDefault($rib=0) { - if ($id) { - $sql1 = "SELECT fk_soc FROM ".MAIN_DB_PREFIX."societe_rib"; - $sql1.= " WHERE rowid = ".$id; + $sql1 = "SELECT rowid as id, fk_soc FROM ".MAIN_DB_PREFIX."societe_rib"; + $sql1.= " WHERE rowid = ".($rib?$rib:$this->id); - $result1 = $this->db->query($sql1); - if ($result1) { - if ($this->db->num_rows($result1) == 0) { - return 0; - } else { - $obj = $this->db->fetch_object($result1); - $sql2 = "UPDATE ".MAIN_DB_PREFIX."societe_rib SET default_rib = 0 "; - $sql2.= "WHERE fk_soc = ".$obj->fk_soc; + dol_syslog(get_class($this).'::setAsDefault sql='.$sql1); + $result1 = $this->db->query($sql1); + if ($result1) + { + if ($this->db->num_rows($result1) == 0) + { + return 0; + } + else + { + $obj = $this->db->fetch_object($result1); - $sql3 = "UPDATE ".MAIN_DB_PREFIX."societe_rib SET default_rib = 1 "; - $sql3.= "WHERE rowid = ".$id; + $this->db->begin(); - $this->db->begin(); + $sql2 = "UPDATE ".MAIN_DB_PREFIX."societe_rib SET default_rib = 0 "; + $sql2.= "WHERE fk_soc = ".$obj->fk_soc; + dol_syslog(get_class($this).'::setAsDefault sql='.$sql2); + $result2 = $this->db->query($sql2); - $result2 = $this->db->query($sql2); - $result3 = $this->db->query($sql3); + $sql3 = "UPDATE ".MAIN_DB_PREFIX."societe_rib SET default_rib = 1 "; + $sql3.= "WHERE rowid = ".$obj->id; + dol_syslog(get_class($this).'::setAsDefault sql='.$sql3); + $result3 = $this->db->query($sql3); - if (!$result2 || !$result3) { - dol_print_error($this->db); - $this->db->rollback(); - return 0; - } else { - $this->db->commit(); - return 1; - } - } - } else { - dol_print_error($this->db); - return 0; - } - } else { - return 0; - } + if (!$result2 || !$result3) + { + dol_print_error($this->db); + $this->db->rollback(); + return -1; + } + else + { + $this->db->commit(); + return 1; + } + } + } + else + { + dol_print_error($this->db); + return -1; + } } } diff --git a/test/phpunit/CompanyBankAccountTest.php b/test/phpunit/CompanyBankAccountTest.php index c85bb8272b5..04925ddd603 100644 --- a/test/phpunit/CompanyBankAccountTest.php +++ b/test/phpunit/CompanyBankAccountTest.php @@ -131,9 +131,9 @@ class CompanyBankAccountTest extends PHPUnit_Framework_TestCase $localobject->initAsSpecimen(); $result=$localobject->create($user); + print __METHOD__." result=".$result." id=".$localobject->id."\n"; $this->assertLessThan($result, 0); - print __METHOD__." result=".$result."\n"; - return $result; + return $localobject->id; } /** @@ -155,9 +155,8 @@ class CompanyBankAccountTest extends PHPUnit_Framework_TestCase $localobject=new CompanyBankAccount($this->savdb); $result=$localobject->fetch($id); - - $this->assertLessThan($result, 0); print __METHOD__." id=".$id." result=".$result."\n"; + $this->assertLessThan($result, 0); return $localobject; } @@ -178,7 +177,6 @@ class CompanyBankAccountTest extends PHPUnit_Framework_TestCase $db=$this->savdb; $result=$localobject->setAsDefault($localobject->id); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; $this->assertLessThan($result, 0); return $localobject; From 4356496ee85ae6392358f2874f86ddceaebbd531 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 18 Nov 2013 00:20:05 +0100 Subject: [PATCH 059/107] Qual: File is not a class of a module --- htdocs/core/class/html.formfile.class.php | 14 +-- htdocs/{link => core}/class/link.class.php | 94 +++++++++++-------- htdocs/core/lib/files.lib.php | 8 +- .../tpl/document_actions_pre_headers.tpl.php | 30 +++--- 4 files changed, 79 insertions(+), 67 deletions(-) rename htdocs/{link => core}/class/link.class.php (88%) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 45221876e91..189cec49f80 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -1051,7 +1051,7 @@ class FormFile global $bc; global $sortfield, $sortorder; - require_once DOL_DOCUMENT_ROOT . '/link/class/link.class.php'; + require_once DOL_DOCUMENT_ROOT . '/core/class/link.class.php'; $link = new Link($this->db); $links = array(); if ($sortfield == "name") { @@ -1066,9 +1066,9 @@ class FormFile // Show list of associated links print_titre($langs->trans("LinkedFiles")); - + print '
    '; - + print ''; print ''; print_liste_field_titre( @@ -1113,12 +1113,12 @@ class FormFile if ($nboflinks > 0) include_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; $var = true; - foreach ($links as $link) + foreach ($links as $link) { $var =! $var; print ''; //edit mode - if ($action == 'update' && $selected === $link->id) + if ($action == 'update' && $selected === $link->id) { print '\n"; } - if ($nboflinks == 0) + if ($nboflinks == 0) { print '
    '; print ''; @@ -1157,7 +1157,7 @@ class FormFile } print "
    '; print $langs->trans("NoLinkFound"); @@ -1166,7 +1166,7 @@ class FormFile print "
    "; print '
    '; - + return $nboflinks; } diff --git a/htdocs/link/class/link.class.php b/htdocs/core/class/link.class.php similarity index 88% rename from htdocs/link/class/link.class.php rename to htdocs/core/class/link.class.php index 0bb57c52cf6..8100d526718 100644 --- a/htdocs/link/class/link.class.php +++ b/htdocs/core/class/link.class.php @@ -16,7 +16,7 @@ */ /** - * \file htdocs/link/class/link.class.php + * \file htdocs/core/class/link.class.php * \ingroup link * \brief File for link class */ @@ -39,6 +39,7 @@ class Link extends CommonObject public $objecttype; public $objectid; + /** * Constructor * @@ -102,9 +103,9 @@ class Link extends CommonObject include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; $interface=new Interfaces($this->db); $result=$interface->run_triggers('LINK_CREATE', $this, $user, $langs, $conf); - if ($result < 0) { - $error++; - $this->errors = $interface->errors; + if ($result < 0) { + $error++; + $this->errors = $interface->errors; } // Fin appel triggers } else { @@ -161,12 +162,12 @@ class Link extends CommonObject dol_syslog(get_class($this)."::Update id = " . $this->id . " call_trigger = " . $call_trigger); // Check parameters - if (empty($this->url)) + if (empty($this->url)) { $this->error = $langs->trans("NoURL"); return -1; } - + // Clean parameters $this->url = clean_url($this->url,1); if (empty($this->label)) $this->label = basename($this->url); @@ -176,7 +177,7 @@ class Link extends CommonObject $this->db->begin(); $sql = "UPDATE " . MAIN_DB_PREFIX . "links SET "; - $sql .= "entity = '" . $conf->entity ."'"; + $sql .= "entity = '" . $conf->entity ."'"; $sql .= ", datea = '" . $this->db->idate(dol_now()) . "'"; $sql .= ", url = '" . $this->db->escape($this->url) . "'"; $sql .= ", label = '" . $this->db->escape($this->label) . "'"; @@ -184,25 +185,24 @@ class Link extends CommonObject $sql .= ", objectid = " . $this->objectid; $sql .= " WHERE rowid = '" . $this->id ."'"; - - dol_syslog(get_class($this)."::Update sql = " .$sql); + dol_syslog(get_class($this)."::update sql = " .$sql); $resql = $this->db->query($sql); if ($resql) { - if ($call_trigger) + if ($call_trigger) { // Appel des triggers include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; $interface = new Interfaces($this->db); $result = $interface->run_triggers('LINK_MODIFY', $this, $user, $langs, $conf); - if ($result < 0) { + if ($result < 0) { $error++; $this->errors = $interface->errors; } // Fin appel triggers } - if (! $error) + if (! $error) { dol_syslog(get_class($this) . "::Update success"); $this->db->commit(); @@ -211,16 +211,16 @@ class Link extends CommonObject $this->db->rollback(); return -1; } - } - else + } + else { - if ($this->db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') + if ($this->db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { // Doublon $this->error = $langs->trans("ErrorDuplicateField"); $result = -1; } - else + else { $this->error = $langs->trans("Error sql = " . $sql); dol_syslog(get_class($this) . "::Update fails update = " . $this->error, LOG_ERR); @@ -233,34 +233,39 @@ class Link extends CommonObject /** * Loads all links from database - * + * * @param array &$links array of Link objects to fill * @param string $objecttype type of the associated object in dolibarr * @param int $objectid id of the associated object in dolibarr * @param string $sortfield field used to sort * @param string $sortorder sort order * @return 1 if ok, 0 if no records, -1 if error - * + * * */ public function fetchAll(&$links, $objecttype, $objectid, $sortfield=null, $sortorder=null) { global $conf; + $sql = "SELECT rowid, entity, datea, url, label , objecttype, objectid FROM " . MAIN_DB_PREFIX . "links"; $sql .= " WHERE objecttype = '" . $objecttype . "' AND objectid = " . $objectid; - if($conf->entity != 0) $sql .= " AND entity = " . $conf->entity; + if ($conf->entity != 0) $sql .= " AND entity = " . $conf->entity; if ($sortfield) { if (empty($sortorder)) { $sortorder = "ASC"; } $sql .= " ORDER BY " . $sortfield . " " . $sortorder; } + + dol_syslog(get_class($this)."::fetchAll sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); - dol_syslog(get_class($this)."::fetchAll " . $sql, LOG_DEBUG); - if ($resql) { + if ($resql) + { $num = $this->db->num_rows($resql); dol_syslog(get_class($this)."::fetchAll " . $num . "records", LOG_DEBUG); - if ($num > 0) { - while ($obj = $this->db->fetch_object($resql)) { + if ($num > 0) + { + while ($obj = $this->db->fetch_object($resql)) + { $link = new Link($db); $link->id = $obj->rowid; $link->entity = $obj->entity; @@ -281,25 +286,31 @@ class Link extends CommonObject } } - /* + /** * Loads a link from database - * @param rowid id of link to load - * @return int 1 if ok, 0 if no record found, -1 if error - * - * */ + * + * @param int $rowid Id of link to load + * @return int 1 if ok, 0 if no record found, -1 if error + * + **/ public function fetch($rowid=null) { global $conf; + if (empty($rowid)) { $rowid = $this->id; } + $sql = "SELECT rowid, entity, datea, url, label, objecttype, objectid FROM " . MAIN_DB_PREFIX . "links"; $sql .= " WHERE rowid = " . $rowid; if($conf->entity != 0) $sql .= " AND entity = " . $conf->entity; + + dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); - dol_syslog(get_class($this)."::fetch " . $sql, LOG_DEBUG); - if ($resql) { - if($this->db->num_rows($resql) > 0) { + if ($resql) + { + if($this->db->num_rows($resql) > 0) + { $obj = $this->db->fetch_object($resql); $this->entity = $obj->entity; $this->datea = $this->db->jdate($obj->datea); @@ -308,14 +319,14 @@ class Link extends CommonObject $this->objecttype = $obj->objecttype; $this->objectid = $obj->objectid; return 1; - } else { - $this->error = 'Fetch no link found for id = ' . $rowid; - dol_syslog($this->error, LOG_ERR); + } + else + { return 0; } } else { - dol_syslog($this->db->error(), LOG_ERR); - $this->error=$this->db->error(); + $this->error=$this->db->lasterror(); + dol_syslog($this->error, LOG_ERR); return -1; } } @@ -335,11 +346,12 @@ class Link extends CommonObject $this->db->begin(); // Remove link - $sql = "DELETE FROM " . MAIN_DB_PREFIX . "links"; $sql.= " WHERE rowid = " . $this->id; + dol_syslog(get_class($this)."::delete sql=" . $sql, LOG_DEBUG); - if (! $this->db->query($sql)) { + if (! $this->db->query($sql)) + { $error++; $this->error = $this->db->lasterror(); dol_syslog(get_class($this)."::delete error -4 " . $this->error, LOG_ERR); @@ -351,9 +363,9 @@ class Link extends CommonObject include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; $interface=new Interfaces($this->db); $result = $interface->run_triggers('LINK_DELETE', $this, $user, $langs, $conf); - if ($result < 0) { - $error++; - $this->errors = $interface->errors; + if ($result < 0) { + $error++; + $this->errors = $interface->errors; } // Fin appel triggers } diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 17d96bd3356..ae1cf90a393 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -1011,12 +1011,12 @@ function dol_add_file_process($upload_dir, $allowoverwrite=0, $donotupdatesessio // Define $destpath (path to file including filename) and $destfile (only filename) $destpath=$upload_dir . "/" . $_FILES[$varfiles]['name']; $destfile=$_FILES[$varfiles]['name']; - if ($savingdocmask) + if ($savingdocmask) { $destpath=$upload_dir . "/" . preg_replace('/__file__/',$_FILES[$varfiles]['name'],$savingdocmask); $destfile=preg_replace('/__file__/',$_FILES[$varfiles]['name'],$savingdocmask); - } - + } + $resupload = dol_move_uploaded_file($_FILES[$varfiles]['tmp_name'], $destpath, $allowoverwrite, 0, $_FILES[$varfiles]['error'], 0, $varfiles); if (is_numeric($resupload) && $resupload > 0) { @@ -1058,7 +1058,7 @@ function dol_add_file_process($upload_dir, $allowoverwrite=0, $donotupdatesessio } } elseif ($link) { if (dol_mkdir($upload_dir) >= 0) { - require_once DOL_DOCUMENT_ROOT . '/link/class/link.class.php'; + require_once DOL_DOCUMENT_ROOT . '/core/class/link.class.php'; $linkObject = new Link($db); $linkObject->entity = $conf->entity; $linkObject->url = $link; diff --git a/htdocs/core/tpl/document_actions_pre_headers.tpl.php b/htdocs/core/tpl/document_actions_pre_headers.tpl.php index 96344944666..06edca3c7c7 100644 --- a/htdocs/core/tpl/document_actions_pre_headers.tpl.php +++ b/htdocs/core/tpl/document_actions_pre_headers.tpl.php @@ -25,7 +25,7 @@ if (GETPOST('sendit') && ! empty($conf->global->MAIN_UPLOAD_DOC)) { } elseif (GETPOST('linkit') && ! empty($conf->global->MAIN_UPLOAD_DOC)) { if ($object->id) { $link = GETPOST('link', 'alpha'); - if ($link) + if ($link) { if (substr($link, 0, 7) != 'http://' && substr($link, 0, 8) != 'https://') { $link = 'http://' . $link; @@ -37,13 +37,13 @@ if (GETPOST('sendit') && ! empty($conf->global->MAIN_UPLOAD_DOC)) { // Delete file/link -if ($action == 'confirm_deletefile' && $confirm == 'yes') +if ($action == 'confirm_deletefile' && $confirm == 'yes') { - if ($object->id) + if ($object->id) { $urlfile = GETPOST('urlfile', 'alpha'); $linkid = GETPOST('linkid', 'int'); - if ($urlfile) + if ($urlfile) { $file = $upload_dir . "/" . $urlfile; // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP). @@ -53,10 +53,10 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes') } else { setEventMessage($langs->trans("ErrorFailToDeleteFile", $urlfile), 'errors'); } - } - elseif ($linkid) + } + elseif ($linkid) { - require_once DOL_DOCUMENT_ROOT . '/link/class/link.class.php'; + require_once DOL_DOCUMENT_ROOT . '/core/class/link.class.php'; $link = new Link($db); $link->id = $linkid; $link->fetch(); @@ -71,29 +71,29 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes') header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); exit; } -} -elseif ($action == 'confirm_updateline' && GETPOST('save') && GETPOST('link', 'alpha')) +} +elseif ($action == 'confirm_updateline' && GETPOST('save') && GETPOST('link', 'alpha')) { - require_once DOL_DOCUMENT_ROOT . '/link/class/link.class.php'; + require_once DOL_DOCUMENT_ROOT . '/core/class/link.class.php'; $langs->load('link'); $link = new Link($db); $link->id = GETPOST('linkid', 'int'); $f = $link->fetch(); - if ($f) + if ($f) { $link->url = GETPOST('link', 'alpha'); - if (substr($link->url, 0, 7) != 'http://' && substr($link->url, 0, 8) != 'https://') + if (substr($link->url, 0, 7) != 'http://' && substr($link->url, 0, 8) != 'https://') { $link->url = 'http://' . $link->url; } $link->label = GETPOST('label', 'alpha'); $res = $link->update($user); - if (!$res) + if (!$res) { setEventMessage($langs->trans("ErrorFailedToUpdateLink", $link->label)); } - } - else + } + else { //error fetching } From d209d931e47d45d46c91e442ec0236a18093c5eb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 18 Nov 2013 00:29:11 +0100 Subject: [PATCH 060/107] Doxygen --- htdocs/societe/class/companybankaccount.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/class/companybankaccount.class.php b/htdocs/societe/class/companybankaccount.class.php index b40989336e9..8b8e3b382c7 100644 --- a/htdocs/societe/class/companybankaccount.class.php +++ b/htdocs/societe/class/companybankaccount.class.php @@ -232,7 +232,7 @@ class CompanyBankAccount extends Account /** * Set RIB as Default * - * @param int $rid RIB id + * @param int $rib RIB id * @return int 0 if KO, 1 if OK */ function setAsDefault($rib=0) From 5703dfe55a9b9e1a6295ef62bd5cc98598c2e9ed Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 18 Nov 2013 11:31:34 +0100 Subject: [PATCH 061/107] Trans --- htdocs/langs/en_US/cron.lang | 3 ++- htdocs/langs/fr_FR/cron.lang | 15 ++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/htdocs/langs/en_US/cron.lang b/htdocs/langs/en_US/cron.lang index 86943b910e9..80a29c14e9e 100644 --- a/htdocs/langs/en_US/cron.lang +++ b/htdocs/langs/en_US/cron.lang @@ -32,6 +32,7 @@ CronExplainHowToRunWin=On Microsoft(tm) Windows environement you can use Schedul CronJobs=Scheduled jobs CronListActive= List of active jobs CronListInactive= List of disabled jobs +CronListActive= List of scheduled jobs # @@ -42,7 +43,7 @@ CronLastOutput=Last run output CronLastResult=Last result code CronListOfCronJobs=List of scheduled jobs CronCommand=Command -CronList= Job list +CronList=Jobs list CronDelete= Delete cron jobs CronConfirmDelete= Are you sure you want to delete this cron job ? CronExecute=Launch job diff --git a/htdocs/langs/fr_FR/cron.lang b/htdocs/langs/fr_FR/cron.lang index d4e10c80fca..3659084ac4b 100644 --- a/htdocs/langs/fr_FR/cron.lang +++ b/htdocs/langs/fr_FR/cron.lang @@ -29,9 +29,10 @@ CronExplainHowToRunWin=Sur un environement Microsoft(tm) Windows vous pouvez uti # # Menu # -CronJobs=Travaux planifiés +CronJobs=Travaux programmés CronListActive= Liste des travaux actifs CronListInactive= Liste des travaux inactifs +CronListActive= Liste des travaux programmés # @@ -42,15 +43,15 @@ CronLastOutput=Sortie du dernier lancement CronLastResult=Dernier code de retour CronListOfCronJobs=Liste des travaux planifiés CronCommand=Commande -CronList= Liste des travaux -CronDelete= Supprimer les travaux cron -CronConfirmDelete= Êtes-vous sûr de vouloir supprimer ces travaux cron ? +CronList=Liste des travaux +CronDelete=Supprimer les travaux cron +CronConfirmDelete=Êtes-vous sûr de vouloir supprimer ces travaux cron ? CronExecute=Lancer cette tâche -CronConfirmExecute= Êtes-vous sûr de vouloir lancer ce travail maintenant? -CronInfo= Les travaux planifiés permettent d'exécuter des tâches à intervales réguliers +CronConfirmExecute=Êtes-vous sûr de vouloir lancer ce travail maintenant? +CronInfo=Les travaux planifiés permettent d'exécuter des tâches à intervales réguliers CronWaitingJobs=Travaux en attente CronTask=Tâche -CronNone= Aucun(e) +CronNone=Aucun(e) CronDtStart=Date de début CronDtEnd=Date de fin CronDtNextLaunch=Prochaine exécution From 2b63fd67b50e6623821a470fd317fb8f00beda7b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 18 Nov 2013 11:42:28 +0100 Subject: [PATCH 062/107] Minor fix in cron feature --- htdocs/langs/en_US/cron.lang | 4 ++-- htdocs/langs/fr_FR/cron.lang | 10 +++++----- htdocs/public/cron/cron_run_jobs.php | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/langs/en_US/cron.lang b/htdocs/langs/en_US/cron.lang index 80a29c14e9e..bd4b72b8236 100644 --- a/htdocs/langs/en_US/cron.lang +++ b/htdocs/langs/en_US/cron.lang @@ -18,8 +18,8 @@ Permission23104 = Execute Scheduled task # Admin # CronSetup= Scheduled job management setup -URLToLaunchCronJobs=URL to launch cron jobs -OrToLaunchASpecificJob=Or to launch a specific job +URLToLaunchCronJobs=URL to check and launch cron jobs if required +OrToLaunchASpecificJob=Or to check and launch a specific job KeyForCronAccess=Security key for URL to launch cron jobs FileToLaunchCronJobs=Command line to launch cron jobs CronExplainHowToRunUnix=On Unix environment you should use crontab to run Command line each minutes diff --git a/htdocs/langs/fr_FR/cron.lang b/htdocs/langs/fr_FR/cron.lang index 3659084ac4b..77680202616 100644 --- a/htdocs/langs/fr_FR/cron.lang +++ b/htdocs/langs/fr_FR/cron.lang @@ -17,11 +17,11 @@ Permission23104 = Lancer un travail planifié # # Admin # -CronSetup= Page de configuration du module - Gestion des travaux planifiées -URLToLaunchCronJobs=URL pour lancer les travaux planifiés actifs -OrToLaunchASpecificJob=Ou pour lancer un travail planifié spécifique -KeyForCronAccess=Clé de sécurité pour l'URL de lancement des travaux planifiés -FileToLaunchCronJobs=Commande pour lancer les travaux planifiés actifs +CronSetup= Page de configuration du module - Gestion des travaux programmés +URLToLaunchCronJobs=URL pour vérifier et lancer les travaux programmés actifs +OrToLaunchASpecificJob=Ou pour vérifier et lancer un travail programmé spécifique +KeyForCronAccess=Clé de sécurité pour l'URL de lancement des travaux programmés +FileToLaunchCronJobs=Commande pour lancer les travaux programmés actifs CronExplainHowToRunUnix=Sur un environnement Unix vous pouvez utiliser 'crontab' pour exécuter une commande toute les minutes CronExplainHowToRunWin=Sur un environement Microsoft(tm) Windows vous pouvez utiliser le planificateur de tâche pour lancer une commande toute les minutes diff --git a/htdocs/public/cron/cron_run_jobs.php b/htdocs/public/cron/cron_run_jobs.php index 7473720ed10..0f56be678a7 100644 --- a/htdocs/public/cron/cron_run_jobs.php +++ b/htdocs/public/cron/cron_run_jobs.php @@ -92,7 +92,7 @@ else exit; } } -$id = GETPOST('id','int'); +$id = GETPOST('id','alpha'); // We accept non numeric id. We will filter later. // create a jobs object From e8101e3cdedc295f2ffdd349623ebbbe3103ab8c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 18 Nov 2013 12:00:42 +0100 Subject: [PATCH 063/107] Fix: Missing field --- htdocs/install/mysql/migration/3.4.0-3.5.0.sql | 4 +++- htdocs/install/mysql/tables/llx_c_chargesociales.sql | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/install/mysql/migration/3.4.0-3.5.0.sql b/htdocs/install/mysql/migration/3.4.0-3.5.0.sql index a091e7f089c..2f322881431 100755 --- a/htdocs/install/mysql/migration/3.4.0-3.5.0.sql +++ b/htdocs/install/mysql/migration/3.4.0-3.5.0.sql @@ -83,7 +83,9 @@ ALTER TABLE llx_propaldet_extrafields ADD INDEX idx_propaldet_extrafields (fk_ob DROP table llx_adherent_options; DROP table llx_adherent_options_label; -ALTER TABLE llx_user ADD accountancy_code VARCHAR( 24 ) NULL; +ALTER TABLE llx_user ADD accountancy_code VARCHAR(24) NULL; +ALTER TABLE llx_c_chargesociales ADD accountancy_code varchar(24) DEFAULT NULL; + DELETE FROM llx_boxes where box_id IN (SELECT rowid FROM llx_boxes_def where file='box_activity.php' AND note IS NULL); DELETE FROM llx_boxes_def where file='box_activity.php' AND note IS NULL; diff --git a/htdocs/install/mysql/tables/llx_c_chargesociales.sql b/htdocs/install/mysql/tables/llx_c_chargesociales.sql index b6120f31932..b9c448e1d95 100644 --- a/htdocs/install/mysql/tables/llx_c_chargesociales.sql +++ b/htdocs/install/mysql/tables/llx_c_chargesociales.sql @@ -24,7 +24,7 @@ create table llx_c_chargesociales deductible smallint DEFAULT 0 NOT NULL, active tinyint DEFAULT 1 NOT NULL, code varchar(12) NOT NULL, - accountancy_code varchar(15) DEFAULT NULL, + accountancy_code varchar(24) DEFAULT NULL, fk_pays integer DEFAULT 1 NOT NULL, module varchar(32) NULL )ENGINE=innodb; From 69f0d596ba0527548050d5e7d80f339f49d83abb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 18 Nov 2013 12:20:53 +0100 Subject: [PATCH 064/107] Fix: Pagination --- htdocs/compta/charges/index.php | 59 +++++++++++++++---------------- htdocs/core/lib/functions.lib.php | 16 ++++----- 2 files changed, 37 insertions(+), 38 deletions(-) diff --git a/htdocs/compta/charges/index.php b/htdocs/compta/charges/index.php index 909417d0e71..21d68d42663 100644 --- a/htdocs/compta/charges/index.php +++ b/htdocs/compta/charges/index.php @@ -65,28 +65,26 @@ llxHeader('',$langs->trans("TaxAndDividendsArea")); $title=$langs->trans("TaxAndDividendsArea"); if ($_GET["mode"] == 'sconly') $title=$langs->trans("SocialContributionsPayments"); -print_fiche_titre($title,($year?"".img_previous()." ".$langs->trans("Year")." $year ".img_next()."":"")); +$param=''; +if (GETPOST("mode") == 'sconly') $param='&mode=sconly'; +if ($sortfield) $param.='&sortfield='.$sortfield; +if ($sortorder) $param.='&sortorder='.$sortorder; -if ($_GET["mode"] != 'sconly') +print_fiche_titre($title, ($year?"".img_previous()." ".$langs->trans("Year")." $year ".img_next()."":"")); + +if ($year) $param.='&year='.$year; + +// Social contributions only +if (GETPOST("mode") != 'sconly') { print $langs->trans("DescTaxAndDividendsArea").'
    '; print "
    "; -} - -// Social contributions -if ($_GET["mode"] != 'sconly') -{ - print_titre($langs->trans("SocialContributionsPayments")); -} - -if ($_GET["mode"] == 'sconly') -{ - $param='&mode=sconly'; + print_fiche_titre($langs->trans("SocialContributionsPayments").($year?' ('.$langs->trans("Year").' '.$year.')':''), '', ''); } print ''; -print ""; +print ''; print_liste_field_titre($langs->trans("PeriodEndDate"),$_SERVER["PHP_SELF"],"cs.date_ech","",$param,'width="120"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Label"),$_SERVER["PHP_SELF"],"c.libelle","",$param,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"cs.fk_type","",$param,'',$sortfield,$sortorder); @@ -110,10 +108,10 @@ if ($year > 0) // Si period renseignee on l'utilise comme critere de date, sinon on prend date echeance, // ceci afin d'etre compatible avec les cas ou la periode n'etait pas obligatoire $sql .= " (cs.periode IS NOT NULL AND cs.periode between '".$db->idate(dol_get_first_day($year))."' AND '".$db->idate(dol_get_last_day($year))."')"; - $sql .= "OR (cs.periode IS NULL AND cs.date_ech between '".$db->idate(dol_get_first_day($year))."' AND '".$db->idate(dol_get_last_day($year))."')"; + $sql .= " OR (cs.periode IS NULL AND cs.date_ech between '".$db->idate(dol_get_first_day($year))."' AND '".$db->idate(dol_get_last_day($year))."')"; $sql .= ")"; } -$sql.= $db->order($sortfield,$sortorder); +if (! preg_match('/^pv/',$sortfield)) $sql.= $db->order($sortfield,$sortorder); //$sql.= $db->plimit($limit+1,$offset); //print $sql; @@ -184,18 +182,18 @@ if (empty($_GET["mode"]) || $_GET["mode"] != 'sconly') $tva = new Tva($db); - print_titre($langs->trans("VATPayments")); + print_fiche_titre($langs->trans("VATPayments").($year?' ('.$langs->trans("Year").' '.$year.')':''), '', ''); - $sql = "SELECT f.rowid, f.amount, f.label, f.datev as dm"; - $sql.= " FROM ".MAIN_DB_PREFIX."tva as f "; - $sql.= " WHERE f.entity = ".$conf->entity; + $sql = "SELECT pv.rowid, pv.amount, pv.label, pv.datev as dm"; + $sql.= " FROM ".MAIN_DB_PREFIX."tva as pv"; + $sql.= " WHERE pv.entity = ".$conf->entity; if ($year > 0) { // Si period renseignee on l'utilise comme critere de date, sinon on prend date echeance, // ceci afin d'etre compatible avec les cas ou la periode n'etait pas obligatoire - $sql.= " AND f.datev between '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."'"; + $sql.= " AND pv.datev between '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."'"; } - $sql.= " ORDER BY dm DESC"; + if (preg_match('/^pv/',$sortfield)) $sql.= $db->order($sortfield,$sortorder); $result = $db->query($sql); if ($result) @@ -205,12 +203,12 @@ if (empty($_GET["mode"]) || $_GET["mode"] != 'sconly') $total = 0 ; print '
    '; print ''; - print ''; - print ""; - print '"; - print '"; - print '"; - print '"; + print_liste_field_titre($langs->trans("PeriodEndDate"),$_SERVER["PHP_SELF"],"pv.datev","",$param,'width="120"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Label"),$_SERVER["PHP_SELF"],"pv.label","",$param,'',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("ExpectedToPay"),$_SERVER["PHP_SELF"],"pv.amount","",$param,'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("RefPayment"),$_SERVER["PHP_SELF"],"pv.rowid","",$param,'',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("DatePayment"),$_SERVER["PHP_SELF"],"pv.datev","",$param,'align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("PayedByThisPayment"),$_SERVER["PHP_SELF"],"pv.amount","",$param,'align="right"',$sortfield,$sortorder); print "\n"; $var=1; while ($i < $num) @@ -227,12 +225,13 @@ if (empty($_GET["mode"]) || $_GET["mode"] != 'sconly') print '"; + // Ref payment $tva_static->id=$obj->rowid; $tva_static->ref=$obj->rowid; - print '\n"; + print '\n"; print '\n"; - print ""; + print '"; print "\n"; $i++; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index a311c78b496..220721d6f5e 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1212,7 +1212,7 @@ function dol_print_skype($skype,$cid=0,$socid=0,$addlink=0,$max=64) $newskype.=' '; $newskype.=dol_trunc($skype,$max); $newskype.=''; - + if (($cid || $socid) && ! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create) { $type='AC_SKYPE'; $link=''; @@ -2372,7 +2372,7 @@ function print_liste_field_titre($name, $file="", $field="", $begin="", $morepar * Get title line of an array * * @param string $name Label of field - * @param int $thead 0=To use with standard table forat, 1=To use inside , 2=To use with
    + * @param int $thead 0=To use with standard table forat, 1=To use inside
    , 2=To use with
    * @param string $file Url used when we click on sort picto * @param string $field Field to use for new sorting. Empty if this field is not sortable. * @param string $begin ("" by defaut) @@ -2392,7 +2392,7 @@ function getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $m $tag='th'; if ($thead==2) $tag='div'; - + // If field is used as sort criteria we use a specific class // Example if (sortfield,field)=("nom","xxx.nom") or (sortfield,field)=("nom","nom") if ($field && ($sortfield == $field || $sortfield == preg_replace("/^[^\.]+\./","",$field))) $out.= '<'.$tag.' class="liste_titre_sel" '. $moreattrib.'>'; @@ -2449,7 +2449,7 @@ function getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $m } /** - * Show a title (deprecated. use print_fiche_titre instrad) + * Show a title (deprecated. use print_fiche_titre instead) * * @param string $title Title to show * @return string Title to show @@ -2462,16 +2462,16 @@ function print_titre($title) /** * Show a title with picto * - * @param string $titre Title to show + * @param string $title Title to show * @param string $mesg Added message to show on right * @param string $picto Icon to use before title (should be a 32x32 transparent png file) * @param int $pictoisfullpath 1=Icon name is a full absolute url of image * @param int $id To force an id on html objects * @return void */ -function print_fiche_titre($titre, $mesg='', $picto='title.png', $pictoisfullpath=0, $id='') +function print_fiche_titre($title, $mesg='', $picto='title.png', $pictoisfullpath=0, $id='') { - print load_fiche_titre($titre, $mesg, $picto, $pictoisfullpath, $id); + print load_fiche_titre($title, $mesg, $picto, $pictoisfullpath, $id); } /** @@ -3004,7 +3004,7 @@ function get_product_vat_for_country($idprod, $thirdparty_seller, $idprodfournpr $sql.= " WHERE t.active=1 AND t.fk_pays = p.rowid AND p.code='".$thirdparty_seller->country_code."'"; $sql.= " ORDER BY t.taux DESC, t.recuperableonly ASC"; $sql.= $db->plimit(1); - + $resql=$db->query($sql); if ($resql) { From 2d260fa6dd848b17b793f2b267e3b63242ca5a4d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 18 Nov 2013 14:25:53 +0100 Subject: [PATCH 065/107] Fix: Missing alignement --- htdocs/product/composition/fiche.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/composition/fiche.php b/htdocs/product/composition/fiche.php index fac6402e300..f770e48b715 100644 --- a/htdocs/product/composition/fiche.php +++ b/htdocs/product/composition/fiche.php @@ -376,7 +376,7 @@ if ($id > 0 || ! empty($ref)) print '
    '; - print ''; + print ''; if (! empty($conf->stock->enabled)) print ''; print ''; print '
    '.$langs->trans("PeriodEndDate").'".$langs->trans("Label")."'.$langs->trans("ExpectedToPay")."'.$langs->trans("RefPayment")."'.$langs->trans("DatePayment")."'.$langs->trans("PayedByThisPayment")."
    '.price($obj->amount)."'.$tva_static->getNomUrl(1)."'.$tva_static->getNomUrl(1)."'.dol_print_date($db->jdate($obj->dm),'day')."".price($obj->amount)."'.price($obj->amount)."
    '.$langs->trans("TotalBuyingPriceMin").': '; if ($atleastonenotdefined) print $langs->trans("Unknown").' ('.$langs->trans("SomeSubProductHaveNoPrices").')'; print ''.($atleastonenotdefined?'':price($total,'','',0,0,-1,$conf->currency)).''.($atleastonenotdefined?'':price($total,'','',0,0,-1,$conf->currency)).' 
    '; From 4d31a0ca2a93bc851e8821156bc6985509063b09 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 18 Nov 2013 14:27:17 +0100 Subject: [PATCH 066/107] Fix: Removed duplicate line --- .tx/config | 1 - 1 file changed, 1 deletion(-) diff --git a/.tx/config b/.tx/config index 6cad9c72c20..84e8e9f842f 100644 --- a/.tx/config +++ b/.tx/config @@ -7,7 +7,6 @@ file_filter = htdocs/langs//admin.lang source_file = htdocs/langs/en_US/admin.lang source_lang = en_US type = MOZILLAPROPERTIES -lang_map = uz_UZ: uz [dolibarr.agenda] file_filter = htdocs/langs//agenda.lang From a71e4c598a4e5e5f8f74496bd360f2f642c1ce05 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 18 Nov 2013 15:41:42 +0100 Subject: [PATCH 067/107] Fix: Must navigate between all thirdparties elligible for tab. --- htdocs/comm/fiche.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index 1e084406ae0..29ee792c738 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -202,7 +202,7 @@ if ($id > 0) print ''; print ''; From b28d15574e5b857191f6331c6c81b7819e4d1025 Mon Sep 17 00:00:00 2001 From: hameau Date: Mon, 18 Nov 2013 17:34:08 +0100 Subject: [PATCH 068/107] Update main.lang Minor typos; capitalise month names; minor fr->en. --- htdocs/langs/en_US/main.lang | 72 ++++++++++++++++++------------------ 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index dc05a09916f..37be1d12b25 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -1,13 +1,13 @@ # Dolibarr language file - Source file is en_US - main DIRECTION=ltr -# Note for chinese: -# msungstdlight or cid0ct are for traditionnal chinese (traditionnal does not render with ubuntu pdf reader) -# stsongstdlight or cid0cs are for simplified chinese -# To read chinese pdf with linux: sudo apt-get install poppler-data +# Note for Chinese: +# msungstdlight or cid0ct are for traditional Chinese (traditional does not render with Ubuntu pdf reader) +# stsongstdlight or cid0cs are for simplified Chinese +# To read Chinese pdf with Linux: sudo apt-get install poppler-data FONTFORPDF=helvetica FONTSIZEFORPDF=10 -SeparatorDecimal=, -SeparatorThousand=None +SeparatorDecimal=. +SeparatorThousand=, FormatDateShort=%m/%d/%Y FormatDateShortInput=%m/%d/%Y FormatDateShortJava=MM/dd/yyyy @@ -65,7 +65,7 @@ BackgroundColorByDefault=Default background color FileWasNotUploaded=A file is selected for attachment but was not yet uploaded. Click on "Attach file" for this. NbOfEntries=Nb of entries GoToWikiHelpPage=Read online help (need Internet access) -GoToHelpPage=Read help +GoToHelpPage=Read help RecordSaved=Record saved RecordDeleted=Record deleted LevelOfFeature=Level of features @@ -226,7 +226,7 @@ DateValueShort=Value date DateOperation=Operation date DateOperationShort=Oper. Date DateLimit=Limit date -DateRequest=Request date +DateRequest=Request date DateProcess=Process date DatePlanShort=Date planed DateRealShort=Date real. @@ -447,30 +447,30 @@ SeptemberMin=Sep OctoberMin=Oct NovemberMin=Nov DecemberMin=Dec -Month01=january -Month02=february -Month03=march -Month04=april -Month05=may -Month06=june -Month07=july -Month08=august -Month09=september -Month10=october -Month11=november -Month12=december -MonthShort01=jan -MonthShort02=feb -MonthShort03=mar -MonthShort04=apr -MonthShort05=may -MonthShort06=jun -MonthShort07=jul -MonthShort08=aug -MonthShort09=sep -MonthShort10=oct -MonthShort11=nov -MonthShort12=dec +Month01=January +Month02=February +Month03=March +Month04=April +Month05=May +Month06=June +Month07=July +Month08=August +Month09=September +Month10=October +Month11=November +Month12=December +MonthShort01=Jan +MonthShort02=Feb +MonthShort03=Mar +MonthShort04=Apr +MonthShort05=May +MonthShort06=Jun +MonthShort07=Jul +MonthShort08=Aug +MonthShort09=Sep +MonthShort10=Oct +MonthShort11=Nov +MonthShort12=Dec AttachedFiles=Attached files and documents FileTransferComplete=File was uploaded successfuly DateFormatYYYYMM=YYYY-MM @@ -607,7 +607,7 @@ MenuManager=Menu manager NoMenu=No sub-menu WarningYouAreInMaintenanceMode=Warning, you are in a maintenance mode, so only login %s is allowed to use application at the moment. CoreErrorTitle=System error -CoreErrorMessage=Sorry, an error occurred. Check the logs or contact your system administrator. +CoreErrorMessage=Sorry, an error occurred. Check the logs or contact your system administrator. CreditCard=Credit card FieldsWithAreMandatory=Fields with %s are mandatory FieldsWithIsForPublic=Fields with %s are shown on public list of members. If you don't want this, check off the "public" box. @@ -632,7 +632,7 @@ IM=Instant messaging NewAttribute=New attribute AttributeCode=Attribute code OptionalFieldsSetup=Extra attributes setup -URLPhoto=Url of photo/logo +URLPhoto=URL of photo/logo SetLinkToThirdParty=Link to another third party CreateDraft=Create draft ClickToEdit=Click to edit @@ -642,7 +642,7 @@ ByTown=By town ByDate=By date ByMonthYear=By month/year ByYear=By year -ByMonth=by month +ByMonth=By month ByDay=By day BySalesRepresentative=By sales representative LinkedToSpecificUsers=Linked to a particular user contact @@ -660,7 +660,7 @@ toward=toward Access=Access HelpCopyToClipboard=Use Ctrl+C to copy to clipboard SaveUploadedFileWithMask=Save file on server with name "%s" (otherwise "%s") -OriginFileName=Nom d'origine +OriginFileName=Original filename # Week day Monday=Monday From 0501491475bd8bf64eafbc503d68422ad1fd1f68 Mon Sep 17 00:00:00 2001 From: hameau Date: Mon, 18 Nov 2013 17:45:19 +0100 Subject: [PATCH 069/107] Update printipp.lang Minor typos; minor translation fr->en. --- htdocs/langs/en_US/printipp.lang | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/langs/en_US/printipp.lang b/htdocs/langs/en_US/printipp.lang index 9df63bd9961..cc719fddded 100644 --- a/htdocs/langs/en_US/printipp.lang +++ b/htdocs/langs/en_US/printipp.lang @@ -1,9 +1,9 @@ # Dolibarr language file - Source file is en_US - printipp -PrintIPPSetup=Setup of module Direct Print -PrintIPPDesc=Ce module permet d'ajouter un bouton d'impression direct des documents vers votre imprimante. Il requiert un systeme Linux équipé de Cups. -PRINTIPP_ENABLED=Show picto "Direct print" into list of documents +PrintIPPSetup=Setup of Direct Print module +PrintIPPDesc=This module adds a Print button to send documents directly to a printer. It requires a Linux system with CUPS installed. +PRINTIPP_ENABLED=Show "Direct print" icon in document lists PRINTIPP_HOST=Print server PRINTIPP_PORT=Port PRINTIPP_USER=Login PRINTIPP_PASSWORD=Password -NoPrinterFound=No printers found (check your Cups etup) +NoPrinterFound=No printers found (check your CUPS setup) From c04d454d4f1b4bad724a2eb5c8ede0fb9eac6242 Mon Sep 17 00:00:00 2001 From: hameau Date: Mon, 18 Nov 2013 18:05:36 +0100 Subject: [PATCH 070/107] Update withdrawals.lang Minor typos. --- htdocs/langs/en_US/withdrawals.lang | 32 ++++++++++++++--------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/htdocs/langs/en_US/withdrawals.lang b/htdocs/langs/en_US/withdrawals.lang index 2d1ba3584c3..91d4a473d6e 100644 --- a/htdocs/langs/en_US/withdrawals.lang +++ b/htdocs/langs/en_US/withdrawals.lang @@ -18,8 +18,8 @@ RequestStandingOrderToTreat=Request for standing orders to treat RequestStandingOrderTreated=Request for standing orders treated CustomersStandingOrders=Customer standing orders CustomerStandingOrder=Customer standing order -NbOfInvoiceToWithdraw=Nb of invoice with withdraw request -NbOfInvoiceToWithdrawWithInfo=Nb of invoice with withdraw request for customers having defined bank account information +NbOfInvoiceToWithdraw=No. of invoice with withdraw request +NbOfInvoiceToWithdrawWithInfo=No. of invoice with withdraw request for customers having defined bank account information InvoiceWaitingWithdraw=Invoice waiting for withdraw AmountToWithdraw=Amount to withdraw WithdrawsRefused=Withdraws refused @@ -34,14 +34,14 @@ ThirdPartyBankCode=Third party bank code ThirdPartyDeskCode=Third party desk code NoInvoiceCouldBeWithdrawed=No invoice withdrawed with success. Check that invoice are on companies with a valid BAN. ClassCredited=Classify credited -ClassCreditedConfirm=Are you sure you want to classify this withdrawal receipt as credited on your bank account ? -TransData=Date Transmission -TransMetod=Method Transmission +ClassCreditedConfirm=Are you sure you want to classify this withdrawal receipt as credited on your bank account? +TransData=Transmission date +TransMetod=Transmission method Send=Send Lines=Lines -StandingOrderReject=Issue a reject +StandingOrderReject=Issue a rejection InvoiceRefused=Invoice refused -WithdrawalRefused=Withdrawal Refused +WithdrawalRefused=Withdrawal refused WithdrawalRefusedConfirm=Are you sure you want to enter a withdrawal rejection for society RefusedData=Date of rejection RefusedReason=Reason for rejection @@ -51,15 +51,15 @@ InvoiceRefused=Charge the rejection to customer Status=Status StatusUnknown=Unknown StatusWaiting=Waiting -StatusTrans=Transmitted +StatusTrans=Sent StatusCredited=Credited StatusRefused=Refused StatusMotif0=Unspecified -StatusMotif1=Provision insuffisante -StatusMotif2=Tirage conteste +StatusMotif1=Insufficient funds +StatusMotif2=Request contested StatusMotif3=No Withdrawal order StatusMotif4=Customer Order -StatusMotif5=RIB inexploitable +StatusMotif5=RIB unusable StatusMotif6=Account without balance StatusMotif7=Judicial Decision StatusMotif8=Other reason @@ -78,18 +78,18 @@ BankToReceiveWithdraw=Bank account to receive withdraws CreditDate=Credit on WithdrawalFileNotCapable=Unable to generate withdrawal receipt file for your country ShowWithdraw=Show Withdraw -IfInvoiceNeedOnWithdrawPaymentWontBeClosed=However, if invoice has at least one withdrawal payment not yet processed, it won't be set as payed to allow to manage withdrawal before. -DoStandingOrdersBeforePayments=This tabs allows you to request for a standing order. Once it will be finished, you can type the payment to close the invoice. +IfInvoiceNeedOnWithdrawPaymentWontBeClosed=However, if invoice has at least one withdrawal payment not yet processed, it won't be set as paid to allow prior withdrawal management. +DoStandingOrdersBeforePayments=This tab allows you to request a standing order. Once it is complete, you can type the payment to close the invoice. WithdrawalFile=Withdrawal file SetToStatusSent=Set to status "File Sent" -ThisWillAlsoAddPaymentOnInvoice=This will also create payments onto invoices and will classify them to paid +ThisWillAlsoAddPaymentOnInvoice=This will also apply payments to invoices and will classify them as "Paid" ### Notifications InfoCreditSubject=Payment of standing order %s by the bank InfoCreditMessage=The standing order %s has been paid by the bank
    Data of payment: %s InfoTransSubject=Transmission of standing order %s to bank -InfoTransMessage=The standing order %s has been transmited to bank by %s %s.

    -InfoTransData=Amount: %s
    Metode: %s
    Date: %s +InfoTransMessage=The standing order %s has been sent to bank by %s %s.

    +InfoTransData=Amount: %s
    Method: %s
    Date: %s InfoFoot=This is an automated message sent by Dolibarr InfoRejectSubject=Standing order refused InfoRejectMessage=Hello,

    the standing order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.

    --
    %s From a94fb12e5e6e8b213b18f42f8a70b06ee1b1c35e Mon Sep 17 00:00:00 2001 From: hameau Date: Mon, 18 Nov 2013 18:07:17 +0100 Subject: [PATCH 071/107] Update other.lang Minor typo --- htdocs/langs/en_US/other.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang index c6a72ec672a..76acd7022fc 100644 --- a/htdocs/langs/en_US/other.lang +++ b/htdocs/langs/en_US/other.lang @@ -6,7 +6,7 @@ Tools=Tools ToolsDesc=This area is dedicated to group miscellaneous tools not available into other menu entries.

    Those tools can be reached from menu on the side. Birthday=Birthday BirthdayDate=Birthday -DateToBirth=Date to birth +DateToBirth=Date of birth BirthdayAlertOn= birthday alert active BirthdayAlertOff= birthday alert inactive Notify_FICHINTER_VALIDATE=Intervention validated From 9d2dee207a5e87433a93e9e7c98f2008607da60b Mon Sep 17 00:00:00 2001 From: hameau Date: Mon, 18 Nov 2013 18:13:34 +0100 Subject: [PATCH 072/107] Update bills.lang Minor typos --- htdocs/langs/en_US/bills.lang | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang index 0903f98a301..e03b31c1929 100644 --- a/htdocs/langs/en_US/bills.lang +++ b/htdocs/langs/en_US/bills.lang @@ -383,13 +383,13 @@ PaymentInvoiceRef=Payment invoice %s ValidateInvoice=Validate invoice Cash=Cash Reported=Delayed -DisabledBecausePayments=Not possible since there is some payments -CantRemovePaymentWithOneInvoicePaid=Can't remove payment since there is at least one invoice classified payed +DisabledBecausePayments=Not possible since there are some payments +CantRemovePaymentWithOneInvoicePaid=Can't remove payment since there is at least one invoice classified paid ExpectedToPay=Expected payment -PayedByThisPayment=Payed by this payment -ClosePaidInvoicesAutomatically=Classify "Payed" all standard or replacement invoices entirely payed. -ClosePaidCreditNotesAutomatically=Classify "Payed" all credit notes entirely paid back. -AllCompletelyPayedInvoiceWillBeClosed=All invoice with no remain to pay will be automatically closed to status "Payed". +PayedByThisPayment=Paid by this payment +ClosePaidInvoicesAutomatically=Classify "Paid" all standard or replacement invoices entirely paid. +ClosePaidCreditNotesAutomatically=Classify "Paid" all credit notes entirely paid back. +AllCompletelyPayedInvoiceWillBeClosed=All invoice with no remain to pay will be automatically closed to status "Paid". ToMakePayment=Pay ToMakePaymentBack=Pay back ListOfYourUnpaidInvoices=List of unpaid invoices @@ -405,11 +405,11 @@ TypeContact_invoice_supplier_external_BILLING=Supplier invoice contact TypeContact_invoice_supplier_external_SHIPPING=Supplier shipping contact TypeContact_invoice_supplier_external_SERVICE=Supplier service contact # crabe PDF Model -PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (Template recommanded) +PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (recommended Template) # oursin PDF Model -PDFOursinDescription=Invoice PDF template Oursin. A complete invoice template (Template alternative) +PDFOursinDescription=Invoice PDF template Oursin. A complete invoice template (alternative Template) # NumRef Modules -TerreNumRefModelDesc1=Return numero with format %syymm-nnnn for standard and replacement invoices, %syymm-nnnn for credit notes and %syymm-nnnn for deposits where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 -MarsNumRefModelDesc1=Return numero with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for credit notes and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 +TerreNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 +MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for credit notes and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 TerreNumRefModelError=A bill starting with $syymm already exists and is not compatible with this model of sequence. Remove it or rename it to activate this module. From 870b78fc19184fbd8d36588df1af0620c95b2883 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Tue, 19 Nov 2013 10:41:00 +0100 Subject: [PATCH 073/107] [ bug #1142 ] Set paiement on invoice --- htdocs/fourn/facture/paiement.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index f9ab0cd0cab..e4c0e27ce47 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -265,7 +265,7 @@ if ($action == 'create' || $action == 'add_paiement') $sql.= ' AND f.fk_soc = '.$object->socid; $sql.= ' AND f.paye = 0'; $sql.= ' AND f.fk_statut = 1'; // Statut=0 => non validee, Statut=2 => annulee - $sql.= ' GROUP BY f.rowid, f.ref_supplier, f.total_ht, f.total_ttc, f.datef'; + $sql.= ' GROUP BY f.rowid, f.ref, f.ref_supplier, f.total_ht, f.total_ttc, f.datef'; $resql = $db->query($sql); if ($resql) { From 68718c6100bc971c56678dd0b05c6961dc9327bb Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Tue, 19 Nov 2013 10:42:29 +0100 Subject: [PATCH 074/107] Update changelog --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index efe4c3c2eb1..f6d72624b4d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,7 @@ Fix: Bad rounding on margin calculations and display. Fix: Option drop table into backup was broken. Fix: [ bug #1105 ] Searching Boxes other search option Fix: wrong buy price update +Fix :[ bug #1142 ] Set paiement on invoice (PGSql) ***** ChangeLog for 3.4.1 compared to 3.4.0 ***** Fix: Display buying price on line edit when no supplier price is defined From c885389ac6c67fe5f92f79eace6776c087191572 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Salvador?= Date: Tue, 19 Nov 2013 14:22:39 +0100 Subject: [PATCH 075/107] included the FormContract class to avoid fatal error --- htdocs/fichinter/fiche.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/fichinter/fiche.php b/htdocs/fichinter/fiche.php index f0f68e093fc..36178057338 100644 --- a/htdocs/fichinter/fiche.php +++ b/htdocs/fichinter/fiche.php @@ -31,6 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/modules/fichinter/modules_fichinter.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/fichinter.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; +require_once DOL_DOCUMENT_ROOT . '/core/class/html.formcontract.class.php'; if (! empty($conf->projet->enabled)) { From 83f99b5ba60894aa6c94fe0d21bbcd1d1dc6de64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Tue, 19 Nov 2013 14:36:55 +0100 Subject: [PATCH 076/107] Use LF instead of CRLF --- dev/translation/autotranslator.class.php | 22 +++++++-------- htdocs/langs/lv_LV/link.lang | 36 ++++++++++++------------ htdocs/langs/lv_LV/printipp.lang | 36 ++++++++++++------------ htdocs/langs/sk_SK/link.lang | 36 ++++++++++++------------ htdocs/langs/sk_SK/printipp.lang | 36 ++++++++++++------------ 5 files changed, 83 insertions(+), 83 deletions(-) diff --git a/dev/translation/autotranslator.class.php b/dev/translation/autotranslator.class.php index 06b458811ab..288cda7101d 100644 --- a/dev/translation/autotranslator.class.php +++ b/dev/translation/autotranslator.class.php @@ -154,14 +154,14 @@ class autoTranslator if (isset($this->_translatedFiles[$file]) && count($this->_translatedFiles[$file])>0) { $fp = fopen($destPath, 'a'); - fwrite($fp, "\r\n"); - fwrite($fp, "\r\n"); - fwrite($fp, "// START - Lines generated via autotranslator.php tool (".$this->_time.").\r\n"); - fwrite($fp, "// Reference language: ".$this->_refLang." -> ".$my_destlang."\r\n"); + fwrite($fp, "\n"); + fwrite($fp, "\n"); + fwrite($fp, "// START - Lines generated via autotranslator.php tool (".$this->_time.").\n"); + fwrite($fp, "// Reference language: ".$this->_refLang." -> ".$my_destlang."\n"); foreach( $this->_translatedFiles[$file] as $line) { - fwrite($fp, $line . "\r\n"); + fwrite($fp, $line . "\n"); } - fwrite($fp, "// STOP - Lines generated via autotranslator.php tool (".$this->_time_end.").\r\n"); + fwrite($fp, "// STOP - Lines generated via autotranslator.php tool (".$this->_time_end.").\n"); fclose($fp); } return; @@ -177,11 +177,11 @@ class autoTranslator private function createTranslationFile($path,$my_destlang) { $fp = fopen($path, 'w+'); - fwrite($fp, "/*\r\n"); - fwrite($fp, " * Language code: {$my_destlang}\r\n"); - fwrite($fp, " * Automatic generated via autotranslator.php tool\r\n"); - fwrite($fp, " * Generation date " . $this->_time. "\r\n"); - fwrite($fp, " */\r\n"); + fwrite($fp, "/*\n"); + fwrite($fp, " * Language code: {$my_destlang}\n"); + fwrite($fp, " * Automatic generated via autotranslator.php tool\n"); + fwrite($fp, " * Generation date " . $this->_time. "\n"); + fwrite($fp, " */\n"); fclose($fp); return; } diff --git a/htdocs/langs/lv_LV/link.lang b/htdocs/langs/lv_LV/link.lang index b868996db5d..65f81c8548d 100644 --- a/htdocs/langs/lv_LV/link.lang +++ b/htdocs/langs/lv_LV/link.lang @@ -1,18 +1,18 @@ -/* - * Language code: lv_LV - * Automatic generated via autotranslator.php tool - * Generation date 2013-11-08 23:35:59 - */ - - -// START - Lines generated via autotranslator.php tool (2013-11-09 12:40:15). -// Reference language: en_US -> lv_LV -LinkANewFile=Saite jaunu failu / dokumentu -LinkedFiles=Saistīts failus un dokumentus -NoLinkFound=Nav reģistrētu saites -LinkComplete=Fails ir saistīts veiksmīgi -ErrorFileNotLinked=Failu nevar saistīt -LinkRemoved=Saite %s ir noņemta -ErrorFailedToDeleteLink=Neizdevās noņemt saiti "%s" -ErrorFailedToUpdateLink=Neizdevās atjaunināt saikne "%s" -// STOP - Lines generated via autotranslator.php tool (2013-11-09 12:40:57). +/* + * Language code: lv_LV + * Automatic generated via autotranslator.php tool + * Generation date 2013-11-08 23:35:59 + */ + + +// START - Lines generated via autotranslator.php tool (2013-11-09 12:40:15). +// Reference language: en_US -> lv_LV +LinkANewFile=Saite jaunu failu / dokumentu +LinkedFiles=Saistīts failus un dokumentus +NoLinkFound=Nav reģistrētu saites +LinkComplete=Fails ir saistīts veiksmīgi +ErrorFileNotLinked=Failu nevar saistīt +LinkRemoved=Saite %s ir noņemta +ErrorFailedToDeleteLink=Neizdevās noņemt saiti "%s" +ErrorFailedToUpdateLink=Neizdevās atjaunināt saikne "%s" +// STOP - Lines generated via autotranslator.php tool (2013-11-09 12:40:57). diff --git a/htdocs/langs/lv_LV/printipp.lang b/htdocs/langs/lv_LV/printipp.lang index bba261c4d07..4a1fa4d4ed3 100644 --- a/htdocs/langs/lv_LV/printipp.lang +++ b/htdocs/langs/lv_LV/printipp.lang @@ -1,18 +1,18 @@ -/* - * Language code: lv_LV - * Automatic generated via autotranslator.php tool - * Generation date 2013-11-09 12:40:15 - */ - - -// START - Lines generated via autotranslator.php tool (2013-11-09 12:40:15). -// Reference language: en_US -> lv_LV -PrintIPPSetup=Setup moduļa Direct Print -PrintIPPDesc=Ce modulis Përmet d'Ajouter ANO Bouton d'iespaids tieši des dokumenti vers votre imprimante. Il requiert ANO systeme Linux équipé de Kausi. -PRINTIPP_ENABLED=Rādīt Picto "Direct print" par dokumentu saraksts -PRINTIPP_HOST=Drukas serveris -PRINTIPP_PORT=Osta -PRINTIPP_USER=Login -PRINTIPP_PASSWORD=Parole -NoPrinterFound=Nav printeri atrasts (pārbaudiet savu tases etup) -// STOP - Lines generated via autotranslator.php tool (2013-11-09 12:49:40). +/* + * Language code: lv_LV + * Automatic generated via autotranslator.php tool + * Generation date 2013-11-09 12:40:15 + */ + + +// START - Lines generated via autotranslator.php tool (2013-11-09 12:40:15). +// Reference language: en_US -> lv_LV +PrintIPPSetup=Setup moduļa Direct Print +PrintIPPDesc=Ce modulis Përmet d'Ajouter ANO Bouton d'iespaids tieši des dokumenti vers votre imprimante. Il requiert ANO systeme Linux équipé de Kausi. +PRINTIPP_ENABLED=Rādīt Picto "Direct print" par dokumentu saraksts +PRINTIPP_HOST=Drukas serveris +PRINTIPP_PORT=Osta +PRINTIPP_USER=Login +PRINTIPP_PASSWORD=Parole +NoPrinterFound=Nav printeri atrasts (pārbaudiet savu tases etup) +// STOP - Lines generated via autotranslator.php tool (2013-11-09 12:49:40). diff --git a/htdocs/langs/sk_SK/link.lang b/htdocs/langs/sk_SK/link.lang index 910d15af974..abfa69d7e2a 100644 --- a/htdocs/langs/sk_SK/link.lang +++ b/htdocs/langs/sk_SK/link.lang @@ -1,18 +1,18 @@ -/* - * Language code: sk_SK - * Automatic generated via autotranslator.php tool - * Generation date 2013-11-08 23:25:26 - */ - - -// START - Lines generated via autotranslator.php tool (2013-11-08 23:25:26). -// Reference language: en_US -> sk_SK -LinkANewFile=Prepojenie nový súbor / dokument -LinkedFiles=Prepojené súbory a dokumenty -NoLinkFound=Žiadny registrovaný odkazy -LinkComplete=Súbor bol úspešne pripojil -ErrorFileNotLinked=Súbor nemohol byť spojená -LinkRemoved=Odkaz %s bol odstránený -ErrorFailedToDeleteLink=Nepodarilo sa odstrániť odkaz "%s" -ErrorFailedToUpdateLink=Nepodarilo sa aktualizovať odkaz "%s" -// STOP - Lines generated via autotranslator.php tool (2013-11-08 23:35:10). +/* + * Language code: sk_SK + * Automatic generated via autotranslator.php tool + * Generation date 2013-11-08 23:25:26 + */ + + +// START - Lines generated via autotranslator.php tool (2013-11-08 23:25:26). +// Reference language: en_US -> sk_SK +LinkANewFile=Prepojenie nový súbor / dokument +LinkedFiles=Prepojené súbory a dokumenty +NoLinkFound=Žiadny registrovaný odkazy +LinkComplete=Súbor bol úspešne pripojil +ErrorFileNotLinked=Súbor nemohol byť spojená +LinkRemoved=Odkaz %s bol odstránený +ErrorFailedToDeleteLink=Nepodarilo sa odstrániť odkaz "%s" +ErrorFailedToUpdateLink=Nepodarilo sa aktualizovať odkaz "%s" +// STOP - Lines generated via autotranslator.php tool (2013-11-08 23:35:10). diff --git a/htdocs/langs/sk_SK/printipp.lang b/htdocs/langs/sk_SK/printipp.lang index 824e51a686b..1b051dae6cb 100644 --- a/htdocs/langs/sk_SK/printipp.lang +++ b/htdocs/langs/sk_SK/printipp.lang @@ -1,18 +1,18 @@ -/* - * Language code: sk_SK - * Automatic generated via autotranslator.php tool - * Generation date 2013-11-08 23:25:26 - */ - - -// START - Lines generated via autotranslator.php tool (2013-11-08 23:25:26). -// Reference language: en_US -> sk_SK -PrintIPPSetup=Nastavenie modulu Priama tlač -PrintIPPDesc=Ce modul Permet d'un ajouter Bouton d'dojem priame des dokumenty vers votre imprimante. Il requiert un systeme Linux Equipe de poháre. -PRINTIPP_ENABLED=Zobraziť Piktogram "Priama tlač" do zoznamu dokumentov -PRINTIPP_HOST=Tlačový server -PRINTIPP_PORT=Prístav -PRINTIPP_USER=Prihlásenie -PRINTIPP_PASSWORD=Heslo -NoPrinterFound=Žiadne tlačiarne nájdené (skontrolujte poháre Nasta) -// STOP - Lines generated via autotranslator.php tool (2013-11-08 23:48:51). +/* + * Language code: sk_SK + * Automatic generated via autotranslator.php tool + * Generation date 2013-11-08 23:25:26 + */ + + +// START - Lines generated via autotranslator.php tool (2013-11-08 23:25:26). +// Reference language: en_US -> sk_SK +PrintIPPSetup=Nastavenie modulu Priama tlač +PrintIPPDesc=Ce modul Permet d'un ajouter Bouton d'dojem priame des dokumenty vers votre imprimante. Il requiert un systeme Linux Equipe de poháre. +PRINTIPP_ENABLED=Zobraziť Piktogram "Priama tlač" do zoznamu dokumentov +PRINTIPP_HOST=Tlačový server +PRINTIPP_PORT=Prístav +PRINTIPP_USER=Prihlásenie +PRINTIPP_PASSWORD=Heslo +NoPrinterFound=Žiadne tlačiarne nájdené (skontrolujte poháre Nasta) +// STOP - Lines generated via autotranslator.php tool (2013-11-08 23:48:51). From 7945011955b9ffb28ef9a07772dea9009b9b7238 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Tue, 19 Nov 2013 17:54:36 +0100 Subject: [PATCH 077/107] Make AJAX new line form work again FIXME: Factorize! --- htdocs/comm/propal.php | 6 ++++++ htdocs/commande/fiche.php | 6 ++++++ htdocs/compta/facture.php | 6 ++++++ htdocs/contrat/fiche.php | 6 ++++++ 4 files changed, 24 insertions(+) diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 685841560bd..447e065219e 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -653,6 +653,12 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights- $price_ht = ''; $tva_tx = ''; } + if (GETPOST('usenewaddlineform')) { + $idprod=GETPOST('idprod', 'int'); + $product_desc = (GETPOST('product_desc')?GETPOST('product_desc'):(GETPOST('np_desc')?GETPOST('np_desc'):(GETPOST('dp_desc')?GETPOST('dp_desc'):''))); + $price_ht = GETPOST('price_ht'); + $tva_tx=(GETPOST('tva_tx')?GETPOST('tva_tx'):0); + } $qty = GETPOST('qty'.$predef); $remise_percent=GETPOST('remise_percent'.$predef); diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index ccc2f13cbea..d40d8bf5a7c 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -587,6 +587,12 @@ else if ($action == 'addline' && $user->rights->commande->creer) $price_ht = ''; $tva_tx = ''; } + if (GETPOST('usenewaddlineform')) { + $idprod=GETPOST('idprod', 'int'); + $product_desc = (GETPOST('product_desc')?GETPOST('product_desc'):(GETPOST('np_desc')?GETPOST('np_desc'):(GETPOST('dp_desc')?GETPOST('dp_desc'):''))); + $price_ht = GETPOST('price_ht'); + $tva_tx=(GETPOST('tva_tx')?GETPOST('tva_tx'):0); + } $qty = GETPOST('qty'.$predef); $remise_percent=GETPOST('remise_percent'.$predef); diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index dc573de6eca..293796c77a5 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1145,6 +1145,12 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights- $price_ht = ''; $tva_tx = ''; } + if (GETPOST('usenewaddlineform')) { + $idprod=GETPOST('idprod', 'int'); + $product_desc = (GETPOST('product_desc')?GETPOST('product_desc'):(GETPOST('np_desc')?GETPOST('np_desc'):(GETPOST('dp_desc')?GETPOST('dp_desc'):''))); + $price_ht = GETPOST('price_ht'); + $tva_tx=(GETPOST('tva_tx')?GETPOST('tva_tx'):0); + } $qty = GETPOST('qty'.$predef); $remise_percent=GETPOST('remise_percent'.$predef); diff --git a/htdocs/contrat/fiche.php b/htdocs/contrat/fiche.php index 4a919ece44c..65d485d129c 100644 --- a/htdocs/contrat/fiche.php +++ b/htdocs/contrat/fiche.php @@ -359,6 +359,12 @@ else if ($action == 'addline' && $user->rights->contrat->creer) $price_ht = ''; $tva_tx = ''; } + if (GETPOST('usenewaddlineform')) { + $idprod=GETPOST('idprod', 'int'); + $product_desc = (GETPOST('product_desc')?GETPOST('product_desc'):(GETPOST('np_desc')?GETPOST('np_desc'):(GETPOST('dp_desc')?GETPOST('dp_desc'):''))); + $price_ht = GETPOST('price_ht'); + $tva_tx=(GETPOST('tva_tx')?GETPOST('tva_tx'):0); + } $qty = GETPOST('qty'.$predef); $remise_percent=GETPOST('remise_percent'.$predef); From c92d0fe96671a28a4aa8f88415fb339dd1c3462f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 19 Nov 2013 23:06:25 +0100 Subject: [PATCH 078/107] Fix: phpunit --- test/phpunit/DateLibTest.php | 2 +- test/phpunit/DateLibTzFranceTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/phpunit/DateLibTest.php b/test/phpunit/DateLibTest.php index eb3fa40f98d..470b74df861 100644 --- a/test/phpunit/DateLibTest.php +++ b/test/phpunit/DateLibTest.php @@ -258,7 +258,7 @@ class DateLibTest extends PHPUnit_Framework_TestCase // Check %a and %b format for en_US $result=dol_print_date(0,'%a %b',true,$outputlangs); print __METHOD__." result=".$result."\n"; - $this->assertEquals('Thu jan',$result); + $this->assertEquals('Thu Jan',$result); return $result; } diff --git a/test/phpunit/DateLibTzFranceTest.php b/test/phpunit/DateLibTzFranceTest.php index 889c6be3c3c..17db4e3e164 100644 --- a/test/phpunit/DateLibTzFranceTest.php +++ b/test/phpunit/DateLibTzFranceTest.php @@ -193,7 +193,7 @@ class DateLibTzFranceTest extends PHPUnit_Framework_TestCase // Check %a and %b format for en_US $result=dol_print_date(0,'%a %b',false,$outputlangs); print __METHOD__." result=".$result."\n"; - $this->assertEquals('Thu jan',$result); + $this->assertEquals('Thu Jan',$result); return $result; } From 0fe870395f0ad8fef0282f61cf7ba2a426ed7215 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Wed, 20 Nov 2013 00:46:04 +0100 Subject: [PATCH 079/107] Use mtethos Post instead of get --- htdocs/user/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/user/index.php b/htdocs/user/index.php index 11234719f0c..62ead1935eb 100644 --- a/htdocs/user/index.php +++ b/htdocs/user/index.php @@ -102,7 +102,7 @@ if ($result) $num = $db->num_rows($result); $i = 0; - print '
    '."\n"; + print ''."\n"; $param="search_user=$search_user&sall=$sall"; print '
    '.$langs->trans("ThirdPartyName").''; - $object->next_prev_filter="te.client in (1,3)"; + $object->next_prev_filter="te.client in (1,2,3)"; print $form->showrefnav($object,'socid','',($user->societe_id?0:1),'rowid','nom','',''); print '
    '; From 7446714351c94d2e3a6fde2d1c25b17114786287 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Wed, 20 Nov 2013 01:08:43 +0100 Subject: [PATCH 080/107] Change-Id: I5e7b46592e3f8cd8637af36b6e6f385c8d0ae794 --- dev/dbmodel/reprise donnée.sql | 3999 ++++++++++++++++++++++++++++++++ 1 file changed, 3999 insertions(+) create mode 100644 dev/dbmodel/reprise donnée.sql diff --git a/dev/dbmodel/reprise donnée.sql b/dev/dbmodel/reprise donnée.sql new file mode 100644 index 00000000000..9947dcd6c90 --- /dev/null +++ b/dev/dbmodel/reprise donnée.sql @@ -0,0 +1,3999 @@ +TRUNCATE TABLE llx_c_payment_term; +INSERT INTO llx_c_payment_term (rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour, decalage, module) VALUES +(1, 'RECEP', 1, 1, 'A réception de facture', 'Réception de facture', 0, 0, NULL, NULL), +(2, '30D', 2, 1, '30 jours', 'Réglement à 30 jours', 0, 30, NULL, NULL), +(3, '30DENDMONTH', 3, 0, '30 jours fin de mois', 'Réglement à 30 jours fin de mois', 1, 30, NULL, NULL), +(4, '60D', 4, 1, '60 jours', 'Réglement à 60 jours', 0, 60, NULL, NULL), +(5, '60DENDMONTH', 5, 0, '60 jours fin de mois', 'Réglement à 60 jours fin de mois', 1, 60, NULL, NULL), +(6, 'PT_ORDER', 6, 0, 'A réception de commande', 'A réception de commande', 0, 0, NULL, NULL), +(7, 'PT_DELIVERY', 7, 0, 'Livraison', 'Règlement à la livraison', 0, 0, NULL, NULL), +(8, 'PT_5050', 8, 0, '50 et 50', 'Règlement 50% à la commande, 50% à la livraison', 0, 0, NULL, NULL), +(9, '45D', NULL, 1, '45 jours', 'Règlement à 45 jours', 0, 45, NULL, NULL), +(10, '90D', NULL, 1, '90 jours', 'Règlement à 90 jours', 0, 90, NULL, NULL), +(11, '85D', NULL, 1, '85 jours', 'Règlement à 85 jours', 0, 85, NULL, NULL), +(12, '75D', NULL, 1, '75 jours', 'Règlement à 75 jours', 0, 75, NULL, NULL), +(13, '100D', NULL, 1, '100 jours', 'Règlement à 100 jours', 0, 100, NULL, NULL), +(14, '70D', NULL, 1, '70 jours', 'Règlement à 70 jours', 0, 70, NULL, NULL); + +ALTER TABLE llx_societe MODIFY COLUMN import_key varchar(36); +ALTER TABLE llx_societe MODIFY COLUMN nom varchar(80); +ALTER TABLE llx_socpeople MODIFY COLUMN import_key varchar(36); +ALTER TABLE llx_product MODIFY COLUMN import_key varchar(36); +ALTER TABLE llx_agefodd_stagiaire MODIFY COLUMN import_key varchar(36); +ALTER TABLE llx_agefodd_session_stagiaire MODIFY COLUMN import_key varchar(36); +ALTER TABLE llx_propal MODIFY COLUMN import_key varchar(36); +ALTER TABLE llx_facture MODIFY COLUMN import_key varchar(36); +ALTER TABLE llx_facturedet MODIFY COLUMN import_key varchar(36); +ALTER TABLE llx_agefodd_place ADD COLUMN import_key varchar(36) DEFAULT NULL; +ALTER TABLE llx_agefodd_formation_catalogue ADD COLUMN import_key varchar(36) DEFAULT NULL; +ALTER TABLE llx_user ADD COLUMN import_key varchar(36) DEFAULT NULL; + +ALTER TABLE llx_societe ADD INDEX idx_llx_societe_import_key (import_key); +ALTER TABLE llx_propal ADD INDEX idx_llx_propal_import_key (import_key); +ALTER TABLE llx_agefodd_session ADD INDEX idx_llx_agefodd_session_import_key (import_key); +ALTER TABLE llx_user ADD INDEX idx_llx_user_import_key (import_key); +ALTER TABLE llx_socpeople ADD INDEX idx_llx_socpeople_import_key (import_key); + + +TRUNCATE TABLE llx_extrafields; +INSERT INTO `llx_extrafields` ( `name`, `entity`, `elementtype`, `tms`, `label`, `type`, `size`, `fieldunique`, `fieldrequired`, `pos`, `param`) VALUES +( 'ts_partenaire', 1, 'societe', '2013-10-27 08:52:49', 'Partenaire', 'select', '', 0, 0, 2, 'a:1:{s:7:"options";a:7:{s:0:"";N;s:4:"FORM";s:24:"Prestataire de formation";s:4:"UNIV";s:11:"Université";s:3:"MOB";s:24:"Mobilité internationale";s:5:"OUTIL";s:6:"Outils";s:3:"COM";s:13:"Communication";s:3:"AUT";s:6:"Autres";}}'), +( 'ts_prospection', 1, 'societe', '2013-11-05 10:24:26', 'Chargé de prospection', 'sellist', '', 0, 0, 4, 'a:1:{s:7:"options";a:1:{s:76:"user:CONCAT_WS('' '',main.lastname,main.firstname):rowid:extra.u_prospection=1";N;}}'), +( 'ts_secteur', 1, 'societe', '2013-10-25 23:34:03', 'Secteur d''activité', 'select', '', 0, 0, 1, 'a:1:{s:7:"options";a:19:{s:0:"";N;s:4:"AERO";s:12:"Aeronautique";s:4:"AGRO";s:16:" Agroalimentaire";s:4:"ASSO";s:11:"Association";s:4:"AUTO";s:10:"Automobile";s:3:"BTP";s:3:"BTP";s:4:"CHIM";s:6:"Chimie";s:4:"CONS";s:7:"Conseil";s:5:"CONSO";s:21:"Biens de consommation";s:6:"DISTRI";s:12:"Distribution";s:4:"EDUC";s:9:"Education";s:5:"ENERG";s:7:"Energie";s:3:"FIN";s:7:"Finance";s:3:"LUX";s:4:"Luxe";s:3:"PUB";s:13:"Communication";s:2:"SP";s:16:"Services publics";s:3:"TIC";s:12:"Informatique";s:7:"TOURISM";s:9:"Tourisme ";s:6:"TRANSP";s:9:"Transport";}}'), +( 'ts_logistique', 1, 'societe', '2013-11-05 10:30:44', 'Gestionnaire logistique', 'sellist', '', 0, 0, 5, 'a:1:{s:7:"options";a:1:{s:75:"user:CONCAT_WS('' '',main.lastname,main.firstname):rowid:extra.u_logistique=1";N;}}'), +( 'ts_payeur', 1, 'societe', '2013-10-27 08:36:45', 'Payeur', 'boolean', '', 0, 0, 3, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}'), +( 'ct_principal', 1, 'socpeople', '2013-10-25 14:15:30', 'Contact principal', 'boolean', '', 0, 0, 6, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}'), +( 'ct_magellan', 1, 'socpeople', '2013-10-25 14:21:17', 'Membre de Magellan', 'boolean', '', 0, 0, 13, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}'), +( 'ct_mailing_papier', 1, 'socpeople', '2013-10-25 14:16:12', 'Destinataire mailing papier', 'boolean', '', 0, 0, 8, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}'), +( 'ct_invitation', 1, 'socpeople', '2013-10-25 14:15:52', 'Destinataire invitation', 'boolean', '', 0, 0, 7, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}'), +( 'ct_pays', 1, 'socpeople', '2013-10-25 14:21:43', 'Zones géographiques', 'checkbox', '', 0, 0, 15, 'a:1:{s:7:"options";a:14:{i:1;s:11:"Afrique Est";i:2;s:13:"Afrique Ouest";i:3;s:11:"Afrique Sud";i:4;s:14:"Amérique Nord";i:5;s:13:"Amérique Sud";i:6;s:15:"Asie Ext Orient";i:7;s:12:"Asie Sud Est";i:8;s:7:"Balkans";i:9;s:10:"Europe Est";i:10;s:11:"Europe Nord";i:11;s:12:"Europe Ouest";i:12;s:7:"Maghreb";i:13;s:8:"Océanie";s:0:"";N;}}'), +( 'ct_service', 1, 'socpeople', '2013-10-26 08:22:25', 'Fonction/Service', 'select', '', 0, 0, 5, 'a:1:{s:7:"options";a:28:{s:3:"DFO";s:19:"Directeur Formation";s:3:"RFO";s:21:"Responsable Formation";s:3:"AFO";s:21:" Assistante Formation";s:3:"DRH";s:29:"Directeur Ressources Humaines";s:3:"RRH";s:31:"Responsable Ressources humaines";s:3:"ARH";s:30:"Assistante Ressources Humaines";s:3:"RGC";s:33:"Responsable Gestion de carrières";s:3:"DMI";s:34:"Directeur Mobilité Internationale";s:3:"RMI";s:36:"Responsable Mobilité Internationale";s:3:"AMI";s:35:"Assistante Mobilité Internationale";s:3:"C&B";s:33:"Compensation and Benefits Manager";s:3:"ASS";s:10:"Assistante";s:3:"DDA";s:6:"Achats";s:3:"DBU";s:13:"Business Unit";s:3:"DCO";s:10:"Commercial";s:3:"DCM";s:14:" Communication";s:2:"DG";s:21:" Direction Générale";s:3:"RDI";s:10:"Diversité";s:3:"DOP";s:27:" Exploitation & Opérations";s:3:"DFI";s:7:"Finance";s:3:"DEX";s:13:"Import/Export";s:3:"DJU";s:9:"Juridique";s:3:"DLO";s:10:"Logistique";s:3:"DMA";s:9:"Marketing";s:3:"DTE";s:10:"Production";s:3:"DRD";s:26:"Recherche & Développement";s:3:"DSI";s:22:"Système d''information";s:3:"AUT";s:6:"Autres";}}'), +( 'ct_origine', 1, 'socpeople', '2013-10-25 14:14:16', 'Origine du contact', 'select', '', 0, 0, 3, 'a:1:{s:7:"options";a:8:{s:5:"EMAIL";s:8:"Emailing";s:8:"INTERNET";s:19:"Moteur de recherche";s:9:"TELEPHONE";s:26:"Prospection téléphonique";s:9:"CATALOGUE";s:9:"Catalogue";s:14:"RECOMMANDATION";s:14:"Recommandation";s:3:"EVT";s:10:"Evènement";s:10:"PARTENAIRE";s:10:"Partenaire";s:0:"";N;}}'), +( 'ct_email_commercial', 1, 'socpeople', '2013-10-25 14:19:53', 'Envoyer emailing commercial', 'boolean', '', 0, 0, 9, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}'), +( 'ct_email_news', 1, 'socpeople', '2013-10-25 14:20:17', 'Envoyer emailing news', 'boolean', '', 0, 0, 10, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}'), +( 'ct_email_invitation', 1, 'socpeople', '2013-10-25 14:20:29', 'Envoyer emailing invitation', 'boolean', '', 0, 0, 11, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}'), +( 'ct_precision_origine', 1, 'socpeople', '2013-10-25 14:14:34', 'Précision sur l''origine du contact', 'varchar', '255', 0, 0, 4, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}'), +( 'ct_sujets', 1, 'socpeople', '2013-10-25 14:21:32', 'Sujets d''intérêt', 'checkbox', '', 0, 0, 14, 'a:1:{s:7:"options";a:21:{i:1;s:5:"Achat";i:2;s:10:"A distance";i:3;s:10:"Changement";i:4;s:10:"Commercial";i:5;s:13:"Communication";i:6;s:8:"Conflits";i:7;s:16:"Dévpt personnel";i:8;s:10:"Diversité";i:9;s:12:"Expatriation";i:10;s:6:"Export";i:11;s:7:"Finance";i:12;s:14:"Interculturel ";i:13;s:9:"Juridique";i:14;s:10:"Management";i:15;s:9:"Marketing";i:16;s:13:"Négociation ";i:17;s:4:"Pays";i:18;s:6:"Projet";i:19;s:12:"Retour expat";i:20;s:2:"RH";s:0:"";N;}}'), +( 'ct_motif_inactif', 1, 'socpeople', '2013-10-25 14:38:38', 'Commentaire', 'varchar', '255', 0, 0, 2, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}'), +( 'ct_anglais', 1, 'socpeople', '2013-10-25 14:20:40', 'Langue anglaise', 'boolean', '', 0, 0, 12, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}'), +( 'u_interentreprises', 1, 'user', '2013-11-01 22:24:18', 'Chargé des Interentreprises', 'boolean', '', 0, 0, 0, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}'), +( 'u_prospection', 1, 'user', '2013-10-31 16:05:18', 'Chargé de prospection', 'boolean', '', 0, 0, 0, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}'), +( 'u_commercial', 1, 'user', '2013-11-01 22:18:01', 'Commercial', 'boolean', '', 0, 0, 0, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}'), +( 'u_logistique', 1, 'user', '2013-11-01 22:17:14', 'Gestionnaire logistique', 'boolean', '', 0, 0, 0, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}'), +( 'u_communication', 1, 'user', '2013-11-01 22:25:03', 'Chargé de communication', 'boolean', '', 0, 0, 0, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}'), +( 'comment', 1, 'propal', '2013-09-01 11:14:27', 'Commentaire', 'text', '2000', 0, 0, 1, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}'), +( 'cd_domaine', 1, 'agefodd_formation_catalogue', '2013-10-20 12:05:28', 'Domaine', 'select', '', 0, 0, 1, 'a:1:{s:7:"options";a:16:{s:5:"00000";s:5:"00000";s:3:"COA";s:3:"COA";s:3:"COF";s:3:"COF";s:5:"COMER";s:10:"Commercial";s:4:"COMM";s:13:"Communication";s:3:"CON";s:3:"CON";s:5:"EFPRO";s:27:"Efficacité professionnelle";s:5:"EXPAT";s:12:"Expatriation";s:3:"FOR";s:3:"FOR";s:3:"FRF";s:24:"Formations de formateurs";s:4:"JURI";s:9:"Juridique";s:6:"MARKET";s:9:"Marketing";s:4:"MGNT";s:10:"Management";s:4:"PAYS";s:14:"Expertise pays";s:2:"RH";s:19:"Ressources humaines";s:3:"SIC";s:24:"Interculturel transverse";}}'), +('ts_prospection', 1, 'agefodd_session', '2013-11-15 12:10:59', 'Chargé de prospection', 'sellist', '', 0, 0, 0, 'a:1:{s:7:"options";a:1:{s:76:"user:CONCAT_WS('' '',main.lastname,main.firstname):rowid:extra.u_prospection=1";N;}}'), +('ts_logistique', 1, 'agefodd_session', '2013-11-15 12:11:41', ' Gestionnaire logistique', 'sellist', '', 0, 0, 0, 'a:1:{s:7:"options";a:1:{s:75:"user:CONCAT_WS('' '',main.lastname,main.firstname):rowid:extra.u_logistique=1";N;}}'), +('ct_catalogue', 1, 'socpeople', '2013-11-11 10:47:04', 'Destinataire catalogue', 'boolean', '', 0, 0, 7, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}'), +('cd_ss_domaine', 1, 'agefodd_formation_catalogue', '2013-11-15 18:41:20', 'Sous-domaine', 'select', '', 0, 0, 2, 'a:1:{s:7:"options";a:11:{s:0:"";N;s:5:"WPAYS";s:13:"Business pays";s:5:"EXPAT";s:12:"Expatriation";s:6:"LEADER";s:10:"Leadership";s:5:"EQUIP";s:7:"Equipes";s:4:"DIST";s:19:"Travail à distance";s:3:"SIC";s:31:"Sensibilisation interculturelle";s:4:"NEGO";s:12:"Négociation";s:2:"RH";s:2:"RH";s:6:"EXPORT";s:6:"Export";s:3:"DIV";s:10:"Diversité";}}'); + +ALTER TABLE llx_societe_extrafields ADD COLUMN ts_partenaire text DEFAULT NULL; +ALTER TABLE llx_societe_extrafields ADD COLUMN ts_prospection text DEFAULT NULL; +ALTER TABLE llx_societe_extrafields ADD COLUMN ts_secteur text DEFAULT NULL; +ALTER TABLE llx_societe_extrafields ADD COLUMN ts_logistique text DEFAULT NULL; +ALTER TABLE llx_societe_extrafields ADD COLUMN ts_payeur int(1) DEFAULT NULL; + +ALTER TABLE llx_socpeople_extrafields ADD COLUMN ct_principal int(1) DEFAULT NULL; +ALTER TABLE llx_socpeople_extrafields ADD COLUMN ct_magellan int(1) DEFAULT NULL; +ALTER TABLE llx_socpeople_extrafields ADD COLUMN ct_mailing_papier int(1) DEFAULT 0; +ALTER TABLE llx_socpeople_extrafields ADD COLUMN ct_invitation int(1) DEFAULT 0; +ALTER TABLE llx_socpeople_extrafields ADD COLUMN ct_service text DEFAULT NULL; +ALTER TABLE llx_socpeople_extrafields ADD COLUMN ct_origine text DEFAULT NULL; +ALTER TABLE llx_socpeople_extrafields ADD COLUMN ct_email_commercial int(1) DEFAULT 1; +ALTER TABLE llx_socpeople_extrafields ADD COLUMN ct_email_news int(1) DEFAULT 1; +ALTER TABLE llx_socpeople_extrafields ADD COLUMN ct_email_invitation int(1) DEFAULT 1; +ALTER TABLE llx_socpeople_extrafields ADD COLUMN ct_precision_origine varchar(255) DEFAULT NULL; +ALTER TABLE llx_socpeople_extrafields ADD COLUMN ct_sujets text DEFAULT NULL; +ALTER TABLE llx_socpeople_extrafields ADD COLUMN ct_motif_inactif varchar(255) DEFAULT NULL; +ALTER TABLE llx_socpeople_extrafields ADD COLUMN ct_anglais int(1) DEFAULT NULL; +ALTER TABLE llx_socpeople_extrafields ADD COLUMN ct_pays int(1) DEFAULT NULL; +ALTER TABLE llx_socpeople_extrafields ADD COLUMN ct_catalogue int(1) DEFAULT NULL; + +ALTER TABLE llx_user_extrafields ADD COLUMN u_interentreprises int(1) DEFAULT NULL; +ALTER TABLE llx_user_extrafields ADD COLUMN u_prospection int(1) DEFAULT NULL; +ALTER TABLE llx_user_extrafields ADD COLUMN u_commercial int(1) DEFAULT NULL; +ALTER TABLE llx_user_extrafields ADD COLUMN u_logistique int(1) DEFAULT NULL; +ALTER TABLE llx_user_extrafields ADD COLUMN u_communication int(1) DEFAULT NULL; + +ALTER TABLE llx_propal_extrafields ADD COLUMN comment text DEFAULT NULL; +ALTER TABLE llx_agefodd_formation_catalogue_extrafields ADD COLUMN cd_domaine text DEFAULT NULL; +ALTER TABLE llx_agefodd_formation_catalogue_extrafields ADD COLUMN cd_ss_domaine text DEFAULT NULL; + +ALTER TABLE llx_agefodd_session_extrafields ADD COLUMN ts_prospection text DEFAULT NULL; +ALTER TABLE llx_agefodd_session_extrafields ADD COLUMN ts_logistique text DEFAULT NULL; + +TRUNCATE TABLE llx_const; +INSERT INTO `llx_const` (`rowid`, `name`, `entity`, `value`, `type`, `visible`, `note`, `tms`) VALUES +(3, 'MAILING_LIMIT_SENDBYWEB', 0, '25', 'chaine', 1, 'Number of targets to defined packet size when sending mass email', '2013-07-24 11:52:18'), +(4, 'SYSLOG_HANDLERS', 0, '["mod_syslog_file"]', 'chaine', 0, 'Which logger to use', '2013-07-24 11:52:18'), +(5, 'SYSLOG_FILE', 0, 'DOL_DATA_ROOT/dolibarr.log', 'chaine', 0, 'Directory where to write log file', '2013-07-24 11:52:18'), +(6, 'SYSLOG_LEVEL', 0, '7', 'chaine', 0, 'Level of debug info to show', '2013-07-24 11:52:18'), +(9, 'MAIN_UPLOAD_DOC', 0, '2048', 'chaine', 0, 'Max size for file upload (0 means no upload allowed)', '2013-07-24 11:52:18'), +(12, 'MAIN_SIZE_LISTE_LIMIT', 0, '25', 'chaine', 0, 'Longueur maximum des listes', '2013-07-24 11:52:18'), +(13, 'MAIN_SHOW_WORKBOARD', 0, '1', 'yesno', 0, 'Affichage tableau de bord de travail Dolibarr', '2013-07-24 11:52:18'), +(18, 'MAIN_DELAY_ACTIONS_TODO', 1, '7', 'chaine', 0, 'Tolérance de retard avant alerte (en jours) sur actions planifiées non réalisées', '2013-07-24 11:52:18'), +(19, 'MAIN_DELAY_ORDERS_TO_PROCESS', 1, '2', 'chaine', 0, 'Tolérance de retard avant alerte (en jours) sur commandes clients non traitées', '2013-07-24 11:52:18'), +(20, 'MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS', 1, '7', 'chaine', 0, 'Tolérance de retard avant alerte (en jours) sur commandes fournisseurs non traitées', '2013-07-24 11:52:18'), +(21, 'MAIN_DELAY_PROPALS_TO_CLOSE', 1, '31', 'chaine', 0, 'Tolérance de retard avant alerte (en jours) sur propales à cloturer', '2013-07-24 11:52:18'), +(22, 'MAIN_DELAY_PROPALS_TO_BILL', 1, '7', 'chaine', 0, 'Tolérance de retard avant alerte (en jours) sur propales non facturées', '2013-07-24 11:52:18'), +(23, 'MAIN_DELAY_CUSTOMER_BILLS_UNPAYED', 1, '31', 'chaine', 0, 'Tolérance de retard avant alerte (en jours) sur factures client impayées', '2013-07-24 11:52:18'), +(24, 'MAIN_DELAY_SUPPLIER_BILLS_TO_PAY', 1, '2', 'chaine', 0, 'Tolérance de retard avant alerte (en jours) sur factures fournisseur impayées', '2013-07-24 11:52:18'), +(25, 'MAIN_DELAY_NOT_ACTIVATED_SERVICES', 1, '0', 'chaine', 0, 'Tolérance de retard avant alerte (en jours) sur services à activer', '2013-07-24 11:52:18'), +(26, 'MAIN_DELAY_RUNNING_SERVICES', 1, '0', 'chaine', 0, 'Tolérance de retard avant alerte (en jours) sur services expirés', '2013-07-24 11:52:18'), +(27, 'MAIN_DELAY_MEMBERS', 1, '31', 'chaine', 0, 'Tolérance de retard avant alerte (en jours) sur cotisations adhérent en retard', '2013-07-24 11:52:18'), +(28, 'MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE', 1, '62', 'chaine', 0, 'Tolérance de retard avant alerte (en jours) sur rapprochements bancaires à faire', '2013-07-24 11:52:18'), +(29, 'MAIN_FIX_FOR_BUGGED_MTA', 1, '1', 'chaine', 1, 'Set constant to fix email ending from PHP with some linux ike system', '2013-07-24 11:52:18'), +(32, 'MAIN_VERSION_LAST_INSTALL', 0, '3.4.1', 'chaine', 0, 'Dolibarr version when install', '2013-07-24 11:52:57'), +(53, 'MAIN_INFO_SOCIETE_LOGO', 1, 'logo_bande_fr.png', 'chaine', 0, '', '2013-07-24 11:57:08'), +(54, 'MAIN_INFO_SOCIETE_LOGO_SMALL', 1, 'logo_bande_fr_small.png', 'chaine', 0, '', '2013-07-24 11:57:08'), +(55, 'MAIN_INFO_SOCIETE_LOGO_MINI', 1, 'logo_bande_fr_mini.png', 'chaine', 0, '', '2013-07-24 11:57:08'), +(68, 'COMPANY_ADDON_PDF_ODT_PATH', 1, 'DOL_DATA_ROOT/doctemplates/thirdparties', 'chaine', 0, NULL, '2013-07-24 11:57:18'), +(70, 'PROPALE_ADDON_PDF', 1, 'azur', 'chaine', 0, 'Nom du gestionnaire de generation des propales en PDF', '2013-07-24 11:57:20'), +(71, 'PROPALE_ADDON', 1, 'mod_propale_marbre', 'chaine', 0, 'Nom du gestionnaire de numerotation des propales', '2013-07-24 11:57:20'), +(72, 'PROPALE_VALIDITY_DURATION', 1, '15', 'chaine', 0, 'Duration of validity of business proposals', '2013-07-24 11:57:20'), +(73, 'PROPALE_ADDON_PDF_ODT_PATH', 1, 'DOL_DATA_ROOT/doctemplates/proposals', 'chaine', 0, NULL, '2013-07-24 11:57:20'), +(77, 'FACTURE_ADDON_PDF', 1, 'crabe', 'chaine', 0, 'Name of PDF model of invoice', '2013-07-24 11:57:33'), +(78, 'FACTURE_ADDON', 1, 'mod_facture_terre', 'chaine', 0, 'Name of numbering numerotation rules of invoice', '2013-07-24 11:57:33'), +(79, 'FACTURE_ADDON_PDF_ODT_PATH', 1, 'DOL_DATA_ROOT/doctemplates/invoices', 'chaine', 0, NULL, '2013-07-24 11:57:33'), +(89, 'AGF_USE_STAGIAIRE_TYPE', 1, '', 'yesno', 0, 'Use trainee type', '2013-07-25 19:02:41'), +(90, 'AGF_DEFAULT_STAGIAIRE_TYPE', 1, '2', 'chaine', 0, 'Type of trainee funding', '2013-07-25 19:02:41'), +(91, 'AGF_UNIVERSAL_MASK', 1, '', 'chaine', 0, 'Mask of training number ref', '2013-07-25 19:02:41'), +(92, 'AGF_ADDON', 1, 'mod_agefodd_simple', 'chaine', 0, 'Use simple mask for training ref', '2013-07-25 19:02:41'), +(93, 'AGF_ORGANISME_PREF', 1, '', 'chaine', 0, 'Prefecture d''enregistrement', '2013-07-25 19:02:41'), +(94, 'AGF_ORGANISME_NUM', 1, '', 'chaine', 0, 'Numerot d''enregistrement a la prefecture', '2013-07-25 19:02:41'), +(95, 'AGF_ORGANISME_REPRESENTANT', 1, '', 'chaine', 0, 'Representant de la societé de formation', '2013-07-25 19:02:41'), +(100, 'AGF_STAGTYPE_USE_SEARCH_TO_SELECT', 1, '', 'yesno', 0, 'Search stagiaire type with combobox', '2013-07-25 19:02:41'), +(106, 'AGF_LINK_OPCA_ADRR_TO_CONTACT', 1, '', 'yesno', 0, 'Display OPCA adress from OPCA contact rather than OPCA', '2013-07-25 19:02:41'), +(107, 'AGF_TEXT_COLOR', 1, '000000', 'chaine', 0, 'Text color of PDF in hexadecimal', '2013-07-25 19:02:41'), +(108, 'AGF_HEAD_COLOR', 1, 'CB4619', 'chaine', 0, 'Text color header in hexadecimal', '2013-07-25 19:02:41'), +(109, 'AGF_FOOT_COLOR', 1, 'BEBEBE', 'chaine', 0, 'Text color of PDF footer, in hexadccimal', '2013-07-25 19:02:41'), +(112, 'AGF_MANAGE_OPCA', 1, '1', 'yesno', 0, 'Manage Opca', '2013-07-25 19:02:41'), +(113, 'AGF_CERTIF_ADDON', 1, 'mod_agefoddcertif_simple', 'chaine', 0, 'Use simple mask for certif ref', '2013-07-25 19:02:41'), +(114, 'AGF_CERTIF_UNIVERSAL_MASK', 1, '', 'chaine', 0, 'Mask of certificate code', '2013-07-25 19:02:41'), +(120, 'COMMANDE_ADDON_PDF', 1, 'einstein', 'chaine', 0, 'Name of PDF model of order', '2013-07-25 19:02:41'), +(121, 'COMMANDE_ADDON', 1, 'mod_commande_marbre', 'chaine', 0, 'Name of numbering numerotation rules of order', '2013-07-25 19:02:41'), +(122, 'COMMANDE_ADDON_PDF_ODT_PATH', 1, 'DOL_DATA_ROOT/doctemplates/orders', 'chaine', 0, NULL, '2013-07-25 19:02:41'), +(132, 'COMMANDE_SUPPLIER_ADDON_PDF', 1, 'muscadet', 'chaine', 0, 'Nom du gestionnaire de generation des bons de commande en PDF', '2013-07-25 19:02:41'), +(133, 'COMMANDE_SUPPLIER_ADDON_NUMBER', 1, 'mod_commande_fournisseur_muguet', 'chaine', 0, 'Nom du gestionnaire de numerotation des commandes fournisseur', '2013-07-25 19:02:41'), +(134, 'INVOICE_SUPPLIER_ADDON_PDF', 1, 'canelle', 'chaine', 0, 'Nom du gestionnaire de generation des factures fournisseur en PDF', '2013-07-25 19:02:41'), +(135, 'INVOICE_SUPPLIER_ADDON_NUMBER', 1, 'mod_facture_fournisseur_cactus', 'chaine', 0, 'Nom du gestionnaire de numerotation des factures fournisseur', '2013-07-25 19:02:41'), +(139, 'MAIN_AGENDA_ACTIONAUTO_COMPANY_CREATE', 1, '1', 'chaine', 0, NULL, '2013-07-25 19:02:41'), +(140, 'MAIN_AGENDA_ACTIONAUTO_CONTRACT_VALIDATE', 1, '1', 'chaine', 0, NULL, '2013-07-25 19:02:41'), +(141, 'MAIN_AGENDA_ACTIONAUTO_PROPAL_VALIDATE', 1, '1', 'chaine', 0, NULL, '2013-07-25 19:02:41'), +(142, 'MAIN_AGENDA_ACTIONAUTO_PROPAL_SENTBYMAIL', 1, '1', 'chaine', 0, NULL, '2013-07-25 19:02:41'), +(143, 'MAIN_AGENDA_ACTIONAUTO_ORDER_VALIDATE', 1, '1', 'chaine', 0, NULL, '2013-07-25 19:02:41'), +(144, 'MAIN_AGENDA_ACTIONAUTO_ORDER_SENTBYMAIL', 1, '1', 'chaine', 0, NULL, '2013-07-25 19:02:41'), +(145, 'MAIN_AGENDA_ACTIONAUTO_BILL_VALIDATE', 1, '1', 'chaine', 0, NULL, '2013-07-25 19:02:41'), +(146, 'MAIN_AGENDA_ACTIONAUTO_BILL_PAYED', 1, '1', 'chaine', 0, NULL, '2013-07-25 19:02:41'), +(147, 'MAIN_AGENDA_ACTIONAUTO_BILL_CANCEL', 1, '1', 'chaine', 0, NULL, '2013-07-25 19:02:41'), +(148, 'MAIN_AGENDA_ACTIONAUTO_BILL_SENTBYMAIL', 1, '1', 'chaine', 0, NULL, '2013-07-25 19:02:41'), +(149, 'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_VALIDATE', 1, '1', 'chaine', 0, NULL, '2013-07-25 19:02:41'), +(150, 'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_VALIDATE', 1, '1', 'chaine', 0, NULL, '2013-07-25 19:02:41'), +(151, 'MAIN_AGENDA_ACTIONAUTO_SHIPPING_VALIDATE', 1, '1', 'chaine', 0, NULL, '2013-07-25 19:02:41'), +(152, 'MAIN_AGENDA_ACTIONAUTO_SHIPPING_SENTBYMAIL', 1, '1', 'chaine', 0, NULL, '2013-07-25 19:02:41'), +(153, 'MAIN_AGENDA_ACTIONAUTO_BILL_UNVALIDATE', 1, '1', 'chaine', 0, NULL, '2013-07-25 19:02:41'), +(154, 'AGF_USE_LOGO_CLIENT', 1, '1', 'chaine', 0, '', '2013-07-25 19:02:50'), +(155, 'AGF_USE_FAC_WITHOUT_ORDER', 1, '1', 'chaine', 0, '', '2013-07-25 19:02:52'), +(156, 'AGF_CONTACT_DOL_SESSION', 1, '1', 'chaine', 0, '', '2013-07-25 19:02:57'), +(157, 'AGF_TRAINING_USE_SEARCH_TO_SELECT', 1, '1', 'chaine', 0, '', '2013-07-25 19:03:00'), +(158, 'AGF_TRAINER_USE_SEARCH_TO_SELECT', 1, '1', 'chaine', 0, '', '2013-07-25 19:03:00'), +(159, 'AGF_TRAINEE_USE_SEARCH_TO_SELECT', 1, '1', 'chaine', 0, '', '2013-07-25 19:03:01'), +(160, 'AGF_SITE_USE_SEARCH_TO_SELECT', 1, '1', 'chaine', 0, '', '2013-07-25 19:03:01'), +(161, 'AGF_DOL_AGENDA', 1, '1', 'chaine', 0, '', '2013-07-25 19:03:02'), +(162, 'COMPANY_USE_SEARCH_TO_SELECT', 1, '2', 'chaine', 0, '', '2013-07-25 19:03:24'), +(163, 'CONTACT_USE_SEARCH_TO_SELECT', 1, '2', 'chaine', 0, '', '2013-07-25 19:03:26'), +(165, 'SOCIETE_CODECOMPTA_ADDON', 1, 'mod_codecompta_panicum', 'chaine', 0, '', '2013-07-25 19:03:30'), +(166, 'AGF_CONTACT_USE_SEARCH_TO_SELECT', 1, '1', 'chaine', 0, '', '2013-07-25 19:05:13'), +(167, 'MAIN_USE_COMPANY_NAME_OF_CONTACT', 1, '1', 'chaine', 0, '', '2013-07-25 19:05:15'), +(168, 'AGF_FCKEDITOR_ENABLE_TRAINING', 1, '1', 'chaine', 0, '', '2013-07-25 19:05:19'), +(169, 'AGF_SESSION_TRAINEE_STATUS_AUTO', 1, '1', 'chaine', 0, '', '2013-07-25 19:05:24'), +(231, 'SOCIETE_CODECLIENT_ADDON', 1, 'mod_codeclient_elephant', 'chaine', 0, '', '2013-08-21 13:03:52'), +(249, 'PROJECT_ADDON_PDF', 1, 'baleine', 'chaine', 0, 'Nom du gestionnaire de generation des projets en PDF', '2013-08-23 12:32:47'), +(250, 'PROJECT_ADDON', 1, 'mod_project_simple', 'chaine', 0, 'Nom du gestionnaire de numerotation des projets', '2013-08-23 12:32:47'), +(251, 'PROJECT_ADDON_PDF_ODT_PATH', 1, 'DOL_DATA_ROOT/doctemplates/projects', 'chaine', 0, NULL, '2013-08-23 12:32:47'), +(269, 'PRODUIT_MULTIPRICES', 1, '1', 'chaine', 0, '', '2013-08-23 13:43:31'), +(274, 'MAILING_EMAIL_UNSUBSCRIBE', 1, '1', 'chaine', 0, '', '2013-08-23 14:37:46'), +(275, 'MAILING_EMAIL_FROM', 1, 'dolibarr@domain.com', 'chaine', 0, '', '2013-08-23 14:37:49'), +(276, 'MAILING_EMAIL_UNSUBSCRIBE_KEY', 1, '9203b218961d2941eeb534522e47b539', 'chaine', 0, '', '2013-08-23 14:37:49'), +(278, 'FCKEDITOR_ENABLE_SOCIETE', 1, '1', 'yesno', 0, 'WYSIWIG for description and note (except products/services)', '2013-08-23 14:38:53'), +(279, 'FCKEDITOR_ENABLE_PRODUCTDESC', 1, '1', 'yesno', 0, 'WYSIWIG for products/services description and note', '2013-08-23 14:38:53'), +(280, 'FCKEDITOR_ENABLE_MAILING', 1, '1', 'yesno', 0, 'WYSIWIG for mass emailings', '2013-08-23 14:38:53'), +(282, 'FCKEDITOR_ENABLE_USERSIGN', 1, '1', 'yesno', 0, 'WYSIWIG for products details lines for all entities', '2013-08-23 14:38:53'), +(283, 'FCKEDITOR_ENABLE_MAIL', 1, '1', 'yesno', 0, 'WYSIWIG for products details lines for all entities', '2013-08-23 14:38:53'), +(404, 'MAIN_MENU_STANDARD', 1, 'eldy_menu.php', 'chaine', 0, '', '2013-08-24 03:56:19'), +(405, 'MAIN_MENU_SMARTPHONE', 1, 'eldy_menu.php', 'chaine', 0, '', '2013-08-24 03:56:19'), +(406, 'MAIN_MENUFRONT_STANDARD', 1, 'eldy_menu.php', 'chaine', 0, '', '2013-08-24 03:56:19'), +(407, 'MAIN_MENUFRONT_SMARTPHONE', 1, 'eldy_menu.php', 'chaine', 0, '', '2013-08-24 03:56:19'), +(408, 'MAIN_INFO_SOCIETE_COUNTRY', 1, '1:FR:France', 'chaine', 0, '', '2013-08-24 04:03:49'), +(409, 'MAIN_INFO_SOCIETE_NOM', 1, 'Akteos', 'chaine', 0, '', '2013-08-24 04:03:49'), +(410, 'MAIN_INFO_SOCIETE_ADDRESS', 1, '6 Rue du 4 Septembre', 'chaine', 0, '', '2013-08-24 04:03:49'), +(411, 'MAIN_INFO_SOCIETE_TOWN', 1, 'Issy-les-Moulineaux', 'chaine', 0, '', '2013-08-24 04:03:49'), +(412, 'MAIN_INFO_SOCIETE_ZIP', 1, '92130', 'chaine', 0, '', '2013-08-24 04:03:49'), +(413, 'MAIN_INFO_SOCIETE_STATE', 1, '94', 'chaine', 0, '', '2013-08-24 04:03:49'), +(414, 'MAIN_MONNAIE', 1, 'EUR', 'chaine', 0, '', '2013-08-24 04:03:49'), +(415, 'MAIN_INFO_SOCIETE_TEL', 1, '01 55 95 85 10', 'chaine', 0, '', '2013-08-24 04:03:49'), +(416, 'MAIN_INFO_SOCIETE_FAX', 1, '01 55 95 85 11', 'chaine', 0, '', '2013-08-24 04:03:49'), +(417, 'MAIN_INFO_SOCIETE_MAIL', 1, 'conseil@akteos.fr', 'chaine', 0, '', '2013-08-24 04:03:49'), +(418, 'MAIN_INFO_SOCIETE_WEB', 1, 'http://www.akteos.fr', 'chaine', 0, '', '2013-08-24 04:03:49'), +(419, 'MAIN_INFO_CAPITAL', 1, '37000', 'chaine', 0, '', '2013-08-24 04:03:49'), +(420, 'MAIN_INFO_SOCIETE_FORME_JURIDIQUE', 1, '57', 'chaine', 0, '', '2013-08-24 04:03:49'), +(421, 'MAIN_INFO_SIREN', 1, '412056152', 'chaine', 0, '', '2013-08-24 04:03:49'), +(422, 'MAIN_INFO_SIRET', 1, ' 41205615200033 ', 'chaine', 0, '', '2013-08-24 04:03:49'), +(423, 'MAIN_INFO_APE', 1, '6420Z', 'chaine', 0, '', '2013-08-24 04:03:49'), +(424, 'MAIN_INFO_RCS', 1, 'Nanterre B 412 056 152 ', 'chaine', 0, '', '2013-08-24 04:03:49'), +(425, 'MAIN_INFO_TVAINTRA', 1, 'FR80412056152', 'chaine', 0, '', '2013-08-24 04:03:49'), +(426, 'SOCIETE_FISCAL_MONTH_START', 1, '1', 'chaine', 0, '', '2013-08-24 04:03:49'), +(427, 'FACTURE_TVAOPTION', 1, 'reel', 'chaine', 0, '', '2013-08-24 04:03:49'), +(428, 'COMPANY_ELEPHANT_MASK_CUSTOMER', 1, 'C{00000}', 'chaine', 0, '', '2013-08-24 04:04:39'), +(429, 'COMPANY_ELEPHANT_MASK_SUPPLIER', 1, 'F{00000}', 'chaine', 0, '', '2013-08-24 04:04:39'), +(437, 'MAIN_MENU_HIDE_UNAUTHORIZED', 1, '1', 'chaine', 1, '', '2013-08-26 13:09:10'), +(438, 'AGENDA_USE_EVENT_TYPE', 1, '1', 'chaine', 0, '', '2013-08-26 13:24:44'), +(439, 'MAIN_USE_ADVANCED_PERMS', 1, '1', 'chaine', 1, '', '2013-08-27 09:31:08'), +(440, 'SOCIETE_ADD_REF_IN_LIST', 1, '1', 'yesno', 0, '', '2013-08-27 19:06:27'), +(441, 'MAIN_MODULE_AGEFODD', 1, '1', NULL, 0, NULL, '2013-08-27 19:11:17'), +(442, 'MAIN_MODULE_AGEFODD_TABS_0', 1, 'order:+tabAgefodd:AgfMenuSess:agefodd@agefodd:/agefodd/session/list_fin.php?search_orderid=__ID__', 'chaine', 0, NULL, '2013-08-27 19:11:17'), +(443, 'MAIN_MODULE_AGEFODD_TABS_1', 1, 'invoice:+tabAgefodd:AgfMenuSess:agefodd@agefodd:/agefodd/session/list_fin.php?search_invoiceid=__ID__', 'chaine', 0, NULL, '2013-08-27 19:11:17'), +(444, 'MAIN_MODULE_AGEFODD_TABS_2', 1, 'propal:+tabAgefodd:AgfMenuSess:agefodd@agefodd:/agefodd/session/list_fin.php?search_propalid=__ID__', 'chaine', 0, NULL, '2013-08-27 19:11:17'), +(445, 'MAIN_MODULE_AGEFODD_TRIGGERS', 1, '1', 'chaine', 0, NULL, '2013-08-27 19:11:17'), +(446, 'AGF_LAST_VERION_INSTALL', 1, '2.1.5', 'chaine', 0, 'Last version installed to know change table to execute', '2013-08-27 19:11:17'), +(447, 'AGF_MANAGE_CERTIF', 1, '', 'yesno', 0, 'Manage certification', '2013-08-27 19:11:17'), +(449, 'MAIN_MODULE_PROPALE', 1, '1', NULL, 0, NULL, '2013-08-27 19:11:17'), +(453, 'MAIN_MODULE_COMPTABILITE', 1, '1', NULL, 0, NULL, '2013-08-27 19:11:17'), +(459, 'MAIN_MODULE_BANQUE', 1, '1', NULL, 0, NULL, '2013-08-27 19:11:18'), +(464, 'PRODUIT_MULTIPRICES_LIMIT', 1, '3', 'chaine', 0, '', '2013-08-31 18:54:58'), +(486, 'MAIN_MODULE_FCKEDITOR', 1, '1', NULL, 0, NULL, '2013-10-31 12:12:01'), +(487, 'FCKEDITOR_ENABLE_DETAILS', 1, '1', 'yesno', 0, 'WYSIWIG for products details lines for all entities', '2013-10-31 12:12:01'), +(489, 'MAIN_MODULE_EXPORT', 1, '1', NULL, 0, NULL, '2013-10-31 12:12:20'), +(490, 'COMPANY_HIDE_INACTIVE_IN_COMBOBOX', 1, '1', 'chaine', 0, '', '2013-10-31 12:13:36'), +(491, 'USER_HIDE_INACTIVE_IN_COMBOBOX', 1, '1', 'chaine', 0, '', '2013-10-31 12:13:45'), +(492, 'PRODUIT_DESC_IN_FORM', 1, '1', 'chaine', 1, '', '2013-10-31 12:15:02'), +(493, 'MAIN_LANG_DEFAULT', 1, 'auto', 'chaine', 0, '', '2013-10-31 12:15:19'), +(494, 'MAIN_MULTILANGS', 1, '1', 'chaine', 0, '', '2013-10-31 12:15:19'), +(495, 'MAIN_SIZE_LISTE_LIMIT', 1, '50', 'chaine', 0, '', '2013-10-31 12:15:19'), +(496, 'MAIN_DISABLE_JAVASCRIPT', 1, '0', 'chaine', 0, '', '2013-10-31 12:15:19'), +(497, 'MAIN_BUTTON_HIDE_UNAUTHORIZED', 1, '1', 'chaine', 0, '', '2013-10-31 12:15:19'), +(498, 'MAIN_START_WEEK', 1, '1', 'chaine', 0, '', '2013-10-31 12:15:19'), +(499, 'MAIN_SHOW_LOGO', 1, '0', 'chaine', 0, '', '2013-10-31 12:15:19'), +(500, 'MAIN_FIRSTNAME_NAME_POSITION', 1, '0', 'chaine', 0, '', '2013-10-31 12:15:19'), +(501, 'MAIN_THEME', 1, 'eldy', 'chaine', 0, '', '2013-10-31 12:15:19'), +(502, 'MAIN_SEARCHFORM_CONTACT', 1, '1', 'chaine', 0, '', '2013-10-31 12:15:19'), +(503, 'MAIN_SEARCHFORM_SOCIETE', 1, '1', 'chaine', 0, '', '2013-10-31 12:15:19'), +(504, 'MAIN_SEARCHFORM_PRODUITSERVICE', 1, '0', 'chaine', 0, '', '2013-10-31 12:15:19'), +(505, 'MAIN_SEARCHFORM_ADHERENT', 1, '0', 'chaine', 0, '', '2013-10-31 12:15:20'), +(506, 'MAIN_HELPCENTER_DISABLELINK', 0, '0', 'chaine', 0, '', '2013-10-31 12:15:20'), +(507, 'MAIN_HELP_DISABLELINK', 0, '0', 'chaine', 0, '', '2013-10-31 12:15:20'), +(508, 'MAIN_USE_PREVIEW_TABS', 1, '0', 'chaine', 0, '', '2013-10-31 12:15:20'), +(509, 'CONTACT_HIDE_INACTIVE_IN_COMBOBOX', 1, '1', 'chaine', 1, '', '2013-10-31 12:16:47'), +(510, 'MAIN_FEATURES_LEVEL', 0, '2', 'chaine', 1, 'Level of features to show (0=stable only, 1=stable+experimental, 2=stable+experimental+development', '2013-10-31 12:17:10'), +(511, 'COMPTA_ACCOUNT_CUSTOMER', 1, '445719', 'string', 0, '', '2013-10-31 13:30:07'), +(512, 'MAIN_MODULE_AGENDA', 1, '1', NULL, 0, NULL, '2013-11-05 09:16:16'), +(513, 'MAIN_MODULE_SOCIETE', 1, '1', NULL, 0, NULL, '2013-11-05 09:16:16'), +(514, 'MAIN_MODULE_SERVICE', 1, '1', NULL, 0, NULL, '2013-11-05 09:16:16'), +(515, 'MAIN_MODULE_COMMANDE', 1, '1', NULL, 0, NULL, '2013-11-05 09:16:16'), +(516, 'MAIN_MODULE_FACTURE', 1, '1', NULL, 0, NULL, '2013-11-05 09:16:16'), +(517, 'MAIN_MODULE_FOURNISSEUR', 1, '1', NULL, 0, NULL, '2013-11-05 09:16:16'), +(518, 'MAIN_MODULE_USER', 0, '1', NULL, 0, NULL, '2013-11-05 09:16:16'), +(519, 'MAIN_VERSION_LAST_UPGRADE', 0, '3.4.2', 'chaine', 0, 'Dolibarr version for last upgrade', '2013-11-05 09:19:03'), +(521, 'MAIN_MODULE_SYSLOG', 0, '1', NULL, 0, NULL, '2013-11-05 09:23:09'), +(524, 'MAIN_MAIL_SMTP_PORT', 0, '465', 'chaine', 0, '', '2013-11-05 09:47:29'), +(525, 'MAIN_MAIL_SMTP_SERVER', 0, 'smtp.googlemail.com', 'chaine', 0, '', '2013-11-05 09:47:29'), +(528, 'MAIN_MAIL_EMAIL_TLS', 0, '1', 'chaine', 0, '', '2013-11-05 09:47:30'), +(530, 'MAIN_DISABLE_ALL_MAILS', 1, '0', 'chaine', 0, '', '2013-11-05 10:34:55'), +(531, 'MAIN_MAIL_SENDMODE', 0, 'mail', 'chaine', 0, '', '2013-11-05 10:34:55'), +(534, 'MAIN_MAIL_EMAIL_FROM', 1, 'robot@domain.com', 'chaine', 0, '', '2013-11-05 10:34:55'), +(535, 'MAIN_MODULE_MAILING', 1, '1', NULL, 0, NULL, '2013-11-05 17:18:53'), +(536, 'MAIN_MODULE_CATEGORIE', 1, '1', NULL, 0, NULL, '2013-11-05 17:24:49'), +(537, 'MAIN_MODULE_CATEGORYCONTACT', 1, '1', NULL, 0, NULL, '2013-11-05 17:25:34'), +(538, 'MAIN_MODULE_CATEGORYCONTACT_TABS_0', 1, 'contact:+tabCategorie:Category:categories:/categorycontact/categorycontact/categorie.php?id=__ID__&type=4', 'chaine', 0, NULL, '2013-11-05 17:25:34'), +(539, 'MAIN_MODULE_CATEGORYCONTACT_MODELS', 1, '1', 'chaine', 0, NULL, '2013-11-05 17:25:34'), +(540, 'MAIN_MODULE_WEBSERVICES', 1, '1', NULL, 0, NULL, '2013-11-05 17:33:25'), +(541, 'WEBSERVICES_KEY', 1, '90c753e6c2919142caf7a63051ebc7ff', 'chaine', 0, '', '2013-11-05 17:33:30'), +(542, 'MAIN_MODULE_HOLIDAY', 1, '1', NULL, 0, NULL, '2013-11-05 17:34:48'), +(543, 'MAIN_MODULE_HOLIDAY_TABS_0', 1, 'user:+paidholidays:CPTitreMenu:holiday:$user->rights->holiday->write:/holiday/index.php?mainmenu=holiday&id=__ID__', 'chaine', 0, NULL, '2013-11-05 17:34:48'), +(544, 'MAIN_COMPANY_CONTROL_DBL', 1, '1', NULL, 0, NULL, '2013-11-05 17:24:49'), +(545, 'MAIN_CONTACT_CONTROL_DBL', 1, '1', NULL, 0, NULL, '2013-11-05 17:24:49'); + + + + + + + +UPDATE account SET modreg='CHQ' WHERE modreg='CH'; +UPDATE account SET modreg='CHQ' WHERE modreg='CHG'; +UPDATE account SET modreg='VIR' WHERE modreg='VRG'; + +UPDATE account SET tvaintracom= REPLACE(tvaintracom,'TVA Intracommunautaire : ',''); +UPDATE account SET tvaintracom= REPLACE(tvaintracom,'TVA Intracommunautaire: ',''); + +UPDATE account SET pays=1 WHERE pays='FRANCE'; +UPDATE account SET pays=5 WHERE pays='ALLEMAGNE'; +UPDATE account SET pays=5 WHERE pays='GERMANY'; +UPDATE account SET pays=184 WHERE pays='POLOGNE'; +UPDATE account SET pays=3 WHERE pays='ITALIE'; +UPDATE account SET pays=12 WHERE pays='MAROC'; +UPDATE account SET pays=6 WHERE pays='SUISSE'; +UPDATE account SET pays=7 WHERE pays='GRANDE BRETAGNE'; +UPDATE account SET pays=7 WHERE pays='UNITED KINGDOM'; +UPDATE account SET pays=115 WHERE pays='HONG KONG'; +UPDATE account SET pays=85 WHERE pays='EGYPTE'; +UPDATE account SET pays=201 WHERE pays='SLOVAQUIE'; +UPDATE account SET pays=11 WHERE pays='USA'; +UPDATE account SET pays=20 WHERE pays IN ('SWEDEN','SUEDE'); +UPDATE account SET pays=17 WHERE pays='PAYS BAS'; +UPDATE account SET pays=2 WHERE pays='BELGIQUE'; +UPDATE account SET pays=123 WHERE pays='JAPAN'; +UPDATE account SET pays=4 WHERE pays='ESPAGNE'; +UPDATE account SET pays=9 WHERE pays='CHINE'; +UPDATE account SET pays=1 WHERE pays='MARTINIQUE'; +UPDATE account SET pays=14 WHERE pays='CANADA'; +UPDATE account SET pays=11 WHERE pays='ETATS UNIS'; +UPDATE account SET pays=227 WHERE pays='UNITED ARAB EMIRATES'; +UPDATE account SET pays=188 WHERE pays='ROUMANIE'; +UPDATE account SET pays=29 WHERE pays='SINGAPOUR'; +UPDATE account SET pays=221 WHERE pays='TUIRQUIE'; +UPDATE account SET pays=13 WHERE pays='ALGERIE'; +UPDATE account SET pays=117 WHERE pays='INDE'; +UPDATE account SET pays=17 WHERE pays='PAYS-BAS'; +UPDATE account SET pays=7 WHERE pays='ENGLAND'; +UPDATE account SET pays=7 WHERE pays IN ('GRANDE-BRETAGNE','UK'); +UPDATE account SET pays=7 WHERE pays='ANGLETERRE'; +UPDATE account SET pays=1 WHERE pays='FRA?CE'; +UPDATE account SET pays=1 WHERE pays='FRABNCE'; +UPDATE account SET pays=17 WHERE pays='PAYS - BAS'; +UPDATE account SET pays=227 WHERE pays='EMIRATS ARABES UNIS'; +UPDATE account SET pays=227 WHERE pays='EMIRATS ARABE UNIS'; +UPDATE account SET pays=2 WHERE pays='BELGIUM'; +UPDATE account SET pays=2 WHERE pays='BELGIQUE BELGIE'; +UPDATE account SET pays=11 WHERE pays='ETATS UNIS USA'; +UPDATE account SET pays=17 WHERE pays='HOLLAND'; +UPDATE account SET pays=7 WHERE pays IN ('ROYAUME UNI','ROYAUME-UNI'); +UPDATE account SET pays=6 WHERE pays='SWITZERLAND'; +UPDATE account SET pays=80 WHERE pays='DANEMARK'; +UPDATE account SET pays=140 WHERE pays='LUXEMBOURG'; +UPDATE account SET pays=35 WHERE pays='ANGOLA'; +UPDATE account SET pays=81 WHERE pays='DJIBOUTI'; +UPDATE account SET pays=27 WHERE pays='MONACO'; +UPDATE account SET pays=28 WHERE pays='AUSTRALIE'; +UPDATE account SET pays=56 WHERE pays='BRESIL'; +UPDATE account SET pays=143 WHERE pays='MADAGASCAR'; +UPDATE account SET pays=25 WHERE pays='PORTUGAL'; +UPDATE account SET pays=22 WHERE pays='SENEGAL'; +UPDATE account SET pays=10 WHERE pays='TUNISIE'; +UPDATE account SET pays=79 WHERE pays IN ('CZECH REPUBLIC','CSECH REPUBLIC','REPUBLIQUE TCHEQUE'); +UPDATE account SET pays=221 WHERE pays='TURQUIE'; +UPDATE account SET pays=41 WHERE pays='AUTRICHE'; +UPDATE account SET pays=21 WHERE pays='Côte d''Ivoire'; +UPDATE account SET pays=24 WHERE pays='CAMEROUN'; +UPDATE account SET pays=17 WHERE pays='THE NETHERLANDS'; +UPDATE account SET pays=1 WHERE pays='ANGERS CEDEX 01'; +UPDATE account SET pays=29 WHERE pays='SINGAPORE'; +UPDATE account SET pays=117 WHERE pays='INDIA'; +UPDATE account SET pays=3 WHERE pays IN ('ITALY','ITALIA'); +UPDATE account SET pays=94 WHERE pays='FINLANDE'; +UPDATE account SET pays=80 WHERE pays='DENMARK (DANEMARK)'; +UPDATE account SET pays=1 WHERE pays='FRANCE Cedex 01'; +UPDATE account SET pays=102 WHERE pays='GREECE'; +UPDATE account SET pays=102 WHERE pays='GRECE'; +UPDATE account SET pays=19 WHERE pays IN ('RUSSIA','RUSSIE'); +UPDATE account SET pays=216 WHERE pays='THAILANDE'; +UPDATE account SET pays=124 WHERE pays='JORDANIE'; +UPDATE account SET pays=134 WHERE pays='LIBAN'; +UPDATE account SET pays=173 WHERE pays='NORWAY'; +UPDATE account SET pays=129 WHERE pays='COREE DU SUD'; +UPDATE account SET pays=44 WHERE pays='BAHREIN'; +UPDATE account SET pays=18 WHERE pays='HONGRIE'; +UPDATE account SET pays=78 WHERE pays='CYPRUS'; +UPDATE account SET pays=165 WHERE pays='NOUVELLE CALEDONIE'; +UPDATE account SET pays=NULL WHERE pays=''; +UPDATE account SET pays=1 WHERE pays='MONTAUBAN DE BRETAGN'; + +UPDATE interv SET pays=1 WHERE pays='FRANCE'; +UPDATE interv SET pays=5 WHERE pays='ALLEMAGNE'; +UPDATE interv SET pays=5 WHERE pays='GERMANY'; +UPDATE interv SET pays=184 WHERE pays='POLOGNE'; +UPDATE interv SET pays=3 WHERE pays='ITALIE'; +UPDATE interv SET pays=12 WHERE pays='MAROC'; +UPDATE interv SET pays=6 WHERE pays='SUISSE'; +UPDATE interv SET pays=7 WHERE pays='GRANDE BRETAGNE'; +UPDATE interv SET pays=7 WHERE pays='UNITED KINGDOM'; +UPDATE interv SET pays=115 WHERE pays IN ('HONG KONG','HONG-KONG'); +UPDATE interv SET pays=85 WHERE pays='EGYPTE'; +UPDATE interv SET pays=201 WHERE pays='SLOVAQUIE'; +UPDATE interv SET pays=11 WHERE pays='USA'; +UPDATE interv SET pays=20 WHERE pays IN ('SWEDEN','SUEDE'); +UPDATE interv SET pays=17 WHERE pays='PAYS BAS'; +UPDATE interv SET pays=2 WHERE pays='BELGIQUE'; +UPDATE interv SET pays=123 WHERE pays='JAPAN'; +UPDATE interv SET pays=4 WHERE pays='ESPAGNE'; +UPDATE interv SET pays=9 WHERE pays='CHINE'; +UPDATE interv SET pays=1 WHERE pays='MARTINIQUE'; +UPDATE interv SET pays=14 WHERE pays='CANADA'; +UPDATE interv SET pays=11 WHERE pays='ETATS UNIS'; +UPDATE interv SET pays=227 WHERE pays='UNITED ARAB EMIRATES'; +UPDATE interv SET pays=188 WHERE pays='ROUMANIE'; +UPDATE interv SET pays=29 WHERE pays='SINGAPOUR'; +UPDATE interv SET pays=221 WHERE pays='TUIRQUIE'; +UPDATE interv SET pays=13 WHERE pays='ALGERIE'; +UPDATE interv SET pays=117 WHERE pays='INDE'; +UPDATE interv SET pays=17 WHERE pays='PAYS-BAS'; +UPDATE interv SET pays=7 WHERE pays='ENGLAND'; +UPDATE interv SET pays=7 WHERE pays IN ('GRANDE-BRETAGNE','UK'); +UPDATE interv SET pays=7 WHERE pays='ANGLETERRE'; +UPDATE interv SET pays=1 WHERE pays='FRA?CE'; +UPDATE interv SET pays=1 WHERE pays='FRABNCE'; +UPDATE interv SET pays=17 WHERE pays='PAYS - BAS'; +UPDATE interv SET pays=227 WHERE pays='EMIRATS ARABES UNIS'; +UPDATE interv SET pays=227 WHERE pays='EMIRATS ARABE UNIS'; +UPDATE interv SET pays=2 WHERE pays='BELGIUM'; +UPDATE interv SET pays=2 WHERE pays='BELGIQUE BELGIE'; +UPDATE interv SET pays=11 WHERE pays='ETATS UNIS USA'; +UPDATE interv SET pays=17 WHERE pays='HOLLAND'; +UPDATE interv SET pays=7 WHERE pays IN ('ROYAUME UNI','ROYAUME-UNI','United Kingdom','UK'); +UPDATE interv SET pays=6 WHERE pays='SWITZERLAND'; +UPDATE interv SET pays=80 WHERE pays='DANEMARK'; +UPDATE interv SET pays=140 WHERE pays='LUXEMBOURG'; +UPDATE interv SET pays=35 WHERE pays='ANGOLA'; +UPDATE interv SET pays=81 WHERE pays='DJIBOUTI'; +UPDATE interv SET pays=27 WHERE pays='MONACO'; +UPDATE interv SET pays=28 WHERE pays='AUSTRALIE'; +UPDATE interv SET pays=56 WHERE pays='BRESIL'; +UPDATE interv SET pays=143 WHERE pays='MADAGASCAR'; +UPDATE interv SET pays=25 WHERE pays='PORTUGAL'; +UPDATE interv SET pays=22 WHERE pays='SENEGAL'; +UPDATE interv SET pays=10 WHERE pays='TUNISIE'; +UPDATE interv SET pays=79 WHERE pays IN ('CZECH REPUBLIC','CSECH REPUBLIC','REPUBLIQUE TCHEQUE'); +UPDATE interv SET pays=221 WHERE pays='TURQUIE'; +UPDATE interv SET pays=41 WHERE pays='AUTRICHE'; +UPDATE interv SET pays=21 WHERE pays='Côte d''Ivoire'; +UPDATE interv SET pays=24 WHERE pays='CAMEROUN'; +UPDATE interv SET pays=17 WHERE pays='THE NETHERLANDS'; +UPDATE interv SET pays=1 WHERE pays='ANGERS CEDEX 01'; +UPDATE interv SET pays=29 WHERE pays='SINGAPORE'; +UPDATE interv SET pays=117 WHERE pays='INDIA'; +UPDATE interv SET pays=3 WHERE pays IN ('ITALY','ITALIA'); +UPDATE interv SET pays=94 WHERE pays='FINLANDE'; +UPDATE interv SET pays=80 WHERE pays='DENMARK (DANEMARK)'; +UPDATE interv SET pays=1 WHERE pays='FRANCE Cedex 01'; +UPDATE interv SET pays=102 WHERE pays='GREECE'; +UPDATE interv SET pays=102 WHERE pays='GRECE'; +UPDATE interv SET pays=19 WHERE pays IN ('RUSSIA','RUSSIE'); +UPDATE interv SET pays=216 WHERE pays='THAILANDE'; +UPDATE interv SET pays=124 WHERE pays='JORDANIE'; +UPDATE interv SET pays=134 WHERE pays='LIBAN'; +UPDATE interv SET pays=173 WHERE pays IN ('NORWAY','NORVEGE'); +UPDATE interv SET pays=129 WHERE pays='COREE DU SUD'; +UPDATE interv SET pays=44 WHERE pays='BAHREIN'; +UPDATE interv SET pays=18 WHERE pays='HONGRIE'; +UPDATE interv SET pays=78 WHERE pays='CYPRUS'; +UPDATE interv SET pays=165 WHERE pays='NOUVELLE CALEDONIE'; +UPDATE interv SET pays=NULL WHERE pays=''; +UPDATE interv SET pays=121 WHERE pays='ISRAEL'; +UPDATE interv SET pays=123 WHERE pays='JAPON'; +UPDATE interv SET pays=213 WHERE pays='TAIWAN'; +UPDATE interv SET pays=118 WHERE pays='INDONESIE'; +UPDATE interv SET pays=154 WHERE pays='MEXIQUE'; +UPDATE interv SET pays=166 WHERE pays='NOUVELLE ZELANDE'; +UPDATE interv SET pays=1 WHERE pays='MONTAUBAN DE BRETAGN'; + + +UPDATE contact SET titre='MR' WHERE titre='M.'; +UPDATE contact SET titre='MME' WHERE titre='Mme'; +UPDATE contact SET titre='MLE' WHERE titre='Mlle'; + +UPDATE interv SET civilite='MR' WHERE civilite='M.'; +UPDATE interv SET civilite='MME' WHERE civilite='Mme'; +UPDATE interv SET civilite='MLE' WHERE civilite='Mlle'; + +UPDATE eleves SET civilite='MR' WHERE civilite='M.'; +UPDATE eleves SET civilite='MME' WHERE civilite='Mme'; +UPDATE eleves SET civilite='MLE' WHERE civilite='Mlle'; + + +--Affect Charle de rostand old user to new user +UPDATE account set com_id='dfbfc33c-039f-102c-b0fb-001aa0790251' WHERE com_id='dfbfc922-039f-102c-b0fb-001aa0790251'; +--Set user email to get all coherent data +UPDATE sf_user SET email_address='mclement@akteos.fr' where id='c84283c0-039f-102c-b0fb-001aa0790251' + +SET foreign_key_checks = 0; +TRUNCATE TABLE llx_user; +INSERT INTO `llx_user` (`rowid`, `entity`, `ref_ext`, `ref_int`, `datec`, `tms`, `login`, `pass`, `pass_crypted`, `pass_temp`, `civilite`, `lastname`, `firstname`, `address`, `zip`, `town`, `fk_state`, `fk_country`, `job`, `office_phone`, `office_fax`, `user_mobile`, `email`, `signature`, `admin`, `module_comm`, `module_compta`, `fk_societe`, `fk_socpeople`, `fk_member`, `fk_user`, `note`, `datelastlogin`, `datepreviouslogin`, `egroupware_id`, `ldap_sid`, `openid`, `statut`, `photo`, `lang`, `color`, `import_key`) VALUES +(1, 0, NULL, NULL, '2013-10-20 14:48:56', '2013-10-20 12:48:57', 'admin_akteos', 'yc382tsz', 'abda7c036c49e6a511efe382b279ecae', NULL, NULL, 'SuperAdmin', '', '', '', '', NULL, NULL, '', '', '', '', '', '', 1, 1, 1, NULL, NULL, NULL, NULL, '', '2013-11-05 12:43:39', '2013-11-05 11:51:25', NULL, '', NULL, 1, NULL, NULL, NULL, NULL), +(2, 1, NULL, NULL, '2011-05-01 09:34:56', '2013-10-20 13:24:53', 'cmigeot', 'test', NULL, NULL, NULL, 'MIGEOT', 'Caroline', '', '', '', NULL, NULL, 'Assistante', '01 55 95 85 17', '01 55 95 85 11', '', 'cmigeot@akteos.fr', '', 0, 0, 0, NULL, NULL, NULL, 11, '', '2013-09-25 08:24:31', '2013-09-02 07:49:50', NULL, NULL, NULL, 1, NULL, NULL, NULL, 'c1b16bb9-49a6-401b-acd2-2945df7c0962'), +(3, 1, NULL, NULL, '2009-08-07 13:25:20', '2013-11-02 08:00:32', 'jandrian', 'test', NULL, NULL, NULL, 'ANDRIAN', 'Janieva', '', '', '', NULL, NULL, 'Chargée de formation', '01 55 95 85 13', '01 55 95 85 11', '', 'jandrian@akteos.fr', 'Bien cordialement
    \r\n
    \r\nJanieva ANDRIAN
    \r\n+33 (0)1 55 95 85 13
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n Description : LOGO AKTEOS - Courrier electronique extra petit (48x44)_sans phrase\r\n Le Leader du Management Interculturel
    \r\n 6, rue du Quatre Septembre
    \r\n F - 92130 Issy les Moulineaux
    \r\n www.akteos.fr
    \r\n 
    ', 0, 0, 0, NULL, NULL, NULL, 8, '', '2013-09-21 10:29:04', '2013-08-24 21:23:35', NULL, NULL, NULL, 1, NULL, NULL, NULL, '615d09b2-66e3-4c64-98dd-4c8130f7b975'), +(4, 1, NULL, NULL, '2010-05-06 17:57:52', '2013-10-20 13:24:53', 'ldarrieux', 'test', NULL, NULL, NULL, 'DARRIEUX', 'Laurence', '', '', '', NULL, NULL, 'Chef de projet', '01 55 95 84 66', '01 55 95 85 11', '', 'ldarrieux@akteos.fr', '', 0, 0, 0, NULL, NULL, NULL, 8, '', '2013-09-02 07:43:18', NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, '6d381997-0fee-4a14-9e39-654fb71208e6'), +(5, 1, NULL, NULL, '2013-02-07 17:32:57', '2013-08-27 13:56:43', 'mclement', 'test', NULL, NULL, NULL, 'CLEMENT', 'Mehdi', '', '', '', NULL, NULL, 'Attaché commercial', '01 55 95 84 65', '', '', 'mclement@akteos.fr', '', 0, 0, 0, NULL, NULL, NULL, 8, '', NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, 'c84283c0-039f-102c-b0fb-001aa0790251'), +(6, 1, NULL, NULL, '2012-03-01 11:55:18', '2013-10-20 13:24:53', 'dnguyen', 'test', NULL, NULL, NULL, 'NGUYEN', 'David', '', '', '', NULL, NULL, 'Attaché commercial', '01 55 95 84 69', '01 55 95 85 11', '', 'dnguyen@akteos.fr', '', 0, 0, 0, NULL, NULL, NULL, 8, '', '2013-10-30 09:47:36', '2013-08-21 17:02:14', NULL, NULL, NULL, 1, NULL, NULL, NULL, '0b9cc699-eb5f-4000-a84b-6a55a84a50be'), +(8, 1, NULL, NULL, NULL, '2013-11-01 21:31:12', 'crostand', 'test', NULL, NULL, NULL, 'ROSTAND', 'Charles', '', '', '', NULL, NULL, 'Directeur Général', '01 55 95 85 10', '01 55 95 85 11', '06 80 26 18 81', 'crostand@akteos.fr', 'Bien cordialement
    \r\n
    \r\nCharles Rostand
    \r\nDirecteur Général
    ', 1, 0, 0, NULL, NULL, NULL, NULL, '', '2013-08-29 08:17:11', NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, 'c8428226-039f-102c-b0fb-001aa0790251'), +(10, 1, NULL, NULL, NULL, '2013-10-20 13:24:53', 'lrostand', 'test', NULL, NULL, NULL, 'ROSTAND', 'Laure', '', '', '', NULL, NULL, 'Présidente', '01 55 95 85 15', '01 55 95 85 16', '06 60 34 31 10', 'lrostand@akteos.fr', 'Bien cordialement
    \r\n
    \r\nLaure Rostand
    \r\nPrésidente
    \r\n
    \r\n01 55 95 85 15
    \r\n06 60 34 31 10', 1, 0, 0, NULL, NULL, NULL, NULL, '', '2013-11-04 23:49:27', '2013-11-04 23:30:46', NULL, NULL, NULL, 1, NULL, NULL, NULL, 'c8427bb4-039f-102c-b0fb-001aa0790251'), +(11, 1, NULL, NULL, NULL, '2013-10-20 13:24:53', 'phabourdin', 'test', NULL, NULL, NULL, 'HABOURDIN', 'Pascale', '', '', '', NULL, NULL, 'Chef de Projet', '01 55 95 85 12', '01 55 95 85 11', '', 'phabourdin@akteos.fr', '', 0, 0, 0, NULL, NULL, NULL, 8, '', '2013-10-25 14:53:40', '2013-10-25 14:52:03', NULL, NULL, NULL, 1, NULL, NULL, NULL, 'c8428078-039f-102c-b0fb-001aa0790251'), +(13, 1, NULL, NULL, '2013-08-24 08:50:48', '2013-11-19 21:41:30', 'hlefebvre', 'test', '098f6bcd4621d373cade4e832627b4f6', NULL, NULL, 'LEFEBVRE', 'Hélène', '', '', '', NULL, NULL, 'Assitante', '', '', '', 'hlefebvre@akteos.fr', '', 0, 1, 1, NULL, NULL, NULL, 4, '', NULL, NULL, NULL, '', NULL, 1, NULL, NULL, NULL, '5a6c9f40-9e93-48ae-9298-cf5e0c5b104f'), +(14, 1, NULL, NULL, '2013-08-24 08:52:11', '2013-11-19 21:41:43', 'cmontaud', 'test', '098f6bcd4621d373cade4e832627b4f6', NULL, NULL, 'MONTAUD', 'Claire', '', '', '', NULL, NULL, 'Assistante', '', '', '', 'cmontaud@akteos.fr', '', 0, 1, 1, NULL, NULL, NULL, 8, '', '2013-09-02 08:11:24', '2013-09-02 07:45:33', NULL, '', NULL, 1, NULL, NULL, NULL, '1670409a-198c-4d9a-86f9-e0d0fbf9d6cb'), +(15, 1, NULL, NULL, '2013-08-24 08:53:33', '2013-11-19 21:41:55', 'ctesson', 'test', '098f6bcd4621d373cade4e832627b4f6', NULL, NULL, 'TESSON', 'Cécile', '', '', '', NULL, NULL, 'Chargée de communication', '', '', '', 'ctesson@akteos.fr', '', 0, 1, 1, NULL, NULL, NULL, 10, '', '2013-09-02 07:42:19', '2013-09-01 23:00:32', NULL, '', NULL, 1, NULL, NULL, NULL, 'ae0039da-2646-4883-bd4f-637a1e4744b4'), +(16, 1, NULL, NULL, '2010-09-07 16:09:53', '2010-09-07 14:10:03', 'EVM', 'test', NULL, NULL, NULL, 'Evenements', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '01718fa8-1e9a-4b1f-bf7d-cf9e3729cf53'), +(17, 1, NULL, NULL, '2009-04-27 18:28:26', '2010-04-14 17:37:21', 'CB', 'test', NULL, NULL, NULL, 'Borlet', 'Christophe', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'cborlet@akteos.fr', NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '0dc9343b-6fa3-4c2b-bf7b-da4c55c08952'), +(18, 1, NULL, NULL, '2011-03-22 09:21:11', '2011-08-31 14:17:12', 'NOMAD', 'test', NULL, NULL, NULL, 'Nomad', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'nomad@akteos.fr', NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '2225e4d8-128a-45a0-85a0-0ba49a0708f4'), +(19, 1, NULL, NULL, '2011-05-01 09:10:49', '2012-07-26 13:21:47', 'NF', 'test', NULL, NULL, NULL, 'Forté', 'Nathalie', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'nforte@akteos.fr', NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '283f2798-80cb-49f7-a9be-513dfefdd0bd'), +(20, 1, NULL, NULL, '2011-03-08 17:16:23', '2011-08-31 14:16:47', 'CONSEIL', 'test', NULL, NULL, NULL, 'Conseil', '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'conseil@akteos.fr', NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '373377aa-daff-468e-875a-9662a2dbfaa6'), +(21, 1, NULL, NULL, '2010-04-14 19:39:22', '2010-09-08 14:50:57', 'JBI', 'test', NULL, NULL, NULL, 'Bidou', 'Julie', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'jbidou@akteos.fr', NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '58f5ca7a-8dc8-4bd4-b5d1-1be0572706a1'), +(22, 1, NULL, NULL, '2009-09-01 12:35:28', '2010-04-14 17:37:14', 'EH', 'test', NULL, NULL, NULL, 'Hauw', 'Elisabeth', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '6f70587b-8f8f-4b02-827e-168a097f56b9'), +(23, 1, NULL, NULL, '2011-03-10 19:15:46', '2011-08-31 14:16:35', 'AKTEOS', 'test', NULL, NULL, NULL, 'Akteos', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'akteos@akteos.fr', NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '979c21e3-6ad2-45c0-82c0-76133a63a596'), +(24, 1, NULL, NULL, '2009-11-22 21:33:41', '2010-09-08 14:50:50', 'JB', 'test', NULL, NULL, NULL, 'Bons', 'Julien', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'jbons@akteos.fr', NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, 'a32f81fb-6a39-4e71-8d15-6f4969fc1187'), +(25, 1, NULL, NULL, '2011-01-11 15:42:01', '2011-03-28 13:40:45', 'WC', 'test', NULL, NULL, NULL, 'Cabrera', 'William', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'wcabrera@akteos.fr', NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, 'a72692dd-ce6e-4835-8f6b-e3697bb2f240'), +(26, 1, NULL, NULL, '2010-11-02 08:52:37', '2011-01-11 14:41:43', 'KG', 'test', NULL, NULL, NULL, 'Gazo', 'Kevin', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'kgazo@akteos.fr', NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, 'a77d7323-0c45-455f-abba-d89c1d7a61b8'), +(27, 1, NULL, NULL, NULL, '2011-08-31 14:17:28', 'SIE', 'test', NULL, NULL, NULL, 'Admin', 'Administrateur', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, 'c8427b3c-039f-102c-b0fb-001aa0790251'), +(28, 1, NULL, NULL, NULL, '2010-09-08 14:51:03', 'PG', 'test', NULL, NULL, NULL, 'Yon', 'Anne-Catherine', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'acyon@akteos.fr', NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, 'c8428000-039f-102c-b0fb-001aa0790251'), +(29, 1, NULL, NULL, NULL, '2010-09-08 14:51:23', 'VH', 'test', NULL, NULL, NULL, 'Sok', 'Many', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'msok@akteos.fr', NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, 'c84280e6-039f-102c-b0fb-001aa0790251'), +(30, 1, NULL, NULL, NULL, '2012-02-08 09:49:39', 'BC', 'test', NULL, NULL, NULL, 'de Carné', 'Bérengère', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'bdecarne@akteos.fr', NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, 'c8428154-039f-102c-b0fb-001aa0790251'), +(31, 1, NULL, NULL, NULL, '2010-04-14 17:36:57', 'JS', 'test', NULL, NULL, NULL, 'Slowikowska', 'Joanna', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, 'c84281b8-039f-102c-b0fb-001aa0790251'), +(32, 1, NULL, NULL, NULL, '2010-04-14 17:36:48', 'MM', 'test', NULL, NULL, NULL, 'Merchiakh', 'Marie', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, 'c842828a-039f-102c-b0fb-001aa0790251'), +(33, 1, NULL, NULL, NULL, '2010-04-14 17:37:02', 'JL', 'test', NULL, NULL, NULL, 'Legodec', 'Julie', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, 'c842835c-039f-102c-b0fb-001aa0790251'), +(34, 1, NULL, NULL, NULL, '2010-04-14 17:40:14', 'NB', 'test', NULL, NULL, NULL, 'Nadia', 'Ben Bella', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, 'c842842e-039f-102c-b0fb-001aa0790251'), +(35, 1, NULL, NULL, NULL, '2011-08-31 14:17:40', 'TC', 'test', NULL, NULL, NULL, 'Cordalija', 'Tima', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'tcordalija@akteos.fr', NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, 'c8428492-039f-102c-b0fb-001aa0790251'), +(36, 1, NULL, NULL, '2009-10-19 12:43:43', '2010-04-14 17:36:31', 'RC', 'test', NULL, NULL, NULL, 'Canet', 'Romain', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, 'ea94a3e2-4aac-4686-bfdb-45d620a7d23f'), +(37, 1, NULL, NULL, '2012-06-10 16:23:15', '2012-07-26 13:21:53', 'MG', 'test', NULL, NULL, NULL, 'Gripon', 'Mathieu', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'mgripon@akteos.fr', NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, 'fffcb945-ee3f-4ac1-861d-bd33112cf57b'); + + +--Insert inactive user + +/* + +UPDATE llx_user as doluser, sf_user as stuser SET doluser.import_key=stuser.id where doluser.email=stuser.email_address; +INSERT INTO llx_user ( +entity, +ref_ext, +ref_int, +datec, +tms, +login, +pass, +pass_crypted, +pass_temp, +civilite, +lastname, +firstname, +address, +zip, +town, +fk_state, +fk_country, +job, +office_phone, +office_fax, +user_mobile, +email, +signature, +admin, +module_comm, +module_compta, +fk_societe, +fk_socpeople, +fk_member, +fk_user, +note, +datelastlogin, +datepreviouslogin, +egroupware_id, +ldap_sid, +openid, +statut, +photo, +lang, +color, +import_key) +SELECT DISTINCT +1,--entity, +sf_user.external_ref, --ref_ext, +NULL, --ref_int, +sf_user.created, --datec, +sf_user.modified, --tms, +sf_user.login, --login, +'test', --pass, +NULL, --pass_crypted, +NULL, --pass_temp, +NULL, --civilite, +sf_user.lastname, --lastname, +sf_user.firstname,--firstname, +NULL, --address, +NULL, --zip, +NULL, --town, +NULL, --fk_state, +NULL, --fk_country, +NULL, --job, +NULL, --office_phone, +NULL, --office_fax, +NULL, --user_mobile, +TRIM(sf_user.email_address), --email, +NULL, --signature, +0, --admin, +0, --module_comm, +0, --module_compta, +NULL, --fk_societe, +NULL, --fk_socpeople, +NULL, --fk_member, +NULL, --fk_user, +NULL, --note, +NULL, --datelastlogin, +NULL, --datepreviouslogin, +NULL, --egroupware_id, +NULL, --ldap_sid, +NULL, --openid, +0, --statut, +NULL, --photo, +NULL, --lang, +NULL, --color, +sf_user.id -- import_key +FROM sf_user +WHERE sf_user.state='disabled'; +*/ + + + +--Import Category + +TRUNCATE TABLE `llx_categorie`; +INSERT INTO `llx_categorie` (`rowid`, `entity`, `fk_parent`, `label`, `type`, `description`, `fk_soc`, `visible`, `import_key`) VALUES +(1, 1, 0, 'Produit', 0, 'Tous les produits vendus par Akteos, à l'exception des frais', NULL, 0, NULL), +(3, 1, 0, 'Frais', 0, 'Tous les frais générés par les interventions d'Akteos (dépacement, hébergement, restauration, salle,...) à l'exception des consultants, et refacturés aux clients (en général à l'euro près).', NULL, 0, NULL), +(6, 1, 1, 'Produit pédagogique', 0, 'Tous les produits en rapport avec les formations à prendre en considération pour le Bilan Pédagogique et Financier', NULL, 0, NULL), +(7, 1, 1, 'Produit non pédagogique', 0, 'Tous les produits qui ne sont pas considérés comme de la formation et ne sont pas comptabilisés dans le Bilan Pédagogique et Financier', NULL, 0, NULL), +(8, 1, 6, 'Conception', 0, '', NULL, 0, NULL), +(9, 1, 6, 'Intervention', 0, '', NULL, 0, NULL), +(10, 1, 6, 'Outil pédagogique', 0, '', NULL, 0, NULL), +(30, 1, 31, 'Particulier', 4, '', NULL, 0, NULL), +(12, 1, 0, 'Consultant', 1, '', NULL, 0, NULL), +(15, 1, 12, 'Consultant Etranger', 1, '', NULL, 0, NULL), +(16, 1, 12, 'Consultant France', 1, '', NULL, 0, NULL), +(17, 1, 12, 'Consultant Suppléant', 1, '', NULL, 0, NULL), +(28, 1, 31, 'Salarié bénéficiant d''un financement par l''employeur', 4, '', NULL, 0, NULL), +(21, 1, 0, 'Logistique', 1, 'Hotel, Restaurant, Agence de voyage, Imprimeur,...', NULL, 0, NULL), +(22, 1, 0, 'Communication', 1, '', NULL, 0, NULL), +(23, 1, 1, 'Produit HT', 0, '', NULL, 0, NULL), +(24, 1, 6, 'On Line', 0, '', NULL, 0, NULL), +(25, 1, 3, 'Frais HT', 0, '', NULL, 0, NULL), +(29, 1, 31, 'Demandeur d''emploi', 4, '', NULL, 0, NULL), +(31, 1, 0, 'Participant', 4, '', NULL, 0, NULL), +(32, 1, 0, 'Consultant', 4, '', NULL, 0, NULL), +(33, 1, 32, 'Travailleur indépendant', 4, '', NULL, 0, NULL), +(34, 1, 32, 'CDI', 4, '', NULL, 0, NULL), +(35, 1, 32, 'CDD', 4, '', NULL, 0, NULL), +(36, 1, 32, 'Formateur occasionnel', 4, '', NULL, 0, NULL), +(37, 1, 32, 'Bénévole', 4, '', NULL, 0, NULL); + + + +TRUNCATE TABLE llx_c_typent; +INSERT INTO `llx_c_typent` (`id`, `code`, `libelle`, `active`, `module`) VALUES +(0, 'TE_UNKNOWN', '-', 1, NULL), +(1, 'TE_STARTUP', 'Start-up', 0, NULL), +(2, 'TE_GROUP', 'Entreprise française', 0, NULL), +(3, 'TE_PAY', 'Payeur', 1, NULL), +(4, 'TE_SMALL', 'TPE', 0, NULL), +(5, 'TE_ADMIN', 'Pouvoirs publics', 1, NULL), +(6, 'TE_WHOLE', 'Grossiste', 0, NULL), +(7, 'TE_RETAIL', 'Revendeur', 0, NULL), +(8, 'TE_PRIVATE', 'Particulier', 1, NULL), +(100, 'TE_OTHER', 'Autres', 0, NULL), +(101, 'TE_ENT_FR', 'Entreprise française', 1, NULL), +(102, 'TE_ENT_ET', 'Entreprise étrangère', 1, NULL), +(103, 'TE_OPCA', 'OPCA', 1, NULL), +(104, 'TE_FORMATION', 'Prestataire de formation', 1, NULL); + + +--Insert customer typed account into thridparty +TRUNCATE TABLE llx_societe; +INSERT INTO llx_societe(nom, +entity, +ref_ext, +ref_int, +statut, +parent, +tms, +datec, +datea, +status, +code_client, +code_fournisseur, +code_compta, +code_compta_fournisseur, +address, +zip, +town, +fk_departement, +fk_pays, +phone, +fax, +url, +email, +fk_effectif, +fk_typent, +fk_forme_juridique, +fk_currency, +siren, +siret, +ape, +idprof4, +idprof5, +idprof6, +tva_intra, +capital, +fk_stcomm, +note_private, +note_public, +prefix_comm, +client, +fournisseur, +supplier_account, +fk_prospectlevel, +customer_bad, +customer_rate, +supplier_rate, + fk_user_creat, +fk_user_modif, +remise_client, +mode_reglement, +cond_reglement, +tva_assuj, +localtax1_assuj, +localtax2_assuj, +barcode, +fk_barcode_type, +price_level, +default_lang, +logo, +canvas, +import_key) +SELECT DISTINCT act.nom, + 1, + act.accountcode, + act.leadcode, + 0, + NULL, + act.modified, + act.created, + act.created, + act.disabled, + act.accountcode, + NULL, + LEFT(leg.piece,3), +NULL, +CONCAT_WS(' ',act.adresse, act.adresse2), +act.codepostal, +act.ville, +NULL, +act.pays, +act.tel, +act.fax, +act.siteweb, +TRIM(act.email), +NULL, +0, +NULL, +0, +NULL, +act.siret, +ref_sect.secteur, +NULL, +NULL, +NULL, +LEFT(act.tvaintracom,20), +NULL, +0, +act.remarque, +NULL, +NULL, +act.client, +0, +NULL, +NULL, +0, +0, +0, +IFNULL(usercrea.rowid,1), +IFNULL(usermod.rowid,1), +0, +modpay.id, +payterm.rowid, +act.tva, +NULL, +NULL, +NULL, +0, +NULL, +NULL, +NULL, +NULL, +act.id +FROM thirdparty as so +INNER JOIN account as act ON so.account_id=act.id AND so.type='account' +LEFT OUTER JOIN legacy_mvt as leg ON so.id=leg.thirdparty_id +LEFT OUTER JOIN ref_sect ON ref_sect.code=act.secteur +LEFT OUTER JOIN llx_c_paiement as modpay ON modpay.code = act.modreg +LEFT OUTER JOIN llx_c_payment_term as payterm ON payterm.nbjour = act.jourreg AND payterm.active=1 +LEFT OUTER JOIN sf_user as usercreast ON usercreast.id=act.created_by_sf_user_id +LEFT OUTER JOIN llx_user as usercrea ON usercreast.email_address=usercrea.email +LEFT OUTER JOIN sf_user as usermodst ON usermodst.id=act.modified_by_sf_user_id +LEFT OUTER JOIN llx_user as usermod ON usermodst.email_address=usermod.email +WHERE act.type IN ('ENT','EE','OP','PAY','PP','IND', 'PAR'); + +--Import supplier +INSERT INTO llx_societe(nom, +entity, +ref_ext, +ref_int, +statut, +parent, +tms, +datec, +datea, +status, +code_client, +code_fournisseur, +code_compta, +code_compta_fournisseur, +address, +zip, +town, +fk_departement, +fk_pays, +phone, +fax, +url, +email, +fk_effectif, +fk_typent, +fk_forme_juridique, +fk_currency, +siren, +siret, +ape, +idprof4, +idprof5, +idprof6, +tva_intra, +capital, +fk_stcomm, +note_private, +note_public, +prefix_comm, +client, +fournisseur, +supplier_account, +fk_prospectlevel, +customer_bad, +customer_rate, +supplier_rate, + fk_user_creat, +fk_user_modif, +remise_client, +mode_reglement, +cond_reglement, +tva_assuj, +localtax1_assuj, +localtax2_assuj, +barcode, +fk_barcode_type, +price_level, +default_lang, +logo, +canvas, +import_key) +SELECT DISTINCT act.nom, + 1, + act.accountcode, + act.leadcode, + 0, + NULL, + act.modified, + act.created, + act.created, + act.disabled, + act.accountcode, + NULL, + LEFT(leg.piece,3), +NULL, +CONCAT_WS(' ',act.adresse, act.adresse2), +act.codepostal, +act.ville, +NULL, +act.pays, +act.tel, +act.fax, +act.siteweb, +TRIM(act.email), +NULL, +0, +NULL, +0, +NULL, +act.siret, +ref_sect.secteur, +NULL, +NULL, +NULL, +LEFT(act.tvaintracom,20), +NULL, +0, +act.remarque, +NULL, +NULL, +0, +1, +NULL, +NULL, +0, +0, +0, +IFNULL(usercrea.rowid,1), +IFNULL(usermod.rowid,1), +0, +modpay.id, +payterm.rowid, +act.tva, +NULL, +NULL, +NULL, +0, +NULL, +NULL, +NULL, +NULL, +act.id +FROM thirdparty as so +INNER JOIN account as act ON so.account_id=act.id AND so.type='account' +LEFT OUTER JOIN legacy_mvt as leg ON so.id=leg.thirdparty_id +LEFT OUTER JOIN ref_sect ON ref_sect.code=act.secteur +LEFT OUTER JOIN llx_c_paiement as modpay ON modpay.code = act.modreg +LEFT OUTER JOIN llx_c_payment_term as payterm ON payterm.nbjour = act.jourreg AND payterm.active=1 +LEFT OUTER JOIN sf_user as usercreast ON usercreast.id=act.created_by_sf_user_id +LEFT OUTER JOIN llx_user as usercrea ON usercreast.email_address=usercrea.email +LEFT OUTER JOIN sf_user as usermodst ON usermodst.id=act.modified_by_sf_user_id +LEFT OUTER JOIN llx_user as usermod ON usermodst.email_address=usermod.email +WHERE act.type='FOU'; + +--Insert prospect +INSERT INTO llx_societe(nom, +entity, +ref_ext, +ref_int, +statut, +parent, +tms, +datec, +datea, +status, +code_client, +code_fournisseur, +code_compta, +code_compta_fournisseur, +address, +zip, +town, +fk_departement, +fk_pays, +phone, +fax, +url, +email, +fk_effectif, +fk_typent, +fk_forme_juridique, +fk_currency, +siren, +siret, +ape, +idprof4, +idprof5, +idprof6, +tva_intra, +capital, +fk_stcomm, +note_private, +note_public, +prefix_comm, +client, +fournisseur, +supplier_account, +fk_prospectlevel, +customer_bad, +customer_rate, +supplier_rate, + fk_user_creat, +fk_user_modif, +remise_client, +mode_reglement, +cond_reglement, +tva_assuj, +localtax1_assuj, +localtax2_assuj, +barcode, +fk_barcode_type, +price_level, +default_lang, +logo, +canvas, +import_key) +SELECT DISTINCT act.nom, + 1, + act.accountcode, + act.leadcode, + 0, + NULL, + act.modified, + act.created, + act.created, + act.disabled, + act.accountcode, + NULL, + NULL, +NULL, +CONCAT_WS(' ',act.adresse, act.adresse2), +act.codepostal, +act.ville, +NULL, +act.pays, +act.tel, +act.fax, +act.siteweb, +TRIM(act.email), +NULL, +0, +NULL, +0, +NULL, +act.siret, +ref_sect.secteur, +NULL, +NULL, +NULL, +LEFT(act.tvaintracom,20), +NULL, +0, +act.remarque, +NULL, +NULL, +2, +0, +NULL, +NULL, +0, +0, +0, +IFNULL(usercrea.rowid,1), +IFNULL(usermod.rowid,1), +0, +modpay.id, +payterm.rowid, +act.tva, +NULL, +NULL, +NULL, +0, +NULL, +NULL, +NULL, +NULL, +act.id +FROM account as act +LEFT OUTER JOIN ref_sect ON ref_sect.code=act.secteur +LEFT OUTER JOIN llx_c_paiement as modpay ON modpay.code = act.modreg +LEFT OUTER JOIN llx_c_payment_term as payterm ON payterm.nbjour = act.jourreg AND payterm.active=1 +LEFT OUTER JOIN sf_user as usercreast ON usercreast.id=act.created_by_sf_user_id +LEFT OUTER JOIN llx_user as usercrea ON usercreast.email_address=usercrea.email +LEFT OUTER JOIN sf_user as usermodst ON usermodst.id=act.modified_by_sf_user_id +LEFT OUTER JOIN llx_user as usermod ON usermodst.email_address=usermod.email +WHERE act.id NOT IN (SELECT account_id from thirdparty WHERE account_id IS NOT NULL ) +AND act.type IN ('ENT','EE','OP','PAY','PP','IND', 'PAR'); + + +UPDATE llx_societe SET fk_typent=101 WHERE import_key IN (SELECT id from account where type='ENT'); +UPDATE llx_societe SET fk_typent=102 WHERE import_key IN (SELECT id from account where type='EE'); +UPDATE llx_societe SET fk_typent=103 WHERE import_key IN (SELECT id from account where type='OP'); +UPDATE llx_societe SET fk_typent=3 WHERE import_key IN (SELECT id from account where type='PAY'); +UPDATE llx_societe SET fk_typent=5 WHERE import_key IN (SELECT id from account where type='PP'); +UPDATE llx_societe SET fk_typent=8 WHERE import_key IN (SELECT id from account where type='IND'); + +UPDATE llx_societe SET fk_prospectlevel='PL_HIGH' WHERE import_key IN (SELECT id from account where cycle_vie='01'); +UPDATE llx_societe SET fk_prospectlevel='PL_MEDIUM' WHERE import_key IN (SELECT id from account where cycle_vie='02'); +UPDATE llx_societe SET fk_prospectlevel='PL_LOW' WHERE import_key IN (SELECT id from account where cycle_vie='03'); +UPDATE llx_societe SET fk_prospectlevel='PL_NONE' WHERE import_key IN (SELECT id from account where cycle_vie='04'); +UPDATE llx_societe SET fk_prospectlevel='PL_NONE' WHERE import_key IN (SELECT id from account where cycle_vie='05'); + + + +INSERT INTO llx_societe_extrafields (fk_object,ts_secteur,ts_prospection) +SELECT +llx_societe.rowid, +act.secteur, +CASE WHEN (act.approche='MM') THEN (select rowid from llx_user where login='jandrian') + WHEN (act.approche='NAD') THEN (select rowid from llx_user where login='dnguyen') + WHEN (act.approche='MC') THEN (select rowid from llx_user where login='mclement') + ELSE null END +FROM account as act INNER JOIN llx_societe ON llx_societe.import_key=act.id AND act.secteur IS NOT NULL; + +UPDATE llx_societe_extrafields SET ts_secteur='AERO' WHERE ts_secteur IN ('09'); +UPDATE llx_societe_extrafields SET ts_secteur='ALIM' WHERE ts_secteur IN ('23'); +UPDATE llx_societe_extrafields SET ts_secteur='AUTO' WHERE ts_secteur IN ('18'); +UPDATE llx_societe_extrafields SET ts_secteur='BTP' WHERE ts_secteur IN ('31', '08'); +UPDATE llx_societe_extrafields SET ts_secteur='CHIM' WHERE ts_secteur IN ('21', '38', '40'); +UPDATE llx_societe_extrafields SET ts_secteur='CONS' WHERE ts_secteur IN ('26', '71'); +UPDATE llx_societe_extrafields SET ts_secteur='CONSO' WHERE ts_secteur IN ('04'); +UPDATE llx_societe_extrafields SET ts_secteur='DISTRI' WHERE ts_secteur IN ('10'); +UPDATE llx_societe_extrafields SET ts_secteur='EDUC' WHERE ts_secteur IN ('29'); +UPDATE llx_societe_extrafields SET ts_secteur='ENERG' WHERE ts_secteur IN ('15', '33', '36', '41'); +UPDATE llx_societe_extrafields SET ts_secteur='FIN' WHERE ts_secteur IN ('06', '42'); +UPDATE llx_societe_extrafields SET ts_secteur='INGEN' WHERE ts_secteur IN ('13', '37'); +UPDATE llx_societe_extrafields SET ts_secteur='LUX' WHERE ts_secteur IN ('32'); +UPDATE llx_societe_extrafields SET ts_secteur='PUB' WHERE ts_secteur IN ('12'); +UPDATE llx_societe_extrafields SET ts_secteur='SP' WHERE ts_secteur IN ('02'); +UPDATE llx_societe_extrafields SET ts_secteur='TIC' WHERE ts_secteur IN ('22', '28'); +UPDATE llx_societe_extrafields SET ts_secteur='TOURISM' WHERE ts_secteur IN ('01'); +UPDATE llx_societe_extrafields SET ts_secteur='TRANSP' WHERE ts_secteur IN ('30'); +UPDATE llx_societe_extrafields SET ts_secteur=NULL WHERE ts_secteur IN ('00', '05', '27', '34', '35', '39', '43'); + + + + + +TRUNCATE TABLE llx_socpeople; + +--Insert Contact of thirdparty +INSERT INTO llx_socpeople (datec, +tms, +fk_soc, +entity, +ref_ext, +civilite, +lastname, +firstname, +address, +zip, +town, +fk_departement, +fk_pays, +birthday, +poste, +phone, +phone_perso, +phone_mobile, +fax, +email, +jabberid, +no_email, +priv, +fk_user_creat, +fk_user_modif, +note_private, +note_public, +default_lang, +canvas, +import_key, +statut) +SELECT +contact.created, +contact.modified, +soc.rowid, +1, +contact.external_ref, +civ.code, +contact.nom, +contact.prenom, +CONCAT_WS(' ',contact.adresse, contact.adresse2), +contact.codepostal, +contact.ville, +NULL, +soc.fk_pays, +NULL, +LEFT(contact.vendredi, 80),--fonc.libelle, +contact.tel, +NULL, +contact.portable, +contact.fax, +TRIM(contact.email), +NULL, +0, +0, +IFNULL(usercrea.rowid,1), +IFNULL(usermod.rowid,1), +CONCAT_WS(' ',contact.remarque, contact.mardi), +NULL, +NULL, +NULL, +contact.id, +CASE WHEN (contact.disabled=1) THEN 0 ELSE 1 END +FROM contact +INNER JOIN account ON contact.account_id = account.id +INNER JOIN llx_societe as soc ON soc.import_key=account.id +LEFT OUTER JOIN llx_c_civilite as civ ON civ.code=contact.titre +LEFT OUTER JOIN ref_fonc as fonc ON fonc.fonction=contact.fonction +LEFT OUTER JOIN sf_user as usercreast ON usercreast.id=contact.created_by_sf_user_id +LEFT OUTER JOIN llx_user as usercrea ON usercreast.email_address=usercrea.email +LEFT OUTER JOIN sf_user as usermodst ON usermodst.id=contact.modified_by_sf_user_id +LEFT OUTER JOIN llx_user as usermod ON usermodst.email_address=usermod.email +WHERE contact.nom IS NOT NULL AND TRIM(contact.nom)<>''; + + +INSERT INTO llx_socpeople_extrafields (fk_object,ct_anglais,ct_service, ct_magellan) +SELECT cont.rowid, +CASE WHEN (contact.samedi='EN') THEN 1 ELSE 0 END, +fonc.fonction, +CASE WHEN (contact.lundi='Magellan' OR contact.lundi='Cercle Magellan') THEN 1 ELSE 0 END +FROM llx_socpeople as cont +INNER JOIN contact ON cont.import_key=contact.id +LEFT OUTER JOIN ref_fonc as fonc ON fonc.fonction=contact.fonction; + +UPDATE llx_socpeople_extrafields SET ct_service='DMA' WHERE ct_service='CDP'; +UPDATE llx_socpeople_extrafields SET ct_service='AUT' WHERE ct_service='CF'; +UPDATE llx_socpeople_extrafields SET ct_service='DFI' WHERE ct_service='COM'; +UPDATE llx_socpeople_extrafields SET ct_service='DEX' WHERE ct_service='DDI'; +UPDATE llx_socpeople_extrafields SET ct_service='DG' WHERE ct_service='DGA'; +UPDATE llx_socpeople_extrafields SET ct_service='DG' WHERE ct_service='DGN'; +UPDATE llx_socpeople_extrafields SET ct_service='DRD' WHERE ct_service='DIN'; +UPDATE llx_socpeople_extrafields SET ct_service='DJU' WHERE ct_service='DJ'; +UPDATE llx_socpeople_extrafields SET ct_service='AUT' WHERE ct_service='DMK'; +UPDATE llx_socpeople_extrafields SET ct_service='DBU' WHERE ct_service='DOP'; +UPDATE llx_socpeople_extrafields SET ct_service=null WHERE ct_service='DPE'; +UPDATE llx_socpeople_extrafields SET ct_service='DBU' WHERE ct_service='DRE'; +UPDATE llx_socpeople_extrafields SET ct_service='DG' WHERE ct_service='DST'; +UPDATE llx_socpeople_extrafields SET ct_service=null WHERE ct_service='DTC'; +UPDATE llx_socpeople_extrafields SET ct_service='AUT' WHERE ct_service='GEN'; +UPDATE llx_socpeople_extrafields SET ct_service='RMI' WHERE ct_service='INT'; +UPDATE llx_socpeople_extrafields SET ct_service='RGC' WHERE ct_service='MAG'; +UPDATE llx_socpeople_extrafields SET ct_service='AUT' WHERE ct_service='PAR'; +UPDATE llx_socpeople_extrafields SET ct_service='DG' WHERE ct_service='PDG'; +UPDATE llx_socpeople_extrafields SET ct_service='DG' WHERE ct_service='PRE'; +UPDATE llx_socpeople_extrafields SET ct_service='AUT' WHERE ct_service='RDD'; +UPDATE llx_socpeople_extrafields SET ct_service='RDI' WHERE ct_service='RDI'; +UPDATE llx_socpeople_extrafields SET ct_service='RRH' WHERE ct_service='RDP'; +UPDATE llx_socpeople_extrafields SET ct_service='DFO' WHERE ct_service='REL'; +UPDATE llx_socpeople_extrafields SET ct_service='RRH' WHERE ct_service='REP'; +UPDATE llx_socpeople_extrafields SET ct_service='RMI' WHERE ct_service='REX'; +UPDATE llx_socpeople_extrafields SET ct_service='RGC' WHERE ct_service='RGC'; +UPDATE llx_socpeople_extrafields SET ct_service='RMI' WHERE ct_service='RIM'; +UPDATE llx_socpeople_extrafields SET ct_service='DFI' WHERE ct_service='RPA'; +UPDATE llx_socpeople_extrafields SET ct_service='RRH' WHERE ct_service='RRC'; +UPDATE llx_socpeople_extrafields SET ct_service='ASS' WHERE ct_service='SEC'; +UPDATE llx_socpeople_extrafields SET ct_service='DG' WHERE ct_service='SGN'; +UPDATE llx_socpeople_extrafields SET ct_service='ASS' WHERE ct_service='STA'; +UPDATE llx_socpeople_extrafields SET ct_service='DG' WHERE ct_service='VPR'; + + + + +--update commercial on customer +TRUNCATE TABLE llx_societe_commerciaux; + +INSERT INTO llx_societe_commerciaux (fk_soc,fk_user) +SELECT soc.rowid,usr.rowid +FROM llx_societe as soc +INNER JOIN account ON soc.import_key=account.id +INNER JOIN com ON com.id=account.com_id +INNER JOIN llx_user as usr ON com.email=usr.email; + +--Update Mother company +UPDATE llx_societe as soc,account as child, account as parent,llx_societe as socparent +SET soc.parent=socparent.rowid, +soc.tms=soc.tms +WHERE soc.import_key=child.id +AND child.groupe_account_id=parent.id +AND socparent.import_key=parent.id +AND child.groupe_account_id<>child.id; + +--Create asktoes as thirdparty to import place/room +INSERT INTO llx_societe (nom,entity,tms,datec,datea,status,address,zip,town,fk_pays,client,fournisseur,import_key) +VALUES ('Akteos',1,NOW(),NOW(),NOW(),1,'6 rue du quatre septembre','92130','ISSY LES MOULINEAUX',1,0,0,'akteos'); + +--Create asktoes as thirdparty to import place/room +INSERT INTO llx_societe (nom,entity,tms,datec,datea,status,address,zip,town,fk_pays,client,fournisseur,import_key) +VALUES ('Inconnue',1,NOW(),NOW(),NOW(),1,'6 rue du quatre septembre','92130','ISSY LES MOULINEAUX',1,0,0,'inconnue'); + +--import place into agefodd +TRUNCATE TABLE llx_agefodd_place; +INSERT INTO llx_agefodd_place ( +ref_interne, +adresse, +cp, +ville, +fk_pays, +tel, +fk_societe, +notes, +acces_site, +note1, +archive, +fk_reg_interieur, +fk_user_author, +datec, +fk_user_mod, +tms, +entity, +import_key) +SELECT +CONCAT_WS('-',room.code, room.adr1), --ref_interne, +room.adr2, --adresse, +room.cp, --cp +room.ville, +1, --fk_pays, +NULL, --tel, +soc.rowid, --fk_societe, +NULL, --notes, +room.adr3, --acces_site, +NULL, --note1, +0, --archive, +NULL, --fk_reg_interieur, +IFNULL(usercrea.rowid,1), --fk_user_author +NOW(), --datec, +IFNULL(usermod.rowid,1), --fk_user_mod, +room.modified,--tms, +1, --entity +room.id -- importkey +FROM (room +, llx_societe as soc) +LEFT OUTER JOIN sf_user as usercreast ON usercreast.id=room.created_by_sf_user_id +LEFT OUTER JOIN llx_user as usercrea ON usercreast.email_address=usercrea.email +LEFT OUTER JOIN sf_user as usermodst ON usermodst.id=room.modified_by_sf_user_id +LEFT OUTER JOIN llx_user as usermod ON usermodst.email_address=usermod.email +WHERE soc.import_key='inconnue' +AND room.code NOT LIKE 'Z9999%'; + +---Vérification manuel si +sieur matires par stage +/* +SELECT stage_id from trainingprogramdiscipline +GROUP BY stage_id HAVING count(stage_id)>1 + +DELETE fROM trainingprogramdiscipline WHERE stage_id='5d9ef8bb-a906-45d6-a39e-7cbc0c546a07' AND matiere='02MIC' +*/ + +--import analytics training category +TRUNCATE TABLE llx_agefodd_formation_catalogue_type; +INSERT INTO llx_agefodd_formation_catalogue_type (code,intitule,sort,active,tms) +SELECT DISTINCT analyt.code, +analyt.intitule, +0, +CASE WHEN (analyt.intitule='NE PAS UTILISER') THEN 0 ELSE 1 END, +NOW() +FROM stage +INNER JOIN analyt ON stage.analyt=analyt.code +ORDER BY analyt.intitule; + +UPDATE llx_agefodd_formation_catalogue_type SET sort=rowid; + +--import training catalogue +TRUNCATE TABLE llx_agefodd_formation_catalogue; +INSERT INTO llx_agefodd_formation_catalogue ( +ref, +ref_interne, +entity, +intitule, +duree, +public, +methode, +prerequis, +but, +programme, +note1, +note2, +archive, +fk_user_author, +datec, +fk_user_mod, +note_private, +note_public, +fk_product, +nb_subscribe_min, +tms, +import_key, +fk_c_category) +SELECT +stage.numstage,--ref +stage.numstage, --ref_interne +1, --entity +CASE WHEN (TRIM(stage.intlong)='') THEN stage.intitule ELSE TRIM(REPLACE(stage.intlong,'Formation :','')) END ,--intitule +IFNULL(stage.nbhr,0), --duree +typcours.intitule, --public +NULL, --methode +NULL, --prerequis +matiere.intitule, --but +NULL, --programme, +matiere.memo, --note1, +NULL, --note2, +stage.disabled, --archive, +IFNULL(usercrea.rowid,1), --fk_user_author +IFNULL(stage.created,NOW()), --datec, +IFNULL(usermod.rowid,1), --fk_user_mod, +NULL, --note_private, +NULL, --note_public, +NULL, --fk_product, +NULL, --nb_subscribe_min, +stage.modified, --tms +stage.id, +cattype.rowid +FROM stage +INNER JOIN typcours ON typcours.code=stage.typcours +LEFT OUTER JOIN trainingprogramdiscipline as but ON but.stage_id=stage.id +LEFT OUTER JOIN matiere ON matiere.matiere=but.matiere +LEFT OUTER JOIN sf_user as usercreast ON usercreast.id=stage.created_by_sf_user_id +LEFT OUTER JOIN llx_user as usercrea ON usercreast.email_address=usercrea.email +LEFT OUTER JOIN sf_user as usermodst ON usermodst.id=stage.modified_by_sf_user_id +LEFT OUTER JOIN llx_user as usermod ON usermodst.email_address=usermod.email +LEFT OUTER JOIN llx_agefodd_formation_catalogue_type as cattype ON cattype.code=stage.analyt +WHERE typcours.intitule <> 'NE PAS UTILISER'; + +UPDATE llx_agefodd_formation_catalogue SET ref=CONCAT_WS('','FOR_', date_format(datec,'%y%m'),'-', LPAD(rowid,4,'0')); + + +TRUNCATE TABLE `llx_agefodd_session_admlevel`; +INSERT INTO `llx_agefodd_session_admlevel` (`rowid`, `level_rank`, `fk_parent_level`, `indice`, `intitule`, `delais_alerte`, `fk_user_author`, `datec`, `fk_user_mod`, `tms`) VALUES +(18, 0, 0, 100, 'CONSULTANT', -15, 1, '2013-11-19 21:53:30', 1, '2013-11-19 20:54:28'), +(19, 1, 18, 101, 'Réservation consultant', -15, 1, '2013-11-19 21:53:43', 1, '2013-11-19 20:54:23'), +(20, 1, 18, 102, 'Confirmation consultant envoyée', -15, 1, '2013-11-19 21:54:18', 1, '2013-11-19 20:54:18'), +(21, 1, 18, 103, 'Support prêt ou imprimé', -1, 1, '2013-11-19 21:54:45', 1, '2013-11-19 20:54:45'), +(22, 1, 18, 104, 'Feuilles d''émargement et d''évaluation éditées', -1, 1, '2013-11-19 21:54:57', 1, '2013-11-19 20:54:57'), +(23, 0, 0, 200, 'LOGISTIQUE', -15, 1, '2013-11-19 21:55:10', 1, '2013-11-19 20:55:10'), +(24, 1, 23, 201, 'Déplacements organisés', -15, 1, '2013-11-19 21:55:21', 1, '2013-11-19 20:55:21'), +(25, 1, 23, 202, 'Réservation salle et/ou repas (option)', -15, 1, '2013-11-19 21:55:32', 1, '2013-11-19 20:55:32'), +(26, 1, 23, 203, 'Réservation salle et/ou repas (confirmée)', -15, 1, '2013-11-19 21:55:44', 1, '2013-11-19 20:55:44'), +(27, 0, 0, 300, 'CLIENT', -15, 1, '2013-11-19 21:55:56', 1, '2013-11-19 20:55:56'), +(28, 1, 27, 301, 'Date confirmée', -15, 1, '2013-11-19 21:56:08', 1, '2013-11-19 20:56:08'), +(29, 1, 27, 302, 'Lieu confirmé', -15, 1, '2013-11-19 21:56:18', 1, '2013-11-19 20:56:18'), +(30, 1, 27, 303, 'Convention envoyée', -15, 1, '2013-11-19 21:56:33', 1, '2013-11-19 20:56:33'), +(31, 1, 27, 304, 'Convention retournée', -10, 1, '2013-11-19 21:56:43', 1, '2013-11-19 20:56:43'), +(32, 0, 0, 400, 'PARTICIPANT', -15, 1, '2013-11-19 21:56:53', 1, '2013-11-19 20:56:53'), +(33, 1, 32, 401, 'Convocation participant envoyée (inscriptions RN)', -15, 1, '2013-11-19 21:57:07', 1, '2013-11-19 20:57:07'), +(34, 1, 32, 402, 'Support et/ou attestation en ligne', -15, 1, '2013-11-19 21:57:17', 1, '2013-11-19 20:57:17'), +(35, 0, 0, 500, 'FACTURE FOURNISSEUR (TRANSMISE ET SAISIE)', 5, 1, '2013-11-19 21:57:32', 1, '2013-11-19 20:57:32'), +(36, 1, 35, 501, 'Agence de voyage', 5, 1, '2013-11-19 21:57:42', 1, '2013-11-19 20:57:42'), +(37, 1, 35, 502, 'Consultant', 5, 1, '2013-11-19 21:57:52', 1, '2013-11-19 20:57:52'), +(38, 1, 35, 503, 'Frais techniques', 5, 1, '2013-11-19 21:58:02', 1, '2013-11-19 20:58:02'), +(39, 0, 0, 600, 'SESSION CLOTUREE', 0, 1, '2013-11-19 21:58:14', 1, '2013-11-19 20:58:14'), +(40, 1, 39, 601, 'Feuilles d''émargement et d''évaluation scannées', 5, 1, '2013-11-19 21:58:35', 1, '2013-11-19 20:58:35'), +(41, 1, 39, 602, 'Feuilles d''émargement et d''évaluation envoyées', 5, 1, '2013-11-19 21:58:57', 1, '2013-11-19 20:58:57'), +(42, 1, 39, 603, 'Facture client envoyée', 5, 1, '2013-11-19 21:59:10', 1, '2013-11-19 20:59:10'); + + + + +INSERT INTO llx_agefodd_training_admlevel(fk_agefodd_training_admlevel,fk_training,level_rank,fk_parent_level,indice,intitule,delais_alerte,fk_user_author,datec,fk_user_mod) +SELECT DISTINCT seesadm.rowid,training.rowid, seesadm.level_rank, seesadm.fk_parent_level,seesadm.indice, seesadm.intitule,seesadm.delais_alerte,seesadm.fk_user_author,seesadm.datec,seesadm.fk_user_mod +FROM llx_agefodd_session_admlevel as seesadm, llx_agefodd_formation_catalogue as training; + +UPDATE llx_agefodd_training_admlevel as ori, llx_agefodd_training_admlevel as upd SET upd.fk_parent_level=ori.rowid WHERE upd.fk_parent_level=ori.fk_agefodd_training_admlevel AND upd.level_rank<>0 AND upd.fk_training=ori.fk_training; + +--Insert domaine extrafield +INSERT INTO llx_agefodd_formation_catalogue_extrafields(fk_object, cd_domaine) +SELECT llx_agefodd_formation_catalogue.rowid, +'DVI' +FROM llx_agefodd_formation_catalogue INNER JOIN stage ON llx_agefodd_formation_catalogue.import_key=stage.id +WHERE stage.domaine IN ('COMER','SIC','MARKET'); + +INSERT INTO llx_agefodd_formation_catalogue_extrafields(fk_object, cd_domaine) +SELECT llx_agefodd_formation_catalogue.rowid, +'PAYS' +FROM llx_agefodd_formation_catalogue INNER JOIN stage ON llx_agefodd_formation_catalogue.import_key=stage.id +WHERE stage.domaine IN ('EXPAT','PAYS'); + +INSERT INTO llx_agefodd_formation_catalogue_extrafields(fk_object, cd_domaine) +SELECT llx_agefodd_formation_catalogue.rowid, +'MAGNT' +FROM llx_agefodd_formation_catalogue INNER JOIN stage ON llx_agefodd_formation_catalogue.import_key=stage.id +WHERE stage.domaine IN ('RH'); + +INSERT INTO llx_agefodd_formation_catalogue_extrafields(fk_object, cd_domaine) +SELECT llx_agefodd_formation_catalogue.rowid, +'COM' +FROM llx_agefodd_formation_catalogue INNER JOIN stage ON llx_agefodd_formation_catalogue.import_key=stage.id +WHERE stage.domaine IN ('COMM'); + +--import bank +TRUNCATE TABLE llx_bank_account; +INSERT INTO llx_bank_account (rowid,datec,tms,ref,label,entity,bank,code_banque,code_guichet,number,cle_rib,bic,iban_prefix,country_iban,cle_iban,domiciliation,state_id,fk_pays,proprio,owner_address,courant,clos,rappro,url,account_number,currency_code,min_allowed,min_desired,comment) VALUES (1,{ts '2013-08-13 21:46:03.'},{ts '2013-08-13 21:46:39.'},'CIC','CIC',1,'CIC','30066','10021','00010327101','','','',null,null,'',null,1,'','',1,0,1,null,'','EUR',0,0,''); + +/* +--import product +TRUNCATE TABLE llx_product; +INSERT INTO llx_product ( +ref, +entity, +ref_ext, +datec, +tms, +virtual, +fk_parent, +label, +description, +note, +customcode, +fk_country, +price, +price_ttc, +price_min, +price_min_ttc, +price_base_type, +tva_tx, +recuperableonly, +localtax1_tx, +localtax2_tx, +fk_user_author, +tosell, +tobuy, +fk_product_type, +duration, +seuil_stock_alerte, +barcode, +fk_barcode_type, +accountancy_code_sell, +accountancy_code_buy, +partnumber, +weight, +weight_units, +length, +length_units, +surface, +surface_units, +volume, +volume_units, +stock, +pmp, +canvas, +finished, +hidden, +import_key) +SELECT +produit.codprod, --ref, +1, --entity, +NULL, --ref_ext, +NOW(), +NOW(), +0, --virtual, +NULL, --fk_parent, +produit.intitule, --label, +NULL, --description, +NULL, --note, +NULL, --customcode, +NULL, --fk_country, +0, --price, +0, --price_ttc, +0, --price_min, +0, --price_min_ttc, +'TTC', --price_base_type, +19.6, --tva_tx, +0, --recuperableonly, +0, --localtax1_tx, +0, --localtax2_tx, +1, --fk_user_author, +1, --tosell, +0, --tobuy, +1, --fk_product_type, +NULL, --duration, +NULL, --seuil_stock_alerte, +NULL, --barcode, +NULL, --fk_barcode_type, +produit.compte, --accountancy_code_sell, +NULL, --accountancy_code_buy, +NULL, --partnumber, +NULL, --weight, +NULL, --weight_units, +NULL, --length, +NULL, --length_units, +NULL, --surface, +NULL, --surface_units, +NULL, --volume, +NULL, --volume_units, +NULL, --stock, +0, --pmp, +NULL, --canvas, +0, --finished, +0, --hidden, +NULL --import_key +FROM produit; + +--Update product id into training +UPDATE llx_agefodd_formation_catalogue as cat, llx_product as prod , stage SET cat.fk_product=prod.rowid +WHERE stage.specific_product=prod.ref AND stage.numstage=cat.ref_interne; +*/ +TRUNCATE TABLE `llx_product`; +INSERT INTO `llx_product` (`rowid`, `ref`, `entity`, `ref_ext`, `datec`, `tms`, `virtual`, `fk_parent`, `label`, `description`, `note`, `customcode`, `fk_country`, `price`, `price_ttc`, `price_min`, `price_min_ttc`, `price_base_type`, `tva_tx`, `recuperableonly`, `localtax1_tx`, `localtax2_tx`, `fk_user_author`, `tosell`, `tobuy`, `fk_product_type`, `duration`, `seuil_stock_alerte`, `barcode`, `fk_barcode_type`, `accountancy_code_sell`, `accountancy_code_buy`, `partnumber`, `weight`, `weight_units`, `length`, `length_units`, `surface`, `surface_units`, `volume`, `volume_units`, `stock`, `pmp`, `canvas`, `finished`, `hidden`, `import_key`) VALUES +(154, 's01_ind.1j', 1, NULL, '2013-11-16 23:48:26', '2013-11-16 23:49:07', 0, 0, 'Formation individuelle', '', '', '', NULL, 2300.00000000, 2750.80000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 1, 1, '1d', NULL, NULL, 0, '70610000', '62265000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), +(119, 's01_intra_ind.1j', 1, NULL, '2013-11-14 22:52:37', '2013-11-16 23:45:02', 0, 0, 'Formation individuelle', '', 'Formation organisée pour une personne ou un couple', '', NULL, 2300.00000000, 2750.80000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 1, 1, '1d', NULL, NULL, 0, '70610000', '62265000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), +(123, 's01_team', 1, NULL, '2013-11-14 22:59:45', '2013-11-14 22:59:58', 0, 0, 'Team Building', '', '', '', NULL, 2600.00000000, 3109.60000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 1, 1, '1d', NULL, NULL, 0, '70610000', '62265000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), +(127, 's02_pnomad_solo', 1, NULL, '2013-11-14 23:14:20', '2013-11-14 23:14:43', 0, 0, 'Profil Nomad'' Solo', '', '', '', NULL, 100.00000000, 119.60000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 0, 1, '6m', NULL, NULL, 0, '70750000', '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), +(138, 's09_conf', 1, NULL, '2013-11-14 23:46:33', '2013-11-14 23:46:48', 0, 0, 'Conférence', '', '', '', NULL, 1600.00000000, 1913.60000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 1, 1, '2h', NULL, NULL, 0, '70620000', '62265000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), +(141, 's09_maj', 1, NULL, '2013-11-14 23:54:44', '2013-11-14 23:55:04', 0, 0, 'Majoration', '', '', '', NULL, 2000.00000000, 2392.00000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 1, 1, '1d', NULL, NULL, 0, '70620000', '62265000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), +(143, 's09_cons', 1, NULL, '2013-11-15 00:00:24', '2013-11-15 00:00:46', 0, 0, 'Mission de conseil', '', '', '', NULL, 2000.00000000, 2392.00000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 1, 1, '1d', NULL, NULL, 0, '70620000', '62265000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), +(142, 's10_dev', 1, NULL, '2013-11-14 23:57:15', '2013-11-14 23:58:57', 0, 0, 'Développement d''outil', '', '', '', NULL, 2000.00000000, 2392.00000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 1, 1, '1d', NULL, NULL, 0, '70630000', '62265000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), +(153, 'sht09_conf', 1, NULL, '2013-11-15 00:48:34', '2013-11-16 14:47:28', 0, 0, 'Conférence', '', '', '', NULL, 1600.00000000, 1600.00000000, 0.00000000, 0.00000000, 'HT', 0.000, 0, 0.000, 0.000, 10, 1, 1, 1, '2h', NULL, NULL, 0, '70620900', '62265000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), +(151, 'sht05_frais', 1, NULL, '2013-11-15 00:42:40', '2013-11-16 14:48:34', 0, 0, 'Frais de mission', '', '', '', NULL, 0.00000000, 0.00000000, 0.00000000, 0.00000000, '', 0.000, 0, 0.000, 0.000, 10, 1, 1, 1, '', NULL, NULL, 0, '70871000', '62265100', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), +(135, 's06_webinar', 1, NULL, '2013-11-14 23:38:11', '2013-11-14 23:38:28', 0, 0, 'Webinar', '', '', '', NULL, 1000.00000000, 1196.00000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 1, 1, '2h', NULL, NULL, 0, '70760000', '62265000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), +(144, 's10_lcp_pres', 1, NULL, '2013-11-15 00:02:35', '2013-11-15 00:02:59', 0, 0, 'LCP / PRESENTIEL', 'Questionnaire par Internet
    \r\nEnvoi d'un rapport détaillé
    \r\nDébriefing avec un coach certifié en présentiel', '', '', NULL, 650.00000000, 777.40000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 1, 1, '2h', NULL, NULL, 0, '70760000', '62265000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), +(116, 's01_atelier', 1, NULL, '2013-11-14 22:43:19', '2013-11-18 18:20:59', 0, 0, 'Atelier interculturel', '', '', '', NULL, 1600.00000000, 1913.60000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 1, 1, '3h', NULL, NULL, 0, '70610000', '62265000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), +(120, 's01_intra_ind.2J', 1, NULL, '2013-11-14 22:54:59', '2013-11-16 23:45:20', 0, 0, 'Formation individuelle', 'Formation organisée pour une personne ou un couple', '', '', NULL, 4500.00000000, 5382.00000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 1, 1, '2d', NULL, NULL, 0, '70610000', '62265000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), +(118, 's01_intra_gr.2j', 1, NULL, '2013-11-14 22:50:58', '2013-11-16 23:44:33', 0, 0, 'Formation pour un groupe', '', '', '', NULL, 5000.00000000, 5980.00000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 1, 1, '2d', NULL, NULL, 0, '70610000', '62265000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), +(117, 's01_1intra_gr.1j', 1, NULL, '2013-11-14 22:47:33', '2013-11-18 18:22:42', 0, 0, 'Formation pour un groupe', '', '', '', NULL, 2600.00000000, 3109.60000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 1, 1, '1d', NULL, NULL, 0, '70610000', '62265000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), +(124, 's01_xenf', 1, NULL, '2013-11-14 23:01:11', '2013-11-14 23:17:17', 0, 0, 'Formation enfant', '', '', '', NULL, 1200.00000000, 1435.20000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 1, 1, '3h', NULL, NULL, 0, '70610000', '62265000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), +(125, 's02_xnol', 1, NULL, '2013-11-14 23:08:10', '2013-11-14 23:09:11', 0, 0, 'Nomad Online', 'Accès au Profil Nomad' pendant 6 mois
    \r\nDébriefing par téléphone pendant 1 heure avec un consultant certifié
    \r\nFocus sur un pays au choix', '', '', NULL, 450.00000000, 538.20000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 1, 1, '6m', NULL, NULL, 0, '70750000', '62265000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), +(130, 's05_frais_mission', 1, NULL, '2013-11-14 23:24:52', '2013-11-14 23:25:14', 0, 0, 'Frais de mission', '', '', '', NULL, 0.00000000, 0.00000000, 0.00000000, 0.00000000, '', 0.000, 0, 0.000, 0.000, 10, 1, 1, 1, '', NULL, NULL, 0, '70870000', '62265100', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), +(133, 's06_tip', 1, NULL, '2013-11-14 23:31:21', '2013-11-14 23:32:35', 0, 0, 'The International Profilerr', '', '', '', NULL, 650.00000000, 777.40000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 1, 1, '2h', NULL, NULL, 0, '70760000', '70769000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), +(132, 's06_rmedia', 1, NULL, '2013-11-14 23:27:52', '2013-11-14 23:29:55', 0, 0, 'Rich Media', '', '', '', NULL, 0.00000000, 0.00000000, 0.00000000, 0.00000000, '', 0.000, 0, 0.000, 0.000, 10, 1, 1, 1, '', NULL, NULL, 0, '70760000', '62265000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), +(146, 's10_lcp_lic', 1, NULL, '2013-11-15 00:17:15', '2013-11-15 00:19:19', 0, 0, 'Licence LCP', '', '', '', NULL, 9000.00000000, 10764.00000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 1, 1, '1y', NULL, NULL, 0, '70760000', '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), +(147, 'sht01_inter', 1, NULL, '2013-11-15 00:27:24', '2013-11-15 00:27:45', 0, 0, 'Formation interentreprises', '', '', '', NULL, 1490.00000000, 1490.00000000, 0.00000000, 0.00000000, 'HT', 0.000, 0, 0.000, 0.000, 10, 1, 1, 1, '2d', NULL, NULL, 0, '70611000', '62265000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), +(145, 's10_lcp_tel', 1, NULL, '2013-11-15 00:07:24', '2013-11-15 00:10:16', 0, 0, 'LCP / TEL', 'Questionnaire par internet
    \r\nEnvoi d'un rapport détaillé
    \r\nDébriefing avec un coach certifié par téléphone', '', '', NULL, 500.00000000, 598.00000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 1, 1, '2h', NULL, NULL, 0, '70760000', '62265000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), +(126, 's02_pnomad', 1, NULL, '2013-11-14 23:12:01', '2013-11-14 23:15:50', 0, 0, 'Profil Nomad''', '', '', '', NULL, 50.00000000, 59.80000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 0, 1, '6m', NULL, NULL, 0, '70750000', '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), +(137, 's09_coach', 1, NULL, '2013-11-14 23:43:11', '2013-11-14 23:43:25', 0, 0, 'Coaching', '', '', '', NULL, 400.00000000, 478.40000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 1, 1, '1h', NULL, NULL, 0, '70620000', '62265000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), +(129, 's06_doc', 1, NULL, '2013-11-14 23:23:27', '2013-11-14 23:23:42', 0, 0, 'Documentation', '', '', '', NULL, 0.00000000, 0.00000000, 0.00000000, 0.00000000, '', 0.000, 0, 0.000, 0.000, 10, 1, 1, 1, '', NULL, NULL, 0, '70641000', '61800000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), +(131, 's05_frais_tech', 1, NULL, '2013-11-14 23:26:17', '2013-11-14 23:26:29', 0, 0, 'Frais techniques', 'Salle équipée', '', '', NULL, 0.00000000, 0.00000000, 0.00000000, 0.00000000, '', 0.000, 0, 0.000, 0.000, 10, 1, 1, 1, '', NULL, NULL, 0, '70801000', '62265100', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), +(115, 's01_inter', 1, NULL, '2013-11-14 22:30:13', '2013-11-14 22:31:02', 0, 0, 'Formation interentreprises', '', '', '', NULL, 1490.00000000, 1782.04000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 1, 1, '2d', NULL, NULL, 0, '70610000', '62265000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), +(149, 'sht01_intra', 1, NULL, '2013-11-15 00:35:02', '2013-11-15 00:36:11', 0, 0, 'Formation intra-entreprise', '', '', '', NULL, 2600.00000000, 2600.00000000, 0.00000000, 0.00000000, 'HT', 0.000, 0, 0.000, 0.000, 10, 1, 1, 1, '1d', NULL, NULL, 0, '70611000', '62265000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), +(152, 'sht02_pnomad', 1, NULL, '2013-11-15 00:45:44', '2013-11-16 14:46:06', 0, 0, 'Profil Nomad''', '', '', '', NULL, 50.00000000, 50.00000000, 0.00000000, 0.00000000, 'HT', 0.000, 0, 0.000, 0.000, 10, 1, 0, 1, '6m', NULL, NULL, 0, '70759000', '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL); + +TRUNCATE TABLE `llx_product_lang`; +INSERT INTO `llx_product_lang` (`rowid`, `fk_product`, `lang`, `label`, `description`, `note`) VALUES +(63, 116, 'fr_FR', 'Atelier interculturel', '', ''), +(66, 119, 'fr_FR', 'Formation individuelle', '', 'Formation organisée pour une personne ou un couple'), +(71, 124, 'fr_FR', 'Formation enfant', '', ''), +(74, 127, 'fr_FR', 'Profil Nomad'' Solo', '', ''), +(72, 125, 'fr_FR', 'Nomad Online', 'Accès au Profil Nomad' pendant 6 mois
    \r\nDébriefing par téléphone pendant 1 heure avec un consultant certifié
    \r\nFocus sur un pays au choix', ''), +(80, 133, 'fr_FR', 'The International Profilerr', '', ''), +(79, 132, 'fr_FR', 'Rich Media', '', ''), +(85, 138, 'fr_FR', 'Conférence', '', ''), +(88, 141, 'fr_FR', 'Majoration', '', ''), +(91, 144, 'fr_FR', 'LCP / PRESENTIEL', 'Questionnaire par Internet
    \r\nEnvoi d'un rapport détaillé
    \r\nDébriefing avec un coach certifié en présentiel', ''), +(90, 143, 'fr_FR', 'Mission de conseil', '', ''), +(89, 142, 'fr_FR', 'Développement d''outil', '', ''), +(96, 149, 'fr_FR', 'Formation intra-entreprise', '', ''), +(100, 153, 'fr_FR', 'Conférence', '', ''), +(77, 130, 'fr_FR', 'Frais de mission', '', ''), +(99, 152, 'fr_FR', 'Profil Nomad''', '', ''), +(84, 137, 'fr_FR', 'Coaching', '', ''), +(82, 135, 'fr_FR', 'Webinar', '', ''), +(101, 154, 'fr_FR', 'Formation individuelle', '', ''), +(67, 120, 'fr_FR', 'Formation individuelle', 'Formation organisée pour une personne ou un couple', ''), +(70, 123, 'fr_FR', 'Team Building', '', ''), +(65, 118, 'fr_FR', 'Formation pour un groupe', '', ''), +(64, 117, 'fr_FR', 'Formation pour un groupe', '', ''), +(93, 146, 'fr_FR', 'Licence LCP', '', ''), +(94, 147, 'fr_FR', 'Formation interentreprises', '', ''), +(98, 151, 'fr_FR', 'Frais de mission', '', ''), +(92, 145, 'fr_FR', 'LCP / TEL', 'Questionnaire par internet
    \r\nEnvoi d'un rapport détaillé
    \r\nDébriefing avec un coach certifié par téléphone', ''), +(73, 126, 'fr_FR', 'Profil Nomad''', '', ''), +(76, 129, 'fr_FR', 'Documentation', '', ''), +(78, 131, 'fr_FR', 'Frais techniques', 'Salle équipée', ''), +(62, 115, 'fr_FR', 'Formation interentreprises', '', ''); + +TRUNCATE tABLE `llx_product_price`; +INSERT INTO `llx_product_price` (`rowid`, `entity`, `tms`, `fk_product`, `date_price`, `price_level`, `price`, `price_ttc`, `price_min`, `price_min_ttc`, `price_base_type`, `tva_tx`, `recuperableonly`, `localtax1_tx`, `localtax2_tx`, `fk_user_author`, `tosell`, `price_by_qty`, `import_key`) VALUES +(145, 1, '2013-11-14 22:43:19', 116, '2013-11-14 22:43:19', 1, 1600.00000000, 1913.60000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 0, NULL), +(148, 1, '2013-11-14 22:52:37', 119, '2013-11-14 22:52:37', 1, 2300.00000000, 2750.80000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 0, 0, NULL), +(149, 1, '2013-11-14 22:54:59', 120, '2013-11-14 22:54:59', 1, 4500.00000000, 5382.00000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 0, 0, NULL), +(147, 1, '2013-11-14 22:50:58', 118, '2013-11-14 22:50:58', 1, 5000.00000000, 5980.00000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 0, NULL), +(155, 1, '2013-11-14 23:08:10', 125, '2013-11-14 23:08:10', 1, 450.00000000, 538.20000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 0, 0, NULL), +(163, 1, '2013-11-14 23:31:21', 133, '2013-11-14 23:31:21', 1, 650.00000000, 777.40000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 0, 0, NULL), +(162, 1, '2013-11-14 23:27:52', 132, '2013-11-14 23:27:52', 1, 0.00000000, 0.00000000, 0.00000000, 0.00000000, '', 0.000, 0, 0.000, 0.000, 10, 0, 0, NULL), +(187, 1, '2013-11-15 00:45:44', 152, '2013-11-15 00:45:44', 1, 50.00000000, 50.00000000, 0.00000000, 0.00000000, 'HT', 0.000, 0, 0.000, 0.000, 10, 0, 0, NULL), +(169, 1, '2013-11-14 23:46:33', 138, '2013-11-14 23:46:33', 1, 1600.00000000, 1913.60000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 0, 0, NULL), +(174, 1, '2013-11-14 23:54:44', 141, '2013-11-14 23:54:44', 1, 2000.00000000, 2392.00000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 0, 0, NULL), +(180, 1, '2013-11-15 00:27:24', 147, '2013-11-15 00:27:24', 1, 1490.00000000, 1490.00000000, 0.00000000, 0.00000000, 'HT', 0.000, 0, 0.000, 0.000, 10, 0, 0, NULL), +(177, 1, '2013-11-15 00:02:35', 144, '2013-11-15 00:02:35', 1, 650.00000000, 777.40000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 0, 0, NULL), +(176, 1, '2013-11-15 00:00:24', 143, '2013-11-15 00:00:24', 1, 2000.00000000, 2392.00000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 0, 0, NULL), +(175, 1, '2013-11-14 23:57:15', 142, '2013-11-14 23:57:15', 1, 2000.00000000, 2392.00000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 0, 0, NULL), +(186, 1, '2013-11-15 00:42:40', 151, '2013-11-15 00:42:40', 1, 0.00000000, 0.00000000, 0.00000000, 0.00000000, '', 0.000, 0, 0.000, 0.000, 10, 0, 0, NULL), +(183, 1, '2013-11-15 00:35:02', 149, '2013-11-15 00:35:02', 1, 2600.00000000, 2600.00000000, 0.00000000, 0.00000000, 'HT', 0.000, 0, 0.000, 0.000, 10, 0, 0, NULL), +(153, 1, '2013-11-14 22:59:45', 123, '2013-11-14 22:59:45', 1, 2600.00000000, 3109.60000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 0, 0, NULL), +(188, 1, '2013-11-15 00:48:34', 153, '2013-11-15 00:48:34', 1, 1600.00000000, 1600.00000000, 0.00000000, 0.00000000, 'HT', 0.000, 0, 0.000, 0.000, 10, 0, 0, NULL), +(160, 1, '2013-11-14 23:24:52', 130, '2013-11-14 23:24:52', 1, 0.00000000, 0.00000000, 0.00000000, 0.00000000, '', 0.000, 0, 0.000, 0.000, 10, 0, 0, NULL), +(179, 1, '2013-11-15 00:17:15', 146, '2013-11-15 00:17:15', 1, 9000.00000000, 10764.00000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 0, NULL), +(168, 1, '2013-11-14 23:43:11', 137, '2013-11-14 23:43:11', 1, 400.00000000, 478.40000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 0, 0, NULL), +(166, 1, '2013-11-14 23:38:11', 135, '2013-11-14 23:38:11', 1, 1000.00000000, 1196.00000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 0, 0, NULL), +(189, 1, '2013-11-16 23:48:26', 154, '2013-11-16 23:48:26', 1, 2300.00000000, 2750.80000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 0, NULL), +(146, 1, '2013-11-14 22:47:33', 117, '2013-11-14 22:47:33', 1, 2600.00000000, 3109.60000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 0, NULL), +(154, 1, '2013-11-14 23:01:11', 124, '2013-11-14 23:01:11', 1, 1200.00000000, 1435.20000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 0, 0, NULL), +(157, 1, '2013-11-14 23:14:20', 127, '2013-11-14 23:14:20', 1, 100.00000000, 119.60000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 0, 0, NULL), +(178, 1, '2013-11-15 00:07:24', 145, '2013-11-15 00:07:24', 1, 500.00000000, 598.00000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 0, 0, NULL), +(156, 1, '2013-11-14 23:12:01', 126, '2013-11-14 23:12:01', 1, 50.00000000, 59.80000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 0, 0, NULL), +(159, 1, '2013-11-14 23:23:27', 129, '2013-11-14 23:23:27', 1, 0.00000000, 0.00000000, 0.00000000, 0.00000000, '', 0.000, 0, 0.000, 0.000, 10, 0, 0, NULL), +(161, 1, '2013-11-14 23:26:17', 131, '2013-11-14 23:26:17', 1, 0.00000000, 0.00000000, 0.00000000, 0.00000000, '', 0.000, 0, 0.000, 0.000, 10, 0, 0, NULL), +(144, 1, '2013-11-14 22:30:13', 115, '2013-11-14 22:30:13', 1, 1490.00000000, 1782.04000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 0, 0, NULL); + + +--import session link with convention +TRUNCATE TABLE llx_agefodd_session; +INSERT INTO llx_agefodd_session ( +entity, +fk_soc, +fk_formation_catalogue, +fk_session_place, +type_session, +nb_place, +nb_stagiaire, +force_nb_stagiaire, +nb_subscribe_min, +dated, +datef, +notes, +color, +cost_trainer, +cost_site, +cost_trip, +sell_price, +is_date_res_site, +date_res_site, +is_date_res_trainer, +date_res_trainer, +date_ask_OPCA, +is_date_ask_OPCA, +is_OPCA, +fk_soc_OPCA, +fk_socpeople_OPCA, +num_OPCA_soc, +num_OPCA_file, +fk_user_author, +datec, +fk_user_mod, +tms, +archive, +status, +duree_session, +intitule_custo, +import_key) +SELECT +1, --entity, +CASE WHEN (sess.inter=0) THEN soc.rowid ELSE NULL END, --fk_soc, +cat.rowid, --fk_formation_catalogue, +IFNULL(place.rowid,(SELECT rowid from llx_agefodd_place WHERE ref_interne='ENT-Dans l''entreprise')), --fk_session_place, +sess.inter, --type_session, +0, --nb_place, +0, --nb_stagiaire, +0, --force_nb_stagiaire, +sess.nbrmin, --nb_subscribe_min, +IFNULL(MIN(convct.datdeb),sess.datdeb), --dated, +IFNULL(MAX(convct.datfin),sess.datfin), --datef, +'', --notes, +NULL, --color, +SUM(coutconsultant.montant), --cost_trainer, +SUM(coutsalle.montant), --cost_site, +SUM(couttrip.montant), --cost_trip, +sess.prxft, --sell_price, +0, --is_date_res_site, +NULL, --date_res_site, +0, --is_date_res_trainer, +NULL, --date_res_trainer, +NULL, --date_ask_OPCA, +0,--is_date_ask_OPCA, +0,--is_OPCA, +NULL, --fk_soc_OPCA, +NULL, --fk_socpeople_OPCA, +NULL, --num_OPCA_soc, +NULL, --num_OPCA_file, +IFNULL(usercrea.rowid,1), --fk_user_author +IFNULL(sess.created,NOW()), --datec, +IFNULL(usermod.rowid,1), --fk_user_author +sess.modified, --tms, +CASE WHEN IFNULL(MAX(convct.datfin),sess.datfin)2000 +GROUP BY sess.id; + +--Import session customer contact +TRUNCATE TABLE llx_agefodd_contact; +INSERT INTO llx_agefodd_contact (entity,fk_socpeople,archive,fk_user_author,datec,fk_user_mod,tms) +SELECT DISTINCT +1, +llx_socpeople.rowid, +0, +1, +NOW(), +1, +NOW() +FROM convct +INNER JOIN contact on convct.recipient_contact_id=contact.id +INNER JOIN llx_socpeople ON llx_socpeople.import_key=contact.id; + +TRUNCATE TABLE llx_agefodd_session_contact; +INSERT INTO llx_agefodd_session_contact (fk_session_agefodd,fk_agefodd_contact,fk_user_author,datec,fk_user_mod,tms) +SELECT DISTINCT +llx_agefodd_session.rowid, +llx_agefodd_contact.rowid, +1, +NOW(), +1, +NOW() +FROM convct +INNER JOIN llx_agefodd_session ON llx_agefodd_session.import_key=convct.session_id +INNER JOIN contact on convct.recipient_contact_id=contact.id +INNER JOIN llx_socpeople ON llx_socpeople.import_key=contact.id +INNER JOIN llx_agefodd_contact ON llx_socpeople.rowid=llx_agefodd_contact.fk_socpeople; + +--Commerciale +TRUNCATE TABLE llx_agefodd_session_commercial; +INSERT INTO llx_agefodd_session_commercial (fk_session_agefodd, fk_user_com, fk_user_author,fk_user_mod, datec) +SELECT DISTINCT +llx_agefodd_session.rowid, +llx_user.rowid, +1, +1, +NOW() +FROM convct +INNER JOIN llx_agefodd_session ON llx_agefodd_session.import_key=convct.session_id +INNER JOIN contact on convct.recipient_contact_id=contact.id +INNER JOIN com ON com.id=convct.com_id +INNER JOIN llx_user ON llx_user.email=com.email; + + +-- le gestionnaire logistique qui est le « Type » dans la convention +INSERT INTO llx_agefodd_session_extrafields (fk_object,ts_logistique) +SELECT DISTINCT +llx_agefodd_session.rowid, +llx_user.rowid +FROM convct +INNER JOIN llx_agefodd_session ON llx_agefodd_session.import_key=convct.session_id +INNER JOIN sf_user ON sf_user.login=convct.contrat +INNER JOIN llx_user ON llx_user.email=sf_user.email_address; + + + +--Import trainer as supplier and contact +INSERT INTO llx_societe(nom, +entity, +ref_ext, +ref_int, +statut, +parent, +tms, +datec, +datea, +status, +code_client, +code_fournisseur, +code_compta, +code_compta_fournisseur, +address, +zip, +town, +fk_departement, +fk_pays, +phone, +fax, +url, +email, +fk_effectif, +fk_typent, +fk_forme_juridique, +fk_currency, +siren, +siret, +ape, +idprof4, +idprof5, +idprof6, +tva_intra, +capital, +fk_stcomm, +note_private, +note_public, +prefix_comm, +client, +fournisseur, +supplier_account, +fk_prospectlevel, +customer_bad, +customer_rate, +supplier_rate, + fk_user_creat, +fk_user_modif, +remise_client, +mode_reglement, +cond_reglement, +tva_assuj, +localtax1_assuj, +localtax2_assuj, +barcode, +fk_barcode_type, +price_level, +default_lang, +logo, +canvas, +import_key) +SELECT DISTINCT CONCAT_WS(' ',interv.nom, interv.prenom), + 1, + NULL, + NULL, + 0, + NULL, + interv.modified, + interv.created, + interv.created, + interv.actif, + NULL, + NULL, + NULL, +NULL, +CONCAT_WS(' ',interv.adr1, interv.commune), +interv.cp, +interv.bureau, +NULL, +interv.pays, +interv.telephone, +interv.fax, +NULL, +TRIM(interv.email), +NULL, +8, +NULL, +0, +NULL, +interv.siret, +interv.urssaf, +NULL, +NULL, +NULL, +NULL, +NULL, +0, +interv.memo, +NULL, +NULL, +0, +1, +NULL, +NULL, +0, +0, +0, +IFNULL(usercrea.rowid,1), --fk_user_author +IFNULL(usermod.rowid,1), --fk_user_mod +0, +NULL, +NULL, +NULL, +NULL, +NULL, +NULL, +0, +NULL, +NULL, +NULL, +NULL, +interv.id +FROM interv +LEFT OUTER JOIN sf_user as usercreast ON usercreast.id=interv.created_by_sf_user_id +LEFT OUTER JOIN llx_user as usercrea ON usercreast.email_address=usercrea.email +LEFT OUTER JOIN sf_user as usermodst ON usermodst.id=interv.modified_by_sf_user_id +LEFT OUTER JOIN llx_user as usermod ON usermodst.email_address=usermod.email; + + +UPDATE llx_societe SET code_fournisseur=CONCAT_WS('','F', LPAD(rowid,5,'0')), tms=tms WHERE fournisseur=1; +UPDATE llx_societe SET code_client=CONCAT_WS('','C', LPAD(rowid,5,'0')), tms=tms WHERE client=1; + +--Insert Consultant categorie +TRUNCATE TABLE llx_categorie_fournisseur; +INSERT INTO llx_categorie_fournisseur (fk_categorie,fk_societe) +SELECT +12, +llx_societe.rowid +FROM llx_societe INNER JOIN interv ON interv.id=llx_societe.import_key; + +INSERT INTO llx_socpeople (datec, +tms, +fk_soc, +entity, +ref_ext, +civilite, +lastname, +firstname, +address, +zip, +town, +fk_departement, +fk_pays, +birthday, +poste, +phone, +phone_perso, +phone_mobile, +fax, +email, +jabberid, +no_email, +priv, +fk_user_creat, +fk_user_modif, +note_private, +note_public, +default_lang, +canvas, +import_key, +statut) +SELECT +interv.created, +interv.modified, +soc.rowid, +1, +interv.external_ref, +civ.code, +interv.nom, +interv.prenom, +CONCAT_WS(' ',interv.adr1, interv.commune), +interv.cp, +interv.bureau, +NULL, +soc.fk_pays, +NULL, +NULL, +interv.telephone, +NULL, +interv.portable, +interv.fax, +TRIM(interv.email), +NULL, +0, +0, +IFNULL(usercrea.rowid,1), --fk_user_author +IFNULL(usermod.rowid,1), --fk_user_mod +CONCAT_WS(' ',interv.memo, interv.contrat), +NULL, +NULL, +NULL, +interv.id, +interv.actif +FROM interv +INNER JOIN llx_societe as soc ON soc.import_key=interv.id +LEFT OUTER JOIN llx_c_civilite as civ ON civ.code=interv.civilite +LEFT OUTER JOIN sf_user as usercreast ON usercreast.id=interv.created_by_sf_user_id +LEFT OUTER JOIN llx_user as usercrea ON usercreast.email_address=usercrea.email +LEFT OUTER JOIN sf_user as usermodst ON usermodst.id=interv.modified_by_sf_user_id +LEFT OUTER JOIN llx_user as usermod ON usermodst.email_address=usermod.email; + +--Insert Consultant categorie for contact +TRUNCATE TABLE llx_categorie_contact; +INSERT INTO llx_categorie_contact (fk_categorie,fk_socpeople) +SELECT +32, +llx_socpeople.rowid +FROM llx_socpeople INNER JOIN interv ON interv.id=llx_socpeople.import_key; + +--Import trainer from dolibarr contact +TRUNCATE TABLE llx_agefodd_formateur; +INSERT INTO llx_agefodd_formateur ( +entity, +fk_socpeople, +fk_user, +type_trainer, +archive, +fk_user_author, +datec, +fk_user_mod, +tms) +SELECT +1, --entity, +llx_socpeople.rowid, --fk_socpeople, +NULL, --fk_user, +'socpeople', --type_trainer, +interv.disabled, --archive, +IFNULL(usercrea.rowid,1), --fk_user_author +IFNULL(interv.created,NOW()), --datec, +IFNULL(usermod.rowid,1), --fk_user_mod +IFNULL(interv.modified,NOW()) --tms +FROM llx_socpeople +INNER JOIN interv ON interv.id=llx_socpeople.import_key +LEFT OUTER JOIN sf_user as usercreast ON usercreast.id=interv.created_by_sf_user_id +LEFT OUTER JOIN llx_user as usercrea ON usercreast.email_address=usercrea.email +LEFT OUTER JOIN sf_user as usermodst ON usermodst.id=interv.modified_by_sf_user_id +LEFT OUTER JOIN llx_user as usermod ON usermodst.email_address=usermod.email + + +--Import trainer into session +TRUNCATE TABLE llx_agefodd_session_formateur; +INSERT INTO llx_agefodd_session_formateur ( +fk_session, +fk_agefodd_formateur, +fk_user_author, +datec, +fk_user_mod, +tms) +SELECT DISTINCT +llx_agefodd_session.rowid, +llx_agefodd_formateur.rowid, +IFNULL(usercrea.rowid,1), --fk_user_author +IFNULL(pls.created,NOW()), +IFNULL(usermod.rowid,1), --fk_user_mod +IFNULL(pls.modified,NOW()) +FROM pls +INNER JOIN llx_agefodd_session ON llx_agefodd_session.import_key=pls.session_id +INNER JOIN llx_socpeople ON llx_socpeople.import_key=pls.interv_id +INNER JOIN llx_agefodd_formateur ON llx_agefodd_formateur.fk_socpeople=llx_socpeople.rowid +LEFT OUTER JOIN sf_user as usercreast ON usercreast.id=pls.created_by_sf_user_id +LEFT OUTER JOIN llx_user as usercrea ON usercreast.email_address=usercrea.email +LEFT OUTER JOIN sf_user as usermodst ON usermodst.id=pls.modified_by_sf_user_id +LEFT OUTER JOIN llx_user as usermod ON usermodst.email_address=usermod.email +WHERE pls.status='confirmed'; + + +--import trainer times and cost into session +TRUNCATE TABLE llx_agefodd_session_formateur_calendrier; +INSERT INTO llx_agefodd_session_formateur_calendrier( +entity, + fk_agefodd_session_formateur, + date_session, + heured, + heuref, + --trainer_cost, + fk_actioncomm, + fk_user_author, + datec, + fk_user_mod, + tms) + SELECT + 1,--entity, + llx_agefodd_session_formateur.rowid, --fk_agefodd_session_formateur, + pls.datec,--date_session, + DATE_ADD(DATE(pls.datec),INTERVAL DATE_FORMAT(pls.hrdeb,'%H:%i') HOUR_MINUTE),--heured, + DATE_ADD(DATE(pls.datec),INTERVAL DATE_FORMAT(pls.hrfin,'%H:%i') HOUR_MINUTE), --heuref, + --coutconsultant.montant/pls.nbhr,--trainer_cost, + NULL,--fk_actioncomm, + IFNULL(usercrea.rowid,1), --fk_user_author + IFNULL(pls.created,NOW()),-- datec, + IFNULL(usermod.rowid,1), --fk_user_mod + IFNULL(pls.modified,NOW())--tms + FROM pls +INNER JOIN llx_agefodd_session ON llx_agefodd_session.import_key=pls.session_id +INNER JOIN llx_socpeople ON llx_socpeople.import_key=pls.interv_id +INNER JOIN llx_agefodd_formateur ON llx_agefodd_formateur.fk_socpeople=llx_socpeople.rowid +INNER JOIN llx_agefodd_session_formateur ON llx_agefodd_session.rowid=llx_agefodd_session_formateur.fk_session AND llx_agefodd_formateur.rowid=llx_agefodd_session_formateur.fk_agefodd_formateur +LEFT OUTER JOIN sesfr as coutconsultant ON coutconsultant.session_id=pls.session_id AND coutconsultant.typfr='CON' AND coutconsultant.interv_id=pls.interv_id +LEFT OUTER JOIN sf_user as usercreast ON usercreast.id=pls.created_by_sf_user_id +LEFT OUTER JOIN llx_user as usercrea ON usercreast.email_address=usercrea.email +LEFT OUTER JOIN sf_user as usermodst ON usermodst.id=pls.modified_by_sf_user_id +LEFT OUTER JOIN llx_user as usermod ON usermodst.email_address=usermod.email +WHERE pls.status='confirmed'; + +--import trainee +TRUNCATE TABLE llx_agefodd_stagiaire; +INSERT INTO llx_agefodd_stagiaire ( +entity, +nom, +prenom, +civilite, +fk_user_author, +fk_user_mod, +datec, +tms, +fk_soc, +fk_socpeople, +fonction, +tel1, +tel2, +mail, +date_birth, +place_birth, +note, +import_key) +SELECT DISTINCT +1, --entity, +TRIM(eleves.nom), +IFNULL(TRIM(eleves.prenom),''), +eleves.civilite, + IFNULL(usercrea.rowid,1), --fk_user_author + IFNULL(usermod.rowid,1), --fk_user_mod +IFNULL(eleves.created,NOW()), --datec, +eleves.modified, --tms, +IFNULL(soc.rowid,(SELECT rowid from llx_societe where nom='Inconnue')), --fk_soc, +NULL, --fk_socpeople, +NULL, --fonction, +eleves.telephone, --tel1, +NULL, +eleves.email, --mail, +eleves.datnais, --date_birth, +NULL, --place_birth, +eleves.texte, --note, +eleves.id --import_key +FROM eleves +INNER JOIN point ON eleves.id=point.eleves_id +INNER JOIN session as sess ON sess.id=point.session_id +LEFT OUTER JOIN llx_societe as soc ON soc.import_key=eleves.account_id +LEFT OUTER JOIN sf_user as usercreast ON usercreast.id=eleves.created_by_sf_user_id +LEFT OUTER JOIN llx_user as usercrea ON usercreast.email_address=usercrea.email +LEFT OUTER JOIN sf_user as usermodst ON usermodst.id=eleves.modified_by_sf_user_id +LEFT OUTER JOIN llx_user as usermod ON usermodst.email_address=usermod.email; + +--Add trainee to session +TRUNCATE TABLE llx_agefodd_session_stagiaire; +INSERT INTO llx_agefodd_session_stagiaire ( +fk_session_agefodd, +fk_stagiaire, +fk_agefodd_stagiaire_type, +status_in_session, +fk_user_author, +datec, +fk_user_mod, +tms, +import_key) +SELECT +llx_agefodd_session.rowid, +llx_agefodd_stagiaire.rowid, +1, +3, + IFNULL(usercrea.rowid,1), --fk_user_author +NOW(), + IFNULL(usermod.rowid,1), --fk_user_mod +NOW(), +NULL +FROM eleves +INNER JOIN point ON eleves.id=point.eleves_id +INNER JOIN session as sess ON sess.id=point.session_id +INNER JOIN llx_agefodd_session ON sess.id=llx_agefodd_session.import_key +INNER JOIN llx_agefodd_stagiaire ON llx_agefodd_stagiaire.import_key=point.eleves_id +LEFT OUTER JOIN sf_user as usercreast ON usercreast.id=eleves.created_by_sf_user_id +LEFT OUTER JOIN llx_user as usercrea ON usercreast.email_address=usercrea.email +LEFT OUTER JOIN sf_user as usermodst ON usermodst.id=eleves.modified_by_sf_user_id +LEFT OUTER JOIN llx_user as usermod ON usermodst.email_address=usermod.email; + +--Update number of trainee per session +UPDATE llx_agefodd_session SET nb_stagiaire=(SELECT count(rowid) FROM llx_agefodd_session_stagiaire WHERE fk_session_agefodd = llx_agefodd_session.rowid), tms=tms WHERE (llx_agefodd_session.force_nb_stagiaire=0 OR llx_agefodd_session.force_nb_stagiaire IS NULL); + +--Insert Session calendar +TRUNCATE TABLE llx_agefodd_session_calendrier; +INSERT INTO llx_agefodd_session_calendrier ( +fk_agefodd_session, +date_session, +heured, +heuref, +fk_actioncomm, +fk_user_author, +datec, +fk_user_mod, +tms) +SELECT +agesess.rowid, +DATE(pls.datec), +DATE_ADD(DATE(pls.datec),INTERVAL DATE_FORMAT(pls.hrdeb,'%H:%i') HOUR_MINUTE), +DATE_ADD(DATE(pls.datec),INTERVAL DATE_FORMAT(pls.hrfin,'%H:%i') HOUR_MINUTE), +NULL, +1, +IFNULL(pls.created,NOW()), +1, +IFNULL(pls.modified,NOW()) +FROM llx_agefodd_session as agesess +INNER JOIN pls ON agesess.import_key=pls.session_id; + +--Insert Propal +TRUNCATE TABLE llx_propaldet; +TRUNCATE TABLE llx_propal; + +INSERT INTO llx_propal ( +ref, +entity, +ref_ext, +ref_int, +ref_client, +fk_soc, +fk_projet, +tms, +datec, +datep, +fin_validite, +date_valid, +date_cloture, +fk_user_author, +fk_user_valid, +fk_user_cloture, +fk_statut, +price, +remise_percent, +remise_absolue, +remise, +total_ht, +tva, +localtax1, +localtax2, +total, +fk_account, +fk_currency, +fk_cond_reglement, +fk_mode_reglement, +note_private, +note_public, +model_pdf, +date_livraison, +fk_availability, +fk_input_reason, +import_key, +extraparams, +fk_delivery_address) +SELECT +proct.numct, --ref, +1, --entity, +NULL, --ref_ext, +NULL, --ref_int, +NULL, --ref_client, +soc.rowid, --fk_soc, +NULL, --fk_projet, +IFNULL(proct.modified,NOW()), --tms, +IFNULL(proct.created,NOW()), --datec, +IFNULL(proct.created,NOW()), --datep, +proct.dateps, --fin_validite, +proct.dates, --date_valid, +proct.dates, --date_cloture, + IFNULL(usercrea.rowid,1), --fk_user_author +1, --fk_user_valid, +1, --fk_user_cloture, +CASE WHEN proct.signe THEN 2 ELSE 3 END, --fk_statut, +0, --price, +NULL, --remise_percent, +NULL, --remise_absolue, +0, --remise, +0, --total_ht, +0, --tva, +0, --localtax1, +0, --localtax2, +0, --total, +NULL, --fk_account, +NULL, --fk_currency, +NULL, --fk_cond_reglement, +NULL, --fk_mode_reglement, +NULL, --note_private, +NULL, --note_public, +'azur', --model_pdf, +NULL, --date_livraison, +0, --fk_availability, +0, --fk_input_reason, +proct.id, --import_key, +NULL, --extraparams, +NULL --fk_delivery_address +FROM proct +INNER JOIN llx_societe as soc ON soc.import_key=proct.account_id +INNER JOIN prolig ON prolig.proct_id=proct.id +LEFT OUTER JOIN sf_user as usercreast ON usercreast.id=proct.created_by_sf_user_id +LEFT OUTER JOIN llx_user as usercrea ON usercreast.email_address=usercrea.email +GROUP BY proct.id; + + +--Insert Propal det +INSERT INTO llx_propaldet ( +fk_propal, +fk_parent_line, +fk_product, +label, +description, +fk_remise_except, +tva_tx, +localtax1_tx, +localtax1_type, +localtax2_tx, +localtax2_type, +qty, +remise_percent, +remise, +price, +subprice, +total_ht, +total_tva, +total_localtax1, +total_localtax2, +total_ttc, +product_type, +date_start, +date_end, +info_bits, +buy_price_ht, +fk_product_fournisseur_price, +special_code, +rang) +SELECT +prop.rowid, --fk_propal, +NULL, --fk_parent_line, +NULL, --fk_product, +NULL, --label, +prolig.intitule, --description, +NULL, --fk_remise_except, +CASE WHEN prolig.ctva=1 THEN 19.600 ELSE 0 END, --tva_tx, +0, --localtax1_tx, +0, --localtax1_type, +0, --localtax2_tx, +0, --localtax2_type, +prolig.nbjr, --qty, +0, --remise_percent, +0, --remise, +prolig.taux, --price, +prolig.taux, --subprice, +CASE WHEN prolig.ctva=1 THEN prolig.mont-(prolig.mont*0.196) ELSE prolig.mont END, --total_ht, +CASE WHEN prolig.ctva=1 THEN prolig.mont*0.196 ELSE 0 END, --total_tva, +0, --total_localtax1, +0, --total_localtax2, +prolig.mont, --total_ttc, +1, --product_type, +NULL, --date_start, +NULL, --date_end, +0, --info_bits, +0, --buy_price_ht, +NULL, --fk_product_fournisseur_price, +0, --special_code, +prolig.numlig --rang +FROM prolig INNER JOIN llx_propal as prop ON prop.import_key=prolig.proct_id; + + +--Add propal contact +TRUNCATE TABLE llx_element_contact; +INSERT INTO llx_element_contact ( +datecreate, +statut, +element_id, +fk_c_type_contact, +fk_socpeople) +SELECT DISTINCT +proct.created, +4, +llx_propal.rowid, +40, +llx_socpeople.rowid +FROM proct +INNER JOIN llx_propal ON llx_propal.import_key=proct.id +INNER JOIN contact ON proct.contact_id=contact.id +INNER JOIN llx_socpeople ON llx_socpeople.import_key=contact.id; + + +--Update propal total amount +UPDATE llx_propal +SET llx_propal.total_ht=(SELECT SUM(total_ht) FROM llx_propaldet WHERE llx_propaldet.fk_propal=llx_propal.rowid GROUP BY llx_propaldet.fk_propal), +llx_propal.tva=(SELECT SUM(total_tva) FROM llx_propaldet WHERE llx_propaldet.fk_propal=llx_propal.rowid GROUP BY llx_propaldet.fk_propal), +llx_propal.total=(SELECT SUM(total) FROM llx_propaldet WHERE llx_propaldet.fk_propal=llx_propal.rowid GROUP BY llx_propaldet.fk_propal), +llx_propal.tms=llx_propal.tms; + +--Lier propal Session/client +TRUNCATE TABLE llx_agefodd_session_element; +INSERT INTO llx_agefodd_session_element( +fk_session_agefodd, +fk_soc, +element_type, +fk_element, +fk_user_author, +datec, +fk_user_mod, +tms) +SELECT +llx_agefodd_session.rowid, +llx_societe.rowid, +'propal', +llx_propal.rowid, +1, +NOW(), +1, +NOW() +FROM llx_propal +INNER JOIN proct ON proct.id=llx_propal.import_key +INNER JOIN session as sess ON sess.id=proct.session_id +INNER JOIN llx_agefodd_session ON llx_agefodd_session.import_key=sess.id +INNER JOIN account ON account.id=proct.account_id +INNER JOIN llx_societe ON llx_societe.import_key=account.id; + + +--Import Invoice payé +TRUNCATE TABLE llx_facture; +TRUNCATE TABLE llx_facturedet; +INSERT INTO llx_facture ( +facnumber, +entity, +ref_ext, +ref_int, +ref_client, +type, +increment, +fk_soc,datec, +datef, +date_valid, +tms, +paye, +amount, +remise_percent, +remise_absolue, +remise, +close_code, +close_note, +tva, +localtax1, +localtax2, +revenuestamp, +total, +total_ttc, +fk_statut, +fk_user_author, +fk_user_valid, +fk_facture_source, +fk_projet, +fk_account, +fk_currency, +fk_cond_reglement, +fk_mode_reglement, +date_lim_reglement, +note_private, +note_public, +model_pdf, +import_key, +extraparams) +SELECT +lettrage.nopfact, --facnumber +1, --entity, +NULL, --ref_ext, +NULL, --ref_int, +NULL, --ref_client, +0, --type, +NULL, --increment, +llx_societe.rowid, --fk_soc, +IFNULL(lettrage.datefact,NOW()), --datec, +IFNULL(lettrage.datefact,NOW()), --datef, +IFNULL(lettrage.datefact,NOW()), --date_valid, +NOW(), --tms, +1, --paye, +0, --amount, +NULL, --remise_percent, +NULL, --remise_absolue, +0, --remise, +NULL, --close_code, +NULL, --close_note, +0, --tva, +0, --localtax1, +0, --localtax2, +0, --revenuestamp, +0, --total, +0, --total_ttc, +2, --fk_statut, +1, --fk_user_author, +1, --fk_user_valid, +NULL, --fk_facture_source, +NULL, --fk_projet, +NULL, --fk_account, +NULL, --fk_currency, +llx_societe.cond_reglement, --fk_cond_reglement, +llx_societe.mode_reglement, --fk_mode_reglement, +MAX(tempfact.dateche), --date_lim_reglement, +NULL, --note_private, +NULL, --note_public, +'crabe', --model_pdf, +lettrage.id, --import_key, +NULL --extraparams +FROM lettrage +INNER JOIN tempfact ON tempfact.numfact=lettrage.nopfact +INNER JOIN thirdparty ON thirdparty.id=lettrage.thirdparty_id +INNER JOIN account ON account.id=thirdparty.account_id +INNER JOIN llx_societe ON llx_societe.import_key=account.id +INNER JOIN convct ON convct.id=lettrage.convct_id +WHERE convct.supprime=0 +GROUP BY lettrage.nopfact; + +--import facture impeye +INSERT INTO llx_facture ( +facnumber, +entity, +ref_ext, +ref_int, +ref_client, +type, +increment, +fk_soc,datec, +datef, +date_valid, +tms, +paye, +amount, +remise_percent, +remise_absolue, +remise, +close_code, +close_note, +tva, +localtax1, +localtax2, +revenuestamp, +total, +total_ttc, +fk_statut, +fk_user_author, +fk_user_valid, +fk_facture_source, +fk_projet, +fk_account, +fk_currency, +fk_cond_reglement, +fk_mode_reglement, +date_lim_reglement, +note_private, +note_public, +model_pdf, +import_key, +extraparams) +SELECT +mvt.piece, --facnumber +1, --entity, +NULL, --ref_ext, +NULL, --ref_int, +NULL, --ref_client, +0, --type, +NULL, --increment, +llx_societe.rowid, --fk_soc, +IFNULL(mvt.datefact,NOW()), --datec, +IFNULL(mvt.datefact,NOW()), --datef, +IFNULL(mvt.datefact,NOW()), --date_valid, +NOW(), --tms, +0, --paye, +0, --amount, +NULL, --remise_percent, +NULL, --remise_absolue, +0, --remise, +NULL, --close_code, +NULL, --close_note, +0, --tva, +0, --localtax1, +0, --localtax2, +0, --revenuestamp, +0, --total, +0, --total_ttc, +1, --fk_statut, +1, --fk_user_author, +1, --fk_user_valid, +NULL, --fk_facture_source, +NULL, --fk_projet, +NULL, --fk_account, +NULL, --fk_currency, +llx_societe.cond_reglement, --fk_cond_reglement, +llx_societe.mode_reglement, --fk_mode_reglement, +MAX(tempfact.dateche), --date_lim_reglement, +NULL, --note_private, +NULL, --note_public, +'crabe', --model_pdf, +mvt.id, --import_key, +NULL --extraparams +FROM mvt +INNER JOIN tempfact ON tempfact.numfact=mvt.piece +INNER JOIN thirdparty ON thirdparty.id=mvt.thirdparty_id +INNER JOIN account ON account.id=thirdparty.account_id +INNER JOIN llx_societe ON llx_societe.import_key=account.id +INNER JOIN convct ON convct.id=mvt.convct_id +WHERE convct.supprime=0 +AND mvt.piece NOT IN (SELECT llx_facture.facnumber FROM llx_facture) +GROUP BY mvt.piece; + +--Import Invoice line +INSERT INTO llx_facturedet ( +fk_facture, +fk_parent_line, +fk_product, +label, +description, +tva_tx, +localtax1_tx, +localtax1_type, +localtax2_tx, +localtax2_type, +qty, +remise_percent, +remise, +fk_remise_except, +subprice, +price, +total_ht, +total_tva, +total_localtax1, +total_localtax2, +total_ttc, +product_type, +date_start, +date_end, +info_bits, +buy_price_ht, +fk_product_fournisseur_price, +fk_code_ventilation, +special_code, +rang, +import_key) +SELECT DISTINCT +llx_facture.rowid, --fk_facture, +NULL, --fk_parent_line, +NULL, --fk_product, +NULL, --label, +tempfact.intitule, --description, +tempfact.tauxtva, --tva_tx, +0, --localtax1_tx, +0, --localtax1_type, +0, --localtax2_tx, +0, --localtax2_type, +tempfact.nbjr, --qty, +0, --remise_percent, +0, --remise, +NULL, --fk_remise_except, +tempfact.taux, --subprice, +NULL, --price, +tempfact.montant, --total_ht, +tempfact.mttva, --total_tva, +0, --total_localtax1, +0, --total_localtax2, +tempfact.mtttc, --total_ttc, +1, --product_type, +NULL, --date_start, +NULL, --date_end, +0, --info_bits, +0, --buy_price_ht, +NULL, --fk_product_fournisseur_price, +0, --fk_code_ventilation, +0, --special_code, +tempfact.numlig, --rang, +NULL --import_key +FROM llx_facture +INNER JOIN tempfact ON tempfact.numfact=llx_facture.facnumber +INNER JOIN thirdparty ON thirdparty.id=tempfact.thirdparty_id +INNER JOIN account ON account.id=thirdparty.account_id +INNER JOIN llx_societe ON llx_societe.import_key=account.id +INNER JOIN convct ON convct.id=tempfact.convct_id; + + +--Update invoice header amount +UPDATE llx_facture +SET llx_facture.total_ttc=(SELECT SUM(total_ttc) FROM llx_facturedet WHERE llx_facturedet.fk_facture=llx_facture.rowid GROUP BY llx_facturedet.fk_facture), +llx_facture.tva=(SELECT SUM(total_tva) FROM llx_facturedet WHERE llx_facturedet.fk_facture=llx_facture.rowid GROUP BY llx_facturedet.fk_facture), +llx_facture.total=(SELECT SUM(total) FROM llx_facturedet WHERE llx_facturedet.fk_facture=llx_facture.rowid GROUP BY llx_facturedet.fk_facture), +llx_facture.tms=llx_facture.tms; + + +--Add invoice contact +INSERT INTO llx_element_contact ( +datecreate, +statut, +element_id, +fk_c_type_contact, +fk_socpeople) +SELECT DISTINCT +convct.created, +4, +llx_facture.rowid, +60, +llx_socpeople.rowid +FROM tempfact +INNER JOIN llx_facture ON tempfact.numfact=llx_facture.facnumber +INNER JOIN convct ON convct.id=tempfact.convct_id +INNER JOIN contact ON convct.recipient_contact_id=contact.id +INNER JOIN llx_socpeople ON llx_socpeople.import_key=contact.id; + + +--Lier facture Session/client +INSERT INTO llx_agefodd_session_element( +fk_session_agefodd, +fk_soc, +element_type, +fk_element, +fk_user_author, +datec, +fk_user_mod, +tms) +SELECT DISTINCT +llx_agefodd_session.rowid, +llx_societe.rowid, +'invoice', +llx_facture.rowid, +1, +NOW(), +1, +NOW() +FROM llx_facture +INNER JOIN tempfact ON tempfact.numfact=llx_facture.facnumber +INNER JOIN convct ON convct.id=tempfact.convct_id +INNER JOIN session as sess ON sess.id=convct.session_id +INNER JOIN llx_agefodd_session ON llx_agefodd_session.import_key=sess.id +INNER JOIN account ON account.id=convct.ent_account_id +INNER JOIN llx_societe ON llx_societe.import_key=account.id + + + + + +TRUNCATE tABLE `llx_categorie_product`; +INSERT INTO `llx_categorie_product` (`fk_categorie`, `fk_product`, `import_key`) VALUES +(24, 133, NULL), +(24, 132, NULL), +(7, 138, NULL), +(7, 141, NULL), +(7, 144, NULL), +(7, 143, NULL), +(7, 142, NULL), +(9, 116, NULL), +(9, 119, NULL), +(9, 118, NULL), +(9, 117, NULL), +(9, 115, NULL), +(9, 124, NULL), +(24, 125, NULL), +(10, 126, NULL), +(3, 130, NULL), +(9, 154, NULL), +(10, 127, NULL), +(7, 137, NULL), +(24, 135, NULL), +(7, 145, NULL), +(9, 120, NULL), +(7, 153, NULL), +(9, 123, NULL), +(10, 129, NULL), +(25, 131, NULL), +(23, 147, NULL); + +TRUNCATE TABLE `llx_usergroup`; +INSERT INTO `llx_usergroup` (`rowid`, `nom`, `entity`, `datec`, `tms`, `note`) VALUES +(1, 'Direction', 1, '2013-10-24 07:34:32', '2013-10-24 07:34:32', ''), +(2, 'Général', 1, '2013-10-24 07:35:41', '2013-10-24 07:35:41', ''), +(3, 'Spécifique', 1, '2013-10-24 07:37:05', '2013-10-24 07:37:05', ''); + +TRUNCATE TABLE `llx_usergroup_user`; +INSERT INTO `llx_usergroup_user` (`rowid`, `entity`, `fk_user`, `fk_usergroup`) VALUES +(7, 1, 2, 2), +(10, 1, 3, 3), +(4, 1, 4, 2), +(3, 1, 5, 2), +(9, 1, 6, 2), +(1, 1, 8, 1), +(2, 1, 10, 1), +(5, 1, 11, 2), +(6, 1, 13, 2), +(8, 1, 14, 2), +(11, 1, 15, 3), +(12, 1, 38, 1); + + +TRUNCATE TABLE `llx_usergroup_rights`; +INSERT INTO `llx_usergroup_rights` (`rowid`, `fk_usergroup`, `fk_id`) VALUES +(40, 1, 11), +(41, 1, 12), +(42, 1, 13), +(43, 1, 14), +(44, 1, 15), +(45, 1, 16), +(46, 1, 19), +(77, 1, 21), +(78, 1, 22), +(79, 1, 24), +(80, 1, 25), +(81, 1, 26), +(82, 1, 27), +(83, 1, 28), +(26, 1, 81), +(27, 1, 82), +(28, 1, 84), +(29, 1, 86), +(30, 1, 87), +(31, 1, 88), +(32, 1, 89), +(34, 1, 95), +(35, 1, 96), +(36, 1, 97), +(37, 1, 98), +(16, 1, 111), +(17, 1, 112), +(18, 1, 113), +(19, 1, 114), +(20, 1, 115), +(21, 1, 116), +(22, 1, 117), +(88, 1, 121), +(89, 1, 122), +(90, 1, 125), +(91, 1, 126), +(75, 1, 221), +(74, 1, 222), +(73, 1, 223), +(72, 1, 229), +(71, 1, 237), +(70, 1, 238), +(76, 1, 239), +(23, 1, 241), +(24, 1, 242), +(25, 1, 243), +(97, 1, 251), +(98, 1, 252), +(99, 1, 253), +(100, 1, 254), +(101, 1, 255), +(102, 1, 256), +(92, 1, 262), +(93, 1, 281), +(94, 1, 282), +(95, 1, 283), +(96, 1, 286), +(103, 1, 341), +(104, 1, 342), +(105, 1, 343), +(106, 1, 344), +(107, 1, 351), +(108, 1, 352), +(109, 1, 353), +(110, 1, 354), +(111, 1, 358), +(278, 1, 531), +(85, 1, 532), +(86, 1, 534), +(87, 1, 538), +(48, 1, 1181), +(49, 1, 1182), +(50, 1, 1183), +(51, 1, 1184), +(52, 1, 1185), +(53, 1, 1186), +(54, 1, 1187), +(55, 1, 1188), +(39, 1, 1201), +(38, 1, 1202), +(56, 1, 1231), +(57, 1, 1232), +(58, 1, 1233), +(59, 1, 1234), +(60, 1, 1235), +(61, 1, 1236), +(62, 1, 1237), +(69, 1, 1251), +(47, 1, 1321), +(33, 1, 1421), +(9, 1, 2401), +(10, 1, 2402), +(11, 1, 2403), +(12, 1, 2411), +(13, 1, 2412), +(14, 1, 2413), +(15, 1, 2414), +(63, 1, 20001), +(64, 1, 20002), +(65, 1, 20003), +(66, 1, 20004), +(67, 1, 20005), +(68, 1, 20006), +(1, 1, 103001), +(2, 1, 103002), +(3, 1, 103003), +(4, 1, 103004), +(5, 1, 103005), +(6, 1, 103006), +(7, 1, 103007), +(8, 1, 103008), +(131, 2, 11), +(132, 2, 12), +(133, 2, 13), +(134, 2, 14), +(135, 2, 15), +(136, 2, 16), +(157, 2, 21), +(158, 2, 22), +(159, 2, 24), +(160, 2, 25), +(161, 2, 26), +(162, 2, 27), +(163, 2, 28), +(168, 2, 121), +(169, 2, 122), +(170, 2, 125), +(129, 2, 241), +(173, 2, 281), +(174, 2, 282), +(175, 2, 283), +(176, 2, 286), +(164, 2, 531), +(139, 2, 1181), +(140, 2, 1182), +(141, 2, 1183), +(142, 2, 1184), +(143, 2, 1185), +(144, 2, 1186), +(145, 2, 1187), +(146, 2, 1188), +(147, 2, 1231), +(148, 2, 1232), +(149, 2, 1233), +(150, 2, 1234), +(151, 2, 1235), +(152, 2, 1236), +(153, 2, 1237), +(154, 2, 1321), +(120, 2, 2401), +(121, 2, 2402), +(122, 2, 2403), +(126, 2, 2414), +(155, 2, 20001), +(156, 2, 20006), +(283, 2, 103001), +(254, 2, 103005), +(256, 2, 103007), +(258, 2, 103008), +(203, 3, 11), +(204, 3, 12), +(205, 3, 13), +(206, 3, 14), +(207, 3, 15), +(208, 3, 16), +(209, 3, 19), +(235, 3, 21), +(236, 3, 22), +(237, 3, 24), +(238, 3, 25), +(239, 3, 26), +(240, 3, 27), +(241, 3, 28), +(268, 3, 121), +(269, 3, 122), +(270, 3, 125), +(271, 3, 126), +(233, 3, 221), +(232, 3, 222), +(231, 3, 223), +(230, 3, 229), +(229, 3, 237), +(228, 3, 238), +(234, 3, 239), +(192, 3, 241), +(272, 3, 262), +(273, 3, 281), +(274, 3, 282), +(275, 3, 283), +(276, 3, 286), +(242, 3, 531), +(211, 3, 1181), +(212, 3, 1182), +(213, 3, 1183), +(214, 3, 1184), +(215, 3, 1185), +(216, 3, 1186), +(217, 3, 1187), +(218, 3, 1188), +(202, 3, 1201), +(201, 3, 1202), +(219, 3, 1231), +(220, 3, 1232), +(221, 3, 1233), +(222, 3, 1234), +(223, 3, 1235), +(224, 3, 1236), +(225, 3, 1237), +(210, 3, 1321), +(185, 3, 2401), +(186, 3, 2402), +(187, 3, 2403), +(191, 3, 2414), +(226, 3, 20001), +(177, 3, 103001), +(178, 3, 103002), +(179, 3, 103003), +(180, 3, 103004), +(181, 3, 103005), +(182, 3, 103006), +(183, 3, 103007), +(184, 3, 103008), +(279, 1, 2354687), +(280, 2, 103002), +(282, 2, 103003); + +TRUNCATE TABLE `llx_user_rights`; +INSERT INTO `llx_user_rights` (`rowid`, `fk_user`, `fk_id`) VALUES +(1198, 1, 11), +(1173, 1, 12), +(1179, 1, 13), +(1182, 1, 14), +(1188, 1, 15), +(1191, 1, 16), +(1197, 1, 19), +(1104, 1, 21), +(1078, 1, 22), +(1083, 1, 24), +(1089, 1, 25), +(1093, 1, 26), +(1099, 1, 27), +(1105, 1, 28), +(499, 1, 81), +(471, 1, 82), +(477, 1, 84), +(483, 1, 86), +(486, 1, 87), +(492, 1, 88), +(498, 1, 89), +(1155, 1, 95), +(1158, 1, 96), +(1165, 1, 97), +(1164, 1, 98), +(1285, 1, 111), +(1254, 1, 112), +(1260, 1, 113), +(1266, 1, 114), +(1272, 1, 115), +(1278, 1, 116), +(1284, 1, 117), +(1383, 1, 121), +(1372, 1, 122), +(1378, 1, 125), +(1384, 1, 126), +(249, 1, 221), +(238, 1, 222), +(244, 1, 223), +(250, 1, 229), +(255, 1, 237), +(258, 1, 238), +(261, 1, 239), +(273, 1, 241), +(268, 1, 242), +(274, 1, 243), +(1389, 1, 262), +(1407, 1, 281), +(1396, 1, 282), +(1402, 1, 283), +(1408, 1, 286), +(1, 1, 341), +(2, 1, 342), +(3, 1, 343), +(4, 1, 344), +(1465, 1, 531), +(933, 1, 532), +(939, 1, 534), +(945, 1, 538), +(1290, 1, 1181), +(1362, 1, 1182), +(1297, 1, 1183), +(1303, 1, 1184), +(1309, 1, 1185), +(1315, 1, 1186), +(1321, 1, 1187), +(1326, 1, 1188), +(1356, 1, 1231), +(1336, 1, 1232), +(1342, 1, 1233), +(1348, 1, 1234), +(1353, 1, 1235), +(1357, 1, 1236), +(1363, 1, 1237), +(1203, 1, 1321), +(504, 1, 1421), +(960, 1, 2401), +(955, 1, 2402), +(961, 1, 2403), +(975, 1, 2411), +(970, 1, 2412), +(976, 1, 2413), +(981, 1, 2414), +(279, 1, 20001), +(282, 1, 20002), +(285, 1, 20003), +(288, 1, 20004), +(291, 1, 20005), +(294, 1, 20006), +(336, 1, 103001), +(300, 1, 103002), +(306, 1, 103003), +(312, 1, 103004), +(318, 1, 103005), +(324, 1, 103006), +(331, 1, 103007), +(337, 1, 103008), +(251, 8, 221), +(240, 8, 222), +(246, 8, 223), +(252, 8, 229), +(256, 8, 237), +(259, 8, 238), +(262, 8, 239), +(275, 8, 241), +(270, 8, 242), +(276, 8, 243), +(280, 8, 20001), +(283, 8, 20002), +(286, 8, 20003), +(289, 8, 20004), +(292, 8, 20005), +(295, 8, 20006), +(253, 10, 221), +(242, 10, 222), +(248, 10, 223), +(254, 10, 229), +(257, 10, 237), +(260, 10, 238), +(263, 10, 239), +(277, 10, 241), +(272, 10, 242), +(278, 10, 243), +(281, 10, 20001), +(284, 10, 20002), +(287, 10, 20003), +(290, 10, 20004), +(293, 10, 20005), +(296, 10, 20006), +(338, 8, 103001), +(340, 10, 103001), +(302, 8, 103002), +(304, 10, 103002), +(308, 8, 103003), +(310, 10, 103003), +(314, 8, 103004), +(316, 10, 103004), +(320, 8, 103005), +(322, 10, 103005), +(326, 8, 103006), +(328, 10, 103006), +(333, 8, 103007), +(335, 10, 103007), +(339, 8, 103008), +(341, 10, 103008), +(1385, 8, 121), +(1387, 10, 121), +(1374, 8, 122), +(1376, 10, 122), +(1380, 8, 125), +(1382, 10, 125), +(1386, 8, 126), +(1388, 10, 126), +(1390, 8, 262), +(1391, 10, 262), +(1409, 8, 281), +(1411, 10, 281), +(1398, 8, 282), +(1400, 10, 282), +(1404, 8, 283), +(1406, 10, 283), +(1410, 8, 286), +(1412, 10, 286), +(1106, 8, 21), +(1108, 10, 21), +(1080, 8, 22), +(1082, 10, 22), +(1085, 8, 24), +(1087, 10, 24), +(1090, 8, 25), +(1091, 10, 25), +(1095, 8, 26), +(1097, 10, 26), +(1101, 8, 27), +(1103, 10, 27), +(1107, 8, 28), +(1109, 10, 28), +(501, 8, 81), +(503, 10, 81), +(473, 8, 82), +(475, 10, 82), +(479, 8, 84), +(481, 10, 84), +(484, 8, 86), +(485, 10, 86), +(488, 8, 87), +(490, 10, 87), +(494, 8, 88), +(496, 10, 88), +(500, 8, 89), +(502, 10, 89), +(505, 8, 1421), +(506, 10, 1421), +(1156, 8, 95), +(1157, 10, 95), +(1159, 8, 96), +(1160, 10, 96), +(1167, 8, 97), +(1169, 10, 97), +(1166, 8, 98), +(1168, 10, 98), +(1200, 8, 11), +(1202, 10, 11), +(1175, 8, 12), +(1177, 10, 12), +(1180, 8, 13), +(1181, 10, 13), +(1184, 8, 14), +(1186, 10, 14), +(1189, 8, 15), +(1190, 10, 15), +(1193, 8, 16), +(1195, 10, 16), +(1199, 8, 19), +(1201, 10, 19), +(1204, 8, 1321), +(1205, 10, 1321), +(1287, 8, 111), +(1289, 10, 111), +(1256, 8, 112), +(1258, 10, 112), +(1262, 8, 113), +(1264, 10, 113), +(1268, 8, 114), +(1270, 10, 114), +(1274, 8, 115), +(1276, 10, 115), +(1280, 8, 116), +(1282, 10, 116), +(1286, 8, 117), +(1288, 10, 117), +(1291, 8, 1181), +(1292, 10, 1181), +(1364, 8, 1182), +(1366, 10, 1182), +(1299, 8, 1183), +(1301, 10, 1183), +(1305, 8, 1184), +(1307, 10, 1184), +(1311, 8, 1185), +(1313, 10, 1185), +(1317, 8, 1186), +(1319, 10, 1186), +(1323, 8, 1187), +(1325, 10, 1187), +(1328, 8, 1188), +(1330, 10, 1188), +(1358, 8, 1231), +(1360, 10, 1231), +(1338, 8, 1232), +(1340, 10, 1232), +(1344, 8, 1233), +(1346, 10, 1233), +(1350, 8, 1234), +(1352, 10, 1234), +(1354, 8, 1235), +(1355, 10, 1235), +(1359, 8, 1236), +(1361, 10, 1236), +(1365, 8, 1237), +(1367, 10, 1237), +(948, 8, 531), +(1467, 10, 531), +(935, 8, 532), +(937, 10, 532), +(941, 8, 534), +(943, 10, 534), +(947, 8, 538), +(949, 10, 538), +(962, 8, 2401), +(964, 10, 2401), +(957, 8, 2402), +(959, 10, 2402), +(963, 8, 2403), +(965, 10, 2403), +(977, 8, 2411), +(979, 10, 2411), +(972, 8, 2412), +(974, 10, 2412), +(978, 8, 2413), +(980, 10, 2413), +(982, 8, 2414), +(983, 10, 2414), +(1422, 1, 41), +(1424, 8, 41), +(1426, 10, 41), +(1417, 1, 42), +(1419, 8, 42), +(1421, 10, 42), +(1423, 1, 44), +(1425, 8, 44), +(1427, 10, 44), +(1437, 1, 141), +(1439, 8, 141), +(1441, 10, 141), +(1432, 1, 142), +(1434, 8, 142), +(1436, 10, 142), +(1438, 1, 144), +(1440, 8, 144), +(1442, 10, 144), +(1443, 38, 1181), +(1444, 38, 1231), +(1445, 38, 121), +(1446, 38, 262), +(1447, 38, 281), +(1448, 38, 21), +(1449, 38, 1182), +(1450, 38, 221), +(1451, 38, 241), +(1452, 38, 341), +(1453, 38, 342), +(1454, 38, 343), +(1455, 38, 344), +(1456, 38, 531), +(1457, 38, 11), +(1458, 38, 95), +(1459, 38, 97), +(1460, 38, 2401), +(1461, 38, 20001), +(1462, 38, 103001), +(1463, 38, 111), +(1464, 38, 1201), +(1466, 1, 2354687), +(1468, 10, 2354687); + + + + +TRUNCATE TABLE `llx_user_extrafields`; +INSERT INTO `llx_user_extrafields` (`rowid`, `tms`, `fk_object`, `import_key`, `u_prospection`, `u_commercial`, `u_logistique`, `u_interentreprises`, `u_communication`) VALUES +(10, '2013-11-01 22:26:31', 6, NULL, 1, 1, NULL, NULL, NULL), +(2, '2013-11-01 22:19:19', 14, NULL, NULL, NULL, 1, NULL, NULL), +(4, '2013-11-01 22:20:13', 13, NULL, NULL, NULL, 1, NULL, NULL), +(5, '2013-11-01 22:20:58', 11, NULL, NULL, 1, NULL, NULL, NULL), +(6, '2013-11-01 22:21:44', 5, NULL, 1, 1, NULL, NULL, NULL), +(7, '2013-11-01 22:22:12', 4, NULL, NULL, 1, NULL, NULL, NULL), +(15, '2013-11-02 09:00:32', 3, NULL, 1, 1, NULL, 1, NULL), +(9, '2013-11-01 22:25:31', 15, NULL, NULL, NULL, NULL, NULL, 1), +(12, '2013-11-01 22:27:50', 2, NULL, NULL, NULL, 1, NULL, NULL), +(13, '2013-11-01 22:31:12', 8, NULL, NULL, 1, NULL, NULL, NULL); + +TRUNCATE TABLE llx_rights_def; +INSERT INTO `llx_rights_def` (`id`, `libelle`, `module`, `entity`, `perms`, `subperms`, `type`, `bydefault`) VALUES +(11, 'Lire les factures', 'facture', 1, 'lire', NULL, 'a', 1), +(12, 'Creer/modifier les factures', 'facture', 1, 'creer', NULL, 'a', 0), +(13, 'Dévalider les factures', 'facture', 1, 'invoice_advance', 'unvalidate', 'a', 0), +(14, 'Valider les factures', 'facture', 1, 'valider', NULL, 'a', 0), +(15, 'Envoyer les factures par mail', 'facture', 1, 'invoice_advance', 'send', 'a', 0), +(16, 'Emettre des paiements sur les factures', 'facture', 1, 'paiement', NULL, 'a', 0), +(19, 'Supprimer les factures', 'facture', 1, 'supprimer', NULL, 'a', 0), +(21, 'Lire les propositions commerciales', 'propale', 1, 'lire', NULL, 'r', 1), +(22, 'Creer/modifier les propositions commerciales', 'propale', 1, 'creer', NULL, 'w', 0), +(24, 'Valider les propositions commerciales', 'propale', 1, 'valider', NULL, 'd', 0), +(25, 'Envoyer les propositions commerciales aux clients', 'propale', 1, 'propal_advance', 'send', 'd', 0), +(26, 'Cloturer les propositions commerciales', 'propale', 1, 'cloturer', NULL, 'd', 0), +(27, 'Supprimer les propositions commerciales', 'propale', 1, 'supprimer', NULL, 'd', 0), +(28, 'Exporter les propositions commerciales et attributs', 'propale', 1, 'export', NULL, 'r', 0), +(81, 'Lire les commandes clients', 'commande', 1, 'lire', NULL, 'r', 1), +(82, 'Creer/modifier les commandes clients', 'commande', 1, 'creer', NULL, 'w', 0), +(84, 'Valider les commandes clients', 'commande', 1, 'valider', NULL, 'd', 0), +(86, 'Envoyer les commandes clients', 'commande', 1, 'order_advance', 'send', 'd', 0), +(87, 'Cloturer les commandes clients', 'commande', 1, 'cloturer', NULL, 'd', 0), +(88, 'Annuler les commandes clients', 'commande', 1, 'annuler', NULL, 'd', 0), +(89, 'Supprimer les commandes clients', 'commande', 1, 'supprimer', NULL, 'd', 0), +(95, 'Lire CA, bilans, resultats', 'compta', 1, 'resultat', 'lire', 'r', 1), +(96, 'Parametrer la ventilation', 'compta', 1, 'ventilation', 'parametrer', 'r', 0), +(97, 'Lire les ventilations de factures', 'compta', 1, 'ventilation', 'lire', 'r', 1), +(98, 'Ventiler les lignes de factures', 'compta', 1, 'ventilation', 'creer', 'r', 0), +(111, 'Lire les comptes bancaires', 'banque', 1, 'lire', NULL, 'r', 1), +(112, 'Creer/modifier montant/supprimer ecriture bancaire', 'banque', 1, 'modifier', NULL, 'w', 0), +(113, 'Configurer les comptes bancaires (creer, gerer categories)', 'banque', 1, 'configurer', NULL, 'a', 0), +(114, 'Rapprocher les ecritures bancaires', 'banque', 1, 'consolidate', NULL, 'w', 0), +(115, 'Exporter transactions et releves', 'banque', 1, 'export', NULL, 'r', 0), +(116, 'Virements entre comptes', 'banque', 1, 'transfer', NULL, 'w', 0), +(117, 'Gerer les envois de cheques', 'banque', 1, 'cheque', NULL, 'w', 0), +(121, 'Lire les societes', 'societe', 1, 'lire', NULL, 'r', 1), +(122, 'Creer modifier les societes', 'societe', 1, 'creer', NULL, 'w', 0), +(125, 'Supprimer les societes', 'societe', 1, 'supprimer', NULL, 'd', 0), +(126, 'Exporter les societes', 'societe', 1, 'export', NULL, 'r', 0), +(221, 'Consulter les mailings', 'mailing', 1, 'lire', NULL, 'r', 1), +(222, 'Creer/modifier les mailings (sujet, destinataires...)', 'mailing', 1, 'creer', NULL, 'w', 0), +(223, 'Valider les mailings (permet leur envoi)', 'mailing', 1, 'valider', NULL, 'w', 0), +(229, 'Supprimer les mailings', 'mailing', 1, 'supprimer', NULL, 'd', 0), +(237, 'View recipients and info', 'mailing', 1, 'mailing_advance', 'recipient', 'r', 0), +(238, 'Manually send mailings', 'mailing', 1, 'mailing_advance', 'send', 'w', 0), +(239, 'Delete mailings after validation and/or sent', 'mailing', 1, 'mailing_advance', 'delete', 'd', 0), +(241, 'Lire les categories', 'categorie', 1, 'lire', NULL, 'r', 1), +(242, 'Creer/modifier les categories', 'categorie', 1, 'creer', NULL, 'w', 0), +(243, 'Supprimer les categories', 'categorie', 1, 'supprimer', NULL, 'd', 0), +(251, 'Consulter les autres utilisateurs', 'user', 1, 'user', 'lire', 'r', 0), +(252, 'Consulter les permissions des autres utilisateurs', 'user', 1, 'user_advance', 'readperms', 'r', 0), +(253, 'Creer/modifier utilisateurs internes et externes', 'user', 1, 'user', 'creer', 'w', 0), +(254, 'Creer/modifier utilisateurs externes seulement', 'user', 1, 'user_advance', 'write', 'w', 0), +(255, 'Modifier le mot de passe des autres utilisateurs', 'user', 1, 'user', 'password', 'w', 0), +(256, 'Supprimer ou desactiver les autres utilisateurs', 'user', 1, 'user', 'supprimer', 'd', 0), +(262, 'Consulter tous les tiers par utilisateurs internes (sinon uniquement si contact commercial). Non effectif pour utilisateurs externes (tjs limités à eux-meme).', 'societe', 1, 'client', 'voir', 'r', 1), +(281, 'Lire les contacts', 'societe', 1, 'contact', 'lire', 'r', 1), +(282, 'Creer modifier les contacts', 'societe', 1, 'contact', 'creer', 'w', 0), +(283, 'Supprimer les contacts', 'societe', 1, 'contact', 'supprimer', 'd', 0), +(286, 'Exporter les contacts', 'societe', 1, 'contact', 'export', 'd', 0), +(341, 'Consulter ses propres permissions', 'user', 1, 'self_advance', 'readperms', 'r', 1), +(342, 'Creer/modifier ses propres infos utilisateur', 'user', 1, 'self', 'creer', 'w', 1), +(343, 'Modifier son propre mot de passe', 'user', 1, 'self', 'password', 'w', 1), +(344, 'Modifier ses propres permissions', 'user', 1, 'self_advance', 'writeperms', 'w', 1), +(351, 'Consulter les groupes', 'user', 1, 'group_advance', 'read', 'r', 0), +(352, 'Consulter les permissions des groupes', 'user', 1, 'group_advance', 'readperms', 'r', 0), +(353, 'Creer/modifier les groupes et leurs permissions', 'user', 1, 'group_advance', 'write', 'w', 0), +(354, 'Supprimer ou desactiver les groupes', 'user', 1, 'group_advance', 'delete', 'd', 0), +(358, 'Exporter les utilisateurs', 'user', 1, 'user', 'export', 'r', 0), +(531, 'Lire les services', 'service', 1, 'lire', NULL, 'r', 1), +(532, 'Creer/modifier les services', 'service', 1, 'creer', NULL, 'w', 0), +(534, 'Supprimer les services', 'service', 1, 'supprimer', NULL, 'd', 0), +(538, 'Exporter les services', 'service', 1, 'export', NULL, 'r', 0), +(1181, 'Consulter les fournisseurs', 'fournisseur', 1, 'lire', NULL, 'r', 1), +(1182, 'Consulter les commandes fournisseur', 'fournisseur', 1, 'commande', 'lire', 'r', 1), +(1183, 'Creer une commande fournisseur', 'fournisseur', 1, 'commande', 'creer', 'w', 0), +(1184, 'Valider une commande fournisseur', 'fournisseur', 1, 'commande', 'valider', 'w', 0), +(1185, 'Approuver une commande fournisseur', 'fournisseur', 1, 'commande', 'approuver', 'w', 0), +(1186, 'Commander une commande fournisseur', 'fournisseur', 1, 'commande', 'commander', 'w', 0), +(1187, 'Receptionner une commande fournisseur', 'fournisseur', 1, 'commande', 'receptionner', 'd', 0), +(1188, 'Supprimer une commande fournisseur', 'fournisseur', 1, 'commande', 'supprimer', 'd', 0), +(1231, 'Consulter les factures fournisseur', 'fournisseur', 1, 'facture', 'lire', 'r', 1), +(1232, 'Creer une facture fournisseur', 'fournisseur', 1, 'facture', 'creer', 'w', 0), +(1233, 'Valider une facture fournisseur', 'fournisseur', 1, 'facture', 'valider', 'w', 0), +(1234, 'Supprimer une facture fournisseur', 'fournisseur', 1, 'facture', 'supprimer', 'd', 0), +(1235, 'Envoyer les factures par mail', 'fournisseur', 1, 'supplier_invoice_advance', 'send', 'a', 0), +(1236, 'Exporter les factures fournisseurs, attributs et reglements', 'fournisseur', 1, 'facture', 'export', 'r', 0), +(1237, 'Exporter les commande fournisseurs, attributs', 'fournisseur', 1, 'commande', 'export', 'r', 0), +(1321, 'Exporter les factures clients, attributs et reglements', 'facture', 1, 'facture', 'export', 'r', 0), +(1421, 'Exporter les commandes clients et attributs', 'commande', 1, 'commande', 'export', 'r', 0), +(2401, 'Read actions/tasks linked to his account', 'agenda', 1, 'myactions', 'read', 'r', 1), +(2402, 'Create/modify actions/tasks linked to his account', 'agenda', 1, 'myactions', 'create', 'w', 0), +(2403, 'Delete actions/tasks linked to his account', 'agenda', 1, 'myactions', 'delete', 'w', 0), +(2411, 'Read actions/tasks of others', 'agenda', 1, 'allactions', 'read', 'r', 0), +(2412, 'Create/modify actions/tasks of others', 'agenda', 1, 'allactions', 'create', 'w', 0), +(2413, 'Delete actions/tasks of others', 'agenda', 1, 'allactions', 'delete', 'w', 0), +(2414, 'Export actions/tasks of others', 'agenda', 1, 'export', NULL, 'w', 0), +(20001, 'Lire/créer/modifier ses demandes de congés payés', 'holiday', 1, 'write', NULL, 'w', 1), +(20002, 'Lire/créer/modifier toutes les demandes de congés payés', 'holiday', 1, 'lire_tous', NULL, 'w', 0), +(20003, 'Supprimer des demandes de congés payés', 'holiday', 1, 'delete', NULL, 'w', 0), +(20004, 'Définir les congés payés des utilisateurs', 'holiday', 1, 'define_holiday', NULL, 'w', 0), +(20005, 'Voir les logs de modification des congés payés', 'holiday', 1, 'view_log', NULL, 'w', 0), +(20006, 'Accéder au rapport mensuel des congés payés', 'holiday', 1, 'month_report', NULL, 'w', 0), +(103001, 'Voir les sesisons', 'agefodd', 1, 'lire', NULL, 'w', 1), +(103002, 'Modifier les sessions', 'agefodd', 1, 'modifier', NULL, 'w', 0), +(103003, 'Creer les sessions', 'agefodd', 1, 'creer', NULL, 'w', 0), +(103004, 'Suppression des sessions', 'agefodd', 1, 'supprimer', NULL, 'w', 0), +(103005, 'Voir stats', 'agefodd', 1, 'viewstats', NULL, 'w', 0), +(103006, 'export', 'agefodd', 1, 'export', NULL, 'w', 0), +(103007, 'agenda', 'agefodd', 1, 'agenda', NULL, 'w', 0), +(103008, 'agendatrainer', 'agefodd', 1, 'agendatrainer', NULL, 'w', 0), +(103009, 'Voir les formations du catalogue', 'agefodd', 1, 'agefodd_formation_catalogue', 'lire', 'r', 1), +(103010, 'Creer/Modifier les formations du catalogue', 'agefodd', 1, 'agefodd_formation_catalogue', 'creer', 'r', 1), +(103011, 'Supprimer les formations du catalogue', 'agefodd', 1, 'agefodd_formation_catalogue', 'supprimer', 'r', 1), +(103012, 'Voir les sites (lieux)', 'agefodd', 1, 'agefodd_place', 'lire', 'r', 1), +(103013, 'Creer/Modifier les sites (lieux)', 'agefodd', 1, 'agefodd_place', 'creer', 'r', 1), +(103014, 'Supprimer les sites (lieux)', 'agefodd', 1, 'agefodd_place', 'supprimer', 'r', 1), +(265486, 'Modifier les commercieux d''un tiers', 'societe', 1, 'client', 'comm', 'r', 1), +(2354687, 'Mettre ajour les prix produits par client', 'service', 1, 'custprix', NULL, 'w', 0); + +--Set prospect thirdparty with no invoicie +UPDATE llx_societe SET client=6, tms=tms WHERE fournisseur=0; +UPDATE llx_societe SET client=2, tms=tms WHERE rowid NOT IN (select fk_soc from llx_facture) AND fournisseur=0;--Prospect +UPDATE llx_societe SET client=1, tms=tms WHERE rowid IN (select fk_soc from llx_facture) AND fournisseur=0;--Customer +UPDATE llx_societe SET client=3, tms=tms WHERE rowid IN (select fk_soc from llx_facture WHERE fk_soc=llx_societe.rowid HAVING MAX(date_valid) < DATE_ADD(NOW(), INTERVAL -1 YEAR)) AND fournisseur=0;--Prospect/Customer +UPDATE llx_societe SET client=0, tms=tms WHERE client=6 AND fournisseur=0;--All Other + +UPDATE llx_societe SET code_fournisseur=NULL, tms=tms WHERE fournisseur=0; +UPDATE llx_societe SET code_client=CONCAT_WS('','C', LPAD(rowid,5,'0')), tms=tms WHERE client IN (1,2,3); + +TRUNCATE TABLE llx_c_actioncomm; +INSERT INTO `llx_c_actioncomm` (`id`, `code`, `type`, `libelle`, `module`, `active`, `todo`, `position`) VALUES +(1, 'AC_TEL', 'system', 'Phone call', NULL, 1, NULL, 2), +(2, 'AC_FAX', 'systemauto', 'Send Fax', NULL, 1, NULL, 3), +(3, 'AC_PROP', 'systemauto', 'Send commercial proposal by email', 'propal', 0, NULL, 10), +(4, 'AC_EMAIL', 'system', 'Send Email', NULL, 1, NULL, 4), +(5, 'AC_RDV', 'system', 'Rendez-vous', NULL, 1, NULL, 1), +(8, 'AC_COM', 'systemauto', 'Send customer order by email', 'order', 0, NULL, 8), +(9, 'AC_FAC', 'systemauto', 'Send customer invoice by email', 'invoice', 0, NULL, 6), +(10, 'AC_SHIP', 'systemauto', 'Send shipping by email', 'shipping', 0, NULL, 11), +(30, 'AC_SUP_ORD', 'systemauto', 'Send supplier order by email', 'order_supplier', 0, NULL, 9), +(31, 'AC_SUP_INV', 'systemauto', 'Send supplier invoice by email', 'invoice_supplier', 0, NULL, 7), +(40, 'AC_OTH_AUTO', 'systemauto', 'Other (automatically inserted events)', NULL, 1, NULL, 20), +(50, 'AC_OTH', 'systemauto', 'Other (manually inserted events)', NULL, 1, NULL, 5), +(1030008, 'AC_AGF_CONSE', 'systemauto', 'Send Advise document by mail', 'agefodd', 1, NULL, 80), +(1030007, 'AC_AGF_CLOT', 'systemauto', 'Send dossier cloture by mail', 'agefodd', 1, NULL, 70), +(1030006, 'AC_AGF_ATTES', 'systemauto', 'Send attestation by mail', 'agefodd', 1, NULL, 60), +(1030005, 'AC_AGF_PRES', 'systemauto', 'Send Fiche présence by mail', 'agefodd', 1, NULL, 50), +(1030004, 'AC_AGF_PEDAG', 'systemauto', 'Send Fiche pédagogique by mail', 'agefodd', 1, NULL, 40), +(1030003, 'AC_AGF_CONVO', 'systemauto', 'Send Convocation by mail', 'agefodd', 1, NULL, 30), +(1030002, 'AC_AGF_CONVE', 'systemauto', 'Send Convention by mail', 'agefodd', 1, NULL, 20), +(1030001, 'AC_AGF_SESS', 'systemauto', 'Link to Training', 'agefodd', 1, NULL, 10), +(1030009, 'AC_AGF_ACCUE', 'systemauto', 'Send welcome document by mail', 'agefodd', 1, NULL, 90), +(1030010, 'AC_AGF_SESST', 'systemauto', 'Link to Training for trainer', 'agefodd', 1, NULL, 15), +(1030011, 'AC_COUR', 'user', 'Envoi courrier (doc, catalogue, ...)', NULL, 1, NULL, 5), +(1030013, 'AC_PROJ', 'user', 'Projet', NULL, 1, NULL, 6), +(1030014, 'AC_ENTR', 'user', 'Demande entrante', NULL, 1, NULL, 9), +(1030015, 'AC_EVT', 'user', 'Participation à un évènement Akteos', NULL, 1, NULL, 10); + + +TRUNCATE TABLE llx_c_typent; +INSERT INTO `llx_c_typent` (`id`, `code`, `libelle`, `active`, `module`) VALUES +(0, 'TE_UNKNOWN', '-', 1, NULL), +(1, 'TE_STARTUP', 'Start-up', 0, NULL), +(2, 'TE_GROUP', 'Entreprise française', 0, NULL), +(3, 'TE_PAY', 'Payeur', 1, NULL), +(4, 'TE_SMALL', 'TPE', 0, NULL), +(5, 'TE_ADMIN', 'Pouvoirs publics', 1, NULL), +(6, 'TE_WHOLE', 'Grossiste', 0, NULL), +(7, 'TE_RETAIL', 'Revendeur', 0, NULL), +(8, 'TE_PRIVATE', 'Particulier', 1, NULL), +(100, 'TE_OTHER', 'Autres', 0, NULL), +(101, 'TE_ENT_FR', 'Entreprise française', 1, NULL), +(102, 'TE_ENT_ET', 'Entreprise étrangère', 1, NULL), +(103, 'TE_OPCA', 'OPCA', 1, NULL), +(104, 'TE_FORMATION', 'Prestataire de formation', 1, NULL); + +TRUNCATE TABLE llx_c_effectif; +INSERT INTO `llx_c_effectif` (`id`, `code`, `libelle`, `active`, `module`) VALUES +(0, 'EF0', '-', 1, NULL), +(1, 'EF1-19', '1 - 19', 1, NULL), +(2, 'EF20-99', '20 - 99', 1, NULL), +(3, 'EF100-499', '100 - 499', 1, NULL), +(4, 'EF500-999', '500 - 999', 1, NULL), +(6, 'EF1000-', '> 1000', 1, NULL); + + +--insert event type Demande entrante +TRUNCATE TABLE llx_actioncomm; +INSERT INTO llx_actioncomm ( +ref_ext, +entity, +datep, +datep2, +fk_action, +code, +label, +note, +datec, +tms, +fk_user_author, +fk_user_mod, +fk_soc, +fk_contact, +fk_user_action, +transparency, +fk_user_done, +priority, +fulldayevent, +punctual, +percent, +location, +durationp, +durationa, +fk_element, +elementtype) +SELECT DISTINCT +planningitem.id, --ref_ext +1, --entity, +IFNULL(planningitem.begin_datetime,planningitem.end_datetime), --datep, +planningitem.end_datetime, --datep2, +1030014, --fk_action +'AC_ENTR', --code, +CASE WHEN (TRIM(planningitem.summary)='') THEN 'Demande entrante (renseignements, besoins)' ELSE planningitem.summary END, --label, +planningitem.description, --note, +planningitem.created, --datec, +planningitem.modified, --tms, +IFNULL(usercrea.rowid,1), --fk_user_author +IFNULL(usermod.rowid,1), --fk_user_mod +llx_societe.rowid, --fk_soc, +llx_socpeople.rowid, --fk_contact, +IFNULL(usercrea.rowid,1), --fk_user_action, +0, --transparency, +IFNULL(usercrea.rowid,1), --fk_user_done, +0, --priority, +0, --fulldayevent, +1, --punctual, +-1, --percent, +null, --location +planningitem.end_datetime-planningitem.begin_datetime, --durationp, +null, --durationa, +null, --fk_element +null --elementtype +FROM planningitem +LEFT OUTER JOIN planningitem_uobject as contactsoc ON planningitem.id=contactsoc.planningitem_id +LEFT OUTER JOIN planningitem_uobject as contctlink ON contctlink.planningitem_uobject_id=contactsoc.id +LEFT OUTER JOIN llx_socpeople ON llx_socpeople.import_key=contctlink.uobject_id +LEFT OUTER JOIN llx_societe ON llx_societe.import_key=contactsoc.uobject_id +LEFT OUTER JOIN sf_user as usercreast ON usercreast.id=planningitem.created_by_sf_user_id +LEFT OUTER JOIN llx_user as usercrea ON usercreast.email_address=usercrea.email +LEFT OUTER JOIN sf_user as usermodst ON usermodst.id=planningitem.modified_by_sf_user_id +LEFT OUTER JOIN llx_user as usermod ON usermodst.email_address=usermod.email +WHERE planningitem.planningitemtype_code='BES' +AND llx_societe.rowid IS NOT NULL AND planningitem.deleted=0; + +--insert event type Demande entrante +INSERT INTO llx_actioncomm ( +ref_ext, +entity, +datep, +datep2, +fk_action, +code, +label, +note, +datec, +tms, +fk_user_author, +fk_user_mod, +fk_soc, +fk_contact, +fk_user_action, +transparency, +fk_user_done, +priority, +fulldayevent, +punctual, +percent, +location, +durationp, +durationa, +fk_element, +elementtype) +SELECT DISTINCT +planningitem.id, --ref_ext +1, --entity, +IFNULL(planningitem.begin_datetime,planningitem.end_datetime), --datep, +planningitem.end_datetime, --datep2, +1030011, --fk_action +'AC_COUR', --code, +CASE WHEN (TRIM(planningitem.summary)='') THEN 'Envoi courrier (doc, catalogue, ...)' ELSE planningitem.summary END, --label, +planningitem.description, --note, +planningitem.created, --datec, +planningitem.modified, --tms, +IFNULL(usercrea.rowid,1), --fk_user_author +IFNULL(usermod.rowid,1), --fk_user_mod +llx_societe.rowid, --fk_soc, +llx_socpeople.rowid, --fk_contact, +IFNULL(usercrea.rowid,1), --fk_user_action, +0, --transparency, +IFNULL(usercrea.rowid,1), --fk_user_done, +0, --priority, +0, --fulldayevent, +1, --punctual, +-1, --percent, +null, --location +planningitem.end_datetime-planningitem.begin_datetime, --durationp, +null, --durationa, +null, --fk_element +null --elementtype +FROM planningitem +LEFT OUTER JOIN planningitem_uobject as contactsoc ON planningitem.id=contactsoc.planningitem_id +LEFT OUTER JOIN planningitem_uobject as contctlink ON contctlink.planningitem_uobject_id=contactsoc.id +LEFT OUTER JOIN llx_socpeople ON llx_socpeople.import_key=contctlink.uobject_id +LEFT OUTER JOIN llx_societe ON llx_societe.import_key=contactsoc.uobject_id +LEFT OUTER JOIN sf_user as usercreast ON usercreast.id=planningitem.created_by_sf_user_id +LEFT OUTER JOIN llx_user as usercrea ON usercreast.email_address=usercrea.email +LEFT OUTER JOIN sf_user as usermodst ON usermodst.id=planningitem.modified_by_sf_user_id +LEFT OUTER JOIN llx_user as usermod ON usermodst.email_address=usermod.email +WHERE planningitem.planningitemtype_code='DOC' +AND llx_societe.rowid IS NOT NULL +AND planningitem.deleted=0; + +--Insert Projet +INSERT INTO llx_actioncomm ( +ref_ext, +entity, +datep, +datep2, +fk_action, +code, +label, +note, +datec, +tms, +fk_user_author, +fk_user_mod, +fk_soc, +fk_contact, +fk_user_action, +transparency, +fk_user_done, +priority, +fulldayevent, +punctual, +percent, +location, +durationp, +durationa, +fk_element, +elementtype) +SELECT DISTINCT +planningitem.id, --ref_ext +1, --entity, +IFNULL(planningitem.begin_datetime,planningitem.end_datetime), --datep, +planningitem.end_datetime, --datep2, +1030013, --fk_action +'AC_PROJ', --code, +CASE WHEN (TRIM(planningitem.summary)='') THEN 'Envoi courrier (doc, catalogue, ...)' ELSE LEFT(planningitem.summary,128) END, --label, +planningitem.description, --note, +planningitem.created, --datec, +planningitem.modified, --tms, +IFNULL(usercrea.rowid,1), --fk_user_author +IFNULL(usermod.rowid,1), --fk_user_mod +llx_societe.rowid, --fk_soc, +llx_socpeople.rowid, --fk_contact, +IFNULL(usercrea.rowid,1), --fk_user_action, +0, --transparency, +IFNULL(usercrea.rowid,1), --fk_user_done, +0, --priority, +0, --fulldayevent, +1, --punctual, +-1, --percent, +null, --location +planningitem.end_datetime-planningitem.begin_datetime, --durationp, +null, --durationa, +null, --fk_element +null --elementtype +FROM planningitem +LEFT OUTER JOIN planningitem_uobject as contactsoc ON planningitem.id=contactsoc.planningitem_id +LEFT OUTER JOIN planningitem_uobject as contctlink ON contctlink.planningitem_uobject_id=contactsoc.id +LEFT OUTER JOIN llx_socpeople ON llx_socpeople.import_key=contctlink.uobject_id +LEFT OUTER JOIN llx_societe ON llx_societe.import_key=contactsoc.uobject_id +LEFT OUTER JOIN sf_user as usercreast ON usercreast.id=planningitem.created_by_sf_user_id +LEFT OUTER JOIN llx_user as usercrea ON usercreast.email_address=usercrea.email +LEFT OUTER JOIN sf_user as usermodst ON usermodst.id=planningitem.modified_by_sf_user_id +LEFT OUTER JOIN llx_user as usermod ON usermodst.email_address=usermod.email +WHERE planningitem.planningitemtype_code='PROJET' +AND llx_societe.rowid IS NOT NULL +AND planningitem.deleted=0; + + +INSERT INTO llx_actioncomm ( +ref_ext, +entity, +datep, +datep2, +fk_action, +code, +label, +note, +datec, +tms, +fk_user_author, +fk_user_mod, +fk_soc, +fk_contact, +fk_user_action, +transparency, +fk_user_done, +priority, +fulldayevent, +punctual, +percent, +location, +durationp, +durationa, +fk_element, +elementtype) +SELECT DISTINCT +planningitem.id, --ref_ext +1, --entity, +IFNULL(planningitem.begin_datetime,planningitem.end_datetime), --datep, +planningitem.end_datetime, --datep2, +1030013, --fk_action +'AC_PROJ', --code, +CASE WHEN (TRIM(planningitem.summary)='') THEN 'Envoi courrier (doc, catalogue, ...)' ELSE LEFT(planningitem.summary,128) END, --label, +planningitem.description, --note, +planningitem.created, --datec, +planningitem.modified, --tms, +IFNULL(usercrea.rowid,1), --fk_user_author +IFNULL(usermod.rowid,1), --fk_user_mod +llx_societe.rowid, --fk_soc, +llx_socpeople.rowid, --fk_contact, +IFNULL(usercrea.rowid,1), --fk_user_action, +0, --transparency, +IFNULL(usercrea.rowid,1), --fk_user_done, +0, --priority, +0, --fulldayevent, +1, --punctual, +-1, --percent, +null, --location +planningitem.end_datetime-planningitem.begin_datetime, --durationp, +null, --durationa, +null, --fk_element +null --elementtype +FROM planningitem +LEFT OUTER JOIN planningitem_uobject as contactsoc ON planningitem.id=contactsoc.planningitem_id +LEFT OUTER JOIN planningitem_uobject as contctlink ON contctlink.planningitem_uobject_id=contactsoc.id +LEFT OUTER JOIN llx_socpeople ON llx_socpeople.import_key=contctlink.uobject_id +LEFT OUTER JOIN llx_societe ON llx_societe.import_key=contactsoc.uobject_id +LEFT OUTER JOIN sf_user as usercreast ON usercreast.id=planningitem.created_by_sf_user_id +LEFT OUTER JOIN llx_user as usercrea ON usercreast.email_address=usercrea.email +LEFT OUTER JOIN sf_user as usermodst ON usermodst.id=planningitem.modified_by_sf_user_id +LEFT OUTER JOIN llx_user as usermod ON usermodst.email_address=usermod.email +WHERE planningitem.planningitemtype_code='PROJET' +AND llx_societe.rowid IS NOT NULL +AND planningitem.deleted=0; +------ +---import Agenda +------ +--select count(*) from hisplan where session_id IS NOT NULL +-- Match sur session id +--Mettre dans text lib tel quel, formateur : nom, éléves : nomelv, comment :comment +--date debut : hjour+heuredeb / date fin hjour + heurefin +--Différent de haction='Old' +--Type=Session AGF + +--Hist mail +--deleted IS NULL +--Affecter à com_id +--contact_id et account_id +--type='Autre' +--dater=date de fin + +--Remove temporarie data +ALTER TABLE llx_societe DROP INDEX idx_llx_societe_import_key; +ALTER TABLE llx_agefodd_session DROP INDEX idx_llx_agefodd_session_import_key; +ALTER TABLE llx_propal DROP INDEX idx_llx_propal_import_key; +ALTER TABLE llx_user DROP INDEX idx_llx_user_import_key; +ALTER TABLE llx_socpeople DROP INDEX idx_llx_socpeople_import_key; +SET foreign_key_checks = 1; From 7c10632d7acd5b5cf503e514f17401d3f8e46b78 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Wed, 20 Nov 2013 01:09:33 +0100 Subject: [PATCH 081/107] Change-Id: I57c62abf6ea8a70c08336a7d38571fbdd487d640 --- dev/dbmodel/reprise donnée.sql | 3999 -------------------------------- 1 file changed, 3999 deletions(-) delete mode 100644 dev/dbmodel/reprise donnée.sql diff --git a/dev/dbmodel/reprise donnée.sql b/dev/dbmodel/reprise donnée.sql deleted file mode 100644 index 9947dcd6c90..00000000000 --- a/dev/dbmodel/reprise donnée.sql +++ /dev/null @@ -1,3999 +0,0 @@ -TRUNCATE TABLE llx_c_payment_term; -INSERT INTO llx_c_payment_term (rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour, decalage, module) VALUES -(1, 'RECEP', 1, 1, 'A réception de facture', 'Réception de facture', 0, 0, NULL, NULL), -(2, '30D', 2, 1, '30 jours', 'Réglement à 30 jours', 0, 30, NULL, NULL), -(3, '30DENDMONTH', 3, 0, '30 jours fin de mois', 'Réglement à 30 jours fin de mois', 1, 30, NULL, NULL), -(4, '60D', 4, 1, '60 jours', 'Réglement à 60 jours', 0, 60, NULL, NULL), -(5, '60DENDMONTH', 5, 0, '60 jours fin de mois', 'Réglement à 60 jours fin de mois', 1, 60, NULL, NULL), -(6, 'PT_ORDER', 6, 0, 'A réception de commande', 'A réception de commande', 0, 0, NULL, NULL), -(7, 'PT_DELIVERY', 7, 0, 'Livraison', 'Règlement à la livraison', 0, 0, NULL, NULL), -(8, 'PT_5050', 8, 0, '50 et 50', 'Règlement 50% à la commande, 50% à la livraison', 0, 0, NULL, NULL), -(9, '45D', NULL, 1, '45 jours', 'Règlement à 45 jours', 0, 45, NULL, NULL), -(10, '90D', NULL, 1, '90 jours', 'Règlement à 90 jours', 0, 90, NULL, NULL), -(11, '85D', NULL, 1, '85 jours', 'Règlement à 85 jours', 0, 85, NULL, NULL), -(12, '75D', NULL, 1, '75 jours', 'Règlement à 75 jours', 0, 75, NULL, NULL), -(13, '100D', NULL, 1, '100 jours', 'Règlement à 100 jours', 0, 100, NULL, NULL), -(14, '70D', NULL, 1, '70 jours', 'Règlement à 70 jours', 0, 70, NULL, NULL); - -ALTER TABLE llx_societe MODIFY COLUMN import_key varchar(36); -ALTER TABLE llx_societe MODIFY COLUMN nom varchar(80); -ALTER TABLE llx_socpeople MODIFY COLUMN import_key varchar(36); -ALTER TABLE llx_product MODIFY COLUMN import_key varchar(36); -ALTER TABLE llx_agefodd_stagiaire MODIFY COLUMN import_key varchar(36); -ALTER TABLE llx_agefodd_session_stagiaire MODIFY COLUMN import_key varchar(36); -ALTER TABLE llx_propal MODIFY COLUMN import_key varchar(36); -ALTER TABLE llx_facture MODIFY COLUMN import_key varchar(36); -ALTER TABLE llx_facturedet MODIFY COLUMN import_key varchar(36); -ALTER TABLE llx_agefodd_place ADD COLUMN import_key varchar(36) DEFAULT NULL; -ALTER TABLE llx_agefodd_formation_catalogue ADD COLUMN import_key varchar(36) DEFAULT NULL; -ALTER TABLE llx_user ADD COLUMN import_key varchar(36) DEFAULT NULL; - -ALTER TABLE llx_societe ADD INDEX idx_llx_societe_import_key (import_key); -ALTER TABLE llx_propal ADD INDEX idx_llx_propal_import_key (import_key); -ALTER TABLE llx_agefodd_session ADD INDEX idx_llx_agefodd_session_import_key (import_key); -ALTER TABLE llx_user ADD INDEX idx_llx_user_import_key (import_key); -ALTER TABLE llx_socpeople ADD INDEX idx_llx_socpeople_import_key (import_key); - - -TRUNCATE TABLE llx_extrafields; -INSERT INTO `llx_extrafields` ( `name`, `entity`, `elementtype`, `tms`, `label`, `type`, `size`, `fieldunique`, `fieldrequired`, `pos`, `param`) VALUES -( 'ts_partenaire', 1, 'societe', '2013-10-27 08:52:49', 'Partenaire', 'select', '', 0, 0, 2, 'a:1:{s:7:"options";a:7:{s:0:"";N;s:4:"FORM";s:24:"Prestataire de formation";s:4:"UNIV";s:11:"Université";s:3:"MOB";s:24:"Mobilité internationale";s:5:"OUTIL";s:6:"Outils";s:3:"COM";s:13:"Communication";s:3:"AUT";s:6:"Autres";}}'), -( 'ts_prospection', 1, 'societe', '2013-11-05 10:24:26', 'Chargé de prospection', 'sellist', '', 0, 0, 4, 'a:1:{s:7:"options";a:1:{s:76:"user:CONCAT_WS('' '',main.lastname,main.firstname):rowid:extra.u_prospection=1";N;}}'), -( 'ts_secteur', 1, 'societe', '2013-10-25 23:34:03', 'Secteur d''activité', 'select', '', 0, 0, 1, 'a:1:{s:7:"options";a:19:{s:0:"";N;s:4:"AERO";s:12:"Aeronautique";s:4:"AGRO";s:16:" Agroalimentaire";s:4:"ASSO";s:11:"Association";s:4:"AUTO";s:10:"Automobile";s:3:"BTP";s:3:"BTP";s:4:"CHIM";s:6:"Chimie";s:4:"CONS";s:7:"Conseil";s:5:"CONSO";s:21:"Biens de consommation";s:6:"DISTRI";s:12:"Distribution";s:4:"EDUC";s:9:"Education";s:5:"ENERG";s:7:"Energie";s:3:"FIN";s:7:"Finance";s:3:"LUX";s:4:"Luxe";s:3:"PUB";s:13:"Communication";s:2:"SP";s:16:"Services publics";s:3:"TIC";s:12:"Informatique";s:7:"TOURISM";s:9:"Tourisme ";s:6:"TRANSP";s:9:"Transport";}}'), -( 'ts_logistique', 1, 'societe', '2013-11-05 10:30:44', 'Gestionnaire logistique', 'sellist', '', 0, 0, 5, 'a:1:{s:7:"options";a:1:{s:75:"user:CONCAT_WS('' '',main.lastname,main.firstname):rowid:extra.u_logistique=1";N;}}'), -( 'ts_payeur', 1, 'societe', '2013-10-27 08:36:45', 'Payeur', 'boolean', '', 0, 0, 3, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}'), -( 'ct_principal', 1, 'socpeople', '2013-10-25 14:15:30', 'Contact principal', 'boolean', '', 0, 0, 6, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}'), -( 'ct_magellan', 1, 'socpeople', '2013-10-25 14:21:17', 'Membre de Magellan', 'boolean', '', 0, 0, 13, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}'), -( 'ct_mailing_papier', 1, 'socpeople', '2013-10-25 14:16:12', 'Destinataire mailing papier', 'boolean', '', 0, 0, 8, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}'), -( 'ct_invitation', 1, 'socpeople', '2013-10-25 14:15:52', 'Destinataire invitation', 'boolean', '', 0, 0, 7, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}'), -( 'ct_pays', 1, 'socpeople', '2013-10-25 14:21:43', 'Zones géographiques', 'checkbox', '', 0, 0, 15, 'a:1:{s:7:"options";a:14:{i:1;s:11:"Afrique Est";i:2;s:13:"Afrique Ouest";i:3;s:11:"Afrique Sud";i:4;s:14:"Amérique Nord";i:5;s:13:"Amérique Sud";i:6;s:15:"Asie Ext Orient";i:7;s:12:"Asie Sud Est";i:8;s:7:"Balkans";i:9;s:10:"Europe Est";i:10;s:11:"Europe Nord";i:11;s:12:"Europe Ouest";i:12;s:7:"Maghreb";i:13;s:8:"Océanie";s:0:"";N;}}'), -( 'ct_service', 1, 'socpeople', '2013-10-26 08:22:25', 'Fonction/Service', 'select', '', 0, 0, 5, 'a:1:{s:7:"options";a:28:{s:3:"DFO";s:19:"Directeur Formation";s:3:"RFO";s:21:"Responsable Formation";s:3:"AFO";s:21:" Assistante Formation";s:3:"DRH";s:29:"Directeur Ressources Humaines";s:3:"RRH";s:31:"Responsable Ressources humaines";s:3:"ARH";s:30:"Assistante Ressources Humaines";s:3:"RGC";s:33:"Responsable Gestion de carrières";s:3:"DMI";s:34:"Directeur Mobilité Internationale";s:3:"RMI";s:36:"Responsable Mobilité Internationale";s:3:"AMI";s:35:"Assistante Mobilité Internationale";s:3:"C&B";s:33:"Compensation and Benefits Manager";s:3:"ASS";s:10:"Assistante";s:3:"DDA";s:6:"Achats";s:3:"DBU";s:13:"Business Unit";s:3:"DCO";s:10:"Commercial";s:3:"DCM";s:14:" Communication";s:2:"DG";s:21:" Direction Générale";s:3:"RDI";s:10:"Diversité";s:3:"DOP";s:27:" Exploitation & Opérations";s:3:"DFI";s:7:"Finance";s:3:"DEX";s:13:"Import/Export";s:3:"DJU";s:9:"Juridique";s:3:"DLO";s:10:"Logistique";s:3:"DMA";s:9:"Marketing";s:3:"DTE";s:10:"Production";s:3:"DRD";s:26:"Recherche & Développement";s:3:"DSI";s:22:"Système d''information";s:3:"AUT";s:6:"Autres";}}'), -( 'ct_origine', 1, 'socpeople', '2013-10-25 14:14:16', 'Origine du contact', 'select', '', 0, 0, 3, 'a:1:{s:7:"options";a:8:{s:5:"EMAIL";s:8:"Emailing";s:8:"INTERNET";s:19:"Moteur de recherche";s:9:"TELEPHONE";s:26:"Prospection téléphonique";s:9:"CATALOGUE";s:9:"Catalogue";s:14:"RECOMMANDATION";s:14:"Recommandation";s:3:"EVT";s:10:"Evènement";s:10:"PARTENAIRE";s:10:"Partenaire";s:0:"";N;}}'), -( 'ct_email_commercial', 1, 'socpeople', '2013-10-25 14:19:53', 'Envoyer emailing commercial', 'boolean', '', 0, 0, 9, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}'), -( 'ct_email_news', 1, 'socpeople', '2013-10-25 14:20:17', 'Envoyer emailing news', 'boolean', '', 0, 0, 10, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}'), -( 'ct_email_invitation', 1, 'socpeople', '2013-10-25 14:20:29', 'Envoyer emailing invitation', 'boolean', '', 0, 0, 11, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}'), -( 'ct_precision_origine', 1, 'socpeople', '2013-10-25 14:14:34', 'Précision sur l''origine du contact', 'varchar', '255', 0, 0, 4, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}'), -( 'ct_sujets', 1, 'socpeople', '2013-10-25 14:21:32', 'Sujets d''intérêt', 'checkbox', '', 0, 0, 14, 'a:1:{s:7:"options";a:21:{i:1;s:5:"Achat";i:2;s:10:"A distance";i:3;s:10:"Changement";i:4;s:10:"Commercial";i:5;s:13:"Communication";i:6;s:8:"Conflits";i:7;s:16:"Dévpt personnel";i:8;s:10:"Diversité";i:9;s:12:"Expatriation";i:10;s:6:"Export";i:11;s:7:"Finance";i:12;s:14:"Interculturel ";i:13;s:9:"Juridique";i:14;s:10:"Management";i:15;s:9:"Marketing";i:16;s:13:"Négociation ";i:17;s:4:"Pays";i:18;s:6:"Projet";i:19;s:12:"Retour expat";i:20;s:2:"RH";s:0:"";N;}}'), -( 'ct_motif_inactif', 1, 'socpeople', '2013-10-25 14:38:38', 'Commentaire', 'varchar', '255', 0, 0, 2, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}'), -( 'ct_anglais', 1, 'socpeople', '2013-10-25 14:20:40', 'Langue anglaise', 'boolean', '', 0, 0, 12, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}'), -( 'u_interentreprises', 1, 'user', '2013-11-01 22:24:18', 'Chargé des Interentreprises', 'boolean', '', 0, 0, 0, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}'), -( 'u_prospection', 1, 'user', '2013-10-31 16:05:18', 'Chargé de prospection', 'boolean', '', 0, 0, 0, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}'), -( 'u_commercial', 1, 'user', '2013-11-01 22:18:01', 'Commercial', 'boolean', '', 0, 0, 0, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}'), -( 'u_logistique', 1, 'user', '2013-11-01 22:17:14', 'Gestionnaire logistique', 'boolean', '', 0, 0, 0, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}'), -( 'u_communication', 1, 'user', '2013-11-01 22:25:03', 'Chargé de communication', 'boolean', '', 0, 0, 0, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}'), -( 'comment', 1, 'propal', '2013-09-01 11:14:27', 'Commentaire', 'text', '2000', 0, 0, 1, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}'), -( 'cd_domaine', 1, 'agefodd_formation_catalogue', '2013-10-20 12:05:28', 'Domaine', 'select', '', 0, 0, 1, 'a:1:{s:7:"options";a:16:{s:5:"00000";s:5:"00000";s:3:"COA";s:3:"COA";s:3:"COF";s:3:"COF";s:5:"COMER";s:10:"Commercial";s:4:"COMM";s:13:"Communication";s:3:"CON";s:3:"CON";s:5:"EFPRO";s:27:"Efficacité professionnelle";s:5:"EXPAT";s:12:"Expatriation";s:3:"FOR";s:3:"FOR";s:3:"FRF";s:24:"Formations de formateurs";s:4:"JURI";s:9:"Juridique";s:6:"MARKET";s:9:"Marketing";s:4:"MGNT";s:10:"Management";s:4:"PAYS";s:14:"Expertise pays";s:2:"RH";s:19:"Ressources humaines";s:3:"SIC";s:24:"Interculturel transverse";}}'), -('ts_prospection', 1, 'agefodd_session', '2013-11-15 12:10:59', 'Chargé de prospection', 'sellist', '', 0, 0, 0, 'a:1:{s:7:"options";a:1:{s:76:"user:CONCAT_WS('' '',main.lastname,main.firstname):rowid:extra.u_prospection=1";N;}}'), -('ts_logistique', 1, 'agefodd_session', '2013-11-15 12:11:41', ' Gestionnaire logistique', 'sellist', '', 0, 0, 0, 'a:1:{s:7:"options";a:1:{s:75:"user:CONCAT_WS('' '',main.lastname,main.firstname):rowid:extra.u_logistique=1";N;}}'), -('ct_catalogue', 1, 'socpeople', '2013-11-11 10:47:04', 'Destinataire catalogue', 'boolean', '', 0, 0, 7, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}'), -('cd_ss_domaine', 1, 'agefodd_formation_catalogue', '2013-11-15 18:41:20', 'Sous-domaine', 'select', '', 0, 0, 2, 'a:1:{s:7:"options";a:11:{s:0:"";N;s:5:"WPAYS";s:13:"Business pays";s:5:"EXPAT";s:12:"Expatriation";s:6:"LEADER";s:10:"Leadership";s:5:"EQUIP";s:7:"Equipes";s:4:"DIST";s:19:"Travail à distance";s:3:"SIC";s:31:"Sensibilisation interculturelle";s:4:"NEGO";s:12:"Négociation";s:2:"RH";s:2:"RH";s:6:"EXPORT";s:6:"Export";s:3:"DIV";s:10:"Diversité";}}'); - -ALTER TABLE llx_societe_extrafields ADD COLUMN ts_partenaire text DEFAULT NULL; -ALTER TABLE llx_societe_extrafields ADD COLUMN ts_prospection text DEFAULT NULL; -ALTER TABLE llx_societe_extrafields ADD COLUMN ts_secteur text DEFAULT NULL; -ALTER TABLE llx_societe_extrafields ADD COLUMN ts_logistique text DEFAULT NULL; -ALTER TABLE llx_societe_extrafields ADD COLUMN ts_payeur int(1) DEFAULT NULL; - -ALTER TABLE llx_socpeople_extrafields ADD COLUMN ct_principal int(1) DEFAULT NULL; -ALTER TABLE llx_socpeople_extrafields ADD COLUMN ct_magellan int(1) DEFAULT NULL; -ALTER TABLE llx_socpeople_extrafields ADD COLUMN ct_mailing_papier int(1) DEFAULT 0; -ALTER TABLE llx_socpeople_extrafields ADD COLUMN ct_invitation int(1) DEFAULT 0; -ALTER TABLE llx_socpeople_extrafields ADD COLUMN ct_service text DEFAULT NULL; -ALTER TABLE llx_socpeople_extrafields ADD COLUMN ct_origine text DEFAULT NULL; -ALTER TABLE llx_socpeople_extrafields ADD COLUMN ct_email_commercial int(1) DEFAULT 1; -ALTER TABLE llx_socpeople_extrafields ADD COLUMN ct_email_news int(1) DEFAULT 1; -ALTER TABLE llx_socpeople_extrafields ADD COLUMN ct_email_invitation int(1) DEFAULT 1; -ALTER TABLE llx_socpeople_extrafields ADD COLUMN ct_precision_origine varchar(255) DEFAULT NULL; -ALTER TABLE llx_socpeople_extrafields ADD COLUMN ct_sujets text DEFAULT NULL; -ALTER TABLE llx_socpeople_extrafields ADD COLUMN ct_motif_inactif varchar(255) DEFAULT NULL; -ALTER TABLE llx_socpeople_extrafields ADD COLUMN ct_anglais int(1) DEFAULT NULL; -ALTER TABLE llx_socpeople_extrafields ADD COLUMN ct_pays int(1) DEFAULT NULL; -ALTER TABLE llx_socpeople_extrafields ADD COLUMN ct_catalogue int(1) DEFAULT NULL; - -ALTER TABLE llx_user_extrafields ADD COLUMN u_interentreprises int(1) DEFAULT NULL; -ALTER TABLE llx_user_extrafields ADD COLUMN u_prospection int(1) DEFAULT NULL; -ALTER TABLE llx_user_extrafields ADD COLUMN u_commercial int(1) DEFAULT NULL; -ALTER TABLE llx_user_extrafields ADD COLUMN u_logistique int(1) DEFAULT NULL; -ALTER TABLE llx_user_extrafields ADD COLUMN u_communication int(1) DEFAULT NULL; - -ALTER TABLE llx_propal_extrafields ADD COLUMN comment text DEFAULT NULL; -ALTER TABLE llx_agefodd_formation_catalogue_extrafields ADD COLUMN cd_domaine text DEFAULT NULL; -ALTER TABLE llx_agefodd_formation_catalogue_extrafields ADD COLUMN cd_ss_domaine text DEFAULT NULL; - -ALTER TABLE llx_agefodd_session_extrafields ADD COLUMN ts_prospection text DEFAULT NULL; -ALTER TABLE llx_agefodd_session_extrafields ADD COLUMN ts_logistique text DEFAULT NULL; - -TRUNCATE TABLE llx_const; -INSERT INTO `llx_const` (`rowid`, `name`, `entity`, `value`, `type`, `visible`, `note`, `tms`) VALUES -(3, 'MAILING_LIMIT_SENDBYWEB', 0, '25', 'chaine', 1, 'Number of targets to defined packet size when sending mass email', '2013-07-24 11:52:18'), -(4, 'SYSLOG_HANDLERS', 0, '["mod_syslog_file"]', 'chaine', 0, 'Which logger to use', '2013-07-24 11:52:18'), -(5, 'SYSLOG_FILE', 0, 'DOL_DATA_ROOT/dolibarr.log', 'chaine', 0, 'Directory where to write log file', '2013-07-24 11:52:18'), -(6, 'SYSLOG_LEVEL', 0, '7', 'chaine', 0, 'Level of debug info to show', '2013-07-24 11:52:18'), -(9, 'MAIN_UPLOAD_DOC', 0, '2048', 'chaine', 0, 'Max size for file upload (0 means no upload allowed)', '2013-07-24 11:52:18'), -(12, 'MAIN_SIZE_LISTE_LIMIT', 0, '25', 'chaine', 0, 'Longueur maximum des listes', '2013-07-24 11:52:18'), -(13, 'MAIN_SHOW_WORKBOARD', 0, '1', 'yesno', 0, 'Affichage tableau de bord de travail Dolibarr', '2013-07-24 11:52:18'), -(18, 'MAIN_DELAY_ACTIONS_TODO', 1, '7', 'chaine', 0, 'Tolérance de retard avant alerte (en jours) sur actions planifiées non réalisées', '2013-07-24 11:52:18'), -(19, 'MAIN_DELAY_ORDERS_TO_PROCESS', 1, '2', 'chaine', 0, 'Tolérance de retard avant alerte (en jours) sur commandes clients non traitées', '2013-07-24 11:52:18'), -(20, 'MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS', 1, '7', 'chaine', 0, 'Tolérance de retard avant alerte (en jours) sur commandes fournisseurs non traitées', '2013-07-24 11:52:18'), -(21, 'MAIN_DELAY_PROPALS_TO_CLOSE', 1, '31', 'chaine', 0, 'Tolérance de retard avant alerte (en jours) sur propales à cloturer', '2013-07-24 11:52:18'), -(22, 'MAIN_DELAY_PROPALS_TO_BILL', 1, '7', 'chaine', 0, 'Tolérance de retard avant alerte (en jours) sur propales non facturées', '2013-07-24 11:52:18'), -(23, 'MAIN_DELAY_CUSTOMER_BILLS_UNPAYED', 1, '31', 'chaine', 0, 'Tolérance de retard avant alerte (en jours) sur factures client impayées', '2013-07-24 11:52:18'), -(24, 'MAIN_DELAY_SUPPLIER_BILLS_TO_PAY', 1, '2', 'chaine', 0, 'Tolérance de retard avant alerte (en jours) sur factures fournisseur impayées', '2013-07-24 11:52:18'), -(25, 'MAIN_DELAY_NOT_ACTIVATED_SERVICES', 1, '0', 'chaine', 0, 'Tolérance de retard avant alerte (en jours) sur services à activer', '2013-07-24 11:52:18'), -(26, 'MAIN_DELAY_RUNNING_SERVICES', 1, '0', 'chaine', 0, 'Tolérance de retard avant alerte (en jours) sur services expirés', '2013-07-24 11:52:18'), -(27, 'MAIN_DELAY_MEMBERS', 1, '31', 'chaine', 0, 'Tolérance de retard avant alerte (en jours) sur cotisations adhérent en retard', '2013-07-24 11:52:18'), -(28, 'MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE', 1, '62', 'chaine', 0, 'Tolérance de retard avant alerte (en jours) sur rapprochements bancaires à faire', '2013-07-24 11:52:18'), -(29, 'MAIN_FIX_FOR_BUGGED_MTA', 1, '1', 'chaine', 1, 'Set constant to fix email ending from PHP with some linux ike system', '2013-07-24 11:52:18'), -(32, 'MAIN_VERSION_LAST_INSTALL', 0, '3.4.1', 'chaine', 0, 'Dolibarr version when install', '2013-07-24 11:52:57'), -(53, 'MAIN_INFO_SOCIETE_LOGO', 1, 'logo_bande_fr.png', 'chaine', 0, '', '2013-07-24 11:57:08'), -(54, 'MAIN_INFO_SOCIETE_LOGO_SMALL', 1, 'logo_bande_fr_small.png', 'chaine', 0, '', '2013-07-24 11:57:08'), -(55, 'MAIN_INFO_SOCIETE_LOGO_MINI', 1, 'logo_bande_fr_mini.png', 'chaine', 0, '', '2013-07-24 11:57:08'), -(68, 'COMPANY_ADDON_PDF_ODT_PATH', 1, 'DOL_DATA_ROOT/doctemplates/thirdparties', 'chaine', 0, NULL, '2013-07-24 11:57:18'), -(70, 'PROPALE_ADDON_PDF', 1, 'azur', 'chaine', 0, 'Nom du gestionnaire de generation des propales en PDF', '2013-07-24 11:57:20'), -(71, 'PROPALE_ADDON', 1, 'mod_propale_marbre', 'chaine', 0, 'Nom du gestionnaire de numerotation des propales', '2013-07-24 11:57:20'), -(72, 'PROPALE_VALIDITY_DURATION', 1, '15', 'chaine', 0, 'Duration of validity of business proposals', '2013-07-24 11:57:20'), -(73, 'PROPALE_ADDON_PDF_ODT_PATH', 1, 'DOL_DATA_ROOT/doctemplates/proposals', 'chaine', 0, NULL, '2013-07-24 11:57:20'), -(77, 'FACTURE_ADDON_PDF', 1, 'crabe', 'chaine', 0, 'Name of PDF model of invoice', '2013-07-24 11:57:33'), -(78, 'FACTURE_ADDON', 1, 'mod_facture_terre', 'chaine', 0, 'Name of numbering numerotation rules of invoice', '2013-07-24 11:57:33'), -(79, 'FACTURE_ADDON_PDF_ODT_PATH', 1, 'DOL_DATA_ROOT/doctemplates/invoices', 'chaine', 0, NULL, '2013-07-24 11:57:33'), -(89, 'AGF_USE_STAGIAIRE_TYPE', 1, '', 'yesno', 0, 'Use trainee type', '2013-07-25 19:02:41'), -(90, 'AGF_DEFAULT_STAGIAIRE_TYPE', 1, '2', 'chaine', 0, 'Type of trainee funding', '2013-07-25 19:02:41'), -(91, 'AGF_UNIVERSAL_MASK', 1, '', 'chaine', 0, 'Mask of training number ref', '2013-07-25 19:02:41'), -(92, 'AGF_ADDON', 1, 'mod_agefodd_simple', 'chaine', 0, 'Use simple mask for training ref', '2013-07-25 19:02:41'), -(93, 'AGF_ORGANISME_PREF', 1, '', 'chaine', 0, 'Prefecture d''enregistrement', '2013-07-25 19:02:41'), -(94, 'AGF_ORGANISME_NUM', 1, '', 'chaine', 0, 'Numerot d''enregistrement a la prefecture', '2013-07-25 19:02:41'), -(95, 'AGF_ORGANISME_REPRESENTANT', 1, '', 'chaine', 0, 'Representant de la societé de formation', '2013-07-25 19:02:41'), -(100, 'AGF_STAGTYPE_USE_SEARCH_TO_SELECT', 1, '', 'yesno', 0, 'Search stagiaire type with combobox', '2013-07-25 19:02:41'), -(106, 'AGF_LINK_OPCA_ADRR_TO_CONTACT', 1, '', 'yesno', 0, 'Display OPCA adress from OPCA contact rather than OPCA', '2013-07-25 19:02:41'), -(107, 'AGF_TEXT_COLOR', 1, '000000', 'chaine', 0, 'Text color of PDF in hexadecimal', '2013-07-25 19:02:41'), -(108, 'AGF_HEAD_COLOR', 1, 'CB4619', 'chaine', 0, 'Text color header in hexadecimal', '2013-07-25 19:02:41'), -(109, 'AGF_FOOT_COLOR', 1, 'BEBEBE', 'chaine', 0, 'Text color of PDF footer, in hexadccimal', '2013-07-25 19:02:41'), -(112, 'AGF_MANAGE_OPCA', 1, '1', 'yesno', 0, 'Manage Opca', '2013-07-25 19:02:41'), -(113, 'AGF_CERTIF_ADDON', 1, 'mod_agefoddcertif_simple', 'chaine', 0, 'Use simple mask for certif ref', '2013-07-25 19:02:41'), -(114, 'AGF_CERTIF_UNIVERSAL_MASK', 1, '', 'chaine', 0, 'Mask of certificate code', '2013-07-25 19:02:41'), -(120, 'COMMANDE_ADDON_PDF', 1, 'einstein', 'chaine', 0, 'Name of PDF model of order', '2013-07-25 19:02:41'), -(121, 'COMMANDE_ADDON', 1, 'mod_commande_marbre', 'chaine', 0, 'Name of numbering numerotation rules of order', '2013-07-25 19:02:41'), -(122, 'COMMANDE_ADDON_PDF_ODT_PATH', 1, 'DOL_DATA_ROOT/doctemplates/orders', 'chaine', 0, NULL, '2013-07-25 19:02:41'), -(132, 'COMMANDE_SUPPLIER_ADDON_PDF', 1, 'muscadet', 'chaine', 0, 'Nom du gestionnaire de generation des bons de commande en PDF', '2013-07-25 19:02:41'), -(133, 'COMMANDE_SUPPLIER_ADDON_NUMBER', 1, 'mod_commande_fournisseur_muguet', 'chaine', 0, 'Nom du gestionnaire de numerotation des commandes fournisseur', '2013-07-25 19:02:41'), -(134, 'INVOICE_SUPPLIER_ADDON_PDF', 1, 'canelle', 'chaine', 0, 'Nom du gestionnaire de generation des factures fournisseur en PDF', '2013-07-25 19:02:41'), -(135, 'INVOICE_SUPPLIER_ADDON_NUMBER', 1, 'mod_facture_fournisseur_cactus', 'chaine', 0, 'Nom du gestionnaire de numerotation des factures fournisseur', '2013-07-25 19:02:41'), -(139, 'MAIN_AGENDA_ACTIONAUTO_COMPANY_CREATE', 1, '1', 'chaine', 0, NULL, '2013-07-25 19:02:41'), -(140, 'MAIN_AGENDA_ACTIONAUTO_CONTRACT_VALIDATE', 1, '1', 'chaine', 0, NULL, '2013-07-25 19:02:41'), -(141, 'MAIN_AGENDA_ACTIONAUTO_PROPAL_VALIDATE', 1, '1', 'chaine', 0, NULL, '2013-07-25 19:02:41'), -(142, 'MAIN_AGENDA_ACTIONAUTO_PROPAL_SENTBYMAIL', 1, '1', 'chaine', 0, NULL, '2013-07-25 19:02:41'), -(143, 'MAIN_AGENDA_ACTIONAUTO_ORDER_VALIDATE', 1, '1', 'chaine', 0, NULL, '2013-07-25 19:02:41'), -(144, 'MAIN_AGENDA_ACTIONAUTO_ORDER_SENTBYMAIL', 1, '1', 'chaine', 0, NULL, '2013-07-25 19:02:41'), -(145, 'MAIN_AGENDA_ACTIONAUTO_BILL_VALIDATE', 1, '1', 'chaine', 0, NULL, '2013-07-25 19:02:41'), -(146, 'MAIN_AGENDA_ACTIONAUTO_BILL_PAYED', 1, '1', 'chaine', 0, NULL, '2013-07-25 19:02:41'), -(147, 'MAIN_AGENDA_ACTIONAUTO_BILL_CANCEL', 1, '1', 'chaine', 0, NULL, '2013-07-25 19:02:41'), -(148, 'MAIN_AGENDA_ACTIONAUTO_BILL_SENTBYMAIL', 1, '1', 'chaine', 0, NULL, '2013-07-25 19:02:41'), -(149, 'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_VALIDATE', 1, '1', 'chaine', 0, NULL, '2013-07-25 19:02:41'), -(150, 'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_VALIDATE', 1, '1', 'chaine', 0, NULL, '2013-07-25 19:02:41'), -(151, 'MAIN_AGENDA_ACTIONAUTO_SHIPPING_VALIDATE', 1, '1', 'chaine', 0, NULL, '2013-07-25 19:02:41'), -(152, 'MAIN_AGENDA_ACTIONAUTO_SHIPPING_SENTBYMAIL', 1, '1', 'chaine', 0, NULL, '2013-07-25 19:02:41'), -(153, 'MAIN_AGENDA_ACTIONAUTO_BILL_UNVALIDATE', 1, '1', 'chaine', 0, NULL, '2013-07-25 19:02:41'), -(154, 'AGF_USE_LOGO_CLIENT', 1, '1', 'chaine', 0, '', '2013-07-25 19:02:50'), -(155, 'AGF_USE_FAC_WITHOUT_ORDER', 1, '1', 'chaine', 0, '', '2013-07-25 19:02:52'), -(156, 'AGF_CONTACT_DOL_SESSION', 1, '1', 'chaine', 0, '', '2013-07-25 19:02:57'), -(157, 'AGF_TRAINING_USE_SEARCH_TO_SELECT', 1, '1', 'chaine', 0, '', '2013-07-25 19:03:00'), -(158, 'AGF_TRAINER_USE_SEARCH_TO_SELECT', 1, '1', 'chaine', 0, '', '2013-07-25 19:03:00'), -(159, 'AGF_TRAINEE_USE_SEARCH_TO_SELECT', 1, '1', 'chaine', 0, '', '2013-07-25 19:03:01'), -(160, 'AGF_SITE_USE_SEARCH_TO_SELECT', 1, '1', 'chaine', 0, '', '2013-07-25 19:03:01'), -(161, 'AGF_DOL_AGENDA', 1, '1', 'chaine', 0, '', '2013-07-25 19:03:02'), -(162, 'COMPANY_USE_SEARCH_TO_SELECT', 1, '2', 'chaine', 0, '', '2013-07-25 19:03:24'), -(163, 'CONTACT_USE_SEARCH_TO_SELECT', 1, '2', 'chaine', 0, '', '2013-07-25 19:03:26'), -(165, 'SOCIETE_CODECOMPTA_ADDON', 1, 'mod_codecompta_panicum', 'chaine', 0, '', '2013-07-25 19:03:30'), -(166, 'AGF_CONTACT_USE_SEARCH_TO_SELECT', 1, '1', 'chaine', 0, '', '2013-07-25 19:05:13'), -(167, 'MAIN_USE_COMPANY_NAME_OF_CONTACT', 1, '1', 'chaine', 0, '', '2013-07-25 19:05:15'), -(168, 'AGF_FCKEDITOR_ENABLE_TRAINING', 1, '1', 'chaine', 0, '', '2013-07-25 19:05:19'), -(169, 'AGF_SESSION_TRAINEE_STATUS_AUTO', 1, '1', 'chaine', 0, '', '2013-07-25 19:05:24'), -(231, 'SOCIETE_CODECLIENT_ADDON', 1, 'mod_codeclient_elephant', 'chaine', 0, '', '2013-08-21 13:03:52'), -(249, 'PROJECT_ADDON_PDF', 1, 'baleine', 'chaine', 0, 'Nom du gestionnaire de generation des projets en PDF', '2013-08-23 12:32:47'), -(250, 'PROJECT_ADDON', 1, 'mod_project_simple', 'chaine', 0, 'Nom du gestionnaire de numerotation des projets', '2013-08-23 12:32:47'), -(251, 'PROJECT_ADDON_PDF_ODT_PATH', 1, 'DOL_DATA_ROOT/doctemplates/projects', 'chaine', 0, NULL, '2013-08-23 12:32:47'), -(269, 'PRODUIT_MULTIPRICES', 1, '1', 'chaine', 0, '', '2013-08-23 13:43:31'), -(274, 'MAILING_EMAIL_UNSUBSCRIBE', 1, '1', 'chaine', 0, '', '2013-08-23 14:37:46'), -(275, 'MAILING_EMAIL_FROM', 1, 'dolibarr@domain.com', 'chaine', 0, '', '2013-08-23 14:37:49'), -(276, 'MAILING_EMAIL_UNSUBSCRIBE_KEY', 1, '9203b218961d2941eeb534522e47b539', 'chaine', 0, '', '2013-08-23 14:37:49'), -(278, 'FCKEDITOR_ENABLE_SOCIETE', 1, '1', 'yesno', 0, 'WYSIWIG for description and note (except products/services)', '2013-08-23 14:38:53'), -(279, 'FCKEDITOR_ENABLE_PRODUCTDESC', 1, '1', 'yesno', 0, 'WYSIWIG for products/services description and note', '2013-08-23 14:38:53'), -(280, 'FCKEDITOR_ENABLE_MAILING', 1, '1', 'yesno', 0, 'WYSIWIG for mass emailings', '2013-08-23 14:38:53'), -(282, 'FCKEDITOR_ENABLE_USERSIGN', 1, '1', 'yesno', 0, 'WYSIWIG for products details lines for all entities', '2013-08-23 14:38:53'), -(283, 'FCKEDITOR_ENABLE_MAIL', 1, '1', 'yesno', 0, 'WYSIWIG for products details lines for all entities', '2013-08-23 14:38:53'), -(404, 'MAIN_MENU_STANDARD', 1, 'eldy_menu.php', 'chaine', 0, '', '2013-08-24 03:56:19'), -(405, 'MAIN_MENU_SMARTPHONE', 1, 'eldy_menu.php', 'chaine', 0, '', '2013-08-24 03:56:19'), -(406, 'MAIN_MENUFRONT_STANDARD', 1, 'eldy_menu.php', 'chaine', 0, '', '2013-08-24 03:56:19'), -(407, 'MAIN_MENUFRONT_SMARTPHONE', 1, 'eldy_menu.php', 'chaine', 0, '', '2013-08-24 03:56:19'), -(408, 'MAIN_INFO_SOCIETE_COUNTRY', 1, '1:FR:France', 'chaine', 0, '', '2013-08-24 04:03:49'), -(409, 'MAIN_INFO_SOCIETE_NOM', 1, 'Akteos', 'chaine', 0, '', '2013-08-24 04:03:49'), -(410, 'MAIN_INFO_SOCIETE_ADDRESS', 1, '6 Rue du 4 Septembre', 'chaine', 0, '', '2013-08-24 04:03:49'), -(411, 'MAIN_INFO_SOCIETE_TOWN', 1, 'Issy-les-Moulineaux', 'chaine', 0, '', '2013-08-24 04:03:49'), -(412, 'MAIN_INFO_SOCIETE_ZIP', 1, '92130', 'chaine', 0, '', '2013-08-24 04:03:49'), -(413, 'MAIN_INFO_SOCIETE_STATE', 1, '94', 'chaine', 0, '', '2013-08-24 04:03:49'), -(414, 'MAIN_MONNAIE', 1, 'EUR', 'chaine', 0, '', '2013-08-24 04:03:49'), -(415, 'MAIN_INFO_SOCIETE_TEL', 1, '01 55 95 85 10', 'chaine', 0, '', '2013-08-24 04:03:49'), -(416, 'MAIN_INFO_SOCIETE_FAX', 1, '01 55 95 85 11', 'chaine', 0, '', '2013-08-24 04:03:49'), -(417, 'MAIN_INFO_SOCIETE_MAIL', 1, 'conseil@akteos.fr', 'chaine', 0, '', '2013-08-24 04:03:49'), -(418, 'MAIN_INFO_SOCIETE_WEB', 1, 'http://www.akteos.fr', 'chaine', 0, '', '2013-08-24 04:03:49'), -(419, 'MAIN_INFO_CAPITAL', 1, '37000', 'chaine', 0, '', '2013-08-24 04:03:49'), -(420, 'MAIN_INFO_SOCIETE_FORME_JURIDIQUE', 1, '57', 'chaine', 0, '', '2013-08-24 04:03:49'), -(421, 'MAIN_INFO_SIREN', 1, '412056152', 'chaine', 0, '', '2013-08-24 04:03:49'), -(422, 'MAIN_INFO_SIRET', 1, ' 41205615200033 ', 'chaine', 0, '', '2013-08-24 04:03:49'), -(423, 'MAIN_INFO_APE', 1, '6420Z', 'chaine', 0, '', '2013-08-24 04:03:49'), -(424, 'MAIN_INFO_RCS', 1, 'Nanterre B 412 056 152 ', 'chaine', 0, '', '2013-08-24 04:03:49'), -(425, 'MAIN_INFO_TVAINTRA', 1, 'FR80412056152', 'chaine', 0, '', '2013-08-24 04:03:49'), -(426, 'SOCIETE_FISCAL_MONTH_START', 1, '1', 'chaine', 0, '', '2013-08-24 04:03:49'), -(427, 'FACTURE_TVAOPTION', 1, 'reel', 'chaine', 0, '', '2013-08-24 04:03:49'), -(428, 'COMPANY_ELEPHANT_MASK_CUSTOMER', 1, 'C{00000}', 'chaine', 0, '', '2013-08-24 04:04:39'), -(429, 'COMPANY_ELEPHANT_MASK_SUPPLIER', 1, 'F{00000}', 'chaine', 0, '', '2013-08-24 04:04:39'), -(437, 'MAIN_MENU_HIDE_UNAUTHORIZED', 1, '1', 'chaine', 1, '', '2013-08-26 13:09:10'), -(438, 'AGENDA_USE_EVENT_TYPE', 1, '1', 'chaine', 0, '', '2013-08-26 13:24:44'), -(439, 'MAIN_USE_ADVANCED_PERMS', 1, '1', 'chaine', 1, '', '2013-08-27 09:31:08'), -(440, 'SOCIETE_ADD_REF_IN_LIST', 1, '1', 'yesno', 0, '', '2013-08-27 19:06:27'), -(441, 'MAIN_MODULE_AGEFODD', 1, '1', NULL, 0, NULL, '2013-08-27 19:11:17'), -(442, 'MAIN_MODULE_AGEFODD_TABS_0', 1, 'order:+tabAgefodd:AgfMenuSess:agefodd@agefodd:/agefodd/session/list_fin.php?search_orderid=__ID__', 'chaine', 0, NULL, '2013-08-27 19:11:17'), -(443, 'MAIN_MODULE_AGEFODD_TABS_1', 1, 'invoice:+tabAgefodd:AgfMenuSess:agefodd@agefodd:/agefodd/session/list_fin.php?search_invoiceid=__ID__', 'chaine', 0, NULL, '2013-08-27 19:11:17'), -(444, 'MAIN_MODULE_AGEFODD_TABS_2', 1, 'propal:+tabAgefodd:AgfMenuSess:agefodd@agefodd:/agefodd/session/list_fin.php?search_propalid=__ID__', 'chaine', 0, NULL, '2013-08-27 19:11:17'), -(445, 'MAIN_MODULE_AGEFODD_TRIGGERS', 1, '1', 'chaine', 0, NULL, '2013-08-27 19:11:17'), -(446, 'AGF_LAST_VERION_INSTALL', 1, '2.1.5', 'chaine', 0, 'Last version installed to know change table to execute', '2013-08-27 19:11:17'), -(447, 'AGF_MANAGE_CERTIF', 1, '', 'yesno', 0, 'Manage certification', '2013-08-27 19:11:17'), -(449, 'MAIN_MODULE_PROPALE', 1, '1', NULL, 0, NULL, '2013-08-27 19:11:17'), -(453, 'MAIN_MODULE_COMPTABILITE', 1, '1', NULL, 0, NULL, '2013-08-27 19:11:17'), -(459, 'MAIN_MODULE_BANQUE', 1, '1', NULL, 0, NULL, '2013-08-27 19:11:18'), -(464, 'PRODUIT_MULTIPRICES_LIMIT', 1, '3', 'chaine', 0, '', '2013-08-31 18:54:58'), -(486, 'MAIN_MODULE_FCKEDITOR', 1, '1', NULL, 0, NULL, '2013-10-31 12:12:01'), -(487, 'FCKEDITOR_ENABLE_DETAILS', 1, '1', 'yesno', 0, 'WYSIWIG for products details lines for all entities', '2013-10-31 12:12:01'), -(489, 'MAIN_MODULE_EXPORT', 1, '1', NULL, 0, NULL, '2013-10-31 12:12:20'), -(490, 'COMPANY_HIDE_INACTIVE_IN_COMBOBOX', 1, '1', 'chaine', 0, '', '2013-10-31 12:13:36'), -(491, 'USER_HIDE_INACTIVE_IN_COMBOBOX', 1, '1', 'chaine', 0, '', '2013-10-31 12:13:45'), -(492, 'PRODUIT_DESC_IN_FORM', 1, '1', 'chaine', 1, '', '2013-10-31 12:15:02'), -(493, 'MAIN_LANG_DEFAULT', 1, 'auto', 'chaine', 0, '', '2013-10-31 12:15:19'), -(494, 'MAIN_MULTILANGS', 1, '1', 'chaine', 0, '', '2013-10-31 12:15:19'), -(495, 'MAIN_SIZE_LISTE_LIMIT', 1, '50', 'chaine', 0, '', '2013-10-31 12:15:19'), -(496, 'MAIN_DISABLE_JAVASCRIPT', 1, '0', 'chaine', 0, '', '2013-10-31 12:15:19'), -(497, 'MAIN_BUTTON_HIDE_UNAUTHORIZED', 1, '1', 'chaine', 0, '', '2013-10-31 12:15:19'), -(498, 'MAIN_START_WEEK', 1, '1', 'chaine', 0, '', '2013-10-31 12:15:19'), -(499, 'MAIN_SHOW_LOGO', 1, '0', 'chaine', 0, '', '2013-10-31 12:15:19'), -(500, 'MAIN_FIRSTNAME_NAME_POSITION', 1, '0', 'chaine', 0, '', '2013-10-31 12:15:19'), -(501, 'MAIN_THEME', 1, 'eldy', 'chaine', 0, '', '2013-10-31 12:15:19'), -(502, 'MAIN_SEARCHFORM_CONTACT', 1, '1', 'chaine', 0, '', '2013-10-31 12:15:19'), -(503, 'MAIN_SEARCHFORM_SOCIETE', 1, '1', 'chaine', 0, '', '2013-10-31 12:15:19'), -(504, 'MAIN_SEARCHFORM_PRODUITSERVICE', 1, '0', 'chaine', 0, '', '2013-10-31 12:15:19'), -(505, 'MAIN_SEARCHFORM_ADHERENT', 1, '0', 'chaine', 0, '', '2013-10-31 12:15:20'), -(506, 'MAIN_HELPCENTER_DISABLELINK', 0, '0', 'chaine', 0, '', '2013-10-31 12:15:20'), -(507, 'MAIN_HELP_DISABLELINK', 0, '0', 'chaine', 0, '', '2013-10-31 12:15:20'), -(508, 'MAIN_USE_PREVIEW_TABS', 1, '0', 'chaine', 0, '', '2013-10-31 12:15:20'), -(509, 'CONTACT_HIDE_INACTIVE_IN_COMBOBOX', 1, '1', 'chaine', 1, '', '2013-10-31 12:16:47'), -(510, 'MAIN_FEATURES_LEVEL', 0, '2', 'chaine', 1, 'Level of features to show (0=stable only, 1=stable+experimental, 2=stable+experimental+development', '2013-10-31 12:17:10'), -(511, 'COMPTA_ACCOUNT_CUSTOMER', 1, '445719', 'string', 0, '', '2013-10-31 13:30:07'), -(512, 'MAIN_MODULE_AGENDA', 1, '1', NULL, 0, NULL, '2013-11-05 09:16:16'), -(513, 'MAIN_MODULE_SOCIETE', 1, '1', NULL, 0, NULL, '2013-11-05 09:16:16'), -(514, 'MAIN_MODULE_SERVICE', 1, '1', NULL, 0, NULL, '2013-11-05 09:16:16'), -(515, 'MAIN_MODULE_COMMANDE', 1, '1', NULL, 0, NULL, '2013-11-05 09:16:16'), -(516, 'MAIN_MODULE_FACTURE', 1, '1', NULL, 0, NULL, '2013-11-05 09:16:16'), -(517, 'MAIN_MODULE_FOURNISSEUR', 1, '1', NULL, 0, NULL, '2013-11-05 09:16:16'), -(518, 'MAIN_MODULE_USER', 0, '1', NULL, 0, NULL, '2013-11-05 09:16:16'), -(519, 'MAIN_VERSION_LAST_UPGRADE', 0, '3.4.2', 'chaine', 0, 'Dolibarr version for last upgrade', '2013-11-05 09:19:03'), -(521, 'MAIN_MODULE_SYSLOG', 0, '1', NULL, 0, NULL, '2013-11-05 09:23:09'), -(524, 'MAIN_MAIL_SMTP_PORT', 0, '465', 'chaine', 0, '', '2013-11-05 09:47:29'), -(525, 'MAIN_MAIL_SMTP_SERVER', 0, 'smtp.googlemail.com', 'chaine', 0, '', '2013-11-05 09:47:29'), -(528, 'MAIN_MAIL_EMAIL_TLS', 0, '1', 'chaine', 0, '', '2013-11-05 09:47:30'), -(530, 'MAIN_DISABLE_ALL_MAILS', 1, '0', 'chaine', 0, '', '2013-11-05 10:34:55'), -(531, 'MAIN_MAIL_SENDMODE', 0, 'mail', 'chaine', 0, '', '2013-11-05 10:34:55'), -(534, 'MAIN_MAIL_EMAIL_FROM', 1, 'robot@domain.com', 'chaine', 0, '', '2013-11-05 10:34:55'), -(535, 'MAIN_MODULE_MAILING', 1, '1', NULL, 0, NULL, '2013-11-05 17:18:53'), -(536, 'MAIN_MODULE_CATEGORIE', 1, '1', NULL, 0, NULL, '2013-11-05 17:24:49'), -(537, 'MAIN_MODULE_CATEGORYCONTACT', 1, '1', NULL, 0, NULL, '2013-11-05 17:25:34'), -(538, 'MAIN_MODULE_CATEGORYCONTACT_TABS_0', 1, 'contact:+tabCategorie:Category:categories:/categorycontact/categorycontact/categorie.php?id=__ID__&type=4', 'chaine', 0, NULL, '2013-11-05 17:25:34'), -(539, 'MAIN_MODULE_CATEGORYCONTACT_MODELS', 1, '1', 'chaine', 0, NULL, '2013-11-05 17:25:34'), -(540, 'MAIN_MODULE_WEBSERVICES', 1, '1', NULL, 0, NULL, '2013-11-05 17:33:25'), -(541, 'WEBSERVICES_KEY', 1, '90c753e6c2919142caf7a63051ebc7ff', 'chaine', 0, '', '2013-11-05 17:33:30'), -(542, 'MAIN_MODULE_HOLIDAY', 1, '1', NULL, 0, NULL, '2013-11-05 17:34:48'), -(543, 'MAIN_MODULE_HOLIDAY_TABS_0', 1, 'user:+paidholidays:CPTitreMenu:holiday:$user->rights->holiday->write:/holiday/index.php?mainmenu=holiday&id=__ID__', 'chaine', 0, NULL, '2013-11-05 17:34:48'), -(544, 'MAIN_COMPANY_CONTROL_DBL', 1, '1', NULL, 0, NULL, '2013-11-05 17:24:49'), -(545, 'MAIN_CONTACT_CONTROL_DBL', 1, '1', NULL, 0, NULL, '2013-11-05 17:24:49'); - - - - - - - -UPDATE account SET modreg='CHQ' WHERE modreg='CH'; -UPDATE account SET modreg='CHQ' WHERE modreg='CHG'; -UPDATE account SET modreg='VIR' WHERE modreg='VRG'; - -UPDATE account SET tvaintracom= REPLACE(tvaintracom,'TVA Intracommunautaire : ',''); -UPDATE account SET tvaintracom= REPLACE(tvaintracom,'TVA Intracommunautaire: ',''); - -UPDATE account SET pays=1 WHERE pays='FRANCE'; -UPDATE account SET pays=5 WHERE pays='ALLEMAGNE'; -UPDATE account SET pays=5 WHERE pays='GERMANY'; -UPDATE account SET pays=184 WHERE pays='POLOGNE'; -UPDATE account SET pays=3 WHERE pays='ITALIE'; -UPDATE account SET pays=12 WHERE pays='MAROC'; -UPDATE account SET pays=6 WHERE pays='SUISSE'; -UPDATE account SET pays=7 WHERE pays='GRANDE BRETAGNE'; -UPDATE account SET pays=7 WHERE pays='UNITED KINGDOM'; -UPDATE account SET pays=115 WHERE pays='HONG KONG'; -UPDATE account SET pays=85 WHERE pays='EGYPTE'; -UPDATE account SET pays=201 WHERE pays='SLOVAQUIE'; -UPDATE account SET pays=11 WHERE pays='USA'; -UPDATE account SET pays=20 WHERE pays IN ('SWEDEN','SUEDE'); -UPDATE account SET pays=17 WHERE pays='PAYS BAS'; -UPDATE account SET pays=2 WHERE pays='BELGIQUE'; -UPDATE account SET pays=123 WHERE pays='JAPAN'; -UPDATE account SET pays=4 WHERE pays='ESPAGNE'; -UPDATE account SET pays=9 WHERE pays='CHINE'; -UPDATE account SET pays=1 WHERE pays='MARTINIQUE'; -UPDATE account SET pays=14 WHERE pays='CANADA'; -UPDATE account SET pays=11 WHERE pays='ETATS UNIS'; -UPDATE account SET pays=227 WHERE pays='UNITED ARAB EMIRATES'; -UPDATE account SET pays=188 WHERE pays='ROUMANIE'; -UPDATE account SET pays=29 WHERE pays='SINGAPOUR'; -UPDATE account SET pays=221 WHERE pays='TUIRQUIE'; -UPDATE account SET pays=13 WHERE pays='ALGERIE'; -UPDATE account SET pays=117 WHERE pays='INDE'; -UPDATE account SET pays=17 WHERE pays='PAYS-BAS'; -UPDATE account SET pays=7 WHERE pays='ENGLAND'; -UPDATE account SET pays=7 WHERE pays IN ('GRANDE-BRETAGNE','UK'); -UPDATE account SET pays=7 WHERE pays='ANGLETERRE'; -UPDATE account SET pays=1 WHERE pays='FRA?CE'; -UPDATE account SET pays=1 WHERE pays='FRABNCE'; -UPDATE account SET pays=17 WHERE pays='PAYS - BAS'; -UPDATE account SET pays=227 WHERE pays='EMIRATS ARABES UNIS'; -UPDATE account SET pays=227 WHERE pays='EMIRATS ARABE UNIS'; -UPDATE account SET pays=2 WHERE pays='BELGIUM'; -UPDATE account SET pays=2 WHERE pays='BELGIQUE BELGIE'; -UPDATE account SET pays=11 WHERE pays='ETATS UNIS USA'; -UPDATE account SET pays=17 WHERE pays='HOLLAND'; -UPDATE account SET pays=7 WHERE pays IN ('ROYAUME UNI','ROYAUME-UNI'); -UPDATE account SET pays=6 WHERE pays='SWITZERLAND'; -UPDATE account SET pays=80 WHERE pays='DANEMARK'; -UPDATE account SET pays=140 WHERE pays='LUXEMBOURG'; -UPDATE account SET pays=35 WHERE pays='ANGOLA'; -UPDATE account SET pays=81 WHERE pays='DJIBOUTI'; -UPDATE account SET pays=27 WHERE pays='MONACO'; -UPDATE account SET pays=28 WHERE pays='AUSTRALIE'; -UPDATE account SET pays=56 WHERE pays='BRESIL'; -UPDATE account SET pays=143 WHERE pays='MADAGASCAR'; -UPDATE account SET pays=25 WHERE pays='PORTUGAL'; -UPDATE account SET pays=22 WHERE pays='SENEGAL'; -UPDATE account SET pays=10 WHERE pays='TUNISIE'; -UPDATE account SET pays=79 WHERE pays IN ('CZECH REPUBLIC','CSECH REPUBLIC','REPUBLIQUE TCHEQUE'); -UPDATE account SET pays=221 WHERE pays='TURQUIE'; -UPDATE account SET pays=41 WHERE pays='AUTRICHE'; -UPDATE account SET pays=21 WHERE pays='Côte d''Ivoire'; -UPDATE account SET pays=24 WHERE pays='CAMEROUN'; -UPDATE account SET pays=17 WHERE pays='THE NETHERLANDS'; -UPDATE account SET pays=1 WHERE pays='ANGERS CEDEX 01'; -UPDATE account SET pays=29 WHERE pays='SINGAPORE'; -UPDATE account SET pays=117 WHERE pays='INDIA'; -UPDATE account SET pays=3 WHERE pays IN ('ITALY','ITALIA'); -UPDATE account SET pays=94 WHERE pays='FINLANDE'; -UPDATE account SET pays=80 WHERE pays='DENMARK (DANEMARK)'; -UPDATE account SET pays=1 WHERE pays='FRANCE Cedex 01'; -UPDATE account SET pays=102 WHERE pays='GREECE'; -UPDATE account SET pays=102 WHERE pays='GRECE'; -UPDATE account SET pays=19 WHERE pays IN ('RUSSIA','RUSSIE'); -UPDATE account SET pays=216 WHERE pays='THAILANDE'; -UPDATE account SET pays=124 WHERE pays='JORDANIE'; -UPDATE account SET pays=134 WHERE pays='LIBAN'; -UPDATE account SET pays=173 WHERE pays='NORWAY'; -UPDATE account SET pays=129 WHERE pays='COREE DU SUD'; -UPDATE account SET pays=44 WHERE pays='BAHREIN'; -UPDATE account SET pays=18 WHERE pays='HONGRIE'; -UPDATE account SET pays=78 WHERE pays='CYPRUS'; -UPDATE account SET pays=165 WHERE pays='NOUVELLE CALEDONIE'; -UPDATE account SET pays=NULL WHERE pays=''; -UPDATE account SET pays=1 WHERE pays='MONTAUBAN DE BRETAGN'; - -UPDATE interv SET pays=1 WHERE pays='FRANCE'; -UPDATE interv SET pays=5 WHERE pays='ALLEMAGNE'; -UPDATE interv SET pays=5 WHERE pays='GERMANY'; -UPDATE interv SET pays=184 WHERE pays='POLOGNE'; -UPDATE interv SET pays=3 WHERE pays='ITALIE'; -UPDATE interv SET pays=12 WHERE pays='MAROC'; -UPDATE interv SET pays=6 WHERE pays='SUISSE'; -UPDATE interv SET pays=7 WHERE pays='GRANDE BRETAGNE'; -UPDATE interv SET pays=7 WHERE pays='UNITED KINGDOM'; -UPDATE interv SET pays=115 WHERE pays IN ('HONG KONG','HONG-KONG'); -UPDATE interv SET pays=85 WHERE pays='EGYPTE'; -UPDATE interv SET pays=201 WHERE pays='SLOVAQUIE'; -UPDATE interv SET pays=11 WHERE pays='USA'; -UPDATE interv SET pays=20 WHERE pays IN ('SWEDEN','SUEDE'); -UPDATE interv SET pays=17 WHERE pays='PAYS BAS'; -UPDATE interv SET pays=2 WHERE pays='BELGIQUE'; -UPDATE interv SET pays=123 WHERE pays='JAPAN'; -UPDATE interv SET pays=4 WHERE pays='ESPAGNE'; -UPDATE interv SET pays=9 WHERE pays='CHINE'; -UPDATE interv SET pays=1 WHERE pays='MARTINIQUE'; -UPDATE interv SET pays=14 WHERE pays='CANADA'; -UPDATE interv SET pays=11 WHERE pays='ETATS UNIS'; -UPDATE interv SET pays=227 WHERE pays='UNITED ARAB EMIRATES'; -UPDATE interv SET pays=188 WHERE pays='ROUMANIE'; -UPDATE interv SET pays=29 WHERE pays='SINGAPOUR'; -UPDATE interv SET pays=221 WHERE pays='TUIRQUIE'; -UPDATE interv SET pays=13 WHERE pays='ALGERIE'; -UPDATE interv SET pays=117 WHERE pays='INDE'; -UPDATE interv SET pays=17 WHERE pays='PAYS-BAS'; -UPDATE interv SET pays=7 WHERE pays='ENGLAND'; -UPDATE interv SET pays=7 WHERE pays IN ('GRANDE-BRETAGNE','UK'); -UPDATE interv SET pays=7 WHERE pays='ANGLETERRE'; -UPDATE interv SET pays=1 WHERE pays='FRA?CE'; -UPDATE interv SET pays=1 WHERE pays='FRABNCE'; -UPDATE interv SET pays=17 WHERE pays='PAYS - BAS'; -UPDATE interv SET pays=227 WHERE pays='EMIRATS ARABES UNIS'; -UPDATE interv SET pays=227 WHERE pays='EMIRATS ARABE UNIS'; -UPDATE interv SET pays=2 WHERE pays='BELGIUM'; -UPDATE interv SET pays=2 WHERE pays='BELGIQUE BELGIE'; -UPDATE interv SET pays=11 WHERE pays='ETATS UNIS USA'; -UPDATE interv SET pays=17 WHERE pays='HOLLAND'; -UPDATE interv SET pays=7 WHERE pays IN ('ROYAUME UNI','ROYAUME-UNI','United Kingdom','UK'); -UPDATE interv SET pays=6 WHERE pays='SWITZERLAND'; -UPDATE interv SET pays=80 WHERE pays='DANEMARK'; -UPDATE interv SET pays=140 WHERE pays='LUXEMBOURG'; -UPDATE interv SET pays=35 WHERE pays='ANGOLA'; -UPDATE interv SET pays=81 WHERE pays='DJIBOUTI'; -UPDATE interv SET pays=27 WHERE pays='MONACO'; -UPDATE interv SET pays=28 WHERE pays='AUSTRALIE'; -UPDATE interv SET pays=56 WHERE pays='BRESIL'; -UPDATE interv SET pays=143 WHERE pays='MADAGASCAR'; -UPDATE interv SET pays=25 WHERE pays='PORTUGAL'; -UPDATE interv SET pays=22 WHERE pays='SENEGAL'; -UPDATE interv SET pays=10 WHERE pays='TUNISIE'; -UPDATE interv SET pays=79 WHERE pays IN ('CZECH REPUBLIC','CSECH REPUBLIC','REPUBLIQUE TCHEQUE'); -UPDATE interv SET pays=221 WHERE pays='TURQUIE'; -UPDATE interv SET pays=41 WHERE pays='AUTRICHE'; -UPDATE interv SET pays=21 WHERE pays='Côte d''Ivoire'; -UPDATE interv SET pays=24 WHERE pays='CAMEROUN'; -UPDATE interv SET pays=17 WHERE pays='THE NETHERLANDS'; -UPDATE interv SET pays=1 WHERE pays='ANGERS CEDEX 01'; -UPDATE interv SET pays=29 WHERE pays='SINGAPORE'; -UPDATE interv SET pays=117 WHERE pays='INDIA'; -UPDATE interv SET pays=3 WHERE pays IN ('ITALY','ITALIA'); -UPDATE interv SET pays=94 WHERE pays='FINLANDE'; -UPDATE interv SET pays=80 WHERE pays='DENMARK (DANEMARK)'; -UPDATE interv SET pays=1 WHERE pays='FRANCE Cedex 01'; -UPDATE interv SET pays=102 WHERE pays='GREECE'; -UPDATE interv SET pays=102 WHERE pays='GRECE'; -UPDATE interv SET pays=19 WHERE pays IN ('RUSSIA','RUSSIE'); -UPDATE interv SET pays=216 WHERE pays='THAILANDE'; -UPDATE interv SET pays=124 WHERE pays='JORDANIE'; -UPDATE interv SET pays=134 WHERE pays='LIBAN'; -UPDATE interv SET pays=173 WHERE pays IN ('NORWAY','NORVEGE'); -UPDATE interv SET pays=129 WHERE pays='COREE DU SUD'; -UPDATE interv SET pays=44 WHERE pays='BAHREIN'; -UPDATE interv SET pays=18 WHERE pays='HONGRIE'; -UPDATE interv SET pays=78 WHERE pays='CYPRUS'; -UPDATE interv SET pays=165 WHERE pays='NOUVELLE CALEDONIE'; -UPDATE interv SET pays=NULL WHERE pays=''; -UPDATE interv SET pays=121 WHERE pays='ISRAEL'; -UPDATE interv SET pays=123 WHERE pays='JAPON'; -UPDATE interv SET pays=213 WHERE pays='TAIWAN'; -UPDATE interv SET pays=118 WHERE pays='INDONESIE'; -UPDATE interv SET pays=154 WHERE pays='MEXIQUE'; -UPDATE interv SET pays=166 WHERE pays='NOUVELLE ZELANDE'; -UPDATE interv SET pays=1 WHERE pays='MONTAUBAN DE BRETAGN'; - - -UPDATE contact SET titre='MR' WHERE titre='M.'; -UPDATE contact SET titre='MME' WHERE titre='Mme'; -UPDATE contact SET titre='MLE' WHERE titre='Mlle'; - -UPDATE interv SET civilite='MR' WHERE civilite='M.'; -UPDATE interv SET civilite='MME' WHERE civilite='Mme'; -UPDATE interv SET civilite='MLE' WHERE civilite='Mlle'; - -UPDATE eleves SET civilite='MR' WHERE civilite='M.'; -UPDATE eleves SET civilite='MME' WHERE civilite='Mme'; -UPDATE eleves SET civilite='MLE' WHERE civilite='Mlle'; - - ---Affect Charle de rostand old user to new user -UPDATE account set com_id='dfbfc33c-039f-102c-b0fb-001aa0790251' WHERE com_id='dfbfc922-039f-102c-b0fb-001aa0790251'; ---Set user email to get all coherent data -UPDATE sf_user SET email_address='mclement@akteos.fr' where id='c84283c0-039f-102c-b0fb-001aa0790251' - -SET foreign_key_checks = 0; -TRUNCATE TABLE llx_user; -INSERT INTO `llx_user` (`rowid`, `entity`, `ref_ext`, `ref_int`, `datec`, `tms`, `login`, `pass`, `pass_crypted`, `pass_temp`, `civilite`, `lastname`, `firstname`, `address`, `zip`, `town`, `fk_state`, `fk_country`, `job`, `office_phone`, `office_fax`, `user_mobile`, `email`, `signature`, `admin`, `module_comm`, `module_compta`, `fk_societe`, `fk_socpeople`, `fk_member`, `fk_user`, `note`, `datelastlogin`, `datepreviouslogin`, `egroupware_id`, `ldap_sid`, `openid`, `statut`, `photo`, `lang`, `color`, `import_key`) VALUES -(1, 0, NULL, NULL, '2013-10-20 14:48:56', '2013-10-20 12:48:57', 'admin_akteos', 'yc382tsz', 'abda7c036c49e6a511efe382b279ecae', NULL, NULL, 'SuperAdmin', '', '', '', '', NULL, NULL, '', '', '', '', '', '', 1, 1, 1, NULL, NULL, NULL, NULL, '', '2013-11-05 12:43:39', '2013-11-05 11:51:25', NULL, '', NULL, 1, NULL, NULL, NULL, NULL), -(2, 1, NULL, NULL, '2011-05-01 09:34:56', '2013-10-20 13:24:53', 'cmigeot', 'test', NULL, NULL, NULL, 'MIGEOT', 'Caroline', '', '', '', NULL, NULL, 'Assistante', '01 55 95 85 17', '01 55 95 85 11', '', 'cmigeot@akteos.fr', '', 0, 0, 0, NULL, NULL, NULL, 11, '', '2013-09-25 08:24:31', '2013-09-02 07:49:50', NULL, NULL, NULL, 1, NULL, NULL, NULL, 'c1b16bb9-49a6-401b-acd2-2945df7c0962'), -(3, 1, NULL, NULL, '2009-08-07 13:25:20', '2013-11-02 08:00:32', 'jandrian', 'test', NULL, NULL, NULL, 'ANDRIAN', 'Janieva', '', '', '', NULL, NULL, 'Chargée de formation', '01 55 95 85 13', '01 55 95 85 11', '', 'jandrian@akteos.fr', 'Bien cordialement
    \r\n
    \r\nJanieva ANDRIAN
    \r\n+33 (0)1 55 95 85 13
    \r\n
    \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n Description : LOGO AKTEOS - Courrier electronique extra petit (48x44)_sans phrase\r\n Le Leader du Management Interculturel
    \r\n 6, rue du Quatre Septembre
    \r\n F - 92130 Issy les Moulineaux
    \r\n www.akteos.fr
    \r\n 
    ', 0, 0, 0, NULL, NULL, NULL, 8, '', '2013-09-21 10:29:04', '2013-08-24 21:23:35', NULL, NULL, NULL, 1, NULL, NULL, NULL, '615d09b2-66e3-4c64-98dd-4c8130f7b975'), -(4, 1, NULL, NULL, '2010-05-06 17:57:52', '2013-10-20 13:24:53', 'ldarrieux', 'test', NULL, NULL, NULL, 'DARRIEUX', 'Laurence', '', '', '', NULL, NULL, 'Chef de projet', '01 55 95 84 66', '01 55 95 85 11', '', 'ldarrieux@akteos.fr', '', 0, 0, 0, NULL, NULL, NULL, 8, '', '2013-09-02 07:43:18', NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, '6d381997-0fee-4a14-9e39-654fb71208e6'), -(5, 1, NULL, NULL, '2013-02-07 17:32:57', '2013-08-27 13:56:43', 'mclement', 'test', NULL, NULL, NULL, 'CLEMENT', 'Mehdi', '', '', '', NULL, NULL, 'Attaché commercial', '01 55 95 84 65', '', '', 'mclement@akteos.fr', '', 0, 0, 0, NULL, NULL, NULL, 8, '', NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, 'c84283c0-039f-102c-b0fb-001aa0790251'), -(6, 1, NULL, NULL, '2012-03-01 11:55:18', '2013-10-20 13:24:53', 'dnguyen', 'test', NULL, NULL, NULL, 'NGUYEN', 'David', '', '', '', NULL, NULL, 'Attaché commercial', '01 55 95 84 69', '01 55 95 85 11', '', 'dnguyen@akteos.fr', '', 0, 0, 0, NULL, NULL, NULL, 8, '', '2013-10-30 09:47:36', '2013-08-21 17:02:14', NULL, NULL, NULL, 1, NULL, NULL, NULL, '0b9cc699-eb5f-4000-a84b-6a55a84a50be'), -(8, 1, NULL, NULL, NULL, '2013-11-01 21:31:12', 'crostand', 'test', NULL, NULL, NULL, 'ROSTAND', 'Charles', '', '', '', NULL, NULL, 'Directeur Général', '01 55 95 85 10', '01 55 95 85 11', '06 80 26 18 81', 'crostand@akteos.fr', 'Bien cordialement
    \r\n
    \r\nCharles Rostand
    \r\nDirecteur Général
    ', 1, 0, 0, NULL, NULL, NULL, NULL, '', '2013-08-29 08:17:11', NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, 'c8428226-039f-102c-b0fb-001aa0790251'), -(10, 1, NULL, NULL, NULL, '2013-10-20 13:24:53', 'lrostand', 'test', NULL, NULL, NULL, 'ROSTAND', 'Laure', '', '', '', NULL, NULL, 'Présidente', '01 55 95 85 15', '01 55 95 85 16', '06 60 34 31 10', 'lrostand@akteos.fr', 'Bien cordialement
    \r\n
    \r\nLaure Rostand
    \r\nPrésidente
    \r\n
    \r\n01 55 95 85 15
    \r\n06 60 34 31 10', 1, 0, 0, NULL, NULL, NULL, NULL, '', '2013-11-04 23:49:27', '2013-11-04 23:30:46', NULL, NULL, NULL, 1, NULL, NULL, NULL, 'c8427bb4-039f-102c-b0fb-001aa0790251'), -(11, 1, NULL, NULL, NULL, '2013-10-20 13:24:53', 'phabourdin', 'test', NULL, NULL, NULL, 'HABOURDIN', 'Pascale', '', '', '', NULL, NULL, 'Chef de Projet', '01 55 95 85 12', '01 55 95 85 11', '', 'phabourdin@akteos.fr', '', 0, 0, 0, NULL, NULL, NULL, 8, '', '2013-10-25 14:53:40', '2013-10-25 14:52:03', NULL, NULL, NULL, 1, NULL, NULL, NULL, 'c8428078-039f-102c-b0fb-001aa0790251'), -(13, 1, NULL, NULL, '2013-08-24 08:50:48', '2013-11-19 21:41:30', 'hlefebvre', 'test', '098f6bcd4621d373cade4e832627b4f6', NULL, NULL, 'LEFEBVRE', 'Hélène', '', '', '', NULL, NULL, 'Assitante', '', '', '', 'hlefebvre@akteos.fr', '', 0, 1, 1, NULL, NULL, NULL, 4, '', NULL, NULL, NULL, '', NULL, 1, NULL, NULL, NULL, '5a6c9f40-9e93-48ae-9298-cf5e0c5b104f'), -(14, 1, NULL, NULL, '2013-08-24 08:52:11', '2013-11-19 21:41:43', 'cmontaud', 'test', '098f6bcd4621d373cade4e832627b4f6', NULL, NULL, 'MONTAUD', 'Claire', '', '', '', NULL, NULL, 'Assistante', '', '', '', 'cmontaud@akteos.fr', '', 0, 1, 1, NULL, NULL, NULL, 8, '', '2013-09-02 08:11:24', '2013-09-02 07:45:33', NULL, '', NULL, 1, NULL, NULL, NULL, '1670409a-198c-4d9a-86f9-e0d0fbf9d6cb'), -(15, 1, NULL, NULL, '2013-08-24 08:53:33', '2013-11-19 21:41:55', 'ctesson', 'test', '098f6bcd4621d373cade4e832627b4f6', NULL, NULL, 'TESSON', 'Cécile', '', '', '', NULL, NULL, 'Chargée de communication', '', '', '', 'ctesson@akteos.fr', '', 0, 1, 1, NULL, NULL, NULL, 10, '', '2013-09-02 07:42:19', '2013-09-01 23:00:32', NULL, '', NULL, 1, NULL, NULL, NULL, 'ae0039da-2646-4883-bd4f-637a1e4744b4'), -(16, 1, NULL, NULL, '2010-09-07 16:09:53', '2010-09-07 14:10:03', 'EVM', 'test', NULL, NULL, NULL, 'Evenements', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '01718fa8-1e9a-4b1f-bf7d-cf9e3729cf53'), -(17, 1, NULL, NULL, '2009-04-27 18:28:26', '2010-04-14 17:37:21', 'CB', 'test', NULL, NULL, NULL, 'Borlet', 'Christophe', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'cborlet@akteos.fr', NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '0dc9343b-6fa3-4c2b-bf7b-da4c55c08952'), -(18, 1, NULL, NULL, '2011-03-22 09:21:11', '2011-08-31 14:17:12', 'NOMAD', 'test', NULL, NULL, NULL, 'Nomad', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'nomad@akteos.fr', NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '2225e4d8-128a-45a0-85a0-0ba49a0708f4'), -(19, 1, NULL, NULL, '2011-05-01 09:10:49', '2012-07-26 13:21:47', 'NF', 'test', NULL, NULL, NULL, 'Forté', 'Nathalie', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'nforte@akteos.fr', NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '283f2798-80cb-49f7-a9be-513dfefdd0bd'), -(20, 1, NULL, NULL, '2011-03-08 17:16:23', '2011-08-31 14:16:47', 'CONSEIL', 'test', NULL, NULL, NULL, 'Conseil', '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'conseil@akteos.fr', NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '373377aa-daff-468e-875a-9662a2dbfaa6'), -(21, 1, NULL, NULL, '2010-04-14 19:39:22', '2010-09-08 14:50:57', 'JBI', 'test', NULL, NULL, NULL, 'Bidou', 'Julie', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'jbidou@akteos.fr', NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '58f5ca7a-8dc8-4bd4-b5d1-1be0572706a1'), -(22, 1, NULL, NULL, '2009-09-01 12:35:28', '2010-04-14 17:37:14', 'EH', 'test', NULL, NULL, NULL, 'Hauw', 'Elisabeth', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '6f70587b-8f8f-4b02-827e-168a097f56b9'), -(23, 1, NULL, NULL, '2011-03-10 19:15:46', '2011-08-31 14:16:35', 'AKTEOS', 'test', NULL, NULL, NULL, 'Akteos', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'akteos@akteos.fr', NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, '979c21e3-6ad2-45c0-82c0-76133a63a596'), -(24, 1, NULL, NULL, '2009-11-22 21:33:41', '2010-09-08 14:50:50', 'JB', 'test', NULL, NULL, NULL, 'Bons', 'Julien', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'jbons@akteos.fr', NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, 'a32f81fb-6a39-4e71-8d15-6f4969fc1187'), -(25, 1, NULL, NULL, '2011-01-11 15:42:01', '2011-03-28 13:40:45', 'WC', 'test', NULL, NULL, NULL, 'Cabrera', 'William', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'wcabrera@akteos.fr', NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, 'a72692dd-ce6e-4835-8f6b-e3697bb2f240'), -(26, 1, NULL, NULL, '2010-11-02 08:52:37', '2011-01-11 14:41:43', 'KG', 'test', NULL, NULL, NULL, 'Gazo', 'Kevin', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'kgazo@akteos.fr', NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, 'a77d7323-0c45-455f-abba-d89c1d7a61b8'), -(27, 1, NULL, NULL, NULL, '2011-08-31 14:17:28', 'SIE', 'test', NULL, NULL, NULL, 'Admin', 'Administrateur', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, 'c8427b3c-039f-102c-b0fb-001aa0790251'), -(28, 1, NULL, NULL, NULL, '2010-09-08 14:51:03', 'PG', 'test', NULL, NULL, NULL, 'Yon', 'Anne-Catherine', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'acyon@akteos.fr', NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, 'c8428000-039f-102c-b0fb-001aa0790251'), -(29, 1, NULL, NULL, NULL, '2010-09-08 14:51:23', 'VH', 'test', NULL, NULL, NULL, 'Sok', 'Many', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'msok@akteos.fr', NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, 'c84280e6-039f-102c-b0fb-001aa0790251'), -(30, 1, NULL, NULL, NULL, '2012-02-08 09:49:39', 'BC', 'test', NULL, NULL, NULL, 'de Carné', 'Bérengère', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'bdecarne@akteos.fr', NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, 'c8428154-039f-102c-b0fb-001aa0790251'), -(31, 1, NULL, NULL, NULL, '2010-04-14 17:36:57', 'JS', 'test', NULL, NULL, NULL, 'Slowikowska', 'Joanna', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, 'c84281b8-039f-102c-b0fb-001aa0790251'), -(32, 1, NULL, NULL, NULL, '2010-04-14 17:36:48', 'MM', 'test', NULL, NULL, NULL, 'Merchiakh', 'Marie', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, 'c842828a-039f-102c-b0fb-001aa0790251'), -(33, 1, NULL, NULL, NULL, '2010-04-14 17:37:02', 'JL', 'test', NULL, NULL, NULL, 'Legodec', 'Julie', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, 'c842835c-039f-102c-b0fb-001aa0790251'), -(34, 1, NULL, NULL, NULL, '2010-04-14 17:40:14', 'NB', 'test', NULL, NULL, NULL, 'Nadia', 'Ben Bella', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, 'c842842e-039f-102c-b0fb-001aa0790251'), -(35, 1, NULL, NULL, NULL, '2011-08-31 14:17:40', 'TC', 'test', NULL, NULL, NULL, 'Cordalija', 'Tima', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'tcordalija@akteos.fr', NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, 'c8428492-039f-102c-b0fb-001aa0790251'), -(36, 1, NULL, NULL, '2009-10-19 12:43:43', '2010-04-14 17:36:31', 'RC', 'test', NULL, NULL, NULL, 'Canet', 'Romain', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, 'ea94a3e2-4aac-4686-bfdb-45d620a7d23f'), -(37, 1, NULL, NULL, '2012-06-10 16:23:15', '2012-07-26 13:21:53', 'MG', 'test', NULL, NULL, NULL, 'Gripon', 'Mathieu', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'mgripon@akteos.fr', NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, 'fffcb945-ee3f-4ac1-861d-bd33112cf57b'); - - ---Insert inactive user - -/* - -UPDATE llx_user as doluser, sf_user as stuser SET doluser.import_key=stuser.id where doluser.email=stuser.email_address; -INSERT INTO llx_user ( -entity, -ref_ext, -ref_int, -datec, -tms, -login, -pass, -pass_crypted, -pass_temp, -civilite, -lastname, -firstname, -address, -zip, -town, -fk_state, -fk_country, -job, -office_phone, -office_fax, -user_mobile, -email, -signature, -admin, -module_comm, -module_compta, -fk_societe, -fk_socpeople, -fk_member, -fk_user, -note, -datelastlogin, -datepreviouslogin, -egroupware_id, -ldap_sid, -openid, -statut, -photo, -lang, -color, -import_key) -SELECT DISTINCT -1,--entity, -sf_user.external_ref, --ref_ext, -NULL, --ref_int, -sf_user.created, --datec, -sf_user.modified, --tms, -sf_user.login, --login, -'test', --pass, -NULL, --pass_crypted, -NULL, --pass_temp, -NULL, --civilite, -sf_user.lastname, --lastname, -sf_user.firstname,--firstname, -NULL, --address, -NULL, --zip, -NULL, --town, -NULL, --fk_state, -NULL, --fk_country, -NULL, --job, -NULL, --office_phone, -NULL, --office_fax, -NULL, --user_mobile, -TRIM(sf_user.email_address), --email, -NULL, --signature, -0, --admin, -0, --module_comm, -0, --module_compta, -NULL, --fk_societe, -NULL, --fk_socpeople, -NULL, --fk_member, -NULL, --fk_user, -NULL, --note, -NULL, --datelastlogin, -NULL, --datepreviouslogin, -NULL, --egroupware_id, -NULL, --ldap_sid, -NULL, --openid, -0, --statut, -NULL, --photo, -NULL, --lang, -NULL, --color, -sf_user.id -- import_key -FROM sf_user -WHERE sf_user.state='disabled'; -*/ - - - ---Import Category - -TRUNCATE TABLE `llx_categorie`; -INSERT INTO `llx_categorie` (`rowid`, `entity`, `fk_parent`, `label`, `type`, `description`, `fk_soc`, `visible`, `import_key`) VALUES -(1, 1, 0, 'Produit', 0, 'Tous les produits vendus par Akteos, à l'exception des frais', NULL, 0, NULL), -(3, 1, 0, 'Frais', 0, 'Tous les frais générés par les interventions d'Akteos (dépacement, hébergement, restauration, salle,...) à l'exception des consultants, et refacturés aux clients (en général à l'euro près).', NULL, 0, NULL), -(6, 1, 1, 'Produit pédagogique', 0, 'Tous les produits en rapport avec les formations à prendre en considération pour le Bilan Pédagogique et Financier', NULL, 0, NULL), -(7, 1, 1, 'Produit non pédagogique', 0, 'Tous les produits qui ne sont pas considérés comme de la formation et ne sont pas comptabilisés dans le Bilan Pédagogique et Financier', NULL, 0, NULL), -(8, 1, 6, 'Conception', 0, '', NULL, 0, NULL), -(9, 1, 6, 'Intervention', 0, '', NULL, 0, NULL), -(10, 1, 6, 'Outil pédagogique', 0, '', NULL, 0, NULL), -(30, 1, 31, 'Particulier', 4, '', NULL, 0, NULL), -(12, 1, 0, 'Consultant', 1, '', NULL, 0, NULL), -(15, 1, 12, 'Consultant Etranger', 1, '', NULL, 0, NULL), -(16, 1, 12, 'Consultant France', 1, '', NULL, 0, NULL), -(17, 1, 12, 'Consultant Suppléant', 1, '', NULL, 0, NULL), -(28, 1, 31, 'Salarié bénéficiant d''un financement par l''employeur', 4, '', NULL, 0, NULL), -(21, 1, 0, 'Logistique', 1, 'Hotel, Restaurant, Agence de voyage, Imprimeur,...', NULL, 0, NULL), -(22, 1, 0, 'Communication', 1, '', NULL, 0, NULL), -(23, 1, 1, 'Produit HT', 0, '', NULL, 0, NULL), -(24, 1, 6, 'On Line', 0, '', NULL, 0, NULL), -(25, 1, 3, 'Frais HT', 0, '', NULL, 0, NULL), -(29, 1, 31, 'Demandeur d''emploi', 4, '', NULL, 0, NULL), -(31, 1, 0, 'Participant', 4, '', NULL, 0, NULL), -(32, 1, 0, 'Consultant', 4, '', NULL, 0, NULL), -(33, 1, 32, 'Travailleur indépendant', 4, '', NULL, 0, NULL), -(34, 1, 32, 'CDI', 4, '', NULL, 0, NULL), -(35, 1, 32, 'CDD', 4, '', NULL, 0, NULL), -(36, 1, 32, 'Formateur occasionnel', 4, '', NULL, 0, NULL), -(37, 1, 32, 'Bénévole', 4, '', NULL, 0, NULL); - - - -TRUNCATE TABLE llx_c_typent; -INSERT INTO `llx_c_typent` (`id`, `code`, `libelle`, `active`, `module`) VALUES -(0, 'TE_UNKNOWN', '-', 1, NULL), -(1, 'TE_STARTUP', 'Start-up', 0, NULL), -(2, 'TE_GROUP', 'Entreprise française', 0, NULL), -(3, 'TE_PAY', 'Payeur', 1, NULL), -(4, 'TE_SMALL', 'TPE', 0, NULL), -(5, 'TE_ADMIN', 'Pouvoirs publics', 1, NULL), -(6, 'TE_WHOLE', 'Grossiste', 0, NULL), -(7, 'TE_RETAIL', 'Revendeur', 0, NULL), -(8, 'TE_PRIVATE', 'Particulier', 1, NULL), -(100, 'TE_OTHER', 'Autres', 0, NULL), -(101, 'TE_ENT_FR', 'Entreprise française', 1, NULL), -(102, 'TE_ENT_ET', 'Entreprise étrangère', 1, NULL), -(103, 'TE_OPCA', 'OPCA', 1, NULL), -(104, 'TE_FORMATION', 'Prestataire de formation', 1, NULL); - - ---Insert customer typed account into thridparty -TRUNCATE TABLE llx_societe; -INSERT INTO llx_societe(nom, -entity, -ref_ext, -ref_int, -statut, -parent, -tms, -datec, -datea, -status, -code_client, -code_fournisseur, -code_compta, -code_compta_fournisseur, -address, -zip, -town, -fk_departement, -fk_pays, -phone, -fax, -url, -email, -fk_effectif, -fk_typent, -fk_forme_juridique, -fk_currency, -siren, -siret, -ape, -idprof4, -idprof5, -idprof6, -tva_intra, -capital, -fk_stcomm, -note_private, -note_public, -prefix_comm, -client, -fournisseur, -supplier_account, -fk_prospectlevel, -customer_bad, -customer_rate, -supplier_rate, - fk_user_creat, -fk_user_modif, -remise_client, -mode_reglement, -cond_reglement, -tva_assuj, -localtax1_assuj, -localtax2_assuj, -barcode, -fk_barcode_type, -price_level, -default_lang, -logo, -canvas, -import_key) -SELECT DISTINCT act.nom, - 1, - act.accountcode, - act.leadcode, - 0, - NULL, - act.modified, - act.created, - act.created, - act.disabled, - act.accountcode, - NULL, - LEFT(leg.piece,3), -NULL, -CONCAT_WS(' ',act.adresse, act.adresse2), -act.codepostal, -act.ville, -NULL, -act.pays, -act.tel, -act.fax, -act.siteweb, -TRIM(act.email), -NULL, -0, -NULL, -0, -NULL, -act.siret, -ref_sect.secteur, -NULL, -NULL, -NULL, -LEFT(act.tvaintracom,20), -NULL, -0, -act.remarque, -NULL, -NULL, -act.client, -0, -NULL, -NULL, -0, -0, -0, -IFNULL(usercrea.rowid,1), -IFNULL(usermod.rowid,1), -0, -modpay.id, -payterm.rowid, -act.tva, -NULL, -NULL, -NULL, -0, -NULL, -NULL, -NULL, -NULL, -act.id -FROM thirdparty as so -INNER JOIN account as act ON so.account_id=act.id AND so.type='account' -LEFT OUTER JOIN legacy_mvt as leg ON so.id=leg.thirdparty_id -LEFT OUTER JOIN ref_sect ON ref_sect.code=act.secteur -LEFT OUTER JOIN llx_c_paiement as modpay ON modpay.code = act.modreg -LEFT OUTER JOIN llx_c_payment_term as payterm ON payterm.nbjour = act.jourreg AND payterm.active=1 -LEFT OUTER JOIN sf_user as usercreast ON usercreast.id=act.created_by_sf_user_id -LEFT OUTER JOIN llx_user as usercrea ON usercreast.email_address=usercrea.email -LEFT OUTER JOIN sf_user as usermodst ON usermodst.id=act.modified_by_sf_user_id -LEFT OUTER JOIN llx_user as usermod ON usermodst.email_address=usermod.email -WHERE act.type IN ('ENT','EE','OP','PAY','PP','IND', 'PAR'); - ---Import supplier -INSERT INTO llx_societe(nom, -entity, -ref_ext, -ref_int, -statut, -parent, -tms, -datec, -datea, -status, -code_client, -code_fournisseur, -code_compta, -code_compta_fournisseur, -address, -zip, -town, -fk_departement, -fk_pays, -phone, -fax, -url, -email, -fk_effectif, -fk_typent, -fk_forme_juridique, -fk_currency, -siren, -siret, -ape, -idprof4, -idprof5, -idprof6, -tva_intra, -capital, -fk_stcomm, -note_private, -note_public, -prefix_comm, -client, -fournisseur, -supplier_account, -fk_prospectlevel, -customer_bad, -customer_rate, -supplier_rate, - fk_user_creat, -fk_user_modif, -remise_client, -mode_reglement, -cond_reglement, -tva_assuj, -localtax1_assuj, -localtax2_assuj, -barcode, -fk_barcode_type, -price_level, -default_lang, -logo, -canvas, -import_key) -SELECT DISTINCT act.nom, - 1, - act.accountcode, - act.leadcode, - 0, - NULL, - act.modified, - act.created, - act.created, - act.disabled, - act.accountcode, - NULL, - LEFT(leg.piece,3), -NULL, -CONCAT_WS(' ',act.adresse, act.adresse2), -act.codepostal, -act.ville, -NULL, -act.pays, -act.tel, -act.fax, -act.siteweb, -TRIM(act.email), -NULL, -0, -NULL, -0, -NULL, -act.siret, -ref_sect.secteur, -NULL, -NULL, -NULL, -LEFT(act.tvaintracom,20), -NULL, -0, -act.remarque, -NULL, -NULL, -0, -1, -NULL, -NULL, -0, -0, -0, -IFNULL(usercrea.rowid,1), -IFNULL(usermod.rowid,1), -0, -modpay.id, -payterm.rowid, -act.tva, -NULL, -NULL, -NULL, -0, -NULL, -NULL, -NULL, -NULL, -act.id -FROM thirdparty as so -INNER JOIN account as act ON so.account_id=act.id AND so.type='account' -LEFT OUTER JOIN legacy_mvt as leg ON so.id=leg.thirdparty_id -LEFT OUTER JOIN ref_sect ON ref_sect.code=act.secteur -LEFT OUTER JOIN llx_c_paiement as modpay ON modpay.code = act.modreg -LEFT OUTER JOIN llx_c_payment_term as payterm ON payterm.nbjour = act.jourreg AND payterm.active=1 -LEFT OUTER JOIN sf_user as usercreast ON usercreast.id=act.created_by_sf_user_id -LEFT OUTER JOIN llx_user as usercrea ON usercreast.email_address=usercrea.email -LEFT OUTER JOIN sf_user as usermodst ON usermodst.id=act.modified_by_sf_user_id -LEFT OUTER JOIN llx_user as usermod ON usermodst.email_address=usermod.email -WHERE act.type='FOU'; - ---Insert prospect -INSERT INTO llx_societe(nom, -entity, -ref_ext, -ref_int, -statut, -parent, -tms, -datec, -datea, -status, -code_client, -code_fournisseur, -code_compta, -code_compta_fournisseur, -address, -zip, -town, -fk_departement, -fk_pays, -phone, -fax, -url, -email, -fk_effectif, -fk_typent, -fk_forme_juridique, -fk_currency, -siren, -siret, -ape, -idprof4, -idprof5, -idprof6, -tva_intra, -capital, -fk_stcomm, -note_private, -note_public, -prefix_comm, -client, -fournisseur, -supplier_account, -fk_prospectlevel, -customer_bad, -customer_rate, -supplier_rate, - fk_user_creat, -fk_user_modif, -remise_client, -mode_reglement, -cond_reglement, -tva_assuj, -localtax1_assuj, -localtax2_assuj, -barcode, -fk_barcode_type, -price_level, -default_lang, -logo, -canvas, -import_key) -SELECT DISTINCT act.nom, - 1, - act.accountcode, - act.leadcode, - 0, - NULL, - act.modified, - act.created, - act.created, - act.disabled, - act.accountcode, - NULL, - NULL, -NULL, -CONCAT_WS(' ',act.adresse, act.adresse2), -act.codepostal, -act.ville, -NULL, -act.pays, -act.tel, -act.fax, -act.siteweb, -TRIM(act.email), -NULL, -0, -NULL, -0, -NULL, -act.siret, -ref_sect.secteur, -NULL, -NULL, -NULL, -LEFT(act.tvaintracom,20), -NULL, -0, -act.remarque, -NULL, -NULL, -2, -0, -NULL, -NULL, -0, -0, -0, -IFNULL(usercrea.rowid,1), -IFNULL(usermod.rowid,1), -0, -modpay.id, -payterm.rowid, -act.tva, -NULL, -NULL, -NULL, -0, -NULL, -NULL, -NULL, -NULL, -act.id -FROM account as act -LEFT OUTER JOIN ref_sect ON ref_sect.code=act.secteur -LEFT OUTER JOIN llx_c_paiement as modpay ON modpay.code = act.modreg -LEFT OUTER JOIN llx_c_payment_term as payterm ON payterm.nbjour = act.jourreg AND payterm.active=1 -LEFT OUTER JOIN sf_user as usercreast ON usercreast.id=act.created_by_sf_user_id -LEFT OUTER JOIN llx_user as usercrea ON usercreast.email_address=usercrea.email -LEFT OUTER JOIN sf_user as usermodst ON usermodst.id=act.modified_by_sf_user_id -LEFT OUTER JOIN llx_user as usermod ON usermodst.email_address=usermod.email -WHERE act.id NOT IN (SELECT account_id from thirdparty WHERE account_id IS NOT NULL ) -AND act.type IN ('ENT','EE','OP','PAY','PP','IND', 'PAR'); - - -UPDATE llx_societe SET fk_typent=101 WHERE import_key IN (SELECT id from account where type='ENT'); -UPDATE llx_societe SET fk_typent=102 WHERE import_key IN (SELECT id from account where type='EE'); -UPDATE llx_societe SET fk_typent=103 WHERE import_key IN (SELECT id from account where type='OP'); -UPDATE llx_societe SET fk_typent=3 WHERE import_key IN (SELECT id from account where type='PAY'); -UPDATE llx_societe SET fk_typent=5 WHERE import_key IN (SELECT id from account where type='PP'); -UPDATE llx_societe SET fk_typent=8 WHERE import_key IN (SELECT id from account where type='IND'); - -UPDATE llx_societe SET fk_prospectlevel='PL_HIGH' WHERE import_key IN (SELECT id from account where cycle_vie='01'); -UPDATE llx_societe SET fk_prospectlevel='PL_MEDIUM' WHERE import_key IN (SELECT id from account where cycle_vie='02'); -UPDATE llx_societe SET fk_prospectlevel='PL_LOW' WHERE import_key IN (SELECT id from account where cycle_vie='03'); -UPDATE llx_societe SET fk_prospectlevel='PL_NONE' WHERE import_key IN (SELECT id from account where cycle_vie='04'); -UPDATE llx_societe SET fk_prospectlevel='PL_NONE' WHERE import_key IN (SELECT id from account where cycle_vie='05'); - - - -INSERT INTO llx_societe_extrafields (fk_object,ts_secteur,ts_prospection) -SELECT -llx_societe.rowid, -act.secteur, -CASE WHEN (act.approche='MM') THEN (select rowid from llx_user where login='jandrian') - WHEN (act.approche='NAD') THEN (select rowid from llx_user where login='dnguyen') - WHEN (act.approche='MC') THEN (select rowid from llx_user where login='mclement') - ELSE null END -FROM account as act INNER JOIN llx_societe ON llx_societe.import_key=act.id AND act.secteur IS NOT NULL; - -UPDATE llx_societe_extrafields SET ts_secteur='AERO' WHERE ts_secteur IN ('09'); -UPDATE llx_societe_extrafields SET ts_secteur='ALIM' WHERE ts_secteur IN ('23'); -UPDATE llx_societe_extrafields SET ts_secteur='AUTO' WHERE ts_secteur IN ('18'); -UPDATE llx_societe_extrafields SET ts_secteur='BTP' WHERE ts_secteur IN ('31', '08'); -UPDATE llx_societe_extrafields SET ts_secteur='CHIM' WHERE ts_secteur IN ('21', '38', '40'); -UPDATE llx_societe_extrafields SET ts_secteur='CONS' WHERE ts_secteur IN ('26', '71'); -UPDATE llx_societe_extrafields SET ts_secteur='CONSO' WHERE ts_secteur IN ('04'); -UPDATE llx_societe_extrafields SET ts_secteur='DISTRI' WHERE ts_secteur IN ('10'); -UPDATE llx_societe_extrafields SET ts_secteur='EDUC' WHERE ts_secteur IN ('29'); -UPDATE llx_societe_extrafields SET ts_secteur='ENERG' WHERE ts_secteur IN ('15', '33', '36', '41'); -UPDATE llx_societe_extrafields SET ts_secteur='FIN' WHERE ts_secteur IN ('06', '42'); -UPDATE llx_societe_extrafields SET ts_secteur='INGEN' WHERE ts_secteur IN ('13', '37'); -UPDATE llx_societe_extrafields SET ts_secteur='LUX' WHERE ts_secteur IN ('32'); -UPDATE llx_societe_extrafields SET ts_secteur='PUB' WHERE ts_secteur IN ('12'); -UPDATE llx_societe_extrafields SET ts_secteur='SP' WHERE ts_secteur IN ('02'); -UPDATE llx_societe_extrafields SET ts_secteur='TIC' WHERE ts_secteur IN ('22', '28'); -UPDATE llx_societe_extrafields SET ts_secteur='TOURISM' WHERE ts_secteur IN ('01'); -UPDATE llx_societe_extrafields SET ts_secteur='TRANSP' WHERE ts_secteur IN ('30'); -UPDATE llx_societe_extrafields SET ts_secteur=NULL WHERE ts_secteur IN ('00', '05', '27', '34', '35', '39', '43'); - - - - - -TRUNCATE TABLE llx_socpeople; - ---Insert Contact of thirdparty -INSERT INTO llx_socpeople (datec, -tms, -fk_soc, -entity, -ref_ext, -civilite, -lastname, -firstname, -address, -zip, -town, -fk_departement, -fk_pays, -birthday, -poste, -phone, -phone_perso, -phone_mobile, -fax, -email, -jabberid, -no_email, -priv, -fk_user_creat, -fk_user_modif, -note_private, -note_public, -default_lang, -canvas, -import_key, -statut) -SELECT -contact.created, -contact.modified, -soc.rowid, -1, -contact.external_ref, -civ.code, -contact.nom, -contact.prenom, -CONCAT_WS(' ',contact.adresse, contact.adresse2), -contact.codepostal, -contact.ville, -NULL, -soc.fk_pays, -NULL, -LEFT(contact.vendredi, 80),--fonc.libelle, -contact.tel, -NULL, -contact.portable, -contact.fax, -TRIM(contact.email), -NULL, -0, -0, -IFNULL(usercrea.rowid,1), -IFNULL(usermod.rowid,1), -CONCAT_WS(' ',contact.remarque, contact.mardi), -NULL, -NULL, -NULL, -contact.id, -CASE WHEN (contact.disabled=1) THEN 0 ELSE 1 END -FROM contact -INNER JOIN account ON contact.account_id = account.id -INNER JOIN llx_societe as soc ON soc.import_key=account.id -LEFT OUTER JOIN llx_c_civilite as civ ON civ.code=contact.titre -LEFT OUTER JOIN ref_fonc as fonc ON fonc.fonction=contact.fonction -LEFT OUTER JOIN sf_user as usercreast ON usercreast.id=contact.created_by_sf_user_id -LEFT OUTER JOIN llx_user as usercrea ON usercreast.email_address=usercrea.email -LEFT OUTER JOIN sf_user as usermodst ON usermodst.id=contact.modified_by_sf_user_id -LEFT OUTER JOIN llx_user as usermod ON usermodst.email_address=usermod.email -WHERE contact.nom IS NOT NULL AND TRIM(contact.nom)<>''; - - -INSERT INTO llx_socpeople_extrafields (fk_object,ct_anglais,ct_service, ct_magellan) -SELECT cont.rowid, -CASE WHEN (contact.samedi='EN') THEN 1 ELSE 0 END, -fonc.fonction, -CASE WHEN (contact.lundi='Magellan' OR contact.lundi='Cercle Magellan') THEN 1 ELSE 0 END -FROM llx_socpeople as cont -INNER JOIN contact ON cont.import_key=contact.id -LEFT OUTER JOIN ref_fonc as fonc ON fonc.fonction=contact.fonction; - -UPDATE llx_socpeople_extrafields SET ct_service='DMA' WHERE ct_service='CDP'; -UPDATE llx_socpeople_extrafields SET ct_service='AUT' WHERE ct_service='CF'; -UPDATE llx_socpeople_extrafields SET ct_service='DFI' WHERE ct_service='COM'; -UPDATE llx_socpeople_extrafields SET ct_service='DEX' WHERE ct_service='DDI'; -UPDATE llx_socpeople_extrafields SET ct_service='DG' WHERE ct_service='DGA'; -UPDATE llx_socpeople_extrafields SET ct_service='DG' WHERE ct_service='DGN'; -UPDATE llx_socpeople_extrafields SET ct_service='DRD' WHERE ct_service='DIN'; -UPDATE llx_socpeople_extrafields SET ct_service='DJU' WHERE ct_service='DJ'; -UPDATE llx_socpeople_extrafields SET ct_service='AUT' WHERE ct_service='DMK'; -UPDATE llx_socpeople_extrafields SET ct_service='DBU' WHERE ct_service='DOP'; -UPDATE llx_socpeople_extrafields SET ct_service=null WHERE ct_service='DPE'; -UPDATE llx_socpeople_extrafields SET ct_service='DBU' WHERE ct_service='DRE'; -UPDATE llx_socpeople_extrafields SET ct_service='DG' WHERE ct_service='DST'; -UPDATE llx_socpeople_extrafields SET ct_service=null WHERE ct_service='DTC'; -UPDATE llx_socpeople_extrafields SET ct_service='AUT' WHERE ct_service='GEN'; -UPDATE llx_socpeople_extrafields SET ct_service='RMI' WHERE ct_service='INT'; -UPDATE llx_socpeople_extrafields SET ct_service='RGC' WHERE ct_service='MAG'; -UPDATE llx_socpeople_extrafields SET ct_service='AUT' WHERE ct_service='PAR'; -UPDATE llx_socpeople_extrafields SET ct_service='DG' WHERE ct_service='PDG'; -UPDATE llx_socpeople_extrafields SET ct_service='DG' WHERE ct_service='PRE'; -UPDATE llx_socpeople_extrafields SET ct_service='AUT' WHERE ct_service='RDD'; -UPDATE llx_socpeople_extrafields SET ct_service='RDI' WHERE ct_service='RDI'; -UPDATE llx_socpeople_extrafields SET ct_service='RRH' WHERE ct_service='RDP'; -UPDATE llx_socpeople_extrafields SET ct_service='DFO' WHERE ct_service='REL'; -UPDATE llx_socpeople_extrafields SET ct_service='RRH' WHERE ct_service='REP'; -UPDATE llx_socpeople_extrafields SET ct_service='RMI' WHERE ct_service='REX'; -UPDATE llx_socpeople_extrafields SET ct_service='RGC' WHERE ct_service='RGC'; -UPDATE llx_socpeople_extrafields SET ct_service='RMI' WHERE ct_service='RIM'; -UPDATE llx_socpeople_extrafields SET ct_service='DFI' WHERE ct_service='RPA'; -UPDATE llx_socpeople_extrafields SET ct_service='RRH' WHERE ct_service='RRC'; -UPDATE llx_socpeople_extrafields SET ct_service='ASS' WHERE ct_service='SEC'; -UPDATE llx_socpeople_extrafields SET ct_service='DG' WHERE ct_service='SGN'; -UPDATE llx_socpeople_extrafields SET ct_service='ASS' WHERE ct_service='STA'; -UPDATE llx_socpeople_extrafields SET ct_service='DG' WHERE ct_service='VPR'; - - - - ---update commercial on customer -TRUNCATE TABLE llx_societe_commerciaux; - -INSERT INTO llx_societe_commerciaux (fk_soc,fk_user) -SELECT soc.rowid,usr.rowid -FROM llx_societe as soc -INNER JOIN account ON soc.import_key=account.id -INNER JOIN com ON com.id=account.com_id -INNER JOIN llx_user as usr ON com.email=usr.email; - ---Update Mother company -UPDATE llx_societe as soc,account as child, account as parent,llx_societe as socparent -SET soc.parent=socparent.rowid, -soc.tms=soc.tms -WHERE soc.import_key=child.id -AND child.groupe_account_id=parent.id -AND socparent.import_key=parent.id -AND child.groupe_account_id<>child.id; - ---Create asktoes as thirdparty to import place/room -INSERT INTO llx_societe (nom,entity,tms,datec,datea,status,address,zip,town,fk_pays,client,fournisseur,import_key) -VALUES ('Akteos',1,NOW(),NOW(),NOW(),1,'6 rue du quatre septembre','92130','ISSY LES MOULINEAUX',1,0,0,'akteos'); - ---Create asktoes as thirdparty to import place/room -INSERT INTO llx_societe (nom,entity,tms,datec,datea,status,address,zip,town,fk_pays,client,fournisseur,import_key) -VALUES ('Inconnue',1,NOW(),NOW(),NOW(),1,'6 rue du quatre septembre','92130','ISSY LES MOULINEAUX',1,0,0,'inconnue'); - ---import place into agefodd -TRUNCATE TABLE llx_agefodd_place; -INSERT INTO llx_agefodd_place ( -ref_interne, -adresse, -cp, -ville, -fk_pays, -tel, -fk_societe, -notes, -acces_site, -note1, -archive, -fk_reg_interieur, -fk_user_author, -datec, -fk_user_mod, -tms, -entity, -import_key) -SELECT -CONCAT_WS('-',room.code, room.adr1), --ref_interne, -room.adr2, --adresse, -room.cp, --cp -room.ville, -1, --fk_pays, -NULL, --tel, -soc.rowid, --fk_societe, -NULL, --notes, -room.adr3, --acces_site, -NULL, --note1, -0, --archive, -NULL, --fk_reg_interieur, -IFNULL(usercrea.rowid,1), --fk_user_author -NOW(), --datec, -IFNULL(usermod.rowid,1), --fk_user_mod, -room.modified,--tms, -1, --entity -room.id -- importkey -FROM (room -, llx_societe as soc) -LEFT OUTER JOIN sf_user as usercreast ON usercreast.id=room.created_by_sf_user_id -LEFT OUTER JOIN llx_user as usercrea ON usercreast.email_address=usercrea.email -LEFT OUTER JOIN sf_user as usermodst ON usermodst.id=room.modified_by_sf_user_id -LEFT OUTER JOIN llx_user as usermod ON usermodst.email_address=usermod.email -WHERE soc.import_key='inconnue' -AND room.code NOT LIKE 'Z9999%'; - ----Vérification manuel si +sieur matires par stage -/* -SELECT stage_id from trainingprogramdiscipline -GROUP BY stage_id HAVING count(stage_id)>1 - -DELETE fROM trainingprogramdiscipline WHERE stage_id='5d9ef8bb-a906-45d6-a39e-7cbc0c546a07' AND matiere='02MIC' -*/ - ---import analytics training category -TRUNCATE TABLE llx_agefodd_formation_catalogue_type; -INSERT INTO llx_agefodd_formation_catalogue_type (code,intitule,sort,active,tms) -SELECT DISTINCT analyt.code, -analyt.intitule, -0, -CASE WHEN (analyt.intitule='NE PAS UTILISER') THEN 0 ELSE 1 END, -NOW() -FROM stage -INNER JOIN analyt ON stage.analyt=analyt.code -ORDER BY analyt.intitule; - -UPDATE llx_agefodd_formation_catalogue_type SET sort=rowid; - ---import training catalogue -TRUNCATE TABLE llx_agefodd_formation_catalogue; -INSERT INTO llx_agefodd_formation_catalogue ( -ref, -ref_interne, -entity, -intitule, -duree, -public, -methode, -prerequis, -but, -programme, -note1, -note2, -archive, -fk_user_author, -datec, -fk_user_mod, -note_private, -note_public, -fk_product, -nb_subscribe_min, -tms, -import_key, -fk_c_category) -SELECT -stage.numstage,--ref -stage.numstage, --ref_interne -1, --entity -CASE WHEN (TRIM(stage.intlong)='') THEN stage.intitule ELSE TRIM(REPLACE(stage.intlong,'Formation :','')) END ,--intitule -IFNULL(stage.nbhr,0), --duree -typcours.intitule, --public -NULL, --methode -NULL, --prerequis -matiere.intitule, --but -NULL, --programme, -matiere.memo, --note1, -NULL, --note2, -stage.disabled, --archive, -IFNULL(usercrea.rowid,1), --fk_user_author -IFNULL(stage.created,NOW()), --datec, -IFNULL(usermod.rowid,1), --fk_user_mod, -NULL, --note_private, -NULL, --note_public, -NULL, --fk_product, -NULL, --nb_subscribe_min, -stage.modified, --tms -stage.id, -cattype.rowid -FROM stage -INNER JOIN typcours ON typcours.code=stage.typcours -LEFT OUTER JOIN trainingprogramdiscipline as but ON but.stage_id=stage.id -LEFT OUTER JOIN matiere ON matiere.matiere=but.matiere -LEFT OUTER JOIN sf_user as usercreast ON usercreast.id=stage.created_by_sf_user_id -LEFT OUTER JOIN llx_user as usercrea ON usercreast.email_address=usercrea.email -LEFT OUTER JOIN sf_user as usermodst ON usermodst.id=stage.modified_by_sf_user_id -LEFT OUTER JOIN llx_user as usermod ON usermodst.email_address=usermod.email -LEFT OUTER JOIN llx_agefodd_formation_catalogue_type as cattype ON cattype.code=stage.analyt -WHERE typcours.intitule <> 'NE PAS UTILISER'; - -UPDATE llx_agefodd_formation_catalogue SET ref=CONCAT_WS('','FOR_', date_format(datec,'%y%m'),'-', LPAD(rowid,4,'0')); - - -TRUNCATE TABLE `llx_agefodd_session_admlevel`; -INSERT INTO `llx_agefodd_session_admlevel` (`rowid`, `level_rank`, `fk_parent_level`, `indice`, `intitule`, `delais_alerte`, `fk_user_author`, `datec`, `fk_user_mod`, `tms`) VALUES -(18, 0, 0, 100, 'CONSULTANT', -15, 1, '2013-11-19 21:53:30', 1, '2013-11-19 20:54:28'), -(19, 1, 18, 101, 'Réservation consultant', -15, 1, '2013-11-19 21:53:43', 1, '2013-11-19 20:54:23'), -(20, 1, 18, 102, 'Confirmation consultant envoyée', -15, 1, '2013-11-19 21:54:18', 1, '2013-11-19 20:54:18'), -(21, 1, 18, 103, 'Support prêt ou imprimé', -1, 1, '2013-11-19 21:54:45', 1, '2013-11-19 20:54:45'), -(22, 1, 18, 104, 'Feuilles d''émargement et d''évaluation éditées', -1, 1, '2013-11-19 21:54:57', 1, '2013-11-19 20:54:57'), -(23, 0, 0, 200, 'LOGISTIQUE', -15, 1, '2013-11-19 21:55:10', 1, '2013-11-19 20:55:10'), -(24, 1, 23, 201, 'Déplacements organisés', -15, 1, '2013-11-19 21:55:21', 1, '2013-11-19 20:55:21'), -(25, 1, 23, 202, 'Réservation salle et/ou repas (option)', -15, 1, '2013-11-19 21:55:32', 1, '2013-11-19 20:55:32'), -(26, 1, 23, 203, 'Réservation salle et/ou repas (confirmée)', -15, 1, '2013-11-19 21:55:44', 1, '2013-11-19 20:55:44'), -(27, 0, 0, 300, 'CLIENT', -15, 1, '2013-11-19 21:55:56', 1, '2013-11-19 20:55:56'), -(28, 1, 27, 301, 'Date confirmée', -15, 1, '2013-11-19 21:56:08', 1, '2013-11-19 20:56:08'), -(29, 1, 27, 302, 'Lieu confirmé', -15, 1, '2013-11-19 21:56:18', 1, '2013-11-19 20:56:18'), -(30, 1, 27, 303, 'Convention envoyée', -15, 1, '2013-11-19 21:56:33', 1, '2013-11-19 20:56:33'), -(31, 1, 27, 304, 'Convention retournée', -10, 1, '2013-11-19 21:56:43', 1, '2013-11-19 20:56:43'), -(32, 0, 0, 400, 'PARTICIPANT', -15, 1, '2013-11-19 21:56:53', 1, '2013-11-19 20:56:53'), -(33, 1, 32, 401, 'Convocation participant envoyée (inscriptions RN)', -15, 1, '2013-11-19 21:57:07', 1, '2013-11-19 20:57:07'), -(34, 1, 32, 402, 'Support et/ou attestation en ligne', -15, 1, '2013-11-19 21:57:17', 1, '2013-11-19 20:57:17'), -(35, 0, 0, 500, 'FACTURE FOURNISSEUR (TRANSMISE ET SAISIE)', 5, 1, '2013-11-19 21:57:32', 1, '2013-11-19 20:57:32'), -(36, 1, 35, 501, 'Agence de voyage', 5, 1, '2013-11-19 21:57:42', 1, '2013-11-19 20:57:42'), -(37, 1, 35, 502, 'Consultant', 5, 1, '2013-11-19 21:57:52', 1, '2013-11-19 20:57:52'), -(38, 1, 35, 503, 'Frais techniques', 5, 1, '2013-11-19 21:58:02', 1, '2013-11-19 20:58:02'), -(39, 0, 0, 600, 'SESSION CLOTUREE', 0, 1, '2013-11-19 21:58:14', 1, '2013-11-19 20:58:14'), -(40, 1, 39, 601, 'Feuilles d''émargement et d''évaluation scannées', 5, 1, '2013-11-19 21:58:35', 1, '2013-11-19 20:58:35'), -(41, 1, 39, 602, 'Feuilles d''émargement et d''évaluation envoyées', 5, 1, '2013-11-19 21:58:57', 1, '2013-11-19 20:58:57'), -(42, 1, 39, 603, 'Facture client envoyée', 5, 1, '2013-11-19 21:59:10', 1, '2013-11-19 20:59:10'); - - - - -INSERT INTO llx_agefodd_training_admlevel(fk_agefodd_training_admlevel,fk_training,level_rank,fk_parent_level,indice,intitule,delais_alerte,fk_user_author,datec,fk_user_mod) -SELECT DISTINCT seesadm.rowid,training.rowid, seesadm.level_rank, seesadm.fk_parent_level,seesadm.indice, seesadm.intitule,seesadm.delais_alerte,seesadm.fk_user_author,seesadm.datec,seesadm.fk_user_mod -FROM llx_agefodd_session_admlevel as seesadm, llx_agefodd_formation_catalogue as training; - -UPDATE llx_agefodd_training_admlevel as ori, llx_agefodd_training_admlevel as upd SET upd.fk_parent_level=ori.rowid WHERE upd.fk_parent_level=ori.fk_agefodd_training_admlevel AND upd.level_rank<>0 AND upd.fk_training=ori.fk_training; - ---Insert domaine extrafield -INSERT INTO llx_agefodd_formation_catalogue_extrafields(fk_object, cd_domaine) -SELECT llx_agefodd_formation_catalogue.rowid, -'DVI' -FROM llx_agefodd_formation_catalogue INNER JOIN stage ON llx_agefodd_formation_catalogue.import_key=stage.id -WHERE stage.domaine IN ('COMER','SIC','MARKET'); - -INSERT INTO llx_agefodd_formation_catalogue_extrafields(fk_object, cd_domaine) -SELECT llx_agefodd_formation_catalogue.rowid, -'PAYS' -FROM llx_agefodd_formation_catalogue INNER JOIN stage ON llx_agefodd_formation_catalogue.import_key=stage.id -WHERE stage.domaine IN ('EXPAT','PAYS'); - -INSERT INTO llx_agefodd_formation_catalogue_extrafields(fk_object, cd_domaine) -SELECT llx_agefodd_formation_catalogue.rowid, -'MAGNT' -FROM llx_agefodd_formation_catalogue INNER JOIN stage ON llx_agefodd_formation_catalogue.import_key=stage.id -WHERE stage.domaine IN ('RH'); - -INSERT INTO llx_agefodd_formation_catalogue_extrafields(fk_object, cd_domaine) -SELECT llx_agefodd_formation_catalogue.rowid, -'COM' -FROM llx_agefodd_formation_catalogue INNER JOIN stage ON llx_agefodd_formation_catalogue.import_key=stage.id -WHERE stage.domaine IN ('COMM'); - ---import bank -TRUNCATE TABLE llx_bank_account; -INSERT INTO llx_bank_account (rowid,datec,tms,ref,label,entity,bank,code_banque,code_guichet,number,cle_rib,bic,iban_prefix,country_iban,cle_iban,domiciliation,state_id,fk_pays,proprio,owner_address,courant,clos,rappro,url,account_number,currency_code,min_allowed,min_desired,comment) VALUES (1,{ts '2013-08-13 21:46:03.'},{ts '2013-08-13 21:46:39.'},'CIC','CIC',1,'CIC','30066','10021','00010327101','','','',null,null,'',null,1,'','',1,0,1,null,'','EUR',0,0,''); - -/* ---import product -TRUNCATE TABLE llx_product; -INSERT INTO llx_product ( -ref, -entity, -ref_ext, -datec, -tms, -virtual, -fk_parent, -label, -description, -note, -customcode, -fk_country, -price, -price_ttc, -price_min, -price_min_ttc, -price_base_type, -tva_tx, -recuperableonly, -localtax1_tx, -localtax2_tx, -fk_user_author, -tosell, -tobuy, -fk_product_type, -duration, -seuil_stock_alerte, -barcode, -fk_barcode_type, -accountancy_code_sell, -accountancy_code_buy, -partnumber, -weight, -weight_units, -length, -length_units, -surface, -surface_units, -volume, -volume_units, -stock, -pmp, -canvas, -finished, -hidden, -import_key) -SELECT -produit.codprod, --ref, -1, --entity, -NULL, --ref_ext, -NOW(), -NOW(), -0, --virtual, -NULL, --fk_parent, -produit.intitule, --label, -NULL, --description, -NULL, --note, -NULL, --customcode, -NULL, --fk_country, -0, --price, -0, --price_ttc, -0, --price_min, -0, --price_min_ttc, -'TTC', --price_base_type, -19.6, --tva_tx, -0, --recuperableonly, -0, --localtax1_tx, -0, --localtax2_tx, -1, --fk_user_author, -1, --tosell, -0, --tobuy, -1, --fk_product_type, -NULL, --duration, -NULL, --seuil_stock_alerte, -NULL, --barcode, -NULL, --fk_barcode_type, -produit.compte, --accountancy_code_sell, -NULL, --accountancy_code_buy, -NULL, --partnumber, -NULL, --weight, -NULL, --weight_units, -NULL, --length, -NULL, --length_units, -NULL, --surface, -NULL, --surface_units, -NULL, --volume, -NULL, --volume_units, -NULL, --stock, -0, --pmp, -NULL, --canvas, -0, --finished, -0, --hidden, -NULL --import_key -FROM produit; - ---Update product id into training -UPDATE llx_agefodd_formation_catalogue as cat, llx_product as prod , stage SET cat.fk_product=prod.rowid -WHERE stage.specific_product=prod.ref AND stage.numstage=cat.ref_interne; -*/ -TRUNCATE TABLE `llx_product`; -INSERT INTO `llx_product` (`rowid`, `ref`, `entity`, `ref_ext`, `datec`, `tms`, `virtual`, `fk_parent`, `label`, `description`, `note`, `customcode`, `fk_country`, `price`, `price_ttc`, `price_min`, `price_min_ttc`, `price_base_type`, `tva_tx`, `recuperableonly`, `localtax1_tx`, `localtax2_tx`, `fk_user_author`, `tosell`, `tobuy`, `fk_product_type`, `duration`, `seuil_stock_alerte`, `barcode`, `fk_barcode_type`, `accountancy_code_sell`, `accountancy_code_buy`, `partnumber`, `weight`, `weight_units`, `length`, `length_units`, `surface`, `surface_units`, `volume`, `volume_units`, `stock`, `pmp`, `canvas`, `finished`, `hidden`, `import_key`) VALUES -(154, 's01_ind.1j', 1, NULL, '2013-11-16 23:48:26', '2013-11-16 23:49:07', 0, 0, 'Formation individuelle', '', '', '', NULL, 2300.00000000, 2750.80000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 1, 1, '1d', NULL, NULL, 0, '70610000', '62265000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), -(119, 's01_intra_ind.1j', 1, NULL, '2013-11-14 22:52:37', '2013-11-16 23:45:02', 0, 0, 'Formation individuelle', '', 'Formation organisée pour une personne ou un couple', '', NULL, 2300.00000000, 2750.80000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 1, 1, '1d', NULL, NULL, 0, '70610000', '62265000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), -(123, 's01_team', 1, NULL, '2013-11-14 22:59:45', '2013-11-14 22:59:58', 0, 0, 'Team Building', '', '', '', NULL, 2600.00000000, 3109.60000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 1, 1, '1d', NULL, NULL, 0, '70610000', '62265000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), -(127, 's02_pnomad_solo', 1, NULL, '2013-11-14 23:14:20', '2013-11-14 23:14:43', 0, 0, 'Profil Nomad'' Solo', '', '', '', NULL, 100.00000000, 119.60000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 0, 1, '6m', NULL, NULL, 0, '70750000', '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), -(138, 's09_conf', 1, NULL, '2013-11-14 23:46:33', '2013-11-14 23:46:48', 0, 0, 'Conférence', '', '', '', NULL, 1600.00000000, 1913.60000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 1, 1, '2h', NULL, NULL, 0, '70620000', '62265000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), -(141, 's09_maj', 1, NULL, '2013-11-14 23:54:44', '2013-11-14 23:55:04', 0, 0, 'Majoration', '', '', '', NULL, 2000.00000000, 2392.00000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 1, 1, '1d', NULL, NULL, 0, '70620000', '62265000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), -(143, 's09_cons', 1, NULL, '2013-11-15 00:00:24', '2013-11-15 00:00:46', 0, 0, 'Mission de conseil', '', '', '', NULL, 2000.00000000, 2392.00000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 1, 1, '1d', NULL, NULL, 0, '70620000', '62265000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), -(142, 's10_dev', 1, NULL, '2013-11-14 23:57:15', '2013-11-14 23:58:57', 0, 0, 'Développement d''outil', '', '', '', NULL, 2000.00000000, 2392.00000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 1, 1, '1d', NULL, NULL, 0, '70630000', '62265000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), -(153, 'sht09_conf', 1, NULL, '2013-11-15 00:48:34', '2013-11-16 14:47:28', 0, 0, 'Conférence', '', '', '', NULL, 1600.00000000, 1600.00000000, 0.00000000, 0.00000000, 'HT', 0.000, 0, 0.000, 0.000, 10, 1, 1, 1, '2h', NULL, NULL, 0, '70620900', '62265000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), -(151, 'sht05_frais', 1, NULL, '2013-11-15 00:42:40', '2013-11-16 14:48:34', 0, 0, 'Frais de mission', '', '', '', NULL, 0.00000000, 0.00000000, 0.00000000, 0.00000000, '', 0.000, 0, 0.000, 0.000, 10, 1, 1, 1, '', NULL, NULL, 0, '70871000', '62265100', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), -(135, 's06_webinar', 1, NULL, '2013-11-14 23:38:11', '2013-11-14 23:38:28', 0, 0, 'Webinar', '', '', '', NULL, 1000.00000000, 1196.00000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 1, 1, '2h', NULL, NULL, 0, '70760000', '62265000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), -(144, 's10_lcp_pres', 1, NULL, '2013-11-15 00:02:35', '2013-11-15 00:02:59', 0, 0, 'LCP / PRESENTIEL', 'Questionnaire par Internet
    \r\nEnvoi d'un rapport détaillé
    \r\nDébriefing avec un coach certifié en présentiel', '', '', NULL, 650.00000000, 777.40000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 1, 1, '2h', NULL, NULL, 0, '70760000', '62265000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), -(116, 's01_atelier', 1, NULL, '2013-11-14 22:43:19', '2013-11-18 18:20:59', 0, 0, 'Atelier interculturel', '', '', '', NULL, 1600.00000000, 1913.60000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 1, 1, '3h', NULL, NULL, 0, '70610000', '62265000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), -(120, 's01_intra_ind.2J', 1, NULL, '2013-11-14 22:54:59', '2013-11-16 23:45:20', 0, 0, 'Formation individuelle', 'Formation organisée pour une personne ou un couple', '', '', NULL, 4500.00000000, 5382.00000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 1, 1, '2d', NULL, NULL, 0, '70610000', '62265000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), -(118, 's01_intra_gr.2j', 1, NULL, '2013-11-14 22:50:58', '2013-11-16 23:44:33', 0, 0, 'Formation pour un groupe', '', '', '', NULL, 5000.00000000, 5980.00000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 1, 1, '2d', NULL, NULL, 0, '70610000', '62265000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), -(117, 's01_1intra_gr.1j', 1, NULL, '2013-11-14 22:47:33', '2013-11-18 18:22:42', 0, 0, 'Formation pour un groupe', '', '', '', NULL, 2600.00000000, 3109.60000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 1, 1, '1d', NULL, NULL, 0, '70610000', '62265000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), -(124, 's01_xenf', 1, NULL, '2013-11-14 23:01:11', '2013-11-14 23:17:17', 0, 0, 'Formation enfant', '', '', '', NULL, 1200.00000000, 1435.20000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 1, 1, '3h', NULL, NULL, 0, '70610000', '62265000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), -(125, 's02_xnol', 1, NULL, '2013-11-14 23:08:10', '2013-11-14 23:09:11', 0, 0, 'Nomad Online', 'Accès au Profil Nomad' pendant 6 mois
    \r\nDébriefing par téléphone pendant 1 heure avec un consultant certifié
    \r\nFocus sur un pays au choix', '', '', NULL, 450.00000000, 538.20000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 1, 1, '6m', NULL, NULL, 0, '70750000', '62265000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), -(130, 's05_frais_mission', 1, NULL, '2013-11-14 23:24:52', '2013-11-14 23:25:14', 0, 0, 'Frais de mission', '', '', '', NULL, 0.00000000, 0.00000000, 0.00000000, 0.00000000, '', 0.000, 0, 0.000, 0.000, 10, 1, 1, 1, '', NULL, NULL, 0, '70870000', '62265100', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), -(133, 's06_tip', 1, NULL, '2013-11-14 23:31:21', '2013-11-14 23:32:35', 0, 0, 'The International Profilerr', '', '', '', NULL, 650.00000000, 777.40000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 1, 1, '2h', NULL, NULL, 0, '70760000', '70769000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), -(132, 's06_rmedia', 1, NULL, '2013-11-14 23:27:52', '2013-11-14 23:29:55', 0, 0, 'Rich Media', '', '', '', NULL, 0.00000000, 0.00000000, 0.00000000, 0.00000000, '', 0.000, 0, 0.000, 0.000, 10, 1, 1, 1, '', NULL, NULL, 0, '70760000', '62265000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), -(146, 's10_lcp_lic', 1, NULL, '2013-11-15 00:17:15', '2013-11-15 00:19:19', 0, 0, 'Licence LCP', '', '', '', NULL, 9000.00000000, 10764.00000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 1, 1, '1y', NULL, NULL, 0, '70760000', '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), -(147, 'sht01_inter', 1, NULL, '2013-11-15 00:27:24', '2013-11-15 00:27:45', 0, 0, 'Formation interentreprises', '', '', '', NULL, 1490.00000000, 1490.00000000, 0.00000000, 0.00000000, 'HT', 0.000, 0, 0.000, 0.000, 10, 1, 1, 1, '2d', NULL, NULL, 0, '70611000', '62265000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), -(145, 's10_lcp_tel', 1, NULL, '2013-11-15 00:07:24', '2013-11-15 00:10:16', 0, 0, 'LCP / TEL', 'Questionnaire par internet
    \r\nEnvoi d'un rapport détaillé
    \r\nDébriefing avec un coach certifié par téléphone', '', '', NULL, 500.00000000, 598.00000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 1, 1, '2h', NULL, NULL, 0, '70760000', '62265000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), -(126, 's02_pnomad', 1, NULL, '2013-11-14 23:12:01', '2013-11-14 23:15:50', 0, 0, 'Profil Nomad''', '', '', '', NULL, 50.00000000, 59.80000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 0, 1, '6m', NULL, NULL, 0, '70750000', '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), -(137, 's09_coach', 1, NULL, '2013-11-14 23:43:11', '2013-11-14 23:43:25', 0, 0, 'Coaching', '', '', '', NULL, 400.00000000, 478.40000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 1, 1, '1h', NULL, NULL, 0, '70620000', '62265000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), -(129, 's06_doc', 1, NULL, '2013-11-14 23:23:27', '2013-11-14 23:23:42', 0, 0, 'Documentation', '', '', '', NULL, 0.00000000, 0.00000000, 0.00000000, 0.00000000, '', 0.000, 0, 0.000, 0.000, 10, 1, 1, 1, '', NULL, NULL, 0, '70641000', '61800000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), -(131, 's05_frais_tech', 1, NULL, '2013-11-14 23:26:17', '2013-11-14 23:26:29', 0, 0, 'Frais techniques', 'Salle équipée', '', '', NULL, 0.00000000, 0.00000000, 0.00000000, 0.00000000, '', 0.000, 0, 0.000, 0.000, 10, 1, 1, 1, '', NULL, NULL, 0, '70801000', '62265100', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), -(115, 's01_inter', 1, NULL, '2013-11-14 22:30:13', '2013-11-14 22:31:02', 0, 0, 'Formation interentreprises', '', '', '', NULL, 1490.00000000, 1782.04000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 1, 1, '2d', NULL, NULL, 0, '70610000', '62265000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), -(149, 'sht01_intra', 1, NULL, '2013-11-15 00:35:02', '2013-11-15 00:36:11', 0, 0, 'Formation intra-entreprise', '', '', '', NULL, 2600.00000000, 2600.00000000, 0.00000000, 0.00000000, 'HT', 0.000, 0, 0.000, 0.000, 10, 1, 1, 1, '1d', NULL, NULL, 0, '70611000', '62265000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL), -(152, 'sht02_pnomad', 1, NULL, '2013-11-15 00:45:44', '2013-11-16 14:46:06', 0, 0, 'Profil Nomad''', '', '', '', NULL, 50.00000000, 50.00000000, 0.00000000, 0.00000000, 'HT', 0.000, 0, 0.000, 0.000, 10, 1, 0, 1, '6m', NULL, NULL, 0, '70759000', '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00000000, '', NULL, 0, NULL); - -TRUNCATE TABLE `llx_product_lang`; -INSERT INTO `llx_product_lang` (`rowid`, `fk_product`, `lang`, `label`, `description`, `note`) VALUES -(63, 116, 'fr_FR', 'Atelier interculturel', '', ''), -(66, 119, 'fr_FR', 'Formation individuelle', '', 'Formation organisée pour une personne ou un couple'), -(71, 124, 'fr_FR', 'Formation enfant', '', ''), -(74, 127, 'fr_FR', 'Profil Nomad'' Solo', '', ''), -(72, 125, 'fr_FR', 'Nomad Online', 'Accès au Profil Nomad' pendant 6 mois
    \r\nDébriefing par téléphone pendant 1 heure avec un consultant certifié
    \r\nFocus sur un pays au choix', ''), -(80, 133, 'fr_FR', 'The International Profilerr', '', ''), -(79, 132, 'fr_FR', 'Rich Media', '', ''), -(85, 138, 'fr_FR', 'Conférence', '', ''), -(88, 141, 'fr_FR', 'Majoration', '', ''), -(91, 144, 'fr_FR', 'LCP / PRESENTIEL', 'Questionnaire par Internet
    \r\nEnvoi d'un rapport détaillé
    \r\nDébriefing avec un coach certifié en présentiel', ''), -(90, 143, 'fr_FR', 'Mission de conseil', '', ''), -(89, 142, 'fr_FR', 'Développement d''outil', '', ''), -(96, 149, 'fr_FR', 'Formation intra-entreprise', '', ''), -(100, 153, 'fr_FR', 'Conférence', '', ''), -(77, 130, 'fr_FR', 'Frais de mission', '', ''), -(99, 152, 'fr_FR', 'Profil Nomad''', '', ''), -(84, 137, 'fr_FR', 'Coaching', '', ''), -(82, 135, 'fr_FR', 'Webinar', '', ''), -(101, 154, 'fr_FR', 'Formation individuelle', '', ''), -(67, 120, 'fr_FR', 'Formation individuelle', 'Formation organisée pour une personne ou un couple', ''), -(70, 123, 'fr_FR', 'Team Building', '', ''), -(65, 118, 'fr_FR', 'Formation pour un groupe', '', ''), -(64, 117, 'fr_FR', 'Formation pour un groupe', '', ''), -(93, 146, 'fr_FR', 'Licence LCP', '', ''), -(94, 147, 'fr_FR', 'Formation interentreprises', '', ''), -(98, 151, 'fr_FR', 'Frais de mission', '', ''), -(92, 145, 'fr_FR', 'LCP / TEL', 'Questionnaire par internet
    \r\nEnvoi d'un rapport détaillé
    \r\nDébriefing avec un coach certifié par téléphone', ''), -(73, 126, 'fr_FR', 'Profil Nomad''', '', ''), -(76, 129, 'fr_FR', 'Documentation', '', ''), -(78, 131, 'fr_FR', 'Frais techniques', 'Salle équipée', ''), -(62, 115, 'fr_FR', 'Formation interentreprises', '', ''); - -TRUNCATE tABLE `llx_product_price`; -INSERT INTO `llx_product_price` (`rowid`, `entity`, `tms`, `fk_product`, `date_price`, `price_level`, `price`, `price_ttc`, `price_min`, `price_min_ttc`, `price_base_type`, `tva_tx`, `recuperableonly`, `localtax1_tx`, `localtax2_tx`, `fk_user_author`, `tosell`, `price_by_qty`, `import_key`) VALUES -(145, 1, '2013-11-14 22:43:19', 116, '2013-11-14 22:43:19', 1, 1600.00000000, 1913.60000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 0, NULL), -(148, 1, '2013-11-14 22:52:37', 119, '2013-11-14 22:52:37', 1, 2300.00000000, 2750.80000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 0, 0, NULL), -(149, 1, '2013-11-14 22:54:59', 120, '2013-11-14 22:54:59', 1, 4500.00000000, 5382.00000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 0, 0, NULL), -(147, 1, '2013-11-14 22:50:58', 118, '2013-11-14 22:50:58', 1, 5000.00000000, 5980.00000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 0, NULL), -(155, 1, '2013-11-14 23:08:10', 125, '2013-11-14 23:08:10', 1, 450.00000000, 538.20000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 0, 0, NULL), -(163, 1, '2013-11-14 23:31:21', 133, '2013-11-14 23:31:21', 1, 650.00000000, 777.40000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 0, 0, NULL), -(162, 1, '2013-11-14 23:27:52', 132, '2013-11-14 23:27:52', 1, 0.00000000, 0.00000000, 0.00000000, 0.00000000, '', 0.000, 0, 0.000, 0.000, 10, 0, 0, NULL), -(187, 1, '2013-11-15 00:45:44', 152, '2013-11-15 00:45:44', 1, 50.00000000, 50.00000000, 0.00000000, 0.00000000, 'HT', 0.000, 0, 0.000, 0.000, 10, 0, 0, NULL), -(169, 1, '2013-11-14 23:46:33', 138, '2013-11-14 23:46:33', 1, 1600.00000000, 1913.60000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 0, 0, NULL), -(174, 1, '2013-11-14 23:54:44', 141, '2013-11-14 23:54:44', 1, 2000.00000000, 2392.00000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 0, 0, NULL), -(180, 1, '2013-11-15 00:27:24', 147, '2013-11-15 00:27:24', 1, 1490.00000000, 1490.00000000, 0.00000000, 0.00000000, 'HT', 0.000, 0, 0.000, 0.000, 10, 0, 0, NULL), -(177, 1, '2013-11-15 00:02:35', 144, '2013-11-15 00:02:35', 1, 650.00000000, 777.40000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 0, 0, NULL), -(176, 1, '2013-11-15 00:00:24', 143, '2013-11-15 00:00:24', 1, 2000.00000000, 2392.00000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 0, 0, NULL), -(175, 1, '2013-11-14 23:57:15', 142, '2013-11-14 23:57:15', 1, 2000.00000000, 2392.00000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 0, 0, NULL), -(186, 1, '2013-11-15 00:42:40', 151, '2013-11-15 00:42:40', 1, 0.00000000, 0.00000000, 0.00000000, 0.00000000, '', 0.000, 0, 0.000, 0.000, 10, 0, 0, NULL), -(183, 1, '2013-11-15 00:35:02', 149, '2013-11-15 00:35:02', 1, 2600.00000000, 2600.00000000, 0.00000000, 0.00000000, 'HT', 0.000, 0, 0.000, 0.000, 10, 0, 0, NULL), -(153, 1, '2013-11-14 22:59:45', 123, '2013-11-14 22:59:45', 1, 2600.00000000, 3109.60000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 0, 0, NULL), -(188, 1, '2013-11-15 00:48:34', 153, '2013-11-15 00:48:34', 1, 1600.00000000, 1600.00000000, 0.00000000, 0.00000000, 'HT', 0.000, 0, 0.000, 0.000, 10, 0, 0, NULL), -(160, 1, '2013-11-14 23:24:52', 130, '2013-11-14 23:24:52', 1, 0.00000000, 0.00000000, 0.00000000, 0.00000000, '', 0.000, 0, 0.000, 0.000, 10, 0, 0, NULL), -(179, 1, '2013-11-15 00:17:15', 146, '2013-11-15 00:17:15', 1, 9000.00000000, 10764.00000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 0, NULL), -(168, 1, '2013-11-14 23:43:11', 137, '2013-11-14 23:43:11', 1, 400.00000000, 478.40000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 0, 0, NULL), -(166, 1, '2013-11-14 23:38:11', 135, '2013-11-14 23:38:11', 1, 1000.00000000, 1196.00000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 0, 0, NULL), -(189, 1, '2013-11-16 23:48:26', 154, '2013-11-16 23:48:26', 1, 2300.00000000, 2750.80000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 0, NULL), -(146, 1, '2013-11-14 22:47:33', 117, '2013-11-14 22:47:33', 1, 2600.00000000, 3109.60000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 1, 0, NULL), -(154, 1, '2013-11-14 23:01:11', 124, '2013-11-14 23:01:11', 1, 1200.00000000, 1435.20000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 0, 0, NULL), -(157, 1, '2013-11-14 23:14:20', 127, '2013-11-14 23:14:20', 1, 100.00000000, 119.60000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 0, 0, NULL), -(178, 1, '2013-11-15 00:07:24', 145, '2013-11-15 00:07:24', 1, 500.00000000, 598.00000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 0, 0, NULL), -(156, 1, '2013-11-14 23:12:01', 126, '2013-11-14 23:12:01', 1, 50.00000000, 59.80000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 0, 0, NULL), -(159, 1, '2013-11-14 23:23:27', 129, '2013-11-14 23:23:27', 1, 0.00000000, 0.00000000, 0.00000000, 0.00000000, '', 0.000, 0, 0.000, 0.000, 10, 0, 0, NULL), -(161, 1, '2013-11-14 23:26:17', 131, '2013-11-14 23:26:17', 1, 0.00000000, 0.00000000, 0.00000000, 0.00000000, '', 0.000, 0, 0.000, 0.000, 10, 0, 0, NULL), -(144, 1, '2013-11-14 22:30:13', 115, '2013-11-14 22:30:13', 1, 1490.00000000, 1782.04000000, 0.00000000, 0.00000000, 'HT', 19.600, 0, 0.000, 0.000, 10, 0, 0, NULL); - - ---import session link with convention -TRUNCATE TABLE llx_agefodd_session; -INSERT INTO llx_agefodd_session ( -entity, -fk_soc, -fk_formation_catalogue, -fk_session_place, -type_session, -nb_place, -nb_stagiaire, -force_nb_stagiaire, -nb_subscribe_min, -dated, -datef, -notes, -color, -cost_trainer, -cost_site, -cost_trip, -sell_price, -is_date_res_site, -date_res_site, -is_date_res_trainer, -date_res_trainer, -date_ask_OPCA, -is_date_ask_OPCA, -is_OPCA, -fk_soc_OPCA, -fk_socpeople_OPCA, -num_OPCA_soc, -num_OPCA_file, -fk_user_author, -datec, -fk_user_mod, -tms, -archive, -status, -duree_session, -intitule_custo, -import_key) -SELECT -1, --entity, -CASE WHEN (sess.inter=0) THEN soc.rowid ELSE NULL END, --fk_soc, -cat.rowid, --fk_formation_catalogue, -IFNULL(place.rowid,(SELECT rowid from llx_agefodd_place WHERE ref_interne='ENT-Dans l''entreprise')), --fk_session_place, -sess.inter, --type_session, -0, --nb_place, -0, --nb_stagiaire, -0, --force_nb_stagiaire, -sess.nbrmin, --nb_subscribe_min, -IFNULL(MIN(convct.datdeb),sess.datdeb), --dated, -IFNULL(MAX(convct.datfin),sess.datfin), --datef, -'', --notes, -NULL, --color, -SUM(coutconsultant.montant), --cost_trainer, -SUM(coutsalle.montant), --cost_site, -SUM(couttrip.montant), --cost_trip, -sess.prxft, --sell_price, -0, --is_date_res_site, -NULL, --date_res_site, -0, --is_date_res_trainer, -NULL, --date_res_trainer, -NULL, --date_ask_OPCA, -0,--is_date_ask_OPCA, -0,--is_OPCA, -NULL, --fk_soc_OPCA, -NULL, --fk_socpeople_OPCA, -NULL, --num_OPCA_soc, -NULL, --num_OPCA_file, -IFNULL(usercrea.rowid,1), --fk_user_author -IFNULL(sess.created,NOW()), --datec, -IFNULL(usermod.rowid,1), --fk_user_author -sess.modified, --tms, -CASE WHEN IFNULL(MAX(convct.datfin),sess.datfin)2000 -GROUP BY sess.id; - ---Import session customer contact -TRUNCATE TABLE llx_agefodd_contact; -INSERT INTO llx_agefodd_contact (entity,fk_socpeople,archive,fk_user_author,datec,fk_user_mod,tms) -SELECT DISTINCT -1, -llx_socpeople.rowid, -0, -1, -NOW(), -1, -NOW() -FROM convct -INNER JOIN contact on convct.recipient_contact_id=contact.id -INNER JOIN llx_socpeople ON llx_socpeople.import_key=contact.id; - -TRUNCATE TABLE llx_agefodd_session_contact; -INSERT INTO llx_agefodd_session_contact (fk_session_agefodd,fk_agefodd_contact,fk_user_author,datec,fk_user_mod,tms) -SELECT DISTINCT -llx_agefodd_session.rowid, -llx_agefodd_contact.rowid, -1, -NOW(), -1, -NOW() -FROM convct -INNER JOIN llx_agefodd_session ON llx_agefodd_session.import_key=convct.session_id -INNER JOIN contact on convct.recipient_contact_id=contact.id -INNER JOIN llx_socpeople ON llx_socpeople.import_key=contact.id -INNER JOIN llx_agefodd_contact ON llx_socpeople.rowid=llx_agefodd_contact.fk_socpeople; - ---Commerciale -TRUNCATE TABLE llx_agefodd_session_commercial; -INSERT INTO llx_agefodd_session_commercial (fk_session_agefodd, fk_user_com, fk_user_author,fk_user_mod, datec) -SELECT DISTINCT -llx_agefodd_session.rowid, -llx_user.rowid, -1, -1, -NOW() -FROM convct -INNER JOIN llx_agefodd_session ON llx_agefodd_session.import_key=convct.session_id -INNER JOIN contact on convct.recipient_contact_id=contact.id -INNER JOIN com ON com.id=convct.com_id -INNER JOIN llx_user ON llx_user.email=com.email; - - --- le gestionnaire logistique qui est le « Type » dans la convention -INSERT INTO llx_agefodd_session_extrafields (fk_object,ts_logistique) -SELECT DISTINCT -llx_agefodd_session.rowid, -llx_user.rowid -FROM convct -INNER JOIN llx_agefodd_session ON llx_agefodd_session.import_key=convct.session_id -INNER JOIN sf_user ON sf_user.login=convct.contrat -INNER JOIN llx_user ON llx_user.email=sf_user.email_address; - - - ---Import trainer as supplier and contact -INSERT INTO llx_societe(nom, -entity, -ref_ext, -ref_int, -statut, -parent, -tms, -datec, -datea, -status, -code_client, -code_fournisseur, -code_compta, -code_compta_fournisseur, -address, -zip, -town, -fk_departement, -fk_pays, -phone, -fax, -url, -email, -fk_effectif, -fk_typent, -fk_forme_juridique, -fk_currency, -siren, -siret, -ape, -idprof4, -idprof5, -idprof6, -tva_intra, -capital, -fk_stcomm, -note_private, -note_public, -prefix_comm, -client, -fournisseur, -supplier_account, -fk_prospectlevel, -customer_bad, -customer_rate, -supplier_rate, - fk_user_creat, -fk_user_modif, -remise_client, -mode_reglement, -cond_reglement, -tva_assuj, -localtax1_assuj, -localtax2_assuj, -barcode, -fk_barcode_type, -price_level, -default_lang, -logo, -canvas, -import_key) -SELECT DISTINCT CONCAT_WS(' ',interv.nom, interv.prenom), - 1, - NULL, - NULL, - 0, - NULL, - interv.modified, - interv.created, - interv.created, - interv.actif, - NULL, - NULL, - NULL, -NULL, -CONCAT_WS(' ',interv.adr1, interv.commune), -interv.cp, -interv.bureau, -NULL, -interv.pays, -interv.telephone, -interv.fax, -NULL, -TRIM(interv.email), -NULL, -8, -NULL, -0, -NULL, -interv.siret, -interv.urssaf, -NULL, -NULL, -NULL, -NULL, -NULL, -0, -interv.memo, -NULL, -NULL, -0, -1, -NULL, -NULL, -0, -0, -0, -IFNULL(usercrea.rowid,1), --fk_user_author -IFNULL(usermod.rowid,1), --fk_user_mod -0, -NULL, -NULL, -NULL, -NULL, -NULL, -NULL, -0, -NULL, -NULL, -NULL, -NULL, -interv.id -FROM interv -LEFT OUTER JOIN sf_user as usercreast ON usercreast.id=interv.created_by_sf_user_id -LEFT OUTER JOIN llx_user as usercrea ON usercreast.email_address=usercrea.email -LEFT OUTER JOIN sf_user as usermodst ON usermodst.id=interv.modified_by_sf_user_id -LEFT OUTER JOIN llx_user as usermod ON usermodst.email_address=usermod.email; - - -UPDATE llx_societe SET code_fournisseur=CONCAT_WS('','F', LPAD(rowid,5,'0')), tms=tms WHERE fournisseur=1; -UPDATE llx_societe SET code_client=CONCAT_WS('','C', LPAD(rowid,5,'0')), tms=tms WHERE client=1; - ---Insert Consultant categorie -TRUNCATE TABLE llx_categorie_fournisseur; -INSERT INTO llx_categorie_fournisseur (fk_categorie,fk_societe) -SELECT -12, -llx_societe.rowid -FROM llx_societe INNER JOIN interv ON interv.id=llx_societe.import_key; - -INSERT INTO llx_socpeople (datec, -tms, -fk_soc, -entity, -ref_ext, -civilite, -lastname, -firstname, -address, -zip, -town, -fk_departement, -fk_pays, -birthday, -poste, -phone, -phone_perso, -phone_mobile, -fax, -email, -jabberid, -no_email, -priv, -fk_user_creat, -fk_user_modif, -note_private, -note_public, -default_lang, -canvas, -import_key, -statut) -SELECT -interv.created, -interv.modified, -soc.rowid, -1, -interv.external_ref, -civ.code, -interv.nom, -interv.prenom, -CONCAT_WS(' ',interv.adr1, interv.commune), -interv.cp, -interv.bureau, -NULL, -soc.fk_pays, -NULL, -NULL, -interv.telephone, -NULL, -interv.portable, -interv.fax, -TRIM(interv.email), -NULL, -0, -0, -IFNULL(usercrea.rowid,1), --fk_user_author -IFNULL(usermod.rowid,1), --fk_user_mod -CONCAT_WS(' ',interv.memo, interv.contrat), -NULL, -NULL, -NULL, -interv.id, -interv.actif -FROM interv -INNER JOIN llx_societe as soc ON soc.import_key=interv.id -LEFT OUTER JOIN llx_c_civilite as civ ON civ.code=interv.civilite -LEFT OUTER JOIN sf_user as usercreast ON usercreast.id=interv.created_by_sf_user_id -LEFT OUTER JOIN llx_user as usercrea ON usercreast.email_address=usercrea.email -LEFT OUTER JOIN sf_user as usermodst ON usermodst.id=interv.modified_by_sf_user_id -LEFT OUTER JOIN llx_user as usermod ON usermodst.email_address=usermod.email; - ---Insert Consultant categorie for contact -TRUNCATE TABLE llx_categorie_contact; -INSERT INTO llx_categorie_contact (fk_categorie,fk_socpeople) -SELECT -32, -llx_socpeople.rowid -FROM llx_socpeople INNER JOIN interv ON interv.id=llx_socpeople.import_key; - ---Import trainer from dolibarr contact -TRUNCATE TABLE llx_agefodd_formateur; -INSERT INTO llx_agefodd_formateur ( -entity, -fk_socpeople, -fk_user, -type_trainer, -archive, -fk_user_author, -datec, -fk_user_mod, -tms) -SELECT -1, --entity, -llx_socpeople.rowid, --fk_socpeople, -NULL, --fk_user, -'socpeople', --type_trainer, -interv.disabled, --archive, -IFNULL(usercrea.rowid,1), --fk_user_author -IFNULL(interv.created,NOW()), --datec, -IFNULL(usermod.rowid,1), --fk_user_mod -IFNULL(interv.modified,NOW()) --tms -FROM llx_socpeople -INNER JOIN interv ON interv.id=llx_socpeople.import_key -LEFT OUTER JOIN sf_user as usercreast ON usercreast.id=interv.created_by_sf_user_id -LEFT OUTER JOIN llx_user as usercrea ON usercreast.email_address=usercrea.email -LEFT OUTER JOIN sf_user as usermodst ON usermodst.id=interv.modified_by_sf_user_id -LEFT OUTER JOIN llx_user as usermod ON usermodst.email_address=usermod.email - - ---Import trainer into session -TRUNCATE TABLE llx_agefodd_session_formateur; -INSERT INTO llx_agefodd_session_formateur ( -fk_session, -fk_agefodd_formateur, -fk_user_author, -datec, -fk_user_mod, -tms) -SELECT DISTINCT -llx_agefodd_session.rowid, -llx_agefodd_formateur.rowid, -IFNULL(usercrea.rowid,1), --fk_user_author -IFNULL(pls.created,NOW()), -IFNULL(usermod.rowid,1), --fk_user_mod -IFNULL(pls.modified,NOW()) -FROM pls -INNER JOIN llx_agefodd_session ON llx_agefodd_session.import_key=pls.session_id -INNER JOIN llx_socpeople ON llx_socpeople.import_key=pls.interv_id -INNER JOIN llx_agefodd_formateur ON llx_agefodd_formateur.fk_socpeople=llx_socpeople.rowid -LEFT OUTER JOIN sf_user as usercreast ON usercreast.id=pls.created_by_sf_user_id -LEFT OUTER JOIN llx_user as usercrea ON usercreast.email_address=usercrea.email -LEFT OUTER JOIN sf_user as usermodst ON usermodst.id=pls.modified_by_sf_user_id -LEFT OUTER JOIN llx_user as usermod ON usermodst.email_address=usermod.email -WHERE pls.status='confirmed'; - - ---import trainer times and cost into session -TRUNCATE TABLE llx_agefodd_session_formateur_calendrier; -INSERT INTO llx_agefodd_session_formateur_calendrier( -entity, - fk_agefodd_session_formateur, - date_session, - heured, - heuref, - --trainer_cost, - fk_actioncomm, - fk_user_author, - datec, - fk_user_mod, - tms) - SELECT - 1,--entity, - llx_agefodd_session_formateur.rowid, --fk_agefodd_session_formateur, - pls.datec,--date_session, - DATE_ADD(DATE(pls.datec),INTERVAL DATE_FORMAT(pls.hrdeb,'%H:%i') HOUR_MINUTE),--heured, - DATE_ADD(DATE(pls.datec),INTERVAL DATE_FORMAT(pls.hrfin,'%H:%i') HOUR_MINUTE), --heuref, - --coutconsultant.montant/pls.nbhr,--trainer_cost, - NULL,--fk_actioncomm, - IFNULL(usercrea.rowid,1), --fk_user_author - IFNULL(pls.created,NOW()),-- datec, - IFNULL(usermod.rowid,1), --fk_user_mod - IFNULL(pls.modified,NOW())--tms - FROM pls -INNER JOIN llx_agefodd_session ON llx_agefodd_session.import_key=pls.session_id -INNER JOIN llx_socpeople ON llx_socpeople.import_key=pls.interv_id -INNER JOIN llx_agefodd_formateur ON llx_agefodd_formateur.fk_socpeople=llx_socpeople.rowid -INNER JOIN llx_agefodd_session_formateur ON llx_agefodd_session.rowid=llx_agefodd_session_formateur.fk_session AND llx_agefodd_formateur.rowid=llx_agefodd_session_formateur.fk_agefodd_formateur -LEFT OUTER JOIN sesfr as coutconsultant ON coutconsultant.session_id=pls.session_id AND coutconsultant.typfr='CON' AND coutconsultant.interv_id=pls.interv_id -LEFT OUTER JOIN sf_user as usercreast ON usercreast.id=pls.created_by_sf_user_id -LEFT OUTER JOIN llx_user as usercrea ON usercreast.email_address=usercrea.email -LEFT OUTER JOIN sf_user as usermodst ON usermodst.id=pls.modified_by_sf_user_id -LEFT OUTER JOIN llx_user as usermod ON usermodst.email_address=usermod.email -WHERE pls.status='confirmed'; - ---import trainee -TRUNCATE TABLE llx_agefodd_stagiaire; -INSERT INTO llx_agefodd_stagiaire ( -entity, -nom, -prenom, -civilite, -fk_user_author, -fk_user_mod, -datec, -tms, -fk_soc, -fk_socpeople, -fonction, -tel1, -tel2, -mail, -date_birth, -place_birth, -note, -import_key) -SELECT DISTINCT -1, --entity, -TRIM(eleves.nom), -IFNULL(TRIM(eleves.prenom),''), -eleves.civilite, - IFNULL(usercrea.rowid,1), --fk_user_author - IFNULL(usermod.rowid,1), --fk_user_mod -IFNULL(eleves.created,NOW()), --datec, -eleves.modified, --tms, -IFNULL(soc.rowid,(SELECT rowid from llx_societe where nom='Inconnue')), --fk_soc, -NULL, --fk_socpeople, -NULL, --fonction, -eleves.telephone, --tel1, -NULL, -eleves.email, --mail, -eleves.datnais, --date_birth, -NULL, --place_birth, -eleves.texte, --note, -eleves.id --import_key -FROM eleves -INNER JOIN point ON eleves.id=point.eleves_id -INNER JOIN session as sess ON sess.id=point.session_id -LEFT OUTER JOIN llx_societe as soc ON soc.import_key=eleves.account_id -LEFT OUTER JOIN sf_user as usercreast ON usercreast.id=eleves.created_by_sf_user_id -LEFT OUTER JOIN llx_user as usercrea ON usercreast.email_address=usercrea.email -LEFT OUTER JOIN sf_user as usermodst ON usermodst.id=eleves.modified_by_sf_user_id -LEFT OUTER JOIN llx_user as usermod ON usermodst.email_address=usermod.email; - ---Add trainee to session -TRUNCATE TABLE llx_agefodd_session_stagiaire; -INSERT INTO llx_agefodd_session_stagiaire ( -fk_session_agefodd, -fk_stagiaire, -fk_agefodd_stagiaire_type, -status_in_session, -fk_user_author, -datec, -fk_user_mod, -tms, -import_key) -SELECT -llx_agefodd_session.rowid, -llx_agefodd_stagiaire.rowid, -1, -3, - IFNULL(usercrea.rowid,1), --fk_user_author -NOW(), - IFNULL(usermod.rowid,1), --fk_user_mod -NOW(), -NULL -FROM eleves -INNER JOIN point ON eleves.id=point.eleves_id -INNER JOIN session as sess ON sess.id=point.session_id -INNER JOIN llx_agefodd_session ON sess.id=llx_agefodd_session.import_key -INNER JOIN llx_agefodd_stagiaire ON llx_agefodd_stagiaire.import_key=point.eleves_id -LEFT OUTER JOIN sf_user as usercreast ON usercreast.id=eleves.created_by_sf_user_id -LEFT OUTER JOIN llx_user as usercrea ON usercreast.email_address=usercrea.email -LEFT OUTER JOIN sf_user as usermodst ON usermodst.id=eleves.modified_by_sf_user_id -LEFT OUTER JOIN llx_user as usermod ON usermodst.email_address=usermod.email; - ---Update number of trainee per session -UPDATE llx_agefodd_session SET nb_stagiaire=(SELECT count(rowid) FROM llx_agefodd_session_stagiaire WHERE fk_session_agefodd = llx_agefodd_session.rowid), tms=tms WHERE (llx_agefodd_session.force_nb_stagiaire=0 OR llx_agefodd_session.force_nb_stagiaire IS NULL); - ---Insert Session calendar -TRUNCATE TABLE llx_agefodd_session_calendrier; -INSERT INTO llx_agefodd_session_calendrier ( -fk_agefodd_session, -date_session, -heured, -heuref, -fk_actioncomm, -fk_user_author, -datec, -fk_user_mod, -tms) -SELECT -agesess.rowid, -DATE(pls.datec), -DATE_ADD(DATE(pls.datec),INTERVAL DATE_FORMAT(pls.hrdeb,'%H:%i') HOUR_MINUTE), -DATE_ADD(DATE(pls.datec),INTERVAL DATE_FORMAT(pls.hrfin,'%H:%i') HOUR_MINUTE), -NULL, -1, -IFNULL(pls.created,NOW()), -1, -IFNULL(pls.modified,NOW()) -FROM llx_agefodd_session as agesess -INNER JOIN pls ON agesess.import_key=pls.session_id; - ---Insert Propal -TRUNCATE TABLE llx_propaldet; -TRUNCATE TABLE llx_propal; - -INSERT INTO llx_propal ( -ref, -entity, -ref_ext, -ref_int, -ref_client, -fk_soc, -fk_projet, -tms, -datec, -datep, -fin_validite, -date_valid, -date_cloture, -fk_user_author, -fk_user_valid, -fk_user_cloture, -fk_statut, -price, -remise_percent, -remise_absolue, -remise, -total_ht, -tva, -localtax1, -localtax2, -total, -fk_account, -fk_currency, -fk_cond_reglement, -fk_mode_reglement, -note_private, -note_public, -model_pdf, -date_livraison, -fk_availability, -fk_input_reason, -import_key, -extraparams, -fk_delivery_address) -SELECT -proct.numct, --ref, -1, --entity, -NULL, --ref_ext, -NULL, --ref_int, -NULL, --ref_client, -soc.rowid, --fk_soc, -NULL, --fk_projet, -IFNULL(proct.modified,NOW()), --tms, -IFNULL(proct.created,NOW()), --datec, -IFNULL(proct.created,NOW()), --datep, -proct.dateps, --fin_validite, -proct.dates, --date_valid, -proct.dates, --date_cloture, - IFNULL(usercrea.rowid,1), --fk_user_author -1, --fk_user_valid, -1, --fk_user_cloture, -CASE WHEN proct.signe THEN 2 ELSE 3 END, --fk_statut, -0, --price, -NULL, --remise_percent, -NULL, --remise_absolue, -0, --remise, -0, --total_ht, -0, --tva, -0, --localtax1, -0, --localtax2, -0, --total, -NULL, --fk_account, -NULL, --fk_currency, -NULL, --fk_cond_reglement, -NULL, --fk_mode_reglement, -NULL, --note_private, -NULL, --note_public, -'azur', --model_pdf, -NULL, --date_livraison, -0, --fk_availability, -0, --fk_input_reason, -proct.id, --import_key, -NULL, --extraparams, -NULL --fk_delivery_address -FROM proct -INNER JOIN llx_societe as soc ON soc.import_key=proct.account_id -INNER JOIN prolig ON prolig.proct_id=proct.id -LEFT OUTER JOIN sf_user as usercreast ON usercreast.id=proct.created_by_sf_user_id -LEFT OUTER JOIN llx_user as usercrea ON usercreast.email_address=usercrea.email -GROUP BY proct.id; - - ---Insert Propal det -INSERT INTO llx_propaldet ( -fk_propal, -fk_parent_line, -fk_product, -label, -description, -fk_remise_except, -tva_tx, -localtax1_tx, -localtax1_type, -localtax2_tx, -localtax2_type, -qty, -remise_percent, -remise, -price, -subprice, -total_ht, -total_tva, -total_localtax1, -total_localtax2, -total_ttc, -product_type, -date_start, -date_end, -info_bits, -buy_price_ht, -fk_product_fournisseur_price, -special_code, -rang) -SELECT -prop.rowid, --fk_propal, -NULL, --fk_parent_line, -NULL, --fk_product, -NULL, --label, -prolig.intitule, --description, -NULL, --fk_remise_except, -CASE WHEN prolig.ctva=1 THEN 19.600 ELSE 0 END, --tva_tx, -0, --localtax1_tx, -0, --localtax1_type, -0, --localtax2_tx, -0, --localtax2_type, -prolig.nbjr, --qty, -0, --remise_percent, -0, --remise, -prolig.taux, --price, -prolig.taux, --subprice, -CASE WHEN prolig.ctva=1 THEN prolig.mont-(prolig.mont*0.196) ELSE prolig.mont END, --total_ht, -CASE WHEN prolig.ctva=1 THEN prolig.mont*0.196 ELSE 0 END, --total_tva, -0, --total_localtax1, -0, --total_localtax2, -prolig.mont, --total_ttc, -1, --product_type, -NULL, --date_start, -NULL, --date_end, -0, --info_bits, -0, --buy_price_ht, -NULL, --fk_product_fournisseur_price, -0, --special_code, -prolig.numlig --rang -FROM prolig INNER JOIN llx_propal as prop ON prop.import_key=prolig.proct_id; - - ---Add propal contact -TRUNCATE TABLE llx_element_contact; -INSERT INTO llx_element_contact ( -datecreate, -statut, -element_id, -fk_c_type_contact, -fk_socpeople) -SELECT DISTINCT -proct.created, -4, -llx_propal.rowid, -40, -llx_socpeople.rowid -FROM proct -INNER JOIN llx_propal ON llx_propal.import_key=proct.id -INNER JOIN contact ON proct.contact_id=contact.id -INNER JOIN llx_socpeople ON llx_socpeople.import_key=contact.id; - - ---Update propal total amount -UPDATE llx_propal -SET llx_propal.total_ht=(SELECT SUM(total_ht) FROM llx_propaldet WHERE llx_propaldet.fk_propal=llx_propal.rowid GROUP BY llx_propaldet.fk_propal), -llx_propal.tva=(SELECT SUM(total_tva) FROM llx_propaldet WHERE llx_propaldet.fk_propal=llx_propal.rowid GROUP BY llx_propaldet.fk_propal), -llx_propal.total=(SELECT SUM(total) FROM llx_propaldet WHERE llx_propaldet.fk_propal=llx_propal.rowid GROUP BY llx_propaldet.fk_propal), -llx_propal.tms=llx_propal.tms; - ---Lier propal Session/client -TRUNCATE TABLE llx_agefodd_session_element; -INSERT INTO llx_agefodd_session_element( -fk_session_agefodd, -fk_soc, -element_type, -fk_element, -fk_user_author, -datec, -fk_user_mod, -tms) -SELECT -llx_agefodd_session.rowid, -llx_societe.rowid, -'propal', -llx_propal.rowid, -1, -NOW(), -1, -NOW() -FROM llx_propal -INNER JOIN proct ON proct.id=llx_propal.import_key -INNER JOIN session as sess ON sess.id=proct.session_id -INNER JOIN llx_agefodd_session ON llx_agefodd_session.import_key=sess.id -INNER JOIN account ON account.id=proct.account_id -INNER JOIN llx_societe ON llx_societe.import_key=account.id; - - ---Import Invoice payé -TRUNCATE TABLE llx_facture; -TRUNCATE TABLE llx_facturedet; -INSERT INTO llx_facture ( -facnumber, -entity, -ref_ext, -ref_int, -ref_client, -type, -increment, -fk_soc,datec, -datef, -date_valid, -tms, -paye, -amount, -remise_percent, -remise_absolue, -remise, -close_code, -close_note, -tva, -localtax1, -localtax2, -revenuestamp, -total, -total_ttc, -fk_statut, -fk_user_author, -fk_user_valid, -fk_facture_source, -fk_projet, -fk_account, -fk_currency, -fk_cond_reglement, -fk_mode_reglement, -date_lim_reglement, -note_private, -note_public, -model_pdf, -import_key, -extraparams) -SELECT -lettrage.nopfact, --facnumber -1, --entity, -NULL, --ref_ext, -NULL, --ref_int, -NULL, --ref_client, -0, --type, -NULL, --increment, -llx_societe.rowid, --fk_soc, -IFNULL(lettrage.datefact,NOW()), --datec, -IFNULL(lettrage.datefact,NOW()), --datef, -IFNULL(lettrage.datefact,NOW()), --date_valid, -NOW(), --tms, -1, --paye, -0, --amount, -NULL, --remise_percent, -NULL, --remise_absolue, -0, --remise, -NULL, --close_code, -NULL, --close_note, -0, --tva, -0, --localtax1, -0, --localtax2, -0, --revenuestamp, -0, --total, -0, --total_ttc, -2, --fk_statut, -1, --fk_user_author, -1, --fk_user_valid, -NULL, --fk_facture_source, -NULL, --fk_projet, -NULL, --fk_account, -NULL, --fk_currency, -llx_societe.cond_reglement, --fk_cond_reglement, -llx_societe.mode_reglement, --fk_mode_reglement, -MAX(tempfact.dateche), --date_lim_reglement, -NULL, --note_private, -NULL, --note_public, -'crabe', --model_pdf, -lettrage.id, --import_key, -NULL --extraparams -FROM lettrage -INNER JOIN tempfact ON tempfact.numfact=lettrage.nopfact -INNER JOIN thirdparty ON thirdparty.id=lettrage.thirdparty_id -INNER JOIN account ON account.id=thirdparty.account_id -INNER JOIN llx_societe ON llx_societe.import_key=account.id -INNER JOIN convct ON convct.id=lettrage.convct_id -WHERE convct.supprime=0 -GROUP BY lettrage.nopfact; - ---import facture impeye -INSERT INTO llx_facture ( -facnumber, -entity, -ref_ext, -ref_int, -ref_client, -type, -increment, -fk_soc,datec, -datef, -date_valid, -tms, -paye, -amount, -remise_percent, -remise_absolue, -remise, -close_code, -close_note, -tva, -localtax1, -localtax2, -revenuestamp, -total, -total_ttc, -fk_statut, -fk_user_author, -fk_user_valid, -fk_facture_source, -fk_projet, -fk_account, -fk_currency, -fk_cond_reglement, -fk_mode_reglement, -date_lim_reglement, -note_private, -note_public, -model_pdf, -import_key, -extraparams) -SELECT -mvt.piece, --facnumber -1, --entity, -NULL, --ref_ext, -NULL, --ref_int, -NULL, --ref_client, -0, --type, -NULL, --increment, -llx_societe.rowid, --fk_soc, -IFNULL(mvt.datefact,NOW()), --datec, -IFNULL(mvt.datefact,NOW()), --datef, -IFNULL(mvt.datefact,NOW()), --date_valid, -NOW(), --tms, -0, --paye, -0, --amount, -NULL, --remise_percent, -NULL, --remise_absolue, -0, --remise, -NULL, --close_code, -NULL, --close_note, -0, --tva, -0, --localtax1, -0, --localtax2, -0, --revenuestamp, -0, --total, -0, --total_ttc, -1, --fk_statut, -1, --fk_user_author, -1, --fk_user_valid, -NULL, --fk_facture_source, -NULL, --fk_projet, -NULL, --fk_account, -NULL, --fk_currency, -llx_societe.cond_reglement, --fk_cond_reglement, -llx_societe.mode_reglement, --fk_mode_reglement, -MAX(tempfact.dateche), --date_lim_reglement, -NULL, --note_private, -NULL, --note_public, -'crabe', --model_pdf, -mvt.id, --import_key, -NULL --extraparams -FROM mvt -INNER JOIN tempfact ON tempfact.numfact=mvt.piece -INNER JOIN thirdparty ON thirdparty.id=mvt.thirdparty_id -INNER JOIN account ON account.id=thirdparty.account_id -INNER JOIN llx_societe ON llx_societe.import_key=account.id -INNER JOIN convct ON convct.id=mvt.convct_id -WHERE convct.supprime=0 -AND mvt.piece NOT IN (SELECT llx_facture.facnumber FROM llx_facture) -GROUP BY mvt.piece; - ---Import Invoice line -INSERT INTO llx_facturedet ( -fk_facture, -fk_parent_line, -fk_product, -label, -description, -tva_tx, -localtax1_tx, -localtax1_type, -localtax2_tx, -localtax2_type, -qty, -remise_percent, -remise, -fk_remise_except, -subprice, -price, -total_ht, -total_tva, -total_localtax1, -total_localtax2, -total_ttc, -product_type, -date_start, -date_end, -info_bits, -buy_price_ht, -fk_product_fournisseur_price, -fk_code_ventilation, -special_code, -rang, -import_key) -SELECT DISTINCT -llx_facture.rowid, --fk_facture, -NULL, --fk_parent_line, -NULL, --fk_product, -NULL, --label, -tempfact.intitule, --description, -tempfact.tauxtva, --tva_tx, -0, --localtax1_tx, -0, --localtax1_type, -0, --localtax2_tx, -0, --localtax2_type, -tempfact.nbjr, --qty, -0, --remise_percent, -0, --remise, -NULL, --fk_remise_except, -tempfact.taux, --subprice, -NULL, --price, -tempfact.montant, --total_ht, -tempfact.mttva, --total_tva, -0, --total_localtax1, -0, --total_localtax2, -tempfact.mtttc, --total_ttc, -1, --product_type, -NULL, --date_start, -NULL, --date_end, -0, --info_bits, -0, --buy_price_ht, -NULL, --fk_product_fournisseur_price, -0, --fk_code_ventilation, -0, --special_code, -tempfact.numlig, --rang, -NULL --import_key -FROM llx_facture -INNER JOIN tempfact ON tempfact.numfact=llx_facture.facnumber -INNER JOIN thirdparty ON thirdparty.id=tempfact.thirdparty_id -INNER JOIN account ON account.id=thirdparty.account_id -INNER JOIN llx_societe ON llx_societe.import_key=account.id -INNER JOIN convct ON convct.id=tempfact.convct_id; - - ---Update invoice header amount -UPDATE llx_facture -SET llx_facture.total_ttc=(SELECT SUM(total_ttc) FROM llx_facturedet WHERE llx_facturedet.fk_facture=llx_facture.rowid GROUP BY llx_facturedet.fk_facture), -llx_facture.tva=(SELECT SUM(total_tva) FROM llx_facturedet WHERE llx_facturedet.fk_facture=llx_facture.rowid GROUP BY llx_facturedet.fk_facture), -llx_facture.total=(SELECT SUM(total) FROM llx_facturedet WHERE llx_facturedet.fk_facture=llx_facture.rowid GROUP BY llx_facturedet.fk_facture), -llx_facture.tms=llx_facture.tms; - - ---Add invoice contact -INSERT INTO llx_element_contact ( -datecreate, -statut, -element_id, -fk_c_type_contact, -fk_socpeople) -SELECT DISTINCT -convct.created, -4, -llx_facture.rowid, -60, -llx_socpeople.rowid -FROM tempfact -INNER JOIN llx_facture ON tempfact.numfact=llx_facture.facnumber -INNER JOIN convct ON convct.id=tempfact.convct_id -INNER JOIN contact ON convct.recipient_contact_id=contact.id -INNER JOIN llx_socpeople ON llx_socpeople.import_key=contact.id; - - ---Lier facture Session/client -INSERT INTO llx_agefodd_session_element( -fk_session_agefodd, -fk_soc, -element_type, -fk_element, -fk_user_author, -datec, -fk_user_mod, -tms) -SELECT DISTINCT -llx_agefodd_session.rowid, -llx_societe.rowid, -'invoice', -llx_facture.rowid, -1, -NOW(), -1, -NOW() -FROM llx_facture -INNER JOIN tempfact ON tempfact.numfact=llx_facture.facnumber -INNER JOIN convct ON convct.id=tempfact.convct_id -INNER JOIN session as sess ON sess.id=convct.session_id -INNER JOIN llx_agefodd_session ON llx_agefodd_session.import_key=sess.id -INNER JOIN account ON account.id=convct.ent_account_id -INNER JOIN llx_societe ON llx_societe.import_key=account.id - - - - - -TRUNCATE tABLE `llx_categorie_product`; -INSERT INTO `llx_categorie_product` (`fk_categorie`, `fk_product`, `import_key`) VALUES -(24, 133, NULL), -(24, 132, NULL), -(7, 138, NULL), -(7, 141, NULL), -(7, 144, NULL), -(7, 143, NULL), -(7, 142, NULL), -(9, 116, NULL), -(9, 119, NULL), -(9, 118, NULL), -(9, 117, NULL), -(9, 115, NULL), -(9, 124, NULL), -(24, 125, NULL), -(10, 126, NULL), -(3, 130, NULL), -(9, 154, NULL), -(10, 127, NULL), -(7, 137, NULL), -(24, 135, NULL), -(7, 145, NULL), -(9, 120, NULL), -(7, 153, NULL), -(9, 123, NULL), -(10, 129, NULL), -(25, 131, NULL), -(23, 147, NULL); - -TRUNCATE TABLE `llx_usergroup`; -INSERT INTO `llx_usergroup` (`rowid`, `nom`, `entity`, `datec`, `tms`, `note`) VALUES -(1, 'Direction', 1, '2013-10-24 07:34:32', '2013-10-24 07:34:32', ''), -(2, 'Général', 1, '2013-10-24 07:35:41', '2013-10-24 07:35:41', ''), -(3, 'Spécifique', 1, '2013-10-24 07:37:05', '2013-10-24 07:37:05', ''); - -TRUNCATE TABLE `llx_usergroup_user`; -INSERT INTO `llx_usergroup_user` (`rowid`, `entity`, `fk_user`, `fk_usergroup`) VALUES -(7, 1, 2, 2), -(10, 1, 3, 3), -(4, 1, 4, 2), -(3, 1, 5, 2), -(9, 1, 6, 2), -(1, 1, 8, 1), -(2, 1, 10, 1), -(5, 1, 11, 2), -(6, 1, 13, 2), -(8, 1, 14, 2), -(11, 1, 15, 3), -(12, 1, 38, 1); - - -TRUNCATE TABLE `llx_usergroup_rights`; -INSERT INTO `llx_usergroup_rights` (`rowid`, `fk_usergroup`, `fk_id`) VALUES -(40, 1, 11), -(41, 1, 12), -(42, 1, 13), -(43, 1, 14), -(44, 1, 15), -(45, 1, 16), -(46, 1, 19), -(77, 1, 21), -(78, 1, 22), -(79, 1, 24), -(80, 1, 25), -(81, 1, 26), -(82, 1, 27), -(83, 1, 28), -(26, 1, 81), -(27, 1, 82), -(28, 1, 84), -(29, 1, 86), -(30, 1, 87), -(31, 1, 88), -(32, 1, 89), -(34, 1, 95), -(35, 1, 96), -(36, 1, 97), -(37, 1, 98), -(16, 1, 111), -(17, 1, 112), -(18, 1, 113), -(19, 1, 114), -(20, 1, 115), -(21, 1, 116), -(22, 1, 117), -(88, 1, 121), -(89, 1, 122), -(90, 1, 125), -(91, 1, 126), -(75, 1, 221), -(74, 1, 222), -(73, 1, 223), -(72, 1, 229), -(71, 1, 237), -(70, 1, 238), -(76, 1, 239), -(23, 1, 241), -(24, 1, 242), -(25, 1, 243), -(97, 1, 251), -(98, 1, 252), -(99, 1, 253), -(100, 1, 254), -(101, 1, 255), -(102, 1, 256), -(92, 1, 262), -(93, 1, 281), -(94, 1, 282), -(95, 1, 283), -(96, 1, 286), -(103, 1, 341), -(104, 1, 342), -(105, 1, 343), -(106, 1, 344), -(107, 1, 351), -(108, 1, 352), -(109, 1, 353), -(110, 1, 354), -(111, 1, 358), -(278, 1, 531), -(85, 1, 532), -(86, 1, 534), -(87, 1, 538), -(48, 1, 1181), -(49, 1, 1182), -(50, 1, 1183), -(51, 1, 1184), -(52, 1, 1185), -(53, 1, 1186), -(54, 1, 1187), -(55, 1, 1188), -(39, 1, 1201), -(38, 1, 1202), -(56, 1, 1231), -(57, 1, 1232), -(58, 1, 1233), -(59, 1, 1234), -(60, 1, 1235), -(61, 1, 1236), -(62, 1, 1237), -(69, 1, 1251), -(47, 1, 1321), -(33, 1, 1421), -(9, 1, 2401), -(10, 1, 2402), -(11, 1, 2403), -(12, 1, 2411), -(13, 1, 2412), -(14, 1, 2413), -(15, 1, 2414), -(63, 1, 20001), -(64, 1, 20002), -(65, 1, 20003), -(66, 1, 20004), -(67, 1, 20005), -(68, 1, 20006), -(1, 1, 103001), -(2, 1, 103002), -(3, 1, 103003), -(4, 1, 103004), -(5, 1, 103005), -(6, 1, 103006), -(7, 1, 103007), -(8, 1, 103008), -(131, 2, 11), -(132, 2, 12), -(133, 2, 13), -(134, 2, 14), -(135, 2, 15), -(136, 2, 16), -(157, 2, 21), -(158, 2, 22), -(159, 2, 24), -(160, 2, 25), -(161, 2, 26), -(162, 2, 27), -(163, 2, 28), -(168, 2, 121), -(169, 2, 122), -(170, 2, 125), -(129, 2, 241), -(173, 2, 281), -(174, 2, 282), -(175, 2, 283), -(176, 2, 286), -(164, 2, 531), -(139, 2, 1181), -(140, 2, 1182), -(141, 2, 1183), -(142, 2, 1184), -(143, 2, 1185), -(144, 2, 1186), -(145, 2, 1187), -(146, 2, 1188), -(147, 2, 1231), -(148, 2, 1232), -(149, 2, 1233), -(150, 2, 1234), -(151, 2, 1235), -(152, 2, 1236), -(153, 2, 1237), -(154, 2, 1321), -(120, 2, 2401), -(121, 2, 2402), -(122, 2, 2403), -(126, 2, 2414), -(155, 2, 20001), -(156, 2, 20006), -(283, 2, 103001), -(254, 2, 103005), -(256, 2, 103007), -(258, 2, 103008), -(203, 3, 11), -(204, 3, 12), -(205, 3, 13), -(206, 3, 14), -(207, 3, 15), -(208, 3, 16), -(209, 3, 19), -(235, 3, 21), -(236, 3, 22), -(237, 3, 24), -(238, 3, 25), -(239, 3, 26), -(240, 3, 27), -(241, 3, 28), -(268, 3, 121), -(269, 3, 122), -(270, 3, 125), -(271, 3, 126), -(233, 3, 221), -(232, 3, 222), -(231, 3, 223), -(230, 3, 229), -(229, 3, 237), -(228, 3, 238), -(234, 3, 239), -(192, 3, 241), -(272, 3, 262), -(273, 3, 281), -(274, 3, 282), -(275, 3, 283), -(276, 3, 286), -(242, 3, 531), -(211, 3, 1181), -(212, 3, 1182), -(213, 3, 1183), -(214, 3, 1184), -(215, 3, 1185), -(216, 3, 1186), -(217, 3, 1187), -(218, 3, 1188), -(202, 3, 1201), -(201, 3, 1202), -(219, 3, 1231), -(220, 3, 1232), -(221, 3, 1233), -(222, 3, 1234), -(223, 3, 1235), -(224, 3, 1236), -(225, 3, 1237), -(210, 3, 1321), -(185, 3, 2401), -(186, 3, 2402), -(187, 3, 2403), -(191, 3, 2414), -(226, 3, 20001), -(177, 3, 103001), -(178, 3, 103002), -(179, 3, 103003), -(180, 3, 103004), -(181, 3, 103005), -(182, 3, 103006), -(183, 3, 103007), -(184, 3, 103008), -(279, 1, 2354687), -(280, 2, 103002), -(282, 2, 103003); - -TRUNCATE TABLE `llx_user_rights`; -INSERT INTO `llx_user_rights` (`rowid`, `fk_user`, `fk_id`) VALUES -(1198, 1, 11), -(1173, 1, 12), -(1179, 1, 13), -(1182, 1, 14), -(1188, 1, 15), -(1191, 1, 16), -(1197, 1, 19), -(1104, 1, 21), -(1078, 1, 22), -(1083, 1, 24), -(1089, 1, 25), -(1093, 1, 26), -(1099, 1, 27), -(1105, 1, 28), -(499, 1, 81), -(471, 1, 82), -(477, 1, 84), -(483, 1, 86), -(486, 1, 87), -(492, 1, 88), -(498, 1, 89), -(1155, 1, 95), -(1158, 1, 96), -(1165, 1, 97), -(1164, 1, 98), -(1285, 1, 111), -(1254, 1, 112), -(1260, 1, 113), -(1266, 1, 114), -(1272, 1, 115), -(1278, 1, 116), -(1284, 1, 117), -(1383, 1, 121), -(1372, 1, 122), -(1378, 1, 125), -(1384, 1, 126), -(249, 1, 221), -(238, 1, 222), -(244, 1, 223), -(250, 1, 229), -(255, 1, 237), -(258, 1, 238), -(261, 1, 239), -(273, 1, 241), -(268, 1, 242), -(274, 1, 243), -(1389, 1, 262), -(1407, 1, 281), -(1396, 1, 282), -(1402, 1, 283), -(1408, 1, 286), -(1, 1, 341), -(2, 1, 342), -(3, 1, 343), -(4, 1, 344), -(1465, 1, 531), -(933, 1, 532), -(939, 1, 534), -(945, 1, 538), -(1290, 1, 1181), -(1362, 1, 1182), -(1297, 1, 1183), -(1303, 1, 1184), -(1309, 1, 1185), -(1315, 1, 1186), -(1321, 1, 1187), -(1326, 1, 1188), -(1356, 1, 1231), -(1336, 1, 1232), -(1342, 1, 1233), -(1348, 1, 1234), -(1353, 1, 1235), -(1357, 1, 1236), -(1363, 1, 1237), -(1203, 1, 1321), -(504, 1, 1421), -(960, 1, 2401), -(955, 1, 2402), -(961, 1, 2403), -(975, 1, 2411), -(970, 1, 2412), -(976, 1, 2413), -(981, 1, 2414), -(279, 1, 20001), -(282, 1, 20002), -(285, 1, 20003), -(288, 1, 20004), -(291, 1, 20005), -(294, 1, 20006), -(336, 1, 103001), -(300, 1, 103002), -(306, 1, 103003), -(312, 1, 103004), -(318, 1, 103005), -(324, 1, 103006), -(331, 1, 103007), -(337, 1, 103008), -(251, 8, 221), -(240, 8, 222), -(246, 8, 223), -(252, 8, 229), -(256, 8, 237), -(259, 8, 238), -(262, 8, 239), -(275, 8, 241), -(270, 8, 242), -(276, 8, 243), -(280, 8, 20001), -(283, 8, 20002), -(286, 8, 20003), -(289, 8, 20004), -(292, 8, 20005), -(295, 8, 20006), -(253, 10, 221), -(242, 10, 222), -(248, 10, 223), -(254, 10, 229), -(257, 10, 237), -(260, 10, 238), -(263, 10, 239), -(277, 10, 241), -(272, 10, 242), -(278, 10, 243), -(281, 10, 20001), -(284, 10, 20002), -(287, 10, 20003), -(290, 10, 20004), -(293, 10, 20005), -(296, 10, 20006), -(338, 8, 103001), -(340, 10, 103001), -(302, 8, 103002), -(304, 10, 103002), -(308, 8, 103003), -(310, 10, 103003), -(314, 8, 103004), -(316, 10, 103004), -(320, 8, 103005), -(322, 10, 103005), -(326, 8, 103006), -(328, 10, 103006), -(333, 8, 103007), -(335, 10, 103007), -(339, 8, 103008), -(341, 10, 103008), -(1385, 8, 121), -(1387, 10, 121), -(1374, 8, 122), -(1376, 10, 122), -(1380, 8, 125), -(1382, 10, 125), -(1386, 8, 126), -(1388, 10, 126), -(1390, 8, 262), -(1391, 10, 262), -(1409, 8, 281), -(1411, 10, 281), -(1398, 8, 282), -(1400, 10, 282), -(1404, 8, 283), -(1406, 10, 283), -(1410, 8, 286), -(1412, 10, 286), -(1106, 8, 21), -(1108, 10, 21), -(1080, 8, 22), -(1082, 10, 22), -(1085, 8, 24), -(1087, 10, 24), -(1090, 8, 25), -(1091, 10, 25), -(1095, 8, 26), -(1097, 10, 26), -(1101, 8, 27), -(1103, 10, 27), -(1107, 8, 28), -(1109, 10, 28), -(501, 8, 81), -(503, 10, 81), -(473, 8, 82), -(475, 10, 82), -(479, 8, 84), -(481, 10, 84), -(484, 8, 86), -(485, 10, 86), -(488, 8, 87), -(490, 10, 87), -(494, 8, 88), -(496, 10, 88), -(500, 8, 89), -(502, 10, 89), -(505, 8, 1421), -(506, 10, 1421), -(1156, 8, 95), -(1157, 10, 95), -(1159, 8, 96), -(1160, 10, 96), -(1167, 8, 97), -(1169, 10, 97), -(1166, 8, 98), -(1168, 10, 98), -(1200, 8, 11), -(1202, 10, 11), -(1175, 8, 12), -(1177, 10, 12), -(1180, 8, 13), -(1181, 10, 13), -(1184, 8, 14), -(1186, 10, 14), -(1189, 8, 15), -(1190, 10, 15), -(1193, 8, 16), -(1195, 10, 16), -(1199, 8, 19), -(1201, 10, 19), -(1204, 8, 1321), -(1205, 10, 1321), -(1287, 8, 111), -(1289, 10, 111), -(1256, 8, 112), -(1258, 10, 112), -(1262, 8, 113), -(1264, 10, 113), -(1268, 8, 114), -(1270, 10, 114), -(1274, 8, 115), -(1276, 10, 115), -(1280, 8, 116), -(1282, 10, 116), -(1286, 8, 117), -(1288, 10, 117), -(1291, 8, 1181), -(1292, 10, 1181), -(1364, 8, 1182), -(1366, 10, 1182), -(1299, 8, 1183), -(1301, 10, 1183), -(1305, 8, 1184), -(1307, 10, 1184), -(1311, 8, 1185), -(1313, 10, 1185), -(1317, 8, 1186), -(1319, 10, 1186), -(1323, 8, 1187), -(1325, 10, 1187), -(1328, 8, 1188), -(1330, 10, 1188), -(1358, 8, 1231), -(1360, 10, 1231), -(1338, 8, 1232), -(1340, 10, 1232), -(1344, 8, 1233), -(1346, 10, 1233), -(1350, 8, 1234), -(1352, 10, 1234), -(1354, 8, 1235), -(1355, 10, 1235), -(1359, 8, 1236), -(1361, 10, 1236), -(1365, 8, 1237), -(1367, 10, 1237), -(948, 8, 531), -(1467, 10, 531), -(935, 8, 532), -(937, 10, 532), -(941, 8, 534), -(943, 10, 534), -(947, 8, 538), -(949, 10, 538), -(962, 8, 2401), -(964, 10, 2401), -(957, 8, 2402), -(959, 10, 2402), -(963, 8, 2403), -(965, 10, 2403), -(977, 8, 2411), -(979, 10, 2411), -(972, 8, 2412), -(974, 10, 2412), -(978, 8, 2413), -(980, 10, 2413), -(982, 8, 2414), -(983, 10, 2414), -(1422, 1, 41), -(1424, 8, 41), -(1426, 10, 41), -(1417, 1, 42), -(1419, 8, 42), -(1421, 10, 42), -(1423, 1, 44), -(1425, 8, 44), -(1427, 10, 44), -(1437, 1, 141), -(1439, 8, 141), -(1441, 10, 141), -(1432, 1, 142), -(1434, 8, 142), -(1436, 10, 142), -(1438, 1, 144), -(1440, 8, 144), -(1442, 10, 144), -(1443, 38, 1181), -(1444, 38, 1231), -(1445, 38, 121), -(1446, 38, 262), -(1447, 38, 281), -(1448, 38, 21), -(1449, 38, 1182), -(1450, 38, 221), -(1451, 38, 241), -(1452, 38, 341), -(1453, 38, 342), -(1454, 38, 343), -(1455, 38, 344), -(1456, 38, 531), -(1457, 38, 11), -(1458, 38, 95), -(1459, 38, 97), -(1460, 38, 2401), -(1461, 38, 20001), -(1462, 38, 103001), -(1463, 38, 111), -(1464, 38, 1201), -(1466, 1, 2354687), -(1468, 10, 2354687); - - - - -TRUNCATE TABLE `llx_user_extrafields`; -INSERT INTO `llx_user_extrafields` (`rowid`, `tms`, `fk_object`, `import_key`, `u_prospection`, `u_commercial`, `u_logistique`, `u_interentreprises`, `u_communication`) VALUES -(10, '2013-11-01 22:26:31', 6, NULL, 1, 1, NULL, NULL, NULL), -(2, '2013-11-01 22:19:19', 14, NULL, NULL, NULL, 1, NULL, NULL), -(4, '2013-11-01 22:20:13', 13, NULL, NULL, NULL, 1, NULL, NULL), -(5, '2013-11-01 22:20:58', 11, NULL, NULL, 1, NULL, NULL, NULL), -(6, '2013-11-01 22:21:44', 5, NULL, 1, 1, NULL, NULL, NULL), -(7, '2013-11-01 22:22:12', 4, NULL, NULL, 1, NULL, NULL, NULL), -(15, '2013-11-02 09:00:32', 3, NULL, 1, 1, NULL, 1, NULL), -(9, '2013-11-01 22:25:31', 15, NULL, NULL, NULL, NULL, NULL, 1), -(12, '2013-11-01 22:27:50', 2, NULL, NULL, NULL, 1, NULL, NULL), -(13, '2013-11-01 22:31:12', 8, NULL, NULL, 1, NULL, NULL, NULL); - -TRUNCATE TABLE llx_rights_def; -INSERT INTO `llx_rights_def` (`id`, `libelle`, `module`, `entity`, `perms`, `subperms`, `type`, `bydefault`) VALUES -(11, 'Lire les factures', 'facture', 1, 'lire', NULL, 'a', 1), -(12, 'Creer/modifier les factures', 'facture', 1, 'creer', NULL, 'a', 0), -(13, 'Dévalider les factures', 'facture', 1, 'invoice_advance', 'unvalidate', 'a', 0), -(14, 'Valider les factures', 'facture', 1, 'valider', NULL, 'a', 0), -(15, 'Envoyer les factures par mail', 'facture', 1, 'invoice_advance', 'send', 'a', 0), -(16, 'Emettre des paiements sur les factures', 'facture', 1, 'paiement', NULL, 'a', 0), -(19, 'Supprimer les factures', 'facture', 1, 'supprimer', NULL, 'a', 0), -(21, 'Lire les propositions commerciales', 'propale', 1, 'lire', NULL, 'r', 1), -(22, 'Creer/modifier les propositions commerciales', 'propale', 1, 'creer', NULL, 'w', 0), -(24, 'Valider les propositions commerciales', 'propale', 1, 'valider', NULL, 'd', 0), -(25, 'Envoyer les propositions commerciales aux clients', 'propale', 1, 'propal_advance', 'send', 'd', 0), -(26, 'Cloturer les propositions commerciales', 'propale', 1, 'cloturer', NULL, 'd', 0), -(27, 'Supprimer les propositions commerciales', 'propale', 1, 'supprimer', NULL, 'd', 0), -(28, 'Exporter les propositions commerciales et attributs', 'propale', 1, 'export', NULL, 'r', 0), -(81, 'Lire les commandes clients', 'commande', 1, 'lire', NULL, 'r', 1), -(82, 'Creer/modifier les commandes clients', 'commande', 1, 'creer', NULL, 'w', 0), -(84, 'Valider les commandes clients', 'commande', 1, 'valider', NULL, 'd', 0), -(86, 'Envoyer les commandes clients', 'commande', 1, 'order_advance', 'send', 'd', 0), -(87, 'Cloturer les commandes clients', 'commande', 1, 'cloturer', NULL, 'd', 0), -(88, 'Annuler les commandes clients', 'commande', 1, 'annuler', NULL, 'd', 0), -(89, 'Supprimer les commandes clients', 'commande', 1, 'supprimer', NULL, 'd', 0), -(95, 'Lire CA, bilans, resultats', 'compta', 1, 'resultat', 'lire', 'r', 1), -(96, 'Parametrer la ventilation', 'compta', 1, 'ventilation', 'parametrer', 'r', 0), -(97, 'Lire les ventilations de factures', 'compta', 1, 'ventilation', 'lire', 'r', 1), -(98, 'Ventiler les lignes de factures', 'compta', 1, 'ventilation', 'creer', 'r', 0), -(111, 'Lire les comptes bancaires', 'banque', 1, 'lire', NULL, 'r', 1), -(112, 'Creer/modifier montant/supprimer ecriture bancaire', 'banque', 1, 'modifier', NULL, 'w', 0), -(113, 'Configurer les comptes bancaires (creer, gerer categories)', 'banque', 1, 'configurer', NULL, 'a', 0), -(114, 'Rapprocher les ecritures bancaires', 'banque', 1, 'consolidate', NULL, 'w', 0), -(115, 'Exporter transactions et releves', 'banque', 1, 'export', NULL, 'r', 0), -(116, 'Virements entre comptes', 'banque', 1, 'transfer', NULL, 'w', 0), -(117, 'Gerer les envois de cheques', 'banque', 1, 'cheque', NULL, 'w', 0), -(121, 'Lire les societes', 'societe', 1, 'lire', NULL, 'r', 1), -(122, 'Creer modifier les societes', 'societe', 1, 'creer', NULL, 'w', 0), -(125, 'Supprimer les societes', 'societe', 1, 'supprimer', NULL, 'd', 0), -(126, 'Exporter les societes', 'societe', 1, 'export', NULL, 'r', 0), -(221, 'Consulter les mailings', 'mailing', 1, 'lire', NULL, 'r', 1), -(222, 'Creer/modifier les mailings (sujet, destinataires...)', 'mailing', 1, 'creer', NULL, 'w', 0), -(223, 'Valider les mailings (permet leur envoi)', 'mailing', 1, 'valider', NULL, 'w', 0), -(229, 'Supprimer les mailings', 'mailing', 1, 'supprimer', NULL, 'd', 0), -(237, 'View recipients and info', 'mailing', 1, 'mailing_advance', 'recipient', 'r', 0), -(238, 'Manually send mailings', 'mailing', 1, 'mailing_advance', 'send', 'w', 0), -(239, 'Delete mailings after validation and/or sent', 'mailing', 1, 'mailing_advance', 'delete', 'd', 0), -(241, 'Lire les categories', 'categorie', 1, 'lire', NULL, 'r', 1), -(242, 'Creer/modifier les categories', 'categorie', 1, 'creer', NULL, 'w', 0), -(243, 'Supprimer les categories', 'categorie', 1, 'supprimer', NULL, 'd', 0), -(251, 'Consulter les autres utilisateurs', 'user', 1, 'user', 'lire', 'r', 0), -(252, 'Consulter les permissions des autres utilisateurs', 'user', 1, 'user_advance', 'readperms', 'r', 0), -(253, 'Creer/modifier utilisateurs internes et externes', 'user', 1, 'user', 'creer', 'w', 0), -(254, 'Creer/modifier utilisateurs externes seulement', 'user', 1, 'user_advance', 'write', 'w', 0), -(255, 'Modifier le mot de passe des autres utilisateurs', 'user', 1, 'user', 'password', 'w', 0), -(256, 'Supprimer ou desactiver les autres utilisateurs', 'user', 1, 'user', 'supprimer', 'd', 0), -(262, 'Consulter tous les tiers par utilisateurs internes (sinon uniquement si contact commercial). Non effectif pour utilisateurs externes (tjs limités à eux-meme).', 'societe', 1, 'client', 'voir', 'r', 1), -(281, 'Lire les contacts', 'societe', 1, 'contact', 'lire', 'r', 1), -(282, 'Creer modifier les contacts', 'societe', 1, 'contact', 'creer', 'w', 0), -(283, 'Supprimer les contacts', 'societe', 1, 'contact', 'supprimer', 'd', 0), -(286, 'Exporter les contacts', 'societe', 1, 'contact', 'export', 'd', 0), -(341, 'Consulter ses propres permissions', 'user', 1, 'self_advance', 'readperms', 'r', 1), -(342, 'Creer/modifier ses propres infos utilisateur', 'user', 1, 'self', 'creer', 'w', 1), -(343, 'Modifier son propre mot de passe', 'user', 1, 'self', 'password', 'w', 1), -(344, 'Modifier ses propres permissions', 'user', 1, 'self_advance', 'writeperms', 'w', 1), -(351, 'Consulter les groupes', 'user', 1, 'group_advance', 'read', 'r', 0), -(352, 'Consulter les permissions des groupes', 'user', 1, 'group_advance', 'readperms', 'r', 0), -(353, 'Creer/modifier les groupes et leurs permissions', 'user', 1, 'group_advance', 'write', 'w', 0), -(354, 'Supprimer ou desactiver les groupes', 'user', 1, 'group_advance', 'delete', 'd', 0), -(358, 'Exporter les utilisateurs', 'user', 1, 'user', 'export', 'r', 0), -(531, 'Lire les services', 'service', 1, 'lire', NULL, 'r', 1), -(532, 'Creer/modifier les services', 'service', 1, 'creer', NULL, 'w', 0), -(534, 'Supprimer les services', 'service', 1, 'supprimer', NULL, 'd', 0), -(538, 'Exporter les services', 'service', 1, 'export', NULL, 'r', 0), -(1181, 'Consulter les fournisseurs', 'fournisseur', 1, 'lire', NULL, 'r', 1), -(1182, 'Consulter les commandes fournisseur', 'fournisseur', 1, 'commande', 'lire', 'r', 1), -(1183, 'Creer une commande fournisseur', 'fournisseur', 1, 'commande', 'creer', 'w', 0), -(1184, 'Valider une commande fournisseur', 'fournisseur', 1, 'commande', 'valider', 'w', 0), -(1185, 'Approuver une commande fournisseur', 'fournisseur', 1, 'commande', 'approuver', 'w', 0), -(1186, 'Commander une commande fournisseur', 'fournisseur', 1, 'commande', 'commander', 'w', 0), -(1187, 'Receptionner une commande fournisseur', 'fournisseur', 1, 'commande', 'receptionner', 'd', 0), -(1188, 'Supprimer une commande fournisseur', 'fournisseur', 1, 'commande', 'supprimer', 'd', 0), -(1231, 'Consulter les factures fournisseur', 'fournisseur', 1, 'facture', 'lire', 'r', 1), -(1232, 'Creer une facture fournisseur', 'fournisseur', 1, 'facture', 'creer', 'w', 0), -(1233, 'Valider une facture fournisseur', 'fournisseur', 1, 'facture', 'valider', 'w', 0), -(1234, 'Supprimer une facture fournisseur', 'fournisseur', 1, 'facture', 'supprimer', 'd', 0), -(1235, 'Envoyer les factures par mail', 'fournisseur', 1, 'supplier_invoice_advance', 'send', 'a', 0), -(1236, 'Exporter les factures fournisseurs, attributs et reglements', 'fournisseur', 1, 'facture', 'export', 'r', 0), -(1237, 'Exporter les commande fournisseurs, attributs', 'fournisseur', 1, 'commande', 'export', 'r', 0), -(1321, 'Exporter les factures clients, attributs et reglements', 'facture', 1, 'facture', 'export', 'r', 0), -(1421, 'Exporter les commandes clients et attributs', 'commande', 1, 'commande', 'export', 'r', 0), -(2401, 'Read actions/tasks linked to his account', 'agenda', 1, 'myactions', 'read', 'r', 1), -(2402, 'Create/modify actions/tasks linked to his account', 'agenda', 1, 'myactions', 'create', 'w', 0), -(2403, 'Delete actions/tasks linked to his account', 'agenda', 1, 'myactions', 'delete', 'w', 0), -(2411, 'Read actions/tasks of others', 'agenda', 1, 'allactions', 'read', 'r', 0), -(2412, 'Create/modify actions/tasks of others', 'agenda', 1, 'allactions', 'create', 'w', 0), -(2413, 'Delete actions/tasks of others', 'agenda', 1, 'allactions', 'delete', 'w', 0), -(2414, 'Export actions/tasks of others', 'agenda', 1, 'export', NULL, 'w', 0), -(20001, 'Lire/créer/modifier ses demandes de congés payés', 'holiday', 1, 'write', NULL, 'w', 1), -(20002, 'Lire/créer/modifier toutes les demandes de congés payés', 'holiday', 1, 'lire_tous', NULL, 'w', 0), -(20003, 'Supprimer des demandes de congés payés', 'holiday', 1, 'delete', NULL, 'w', 0), -(20004, 'Définir les congés payés des utilisateurs', 'holiday', 1, 'define_holiday', NULL, 'w', 0), -(20005, 'Voir les logs de modification des congés payés', 'holiday', 1, 'view_log', NULL, 'w', 0), -(20006, 'Accéder au rapport mensuel des congés payés', 'holiday', 1, 'month_report', NULL, 'w', 0), -(103001, 'Voir les sesisons', 'agefodd', 1, 'lire', NULL, 'w', 1), -(103002, 'Modifier les sessions', 'agefodd', 1, 'modifier', NULL, 'w', 0), -(103003, 'Creer les sessions', 'agefodd', 1, 'creer', NULL, 'w', 0), -(103004, 'Suppression des sessions', 'agefodd', 1, 'supprimer', NULL, 'w', 0), -(103005, 'Voir stats', 'agefodd', 1, 'viewstats', NULL, 'w', 0), -(103006, 'export', 'agefodd', 1, 'export', NULL, 'w', 0), -(103007, 'agenda', 'agefodd', 1, 'agenda', NULL, 'w', 0), -(103008, 'agendatrainer', 'agefodd', 1, 'agendatrainer', NULL, 'w', 0), -(103009, 'Voir les formations du catalogue', 'agefodd', 1, 'agefodd_formation_catalogue', 'lire', 'r', 1), -(103010, 'Creer/Modifier les formations du catalogue', 'agefodd', 1, 'agefodd_formation_catalogue', 'creer', 'r', 1), -(103011, 'Supprimer les formations du catalogue', 'agefodd', 1, 'agefodd_formation_catalogue', 'supprimer', 'r', 1), -(103012, 'Voir les sites (lieux)', 'agefodd', 1, 'agefodd_place', 'lire', 'r', 1), -(103013, 'Creer/Modifier les sites (lieux)', 'agefodd', 1, 'agefodd_place', 'creer', 'r', 1), -(103014, 'Supprimer les sites (lieux)', 'agefodd', 1, 'agefodd_place', 'supprimer', 'r', 1), -(265486, 'Modifier les commercieux d''un tiers', 'societe', 1, 'client', 'comm', 'r', 1), -(2354687, 'Mettre ajour les prix produits par client', 'service', 1, 'custprix', NULL, 'w', 0); - ---Set prospect thirdparty with no invoicie -UPDATE llx_societe SET client=6, tms=tms WHERE fournisseur=0; -UPDATE llx_societe SET client=2, tms=tms WHERE rowid NOT IN (select fk_soc from llx_facture) AND fournisseur=0;--Prospect -UPDATE llx_societe SET client=1, tms=tms WHERE rowid IN (select fk_soc from llx_facture) AND fournisseur=0;--Customer -UPDATE llx_societe SET client=3, tms=tms WHERE rowid IN (select fk_soc from llx_facture WHERE fk_soc=llx_societe.rowid HAVING MAX(date_valid) < DATE_ADD(NOW(), INTERVAL -1 YEAR)) AND fournisseur=0;--Prospect/Customer -UPDATE llx_societe SET client=0, tms=tms WHERE client=6 AND fournisseur=0;--All Other - -UPDATE llx_societe SET code_fournisseur=NULL, tms=tms WHERE fournisseur=0; -UPDATE llx_societe SET code_client=CONCAT_WS('','C', LPAD(rowid,5,'0')), tms=tms WHERE client IN (1,2,3); - -TRUNCATE TABLE llx_c_actioncomm; -INSERT INTO `llx_c_actioncomm` (`id`, `code`, `type`, `libelle`, `module`, `active`, `todo`, `position`) VALUES -(1, 'AC_TEL', 'system', 'Phone call', NULL, 1, NULL, 2), -(2, 'AC_FAX', 'systemauto', 'Send Fax', NULL, 1, NULL, 3), -(3, 'AC_PROP', 'systemauto', 'Send commercial proposal by email', 'propal', 0, NULL, 10), -(4, 'AC_EMAIL', 'system', 'Send Email', NULL, 1, NULL, 4), -(5, 'AC_RDV', 'system', 'Rendez-vous', NULL, 1, NULL, 1), -(8, 'AC_COM', 'systemauto', 'Send customer order by email', 'order', 0, NULL, 8), -(9, 'AC_FAC', 'systemauto', 'Send customer invoice by email', 'invoice', 0, NULL, 6), -(10, 'AC_SHIP', 'systemauto', 'Send shipping by email', 'shipping', 0, NULL, 11), -(30, 'AC_SUP_ORD', 'systemauto', 'Send supplier order by email', 'order_supplier', 0, NULL, 9), -(31, 'AC_SUP_INV', 'systemauto', 'Send supplier invoice by email', 'invoice_supplier', 0, NULL, 7), -(40, 'AC_OTH_AUTO', 'systemauto', 'Other (automatically inserted events)', NULL, 1, NULL, 20), -(50, 'AC_OTH', 'systemauto', 'Other (manually inserted events)', NULL, 1, NULL, 5), -(1030008, 'AC_AGF_CONSE', 'systemauto', 'Send Advise document by mail', 'agefodd', 1, NULL, 80), -(1030007, 'AC_AGF_CLOT', 'systemauto', 'Send dossier cloture by mail', 'agefodd', 1, NULL, 70), -(1030006, 'AC_AGF_ATTES', 'systemauto', 'Send attestation by mail', 'agefodd', 1, NULL, 60), -(1030005, 'AC_AGF_PRES', 'systemauto', 'Send Fiche présence by mail', 'agefodd', 1, NULL, 50), -(1030004, 'AC_AGF_PEDAG', 'systemauto', 'Send Fiche pédagogique by mail', 'agefodd', 1, NULL, 40), -(1030003, 'AC_AGF_CONVO', 'systemauto', 'Send Convocation by mail', 'agefodd', 1, NULL, 30), -(1030002, 'AC_AGF_CONVE', 'systemauto', 'Send Convention by mail', 'agefodd', 1, NULL, 20), -(1030001, 'AC_AGF_SESS', 'systemauto', 'Link to Training', 'agefodd', 1, NULL, 10), -(1030009, 'AC_AGF_ACCUE', 'systemauto', 'Send welcome document by mail', 'agefodd', 1, NULL, 90), -(1030010, 'AC_AGF_SESST', 'systemauto', 'Link to Training for trainer', 'agefodd', 1, NULL, 15), -(1030011, 'AC_COUR', 'user', 'Envoi courrier (doc, catalogue, ...)', NULL, 1, NULL, 5), -(1030013, 'AC_PROJ', 'user', 'Projet', NULL, 1, NULL, 6), -(1030014, 'AC_ENTR', 'user', 'Demande entrante', NULL, 1, NULL, 9), -(1030015, 'AC_EVT', 'user', 'Participation à un évènement Akteos', NULL, 1, NULL, 10); - - -TRUNCATE TABLE llx_c_typent; -INSERT INTO `llx_c_typent` (`id`, `code`, `libelle`, `active`, `module`) VALUES -(0, 'TE_UNKNOWN', '-', 1, NULL), -(1, 'TE_STARTUP', 'Start-up', 0, NULL), -(2, 'TE_GROUP', 'Entreprise française', 0, NULL), -(3, 'TE_PAY', 'Payeur', 1, NULL), -(4, 'TE_SMALL', 'TPE', 0, NULL), -(5, 'TE_ADMIN', 'Pouvoirs publics', 1, NULL), -(6, 'TE_WHOLE', 'Grossiste', 0, NULL), -(7, 'TE_RETAIL', 'Revendeur', 0, NULL), -(8, 'TE_PRIVATE', 'Particulier', 1, NULL), -(100, 'TE_OTHER', 'Autres', 0, NULL), -(101, 'TE_ENT_FR', 'Entreprise française', 1, NULL), -(102, 'TE_ENT_ET', 'Entreprise étrangère', 1, NULL), -(103, 'TE_OPCA', 'OPCA', 1, NULL), -(104, 'TE_FORMATION', 'Prestataire de formation', 1, NULL); - -TRUNCATE TABLE llx_c_effectif; -INSERT INTO `llx_c_effectif` (`id`, `code`, `libelle`, `active`, `module`) VALUES -(0, 'EF0', '-', 1, NULL), -(1, 'EF1-19', '1 - 19', 1, NULL), -(2, 'EF20-99', '20 - 99', 1, NULL), -(3, 'EF100-499', '100 - 499', 1, NULL), -(4, 'EF500-999', '500 - 999', 1, NULL), -(6, 'EF1000-', '> 1000', 1, NULL); - - ---insert event type Demande entrante -TRUNCATE TABLE llx_actioncomm; -INSERT INTO llx_actioncomm ( -ref_ext, -entity, -datep, -datep2, -fk_action, -code, -label, -note, -datec, -tms, -fk_user_author, -fk_user_mod, -fk_soc, -fk_contact, -fk_user_action, -transparency, -fk_user_done, -priority, -fulldayevent, -punctual, -percent, -location, -durationp, -durationa, -fk_element, -elementtype) -SELECT DISTINCT -planningitem.id, --ref_ext -1, --entity, -IFNULL(planningitem.begin_datetime,planningitem.end_datetime), --datep, -planningitem.end_datetime, --datep2, -1030014, --fk_action -'AC_ENTR', --code, -CASE WHEN (TRIM(planningitem.summary)='') THEN 'Demande entrante (renseignements, besoins)' ELSE planningitem.summary END, --label, -planningitem.description, --note, -planningitem.created, --datec, -planningitem.modified, --tms, -IFNULL(usercrea.rowid,1), --fk_user_author -IFNULL(usermod.rowid,1), --fk_user_mod -llx_societe.rowid, --fk_soc, -llx_socpeople.rowid, --fk_contact, -IFNULL(usercrea.rowid,1), --fk_user_action, -0, --transparency, -IFNULL(usercrea.rowid,1), --fk_user_done, -0, --priority, -0, --fulldayevent, -1, --punctual, --1, --percent, -null, --location -planningitem.end_datetime-planningitem.begin_datetime, --durationp, -null, --durationa, -null, --fk_element -null --elementtype -FROM planningitem -LEFT OUTER JOIN planningitem_uobject as contactsoc ON planningitem.id=contactsoc.planningitem_id -LEFT OUTER JOIN planningitem_uobject as contctlink ON contctlink.planningitem_uobject_id=contactsoc.id -LEFT OUTER JOIN llx_socpeople ON llx_socpeople.import_key=contctlink.uobject_id -LEFT OUTER JOIN llx_societe ON llx_societe.import_key=contactsoc.uobject_id -LEFT OUTER JOIN sf_user as usercreast ON usercreast.id=planningitem.created_by_sf_user_id -LEFT OUTER JOIN llx_user as usercrea ON usercreast.email_address=usercrea.email -LEFT OUTER JOIN sf_user as usermodst ON usermodst.id=planningitem.modified_by_sf_user_id -LEFT OUTER JOIN llx_user as usermod ON usermodst.email_address=usermod.email -WHERE planningitem.planningitemtype_code='BES' -AND llx_societe.rowid IS NOT NULL AND planningitem.deleted=0; - ---insert event type Demande entrante -INSERT INTO llx_actioncomm ( -ref_ext, -entity, -datep, -datep2, -fk_action, -code, -label, -note, -datec, -tms, -fk_user_author, -fk_user_mod, -fk_soc, -fk_contact, -fk_user_action, -transparency, -fk_user_done, -priority, -fulldayevent, -punctual, -percent, -location, -durationp, -durationa, -fk_element, -elementtype) -SELECT DISTINCT -planningitem.id, --ref_ext -1, --entity, -IFNULL(planningitem.begin_datetime,planningitem.end_datetime), --datep, -planningitem.end_datetime, --datep2, -1030011, --fk_action -'AC_COUR', --code, -CASE WHEN (TRIM(planningitem.summary)='') THEN 'Envoi courrier (doc, catalogue, ...)' ELSE planningitem.summary END, --label, -planningitem.description, --note, -planningitem.created, --datec, -planningitem.modified, --tms, -IFNULL(usercrea.rowid,1), --fk_user_author -IFNULL(usermod.rowid,1), --fk_user_mod -llx_societe.rowid, --fk_soc, -llx_socpeople.rowid, --fk_contact, -IFNULL(usercrea.rowid,1), --fk_user_action, -0, --transparency, -IFNULL(usercrea.rowid,1), --fk_user_done, -0, --priority, -0, --fulldayevent, -1, --punctual, --1, --percent, -null, --location -planningitem.end_datetime-planningitem.begin_datetime, --durationp, -null, --durationa, -null, --fk_element -null --elementtype -FROM planningitem -LEFT OUTER JOIN planningitem_uobject as contactsoc ON planningitem.id=contactsoc.planningitem_id -LEFT OUTER JOIN planningitem_uobject as contctlink ON contctlink.planningitem_uobject_id=contactsoc.id -LEFT OUTER JOIN llx_socpeople ON llx_socpeople.import_key=contctlink.uobject_id -LEFT OUTER JOIN llx_societe ON llx_societe.import_key=contactsoc.uobject_id -LEFT OUTER JOIN sf_user as usercreast ON usercreast.id=planningitem.created_by_sf_user_id -LEFT OUTER JOIN llx_user as usercrea ON usercreast.email_address=usercrea.email -LEFT OUTER JOIN sf_user as usermodst ON usermodst.id=planningitem.modified_by_sf_user_id -LEFT OUTER JOIN llx_user as usermod ON usermodst.email_address=usermod.email -WHERE planningitem.planningitemtype_code='DOC' -AND llx_societe.rowid IS NOT NULL -AND planningitem.deleted=0; - ---Insert Projet -INSERT INTO llx_actioncomm ( -ref_ext, -entity, -datep, -datep2, -fk_action, -code, -label, -note, -datec, -tms, -fk_user_author, -fk_user_mod, -fk_soc, -fk_contact, -fk_user_action, -transparency, -fk_user_done, -priority, -fulldayevent, -punctual, -percent, -location, -durationp, -durationa, -fk_element, -elementtype) -SELECT DISTINCT -planningitem.id, --ref_ext -1, --entity, -IFNULL(planningitem.begin_datetime,planningitem.end_datetime), --datep, -planningitem.end_datetime, --datep2, -1030013, --fk_action -'AC_PROJ', --code, -CASE WHEN (TRIM(planningitem.summary)='') THEN 'Envoi courrier (doc, catalogue, ...)' ELSE LEFT(planningitem.summary,128) END, --label, -planningitem.description, --note, -planningitem.created, --datec, -planningitem.modified, --tms, -IFNULL(usercrea.rowid,1), --fk_user_author -IFNULL(usermod.rowid,1), --fk_user_mod -llx_societe.rowid, --fk_soc, -llx_socpeople.rowid, --fk_contact, -IFNULL(usercrea.rowid,1), --fk_user_action, -0, --transparency, -IFNULL(usercrea.rowid,1), --fk_user_done, -0, --priority, -0, --fulldayevent, -1, --punctual, --1, --percent, -null, --location -planningitem.end_datetime-planningitem.begin_datetime, --durationp, -null, --durationa, -null, --fk_element -null --elementtype -FROM planningitem -LEFT OUTER JOIN planningitem_uobject as contactsoc ON planningitem.id=contactsoc.planningitem_id -LEFT OUTER JOIN planningitem_uobject as contctlink ON contctlink.planningitem_uobject_id=contactsoc.id -LEFT OUTER JOIN llx_socpeople ON llx_socpeople.import_key=contctlink.uobject_id -LEFT OUTER JOIN llx_societe ON llx_societe.import_key=contactsoc.uobject_id -LEFT OUTER JOIN sf_user as usercreast ON usercreast.id=planningitem.created_by_sf_user_id -LEFT OUTER JOIN llx_user as usercrea ON usercreast.email_address=usercrea.email -LEFT OUTER JOIN sf_user as usermodst ON usermodst.id=planningitem.modified_by_sf_user_id -LEFT OUTER JOIN llx_user as usermod ON usermodst.email_address=usermod.email -WHERE planningitem.planningitemtype_code='PROJET' -AND llx_societe.rowid IS NOT NULL -AND planningitem.deleted=0; - - -INSERT INTO llx_actioncomm ( -ref_ext, -entity, -datep, -datep2, -fk_action, -code, -label, -note, -datec, -tms, -fk_user_author, -fk_user_mod, -fk_soc, -fk_contact, -fk_user_action, -transparency, -fk_user_done, -priority, -fulldayevent, -punctual, -percent, -location, -durationp, -durationa, -fk_element, -elementtype) -SELECT DISTINCT -planningitem.id, --ref_ext -1, --entity, -IFNULL(planningitem.begin_datetime,planningitem.end_datetime), --datep, -planningitem.end_datetime, --datep2, -1030013, --fk_action -'AC_PROJ', --code, -CASE WHEN (TRIM(planningitem.summary)='') THEN 'Envoi courrier (doc, catalogue, ...)' ELSE LEFT(planningitem.summary,128) END, --label, -planningitem.description, --note, -planningitem.created, --datec, -planningitem.modified, --tms, -IFNULL(usercrea.rowid,1), --fk_user_author -IFNULL(usermod.rowid,1), --fk_user_mod -llx_societe.rowid, --fk_soc, -llx_socpeople.rowid, --fk_contact, -IFNULL(usercrea.rowid,1), --fk_user_action, -0, --transparency, -IFNULL(usercrea.rowid,1), --fk_user_done, -0, --priority, -0, --fulldayevent, -1, --punctual, --1, --percent, -null, --location -planningitem.end_datetime-planningitem.begin_datetime, --durationp, -null, --durationa, -null, --fk_element -null --elementtype -FROM planningitem -LEFT OUTER JOIN planningitem_uobject as contactsoc ON planningitem.id=contactsoc.planningitem_id -LEFT OUTER JOIN planningitem_uobject as contctlink ON contctlink.planningitem_uobject_id=contactsoc.id -LEFT OUTER JOIN llx_socpeople ON llx_socpeople.import_key=contctlink.uobject_id -LEFT OUTER JOIN llx_societe ON llx_societe.import_key=contactsoc.uobject_id -LEFT OUTER JOIN sf_user as usercreast ON usercreast.id=planningitem.created_by_sf_user_id -LEFT OUTER JOIN llx_user as usercrea ON usercreast.email_address=usercrea.email -LEFT OUTER JOIN sf_user as usermodst ON usermodst.id=planningitem.modified_by_sf_user_id -LEFT OUTER JOIN llx_user as usermod ON usermodst.email_address=usermod.email -WHERE planningitem.planningitemtype_code='PROJET' -AND llx_societe.rowid IS NOT NULL -AND planningitem.deleted=0; ------- ----import Agenda ------- ---select count(*) from hisplan where session_id IS NOT NULL --- Match sur session id ---Mettre dans text lib tel quel, formateur : nom, éléves : nomelv, comment :comment ---date debut : hjour+heuredeb / date fin hjour + heurefin ---Différent de haction='Old' ---Type=Session AGF - ---Hist mail ---deleted IS NULL ---Affecter à com_id ---contact_id et account_id ---type='Autre' ---dater=date de fin - ---Remove temporarie data -ALTER TABLE llx_societe DROP INDEX idx_llx_societe_import_key; -ALTER TABLE llx_agefodd_session DROP INDEX idx_llx_agefodd_session_import_key; -ALTER TABLE llx_propal DROP INDEX idx_llx_propal_import_key; -ALTER TABLE llx_user DROP INDEX idx_llx_user_import_key; -ALTER TABLE llx_socpeople DROP INDEX idx_llx_socpeople_import_key; -SET foreign_key_checks = 1; From f305524e29795f41fae1b227cca193a08cdba3b0 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 20 Nov 2013 09:34:54 +0100 Subject: [PATCH 082/107] Revert "Qual: Removed not used file" This reverts commit 603c2aa938eb525f35d0529787a54a40c49abab6. --- htdocs/societe/class/address.class.php | 524 +++++++++++++++++++++++++ 1 file changed, 524 insertions(+) create mode 100644 htdocs/societe/class/address.class.php diff --git a/htdocs/societe/class/address.class.php b/htdocs/societe/class/address.class.php new file mode 100644 index 00000000000..0f1091b37ce --- /dev/null +++ b/htdocs/societe/class/address.class.php @@ -0,0 +1,524 @@ + + * Copyright (C) 2004-2006 Laurent Destailleur + * Copyright (C) 2005-2011 Regis Houssin + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/societe/class/address.class.php + * \ingroup societe + * \brief Fichier de la classe des adresses des tiers + */ + + +/** + * \class Address + * \brief Class to manage addresses + */ +class Address +{ + var $db; + + var $id; + var $type; + var $label; + var $socid; + var $name; + var $address; + var $zip; + var $town; + var $country_id; + var $country_code; + var $phone; + var $fax; + var $note; + + + /** + * Constructor + * + * @param DoliDB $db Database handler + */ + function __construct($db) + { + $this->db = $db; + } + + /** + * Create address into database + * + * @param int $socid Company socid + * @param User $user Object user making creation + * @return int 0 if OK, < 0 if KO + */ + function create($socid, $user='') + { + global $langs,$conf; + + // Nettoyage parametres + $this->name = trim($this->name); + $this->label = trim($this->label); + + dol_syslog(get_class($this)."::create label=".$this->label); + + $this->db->begin(); + + $result = $this->verify(); + + if ($result >= 0) + { + $now=dol_now(); + + $sql = "INSERT INTO ".MAIN_DB_PREFIX."societe_address (label, fk_soc, name, datec, fk_user_creat) "; + $sql .= " VALUES ('".$this->db->escape($this->label)."', '".$socid."', '".$this->db->escape($this->name)."', ".$this->db->idate($now).", '".$user->id."')"; + + $result=$this->db->query($sql); + if ($result) + { + $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."societe_address"); + + $ret = $this->update($this->id, $socid, $user); + + if ($ret >= 0) + { + dol_syslog(get_class($this)."::create success id=".$this->id); + $this->db->commit(); + return 0; + } + else + { + dol_syslog(get_class($this)."::create echec update"); + $this->db->rollback(); + return -3; + } + } + else + + { + if ($this->db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') + { + + $this->error=$langs->trans("ErrorCompanyNameAlreadyExists",$this->nom); + } + else + { + dol_syslog(get_class($this)."::create echec insert sql=$sql"); + } + $this->db->rollback(); + return -2; + } + + } + else + { + $this->db->rollback(); + dol_syslog(get_class($this)."::create echec verify sql=$sql"); + return -1; + } + } + + + /** + * Verification lors de la modification de l'adresse + * + * @return int 0 if OK, <0 if KO + */ + function verify() + { + $this->label = trim($this->label); + $this->name = trim($this->name); + $result = 0; + if (!$this->name || !$this->label) + { + $this->error = "The name of company and the label can not be empty.\n"; + $result = -2; + } + return $result; + } + + + /** + * Mise a jour des parametres de l'adresse + * + * @param int $id id address + * @param int $socid id third party + * @param User $user Utilisateur qui demande la mise a jour + * @return int <0 if KO, >=0 if OK + */ + function update($id, $socid, $user='') + { + global $langs; + + // Clean parameters + $this->fk_soc = $socid; + $this->label = trim($this->label); + $this->name = trim($this->name); + $this->address = trim($this->address); + $this->zip = trim($this->zip); + $this->town = trim($this->town); + $this->country_id = trim($this->country_id); + $this->phone = trim($this->phone); + $this->phone = preg_replace("/\s/","",$this->phone); + $this->phone = preg_replace("/\./","",$this->phone); + $this->fax = trim($this->fax); + $this->fax = preg_replace("/\s/","",$this->fax); + $this->fax = preg_replace("/\./","",$this->fax); + $this->note = trim($this->note); + + $result = $this->verify(); // Verifie que nom et label obligatoire + + if ($result >= 0) + { + dol_syslog(get_class($this)."::Update verify ok"); + + $this->db->begin(); + + $sql = "UPDATE ".MAIN_DB_PREFIX."societe_address"; + $sql.= " SET label = '" . $this->db->escape($this->label) ."'"; // Champ obligatoire + $sql.= ", name = '" . $this->db->escape($this->name) ."'"; // Champ obligatoire + $sql.= ", address = ".($this->address?"'".$this->db->escape($this->address)."'":"null"); + $sql.= ", zip = ".($this->zip?"'".$this->db->escape($this->zip)."'":"null"); + $sql.= ", town = ".($this->town?"'".$this->db->escape($this->town)."'":"null"); + $sql.= ", fk_pays = '" . ($this->country_id?$this->db->escape($this->country_id):'0') ."'"; + $sql.= ", note = ".($this->note?"'".$this->db->escape($this->note)."'":"null"); + $sql.= ", phone = ".($this->phone?"'".$this->db->escape($this->phone)."'":"null"); + $sql.= ", fax = ".($this->fax?"'".$this->db->escape($this->fax)."'":"null"); + if ($user) $sql .= ",fk_user_modif = '".$user->id."'"; + $sql .= " WHERE fk_soc = '" . $socid ."' AND rowid = '" . $this->db->escape($id) ."'"; + + dol_syslog(get_class($this)."::Update sql=".$sql, LOG_DEBUG); + $resql=$this->db->query($sql); + if ($resql) + { + dol_syslog(get_class($this)."::Update success"); + $this->db->commit(); + return 1; + } + else + { + if ($this->db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') + { + + $this->error=$langs->trans("ErrorDuplicateField",$this->name); + $result=-1; + } + else + { + $this->error=$this->db->lasterror(); + dol_syslog(get_class($this)."::Update error sql=".$sql, LOG_ERR); + $result=-2; + } + $this->db->rollback(); + return $result; + } + } + + } + + /** + * Charge depuis la base toutes les adresses d'une societe + * + * @param int $socid Id de la societe a charger en memoire + * @param User $user Objet de l'utilisateur + * @return int >0 si ok, <0 si ko + */ + function fetch_lines($socid, $user=0) + { + global $langs, $conf; + + $sql = 'SELECT rowid, nom, client, fournisseur'; + $sql .= ' FROM '.MAIN_DB_PREFIX.'societe'; + $sql .= ' WHERE rowid = '.$socid; + + $resqlsoc=$this->db->query($sql); + if ($resqlsoc) + { + if ($this->db->num_rows($resqlsoc)) + { + $obj = $this->db->fetch_object($resqlsoc); + + $this->socname = $obj->nom; + $this->socid = $obj->rowid; + $this->id = $obj->rowid; + $this->client = $obj->client; + $this->fournisseur = $obj->fournisseur; + } + + $this->db->free($resqlsoc); + + $this->lines = array(); + + // Adresses liees a la societe + if ($this->socid) + { + $sql = 'SELECT a.rowid as id, a.label, a.name, a.address, a.datec as dc'; + $sql .= ', a.tms as date_update, a.fk_soc'; + $sql .= ', a.zip, a.town, a.note, a.fk_pays as country_id, a.phone, a.fax'; + $sql .= ', p.code as country_code, p.libelle as country'; + $sql .= ' FROM '.MAIN_DB_PREFIX.'societe_address as a'; + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_pays as p ON a.fk_pays = p.rowid'; + $sql .= ' WHERE a.fk_soc = '.$this->socid; + + $resql=$this->db->query($sql); + if ($resql) + { + $num = $this->db->num_rows($resql); + $i = 0; + while ($i < $num) + { + $objp = $this->db->fetch_object($resql); + + $line = new AddressLine($this->db); + + $line->id = $objp->id; + $line->date_creation = $this->db->jdate($objp->dc); + $line->date_update = $this->db->jdate($objp->date_update); + $line->label = $objp->label; + $line->name = $objp->name; + $line->address = $objp->address; + $line->zip = $objp->zip; + $line->town = $objp->town; + $line->country_id = $objp->country_id; + $line->country_code = $objp->country_id?$objp->country_code:''; + $line->country = $objp->country_id?($langs->trans('Country'.$objp->country_code)!='Country'.$objp->country_code?$langs->trans('Country'.$objp->country_code):$objp->country):''; + $line->phone = $objp->phone; + $line->fax = $objp->fax; + $line->note = $objp->note; + + $this->lines[$i] = $line; + $i++; + } + $this->db->free($resql); + return $num; + } + else + { + dol_syslog(get_class($this).'::Fetch Erreur: aucune adresse', LOG_ERR); + return 0; + } + } + else + { + dol_syslog(get_class($this).'::Fetch Erreur: societe inconnue', LOG_ERR); + return -1; + } + } + else + { + dol_syslog(get_class($this).'::Fetch '.$this->db->error(), LOG_ERR); + $this->error=$this->db->error(); + } + } + + /** + * Charge depuis la base l'objet adresse + * + * @param int $id Id de l'adresse a charger en memoire + * @param User $user Objet de l'utilisateur + * @return int >0 si ok, <0 si ko + */ + function fetch_address($id, $user=0) + { + global $langs; + global $conf; + + $sql = 'SELECT a.rowid, a.fk_soc, a.label, a.name, a.address, a.datec as date_creation'; + $sql .= ', a.tms as date_update'; + $sql .= ', a.zip, a.town, a.note, a.fk_pays as country_id, a.phone, a.fax'; + $sql .= ', p.code as country_code, p.libelle as country'; + $sql .= ' FROM '.MAIN_DB_PREFIX.'societe_address as a'; + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_pays as p ON a.fk_pays = p.rowid'; + $sql .= ' WHERE a.rowid = '.$id; + $resql=$this->db->query($sql); + if ($resql) + { + if ($this->db->num_rows($resql)) + { + $obj = $this->db->fetch_object($resql); + + $this->id = $obj->rowid; + $this->socid = $obj->fk_soc; + + $this->date_update = $this->db->jdate($obj->date_update); + $this->date_creation = $this->db->jdate($obj->date_creation); + + $this->label = $obj->label; + $this->name = $obj->name; + $this->address = $obj->address; + $this->zip = $obj->zip; + $this->town = $obj->town; + + $this->country_id = $obj->country_id; + $this->country_code = $obj->country_id?$obj->country_code:''; + $this->country = $obj->country_id?($langs->trans('Country'.$obj->country_code)!='Country'.$obj->country_code?$langs->trans('Country'.$obj->country_code):$obj->country):''; + + $this->phone = $obj->phone; + $this->fax = $obj->fax; + $this->note = $obj->note; + + $result = 1; + } + else + { + dol_syslog('Erreur Societe::Fetch aucune adresse avec id='.$this->id.' - '.$sql); + $this->error='Erreur Societe::Fetch aucune adresse avec id='.$this->id.' - '.$sql; + $result = -2; + } + + $this->db->free($resql); + } + else + { + dol_syslog('Erreur Societe::Fetch echec sql='.$sql); + dol_syslog('Erreur Societe::Fetch '.$this->db->error()); + $this->error=$this->db->error(); + $result = -3; + } + + return $result; + } + + + /** + * Suppression d'une adresse + * + * @param int $id id de la societe a supprimer + * @param int $socid id third party + * @return void + */ + function delete($id,$socid) + { + dol_syslog("Address::Delete"); + + $sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_address"; + $sql.= " WHERE rowid = ".$id; + $sql.= " AND fk_soc = ".$socid; + + $result = $this->db->query($sql); + + if (!$result) + { + print $this->db->error() . '
    ' . $sql; + } + } + + /** + * Return name of address with link (and eventually picto) + * Use $this->id, $this->label, $this->socid + * + * @param int $withpicto Include picto with link + * @param string $option Where the link point to + * @return string String with URL + */ + function getNomUrl($withpicto=0,$option='') + { + global $langs; + + $result=''; + + $lien = ''; + $lienfin=''; + + if ($withpicto) $result.=($lien.img_object($langs->trans("ShowAddress").': '.$this->label,'address').$lienfin.' '); + $result.=$lien.$this->label.$lienfin; + return $result; + } + + + /** + * Charge les informations d'ordre info dans l'objet societe + * + * @param int $id id de la societe a charger + * @return void + */ + function info($id) + { + $sql = "SELECT s.rowid, s.nom, datec, datea,"; + $sql.= " fk_user_creat, fk_user_modif"; + $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; + $sql.= " WHERE s.rowid = ".$id; + + $result=$this->db->query($sql); + if ($result) + { + if ($this->db->num_rows($result)) + { + $obj = $this->db->fetch_object($result); + + $this->id = $obj->rowid; + + if ($obj->fk_user_creat) { + $cuser = new User($this->db); + $cuser->fetch($obj->fk_user_creat); + $this->user_creation = $cuser; + } + + if ($obj->fk_user_modif) { + $muser = new User($this->db); + $muser->fetch($obj->fk_user_modif); + $this->user_modification = $muser; + } + $this->ref = $obj->nom; + $this->date_creation = $this->db->jdate($obj->datec); + $this->date_modification = $this->db->jdate($obj->datea); + } + + $this->db->free($result); + + } + else + { + dol_print_error($this->db); + } + } + +} + + +/** + * \class AddressLine + * \brief Class to manage one address line + */ +class AddressLine +{ + + var $id; + var $date_creation; + var $date_update; + var $label; + var $name; + var $address; + var $zip; + var $town; + var $country_id; + var $country_code; + var $country; + var $phone; + var $fax; + var $note; + + + /** + * Constructor + * + * @param DoliDB $db Database handler + */ + function __construct($db) + { + $this->db = $db; + } +} +?> \ No newline at end of file From 4c29bddfda4798611ed00a983239dff57a9c37ae Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 20 Nov 2013 09:40:56 +0100 Subject: [PATCH 083/107] Fix: wrong variable name Fix: restore address.class.php, this class is used --- htdocs/core/modules/DolibarrModules.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php index 79e515b05e5..62a54437cd6 100644 --- a/htdocs/core/modules/DolibarrModules.class.php +++ b/htdocs/core/modules/DolibarrModules.class.php @@ -562,7 +562,7 @@ abstract class DolibarrModules if (! $resql) $err++; } - if (! $err && ! preg_match('/newboxdefonly/',$options)) + if (! $err && ! preg_match('/newboxdefonly/',$option)) { $lastid=$this->db->last_insert_id(MAIN_DB_PREFIX."boxes_def","rowid"); From e654dac5780a7b36de7bb55eda710bdb51550268 Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Wed, 20 Nov 2013 10:33:06 +0100 Subject: [PATCH 084/107] [Task 1144 ] Fix wrong max-length of produt ref --- htdocs/product/fiche.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index bd33b2aa967..b05f98506ab 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -724,7 +724,7 @@ else $tmpcode=''; if (! empty($modCodeProduct->code_auto)) $tmpcode=$modCodeProduct->getNextValue($object,$type); - print '
    '.$langs->trans("Ref").''; + print ''.$langs->trans("Ref").''; if ($_error) { print $langs->trans("RefAlreadyExists"); @@ -914,7 +914,7 @@ else print ''; // Ref - print ''; + print ''; // Label print ''; From b04a12c39a3d43816460934dd9930545866e697c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 20 Nov 2013 12:45:38 +0100 Subject: [PATCH 085/107] Missing vat rate for canada --- htdocs/install/mysql/migration/3.4.0-3.5.0.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/install/mysql/migration/3.4.0-3.5.0.sql b/htdocs/install/mysql/migration/3.4.0-3.5.0.sql index a091e7f089c..5cad5b1ffda 100755 --- a/htdocs/install/mysql/migration/3.4.0-3.5.0.sql +++ b/htdocs/install/mysql/migration/3.4.0-3.5.0.sql @@ -20,6 +20,7 @@ DELETE FROM llx_menu where module='holiday'; +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,note,active) values (143, 14,'5','0','9.975','1','TPS and TVQ rate',1); -- Fix bad migration of 3.4 that make this text instead of varchar(50) alter table llx_don MODIFY COLUMN town varchar(50); From 413e0908fe3a908b8b33b327b0e4f1bfa44b1ce2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 20 Nov 2013 12:55:13 +0100 Subject: [PATCH 086/107] Doxygen --- htdocs/boutique/commande/class/boutiquecommande.class.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/boutique/commande/class/boutiquecommande.class.php b/htdocs/boutique/commande/class/boutiquecommande.class.php index bf1e2fd7fd1..62528c21b70 100644 --- a/htdocs/boutique/commande/class/boutiquecommande.class.php +++ b/htdocs/boutique/commande/class/boutiquecommande.class.php @@ -27,8 +27,7 @@ include_once DOL_DOCUMENT_ROOT.'/boutique/commande/class/boutiquecommande.class. /** - * \class BoutiqueCommande - * \brief Classe permettant la gestion des commandes OSC + * Class to manage orders OSC */ class BoutiqueCommande { From 306a51f6bd71092a1d0b8044369b062fc1180e40 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Wed, 20 Nov 2013 13:54:53 +0100 Subject: [PATCH 087/107] remove useless code (the tag replacement into footer and header is already done by SetVar method) --- htdocs/includes/odtphp/odf.php | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/htdocs/includes/odtphp/odf.php b/htdocs/includes/odtphp/odf.php index 94c69705442..d2cb8e0b6e1 100644 --- a/htdocs/includes/odtphp/odf.php +++ b/htdocs/includes/odtphp/odf.php @@ -128,33 +128,6 @@ class Odf return $this; } - /** - * Assing a template variable - * - * @param string $key name of the variable within the template - * @param string $value replacement value - * @param bool $encode if true, special XML characters are encoded - * @throws OdfException - * @return odf - */ - public function setVarsHeadFooter($key, $value, $encode = true, $charset = 'ISO-8859') - { - $tag = $this->config['DELIMITER_LEFT'] . $key . $this->config['DELIMITER_RIGHT']; - // TODO Warning string may be: - // {aaa} - // instead of {aaa} so we should enhance this function. - //print $key.'-'.$value.'-'.strpos($this->contentXml, $this->config['DELIMITER_LEFT'] . $key . $this->config['DELIMITER_RIGHT']).'
    '; - if (strpos($this->stylesXml, $tag) === false && strpos($this->stylesXml , $tag) === false) { - //if (strpos($this->contentXml, '">'. $key . '') === false) { - throw new OdfException("var $key not found in the document"); - //} - } - $value = $encode ? htmlspecialchars($value) : $value; - $value = ($charset == 'ISO-8859') ? utf8_encode($value) : $value; - $this->vars[$tag] = str_replace("\n", "", $value); - return $this; - } - /** * Evaluating php codes inside the ODT and output the buffer (print, echo) inplace of the code * From f88e9425ec8defa1b46346f9ca4cd8cd8646532d Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Wed, 20 Nov 2013 14:01:43 +0100 Subject: [PATCH 088/107] Remove useless code (the tag replacement into footer and header is already done by SetVar method) --- .../core/modules/project/pdf/doc_generic_project_odt.modules.php | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/core/modules/project/pdf/doc_generic_project_odt.modules.php b/htdocs/core/modules/project/pdf/doc_generic_project_odt.modules.php index bb81a07272a..e8c8076230b 100644 --- a/htdocs/core/modules/project/pdf/doc_generic_project_odt.modules.php +++ b/htdocs/core/modules/project/pdf/doc_generic_project_odt.modules.php @@ -522,7 +522,6 @@ class doc_generic_project_odt extends ModelePDFProjects else // Text { $odfHandler->setVars($key, $value, true, 'UTF-8'); - $odfHandler->setVarsHeadFooter($key, $value, true, 'UTF-8'); } } catch(OdfException $e) From 71484a4e1e05206fd1fa89d65bef312bc717800d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 20 Nov 2013 14:29:50 +0100 Subject: [PATCH 089/107] Fix: Missing hook declaration --- htdocs/fourn/facture/paiement.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index e4c0e27ce47..f625cead27c 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -59,6 +59,8 @@ if ($user->societe_id > 0) } +// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array +$hookmanager->initHooks(array('paymentsupplier')); /* From 040e3eec780e91ac3f7aeaf001823cd214d2a92a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 20 Nov 2013 15:10:54 +0100 Subject: [PATCH 090/107] Update doc --- build/obs/README | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/build/obs/README b/build/obs/README index 56589299b89..e18ecb56a1a 100644 --- a/build/obs/README +++ b/build/obs/README @@ -34,3 +34,10 @@ Enter the Remote URL that should looks like this: http://www.dolibarr.org/files/ Then add into advanded - attributes OBS:Screenshots http://www.dolibarr.org/images/dolibarr_screenshot1.png OBS:QualityCategory Testing + + +# Move project into official directory +- Enter a bug to ask to be a maintener of a category or to add a new one. +For example: https://bugzilla.novell.com/show_bug.cgi?id=848083 +- Once done, go into project, category, subproject and enter a subproject for your application. +- Then go onto project into your home and ask a publish to the category/you project your created. From a26e3375508aa4aca25cf56cba6c3b8732751830 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 20 Nov 2013 23:05:27 +0100 Subject: [PATCH 091/107] Update doc --- build/obs/README | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build/obs/README b/build/obs/README index e18ecb56a1a..5f8f0014d8a 100644 --- a/build/obs/README +++ b/build/obs/README @@ -38,6 +38,8 @@ OBS:QualityCategory Testing # Move project into official directory - Enter a bug to ask to be a maintener of a category or to add a new one. -For example: https://bugzilla.novell.com/show_bug.cgi?id=848083 +For example: https://bugzilla.novell.com/show_bug.cgi?id=848083 to be a maintener of category +https://build.opensuse.org/project/show/Application:ERP - Once done, go into project, category, subproject and enter a subproject for your application. +Fo example: Dolibarr - Then go onto project into your home and ask a publish to the category/you project your created. From 1ef08a88a4561b5d5309c6500e5092add01026e2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 20 Nov 2013 23:10:38 +0100 Subject: [PATCH 092/107] Update packager --- build/makepack-dolibarr.pl | 10 +++++++++- build/makepack-dolibarrmodule.pl | 8 +++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index 906ab3ec5f7..57986f3bb31 100755 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -2,7 +2,15 @@ #---------------------------------------------------------------------------- # \file build/makepack-dolibarr.pl # \brief Dolibarr package builder (tgz, zip, rpm, deb, exe, aps) -# \author (c)2004-2012 Laurent Destailleur +# \author (c)2004-2013 Laurent Destailleur +# +# This is list of constant you can set to have generated packages moved into a specific dir: +#DESTIBETARC='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/lastbuild' +#DESTISTABLE='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/stable' +#DESTIMODULES='/media/HDDATA1_LD/Mes Sites/Web/Admin1/wwwroot/files/modules' +#DESTIDOLIMEDBETARC='/media/HDDATA1_LD/Mes Sites/Web/DoliCloud/dolimed.com/htdocs/files/lastbuild' +#DESTIDOLIMEDMODULES='/media/HDDATA1_LD/Mes Sites/Web/DoliCloud/dolimed.com/htdocs/files/modules' +#DESTIDOLIMEDSTABLE='/media/HDDATA1_LD/Mes Sites/Web/DoliCloud/dolimed.com/htdocs/files/stable' #---------------------------------------------------------------------------- use Cwd; diff --git a/build/makepack-dolibarrmodule.pl b/build/makepack-dolibarrmodule.pl index a4b51e9bf8f..0babf13e0b1 100755 --- a/build/makepack-dolibarrmodule.pl +++ b/build/makepack-dolibarrmodule.pl @@ -2,13 +2,15 @@ #---------------------------------------------------------------------------- # \file build/makepack-dolibarrmodule.pl # \brief Package builder (tgz, zip, rpm, deb, exe) -# \author (c)2005-2006 Laurent Destailleur +# \author (c)2005-2013 Laurent Destailleur #---------------------------------------------------------------------------- use Cwd; +$OWNER="ldestailleur"; +$GROUP="ldestailleur"; -@LISTETARGET=("TGZ"); # Possible packages +@LISTETARGET=("ZIP"); # Possible packages %REQUIREMENTTARGET=( # Tool requirement for each package "TGZ"=>"tar", "ZIP"=>"7z" @@ -272,7 +274,6 @@ foreach my $PROJECT (@PROJECTLIST) { $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/conf/conf*sav*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/custom`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/custom2`; - $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/theme/bureau2crea`; $ret=`rm -fr $BUILDROOT/$PROJECT/test`; $ret=`rm -fr $BUILDROOT/$PROJECT/Thumbs.db $BUILDROOT/$PROJECT/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/*/Thumbs.db`; $ret=`rm -fr $BUILDROOT/$PROJECT/CVS* $BUILDROOT/$PROJECT/*/CVS* $BUILDROOT/$PROJECT/*/*/CVS* $BUILDROOT/$PROJECT/*/*/*/CVS* $BUILDROOT/$PROJECT/*/*/*/*/CVS* $BUILDROOT/$PROJECT/*/*/*/*/*/CVS*`; @@ -323,6 +324,7 @@ foreach my $PROJECT (@PROJECTLIST) { print "Move $FILENAMEZIP.zip to $NEWDESTI/$FILENAMEZIP.zip\n"; $ret=`mv "$BUILDROOT/$FILENAMEZIP.zip" "$NEWDESTI/$FILENAMEZIP.zip"`; + $ret=`chown $OWNER.$GROUP "$NEWDESTI/$FILENAMEZIP.zip"`; next; } From 23f7de0873c10d4b8a7eae6e455179d84089135d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 21 Nov 2013 02:07:13 +0100 Subject: [PATCH 093/107] Fix: [ bug #1094 ] Invoice Text Reminder Conflicts: htdocs/compta/facture.php --- htdocs/compta/facture.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 02a60d4764a..f1423681e4b 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -3674,16 +3674,16 @@ else if ($id > 0 || ! empty($ref)) // By default if $action=='presend' $titreform='SendBillByMail'; $topicmail='SendBillRef'; - $action='send'; $modelmail='facture_send'; if ($action == 'prerelance') // For backward compatibility { $titrefrom='SendReminderBillByMail'; $topicmail='SendReminderBillRef'; - $action='relance'; $modelmail='facture_relance'; + $action='relance'; } + else $action='send'; $ref = dol_sanitizeFileName($object->ref); include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; From e63dcc53431539cc9d4addcb511d12d8ca5c0869 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 21 Nov 2013 02:14:25 +0100 Subject: [PATCH 094/107] Fix: [ bug #1119 ] If no country is selected for a warehouse or thids card, broken IMG is shown --- htdocs/product/stock/fiche.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/product/stock/fiche.php b/htdocs/product/stock/fiche.php index db8dbc6de1b..5a7170d23c3 100644 --- a/htdocs/product/stock/fiche.php +++ b/htdocs/product/stock/fiche.php @@ -270,8 +270,11 @@ else // Country print '
    '; From 0d853cf73d83af2730c24419dfb588785acaa7fe Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 21 Nov 2013 02:49:22 +0100 Subject: [PATCH 095/107] Fix: [ bug #1118 ] Minor problem on print page link --- htdocs/main.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index a8fc47ba413..7d1c9e310de 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1442,8 +1442,9 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a // Link to print main content area if (empty($conf->global->MAIN_PRINT_DISABLELINK) && empty($conf->browser->phone)) { - $qs=$_SERVER["QUERY_STRING"].($_SERVER["QUERY_STRING"]?'&':'').$morequerystring; - $text =''; + $qs=$_SERVER["QUERY_STRING"]; + $qs.=(($qs && $morequerystring)?'&':'').$morequerystring; + $text =''; $text.= img_picto('', 'printer.png', 'class="printer"'); $text.=''; $toprightmenu.=$form->textwithtooltip('',$langs->trans("PrintContentArea"),2,1,$text,'',1); From 00b0031ddfdf7976b11e3ce20531fabb4590ef3e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 21 Nov 2013 16:26:56 +0100 Subject: [PATCH 096/107] Fix: If no permission to edit object, form to change category must be hidden Fix: Adding supplier category was saved into wrong table. --- htdocs/categories/categorie.php | 79 +++++++++++---------- htdocs/categories/class/categorie.class.php | 20 ++++-- 2 files changed, 56 insertions(+), 43 deletions(-) diff --git a/htdocs/categories/categorie.php b/htdocs/categories/categorie.php index 4fef3184c20..6aa063a9b4e 100644 --- a/htdocs/categories/categorie.php +++ b/htdocs/categories/categorie.php @@ -118,7 +118,8 @@ if (empty($reshook)) } if ($type==1 && $user->rights->societe->creer) { - $object = new Societe($db); + require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php'; + $object = new Fournisseur($db); $result = $object->fetch($objectid); $elementtype = 'fournisseur'; } @@ -152,7 +153,7 @@ if (empty($reshook)) setEventMessage($cat->errors,'errors'); } } - + // Add object into a category if ($parent > 0) { @@ -165,7 +166,8 @@ if (empty($reshook)) } if ($type==1 && $user->rights->societe->creer) { - $object = new Societe($db); + require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php'; + $object = new Fournisseur($db); $result = $object->fetch($objectid); $elementtype = 'fournisseur'; } @@ -319,11 +321,11 @@ if ($socid) dol_fiche_end(); - if ($soc->client) formCategory($db,$soc,2,$socid); + if ($soc->client) formCategory($db,$soc,2,$socid,$user->rights->societe->creer); if ($soc->client && $soc->fournisseur) print '

    '; - if ($soc->fournisseur) formCategory($db,$soc,1,$socid); + if ($soc->fournisseur) formCategory($db,$soc,1,$socid,$user->rights->societe->creer); } else if ($id || $ref) { @@ -377,7 +379,7 @@ else if ($id || $ref) dol_fiche_end(); - formCategory($db,$product,0); + formCategory($db,$product,0,($user->rights->produit->creer || $user->rights->service->creer)); } if ($type == 3) @@ -456,7 +458,7 @@ else if ($id || $ref) dol_fiche_end(); - formCategory($db,$member,3); + formCategory($db,$member,3,0,$user->rights->adherent->creer); } if ($type == 4) { @@ -602,7 +604,7 @@ else if ($id || $ref) dol_fiche_end(); - formCategory($db,$object,4); + formCategory($db,$object,4,$user->rights->societe->creer); } } @@ -610,13 +612,14 @@ else if ($id || $ref) /** * Function to output a form to add object into a category * - * @param DoliDb $db Database handler - * @param Object $object Object we want to see categories it can be classified into - * @param int $typeid Type of category (0, 1, 2, 3) - * @param int $socid Id thirdparty + * @param DoliDb $db Database handler + * @param Object $object Object we want to see categories it can be classified into + * @param int $typeid Type of category (0, 1, 2, 3) + * @param int $socid Id thirdparty + * @param string $showclassifyform 1=Add form to 'Classify', 0=Do not show form to 'Classify' * @return int 0 */ -function formCategory($db,$object,$typeid,$socid=0) +function formCategory($db,$object,$typeid,$socid=0,$showclassifyform=1) { global $user,$langs,$form,$bc; @@ -626,33 +629,37 @@ function formCategory($db,$object,$typeid,$socid=0) if ($typeid == 3) $title = $langs->trans("MembersCategoriesShort"); if ($typeid == 4) $title = $langs->trans("ContactCategoriesShort"); - // Form to add record into a category print '
    '; print_fiche_titre($title,'',''); - print ''; - print ''; - print ''; - print ''; - print ''; - print '
    '.$langs->trans("Ref").'
    '.$langs->trans("Ref").'
    '.$langs->trans("Label").'
    '.$langs->trans('Country').''; - $img=picto_from_langcode($object->country_code); - print ($img?$img.' ':''); + if (! empty($object->country_code)) + { + $img=picto_from_langcode($object->country_code); + print ($img?$img.' ':''); + } print $object->country; print '
    '; - print ''; - if ($user->rights->categorie->creer) + + // Form to add record into a category + if ($showclassifyform) { - print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print '
    '; - print $langs->trans("ClassifyInCategory").'  '; - print $form->select_all_categories($typeid,'auto'); - print ''; - print ''; - print 'id.'&type='.$typeid).'">'; - print $langs->trans("CreateCat").' '; - print img_picto($langs->trans("Create"),'filenew'); - print ""; - print '
    '; + print ''; + if ($user->rights->categorie->creer) + { + print ''; + } + print ''; + print '
    '; + print $langs->trans("ClassifyInCategory").'  '; + print $form->select_all_categories($typeid,'auto'); + print ''; + print ''; + print 'id.'&type='.$typeid).'">'; + print $langs->trans("CreateCat").' '; + print img_picto($langs->trans("Create"),'filenew'); + print ""; + print '
    '; + print ''; + print '
    '; } - print '
    '; - print ''; - print '
    '; $c = new Categorie($db); diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index b6d5c622e9c..4ab19b7f915 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -386,7 +386,7 @@ class Categorie * Link an object to the category * * @param Object $obj Object to link to category - * @param string $type Type of category (member, supplier, product, customer, contact) + * @param string $type Type of category ('member', 'customer', 'supplier', 'product', 'contact') * @return int 1 : OK, -1 : erreur SQL, -2 : id not defined, -3 : Already linked */ function add_type($obj,$type) @@ -397,11 +397,14 @@ class Categorie if ($this->id == -1) return -2; - if ($type == 'company') $type='societe'; - if ($type == 'fournisseur') $type='societe'; + // For backward compatibility + if ($type == 'company') $type='societe'; + if ($type == 'customer') $type='societe'; + if ($type == 'supplier') $type='fournisseur'; $column_name=$type; if ($type=='contact') $column_name='socpeople'; + if ($type=='fournisseur') $column_name='societe'; $sql = "INSERT INTO ".MAIN_DB_PREFIX."categorie_".$type." (fk_categorie, fk_".$column_name.")"; $sql .= " VALUES (".$this->id.", ".$obj->id.")"; @@ -479,7 +482,7 @@ class Categorie * Delete object from category * * @param Object $obj Object - * @param string $type Type + * @param string $type Type of category ('member', 'customer', 'supplier', 'product', 'contact') * @return int 1 if OK, -1 if KO */ function del_type($obj,$type) @@ -488,12 +491,15 @@ class Categorie $error=0; - if ($type == 'company') $type='societe'; - if ($type == 'fournisseur') $type='societe'; + // For backward compatibility + if ($type == 'company') $type='societe'; + if ($type == 'customer') $type='societe'; + if ($type == 'supplier') $type='fournisseur'; $column_name=$type; if ($type=='contact') $column_name='socpeople'; - + if ($type=='fournisseur') $column_name='societe'; + $sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_".$type; $sql .= " WHERE fk_categorie = ".$this->id; $sql .= " AND fk_".$column_name." = ".$obj->id; From 29e029161f77c92bb488fa00bad45004b7c2a3cb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 21 Nov 2013 18:41:06 +0100 Subject: [PATCH 097/107] Fix: Restore translation lost because entry was not set into en_US lang. --- htdocs/langs/en_US/main.lang | 1 + htdocs/langs/fr_FR/main.lang | 1 + htdocs/langs/fr_FR/orders.lang | 1 - 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 4f5485eb226..6876d0c6b2b 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -656,6 +656,7 @@ Deductible=Deductible from=from toward=toward Access=Access +SetDemandReason=Set source # Week day Monday=Monday diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang index dcb72b22cad..f642fe4c9b5 100644 --- a/htdocs/langs/fr_FR/main.lang +++ b/htdocs/langs/fr_FR/main.lang @@ -654,6 +654,7 @@ Deductible=Déductible from=de toward=vers Access=Accès +SetDemandReason=Définir l'origine # Week day Monday=Lundi diff --git a/htdocs/langs/fr_FR/orders.lang b/htdocs/langs/fr_FR/orders.lang index 045b6223038..f0da79c799d 100644 --- a/htdocs/langs/fr_FR/orders.lang +++ b/htdocs/langs/fr_FR/orders.lang @@ -144,7 +144,6 @@ OrderSource5=Commercial OrderSource6=Magasin QtyOrdered=Qté commandée AddDeliveryCostLine=Ajouter une ligne de frais port indiquant le poids de la commande -SetDemandReason=Définir l'origine de la commande # Document models PDFEinsteinDescription=Modèle de commande complet (logo...) From 8496b1787cebae9f6e7780e96364a60e8c452a4c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 23 Nov 2013 14:46:46 +0100 Subject: [PATCH 098/107] Color too agressive --- htdocs/theme/eldy/style.css.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index ea44564b8d5..bfcb428c659 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -1979,14 +1979,14 @@ div.ok { } div.warning { - color: #504020; + color: #302020; padding: 0.3em 0.3em 0.3em 0.3em; margin: 0.5em 0em 0.5em 0em; border: 1px solid #e0d0b0; -moz-border-radius:6px; -webkit-border-radius: 6px; border-radius: 6px; - background: #FFEF9A; + background: #EFDF9A; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); } From 64031f92fab7f3c37ab5a4494d9971a70628557c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 22 Nov 2013 11:45:42 +0100 Subject: [PATCH 099/107] Fix: Problem with W3C and wrapping of some title lines. --- htdocs/core/lib/functions.lib.php | 4 ++-- htdocs/product/liste.php | 17 +++++++++++------ htdocs/theme/eldy/style.css.php | 3 --- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 220721d6f5e..dead4b4beb4 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -2395,8 +2395,8 @@ function getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $m // If field is used as sort criteria we use a specific class // Example if (sortfield,field)=("nom","xxx.nom") or (sortfield,field)=("nom","nom") - if ($field && ($sortfield == $field || $sortfield == preg_replace("/^[^\.]+\./","",$field))) $out.= '<'.$tag.' class="liste_titre_sel" '. $moreattrib.'>'; - else $out.= '<'.$tag.' class="liste_titre" '. $moreattrib.'>'; + if ($field && ($sortfield == $field || $sortfield == preg_replace("/^[^\.]+\./","",$field))) $out.= '<'.$tag.' class="liste_titre_sel'.($field?' nowrap':'').'" '. $moreattrib.'>'; + else $out.= '<'.$tag.' class="liste_titre'.($field?' nowrap':'').'" '. $moreattrib.'>'; if (! empty($conf->dol_optimize_smallscreen) && empty($thead) && $field) // If this is a sort field { diff --git a/htdocs/product/liste.php b/htdocs/product/liste.php index efe4799bdee..30ed2fd95b1 100644 --- a/htdocs/product/liste.php +++ b/htdocs/product/liste.php @@ -271,6 +271,13 @@ else // Filter on categories $moreforfilter=''; + $colspan=6; + if (! empty($conf->barcode->enabled)) $colspan++; + if (! empty($conf->service->enabled) && $type != 0) $colspan++; + if (empty($conf->global->PRODUIT_MULTIPRICES)) $colspan++; + if ($user->rights->fournisseur->lire) $colspan++; + if (! empty($conf->stock->enabled) && $user->rights->stock->lire && $type != 1) $colspan+=2; + if (! empty($conf->categorie->enabled)) { $moreforfilter.=$langs->trans('Categories'). ': '; @@ -280,22 +287,20 @@ else if ($moreforfilter) { print ''; - print ''; + print ''; print $moreforfilter; print ''; } // Lignes des titres - print ""; + print ''; print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.ref",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Label"), $_SERVER["PHP_SELF"], "p.label",$param,"","",$sortfield,$sortorder); if (! empty($conf->barcode->enabled)) print_liste_field_titre($langs->trans("BarCode"), $_SERVER["PHP_SELF"], "p.barcode",$param,'','',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateModification"), $_SERVER["PHP_SELF"], "p.tms",$param,"",'align="center"',$sortfield,$sortorder); if (! empty($conf->service->enabled) && $type != 0) print_liste_field_titre($langs->trans("Duration"), $_SERVER["PHP_SELF"], "p.duration",$param,"",'align="center"',$sortfield,$sortorder); if (empty($conf->global->PRODUIT_MULTIPRICES)) print_liste_field_titre($langs->trans("SellingPrice"), $_SERVER["PHP_SELF"], "p.price",$param,"",'align="right"',$sortfield,$sortorder); - if ($user->rights->produit->creer) { - print ''.$langs->trans("BuyingPriceMinShort").''; - } + if ($user->rights->fournisseur->lire) print ''.$langs->trans("BuyingPriceMinShort").''; if (! empty($conf->stock->enabled) && $user->rights->stock->lire && $type != 1) print ''.$langs->trans("DesiredStock").''; if (! empty($conf->stock->enabled) && $user->rights->stock->lire && $type != 1) print ''.$langs->trans("PhysicalStock").''; print_liste_field_titre($langs->trans("Sell"), $_SERVER["PHP_SELF"], "p.tosell",$param,"",'align="center"',$sortfield,$sortorder); @@ -338,7 +343,7 @@ else } // Minimum buying Price - if ($user->rights->produit->creer) { + if ($user->rights->fournisseur->lire) { print ''; print ' '; print ''; diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index bfcb428c659..0abcb79f4ec 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -1750,7 +1750,6 @@ div.liste_titre, tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.list color: #; font-family: ; border-bottom: 1px solid #FDFFFF; - white-space: ; text-align: ; } tr.liste_titre th, th.liste_titre, tr.liste_titre td, td.liste_titre, form.liste_titre div, div.liste_titre @@ -1758,7 +1757,6 @@ tr.liste_titre th, th.liste_titre, tr.liste_titre td, td.liste_titre, form.liste font-family: ; font-weight: bold; border-bottom: 1px solid #FDFFFF; - white-space: ; text-shadow: 1px 0px 1px #; vertical-align: middle; } @@ -1774,7 +1772,6 @@ tr.liste_titre_sel th, th.liste_titre_sel, tr.liste_titre_sel td, td.liste_titre font-family: ; font-weight: normal; border-bottom: 1px solid #FDFFFF; - white-space: ; text-decoration: underline; text-shadow: 1px 0px 1px #; } From 6ffdc039a23e3286d71d351eb7599305b7b7a321 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 22 Nov 2013 13:18:01 +0100 Subject: [PATCH 100/107] Fix: When option is not set, it must not appears as set. --- htdocs/admin/company.php | 11 ++++++----- htdocs/societe/class/societe.class.php | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index 5580249c141..ad77a9ba8c7 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -561,9 +561,9 @@ if ($action == 'edit' || $action == 'updateedit') print ' '; print "\n"; $var=true; - $var=!$var; - print ""; + // Note: When option is not set, it must not appears as set on on, because there is no default value for this option + print ""; print ''; print ""; print ""; @@ -595,7 +595,8 @@ if ($action == 'edit' || $action == 'updateedit') $var=true; $var=!$var; - print ""; + // Note: When option is not set, it must not appears as set on on, because there is no default value for this option + print ""; print '
    ".$langs->transcountry("LocalTax1IsUsedDesc",$mysoc->country_code)."
    '; print ""; print ""; @@ -941,7 +942,7 @@ else $var=true; $var=!$var; - print ""; + print ""; print '
    ".$langs->transcountry("LocalTax2IsUsedDesc",$mysoc->country_code)."
    '; print ""; print ""; @@ -974,7 +975,7 @@ else $var=true; $var=!$var; - print ""; + print ""; print '
    ".$langs->transcountry("LocalTax1IsUsedDesc",$mysoc->country_code)."
    '; print ""; print ""; diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 66d40e480ba..4e50a081079 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -2552,8 +2552,8 @@ class Societe extends CommonObject $this->tva_assuj=((isset($conf->global->FACTURE_TVAOPTION) && $conf->global->FACTURE_TVAOPTION=='franchise')?0:1); // Define if company use local taxes - $this->localtax1_assuj=((isset($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')?1:0); - $this->localtax2_assuj=((isset($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')?1:0); + $this->localtax1_assuj=((isset($conf->global->FACTURE_LOCAL_TAX1_OPTION) && ($conf->global->FACTURE_LOCAL_TAX1_OPTION=='1' || $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on'))?1:0); + $this->localtax2_assuj=((isset($conf->global->FACTURE_LOCAL_TAX2_OPTION) && ($conf->global->FACTURE_LOCAL_TAX2_OPTION=='1' || $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on'))?1:0); } /** From 628e8bea83c3a3c1d87c49a72f44b1315c7fa1ce Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 23 Nov 2013 15:22:27 +0100 Subject: [PATCH 101/107] Fix: Missing error message when files were too large. --- htdocs/adherents/fiche.php | 22 +++++++++++++++---- htdocs/societe/soc.php | 45 +++++++++++++++++++++++++++++--------- 2 files changed, 53 insertions(+), 14 deletions(-) diff --git a/htdocs/adherents/fiche.php b/htdocs/adherents/fiche.php index d019e4004d8..399cc712297 100644 --- a/htdocs/adherents/fiche.php +++ b/htdocs/adherents/fiche.php @@ -321,6 +321,7 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer) $result=$object->update($user,0,$nosyncuser,$nosyncuserpass); if ($result >= 0 && ! count($object->errors)) { + // Logo/Photo save $dir= $conf->adherent->dir_output . '/' . get_exdir($object->id,2,0,1).'/photos'; $file_OK = is_uploaded_file($_FILES['photo']['tmp_name']); if ($file_OK) @@ -361,8 +362,21 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer) $errmsgs[] = "ErrorBadImageFormat"; } } + else + { + switch($_FILES['photo']['error']) + { + case 1: //uploaded file exceeds the upload_max_filesize directive in php.ini + case 2: //uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the html form + $errors[] = "ErrorFileSizeTooLarge"; + break; + case 3: //uploaded file was only partially uploaded + $errors[] = "ErrorFilePartiallyUploaded"; + break; + } + } - $rowid=$object->id; + $rowid=$object->id; $action=''; if (! empty($backtopage)) @@ -848,11 +862,11 @@ else print ''; // Skype - if (! empty($conf->skype->enabled)) + if (! empty($conf->skype->enabled)) { print ''; } - + // Birthday print "'; } - + // Birthday print "'; } - + // Phone / Fax print ''; print ''; @@ -1273,13 +1298,13 @@ else // EMail / Web print ''; print ''; - + // Skype if (! empty($conf->skype->enabled)) { print ''; } - + // Phone / Fax print ''; print ''; @@ -1587,7 +1612,7 @@ else print ''; - + // Skype if (! empty($conf->skype->enabled)) { From 8e313ef32d890160e7e978dab96beb6b680e416f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 23 Nov 2013 16:17:20 +0100 Subject: [PATCH 102/107] Fix: Can add ban record but was not possible to delete --- htdocs/core/lib/functions.lib.php | 2 +- htdocs/langs/en_US/banks.lang | 2 + htdocs/langs/fr_FR/banks.lang | 2 + .../class/companybankaccount.class.php | 40 ++++++++- htdocs/societe/rib.php | 84 +++++++++++++++---- 5 files changed, 108 insertions(+), 22 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index dead4b4beb4..8da52e301e6 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -2358,7 +2358,7 @@ function dol_print_error_email($prefixcode) * @param string $field Field to use for new sorting * @param string $begin ("" by defaut) * @param string $moreparam Add more parameters on sort url links ("" by default) - * @param string $td Options of attribute td ("" by defaut) + * @param string $td Options of attribute td ("" by defaut, example: 'align="center"') * @param string $sortfield Current field used to sort * @param string $sortorder Current sort order * @return void diff --git a/htdocs/langs/en_US/banks.lang b/htdocs/langs/en_US/banks.lang index 3503ff11e62..e4de38e621e 100644 --- a/htdocs/langs/en_US/banks.lang +++ b/htdocs/langs/en_US/banks.lang @@ -154,3 +154,5 @@ DefaultRIB=Default BAN AllRIB=All BAN LabelRIB=BAN Label NoBANRecord=No BAN record +DeleteARib=Delete BAN record +ConfirmDeleteRib=Are you sure you want to delete this BAN record ? diff --git a/htdocs/langs/fr_FR/banks.lang b/htdocs/langs/fr_FR/banks.lang index 29440edd862..4d44e9619eb 100644 --- a/htdocs/langs/fr_FR/banks.lang +++ b/htdocs/langs/fr_FR/banks.lang @@ -154,3 +154,5 @@ DefaultRIB=RIB par défaut AllRIB=Tous les RIB LabelRIB=Nom du RIB NoBANRecord=Aucun RIB enregistré +DeleteARib=Supprimé RIB enregistré +ConfirmDeleteRib=Etes vous sur de vouloir supprimé ce RIB ? diff --git a/htdocs/societe/class/companybankaccount.class.php b/htdocs/societe/class/companybankaccount.class.php index 8b8e3b382c7..fe1726ab345 100644 --- a/htdocs/societe/class/companybankaccount.class.php +++ b/htdocs/societe/class/companybankaccount.class.php @@ -77,13 +77,23 @@ class CompanyBankAccount extends Account { $now=dol_now(); - $sql = "INSERT INTO ".MAIN_DB_PREFIX."societe_rib (fk_soc, datec) values ($this->socid, '".$this->db->idate($now)."')"; + // Correct default_rib to be sure to have always one default + $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe_rib where fk_soc = ".$this->socid." AND default_rib = 1"; + $result = $this->db->query($sql); + if ($result) + { + $numrows=$this->db->num_rows($result); + if ($this->default_rib && $numrows > 0) $this->default_rib = 0; + if (empty($this->default_rib) && $numrows == 0) $this->default_rib = 1; + } + + $sql = "INSERT INTO ".MAIN_DB_PREFIX."societe_rib (fk_soc, datec)"; + $sql.= " VALUES (".$this->socid.", '".$this->db->idate($now)."')"; $resql=$this->db->query($sql); if ($resql) { if ($this->db->affected_rows($resql)) { - $this->default_rib = 1; $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."societe_rib"); return 1; } @@ -120,7 +130,7 @@ class CompanyBankAccount extends Account // return 0; // } - if (!$this->id) { + if (! $this->id) { $this->create(); } @@ -204,6 +214,30 @@ class CompanyBankAccount extends Account } } + /** + * Delete a rib from database + * + * @param User $user User deleting + * @return int <0 if KO, >0 if OK + */ + function delete($user) + { + global $conf; + + $sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_rib"; + $sql.= " WHERE rowid = ".$this->id; + + dol_syslog(get_class($this)."::delete sql=".$sql); + $result = $this->db->query($sql); + if ($result) { + return 1; + } + else { + dol_print_error($this->db); + return -1; + } + } + /** * Return RIB * diff --git a/htdocs/societe/rib.php b/htdocs/societe/rib.php index b3432d105a8..819c3b6986c 100644 --- a/htdocs/societe/rib.php +++ b/htdocs/societe/rib.php @@ -31,11 +31,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/companybankaccount.class.php'; $langs->load("companies"); +$langs->load("commercial"); $langs->load("banks"); $langs->load("bills"); // Security check -$socid = isset($_GET["socid"])?$_GET["socid"]:''; +$socid = GETPOST("socid"); if ($user->societe_id) $socid=$user->societe_id; $result = restrictedArea($user, 'societe','',''); @@ -43,17 +44,21 @@ $soc = new Societe($db); $soc->id = $_GET["socid"]; $soc->fetch($_GET["socid"]); +$id=GETPOST("id","int"); +$ribid=GETPOST("ribid","int"); +$action=GETPOST("action"); + /* * Actions */ -if ($_POST["action"] == 'update' && ! $_POST["cancel"]) +if ($action == 'update' && ! $_POST["cancel"]) { // Modification $account = new CompanyBankAccount($db); - $account->fetch($_POST["id"]); + $account->fetch($id); $account->socid = $soc->id; @@ -85,7 +90,7 @@ if ($_POST["action"] == 'update' && ! $_POST["cancel"]) } } -if ($_POST["action"] == 'add' && ! $_POST["cancel"]) +if ($action == 'add' && ! $_POST["cancel"]) { // Ajout $account = new CompanyBankAccount($db); @@ -106,7 +111,7 @@ if ($_POST["action"] == 'add' && ! $_POST["cancel"]) $account->proprio = $_POST["proprio"]; $account->owner_address = $_POST["owner_address"]; - $result = $account->update($user); + $result = $account->update($user); // TODO Use create and include update into create method if (! $result) { $message=$account->error; @@ -120,10 +125,10 @@ if ($_POST["action"] == 'add' && ! $_POST["cancel"]) } } -if ($_GET['action'] == 'setasdefault') +if ($action == 'setasdefault') { $account = new CompanyBankAccount($db); - $res = $account->setAsDefault($_GET['ribid']); + $res = $account->setAsDefault(GETPOST('ribid','int')); if ($res) { $url=DOL_URL_ROOT.'/societe/rib.php?socid='.$soc->id; header('Location: '.$url); @@ -133,10 +138,35 @@ if ($_GET['action'] == 'setasdefault') } } +if ($action == 'confirm_delete' && $_GET['confirm'] == 'yes') +{ + $account = new CompanyBankAccount($db); + if ($account->fetch($ribid?$ribid:$id)) + { + $result = $account->delete($user); + if ($result > 0) + { + $url = $_SERVER['PHP_SELF']."?socid=".$soc->id; + header('Location: '.$url); + exit; + } + else + { + $message = $account->error; + } + } + else + { + $message = $account->error; + } +} + /* * View */ +$form = new Form($db); + llxHeader(); $head=societe_prepare_head2($soc); @@ -144,10 +174,10 @@ $head=societe_prepare_head2($soc); dol_fiche_head($head, 'rib', $langs->trans("ThirdParty"),0,'company'); $account = new CompanyBankAccount($db); -if (!$_GET['id']) +if (! $id) $account->fetch(0,$soc->id); else - $account->fetch($_GET['id']); + $account->fetch($id); if (empty($account->socid)) $account->socid=$soc->id; @@ -158,10 +188,17 @@ if (empty($account->socid)) $account->socid=$soc->id; /* */ /* ************************************************************************** */ -if ($_GET["socid"] && $_GET["action"] != 'edit' && $_GET["action"] != "create") +if ($socid && $action != 'edit' && $action != "create") { + // Confirm delete third party + if ($action == 'delete') + { + print $form->formconfirm($_SERVER["PHP_SELF"]."?socid=".$soc->id."&ribid=".($ribid?$ribid:$id), $langs->trans("DeleteARib"), $langs->trans("ConfirmDeleteRib", $account->getRibLabel()), "confirm_delete", '', 0, 1); + } + print_titre($langs->trans("DefaultRIB")); - print '
    ".$langs->transcountry("LocalTax2IsUsedDesc",$mysoc->country_code)."
    '.$langs->trans("PhoneMobile").'
    '.$langs->trans("Skype").'
    ".$langs->trans("Birthday")."\n"; $form->select_date(($object->naiss ? $object->naiss : -1),'naiss','','',1,'formsoc'); @@ -1093,7 +1107,7 @@ else if (! empty($conf->skype->enabled)) { print '
    '.$langs->trans("Skype").'skype).'">
    ".$langs->trans("Birthday")."\n"; $form->select_date(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc'); diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 07610bb88ba..9d5a707aac1 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -4,10 +4,9 @@ * Copyright (C) 2004-2013 Laurent Destailleur * Copyright (C) 2005 Eric Seigne * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2008 Patrick Raguin + * Copyright (C) 2008 Patrick Raguin * Copyright (C) 2010-2013 Juanjo Menent - * Copyright (C) 2011-2013 Alexandre Spangaro - * + * Copyright (C) 2011-2013 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 @@ -280,7 +279,7 @@ if (empty($reshook)) } } - // Gestion du logo de la société + // Logo/Photo save $dir = $conf->societe->multidir_output[$conf->entity]."/".$object->id."/logos/"; $file_OK = is_uploaded_file($_FILES['photo']['tmp_name']); if ($file_OK) @@ -311,6 +310,19 @@ if (empty($reshook)) } } } + else + { + switch($_FILES['photo']['error']) + { + case 1: //uploaded file exceeds the upload_max_filesize directive in php.ini + case 2: //uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the html form + $errors[] = "ErrorFileSizeTooLarge"; + break; + case 3: //uploaded file was only partially uploaded + $errors[] = "ErrorFilePartiallyUploaded"; + break; + } + } // Gestion du logo de la société } else @@ -354,7 +366,7 @@ if (empty($reshook)) $error = $object->error; $errors = $object->errors; } - // Gestion du logo de la société + // Logo/Photo save $dir = $conf->societe->multidir_output[$object->entity]."/".$object->id."/logos"; $file_OK = is_uploaded_file($_FILES['photo']['tmp_name']); if ($file_OK) @@ -393,10 +405,23 @@ if (empty($reshook)) } } else - { + { $errors[] = "ErrorBadImageFormat"; } } + else + { + switch($_FILES['photo']['error']) + { + case 1: //uploaded file exceeds the upload_max_filesize directive in php.ini + case 2: //uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the html form + $errors[] = "ErrorFileSizeTooLarge"; + break; + case 3: //uploaded file was only partially uploaded + $errors[] = "ErrorFilePartiallyUploaded"; + break; + } + } // Gestion du logo de la société @@ -855,7 +880,7 @@ else { print '
    '.$langs->trans('Skype').'
    '.$langs->trans('Phone').''.$langs->trans('Fax').'
    '.$langs->trans('EMail').(! empty($conf->global->SOCIETE_MAIL_REQUIRED)?'*':'').'
    '.$langs->trans('Web').'
    '.$langs->trans('Skype').'
    '.$langs->trans('Phone').''.$langs->trans('Fax').'
    '.$langs->trans('Web').''; print dol_print_url($object->url); print '
    '; + + print '
    '; print ''; print ''; @@ -236,11 +273,12 @@ if ($_GET["socid"] && $_GET["action"] != 'edit' && $_GET["action"] != "create") print_liste_field_titre($langs->trans("LabelRIB")); print_liste_field_titre($langs->trans("Bank")); print_liste_field_titre($langs->trans("RIB")); - print_liste_field_titre($langs->trans("DefaultRIB")); + print_liste_field_titre($langs->trans("DefaultRIB"), '', '', '', '', 'align="center"'); print ''; print ''; - foreach ($rib_list as $rib) { + foreach ($rib_list as $rib) + { print ""; print ''; print ''; @@ -248,16 +286,26 @@ if ($_GET["socid"] && $_GET["action"] != 'edit' && $_GET["action"] != "create") print ''; print ''; print ''; $var = !$var; From aa3c16b6af1909ad729ddd6d50282ff268521889 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 23 Nov 2013 16:34:08 +0100 Subject: [PATCH 103/107] Fix: chars were lost by function --- htdocs/core/lib/xcal.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/xcal.lib.php b/htdocs/core/lib/xcal.lib.php index 9badeae5290..4483e9540e5 100644 --- a/htdocs/core/lib/xcal.lib.php +++ b/htdocs/core/lib/xcal.lib.php @@ -484,7 +484,7 @@ function quotedPrintEncode($str,$forcal=0) { $newpara = ''; - $strlength=dol_strlen($line); + $strlength=strlen($line); // Do not use dol_strlen here, we need number of bytes for ($j = 0; $j <= ($strlength - 1); $j++) { $char = substr($line, $j, 1); @@ -493,7 +493,7 @@ function quotedPrintEncode($str,$forcal=0) if ( $ascii < 32 || $ascii == 61 || $ascii > 126 ) $char = '=' . strtoupper(sprintf("%02X", $ascii)); - if ((dol_strlen($newpara) + dol_strlen($char)) >= 76 ) + if ((strlen($newpara) + strlen($char)) >= 76 ) // Do not use dol_strlen here, we need number of bytes { $out .= $newpara . '=' . "\r\n"; // CRLF if ($forcal) $out .= " "; // + Space for cal From e45406694bad98a794542606027396957e780354 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 23 Nov 2013 19:28:41 +0100 Subject: [PATCH 104/107] Fix: no filter is value is '' --- htdocs/comm/action/class/actioncomm.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 33057e96eb8..b10bb5f90a3 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -887,7 +887,7 @@ class ActionComm extends CommonObject $sql.= " AND a.entity = ".$conf->entity; foreach ($filters as $key => $value) { - if ($key == 'notolderthan') $sql.=" AND a.datep >= '".$this->db->idate($now-($value*24*60*60))."'"; + if ($key == 'notolderthan' && $value != '') $sql.=" AND a.datep >= '".$this->db->idate($now-($value*24*60*60))."'"; if ($key == 'year') $sql.=" AND a.datep BETWEEN '".$this->db->idate(dol_get_first_day($value,1))."' AND '".$this->db->idate(dol_get_last_day($value,12))."'"; if ($key == 'id') $sql.=" AND a.id=".(is_numeric($value)?$value:0); if ($key == 'idfrom') $sql.=" AND a.id >= ".(is_numeric($value)?$value:0); From 1f7e6a42c2f6ea58680488bde806252a28935a84 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sun, 24 Nov 2013 11:33:36 +0100 Subject: [PATCH 105/107] add a Social contributions type and fix some language stuff --- htdocs/install/mysql/migration/2.1.0-2.2.0.sql | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/htdocs/install/mysql/migration/2.1.0-2.2.0.sql b/htdocs/install/mysql/migration/2.1.0-2.2.0.sql index 070682d3c50..cc3988f8a42 100644 --- a/htdocs/install/mysql/migration/2.1.0-2.2.0.sql +++ b/htdocs/install/mysql/migration/2.1.0-2.2.0.sql @@ -71,12 +71,13 @@ update llx_bank set dateo = datec where datev = '1970-01-01 00:00:00' and rappro alter table llx_c_chargesociales add column actioncompta varchar(12) NOT NULL; insert into llx_c_chargesociales (id, libelle, deductible, active, actioncompta) values ( 1, 'Allocations familiales', 1,1,'TAXFAM'); -insert into llx_c_chargesociales (id, libelle, deductible, active, actioncompta) values ( 2, 'GSG Deductible', 1,1,'TAXCSGD'); -insert into llx_c_chargesociales (id, libelle, deductible, active, actioncompta) values ( 3, 'GSG/CRDS NON Deductible',0,1,'TAXCSGND'); -insert into llx_c_chargesociales (id, libelle, deductible, active, actioncompta) values (10, 'Taxe apprenttissage', 0,1,'TAXAPP'); +insert into llx_c_chargesociales (id, libelle, deductible, active, actioncompta) values ( 2, 'GSG Déductible', 1,1,'TAXCSGD'); +insert into llx_c_chargesociales (id, libelle, deductible, active, actioncompta) values ( 3, 'GSG/CRDS NON Déductible',0,1,'TAXCSGND'); +insert into llx_c_chargesociales (id, libelle, deductible, active, actioncompta) values (10, 'Taxe apprentissage', 0,1,'TAXAPP'); insert into llx_c_chargesociales (id, libelle, deductible, active, actioncompta) values (11, 'Taxe professionnelle', 0,1,'TAXPRO'); +insert into llx_c_chargesociales (id, libelle, deductible, active, actioncompta) values (12, 'Contribution à la formation professionnelle', 1,1,'TAXOPCA'); insert into llx_c_chargesociales (id, libelle, deductible, active, actioncompta) values (20, 'Impots locaux/fonciers', 0,1,'TAXFON'); -insert into llx_c_chargesociales (id, libelle, deductible, active, actioncompta) values (30, 'Assurance Sante (SECU-URSSAF)', 0,1,'TAXSECU'); +insert into llx_c_chargesociales (id, libelle, deductible, active, actioncompta) values (30, 'Assurance Santé (SECU-URSSAF)', 0,1,'TAXSECU'); insert into llx_c_chargesociales (id, libelle, deductible, active, actioncompta) values (40, 'Mutuelle', 0,1,'TAXMUT'); insert into llx_c_chargesociales (id, libelle, deductible, active, actioncompta) values (50, 'Assurance vieillesse (CNAV)', 0,1,'TAXRET'); insert into llx_c_chargesociales (id, libelle, deductible, active, actioncompta) values (60, 'Assurance Chomage (ASSEDIC)', 0,1,'TAXCHOM'); From b75137d4ffccafcd6b53943a0183552ed4004f3e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 24 Nov 2013 13:02:20 +0100 Subject: [PATCH 106/107] Fix files that should not mix tab and spaces indent. --- build/rpm/dolibarr_fedora.spec | 90 ++++++------ build/rpm/dolibarr_generic.spec | 240 +++++++++++++++---------------- build/rpm/dolibarr_mandriva.spec | 108 +++++++------- build/rpm/dolibarr_opensuse.spec | 110 +++++++------- dev/fixnotabfiles.sh | 26 ++++ 5 files changed, 300 insertions(+), 274 deletions(-) create mode 100755 dev/fixnotabfiles.sh diff --git a/build/rpm/dolibarr_fedora.spec b/build/rpm/dolibarr_fedora.spec index 4d6ba6a078d..b0d24f6d6d6 100755 --- a/build/rpm/dolibarr_fedora.spec +++ b/build/rpm/dolibarr_fedora.spec @@ -117,9 +117,9 @@ do lang2=`expr substr $lang 4 2 | tr "[:upper:]" "[:lower:]"`; echo "%dir %{_datadir}/%{name}/htdocs/langs/${lang}" >> %{name}.lang if [ "$lang1" = "$lang2" ] ; then - echo "%lang(${lang1}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang" + echo "%lang(${lang1}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang" else - echo "%lang(${lang}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang" + echo "%lang(${lang}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang" fi done >>%{name}.lang @@ -238,20 +238,20 @@ echo Create document directory $docdir export config=%{_sysconfdir}/dolibarr/conf.php if [ -s $config ] && grep -q "File generated by" $config then - # File already exist. We add params not found. - echo Add new params to overwrite path to use shared libraries/fonts - grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "" >> $config - grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "" >> $config - #grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "" >> $config - grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "" >> $config - grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "" >> $config - #grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "" >> $config - #grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "" >> $config - grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "" >> $config - grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "" >> $config - grep -q -c "dolibarr_js_JQUERY_UI" $config || [ ! -d "/usr/share/javascript/jquery-ui" ] || echo "" >> $config - grep -q -c "dolibarr_js_JQUERY_FLOT" $config || [ ! -d "/usr/share/javascript/flot" ] || echo "" >> $config - grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "" >> $config + # File already exist. We add params not found. + echo Add new params to overwrite path to use shared libraries/fonts + grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "" >> $config + grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "" >> $config + #grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "" >> $config + grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "" >> $config + grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "" >> $config + #grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "" >> $config + #grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "" >> $config + grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "" >> $config + grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "" >> $config + grep -q -c "dolibarr_js_JQUERY_UI" $config || [ ! -d "/usr/share/javascript/jquery-ui" ] || echo "" >> $config + grep -q -c "dolibarr_js_JQUERY_FLOT" $config || [ ! -d "/usr/share/javascript/flot" ] || echo "" >> $config + grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "" >> $config fi # Create config for SE Linux @@ -264,13 +264,13 @@ restorecon -R -v /var/lib/dolibarr # Create a config link dolibarr.conf if [ ! -L $apachelink ]; then - apachelinkdir=`dirname $apachelink` - if [ -d $apachelinkdir ]; then - echo Create dolibarr web server config link from %{_sysconfdir}/dolibarr/apache.conf to $apachelink - ln -fs %{_sysconfdir}/dolibarr/apache.conf $apachelink - else - echo Do not create link $apachelink - web server conf dir $apachelinkdir not found. web server package may not be installed - fi + apachelinkdir=`dirname $apachelink` + if [ -d $apachelinkdir ]; then + echo Create dolibarr web server config link from %{_sysconfdir}/dolibarr/apache.conf to $apachelink + ln -fs %{_sysconfdir}/dolibarr/apache.conf $apachelink + else + echo Do not create link $apachelink - web server conf dir $apachelinkdir not found. web server package may not be installed + fi fi echo Set permission to $apacheuser:$apachegroup on /var/lib/dolibarr @@ -302,30 +302,30 @@ echo if [ "x$1" = "x0" ] ; then - # Remove - echo "Removed package" + # Remove + echo "Removed package" - # Define vars - export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf" - - # Remove apache link - if [ -L $apachelink ] ; - then - echo "Delete apache config link for Dolibarr ($apachelink)" - %{__rm} -f $apachelink - status=purge - fi - - # Restart web servers if required - if [ "x$status" = "xpurge" ] ; - then - # Restart web server - echo Restart web server - /sbin/service httpd restart - fi + # Define vars + export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf" + + # Remove apache link + if [ -L $apachelink ] ; + then + echo "Delete apache config link for Dolibarr ($apachelink)" + %{__rm} -f $apachelink + status=purge + fi + + # Restart web servers if required + if [ "x$status" = "xpurge" ] ; + then + # Restart web server + echo Restart web server + /sbin/service httpd restart + fi else - # Upgrade - echo "No remove action done (this is an upgrade)" + # Upgrade + echo "No remove action done (this is an upgrade)" fi # version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release diff --git a/build/rpm/dolibarr_generic.spec b/build/rpm/dolibarr_generic.spec index f3d6e9d2e8d..764987dad1e 100755 --- a/build/rpm/dolibarr_generic.spec +++ b/build/rpm/dolibarr_generic.spec @@ -190,9 +190,9 @@ do lang2=`expr substr $lang 4 2 | tr "[:upper:]" "[:lower:]"`; echo "%dir %{_datadir}/%{name}/htdocs/langs/${lang}" >> %{name}.lang if [ "$lang1" = "$lang2" ] ; then - echo "%lang(${lang1}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang" + echo "%lang(${lang1}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang" else - echo "%lang(${lang}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang" + echo "%lang(${lang}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang" fi done >>%{name}.lang @@ -323,28 +323,28 @@ export installconfig="%{_sysconfdir}/dolibarr/install.forced.php" # Detect OS os='unknown'; if [ -d %{_sysconfdir}/httpd/conf.d ]; then - export os='fedora-redhat'; - export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf" - export apacheuser='apache'; - export apachegroup='apache'; + export os='fedora-redhat'; + export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf" + export apacheuser='apache'; + export apachegroup='apache'; fi if [ -d %{_sysconfdir}/apache2/conf.d -a `grep ^wwwrun /etc/passwd | wc -l` -ge 1 ]; then - export os='opensuse'; - export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf" - export apacheuser='wwwrun'; - export apachegroup='www'; + export os='opensuse'; + export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf" + export apacheuser='wwwrun'; + export apachegroup='www'; fi if [ -d %{_sysconfdir}/httpd/conf.d -a `grep -i "^mageia\|mandriva" /etc/issue | wc -l` -ge 1 ]; then - export os='mageia-mandriva'; - export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf" - export apacheuser='apache'; - export apachegroup='apache'; + export os='mageia-mandriva'; + export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf" + export apacheuser='apache'; + export apachegroup='apache'; fi if [ -d %{_sysconfdir}/apache2/conf.d -a `grep ^www-data /etc/passwd | wc -l` -ge 1 ]; then - export os='ubuntu-debian'; - export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf" - export apacheuser='www-data'; - export apachegroup='www-data'; + export os='ubuntu-debian'; + export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf" + export apacheuser='www-data'; + export apachegroup='www-data'; fi echo OS detected: $os %endif @@ -363,16 +363,16 @@ echo Create document directory $docdir # Create install.forced.php into Dolibarr install directory if [ "x$os" = "xubuntu-debian" ] then - superuserlogin='' - superuserpassword='' - if [ -f %{_sysconfdir}/mysql/debian.cnf ] ; then - # Load superuser login and pass - superuserlogin=$(/bin/grep --max-count=1 "user" %{_sysconfdir}/mysql/debian.cnf | /bin/sed -e 's/^user[ =]*//g') - superuserpassword=$(/bin/grep --max-count=1 "password" %{_sysconfdir}/mysql/debian.cnf | /bin/sed -e 's/^password[ =]*//g') - fi - echo Mysql superuser found to use is $superuserlogin - %{__cat} /usr/share/dolibarr/build/rpm/install.forced.php.generic | sed -e 's/__SUPERUSERLOGIN__/'$superuserlogin'/g' | sed -e 's/__SUPERUSERPASSWORD__/'$superuserpassword'/g' > $installconfig - %{__chmod} -R 660 $installconfig + superuserlogin='' + superuserpassword='' + if [ -f %{_sysconfdir}/mysql/debian.cnf ] ; then + # Load superuser login and pass + superuserlogin=$(/bin/grep --max-count=1 "user" %{_sysconfdir}/mysql/debian.cnf | /bin/sed -e 's/^user[ =]*//g') + superuserpassword=$(/bin/grep --max-count=1 "password" %{_sysconfdir}/mysql/debian.cnf | /bin/sed -e 's/^password[ =]*//g') + fi + echo Mysql superuser found to use is $superuserlogin + %{__cat} /usr/share/dolibarr/build/rpm/install.forced.php.generic | sed -e 's/__SUPERUSERLOGIN__/'$superuserlogin'/g' | sed -e 's/__SUPERUSERPASSWORD__/'$superuserpassword'/g' > $installconfig + %{__chmod} -R 660 $installconfig fi %endif @@ -383,29 +383,29 @@ fi export config=%{_sysconfdir}/dolibarr/conf.php if [ -s $config ] && grep -q "File generated by" $config then - # File already exist. We add params not found. - echo Add new params to overwrite path to use shared libraries/fonts - grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "" >> $config - grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "" >> $config - #grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "" >> $config - grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "" >> $config - grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "" >> $config - #grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "" >> $config - #grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "" >> $config - grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "" >> $config - grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "" >> $config - grep -q -c "dolibarr_js_JQUERY_UI" $config || [ ! -d "/usr/share/javascript/jquery-ui" ] || echo "" >> $config - grep -q -c "dolibarr_js_JQUERY_FLOT" $config || [ ! -d "/usr/share/javascript/flot" ] || echo "" >> $config + # File already exist. We add params not found. + echo Add new params to overwrite path to use shared libraries/fonts + grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "" >> $config + grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "" >> $config + #grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "" >> $config + grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "" >> $config + grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "" >> $config + #grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "" >> $config + #grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "" >> $config + grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "" >> $config + grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "" >> $config + grep -q -c "dolibarr_js_JQUERY_UI" $config || [ ! -d "/usr/share/javascript/jquery-ui" ] || echo "" >> $config + grep -q -c "dolibarr_js_JQUERY_FLOT" $config || [ ! -d "/usr/share/javascript/flot" ] || echo "" >> $config %if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} - grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "" >> $config + grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "" >> $config %else %if 0%{?mdkversion} - grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "" >> $config + grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "" >> $config %else %if 0%{?suse_version} - grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "" >> $config + grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "" >> $config %else - grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "" >> $config + grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "" >> $config %endif %endif %endif @@ -418,12 +418,12 @@ if [ "x$os" = "xfedora-redhat" -a -s /sbin/restorecon ]; then %endif %if 0%{?mdkversion} || 0%{?suse_version} %else - echo Add SE Linux permissions for dolibarr - # semanage add records into /etc/selinux/targeted/contexts/files/file_contexts.local - semanage fcontext -a -t httpd_sys_script_rw_t "/etc/dolibarr(/.*?)" - semanage fcontext -a -t httpd_sys_script_rw_t "/var/lib/dolibarr(/.*?)" - restorecon -R -v /etc/dolibarr - restorecon -R -v /var/lib/dolibarr + echo Add SE Linux permissions for dolibarr + # semanage add records into /etc/selinux/targeted/contexts/files/file_contexts.local + semanage fcontext -a -t httpd_sys_script_rw_t "/etc/dolibarr(/.*?)" + semanage fcontext -a -t httpd_sys_script_rw_t "/var/lib/dolibarr(/.*?)" + restorecon -R -v /etc/dolibarr + restorecon -R -v /var/lib/dolibarr %endif %if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} || 0%{?mdkversion} || 0%{?suse_version} %else @@ -432,13 +432,13 @@ fi # Create a config link dolibarr.conf if [ ! -L $apachelink ]; then - apachelinkdir=`dirname $apachelink` - if [ -d $apachelinkdir ]; then - echo Create dolibarr web server config link from %{_sysconfdir}/dolibarr/apache.conf to $apachelink - ln -fs %{_sysconfdir}/dolibarr/apache.conf $apachelink - else - echo Do not create link $apachelink - web server conf dir $apachelinkdir not found. web server package may not be installed - fi + apachelinkdir=`dirname $apachelink` + if [ -d $apachelinkdir ]; then + echo Create dolibarr web server config link from %{_sysconfdir}/dolibarr/apache.conf to $apachelink + ln -fs %{_sysconfdir}/dolibarr/apache.conf $apachelink + else + echo Do not create link $apachelink - web server conf dir $apachelinkdir not found. web server package may not be installed + fi fi echo Set permission to $apacheuser:$apachegroup on /var/lib/dolibarr @@ -451,30 +451,30 @@ echo Restart web server /sbin/service httpd restart %else if [ -f %{_sysconfdir}/init.d/httpd ]; then - %{_sysconfdir}/init.d/httpd restart + %{_sysconfdir}/init.d/httpd restart fi if [ -f %{_sysconfdir}/init.d/apache2 ]; then - %{_sysconfdir}/init.d/apache2 restart + %{_sysconfdir}/init.d/apache2 restart fi %endif # Restart mysql server echo Restart mysql server %if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} || 0%{?mdkversion} - /sbin/service mysqld restart + /sbin/service mysqld restart %else %if 0%{?suse_version} if [ -f /etc/init.d/mysqld ]; then - /etc/init.d/mysqld restart + /etc/init.d/mysqld restart else - /sbin/service mysql restart + /sbin/service mysql restart fi %else if [ -f /etc/init.d/mysqld ]; then - /etc/init.d/mysqld restart + /etc/init.d/mysqld restart fi if [ -f /etc/init.d/mysql ]; then - /etc/init.d/mysql restart + /etc/init.d/mysql restart fi %endif %endif @@ -497,63 +497,63 @@ echo if [ "x$1" = "x0" ] ; then - # Remove - echo "Removed package" + # Remove + echo "Removed package" - # Define vars - os='unknown'; - %if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} || 0%{?mdkversion} - export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf" - %else - %if 0%{?suse_version} - export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf" - %else - if [ -d %{_sysconfdir}/httpd/conf.d ]; then - export os='fedora-redhat'; - export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf" - fi - if [ -d %{_sysconfdir}/apache2/conf.d -a `grep ^wwwrun /etc/passwd | wc -l` -ge 1 ]; then - export os='opensuse'; - export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf" - fi - if [ -d %{_sysconfdir}/httpd/conf.d -a `grep -i "^mageia\|mandriva" /etc/issue | wc -l` -ge 1 ]; then - export os='mageia-mandriva'; - export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf" - fi - if [ -d %{_sysconfdir}/apache2/conf.d -a `grep ^www-data /etc/passwd | wc -l` -ge 1 ]; then - export os='ubuntu-debian'; - export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf" - fi - %endif - %endif - - # Remove apache link - if [ -L $apachelink ] ; - then - echo "Delete apache config link for Dolibarr ($apachelink)" - %{__rm} -f $apachelink - status=purge - fi - - # Restart web servers if required - if [ "x$status" = "xpurge" ] ; - then - # Restart web server - echo Restart web server - %if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} || 0%{?mdkversion} - /sbin/service httpd restart - %else - if [ -f %{_sysconfdir}/init.d/httpd ]; then - %{_sysconfdir}/init.d/httpd restart - fi - if [ -f %{_sysconfdir}/init.d/apache2 ]; then - %{_sysconfdir}/init.d/apache2 restart - fi - %endif - fi + # Define vars + os='unknown'; + %if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} || 0%{?mdkversion} + export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf" + %else + %if 0%{?suse_version} + export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf" + %else + if [ -d %{_sysconfdir}/httpd/conf.d ]; then + export os='fedora-redhat'; + export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf" + fi + if [ -d %{_sysconfdir}/apache2/conf.d -a `grep ^wwwrun /etc/passwd | wc -l` -ge 1 ]; then + export os='opensuse'; + export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf" + fi + if [ -d %{_sysconfdir}/httpd/conf.d -a `grep -i "^mageia\|mandriva" /etc/issue | wc -l` -ge 1 ]; then + export os='mageia-mandriva'; + export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf" + fi + if [ -d %{_sysconfdir}/apache2/conf.d -a `grep ^www-data /etc/passwd | wc -l` -ge 1 ]; then + export os='ubuntu-debian'; + export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf" + fi + %endif + %endif + + # Remove apache link + if [ -L $apachelink ] ; + then + echo "Delete apache config link for Dolibarr ($apachelink)" + %{__rm} -f $apachelink + status=purge + fi + + # Restart web servers if required + if [ "x$status" = "xpurge" ] ; + then + # Restart web server + echo Restart web server + %if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} || 0%{?mdkversion} + /sbin/service httpd restart + %else + if [ -f %{_sysconfdir}/init.d/httpd ]; then + %{_sysconfdir}/init.d/httpd restart + fi + if [ -f %{_sysconfdir}/init.d/apache2 ]; then + %{_sysconfdir}/init.d/apache2 restart + fi + %endif + fi else - # Upgrade - echo "No remove action done (this is an upgrade)" + # Upgrade + echo "No remove action done (this is an upgrade)" fi # version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release diff --git a/build/rpm/dolibarr_mandriva.spec b/build/rpm/dolibarr_mandriva.spec index 36b59f7a346..5f34ffd0326 100755 --- a/build/rpm/dolibarr_mandriva.spec +++ b/build/rpm/dolibarr_mandriva.spec @@ -114,9 +114,9 @@ do lang2=`expr substr $lang 4 2 | tr "[:upper:]" "[:lower:]"`; echo "%dir %{_datadir}/%{name}/htdocs/langs/${lang}" >> %{name}.lang if [ "$lang1" = "$lang2" ] ; then - echo "%lang(${lang1}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang" + echo "%lang(${lang1}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang" else - echo "%lang(${lang}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang" + echo "%lang(${lang}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang" fi done >>%{name}.lang @@ -235,31 +235,31 @@ echo Create document directory $docdir export config=%{_sysconfdir}/dolibarr/conf.php if [ -s $config ] && grep -q "File generated by" $config then - # File already exist. We add params not found. - echo Add new params to overwrite path to use shared libraries/fonts - grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "" >> $config - grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "" >> $config - #grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "" >> $config - grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "" >> $config - grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "" >> $config - #grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "" >> $config - #grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "" >> $config - grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "" >> $config - grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "" >> $config - grep -q -c "dolibarr_js_JQUERY_UI" $config || [ ! -d "/usr/share/javascript/jquery-ui" ] || echo "" >> $config - grep -q -c "dolibarr_js_JQUERY_FLOT" $config || [ ! -d "/usr/share/javascript/flot" ] || echo "" >> $config - grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "" >> $config + # File already exist. We add params not found. + echo Add new params to overwrite path to use shared libraries/fonts + grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "" >> $config + grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "" >> $config + #grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "" >> $config + grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "" >> $config + grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "" >> $config + #grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "" >> $config + #grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "" >> $config + grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "" >> $config + grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "" >> $config + grep -q -c "dolibarr_js_JQUERY_UI" $config || [ ! -d "/usr/share/javascript/jquery-ui" ] || echo "" >> $config + grep -q -c "dolibarr_js_JQUERY_FLOT" $config || [ ! -d "/usr/share/javascript/flot" ] || echo "" >> $config + grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "" >> $config fi # Create a config link dolibarr.conf if [ ! -L $apachelink ]; then - apachelinkdir=`dirname $apachelink` - if [ -d $apachelinkdir ]; then - echo Create dolibarr web server config link from %{_sysconfdir}/dolibarr/apache.conf to $apachelink - ln -fs %{_sysconfdir}/dolibarr/apache.conf $apachelink - else - echo Do not create link $apachelink - web server conf dir $apachelinkdir not found. web server package may not be installed - fi + apachelinkdir=`dirname $apachelink` + if [ -d $apachelinkdir ]; then + echo Create dolibarr web server config link from %{_sysconfdir}/dolibarr/apache.conf to $apachelink + ln -fs %{_sysconfdir}/dolibarr/apache.conf $apachelink + else + echo Do not create link $apachelink - web server conf dir $apachelinkdir not found. web server package may not be installed + fi fi echo Set permission to $apacheuser:$apachegroup on /var/lib/dolibarr @@ -269,19 +269,19 @@ echo Set permission to $apacheuser:$apachegroup on /var/lib/dolibarr # Restart web server echo Restart web server if [ -f %{_sysconfdir}/init.d/httpd ]; then - %{_sysconfdir}/init.d/httpd restart + %{_sysconfdir}/init.d/httpd restart fi if [ -f %{_sysconfdir}/init.d/apache2 ]; then - %{_sysconfdir}/init.d/apache2 restart + %{_sysconfdir}/init.d/apache2 restart fi # Restart mysql echo Restart mysql if [ -f /etc/init.d/mysqld ]; then - /etc/init.d/mysqld restart + /etc/init.d/mysqld restart fi if [ -f /etc/init.d/mysql ]; then - /etc/init.d/mysql restart + /etc/init.d/mysql restart fi # Show result @@ -301,35 +301,35 @@ echo if [ "x$1" = "x0" ] ; then - # Remove - echo "Removed package" + # Remove + echo "Removed package" - # Define vars - export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf" - - # Remove apache link - if [ -L $apachelink ] ; - then - echo "Delete apache config link for Dolibarr ($apachelink)" - %{__rm} -f $apachelink - status=purge - fi - - # Restart web servers if required - if [ "x$status" = "xpurge" ] ; - then - # Restart web server - echo Restart web server - if [ -f %{_sysconfdir}/init.d/httpd ]; then - %{_sysconfdir}/init.d/httpd restart - fi - if [ -f %{_sysconfdir}/init.d/apache2 ]; then - %{_sysconfdir}/init.d/apache2 restart - fi - fi + # Define vars + export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf" + + # Remove apache link + if [ -L $apachelink ] ; + then + echo "Delete apache config link for Dolibarr ($apachelink)" + %{__rm} -f $apachelink + status=purge + fi + + # Restart web servers if required + if [ "x$status" = "xpurge" ] ; + then + # Restart web server + echo Restart web server + if [ -f %{_sysconfdir}/init.d/httpd ]; then + %{_sysconfdir}/init.d/httpd restart + fi + if [ -f %{_sysconfdir}/init.d/apache2 ]; then + %{_sysconfdir}/init.d/apache2 restart + fi + fi else - # Upgrade - echo "No remove action done (this is an upgrade)" + # Upgrade + echo "No remove action done (this is an upgrade)" fi diff --git a/build/rpm/dolibarr_opensuse.spec b/build/rpm/dolibarr_opensuse.spec index a831bc60e22..03357d369bc 100755 --- a/build/rpm/dolibarr_opensuse.spec +++ b/build/rpm/dolibarr_opensuse.spec @@ -115,9 +115,9 @@ do lang2=`expr substr $lang 4 2 | tr "[:upper:]" "[:lower:]"`; echo "%dir %{_datadir}/%{name}/htdocs/langs/${lang}" >> %{name}.lang if [ "$lang1" = "$lang2" ] ; then - echo "%lang(${lang1}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang" + echo "%lang(${lang1}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang" else - echo "%lang(${lang}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang" + echo "%lang(${lang}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang" fi done >>%{name}.lang @@ -246,31 +246,31 @@ echo Create document directory $docdir export config=%{_sysconfdir}/dolibarr/conf.php if [ -s $config ] && grep -q "File generated by" $config then - # File already exist. We add params not found. - echo Add new params to overwrite path to use shared libraries/fonts - grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "" >> $config - grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "" >> $config - #grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "" >> $config - grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "" >> $config - grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "" >> $config - #grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "" >> $config - #grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "" >> $config - grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "" >> $config - grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "" >> $config - grep -q -c "dolibarr_js_JQUERY_UI" $config || [ ! -d "/usr/share/javascript/jquery-ui" ] || echo "" >> $config - grep -q -c "dolibarr_js_JQUERY_FLOT" $config || [ ! -d "/usr/share/javascript/flot" ] || echo "" >> $config - grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "" >> $config + # File already exist. We add params not found. + echo Add new params to overwrite path to use shared libraries/fonts + grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "" >> $config + grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "" >> $config + #grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "" >> $config + grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "" >> $config + grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "" >> $config + #grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "" >> $config + #grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "" >> $config + grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "" >> $config + grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "" >> $config + grep -q -c "dolibarr_js_JQUERY_UI" $config || [ ! -d "/usr/share/javascript/jquery-ui" ] || echo "" >> $config + grep -q -c "dolibarr_js_JQUERY_FLOT" $config || [ ! -d "/usr/share/javascript/flot" ] || echo "" >> $config + grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "" >> $config fi # Create a config link dolibarr.conf if [ ! -L $apachelink ]; then - apachelinkdir=`dirname $apachelink` - if [ -d $apachelinkdir ]; then - echo Create dolibarr web server config link from %{_sysconfdir}/dolibarr/apache.conf to $apachelink - ln -fs %{_sysconfdir}/dolibarr/apache.conf $apachelink - else - echo Do not create link $apachelink - web server conf dir $apachelinkdir not found. web server package may not be installed - fi + apachelinkdir=`dirname $apachelink` + if [ -d $apachelinkdir ]; then + echo Create dolibarr web server config link from %{_sysconfdir}/dolibarr/apache.conf to $apachelink + ln -fs %{_sysconfdir}/dolibarr/apache.conf $apachelink + else + echo Do not create link $apachelink - web server conf dir $apachelinkdir not found. web server package may not be installed + fi fi echo Set permission to $apacheuser:$apachegroup on /var/lib/dolibarr @@ -280,18 +280,18 @@ echo Set permission to $apacheuser:$apachegroup on /var/lib/dolibarr # Restart web server echo Restart web server if [ -f %{_sysconfdir}/init.d/httpd ]; then - %{_sysconfdir}/init.d/httpd restart + %{_sysconfdir}/init.d/httpd restart fi if [ -f %{_sysconfdir}/init.d/apache2 ]; then - %{_sysconfdir}/init.d/apache2 restart + %{_sysconfdir}/init.d/apache2 restart fi # Restart mysql echo Restart mysql if [ -f /etc/init.d/mysqld ]; then - /etc/init.d/mysqld restart + /etc/init.d/mysqld restart else - /sbin/service mysql restart + /sbin/service mysql restart fi # Show result @@ -311,35 +311,35 @@ echo if [ "x$1" = "x0" ] ; then - # Remove - echo "Removed package" - - # Define vars - export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf" - - # Remove apache link - if [ -L $apachelink ] ; - then - echo "Delete apache config link for Dolibarr ($apachelink)" - %{__rm} -f $apachelink - status=purge - fi - - # Restart web servers if required - if [ "x$status" = "xpurge" ] ; - then - # Restart web server - echo Restart web server - if [ -f %{_sysconfdir}/init.d/httpd ]; then - %{_sysconfdir}/init.d/httpd restart - fi - if [ -f %{_sysconfdir}/init.d/apache2 ]; then - %{_sysconfdir}/init.d/apache2 restart - fi - fi + # Remove + echo "Removed package" + + # Define vars + export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf" + + # Remove apache link + if [ -L $apachelink ] ; + then + echo "Delete apache config link for Dolibarr ($apachelink)" + %{__rm} -f $apachelink + status=purge + fi + + # Restart web servers if required + if [ "x$status" = "xpurge" ] ; + then + # Restart web server + echo Restart web server + if [ -f %{_sysconfdir}/init.d/httpd ]; then + %{_sysconfdir}/init.d/httpd restart + fi + if [ -f %{_sysconfdir}/init.d/apache2 ]; then + %{_sysconfdir}/init.d/apache2 restart + fi + fi else - # Upgrade - echo "No remove action done (this is an upgrade)" + # Upgrade + echo "No remove action done (this is an upgrade)" fi diff --git a/dev/fixnotabfiles.sh b/dev/fixnotabfiles.sh new file mode 100755 index 00000000000..3e5d28966c9 --- /dev/null +++ b/dev/fixnotabfiles.sh @@ -0,0 +1,26 @@ +#!/bin/sh +#------------------------------------------------------ +# Script to find files that are not Unix encoded +# +# Laurent Destailleur - eldy@users.sourceforge.net +#------------------------------------------------------ +# Usage: fixnotabfiles.sh [list|fix] +#------------------------------------------------------ + +# Syntax +if [ "x$1" != "xlist" -a "x$1" != "xfix" ] +then + echo "Usage: fixnotabfiles.sh [list|fix]" +fi + +# To detec +if [ "x$1" = "xlist" ] +then + find build \( -iname "*.sh" -o -iname "*.spec" \) -exec grep -l -P '\t' {} \; +fi + +# To convert +if [ "x$1" = "xfix" ] +then + echo Feature not implemented. Please fix files manually. +fi From 8cd0647d7e74df8b00200dc63f64dace6daf909a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 24 Nov 2013 13:40:33 +0100 Subject: [PATCH 107/107] Fix: business rule to protect button and action was not synchronized --- htdocs/user/param_ihm.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/user/param_ihm.php b/htdocs/user/param_ihm.php index 54a9093bd34..44686e9277e 100644 --- a/htdocs/user/param_ihm.php +++ b/htdocs/user/param_ihm.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2005-2013 Laurent Destailleur * Copyright (C) 2010-2012 Regis Houssin * Copyright (C) 2013 Florian Henry * @@ -78,7 +78,7 @@ $formadmin=new FormAdmin($db); /* * Actions */ -if ($action == 'update' && ($caneditfield || $user->admin)) +if ($action == 'update' && ($caneditfield || ! empty($user->admin))) { if (! $_POST["cancel"]) { @@ -258,7 +258,7 @@ else } else { - if ($user->id == $fuser->id || ! empty($user->admin)) // Si utilisateur edite = utilisateur courant (pas besoin de droits particulier car il s'agit d'une page de modif d'output et non de données) ou si admin + if ($caneditfield || ! empty($user->admin)) // Si utilisateur edite = utilisateur courant (pas besoin de droits particulier car il s'agit d'une page de modif d'output et non de données) ou si admin { print 'id.'">'.$langs->trans("Modify").''; }
    '.$langs->trans("LabelRIB").''.$account->label.'
    '.$rib->label.''.$rib->bank.''; if (!$rib->default_rib) { print ''; - print img_picto($langs->trans("Disabled"),'switch_off'); + print img_picto($langs->trans("Disabled"),'off'); print ''; } else { - print img_picto($langs->trans("Enabled"),'switch_on'); + print img_picto($langs->trans("Enabled"),'on'); } print ''; - print ''; - print img_picto($langs->trans("Modify"),'edit'); - print ''; + if ($user->rights->societe->creer) + { + print ''; + print img_picto($langs->trans("Modify"),'edit'); + print ''; + + print ' '; + + print ''; + print img_picto($langs->trans("Delete"),'delete'); + print ''; + } + print '