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 display_controls() { global $table_style2; start_form(false, true); if (!isset($_POST['supplier_id'])) { $_POST['supplier_id'] = get_global_supplier(false); } if (!isset($_POST['DatePaid'])) { $_POST['DatePaid'] = Today(); 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>"; bank_accounts_list_row(tr("From Bank Account:"), 'bank_account', null, true); amount_row(tr("Amount of Payment:"), 'amount'); amount_row(tr("Amount of Discount:"), 'discount'); date_row(tr("Date Paid") . ":", 'DatePaid'); echo "</table>"; echo "</td><td valign=top class='tableseparator'>"; // outer table echo "<table>"; supplier_list_row(tr("Payment To:"), 'supplier_id', null, false, true); set_global_supplier($_POST['supplier_id']); $supplier_currency = get_supplier_currency($_POST['supplier_id']); $bank_currency = get_bank_account_currency($_POST['bank_account']); if ($bank_currency != $supplier_currency) { exchange_rate_display($bank_currency, $supplier_currency, $_POST['DatePaid']); } bank_trans_types_list_row(tr("Payment Type:"), 'PaymentType', null); ref_row(tr("Reference:"), 'ref', references::get_next(22)); text_row(tr("Memo:"), 'memo_', null, 52, 50); echo "</table>"; echo "</td></tr>"; end_table(1); // outer table submit_center('ProcessSuppPayment', tr("Enter Payment")); if ($bank_currency != $supplier_currency) { display_note(tr("The amount and discount are in the bank account's currency."), 2, 0); } 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 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();
} if (list_updated('customer_id') || $new && list_updated('bank_account')) { $_SESSION['alloc']->set_person($_POST['customer_id'], PT_CUSTOMER); $_SESSION['alloc']->read(); $_POST['memo_'] = $_POST['amount'] = $_POST['discount'] = ''; $Ajax->activate('alloc_tbl'); } read_customer_data(); set_global_customer($_POST['customer_id']); if (isset($_POST['HoldAccount']) && $_POST['HoldAccount'] != 0) { display_warning(_("This customer account is on hold.")); } $display_discount_percent = percent_format($_POST['pymt_discount'] * 100) . "%"; table_section(2); date_row(_("Date of Deposit:"), 'DateBanked', '', true, 0, 0, 0, null, true); ref_row(_("Reference:"), 'ref', '', null, '', ST_CUSTPAYMENT); table_section(3); $comp_currency = get_company_currency(); $cust_currency = $_SESSION['alloc']->set_person($_POST['customer_id'], PT_CUSTOMER); if (!$cust_currency) { $cust_currency = $comp_currency; } $_SESSION['alloc']->currency = $bank_currency = get_bank_account_currency($_POST['bank_account']); if ($cust_currency != $bank_currency) { amount_row(_("Payment Amount:"), 'bank_amount', null, '', $bank_currency); } amount_row(_("Bank Charge:"), 'charge', null, '', $bank_currency); end_outer_table(1); div_start('alloc_tbl'); show_allocatable(false); div_end();
if (list_updated('supplier_id') || list_updated('bank_account')) { $_SESSION['alloc']->read(); $_POST['memo_'] = $_POST['amount'] = ''; $Ajax->activate('alloc_tbl'); } set_global_supplier($_POST['supplier_id']); if (!list_updated('bank_account') && !get_post('__ex_rate_changed')) { $_POST['bank_account'] = get_default_supplier_bank_account($_POST['supplier_id']); } else { $_POST['amount'] = price_format(0); } bank_accounts_list_row(_("From Bank Account:"), 'bank_account', null, true); bank_balance_row($_POST['bank_account']); table_section(2); date_row(_("Date Paid") . ":", 'DatePaid', '', true, 0, 0, 0, null, true); ref_row(_("Reference:"), 'ref', '', $Refs->get_next(ST_SUPPAYMENT)); table_section(3); $comp_currency = get_company_currency(); $supplier_currency = $_SESSION['alloc']->set_person($_POST['supplier_id'], PT_SUPPLIER); if (!$supplier_currency) { $supplier_currency = $comp_currency; } $_SESSION['alloc']->currency = $bank_currency = get_bank_account_currency($_POST['bank_account']); if ($bank_currency != $supplier_currency) { amount_row(_("Bank Amount:"), 'bank_amount', null, '', $bank_currency); } amount_row(_("Bank Charge:"), 'charge', null, '', $bank_currency); end_outer_table(1); div_start('alloc_tbl'); show_allocatable(false); div_end();
if ($_POST['ProductionType'] == 0) { $_POST['quantity'] = -$_POST['quantity']; } $id = work_order_produce($_POST['selected_id'], $_POST['ref'], input_num('quantity'), $_POST['date_'], $_POST['memo_'], $close_wo); meta_forward($_SERVER['PHP_SELF'], "AddedID=" . $_POST['selected_id'] . "&date=" . $_POST['date_']); } //------------------------------------------------------------------------------------- display_wo_details($_POST['selected_id']); //------------------------------------------------------------------------------------- start_form(); hidden('selected_id', $_POST['selected_id']); //hidden('WOReqQuantity', $_POST['WOReqQuantity']); $dec = get_qty_dec($wo_details["stock_id"]); if (!isset($_POST['quantity']) || $_POST['quantity'] == '') { $_POST['quantity'] = qty_format(max($wo_details["units_reqd"] - $wo_details["units_issued"], 0), $wo_details["stock_id"], $dec); } start_table(TABLESTYLE2); br(); ref_row(_("Reference:"), 'ref', '', $Refs->get_next(29)); if (!isset($_POST['ProductionType'])) { $_POST['ProductionType'] = 1; } yesno_list_row(_("Type:"), 'ProductionType', $_POST['ProductionType'], _("Produce Finished Items"), _("Return Items to Work Order")); small_qty_row(_("Quantity:"), 'quantity', null, null, null, $dec); date_row(_("Date:"), 'date_'); textarea_row(_("Memo:"), 'memo_', null, 40, 3); end_table(1); submit_center_first('Process', _("Process"), '', 'default'); submit_center_last('ProcessAndClose', _("Process And Close Order"), '', true); end_form(); end_page();
$_POST['units_issued'] = $myrow["units_issued"]; $_POST['Costs'] = price_format($myrow["additional_costs"]); $_POST['memo_'] = get_comments_string(ST_WORKORDER, $selected_id); hidden('wo_ref', $_POST['wo_ref']); hidden('units_issued', $_POST['units_issued']); hidden('released', $_POST['released']); hidden('released_date', $_POST['released_date']); hidden('selected_id', $selected_id); hidden('old_qty', $myrow["units_reqd"]); hidden('old_stk_id', $myrow["stock_id"]); label_row(_("Reference:"), $_POST['wo_ref']); label_row(_("Type:"), $wo_types_array[$_POST['type']]); hidden('type', $myrow["type"]); } else { $_POST['units_issued'] = $_POST['released'] = 0; ref_row(_("Reference:"), 'wo_ref', '', $Refs->get_next(ST_WORKORDER)); wo_types_list_row(_("Type:"), 'type', null); } if (get_post('released')) { hidden('stock_id', $_POST['stock_id']); hidden('StockLocation', $_POST['StockLocation']); hidden('type', $_POST['type']); label_row(_("Item:"), $myrow["StockItemName"]); label_row(_("Destination Location:"), $myrow["location_name"]); } else { stock_manufactured_items_list_row(_("Item:"), 'stock_id', null, false, true); if (list_updated('stock_id')) { $Ajax->activate('quantity'); } locations_list_row(_("Destination Location:"), 'StockLocation', null); }
page(_($help_context = "Forms Setup")); include $path_to_root . "/includes/ui.inc"; //------------------------------------------------------------------------------------------------- if (isset($_POST['setprefs'])) { $systypes = get_systypes(); begin_transaction(); while ($type = db_fetch($systypes)) { save_next_reference($type["type_id"], $_POST['id' . $type["type_id"]]); } commit_transaction(); display_notification_centered(_("Forms settings have been updated.")); } start_form(); start_outer_table(TABLESTYLE2); $systypes = get_systypes(); table_section(1); $th = array(_("Form"), _("Next Reference")); table_header($th); $i = 0; while ($type = db_fetch($systypes)) { if ($i++ == ST_CUSTCREDIT) { table_section(2); table_header($th); } ref_row($systypes_array[$type["type_id"]], 'id' . $type["type_id"], '', $type["next_reference"]); } end_outer_table(1); submit_center('setprefs', _("Update"), true, '', 'default'); end_form(2); //------------------------------------------------------------------------------------------------- end_page();
<?php $page_security = 10; $path_to_root = ".."; include $path_to_root . "/includes/session.inc"; page(tr("Forms Setup")); include $path_to_root . "/includes/ui.inc"; //------------------------------------------------------------------------------------------------- if (isset($_POST['setprefs'])) { $systypes = get_systypes(); begin_transaction(); while ($type = db_fetch($systypes)) { save_next_reference($type["type_id"], $_POST['id' . $type["type_id"]]); } commit_transaction(); display_notification_centered(tr("Forms settings have been updated.")); } start_form(); start_table("class='tablestyle'"); $systypes = get_systypes(); $th = array(tr("Form"), tr("Next Reference")); table_header($th); while ($type = db_fetch($systypes)) { ref_row(systypes::name($type["type_id"]), 'id' . $type["type_id"], $type["next_reference"]); } end_table(1); submit_center('setprefs', tr("Update")); end_form(2); //------------------------------------------------------------------------------------------------- end_page();
$_POST['type_'] = $myrow["type_"]; $_POST['date_'] = sql2date($myrow["date_"]); $_POST['due_date'] = sql2date($myrow["due_date"]); $_POST['memo_'] = get_comments_string(ST_DIMENSION, $selected_id); $tags_result = get_tags_associated_with_record(TAG_DIMENSION, $selected_id); $tagids = array(); while ($tag = db_fetch($tags_result)) { $tagids[] = $tag['id']; } $_POST['dimension_tags'] = $tagids; hidden('ref', $_POST['ref']); label_row(_("Dimension Reference:"), $_POST['ref']); hidden('selected_id', $selected_id); } else { $_POST['dimension_tags'] = array(); ref_row(_("Dimension Reference:"), 'ref', '', $Refs->get_next(ST_DIMENSION)); } text_row_ex(_("Name") . ":", 'name', 50, 75); $dim = get_company_pref('use_dimension'); number_list_row(_("Type"), 'type_', null, 1, $dim); date_row(_("Start Date") . ":", 'date_'); date_row(_("Date Required By") . ":", 'due_date', '', null, $SysPrefs->default_dimension_required_by()); tag_list_row(_("Tags:"), 'dimension_tags', 5, TAG_DIMENSION, true); textarea_row(_("Memo:"), 'memo_', null, 40, 5); end_table(1); if (isset($_POST['closed']) && $_POST['closed'] == 1) { display_note(_("This Dimension is closed."), 0, 0, "class='currentfg'"); } if ($selected_id != -1) { echo "<br>"; submit_center_first('UPDATE_ITEM', _("Update"), _('Save changes to dimension'), 'default');
$_POST['memo_'] = ""; $_POST['units_issued'] = $myrow["units_issued"]; $_POST['Costs'] = price_format($myrow["Costs"]); $_POST['memo_'] = get_comments_string(systypes::work_order(), $selected_id); hidden('wo_ref', $_POST['wo_ref']); hidden('units_issued', $_POST['units_issued']); hidden('released', $_POST['released']); hidden('released_date', $_POST['released_date']); hidden('selected_id', $selected_id); hidden('old_qty', $myrow["units_reqd"]); hidden('old_stk_id', $myrow["stock_id"]); label_row(tr("Reference:"), $_POST['wo_ref']); label_row(tr("Type:"), wo_types::name($_POST['type'])); } else { $_POST['units_issued'] = $_POST['released'] = 0; ref_row(tr("Reference:"), 'wo_ref', references::get_next(systypes::work_order())); wo_types_list_row(tr("Type:"), 'type', $_POST['type']); } if ($_POST['released'] == true) { hidden('stock_id', $_POST['stock_id']); hidden('StockLocation', $_POST['StockLocation']); hidden('type', $_POST['type']); label_row(tr("Item:"), $myrow["StockItemName"]); label_row(tr("Destination Location:"), $myrow["location_name"]); } else { stock_manufactured_items_list_row(tr("Item:"), 'stock_id', null); locations_list_row(tr("Destination Location:"), 'StockLocation', null); } if (!isset($_POST['quantity'])) { $_POST['quantity'] = qty_format(1); }
if ($myrow["closed"] == 1) { display_error(tr("This dimension is closed and cannot be edited.")); exit; } $_POST['ref'] = $myrow["reference"]; $_POST['closed'] = $myrow["closed"]; $_POST['name'] = $myrow["name"]; $_POST['type_'] = $myrow["type_"]; $_POST['date_'] = sql2date($myrow["date_"]); $_POST['due_date'] = sql2date($myrow["due_date"]); $_POST['memo_'] = get_comments_string(systypes::dimension(), $selected_id); hidden('ref', $_POST['ref']); label_row(tr("Dimension Reference:"), $_POST['ref']); hidden('selected_id', $selected_id); } else { ref_row(tr("Dimension Reference:"), 'ref', references::get_next(systypes::dimension())); } text_row_ex(tr("Name") . ":", 'name', 50, 75); $dim = get_company_pref('use_dimension'); number_list_row(tr("Type"), 'type_', null, 1, $dim); date_row(tr("Start Date") . ":", 'date_'); date_row(tr("Date Required By") . ":", 'due_date', null, sys_prefs::default_dimension_required_by()); textarea_row(tr("Memo:"), 'memo_', null, 40, 5); end_table(1); submit_add_or_update_center($selected_id == -1); if ($selected_id != -1) { echo "<br>"; submit_center_first('close', tr("Close This Dimension")); submit_center_last('delete', tr("Delete This Dimension")); } end_form();
if ($result) { while ($row = db_fetch($result)) { if ($row['amount'] == 0) { continue; } $date = $row['tran_date']; $cart->add_gl_item($row['account'], $row['dimension_id'], $row['dimension2_id'], $row['amount'], $row['memo_']); } } $customer_error = false; div_start('pmt_header'); start_outer_table(TABLESTYLE2, "width=80%"); // outer table table_section(1); date_row(_("Date:"), 'date_', '', true, 0, 0, 0, null, true); ref_row(_("Reference:"), 'ref', ''); /*===============================MOODLEARNING===============================*/ text_row(_("Check Voucher No."), 'cv_no'); text_row(_("Check No."), 'check_num'); hidden('tno', $_GET['trans_no']); /*======================================================================================================*/ table_section(2, "50%"); if (!isset($_POST['PayType'])) { if (isset($_GET['PayType'])) { $_POST['PayType'] = $_GET['PayType']; } else { $_POST['PayType'] = ""; } } if (!isset($_POST['person_id'])) { if (isset($_GET['PayPerson'])) {