Additional conflict fixes after merge.
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Tue, 25 Nov 2008 10:53:04 +0000 (10:53 +0000)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Tue, 25 Nov 2008 10:53:04 +0000 (10:53 +0000)
29 files changed:
CHANGELOG.txt
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/maintenance_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
sales/includes/db/cust_trans_db.inc
sales/includes/db/sales_credit_db.inc
sales/includes/db/sales_delivery_db.inc
sales/includes/db/sales_invoice_db.inc
update.html

index 60ab21c47610b6001b693d9b783cfb42d9ff38a5..d853edd117d8afce691e2f4d7a75557fcd482cad 100644 (file)
@@ -19,6 +19,172 @@ Legend:
 ! -> 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
index 5644151811e195cbd93c31dbdc909626cc5aa095..dc2a1965e691a7d0d32bd851e70f51098c2aa179 100644 (file)
@@ -1,4 +1,14 @@
 <?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");
index a52b4249c45a60f8ea818ed3a000b07462e603f9..fc2a2d67890882337c533a351fc44bf8aa68c79a 100644 (file)
@@ -1,5 +1,14 @@
 <?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");
index a36801d4ebc39dfe8df50e969331ac2ff80ac196..fb5b5e68b1ee80c057a753079b12cdb270be5911 100644 (file)
@@ -1,5 +1,14 @@
 <?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;
 
@@ -170,9 +179,9 @@ function display_rows($type)
                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);
index 76c595a4a36fdb67dbb96f619924e8d1ea6bb250..8dfec9a138cb81723b12331aea12656578ff37cd 100644 (file)
@@ -1,5 +1,14 @@
 <?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="..";
index 1f739243e21ff1b7fa2e9fb6765434e5e78cc46e..abfd8529f43c6647533708b1738a06208677c211 100644 (file)
@@ -1,5 +1,14 @@
 <?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");
index fde84cfe29b2a69ccd04a8807659f9faa0e8c9cd..817b5d19b0c0eec69fc4a2b638a6624202f22ce2 100644 (file)
@@ -1,6 +1,14 @@
 <?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,
index 1a73d00a9bc05c67f47f076413eb0a0e04b91e4d..d5124981594d41cecb485ae6b5f0215d9d737d41 100644 (file)
@@ -1,5 +1,14 @@
 <?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;
index 043268a677f842249e74d2d9e9cb64a1f8549099..4d3fa96cc3a8607f9e838fc378485e278dd417e0 100644 (file)
@@ -1,4 +1,14 @@
 <?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)
index 876f183f62dbc7dc61c0c251285a6e04aca7df22..53f3c40cdf1f22624f54be4168459eb63347f13d 100644 (file)
@@ -1,6 +1,6 @@
 <?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.
index 9b254e83c04add2c19929daa578193829dec3154..51650c0c4d538eed0232981fab281eb3914b1d28 100644 (file)
@@ -1,5 +1,14 @@
 <?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()
index e81dd1b0dfc848376edd0fd44b27269cf05fb4f4..0f77cb20cec7104265024f39da6ead7d2547a193 100644 (file)
@@ -1,5 +1,14 @@
 <?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");
@@ -40,9 +49,7 @@ function void_transaction($type, $type_no, $date_, $memo_)
                                $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;
                                }
                        }       
index 384c0e5b398bf3fc103a5a1b8c3c2242666a788a..d23363e161ad6fe14db490a09275faf32839b344 100644 (file)
@@ -1,6 +1,6 @@
 <?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.
index 8dfe4a8f5197d6c084d6558e07f0c9ab45896337..8aa558b0d908b8ef92c31d029d2218fb0977da2c 100644 (file)
@@ -1,5 +1,14 @@
 <?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");
@@ -141,7 +150,7 @@ function display_fiscalyears()
                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();
index b4a8aa28ae50b4fcd2f57d6b88134536c831c975..828a36fde3ab46e44ade65d6cc9302a1b722261a 100644 (file)
@@ -1,5 +1,14 @@
 <?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");
