diff --git a/ChangeLog b/ChangeLog index 9ca1cc847e7..b6de1a1d94f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -85,6 +85,7 @@ For developers: - New: Add hook addHomeSetup. - New: Add trigger CATEGORY_LINK and CATEGORY_UNLINK. - New: A trigger can return an array of error strings instead of one error string. +- New: Add method to use a dictionnary as a combo box. WARNING: Following change may create regression for some external modules, but was necessary to make Dolibarr better: diff --git a/build/debian/README.howto b/build/debian/README.howto index abfa7f456fb..4978b686070 100644 --- a/build/debian/README.howto +++ b/build/debian/README.howto @@ -139,11 +139,11 @@ Warning: Name and email must match value into debian/control file (Entry added h > git-buildpackage -us -uc Note: You can use git-buildpackage -us -uc --git-ignore-new if you want to test build with uncommited file - +Note: Package is built into directory ../build-area * If package .deb is ok: Note: If there was errors managed manually, you may need to make a git commit but do not use option "amend" previous commit -> git-buildpackage --git-tag +> git-buildpackage --git-tag-only --git-retag > git push --all ou git push origin --all > git push --tags @@ -195,10 +195,11 @@ Warning: Name and email must match value into debian/control file (Entry added h > git-buildpackage -us -uc Note: You can use git-buildpackage -us -uc --git-ignore-new if you want to test build with uncommited file +Note: Package is built into directory ../build-area * If package .deb is ok: Note: If there was errors managed manually, you may need to make a git commit but do not use option "amend" previous commit -> git-buildpackage --git-tag +> git-buildpackage --git-tag-only --git-retag > git push --all ou git push origin --all > git push --tags diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index c39c66b6e7b..49deff65c33 100755 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -340,6 +340,7 @@ if ($nboftargetok) { $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/template`; # Package not valid for most linux distributions (errors reported into compile.js). Package should be embed by modules to avoid problems. $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpmailer`; # Package not valid for most linux distributions (errors reported into file LICENSE). Package should be embed by modules to avoid problems. + $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/multiselect/MIT-LICENSE.txt`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/lib/Mail`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/license.txt`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/PHPExcel/Shared/PDF`; diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php index 94941d53e6c..81723b8283d 100644 --- a/htdocs/comm/action/fiche.php +++ b/htdocs/comm/action/fiche.php @@ -1003,7 +1003,7 @@ if ($id > 0) { $project=new Project($db); $project->fetch($act->fk_project); - print $project->getNomUrl(1); + print $project->getNomUrl(1,'',1); } print ''; } diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index ee62ac5d977..e2da54015cc 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -875,14 +875,18 @@ else if ($action == 'add' && $user->rights->facture->creer) if ($id > 0) { - //If deposit invoice - if ($_POST['type'] == 3) { + // If deposit invoice + if ($_POST['type'] == 3) + { $typeamount=GETPOST('typedeposit','alpha'); $valuedeposit=GETPOST('valuedeposit','int'); - if ($typeamount=='amount') { + if ($typeamount=='amount') + { $amountdeposit=$valuedeposit; - }else { + } + else + { $amountdeposit=0; dol_include_once('/'.$element.'/class/'.$subelement.'.class.php'); @@ -890,19 +894,20 @@ else if ($action == 'add' && $user->rights->facture->creer) $classname = ucfirst($subelement); $srcobject = new $classname($db); - dol_syslog("Try to find source object origin=".$object->origin." originid=".$object->origin_id." to add deposit line"); + dol_syslog("Try to find source object origin=".$object->origin." originid=".$object->origin_id." to add deposit lines"); $result=$srcobject->fetch($object->origin_id); if ($result > 0) { $totalamount=0; $lines = $srcobject->lines; - $num=count($lines); - for ($i=0;$i<$num;$i++) + $numlines=count($lines); + for ($i=0; $i<$numlines; $i++) { - $totalamount=+$lines[$i]->subprice; + $totalamount += $lines[$i]->subprice; } - if ($totalamount!=0) { + if ($totalamount!=0) + { $amountdeposit=($totalamount*$valuedeposit)/100; } } @@ -1585,7 +1590,7 @@ else if ($action == 'down' && $user->rights->facture->creer) /* * Add file in email form -*/ + */ if (GETPOST('addfile')) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -1600,7 +1605,7 @@ if (GETPOST('addfile')) /* * Remove file in email form -*/ + */ if (! empty($_POST['removedfile'])) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -1616,7 +1621,7 @@ if (! empty($_POST['removedfile'])) /* * Send mail -*/ + */ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_POST['removedfile'] && ! $_POST['cancel']) { $langs->load('mails'); @@ -1790,7 +1795,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO /* * Generate document -*/ + */ else if ($action == 'builddoc') // En get ou en post { $object->fetch($id); @@ -2019,7 +2024,7 @@ if ($action == 'create') $remise_percent = (! empty($objectsrc->remise_percent)?$objectsrc->remise_percent:(! empty($soc->remise_percent)?$soc->remise_percent:0)); $remise_absolue = (! empty($objectsrc->remise_absolue)?$objectsrc->remise_absolue:(! empty($soc->remise_absolue)?$soc->remise_absolue:0)); $dateinvoice = empty($conf->global->MAIN_AUTOFILL_DATE)?-1:0; - + //Replicate extrafields $objectsrc->fetch_optionals($originid); $object->array_options=$objectsrc->array_options; @@ -2058,8 +2063,7 @@ if ($action == 'create') // Ref print '
| '.$desc.' | '; - if (($origin=='propal') || ($origin=='commande')) { - print ''; - print ' | '.$langs->trans('Value').':'; + if (($origin=='propal') || ($origin=='commande')) + { + print ' | '; + $arraylist=array('amount'=>'FixAmount','variable'=>'VarAmount'); + print $form->selectarray('typedeposit',$arraylist, GETPOST('typedeposit'), 0, 0, 0, '', 1); + print ' | '; + print ''.$langs->trans('Value').':'; } print ' |