diff --git a/htdocs/compta/cashcontrol/cashcontrol_card.php b/htdocs/compta/cashcontrol/cashcontrol_card.php index 23de377cf24..3d5476d6f5a 100644 --- a/htdocs/compta/cashcontrol/cashcontrol_card.php +++ b/htdocs/compta/cashcontrol/cashcontrol_card.php @@ -162,7 +162,7 @@ elseif ($action == "add") } } -if ($action == "close") +if ($action == "valid") { $object->fetch($id); @@ -213,7 +213,7 @@ if ($action == 'confirm_delete' && !empty($permissiontodelete)) $form = new Form($db); -if ($action == "create" || $action == "start") +if ($action == "create" || $action == "start" || $action == "close") { llxHeader(); @@ -323,10 +323,16 @@ if ($action == "create" || $action == "start") { print ''; } - else + else if ($action == 'close') + { + print ''; + print ''; + } + else { print ''; } + print ''; print ''; print ''; @@ -405,7 +411,7 @@ if ($action == "create" || $action == "start") print '
'.$langs->trans("Module").'
'; // Table to see/enter balance - if ($action == 'start' && GETPOST('posnumber') != '' && GETPOST('posnumber') != '' && GETPOST('posnumber') != '-1') + if (($action == 'start' && GETPOST('posnumber') != '' && GETPOST('posnumber') != '' && GETPOST('posnumber') != '-1') || $action == 'close') { $posmodule = GETPOST('posmodule', 'alpha'); $terminalid = GETPOST('posnumber', 'alpha'); @@ -482,21 +488,33 @@ if ($action == "create" || $action == "start") print ''.$langs->trans("RealAmount").''; // Initial amount print ''; - print ''; + print ''; print ''; // Amount per payment type $i = 0; foreach ($arrayofpaymentmode as $key => $val) { print ''; - print ''; + print ''; print ''; $i++; } // Save print ''; print ''; - print ''; + if ($action == 'start') print ''; + else if ($action == 'close') print ''; print ''; print ''; @@ -591,7 +609,7 @@ if (empty($action) || $action == "view") print '
'.$langs->trans('PrintTicket').'
'; if ($object->status == CashControl::STATUS_DRAFT) { - print '
'.$langs->trans('ValidateAndClose').'
'; + print '
'.$langs->trans('Close').'
'; print '
'.$langs->trans('Delete').'
'; }