Fix: cancel in create mode

This commit is contained in:
Alexandre SPANGARO 2017-07-28 07:00:52 +02:00
parent 95672e3bf0
commit 66067f980b

View File

@ -28,6 +28,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/paymentvarious.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php';
if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php';
if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php';
$langs->loadLangs(array("compta", "banks", "bills", "users", "accountancy"));
@ -70,7 +71,7 @@ if (empty($reshook))
{
if ($action != 'addlink')
{
$urltogo=$backtopage?$backtopage:dol_buildpath('/mymodule/myobject_list.php',1);
$urltogo=$backtopage?$backtopage:dol_buildpath('/compta/bank/various_payment/index.php',1);
header("Location: ".$urltogo);
exit;
}
@ -339,9 +340,9 @@ if ($id)
print '<table class="border" width="100%">';
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/bank/various_payment/index.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/bank/various_payment/index.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
print "<tr>";
print "<tr>";
print '<td class="titlefield">'.$langs->trans("Ref").'</td><td>';
print $form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', '');
print '</td></tr>';
@ -349,11 +350,13 @@ if ($id)
// Label
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$object->label.'</td></tr>';
// Payment date
print "<tr>";
print '<td>'.$langs->trans("DatePayment").'</td><td>';
print dol_print_date($object->datep,'day');
print '</td></tr>';
// Value date
print '<tr><td>'.$langs->trans("DateValue").'</td><td>';
print dol_print_date($object->datev,'day');
print '</td></tr>';