echo "<table>";
start_row();
date_cells(_("Date:"), 'date_');
- ref_cells(_("Reference:"), 'ref', references::get_next(0));
+ ref_cells(_("Reference:"), 'ref', '', references::get_next(0));
end_row();
echo "</table>";
else
$th = array(_("Account Code"), _("Account Description"),
_("Debit"), _("Credit"), _("Memo"));
+
+ if (count($order->gl_items)) $th[] = '';
+
table_header($th);
$k = 0;
$_POST['dimension2_id'] = $item->dimension2_id;
if ((!isset($_POST['AmountDebit']) || ($_POST['AmountDebit']=="")) && $item->amount > 0)
- $_POST['AmountDebit'] = $item->amount;
+ $_POST['AmountDebit'] = price_format($item->amount);
if ((!isset($_POST['AmountCredit']) || ($_POST['AmountCredit']=="")) && $item->amount <= 0)
- $_POST['AmountCredit'] = abs($item->amount);
+ $_POST['AmountCredit'] = price_format(abs($item->amount));
if (!isset($_POST['description']) || ($_POST['description'] == ""))
$_POST['description'] = $item->description;
}
else
{
- $_POST['AmountDebit'] = 0;
- $_POST['AmountCredit'] = 0;
+ $_POST['AmountDebit'] = ''; //price_format(0);
+ $_POST['AmountCredit'] = ''; //price_format(0);
$_POST['dimension_id'] = 0;
$_POST['dimension2_id'] = 0;
$_POST['LineMemo'] = "";
- $_POST['CodeID2'] = "";
+ $_POST['_code_id_edit'] = "";
$_POST['code_id'] = "";
- text_cells(null, "CodeID2", "", 12, 10, "", "", "onkeyup='recalcAccounts();' onKeyDown='if(event.keyCode==13) event.keyCode=9;' onblur='return setAccount(0, false)'");
$skip_bank = ($_SESSION["wa_current_user"]->access != 2);
- gl_all_accounts_list_cells(null, 'code_id', null, $skip_bank, false, "return setAccount(1, false)");
+ gl_all_accounts_list('code_id', null, $skip_bank, false, true);
if ($dim >= 1)
dimensions_list_cells(null, 'dimension_id', null, true, " ", false, 1);
if ($dim > 1)
if ($dim < 2)
hidden('dimension2_id', 0);
- amount_cells(null, 'AmountDebit');
- amount_cells(null, 'AmountCredit');
+ small_amount_cells(null, 'AmountDebit');
+ small_amount_cells(null, 'AmountCredit');
text_cells_ex(null, 'LineMemo', 35, 50);
if (isset($_GET['Edit']))