Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop

Conflicts:
	ChangeLog
	htdocs/societe/list.php
This commit is contained in:
Laurent Destailleur 2017-04-03 11:05:19 +02:00
commit e8767122b0
7 changed files with 70 additions and 46 deletions

View File

@ -13,6 +13,28 @@ Following changes may create regression for some external modules, but were nece
* The page compta/facture.php was renamed into compta/facture/card.php to match page naming conventions. * The page compta/facture.php was renamed into compta/facture/card.php to match page naming conventions.
***** ChangeLog for 5.0.1 compared to 5.0.0 *****
FIX: #6503: SQL error in "Last pending payment invoices"
FIX: #6505 Project elements page shows greyed-out links even if the option to show actions not available is disabled
FIX: #6507: Statistics counter show wrong total Contract numbers when the user does not have full access
FIX: #6533 #6590
FIX: #6535
FIX: bank account not visible on payment card
FIX: colspan
FIX: Data lost during merge of thirdparties
FIX: Detection of color brightness
FIX: Filter on date lost after submit on time spent page
FIX: forgottent fk_unit field on llx_supplier_propaldet
FIX: list of projects
FIX: LOG_ERROR does not exists. Use LOG_ERR.
FIX: Missing total on project overview.
FIX: multicurrency management on supplier order/invoice
FIX: Notification sending was broken.
FIX: origin & origin id on supplier order line
FIX: param php doc
FIX: Picto of project on dol_banner and box
FIX: Some errors when downloading files.
***** ChangeLog for 5.0.0 compared to 4.0.* ***** ***** ChangeLog for 5.0.0 compared to 4.0.* *****
For users: For users:
NEW: Add module mulicurrency. NEW: Add module mulicurrency.

View File

@ -10,12 +10,12 @@ Build-Depends: debhelper (>= 9), po-debconf
Package: dolibarr Package: dolibarr
Architecture: all Architecture: all
Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm | php5, Depends: libapache2-mod-php | libapache2-mod-phpfilter | php-cgi | php-fpm | php,
php5-cli, php-cli,
# Required PHP extensions # Required PHP extensions
php5-mysql | php5-mysqli, php5-curl, php5-gd, php5-ldap, php-mysql | php-mysqli, php-curl, php-gd, php-ldap,
# Required PHP libraries # Required PHP libraries
php-pear, php-mail-mime, php-pear, php-mail-mime, php-xml, php-mbstring,
# php-tcpdf, # php-tcpdf,
# libfpdf-tpl-php, php-fpdf, # libfpdf-tpl-php, php-fpdf,
# libphp-adodb, # libphp-adodb,

View File

