X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Fcredit_note_entry.php;h=89ccd9909389a88d9b1558eea8bca2e50c2ad045;hb=f63c58475b057c9f4a05894a6935ea351b6d7af3;hp=5de3dfb9d11332e39dc29748257186ad60ab71a8;hpb=0ad7b92c6cf2e4e65ca0fa94ba31f30f7b292ba8;p=fa-stable.git diff --git a/sales/credit_note_entry.php b/sales/credit_note_entry.php index 5de3dfb9..89ccd990 100644 --- a/sales/credit_note_entry.php +++ b/sales/credit_note_entry.php @@ -167,9 +167,9 @@ function handle_update_item() //----------------------------------------------------------------------------- -function handle_delete_item() +function handle_delete_item($line_no) { - $_SESSION['Items']->remove_from_cart($_GET['Delete']); + $_SESSION['Items']->remove_from_cart($line_no); } //----------------------------------------------------------------------------- @@ -184,11 +184,9 @@ function handle_new_item() input_num('price'), input_num('Disc') / 100); } //----------------------------------------------------------------------------- -if (isset($_GET['Delete']) || isset($_GET['Edit'])) - copy_from_cn(); - -if (isset($_GET['Delete'])) - handle_delete_item(); +$id = find_submit('Delete'); +if ($id!=-1) + handle_delete_item($id); if (isset($_POST['AddItem']) || isset($_POST['UpdateItem'])) copy_to_cn();