From ffc961599c2f74d15c96cf66b20d3c1dc5883ce9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 27 Oct 2020 10:19:00 +0100 Subject: [PATCH 1/3] FIX error 500 on cash fence --- htdocs/compta/cashcontrol/cashcontrol_card.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/compta/cashcontrol/cashcontrol_card.php b/htdocs/compta/cashcontrol/cashcontrol_card.php index 3780fbc1afe..d27f87cbc23 100644 --- a/htdocs/compta/cashcontrol/cashcontrol_card.php +++ b/htdocs/compta/cashcontrol/cashcontrol_card.php @@ -28,6 +28,7 @@ */ require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/cashcontrol/class/cashcontrol.class.php'; From 00b49dba180cec2c9f23dc8e89fce6188c4d4418 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 27 Oct 2020 10:26:30 +0100 Subject: [PATCH 2/3] Fix label --- htdocs/compta/cashcontrol/report.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/cashcontrol/report.php b/htdocs/compta/cashcontrol/report.php index 1ea06eba9e9..ef1d20c5efc 100644 --- a/htdocs/compta/cashcontrol/report.php +++ b/htdocs/compta/cashcontrol/report.php @@ -127,8 +127,10 @@ if ($resql) $num = $db->num_rows($resql); $i = 0; + print ""; print "

"; - if ($cashcontrol->status == 2) print $langs->trans("CashControl")." ".$cashcontrol->id; + var_dump($cashcontrol->status); + if ($cashcontrol->status != $cashcontrol::STATUS_DRAFT) print $langs->trans("CashControl")." ".$cashcontrol->id; else print $langs->trans("CashControl")." - ".$langs->trans("Draft"); print "
".$langs->trans("DateCreationShort").": ".dol_print_date($cashcontrol->date_creation, 'dayhour')."

"; From 5943e784ec57afe9b59d7a248a2909d2da45e039 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 27 Oct 2020 10:27:44 +0100 Subject: [PATCH 3/3] Remove var_dump --- htdocs/compta/cashcontrol/report.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/compta/cashcontrol/report.php b/htdocs/compta/cashcontrol/report.php index ef1d20c5efc..51438b3be6e 100644 --- a/htdocs/compta/cashcontrol/report.php +++ b/htdocs/compta/cashcontrol/report.php @@ -127,9 +127,8 @@ if ($resql) $num = $db->num_rows($resql); $i = 0; - print ""; + print "\n"; print "

"; - var_dump($cashcontrol->status); if ($cashcontrol->status != $cashcontrol::STATUS_DRAFT) print $langs->trans("CashControl")." ".$cashcontrol->id; else print $langs->trans("CashControl")." - ".$langs->trans("Draft"); print "
".$langs->trans("DateCreationShort").": ".dol_print_date($cashcontrol->date_creation, 'dayhour')."

";