-//Chaitanya : 13-OCT-2011 - To support Edit feature
-if (isset($_POST['ref']) && $_SESSION['alloc']->trans_no == 0) // added by Joe to fix the browser back button
-{
- $tno = get_customer_trans_from_ref(ST_CUSTPAYMENT, $_POST['ref']);
- if ($tno != false)
- {
- display_error( _("The entered reference is already in use."));
- display_footer_exit();
- }
-}
-$new = $_SESSION['alloc']->trans_no == 0;
-
-if (list_updated('customer_id') || ($new && list_updated('bank_account'))) {
- $_SESSION['alloc']->read();
- $_POST['memo_'] = $_POST['amount'] = $_POST['discount'] = '';
- $Ajax->activate('alloc_tbl');
-}