//-----------------------------------------------------------------------------------------------
check_db_has_bank_accounts(_("There are no bank accounts defined in the system."));
+if (isset($_GET['ModifyDeposit']) || isset($_GET['ModifyPayment']))
+ check_is_editable($_SESSION['pay_items']->trans_type, $_SESSION['pay_items']->order_id);
+
//----------------------------------------------------------------------------------------
if (list_updated('PersonDetailID')) {
$br = get_branch(get_post('PersonDetailID'));
$trans_no = $_GET['UpdatedDep'];
$trans_type = ST_BANKDEPOSIT;
- display_notification_centered(_("Deposit $trans_no has been modified"));
+ display_notification_centered(sprintf(_("Deposit %d has been modified"), $trans_no));
display_note(get_gl_view_str($trans_type, $trans_no, _("&View the GL Postings for this Deposit")));
// 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];