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/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/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 2f495e60bf7..d89360631db 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -195,9 +195,10 @@ 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)) { @@ -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/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/list.php b/htdocs/comm/list.php index fcc1783daf5..1cc0f2fa968 100644 --- a/htdocs/comm/list.php +++ b/htdocs/comm/list.php @@ -193,15 +193,18 @@ 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) { @@ -213,7 +216,7 @@ if ($result) print ''; } - print '
'."\n"; + print '
'; print ''; print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$param,"",$sortfield,$sortorder); 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 '
'.$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 670d170de97..2282b39420e 100644 --- a/htdocs/comm/prospect/list.php +++ b/htdocs/comm/prospect/list.php @@ -359,15 +359,18 @@ 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) { @@ -379,7 +382,7 @@ 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); diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index c4ea9cbf838..29d58eaf467 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -273,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'; @@ -301,7 +301,7 @@ if ($resql) print ''; } - 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); 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 '
'; + 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/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 '
'.$langs->trans("Year").''.$langs->trans("NbOfOrders").'%%
0?'&userid='.$userid:'').'">'.$oldyear.'0
0?'&userid='.$userid:'').'">'.$year.''.$val['nb'].''.round($val['nb_diff']).''; - 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..b78b31d1a02 100644 --- a/htdocs/compta/facture/mergepdftool.php +++ b/htdocs/compta/facture/mergepdftool.php @@ -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/list.php b/htdocs/contact/list.php index 649179c1082..4082ebbae80 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -288,9 +288,10 @@ if ($result) if (! empty($conf->categorie->enabled)) { require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php'; - $moreforfilter.=$langs->trans('Categories'). ': '; + $moreforfilter.='
'; + $moreforfilter.=$langs->trans('Categories'). ': '; $moreforfilter.=$formother->select_categories(Categorie::TYPE_CONTACT,$search_categ,'search_categ',1); - $moreforfilter.='       '; + $moreforfilter.='
'; } if ($moreforfilter) { @@ -299,7 +300,7 @@ if ($result) print ''; } - 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 '
'; + 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 ''; - print ''; + $moreforfilter.=''; } */ if (! empty($moreforfilter)) @@ -349,10 +345,29 @@ if ($resql) print ''; } - 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/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/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 8cc9eaa09a0..4aea23291c2 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -4591,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 @@ -5202,8 +5282,8 @@ class Form } else { - $nophoto='/public/theme/common/nophoto.jpg'; - if (in_array($modulepart,array('userphoto','contact'))) // For module that are "physical" users + $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'; if ($object->gender == 'man') $nophoto='/public/theme/common/user_man.png'; diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index aba18765777..d7fbaedfeba 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -632,40 +632,6 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') 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"; @@ -683,6 +649,39 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') $var=true; if ($num) { + 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) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 443749dd271..7f4a1b8d855 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -915,7 +915,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; @@ -925,10 +925,10 @@ 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->town?(($object->zip?' ':'').$object->town):''); if ($object->state && in_array($object->country_code,$countriesusingstate)) { - $ret.=", ".$object->state; + $ret.=($ret?", ":'').$object->state; } } if (! is_object($outputlangs)) $outputlangs=$langs; @@ -2680,7 +2680,8 @@ function getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $m $sortorder=strtoupper($sortorder); $out=''; - + $sortimg=''; + $tag='th'; if ($thead==2) $tag='div'; @@ -2689,25 +2690,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); @@ -2715,27 +2724,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/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php index cb62b63377f..10b97265a93 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"); 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/modWebServicesClient.class.php b/htdocs/core/modules/modWebServicesClient.class.php index dd13d8920db..307f3420640 100644 --- a/htdocs/core/modules/modWebServicesClient.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 */ 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/fourn/list.php b/htdocs/fourn/list.php index 5693031c630..8fb33850919 100644 --- a/htdocs/fourn/list.php +++ b/htdocs/fourn/list.php @@ -195,9 +195,10 @@ 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) { @@ -209,8 +210,8 @@ if ($resql) print '
'; } - print '
'.$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:'').'
'; - 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 '
'; - + 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); 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/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/list.php b/htdocs/projet/list.php index 8e98bf9e93f..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 082fbdd8d7b..39484f05014 100644 --- a/htdocs/projet/tasks/index.php +++ b/htdocs/projet/tasks/index.php @@ -141,7 +141,7 @@ if (! empty($moreforfilter)) print ''; } -print '
'.$langs->trans("Year").''.$langs->trans("NbOfProjects").'
0?'&userid='.$userid:'').'">'.$oldyear.'0
0?'&userid='.$userid:'').'">'.$year.''.$val['nb'].'
'; +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/list.php b/htdocs/societe/list.php index a5792642a64..501e54cce11 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -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,22 +321,18 @@ 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,18 +391,19 @@ 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 ''; // IdProf1 print ''; // IdProf2 print ''; // IdProf3 print ''; // IdProf4 print ''; // Type (customer/prospect/supplier) print '
'; - print ''; + print ''; print ''; - print ''; + print ''; print ''; @@ -399,19 +415,19 @@ if ($resql) print ''; - print ''; + print ''; print ''; - print ''; + print ''; print ''; - print ''; + print ''; print ''; - print ''; + print ''; print ''; 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 d768f446a0d..98713d0a77a 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: 3px; + margin-bottom: 3px; + padding-left: 2px; } div.confirmmessage { padding-top: 6px; @@ -535,7 +537,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 { @@ -613,7 +615,7 @@ div.arearef { margin-bottom: 10px; } div.heightref { - min-height: 74px; + min-height: 80px; } div.divphotoref { padding-right: 10px; @@ -625,12 +627,14 @@ div.statusref { margin-bottom: 10px; } img.photoref { - height: 68px; - width: 68px; 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 { border-bottom: 2px solid #888; @@ -1592,9 +1596,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; @@ -1924,10 +1930,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; } @@ -1966,7 +1974,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; @@ -1994,25 +2002,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 */ } @@ -2040,42 +2051,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; } @@ -2323,27 +2304,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 { @@ -2436,6 +2418,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 @@ -3424,7 +3410,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 { @@ -3452,7 +3438,9 @@ div.dataTables_length { div.dataTables_length select { background: #fff; } - +.dataTables_wrapper .dataTables_paginate { + padding-top: 0px !important; +} /* ============================================================================== */ /* Select2 */ @@ -3549,6 +3537,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 0db79b5470a..65c65bdfd98 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: 3px; + margin-bottom: 3px; + padding-left: 2px; } div.confirmmessage { padding-top: 6px; @@ -1551,9 +1556,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 +1793,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 +1827,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 +1861,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 +1891,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; } @@ -2050,6 +2032,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 +2124,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 +2244,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 @@ -2425,7 +2437,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 +3238,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 +3259,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 +3366,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 +3649,7 @@ border-top-right-radius: 6px; #tooltip { position: absolute; width: px; - } + } } @media only screen and (max-width: 570px) { @@ -3573,7 +3663,7 @@ border-top-right-radius: 6px; #tooltip { position: absolute; width: px; - } + } } diff --git a/htdocs/viewimage.php b/htdocs/viewimage.php index f9f2b54b292..3f3d7cc27df 100644 --- a/htdocs/viewimage.php +++ b/htdocs/viewimage.php @@ -173,7 +173,7 @@ else // Open and return file // This test is to avoid error images when image is not available (for example thumbs). if (! dol_is_file($original_file)) { - $original_file=DOL_DOCUMENT_ROOT.'/public/theme/common/nophoto.jpg'; + $original_file=DOL_DOCUMENT_ROOT.'/public/theme/common/nophoto.png'; /*$error='Error: File '.$_GET["file"].' does not exists or filesystems permissions are not allowed'; dol_print_error(0,$error); print $error; diff --git a/test/phpunit/ModulesTest.php b/test/phpunit/ModulesTest.php index 3c8b96ffe2a..9210ae1a46a 100755 --- a/test/phpunit/ModulesTest.php +++ b/test/phpunit/ModulesTest.php @@ -133,7 +133,7 @@ class ModulesTest extends PHPUnit_Framework_TestCase 'Facture','Fckeditor','Ficheinter','Fournisseur','FTP','GeoIPMaxmind','Gravatar','Holiday','Import','Label','Ldap', 'Mailing','MailmanSpip','Margin', 'Notification','OpenSurvey','Paybox','Paypal','Prelevement','Product','ProductBatch','Projet','Propale', - 'Salaries','Service','Skype','Societe','Stock','SyncSupplierWebServices','Syslog','Tax','User','WebServices','Workflow'); + 'Salaries','Service','Skype','Societe','Stock','WebServicesClient','Syslog','Tax','User','WebServices','Workflow'); foreach($modulelist as $modlabel) { require_once(DOL_DOCUMENT_ROOT.'/core/modules/mod'.$modlabel.'.class.php');