From adbb41799cd52c99a2fd9d12a33ce8595a022a32 Mon Sep 17 00:00:00 2001 From: Marc de Lima Lucio Date: Tue, 1 Aug 2017 11:08:58 +0200 Subject: [PATCH 1/2] FIX: calculate correct remain to pay for planned bank transactions --- htdocs/compta/bank/treso.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/compta/bank/treso.php b/htdocs/compta/bank/treso.php index cbdb769789f..92c1a73cf4f 100644 --- a/htdocs/compta/bank/treso.php +++ b/htdocs/compta/bank/treso.php @@ -282,6 +282,8 @@ if ($_REQUEST["account"] || $_REQUEST["ref"]) $refcomp=$societestatic->getNomUrl(1,'',24); $paiement = $facturestatic->getSommePaiement(); // Payment already done + $paiement+= $facturestatic->getSumDepositsUsed(); + $paiement+= $facturestatic->getSumCreditNotesUsed(); } if ($obj->family == 'social_contribution') { From 09c271b7c57d073752e51def1e6ee58979855b5a Mon Sep 17 00:00:00 2001 From: Ferran Marcet Date: Wed, 2 Aug 2017 10:31:16 +0200 Subject: [PATCH 2/2] Fix: Correction in the calculation of the next week --- htdocs/core/lib/date.lib.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/lib/date.lib.php b/htdocs/core/lib/date.lib.php index b06baaa9288..e08b6c24de5 100644 --- a/htdocs/core/lib/date.lib.php +++ b/htdocs/core/lib/date.lib.php @@ -2,6 +2,7 @@ /* Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2005-2011 Regis Houssin * Copyright (C) 2011-2015 Juanjo Menent + * Copyright (C) 2017 Ferran Marcet * * 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 @@ -407,7 +408,7 @@ function dol_get_next_week($day, $week, $month, $year) { $tmparray = dol_get_first_day_week($day, $month, $year); - $time=dol_mktime(12,0,0,$month,$tmparray['first_day'],$year,1,0); + $time=dol_mktime(12,0,0,$tmparray['first_month'],$tmparray['first_day'],$tmparray['first_year'],1,0); $time+=24*60*60*7; $tmparray=dol_getdate($time,true);