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

This commit is contained in:
Laurent Destailleur 2016-10-11 12:21:16 +02:00
commit 789eab6098
4 changed files with 13 additions and 7 deletions

View File

@ -680,8 +680,8 @@ if (empty($reshook))
$objectline->qty=GETPOST('elqty');
$objectline->remise_percent=GETPOST('elremise_percent');
$objectline->tva_tx=GETPOST('eltva_tx')?GETPOST('eltva_tx'):0; // Field may be disabled, so we use vat rate 0
$objectline->localtax1_tx=$localtax1_tx;
$objectline->localtax2_tx=$localtax2_tx;
$objectline->localtax1_tx=is_numeric($localtax1_tx)?$localtax1_tx:0;
$objectline->localtax2_tx=is_numeric($localtax2_tx)?$localtax2_tx:0;
$objectline->date_ouverture_prevue=$date_start_update;
$objectline->date_ouverture=$date_start_real_update;
$objectline->date_fin_validite=$date_end_update;

View File

@ -1307,6 +1307,8 @@ class Contrat extends CommonObject
if (empty($info_bits)) $info_bits=0;
if (empty($pu_ht) || ! is_numeric($pu_ht)) $pu_ht=0;
if (empty($pu_ttc)) $pu_ttc=0;
if (empty($txlocaltax1) || ! is_numeric($txlocaltax1)) $txlocaltax1=0;
if (empty($txlocaltax2) || ! is_numeric($txlocaltax2)) $txlocaltax2=0;
if ($price_base_type=='HT')
{

View File

@ -100,7 +100,13 @@ if (GETPOST("sendit") && ! empty($conf->global->MAIN_UPLOAD_DOC))
if (empty($_FILES['userfile']['tmp_name']))
{
$error++;
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("File")), null, 'errors');
if($_FILES['userfile']['error'] == 1 || $_FILES['userfile']['error'] == 2){
setEventMessages($langs->trans('ErrorFileSizeTooLarge'),null, 'errors');
}
else {
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("File")), null, 'errors');
}
}
if (! $error)

View File

@ -1222,8 +1222,6 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extensions/Buttons/js/buttons.print.min.js'.($ext?'?'.$ext:'').'"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extensions/ColReorder/js/dataTables.colReorder.min.js'.($ext?'?'.$ext:'').'"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jszip/jszip.min.js"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/pdfmake/pdfmake.min.js"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/pdfmake/vfs_fonts.js"></script>'."\n";
}
// jQuery Timepicker
if (! empty($conf->global->MAIN_USE_JQUERY_TIMEPICKER) || defined('REQUIRE_JQUERY_TIMEPICKER'))
@ -1444,7 +1442,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
if ($_SESSION["dol_authmode"] != 'forceuser' && $_SESSION["dol_authmode"] != 'http')
{
$logouthtmltext.=$langs->trans("Logout").'<br>';
$logouttext .='<a href="'.DOL_URL_ROOT.'/user/logout.php">';
$logouttext .= img_picto($langs->trans('Logout').":".$langs->trans('Logout'), 'logout_top.png', 'class="login"', 0, 0, 1);
$logouttext .='</a>';
@ -1455,7 +1453,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
$logouttext .= img_picto($langs->trans('Logout').":".$langs->trans('Logout'), 'logout_top.png', 'class="login"', 0, 0, 1);
}
}
print '<div class="login_block">'."\n";
// Add login user link