$ -> Affected files
07-Dec-2008 Joe Hunt
-! Better layout. Copyright notes. Mailto links.
+! Better layout. Copyright notes. Mailto links, outer table routines.
$ /admin/company_preferences.php
/admin/display_prefs.php
- /gl_setup.php
+ /admin/gl_setup.php
/admin/users.php
+ /gl/includes/ui/gl_bank_ui.inc
+ /gl/includes/ui/gl_journal_ui.inc
/includes/ui_controls.inc
/includes/ui_input.inc
+ /inventory/adjustments.php
+ /inventory/transfers.php
+ /inventory/includes/item_adjustments_ui.inc
+ /inventory/includes/stock_transfers_ui.inc
/inventory/manage/locations.php
+ /purchasing/includes/ui/invoice_ui.inc
+ /purchasing/includes/ui/po_ui.inc
/purchasing/manage/suppliers.php
+ /purchasing/supplier_credit.php
+ /purchasing/supplier_invoice.php
+ /purchasing/supplier_payment.php
+ /sales/includes/ui/sales_credit_ui.inc
+ /sales/includes/ui/sales_order_ui.inc
/sales/manage/customer_branches.php
/sales/manage/customers.php
/sales/manage/sales_people.php
+ /sales/customer_payments.php
05-Dec-2008 Joe Hunt
+ New fields in suppliers, phone, fax, vat no, contact and credit limit
$payment = $order->trans_type == systypes::bank_payment();
div_start('pmt_header');
- start_table("width=90% $table_style2"); // outer table
- echo "<tr><td valign=top width=33%>";
- echo "<table>"; // inner table
+ start_outer_table("width=90% $table_style2"); // outer table
+ table_section(1);
+
bank_accounts_list_row( $payment ? _("From:") : _("To:"), 'bank_account', null, true);
date_row(_("Date:"), 'date_', '', null, 0, 0, 0, null, true);
- echo "</table>"; // inner table
-
- echo "</td><td width=33%>";
-
- echo "<table>"; // inner table
+ table_section(2, "33%");
if (!isset($_POST['PayType']))
{
exchange_rate_display($bank_currency, $person_currency, $_POST['date_']);
- echo "</table>"; // inner table
-
- echo "</td><td>";
-
- echo "<table>"; // inner table
+ table_section(3, "33%");
if (isset($_GET['NewPayment']))
ref_row(_("Reference:"), 'ref', '', references::get_next(systypes::bank_payment()));
else
ref_row(_("Reference:"), 'ref', '', references::get_next(systypes::bank_deposit()));
- echo "</table>"; // inner table
-
- echo "</td></tr>";
+ end_outer_table(1); // outer table
- end_table(1); // outer table
div_end();
}
//---------------------------------------------------------------------------------
global $table_style2;
$qes = has_quick_entries(-1, 0);
- start_table("$table_style2 width=90%");
- if ($qes)
- echo "<tr><td valign=top width=30%>"; // outer table
- else
- echo "<tr><td valign=top width=50%>"; // outer table
- echo "<table>";
+ start_outer_table("$table_style2 width=90%");
+ table_section(1);
+
start_row();
date_cells(_("Date:"), 'date_');
ref_cells(_("Reference:"), 'ref', '', references::get_next(0));
end_row();
- echo "</table>";
-
if ($qes)
- echo "</td><td width=20%>"; // outer table
+ table_section(2, "20%");
else
- echo "</td><td width=50%>"; // outer table
+ table_section(2, "50%");
- echo "<table>";
start_row();
check_cells(_("Reverse Transaction:"), 'Reverse', null);
end_row();
- echo "</table>";
if ($qes !== false)
{
- echo "</td><td width=50%>"; // outer table
- echo "<table>";
+ table_section(3, "50%");
start_row();
quick_entries_list_cells(_("Quick Entry:"), 'person_id', null, -1, 0);
amount_cells(_("Total Amount"), 'totamount', null, null, " ".submit('go', _("Go"), false, false, true));
end_row();
- echo "</table>";
}
-
- echo "</td></tr>"; // outer table
- end_table(1);
+ end_outer_table(1);
}
//---------------------------------------------------------------------------------
echo "<tr valign=top><td>\n"; // outer table
}
-function table_section($number=1)
+function table_section($number=1, $width=false)
{
- if ($number == 2)
+ if ($number > 1)
{
echo "</table>\n";
- echo "</td><td class='tableseparator'>\n"; // outer table
+ $width = ($width ? "width=$width" : "");
+ echo "</td><td class='tableseparator' $width>\n"; // outer table
}
echo "<table>\n";
}
-function end_outer_table($breaks=0)
+function end_outer_table($breaks=0, $close_table=true)
{
- echo "</table>\n";
+ if ($close_table)
+ echo "</table>\n";
echo "</td></tr>\n";
end_table($breaks);
}
+function vertical_space()
+{
+ echo "</td></tr><tr><td valign=center>"; // outer table
+}
function meta_forward($forward_to, $params="")
{
global $Ajax;
<?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");
display_order_header($_SESSION['adj_items']);
-start_table("$table_style width=70%", 10);
-start_row();
-echo "<TD>";
+start_outer_table("$table_style width=70%", 10);
+
display_adjustment_items(_("Adjustment Items"), $_SESSION['adj_items']);
adjustment_options_controls();
-echo "</TD>";
-end_row();
-end_table(1);
+
+end_outer_table(1, false);
submit_center_first('Update', _("Update"), '', null);
submit_center_last('Process', _("Process Adjustment"), '', true);
<?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");
{
global $table_style2;
- start_table("width=70% $table_style2"); // outer table
- echo "<tr><td valign=top width=33%>";
- echo "<table>"; // inner table
+ start_outer_table("width=70% $table_style2"); // outer table
+ table_section(1);
locations_list_row(_("Location:"), 'StockLocation', null);
ref_row(_("Reference:"), 'ref', '', references::get_next(systypes::inventory_adjustment()));
- echo "</table>"; // inner table
-
- echo "</td><td width=33%>";
-
- echo "<table>"; // inner table
+ table_section(2, "33%");
date_row(_("Date:"), 'AdjDate');
- echo "</table>"; // inner table
+ table_section(3, "33%");
- echo "</td><td width=33%>";
-
- echo "<table>"; // inner table
movement_types_list_row(_("Detail:"), 'type', null);
if (!isset($_POST['Increase']))
yesno_list_row(_("Type:"), 'Increase', $_POST['Increase'],
_("Positive Adjustment"), _("Negative Adjustment"));
- echo "</table>"; // inner table
-
- echo "</td></tr>";
- end_table(1); // outer table
+ end_outer_table(1); // outer table
}
//---------------------------------------------------------------------------------
div_start('items_table');
start_table("$table_style width=80%");
$th = array(_("Item Code"), _("Item Description"), _("Quantity"),
- _("Unit"), _("Unit Cost"), _("Total"));
+ _("Unit"), _("Unit Cost"), _("Total"), "");
if ( count($order->line_items)) $th[] = '';
table_header($th);
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('LineNo', $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>.
+***********************************************************************/
include_once($path_to_root . "/includes/ui.inc");
include_once($path_to_root . "/includes/ui/items_cart.inc");
{
global $table_style;
- start_table("width=70% $table_style");
- echo "<tr><td width=33% valign=top>"; // outer table
- echo "<table>";
+ start_outer_table("width=70% $table_style");
+ table_section(1);
+
locations_list_row(_("From Location:"), 'FromStockLocation', null);
locations_list_row(_("To Location:"), 'ToStockLocation', null);
- echo "</table>";
-
- echo "</td><td width=33%>"; // outer table
-
- echo "<table>";
+ table_section(2, "33%");
ref_row(_("Reference:"), 'ref', '', references::get_next(systypes::location_transfer()));
date_row(_("Date:"), 'AdjDate');
- echo "</table>";
-
- echo "</td><td width=33%>"; // outer table
+ table_section(3, "33%");
- echo "<table>";
movement_types_list_row(_("Transfer Type:"), 'type', null);
- echo "</table>";
- echo "</td></tr>";
- end_table(1); // outer table
+ end_outer_table(1); // outer table
}
//---------------------------------------------------------------------------------
div_start('items_table');
start_table("$table_style width=80%");
$th = array(_("Item Code"), _("Item Description"), _("Quantity"), _("Unit"), '');
+ if ( count($order->line_items)) $th[] = '';
table_header($th);
$subtotal = 0;
$k = 0; //row colour counter
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('LineNo', $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>.
+***********************************************************************/
$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 copy_from_trans(&$supp_trans)
function invoice_header(&$supp_trans)
{
- global $Ajax;
+ global $Ajax, $table_style;
// if vars have been lost, recopy
if (!isset($_POST['tran_date']))
copy_from_trans($supp_trans);
- start_table("width=100%", 5);
- start_row();
- echo"<td>"; // outer
+ start_outer_table("$table_style width=98%", 5);
- echo "<table width=100%>";
+ table_section(1);
if (!isset($_POST['supplier_id']) && (get_global_supplier() != reserved_words::get_all()))
$_POST['supplier_id'] = get_global_supplier();
text_row(_("Supplier's Ref.:"), 'supp_reference', $_POST['supp_reference'], 20, 20);
- echo "</table>";
-
- echo "</td><td class='tableseparator'>"; // outer
-
- echo "<table width=100%>";
+ table_section(2, "33%");
date_row(_("Date") . ":", 'tran_date', '', null, 0, 0, 0, "", true);
if (isset($_POST['_tran_date_changed'])) {
label_row(_("Terms:"), $supp_trans->terms_description);
- echo "</table>";
-
- echo "</td><td class='tableseparator'>"; // outer
-
- echo "<table width=100%>";
+ table_section(3, "33%");
$supplier_currency = get_supplier_currency($supp_trans->supplier_id);
exchange_rate_display($supplier_currency, $company_currency, $_POST['tran_date']);
}
- label_row(_("Tax Group:"), $supp_trans->tax_description);
- echo "</table>";
+ label_row(_("Tax Group:"), $supp_trans->tax_description);
- echo "</td>";
- end_row();
- end_table(); // outer
+ end_outer_table();
}
//--------------------------------------------------------------------------------------------------
label_row(_("Credit Note Total"),
$display_total, "align=right style='font-weight:bold;color:red;'", "nowrap align=right style='font-weight:bold;color:red;'");
- end_table();
- br(1);
+ end_table(1);
start_table($table_style2);
textarea_row(_("Memo:"), "Comments", null, 50, 3);
- end_table();
- br(1);
+ end_table(1);
}
//--------------------------------------------------------------------------------------------------
if (($mode == 2 || $mode == 3) && count($supp_trans->gl_codes) == 0)
return 0;
- echo "<br>";
-
- start_table("width=95%");
- echo "<tr><td>"; // outertable
+ start_outer_table("width=95%");
if ($supp_trans->is_invoice)
$heading = _("GL Items for this Invoice");
else
$heading = _("GL Items for this Credit Note");
- echo "<table width=100%>";
- echo "<tr><td align=center><span class='headingtext'>$heading</span></td>";
- echo "</tr></table>";
-
- echo "</td></tr><tr><td>"; // ouer table
+ vertical_space(); // ouer table
div_start('gl_items');
- echo "<table width=100% $table_style>";
+ start_table("$table_style width=100%");
$dim = get_company_pref('use_dimension');
if ($dim == 2)
if ($mode == 1)
{
- edit_button_cell("Delete2" . $entered_gl_code->Counter, _("Delete"),
+ delete_button_cell("Delete2" . $entered_gl_code->Counter, _("Delete"),
_('Remove line from document'));
label_cell("");
}
label_row(_("Total"), price_format($total_gl_value),
"colspan=".$colspan." align=right", "nowrap align=right");
- echo "</table>";
+ end_table();
div_end();
- echo "</td></tr>";
-
- end_table(); // outertable
+ end_outer_table(0, false); // outertable
return $total_gl_value;
}
// if displaying in form, and no items, exit
if (($mode == 2 || $mode == 3) && count($supp_trans->grn_items) == 0)
return 0;
- br(1);
- start_table("width=95%");
- echo "<tr><td>"; // outertable
+
+ start_outer_table("width=95%");
+
$heading2 = "";
if ($mode == 1)
{
}
echo "</tr></table>";
- echo "</td></tr><tr><td>"; // outer table
+ vertical_space(); // outer table
div_start('grn_items');
- echo "<table width=100% $table_style>";
+ start_table("$table_style width=100%");
if ($mode == 1)
{
$th = array(_("Delivery"), _("Sequence #"), _("P.O."), _("Item"), _("Description"),
if ($mode == 1)
{
- edit_button_cell("Delete" . $entered_grn->id, _("Edit"), _('Edit document line'));
+ delete_button_cell("Delete" . $entered_grn->id, _("Edit"), _('Edit document line'));
if ($supp_trans->is_invoice && $_SESSION["wa_current_user"]->access == 2)
label_cell("");
}
$colspan = 5;
label_row(_("Total"), price_format($total_grn_value),
"colspan=$colspan align=right", "nowrap align=right");
- echo "</table>";
+ end_table();
if (!$ret)
{
if ($supp_trans->is_invoice)
}
}
div_end();
- echo "</td></tr>";
- end_table(); // outertable
+ end_outer_table(0, false); // outertable
return $total_grn_value;
}
<?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 . "/purchasing/includes/purchasing_db.inc");
// ------------------------------------------------------------------------------
$editable = ($order->order_no == 0);
- start_table("width=80% $table_style2");
- echo "<tr><td valign=center>"; // outer table
- echo "<table>";
+ start_outer_table("width=80% $table_style2");
+ table_section(1);
if ($editable)
{
if (!isset($_POST['supplier_id']) && (get_global_supplier() != reserved_words::get_all()))
label_row(_("Reference:"), $order->reference);
}
- echo "</table>";
-
- echo "</td><td valign=center>"; // outer table
+ table_section(2);
- echo "<table height='5'>";
// check this out?????????
//if (!isset($_POST['OrderDate']) || $_POST['OrderDate'] == "")
// $_POST['OrderDate'] = $order->orig_order_date;
text_row(_("Supplier's Reference:"), 'Requisition', null, 16, 15);
- echo "</table>";
-
- echo "</td><td valign=center>"; // outer table
-
- echo "<table height='5'>";
-
echo "<tr><td>" . _("Receive Into:") . "</td>";
echo "<td>";
locations_list('StkLocation', null, false, true);
echo "</td></tr>";
+ table_section(3);
+
if (!isset($_POST['StkLocation']) || $_POST['StkLocation'] == "" ||
isset($_POST['_StkLocation_update']) || !isset($_POST['delivery_address']) ||
$_POST['delivery_address'] == "")
}
textarea_row(_("Deliver to:"), 'delivery_address', $_POST['delivery_address'], 35, 4);
- echo "</table>";
- echo "</td></tr>";
- end_table(); // outer table
+ end_outer_table(); // outer table
}
//---------------------------------------------------------------------------------------------------
start_table("$table_style width=80%");
$th = array(_("Item Code"), _("Item Description"), _("Quantity"), _("Unit"),
- _("Required Delivery Date"), _("Price"), _("Line Total"));
+ _("Required Delivery Date"), _("Price"), _("Line Total"), "");
if (count($order->line_items)) $th[] = '';
table_header($th);
{
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('UpdateLine', _("Update"),
- _('Confirm changes'));
- edit_button_cell('CancelUpdate', _("Cancel"),
- _('Cancel changes'));
+ button_cell('UpdateLine', _("Update"),
+ _('Confirm changes'), ICON_UPDATE);
+ button_cell('CancelUpdate', _("Cancel"),
+ _('Cancel changes'), ICON_CANCEL);
set_focus('qty');
}
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>.
+***********************************************************************/
$path_to_root="..";
include_once($path_to_root . "/purchasing/includes/supp_trans_class.inc");
start_form(false, true);
-start_table("$table_style width=98%", 8);
-echo "<tr><td valign=center>"; // outer table
-
-echo "<center>";
-
invoice_header($_SESSION['supp_trans']);
if ($_POST['supplier_id']=='')
display_error('No supplier found for entered search text');
else {
- echo "</td></tr><tr><td valign=center>"; // outer table
+ start_outer_table("$table_style2 width=98%", 5);
$total_grn_value = display_grn_items($_SESSION['supp_trans'], 1);
$total_gl_value = display_gl_items($_SESSION['supp_trans'], 1);
- echo "</td></tr><tr><td align=center colspan=2>"; // outer table
div_start('inv_tot');
invoice_totals($_SESSION['supp_trans']);
div_end();
-}
-echo "</td></tr>";
-end_table(1); // outer table
+ end_outer_table(0, false);
+}
if ($id != -1)
{
if (get_post('AddGLCodeToTrans'))
$Ajax->activate('inv_tot');
-
+br();
submit_center('PostCreditNote', _("Enter Credit Note"), true, '', true);
-echo "<br><br>";
+br();
end_form();
end_page();
<?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=5;
$path_to_root="..";
start_form(false, true);
-start_table("$table_style2 width=98%", 8);
-echo "<tr><td valign=center>"; // outer table
-
-echo "<center>";
-
invoice_header($_SESSION['supp_trans']);
+
if ($_POST['supplier_id']=='')
display_error('No supplier found for entered search text');
else {
- echo "</td></tr><tr><td valign=center>"; // outer table
-
- echo "<center>";
+ start_outer_table("$table_style2 width=98%", 5);
display_grn_items($_SESSION['supp_trans'], 1);
- //display_grn_items_for_selection();
+
display_gl_items($_SESSION['supp_trans'], 1);
- //display_gl_controls();
- //echo "</td></tr><tr><td align=center colspan=2>"; // outer table
- echo "<br>";
div_start('inv_tot');
invoice_totals($_SESSION['supp_trans']);
div_end();
-}
-echo "</td></tr>";
-end_table(); // outer table
+ end_outer_table(0, false);
+}
//-----------------------------------------------------------------------------------------
-
if ($id != -1 || $id2 != -1)
{
$Ajax->activate('grn_items');
if (get_post('AddGLCodeToTrans'))
$Ajax->activate('inv_tot');
-echo "<br>";
+br();
submit_center('PostInvoice', _("Enter Invoice"), true, '', true);
-echo "<br>";
+br();
end_form();
<?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;
include_once($path_to_root . "/includes/session.inc");
if (!is_date_in_fiscalyear($_POST['DatePaid']))
$_POST['DatePaid'] = end_fiscalyear();
}
- start_table($table_style2, 5, 7);
- echo "<tr><td valign=top>"; // outer table
-
- echo "<table>";
+ //start_table($table_style2, 5, 7);
+ //echo "<tr><td valign=top>"; // outer table
+ start_outer_table($table_style2, 5);
+ //echo "<table>";
+ table_section(1);
+
bank_accounts_list_row(_("From Bank Account:"), 'bank_account', null, true);
amount_row(_("Amount of Payment:"), 'amount');
date_row(_("Date Paid") . ":", 'DatePaid', '', null, 0, 0, 0, null, true);
- echo "</table>";
- echo "</td><td valign=top class='tableseparator'>"; // outer table
- echo "<table>";
+ table_section(2);
+ //echo "</table>";
+ //echo "</td><td valign=top class='tableseparator'>"; // outer table
+ //echo "<table>";
supplier_list_row(_("Payment To:"), 'supplier_id', null, false, true);
text_row(_("Memo:"), 'memo_', null, 52,50);
- echo "</table>";
+ //echo "</table>";
- echo "</td></tr>";
- end_table(1); // outer table
+ //echo "</td></tr>";
+ end_outer_table(1); // outer table
submit_center('ProcessSuppPayment',_("Enter Payment"), true, '', true);
<?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 = 3;
include_once($path_to_root . "/includes/session.inc");
function display_item_form()
{
global $table_style2;
- start_table($table_style2, 5, 7);
- echo "<tr><td valign=top>"; // outer table
- echo "<table>";
+ start_outer_table($table_style2, 5);
+ table_section(1);
if (!isset($_POST['customer_id']))
$_POST['customer_id'] = get_global_customer(false);
set_global_customer($_POST['customer_id']);
if (isset($_POST['HoldAccount']) && $_POST['HoldAccount'] != 0) {
- echo "</table></table>";
- display_note(_("This customer account is on hold."), 0, 0, "class='redfb'");
+ end_outer_table();
+ display_error(_("This customer account is on hold."));
} else {
$display_discount_percent = percent_format($_POST['pymt_discount']*100) . "%";
date_row(_("Date of Deposit:"), 'DateBanked','',null, 0, 0, 0, null, true);
- echo "</table>";
- echo "</td><td valign=top class='tableseparator'>"; // outer table
- echo "<table>";
+ table_section(2);
bank_accounts_list_row(_("Into Bank Account:"), 'bank_account', null, true);
textarea_row(_("Memo:"), 'memo_', null, 22, 4);
- echo "</table>";
-
- echo "</td></tr>";
- end_table(); // outer table
+ end_outer_table(1);
if ($cust_currency != $bank_currency)
display_note(_("Amount and discount are in customer's currency."));
function display_credit_header(&$order)
{
global $table_style, $Ajax;
- start_table("width=80% $table_style");
- echo "<tr><td valign=top>"; // outer table
- echo "<table>";
+
+ start_outer_table("width=80% $table_style");
+ table_section(1);
$customer_error = "";
$change_prices = 0;
label_row(_("Reference").':', $_POST['ref'] );
-
- echo "</table>";
-
- echo "</td><td>"; // outer table
-
if (!is_company_currency($order->customer_currency))
{
+ table_section(2);
+
div_start('currency');
- echo "<table height='5'>";
label_row(_("Customer Currency:"), $order->customer_currency);
exchange_rate_display($order->customer_currency, get_company_currency(),
$_POST['OrderDate']);
- echo "</table>";
- echo "</td><td>"; // outer table
div_end();
}
-
- echo "<table height='5'>";
+ table_section(3);
if (!isset($_POST['sales_type_id']))
$_POST['sales_type_id'] = $order->sales_type;
shippers_list_row(_("Shipping Company:"), 'ShipperID', $order->ship_via);
label_row(_("Customer Discount:"), ($order->default_discount * 100) . "%");
- echo "</table>";
-
- echo "</td><td>"; // outer table
- echo "<table height='5'>";
+ table_section(4);
if (!isset($_POST['OrderDate']) || $_POST['OrderDate'] == "")
$_POST['OrderDate'] = $order->document_date;
else
hidden('dimension2_id', 0);
- echo "</table>";
-
- echo "</td></tr>";
-
- end_table(1); // outer table
+ end_outer_table(1); // outer table
if ($change_prices != 0) {
foreach ($order->line_items as $line_no=>$item) {
{
global $table_style, $Ajax;
- start_table("width=80% $table_style");
- echo "<tr><td valign=top>"; // outer table
- echo "<table>";
+ start_outer_table("width=80% $table_style");
+ table_section(1);
+
$customer_error = "";
$change_prices = 0;
ref_cells(_("Reference").':', 'ref', _('Reference number unique for this document type'), null, '');
}
- echo "</table>";
-
- echo "</td><td>"; // outer table
-
if (!is_company_currency($order->customer_currency))
{
+ table_section(2);
+
div_start('currency');
- echo "<table height='5'>";
label_row(_("Customer Currency:"), $order->customer_currency);
exchange_rate_display($order->customer_currency, get_company_currency(),
($editable ? $_POST['OrderDate'] : $order->document_date));
- echo "</table>";
div_end();
- echo "</td><td>"; // outer table
}
+ table_section(3);
-
- echo "<table height='5'>";
if ($order->trans_type == 10 && $order->pos != -1) {
sale_payment_list_cells(_('Payment:'), 'cash', null, true);
$cash_payment = get_post('cash', 0);
}
label_row(_("Customer Discount:"), ($order->default_discount * 100) . "%");
- echo "</table>";
-
- echo "</td><td>"; // outer table
-
- echo "<table height='5'>";
+
+ table_section(4);
if ($editable)
{
label_row(_("Tax Group:"), $order->tax_group_name);
hidden('tax_group_id', $_SESSION['Items']->tax_group_id);
}
- echo "</table>";
-
- echo "</td></tr>";
- end_table(1); // outer table
+ end_outer_table(1); // outer table
if ($change_prices != 0) {
foreach ($order->line_items as $line_no=>$item) {
{
global $table_style2, $Ajax;
-div_start('delivery');
+ div_start('delivery');
if (get_post('cash', 0)) { // Direct payment sale
display_heading(_('Cash payment'));
- echo "<table $table_style2 width=60% align=center>";
+ start_table("$table_style2 width=60%");
label_row(_("Deliver from Location:"), $order->location_name);
hidden('Location', $order->Location);
label_row(_("Cash account:"), $order->account_name);
textarea_row(_("Comments:"), "Comments", $order->Comments, 31, 5);
- echo "</table>";
+ end_table();
} else {
if ($order->trans_type==10)
$delname = _("Required Delivery Date").':';
}
display_heading($title);
- echo "<br>";
- start_table("$table_style2 width=90%");
- echo "<tr valign=top><td>"; // outer table
- echo "<table>";
+ start_outer_table("$table_style2 width=90%");
+ table_section(1);
locations_list_row(_("Deliver from Location:"), 'Location', null,
false, true);
text_row(_("Contact Phone Number:"), 'phone', $order->phone, 25, 25,
_('Phone number of ordering person. Defaults to branch phone number'));
- echo "</table>";
-
- echo "</td><td>"; // outer table
-
- echo "<table>";
+ table_section(2);
text_row(_("Customer Reference:"), 'cust_ref', $order->cust_ref, 25, 25,
_('Customer reference number for this order (if any)'));
price_format(get_post('freight_cost',0)));
shippers_list_row(_("Shipping Company:"), 'ship_via', $order->ship_via);
- echo "</table>";
- echo "</td></tr>";
- end_table(1); // outer table
+
+ end_outer_table(1);
}
div_end();
}