diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index d8f102ba2bc..fc160d8abf6 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -706,10 +706,10 @@ if ($mode == 'login') { print '' . img_delete($langs->trans("Delete")) . ''; if (file_exists($conf->mycompany->dir_output . '/logos/' . getDolGlobalString('MAIN_LOGIN_BACKGROUND'))) { print '   '; - print ''; + print ''; } } else { - print ''; + print ''; } print ''; print ''; diff --git a/htdocs/admin/webhook.php b/htdocs/admin/webhook.php index 749e95ae006..632a0963a64 100644 --- a/htdocs/admin/webhook.php +++ b/htdocs/admin/webhook.php @@ -158,8 +158,10 @@ print load_fiche_titre($langs->trans($page_name), $linkback, 'title_setup'); $head = webhookAdminPrepareHead(); print dol_get_fiche_head($head, 'settings', $langs->trans($page_name), -1, "webhook"); +print '
'; + // Setup page goes here -echo ''.$langs->trans("WebhookSetupPage", $langs->transnoentitiesnoconv("Targets")).'

'; +print ''.$langs->trans("WebhookSetupPage", $langs->transnoentitiesnoconv("Targets")).'...

'; if ($action == 'edit') { diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php index 2f8d6344f26..a61844d0899 100644 --- a/htdocs/bom/class/bom.class.php +++ b/htdocs/bom/class/bom.class.php @@ -1524,8 +1524,8 @@ class BOM extends CommonObject /** * Get Net needs by product * - * @param array $TNetNeeds Array of ChildBom and infos linked to - * @param float $qty qty needed (used as a factor to produce 1 unit) + * @param array $TNetNeeds Array of ChildBom and infos linked to + * @param float $qty qty needed (used as a factor to produce 1 unit) * @return void */ public function getNetNeeds(&$TNetNeeds = array(), $qty = 0) @@ -1538,7 +1538,7 @@ class BOM extends CommonObject } } else { if (empty($TNetNeeds[$line->fk_product]['qty'])) { - $TNetNeeds[$line->fk_product]['qty'] = 0; + $TNetNeeds[$line->fk_product]['qty'] = 0.0; } // When using nested level (or not), the qty for needs must always use the same unit to be able to be cumulated. // So if unit in bom is not the same than default, we must recalculate qty after units comparisons. @@ -1552,7 +1552,7 @@ class BOM extends CommonObject /** * Get/add Net needs Tree by product or bom * - * @param array $TNetNeeds Array of ChildBom and infos linked to + * @param array $TNetNeeds Array of ChildBom and infos linked to * @param float $qty qty needed (used as a factor to produce 1 unit) * @param int $level level of recursivity * @return void @@ -1575,7 +1575,16 @@ class BOM extends CommonObject } else { // When using nested level (or not), the qty for needs must always use the same unit to be able to be cumulated. // So if unit in bom is not the same than default, we must recalculate qty after units comparisons. + if (!isset($TNetNeeds[$this->id]['product'])) { + $TNetNeeds[$this->id]['product'] = array(); + } + if (!isset($TNetNeeds[$this->id]['product'][$line->fk_product])) { + $TNetNeeds[$this->id]['product'][$line->fk_product] = array(); + } $TNetNeeds[$this->id]['product'][$line->fk_product]['fk_unit'] = $line->fk_unit; + if (empty($TNetNeeds[$this->id]['product'][$line->fk_product]['qty'])) { + $TNetNeeds[$this->id]['product'][$line->fk_product]['qty'] = 0.0; + } $TNetNeeds[$this->id]['product'][$line->fk_product]['qty'] += $line->qty * $qty; $TNetNeeds[$this->id]['product'][$line->fk_product]['level'] = $level; } diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 8ae53fcc203..af345ae89f5 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -495,35 +495,35 @@ print ''; $viewmode = ''; $viewmode .= ''; // To add a space before the navigation tools -$newcardbutton = ''; $newparam = ''; +$newcardbutton = ''; if ($user->hasRight('agenda', 'myactions', 'create') || $user->hasRight('agenda', 'allactions', 'create')) { $tmpforcreatebutton = dol_getdate(dol_now(), true); diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index e0ffc594557..420ff107c5f 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -676,41 +676,42 @@ if (empty($reshook)) { } elseif ($reshook > 1) { $s = $hookmanager->resPrint; } + $viewyear = is_object($object) ? dol_print_date($object->datep, '%Y') : ''; $viewmonth = is_object($object) ? dol_print_date($object->datep, '%m') : ''; $viewday = is_object($object) ? dol_print_date($object->datep, '%d') : ''; -$viewmode = ''; -$viewmode .= ''; + +$viewmode = ''; + +$viewmode .= ''; + + $tmpforcreatebutton = dol_getdate(dol_now(), true); $newparam = '&month='.str_pad((string) $month, 2, "0", STR_PAD_LEFT).'&year='.$tmpforcreatebutton['year']; diff --git a/htdocs/comm/action/pertype.php b/htdocs/comm/action/pertype.php index 990c9af705f..849f71c18fa 100644 --- a/htdocs/comm/action/pertype.php +++ b/htdocs/comm/action/pertype.php @@ -430,38 +430,37 @@ if ($conf->use_javascript_ajax) { $massactionbutton = ''; -$viewmode = ''; +$viewmode = ''; + +$viewmode .= ''; + + $newparam = ''; $newcardbutton = ''; if ($user->hasRight('agenda', 'myactions', 'create') || $user->hasRight('agenda', 'allactions', 'create')) { diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index 86ccb548efa..30f0d61d41a 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -431,40 +431,41 @@ if ($conf->use_javascript_ajax) { } } +$mode = 'show_peruser'; $massactionbutton = ''; -$viewmode = ''; -$viewmode .= ''; + +$viewmode = ''; + +$viewmode .= ''; + $newparam = ''; $newcardbutton = ''; diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 87d382501eb..dd6c18da470 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -7217,7 +7217,8 @@ abstract class CommonObject } if (!$error) { - $parameters = array('key'=>$key); + $parameters = array('key' => $key); + global $action; $reshook = $hookmanager->executeHooks('updateExtraFieldBeforeCommit', $parameters, $this, $action); if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php index 00a5626798e..9d477c19482 100644 --- a/htdocs/core/class/html.formactions.class.php +++ b/htdocs/core/class/html.formactions.class.php @@ -77,11 +77,41 @@ class FormActions ); // +ActionUncomplete + if (!empty($conf->use_javascript_ajax) || $onlyselect) { + //var_dump($selected); + if ($selected == 'done') { + $selected = '100'; + } + print ''; + if ($selected == 0 || $selected == 100) { + $canedit = 0; + } + + print ajax_combobox('select'.$htmlname, array(), 0, 0, 'resolve', '-1', $morecss); + + if (empty($onlyselect)) { + print ' = 0) ? '' : ' disabled').'>'; + print '%'; + } + } else { + print ' %'; + } + if (!empty($conf->use_javascript_ajax)) { print "\n"; print '\n"; } - if (!empty($conf->use_javascript_ajax) || $onlyselect) { - //var_dump($selected); - if ($selected == 'done') { - $selected = '100'; - } - print ''; - if ($selected == 0 || $selected == 100) { - $canedit = 0; - } - - print ajax_combobox('select'.$htmlname, array(), 0, 0, 'resolve', '-1', $morecss); - - if (empty($onlyselect)) { - print ' = 0) ? '' : ' disabled').'>'; - print '%'; - } - } else { - print ' %'; - } } diff --git a/htdocs/core/class/html.formexpensereport.class.php b/htdocs/core/class/html.formexpensereport.class.php index 2f6faab8363..4e64a9356c1 100644 --- a/htdocs/core/class/html.formexpensereport.class.php +++ b/htdocs/core/class/html.formexpensereport.class.php @@ -57,15 +57,16 @@ class FormExpenseReport * @param string $htmlname Name of HTML select * @param int $useempty 1=Add empty line * @param int $useshortlabel Use short labels + * @param string $morecss More CSS * @return string HTML select with status */ - public function selectExpensereportStatus($selected = 0, $htmlname = 'fk_statut', $useempty = 1, $useshortlabel = 0) + public function selectExpensereportStatus($selected = 0, $htmlname = 'fk_statut', $useempty = 1, $useshortlabel = 0, $morecss = '') { global $langs; $tmpep = new ExpenseReport($this->db); - $html = ''; if ($useempty) { $html.=''; } @@ -82,9 +83,10 @@ class FormExpenseReport $html .= $langs->trans($val); $html .= ''; } - $html .= ''; - $html .= ajax_combobox($htmlname); - print $html; + $html .= ''."\n"; + + $html .= ajax_combobox($htmlname, array(), 0, 0, 'resolve', ($useempty < 0 ? (string) $useempty : '-1'), $morecss); + return $html; } diff --git a/htdocs/core/tpl/objectline_edit.tpl.php b/htdocs/core/tpl/objectline_edit.tpl.php index 032fdc77b8b..fa58c7124e8 100644 --- a/htdocs/core/tpl/objectline_edit.tpl.php +++ b/htdocs/core/tpl/objectline_edit.tpl.php @@ -387,6 +387,7 @@ $coldisplay++; if ($prefillDates) { echo ' '.$langs->trans('FillWithLastServiceDates').''; } + print '