diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a603fd242cc..304924fe150 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,15 +4,14 @@ How to contribute to Dolibarr Bug reports and feature requests -------------------------------- -*Note*: Issues are not a support forum. If you need help using the software, please use [the forums](http://www.dolibarr.org/forum). +*Note*: Issues are not a support forum. If you need help using the software, please use [the forums](http://www.dolibarr.org/forum). -**NEW** - -Issues are now managed on [GitHub](https://github.com/Dolibarr/dolibarr/Issues). +Issues are managed on [GitHub](https://github.com/Dolibarr/dolibarr/Issues). 1. Please [use the search engine](https://help.github.com/articles/searching-issues) to check if nobody's already reported your problem. 2. [Create an issue](https://help.github.com/articles/creating-an-issue). Choose an appropriate title. Prepend appropriately with Bug or Feature Request. -3. Report with as much detail as possible ([Use screenshots or even screencasts whenever possible](https://help.github.com/articles/issue-attachments)). +4. Tell us the version you are using! +3. Write a report with as much detail as possible (Use [screenshots](https://help.github.com/articles/issue-attachments) or even screencasts and provide logging and debugging informations whenever possible). We're still figuring out how to migrate old issues to GitHub. In the meantime, they are still available at [Doliforge](https://doliforge.org/projects/dolibarr). @@ -41,9 +40,45 @@ Choose your base branch accordingly. ### General rules Please don't edit the ChangeLog file. A project manager will update it from your commit messages. -### Commits +### Commits Use clear commit messages with the following structure: +``` +[KEYWORD] [ISSUENUM] DESC + +LONGDESC +``` + +#### Keyword +In uppercase to appear in ChangeLog when generated. + +The keyword can be ommitted if your commit does not fit in any of the following categories: +- Fix: for a bug fix +- Close: for closing a referenced feature request +- New: for an unreferenced new feature (Opening a feature request and using close is prefered) + +#### Issuenum +If your commit fixes a referenced bug or feature request. + +In the form of a # followed by the GitHub issue number. + +#### Desc +A short description of the commit content. + +This should ideally be less than 50 characters. + +#### LongDesc +A long description of the commit content. + +You can really go to town here and explain in depth what you've been doing. + +Feel free to express technical details, use cases or anything relevant to the current commit. + +This section can span multiple lines. + +Try to keep lines under 72 characters. + +#### Samples
 FIX|Fix #456 Short description (where #456 is number of bug fix, if it exists. In upper case to appear into ChangeLog)
 or
@@ -57,8 +92,10 @@ Long description (Can span accross multiple lines).
 
### Pull Requests -When submitting a pull request, use same rule than Commits. With upper case keyword to appear into ChangeLog. +When submitting a pull request, use same rule as [Commits](#commits) for the message. +If your pull request only contains one commit, GitHub will be smart enough to fill it for you. +Otherwise, please be a bit verbose about what you're providing. ### Resources [Developer documentation](http://wiki.dolibarr.org/index.php/Developer_documentation) @@ -67,18 +104,18 @@ Translations ------------ The source language (en_US) is maintained in the repository. See the [Code](#code) section above. -All other translations are managed online at [Transifex](https://www.transifex.com/projects/p/dolibarr). +All other translations are managed online at [Transifex](https://www.transifex.com/dolibarr-association/dolibarr/). Join an existing translation team or create your own and translate into the interface. Your translations will be available in the next major release. ### Resources -[Translator documentation](http://wiki.dolibarr.org/index.php/Developer_documentation) +[Translator documentation](http://wiki.dolibarr.org/index.php/Translator_documentation) Documentation ------------- The project's documentation is maintained on the [Wiki](http://wiki.dolibarr.org/index.php). -*You need to create an account before being able to edit.* +*Note*: to help prevent spam, you need to create an account before being able to edit. diff --git a/ChangeLog b/ChangeLog index 0b6a4a5b871..fb67d07ec43 100644 --- a/ChangeLog +++ b/ChangeLog @@ -13,8 +13,9 @@ make a Dolibarr upgrade. WARNING: Following changes may create regression for some external modules, but were necessary to make Dolibarr better: -- Deprecated hidden option MAIN_USE_CUSTOM_TRANSLATION has been removed. Use MAIN_OVERWRITE_TRANS_xx_YY instead. - +- Deprecated hidden option MAIN_USE_CUSTOM_TRANSLATION has been removed. Use table llx_overwrite_trans instead. +- Trigger LINECONTRACT_INSERT has been renamed into LINECONTRACT_CREATE to match common denomination. + ***** ChangeLog for 3.8 compared to 3.7.* ***** For users: diff --git a/dev/cliparts/commons.svg b/dev/cliparts/commons.svg new file mode 100644 index 00000000000..1abca065694 --- /dev/null +++ b/dev/cliparts/commons.svg @@ -0,0 +1,2058 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/skeletons/skeleton_page.php b/dev/skeletons/skeleton_page.php index 0eb3b01589c..c1e12c2f93c 100644 --- a/dev/skeletons/skeleton_page.php +++ b/dev/skeletons/skeleton_page.php @@ -282,7 +282,7 @@ if ($action == 'list' || (empty($id) && $action != 'create')) if (! empty($moreforfilter)) { - print '
'; + print '
'; print $moreforfilter; $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook @@ -290,7 +290,7 @@ if ($action == 'list' || (empty($id) && $action != 'create')) print '
'; } - print ''."\n"; + print '
'."\n"; // Fields title print ''; diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index 812acf5c923..01957fcedf5 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -40,6 +40,7 @@ require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; +require_once DOL_DOCUMENT_ROOT.'/don/class/paymentdonation.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/salaries/class/paymentsalary.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php'; @@ -120,6 +121,7 @@ $paymentsupplierstatic = new PaiementFourn($db); $societestatic = new Societe($db); $userstatic = new User($db); $chargestatic = new ChargeSociales($db); +$paymentdonstatic = new PaymentDonation($db); $paymentvatstatic = new TVA($db); $paymentsalstatic = new PaymentSalary($db); @@ -133,7 +135,8 @@ if ($result) { $cptcli = (! empty($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER) ? $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER : $langs->trans("CodeNotDef")); $accountancy_account_salary = (! empty($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT) ? $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT : $langs->trans("CodeNotDef")); $accountancy_account_pay_vat = (! empty($conf->global->ACCOUNTING_VAT_PAY_ACCOUNT) ? $conf->global->ACCOUNTING_VAT_PAY_ACCOUNT : $langs->trans("CodeNotDef")); - + $accountancy_account_pay_donation = (! empty($conf->global->DONATION_ACCOUNTINGACCOUNT) ? $conf->global->DONATION_ACCOUNTINGACCOUNT : $langs->trans("CodeNotDef")); + $tabpay = array (); $tabbq = array (); $tabtp = array (); @@ -174,95 +177,100 @@ if ($result) { // get_url may return -1 which is not traversable if (is_array($links)) { - - foreach ( $links as $key => $val ) - { - $tabtype[$obj->rowid] = $links[$key]['type']; + foreach ( $links as $key => $val ) + { + $tabtype[$obj->rowid] = $links[$key]['type']; - if ($links[$key]['type'] == 'payment') - { - $paymentstatic->id = $links[$key]['url_id']; - $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentstatic->getNomUrl(2); - } - else if ($links[$key]['type'] == 'payment_supplier') - { - $paymentsupplierstatic->id = $links[$key]['url_id']; - $paymentsupplierstatic->ref = $links[$key]['url_id']; - $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsupplierstatic->getNomUrl(2); - } - else if ($links[$key]['type'] == 'company') - { - $societestatic->id = $links[$key]['url_id']; - $societestatic->name = $links[$key]['label']; - $tabpay[$obj->rowid]["soclib"] = $societestatic->getNomUrl(1, '', 30); - $tabtp[$obj->rowid][$compta_soc] += $obj->amount; - } - else if ($links[$key]['type'] == 'user') - { - $userstatic->id = $links[$key]['url_id']; - $userstatic->name = $links[$key]['label']; - $tabpay[$obj->rowid]["soclib"] = $userstatic->getNomUrl(1, '', 30); - // $tabtp[$obj->rowid][$compta_user] += $obj->amount; - } - else if ($links[$key]['type'] == 'sc') - { - $chargestatic->id = $links[$key]['url_id']; - $chargestatic->ref = $links[$key]['url_id']; - - $tabpay[$obj->rowid]["lib"] .= ' ' . $chargestatic->getNomUrl(2); - if (preg_match('/^\((.*)\)$/i', $links[$key]['label'], $reg)) { - if ($reg[1] == 'socialcontribution') - $reg[1] = 'SocialContribution'; - $chargestatic->lib = $langs->trans($reg[1]); - } - else + if ($links[$key]['type'] == 'payment') { - $chargestatic->lib = $links[$key]['label']; + $paymentstatic->id = $links[$key]['url_id']; + $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentstatic->getNomUrl(2); } - $chargestatic->ref = $chargestatic->lib; - $tabpay[$obj->rowid]["soclib"] = $chargestatic->getNomUrl(1, 30); - - $sqlmid = 'SELECT cchgsoc.accountancy_code'; - $sqlmid .= " FROM " . MAIN_DB_PREFIX . "c_chargesociales cchgsoc "; - $sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "chargesociales as chgsoc ON chgsoc.fk_type=cchgsoc.id"; - $sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "paiementcharge as paycharg ON paycharg.fk_charge=chgsoc.rowid"; - $sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "bank_url as bkurl ON bkurl.url_id=paycharg.rowid"; - $sqlmid .= " WHERE bkurl.fk_bank=" . $obj->rowid; - - - dol_syslog("accountancy/journal/bankjournal.php:: sqlmid=" . $sqlmid, LOG_DEBUG); - $resultmid = $db->query($sqlmid); - if ($resultmid) + else if ($links[$key]['type'] == 'payment_supplier') { - $objmid = $db->fetch_object($resultmid); - $tabtp[$obj->rowid][$objmid->accountancy_code] += $obj->amount; + $paymentsupplierstatic->id = $links[$key]['url_id']; + $paymentsupplierstatic->ref = $links[$key]['url_id']; + $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsupplierstatic->getNomUrl(2); } + else if ($links[$key]['type'] == 'company') + { + $societestatic->id = $links[$key]['url_id']; + $societestatic->name = $links[$key]['label']; + $tabpay[$obj->rowid]["soclib"] = $societestatic->getNomUrl(1, '', 30); + $tabtp[$obj->rowid][$compta_soc] += $obj->amount; + } + else if ($links[$key]['type'] == 'user') + { + $userstatic->id = $links[$key]['url_id']; + $userstatic->name = $links[$key]['label']; + $tabpay[$obj->rowid]["soclib"] = $userstatic->getNomUrl(1, '', 30); + // $tabtp[$obj->rowid][$compta_user] += $obj->amount; + } + else if ($links[$key]['type'] == 'sc') + { + $chargestatic->id = $links[$key]['url_id']; + $chargestatic->ref = $links[$key]['url_id']; + + $tabpay[$obj->rowid]["lib"] .= ' ' . $chargestatic->getNomUrl(2); + if (preg_match('/^\((.*)\)$/i', $links[$key]['label'], $reg)) { + if ($reg[1] == 'socialcontribution') + $reg[1] = 'SocialContribution'; + $chargestatic->lib = $langs->trans($reg[1]); + } + else + { + $chargestatic->lib = $links[$key]['label']; + } + $chargestatic->ref = $chargestatic->lib; + $tabpay[$obj->rowid]["soclib"] = $chargestatic->getNomUrl(1, 30); + + $sqlmid = 'SELECT cchgsoc.accountancy_code'; + $sqlmid .= " FROM " . MAIN_DB_PREFIX . "c_chargesociales cchgsoc "; + $sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "chargesociales as chgsoc ON chgsoc.fk_type=cchgsoc.id"; + $sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "paiementcharge as paycharg ON paycharg.fk_charge=chgsoc.rowid"; + $sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "bank_url as bkurl ON bkurl.url_id=paycharg.rowid"; + $sqlmid .= " WHERE bkurl.fk_bank=" . $obj->rowid; + + + dol_syslog("accountancy/journal/bankjournal.php:: sqlmid=" . $sqlmid, LOG_DEBUG); + $resultmid = $db->query($sqlmid); + if ($resultmid) + { + $objmid = $db->fetch_object($resultmid); + $tabtp[$obj->rowid][$objmid->accountancy_code] += $obj->amount; + } + } + else if ($links[$key]['type'] == 'payment_donation') + { + $paymentdonstatic->id = $links[$key]['url_id']; + $paymentdonstatic->fk_donation = $links[$key]['url_id']; + $tabpay[$obj->rowid]["lib"] .= ' ' . $langs->trans("PaymentDonation"); + $tabtp[$obj->rowid][$accountancy_account_pay_donation] += $obj->amount; + } + else if ($links[$key]['type'] == 'payment_vat') + { + $paymentvatstatic->id = $links[$key]['url_id']; + $paymentvatstatic->ref = $links[$key]['url_id']; + $tabpay[$obj->rowid]["lib"] .= ' ' . $langs->trans("PaymentVat"); + $tabtp[$obj->rowid][$accountancy_account_pay_vat] += $obj->amount; + } + else if ($links[$key]['type'] == 'payment_salary') + { + $paymentsalstatic->id = $links[$key]['url_id']; + $paymentsalstatic->ref = $links[$key]['url_id']; + $paymentsalstatic->label = $links[$key]['label']; + $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsalstatic->getNomUrl(2); + $tabtp[$obj->rowid][$accountancy_account_salary] += $obj->amount; + } + else if ($links[$key]['type'] == 'banktransfert') + { + $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentvatstatic->getNomUrl(2); + $tabtp[$obj->rowid][$cpttva] += $obj->amount; + } + /*else { + $tabtp [$obj->rowid] [$accountancy_account_salary] += $obj->amount; + }*/ } - else if ($links[$key]['type'] == 'payment_vat') - { - $paymentvatstatic->id = $links[$key]['url_id']; - $paymentvatstatic->ref = $links[$key]['url_id']; - $tabpay[$obj->rowid]["lib"] .= ' ' . $langs->trans("PaymentVat"); - $tabtp[$obj->rowid][$accountancy_account_pay_vat] += $obj->amount; - } - else if ($links[$key]['type'] == 'payment_salary') - { - $paymentsalstatic->id = $links[$key]['url_id']; - $paymentsalstatic->ref = $links[$key]['url_id']; - $paymentsalstatic->label = $links[$key]['label']; - $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsalstatic->getNomUrl(2); - $tabtp[$obj->rowid][$accountancy_account_salary] += $obj->amount; - } - else if ($links[$key]['type'] == 'banktransfert') - { - $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentvatstatic->getNomUrl(2); - $tabtp[$obj->rowid][$cpttva] += $obj->amount; - } - /*else { - $tabtp [$obj->rowid] [$accountancy_account_salary] += $obj->amount; - }*/ - } - } $tabbq[$obj->rowid][$compta_bank] += $obj->amount; diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index 4ffbbf33fb6..d89360631db 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -195,13 +195,14 @@ if ($resql) if (! empty($conf->categorie->enabled)) { require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php'; + $moreforfilter.='
'; $moreforfilter.=$langs->trans('Categories'). ': '; $moreforfilter.=$formother->select_categories(Categorie::TYPE_MEMBER,$search_categ,'search_categ',1); - $moreforfilter.='       '; + $moreforfilter.='
'; } if (! empty($moreforfilter)) { - print '
'; + print '
'; print $moreforfilter; $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook @@ -209,7 +210,7 @@ if ($resql) print '
'; } - print "
"; + print '
'; print ''; print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"d.rowid",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Name")." / ".$langs->trans("Company"),$_SERVER["PHP_SELF"],"d.lastname",$param,"","",$sortfield,$sortorder); diff --git a/htdocs/adherents/stats/byproperties.php b/htdocs/adherents/stats/byproperties.php index 6f5edf529d9..dcf77a2dbad 100644 --- a/htdocs/adherents/stats/byproperties.php +++ b/htdocs/adherents/stats/byproperties.php @@ -116,7 +116,7 @@ else } // Print array -print '
'; +print '
'; print ''; print ''; print ''; diff --git a/htdocs/adherents/stats/geo.php b/htdocs/adherents/stats/geo.php index 3b2ca4c3ecd..f8b6a54f7b7 100644 --- a/htdocs/adherents/stats/geo.php +++ b/htdocs/adherents/stats/geo.php @@ -282,7 +282,7 @@ if (count($arrayjs) && $mode == 'memberbycountry') if ($mode) { // Print array / Affiche le tableau - print '
'.$langs->trans("Nature").''.$langs->trans("NbOfMembers").'
'; + print '
'; print ''; print ''; if ($label2) print ''; diff --git a/htdocs/adherents/stats/index.php b/htdocs/adherents/stats/index.php index a3c8fd69aad..43b994adafe 100644 --- a/htdocs/adherents/stats/index.php +++ b/htdocs/adherents/stats/index.php @@ -167,8 +167,8 @@ print '

'; $data = $stats->getAllByYear(); -print '
'.$label.''.$label2.'
'; -print ''; +print '
'; +print ''; print ''; print ''; print ''; @@ -176,14 +176,15 @@ print ''; print ''; $oldyear=0; +$var=false; foreach ($data as $val) { $year = $val['year']; - print $avg; while ($oldyear > $year+1) { // If we have empty year $oldyear--; - print ''; + $var=!$var; + print ''; print ''; print ''; } - print ''; + $var=!$var; + print ''; print '
'.$langs->trans("Year").''.$langs->trans("NbOfSubscriptions").''.$langs->trans("AmountTotal").''.$langs->trans("AmountAverage").'
'; print ''; print $oldyear; @@ -194,7 +195,8 @@ foreach ($data as $val) print '0
'; //print ''; print $year; diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index 75102ed9f50..b2fe0ac404b 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -168,7 +168,7 @@ if (! $rowid && $action != 'create' && $action != 'edit') print load_fiche_titre($langs->trans("MembersTypes")); - dol_fiche_head(''); + //dol_fiche_head(''); $sql = "SELECT d.rowid, d.libelle, d.cotisation, d.vote"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent_type as d"; @@ -211,7 +211,7 @@ if (! $rowid && $action != 'create' && $action != 'edit') dol_print_error($db); } - dol_fiche_end(); + //dol_fiche_end(); /* * Hotbar diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index eb78ead387b..b9660c8a04d 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -380,7 +380,7 @@ if ($action == 'edit' || $action == 'updateedit') print ''; } } else { - print ''; + print ''; } print '
'; print ''; @@ -769,7 +769,7 @@ else } else { - print ''; + print ''; } print ''; diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index cf974990f01..6530e41c3c1 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -43,6 +43,21 @@ if (! $user->admin) $specialtostring=array(0=>'common', 1=>'interfaces', 2=>'other', 3=>'functional', 4=>'marketplace'); +$familyinfo=array( + 'hr'=>array('position'=>'001', 'label'=>$langs->trans("ModuleFamilyHr")), + 'crm'=>array('position'=>'006', 'label'=>$langs->trans("ModuleFamilyCrm")), + 'financial'=>array('position'=>'009', 'label'=>$langs->trans("ModuleFamilyFinancial")), + 'products'=>array('position'=>'012', 'label'=>$langs->trans("ModuleFamilyProducts")), + 'projects'=>array('position'=>'015', 'label'=>$langs->trans("ModuleFamilyProjects")), + 'ecm'=>array('position'=>'018', 'label'=>$langs->trans("ModuleFamilyECM")), + 'technic'=>array('position'=>'021', 'label'=>$langs->trans("ModuleFamilyTechnic")), + 'portal'=>array('position'=>'040', 'label'=>$langs->trans("ModuleFamilyPortal")), + 'interface'=>array('position'=>'050', 'label'=>$langs->trans("ModuleFamilyInterface")), + 'base'=>array('position'=>'060', 'label'=>$langs->trans("ModuleFamilyBase")), + 'other'=>array('position'=>'100', 'label'=>$langs->trans("ModuleFamilyOther")), +); + + /* * Actions @@ -124,22 +139,20 @@ foreach ($modulesdir as $dir) $objMod = new $modName($db); $modNameLoaded[$modName]=$dir; - if ($objMod->numero > 0) + if (! $objMod->numero > 0) { - $j = $objMod->numero; + dol_syslog('a module descriptor must have a numero property', LOG_ERR); } - else - { - $j = 1000 + $i; - } - + $j = $objMod->numero; + $modulequalified=1; // We discard modules according to features level (PS: if module is activated we always show it) $const_name = 'MAIN_MODULE_'.strtoupper(preg_replace('/^mod/i','',get_class($objMod))); if ($objMod->version == 'development' && (empty($conf->global->$const_name) && ($conf->global->MAIN_FEATURES_LEVEL < 2))) $modulequalified=0; if ($objMod->version == 'experimental' && (empty($conf->global->$const_name) && ($conf->global->MAIN_FEATURES_LEVEL < 1))) $modulequalified=0; - // We discard modules according to property disabled + if (preg_match('/deprecated/', $objMod->version) && (empty($conf->global->$const_name) && ($conf->global->MAIN_FEATURES_LEVEL >= 0))) $modulequalified=0; + // We discard modules according to property disabled if (! empty($objMod->hidden)) $modulequalified=false; // Define array $categ with categ with at least one qualified module @@ -147,13 +160,19 @@ foreach ($modulesdir as $dir) { $modules[$i] = $objMod; $filename[$i]= $modName; - $orders[$i] = $objMod->family."_".$j; // Sort by family, then by module number + + $special = $objMod->special; + $familykey = $objMod->family; + + if ($special == 1) $familykey='interface'; + + $orders[$i] = $familyinfo[$familykey]['position']."_".$familykey."_".$j; // Sort by family, then by module number $dirmod[$i] = $dir; // Set categ[$i] - $special = isset($specialtostring[$objMod->special])?$specialtostring[$objMod->special]:'unknown'; - if ($objMod->version == 'development' || $objMod->version == 'experimental') $special='expdev'; - if (isset($categ[$special])) $categ[$special]++; // Array of all different modules categories - else $categ[$special]=1; + $specialstring = isset($specialtostring[$special])?$specialtostring[$special]:'unknown'; + if ($objMod->version == 'development' || $objMod->version == 'experimental') $specialstring='expdev'; + if (isset($categ[$specialstring])) $categ[$specialstring]++; // Array of all different modules categories + else $categ[$specialstring]=1; $j++; $i++; } @@ -197,9 +216,9 @@ print load_fiche_titre($langs->trans("ModulesSetup"),$moreinfo,'title_setup'); // Start to show page if (empty($mode)) $mode='common'; if ($mode==='common') print $langs->trans("ModulesDesc")."
\n"; -if ($mode==='other') print $langs->trans("ModulesSpecialDesc")."
\n"; -if ($mode==='interfaces') print $langs->trans("ModulesInterfaceDesc")."
\n"; -if ($mode==='functional') print $langs->trans("ModulesJobDesc")."
\n"; +//if ($mode==='other') print $langs->trans("ModulesSpecialDesc")."
\n"; +//if ($mode==='interfaces') print $langs->trans("ModulesInterfaceDesc")."
\n"; +//if ($mode==='functional') print $langs->trans("ModulesJobDesc")."
\n"; if ($mode==='marketplace') print $langs->trans("ModulesMarketPlaceDesc")."
\n"; if ($mode==='expdev') print $langs->trans("ModuleFamilyExperimental")."
\n"; @@ -213,11 +232,12 @@ $categidx='common'; // Main if (! empty($categ[$categidx])) { $head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx; - $head[$h][1] = $langs->trans("ModulesCommon"); + $head[$h][1] = $langs->trans("AvailableModules"); $head[$h][2] = 'common'; $h++; } +/* $categidx='other'; // Other if (! empty($categ[$categidx])) { @@ -244,6 +264,7 @@ if (! empty($categ[$categidx])) $head[$h][2] = 'functional'; $h++; } +*/ $categidx='expdev'; if (! empty($categ[$categidx])) @@ -287,28 +308,19 @@ if ($mode != 'marketplace') $oldfamily=''; - $familylib=array( - 'base'=>$langs->trans("ModuleFamilyBase"), - 'crm'=>$langs->trans("ModuleFamilyCrm"), - 'products'=>$langs->trans("ModuleFamilyProducts"), - 'hr'=>$langs->trans("ModuleFamilyHr"), - 'projects'=>$langs->trans("ModuleFamilyProjects"), - 'financial'=>$langs->trans("ModuleFamilyFinancial"), - 'ecm'=>$langs->trans("ModuleFamilyECM"), - 'technic'=>$langs->trans("ModuleFamilyTechnic"), - 'other'=>$langs->trans("ModuleFamilyOther") - ); - foreach ($orders as $key => $value) { $tab=explode('_',$value); - $family=$tab[0]; $numero=$tab[1]; + $familypos=$tab[0]; $familykey=$tab[1]; $numero=$tab[2]; $modName = $filename[$key]; $objMod = $modules[$key]; + $special = $objMod->special; + //print $objMod->name." - ".$key." - ".$objMod->special.' - '.$objMod->version."
"; - if (($mode != (isset($specialtostring[$objMod->special])?$specialtostring[$objMod->special]:'unknown') && $mode != 'expdev') + //if (($mode != (isset($specialtostring[$special])?$specialtostring[$special]:'unknown') && $mode != 'expdev') + if (($special >= 4 && $mode != 'expdev') || ($mode == 'expdev' && $objMod->version != 'development' && $objMod->version != 'experimental')) continue; // Discard if not for current tab if (! $objMod->getName()) @@ -329,28 +341,27 @@ if ($mode != 'marketplace') } // Print a separator if we change family - //print "xx".$oldfamily."-".$family."-".$atleastoneforfamily."
"; - //if ($oldfamily && $family!=$oldfamily && $atleastoneforfamily) { - if ($family!=$oldfamily) + //print "xx".$oldfamily."-".$familykey."-".$atleastoneforfamily."
"; + //if ($oldfamily && $familykey!=$oldfamily && $atleastoneforfamily) { + if ($familykey!=$oldfamily) { print ''."\n"; print ''; - $familytext=empty($familylib[$family])?$family:$familylib[$family]; + $familytext=empty($familyinfo[$familykey]['label'])?$familykey:$familyinfo[$familykey]['label']; print $familytext; print "\n"; print ''.$langs->trans("SetupShort").''."\n"; print "\n"; $atleastoneforfamily=0; - //print "yy".$oldfamily."-".$family."-".$atleastoneforfamily."
"; + //print "yy".$oldfamily."-".$familykey."-".$atleastoneforfamily."
"; } $atleastoneforfamily++; - if ($family!=$oldfamily) + if ($familykey!=$oldfamily) { - $familytext=empty($familylib[$family])?$family:$familylib[$family]; - //print $familytext; - $oldfamily=$family; + $familytext=empty($familyinfo[$familykey]['label'])?$familykey:$familyinfo[$familykey]['label']; + $oldfamily=$familykey; } $var=!$var; diff --git a/htdocs/asterisk/cidlookup.php b/htdocs/asterisk/cidlookup.php index ef4eaefe9c2..e50a1a74a1b 100644 --- a/htdocs/asterisk/cidlookup.php +++ b/htdocs/asterisk/cidlookup.php @@ -73,5 +73,9 @@ else dol_print_error($db,'Error'); $found = 'Error'; } +//Greek to Latin +$greek = array('α','β','γ','δ','ε','ζ','η','θ','ι','κ','λ','μ','ν','ξ','ο','π','ρ','ς','σ','τ','υ','φ','χ','ψ','ω','Α','Β','Γ','Δ','Ε','Ζ','Η','Θ','Ι','Κ','Λ','Μ','Ν','Ξ','Ο','Π','Ρ','Σ','Τ','Υ','Φ','Χ','Ψ','Ω','ά','έ','ή','ί','ό','ύ','ώ','ϊ','ΐ','Ά','Έ','Ή','Ί','Ό','Ύ','Ώ','Ϊ'); -echo $found; +$latin = array('a','b','g','d','e','z','h','th','i','k','l','m','n','ks','o','p','r','s','s','t','u','f','ch','ps','w','A','B','G','D','E','Z','H','TH','I','K','L','M','N','KS','O','P','R','S','T','U','F','CH','PS','W','a','e','h','i','o','u','w','i','i','A','E','H','I','O','U','W','I'); + +print str_replace($greek, $latin, $found); diff --git a/htdocs/asterisk/wrapper.php b/htdocs/asterisk/wrapper.php index e0f115e31c5..f168de78b6e 100644 --- a/htdocs/asterisk/wrapper.php +++ b/htdocs/asterisk/wrapper.php @@ -112,6 +112,34 @@ $strMaxRetry = "2"; llxHeader(); +$sql = "SELECT s.nom as name FROM ".MAIN_DB_PREFIX."societe as s"; +$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as sp ON sp.fk_soc = s.rowid"; +$sql.= " WHERE s.entity IN (".getEntity('societe', 1).")"; +$sql.= " AND (s.phone='".$db->escape($called)."'"; +$sql.= " OR sp.phone='".$db->escape($called)."'"; +$sql.= " OR sp.phone_perso='".$db->escape($called)."'"; +$sql.= " OR sp.phone_mobile='".$db->escape($called)."')"; +$sql.= $db->plimit(1); + +dol_syslog('click to dial search information with phone '.$called, LOG_DEBUG); +$resql = $db->query($sql); +if ($resql) +{ + $obj = $db->fetch_object($resql); + if ($obj) + { + $found = $obj->name; + } else { + $found = $notfound; + } + $db->free($resql); +} +else +{ + dol_print_error($db,'Error'); + $found = 'Error'; +} + $number=strtolower($called); $pos=strpos($number,"local"); if (! empty($number)) @@ -120,7 +148,7 @@ if (! empty($number)) { $errno=0; $errstr=0; - $strCallerId = "Dolibarr <".strtolower($caller).">"; + $strCallerId = "Dolibarr call $found <".strtolower($number).">"; $oSocket = @fsockopen($strHost, $port, $errno, $errstr, 10); if (!$oSocket) { diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 9b61da3e196..acee9c38374 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -220,7 +220,7 @@ class ActionComm extends CommonObject $this->userassigned[$tmpid]=array('id'=>$tmpid); } - if (is_object($this->contact) && $this->contact->id > 0 && ! ($this->contactid > 0)) $this->contactid = $this->contact->id; // For backward compatibility. Using this->contact->xx is deprecated + if (is_object($this->contact) && isset($this->contact->id) && $this->contact->id > 0 && ! ($this->contactid > 0)) $this->contactid = $this->contact->id; // For backward compatibility. Using this->contact->xx is deprecated $userownerid=$this->userownerid; diff --git a/htdocs/comm/askpricesupplier/list.php b/htdocs/comm/askpricesupplier/list.php index 2e78045b308..ae7ed58b29c 100644 --- a/htdocs/comm/askpricesupplier/list.php +++ b/htdocs/comm/askpricesupplier/list.php @@ -242,7 +242,6 @@ if ($result) print '
'; $i = 0; - print ''; $moreforfilter=''; @@ -250,25 +249,32 @@ if ($result) if ($user->rights->societe->client->voir || $socid) { $langs->load("commercial"); + $moreforfilter.='
'; $moreforfilter.=$langs->trans('ThirdPartiesOfSaleRepresentative'). ': '; $moreforfilter.=$formother->select_salesrepresentatives($search_sale,'search_sale',$user); - $moreforfilter.='       '; + $moreforfilter.='
'; } // If the user can view prospects other than his' if ($user->rights->societe->client->voir || $socid) { + $moreforfilter.='
'; $moreforfilter.=$langs->trans('LinkedToSpecificUsers'). ': '; $moreforfilter.=$form->select_dolusers($search_user,'search_user',1); + $moreforfilter.='
'; } - if (! empty($moreforfilter)) - { - print ''; - print ''; - } + if (! empty($moreforfilter)) + { + print '
'; + print $moreforfilter; + $parameters=array(); + $reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + print '
'; + } + - print ''; + print '
'; - print $moreforfilter; - print '
'; + print ''; print_liste_field_titre($langs->trans('Ref'),$_SERVER["PHP_SELF"],'p.ref','',$param,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans('Company'),$_SERVER["PHP_SELF"],'s.nom','',$param,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans('AskPriceSupplierDate'),$_SERVER["PHP_SELF"],'p.date_livraison','',$param, 'align="center"',$sortfield,$sortorder); diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index a9164676716..a44a79da1f0 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -218,17 +218,15 @@ if ($id > 0) dol_fiche_head($head, 'customer', $langs->trans("ThirdParty"),0,'company'); + dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom'); + print '
'; - + print '
'; print '
'; - print ''; - // Alias name (commercial, trademark or alias name) - print '"; @@ -264,39 +262,6 @@ if ($id > 0) print ''; } - // Address - print '"; - - // Zip / Town - print ''; - print '"; - print ''; - - // Country - print ''; - - // EMail - print ''; - - // Web - print ''; - - // Phone - print ''; - - // Fax - print ''; - // Skype if (! empty($conf->skype->enabled)) { diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index 37e4ee61ced..79dfafa7a76 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -172,12 +172,13 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) $resql=$db->query($sql); if ($resql) { - print '
'.$langs->trans("ThirdPartyName").''; - print $form->showrefnav($object,'socid','',($user->societe_id?0:1),'rowid','nom','',''); - print '
'.$langs->trans('AliasNameShort').''; + print '
'.$langs->trans('AliasNameShort').''; print $object->name_alias; print "
'.$langs->trans('Address').''; - dol_print_address($object->address,'gmap','thirdparty',$object->id); - print "
'.$langs->trans('Zip').' / '.$langs->trans('Town').''.$object->zip.(($object->zip && $object->town)?' / ':'').$object->town."
'.$langs->trans("Country").''; - if (! empty($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 '
'.$langs->trans('EMail').''.dol_print_email($object->email,0,$object->id,'AC_EMAIL').'
'.$langs->trans("Web").''.dol_print_url($object->url,'_blank').'
'.$langs->trans('Phone').''.dol_print_phone($object->phone,$object->country_code,0,$object->id,'AC_TEL').''.$langs->trans('Fax').''.dol_print_phone($object->fax,$object->country_code,0,$object->id,'AC_FAX').'
'; - print ''; - print ''; - $total = 0; $num = $db->num_rows($resql); + + print '
'.$langs->trans("ProposalsDraft").'
'; + print ''; + print ''; + if ($num > 0) { $i = 0; @@ -246,12 +247,13 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire) $resql = $db->query($sql); if ($resql) { - print '
'.$langs->trans("ProposalsDraft").' '.$num.'
'; - print ''; - print ''; - $total = 0; $num = $db->num_rows($resql); + + print '
'.$langs->trans("DraftOrders").'
'; + print ''; + print ''; + if ($num) { $i = 0; @@ -329,7 +331,11 @@ if (! empty($conf->societe->enabled) && $user->rights->societe->lire) print '
'.$langs->trans("DraftOrders").' '.$num.'
'; print ''; - print ''; + print ''; print ''; print ''; if ($num) diff --git a/htdocs/comm/list.php b/htdocs/comm/list.php index 91f30d30887..1cc0f2fa968 100644 --- a/htdocs/comm/list.php +++ b/htdocs/comm/list.php @@ -193,19 +193,22 @@ if ($result) $moreforfilter=''; if (! empty($conf->categorie->enabled)) { + $moreforfilter.='
'; $moreforfilter.=$langs->trans('Categories'). ': '; $moreforfilter.=$formother->select_categories(2,$search_categ,'search_categ',1); - $moreforfilter.='       '; + $moreforfilter.='
'; } // If the user can view prospects other than his' if ($user->rights->societe->client->voir || $socid) { + $moreforfilter.='
'; $moreforfilter.=$langs->trans('SalesRepresentatives'). ': '; $moreforfilter.=$formother->select_salesrepresentatives($search_sale,'search_sale',$user); + $moreforfilter.='
'; } if ($moreforfilter) { - print '
'; + print '
'; print $moreforfilter; $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook @@ -213,7 +216,7 @@ if ($result) print '
'; } - print '
'.$langs->trans("BoxTitleLastCustomersOrProspects",$max).''; + if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) print $langs->trans("BoxTitleLastCustomersOrProspects",$max); + else if (! empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) print $langs->trans("BoxTitleLastModifiedProspects",$max); + else print $langs->trans("BoxTitleLastModifiedCustomers",$max); + print ''.$langs->trans("DateModificationShort").'
'."\n"; + print '
'; print ''; print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$param,"",$sortfield,$sortorder); @@ -246,7 +249,7 @@ if ($result) print ''; print ''; print '
'; - print $form->select_country($search_country,'search_country'); + print $form->select_country($search_country,'search_country','',0,'maxwidth100'); print ''; diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index f595ad8aec0..7d1539ff0f5 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -265,7 +265,6 @@ if ($result) if ($optioncss != '') print ''; $i = 0; - print ''; $moreforfilter=''; @@ -298,12 +297,13 @@ if ($result) } if (! empty($moreforfilter)) { - print ''; - print ''; + print ''; } + print '
'; + print '
'; print $moreforfilter; - print '
'; + print ''; print_liste_field_titre($langs->trans('Ref'),$_SERVER["PHP_SELF"],'p.ref','',$param,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans('RefCustomer'),$_SERVER["PHP_SELF"],'p.ref_client','',$param,'',$sortfield,$sortorder); diff --git a/htdocs/comm/propal/stats/index.php b/htdocs/comm/propal/stats/index.php index e99c7122a10..5b45020b7e1 100644 --- a/htdocs/comm/propal/stats/index.php +++ b/htdocs/comm/propal/stats/index.php @@ -234,7 +234,7 @@ print '
'; // Show filter box print ''; print ''; - print '
'; + print '
'; print ''; // Company print ''; } else print ''; @@ -403,7 +403,7 @@ if ($socid > 0) array('type' => 'text', 'name' => 'amount_ttc_2', 'label' => $langs->trans("AmountTTC").' 2', 'value' => $amount2, 'size' => '5') ); $langs->load("dict"); - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$objsoc->id.'&remid='.$showconfirminfo['rowid'], $langs->trans('SplitDiscount'), $langs->trans('ConfirmSplitDiscount',price($showconfirminfo['amount_ttc']),$langs->transnoentities("Currency".$conf->currency)), 'confirm_split', $formquestion, 0, 0); + print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&remid='.$showconfirminfo['rowid'], $langs->trans('SplitDiscount'), $langs->trans('ConfirmSplitDiscount',price($showconfirminfo['amount_ttc']),$langs->transnoentities("Currency".$conf->currency)), 'confirm_split', $formquestion, 0, 0); } } else @@ -429,7 +429,7 @@ if ($socid > 0) $sql.= " , ".MAIN_DB_PREFIX."facturedet as fc"; $sql.= " , ".MAIN_DB_PREFIX."societe_remise_except as rc"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."facture as fa ON rc.fk_facture_source = fa.rowid"; - $sql.= " WHERE rc.fk_soc =". $objsoc->id; + $sql.= " WHERE rc.fk_soc =". $object->id; $sql.= " AND rc.fk_facture_line = fc.rowid"; $sql.= " AND fc.fk_facture = f.rowid"; $sql.= " AND rc.fk_user = u.rowid"; @@ -446,7 +446,7 @@ if ($socid > 0) $sql2.= " , ".MAIN_DB_PREFIX."user as u"; $sql2.= " , ".MAIN_DB_PREFIX."societe_remise_except as rc"; $sql2.= " LEFT JOIN ".MAIN_DB_PREFIX."facture as fa ON rc.fk_facture_source = fa.rowid"; - $sql2.= " WHERE rc.fk_soc =". $objsoc->id; + $sql2.= " WHERE rc.fk_soc =". $object->id; $sql2.= " AND rc.fk_facture = f.rowid"; $sql2.= " AND rc.fk_user = u.rowid"; diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index dfe5fab1217..19fd113138a 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -262,8 +262,6 @@ if ($resql) if ($optioncss != '') print ''; print ''; - print '
'.$langs->trans("Filter").'
'.$langs->trans("ThirdParty").''; @@ -262,8 +262,8 @@ print '
'; print '