index b69397477570010ac9a1d8403ee27a91439461a6..e457da5cbb31d79089330ee25e9d3b0e4a2fa689 100644 (file)
@@ -1,5 +1,14 @@
 <?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");
index 793e050b58acab89bcc624a596ab4345bb3cf369..9141808debec6d073754a488a8164527e1f844ef 100644 (file)
@@ -1,5 +1,14 @@
 <?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");
index 24969c94a268301ac5611b8aff46536c0b7bd8c7..2b323d2775a62ea038a13491e39accfb0e82cb45 100644 (file)
@@ -1,5 +1,14 @@
 <?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");
@@ -164,7 +173,7 @@ while ($myrow = db_fetch($result))
     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();
 
 
index 05e5b70ad00f529acefcc4ba5e8af889b2f15b3d..49a8723ffb768e6933c9fbae4429d861b8ef958e 100644 (file)
@@ -1,4 +1,14 @@
 <?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");
index 89d64476bfb455f4a8805d4675d74ce2f375a6d5..1b6d063b9a96e70b4ac9fdd7c995845de9236a7e 100644 (file)
@@ -1,5 +1,14 @@
 <?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");
@@ -89,7 +98,7 @@ while ($myrow = db_fetch($result))
     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();
 
 
index 1c16fa3f72358dccb17f9e5514200531452fe8d6..94dfd489b524a6128dc296ba16e9e4c562ea9c14 100644 (file)
@@ -1,6 +1,14 @@
 <?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");
@@ -113,7 +121,7 @@ while ($myrow = db_fetch($result))
        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();
 }
 
index 05e9adc973b406c414626dbd844f64d106a772da..d99edc62e673b657060f6fee3f2fffb2eb3b8b05 100644 (file)
@@ -1,5 +1,14 @@
 <?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");
@@ -122,7 +131,7 @@ while ($myrow = db_fetch($result))
        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();
index 8f4c319c244456923bcdfc6c582286998e414e3b..dbae9f3467628618b52118c4a2acbecc1a516042 100644 (file)
@@ -1,5 +1,14 @@
 <?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;
 
@@ -132,9 +141,9 @@ function handle_search()
                        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();
index 4b5669400032cc4cca1800f5a303eaff8699bbc1..e93af71a44af859ccebc44ab03d051aa471a22fb 100644 (file)
@@ -1,5 +1,14 @@
 <?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");
@@ -12,9 +21,82 @@ include_once($path_to_root . "/admin/db/voiding_db.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()
 {
@@ -38,10 +120,26 @@ 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();
index 6f536ca0cd150b5c43dec60e145ffb09bcc2c535..089ba61a6e8a36e8f67152150506d02e0e79fb07 100644 (file)
@@ -79,7 +79,7 @@ function get_customer_trans_version($type, $trans_no) {
 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);
index ed22cba2bec1d56cea3332349c3b1202e421209d..94dbe8a235b291a0edd7becd0f4ad331772b0b59 100644 (file)
@@ -61,7 +61,7 @@ function write_credit_note($credit_note, $write_off_acc)
                $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) {
index 5d72855f350d349f08afd1da7ed884652019d820..2c80d46e89d3c67dbec454b093acc4c324d3297b 100644 (file)
@@ -31,7 +31,7 @@ function write_sales_delivery(&$delivery,$bo_policy)
                $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);
index 0c1457158a86e10e62f5887038e7a709d85c3476..31f7a1a222ca776b9f1a4d444151b6491ef02b8b 100644 (file)
@@ -61,7 +61,7 @@ function write_sales_invoice(&$invoice)
                $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) {
index 2c0702043f4f659774f407a79e3ba919a8874690..cc0bb64d2f8530852bd3e2d7e5ff045c516ce658 100644 (file)
@@ -53,7 +53,7 @@ password and choose the update script from the local harddisk.</li>
 do this, before entering FrontAccounting!
 Enter the database user and the password and choose the alter.sql
 script. &nbsp;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>&nbsp;</p>