本文整理汇总了PHP中FrontReport::Textcol方法的典型用法代码示例。如果您正苦于以下问题:PHP FrontReport::Textcol方法的具体用法?PHP FrontReport::Textcol怎么用?PHP FrontReport::Textcol使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FrontReport
的用法示例。
在下文中一共展示了FrontReport::Textcol方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: print_inventory_valuation_report
function print_inventory_valuation_report()
{
global $path_to_root;
include_once $path_to_root . "reporting/includes/pdf_report.inc";
$category = $_REQUEST['PARAM_0'];
$location = $_REQUEST['PARAM_1'];
$detail = $_REQUEST['PARAM_2'];
$comments = $_REQUEST['PARAM_3'];
$dec = user_price_dec();
if ($category == reserved_words::get_all_numeric()) {
$category = 0;
}
if ($category == 0) {
$cat = tr('All');
} else {
$cat = get_category_name($category);
}
if ($location == reserved_words::get_all()) {
$location = 'all';
}
if ($location == 'all') {
$loc = tr('All');
} else {
$loc = $location;
}
$cols = array(0, 100, 250, 350, 450, 515);
$headers = array(tr('Category'), '', tr('Quantity'), tr('Unit Cost'), tr('Value'));
$aligns = array('left', 'left', 'right', 'right', 'right');
$params = array(0 => $comments, 1 => array('text' => tr('Category'), 'from' => $cat, 'to' => ''), 2 => array('text' => tr('Location'), 'from' => $loc, 'to' => ''));
$rep = new FrontReport(tr('Inventory Valuation Report'), "InventoryValReport.pdf", user_pagesize());
$rep->Font();
$rep->Info($params, $cols, $headers, $aligns);
$rep->Header();
$res = getTransactions($category, $location);
$total = $grandtotal = 0.0;
$catt = '';
while ($trans = db_fetch($res)) {
if ($catt != $trans['cat_description']) {
if ($catt != '') {
if ($detail) {
$rep->NewLine(2, 3);
$rep->TextCol(0, 4, tr('Total'));
}
$rep->Textcol(4, 5, number_format2($total, $dec));
if ($detail) {
$rep->Line($rep->row - 2);
$rep->NewLine();
}
$rep->NewLine();
$total = 0.0;
}
$rep->TextCol(0, 1, $trans['category_id']);
$rep->TextCol(1, 2, $trans['cat_description']);
$catt = $trans['cat_description'];
if ($detail) {
$rep->NewLine();
}
}
if ($detail) {
$rep->NewLine();
$rep->fontsize -= 2;
$rep->TextCol(0, 1, $trans['stock_id']);
$rep->TextCol(1, 2, $trans['description']);
$rep->TextCol(2, 3, number_format2($trans['QtyOnHand'], user_qty_dec()));
$rep->TextCol(3, 4, number_format2($trans['UnitCost'], $dec));
$rep->TextCol(4, 5, number_format2($trans['ItemTotal'], $dec));
$rep->fontsize += 2;
}
$total += $trans['ItemTotal'];
$grandtotal += $trans['ItemTotal'];
}
if ($detail) {
$rep->NewLine(2, 3);
$rep->TextCol(0, 4, tr('Total'));
}
$rep->Textcol(4, 5, number_format2($total, $dec));
if ($detail) {
$rep->Line($rep->row - 2);
$rep->NewLine();
}
$rep->NewLine(2, 1);
$rep->TextCol(0, 4, tr('Grand Total'));
$rep->TextCol(4, 5, number_format2($grandtotal, $dec));
$rep->Line($rep->row - 4);
$rep->End();
}