@ -236,7 +236,7 @@ $disable_delete = 0;
// Bank account // Bank account
if (! empty($conf->banque->enabled)) if (! empty($conf->banque->enabled))
{ {
if ($object->bank_account) if ($object->fk_account > 0)
{ {
$bankline=new AccountLine($db); $bankline=new AccountLine($db);
$bankline->fetch($object->bank_line); $bankline->fetch($object->bank_line);
@ -257,9 +257,8 @@ if (! empty($conf->banque->enabled))
print '<td>'.$langs->trans('BankAccount').'</td>'; print '<td>'.$langs->trans('BankAccount').'</td>';
print '<td colspan="3">'; print '<td colspan="3">';
$accountstatic=new Account($db); $accountstatic=new Account($db);
$accountstatic->id=$bankline->fk_account; $accountstatic->fetch($bankline->fk_account);
$accountstatic->label=$bankline->bank_account_ref.' - '.$bankline->bank_account_label; print $accountstatic->getNomUrl(1);
print $accountstatic->getNomUrl(0);
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';

View File

@ -112,7 +112,7 @@ class ExtraFields
* *
* @param string $attrname Code of attribute * @param string $attrname Code of attribute
* @param string $label label of attribute * @param string $label label of attribute
* @param int $type Type of attribute ('int', 'text', 'varchar', 'date', 'datehour') * @param int $type Type of attribute ('boolean', 'int', 'text', 'varchar', 'date', 'datehour','price','phone','mail','password','url','select','checkbox', ...)
* @param int $pos Position of attribute * @param int $pos Position of attribute
* @param string $size Size/length of attribute * @param string $size Size/length of attribute
* @param string $elementtype Element type ('member', 'product', 'thirdparty', ...) * @param string $elementtype Element type ('member', 'product', 'thirdparty', ...)
@ -164,7 +164,7 @@ class ExtraFields
* This is a private method. For public method, use addExtraField. * This is a private method. For public method, use addExtraField.
* *
* @param string $attrname code of attribute * @param string $attrname code of attribute
* @param int $type Type of attribute ('int', 'text', 'varchar', 'date', 'datehour') * @param int $type Type of attribute ('boolean', 'int', 'text', 'varchar', 'date', 'datehour','price','phone','mail','password','url','select','checkbox', ...)
* @param string $length Size/length of attribute ('5', '24,8', ...) * @param string $length Size/length of attribute ('5', '24,8', ...)
* @param string $elementtype Element type ('member', 'product', 'thirdparty', 'contact', ...) * @param string $elementtype Element type ('member', 'product', 'thirdparty', 'contact', ...)
* @param int $unique Is field unique or not * @param int $unique Is field unique or not

View File

@ -126,7 +126,7 @@ class HookManager
if (! is_array($this->hooks) || empty($this->hooks)) return ''; if (! is_array($this->hooks) || empty($this->hooks)) return '';
$parameters['context']=join(':',$this->contextarray); $parameters['context']=join(':',$this->contextarray);
dol_syslog(get_class($this).'::executeHooks method='.$method." action=".$action." context=".$parameters['context']); //dol_syslog(get_class($this).'::executeHooks method='.$method." action=".$action." context=".$parameters['context']);
// Define type of hook ('output' or 'addreplace'. 'returnvalue' is deprecated because a 'addreplace' hook can also return resPrint and resArray). // Define type of hook ('output' or 'addreplace'. 'returnvalue' is deprecated because a 'addreplace' hook can also return resPrint and resArray).
$hooktype='output'; $hooktype='output';
@ -202,6 +202,9 @@ class HookManager
// test to avoid running twice a hook, when a module implements several active contexts // test to avoid running twice a hook, when a module implements several active contexts
if (in_array($module,$modulealreadyexecuted)) continue; if (in_array($module,$modulealreadyexecuted)) continue;
dol_syslog(get_class($this).'::executeHooks a qualified hook was found for method='.$method.' module='.$module." action=".$action." context=".$context);
$modulealreadyexecuted[$module]=$module; // Use the $currentcontext in method to avoid running twice $modulealreadyexecuted[$module]=$module; // Use the $currentcontext in method to avoid running twice
// Clean class (an error may have been set from a previous call of another method for same module/hook) // Clean class (an error may have been set from a previous call of another method for same module/hook)

View File

@ -5282,7 +5282,7 @@ class Form
*/ */
static function multiSelectArrayWithCheckbox($htmlname, &$array, $varpage) static function multiSelectArrayWithCheckbox($htmlname, &$array, $varpage)
{ {
global $conf,$user; global $conf,$langs,$user;
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) return ''; if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) return '';
@ -5315,7 +5315,7 @@ class Form
} }
if ($val['label']) if ($val['label'])
{ {
$lis.='<li><input type="checkbox" value="'.$key.'"'.(empty($val['checked'])?'':' checked="checked"').'/>'.dol_escape_htmltag($val['label']).'</li>'; $lis.='<li><input type="checkbox" value="'.$key.'"'.(empty($val['checked'])?'':' checked="checked"').'/>'.dol_escape_htmltag($langs->trans($val['label'])).'</li>';
$listcheckedstring.=(empty($val['checked'])?'':$key.','); $listcheckedstring.=(empty($val['checked'])?'':$key.',');
} }
} }

View File

