diff --git a/ChangeLog b/ChangeLog index 3b418404736..494050efbfc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -158,6 +158,37 @@ content by doing a print into function, sometimes by returning content into "res hook specifications so you must return output into "resprint". +***** ChangeLog for 5.0.5 compared to 5.0.4 ***** +FIX: #7075 : bad path for document +FIX: #7156 +FIX: #7173 +FIX: #7224 +FIX: #7226 +FIX: #7239 +FIX: add supplierproposaldet without price (new product) +FIX: amount overlap other amount when a pagebreak is done due to an image at the bottom of page. +FIX: Bad tax calculation with expense report +FIX: Best buy price calculation +FIX: Buying prices must always be in positive value. +FIX: calculate correct remain to pay for planned bank transactions +FIX: delete linked element on facture rec +FIX: edit sociale was emptying label +FIX: Error when updating thirdparty not returned +FIX: holidays with postgresql like on rowid integer +FIX: id of user not saved when making a payment of expense report +FIX: invoice page list +FIX: invoice situation VAT total rounding into PDF crabe +FIX: PgSQL compatibility. +FIX: remove order rights on invoice page +FIX: status were wrong on product referent list +FIX: supplier id was not passed to hooks +FIX: Support of vat code when using price per customer +FIX: User id correction on holiday request +FIX: value of user id filled to 0 in llx_bank_url when recording an expense report. +FIX: we have to check if contact doesn't already exist on add_contact() function +FIX: We should be able to insert data with value '0' into const +FIX: install process with DoliWamp + ***** ChangeLog for 5.0.4 compared to 5.0.3 ***** FIX: #5640 Prices of a predefined product/service were incorrect under certain circumstances FIX: #6541 since 4.0.4 to 5.0.0 autofill zip/town not working diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index 587d36d227a..505e2a9f534 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -4,7 +4,7 @@ use Stripe\BankAccount; /* Copyright (C) 2007-2010 Laurent Destailleur * Copyright (C) 2007-2010 Jean Heimburger * Copyright (C) 2011 Juanjo Menent - * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2012 Regis Houssin * Copyright (C) 2013 Christophe Battarel * Copyright (C) 2013-2017 Alexandre Spangaro * Copyright (C) 2013-2014 Florian Henry diff --git a/htdocs/accountancy/journal/expensereportsjournal.php b/htdocs/accountancy/journal/expensereportsjournal.php index d253fb2820a..3862bc4ec63 100644 --- a/htdocs/accountancy/journal/expensereportsjournal.php +++ b/htdocs/accountancy/journal/expensereportsjournal.php @@ -2,7 +2,7 @@ /* Copyright (C) 2007-2010 Laurent Destailleur * Copyright (C) 2007-2010 Jean Heimburger * Copyright (C) 2011 Juanjo Menent - * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2012 Regis Houssin * Copyright (C) 2013-2017 Alexandre Spangaro * Copyright (C) 2013-2016 Olivier Geffroy * Copyright (C) 2013-2016 Florian Henry diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index b095e4650dc..ceacabd57e9 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -2,7 +2,7 @@ /* Copyright (C) 2007-2010 Laurent Destailleur * Copyright (C) 2007-2010 Jean Heimburger * Copyright (C) 2011 Juanjo Menent - * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2012 Regis Houssin * Copyright (C) 2013-2017 Alexandre Spangaro * Copyright (C) 2013-2016 Olivier Geffroy * Copyright (C) 2013-2016 Florian Henry diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php index c03c800f5d6..51493942516 100644 --- a/htdocs/accountancy/journal/sellsjournal.php +++ b/htdocs/accountancy/journal/sellsjournal.php @@ -2,7 +2,7 @@ /* Copyright (C) 2007-2010 Laurent Destailleur * Copyright (C) 2007-2010 Jean Heimburger * Copyright (C) 2011 Juanjo Menent - * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2012 Regis Houssin * Copyright (C) 2013 Christophe Battarel * Copyright (C) 2013-2017 Alexandre Spangaro * Copyright (C) 2013-2016 Florian Henry diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index d33968b4fb2..c2dbdd46ed6 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -577,6 +577,11 @@ if ($action == 'mupdate') } +// Actions to delete doc +$upload_dir = $conf->agenda->dir_output.'/'.dol_sanitizeFileName($object->ref); +$permissioncreate = ($user->rights->agenda->allactions->delete || (($object->authorid == $user->id || $object->userownerid == $user->id) && $user->rights->agenda->myactions->delete)); +include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; + /* * View @@ -1212,7 +1217,6 @@ if ($id > 0) $out.=''.$langs->trans("ViewDay").''; $linkback.=$out; - $morehtmlref='
'; // Thirdparty //$morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1); @@ -1477,7 +1481,7 @@ if ($id > 0) */ $filedir=$conf->agenda->multidir_output[$conf->entity].'/'.$object->id; - $urlsource=$_SERVER["PHP_SELF"]."?socid=".$object->id; + $urlsource=$_SERVER["PHP_SELF"]."?id=".$object->id; $genallowed=$user->rights->agenda->myactions->create; $delallowed=$user->rights->agenda->myactions->delete; diff --git a/htdocs/compta/bank/document.php b/htdocs/compta/bank/document.php index 084cddf51cd..40f06895792 100644 --- a/htdocs/compta/bank/document.php +++ b/htdocs/compta/bank/document.php @@ -3,7 +3,7 @@ /* Copyright (C) 2003-2007 Rodolphe Quiedeville * Copyright (C) 2004-2008 Laurent Destailleur * Copyright (C) 2005 Marc Barilley / Ocebo - * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2005-2017 Regis Houssin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -62,9 +62,7 @@ $result = restrictedArea($user, 'banque', $fieldvalue, 'bank_account', '', '', $sortfield = GETPOST("sortfield", 'alpha'); $sortorder = GETPOST("sortorder", 'alpha'); $page = GETPOST("page", 'int'); -if ($page == -1) { - $page = 0; -} +if (empty($page) || $page == -1) { $page = 0; } $offset = $conf->liste_limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; @@ -122,21 +120,21 @@ if ($id > 0 || !empty($ref)) { $linkback = ''.$langs->trans("BackToList").''; dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); - - + + print '
'; print '
'; - + print ''; print ''; print ''; print "
' . $langs->trans("NbOfAttachedFiles") . '' . count($filearray) . '
' . $langs->trans("TotalSizeOfAttachedFiles") . '' . $totalsize . ' ' . $langs->trans("bytes") . '
\n"; print '
'; - + dol_fiche_end(); - + $modulepart = 'bank'; $permission = $user->rights->banque->modifier; $permtoedit = $user->rights->banque->modifier; diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index e10544f3c18..731b8aafec6 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -664,12 +664,13 @@ if (empty($reshook)) if ($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_REPLACEMENT || $object->type == Facture::TYPE_SITUATION) { // If we're on a standard invoice, we have to get excess received to create a discount in TTC without VAT - $sql = 'SELECT SUM(pf.amount) as total_paiements FROM llx_c_paiement as c, llx_paiement_facture as pf, llx_paiement as p - WHERE pf.fk_facture = '.$object->id.' AND p.fk_paiement = c.id AND pf.fk_paiement = p.rowid ORDER BY p.datep, p.tms'; + WHERE pf.fk_facture = '.$object->id.' AND p.fk_paiement = c.id AND pf.fk_paiement = p.rowid'; $resql = $db->query($sql); + if (! $resql) dol_print_error($db); + $res = $db->fetch_object($resql); $total_paiements = $res->total_paiements; @@ -4128,11 +4129,11 @@ else if ($id > 0 || ! empty($ref)) if ($objectidnext) { print '
' . $langs->trans('DoPayment') . '
'; } else { - if ($resteapayer == 0) { - print '
' . $langs->trans('DoPayment') . '
'; - } else { + //if ($resteapayer == 0) { + // print '
' . $langs->trans('DoPayment') . '
'; + //} else { print ''; - } + //} } } diff --git a/htdocs/contact/agenda.php b/htdocs/contact/agenda.php index 7f35c71cd11..cc7f36261cc 100644 --- a/htdocs/contact/agenda.php +++ b/htdocs/contact/agenda.php @@ -211,7 +211,7 @@ else dol_fiche_head($head, 'agenda', $title, -1, 'contact'); $linkback = ''.$langs->trans("BackToList").''; - + $morehtmlref='
'; if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) { @@ -223,42 +223,42 @@ else else $morehtmlref.=$langs->trans("ContactNotLinkedToCompany"); } $morehtmlref.='
'; - + dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref); - + print '
'; - + print '
'; - + $object->info($id); print dol_print_object_info($object, 1); - + print '
'; - + print dol_fiche_end(); - + // Actions buttons - + $objcon=$object; $object->fetch_thirdparty(); $objthirdparty=$object->thirdparty; - + $out=''; $permok=$user->rights->agenda->myactions->create; if ((! empty($objthirdparty->id) || ! empty($objcon->id)) && $permok) { //$out.='trans("AddAnAction"),'filenew'); //$out.=""; } - - + + print '
'; - + if (! empty($conf->agenda->enabled)) { if (! empty($user->rights->agenda->myactions->create) || ! empty($user->rights->agenda->allactions->create)) @@ -270,22 +270,22 @@ else print ''.$langs->trans("AddAction").''; } } - + print '
'; - + if (! empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read) )) { $param='&id='.$id; if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage; if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; - - + + print load_fiche_titre($langs->trans("TasksHistoryForThisContact"),'',''); - + // List of all actions $filters=array(); $filters['search_agenda_label']=$search_agenda_label; - + show_actions_done($conf,$langs,$db,$objthirdparty,$object,0,$actioncode, '', $filters, $sortfield, $sortorder); } } diff --git a/htdocs/core/class/dolgraph.class.php b/htdocs/core/class/dolgraph.class.php index 4fad0149a5b..d603d1b6cc1 100644 --- a/htdocs/core/class/dolgraph.class.php +++ b/htdocs/core/class/dolgraph.class.php @@ -25,7 +25,7 @@ /** * Class to build graphs. - * Usage is: + * Usage is: * $dolgraph=new DolGraph(); * $dolgraph->SetTitle($langs->transnoentities('Tracking_Projects_Pourcent').'
'.$langs->transnoentities('Tracking_IndicatorDefGraph').'%'); * $dolgraph->SetMaxValue(50); @@ -570,6 +570,7 @@ class DolGraph function GetFloorMinValue() { $min = $this->GetMinValueInData(); + if ($min == '') $min=0; if ($min != 0) $min--; $size=dol_strlen(abs(floor($min))); $factor=1; @@ -868,7 +869,7 @@ class DolGraph return; } $this->stringtoshow.='
'."\n"; - + $this->stringtoshow.='