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/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 ''; - print ''; + $moreforfilter.=''; } */ if (! empty($moreforfilter)) @@ -349,10 +345,29 @@ if ($resql) print ''; } - 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 '"; + + print ''; - $country_code = getCountry($obj->country_id, 'all'); - // Address and phone print ''; // Status diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 81f14683383..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; @@ -1315,20 +1315,25 @@ function dol_print_size($size,$shortvalue=0,$shortunit=0) * @param string $url Url to show * @param string $target Target for link * @param int $max Max number of characters to show + * @param int $withpicto With picto * @return string HTML Link */ -function dol_print_url($url,$target='_blank',$max=32) +function dol_print_url($url,$target='_blank',$max=32,$withpicto=0) { + global $langs; + if (empty($url)) return ''; $link=''; + $link.='"'; + if ($target) $link.=' target="'.$target.'"'; + $link.='>'; if (! preg_match('/^http/i',$url)) $link.='http://'; $link.=dol_trunc($url,$max); $link.=''; - return $link; + return '
'.($withpicto?img_picto($langs->trans("Url"), 'object_globe.png').' ':'').$link.'
'; } /** @@ -1591,26 +1596,30 @@ function dol_user_country() /** * Format address string * - * @param string $address Address - * @param int $htmlid Html ID (for example 'gmap') - * @param int $mode thirdparty|contact|member|other - * @param int $id Id of object - * @return void + * @param string $address Address + * @param int $htmlid Html ID (for example 'gmap') + * @param int $mode thirdparty|contact|member|other + * @param int $id Id of object + * @param int $noprint No output. Result is the function return + * @return string|void Nothing if noprint is 0, formatted address if noprint is 1 * @see dol_format_address */ -function dol_print_address($address, $htmlid, $mode, $id) +function dol_print_address($address, $htmlid, $mode, $id, $noprint=0) { global $conf, $user, $langs, $hookmanager; + $out = ''; + if ($address) { if ($hookmanager) { $parameters = array('element' => $mode, 'id' => $id); $reshook = $hookmanager->executeHooks('printAddress', $parameters, $address); - print $hookmanager->resPrint; + $out.=$hookmanager->resPrint; } - if (empty($reshook)) { - print nl2br($address); + if (empty($reshook)) + { + $out.=nl2br($address); $showgmap=$showomap=0; if ($mode=='thirdparty' && ! empty($conf->google->enabled) && ! empty($conf->global->GOOGLE_ENABLE_GMAPS)) $showgmap=1; if ($mode=='contact' && ! empty($conf->google->enabled) && ! empty($conf->global->GOOGLE_ENABLE_GMAPS_CONTACTS)) $showgmap=1; @@ -1623,15 +1632,17 @@ function dol_print_address($address, $htmlid, $mode, $id) if ($showgmap) { $url=dol_buildpath('/google/gmaps.php?mode='.$mode.'&id='.$id,1); - print ' '; + $out.=' '; } if ($showomap) { $url=dol_buildpath('/openstreetmap/maps.php?mode='.$mode.'&id='.$id,1); - print ' '; + $out.=' '; } } } + if ($noprint) return $out; + else print $out; } @@ -2669,7 +2680,8 @@ function getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $m $sortorder=strtoupper($sortorder); $out=''; - + $sortimg=''; + $tag='th'; if ($thead==2) $tag='div'; @@ -2678,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); @@ -2704,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/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 '
'; 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/commonobject.class.php b/htdocs/core/class/commonobject.class.php index bfa1595197e..76fd73a324d 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -434,6 +434,80 @@ abstract class CommonObject } + /** + * Return full address of contact + * + * @param Societe $object Object Societe or null + * @return string Full address string + */ + function getBannerAddress($htmlkey, $object=null) + { + global $conf, $langs; + + $countriesusingstate=array('AU','US','IN','GB','ES','UK','TR'); + + $out=''; + + $out.=''; + + $outdone=0; + $coords = $this->getFullAddress(1,', '); + if (! empty($conf->use_javascript_ajax)) + { + $namecoords = $this->getFullName($langs,1).'
'.$coords; + // hideonsmatphone because copyToClipboard call jquery dialog that does not work with jmobile + $out.=''; + $out.=img_picto($langs->trans("Address"), 'object_address.png'); + $out.=' '; + } + if ($coords) { + $out.=dol_print_address($coords, 'address_'.$htmlkey.'_'.$this->id, $this->element, $this->id, 1); $outdone++; + $outdone++; + } + + if (! in_array($object->country_code,$countriesusingstate) && empty($conf->global->MAIN_FORCE_STATE_INTO_ADDRESS) + && ! empty($conf->global->SOCIETE_DISABLE_STATE) && $this->state) + { + $out.=($outdone?'
':'').$this->state; + $outdone++; + } + + if ($this->phone_pro || $this->phone_mobile || $this->phone_perso || $this->fax) $out.=($outdone?'
':''); + if ($this->phone_pro) { + $out.=dol_print_phone($this->phone_pro,$country_code['code'],$this->rowid,$object->id,'AC_TEL',' ','phone'); $outdone++; + } + if ($this->phone_mobile) { + $out.=dol_print_phone($this->phone_mobile,$country_code['code'],$this->rowid,$object->id,'AC_TEL',' ','phone'); $outdone++; + } + if ($this->phone_perso) { + $out.=dol_print_phone($this->phone_perso,$country_code['code'],$this->rowid,$object->id,'AC_TEL',' ','phone'); $outdone++; + } + if ($this->fax) { + $out.=dol_print_phone($this->fax,$country_code['code'],$this->rowid,$object->id,'AC_FAX',' ','fax'); $outdone++; + } + + $out.='
'; + $outdone=0; + if ($this->email) + { + $out.=dol_print_email($this->email,$this->id,$object->id,'AC_EMAIL',0,0,1); + $outdone++; + } + if ($this->url) + { + $out.=dol_print_url($this->url,'',0,1); + $outdone++; + } + if (! empty($conf->skype->enabled)) + { + if ($this->skype) $out.=($outdone?'
':'').dol_print_skype($this->skype,$this->id,$object->id,'AC_SKYPE'); + } + + $out.=''; + + return $out; + } + /** * Add a link between element $this->element and a contact * diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 61afec22569..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 @@ -5042,16 +5122,18 @@ class Form * @param int $shownav Show Condition (navigation is shown if value is 1) * @param string $fieldid Nom du champ en base a utiliser pour select next et previous (we make the select max and min on this field) * @param string $fieldref Nom du champ objet ref (object->ref) a utiliser pour select next et previous - * @param string $morehtmlref Code html supplementaire a afficher apres ref + * @param string $morehtmlref More html to show after ref * @param string $moreparam More param to add in nav link url. * @param int $nodbprefix Do not include DB prefix to forge table name + * @param string $morehtmlleft More html code to show before ref + * @param string $morehtmlright More html code to show before navigation arrows * @return string Portion HTML avec ref + boutons nav */ - function showrefnav($object,$paramid,$morehtml='',$shownav=1,$fieldid='rowid',$fieldref='ref',$morehtmlref='',$moreparam='',$nodbprefix=0) + function showrefnav($object,$paramid,$morehtml='',$shownav=1,$fieldid='rowid',$fieldref='ref',$morehtmlref='',$moreparam='',$nodbprefix=0,$morehtmlleft='',$morehtmlright='') { global $langs,$conf; - $ret=''; + $ret=''; if (empty($fieldid)) $fieldid='rowid'; if (empty($fieldref)) $fieldref='ref'; @@ -5064,14 +5146,18 @@ class Form $next_ref = $object->ref_next?''.(empty($conf->dol_use_jmobile)?'>':' ').'':''; //print "xx".$previous_ref."x".$next_ref; - $ret.='
'; + $ret.='
'; + + $ret.='
'.$morehtmlleft.'
'; + + $ret.='
'; $ret.=dol_htmlentities($object->$fieldref); if ($morehtmlref) { $ret.=' '.$morehtmlref; } - $ret.='
'; + $ret.='
'; if ($previous_ref || $next_ref || $morehtml) { @@ -5079,23 +5165,20 @@ class Form } if ($morehtml) { - //$ret.='
'; - //$ret.='
'.$staticcontratligne->LibStatut(0,3).''.$staticcontratligne->LibStatut(4,3,0).''.$staticcontratligne->LibStatut(4,3,1).''.$staticcontratligne->LibStatut(5,3).'
  '; + print ''; print ''; print "
