From: Janusz Dobrowolski Date: Wed, 26 Jan 2011 13:01:36 +0000 (+0000) Subject: Fixed transaction date check messages. X-Git-Tag: v2.4.2~19^2~392 X-Git-Url: https://delta.frontaccounting.com/gitweb/?p=fa-stable.git;a=commitdiff_plain;h=7ce9ff6a73214a39ff495f04b330563212b43acb Fixed transaction date check messages. --- diff --git a/gl/accruals.php b/gl/accruals.php index 091458c9..2b75c60e 100644 --- a/gl/accruals.php +++ b/gl/accruals.php @@ -35,7 +35,7 @@ if (isset($_POST['go']) || isset($_POST['show'])) } 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; } @@ -61,7 +61,7 @@ if (isset($_POST['go']) || isset($_POST['show'])) ($freq==3?add_months($date_,$per):add_months($date_,3*$per)))); if (!is_date_in_fiscalyears($lastdate, false)) { - display_error(_("Some of the period dates are outside the fiscal year. Create a new fiscal year first!")); + display_error(_("Some of the period dates are outside the fiscal year or are closed for further data entry. Create a new fiscal year first!")); set_focus('date_'); $input_error = 1; } diff --git a/gl/bank_transfer.php b/gl/bank_transfer.php index 351bfb5d..482539f4 100644 --- a/gl/bank_transfer.php +++ b/gl/bank_transfer.php @@ -111,7 +111,7 @@ function check_valid_entries() } if (!is_date_in_fiscalyear($_POST['DatePaid'])) { - 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('DatePaid'); return false; } diff --git a/gl/gl_bank.php b/gl/gl_bank.php index 8dd950f1..d6efc5de 100644 --- a/gl/gl_bank.php +++ b/gl/gl_bank.php @@ -141,6 +141,7 @@ function create_cart($type, $trans_no) unset ($_SESSION['pay_items']); } + check_is_closed($type, $trans_no); $cart = new items_cart($type); $cart->order_id = $trans_no; @@ -253,7 +254,7 @@ if (isset($_POST['Process'])) } 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; } diff --git a/gl/gl_journal.php b/gl/gl_journal.php index bc3e15e9..bb744de6 100644 --- a/gl/gl_journal.php +++ b/gl/gl_journal.php @@ -97,6 +97,7 @@ function create_cart($type=0, $trans_no=0) unset ($_SESSION['journal_items']); } + check_is_closed($type, $trans_no); $cart = new items_cart($type); $cart->order_id = $trans_no; @@ -157,7 +158,7 @@ if (isset($_POST['Process'])) } 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; } diff --git a/gl/manage/revaluate_currencies.php b/gl/manage/revaluate_currencies.php index 78c5cbbb..d0050d41 100644 --- a/gl/manage/revaluate_currencies.php +++ b/gl/manage/revaluate_currencies.php @@ -53,7 +53,7 @@ function check_data() } if (!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'); return false; } diff --git a/inventory/adjustments.php b/inventory/adjustments.php index 205a3cb2..384dd30c 100644 --- a/inventory/adjustments.php +++ b/inventory/adjustments.php @@ -111,7 +111,7 @@ function can_process() } elseif (!is_date_in_fiscalyear($_POST['AdjDate'])) { - 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('AdjDate'); return false; } else { diff --git a/inventory/transfers.php b/inventory/transfers.php index 26859e59..b4cc678e 100644 --- a/inventory/transfers.php +++ b/inventory/transfers.php @@ -108,7 +108,7 @@ if (isset($_POST['Process'])) } elseif (!is_date_in_fiscalyear($_POST['AdjDate'])) { - 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('AdjDate'); $input_error = 1; } diff --git a/purchasing/supplier_credit.php b/purchasing/supplier_credit.php index 4db923b9..dd319157 100644 --- a/purchasing/supplier_credit.php +++ b/purchasing/supplier_credit.php @@ -173,7 +173,7 @@ function check_data() } elseif (!is_date_in_fiscalyear($_SESSION['supp_trans']->tran_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('tran_date'); return false; } diff --git a/purchasing/supplier_payment.php b/purchasing/supplier_payment.php index 5421ee40..7bafd736 100644 --- a/purchasing/supplier_payment.php +++ b/purchasing/supplier_payment.php @@ -182,7 +182,7 @@ function check_inputs() } elseif (!is_date_in_fiscalyear($_POST['DatePaid'])) { - 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('DatePaid'); return false; } diff --git a/sales/create_recurrent_invoices.php b/sales/create_recurrent_invoices.php index dcc9cffe..cfe424b4 100644 --- a/sales/create_recurrent_invoices.php +++ b/sales/create_recurrent_invoices.php @@ -89,7 +89,7 @@ if (isset($_GET['recurrent'])) } } else - 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.")); } $result = get_recurrent_invoices(); diff --git a/sales/credit_note_entry.php b/sales/credit_note_entry.php index 513fb25e..b80a66f3 100644 --- a/sales/credit_note_entry.php +++ b/sales/credit_note_entry.php @@ -156,7 +156,7 @@ function can_process() set_focus('OrderDate'); $input_error = 1; } elseif (!is_date_in_fiscalyear($_POST['OrderDate'])) { - 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('OrderDate'); $input_error = 1; } diff --git a/sales/customer_credit_invoice.php b/sales/customer_credit_invoice.php index 48f3f0d5..c4621538 100644 --- a/sales/customer_credit_invoice.php +++ b/sales/customer_credit_invoice.php @@ -90,7 +90,7 @@ function can_process() set_focus('CreditDate'); return false; } elseif (!is_date_in_fiscalyear($_POST['CreditDate'])) { - 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('CreditDate'); return false; } @@ -142,6 +142,7 @@ if (isset($_GET['InvoiceNumber']) && $_GET['InvoiceNumber'] > 0) { } elseif ( isset($_GET['ModifyCredit']) && $_GET['ModifyCredit']>0) { + check_is_closed(ST_CUSTCREDIT,$_GET['ModifyCredit']); $_SESSION['Items'] = new Cart(ST_CUSTCREDIT,$_GET['ModifyCredit']); copy_from_cart(); diff --git a/sales/customer_delivery.php b/sales/customer_delivery.php index ee19660c..2208a455 100644 --- a/sales/customer_delivery.php +++ b/sales/customer_delivery.php @@ -112,6 +112,7 @@ if (isset($_GET['OrderNumber']) && $_GET['OrderNumber'] > 0) { } elseif (isset($_GET['ModifyDelivery']) && $_GET['ModifyDelivery'] > 0) { + check_is_closed(ST_CUSTDELIVERY, $_GET['ModifyDelivery']); $_SESSION['Items'] = new Cart(ST_CUSTDELIVERY,$_GET['ModifyDelivery']); if ($_SESSION['Items']->count_items() == 0) { @@ -159,7 +160,7 @@ function check_data() } if (!is_date_in_fiscalyear($_POST['DispatchDate'])) { - display_error(_("The entered date of delivery is not in fiscal year.")); + display_error(_("The entered date is out of fiscal year or is closed for further data entry.")); set_focus('DispatchDate'); return false; } diff --git a/sales/customer_invoice.php b/sales/customer_invoice.php index 560ea687..84d2673f 100644 --- a/sales/customer_invoice.php +++ b/sales/customer_invoice.php @@ -130,6 +130,8 @@ if ( (isset($_GET['DeliveryNumber']) && ($_GET['DeliveryNumber'] > 0) ) } elseif (isset($_GET['ModifyInvoice']) && $_GET['ModifyInvoice'] > 0) { + check_is_closed(ST_SALESINVOICE, $_GET['ModifyInvoice']); + if ( get_sales_parent_numbers(ST_SALESINVOICE, $_GET['ModifyInvoice']) == 0) { // 1.xx compatibility hack echo"

