add_gl_codes_to_trans($_POST['gl_code'], $gl_act_name, $_POST['dimension_id'], $_POST['dimension2_id'], input_num('amount'), $_POST['memo_']); clear_fields(); } } //------------------------------------------------------------------------------------------------ if (isset($_GET['Delete'])) { $_SESSION['supp_trans']->remove_gl_codes_from_trans($_GET['Delete']); clear_fields(); } //------------------------------------------------------------------------------------------------ display_heading($_SESSION['supp_trans']->supplier_name); display_gl_items($_SESSION['supp_trans'], 1); echo "
"; if ($_SESSION['supp_trans']->is_invoice == true) { hyperlink_no_params("$path_to_root/purchasing/supplier_invoice.php", _("Back to Invoice Entry")); } else { hyperlink_no_params("$path_to_root/purchasing/supplier_credit.php", _("Back to Credit Note Entry")); } echo "
"; //------------------------------------------------------------------------------------------------ /*Set up a form to allow input of new GL entries */ start_form(false, true); display_heading2(_("Enter a GL Line")); start_table($table_style2); $accs = get_supplier_accounts($_SESSION['supp_trans']->supplier_id); $_POST['AcctSelection'] = $accs['purchase_account']; gl_all_accounts_list_row(_("GL Account Selection:"), 'AcctSelection', $_POST['AcctSelection']); $dim = get_company_pref('use_dimension'); if ($dim >= 1) dimensions_list_row(_("Dimension")." 1", 'dimension_id', null, true, " ", false, 1); if ($dim > 1) dimensions_list_row(_("Dimension")." 2", 'dimension2_id', null, true, " ", false, 2); if ($dim < 1) hidden('dimension_id', 0); if ($dim < 2) hidden('dimension2_id', 0); amount_row( _("Amount:"), 'amount'); textarea_row(_("Memo:"), "memo_", null, 40, 2); end_table();; submit_center('AddGLCodeToTrans', _("Add GL Line")); end_form(); //------------------------------------------------------------------------------------------------ end_page(); ?>