From a524bbc5c692523fe6fcfdb1ab609b21adbf5ef2 Mon Sep 17 00:00:00 2001 From: gauthier Date: Wed, 13 Mar 2019 15:58:58 +0100 Subject: [PATCH 1/4] FIX : when we create deposit with multi tva, we mustn't add line if amount = 0 (example when we have a 100% reduc on one of origin invoice line) --- htdocs/compta/facture/card.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index b379bf31602..dcf167da515 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -1218,6 +1218,9 @@ if (empty($reshook)) foreach ($amountdeposit as $tva => $amount) { + + if(empty($amount)) continue; + $arraylist = array('amount' => 'FixAmount','variable' => 'VarAmount'); $descline = $langs->trans('Deposit'); $descline.= ' - '.$langs->trans($arraylist[$typeamount]); From 2da60fb885cbdfbd0f0ec3fdf4d8277b4b41225b Mon Sep 17 00:00:00 2001 From: atm-ph Date: Fri, 15 Mar 2019 15:15:03 +0100 Subject: [PATCH 2/4] Fix var name --- htdocs/projet/activity/perday.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/projet/activity/perday.php b/htdocs/projet/activity/perday.php index 89ed60a0632..164a7462e83 100644 --- a/htdocs/projet/activity/perday.php +++ b/htdocs/projet/activity/perday.php @@ -498,7 +498,7 @@ $holiday = new Holiday($db); $isavailable=array(); $statusofholidaytocheck = '3'; -$isavailablefordayanduser = $holiday->verifDateHolidayForTimestamp($usertoprocess->id, $daytoparse, $statusofholiday); // $daytoparse is a date with hours = 0 +$isavailablefordayanduser = $holiday->verifDateHolidayForTimestamp($usertoprocess->id, $daytoparse, $statusofholidaytocheck); // $daytoparse is a date with hours = 0 $isavailable[$daytoparse]=$isavailablefordayanduser; // in projectLinesPerWeek later, we are using $firstdaytoshow and dol_time_plus_duree to loop on each day if (count($tasksarray) > 0) From 6f0fbc42c18d10dde65c4266b945d5634b64f76e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 15 Mar 2019 15:13:28 +0100 Subject: [PATCH 3/4] FIX Param keepn must be 1 when dol_escape_htmltag used for textarea Conflicts: htdocs/expensereport/card.php htdocs/projet/card.php htdocs/public/members/new.php htdocs/public/opensurvey/studs.php --- htdocs/core/lib/functions.lib.php | 2 +- htdocs/don/card.php | 4 ++-- htdocs/expensereport/card.php | 4 ++-- htdocs/projet/card.php | 2 +- htdocs/public/members/new.php | 4 ++-- htdocs/public/opensurvey/studs.php | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 0a81f729fc8..57d5329717c 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -965,7 +965,7 @@ function dol_escape_js($stringtoescape, $mode=0, $noescapebackslashn=0) * * @param string $stringtoescape String to escape * @param int $keepb 1=Preserve b tags (otherwise, remove them) - * @param int $keepn 1=Preserve \r\n strings (otherwise, replace them with escaped value) + * @param int $keepn 1=Preserve \r\n strings (otherwise, replace them with escaped value). Set to 1 when escaping for a '; + print ''; // Zip / Town print ''.$langs->trans("Zip").' / '.$langs->trans("Town").''; @@ -535,7 +535,7 @@ if (! empty($id) && $action == 'edit') print ''.$langs->trans("Lastname").''; print ''.$langs->trans("Firstname").''; print ''.$langs->trans("Address").''; - print ''; + print ''; // Zip / Town print ''.$langs->trans("Zip").' / '.$langs->trans("Town").''; diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index fab70b1200a..ddd1f7cd306 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -2132,7 +2132,7 @@ else // Add comments print ''; - print ''; + print ''; print ''; // VAT @@ -2215,7 +2215,7 @@ else // Add comments print ''; - print ''; + print ''; print ''; // Select VAT diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index f2b735e6340..56646a1a470 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -616,7 +616,7 @@ if ($action == 'create' && $user->rights->projet->creer) // Description print ''.$langs->trans("Description").''; print ''; - print ''; + print ''; print ''; // Bill time diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php index 9a85191e34f..e793547edd7 100644 --- a/htdocs/public/members/new.php +++ b/htdocs/public/members/new.php @@ -586,7 +586,7 @@ print ''.$langs->trans("Firstname").' *'.$langs->trans("Company").''."\n"; // Address print ''.$langs->trans("Address").''."\n"; -print ''."\n"; +print ''."\n"; // Zip / Town print ''.$langs->trans('Zip').' / '.$langs->trans('Town').''; print $formcompany->select_ziptown(GETPOST('zipcode'), 'zipcode', array('town','selectcountry_id','state_id'), 6, 1); @@ -641,7 +641,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; // Comments print ''; print ''.$langs->trans("Comments").''; -print ''; +print ''; print ''."\n"; // Add specific fields used by Dolibarr foundation for example diff --git a/htdocs/public/opensurvey/studs.php b/htdocs/public/opensurvey/studs.php index acf986bb226..6b7eef356b3 100644 --- a/htdocs/public/opensurvey/studs.php +++ b/htdocs/public/opensurvey/studs.php @@ -752,7 +752,7 @@ if ($comments) if ($object->allow_comments) { print '
' .$langs->trans("AddACommentForPoll") . "
\n"; - print '
'."\n"; + print '
'."\n"; print $langs->trans("Name") .': '; print '   '."\n"; print '
'."\n"; From b33c366b0227f9f185a9664b4eea55fb3045c802 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 15 Mar 2019 19:16:49 +0100 Subject: [PATCH 4/4] Update card.php --- htdocs/compta/facture/card.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index dcf167da515..43f727a7ae8 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -1218,8 +1218,7 @@ if (empty($reshook)) foreach ($amountdeposit as $tva => $amount) { - - if(empty($amount)) continue; + if (empty($amount)) continue; $arraylist = array('amount' => 'FixAmount','variable' => 'VarAmount'); $descline = $langs->trans('Deposit');