'; //} -print ''; -print ''; +print '
'; +print ''; print ''; print ''; print ''; @@ -274,13 +274,15 @@ print ''; print ''; $oldyear=0; +$var=true; foreach ($data as $val) { $year = $val['year']; while (! empty($year) && $oldyear > $year+1) { // If we have empty year $oldyear--; - print ''; + $var=!$var; + print ''; print ''; print ''; print ''; @@ -290,7 +292,7 @@ foreach ($data as $val) print ''; print ''; } - print ''; + print ''; print ''; print ''; print ''; diff --git a/htdocs/comm/prospect/list.php b/htdocs/comm/prospect/list.php index f629aafef29..2282b39420e 100644 --- a/htdocs/comm/prospect/list.php +++ b/htdocs/comm/prospect/list.php @@ -359,19 +359,22 @@ if ($resql) if (! empty($conf->categorie->enabled)) { require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php'; + $moreforfilter.='
'; $moreforfilter.=$langs->trans('Categories'). ': '; $moreforfilter.=$formother->select_categories(Categorie::TYPE_CUSTOMER,$search_categ,'search_categ',1); - $moreforfilter.='       '; + $moreforfilter.='
'; } // If the user can view prospects other than his' if ($user->rights->societe->client->voir || $socid) { + $moreforfilter.='
'; $moreforfilter.=$langs->trans('SalesRepresentatives'). ': '; $moreforfilter.=$formother->select_salesrepresentatives($search_sale,'search_sale',$user); + $moreforfilter.='
'; } if ($moreforfilter) { - print '
'; + print '
'; print $moreforfilter; $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook @@ -379,13 +382,13 @@ if ($resql) print '
'; } - print '
'.$langs->trans("Year").''.$langs->trans("NbOfProposals").'%%
0?'&userid='.$userid:'').'">'.$oldyear.'0
0?'&userid='.$userid:'').'">'.$year.''.$val['nb'].''.round($val['nb_diff']).'
'; + print '
'; print ''; print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$param,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Zip"),$_SERVER["PHP_SELF"],"s.zip","",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"s.town","",$param,"",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("State"),$_SERVER["PHP_SELF"],"s.fk_departement","",$param,'align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("StateShort"),$_SERVER["PHP_SELF"],"s.fk_departement","",$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Country"),$_SERVER["PHP_SELF"],"country.code_iso","",$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("ThirdPartyType"),$_SERVER["PHP_SELF"],"typent.code","",$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"s.datec","",$param,'align="center"',$sortfield,$sortorder); @@ -427,13 +430,13 @@ if ($resql) print ''; print ''; print ''; print ''; print ''; // Prospect level diff --git a/htdocs/comm/remise.php b/htdocs/comm/remise.php index ea9e1382d40..0edcdcd0c1d 100644 --- a/htdocs/comm/remise.php +++ b/htdocs/comm/remise.php @@ -52,9 +52,9 @@ if (GETPOST('cancel') && ! empty($backtopage)) if (GETPOST("action") == 'setremise') { - $soc = New Societe($db); - $soc->fetch($_GET["id"]); - $result=$soc->set_remise_client($_POST["remise"],$_POST["note"],$user); + $object = new Societe($db); + $object->fetch($_GET["id"]); + $result=$object->set_remise_client($_POST["remise"],$_POST["note"],$user); if ($result > 0) { @@ -71,7 +71,7 @@ if (GETPOST("action") == 'setremise') } else { - setEventMessage($soc->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } @@ -93,51 +93,50 @@ llxHeader(); if ($socid > 0) { // On recupere les donnees societes par l'objet - $objsoc = new Societe($db); - $objsoc->id=$socid; - $objsoc->fetch($socid); + $object = new Societe($db); + $object->fetch($socid); - $head = societe_prepare_head($objsoc); + $head = societe_prepare_head($object); - print ''; + print ''; print ''; print ''; print ''; dol_fiche_head($head, 'relativediscount', $langs->trans("ThirdParty"),0,'company'); - - print '
'; - print $form->select_country($search_country,'search_country'); + print $form->select_country($search_country,'search_country','',0,'maxwidth100'); print ''; print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT)?'ASC':$conf->global->SOCIETE_SORT_ON_TYPEENT)); print ''; - print ''; + print ''; print '
'; - - // Name - print ''; - print ''; + dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom'); + + print '
'; + + print '
'; + print '
'.$langs->trans('Name').''; - print $form->showrefnav($objsoc,'id','',1,'rowid','nom'); - print '
'; // Remise - print '"; + print '"; print '
'; - print $langs->trans("CustomerRelativeDiscount").''.price2num($objsoc->remise_percent)."%
'; + print $langs->trans("CustomerRelativeDiscount").''.price2num($object->remise_percent)."%
'; print '
'; print load_fiche_titre($langs->trans("NewRelativeDiscount"),'',''); - print ''; + print '
'; // Nouvelle valeur - print ''; + print ''; // Motif/Note - print ''; + print ''; print "
'; - print $langs->trans("NewValue").'%
'; + print $langs->trans("NewValue").'%
'; - print $langs->trans("NoteReason").'
'; + print $langs->trans("NoteReason").'
"; + print '
'; + dol_fiche_end(); print '
'; @@ -160,7 +159,7 @@ if ($socid > 0) $sql = "SELECT rc.rowid, rc.remise_client as remise_percent, rc.note, rc.datec as dc,"; $sql.= " u.login, u.rowid as user_id"; $sql.= " FROM ".MAIN_DB_PREFIX."societe_remise as rc, ".MAIN_DB_PREFIX."user as u"; - $sql.= " WHERE rc.fk_soc =". $objsoc->id; + $sql.= " WHERE rc.fk_soc =". $object->id; $sql.= " AND u.rowid = rc.fk_user_author"; $sql.= " ORDER BY rc.datec DESC"; diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index 957f109268a..9b764ad1c8f 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -36,7 +36,7 @@ $action=GETPOST('action','alpha'); $backtopage=GETPOST('backtopage','alpha'); // Security check -$socid = GETPOST('id','int'); +$socid = GETPOST('id','int')?GETPOST('id','int'):GETPOST('socid','int'); if ($user->societe_id > 0) { $socid = $user->societe_id; @@ -212,36 +212,34 @@ llxHeader('',$langs->trans("GlobalDiscount")); if ($socid > 0) { // On recupere les donnees societes par l'objet - $objsoc = new Societe($db); - $objsoc->id=$socid; - $objsoc->fetch($socid); + $object = new Societe($db); + $object->fetch($socid); /* * Affichage onglets */ - $head = societe_prepare_head($objsoc); + $head = societe_prepare_head($object); - print ''; + print ''; print ''; print ''; print ''; dol_fiche_head($head, 'absolutediscount', $langs->trans("ThirdParty"),0,'company'); - print ''; - - // Name - print ''; - print ''; + dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom'); + + print '
'; + + print '
'; + print '
'.$langs->trans('Name').''; - print $form->showrefnav($objsoc,'id','',1,'rowid','nom'); - print '
'; // Calcul avoirs en cours $remise_all=$remise_user=0; $sql = "SELECT SUM(rc.amount_ht) as amount, rc.fk_user"; $sql.= " FROM ".MAIN_DB_PREFIX."societe_remise_except as rc"; - $sql.= " WHERE rc.fk_soc =". $objsoc->id; + $sql.= " WHERE rc.fk_soc =". $object->id; $sql.= " AND (fk_facture_line IS NULL AND fk_facture IS NULL)"; $sql.= " GROUP BY rc.fk_user"; $resql=$db->query($sql); @@ -256,7 +254,7 @@ if ($socid > 0) dol_print_error($db); } - print ''; + print ''; print ''; print ''; @@ -271,13 +269,15 @@ if ($socid > 0) print ' '.$langs->trans("Currency".$conf->currency).''; print ''; print ''; print ''; print ''; print "
'.$langs->trans("CustomerAbsoluteDiscountAllUsers").'
'.$langs->trans("CustomerAbsoluteDiscountAllUsers").''.$remise_all.' '.$langs->trans("Currency".$conf->currency).' '.$langs->trans("HT").'
'.$langs->trans("CustomerAbsoluteDiscountMy").'
'.$langs->trans("VAT").''; - print $form->load_tva('tva_tx',GETPOST('tva_tx'),$mysoc,$objsoc); + print $form->load_tva('tva_tx',GETPOST('tva_tx'),$mysoc,$object); print '
'.$langs->trans("NoteReason").'
"; + print '
'; + dol_fiche_end(); print '
'; @@ -296,7 +296,7 @@ if ($socid > 0) if ($_GET['action'] == 'remove') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$objsoc->id.'&remid='.$_GET["remid"], $langs->trans('RemoveDiscount'), $langs->trans('ConfirmRemoveDiscount'), 'confirm_remove', '', 0, 1); + print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&remid='.$_GET["remid"], $langs->trans('RemoveDiscount'), $langs->trans('ConfirmRemoveDiscount'), 'confirm_remove', '', 0, 1); } /* @@ -309,7 +309,7 @@ if ($socid > 0) $sql.= " fa.facnumber as ref, fa.type as type"; $sql.= " FROM ".MAIN_DB_PREFIX."user as u, ".MAIN_DB_PREFIX."societe_remise_except as rc"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."facture as fa ON rc.fk_facture_source = fa.rowid"; - $sql.= " WHERE rc.fk_soc =". $objsoc->id; + $sql.= " WHERE rc.fk_soc =". $object->id; $sql.= " AND u.rowid = rc.fk_user"; $sql.= " AND (rc.fk_facture_line IS NULL AND rc.fk_facture IS NULL)"; $sql.= " ORDER BY rc.datec DESC"; @@ -375,9 +375,9 @@ if ($socid > 0) if ($user->rights->societe->creer || $user->rights->facture->creer) { print '
'; - print 'rowid.'">'.img_picto($langs->trans("SplitDiscount"),'split').''; + print 'rowid.'">'.img_picto($langs->trans("SplitDiscount"),'split').''; print '   '; - print 'rowid.'">'.img_delete($langs->trans("RemoveDiscount")).''; + print 'rowid.'">'.img_delete($langs->trans("RemoveDiscount")).''; print ' 
'; - $moreforfilter=''; // If the user can view prospects other than his' @@ -275,15 +273,15 @@ if ($resql) $moreforfilter.=$formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, 1, 'maxwidth300'); $moreforfilter.=''; } - // If the user can view prospects other than his' - if ($user->rights->societe->client->voir || $socid) + // If the user can view other users + if ($user->rights->user->user->lire) { $moreforfilter.='
'; $moreforfilter.=$langs->trans('LinkedToSpecificUsers'). ': '; $moreforfilter.=$form->select_dolusers($search_user, 'search_user', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); $moreforfilter.='
'; } - // If the user can view prospects other than his' + // If the user can view categories or products if ($conf->categorie->enabled && $user->rights->produit->lire) { include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; @@ -295,7 +293,7 @@ if ($resql) } if (! empty($moreforfilter)) { - print '
'; + print '
'; print $moreforfilter; $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook @@ -303,12 +301,13 @@ if ($resql) print '
'; } + print '
'; print ''; print_liste_field_titre($langs->trans('Ref'),$_SERVER["PHP_SELF"],'c.ref','',$param,'width="25%"',$sortfield,$sortorder); print_liste_field_titre($langs->trans('RefCustomerOrder'),$_SERVER["PHP_SELF"],'c.ref_client','',$param,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans('Company'),$_SERVER["PHP_SELF"],'s.nom','',$param,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans('OrderDate'),$_SERVER["PHP_SELF"],'c.date_commande','',$param, 'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans('DeliveryDate'),$_SERVER["PHP_SELF"],'c.date_livraison','',$param, 'align="center"',$sortfield,$sortorder); + if (empty($conf->global->ORDER_DISABLE_DELIVERY_DATE)) print_liste_field_titre($langs->trans('DeliveryDate'),$_SERVER["PHP_SELF"],'c.date_livraison','',$param, 'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans('AmountHT'),$_SERVER["PHP_SELF"],'c.total_ht','',$param, 'align="right"',$sortfield,$sortorder); $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook @@ -331,11 +330,15 @@ if ($resql) if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print ''; print ''; $formother->select_year($orderyear?$orderyear:-1,'orderyear',1, 20, 5); - print ''; + if (empty($conf->global->ORDER_DISABLE_DELIVERY_DATE)) + { + print ''; + } print ''; diff --git a/htdocs/commande/stats/index.php b/htdocs/commande/stats/index.php index c4d48d8f72e..04cfad1732d 100644 --- a/htdocs/commande/stats/index.php +++ b/htdocs/commande/stats/index.php @@ -250,7 +250,7 @@ print '
'; // Show filter box print ''; print ''; - print '
'; - if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print ''; - print ''; - $formother->select_year($deliveryyear?$deliveryyear:-1,'deliveryyear',1, 20, 5); print ''; + if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print ''; + print ''; + $formother->select_year($deliveryyear?$deliveryyear:-1,'deliveryyear',1, 20, 5); + print ''; print ''; print '
'; + print '
'; print ''; // Company print '
'.$langs->trans("Filter").'
'.$langs->trans("ThirdParty").''; @@ -275,8 +275,8 @@ print '
'; print '

'; //} -print ''; -print ''; +print '
'; +print ''; print ''; print ''; print ''; @@ -287,13 +287,15 @@ print ''; print ''; $oldyear=0; +$var=true; foreach ($data as $val) { $year = $val['year']; while (! empty($year) && $oldyear > $year+1) { // If we have empty year $oldyear--; - print ''; + $var=!$var; + print ''; print ''; print ''; @@ -305,7 +307,8 @@ foreach ($data as $val) print ''; } - print ''; + $var=!$var; + print ''; print ''; print ''; print ''; diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php index deed3b1b97a..9a04a431ac6 100644 --- a/htdocs/compta/bank/account.php +++ b/htdocs/compta/bank/account.php @@ -952,7 +952,7 @@ if ($id > 0 || ! empty($ref)) if ($sep > 0) print ' '; // If we had at least one line in future else print $langs->trans("CurrentBalance"); print ' '.$object->currency_code.''; - print ''; + print ''; print ''; print ''; } else { diff --git a/htdocs/compta/bank/search.php b/htdocs/compta/bank/search.php index 80befe3d433..b585f48565f 100644 --- a/htdocs/compta/bank/search.php +++ b/htdocs/compta/bank/search.php @@ -186,12 +186,12 @@ if ($resql) if ($moreforfilter) { - print '
'; + print '
'; print $moreforfilter; print '
'."\n"; } - print '
'.$langs->trans("Year").''.$langs->trans("NbOfOrders").'%%
0?'&userid='.$userid:'').'">'.$oldyear.'0
0?'&userid='.$userid:'').'">'.$year.''.$val['nb'].''.round($val['nb_diff']).''.price($solde, 0, $langs, 0, 0, -1, $object->currency_code).''.price($total, 0, $langs, 0, 0, -1, $object->currency_code).' 
'."\n"; + print '
'."\n"; print ''; print_liste_field_titre($langs->trans('Ref'),$_SERVER['PHP_SELF'],'b.rowid','',$param,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans('DateOperationShort'),$_SERVER['PHP_SELF'],'b.dateo','',$param,'align="center"',$sortfield,$sortorder); diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 5c19e054fd0..c736d4cd003 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -2973,16 +2973,16 @@ else if ($id > 0 || ! empty($ref)) print '
'; - print ''; + print '
'; // List of payments already done print ''; - print ''; - print ''; + print ''; + print ''; if (! empty($conf->banque->enabled)) - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; print ''; $var = true; @@ -3033,7 +3033,7 @@ else if ($id > 0 || ! empty($ref)) $i ++; } } else { - print ''; + print ''; } // } $db->free($result); diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index b507f5284dd..e4993eacb88 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -275,7 +275,6 @@ if ($resql) $i = 0; print ''."\n"; - print '
' . ($object->type == Facture::TYPE_CREDIT_NOTE ? $langs->trans("PaymentsBack") : $langs->trans('Payments')) . '' . $langs->trans('Type') . '' . ($object->type == Facture::TYPE_CREDIT_NOTE ? $langs->trans("PaymentsBack") : $langs->trans('Payments')) . '' . $langs->trans('Type') . '' . $langs->trans('BankAccount') . '' . $langs->trans('Amount') . ' ' . $langs->trans('BankAccount') . '' . $langs->trans('Amount') . ' 
' . $langs->trans("None") . '
' . $langs->trans("None") . '
'; // If the user can view prospects other than his' $moreforfilter=''; @@ -308,12 +307,16 @@ if ($resql) if ($moreforfilter) { - print ''; - print ''; + $parameters=array(); + $reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + print ''; } + print '
'; + print '
'; print $moreforfilter; - print '
'; + print ''; print_liste_field_titre($langs->trans('Ref'),$_SERVER['PHP_SELF'],'f.facnumber','',$param,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans('RefCustomer'),$_SERVER["PHP_SELF"],'f.ref_client','',$param,'',$sortfield,$sortorder); diff --git a/htdocs/compta/facture/mergepdftool.php b/htdocs/compta/facture/mergepdftool.php index 72276b77069..9745f4b1b01 100644 --- a/htdocs/compta/facture/mergepdftool.php +++ b/htdocs/compta/facture/mergepdftool.php @@ -49,7 +49,7 @@ $builddoc_generatebutton=GETPOST('builddoc_generatebutton'); $month = GETPOST("month","int"); $year = GETPOST("year","int"); $filter = GETPOST("filtre"); -if (GETPOST('button_search')) +if (GETPOST('button_search') || GETPOST('button_search.x') || GETPOST('button_search_x')) { $filter=GETPOST('filtre',2); //if ($filter != 'payed:0') $option=''; @@ -616,32 +616,38 @@ if ($resql) } $i = 0; - print '
'; // If the user can view prospects other than his' $moreforfilter=''; if ($user->rights->societe->client->voir || $socid) { $langs->load("commercial"); + $moreforfilter.='
'; $moreforfilter.=$langs->trans('ThirdPartiesOfSaleRepresentative'). ': '; $moreforfilter.=$formother->select_salesrepresentatives($search_sale,'search_sale',$user); - $moreforfilter.='       '; + $moreforfilter.='
'; } // If the user can view prospects other than his' if ($user->rights->societe->client->voir || $socid) { + $moreforfilter.='
'; $moreforfilter.=$langs->trans('LinkedToSpecificUsers'). ': '; $moreforfilter.=$form->select_dolusers($search_user,'search_user',1); + $moreforfilter.='
'; } - if ($moreforfilter) + if (! empty($moreforfilter)) { - print ''; - print ''; + $parameters=array(); + $reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + print ''; } - print ''; + print '
'; + print '
'; print $moreforfilter; - print '
'; + + print ''; print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"f.facnumber","",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans('RefCustomer'),$_SERVER["PHP_SELF"],'f.ref_client','',$param,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"f.datef","",$param,'align="center"',$sortfield,$sortorder); diff --git a/htdocs/compta/facture/stats/index.php b/htdocs/compta/facture/stats/index.php index f61e92687f6..2b7e17d9369 100644 --- a/htdocs/compta/facture/stats/index.php +++ b/htdocs/compta/facture/stats/index.php @@ -234,7 +234,7 @@ print '
'; // Show filter box print ''; print ''; - print '
'; + print '
'; print ''; // Company print ''; + print_liste_field_titre(''); } print_liste_field_titre( $langs->trans("AmountTTC"), diff --git a/htdocs/compta/stats/casoc.php b/htdocs/compta/stats/casoc.php index 7b9cfdd7913..dade07fd0e3 100644 --- a/htdocs/compta/stats/casoc.php +++ b/htdocs/compta/stats/casoc.php @@ -350,7 +350,7 @@ if ($modecompta == 'CREANCES-DETTES') { $sortorder ); } else { - print ''; + print_liste_field_titre(''); } print_liste_field_titre( $langs->trans("AmountTTC"), diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index 2db5523c5bd..63bc0f2b04d 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -4,10 +4,10 @@ * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2007 Franky Van Liedekerke - * Copyright (C) 2013 Florian Henry + * Copyright (C) 2013 Florian Henry * Copyright (C) 2013 Alexandre Spangaro * Copyright (C) 2014 Juanjo Menent - * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2015 Jean-François Ferry * * 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 @@ -773,11 +773,14 @@ else print '
'.$langs->trans("Filter").'
'.$langs->trans("ThirdParty").''; @@ -259,8 +259,8 @@ print '
'; print '

'; //} -print ''; -print ''; +print '
'; +print ''; print ''; print ''; print ''; @@ -271,13 +271,15 @@ print ''; print ''; $oldyear=0; +$var=true; foreach ($data as $val) { $year = $val['year']; while ($year && $oldyear > $year+1) { // If we have empty year $oldyear--; - print ''; + $var=!$var; + print ''; print ''; print ''; print ''; @@ -287,7 +289,8 @@ foreach ($data as $val) print ''; print ''; } - print ''; + $var=!$var; + print ''; print ''; print ''; print ''; diff --git a/htdocs/compta/paiement/cheque/list.php b/htdocs/compta/paiement/cheque/list.php index d44aef51dce..c322863efc1 100644 --- a/htdocs/compta/paiement/cheque/list.php +++ b/htdocs/compta/paiement/cheque/list.php @@ -117,7 +117,7 @@ if ($resql) print_barre_liste($langs->trans("MenuChequeDeposits"), $page, $_SERVER["PHP_SELF"], $params, $sortfield, $sortorder, '', $num); print ''; - print '
'.$langs->trans("Year").''.$langs->trans("NumberOfBills").'%%
0?'&userid='.$userid:'').'">'.$oldyear.'0
0?'&userid='.$userid:'').'">'.$year.''.$val['nb'].''.round($val['nb_diff']).'
'; + print '
'; print ''; print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"bc.number","",$params,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"dp","",$params,'align="center"',$sortfield,$sortorder); @@ -148,42 +148,52 @@ if ($resql) print ''; print "\n"; - $var=true; - while ($i < min($num,$limit)) - { - $objp = $db->fetch_object($resql); - $var=!$var; - print ""; - - // Num ref cheque - print ''; - - // Date - print ''; // TODO Use date hour - - // Bank - print ''; - - // Number of cheques - print ''; - - // Amount - print ''; - - // Statut - print '\n"; - $i++; - } + if ($num > 0) + { + $var=true; + while ($i < min($num,$limit)) + { + $objp = $db->fetch_object($resql); + $var=!$var; + print ""; + + // Num ref cheque + print ''; + + // Date + print ''; // TODO Use date hour + + // Bank + print ''; + + // Number of cheques + print ''; + + // Amount + print ''; + + // Statut + print '\n"; + $i++; + } + } + else + { + $var=!$var; + print ""; + print '"; + print ''; + } print "
'; - $checkdepositstatic->id=$objp->rowid; - $checkdepositstatic->ref=($objp->ref?$objp->ref:$objp->rowid); - $checkdepositstatic->statut=$objp->statut; - print $checkdepositstatic->getNomUrl(1); - print ''.dol_print_date($db->jdate($objp->dp),'day').''; - if ($objp->bid) print ''.img_object($langs->trans("ShowAccount"),'account').' '.$objp->label.''; - else print ' '; - print ''.$objp->nbcheque.''.price($objp->amount).''; - print $checkdepositstatic->LibStatut($objp->statut,5); - print "
'; + $checkdepositstatic->id=$objp->rowid; + $checkdepositstatic->ref=($objp->ref?$objp->ref:$objp->rowid); + $checkdepositstatic->statut=$objp->statut; + print $checkdepositstatic->getNomUrl(1); + print ''.dol_print_date($db->jdate($objp->dp),'day').''; + if ($objp->bid) print ''.img_object($langs->trans("ShowAccount"),'account').' '.$objp->label.''; + else print ' '; + print ''.$objp->nbcheque.''.price($objp->amount).''; + print $checkdepositstatic->LibStatut($objp->statut,5); + print "
'.$langs->trans("None")."
"; print "\n"; } @@ -192,6 +202,6 @@ else dol_print_error($db); } -$db->close(); llxFooter(); +$db->close(); diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php index 45c9d0b526b..35d0f838ff9 100644 --- a/htdocs/compta/paiement/class/paiement.class.php +++ b/htdocs/compta/paiement/class/paiement.class.php @@ -906,7 +906,7 @@ class Paiement extends CommonObject if ($withpicto) $result.=($link.img_object($langs->trans("ShowPayment"), 'payment', 'class="classfortooltip"').$linkend); if ($withpicto && $withpicto != 2) $result.=' '; - if ($withpicto != 2) $result.=$link.$this->ref.$linkend; + if ($withpicto != 2) $result.=$link.($this->ref?$this->ref:$this->id).$linkend; return $result; } diff --git a/htdocs/compta/paiement/list.php b/htdocs/compta/paiement/list.php index 8231f607ef7..6e3d31364ce 100644 --- a/htdocs/compta/paiement/list.php +++ b/htdocs/compta/paiement/list.php @@ -305,6 +305,5 @@ else dol_print_error($db); } -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/stats/cabyuser.php b/htdocs/compta/stats/cabyuser.php index 385ac1f140c..cb8151cf33c 100644 --- a/htdocs/compta/stats/cabyuser.php +++ b/htdocs/compta/stats/cabyuser.php @@ -280,7 +280,7 @@ if ($modecompta == 'CREANCES-DETTES') { $sortorder ); } else { - print '
'; - // Ref - print ''; - + // Ref/ID + if (! empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) + { + print ''; + } + // Lastname print ''; print ''; @@ -1040,23 +1043,32 @@ else } - print '
'.$langs->trans("Ref").''; - print $object->ref; - print '
'.$langs->trans("ID").''; + print $object->ref; + print '
lastname).'" autofocus="autofocus">
'; - $linkback = ''.$langs->trans("BackToList").''; + + dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', ''); + + + print '
'; + print '
'; + + print '
'; + print '
'; + // Ref - print ''; // Name print ''; print ''; - + */ + // Company if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) { - print ''; } - + */ + print ''; // Civility - print ''; // Role - print ''; + print ''; // Address + /* print ''; @@ -1112,68 +1127,72 @@ else // State if (empty($conf->global->SOCIETE_DISABLE_STATE)) { - print ''; - } + print ''; + }*/ // Phone + /* print ''; print ''; print ''; print ''; - + */ + // Email - print ''; + //print ''; if (! empty($conf->mailing->enabled)) { $langs->load("mails"); - print ''; - print ''; + print ''; + print ''; } - else - { - print ''; - } - print ''; // Instant message and no email - print ''; + print ''; if (!empty($conf->mailing->enabled)) { - print ''; + print ''; } - else - { - print ''; - } - print ''; // Skype if (! empty($conf->skype->enabled)) { - print ''; + print ''; } - print ''; // Note Public - print ''; // Note Private - print ''; + print ''; + */ + + print '
'.$langs->trans("Ref").''; + /*print '
'.$langs->trans("Ref").''; print $form->showrefnav($object, 'id', $linkback); print '
'.$langs->trans("Lastname").' / '.$langs->trans("Label").''.$object->lastname.''.$langs->trans("Firstname").''.$object->firstname.'
'.$langs->trans("ThirdParty").''; + print '
'.$langs->trans("ThirdParty").''; if ($object->socid > 0) { $objsoc->fetch($object->socid); @@ -1070,6 +1082,7 @@ else } // Photo + /* if ($object->photo) { print ''; @@ -1080,18 +1093,20 @@ else print ' '; print '
'.$langs->trans("UserTitle").''; + print '
'.$langs->trans("UserTitle").''; print $object->getCivilityLabel(); print '
'.$langs->trans("PostOrFunction").''.$object->poste.'
'.$langs->trans("PostOrFunction").''.$object->poste.'
'.$langs->trans("Address").''; dol_print_address($object->address,'gmap','contact',$object->id); print '
'.$langs->trans('State').''.$object->state.'
'.$langs->trans('State').''.$object->state.'
'.$langs->trans("PhonePro").''.dol_print_phone($object->phone_pro,$object->country_code,$object->id,$object->socid,'AC_TEL').''.$langs->trans("PhonePerso").''.dol_print_phone($object->phone_perso,$object->country_code,$object->id,$object->socid,'AC_TEL').'
'.$langs->trans("PhoneMobile").''.dol_print_phone($object->phone_mobile,$object->country_code,$object->id,$object->socid,'AC_TEL').''.$langs->trans("Fax").''.dol_print_phone($object->fax,$object->country_code,$object->id,$object->socid,'AC_FAX').'
'.$langs->trans("EMail").''.dol_print_email($object->email,$object->id,$object->socid,'AC_EMAIL').'
'.$langs->trans("EMail").''.dol_print_email($object->email,$object->id,$object->socid,'AC_EMAIL').'
'.$langs->trans("NbOfEMailingsSend").''.$object->getNbOfEMailings().'
'.$langs->trans("NbOfEMailingsSend").''.$object->getNbOfEMailings().'
 
