! -> Note
$ -> Affected files
+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");
<?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");
<?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 = 3;
$path_to_root="..";
include_once($path_to_root . "/includes/ui/items_cart.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 display_bank_header(&$order)
{
global $table_style2, $Ajax;
if ($dim == 2)
$th = array(_("Account Code"), _("Account Description"), _("Dimension")." 1",
- _("Dimension")." 2", _("Amount"), _("Memo"));
+ _("Dimension")." 2", _("Amount"), _("Memo"), "");
else if ($dim == 1)
$th = array(_("Account Code"), _("Account Description"), _("Dimension"),
- _("Amount"), _("Memo"));
+ _("Amount"), _("Memo"), "");
else
$th = array(_("Account Code"), _("Account Description"),
- _("Amount"), _("Memo"));
+ _("Amount"), _("Memo"), "");
if (count($order->gl_items)) $th[] = '';
edit_button_cell("Edit$item->index", _("Edit"),
_('Edit document line'));
- edit_button_cell("Delete$item->index", _("Delete"),
+ delete_button_cell("Delete$item->index", _("Delete"),
_('Remove line from document'));
end_row();
}
if ($id != -1)
{
- edit_button_cell('UpdateItem', _("Update"),
- _('Confirm changes'));
- edit_button_cell('CancelItemChanges', _("Cancel"),
- _('Cancel changes'));
+ button_cell('UpdateItem', _("Update"),
+ _('Confirm changes'), ICON_UPDATE);
+ button_cell('CancelItemChanges', _("Cancel"),
+ _('Cancel changes'), ICON_CANCEL);
set_focus('amount');
}
else
<?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 . "/includes/ui.inc");
include_once($path_to_root . "/includes/ui/items_cart.inc");
start_table("$table_style colspan=7 width=95%");
if ($dim == 2)
$th = array(_("Account Code"), _("Account Description"), _("Dimension")." 1",
- _("Dimension")." 2", _("Debit"), _("Credit"), _("Memo"));
+ _("Dimension")." 2", _("Debit"), _("Credit"), _("Memo"), "");
else if ($dim == 1)
$th = array(_("Account Code"), _("Account Description"), _("Dimension"),
- _("Debit"), _("Credit"), _("Memo"));
+ _("Debit"), _("Credit"), _("Memo"), "");
else
$th = array(_("Account Code"), _("Account Description"),
- _("Debit"), _("Credit"), _("Memo"));
+ _("Debit"), _("Credit"), _("Memo"), "");
if (count($order->gl_items)) $th[] = '';
edit_button_cell("Edit$item->index", _("Edit"),
_('Edit journal line'));
- edit_button_cell("Delete$item->index", _("Delete"),
+ delete_button_cell("Delete$item->index", _("Delete"),
_('Remove line from journal'));
end_row();
}
if ($id != -1)
{
- edit_button_cell('UpdateItem', _("Update"),
- _('Confirm changes'));
- edit_button_cell('CancelItemChanges', _("Cancel"),
- _('Cancel changes'));
+ button_cell('UpdateItem', _("Update"),
+ _('Confirm changes'), ICON_UPDATE);
+ button_cell('CancelItemChanges', _("Cancel"),
+ _('Cancel changes'), ICON_CANCEL);
set_focus('amount');
}
else
<?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 = 8;
$path_to_root="../..";
include_once($path_to_root . "/includes/session.inc");
$before_qty = db_query($sql, "The starting balance on hand could not be calculated");
start_row("class='inquirybg'");
-label_cell("<b>"._("Opening Balance")." - ".$_POST['TransAfterDate']."</b>", "colspan=5");
+label_cell("<b>"._("Opening Balance")." - ".$_POST['TransAfterDate']."</b>", "colspan=4");
$bfw_row = db_fetch_row($before_qty);
$bfw = $bfw_row[0];
display_debit_or_credit_cells($bfw);
//end of while loop
start_row("class='inquirybg'");
-label_cell("<b>" . _("Ending Balance")." - ". $_POST['TransToDate']. "</b>", "colspan=5");
+label_cell("<b>" . _("Ending Balance")." - ". $_POST['TransToDate']. "</b>", "colspan=4");
display_debit_or_credit_cells($running_total);
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 = 8;
$path_to_root="../..";
include_once($path_to_root . "/includes/session.inc");
amount_cell($payable);
end_row();
alt_table_row_color($k);
- label_cell($tx['name'] . " " . $tx['rate'] . "%");
- label_cell(_("Net payable or collectible") . ":");
+ label_cell("<b>".$tx['name'] . " " . $tx['rate'] . "%</b>");
+ label_cell("<b>"._("Net payable or collectible") . ":</b>");
amount_cell($net, true);
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");
label_cell($myrow["bank_account_number"], "nowrap");
label_cell($myrow["bank_address"]);
edit_button_cell("Edit".$myrow["id"], _("Edit"));
- edit_button_cell("Delete".$myrow["id"], _("Delete"));
+ delete_button_cell("Delete".$myrow["id"], _("Delete"));
end_row();
}
//-----------------------------------------------------------------------------------
-function set_icon($icon, $title)
+function set_icon($icon, $title=false)
{
global $path_to_root;
- return "<img src='$path_to_root/themes/".user_theme()."/images/$icon' width='14' height='14' border='0' title='$title' />\n";
+ return "<img src='$path_to_root/themes/".user_theme()."/images/$icon' width='14' height='14' border='0'".($title ? " title='$title'" : "")." />\n";
}
function button($name, $value, $title=false, $icon=false)
$icon = ICON_DELETE;
echo "<button type='submit' class='editbutton' name='".
htmlentities(strtr($name, array('.'=>'=2E',' '=>'=20','='=>'=3D','['=>'=5B'))).
- "' value='' />".set_icon($icon, ($title ? $title: $value))."\n";
+ "' value=''" . ($title ? " title='$title'":" title='$value'")." />".set_icon($icon)."\n";
}
else
echo "<input type='submit' class='editbutton' name='"
<?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>.
+***********************************************************************/
/* $Revision$ */
$page_security = 8;
//include_once($path_to_root . "reporting/includes/class.pdf.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 = 2;
// ----------------------------------------------------------------
// $ Revision: 2.0 $
function getTaxTypes()
{
- $sql = "SELECT id FROM ".TB_PREF."tax_types ORDER BY id";
+ $sql = "SELECT * FROM ".TB_PREF."tax_types ORDER BY id";
return db_query($sql,"No transactions were returned");
}
$cols = array(0, 80, 130, 190, 290, 370, 435, 500, 565);
$headers = array(_('Trans Type'), _('#'), _('Date'), _('Name'), _('Branch Name'),
- _('Net'), _('Tax'));
+ _('Net'), _('Tax'), '');
- $aligns = array('left', 'left', 'left', 'left', 'left', 'right', 'right');
+ $aligns = array('left', 'left', 'left', 'left', 'left', 'right', 'right', 'right');
$params = array( 0 => $comments,
1 => array('text' => _('Period'), 'from' => $from, 'to' => $to),
$rep->Line($rep->row - 4);
$rep->row -= 16;
- $rep->TextCol(0, 5, _("General Ledger"));
+ $rep->Font('italic');
+ $rep->TextCol(0, 1, _("General Ledger"));
+ $rep->aligns[1] = 'left';
+ $rep->TextCol(1, 3, _("Description"));
+ $rep->TextCol(3, 4, _("Amount"));
+ $rep->Font();
$rep->Line($rep->row - 6);
$rep->row -= 22;
+
+ $taxes = getTaxTypes();
+ $total = 0;
+ $bdate = date2sql($from);
+ $edate = date2sql($to);
- $trow = $rep->row;
-
- $idcounter = count($taxes);
- $i = 0;
- for ($j = 0; $j < $idcounter; $j++)
- {
- $tx = getTaxInfo($taxes[$j]);
- $str = $tx['name'] . " " . number_format2($tx['rate'], $dec) . "%";
- $rep->TextCol($i, $i + 1, $str);
- $rep->NewLine();
- }
- $i++;
- $rep->row = $trow;
- for ($j = 0; $j < $idcounter; $j++)
+ while ($tx = db_fetch($taxes))
{
- $tx = getTaxInfo($taxes[$j]);
- $acc = get_gl_account($tx['sales_gl_code']);
- $rep->TextCol($i, $i + 1, $acc['account_code']." ".$acc['account_name']);
- $rep->NewLine();
- }
- $i++;
- $rep->row = $trow;
- for ($j = 0; $j < $idcounter; $j++)
- {
- $tx = getTaxInfo($taxes[$j]);
- $amount = get_gl_trans_from_to($from, $to, $tx['sales_gl_code']);
- $rep->TextCol($i, $i + 1,number_format2(-$amount, $dec));
+ if ($tx['sales_gl_code'] == $tx['purchasing_gl_code'])
+ {
+ $sql = "SELECT SUM(IF(amount >= 0, amount, 0)) AS payable, SUM(IF(amount < 0, -amount, 0)) AS collectible
+ FROM ".TB_PREF."gl_trans WHERE account = '".$tx['sales_gl_code']."' AND tran_date >= '$bdate' AND tran_date <= '$edate'";
+ $result = db_query($sql, "Error retrieving tax inquiry");
+ $row = db_fetch($result);
+ $payable = -$row['payable'];
+ $collectible.= -$row['collectible'];
+ }
+ else
+ {
+ $sql = "SELECT SUM(amount) AS collectible
+ FROM ".TB_PREF."gl_trans WHERE account = '".$tx['sales_gl_code']."' AND tran_date >= '$bdate' AND tran_date <= '$edate'";
+ $result = db_query($sql, "Error retrieving tax inquiry");
+ $row = db_fetch($result);
+ $collectible = -$row['collectible'];
+ $sql = "SELECT SUM(amount) AS payable
+ FROM ".TB_PREF."gl_trans WHERE account = '".$tx['purchasing_gl_code']."' AND tran_date >= '$bdate' AND tran_date <= '$edate'";
+ $result = db_query($sql, "Error retrieving tax inquiry");
+ $row = db_fetch($result);
+ $payable = -$row['payable'];
+ }
+ $net = $collectible + $payable;
+ $total += $net;
+ $rep->TextCol(0, 1, $tx['name'] . " " . $tx['rate'] . "%");
+ $rep->TextCol(1, 3, _("Charged on sales") . " (" . _("Output Tax")."):");
+ $rep->TextCol(3, 4, number_format2($collectible, $dec));
$rep->NewLine();
- }
- $i++;
- $rep->row = $trow;
- for ($j = 0; $j < $idcounter; $j++)
- {
- $tx = getTaxInfo($taxes[$j]);
- $acc = get_gl_account($tx['purchasing_gl_code']);
- $rep->TextCol($i, $i + 1, $acc['account_code']." ".$acc['account_name']);
+ $rep->TextCol(0, 1, $tx['name'] . " " . $tx['rate'] . "%");
+ $rep->TextCol(1, 3, _("Paid on purchases") . " (" . _("Input Tax")."):");
+ $rep->TextCol(3, 4, number_format2($payable, $dec));
$rep->NewLine();
- }
- $i++;
- $rep->row = $trow;
- for ($j = 0; $j < $idcounter; $j++)
- {
- $tx = getTaxInfo($taxes[$j]);
- $amount = get_gl_trans_from_to($from, $to, $tx['purchasing_gl_code']);
- $rep->TextCol($i, $i + 1,number_format2($amount, $dec));
+ $rep->Font('bold');
+ $rep->TextCol(0, 1, $tx['name'] . " " . $tx['rate'] . "%");
+ $rep->TextCol(1, 3, _("Net payable or collectible"));
+ $rep->TextCol(3, 4, number_format2($net, $dec));
+ $rep->Font();
$rep->NewLine();
}
+ $rep->Font('bold');
+ $rep->TextCol(1, 3, _("Total payable or refund"));
+ $rep->TextCol(3, 4, number_format2($total, $dec));
+ $rep->Font();
+ $rep->NewLine();
+
$rep->Line($rep->row - 4);
$locale = $path_to_root . "lang/" . $_SESSION['language']->code . "/locale.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>.
+***********************************************************************/
include_once($path_to_root . "/includes/ui.inc");
// ------------------------------------------------------------------------------
edit_button_cell("Edit$line_no", _('Edit'),
_('Edit document line'));
- edit_button_cell("Delete$line_no", _('Delete'),
+ delete_button_cell("Delete$line_no", _('Delete'),
_('Remove line from document'));
end_row();
if ($id!=-1)
{
- edit_button_cell('UpdateItem', _("Update"),
- _('Confirm changes'));
- edit_button_cell('CancelItemChanges', _("Cancel"),
- _('Cancel changes'));
+ button_cell('UpdateItem', _("Update"),
+ _('Confirm changes'), ICON_UPDATE);
+ button_cell('CancelItemChanges', _("Cancel"),
+ _('Cancel changes'), ICON_CANCEL);
hidden('line_no', $line_no);
set_focus('qty');
}
<?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>.
+***********************************************************************/
class fa2_1 {
var $version = '2.1'; // version installed
var $description = 'Version 2.1';