function gl_payment_controls() { global $table_style2; $home_currency = get_company_currency(); start_form(false, true); start_table($table_style2, 5, 7); echo "<tr><td valign=top>"; // outer table echo "<table>"; bank_accounts_list_row(tr("From Account:"), 'FromBankAccount', null, true); bank_accounts_list_row(tr("To Account:"), 'ToBankAccount', null, true); date_row(tr("Transfer Date:"), 'DatePaid'); $from_currency = get_bank_account_currency($_POST['FromBankAccount']); $to_currency = get_bank_account_currency($_POST['ToBankAccount']); if ($from_currency != "" && $to_currency != "" && $from_currency != $to_currency) { amount_row(tr("Amount:"), 'amount', null, null, $from_currency); exchange_rate_display($from_currency, $to_currency, $_POST['DatePaid']); } else { amount_row(tr("Amount:"), 'amount'); } echo "</table>"; echo "</td><td valign=top class='tableseparator'>"; // outer table echo "<table>"; bank_trans_types_list_row(tr("Transfer Type:"), 'TransferType', null); ref_row(tr("Reference:"), 'ref', references::get_next(systypes::bank_transfer())); textarea_row(tr("Memo:"), 'memo_', null, 40, 4); end_table(1); echo "</td></tr>"; end_table(1); // outer table submit_center('AddPayment', tr("Enter Transfer")); end_form(); }
function display_reval() { global $Refs; start_form(); start_table(TABLESTYLE2); if (!isset($_POST['date'])) { $_POST['date'] = Today(); } date_row(_("Date for Revaluation:"), 'date', '', null, 0, 0, 0, null, true); ref_row(_("Reference:"), 'ref', '', $Refs->get_next(ST_JOURNAL)); textarea_row(_("Memo:"), 'memo_', null, 40, 4); end_table(1); submit_center('submit', _("Revaluate Currencies"), true, false); end_form(); }
function voiding_controls() { global $table_style2; start_form(false, true); start_table($table_style2); systypes_list_row(tr("Transaction Type:"), "filterType", null, true); text_row(tr("Transaction #:"), 'trans_no', null, 12, 12); date_row(tr("Voiding Date:"), 'date_'); textarea_row(tr("Memo:"), 'memo_', null, 30, 4); end_table(1); if (!isset($_POST['ProcessVoiding'])) { submit_center('ProcessVoiding', tr("Void Transaction")); } else { display_note(tr("Are you sure you want to void this transaction ? This action cannot be undone."), 0, 1); submit_center_first('ConfirmVoiding', tr("Proceed")); submit_center_last('CancelVoiding', tr("Cancel")); } end_form(); }
function gl_payment_controls() { global $Refs; $home_currency = get_company_currency(); start_form(); start_outer_table(TABLESTYLE2); table_section(1); bank_accounts_list_row(_("From Account:"), 'FromBankAccount', null, true); bank_balance_row($_POST['FromBankAccount']); bank_accounts_list_row(_("To Account:"), 'ToBankAccount', null, true); if (!isset($_POST['DatePaid'])) { // init page $_POST['DatePaid'] = new_doc_date(); if (!is_date_in_fiscalyear($_POST['DatePaid'])) { $_POST['DatePaid'] = end_fiscalyear(); } } date_row(_("Transfer Date:"), 'DatePaid', '', true, 0, 0, 0, null, true); ref_row(_("Reference:"), 'ref', '', $Refs->get_next(ST_BANKTRANSFER)); table_section(2); $from_currency = get_bank_account_currency($_POST['FromBankAccount']); $to_currency = get_bank_account_currency($_POST['ToBankAccount']); if ($from_currency != "" && $to_currency != "" && $from_currency != $to_currency) { amount_row(_("Amount:"), 'amount', null, null, $from_currency); amount_row(_("Bank Charge:"), 'charge', null, null, $from_currency); amount_row(_("Incoming Amount:"), 'target_amount', null, '', $to_currency, 2); } else { amount_row(_("Amount:"), 'amount'); amount_row(_("Bank Charge:"), 'charge'); } textarea_row(_("Memo:"), 'memo_', null, 40, 4); end_outer_table(1); // outer table submit_center('AddPayment', _("Enter Transfer"), true, '', 'default'); end_form(); }
if (!isset($_POST['Labour'])) { $_POST['Labour'] = price_format(0); $_POST['cr_lab_acc'] = $r[0]; } amount_row($wo_cost_types[WO_LABOUR], 'Labour'); gl_all_accounts_list_row(_("Credit Labour Account"), 'cr_lab_acc', null); if (!isset($_POST['Costs'])) { $_POST['Costs'] = price_format(0); $_POST['cr_acc'] = $r[0]; } amount_row($wo_cost_types[WO_OVERHEAD], 'Costs'); gl_all_accounts_list_row(_("Credit Overhead Account"), 'cr_acc', null); } if (get_post('released')) { label_row(_("Released On:"), $_POST['released_date']); } textarea_row(_("Memo:"), 'memo_', null, 40, 5); end_table(1); if (isset($selected_id)) { echo "<table align=center><tr>"; submit_cells('UPDATE_ITEM', _("Update"), '', _('Save changes to work order'), 'default'); if (get_post('released')) { submit_cells('close', _("Close This Work Order"), '', '', true); } submit_cells('delete', _("Delete This Work Order"), '', '', true); echo "</tr></table>"; } else { submit_center('ADD_ITEM', _("Add Workorder"), true, '', 'default'); } end_form(); end_page();
if ($selected_id != -1) { //editing an existing Location if ($Mode == 'Edit') { $myrow = get_item_location($selected_id); $_POST['loc_code'] = $myrow["loc_code"]; $_POST['location_name'] = $myrow["location_name"]; $_POST['delivery_address'] = $myrow["delivery_address"]; $_POST['contact'] = $myrow["contact"]; $_POST['phone'] = $myrow["phone"]; $_POST['phone2'] = $myrow["phone2"]; $_POST['fax'] = $myrow["fax"]; $_POST['email'] = $myrow["email"]; } hidden("selected_id", $selected_id); hidden("loc_code"); label_row(_("Location Code:"), $_POST['loc_code']); } else { //end of if $selected_id only do the else when a new record is being entered text_row(_("Location Code:"), 'loc_code', null, 5, 5); } text_row_ex(_("Location Name:"), 'location_name', 50, 50); text_row_ex(_("Contact for deliveries:"), 'contact', 30, 30); textarea_row(_("Address:"), 'delivery_address', null, 35, 5); text_row_ex(_("Telephone No:"), 'phone', 32, 30); text_row_ex(_("Secondary Phone Number:"), 'phone2', 32, 30); text_row_ex(_("Facsimile No:"), 'fax', 32, 30); email_row_ex(_("E-mail:"), 'email', 30); end_table(1); submit_add_or_update_center($selected_id == -1, '', 'both'); end_form(); end_page();
function display_credit_options() { global $Ajax; br(); if (isset($_POST['_CreditType_update'])) { $Ajax->activate('options'); } div_start('options'); start_table(TABLESTYLE2); credit_type_list_row(_("Credit Note Type"), 'CreditType', null, true); if ($_POST['CreditType'] == "Return") { /*if the credit note is a return of goods then need to know which location to receive them into */ if (!isset($_POST['Location'])) { $_POST['Location'] = $_SESSION['Items']->Location; } locations_list_row(_("Items Returned to Location"), 'Location', $_POST['Location']); } else { /* the goods are to be written off to somewhere */ gl_all_accounts_list_row(_("Write off the cost of the items to"), 'WriteOffGLCode', null); } textarea_row(_("Memo"), "CreditText", null, 51, 3); echo "</table>"; div_end(); }
hidden('id', $selected_id); text_row(tr("Item Code:"), 'id_stock', $_POST['id_stock'], 20, 20); text_row(tr("Name:"), 'description', $_POST['description'], 40, 200); textarea_row(tr("Description:"), 'long_description', $_POST['long_description'], 40, 10); text_row(tr("Areas:"), 'areas', $_POST['areas'], 40, 200); end_table(1); br(); submit_add_or_update_center(!isset($selected_id)); br(); submit_center('delete', tr("Delete")); br(); } elseif (isset($_POST['NewItemTranslation'])) { start_table("class='tablestyle_noborder'"); text_row(tr("Item Code:"), 'id_stock', null, 20, 20); text_row(tr("Name:"), 'description', null, 40, 200); textarea_row(tr("Description:"), 'long_description', null, 40, 10); text_row(tr("Areas:"), 'areas', null, 40, 200); end_table(1); br(); submit_center('ADD_ITEM', tr("Save")); br(); } else { if (db_has_item_translations()) { start_table("class='tablestyle_noborder'"); start_row(); item_translations_list_cells(tr("Select a translation:"), 'id', null); submit_cells('SelectItemTranslation', tr("Edit")); end_row(); end_table(); br(); }
function display_item_form() { global $table_style2; start_table($table_style2, 5, 7); echo "<tr><td valign=top>"; // outer table echo "<table>"; if (!isset($_POST['customer_id'])) { $_POST['customer_id'] = get_global_customer(false); } if (!isset($_POST['DateBanked'])) { $_POST['DateBanked'] = Today(); if (!is_date_in_fiscalyear($_POST['DateBanked'])) { $_POST['DateBanked'] = end_fiscalyear(); } } customer_list_row(tr("From Customer:"), 'customer_id', null, false, true); if (db_customer_has_branches($_POST['customer_id'])) { customer_branches_list_row(tr("Branch:"), $_POST['customer_id'], 'BranchID', null, false, true, true); } else { hidden('BranchID', reserved_words::get_any_numeric()); } read_customer_data(); set_global_customer($_POST['customer_id']); if (isset($_POST['HoldAccount']) && $_POST['HoldAccount'] != 0) { echo "</table></table>"; display_note(tr("This customer account is on hold."), 0, 0, "class='redfb'"); } else { $display_discount_percent = percent_format($_POST['pymt_discount'] * 100) . "%"; amount_row(tr("Amount:"), 'amount'); amount_row(tr("Amount of Discount:"), 'discount'); label_row(tr("Customer prompt payment discount :"), $display_discount_percent); date_row(tr("Date of Deposit:"), 'DateBanked'); echo "</table>"; echo "</td><td valign=top class='tableseparator'>"; // outer table echo "<table>"; bank_accounts_list_row(tr("Into Bank Account:"), 'bank_account', null, true); $cust_currency = get_customer_currency($_POST['customer_id']); $bank_currency = get_bank_account_currency($_POST['bank_account']); if ($cust_currency != $bank_currency) { exchange_rate_display($cust_currency, $bank_currency, $_POST['DateBanked']); } bank_trans_types_list_row(tr("Type:"), 'ReceiptType', null); text_row(tr("Reference:"), 'ref', null, 20, 40); textarea_row(tr("Memo:"), 'memo_', null, 22, 4); echo "</table>"; echo "</td></tr>"; end_table(); // outer table if ($cust_currency != $bank_currency) { display_note(tr("Amount and discount are in customer's currency.")); } echo "<br>"; submit_center('AddPaymentItem', tr("Add Payment")); } echo "<br>"; }
display_notification(PHP_OK . $field); } } if (empty($funct)) { $res = db_query("SELECT attrib FROM xx_reports WHERE id = '{$id_new}'"); $f = db_fetch($res); $h = explode("|", $f["attrib"]); if (!isset($h[4])) { $h[4] = ""; } $funct = stripslashes($h[4]); } start_form(false, false, "repgen_createfunct.php", "edit"); start_table(TABLESTYLE2); label_row(ID_FUNCT, $id_new . hidden("date_", date("Y-m-d"), false) . hidden("id", $id_new, false) . hidden("id_new", $id_new, false)); text_row(SHORT, "short", $short, 10, 10); text_row(LONG, "long", $long, 40, 40); text_row(AUTHOR, "author", $author, 20, 20); label_row(DATE, today()); textarea_row(ALTER_FUNCT, "funct", $funct, 50, 10); end_table(1); display_note(FUNC_DECL, 0, 1); start_table(TABLESTYLE); start_row(); submit_cells("select", SELECT_CR); submit_cells("store", PAGE_STORE); submit_cells("test", PAGE_TEST); end_row(); end_table(); end_form(); end_page();
if (!isset($_POST['OrderDate'])) { $_POST['OrderDate'] = $_SESSION['PO']->orig_order_date; } if (!isset($_POST['Requisition'])) { $_POST['Requisition'] = $_SESSION['PO']->requisition_no; } if (!isset($_POST['Comments'])) { $_POST['Comments'] = $_SESSION['PO']->Comments; } } //--------------------------------------------------------------------------------------------------- start_form(false, true); display_po_header($_SESSION['PO']); echo "<br>"; display_po_items($_SESSION['PO']); start_table($table_style2); textarea_row(tr("Memo:"), 'Comments', null, 70, 4); end_table(1); if ($_SESSION['PO']->order_has_items()) { if ($_SESSION['PO']->order_no) { submit_center_first('Commit', tr("Update Order")); } else { submit_center_first('Commit', tr("Place Order")); } submit_center_last('CancelOrder', tr("Cancel Order")); } else { submit_center('CancelOrder', tr("Cancel Order")); } //--------------------------------------------------------------------------------------------------- end_form(); end_page();
function customer_settings($selected_id) { global $SysPrefs, $path_to_root, $auto_create_branch; if (!$selected_id) { if (list_updated('customer_id') || !isset($_POST['CustName'])) { $_POST['CustName'] = $_POST['cust_ref'] = $_POST['address'] = $_POST['tax_id'] = ''; $_POST['dimension_id'] = 0; $_POST['dimension2_id'] = 0; $_POST['sales_type'] = -1; $_POST['curr_code'] = get_company_currency(); $_POST['credit_status'] = -1; $_POST['payment_terms'] = $_POST['notes'] = ''; $_POST['discount'] = $_POST['pymt_discount'] = percent_format(0); $_POST['credit_limit'] = price_format($SysPrefs->default_credit_limit()); } } else { $myrow = get_customer($selected_id); $_POST['CustName'] = $myrow["name"]; $_POST['cust_ref'] = $myrow["debtor_ref"]; $_POST['address'] = $myrow["address"]; $_POST['tax_id'] = $myrow["tax_id"]; $_POST['dimension_id'] = $myrow["dimension_id"]; $_POST['dimension2_id'] = $myrow["dimension2_id"]; $_POST['sales_type'] = $myrow["sales_type"]; $_POST['curr_code'] = $myrow["curr_code"]; $_POST['credit_status'] = $myrow["credit_status"]; $_POST['payment_terms'] = $myrow["payment_terms"]; $_POST['discount'] = percent_format($myrow["discount"] * 100); $_POST['pymt_discount'] = percent_format($myrow["pymt_discount"] * 100); $_POST['credit_limit'] = price_format($myrow["credit_limit"]); $_POST['notes'] = $myrow["notes"]; $_POST['inactive'] = $myrow["inactive"]; } start_outer_table(TABLESTYLE2); table_section(1); table_section_title(_("Name and Address")); text_row(_("Customer Name:"), 'CustName', $_POST['CustName'], 40, 80); text_row(_("Customer Short Name:"), 'cust_ref', null, 30, 30); textarea_row(_("Address:"), 'address', $_POST['address'], 35, 5); text_row(_("GSTNo:"), 'tax_id', null, 40, 40); if (!$selected_id || is_new_customer($selected_id)) { currencies_list_row(_("Customer's Currency:"), 'curr_code', $_POST['curr_code']); } else { label_row(_("Customer's Currency:"), $_POST['curr_code']); hidden('curr_code', $_POST['curr_code']); } sales_types_list_row(_("Sales Type/Price List:"), 'sales_type', $_POST['sales_type']); if ($selected_id) { record_status_list_row(_("Customer status:"), 'inactive'); } elseif (isset($auto_create_branch) && $auto_create_branch == 1) { table_section_title(_("Branch")); text_row(_("Phone:"), 'phone', null, 32, 30); text_row(_("Secondary Phone Number:"), 'phone2', null, 32, 30); text_row(_("Fax Number:"), 'fax', null, 32, 30); email_row(_("E-mail:"), 'email', null, 35, 55); sales_persons_list_row(_("Sales Person:"), 'salesman', null); } table_section(2); table_section_title(_("Sales")); percent_row(_("Discount Percent:"), 'discount', $_POST['discount']); percent_row(_("Prompt Payment Discount Percent:"), 'pymt_discount', $_POST['pymt_discount']); amount_row(_("Credit Limit:"), 'credit_limit', $_POST['credit_limit']); payment_terms_list_row(_("Payment Terms:"), 'payment_terms', $_POST['payment_terms']); credit_status_list_row(_("Credit Status:"), 'credit_status', $_POST['credit_status']); $dim = get_company_pref('use_dimension'); if ($dim >= 1) { dimensions_list_row(_("Dimension") . " 1:", 'dimension_id', $_POST['dimension_id'], true, " ", false, 1); } if ($dim > 1) { dimensions_list_row(_("Dimension") . " 2:", 'dimension2_id', $_POST['dimension2_id'], true, " ", false, 2); } if ($dim < 1) { hidden('dimension_id', 0); } if ($dim < 2) { hidden('dimension2_id', 0); } if ($selected_id) { start_row(); echo '<td class="label">' . _('Customer branches') . ':</td>'; hyperlink_params_td($path_to_root . "/sales/manage/customer_branches.php", '<b>' . (@$_REQUEST['popup'] ? _("Select or &Add") : _("&Add or Edit ")) . '</b>', "debtor_no=" . $selected_id . (@$_REQUEST['popup'] ? '&popup=1' : '')); end_row(); } textarea_row(_("General Notes:"), 'notes', null, 35, 5); if (!$selected_id && isset($auto_create_branch) && $auto_create_branch == 1) { table_section_title(_("Branch")); locations_list_row(_("Default Inventory Location:"), 'location'); shippers_list_row(_("Default Shipping Company:"), 'ship_via'); sales_areas_list_row(_("Sales Area:"), 'area', null); tax_groups_list_row(_("Tax Group:"), 'tax_group_id', null); } end_outer_table(1); div_start('controls'); if (!$selected_id) { submit_center('submit', _("Add New Customer"), true, '', 'default'); } else { submit_center_first('submit', _("Update Customer"), _('Update customer data'), @$_REQUEST['popup'] ? true : 'default'); submit_return('select', $selected_id, _("Select this customer and return to document entry.")); submit_center_last('delete', _("Delete Customer"), _('Delete customer data if have been never used'), true); } div_end(); }
$_POST['curr_code'] = $myrow["curr_code"]; $_POST['payment_terms'] = $myrow["payment_terms"]; $_POST['tax_group_id'] = $myrow["tax_group_id"]; $_POST['payable_account'] = $myrow["payable_account"]; $_POST['purchase_account'] = $myrow["purchase_account"]; $_POST['payment_discount_account'] = $myrow["payment_discount_account"]; } else { // its a new supplier being added hidden('New', 'Yes'); $company_record = get_company_prefs(); $_POST['payable_account'] = $company_record["creditors_act"]; $_POST['purchase_account'] = $company_record["default_cogs_act"]; $_POST['payment_discount_account'] = $company_record['pyt_discount_act']; } text_row(tr("Supplier Name:"), 'supp_name', null, 42, 40); textarea_row(tr("Address:"), 'address', null, 35, 5); text_row(tr("Email:"), 'email', null, 42, 40); text_row(tr("Bank Account:"), 'bank_account', null, 42, 40); // Sherifoz 23.09.03 currency can't be changed if editing if (isset($_POST['supplier_id']) && !isset($_POST['New'])) { label_row(tr("Supplier's Currency:"), $_POST['curr_code']); hidden('curr_code', $_POST['curr_code']); } else { currencies_list_row(tr("Supplier's Currency:"), 'curr_code', null); } tax_groups_list_row(tr("Tax Group:"), 'tax_group_id', null); payment_terms_list_row(tr("Payment Terms:"), 'payment_terms', null); table_section_title(tr("Accounts")); gl_all_accounts_list_row(tr("Accounts Payable Account:"), 'payable_account', $_POST['payable_account']); gl_all_accounts_list_row(tr("Purchase Account:"), 'purchase_account', $_POST['purchase_account']); gl_all_accounts_list_row(tr("Purchase Discount Account:"), 'payment_discount_account', $_POST['payment_discount_account']);
} hidden('selected_id', $selected_id); hidden('account_code'); hidden('account_type'); hidden('BankAccountCurrency', $_POST['BankAccountCurrency']); set_focus('bank_account_name'); } text_row(_("Bank Account Name:"), 'bank_account_name', null, 50, 100); if ($is_used) { label_row(_("Account Type:"), $bank_account_types[$_POST['account_type']]); } else { bank_account_types_list_row(_("Account Type:"), 'account_type', null); } if ($is_used) { label_row(_("Bank Account Currency:"), $_POST['BankAccountCurrency']); } else { currencies_list_row(_("Bank Account Currency:"), 'BankAccountCurrency', null); } yesno_list_row(_("Default currency account:"), 'dflt_curr_act'); if ($is_used) { label_row(_("Bank Account GL Code:"), $_POST['account_code']); } else { gl_all_accounts_list_row(_("Bank Account GL Code:"), 'account_code', null); } text_row(_("Bank Name:"), 'bank_name', null, 50, 60); text_row(_("Bank Account Number:"), 'bank_account_number', null, 30, 60); textarea_row(_("Bank Address:"), 'bank_address', null, 40, 5); end_table(1); submit_add_or_update_center($selected_id == -1, '', 'both'); end_form(); end_page();
$_POST['inventory_account'] = $myrow['inventory_account']; $_POST['cogs_account'] = $myrow['cogs_account']; $_POST['adjustment_account'] = $myrow['adjustment_account']; $_POST['assembly_account'] = $myrow['assembly_account']; $_POST['dimension_id'] = $myrow['dimension_id']; $_POST['dimension2_id'] = $myrow['dimension2_id']; $_POST['selling'] = $myrow['selling']; $_POST['depending'] = $myrow['depending']; $_POST['barcode'] = $myrow['barcode']; $_POST['weight'] = $myrow['weight']; label_row(tr("Item Code:"), $_POST['NewStockID']); hidden('NewStockID', $_POST['NewStockID']); } } text_row(tr("Name:"), 'description', null, 52, 50); textarea_row(tr('Description:'), 'long_description', null, 45, 3); end_table(); start_table("{$table_style2} width=40%"); // Add image upload for New Item - by Joe start_row(); label_cells(tr("Image File (.jpg)") . ":", "<input type='file' id='pic' name='pic'>"); if ($id != "") { $fileimg = $path_to_root . "/image.php?id=" . $id; $stock_img_link = "<img src='{$fileimg}' width='100px' border='0'>"; $stock_img_link .= "<br>" . tr("Delete") . "<input type='checkbox' name='deleteImage' value='1'>"; label_cell($stock_img_link, "valign=top align=center rowspan=1"); } end_row(); stock_categories_list_row(tr("Category:"), 'category_id', null); item_tax_types_list_row(tr("Item Tax Type:"), 'tax_type_id', null); stock_item_types_list_row(tr("Item Type:"), 'mb_flag', null, !isset($_POST['NewStockID']) || isset($_POST['New']));
set_focus('selected_id'); } } else { hidden('selected_id', get_post('selected_id')); } div_start('details'); start_outer_table(TABLESTYLE2); table_section(1); table_section_title(_("Employee Informations")); if (isset($selected_id) && $selected_id != '') { label_row(_("Employee ID:"), $_POST['empl_id']); hidden('empl_id', $_POST['empl_id']); } text_row(_("Employee Name *:"), 'empl_name', null, 28, 80); textarea_row(_("Present Address:"), 'pre_address', null, 25, 2); textarea_row(_("Permanent Address:"), 'per_address', null, 25, 2); date_row(_("Date of Birth") . ":", 'date_of_birth'); text_row(_("Age:"), 'age', null, 3, 10); text_row(_("Mobile Phone *:"), 'mobile_phone', null, 28, 40); text_row(_("Email *:"), 'email', null, 28, 40); table_section(2); table_section_title(_("Employee Job Info")); text_row(_("Grade:"), 'grade', null, 28, 10); text_row(_("Department:"), 'department', null, 28, 40); text_row(_("Designation:"), 'designation', null, 28, 40); text_row(_("Gross Salary Per Month *:"), 'gross_salary', null, 28, 40); text_row(_("Basic Salary Per Month *:"), 'basic_salary', null, 28, 40); date_row(_("Date of Join") . ":", 'date_of_join'); end_outer_table(1); if (isset($selected_id) && $selected_id != '') { submit_center_first('submit', _("Update Employee"), '', @$_REQUEST['popup'] ? true : 'default');
$_POST['f_year'] = $myrow["f_year"]; $_POST['time_zone'] = $myrow["time_zone"]; $_POST['version_id'] = $myrow["version_id"]; $_POST['add_pct'] = $myrow['add_pct']; $_POST['login_tout'] = $myrow['login_tout']; if ($_POST['add_pct'] == -1) { $_POST['add_pct'] = ""; } $_POST['round_to'] = $myrow['round_to']; $_POST['auto_curr_reval'] = $myrow['auto_curr_reval']; $_POST['del_coy_logo'] = 0; $_POST['bcc_email'] = $myrow["bcc_email"]; start_outer_table(TABLESTYLE2); table_section(1); text_row_ex(_("Name (to appear on reports):"), 'coy_name', 42, 50); textarea_row(_("Address:"), 'postal_address', $_POST['postal_address'], 35, 6); text_row_ex(_("Domicile:"), 'domicile', 25, 55); text_row_ex(_("Phone Number:"), 'phone', 25, 55); text_row_ex(_("Fax Number:"), 'fax', 25); email_row_ex(_("Email Address:"), 'email', 25, 55); email_row_ex(_("BCC Address for all outgoing mails:"), 'bcc_email', 25, 55); text_row_ex(_("Official Company Number:"), 'coy_no', 25); text_row_ex(_("GSTNo:"), 'gst_no', 25); currencies_list_row(_("Home Currency:"), 'curr_default', $_POST['curr_default']); fiscalyears_list_row(_("Fiscal Year:"), 'f_year', $_POST['f_year']); text_row_ex(_("Tax Periods:"), 'tax_prd', 10, 10, '', null, null, _('Months.')); text_row_ex(_("Tax Last Period:"), 'tax_last', 10, 10, '', null, null, _('Months back.')); table_section(2); label_row(_("Company Logo:"), $_POST['coy_logo']); file_row(_("New Company Logo (.jpg)") . ":", 'pic', 'pic'); check_row(_("Delete Company Logo:"), 'del_coy_logo', $_POST['del_coy_logo']);
echo "</td>\n"; echo "</tr\n"; } $dim = get_company_pref('use_dimension'); start_form(false, false, "", "accrual"); start_table(TABLESTYLE2); date_row(_("Date"), 'date_', _('First date of Accruals'), true, 0, 0, 0, null, true); start_row(); label_cell(_("Accrued Balance Account"), "class='label'"); gl_all_accounts_list_cells(null, 'acc_act', null, true, false, false, true); end_row(); gl_all_accounts_list_row(_("Revenue / Cost Account"), 'res_act', null, true); if ($dim >= 1) { dimensions_list_row(_("Dimension"), 'dimension_id', null, true, " ", false, 1); } if ($dim > 1) { dimensions_list_row(_("Dimension") . " 2", 'dimension2_id', null, true, " ", false, 2); } $url = "gl/view/accrual_trans.php?act=" . get_post('acc_act') . "&date=" . get_post('date_'); amount_row(_("Amount"), 'amount', null, null, viewer_link(_("Search Amount"), $url, "", "", ICON_VIEW)); frequency_list_row(_("Frequency"), 'freq', null); text_row(_("Periods"), 'periods', null, 3, 3); textarea_row(_("Memo"), 'memo_', null, 35, 3); end_table(1); submit_center_first('show', _("Show GL Rows")); //,true,false,'process',ICON_SUBMIT); submit_center_last('go', _("Process Accruals")); //,true,false,'process',ICON_SUBMIT); submit_js_confirm('go', _("Are you sure you want to post accruals?")); end_form(); end_page();
$_POST['accumulate_shipping'] = $myrow['accumulate_shipping']; $_POST['default_workorder_required'] = $myrow['default_workorder_required']; $_POST['default_dim_required'] = $myrow['default_dim_required']; $_POST['default_delivery_required'] = $myrow['default_delivery_required']; //--------------- table_section_title(_("General GL")); text_row(_("Past Due Days Interval:"), 'past_due_days', $_POST['past_due_days'], 6, 6, '', "", _("days")); gl_all_accounts_list_row(_("Retained Earnings:"), 'retained_earnings_act', $_POST['retained_earnings_act']); gl_all_accounts_list_row(_("Profit/Loss Year:"), 'profit_loss_year_act', $_POST['profit_loss_year_act']); gl_all_accounts_list_row(_("Exchange Variances Account:"), 'exchange_diff_act', $_POST['exchange_diff_act']); gl_all_accounts_list_row(_("Bank Charges Account:"), 'bank_charge_act', $_POST['bank_charge_act']); //--------------- table_section_title(_("Customers and Sales")); text_row(_("Default Credit Limit:"), 'default_credit_limit', $_POST['default_credit_limit'], 12, 12); check_row(_("Accumulate batch shipping:"), 'accumulate_shipping', null); textarea_row(_("Legal Text on Invoice:"), 'legal_text', $_POST['legal_text'], 32, 3); gl_all_accounts_list_row(_("Shipping Charged Account:"), 'freight_act', $_POST['freight_act']); //--------------- table_section_title(_("Customers and Sales Defaults")); // default for customer branch gl_all_accounts_list_row(_("Receivable Account:"), 'debtors_act'); gl_all_accounts_list_row(_("Sales Account:"), 'default_sales_act', null, false, false, true); gl_all_accounts_list_row(_("Sales Discount Account:"), 'default_sales_discount_act'); gl_all_accounts_list_row(_("Prompt Payment Discount Account:"), 'default_prompt_payment_act'); text_row(_("Delivery Required By:"), 'default_delivery_required', $_POST['default_delivery_required'], 6, 6, '', "", _("days")); //---------------- table_section(2); table_section_title(_("Dimension Defaults")); text_row(_("Dimension Required By After:"), 'default_dim_required', $_POST['default_dim_required'], 6, 6, '', "", _("days")); //--------------- table_section_title(_("Suppliers and Purchasing"));
$_POST['ChargeFreightCost'] = get_post('ChargeFreightCost', price_format($_SESSION['Items']->freight_cost)); $colspan = 9; start_row(); label_cell(_("Shipping Cost"), "colspan={$colspan} align=right"); small_amount_cells(null, 'ChargeFreightCost', $_SESSION['Items']->freight_cost); end_row(); $inv_items_total = $_SESSION['Items']->get_items_total_dispatch(); $display_sub_total = price_format($inv_items_total + input_num('ChargeFreightCost')); label_row(_("Sub-total"), $display_sub_total, "colspan={$colspan} align=right", "align=right"); $taxes = $_SESSION['Items']->get_taxes(input_num('ChargeFreightCost')); $tax_total = display_edit_tax_items($taxes, $colspan, $_SESSION['Items']->tax_included); $display_total = price_format($inv_items_total + input_num('ChargeFreightCost') + $tax_total); label_row(_("Amount Total"), $display_total, "colspan={$colspan} align=right", "align=right"); end_table(1); if ($has_marked) { display_note(_("Marked items have insufficient quantities in stock as on day of delivery."), 0, 1, "class='stockmankofg'"); } start_table(TABLESTYLE2); policy_list_row(_("Action For Balance"), "bo_policy", null); textarea_row(_("Memo"), 'Comments', null, 50, 4); end_table(1); div_end(); submit_center_first('Update', _("Update"), _('Refresh document page'), true); if (isset($_POST['clear_quantity'])) { submit('reset_quantity', _('Reset quantity'), true, _('Refresh document page')); } else { submit('clear_quantity', _('Clear quantity'), true, _('Refresh document page')); } submit_center_last('process_delivery', _("Process Dispatch"), _('Check entered data and save document'), 'default'); end_form(); end_page();
label_cell($myrow["point_of_use"]); label_cell($myrow["narrative"]); label_cell(sql2date($myrow["application_date"])); edit_button_cell("Edit" . $myrow['requisition_id'], _("Edit")); inactive_control_cell($myrow["requisition_id"], $myrow["inactive"], 'requisitions', 'requisition_id'); delete_button_cell("Delete" . $myrow['requisition_id'], _("Delete")); echo "<td><a href='requisition_details.php?requisitionid=" . $myrow['requisition_id'] . "'>" . _("Details") . "</a></td>\n"; end_row(); } inactive_control_row($th); end_table(1); //----------------------------------------------------------------------------------- start_table(TABLESTYLE2); if ($selected_id != -1) { if ($Mode == 'Edit') { //editing an existing status code $myrow = get_requisition($selected_id); $_POST['point_of_use'] = $myrow["point_of_use"]; $_POST['narrative'] = $myrow["narrative"]; $_POST['details'] = $myrow["details"]; } hidden('selected_id', $selected_id); } text_row(_("Point of use :"), 'point_of_use', null, 50, 50); text_row(_("Narrative :"), 'narrative', null, 50, 50); textarea_row(_("Details :"), 'details', null, 50, 5); end_table(1); submit_add_or_update_center($selected_id == -1, '', 'both'); end_form(); //------------------------------------------------------------------------------------ end_page();
$_POST['CustName'] = $myrow["name"]; $_POST['address'] = $myrow["address"]; $_POST['tax_id'] = $myrow["tax_id"]; $_POST['email'] = $myrow["email"]; $_POST['dimension_id'] = $myrow["dimension_id"]; $_POST['dimension2_id'] = $myrow["dimension2_id"]; $_POST['sales_type'] = $myrow["sales_type"]; $_POST['curr_code'] = $myrow["curr_code"]; $_POST['credit_status'] = $myrow["credit_status"]; $_POST['payment_terms'] = $myrow["payment_terms"]; $_POST['discount'] = percent_format($myrow["discount"] * 100); $_POST['pymt_discount'] = percent_format($myrow["pymt_discount"] * 100); $_POST['credit_limit'] = price_format($myrow["credit_limit"]); } text_row(tr("Customer Name:"), 'CustName', $_POST['CustName'], 40, 40); textarea_row(tr("Address:"), 'address', $_POST['address'], 35, 5); text_row(tr("Email:"), 'email', null, 40, 40); text_row(tr("GSTNo:"), 'tax_id', null, 40, 40); // Sherifoz 23.09.03 currency can't be changed if editing if (isset($_POST['New'])) { currencies_list_row(tr("Customer's Currency:"), 'curr_code', $_POST['curr_code']); } else { label_row(tr("Customer's Currency:"), $_POST['curr_code']); hidden('curr_code', $_POST['curr_code']); } end_table(); echo "</td><td class='tableseparator'>"; // outer table start_table("class='tablestyle_noborder'"); sales_types_list_row(tr("Sales Type/Price List:"), 'sales_type', $_POST['sales_type']); $dim = get_company_pref('use_dimension');
$comp_currency = get_company_currency(); $cust_currency = get_customer_currency($_POST['customer_id']); $bank_currency = get_bank_account_currency($_POST['bank_account']); if ($cust_currency != $bank_currency) { exchange_rate_display($bank_currency, $cust_currency, $_POST['DateBanked'], $bank_currency == $comp_currency); } amount_row(_("Bank Charge:"), 'charge'); end_outer_table(1); if ($cust_currency == $bank_currency) { div_start('alloc_tbl'); show_allocatable(false); div_end(); } start_table(TABLESTYLE, "width=60%"); label_row(_("Customer prompt payment discount :"), $display_discount_percent); amount_row(_("Amount of Discount:"), 'discount'); amount_row(_("Amount:"), 'amount'); textarea_row(_("Memo:"), 'memo_', null, 22, 4); end_table(1); if ($cust_currency != $bank_currency) { display_note(_("Amount and discount are in customer's currency.")); } br(); if ($new) { submit_center('AddPaymentItem', _("Update Payment"), true, '', 'default'); } else { submit_center('AddPaymentItem', _("Add Payment"), true, '', 'default'); } br(); end_form(); end_page();
function supplier_settings(&$supplier_id) { start_outer_table(TABLESTYLE2); table_section(1); if ($supplier_id) { //SupplierID exists - either passed when calling the form or from the form itself $myrow = get_supplier($_POST['supplier_id']); $_POST['supp_name'] = $myrow["supp_name"]; $_POST['supp_ref'] = $myrow["supp_ref"]; $_POST['address'] = $myrow["address"]; $_POST['supp_address'] = $myrow["supp_address"]; $_POST['gst_no'] = $myrow["gst_no"]; $_POST['website'] = $myrow["website"]; $_POST['supp_account_no'] = $myrow["supp_account_no"]; $_POST['bank_account'] = $myrow["bank_account"]; $_POST['dimension_id'] = $myrow["dimension_id"]; $_POST['dimension2_id'] = $myrow["dimension2_id"]; $_POST['curr_code'] = $myrow["curr_code"]; $_POST['payment_terms'] = $myrow["payment_terms"]; $_POST['credit_limit'] = price_format($myrow["credit_limit"]); $_POST['tax_group_id'] = $myrow["tax_group_id"]; $_POST['tax_included'] = $myrow["tax_included"]; $_POST['payable_account'] = $myrow["payable_account"]; $_POST['purchase_account'] = $myrow["purchase_account"]; $_POST['payment_discount_account'] = $myrow["payment_discount_account"]; $_POST['notes'] = $myrow["notes"]; $_POST['inactive'] = $myrow["inactive"]; } else { $_POST['supp_name'] = $_POST['supp_ref'] = $_POST['address'] = $_POST['supp_address'] = $_POST['tax_group_id'] = $_POST['website'] = $_POST['supp_account_no'] = $_POST['notes'] = ''; $_POST['dimension_id'] = 0; $_POST['dimension2_id'] = 0; $_POST['tax_included'] = 0; $_POST['sales_type'] = -1; $_POST['gst_no'] = $_POST['bank_account'] = ''; $_POST['payment_terms'] = ''; $_POST['credit_limit'] = price_format(0); $company_record = get_company_prefs(); $_POST['curr_code'] = $company_record["curr_default"]; $_POST['payable_account'] = $company_record["creditors_act"]; $_POST['purchase_account'] = ''; // default/item's cogs account $_POST['payment_discount_account'] = $company_record['pyt_discount_act']; } table_section_title(_("Basic Data")); text_row(_("Supplier Name:"), 'supp_name', null, 42, 40); text_row(_("Supplier Short Name:"), 'supp_ref', null, 30, 30); text_row(_("GSTNo:"), 'gst_no', null, 42, 40); link_row(_("Website:"), 'website', null, 35, 55); if ($supplier_id && !is_new_supplier($supplier_id) && (key_in_foreign_table($_POST['supplier_id'], 'supp_trans', 'supplier_id') || key_in_foreign_table($_POST['supplier_id'], 'purch_orders', 'supplier_id'))) { label_row(_("Supplier's Currency:"), $_POST['curr_code']); hidden('curr_code', $_POST['curr_code']); } else { currencies_list_row(_("Supplier's Currency:"), 'curr_code', null); } tax_groups_list_row(_("Tax Group:"), 'tax_group_id', null); text_row(_("Our Customer No:"), 'supp_account_no', null, 42, 40); table_section_title(_("Purchasing")); text_row(_("Bank Name/Account:"), 'bank_account', null, 42, 40); amount_row(_("Credit Limit:"), 'credit_limit', null); payment_terms_list_row(_("Payment Terms:"), 'payment_terms', null); // // tax_included option from supplier record is used directly in update_average_cost() function, // therefore we can't edit the option after any transaction waas done for the supplier. // if (is_new_supplier($supplier_id)) { check_row(_("Prices contain tax included:"), 'tax_included'); } else { hidden('tax_included'); label_row(_("Prices contain tax included:"), $_POST['tax_included'] ? _('Yes') : _('No')); } table_section_title(_("Accounts")); gl_all_accounts_list_row(_("Accounts Payable Account:"), 'payable_account', $_POST['payable_account']); gl_all_accounts_list_row(_("Purchase Account:"), 'purchase_account', $_POST['purchase_account'], false, false, _("Use Item Inventory/COGS Account")); gl_all_accounts_list_row(_("Purchase Discount Account:"), 'payment_discount_account', $_POST['payment_discount_account']); if (!$supplier_id) { table_section_title(_("Contact Data")); text_row(_("Phone Number:"), 'phone', null, 32, 30); text_row(_("Secondary Phone Number:"), 'phone2', null, 32, 30); } table_section(2); $dim = get_company_pref('use_dimension'); if ($dim >= 1) { table_section_title(_("Dimension")); 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); } table_section_title(_("Addresses")); textarea_row(_("Mailing Address:"), 'address', null, 35, 5); textarea_row(_("Physical Address:"), 'supp_address', null, 35, 5); table_section_title(_("General")); textarea_row(_("General Notes:"), 'notes', null, 35, 5); if ($supplier_id) { record_status_list_row(_("Supplier status:"), 'inactive'); } else { table_section_title(_("Contact Data")); text_row(_("Contact Person:"), 'contact', null, 42, 40); text_row(_("Fax Number:"), 'fax', null, 32, 30); email_row(_("E-mail:"), 'email', null, 35, 55); languages_list_row(_("Document Language:"), 'rep_lang', null, _('System default')); } end_outer_table(1); div_start('controls'); if ($supplier_id) { submit_center_first('submit', _("Update Supplier"), _('Update supplier data'), @$_REQUEST['popup'] ? true : 'default'); submit_return('select', get_post('supplier_id'), _("Select this supplier and return to document entry.")); submit_center_last('delete', _("Delete Supplier"), _('Delete supplier data if have been never used'), true); } else { submit_center('submit', _("Add New Supplier Details"), true, '', 'default'); } div_end(); }
shippers_list_row(tr("Default Shipping Company:"), 'default_ship_via', null); tax_groups_list_row(tr("Tax Group:"), 'tax_group_id', null, 31, 30); language_list_row(tr("Language"), 'lang_code', null, 31, 30); yesno_list_row(tr("Disable this Branch:"), 'disable_trans', null); echo "</table>"; echo "</td><td class='tableseparator'>"; // outer table echo "<table>"; table_section_title(tr("GL Accounts")); gl_all_accounts_list_row(tr("Sales Account:"), 'sales_account', $_POST['sales_account']); gl_all_accounts_list_row(tr("Sales Discount Account:"), 'sales_discount_account', $_POST['sales_discount_account']); gl_all_accounts_list_row(tr("Accounts Receivable Account:"), 'receivables_account', $_POST['receivables_account']); gl_all_accounts_list_row(tr("Prompt Payment Discount Account:"), 'payment_discount_account', $_POST['payment_discount_account']); table_section_title(tr("Addresses")); textarea_row(tr("Mailing Address:"), 'br_post_address', $_POST['br_post_address'], 35, 5); textarea_row(tr("Billing Address:"), 'br_address', $_POST['br_address'], 35, 5); end_table(); end_table(1); // outer table submit_add_or_update_center(isset($_POST['New'])); end_form(); end_page(); function check_branches() { $cust = $_POST['customer_id']; $branch = $_POST['branch_code']; if ($cust != "" && $branch != "") { $sql = "SELECT branch_code from cust_branch WHERE debtor_no={$cust} AND " . "branch_code={$branch} ORDER BY branch_code ASC"; $result = db_query($sql); $myrow = db_fetch_row($result); if ($myrow[0] == 0) {
set_focus('stock_id'); return false; } return true; } //------------------------------------------------------------------------------------ if (isset($_POST['release'])) { release_work_order($selected_id, $_POST['released_date'], $_POST['memo_']); display_note(tr("The work order has been released to manufacturing.")); hyperlink_no_params("search_work_orders.php", tr("Select another work order")); end_page(); exit; } //------------------------------------------------------------------------------------ start_form(); $myrow = get_work_order($selected_id); $_POST['released'] = $myrow["released"]; $_POST['memo_'] = ""; if (can_process($myrow)) { start_table($table_style2); label_row(tr("Work Order #:"), $selected_id); label_row(tr("Work Order Reference:"), $myrow["wo_ref"]); date_row(tr("Released Date") . ":", 'released_date'); textarea_row(tr("Memo:"), 'memo_', $_POST['memo_'], 40, 5); end_table(1); submit_center('release', tr("Release Work Order")); hidden('selected_id', $selected_id); hidden('stock_id', $myrow['stock_id']); } end_form(); end_page();
end_row(); } inactive_control_row($th); end_table(1); //------------------------------------------------------------------------------------------------- start_table(TABLESTYLE2); if ($selected_id != -1) { if ($Mode == 'Edit') { //editing an existing area $myrow = get_crm_category($selected_id); $_POST['name'] = $myrow["name"]; $_POST['type'] = $myrow["type"]; $_POST['subtype'] = $myrow["action"]; $_POST['description'] = $myrow["description"]; } hidden("selected_id", $selected_id); } if ($Mode == 'Edit' && $myrow['system']) { label_row(_("Contact Category Type:"), $_POST['type']); label_row(_("Contact Category Subtype:"), $_POST['subtype']); } else { // crm_category_type_list_row(_("Contact Category Type:"), 'type', null, _('Other')); text_row_ex(_("Contact Category Type:"), 'type', 30); text_row_ex(_("Contact Category Subtype:"), 'subtype', 30); } text_row_ex(_("Category Short Name:"), 'name', 30); textarea_row(_("Category Description:"), 'description', null, 60, 4); end_table(1); submit_add_or_update_center($selected_id == -1, '', 'both'); end_form(); end_page();
function voiding_controls() { global $selected_id; $not_implemented = array(ST_PURCHORDER, ST_SALESORDER, ST_SALESQUOTE, ST_COSTUPDATE); start_form(); start_table(TABLESTYLE_NOBORDER); start_row(); systypes_list_cells(_("Type:"), 'filterType', null, true, $not_implemented); if (list_updated('filterType')) { $selected_id = -1; } if (!isset($_POST['FromTransNo'])) { $_POST['FromTransNo'] = "1"; } if (!isset($_POST['ToTransNo'])) { $_POST['ToTransNo'] = "999999"; } ref_cells(_("from #:"), 'FromTransNo'); ref_cells(_("to #:"), 'ToTransNo'); submit_cells('ProcessSearch', _("Search"), '', '', 'default'); end_row(); end_table(1); $trans_ref = false; $sql = get_sql_for_view_transactions($_POST['filterType'], $_POST['FromTransNo'], $_POST['ToTransNo'], $trans_ref); if ($sql == "") { return; } $cols = array(_("#") => array('insert' => true, 'fun' => 'view_link'), _("Reference") => array('fun' => 'ref_view'), _("Date") => array('type' => 'date', 'fun' => 'date_view'), _("GL") => array('insert' => true, 'fun' => 'gl_view'), _("Select") => array('insert' => true, 'fun' => 'select_link')); $table =& new_db_pager('transactions', $sql, $cols); $table->width = "40%"; display_db_pager($table); start_table(TABLESTYLE2); if ($selected_id != -1) { hidden('trans_no', $selected_id); hidden('selected_id', $selected_id); } else { hidden('trans_no', ''); $_POST['memo_'] = ''; } label_row(_("Transaction #:"), $selected_id == -1 ? '' : $selected_id); date_row(_("Voiding Date:"), 'date_'); textarea_row(_("Memo:"), 'memo_', null, 30, 4); end_table(1); if (!isset($_POST['ProcessVoiding'])) { submit_center('ProcessVoiding', _("Void Transaction"), true, '', 'default'); } else { 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, '', 'default'); } else { display_warning(_("Are you sure you want to void this transaction ? This action cannot be undone."), 0, 1); br(); submit_center_first('ConfirmVoiding', _("Proceed"), '', true); submit_center_last('CancelVoiding', _("Cancel"), '', 'cancel'); } } end_form(); }
} // if unassembling, negate quantity if ($_POST['ProductionType'] == 0) { $_POST['quantity'] = -$_POST['quantity']; } $id = work_order_produce($_POST['selected_id'], $_POST['ref'], $_POST['quantity'], $_POST['date_'], $_POST['memo_'], $close_wo); meta_forward($_SERVER['PHP_SELF'], "AddedID={$id}"); } //------------------------------------------------------------------------------------- display_wo_details($_POST['selected_id']); //------------------------------------------------------------------------------------- start_form(); hidden('selected_id', $_POST['selected_id']); //hidden('WOReqQuantity', $_POST['WOReqQuantity']); if (!isset($_POST['quantity']) || $_POST['quantity'] == '') { $_POST['quantity'] = max($wo_details["units_reqd"] - $wo_details["units_issued"], 0); } start_table(); ref_row(tr("Reference:"), 'ref', references::get_next(29)); if (!isset($_POST['ProductionType'])) { $_POST['ProductionType'] = 1; } yesno_list_row(tr("Type:"), 'ProductionType', $_POST['ProductionType'], tr("Produce Finished Items"), tr("Return Items to Work Order")); text_row(tr("Quantity:"), 'quantity', $_POST['quantity'], 13, 15); date_row(tr("Date:"), 'date_'); textarea_row(tr("Memo:"), 'memo_', null, 40, 3); end_table(1); submit_center_first('Process', tr("Process")); submit_center_last('ProcessAndClose', tr("Process And Close Order")); end_form(); end_page();
rename($tmpname, BACKUP_PATH . $fname); display_notification(_("File uploaded to backup directory")); $Ajax->activate('backups'); } else { display_error(_("File was not uploaded into the system.")); } } else { display_error(_("Select backup file first.")); } } //------------------------------------------------------------------------------- start_form(true, true); start_outer_table(TABLESTYLE2); table_section(1); table_section_title(_("Create backup")); textarea_row(_("Comments:"), 'comments', null, 30, 8); compress_list_row(_("Compression:"), 'comp'); vertical_space("height='20px'"); submit_row('creat', _("Create Backup"), false, "colspan=2 align='center'", '', 'process'); table_section(2); table_section_title(_("Backup scripts maintenance")); start_row(); echo "<td style='padding-left:20px' align='left'>" . get_backup_file_combo() . "</td>"; echo "<td style='padding-left:20px' valign='top'>"; start_table(); submit_row('view', _("View Backup"), false, '', '', false); submit_row('download', _("Download Backup"), false, '', '', false); submit_row('restore', _("Restore Backup"), false, '', '', 'process'); submit_js_confirm('restore', _("You are about to restore database from backup file.\nDo you want to continue?")); submit_row('deldump', _("Delete Backup"), false, '', '', true); // don't use 'delete' name or IE js errors appear