diff --git a/.gitignore b/.gitignore index 20c87aa1e42..12983e5dfd8 100755 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ default.properties .buildpath .gitmodules dolibarr_install.log +upgrade.log doxygen_warnings.log /.project .DS_Store diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f88d1de9a10..1c443fb0f53 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -13,10 +13,25 @@ Issues are tracked at [Doliforge](https://doliforge.org/projects/dolibarr) Code ---- + +### Basic workflow + 1. Fork the [GitHub repository](https://github.com/Dolibarr/dolibarr). 2. Clone your fork. -3. Commit and push your changes. -4. Make a pull request. +3. Choose a branch(See the Branches section below). +4. Commit and push your changes. +5. Make a pull request. + +### Branches + +Unless you're fixing a bug, all pull request should be made against the *develop* branch. + +If you're fixing a bug, it is preferred that you cook your fix and pull request it +against the oldest version affected that's still supported. + +We officially support versions N, N − 1 and N − 2 for N the latest version available. + +Choose your base branch accordingly. ### General rules Please don't edit the ChangeLog file. A project manager will update it from your commit messages. diff --git a/ChangeLog b/ChangeLog index 9aae192541f..9023171f337 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,13 +1,11 @@ -------------------------------------------------------------- English Dolibarr ChangeLog -------------------------------------------------------------- -***** ChangeLog for 3.8 compared to 3.7.* ***** -- New: Add Option to not change date on cloning project -- New: Add check list from table for extrafield type - ***** ChangeLog for 3.8 compared to 3.7.* ***** For users: +- New: Add Option to not change date on cloning project +- New: Add check list from table for extrafield type - New: Use new combobox. - New: Add hidden option MAXTABS_IN_CARD. - Fix / Improve : [ bug #1747 ] Remove creation of batch 'Undefined' @@ -16,6 +14,7 @@ For users: - Introduce option MAIN_HTML_TITLE to start to control format of html title content. - Add extrafields on bank account cards. - Added delay between mails in Newsletter module +- [ task #1793 ] Create new permission to restrict commercial agent margin to logged user For translators: - Update language files. diff --git a/README.md b/README.md index 4c9ffa93080..e133ec9d031 100644 --- a/README.md +++ b/README.md @@ -58,9 +58,9 @@ You can use a Web server and a supported database (MySQL recommended) to install ## UPGRADING - Overwrite all old files from 'dolibarr' directory with files provided into the new version's package. -- If you're upgrading from version x.y.z to x.y.w (only third number differs), there is no need to run any migration process +- If you're upgrading from version x.y.z to x.y.w (only third number differs), there is no need to run any migration process. - If you're upgrading from a beta version or from any version x.y.z to any other where x or y number differs, you must call the Dolibarr "install/" page in your browser (this should be done automatically at first dolibarr access) and follow the upgrade process. -- + *Note: migration process can safely be done multiple times.* ## NEWS diff --git a/build/debian/README.howto b/build/debian/README.howto index 6d5280e56c1..aa104332584 100644 --- a/build/debian/README.howto +++ b/build/debian/README.howto @@ -299,3 +299,17 @@ http://packages.qa.debian.org * Package will be into release when test will be moved as stable. + +##### Send an unblock request +Use this to move from unstable to testing. +reportbug -B debian +Choose package "release.debian.org" +Then "unblock" +Then name of package "dolibarr" +Fill message, for example: +"Please unblock package dolibarr +A security error CVE-2014-7137 was reported and is fixed into package 3.5.5. +Note that package 3.5.5 was prepared before the CVE was reported and include other fixes, but they are all related to stability or security (other se$ +After discussion with ..., it appears that security holes are enough to request this unblock request." + + diff --git a/build/exe/doliwamp/config.inc.php.install b/build/exe/doliwamp/config.inc.php.install index eb2587c57e0..2a885a8c886 100644 --- a/build/exe/doliwamp/config.inc.php.install +++ b/build/exe/doliwamp/config.inc.php.install @@ -376,7 +376,7 @@ $cfg['DefaultConnectionCollation'] = 'utf8_unicode_ci'; // libraries/select_lang.lib.php // $cfg['Lang'] = 'en-iso-8859-1'; -// Regullar expression to limit listed languages, eg. '^(cs|en)' for Czech and +// Regular expression to limit listed languages, eg. '^(cs|en)' for Czech and // English only $cfg['FilterLanguages'] = ''; diff --git a/dev/initdata/mysqldump_dolibarr_3.7.0.sql b/dev/initdata/mysqldump_dolibarr_3.7.0.sql index b18a9a20b4a..9e920813519 100644 --- a/dev/initdata/mysqldump_dolibarr_3.7.0.sql +++ b/dev/initdata/mysqldump_dolibarr_3.7.0.sql @@ -4965,7 +4965,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'),(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','','DictionarySetup','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/card.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/card.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/card.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/card.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/card.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/card.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/card.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/card.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/card.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/card.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/card.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/card.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/card.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/card.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/card.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/card.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/card.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/card.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/card.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/card.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/card.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/card.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/card.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/card.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/card.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'),(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/card.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/card.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/card.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/card.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/card.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/card.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/card.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/card.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/card.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/card.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/card.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/card.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/card.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/card.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/card.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/card.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/card.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/card.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/card.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/card.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/card.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/card.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/card.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'),(108457,'all',1,'barcode','left','tools',-1,NULL,'tools',200,'/barcode/printsheet.php?mainmenu=home&leftmenu=modulesadmintools','','BarCodePrintsheet','products',NULL,'barcodeprint','1','$conf->barcode->enabled',2,'2014-03-02 15:37:26'),(108458,'all',1,'barcode','left','home',-1,'modulesadmintools','home',300,'/barcode/codeinit.php?mainmenu=home&leftmenu=modulesadmintools','','MassBarcodeInit','products',NULL,NULL,'1','$conf->barcode->enabled && $leftmenu==\"modulesadmintools\"',0,'2014-03-02 15:37:26'),(108459,'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,'2014-12-21 12:51:26'),(108460,'all',1,'agenda','left','agenda',108459,NULL,NULL,100,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Actions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2014-12-21 12:51:26'),(108461,'all',1,'agenda','left','agenda',108460,NULL,NULL,101,'/comm/action/card.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,'2014-12-21 12:51:26'),(108462,'all',1,'agenda','left','agenda',108460,NULL,NULL,102,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Calendar','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2014-12-21 12:51:26'),(108463,'all',1,'agenda','left','agenda',108462,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,'2014-12-21 12:51:26'),(108464,'all',1,'agenda','left','agenda',108462,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,'2014-12-21 12:51:26'),(108465,'all',1,'agenda','left','agenda',108462,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,'2014-12-21 12:51:26'),(108466,'all',1,'agenda','left','agenda',108462,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,'2014-12-21 12:51:26'),(108467,'all',1,'agenda','left','agenda',108460,NULL,NULL,112,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda','','List','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2014-12-21 12:51:26'),(108468,'all',1,'agenda','left','agenda',108467,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,'2014-12-21 12:51:26'),(108469,'all',1,'agenda','left','agenda',108467,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,'2014-12-21 12:51:26'),(108470,'all',1,'agenda','left','agenda',108467,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,'2014-12-21 12:51:26'),(108471,'all',1,'agenda','left','agenda',108467,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,'2014-12-21 12:51:26'),(108472,'all',1,'agenda','left','agenda',108460,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,'2014-12-21 12:51:26'),(108473,'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,'2014-12-21 12:51:28'),(108474,'all',1,'ecm','left','ecm',-1,NULL,'ecm',101,'/ecm/index.php?mainmenu=ecm&leftmenu=ecm','','ECMArea','ecm',NULL,'ecm','$user->rights->ecm->read || $user->rights->ecm->upload','$user->rights->ecm->read || $user->rights->ecm->upload',2,'2014-12-21 12:51:28'),(108475,'all',1,'ecm','left','ecm',-1,'ecm','ecm',102,'/ecm/index.php?action=file_manager&mainmenu=ecm&leftmenu=ecm','','ECMSectionsManual','ecm',NULL,'ecm_manual','$user->rights->ecm->read || $user->rights->ecm->upload','$user->rights->ecm->read || $user->rights->ecm->upload',2,'2014-12-21 12:51:28'),(108476,'all',1,'ecm','left','ecm',-1,'ecm','ecm',103,'/ecm/index_auto.php?action=file_manager&mainmenu=ecm&leftmenu=ecm','','ECMSectionsAuto','ecm',NULL,NULL,'$user->rights->ecm->read || $user->rights->ecm->upload','$user->rights->ecm->read || $user->rights->ecm->upload',2,'2014-12-21 12:51:28'),(108477,'all',1,'opensurvey','left','tools',-1,NULL,'tools',200,'/opensurvey/index.php?mainmenu=tools&leftmenu=opensurvey','','Survey','opensurvey',NULL,'opensurvey','','$conf->opensurvey->enabled',0,'2014-12-21 19:52:31'),(108478,'all',1,'opensurvey','left','tools',-1,'opensurvey','tools',210,'/opensurvey/wizard/index.php','','NewSurvey','opensurvey',NULL,'opensurvey_new','$user->rights->opensurvey->write','$conf->opensurvey->enabled',0,'2014-12-21 19:52:31'),(108479,'all',1,'opensurvey','left','tools',-1,'opensurvey','tools',220,'/opensurvey/list.php','','List','opensurvey',NULL,'opensurvey_list','','$conf->opensurvey->enabled',0,'2014-12-21 19:52:31'); +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'),(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','','DictionarySetup','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/card.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/card.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/list.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/card.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/card.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/card.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/card.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/list.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/list.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/list.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/list.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/list.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/list.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/list.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/list.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/list.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/card.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/card.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/list.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/card.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/list.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/list.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/card.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/list.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/card.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/card.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/list.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/list.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/card.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/list.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/list.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/card.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/card.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/list.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/card.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/list.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/card.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/list.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/card.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/card.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/list.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/card.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/list.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/card.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/list.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/card.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/list.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/list.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/list.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/list.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/list.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/list.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/list.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/list.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/list.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/card.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/card.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/list.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/list.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/list.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/list.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/list.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/list.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/card.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'),(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/card.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/card.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/list.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/card.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/card.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/card.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/list.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/list.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/list.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/list.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/list.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/list.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/list.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/card.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/list.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/list.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/card.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/card.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/list.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/card.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/list.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/list.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/card.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/list.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/card.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/card.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/list.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/list.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/card.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/list.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/list.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/card.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/card.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/list.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/card.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/list.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/card.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/list.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/card.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/card.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/list.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/card.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/list.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/card.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/list.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/card.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/list.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/list.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/list.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/list.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/list.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/list.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/list.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/list.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/card.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'),(108457,'all',1,'barcode','left','tools',-1,NULL,'tools',200,'/barcode/printsheet.php?mainmenu=home&leftmenu=modulesadmintools','','BarCodePrintsheet','products',NULL,'barcodeprint','1','$conf->barcode->enabled',2,'2014-03-02 15:37:26'),(108458,'all',1,'barcode','left','home',-1,'modulesadmintools','home',300,'/barcode/codeinit.php?mainmenu=home&leftmenu=modulesadmintools','','MassBarcodeInit','products',NULL,NULL,'1','$conf->barcode->enabled && $leftmenu==\"modulesadmintools\"',0,'2014-03-02 15:37:26'),(108459,'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,'2014-12-21 12:51:26'),(108460,'all',1,'agenda','left','agenda',108459,NULL,NULL,100,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Actions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2014-12-21 12:51:26'),(108461,'all',1,'agenda','left','agenda',108460,NULL,NULL,101,'/comm/action/card.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,'2014-12-21 12:51:26'),(108462,'all',1,'agenda','left','agenda',108460,NULL,NULL,102,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Calendar','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2014-12-21 12:51:26'),(108463,'all',1,'agenda','left','agenda',108462,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,'2014-12-21 12:51:26'),(108464,'all',1,'agenda','left','agenda',108462,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,'2014-12-21 12:51:26'),(108465,'all',1,'agenda','left','agenda',108462,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,'2014-12-21 12:51:26'),(108466,'all',1,'agenda','left','agenda',108462,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,'2014-12-21 12:51:26'),(108467,'all',1,'agenda','left','agenda',108460,NULL,NULL,112,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda','','List','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2014-12-21 12:51:26'),(108468,'all',1,'agenda','left','agenda',108467,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,'2014-12-21 12:51:26'),(108469,'all',1,'agenda','left','agenda',108467,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,'2014-12-21 12:51:26'),(108470,'all',1,'agenda','left','agenda',108467,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,'2014-12-21 12:51:26'),(108471,'all',1,'agenda','left','agenda',108467,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,'2014-12-21 12:51:26'),(108472,'all',1,'agenda','left','agenda',108460,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,'2014-12-21 12:51:26'),(108473,'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,'2014-12-21 12:51:28'),(108474,'all',1,'ecm','left','ecm',-1,NULL,'ecm',101,'/ecm/index.php?mainmenu=ecm&leftmenu=ecm','','ECMArea','ecm',NULL,'ecm','$user->rights->ecm->read || $user->rights->ecm->upload','$user->rights->ecm->read || $user->rights->ecm->upload',2,'2014-12-21 12:51:28'),(108475,'all',1,'ecm','left','ecm',-1,'ecm','ecm',102,'/ecm/index.php?action=file_manager&mainmenu=ecm&leftmenu=ecm','','ECMSectionsManual','ecm',NULL,'ecm_manual','$user->rights->ecm->read || $user->rights->ecm->upload','$user->rights->ecm->read || $user->rights->ecm->upload',2,'2014-12-21 12:51:28'),(108476,'all',1,'ecm','left','ecm',-1,'ecm','ecm',103,'/ecm/index_auto.php?action=file_manager&mainmenu=ecm&leftmenu=ecm','','ECMSectionsAuto','ecm',NULL,NULL,'$user->rights->ecm->read || $user->rights->ecm->upload','$user->rights->ecm->read || $user->rights->ecm->upload',2,'2014-12-21 12:51:28'),(108477,'all',1,'opensurvey','left','tools',-1,NULL,'tools',200,'/opensurvey/index.php?mainmenu=tools&leftmenu=opensurvey','','Survey','opensurvey',NULL,'opensurvey','','$conf->opensurvey->enabled',0,'2014-12-21 19:52:31'),(108478,'all',1,'opensurvey','left','tools',-1,'opensurvey','tools',210,'/opensurvey/wizard/index.php','','NewSurvey','opensurvey',NULL,'opensurvey_new','$user->rights->opensurvey->write','$conf->opensurvey->enabled',0,'2014-12-21 19:52:31'),(108479,'all',1,'opensurvey','left','tools',-1,'opensurvey','tools',220,'/opensurvey/list.php','','List','opensurvey',NULL,'opensurvey_list','','$conf->opensurvey->enabled',0,'2014-12-21 19:52:31'); /*!40000 ALTER TABLE `llx_menu` ENABLE KEYS */; UNLOCK TABLES; diff --git a/htdocs/accountancy/admin/export.php b/htdocs/accountancy/admin/export.php index d35e6e8ddf6..3e7e99c1e24 100644 --- a/htdocs/accountancy/admin/export.php +++ b/htdocs/accountancy/admin/export.php @@ -1,6 +1,6 @@ - * Copyright (C) 2013-2014 Alexandre Spangaro + * Copyright (C) 2013-2015 Alexandre Spangaro * Copyright (C) 2014 Florian Henry * Copyright (C) 2014 Marcos García * Copyright (C) 2014 Juanjo Menent @@ -44,7 +44,13 @@ $action = GETPOST('action', 'alpha'); // Other parameters ACCOUNTING_* $list = array ( - 'ACCOUNTING_SEPARATORCSV' + 'ACCOUNTING_EXPORT_SEPARATORCSV', + 'ACCOUNTING_EXPORT_DATE', + 'ACCOUNTING_EXPORT_PIECE', + 'ACCOUNTING_EXPORT_GLOBAL_ACCOUNT', + 'ACCOUNTING_EXPORT_LABEL', + 'ACCOUNTING_EXPORT_AMOUNT', + 'ACCOUNTING_EXPORT_DEVISE' ); /* @@ -57,7 +63,7 @@ if ($action == 'update') { if (! empty($modelcsv)) { - if (! dolibarr_set_const($db, 'ACCOUNTING_MODELCSV', $modelcsv, 'chaine', 0, '', $conf->entity)) { + if (! dolibarr_set_const($db, 'ACCOUNTING_EXPORT_MODELCSV', $modelcsv, 'chaine', 0, '', $conf->entity)) { $error ++; } } else { @@ -112,12 +118,12 @@ print "" . $langs->trans("Selectmodelcsv") . ""; print ""; print ''; llxFooter(); -$db->close(); \ No newline at end of file +$db->close(); diff --git a/htdocs/accountancy/bookkeeping/balancebymonth.php b/htdocs/accountancy/bookkeeping/balancebymonth.php index 120d08db09c..35e6c85ee4f 100644 --- a/htdocs/accountancy/bookkeeping/balancebymonth.php +++ b/htdocs/accountancy/bookkeeping/balancebymonth.php @@ -50,10 +50,10 @@ if ($year == 0) { /* * View */ -llxHeader('', $langs->trans("CustomersVentilation")); +llxHeader('', $langs->trans("Bookkeeping")); -$textprevyear = "" . img_previous() . ""; -$textnextyear = " " . img_next() . ""; +$textprevyear = '' . img_previous() . ''; +$textnextyear = ' ' . img_next() . ''; print_fiche_titre($langs->trans("AccountBalanceByMonth") . ' ' . $textprevyear . ' ' . $langs->trans("Year") . ' ' . $year_start . ' ' . $textnextyear); diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index b2acc60fb6a..f1dc892c10f 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -151,7 +151,7 @@ else { print $formventilation->select_bookkeeping_importkey('importkey', GETPOST('importkey')); - print '
'; + print '
'; print ''; @@ -231,4 +231,4 @@ else { } llxFooter(); -$db->close(); +$db->close(); \ No newline at end of file diff --git a/htdocs/accountancy/bookkeeping/listbyyear.php b/htdocs/accountancy/bookkeeping/listbyyear.php index 0829f792130..26f0469c1a0 100644 --- a/htdocs/accountancy/bookkeeping/listbyyear.php +++ b/htdocs/accountancy/bookkeeping/listbyyear.php @@ -56,12 +56,11 @@ $offset = $conf->liste_limit * $page; llxHeader('', $langs->trans("Bookkeeping")); -$textprevyear = "" . img_previous() . ""; -$textnextyear = " " . img_next() . ""; +$textprevyear = '' . img_previous() . ''; +$textnextyear = ' ' . img_next() . ''; /* - * Mode Liste - * + * Mode List */ $sql = "SELECT bk.rowid, bk.doc_date, bk.doc_type, bk.doc_ref, bk.code_tiers, bk.numero_compte , bk.label_compte, bk.debit , bk.credit, bk.montant , bk.sens, bk.code_journal"; diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index 659bff072cf..bc9ed576645 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -53,7 +53,6 @@ class AccountingAccount extends CommonObject * @param DoliDB $db Database handle */ function __construct($db) - { $this->db = $db; } diff --git a/htdocs/accountancy/class/html.formventilation.class.php b/htdocs/accountancy/class/html.formventilation.class.php index 33bb33a2353..4e833862bd8 100644 --- a/htdocs/accountancy/class/html.formventilation.class.php +++ b/htdocs/accountancy/class/html.formventilation.class.php @@ -128,7 +128,7 @@ class FormVentilation extends Form $label = $obj->account_number . ' - ' . $obj->label; // Remember guy's we store in database llx_facturedet the rowid of accountingaccount and not the account_number - // Bacause same account_number can be share between different accounting_system and do have the same meaning + // Because same account_number can be share between different accounting_system and do have the same meaning if (($selectid != '') && $selectid == $obj->rowid) { // $out .= ''; $out .= ''; diff --git a/htdocs/accountancy/customer/card.php b/htdocs/accountancy/customer/card.php index 4249688fabe..0c653627be0 100644 --- a/htdocs/accountancy/customer/card.php +++ b/htdocs/accountancy/customer/card.php @@ -24,7 +24,7 @@ */ require '../../main.inc.php'; - + // Class require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/accountancy/class/html.formventilation.class.php'; @@ -40,19 +40,18 @@ $id = GETPOST('id'); // Security check if ($user->societe_id > 0) accessforbidden(); - + /* * Actions */ -if ($action == 'ventil' && $user->rights->accounting->ventilation->dispatch) -{ +if ($action == 'ventil' && $user->rights->accounting->ventilation->dispatch) { if (! GETPOST('cancel', 'alpha')) { $sql = " UPDATE " . MAIN_DB_PREFIX . "facturedet"; $sql .= " SET fk_code_ventilation = " . $codeventil; $sql .= " WHERE rowid = " . $id; - + dol_syslog("/accounting/customer/card.php sql=" . $sql, LOG_DEBUG); $resql = $db->query($sql); if (! $resql) { @@ -61,7 +60,7 @@ if ($action == 'ventil' && $user->rights->accounting->ventilation->dispatch) } else { header("Location: ./lines.php"); exit(); - } + } } llxHeader("", "", "FicheVentilation"); @@ -86,38 +85,38 @@ if (! empty($id)) { $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accountingaccount as aa ON l.fk_code_ventilation = aa.rowid"; $sql .= " INNER JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = l.fk_facture"; $sql .= " WHERE f.fk_statut > 0 AND l.rowid = " . $id; - + if (! empty($conf->multicompany->enabled)) { $sql .= " AND f.entity = '" . $conf->entity . "'"; } - + dol_syslog("/accounting/customer/card.php sql=" . $sql, LOG_DEBUG); $result = $db->query($sql); - + if ($result) { $num_lines = $db->num_rows($result); $i = 0; - + if ($num_lines) { - + $objp = $db->fetch_object($result); - + print '
' . "\n"; print ''; print ''; - + $linkback=''.$langs->trans("Back").''; print_fiche_titre($langs->trans('CustomersVentilation'),$linkback,'setup'); - + print ''; - + // Ref facture print ''; $facture_static->ref = $objp->facnumber; $facture_static->id = $objp->facid; print ''; print ''; - + print ''; print ''; print ''; print '
' . $langs->trans("Invoice") . '' . $facture_static->getNomUrl(1) . '
' . $langs->trans("Line") . '' . nl2br($objp->description) . '
' . $langs->trans("Account") . ''; @@ -126,13 +125,13 @@ if (! empty($id)) { print $formventilation->select_account($objp->fk_code_ventilation, 'codeventil', 1); print '
'; - + print '
'; print ''; print '     '; print ''; print '
'; - + print '
'; } else { print "Error"; @@ -145,4 +144,4 @@ if (! empty($id)) { } llxFooter(); -$db->close(); \ No newline at end of file +$db->close(); diff --git a/htdocs/accountancy/customer/index.php b/htdocs/accountancy/customer/index.php index 663e763a9d3..1760f8360a9 100644 --- a/htdocs/accountancy/customer/index.php +++ b/htdocs/accountancy/customer/index.php @@ -22,7 +22,7 @@ /** * \file htdocs/accountancy/customer/index.php * \ingroup Accounting Expert - * \brief Page accueil clients ventilation comptable + * \brief Home customer ventilation */ require '../../main.inc.php'; @@ -75,6 +75,8 @@ if ($action == 'validatehistory') { $sql1 .= " AND accnt.active = 1 AND p.accountancy_code_sell=accnt.account_number"; $sql1 .= " AND fd.fk_code_ventilation = 0"; } + + dol_syslog("htdocs/accountancy/customer/index.php sql=" . $sql, LOG_DEBUG); $resql1 = $db->query($sql1); if (! $resql1) { @@ -93,7 +95,7 @@ if ($action == 'validatehistory') { llxHeader('', $langs->trans("CustomersVentilation")); $textprevyear = '' . img_previous() . ''; -$textnextyear = ' ' . img_next() . ''; +$textnextyear = ' ' . img_next() . ''; print_fiche_titre($langs->trans("CustomersVentilation") . " " . $textprevyear . " " . $langs->trans("Year") . " " . $year_start . " " . $textnextyear); @@ -105,6 +107,7 @@ $sql .= " , " . MAIN_DB_PREFIX . "facture as f"; $sql .= " WHERE fd.fk_code_ventilation = 0"; $sql .= " AND f.rowid = fd.fk_facture AND f.fk_statut = 1;"; +dol_syslog("htdocs/accountancy/customer/index.php sql=" . $sql, LOG_DEBUG); $result = $db->query($sql); if ($result) { $row = $db->fetch_row($result); @@ -160,6 +163,7 @@ if (! empty($conf->multicompany->enabled)) { $sql .= " GROUP BY fd.fk_code_ventilation"; +dol_syslog("htdocs/accountancy/customer/index.php sql=" . $sql, LOG_DEBUG); $resql = $db->query($sql); if ($resql) { $i = 0; @@ -194,7 +198,7 @@ print "\n"; print "
\n"; print ''; -print ''; +print ''; print ''; print ''; print ''; @@ -232,6 +236,7 @@ if (! empty($conf->multicompany->enabled)) { $sql .= " AND f.entity = '" . $conf->entity . "'"; } +dol_syslog('htdocs/accountancy/customer/index.php:: $sql=' . $sql); $resql = $db->query($sql); if ($resql) { $i = 0; @@ -303,7 +308,8 @@ if (! empty($conf->margin->enabled)) { if (! empty($conf->multicompany->enabled)) { $sql .= " AND f.entity = '" . $conf->entity . "'"; } - + + dol_syslog('htdocs/accountancy/customer/index.php:: $sql=' . $sql); $resql = $db->query($sql); if ($resql) { $i = 0; diff --git a/htdocs/accountancy/customer/lines.php b/htdocs/accountancy/customer/lines.php index 9215d5a9d98..01806db8332 100644 --- a/htdocs/accountancy/customer/lines.php +++ b/htdocs/accountancy/customer/lines.php @@ -133,7 +133,7 @@ if ($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_DONE > 0) { } $sql .= $db->plimit($limit + 1, $offset); -dol_syslog("/accountancy/customer/linges.php sql=" . $sql, LOG_DEBUG); +dol_syslog("/accountancy/customer/lines.php sql=" . $sql, LOG_DEBUG); $result = $db->query($sql); if ($result) { $num_lines = $db->num_rows($result); @@ -220,5 +220,5 @@ if ($result) { print "
' . $langs->trans("Total") . '
' . $langs->trans("TotalVente") . '' . $langs->trans("JanuaryMin") . '' . $langs->trans("FebruaryMin") . '' . $langs->trans("MarchMin") . '
"; -$db->close(); -llxFooter(); \ No newline at end of file +llxFooter(); +$db->close(); \ No newline at end of file diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php index 85ccdd3e619..3d4987bd94a 100644 --- a/htdocs/accountancy/customer/list.php +++ b/htdocs/accountancy/customer/list.php @@ -52,9 +52,25 @@ $formventilation = new FormVentilation($db); llxHeader('', $langs->trans("Ventilation")); +print ''; /* * Action -*/ + */ if ($action == 'ventil') { print '
' . $langs->trans("Processing") . '...
'; @@ -113,8 +129,8 @@ $sql .= " INNER JOIN " . MAIN_DB_PREFIX . "facturedet as l ON f.rowid = l.fk_fac $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product"; $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accountingaccount as aa ON p.accountancy_code_sell = aa.account_number"; $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_system as accsys ON accsys.pcg_version = aa.fk_pcg_version"; -$sql .= " WHERE f.fk_statut > 0 AND fk_code_ventilation = 0"; -$sql .= " AND (accsys.rowid='".$conf->global->CHARTOFACCOUNTS."' OR p.accountancy_code_sell IS NULL)"; +$sql .= " WHERE f.fk_statut > 0 AND fk_code_ventilation <= 0"; +$sql .= " AND (accsys.rowid='" . $conf->global->CHARTOFACCOUNTS . "' OR p.accountancy_code_sell IS NULL OR p.accountancy_code_sell ='')"; if (! empty($conf->multicompany->enabled)) { $sql .= " AND f.entity = '" . $conf->entity . "'"; } @@ -147,7 +163,7 @@ if ($result) { print '' . $langs->trans("Amount") . ''; print '' . $langs->trans("AccountAccounting") . ''; print '' . $langs->trans("IntoAccount") . ''; - print '' . $langs->trans("Ventilate") . ''; + print '' . $langs->trans("Ventilate") . '
/'.''; print ''; $facture_static = new Facture($db); diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index 754b4408b16..0417a87fc70 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -450,14 +450,14 @@ if ($action == 'writeBookKeeping') // export csv if ($action == 'export_csv') { - $sep = $conf->global->ACCOUNTING_SEPARATORCSV; + $sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV; header('Content-Type: text/csv'); header('Content-Disposition: attachment;filename=journal_banque.csv'); $companystatic = new Client($db); - if ($conf->global->ACCOUNTING_MODELCSV == 1) // Modèle Export Cegid Expert + if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 1) // Modèle Export Cegid Expert { foreach ( $tabpay as $key => $val ) { $date = dol_print_date($db->jdate($val["date"]), '%d%m%Y'); diff --git a/htdocs/accountancy/journal/cashjournal.php b/htdocs/accountancy/journal/cashjournal.php index 261cdd036c3..52b50789fdb 100644 --- a/htdocs/accountancy/journal/cashjournal.php +++ b/htdocs/accountancy/journal/cashjournal.php @@ -367,12 +367,12 @@ if ($action == 'writeBookKeeping') } // export csv if ($action == 'export_csv') { - $sep = $conf->global->ACCOUNTING_SEPARATORCSV; + $sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV; header('Content-Type: text/csv'); header('Content-Disposition:attachment;filename=journal_caisse.csv'); - if ($conf->global->ACCOUNTING_MODELCSV == 1) // Modèle Export Cegid Expert + if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 1) // Modèle Export Cegid Expert { foreach ( $tabpay as $key => $val ) { $date = dol_print_date($db->jdate($val["date"]), '%d%m%Y'); diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index 0e0b7c4281f..e7727df7add 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -185,8 +185,8 @@ if ($action == 'writebookkeeping') { foreach ( $tabht[$key] as $k => $mt ) { if ($mt) { // get compte id and label - $compte = new AccountingAccount($db); - if ($compte->fetch(null, $k)) { + $accountingaccount = new AccountingAccount($db); + if ($accountingaccount->fetch(null, $k)) { $bookkeeping = new BookKeeping($db); $bookkeeping->doc_date = $val["date"]; $bookkeeping->doc_ref = $val["ref"]; @@ -195,7 +195,7 @@ if ($action == 'writebookkeeping') { $bookkeeping->fk_doc = $key; $bookkeeping->fk_docdet = $val["fk_facturefourndet"]; $bookkeeping->code_tiers = ''; - $bookkeeping->label_compte = dol_trunc($val["description"], 128); + $bookkeeping->label_compte = $accountingaccount->label; $bookkeeping->numero_compte = $k; $bookkeeping->montant = $mt; $bookkeeping->sens = ($mt < 0) ? 'C' : 'D'; @@ -213,7 +213,6 @@ if ($action == 'writebookkeeping') { foreach ( $tabtva[$key] as $k => $mt ) { if ($mt) { // get compte id and label - $bookkeeping = new BookKeeping($db); $bookkeeping->doc_date = $val["date"]; $bookkeeping->doc_ref = $val["ref"]; @@ -246,12 +245,12 @@ $companystatic = new Fournisseur($db); // export csv if ($action == 'export_csv') { - $sep = $conf->global->ACCOUNTING_SEPARATORCSV; + $sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV; header('Content-Type: text/csv'); header('Content-Disposition: attachment;filename=journal_achats.csv'); - if ($conf->global->ACCOUNTING_MODELCSV == 1) // Modèle Export Cegid Expert + if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 1) // Modèle Export Cegid Expert { foreach ( $tabfac as $key => $val ) { $date = dol_print_date($db->jdate($val["date"]), '%d%m%Y'); @@ -314,11 +313,13 @@ if ($action == 'export_csv') // Product / Service foreach ( $tabht[$key] as $k => $mt ) { + $accountingaccount = new AccountingAccount($db); + $accountingaccount->fetch(null, $k); if ($mt) { print '"' . $date . '"' . $sep; print '"' . $val["ref"] . '"' . $sep; print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep; - print '"' . dol_trunc($val["description"], 32) . '"' . $sep; + print '"' . dol_trunc($accountingaccount->label, 32) . '"' . $sep; print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep; print '"' . ($mt < 0 ? price(- $mt) : '') . '"'; print "\n"; @@ -417,12 +418,15 @@ if ($action == 'export_csv') // Product / Service foreach ( $tabht[$key] as $k => $mt ) { + $accountingaccount = new AccountingAccount($db); + $accountingaccount->fetch(null, $k); + if ($mt) { print ""; print "" . $date . ""; print "" . $invoicestatic->getNomUrl(1) . ""; print "" . length_accountg($k) . ""; - print "" . $invoicestatic->description . ""; + print "" . $accountingaccount->label . ""; print '' . ($mt >= 0 ? price($mt) : '') . ""; print '' . ($mt < 0 ? price(- $mt) : '') . ""; print ""; diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php index 8a0318473c9..5737238ef07 100644 --- a/htdocs/accountancy/journal/sellsjournal.php +++ b/htdocs/accountancy/journal/sellsjournal.php @@ -151,7 +151,7 @@ if ($result) { $tabfac[$obj->rowid]["date"] = $obj->df; $tabfac[$obj->rowid]["ref"] = $obj->facnumber; $tabfac[$obj->rowid]["type"] = $obj->type; - $tabfac[$obj->rowid]["description"] = $obj->description; + $tabfac[$obj->rowid]["description"] = $obj->label_compte; $tabfac[$obj->rowid]["fk_facturedet"] = $obj->fdid; if (! isset($tabttc[$obj->rowid][$compta_soc])) $tabttc[$obj->rowid][$compta_soc] = 0; @@ -207,8 +207,8 @@ if ($action == 'writebookkeeping') { foreach ( $tabht[$key] as $k => $mt ) { if ($mt) { // get compte id and label - $compte = new AccountingAccount($db); - if ($compte->fetch(null, $k)) { + $accountingaccount = new AccountingAccount($db); + if ($accountingaccount->fetch(null, $k)) { $bookkeeping = new BookKeeping($db); $bookkeeping->doc_date = $val["date"]; $bookkeeping->doc_ref = $val["ref"]; @@ -218,7 +218,7 @@ if ($action == 'writebookkeeping') { $bookkeeping->fk_docdet = $val["fk_facturedet"]; $bookkeeping->code_tiers = ''; $bookkeeping->numero_compte = $k; - $bookkeeping->label_compte = dol_trunc($val["description"], 128); + $bookkeeping->label_compte = $accountingaccount->label; $bookkeeping->montant = $mt; $bookkeeping->sens = ($mt < 0) ? 'D' : 'C'; $bookkeeping->debit = ($mt < 0) ? $mt : 0; @@ -258,14 +258,14 @@ if ($action == 'writebookkeeping') { } // export csv if ($action == 'export_csv') { - $sep = $conf->global->ACCOUNTING_SEPARATORCSV; + $sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV; header('Content-Type: text/csv'); header('Content-Disposition: attachment;filename=journal_ventes.csv'); $companystatic = new Client($db); - if ($conf->global->ACCOUNTING_MODELCSV == 1) // Modèle Export Cegid Expert + if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 1) // Modèle Export Cegid Expert { foreach ( $tabfac as $key => $val ) { $companystatic->id = $tabcompany[$key]['id']; @@ -335,11 +335,14 @@ if ($action == 'export_csv') { // Product / Service foreach ( $tabht[$key] as $k => $mt ) { + $accountingaccount = new AccountingAccount($db); + $accountingaccount->fetch(null, $k); + if ($mt) { print '"' . $date . '"' . $sep; print '"' . $val["ref"] . '"' . $sep; print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep; - print '"' . dol_trunc($val["description"], 32) . '"' . $sep; + print '"' . dol_trunc($accountingaccount->label, 32) . '"' . $sep; print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep; print '"' . ($mt >= 0 ? price($mt) : '') . '"'; print "\n"; @@ -447,12 +450,15 @@ if ($action == 'export_csv') { // Product / Service foreach ( $tabht[$key] as $k => $mt ) { + $accountingaccount = new AccountingAccount($db); + $accountingaccount->fetch(null, $k); + if ($mt) { print ""; print "" . $date . ""; print "" . $invoicestatic->getNomUrl(1) . ""; print "" . length_accountg($k) . ""; - print "" . $invoicestatic->description . ""; + print "" . $accountingaccount->label . ""; print "" . ($mt < 0 ? price(- $mt) : '') . ""; print "" . ($mt >= 0 ? price($mt) : '') . ""; print ""; @@ -478,8 +484,8 @@ if ($action == 'export_csv') { } print ""; - - // End of page - llxFooter(); } + +llxFooter(); + $db->close(); diff --git a/htdocs/accountancy/supplier/card.php b/htdocs/accountancy/supplier/card.php index 45c8de9b165..1acd5829c45 100644 --- a/htdocs/accountancy/supplier/card.php +++ b/htdocs/accountancy/supplier/card.php @@ -4,7 +4,7 @@ * Copyright (C) 2013-2014 Alexandre Spangaro * Copyright (C) 2013-2014 Olivier Geffroy * Copyright (C) 2013-2014 Florian Henry - * Copyright (C) 2014 Juanjo Menent s + * Copyright (C) 2014 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 diff --git a/htdocs/accountancy/supplier/index.php b/htdocs/accountancy/supplier/index.php index edebcfd9d46..85d1c04cf53 100644 --- a/htdocs/accountancy/supplier/index.php +++ b/htdocs/accountancy/supplier/index.php @@ -21,7 +21,7 @@ /** * \file htdocs/accountancy/supplier/index.php * \ingroup Accounting Expert - * \brief Page accueil ventilation + * \brief Home supplier ventilation */ require '../../main.inc.php'; @@ -93,9 +93,9 @@ if ($action == 'validatehistory') { llxHeader('', $langs->trans("SuppliersVentilation")); $textprevyear = '' . img_previous() . ''; -$textnextyear = ' ' . img_next() . ''; +$textnextyear = ' ' . img_next() . ''; -print_fiche_titre($langs->trans("SuppliersVentilation") . " " . $textprevyear . " " . $langs->trans("Year") . " " . $year_start . " " . $textnextyear); +print_fiche_titre($langs->trans("SuppliersVentilation") . " " . $textprevyear . " " . $langs->trans("Year") . " " . $year_start . " " . $textnextyear); print '' . $langs->trans("DescVentilSupplier") . ''; print ''; @@ -105,7 +105,7 @@ $y = $year_current; $var = true; print ''; -print ''; +print ''; print ''; print ''; print ''; diff --git a/htdocs/accountancy/supplier/lines.php b/htdocs/accountancy/supplier/lines.php index 8b2a870220d..5df5ee0c06f 100644 --- a/htdocs/accountancy/supplier/lines.php +++ b/htdocs/accountancy/supplier/lines.php @@ -1,7 +1,5 @@ - * Copyright (C) 2005 Simon TOSSER - * Copyright (C) 2013-2014 Olivier Geffroy +/* Copyright (C) 2013-2014 Olivier Geffroy * Copyright (C) 2013-2014 Alexandre Spangaro * Copyright (C) 2014 Ari Elbaz (elarifr) * Copyright (C) 2013-2014 Florian Henry @@ -48,6 +46,7 @@ if ($user->societe_id > 0) if (! $user->rights->accounting->ventilation->dispatch) accessforbidden(); + $formventilation = new FormVentilation($db); $changeaccount = GETPOST('changeaccount'); @@ -107,7 +106,7 @@ $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product $sql .= " WHERE f.rowid = l.fk_facture_fourn and f.fk_statut >= 1 AND l.fk_code_ventilation <> 0 "; $sql .= " AND aa.rowid = l.fk_code_ventilation"; if (strlen(trim($_GET["search_facture"]))) { - $sql .= " AND f.facnumber like '%" . $_GET["search_facture"] . "%'"; + $sql .= " AND f.ref like '%" . $_GET["search_facture"] . "%'"; } if (strlen(trim($_GET["search_ref"]))) { $sql .= " AND p.ref like '%" . $_GET["search_ref"] . "%'"; @@ -218,7 +217,8 @@ if ($result) { print $db->error(); } + print "
' . $langs->trans("Account") . '
' . $langs->trans("Account") . '' . $langs->trans("Label") . '' . $langs->trans("JanuaryMin") . '' . $langs->trans("FebruaryMin") . '
"; -$db->close(); -llxFooter(); \ No newline at end of file +llxFooter(); +$db->close(); \ No newline at end of file diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php index f932fbfc8af..a85dd7a17d4 100644 --- a/htdocs/accountancy/supplier/list.php +++ b/htdocs/accountancy/supplier/list.php @@ -22,7 +22,7 @@ /** * \file htdocs/accountancy/supplier/list.php * \ingroup Accounting Expert - * \brief Page de ventilation des lignes de facture + * \brief Ventilation page from suppliers invoices */ require '../../main.inc.php'; @@ -53,6 +53,22 @@ $formventilation = new FormVentilation($db); llxHeader('', $langs->trans("Ventilation")); +print ''; /* * Action */ @@ -115,8 +131,8 @@ $sql .= " INNER JOIN " . MAIN_DB_PREFIX . "facture_fourn_det as l ON f.rowid = l $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product"; $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accountingaccount as aa ON p.accountancy_code_buy = aa.account_number"; $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_system as accsys ON accsys.pcg_version = aa.fk_pcg_version"; -$sql .= " WHERE f.fk_statut > 0 AND fk_code_ventilation = 0"; -$sql .= " AND (accsys.rowid='".$conf->global->CHARTOFACCOUNTS."' OR p.accountancy_code_sell IS NULL)"; +$sql .= " WHERE f.fk_statut > 0 AND fk_code_ventilation <= 0"; +$sql .= " AND (accsys.rowid='".$conf->global->CHARTOFACCOUNTS."' OR p.accountancy_code_sell IS NULL OR p.accountancy_code_buy ='')"; if (! empty($conf->multicompany->enabled)) { $sql .= " AND f.entity = '" . $conf->entity . "'"; @@ -150,7 +166,7 @@ if ($result) { print '' . $langs->trans("Amount") . ''; print '' . $langs->trans("Compte") . ''; print '' . $langs->trans("IntoAccount") . ''; - print '' . $langs->trans("Ventilate") . ''; + print '' . $langs->trans("Ventilate") . '
/'.''; print "\n"; $facturefourn_static = new FactureFournisseur($db); @@ -161,6 +177,23 @@ if ($result) { while ( $i < min($num_lines, $limit) ) { $objp = $db->fetch_object($result); $var = ! $var; + + // product_type: 0 = service ? 1 = product + // if product does not exist we use the value of product_type provided in facturedet to define if this is a product or service + // issue : if we change product_type value in product DB it should differ from the value stored in facturedet DB ! + $code_buy_notset = ''; + + if (empty($objp->code_buy)) { + $code_buy_notset = 'color:red'; + if ($objp->type == 1) { + $objp->code_buy = (! empty($conf->global->COMPTA_SERVICE_BUY_ACCOUNT) ? $conf->global->COMPTA_SERVICE_BUY_ACCOUNT : $langs->trans("CodeNotDef")); + } else { + $objp->code_buy = (! empty($conf->global->COMPTA_PRODUCT_BUY_ACCOUNT) ? $conf->global->COMPTA_PRODUCT_BUY_ACCOUNT : $langs->trans("CodeNotDef")); + } + }else { + $code_buy_notset = 'color:blue'; + } + print ""; // Ref facture @@ -191,7 +224,7 @@ if ($result) { print price($objp->price); print ''; - print ''; + print ''; print $objp->code_buy; print ''; @@ -216,4 +249,4 @@ if ($result) { } llxFooter(); -$db->close(); +$db->close(); \ No newline at end of file diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index f4459adec9f..98d971acbd0 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -1563,7 +1563,10 @@ class Adherent extends CommonObject global $langs; $result=''; - $label=$langs->trans("ShowMember").': '.$this->ref; + $label = '' . $langs->trans("ShowMember") . ''; + $label.= '
' . $langs->trans('Ref') . ': ' . $this->ref; + if (! empty($this->firstname) || ! empty($this->lastname)) + $label.= '
' . $langs->trans('Name') . ': ' . $this->getFullName($langs); $linkclose = '" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">'; if ($option == 'card') diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index 6ebf107ffbe..fb685b3d74b 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -63,6 +63,7 @@ if ($action == 'update') dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_HOURS", $_POST["MAIN_DEFAULT_WORKING_HOURS"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_SHOW_LOGO", $_POST["MAIN_SHOW_LOGO"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_ACTIVATE_HTML5", $_POST["MAIN_ACTIVATE_HTML5"],'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_ACTIVATE_FILECACHE", $_POST["MAIN_ACTIVATE_FILECACHE"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_FIRSTNAME_NAME_POSITION", $_POST["MAIN_FIRSTNAME_NAME_POSITION"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_THEME", $_POST["main_theme"],'chaine',0,'',$conf->entity); @@ -173,7 +174,7 @@ if ($action == 'edit') // Edit print ''; print ' '; print ''; - + // Activate Html5 - Developement - Only available on Eldy template if ($conf->global->MAIN_FEATURES_LEVEL == 2 || ! empty($conf->global->MAIN_ACTIVATE_HTML5)) { @@ -185,6 +186,16 @@ if ($action == 'edit') // Edit print ''; } + // Activate FileCache - Developement + if ($conf->global->MAIN_FEATURES_LEVEL == 2 || ! empty($conf->global->MAIN_ACTIVATE_FILECACHE)) { + $var=!$var; + print ''.$langs->trans("EnableFileCache").''; + print $form->selectyesno('MAIN_ACTIVATE_FILECACHE',$conf->global->MAIN_ACTIVATE_FILECACHE,1); + print ''; + print ' '; + print ''; + } + // Max size of lists $var=!$var; print ''.$langs->trans("DefaultMaxSizeList").''; @@ -363,7 +374,7 @@ else // Show print ''.$langs->trans("EnableShowLogo").'' . yn($conf->global->MAIN_SHOW_LOGO) . ''; print ' '; print ""; - + // Activate Html5 - Developement - Only available on Eldy template if ($conf->global->MAIN_FEATURES_LEVEL == 2 || ! empty($conf->global->MAIN_ACTIVATE_HTML5)) { @@ -373,6 +384,14 @@ else // Show print ""; } + // Activate FileCache - Developement + if ($conf->global->MAIN_FEATURES_LEVEL == 2 || ! empty($conf->global->MAIN_ACTIVATE_FILECACHE)) { + $var=!$var; + print ''.$langs->trans("EnableFileCache").'' . yn($conf->global->MAIN_ACTIVATE_FILECACHE) . ''; + print ' '; + print ""; + } + $var=!$var; print ''.$langs->trans("DefaultMaxSizeList").'' . $conf->global->MAIN_SIZE_LISTE_LIMIT . ''; print ' '; diff --git a/htdocs/admin/menus.php b/htdocs/admin/menus.php index c5fb55cbce5..0fe8b933d1f 100644 --- a/htdocs/admin/menus.php +++ b/htdocs/admin/menus.php @@ -65,7 +65,7 @@ error_reporting($err); if ($action == 'update' && empty($_POST["cancel"])) { $_SESSION["mainmenu"]="home"; // Le gestionnaire de menu a pu changer - + dolibarr_set_const($db, "MAIN_MENU_STANDARD", $_POST["MAIN_MENU_STANDARD"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MENU_SMARTPHONE", $_POST["MAIN_MENU_SMARTPHONE"],'chaine',0,'',$conf->entity); @@ -89,11 +89,11 @@ if ($action == 'update' && empty($_POST["cancel"])) $file='init_menu_'.$key.'.sql'; $fullpath=dol_buildpath($dirmenu.$file); //print 'action='.$action.' Search menu into fullpath='.$fullpath.'
';exit; - + if (file_exists($fullpath)) { $db->begin(); - + $result=run_sql($fullpath,1,'',1,$key,'none'); if ($result > 0) { @@ -152,6 +152,10 @@ $head[$h][2] = 'misc'; $h++; +print '
'; +print ''; +print ''; + dol_fiche_head($head, 'handler', $langs->trans("Menus")); print $langs->trans("MenusDesc")."
\n"; @@ -160,10 +164,6 @@ print "
\n"; if ($action == 'edit') { - print ''; - print ''; - print ''; - clearstatcache(); // Gestionnaires de menu @@ -202,14 +202,6 @@ if ($action == 'edit') print ''; print ''; - - print '
'; - print ''; - print '     '; - print ''; - print '
'; - - print '
'; } else { @@ -264,7 +256,21 @@ else print ''; } -print '
'; +dol_fiche_end(); + + +if ($action == 'edit') +{ + print '
'; + print ''; + print '       '; + print ''; + print '
'; +} + +print ''; + + if ($action != 'edit') { diff --git a/htdocs/cache.manifest b/htdocs/cache.manifest index e46443bb86b..617d40ed1e3 100644 --- a/htdocs/cache.manifest +++ b/htdocs/cache.manifest @@ -14,7 +14,6 @@ support/index.php support/online.php support/default.css -support/dolibarr_logo2.png support/headbg.jpg support/helpcenter.png support/internet.png diff --git a/htdocs/categories/categorie.php b/htdocs/categories/categorie.php index a77751fcb29..61ab169029f 100644 --- a/htdocs/categories/categorie.php +++ b/htdocs/categories/categorie.php @@ -289,7 +289,8 @@ if ($socid) if ($soc->country) { print ''.$langs->trans('Country').''; - $img=picto_from_langcode($soc->country_code); + //$img=picto_from_langcode($soc->country_code); + $img=''; print ($img?$img.' ':''); print $soc->country; print ''; diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index faa4109f736..fa5ff5481cc 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -36,7 +36,6 @@ require_once DOL_DOCUMENT_ROOT.'/comm/action/class/cactioncomm.class.php'; require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; - if (! empty($conf->projet->enabled)) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; @@ -541,6 +540,7 @@ $help_url='EN:Module_Agenda_En|FR:Module_Agenda|ES:M&omodulodulo_Agenda'; llxHeader('',$langs->trans("Agenda"),$help_url); $form = new Form($db); +$formfile = new FormFile($db); $formactions = new FormActions($db); if ($action == 'create') @@ -881,15 +881,15 @@ if ($id > 0) // Date start print ''.$langs->trans("DateActionStart").''; - if (GETPOST("afaire") == 1) $form->select_date($object->datep,'ap',1,1,0,"action",1,1,0,0,'fulldaystart'); - else if (GETPOST("afaire") == 2) $form->select_date($object->datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart'); - else $form->select_date($object->datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart'); + if (GETPOST("afaire") == 1) $form->select_date($datep?$datep:$object->datep,'ap',1,1,0,"action",1,1,0,0,'fulldaystart'); + else if (GETPOST("afaire") == 2) $form->select_date($datep?$datep:$object->datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart'); + else $form->select_date($datep?$datep:$object->datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart'); print ''; // Date end print ''.$langs->trans("DateActionEnd").''; - if (GETPOST("afaire") == 1) $form->select_date($object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); - else if (GETPOST("afaire") == 2) $form->select_date($object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); - else $form->select_date($object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); + if (GETPOST("afaire") == 1) $form->select_date($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); + else if (GETPOST("afaire") == 2) $form->select_date($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); + else $form->select_date($datef?$datef:$object->datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); print ''; // Status @@ -1290,7 +1290,7 @@ if ($id > 0) if (empty($conf->global->AGENDA_DISABLE_BUILDDOC)) { - print '
 
'; + print '
 

'; print ''; // ancre /* diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index d7f63d31872..8b93610e85e 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -897,9 +897,11 @@ class ActionComm extends CommonObject global $conf,$langs; $result=''; - $label=$this->label; + $tooltip = '' . $langs->trans('ShowAction'.$objp->code) . ''; + $tooltip .= '
' . $langs->trans('Ref') . ': ' . $this->label; + $label = $this->label; if (empty($label)) $label=$this->libelle; // For backward compatibility - $linkclose = '" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">'; + $linkclose = '" title="'.dol_escape_htmltag($tooltip, 1).'" class="classfortooltip">'; if ($option=='birthday') $lien = 'type_code) != "Action".$this->type_code)?$langs->transnoentities("Action".$this->type_code):$this->type_label; $libelleshort=dol_trunc($libelle,$maxlength); diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index a8ed1181bd9..5fa4995a623 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -339,7 +339,7 @@ dol_fiche_end(); $showextcals=$listofextcals; // Legend -if ($conf->use_javascript_ajax) +if (! empty($conf->use_javascript_ajax)) { $s=''; $s.='' . "\n"; - if (! empty($conf->use_javascript_ajax)) + + $s.='
' . $langs->trans("LocalAgenda").'  
'; + if (is_array($showextcals) && count($showextcals) > 0) { - $s.='
' . $langs->trans("LocalAgenda").'  
'; - if (is_array($showextcals) && count($showextcals) > 0) + foreach ($showextcals as $val) { - foreach ($showextcals as $val) - { - $htmlname = dol_string_nospecial($val['name']); - $s.='' . "\n"; - $s.='
' . $val ['name'] . '  
'; - } + $htmlname = dol_string_nospecial($val['name']); + $s.='' . "\n"; + $s.='
' . $val ['name'] . '  
'; } } $s.='
'.$langs->trans("AgendaShowBirthdayEvents").'  
'; @@ -1092,11 +1090,12 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa global $theme_datacolor; global $cachethirdparties, $cachecontacts, $cacheusers, $colorindexused; - print '
'."\n"; + print "\n".'
'; // Line with title of day $curtime = dol_mktime(0, 0, 0, $month, $day, $year); - print ''; + print '
'."\n"; + print ''; + print ''."\n"; // Line with td contains all div of each events print '
'; print ''; } - print '
'; @@ -1171,11 +1170,11 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa $numicals[dol_string_nospecial($event->icalname)]++; } $color=$event->icalcolor; - $cssclass=(! empty($event->icalname)?'family_'.dol_string_nospecial($event->icalname):'family_other unsortable'); + $cssclass=(! empty($event->icalname)?'family_'.dol_string_nospecial($event->icalname):'family_other unmovable'); } else if ($event->type_code == 'BIRTHDAY') { - $numbirthday++; $colorindex=2; $cssclass='family_birthday unsortable'; $color=sprintf("%02x%02x%02x",$theme_datacolor[$colorindex][0],$theme_datacolor[$colorindex][1],$theme_datacolor[$colorindex][2]); + $numbirthday++; $colorindex=2; $cssclass='family_birthday unmovable'; $color=sprintf("%02x%02x%02x",$theme_datacolor[$colorindex][0],$theme_datacolor[$colorindex][1],$theme_datacolor[$colorindex][2]); } else { @@ -1213,32 +1212,35 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa $cssclass=$cssclass.' '.$cssclass.'_day_'.$ymd; // Defined style to disable drag and drop feature - if ($event->date_end_in_calendar && date('Ymd',$event->date_start_in_calendar) != date('Ymd',$event->date_end_in_calendar)) + if ($event->type_code =='AC_OTH_AUTO') + { + $cssclass.= " unmovable"; + } + else if ($event->date_end_in_calendar && date('Ymd',$event->date_start_in_calendar) != date('Ymd',$event->date_end_in_calendar)) { $tmpyearend = date('Y',$event->date_end_in_calendar); $tmpmonthend = date('m',$event->date_end_in_calendar); $tmpdayend = date('d',$event->date_end_in_calendar); if ($tmpyearend == $annee && $tmpmonthend == $mois && $tmpdayend == $jour) { - $cssclass.= " unsortable"; + $cssclass.= " unmovable"; } } - if ($event->type_code =='AC_OTH_AUTO') - { - $cssclass.= " unsortable"; - } + else $cssclass.= " movable"; $h=''; $nowrapontd=1; if ($action == 'show_day') { $h='height: 100%; '; $nowrapontd=0; } if ($action == 'show_week') { $h='height: 100%; '; $nowrapontd=0; } // Show rect of event - print '
'; - print '
  • '; + print '
      '; // always 1 li per ul, 1 ul per event + print '
    • '; print ''; print ''; - print '
      '; - print '
'."\n"; + + print '
'."\n"; } diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index 4e1de9768ac..5813762aece 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -205,6 +205,8 @@ if ($action == 'show_day' || $action == 'show_week' || $action == 'show_month' | $param.="&maxprint=".$maxprint; $prev = dol_get_first_day_week($day, $month, $year); +//print "day=".$day." month=".$month." year=".$year; +//var_dump($prev); exit; $prev_year = $prev['prev_year']; $prev_month = $prev['prev_month']; $prev_day = $prev['prev_day']; @@ -223,6 +225,7 @@ $next_day = $next['day']; // Define firstdaytoshow and lastdaytoshow (warning: lastdaytoshow is last second to show + 1) $firstdaytoshow=dol_mktime(0,0,0,$first_month,$first_day,$first_year); $lastdaytoshow=dol_time_plus_duree($firstdaytoshow, 7, 'd'); +//print $firstday.'-'.$first_month.'-'.$first_year; //print dol_print_date($firstdaytoshow,'dayhour'); //print dol_print_date($lastdaytoshow,'dayhour'); @@ -534,12 +537,16 @@ echo '' ; echo ''; -// Table : +// Line header with list of days + +//print "begin_d=".$begin_d." end_d=".$end_d; + + echo ''; echo ''; echo ''; -$i=0; +$i=0; // 0 = sunday, while ($i < 7) { if (($i + 1) < $begin_d || ($i + 1) > $end_d) @@ -679,7 +686,7 @@ foreach ($usernames as $username) // Lopp on each day of week $i = 0; - for ($iter_day = 0; $iter_day < 7; $iter_day++) + for ($iter_day = 0; $iter_day < 8; $iter_day++) { if (($i + 1) < $begin_d || ($i + 1) > $end_d) { diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index 8fdab8115a6..dc74935ce98 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -265,7 +265,8 @@ if ($id > 0) print '"; print '"; print '\n"; print ''; @@ -749,15 +764,18 @@ if ($id > 0) { $facturestatic = new Facture($db); - $sql = 'SELECT f.rowid as facid, f.facnumber, f.type, f.amount, f.total, f.total_ttc,'; - $sql.= ' f.datef as df, f.datec as dc, f.paye as paye, f.fk_statut as statut,'; - $sql.= ' s.nom, s.rowid as socid,'; - $sql.= ' SUM(pf.amount) as am'; + $sql = 'SELECT f.rowid as facid, f.facnumber, f.type, f.amount'; + $sql.= ', f.total'; + $sql.= ', f.tva as total_tva'; + $sql.= ', f.total_ttc'; + $sql.= ', f.datef as df, f.datec as dc, f.paye as paye, f.fk_statut as statut'; + $sql.= ', s.nom, s.rowid as socid'; + $sql.= ', SUM(pf.amount) as am'; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f"; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'paiement_facture as pf ON f.rowid=pf.fk_facture'; $sql.= " WHERE f.fk_soc = s.rowid AND s.rowid = ".$object->id; $sql.= " AND f.entity = ".$conf->entity; - $sql.= ' GROUP BY f.rowid, f.facnumber, f.type, f.amount, f.total, f.total_ttc,'; + $sql.= ' GROUP BY f.rowid, f.facnumber, f.type, f.amount, f.total, f.tva, f.total_ttc,'; $sql.= ' f.datef, f.datec, f.paye, f.fk_statut,'; $sql.= ' s.nom, s.rowid'; $sql.= " ORDER BY f.datef DESC, f.datec DESC"; @@ -786,9 +804,12 @@ if ($id > 0) $var=!$var; print ""; print ''; if ($objp->df > 0) diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index 5e2cc35e796..666ce7e355c 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -142,7 +142,7 @@ if (! empty($conf->ficheinter->enabled) && $user->rights->ficheinter->lire) */ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) { - $sql = "SELECT p.rowid, p.ref, p.ref_client, p.total_ht, s.rowid as socid, s.nom as name, s.client, s.canvas"; + $sql = "SELECT p.rowid, p.ref, p.ref_client, p.total_ht, p.tva as total_tva, p.total as total_ttc, s.rowid as socid, s.nom as name, s.client, s.canvas"; $sql.= " FROM ".MAIN_DB_PREFIX."propal as p"; $sql.= ", ".MAIN_DB_PREFIX."societe as s"; if (! $user->rights->societe->client->voir && ! $socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; @@ -173,6 +173,9 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) $propalstatic->id=$obj->rowid; $propalstatic->ref=$obj->ref; $propalstatic->ref_client=$obj->ref_client; + $propalstatic->total_ht = $obj->total_ht; + $propalstatic->total_tva = $obj->total_tva; + $propalstatic->total_ttc = $obj->total_ttc; print $propalstatic->getNomUrl(1); print ''; print ''; print ''; + $out.= "\n"; + //$out.= "
'.$langs->trans("Country").''; if (! empty($object->country_code)) { - $img=picto_from_langcode($object->country_code); + //$img=picto_from_langcode($object->country_code); + $img=''; if ($object->isInEEC()) print $form->textwithpicto(($img?$img.' ':'').$object->country,$langs->trans("CountryIsInEEC"),1,0); else print ($img?$img.' ':'').$object->country; } @@ -500,8 +501,11 @@ if ($id > 0) { $propal_static = new Propal($db); - $sql = "SELECT s.nom, s.rowid, p.rowid as propalid, p.fk_statut, p.total_ht, p.ref, p.remise, "; - $sql.= " p.datep as dp, p.fin_validite as datelimite"; + $sql = "SELECT s.nom, s.rowid, p.rowid as propalid, p.fk_statut, p.total_ht"; + $sql.= ", p.tva as total_tva"; + $sql.= ", p.total as total_ttc"; + $sql.= ", p.ref, p.ref_client, p.remise"; + $sql.= ", p.datep as dp, p.fin_validite as datelimite"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."propal as p, ".MAIN_DB_PREFIX."c_propalst as c"; $sql.= " WHERE p.fk_soc = s.rowid AND p.fk_statut = c.id"; $sql.= " AND s.rowid = ".$object->id; @@ -532,8 +536,12 @@ if ($id > 0) $var=!$var; print "
'; - $propal_static->id=$objp->propalid; - $propal_static->ref=$objp->ref; + $propal_static->id = $objp->propalid; + $propal_static->ref = $objp->ref; + $propal_static->ref_client = $objp->ref_client; + $propal_static->total_ht = $objp->total_ht; + $propal_static->total_tva = $objp->total_tva; + $propal_static->total_ttc = $objp->total_ttc; print $propal_static->getNomUrl(1); if ( ($db->jdate($objp->dp) < ($now - $conf->propal->cloture->warning_delay)) && $objp->fk_statut == 1 ) { print " ".img_warning(); @@ -560,9 +568,12 @@ if ($id > 0) { $commande_static=new Commande($db); - $sql = "SELECT s.nom, s.rowid,"; - $sql.= " c.rowid as cid, c.total_ht, c.ref, c.fk_statut, c.facture,"; - $sql.= " c.date_commande as dc"; + $sql = "SELECT s.nom, s.rowid"; + $sql.= ", c.rowid as cid, c.total_ht"; + $sql.= ", c.tva as total_tva"; + $sql.= ", c.total_ttc"; + $sql.= ", c.ref, c.ref_client, c.fk_statut, c.facture"; + $sql.= ", c.date_commande as dc"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."commande as c"; $sql.= " WHERE c.fk_soc = s.rowid "; $sql.= " AND s.rowid = ".$object->id; @@ -609,8 +620,12 @@ if ($id > 0) $var=!$var; print "
'; - $commande_static->id=$objp->cid; - $commande_static->ref=$objp->ref; + $commande_static->id = $objp->cid; + $commande_static->ref = $objp->ref; + $commande_static->ref_client=$objp->ref_client; + $commande_static->total_ht = $objp->total_ht; + $commande_static->total_tva = $objp->total_tva; + $commande_static->total_ttc = $objp->total_ttc; print $commande_static->getNomUrl(1); print ''.dol_print_date($db->jdate($objp->dc),'day')."'.price($objp->total_ht).'
'; - $facturestatic->id=$objp->facid; - $facturestatic->ref=$objp->facnumber; - $facturestatic->type=$objp->type; + $facturestatic->id = $objp->facid; + $facturestatic->ref = $objp->facnumber; + $facturestatic->type = $objp->type; + $facturestatic->total_ht = $objp->total; + $facturestatic->total_tva = $objp->total_tva; + $facturestatic->total_ttc = $objp->total_ttc; print $facturestatic->getNomUrl(1); print ''; @@ -210,7 +213,7 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire) { $langs->load("orders"); - $sql = "SELECT c.rowid, c.ref, c.ref_client, c.total_ttc, s.rowid as socid, s.nom as name, s.client, s.canvas"; + $sql = "SELECT c.rowid, c.ref, c.ref_client, c.total_ht, c.tva as total_tva, c.total_ttc, s.rowid as socid, s.nom as name, s.client, s.canvas"; $sql.= " FROM ".MAIN_DB_PREFIX."commande as c"; $sql.= ", ".MAIN_DB_PREFIX."societe as s"; if (! $user->rights->societe->client->voir && ! $socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; @@ -241,6 +244,9 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire) $orderstatic->id=$obj->rowid; $orderstatic->ref=$obj->ref; $orderstatic->ref_client=$obj->ref_client; + $orderstatic->total_ht = $obj->total_ht; + $orderstatic->total_tva = $obj->total_tva; + $orderstatic->total_ttc = $obj->total_ttc; print $orderstatic->getNomUrl(1); print ''; @@ -469,7 +475,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) { $langs->load("propal"); - $sql = "SELECT s.nom as name, s.rowid, p.rowid as propalid, p.total as total_ttc, p.total_ht, p.ref, p.ref_client, p.fk_statut, p.datep as dp, p.fin_validite as dfv"; + $sql = "SELECT s.nom as name, s.rowid, p.rowid as propalid, p.total as total_ttc, p.total_ht, p.tva as total_tva, p.ref, p.ref_client, p.fk_statut, p.datep as dp, p.fin_validite as dfv"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= ", ".MAIN_DB_PREFIX."propal as p"; if (! $user->rights->societe->client->voir && ! $socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; @@ -506,6 +512,9 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) $propalstatic->id=$obj->propalid; $propalstatic->ref=$obj->ref; $propalstatic->ref_client=$obj->ref_client; + $propalstatic->total_ht = $obj->total_ht; + $propalstatic->total_tva = $obj->total_tva; + $propalstatic->total_ttc = $obj->total_ttc; print ''; print '"; // Project - if (! empty($conf->projet->enabled) && $socid > 0) { - + if (! empty($conf->projet->enabled) && $socid > 0) + { $formproject = new FormProjets($db); $projectid = 0; @@ -1398,9 +1398,9 @@ if ($action == 'create') $projectid = ($originid ? $originid : 0); print ''; - print ''; print ''; - // Ligne info remises tiers + // Lin for thirdparty discounts print ''; // Project - if (! empty($conf->projet->enabled)) { + if (! empty($conf->projet->enabled)) + { $langs->load("projects"); print ''; } else { @@ -1903,7 +1905,7 @@ if ($action == 'create') print ''; diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index f68a1f4f708..8fae698ba94 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -2606,9 +2606,17 @@ class Propal extends CommonObject global $langs; $result=''; - $label=$langs->trans("ShowPropal").': '.$this->ref; + $label = '' . $langs->trans("ShowPropal") . ''; + if (! empty($this->ref)) + $label.= '
'.$langs->trans('Ref').': '.$this->ref; if (! empty($this->ref_client)) - $label.= '
'.$langs->trans('RefCustomer').': '.$this->ref_client; + $label.= '
'.$langs->trans('RefCustomer').': '.$this->ref_client; + if (! empty($this->total_ht)) + $label.= '
' . $langs->trans('AmountHT') . ': ' . price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency); + if (! empty($this->total_tva)) + $label.= '
' . $langs->trans('TVA') . ': ' . price($this->total_tva, 0, $langs, 0, -1, -1, $conf->currency); + if (! empty($this->total_ttc)) + $label.= '
' . $langs->trans('AmountTTC') . ': ' . price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency); $linkclose = '" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">'; if ($option == '') { $lien = 'ref; ?> + > + '; // Project - if (! empty($conf->projet->enabled) && $socid > 0) { + if (! empty($conf->projet->enabled) && $socid > 0) + { $formproject = new FormProjets($db); print ''; } diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 8bd00764a57..27c320b3326 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -2887,10 +2887,18 @@ class Commande extends CommonOrder if ($short) return $url; - $picto='order'; - $label=$langs->trans("ShowOrder").': '.$this->ref; + $picto = 'order'; + $label = '' . $langs->trans("ShowOrder") . ''; + if (! empty($this->ref)) + $label .= '
' . $langs->trans('Ref') . ': ' . $this->ref; if (! empty($this->ref_client)) - $label.= '
'.$langs->trans('RefCustomer').': '.$this->ref_client; + $label.= '
' . $langs->trans('RefCustomer') . ': ' . $this->ref_client; + if (! empty($this->total_ht)) + $label.= '
' . $langs->trans('AmountHT') . ': ' . price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency); + if (! empty($this->total_tva)) + $label.= '
' . $langs->trans('TVA') . ': ' . price($this->total_tva, 0, $langs, 0, -1, -1, $conf->currency); + if (! empty($this->total_ttc)) + $label.= '
' . $langs->trans('AmountTTC') . ': ' . price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency); $linkstart = ''; $linkend=''; @@ -3099,7 +3107,8 @@ class Commande extends CommonOrder $sql.= ' l.total_ht, l.total_tva, l.total_ttc, l.fk_product_fournisseur_price as fk_fournprice, l.buy_price_ht as pa_ht, l.localtax1_tx, l.localtax2_tx,'; $sql.= ' l.date_start, l.date_end,'; $sql.= ' p.label as product_label, p.ref, p.fk_product_type, p.rowid as prodid, '; - $sql.= ' p.description as product_desc, p.stock as stock_reel'; + $sql.= ' p.description as product_desc, p.stock as stock_reel,'; + $sql.= ' p.entity'; $sql.= ' FROM '.MAIN_DB_PREFIX.'commandedet as l'; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON l.fk_product=p.rowid'; $sql.= ' WHERE l.fk_commande = '.$this->id; @@ -3121,6 +3130,7 @@ class Commande extends CommonOrder $this->lines[$i]->description = $obj->description; $this->lines[$i]->fk_product = $obj->fk_product; $this->lines[$i]->ref = $obj->ref; + $this->lines[$i]->entity = $obj->entity; // Product entity $this->lines[$i]->product_label = $obj->product_label; $this->lines[$i]->product_desc = $obj->product_desc; $this->lines[$i]->fk_product_type = $obj->fk_product_type; diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 2c30f4128c6..8374547eaf1 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -6,6 +6,7 @@ * Copyright (C) 2012 Juanjo Menent * Copyright (C) 2013 Christophe Battarel * Copyright (C) 2013 Cédric Salvador + * Copyright (C) 2015 Frederic France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -109,7 +110,7 @@ $companystatic = new Societe($db); $help_url="EN:Module_Customers_Orders|FR:Module_Commandes_Clients|ES:Módulo_Pedidos_de_clientes"; llxHeader('',$langs->trans("Orders"),$help_url); -$sql = 'SELECT s.nom as name, s.rowid as socid, s.client, c.rowid, c.ref, c.total_ht, c.ref_client,'; +$sql = 'SELECT s.nom as name, s.rowid as socid, s.client, s.code_client, c.rowid, c.ref, c.total_ht, c.tva as total_tva, c.total_ttc, c.ref_client,'; $sql.= ' c.date_valid, c.date_commande, c.note_private, c.date_livraison, c.fk_statut, c.facture as facturee'; $sql.= ' FROM '.MAIN_DB_PREFIX.'societe as s'; $sql.= ', '.MAIN_DB_PREFIX.'commande as c'; @@ -323,6 +324,7 @@ if ($resql) $var=true; $total=0; $subtotal=0; + $productstat_cache=array(); $generic_commande = new Commande($db); $generic_product = new Product($db); @@ -334,6 +336,10 @@ if ($resql) $generic_commande->id=$objp->rowid; $generic_commande->ref=$objp->ref; + $generic_commande->ref_client = $objp->ref_client; + $generic_commande->total_ht = $objp->total_ht; + $generic_commande->total_tva = $objp->total_tva; + $generic_commande->total_ttc = $objp->total_ttc; $generic_commande->lines=array(); $generic_commande->getLinesArray(); @@ -351,17 +357,32 @@ if ($resql) if ($generic_commande->lines[$lig]->product_type==0) { $nbprod++; // order contains real products $generic_product->id = $generic_commande->lines[$lig]->fk_product; - $generic_product->load_stock(); + if (empty($productstat_cache[$generic_commande->lines[$lig]->fk_product])) { + $generic_product->load_stock(true); + $productstat_cache[$generic_commande->lines[$lig]->fk_product]['stock_reel'] = $generic_product->stock_reel; + } else { + $generic_product->stock_reel = $productstat_cache[$generic_commande->lines[$lig]->fk_product]['stock_reel']; + } // stock order and stock order_supplier $stock_order=0; $stock_order_supplier=0; if (! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT)) { if (! empty($conf->commande->enabled)) { - $generic_product->load_stats_commande(0,'1,2'); + if (empty($productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_customer'])) { + $generic_product->load_stats_commande(0,'1,2',true); + $productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_customer'] = $generic_product->stats_commande['qty']; + } else { + $generic_product->stats_commande['qty'] = $productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_customer']; + } $stock_order=$generic_product->stats_commande['qty']; } if (! empty($conf->fournisseur->enabled)) { - $generic_product->load_stats_commande_fournisseur(0,'3'); + if (empty($productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_supplier'])) { + $generic_product->load_stats_commande_fournisseur(0,'3',true); + $productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_supplier'] = $generic_product->stats_commande_fournisseur['qty']; + } else { + $generic_product->stats_commande_fournisseur['qty'] = $productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_supplier']; + } $stock_order_supplier=$generic_product->stats_commande_fournisseur['qty']; } } @@ -421,6 +442,7 @@ if ($resql) // Company $companystatic->id=$objp->socid; + $companystatic->code_client = $objp->code_client; $companystatic->name=$objp->name; $companystatic->client=$objp->client; print '"; } @@ -1237,7 +1260,7 @@ else * Lines of contracts */ - if ($conf->product->enabled) { + if ($conf->product->enabled || $conf->service->enabled) { $productstatic=new Product($db); } @@ -1306,7 +1329,7 @@ else $productstatic->ref=$objp->label; print $productstatic->getNomUrl(0,'',16); } - if (! empty($conf->global->PRODUIT_DESC_IN_FORM) and $objp->description) + if (! empty($conf->global->PRODUIT_DESC_IN_FORM) && !empty($objp->description)) print '
'.dol_nl2br($objp->description); print ''; } @@ -1391,6 +1414,16 @@ else print ''; print ''; } + + + //Display lines extrafields + if (is_array($extralabelslines) && count($extralabelslines)>0) { + print ''; + $line = new ContratLigne($db); + $line->fetch_optionals($objp->rowid,$extralabelslines); + print $line->showOptionals($extrafieldsline, 'view', array('style'=>$bc[$var], 'colspan'=>$colspan)); + print ''; + } } // Ligne en mode update else @@ -1448,6 +1481,15 @@ else print '
'.$langs->trans("DateEndPlanned").' '; $form->select_date($db->jdate($objp->date_fin),"date_end_update",$usehm,$usehm,($db->jdate($objp->date_fin)>0?0:1),"update"); print ''; + + if (is_array($extralabelslines) && count($extralabelslines)>0) { + print ''; + $line = new ContratLigne($db); + $line->fetch_optionals($objp->rowid,$extralabelslines); + print $line->showOptionals($extrafieldsline, 'edit', array('style'=>$bc[$var], 'colspan'=>$colspan)); + print ''; + } + print ''; } @@ -1730,7 +1772,7 @@ else if ($user->societe_id == 0) { print '
'; - + $parameters=array(); $reshook=$hookmanager->executeHooks('addMoreActionsButtons',$parameters,$object,$action); // Note that $action and $object may have been modified by hook diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 9619ae462f4..bbecab53a30 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -907,7 +907,8 @@ class Contrat extends CommonObject $modCodeContract = new $module(); } - if (!empty($modCodeContract->code_auto)) { + //Commerce Efficace - Debut : Modification r�f�rence Contrat + /*if (!empty($modCodeContract->code_auto)) { // Mise a jour ref $sql = 'UPDATE '.MAIN_DB_PREFIX."contrat SET ref='(PROV".$this->id.")' WHERE rowid=".$this->id; if ($this->db->query($sql)) @@ -917,7 +918,8 @@ class Contrat extends CommonObject $this->ref="(PROV".$this->id.")"; } } - } + }*/ + //Commerce Efficace - Fin : Modification r�f�rence Contrat // Insert contacts commerciaux ('SALESREPSIGN','contrat') $result=$this->add_contact($this->commercial_signature_id,'SALESREPSIGN','internal'); @@ -1238,9 +1240,10 @@ class Contrat extends CommonObject * @param int $info_bits Bits de type de lignes * @param int $fk_fournprice Fourn price id * @param int $pa_ht Buying price HT + * @param array $array_option extrafields array * @return int <0 si erreur, >0 si ok */ - function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1, $txlocaltax2, $fk_product, $remise_percent, $date_start, $date_end, $price_base_type='HT', $pu_ttc=0.0, $info_bits=0, $fk_fournprice=null, $pa_ht = 0) + function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1, $txlocaltax2, $fk_product, $remise_percent, $date_start, $date_end, $price_base_type='HT', $pu_ttc=0.0, $info_bits=0, $fk_fournprice=null, $pa_ht = 0,$array_option=0) { global $user, $langs, $conf, $mysoc; @@ -1348,17 +1351,33 @@ class Contrat extends CommonObject $result=$this->update_statut($user); if ($result > 0) { - // Call trigger - $result=$this->call_trigger('LINECONTRACT_CREATE',$user); - if ($result < 0) - { - $this->db->rollback(); - return -1; - } - // End call triggers - - $this->db->commit(); - return 1; + + if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && is_array($array_option) && count($array_option)>0) // For avoid conflicts if trigger used + { + $contractline = new ContratLigne($this->db); + $contractline->array_options=$array_option; + $contractline->id= $this->db->last_insert_id(MAIN_DB_PREFIX.$contractline->table_element); + $result=$contractline->insertExtraFields(); + if ($result < 0) + { + $this->error[]=$contractline->error; + $error++; + } + } + + if (empty($error)) { + // Call trigger + $result=$this->call_trigger('LINECONTRACT_CREATE',$user); + if ($result < 0) + { + $this->db->rollback(); + return -1; + } + // End call triggers + + $this->db->commit(); + return 1; + } } else { @@ -1399,9 +1418,10 @@ class Contrat extends CommonObject * @param int $info_bits Bits de type de lignes * @param int $fk_fournprice Fourn price id * @param int $pa_ht Buying price HT + * @param array $array_option extrafields array * @return int < 0 si erreur, > 0 si ok */ - function updateline($rowid, $desc, $pu, $qty, $remise_percent, $date_start, $date_end, $tvatx, $localtax1tx=0.0, $localtax2tx=0.0, $date_debut_reel='', $date_fin_reel='', $price_base_type='HT', $info_bits=0, $fk_fournprice=null, $pa_ht = 0) + function updateline($rowid, $desc, $pu, $qty, $remise_percent, $date_start, $date_end, $tvatx, $localtax1tx=0.0, $localtax2tx=0.0, $date_debut_reel='', $date_fin_reel='', $price_base_type='HT', $info_bits=0, $fk_fournprice=null, $pa_ht = 0,$array_option=0) { global $user, $conf, $langs, $mysoc; @@ -1501,17 +1521,33 @@ class Contrat extends CommonObject $result=$this->update_statut($user); if ($result >= 0) { - // Call trigger - $result=$this->call_trigger('LINECONTRACT_UPDATE',$user); - if ($result < 0) - { - $this->db->rollback(); - return -3; - } - // End call triggers - - $this->db->commit(); - return 1; + + if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && is_array($array_option) && count($array_option)>0) // For avoid conflicts if trigger used + { + $contractline = new ContratLigne($this->db); + $contractline->array_options=$array_option; + $contractline->id= $this->db->last_insert_id(MAIN_DB_PREFIX.$contractline->table_element); + $result=$contractline->insertExtraFields(); + if ($result < 0) + { + $this->error[]=$contractline->error; + $error++; + } + } + + if (empty($error)) { + // Call trigger + $result=$this->call_trigger('LINECONTRACT_UPDATE',$user); + if ($result < 0) + { + $this->db->rollback(); + return -3; + } + // End call triggers + + $this->db->commit(); + return 1; + } } else { @@ -1560,12 +1596,32 @@ class Contrat extends CommonObject if (! $resql) { $this->error="Error ".$this->db->lasterror(); + $error++; + } + + if (empty($error)) { + // Remove extrafields + if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used + { + $contractline = new ContratLigne($this->db); + $contractline->id= $idline; + $result=$contractline->deleteExtraFields(); + if ($result < 0) + { + $error++; + $this->error="Error ".get_class($this)."::delete deleteExtraFields error -4 ".$contractline->error; + } + } + } + + if (empty($error)) { + $this->db->commit(); + return 1; + } else { + dol_syslog(get_class($this)."::delete ERROR:".$this->error, LOG_ERR); $this->db->rollback(); return -1; } - - $this->db->commit(); - return 1; } else { @@ -2067,6 +2123,9 @@ class ContratLigne extends CommonObject var $statut; // 0 inactive, 4 active, 5 closed var $label; + public $element='contratdet'; + public $table_element='contratdet'; + /** * @var string * @deprecated Use $label instead @@ -2445,10 +2504,21 @@ class ContratLigne extends CommonObject else { $this->error="Error ".$this->db->lasterror(); - $this->db->rollback(); - return -1; + $error++; + //return -1; + } + + if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && is_array($this->array_options) && count($this->array_options)>0) // For avoid conflicts if trigger used + { + + $result=$this->insertExtraFields(); + if ($result < 0) + { + $error++; + } } + if (empty($error)) { if (! $notrigger) { // Call trigger @@ -2456,9 +2526,16 @@ class ContratLigne extends CommonObject if ($result < 0) { $error++; $this->db->rollback(); return -1; } // End call triggers } + } + if (empty($error)) { $this->db->commit(); return 1; + } else { + $this->db->rollback(); + $this->errors[]=$this->error; + return -1; + } } diff --git a/htdocs/contrat/class/index.html b/htdocs/contrat/class/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/contrat/tpl/linkedobjectblock.tpl.php b/htdocs/contrat/tpl/linkedobjectblock.tpl.php index d94d45489fd..f7f840dce13 100644 --- a/htdocs/contrat/tpl/linkedobjectblock.tpl.php +++ b/htdocs/contrat/tpl/linkedobjectblock.tpl.php @@ -42,8 +42,8 @@ foreach($linkedObjectBlock as $object) $object->fetch_lines(); $var=!$var; ?> -
> + > + diff --git a/htdocs/core/ajax/ajaxdirtree.php b/htdocs/core/ajax/ajaxdirtree.php index ae70d1a418a..76fc64b50cf 100644 --- a/htdocs/core/ajax/ajaxdirtree.php +++ b/htdocs/core/ajax/ajaxdirtree.php @@ -188,7 +188,7 @@ if (file_exists($fullpathselecteddir)) $userstatic->lastname=isset($val['login_c'])?$val['login_c']:0; $htmltooltip=''.$langs->trans("ECMSection").': '.$val['label'].'
'; $htmltooltip=''.$langs->trans("Type").': '.$langs->trans("ECMSectionManual").'
'; - $htmltooltip.=''.$langs->trans("ECMCreationUser").': '.$userstatic->getNomUrl(1).'
'; + $htmltooltip.=''.$langs->trans("ECMCreationUser").': '.$userstatic->getNomUrl(1, '', false, 1).'
'; $htmltooltip.=''.$langs->trans("ECMCreationDate").': '.(isset($val['date_c'])?dol_print_date($val['date_c'],"dayhour"):$langs->trans("NeedRefresh")).'
'; $htmltooltip.=''.$langs->trans("Description").': '.$val['description'].'
'; $htmltooltip.=''.$langs->trans("ECMNbOfFilesInDir").': '.((isset($val['cachenbofdoc']) && $val['cachenbofdoc'] >= 0)?$val['cachenbofdoc']:$langs->trans("NeedRefresh")).'
'; diff --git a/htdocs/core/boxes/box_actions.php b/htdocs/core/boxes/box_actions.php index ed5e731d896..2b251a6599f 100644 --- a/htdocs/core/boxes/box_actions.php +++ b/htdocs/core/boxes/box_actions.php @@ -3,6 +3,7 @@ * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2005-2011 Regis Houssin * Copyright (C) 2014 Charles-Fr BENKE + * Copyright (C) 2015 Frederic France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -55,15 +56,20 @@ class box_actions extends ModeleBoxes $this->max=$max; - include_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; - $actionstatic=new ActionComm($db); + include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; + include_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; + $societestatic = new Societe($db); + $actionstatic = new ActionComm($db); $this->info_box_head = array('text' => $langs->trans("BoxTitleLastActionsToDo",$max)); if ($user->rights->agenda->myactions->read) { - $sql = "SELECT a.id, a.label, a.datep as dp, a.percent as percentage,"; - $sql.= " ta.code, ta.libelle as type_label,"; - $sql.= " s.nom as name, s.rowid as socid"; + $sql = "SELECT a.id, a.label, a.datep as dp, a.percent as percentage"; + $sql.= ", ta.code"; + $sql.= ", ta.libelle as type_label"; + $sql.= ", s.nom as name"; + $sql.= ", s.rowid as socid"; + $sql.= ", s.code_client"; $sql.= " FROM (".MAIN_DB_PREFIX."c_actioncomm AS ta, "; $sql.= MAIN_DB_PREFIX."actioncomm AS a)"; if (! $user->rights->societe->client->voir && ! $user->societe_id) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc"; @@ -81,70 +87,66 @@ class box_actions extends ModeleBoxes $result = $db->query($sql); if ($result) { $now=dol_now(); - $delay_warning=$conf->global->MAIN_DELAY_ACTIONS_TODO*24*60*60; + $delay_warning = $conf->global->MAIN_DELAY_ACTIONS_TODO*24*60*60; $num = $db->num_rows($result); - $i = 0; - while ($i < $num) { + $line = 0; + while ($line < $num) { $late = ''; $objp = $db->fetch_object($result); - $datelimite=$db->jdate($objp->dp); + $datelimite = $db->jdate($objp->dp); + $actionstatic->label = $objp->label; + $actionstatic->type_label = $objp->type_label; + $actionstatic->code = $objp->code; + $societestatic->id = $objp->socid; + $societestatic->name = $objp->name; + $societestatic->code_client = $objp->code_client; - if ($objp->percentage >= 0 && $objp->percentage < 100 && $datelimite < ($now - $delay_warning)) $late=img_warning($langs->trans("Late")); + if ($objp->percentage >= 0 && $objp->percentage < 100 && $datelimite < ($now - $delay_warning)) + $late=img_warning($langs->trans("Late")); //($langs->transnoentities("Action".$objp->code)!=("Action".$objp->code) ? $langs->transnoentities("Action".$objp->code) : $objp->label) - $label=empty($objp->label)?$objp->type_label:$objp->label; + $label = empty($objp->label)?$objp->type_label:$objp->label; - $this->info_box_contents[$i][0] = array( - 'td' => 'align="left" width="16"', - 'logo' => ("action"), - 'tooltip' => $langs->trans('Action'.$objp->code).': '.$label, - 'url' => DOL_URL_ROOT."/comm/action/card.php?id=".$objp->id, - ); - - $this->info_box_contents[$i][1] = array( + $tooltip = $langs->trans('Action'.$objp->code).': '.$label; + $this->info_box_contents[$line][] = array( 'td' => 'align="left"', - 'text' => dol_trunc($label,32), + 'text' => $actionstatic->getNomUrl(1), 'text2'=> $late, - 'tooltip' => $langs->trans('Action'.$objp->code).': '.$label, - 'url' => DOL_URL_ROOT."/comm/action/card.php?id=".$objp->id, + 'asis' => 1, ); - $this->info_box_contents[$i][2] = array( - 'td' => 'align="left" width="16"', - 'logo' => ($objp->socid?'company':''), - 'tooltip' => $langs->trans('Customer').': '.$objp->name, - 'url' => ($objp->socid?DOL_URL_ROOT."/societe/soc.php?socid=".$objp->socid:''), - ); - - $this->info_box_contents[$i][3] = array( + $this->info_box_contents[$line][] = array( 'td' => 'align="left"', - 'text' => dol_trunc($objp->name,24), - 'tooltip' => $langs->trans('Customer').': '.$objp->name, - 'url' => DOL_URL_ROOT."/societe/soc.php?socid=".$objp->socid, + 'text' => $societestatic->getNomUrl(1), + 'asis' => 1, ); - $this->info_box_contents[$i][4] = array( + $this->info_box_contents[$line][] = array( 'td' => 'align="left" class="nowrap"', 'text' => dol_print_date($datelimite, "dayhour"), ); - $this->info_box_contents[$i][5] = array( + $this->info_box_contents[$line][] = array( 'td' => 'align="right"', 'text' => ($objp->percentage>= 0?$objp->percentage.'%':''), ); - $this->info_box_contents[$i][6] = array( + $this->info_box_contents[$line][] = array( 'td' => 'align="right" width="18"', 'text' => $actionstatic->LibStatut($objp->percentage,3), ); - $i++; + $line++; } - if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoActionsToDo")); + if ($num==0) + $this->info_box_contents[$line][0] = array( + 'td' => 'align="center"', + 'text'=>$langs->trans("NoActionsToDo"), + ); - $db->free($result); + $db->free($result); } else { $this->info_box_contents[0][0] = array( 'td' => 'align="left"', @@ -171,8 +173,7 @@ class box_actions extends ModeleBoxes { global $langs, $conf; parent::showBox($this->info_box_head, $this->info_box_contents); - if ($conf->global->SHOW_DIALOG_HOMEPAGE) - { + if ($conf->global->SHOW_DIALOG_HOMEPAGE) { $actioncejour=false; $contents=$this->info_box_contents; $nblines=count($contents); @@ -183,23 +184,23 @@ class box_actions extends ModeleBoxes { print '
trans("ActionsToDo").'">'; print '
'; diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 35807912c0a..302b49fbdb7 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -1389,8 +1389,8 @@ if ($action == 'create') print "
' . $langs->trans("Project") . ''; + print '' . $langs->trans("Project") . ''; - $numprojet = $formproject->select_projects($soc->id, $projectid); + $numprojet = $formproject->select_projects($soc->id, $projectid, 'projectid', 0); if ($numprojet == 0) { $langs->load("projects"); print '   ' . $langs->trans("AddProject") . ''; @@ -1684,7 +1684,7 @@ if ($action == 'create') print '
' . $langs->trans('Company') . '' . $soc->getNomUrl(1) . '
' . $langs->trans('Discounts') . ''; if ($soc->remise_percent) print $langs->trans("CompanyHasRelativeDiscount", $soc->remise_percent); @@ -1881,20 +1881,22 @@ if ($action == 'create') print '
'; print ''; - if ($user->rights->propal->creer) { + if ($user->rights->propal->creer) + { if ($action != 'classify') print ''; print '
'; print $langs->trans('Project') . '' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '
'; print '
'; if ($action == 'classify') { - $form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid'); + $form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1); } else { - $form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none'); + $form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0); } print '
'; $proj = new Project($db); $proj->fetch($object->fk_project); - print ''; + print ''; print $proj->ref; print ''; print '
getNomUrl(1); ?> ref_client; ?> date,'day'); ?> * Copyright (C) 2012 Marcos García * Copyright (C) 2013 Florian Henry - * Copyright (C) 2014 Ferran Marcet + * Copyright (C) 2014 Ferran Marcet * * 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 @@ -932,6 +932,10 @@ if (empty($reshook)) $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); } } + else + { + setEventMessages($object->error, $object->errors, 'errors'); + } } } @@ -1421,11 +1425,12 @@ if ($action == 'create' && $user->rights->commande->creer) { print '
' . $langs->trans('Project') . ''; - $numprojet = $formproject->select_projects($soc->id, $projectid); + $numprojet = $formproject->select_projects($soc->id, $projectid, 'projectid', 0); if ($numprojet == 0) { print '   ' . $langs->trans("AddProject") . ''; } @@ -1974,9 +1979,9 @@ if ($action == 'create' && $user->rights->commande->creer) { print ''; // print "$object->id, $object->socid, $object->fk_project"; if ($action == 'classify') { - $form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid'); + $form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1); } else { - $form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none'); + $form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0); } print '
'; diff --git a/htdocs/commande/tpl/linkedobjectblock.tpl.php b/htdocs/commande/tpl/linkedobjectblock.tpl.php index c47aefe0958..cabb63aa2b1 100644 --- a/htdocs/commande/tpl/linkedobjectblock.tpl.php +++ b/htdocs/commande/tpl/linkedobjectblock.tpl.php @@ -36,6 +36,7 @@ print_titre($langs->trans('RelatedOrders')); + @@ -47,8 +48,9 @@ foreach($linkedObjectBlock as $object) { $var=!$var; ?> - > + > + + - + '; print ''; diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index ca2707ea23f..1459dac849e 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -2258,7 +2258,7 @@ if ($action == 'create') $langs->load('projects'); print ''; } @@ -2538,7 +2538,8 @@ if ($action == 'create') } // Confirmation de la validation - if ($action == 'valid') { + if ($action == 'valid') + { // on verifie si l'objet est en numerotation provisoire $objectref = substr($object->ref, 1, 4); if ($objectref == 'PROV') { @@ -2569,7 +2570,8 @@ if ($action == 'create') $qualified_for_stock_change = $object->hasProductsOrServices(1); } - if ($object->type != Facture::TYPE_DEPOSIT && ! empty($conf->global->STOCK_CALCULATE_ON_BILL) && $qualified_for_stock_change) { + if ($object->type != Facture::TYPE_DEPOSIT && ! 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'; @@ -3352,9 +3354,9 @@ if ($action == 'create') print ''; print ''; diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index f4424b8c9ad..5c645783cc1 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -858,7 +858,17 @@ class Facture extends CommonInvoice if ($this->type == self::TYPE_CREDIT_NOTE) $picto.='a'; // Credit note if ($this->type == self::TYPE_DEPOSIT) $picto.='d'; // Deposit invoice - $label=$langs->trans("ShowInvoice").': '.$this->ref; + $label = '' . $langs->trans("ShowInvoice") . ''; + if (! empty($this->ref)) + $label .= '
'.$langs->trans('Ref') . ': ' . $this->ref; + if (! empty($this->ref_client)) + $label .= '
' . $langs->trans('RefCustomer') . ': ' . $this->ref_client; + if (! empty($this->total_ht)) + $label.= '
' . $langs->trans('AmountHT') . ': ' . price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency); + if (! empty($this->total_tva)) + $label.= '
' . $langs->trans('TVA') . ': ' . price($this->total_tva, 0, $langs, 0, -1, -1, $conf->currency); + if (! empty($this->total_ttc)) + $label.= '
' . $langs->trans('AmountTTC') . ': ' . price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency); if ($this->type == self::TYPE_REPLACEMENT) $label=$langs->transnoentitiesnoconv("ShowInvoiceReplace").': '.$this->ref; if ($this->type == self::TYPE_CREDIT_NOTE) $label=$langs->transnoentitiesnoconv("ShowInvoiceAvoir").': '.$this->ref; if ($this->type == self::TYPE_DEPOSIT) $label=$langs->transnoentitiesnoconv("ShowInvoiceDeposit").': '.$this->ref; @@ -1681,8 +1691,8 @@ class Facture extends CommonInvoice return 0; } - if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->facture->creer)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->facture->invoice_advance->validate))) + if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->facture->creer)) + || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->facture->invoice_advance->validate))) { $this->error='Permission denied'; dol_syslog(get_class($this)."::validate ".$this->error, LOG_ERR); @@ -3329,7 +3339,8 @@ class Facture extends CommonInvoice $sql.= ' l.total_ht, l.total_tva, l.total_ttc, l.fk_product_fournisseur_price as fk_fournprice, l.buy_price_ht as pa_ht,'; $sql.= ' l.date_start, l.date_end,'; $sql.= ' p.ref as product_ref, p.fk_product_type, p.label as product_label,'; - $sql.= ' p.description as product_desc'; + $sql.= ' p.description as product_desc,'; + $sql.= ' p.entity'; $sql.= ' FROM '.MAIN_DB_PREFIX.'facturedet as l'; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON l.fk_product=p.rowid'; $sql.= ' WHERE l.fk_facture = '.$this->id; @@ -3352,6 +3363,7 @@ class Facture extends CommonInvoice $this->lines[$i]->description = $obj->description; $this->lines[$i]->fk_product = $obj->fk_product; $this->lines[$i]->ref = $obj->product_ref; + $this->lines[$i]->entity = $obj->entity; // Product entity $this->lines[$i]->product_label = $obj->product_label; $this->lines[$i]->product_desc = $obj->product_desc; $this->lines[$i]->fk_product_type = $obj->fk_product_type; diff --git a/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php b/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php index ae3038a6021..12f40f8ef97 100644 --- a/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php +++ b/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php @@ -36,6 +36,7 @@ else print_titre($langs->trans("RelatedBill"));
trans("Ref"); ?>trans("RefCustomer"); ?> trans("Date"); ?> trans("AmountHTShort"); ?> trans("Status"); ?>
- trans("ShowOrder"),"order").' '.$object->ref; ?>
getNomUrl(1); ?>ref_client; ?> date,'day'); ?> rights->commande->lire) { @@ -62,7 +64,7 @@ foreach($linkedObjectBlock as $object) ?>
trans('TotalHT'); ?>trans('TotalHT'); ?> rights->commande->lire) { echo price($total); diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 5ecca4047e6..598ccc2c8d8 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -935,7 +935,12 @@ class Account extends CommonObject global $langs; $result=''; - $linkclose = '" title="'.dol_escape_htmltag($this->label, 1).'" class="classfortooltip">'; + $label = '' . $langs->trans("ShowAccount") . ''; + if (! empty($this->label)) + $label .= '
' . $langs->trans('Account') . ': ' . $this->label; + if (! empty($this->number)) + $label .= '
' . $langs->trans('AccountNumber') . ': ' . $this->number; + $linkclose = '" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">'; if (empty($mode)) { @@ -948,7 +953,7 @@ class Account extends CommonObject $lienfin=''; } - if ($withpicto) $result.=($lien.img_object($langs->trans("ShowAccount").': '.$this->label, 'account', 'class="classfortooltip"').$lienfin.' '); + if ($withpicto) $result.=($lien.img_object($label, 'account', 'class="classfortooltip"').$lienfin.' '); $result.=$lien.$this->label.$lienfin; return $result; } diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php index e4afe6f2b25..902495bc6aa 100644 --- a/htdocs/compta/bank/releve.php +++ b/htdocs/compta/bank/releve.php @@ -391,10 +391,9 @@ else } } elseif ($links[$key]['type']=='company') { - print ''; - print img_object($langs->trans('ShowCustomer'),'company').' '; - print dol_trunc($links[$key]['label'],24); - print ''; + $societestatic->id = $links[$key]['url_id']; + $societestatic->name = $links[$key]['label']; + print $societestatic->getNomUrl(1, 'company', 24); $newline=0; } elseif ($links[$key]['type']=='member') { diff --git a/htdocs/compta/deplacement/card.php b/htdocs/compta/deplacement/card.php index bcef3512c33..20dc403f7c3 100644 --- a/htdocs/compta/deplacement/card.php +++ b/htdocs/compta/deplacement/card.php @@ -486,11 +486,11 @@ else if ($id) print '
'; if ($action == 'classify') { - $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project,'projectid'); + $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project,'projectid', 0, 0, 1); } else { - $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project,'none'); + $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project,'none', 0, 0); } print '
' . $langs->trans('Project') . ''; - $formproject->select_projects($soc->id, $projectid, 'projectid'); + $formproject->select_projects($soc->id, $projectid, 'projectid', 0); print '
'; if ($action == 'classify') { - $form->form_project($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->socid, $object->fk_project, 'projectid'); + $form->form_project($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1); } else { - $form->form_project($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->socid, $object->fk_project, 'none'); + $form->form_project($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0); } print '
+ @@ -47,8 +48,9 @@ foreach($linkedObjectBlock as $object) { $var=!$var; ?> - > + > + + - + '; print ''; print ''; @@ -218,8 +227,10 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire) */ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture->lire) { - $sql = "SELECT f.ref, f.rowid, f.total_ttc, f.type,"; - $sql.= " s.nom as name, s.rowid as socid"; + $sql = "SELECT f.ref, f.rowid, f.total_ht, f.tva as total_tva, f.total_ttc, f.type"; + $sql.= ", s.nom as name"; + $sql.= ", s.rowid as socid"; + $sql.= ", s.code_fournisseur"; $sql.= " FROM ".MAIN_DB_PREFIX."facture_fourn as f, ".MAIN_DB_PREFIX."societe as s"; if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE s.rowid = f.fk_soc AND f.fk_statut = 0"; @@ -249,14 +260,19 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture- print ''; print ''; print ''; print ''; @@ -292,10 +308,12 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire) $langs->load("boxes"); $facstatic=new Facture($db); - $sql = "SELECT f.rowid, f.facnumber, f.fk_statut, f.type, f.total, f.total_ttc, f.paye, f.tms,"; - $sql.= " f.date_lim_reglement as datelimite,"; - $sql.= " s.nom as name, s.rowid as socid,"; - $sql.= " sum(pf.amount) as am"; + $sql = "SELECT f.rowid, f.facnumber, f.fk_statut, f.type, f.total as total_ht, f.tva as total_tva, f.total_ttc, f.paye, f.tms"; + $sql.= ", f.date_lim_reglement as datelimite"; + $sql.= ", s.nom as name"; + $sql.= ", s.rowid as socid"; + $sql.= ", s.code_client"; + $sql.= ", sum(pf.amount) as am"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."paiement_facture as pf on f.rowid=pf.fk_facture"; if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; @@ -335,6 +353,9 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire) print ''; @@ -353,9 +374,11 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire) $thirdpartystatic->id=$obj->socid; $thirdpartystatic->name=$obj->name; $thirdpartystatic->client=1; + $thirdpartystatic->code_client = $obj->code_client; + $thirdpartystatic->code_fournisseur = $obj->code_fournisseur; print $thirdpartystatic->getNomUrl(1,'customer',44); print ''; - if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''; + if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''; print ''; print ''; print ''; @@ -391,8 +414,10 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture- $langs->load("boxes"); $facstatic=new FactureFournisseur($db); - $sql = "SELECT ff.rowid, ff.ref, ff.fk_statut, ff.libelle, ff.total_ht, ff.total_ttc, ff.tms, ff.paye"; - $sql.= ", s.nom as name, s.rowid as socid"; + $sql = "SELECT ff.rowid, ff.ref, ff.fk_statut, ff.libelle, ff.total_ht, ff.total_tva, ff.total_ttc, ff.tms, ff.paye"; + $sql.= ", s.nom as name"; + $sql.= ", s.rowid as socid"; + $sql.= ", s.code_fournisseur"; $sql.= ", SUM(pf.amount) as am"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture_fourn as ff"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."paiementfourn_facturefourn as pf on ff.rowid=pf.fk_facturefourn"; @@ -401,7 +426,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture- $sql.= " AND ff.entity = ".$conf->entity; if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; if ($socid) $sql.= " AND ff.fk_soc = ".$socid; - $sql.= " GROUP BY ff.rowid, ff.ref, ff.fk_statut, ff.libelle, ff.total_ht, ff.total_ttc, ff.tms, ff.paye, s.nom, s.rowid"; + $sql.= " GROUP BY ff.rowid, ff.ref, ff.fk_statut, ff.libelle, ff.total_ht, ff.tva, ff.total_ttc, ff.tms, ff.paye, s.nom, s.rowid"; $sql.= " ORDER BY ff.tms DESC "; $sql.= $db->plimit($max, 0); @@ -427,13 +452,18 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture- $obj = $db->fetch_object($resql); print ''; print ''; if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''; @@ -612,9 +642,11 @@ if (! empty($conf->facture->enabled) && ! empty($conf->commande->enabled) && $us $commandestatic=new Commande($db); $langs->load("orders"); - $sql = "SELECT sum(f.total) as tot_fht, sum(f.total_ttc) as tot_fttc,"; - $sql.= " s.nom as name, s.rowid as socid,"; - $sql.= " c.rowid, c.ref, c.facture, c.fk_statut, c.total_ht, c.total_ttc"; + $sql = "SELECT sum(f.total) as tot_fht, sum(f.total_ttc) as tot_fttc"; + $sql.= ", s.nom as name"; + $sql.= ", s.rowid as socid"; + $sql.= ", s.code_client"; + $sql.= ", c.rowid, c.ref, c.facture, c.fk_statut, c.total_ht, c.tva as total_tva, c.total_ttc"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= ", ".MAIN_DB_PREFIX."commande as c"; @@ -677,6 +709,8 @@ if (! empty($conf->facture->enabled) && ! empty($conf->commande->enabled) && $us $societestatic->id=$obj->socid; $societestatic->name=$obj->name; $societestatic->client=1; + $societestatic->code_client = $obj->code_client; + $societestatic->code_fournisseur = $obj->code_fournisseur; print $societestatic->getNomUrl(1,'customer',44); print ''; if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''; @@ -715,10 +749,12 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire) { $facstatic=new Facture($db); - $sql = "SELECT f.rowid, f.facnumber, f.fk_statut, f.datef, f.type, f.total, f.total_ttc, f.paye, f.tms,"; - $sql.= " f.date_lim_reglement as datelimite,"; - $sql.= " s.nom as name, s.rowid as socid,"; - $sql.= " sum(pf.amount) as am"; + $sql = "SELECT f.rowid, f.facnumber, f.fk_statut, f.datef, f.type, f.total as total_ht, f.tva as total_tva, f.total_ttc, f.paye, f.tms"; + $sql.= ", f.date_lim_reglement as datelimite"; + $sql.= ", s.nom as name"; + $sql.= ", s.rowid as socid"; + $sql.= ", s.code_client"; + $sql.= ", sum(pf.amount) as am"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."paiement_facture as pf on f.rowid=pf.fk_facture"; if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; @@ -758,6 +794,9 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire) print ''; @@ -776,9 +815,11 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire) $societestatic->id=$obj->socid; $societestatic->name=$obj->name; $societestatic->client=1; + $societestatic->code_client = $obj->code_client; + $societestatic->code_fournisseur = $obj->code_fournisseur; print $societestatic->getNomUrl(1,'customer',44); print ''; - if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''; + if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''; print ''; print ''; print ''; @@ -820,9 +861,12 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture- { $facstatic=new FactureFournisseur($db); - $sql = "SELECT ff.rowid, ff.ref, ff.fk_statut, ff.libelle, ff.total_ht, ff.total_ttc, ff.paye,"; - $sql.= " s.nom as name, s.rowid as socid,"; - $sql.= " sum(pf.amount) as am"; + $sql = "SELECT ff.rowid, ff.ref, ff.fk_statut, ff.libelle, ff.total_ht, ff.total_tva, ff.total_ttc, ff.paye"; + $sql.= ", s.nom as name"; + $sql.= ", s.rowid as socid"; + $sql.= ", s.code_client"; + $sql.= ", s.code_fournisseur"; + $sql.= ", sum(pf.amount) as am"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture_fourn as ff"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."paiementfourn_facturefourn as pf on ff.rowid=pf.fk_facturefourn"; if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; @@ -832,7 +876,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture- $sql.= " AND ff.fk_statut = 1"; if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; if ($socid) $sql.= " AND ff.fk_soc = ".$socid; - $sql.= " GROUP BY ff.rowid, ff.ref, ff.fk_statut, ff.libelle, ff.total_ht, ff.total_ttc, ff.paye,"; + $sql.= " GROUP BY ff.rowid, ff.ref, ff.fk_statut, ff.libelle, ff.total_ht, ff.tva, ff.total_ttc, ff.paye,"; $sql.= " s.nom, s.rowid"; $resql=$db->query($sql); @@ -859,12 +903,17 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture- print ''; $societestatic->id=$obj->socid; $societestatic->name=$obj->name; $societestatic->client=0; + $societestatic->code_client = $obj->code_client; + $societestatic->code_fournisseur = $obj->code_fournisseur; print ''; if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''; print ''; diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index f3cbeccd586..baa46bc0356 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -887,7 +887,8 @@ class Contact extends CommonObject global $langs; $result=''; - $label = $langs->trans("ShowContact").': '.$this->getFullName($langs); + $label = '' . $langs->trans("ShowContact") . ''; + $label.= '
' . $langs->trans("Name") . ': '.$this->getFullName($langs); $lien = ''; $lienfin=''; diff --git a/htdocs/contrat/admin/contractdet_extrafields.php b/htdocs/contrat/admin/contractdet_extrafields.php new file mode 100644 index 00000000000..21f27cee6d9 --- /dev/null +++ b/htdocs/contrat/admin/contractdet_extrafields.php @@ -0,0 +1,159 @@ + + * Copyright (C) 2003 Jean-Louis Bergamo + * Copyright (C) 2004-2011 Laurent Destailleur + * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2014 Florian Henry + * Copyright (C) 2013 Philippe Grand + * + * 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/contrat/admin/contract_extrafields.php + * \ingroup contrat + * \brief Page to setup extra fields of contract + */ + + +require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/contract.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; + +$langs->load("companies"); +$langs->load("admin"); +$langs->load("contracts"); + +$extrafields = new ExtraFields($db); +$form = new Form($db); + +// List of supported format +$tmptype2label=ExtraFields::$type2label; +$type2label=array(''); +foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->trans($val); + +$action=GETPOST('action', 'alpha'); +$attrname=GETPOST('attrname', 'alpha'); +$elementtype='contratdet'; //Must be the $element of the class that manage extrafield + +if (!$user->admin) accessforbidden(); + + +/* + * Actions + */ + +require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php'; + + + +/* + * View + */ + + +llxHeader(); + + +$linkback=''.$langs->trans("BackToModuleList").''; +print_fiche_titre($langs->trans("ContractsSetup"),$linkback,'setup'); + +print '
'; +$head=contract_admin_prepare_head(); + +dol_fiche_head($head, 'attributeslines', $langs->trans("Contracts"), 0, 'contract'); + +$textobject = $langs->transnoentitiesnoconv('Contracts'); + +print $langs->trans("DefineHereComplementaryAttributes",$textobject).'
'."\n"; +print '
'; + +// Load attribute_label +$extrafields->fetch_name_optionals_label($elementtype); + +print "
trans("Ref"); ?>trans("RefCustomer"); ?> trans("Date"); ?> trans("AmountHTShort"); ?> trans("Status"); ?>
- trans("ShowBill"),"bill").' '.$object->ref; ?>
getNomUrl(1); ?>ref_client; ?> date,'day'); ?> rights->facture->lire) { @@ -61,7 +63,7 @@ foreach($linkedObjectBlock as $object) } ?>
trans("TotalHT"); ?>trans("TotalHT"); ?> rights->facture->lire) { echo price($total); diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index 9265c9ee463..b1d32083a8a 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -144,8 +144,12 @@ if (! empty($conf->don->enabled) && $user->rights->don->lire) */ if (! empty($conf->facture->enabled) && $user->rights->facture->lire) { - $sql = "SELECT f.facnumber, f.rowid, f.total_ttc, f.type,"; - $sql.= " s.nom as name, s.rowid as socid"; + $sql = "SELECT f.facnumber"; + $sql.= ", f.rowid, f.total as total_ht, f.tva as total_tva, f.total_ttc"; + $sql.= ", f.type"; + $sql.= ", s.nom as name"; + $sql.= ", s.rowid as socid"; + $sql.= ",s.code_client"; if (!$user->rights->societe->client->voir && !$socid) $sql.= ", sc.fk_soc, sc.fk_user "; $sql.= " FROM ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."societe as s"; if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; @@ -180,13 +184,18 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire) print '
'; $facturestatic->ref=$obj->facnumber; $facturestatic->id=$obj->rowid; + $facturestatic->total_ht=$obj->total_ht; + $facturestatic->total_tva=$obj->total_tva; + $facturestatic->total_ttc=$obj->total_ttc; $facturestatic->type=$obj->type; print $facturestatic->getNomUrl(1,''); print ''; $companystatic->id=$obj->socid; $companystatic->name=$obj->name; - $companystatic->client=1; + $companystatic->client = 1; + $companystatic->code_client = $obj->code_client; + $companystatic->code_fournisseur = $obj->code_fournisseur; print $companystatic->getNomUrl(1,'',16); print ''.price($obj->total_ttc).'
'; $facturesupplierstatic->ref=$obj->ref; $facturesupplierstatic->id=$obj->rowid; + $facturesupplierstatic->total_ht=$obj->total_ht; + $facturesupplierstatic->total_tva=$obj->total_tva; + $facturesupplierstatic->total_ttc=$obj->total_ttc; $facturesupplierstatic->type=$obj->type; print $facturesupplierstatic->getNomUrl(1,'',16); print ''; $companystatic->id=$obj->socid; $companystatic->name=$obj->name; - $companystatic->client=1; - print $companystatic->getNomUrl(1,'',16); + $companystatic->fournisseur = 1; + $companystatic->code_client = $obj->code_client; + $companystatic->code_fournisseur = $obj->code_fournisseur; + print $companystatic->getNomUrl(1,'supplier',16); print ''.price($obj->total_ttc).'
'; $facturestatic->ref=$obj->facnumber; $facturestatic->id=$obj->rowid; + $facturestatic->total_ht=$obj->total_ht; + $facturestatic->total_tva=$obj->total_tva; + $facturestatic->total_ttc=$obj->total_ttc; $facturestatic->type=$obj->type; print $facturestatic->getNomUrl(1,''); print ''.price($obj->total).''.price($obj->total_ht).''.price($obj->total_ttc).''.dol_print_date($db->jdate($obj->tms),'day').''.$facstatic->LibStatut($obj->paye,$obj->fk_statut,3,$obj->am).'
'; $facstatic->ref=$obj->ref; - $facstatic->id=$obj->rowid; + $facstatic->id = $obj->rowid; + $facstatic->total_ht = $obj->total_ht; + $facstatic->total_tva = $obj->total_tva; + $facstatic->total_ttc = $obj->total_ttc; print $facstatic->getNomUrl(1,''); print ''; $thirdpartystatic->id=$obj->socid; $thirdpartystatic->name=$obj->name; $thirdpartystatic->fournisseur=1; + $thirdpartystatic->code_client = $obj->code_client; + $thirdpartystatic->code_fournisseur = $obj->code_fournisseur; print $thirdpartystatic->getNomUrl(1,'supplier',44); print ''.price($obj->total_ht).''.price($obj->total_ht).''; $facturestatic->ref=$obj->facnumber; $facturestatic->id=$obj->rowid; + $facturestatic->total_ht=$obj->total_ht; + $facturestatic->total_tva=$obj->total_tva; + $facturestatic->total_ttc=$obj->total_ttc; $facturestatic->type=$obj->type; print $facturestatic->getNomUrl(1,''); print ''.price($obj->total).''.price($obj->total_ht).''.price($obj->total_ttc).''.price($obj->am).''.$facstatic->LibStatut($obj->paye,$obj->fk_statut,3,$obj->am).'
'; $facstatic->ref=$obj->ref; - $facstatic->id=$obj->rowid; + $facstatic->id = $obj->rowid; + $facstatic->total_ht = $obj->total_ht; + $facstatic->total_tva = $obj->total_tva; + $facstatic->total_ttc = $obj->total_ttc; print $facstatic->getNomUrl(1,''); print ''.$societestatic->getNomUrl(1, 'supplier', 44).''.price($obj->total_ht).''.price($obj->total_ttc).'
"; + +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print "\n"; + +$var=True; +foreach($extrafields->attribute_type as $key => $value) +{ + $var=!$var; + print ""; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print '\n"; + print '\n"; + print '\n"; + print '\n"; + print ""; + // $i++; +} + +print "
'.$langs->trans("Position").''.$langs->trans("Label").''.$langs->trans("AttributeCode").''.$langs->trans("Type").''.$langs->trans("Size").''.$langs->trans("Unique").''.$langs->trans("Required").' 
".$extrafields->attribute_pos[$key]."".$extrafields->attribute_label[$key]."".$key."".$type2label[$extrafields->attribute_type[$key]]."'.$extrafields->attribute_size[$key]."'.yn($extrafields->attribute_unique[$key])."'.yn($extrafields->attribute_required[$key])."'.img_edit().''; + print "  ".img_delete()."
"; + +dol_fiche_end(); + + +// Buttons +if ($action != 'create' && $action != 'edit') +{ + print '
'; + print "".$langs->trans("NewAttribute").""; + print "
"; +} + + +/* ************************************************************************** */ +/* */ +/* Creation d'un champ optionnel + /* */ +/* ************************************************************************** */ + +if ($action == 'create') +{ + print "
"; + print_titre($langs->trans('NewAttribute')); + + require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; +} + +/* ************************************************************************** */ +/* */ +/* Edition d'un champ optionnel */ +/* */ +/* ************************************************************************** */ +if ($action == 'edit' && ! empty($attrname)) +{ + print "
"; + print_titre($langs->trans("FieldEdition", $attrname)); + + require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php'; +} + +llxFooter(); + +$db->close(); diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 4770ff10e50..eb224e0748d 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -84,6 +84,10 @@ if ($id > 0 || ! empty($ref)) { // fetch optionals attributes and labels $extralabels = $extrafields->fetch_name_optionals_label($object->table_element); +// fetch optionals attributes lines and labels +$extrafieldsline = new ExtraFields($db); +$extralabelslines=$extrafieldsline->fetch_name_optionals_label($object->table_element_line); + $permissionnote=$user->rights->contrat->creer; // Used by the include of actions_setnotes.inc.php @@ -408,6 +412,18 @@ else if ($action == 'addline' && $user->rights->contrat->creer) $error++; } + // Extrafields + $extrafieldsline = new ExtraFields($db); + $extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line); + $array_option = $extrafieldsline->getOptionalsFromPost($extralabelsline, $predef); + // Unset extrafield + if (is_array($extralabelsline)) { + // Get extra fields + foreach ($extralabelsline as $key => $value) { + unset($_POST["options_" . $key]); + } + } + if (! $error) { // Clean parameters @@ -520,7 +536,8 @@ else if ($action == 'addline' && $user->rights->contrat->creer) $pu_ttc, $info_bits, $fk_fournprice, - $pa_ht + $pa_ht, + $array_option ); } @@ -617,6 +634,12 @@ else if ($action == 'updateligne' && $user->rights->contrat->creer && ! GETPOST( $objectline->fk_fournprice=$fk_fournprice; $objectline->pa_ht=$pa_ht; + // Extrafields + $extrafieldsline = new ExtraFields($db); + $extralabelsline = $extrafieldsline->fetch_name_optionals_label($objectline->table_element); + $array_option = $extrafieldsline->getOptionalsFromPost($extralabelsline, $predef); + $objectline->array_options=$array_option; + // TODO verifier price_min si fk_product et multiprix $result=$objectline->update($user); @@ -1192,11 +1215,11 @@ else print '
'; if ($action == "classify") { - $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id,$object->socid,$object->fk_project,"projectid"); + $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id,$object->socid,$object->fk_project,"projectid", 0, 0, 1); } else { - $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id,$object->socid,$object->fk_project,"none"); + $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id,$object->socid,$object->fk_project,"none", 0, 0); } print "
- trans("ShowContract"),"contract").' '.$object->ref; ?>
getNomUrl(1); ?> date_contrat,'day'); ?>   getLibStatut(6); ?>
'; - for ($i=0, $n=$nblines; $i < $n; $i++) + for ($line=0, $n=$nblines; $line < $n; $line++) { - if (isset($contents[$i])) + if (isset($contents[$line])) { // on affiche que les évènement du jours ou passé // qui ne sont pas à 100% $actioncejour=true; $var=!$var; // TR - $logo=$contents[$i][0]['logo']; - $label=$contents[$i][1]['text']; - $urlevent=$contents[$i][1]['url']; - $logosoc=$contents[$i][2]['logo']; - $nomsoc=$contents[$i][3]['text']; - $urlsoc=$contents[$i][3]['url']; - $dateligne=$contents[$i][4]['text']; - $percentage=$contents[$i][5]['text']; + $logo=$contents[$line][0]['logo']; + $label=$contents[$line][1]['text']; + $urlevent=$contents[$line][1]['url']; + $logosoc=$contents[$line][2]['logo']; + $nomsoc=$contents[$line][3]['text']; + $urlsoc=$contents[$line][3]['url']; + $dateligne=$contents[$line][4]['text']; + $percentage=$contents[$line][5]['text']; print ''; print ''; - print "\n"; - //print "
'; print img_object("",$logo); diff --git a/htdocs/core/boxes/box_activity.php b/htdocs/core/boxes/box_activity.php index 9eaeb1d8cb4..66753f10f04 100644 --- a/htdocs/core/boxes/box_activity.php +++ b/htdocs/core/boxes/box_activity.php @@ -1,7 +1,7 @@ * Copyright (C) 2005-2013 Laurent Destailleur - * Copyright (C) 2014 Frederic France + * Copyright (C) 2014-2015 Frederic France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -73,7 +73,7 @@ class box_activity extends ModeleBoxes $totalMnt = 0; $totalnb = 0; - $i = 0; + $line = 0; $cachetime = 3600; $fileid = '-e'.$conf->entity.'-u'.$user->id.'-s'.$user->societe_id.'-r'.($user->rights->societe->client->voir?'1':'0').'.cache'; $now = dol_now(); @@ -94,8 +94,10 @@ class box_activity extends ModeleBoxes include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; $facturestatic=new Facture($db); - $cachefile = DOL_DATA_ROOT.'/facture/temp/boxactivity-invoice'.$fileid; - $refresh = !file_exists($cachefile) || ($now-$cachetime) > dol_filemtime($cachefile); + $cachedir = DOL_DATA_ROOT.'/facture/temp'; + $filename = '/boxactivity-invoice'.$fileid; + + $refresh = dol_cache_refresh($cachedir, $filename, $cachetime); $data = array(); if ($refresh) { $sql = "SELECT f.fk_statut, SUM(f.total_ttc) as Mnttot, COUNT(*) as nb"; @@ -118,38 +120,40 @@ class box_activity extends ModeleBoxes $data[$j]=$db->fetch_object($result); $j++; } - file_put_contents($cachefile,serialize($data),LOCK_EX); + if (! empty($conf->global->MAIN_ACTIVATE_FILECACHE)) { + dol_filecache($cachedir, $filename, $data); + } $db->free($result); } else { dol_print_error($db); } } else { - $data = unserialize(file_get_contents($cachefile)); + $data = dol_readcachefile($cachedir, $filename); } if (! empty($data)) { $j=0; - while ($i < count($data)) { + while ($line < count($data)) { $billurl="viewstatut=2&paye=1&year=".$data[$j]->annee; - $this->info_box_contents[$i][0] = array( + $this->info_box_contents[$line][0] = array( 'td' => 'align="left" width="16"', 'tooltip' => $langs->trans('Bills').' '.$facturestatic->LibStatut(1,$data[$j]->fk_statut,0), 'url' => DOL_URL_ROOT."/compta/facture/list.php?".$billurl."&mainmenu=accountancy&leftmenu=customers_bills", 'logo' => 'bill', ); - $this->info_box_contents[$i][1] = array( + $this->info_box_contents[$line][1] = array( 'td' => 'align="left"', 'text' => $langs->trans("Bills")." ".$facturestatic->LibStatut(1,$data[$j]->fk_statut,0)." ".$data[$j]->annee, ); - $this->info_box_contents[$i][2] = array( + $this->info_box_contents[$line][2] = array( 'td' => 'align="right"', 'tooltip' => $langs->trans('Bills').' '.$facturestatic->LibStatut(1,$data[$j]->fk_statut,0), 'text' => $data[$j]->nb, 'url' => DOL_URL_ROOT."/compta/facture/list.php?".$billurl."&mainmenu=accountancy&leftmenu=customers_bills", ); - $this->info_box_contents[$i][3] = array( + $this->info_box_contents[$line][3] = array( 'td' => 'align="right"', 'text' => price($data[$j]->Mnttot,1,$langs,0,0,-1,$conf->currency) ); @@ -159,22 +163,24 @@ class box_activity extends ModeleBoxes $totalnb += $data[$j]->nb; $totalMnt += $data[$j]->Mnttot; } - $this->info_box_contents[$i][4] = array( + $this->info_box_contents[$line][4] = array( 'td' => 'align="right" width="18"', 'text' => $facturestatic->LibStatut(1,$data[$j]->fk_statut,3), ); - $i++; + $line++; $j++; } if (count($data)==0) - $this->info_box_contents[$i][0] = array( + $this->info_box_contents[$line][0] = array( 'td' => 'align="center"', 'text'=>$langs->trans("NoRecordedInvoices"), ); } - $cachefile = DOL_DATA_ROOT.'/facture/temp/boxactivity-invoice2'.$fileid; - $refresh = !file_exists($cachefile) || ($now-$cachetime) > dol_filemtime($cachefile); + $cachedir = DOL_DATA_ROOT.'/facture/temp'; + $filename = '/boxactivity-invoice2'.$fileid; + + $refresh = dol_cache_refresh($cachedir, $filename, $cachetime); if ($refresh) { $sql = "SELECT f.fk_statut, SUM(f.total_ttc) as Mnttot, COUNT(*) as nb"; @@ -187,58 +193,60 @@ class box_activity extends ModeleBoxes $result = $db->query($sql); if ($result) { - $num = $db->num_rows($result) + $i; + $num = $db->num_rows($result) + $line; $j=0; while ($j < $num) { $data[$j]=$db->fetch_object($result); $j++; } - file_put_contents($cachefile,serialize($data),LOCK_EX); + if (! empty($conf->global->MAIN_ACTIVATE_FILECACHE)) { + dol_filecache($cachedir, $filename, $data); + } $db->free($result); } else { dol_print_error($db); } } else { - $data = unserialize(file_get_contents($cachefile)); + $data = dol_readcachefile($cachedir, $filename); } if (! empty($data)) { $j=0; - while ($i < count($data)) { + while ($line < count($data)) { $billurl="viewstatut=".$data[$j]->fk_statut."&paye=0"; - $this->info_box_contents[$i][0] = array( + $this->info_box_contents[$line][0] = array( 'td' => 'align="left" width="16"', 'tooltip' => $langs->trans('Bills').' '.$facturestatic->LibStatut(0,$data[$j]->fk_statut,0), 'url' => DOL_URL_ROOT."/compta/facture/list.php?".$billurl."&mainmenu=accountancy&leftmenu=customers_bills", 'logo' => 'bill', ); - $this->info_box_contents[$i][1] = array( + $this->info_box_contents[$line][1] = array( 'td' => 'align="left"', 'text' => $langs->trans("Bills")." ".$facturestatic->LibStatut(0,$data[$j]->fk_statut,0), ); - $this->info_box_contents[$i][2] = array( + $this->info_box_contents[$line][2] = array( 'td' => 'align="right"', 'text' => $data[$j]->nb, 'tooltip' => $langs->trans('Bills').' '.$facturestatic->LibStatut(0,$data[$j]->fk_statut,0), 'url' => DOL_URL_ROOT."/compta/facture/list.php?".$billurl."&mainmenu=accountancy&leftmenu=customers_bills", ); $totalnb += $data[$j]->nb; - $this->info_box_contents[$i][3] = array( + $this->info_box_contents[$line][3] = array( 'td' => 'align="right"', 'text' => price($data[$j]->Mnttot,1,$langs,0,0,-1,$conf->currency), ); $totalMnt += $objp->Mnttot; - $this->info_box_contents[$i][4] = array( + $this->info_box_contents[$line][4] = array( 'td' => 'align="right" width="18"', 'text' => $facturestatic->LibStatut(0,$data[$j]->fk_statut,3), ); - $i++; + $line++; $j++; } if ($num==0) - $this->info_box_contents[$i][0] = array( + $this->info_box_contents[$line][0] = array( 'td' => 'align="center"', 'text'=>$langs->trans("NoRecordedInvoices"), ); @@ -255,9 +263,11 @@ class box_activity extends ModeleBoxes include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; $commandestatic=new Commande($db); - $cachefile = DOL_DATA_ROOT.'/commande/temp/boxactivity-order'.$fileid; - $refresh = !file_exists($cachefile) || ($now-$cachetime) > dol_filemtime($cachefile); + $cachedir = DOL_DATA_ROOT.'/commande/temp'; + $filename = '/boxactivity-order'.$fileid; + $refresh = dol_cache_refresh($cachedir, $filename, $cachetime); $data = array(); + if ($refresh) { $sql = "SELECT c.fk_statut, sum(c.total_ttc) as Mnttot, count(*) as nb"; @@ -276,36 +286,38 @@ class box_activity extends ModeleBoxes $result = $db->query($sql); if ($result) { - $num = $db->num_rows($result) + $i; + $num = $db->num_rows($result) + $line; $j=0; while ($j < $num) { $data[$j]=$db->fetch_object($result); $j++; } - file_put_contents($cachefile,serialize($data),LOCK_EX); + if (! empty($conf->global->MAIN_ACTIVATE_FILECACHE)) { + dol_filecache($cachedir, $filename, $data); + } $db->free($result); } else { dol_print_error($db); } } else { - $data = unserialize(file_get_contents($cachefile)); + $data = dol_readcachefile($cachedir, $filename); } if (! empty($data)) { $j=0; - while ($i < count($data)) { - $this->info_box_contents[$i][0] = array( + while ($line < count($data)) { + $this->info_box_contents[$line][0] = array( 'td' => 'align="left" width="16"', 'url' => DOL_URL_ROOT."/commande/list.php?mainmenu=commercial&leftmenu=orders&viewstatut=".$data[$j]->fk_statut, 'tooltip' => $langs->trans("Orders")." ".$commandestatic->LibStatut($data[$j]->fk_statut,0,0), 'logo' => 'object_order', ); - $this->info_box_contents[$i][1] = array( + $this->info_box_contents[$line][1] = array( 'td' => 'align="left"', 'text' =>$langs->trans("Orders")." ".$commandestatic->LibStatut($data[$j]->fk_statut,0,0), ); - $this->info_box_contents[$i][2] = array( + $this->info_box_contents[$line][2] = array( 'td' => 'align="right"', 'text' => $data[$j]->nb, 'tooltip' => $langs->trans("Orders")." ".$commandestatic->LibStatut($data[$j]->fk_statut,0,0), @@ -313,17 +325,17 @@ class box_activity extends ModeleBoxes ); $totalnb += $data[$j]->nb; - $this->info_box_contents[$i][3] = array( + $this->info_box_contents[$line][3] = array( 'td' => 'align="right"', 'text' => price($data[$j]->Mnttot,1,$langs,0,0,-1,$conf->currency), ); $totalMnt += $data[$j]->Mnttot; - $this->info_box_contents[$i][4] = array( + $this->info_box_contents[$line][4] = array( 'td' => 'align="right" width="18"', 'text' => $commandestatic->LibStatut($data[$j]->fk_statut,0,3), ); - $i++; + $line++; $j++; } } @@ -334,8 +346,9 @@ class box_activity extends ModeleBoxes include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; $propalstatic=new Propal($db); - $cachefile = DOL_DATA_ROOT.'/propale/temp/boxactivity-propal'.$fileid; - $refresh = !file_exists($cachefile) || ($now-$cachetime) > dol_filemtime($cachefile); + $cachedir = DOL_DATA_ROOT.'/propale/temp'; + $filename = '/boxactivity-propal'.$fileid; + $refresh = dol_cache_refresh($cachedir, $filename, $cachetime); $data = array(); if ($refresh) { $sql = "SELECT p.fk_statut, SUM(p.total) as Mnttot, COUNT(*) as nb"; @@ -354,24 +367,26 @@ class box_activity extends ModeleBoxes $result = $db->query($sql); if ($result) { - $num = $db->num_rows($result) + $i; + $num = $db->num_rows($result) + $line; $j=0; while ($j < $num) { $data[$j]=$db->fetch_object($result); $j++; } - file_put_contents($cachefile,serialize($data),LOCK_EX); + if (! empty($conf->global->MAIN_ACTIVATE_FILECACHE)) { + dol_filecache($cachedir, $filename, $data); + } $db->free($result); } else { dol_print_error($db); } } else { - $data = unserialize(file_get_contents($cachefile)); + $data = dol_readcachefile($cachedir, $filename); } if (! empty($data)) { $j=0; - while ($i < count($data)) { - $this->info_box_contents[$i][0] = array( + while ($line < count($data)) { + $this->info_box_contents[$line][] = array( 'td' => 'align="left" width="16"', 'url' => DOL_URL_ROOT."/comm/propal/list.php?mainmenu=commercial&leftmenu=propals&viewstatut=".$data[$j]->fk_statut, 'tooltip' => $langs->trans("Proposals")." ".$propalstatic->LibStatut($data[$j]->fk_statut,0), @@ -379,12 +394,12 @@ class box_activity extends ModeleBoxes ); $objp = $db->fetch_object($result); - $this->info_box_contents[$i][1] = array( + $this->info_box_contents[$line][] = array( 'td' => 'align="left"', 'text' => $langs->trans("Proposals")." ".$propalstatic->LibStatut($data[$j]->fk_statut,0), ); - $this->info_box_contents[$i][2] = array( + $this->info_box_contents[$line][] = array( 'td' => 'align="right"', 'text' => $data[$j]->nb, 'tooltip' => $langs->trans("Proposals")." ".$propalstatic->LibStatut($data[$j]->fk_statut,0), @@ -392,40 +407,40 @@ class box_activity extends ModeleBoxes ); $totalnb += $data[$j]->nb; - $this->info_box_contents[$i][3] = array( + $this->info_box_contents[$line][] = array( 'td' => 'align="right"', 'text' => price($data[$j]->Mnttot,1,$langs,0,0,-1,$conf->currency), ); $totalMnt += $data[$j]->Mnttot; - $this->info_box_contents[$i][4] = array( + $this->info_box_contents[$line][] = array( 'td' => 'align="right" width="18"', 'text' => $propalstatic->LibStatut($data[$j]->fk_statut,3), ); - $i++; + $line++; $j++; } } } // Add the sum in the bottom of the boxes - $this->info_box_contents[$i][1] = array( + $this->info_box_contents[$line][1] = array( 'td' => 'align="left" ', 'text' => $langs->trans("Total")." ".$textHead, ); - $this->info_box_contents[$i][2] = array( + $this->info_box_contents[$line][2] = array( 'td' => 'align="right" ', 'text' => $totalnb, ); - $this->info_box_contents[$i][3] = array( + $this->info_box_contents[$line][3] = array( 'td' => 'align="right" ', 'text' => price($totalMnt,1,$langs,0,0,-1,$conf->currency) ); - $this->info_box_contents[$i][4] = array( + $this->info_box_contents[$line][4] = array( 'td' => 'align="right" ', 'text' => "", ); - $this->info_box_contents[$i][5] = array( + $this->info_box_contents[$line][5] = array( 'td' => 'align="right"', 'text' => "", ); diff --git a/htdocs/core/boxes/box_bookmarks.php b/htdocs/core/boxes/box_bookmarks.php index 5250108f76c..88adb744ceb 100644 --- a/htdocs/core/boxes/box_bookmarks.php +++ b/htdocs/core/boxes/box_bookmarks.php @@ -1,5 +1,6 @@ + * Copyright (C) 2015 Frederic France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -80,19 +81,19 @@ class box_bookmarks extends ModeleBoxes { $num = $db->num_rows($result); - $i = 0; + $line = 0; - while ($i < $num) { + while ($line < $num) { $objp = $db->fetch_object($result); - $this->info_box_contents[$i][0] = array( + $this->info_box_contents[$line][0] = array( 'td' => 'align="left" width="16"', 'logo' => $this->boximg, 'url' => $objp->url, 'tooltip' => $objp->title, 'target' => $objp->target?'newtab':'', ); - $this->info_box_contents[$i][1] = array( + $this->info_box_contents[$line][1] = array( 'td' => 'align="left"', 'text' => $objp->title, 'url' => $objp->url, @@ -100,13 +101,13 @@ class box_bookmarks extends ModeleBoxes 'target' => $objp->target?'newtab':'', ); - $i++; + $line++; } if ($num==0) { $mytxt=$langs->trans("NoRecordedBookmarks"); if ($user->rights->bookmark->creer) $mytxt.=' '.$langs->trans("ClickToAdd"); - $this->info_box_contents[$i][0] = array( + $this->info_box_contents[$line][0] = array( 'td' => 'align="center" colspan="2"', 'tooltip' => $mytxt, 'url'=> DOL_URL_ROOT.'/bookmarks/list.php', 'text'=>$mytxt, diff --git a/htdocs/core/boxes/box_clients.php b/htdocs/core/boxes/box_clients.php index 01e0dc92635..2cd5922d784 100644 --- a/htdocs/core/boxes/box_clients.php +++ b/htdocs/core/boxes/box_clients.php @@ -2,6 +2,7 @@ /* Copyright (C) 2003-2007 Rodolphe Quiedeville * Copyright (C) 2004-2010 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2015 Frederic France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -79,7 +80,13 @@ class box_clients extends ModeleBoxes if ($user->rights->societe->lire) { - $sql = "SELECT s.nom as name, s.rowid as socid, s.datec, s.tms, s.status"; + $sql = "SELECT s.nom as name, s.rowid as socid"; + $sql.= ", s.code_client"; + $sql.= ", s.client"; + $sql.= ", s.code_fournisseur"; + $sql.= ", s.fournisseur"; + $sql.= ", s.logo"; + $sql.= ", s.datec, s.tms, s.status"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE s.client IN (1, 3)"; @@ -97,40 +104,40 @@ class box_clients extends ModeleBoxes if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) $url= DOL_URL_ROOT."/comm/card.php?socid="; else $url= DOL_URL_ROOT."/societe/soc.php?socid="; - $i = 0; - while ($i < $num) + $line = 0; + while ($line < $num) { $objp = $db->fetch_object($result); $datec=$db->jdate($objp->datec); $datem=$db->jdate($objp->tms); + $thirdpartystatic->id = $objp->socid; + $thirdpartystatic->name = $objp->name; + $thirdpartystatic->code_client = $objp->code_client; + $thirdpartystatic->code_fournisseur = $objp->code_fournisseur; + $thirdpartystatic->client = $objp->client; + $thirdpartystatic->fournisseur = $objp->fournisseur; + $thirdpartystatic->logo = $objp->logo; - $this->info_box_contents[$i][0] = array( - 'td' => 'align="left" width="16"', - 'logo' => $this->boximg, - 'tooltip' => $langs->trans('Customer').': '.$objp->name, - 'url' => $url.$objp->socid - ); - $this->info_box_contents[$i][1] = array( + $this->info_box_contents[$line][] = array( 'td' => 'align="left"', - 'text' => $objp->name, - 'tooltip' => $langs->trans('Customer').': '.$objp->name, - 'url' => $url.$objp->socid + 'text' => $thirdpartystatic->getNomUrl(1), + 'asis' => 1, ); - $this->info_box_contents[$i][2] = array( + $this->info_box_contents[$line][] = array( 'td' => 'align="right"', 'text' => dol_print_date($datem, "day") ); - $this->info_box_contents[$i][3] = array( + $this->info_box_contents[$line][] = array( 'td' => 'align="right" width="18"', 'text' => $thirdpartystatic->LibStatut($objp->status,3) ); - $i++; + $line++; } - if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedCustomers")); + if ($num==0) $this->info_box_contents[$line][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedCustomers")); $db->free($result); } diff --git a/htdocs/core/boxes/box_commandes.php b/htdocs/core/boxes/box_commandes.php index 670a5358d20..53e3aaf2861 100644 --- a/htdocs/core/boxes/box_commandes.php +++ b/htdocs/core/boxes/box_commandes.php @@ -2,6 +2,7 @@ /* Copyright (C) 2003-2007 Rodolphe Quiedeville * Copyright (C) 2004-2009 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2015 Frederic France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -53,20 +54,33 @@ class box_commandes extends ModeleBoxes { global $user, $langs, $db, $conf; - $this->max=$max; + $this->max = $max; - include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; - $commandestatic=new Commande($db); + include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; + include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; + $commandestatic = new Commande($db); + $societestatic = new Societe($db); $userstatic = new User($db); $this->info_box_head = array('text' => $langs->trans("BoxTitleLast".($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE?"":"Modified")."CustomerOrders",$max)); if ($user->rights->commande->lire) { - $sql = "SELECT s.nom as name, s.rowid as socid,"; - $sql.= " c.ref, c.tms, c.rowid, c.date_commande,"; - $sql.= " c.fk_statut, c.fk_user_valid, c.facture, c.total_ht"; + $sql = "SELECT s.nom as name"; + $sql.= ", s.rowid as socid"; + $sql.= ", s.code_client"; + $sql.= ", s.logo"; + $sql.= ", c.ref, c.tms"; + $sql.= ", c.rowid"; + $sql.= ", c.date_commande"; + $sql.= ", c.ref_client"; + $sql.= ", c.fk_statut"; + $sql.= ", c.fk_user_valid"; + $sql.= ", c.facture"; + $sql.= ", c.total_ht"; + $sql.= ", c.tva as total_tva"; + $sql.= ", c.total_ttc"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= ", ".MAIN_DB_PREFIX."commande as c"; if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; @@ -83,68 +97,63 @@ class box_commandes extends ModeleBoxes if ($result) { $num = $db->num_rows($result); - $i = 0; + $line = 0; - while ($i < $num) { + while ($line < $num) { $objp = $db->fetch_object($result); $date=$db->jdate($objp->date_commande); $datem=$db->jdate($objp->tms); + $commandestatic->id = $objp->rowid; + $commandestatic->ref = $objp->ref; + $commandestatic->ref_client = $objp->ref_client; + $commandestatic->total_ht = $objp->total_ht; + $commandestatic->total_tva = $objp->total_tva; + $commandestatic->total_ttc = $objp->total_ttc; + $societestatic->id = $objp->socid; + $societestatic->name = $objp->name; + $societestatic->code_client = $objp->code_client; + $societestatic->logo = $objp->logo; - $this->info_box_contents[$i][] = array( - 'td' => 'align="left" width="16"', - 'logo' => $this->boximg, - 'tooltip' => $langs->trans('Order').': '.$objp->ref, - 'url' => DOL_URL_ROOT."/commande/card.php?id=".$objp->rowid, - ); - - $this->info_box_contents[$i][] = array( + $this->info_box_contents[$line][] = array( 'td' => 'align="left"', - 'text' => $objp->ref, - 'tooltip' => $langs->trans('Order').': '.$objp->ref, - 'url' => DOL_URL_ROOT."/commande/card.php?id=".$objp->rowid, - ); - $this->info_box_contents[$i][] = array( - 'td' => 'align="left" width="16"', - 'logo' => 'company', - 'tooltip' => $langs->trans('Customer').': '.$objp->name, - 'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid, + 'text' => $commandestatic->getNomUrl(1), + 'asis' => 1, ); - $this->info_box_contents[$i][] = array( + $this->info_box_contents[$line][] = array( 'td' => 'align="left"', - 'text' => $objp->name, - 'tooltip' => $langs->trans('Customer').': '.$objp->name, - 'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid, + 'text' => $societestatic->getNomUrl(1), + 'asis' => 1, ); - $this->info_box_contents[$i][] = array( + $this->info_box_contents[$line][] = array( 'td' => 'align="right"', 'text' => price($objp->total_ht), ); if (! empty($conf->global->ORDER_BOX_LAST_ORDERS_SHOW_VALIDATE_USER)) { if ($objp->fk_user_valid > 0) $userstatic->fetch($objp->fk_user_valid); - $this->info_box_contents[$i][] = array( + $this->info_box_contents[$line][] = array( 'td' => 'align="right"', 'text' => (($objp->fk_user_valid > 0)?$userstatic->getNomUrl(1):''), - 'url' => (($objp->fk_user_valid > 0)?DOL_URL_ROOT.'/user/card.php?id='.$objp->fk_user_valid:''), + 'asis' => 1, ); } - $this->info_box_contents[$i][] = array( + $this->info_box_contents[$line][] = array( 'td' => 'align="right"', 'text' => dol_print_date($date,'day'), ); - $this->info_box_contents[$i][] = array( + $this->info_box_contents[$line][] = array( 'td' => 'align="right" width="18"', 'text' => $commandestatic->LibStatut($objp->fk_statut,$objp->facture,3), ); - $i++; + $line++; } - if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedOrders")); + if ($num==0) $this->info_box_contents[$line][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedOrders")); $db->free($result); } else { diff --git a/htdocs/core/boxes/box_comptes.php b/htdocs/core/boxes/box_comptes.php index 5340b06f0dd..178851466be 100644 --- a/htdocs/core/boxes/box_comptes.php +++ b/htdocs/core/boxes/box_comptes.php @@ -3,6 +3,7 @@ * Copyright (C) 2005-2013 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2013 Juanjo Menent + * Copyright (C) 2015 Frederic France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -94,66 +95,56 @@ class box_comptes extends ModeleBoxes if ($result) { $num = $db->num_rows($result); - $i = 0; + $line = 0; $solde_total = array(); $account_static = new Account($db); - while ($i < $num) { + while ($line < $num) { $objp = $db->fetch_object($result); $account_static->id = $objp->rowid; + $account_static->label = $objp->label; + $account_static->number = $objp->number; $solde=$account_static->solde(0); $solde_total[$objp->currency_code] += $solde; - $this->info_box_contents[$i][0] = array( - 'td' => 'align="left" width="16"', - 'logo' => $this->boximg, - 'tooltip' => $langs->trans('Account').': '.$objp->label, - 'url' => DOL_URL_ROOT."/compta/bank/account.php?account=".$objp->rowid, - ); - - $this->info_box_contents[$i][1] = array( + $this->info_box_contents[$line][] = array( 'td' => 'align="left"', - 'text' => $objp->label, - 'tooltip' => $langs->trans('Account').': '.$objp->label, - 'url' => DOL_URL_ROOT."/compta/bank/account.php?account=".$objp->rowid, + 'text' => $account_static->getNomUrl(1), + 'asis' => 1, ); - $this->info_box_contents[$i][2] = array( + $this->info_box_contents[$line][] = array( 'td' => 'align="left"', 'text' => $objp->number, ); - $this->info_box_contents[$i][3] = array( + $this->info_box_contents[$line][] = array( 'td' => 'align="right"', - 'text' => price($solde, 0, $langs, 0, 0, -1, $objp->currency_code) + 'text' => price($solde, 0, $langs, 0, -1, -1, $objp->currency_code) ); - $i++; + $line++; } // Total foreach ($solde_total as $key=>$solde) { - $this->info_box_contents[$i][0] = array( + $this->info_box_contents[$line][] = array( 'tr' => 'class="liste_total"', - 'td' => 'align="right" class="liste_total"', - 'text' => ' ', - ); - $this->info_box_contents[$i][1] = array( 'td' => 'align="left" class="liste_total"', 'text' => $langs->trans('Total').' '.$key, ); - $this->info_box_contents[$i][2] = array( + $this->info_box_contents[$line][] = array( 'td' => 'align="right" class="liste_total"', 'text' => ' ' ); - $totalamount=price($solde,0,$langs,0,0,-1,$key); - $this->info_box_contents[$i][3] = array( + + $this->info_box_contents[$line][] = array( 'td' => 'align="right" class="liste_total"', - 'text' => $totalamount + 'text' => price($solde, 0, $langs, 0, -1, -1, $key) ); - $i++; + $line++; } $db->free($result); diff --git a/htdocs/core/boxes/box_contacts.php b/htdocs/core/boxes/box_contacts.php index 8ec8bf77b9c..fdd5f725883 100644 --- a/htdocs/core/boxes/box_contacts.php +++ b/htdocs/core/boxes/box_contacts.php @@ -2,6 +2,7 @@ /* Copyright (C) 2003-2007 Rodolphe Quiedeville * Copyright (C) 2004-2010 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2015 Frederic France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -61,14 +62,15 @@ class box_contacts extends ModeleBoxes if ($user->rights->societe->lire) { - $sql = "SELECT sp.rowid, sp.lastname, sp.firstname, sp.civility as civility_id, sp.datec, sp.tms, sp.fk_soc,"; - $sql.= " s.nom as socname"; + $sql = "SELECT sp.rowid, sp.lastname, sp.firstname, sp.civility as civility_id, sp.datec, sp.tms, sp.fk_soc"; + $sql.= ", s.nom as socname"; + $sql.= ", s.code_client"; $sql.= " FROM ".MAIN_DB_PREFIX."socpeople as sp"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON sp.fk_soc = s.rowid"; if (! $user->rights->societe->client->voir && ! $user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE sp.entity IN (".getEntity('societe', 1).")"; if (! $user->rights->societe->client->voir && ! $user->societe_id) $sql.= " AND sp.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; - if ($user->societe_id) $sql.= " AND sp.fk_soc = $user->societe_id"; + if ($user->societe_id) $sql.= " AND sp.fk_soc = ".$user->societe_id; $sql.= " ORDER BY sp.tms DESC"; $sql.= $db->plimit($max, 0); @@ -79,8 +81,8 @@ class box_contacts extends ModeleBoxes $contactstatic=new Contact($db); $societestatic=new Societe($db); - $i = 0; - while ($i < $num) { + $line = 0; + while ($line < $num) { $objp = $db->fetch_object($result); $datec=$db->jdate($objp->datec); $datem=$db->jdate($objp->tms); @@ -89,47 +91,32 @@ class box_contacts extends ModeleBoxes $contactstatic->firstname=$objp->firstname; $contactstatic->civility_id=$objp->civility_id; - $societestatic->id=$objp->fk_soc; - $societestatic->name=$objp->socname; + $societestatic->id = $objp->fk_soc; + $societestatic->code_client = $objp->code_client; + $societestatic->name = $objp->socname; - $this->info_box_contents[$i][0] = array( - 'td' => 'align="left" width="16"', - 'logo' => $this->boximg, - 'tooltip' => $langs->trans('Contact').': '.$contactstatic->getFullName($langs,0), - 'url' => DOL_URL_ROOT."/contact/card.php?id=".$objp->rowid, - ); - - $this->info_box_contents[$i][1] = array( + $this->info_box_contents[$line][] = array( 'td' => 'align="left"', - 'text' => $contactstatic->getFullName($langs,0), - 'tooltip' => $langs->trans('Contact').': '.$contactstatic->getFullName($langs,0), - 'url' => DOL_URL_ROOT."/contact/card.php?id=".$objp->rowid, + 'text' => $contactstatic->getNomUrl(1), + 'asis' => 1, ); - $this->info_box_contents[$i][2] = array( - 'td' => 'align="left" width="16"', - 'logo' => ($objp->fk_soc > 0?'company':''), - 'tooltip' => $societestatic->name, - 'url' => ($objp->fk_soc > 0?DOL_URL_ROOT."/societe/soc.php?socid=".$objp->fk_soc:''), - ); - - $this->info_box_contents[$i][3] = array( + $this->info_box_contents[$line][] = array( 'td' => 'align="left"', - 'text' => $societestatic->name, - 'tooltip' => $societestatic->name, - 'url' => DOL_URL_ROOT."/societe/soc.php?socid=".$objp->fk_soc, + 'text' => $societestatic->getNomUrl(1), + 'asis' => 1, ); - $this->info_box_contents[$i][4] = array( + $this->info_box_contents[$line][] = array( 'td' => 'align="right"', 'text' => dol_print_date($datem, "day"), ); - $i++; + $line++; } if ($num==0) - $this->info_box_contents[$i][0] = array( + $this->info_box_contents[$line][0] = array( 'td' => 'align="center"', 'text'=>$langs->trans("NoRecordedContacts"), ); diff --git a/htdocs/core/boxes/box_contracts.php b/htdocs/core/boxes/box_contracts.php index c980be624da..58b5dc7f1fa 100644 --- a/htdocs/core/boxes/box_contracts.php +++ b/htdocs/core/boxes/box_contracts.php @@ -1,5 +1,6 @@ + * Copyright (C) 2015 Frederic France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -77,9 +78,9 @@ class box_contracts extends ModeleBoxes $num = $db->num_rows($resql); $now=dol_now(); - $i = 0; + $line = 0; - while ($i < $num) { + while ($line < $num) { $objp = $db->fetch_object($resql); $datec=$db->jdate($objp->datec); $dateterm=$db->jdate($objp->fin_validite); @@ -93,14 +94,14 @@ class box_contracts extends ModeleBoxes // fin_validite is no more on contract but on services // if ($objp->fk_statut == 1 && $dateterm < ($now - $conf->contrat->cloture->warning_delay)) { $late = img_warning($langs->trans("Late")); } - $this->info_box_contents[$i][0] = array( + $this->info_box_contents[$line][] = array( 'td' => 'align="left" width="16"', 'logo' => $this->boximg, 'tooltip' => $langs->trans('Contract').': '.($objp->ref?$objp->ref:$objp->rowid), 'url' => DOL_URL_ROOT."/contrat/card.php?id=".$objp->rowid, ); - $this->info_box_contents[$i][1] = array( + $this->info_box_contents[$line][] = array( 'td' => 'align="left"', 'text' => ($objp->ref?$objp->ref:$objp->rowid), // Some contracts have no ref 'tooltip' => $langs->trans('Contract').': '.($objp->ref?$objp->ref:$objp->rowid), @@ -108,36 +109,36 @@ class box_contracts extends ModeleBoxes 'url' => DOL_URL_ROOT."/contrat/card.php?id=".$objp->rowid, ); - $this->info_box_contents[$i][2] = array( + $this->info_box_contents[$line][] = array( 'td' => 'align="left" width="16"', 'logo' => 'company', 'tooltip' => $langs->trans('Customer').': '.$objp->name, 'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid, ); - $this->info_box_contents[$i][3] = array( + $this->info_box_contents[$line][] = array( 'td' => 'align="left"', 'text' => dol_trunc($objp->name,40), 'tooltip' => $langs->trans('Customer').': '.$objp->name, 'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid, ); - $this->info_box_contents[$i][4] = array( + $this->info_box_contents[$line][] = array( 'td' => 'align="right"', 'text' => dol_print_date($datec,'day'), ); - $this->info_box_contents[$i][5] = array( + $this->info_box_contents[$line][] = array( 'td' => 'align="right" class="nowrap"', 'text' => $contractstatic->getLibStatut(6), 'asis'=>1, ); - $i++; + $line++; } if ($num==0) - $this->info_box_contents[$i][0] = array( + $this->info_box_contents[$line][0] = array( 'td' => 'align="center"', 'text'=>$langs->trans("NoRecordedContracts"), ); diff --git a/htdocs/core/boxes/box_external_rss.php b/htdocs/core/boxes/box_external_rss.php index 689efc751c6..f1db35e1614 100644 --- a/htdocs/core/boxes/box_external_rss.php +++ b/htdocs/core/boxes/box_external_rss.php @@ -3,6 +3,7 @@ * Copyright (C) 2003 Eric Seigne * Copyright (C) 2004-2008 Laurent Destailleur * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2015 Frederic France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -108,10 +109,11 @@ class box_external_rss extends ModeleBoxes // INFO on items $items=$rssparser->getItems(); + //print '
'.print_r($items,true).'
'; $nbitems=count($items); - for($i = 0; $i < $max && $i < $nbitems; $i++) + for($line = 0; $line < $max && $line < $nbitems; $line++) { - $item = $items[$i]; + $item = $items[$line]; // Feed common fields $href = $item['link']; @@ -138,28 +140,38 @@ class box_external_rss extends ModeleBoxes if (! $isutf8 && $conf->file->character_set_client == 'UTF-8') $title=utf8_encode($title); elseif ($isutf8 && $conf->file->character_set_client == 'ISO-8859-1') $title=utf8_decode($title); - $title=preg_replace("/([[:alnum:]])\?([[:alnum:]])/","\\1'\\2",$title); // Gere probleme des apostrophes mal codee/decodee par utf8 + $title=preg_replace("/([[:alnum:]])\?([[:alnum:]])/","\\1'\\2",$title); // Gere probleme des apostrophes mal codee/decodee par utf8 $title=preg_replace("/^\s+/","",$title); // Supprime espaces de debut $this->info_box_contents["$href"]="$title"; - $this->info_box_contents[$i][0] = array( + $tooltip = $title; + $description = ! empty($item['description'])?$item['description']:''; + $isutf8 = utf8_check($description); + if (! $isutf8 && $conf->file->character_set_client == 'UTF-8') $description=utf8_encode($description); + elseif ($isutf8 && $conf->file->character_set_client == 'ISO-8859-1') $description=utf8_decode($description); + $description=preg_replace("/([[:alnum:]])\?([[:alnum:]])/","\\1'\\2",$description); + $description=preg_replace("/^\s+/","",$description); + $description=str_replace("\r\n","",$description); + $tooltip.= '
'.$description; + + $this->info_box_contents[$line][0] = array( 'td' => 'align="left" width="16"', 'logo' => $this->boximg, 'url' => $href, - 'tooltip' => $title, + 'tooltip' => $tooltip, 'target' => 'newrss', ); - $this->info_box_contents[$i][1] = array( + $this->info_box_contents[$line][1] = array( 'td' => 'align="left"', 'text' => $title, 'url' => $href, - 'tooltip' => $title, + 'tooltip' => $tooltip, 'maxlength' => 64, 'target' => 'newrss', ); - $this->info_box_contents[$i][2] = array( + $this->info_box_contents[$line][2] = array( 'td' => 'align="right" nowrap="1"', 'text' => $date, ); diff --git a/htdocs/core/boxes/box_factures.php b/htdocs/core/boxes/box_factures.php index 84f7e61b315..dd1059cf9d2 100644 --- a/htdocs/core/boxes/box_factures.php +++ b/htdocs/core/boxes/box_factures.php @@ -2,6 +2,7 @@ /* Copyright (C) 2003-2007 Rodolphe Quiedeville * Copyright (C) 2004-2009 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2015 Frederic France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -53,8 +54,11 @@ class box_factures extends ModeleBoxes $this->max=$max; - include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; - $facturestatic=new Facture($db); + include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; + include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; + + $facturestatic=new Facture($db); + $societestatic = new Societe($db); $text = $langs->trans("BoxTitleLast".($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE?"":"Modified")."CustomerBills",$max); $this->info_box_head = array( @@ -62,11 +66,16 @@ class box_factures extends ModeleBoxes 'limit'=> dol_strlen($text) ); - if ($user->rights->facture->lire) - { - $sql = "SELECT f.rowid as facid, f.facnumber, f.type, f.total as total_ht, f.datef as df"; + if ($user->rights->facture->lire) { + $sql = "SELECT f.rowid as facid"; + $sql.= ", f.facnumber, f.type, f.total as total_ht"; + $sql.= ", f.tva as total_tva"; + $sql.= ", f.total_ttc"; + $sql.= ", f.datef as df"; $sql.= ", f.paye, f.fk_statut, f.datec, f.tms"; - $sql.= ", s.nom as name, s.rowid as socid"; + $sql.= ", s.nom as name"; + $sql.= ", s.rowid as socid"; + $sql.= ", s.code_client"; $sql.= ", f.date_lim_reglement as datelimite"; $sql.= " FROM (".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f"; if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; @@ -88,60 +97,48 @@ class box_factures extends ModeleBoxes $i = 0; $l_due_date = $langs->trans('Late').' ('.strtolower($langs->trans('DateEcheance')).': %s)'; - while ($i < $num) - { - $objp = $db->fetch_object($result); - $datelimite=$db->jdate($objp->datelimite); - $date=$db->jdate($objp->df); - $datem=$db->jdate($objp->tms); + while ($i < $num) { + $objp = $db->fetch_object($result); + $datelimite = $db->jdate($objp->datelimite); + $date = $db->jdate($objp->df); + $datem = $db->jdate($objp->tms); + $facturestatic->id = $objp->facid; + $facturestatic->ref = $objp->facnumber; + $facturestatic->type = $objp->type; + $facturestatic->total_ht = $objp->total_ht; + $facturestatic->total_tva = $objp->total_tva; + $facturestatic->total_ttc = $objp->total_ttc; + $societestatic->id = $objp->socid; + $societestatic->name = $objp->name; + $societestatic->code_client = $objp->code_client; - $picto='bill'; - if ($objp->type == 1) $picto.='r'; - if ($objp->type == 2) $picto.='a'; $late = ''; if ($objp->paye == 0 && ($objp->fk_statut != 2 && $objp->fk_statut != 3) && $datelimite < ($now - $conf->facture->client->warning_delay)) { $late = img_warning(sprintf($l_due_date,dol_print_date($datelimite,'day')));} - $this->info_box_contents[$i][0] = array( - 'td' => 'align="left" width="16"', - 'logo' => $picto, - 'tooltip' => $langs->trans('CustomerInvoice').': '.$objp->facnumber, - 'url' => DOL_URL_ROOT."/compta/facture.php?facid=".$objp->facid, - ); - - $this->info_box_contents[$i][1] = array( + $this->info_box_contents[$i][] = array( 'td' => 'align="left"', - 'text' => $objp->facnumber, + 'text' => $facturestatic->getNomUrl(1), 'text2'=> $late, - 'tooltip' => $langs->trans('CustomerInvoice').': '.$objp->facnumber, - 'url' => DOL_URL_ROOT."/compta/facture.php?facid=".$objp->facid, + 'asis' => 1, ); - $this->info_box_contents[$i][2] = array( - 'td' => 'align="left" width="16"', - 'logo' => 'company', - 'tooltip' => $langs->trans('Customer').': '.$objp->name, - 'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid, - ); - - $this->info_box_contents[$i][3] = array( + $this->info_box_contents[$i][] = array( 'td' => 'align="left"', - 'text' => $objp->name, - 'maxlength'=>40, - 'tooltip' => $langs->trans('Customer').': '.$objp->name, - 'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid, + 'text' => $societestatic->getNomUrl(1, '', 40), + 'asis' => 1, ); - $this->info_box_contents[$i][4] = array( + $this->info_box_contents[$i][] = array( 'td' => 'align="right"', 'text' => price($objp->total_ht), ); - $this->info_box_contents[$i][5] = array( + $this->info_box_contents[$i][] = array( 'td' => 'align="right"', 'text' => dol_print_date($date,'day'), ); - $this->info_box_contents[$i][6] = array( + $this->info_box_contents[$i][] = array( 'td' => 'align="right" width="18"', 'text' => $facturestatic->LibStatut($objp->paye,$objp->fk_statut,3), ); @@ -173,11 +170,11 @@ class box_factures extends ModeleBoxes } /** - * Method to show box + * Method to show box * - * @param array $head Array with properties of box title - * @param array $contents Array with properties of box lines - * @return void + * @param array $head Array with properties of box title + * @param array $contents Array with properties of box lines + * @return void */ function showBox($head = null, $contents = null) { diff --git a/htdocs/core/boxes/box_factures_fourn.php b/htdocs/core/boxes/box_factures_fourn.php index 4e222369949..f48d2ab43d3 100644 --- a/htdocs/core/boxes/box_factures_fourn.php +++ b/htdocs/core/boxes/box_factures_fourn.php @@ -2,6 +2,7 @@ /* Copyright (C) 2003 Rodolphe Quiedeville * Copyright (C) 2004-2013 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2015 Frederic France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -55,7 +56,10 @@ class box_factures_fourn extends ModeleBoxes $this->max=$max; include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; - $facturestatic=new FactureFournisseur($db); + include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; + + $facturestatic = new FactureFournisseur($db); + $societestatic = new Societe($db); $this->info_box_head = array( 'text' => $langs->trans("BoxTitleLast".($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE?"":"Modified")."SupplierBills",$max) @@ -64,7 +68,12 @@ class box_factures_fourn extends ModeleBoxes if ($user->rights->fournisseur->facture->lire) { $sql = "SELECT s.nom as name, s.rowid as socid,"; - $sql.= " f.rowid as facid, f.ref, f.ref_supplier, f.total_ht,"; + $sql.= " s.code_fournisseur,"; + $sql.= " s.logo,"; + $sql.= " f.rowid as facid, f.ref, f.ref_supplier,"; + $sql.= " f.total_ht,"; + $sql.= " f.total_tva,"; + $sql.= " f.total_ttc,"; $sql.= " f.paye, f.fk_statut,"; $sql.= ' f.datef as df,'; $sql.= ' f.datec as datec,'; @@ -94,47 +103,41 @@ class box_factures_fourn extends ModeleBoxes $datelimite=$db->jdate($objp->datelimite); $date=$db->jdate($objp->df); $datem=$db->jdate($objp->tms); + $facturestatic->id = $objp->facid; + $facturestatic->ref = $objp->ref; + $facturestatic->total_ht = $objp->total_ht; + $facturestatic->total_tva = $objp->total_tva; + $facturestatic->total_ttc = $objp->total_ttc; + $societestatic->id = $objp->socid; + $societestatic->name = $objp->name; + $societestatic->fournisseur = 1; + $societestatic->code_fournisseur = $objp->code_fournisseur; + $societestatic->logo = $objp->logo; $late = ''; if ($objp->paye == 0 && $datelimite && $datelimite < ($now - $conf->facture->fournisseur->warning_delay)) $late=img_warning(sprintf($l_due_date, dol_print_date($datelimite,'day'))); - $this->info_box_contents[$i][0] = array( - 'td' => 'align="left" width="16"', - 'logo' => $this->boximg, - 'tooltip' => $langs->trans('SupplierInvoice').': '.($objp->ref?$objp->ref:$objp->facid).'
'.$langs->trans('RefSupplier').': '.$objp->ref_supplier, - 'url' => DOL_URL_ROOT."/fourn/facture/card.php?facid=".$objp->facid, - ); - - $this->info_box_contents[$i][1] = array( + $this->info_box_contents[$i][] = array( 'td' => 'align="left"', - 'text' => ($objp->ref?$objp->ref:$objp->facid), + 'text' => $facturestatic->getNomUrl(1), 'text2'=> $late, - 'tooltip' => $langs->trans('SupplierInvoice').': '.($objp->ref?$objp->ref:$objp->facid).'
'.$langs->trans('RefSupplier').': '.$objp->ref_supplier, - 'url' => DOL_URL_ROOT."/fourn/facture/card.php?facid=".$objp->facid, + 'asis' => 1, ); - $this->info_box_contents[$i][2] = array( + $this->info_box_contents[$i][] = array( 'td' => 'align="left"', 'text' => $objp->ref_supplier, 'tooltip' => $langs->trans('SupplierInvoice').': '.($objp->ref?$objp->ref:$objp->facid).'
'.$langs->trans('RefSupplier').': '.$objp->ref_supplier, 'url' => DOL_URL_ROOT."/fourn/facture/card.php?facid=".$objp->facid, ); - $this->info_box_contents[$i][3] = array( - 'td' => 'align="left" width="16"', - 'logo' => 'company', - 'tooltip' => $langs->trans('Supplier').': '.$objp->name, - 'url' => DOL_URL_ROOT."/fourn/card.php?socid=".$objp->socid, - ); - - $this->info_box_contents[$i][4] = array( + $this->info_box_contents[$i][] = array( 'td' => 'align="left"', - 'text' => $objp->name, - 'tooltip' => $langs->trans('Supplier').': '.$objp->name, - 'url' => DOL_URL_ROOT."/fourn/card.php?socid=".$objp->socid, + 'text' => $societestatic->getNomUrl(1, 'supplier'), + 'asis' => 1, ); - $this->info_box_contents[$i][5] = array( + $this->info_box_contents[$i][] = array( 'td' => 'align="right"', 'text' => dol_print_date($date,'day'), ); diff --git a/htdocs/core/boxes/box_factures_fourn_imp.php b/htdocs/core/boxes/box_factures_fourn_imp.php index aa217f1c436..a82af75332a 100644 --- a/htdocs/core/boxes/box_factures_fourn_imp.php +++ b/htdocs/core/boxes/box_factures_fourn_imp.php @@ -1,6 +1,7 @@ * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2015 Frederic France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,9 +18,9 @@ */ /** - * \file htdocs/core/boxes/box_factures_fourn_imp.php + * \file htdocs/core/boxes/box_factures_fourn_imp.php * \ingroup fournisseur - * \brief Fichier de gestion d'une box des factures fournisseurs impayees + * \brief Fichier de gestion d'une box des factures fournisseurs impayees */ include_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php'; @@ -29,9 +30,9 @@ include_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php'; */ class box_factures_fourn_imp extends ModeleBoxes { - var $boxcode="oldestunpaidsupplierbills"; - var $boximg="object_bill"; - var $boxlabel="BoxOldestUnpaidSupplierBills"; + var $boxcode = "oldestunpaidsupplierbills"; + var $boximg = "object_bill"; + var $boxlabel = "BoxOldestUnpaidSupplierBills"; var $depends = array("facture","fournisseur"); var $db; @@ -93,55 +94,82 @@ class box_factures_fourn_imp extends ModeleBoxes $late=''; if ($datelimite && $datelimite < ($now - $conf->facture->fournisseur->warning_delay)) $late=img_warning(sprintf($l_due_date,dol_print_date($datelimite,'day'))); - $this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', - 'logo' => $this->boximg, - 'url' => DOL_URL_ROOT."/fourn/facture/card.php?facid=".$objp->facid); + $tooltip = $langs->trans('SupplierInvoice') . ': ' . ($objp->ref?$objp->ref:$objp->facid) . '
' . $langs->trans('RefSupplier') . ': ' . $objp->ref_supplier; + $this->info_box_contents[$i][0] = array( + 'td' => 'align="left" width="16"', + 'logo' => $this->boximg, + 'tooltip' => $tooltip, + 'url' => DOL_URL_ROOT."/fourn/facture/card.php?facid=".$objp->facid, + ); - $this->info_box_contents[$i][1] = array('td' => 'align="left"', - 'text' => ($objp->ref?$objp->ref:$objp->facid), - 'text2'=> $late, - 'url' => DOL_URL_ROOT."/fourn/facture/card.php?facid=".$objp->facid); + $this->info_box_contents[$i][1] = array( + 'td' => 'align="left"', + 'text' => ($objp->ref?$objp->ref:$objp->facid), + 'text2'=> $late, + 'tooltip' => $tooltip, + 'url' => DOL_URL_ROOT."/fourn/facture/card.php?facid=".$objp->facid, + ); - $this->info_box_contents[$i][2] = array('td' => 'align="left"', - 'text' => $objp->ref_supplier, - 'url' => DOL_URL_ROOT."/fourn/facture/card.php?facid=".$objp->facid); + $this->info_box_contents[$i][2] = array( + 'td' => 'align="left"', + 'text' => $objp->ref_supplier, + 'tooltip' => $tooltip, + 'url' => DOL_URL_ROOT."/fourn/facture/card.php?facid=".$objp->facid, + ); - $this->info_box_contents[$i][3] = array('td' => 'align="left" width="16"', - 'logo' => 'company', - 'url' => DOL_URL_ROOT."/fourn/card.php?socid=".$objp->socid); + $tooltip = $langs->trans('Supplier') . ': '. $objp->name; + $this->info_box_contents[$i][3] = array( + 'td' => 'align="left" width="16"', + 'logo' => 'company', + 'tooltip' => $tooltip, + 'url' => DOL_URL_ROOT."/fourn/card.php?socid=".$objp->socid, + ); - $this->info_box_contents[$i][4] = array('td' => 'align="left"', - 'text' => $objp->name, - 'url' => DOL_URL_ROOT."/fourn/card.php?socid=".$objp->socid); + $this->info_box_contents[$i][4] = array( + 'td' => 'align="left"', + 'text' => $objp->name, + 'tooltip' => $tooltip, + 'url' => DOL_URL_ROOT."/fourn/card.php?socid=".$objp->socid, + ); - $this->info_box_contents[$i][5] = array('td' => 'align="right"', - 'text' => dol_print_date($datelimite,'day')); + $this->info_box_contents[$i][5] = array( + 'td' => 'align="right"', + 'text' => dol_print_date($datelimite,'day'), + ); $fac = new FactureFournisseur($db); $fac->fetch($objp->facid); $alreadypaid=$fac->getSommePaiement(); - $this->info_box_contents[$i][6] = array('td' => 'align="right" width="18"', - 'text' => $facturestatic->LibStatut($objp->paye,$objp->fk_statut,3,$alreadypaid,$objp->type)); + $this->info_box_contents[$i][6] = array( + 'td' => 'align="right" width="18"', + 'text' => $facturestatic->LibStatut($objp->paye,$objp->fk_statut,3,$alreadypaid,$objp->type), + ); - $i++; - } + $i++; + } - if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoUnpaidSupplierBills")); + if ($num==0) + $this->info_box_contents[$i][0] = array( + 'td' => 'align="center"', + 'text'=>$langs->trans("NoUnpaidSupplierBills"), + ); - $db->free($result); - } - else { - $this->info_box_contents[0][0] = array( 'td' => 'align="left"', - 'maxlength'=>500, - 'text' => ($db->error().' sql='.$sql)); - } - } - else { - $this->info_box_contents[0][0] = array('td' => 'align="left"', - 'text' => $langs->trans("ReadPermissionNotAllowed")); - } + $db->free($result); + } else { + $this->info_box_contents[0][0] = array( + 'td' => 'align="left"', + 'maxlength'=>500, + 'text' => ($db->error().' sql='.$sql), + ); + } + } else { + $this->info_box_contents[0][0] = array( + 'td' => 'align="left"', + 'text' => $langs->trans("ReadPermissionNotAllowed"), + ); + } - } + } /** * Method to show box diff --git a/htdocs/core/boxes/box_factures_imp.php b/htdocs/core/boxes/box_factures_imp.php index e6df1530f8d..d7817d134d3 100644 --- a/htdocs/core/boxes/box_factures_imp.php +++ b/htdocs/core/boxes/box_factures_imp.php @@ -2,6 +2,7 @@ /* Copyright (C) 2003-2007 Rodolphe Quiedeville * Copyright (C) 2004-2007 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2015 Frederic France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -57,15 +58,24 @@ class box_factures_imp extends ModeleBoxes $this->max=$max; include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; - $facturestatic=new Facture($db); + include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; + + $facturestatic = new Facture($db); + $societestatic = new Societe($db); $this->info_box_head = array('text' => $langs->trans("BoxTitleOldestUnpaidCustomerBills",$max)); if ($user->rights->facture->lire) { $sql = "SELECT s.nom as name, s.rowid as socid,"; + $sql.= " s.code_client,"; + $sql.= " s.logo,"; $sql.= " f.facnumber, f.date_lim_reglement as datelimite,"; + $sql.= " f.type,"; $sql.= " f.amount, f.datef as df,"; + $sql.= " f.total as total_ht,"; + $sql.= " f.tva as total_tva,"; + $sql.= " f.total_ttc,"; $sql.= " f.paye, f.fk_statut, f.rowid as facid"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f"; if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; @@ -92,34 +102,43 @@ class box_factures_imp extends ModeleBoxes { $objp = $db->fetch_object($result); $datelimite=$db->jdate($objp->datelimite); + $facturestatic->id = $objp->facid; + $facturestatic->ref = $objp->facnumber; + $facturestatic->type = $objp->type; + $facturestatic->total_ht = $objp->total_ht; + $facturestatic->total_tva = $objp->total_tva; + $facturestatic->total_ttc = $objp->total_ttc; + $societestatic->id = $objp->socid; + $societestatic->name = $objp->name; + $societestatic->client = 1; + $societestatic->code_client = $objp->code_client; + $societestatic->logo = $objp->logo; $late=''; if ($datelimite < ($now - $conf->facture->client->warning_delay)) $late = img_warning(sprintf($l_due_date,dol_print_date($datelimite,'day'))); - $this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', - 'logo' => $this->boximg, - 'url' => DOL_URL_ROOT."/compta/facture.php?facid=".$objp->facid); + $this->info_box_contents[$i][] = array( + 'td' => 'align="left"', + 'text' => $facturestatic->getNomUrl(1), + 'text2'=> $late, + 'asis' => 1, + ); - $this->info_box_contents[$i][1] = array('td' => 'align="left"', - 'text' => $objp->facnumber, - 'text2'=> $late, - 'url' => DOL_URL_ROOT."/compta/facture.php?facid=".$objp->facid); + $this->info_box_contents[$i][] = array( + 'td' => 'align="left"', + 'text' => $societestatic->getNomUrl(1, '', 44), + 'asis' => 1, + ); - $this->info_box_contents[$i][2] = array('td' => 'align="left" width="16"', - 'logo' => 'company', - 'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid); + $this->info_box_contents[$i][] = array( + 'td' => 'align="right"', + 'text' => dol_print_date($datelimite,'day'), + ); - $this->info_box_contents[$i][3] = array('td' => 'align="left"', - 'text' => $objp->name, - 'maxlength'=>44, - 'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid); - - $this->info_box_contents[$i][4] = array('td' => 'align="right"', - 'text' => dol_print_date($datelimite,'day'), - ); - - $this->info_box_contents[$i][5] = array('td' => 'align="right" width="18"', - 'text' => $facturestatic->LibStatut($objp->paye,$objp->fk_statut,3)); + $this->info_box_contents[$i][] = array( + 'td' => 'align="right" width="18"', + 'text' => $facturestatic->LibStatut($objp->paye,$objp->fk_statut,3), + ); $i++; } @@ -130,14 +149,18 @@ class box_factures_imp extends ModeleBoxes } else { - $this->info_box_contents[0][0] = array( 'td' => 'align="left"', - 'maxlength'=>500, - 'text' => ($db->error().' sql='.$sql)); + $this->info_box_contents[0][0] = array( + 'td' => 'align="left"', + 'maxlength'=>500, + 'text' => ($db->error().' sql='.$sql), + ); } } else { - $this->info_box_contents[0][0] = array('td' => 'align="left"', - 'text' => $langs->trans("ReadPermissionNotAllowed")); + $this->info_box_contents[0][0] = array( + 'td' => 'align="left"', + 'text' => $langs->trans("ReadPermissionNotAllowed"), + ); } } diff --git a/htdocs/core/boxes/box_ficheinter.php b/htdocs/core/boxes/box_ficheinter.php index 9cce737eb9a..decf5e564f0 100644 --- a/htdocs/core/boxes/box_ficheinter.php +++ b/htdocs/core/boxes/box_ficheinter.php @@ -1,20 +1,21 @@ * Copyright (C) 2013 Juanjo Menent + * Copyright (C) 2015 Frederic France * -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* 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 . -*/ + * 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/core/boxes/box_ficheinter.php diff --git a/htdocs/core/boxes/box_fournisseurs.php b/htdocs/core/boxes/box_fournisseurs.php index f233221ccaa..e9c21da739f 100644 --- a/htdocs/core/boxes/box_fournisseurs.php +++ b/htdocs/core/boxes/box_fournisseurs.php @@ -1,6 +1,7 @@ * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2015 Frederic France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -84,36 +85,52 @@ class box_fournisseurs extends ModeleBoxes $datec=$db->jdate($objp->datec); $datem=$db->jdate($objp->tms); - $this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', - 'logo' => $this->boximg, - 'url' => DOL_URL_ROOT."/fourn/card.php?socid=".$objp->socid); + $tooltip = $langs->trans('Supplier') . ': ' . $objp->name; + $this->info_box_contents[$i][0] = array( + 'td' => 'align="left" width="16"', + 'logo' => $this->boximg, + 'tooltip' => $tooltip, + 'url' => DOL_URL_ROOT."/fourn/card.php?socid=".$objp->socid, + ); - $this->info_box_contents[$i][1] = array('td' => 'align="left"', - 'text' => $objp->name, - 'url' => DOL_URL_ROOT."/fourn/card.php?socid=".$objp->socid); + $this->info_box_contents[$i][1] = array( + 'td' => 'align="left"', + 'text' => $objp->name, + 'tooltip' => $tooltip, + 'url' => DOL_URL_ROOT."/fourn/card.php?socid=".$objp->socid, + ); - $this->info_box_contents[$i][2] = array('td' => 'align="right"', - 'text' => dol_print_date($datem, "day")); + $this->info_box_contents[$i][2] = array( + 'td' => 'align="right"', + 'text' => dol_print_date($datem, "day"), + ); - $this->info_box_contents[$i][3] = array('td' => 'align="right" width="18"', - 'text' => $thirdpartystatic->LibStatut($objp->status,3)); + $this->info_box_contents[$i][3] = array( + 'td' => 'align="right" width="18"', + 'text' => $thirdpartystatic->LibStatut($objp->status,3), + ); $i++; } - if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedSuppliers")); + if ($num==0) $this->info_box_contents[$i][0] = array( + 'td' => 'align="center"', + 'text'=>$langs->trans("NoRecordedSuppliers"), + ); - $db->free($result); + $db->free($result); + } else { + $this->info_box_contents[0][0] = array( + 'td' => 'align="left"', + 'maxlength'=>500, + 'text' => ($db->error().' sql='.$sql), + ); } - else { - $this->info_box_contents[0][0] = array( 'td' => 'align="left"', - 'maxlength'=>500, - 'text' => ($db->error().' sql='.$sql)); - } - } - else { - $this->info_box_contents[0][0] = array('td' => 'align="left"', - 'text' => $langs->trans("ReadPermissionNotAllowed")); + } else { + $this->info_box_contents[0][0] = array( + 'td' => 'align="left"', + 'text' => $langs->trans("ReadPermissionNotAllowed"), + ); } } diff --git a/htdocs/core/boxes/box_members.php b/htdocs/core/boxes/box_members.php index 4760a3aaf89..f871226b4e9 100644 --- a/htdocs/core/boxes/box_members.php +++ b/htdocs/core/boxes/box_members.php @@ -2,6 +2,7 @@ /* Copyright (C) 2003-2007 Rodolphe Quiedeville * Copyright (C) 2004-2013 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2015 Frederic France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -95,8 +96,8 @@ class box_members extends ModeleBoxes { $num = $db->num_rows($result); - $i = 0; - while ($i < $num) + $line = 0; + while ($line < $num) { $objp = $db->fetch_object($result); $datec=$db->jdate($objp->datec); @@ -104,6 +105,7 @@ class box_members extends ModeleBoxes $memberstatic->lastname=$objp->lastname; $memberstatic->firstname=$objp->firstname; + $memberstatic->ref = $objp->rowid; if (! empty($objp->fk_soc)) { $memberstatic->socid = $objp->fk_soc; @@ -113,39 +115,53 @@ class box_members extends ModeleBoxes $memberstatic->name=$objp->company; } - $this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', - 'logo' => $this->boximg, - 'url' => DOL_URL_ROOT."/adherents/card.php?rowid=".$objp->rowid); + $this->info_box_contents[$line][] = array( + 'td' => 'align="left"', + 'text' => $memberstatic->getNomUrl(1), + 'asis' => 1, + ); - $this->info_box_contents[$i][1] = array('td' => 'align="left"', - 'text' => $memberstatic->getFullName($langs), - 'url' => DOL_URL_ROOT."/adherents/card.php?rowid=".$objp->rowid); + $this->info_box_contents[$line][] = array( + 'td' => 'align="left"', + 'text' => $memberstatic->getFullName($langs), + 'url' => DOL_URL_ROOT."/adherents/card.php?rowid=".$objp->rowid, + ); - $this->info_box_contents[$i][2] = array('td' => 'align="right"', - 'text' => dol_print_date($datem, "day")); + $this->info_box_contents[$line][] = array( + 'td' => 'align="right"', + 'text' => dol_print_date($datem, "day"), + ); - $this->info_box_contents[$i][3] = array('td' => 'align="right" width="18"', - 'text' => $memberstatic->LibStatut($objp->status,$objp->cotisation,$db->jdate($objp->date_end_subscription),3)); + $this->info_box_contents[$line][] = array( + 'td' => 'align="right" width="18"', + 'text' => $memberstatic->LibStatut($objp->status,$objp->cotisation,$db->jdate($objp->date_end_subscription),3), + ); - $i++; - } + $line++; + } - if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedCustomers")); + if ($num==0) + $this->info_box_contents[$line][0] = array( + 'td' => 'align="center"', + 'text'=>$langs->trans("NoRecordedCustomers"), + ); - $db->free($result); - } - else { - $this->info_box_contents[0][0] = array( 'td' => 'align="left"', - 'maxlength'=>500, - 'text' => ($db->error().' sql='.$sql)); - } - } - else { - $this->info_box_contents[0][0] = array('align' => 'left', - 'text' => $langs->trans("ReadPermissionNotAllowed")); - } + $db->free($result); + } else { + $this->info_box_contents[0][0] = array( + 'td' => 'align="left"', + 'maxlength'=>500, + 'text' => ($db->error().' sql='.$sql), + ); + } + } else { + $this->info_box_contents[0][0] = array( + 'align' => 'left', + 'text' => $langs->trans("ReadPermissionNotAllowed"), + ); + } - } + } /** * Method to show box diff --git a/htdocs/core/boxes/box_produits.php b/htdocs/core/boxes/box_produits.php index d3772ff65f1..509502183af 100644 --- a/htdocs/core/boxes/box_produits.php +++ b/htdocs/core/boxes/box_produits.php @@ -2,6 +2,7 @@ /* Copyright (C) 2003 Rodolphe Quiedeville * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2015 Frederic France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -63,7 +64,7 @@ class box_produits extends ModeleBoxes if ($user->rights->produit->lire || $user->rights->service->lire) { - $sql = "SELECT p.rowid, p.label, p.price, p.price_base_type, p.price_ttc, p.fk_product_type, p.tms, p.tosell, p.tobuy"; + $sql = "SELECT p.rowid, p.label, p.ref, p.price, p.price_base_type, p.price_ttc, p.fk_product_type, p.tms, p.tosell, p.tobuy, p.fk_price_expression"; $sql.= " FROM ".MAIN_DB_PREFIX."product as p"; $sql.= ' WHERE p.entity IN ('.getEntity($productstatic->element, 1).')'; if (empty($user->rights->produit->lire)) $sql.=' AND p.fk_product_type != 0'; @@ -75,8 +76,8 @@ class box_produits extends ModeleBoxes if ($result) { $num = $db->num_rows($result); - $i = 0; - while ($i < $num) + $line = 0; + while ($line < $num) { $objp = $db->fetch_object($result); $datem=$db->jdate($objp->tms); @@ -98,58 +99,92 @@ class box_produits extends ModeleBoxes $objp->label = $objtp->label; } } + $productstatic->id = $objp->rowid; + $productstatic->ref = $objp->ref; + $productstatic->type = $objp->fk_product_type; + $productstatic->label = $objp->label; - $this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', - 'logo' => ($objp->fk_product_type==1?'object_service':'object_product'), - 'url' => DOL_URL_ROOT."/product/card.php?id=".$objp->rowid); + $this->info_box_contents[$line][] = array( + 'td' => 'align="left"', + 'text' => $productstatic->getNomUrl(1), + 'asis' => 1, + ); - $this->info_box_contents[$i][1] = array('td' => 'align="left"', - 'text' => $objp->label, - 'url' => DOL_URL_ROOT."/product/card.php?id=".$objp->rowid); + $this->info_box_contents[$line][] = array( + 'td' => 'align="left"', + 'text' => $objp->label, + ); - if ($objp->price_base_type == 'HT') - { - $price=price($objp->price); - $price_base_type=$langs->trans("HT"); - } - else - { - $price=price($objp->price_ttc); - $price_base_type=$langs->trans("TTC"); - } - $this->info_box_contents[$i][2] = array('td' => 'align="right"', - 'text' => $price); + if (empty($objp->fk_price_expression)) { + $price_base_type=$langs->trans($objp->price_base_type); + $price=($objp->price_base_type == 'HT')?price($objp->price):$price=price($objp->price_ttc); + } + else //Parse the dinamic price + { + $productstatic->fetch($objp->rowid, '', '', 1); + $priceparser = new PriceParser($this->db); + $price_result = $priceparser->parseProduct($productstatic); + if ($price_result >= 0) { + if ($objp->price_base_type == 'HT') + { + $price_base_type=$langs->trans("HT"); + } + else + { + $price_result = $price_result * (1 + ($productstatic->tva_tx / 100)); + $price_base_type=$langs->trans("TTC"); + } + $price=price($price_result); + } + } + $this->info_box_contents[$line][] = array( + 'td' => 'align="right"', + 'text' => $price, + ); - $this->info_box_contents[$i][3] = array('td' => 'align="left" class="nowrap"', - 'text' => $price_base_type); + $this->info_box_contents[$line][] = array( + 'td' => 'align="left" class="nowrap"', + 'text' => $price_base_type, + ); - $this->info_box_contents[$i][4] = array('td' => 'align="right"', - 'text' => dol_print_date($datem,'day')); + $this->info_box_contents[$line][] = array( + 'td' => 'align="right"', + 'text' => dol_print_date($datem,'day'), + ); - $this->info_box_contents[$i][5] = array('td' => 'align="right" width="18"', - 'text' => $productstatic->LibStatut($objp->tosell,3,0)); + $this->info_box_contents[$line][] = array( + 'td' => 'align="right" width="18"', + 'text' => $productstatic->LibStatut($objp->tosell,3,0), + ); - $this->info_box_contents[$i][6] = array('td' => 'align="right" width="18"', - 'text' => $productstatic->LibStatut($objp->tobuy,3,1)); + $this->info_box_contents[$line][] = array( + 'td' => 'align="right" width="18"', + 'text' => $productstatic->LibStatut($objp->tobuy,3,1), + ); - $i++; - } - if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedProducts")); + $line++; + } + if ($num==0) + $this->info_box_contents[$line][0] = array( + 'td' => 'align="center"', + 'text'=>$langs->trans("NoRecordedProducts"), + ); - $db->free($result); - } - else - { - $this->info_box_contents[0][0] = array( 'td' => 'align="left"', - 'maxlength'=>500, - 'text' => ($db->error().' sql='.$sql)); - } - } - else { - $this->info_box_contents[0][0] = array('td' => 'align="left"', - 'text' => $langs->trans("ReadPermissionNotAllowed")); - } - } + $db->free($result); + } else { + $this->info_box_contents[0][0] = array( + 'td' => 'align="left"', + 'maxlength'=>500, + 'text' => ($db->error().' sql='.$sql), + ); + } + } else { + $this->info_box_contents[0][0] = array( + 'td' => 'align="left"', + 'text' => $langs->trans("ReadPermissionNotAllowed"), + ); + } + } /** * Method to show box diff --git a/htdocs/core/boxes/box_produits_alerte_stock.php b/htdocs/core/boxes/box_produits_alerte_stock.php index 1079f623492..8096dfdec10 100644 --- a/htdocs/core/boxes/box_produits_alerte_stock.php +++ b/htdocs/core/boxes/box_produits_alerte_stock.php @@ -3,6 +3,7 @@ * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2005-2012 Maxime Kohlhaas + * Copyright (C) 2015 Frederic France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -64,7 +65,7 @@ class box_produits_alerte_stock extends ModeleBoxes if ($user->rights->produit->lire || $user->rights->service->lire) { - $sql = "SELECT p.rowid, p.label, p.price, p.price_base_type, p.price_ttc, p.fk_product_type, p.tms, p.tosell, p.tobuy, p.seuil_stock_alerte,"; + $sql = "SELECT p.rowid, p.label, p.price, p.ref, p.price_base_type, p.price_ttc, p.fk_product_type, p.tms, p.tosell, p.tobuy, p.seuil_stock_alerte,"; $sql.= " SUM(".$db->ifsql("s.reel IS NULL","0","s.reel").") as total_stock"; $sql.= " FROM ".MAIN_DB_PREFIX."product as p"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product_stock as s on p.rowid = s.fk_product"; @@ -82,9 +83,8 @@ class box_produits_alerte_stock extends ModeleBoxes { $langs->load("stocks"); $num = $db->num_rows($result); - $i = 0; - while ($i < $num) - { + $line = 0; + while ($line < $num) { $objp = $db->fetch_object($result); $datem=$db->jdate($objp->tms); @@ -105,57 +105,90 @@ class box_produits_alerte_stock extends ModeleBoxes $objp->label = $objtp->label; } } + $productstatic->id = $objp->rowid; + $productstatic->ref = $objp->ref; + $productstatic->type = $objp->fk_product_type; + $productstatic->label = $objp->label; - $this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', - 'logo' => ($objp->fk_product_type==1?'object_service':'object_product'), - 'url' => DOL_URL_ROOT."/product/card.php?id=".$objp->rowid); + $this->info_box_contents[$line][] = array( + 'td' => 'align="left"', + 'text' => $productstatic->getNomUrl(1), + 'asis' => 1, + ); - $this->info_box_contents[$i][1] = array('td' => 'align="left"', - 'text' => $objp->label, - 'url' => DOL_URL_ROOT."/product/card.php?id=".$objp->rowid); + $this->info_box_contents[$line][] = array( + 'td' => 'align="left"', + 'text' => $objp->label, + ); - if ($objp->price_base_type == 'HT') - { - $price=price($objp->price); - $price_base_type=$langs->trans("HT"); - } - else - { - $price=price($objp->price_ttc); - $price_base_type=$langs->trans("TTC"); - } - $this->info_box_contents[$i][2] = array('td' => 'align="right"', - 'text' => $price); + if (empty($objp->fk_price_expression)) + { + $price_base_type=$langs->trans($objp->price_base_type); + $price=($objp->price_base_type == 'HT')?price($objp->price):$price=price($objp->price_ttc); + } + else //Parse the dinamic price + { + $productstatic->fetch($objp->rowid, '', '', 1); + $priceparser = new PriceParser($this->db); + $price_result = $priceparser->parseProduct($productstatic); + if ($price_result >= 0) { + if ($objp->price_base_type == 'HT') + { + $price_base_type=$langs->trans("HT"); + } + else + { + $price_result = $price_result * (1 + ($productstatic->tva_tx / 100)); + $price_base_type=$langs->trans("TTC"); + } + $price=price($price_result); + } + } - $this->info_box_contents[$i][3] = array('td' => 'align="left" class="nowrap"', - 'text' => $price_base_type); + $this->info_box_contents[$line][] = array( + 'td' => 'align="right"', + 'text' => $price, + ); - $this->info_box_contents[$i][4] = array('td' => 'align="center"', + $this->info_box_contents[$line][] = array( + 'td' => 'align="left" class="nowrap"', + 'text' => $price_base_type, + ); + + $this->info_box_contents[$line][] = array('td' => 'align="center"', 'text' => $objp->total_stock . ' / '.$objp->seuil_stock_alerte, 'text2'=>img_warning($langs->transnoentitiesnoconv("StockLowerThanLimit"))); - $this->info_box_contents[$i][5] = array('td' => 'align="right" width="18"', + $this->info_box_contents[$line][] = array('td' => 'align="right" width="18"', 'text' => $productstatic->LibStatut($objp->tosell,3,0)); - $this->info_box_contents[$i][6] = array('td' => 'align="right" width="18"', + $this->info_box_contents[$line][] = array('td' => 'align="right" width="18"', 'text' => $productstatic->LibStatut($objp->tobuy,3,1)); - $i++; - } - if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoTooLowStockProducts")); + $line++; + } + if ($num==0) + $this->info_box_contents[$line][0] = array( + 'td' => 'align="center"', + 'text'=>$langs->trans("NoTooLowStockProducts"), + ); $db->free($result); } else { - $this->info_box_contents[0][0] = array( 'td' => 'align="left"', - 'maxlength'=>500, - 'text' => ($db->error().' sql='.$sql)); + $this->info_box_contents[0][0] = array( + 'td' => 'align="left"', + 'maxlength'=>500, + 'text' => ($db->error().' sql='.$sql), + ); } } else { - $this->info_box_contents[0][0] = array('td' => 'align="left"', - 'text' => $langs->trans("ReadPermissionNotAllowed")); + $this->info_box_contents[0][0] = array( + 'td' => 'align="left"', + 'text' => $langs->trans("ReadPermissionNotAllowed"), + ); } } diff --git a/htdocs/core/boxes/box_project.php b/htdocs/core/boxes/box_project.php index ef38a2537e6..703d35b408b 100644 --- a/htdocs/core/boxes/box_project.php +++ b/htdocs/core/boxes/box_project.php @@ -1,6 +1,8 @@ * Copyright (C) 2014 Marcos García + * Copyright (C) 2015 Frederic France + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or @@ -90,21 +92,24 @@ class box_project extends ModeleBoxes while ($i < $num) { $objp = $db->fetch_object($result); + $tooltip = $langs->trans('Project') . ': ' . $objp->ref; $this->info_box_contents[$i][0] = array( 'td' => 'align="left" width="16"', 'logo' => 'object_project', - 'url' => DOL_URL_ROOT."/projet/card.php?id=".$objp->rowid + 'tooltip' => $tooltip, + 'url' => DOL_URL_ROOT."/projet/card.php?id=".$objp->rowid, ); $this->info_box_contents[$i][1] = array( 'td' => 'align="left"', 'text' => $objp->ref, - 'url' => DOL_URL_ROOT."/product/card.php?id=".$objp->rowid + 'tooltip' => $tooltip, + 'url' => DOL_URL_ROOT."/product/card.php?id=".$objp->rowid, ); $this->info_box_contents[$i][2] = array( 'td' => 'align="left"', - 'text' => $objp->title + 'text' => $objp->title, ); $sql ="SELECT count(*) as nb, sum(progress) as totprogress"; @@ -114,9 +119,15 @@ class box_project extends ModeleBoxes $resultTask = $db->query($sql); if ($resultTask) { $objTask = $db->fetch_object($resultTask); - $this->info_box_contents[$i][3] = array('td' => 'align="right"', 'text' => number_format($objTask->nb, 0, ',', ' ')." ".$langs->trans("Tasks")); + $this->info_box_contents[$i][3] = array( + 'td' => 'align="right"', + 'text' => number_format($objTask->nb, 0, ',', ' ')." ".$langs->trans("Tasks"), + ); if ($objTask->nb > 0 ) - $this->info_box_contents[$i][4] = array('td' => 'align="right"', 'text' => number_format(($objTask->totprogress/$objTask->nb), 0, ',', ' ')."%"); + $this->info_box_contents[$i][4] = array( + 'td' => 'align="right"', + 'text' => number_format(($objTask->totprogress/$objTask->nb), 0, ',', ' ')."%", + ); else $this->info_box_contents[$i][4] = array('td' => 'align="right"', 'text' => "N/A "); $totalnbTask += $objTask->nb; @@ -132,11 +143,28 @@ class box_project extends ModeleBoxes // Add the sum à the bottom of the boxes - $this->info_box_contents[$i][0] = array('tr' => 'class="liste_total"', 'td' => 'align="left" ', 'text' => $langs->trans("Total")." ".$textHead); - $this->info_box_contents[$i][1] = array('td' => '', 'text' => ""); - $this->info_box_contents[$i][2] = array('td' => 'align="right" ', 'text' => number_format($num, 0, ',', ' ')." ".$langs->trans("Projects")); - $this->info_box_contents[$i][3] = array('td' => 'align="right" ', 'text' => number_format($totalnbTask, 0, ',', ' ')." ".$langs->trans("Tasks")); - $this->info_box_contents[$i][4] = array('td' => '', 'text' => ""); + $this->info_box_contents[$i][0] = array( + 'tr' => 'class="liste_total"', + 'td' => 'align="left" ', + 'text' => " ", + ); + $this->info_box_contents[$i][1] = array( + 'td' => '', + 'text' => $langs->trans("Total")." ".$textHead, + 'text' => " ", + ); + $this->info_box_contents[$i][2] = array( + 'td' => 'align="right" ', + 'text' => number_format($num, 0, ',', ' ')." ".$langs->trans("Projects"), + ); + $this->info_box_contents[$i][3] = array( + 'td' => 'align="right" ', + 'text' => number_format($totalnbTask, 0, ',', ' ')." ".$langs->trans("Tasks"), + ); + $this->info_box_contents[$i][4] = array( + 'td' => '', + 'text' => " ", + ); } diff --git a/htdocs/core/boxes/box_propales.php b/htdocs/core/boxes/box_propales.php index e9bd47b2a9e..4e8b47aa0d4 100644 --- a/htdocs/core/boxes/box_propales.php +++ b/htdocs/core/boxes/box_propales.php @@ -2,6 +2,7 @@ /* Copyright (C) 2003-2007 Rodolphe Quiedeville * Copyright (C) 2004-2007 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2015 Frederic France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -56,14 +57,16 @@ class box_propales extends ModeleBoxes $this->max=$max; include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; + include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; $propalstatic=new Propal($db); + $societestatic = new Societe($db); - $this->info_box_head = array('text' => $langs->trans("BoxTitleLast".($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE?"":"Modified")."Propals",$max)); + $this->info_box_head = array('text' => $langs->trans("BoxTitleLast".($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE?"":"Modified")."Propals",$max)); if ($user->rights->propale->lire) { - $sql = "SELECT s.nom as name, s.rowid as socid,"; - $sql.= " p.rowid, p.ref, p.fk_statut, p.datep as dp, p.datec, p.fin_validite, p.date_cloture, p.total_ht, p.tms"; + $sql = "SELECT s.nom as name, s.rowid as socid, s.code_client, s.logo,"; + $sql.= " p.rowid, p.ref, p.fk_statut, p.datep as dp, p.datec, p.fin_validite, p.date_cloture, p.total_ht, p.tva as total_tva, p.total as total_ttc, p.tms"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= ", ".MAIN_DB_PREFIX."propal as p"; if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; @@ -81,68 +84,81 @@ class box_propales extends ModeleBoxes $num = $db->num_rows($result); $now=dol_now(); - $i = 0; + $line = 0; - while ($i < $num) - { + while ($line < $num) { $objp = $db->fetch_object($result); $date=$db->jdate($objp->dp); $datec=$db->jdate($objp->datec); $datem=$db->jdate($objp->tms); $dateterm=$db->jdate($objp->fin_validite); $dateclose=$db->jdate($objp->date_cloture); + $propalstatic->id = $objp->rowid; + $propalstatic->ref = $objp->ref; + $propalstatic->total_ht = $objp->total_ht; + $propalstatic->total_tva = $objp->total_tva; + $propalstatic->total_ttc = $objp->total_ttc; + $societestatic->id = $objp->socid; + $societestatic->name = $objp->name; + $societestatic->code_client = $objp->code_client; + $societestatic->logo = $objp->logo; $late = ''; if ($objp->fk_statut == 1 && $dateterm < ($now - $conf->propal->cloture->warning_delay)) { $late = img_warning($langs->trans("Late")); } - $this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', - 'logo' => $this->boximg, - 'url' => DOL_URL_ROOT."/comm/propal.php?id=".$objp->rowid); + $this->info_box_contents[$line][] = array( + 'td' => 'align="left"', + 'text' => $propalstatic->getNomUrl(1), + 'text2'=> $late, + 'asis' => 1, + ); - $this->info_box_contents[$i][1] = array('td' => 'align="left"', - 'text' => $objp->ref, - 'text2'=> $late, - 'url' => DOL_URL_ROOT."/comm/propal.php?id=".$objp->rowid); + $this->info_box_contents[$line][] = array( + 'td' => 'align="left"', + 'text' => $societestatic->getNomUrl(1,'',40), + 'asis' => 1, + ); - $this->info_box_contents[$i][2] = array('td' => 'align="left" width="16"', - 'logo' => 'company', - 'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid); + $this->info_box_contents[$line][] = array( + 'td' => 'align="right"', + 'text' => price($objp->total_ht), + ); - $this->info_box_contents[$i][3] = array('td' => 'align="left"', - 'text' => dol_trunc($objp->name,40), - 'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid); + $this->info_box_contents[$line][] = array( + 'td' => 'align="right"', + 'text' => dol_print_date($date,'day'), + ); - $this->info_box_contents[$i][4] = array('td' => 'align="right"', - 'text' => price($objp->total_ht), - ); + $this->info_box_contents[$line][] = array( + 'td' => 'align="right" width="18"', + 'text' => $propalstatic->LibStatut($objp->fk_statut,3), + ); - $this->info_box_contents[$i][5] = array('td' => 'align="right"', - 'text' => dol_print_date($date,'day')); + $line++; + } - $this->info_box_contents[$i][6] = array('td' => 'align="right" width="18"', - 'text' => $propalstatic->LibStatut($objp->fk_statut,3)); + if ($num==0) + $this->info_box_contents[$line][0] = array( + 'td' => 'align="center"', + 'text'=>$langs->trans("NoRecordedProposals"), + ); - $i++; - } - - if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedProposals")); - - $db->free($result); - } - else - { - $this->info_box_contents[0][0] = array( 'td' => 'align="left"', - 'maxlength'=>500, - 'text' => ($db->error().' sql='.$sql)); - } - } - else - { - $this->info_box_contents[0][0] = array('td' => 'align="left"', - 'text' => $langs->trans("ReadPermissionNotAllowed")); - } + $db->free($result); + } else { + $this->info_box_contents[0][0] = array( + 'td' => 'align="left"', + 'maxlength'=>500, + 'text' => ($db->error().' sql='.$sql), + ); + } + } else { + $this->info_box_contents[0][0] = array( + 'td' => 'align="left"', + 'text' => $langs->trans("ReadPermissionNotAllowed"), + ); + } } /** diff --git a/htdocs/core/boxes/box_prospect.php b/htdocs/core/boxes/box_prospect.php index 3020f12f0c4..ef9585202b0 100644 --- a/htdocs/core/boxes/box_prospect.php +++ b/htdocs/core/boxes/box_prospect.php @@ -2,6 +2,7 @@ /* Copyright (C) 2003-2007 Rodolphe Quiedeville * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2015 Frederic France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -104,41 +105,58 @@ class box_prospect extends ModeleBoxes $datec=$db->jdate($objp->datec); $datem=$db->jdate($objp->tms); - $this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', - 'logo' => $this->boximg, - 'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid); + $this->info_box_contents[$i][0] = array( + 'td' => 'align="left" width="16"', + 'logo' => $this->boximg, + 'tooltip' => $objp->name, + 'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid, + ); - $this->info_box_contents[$i][1] = array('td' => 'align="left"', - 'text' => $objp->name, - 'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid); + $this->info_box_contents[$i][1] = array( + 'td' => 'align="left"', + 'text' => $objp->name, + 'tooltip' => $objp->name, + 'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid, + ); - $this->info_box_contents[$i][2] = array('td' => 'align="right"', - 'text' => dol_print_date($datem, "day")); + $this->info_box_contents[$i][2] = array( + 'td' => 'align="right"', + 'text' => dol_print_date($datem, "day"), + ); - $this->info_box_contents[$i][3] = array('td' => 'align="right" width="18"', - 'text' => str_replace('img ','img height="14" ',$prospectstatic->LibProspStatut($objp->fk_stcomm,3))); + $this->info_box_contents[$i][3] = array( + 'td' => 'align="right" width="18"', + 'text' => str_replace('img ','img height="14" ',$prospectstatic->LibProspStatut($objp->fk_stcomm,3)), + ); - $this->info_box_contents[$i][4] = array('td' => 'align="right" width="18"', - 'text' => $thirdpartystatic->LibStatut($objp->status,3)); + $this->info_box_contents[$i][4] = array( + 'td' => 'align="right" width="18"', + 'text' => $thirdpartystatic->LibStatut($objp->status,3), + ); $i++; - } + } - if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedProspects")); + if ($num==0) + $this->info_box_contents[$i][0] = array( + 'td' => 'align="center"', + 'text'=>$langs->trans("NoRecordedProspects"), + ); - $db->free($resql); - } - else - { - $this->info_box_contents[0][0] = array( 'td' => 'align="left"', - 'maxlength'=>500, - 'text' => ($db->error().' sql='.$sql)); - } - } - else { + $db->free($resql); + } else { + $this->info_box_contents[0][0] = array( + 'td' => 'align="left"', + 'maxlength'=>500, + 'text' => ($db->error().' sql='.$sql), + ); + } + } else { dol_syslog("box_prospect::loadBox not allowed de read this box content",LOG_ERR); - $this->info_box_contents[0][0] = array('td' => 'align="left"', - 'text' => $langs->trans("ReadPermissionNotAllowed")); + $this->info_box_contents[0][0] = array( + 'td' => 'align="left"', + 'text' => $langs->trans("ReadPermissionNotAllowed"), + ); } } diff --git a/htdocs/core/boxes/box_supplier_orders.php b/htdocs/core/boxes/box_supplier_orders.php index d14bf1a539f..d435e5ca3dc 100644 --- a/htdocs/core/boxes/box_supplier_orders.php +++ b/htdocs/core/boxes/box_supplier_orders.php @@ -3,6 +3,7 @@ /* Copyright (C) 2004-2006 Destailleur Laurent * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2012 Raphaël Doursenaud + * Copyright (C) 2015 Frederic France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -82,8 +83,7 @@ class box_supplier_orders extends ModeleBoxes $num = $db->num_rows($result); $i = 0; - while ($i < $num) - { + while ($i < $num) { $objp = $db->fetch_object($result); $date=$db->jdate($objp->date_commande); $datem=$db->jdate($objp->tms); @@ -91,48 +91,70 @@ class box_supplier_orders extends ModeleBoxes $urlo = DOL_URL_ROOT."/fourn/commande/card.php?id=".$objp->rowid; $urls = DOL_URL_ROOT."/fourn/card.php?socid=".$objp->socid; - $this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', - 'logo' => $this->boximg, - 'url' => $urlo); - - $this->info_box_contents[$i][1] = array('td' => 'align="left"', - 'text' => $objp->ref, - 'url' => $urlo); - - $this->info_box_contents[$i][2] = array('td' => 'align="left" width="16"', - 'logo' => 'company', - 'url' => $urls); - - $this->info_box_contents[$i][3] = array('td' => 'align="left"', - 'text' => $objp->name, - 'url' => $urls); - - $this->info_box_contents[$i][4] = array('td' => 'align="right"', - 'text' => dol_print_date($date,'day'), + $tooltip = $langs->trans('SupplierOrder') . ': ' . $objp->ref; + $this->info_box_contents[$i][0] = array( + 'td' => 'align="left" width="16"', + 'logo' => $this->boximg, + 'tooltip' => $tooltip, + 'url' => $urlo, ); - $this->info_box_contents[$i][5] = array('td' => 'align="right" width="18"', - 'text' => $supplierorderstatic->LibStatut($objp->fk_statut,3)); + $this->info_box_contents[$i][1] = array( + 'td' => 'align="left"', + 'text' => $objp->ref, + 'tooltip' => $tooltip, + 'url' => $urlo, + ); + + $tooltip = $langs->trans('Supplier') . ': ' . $objp->name; + $this->info_box_contents[$i][2] = array( + 'td' => 'align="left" width="16"', + 'logo' => 'company', + 'tooltip' => $tooltip, + 'url' => $urls, + ); + + $this->info_box_contents[$i][3] = array( + 'td' => 'align="left"', + 'text' => $objp->name, + 'tooltip' => $tooltip, + 'url' => $urls, + ); + + $this->info_box_contents[$i][4] = array( + 'td' => 'align="right"', + 'text' => dol_print_date($date,'day'), + ); + + $this->info_box_contents[$i][5] = array( + 'td' => 'align="right" width="18"', + 'text' => $supplierorderstatic->LibStatut($objp->fk_statut,3), + ); $i++; } if ($num == 0) - $this->info_box_contents[$i][0] = array('td' => 'align="center"', 'text' => $langs->trans("NoSupplierOrder")); + $this->info_box_contents[$i][0] = array( + 'td' => 'align="center"', + 'text' => $langs->trans("NoSupplierOrder"), + ); - $db->free($result); - } - else - { - $this->info_box_contents[0][0] = array( 'td' => 'align="left"', - 'maxlength'=>500, - 'text' => ($db->error().' sql='.$sql)); + $db->free($result); + } else { + $this->info_box_contents[0][0] = array( + 'td' => 'align="left"', + 'maxlength'=>500, + 'text' => ($db->error().' sql='.$sql), + ); } } else { - $this->info_box_contents[0][0] = array('td' => 'align="left"', - 'text' => $langs->trans("ReadPermissionNotAllowed")); + $this->info_box_contents[0][0] = array( + 'td' => 'align="left"', + 'text' => $langs->trans("ReadPermissionNotAllowed"), + ); } } diff --git a/htdocs/core/boxes/box_task.php b/htdocs/core/boxes/box_task.php index d20ee2017d6..eb9c26b416a 100644 --- a/htdocs/core/boxes/box_task.php +++ b/htdocs/core/boxes/box_task.php @@ -1,5 +1,6 @@ + * Copyright (C) 2015 Frederic France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -99,13 +100,13 @@ class box_task extends ModeleBoxes $objp = $db->fetch_object($result); $this->info_box_contents[$i][1] = array( 'td' => 'align="left"', - 'text' =>$langs->trans("Task")." ".$taskstatic->LibStatut($objp->fk_statut,0) + 'text' =>$langs->trans("Task")." ".$taskstatic->LibStatut($objp->fk_statut,0), ); $this->info_box_contents[$i][2] = array( 'td' => 'align="right"', 'text' => $objp->nb." ".$langs->trans("Tasks"), - 'url' => DOL_URL_ROOT."/projet/tasks/index.php?leftmenu=projects&viewstatut=".$objp->fk_statut + 'url' => DOL_URL_ROOT."/projet/tasks/index.php?leftmenu=projects&viewstatut=".$objp->fk_statut, ); $totalnb += $objp->nb; $this->info_box_contents[$i][3] = array('td' => 'align="right"', 'text' => ConvertSecondToTime($objp->plannedtot,'all',25200,5)); diff --git a/htdocs/core/boxes/modules_boxes.php b/htdocs/core/boxes/modules_boxes.php index aed954fea97..dfe83012acf 100644 --- a/htdocs/core/boxes/modules_boxes.php +++ b/htdocs/core/boxes/modules_boxes.php @@ -2,6 +2,7 @@ /* Copyright (C) 2004-2013 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2014 Raphaël Doursenaud + * Copyright (C) 2015 Frederic France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -178,153 +179,173 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty" */ function showBox($head, $contents) { - global $langs,$conf; + global $langs, $user, $conf; + + require_once DOL_DOCUMENT_ROOT .'/core/lib/files.lib.php'; $MAXLENGTHBOX=60; // Mettre 0 pour pas de limite - $bcx=array(); + $bcx = array(); $bcx[0] = 'class="box_pair"'; $bcx[1] = 'class="box_impair"'; $var = false; - dol_syslog(get_class($this).'::showBox'); + $cachetime = 900; // 900 : 15mn + $cachedir = DOL_DATA_ROOT.'/boxes/temp'; + $fileid = get_class($this).'id-'.$this->box_id.'-e'.$conf->entity.'-u'.$user->id.'-s'.$user->societe_id.'.cache'; + $filename = '/box-'.$fileid; + $refresh = dol_cache_refresh($cachedir, $filename, $cachetime); + $out = ''; - // Define nbcol and nblines of the box to show - $nbcol=0; - if (isset($contents[0])) $nbcol=count($contents[0]); - $nblines=count($contents); + if ($refresh) { + dol_syslog(get_class($this).'::showBox'); - print "\n\n\n"; - print '
'."\n"; + // Define nbcol and nblines of the box to show + $nbcol=0; + if (isset($contents[0])) $nbcol=count($contents[0]); + $nblines=count($contents); - if (! empty($head['text']) || ! empty($head['sublink']) || ! empty($head['subpicto']) || $nblines) - { - print ''."\n"; - } + $out.= "\n\n"; + $out.= '
'."\n"; - // Show box title - if (! empty($head['text']) || ! empty($head['sublink']) || ! empty($head['subpicto'])) - { - //print '
'."\n"; - //print '
'."\n"; - print ''; - print ' 0) { print ' colspan="'.$nbcol.'"'; } - print '>'; - if ($conf->use_javascript_ajax) - { - print '
'; - } - if (! empty($head['text'])) - { - $s=dol_trunc($head['text'],isset($head['limit'])?$head['limit']:$MAXLENGTHBOX); - print $s; - } - print ' '; - if (! empty($head['sublink'])) print ''; - if (! empty($head['subpicto'])) print img_picto($head['subtext'], $head['subpicto'], 'class="'.(empty($head['subclass'])?'':$head['subclass']).'" id="idsubimg'.$this->boxcode.'"'); - if (! empty($head['sublink'])) ''; - if (! empty($conf->use_javascript_ajax)) - { - print ''; - // The image must have the class 'boxhandle' beause it's value used in DOM draggable objects to define the area used to catch the full object - print img_picto($langs->trans("MoveBox",$this->box_id),'grip_title','class="boxhandle hideonsmartphone" style="cursor:move;"'); - print img_picto($langs->trans("Close2",$this->box_id),'close_title','class="boxclose" rel="x:y" style="cursor:pointer;" id="imgclose'.$this->box_id.'"'); - $label=$head['text']; - if (! empty($head['graph'])) $label.=' ('.$langs->trans("Graph").')'; - print ''; - print '
'; - } - print '
\n"; - //print "\n"; - } + if (! empty($head['text']) || ! empty($head['sublink']) || ! empty($head['subpicto']) || $nblines) + { + $out.= ''."\n"; + } - // Show box lines - if ($nblines) - { - //print '
'."\n"; - // Loop on each record - for ($i=0, $n=$nblines; $i < $n; $i++) - { - if (isset($contents[$i])) - { - $var=!$var; + // Show box title + if (! empty($head['text']) || ! empty($head['sublink']) || ! empty($head['subpicto'])) + { + //$out.= '
'."\n"; + //$out.= '
'."\n"; + $out.= ''; + $out.= ' 0) { $out.= ' colspan="'.$nbcol.'"'; } + $out.= '>'; + if ($conf->use_javascript_ajax) + { + $out.= '
'; + } + if (! empty($head['text'])) + { + $s=dol_trunc($head['text'],isset($head['limit'])?$head['limit']:$MAXLENGTHBOX); + $out.= $s; + } + $out.= ' '; + if (! empty($head['sublink'])) $out.= ''; + if (! empty($head['subpicto'])) $out.= img_picto($head['subtext'], $head['subpicto'], 'class="'.(empty($head['subclass'])?'':$head['subclass']).'" id="idsubimg'.$this->boxcode.'"'); + if (! empty($head['sublink'])) ''; + if (! empty($conf->use_javascript_ajax)) + { + $out.= ''; + // The image must have the class 'boxhandle' beause it's value used in DOM draggable objects to define the area used to catch the full object + $out.= img_picto($langs->trans("MoveBox",$this->box_id),'grip_title','class="boxhandle hideonsmartphone" style="cursor:move;"'); + $out.= img_picto($langs->trans("Close2",$this->box_id),'close_title','class="boxclose" rel="x:y" style="cursor:pointer;" id="imgclose'.$this->box_id.'"'); + $label=$head['text']; + if (! empty($head['graph'])) $label.=' ('.$langs->trans("Graph").')'; + $out.= ''; + $out.= '
'; + } + $out.= '
\n"; + //$out.= "
\n"; + } - // TR - if (isset($contents[$i][0]['tr'])) print ''; - else print ''; + // Show box lines + if ($nblines) + { + //$out.= ''."\n"; + // Loop on each record + for ($i=0, $n=$nblines; $i < $n; $i++) + { + if (isset($contents[$i])) + { + $var=!$var; - // Loop on each TD - $nbcolthisline=count($contents[$i]); - for ($j=0; $j < $nbcolthisline; $j++) { - // Define tdparam - $tdparam=''; - if (isset($contents[$i][$j]['td'])) $tdparam.=' '.$contents[$i][$j]['td']; + // TR + if (isset($contents[$i][0]['tr'])) $out.= ''; + else $out.= ''; - if (empty($contents[$i][$j]['text'])) $contents[$i][$j]['text']=""; - $text=isset($contents[$i][$j]['text'])?$contents[$i][$j]['text']:''; - $textwithnotags=preg_replace('/<([^>]+)>/i','',$text); - $text2=isset($contents[$i][$j]['text2'])?$contents[$i][$j]['text2']:''; - $text2withnotags=preg_replace('/<([^>]+)>/i','',$text2); - $textnoformat=isset($contents[$i][$j]['textnoformat'])?$contents[$i][$j]['textnoformat']:''; - //print "xxx $textwithnotags y"; - if (empty($contents[$i][$j]['tooltip'])) $contents[$i][$j]['tooltip']=""; - $tooltip=isset($contents[$i][$j]['tooltip'])?$contents[$i][$j]['tooltip']:''; + // Loop on each TD + $nbcolthisline=count($contents[$i]); + for ($j=0; $j < $nbcolthisline; $j++) { + // Define tdparam + $tdparam=''; + if (isset($contents[$i][$j]['td'])) $tdparam.=' '.$contents[$i][$j]['td']; - print ''."\n"; + if (empty($contents[$i][$j]['text'])) $contents[$i][$j]['text']=""; + $text=isset($contents[$i][$j]['text'])?$contents[$i][$j]['text']:''; + $textwithnotags=preg_replace('/<([^>]+)>/i','',$text); + $text2=isset($contents[$i][$j]['text2'])?$contents[$i][$j]['text2']:''; + $text2withnotags=preg_replace('/<([^>]+)>/i','',$text2); + $textnoformat=isset($contents[$i][$j]['textnoformat'])?$contents[$i][$j]['textnoformat']:''; + //$out.= "xxx $textwithnotags y"; + if (empty($contents[$i][$j]['tooltip'])) $contents[$i][$j]['tooltip']=""; + $tooltip=isset($contents[$i][$j]['tooltip'])?$contents[$i][$j]['tooltip']:''; - // Url - if (! empty($contents[$i][$j]['url']) && empty($contents[$i][$j]['logo'])) - { - print '" - print isset($contents[$i][$j]['target'])?' target="'.$contents[$i][$j]['target'].'"':''; - print '>'; - } + $out.= ''."\n"; - // Logo - if (! empty($contents[$i][$j]['logo'])) - { - $logo=preg_replace("/^object_/i","",$contents[$i][$j]['logo']); - print ''; - print img_object($langs->trans("Show").' '.$tooltip, $logo, 'class="classfortooltip"'); - } + // Url + if (! empty($contents[$i][$j]['url']) && empty($contents[$i][$j]['logo'])) + { + $out.= '" + $out.= isset($contents[$i][$j]['target'])?' target="'.$contents[$i][$j]['target'].'"':''; + $out.= '>'; + } - $maxlength=$MAXLENGTHBOX; - if (! empty($contents[$i][$j]['maxlength'])) $maxlength=$contents[$i][$j]['maxlength']; + // Logo + if (! empty($contents[$i][$j]['logo'])) + { + $logo=preg_replace("/^object_/i","",$contents[$i][$j]['logo']); + $out.= ''; + $out.= img_object($langs->trans("Show").' '.$tooltip, $logo, 'class="classfortooltip"'); + } - if ($maxlength) $textwithnotags=dol_trunc($textwithnotags,$maxlength); - if (preg_match('/^'; + if ($maxlength) $textwithnotags=dol_trunc($textwithnotags,$maxlength); + if (preg_match('/^\n"; - } + if (! empty($textnoformat)) $out.= "\n".$textnoformat."\n"; - print "\n"; - } - } - } + $out.= "\n"; + } - if (! empty($head['text']) || ! empty($head['sublink']) || ! empty($head['subpicto']) || $nblines) - { - print "
\n"; - } + $out.= "\n"; + } + } + } - // If invisible box with no contents - if (empty($head['text']) && empty($head['sublink']) && empty($head['subpicto']) && ! $nblines) print "
\n"; + if (! empty($head['text']) || ! empty($head['sublink']) || ! empty($head['subpicto']) || $nblines) + { + $out.= "\n"; + } - print "
\n"; - print "\n\n"; - } + // If invisible box with no contents + if (empty($head['text']) && empty($head['sublink']) && empty($head['subpicto']) && ! $nblines) $out.= "
\n"; + + $out.= "
\n"; + $out.= "\n\n"; + if (! empty($conf->global->MAIN_ACTIVATE_FILECACHE)) { + dol_filecache($cachedir, $filename, $out); + } + } else { + dol_syslog(get_class($this).'::showBoxCached'); + $out = dol_readcachefile($cachedir, $filename); + print ""; + + } + print $out; + } } diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index dc39692f08e..79f509225f6 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -737,7 +737,8 @@ abstract class CommonObject $project = new Project($this->db); $result = $project->fetch($this->fk_project); - $this->projet = $project; + $this->projet = $project; // deprecated + $this->project = $project; return $result; } @@ -2691,6 +2692,8 @@ abstract class CommonObject $product_static->type=$line->fk_product_type; $product_static->id=$line->fk_product; $product_static->ref=$line->ref; + if (! empty($line->entity)) + $product_static->entity=$line->entity; $text=$product_static->getNomUrl(1); // Define output language and label diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php old mode 100755 new mode 100644 index aa1f79cfb11..21650cd62f6 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -832,8 +832,9 @@ class Form if ($conf->use_javascript_ajax && ! $forcecombo) { include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php'; - $out.= ajax_combobox($htmlname, $events, $conf->global->COMPANY_USE_SEARCH_TO_SELECT); - $nodatarole=' data-role="none"'; + $comboenhancement =ajax_combobox($htmlname, $events, $conf->global->COMPANY_USE_SEARCH_TO_SELECT); + $out.= $comboenhancement; + $nodatarole=($comboenhancement?' data-role="none"':''); } // Construct $out and $outarray @@ -1037,8 +1038,9 @@ class Form if ($conf->use_javascript_ajax && ! $forcecombo && ! $options_only) { include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php'; - $out.= ajax_combobox($htmlname, $events, $conf->global->CONTACT_USE_SEARCH_TO_SELECT); - $nodatarole=' data-role="none"'; + $comboenhancement = ajax_combobox($htmlname, $events, $conf->global->CONTACT_USE_SEARCH_TO_SELECT); + $out.= $comboenhancement; + $nodatarole=($comboenhancement?' data-role="none"':''); } if ($htmlname != 'none' || $options_only) $out.= ''; if ($show_empty) $out.= ''."\n"; @@ -1465,7 +1469,7 @@ class Form $outarray=array(); $sql = "SELECT "; - $sql.= " p.rowid, p.label, p.ref, p.description, p.fk_product_type, p.price, p.price_ttc, p.price_base_type, p.tva_tx, p.duration, p.stock"; + $sql.= " p.rowid, p.label, p.ref, p.description, p.fk_product_type, p.price, p.price_ttc, p.price_base_type, p.tva_tx, p.duration, p.stock, p.fk_price_expression"; //Price by customer if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES) && !empty($socid)) { @@ -1544,6 +1548,8 @@ class Form $result=$this->db->query($sql); if ($result) { + require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; + require_once DOL_DOCUMENT_ROOT.'/product/class/priceparser.class.php'; $num = $this->db->num_rows($result); $out.=''; print ''; print ''; print ''; print ''; print '
'; - $formproject->select_projects($socid,$selected,$htmlname,20,0,1,$discard_closed); + $formproject->select_projects($socid,$selected,$htmlname,$maxlength,0,1,$discard_closed, $forcefocus); print '
'; @@ -4269,7 +4291,7 @@ class Form // Try also magic suggest - // Add data-role="none" to diable jmobile decoration + // Add data-role="none" to disable jmobile decoration $out = ''; diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index 68a7b677667..5bb491adf89 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -324,8 +324,9 @@ class FormOther if ($conf->use_javascript_ajax) { include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php'; - $moreforfilter.= ajax_combobox('select_categ_'.$htmlname); - $nodatarole=' data-role="none"'; + $comboenhancement = ajax_combobox('select_categ_'.$htmlname); + $moreforfilter.=$comboenhancement; + $nodatarole=($comboenhancement?' data-role="none"':''); } // Print a select with each of them @@ -373,8 +374,9 @@ class FormOther if ($conf->use_javascript_ajax) { include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php'; - $out.= ajax_combobox($htmlname); - $nodatarole=' data-role="none"'; + $comboenhancement = ajax_combobox($htmlname); + $out.=$comboenhancement; + $nodatarole=($comboenhancement?' data-role="none"':''); } // Select each sales and print them in a select input $out.=''; + $out.= ''; } + print $out; $this->db->free($resql); diff --git a/htdocs/core/datepicker.php b/htdocs/core/datepicker.php index 9c584c2ef6e..d8b32788add 100644 --- a/htdocs/core/datepicker.php +++ b/htdocs/core/datepicker.php @@ -26,17 +26,18 @@ * \brief File to manage popup date selector */ -if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled cause need to load personalized language -//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled cause need to load personalized language +if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // disabled +//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled cause need to load global conf for START_WEEK if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Not disabled cause need to do translations +//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Not disabled cause need to do translations if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK',1); if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL',1); -if (! defined('NOLOGIN')) define('NOLOGIN',1); // Not disabled cause need to load personalized language -if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1); -if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1); +if (! defined('NOLOGIN')) define('NOLOGIN',1); // disabled +if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1); +if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1); require_once '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; if (GETPOST('lang')) $langs->setDefaultLang(GETPOST('lang')); // If language was forced on URL by the main.inc.php $langs->load("main"); @@ -186,37 +187,46 @@ function displayBox($selectedDate,$month,$year) global->MAIN_START_WEEK) ? (int) $conf->global->MAIN_START_WEEK : 0; + $startday=isset($conf->global->MAIN_START_WEEK)?$conf->global->MAIN_START_WEEK:1; + print 'xx'.$startday; $day_names = array('ShortSunday', 'ShortMonday', 'ShortTuesday', 'ShortWednesday', 'ShortThursday', 'ShortFriday', 'ShortSaturday'); for( $i=0; $i < 7; $i++ ) { - echo '', $langs->trans($day_names[($i + $first_day_of_week) % 7]), '', "\n"; + echo '', $langs->trans($day_names[($i + $startday) % 7]), '', "\n"; } ?> "; + //echo $conf->global->MAIN_START_WEEK.' '.$firstdate["wday"].' '.$startday; $cols=0; - for($i=0;$i< ($mydate["wday"]+7-$first_day_of_week)%7;$i++) + for ($i = 0; $i < 7; $i++) { + $w = ($i + $startday) % 7; + if ($w == $firstdate["wday"]) + { + $mydate = $firstdate; + break; + } echo " "; $cols++; } } else { - if ($mydate["wday"]==$first_day_of_week) + if ($mydate["wday"] == $startday) { echo ""; $cols=0; @@ -240,7 +250,7 @@ function displayBox($selectedDate,$month,$year) echo ">".sprintf("%02s",$mydate["mday"]).""; $cols++; - if ($mydate != $firstdate && $mydate["wday"]==(($first_day_of_week + 6)%7)) echo "\n"; + if (($mydate["wday"] + 1) % 7 == $startday) echo "\n"; //$thedate=strtotime("tomorrow",$thedate); $day++; diff --git a/htdocs/core/lib/agenda.lib.php b/htdocs/core/lib/agenda.lib.php index 80e556378c0..6092603c03a 100644 --- a/htdocs/core/lib/agenda.lib.php +++ b/htdocs/core/lib/agenda.lib.php @@ -50,6 +50,8 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh global $conf, $user, $langs, $db, $hookmanager; global $begin_h, $end_h, $begin_d, $end_d; + $langs->load("companies"); + // Filters print '
'; print ''; @@ -114,7 +116,7 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh print ''; print $langs->trans("Project").'   '; print ''; - $formproject->select_projects($socid?$socid:-1, $pid, 'projectid', 64); + $formproject->select_projects($socid?$socid:-1, $pid, 'projectid', 0); print ''; } diff --git a/htdocs/core/lib/ajax.lib.php b/htdocs/core/lib/ajax.lib.php index 96c7bc8d05a..8bb98b6cdaa 100644 --- a/htdocs/core/lib/ajax.lib.php +++ b/htdocs/core/lib/ajax.lib.php @@ -314,25 +314,28 @@ function ajax_dialog($title,$message,$w=350,$h=150) * @param string $htmlname Name of html select field * @param array $events More events option. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled'))) * @param int $minLengthToAutocomplete Minimum length of input string to start autocomplete + * @param int $forcefocus Force focus on field * @return string Return html string to convert a select field into a combo */ -function ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0) +function ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0, $forcefocus=0) { global $conf; //if (! empty($conf->browser->phone)) return ''; // combobox disabled for smartphones (does not works) - //if (! empty($conf->dol_use_jmobile)) return ''; // select2 works with jmobile + if (! empty($conf->dol_use_jmobile)) return ''; // select2 works with jmobile but it breaks the autosize feature of jmobile. if (! empty($conf->global->MAIN_DISABLE_AJAX_COMBOX)) return ''; - if (empty($conf->use_javascript_ajax)) return ''; - + if (empty($conf->use_javascript_ajax)) return ''; + if (empty($minLengthToAutocomplete)) $minLengthToAutocomplete=0; - + $msg = '\n"; diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index e78ea2ae7cd..9d3a236fb11 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -2,11 +2,12 @@ /* Copyright (C) 2006-2011 Laurent Destailleur * Copyright (C) 2006 Rodolphe Quiedeville * Copyright (C) 2007 Patrick Raguin - * Copyright (C) 2010-2012 Regis Houssin + * Copyright (C) 2010-2012 Regis Houssin * Copyright (C) 2013-2014 Florian Henry * Copyright (C) 2013-2014 Juanjo Menent * Copyright (C) 2013 Christophe Battarel - * Copyright (C) 2013 Alexandre Spangaro + * Copyright (C) 2013 Alexandre Spangaro + * Copyright (C) 2015 Frederic France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -988,9 +989,11 @@ function show_actions_todo($conf,$langs,$db,$object,$objcon='',$noprint=0) } $out.=''; - $userstatic->id=$obj->fk_user_author; - $userstatic->login=$obj->login; - $out.=$userstatic->getLoginUrl(1); + //$userstatic->id=$obj->fk_user_author; + //$userstatic->login=$obj->login; + //$out.=$userstatic->getLoginUrl(1); + $userstatic->fetch($obj->fk_user_author); + $out.=$userstatic->getNomUrl(1); $out.=''; // Statut @@ -1235,22 +1238,36 @@ function show_actions_done($conf,$langs,$db,$object,$objcon='',$noprint=0) { if ($histo[$key]['elementtype'] == 'propal' && ! empty($conf->propal->enabled)) { - $propalstatic->ref=$langs->trans("ProposalShort"); - $propalstatic->id=$histo[$key]['fk_element']; - $out.=$propalstatic->getNomUrl(1); - } + //$propalstatic->ref=$langs->trans("ProposalShort"); + //$propalstatic->id=$histo[$key]['fk_element']; + if ($propalstatic->fetch($histo[$key]['fk_element'])>0) { + $propalstatic->type=$histo[$key]['ftype']; + $out.=$propalstatic->getNomUrl(1); + } else { + $out.= $langs->trans("ProposalDeleted"); + } + } elseif (($histo[$key]['elementtype'] == 'order' || $histo[$key]['elementtype'] == 'commande') && ! empty($conf->commande->enabled)) { - $orderstatic->ref=$langs->trans("Order"); - $orderstatic->id=$histo[$key]['fk_element']; - $out.=$orderstatic->getNomUrl(1); - } + //$orderstatic->ref=$langs->trans("Order"); + //$orderstatic->id=$histo[$key]['fk_element']; + if ($orderstatic->fetch($histo[$key]['fk_element'])>0) { + $orderstatic->type=$histo[$key]['ftype']; + $out.=$orderstatic->getNomUrl(1); + } else { + $out.= $langs->trans("OrderDeleted"); + } + } elseif (($histo[$key]['elementtype'] == 'invoice' || $histo[$key]['elementtype'] == 'facture') && ! empty($conf->facture->enabled)) { - $facturestatic->ref=$langs->trans("Invoice"); - $facturestatic->id=$histo[$key]['fk_element']; - $facturestatic->type=$histo[$key]['ftype']; - $out.=$facturestatic->getNomUrl(1,'compta'); + //$facturestatic->ref=$langs->trans("Invoice"); + //$facturestatic->id=$histo[$key]['fk_element']; + if ($facturestatic->fetch($histo[$key]['fk_element'])>0) { + $facturestatic->type=$histo[$key]['ftype']; + $out.=$facturestatic->getNomUrl(1,'compta'); + } else { + $out.= $langs->trans("InvoiceDeleted"); + } } else $out.=' '; } @@ -1272,9 +1289,11 @@ function show_actions_done($conf,$langs,$db,$object,$objcon='',$noprint=0) // Auteur $out.=''; - $userstatic->id=$histo[$key]['userid']; - $userstatic->login=$histo[$key]['login']; - $out.=$userstatic->getLoginUrl(1); + //$userstatic->id=$histo[$key]['userid']; + //$userstatic->login=$histo[$key]['login']; + //$out.=$userstatic->getLoginUrl(1); + $userstatic->fetch($histo[$key]['userid']); + $out.=$userstatic->getNomUrl(1); $out.=''; // Statut diff --git a/htdocs/core/lib/contract.lib.php b/htdocs/core/lib/contract.lib.php index b7e82c6dbf2..6fa99914229 100644 --- a/htdocs/core/lib/contract.lib.php +++ b/htdocs/core/lib/contract.lib.php @@ -112,6 +112,11 @@ function contract_admin_prepare_head() $head[$h][2] = 'attributes'; $h++; + $head[$h][0] = DOL_URL_ROOT.'/contrat/admin/contractdet_extrafields.php'; + $head[$h][1] = $langs->trans("ExtraFieldsLines"); + $head[$h][2] = 'attributeslines'; + $h++; + complete_head_from_modules($conf,$langs,null,$head,$h,'contract_admin','remove'); diff --git a/htdocs/core/lib/date.lib.php b/htdocs/core/lib/date.lib.php index d2c6ce4bd4f..072db988dc1 100644 --- a/htdocs/core/lib/date.lib.php +++ b/htdocs/core/lib/date.lib.php @@ -479,34 +479,36 @@ function dol_get_last_day($year,$month=12,$gm=false) return $datelim; } -/** Return first day of week for a date +/** Return first day of week for a date. First day of week may be monday if option MAIN_START_WEEK is 1. * * @param int $day Day * @param int $month Month * @param int $year Year * @param int $gm False or 0 or 'server' = Return date to compare with server TZ, True or 1 to compare with GM date. - * @return array year,month,week,first_day,prev_year,prev_month,prev_day + * @return array year,month,week,first_day,first_month,first_year,prev_day,prev_month,prev_year */ function dol_get_first_day_week($day,$month,$year,$gm=false) { global $conf; + //$day=2; $month=2; $year=2015; $date = dol_mktime(0,0,0,$month,$day,$year,$gm); //Checking conf of start week $start_week = (isset($conf->global->MAIN_START_WEEK)?$conf->global->MAIN_START_WEEK:1); - $tmparray = dol_getdate($date,true); + $tmparray = dol_getdate($date,true); // detail of current day - //Calculate days to count + //Calculate days = offset from current day $days = $start_week - $tmparray['wday']; if ($days>=1) $days=7-$days; $days = abs($days); $seconds = $days*24*60*60; + //print 'start_week='.$start_week.' tmparray[wday]='.$tmparray['wday'].' day offset='.$days.' seconds offset='.$seconds.'
'; //Get first day of week - $tmpday = date($tmparray[0])-$seconds; - $tmpday = date("d",$tmpday); + $tmpdaytms = date($tmparray[0])-$seconds; // $tmparray[0] is day of parameters + $tmpday = date("d",$tmpdaytms); //Check first day of week is in same month than current day or not if ($tmpday>$day) diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 4b9e7eb520f..8cf4bb3473e 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -1876,3 +1876,49 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu return $ret; } + +/** + * Store object in file + * + * @param string $directory Directory of cache + * @param string $filename Name of filecache + * @param mixed $object Object to store in cachefile + * @return void + */ +function dol_filecache($directory, $filename, $object) +{ + if (! dol_is_dir($directory)) dol_mkdir($directory); + $cachefile = $directory . $filename; + file_put_contents($cachefile, serialize($object), LOCK_EX); + @chmod($cachefile, 0644); +} + +/** + * Test if Refresh needed + * + * @param string $directory Directory of cache + * @param string $filename Name of filecache + * @param int $cachetime Cachetime delay + * @return boolean 0 no refresh 1 if refresh needed + */ +function dol_cache_refresh($directory, $filename, $cachetime) +{ + $now = dol_now(); + $cachefile = $directory . $filename; + $refresh = !file_exists($cachefile) || ($now-$cachetime) > dol_filemtime($cachefile); + return $refresh; +} + +/** + * Read object from cachefile + * + * @param string $directory Directory of cache + * @param string $filename Name of filecache + * @return mixed Unserialise from file + */ +function dol_readcachefile($directory, $filename) +{ + $cachefile = $directory . $filename; + $object = unserialize(file_get_contents($cachefile)); + return $object; +} diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index f8a43030dbc..b194c6ef6e8 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -488,13 +488,15 @@ function dolEscapeXML($string) * * @param string $stringtoescape String to escape * @param string $mode 0=Escape also ' and " into ', 1=Escape ' but not " for usage into 'string', 2=Escape " but not ' for usage into "string", 3=Escape ' and " with \ + * @param string $noescapebackslashn 0=Escape also \n. 1=Do not escape \n. * @return string Escaped string. Both ' and " are escaped into ' if they are escaped. */ -function dol_escape_js($stringtoescape, $mode=0) +function dol_escape_js($stringtoescape, $mode=0, $noescapebackslashn=0) { // escape quotes and backslashes, newlines, etc. - $substitjs=array("'"=>"\\'",'\\'=>'\\\\',"\r"=>'\\r',"\n"=>'\\n'); + $substitjs=array("'"=>"\\'","\r"=>'\\r'); //$substitjs[' $min, * 'hours' => $hour, * 'mday' => $day, - * 'wday' => $dow, + * 'wday' => $dow, 0=sunday, 6=saturday * 'mon' => $month, * 'year' => $year, * 'yday' => floor($secsInYear/$_day_power), @@ -1089,7 +1092,7 @@ function dol_getdate($timestamp,$fast=false) { $arrayinfo=getdate($timestamp); - $startday=isset($conf->global->MAIN_START_WEEK)?$conf->global->MAIN_START_WEEK:1; + /*$startday=isset($conf->global->MAIN_START_WEEK)?$conf->global->MAIN_START_WEEK:1; if($startday==1) { if ($arrayinfo["wday"]==0) @@ -1100,7 +1103,7 @@ function dol_getdate($timestamp,$fast=false) { $arrayinfo["wday"]=$arrayinfo["wday"]-1; } - } + }*/ } return $arrayinfo; @@ -1119,7 +1122,7 @@ function dol_getdate($timestamp,$fast=false) * @param int $year Year * @param mixed $gm True or 1 or 'gmt'=Input informations are GMT values, False or 0 or 'server' = local to server TZ, 'user' = local to user TZ * @param int $check 0=No check on parameters (Can use day 32, etc...) - * @return timestamp|string Date as a timestamp, '' if error + * @return timestamp|string Date as a timestamp, '' or false if error * @see dol_print_date, dol_stringtotime, dol_getdate */ function dol_mktime($hour,$minute,$second,$month,$day,$year,$gm=false,$check=1) @@ -2456,7 +2459,7 @@ function dol_print_error($db='',$error='') if ($_SERVER['DOCUMENT_ROOT']) // Mode web { $out.=$langs->trans("DolibarrHasDetectedError").".
\n"; - if (! empty($conf->global->MAIN_FEATURES_LEVEL)) $out.="You use an experimental level of features, so please do NOT report any bugs, anywhere, until going back to MAIN_FEATURES_LEVEL = 0.
\n"; + if (! empty($conf->global->MAIN_FEATURES_LEVEL)) $out.="You use an experimental level of features, so please do NOT report any bugs, except if problem is confirmed moving option MAIN_FEATURES_LEVEL back to 0.
\n"; $out.=$langs->trans("InformationToHelpDiagnose").":
\n"; $out.="".$langs->trans("Date").": ".dol_print_date(time(),'dayhourlog')."
\n"; @@ -2954,7 +2957,7 @@ function price($amount, $form=0, $outlangs='', $trunc=1, $rounding=-1, $forcerou { if ($currency_code == 'auto') $currency_code=$conf->currency; - $listofcurrenciesbefore=array('USD','GBP','AUD'); + $listofcurrenciesbefore=array('USD','GBP','AUD','MXN'); if (in_array($currency_code,$listofcurrenciesbefore)) $cursymbolbefore.=$outlangs->getCurrencySymbol($currency_code); else { @@ -3515,7 +3518,7 @@ function get_default_tva($thirdparty_seller, $thirdparty_buyer, $idprod=0, $idpr // we use the buyer VAT. if (! empty($conf->global->SERVICE_ARE_ECOMMERCE_200238EC)) { - if (! $seller_in_cee && $buyer_in_cee && ! $thirdparty_buyer->isACompany()) + if ($seller_in_cee && $buyer_in_cee && ! $thirdparty_buyer->isACompany()) { //print 'VATRULE 0'; return get_product_vat_for_country($idprod,$thirdparty_buyer,$idprodfournprice); @@ -4962,3 +4965,4 @@ function natural_search($fields, $value) } return " AND " . ($end > 1? '(' : '') . $res; } + diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index 8e3f7a7262f..9a26c727bd4 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -608,7 +608,7 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m $maskraz=-1; $maskoffset=0; $resetEveryMonth=false; - if (dol_strlen($maskcounter) < 3 && empty($conf->global->MAIN_COUNTER_WITH_LESS_3_DIGITS)) return 'CounterMustHaveMoreThan3Digits'; + if (dol_strlen($maskcounter) < 3 && empty($conf->global->MAIN_COUNTER_WITH_LESS_3_DIGITS)) return 'ErrorCounterMustHaveMoreThan3Digits'; // Extract value for third party mask counter if (preg_match('/\{(c+)(0*)\}/i',$mask,$regClientRef)) diff --git a/htdocs/core/lib/functionsnumtoword.lib.php b/htdocs/core/lib/functionsnumtoword.lib.php new file mode 100644 index 00000000000..daab7085c25 --- /dev/null +++ b/htdocs/core/lib/functionsnumtoword.lib.php @@ -0,0 +1,132 @@ + + * Copyright (C) 2015 Víctor Ortiz Pérez + * + * 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 . + * or see http://www.gnu.org/ + */ + +/** + * \file htdocs/core/lib/functionsnumbertoword.lib.php + * \brief A set of functions for Dolibarr + * This file contains all frequently used functions. + */ + +/** + * Function to return number or amount in text. + * + * @param float $numero Number to convert + * @param Lang $langs Language + * @param string $numorcurrency 'number' or 'amount' + * @return string Text of the number + */ +function dolNumberToWord($numero, $langs, $numorcurrency='number') +{ + $entexto=$numero; + + if ($langs->default == 'es_MX' && $numorcurrency == 'currency') + { + $veintis = array("VEINTE","VEINTIUN","VEINTIDÓS","VEINTITRÉS","VEINTICUATRO","VEINTICINCO","VEINTISÉIS","VEINTISIETE","VEINTIOCHO","VEINTINUEVE"); + $unidades = array("UN","DOS","TRES","CUATRO","CINCO","SEIS","SIETE","OCHO","NUEVE"); + $decenas = array("","","TREINTA ","CUARENTA ","CINCUENTA ","SESENTA ","SETENTA ","OCHENTA ","NOVENTA "); + $centenas = array("CIENTO","DOSCIENTOS","TRESCIENTOS","CUATROCIENTOS","QUINIENTOS","SEISCIENTOS","SETECIENTOS","OCHOCIENTOS","NOVECIENTOS"); + $number = $numero; + $parte_decimal = $numero - (int) $numero; + $parte_decimal = (int) round($parte_decimal*100); + if ($parte_decimal < 10) + $parte_decimal = "0".$parte_decimal; + $entexto =""; + if ($numero>=1 && $numero<2) { + $entexto .= " UN PESO ".$parte_decimal." / 100 M.N."; + } + elseif ($numero>=0 && $numero<1){ + $entexto .= " CERO PESOS ".$parte_decimal." / 100 M.N."; + } + elseif ($numero>=100 && $numero<101){ + $entexto .= " CIEN PESOS ".$parte_decimal." / 100 M.N."; + } + else { + $cdm = (int) ($numero / 100000); + $numero = $numero - $cdm * 100000; + $ddm = (int) ($numero / 10000); + $numero = $numero - $ddm * 10000; + $udm = (int) ($numero / 1000); + $numero = $numero - $udm * 1000; + $c = (int) ($numero / 100); + $numero = $numero - $c * 100; + $d = (int) ($numero / 10); + $u = (int) $numero - $d * 10; + $completo=FALSE; + if ($cdm==1 && $ddm==0 && $udm==0){ + $entexto .= "CIEN"; + $completo = TRUE; + } + if ($cdm!=0 && !$completo){ + $entexto .= $centenas[$cdm-1]." "; + } + $completo=FALSE; + if ($ddm>2){ + $entexto .= " ".$decenas[$ddm-1]; + if ($udm!=0){ + $entexto .= " Y "; + } + } + elseif ($ddm!=0){ + $completo=TRUE; + if ($ddm==1){ + $entexto .= " ".$diecis[$udm]; + } + else{ + $entexto .= " ".$veintis[$udm]; + } + } + if ($udm!=0 && !$completo){ + $entexto .= $unidades[$udm-1]; + } + $completo=FALSE; + if ($number>=1000){ + $entexto .= " MIL "; + } + + if ($c==1 && $d==0 && $u==0){ + $entexto .= "CIEN"; + $completo = TRUE; + } + if ($c!=0 && !$completo){ + $entexto .= $centenas[$c-1]." "; + } + if ($d>2){ + $entexto .= " ".$decenas[$d-1]; + if ($u!=0){ + $entexto .= " Y "; + } + } + elseif ($d!=0){ + $completo=TRUE; + if ($d==1){ + $entexto .= " ".$diecis[$u]; + } + else{ + $entexto .= " ".$veintis[$u]; + } + } + if ($u!=0 && !$completo){ + $entexto .= $unidades[$u-1]; + } + $entexto .= " PESOS ".$parte_decimal." / 100 M.N."; + } + } + + return $entexto; +} diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 4f1c8f71c5a..7354a793ced 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -522,7 +522,7 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default // Get format of bank account according to its country $usedetailedbban=$account->useDetailedBBAN(); - $onlynumber=0; $usedetailedbban=1; // For tests + //$onlynumber=0; $usedetailedbban=1; // For tests if ($usedetailedbban) { $savcurx=$curx; diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index a2c6cca18eb..2fa69959e33 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2006-2015 Laurent Destailleur * Copyright (C) 2010 Regis Houssin * Copyright (C) 2011 Juanjo Menent * @@ -85,23 +85,19 @@ function project_prepare_head($object) $head[$h][2] = 'document'; $h++; - // Then tab for sub level of projet, i mean tasks - $head[$h][0] = DOL_URL_ROOT.'/projet/tasks.php?id='.$object->id; - $head[$h][1] = $langs->trans("Tasks"); - $head[$h][2] = 'tasks'; - $h++; + if (empty($conf->global->PROJECT_HIDE_TASKS)) + { + // Then tab for sub level of projet, i mean tasks + $head[$h][0] = DOL_URL_ROOT.'/projet/tasks.php?id='.$object->id; + $head[$h][1] = $langs->trans("Tasks"); + $head[$h][2] = 'tasks'; + $h++; - /* Now this is a filter in the Task tab. - $head[$h][0] = DOL_URL_ROOT.'/projet/tasks.php?id='.$object->id.'&mode=mine'; - $head[$h][1] = $langs->trans("MyTasks"); - $head[$h][2] = 'mytasks'; - $h++; - */ - - $head[$h][0] = DOL_URL_ROOT.'/projet/ganttview.php?id='.$object->id; - $head[$h][1] = $langs->trans("Gantt"); - $head[$h][2] = 'gantt'; - $h++; + $head[$h][0] = DOL_URL_ROOT.'/projet/ganttview.php?id='.$object->id; + $head[$h][1] = $langs->trans("Gantt"); + $head[$h][2] = 'gantt'; + $h++; + } complete_head_from_modules($conf,$langs,$object,$head,$h,'project','remove'); diff --git a/htdocs/core/lib/sendings.lib.php b/htdocs/core/lib/sendings.lib.php index dd08c8b6c79..5ce30be59a0 100644 --- a/htdocs/core/lib/sendings.lib.php +++ b/htdocs/core/lib/sendings.lib.php @@ -64,8 +64,12 @@ function shipping_prepare_head($object) $head[$h][2] = 'contact'; $h++; + $nbNote = 0; + if (!empty($object->note_private)) $nbNote++; + if (!empty($object->note_public)) $nbNote++; $head[$h][0] = DOL_URL_ROOT."/expedition/note.php?id=".$object->id; $head[$h][1] = $langs->trans("Notes"); + if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.''; $head[$h][2] = 'note'; $h++; diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql index b5818362591..417e02738b3 100644 --- a/htdocs/core/menus/init_menu_auguria.sql +++ b/htdocs/core/menus/init_menu_auguria.sql @@ -11,7 +11,7 @@ delete from llx_menu where menu_handler=__HANDLER__ and entity=__ENTITY__; insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '1', 1__+MAX_llx_menu__, __HANDLER__, 'top', 'home', '', 0, '/index.php?mainmenu=home&leftmenu=', 'Home', -1, '', '', '', 2, 10, __ENTITY__); insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('societe|fournisseur', '( ! empty($conf->societe->enabled) && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))) || ! empty($conf->fournisseur->enabled)', 2__+MAX_llx_menu__, __HANDLER__, 'top', 'companies', '', 0, '/societe/index.php?mainmenu=companies&leftmenu=', 'ThirdParties', -1, 'companies', '$user->rights->societe->lire || $user->rights->societe->contact->lire', '', 2, 20, __ENTITY__); insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('product|service', '$conf->product->enabled || $conf->service->enabled', 3__+MAX_llx_menu__, __HANDLER__, 'top', 'products', '', 0, '/product/index.php?mainmenu=products&leftmenu=', 'Products/Services', -1, 'products', '$user->rights->produit->lire||$user->rights->service->lire', '', 0, 30, __ENTITY__); -insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('propal|commande|fournisseur|contrat|ficheinter', '$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->facture->enabled || $conf->deplacement->enabled || $conf->don->enabled || $conf->tax->enabled', 5__+MAX_llx_menu__, __HANDLER__, 'top', 'commercial', '', 0, '/comm/index.php?mainmenu=commercial&leftmenu=', 'Commercial', -1, 'commercial', '$user->rights->societe->lire || $user->rights->societe->contact->lire', '', 2, 40, __ENTITY__); +insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('propal|commande|fournisseur|contrat|ficheinter', '$conf->propal->enabled || $conf->commande->enabled || $conf->fournisseur->enabled || $conf->contrat->enabled || $conf->ficheinter->enabled', 5__+MAX_llx_menu__, __HANDLER__, 'top', 'commercial', '', 0, '/comm/index.php?mainmenu=commercial&leftmenu=', 'Commercial', -1, 'commercial', '$user->rights->societe->lire || $user->rights->societe->contact->lire', '', 2, 40, __ENTITY__); insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('comptabilite|accounting|facture|deplacement|don|tax|salaries', '$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->facture->enabled || $conf->deplacement->enabled || $conf->don->enabled || $conf->tax->enabled || $conf->salaries->enabled', 6__+MAX_llx_menu__, __HANDLER__, 'top', 'accountancy', '', 0, '/compta/index.php?mainmenu=accountancy&leftmenu=', 'MenuFinancial', -1, 'compta', '$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 || $user->rights->salaries->read', '', 2, 50, __ENTITY__); insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('banque|prelevement', '$conf->banque->enabled || $conf->prelevement->enabled', 14__+MAX_llx_menu__, __HANDLER__, 'top', 'bank', '', 0, '/compta/bank/index.php?mainmenu=bank&leftmenu=bank', 'MenuBankCash', -1, 'banks', '$user->rights->banque->lire || $user->rights->prelevement->bons->lire', '', 0, 60, __ENTITY__); insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('projet', '$conf->projet->enabled', 7__+MAX_llx_menu__, __HANDLER__, 'top', 'project', '', 0, '/projet/index.php?mainmenu=project&leftmenu=', 'Projects', -1, 'projects', '$user->rights->projet->lire', '', 2, 70, __ENTITY__); @@ -53,8 +53,10 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 309__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/purge.php?leftmenu=admintools', 'Purge', 1, 'admin', '', '', 2, 12, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 310__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/support/index.php?leftmenu=admintools', 'HelpCenter', 1, 'help', '', '_blank', 2, 13, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 311__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/system/about.php?leftmenu=admintools', 'About', 1, 'admin', '', '', 2, 14, __ENTITY__); +-- Home - Module Tools +-- Added by ??? -- Home - Menu users and groups -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '1', __HANDLER__, 'left', 400__+MAX_llx_menu__, 'home', 'users', 1__+MAX_llx_menu__, '/user/home.php?leftmenu=users', 'MenuUsersAndGroups', 0, 'users', '', '', 2, 3, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '1', __HANDLER__, 'left', 400__+MAX_llx_menu__, 'home', 'users', 1__+MAX_llx_menu__, '/user/home.php?leftmenu=users', 'MenuUsersAndGroups', 0, 'users', '', '', 2, 4, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="users"', __HANDLER__, 'left', 401__+MAX_llx_menu__, 'home', '', 400__+MAX_llx_menu__, '/user/index.php?leftmenu=users', 'Users', 1, 'users', '$user->rights->user->user->lire || $user->admin', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="users"', __HANDLER__, 'left', 402__+MAX_llx_menu__, 'home', '', 401__+MAX_llx_menu__, '/user/card.php?leftmenu=users&action=create', 'NewUser', 2, 'users', '$user->rights->user->user->creer || $user->admin', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="users"', __HANDLER__, 'left', 403__+MAX_llx_menu__, 'home', '', 400__+MAX_llx_menu__, '/user/group/index.php?leftmenu=users', 'Groups', 1, 'users', '($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->read:$user->rights->user->user->lire) || $user->admin', '', 2, 1, __ENTITY__); diff --git a/htdocs/core/menus/standard/auguria.lib.php b/htdocs/core/menus/standard/auguria.lib.php index e0f1e1b05d9..cbc73b2767d 100644 --- a/htdocs/core/menus/standard/auguria.lib.php +++ b/htdocs/core/menus/standard/auguria.lib.php @@ -149,7 +149,7 @@ function print_text_menu_entry_auguria($text, $showmode, $url, $id, $idsel, $cla if ($showmode == 1) { print '
'; - print '
'; + print '
'; print '
'; print ''; print ''; @@ -273,7 +273,7 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM else dol_print_error($db); $db->free($resql); } - + if (! empty($conf->accounting->enabled) && !empty($user->rights->accounting->mouvements->lire) && $mainmenu == 'accountancy') // Entry in accountancy journal for each bank account { $newmenu->add('/accountancy/journal/index.php?leftmenu=journal',$langs->trans("Journaux"),0,$user->rights->banque->lire); diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index a2819ffb2c4..3a58479d2e0 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -1141,17 +1141,20 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $newmenu->add("/projet/card.php?leftmenu=projects&action=create", $langs->trans("NewProject"), 1, $user->rights->projet->creer && $user->rights->projet->creer); $newmenu->add("/projet/list.php?leftmenu=projects", $langs->trans("List"), 1, $user->rights->projet->lire && $user->rights->projet->lire); - // Project affected to user - $newmenu->add("/projet/activity/index.php?mode=mine", $langs->trans("MyActivities"), 0, $user->rights->projet->lire); - $newmenu->add("/projet/tasks.php?action=create&mode=mine", $langs->trans("NewTask"), 1, $user->rights->projet->creer); - $newmenu->add("/projet/tasks/index.php?mode=mine", $langs->trans("List"), 1, $user->rights->projet->lire); - $newmenu->add("/projet/activity/list.php?mode=mine", $langs->trans("NewTimeSpent"), 1, $user->rights->projet->creer); + if (empty($conf->global->PROJECT_HIDE_TASKS)) + { + // Project affected to user + $newmenu->add("/projet/activity/index.php?mode=mine", $langs->trans("MyActivities"), 0, $user->rights->projet->lire); + $newmenu->add("/projet/tasks.php?action=create&mode=mine", $langs->trans("NewTask"), 1, $user->rights->projet->creer); + $newmenu->add("/projet/tasks/index.php?mode=mine", $langs->trans("List"), 1, $user->rights->projet->lire); + $newmenu->add("/projet/activity/list.php?mode=mine", $langs->trans("NewTimeSpent"), 1, $user->rights->projet->creer); - // All project i have permission on - $newmenu->add("/projet/activity/index.php", $langs->trans("Activities"), 0, $user->rights->projet->lire && $user->rights->projet->lire); - $newmenu->add("/projet/tasks.php?action=create", $langs->trans("NewTask"), 1, $user->rights->projet->creer && $user->rights->projet->creer); - $newmenu->add("/projet/tasks/index.php", $langs->trans("List"), 1, $user->rights->projet->lire && $user->rights->projet->lire); - $newmenu->add("/projet/activity/list.php", $langs->trans("NewTimeSpent"), 1, $user->rights->projet->creer && $user->rights->projet->creer); + // All project i have permission on + $newmenu->add("/projet/activity/index.php", $langs->trans("Activities"), 0, $user->rights->projet->lire && $user->rights->projet->lire); + $newmenu->add("/projet/tasks.php?action=create", $langs->trans("NewTask"), 1, $user->rights->projet->creer && $user->rights->projet->creer); + $newmenu->add("/projet/tasks/index.php", $langs->trans("List"), 1, $user->rights->projet->lire && $user->rights->projet->lire); + $newmenu->add("/projet/activity/list.php", $langs->trans("NewTimeSpent"), 1, $user->rights->projet->creer && $user->rights->projet->creer); + } } } diff --git a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php index 145eeafcdde..e861bff6169 100644 --- a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php @@ -557,10 +557,15 @@ class pdf_merou extends ModelePdfExpedition // Date Expedition $Yoff = $Yoff+7; + $pdf->SetXY($blSocX-80,$blSocY+17); + $pdf->SetFont('','B', $default_font_size - 2); + $pdf->SetTextColor(0,0,0); + $pdf->MultiCell(50, 8, $outputlangs->transnoentities("DateDelivery")." : " . dol_print_date($object->date_delivery,'day',false,$outputlangs,true), '', 'L'); + $pdf->SetXY($blSocX-80,$blSocY+20); $pdf->SetFont('','B', $default_font_size - 2); $pdf->SetTextColor(0,0,0); - $pdf->MultiCell(50, 8, $outputlangs->transnoentities("Date")." : " . dol_print_date($object->date_delivery,'day',false,$outputlangs,true), '', 'L'); + $pdf->MultiCell(50, 8, $outputlangs->transnoentities("TrackingNumber")." : " . $object->tracking_number, '', 'L'); // Deliverer $pdf->SetXY($blSocX-80,$blSocY+23); @@ -576,14 +581,17 @@ class pdf_merou extends ModelePdfExpedition { // Get code using getLabelFromKey $code=$outputlangs->getLabelFromKey($this->db,$object->shipping_method_id,'c_shipment_mode','rowid','code'); - $label=$outputlangs->trans("SendingMethod".strtoupper($code))." :"; + $label=''; + $label.=$outputlangs->trans("SendingMethod").": ".$outputlangs->trans("SendingMethod".strtoupper($code)); + //var_dump($object->tracking_url != $object->tracking_number);exit; + if ($object->tracking_url != $object->tracking_number) + { + $label.=" : "; + $label.=$object->tracking_url; + } + $pdf->SetFont('','B', $default_font_size - 2); + $pdf->writeHTMLCell(50, 8, '', '', $label, '', 'L'); } - else - { - $label=$outputlangs->transnoentities("Deliverer"); - } - - $pdf->writeHTMLCell(50, 8, '', '', $label." ".$object->tracking_url, '', 'L'); } } else diff --git a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php index ea6601b8396..9c5dada3a72 100644 --- a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php @@ -191,11 +191,17 @@ class pdf_rouget extends ModelePdfExpedition $tab_height = 130; $tab_height_newpage = 150; - if (! empty($object->note_public) || (! empty($object->tracking_number) && ! empty($object->shipping_method_id))) + if (! empty($object->note_public) || ! empty($object->tracking_number)) { $tab_top = 88; $tab_top_alt = $tab_top; + $pdf->SetFont('','B', $default_font_size - 2); + $pdf->writeHTMLCell(60, 4, $this->posxdesc-1, $tab_top-1, $outputlangs->transnoentities("TrackingNumber")." : " . $object->tracking_number, 0, 1, false, true, 'L'); + + $tab_top_alt = $pdf->GetY(); + //$tab_top_alt += 1; + // Tracking number if (! empty($object->tracking_number)) { @@ -206,17 +212,24 @@ class pdf_rouget extends ModelePdfExpedition { // Get code using getLabelFromKey $code=$outputlangs->getLabelFromKey($this->db,$object->shipping_method_id,'c_shipment_mode','rowid','code'); - $label=$outputlangs->trans("LinkToTrackYourPackage")."
"; - $label.=$outputlangs->trans("SendingMethod".strtoupper($code))." :"; + $label=''; + if ($object->tracking_url != $object->tracking_number) $label.=$outputlangs->trans("LinkToTrackYourPackage")."
"; + $label.=$outputlangs->trans("SendingMethod").": ".$outputlangs->trans("SendingMethod".strtoupper($code)); + //var_dump($object->tracking_url != $object->tracking_number);exit; + if ($object->tracking_url != $object->tracking_number) + { + $label.=" : "; + $label.=$object->tracking_url; + } $pdf->SetFont('','B', $default_font_size - 2); - $pdf->writeHTMLCell(60, 7, $this->posxdesc-1, $tab_top-1, $label." ".$object->tracking_url, 0, 1, false, true, 'L'); + $pdf->writeHTMLCell(60, 4, $this->posxdesc-1, $tab_top_alt, $label, 0, 1, false, true, 'L'); - $tab_top_alt += 7; + $tab_top_alt = $pdf->GetY(); } } } - // Affiche notes + // Notes if (! empty($object->note_public)) { $pdf->SetFont('','', $default_font_size - 1); // Dans boucle pour gerer multi-page @@ -531,7 +544,7 @@ class pdf_rouget extends ModelePdfExpedition $posy+=4; $pdf->SetXY($posx,$posy); $pdf->SetTextColor(0,0,60); - $pdf->MultiCell(100, 4, $outputlangs->transnoentities("Date")." : ".dol_print_date($object->date_creation,"daytext",false,$outputlangs,true), '', 'R'); + $pdf->MultiCell(100, 4, $outputlangs->transnoentities("DateDeliveryPlanned")." : ".dol_print_date($object->date_livraison,"daytext",false,$outputlangs,true), '', 'R'); if (! empty($object->client->code_client)) { diff --git a/htdocs/core/modules/modAccounting.class.php b/htdocs/core/modules/modAccounting.class.php index e074bfe82f1..d683d4bb271 100644 --- a/htdocs/core/modules/modAccounting.class.php +++ b/htdocs/core/modules/modAccounting.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2013-2014 Alexandre Spangaro + * Copyright (C) 2013-2015 Alexandre Spangaro * Copyright (C) 2014 Ari Elbaz (elarifr) * Copyright (C) 2014 Florian Henry * @@ -19,14 +19,14 @@ */ /** - * \file accountingex/core/modules/modAccounting.class.php + * \file htdocs/core/modules/modAccounting.class.php * \ingroup Accounting Expert * \brief Module to activate Accounting Expert module */ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php'; /** - * \class modAccountingExpert + * \class modAccounting * \brief Description and activation class for module accounting expert */ class modAccounting extends DolibarrModules @@ -68,7 +68,7 @@ class modAccounting extends DolibarrModules $this->depends = array("modFacture","modBanque","modTax"); // List of modules id that must be enabled if this module is enabled $this->requiredby = array(); // List of modules id to disable if this one is disabled $this->conflictwith = array("modComptabilite"); // List of modules are in conflict with this module - $this->phpmin = array(5, 2); // Minimum version of PHP required by module + $this->phpmin = array(5, 3); // Minimum version of PHP required by module $this->need_dolibarr_version = array(3, 6); // Minimum version of Dolibarr required by module $this->langfiles = array("accountancy"); @@ -87,7 +87,7 @@ class modAccounting extends DolibarrModules "With this constants on, bank account number is always required" ); $this->const[1] = array( - "ACCOUNTING_SEPARATORCSV", + "ACCOUNTING_EXPORT_SEPARATORCSV", "string", "," ); @@ -112,60 +112,85 @@ class modAccounting extends DolibarrModules "SOC" ); $this->const[6] = array( - "ACCOUNTING_CASH_JOURNAL", - "chaine", - "CAI" - ); - $this->const[7] = array( "ACCOUNTING_MISCELLANEOUS_JOURNAL", "chaine", "OD" ); - $this->const[8] = array( - "ACCOUNTING_BANK_JOURNAL", - "chaine", - "BQ" - ); // Deprecated Move into llx_bank_account - $this->const[9] = array( + $this->const[7] = array( "ACCOUNTING_ACCOUNT_TRANSFER_CASH", "chaine", "58" ); - $this->const[10] = array( + $this->const[8] = array( "CHARTOFACCOUNTS", "chaine", "2" ); - $this->const[11] = array( - "ACCOUNTING_MODELCSV", + $this->const[9] = array( + "ACCOUNTING_EXPORT_MODELCSV", "chaine", "0" ); - $this->const[12] = array( + $this->const[10] = array( "ACCOUNTING_LENGTH_GACCOUNT", "chaine", "" ); - $this->const[13] = array( + $this->const[11] = array( "ACCOUNTING_LENGTH_AACCOUNT", "chaine", "" ); - $this->const[14] = array( + $this->const[12] = array( "ACCOUNTING_LIMIT_LIST_VENTILATION", "chaine", "50" ); - $this->const[15] = array( + $this->const[13] = array( "ACCOUNTING_LIST_SORT_VENTILATION_TODO", "yesno", "1" ); - $this->const[16] = array( + $this->const[14] = array( "ACCOUNTING_LIST_SORT_VENTILATION_DONE", "yesno", "1" ); + $this->const[15] = array ( + "ACCOUNTING_GROUPBYACCOUNT", + "yesno", + "1" + ); + $this->const[16] = array ( + "ACCOUNTING_EXPORT_DATE", + "chaine", + "%d%m%Y" + ); + $this->const[17] = array ( + "ACCOUNTING_EXPORT_PIECE", + "yesno", + "1" + ); + $this->const[18] = array ( + "ACCOUNTING_EXPORT_GLOBAL_ACCOUNT", + "yesno", + "1" + ); + $this->const[19] = array ( + "ACCOUNTING_EXPORT_LABEL", + "yesno", + "1" + ); + $this->const[20] = array ( + "ACCOUNTING_EXPORT_AMOUNT", + "yesno", + "1" + ); + $this->const[21] = array ( + "ACCOUNTING_EXPORT_DEVISE", + "yesno", + "1" + ); // Tabs $this->tabs = array(); diff --git a/htdocs/core/modules/modAdherent.class.php b/htdocs/core/modules/modAdherent.class.php index 8cec64f2d20..56037c9fb16 100644 --- a/htdocs/core/modules/modAdherent.class.php +++ b/htdocs/core/modules/modAdherent.class.php @@ -50,7 +50,7 @@ class modAdherent extends DolibarrModules $this->family = "hr"; // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) $this->name = preg_replace('/^mod/i','',get_class($this)); - $this->description = "Gestion des adhérents d'une association"; + $this->description = "Management of members of a foundation or association"; $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); $this->special = 0; @@ -137,7 +137,7 @@ class modAdherent extends DolibarrModules $r++; $this->rights[$r][0] = 75; - $this->rights[$r][1] = 'Setup types and attributes of members'; + $this->rights[$r][1] = 'Setup types of membership'; $this->rights[$r][2] = 'w'; $this->rights[$r][3] = 0; $this->rights[$r][4] = 'configurer'; diff --git a/htdocs/core/modules/modDynamicPrices.class.php b/htdocs/core/modules/modDynamicPrices.class.php old mode 100755 new mode 100644 diff --git a/htdocs/core/modules/modMargin.class.php b/htdocs/core/modules/modMargin.class.php index 19100576a83..a9bfb987ca1 100644 --- a/htdocs/core/modules/modMargin.class.php +++ b/htdocs/core/modules/modMargin.class.php @@ -1,5 +1,6 @@ + * Copyright (C) 2015 Marcos García * * 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 @@ -129,6 +130,14 @@ class modMargin extends DolibarrModules $this->rights[$r][2] = 'w'; // type de la permission (deprecie a ce jour) $this->rights[$r][3] = 0; // La permission est-elle une permission par defaut $this->rights[$r][4] = 'creer'; + + $r++; + $this->rights[$r][0] = 59003; // id de la permission + $this->rights[$r][1] = 'Read every user margin'; // libelle de la permission + $this->rights[$r][2] = 'r'; // type de la permission (deprecie a ce jour) + $this->rights[$r][3] = 0; // La permission est-elle une permission par defaut + $this->rights[$r][4] = 'read'; + $this->rights[$r][5] = 'all'; } /** diff --git a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php index 6b57b961da4..d100a45b828 100644 --- a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php @@ -939,16 +939,28 @@ class pdf_canelle extends ModelePDFSuppliersInvoices if ($object->ref_supplier) { - $posy+=5; + $posy+=4; $pdf->SetXY($posx,$posy); $pdf->SetTextColor(0,0,60); $pdf->MultiCell(100, 4, $outputlangs->transnoentities("RefSupplier")." : " . $object->ref_supplier, '', 'R'); } - $posy+=1; $pdf->SetFont('','', $default_font_size - 1); - $posy+=5; + $posy+=6; + if (! empty($conf->global->PDF_SHOW_PROJECT)) + { + $object->fetch_projet(); + $pdf->SetXY($posx,$posy); + if (! empty($object->project->ref)) + { + $langs->load("projects"); + $pdf->SetTextColor(0,0,60); + $pdf->MultiCell(100, 3, $outputlangs->transnoentities("Project")." : " . (empty($object->project->ref)?'':$object->projet->ref), '', 'R'); + $posy+=4; + } + } + $pdf->SetXY($posx,$posy); if ($object->date) { diff --git a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php index c0f89f51efa..7f74ce095c0 100644 --- a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php +++ b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php @@ -28,9 +28,8 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/supplier_order/modules_commandefo /** - \class mod_commande_fournisseur_orchidee - \brief Classe du modele de numerotation de reference de commande fournisseur Orchidee -*/ + * Classe du modele de numerotation de reference de commande fournisseur Orchidee + */ class mod_commande_fournisseur_orchidee extends ModeleNumRefSuppliersOrders { var $version='dolibarr'; // 'development', 'experimental', 'dolibarr' diff --git a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php index 29bd483b39b..b26b540e5b1 100644 --- a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php @@ -976,15 +976,10 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $pdf->SetFont('', 'B', $default_font_size + 3); $pdf->SetXY($posx,$posy); $pdf->SetTextColor(0,0,60); - $title=$outputlangs->transnoentities("SupplierOrder"); + $title=$outputlangs->transnoentities("SupplierOrder")." ".$outputlangs->convToOutputCharset($object->ref); $pdf->MultiCell(100, 3, $title, '', 'R'); - $pdf->SetFont('','B',$default_font_size); - - $posy+=6; - $pdf->SetXY($posx,$posy); - $pdf->SetTextColor(0,0,60); - $pdf->MultiCell(100, 4, $outputlangs->transnoentities("Ref")." : " . $outputlangs->convToOutputCharset($object->ref), '', 'R'); + $pdf->SetFont('','B', $default_font_size); if ($object->ref_supplier) { @@ -994,10 +989,22 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $pdf->MultiCell(100, 3, $outputlangs->transnoentities("RefSupplier")." : " . $outputlangs->convToOutputCharset($object->ref_supplier), '', 'R'); } - $posy+=2; $pdf->SetFont('','', $default_font_size -1); - $posy+=5; + $posy+=6; + if (! empty($conf->global->PDF_SHOW_PROJECT)) + { + $object->fetch_projet(); + $pdf->SetXY($posx,$posy); + if (! empty($object->project->ref)) + { + $langs->load("projects"); + $pdf->SetTextColor(0,0,60); + $pdf->MultiCell(100, 3, $outputlangs->transnoentities("Project")." : " . (empty($object->project->ref)?'':$object->projet->ref), '', 'R'); + $posy+=4; + } + } + $pdf->SetXY($posx,$posy); if (! empty($object->date_commande)) { diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index 0c345aee5ac..bce94c70a57 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -3,7 +3,7 @@ * Copyright (C) 2010-2014 Laurent Destailleur * Copyright (C) 2012-2013 Christophe Battarel * Copyright (C) 2012 Cédric Salvador - * Copyright (C) 2013 Florian Henry + * Copyright (C) 2014 Florian Henry * Copyright (C) 2014 Raphaël Doursenaud * * This program is free software; you can redistribute it and/or modify @@ -273,6 +273,9 @@ else { elseif ($this->table_element_line=='facturedet') { $newline = new FactureLigne($this->db); } + elseif ($this->table_element_line=='contratdet') { + $newline = new ContratLigne($this->db); + } if (is_object($newline)) { print $newline->showOptionals($extrafieldsline, 'edit', array('style'=>$bcnd[$var], 'colspan'=>$coldisplay+8)); } diff --git a/htdocs/ecm/index.php b/htdocs/ecm/index.php index d675542140c..a6dc5442aa7 100644 --- a/htdocs/ecm/index.php +++ b/htdocs/ecm/index.php @@ -664,7 +664,7 @@ if (empty($action) || $action == 'file_manager' || preg_match('/refresh/i',$acti $userstatic->lastname=$val['login_c']; $htmltooltip=''.$langs->trans("ECMSection").': '.$val['label'].'
'; $htmltooltip=''.$langs->trans("Type").': '.$langs->trans("ECMSectionManual").'
'; - $htmltooltip.=''.$langs->trans("ECMCreationUser").': '.$userstatic->getNomUrl(1).'
'; + $htmltooltip.=''.$langs->trans("ECMCreationUser").': '.$userstatic->getNomUrl(1, '', false, 1).'
'; $htmltooltip.=''.$langs->trans("ECMCreationDate").': '.dol_print_date($val['date_c'],"dayhour").'
'; $htmltooltip.=''.$langs->trans("Description").': '.$val['description'].'
'; $htmltooltip.=''.$langs->trans("ECMNbOfFilesInDir").': '.$val['cachenbofdoc'].'
'; diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 0388878d3a5..67426510da2 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -1218,7 +1218,9 @@ class Expedition extends CommonObject global $langs; $result=''; - $label=$langs->trans("ShowSending").': '.$this->ref; + $label = '' . $langs->trans("ShowSending") . ''; + if (! empty($this->ref)) + $label .= '
' . $langs->trans('Ref') . ': '.$this->ref; $url = DOL_URL_ROOT.'/expedition/card.php?id='.$this->id; @@ -1523,7 +1525,7 @@ class Expedition extends CommonObject } /** - * Get tracking url status + * Forge an set tracking url * * @param string $value Value * @return void diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php index 2468c9084d2..d9e26368a74 100644 --- a/htdocs/expedition/list.php +++ b/htdocs/expedition/list.php @@ -69,7 +69,7 @@ $shipment=new Expedition($db); $helpurl='EN:Module_Shipments|FR:Module_Expéditions|ES:Módulo_Expediciones'; llxHeader('',$langs->trans('ListOfSendings'),$helpurl); -$sql = "SELECT e.rowid, e.ref, e.date_delivery as date_expedition, l.date_delivery as date_livraison, e.fk_statut"; +$sql = "SELECT e.rowid, e.ref, e.date_expedition as date_expedition, e.date_delivery as date_livraison, l.date_delivery as date_reception, e.fk_statut"; $sql.= ", s.nom as socname, s.rowid as socid"; $sql.= " FROM (".MAIN_DB_PREFIX."expedition as e"; if (!$user->rights->societe->client->voir && !$socid) // Internal user with no permission to see all @@ -120,8 +120,10 @@ if ($resql) print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"],"e.ref","",$param,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Company"), $_SERVER["PHP_SELF"],"s.nom", "", $param,'align="left"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateDeliveryPlanned"), $_SERVER["PHP_SELF"],"e.date_delivery","",$param, 'align="center"',$sortfield,$sortorder); - if($conf->livraison_bon->enabled) { + if($conf->expedition_bon->enabled) { print_liste_field_titre($langs->trans("DeliveryOrder"), $_SERVER["PHP_SELF"],"e.date_expedition","",$param, '',$sortfield,$sortorder); + } + if($conf->livraison_bon->enabled) { print_liste_field_titre($langs->trans("DateReceived"), $_SERVER["PHP_SELF"],"e.date_expedition","",$param, 'align="center"',$sortfield,$sortorder); } print_liste_field_titre($langs->trans("Status"), $_SERVER["PHP_SELF"],"e.fk_statut","",$param,'align="right"',$sortfield,$sortorder); @@ -137,10 +139,12 @@ if ($resql) print ''; print ''; print ' '; - if($conf->livraison_bon->enabled) { + if($conf->expedition_bon->enabled) { print ''; print ''; + } + if($conf->livraison_bon->enabled) { print ' '; } print ''; @@ -178,17 +182,22 @@ if ($resql) // Date delivery planed print ""; - print dol_print_date($db->jdate($objp->date_expedition),"day"); + print dol_print_date($db->jdate($objp->date_livraison),"day"); /*$now = time(); if ( ($now - $db->jdate($objp->date_expedition)) > $conf->warnings->lim && $objp->statutid == 1 ) { }*/ print "\n"; - if($conf->livraison_bon->enabled) { + if($conf->expedition_bon->enabled) { // Date real - print ""; - print dol_print_date($db->jdate($objp->date_livraison),"day"); - print "\n"; + print ''; + print dol_print_date($db->jdate($objp->date_expedition),"day"); + print ''."\n"; + } + if($conf->livraison_bon->enabled) { + print ''; + print dol_print_date($db->jdate($objp->date_reception),"day"); + print ''."\n"; } print ''.$expedition->LibStatut($objp->fk_statut,5).''; diff --git a/htdocs/expedition/note.php b/htdocs/expedition/note.php index 01a341d7ab5..652b09453f7 100644 --- a/htdocs/expedition/note.php +++ b/htdocs/expedition/note.php @@ -157,6 +157,7 @@ if ($id > 0 || ! empty($ref)) print '
'; + $colwidth=20; include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php'; dol_fiche_end(); diff --git a/htdocs/expedition/shipment.php b/htdocs/expedition/shipment.php index bce365447e1..ead48800de5 100644 --- a/htdocs/expedition/shipment.php +++ b/htdocs/expedition/shipment.php @@ -337,11 +337,11 @@ if ($id > 0 || ! empty($ref)) print ''; if ($action == 'classify') { - $form->form_project($_SERVER['PHP_SELF'].'?id='.$commande->id, $commande->socid, $commande->fk_project, 'projectid'); + $form->form_project($_SERVER['PHP_SELF'].'?id='.$commande->id, $commande->socid, $commande->fk_project, 'projectid', 0, 0, 1); } else { - $form->form_project($_SERVER['PHP_SELF'].'?id='.$commande->id, $commande->socid, $commande->fk_project, 'none'); + $form->form_project($_SERVER['PHP_SELF'].'?id='.$commande->id, $commande->socid, $commande->fk_project, 'none', 0, 0); } print ''; } @@ -380,7 +380,7 @@ if ($id > 0 || ! empty($ref)) $sql.= " cd.qty,"; $sql.= ' cd.date_start,'; $sql.= ' cd.date_end,'; - $sql.= ' p.label as product_label, p.ref, p.fk_product_type, p.rowid as prodid,'; + $sql.= ' p.label as product_label, p.entity, p.ref, p.fk_product_type, p.rowid as prodid,'; $sql.= ' p.description as product_desc, p.fk_product_type as product_type'; $sql.= " FROM ".MAIN_DB_PREFIX."commandedet as cd"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON cd.fk_product = p.rowid"; @@ -436,7 +436,8 @@ if ($id > 0 || ! empty($ref)) $commande->fetch_thirdparty(); $prod = new Product($db); - $prod->id=$objp->fk_product; + $prod->id = $objp->fk_product; + $prod->entity = $objp->entity; $prod->getMultiLangs(); $outputlangs = $langs; @@ -461,9 +462,11 @@ if ($id > 0 || ! empty($ref)) $product_static->type=$objp->fk_product_type; $product_static->id=$objp->fk_product; $product_static->ref=$objp->ref; + $product_static->entity = $objp->entity; $text=$product_static->getNomUrl(1); $text.= ' - '.$label; - $description=($conf->global->PRODUIT_DESC_IN_FORM?'':dol_htmlentitiesbr($objp->description)); + $description=($conf->global->PRODUIT_DESC_IN_FORM?'':dol_htmlentitiesbr($objp->description)).'
'; + $description.= $product_static->show_photos($conf->product->multidir_output[$product_static->entity],1,1,0,0,0,80); print $form->textwithtooltip($text,$description,3,'','',$i); // Show range diff --git a/htdocs/expedition/tpl/linkedobjectblock.tpl.php b/htdocs/expedition/tpl/linkedobjectblock.tpl.php index 72206c13e2b..9c6d2c7679a 100644 --- a/htdocs/expedition/tpl/linkedobjectblock.tpl.php +++ b/htdocs/expedition/tpl/linkedobjectblock.tpl.php @@ -46,8 +46,8 @@ foreach($linkedObjectBlock as $object) { $var=!$var; ?> - > -
trans("ShowShipping"),"sending").' '.$object->ref; ?> + > + getNomUrl(1); ?> date_creation,'day'); ?> date_delivery,'day'); ?> 0 || ! empty($ref)) print ''; if ($action == 'classify') { - $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project,'projectid'); + $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project,'projectid', 0, 0, 1); } else { - $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project,'none'); + $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project,'none', 0, 0); } print ''; print ''; diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index 58c0efdda9a..10a50947bba 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -547,7 +547,9 @@ class Fichinter extends CommonObject global $langs; $result=''; - $label=$langs->trans("Show").': '.$this->ref; + $label = '' . $langs->trans("ShowIntervention") . ''; + if (! empty($this->ref)) + $label .= '
' . $langs->trans('Ref') . ': '.$this->ref; $lien = ''; $lienfin=''; diff --git a/htdocs/fichinter/tpl/linkedobjectblock.tpl.php b/htdocs/fichinter/tpl/linkedobjectblock.tpl.php index 4e0d6b753e7..adc348a1c53 100644 --- a/htdocs/fichinter/tpl/linkedobjectblock.tpl.php +++ b/htdocs/fichinter/tpl/linkedobjectblock.tpl.php @@ -41,8 +41,8 @@ foreach($linkedObjectBlock as $object) { $var=!$var; ?> - > - trans("ShowIntervention"),"intervention").' '.$object->ref; ?> + > + getNomUrl(1); ?> datev,'day'); ?> getLibStatut(3); ?> diff --git a/htdocs/fourn/ajax/getSupplierPrices.php b/htdocs/fourn/ajax/getSupplierPrices.php old mode 100755 new mode 100644 index e14e872a24f..e3bb29ad228 --- a/htdocs/fourn/ajax/getSupplierPrices.php +++ b/htdocs/fourn/ajax/getSupplierPrices.php @@ -52,7 +52,7 @@ if ($idprod > 0) $sql = "SELECT p.rowid, p.label, p.ref, p.price, p.duration,"; $sql.= " pfp.ref_fourn,"; $sql.= " pfp.rowid as idprodfournprice, pfp.price as fprice, pfp.remise_percent, pfp.quantity, pfp.unitprice, pfp.charges, pfp.unitcharges,"; - $sql.= " pfp.fk_price_expression, pfp.tva_tx, s.nom as name"; + $sql.= " pfp.fk_supplier_price_expression, pfp.tva_tx, s.nom as name"; $sql.= " FROM ".MAIN_DB_PREFIX."product_fournisseur_price as pfp"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = pfp.fk_product"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = pfp.fk_soc"; @@ -76,9 +76,9 @@ if ($idprod > 0) { $objp = $db->fetch_object($result); - if (!empty($objp->fk_price_expression)) { + if (!empty($objp->fk_supplier_price_expression)) { $priceparser = new PriceParser($db); - $price_result = $priceparser->parseProductSupplier($idprod, $objp->fk_price_expression, $objp->quantity, $objp->tva_tx); + $price_result = $priceparser->parseProductSupplier($idprod, $objp->fk_supplier_price_expression, $objp->quantity, $objp->tva_tx); if ($price_result >= 0) { $objp->fprice = $price_result; if ($objp->quantity >= 1) diff --git a/htdocs/fourn/card.php b/htdocs/fourn/card.php index 0fefa8d4555..3f0636e324a 100644 --- a/htdocs/fourn/card.php +++ b/htdocs/fourn/card.php @@ -167,7 +167,8 @@ if ($object->id > 0) // Country print ''.$langs->trans("Country").''; - $img=picto_from_langcode($object->country_code); + //$img=picto_from_langcode($object->country_code); + $img=''; if ($object->isInEEC()) print $form->textwithpicto(($img?$img.' ':'').$object->country,$langs->trans("CountryIsInEEC"),1,0); else print ($img?$img.' ':'').$object->country; print ''; @@ -336,7 +337,7 @@ if ($object->id > 0) } // TODO move to DAO class - $sql = "SELECT p.rowid,p.ref, p.date_commande as dc, p.fk_statut"; + $sql = "SELECT p.rowid,p.ref, p.date_commande as dc, p.fk_statut, p.total_ht, p.tva as total_tva, p.total_ttc"; $sql.= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as p "; $sql.= " WHERE p.fk_soc =".$object->id; $sql.= " AND p.entity =".$conf->entity; @@ -368,8 +369,11 @@ if ($object->id > 0) print ""; print ''; - $orderstatic->id=$obj->rowid; - $orderstatic->ref=$obj->ref; + $orderstatic->id = $obj->rowid; + $orderstatic->ref = $obj->ref; + $orderstatic->total_ht = $obj->total_ht; + $orderstatic->total_tva = $obj->total_tva; + $orderstatic->total_ttc = $obj->total_ttc; print $orderstatic->getNomUrl(1); print ''; print ''; @@ -407,7 +411,7 @@ if ($object->id > 0) if ($user->rights->fournisseur->facture->lire) { // TODO move to DAO class - $sql = 'SELECT f.rowid,f.libelle,f.ref,f.ref_supplier,f.fk_statut,f.datef as df,f.total_ttc as amount,f.paye,'; + $sql = 'SELECT f.rowid,f.libelle,f.ref,f.ref_supplier,f.fk_statut,f.datef as df, f.total_ht, f.total_tva, f.total_ttc as amount,f.paye,'; $sql.= ' SUM(pf.amount) as am'; $sql.= ' FROM '.MAIN_DB_PREFIX.'facture_fourn as f'; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'paiementfourn_facturefourn as pf ON f.rowid=pf.fk_facturefourn'; @@ -440,6 +444,10 @@ if ($object->id > 0) print ''; $facturestatic->id=$obj->rowid; $facturestatic->ref=($obj->ref?$obj->ref:$obj->rowid).($obj->ref_supplier?' - '.$obj->ref_supplier:''); + $facturestatic->ref_supplier = $obj->ref_supplier; + $facturestatic->total_ht = $obj->total_ht; + $facturestatic->total_tva = $obj->total_tva; + $facturestatic->total_ttc = $obj->total_ttc; //$facturestatic->ref_supplier=$obj->ref_supplier; print $facturestatic->getNomUrl(1); //print img_object($langs->trans('ShowBill'),'bill').' '.($obj->ref?$obj->ref:$obj->rowid).' - '.$obj->ref_supplier.''; diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index f07e9be9bba..7f2237859ea 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -532,7 +532,17 @@ class CommandeFournisseur extends CommonOrder global $langs; $result=''; - $label=$langs->trans("ShowOrder").': '.$this->ref; + $label = '' . $langs->trans("ShowOrder") . ''; + if (! empty($this->ref)) + $label .= '
' . $langs->trans('Ref') . ': ' . $this->ref; + if (! empty($this->ref_supplier)) + $label.= '
' . $langs->trans('RefSupplier') . ': ' . $this->ref_supplier; + if (! empty($this->total_ht)) + $label.= '
' . $langs->trans('AmountHT') . ': ' . price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency); + if (! empty($this->total_tva)) + $label.= '
' . $langs->trans('TVA') . ': ' . price($this->total_tva, 0, $langs, 0, -1, -1, $conf->currency); + if (! empty($this->total_ttc)) + $label.= '
' . $langs->trans('AmountTTC') . ': ' . price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency); $lien = ''; $lienfin=''; @@ -592,7 +602,6 @@ class CommandeFournisseur extends CommonOrder else { $this->error = $obj->error; - dol_print_error($db, get_class($this)."::getNextNumRef ".$obj->error); return -1; } } diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 842fe9fcf0b..71e5c320dfa 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -947,7 +947,7 @@ class FactureFournisseur extends CommonInvoice } // Triggers call - if (! $error && $notrigger) + if (! $error && empty($notrigger)) { // Call trigger $result=$this->call_trigger('BILL_SUPPLIER_VALIDATE',$user); @@ -1472,8 +1472,17 @@ class FactureFournisseur extends CommonInvoice global $langs; $result=''; - $label=$langs->trans("ShowInvoice").': '.$this->ref; - if ($this->ref_supplier) $label.=' / '.$this->ref_supplier; + $label = '' . $langs->trans("ShowSupplierInvoice") . ''; + if (! empty($this->ref)) + $label .= '
' . $langs->trans('Ref') . ': ' . $this->ref; + if (! empty($this->ref_supplier)) + $label.= '
' . $langs->trans('RefSupplier') . ': ' . $this->ref_supplier; + if (! empty($this->total_ht)) + $label.= '
' . $langs->trans('AmountHT') . ': ' . price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency); + if (! empty($this->total_tva)) + $label.= '
' . $langs->trans('TVA') . ': ' . price($this->total_tva, 0, $langs, 0, -1, -1, $conf->currency); + if (! empty($this->total_ttc)) + $label.= '
' . $langs->trans('AmountTTC') . ': ' . price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency); if ($option == 'document') { diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index b43de81c653..cdfee4c2398 100755 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -56,7 +56,7 @@ class ProductFournisseur extends Product var $fourn_unitprice; var $fourn_tva_npr; - var $fk_price_expression; + var $fk_supplier_price_expression; /** @@ -330,7 +330,7 @@ class ProductFournisseur extends Product function fetch_product_fournisseur_price($rowid, $ignore_expression = 0) { $sql = "SELECT pfp.rowid, pfp.price, pfp.quantity, pfp.unitprice, pfp.remise_percent, pfp.remise, pfp.tva_tx, pfp.fk_availability,"; - $sql.= " pfp.fk_soc, pfp.ref_fourn, pfp.fk_product, pfp.charges, pfp.unitcharges, pfp.fk_price_expression"; // , pfp.recuperableonly as fourn_tva_npr"; FIXME this field not exist in llx_product_fournisseur_price + $sql.= " pfp.fk_soc, pfp.ref_fourn, pfp.fk_product, pfp.charges, pfp.unitcharges, pfp.fk_supplier_price_expression"; // , pfp.recuperableonly as fourn_tva_npr"; FIXME this field not exist in llx_product_fournisseur_price $sql.= " FROM ".MAIN_DB_PREFIX."product_fournisseur_price as pfp"; $sql.= " WHERE pfp.rowid = ".$rowid; @@ -350,16 +350,16 @@ class ProductFournisseur extends Product $this->fourn_remise = $obj->remise; $this->fourn_unitprice = $obj->unitprice; $this->fourn_unitcharges = $obj->unitcharges; - $this->tva_tx = $obj->tva_tx; + $this->fourn_tva_tx = $obj->tva_tx; $this->product_id = $obj->fk_product; // deprecated $this->fk_product = $obj->fk_product; $this->fk_availability = $obj->fk_availability; //$this->fourn_tva_npr = $obj->fourn_tva_npr; // FIXME this field not exist in llx_product_fournisseur_price - $this->fk_price_expression = $obj->fk_price_expression; + $this->fk_supplier_price_expression = $obj->fk_supplier_price_expression; - if (empty($ignore_expression) && !empty($this->fk_price_expression)) { + if (empty($ignore_expression) && !empty($this->fk_supplier_price_expression)) { $priceparser = new PriceParser($this->db); - $price_result = $priceparser->parseProductSupplier($this->fk_product, $this->fk_price_expression, $this->fourn_qty, $this->fourn_tva_tx); + $price_result = $priceparser->parseProductSupplier($this->fk_product, $this->fk_supplier_price_expression, $this->fourn_qty, $this->fourn_tva_tx); if ($price_result >= 0) { $this->fourn_price = $price_result; //recalculation of unitprice, as probably the price changed... @@ -402,7 +402,7 @@ class ProductFournisseur extends Product global $conf; $sql = "SELECT s.nom as supplier_name, s.rowid as fourn_id,"; - $sql.= " pfp.rowid as product_fourn_pri_id, pfp.ref_fourn, pfp.fk_product as product_fourn_id, pfp.fk_price_expression,"; + $sql.= " pfp.rowid as product_fourn_pri_id, pfp.ref_fourn, pfp.fk_product as product_fourn_id, pfp.fk_supplier_price_expression,"; $sql.= " pfp.price, pfp.quantity, pfp.unitprice, pfp.remise_percent, pfp.remise, pfp.tva_tx, pfp.fk_availability, pfp.charges, pfp.unitcharges, pfp.info_bits"; $sql.= " FROM ".MAIN_DB_PREFIX."product_fournisseur_price as pfp"; $sql.= ", ".MAIN_DB_PREFIX."societe as s"; @@ -439,11 +439,11 @@ class ProductFournisseur extends Product $prodfourn->fk_availability = $record["fk_availability"]; $prodfourn->id = $prodid; $prodfourn->fourn_tva_npr = $record["info_bits"]; - $prodfourn->fk_price_expression = $record["fk_price_expression"]; + $prodfourn->fk_supplier_price_expression = $record["fk_supplier_price_expression"]; - if (!empty($prodfourn->fk_price_expression)) { + if (!empty($prodfourn->fk_supplier_price_expression)) { $priceparser = new PriceParser($this->db); - $price_result = $priceparser->parseProductSupplier($prodid, $prodfourn->fk_price_expression, $prodfourn->fourn_qty, $prodfourn->fourn_tva_tx); + $price_result = $priceparser->parseProductSupplier($prodid, $prodfourn->fk_supplier_price_expression, $prodfourn->fourn_qty, $prodfourn->fourn_tva_tx); if ($price_result >= 0) { $prodfourn->fourn_price = $price_result; $prodfourn->fourn_unitprice = null; //force recalculation of unitprice, as probably the price changed... @@ -476,11 +476,11 @@ class ProductFournisseur extends Product } /** - * Load properties for minimum price + * Load properties for minimum price * - * @param int $prodid Product id - * @param int $qty Minimum quantity - * @return int <0 if KO, >0 if OK + * @param int $prodid Product id + * @param int $qty Minimum quantity + * @return int <0 if KO, >0 if OK */ function find_min_price_product_fournisseur($prodid, $qty=0) { @@ -491,45 +491,84 @@ class ProductFournisseur extends Product $this->fourn_ref = ''; $this->fourn_price = ''; $this->fourn_qty = ''; - $this->fourn_remise_percent = ''; - $this->fourn_remise = ''; + $this->fourn_remise_percent = ''; + $this->fourn_remise = ''; $this->fourn_unitprice = ''; - $this->fourn_id = ''; - $this->fourn_name = ''; - $this->id = ''; + $this->fourn_id = ''; + $this->fourn_name = ''; + $this->id = ''; $sql = "SELECT s.nom as supplier_name, s.rowid as fourn_id,"; $sql.= " pfp.rowid as product_fourn_price_id, pfp.ref_fourn,"; $sql.= " pfp.price, pfp.quantity, pfp.unitprice, pfp.tva_tx, pfp.charges, pfp.unitcharges, "; - $sql.= " pfp.remise, pfp.remise_percent, pfp.fk_price_expression"; + $sql.= " pfp.remise, pfp.remise_percent, pfp.fk_supplier_price_expression"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."product_fournisseur_price as pfp"; $sql.= " WHERE s.entity IN (".getEntity('societe', 1).")"; $sql.= " AND pfp.fk_product = ".$prodid; $sql.= " AND pfp.fk_soc = s.rowid"; if ($qty > 0) $sql.= " AND pfp.quantity <= ".$qty; - $sql.= " ORDER BY pfp.unitprice"; - $sql.= $this->db->plimit(1); dol_syslog(get_class($this)."::find_min_price_product_fournisseur", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { - $record = $this->db->fetch_array($resql); - $this->product_fourn_price_id = $record["product_fourn_price_id"]; - $this->fourn_ref = $record["ref_fourn"]; - $this->fourn_price = $record["price"]; - $this->fourn_qty = $record["quantity"]; - $this->fourn_remise_percent = $record["remise_percent"]; - $this->fourn_remise = $record["remise"]; - $this->fourn_unitprice = $record["unitprice"]; - $this->fourn_charges = $record["charges"]; - $this->fourn_unitcharges = $record["unitcharges"]; - $this->fourn_tva_tx = $record["tva_tx"]; - $this->fourn_id = $record["fourn_id"]; - $this->fourn_name = $record["supplier_name"]; - $this->fk_price_expression = $record["fk_price_expression"]; - $this->id = $prodid; + $record_array = array(); + + //Store each record to array for later search of min + while ($record = $this->db->fetch_array($resql)) + { + $record_array[]=$record; + } + + if (count($record_array) == 0) + { + $this->db->free($resql); + return 0; + } + else + { + $min = -1; + foreach($record_array as $record) + { + $fourn_price = $record["price"]; + $fourn_unitprice = $record["unitprice"]; + if (!empty($record["fk_supplier_price_expression"])) { + $priceparser = new PriceParser($this->db); + $price_result = $priceparser->parseProductSupplier($prodid, $record["fk_supplier_price_expression"], $record["quantity"], $record["tva_tx"]); + if ($price_result >= 0) { + $fourn_price = price2num($price_result,'MU'); + if ($record["quantity"] != 0) + { + $fourn_unitprice = price2num($fourn_price/$record["quantity"],'MU'); + } + else + { + $fourn_unitprice = $fourn_price; + } + } + } + if ($fourn_unitprice < $min || $min == -1) + { + $this->product_fourn_price_id = $record["product_fourn_price_id"]; + $this->fourn_ref = $record["ref_fourn"]; + $this->fourn_price = $fourn_price; + $this->fourn_qty = $record["quantity"]; + $this->fourn_remise_percent = $record["remise_percent"]; + $this->fourn_remise = $record["remise"]; + $this->fourn_unitprice = $fourn_unitprice; + $this->fourn_charges = $record["charges"]; + $this->fourn_unitcharges = $record["unitcharges"]; + $this->fourn_tva_tx = $record["tva_tx"]; + $this->fourn_id = $record["fourn_id"]; + $this->fourn_name = $record["supplier_name"]; + $this->fk_supplier_price_expression = $record["fk_supplier_price_expression"]; + $this->id = $prodid; + $min = $this->fourn_unitprice; + } + } + } + $this->db->free($resql); return 1; } @@ -541,23 +580,24 @@ class ProductFournisseur extends Product } /** - * Sets the price expression + * Sets the supplier price expression * - * @param string $expression_id Expression + * @param int $expression_id Expression * @return int <0 if KO, >0 if OK */ - function setPriceExpression($expression_id) + function setSupplierPriceExpression($expression_id) { global $conf; // Clean parameters $this->db->begin(); + $expression_id = $expression_id != 0 ? $expression_id : 'NULL'; $sql = "UPDATE ".MAIN_DB_PREFIX."product_fournisseur_price"; - $sql.= " SET fk_price_expression = ".$expression_id; + $sql.= " SET fk_supplier_price_expression = ".$expression_id; $sql.= " WHERE rowid = ".$this->product_fourn_price_id; - dol_syslog(get_class($this)."::setPriceExpression", LOG_DEBUG); + dol_syslog(get_class($this)."::setSupplierPriceExpression", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 15fdbc70722..fe22a154251 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -130,13 +130,13 @@ if ($action == 'setconditions' && $user->rights->fournisseur->commande->creer) } // mode de reglement -else if ($action == 'setmode' && $user->rights->fournisseur->commande->creer) +if ($action == 'setmode' && $user->rights->fournisseur->commande->creer) { $result = $object->setPaymentMethods(GETPOST('mode_reglement_id','int')); } // bank account -else if ($action == 'setbankaccount' && $user->rights->fournisseur->commande->creer) +if ($action == 'setbankaccount' && $user->rights->fournisseur->commande->creer) { $result=$object->setBankAccount(GETPOST('fk_account', 'int')); } @@ -154,17 +154,17 @@ if ($action == 'setdate_livraison' && $user->rights->fournisseur->commande->cree } // Set project -else if ($action == 'classin' && $user->rights->fournisseur->commande->creer) +if ($action == 'classin' && $user->rights->fournisseur->commande->creer) { $object->setProject($projectid); } -else if ($action == 'setremisepercent' && $user->rights->fournisseur->commande->creer) +if ($action == 'setremisepercent' && $user->rights->fournisseur->commande->creer) { $result = $object->set_remise($user, $_POST['remise_percent']); } -else if ($action == 'reopen' && $user->rights->fournisseur->commande->approuver) +if ($action == 'reopen' && $user->rights->fournisseur->commande->approuver) { if (in_array($object->statut, array(1, 2, 5, 6, 7, 9))) { @@ -191,7 +191,7 @@ else if ($action == 'reopen' && $user->rights->fournisseur->commande->approuver) /* * Add a line into product */ -else if ($action == 'addline' && $user->rights->fournisseur->commande->creer) +if ($action == 'addline' && $user->rights->fournisseur->commande->creer) { $langs->load('errors'); $error = 0; @@ -402,7 +402,7 @@ else if ($action == 'addline' && $user->rights->fournisseur->commande->creer) /* * Mise a jour d'une ligne dans la commande */ -else if ($action == 'update_line' && $user->rights->fournisseur->commande->creer && ! GETPOST('cancel')) +if ($action == 'update_line' && $user->rights->fournisseur->commande->creer && ! GETPOST('cancel')) { if ($_POST["elrowid"]) { @@ -473,7 +473,7 @@ else if ($action == 'update_line' && $user->rights->fournisseur->commande->creer } } -else if ($action == 'confirm_deleteproductline' && $confirm == 'yes' && $user->rights->fournisseur->commande->creer) +if ($action == 'confirm_deleteproductline' && $confirm == 'yes' && $user->rights->fournisseur->commande->creer) { $result = $object->deleteline(GETPOST('lineid')); @@ -506,7 +506,7 @@ else if ($action == 'confirm_deleteproductline' && $confirm == 'yes' && $user->r } } -else if ($action == 'confirm_valid' && $confirm == 'yes' && +if ($action == 'confirm_valid' && $confirm == 'yes' && ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->fournisseur->commande->creer)) || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->fournisseur->supplier_order_advance->validate))) ) @@ -534,8 +534,8 @@ else if ($action == 'confirm_valid' && $confirm == 'yes' && } } else - { - setEventMessage($object->error, 'errors'); + { + setEventMessages($object->error, $object->errors, 'errors'); } // If we have permission, and if we don't need to provide the idwarehouse, we go directly on approved step @@ -545,7 +545,7 @@ else if ($action == 'confirm_valid' && $confirm == 'yes' && } } -else if ($action == 'confirm_approve' && $confirm == 'yes' && $user->rights->fournisseur->commande->approuver) +if ($action == 'confirm_approve' && $confirm == 'yes' && $user->rights->fournisseur->commande->approuver) { $idwarehouse=GETPOST('idwarehouse', 'int'); @@ -596,7 +596,7 @@ else if ($action == 'confirm_approve' && $confirm == 'yes' && $user->rights->fou } } -else if ($action == 'confirm_refuse' && $confirm == 'yes' && $user->rights->fournisseur->commande->approuver) +if ($action == 'confirm_refuse' && $confirm == 'yes' && $user->rights->fournisseur->commande->approuver) { $result = $object->refuse($user); if ($result > 0) @@ -610,7 +610,7 @@ else if ($action == 'confirm_refuse' && $confirm == 'yes' && $user->rights->four } } -else if ($action == 'confirm_commande' && $confirm == 'yes' && $user->rights->fournisseur->commande->commander) +if ($action == 'confirm_commande' && $confirm == 'yes' && $user->rights->fournisseur->commande->commander) { $result = $object->commande($user, $_REQUEST["datecommande"], $_REQUEST["methode"], $_REQUEST['comment']); if ($result > 0) @@ -628,7 +628,7 @@ else if ($action == 'confirm_commande' && $confirm == 'yes' && $user->rights->fo } -else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->fournisseur->commande->supprimer) +if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->fournisseur->commande->supprimer) { $result=$object->delete($user); if ($result > 0) @@ -643,7 +643,7 @@ else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->four } // Action clone object -else if ($action == 'confirm_clone' && $confirm == 'yes' && $user->rights->fournisseur->commande->creer) +if ($action == 'confirm_clone' && $confirm == 'yes' && $user->rights->fournisseur->commande->creer) { if (1==0 && ! GETPOST('clone_content') && ! GETPOST('clone_receivers')) { @@ -669,7 +669,7 @@ else if ($action == 'confirm_clone' && $confirm == 'yes' && $user->rights->fourn } // Receive -else if ($action == 'livraison' && $user->rights->fournisseur->commande->receptionner) +if ($action == 'livraison' && $user->rights->fournisseur->commande->receptionner) { if ($_POST["type"]) @@ -698,7 +698,7 @@ else if ($action == 'livraison' && $user->rights->fournisseur->commande->recepti } } -else if ($action == 'confirm_cancel' && $confirm == 'yes' && $user->rights->fournisseur->commande->commander) +if ($action == 'confirm_cancel' && $confirm == 'yes' && $user->rights->fournisseur->commande->commander) { $result = $object->cancel($user); if ($result > 0) @@ -713,7 +713,7 @@ else if ($action == 'confirm_cancel' && $confirm == 'yes' && $user->rights->four } // Line ordering -else if ($action == 'up' && $user->rights->fournisseur->commande->creer) +if ($action == 'up' && $user->rights->fournisseur->commande->creer) { $object->line_up($_GET['rowid']); @@ -729,7 +729,7 @@ else if ($action == 'up' && $user->rights->fournisseur->commande->creer) header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#'.$_GET['rowid'])); exit; } -else if ($action == 'down' && $user->rights->fournisseur->commande->creer) +if ($action == 'down' && $user->rights->fournisseur->commande->creer) { $object->line_down($_GET['rowid']); @@ -746,7 +746,7 @@ else if ($action == 'down' && $user->rights->fournisseur->commande->creer) exit; } -else if ($action == 'builddoc' && $user->rights->fournisseur->commande->creer) // En get ou en post +if ($action == 'builddoc' && $user->rights->fournisseur->commande->creer) // En get ou en post { // Build document @@ -768,7 +768,7 @@ else if ($action == 'builddoc' && $user->rights->fournisseur->commande->creer) / } // Delete file in doc form -else if ($action == 'remove_file' && $object->id > 0 && $user->rights->fournisseur->commande->creer) +if ($action == 'remove_file' && $object->id > 0 && $user->rights->fournisseur->commande->creer) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $langs->load("other"); @@ -779,7 +779,7 @@ else if ($action == 'remove_file' && $object->id > 0 && $user->rights->fournisse else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors'); } -elseif ($action == 'update_extras') +if ($action == 'update_extras') { // Fill array 'array_options' with data from add form $extralabels=$extrafields->fetch_name_optionals_label($object->table_element); @@ -821,7 +821,7 @@ elseif ($action == 'update_extras') /* * Create an order */ -else if ($action == 'add' && $user->rights->fournisseur->commande->creer) +if ($action == 'add' && $user->rights->fournisseur->commande->creer) { $error=0; @@ -1367,17 +1367,24 @@ elseif (! empty($object->id)) if (preg_match('/^[\(]?PROV/i',$object->ref)) $newref = $object->getNextNumRef($object->thirdparty); else $newref = $object->ref; - $text=$langs->trans('ConfirmValidateOrder',$newref); - if (! empty($conf->notification->enabled)) + if ($newref < 0) { - require_once DOL_DOCUMENT_ROOT .'/core/class/notify.class.php'; - $notify=new Notify($db); - $text.='
'; - $text.=$notify->confirmMessage('ORDER_SUPPLIER_APPROVE', $object->socid); + setEventMessages($object->error, $object->errors, 'errors'); + $action=''; } + else + { + $text=$langs->trans('ConfirmValidateOrder',$newref); + if (! empty($conf->notification->enabled)) + { + require_once DOL_DOCUMENT_ROOT .'/core/class/notify.class.php'; + $notify=new Notify($db); + $text.='
'; + $text.=$notify->confirmMessage('ORDER_SUPPLIER_APPROVE', $object->socid); + } - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateOrder'), $text, 'confirm_valid', '', 0, 1); - + print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateOrder'), $text, 'confirm_valid', '', 0, 1); + } } /* @@ -1608,11 +1615,11 @@ elseif (! empty($object->id)) //print "$object->id, $object->socid, $object->fk_project"; if ($action == 'classify') { - $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS)?$object->socid:'-1', $object->fk_project, 'projectid'); + $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, (empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS)?$object->socid:'-1'), $object->fk_project, 'projectid', 0, 0, 1); } else { - $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none'); + $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none', 0, 0); } print ''; print ''; diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index 5cb8e3fbd57..e9ede162fb9 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -32,6 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formorder.class.php'; +require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; $langs->load("orders"); $langs->load("sendings"); @@ -41,6 +42,7 @@ $search_ref=GETPOST('search_ref'); $search_refsupp=GETPOST('search_refsupp'); $search_company=GETPOST('search_company'); $search_user=GETPOST('search_user'); +$search_ht=GETPOST('search_ht'); $search_ttc=GETPOST('search_ttc'); $sall=GETPOST('search_all'); $search_status=GETPOST('search_status','int'); @@ -64,12 +66,14 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both $search_refsupp=''; $search_company=''; $search_user=''; + $search_ht=''; $search_ttc=''; $search_status=''; } if ($search_status == '') $search_status=-1; + /* * View */ @@ -89,6 +93,7 @@ if ($socid > 0) llxHeader('',$title); + if ($sortorder == "") $sortorder="DESC"; if ($sortfield == "") $sortfield="cf.date_creation"; $offset = $conf->liste_limit * $page ; @@ -99,8 +104,11 @@ $offset = $conf->liste_limit * $page ; */ $sql = "SELECT s.rowid as socid, s.nom as name, cf.date_commande as dc,"; -$sql.= " cf.rowid,cf.ref, cf.ref_supplier, cf.fk_statut, cf.total_ttc, cf.fk_user_author,cf.date_livraison,"; +$sql.= " cf.rowid,cf.ref, cf.ref_supplier, cf.fk_statut, cf.total_ht, cf.tva as total_tva, cf.total_ttc, cf.fk_user_author,cf.date_livraison,"; $sql.= " p.rowid as project_id, p.ref as project_ref,"; +$sql.= " u.firstname,"; +$sql.= " u.lastname,"; +$sql.= " u.photo,"; $sql.= " u.login"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s,"; $sql.= " ".MAIN_DB_PREFIX."commande_fournisseur as cf"; @@ -122,9 +130,13 @@ if ($search_user) { $sql.= " AND u.login LIKE '%".$db->escape($search_user)."%'"; } +if ($search_ht) +{ + $sql .= " AND cf.total_ht = '".$db->escape(price2num($search_ht))."'"; +} if ($search_ttc) { - $sql .= " AND total_ttc = '".$db->escape(price2num($search_ttc))."'"; + $sql .= " AND cf.total_ttc = '".$db->escape(price2num($search_ttc))."'"; } if ($sall) { @@ -135,7 +147,7 @@ if ($socid) $sql.= " AND s.rowid = ".$socid; //Required triple check because statut=0 means draft filter if (GETPOST('statut', 'int') !== '') { - $sql .= " AND fk_statut IN (".GETPOST('statut').")"; + $sql .= " AND cf.fk_statut IN (".GETPOST('statut').")"; } if ($search_refsupp) { @@ -143,8 +155,8 @@ if ($search_refsupp) } if ($search_status >= 0) { - if ($search_status == 6 || $search_status == 7) $sql.=" AND fk_statut IN (6,7)"; - else $sql.=" AND fk_statut = ".$search_status; + if ($search_status == 6 || $search_status == 7) $sql.=" AND cf.fk_statut IN (6,7)"; + else $sql.=" AND cf.fk_statut = ".$search_status; } $sql.= $db->order($sortfield,$sortorder); @@ -183,7 +195,8 @@ if ($resql) print_liste_field_titre($langs->trans("Thirdparty"),$_SERVER["PHP_SELF"],"s.nom","",$param,'',$sortfield,$sortorder); if (! empty($conf->global->PROJECT_SHOW_REF_INTO_LISTS)) print_liste_field_titre($langs->trans("Project"),$_SERVER["PHP_SELF"],"p.ref","",$param,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Author"),$_SERVER["PHP_SELF"],"u.login","",$param,'',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("AmountTTC"),$_SERVER["PHP_SELF"],"total_ttc","",$param,$sortfield,$sortorder); + print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"cf.total_ht","",$param,'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("AmountTTC"),$_SERVER["PHP_SELF"],"cf.total_ttc","",$param,'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("OrderDate"),$_SERVER["PHP_SELF"],"dc","",$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans('DateDeliveryPlanned'),$_SERVER["PHP_SELF"],'cf.date_livraison','',$param, 'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"cf.fk_statut","",$param,'align="right"',$sortfield,$sortorder); @@ -193,15 +206,16 @@ if ($resql) print ''; print ''; - if (empty($conf->global->SUPPLIER_ORDER_HIDE_REF_SUPPLIER)) print ''; + if (empty($conf->global->SUPPLIER_ORDER_HIDE_REF_SUPPLIER)) print ''; print ''; if (! empty($conf->global->PROJECT_SHOW_REF_INTO_LISTS)) { print ''; print ''; } - print ''; - print ''; + print ''; + print ''; + print ''; print ' '; print ' '; print ''; @@ -215,23 +229,31 @@ if ($resql) $userstatic = new User($db); $objectstatic=new CommandeFournisseur($db); + $projectstatic=new Project($db); while ($i < min($num,$conf->liste_limit)) { $obj = $db->fetch_object($resql); $var=!$var; + $objectstatic->id=$obj->rowid; + $objectstatic->ref=$obj->ref; + $objectstatic->ref_supplier = $obj->ref_supplier; + $objectstatic->total_ht = $obj->total_ht; + $objectstatic->total_tva = $obj->total_tva; + $objectstatic->total_ttc = $obj->total_ttc; print ""; // Ref - print ''.img_object($langs->trans("ShowOrder"),"order").' '.$obj->ref.''; + print ''; + print $objectstatic->getNomUrl(1); $filename=dol_sanitizeFileName($obj->ref); $filedir=$conf->fournisseur->dir_output.'/commande' . '/' . dol_sanitizeFileName($obj->ref); print $formfile->getDocumentsLink($objectstatic->element, $filename, $filedir); print ''."\n"; // Ref Supplier - if (empty($conf->global->SUPPLIER_ORDER_HIDE_REF_SUPPLIER)) print ''.$obj->ref_supplier.''."\n"; + if (empty($conf->global->SUPPLIER_ORDER_HIDE_REF_SUPPLIER)) print ''.$obj->ref_supplier.''."\n"; // Thirdparty print ''; @@ -250,15 +272,21 @@ if ($resql) print ''; } - // Author - $userstatic->id=$obj->fk_user_author; - $userstatic->login=$obj->login; + // Author + $userstatic->id = $obj->fk_user_author; + $userstatic->lastname = $obj->lastname; + $userstatic->firstname = $obj->firstname; + $userstatic->login = $obj->login; + $userstatic->photo = $obj->photo; print ""; - if ($userstatic->id) print $userstatic->getLoginUrl(1); + if ($userstatic->id) print $userstatic->getNomUrl(1); else print " "; print ""; - // Amount + // Amount net + print ''.price($obj->total_ht).""; + + // Amount with tax print ''.price($obj->total_ttc).""; // Date diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 180e70bad79..325a9e5d591 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -157,8 +157,7 @@ elseif ($action == 'confirm_valid' && $confirm == 'yes' && $result = $object->validate($user,'',$idwarehouse); if ($result < 0) { - setEventMessage($object->error,'errors'); - setEventMessage($object->errors,'errors'); + setEventMessages($object->error,$object->errors,'errors'); } } } @@ -1396,12 +1395,13 @@ if ($action == 'create') print ''; // Project - if (! empty($conf->projet->enabled)) { + if (! empty($conf->projet->enabled)) + { $formproject = new FormProjets($db); $langs->load('projects'); print '' . $langs->trans('Project') . ''; - $formproject->select_projects($soc->id, $projectid, 'projectid'); + $formproject->select_projects((empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS)?$object->socid:'-1'), $projectid, 'projectid', 0); print ''; } @@ -1940,11 +1940,11 @@ else print ''; if ($action == 'classify') { - $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS)?$object->socid:'-1', $object->fk_project, 'projectid'); + $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, (empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS)?$object->socid:'-1'), $object->fk_project, 'projectid', 0, 0, 1); } else { - $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none'); + $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none', 0, 0); } print ''; print ''; diff --git a/htdocs/includes/evalmath/evalmath.class.php b/htdocs/includes/evalmath/evalmath.class.php old mode 100755 new mode 100644 diff --git a/htdocs/install/check.php b/htdocs/install/check.php index f7f5ae4b960..4d10087e26f 100644 --- a/htdocs/install/check.php +++ b/htdocs/install/check.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2014 Laurent Destailleur + * Copyright (C) 2004-2015 Laurent Destailleur * Copyright (C) 2005 Marc Barilley / Ocebo * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2013-2014 Juanjo Menent @@ -454,7 +454,7 @@ else if ($allowupgrade) { // If it's not last updagre script, action = upgrade_tmp, if last action = upgrade - $choice .= ''.$langs->trans("Start").''; + $choice .= ''.$langs->trans("Start").''; } else { @@ -523,6 +523,10 @@ $("div#AShowChoices a").click(function() { }); +$(".runupgrade").click(function() { + return confirm("'.dol_escape_js($langs->transnoentitiesnoconv("WarningUpgrade"), 0, 1).'"); +}); + '; pFooter(true); // Never display next button diff --git a/htdocs/install/mysql/data/llx_c_currencies.sql b/htdocs/install/mysql/data/llx_c_currencies.sql index 70a3486f959..90785b52fc3 100644 --- a/htdocs/install/mysql/data/llx_c_currencies.sql +++ b/htdocs/install/mysql/data/llx_c_currencies.sql @@ -150,6 +150,7 @@ INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'VEF' INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'VND', '[8363]', 1, 'Viet Nam Dong'); INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'XAF', NULL, 1, 'Communaute Financiere Africaine (BEAC) CFA Franc'); INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'XOF', NULL, 1, 'Communaute Financiere Africaine (BCEAO) Franc'); +INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'XPF', NULL, 1, 'Franc pacifique (XPF)'); INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'YER', '[65020]', 1, 'Yemen Rial'); INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'ZWD', '[90,36]', 1, 'Zimbabwe Dollar'); diff --git a/htdocs/install/mysql/data/llx_c_tva.sql b/htdocs/install/mysql/data/llx_c_tva.sql index f0d3d94de3b..e3f7e56cdc6 100644 --- a/htdocs/install/mysql/data/llx_c_tva.sql +++ b/htdocs/install/mysql/data/llx_c_tva.sql @@ -5,7 +5,7 @@ -- Copyright (C) 2004 Guillaume Delecourt -- Copyright (C) 2005-2009 Regis Houssin -- Copyright (C) 2007 Patrick Raguin --- Copyright (C) 2010-2011 Juanjo Menent +-- Copyright (C) 2010-2015 Juanjo Menent -- Copyright (C) 2012 Sebastian Neuwert -- Copyright (C) 2012 Ricardo Schluter -- @@ -226,10 +226,10 @@ INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (20 INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (2023, 202, '0', '0', 'VAT Rate 0', 1); -- SPAIN (id country=4) -insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,localtax2,localtax2_type,note,active) values ( 41, 4,'21','0','5.2','3','-21:-9:-2','1','VAT standard rate',1); -insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,localtax2,localtax2_type,note,active) values ( 42, 4,'10','0','1.4','3','-21:-9:-2','1','VAT reduced rate',1); -insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,localtax2,localtax2_type,note,active) values ( 43, 4, '4','0','0.5','3','-21:-9:-2','1','VAT super-reduced rate',1); -insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,localtax2,localtax2_type,note,active) values ( 44, 4, '0','0', '0','3','-21:-9:-2','1','VAT Rate 0',1); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,localtax2,localtax2_type,note,active) values ( 41, 4,'21','0','5.2','3','-19:-15:-9','5','VAT standard rate',1); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,localtax2,localtax2_type,note,active) values ( 42, 4,'10','0','1.4','3','-19:-15:-9','5','VAT reduced rate',1); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,localtax2,localtax2_type,note,active) values ( 43, 4, '4','0','0.5','3','-19:-15:-9','5','VAT super-reduced rate',1); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,localtax2,localtax2_type,note,active) values ( 44, 4, '0','0', '0','3','-19:-15:-9','5','VAT Rate 0',1); -- SWEDEN (id country=20) insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (201,20, '25','0','VAT standard rate',1); diff --git a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql index 7dbdb7eb7dc..4421ad032eb 100755 --- a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql +++ b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql @@ -106,15 +106,20 @@ UPDATE llx_const SET name = 'ACCOUNTING_VAT_ACCOUNT' WHERE name = 'COMPTA_VAT_AC UPDATE llx_const SET name = 'ACCOUNTING_VAT_BUY_ACCOUNT' WHERE name = 'COMPTA_VAT_BUY_ACCOUNT'; -- Compatibility with module Accounting Expert -UPDATE llx_const SET name = 'ACCOUNTING_SEPARATORCSV' WHERE name = 'ACCOUNTINGEX_SEPARATORCSV'; +UPDATE llx_const SET name = 'ACCOUNTING_EXPORT_MODELCSV' WHERE name = 'ACCOUNTINGEX_MODELCSV'; +UPDATE llx_const SET name = 'ACCOUNTING_EXPORT_SEPARATORCSV' WHERE name = 'ACCOUNTINGEX_SEPARATORCSV'; +UPDATE llx_const SET name = 'ACCOUNTING_EXPORT_DATE' WHERE name = 'ACCOUNTINGEX_EXP_DATE'; +UPDATE llx_const SET name = 'ACCOUNTING_EXPORT_PIECE' WHERE name = 'ACCOUNTINGEX_EXP_PIECE'; +UPDATE llx_const SET name = 'ACCOUNTING_EXPORT_GLOBAL_ACCOUNT' WHERE name = 'ACCOUNTINGEX_EXP_GLOBAL_ACCOUNT'; +UPDATE llx_const SET name = 'ACCOUNTING_EXPORT_LABEL' WHERE name = 'ACCOUNTINGEX_EXP_LABEL'; +UPDATE llx_const SET name = 'ACCOUNTING_EXPORT_AMOUNT' WHERE name = 'ACCOUNTINGEX_EXP_AMOUNT'; +UPDATE llx_const SET name = 'ACCOUNTING_EXPORT_DEVISE' WHERE name = 'ACCOUNTINGEX_EXP_DEVISE'; UPDATE llx_const SET name = 'ACCOUNTING_ACCOUNT_SUSPENSE' WHERE name = 'ACCOUNTINGEX_ACCOUNT_SUSPENSE'; UPDATE llx_const SET name = 'ACCOUNTING_SELL_JOURNAL' WHERE name = 'ACCOUNTINGEX_SELL_JOURNAL'; UPDATE llx_const SET name = 'ACCOUNTING_PURCHASE_JOURNAL' WHERE name = 'ACCOUNTINGEX_PURCHASE_JOURNAL'; UPDATE llx_const SET name = 'ACCOUNTING_SOCIAL_JOURNAL' WHERE name = 'ACCOUNTINGEX_SOCIAL_JOURNAL'; -UPDATE llx_const SET name = 'ACCOUNTING_CASH_JOURNAL' WHERE name = 'ACCOUNTINGEX_CASH_JOURNAL'; UPDATE llx_const SET name = 'ACCOUNTING_MISCELLANEOUS_JOURNAL' WHERE name = 'ACCOUNTINGEX_MISCELLANEOUS_JOURNAL'; UPDATE llx_const SET name = 'ACCOUNTING_ACCOUNT_TRANSFER_CASH' WHERE name = 'ACCOUNTINGEX_ACCOUNT_TRANSFER_CASH'; -UPDATE llx_const SET name = 'ACCOUNTING_MODELCSV' WHERE name = 'ACCOUNTINGEX_MODELCSV'; UPDATE llx_const SET name = 'ACCOUNTING_LENGTH_GACCOUNT' WHERE name = 'ACCOUNTINGEX_LENGTH_GACCOUNT'; UPDATE llx_const SET name = 'ACCOUNTING_LENGTH_AACCOUNT' WHERE name = 'ACCOUNTINGEX_LENGTH_AACCOUNT'; UPDATE llx_const SET name = 'ACCOUNTING_LIMIT_LIST_VENTILATION' WHERE name = 'ACCOUNTINGEX_LIMIT_LIST_VENTILATION'; @@ -158,8 +163,8 @@ ALTER TABLE llx_actioncomm_resources ADD UNIQUE INDEX uk_actioncomm_resources(fk -- Localtaxes by thirds -ALTER TABLE llx_c_tva MODIFY COLUMN localtax1 varchar(10); -ALTER TABLE llx_c_tva MODIFY COLUMN localtax2 varchar(10); +ALTER TABLE llx_c_tva MODIFY COLUMN localtax1 varchar(20); +ALTER TABLE llx_c_tva MODIFY COLUMN localtax2 varchar(20); ALTER TABLE llx_localtax ADD COLUMN localtaxtype tinyint after entity; ALTER TABLE llx_societe ADD COLUMN localtax1_value double(6,3) after localtax1_assuj; ALTER TABLE llx_societe ADD COLUMN localtax2_value double(6,3) after localtax2_assuj; diff --git a/htdocs/install/mysql/migration/3.7.0-3.8.0.sql b/htdocs/install/mysql/migration/3.7.0-3.8.0.sql index d096c222aee..60d0e0660da 100755 --- a/htdocs/install/mysql/migration/3.7.0-3.8.0.sql +++ b/htdocs/install/mysql/migration/3.7.0-3.8.0.sql @@ -18,14 +18,20 @@ -- -- VPGSQL8.2 DELETE FROM llx_usergroup_user WHERE fk_user NOT IN (SELECT rowid from llx_user); -- -- VMYSQL4.1 DELETE FROM llx_usergroup_user WHERE fk_usergroup NOT IN (SELECT rowid from llx_usergroup); + --create table for price expressions and add column in product supplier create table llx_c_price_expression ( - rowid integer AUTO_INCREMENT PRIMARY KEY, - title varchar(20) NOT NULL, - expression varchar(80) NOT NULL + rowid integer AUTO_INCREMENT PRIMARY KEY, + title varchar(20) NOT NULL, + expression varchar(80) NOT NULL )ENGINE=innodb; +ALTER TABLE llx_product_fournisseur_price ADD COLUMN fk_supplier_price_expression integer DEFAULT NULL; +ALTER TABLE llx_product ADD COLUMN fk_price_expression integer DEFAULT NULL; +ALTER TABLE llx_product_price ADD COLUMN fk_price_expression integer DEFAULT NULL; + + --create table for user conf of printing driver CREATE TABLE llx_printing ( @@ -41,7 +47,7 @@ CREATE TABLE llx_printing userid integer )ENGINE=innodb; -ALTER TABLE llx_product_fournisseur_price ADD fk_price_expression integer DEFAULT NULL; +ALTER TABLE llx_product_fournisseur_price ADD COLUMN fk_price_expression integer DEFAULT NULL; -- Taiwan VAT Rates insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 2131, 213, '5', '0', 'VAT 5%', 1); @@ -76,3 +82,17 @@ ALTER TABLE llx_stock_mouvement ADD COLUMN inventorycode varchar(128); ALTER TABLE llx_product_association ADD COLUMN incdec integer DEFAULT 1; + + +ALTER TABLE llx_bank_account_extrafields ADD INDEX idx_bank_account_extrafields (fk_object); + + +create table llx_contratdet_extrafields +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + tms timestamp, + fk_object integer NOT NULL, -- object id + import_key varchar(14) -- import key +)ENGINE=innodb; + +ALTER TABLE llx_contratdet_extrafields ADD INDEX idx_contratdet_extrafields (fk_object); diff --git a/htdocs/install/mysql/tables/llx_c_tva.sql b/htdocs/install/mysql/tables/llx_c_tva.sql index 2a0b275ce96..9d6d594fe10 100644 --- a/htdocs/install/mysql/tables/llx_c_tva.sql +++ b/htdocs/install/mysql/tables/llx_c_tva.sql @@ -1,6 +1,6 @@ -- ======================================================================== -- Copyright (C) 2005 Laurent Destailleur --- Copyright (C) 2010-2014 Juanjo Menent +-- Copyright (C) 2010-2015 Juanjo Menent -- Copyright (C) 2011-2012 Alexandre Spangaro -- -- This program is free software; you can redistribute it and/or modify @@ -23,9 +23,9 @@ create table llx_c_tva rowid integer NOT NULL AUTO_INCREMENT PRIMARY KEY, fk_pays integer NOT NULL, taux double NOT NULL, - localtax1 varchar(10) NOT NULL DEFAULT '0', + localtax1 varchar(20) NOT NULL DEFAULT '0', localtax1_type varchar(10) NOT NULL DEFAULT '0', - localtax2 varchar(10) NOT NULL DEFAULT '0', + localtax2 varchar(20) NOT NULL DEFAULT '0', localtax2_type varchar(10) NOT NULL DEFAULT '0', recuperableonly integer NOT NULL DEFAULT 0, note varchar(128), diff --git a/htdocs/install/mysql/tables/llx_contratdet_extrafields.key.sql b/htdocs/install/mysql/tables/llx_contratdet_extrafields.key.sql new file mode 100644 index 00000000000..3d2f8546df7 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_contratdet_extrafields.key.sql @@ -0,0 +1,20 @@ +-- =================================================================== +-- 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 +-- 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 . +-- +-- =================================================================== + + +ALTER TABLE llx_contratdet_extrafields ADD INDEX idx_contratdet_extrafields (fk_object); diff --git a/htdocs/install/mysql/tables/llx_contratdet_extrafields.sql b/htdocs/install/mysql/tables/llx_contratdet_extrafields.sql new file mode 100644 index 00000000000..bc06733572e --- /dev/null +++ b/htdocs/install/mysql/tables/llx_contratdet_extrafields.sql @@ -0,0 +1,25 @@ +-- =================================================================== +-- Copyright (C) 2014 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 +-- 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 . +-- +-- =================================================================== + +create table llx_contratdet_extrafields +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + tms timestamp, + fk_object integer NOT NULL, -- object id + import_key varchar(14) -- import key +)ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_product.sql b/htdocs/install/mysql/tables/llx_product.sql old mode 100644 new mode 100755 index e9703fc90cf..03c5c5edd3c --- a/htdocs/install/mysql/tables/llx_product.sql +++ b/htdocs/install/mysql/tables/llx_product.sql @@ -76,5 +76,6 @@ create table llx_product finished tinyint DEFAULT NULL, hidden tinyint DEFAULT 0, -- Not used. Deprecated. import_key varchar(14), -- Import key + fk_price_expression integer, -- Link to the rule for dynamic price calculation desiredstock integer DEFAULT 0 )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_product_fournisseur_price.sql b/htdocs/install/mysql/tables/llx_product_fournisseur_price.sql index a0554d4345c..f3905ab4fbe 100755 --- a/htdocs/install/mysql/tables/llx_product_fournisseur_price.sql +++ b/htdocs/install/mysql/tables/llx_product_fournisseur_price.sql @@ -39,6 +39,6 @@ create table llx_product_fournisseur_price tva_tx double(6,3) NOT NULL, info_bits integer NOT NULL DEFAULT 0, fk_user integer, - fk_price_expression integer, -- Link to the rule for dynamic amount calculation + fk_supplier_price_expression integer, -- Link to the rule for dynamic price calculation import_key varchar(14) -- Import key )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_product_price.sql b/htdocs/install/mysql/tables/llx_product_price.sql old mode 100644 new mode 100755 index e83fbdccc2c..1341c49dcaa --- a/htdocs/install/mysql/tables/llx_product_price.sql +++ b/htdocs/install/mysql/tables/llx_product_price.sql @@ -38,6 +38,7 @@ create table llx_product_price fk_user_author integer, tosell tinyint DEFAULT 1, price_by_qty integer NOT NULL DEFAULT 0, + fk_price_expression integer, -- Link to the rule for dynamic price calculation import_key varchar(14) )ENGINE=innodb; diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index bca163db8bd..e018a45eab9 100755 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -294,7 +294,7 @@ DoNotUseInProduction=Do not use in production ThisIsProcessToFollow=This is setup to process: StepNb=Step %s FindPackageFromWebSite=Find a package that provides feature you want (for example on official web site %s). -DownloadPackageFromWebSite=Download package. +DownloadPackageFromWebSite=Download package %s. UnpackPackageInDolibarrRoot=Unpack package file into Dolibarr's root directory %s SetupIsReadyForUse=Install is finished and Dolibarr is ready to use with this new component. NotExistsDirect=The alternative root directory is not defined.
@@ -304,6 +304,7 @@ YouCanSubmitFile=Select module: CurrentVersion=Dolibarr current version CallUpdatePage=Go to the page that updates the database structure and datas: %s. LastStableVersion=Last stable version +UpdateServerOffline=Update server offline GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags could be used:
{000000} corresponds to a number which will be incremented on each %s. Enter as many zeros as the desired length of the counter. The counter will be completed by zeros from the left in order to have as many zeros as the mask.
{000000+000} same as previous but an offset corresponding to the number to the right of the + sign is applied starting on first %s.
{000000@x} same as previous but the counter is reset to zero when month x is reached (x between 1 and 12, or 0 to use the early months of fiscal year defined in your configuration, or 99 to reset to zero every month). If this option is used and x is 2 or higher, then sequence {yy}{mm} or {yyyy}{mm} is also required.
{dd} day (01 to 31).
{mm} month (01 to 12).
{yy}, {yyyy} or {y} year over 2, 4 or 1 numbers.
GenericMaskCodes2={cccc} the client code on n characters
{cccc000} the client code on n characters is followed by a counter dedicated for customer. This counter dedicated to customer is reset at same time than global counter.
{tttt} The code of thirdparty type on n characters (see dictionary-thirdparty types).
GenericMaskCodes3=All other characters in the mask will remain intact.
Spaces are not allowed.
@@ -574,7 +575,7 @@ Permission67=Export interventions Permission71=Read members Permission72=Create/modify members Permission74=Delete members -Permission75=Setup types and attributes for members +Permission75=Setup types of membership Permission76=Export datas Permission78=Read subscriptions Permission79=Create/modify subscriptions @@ -597,8 +598,8 @@ Permission106=Export sendings Permission109=Delete sendings Permission111=Read financial accounts Permission112=Create/modify/delete and compare transactions -Permission113=Setup financiel accounts (create, manage categories) -Permission114=Consolidate transactions +Permission113=Setup financial accounts (create, manage categories) +Permission114=Reconciliate transactions Permission115=Export transactions and account statements Permission116=Transfers between accounts Permission117=Manage cheques dispatching @@ -763,6 +764,7 @@ Permission55001=Read polls Permission55002=Create/modify polls Permission59001=Read commercial margins Permission59002=Define commercial margins +Permission59003=Read every user margin DictionaryCompanyType=Thirdparties type DictionaryCompanyJuridicalType=Juridical kinds of thirdparties DictionaryProspectLevel=Prospect potential level @@ -1059,7 +1061,7 @@ BrowserIsOK=You are using the web browser %s. This browser is ok for security an BrowserIsKO=You are using the web browser %s. This browser is known to be a bad choice for security, performance and reliability. We recommand you to use Firefox, Chrome, Opera or Safari. XDebugInstalled=XDebug is loaded. XCacheInstalled=XCache is loaded. -AddRefInList=Display customer/supplier ref into list (select list or combobox) and most of hyperlink +AddRefInList=Display customer/supplier ref into list (select list or combobox) and most of hyperlink. Third parties will appears with name "CC12345 - SC45678 - The big company coorp", instead of "The big company coorp". FieldEdition=Edition of field %s FixTZ=TimeZone fix FillThisOnlyIfRequired=Example: +2 (fill only if timezone offset problems are experienced) @@ -1405,9 +1407,9 @@ FixedEmailTarget=Fixed email target SendingsSetup=Sending module setup SendingsReceiptModel=Sending receipt model SendingsNumberingModules=Sendings numbering modules -SendingsAbility=Support sendings sheets for customer deliveries +SendingsAbility=Support shipment sheets for customer deliveries NoNeedForDeliveryReceipts=In most cases, sendings receipts are used both as sheets for customer deliveries (list of products to send) and sheets that is recevied and signed by customer. So product deliveries receipts is a duplicated feature and is rarely activated. -FreeLegalTextOnShippings=Free text on shippings +FreeLegalTextOnShippings=Free text on shipments ##### Deliveries ##### DeliveryOrderNumberingModules=Products deliveries receipt numbering module DeliveryOrderModel=Products deliveries receipt model diff --git a/htdocs/langs/en_US/agenda.lang b/htdocs/langs/en_US/agenda.lang index 9ed2d79edd2..cd6d6fbf033 100644 --- a/htdocs/langs/en_US/agenda.lang +++ b/htdocs/langs/en_US/agenda.lang @@ -58,8 +58,8 @@ OrderSentByEMail=Customer order %s sent by EMail InvoiceSentByEMail=Customer invoice %s sent by EMail SupplierOrderSentByEMail=Supplier order %s sent by EMail SupplierInvoiceSentByEMail=Supplier invoice %s sent by EMail -ShippingSentByEMail=Shipping %s sent by EMail -ShippingValidated= Shipping %s validated +ShippingSentByEMail=Shipment %s sent by EMail +ShippingValidated= Shipment %s validated NewCompanyToDolibarr= Third party created DateActionPlannedStart= Planned start date DateActionPlannedEnd= Planned end date diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang index ccf994aff95..98db518496c 100644 --- a/htdocs/langs/en_US/bills.lang +++ b/htdocs/langs/en_US/bills.lang @@ -1,16 +1,16 @@ # Dolibarr language file - Source file is en_US - bills Bill=Invoice Bills=Invoices -BillsCustomers=Customer's invoices -BillsCustomer=Customer's invoice -BillsSuppliers=Supplier's invoices -BillsCustomersUnpaid=Unpaid customer's invoices +BillsCustomers=Customers invoices +BillsCustomer=Customers invoice +BillsSuppliers=Suppliers invoices +BillsCustomersUnpaid=Unpaid customers invoices BillsCustomersUnpaidForCompany=Unpaid customer's invoices for %s BillsSuppliersUnpaid=Unpaid supplier's invoices BillsSuppliersUnpaidForCompany=Unpaid supplier's invoices for %s BillsLate=Late payments -BillsStatistics=Customer's invoices statistics -BillsStatisticsSuppliers=Supplier's invoices statistics +BillsStatistics=Customers invoices statistics +BillsStatisticsSuppliers=Suppliers invoices statistics DisabledBecauseNotErasable=Disabled because can not be erased InvoiceStandard=Standard invoice InvoiceStandardAsk=Standard invoice diff --git a/htdocs/langs/en_US/ecm.lang b/htdocs/langs/en_US/ecm.lang index fe09bda787b..bbbf2d3a046 100644 --- a/htdocs/langs/en_US/ecm.lang +++ b/htdocs/langs/en_US/ecm.lang @@ -43,6 +43,8 @@ ECMDocsByContracts=Documents linked to contracts ECMDocsByInvoices=Documents linked to customers invoices ECMDocsByProducts=Documents linked to products ECMDocsByProjects=Documents linked to projects +ECMDocsByUsers=Documents linked to users +ECMDocsByInterventions=Documents linked to interventions ECMNoDirectoryYet=No directory created ShowECMSection=Show directory DeleteSection=Remove directory diff --git a/htdocs/langs/en_US/install.lang b/htdocs/langs/en_US/install.lang index c296bd788e8..ef5b7e20ca6 100644 --- a/htdocs/langs/en_US/install.lang +++ b/htdocs/langs/en_US/install.lang @@ -155,6 +155,7 @@ MigrationFinished=Migration finished LastStepDesc=Last step: Define here login and password you plan to use to connect to software. Do not loose this as it is the account to administer all others. ActivateModule=Activate module %s ShowEditTechnicalParameters=Click here to show/edit advanced parameters (expert mode) +WarningUpgrade=Warning:\nDid your run a database backup first ?\nThis is highly recommanded: for example, due to some bugs into databases systems (for example mysql version 5.5.40), some data or tables may be lost during this process, so it is highly recommanded to have a complete dump of your database before starting migration.\n\nClick OK to start migration process... ######### # upgrade diff --git a/htdocs/langs/en_US/margins.lang b/htdocs/langs/en_US/margins.lang index 0cf9bc34410..bc7446f51f9 100644 --- a/htdocs/langs/en_US/margins.lang +++ b/htdocs/langs/en_US/margins.lang @@ -16,6 +16,7 @@ MarginDetails=Margin details ProductMargins=Product margins CustomerMargins=Customer margins SalesRepresentativeMargins=Sales representative margins +UserMargins=User margins ProductService=Product or Service AllProducts=All products and services ChooseProduct/Service=Choose product or service diff --git a/htdocs/langs/en_US/orders.lang b/htdocs/langs/en_US/orders.lang index 3eab6893735..4127de804c6 100644 --- a/htdocs/langs/en_US/orders.lang +++ b/htdocs/langs/en_US/orders.lang @@ -16,13 +16,13 @@ SupplierOrder=Supplier order SuppliersOrders=Suppliers orders SuppliersOrdersRunning=Current suppliers orders CustomerOrder=Customer order -CustomersOrders=Customer's orders +CustomersOrders=Customers orders CustomersOrdersRunning=Current customer's orders CustomersOrdersAndOrdersLines=Customer orders and order's lines -OrdersToValid=Customer's orders to validate -OrdersToBill=Customer's orders delivered -OrdersInProcess=Customer's orders in process -OrdersToProcess=Customer's orders to process +OrdersToValid=Customers orders to validate +OrdersToBill=Customers orders delivered +OrdersInProcess=Customers orders in process +OrdersToProcess=Customers orders to process SuppliersOrdersToProcess=Supplier's orders to process StatusOrderCanceledShort=Canceled StatusOrderDraftShort=Draft diff --git a/htdocs/langs/en_US/products.lang b/htdocs/langs/en_US/products.lang index a5dfb52d40c..30db4bf232f 100755 --- a/htdocs/langs/en_US/products.lang +++ b/htdocs/langs/en_US/products.lang @@ -22,15 +22,15 @@ ProductAccountancySellCode=Accountancy code (sell) ProductOrService=Product or Service ProductsAndServices=Products and Services ProductsOrServices=Products or Services -ProductsAndServicesOnSell=Available Products and Services -ProductsAndServicesNotOnSell=Obsolete Products and Services +ProductsAndServicesOnSell=Products and Services for sale or for purchase +ProductsAndServicesNotOnSell=Products and Services out of sale ProductsAndServicesStatistics=Products and Services statistics ProductsStatistics=Products statistics -ProductsOnSell=Available products -ProductsNotOnSell=Obsolete products +ProductsOnSell=Product for sale or for pruchase +ProductsNotOnSell=Product out of sale and out of purchase ProductsOnSellAndOnBuy=Products for sale and for purchase -ServicesOnSell=Available services -ServicesNotOnSell=Obsolete services +ServicesOnSell=Services for sale or for purchase +ServicesNotOnSell=Services out of sale ServicesOnSellAndOnBuy=Services for sale and for purchase InternalRef=Internal reference LastRecorded=Last products/services on sell recorded @@ -244,6 +244,9 @@ MinimumPriceLimit=Minimum price can't be lower that %s MinimumRecommendedPrice=Minimum recommended price is : %s PriceExpressionEditor=Price expression editor PriceExpressionSelected=Selected price expression -PriceExpressionEditorHelp="price = 2 + 2" or "2 + 2" for setting the price
ExtraFields are variables like "#options_myextrafieldkey# * 2"
There are special variables like #quantity# and #tva_tx#
Use ; to separate expressions +PriceExpressionEditorHelp1="price = 2 + 2" or "2 + 2" for setting the price. Use ; to separate expressions +PriceExpressionEditorHelp2=You can access ExtraFields with variables like #options_myextrafieldkey# +PriceExpressionEditorHelp3=In both product/service and supplier prices there are these variables available:
#tva_tx# #localtax1_tx# #localtax2_tx# #weight# #length# #surface# #price_min# +PriceExpressionEditorHelp4=In product/service price only: #supplier_min_price#
In supplier prices only: #supplier_quantity# and #supplier_tva_tx# PriceMode=Price mode PriceNumeric=Number diff --git a/htdocs/langs/en_US/sendings.lang b/htdocs/langs/en_US/sendings.lang index f6111bac684..61a216fe5b0 100644 --- a/htdocs/langs/en_US/sendings.lang +++ b/htdocs/langs/en_US/sendings.lang @@ -4,7 +4,8 @@ Sending=Shipment Sendings=Shipments Shipment=Shipment Shipments=Shipments -Receivings=Receivings +ShowSending=Show Sending +Receivings=Receipts SendingsArea=Shipments area ListOfSendings=List of shipments SendingMethod=Shipping method @@ -14,7 +15,7 @@ SearchASending=Search for shipment StatisticsOfSendings=Statistics for shipments NbOfSendings=Number of shipments NumberOfShipmentsByMonth=Number of shipments by month -SendingCard=Shipping card +SendingCard=Shipment card NewSending=New shipment CreateASending=Create a shipment CreateSending=Create shipment @@ -37,7 +38,7 @@ StatusSendingCanceledShort=Canceled StatusSendingDraftShort=Draft StatusSendingValidatedShort=Validated StatusSendingProcessedShort=Processed -SendingSheet=Sending sheet +SendingSheet=Shipment sheet Carriers=Carriers Carrier=Carrier CarriersArea=Carriers area @@ -58,7 +59,7 @@ SendShippingRef=Submission of shipment %s ActionsOnShipping=Events on shipment LinkToTrackYourPackage=Link to track your package ShipmentCreationIsDoneFromOrder=For the moment, creation of a new shipment is done from the order card. -RelatedShippings=Related shippings +RelatedShippings=Related shipments ShipmentLine=Shipment line CarrierList=List of transporters SendingRunning=Product from customer order already sent diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang index ac85e36be07..66e23987f09 100644 --- a/htdocs/langs/en_US/stocks.lang +++ b/htdocs/langs/en_US/stocks.lang @@ -116,7 +116,7 @@ MassMovement=Mass movement MassStockMovement=Mass stock movement SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfert -ReceivingForSameOrder=Receivings for this order +ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded RuleForStockAvailability=Rules on stock requirements StockMustBeEnoughForInvoice=Stock level must be enough to add product/service into invoice diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index b6244802318..7be99f5e278 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1401,41 +1401,6 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a $form=new Form($db); // Define link to login card - $loginhtmltext=''; $logintext=''; - if ($user->societe_id) - { - $thirdpartystatic=new Societe($db); - $thirdpartystatic->fetch($user->societe_id); - $companylink=' ('.$thirdpartystatic->getNomUrl('','').')'; - $company=' ('.$langs->trans("Company").': '.$thirdpartystatic->name.')'; - } - $logintext=''; - $loginhtmltext.=''.$langs->trans("User").''; - $loginhtmltext.='
'.$langs->trans("Name").': '.$user->getFullName($langs); - $loginhtmltext.='
'.$langs->trans("Login").': '.$user->login; - $loginhtmltext.='
'.$langs->trans("EMail").': '.$user->email; - $loginhtmltext.='
'.$langs->trans("Administrator").': '.yn($user->admin); - $type=($user->societe_id?$langs->trans("External").$company:$langs->trans("Internal")); - $loginhtmltext.='
'.$langs->trans("Type").': '.$type; - $loginhtmltext.='
'.$langs->trans("IPAddress").': '.$_SERVER["REMOTE_ADDR"]; - $loginhtmltext.='
'; - $loginhtmltext.='
'.$langs->trans("Connection").''; - if (! empty($conf->global->MAIN_MODULE_MULTICOMPANY)) $loginhtmltext.='
'.$langs->trans("ConnectedOnMultiCompany").': '.$conf->entity.' (user entity '.$user->entity.')'; - $loginhtmltext.='
'.$langs->trans("AuthenticationMode").': '.$_SESSION["dol_authmode"].(empty($dolibarr_main_demo)?'':' (demo)'); - $loginhtmltext.='
'.$langs->trans("ConnectedSince").': '.dol_print_date($user->datelastlogin,"dayhour"); - $loginhtmltext.='
'.$langs->trans("PreviousConnexion").': '.dol_print_date($user->datepreviouslogin,"dayhour"); - $loginhtmltext.='
'.$langs->trans("CurrentTheme").': '.$conf->theme; - $loginhtmltext.='
'.$langs->trans("CurrentMenuManager").': '.$menumanager->name; - $s=picto_from_langcode($langs->getDefaultLang()); - $loginhtmltext.='
'.$langs->trans("CurrentUserLanguage").': '.($s?$s.' ':'').$langs->getDefaultLang(); - $loginhtmltext.='
'.$langs->trans("Browser").': '.$conf->browser->name.($conf->browser->version?' '.$conf->browser->version:'').' ('.$_SERVER['HTTP_USER_AGENT'].')'; - if (! empty($conf->browser->phone)) $loginhtmltext.='
'.$langs->trans("Phone").': '.$conf->browser->phone; - if (! empty($_SESSION["disablemodules"])) $loginhtmltext.='
'.$langs->trans("DisabledModules").':
'.join(', ',explode(',',$_SESSION["disablemodules"])); - $appli='Dolibarr'; if (! empty($conf->global->MAIN_APPLICATION_TITLE)) { @@ -1468,7 +1433,8 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a $toprightmenu.=''; $toprightmenu.=''; -// Tasks for all resources of all opened projects and time spent for each task/resource -print '
'; - -$max = (empty($conf->global->PROJECT_LIMIT_TASK_PROJECT_AREA)?1000:$conf->global->PROJECT_LIMIT_TASK_PROJECT_AREA); - -$sql = "SELECT p.ref, p.title, p.rowid as projectid, t.label, t.rowid as taskid, t.planned_workload, t.duration_effective, t.progress, t.dateo, t.datee, SUM(tasktime.task_duration) as timespent"; -$sql.= " FROM ".MAIN_DB_PREFIX."projet as p"; -$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on p.fk_soc = s.rowid"; -$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."projet_task as t on t.fk_projet = p.rowid"; -$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."projet_task_time as tasktime on tasktime.fk_task = t.rowid"; -$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on tasktime.fk_user = u.rowid"; -$sql.= " WHERE p.entity = ".$conf->entity; -if ($mine || empty($user->rights->projet->all->lire)) $sql.= " AND p.rowid IN (".$projectsListId.")"; -if ($socid) $sql.= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")"; -$sql.= " AND p.fk_statut=1"; -$sql.= " GROUP BY p.ref, p.title, p.rowid, t.label, t.rowid, t.planned_workload, t.duration_effective, t.progress, t.dateo, t.datee"; -$sql.= " ORDER BY t.rowid, t.dateo, t.datee"; -$sql.= $db->plimit($max+1); // We want more to know if we have more than limit - -$var=true; - -dol_syslog('projet:index.php: affectationpercent', LOG_DEBUG); -$resql = $db->query($sql); -if ( $resql ) +if (empty($conf->global->PROJECT_HIDE_TASKS)) { - $num = $db->num_rows($resql); - $i = 0; + // Tasks for all resources of all opened projects and time spent for each task/resource + print '
'; - print '
'; + $max = (empty($conf->global->PROJECT_LIMIT_TASK_PROJECT_AREA)?1000:$conf->global->PROJECT_LIMIT_TASK_PROJECT_AREA); - print_fiche_titre($langs->trans("TasksOnOpenedProject"),'','').'
'; + $sql = "SELECT p.ref, p.title, p.rowid as projectid, t.label, t.rowid as taskid, t.planned_workload, t.duration_effective, t.progress, t.dateo, t.datee, SUM(tasktime.task_duration) as timespent"; + $sql.= " FROM ".MAIN_DB_PREFIX."projet as p"; + $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on p.fk_soc = s.rowid"; + $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."projet_task as t on t.fk_projet = p.rowid"; + $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."projet_task_time as tasktime on tasktime.fk_task = t.rowid"; + $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on tasktime.fk_user = u.rowid"; + $sql.= " WHERE p.entity = ".$conf->entity; + if ($mine || empty($user->rights->projet->all->lire)) $sql.= " AND p.rowid IN (".$projectsListId.")"; + if ($socid) $sql.= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")"; + $sql.= " AND p.fk_statut=1"; + $sql.= " GROUP BY p.ref, p.title, p.rowid, t.label, t.rowid, t.planned_workload, t.duration_effective, t.progress, t.dateo, t.datee"; + $sql.= " ORDER BY t.rowid, t.dateo, t.datee"; + $sql.= $db->plimit($max+1); // We want more to know if we have more than limit - print ''; - print ''; - //print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; + $var=true; - while ($i < $num && $i < $max) + dol_syslog('projet:index.php: affectationpercent', LOG_DEBUG); + $resql = $db->query($sql); + if ( $resql ) { - $obj = $db->fetch_object($resql); - $var=!$var; + $num = $db->num_rows($resql); + $i = 0; - $username=''; - if ($obj->userid && $userstatic->id != $obj->userid) // We have a user and it is not last loaded user - { - $result=$userstatic->fetch($obj->userid); - if (! $result) $userstatic->id=0; - } - if ($userstatic->id) $username = $userstatic->getNomUrl(0,0); + print '
'; - print ""; - //print ''; - print ''; - print ''; - } - - print "
'.$langs->trans('TaskRessourceLinks').''.$langs->trans('Projects').''.$langs->trans('Task').''.$langs->trans('DateStart').''.$langs->trans('DateEnd').''.$langs->trans('PlannedWorkload').''.$langs->trans("ProgressDeclared").''; - print ''.$langs->trans('TimeSpent').''.$langs->trans("ProgressCalculated").''; - print '
'.$username.''; - $projectstatic->id=$obj->projectid; - $projectstatic->ref=$obj->ref; - $projectstatic->title=$obj->title; - print $projectstatic->getNomUrl(1,'',16); - //print ''.$obj->title.''; - print ''; - if (! empty($obj->taskid)) + print_fiche_titre($langs->trans("TasksOnOpenedProject"),'','').'
'; + + print ''; + print ''; + //print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + + while ($i < $num && $i < $max) { - print ''.$obj->label.''; - } - else print $langs->trans("NoTasks"); - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print '"; + //print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print "\n"; + + $i++; } - print $percentcompletion; - print ''; - print "\n"; - $i++; + if ($num > $max) + { + print ''; + } + + print "
'.$langs->trans('TaskRessourceLinks').''.$langs->trans('Projects').''.$langs->trans('Task').''.$langs->trans('DateStart').''.$langs->trans('DateEnd').''.$langs->trans('PlannedWorkload').''.$langs->trans("ProgressDeclared").''; + print ''.$langs->trans('TimeSpent').''.$langs->trans("ProgressCalculated").''; + print '
'.dol_print_date($db->jdate($obj->dateo),'day').''.dol_print_date($db->jdate($obj->datee),'day').''; - print convertSecondToTime($obj->planned_workload, 'all'); - print ''; - print ($obj->taskid>0)?$obj->progress.'%':''; - print ''; - print convertSecondToTime($obj->timespent, 'all'); - print ''; - if (! empty($obj->taskid)) - { - if (empty($obj->planned_workload) > 0) { - $percentcompletion = $langs->trans("WorkloadNotDefined"); - } else { - $percentcompletion = intval($obj->duration_effective*100/$obj->planned_workload).'%'; + $obj = $db->fetch_object($resql); + $var=!$var; + + $username=''; + if ($obj->userid && $userstatic->id != $obj->userid) // We have a user and it is not last loaded user + { + $result=$userstatic->fetch($obj->userid); + if (! $result) $userstatic->id=0; } + if ($userstatic->id) $username = $userstatic->getNomUrl(0,0); + + print "
'.$username.''; + $projectstatic->id=$obj->projectid; + $projectstatic->ref=$obj->ref; + $projectstatic->title=$obj->title; + print $projectstatic->getNomUrl(1,'',16); + //print ''.$obj->title.''; + print ''; + if (! empty($obj->taskid)) + { + print ''.$obj->label.''; + } + else print $langs->trans("NoTasks"); + print ''.dol_print_date($db->jdate($obj->dateo),'day').''.dol_print_date($db->jdate($obj->datee),'day').''; + print convertSecondToTime($obj->planned_workload, 'all'); + print ''; + print ($obj->taskid>0)?$obj->progress.'%':''; + print ''; + print convertSecondToTime($obj->timespent, 'all'); + print ''; + if (! empty($obj->taskid)) + { + if (empty($obj->planned_workload) > 0) { + $percentcompletion = $langs->trans("WorkloadNotDefined"); + } else { + $percentcompletion = intval($obj->duration_effective*100/$obj->planned_workload).'%'; + } + } + print $percentcompletion; + print '
'.$langs->trans("WarningTooManyDataPleaseUseMoreFilters").'
"; + + + $db->free($resql); + } + else + { + dol_print_error($db); } - if ($num > $max) - { - print '
'.$langs->trans("WarningTooManyDataPleaseUseMoreFilters").'
"; - - - $db->free($resql); + print '
'; } -else -{ - dol_print_error($db); -} - -print '
'; - llxFooter(); diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index f00a6ef518b..5b1da5792f5 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -4,6 +4,7 @@ * Copyright (C) 2005 Marc Bariley / Ocebo * Copyright (C) 2005-2010 Regis Houssin * Copyright (C) 2013 Cédric Salvador + * Copyright (C) 2015 Claudio Aschieri * * 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,6 +29,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; $langs->load('projects'); @@ -64,6 +66,16 @@ $search_label=GETPOST("search_label"); $search_societe=GETPOST("search_societe"); $search_year=GETPOST("search_year"); $search_all=GETPOST("search_all"); +$search_status=GETPOST("search_status",'int'); +$search_public=GETPOST("search_public",'int'); +$search_user=GETPOST('search_user','int'); +$search_sale=GETPOST('search_sale','int'); + +$day = GETPOST('day','int'); +$month = GETPOST('month','int'); +$year = GETPOST('year','int'); + + // Purge criteria if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers @@ -73,6 +85,13 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both $search_societe=""; $search_year=""; $search_all=0; + $search_status=1; + $search_public=""; + $search_sale=""; + $search_user=''; + $day=""; + $month=""; + $year=""; } /* @@ -81,6 +100,8 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both $projectstatic = new Project($db); $socstatic = new Societe($db); +$form = new Form($db); +$formother = new FormOther($db); llxHeader("",$langs->trans("Projects"),"EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos"); @@ -92,6 +113,15 @@ $sql.= ", p.datec as date_create, p.dateo as date_start, p.datee as date_end"; $sql.= ", s.nom as name, s.rowid as socid"; $sql.= " FROM ".MAIN_DB_PREFIX."projet as p"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on p.fk_soc = s.rowid"; + +// We'll need this table joined to the select in order to filter by sale +if ($search_sale || (! $user->rights->societe->client->voir && ! $socid)) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +if ($search_user > 0) +{ + $sql.=", ".MAIN_DB_PREFIX."element_contact as c"; + $sql.=", ".MAIN_DB_PREFIX."c_type_contact as tc"; +} + $sql.= " WHERE p.entity = ".$conf->entity; if ($mine || ! $user->rights->projet->all->lire) $sql.= " AND p.rowid IN (".$projectsListId.")"; // No need to check company, as filtering of projects must be done by getProjectsAuthorizedForUser @@ -109,14 +139,36 @@ if ($search_societe) { $sql .= natural_search('s.nom', $search_societe); } -if ($search_year) { - $sql .= " AND (p.dateo IS NULL OR p.dateo <= ".$db->idate(dol_get_last_day($search_year,12,false)).")"; - $sql .= " AND (p.datee IS NULL OR p.datee >= ".$db->idate(dol_get_first_day($search_year,1,false)).")"; +if ($month > 0) +{ + if ($year > 0 && empty($day)) + $sql.= " AND p.datee BETWEEN '".$db->idate(dol_get_first_day($year,$month,false))."' AND '".$db->idate(dol_get_last_day($year,$month,false))."'"; + else if ($year > 0 && ! empty($day)) + $sql.= " AND p.datee BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year))."'"; + else + $sql.= " AND date_format(p.datee, '%m') = '".$month."'"; } +else if ($year > 0) +{ + $sql.= " AND p.datee BETWEEN '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."'"; +} + if ($search_all) { $sql .= natural_search(array('p.ref','p.title','s.nom'), $search_all); } + +if ($search_status!='') $sql .= " AND p.fk_statut = ".$db->escape($search_status); + +if ($search_public!='') $sql .= " AND p.public = ".$db->escape($search_public); + +if ($search_sale > 0) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$search_sale; +if ($search_user > 0) +{ + $sql.= " AND c.fk_c_type_contact = tc.rowid AND tc.element='project' AND tc.source='internal' AND c.element_id = p.rowid AND c.fk_socpeople = ".$search_user; +} + + $sql.= $db->order($sortfield,$sortorder); $sql.= $db->plimit($conf->liste_limit+1, $offset); @@ -127,11 +179,28 @@ if ($resql) $var=true; $num = $db->num_rows($resql); $i = 0; + + $param=''; + if ($month) $param.='&month='.$month; + if ($year) $param.='&year=' .$year; + if ($search_ref != '') $param.='&search_ref='.$search_ref; + if ($search_label != '') $param.='&search_label='.$search_label; + if ($search_societe != '') $param.='&search_societe='.$search_societe; + if ($search_status != '') $param.='&search_status='.$search_status; + if ($search_public != '') $param.='&search_public='.$search_public; + if ($search_user > 0) $param.='&search_user='.$search_user; + if ($search_sale > 0) $param.='&search_sale='.$search_sale; + $text=$langs->trans("Projects"); if ($mine) $text=$langs->trans('MyProjects'); print_barre_liste($text, $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, "", $num); + print ''; + + print ''; + + // Show description of content if ($mine) print $langs->trans("MyProjectsDesc").'

'; else @@ -139,16 +208,40 @@ if ($resql) if ($user->rights->projet->all->lire && ! $socid) print $langs->trans("ProjectsDesc").'

'; else print $langs->trans("ProjectsPublicDesc").'

'; } + + // If the user can view prospects other than his' + if ($user->rights->societe->client->voir || $socid) + { + $langs->load("commercial"); + $moreforfilter.=$langs->trans('ThirdPartiesOfSaleRepresentative'). ': '; + $moreforfilter.=$formother->select_salesrepresentatives($search_sale,'search_sale',$user); + $moreforfilter.='       '; + } + // If the user can view prospects other than his' + + if (($user->rights->societe->client->voir || $socid) && !$mine) + { + $moreforfilter.=$langs->trans('LinkedToSpecificUsers'). ': '; + $moreforfilter.=$form->select_dolusers($search_user,'search_user',1); + } + if (! empty($moreforfilter)) + { + print ''; + print ''; + } + - print ''; - - print '
'; + print $moreforfilter; + print '
'; print ''; - print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"p.ref","","","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Label"),$_SERVER["PHP_SELF"],"p.title","","","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("ThirdParty"),$_SERVER["PHP_SELF"],"s.nom","","","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Visibility"),$_SERVER["PHP_SELF"],"p.public","","","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],'p.fk_statut',"","",'align="right"',$sortfield,$sortorder); + 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.title","",$param,"",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("ThirdParty"),$_SERVER["PHP_SELF"],"s.nom","",$param,"",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("SalesRepresentative"),$_SERVER["PHP_SELF"],"","",$param,"",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("DateEnd"),$_SERVER["PHP_SELF"],"p.datee","",$param,"",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Visibility"),$_SERVER["PHP_SELF"],"p.public","",$param,"",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],'p.fk_statut',"",$param,'align="right"',$sortfield,$sortorder); + print ''; print "\n"; print ''; @@ -162,6 +255,22 @@ if ($resql) print ''; print ''; print ''; + + print ''; + + print ''; + print ''; print ''; + + // Sales Rapresentatives + print ''; + + // Date end + print ''; + // Visibility print ''; print ''; print "\n"; +$var=true; foreach ($dirsociete as $dirroot) { $dir = dol_buildpath($dirroot,0); @@ -488,6 +489,7 @@ print ''; print ''; print "\n"; +$var=true; foreach ($dirsociete as $dirroot) { $dir = dol_buildpath($dirroot.'doc/',0); diff --git a/htdocs/societe/agenda.php b/htdocs/societe/agenda.php index a6ba3d7b1cf..19d943798ce 100644 --- a/htdocs/societe/agenda.php +++ b/htdocs/societe/agenda.php @@ -121,7 +121,8 @@ if ($socid) // Country if ($object->country) { print ''; diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 4ce603ee1ad..77673b82ed3 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -1700,14 +1700,17 @@ class Societe extends CommonObject * @param int $withpicto Add picto into link (0=No picto, 1=Include picto with link, 2=Picto only) * @param string $option Target of link ('', 'customer', 'prospect', 'supplier') * @param int $maxlen Max length of text + * @param string $notooltip 1=Disable tooltip * @return string String with URL */ - function getNomUrl($withpicto=0,$option='',$maxlen=0) + function getNomUrl($withpicto=0,$option='',$maxlen=0,$notooltip=0) { global $conf,$langs; $name=$this->name?$this->name:$this->nom; + if (! empty($conf->dol_no_mouse_hover)) $notooltip=1; + if ($conf->global->SOCIETE_ADD_REF_IN_LIST && (!empty($withpicto))) { if (($this->client) && (! empty ( $this->code_client ))) { $code = $this->code_client . ' - '; @@ -1718,41 +1721,66 @@ class Societe extends CommonObject $name =$code.' '.$name; } - $result=''; - $lien=$lienfin=''; + $result=''; $label=''; + $lien=''; $lienfin=''; + + $label.= ''; + // Add type of canvas - $lien.=(!empty($this->canvas)?'&canvas='.$this->canvas:'').'" title="'.dol_escape_htmltag($name, 1).'" class="classfortooltip">'; + $lien.=(!empty($this->canvas)?'&canvas='.$this->canvas:'').'"'; + $lien.=($notooltip?'':' title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip"'); + $lien.='>'; $lienfin=''; - if ($withpicto) $result.=($lien.img_object($langs->trans("ShowCompany").': '.$name, 'company', 'class="classfortooltip"').$lienfin); + if ($withpicto) $result.=($lien.img_object(($notooltip?'':$label), 'company', ($notooltip?'':'class="classfortooltip"')).$lienfin); if ($withpicto && $withpicto != 2) $result.=' '; $result.=$lien.($maxlen?dol_trunc($name,$maxlen):$name).$lienfin; @@ -2648,7 +2676,7 @@ class Societe extends CommonObject { global $conf; - // Define if third party is treated as company of not when nature is unknown + // Define if third party is treated as company (or not) when nature is unknown $isacompany=empty($conf->global->MAIN_UNKNOWN_CUSTOMERS_ARE_COMPANIES)?0:1; // 0 by default if (! empty($this->tva_intra)) $isacompany=1; else if (! empty($this->typent_code) && in_array($this->typent_code,array('TE_PRIVATE'))) $isacompany=0; diff --git a/htdocs/societe/index.php b/htdocs/societe/index.php index a6a00bb0046..d675c0d0a5b 100644 --- a/htdocs/societe/index.php +++ b/htdocs/societe/index.php @@ -245,7 +245,9 @@ print '
'; * Last third parties modified */ $max=15; -$sql = "SELECT s.rowid, s.nom as name, s.client, s.fournisseur, s.canvas, s.tms as datem, s.status as status"; +$sql = "SELECT s.rowid, s.nom as name, s.client, s.fournisseur"; +$sql.= ", s.logo"; +$sql.= ", s.canvas, s.tms as datem, s.status as status"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; if (! $user->rights->societe->client->voir && ! $socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= ' WHERE s.entity IN ('.getEntity('societe', 1).')'; @@ -289,29 +291,30 @@ if ($result) $thirdparty_static->name=$objp->name; $thirdparty_static->client=$objp->client; $thirdparty_static->fournisseur=$objp->fournisseur; + $thirdparty_static->logo = $objp->logo; $thirdparty_static->datem=$db->jdate($objp->datem); $thirdparty_static->status=$objp->status; $thirdparty_static->canvas=$objp->canvas; - print $thirdparty_static->getNomUrl(1); + print $thirdparty_static->getNomUrl(1); print "\n"; // Type print '
'; // Last modified date diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 5cde8eb572a..d0d9c9cbb47 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -1181,8 +1181,8 @@ else $object->idprof2 = GETPOST('idprof2', 'alpha'); $object->idprof3 = GETPOST('idprof3', 'alpha'); $object->idprof4 = GETPOST('idprof4', 'alpha'); - $object->idprof5 = GETPOST('idprof5', 'alpha'); - $object->idprof6 = GETPOST('idprof6', 'alpha'); + $object->idprof5 = GETPOST('idprof5', 'alpha'); + $object->idprof6 = GETPOST('idprof6', 'alpha'); $object->typent_id = GETPOST('typent_id', 'int'); $object->effectif_id = GETPOST('effectif_id', 'int'); $object->barcode = GETPOST('barcode', 'alpha'); diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index a6d492aa9c4..e83964949b6 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -428,6 +428,9 @@ th .button { background-color: #777; border-radius: 10px; } +.movable { + cursor: move; +} .borderrightlight { diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index bc4f6b5d2f5..16123c86b9c 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -1777,23 +1777,76 @@ class User extends CommonObject * * @param int $withpicto Include picto in link (0=No picto, 1=Inclut le picto dans le lien, 2=Picto seul) * @param string $option On what the link point to + * @param boolean $infologin Add connection info to the tooltip + * @param string $notooltip 1=Disable tooltip + * @param int $maxlen Max length of visible user name * @return string String with URL */ - function getNomUrl($withpicto=0,$option='') + function getNomUrl($withpicto=0, $option='', $infologin=0, $notooltip=0, $maxlen=24) { - global $langs; + global $langs, $conf, $db; + global $dolibarr_main_authentication, $dolibarr_main_demo; - $result=''; - $label = $langs->trans("ShowUser").': '.$this->getFullName($langs,'','',24); - $lien = ''; + $result = ''; + $companylink = ''; + + $label = '' . $langs->trans("User") . ''; + $label.= '
'; + $label .= '' . $langs->trans('Name') . ': ' . $this->getFullName($langs,'',''); + if (! empty($this->login)) + $label .= '
' . $langs->trans('Login') . ': ' . $this->login; + if (! empty($this->email)) + $label .= '
' . $langs->trans("EMail").': '.$this->email; + if (! empty($this->admin)) + $label .= '
' . $langs->trans("Administrator").': '.yn($this->admin); + if (! empty($this->societe_id)) { + $thirdpartystatic = new Societe($db); + $thirdpartystatic->fetch($this->societe_id); + $companylink = ' ('.$thirdpartystatic->getNomUrl('','').')'; + $company=' ('.$langs->trans("Company").': '.$thirdpartystatic->name.')'; + } + $type=($this->societe_id?$langs->trans("External").$company:$langs->trans("Internal")); + $label .= '
' . $langs->trans("Type") . ': ' . $type; + if (! empty($this->photo)) + { + $label.= '
'; + //if (! is_object($form)) $form = new Form($db); + $label.= Form::showphoto('userphoto', $this, 80); + } + $label.= '
'; + + // Info Login + if ($infologin) + { + $label.= '
'; + $label.= '
'.$langs->trans("Connection").''; + $label.= '
'.$langs->trans("IPAddress").': '.$_SERVER["REMOTE_ADDR"]; + if (! empty($conf->global->MAIN_MODULE_MULTICOMPANY)) $label.= '
'.$langs->trans("ConnectedOnMultiCompany").': '.$conf->entity.' (user entity '.$this->entity.')'; + $label.= '
'.$langs->trans("AuthenticationMode").': '.$_SESSION["dol_authmode"].(empty($dolibarr_main_demo)?'':' (demo)'); + $label.= '
'.$langs->trans("ConnectedSince").': '.dol_print_date($this->datelastlogin,"dayhour"); + $label.= '
'.$langs->trans("PreviousConnexion").': '.dol_print_date($this->datepreviouslogin,"dayhour"); + $label.= '
'.$langs->trans("CurrentTheme").': '.$conf->theme; + $label.= '
'.$langs->trans("CurrentMenuManager").': '.$menumanager->name; + $s=picto_from_langcode($langs->getDefaultLang()); + $label.= '
'.$langs->trans("CurrentUserLanguage").': '.($s?$s.' ':'').$langs->getDefaultLang(); + $label.= '
'.$langs->trans("Browser").': '.$conf->browser->name.($conf->browser->version?' '.$conf->browser->version:'').' ('.$_SERVER['HTTP_USER_AGENT'].')'; + if (! empty($conf->browser->phone)) $label.= '
'.$langs->trans("Phone").': '.$conf->browser->phone; + if (! empty($_SESSION["disablemodules"])) $label.= '
'.$langs->trans("DisabledModules").':
'.join(', ',explode(',',$_SESSION["disablemodules"])); + } + + + $lien = '
getFullName($langs,'','',24).$lienfin; + $result.= $lien . $this->getFullName($langs,'','',$maxlen) . $companylink . $lienfin; return $result; } diff --git a/htdocs/user/group/card.php b/htdocs/user/group/card.php index 5f79c939432..8821b6add42 100644 --- a/htdocs/user/group/card.php +++ b/htdocs/user/group/card.php @@ -178,7 +178,7 @@ if ($action == 'update') $object->oldcopy=dol_clone($object); $object->name = trim($_POST["group"]); - $object->nom = $this->name; // For backward compatibility + $object->nom = $object->name; // For backward compatibility $object->note = dol_htmlcleanlastbr($_POST["note"]); // Fill array 'array_options' with data from add form diff --git a/htdocs/user/home.php b/htdocs/user/home.php index c9b3693f1ac..72e9b124ae0 100644 --- a/htdocs/user/home.php +++ b/htdocs/user/home.php @@ -98,8 +98,16 @@ print '
'; */ $max=10; -$sql = "SELECT u.rowid, u.lastname, u.firstname, u.admin, u.login, u.fk_societe, u.datec, u.statut, u.entity, u.ldap_sid,"; -$sql.= " s.nom as name, s.canvas"; +$sql = "SELECT u.rowid, u.lastname, u.firstname, u.admin, u.login, u.fk_societe, u.datec, u.statut"; +$sql.= ", u.entity"; +$sql.= ", u.ldap_sid"; +$sql.= ", u.photo"; +$sql.= ", u.admin"; +$sql.= ", u.email"; +$sql.= ", u.skype"; +$sql.= ", s.nom as name"; +$sql.= ", s.code_client"; +$sql.= ", s.canvas"; $sql.= " FROM ".MAIN_DB_PREFIX."user as u"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON u.fk_societe = s.rowid"; if (! empty($conf->multicompany->enabled) && $conf->entity == 1 && ($conf->multicompany->transverse_mode || ($user->admin && ! $user->entity))) @@ -129,7 +137,18 @@ if ($resql) $var=!$var; print "
"; - print ''; print ''; print ''; diff --git a/htdocs/webservices/server_productorservice.php b/htdocs/webservices/server_productorservice.php index 6f36b664a3b..911b258536c 100644 --- a/htdocs/webservices/server_productorservice.php +++ b/htdocs/webservices/server_productorservice.php @@ -668,6 +668,25 @@ function updateProductOrService($authentication,$product) { $error++; } + if (! $error) + { + if ($newobject->price_base_type == 'HT') + { + $result=$newobject->updatePrice($newobject->price, $newobject->price_base_type,$fuser); + if ($result <= 0) + { + $error++; + } + } + elseif ($newobject->price_base_type == 'TTC') + { + $result=$newobject->updatePrice($newobject->price_ttc, $newobject->price_base_type); + if ($result <= 0) + { + $error++; + } + } + } if (! $error) { diff --git a/test/phpunit/DateLibTest.php b/test/phpunit/DateLibTest.php index 9dd362cca9d..5f33a9f5095 100644 --- a/test/phpunit/DateLibTest.php +++ b/test/phpunit/DateLibTest.php @@ -343,4 +343,24 @@ class DateLibTest extends PHPUnit_Framework_TestCase return $result; } + /** + * testDolGetFirstDayWeek + * + * @return int + */ + public function testDolGetFirstDayWeek() + { + global $conf; + + $day=3; $month=2; $year=2015; + $conf->global->MAIN_START_WEEK = 1; // start on monday + $prev = dol_get_first_day_week($day, $month, $year); + $this->assertEquals(2, (int) $prev['first_day']); // monday for month 2, year 2014 is the 2 + + $day=3; $month=2; $year=2015; + $conf->global->MAIN_START_WEEK = 0; // start on sunday + $prev = dol_get_first_day_week($day, $month, $year); + $this->assertEquals(1, (int) $prev['first_day']); // sunday for month 2, year 2015 is the 1st + } + } diff --git a/test/phpunit/FunctionsLibTest.php b/test/phpunit/FunctionsLibTest.php index 6036909cd23..24408d53594 100755 --- a/test/phpunit/FunctionsLibTest.php +++ b/test/phpunit/FunctionsLibTest.php @@ -646,6 +646,7 @@ class FunctionsLibTest extends PHPUnit_Framework_TestCase $this->savlangs=$langs; $this->savdb=$db; + // Sellers $companyfrnovat=new Societe($db); $companyfrnovat->country_code='FR'; $companyfrnovat->tva_assuj=0; @@ -653,53 +654,88 @@ class FunctionsLibTest extends PHPUnit_Framework_TestCase $companyfr=new Societe($db); $companyfr->country_code='FR'; $companyfr->tva_assuj=1; + $companyfr->tva_intra='FR9999'; + // Buyers $companymc=new Societe($db); $companymc->country_code='MC'; $companymc->tva_assuj=1; + $companyfr->tva_intra='MC9999'; $companyit=new Societe($db); $companyit->country_code='IT'; $companyit->tva_assuj=1; $companyit->tva_intra='IT99999'; - $notcompanyit=new Societe($db); - $notcompanyit->country_code='IT'; - $notcompanyit->tva_assuj=1; - $notcompanyit->tva_intra=''; - $notcompanyit->typent_code='TE_PRIVATE'; + $companyde=new Societe($db); + $companyde->country_code='DE'; + $companyde->tva_assuj=1; + $companyde->tva_intra='DE99999'; + + $notcompanyde=new Societe($db); + $notcompanyde->country_code='DE'; + $notcompanyde->tva_assuj=0; + $notcompanyde->tva_intra=''; + $notcompanyde->typent_code='TE_PRIVATE'; $companyus=new Societe($db); $companyus->country_code='US'; $companyus->tva_assuj=1; $companyus->tva_intra=''; - // Test RULE 0 (FR-IT) + + // Test RULE 0 (FR-DE) // Not tested // Test RULE 1 $vat=get_default_tva($companyfrnovat,$companymc,0); - $this->assertEquals(0,$vat); + $this->assertEquals(0,$vat,'RULE 1'); // Test RULE 2 (FR-FR) $vat=get_default_tva($companyfr,$companyfr,0); - $this->assertEquals(20,$vat); + $this->assertEquals(20,$vat,'RULE 2'); // Test RULE 2 (FR-MC) $vat=get_default_tva($companyfr,$companymc,0); - $this->assertEquals(20,$vat); + $this->assertEquals(20,$vat,'RULE 2'); - // Test RULE 3 (FR-IT) + // Test RULE 3 (FR-DE company) $vat=get_default_tva($companyfr,$companyit,0); - $this->assertEquals(0,$vat); + $this->assertEquals(0,$vat,'RULE 3'); - // Test RULE 4 (FR-IT) - $vat=get_default_tva($companyfr,$notcompanyit,0); - $this->assertEquals(20,$vat); + // Test RULE 4 (FR-DE not a company) + $vat=get_default_tva($companyfr,$notcompanyde,0); + $this->assertEquals(20,$vat,'RULE 4'); // Test RULE 5 (FR-US) $vat=get_default_tva($companyfr,$companyus,0); - $this->assertEquals(0,$vat); + $this->assertEquals(0,$vat,'RULE 5'); + + + // We do same tests but with option SERVICE_ARE_ECOMMERCE_200238EC on. + $conf->global->SERVICE_ARE_ECOMMERCE_200238EC = 1; + + + // Test RULE 1 (FR-US) + $vat=get_default_tva($companyfr,$companyus,0); + $this->assertEquals(0,$vat,'RULE 1 ECOMMERCE_200238EC'); + + // Test RULE 2 (FR-FR) + $vat=get_default_tva($companyfr,$companyfr,0); + $this->assertEquals(20,$vat,'RULE 2 ECOMMERCE_200238EC'); + + // Test RULE 3 (FR-DE company) + $vat=get_default_tva($companyfr,$companyde,0); + $this->assertEquals(0,$vat,'RULE 3 ECOMMERCE_200238EC'); + + // Test RULE 4 (FR-DE not a company) + $vat=get_default_tva($companyfr,$notcompanyde,0); + $this->assertEquals(19,$vat,'RULE 4 ECOMMERCE_200238EC'); + + // Test RULE 5 (FR-US) + $vat=get_default_tva($companyfr,$companyus,0); + $this->assertEquals(0,$vat,'RULE 5 ECOMMERCE_200238EC'); + } /** @@ -836,7 +872,7 @@ class FunctionsLibTest extends PHPUnit_Framework_TestCase $this->assertEquals(1000, price2num('1 000.0')); $this->assertEquals(1000, price2num('1 000','MT')); $this->assertEquals(1000, price2num('1 000','MU')); - + $this->assertEquals(1000.123456, price2num('1 000.123456')); // Round down @@ -850,8 +886,36 @@ class FunctionsLibTest extends PHPUnit_Framework_TestCase // Text can't be converted $this->assertEquals('12.4$',price2num('12.4$')); $this->assertEquals('12r.4$',price2num('12r.4$')); - - return true; + + return true; + } + + /** + * testDolGetDate + * + * @return boolean + */ + public function testDolGetDate() + { + global $conf; + + $conf->global->MAIN_START_WEEK = 0; + + $tmp=dol_getdate(1); // 1/1/1970 and 1 second = thirday + $this->assertEquals(4, $tmp['wday']); + + $tmp=dol_getdate(24*60*60+1); // 2/1/1970 and 1 second = friday + $this->assertEquals(5, $tmp['wday']); + + $conf->global->MAIN_START_WEEK = 1; + + $tmp=dol_getdate(1); // 1/1/1970 and 1 second = thirday + $this->assertEquals(4, $tmp['wday']); + + $tmp=dol_getdate(24*60*60+1); // 2/1/1970 and 1 second = friday + $this->assertEquals(5, $tmp['wday']); + + return true; } }
 
 '; + if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print ''; + print ''; + $formother->select_year($year?$year:-1,'year',1, 20, 5); + print ''; + $array=array(''=>'',0 => $langs->trans("PrivateProject"),1 => $langs->trans("SharedProject")); + print $form->selectarray('search_public',$array,$search_public); + print ''; + + print $form->selectarray('search_status', array(''=>'', '0'=>$langs->trans('Draft'),'1'=>$langs->trans('Opened'),'2'=>$langs->trans('Closed')),$search_status); + + print ''; print ''; print ''; @@ -207,6 +316,46 @@ if ($resql) } print ''; + if($objp->socid) + { + $listsalesrepresentatives=$socstatic->getSalesRepresentatives($user); + $nbofsalesrepresentative=count($listsalesrepresentatives); + if ($nbofsalesrepresentative > 3) // We print only number + { + print ''; + print $nbofsalesrepresentative; + print ''; + } + else if ($nbofsalesrepresentative > 0) + { + $userstatic=new User($db); + $j=0; + foreach($listsalesrepresentatives as $val) + { + $userstatic->id=$val['id']; + $userstatic->lastname=$val['lastname']; + $userstatic->firstname=$val['firstname']; + print $userstatic->getNomUrl(1); + $j++; + if ($j < $nbofsalesrepresentative) print ', '; + } + } + else print $langs->trans("NoSalesRepresentativeAffected"); + } + else + { + print ' '; + } + print ''; + print dol_print_date($db->jdate($objp->date_end),'day'); + print ''; if ($objp->public) print $langs->trans('SharedProject'); diff --git a/htdocs/public/test/test_arrays.php b/htdocs/public/test/test_arrays.php index 5ff161f0b1a..cae90530d36 100644 --- a/htdocs/public/test/test_arrays.php +++ b/htdocs/public/test/test_arrays.php @@ -7,7 +7,7 @@ require '../../main.inc.php'; if ($_SERVER['REMOTE_ADDR'] != '127.0.0.1') { - print "Page available only frome remote address 127.0.0.1"; + print "Page available only from remote address 127.0.0.1"; exit; } diff --git a/htdocs/public/test/test_forms.php b/htdocs/public/test/test_forms.php index ece0c218160..e8841eea580 100644 --- a/htdocs/public/test/test_forms.php +++ b/htdocs/public/test/test_forms.php @@ -8,7 +8,7 @@ include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; if ($_SERVER['REMOTE_ADDR'] != '127.0.0.1') { - print "Page available only frome remote address 127.0.0.1"; + print "Page available only from remote address 127.0.0.1"; exit; } diff --git a/htdocs/societe/admin/societe.php b/htdocs/societe/admin/societe.php index 84a593d759a..8fec81c686c 100644 --- a/htdocs/societe/admin/societe.php +++ b/htdocs/societe/admin/societe.php @@ -395,6 +395,7 @@ print ''.$langs->trans("Status").''.$langs->trans("ShortInfo").'
'.$langs->trans("ShortInfo").''.$langs->trans("Preview").'
'.$langs->trans('Country').''; - $img=picto_from_langcode($object->country_code); + //$img=picto_from_langcode($object->country_code); + $img=''; print ($img?$img.' ':''); print $object->country; print '
'; if ($thirdparty_static->client==1 || $thirdparty_static->client==3) { $thirdparty_static->name=$langs->trans("Customer"); - print $thirdparty_static->getNomUrl(0,'customer'); + print $thirdparty_static->getNomUrl(0,'customer',0,1); } if ($thirdparty_static->client == 3 && empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) print " / "; if (($thirdparty_static->client==2 || $thirdparty_static->client==3) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) { $thirdparty_static->name=$langs->trans("Prospect"); - print $thirdparty_static->getNomUrl(0,'prospect'); + print $thirdparty_static->getNomUrl(0,'prospect',0,1); } if (! empty($conf->fournisseur->enabled) && $thirdparty_static->fournisseur) { if ($thirdparty_static->client) print " / "; $thirdparty_static->name=$langs->trans("Supplier"); - print $thirdparty_static->getNomUrl(0,'supplier'); + print $thirdparty_static->getNomUrl(0,'supplier',0,1); } print '
'.img_object($langs->trans("ShowUser"),"user").' '.dolGetFirstLastname($obj->firstname,$obj->lastname).''; + print ''; + $fuserstatic->id = $obj->rowid; + $fuserstatic->statut = $obj->statut; + $fuserstatic->lastname = $obj->lastname; + $fuserstatic->firstname = $obj->firstname; + $fuserstatic->login = $obj->login; + $fuserstatic->photo = $obj->photo; + $fuserstatic->admin = $obj->admin; + $fuserstatic->email = $obj->email; + $fuserstatic->skype = $obj->skype; + $fuserstatic->societe_id = $obj->fk_societe; + print $fuserstatic->getNomUrl(1); if (! empty($conf->multicompany->enabled) && $obj->admin && ! $obj->entity) { print img_picto($langs->trans("SuperAdministrator"),'redstar'); @@ -145,6 +164,7 @@ if ($resql) { $companystatic->id=$obj->fk_societe; $companystatic->name=$obj->name; + $companystatic->code_client = $obj->code_client; $companystatic->canvas=$obj->canvas; print $companystatic->getNomUrl(1); } @@ -175,8 +195,6 @@ if ($resql) print ''.dol_print_date($db->jdate($obj->datec),'dayhour').''; - $fuserstatic->id=$obj->rowid; - $fuserstatic->statut=$obj->statut; print $fuserstatic->getLibStatut(3); print '