unset ($_SESSION['pay_items']);
}
+ check_is_closed($type, $trans_no);
+
$cart = new items_cart($type);
$cart->order_id = $trans_no;
// apply exchange rate
foreach($cart->gl_items as $line_no => $line)
$cart->gl_items[$line_no]->amount *= $ex_rate;
-
+
} else {
$cart->reference = $Refs->get_next($cart->trans_type);
$cart->tran_date = new_doc_date();
}
elseif (!is_date_in_fiscalyear($_POST['date_']))
{
- display_error(_("The entered date is not in fiscal year."));
+ display_error(_("The entered date is out of fiscal year or is closed for further data entry."));
set_focus('date_');
$input_error = 1;
}
$_SESSION['pay_items']->trans_type, $_SESSION['pay_items']->order_id, $_POST['bank_account'],
$_SESSION['pay_items'], $_POST['date_'],
$_POST['PayType'], $_POST['person_id'], get_post('PersonDetailID'),
- $_POST['ref'], $_POST['memo_'], true);
+ $_POST['ref'], $_POST['memo_'], false);
$trans_type = $trans[0];
$trans_no = $trans[1];