'.$langs->trans("IM").''.$object->jabberid.'
'.$langs->trans("IM").''.$object->jabberid.'
'.$langs->trans("No_Email").''.yn($object->no_email).'
'.$langs->trans("No_Email").''.yn($object->no_email).'
 
'.$langs->trans("Skype").''.dol_print_skype($object->skype,0,$object->fk_soc,1).'
'.$langs->trans("Skype").''.dol_print_skype($object->skype,0,$object->fk_soc,1).'
'.$langs->trans("ContactVisibility").''; + print '
'.$langs->trans("ContactVisibility").''; print $object->LibPubPriv($object->priv); print '
'.$langs->trans("NotePublic").''; + /* + print '
'.$langs->trans("NotePublic").''; print nl2br($object->note_public); print '
'.$langs->trans("NotePrivate").''; + print '
'.$langs->trans("NotePrivate").''; print nl2br($object->note_private); - - // Statut - print '
'.$langs->trans("Status").'
'; + + print ''; + print '
'; + + print '
'; + print ''; + + // Statut + /*print ''; print ''; print ''."\n"; - + */ + // Categories if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire)) { print ''; @@ -1240,7 +1259,10 @@ else print ''; print "
'.$langs->trans("Status").''; print $object->getLibStatut(4); print '
' . $langs->trans( "Categories" ) . '
"; - + + print '
'; + print '
'; + print dol_fiche_end(); // Barre d'actions diff --git a/htdocs/contact/info.php b/htdocs/contact/info.php index 3ad4f0779af..0250691e88d 100644 --- a/htdocs/contact/info.php +++ b/htdocs/contact/info.php @@ -32,36 +32,50 @@ $langs->load("companies"); // Security check -$contactid = GETPOST("id",'int'); +$id = GETPOST("id",'int'); if ($user->societe_id) $socid=$user->societe_id; -$result = restrictedArea($user, 'contact', $contactid, 'socpeople&societe'); +$result = restrictedArea($user, 'contact', $id, 'socpeople&societe'); -$contact = new Contact($db); +$object = new Contact($db); /* * View */ + +$form=new Form($db); + $title = (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses")); llxHeader('',$title,'EN:Module_Third_Parties|FR:Module_Tiers|ES:Módulo_Empresas'); -if ($contactid > 0) +if ($id > 0) { - $result = $contact->fetch($contactid, $user); + $result = $object->fetch($id, $user); - $contact->info($contactid); + $object->info($id); - $head = contact_prepare_head($contact); + $head = contact_prepare_head($object); dol_fiche_head($head, 'info', $title, 0, 'contact'); - // TODO Put here ref of card + $linkback = ''.$langs->trans("BackToList").''; - dol_print_object_info($contact); + dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', ''); + + print '
'; + + print '
'; + + print '
'; + + dol_print_object_info($object); + + print '
'; + dol_fiche_end(); } diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index 300a06acca6..4082ebbae80 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -276,20 +276,6 @@ if ($result) print ''; print ''; - if (! empty($conf->categorie->enabled)) - { - require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php'; - $moreforfilter.=$langs->trans('Categories'). ': '; - $moreforfilter.=$formother->select_categories(Categorie::TYPE_CONTACT,$search_categ,'search_categ',1); - $moreforfilter.='       '; - } - if ($moreforfilter) - { - print '
'; - print $moreforfilter; - print '
'; - } - if ($sall) { print $langs->trans("Filter")." (".$langs->trans("Lastname").", ".$langs->trans("Firstname").", ".$langs->trans("ThirdParty")." ".$langs->trans("or")." ".$langs->trans("EMail")."): ".$sall; @@ -298,7 +284,23 @@ if ($result) { print $langs->trans("Filter")." (".$langs->trans("Lastname").", ".$langs->trans("Firstname")."): ".$search_firstlast_only; } - print ''; + + if (! empty($conf->categorie->enabled)) + { + require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php'; + $moreforfilter.='
'; + $moreforfilter.=$langs->trans('Categories'). ': '; + $moreforfilter.=$formother->select_categories(Categorie::TYPE_CONTACT,$search_categ,'search_categ',1); + $moreforfilter.='
'; + } + if ($moreforfilter) + { + print '
'; + print $moreforfilter; + print '
'; + } + + print '
'; // Ligne des titres print ''; diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 5615eaf76a4..f7363984fb8 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -1407,26 +1407,19 @@ else print '\n"; - print ''; - // Name - Position - print ''; - - // Address / Phone - print ''; - - // Email - print ''; - - // Status - print ''; - - // Add to agenda - if (! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create) - { - $colspan++; - print ''; - } - - // Edit - print ''; - - print ""; - - $sql = "SELECT p.rowid, p.lastname, p.firstname, p.fk_pays as country_id, p.civility, p.poste, p.phone as phone_pro, p.phone_mobile, p.phone_perso, p.fax, p.email, p.skype, p.statut "; $sql .= ", p.civility as civility_id, p.address, p.zip, p.town"; $sql .= " FROM ".MAIN_DB_PREFIX."socpeople as p"; @@ -681,18 +647,50 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') $num = $db->num_rows($result); $var=true; - if ($num) + if ($num || (GETPOST('button_search') || GETPOST('button_search.x') || GETPOST('button_search_x'))) { + print ''; + // Name - Position + print ''; + + // Address / Phone + print ''; + + // Email + print ''; + + // Status + print ''; + + // Add to agenda + if (! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create) + { + $colspan++; + print ''; + } + + // Edit + print ''; + + print ""; + $i=0; while ($i < $num) { $obj = $db->fetch_object($result); $var = !$var; - print ""; - - print '"; + + print ''; - $country_code = getCountry($obj->country_id, 'all'); - // Address and phone print ''; // Status diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 2f49b37f716..aa804cf1255 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -1516,7 +1516,7 @@ function dol_add_file_process($upload_dir, $allowoverwrite=0, $donotupdatesessio * @param int $donotdeletefile 1=Do not delete physically file * @return void */ -function dol_remove_file_process($filenb,$donotupdatesession=0,$donotdeletefile=0) +function dol_remove_file_process($filenb,$donotupdatesession=0,$donotdeletefile=1) { global $db,$user,$conf,$langs,$_FILES; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 81f14683383..4a39269c23e 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -840,6 +840,58 @@ function dol_get_fiche_end($notab=0) else return ''; } +/** + * Show tab footer of a card + * + * @param object $object Object to show + * @param string $paramid Name of parameter to use to name the id into the URL link + * @param string $morehtml More html content to output just before the nav bar + * @param int $shownav Show Condition (navigation is shown if value is 1) + * @param string $fieldid Nom du champ en base a utiliser pour select next et previous (we make the select max and min on this field) + * @param string $fieldref Nom du champ objet ref (object->ref) a utiliser pour select next et previous + * @param string $morehtmlref More html to show after ref + * @param string $moreparam More param to add in nav link url. + * @param int $nodbprefix Do not include DB prefix to forge table name + * @param string $morehtmlleft More html code to show before ref + * @param string $morehtmlright More html code to show before navigation arrows + * @return void + */ +function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='rowid', $fieldref='ref', $morehtmlref='', $moreparam='', $nodbprefix=0, $morehtmlleft='', $morehtmlright='') +{ + global $conf, $form, $user, $langs; + + //$showlogo=$object->logo; + $showlogo=1; + $showbarcode=empty($conf->barcode->enabled)?0:($object->barcode?1:0); + if (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->barcode->lire_advance)) $showbarcode=0; + $modulepart='societe'; + if ($object->element == 'contact') $modulepart='contact'; + if ($object->element == 'member') $modulepart='memberphoto'; + if ($object->element == 'user') $modulepart='userphoto'; + + print '
'; + if ($showlogo) $morehtmlleft.='
'.$form->showphoto($modulepart,$object,0,0,0,'photoref').'
'; + if ($showbarcode) $morehtmlleft.='
'.$form->showbarcode($object).'
'; + if ($object->element == 'societe' && ! empty($conf->use_javascript_ajax) && $user->rights->societe->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { + $morehtmlright.=ajax_object_onoff($object, 'status', 'status', 'InActivity', 'ActivityCeased'); + } else { + $morehtmlright.=$object->getLibStatut(2); + } + if (! empty($object->name_nalias)) $morehtmlref.='
'.$object->name_alias.'
'; + $morehtmlref.='
'; + $morehtmlref.=$object->getBannerAddress('refaddress',$object); + $morehtmlref.='
'; + if (! empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && in_array($object->element, array('societe', 'contact', 'member'))) + { + $morehtmlref.='
'; + $morehtmlref.=$langs->trans("TechnicalID").': '.$object->id; + $morehtmlref.='
'; + } + print $form->showrefnav($object, $paramid, $morehtml, $shownav, $fieldid, $fieldref, $morehtmlref, $moreparam, $nodbprefix, $morehtmlleft, $morehtmlright); + print '
'; + print '
'; +} + /** * Show a string with the label tag dedicated to the HTML edit field. * @@ -915,7 +967,7 @@ function dol_format_address($object,$withcountry=0,$sep="\n",$outputlangs='') else if (in_array($object->country_code,array('ES','TR'))) // ES: title firstname name \n address lines \n zip town \n state \n country { $ret .= ($ret ? $sep : '' ).$object->zip; - $ret .= ($object->town?' '.$object->town:''); + $ret .= ($object->town?(($object->zip?' ':'').$object->town):''); if ($object->state && in_array($object->country_code,$countriesusingstate)) { $ret.="\n".$object->state; @@ -924,11 +976,11 @@ function dol_format_address($object,$withcountry=0,$sep="\n",$outputlangs='') else // Other: title firstname name \n address lines \n zip town \n country { - $ret .= ($ret ? $sep : '' ).$object->zip; - $ret .= ($object->town?' '.$object->town:''); + $ret .= $object->zip ? (($ret ? $sep : '' ).$object->zip) : ''; + $ret .= ($object->town?(($object->zip?' ':$sep).$object->town):''); if ($object->state && in_array($object->country_code,$countriesusingstate)) { - $ret.=", ".$object->state; + $ret.=($ret?", ":'').$object->state; } } if (! is_object($outputlangs)) $outputlangs=$langs; @@ -1315,20 +1367,25 @@ function dol_print_size($size,$shortvalue=0,$shortunit=0) * @param string $url Url to show * @param string $target Target for link * @param int $max Max number of characters to show + * @param int $withpicto With picto * @return string HTML Link */ -function dol_print_url($url,$target='_blank',$max=32) +function dol_print_url($url,$target='_blank',$max=32,$withpicto=0) { + global $langs; + if (empty($url)) return ''; $link=''; + $link.='"'; + if ($target) $link.=' target="'.$target.'"'; + $link.='>'; if (! preg_match('/^http/i',$url)) $link.='http://'; $link.=dol_trunc($url,$max); $link.=''; - return $link; + return '
'.($withpicto?img_picto($langs->trans("Url"), 'object_globe.png').' ':'').$link.'
'; } /** @@ -1435,12 +1492,13 @@ function dol_print_skype($skype,$cid=0,$socid=0,$addlink=0,$max=64) * @param string $country Country code to use for formatting * @param int $cid Id of contact if known * @param int $socid Id of third party if known - * @param string $addlink ''=no link to create action, 'AC_TEL'=add link to clicktodial (if module enabled) and add link to create event (if conf->global->AGENDA_ADDACTIONFORPHONE set) + * @param string $addlink ''=no link to create action, 'AC_TEL'=add link to clicktodial (if module enabled) and add link to create event (if conf->global->AGENDA_ADDACTIONFORPHONE set) * @param string $separ Separation between numbers for a better visibility example : xx.xx.xx.xx.xx * @param string $withpicto Show picto + * @param string $titlealt Text to show on alt * @return string Formated phone number */ -function dol_print_phone($phone,$country='',$cid=0,$socid=0,$addlink='',$separ=" ",$withpicto='') +function dol_print_phone($phone,$country='',$cid=0,$socid=0,$addlink='',$separ=" ",$withpicto='',$titlealt='') { global $conf,$user,$langs,$mysoc; @@ -1520,7 +1578,11 @@ function dol_print_phone($phone,$country='',$cid=0,$socid=0,$addlink='',$separ=" } } - return '
'.($withpicto?img_picto(($withpicto=='fax'?$langs->trans("Fax"):$langs->trans("Phone")), 'object_'.($withpicto=='fax'?'phoning_fax':'phoning').'.png').' ':'').$newphone.'
'; + if (empty($titlealt)) + { + $titlealt=($withpicto=='fax'?$langs->trans("Fax"):$langs->trans("Phone")); + } + return '
'.($withpicto?img_picto($titlealt, 'object_'.($withpicto=='fax'?'phoning_fax':'phoning').'.png').' ':'').$newphone.'
'; } /** @@ -1591,27 +1653,33 @@ function dol_user_country() /** * Format address string * - * @param string $address Address - * @param int $htmlid Html ID (for example 'gmap') - * @param int $mode thirdparty|contact|member|other - * @param int $id Id of object - * @return void + * @param string $address Address + * @param int $htmlid Html ID (for example 'gmap') + * @param int $mode thirdparty|contact|member|other + * @param int $id Id of object + * @param int $noprint No output. Result is the function return + * @return string|void Nothing if noprint is 0, formatted address if noprint is 1 * @see dol_format_address */ -function dol_print_address($address, $htmlid, $mode, $id) +function dol_print_address($address, $htmlid, $mode, $id, $noprint=0) { global $conf, $user, $langs, $hookmanager; + $out = ''; + if ($address) { if ($hookmanager) { $parameters = array('element' => $mode, 'id' => $id); $reshook = $hookmanager->executeHooks('printAddress', $parameters, $address); - print $hookmanager->resPrint; + $out.=$hookmanager->resPrint; } - if (empty($reshook)) { - print nl2br($address); + if (empty($reshook)) + { + $out.=nl2br($address); $showgmap=$showomap=0; + + // TODO Add a hook here if ($mode=='thirdparty' && ! empty($conf->google->enabled) && ! empty($conf->global->GOOGLE_ENABLE_GMAPS)) $showgmap=1; if ($mode=='contact' && ! empty($conf->google->enabled) && ! empty($conf->global->GOOGLE_ENABLE_GMAPS_CONTACTS)) $showgmap=1; if ($mode=='member' && ! empty($conf->google->enabled) && ! empty($conf->global->GOOGLE_ENABLE_GMAPS_MEMBERS)) $showgmap=1; @@ -1619,19 +1687,20 @@ function dol_print_address($address, $htmlid, $mode, $id) if ($mode=='contact' && ! empty($conf->openstreetmap->enabled) && ! empty($conf->global->OPENSTREETMAP_ENABLE_MAPS_CONTACTS)) $showomap=1; if ($mode=='member' && ! empty($conf->openstreetmap->enabled) && ! empty($conf->global->OPENSTREETMAP_ENABLE_MAPS_MEMBERS)) $showomap=1; - // TODO Add a hook here if ($showgmap) { $url=dol_buildpath('/google/gmaps.php?mode='.$mode.'&id='.$id,1); - print ' '; + $out.=' '; } if ($showomap) { $url=dol_buildpath('/openstreetmap/maps.php?mode='.$mode.'&id='.$id,1); - print ' '; + $out.=' '; } } } + if ($noprint) return $out; + else print $out; } @@ -2669,7 +2738,8 @@ function getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $m $sortorder=strtoupper($sortorder); $out=''; - + $sortimg=''; + $tag='th'; if ($thead==2) $tag='div'; @@ -2678,25 +2748,33 @@ function getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $m if ($field && ($sortfield == $field || $sortfield == preg_replace("/^[^\.]+\./","",$field))) $out.= '<'.$tag.' class="'.$prefix.'liste_titre_sel" '. $moreattrib.'>'; else $out.= '<'.$tag.' class="'.$prefix.'liste_titre" '. $moreattrib.'>'; - if (! empty($conf->dol_optimize_smallscreen) && empty($thead) && $field) // If this is a sort field + if (empty($thead) && $field) // If this is a sort field { $options=preg_replace('/sortfield=([a-zA-Z0-9,\s\.]+)/i','',$moreparam); $options=preg_replace('/sortorder=([a-zA-Z0-9,\s\.]+)/i','',$options); $options=preg_replace('/&+/i','&',$options); if (! preg_match('/^&/',$options)) $options='&'.$options; - if ($sortorder == 'DESC' ) $out.= ''; - if ($sortorder == 'ASC' ) $out.= ''; + if ($field != $sortfield) + { + if ($sortorder == 'DESC') $out.= ''; + if ($sortorder == 'ASC' || ! $sortorder) $out.= ''; + } + else + { + if ($sortorder == 'DESC' || ! $sortorder) $out.= ''; + if ($sortorder == 'ASC') $out.= ''; + } } $out.=$name; - if (! empty($conf->dol_optimize_smallscreen) && empty($thead) && $field) // If this is a sort field + if (empty($thead) && $field) // If this is a sort field { $out.=''; } - if (empty($conf->dol_optimize_smallscreen) && empty($thead) && $field) // If this is a sort field + if (empty($thead) && $field) // If this is a sort field { $options=preg_replace('/sortfield=([a-zA-Z0-9,\s\.]+)/i','',$moreparam); $options=preg_replace('/sortorder=([a-zA-Z0-9,\s\.]+)/i','',$options); @@ -2704,27 +2782,33 @@ function getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $m if (! preg_match('/^&/',$options)) $options='&'.$options; //print " "; - $out.= ''; + $sortimg.= ''; + $sortimg.= ''; if (! $sortorder || $field != $sortfield) { - $out.= ''.img_down("A-Z",0).''; - $out.= ''.img_up("Z-A",0).''; + //$out.= ''.img_down("A-Z",0).''; + //$out.= ''.img_up("Z-A",0).''; } else { if ($sortorder == 'DESC' ) { - $out.= ''.img_down("A-Z",0).''; - $out.= ''.img_up("Z-A",1).''; + //$out.= ''.img_down("A-Z",0).''; + //$out.= ''.img_up("Z-A",1).''; + $sortimg.= img_up("Z-A",0); } if ($sortorder == 'ASC' ) { - $out.= ''.img_down("A-Z",1).''; - $out.= ''.img_up("Z-A",0).''; + //$out.= ''.img_down("A-Z",1).''; + //$out.= ''.img_up("Z-A",0).''; + $sortimg.= img_down("A-Z",0); } } - $out.= ''; + $sortimg.= ''; } + + $out.=$sortimg; + $out.=''; return $out; diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index 89d658fa01a..3fb5a87e433 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -896,16 +896,6 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks= if (strcmp($statut, '') && $statut >= 0) $title=$langs->trans("Projects").' '.$langs->trans($projectstatic->statuts_long[$statut]); print '
'; if ($user->rights->contrat->creer && count($arrayothercontracts) && ($object->statut >= 0)) { - print ''; + print ''; print img_picto($langs->trans("MoveToAnotherContract"),'uparrow'); print ''; } - else { - print ' '; - } if ($user->rights->contrat->creer && ($object->statut >= 0)) { - print ''; + print ''; print img_edit(); print ''; } - else { - print ' '; - } if ( $user->rights->contrat->creer && ($object->statut >= 0)) { - print ' '; - print ''; + print ''; print img_delete(); print ''; } diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 6fa4e5c46a8..76a868a7888 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -1332,7 +1332,7 @@ class Contrat extends CommonObject if (empty($error)) { // Call trigger - $result=$this->call_trigger('LINECONTRACT_CREATE',$user); + $result=$this->call_trigger('LINECONTRACT_INSERT',$user); if ($result < 0) { $this->db->rollback(); @@ -2644,7 +2644,7 @@ class ContratLigne extends CommonObjectLine if (!$notrigger) { // Call trigger - $result = $this->call_trigger('LINECONTRACT_CREATE', $user); + $result = $this->call_trigger('LINECONTRACT_INSERT', $user); if ($result < 0) { $this->db->rollback(); return -1; diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index 97d20e2acb1..9619713859a 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -49,8 +49,10 @@ $search_ref_supplier=GETPOST('search_ref_supplier','alpha'); $sall=GETPOST('sall'); $search_status=GETPOST('search_status'); $socid=GETPOST('socid'); +$search_user=GETPOST('search_user','int'); +$search_sale=GETPOST('search_sale','int'); +$search_product_category=GETPOST('search_product_category','int'); -$search_sale = GETPOST('search_sale','int'); $optioncss = GETPOST('optioncss','alpha'); if (! $sortfield) $sortfield="c.rowid"; @@ -69,7 +71,9 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both $search_name=""; $search_contract=""; $search_ref_supplier=""; - $search_sale=""; + $search_user=''; + $search_sale=''; + $search_product_category=''; $sall=""; $search_status=""; } @@ -82,6 +86,7 @@ if ($search_status == '') $search_status=1; */ $now=dol_now(); +$form=new Form($db); $formother = new FormOther($db); $socstatic = new Societe($db); @@ -99,8 +104,15 @@ $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; if ($search_sale > 0 || (! $user->rights->societe->client->voir && ! $socid)) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= ", ".MAIN_DB_PREFIX."contrat as c"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."contratdet as cd ON c.rowid = cd.fk_contrat"; +if ($search_product_category > 0) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON cp.fk_product=cd.fk_product'; +if ($search_user > 0) +{ + $sql.=", ".MAIN_DB_PREFIX."element_contact as ec"; + $sql.=", ".MAIN_DB_PREFIX."c_type_contact as tc"; +} $sql.= " WHERE c.fk_soc = s.rowid "; -$sql.= " AND c.entity = ".$conf->entity; +$sql.= ' AND c.entity IN ('.getEntity('contract', 1).')'; +if ($search_product_category > 0) $sql.=" AND cp.fk_categorie = ".$search_product_category; if ($socid) $sql.= " AND s.rowid = ".$db->escape($socid); if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; @@ -122,6 +134,7 @@ if ($search_sale > 0) if ($sall) { $sql .= natural_search(array('s.nom', 'cd.label', 'cd.description'), $sall); } +if ($search_user > 0) $sql.= " AND ec.fk_c_type_contact = tc.rowid AND tc.element='contrat' AND tc.source='internal' AND ec.element_id = c.rowid AND ec.fk_socpeople = ".$search_user; $sql.= " GROUP BY c.rowid, c.ref, c.datec, c.date_contrat, c.statut, c.ref_supplier, s.nom, s.rowid"; $sql.= $db->order($sortfield,$sortorder); $sql.= $db->plimit($conf->liste_limit + 1, $offset); @@ -136,26 +149,47 @@ if ($resql) print '
'; if ($optioncss != '') print ''; - print ''; // If the user can view prospects other than his' $moreforfilter=''; if ($user->rights->societe->client->voir || $socid) { $langs->load("commercial"); + $moreforfilter.='
'; $moreforfilter.=$langs->trans('ThirdPartiesOfSaleRepresentative'). ': '; $moreforfilter.=$formother->select_salesrepresentatives($search_sale,'search_sale',$user); - $moreforfilter.='       '; + $moreforfilter.='
'; } - - if ($moreforfilter) + // If the user can view other users + if ($user->rights->user->user->lire) + { + $moreforfilter.='
'; + $moreforfilter.=$langs->trans('LinkedToSpecificUsers'). ': '; + $moreforfilter.=$form->select_dolusers($search_user, 'search_user', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); + $moreforfilter.='
'; + } + // If the user can view categories of products + if ($conf->categorie->enabled && $user->rights->produit->lire) + { + include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; + $moreforfilter.='
'; + $moreforfilter.=$langs->trans('IncludingProductWithTag'). ': '; + $cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1); + $moreforfilter.=$form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, '', 1); + $moreforfilter.='
'; + } + + if (! empty($moreforfilter)) { - print ''; - print ''; + print '
'; + print $moreforfilter; + $parameters=array(); + $reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + print '
'; } + print '
'; - print $moreforfilter; - print '
'; print ''; $param='&search_contract='.$search_contract; @@ -171,10 +205,11 @@ if ($resql) //print_liste_field_titre($langs->trans("DateCreation"), $_SERVER["PHP_SELF"], "c.datec","","$param",'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateContract"), $_SERVER["PHP_SELF"], "c.date_contrat","","$param",'align="center"',$sortfield,$sortorder); //print_liste_field_titre($langs->trans("Status"), $_SERVER["PHP_SELF"], "c.statut","","$param",'align="center"',$sortfield,$sortorder); - print ''; - print ''; - print ''; - print ''; + print_liste_field_titre($staticcontratligne->LibStatut(0,3), '', '', '', '', 'width="16"'); + print_liste_field_titre($staticcontratligne->LibStatut(4,3,0), '', '', '', '', 'width="16"'); + print_liste_field_titre($staticcontratligne->LibStatut(4,3,1), '', '', '', '', 'width="16"'); + print_liste_field_titre($staticcontratligne->LibStatut(5,3), '', '', '', '', 'width="16"'); + print_liste_field_titre('',$_SERVER["PHP_SELF"],"",'','','',$sortfield,$sortorder,'maxwidthsearch '); print "\n"; print ''; @@ -190,7 +225,8 @@ if ($resql) print ''; print ''; //print ''; - print ''; + print '\n"; @@ -250,6 +286,7 @@ if ($resql) print ''; print ''; print ''; + print ''; print "\n"; $i++; } diff --git a/htdocs/core/actions_sendmails.inc.php b/htdocs/core/actions_sendmails.inc.php index 67458fd401d..a4e83a0fd59 100644 --- a/htdocs/core/actions_sendmails.inc.php +++ b/htdocs/core/actions_sendmails.inc.php @@ -56,7 +56,7 @@ if (! empty($_POST['removedfile']) && empty($_POST['removAll'])) $upload_dir_tmp = $vardir.'/temp'; // TODO Delete only files that was uploaded from email form - dol_remove_file_process($_POST['removedfile'],0); + dol_remove_file_process(GETPOST('removedfile','alpha'),0); $action='presend'; } diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index bfa1595197e..419df05a679 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -434,6 +434,109 @@ abstract class CommonObject } + /** + * Return full address of contact + * + * @param string $htmlkey HTML id to make banner content unique + * @param Object $object Object (thirdparty, thirdparty of contact for contact, null for a member) + * @return string Full address string + */ + function getBannerAddress($htmlkey, $object) + { + global $conf, $langs; + + $countriesusingstate=array('AU','US','IN','GB','ES','UK','TR'); + + $contacti=0; + $thirdpartyid=0; + if ($this->elemet == 'societe') + { + $thirdpartyid=$this->id; + } + if ($this->elemet == 'contact') + { + $contactid=$this->id; + $thirdpartyid=$object->fk_soc; + } + if ($this->elemet == 'user') + { + $contactid=$this->contact_id; + $thirdpartyid=$object->fk_soc; + } + + $out=''; + + $outdone=0; + $coords = $this->getFullAddress(1,', '); + if ($coords) + { + if (! empty($conf->use_javascript_ajax)) + { + $namecoords = $this->getFullName($langs,1).'
'.$coords; + // hideonsmatphone because copyToClipboard call jquery dialog that does not work with jmobile + $out.=''; + $out.=img_picto($langs->trans("Address"), 'object_address.png'); + $out.=' '; + } + $out.=dol_print_address($coords, 'address_'.$htmlkey.'_'.$this->id, $this->element, $this->id, 1); $outdone++; + $outdone++; + } + + if (! in_array($this->country_code,$countriesusingstate) && empty($conf->global->MAIN_FORCE_STATE_INTO_ADDRESS) + && ! empty($conf->global->SOCIETE_DISABLE_STATE) && $this->state) + { + $out.=($outdone?'
':'').$this->state; + $outdone++; + } + + if ($this->phone_pro || $this->phone_mobile || $this->phone_perso || $this->fax || $this->office_phone || $this->user_mobile || $this->office_fax) $out.=($outdone?'
':''); + if ($this->phone && empty($this->phone_pro)) { // For objects that store pro phone into ->phone + $out.=dol_print_phone($this->phone,$country_code['code'],$contactid,$thirdpartyid,'AC_TEL',' ','phone',$langs->trans("PhonePro")); $outdone++; + } + if (! empty($this->phone_pro)) { + $out.=dol_print_phone($this->phone_pro,$country_code['code'],$contactid,$thirdpartyid,'AC_TEL',' ','phone',$langs->trans("PhonePro")); $outdone++; + } + if (! empty($this->phone_mobile)) { + $out.=dol_print_phone($this->phone_mobile,$country_code['code'],$contactid,$thirdpartyid,'AC_TEL',' ','phone',$langs->trans("PhoneMobile")); $outdone++; + } + if (! empty($this->phone_perso)) { + $out.=dol_print_phone($this->phone_perso,$country_code['code'],$contactid,$thirdpartyid,'AC_TEL',' ','phone',$langs->trans("PhonePerso")); $outdone++; + } + if (! empty($this->fax)) { + $out.=dol_print_phone($this->fax,$country_code['code'],$contactid,$thirdpartyid,'AC_FAX',' ','fax',$langs->trans("Fax")); $outdone++; + } + if (! empty($this->office_phone)) { + $out.=dol_print_phone($this->office_phone,$country_code['code'],$contactid,$thirdpartyid,'AC_TEL',' ','phone',$langs->trans("PhonePro")); $outdone++; + } + if (! empty($this->user_mobile)) { + $out.=dol_print_phone($this->user_mobile,$country_code['code'],$contactid,$thirdpartyid,'AC_TEL',' ','phone',$langs->trans("PhoneMobile")); $outdone++; + } + if (! empty($this->office_fax)) { + $out.=dol_print_phone($this->fax,$country_code['code'],$contactid,$thirdpartyid,'AC_FAX',' ','fax',$langs->trans("Fax")); $outdone++; + } + + $out.='
'; + $outdone=0; + if ($this->email) + { + $out.=dol_print_email($this->email,$this->id,$object->id,'AC_EMAIL',0,0,1); + $outdone++; + } + if ($this->url) + { + $out.=dol_print_url($this->url,'',0,1); + $outdone++; + } + if (! empty($conf->skype->enabled)) + { + if ($this->skype) $out.=($outdone?'
':'').dol_print_skype($this->skype,$this->id,$object->id,'AC_SKYPE'); + } + + $out.=''; + + return $out; + } + /** * Add a link between element $this->element and a contact * diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 8d69e58bad3..17771a56782 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -484,9 +484,10 @@ class Form * @param string $htmlname Name of html select object * @param string $htmloption Options html on select object * @param integer $maxlength Max length for labels (0=no limit) + * @param string $morecss More css class * @return string HTML string with select */ - function select_country($selected='',$htmlname='country_id',$htmloption='',$maxlength=0) + function select_country($selected='',$htmlname='country_id',$htmloption='',$maxlength=0,$morecss='minwidth300') { global $conf,$langs; @@ -507,7 +508,7 @@ class Form $resql=$this->db->query($sql); if ($resql) { - $out.= ''; $num = $this->db->num_rows($resql); $i = 0; if ($num) @@ -4590,34 +4591,36 @@ class Form { global $conf, $langs; + $out = ''; + // Add code for jquery to use multiselect if (! empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) || defined('REQUIRE_JQUERY_MULTISELECT')) { $tmpplugin=empty($conf->global->MAIN_USE_JQUERY_MULTISELECT)?constant('REQUIRE_JQUERY_MULTISELECT'):$conf->global->MAIN_USE_JQUERY_MULTISELECT; - print ' + $out.=' + + '; + return $out; + } /** * Render list of categories linked to object with id $id and type $type @@ -5041,16 +5122,18 @@ class Form * @param int $shownav Show Condition (navigation is shown if value is 1) * @param string $fieldid Nom du champ en base a utiliser pour select next et previous (we make the select max and min on this field) * @param string $fieldref Nom du champ objet ref (object->ref) a utiliser pour select next et previous - * @param string $morehtmlref Code html supplementaire a afficher apres ref + * @param string $morehtmlref More html to show after ref * @param string $moreparam More param to add in nav link url. * @param int $nodbprefix Do not include DB prefix to forge table name + * @param string $morehtmlleft More html code to show before ref + * @param string $morehtmlright More html code to show before navigation arrows * @return string Portion HTML avec ref + boutons nav */ - function showrefnav($object,$paramid,$morehtml='',$shownav=1,$fieldid='rowid',$fieldref='ref',$morehtmlref='',$moreparam='',$nodbprefix=0) + function showrefnav($object,$paramid,$morehtml='',$shownav=1,$fieldid='rowid',$fieldref='ref',$morehtmlref='',$moreparam='',$nodbprefix=0,$morehtmlleft='',$morehtmlright='') { global $langs,$conf; - $ret=''; + $ret=''; if (empty($fieldid)) $fieldid='rowid'; if (empty($fieldref)) $fieldref='ref'; @@ -5063,14 +5146,27 @@ class Form $next_ref = $object->ref_next?''.(empty($conf->dol_use_jmobile)?'>':' ').'':''; //print "xx".$previous_ref."x".$next_ref; - $ret.='
'; + $ret.='
'; + + $ret.='
'.$morehtmlleft.'
'; + + $ret.='
'; - $ret.=dol_htmlentities($object->$fieldref); + // For thirdparty and contact, the ref is he id, so we show something else + if ($object->element == 'societe') + { + $ret.=dol_htmlentities($object->name); + } + else if (in_array($object->element, array('contact', 'user', 'member'))) + { + $ret.=dol_htmlentities($object->getFullName($langs)); + } + else $ret.=dol_htmlentities($object->$fieldref); if ($morehtmlref) { $ret.=' '.$morehtmlref; } - $ret.='
'; + $ret.='
'; if ($previous_ref || $next_ref || $morehtml) { @@ -5078,23 +5174,20 @@ class Form } if ($morehtml) { - //$ret.='
'; - //$ret.='
'.$staticcontratligne->LibStatut(0,3).''.$staticcontratligne->LibStatut(4,3,0).''.$staticcontratligne->LibStatut(4,3,1).''.$staticcontratligne->LibStatut(5,3).'
  '; + print ''; print ''; print "
'.($obj->nb_running>0?$obj->nb_running:'').''.($obj->nb_expired>0?$obj->nb_expired:'').''.($obj->nb_closed>0 ?$obj->nb_closed:'').'
'.$morehtml; $ret.='
  • '.$morehtml.'
  • '; } if ($shownav && ($previous_ref || $next_ref)) { - //$ret.='
    '.$previous_ref.''.$next_ref; $ret.=''; $ret.=''; } if ($previous_ref || $next_ref || $morehtml) { - //$ret.='
    '; $ret.=''; } - $ret.=''; - + $ret.='
    '.$morehtmlright.'
    '; + $ret.=''; + return $ret; } @@ -5131,15 +5224,16 @@ class Form /** * Return HTML code to output a photo * - * @param string $modulepart Key to define module concerned ('societe', 'userphoto', 'memberphoto') - * @param object $object Object containing data to retrieve file name - * @param int $width Width of photo - * @param int $height Height of photo (auto if 0) - * @param int $caneditfield Add edit fields - * @param string $cssclass CSS name to use on img for photo - * @return string HTML code to output photo + * @param string $modulepart Key to define module concerned ('societe', 'userphoto', 'memberphoto') + * @param object $object Object containing data to retrieve file name + * @param int $width Width of photo + * @param int $height Height of photo (auto if 0) + * @param int $caneditfield Add edit fields + * @param string $cssclass CSS name to use on img for photo + * @param int $genericifundef Use a generic image if no image avaiable + * @return string HTML code to output photo */ - static function showphoto($modulepart, $object, $width=100, $height=0, $caneditfield=0, $cssclass='photowithmargin') + static function showphoto($modulepart, $object, $width=100, $height=0, $caneditfield=0, $cssclass='photowithmargin', $genericifundef=0) { global $conf,$langs; @@ -5197,7 +5291,7 @@ class Form } else { - $nophoto='/public/theme/common/nophoto.jpg'; + $nophoto='/public/theme/common/nophoto.png'; if (in_array($modulepart,array('userphoto','contact'))) // For module thar are "physical" users { $nophoto='/public/theme/common/user_anonymous.png'; diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php index 27bcb64da3c..8235f99d129 100644 --- a/htdocs/core/class/translate.class.php +++ b/htdocs/core/class/translate.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2012 Destailleur Laurent + * Copyright (C) 2004-2015 Destailleur Laurent * Copyright (C) 2005-2010 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -579,6 +579,19 @@ class Translate { $str=$this->tab_translate[$key]; + // Make some string replacement after translation + $replacekey='MAIN_REPLACE_TRANS_'.$this->defaultlang; + if (! empty($conf->global->$replacekey)) // Replacement translation variable with string1:newstring1,string2:newstring2 + { + // Overwrite translation with param MAIN_OVERWRITE_TRANS_xx_XX + $tmparray=explode(';', $conf->global->$replacekey); + foreach($tmparray as $tmp) + { + $tmparray2=explode(':',$tmp); + $str=preg_replace('/'.preg_quote($tmparray2[0]).'/',$tmparray2[1],$str); + } + } + if (! preg_match('/^Format/',$key)) { //print $str; diff --git a/htdocs/core/db/DoliDB.class.php b/htdocs/core/db/DoliDB.class.php index fa9db9ea4b4..f1909a91ea0 100644 --- a/htdocs/core/db/DoliDB.class.php +++ b/htdocs/core/db/DoliDB.class.php @@ -226,7 +226,7 @@ abstract class DoliDB implements Database */ function order($sortfield=null,$sortorder=null) { - if (isset($sortfield)) + if (! empty($sortfield)) { $return=''; $fields=explode(',',$sortfield); @@ -236,7 +236,7 @@ abstract class DoliDB implements Database else $return.=','; $return.=preg_replace('/[^0-9a-z_\.]/i','',$val); - if (isset($sortorder)) + if (! empty($sortorder)) { $return.=' '.preg_replace('/[^0-9a-z]/i','',$sortorder); } diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 9a67065fe64..86c5f717f4b 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -58,6 +58,16 @@ function societe_prepare_head(Societe $object) $head[$h][2] = 'customer'; $h++; } + if (($object->client==1 || $object->client==2 || $object->client==3) && (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))) + { + $langs->load("products"); + // price + $head[$h][0] = DOL_URL_ROOT.'/societe/price.php?socid='.$object->id; + $head[$h][1] = $langs->trans("CustomerPrices"); + $head[$h][2] = 'price'; + $h++; + } + if (! empty($conf->fournisseur->enabled) && $object->fournisseur && ! empty($user->rights->fournisseur->lire)) { $head[$h][0] = DOL_URL_ROOT.'/fourn/card.php?socid='.$object->id; @@ -169,16 +179,6 @@ function societe_prepare_head(Societe $object) $h++; } - if (($object->client==1 || $object->client==2 || $object->client==3) && (! empty ( $conf->global->PRODUIT_CUSTOMER_PRICES ))) - { - $langs->load("products"); - // price - $head[$h][0] = DOL_URL_ROOT.'/societe/price.php?socid='.$object->id; - $head[$h][1] = $langs->trans("CustomerPrices"); - $head[$h][2] = 'price'; - $h++; - } - // Log $head[$h][0] = DOL_URL_ROOT.'/societe/info.php?socid='.$object->id; $head[$h][1] = $langs->trans("Info"); @@ -632,40 +632,6 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') print "
    '; - print ''; - print ''; - //print ''; - print ' '; - print $form->selectarray('search_status', array('-1'=>'','0'=>$contactstatic->LibStatut(0,1),'1'=>$contactstatic->LibStatut(1,1)),$search_status); - print ' '; - print ''; - print '
    '; + print ''; + print ''; + //print ''; + print ' '; + print $form->selectarray('search_status', array('-1'=>'','0'=>$contactstatic->LibStatut(0,1),'1'=>$contactstatic->LibStatut(1,1)),$search_status); + print ' '; + print ''; + print '
    '; + $contactstatic->id = $obj->rowid; + $contactstatic->ref = $obj->ref; $contactstatic->statut = $obj->statut; $contactstatic->lastname = $obj->lastname; $contactstatic->firstname = $obj->firstname; @@ -705,44 +703,23 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') $contactstatic->phone_mobile = $obj->phone_mobile; $contactstatic->phone_perso = $obj->phone_perso; $contactstatic->email = $obj->email; + $contactstatic->web = $obj->web; + $contactstatic->skype = $obj->skype; + + $country_code = getCountry($obj->country_id, 2); + $contactstatic->country_code = $country_code; + + print "
    '; print $contactstatic->getNomUrl(1,'',0,'&backtopage='.urlencode($backtopage)); print ''; if ($obj->poste) print $obj->poste; print ''; - $outdone=0; - $contactstatic->address = $obj->address; - $contactstatic->zip = $obj->zip; - $contactstatic->town = $obj->town; - $contactstatic->country_id = $obj->country_id; - $coords = $contactstatic->getFullAddress(1,', '); - if (! empty($conf->use_javascript_ajax)) - { - $namecoords = $contactstatic->getFullName($langs,1).'
    '.$coords; - // hideonsmatphone because copyToClipboard call jquery dialog that does not work with jmobile - print ''; - print img_picto($langs->trans("Address"), 'object_address.png'); - print ' '; - } - if ($coords) { print dol_print_address($coords,'address_contact_'.$obj->rowid, 'contact', $obj->rowid); $outdone++; } - - if ($obj->phone_pro || $obj->phone_mobile || $obj->phone_perso || $obj->fax) print ($outdone?'
    ':''); - if ($obj->phone_pro) { print dol_print_phone($obj->phone_pro,$country_code['code'],$obj->rowid,$object->id,'AC_TEL',' ','phone'); $outdone++; } - if ($obj->phone_mobile) { print dol_print_phone($obj->phone_mobile,$country_code['code'],$obj->rowid,$object->id,'AC_TEL',' ','phone'); $outdone++; } - if ($obj->phone_perso) { print dol_print_phone($obj->phone_perso,$country_code['code'],$obj->rowid,$object->id,'AC_TEL',' ','phone'); $outdone++; } - if ($obj->fax) { print dol_print_phone($obj->fax,$country_code['code'],$obj->rowid,$object->id,'AC_FAX',' ','fax'); $outdone++; } - - print '
    '; - $outdone=0; - if ($obj->email) print dol_print_email($obj->email,$obj->rowid,$object->id,'AC_EMAIL',0,0,1); - if (! empty($conf->skype->enabled)) - { - if ($obj->skype) print ($outdone?'
    ':'').dol_print_skype($obj->skype,$obj->rowid,$object->id,'AC_SKYPE'); - } + print $contactstatic->getBannerAddress('contact', $object); print '
    '; - print ''; - print_liste_field_titre($title,"index.php","","","","",$sortfield,$sortorder); - if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES)) - { - print_liste_field_titre($langs->trans("OpportunityAmount"),"","","","",'align="right"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("OpportunityStatus"),"","","","",'align="right"',$sortfield,$sortorder); - } - if (empty($conf->global->PROJECT_HIDE_TASKS)) print_liste_field_titre($langs->trans("Tasks"),"","","","",'align="right"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Status"),"","","","",'align="right"',$sortfield,$sortorder); - print "\n"; $sql = "SELECT p.rowid as projectid, p.ref, p.title, p.fk_user_creat, p.public, p.fk_statut as status, p.fk_opp_status as opp_status, p.opp_amount, COUNT(DISTINCT t.rowid) as nb"; // We use DISTINCT here because line can be doubled if task has 2 links to same user $sql.= " FROM ".MAIN_DB_PREFIX."projet as p"; @@ -962,6 +952,17 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks= $num = $db->num_rows($resql); $i = 0; + print ''; + print_liste_field_titre($title.' '.$num.'',$_SERVER["PHP_SELF"],"","","","",$sortfield,$sortorder); + if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES)) + { + print_liste_field_titre($langs->trans("OpportunityAmount"),"","","","",'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("OpportunityStatus"),"","","","",'align="right"',$sortfield,$sortorder); + } + if (empty($conf->global->PROJECT_HIDE_TASKS)) print_liste_field_titre($langs->trans("Tasks"),"","","","",'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Status"),"","","","",'align="right"',$sortfield,$sortorder); + print "\n"; + while ($i < $num) { $objp = $db->fetch_object($resql); diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php index cb62b63377f..23e122b89f6 100644 --- a/htdocs/core/lib/usergroups.lib.php +++ b/htdocs/core/lib/usergroups.lib.php @@ -355,7 +355,7 @@ function show_theme($fuser,$edit=0,$foruserprofile=false) print '
    '; $file=$dirtheme."/".$subdir."/thumb.png"; $url=$urltheme."/".$subdir."/thumb.png"; - if (! file_exists($file)) $url=$urltheme."/common/nophoto.jpg"; + if (! file_exists($file)) $url=DOL_URL_ROOT.'/public/theme/common/nophoto.png'; print 'id:'').'" style="font-weight: normal;" alt="'.$langs->trans("Preview").'">'; if ($subdir == $conf->global->MAIN_THEME) $title=$langs->trans("ThemeCurrentlyActive"); else $title=$langs->trans("ShowPreview"); @@ -462,7 +462,7 @@ function show_theme($fuser,$edit=0,$foruserprofile=false) if ($color) print ''; else print $langs->trans("Default"); } - print '   ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')'; + print '   ('.$langs->trans("Default").': 6e7896, '.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')'; print ''; } diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php index c059ff7c2cc..b8d4df05e92 100644 --- a/htdocs/core/modules/DolibarrModules.class.php +++ b/htdocs/core/modules/DolibarrModules.class.php @@ -35,17 +35,20 @@ class DolibarrModules // Can not be abstract, because we need to instantiant it into unActivateModule to be able to disable a module whose files were removed. { /** + * @var int Module unique ID + */ + public $numero; + + /** + * @var string Module name + */ + public $name; + + /** * @var DoliDb Database handler */ public $db; - /** - * @var string Relative path to module style sheet - * @deprecated - * @see module_parts - */ - public $style_sheet = ''; - /** * @var array Paths to create when module is activated */ @@ -134,16 +137,6 @@ class DolibarrModules // Can not be abstract, because we need to insta */ public $error; - /** - * @var int Module unique ID - */ - public $numero; - - /** - * @var string Module name - */ - public $name; - /** * @var string Module version */ @@ -193,7 +186,15 @@ class DolibarrModules // Can not be abstract, because we need to insta * @var bool Module is enabled globally (Multicompany support) */ public $core_enabled; + + /** + * @var string Relative path to module style sheet + * @deprecated + * @see module_parts + */ + public $style_sheet = ''; + /** * Constructor. Define names, constants, directories, boxes, permissions @@ -470,6 +471,7 @@ class DolibarrModules // Can not be abstract, because we need to insta if ($this->version == 'dolibarr' || $this->version == 'dolibarr_deprecated') return 'core'; if (! empty($this->version) && ! in_array($this->version,array('experimental','development'))) return 'external'; if (! empty($this->editor_name) || ! empty($this->editor_web)) return 'external'; + if ($this->numero >= 100000) return 'external'; return 'unknown'; } diff --git a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php index 12ea7aa7b08..542f53c24b7 100644 --- a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php +++ b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php @@ -270,7 +270,11 @@ class doc_generic_invoice_odt extends ModelePDFFactures { // On peut utiliser le nom de la societe du contact if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socobject = $object->contact; - else $socobject = $object->client; + else { + $socobject = $object->client; + // if we have a BILLING contact and we dont use it as recipient we store the contact object for later use + $contactobject = $object->contact; + } } else { @@ -344,8 +348,12 @@ class doc_generic_invoice_odt extends ModelePDFFactures $array_objet=$this->get_substitutionarray_object($object,$outputlangs); $array_propal=is_object($propal_object)?$this->get_substitutionarray_object($propal_object,$outputlangs,'propal'):array(); $array_other=$this->get_substitutionarray_other($outputlangs); + // retrieve contact information for use in invoice as contact_xxx tags + $array_thirdparty_contact = array(); + if ($usecontact) + $array_thirdparty_contact=$this->get_substitutionarray_contact($contactobject,$outputlangs,'contact'); - $tmparray = array_merge($array_user,$array_soc,$array_thirdparty,$array_objet,$array_propal,$array_other); + $tmparray = array_merge($array_user,$array_soc,$array_thirdparty,$array_objet,$array_propal,$array_other,$array_thirdparty_contact); complete_substitutions_array($tmparray, $outputlangs, $object); // Call the ODTSubstitution hook $parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray); diff --git a/htdocs/core/modules/modCashDesk.class.php b/htdocs/core/modules/modCashDesk.class.php index a76531cd719..430d62146f5 100644 --- a/htdocs/core/modules/modCashDesk.class.php +++ b/htdocs/core/modules/modCashDesk.class.php @@ -45,7 +45,7 @@ class modCashDesk extends DolibarrModules // Key text used to identify module (for permission, menus, etc...) $this->rights_class = 'cashdesk'; - $this->family = "products"; + $this->family = "portal"; // 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 = "CashDesk module"; diff --git a/htdocs/core/modules/modLabel.class.php b/htdocs/core/modules/modLabel.class.php index 54f65a83591..0b282584261 100644 --- a/htdocs/core/modules/modLabel.class.php +++ b/htdocs/core/modules/modLabel.class.php @@ -43,7 +43,7 @@ class modLabel extends DolibarrModules $this->db = $db; $this->numero = 60; - $this->family = "other"; + $this->family = "technic"; // 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 etiquettes"; diff --git a/htdocs/core/modules/modUser.class.php b/htdocs/core/modules/modUser.class.php index 8c510186f06..d3be64d0560 100644 --- a/htdocs/core/modules/modUser.class.php +++ b/htdocs/core/modules/modUser.class.php @@ -45,7 +45,7 @@ class modUser extends DolibarrModules $this->db = $db; $this->numero = 0; - $this->family = "base"; // Family for module (or "base" if core module) + $this->family = "hr"; // Family for module (or "base" if core module) // 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 utilisateurs (requis)"; diff --git a/htdocs/core/modules/modSyncSupplierWebServices.class.php b/htdocs/core/modules/modWebServicesClient.class.php similarity index 91% rename from htdocs/core/modules/modSyncSupplierWebServices.class.php rename to htdocs/core/modules/modWebServicesClient.class.php index 96403f67ee4..307f3420640 100644 --- a/htdocs/core/modules/modSyncSupplierWebServices.class.php +++ b/htdocs/core/modules/modWebServicesClient.class.php @@ -18,7 +18,7 @@ /** * \defgroup webservices Module webservices * \brief Module to enable client for supplier WebServices - * \file htdocs/core/modules/modSyncSupplierWebServices.class.php + * \file htdocs/core/modules/modWebServicesClient.class.php * \ingroup webservices * \brief File to describe client for supplier webservices module */ @@ -27,7 +27,7 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php'; /** * Class to describe a sync supplier web services module */ -class modSyncSupplierWebServices extends DolibarrModules +class modWebServicesClient extends DolibarrModules { /** @@ -38,12 +38,12 @@ class modSyncSupplierWebServices extends DolibarrModules function __construct($db) { $this->db = $db; - $this->numero = 2650; + $this->numero = 2660; $this->family = "technic"; // 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 = "Enable the client for external supplier web services"; + $this->description = "Enable the web service client to call external supplier web services"; $this->version = 'experimental'; // 'experimental' or 'dolibarr' or version // Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase) $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); diff --git a/htdocs/core/modules/modWebsite.class.php b/htdocs/core/modules/modWebsite.class.php new file mode 100644 index 00000000000..0e75daa26bd --- /dev/null +++ b/htdocs/core/modules/modWebsite.class.php @@ -0,0 +1,124 @@ + + * + * 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 . + */ + +/** + * \defgroup website Module website + * \brief Website module descriptor. + * \file htdocs/core/modules/modWebsite.class.php + * \ingroup website + * \brief Description and activation file for module Website + */ +include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php'; + + +/** + * Class to describe Website module + */ +class modWebsite extends DolibarrModules +{ + + /** + * Constructor. Define names, constants, directories, boxes, permissions + * + * @param DoliDB $db Database handler + */ + function __construct($db) + { + global $langs,$conf; + + $this->db = $db; + $this->numero = 10000; + + // Family can be 'crm','financial','hr','projects','products','ecm','technic','other' + // It is used to group modules in module setup page + $this->family = "portal"; + // 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 = "Enable the public website with CMS features"; + $this->version = 'development'; // 'experimental' or 'dolibarr' or version + // Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase) + $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); + // Where to store the module in setup page (0=common,1=interface,2=others,3=very specific) + $this->special = 0; + // Name of image file used for this module. + $this->picto='globe'; + + // Data directories to create when module is enabled + $this->dirs = array(); + + // Config pages + //------------- + $this->config_page_url = array("website.php"); + + // Dependancies + //------------- + $this->hidden = ! empty($conf->global->WEBSITE_MODULE_DISABLED); // A condition to disable module + $this->depends = array(); // 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(); // List of modules id this module is in conflict with + $this->langfiles = array("website"); + + // Constants + //----------- + $this->const = array(); + + // New pages on tabs + // ----------------- + $this->tabs = array(); + + // Boxes + //------ + $this->boxes = array(); + + // Permissions + $this->rights = array(); // Permission array used by this module + $this->rights_class = 'website'; + $r=0; + + $this->rights[$r][0] = 10001; + $this->rights[$r][1] = 'Read website content'; + $this->rights[$r][3] = 1; + $this->rights[$r][4] = 'read'; + $r++; + + $this->rights[$r][0] = 10002; + $this->rights[$r][1] = 'Create/modify website content'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'create'; + $r++; + + $this->rights[$r][0] = 10003; + $this->rights[$r][1] = 'Delete website content'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'delete'; + $r++; + + // Main menu entries + $r=0; + $this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=home', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode + 'type'=>'top', // This is a Left menu entry + 'titre'=>'Website', + 'url'=>'/website/index.php', + 'langs'=>'website', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. + 'position'=>100, + 'enabled'=>'$conf->website->enabled', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. + 'perms'=>'$user->rights->website->read', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules + 'target'=>'', + 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both + $r++; + } +} diff --git a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php index 80ec0ba6fe0..d6773eb2c80 100644 --- a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php +++ b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php @@ -288,9 +288,9 @@ class doc_generic_proposal_odt extends ModelePDFPropales dol_mkdir($conf->propal->dir_temp); - // If BILLING contact defined on invoice, we use it + // If CUSTOMER contact defined on proposal, we use it $usecontact=false; - $arrayidcontact=$object->getIdContact('external','BILLING'); + $arrayidcontact=$object->getIdContact('external','CUSTOMER'); if (count($arrayidcontact) > 0) { $usecontact=true; @@ -302,13 +302,16 @@ class doc_generic_proposal_odt extends ModelePDFPropales { // On peut utiliser le nom de la societe du contact if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socobject = $object->contact; - else $socobject = $object->client; + else { + $socobject = $object->client; + // if we have a CUSTOMER contact and we dont use it as recipient we store the contact object for later use + $contactobject = $object->contact; + } } else { $socobject=$object->client; } - // Make substitution $substitutionarray=array( '__FROM_NAME__' => $this->emetteur->name, @@ -369,8 +372,12 @@ class doc_generic_proposal_odt extends ModelePDFPropales $array_thirdparty=$this->get_substitutionarray_thirdparty($socobject,$outputlangs); $array_objet=$this->get_substitutionarray_object($object,$outputlangs); $array_other=$this->get_substitutionarray_other($outputlangs); + // retrieve contact information for use in proposal as contact_xxx tags + $array_thirdparty_contact = array(); + if ($usecontact) + $array_thirdparty_contact=$this->get_substitutionarray_contact($contactobject,$outputlangs,'contact'); - $tmparray = array_merge($array_user,$array_soc,$array_thirdparty,$array_objet,$array_other); + $tmparray = array_merge($array_user,$array_soc,$array_thirdparty,$array_objet,$array_other,$array_thirdparty_contact); complete_substitutions_array($tmparray, $outputlangs, $object); // Call the ODTSubstitution hook $parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray); diff --git a/htdocs/core/tpl/notes.tpl.php b/htdocs/core/tpl/notes.tpl.php index 5773d7ce9d8..8400e0210d4 100644 --- a/htdocs/core/tpl/notes.tpl.php +++ b/htdocs/core/tpl/notes.tpl.php @@ -21,7 +21,7 @@ $module = $object->element; $note_public = 'note_public'; $note_private = 'note_private'; -$colwidth=(isset($colwidth)?$colwidth:25); +$colwidth=(isset($colwidth)?$colwidth:(empty($cssclass)?'25':'')); $permission=(isset($permission)?$permission:(isset($user->rights->$module->creer)?$user->rights->$module->creer:0)); // If already defined by caller page $moreparam=(isset($moreparam)?$moreparam:''); @@ -69,12 +69,12 @@ else $typeofdata='textarea:12:100';
    -
    >editfieldkey("NotePublic", $note_public, $value_public, $object, $permission, $typeofdata, $moreparam); ?>
    +
    >editfieldkey("NotePublic", $note_public, $value_public, $object, $permission, $typeofdata, $moreparam); ?>
    editfieldval("NotePublic", $note_public, $value_public, $object, $permission, $typeofdata, '', null, null, $moreparam); ?>
    societe_id)) { ?>
    -
    >editfieldkey("NotePrivate", $note_private, $value_private, $object, $permission, $typeofdata, $moreparam); ?>
    +
    >editfieldkey("NotePrivate", $note_private, $value_private, $object, $permission, $typeofdata, $moreparam); ?>
    editfieldval("NotePrivate", $note_private, $value_private, $object, $permission, $typeofdata, '', null, null, $moreparam); ?>
    diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index 938a615ea77..64c49894de1 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -114,12 +114,12 @@ else { } // Free line - echo ''; + echo ''; // Show radio free line if ($forceall >= 0 && (! empty($conf->product->enabled) || ! empty($conf->service->enabled))) { echo '
    '; print ''; print ''; @@ -294,7 +292,7 @@ if (count($object->lines) > 0) print yn($line->status); print ''; - print '".''; + print ''; print ''; print ''; } - print ''; - print ''; + print ''; + print ''; print ""; - print ''; - print ''; + print ''; + print ''; print ''; - print ''; - print ''; + print ''; + print ''; print "\n"; print "
     '; print $form->selectarray('status', array('0'=>$langs->trans("No"),'1'=>$langs->trans("Yes")), $status, 1); print ''; -print ' '; print ''; -print '  '; print ''; print '
    '; + print ''; if ($user->rights->cron->delete) { print "id."&status=".$status."&action=delete\" title=\"".dol_escape_htmltag($langs->trans('CronDelete'))."\">".img_picto($langs->trans('CronDelete'),'delete')."  "; diff --git a/htdocs/fourn/card.php b/htdocs/fourn/card.php index 55993221d41..805fe307115 100644 --- a/htdocs/fourn/card.php +++ b/htdocs/fourn/card.php @@ -131,16 +131,15 @@ if ($object->id > 0) dol_fiche_head($head, 'supplier', $langs->trans("ThirdParty"),0,'company'); - + dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom'); + print '
    '; + print '
    '; print ''; - print ''; // Alias names (commercial, trademark or alias names) - print '"; @@ -168,35 +167,6 @@ if ($object->id > 0) print ''; } - // Address - print ''; - - // Zip / Town - print ''; - print ''; - - // Country - print ''; - - // EMail - print ''; - - // Web - print ''; - - // Phone - print ''; - - // Fax - print ''; - // Assujetti a TVA ou pas print ''; print '"; // Name - print ''; + print ''; // URL - print ''; + print ''; // Offset TZ - print ''; + print ''; // Color (Possible colors are limited by Google) print ''; print ""; $i++; @@ -193,6 +199,7 @@ while ($i <= $MAXAGENDA) print '
    '.$langs->trans("ThirdPartyName").''; - print $form->showrefnav($object,'socid','',($user->societe_id?0:1),'rowid','nom','',''); - print '
    '.$langs->trans('AliasNameShort').''; + print '
    '.$langs->trans('AliasNameShort').''; print $object->name_alias; print "
    '.$langs->trans("Address").''; - dol_print_address($object->address,'gmap','thirdparty',$object->id); - print '
    '.$langs->trans("Zip").' / '.$langs->trans("Town").''.$object->zip.(($object->zip && $object->town)?' / ':'').$object->town.'
    '.$langs->trans("Country").''; - //$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 '
    '.$langs->trans('EMail').''.dol_print_email($object->email,0,$object->id,'AC_EMAIL').'
    '.$langs->trans("Web").''.dol_print_url($object->url).'
    '.$langs->trans("Phone").''.dol_print_phone($object->phone,$object->country_code,0,$object->id,'AC_TEL').''.$langs->trans("Fax").''.dol_print_phone($object->fax,$object->country_code,0,$object->id,'AC_FAX').'
    '.$langs->trans('VATIsUsed').''; diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index d69c86eb1ea..ef2eb339bfd 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -1083,7 +1083,7 @@ if (empty($reshook)) $upload_dir_tmp = $vardir.'/temp'; // TODO Delete only files that was uploaded from email form - dol_remove_file_process($_POST['removedfile'],0); + dol_remove_file_process(GETPOST('removedfile','alpha'),0); $action='presend'; } diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 5a54cc84068..fc4dea21156 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -917,7 +917,7 @@ if (empty($reshook)) $upload_dir_tmp = $vardir.'/temp'; // TODO Delete only files that was uploaded from email form - dol_remove_file_process($_POST['removedfile'],0); + dol_remove_file_process(GETPOST('removedfile','alpha'),0); $action='presend'; } diff --git a/htdocs/fourn/list.php b/htdocs/fourn/list.php index 14bd6298ea8..8fb33850919 100644 --- a/htdocs/fourn/list.php +++ b/htdocs/fourn/list.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2004-2015 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2011 Philippe Grand * Copyright (C) 2013 Cédric Salvador @@ -195,13 +195,14 @@ if ($resql) if (! empty($conf->categorie->enabled)) { require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php'; + $moreforfilter.='
    '; $moreforfilter.=$langs->trans('Categories'). ': '; $moreforfilter.=$htmlother->select_categories(Categorie::TYPE_SUPPLIER,$search_categ,'search_categ',1); - $moreforfilter.='       '; + $moreforfilter.='
    '; } if ($moreforfilter) { - print '
    '; + print '
    '; print $moreforfilter; $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook @@ -209,8 +210,8 @@ if ($resql) print '
    '; } - print ''; - + print '
    '; + print ''; print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$param,'valign="middle"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Zip"),$_SERVER["PHP_SELF"],"s.zip","",$param,'valign="middle"',$sortfield,$sortorder); @@ -238,7 +239,7 @@ if ($resql) print ''; print ''; print ''; - print ''; + $moreforfilter.=''; } */ if (! empty($moreforfilter)) { - print '
    '; + print '
    '; print $moreforfilter; $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook @@ -349,10 +345,29 @@ if ($resql) print '
    '; } - print '
    '; - print $form->select_country($search_country,'search_country'); + print $form->select_country($search_country,'search_country','',0,'maxwidth100'); print ''; diff --git a/htdocs/holiday/list.php b/htdocs/holiday/list.php index ee4465a4aee..419fabf9087 100644 --- a/htdocs/holiday/list.php +++ b/htdocs/holiday/list.php @@ -218,26 +218,13 @@ if ($id > 0) $title = $langs->trans("User"); dol_fiche_head($head, 'paidholidays', $title, 0, 'user'); - print ''; - - // Ref - print ''; - print ''; - print ''; - - // LastName - print ''; - print ''; - print "\n"; - - // FirstName - print ''; - print ''; - print "\n"; - - print '
    '.$langs->trans("Ref").''; - print $form->showrefnav($fuser,'id','',$user->rights->user->user->lire || $user->admin); - print '
    '.$langs->trans("LastName").''.$fuser->lastname.'
    '.$langs->trans("FirstName").''.$fuser->firstname.'

    '; + dol_banner_tab($fuser,'id','',$user->rights->user->user->lire || $user->admin); + + + print '
    '; + + print '
    '; + } else { diff --git a/htdocs/install/filelist.xml b/htdocs/install/filelist.xml index fb931f9fcdc..6e5416e2481 100644 --- a/htdocs/install/filelist.xml +++ b/htdocs/install/filelist.xml @@ -6873,7 +6873,7 @@ 69982f8171837cd8669bfe9c2f08dc8f ddf6dfeb77c98411b4d5434f20c24483 c23010fa68c5996cb5977f84a6bb7ceb -90a300e9bd857966226c68dca8660456 +822961d86ae558588632b3b08c085b89 d41d8cd98f00b204e9800998ecf8427e b4e9f07aa5268af49d3bb9429719b201 8293bd60fe13ac64c22f8500b346821c diff --git a/htdocs/install/mysql/data/llx_const.sql b/htdocs/install/mysql/data/llx_const.sql index 13604638f01..2c25765223e 100644 --- a/htdocs/install/mysql/data/llx_const.sql +++ b/htdocs/install/mysql/data/llx_const.sql @@ -32,7 +32,7 @@ -- Visible in misc page insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_NOT_INSTALLED','1','chaine','Setup is running',1,0); -insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_FEATURES_LEVEL','0','chaine','Level of features to show (0=stable only, 1=stable+experimental, 2=stable+experimental+development',1,0); +insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_FEATURES_LEVEL','0','chaine','Level of features to show: -1=stable+deprecated, 0=stable only (default), 1=stable+experimental, 2=stable+experimental+development',1,0); insert into llx_const (name, value, type, note, visible, entity) values ('MAILING_LIMIT_SENDBYWEB','25','chaine','Number of targets to defined packet size when sending mass email',1,0); -- Hidden and common to all entities diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index e06553afd89..0f267bd0520 100755 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -285,14 +285,16 @@ ModuleSetup=Module setup ModulesSetup=Modules setup ModuleFamilyBase=System ModuleFamilyCrm=Customer Relation Management (CRM) -ModuleFamilyProducts=Products Management -ModuleFamilyHr=Human Resource Management +ModuleFamilyProducts=Products Management (PM) +ModuleFamilyHr=Human Resource Management (HR) ModuleFamilyProjects=Projects/Collaborative work ModuleFamilyOther=Other ModuleFamilyTechnic=Multi-modules tools ModuleFamilyExperimental=Experimental modules ModuleFamilyFinancial=Financial Modules (Accounting/Treasury) ModuleFamilyECM=Electronic Content Management (ECM) +ModuleFamilyPortal=Web sites and other frontal application +ModuleFamilyInterface=Interfaces with external systems MenuHandlers=Menu handlers MenuAdmin=Menu editor DoNotUseInProduction=Do not use in production @@ -524,12 +526,12 @@ Module2400Name=Agenda Module2400Desc=Events/tasks and agenda management Module2500Name=Electronic Content Management Module2500Desc=Save and share documents -Module2600Name=API services (Web services SOAP) +Module2600Name=API/Web services (SOAP server) Module2600Desc=Enable the Dolibarr SOAP server providing API services -Module2610Name=API services (Web services REST) +Module2610Name=API/Web services (REST server) Module2610Desc=Enable the Dolibarr REST server providing API services -Module2650Name=WebServices (client) -Module2650Desc=Enable the Dolibarr web services client (Can be used to push data/requests to external servers. Supplier orders supported only for the moment) +Module2660Name=Call WebServices (SOAP client) +Module2660Desc=Enable the Dolibarr web services client (Can be used to push data/requests to external servers. Supplier orders supported only for the moment) Module2700Name=Gravatar Module2700Desc=Use online Gravatar service (www.gravatar.com) to show photo of users/members (found with their emails). Need an internet access Module2800Desc=FTP Client @@ -802,7 +804,7 @@ Permission59003=Read every user margin DictionaryCompanyType=Thirdparties type DictionaryCompanyJuridicalType=Juridical kinds of thirdparties DictionaryProspectLevel=Prospect potential level -DictionaryCanton=State/Cantons +DictionaryCanton=State/Province DictionaryRegion=Regions DictionaryCountry=Countries DictionaryCurrency=Currencies @@ -1001,6 +1003,7 @@ SystemAreaForAdminOnly=This area is available for administrator users only. None CompanyFundationDesc=Edit on this page all known information of the company or foundation you need to manage (For this, click on "Modify" button at bottom of page) DisplayDesc=You can choose each parameter related to the Dolibarr look and feel here AvailableModules=Available modules +DeprecatedModules=Deprecated modules ToActivateModule=To activate modules, go on setup Area (Home->Setup->Modules). SessionTimeOut=Time out for session SessionExplanation=This number guarantee that session will never expire before this delay, if the session cleaner is done by Internal PHP session cleaner (and nothing else). Internal PHP session cleaner does not guaranty that session will expire just after this delay. It will expire, after this delay, and when the session cleaner is ran, so every %s/%s access, but only during access made by other sessions.
    Note: on some servers with an external session cleaning mechanism (cron under debian, ubuntu ...), the sessions can be destroyed after a period defined by the default session.gc_maxlifetime, no matter what the value entered here. @@ -1689,3 +1692,4 @@ MailToSendSupplierRequestForQuotation=To send quotation request to supplier MailToSendSupplierOrder=To send supplier order MailToSendSupplierInvoice=To send supplier invoice MailToThirdparty=To send email from thirdparty page +ByDefaultInList=Show by default on list view \ No newline at end of file diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang index 3bd16069036..a73ed322cba 100644 --- a/htdocs/langs/en_US/companies.lang +++ b/htdocs/langs/en_US/companies.lang @@ -64,6 +64,7 @@ UserTitle=Title Surname=Surname/Pseudo Address=Address State=State/Province +StateShort=State Region=Region Country=Country CountryCode=Country code diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 0bd4fa7431b..ce3f8edc0d8 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -97,6 +97,7 @@ DolibarrHasDetectedError=Dolibarr has detected a technical error InformationToHelpDiagnose=This is information that can help diagnostic MoreInformation=More information TechnicalInformation=Technical information +TechnicalID=Technical ID NotePublic=Note (public) NotePrivate=Note (private) PrecisionUnitIsLimitedToXDecimals=Dolibarr was setup to limit precision of unit prices to %s decimals. diff --git a/htdocs/langs/en_US/products.lang b/htdocs/langs/en_US/products.lang index ee1b32084ff..ac04c689df4 100644 --- a/htdocs/langs/en_US/products.lang +++ b/htdocs/langs/en_US/products.lang @@ -101,6 +101,7 @@ CorrectStock=Correct stock AddPhoto=Add photo ListOfStockMovements=List of stock movements BuyingPrice=Buying price +PriceForEachProduct=Products with specific prices SupplierCard=Supplier card CommercialCard=Commercial card AllWays=Path to find your product in stock diff --git a/htdocs/product/list.php b/htdocs/product/list.php index 68e6143c48c..d973a3d41ef 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -281,8 +281,6 @@ else print ''; print ''; - print ''; - // Filter on categories $moreforfilter=''; $colspan=6; @@ -294,19 +292,23 @@ else if (! empty($conf->categorie->enabled)) { - $moreforfilter.=$langs->trans('Categories'). ': '; + $moreforfilter.='
    '; + $moreforfilter.=$langs->trans('Categories'). ': '; $moreforfilter.=$htmlother->select_categories(Categorie::TYPE_PRODUCT,$search_categ,'search_categ',1); - $moreforfilter.='       '; + $moreforfilter.='
    '; } if ($moreforfilter) { - print ''; - print ''; + $parameters=array(); + $reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + print ''; } // Lignes des titres + print '
    '; + print '
    '; print $moreforfilter; - print '
    '; print ''; print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.ref",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Label"), $_SERVER["PHP_SELF"], "p.label",$param,"","",$sortfield,$sortorder); diff --git a/htdocs/product/reassort.php b/htdocs/product/reassort.php index 8bd2096af69..cee05f69340 100644 --- a/htdocs/product/reassort.php +++ b/htdocs/product/reassort.php @@ -215,27 +215,35 @@ if ($resql) print ''; print ''; - print '
    '; - // Filter on categories $moreforfilter=''; if (! empty($conf->categorie->enabled)) { + $moreforfilter.='
    '; $moreforfilter.=$langs->trans('Categories'). ': '; $moreforfilter.=$htmlother->select_categories(Categorie::TYPE_PRODUCT,$search_categ,'search_categ'); - $moreforfilter.='           '; + $moreforfilter.='
    '; } + + $moreforfilter.='
    '; $moreforfilter.=$langs->trans("StockTooLow").' '; - if ($moreforfilter) - { - print '
    '; - print ''; - } + $moreforfilter.=''; + + if (! empty($moreforfilter)) + { + print '
    '; + print $moreforfilter; + $parameters=array(); + $reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + print '
    '; + } + $param="&tosell=$tosell&tobuy=$tobuy".(isset($type)?"&type=$type":"")."&fourn_id=$fourn_id&snom=$snom&sref=$sref"; - + + print '
    '; - print $moreforfilter; - print '
    '; + // Lignes des titres print ""; print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.ref",$param,"","",$sortfield,$sortorder); diff --git a/htdocs/product/reassortlot.php b/htdocs/product/reassortlot.php index 86410df8a00..d7f5905fbd3 100644 --- a/htdocs/product/reassortlot.php +++ b/htdocs/product/reassortlot.php @@ -227,27 +227,32 @@ if ($resql) print ''; print ''; - print '
    '; - // Filter on categories $moreforfilter=''; if (! empty($conf->categorie->enabled)) { + $moreforfilter.='
    '; $moreforfilter.=$langs->trans('Categories'). ': '; $moreforfilter.=$htmlother->select_categories(Categorie::TYPE_PRODUCT,$search_categ,'search_categ'); - $moreforfilter.='           '; + $moreforfilter.='
    '; } //$moreforfilter.=$langs->trans("StockTooLow").' '; - if ($moreforfilter) - { - print ''; - print ''; - } + + if (! empty($moreforfilter)) + { + print '
    '; + print $moreforfilter; + $parameters=array(); + $reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + print '
    '; + } + $param="&tosell=$tosell&tobuy=$tobuy".(isset($type)?"&type=$type":"")."&fourn_id=$fourn_id&snom=$snom&sref=$sref&batch=$batch&eatby=$eatby&sellby=$sellby"; + print '
    '; - print $moreforfilter; - print '
    '; + // Lignes des titres print ""; print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.ref",$param,"","",$sortfield,$sortorder); diff --git a/htdocs/product/stats/commande.php b/htdocs/product/stats/commande.php index 9491b18da1e..f90235a143f 100644 --- a/htdocs/product/stats/commande.php +++ b/htdocs/product/stats/commande.php @@ -188,7 +188,8 @@ if ($id > 0 || ! empty($ref)) } print_barre_liste($langs->trans("CustomersOrders"),$page,$_SERVER["PHP_SELF"],"&id=$product->id",$sortfield,$sortorder,'',$num,$totalrecords,''); - print '
    '; + print '
    '; + print '
    '; print $langs->trans('Period').' ('.$langs->trans("OrderDate") .') - '; print $langs->trans('Month') . ': '; print $langs->trans('Year') . ':' . $formother->selectyear($search_year ? $search_year : - 1, 'search_year', 1, 20, 5); @@ -197,9 +198,10 @@ if ($id > 0 || ! empty($ref)) print ''; print '
    '; print '
    '; + print '
    '; $i = 0; - print '
    '; + print '
    '; print ''; print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"c.rowid","",$option,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$option,'',$sortfield,$sortorder); diff --git a/htdocs/product/stats/commande_fournisseur.php b/htdocs/product/stats/commande_fournisseur.php index e7a803c299c..3d117a7f40a 100644 --- a/htdocs/product/stats/commande_fournisseur.php +++ b/htdocs/product/stats/commande_fournisseur.php @@ -198,7 +198,8 @@ if ($id > 0 || ! empty($ref)) { } print_barre_liste($langs->trans("SuppliersOrders"), $page, $_SERVER["PHP_SELF"], "&id=$product->id", $sortfield, $sortorder, '', $num, $totalrecords, ''); - print '
    '; + print '
    '; + print '
    '; print $langs->trans('Period') . ' (' . $langs->trans("OrderDate") . ') - '; print $langs->trans('Month') . ': '; print $langs->trans('Year') . ':' . $formother->selectyear($search_year ? $search_year : - 1, 'search_year', 1, 20, 5); @@ -207,9 +208,10 @@ if ($id > 0 || ! empty($ref)) { print ''; print '
    '; print '
    '; + print '
    '; $i = 0; - print '
    '; + print '
    '; print ''; print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "c.rowid", "", $option, '', $sortfield, $sortorder); print_liste_field_titre($langs->trans("Company"), $_SERVER["PHP_SELF"], "s.nom", "", $option, '', $sortfield, $sortorder); diff --git a/htdocs/product/stats/contrat.php b/htdocs/product/stats/contrat.php index 84417c013b7..9d4d7d53abc 100644 --- a/htdocs/product/stats/contrat.php +++ b/htdocs/product/stats/contrat.php @@ -147,7 +147,7 @@ if ($id > 0 || ! empty($ref)) print_barre_liste($langs->trans("Contrats"),$page,$_SERVER["PHP_SELF"],"&id=$product->id",$sortfield,$sortorder,'',$num,0,''); $i = 0; - print "
    "; + print '
    '; print ''; print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"c.rowid","","&id=".$product->id,'',$sortfield,$sortorder); @@ -155,9 +155,9 @@ if ($id > 0 || ! empty($ref)) print_liste_field_titre($langs->trans("CustomerCode"),$_SERVER["PHP_SELF"],"s.code_client","","&id=".$product->id,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"c.date_contrat","","&id=".$product->id,'align="center"',$sortfield,$sortorder); //print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"c.amount","","&id=".$product->id,'align="right"',$sortfield,$sortorder); - print ''; - print ''; - print ''; + print_liste_field_titre($staticcontratligne->LibStatut(0,3),$_SERVER["PHP_SELF"],"",'','','width="16"',$sortfield,$sortorder,'maxwidthsearch '); + print_liste_field_titre($staticcontratligne->LibStatut(4,3),$_SERVER["PHP_SELF"],"",'','','width="16"',$sortfield,$sortorder,'maxwidthsearch '); + print_liste_field_titre($staticcontratligne->LibStatut(5,3),$_SERVER["PHP_SELF"],"",'','','width="16"',$sortfield,$sortorder,'maxwidthsearch '); print "\n"; $contratstatic=new Contrat($db); diff --git a/htdocs/product/stats/facture.php b/htdocs/product/stats/facture.php index 2a79b97e399..6fb09bffa8b 100644 --- a/htdocs/product/stats/facture.php +++ b/htdocs/product/stats/facture.php @@ -22,7 +22,7 @@ /** * \file htdocs/product/stats/facture.php * \ingroup product service facture - * \brief Page des stats des factures clients pour un produit + * \brief Page of invoice statistics for a product */ require '../../main.inc.php'; @@ -128,7 +128,8 @@ if ($id > 0 || ! empty($ref)) print ''; - if ($user->rights->facture->lire) { + if ($user->rights->facture->lire) + { $sql = "SELECT distinct s.nom as name, s.rowid as socid, s.code_client,"; $sql.= " f.facnumber, d.total_ht as total_ht,"; $sql.= " f.datef, f.paye, f.fk_statut as statut, f.rowid as facid, d.qty"; @@ -189,7 +190,8 @@ if ($id > 0 || ! empty($ref)) } print_barre_liste($langs->trans("CustomersInvoices"),$page,$_SERVER["PHP_SELF"],"&id=".$product->id,$sortfield,$sortorder,'',$num,$totalrecords,''); - print '
    '; + print '
    '; + print '
    '; print $langs->trans('Period').' ('.$langs->trans("DateInvoice") .') - '; print $langs->trans('Month') . ': '; print $langs->trans('Year') . ':' . $formother->selectyear($search_year ? $search_year : - 1, 'search_year', 1, 20, 5); @@ -198,9 +200,10 @@ if ($id > 0 || ! empty($ref)) print ''; print '
    '; print '
    '; + print '
    '; $i = 0; - print '
    '.$staticcontratligne->LibStatut(0,3).''.$staticcontratligne->LibStatut(4,3).''.$staticcontratligne->LibStatut(5,3).'
    '; + print '
    '; print ''; print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"s.rowid","",$option,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$option,'',$sortfield,$sortorder); diff --git a/htdocs/product/stats/facture_fournisseur.php b/htdocs/product/stats/facture_fournisseur.php index 9b56cee7552..677bff934a7 100644 --- a/htdocs/product/stats/facture_fournisseur.php +++ b/htdocs/product/stats/facture_fournisseur.php @@ -190,7 +190,8 @@ if ($id > 0 || ! empty($ref)) } print_barre_liste($langs->trans("SuppliersInvoices"), $page, $_SERVER["PHP_SELF"], "&id=$product->id", $sortfield, $sortorder, '', $num, $totalrecords, ''); - print '
    '; + print '
    '; + print '
    '; print $langs->trans('Period') . ' (' . $langs->trans("DateInvoice") . ') - '; print $langs->trans('Month') . ': '; print $langs->trans('Year') . ':' . $formother->selectyear($search_year ? $search_year : - 1, 'search_year', 1, 20, 5); @@ -199,9 +200,10 @@ if ($id > 0 || ! empty($ref)) print ''; print '
    '; print '
    '; + print '
    '; $i = 0; - print '
    '; + print '
    '; print ''; print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "s.rowid", "", $option, '', $sortfield, $sortorder); print_liste_field_titre($langs->trans("Company"), $_SERVER["PHP_SELF"], "s.nom", "", $option, '', $sortfield, $sortorder); diff --git a/htdocs/product/stats/propal.php b/htdocs/product/stats/propal.php index 690f9c8c421..295487344fd 100644 --- a/htdocs/product/stats/propal.php +++ b/htdocs/product/stats/propal.php @@ -191,7 +191,8 @@ if ($id > 0 || ! empty($ref)) } print_barre_liste($langs->trans("Proposals"), $page, $_SERVER["PHP_SELF"], "&id=$product->id", $sortfield, $sortorder, '', $num, $totalrecords, ''); - print '
    '; + print '
    '; + print '
    '; print $langs->trans('Period') . ' (' . $langs->trans("DatePropal") . ') - '; print $langs->trans('Month') . ': '; print $langs->trans('Year') . ':' . $formother->selectyear($search_year ? $search_year : - 1, 'search_year', 1, 20, 5); @@ -200,9 +201,10 @@ if ($id > 0 || ! empty($ref)) print ''; print '
    '; print '
    '; + print '
    '; $i = 0; - print '
    '; + print '
    '; print ''; print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.rowid", "", $option, '', $sortfield, $sortorder); print_liste_field_titre($langs->trans("Company"), $_SERVER["PHP_SELF"], "s.nom", "", $option, '', $sortfield, $sortorder); diff --git a/htdocs/projet/index.php b/htdocs/projet/index.php index 95e4ce98a5e..e316603c2b7 100644 --- a/htdocs/projet/index.php +++ b/htdocs/projet/index.php @@ -229,6 +229,7 @@ $sql.= " AND p.fk_statut = 1"; 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.= " GROUP BY s.nom, s.rowid"; +$sql.= $db->order($sortfield, $sortorder); $var=true; $resql = $db->query($sql); diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index f46c6562ae7..16fac9bb1bd 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -274,15 +274,18 @@ if ($resql) if (! empty($moreforfilter)) { print '
    '; + //print '
    '; + //print ''; + } - print '
    '; print $moreforfilter; $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; print ''; - } + //print '
    '; - + print '
    '; + print ''; print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"p.ref","",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Label"),$_SERVER["PHP_SELF"],"p.title","",$param,"",$sortfield,$sortorder); diff --git a/htdocs/projet/stats/index.php b/htdocs/projet/stats/index.php index 42d367ce833..d28d7d6f14a 100644 --- a/htdocs/projet/stats/index.php +++ b/htdocs/projet/stats/index.php @@ -269,7 +269,8 @@ dol_fiche_head($head,'byyear',$langs->trans("Statistics"), 0, ''); print '
    '; print ''; -print '
    '; + +print '
    '; print ''; // Company print '
    '.$langs->trans("Filter").'
    '.$langs->trans("ThirdParty").''; @@ -293,8 +294,8 @@ print '
    '; print ''; print '

    '; -print ''; -print ''; +print '
    '; +print ''; print ''; print ''; if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES)) @@ -305,13 +306,15 @@ if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES)) print ''; $oldyear=0; +$var=true; foreach ($data_all_year as $val) { $year = $val['year']; while ($year && $oldyear > $year+1) { // If we have empty year $oldyear--; - print ''; + $var=!$var; + print ''; print ''; if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { @@ -321,7 +324,8 @@ foreach ($data_all_year as $val) print ''; print ''; } - print ''; + $var=!$var; + print ''; print ''; print ''; if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES)) diff --git a/htdocs/projet/tasks/index.php b/htdocs/projet/tasks/index.php index 22b53d9f61c..39484f05014 100644 --- a/htdocs/projet/tasks/index.php +++ b/htdocs/projet/tasks/index.php @@ -115,7 +115,6 @@ $tasksrole=($mine ? $taskstatic->getUserRolesForProjectsOrTasks(0,$user,$project print ''; print ''; -print '
    '.$langs->trans("Year").''.$langs->trans("NbOfProjects").'
    0?'&userid='.$userid:'').'">'.$oldyear.'0
    0?'&userid='.$userid:'').'">'.$year.''.$val['nb'].'
    '; // If the user can view users if ($user->rights->user->user->lire) @@ -134,7 +133,7 @@ if ($user->rights->user->user->lire) } if (! empty($moreforfilter)) { - print '
    '; + print '
    '; print $moreforfilter; $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook @@ -142,6 +141,7 @@ if (! empty($moreforfilter)) print '
    '; } +print '
    '; print ''; print ''; print ''; diff --git a/htdocs/public/test/test_arrays.php b/htdocs/public/test/test_arrays.php index d31b10ff5ef..2801ebb8855 100644 --- a/htdocs/public/test/test_arrays.php +++ b/htdocs/public/test/test_arrays.php @@ -146,9 +146,7 @@ $nav.=''; print_barre_liste('Title of my list', 3, $_SERVER["PHP_SELF"], '', '', '', 'Text in middle', 20, 5000, '', 0, $nav); -?> -
    '.$langs->trans("Project").''.$langs->trans("ProjectStatus").'
    -'; $moreforfilter.=$langs->trans('This is a select list for a filter A'). ': '; $cate_arbo = array('field1'=>'value1a into the select list A','field2'=>'value2a'); @@ -175,11 +173,15 @@ $moreforfilter.=''; if (! empty($moreforfilter)) { - print ''; - print ''; + $parameters=array(); + $reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + print ''; } + +print '
    '; + print '
    '; print $moreforfilter; - print '
    '; ?> trans('title1'),0,$_SERVER["PHP_SELF"],'aaa','','','align="left"',$sortfield,$sortorder); ?> @@ -188,7 +190,9 @@ if (! empty($moreforfilter)) -
    getNomUrl(1); ?>b1c1
    a2b2c2
    +'; +?>
    diff --git a/htdocs/public/theme/common/nophoto.jpg b/htdocs/public/theme/common/nophoto.jpg deleted file mode 100644 index 14eeb1cf01f..00000000000 Binary files a/htdocs/public/theme/common/nophoto.jpg and /dev/null differ diff --git a/htdocs/public/theme/common/nophoto.png b/htdocs/public/theme/common/nophoto.png new file mode 100644 index 00000000000..bce088ef784 Binary files /dev/null and b/htdocs/public/theme/common/nophoto.png differ diff --git a/htdocs/societe/agenda.php b/htdocs/societe/agenda.php index 847c23c6719..b35715ce1ab 100644 --- a/htdocs/societe/agenda.php +++ b/htdocs/societe/agenda.php @@ -80,14 +80,15 @@ if ($socid) dol_fiche_head($head, 'agenda', $langs->trans("ThirdParty"),0,'company'); - print ''; - - print ''; + dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom'); + + print '
    '; + + print '
    '; + print '
    '.$langs->trans("ThirdPartyName").''; - print $form->showrefnav($object,'socid','',($user->societe_id?0:1),'rowid','nom'); - print '
    '; // Alias names (commercial, trademark or alias names) - print '"; @@ -114,47 +115,11 @@ if ($socid) print ''; } - if (! empty($conf->barcode->enabled)) - { - print ''; - } - - print ""; - - // Zip / Town - print '"; - print '"; - - // Country - if ($object->country) { - print ''; - } - - // EMail - print ''; - - // Web - print ''; - - // Phone / Fax - print ''; - print ''; - print '
    '.$langs->trans('AliasNames').''; + print '
    '.$langs->trans('AliasNames').''; print $object->name_alias; print "
    '.$langs->trans('Gencod').''.$object->barcode.'
    ".$langs->trans('Address').""; - dol_print_address($object->address, 'gmap', 'thirdparty', $object->id); - print "
    '.$langs->trans('Zip').''.$object->zip."'.$langs->trans('Town').''.$object->town."
    '.$langs->trans('Country').''; - //$img=picto_from_langcode($object->country_code); - $img=''; - print ($img?$img.' ':''); - print $object->country; - print '
    '.$langs->trans('EMail').''; - print dol_print_email($object->email,0,$object->id,'AC_EMAIL'); - print '
    '.$langs->trans('Web').''; - print dol_print_url($object->url); - print '
    '.$langs->trans('Phone').''.dol_print_phone($object->phone,$object->country_code,0,$object->id,'AC_TEL').''.$langs->trans('Fax').''.dol_print_phone($object->fax,$object->country_code,0,$object->id,'AC_FAX').'
    '; print ''; + dol_fiche_end(); /* * Barre d'action diff --git a/htdocs/societe/commerciaux.php b/htdocs/societe/commerciaux.php index 05679cef5bb..12a1612ab1d 100644 --- a/htdocs/societe/commerciaux.php +++ b/htdocs/societe/commerciaux.php @@ -33,7 +33,7 @@ $langs->load("suppliers"); $langs->load("banks"); // Security check -$socid = isset($_GET["socid"])?$_GET["socid"]:''; +$socid = GETPOST("socid"); if ($user->societe_id) $socid=$user->societe_id; $result = restrictedArea($user, 'societe','',''); @@ -50,18 +50,18 @@ if($_GET["socid"] && $_GET["commid"]) if ($user->rights->societe->creer) { - $soc = new Societe($db); - $soc->id = $_GET["socid"]; - $soc->fetch($_GET["socid"]); + $object = new Societe($db); + $object->id = $_GET["socid"]; + $object->fetch($_GET["socid"]); $parameters=array('id'=>$_GET["commid"]); - $reshook=$hookmanager->executeHooks('doActions',$parameters,$soc,$action); // Note that $action and $object may have been modified by some hooks + $reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - if (empty($reshook)) $soc->add_commercial($user, $_GET["commid"]); + if (empty($reshook)) $object->add_commercial($user, $_GET["commid"]); - header("Location: commerciaux.php?socid=".$soc->id); + header("Location: commerciaux.php?socid=".$object->id); exit; } else @@ -71,23 +71,23 @@ if($_GET["socid"] && $_GET["commid"]) } } -if($_GET["socid"] && $_GET["delcommid"]) +if ($socid && $_GET["delcommid"]) { $action = 'delete'; if ($user->rights->societe->creer) { - $soc = new Societe($db); - $soc->id = $_GET["socid"]; - $soc->fetch($_GET["socid"]); + $object = new Societe($db); + $object->id = $_GET["socid"]; + $object->fetch($_GET["socid"]); $parameters=array('id'=>$_GET["delcommid"]); - $reshook=$hookmanager->executeHooks('doActions',$parameters,$soc,$action); // Note that $action and $object may have been modified by some hooks + $reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - if (empty($reshook)) $soc->del_commercial($user, $_GET["delcommid"]); + if (empty($reshook)) $object->del_commercial($user, $_GET["delcommid"]); - header("Location: commerciaux.php?socid=".$soc->id); + header("Location: commerciaux.php?socid=".$object->id); exit; } else @@ -107,63 +107,44 @@ llxHeader('',$langs->trans("ThirdParty"),$help_url); $form = new Form($db); -if ($_GET["socid"]) +if ($socid) { - $soc = new Societe($db); - $soc->id = $_GET["socid"]; - $result=$soc->fetch($_GET["socid"]); + $object = new Societe($db); + $result=$object->fetch($socid); $action='view'; - $head=societe_prepare_head2($soc); + $head=societe_prepare_head2($object); dol_fiche_head($head, 'salesrepresentative', $langs->trans("ThirdParty"),0,'company'); - /* - * Fiche societe en mode visu - */ + dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom'); + + print '
    '; - print ''; - - print ''; - print ''; + print '
    '; + print '
    '.$langs->trans('ThirdPartyName').''; - print $form->showrefnav($soc,'socid','',($user->societe_id?0:1),'rowid','nom'); - print '
    '; print ''; - print 'global->SOCIETE_USEPREFIX)?' colspan="3"':'').'>'; - print $soc->code_client; - if ($soc->check_codeclient() <> 0) print ' '.$langs->trans("WrongCustomerCode"); + print 'global->SOCIETE_USEPREFIX)?' colspan="3"':'').'>'; + print $object->code_client; + if ($object->check_codeclient() <> 0) print ' '.$langs->trans("WrongCustomerCode"); print ''; if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field { - print ''; + print ''; } print ''; print ''; - print ""; - - print '"; - print '"; - - print ''; - - print ''; - print ''; - - print ''; - // Liste les commerciaux - print ''; + print ''; print '
    '.$langs->trans('CustomerCode').''.$langs->trans('CustomerCode').''.$langs->trans('Prefix').''.$soc->prefix_comm.''.$langs->trans('Prefix').''.$object->prefix_comm.'
    ".$langs->trans('Address')."".nl2br($soc->address)."
    '.$langs->trans('Zip').''.$soc->zip."'.$langs->trans('Town').''.$soc->town."
    '.$langs->trans('Country').''.$soc->country.'
    '.$langs->trans('Phone').''.dol_print_phone($soc->phone,$soc->country_code,0,$soc->id,'AC_TEL').''.$langs->trans('Fax').''.dol_print_phone($soc->fax,$soc->country_code,0,$soc->id,'AC_FAX').'
    '.$langs->trans('Web').''; - if ($soc->url) { print 'http://'.$soc->url.''; } - print '
    '.$langs->trans("SalesRepresentatives").'
    '.$langs->trans("SalesRepresentatives").''; $sql = "SELECT u.rowid, u.lastname, u.firstname"; $sql .= " FROM ".MAIN_DB_PREFIX."user as u"; $sql .= " , ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql .= " WHERE sc.fk_soc =".$soc->id; + $sql .= " WHERE sc.fk_soc =".$object->id; $sql .= " AND sc.fk_user = u.rowid"; $sql .= " ORDER BY u.lastname ASC "; dol_syslog('societe/commerciaux.php::list salesman sql = '.$sql,LOG_DEBUG); @@ -177,7 +158,7 @@ if ($_GET["socid"]) { $obj = $db->fetch_object($resql); - $parameters=array('socid'=>$soc->id); + $parameters=array('socid'=>$object->id); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$obj,$action); // Note that $action and $object may have been modified by hook if (empty($reshook)) { @@ -210,6 +191,8 @@ if ($_GET["socid"]) print '
    '; print "
    \n"; + + dol_fiche_end(); if ($user->rights->societe->creer && $user->rights->societe->client->voir) diff --git a/htdocs/societe/consumption.php b/htdocs/societe/consumption.php index e075f67cdaf..e6207782e9c 100644 --- a/htdocs/societe/consumption.php +++ b/htdocs/societe/consumption.php @@ -116,14 +116,15 @@ if (empty($socid)) $head = societe_prepare_head($object); dol_fiche_head($head, 'consumption', $langs->trans("ThirdParty"),0,'company'); +dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom'); + +print '
    '; + +print '
    '; print ''; -print ''; -print ''; // Alias names (commercial, trademark or alias names) -print ''; +print ''; print ''; if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field @@ -173,6 +174,8 @@ if ($object->fournisseur) } print '
    '.$langs->trans('ThirdPartyName').''; -print $form->showrefnav($object,'socid','',($user->societe_id?0:1),'rowid','nom'); -print '
    '.$object->name_alias.'
    '; +print '
    '; + dol_fiche_end(); print '
    '; diff --git a/htdocs/societe/document.php b/htdocs/societe/document.php index f1961e02b2d..2c951ed8670 100644 --- a/htdocs/societe/document.php +++ b/htdocs/societe/document.php @@ -109,17 +109,15 @@ if ($object->id) $totalsize+=$file['size']; } - - print ''; - - // Ref - print ''; - print ''; + dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom'); + + print '
    '; + + print '
    '; + print '
    '.$langs->trans("ThirdPartyName").''; - print $form->showrefnav($object,'socid','',($user->societe_id?0:1),'rowid','nom'); - print '
    '; // Alias names (commercial, trademark or alias names) - print '"; @@ -155,6 +153,8 @@ if ($object->id) print '
    '.$langs->trans('AliasNames').''; + print '
    '.$langs->trans('AliasNames').''; print $object->name_alias; print "
    '; + print ''; + dol_fiche_end(); $modulepart = 'societe'; diff --git a/htdocs/societe/info.php b/htdocs/societe/info.php index 198d31666c3..a415ae57b1c 100644 --- a/htdocs/societe/info.php +++ b/htdocs/societe/info.php @@ -57,6 +57,8 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e * View */ +$form=new Form($b); + $title=$langs->trans("ThirdParty"); if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name.' - '.$langs->trans("Info"); $help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; @@ -82,11 +84,21 @@ if ($socid > 0) dol_fiche_head($head, 'info', $langs->trans("ThirdParty"), 0, 'company'); + $linkback = ''.$langs->trans("BackToList").''; - print '
    '; + dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', ''); + + + print '
    '; + + print '
    '; + + print '
    '; + dol_print_object_info($object); - print '
    '; + print ''; + dol_fiche_end(); } diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index 39b625547b9..501e54cce11 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -195,7 +195,7 @@ if ($socname) /* - * Mode Liste + * Mode List */ /* REM: Regle sur droits "Voir tous les clients" @@ -208,9 +208,9 @@ $title=$langs->trans("ListOfThirdParties"); $sql = "SELECT s.rowid, s.nom as name, s.barcode, s.town, s.datec, s.code_client, s.code_fournisseur, "; $sql.= " st.libelle as stcomm, s.prefix_comm, s.client, s.fournisseur, s.canvas, s.status as status,"; -$sql.= " s.siren as idprof1, s.siret as idprof2, ape as idprof3, idprof4 as idprof4"; -$sql.= ",s.fk_pays"; -$sql.= ",typent.code as typent_code"; +$sql.= " s.siren as idprof1, s.siret as idprof2, ape as idprof3, idprof4 as idprof4,"; +$sql.= " s.fk_pays, s.tms as date_update, s.datec as date_creation,"; +$sql.= " typent.code as typent_code"; // We'll need these fields in order to filter by sale (including the case where the user can only see his prospects) if ($search_sale) $sql .= ", sc.fk_soc, sc.fk_user"; // We'll need these fields in order to filter by categ @@ -321,27 +321,23 @@ if ($resql) $moreforfilter=''; if (! empty($conf->categorie->enabled)) { + $moreforfilter.='
    '; $moreforfilter.=$langs->trans('Categories'). ': '; $moreforfilter.=$htmlother->select_categories(Categories::TYPE_CUSTOMER,$search_categ,'search_categ'); - $moreforfilter.='       '; + $moreforfilter.='
    '; } // If the user can view prospects other than his' if ($user->rights->societe->client->voir || $socid) { + $moreforfilter.='
    '; $moreforfilter.=$langs->trans('SalesRepresentatives'). ': '; $moreforfilter.=$htmlother->select_salesrepresentatives($search_sale,'search_sale',$user); - } - if ($moreforfilter) - { - print '
    '; - print $moreforfilter; - print '
    '; + // Define list of fields to show into list + $arrayfields=array( + 's.nom'=>array('label'=>$langs->trans("Company"), 'checked'=>1), + 's.barcode'=>array('label'=>$langs->trans("BarCode"), 'checked'=>1, 'cond'=>(! empty($conf->barcode->enabled))), + 's.town'=>array('label'=>$langs->trans("Town"), 'checked'=>1), + 'country.code_iso'=>array('label'=>$langs->trans("Country"), 'checked'=>1), + 'typent.code'=>array('label'=>$langs->trans("ThirdPartyType"), 'checked'=>1), + 's.siren'=>array('label'=>$langs->trans("ProfId1Short"), 'checked'=>1), + 's.siret'=>array('label'=>$langs->trans("ProfId2Short"), 'checked'=>1), + 's.ape'=>array('label'=>$langs->trans("ProfId3Short"), 'checked'=>1), + 's.idprof4'=>array('label'=>$langs->trans("ProfId4Short"), 'checked'=>1), + 's.status'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>200), + 's.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500), + 's.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500), + ); + if ($conf->global->MAIN_FEATURES_LEVEL >= 2) + { + $selectotherfields=$form->multiSelectArrayWithCheckbox('selectotherfields', $arrayfields); + } + + print '
    '; - // Lines of titles - print ''; + print ''; print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$param,"",$sortfield,$sortorder); if (! empty($conf->barcode->enabled)) print_liste_field_titre($langs->trans("BarCode"), $_SERVER["PHP_SELF"], "s.barcode",$param,'','',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"s.town","",$param,'',$sortfield,$sortorder); @@ -367,7 +382,7 @@ if ($resql) $reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"s.status","",$param,'align="right"',$sortfield,$sortorder); - print_liste_field_titre('',$_SERVER["PHP_SELF"],"",'','','',$sortfield,$sortorder,'maxwidthsearch '); + print_liste_field_titre($selectotherfields, $_SERVER["PHP_SELF"],"",'','','align="right"',$sortfield,$sortorder,'maxwidthsearch '); print "\n"; // Fields title search @@ -376,22 +391,23 @@ if ($resql) print ''; print ''; if (! empty($search_nom_only) && empty($search_nom)) $search_nom=$search_nom_only; - print ''; + + print ''; print ''; // Barcode if (! empty($conf->barcode->enabled)) { print ''; } // Town print ''; //Country print ''; //Company type print ''; // IdProf1 print ''; // IdProf2 print ''; // IdProf3 print ''; // IdProf4 print ''; // Type (customer/prospect/supplier) print '
    '; - print ''; + print ''; print ''; - print ''; + print ''; print ''; - print $form->select_country($search_country,'search_country'); + print $form->select_country($search_country,'search_country','',0,'maxwidth100'); print ''; @@ -399,19 +415,19 @@ if ($resql) print ''; - print ''; + print ''; print ''; - print ''; + print ''; print ''; - print ''; + print ''; print ''; - print ''; + print ''; print ''; diff --git a/htdocs/societe/note.php b/htdocs/societe/note.php index c7db3b66645..ceb5fa6eac5 100644 --- a/htdocs/societe/note.php +++ b/htdocs/societe/note.php @@ -75,15 +75,15 @@ if ($id > 0) print '
    '; print ''; - print ''; - - print ''; - print ''; + dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom'); + + print '
    '; + + print '
    '; + print '
    '.$langs->trans('ThirdPartyName').''; - print $form->showrefnav($object,'socid','',($user->societe_id?0:1),'rowid','nom'); - print '
    '; // Alias names (commercial, trademark or alias names) - print '"; @@ -112,9 +112,12 @@ if ($id > 0) print "
    '.$langs->trans('AliasNames').''; + print '
    '.$langs->trans('AliasNames').''; print $object->name_alias; print "
    "; + print ''; + print '
    '; - $colwidth='25'; + //$colwidth='25'; + $cssclass='titlefield'; include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php'; diff --git a/htdocs/societe/notify/card.php b/htdocs/societe/notify/card.php index 483c156907a..1b85cf36ab7 100644 --- a/htdocs/societe/notify/card.php +++ b/htdocs/societe/notify/card.php @@ -142,15 +142,15 @@ if ($result > 0) dol_fiche_head($head, 'notify', $langs->trans("ThirdParty"),0,'company'); - - print ''; - - print ''; + dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom'); + + print '
    '; + + print '
    '; + print '
    '.$langs->trans("ThirdPartyName").''; - print $form->showrefnav($object,'socid','',($user->societe_id?0:1),'rowid','nom'); - print '
    '; // Alias names (commercial, trademark or alias names) - print '"; @@ -186,6 +186,8 @@ if ($result > 0) print ''; print '
    '.$langs->trans('AliasNames').''; + print '
    '.$langs->trans('AliasNames').''; print $object->name_alias; print "
    '; + print ''; + dol_fiche_end(); // Help @@ -248,6 +250,7 @@ if ($result > 0) print '
    '; + print ''; print '
    '; diff --git a/htdocs/societe/price.php b/htdocs/societe/price.php index 20805502c11..fd41c276bf2 100644 --- a/htdocs/societe/price.php +++ b/htdocs/societe/price.php @@ -120,90 +120,58 @@ if ($action == 'update_customer_price_confirm' && ! $_POST ["cancel"] && ($user- $form = new Form($db); -$soc = new Societe($db); +$object = new Societe($db); -$result = $soc->fetch($socid); +$result = $object->fetch($socid); llxHeader("", $langs->trans("ThirdParty") . '-' . $langs->trans('PriceByCustomer')); if (! empty($conf->notification->enabled)) $langs->load("mails"); -$head = societe_prepare_head($soc); +$head = societe_prepare_head($object); dol_fiche_head($head, 'price', $langs->trans("ThirdParty"), 0, 'company'); -print ''; +dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom'); + +print '
    '; -print '
    '; +print '
    '; +print '
    ' . $langs->trans("ThirdPartyName") . ''; -print $form->showrefnav($soc, 'socid', '', ($user->societe_id ? 0 : 1), 'rowid', 'nom'); -print '
    '; // Alias names (commercial, trademark or alias names) -print '"; if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field { - print ''; + print ''; } -if ($soc->client) { +if ($object->client) { print ''; } -if ($soc->fournisseur) { +if ($object->fournisseur) { print ''; } -if (! empty($conf->barcode->enabled)) { - print ''; -} - -print ""; - -// Zip / Town -print '"; -print '"; - -// Country -if ($soc->country) { - print ''; -} - -// EMail -print ''; - -// Web -print ''; - -// Phone / Fax -print ''; -print ''; - print '
    '.$langs->trans('AliasNames').''; -print $soc->name_alias; +print '
    '.$langs->trans('AliasNames').''; +print $object->name_alias; print "
    ' . $langs->trans('Prefix') . '' . $soc->prefix_comm . '
    ' . $langs->trans('Prefix') . '' . $object->prefix_comm . '
    '; print $langs->trans('CustomerCode') . ''; - print $soc->code_client; - if ($soc->check_codeclient() != 0) + print $object->code_client; + if ($object->check_codeclient() != 0) print ' (' . $langs->trans("WrongCustomerCode") . ')'; print '
    '; print $langs->trans('SupplierCode') . ''; - print $soc->code_fournisseur; - if ($soc->check_codefournisseur() != 0) + print $object->code_fournisseur; + if ($object->check_codefournisseur() != 0) print ' (' . $langs->trans("WrongSupplierCode") . ')'; print '
    ' . $langs->trans('Gencod') . '' . $soc->barcode . '
    " . $langs->trans('Address') . ""; -dol_print_address($soc->address, 'gmap', 'thirdparty', $soc->id); -print "
    ' . $langs->trans('Zip') . '' . $soc->zip . "' . $langs->trans('Town') . '' . $soc->town . "
    ' . $langs->trans('Country') . ''; - $img = picto_from_langcode($soc->country_code); - print($img ? $img . ' ' : ''); - print $soc->country; - print '
    ' . $langs->trans('EMail') . ''; -print dol_print_email($soc->email, 0, $soc->id, 'AC_EMAIL'); -print '
    ' . $langs->trans('Web') . ''; -print dol_print_url($soc->url); -print '
    ' . $langs->trans('Phone') . '' . dol_print_phone($soc->tel, $soc->country_code, 0, $soc->id, 'AC_TEL') . '' . $langs->trans('Fax') . '' . dol_print_phone($soc->fax, $soc->country_code, 0, $soc->id, 'AC_FAX') . '
    '; print '
    '; +dol_fiche_end(); + if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { $prodcustprice = new Productcustomerprice($db); @@ -224,7 +192,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { // Build filter to diplay only concerned lines $filter = array ( - 't.fk_soc' => $soc->id + 't.fk_soc' => $object->id ); $search_soc = GETPOST('search_soc'); @@ -238,10 +206,10 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { print load_fiche_titre($langs->trans('PriceByCustomer')); - print '
    '; + print ''; print ''; print ''; - print ''; + print ''; print ''; print ''; print ''; @@ -316,7 +284,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { setEventMessage($prodcustprice->error, 'errors'); } - print ''; + print ''; print ''; print ''; print ''; @@ -456,9 +424,11 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { } print "\n" . '
    ' . "\n"; - print ''; + print ''; print "\n

    \n"; - } else { + } + else + { // View mode @@ -475,7 +445,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { $option = '&search_soc=' . $search_soc . '&id=' . $object->id; - print_barre_liste($langs->trans('PriceByCustomer'), $page, $_SERVEUR ['PHP_SELF'], $option, $sortfield, $sortorder, '', count($prodcustprice->lines), $nbtotalofrecords); + print_barre_liste($langs->trans('PriceForEachProduct'), $page, $_SERVEUR ['PHP_SELF'], $option, $sortfield, $sortorder, '', count($prodcustprice->lines), $nbtotalofrecords); if (count($prodcustprice->lines) > 0) { @@ -536,15 +506,15 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { // Action if ($user->rights->produit->creer || $user->rights->service->creer) { print ''; @@ -568,7 +538,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { print "\n" . '
    ' . "\n"; if ($user->rights->produit->creer || $user->rights->service->creer) { - print ''; + print ''; } print "\n

    \n"; } diff --git a/htdocs/societe/rib.php b/htdocs/societe/rib.php index ee4259f2e81..fd9f6b34217 100644 --- a/htdocs/societe/rib.php +++ b/htdocs/societe/rib.php @@ -42,9 +42,8 @@ $socid = GETPOST("socid"); if ($user->societe_id) $socid=$user->societe_id; $result = restrictedArea($user, 'societe','',''); -$soc = new Societe($db); -$soc->id = $_GET["socid"]; -$soc->fetch($_GET["socid"]); +$object = new Societe($db); +$object->fetch($socid); $id=GETPOST("id","int"); $ribid=GETPOST("ribid","int"); @@ -62,7 +61,7 @@ if ($action == 'update' && ! $_POST["cancel"]) $account->fetch($id); - $account->socid = $soc->id; + $account->socid = $object->id; $account->bank = $_POST["bank"]; $account->label = $_POST["label"]; @@ -93,7 +92,7 @@ if ($action == 'update' && ! $_POST["cancel"]) $account->setAsDefault($id); // This will make sure there is only one default rib } - $url=DOL_URL_ROOT.'/societe/rib.php?socid='.$soc->id; + $url=DOL_URL_ROOT.'/societe/rib.php?socid='.$object->id; header('Location: '.$url); exit; } @@ -121,7 +120,7 @@ if ($action == 'add' && ! $_POST["cancel"]) // Ajout $account = new CompanyBankAccount($db); - $account->socid = $soc->id; + $account->socid = $object->id; $account->bank = $_POST["bank"]; $account->label = $_POST["label"]; @@ -146,7 +145,7 @@ if ($action == 'add' && ! $_POST["cancel"]) } else { - $url=DOL_URL_ROOT.'/societe/rib.php?socid='.$soc->id; + $url=DOL_URL_ROOT.'/societe/rib.php?socid='.$object->id; header('Location: '.$url); exit; } @@ -159,7 +158,7 @@ if ($action == 'setasdefault') $res = $account->setAsDefault(GETPOST('ribid','int')); if ($res) { - $url=DOL_URL_ROOT.'/societe/rib.php?socid='.$soc->id; + $url=DOL_URL_ROOT.'/societe/rib.php?socid='.$object->id; header('Location: '.$url); exit; } else { @@ -175,7 +174,7 @@ if ($action == 'confirm_delete' && $_GET['confirm'] == 'yes') $result = $account->delete($user); if ($result > 0) { - $url = $_SERVER['PHP_SELF']."?socid=".$soc->id; + $url = $_SERVER['PHP_SELF']."?socid=".$object->id; header('Location: '.$url); exit; } @@ -200,27 +199,27 @@ $prelevement = new BonPrelevement($db); llxHeader(); -$head=societe_prepare_head2($soc); +$head=societe_prepare_head2($object); $account = new CompanyBankAccount($db); if (! $id) - $account->fetch(0,$soc->id); + $account->fetch(0,$object->id); else $account->fetch($id); -if (empty($account->socid)) $account->socid=$soc->id; +if (empty($account->socid)) $account->socid=$object->id; if ($socid && $action == 'edit' && $user->rights->societe->creer) { - print ''; + print ''; print ''; print ''; print ''; } if ($socid && $action == 'create' && $user->rights->societe->creer) { - print ''; + print ''; print ''; print ''; } @@ -234,17 +233,22 @@ if ($socid && $action != 'edit' && $action != "create") // Confirm delete third party if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"]."?socid=".$soc->id."&ribid=".($ribid?$ribid:$id), $langs->trans("DeleteARib"), $langs->trans("ConfirmDeleteRib", $account->getRibLabel()), "confirm_delete", '', 0, 1); + print $form->formconfirm($_SERVER["PHP_SELF"]."?socid=".$object->id."&ribid=".($ribid?$ribid:$id), $langs->trans("DeleteARib"), $langs->trans("ConfirmDeleteRib", $account->getRibLabel()), "confirm_delete", '', 0, 1); } - print load_fiche_titre($langs->trans("DefaultRIB")); + dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom'); + + print '
    '; + + print load_fiche_titre($langs->trans("DefaultRIB"), '', ''); - print '
    ' . $langs->trans('Product') . ''; - print 'id . '&prodid=' . $line->fk_product . '">'; + print 'id . '&prodid=' . $line->fk_product . '">'; print img_info(); print ''; print ' '; - print 'id . '&lineid=' . $line->id . '">'; + print 'id . '&lineid=' . $line->id . '">'; print img_edit('default', 0, 'style="vertical-align: middle;"'); print ''; print ' '; - print 'id . '&lineid=' . $line->id . '">'; + print 'id . '&lineid=' . $line->id . '">'; print img_delete('default', 'style="vertical-align: middle;"'); print ''; print '
    '; + print '
    '; + print '
    '; - print ''; + print ''; print ''; - print ''; + print ''; print ''; // Show fields of bank account @@ -350,7 +354,9 @@ if ($socid && $action != 'edit' && $action != "create") print '
    '.$langs->trans("RIBControlError").'
    '; } - print "
    "; + print ""; + + dol_fiche_end(); /* @@ -359,7 +365,7 @@ if ($socid && $action != 'edit' && $action != "create") print load_fiche_titre($langs->trans("AllRIB")); - $rib_list = $soc->get_all_rib(); + $rib_list = $object->get_all_rib(); $var = false; if (is_array($rib_list)) { @@ -397,7 +403,7 @@ if ($socid && $action != 'edit' && $action != "create") if (! empty($conf->prelevement->enabled)) { // RUM - print ''; + print ''; // FRSTRECUR print ''; @@ -406,7 +412,7 @@ if ($socid && $action != 'edit' && $action != "create") // Default print '
    '.$langs->trans("LabelRIB").'
    '.$langs->trans("LabelRIB").''.$account->label.'
    '.$langs->trans("BankName").'
    '.$langs->trans("BankName").''.$account->bank.'
    '.$prelevement->buildRumNumber($soc->code_client, $rib->datec, $rib->id).''.$prelevement->buildRumNumber($object->code_client, $rib->datec, $rib->id).''.$rib->frstrecur.''; if (!$rib->default_rib) { - print ''; + print ''; print img_picto($langs->trans("Disabled"),'off'); print ''; } else { @@ -418,13 +424,13 @@ if ($socid && $action != 'edit' && $action != "create") print ''; if ($user->rights->societe->creer) { - print ''; + print ''; print img_picto($langs->trans("Modify"),'edit'); print ''; print ' '; - print ''; + print ''; print img_picto($langs->trans("Delete"),'delete'); print ''; } @@ -444,7 +450,6 @@ if ($socid && $action != 'edit' && $action != "create") dol_print_error($db); } - dol_fiche_end(); } // Edit @@ -452,7 +457,12 @@ if ($socid && $action == 'edit' && $user->rights->societe->creer) { dol_fiche_head($head, 'rib', $langs->trans("ThirdParty"),0,'company'); - print ''; + dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom'); + + print '
    '; + + print '
    '; + print '
    '; print ''; print ''; @@ -551,7 +561,7 @@ if ($socid && $action == 'edit' && $user->rights->societe->creer) print '
    '.$langs->trans("LabelRIB").'
    '; - if (empty($account->rum)) $account->rum = $prelevement->buildRumNumber($soc->code_client, $account->datec, $account->id); + if (empty($account->rum)) $account->rum = $prelevement->buildRumNumber($object->code_client, $account->datec, $account->id); // RUM print ''; @@ -564,7 +574,9 @@ if ($socid && $action == 'edit' && $user->rights->societe->creer) print '
    '.$langs->trans("RUM").'
    '; } - dol_fiche_end(); + print ''; + + dol_fiche_end(); print '
    '; print ''; @@ -579,8 +591,12 @@ if ($socid && $action == 'create' && $user->rights->societe->creer) { dol_fiche_head($head, 'rib', $langs->trans("ThirdParty"),0,'company'); - print ''; - + dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom'); + + print '
    '; + + print '
    '; + print '
    '; print ''; print ''; @@ -657,6 +673,8 @@ if ($socid && $action == 'create' && $user->rights->societe->creer) print '
    '.$langs->trans("LabelRIB").'
    '; } + print '
    '; + dol_fiche_end(); print '
    '; @@ -686,7 +704,7 @@ if ($socid && $action != 'edit' && $action != 'create') if ($user->rights->societe->creer) { - print ''.$langs->trans("Add").''; + print ''.$langs->trans("Add").''; } print '
    '; diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 0411e974f2d..6570a737967 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -1447,6 +1447,14 @@ else print ''; + // Ref/ID + if (! empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) + { + print ''; + } + // Name print ''; print ''; @@ -1727,7 +1735,7 @@ else // Capital print ''; - print ''; + print ''; // Default language if (! empty($conf->global->MAIN_MULTILANGS)) @@ -1863,54 +1871,25 @@ else dol_htmloutput_errors($error,$errors); - $showlogo=$object->logo; - $showbarcode=empty($conf->barcode->enabled)?0:1; - if (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->barcode->lire_advance)) $showbarcode=0; - - print '
    '.$langs->trans("ID").''; + print $object->ref; + print '
    '.fieldLabel('ThirdPartyName','name',1).'
    '.fieldLabel('Capital','capital').''.$langs->trans("Currency".$conf->currency).'
    '.$langs->trans("Currency".$conf->currency).'
    '; - - // Ref - /* - print ''; - print ''; - print ''; - */ - - // Name - print ''; - print ''; - print ''; + + dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom'); + + + print '
    '; + print '
    '; + + print '
    '; + print '
    '.$langs->trans("Ref").''; - print $fuser->id; - print '
    '.$langs->trans('ThirdPartyName').''; - print $form->showrefnav($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom'); - print '
    '; // Alias names (commercial, trademark or alias names) - print '"; - // Logo+barcode - $rowspan=6; - if (! empty($conf->global->SOCIETE_USEPREFIX)) $rowspan++; - if (! empty($object->client)) $rowspan++; - if (! empty($conf->fournisseur->enabled) && $object->fournisseur && ! empty($user->rights->fournisseur->lire)) $rowspan++; - if (! empty($conf->barcode->enabled)) $rowspan++; - if (empty($conf->global->SOCIETE_DISABLE_STATE)) $rowspan++; - $htmllogobar=''; - if ($showlogo || $showbarcode) - { - $htmllogobar.=''; - } - // Prefix if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field { - print ''; + print ''; print $htmllogobar; $htmllogobar=''; print ''; } @@ -1919,7 +1898,7 @@ else if ($object->client) { print ''; @@ -1931,7 +1910,7 @@ else if (! empty($conf->fournisseur->enabled) && $object->fournisseur && ! empty($user->rights->fournisseur->lire)) { print ''; @@ -1943,71 +1922,14 @@ else if (! empty($conf->barcode->enabled)) { print ''; - print $htmllogobar; $htmllogobar=''; + if ($htmllogobar) $htmllogobar.=$form->showbarcode($object); + print $htmllogobar; + $htmllogobar=''; print ''; } - // Status - print ''; - print ''; - print $htmllogobar; $htmllogobar=''; - print ''; - - // Address - print ''; - - // Zip / Town - print ''; - print ''; - - // Country - print ''; - - // State - if (empty($conf->global->SOCIETE_DISABLE_STATE)) print ''; - - // EMail - print ''; - - // Web - print ''; - - // Skype - if (! empty($conf->skype->enabled)) - { - print ''; - } - - // Phone / Fax - print ''; - print ''; - // Prof ids $i=1; $j=0; while ($i <= 6) @@ -2015,8 +1937,9 @@ else $idprof=$langs->transcountry('ProfId'.$i,$object->country_code); if ($idprof!='-') { - if (($j % 2) == 0) print ''; - print ''; + print ''; + print ''; - if (($j % 2) == 1) print ''; + //if (($j % 2) == 1) print ''; + print ''; $j++; } $i++; } - if ($j % 2 == 1) print ''; + //if ($j % 2 == 1) print ''; // VAT payers print ''; - + print ''; + // VAT Code - print ''; + print ''; @@ -2123,7 +2049,7 @@ else } elseif($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj!="1") { - print ''; if($object->localtax1_assuj=="1" && (! isOnlyOneLocalTax(1))) @@ -2145,7 +2071,7 @@ else } elseif($mysoc->localtax2_assuj=="1" && $mysoc->localtax1_assuj!="1") { - print ''; if($object->localtax2_assuj=="1" && (! isOnlyOneLocalTax(2))) @@ -2177,22 +2103,31 @@ else // Type + Staff $arr = $formcompany->typent_array(1); $object->typent= $arr[$object->typent_code]; - print ''; + print ''; + print ''; // Legal - print ''; + print ''; // Capital - print ''; + print '
    '.$langs->trans('AliasNames').''; + print '
    '.$langs->trans('AliasNames').''; print $object->name_alias; print "
    '; - if ($showlogo) $htmllogobar.=$form->showphoto('societe',$object); - if ($showlogo && $showbarcode) $htmllogobar.='

    '; - if ($showbarcode) $htmllogobar.=$form->showbarcode($object); - $htmllogobar.='
    '.$langs->trans('Prefix').''.$object->prefix_comm.'
    '.$langs->trans('Prefix').''.$object->prefix_comm.'
    '; - print $langs->trans('CustomerCode').''; + print $langs->trans('CustomerCode').''; print $object->code_client; if ($object->check_codeclient() <> 0) print ' ('.$langs->trans("WrongCustomerCode").')'; print '
    '; - print $langs->trans('SupplierCode').''; + print $langs->trans('SupplierCode').''; print $object->code_fournisseur; if ($object->check_codefournisseur() <> 0) print ' ('.$langs->trans("WrongSupplierCode").')'; print '
    '; - print $langs->trans('Gencod').''.$object->barcode; + print $langs->trans('Gencod').''.$object->barcode; print '
    '.$langs->trans("Status").''; - if (! empty($conf->use_javascript_ajax) && $user->rights->societe->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { - print ajax_object_onoff($object, 'status', 'status', 'InActivity', 'ActivityCeased'); - } else { - print $object->getLibStatut(2); - } - print '
    '.$langs->trans('Address').''; - dol_print_address($object->address,'gmap','thirdparty',$object->id); - print '
    '.$langs->trans('Zip').' / '.$langs->trans("Town").''; - print $object->zip.($object->zip && $object->town?" / ":"").$object->town; - print '
    '.$langs->trans("Country").''; - if (! empty($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 '
    '.$langs->trans('State').''.$object->state.'
    '.$langs->trans('EMail').''; - print dol_print_email($object->email,0,$object->id,'AC_EMAIL'); - print '
    '.$langs->trans('Web').''; - print dol_print_url($object->url); - print '
    '.$langs->trans('Skype').''; - print dol_print_skype($object->skype,0,$object->id,'AC_SKYPE'); - print '
    '.$langs->trans('Phone').''.dol_print_phone($object->phone,$object->country_code,0,$object->id,'AC_TEL').''.$langs->trans('Fax').''.dol_print_phone($object->fax,$object->country_code,0,$object->id,'AC_FAX').'
    '.$idprof.''; + //if (($j % 2) == 0) print '
    '.$idprof.''; $key='idprof'.$i; print $object->$key; if ($object->$key) @@ -2025,12 +1948,13 @@ else else print ' ('.$langs->trans("ErrorWrongValue").')'; } print '
    '; @@ -2038,9 +1962,11 @@ else print ''; print yn($object->tva_assuj); print '
    '.$langs->trans('VATIntra').''; + print '
    '.$langs->trans('VATIntra').''; if ($object->tva_intra) { $s=''; @@ -2083,7 +2009,7 @@ else { print '
    '.$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code).''; print yn($object->localtax1_assuj); - print ''.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).''; + print '
    '.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).''; print yn($object->localtax2_assuj); print '
    '.$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code).''; + print '
    '.$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code).''; print yn($object->localtax1_assuj); print '
    '.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).''; + print '
    '.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).''; print yn($object->localtax2_assuj); print '
    '.$langs->trans("ThirdPartyType").''.$object->typent.''.$langs->trans("Staff").''.$object->effectif.'
    '.$langs->trans("ThirdPartyType").''.$object->typent.'
    '.$langs->trans("Staff").''.$object->effectif.'
    '.$langs->trans('JuridicalStatus').''.$object->forme_juridique.'
    '.$langs->trans('JuridicalStatus').''.$object->forme_juridique.'
    '.$langs->trans('Capital').''; + print '
    '.$langs->trans('Capital').''; if ($object->capital) print price($object->capital,'',$langs,0,-1,-1, $conf->currency); else print ' '; print '
    '; + + print ''; + print '
    '; + + print '
    '; + print ''; + // Default language if (! empty($conf->global->MAIN_MULTILANGS)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - print ''; - print '"; } @@ -2215,7 +2150,7 @@ else // Supplier if ($object->fournisseur) { print ''; - print '"; } @@ -2299,7 +2234,7 @@ else if (! empty($conf->adherent->enabled)) { $langs->load("members"); - print ''; + print ''; print '
    '.$langs->trans("DefaultLang").''; + print '
    '.$langs->trans("DefaultLang").''; //$s=picto_from_langcode($object->default_lang); //print ($s?$s.' ':''); $langs->load("languages"); @@ -2207,7 +2142,7 @@ else // Customer if ($object->prospect || $object->client) { print '
    ' . $langs->trans("CustomersCategoriesShort") . ''; + print ''; print $form->showCategories($object->id, 'customer', 1); print "
    ' . $langs->trans("SuppliersCategoriesShort") . ''; + print ''; print $form->showCategories($object->id, 'supplier', 1); print "
    '.$langs->trans("LinkedToDolibarrMember").'
    '.$langs->trans("LinkedToDolibarrMember").''; $adh=new Adherent($db); $result=$adh->fetch('','',$object->id); @@ -2323,7 +2258,11 @@ else } print '
    '; - + print '
    '; + + print '
    '; + print '
    '; + dol_fiche_end(); diff --git a/htdocs/societe/societecontact.php b/htdocs/societe/societecontact.php index 4d2382e6eee..691f930b767 100644 --- a/htdocs/societe/societecontact.php +++ b/htdocs/societe/societecontact.php @@ -148,14 +148,16 @@ if ($id > 0 || ! empty($ref)) print ''; print ''; - print ''; - print ''; - print ''; + + dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom'); + + print '
    '; + + print '
    '; + print '
    '.$langs->trans('ThirdPartyName').''; - print $form->showrefnav($object,'id','',($user->societe_id?0:1),'rowid','nom'); - print '
    '; // Alias names (commercial, trademark or alias names) - print '"; @@ -181,7 +183,11 @@ if ($id > 0 || ! empty($ref)) if ($object->check_codefournisseur() <> 0) print ' ('.$langs->trans("WrongSupplierCode").')'; print ''; } - print '
    '.$langs->trans('AliasNames').''; + print '
    '.$langs->trans('AliasNames').''; print $object->name_alias; print "
    '; + print '
    '; + + print ''; + + print ''; print '
    '; // Contacts lines (modules that overwrite templates must declare this into descriptor) diff --git a/htdocs/theme/eldy/img/list.png b/htdocs/theme/eldy/img/list.png new file mode 100644 index 00000000000..f5df34a3bc9 Binary files /dev/null and b/htdocs/theme/eldy/img/list.png differ diff --git a/htdocs/theme/eldy/img/sort_asc.png b/htdocs/theme/eldy/img/sort_asc.png index aca0f6eb77a..82b250c72bd 100644 Binary files a/htdocs/theme/eldy/img/sort_asc.png and b/htdocs/theme/eldy/img/sort_asc.png differ diff --git a/htdocs/theme/eldy/img/sort_desc.png b/htdocs/theme/eldy/img/sort_desc.png index 57c1ad0fcb4..a5aa5f4e506 100644 Binary files a/htdocs/theme/eldy/img/sort_desc.png and b/htdocs/theme/eldy/img/sort_desc.png differ diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index c7bb3e0fb91..6243abebc9c 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -452,8 +452,10 @@ textarea.centpercent { div.divsearchfield { float: ; margin-: 12px; - margin-top: 1px; - margin-bottom: 2px; + margin-: 2px; + margin-top: 4px; + margin-bottom: 4px; + padding-left: 2px; } div.confirmmessage { padding-top: 6px; @@ -487,6 +489,7 @@ div.confirmmessage { .maxwidth100 { max-width: 100px; } .maxwidth200 { max-width: 200px; } .maxwidth300 { max-width: 300px; } +.titlefield { width: 30%; } .hideonsmartphone { display: none; } .noenlargeonsmartphone { width : 50px !important; display: inline !important; } @@ -494,6 +497,7 @@ div.confirmmessage { .maxwidth100onsmartphone { max-width: 100px; } .maxwidth200onsmartphone { max-width: 200px; } .maxwidth300onsmartphone { max-width: 300px; } +.titlefield { width: auto; } .linkobject { cursor: pointer; } @@ -535,7 +539,7 @@ td.showDragHandle { float: none; vertical-align: top; } -#id-right { /* This must stay id-right ant not be replaced with echo $right */ +#id-right { /* This must stay id-right and not be replaced with echo $right */ width: 100%; } #id-left { @@ -604,6 +608,43 @@ div.attacharea { padding-bottom: 10px; } +div.arearef { + /*border-bottom: 1px solid #bbb;*/ + padding-top: 2px; + padding-bottom: 5px; + /*padding-right: 3px; + padding-left: 2px;*/ + margin-bottom: 10px; +} +div.heightref { + min-height: 80px; +} +div.divphotoref { + padding-right: 20px; +} +div.statusref { + float: right; + padding-right: 12px; + margin-top: 6px; + margin-bottom: 10px; +} +img.photoref { + border: 1px solid #CCC; + -moz-box-shadow: 3px 3px 4px #DDD; + -webkit-box-shadow: 3px 3px 4px #DDD; + box-shadow: 3px 3px 4px #DDD; + padding: 4px; + height: 80px; + width: 80px; + object-fit: contain +} +.underrefbanner { +} +.underbanner { + border-bottom: 2px solid #888; +} + + /* ============================================================================== */ /* Menu top et 1ere ligne tableau */ /* ============================================================================== */ @@ -861,7 +902,7 @@ foreach($conf->modules as $val) $mainmenuusedarray=array_unique(explode(',',$mainmenuused)); $generic=1; -$divalreadydefined=array('home','companies','products','commercial','accountancy','project','tools','members','agenda','holiday','bookmark','cashdesk','ecm','geoipmaxmind','gravatar','clicktodial','paypal','webservices'); +$divalreadydefined=array('home','companies','products','commercial','externalsite','accountancy','project','tools','members','agenda','holiday','bookmark','cashdesk','ecm','geoipmaxmind','gravatar','clicktodial','paypal','webservices'); foreach($mainmenuusedarray as $val) { if (empty($val) || in_array($val,$divalreadydefined)) continue; @@ -1492,10 +1533,10 @@ div.tabsElem { div.tabBar { color: #; - padding-top: px; - padding-left: px; - padding-right: px; - padding-bottom: px; + padding-top: px; + padding-left: px; + padding-right: px; + padding-bottom: px; margin: 0px 0px 14px 0px; -moz-border-radius:4px; -webkit-border-radius: 4px; @@ -1560,9 +1601,11 @@ a.tab:link, a.tab:visited, a.tab:hover, a.tab#active { -webkit-box-shadow: 0 -1px 4px rgba(0,0,0,.1); box-shadow: 0 -1px 4px rgba(0,0,0,.1); margin-bottom: 0 0.2em 0 0.2em !important; + border-right: 1px solid #AAA !important; border-left: 1px solid #AAA !important; border-top: 1px solid #BBB !important; + -moz-border-radius:4px 4px 0 0; -webkit-border-radius: 4px 4px 0 0; border-radius: 4px 4px 0 0; @@ -1892,10 +1935,12 @@ tr.nocellnopadd td.nobordernopadding, tr.nocellnopadd td.nocellnopadd table.border, table.dataTable, .table-border, .table-border-col, .table-key-border-col, .table-val-border-col, div.border { border: 1px solid #E0E0E0; - border-collapse: collapse; + border-collapse: collapse !important; padding: 1px 2px 1px 3px; /* t r b l */ } - +table.borderplus { + border: 1px solid #BBB; +} .border tbody tr, .border tbody tr td { height: 20px; } @@ -1925,7 +1970,7 @@ td.border, div.tagtable div div.border { } .table-key-border-col { - width: 25%; + /* width: 25%; */ vertical-align:top; } .table-val-border-col { @@ -1934,7 +1979,7 @@ td.border, div.tagtable div div.border { /* Main boxes */ -table.noborder, table.formdoc, div.noborder { +table.liste, table.noborder, table.formdoc, div.noborder { width: 100%; border-collapse: separate !important; @@ -1962,25 +2007,28 @@ table.noborder, table.formdoc, div.noborder { -webkit-box-shadow: 2px 2px 4px #CCC; box-shadow: 2px 2px 4px #CCC; - -moz-border-radius: 0.2em; +/* -moz-border-radius: 0.2em; -webkit-border-radius: 0.2em; - border-radius: 0.2em; + border-radius: 0.2em;*/ } -table.noborder tr, div.noborder form { +table.liste tr, table.noborder tr, div.noborder form { border-top-color: #FEFEFE; border-right-width: 1px; - border-right-color: #BBBBBB; + border-right-color: #BBB; border-right-style: solid; border-left-width: 1px; - border-left-color: #BBBBBB; + border-left-color: #BBB; border-left-style: solid; min-height: 20px; } -table.noborder th, table.noborder td, div.noborder form, div.noborder form div { +table.liste th, table.noborder th { + padding: 10px 2px 10px 3px; /* t r b l */ +} +table.liste td, table.noborder td, div.noborder form, div.noborder form div { padding: 5px 2px 5px 3px; /* t r b l */ } @@ -2008,42 +2056,12 @@ td.borderright { } -/* For lists */ - -table.liste { - width: 100%; - - border-collapse: collapse; - border-top-color: #FEFEFE; - - border-top-width: 1px; - border-top-color: #CCC; - border-top-style: solid; - - border-right-width: 1px; - border-right-color: #CCC; - border-right-style: solid; - -/* - border-bottom-width: 1px; - border-bottom-color: #BBBBBB; - border-bottom-style: solid; -*/ - border-left-width: 1px; - border-left-color: #CCC; - border-left-style: solid; - - margin-bottom: 2px; - margin-top: 0px; - - -moz-box-shadow: 0px 3px 4px #CCC; - -webkit-box-shadow: 0px 3px 4px #CC; - box-shadow: 0px 3px 4px #CCC; -} -table.liste td { - padding-right: 2px; +/* For table with no filter before */ +table.listwithfilterbefore { + border-top: none !important; } + .tagtable, .table-border { display: table; } .tagtr, .table-border-row { display: table-row; } .tagtd, .table-border-col, .table-key-border-col, .table-val-border-col { display: table-cell; } @@ -2051,13 +2069,18 @@ table.liste td { /* Pagination */ div.refidpadding { - padding-top: dol_use_jmobile)?'8':'12'; ?>px; + padding-top: dol_use_jmobile)?'3':'14'; ?>px; } div.refid { - padding-top: dol_use_jmobile)?'5':'12'; ?>px; font-weight: bold; color: #766; - font-size: 120%; + font-size: 160%; +} +div.refidno { + padding-top: 2px; + font-weight: normal; + color: #444; + font-size: px; } div.pagination { @@ -2110,12 +2133,19 @@ div.pagination li.pagination span { div.pagination li.pagination span.inactive { cursor: default; } +/*div.pagination li.litext { + padding-top: 8px; +}*/ div.pagination li.litext a { -border: none; + border: none; padding-right: 10px; padding-left: 4px; font-weight: bold; } +div.pagination li.litext a:hover { + background-color: transparent; + background-image: none; +} dol_use_jmobile)) { ?> div.pagination li.litext { padding-top: 13px; @@ -2285,27 +2315,28 @@ div.liste_titre { div.liste_titre { min-height: 26px !important; /* We cant use height because it's a div and it should be higher if content is more. but min-height does not work either for div */ - padding-left: 3px; padding-top: 2px; padding-bottom: 2px; border-right-width: 1px; - border-right-color: #CCC; + border-right-color: #BBB; border-right-style: solid; border-left-width: 1px; - border-left-color: #CCC; + border-left-color: #BBB; border-left-style: solid; border-top-width: 1px; - border-top-color: #CCC; + border-top-color: #BBB; border-top-style: solid; } div.liste_titre_bydiv { box-shadow: none; border-collapse: collapse; display: table; - padding: 2px 2px 2px 0; + padding: 2px 0px 2px 0; + box-shadow: 2px 2px 4px #CCC; + width: calc(100% - 1px); /* 1px more, i don't know why */ } tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.liste_titre_sel, table.dataTable.tr { @@ -2326,7 +2357,7 @@ div.liste_titre, tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.list background-image: -ms-linear-gradient(bottom, rgba(0,0,0,0.1) 0%, rgba(250,250,250,0.3) 100%); background-image: linear-gradient(bottom, rgba(0,0,0,0.1) 0%, rgba(250,250,250,0.3) 100%); - font-weight: bold; + font-weight: normal; color: #; font-family: ; @@ -2340,7 +2371,7 @@ tr.liste_titre th, th.liste_titre, form.liste_titre div, div.liste_titre tr.liste_titre th, th.liste_titre, tr.liste_titre td, td.liste_titre, form.liste_titre div, div.liste_titre { font-family: ; - font-weight: bold; + font-weight: normal; vertical-align: middle; } tr.liste_titre th a, th.liste_titre a, tr.liste_titre td a, td.liste_titre a, form.liste_titre div a, div.liste_titre a { @@ -2398,6 +2429,10 @@ div.tabBar .noborder { box-shadow: 0px 0px 0px #DDD !important; } +#tablelines tr.liste_titre td, .paymenttable tr.liste_titre td, .margintable tr.liste_titre td, .tableforservicepart1 tr.liste_titre td { + border-bottom: 1px solid #AAA !important; +} + /* * Boxes @@ -2452,7 +2487,7 @@ tr.box_titre { color: #; font-family: , sans-serif; - font-weight: bold; + /*font-weight: normal;*/ border-bottom: 1px solid #FDFFFF; white-space: nowrap; } @@ -2493,7 +2528,10 @@ tr.box_pair td, tr.box_impair td { position: relative; } - +.prod_entry_mode_free, .prod_entry_mode_predef { + height: 26px !important; + vertical-align: middle; +} @@ -3386,7 +3424,7 @@ table.dataTable tr.odd td.sorting_1, table.dataTable tr.even td.sorting_1 { background-color: #FFF !important; border-radius: inherit !important; } -.paging_full_numbers a.paginate_button_disabled:hover { +.paging_full_numbers a.paginate_button_disabled:hover, .paging_full_numbers a.disabled:hover { background-color: #FFF !important; } .paginate_button, .paginate_active { @@ -3414,7 +3452,9 @@ div.dataTables_length { div.dataTables_length select { background: #fff; } - +.dataTables_wrapper .dataTables_paginate { + padding-top: 0px !important; +} /* ============================================================================== */ /* Select2 */ @@ -3511,6 +3551,62 @@ a span.select2-chosen } +/* ============================================================================== */ +/* Multiselect with checkbox */ +/* ============================================================================== */ + +dl.dropdown { + margin:0px; + padding:0px; +} +.dropdown dd, .dropdown dt { + margin:0px; + padding:0px; +} +.dropdown ul { + margin: -1px 0 0 0; + text-align: left; +} +.dropdown dd { + position:relative; +} +.dropdown dt a { + display:block; + overflow: hidden; + border:0; +} +.dropdown dt a span, .multiSel span { + cursor:pointer; + display:inline-block; + padding: 0 3px 2px 0; +} +.dropdown dd ul { + background-color: #FFF; + border: 1px solid #888; + display:none; + right:0px; /* pop is align on right */ + padding: 2px 15px 2px 5px; + position:absolute; + top:2px; + list-style:none; + max-height: 200px; + overflow: auto; +} +.dropdown span.value { + display:none; +} +.dropdown dd ul li { + white-space: nowrap; + font-weight: normal; +} +.dropdown dd ul li a { + padding:5px; + display:block; +} +.dropdown dd ul li a:hover { + background-color:#fff; +} + /* ============================================================================== */ /* JMobile */ diff --git a/htdocs/theme/md/img/list.png b/htdocs/theme/md/img/list.png new file mode 100644 index 00000000000..f5df34a3bc9 Binary files /dev/null and b/htdocs/theme/md/img/list.png differ diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 37265b852f4..ee745437234 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -251,6 +251,7 @@ input, textarea, select { border:solid 1px rgba(0,0,0,.3); border-top:solid 1px rgba(0,0,0,.3); border-bottom:solid 1px rgba(0,0,0,.2); + background-color: #FFF; /* box-shadow: 1px 1px 1px rgba(0,0,0,.2) inset;*/ padding:4px; margin-left:1px; @@ -456,6 +457,10 @@ textarea.centpercent { div.divsearchfield { float: ; margin-: 12px; + margin-: 2px; + margin-top: 4px; + margin-bottom: 4px; + padding-left: 2px; } div.confirmmessage { padding-top: 6px; @@ -488,6 +493,7 @@ div.confirmmessage { .maxwidth100 { max-width: 100px; } .maxwidth200 { max-width: 200px; } .maxwidth300 { max-width: 300px; } +.titlefield { width: 25%; } .hideonsmartphone { display: none; } .noenlargeonsmartphone { width : 50px !important; display: inline !important; } @@ -495,6 +501,7 @@ div.confirmmessage { .maxwidth100onsmartphone { max-width: 100px; } .maxwidth200onsmartphone { max-width: 200px; } .maxwidth300onsmartphone { max-width: 300px; } +.titlefield { width: auto; } .linkobject { cursor: pointer; } @@ -651,6 +658,38 @@ div.attacharea { padding-top: 10px; padding-bottom: 10px; } +div.arearef { + /*border-bottom: 1px solid #bbb;*/ + padding-top: 2px; + padding-bottom: 5px; + /*padding-right: 3px; + padding-left: 2px;*/ + margin-bottom: 10px; +} +div.heightref { + min-height: 74px; +} +div.divphotoref { + padding-right: 20px; +} +div.statusref { + float: right; + padding-right: 12px; + margin-top: 7px; + margin-bottom: 10px; +} +img.photoref { + height: 80px; + width: 80px; + border: 1px solid #CCC; + -moz-box-shadow: 3px 3px 4px #DDD; + -webkit-box-shadow: 3px 3px 4px #DDD; + box-shadow: 3px 3px 4px #DDD; +} +.underrefbanner { + border-bottom: 2px solid #888; +} + /* ============================================================================== */ @@ -898,7 +937,7 @@ foreach($conf->modules as $val) $mainmenuusedarray=array_unique(explode(',',$mainmenuused)); $generic=1; -$divalreadydefined=array('home','companies','products','commercial','accountancy','project','tools','members','agenda','holiday','bookmark','cashdesk','ecm','geoipmaxmind','gravatar','clicktodial','paypal','webservices'); +$divalreadydefined=array('home','companies','products','commercial','externalsite','accountancy','project','tools','members','agenda','holiday','bookmark','cashdesk','ecm','geoipmaxmind','gravatar','clicktodial','paypal','webservices'); foreach($mainmenuusedarray as $val) { if (empty($val) || in_array($val,$divalreadydefined)) continue; @@ -1476,10 +1515,10 @@ div.tabsElem { margin-top: 8px; } /* To avoid overlap of tabs when not browser div.tabBar { color: #; - padding-top: 9px; - padding-left: px; - padding-right: px; - padding-bottom: 8px; + padding-top: px; + padding-left: px; + padding-right: px; + padding-bottom: px; margin: 0px 0px 14px 0px; -moz-border-radius:3px; -webkit-border-radius: 3px; @@ -1551,9 +1590,9 @@ a.tab:link, a.tab:visited, a.tab:hover, a.tab#active { -webkit-box-shadow: 0 -1px 4px rgba(0,0,0,.1); box-shadow: 0 -1px 4px rgba(0,0,0,.1); - border-right: 1px solid #CCCCCC; - border-left: 1px solid #f4f4f4; - border-top: 1px solid #D8D8D8; + border-right: 1px solid #AAA !important; + border-left: 1px solid #AAA !important; + border-top: 1px solid #BBB !important; -moz-border-radius:3px 3px 0px 0px; -webkit-border-radius:3px 3px 0px 0px; @@ -1788,7 +1827,7 @@ tr.nocellnopadd td.nobordernopadding, tr.nocellnopadd td.nocellnopadd table.border, table.dataTable, .table-border, .table-border-col, .table-key-border-col, .table-val-border-col, div.border { border: 1px solid #f4f4f4; - border-collapse: collapse; + border-collapse: collapse !important; padding: 1px 2px 1px 3px; /* t r b l */ } @@ -1822,7 +1861,7 @@ td.border, div.tagtable div div.border { /* Main boxes */ -table.noborder, table.formdoc, div.noborder { +table.liste, table.noborder, table.formdoc, div.noborder { width: 100%; border-collapse: separate !important; @@ -1856,6 +1895,9 @@ table.noborder tr, div.noborder form { height: 26px; } +table.liste th, table.noborder th { + padding: 5px 2px 5px 3px; /* t r b l */ +} table.noborder th, table.noborder td, div.noborder form, div.noborder form div { padding: 1px 2px 1px 3px; /* t r b l */ } @@ -1883,35 +1925,9 @@ td.borderright { border-right-style: solid !important; } -/* For lists */ - -table.liste { - width: 100%; - border-collapse: collapse; - border-top-color: #FEFEFE; - - border-right-width: 1px; - border-right-color: #CCC; - border-right-style: solid; - -/* - border-bottom-width: 1px; - border-bottom-color: #BBBBBB; - border-bottom-style: solid; -*/ - border-left-width: 1px; - border-left-color: #CCC; - border-left-style: solid; - - margin-bottom: 2px; - margin-top: 0px; - - -moz-box-shadow: 0px 3px 4px #CCC; - -webkit-box-shadow: 0px 3px 4px #CC; - box-shadow: 0px 3px 4px #CCC; -} -table.liste td { - padding-right: 2px; +/* For table with no filter before */ +table.listwithfilterbefore { + border-top: none !important; } .tagtable, .table-border { display: table; } @@ -1920,13 +1936,18 @@ table.liste td { /* Pagination */ div.refidpadding { - padding-top: dol_use_jmobile)?'8':'12'; ?>px; + padding-top: dol_use_jmobile)?'3':'14'; ?>px; } div.refid { - padding-top: dol_use_jmobile)?'5':'12'; ?>px; font-weight: bold; color: #766; - font-size: 120%; + font-size: 160%; +} +div.refidno { + padding-top: 2px; + font-weight: normal; + color: #444; + font-size: px; } div.pagination { @@ -2050,6 +2071,9 @@ div.pagination li.pagination .active { div.pagination li.paginationafterarrows { margin-left: 10px; } +.paginationatbottom { + margin-top: 9px; +} /* Prepare to remove class pair - impair .noborder > tbody > tr:nth-child(even) td { @@ -2139,6 +2163,29 @@ div.liste_titre .tagtd { } div.liste_titre { min-height: 26px !important; /* We cant use height because it's a div and it should be higher if content is more. but min-height doe not work either for div */ + + padding-top: 2px; + padding-bottom: 2px; + + border-right-width: 1px; + border-right-color: #BBB; + border-right-style: solid; + + border-left-width: 1px; + border-left-color: #BBB; + border-left-style: solid; + + border-top-width: 1px; + border-top-color: #BBB; + border-top-style: solid; +} +div.liste_titre_bydiv { + box-shadow: none; + border-collapse: collapse; + display: table; + padding: 2px 0px 2px 0; + box-shadow: 2px 2px 4px #CCC; + width: calc(100% - 1px); /* 1px more, i don't know why */ } tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.liste_titre_sel, table.dataTable.tr { @@ -2236,6 +2283,10 @@ div.tabBar .noborder { box-shadow: 0px 0px 0px #f4f4f4 !important; } +#tablelines tr.liste_titre td, .paymenttable tr.liste_titre td, .margintable tr.liste_titre td, .tableforservicepart1 tr.liste_titre td { + border-bottom: 1px solid #AAA !important; +} + /* * Boxes @@ -2332,6 +2383,10 @@ tr.box_pair td, tr.box_impair td { position: relative; } +.prod_entry_mode_free, .prod_entry_mode_predef { + height: 26px !important; + vertical-align: middle; +} @@ -2425,7 +2480,12 @@ td.legendLabel { padding: 2px 2px 2px 0 !important; } margin-bottom: 2px; margin-top: 2px; } -.photointooltip { +.photowithmargin { +/* -webkit-box-shadow: 0px 0px 3px #777; + -moz-box-shadow: 0px 0px 3px #777; + box-shadow: 0px 0px 3px #777;*/ +} +.photointoolitp { margin-top: 8px; float: left; /*text-align: center; */ @@ -3221,7 +3281,7 @@ table.dataTable tr.odd td.sorting_1, table.dataTable tr.even td.sorting_1 { background-color: #FFF !important; border-radius: inherit !important; } -.paging_full_numbers a.paginate_button_disabled:hover { +.paging_full_numbers a.paginate_button_disabled:hover, .paging_full_numbers a.disabled:hover { background-color: #FFF !important; } .paginate_button, .paginate_active { @@ -3242,10 +3302,26 @@ table.dataTable tr.odd td.sorting_1, table.dataTable tr.even td.sorting_1 { background-image: none; } +div.dataTables_length { + float: right !important; + padding-left: 8px; +} +div.dataTables_length select { + background: #fff; +} +.dataTables_wrapper .dataTables_paginate { + padding-top: 0px !important; +} + + /* ============================================================================== */ /* Select2 */ /* ============================================================================== */ +.selectoptiondisabledwhite { + background: #FFFFFF !important; +} + .select2-choice, .select2-drop.select2-drop-above.select2-drop-active, .select2-container-active .select2-choice, @@ -3333,6 +3409,63 @@ a span.select2-chosen } +/* ============================================================================== */ +/* Multiselect with checkbox */ +/* ============================================================================== */ + +dl.dropdown { + margin:0px; + padding:0px; +} +.dropdown dd, .dropdown dt { + margin:0px; + padding:0px; +} +.dropdown ul { + margin: -1px 0 0 0; + text-align: left; +} +.dropdown dd { + position:relative; +} +.dropdown dt a { + display:block; + overflow: hidden; + border:0; +} +.dropdown dt a span, .multiSel span { + cursor:pointer; + display:inline-block; + padding: 0 3px 2px 0; +} +.dropdown dd ul { + background-color: #FFF; + border: 1px solid #888; + display:none; + right:0px; /* pop is align on right */ + padding: 2px 15px 2px 5px; + position:absolute; + top:2px; + list-style:none; + max-height: 200px; + overflow: auto; +} +.dropdown span.value { + display:none; +} +.dropdown dd ul li { + white-space: nowrap; + font-weight: normal; +} +.dropdown dd ul li a { + padding:5px; + display:block; +} +.dropdown dd ul li a:hover { + background-color:#fff; +} + + /* ============================================================================== */ /* JMobile */ /* ============================================================================== */ @@ -3559,7 +3692,7 @@ border-top-right-radius: 6px; #tooltip { position: absolute; width: px; - } + } } @media only screen and (max-width: 570px) { @@ -3573,7 +3706,7 @@ border-top-right-radius: 6px; #tooltip { position: absolute; width: px; - } + } } diff --git a/htdocs/user/agenda_extsites.php b/htdocs/user/agenda_extsites.php index cd38d7a2965..ea8c1978677 100644 --- a/htdocs/user/agenda_extsites.php +++ b/htdocs/user/agenda_extsites.php @@ -49,8 +49,8 @@ $colorlist=array('BECEDD','DDBECE','BFDDBE','F598B4','F68654','CBF654','A4A4A5') // Security check $id = GETPOST('id','int'); -$fuser = new User($db); -$fuser->fetch($id); +$object = new User($db); +$object->fetch($id); // Security check $socid=0; @@ -63,7 +63,7 @@ if ($user->id == $id) // A user can always read its own card $result = restrictedArea($user, 'user', $id, 'user&user', $feature2); // If user is not user that read and no permission to read other users, we stop -if (($fuser->id != $user->id) && (! $user->rights->user->user->lire)) +if (($object->id != $user->id) && (! $user->rights->user->user->lire)) accessforbidden(); @@ -108,7 +108,7 @@ if ($actionsave) if (! $error) { - $result=dol_set_user_param($db, $conf, $fuser, $tabparam); + $result=dol_set_user_param($db, $conf, $object, $tabparam); if (! $result > 0) $error++; } @@ -141,10 +141,16 @@ llxHeader('',$langs->trans("UserSetup"),'','',0,0,$arrayofjs,$arrayofcss); print '
    '; print ''; -$head=user_prepare_head($fuser); +$head=user_prepare_head($object); dol_fiche_head($head, 'extsites', $langs->trans("User"), 0, 'user'); +dol_banner_tab($object,'id','',$user->rights->user->user->lire || $user->admin); + +print '
    '; + +print '
    '; + print $langs->trans("AgendaExtSitesDesc")."
    \n"; print "
    \n"; @@ -177,15 +183,15 @@ while ($i <= $MAXAGENDA) // Nb print '
    '.$langs->trans("AgendaExtNb",$key)."'; //print $formadmin->selectColor($conf->global->$color, "google_agenda_color".$key, $colorlist); - print $formother->selectColor((GETPOST("AGENDA_EXT_COLOR_".$id.'_'.$key)?GETPOST("AGENDA_EXT_COLOR_".$id.'_'.$key):$fuser->conf->$color), "AGENDA_EXT_COLOR_".$id.'_'.$key, 'extsitesconfig', 1, '', 'hideifnotset'); + print $formother->selectColor((GETPOST("AGENDA_EXT_COLOR_".$id.'_'.$key)?GETPOST("AGENDA_EXT_COLOR_".$id.'_'.$key):$object->conf->$color), "AGENDA_EXT_COLOR_".$id.'_'.$key, 'extsitesconfig', 1, '', 'hideifnotset'); print '
    '; + dol_fiche_end(); print '
    '; diff --git a/htdocs/user/card.php b/htdocs/user/card.php index b74b921c735..25167d1fd94 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -1190,60 +1190,24 @@ else { dol_fiche_head($head, 'user', $title, 0, 'user'); - $rowspan=19; - - print ''; - - // Ref - print ''; - print ''; - print ''."\n"; - - if (isset($conf->file->main_authentication) && preg_match('/openid/',$conf->file->main_authentication) && ! empty($conf->global->MAIN_OPENIDURL_PERUSER)) $rowspan++; - if (! empty($conf->societe->enabled)) $rowspan++; - if (! empty($conf->adherent->enabled)) $rowspan++; - if (! empty($conf->skype->enabled)) $rowspan++; - if (! empty($conf->salaries->enabled) && ! empty($user->rights->salaries->read)) $rowspan = $rowspan+3; - if (! empty($conf->agenda->enabled)) $rowspan++; - - // Lastname - print ''; - print ''; - - // Photo - print ''; - - print ''."\n"; - - // Firstname - print ''; - print ''; - print ''."\n"; - - // Position/Job - print ''; - print ''; - print ''."\n"; - - // Gender - print ''; - print ''; - + dol_banner_tab($object,'id','',$user->rights->user->user->lire || $user->admin); + + + print '
    '; + print '
    '; + + print '
    '; + print '
    '.$langs->trans("Ref").''; - print $form->showrefnav($object,'id','',$user->rights->user->user->lire || $user->admin); - print '
    '.$langs->trans("Lastname").''.$object->lastname.''; - print $form->showphoto('userphoto',$object,100); - print '
    '.$langs->trans("Firstname").''.$object->firstname.'
    '.$langs->trans("PostOrFunction").''.$object->job.'
    '.$langs->trans("Gender").''; - if ($object->gender) print $langs->trans("Gender".$object->gender); - print '
    '; + // Login print ''; if (! empty($object->ldap_sid) && $object->statut==0) { - print ''; + print ''; } else { - print ''; + print ''; } print ''."\n"; @@ -1253,24 +1217,24 @@ else { if ($passDoNotExpire) { - print ''; + print ''; } else if($userChangePassNextLogon) { - print ''; + print ''; } else if($userDisabled) { - print ''; + print ''; } else { - print ''; + print ''; } } else { - print ''."\n"; + // Position/Job + print ''; + print ''; + print ''."\n"; + + // Gender + print ''; + print ''; + // API key if(! empty($conf->api->enabled) && $user->admin) { print ''; - print ''; } // Administrator - print ''."\n"; } - // Tel pro - print ''; - print ''; - print ''."\n"; - - // Tel mobile - print ''; - print ''; - print ''."\n"; - - // Fax - print ''; - print ''; - print ''."\n"; - // Skype if (! empty($conf->skype->enabled)) { print ''; - print ''; + print ''; print "\n"; } - // EMail - print ''; - print ''; - print "\n"; - // Signature - print '\n"; // Hierarchy print ''; - print ''; - print ''; print "\n"; @@ -1389,14 +1344,14 @@ else $text=$langs->trans("TJM"); print $form->textwithpicto($text, $langs->trans("TJMDescription"), 1, 'help', 'classtjm'); print ''; - print ''; print "\n"; // Salary print ''; - print ''; print "\n"; @@ -1404,7 +1359,7 @@ else // Weeklyhours print ''; - print ''; print "\n"; @@ -1413,38 +1368,39 @@ else if ($conf->salaries->enabled) { print ''; - print ''; + print ''; } // Color user if (! empty($conf->agenda->enabled)) { print ''; - print ''; print "\n"; } - // Status - print ''; - print ''; - print ''."\n"; - - print ''; - print ''; + print '
    '.$langs->trans("Login").''.$langs->trans("LoginAccountDisableInDolibarr").''.$langs->trans("LoginAccountDisableInDolibarr").''.$object->login.''.$object->login.'
    '.$langs->trans("LdapUacf_".$statutUACF).''.$langs->trans("LdapUacf_".$statutUACF).''.$langs->trans("UserMustChangePassNextLogon",$ldap->domainFQDN).''.$langs->trans("UserMustChangePassNextLogon",$ldap->domainFQDN).''.$langs->trans("LdapUacf_".$statutUACF,$ldap->domainFQDN).''.$langs->trans("LdapUacf_".$statutUACF,$ldap->domainFQDN).''.$langs->trans("DomainPassword").''.$langs->trans("DomainPassword").''; + print ''; if ($object->pass) print preg_replace('/./i','*',$object->pass); else { @@ -1281,17 +1245,28 @@ else } print '
    '.$langs->trans("PostOrFunction").''.$object->job.'
    '.$langs->trans("Gender").''; + if ($object->gender) print $langs->trans("Gender".$object->gender); + print '
    '.$langs->trans("ApiKey").''; + print ''; if (! empty($object->api_key)) print $langs->trans("Hidden"); - print ''; + print '
    '.$langs->trans("Administrator").''; + print '
    '.$langs->trans("Administrator").''; if (! empty($conf->multicompany->enabled) && $object->admin && ! $object->entity) { print $form->textwithpicto(yn($object->admin),$langs->trans("SuperAdministratorDesc"),1,"superadmin"); @@ -1310,7 +1285,7 @@ else print '
    '; $text=$langs->trans("Type"); print $form->textwithpicto($text, $langs->trans("InternalExternalDesc")); - print ''; + print ''; $type=$langs->trans("Internal"); if ($object->societe_id > 0) $type=$langs->trans("External"); print $type; @@ -1320,47 +1295,27 @@ else // Ldap sid if ($object->ldap_sid) { - print '
    '.$langs->trans("Type").''; + print '
    '.$langs->trans("Type").''; print $langs->trans("DomainUser",$ldap->domainFQDN); print '
    '.$langs->trans("PhonePro").''.dol_print_phone($object->office_phone,'',0,0,1).'
    '.$langs->trans("PhoneMobile").''.dol_print_phone($object->user_mobile,'',0,0,1).'
    '.$langs->trans("Fax").''.dol_print_phone($object->office_fax,'',0,0,1).'
    '.$langs->trans("Skype").''.dol_print_skype($object->skype,0,0,1).''.dol_print_skype($object->skype,0,0,1).'
    '.$langs->trans("EMail").''.dol_print_email($object->email,0,0,1).'
    '.$langs->trans('Signature').''; + print '
    '.$langs->trans('Signature').''; print dol_htmlentitiesbr($object->signature); print "
    '.$langs->trans("HierarchicalResponsible").''; + print ''; if (empty($object->fk_user)) print $langs->trans("None"); else { $huser=new User($db); @@ -1379,7 +1334,7 @@ else $text=$langs->trans("THM"); print $form->textwithpicto($text, $langs->trans("THMDescription"), 1, 'help', 'classthm'); print ''; + print ''; print ($object->thm!=''?price($object->thm,'',$langs,1,-1,-1,$conf->currency):''); print '
    '; + print ''; print ($object->tjm!=''?price($object->tjm,'',$langs,1,-1,-1,$conf->currency):''); print '
    '.$langs->trans("Salary").''; + print ''; print ($object->salary!=''?price($object->salary,'',$langs,1,-1,-1,$conf->currency):''); print '
    '.$langs->trans("WeeklyHours").''; + print ''; print price2num($object->weeklyhours); print '
    '.$langs->trans("AccountancyCode").''.$object->accountancy_code.''.$object->accountancy_code.'
    '.$langs->trans("ColorUser").''; + print ''; print $formother->showColor($object->color, ''); print '
    '.$langs->trans("Status").''; - print $object->getLibStatut(4); - print '
    '.$langs->trans("LastConnexion").''.dol_print_date($object->datelastlogin,"dayhour").'
    '; + + print '
    '; + print '
    '; + + print '
    '; + print ''; + + print ''; + print ''; print "\n"; print ''; - print ''; + print ''; print "\n"; if (isset($conf->file->main_authentication) && preg_match('/openid/',$conf->file->main_authentication) && ! empty($conf->global->MAIN_OPENIDURL_PERUSER)) { print ''; - print ''; + print ''; print "\n"; } @@ -1452,7 +1408,7 @@ else if (! empty($conf->societe->enabled)) { print ''; - print ''; - print '
    '.$langs->trans("LastConnexion").''.dol_print_date($object->datelastlogin,"dayhour").'
    '.$langs->trans("PreviousConnexion").''.dol_print_date($object->datepreviouslogin,"dayhour").''.dol_print_date($object->datepreviouslogin,"dayhour").'
    '.$langs->trans("OpenIDURL").''.$object->openid.''.$object->openid.'
    '.$langs->trans("LinkToCompanyContact").''; + print ''; if (isset($object->societe_id) && $object->societe_id > 0) { $societe = new Societe($db); @@ -1480,7 +1436,7 @@ else { $langs->load("members"); print '
    '.$langs->trans("LinkedToDolibarrMember").''; + print ''; if ($object->fk_member) { $adh=new Adherent($db); @@ -1502,7 +1458,7 @@ else { if (! empty($conf->multicompany->enabled) && empty($conf->multicompany->transverse_mode) && $conf->entity == 1 && $user->admin && ! $user->entity) { - print '
    '.$langs->trans("Entity").''; + print '
    '.$langs->trans("Entity").''; if (empty($object->entity)) { print $langs->trans("AllEntities"); @@ -1517,7 +1473,7 @@ else } // Other attributes - $parameters=array('colspan' => ' colspan="2"'); + $parameters=array(); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook if (empty($reshook) && ! empty($extrafields->attribute_label)) { @@ -1525,6 +1481,11 @@ else } print "
    \n"; + print '
    '; + + print '
    '; + print '
    '; + dol_fiche_end(); @@ -1761,12 +1722,16 @@ else print ''; - print ''; - print ''; - print ''; - + // Ref/ID + if (! empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) + { + print ''; + print ''; + print ''; + } + // Lastname print ""; print ''; diff --git a/htdocs/user/clicktodial.php b/htdocs/user/clicktodial.php index 7aaaebbac3e..10e61f24129 100644 --- a/htdocs/user/clicktodial.php +++ b/htdocs/user/clicktodial.php @@ -73,49 +73,24 @@ llxHeader("","ClickToDial"); if ($id > 0) { - $fuser = new User($db); - $fuser->fetch($id); - $fuser->fetch_clicktodial(); + $object = new User($db); + $object->fetch($id); + $object->fetch_clicktodial(); - /* - * Affichage onglets - */ - $head = user_prepare_head($fuser); + $head = user_prepare_head($object); $title = $langs->trans("User"); dol_fiche_head($head, 'clicktodial', $title, 0, 'user'); - /* - * Fiche en mode visu - */ - - print '
    '.$langs->trans("Ref").''; - print $object->id; - print '
    '.$langs->trans("Ref").''; + print $object->id; + print '
    '.$langs->trans("Lastname").'
    '; - - // Ref - print ''; - print ''; - print ''; - - // Name - print ''; - print ''; - print "\n"; - - // Firstname - print ''; - print ''; - print "\n"; - - print "
    '.$langs->trans("Ref").''; - print $form->showrefnav($fuser,'id','',$user->rights->user->user->lire || $user->admin); - print '
    '.$langs->trans("Lastname").''.$fuser->lastname.'
    '.$langs->trans("Firstname").''.$fuser->firstname.'
    \n"; - print "
    \n"; - - // Edit mode + dol_banner_tab($object,'id','',$user->rights->user->user->lire || $user->admin); + + print '
    '; + + // Edit mode if ($action == 'edit') { - print ''; + print ''; print ''; print ''; print ''; @@ -124,8 +99,8 @@ if ($id > 0) { print ''; print ''; } - print ''; + print ''; print ''; + print ''; print "\n"; - print ''; + print ''; print ''; + print ''; print ''; - print ''; + print ''; print ''; + print ''; print "\n"; print '
    ClickToDial URL'; - print ''; - if (empty($conf->global->CLICKTODIAL_URL) && empty($fuser->clicktodial_url)) + print ''; + if (empty($conf->global->CLICKTODIAL_URL) && empty($object->clicktodial_url)) { $langs->load("errors"); print ''.$langs->trans("ErrorModuleSetupNotComplete").''; @@ -138,19 +113,19 @@ if ($id > 0) print '
    ClickToDial '.$langs->trans("IdPhoneCaller").'
    ClickToDial '.$langs->trans("IdPhoneCaller").''; - print '
    ClickToDial '.$langs->trans("Login").'
    ClickToDial '.$langs->trans("Login").''; - print '
    ClickToDial '.$langs->trans("Password").'
    ClickToDial '.$langs->trans("Password").''; - print '
    '; @@ -169,10 +144,10 @@ if ($id > 0) if (! empty($user->admin)) { - print "
    ClickToDial URL
    ClickToDial URL'; $url=$conf->global->CLICKTODIAL_URL; - if (! empty($fuser->clicktodial_url)) $url=$fuser->clicktodial_url; + if (! empty($object->clicktodial_url)) $url=$object->clicktodial_url; if (empty($url)) { $langs->load("errors"); @@ -180,28 +155,29 @@ if ($id > 0) } else { - print $form->textwithpicto((empty($fuser->clicktodial_url)?$langs->trans("DefaultLink").': ':'').$url,$langs->trans("ClickToDialUrlDesc")); + print $form->textwithpicto((empty($object->clicktodial_url)?$langs->trans("DefaultLink").': ':'').$url,$langs->trans("ClickToDialUrlDesc")); } print '
    ClickToDial '.$langs->trans("IdPhoneCaller").''.(! empty($fuser->clicktodial_poste)?$fuser->clicktodial_poste:'').'
    ClickToDial '.$langs->trans("IdPhoneCaller").''.(! empty($object->clicktodial_poste)?$object->clicktodial_poste:'').'
    ClickToDial '.$langs->trans("Login").''.(! empty($fuser->clicktodial_login)?$fuser->clicktodial_login:'').'
    ClickToDial '.$langs->trans("Login").''.(! empty($object->clicktodial_login)?$object->clicktodial_login:'').'
    ClickToDial '.$langs->trans("Password").''.preg_replace('/./','*',(! empty($fuser->clicktodial_password)?$fuser->clicktodial_password:'')).'
    ClickToDial '.$langs->trans("Password").''.preg_replace('/./','*',(! empty($object->clicktodial_password)?$object->clicktodial_password:'')).'
    \n"; } - print "\n"; + dol_fiche_end(); + /* * Barre d'actions @@ -210,11 +186,10 @@ if ($id > 0) if (! empty($user->admin) && $action <> 'edit') { - print ''.$langs->trans("Modify").''; + print ''.$langs->trans("Modify").''; } print "\n"; - print "
    \n"; } diff --git a/htdocs/user/document.php b/htdocs/user/document.php index 25dea7eb398..46ceb72330c 100644 --- a/htdocs/user/document.php +++ b/htdocs/user/document.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2010 Laurent Destailleur + * Copyright (C) 2004-2015 Laurent Destailleur * Copyright (C) 2005-2015 Regis Houssin * Copyright (C) 2010 Juanjo Menent * Copyright (C) 2013 Cédric Salvador @@ -121,7 +121,10 @@ if ($object->id) dol_fiche_head($head, 'document', $langs->trans("User"),0,'user'); - + dol_banner_tab($object,'id','',$user->rights->user->user->lire || $user->admin); + + print '
    '; + // Construit liste des fichiers $filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); $totalsize=0; @@ -133,20 +136,6 @@ if ($object->id) print ''; - // Reference - print ''; - print ''; - print ''; - - // Lastname - print ''; - print ''; - - // Firstname - print ''; - // Login print ''; diff --git a/htdocs/user/info.php b/htdocs/user/info.php index e2fdcc7b6ec..f069ac4782b 100644 --- a/htdocs/user/info.php +++ b/htdocs/user/info.php @@ -54,6 +54,8 @@ if (($object->id != $user->id) && (! $user->rights->user->user->lire)) * View */ +$form = new Form($db); + llxHeader(); $object->info($id); @@ -64,12 +66,24 @@ $title = $langs->trans("User"); dol_fiche_head($head, 'info', $title, 0, 'user'); -print '
    '.$langs->trans('Ref').''; - print $form->showrefnav($object,'id','',$user->rights->user->user->lire || $user->admin); - print '
    '.$langs->trans("Lastname").''.$object->lastname.' 
    '.$langs->trans("Firstname").''.$object->firstname.' 
    '.$langs->trans("Login").''.$object->login.' 
    '; +$linkback = ''.$langs->trans("BackToList").''; + +dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', ''); + + +print '
    '; + +print '
    '; + +print '
    '; + dol_print_object_info($object); -print '
    '; print ''; -$db->close(); + +dol_fiche_end(); + llxFooter(); +$db->close(); diff --git a/htdocs/user/ldap.php b/htdocs/user/ldap.php index 0ee41812c29..3445ab44959 100644 --- a/htdocs/user/ldap.php +++ b/htdocs/user/ldap.php @@ -89,27 +89,14 @@ $head = user_prepare_head($object); $title = $langs->trans("User"); dol_fiche_head($head, 'ldap', $title, 0, 'user'); +dol_banner_tab($object,'id','',$user->rights->user->user->lire || $user->admin); + +print '
    '; + print ''; -// Ref -print ''; -print ''; -print ''; - -// Lastname -print ''; -print ''; -print "\n"; - -// Firstname -print ''; -print ''; -print "\n"; - // Login -print ''; +print ''; if ($object->ldap_sid) { print ''; diff --git a/htdocs/user/note.php b/htdocs/user/note.php index 7fe5766cd3a..3aec8502ac1 100644 --- a/htdocs/user/note.php +++ b/htdocs/user/note.php @@ -87,33 +87,21 @@ if ($id) $title = $langs->trans("User"); dol_fiche_head($head, 'note', $title, 0, 'user'); - if ($msg) print '
    '.$msg.'
    '; - - print ""; + dol_banner_tab($object,'id','',$user->rights->user->user->lire || $user->admin); + + print '
    '; + + print ""; print ''; print '
    '.$langs->trans("Ref").''; -print $form->showrefnav($object,'id','',$user->rights->user->user->lire || $user->admin); -print '
    '.$langs->trans("Lastname").''.$object->lastname.'
    '.$langs->trans("Firstname").''.$object->firstname.'
    '.$langs->trans("Login").'
    '.$langs->trans("Login").''.$langs->trans("LoginAccountDisableInDolibarr").'
    '; - // Reference - print ''; - print ''; - print ''; - - // Lastname - print ''; - print ''; - - // Firstname - print ''; - // Login - print ''; + print ''; // Note print ''; - print '
    '.$langs->trans('Ref').''; - print $form->showrefnav($object,'id','',$user->rights->user->user->lire || $user->admin); - print '
    '.$langs->trans("Lastname").''.$object->lastname.' 
    '.$langs->trans("Firstname").''.$object->firstname.' 
    '.$langs->trans("Login").''.$object->login.' 
    '.$langs->trans("Login").''.$object->login.' 
    '.$langs->trans("Note").''; + print ''; if ($action == 'edit' && $user->rights->user->user->creer) { print ""; diff --git a/htdocs/user/param_ihm.php b/htdocs/user/param_ihm.php index 9e67a1015c7..ef803992d00 100644 --- a/htdocs/user/param_ihm.php +++ b/htdocs/user/param_ihm.php @@ -136,33 +136,18 @@ if ($action == 'edit') } -dol_fiche_head($head, 'guisetup', $title, 0, 'user'); - - -print ''; - -// Ref -print ''; -print ''; -print ''; - -// LastName -print ''; -print ''; -print "\n"; - -// FirstName -print ''; -print ''; -print "\n"; - -print '
    '.$langs->trans("Ref").''; -print $form->showrefnav($object,'id','',$user->rights->user->user->lire || $user->admin); -print '
    '.$langs->trans("LastName").''.$object->lastname.'
    '.$langs->trans("FirstName").''.$object->firstname.'

    '; - - if ($action == 'edit') { + dol_fiche_head($head, 'guisetup', $title, 0, 'user'); + + dol_banner_tab($object,'id','',$user->rights->user->user->lire || $user->admin); + + + print '
    '; + + print '
    '; + + if (! empty($conf->use_javascript_ajax)) {/* print '