本文整理汇总了PHP中get_trans_view_str函数的典型用法代码示例。如果您正苦于以下问题:PHP get_trans_view_str函数的具体用法?PHP get_trans_view_str怎么用?PHP get_trans_view_str使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_trans_view_str函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: view_link
function view_link($trans)
{
if (!isset($trans['type'])) {
$trans['type'] = $_POST['filterType'];
}
return get_trans_view_str($trans["type"], $trans["trans_no"]);
}
示例2: render
function render($id, $title)
{
global $path_to_root, $systypes_array;
include_once $path_to_root . "/includes/ui.inc";
$start_date = add_days(Today(), -$this->days_past);
$end_date = add_days(Today(), $this->days_future);
$result = get_bank_trans_for_bank_account($this->bank_act, $start_date, $end_date);
start_table(TABLESTYLE, 'width=98%');
$th = array(_("#"), _("Date"), _("Receipt"), _("Payment"), _("Balance"), _("Person/Item"), _("Memo"), "");
table_header($th);
$bfw = get_balance_before_for_bank_account($this->bank_act, $start_date);
$credit = $debit = 0;
start_row("class='inquirybg' style='font-weight:bold'");
label_cell(_("Opening Balance") . " - " . $start_date, "colspan=4");
display_debit_or_credit_cells($bfw);
label_cell("");
label_cell("", "colspan=2");
end_row();
$running_total = $bfw;
if ($bfw > 0) {
$debit += $bfw;
} else {
$credit += $bfw;
}
$j = 1;
$k = 0;
//row colour counter
while ($myrow = db_fetch($result)) {
alt_table_row_color($k);
$running_total += $myrow["amount"];
label_cell(get_trans_view_str($myrow["type"], $myrow["trans_no"]));
$trandate = sql2date($myrow["trans_date"]);
label_cell($trandate);
display_debit_or_credit_cells($myrow["amount"]);
amount_cell($running_total);
label_cell(payment_person_name($myrow["person_type_id"], $myrow["person_id"]));
label_cell(get_comments_string($myrow["type"], $myrow["trans_no"]));
label_cell(get_gl_view_str($myrow["type"], $myrow["trans_no"]));
end_row();
if ($myrow["amount"] > 0) {
$debit += $myrow["amount"];
} else {
$credit += $myrow["amount"];
}
if ($j == 12) {
$j = 1;
table_header($th);
}
$j++;
}
//end of while loop
start_row("class='inquirybg' style='font-weight:bold'");
label_cell(_("Ending Balance") . " - " . $end_date, "colspan=4");
amount_cell($debit + $credit);
label_cell("");
label_cell("", "colspan=2");
end_row();
end_table(2);
}
示例3: display_wo_production
function display_wo_production($prod_id)
{
$myrow = get_work_order_produce($prod_id);
br(1);
start_table(TABLESTYLE);
$th = array(_("Production #"), _("Reference"), _("For Work Order #"), _("Item"), _("Quantity Manufactured"), _("Date"));
table_header($th);
start_row();
label_cell($myrow["id"]);
label_cell($myrow["reference"]);
label_cell(get_trans_view_str(ST_WORKORDER, $myrow["workorder_id"]));
label_cell($myrow["stock_id"] . " - " . $myrow["StockDescription"]);
qty_cell($myrow["quantity"], false, get_qty_dec($myrow["stock_id"]));
label_cell(sql2date($myrow["date_"]));
end_row();
comments_display_row(ST_MANURECEIVE, $prod_id);
end_table(1);
is_voided_display(ST_MANURECEIVE, $prod_id, _("This production has been voided."));
}
示例4: display_wo_production
function display_wo_production($prod_id)
{
global $table_style;
$myrow = get_work_order_produce($prod_id);
start_table($table_style);
$th = array(tr("Production #"), tr("Reference"), tr("For Work Order #"), tr("Item"), tr("Quantity Manufactured"), tr("Date"));
table_header($th);
start_row();
label_cell($myrow["id"]);
label_cell($myrow["reference"]);
label_cell(get_trans_view_str(systypes::work_order(), $myrow["workorder_id"]));
label_cell($myrow["stock_id"] . " - " . $myrow["StockDescription"]);
qty_cell($myrow["quantity"]);
label_cell(sql2date($myrow["date_"]));
end_row();
comments_display_row(29, $prod_id);
end_table(1);
is_voided_display(29, $prod_id, tr("This production has been voided."));
}
示例5: display_wo_issue
function display_wo_issue($issue_no)
{
$myrow = get_work_order_issue($issue_no);
br(1);
start_table(TABLESTYLE);
$th = array(_("Issue #"), _("Reference"), _("For Work Order #"), _("Item"), _("From Location"), _("To Work Centre"), _("Date of Issue"));
table_header($th);
start_row();
label_cell($myrow["issue_no"]);
label_cell($myrow["reference"]);
label_cell(get_trans_view_str(ST_WORKORDER, $myrow["workorder_id"]));
label_cell($myrow["stock_id"] . " - " . $myrow["description"]);
label_cell($myrow["location_name"]);
label_cell($myrow["WorkCentreName"]);
label_cell(sql2date($myrow["issue_date"]));
end_row();
comments_display_row(28, $issue_no);
end_table(1);
is_voided_display(28, $issue_no, _("This issue has been voided."));
}
示例6: render
function render($id, $title)
{
global $path_to_root;
include_once $path_to_root . "/includes/ui.inc";
if (!defined('FLOAT_COMP_DELTA')) {
define('FLOAT_COMP_DELTA', 0.004);
}
$today = date2sql(Today());
$sql = "SELECT trans.trans_no, trans.reference, trans.tran_date, trans.due_date, debtor.debtor_no,\n debtor.name, branch.br_name, debtor.curr_code,\n (trans.ov_amount + trans.ov_gst + trans.ov_freight\n + trans.ov_freight_tax + trans.ov_discount) AS total,\n (trans.ov_amount + trans.ov_gst + trans.ov_freight\n + trans.ov_freight_tax + trans.ov_discount - trans.alloc) AS remainder,\n DATEDIFF('{$today}', trans.due_date) AS days\n FROM " . TB_PREF . "debtor_trans as trans, " . TB_PREF . "debtors_master as debtor,\n " . TB_PREF . "cust_branch as branch\n WHERE debtor.debtor_no = trans.debtor_no AND trans.branch_code = branch.branch_code\n AND trans.type = " . ST_SALESINVOICE . " AND (trans.ov_amount + trans.ov_gst + trans.ov_freight\n + trans.ov_freight_tax + trans.ov_discount - trans.alloc) > " . FLOAT_COMP_DELTA . "\n AND DATEDIFF('{$today}', trans.due_date) > 0 ORDER BY days DESC";
if ($this->data_filter != '') {
$sql .= ' AND ' . $this->data_filter;
}
$result = db_query($sql);
$title = db_num_rows($result) . _(" Overdue Sales Invoices");
br(1);
display_heading($title);
br();
$th = array("#", _("Date"), _("Due Date"), _("Customer"), _("Currency"), _("Total"), _("Remainder"), _("Days"));
start_table(TABLESTYLE, "width=98%");
table_header($th);
$k = 0;
//row colour counter
while ($myrow = db_fetch($result)) {
alt_table_row_color($k);
label_cell(get_trans_view_str(ST_SALESINVOICE, $myrow["trans_no"]));
label_cell(sql2date($myrow['tran_date']));
label_cell(sql2date($myrow['due_date']));
$name = $myrow["debtor_no"] . " " . $myrow["name"];
label_cell($name);
label_cell($myrow['curr_code']);
amount_cell($myrow['total']);
amount_cell($myrow['remainder']);
label_cell($myrow['days'], "align='right'");
end_row();
}
end_table(1);
}
示例7: get_js_open_window
$js .= get_js_open_window(900, 500);
}
if ($use_date_picker) {
$js .= get_js_date_picker();
}
page(_($help_context = "Produce or Unassemble Finished Items From Work Order"), false, false, "", $js);
if (isset($_GET['trans_no']) && $_GET['trans_no'] != "") {
$_POST['selected_id'] = $_GET['trans_no'];
}
//--------------------------------------------------------------------------------------------------
if (isset($_GET['AddedID'])) {
include_once $path_to_root . "/reporting/includes/reporting.inc";
$id = $_GET['AddedID'];
$stype = ST_WORKORDER;
display_notification(_("The manufacturing process has been entered."));
display_note(get_trans_view_str($stype, $id, _("View this Work Order")));
display_note(get_gl_view_str($stype, $id, _("View the GL Journal Entries for this Work Order")), 1);
$ar = array('PARAM_0' => $_GET['date'], 'PARAM_1' => $_GET['date'], 'PARAM_2' => $stype);
display_note(print_link(_("Print the GL Journal Entries for this Work Order"), 702, $ar), 1);
hyperlink_no_params("search_work_orders.php", _("Select another &Work Order to Process"));
br();
end_page();
exit;
}
//--------------------------------------------------------------------------------------------------
$wo_details = get_work_order($_POST['selected_id']);
if (strlen($wo_details[0]) == 0) {
display_error(_("The order number sent is not valid."));
exit;
}
//--------------------------------------------------------------------------------------------------
示例8: display_grn_items_for_selection
function display_grn_items_for_selection()
{
global $table_style;
$result = get_grn_items(0, $_SESSION['supp_trans']->supplier_id, true);
if (db_num_rows($result) == 0) {
display_note(tr("There are no outstanding items received from this supplier that have not been invoiced by them."), 0, 1);
end_page();
exit;
}
/*Set up a table to show the outstanding GRN items for selection */
start_form(false, true);
display_heading2(tr("Items Received Yet to be Invoiced"));
start_table("{$table_style} colspan=7 width=95%");
$th = array(tr("Delivery"), tr("Sequence #"), tr("P.O."), tr("Item"), tr("Description"), tr("Received On"), tr("Quantity Received"), tr("Quantity Invoiced"), tr("Uninvoiced Quantity"), tr("Order Price"), tr("Total"));
table_header($th);
$i = $k = 0;
while ($myrow = db_fetch($result)) {
$grn_already_on_invoice = False;
foreach ($_SESSION['supp_trans']->grn_items as $entered_grn) {
if ($entered_grn->id == $myrow["id"]) {
$grn_already_on_invoice = True;
}
}
if ($grn_already_on_invoice == False) {
alt_table_row_color($k);
label_cell(get_trans_view_str(25, $myrow["grn_batch_id"]));
//text_cells(null, 'grn_item_id', $myrow["id"]);
submit_cells('grn_item_id', $myrow["id"]);
label_cell(get_trans_view_str(systypes::po(), $myrow["purch_order_no"]));
label_cell($myrow["item_code"]);
label_cell($myrow["description"]);
label_cell(sql2date($myrow["delivery_date"]));
qty_cell($myrow["qty_recd"]);
qty_cell($myrow["quantity_inv"]);
qty_cell($myrow["qty_recd"] - $myrow["quantity_inv"]);
amount_cell($myrow["unit_price"]);
amount_cell(round($myrow["unit_price"] * ($myrow["qty_recd"] - $myrow["quantity_inv"]), user_price_dec()));
end_row();
$i++;
if ($i > 15) {
$i = 0;
table_header($th);
}
}
}
end_table();
}
示例9: get_js_open_window
if ($use_popup_windows) {
$js .= get_js_open_window(900, 500);
}
if ($use_date_picker) {
$js .= get_js_date_picker();
}
page(tr("Enter Supplier Invoice"), false, false, "", $js);
//----------------------------------------------------------------------------------------
check_db_has_suppliers(tr("There are no suppliers defined in the system."));
//---------------------------------------------------------------------------------------------------------------
if (isset($_GET['AddedID'])) {
$invoice_no = $_GET['AddedID'];
$trans_type = 20;
echo "<center>";
display_notification_centered(tr("Supplier invoice has been processed."));
display_note(get_trans_view_str($trans_type, $invoice_no, tr("View this Invoice")));
display_note(get_gl_view_str($trans_type, $invoice_no, tr("View the GL Journal Entries for this Invoice")), 1);
hyperlink_params($_SERVER['PHP_SELF'], tr("Enter Another Invoice"), "New=1");
display_footer_exit();
}
//--------------------------------------------------------------------------------------------------
if (isset($_GET['New'])) {
if (isset($_SESSION['supp_trans'])) {
unset($_SESSION['supp_trans']->grn_items);
unset($_SESSION['supp_trans']->gl_codes);
unset($_SESSION['supp_trans']);
}
//session_register("SuppInv");
session_register("supp_trans");
$_SESSION['supp_trans'] = new supp_trans();
$_SESSION['supp_trans']->is_invoice = true;
示例10: trans_view
function trans_view($trans)
{
return get_trans_view_str(ST_PURCHORDER, $trans["order_no"]);
}
示例11: view_link
function view_link($dummy, $order_no)
{
return get_trans_view_str(ST_WORKORDER, $order_no);
}
示例12: edit_allocations_for_transaction
function edit_allocations_for_transaction($type, $trans_no)
{
global $table_style;
start_form(false, true);
display_heading(sprintf(tr("Allocation of %s # %d"), systypes::name($_SESSION['alloc']->type), $_SESSION['alloc']->trans_no));
display_heading($_SESSION['alloc']->person_name);
display_heading2(tr("Date:") . " <b>" . $_SESSION['alloc']->date_ . "</b>");
display_heading2(tr("Total:") . " <b>" . price_format($_SESSION['alloc']->amount) . "</b>");
echo "<br>";
if (count($_SESSION['alloc']->allocs) > 0) {
start_table($table_style);
$th = array(tr("Transaction Type"), tr("#"), tr("Date"), tr("Due Date"), tr("Amount"), tr("Other Allocations"), tr("This Allocation"), tr("Left to Allocate"), "", "");
table_header($th);
$k = $counter = $total_allocated = 0;
foreach ($_SESSION['alloc']->allocs as $allocn_item) {
alt_table_row_color($k);
label_cell(systypes::name($allocn_item->type));
label_cell(get_trans_view_str($allocn_item->type, $allocn_item->type_no));
label_cell($allocn_item->date_, "align=right");
label_cell($allocn_item->due_date, "align=right");
amount_cell($allocn_item->amount);
amount_cell($allocn_item->amount_allocated);
if (!check_num('amount' . $counter)) {
$_POST['amount' . $counter] = price_format($allocn_item->current_allocated);
}
amount_cells(null, 'amount' . $counter, $_POST['amount' . $counter]);
$un_allocated = round($allocn_item->amount - $allocn_item->amount_allocated, 6);
hidden("un_allocated" . $counter, $un_allocated);
amount_cell($un_allocated);
label_cell("<a href='#' name=Alloc{$counter} onclick='allocate_all(this.name.substr(5));return true;'>" . tr("All") . "</a>");
label_cell("<a href='#' name=DeAll{$counter} onclick='allocate_none(this.name.substr(5));return true;'>" . tr("None") . "</a>");
end_row();
$total_allocated += input_num('amount' . $counter);
$counter++;
}
label_row(tr("Total Allocated"), price_format($total_allocated), "colspan=6 align=right", "nowrap align=right id='total_allocated'");
if ($_SESSION['alloc']->amount - $total_allocated < 0) {
$font1 = "<font color=red>";
$font2 = "</font>";
} else {
$font1 = $font2 = "";
}
$left_to_allocate = $_SESSION['alloc']->amount - $total_allocated;
$left_to_allocate = price_format($left_to_allocate);
label_row(tr("Left to Allocate"), $font1 . $left_to_allocate . $font2, "colspan=6 align=right ", "nowrap align=right id='left_to_allocate'");
end_table(1);
hidden('TotalNumberOfAllocs', $counter);
// hidden('left_to_allocate', $left_to_allocate);
submit_center_first('UpdateDisplay', tr("Update"));
submit('Process', tr("Process"));
} else {
display_note(tr("There are no unsettled transactions to allocate."), 0, 1);
}
submit_center_last('Cancel', tr("Back to Allocations"));
end_form();
}
示例13: display_allocatable_transactions
function display_allocatable_transactions()
{
global $table_style, $path_to_root;
start_form();
/* show all outstanding receipts and credits to be allocated */
/*Clear any previous allocation records */
if (isset($_SESSION['alloc'])) {
unset($_SESSION['alloc']->allocs);
unset($_SESSION['alloc']);
}
if (!isset($_POST['supplier_id'])) {
$_POST['supplier_id'] = get_global_supplier();
}
echo "<center>" . tr("Select a Supplier: ") . " ";
supplier_list('supplier_id', $_POST['supplier_id'], true, true);
echo "<br>";
check(tr("Show Settled Items:"), 'ShowSettled', null, true);
echo "</center><br><br>";
set_global_supplier($_POST['supplier_id']);
if (isset($_POST['supplier_id']) && $_POST['supplier_id'] == reserved_words::get_all()) {
unset($_POST['supplier_id']);
}
$settled = false;
if (check_value('ShowSettled')) {
$settled = true;
}
$supplier_id = null;
if (isset($_POST['supplier_id'])) {
$supplier_id = $_POST['supplier_id'];
}
$trans_items = get_allocatable_from_supp_transactions($supplier_id, $settled);
start_table($table_style);
if (!isset($_POST['supplier_id'])) {
$th = array(tr("Transaction Type"), tr("#"), tr("Reference"), tr("Date"), tr("Supplier"), tr("Currency"), tr("Total"), tr("Left To Allocate"));
} else {
$th = array(tr("Transaction Type"), tr("#"), tr("Reference"), tr("Date"), tr("Total"), tr("Left To Allocate"));
}
table_header($th);
$k = 0;
//row colour counter
$has_settled_items = false;
while ($myrow = db_fetch($trans_items)) {
if ($myrow["settled"] == 1) {
start_row("class='settledbg'");
$has_settled_items = true;
} else {
alt_table_row_color($k);
}
label_cell(systypes::name($myrow["type"]));
label_cell(get_trans_view_str($myrow["type"], $myrow["trans_no"]));
label_cell($myrow["reference"]);
label_cell(sql2date($myrow["tran_date"]));
if (!isset($_POST['supplier_id'])) {
label_cell($myrow["supp_name"]);
label_cell($myrow["curr_code"]);
}
amount_cell(-$myrow["Total"]);
amount_cell(-$myrow["Total"] - $myrow["alloc"]);
label_cell("<a href='{$path_to_root}/purchasing/allocations/supplier_allocate.php?trans_no=" . $myrow["trans_no"] . "&trans_type=" . $myrow["type"] . "'>" . tr("Allocate") . "</a>");
end_row();
}
end_table();
if ($has_settled_items) {
display_note(tr("Marked items are settled."), 0, 1, "class='settledfg'");
}
if (db_num_rows($trans_items) == 0) {
display_note(tr("There are no allocations to be done."), 1, 2);
}
end_form();
}
示例14: display_supplier_topten
function display_supplier_topten()
{
global $path_to_root;
$pg = new graph();
if (!defined('FLOAT_COMP_DELTA')) {
define('FLOAT_COMP_DELTA', 0.004);
}
$begin = begin_fiscalyear();
$today = Today();
$begin1 = date2sql($begin);
$today1 = date2sql($today);
$sql = "SELECT SUM((trans.ov_amount + trans.ov_discount) * rate) AS total, s.supplier_id, s.supp_name FROM\n\t\t\t" . TB_PREF . "supp_trans AS trans, " . TB_PREF . "suppliers AS s WHERE trans.supplier_id=s.supplier_id\n\t\t\tAND (trans.type = " . ST_SUPPINVOICE . " OR trans.type = " . ST_SUPPCREDIT . ")\n\t\t\tAND tran_date >= '{$begin1}' AND tran_date <= '{$today1}' GROUP by s.supplier_id ORDER BY total DESC, s.supplier_id \n\t\t\tLIMIT 10";
$result = db_query($sql);
$title = _("Top 10 suppliers in fiscal year");
br(2);
display_heading($title);
br();
$th = array(_("Supplier"), _("Amount"));
start_table(TABLESTYLE, "width=30%");
table_header($th);
$k = 0;
//row colour counter
$i = 0;
while ($myrow = db_fetch($result)) {
alt_table_row_color($k);
$name = $myrow["supplier_id"] . " " . $myrow["supp_name"];
label_cell($name);
amount_cell($myrow['total']);
$pg->x[$i] = $name;
$pg->y[$i] = $myrow['total'];
$i++;
end_row();
}
end_table(2);
$pg->title = $title;
$pg->axis_x = _("Supplier");
$pg->axis_y = _("Amount");
$pg->graphic_1 = $today;
$pg->type = 2;
$pg->skin = 1;
$pg->built_in = false;
$filename = company_path() . "/pdf_files/" . uniqid("") . ".png";
$pg->display($filename, true);
start_table(TABLESTYLE);
start_row();
echo "<td>";
echo "<img src='{$filename}' border='0' alt='{$title}'>";
echo "</td>";
end_row();
end_table(1);
$today = date2sql(Today());
$sql = "SELECT trans.trans_no, trans.reference, trans.tran_date, trans.due_date, s.supplier_id, \n\t\t\ts.supp_name, s.curr_code,\n\t\t\t(trans.ov_amount + trans.ov_gst + trans.ov_discount) AS total, \n\t\t\t(trans.ov_amount + trans.ov_gst + trans.ov_discount - trans.alloc) AS remainder,\n\t\t\tDATEDIFF('{$today}', trans.due_date) AS days \t\n\t\t\tFROM " . TB_PREF . "supp_trans as trans, " . TB_PREF . "suppliers as s \n\t\t\tWHERE s.supplier_id = trans.supplier_id\n\t\t\t\tAND trans.type = " . ST_SUPPINVOICE . " AND (ABS(trans.ov_amount + trans.ov_gst + \n\t\t\t\t\ttrans.ov_discount) - trans.alloc) > " . FLOAT_COMP_DELTA . "\n\t\t\t\tAND DATEDIFF('{$today}', trans.due_date) > 0 ORDER BY days DESC";
$result = db_query($sql);
$title = db_num_rows($result) . _(" overdue Purchase Invoices");
br(1);
display_heading($title);
br();
$th = array("#", _("Ref."), _("Date"), _("Due Date"), _("Supplier"), _("Currency"), _("Total"), _("Remainder"), _("Days"));
start_table(TABLESTYLE);
table_header($th);
$k = 0;
//row colour counter
while ($myrow = db_fetch($result)) {
alt_table_row_color($k);
label_cell(get_trans_view_str(ST_SUPPINVOICE, $myrow["trans_no"]));
label_cell($myrow['reference']);
label_cell(sql2date($myrow['tran_date']));
label_cell(sql2date($myrow['due_date']));
$name = $myrow["supplier_id"] . " " . $myrow["supp_name"];
label_cell($name);
label_cell($myrow['curr_code']);
amount_cell($myrow['total']);
amount_cell($myrow['remainder']);
label_cell($myrow['days'], "align='right'");
end_row();
}
end_table(2);
}
示例15: get_js_open_window
if ($use_popup_windows) {
$js .= get_js_open_window(900, 500);
}
if ($use_date_picker) {
$js .= get_js_date_picker();
}
page(_($help_context = "Supplier Credit Note"), false, false, "", $js);
//----------------------------------------------------------------------------------------
check_db_has_suppliers(_("There are no suppliers defined in the system."));
//---------------------------------------------------------------------------------------------------------------
if (isset($_GET['AddedID'])) {
$invoice_no = $_GET['AddedID'];
$trans_type = ST_SUPPCREDIT;
echo "<center>";
display_notification_centered(_("Supplier credit note has been processed."));
display_note(get_trans_view_str($trans_type, $invoice_no, _("View this Credit Note")));
display_note(get_gl_view_str($trans_type, $invoice_no, _("View the GL Journal Entries for this Credit Note")), 1);
hyperlink_params($_SERVER['PHP_SELF'], _("Enter Another Credit Note"), "New=1");
hyperlink_params("{$path_to_root}/admin/attachments.php", _("Add an Attachment"), "filterType={$trans_type}&trans_no={$invoice_no}");
display_footer_exit();
}
//---------------------------------------------------------------------------------------------------
if (isset($_GET['New'])) {
if (isset($_SESSION['supp_trans'])) {
unset($_SESSION['supp_trans']->grn_items);
unset($_SESSION['supp_trans']->gl_codes);
unset($_SESSION['supp_trans']);
}
$_SESSION['supp_trans'] = new supp_trans(ST_SUPPCREDIT);
if (isset($_GET['invoice_no'])) {
$_SESSION['supp_trans']->supp_reference = $_POST['invoice_no'] = $_GET['invoice_no'];