'.($obj->nb_running>0?$obj->nb_running:'').''.($obj->nb_expired>0?$obj->nb_expired:'').''.($obj->nb_closed>0 ?$obj->nb_closed:'').'
'.$morehtml; $ret.='
  • '.$morehtml.'
  • '; } if ($shownav && ($previous_ref || $next_ref)) { - //$ret.='
    '.$previous_ref.''.$next_ref; $ret.=''; $ret.=''; } if ($previous_ref || $next_ref || $morehtml) { - //$ret.='
    '; $ret.=''; } - $ret.=''; - + $ret.='
    '.$morehtmlright.'
    '; + $ret.=''; + return $ret; } @@ -5132,15 +5215,16 @@ class Form /** * Return HTML code to output a photo * - * @param string $modulepart Key to define module concerned ('societe', 'userphoto', 'memberphoto') - * @param object $object Object containing data to retrieve file name - * @param int $width Width of photo - * @param int $height Height of photo (auto if 0) - * @param int $caneditfield Add edit fields - * @param string $cssclass CSS name to use on img for photo - * @return string HTML code to output photo + * @param string $modulepart Key to define module concerned ('societe', 'userphoto', 'memberphoto') + * @param object $object Object containing data to retrieve file name + * @param int $width Width of photo + * @param int $height Height of photo (auto if 0) + * @param int $caneditfield Add edit fields + * @param string $cssclass CSS name to use on img for photo + * @param int $genericifundef Use a generic image if no image avaiable + * @return string HTML code to output photo */ - static function showphoto($modulepart, $object, $width=100, $height=0, $caneditfield=0, $cssclass='photowithmargin') + static function showphoto($modulepart, $object, $width=100, $height=0, $caneditfield=0, $cssclass='photowithmargin', $genericifundef=0) { global $conf,$langs; diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index ce5345854f0..d7fbaedfeba 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -688,10 +688,9 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') { $obj = $db->fetch_object($result); $var = !$var; - print "
    '; + $contactstatic->id = $obj->rowid; + $contactstatic->ref = $obj->ref; $contactstatic->statut = $obj->statut; $contactstatic->lastname = $obj->lastname; $contactstatic->firstname = $obj->firstname; @@ -704,44 +703,23 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') $contactstatic->phone_mobile = $obj->phone_mobile; $contactstatic->phone_perso = $obj->phone_perso; $contactstatic->email = $obj->email; + $contactstatic->web = $obj->web; + $contactstatic->skype = $obj->skype; + + $country_code = getCountry($obj->country_id, 'all'); + $contactstatic->country_code = $country_code; + + print "
    '; print $contactstatic->getNomUrl(1,'',0,'&backtopage='.urlencode($backtopage)); print ''; if ($obj->poste) print $obj->poste; print ''; - $outdone=0; - $contactstatic->address = $obj->address; - $contactstatic->zip = $obj->zip; - $contactstatic->town = $obj->town; - $contactstatic->country_id = $obj->country_id; - $coords = $contactstatic->getFullAddress(1,', '); - if (! empty($conf->use_javascript_ajax)) - { - $namecoords = $contactstatic->getFullName($langs,1).'
    '.$coords; - // hideonsmatphone because copyToClipboard call jquery dialog that does not work with jmobile - print ''; - print img_picto($langs->trans("Address"), 'object_address.png'); - print ' '; - } - if ($coords) { print dol_print_address($coords,'address_contact_'.$obj->rowid, 'contact', $obj->rowid); $outdone++; } - - if ($obj->phone_pro || $obj->phone_mobile || $obj->phone_perso || $obj->fax) print ($outdone?'
    ':''); - if ($obj->phone_pro) { print dol_print_phone($obj->phone_pro,$country_code['code'],$obj->rowid,$object->id,'AC_TEL',' ','phone'); $outdone++; } - if ($obj->phone_mobile) { print dol_print_phone($obj->phone_mobile,$country_code['code'],$obj->rowid,$object->id,'AC_TEL',' ','phone'); $outdone++; } - if ($obj->phone_perso) { print dol_print_phone($obj->phone_perso,$country_code['code'],$obj->rowid,$object->id,'AC_TEL',' ','phone'); $outdone++; } - if ($obj->fax) { print dol_print_phone($obj->fax,$country_code['code'],$obj->rowid,$object->id,'AC_FAX',' ','fax'); $outdone++; } - - print '
    '; - $outdone=0; - if ($obj->email) print dol_print_email($obj->email,$obj->rowid,$object->id,'AC_EMAIL',0,0,1); - if (! empty($conf->skype->enabled)) - { - if ($obj->skype) print ($outdone?'
    ':'').dol_print_skype($obj->skype,$obj->rowid,$object->id,'AC_SKYPE'); - } + print $contactstatic->getBannerAddress('contact', $object); print '
    '; - + print '
    '; + print ''; 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 @@ 69982f8171837cd8669bfe9c2f08dc8fddf6dfeb77c98411b4d5434f20c24483c23010fa68c5996cb5977f84a6bb7ceb -90a300e9bd857966226c68dca8660456 +822961d86ae558588632b3b08c085b89d41d8cd98f00b204e9800998ecf8427eb4e9f07aa5268af49d3bb9429719b2018293bd60fe13ac64c22f8500b346821c 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/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 ''; // Default language if (! empty($conf->global->MAIN_MULTILANGS)) @@ -1863,10 +1863,30 @@ else dol_htmloutput_errors($error,$errors); - $showlogo=$object->logo; + //$showlogo=$object->logo; + $showlogo=1; $showbarcode=empty($conf->barcode->enabled)?0:1; if (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->barcode->lire_advance)) $showbarcode=0; + print '
    '; + //$morehtmlleft='
    '.img_picto('', 'title_companies', '', '').'
    '; + if ($showlogo) $morehtmlleft.='
    '.$form->showphoto('societe',$object,0,0,0,'photoref').'
    '; + //if ($showlogo) $morehtmlleft.='
    '.$form->showphoto('societe',$object,0,0,0,'photoref').'
    '; + if ($showbarcode) $morehtmlleft.='
    '.$form->showbarcode($object).'
    '; + if (! empty($conf->use_javascript_ajax) && $user->rights->societe->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { + $morehtmlright.=ajax_object_onoff($object, 'status', 'status', 'InActivity', 'ActivityCeased'); + } else { + $morehtmlright.=$object->getLibStatut(2); + } + $morehtml=''; + if (! empty($object->ame_nalias)) $morehtml.='
    '.$object->name_alias.'
    '; + $morehtml.='
    '; + $morehtml.=$object->getBannerAddress('refaddress',$object); + $morehtml.='
    '; + print $form->showrefnav($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom', $morehtml, '', 0, $morehtmlleft, $morehtmlright); + print '
    '; + print '
    '; + 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/societe/soc.php b/htdocs/societe/soc.php index 0411e974f2d..aad1a8aae48 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -1727,7 +1727,7 @@ else // Capital print '
    '.fieldLabel('Capital','capital').''.$langs->trans("Currency".$conf->currency).'
    '.$langs->trans("Currency".$conf->currency).'
    '; // Ref @@ -1879,18 +1899,21 @@ else */ // Name + /* print ''; print ''; print ''; - + */ + // Alias names (commercial, trademark or alias names) - print '"; // Logo+barcode + /* $rowspan=6; if (! empty($conf->global->SOCIETE_USEPREFIX)) $rowspan++; if (! empty($object->client)) $rowspan++; @@ -1905,12 +1928,12 @@ else if ($showlogo && $showbarcode) $htmllogobar.='

    '; if ($showbarcode) $htmllogobar.=$form->showbarcode($object); $htmllogobar.=''; - } + }*/ // Prefix if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field { - print ''; + print ''; print $htmllogobar; $htmllogobar=''; print ''; } @@ -1919,7 +1942,7 @@ else if ($object->client) { print ''; @@ -1931,7 +1954,7 @@ else if (! empty($conf->fournisseur->enabled) && $object->fournisseur && ! empty($user->rights->fournisseur->lire)) { print ''; @@ -1943,13 +1966,16 @@ else if (! empty($conf->barcode->enabled)) { print ''; - print $htmllogobar; $htmllogobar=''; + if ($htmllogobar) $htmllogobar.=$form->showbarcode($object); + print $htmllogobar; + $htmllogobar=''; print ''; } // Status + /* print ''; print ''; print $htmllogobar; $htmllogobar=''; print ''; - + */ + // Address + /* print ''; @@ -2007,7 +2035,8 @@ else // Phone / Fax print ''; print ''; - + */ + // Prof ids $i=1; $j=0; while ($i <= 6) @@ -2015,8 +2044,9 @@ else $idprof=$langs->transcountry('ProfId'.$i,$object->country_code); if ($idprof!='-') { - if (($j % 2) == 0) print ''; - print ''; + print ''; + print ''; - if (($j % 2) == 1) print ''; + //if (($j % 2) == 1) print ''; + print ''; $j++; } $i++; } - if ($j % 2 == 1) print ''; + //if ($j % 2 == 1) print ''; // VAT payers print ''; - + print ''; + // VAT Code - print ''; + print ''; @@ -2177,13 +2210,14 @@ else // Type + Staff $arr = $formcompany->typent_array(1); $object->typent= $arr[$object->typent_code]; - print ''; + print ''; + print ''; // Legal - print ''; + print ''; // Capital - print ''; @@ -2192,7 +2226,7 @@ else if (! empty($conf->global->MAIN_MULTILANGS)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - print ''; - print '"; } @@ -2215,7 +2249,7 @@ else // Supplier if ($object->fournisseur) { 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 b6987ed42cc..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 { @@ -604,6 +606,40 @@ div.attacharea { padding-bottom: 10px; } +div.arearef { + /*border-bottom: 1px solid #bbb;*/ + padding-top: 2px; + padding-bottom: 5px; + /*padding-right: 3px; + padding-left: 2px;*/ + margin-bottom: 10px; +} +div.heightref { + min-height: 80px; +} +div.divphotoref { + padding-right: 10px; +} +div.statusref { + float: right; + padding-right: 12px; + margin-top: 9px; + margin-bottom: 10px; +} +img.photoref { + border: 1px solid #CCC; + -moz-box-shadow: 3px 3px 4px #DDD; + -webkit-box-shadow: 3px 3px 4px #DDD; + box-shadow: 3px 3px 4px #DDD; + padding: 4px; + height: 80px; + width: 80px; + object-fit: contain +} +.underrefbanner { + border-bottom: 2px solid #888; +} + /* ============================================================================== */ /* Menu top et 1ere ligne tableau */ /* ============================================================================== */ @@ -1560,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; @@ -1892,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; } @@ -1934,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; @@ -1962,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 */ } @@ -2008,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; } @@ -2051,13 +2064,19 @@ table.liste td { /* Pagination */ div.refidpadding { - padding-top: dol_use_jmobile)?'8':'12'; ?>px; + /* padding-top: dol_use_jmobile)?'8':'12'; ?>px; */ } div.refid { - padding-top: dol_use_jmobile)?'5':'12'; ?>px; + /* padding-top: dol_use_jmobile)?'5':'12'; ?>px; */ font-weight: bold; color: #766; - font-size: 120%; + font-size: 160%; +} +div.refidno { + padding-top: 2px; + font-weight: normal; + color: #444; + font-size: px; } div.pagination { @@ -2285,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 { @@ -2398,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 @@ -3386,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 { @@ -3414,7 +3438,9 @@ div.dataTables_length { div.dataTables_length select { background: #fff; } - +.dataTables_wrapper .dataTables_paginate { + padding-top: 0px !important; +} /* ============================================================================== */ /* Select2 */ @@ -3511,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..9fb050b0ef7 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; @@ -651,6 +656,38 @@ div.attacharea { padding-top: 10px; padding-bottom: 10px; } +div.arearef { + /*border-bottom: 1px solid #bbb;*/ + padding-top: 2px; + padding-bottom: 5px; + /*padding-right: 3px; + padding-left: 2px;*/ + margin-bottom: 10px; +} +div.heightref { + min-height: 74px; +} +div.divphotoref { + padding-right: 10px; +} +div.statusref { + float: right; + padding-right: 12px; + margin-top: 9px; + 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; +} +.underrefbanner { + border-bottom: 2px solid #888; +} + /* ============================================================================== */ @@ -1551,9 +1588,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 +1825,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 +1859,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 +1893,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 +1923,9 @@ td.borderright { border-right-style: solid !important; } -/* For lists */ - -table.liste { - width: 100%; - border-collapse: collapse; - border-top-color: #FEFEFE; - - border-right-width: 1px; - border-right-color: #CCC; - border-right-style: solid; - -/* - border-bottom-width: 1px; - border-bottom-color: #BBBBBB; - border-bottom-style: solid; -*/ - border-left-width: 1px; - border-left-color: #CCC; - border-left-style: solid; - - margin-bottom: 2px; - margin-top: 0px; - - -moz-box-shadow: 0px 3px 4px #CCC; - -webkit-box-shadow: 0px 3px 4px #CC; - box-shadow: 0px 3px 4px #CCC; -} -table.liste td { - padding-right: 2px; +/* For table with no filter before */ +table.listwithfilterbefore { + border-top: none !important; } .tagtable, .table-border { display: table; } @@ -1920,13 +1934,19 @@ table.liste td { /* Pagination */ div.refidpadding { - padding-top: dol_use_jmobile)?'8':'12'; ?>px; + /* padding-top: dol_use_jmobile)?'8':'12'; ?>px; */ } div.refid { - padding-top: dol_use_jmobile)?'5':'12'; ?>px; + /* padding-top: dol_use_jmobile)?'5':'12'; ?>px; */ font-weight: bold; color: #766; - font-size: 120%; + font-size: 160%; +} +div.refidno { + padding-top: 2px; + font-weight: normal; + color: #444; + font-size: px; } div.pagination { @@ -2050,6 +2070,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 +2162,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 +2282,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 +2475,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 +3276,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 +3297,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 +3404,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 +3687,7 @@ border-top-right-radius: 6px; #tooltip { position: absolute; width: px; - } + } } @media only screen and (max-width: 570px) { @@ -3573,7 +3701,7 @@ border-top-right-radius: 6px; #tooltip { position: absolute; width: px; - } + } } 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');
    '.$langs->trans('ThirdPartyName').''; print $form->showrefnav($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom'); print '
    '.$langs->trans('AliasNames').''; + print '
    '.$langs->trans('AliasNames').''; print $object->name_alias; print "
    '.$langs->trans('Prefix').''.$object->prefix_comm.'
    '.$langs->trans('Prefix').''.$object->prefix_comm.'
    '; - print $langs->trans('CustomerCode').''; + print $langs->trans('CustomerCode').''; print $object->code_client; if ($object->check_codeclient() <> 0) print ' ('.$langs->trans("WrongCustomerCode").')'; print '
    '; - print $langs->trans('SupplierCode').''; + print $langs->trans('SupplierCode').''; print $object->code_fournisseur; if ($object->check_codefournisseur() <> 0) print ' ('.$langs->trans("WrongSupplierCode").')'; print '
    '; - print $langs->trans('Gencod').''.$object->barcode; + print $langs->trans('Gencod').''.$object->barcode; print '
    '.$langs->trans("Status").''; if (! empty($conf->use_javascript_ajax) && $user->rights->societe->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { @@ -1960,8 +1986,10 @@ else print '
    '.$langs->trans('Address').''; dol_print_address($object->address,'gmap','thirdparty',$object->id); print '
    '.$langs->trans('Phone').''.dol_print_phone($object->phone,$object->country_code,0,$object->id,'AC_TEL').''.$langs->trans('Fax').''.dol_print_phone($object->fax,$object->country_code,0,$object->id,'AC_FAX').'
    '.$idprof.''; + //if (($j % 2) == 0) print '
    '.$idprof.''; $key='idprof'.$i; print $object->$key; if ($object->$key) @@ -2025,12 +2055,13 @@ else else print ' ('.$langs->trans("ErrorWrongValue").')'; } print '
    '; @@ -2038,9 +2069,11 @@ else print ''; print yn($object->tva_assuj); print '
    '.$langs->trans('VATIntra').''; + print '
    '.$langs->trans('VATIntra').''; if ($object->tva_intra) { $s=''; @@ -2083,7 +2116,7 @@ else { print '
    '.$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code).''; print yn($object->localtax1_assuj); - print ''.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).''; + print '
    '.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).''; print yn($object->localtax2_assuj); print '
    '.$langs->trans("ThirdPartyType").''.$object->typent.''.$langs->trans("Staff").''.$object->effectif.'
    '.$langs->trans("ThirdPartyType").''.$object->typent.'
    '.$langs->trans("Staff").''.$object->effectif.'
    '.$langs->trans('JuridicalStatus').''.$object->forme_juridique.'
    '.$langs->trans('JuridicalStatus').''.$object->forme_juridique.'
    '.$langs->trans('Capital').''; + print '
    '.$langs->trans('Capital').''; if ($object->capital) print price($object->capital,'',$langs,0,-1,-1, $conf->currency); else print ' '; print '
    '.$langs->trans("DefaultLang").''; + print '
    '.$langs->trans("DefaultLang").''; //$s=picto_from_langcode($object->default_lang); //print ($s?$s.' ':''); $langs->load("languages"); @@ -2207,7 +2241,7 @@ else // Customer if ($object->prospect || $object->client) { print '
    ' . $langs->trans("CustomersCategoriesShort") . ''; + print ''; print $form->showCategories($object->id, 'customer', 1); print "
    ' . $langs->trans("SuppliersCategoriesShort") . ''; + print ''; print $form->showCategories($object->id, 'supplier', 1); print "