function display_wo_issue_details($issue_no) { $result = get_work_order_issue_details($issue_no); if (db_num_rows($result) == 0) { display_note(_("There are no items for this issue.")); } else { start_table(TABLESTYLE); $th = array(_("Component"), _("Quantity"), _("Units")); table_header($th); $j = 1; $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(); } }
function display_po_receive_items() { div_start('grn_items'); start_table(TABLESTYLE, "colspan=7 width='90%'"); $th = array(_("Item Code"), _("Description"), _("Ordered"), _("Units"), _("Received"), _("Outstanding"), _("This Delivery"), _("Price"), _("Total")); table_header($th); /*show the line items on the order with the quantity being received for modification */ $total = 0; $k = 0; //row colour counter if (count($_SESSION['PO']->line_items) > 0) { foreach ($_SESSION['PO']->line_items as $ln_itm) { alt_table_row_color($k); $qty_outstanding = $ln_itm->quantity - $ln_itm->qty_received; if (!isset($_POST['Update']) && !isset($_POST['ProcessGoodsReceived']) && $ln_itm->receive_qty == 0) { //If no quantites yet input default the balance to be received $ln_itm->receive_qty = $qty_outstanding; } $line_total = $ln_itm->receive_qty * $ln_itm->price; $total += $line_total; label_cell($ln_itm->stock_id); if ($qty_outstanding > 0) { text_cells(null, $ln_itm->stock_id . "Desc", $ln_itm->item_description, 30, 50); } else { label_cell($ln_itm->item_description); } $dec = get_qty_dec($ln_itm->stock_id); qty_cell($ln_itm->quantity, false, $dec); label_cell($ln_itm->units); qty_cell($ln_itm->qty_received, false, $dec); qty_cell($qty_outstanding, false, $dec); if ($qty_outstanding > 0) { qty_cells(null, $ln_itm->line_no, number_format2($ln_itm->receive_qty, $dec), "align=right", null, $dec); } else { label_cell(number_format2($ln_itm->receive_qty, $dec), "align=right"); } amount_decimal_cell($ln_itm->price); amount_cell($line_total); end_row(); } } $colspan = count($th) - 1; $display_sub_total = price_format($total); label_row(_("Sub-total"), $display_sub_total, "colspan={$colspan} align=right", "align=right"); $taxes = $_SESSION['PO']->get_taxes(input_num('freight_cost'), true); $tax_total = display_edit_tax_items($taxes, $colspan, $_SESSION['PO']->tax_included); $display_total = price_format($total + input_num('freight_cost') + $tax_total); start_row(); label_cells(_("Amount Total"), $display_total, "colspan={$colspan} align='right'", "align='right'"); end_row(); end_table(); div_end(); }
function display_po_receive_items() { global $table_style; start_table("colspan=7 {$table_style} width=90%"); $th = array(tr("Item Code"), tr("Description"), tr("Ordered"), tr("Units"), tr("Received"), tr("Outstanding"), tr("This Delivery"), tr("Price"), tr("Total")); table_header($th); /*show the line items on the order with the quantity being received for modification */ $total = 0; $k = 0; //row colour counter if (count($_SESSION['PO']->line_items) > 0) { foreach ($_SESSION['PO']->line_items as $ln_itm) { alt_table_row_color($k); $qty_outstanding = $ln_itm->quantity - $ln_itm->qty_received; if ($ln_itm->receive_qty == 0) { //If no quantites yet input default the balance to be received $ln_itm->receive_qty = $qty_outstanding; } $line_total = $ln_itm->receive_qty * $ln_itm->price; $total += $line_total; label_cell($ln_itm->stock_id); if ($qty_outstanding > 0) { text_cells(null, $ln_itm->stock_id . "Desc", $ln_itm->item_description, 30, 50); } else { label_cell($ln_itm->item_description); } qty_cell($ln_itm->quantity); label_cell($ln_itm->units); qty_cell($ln_itm->qty_received); qty_cell($qty_outstanding); if ($qty_outstanding > 0) { qty_cells(null, $ln_itm->line_no, qty_format($ln_itm->receive_qty), "align=right"); } else { qty_cells(null, $ln_itm->line_no, qty_format($ln_itm->receive_qty), "align=right", "disabled"); } amount_cell($ln_itm->price); amount_cell($line_total); end_row(); } } $display_total = number_format2($total, user_price_dec()); label_row(tr("Total value of items received"), $display_total, "colspan=8 align=right", "nowrap align=right"); end_table(); }
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.")); }
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.")); }
function display_kit_items($selected_kit) { $result = get_item_kit($selected_kit); div_start('bom'); start_table(TABLESTYLE, "width='60%'"); $th = array(_("Stock Item"), _("Description"), _("Quantity"), _("Units"), '', ''); table_header($th); $k = 0; while ($myrow = db_fetch($result)) { alt_table_row_color($k); label_cell($myrow["stock_id"]); label_cell($myrow["comp_name"]); qty_cell($myrow["quantity"], false, $myrow["units"] == '' ? 0 : get_qty_dec($myrow["comp_name"])); label_cell($myrow["units"] == '' ? _('kit') : $myrow["units"]); edit_button_cell("Edit" . $myrow['id'], _("Edit")); delete_button_cell("Delete" . $myrow['id'], _("Delete")); end_row(); } //END WHILE LIST LOOP end_table(); div_end(); }
function display_bom_items($selected_parent) { $result = get_bom($selected_parent); div_start('bom'); start_table(TABLESTYLE, "width=60%"); $th = array(_("Code"), _("Description"), _("Location"), _("Work Centre"), _("Quantity"), _("Units"), '', ''); table_header($th); $k = 0; while ($myrow = db_fetch($result)) { alt_table_row_color($k); label_cell($myrow["component"]); label_cell($myrow["description"]); label_cell($myrow["location_name"]); label_cell($myrow["WorkCentreDescription"]); qty_cell($myrow["quantity"], false, get_qty_dec($myrow["component"])); label_cell($myrow["units"]); edit_button_cell("Edit" . $myrow['id'], _("Edit")); delete_button_cell("Delete" . $myrow['id'], _("Delete")); end_row(); } //END WHILE LIST LOOP end_table(); div_end(); }
$result = get_item_code_dflts($_POST['stock_id']); $dec = $result['decimals']; $units = $result['units']; $dflt_desc = $result['description']; $dflt_cat = $result['category_id']; $result = get_all_item_codes($_POST['stock_id']); div_start('code_table'); start_table(TABLESTYLE, "width=60%"); $th = array(_("EAN/UPC Code"), _("Quantity"), _("Units"), _("Description"), _("Category"), "", ""); table_header($th); $k = $j = 0; //row colour counter while ($myrow = db_fetch($result)) { alt_table_row_color($k); label_cell($myrow["item_code"]); qty_cell($myrow["quantity"], $dec); label_cell($units); label_cell($myrow["description"]); label_cell($myrow["cat_name"]); edit_button_cell("Edit" . $myrow['id'], _("Edit")); edit_button_cell("Delete" . $myrow['id'], _("Delete")); end_row(); $j++; if ($j == 12) { $j = 1; table_header($th); } //end of page full new headings } //end of while loop end_table();
div_start('price_table'); if (db_num_rows($result) == 0) { display_note(_("There is no purchasing data set up for the part selected")); } else { start_table(TABLESTYLE, "width=65%"); $th = array(_("Supplier"), _("Price"), _("Currency"), _("Supplier's Unit"), _("Conversion Factor"), _("Supplier's Description"), "", ""); table_header($th); $k = $j = 0; //row colour counter while ($myrow = db_fetch($result)) { alt_table_row_color($k); label_cell($myrow["supp_name"]); amount_decimal_cell($myrow["price"]); label_cell($myrow["curr_code"]); label_cell($myrow["suppliers_uom"]); qty_cell($myrow['conversion_factor'], false, 'max'); label_cell($myrow["supplier_description"]); edit_button_cell("Edit" . $myrow['supplier_id'], _("Edit")); delete_button_cell("Delete" . $myrow['supplier_id'], _("Delete")); end_row(); $j++; if ($j == 12) { $j = 1; table_header($th); } //end of page full new headings } //end of while loop end_table(); } div_end();
if (strlen($supp_row['supp_name']) > 0) { $person = $supp_row['supp_name']; } } elseif ($myrow["type"] == systypes::location_transfer() || $myrow["type"] == systypes::inventory_adjustment()) { // get the adjustment type $movement_type = get_movement_type($myrow["person_id"]); $person = $movement_type["name"]; } elseif ($myrow["type"] == systypes::work_order() || $myrow["type"] == 28 || $myrow["type"] == 29) { $person = ""; } label_cell($person); label_cell($myrow["qty"] >= 0 ? $quantity_formatted : "", "nowrap align=right"); label_cell($myrow["qty"] < 0 ? $quantity_formatted : "", "nowrap align=right"); label_cell(number_format2($after_qty, user_qty_dec()), "nowrap align=right"); end_row(); $j++; if ($j == 12) { $j = 1; table_header($th); } //end of page full new headings if } //end of while loop if ($total_in != 0 || $total_out != 0) { start_row("class='inquirybg'"); label_cell("<b>" . tr("Quantity on hand after") . " " . $_POST['BeforeDate'] . "</b>", "align=center colspan=7"); qty_cell($after_qty); end_row(); } end_table(1); end_page();
if ($kitset_or_service == false) { $sql = "SELECT Sum(purch_order_details.quantity_ordered - purch_order_details.quantity_received) AS qoo\n\t\t\tFROM purch_order_details INNER JOIN purch_orders ON purch_order_details.order_no=purch_orders.order_no\n\t\t\tWHERE purch_orders.into_stock_location='" . $myrow["loc_code"] . "'\n\t\t\tAND purch_order_details.item_code='" . $_POST['stock_id'] . "'"; $qoo_result = db_query($sql, "could not receive quantity on order for item"); if (db_num_rows($qoo_result) == 1) { $qoo_row = db_fetch_row($qoo_result); $qoo = $qoo_row[0]; } else { $qoo = 0; } label_cell($myrow["location_name"]); qty_cell($qoh); qty_cell($myrow["reorder_level"]); qty_cell($demand_qty); qty_cell($qoh - $demand_qty); qty_cell($qoo); end_row(); } else { /* It must be a service or kitset part */ label_cell($myrow["location_name"]); qty_cell($demand_qty); end_row(); } $j++; if ($j == 12) { $j = 1; table_header($th); } } end_table(); end_form(); end_page();
$th = array(_("Item Code"), _("Item Description"), _("Quantity"), _("Unit"), _("Price"), _("Discount"), _("Total"), _("Quantity Delivered")); 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']);
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(); }
start_row(); label_cells(tr("Item"), $from_trans['stock_id'] . " - " . $from_trans['description'], "class='tableheader2'"); label_cells(tr("From Location"), $from_trans['location_name'], "class='tableheader2'"); label_cells(tr("To Location"), $to_trans['location_name'], "class='tableheader2'"); end_row(); start_row(); label_cells(tr("Reference"), $from_trans['reference'], "class='tableheader2'"); $adjustment_type = get_movement_type($from_trans['person_id']); label_cells(tr("Adjustment Type"), $adjustment_type['name'], "class='tableheader2'"); label_cells(tr("Date"), sql2date($from_trans['tran_date']), "class='tableheader2'"); end_row(); comments_display_row(systypes::location_transfer(), $trans_no); end_table(1); echo "<br>"; start_table("{$table_style} width=90%"); $th = array(tr("Item"), tr("Description"), tr("Quantity"), tr("Units")); table_header($th); $transfer_items = get_stock_moves(systypes::location_transfer(), $trans_no); 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']); label_cell($item['units']); end_row(); } } end_table(1); is_voided_display(systypes::location_transfer(), $trans_no, tr("This transfer has been voided.")); end_page(true);
function display_credit_items() { global $table_style, $table_style2; start_form(false, true); start_table("{$table_style2} width=80%", 5); echo "<tr><td>"; // outer table start_table("{$table_style} width=100%"); start_row(); label_cells(tr("Customer"), $_SESSION['Items']->customer_name, "class='tableheader2'"); label_cells(tr("Branch"), get_branch_name($_SESSION['Items']->Branch), "class='tableheader2'"); label_cells(tr("Currency"), $_SESSION['Items']->customer_currency, "class='tableheader2'"); end_row(); start_row(); // if (!isset($_POST['ref'])) // $_POST['ref'] = references::get_next(11); if ($_SESSION['Items']->trans_no == 0) { ref_cells(tr("Reference"), 'ref', $_SESSION['Items']->reference, "class='tableheader2'"); } else { label_cells(tr("Reference"), $_SESSION['Items']->reference, "class='tableheader2'"); } // label_cells(tr("Crediting Invoice"), get_customer_trans_view_str(10, $_SESSION['InvoiceToCredit']), "class='tableheader2'"); label_cells(tr("Crediting Invoice"), get_customer_trans_view_str(10, array_keys($_SESSION['Items']->src_docs)), "class='tableheader2'"); if (!isset($_POST['ShipperID'])) { $_POST['ShipperID'] = $_SESSION['Items']->ship_via; } label_cell(tr("Shipping Company"), "class='tableheader2'"); shippers_list_cells(null, 'ShipperID', $_POST['ShipperID']); // if (!isset($_POST['sales_type_id'])) // $_POST['sales_type_id'] = $_SESSION['Items']->sales_type; // label_cell(tr("Sales Type"), "class='tableheader2'"); // sales_types_list_cells(null, 'sales_type_id', $_POST['sales_type_id']); end_row(); end_table(); echo "</td><td>"; // outer table start_table("{$table_style} width=100%"); label_row(tr("Invoice Date"), $_SESSION['Items']->src_date, "class='tableheader2'"); date_row(tr("Credit Note Date"), 'CreditDate', null, 0, 0, 0, "class='tableheader2'"); end_table(); echo "</td></tr>"; end_table(1); // outer table start_table("{$table_style} width=80%"); $th = array(tr("Item Code"), tr("Item Description"), tr("Invoiced Quantity"), tr("Units"), tr("Credit Quantity"), tr("Price"), tr("Discount %"), tr("Total")); table_header($th); $k = 0; //row colour counter foreach ($_SESSION['Items']->line_items as $line_no => $ln_itm) { if ($ln_itm->quantity == $ln_itm->qty_done) { continue; // this line was fully credited } alt_table_row_color($k); // view_stock_status_cell($ln_itm->stock_id); alternative view label_cell($ln_itm->stock_id); text_cells(null, 'Line' . $line_no . 'Desc', $ln_itm->item_description, 30, 50); qty_cell($ln_itm->quantity); label_cell($ln_itm->units); amount_cells(null, 'Line' . $line_no, qty_format($ln_itm->qty_dispatched)); $line_total = $ln_itm->qty_dispatched * $ln_itm->price * (1 - $ln_itm->discount_percent); amount_cell($ln_itm->price); percent_cell($ln_itm->discount_percent * 100); amount_cell($line_total); end_row(); } if (!check_num('ChargeFreightCost')) { $_POST['ChargeFreightCost'] = price_format($_SESSION['Items']->freight_cost); } start_row(); label_cell(tr("Credit Shipping Cost"), "colspan=7 align=right"); amount_cells(null, "ChargeFreightCost", $_POST['ChargeFreightCost'], 6, 6); end_row(); $inv_items_total = $_SESSION['Items']->get_items_total_dispatch(); $display_sub_total = price_format($inv_items_total + input_num($_POST['ChargeFreightCost'])); label_row(tr("Sub-total"), $display_sub_total, "colspan=7 align=right", "align=right"); $taxes = $_SESSION['Items']->get_taxes(input_num($_POST['ChargeFreightCost'])); $tax_total = display_edit_tax_items($taxes, 7, $_SESSION['Items']->tax_included); $display_total = price_format($inv_items_total + input_num('ChargeFreightCost') + $tax_total); label_row(tr("Credit Note Total"), $display_total, "colspan=7 align=right", "align=right"); end_table(); }
function display_stock_topten($manuf = false) { global $path_to_root; $pg = new graph(); $begin = begin_fiscalyear(); $today = Today(); $begin1 = date2sql($begin); $today1 = date2sql($today); $sql = "SELECT SUM((trans.unit_price * trans.quantity) * d.rate) AS total, s.stock_id, s.description, \n\t\t\tSUM(trans.quantity) AS qty FROM\n\t\t\t" . TB_PREF . "debtor_trans_details AS trans, " . TB_PREF . "stock_master AS s, " . TB_PREF . "debtor_trans AS d \n\t\t\tWHERE trans.stock_id=s.stock_id AND trans.debtor_trans_type=d.type AND trans.debtor_trans_no=d.trans_no\n\t\t\tAND (d.type = " . ST_SALESINVOICE . " OR d.type = " . ST_CUSTCREDIT . ") "; if ($manuf) { $sql .= "AND s.mb_flag='M' "; } $sql .= "AND d.tran_date >= '{$begin1}' AND d.tran_date <= '{$today1}' GROUP by s.stock_id ORDER BY total DESC, s.stock_id \n\t\t\tLIMIT 10"; $result = db_query($sql); if ($manuf) { $title = _("Top 10 Manufactured Items in fiscal year"); } else { $title = _("Top 10 Sold Items in fiscal year"); } br(2); display_heading($title); br(); $th = array(_("Item"), _("Amount"), _("Quantity")); 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["description"]; label_cell($name); amount_cell($myrow['total']); qty_cell($myrow['qty']); $pg->x[$i] = $name; $pg->y[$i] = $myrow['total']; $i++; end_row(); } end_table(2); $pg->title = $title; $pg->axis_x = _("Item"); $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); }
$k = 0; $header_shown = false; while ($adjustment = db_fetch($adjustment_items)) { if (!$header_shown) { $adjustment_type = get_movement_type($adjustment['person_id']); start_table("{$table_style2} width=90%"); start_row(); label_cells(tr("At Location"), $adjustment['location_name'], "class='tableheader2'"); label_cells(tr("Reference"), $adjustment['reference'], "class='tableheader2'", "colspan=6"); label_cells(tr("Date"), sql2date($adjustment['tran_date']), "class='tableheader2'"); label_cells(tr("Adjustment Type"), $adjustment_type['name'], "class='tableheader2'"); end_row(); comments_display_row(systypes::inventory_adjustment(), $trans_no); end_table(); $header_shown = true; echo "<br>"; start_table("{$table_style} width=90%"); $th = array(tr("Item"), tr("Description"), tr("Quantity"), tr("Units"), tr("Unit Cost")); table_header($th); } alt_table_row_color($k); label_cell($adjustment['stock_id']); label_cell($adjustment['description']); qty_cell($adjustment['qty']); label_cell($adjustment['units']); amount_cell($adjustment['standard_cost']); end_row(); } end_table(1); is_voided_display(systypes::inventory_adjustment(), $trans_no, tr("This adjustment has been voided.")); end_page(true);
end_table(); echo "</td></tr>"; end_table(); echo "<center>"; display_heading2(tr("Line Details")); start_table("colspan=9 width=95% {$table_style}"); $th = array(tr("Item Code"), tr("Item Description"), tr("Date"), tr("Description"), tr("Quantity"), tr("Unit"), tr("Price"), tr("Discount"), tr("Total"), tr("Quantity Delivered")); table_header($th); $k = 0; //row colour counter foreach ($_SESSION['Items']->line_items as $stock_item) { $line_total = round($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); label_cell($stock_item->date_from); label_cell($stock_item->notes); qty_cell($stock_item->quantity); 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); end_row(); } $items_total = $_SESSION['Items']->get_items_total(); $display_total = price_format($items_total + $_SESSION['Items']->freight_cost); label_row(tr("Shipping"), price_format($_SESSION['Items']->freight_cost), "align=right colspan=8", "nowrap align=right"); label_row(tr("Total Order Value"), $display_total, "align=right colspan=8", "nowrap align=right"); end_table(2); end_page(true);
$sub_total = 0; while ($myrow2 = db_fetch($result)) { if ($myrow2["quantity"] == 0) { continue; } alt_table_row_color($k); $value = round2((1 - $myrow2["discount_percent"]) * $myrow2["unit_price"] * $myrow2["quantity"], user_price_dec()); $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 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");
table_header($th); $k = 0; //row colour counter $sub_total = 0; while ($myrow2 = db_fetch($result)) { alt_table_row_color($k); $value = round((1 - $myrow2["discount_percent"]) * $myrow2["unit_price"] * $myrow2["quantity"], user_price_dec()); $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"]); label_cell($myrow2["units"], "align=right"); 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(tr("There are no line items on this credit note."), 1, 2); } $display_sub_tot = price_format($sub_total); $display_freight = price_format($myrow["ov_freight"]); $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 */
$result = get_loc_details($_POST['stock_id']); if (@$_GET['popup']) { hidden('_tabs_sel', get_post('_tabs_sel')); hidden('popup', @$_GET['popup']); } while ($myrow = db_fetch($result)) { alt_table_row_color($k); if (isset($_POST['UpdateData']) && check_num($myrow["loc_code"])) { $myrow["reorder_level"] = input_num($myrow["loc_code"]); set_reorder_level($_POST['stock_id'], $myrow["loc_code"], input_num($myrow["loc_code"])); display_notification(_("Reorder levels has been updated.")); } $qoh = get_qoh_on_date($_POST['stock_id'], $myrow["loc_code"]); label_cell($myrow["location_name"]); $_POST[$myrow["loc_code"]] = qty_format($myrow["reorder_level"], $_POST['stock_id'], $dec); qty_cell($qoh, false, $dec); qty_cells(null, $myrow["loc_code"], null, null, null, $dec); end_row(); $j++; if ($j == 12) { $j = 1; table_header($th); } } end_table(1); div_end(); submit_center('UpdateData', _("Update"), true, false, 'default'); if (!@$_GET['popup']) { end_form(); end_page(@$_GET['popup'], false, false); }
if ($myrow["closed"] == 0) { $issue = $path_to_root . "/manufacturing/work_order_issue.php?" . SID . "trans_no=" . $myrow["id"]; $add_finished = $path_to_root . "/manufacturing/work_order_add_finished.php?" . SID . "trans_no=" . $myrow["id"]; $costs = $path_to_root . "/gl/gl_payment.php?NewPayment=1&PayType=" . payment_person_types::WorkOrder() . "&PayPerson=" . $myrow["id"]; $can_issue = $myrow["released"]; $issue_link = $can_issue ? "<a href={$issue}>" . tr("Issue") . "</a></td>\n\t\t\t<td><a href={$add_finished}>" . tr("Produce") . "</a></td>\n\t\t\t<td><a href={$costs}>" . tr("Costs") . "</a>" : tr("Not Released"); } else { $issue_link = ""; } label_cell(get_trans_view_str(systypes::work_order(), $myrow["id"])); label_cell(get_trans_view_str(systypes::work_order(), $myrow["id"], $myrow["wo_ref"])); label_cell(wo_types::name($myrow["type"])); label_cell($myrow["location_name"]); view_stock_status_cell($myrow["stock_id"], $myrow["description"]); qty_cell($myrow["units_reqd"]); qty_cell($myrow["units_issued"]); label_cell(sql2date($myrow["date_"])); label_cell(sql2date($myrow["required_by"])); label_cell($myrow["closed"] ? tr("Yes") : tr("No")); if ($issue_link != "") { label_cell($issue_link); } if ($myrow["released"] == 0) { label_cell("<a href={$release_page}>" . tr("Release") . "</a>"); } if ($myrow["closed"] == 0) { label_cell("<a href={$modify_page}>" . tr("Edit") . "</a>"); } label_cell(get_gl_view_str(systypes::work_order(), $myrow["id"])); end_row(); $j++;
start_row(); 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);
function pager(&$pager) { global $use_popup_windows, $use_date_picker, $path_to_root; $pager->select_records(); div_start("_{$pager->name}_span"); $headers = array(); foreach ($pager->columns as $num_col => $col) { // record status control column is displayed only when control checkbox is on if (isset($col['head']) && ($col['type'] != 'inactive' || get_post('show_inactive'))) { if (!isset($col['ord'])) { $headers[] = $col['head']; } else { $icon = $col['ord'] == 'desc' ? 'sort_desc.gif' : ($col['ord'] == 'asc' ? 'sort_asc.gif' : 'sort_none.gif'); $headers[] = navi_button($pager->name . '_sort_' . $num_col, $col['head'], true, $icon); } } } /* show a table of records returned by the sql */ start_table(TABLESTYLE, "width={$pager->width}"); table_header($headers); if ($pager->header_fun) { // if set header handler start_row("class='{$pager->header_class}'"); $fun = $pager->header_fun; if (method_exists($pager, $fun)) { $h = $pager->{$fun}($pager); } elseif (function_exists($fun)) { $h = $fun($pager); } foreach ($h as $c) { // draw header columns $pars = isset($c[1]) ? $c[1] : ''; label_cell($c[0], $pars); } end_row(); } $cc = 0; // row colour counter foreach ($pager->data as $line_no => $row) { $marker = $pager->marker; if ($marker && $marker($row)) { start_row("class='{$pager->marker_class}'"); } else { alt_table_row_color($cc); } foreach ($pager->columns as $k => $col) { $coltype = $col['type']; $cell = isset($col['name']) ? $row[$col['name']] : ''; if (isset($col['fun'])) { // use data input function if defined $fun = $col['fun']; if (method_exists($pager, $fun)) { $cell = $pager->{$fun}($row, $cell); } elseif (function_exists($fun)) { $cell = $fun($row, $cell); } else { $cell = ''; } } switch ($coltype) { // format column case 'time': label_cell($cell, "width=40"); break; case 'date': label_cell(sql2date($cell), "align='center' nowrap"); break; case 'dstamp': // time stamp displayed as date label_cell(sql2date(substr($cell, 0, 10)), "align='center' nowrap"); break; case 'tstamp': // time stamp - FIX user format label_cell(sql2date(substr($cell, 0, 10)) . ' ' . substr($cell, 10), "align='center'"); break; case 'percent': percent_cell($cell); break; case 'amount': if ($cell == '') { label_cell(''); } else { amount_cell($cell, false); } break; case 'qty': if ($cell == '') { label_cell(''); } else { qty_cell($cell, false, isset($col['dec']) ? $col['dec'] : null); } break; case 'email': email_cell($cell, isset($col['align']) ? "align='" . $col['align'] . "'" : null); break; case 'rate': label_cell(number_format2($cell, user_exrate_dec()), "align=center"); break; case 'inactive': if (get_post('show_inactive')) { $pager->inactive_control_cell($row); } break; default: // case 'text': if (isset($col['align'])) { label_cell($cell, "align='" . $col['align'] . "'"); } else { label_cell($cell); } case 'skip': // column not displayed } } end_row(); } // end of while loop if ($pager->footer_fun) { // if set footer handler start_row("class='{$pager->footer_class}'"); $fun = $pager->footer_fun; if (method_exists($pager, $fun)) { $h = $pager->{$fun}($pager); } elseif (function_exists($fun)) { $h = $fun($pager); } foreach ($h as $c) { // draw footer columns $pars = isset($c[1]) ? $c[1] : ''; label_cell($c[0], $pars); } end_row(); } start_row("class='navibar'"); $colspan = count($pager->columns); $inact = @$pager->inactive_ctrl == true ? ' ' . checkbox(null, 'show_inactive', null, true) . _("Show also Inactive") : ''; end_row(); end_table(); $but_pref = $pager->name . '_page_'; // if (@$pager->inactive_ctrl) // submit('Update', _('Update'), true, '', null); // inactive update $context = array('first' => $this->pager_button($but_pref . 'first', _('«'), $pager->first_page), 'previous' => $this->pager_button($but_pref . 'prev', _('‹'), $pager->prev_page), 'next' => $this->pager_button($but_pref . 'next', _('›'), $pager->next_page), 'last' => $this->pager_button($but_pref . 'last', _('»'), $pager->last_page)); $from = ($pager->curr_page - 1) * $pager->page_len + 1; $to = $from + $pager->page_len - 1; if ($to > $pager->rec_count) { $to = $pager->rec_count; } $all = $pager->rec_count; // echo sprintf(_('Records %d-%d of %d'), $from, $to, $all); // echo $inact; // echo "</td>"; echo ThemeBootstrap::get()->renderBlock('controls.twig.html', 'pager', $context); /* if ($pager->rec_count) { echo "<td colspan=$colspan class='navibar' style='border:none;padding:3px;'>"; echo "<div style='float:right;'>"; $but_pref = $pager->name . '_page_'; start_table(); start_row(); if (@$pager->inactive_ctrl) submit('Update', _('Update'), true, '', null); // inactive update echo navi_button_cell($but_pref . 'first', _('First'), $pager->first_page, 'right'); echo navi_button_cell($but_pref . 'prev', _('Prev'), $pager->prev_page, 'right'); echo navi_button_cell($but_pref . 'next', _('Next'), $pager->next_page, 'right'); echo navi_button_cell($but_pref . 'last', _('Last'), $pager->last_page, 'right'); end_row(); end_table(); echo "</div>"; $from = ($pager->curr_page - 1) * $pager->page_len + 1; $to = $from + $pager->page_len - 1; if ($to > $pager->rec_count) $to = $pager->rec_count; $all = $pager->rec_count; echo sprintf(_('Records %d-%d of %d'), $from, $to, $all); echo $inact; echo "</td>"; } else { label_cell(_('No records') . $inact, "colspan=$colspan class='navibar'"); } */ if (isset($pager->marker_txt)) { display_note($pager->marker_txt, 0, 1, "class='{$pager->notice_class}'"); } div_end(); return true; }
if ($stock_item->quantity - $stock_item->qty_received > 0 && date1_greater_date2(Today(), $stock_item->req_del_date)) { start_row("class='overduebg'"); $overdue_items = true; } else { 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_decimal_cell($stock_item->price); label_cell($stock_item->req_del_date); amount_cell($line_total); qty_cell($stock_item->qty_received, false, $dec); 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", 2); $taxes = $purchase_order->get_taxes(); $tax_total = display_edit_tax_items($taxes, 6, $purchase_order->tax_included, 2); $display_total = price_format($total + $tax_total); start_row(); label_cells(_("Amount Total"), $display_total, "colspan=6 align='right'", "align='right'"); label_cell('', "colspan=2"); end_row(); end_table(); if ($overdue_items) { display_note(_("Marked items are overdue."), 0, 0, "class='overduefg'");
$purchase_order = new purch_order(); read_grn($_GET["trans_no"], $purchase_order); display_heading(tr("Purchase Order Delivery") . " #" . $_GET['trans_no']); echo "<BR>"; display_grn_summary($purchase_order); display_heading2(tr("Line Details")); start_table("colspan=9 {$table_style} width=90%"); $th = array(tr("Item Code"), tr("Item Description"), tr("Delivery Date"), tr("Quantity"), tr("Unit"), tr("Price"), tr("Line Total"), tr("Quantity Invoiced")); table_header($th); $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"); qty_cell($stock_item->qty_received); label_cell($stock_item->units); amount_cell($stock_item->price); amount_cell($line_total); qty_cell($stock_item->qty_inv); end_row(); $total += $line_total; } $display_total = number_format2($total, user_price_dec()); label_row(tr("Total Excluding Tax/Shipping"), $display_total, "colspan=6", "nowrap align=right"); end_table(1); is_voided_display(25, $_GET['trans_no'], tr("This delivery has been voided.")); end_page(true);
if (is_array($q_class)) { list($ln_itm->qty_dispatched, $row_classes) = $q_class; $has_marked = true; } } alt_table_row_color($k, $row_classes); view_stock_status_cell($ln_itm->stock_id); if ($ln_itm->descr_editable) { text_cells(null, 'Line' . $line . 'Desc', $ln_itm->item_description, 30, 50); } else { label_cell($ln_itm->item_description); } $dec = get_qty_dec($ln_itm->stock_id); qty_cell($ln_itm->quantity, false, $dec); label_cell($ln_itm->units); qty_cell($ln_itm->qty_done, false, $dec); if (isset($_POST['clear_quantity'])) { $ln_itm->qty_dispatched = 0; } $_POST['Line' . $line] = $ln_itm->qty_dispatched; /// clear post so value displayed in the fiel is the 'new' quantity small_qty_cells(null, 'Line' . $line, qty_format($ln_itm->qty_dispatched, $ln_itm->stock_id, $dec), null, null, $dec); $display_discount_percent = percent_format($ln_itm->discount_percent * 100) . "%"; $line_total = $ln_itm->qty_dispatched * $ln_itm->price * (1 - $ln_itm->discount_percent); amount_cell($ln_itm->price); label_cell($ln_itm->tax_type_name); label_cell($display_discount_percent, "nowrap align=right"); amount_cell($line_total); end_row(); } $_POST['ChargeFreightCost'] = get_post('ChargeFreightCost', price_format($_SESSION['Items']->freight_cost));
function display_credit_items() { start_form(); hidden('cart_id'); start_table(TABLESTYLE2, "width=80%", 5); echo "<tr><td>"; // outer table start_table(TABLESTYLE, "width=100%"); start_row(); label_cells(_("Customer"), $_SESSION['Items']->customer_name, "class='tableheader2'"); label_cells(_("Branch"), get_branch_name($_SESSION['Items']->Branch), "class='tableheader2'"); label_cells(_("Currency"), $_SESSION['Items']->customer_currency, "class='tableheader2'"); end_row(); start_row(); // if (!isset($_POST['ref'])) // $_POST['ref'] = $Refs->get_next(11); if ($_SESSION['Items']->trans_no == 0) { ref_cells(_("Reference"), 'ref', '', null, "class='tableheader2'"); } else { label_cells(_("Reference"), $_SESSION['Items']->reference, "class='tableheader2'"); } label_cells(_("Crediting Invoice"), get_customer_trans_view_str(ST_SALESINVOICE, array_keys($_SESSION['Items']->src_docs)), "class='tableheader2'"); if (!isset($_POST['ShipperID'])) { $_POST['ShipperID'] = $_SESSION['Items']->ship_via; } label_cell(_("Shipping Company"), "class='tableheader2'"); shippers_list_cells(null, 'ShipperID', $_POST['ShipperID']); // if (!isset($_POST['sales_type_id'])) // $_POST['sales_type_id'] = $_SESSION['Items']->sales_type; // label_cell(_("Sales Type"), "class='tableheader2'"); // sales_types_list_cells(null, 'sales_type_id', $_POST['sales_type_id']); end_row(); end_table(); echo "</td><td>"; // outer table start_table(TABLESTYLE, "width=100%"); if ($_SESSION['Items']->custom_num != '') { text_row(_("Credit Memo No."), 'custom_num', $_SESSION['Items']->custom_num, null, "class='tableheader2'"); } else { text_row(_("Credit Memo No."), 'custom_num', '', null, "class='tableheader2'"); } //moodlearning label_row(_("Invoice Date"), $_SESSION['Items']->src_date, "class='tableheader2'"); date_row(_("Credit Note Date"), 'CreditDate', '', $_SESSION['Items']->trans_no == 0, 0, 0, 0, "class='tableheader2'"); end_table(); echo "</td></tr>"; end_table(1); // outer table div_start('credit_items'); start_table(TABLESTYLE, "width=80%"); $th = array(_("Item Code"), _("Item Description"), _("Invoiced Quantity"), _("Units"), _("Credited"), _("Credit Quantity"), _("Price"), _("Discount %"), _("Total")); //Karen edited Credited table_header($th); $k = 0; //row colour counter foreach ($_SESSION['Items']->line_items as $line_no => $ln_itm) { if ($ln_itm->quantity == $ln_itm->qty_done) { continue; // this line was fully credited/removed } alt_table_row_color($k); // view_stock_status_cell($ln_itm->stock_id); alternative view label_cell($ln_itm->stock_id); text_cells(null, 'Line' . $line_no . 'Desc', $ln_itm->item_description, 30, 50); $dec = get_qty_dec($ln_itm->stock_id); qty_cell($ln_itm->quantity, false, $dec); label_cell($ln_itm->units); label_cell($ln_itm->qty_done); //Karen edited amount_cells(null, 'Line' . $line_no, number_format2($ln_itm->qty_dispatched, $dec), null, null, $dec); $line_total = $ln_itm->qty_dispatched * $ln_itm->price * (1 - $ln_itm->discount_percent); amount_cell($ln_itm->price); percent_cell($ln_itm->discount_percent * 100); amount_cell($line_total); end_row(); } if (!check_num('ChargeFreightCost')) { $_POST['ChargeFreightCost'] = price_format($_SESSION['Items']->freight_cost); } $colspan = 8; //Karen edited 7 start_row(); label_cell(_("Credit Shipping Cost"), "colspan={$colspan} align=right"); small_amount_cells(null, "ChargeFreightCost", price_format(get_post('ChargeFreightCost', 0))); end_row(); /*moodlearning*/ start_row(); label_cell(_("Bulk Discount"), "colspan={$colspan} align=right"); small_amount_cells(null, "bulk_dis", $_SESSION['Items']->bulk_discount); end_row(); /* */ $inv_items_total = $_SESSION['Items']->get_items_total_dispatch(); $discount = input_num('bulk_dis') / 100; $display_sub_total = price_format($inv_items_total + input_num($_POST['ChargeFreightCost'])); label_row(_("Sub-total"), $display_sub_total, "colspan={$colspan} align=right", "align=right"); $taxes = $_SESSION['Items']->get_taxes(input_num($_POST['ChargeFreightCost'])); $tax_total = display_edit_tax_items($taxes, $colspan, $_SESSION['Items']->tax_included); /*moodlearning*/ $total = $inv_items_total + input_num('ChargeFreightCost') + $tax_total; $tot = price_format($total - $total * $discount); /* */ $display_total = price_format($inv_items_total + input_num('ChargeFreightCost') + $tax_total); label_row(_("Credit Note Total"), $tot, "colspan={$colspan} align=right", "align=right"); //moodlearning edit $tot end_table(); div_end(); }
$k = 0; $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);
} elseif ($myrow["type"] == ST_LOCTRANSFER || $myrow["type"] == ST_INVADJUST) { // get the adjustment type $movement_type = get_movement_type($myrow["person_id"]); $person = $movement_type["name"]; } elseif ($myrow["type"] == ST_WORKORDER || $myrow["type"] == ST_MANUISSUE || $myrow["type"] == ST_MANURECEIVE) { $person = ""; } label_cell($person); label_cell($myrow["qty"] >= 0 ? $quantity_formatted : "", "nowrap align=right"); label_cell($myrow["qty"] < 0 ? $quantity_formatted : "", "nowrap align=right"); qty_cell($after_qty, false, $dec); end_row(); $j++; if ($j == 12) { $j = 1; table_header($th); } //end of page full new headings if } //end of while loop start_row("class='inquirybg'"); label_cell("<b>" . _("Quantity on hand after") . " " . $_POST['BeforeDate'] . "</b>", "align=center colspan=5"); qty_cell($total_in, false, $dec); qty_cell($total_out, false, $dec); qty_cell($after_qty, false, $dec); end_row(); end_table(1); div_end(); if (!@$_GET['popup']) { end_page(@$_GET['popup'], false, false); }