function display_gl_heading($myrow) { global $table_style; $trans_name = systypes::name($_GET['type_id']); start_table("{$table_style} width=95%"); $th = array(tr("General Ledger Transaction Details"), tr("Date"), tr("Person/Item")); table_header($th); start_row(); label_cell("{$trans_name} #" . $_GET['trans_no']); label_cell(sql2date($myrow["tran_date"])); label_cell(payment_person_types::person_name($myrow["person_type_id"], $myrow["person_id"])); end_row(); comments_display_row($_GET['type_id'], $_GET['trans_no']); end_table(1); }
function display_gl_heading($myrow) { global $systypes_array; $trans_name = $systypes_array[$_GET['type_id']]; start_table(TABLESTYLE, "width='95%'"); $th = array(_("General Ledger Transaction Details"), _("Reference"), _("Date"), _("Person/Item")); table_header($th); start_row(); label_cell("{$trans_name} #" . $_GET['trans_no']); label_cell($myrow["reference"]); label_cell(sql2date($myrow["tran_date"])); label_cell(payment_person_name($myrow["person_type_id"], $myrow["person_id"])); end_row(); comments_display_row($_GET['type_id'], $_GET['trans_no']); end_table(1); }
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_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_gl_heading($myrow) { global $systypes_array; $title = ""; //moodlearning if ($myrow['type'] == 55 || $myrow['type'] == 1) { if ($myrow['type'] == 0) { $title = "JV No."; $num = substr($ser['year'], 2); } if ($myrow['type'] == 55) { $voucher_type = "Check Voucher"; $title = "CV No."; $myDateTime = DateTime::createFromFormat('Y-m-d', $myrow['tran_date']); $newDateString = $myDateTime->format('d-m-Y'); $year = substr($newDateString, 8) . "-"; } } $trans_name = $systypes_array[$_GET['type_id']]; start_table(TABLESTYLE, "width=95%"); if ($myrow['type'] == 0 || $myrow['type'] == 1 || $myrow['type'] == 55) { $th = array(_("General Ledger Transaction Details"), _("Reference"), _("Date"), _("Person/Item"), $title); } else { $th = array(_("General Ledger Transaction Details"), _("Reference"), _("Date"), _("Person/Item")); } table_header($th); start_row(); if ($custom == 0) { label_cell("{$trans_name} #" . $_GET['type_id']); } else { label_cell("{$trans_name} #" . get_customized_no($myrow['type'], $myrow['type_no'])); } label_cell($myrow["reference"]); label_cell(sql2date($myrow["tran_date"])); label_cell(payment_person_name($myrow["person_type_id"], $myrow["person_id"])); if ($myrow['type'] == 0 || $myrow['type'] == 1 || $myrow['type'] == 55) { label_cell($year . str_pad(get_customized_no($myrow['type'], $myrow['type_no']), 4, 0, STR_PAD_LEFT)); } //moodlearning end_row(); comments_display_row($_GET['type_id'], $_GET['trans_no']); end_table(1); }
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.")); }
$to_trans = $transfer_items[1]; display_heading(systypes::name(systypes::location_transfer()) . " #{$trans_no}"); echo "<br>"; start_table("{$table_style2} width=90%"); 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(); }
if (strlen($myrow[0]) == 0) { echo _("The dimension number sent is not valid."); exit; } start_table(TABLESTYLE); $th = array(_("#"), _("Reference"), _("Name"), _("Type"), _("Date"), _("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(ST_DIMENSION, $id); end_table(); if ($myrow["closed"] == true) { display_note(_("This dimension is closed.")); } start_form(); start_table(TABLESTYLE_NOBORDER); start_row(); if (!isset($_POST['TransFromDate'])) { $_POST['TransFromDate'] = begin_fiscalyear(); } if (!isset($_POST['TransToDate'])) { $_POST['TransToDate'] = Today(); } date_cells(_("from:"), 'TransFromDate'); date_cells(_("to:"), 'TransToDate');
$supp_trans = new supp_trans(ST_SUPPCREDIT); read_supp_invoice($trans_no, ST_SUPPCREDIT, $supp_trans); 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)); }
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"); label_cells(_("Date"), sql2date($from_trans['trans_date']), "class='tableheader2'"); end_row(); start_row(); label_cells(_("Pay To"), payment_person_name($from_trans['person_type_id'], $from_trans['person_id']), "class='tableheader2'", "colspan={$colspan1}"); label_cells(_("Payment Type"), $bank_transfer_types[$from_trans['account_type']], "class='tableheader2'"); end_row(); start_row(); label_cells(_("Reference"), $from_trans['ref'], "class='tableheader2'", "colspan={$colspan2}"); end_row(); comments_display_row(ST_BANKPAYMENT, $trans_no); end_table(1); $voided = is_voided_display(ST_BANKPAYMENT, $trans_no, _("This payment has been voided.")); $items = get_gl_trans(ST_BANKPAYMENT, $trans_no); if (db_num_rows($items) == 0) { display_note(_("There are no items for this payment.")); } else { display_heading2(_("Items for this Payment")); if ($show_currencies) { display_heading2(_("Item Amounts are Shown in :") . " " . $company_currency); } echo "<br>"; start_table(TABLESTYLE, "width=80%"); $dim = get_company_pref('use_dimension'); if ($dim == 2) { $th = array(_("Account Code"), _("Account Description"), _("Dimension") . " 1", _("Dimension") . " 2", _("Amount"), _("Memo"));
$to_trans = $transfer_items[1]; display_heading($systypes_array[ST_LOCTRANSFER] . " #{$trans_no}"); echo "<br>"; start_table(TABLESTYLE2, "width=90%"); 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(); }
include_once $path_to_root . "/includes/date_functions.inc"; include_once $path_to_root . "/includes/ui.inc"; include_once $path_to_root . "/sales/includes/sales_db.inc"; if (isset($_GET["trans_no"])) { $trans_id = $_GET["trans_no"]; } $receipt = get_customer_trans($trans_id, systypes::cust_payment()); display_heading(sprintf(tr("Customer Payment #%d"), $trans_id)); echo "<br>"; start_table("{$table_style} width=80%"); start_row(); label_cells(tr("From Customer"), $receipt['DebtorName'], "class='tableheader2'"); label_cells(tr("Into Bank Account"), $receipt['bank_account_name'], "class='tableheader2'"); label_cells(tr("Date of Deposit"), sql2date($receipt['tran_date']), "class='tableheader2'"); end_row(); start_row(); label_cells(tr("Payment Currency"), $receipt['curr_code'], "class='tableheader2'"); label_cells(tr("Amount"), price_format($receipt['ov_amount']), "class='tableheader2'"); label_cells(tr("Discount"), price_format($receipt['ov_discount']), "class='tableheader2'"); end_row(); start_row(); label_cells(tr("Payment Type"), $receipt['BankTransType'], "class='tableheader2'"); label_cells(tr("Reference"), $receipt['reference'], "class='tableheader2'", "colspan=4"); end_row(); comments_display_row(systypes::cust_payment(), $trans_id); end_table(1); $voided = is_voided_display(systypes::cust_payment(), $trans_id, tr("This customer payment has been voided.")); if (!$voided) { display_allocations_from(payment_person_types::customer(), $receipt['debtor_no'], systypes::cust_payment(), $trans_id, -$receipt['Total']); } end_page(true);
start_table(TABLESTYLE, "width='100%'"); start_row(); label_cells(_("Reference"), $myrow["reference"], "class='tableheader2'"); label_cells(_("Currency"), $sales_order["curr_code"], "class='tableheader2'"); label_cells(_("Our Order No"), get_customer_trans_view_str(ST_SALESORDER, $sales_order["order_no"]), "class='tableheader2'"); end_row(); start_row(); label_cells(_("Customer Order Ref."), $sales_order["customer_ref"], "class='tableheader2'"); label_cells(_("Shipping Company"), $myrow["shipper_name"], "class='tableheader2'"); label_cells(_("Sales Type"), $myrow["sales_type"], "class='tableheader2'"); end_row(); start_row(); label_cells(_("Dispatch Date"), sql2date($myrow["tran_date"]), "class='tableheader2'", "nowrap"); label_cells(_("Due Date"), sql2date($myrow["due_date"]), "class='tableheader2'", "nowrap"); end_row(); comments_display_row(ST_CUSTDELIVERY, $trans_id); end_table(); echo "</td></tr>"; end_table(1); // outer table $result = get_customer_trans_details(ST_CUSTDELIVERY, $trans_id); start_table(TABLESTYLE, "width='95%'"); if (db_num_rows($result) > 0) { $th = array(_("Item Code"), _("Item Description"), _("Quantity"), _("Unit"), _("Price"), _("Discount %"), _("Total")); table_header($th); $k = 0; //row colour counter $sub_total = 0; while ($myrow2 = db_fetch($result)) { if ($myrow2['quantity'] == 0) { continue;
table_header($th); label_row(null, $branch["br_name"] . "<br>" . nl2br($branch["br_address"]), "nowrap"); end_table(); echo "</td><td>"; // outer table start_table("{$table_style} width=100%"); start_row(); label_cells(tr("Ref"), $myrow["reference"], "class='tableheader2'"); label_cells(tr("Date"), sql2date($myrow["tran_date"]), "class='tableheader2'"); label_cells(tr("Currency"), $myrow["curr_code"], "class='tableheader2'"); end_row(); start_row(); label_cells(tr("Sales Type"), $myrow["sales_type"], "class='tableheader2'"); label_cells(tr("Shipping Company"), $myrow["shipper_name"], "class='tableheader2'"); end_row(); comments_display_row(11, $trans_id); end_table(); echo "</td></tr>"; end_table(1); // outer table $sub_total = 0; $result = get_customer_trans_details(11, $trans_id); start_table("{$table_style} width=95%"); if (db_num_rows($result) > 0) { $th = array(tr("Item Code"), tr("Item Description"), tr("Quantity"), tr("Unit"), tr("Price"), tr("Discount %"), tr("Total")); table_header($th); $k = 0; //row colour counter $sub_total = 0; while ($myrow2 = db_fetch($result)) { alt_table_row_color($k);
display_heading(_("SUPPLIER INVOICE") . " # " . $trans_no); 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'"); if (!is_company_currency($supplier_curr_code)) { label_cells(_("Currency"), $supplier_curr_code, "class='tableheader2'"); } end_row(); comments_display_row(ST_SUPPINVOICE, $trans_no); end_table(1); $total_gl = display_gl_items($supp_trans, 2); $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=15%"); $tax_items = get_trans_tax_details(ST_SUPPINVOICE, $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(_("TOTAL INVOICE"), $display_total, "colspan=1 align=right", "nowrap align=right"); end_table(1); $voided = is_voided_display(ST_SUPPINVOICE, $trans_no, _("This invoice has been voided.")); if (!$voided) { display_allocations_to(PT_SUPPLIER, $supp_trans->supplier_id, ST_SUPPINVOICE, $trans_no, $supp_trans->ov_amount + $supp_trans->ov_gst); }
echo "<br>"; start_table("{$table_style2} width=80%"); start_row(); label_cells(tr("To Supplier"), $receipt['supplier_name'], "class='tableheader2'"); label_cells(tr("From Bank Account"), $receipt['bank_account_name'], "class='tableheader2'"); label_cells(tr("Date Paid"), sql2date($receipt['tran_date']), "class='tableheader2'"); end_row(); start_row(); if ($show_currencies) { label_cells(tr("Payment Currency"), $receipt['bank_curr_code'], "class='tableheader2'"); } label_cells(tr("Amount"), number_format2(-$receipt['BankAmount'], user_price_dec()), "class='tableheader2'"); label_cells(tr("Payment Type"), $receipt['BankTransType'], "class='tableheader2'"); end_row(); start_row(); if ($show_currencies) { label_cells(tr("Supplier's Currency"), $receipt['SupplierCurrCode'], "class='tableheader2'"); } if ($show_both_amounts) { label_cells(tr("Amount"), number_format2(-$receipt['ov_amount'], user_price_dec()), "class='tableheader2'"); } label_cells(tr("Reference"), $receipt['ref'], "class='tableheader2'"); end_row(); comments_display_row(22, $trans_no); end_table(1); $voided = is_voided_display(22, $trans_no, tr("This payment has been voided.")); // now display the allocations for this payment if (!$voided) { display_allocations_from(payment_person_types::supplier(), $receipt['supplier_id'], 22, $trans_no, -$receipt['ov_amount']); } end_page(true);
} 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);
} display_heading(systypes::name(systypes::bank_transfer()) . " #{$trans_no}"); echo "<br>"; start_table("{$table_style} width=80%"); start_row(); label_cells(tr("From Bank Account"), $from_trans['bank_account_name'], "class='tableheader2'"); if ($show_currencies) { label_cells(tr("Currency"), $from_trans['bank_curr_code'], "class='tableheader2'"); } label_cells(tr("Amount"), number_format2(-$from_trans['amount'], user_price_dec()), "class='tableheader2'", "align=right"); if ($show_currencies) { end_row(); start_row(); } label_cells(tr("To Bank Account"), $to_trans['bank_account_name'], "class='tableheader2'"); if ($show_currencies) { label_cells(tr("Currency"), $to_trans['bank_curr_code'], "class='tableheader2'"); } if ($show_both_amounts) { label_cells(tr("Amount"), number_format2($to_trans['amount'], user_price_dec()), "class='tableheader2'", "align=right"); } end_row(); start_row(); label_cells(tr("Date"), sql2date($from_trans['trans_date']), "class='tableheader2'"); label_cells(tr("Transfer Type"), $from_trans['BankTransType'], "class='tableheader2'"); label_cells(tr("Reference"), $from_trans['ref'], "class='tableheader2'"); end_row(); comments_display_row(systypes::bank_transfer(), $trans_no); end_table(1); is_voided_display(systypes::bank_transfer(), $trans_no, tr("This transfer has been voided.")); end_page(true);
display_heading($systypes_array[ST_INVADJUST] . " #{$trans_no}"); br(1); $adjustment_items = get_stock_adjustment_items($trans_no); $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(); }
table_header($th); label_row(null, $branch["br_name"] . "<br>" . nl2br($branch["br_address"]), "nowrap"); end_table(); echo "</td><td>"; // outer table start_table(TABLESTYLE, "width='100%'"); start_row(); label_cells(_("Ref"), $myrow["reference"], "class='tableheader2'"); label_cells(_("Date"), sql2date($myrow["tran_date"]), "class='tableheader2'"); label_cells(_("Currency"), $myrow["curr_code"], "class='tableheader2'"); end_row(); start_row(); label_cells(_("Sales Type"), $myrow["sales_type"], "class='tableheader2'"); label_cells(_("Shipping Company"), $myrow["shipper_name"], "class='tableheader2'"); end_row(); comments_display_row(ST_CUSTCREDIT, $trans_id); end_table(); echo "</td></tr>"; end_table(1); // outer table $sub_total = 0; $result = get_customer_trans_details(ST_CUSTCREDIT, $trans_id); start_table(TABLESTYLE, "width='95%'"); if (db_num_rows($result) > 0) { $th = array(_("Item Code"), _("Item Description"), _("Quantity"), _("Unit"), _("Price"), _("Discount %"), _("Total")); table_header($th); $k = 0; //row colour counter $sub_total = 0; while ($myrow2 = db_fetch($result)) { if ($myrow2["quantity"] == 0) {
include_once $path_to_root . "/dimensions/includes/dimensions_db.inc"; 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);
start_row(); label_cells(_("Reference"), $myrow["reference"], "class='tableheader2'"); label_cells(_("Currency"), $sales_order["curr_code"], "class='tableheader2'"); label_cells(_("Our Order No"), get_customer_trans_view_str(ST_SALESORDER, $sales_order["order_no"]), "class='tableheader2'"); end_row(); start_row(); label_cells(_("Customer Order Ref."), $sales_order["customer_ref"], "class='tableheader2'"); label_cells(_("Shipping Company"), $myrow["shipper_name"], "class='tableheader2'"); label_cells(_("Sales Type"), $myrow["sales_type"], "class='tableheader2'"); end_row(); start_row(); label_cells(_("Invoice Date"), sql2date($myrow["tran_date"]), "class='tableheader2'", "nowrap"); label_cells(_("Due Date"), sql2date($myrow["due_date"]), "class='tableheader2'", "nowrap"); label_cells(_("Deliveries"), get_customer_trans_view_str(ST_CUSTDELIVERY, get_sales_parent_numbers(ST_SALESINVOICE, $trans_id)), "class='tableheader2'"); end_row(); comments_display_row(ST_SALESINVOICE, $trans_id); end_table(); echo "</td></tr>"; end_table(1); // outer table $result = get_customer_trans_details(ST_SALESINVOICE, $trans_id); start_table(TABLESTYLE, "width=95%"); if (db_num_rows($result) > 0) { $th = array(_("Item Code"), _("Item Description"), _("Quantity"), _("Unit"), _("Price"), _("Discount %"), _("Total")); table_header($th); $k = 0; //row colour counter $sub_total = 0; while ($myrow2 = db_fetch($result)) { if ($myrow2["quantity"] == 0) { continue;
label_cells(_("Payment Currency"), $receipt['bank_curr_code'], "class='tableheader2'"); } 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);
start_row(); label_cells(tr("To Bank Account"), $to_trans['bank_account_name'], "class='tableheader2'"); if ($show_currencies) { label_cells(tr("Currency"), $to_trans['bank_curr_code'], "class='tableheader2'"); } label_cells(tr("Amount"), number_format2($to_trans['amount'], user_price_dec()), "class='tableheader2'", "align=right"); label_cells(tr("Date"), sql2date($to_trans['trans_date']), "class='tableheader2'"); end_row(); start_row(); label_cells(tr("From"), payment_person_types::person_name($to_trans['person_type_id'], $to_trans['person_id']), "class='tableheader2'", "colspan={$colspan1}"); label_cells(tr("Deposit Type"), $to_trans['BankTransType'], "class='tableheader2'"); end_row(); start_row(); label_cells(tr("Reference"), $to_trans['ref'], "class='tableheader2'", "colspan={$colspan2}"); end_row(); comments_display_row(systypes::bank_deposit(), $trans_no); end_table(1); is_voided_display(systypes::bank_deposit(), $trans_no, tr("This deposit has been voided.")); $items = get_gl_trans(systypes::bank_deposit(), $trans_no); if (db_num_rows($items) == 0) { echo "<br>" . tr("There are no items for this deposit."); } else { display_heading2(tr("Items for this Deposit")); if ($show_currencies) { display_heading2(tr("Item Amounts are Shown in :") . " " . $company_currency); } start_table("{$table_style} width=80%"); $th = array(tr("Account Code"), tr("Account Description"), tr("Amount"), tr("Memo")); table_header($th); $k = 0; //row colour counter
} 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);
start_row(); label_cells(tr("From Bank Account"), $from_trans['bank_account_name'], "class='tableheader2'"); if ($show_currencies) { label_cells(tr("Currency"), $from_trans['bank_curr_code'], "class='tableheader2'"); } label_cells(tr("Amount"), number_format2(-$from_trans['amount'], user_price_dec()), "class='tableheader2'", "align=right"); label_cells(tr("Date"), sql2date($from_trans['trans_date']), "class='tableheader2'"); end_row(); start_row(); label_cells(tr("Pay To"), payment_person_types::person_name($from_trans['person_type_id'], $from_trans['person_id']), "class='tableheader2'", "colspan={$colspan1}"); label_cells(tr("Payment Type"), $from_trans['BankTransType'], "class='tableheader2'"); end_row(); start_row(); label_cells(tr("Reference"), $from_trans['ref'], "class='tableheader2'", "colspan={$colspan2}"); end_row(); comments_display_row(systypes::bank_payment(), $trans_no); end_table(1); $voided = is_voided_display(systypes::bank_payment(), $trans_no, tr("This payment has been voided.")); $items = get_gl_trans(systypes::bank_payment(), $trans_no); if (db_num_rows($items) == 0) { echo "<br>" . tr("There are no items for this payment."); } else { display_heading2(tr("Items for this Payment")); if ($show_currencies) { display_heading2(tr("Item Amounts are Shown in :") . " " . $company_currency); } echo "<br>"; start_table("{$table_style} width=80%"); $th = array(tr("Account Code"), tr("Account Description"), tr("Amount"), tr("Memo")); table_header($th); $k = 0;
} label_cells(_("Amount"), number_format2($to_trans['amount'], user_price_dec()), "class='tableheader2'", "align=right"); label_cells(_("Date"), sql2date($to_trans['trans_date']), "class='tableheader2'"); end_row(); start_row(); label_cells(_("From"), payment_person_name($to_trans['person_type_id'], $to_trans['person_id']), "class='tableheader2'", "colspan={$colspan1}"); if ($show_currencies) { label_cells(_("Settle currency"), $to_trans['settle_curr'], "class='tableheader2'"); label_cells(_("Settled amount"), number_format2($to_trans['settled_amount'], user_price_dec()), "class='tableheader2'"); } label_cells(_("Deposit Type"), $bank_transfer_types[$to_trans['account_type']], "class='tableheader2'"); end_row(); start_row(); label_cells(_("Reference"), $to_trans['ref'], "class='tableheader2'", "colspan={$colspan2}"); end_row(); comments_display_row(ST_BANKDEPOSIT, $trans_no); end_table(1); is_voided_display(ST_BANKDEPOSIT, $trans_no, _("This deposit has been voided.")); $items = get_gl_trans(ST_BANKDEPOSIT, $trans_no); if (db_num_rows($items) == 0) { display_note(_("There are no items for this deposit.")); } else { display_heading2(_("Items for this Deposit")); if ($show_currencies) { display_heading2(_("Item Amounts are Shown in:") . " " . $company_currency); } start_table(TABLESTYLE, "width=80%"); $dim = get_company_pref('use_dimension'); if ($dim == 2) { $th = array(_("Account Code"), _("Account Description"), _("Dimension") . " 1", _("Dimension") . " 2", _("Amount"), _("Memo")); } else {
} display_heading(systypes::name(systypes::inventory_adjustment()) . " #{$trans_no}"); $adjustment_items = get_stock_adjustment_items($trans_no); $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(); }