Ejemplo n.º 1
0
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."));
}
Ejemplo n.º 2
0
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."));
}
Ejemplo n.º 3
0
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."));
}
Ejemplo n.º 4
0
    }
    if ($dim > 1) {
        label_cell(get_dimension_string($myrow['dimension2_id'], true));
    }
    display_debit_or_credit_cells($myrow['amount']);
    label_cell($myrow['memo_']);
    end_row();
    if ($myrow['amount'] > 0) {
        $debit += $myrow['amount'];
    } else {
        $credit += $myrow['amount'];
    }
}
if ($heading_shown) {
    start_row("class='inquirybg' style='font-weight:bold'");
    label_cell(_("Total"), "colspan=2");
    if ($dim >= 1) {
        label_cell('');
    }
    if ($dim > 1) {
        label_cell('');
    }
    amount_cell($debit);
    amount_cell(-$credit);
    label_cell('');
    end_row();
    end_table(1);
}
//end of while loop
is_voided_display($_GET['type_id'], $_GET['trans_no'], _("This transaction has been voided."));
end_page(true, false, false, $_GET['type_id'], $_GET['trans_no']);
Ejemplo n.º 5
0
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));
}
end_page(true, false, false, ST_SUPPCREDIT, $trans_no);
Ejemplo n.º 6
0
}
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);
Ejemplo n.º 7
0
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);
Ejemplo n.º 8
0
$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);
Ejemplo n.º 9
0
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);
Ejemplo n.º 10
0
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);
}
end_page(true, false, false, ST_SUPPINVOICE, $trans_no);
Ejemplo n.º 11
0
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);
Ejemplo n.º 12
0
$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);
Ejemplo n.º 13
0
read_supp_invoice($trans_no, 20, $supp_trans);
$supplier_curr_code = get_supplier_currency($supp_trans->supplier_id);
display_heading(tr("SUPPLIER INVOICE") . " # " . $trans_no);
echo "<br>";
start_table("{$table_style} width=95%");
start_row();
label_cells(tr("Supplier"), $supp_trans->supplier_name, "class='tableheader2'");
label_cells(tr("Reference"), $supp_trans->reference, "class='tableheader2'");
label_cells(tr("Supplier's Reference"), $supp_trans->supp_reference, "class='tableheader2'");
end_row();
start_row();
label_cells(tr("Invoice Date"), $supp_trans->tran_date, "class='tableheader2'");
label_cells(tr("Due Date"), $supp_trans->due_date, "class='tableheader2'");
if (!is_company_currency($supplier_curr_code)) {
    label_cells(tr("Currency"), $supplier_curr_code, "class='tableheader2'");
}
end_row();
comments_display_row(20, $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("width=95% {$table_style}");
label_row(tr("Sub Total"), $display_sub_tot, "align=right", "nowrap align=right width=15%");
$tax_items = get_supp_invoice_tax_items(20, $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(tr("TOTAL INVOICE"), $display_total, "colspan=1 align=right", "nowrap align=right");
end_table(1);
is_voided_display(20, $trans_no, tr("This invoice has been voided."));
end_page(true);
Ejemplo n.º 14
0
        $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, "nowrap 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 dispatch."), 1, 2);
}
$display_sub_tot = price_format($sub_total);
$display_freight = price_format($myrow["ov_freight"]);
/*Print out the delivery note text entered */
label_row(tr("Sub-total"), $display_sub_tot, "colspan=6 align=right", "nowrap align=right width=15%");
label_row(tr("Shipping"), $display_freight, "colspan=6 align=right", "nowrap align=right");
$tax_items = get_customer_trans_tax_details(13, $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(tr("TOTAL VALUE"), $display_total, "colspan=6 align=right", "nowrap align=right");
end_table(1);
is_voided_display(13, $trans_id, tr("This dispatch has been voided."));
end_page(true);
Ejemplo n.º 15
0
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
    $total_amount = 0;
    while ($item = db_fetch($items)) {
Ejemplo n.º 16
0
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;
    //row colour counter
    $totalAmount = 0;
Ejemplo n.º 17
0
$myrow = get_work_order($woid);
if ($myrow["type"] == wo_types::advanced()) {
    display_wo_details($woid, true);
} else {
    display_wo_details_quick($woid, true);
}
echo "<center>";
// display the WO requirements
echo "<br>";
if ($myrow["released"] == false) {
    display_heading2(tr("BOM for item:") . " " . $myrow["StockItemName"]);
    display_bom($myrow["stock_id"]);
} else {
    display_heading2(tr("Work Order Requirements"));
    display_wo_requirements($woid, $myrow["units_reqd"]);
    if ($myrow["type"] == wo_types::advanced()) {
        echo "<br><table cellspacing=7><tr valign=top><td>";
        display_heading2(tr("Issues"));
        display_wo_issues($woid);
        echo "</td><td>";
        display_heading2(tr("Productions"));
        display_wo_productions($woid);
        echo "</td><td>";
        display_heading2(tr("Payments"));
        display_wo_payments($woid);
        echo "</td></tr></table>";
    }
}
echo "<br>";
is_voided_display(systypes::work_order(), $woid, tr("This work order has been voided."));
end_page(true);
Ejemplo n.º 18
0
        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 */
if ($sub_total != 0) {
    label_row(tr("Sub Total"), $display_sub_tot, "colspan=6 align=right", "nowrap align=right width=15%");
}
label_row(tr("Shipping"), $display_freight, "colspan=6 align=right", "nowrap align=right");
$tax_items = get_customer_trans_tax_details(11, $trans_id);
display_customer_trans_tax_details($tax_items, 6);
label_row("<font color=red>" . tr("TOTAL CREDIT") . "</font", "<font color=red>{$display_total}</font>", "colspan=6 align=right", "nowrap align=right");
end_table(1);
$voided = is_voided_display(11, $trans_id, tr("This credit note has been voided."));
if (!$voided) {
    display_allocations_from(payment_person_types::customer(), $myrow['debtor_no'], 11, $trans_id, $credit_total);
}
/* end of check to see that there was an invoice record to print */
end_page(true);
Ejemplo n.º 19
0
}
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);
Ejemplo n.º 20
0
        $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 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);
Ejemplo n.º 21
0
$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);
Ejemplo n.º 22
0
        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(_("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);
Ejemplo n.º 23
0
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"));
    } else {
        if ($dim == 1) {
Ejemplo n.º 24
0
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");
    $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']);
Ejemplo n.º 25
0
}
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);
Ejemplo n.º 26
0
        } 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");
$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);
Ejemplo n.º 27
0
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 {
        if ($dim == 1) {
            $th = array(_("Account Code"), _("Account Description"), _("Dimension"), _("Amount"), _("Memo"));
Ejemplo n.º 28
0
        $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, "nowrap 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 invoice."), 1, 2);
}
$display_sub_tot = price_format($sub_total);
$display_freight = price_format($myrow["ov_freight"]);
/*Print out the invoice text entered */
label_row(tr("Sub-total"), $display_sub_tot, "colspan=6 align=right", "nowrap align=right width=15%");
label_row(tr("Shipping"), $display_freight, "colspan=6 align=right", "nowrap align=right");
$tax_items = get_customer_trans_tax_details(10, $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(tr("TOTAL INVOICE"), $display_total, "colspan=6 align=right", "nowrap align=right");
end_table(1);
is_voided_display(10, $trans_id, tr("This invoice has been voided."));
end_page(true);