Fix: Bug to delete bank line
This commit is contained in:
parent
11bf611618
commit
73a33a6dae
@ -120,7 +120,7 @@ if ($action == 'add' && $id && ! isset($_POST["cancel"]) && $user->rights->banqu
|
||||
if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->banque->modifier)
|
||||
{
|
||||
$accline=new AccountLine($db);
|
||||
$accline->fetch($_GET["rowid"]);
|
||||
$result=$accline->fetch(GETPOST("rowid"));
|
||||
$result=$accline->delete();
|
||||
}
|
||||
|
||||
@ -294,6 +294,14 @@ if ($id > 0 || ! empty($ref))
|
||||
*/
|
||||
$param.='&account='.$object->id;
|
||||
|
||||
// Confirmation delete
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$text=$langs->trans('ConfirmDeleteTransaction');
|
||||
$ret=$form->form_confirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&rowid='.GETPOST("rowid"),$langs->trans('DeleteTransaction'),$text,'confirm_delete');
|
||||
if ($ret == 'html') print '<br>';
|
||||
}
|
||||
|
||||
// Define transaction list navigation string
|
||||
$navig = '<form action="'.$_SERVER["PHP_SELF"].'" name="newpage" method="GET"><div data-role="fieldcontain">';
|
||||
//print 'nbpage='.$totalPages.' viewline='.$viewline.' limitsql='.$limitsql;
|
||||
@ -316,14 +324,6 @@ if ($id > 0 || ! empty($ref))
|
||||
$navig.='</fieldset></div></form>';
|
||||
//var_dump($navig);
|
||||
|
||||
// Confirmation delete
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$text=$langs->trans('ConfirmDeleteTransaction');
|
||||
$ret=$form->form_confirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&rowid='.$_GET["rowid"],$langs->trans('DeleteTransaction'),$text,'confirm_delete');
|
||||
if ($ret == 'html') print '<br>';
|
||||
}
|
||||
|
||||
print '<table class="notopnoleftnoright" width="100%">';
|
||||
|
||||
// Show title
|
||||
|
||||
Loading…
Reference in New Issue
Block a user