" . _("There are no delivery notes for this invoice.
Most likely this invoice was created in Front Accounting version prior to 2.0 @@ -263,7 +265,7 @@ function check_data() } if (!is_date_in_fiscalyear($_POST['InvoiceDate'])) { - display_error(_("The entered invoice 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('InvoiceDate'); return false; } diff --git a/sales/customer_payments.php b/sales/customer_payments.php index b67df99c..1bf8e196 100644 --- a/sales/customer_payments.php +++ b/sales/customer_payments.php @@ -97,7 +97,7 @@ function can_process() set_focus('DateBanked'); return false; } elseif (!is_date_in_fiscalyear($_POST['DateBanked'])) { - 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('DateBanked'); return false; } diff --git a/sales/inquiry/customer_inquiry.php b/sales/inquiry/customer_inquiry.php index 92c640d4..bcafeecc 100644 --- a/sales/inquiry/customer_inquiry.php +++ b/sales/inquiry/customer_inquiry.php @@ -161,7 +161,7 @@ function credit_link($row) function edit_link($row) { - $str = ''; +/* $str = ''; switch($row['type']) { case ST_SALESINVOICE: @@ -182,9 +182,9 @@ function edit_link($row) $str = "/sales/customer_delivery.php?ModifyDelivery=".$row['trans_no']; break; } - if ($str != "" && !is_closed_trans($row['type'], $row["trans_no"])) - return pager_link(_('Edit'), $str, ICON_EDIT); - return ''; + if ($str != '') +*/ return edit_trans_link($row['type'], $row['trans_no'], $row['type']==ST_CUSTCREDIT && $row['order_']==0 ? + "/sales/credit_note_entry.php?ModifyCredit=%d" : 0); } function prt_link($row) diff --git a/sales/sales_order_entry.php b/sales/sales_order_entry.php index 08e8e7d6..7b067dd5 100644 --- a/sales/sales_order_entry.php +++ b/sales/sales_order_entry.php @@ -87,6 +87,7 @@ if (isset($_GET['NewDelivery']) && is_numeric($_GET['NewDelivery'])) { } page($_SESSION['page_title'], false, false, "", $js); + //----------------------------------------------------------------------------- if (list_updated('branch_id')) { @@ -337,7 +338,7 @@ function can_process() { return false; } if ($_SESSION['Items']->trans_type!=ST_SALESORDER && $_SESSION['Items']->trans_type!=ST_SALESQUOTE && !is_date_in_fiscalyear($_POST['OrderDate'])) { - 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('OrderDate'); return false; } @@ -612,8 +613,9 @@ function create_cart($type, $trans_no) $doc->line_items[$line_no]->qty_done = 0; } $_SESSION['Items'] = $doc; - } else + } else { $_SESSION['Items'] = new Cart($type, array($trans_no)); + } copy_from_cart(); }