@ -147,32 +147,32 @@ $checkedprofid6=0;
$checkprospectlevel=(in_array($contextpage, array('prospectlist')) ? 1 : 0); $checkprospectlevel=(in_array($contextpage, array('prospectlist')) ? 1 : 0);
$checkstcomm=(in_array($contextpage, array('prospectlist')) ? 1 : 0); $checkstcomm=(in_array($contextpage, array('prospectlist')) ? 1 : 0);
$arrayfields=array( $arrayfields=array(
's.nom'=>array('label'=>$langs->trans("Company"), 'checked'=>1), 's.nom'=>array('label'=>"Company", 'checked'=>1),
's.barcode'=>array('label'=>$langs->trans("Gencod"), 'checked'=>1, 'enabled'=>(! empty($conf->barcode->enabled))), 's.barcode'=>array('label'=>"Gencod", 'checked'=>1, 'enabled'=>(! empty($conf->barcode->enabled))),
's.code_client'=>array('label'=>$langs->trans("CustomerCodeShort"), 'checked'=>$checkedcustomercode), 's.code_client'=>array('label'=>"CustomerCodeShort", 'checked'=>$checkedcustomercode),
's.code_fournisseur'=>array('label'=>$langs->trans("SupplierCodeShort"), 'checked'=>$checkedsuppliercode, 'enabled'=>(! empty($conf->fournisseur->enabled))), 's.code_fournisseur'=>array('label'=>"SupplierCodeShort", 'checked'=>$checkedsuppliercode, 'enabled'=>(! empty($conf->fournisseur->enabled))),
's.code_compta'=>array('label'=>$langs->trans("CustomerAccountancyCodeShort"), 'checked'=>$checkedcustomeraccountcode), 's.code_compta'=>array('label'=>"CustomerAccountancyCodeShort", 'checked'=>$checkedcustomeraccountcode),
's.code_compta_fournisseur'=>array('label'=>$langs->trans("SupplierAccountancyCodeShort"), 'checked'=>$checkedsupplieraccountcode, 'enabled'=>(! empty($conf->fournisseur->enabled))), 's.code_compta_fournisseur'=>array('label'=>"SupplierAccountancyCodeShort", 'checked'=>$checkedsupplieraccountcode, 'enabled'=>(! empty($conf->fournisseur->enabled))),
's.town'=>array('label'=>$langs->trans("Town"), 'checked'=>1), 's.town'=>array('label'=>"Town", 'checked'=>1),
's.zip'=>array('label'=>$langs->trans("Zip"), 'checked'=>1), 's.zip'=>array('label'=>"Zip", 'checked'=>1),
'state.nom'=>array('label'=>$langs->trans("State"), 'checked'=>0), 'state.nom'=>array('label'=>"State", 'checked'=>0),
'country.code_iso'=>array('label'=>$langs->trans("Country"), 'checked'=>0), 'country.code_iso'=>array('label'=>"Country", 'checked'=>0),
's.email'=>array('label'=>$langs->trans("Email"), 'checked'=>0), 's.email'=>array('label'=>"Email", 'checked'=>0),
's.url'=>array('label'=>$langs->trans("Url"), 'checked'=>0), 's.url'=>array('label'=>"Url", 'checked'=>0),
's.phone'=>array('label'=>$langs->trans("Phone"), 'checked'=>1), 's.phone'=>array('label'=>"Phone", 'checked'=>1),
'typent.code'=>array('label'=>$langs->trans("ThirdPartyType"), 'checked'=>$checkedtypetiers), 'typent.code'=>array('label'=>"ThirdPartyType", 'checked'=>$checkedtypetiers),
's.siren'=>array('label'=>$langs->trans("ProfId1Short"), 'checked'=>$checkedprofid1), 's.siren'=>array('label'=>"ProfId1Short", 'checked'=>$checkedprofid1),
's.siret'=>array('label'=>$langs->trans("ProfId2Short"), 'checked'=>$checkedprofid2), 's.siret'=>array('label'=>"ProfId2Short", 'checked'=>$checkedprofid2),
's.ape'=>array('label'=>$langs->trans("ProfId3Short"), 'checked'=>$checkedprofid3), 's.ape'=>array('label'=>"ProfId3Short", 'checked'=>$checkedprofid3),
's.idprof4'=>array('label'=>$langs->trans("ProfId4Short"), 'checked'=>$checkedprofid4), 's.idprof4'=>array('label'=>"ProfId4Short", 'checked'=>$checkedprofid4),
's.idprof5'=>array('label'=>$langs->trans("ProfId5Short"), 'checked'=>$checkedprofid5), 's.idprof5'=>array('label'=>"ProfId5Short", 'checked'=>$checkedprofid5),
's.idprof6'=>array('label'=>$langs->trans("ProfId6Short"), 'checked'=>$checkedprofid6), 's.idprof6'=>array('label'=>"ProfId6Short", 'checked'=>$checkedprofid6),
'customerorsupplier'=>array('label'=>'Nature', 'checked'=>1), 'customerorsupplier'=>array('label'=>'Nature', 'checked'=>1),
's.fk_prospectlevel'=>array('label'=>$langs->trans("ProspectLevelShort"), 'checked'=>$checkprospectlevel), 's.fk_prospectlevel'=>array('label'=>"ProspectLevelShort", 'checked'=>$checkprospectlevel),
's.fk_stcomm'=>array('label'=>$langs->trans("StatusProsp"), 'checked'=>$checkstcomm), 's.fk_stcomm'=>array('label'=>"StatusProsp", 'checked'=>$checkstcomm),
's.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500), 's.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>500),
's.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500), 's.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>500),
's.status'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000), 's.status'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000),
); );
// Extra fields // Extra fields
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
@ -870,14 +870,14 @@ if (! empty($arrayfields['s.fk_stcomm']['checked'])) print_liste_f
// Extra fields // Extra fields
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
{ {
foreach($extrafields->attribute_label as $key => $val) foreach($extrafields->attribute_label as $key => $val)
{ {
if (! empty($arrayfields["ef.".$key]['checked'])) if (! empty($arrayfields["ef.".$key]['checked']))
{ {
$align=$extrafields->getAlignFlag($key); $align=$extrafields->getAlignFlag($key);
print_liste_field_titre($langs->trans($extralabels[$key]),$_SERVER["PHP_SELF"],"ef.".$key,"",$param,($align?'align="'.$align.'"':''),$sortfield,$sortorder); print_liste_field_titre($extralabels[$key],$_SERVER["PHP_SELF"],"ef.".$key,"",$param,($align?'align="'.$align.'"':''),$sortfield,$sortorder);
} }
} }
} }
// Hook fields // Hook fields
$parameters=array('arrayfields'=>$arrayfields); $parameters=array('arrayfields'=>$arrayfields);