! -> Note
$ -> Affected files
+25-Nov-2008 Janusz Dobrowolski
+! Merged all changes from main trunk up to 2.0.5 (see details below)
+$ /CHANGELOG.txt
+ /update.html
+ /admin/void_transaction.php
+ /admin/db/voiding_db.inc
+ /gl/includes/db/gl_db_trans.inc
+ /gl/inquiry/gl_trial_balance.php
+ /includes/banking.inc
+ /includes/ui/ui_input.inc
+ /includes/ui/ui_view.inc
+ /manufacturing/manage/bom_edit.php
+ /purchasing/po_receive_items.php
+ /purchasing/supplier_credit.php
+ /purchasing/supplier_invoice.php
+ /purchasing/supplier_payment.php
+ /purchasing/includes/purchasing_db.inc
+ /purchasing/includes/db/invoice_db.inc
+ /purchasing/includes/db/supp_payment_db.inc
+ /purchasing/includes/db/supp_trans_db.inc
+ /purchasing/includes/ui/invoice_ui.inc
+ /reporting/rep101.php
+ /reporting/rep106.php
+ /reporting/rep201.php
+ /reporting/rep203.php
+ /reporting/rep209.php
+ /reporting/rep708.php
+ /reporting/reports_main.php
+ /reporting/includes/class.pdf.inc
+ /sales/customer_payments.php
+ /sales/allocations/customer_allocate.php
+ /sales/includes/sales_db.inc
+ /sales/includes/db/cust_trans_db.inc
+ /sales/includes/db/payment_db.inc
+ /sales/view/view_receipt.php
+------------------------------- Release 2.0.5 --------------------------------------------
+24-Nov.2008 Joe Hunt
+! Release 2.0.5
+$ config.php
+! Changed update.html
+$ update.html
+# Small bug fixes
+$ /reporting/includes/header2.inc
+ /sales/view/view_receipt.php
+
+20-Nov-2008 Janusz Dobrowolski
+# [0000082] Bad js allocation on All/None button press.
+$ /sales/allocations/customer_allocate.php
+
+20-Nov-2008 Joe Hunt
+# Do not allow editing invoice if allocated > 0
+$ /sales/inquiry/customer_inquiry.php
+
+19-Nov-2008 Joe Hunt
++ Possibility to view a transaction before final voiding.
+$ /admin/void_transaction.php
+
+11-Nov-2008 Janusz Dobrowolski
+# Fixed right alignment of amount cells.
+$ /includes/ui/ui_input.inc
+# Fixed display bug for fully received items and false modify conflicts.
+$ /purchasing/po_receive_items.php
+
+10-Nov-2008 Joe Hunt
+! [0000081] Trial Balance again minor changes.
+$ /gl/inquiry/gl_trial_balance.php
+ /reporting/rep708.php
+
+07-Nov-2008 Joe Hunt
+! [0000081] Changed Trial Balance to show all debits and credits (option to only show balances)
+$ /gl/inquiry/gl_trial_balance.php
+ /reporting/reports_main.php
+ /reporting/rep708.php
+
+03-Nov-2008 Janusz Dobrowolski
+# Fixed price priority in automatic calculations.
+$ sales/includes/sales_db.inc
+
+30-Oct-2008 Janusz Dobrowolski
+# [0000080] BOM elements was not editable after entry.
+$ /manufacturing/manage/bom_edit.php
+
+29-Oct-2008 Joe Hunt
+# Voiding a supplier invoice/credit note with GL Postings creates a database error
+$ /purchasing/includes/db/invoice_db.inc
+
+28-Oct-2008 Joe Hunt
+# [0000079] Delivery Note/Sales Invoice should not be editable after it has been voided.
+$ /admin/db/voiding_db.inc
+ /sales/inquiry/sales_deliveries_view.php
+ /sales/inquiry/customer_inquiry.php
+
+27-Oct-2008 Joe Hunt
+! [0000078] Opened Exchange rate for editing (without storing) in sales/purchasing module payment
+# Fixed exchange rate display bugs in Supplier Payment (earlier dates).
+$ /gl/includes/db/gl_db_trans.inc
+ /includes/banking.inc
+ /includes/ui/ui_view.inc
+ /purchasing/supplier_payment.php
+ /purchasing/includes/purchasing_db.inc
+ /purchasing/includes/db/supp_payment_db.inc
+ /purchasing/includes/db/supp_trans_db.inc
+ /sales/customer_payments.php
+ /sales/includes/sales_db.inc
+ /sales/includes/db/cust_trans_db.inc
+ /sales/includes/db/payment_db.inc
+# [0000078] Fixed some reports with wrong exchange rates.
+$ /reporting/rep101.php
+ /reporting/rep106.php
+ /reporting/rep201.php
+ /reporting/rep203.php
+ /reporting/rep209.php
++ Added confirm box when admins are about to remove PO GRNs from Supplier Invoice
+$ /purchasing/supplier_invoice.php
+
+24-Oct-2008 Joe Hunt
+! [0000077] Added a total before ending balance in trial balance (also in report)
+$ /gl/inquiry/gl_trial_balance.php
+ /reporting/rep708.php
+! Increased memory limit if reports in unicode (48M) as suggested in forum.
+ /reporting/includes/class.pdf.inc
+! Improved layout of Supplier Invoice/Credit. All Items can now be added in one sweep.
+$ /purchasing/supplier_invoice.php
+ /purchasing/supplier_credit.php
+ /purchasing/includes/ui/invoice_ui.inc
+
+------------------------------- Release 2.0.4 --------------------------------------------
+23-Oct-2008 Joe Hunt
+! Release 2.0.4
+25-Nov-2008 Joe Hunt
+! Inserted Copyright Notice and fixed graphic items
+$ /access/login.php
+ /access/logout.php
+ /admin/attachments.php
+ /admin/backups.php
+ /admin/change_current_user_password.php
+ /admin/db/company_db.inc
+ /admin/db/maintenence_db.inc
+ /admin/db/printers_db.inc
+ /admin/db/users_db.inc
+ /admin/db/v_banktrans.inc
+ /admin/db/voiding_db.inc
+ /admin/display_prefs.php
+ /admin/fiscalyears.php
+ /admin/forms_setup.php
+ /admin/gl_setup.php
+ /admin/inst_upgrade.php
+ /admin/payment_terms.php
+ /admin/print_profiles.php
+ /admin/printers.php
+ /admin/shipping_companies.php
+ /admin/users.php
+ /admin/view_print_transaction.php
+ /admin/void_transaction.php
+ /gl/gl_journal.php
+ /gl/includes/ui/gl_bank_ui.inc
+ /gl/includes/ui/gl_journal_ui.inc
+ /gl/inquiry/bank_inquiry.php
+ /gl/inquiry/tax_inquiry.php
+ /gl/manage/bank_accounts.php
+ /includes/ui/ui_controls.inc
+ /reporting/includes/pdf_report.inc
+ /reporting/rep709.php
+ /sales/includes/ui/sales_credit_ui.inc
+ /sql/alter2.1.php
+
24-Nov-2008 Janusz Dobrowolski
+ Added alias/foreign item codes and sales kits support.
$ /applications/inventory.php
<?php
+/**********************************************************************
+ Copyright (C) FrontAccounting, LLC.
+ Released under the terms of the GNU Affero General Public License,
+ AGPL, as published by the Free Software Foundation, either version
+ 3 of the License, or (at your option) any later version.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License here <http://www.gnu.org/licenses/agpl-3.0.html>.
+***********************************************************************/
if (!isset($path_to_root) || isset($_GET['path_to_root']) || isset($_POST['path_to_root']))
die("Restricted access");
include_once($path_to_root . "/includes/ui/ui_view.inc");
<?php
-
+/**********************************************************************
+ Copyright (C) FrontAccounting, LLC.
+ Released under the terms of the GNU Affero General Public License,
+ AGPL, as published by the Free Software Foundation, either version
+ 3 of the License, or (at your option) any later version.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License here <http://www.gnu.org/licenses/agpl-3.0.html>.
+***********************************************************************/
$page_security = 1;
$path_to_root="..";
include($path_to_root . "/includes/session.inc");
<?php
-
+/**********************************************************************
+ Copyright (C) FrontAccounting, LLC.
+ Released under the terms of the GNU Affero General Public License,
+ AGPL, as published by the Free Software Foundation, either version
+ 3 of the License, or (at your option) any later version.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License here <http://www.gnu.org/licenses/agpl-3.0.html>.
+***********************************************************************/
$path_to_root="..";
$page_security = 8;
label_cell($row['filetype']);
label_cell(sql2date($row['tran_date']));
edit_button_cell("Edit".$row['id'], _("Edit"));
- edit_button_cell("view".$row['id'], _("View"));
- edit_button_cell("download".$row['id'], _("Download"));
- edit_button_cell("Delete".$row['id'], _("Delete"));
+ button_cell("view".$row['id'], _("View"), false, ICON_VIEW);
+ button_cell("download".$row['id'], _("Download"), false, ICON_DOWN);
+ delete_button_cell("Delete".$row['id'], _("Delete"));
end_row();
}
end_table(1);
<?php
-
+/**********************************************************************
+ Copyright (C) FrontAccounting, LLC.
+ Released under the terms of the GNU Affero General Public License,
+ AGPL, as published by the Free Software Foundation, either version
+ 3 of the License, or (at your option) any later version.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License here <http://www.gnu.org/licenses/agpl-3.0.html>.
+***********************************************************************/
$page_security = 15;
$path_to_root="..";
<?php
-
+/**********************************************************************
+ Copyright (C) FrontAccounting, LLC.
+ Released under the terms of the GNU Affero General Public License,
+ AGPL, as published by the Free Software Foundation, either version
+ 3 of the License, or (at your option) any later version.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License here <http://www.gnu.org/licenses/agpl-3.0.html>.
+***********************************************************************/
$page_security=1;
$path_to_root="..";
include_once($path_to_root . "/includes/session.inc");
<?php
-
-
+/**********************************************************************
+ Copyright (C) FrontAccounting, LLC.
+ Released under the terms of the GNU Affero General Public License,
+ AGPL, as published by the Free Software Foundation, either version
+ 3 of the License, or (at your option) any later version.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License here <http://www.gnu.org/licenses/agpl-3.0.html>.
+***********************************************************************/
function update_company_gl_setup($debtors_act, $pyt_discount_act, $creditors_act,
$freight_act,
$exchange_diff_act,
<?php
-
+/**********************************************************************
+ Copyright (C) FrontAccounting, LLC.
+ Released under the terms of the GNU Affero General Public License,
+ AGPL, as published by the Free Software Foundation, either version
+ 3 of the License, or (at your option) any later version.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License here <http://www.gnu.org/licenses/agpl-3.0.html>.
+***********************************************************************/
function write_config_db($new = false)
{
global $path_to_root, $def_coy, $db_connections, $tb_pref_counter;
<?php
+/**********************************************************************
+ Copyright (C) FrontAccounting, LLC.
+ Released under the terms of the GNU Affero General Public License,
+ AGPL, as published by the Free Software Foundation, either version
+ 3 of the License, or (at your option) any later version.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License here <http://www.gnu.org/licenses/agpl-3.0.html>.
+***********************************************************************/
function write_printer_def($id, $name, $descr, $queue, $host, $port, $timeout)
{
if ($id>0)
<?php
/**********************************************************************
- Copyright (C) 2005-2008 FrontAccounting, LLC.
+ Copyright (C) FrontAccounting, LLC.
Released under the terms of the GNU Affero General Public License,
AGPL, as published by the Free Software Foundation, either version
3 of the License, or (at your option) any later version.
<?php
-
+/**********************************************************************
+ Copyright (C) FrontAccounting, LLC.
+ Released under the terms of the GNU Affero General Public License,
+ AGPL, as published by the Free Software Foundation, either version
+ 3 of the License, or (at your option) any later version.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License here <http://www.gnu.org/licenses/agpl-3.0.html>.
+***********************************************************************/
include_once($path_to_root . "/gl/includes/gl_db.inc");
function validate_bank_trans()
<?php
-
+/**********************************************************************
+ Copyright (C) FrontAccounting, LLC.
+ Released under the terms of the GNU Affero General Public License,
+ AGPL, as published by the Free Software Foundation, either version
+ 3 of the License, or (at your option) any later version.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License here <http://www.gnu.org/licenses/agpl-3.0.html>.
+***********************************************************************/
include_once($path_to_root . "/sales/includes/sales_db.inc");
include_once($path_to_root . "/purchasing/includes/purchasing_db.inc");
include_once($path_to_root . "/inventory/includes/inventory_db.inc");
$delivery = get_customer_trans($type_no, $type);
if ($delivery['trans_link'] != 0)
{
- $inv = get_customer_trans($delivery['trans_link'], 10);
- if ($inv['ov_amount'] != 0 || $inv['ov_discount'] != 0 || $inv['ov_gst'] != 0 ||
- $inv['ov_freight'] != 0 || $inv['ov_freight_tax'] != 0 || $inv['alloc'] != 0)
+ if (get_voided_entry(10, $delivery['trans_link']) === false)
return false;
}
}
<?php
/**********************************************************************
- Copyright (C) 2005-2008 FrontAccounting, LLC.
+ Copyright (C) 2008 FrontAccounting, LLC.
Released under the terms of the GNU Affero General Public License,
AGPL, as published by the Free Software Foundation, either version
3 of the License, or (at your option) any later version.
<?php
-
+/**********************************************************************
+ Copyright (C) FrontAccounting, LLC.
+ Released under the terms of the GNU Affero General Public License,
+ AGPL, as published by the Free Software Foundation, either version
+ 3 of the License, or (at your option) any later version.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License here <http://www.gnu.org/licenses/agpl-3.0.html>.
+***********************************************************************/
$page_security = 9;
$path_to_root="..";
include_once($path_to_root . "/includes/session.inc");
label_cell($closed_text);
edit_button_cell("Edit".$myrow['id'], _("Edit"));
if ($myrow["id"] != $company_year)
- edit_button_cell("Delete".$myrow['id'], _("Delete"));
+ delete_button_cell("Delete".$myrow['id'], _("Delete"));
else
label_cell('');
end_row();
<?php
-
+/**********************************************************************
+ Copyright (C) FrontAccounting, LLC.
+ Released under the terms of the GNU Affero General Public License,
+ AGPL, as published by the Free Software Foundation, either version
+ 3 of the License, or (at your option) any later version.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License here <http://www.gnu.org/licenses/agpl-3.0.html>.
+***********************************************************************/
$page_security =10;
$path_to_root="..";
include($path_to_root . "/includes/session.inc");
<?php
-
+/**********************************************************************
+ Copyright (C) FrontAccounting, LLC.
+ Released under the terms of the GNU Affero General Public License,
+ AGPL, as published by the Free Software Foundation, either version
+ 3 of the License, or (at your option) any later version.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License here <http://www.gnu.org/licenses/agpl-3.0.html>.
+***********************************************************************/
$page_security =10;
$path_to_root="..";
include($path_to_root . "/includes/session.inc");
<?php
-
+/**********************************************************************
+ Copyright (C) FrontAccounting, LLC.
+ Released under the terms of the GNU Affero General Public License,
+ AGPL, as published by the Free Software Foundation, either version
+ 3 of the License, or (at your option) any later version.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License here <http://www.gnu.org/licenses/agpl-3.0.html>.
+***********************************************************************/
$page_security = 20;
$path_to_root="..";
include_once($path_to_root . "/includes/session.inc");
<?php
-
+/**********************************************************************
+ Copyright (C) FrontAccounting, LLC.
+ Released under the terms of the GNU Affero General Public License,
+ AGPL, as published by the Free Software Foundation, either version
+ 3 of the License, or (at your option) any later version.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License here <http://www.gnu.org/licenses/agpl-3.0.html>.
+***********************************************************************/
$page_security = 10;
$path_to_root="..";
include($path_to_root . "/includes/session.inc");
label_cell($full_text);
label_cell($after_text);
edit_button_cell("Edit".$myrow["terms_indicator"], _("Edit"));
- edit_button_cell("Delete".$myrow["terms_indicator"], _("Delete"));
+ delete_button_cell("Delete".$myrow["terms_indicator"], _("Delete"));
end_row();
<?php
+/**********************************************************************
+ Copyright (C) FrontAccounting, LLC.
+ Released under the terms of the GNU Affero General Public License,
+ AGPL, as published by the Free Software Foundation, either version
+ 3 of the License, or (at your option) any later version.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License here <http://www.gnu.org/licenses/agpl-3.0.html>.
+***********************************************************************/
$page_security = 15;
$path_to_root="..";
include($path_to_root . "/includes/session.inc");
<?php
-
+/**********************************************************************
+ Copyright (C) FrontAccounting, LLC.
+ Released under the terms of the GNU Affero General Public License,
+ AGPL, as published by the Free Software Foundation, either version
+ 3 of the License, or (at your option) any later version.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License here <http://www.gnu.org/licenses/agpl-3.0.html>.
+***********************************************************************/
$page_security = 15;
$path_to_root="..";
include($path_to_root . "/includes/session.inc");
label_cell($myrow['host']);
label_cell($myrow['queue']);
edit_button_cell("Edit".$myrow['id'], _("Edit"));
- edit_button_cell("Delete".$myrow['id'], _("Delete"));
+ delete_button_cell("Delete".$myrow['id'], _("Delete"));
end_row();
<?php
-
-
+/**********************************************************************
+ Copyright (C) FrontAccounting, LLC.
+ Released under the terms of the GNU Affero General Public License,
+ AGPL, as published by the Free Software Foundation, either version
+ 3 of the License, or (at your option) any later version.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License here <http://www.gnu.org/licenses/agpl-3.0.html>.
+***********************************************************************/
$page_security = 14;
$path_to_root="..";
include($path_to_root . "/includes/session.inc");
label_cell($myrow["phone"]);
label_cell($myrow["address"]);
edit_button_cell("Edit".$myrow[0], _("Edit"));
- edit_button_cell("Delete".$myrow[0], _("Delete"));
+ delete_button_cell("Delete".$myrow[0], _("Delete"));
end_row();
}
<?php
-
+/**********************************************************************
+ Copyright (C) FrontAccounting, LLC.
+ Released under the terms of the GNU Affero General Public License,
+ AGPL, as published by the Free Software Foundation, either version
+ 3 of the License, or (at your option) any later version.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License here <http://www.gnu.org/licenses/agpl-3.0.html>.
+***********************************************************************/
$page_security=15;
$path_to_root="..";
include_once($path_to_root . "/includes/session.inc");
edit_button_cell("Edit".$myrow["user_id"], _("Edit"));
if (strcasecmp($myrow["user_id"], $_SESSION["wa_current_user"]->username) &&
$_SESSION["wa_current_user"]->access == 2)
- edit_button_cell("Delete".$myrow["user_id"], _("Delete"));
+ delete_button_cell("Delete".$myrow["user_id"], _("Delete"));
else
label_cell('');
end_row();
<?php
-
+/**********************************************************************
+ Copyright (C) FrontAccounting, LLC.
+ Released under the terms of the GNU Affero General Public License,
+ AGPL, as published by the Free Software Foundation, either version
+ 3 of the License, or (at your option) any later version.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License here <http://www.gnu.org/licenses/agpl-3.0.html>.
+***********************************************************************/
$path_to_root="..";
$page_security = 5;
label_cell($line[$trans_no_name]);
if ($trans_ref)
label_cell($line[$trans_ref]);
- label_cell(get_trans_view_str($_POST['filterType'],$line[$trans_no_name], _("View")));
+ label_cell(get_trans_view_str($_POST['filterType'],$line[$trans_no_name], _("View"), ICON_VIEW));
if ($print_out)
- label_cell(print_document_link($line[$trans_no_name], _("Print"), true, $print_type));
+ label_cell(print_document_link($line[$trans_no_name], _("Print"), true, $print_type, ICON_PRINT));
label_cell(get_gl_view_str($_POST['filterType'], $line[$trans_no_name]));
end_row();
<?php
-
+/**********************************************************************
+ Copyright (C) FrontAccounting, LLC.
+ Released under the terms of the GNU Affero General Public License,
+ AGPL, as published by the Free Software Foundation, either version
+ 3 of the License, or (at your option) any later version.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License here <http://www.gnu.org/licenses/agpl-3.0.html>.
+***********************************************************************/
$path_to_root="..";
$page_security = 14;
include_once($path_to_root . "/includes/session.inc");
$js = "";
if ($use_date_picker)
$js .= get_js_date_picker();
+if ($use_popup_windows)
+ $js .= get_js_open_window(800, 500);
+
page(_("Void a Transaction"), false, false, "", $js);
//----------------------------------------------------------------------------------------
+function exist_transaction($type, $type_no)
+{
+ $void_entry = get_voided_entry($type, $type_no);
+
+ if ($void_entry != null)
+ return false;
+
+ switch ($type)
+ {
+ case 0 : // it's a journal entry
+ if (!exists_gl_trans($type, $type_no))
+ return false;
+ break;
+
+ case 1 : // it's a payment
+ case 2 : // it's a deposit
+ case 4 : // it's a transfer
+ if (!exists_bank_trans($type, $type_no))
+ return false;
+ break;
+
+ case 10 : // it's a customer invoice
+ case 11 : // it's a customer credit note
+ case 12 : // it's a customer payment
+ case 13 : // it's a customer dispatch
+ if (!exists_customer_trans($type, $type_no))
+ return false;
+ break;
+
+ case systypes::location_transfer() : // it's a stock transfer
+ if (get_stock_transfer_items($type_no) == null)
+ return false;
+ break;
+
+ case systypes::inventory_adjustment() : // it's a stock adjustment
+ if (get_stock_adjustment_items($type_no) == null)
+ return false;
+ break;
+
+ case 25 : // it's a GRN
+ return false;
+ case 20 : // it's a suppler invoice
+ case 21 : // it's a supplier credit note
+ case 22 : // it's a supplier payment
+ if (!exists_supp_trans($type, $type_no))
+ return false;
+ break;
+
+ case systypes::work_order() : // it's a work order
+ if (!get_work_order($type_no, true))
+ return false;
+ break;
+
+ case 28 : // it's a work order issue
+ if (!exists_work_order_issue($type_no))
+ return false;
+ break;
+
+ case 29 : // it's a work order production
+ if (!exists_work_order_produce($type_no))
+ return false;
+ break;
+
+ case systypes::cost_update() : // it's a stock cost update
+ return false;
+ break;
+ }
+
+ return true;
+}
function voiding_controls()
{
submit_center('ProcessVoiding', _("Void Transaction"), true, '', true);
else
{
-
- display_note(_("Are you sure you want to void this transaction ? This action cannot be undone."), 0, 1);
- submit_center_first('ConfirmVoiding', _("Proceed"), '', true);
- submit_center_last('CancelVoiding', _("Cancel"), '', true);
+ if (!exist_transaction($_POST['filterType'],$_POST['trans_no']))
+ {
+ display_error(_("The entered transaction does not exist or cannot be voided."));
+ unset($_POST['trans_no']);
+ unset($_POST['memo_']);
+ unset($_POST['date_']);
+ submit_center('ProcessVoiding', _("Void Transaction"), true, '', true);
+ }
+ else
+ {
+ display_notification_centered(_("Are you sure you want to void this transaction ? This action cannot be undone."), 0, 1);
+ if ($_POST['filterType'] == 0) // GL transaction are not included in get_trans_view_str
+ $view_str = get_gl_view_str($_POST['filterType'],$_POST['trans_no'], _("View Transaction"));
+ else
+ $view_str = get_trans_view_str($_POST['filterType'],$_POST['trans_no'], _("View Transaction"));
+ display_note($view_str);
+ br();
+ submit_center_first('ConfirmVoiding', _("Proceed"), '', true);
+ submit_center_last('CancelVoiding', _("Cancel"), '', true);
+ }
}
end_form();
function write_customer_trans($trans_type, $trans_no, $debtor_no, $BranchNo,
$date_, $reference, $Total, $discount=0, $Tax=0, $Freight=0, $FreightTax=0,
$sales_type=0, $order_no=0, $trans_link=0, $ship_via=0, $due_date="",
- $AllocAmt=0, $dimension_id=0, $dimension2_id=0)
+ $AllocAmt=0, $rate=0, $dimension_id=0, $dimension2_id=0)
{
$curr = get_customer_currency($debtor_no);
$credit_note->freight_cost, $freight_added_tax,
$credit_note->sales_type,
$credit_note->order_no, $credit_invoice, $credit_note->ship_via,
- null, $alloc, $credit_note->dimension_id, $credit_note->dimension2_id);
+ null, $alloc, 0, $credit_note->dimension_id, $credit_note->dimension2_id);
// 2008-06-14 extra $alloc, 2008-11-12 dimension_id Joe Hunt
if ($trans_no==0) {
$delivery->freight_cost,
$delivery->tax_included ? 0 : $freight_tax,
$delivery->sales_type, $delivery->order_no, 0,
- $delivery->ship_via, $delivery->due_date, 0, $delivery->dimension_id, $delivery->dimension2_id);
+ $delivery->ship_via, $delivery->due_date, 0, 0, $delivery->dimension_id, $delivery->dimension2_id);
if ($trans_no == 0) {
$delivery->trans_no = array($delivery_no=>0);
$invoice->Branch, $date_, $invoice->reference, $items_total, 0,
$items_added_tax, $invoice->freight_cost, $freight_added_tax,
$invoice->sales_type, $sales_order, $delivery_no,
- $invoice->ship_via, $invoice->due_date, $alloc, $invoice->dimension_id, $invoice->dimension2_id);
+ $invoice->ship_via, $invoice->due_date, $alloc, 0, $invoice->dimension_id, $invoice->dimension2_id);
// 2008-06-14 extra $alloc, 2008-11-12 added dimension_id Joe Hunt
if ($trans_no == 0) {
do this, before entering FrontAccounting!
Enter the database user and the password and choose the alter.sql
script. Do the same for the alter2.sql script. If you have
-already updated release 2.0 Beta, you can just run the alter2.sql script.<br />You must also manuelly ensure that you have write permission to the new folder /company/0.</strong></li>
+already updated release 2.0 Beta, you can just run the alter2.sql script.<br />You must also manuelly ensure that you have write permission to the new folder /company/0.<br /></strong><strong>There are no database changes during a major and minor release. Like from 2.0 to 2.0.1 - 2.0.5 .</strong></li>
</ul>
<p> </p>