function check_paths() { if (!file_exists(BACKUP_PATH)) { display_error(_("Backup paths have not been set correctly.") . _("Please contact System Administrator.") . "<br>" . _("cannot find backup directory") . " - " . BACKUP_PATH . "<br>"); end_page(); exit; } }
function safe_exit() { global $path_to_root; hyperlink_no_params("", tr("Enter a new dimension")); echo "<br>"; hyperlink_no_params($path_to_root . "/dimensions/inquiry/search_dimensions.php", tr("Select an existing dimension")); echo "<br><br>"; end_page(); exit; }
function safe_exit() { global $path_to_root; hyperlink_no_params("", tr("Enter a new work order")); hyperlink_no_params("search_work_orders.php", tr("Select an existing work order")); echo "<br>"; end_form(); end_page(); exit; }
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(); }
} if (!isset($installed_extensions)) { $installed_extensions = array(); update_extensions($installed_extensions); } subpage_title(_('Company Settings')); start_table(TABLESTYLE); text_row_ex(_("Company Name:"), 'name', 30); text_row_ex(_("Admin Login:"******"Admin Password:"******"Reenter Password:"******"Select Chart of Accounts:"), 'coa'); languages_list_row(_("Select Default Language:"), 'lang'); end_table(1); submit_center_first('back', _('<< Back')); submit_center_last('set_admin', _('Continue >>')); break; case '6': // final screen subpage_title(_('SerbizHub Suite ERP has been installed successsfully.')); display_note(_('Please do not forget to remove install wizard folder.')); session_unset(); session_destroy(); hyperlink_no_params($path_to_root . '/index.php', _('Click here to start.')); break; } hidden('Tests'); hidden('Page'); end_form(1); end_page(false, false, true);
label_cell(get_trans_view_str(ST_SUPPRECEIVE, $myrow["id"])); label_cell($myrow["reference"]); label_cell(sql2date($myrow["delivery_date"])); end_row(); } end_table(); } $invoice_result = get_po_invoices_credits($_GET['trans_no']); $k = 0; if (db_num_rows($invoice_result) > 0) { echo "</td><td valign=top>"; // outer table display_heading2(_("Invoices/Credits")); start_table(TABLESTYLE); $th = array(_("#"), _("Date"), _("Total")); table_header($th); while ($myrow = db_fetch($invoice_result)) { alt_table_row_color($k); label_cell(get_trans_view_str($myrow["type"], $myrow["trans_no"])); label_cell(sql2date($myrow["tran_date"])); amount_cell($myrow["Total"]); end_row(); } end_table(); } echo "</td></tr>"; end_table(1); // outer table //---------------------------------------------------------------------------------------------------- end_page(true, false, false, ST_PURCHORDER, $_GET['trans_no']);
display_heading("<font color=red>" . _("SUPPLIER CREDIT NOTE") . " # " . $trans_no . "</font>"); echo "<br>"; start_table(TABLESTYLE, "width=95%"); start_row(); label_cells(_("Supplier"), $supp_trans->supplier_name, "class='tableheader2'"); label_cells(_("Reference"), $supp_trans->reference, "class='tableheader2'"); label_cells(_("Supplier's Reference"), $supp_trans->supp_reference, "class='tableheader2'"); end_row(); start_row(); label_cells(_("Invoice Date"), $supp_trans->tran_date, "class='tableheader2'"); label_cells(_("Due Date"), $supp_trans->due_date, "class='tableheader2'"); label_cells(_("Currency"), get_supplier_currency($supp_trans->supplier_id), "class='tableheader2'"); end_row(); comments_display_row(ST_SUPPCREDIT, $trans_no); end_table(1); $total_gl = display_gl_items($supp_trans, 3); $total_grn = display_grn_items($supp_trans, 2); $display_sub_tot = number_format2($total_gl + $total_grn, user_price_dec()); start_table(TABLESTYLE, "width=95%"); label_row(_("Sub Total"), $display_sub_tot, "align=right", "nowrap align=right width=17%"); $tax_items = get_trans_tax_details(ST_SUPPCREDIT, $trans_no); display_supp_trans_tax_details($tax_items, 1); $display_total = number_format2(-($supp_trans->ov_amount + $supp_trans->ov_gst), user_price_dec()); label_row("<font color=red>" . _("TOTAL CREDIT NOTE") . "</font", "<font color=red>{$display_total}</font>", "colspan=1 align=right", "nowrap align=right"); end_table(1); $voided = is_voided_display(ST_SUPPCREDIT, $trans_no, _("This credit note has been voided.")); if (!$voided) { display_allocations_from(PT_SUPPLIER, $supp_trans->supplier_id, ST_SUPPCREDIT, $trans_no, -($supp_trans->ov_amount + $supp_trans->ov_gst)); } end_page(true, false, false, ST_SUPPCREDIT, $trans_no);
} label_cells(_("Amount"), number_format2(-$receipt['bank_amount'], user_price_dec()), "class='tableheader2'"); if ($receipt['ov_discount'] != 0) { label_cells(_("Discount"), number_format2(-$receipt['ov_discount'] * $receipt['rate'], user_price_dec()), "class='tableheader2'"); } else { label_cells(_("Payment Type"), $bank_transfer_types[$receipt['BankTransType']], "class='tableheader2'"); } end_row(); start_row(); if ($show_currencies) { label_cells(_("Supplier's Currency"), $receipt['curr_code'], "class='tableheader2'"); } if ($show_both_amounts) { label_cells(_("Amount"), number_format2(-$receipt['Total'], user_price_dec()), "class='tableheader2'"); } label_cells(_("Reference"), $receipt['ref'], "class='tableheader2'"); end_row(); if ($receipt['ov_discount'] != 0) { start_row(); label_cells(_("Payment Type"), $bank_transfer_types[$receipt['BankTransType']], "class='tableheader2'"); end_row(); } comments_display_row(ST_SUPPAYMENT, $trans_no); end_table(1); $voided = is_voided_display(ST_SUPPAYMENT, $trans_no, _("This payment has been voided.")); // now display the allocations for this payment if (!$voided) { display_allocations_from(PT_SUPPLIER, $receipt['supplier_id'], ST_SUPPAYMENT, $trans_no, -$receipt['Total']); } end_page(true, false, false, ST_SUPPAYMENT, $trans_no);
$view_data['rights'] = $rights->get_list(); $cond = array(); if ($rights_id !== false) { $cond['rights_id'] = $rights_id; } //order added by longbill if ($_GET['order'] && $_GET['asc']) { $cond['order'] = $_GET['order'] . ' asc'; } else { if ($_GET['order']) { $cond['order'] = $_GET['order'] . ' desc'; } else { $cond['order'] = $admin->id . ' DESC'; } } if (is_array($_GET['search'])) { foreach ($_GET['search'] as $key => $val) { $val = str_replace('*', '%', $val); $cond['where'] = " `{$key}` LIKE '%" . mysql_escape_string($val) . "%' "; } } $admins = end_page($admin, $cond, intval($config['admin_admin_page_size']) ? intval($config['admin_admin_page_size']) : 20); $_rights = array(); foreach ($view_data['rights'] as $val) { $_rights[$val['rights_id']] = $val['name']; } for ($i = 0; $i < count($admins); $i++) { $admins[$i]['rights_group_name'] = $_rights[$admins[$i]['rights_id']] ? $_rights[$admins[$i]['rights_id']] : lang('DEFAULT_RIGHTS_GROUP'); } $view_data['admins'] = $admins; $view_data['rights_id'] = $rights_id === false ? -1 : $rights_id;
$display_discount = percent_format($myrow2["discount_percent"] * 100) . "%"; } label_cell($myrow2["stock_id"]); label_cell($myrow2["StockDescription"]); qty_cell($myrow2["quantity"], false, get_qty_dec($myrow2["stock_id"])); label_cell($myrow2["units"], "align=right"); amount_cell($myrow2["unit_price"]); label_cell($display_discount, "nowrap align=right"); amount_cell($value); end_row(); } //end while there are line items to print out $display_sub_tot = price_format($sub_total); label_row(_("Sub-total"), $display_sub_tot, "colspan=6 align=right", "nowrap align=right width=15%"); } else { display_note(_("There are no line items on this invoice."), 1, 2); } $display_freight = price_format($myrow["ov_freight"]); /*Print out the invoice text entered */ label_row(_("Shipping"), $display_freight, "colspan=6 align=right", "nowrap align=right"); $tax_items = get_trans_tax_details(ST_SALESINVOICE, $trans_id); display_customer_trans_tax_details($tax_items, 6); $display_total = price_format($myrow["ov_freight"] + $myrow["ov_gst"] + $myrow["ov_amount"] + $myrow["ov_freight_tax"]); label_row(_("TOTAL INVOICE"), $display_total, "colspan=6 align=right", "nowrap align=right"); end_table(1); $voided = is_voided_display(ST_SALESINVOICE, $trans_id, _("This invoice has been voided.")); if (!$voided) { display_allocations_to(PT_CUSTOMER, $myrow['debtor_no'], ST_SALESINVOICE, $trans_id, $myrow['Total']); } end_page(true, false, false, ST_SALESINVOICE, $trans_id);
page(_($help_context = "View Customer Payment"), true, false, "", $js); if (isset($_GET["trans_no"])) { $trans_id = $_GET["trans_no"]; } $receipt = get_customer_trans($trans_id, ST_CUSTPAYMENT); display_heading(sprintf(_("Customer Payment #%d"), $trans_id)); echo "<br>"; start_table(TABLESTYLE, "width=80%"); start_row(); label_cells(_("From Customer"), $receipt['DebtorName'], "class='tableheader2'"); label_cells(_("Reference"), $receipt['reference'], "class='tableheader2'"); label_cells(_("Date of Deposit"), sql2date($receipt['tran_date']), "class='tableheader2'"); end_row(); start_row(); label_cells(_("Customer Currency"), $receipt['curr_code'], "class='tableheader2'"); label_cells(_("Amount"), price_format($receipt['Total'] - $receipt['ov_discount']), "class='tableheader2'"); label_cells(_("Discount"), price_format($receipt['ov_discount']), "class='tableheader2'"); end_row(); start_row(); label_cells(_("Into Bank Account"), $receipt['bank_account_name'] . ' [' . $receipt['bank_curr_code'] . ']', "class='tableheader2'"); label_cells(_("Bank Amount"), price_format($receipt['bank_amount']), "class='tableheader2'"); label_cells(_("Payment Type"), $bank_transfer_types[$receipt['BankTransType']], "class='tableheader2'"); end_row(); comments_display_row(ST_CUSTPAYMENT, $trans_id); end_table(1); $voided = is_voided_display(ST_CUSTPAYMENT, $trans_id, _("This customer payment has been voided.")); if (!$voided) { display_allocations_from(PT_CUSTOMER, $receipt['debtor_no'], ST_CUSTPAYMENT, $trans_id, $receipt['Total']); } end_page(true, false, false, ST_CUSTPAYMENT, $trans_id);
/** * Require privileges from a user to the given resource. * * Terminates the script if user doesn't have required privileges. * * @param string|null $res The resource, or NULL * @param string $user The user. If no user name is supplied, assume the current logged in user * @package User * @example * require_privs('article.edit'); */ function require_privs($res = null, $user = '') { if ($res === null || !has_privs($res, $user)) { pagetop(gTxt('restricted_area')); echo graf(gTxt('restricted_area'), array('class' => 'restricted-area')); end_page(); exit; } }
$total = 0; $k = 0; //row colour counter foreach ($purchase_order->line_items as $stock_item) { $line_total = $stock_item->qty_received * $stock_item->price; alt_table_row_color($k); label_cell($stock_item->stock_id); label_cell($stock_item->item_description); label_cell($stock_item->req_del_date, "nowrap align=right"); $dec = get_qty_dec($stock_item->stock_id); qty_cell($stock_item->qty_received, false, $dec); label_cell($stock_item->units); amount_decimal_cell($stock_item->price); amount_cell($line_total); qty_cell($stock_item->qty_inv, false, $dec); end_row(); $total += $line_total; } $display_sub_tot = number_format2($total, user_price_dec()); label_row(_("Sub Total"), $display_sub_tot, "align=right colspan=6", "nowrap align=right", 1); $taxes = $purchase_order->get_taxes(); $tax_total = display_edit_tax_items($taxes, 6, $purchase_order->tax_included, 1); $display_total = price_format($total + $tax_total); start_row(); label_cells(_("Amount Total"), $display_total, "colspan=6 align='right'", "align='right'"); label_cell(''); end_row(); end_table(1); is_voided_display(ST_SUPPRECEIVE, $_GET['trans_no'], _("This delivery has been voided.")); end_page(true, false, false, ST_SUPPRECEIVE, $_GET['trans_no']);
<?php END_MODULE != 'admin' && die('Access Denied'); $logitems = end_page(model('log'), array('order' => '`time` desc'), 30); $admins = model('admin')->get_list(); $admin = array(); foreach ($admins as $_a) { $admin[$_a['admin_id']] = $_a['name']; } ?> <style> .log_table { border-collapse:collapse;} .log_table td { border:1px solid #999;padding:2px;} </style> <table border="0" class="log_table"> <?php foreach ($logitems as $log) { ?> <tr> <td> <?php echo $admin[$log['admin_id']]; ?> </td> <td> <?php echo $log['url']; ?> </td> <td> <?php
amount_cell($myrow2["unit_price"]); label_cell($display_discount, "align=right"); amount_cell($value); end_row(); } //end while there are line items to print out } else { display_note(_("There are no line items on this credit note."), 1, 2); } $display_sub_tot = price_format($sub_total); $credit_total = $myrow["ov_freight"] + $myrow["ov_gst"] + $myrow["ov_amount"] + $myrow["ov_freight_tax"]; $display_total = price_format($credit_total); /*Print out the invoice text entered */ if ($sub_total != 0) { label_row(_("Sub Total"), $display_sub_tot, "colspan=6 align=right", "nowrap align=right width='15%'"); } if ($myrow["ov_freight"] != 0.0) { $display_freight = price_format($myrow["ov_freight"]); label_row(_("Shipping"), $display_freight, "colspan=6 align=right", "nowrap align=right"); } $tax_items = get_trans_tax_details(ST_CUSTCREDIT, $trans_id); display_customer_trans_tax_details($tax_items, 6); label_row("<font color=red>" . _("TOTAL CREDIT") . "</font", "<font color=red>{$display_total}</font>", "colspan=6 align=right", "nowrap align=right"); end_table(1); $voided = is_voided_display(ST_CUSTCREDIT, $trans_id, _("This credit note has been voided.")); if (!$voided) { display_allocations_from(PT_CUSTOMER, $myrow['debtor_no'], ST_CUSTCREDIT, $trans_id, $credit_total); } /* end of check to see that there was an invoice record to print */ end_page(true, false, false, ST_CUSTCREDIT, $trans_id);
$sub_total += $value; if ($myrow2["discount_percent"] == 0) { $display_discount = ""; } else { $display_discount = percent_format($myrow2["discount_percent"] * 100) . "%"; } label_cell($myrow2["stock_id"]); label_cell($myrow2["StockDescription"]); qty_cell($myrow2["quantity"], false, get_qty_dec($myrow2["stock_id"])); label_cell($myrow2["units"], "align=right"); amount_cell($myrow2["unit_price"]); label_cell($display_discount, "nowrap align=right"); amount_cell($value); end_row(); } //end while there are line items to print out $display_sub_tot = price_format($sub_total); label_row(_("Sub-total"), $display_sub_tot, "colspan=6 align=right", "nowrap align=right width='15%'"); } else { display_note(_("There are no line items on this dispatch."), 1, 2); } $display_freight = price_format($myrow["ov_freight"]); label_row(_("Shipping"), $display_freight, "colspan=6 align=right", "nowrap align=right"); $tax_items = get_trans_tax_details(ST_CUSTDELIVERY, $trans_id); display_customer_trans_tax_details($tax_items, 6); $display_total = price_format($myrow["ov_freight"] + $myrow["ov_amount"] + $myrow["ov_freight_tax"] + $myrow["ov_gst"]); label_row(_("TOTAL VALUE"), $display_total, "colspan=6 align=right", "nowrap align=right"); end_table(1); is_voided_display(ST_CUSTDELIVERY, $trans_id, _("This dispatch has been voided.")); end_page(true, false, false, ST_CUSTDELIVERY, $trans_id);
if (!$selected_id) { unset($_POST['_tabs_sel']); } // force settings tab for new customer tabbed_content_start('tabs', array('settings' => array(_('&General settings'), $selected_id), 'contacts' => array(_('&Contacts'), $selected_id), 'transactions' => array(_('&Transactions'), $selected_id), 'orders' => array(_('Sales &Orders'), $selected_id))); switch (get_post('_tabs_sel')) { default: case 'settings': customer_settings($selected_id); break; case 'contacts': $contacts = new contacts('contacts', $selected_id, 'customer'); $contacts->show(); break; case 'transactions': $_GET['customer_id'] = $selected_id; $_GET['popup'] = 1; include_once $path_to_root . "/sales/inquiry/customer_inquiry.php"; break; case 'orders': $_GET['customer_id'] = $selected_id; $_GET['popup'] = 1; include_once $path_to_root . "/sales/inquiry/sales_orders_view.php"; break; } br(); tabbed_content_end(); hidden('popup', @$_REQUEST['popup']); end_form(); end_page(@$_REQUEST['popup']);
} } table_header($th); $k = 0; //row colour counter $total_amount = 0; while ($item = db_fetch($items)) { if ($item["account"] != $from_trans["account_code"]) { alt_table_row_color($k); label_cell($item["account"]); label_cell($item["account_name"]); if ($dim >= 1) { label_cell(get_dimension_string($item['dimension_id'], true)); } if ($dim > 1) { label_cell(get_dimension_string($item['dimension2_id'], true)); } amount_cell($item["amount"]); label_cell($item["memo_"]); end_row(); $total_amount += $item["amount"]; } } label_row(_("Total"), number_format2($total_amount, user_price_dec()), "colspan=" . (2 + $dim) . " align=right", "align=right"); end_table(1); if (!$voided) { display_allocations_from($from_trans['person_type_id'], $from_trans['person_id'], 1, $trans_no, -$from_trans['amount']); } } end_page(true, false, false, ST_BANKPAYMENT, $trans_no);
} elseif ($row['type'] == ST_BANKPAYMENT) { // bank payment printout not defined yet. return ''; } else { return print_document_link($row['trans_no'] . "-" . $row['type'], _("Print"), true, $row['type'], ICON_PRINT); } } function check_overdue($row) { return $row['OverDue'] == 1 && floatcmp($row["TotalAmount"], $row["Allocated"]) != 0; } //------------------------------------------------------------------------------------------------ $sql = get_sql_for_customer_inquiry(); //------------------------------------------------------------------------------------------------ db_query("set @bal:=0"); $cols = array(_("Type") => array('fun' => 'systype_name', 'ord' => ''), _("#") => array('fun' => 'trans_view', 'ord' => ''), _("Order") => array('fun' => 'order_view'), _("Reference"), _("Date") => array('name' => 'tran_date', 'type' => 'date', 'ord' => 'desc'), _("Due Date") => array('type' => 'date', 'fun' => 'due_date'), _("Customer") => array('ord' => ''), _("Branch") => array('ord' => ''), _("Currency") => array('align' => 'center'), _("Debit") => array('align' => 'right', 'fun' => 'fmt_debit'), _("Credit") => array('align' => 'right', 'insert' => true, 'fun' => 'fmt_credit'), _("RB") => array('align' => 'right', 'type' => 'amount'), array('insert' => true, 'fun' => 'gl_view'), array('insert' => true, 'fun' => 'credit_link'), array('insert' => true, 'fun' => 'edit_link'), array('insert' => true, 'fun' => 'prt_link')); if ($_POST['customer_id'] != ALL_TEXT) { $cols[_("Customer")] = 'skip'; $cols[_("Currency")] = 'skip'; } if ($_POST['filterType'] == ALL_TEXT) { $cols[_("RB")] = 'skip'; } $table =& new_db_pager('trans_tbl', $sql, $cols); $table->set_marker('check_overdue', _("Marked items are overdue.")); $table->width = "85%"; display_db_pager($table); if (!@$_GET['popup']) { end_form(); end_page(@$_GET['popup'], false, false); }
function handle_cancel_po() { global $path_to_root; //need to check that not already dispatched or invoiced by the supplier if ($_SESSION['PO']->order_no != 0 && $_SESSION['PO']->any_already_received() == 1) { display_error(tr("This order cannot be cancelled because some of it has already been received.") . "<br>" . tr("The line item quantities may be modified to quantities more than already received. prices cannot be altered for lines that have already been received and quantities cannot be reduced below the quantity already received.")); return; } if ($_SESSION['PO']->order_no != 0) { delete_po($_SESSION['PO']->order_no); } $_SESSION['PO']->clear_items(); $_SESSION['PO'] = new purch_order(); display_note(tr("This purchase order has been cancelled."), 0, 1); hyperlink_params($path_to_root . "/purchasing/po_entry_items.php", tr("Enter a new purchase order"), "NewOrder=Yes"); echo "<br>"; end_page(); exit; }
table_header($th); $k = 0; //row colour counter foreach ($_SESSION['View']->line_items as $stock_item) { $line_total = round2($stock_item->quantity * $stock_item->price * (1 - $stock_item->discount_percent), user_price_dec()); alt_table_row_color($k); label_cell($stock_item->stock_id); label_cell($stock_item->item_description); $dec = get_qty_dec($stock_item->stock_id); qty_cell($stock_item->quantity, false, $dec); label_cell($stock_item->units); amount_cell($stock_item->price); amount_cell($stock_item->discount_percent * 100); amount_cell($line_total); qty_cell($stock_item->qty_done, false, $dec); end_row(); } label_row(_("Shipping"), price_format($_SESSION['View']->freight_cost), "align=right colspan=6", "nowrap align=right", 1); $sub_tot = $_SESSION['View']->get_items_total() + $_SESSION['View']->freight_cost; $display_sub_tot = price_format($sub_tot); label_row(_("Sub Total"), $display_sub_tot, "align=right colspan=6", "nowrap align=right", 1); $taxes = $_SESSION['View']->get_taxes(); $tax_total = display_edit_tax_items($taxes, 6, $_SESSION['View']->tax_included, 2); $display_total = price_format($sub_tot + $tax_total); start_row(); label_cells(_("Amount Total"), $display_total, "colspan=6 align='right'", "align='right'"); label_cell('', "colspan=2"); end_row(); end_table(2); end_page(true, false, false, $_GET['trans_type'], $_GET['trans_no']);
$k = 0; //row colour counter $total_cost = 0; while ($myrow = db_fetch($result)) { alt_table_row_color($k); label_cell($myrow["stock_id"] . " - " . $myrow["description"]); qty_cell($myrow["qty_issued"], false, get_qty_dec($myrow["stock_id"])); label_cell($myrow["units"]); end_row(); $j++; if ($j == 12) { $j = 1; table_header($th); } //end of page full new headings if } //end of while end_table(); } } //------------------------------------------------------------------------------------------------- display_heading($systypes_array[ST_MANUISSUE] . " # " . $wo_issue_no); display_wo_issue($wo_issue_no); display_heading2(_("Items for this Issue")); display_wo_issue_details($wo_issue_no); //------------------------------------------------------------------------------------------------- echo "<br>"; end_page(true, false, false, ST_MANUISSUE, $wo_issue_no); ?>
echo "<center>"; // display the WO requirements br(1); if ($myrow["released"] == false) { display_heading2(_("BOM for item:") . " " . $myrow["StockItemName"]); display_bom($myrow["stock_id"]); } else { display_heading2(_("Work Order Requirements")); display_wo_requirements($woid, $myrow["units_reqd"]); if ($myrow["type"] == WO_ADVANCED) { echo "<br><table cellspacing=7><tr valign=top><td>"; display_heading2(_("Issues")); display_wo_issues($woid); echo "</td><td>"; display_heading2(_("Productions")); display_wo_productions($woid); echo "</td><td>"; display_heading2(_("Additional Costs")); display_wo_payments($woid); echo "</td></tr></table>"; } else { echo "<br><table cellspacing=7><tr valign=top><td>"; display_heading2(_("Additional Costs")); display_wo_payments($woid); echo "</td></tr></table>"; } } echo "<br></center>"; is_voided_display(ST_WORKORDER, $woid, _("This work order has been voided.")); end_page(true, false, false, ST_WORKORDER, $woid);
$header_shown = false; while ($adjustment = db_fetch($adjustment_items)) { if (!$header_shown) { $adjustment_type = get_movement_type($adjustment['person_id']); start_table(TABLESTYLE2, "width='90%'"); start_row(); label_cells(_("At Location"), $adjustment['location_name'], "class='tableheader2'"); label_cells(_("Reference"), $adjustment['reference'], "class='tableheader2'", "colspan=6"); label_cells(_("Date"), sql2date($adjustment['tran_date']), "class='tableheader2'"); label_cells(_("Adjustment Type"), $adjustment_type['name'], "class='tableheader2'"); end_row(); comments_display_row(ST_INVADJUST, $trans_no); end_table(); $header_shown = true; echo "<br>"; start_table(TABLESTYLE, "width='90%'"); $th = array(_("Item"), _("Description"), _("Quantity"), _("Units"), _("Unit Cost")); table_header($th); } alt_table_row_color($k); label_cell($adjustment['stock_id']); label_cell($adjustment['description']); qty_cell($adjustment['qty'], false, get_qty_dec($adjustment['stock_id'])); label_cell($adjustment['units']); amount_decimal_cell($adjustment['standard_cost']); end_row(); } end_table(1); is_voided_display(ST_INVADJUST, $trans_no, _("This adjustment has been voided.")); end_page(true, false, false, ST_INVADJUST, $trans_no);
display_heading($systypes_array[ST_BANKTRANSFER] . " #{$trans_no}"); echo "<br>"; start_table(TABLESTYLE, "width=80%"); start_row(); label_cells(_("From Bank Account"), $from_trans['bank_account_name'], "class='tableheader2'"); if ($show_currencies) { label_cells(_("Currency"), $from_trans['bank_curr_code'], "class='tableheader2'"); } label_cells(_("Amount"), number_format2(-$from_trans['amount'], user_price_dec()), "class='tableheader2'", "align=right"); if ($show_currencies) { end_row(); start_row(); } label_cells(_("To Bank Account"), $to_trans['bank_account_name'], "class='tableheader2'"); if ($show_currencies) { label_cells(_("Currency"), $to_trans['bank_curr_code'], "class='tableheader2'"); } if ($show_both_amounts) { label_cells(_("Amount"), number_format2($to_trans['amount'], user_price_dec()), "class='tableheader2'", "align=right"); } end_row(); start_row(); label_cells(_("Date"), sql2date($from_trans['trans_date']), "class='tableheader2'"); label_cells(_("Transfer Type"), $bank_transfer_types[$from_trans['account_type']], "class='tableheader2'"); label_cells(_("Reference"), $from_trans['ref'], "class='tableheader2'"); end_row(); comments_display_row(ST_BANKTRANSFER, $trans_no); end_table(1); is_voided_display(ST_BANKTRANSFER, $trans_no, _("This transfer has been voided.")); end_page(true, false, false, ST_BANKTRANSFER, $trans_no);
include_once $path_to_root . "/dimensions/includes/dimensions_ui.inc"; //------------------------------------------------------------------------------------------------- if ($_GET['trans_no'] != "") { $id = $_GET['trans_no']; } display_heading(systypes::name(systypes::dimension()) . " # " . $id); $myrow = get_dimension($id); if (strlen($myrow[0]) == 0) { echo tr("The work order number sent is not valid."); exit; } start_table($table_style); $th = array(tr("#"), tr("Reference"), tr("Name"), tr("Type"), tr("Date"), tr("Due Date")); table_header($th); start_row(); label_cell($myrow["id"]); label_cell($myrow["reference"]); label_cell($myrow["name"]); label_cell($myrow["type_"]); label_cell(sql2date($myrow["date_"])); label_cell(sql2date($myrow["due_date"])); end_row(); comments_display_row(systypes::dimension(), $id); end_table(); if ($myrow["closed"] == true) { echo "<br>" . tr("This dimension is closed.") . "<br>"; } display_dimension_payments($id); br(1); end_page(true);
$_POST['component'] = $myrow["component"]; // by Tom Moulton $_POST['workcentre_added'] = $myrow["workcentre_added"]; $_POST['quantity'] = number_format2($myrow["quantity"], get_qty_dec($myrow["component"])); label_row(_("Component:"), $myrow["component"] . " - " . $myrow["description"]); } hidden('selected_id', $selected_id); } else { start_row(); label_cell(_("Component:"), "class='label'"); echo "<td>"; echo stock_component_items_list('component', $selected_parent, null, false, true); if (get_post('_component_update')) { $Ajax->activate('quantity'); } echo "</td>"; end_row(); } hidden('stock_id', $selected_parent); locations_list_row(_("Location to Draw From:"), 'loc_code', null); workcenter_list_row(_("Work Centre Added:"), 'workcentre_added', null); $dec = get_qty_dec(get_post('component')); $_POST['quantity'] = number_format2(input_num('quantity', 1), $dec); qty_row(_("Quantity:"), 'quantity', null, null, null, $dec); end_table(1); submit_add_or_update_center($selected_id == -1, '', 'both'); end_form(); } // ---------------------------------------------------------------------------------- end_page();
label_cells(_("Item"), $from_trans['stock_id'] . " - " . $from_trans['description'], "class='tableheader2'"); label_cells(_("From Location"), $from_trans['location_name'], "class='tableheader2'"); label_cells(_("To Location"), $to_trans['location_name'], "class='tableheader2'"); end_row(); start_row(); label_cells(_("Reference"), $from_trans['reference'], "class='tableheader2'"); $adjustment_type = get_movement_type($from_trans['person_id']); label_cells(_("Adjustment Type"), $adjustment_type['name'], "class='tableheader2'"); label_cells(_("Date"), sql2date($from_trans['tran_date']), "class='tableheader2'"); end_row(); comments_display_row(ST_LOCTRANSFER, $trans_no); end_table(2); start_table(TABLESTYLE, "width=90%"); $th = array(_("Item"), _("Description"), _("Quantity"), _("Units")); table_header($th); $transfer_items = get_stock_moves(ST_LOCTRANSFER, $trans_no); $k = 0; while ($item = db_fetch($transfer_items)) { if ($item['loc_code'] == $to_trans['loc_code']) { alt_table_row_color($k); label_cell($item['stock_id']); label_cell($item['description']); qty_cell($item['qty'], false, get_qty_dec($item['stock_id'])); label_cell($item['units']); end_row(); } } end_table(1); is_voided_display(ST_LOCTRANSFER, $trans_no, _("This transfer has been voided.")); end_page(true, false, false, ST_LOCTRANSFER, $trans_no);
} else { $th = array(_("Account Code"), _("Account Description"), _("Amount"), _("Memo")); } } table_header($th); $k = 0; //row colour counter $total_amount = 0; while ($item = db_fetch($items)) { if ($item["account"] != $to_trans["account_code"]) { alt_table_row_color($k); label_cell($item["account"]); label_cell($item["account_name"]); if ($dim >= 1) { label_cell(get_dimension_string($item['dimension_id'], true)); } if ($dim > 1) { label_cell(get_dimension_string($item['dimension2_id'], true)); } amount_cell(-$item["amount"]); label_cell($item["memo_"]); end_row(); $total_amount += $item["amount"]; } } label_row(_("Total"), number_format2(-$total_amount, user_price_dec()), "colspan=" . (2 + $dim) . " align=right", "align=right"); end_table(1); display_allocations_from($to_trans['person_type_id'], $to_trans['person_id'], 2, $trans_no, $to_trans['settled_amount']); } end_page(true, false, false, ST_BANKDEPOSIT, $trans_no);
function wa_footer() { end_page(false, true); }