diff --git a/ChangeLog b/ChangeLog index f6d72624b4d..c49735f97e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,7 +8,9 @@ Fix: Bad rounding on margin calculations and display. Fix: Option drop table into backup was broken. Fix: [ bug #1105 ] Searching Boxes other search option Fix: wrong buy price update -Fix :[ bug #1142 ] Set paiement on invoice (PGSql) +Fix: [ bug #1142 ] Set paiement on invoice (PGSql) +Fix: [ bug #1145 ] Agenda button list type do not display +Fix: [ bug #1148 ] Product consomation : supplier order bad status ***** ChangeLog for 3.4.1 compared to 3.4.0 ***** Fix: Display buying price on line edit when no supplier price is defined diff --git a/htdocs/core/lib/agenda.lib.php b/htdocs/core/lib/agenda.lib.php index dda971668de..32584a19a9b 100644 --- a/htdocs/core/lib/agenda.lib.php +++ b/htdocs/core/lib/agenda.lib.php @@ -43,126 +43,116 @@ * @param string $actioncode Preselected value of actioncode for filter on type * @return void */ -function print_actions_filter($form,$canedit,$status,$year,$month,$day,$showbirthday,$filtera,$filtert,$filterd,$pid,$socid,$showextcals=array(),$actioncode='') -{ - global $conf,$user,$langs,$db; +function print_actions_filter($form, $canedit, $status, $year, $month, $day, $showbirthday, $filtera, $filtert, $filterd, $pid, $socid, $showextcals = array(), $actioncode = '') { + global $conf, $user, $langs, $db; + // Filters - if ($canedit || ! empty($conf->projet->enabled)) - { - print '
'; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - if ($canedit || ! empty($conf->projet->enabled)) - { - print ''; - - // Buttons - print ''; - - // Legend - if ($conf->use_javascript_ajax && is_array($showextcals)) - { - print ''; - } - - print ''; - } - print '
'; - - print ''; - - if ($canedit) - { - print ''; - print ''; - print ''; - - print ''; - print ''; - - print ''; - print ''; - - include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; - $formactions=new FormActions($db); - print ''; - print ''; - } - - if (! empty($conf->projet->enabled) && $user->rights->projet->lire) - { - print ''; - print ''; - } - - print '
'; - print $langs->trans("ActionsAskedBy"); - print '  '; - print $form->select_dolusers($filtera,'userasked',1,'',!$canedit); - print '
'; - print $langs->trans("or").' '.$langs->trans("ActionsToDoBy"); - print '  '; - print $form->select_dolusers($filtert,'usertodo',1,'',!$canedit); - print '
'; - print $langs->trans("or").' '.$langs->trans("ActionsDoneBy"); - print '  '; - print $form->select_dolusers($filterd,'userdone',1,'',!$canedit); - print '
'; - print $langs->trans("Type"); - print '  '; - - print $formactions->select_type_actions($actioncode, "actioncode", '', (empty($conf->global->AGENDA_USE_EVENT_TYPE)?1:0)); - - print '
'; - print $langs->trans("Project").'   '; - print ''; - select_projects($socid?$socid:-1, $pid, 'projectid', 64); - print '
'; - print '
'; - print img_picto($langs->trans("ViewCal"),'object_calendar','class="hideonsmartphone"').' '; - print '
'; - print img_picto($langs->trans("ViewWeek"),'object_calendarweek','class="hideonsmartphone"').' '; - print '
'; - print img_picto($langs->trans("ViewDay"),'object_calendarday','class="hideonsmartphone"').' '; - print '
'; - print img_picto($langs->trans("ViewList"),'object_list','class="hideonsmartphone"').' '; - print '
'; - print ''."\n"; - print ''; - if (! empty($conf->global->MAIN_JS_SWITCH_AGENDA)) - { - if (count($showextcals) > 0) - { - print ''; - foreach($showextcals as $val) - { - $htmlname=dol_string_nospecial($val['name']); - print ''."\n"; - print ''; - } - } - } - print ''; - print '
'.$langs->trans("LocalAgenda").'
'.$val['name'].'
'.$langs->trans("AgendaShowBirthdayEvents").'
'; - print '
'; - print '
'; + print '
'; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + + print ''; + + // Buttons + print ''; + + // Legend + if ($conf->use_javascript_ajax && is_array ( $showextcals )) { + print ''; + } + + print ''; + + print '
'; + + print ''; + + if ($canedit) { + print ''; + print ''; + print ''; + + print ''; + print ''; + + print ''; + print ''; + + include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php'; + $formactions = new FormActions ( $db ); + print ''; + print ''; } + + if (! empty ( $conf->projet->enabled ) && $user->rights->projet->lire) { + print ''; + print ''; + } + + print '
'; + print $langs->trans ( "ActionsAskedBy" ); + print '  '; + print $form->select_dolusers ( $filtera, 'userasked', 1, '', ! $canedit ); + print '
'; + print $langs->trans ( "or" ) . ' ' . $langs->trans ( "ActionsToDoBy" ); + print '  '; + print $form->select_dolusers ( $filtert, 'usertodo', 1, '', ! $canedit ); + print '
'; + print $langs->trans ( "or" ) . ' ' . $langs->trans ( "ActionsDoneBy" ); + print '  '; + print $form->select_dolusers ( $filterd, 'userdone', 1, '', ! $canedit ); + print '
'; + print $langs->trans ( "Type" ); + print '  '; + + print $formactions->select_type_actions ( $actioncode, "actioncode", '', (empty ( $conf->global->AGENDA_USE_EVENT_TYPE ) ? 1 : 0) ); + + print '
'; + print $langs->trans ( "Project" ) . '   '; + print ''; + select_projects ( $socid ? $socid : - 1, $pid, 'projectid', 64 ); + print '
'; + print '
'; + print img_picto ( $langs->trans ( "ViewCal" ), 'object_calendar', 'class="hideonsmartphone"' ) . ' '; + print '
'; + print img_picto ( $langs->trans ( "ViewWeek" ), 'object_calendarweek', 'class="hideonsmartphone"' ) . ' '; + print '
'; + print img_picto ( $langs->trans ( "ViewDay" ), 'object_calendarday', 'class="hideonsmartphone"' ) . ' '; + print '
'; + print img_picto ( $langs->trans ( "ViewList" ), 'object_list', 'class="hideonsmartphone"' ) . ' '; + print '
'; + print '' . "\n"; + print ''; + if (! empty ( $conf->global->MAIN_JS_SWITCH_AGENDA )) { + if (count ( $showextcals ) > 0) { + print ''; + foreach ( $showextcals as $val ) { + $htmlname = dol_string_nospecial ( $val ['name'] ); + print '' . "\n"; + print ''; + } + } + } + print ''; + print '
' . $langs->trans ( "LocalAgenda" ) . '
' . $val ['name'] . '
' . $langs->trans ( "AgendaShowBirthdayEvents" ) . '
'; + print '
'; + print '
'; } diff --git a/htdocs/product/stats/commande_fournisseur.php b/htdocs/product/stats/commande_fournisseur.php index 0e8b5509149..f8d73c3e5e9 100644 --- a/htdocs/product/stats/commande_fournisseur.php +++ b/htdocs/product/stats/commande_fournisseur.php @@ -25,7 +25,7 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; +require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; $langs->load("orders"); @@ -136,8 +136,8 @@ if ($id > 0 || ! empty($ref)) print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"c.fk_statut","","&id=".$product->id,'align="right"',$sortfield,$sortorder); print "\n"; - $commandestatic=new Commande($db); - + $commandestatic=new CommandeFournisseur($db); + if ($num > 0) { $var=True; @@ -145,17 +145,19 @@ if ($id > 0 || ! empty($ref)) { $objp = $db->fetch_object($result); $var=!$var; + + $commandestatic->id=$objp->commandeid; + $commandestatic->ref=$objp->ref; + $commandestatic->statut=$objp->statut; print ""; - print ''.img_object($langs->trans("ShowOrder"),"order").' '; - print $objp->ref; - print "\n"; + print ''.$commandestatic->getNomUrl(1)."\n"; print ''.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,44).''; print "".$objp->code_client."\n"; print ""; print dol_print_date($db->jdate($objp->date_commande)).""; print "".price($objp->total_ht)."\n"; - print ''.$commandestatic->LibStatut($objp->statut,$objp->facture,5).''; + print ''.$commandestatic->getLibStatut(4).''; print "\n"; $i++; }