diff --git a/htdocs/compta/cashcontrol/cashcontrol_card.php b/htdocs/compta/cashcontrol/cashcontrol_card.php index 0a7e2fa2d17..d98142a30b3 100644 --- a/htdocs/compta/cashcontrol/cashcontrol_card.php +++ b/htdocs/compta/cashcontrol/cashcontrol_card.php @@ -551,7 +551,9 @@ if (empty($action) || $action == "view") print ''; print $langs->trans("Period"); print ''; - print $object->year_close."-".$object->month_close."-".$object->day_close; + print $object->year_close; + print ($object->month_close ? "-" : "").$object->month_close; + print ($object->day_close ? "-" : "").$object->day_close; print ''; print ''; @@ -570,7 +572,6 @@ if (empty($action) || $action == "view") print ''.$langs->trans("InitialBankBalance").' - '.$langs->trans("Cash").''; print price($object->opening, 0, $langs, 1, -1, -1, $conf->currency); print ""; - foreach ($arrayofpaymentmode as $key => $val) { print ''.$langs->trans($val).''; diff --git a/htdocs/compta/cashcontrol/report.php b/htdocs/compta/cashcontrol/report.php index 2a2477fce5e..26023d47701 100644 --- a/htdocs/compta/cashcontrol/report.php +++ b/htdocs/compta/cashcontrol/report.php @@ -33,11 +33,11 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/compta/cashcontrol/class/cashcontrol.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/cashcontrol/class/cashcontrol.class.php'; $id = GETPOST('id', 'int'); $_GET['optioncss']="print"; -include_once 'class/cashcontrol.class.php'; $cashcontrol= new CashControl($db); $cashcontrol->fetch($id); @@ -243,12 +243,25 @@ if ($resql) print ""; - $cash=$cash+$cashcontrol->opening; + $cash = $cash + $cashcontrol->opening; print "

"; - print $langs->trans("Cash").": ".price($cash)."

"; - print $langs->trans("PaymentTypeCB").": ".price($bank)."

"; - print $langs->trans("PaymentTypeCHQ").": ".price($cheque)."

"; - if ($other) print $langs->trans("Other").": ".price($other)."

"; + print $langs->trans("Cash").": ".price($cash); + if ($cash != $object->cash) { + print ' <> '.$langs->trans("Declared").': '.price($cashcontrol->cash).''; + } + print "

"; + print '
'; + print $langs->trans("PaymentTypeCHQ").": ".price($cheque); + if ($cash != $object->cheque) { + print ' <> '.$langs->trans("Declared").': '.price($cashcontrol->cheque).''; + } + print "

"; + print '
'; + print $langs->trans("PaymentTypeCB").": ".price($bank); + print "

"; + if ($other) { + print '
'.$langs->trans("Other").": ".price($other)."

"; + } print "

"; //save totals to DB diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index c78fe06693b..a3d73b627b7 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -1712,8 +1712,8 @@ class FormFile if (count($filearray) == 0) { print ''; - if (empty($textifempty)) print $langs->trans("NoFileFound"); - else print $textifempty; + if (empty($textifempty)) print ''.$langs->trans("NoFileFound").''; + else print ''.$textifempty.''; print ''; } print "";