From 3bf12ca19353b1b305043a70e0140976bccf2d87 Mon Sep 17 00:00:00 2001 From: ATM john Date: Thu, 8 Oct 2020 19:10:41 +0200 Subject: [PATCH 1/4] Fix total loan calculation --- htdocs/projet/element.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index 5f400dfe7b7..dcdf9a24281 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -734,7 +734,7 @@ foreach ($listofreferent as $key => $value) || !empty($dates) && empty($datee) && $loanSchedule->datep >= $dates && $loanSchedule->datep <= dol_now() || empty($dates) && !empty($datee) && $loanSchedule->datep <= $datee ) { - $total_ht_by_line = -$loanSchedule->amount_capital; + $total_ht_by_line-= $loanSchedule->amount_capital; } } } From e854cce158fd490113e902c82009b240486c1cf3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 8 Oct 2020 19:23:35 +0200 Subject: [PATCH 2/4] Update element.php --- htdocs/projet/element.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index dcdf9a24281..c513123c9bf 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -734,7 +734,7 @@ foreach ($listofreferent as $key => $value) || !empty($dates) && empty($datee) && $loanSchedule->datep >= $dates && $loanSchedule->datep <= dol_now() || empty($dates) && !empty($datee) && $loanSchedule->datep <= $datee ) { - $total_ht_by_line-= $loanSchedule->amount_capital; + $total_ht_by_line -= $loanSchedule->amount_capital; } } } From 3b7b4312cb1e5321040e97956e8a37860f5cb4c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BCdiger=20Hahn?= Date: Fri, 9 Oct 2020 11:13:11 +0200 Subject: [PATCH 3/4] Fix for #14957 and probably a lot of other issues Convert special characters for a valid use in xml documents --- htdocs/includes/odtphp/odf.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/includes/odtphp/odf.php b/htdocs/includes/odtphp/odf.php index 45e442462b4..d84559eb459 100644 --- a/htdocs/includes/odtphp/odf.php +++ b/htdocs/includes/odtphp/odf.php @@ -141,6 +141,7 @@ class Odf //} } + $value = $encode ? htmlspecialchars($value) : $value; $value = ($charset == 'ISO-8859') ? utf8_encode($value) : $value; // Check if the value includes html tags From ae64e513a8f35b5fd392637a5ea9918c82bd048d Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Sat, 10 Oct 2020 07:19:13 +0200 Subject: [PATCH 4/4] FIX #14956 Add a possibility to modify date on credit note invoice --- htdocs/compta/facture/card.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 7b0d7fcf869..8a2b5b150e4 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -4118,17 +4118,13 @@ if ($action == 'create') print ''; - if ($object->type != Facture::TYPE_CREDIT_NOTE && $action != 'editinvoicedate' && !empty($object->brouillon) && $usercancreate && empty($conf->global->FAC_FORCE_DATE_VALIDATION)) + if ($action != 'editinvoicedate' && !empty($object->brouillon) && $usercancreate && empty($conf->global->FAC_FORCE_DATE_VALIDATION)) print ''; print '
'; print $langs->trans('DateInvoice'); print 'id.'">'.img_edit($langs->trans('SetDate'), 1).'
'; print ''; - if ($object->type != Facture::TYPE_CREDIT_NOTE) { - if ($action == 'editinvoicedate') { - $form->form_date($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->date, 'invoicedate'); - } else { - print dol_print_date($object->date, 'day'); - } + if ($action == 'editinvoicedate') { + $form->form_date($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->date, 'invoicedate'); } else { print dol_print_date($object->date, 'day'); }