当前位置: 首页>>代码示例>>PHP>>正文


PHP FrontReport::End方法代码示例

本文整理汇总了PHP中FrontReport::End方法的典型用法代码示例。如果您正苦于以下问题:PHP FrontReport::End方法的具体用法?PHP FrontReport::End怎么用?PHP FrontReport::End使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FrontReport的用法示例。


在下文中一共展示了FrontReport::End方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: print_list_of_journal_entries

function print_list_of_journal_entries()
{
    global $path_to_root;
    include_once $path_to_root . "reporting/includes/pdf_report.inc";
    $from = $_REQUEST['PARAM_0'];
    $to = $_REQUEST['PARAM_1'];
    $systype = $_REQUEST['PARAM_2'];
    $comments = $_REQUEST['PARAM_3'];
    $dec = user_price_dec();
    $cols = array(0, 100, 240, 300, 400, 460, 520, 580);
    $headers = array(tr('Type/Account'), tr('Account Name'), tr('Date/Dim.'), tr('Person/Item/Memo'), tr('Debit'), tr('Credit'));
    $aligns = array('left', 'left', 'left', 'left', 'right', 'right');
    $params = array(0 => $comments, 1 => array('text' => tr('Period'), 'from' => $from, 'to' => $to), 2 => array('text' => tr('Type'), 'from' => systypes::name($systype), 'to' => ''));
    $rep = new FrontReport(tr('List of Journal Entries'), "JournalEntries.pdf", user_pagesize());
    $rep->Font();
    $rep->Info($params, $cols, $headers, $aligns);
    $rep->Header();
    if ($systype == -1) {
        $systype = null;
    }
    $trans = get_gl_transactions($from, $to, -1, null, 0, $systype);
    $typeno = 0;
    while ($myrow = db_fetch($trans)) {
        if ($typeno != $myrow['type_no']) {
            if ($typeno != 0) {
                $rep->Line($rep->row + 4);
                $rep->NewLine();
            }
            $typeno = $myrow['type_no'];
            $TransName = systypes::name($myrow['type']);
            $rep->TextCol(0, 2, $TransName . " # " . $myrow['type_no']);
            $rep->TextCol(2, 3, sql2date($myrow['tran_date']));
            $coms = payment_person_types::person_name($myrow["person_type_id"], $myrow["person_id"]);
            $memo = get_comments_string($myrow['type'], $myrow['type_no']);
            if ($memo != '') {
                $coms .= $coms != "" ? "/" : "" . $memo;
            }
            $rep->TextCol(3, 6, $coms);
            $rep->NewLine(2);
        }
        $rep->TextCol(0, 1, $myrow['account']);
        $rep->TextCol(1, 2, $myrow['account_name']);
        $dim_str = get_dimension_string($myrow['dimension_id']);
        $dim_str2 = get_dimension_string($myrow['dimension2_id']);
        if ($dim_str2 != "") {
            $dim_str .= "/" . $dim_str2;
        }
        $rep->TextCol(2, 3, $dim_str);
        $rep->TextCol(3, 4, $myrow['memo_']);
        if ($myrow['amount'] > 0.0) {
            $rep->TextCol(4, 5, number_format2(abs($myrow['amount']), $dec));
        } else {
            $rep->TextCol(5, 6, number_format2(abs($myrow['amount']), $dec));
        }
        $rep->NewLine(1, 2);
    }
    $rep->Line($rep->row + 4);
    $rep->End();
}
开发者ID:ravenii,项目名称:guardocs,代码行数:59,代码来源:rep702.php

示例2: print_purchases_cost

function print_purchases_cost()
{
    global $path_to_root;
    $from = $_POST['PARAM_0'];
    $to = $_POST['PARAM_1'];
    $destination = $_POST['PARAM_2'];
    $orientation = $_POST['PARAM_3'];
    if ($destination) {
        include_once $path_to_root . "/reporting/includes/excel_report.inc";
    } else {
        include_once $path_to_root . "/reporting/includes/pdf_report.inc";
    }
    $dec = user_price_dec();
    if ($category == ALL_NUMERIC) {
        $category = 0;
    }
    if ($category == 0) {
        $cat = _('All');
    } else {
        $cat = get_category_name($category);
    }
    $cols = array(0, 20, 55, 85, 125, 200, 230, 260, 290, 325, 350, 375, 425, 475);
    //14 headers + 1 lagi dapat for cols
    //todo: format date paid to 2 digits representation only i.e. 12/12/12
    $headers = array(_('CV#'), _('Date Paid'), _('OR #'), _('Supplier'), _('Title of Book'), _('Quantity'), _('Unit Cost'), _('Amount'), _('With Tax'), _('Net'), _('PO #'), _('Stock Supplied'), _('Stock Amount'), _('Total Amount'));
    //todo: Date Paid, OR(official receipt number) Amount, w/tax, net, Stock supplied, stock amount and total amount
    // Possible tables to read on:  grn_batch and grn_items
    $aligns = array('left', 'left', 'left', 'left', 'left', 'left', 'left', 'left', 'left', 'left', 'left', 'left', 'left', 'left');
    $params = array(0 => $comments, 1 => array('text' => _('Period'), 'from' => $from, 'to' => $to), 2 => array('text' => _('Category'), 'from' => $cat, 'to' => ''));
    $rep = new FrontReport(_('Summary of Purchases at Cost Report'), "SummaryPurchasesCostReport", user_pagesize(), 8, 'L');
    $rep->Font();
    $rep->Info($params, $cols, $headers, $aligns);
    $rep->NewPage();
    $res = getTransactions($from, $to);
    $total = $grandtotal = 0.0;
    $total1 = $grandtotal1 = 0.0;
    $total2 = $grandtotal2 = 0.0;
    $catt = '';
    while ($trans = db_fetch($res)) {
        $rep->NewLine();
        $rep->fontSize -= 2;
        $rep->TextCol(3, 4, $trans['supp_name']);
        $rep->TextCol(4, 5, $trans['description']);
        $rep->AmountCol(5, 6, $trans['quantity_ordered']);
        $rep->AmountCol(6, 7, $trans['unit_price']);
        $rep->AmountCol(10, 11, $trans['order_no']);
    }
    $rep->NewLine(2, 3);
    $rep->TextCol(0, 4, _('Total'));
    $rep->AmountCol(4, 5, $total, $dec);
    $rep->Line($rep->row - 2);
    $rep->NewLine();
    $rep->NewLine(2, 1);
    $rep->TextCol(0, 4, _('Grand Total'));
    $rep->AmountCol(4, 5, $grandtotal, $dec);
    $rep->Line($rep->row - 4);
    $rep->NewLine();
    $rep->End();
}
开发者ID:knjy24,项目名称:FrontAccounting,代码行数:59,代码来源:rep_purchases_cost_summary.php

示例3: print_Chart_of_Accounts

function print_Chart_of_Accounts()
{
    global $path_to_root;
    include_once $path_to_root . "reporting/includes/pdf_report.inc";
    $showbalance = $_REQUEST['PARAM_0'];
    $comments = $_REQUEST['PARAM_1'];
    $dec = 0;
    $cols = array(0, 50, 300, 425, 500);
    $headers = array(tr('Account'), tr('Account Name'), tr('Account Code'), tr('Balance'));
    $aligns = array('left', 'left', 'left', 'right');
    $params = array(0 => $comments);
    $rep = new FrontReport(tr('Chart of Accounts'), "ChartOfAccounts.pdf", user_pagesize());
    $rep->Font();
    $rep->Info($params, $cols, $headers, $aligns);
    $rep->Header();
    $classname = '';
    $group = '';
    $accounts = get_gl_accounts_all();
    while ($account = db_fetch($accounts)) {
        if ($showbalance == 1) {
            $begin = begin_fiscalyear();
            if (is_account_balancesheet($account["account_code"])) {
                $begin = "";
            }
            $balance = get_gl_trans_from_to($begin, ToDay(), $account["account_code"], 0);
        }
        if ($account['AccountTypeName'] != $group) {
            if ($classname != '') {
                $rep->row -= 4;
            }
            if ($account['AccountClassName'] != $classname) {
                $rep->Font('bold');
                $rep->TextCol(0, 4, $account['AccountClassName']);
                $rep->Font();
                $rep->row -= $rep->lineHeight + 4;
            }
            $group = $account['AccountTypeName'];
            $rep->TextCol(0, 4, $account['AccountTypeName']);
            //$rep->Line($rep->row - 4);
            $rep->row -= $rep->lineHeight + 4;
        }
        $classname = $account['AccountClassName'];
        $rep->TextCol(0, 1, $account['account_code']);
        $rep->TextCol(1, 2, $account['account_name']);
        $rep->TextCol(2, 3, $account['account_code2']);
        if ($showbalance == 1) {
            $rep->TextCol(3, 4, number_format2($balance, $dec));
        }
        $rep->NewLine();
        if ($rep->row < $rep->bottomMargin + 3 * $rep->lineHeight) {
            $rep->Line($rep->row - 2);
            $rep->Header();
        }
    }
    $rep->Line($rep->row);
    $rep->End();
}
开发者ID:ravenii,项目名称:guardocs,代码行数:57,代码来源:rep701.php

示例4: print_royalty_sales

function print_royalty_sales()
{
    $item_id = $_POST['PARAM_0'];
    global $path_to_root, $systypes_array;
    if ($destination) {
        include_once $path_to_root . "/reporting/includes/excel_report.inc";
    } else {
        include_once $path_to_root . "/reporting/includes/pdf_report.inc";
    }
    $result = fetchRoyalty($item_id);
    $name = "";
    while ($book = db_fetch($result)) {
        $name = $book[1];
    }
    $params = array(0 => $comments, 1 => array('text' => _('Item'), 'from' => $name));
    $orientation = $orientation ? 'L' : 'P';
    $dec = user_price_dec();
    $cols = array(0, 150, 250, 350, 450);
    $headers = array(_('Name'), _('ID #'), _('Date'), _('Quantity'), _('Status'));
    $aligns = array('left', 'left', 'left', 'left', 'left');
    $usr = get_user($user);
    $user_id = $usr['user_id'];
    $rep = new FrontReport(_('Royalty Sales'), "RoyaltySales", user_pagesize(), 9, $orientation);
    if ($orientation == 'L') {
        recalculate_cols($cols);
    }
    $rep->SetHeaderType('Header');
    $rep->Font();
    $rep->Info($params, $cols, $headers, $aligns);
    $rep->NewPage();
    $rep->TextCol(0, 1, $item_id);
    $rep->TextCol(2, 4, fetchTitle($item_id));
    $rep->NewLine();
    $rep->NewLine();
    $result = fetchRoyalty($item_id);
    while ($myrow = db_fetch($result)) {
        $rep->TextCol(0, 1, $myrow[0]);
        $rep->TextCol(1, 2, '  ' . $myrow[1]);
        $rep->TextCol(2, 3, $myrow[2]);
        $rep->TextCol(3, 4, $myrow[3]);
        $rep->TextCol(4, 5, 'Closed');
        $rep->NewLine();
    }
    $result1 = fetchCreditMemo($item_id);
    while ($myrow1 = db_fetch($result1)) {
        if ($myrow1[3] > 0) {
            $rep->TextCol(0, 1, $myrow1[0]);
            $rep->TextCol(1, 2, '  ' . $myrow1[1]);
            $rep->TextCol(2, 3, $myrow1[2]);
            $rep->TextCol(3, 4, '- ' . $myrow1[3]);
            $rep->TextCol(4, 5, 'Closed');
            $rep->NewLine();
        }
    }
    $rep->Line($rep->row + 4);
    $rep->End();
}
开发者ID:knjy24,项目名称:FrontAccounting,代码行数:57,代码来源:rep802.php

示例5: print_summary

function print_summary()
{
    global $path_to_root;
    $imc = $_POST['PARAM_0'];
    $comments = $_POST['PARAM_1'];
    $orientation = $_POST['PARAM_2'];
    $destination = $_POST['PARAM_3'];
    if ($destination) {
        include_once $path_to_root . "/reporting/includes/excel_report.inc";
    } else {
        include_once $path_to_root . "/reporting/includes/pdf_report.inc";
    }
    $orientation = $orientation ? 'L' : 'P';
    $dec = user_price_dec();
    $cols = array(0, 10, 100, 150, 200, 250, 300, 350, 400, 450, 520);
    //$headers = array(_('IMC'));
    $aligns = array('left', 'left', 'left', 'left', 'left', 'left', 'left', 'left', 'left');
    //$params =   array( 	0 => $comments,	1 => array(  'text' => _('Period'), 'from' => $from));
    $aligns2 = $aligns;
    $summary = 1;
    $rep = new FrontReport(_('Client List'), "ClientList", user_pagesize(), 9, $orientation);
    if ($orientation == 'L') {
        recalculate_cols($cols);
    }
    $cols2 = $cols;
    $rep->Font();
    $rep->Info(null, $cols, null, $aligns);
    $rep->NewPage();
    $salesman = 0;
    $result = getList($imc);
    while ($myrow = db_fetch($result)) {
        $previous == '';
        $salesman = get_salesman_name($myrow['salesman']);
        $current = $salesman;
        if ($salesman != "") {
            if ($previous == $current) {
                $salesman = '';
                $rep->TextCol(1, 10, $myrow['br_name']);
                $rep->NewLine();
            } else {
                $rep->Font('bold');
                $rep->NewLine(2);
                $rep->Line($rep->row + 10);
                $rep->TextCol(0, 2, $salesman);
                $rep->Line($rep->row - 4);
                $rep->NewLine(2);
                $rep->Font();
                $rep->TextCol(1, 10, $myrow['br_name']);
                $rep->NewLine();
            }
            $previous = $current;
        }
    }
    $rep->NewLine();
    $rep->End();
}
开发者ID:knjy24,项目名称:FrontAccounting,代码行数:56,代码来源:rep_client_listing.php

示例6: print_bill_of_material

function print_bill_of_material()
{
    global $path_to_root;
    $frompart = $_POST['PARAM_0'];
    $topart = $_POST['PARAM_1'];
    $comments = $_POST['PARAM_2'];
    $orientation = $_POST['PARAM_3'];
    $destination = $_POST['PARAM_4'];
    if ($destination) {
        include_once $path_to_root . "/reporting/includes/excel_report.inc";
    } else {
        include_once $path_to_root . "/reporting/includes/pdf_report.inc";
    }
    $orientation = $orientation ? 'L' : 'P';
    $cols = array(0, 50, 305, 375, 445, 515);
    $headers = array(_('Component'), _('Description'), _('Loc'), _('Wrk Ctr'), _('Quantity'));
    $aligns = array('left', 'left', 'left', 'left', 'right');
    $params = array(0 => $comments, 1 => array('text' => _('Component'), 'from' => $frompart, 'to' => $topart));
    $rep = new FrontReport(_('Bill of Material Listing'), "BillOfMaterial", user_pagesize(), 9, $orientation);
    if ($orientation == 'L') {
        recalculate_cols($cols);
    }
    $rep->Font();
    $rep->Info($params, $cols, $headers, $aligns);
    $rep->NewPage();
    $res = getTransactions($frompart, $topart);
    $parent = '';
    while ($trans = db_fetch($res)) {
        if ($parent != $trans['parent']) {
            if ($parent != '') {
                $rep->Line($rep->row - 2);
                $rep->NewLine(2, 3);
            }
            $rep->TextCol(0, 1, $trans['parent']);
            $desc = get_item($trans['parent']);
            $rep->TextCol(1, 2, $desc['description']);
            $parent = $trans['parent'];
            $rep->NewLine();
        }
        $rep->NewLine();
        $dec = get_qty_dec($trans['component']);
        $rep->TextCol(0, 1, $trans['component']);
        $rep->TextCol(1, 2, $trans['CompDescription']);
        //$rep->TextCol(2, 3, $trans['loc_code']);
        //$rep->TextCol(3, 4, $trans['workcentre_added']);
        $wc = get_work_centre($trans['workcentre_added']);
        $rep->TextCol(2, 3, get_location_name($trans['loc_code']));
        $rep->TextCol(3, 4, $wc['name']);
        $rep->AmountCol(4, 5, $trans['quantity'], $dec);
    }
    $rep->Line($rep->row - 4);
    $rep->NewLine();
    $rep->End();
}
开发者ID:knjy24,项目名称:FrontAccounting,代码行数:54,代码来源:rep401.php

示例7: print_dimension_summary

function print_dimension_summary()
{
    global $path_to_root;
    $fromdim = $_POST['PARAM_0'];
    $todim = $_POST['PARAM_1'];
    $showbal = $_POST['PARAM_2'];
    $comments = $_POST['PARAM_3'];
    $orientation = $_POST['PARAM_4'];
    $destination = $_POST['PARAM_5'];
    if ($destination) {
        include_once $path_to_root . "/reporting/includes/excel_report.inc";
    } else {
        include_once $path_to_root . "/reporting/includes/pdf_report.inc";
    }
    $orientation = $orientation ? 'L' : 'P';
    $cols = array(0, 50, 210, 250, 320, 395, 465, 515);
    $headers = array(_('Reference'), _('Name'), _('Type'), _('Date'), _('Due Date'), _('Closed'), _('YTD'));
    $aligns = array('left', 'left', 'left', 'left', 'left', 'left', 'right');
    $params = array(0 => $comments, 1 => array('text' => _('Dimension'), 'from' => get_dimension_string($fromdim), 'to' => get_dimension_string($todim)));
    $rep = new FrontReport(_('Dimension Summary'), "DimensionSummary", user_pagesize(), 9, $orientation);
    if ($orientation == 'L') {
        recalculate_cols($cols);
    }
    $rep->Font();
    $rep->Info($params, $cols, $headers, $aligns);
    $rep->NewPage();
    $res = getTransactions($fromdim, $todim);
    while ($trans = db_fetch($res)) {
        $rep->TextCol(0, 1, $trans['reference']);
        $rep->TextCol(1, 2, $trans['name']);
        $rep->TextCol(2, 3, $trans['type_']);
        $rep->DateCol(3, 4, $trans['date_'], true);
        $rep->DateCol(4, 5, $trans['due_date'], true);
        if ($trans['closed']) {
            $str = _('Yes');
        } else {
            $str = _('No');
        }
        $rep->TextCol(5, 6, $str);
        if ($showbal) {
            $balance = getYTD($trans['id']);
            $rep->AmountCol(6, 7, $balance, 0);
        }
        $rep->NewLine(1, 2);
    }
    $rep->Line($rep->row);
    $rep->End();
}
开发者ID:knjy24,项目名称:FrontAccounting,代码行数:48,代码来源:rep501.php

示例8: print_assets_list

function print_assets_list()
{
    global $path_to_root;
    $frompart = $_POST['PARAM_0'];
    $topart = $_POST['PARAM_1'];
    $comments = $_POST['PARAM_2'];
    $destination = $_POST['PARAM_3'];
    if ($destination) {
        include_once $path_to_root . "/reporting/includes/excel_report.inc";
    } else {
        include_once $path_to_root . "/reporting/includes/pdf_report.inc";
    }
    $cols = array(0, 50, 305, 375, 445, 515);
    $headers = array(_('Asset Type'), _('Asset name'), _('Serial Number'), _('Purchase Date'), _('Purchase Value'));
    $aligns = array('left', 'left', 'left', 'left', 'right');
    $params = array(0 => $comments, 1 => array('text' => _('Component'), 'from' => $frompart, 'to' => $topart));
    $rep = new FrontReport(_('Assets Listing'), "AssetList", user_pagesize());
    $rep->Font();
    $rep->Info($params, $cols, $headers, $aligns);
    $rep->NewPage();
    $res = getTransactions($frompart, $topart);
    $parent = '';
    while ($trans = db_fetch($res)) {
        if ($parent != $trans['asset_type_name']) {
            if ($parent != '') {
                $rep->Line($rep->row - 2);
                $rep->NewLine(2, 3);
            }
            $rep->TextCol(0, 2, $trans['asset_type_name']);
            $desc = get_item($trans['asset_type_name']);
            $parent = $trans['asset_type_name'];
            $rep->NewLine();
        }
        $rep->NewLine();
        $dec = get_qty_dec($trans['asset_id']);
        $rep->TextCol(0, 1, $trans['asset_type_name']);
        $rep->TextCol(1, 2, $trans['asset_name']);
        $rep->TextCol(2, 3, $trans['asset_serial']);
        $rep->TextCol(3, 4, $trans['purchase_date']);
        $rep->AmountCol(4, 5, $trans['purchase_value'], $dec);
    }
    $rep->Line($rep->row - 4);
    $rep->NewLine();
    $rep->End();
}
开发者ID:blestab,项目名称:frontaccounting,代码行数:45,代码来源:rep_assets_list.php

示例9: print_bill_of_material

function print_bill_of_material()
{
    global $path_to_root;
    include_once $path_to_root . "reporting/includes/pdf_report.inc";
    $frompart = $_REQUEST['PARAM_0'];
    $topart = $_REQUEST['PARAM_1'];
    $comments = $_REQUEST['PARAM_2'];
    $dec = user_qty_dec();
    $cols = array(0, 50, 305, 375, 445, 515);
    $headers = array(tr('Component'), tr('Description'), tr('Loc'), tr('Wrk Ctr'), tr('Quantity'));
    $aligns = array('left', 'left', 'left', 'left', 'right');
    $params = array(0 => $comments, 1 => array('text' => tr('Component'), 'from' => $frompart, 'to' => $topart));
    $rep = new FrontReport(tr('Bill of Material Listing'), "BillOfMaterial.pdf", user_pagesize());
    $rep->Font();
    $rep->Info($params, $cols, $headers, $aligns);
    $rep->Header();
    $res = getTransactions($frompart, $topart);
    $parent = '';
    while ($trans = db_fetch($res)) {
        if ($parent != $trans['parent']) {
            if ($parent != '') {
                $rep->Line($rep->row - 2);
                $rep->NewLine(2, 3);
            }
            $rep->TextCol(0, 1, $trans['parent']);
            $desc = get_item($trans['parent']);
            $rep->TextCol(1, 2, $desc['description']);
            $parent = $trans['parent'];
            $rep->NewLine();
        }
        $rep->NewLine();
        $rep->TextCol(0, 1, $trans['component']);
        $rep->TextCol(1, 2, $trans['CompDescription']);
        $rep->TextCol(2, 3, $trans['loc_code']);
        $rep->TextCol(3, 4, $trans['workcentre_added']);
        $rep->TextCol(4, 5, number_format2($trans['quantity'], $dec));
    }
    $rep->Line($rep->row - 4);
    $rep->End();
}
开发者ID:ravenii,项目名称:guardocs,代码行数:40,代码来源:rep401.php

示例10: print_dimension_summary

function print_dimension_summary()
{
    global $path_to_root;
    include_once $path_to_root . "reporting/includes/pdf_report.inc";
    $fromdim = $_REQUEST['PARAM_0'];
    $todim = $_REQUEST['PARAM_1'];
    $showbal = $_REQUEST['PARAM_2'];
    $comments = $_REQUEST['PARAM_3'];
    $cols = array(0, 50, 210, 250, 320, 395, 465, 515);
    $headers = array(tr('Reference'), tr('Name'), tr('Type'), tr('Date'), tr('Due Date'), tr('Closed'), tr('YTD'));
    $aligns = array('left', 'left', 'left', 'left', 'left', 'left', 'right');
    $params = array(0 => $comments, 1 => array('text' => tr('Dimension'), 'from' => $fromdim, 'to' => $todim));
    $rep = new FrontReport(tr('Dimension Summary'), "DimensionSummary.pdf", user_pagesize());
    $rep->Font();
    $rep->Info($params, $cols, $headers, $aligns);
    $rep->Header();
    $res = getTransactions($fromdim, $todim);
    while ($trans = db_fetch($res)) {
        $rep->TextCol(0, 1, $trans['reference']);
        $rep->TextCol(1, 2, $trans['name']);
        $rep->TextCol(2, 3, $trans['type_']);
        $rep->TextCol(3, 4, $trans['date_']);
        $rep->TextCol(4, 5, $trans['due_date']);
        if ($trans['closed']) {
            $str = tr('Yes');
        } else {
            $str = tr('No');
        }
        $rep->TextCol(5, 6, $str);
        if ($showbal) {
            $balance = getYTD($trans['id']);
            $rep->TextCol(6, 7, number_format2($balance, 0));
        }
        $rep->NewLine(1, 2);
    }
    $rep->Line($rep->row);
    $rep->End();
}
开发者ID:ravenii,项目名称:guardocs,代码行数:38,代码来源:rep501.php

示例11: printYearlyPurch

function printYearlyPurch()
{
    global $path_to_root, $systypes_array;
    ///$from = $_POST['PARAM_0'];
    $to = $_POST['PARAM_1'];
    /*$fromcust = $_POST['PARAM_2'];
        	$show_balance = $_POST['PARAM_3'];
        	$currency = $_POST['PARAM_4'];
        	$no_zeros = $_POST['PARAM_5'];
        	$comments = $_POST['PARAM_6'];
    	//$orientation = $_POST['PARAM_7'];*/
    $destination = $_POST['PARAM_3'];
    if ($destination) {
        include_once $path_to_root . "/reporting/includes/excel_report.inc";
    } else {
        include_once $path_to_root . "/reporting/includes/pdf_report.inc";
    }
    $orientation = 'L';
    //incrementing dapat
    $cols = array(0, 20, 55, 85, 125, 200, 230, 260, 290, 325, 350, 375, 425, 475);
    //14 headers + 1 lagi dapat for cols
    //todo: format date paid to 2 digits representation only i.e. 12/12/12
    $headers = array(_('CV#'), _('Date Paid'), _('OR #'), _('Supplier'), _('Title of Book'), _('Quantity'), _('Unit Cost'), _('Amount'), _('With Tax'), _('Net'), _('PO #'), _('Stock Supplied'), _('Stock Amount'), _('Total Amount'));
    $aligns = array('left', 'left', 'left', 'left', 'left', 'left', 'left', 'left', 'left', 'left', 'left', 'left', 'left', 'left');
    $params = null;
    //todo: modify concatenation of $to to include only year, not the whole date
    $rep = new FrontReport(_('Purchases for the year ' . $to), "Purchases Year " . $to, user_pagesize(), 9, $orientation);
    if ($orientation == 'L') {
        recalculate_cols($cols);
    }
    $rep->Font();
    $rep->Info($params, $cols, $headers, $aligns);
    $rep->NewPage();
    $grandtotal = array(0, 0, 0, 0);
    $rep->NewLine();
    $rep->End();
}
开发者ID:knjy24,项目名称:FrontAccounting,代码行数:37,代码来源:rep800.php

示例12: print_statements

function print_statements()
{
    global $path_to_root, $systypes_array;
    include_once $path_to_root . "/reporting/includes/pdf_report.inc";
    $customer = $_POST['PARAM_0'];
    $currency = $_POST['PARAM_1'];
    $show_also_allocated = $_POST['PARAM_2'];
    $email = $_POST['PARAM_3'];
    $comments = $_POST['PARAM_4'];
    $orientation = $_POST['PARAM_5'];
    $orientation = $orientation ? 'L' : 'P';
    $dec = user_price_dec();
    $cols = array(4, 100, 130, 190, 250, 320, 385, 450, 515);
    //$headers in doctext.inc
    $aligns = array('left', 'left', 'left', 'left', 'right', 'right', 'right', 'right');
    $params = array('comments' => $comments);
    $cur = get_company_pref('curr_default');
    $PastDueDays1 = get_company_pref('past_due_days');
    $PastDueDays2 = 2 * $PastDueDays1;
    if ($email == 0) {
        $rep = new FrontReport(_('STATEMENT'), "StatementBulk", user_pagesize(), 9, $orientation);
    }
    if ($orientation == 'L') {
        recalculate_cols($cols);
    }
    $sql = "SELECT debtor_no, name AS DebtorName, address, tax_id, curr_code, curdate() AS tran_date FROM " . TB_PREF . "debtors_master";
    if ($customer != ALL_TEXT) {
        $sql .= " WHERE debtor_no = " . db_escape($customer);
    } else {
        $sql .= " ORDER by name";
    }
    $result = db_query($sql, "The customers could not be retrieved");
    while ($myrow = db_fetch($result)) {
        $date = date('Y-m-d');
        $myrow['order_'] = "";
        $TransResult = getTransactions($myrow['debtor_no'], $date, $show_also_allocated);
        $baccount = get_default_bank_account($myrow['curr_code']);
        $params['bankaccount'] = $baccount['id'];
        if (db_num_rows($TransResult) == 0) {
            continue;
        }
        if ($email == 1) {
            $rep = new FrontReport("", "", user_pagesize(), 9, $orientation);
            $rep->title = _('STATEMENT');
            $rep->filename = "Statement" . $myrow['debtor_no'] . ".pdf";
            $rep->Info($params, $cols, null, $aligns);
        }
        $contacts = get_customer_contacts($myrow['debtor_no'], 'invoice');
        $rep->SetHeaderType('Header2');
        $rep->currency = $cur;
        $rep->Font();
        $rep->Info($params, $cols, null, $aligns);
        //= get_branch_contacts($branch['branch_code'], 'invoice', $branch['debtor_no']);
        $rep->SetCommonData($myrow, null, null, $baccount, ST_STATEMENT, $contacts);
        $rep->NewPage();
        $rep->NewLine();
        $doctype = ST_STATEMENT;
        $rep->fontSize += 2;
        $rep->TextCol(0, 8, _("Outstanding Transactions"));
        $rep->fontSize -= 2;
        $rep->NewLine(2);
        while ($myrow2 = db_fetch($TransResult)) {
            $DisplayTotal = number_format2(Abs($myrow2["TotalAmount"]), $dec);
            $DisplayAlloc = number_format2($myrow2["Allocated"], $dec);
            $DisplayNet = number_format2($myrow2["TotalAmount"] - $myrow2["Allocated"], $dec);
            $rep->TextCol(0, 1, $systypes_array[$myrow2['type']], -2);
            $rep->TextCol(1, 2, $myrow2['reference'], -2);
            $rep->TextCol(2, 3, sql2date($myrow2['tran_date']), -2);
            if ($myrow2['type'] == ST_SALESINVOICE) {
                $rep->TextCol(3, 4, sql2date($myrow2['due_date']), -2);
            }
            if ($myrow2['type'] == ST_SALESINVOICE || $myrow2['type'] == ST_BANKPAYMENT) {
                $rep->TextCol(4, 5, $DisplayTotal, -2);
            } else {
                $rep->TextCol(5, 6, $DisplayTotal, -2);
            }
            $rep->TextCol(6, 7, $DisplayAlloc, -2);
            $rep->TextCol(7, 8, $DisplayNet, -2);
            $rep->NewLine();
            if ($rep->row < $rep->bottomMargin + 10 * $rep->lineHeight) {
                $rep->NewPage();
            }
        }
        $nowdue = "1-" . $PastDueDays1 . " " . _("Days");
        $pastdue1 = $PastDueDays1 + 1 . "-" . $PastDueDays2 . " " . _("Days");
        $pastdue2 = _("Over") . " " . $PastDueDays2 . " " . _("Days");
        $CustomerRecord = get_customer_details($myrow['debtor_no'], null, $show_also_allocated);
        $str = array(_("Current"), $nowdue, $pastdue1, $pastdue2, _("Total Balance"));
        $str2 = array(number_format2($CustomerRecord["Balance"] - $CustomerRecord["Due"], $dec), number_format2($CustomerRecord["Due"] - $CustomerRecord["Overdue1"], $dec), number_format2($CustomerRecord["Overdue1"] - $CustomerRecord["Overdue2"], $dec), number_format2($CustomerRecord["Overdue2"], $dec), number_format2($CustomerRecord["Balance"], $dec));
        $col = array($rep->cols[0], $rep->cols[0] + 110, $rep->cols[0] + 210, $rep->cols[0] + 310, $rep->cols[0] + 410, $rep->cols[0] + 510);
        $rep->row = $rep->bottomMargin + (10 * $rep->lineHeight - 6);
        for ($i = 0; $i < 5; $i++) {
            $rep->TextWrap($col[$i], $rep->row, $col[$i + 1] - $col[$i], $str[$i], 'right');
        }
        $rep->NewLine();
        for ($i = 0; $i < 5; $i++) {
            $rep->TextWrap($col[$i], $rep->row, $col[$i + 1] - $col[$i], $str2[$i], 'right');
        }
        if ($email == 1) {
            $rep->End($email, _("Statement") . " " . _("as of") . " " . sql2date($date));
//.........这里部分代码省略.........
开发者ID:nativebandung,项目名称:frontaccounting,代码行数:101,代码来源:rep108.php

示例13: print_inventory_planning

function print_inventory_planning()
{
    global $path_to_root;
    $category = $_POST['PARAM_0'];
    $location = $_POST['PARAM_1'];
    $comments = $_POST['PARAM_2'];
    $orientation = $_POST['PARAM_3'];
    $destination = $_POST['PARAM_4'];
    if ($destination) {
        include_once $path_to_root . "/reporting/includes/excel_report.inc";
    } else {
        include_once $path_to_root . "/reporting/includes/pdf_report.inc";
    }
    $orientation = $orientation ? 'L' : 'P';
    if ($category == ALL_NUMERIC) {
        $category = 0;
    }
    if ($category == 0) {
        $cat = _('All');
    } else {
        $cat = get_category_name($category);
    }
    if ($location == ALL_TEXT) {
        $location = 'all';
    }
    if ($location == 'all') {
        $loc = _('All');
    } else {
        $loc = get_location_name($location);
    }
    $cols = array(0, 50, 150, 180, 210, 240, 270, 300, 330, 390, 435, 480, 525);
    $per0 = strftime('%b', mktime(0, 0, 0, date('m'), 1, date('Y')));
    $per1 = strftime('%b', mktime(0, 0, 0, date('m') - 1, 1, date('Y')));
    $per2 = strftime('%b', mktime(0, 0, 0, date('m') - 2, 1, date('Y')));
    $per3 = strftime('%b', mktime(0, 0, 0, date('m') - 3, 1, date('Y')));
    $per4 = strftime('%b', mktime(0, 0, 0, date('m') - 4, 1, date('Y')));
    $headers = array(_('Category'), '', $per4, $per3, $per2, $per1, $per0, '3*M', _('QOH'), _('Cust Ord'), _('Supp Ord'), _('Sugg Ord'));
    $aligns = array('left', 'left', 'right', 'right', 'right', 'right', 'right', 'right', 'right', 'right', 'right', 'right');
    $params = array(0 => $comments, 1 => array('text' => _('Category'), 'from' => $cat, 'to' => ''), 2 => array('text' => _('Location'), 'from' => $loc, 'to' => ''));
    $rep = new FrontReport(_('Inventory Planning Report'), "InventoryPlanning", user_pagesize(), 9, $orientation);
    if ($orientation == 'L') {
        recalculate_cols($cols);
    }
    $rep->Font();
    $rep->Info($params, $cols, $headers, $aligns);
    $rep->NewPage();
    $res = getTransactions($category, $location);
    $catt = '';
    while ($trans = db_fetch($res)) {
        if ($catt != $trans['cat_description']) {
            if ($catt != '') {
                $rep->Line($rep->row - 2);
                $rep->NewLine(2, 3);
            }
            $rep->TextCol(0, 1, $trans['category_id']);
            $rep->TextCol(1, 2, $trans['cat_description']);
            $catt = $trans['cat_description'];
            $rep->NewLine();
        }
        if ($location == 'all') {
            $loc_code = "";
        } else {
            $loc_code = $location;
        }
        $custqty = get_demand_qty($trans['stock_id'], $loc_code);
        $custqty += get_demand_asm_qty($trans['stock_id'], $loc_code);
        $suppqty = get_on_porder_qty($trans['stock_id'], $loc_code);
        $suppqty += get_on_worder_qty($trans['stock_id'], $loc_code);
        $period = getPeriods($trans['stock_id'], $trans['loc_code']);
        $rep->NewLine();
        $dec = get_qty_dec($trans['stock_id']);
        $rep->TextCol(0, 1, $trans['stock_id']);
        $rep->TextCol(1, 2, $trans['description'] . ($trans['inactive'] == 1 ? " (" . _("Inactive") . ")" : ""), -1);
        $rep->AmountCol(2, 3, $period['prd0'], $dec);
        $rep->AmountCol(3, 4, $period['prd1'], $dec);
        $rep->AmountCol(4, 5, $period['prd2'], $dec);
        $rep->AmountCol(5, 6, $period['prd3'], $dec);
        $rep->AmountCol(6, 7, $period['prd4'], $dec);
        $MaxMthSales = Max($period['prd0'], $period['prd1'], $period['prd2'], $period['prd3']);
        $IdealStockHolding = $MaxMthSales * 3;
        $rep->AmountCol(7, 8, $IdealStockHolding, $dec);
        $rep->AmountCol(8, 9, $trans['qty_on_hand'], $dec);
        $rep->AmountCol(9, 10, $custqty, $dec);
        $rep->AmountCol(10, 11, $suppqty, $dec);
        $SuggestedTopUpOrder = $IdealStockHolding - $trans['qty_on_hand'] + $custqty - $suppqty;
        if ($SuggestedTopUpOrder < 0.0) {
            $SuggestedTopUpOrder = 0.0;
        }
        $rep->AmountCol(11, 12, $SuggestedTopUpOrder, $dec);
    }
    $rep->Line($rep->row - 4);
    $rep->NewLine();
    $rep->End();
}
开发者ID:knjy24,项目名称:FrontAccounting,代码行数:94,代码来源:rep302.php

示例14: print_po


//.........这里部分代码省略.........
        $items = $prices = array();
        while ($myrow2 = db_fetch($result)) {
            $data = get_purchase_data($myrow['supplier_id'], $myrow2['item_code']);
            if ($data !== false) {
                if ($data['supplier_description'] != "") {
                    $myrow2['description'] = $data['supplier_description'];
                }
                if ($data['suppliers_uom'] != "") {
                    $myrow2['units'] = $data['suppliers_uom'];
                }
                if ($data['conversion_factor'] != 1) {
                    $myrow2['unit_price'] = round2($myrow2['unit_price'] * $data['conversion_factor'], user_price_dec());
                    $myrow2['quantity_ordered'] = round2($myrow2['quantity_ordered'] / $data['conversion_factor'], user_qty_dec());
                }
            }
            $Net = round2($myrow2["unit_price"] * $myrow2["quantity_ordered"], user_price_dec());
            $prices[] = $Net;
            $items[] = $myrow2['item_code'];
            $SubTotal += $Net;
            $dec2 = 0;
            $DisplayPrice = price_decimal_format($myrow2["unit_price"], $dec2);
            $DisplayQty = number_format2($myrow2["quantity_ordered"], get_qty_dec($myrow2['item_code']));
            $DisplayNet = number_format2($Net, $dec);
            if ($show_po_item_codes) {
                $rep->TextCol(0, 1, $myrow2['item_code'], -2);
                $rep->TextCol(1, 2, $myrow2['description'], -2);
            } else {
                $rep->TextCol(0, 2, $myrow2['description'], -2);
            }
            $rep->TextCol(2, 3, sql2date($myrow2['delivery_date']), -2);
            $rep->TextCol(3, 4, $DisplayQty, -2);
            $rep->TextCol(4, 5, $myrow2['units'], -2);
            $rep->TextCol(5, 6, $DisplayPrice, -2);
            $rep->TextCol(6, 7, $DisplayNet, -2);
            $rep->NewLine(1);
            if ($rep->row < $rep->bottomMargin + 15 * $rep->lineHeight) {
                $rep->NewPage();
            }
        }
        if ($myrow['comments'] != "") {
            $rep->NewLine();
            $rep->TextColLines(1, 5, $myrow['comments'], -2);
        }
        $DisplaySubTot = number_format2($SubTotal, $dec);
        $rep->row = $rep->bottomMargin + 15 * $rep->lineHeight;
        $doctype = ST_PURCHORDER;
        $rep->TextCol(3, 6, _("Sub-total"), -2);
        $rep->TextCol(6, 7, $DisplaySubTot, -2);
        $rep->NewLine();
        $tax_items = get_tax_for_items($items, $prices, 0, $myrow['tax_group_id'], $myrow['tax_included'], null);
        $first = true;
        foreach ($tax_items as $tax_item) {
            if ($tax_item['Value'] == 0) {
                continue;
            }
            $DisplayTax = number_format2($tax_item['Value'], $dec);
            $tax_type_name = $tax_item['tax_type_name'];
            if ($myrow['tax_included']) {
                if (isset($alternative_tax_include_on_docs) && $alternative_tax_include_on_docs == 1) {
                    if ($first) {
                        $rep->TextCol(3, 6, _("Total Tax Excluded"), -2);
                        $rep->TextCol(6, 7, number_format2($sign * $tax_item['net_amount'], $dec), -2);
                        $rep->NewLine();
                    }
                    $rep->TextCol(3, 6, $tax_type_name, -2);
                    $rep->TextCol(6, 7, $DisplayTax, -2);
                    $first = false;
                } else {
                    $rep->TextCol(3, 7, _("Included") . " " . $tax_type_name . _("Amount") . ": " . $DisplayTax, -2);
                }
            } else {
                $SubTotal += $tax_item['Value'];
                $rep->TextCol(3, 6, $tax_type_name, -2);
                $rep->TextCol(6, 7, $DisplayTax, -2);
            }
            $rep->NewLine();
        }
        $rep->NewLine();
        $DisplayTotal = number_format2($SubTotal, $dec);
        $rep->Font('bold');
        $rep->TextCol(3, 6, _("TOTAL PO"), -2);
        $rep->TextCol(6, 7, $DisplayTotal, -2);
        $words = price_in_words($SubTotal, ST_PURCHORDER);
        if ($words != "") {
            $rep->NewLine(1);
            $rep->TextCol(1, 7, $myrow['curr_code'] . ": " . $words, -2);
        }
        $rep->Font();
        if ($email == 1) {
            $myrow['DebtorName'] = $myrow['supp_name'];
            if ($myrow['reference'] == "") {
                $myrow['reference'] = $myrow['order_no'];
            }
            $rep->End($email);
        }
    }
    if ($email == 0) {
        $rep->End();
    }
}
开发者ID:knjy24,项目名称:FrontAccounting,代码行数:101,代码来源:rep209.php

示例15: print_inventory_sales

function print_inventory_sales()
{
    global $path_to_root;
    $from = $_POST['PARAM_0'];
    $destination = $_POST['PARAM_1'];
    if ($destination) {
        include_once $path_to_root . "/reporting/includes/excel_report.inc";
    } else {
        include_once $path_to_root . "/reporting/includes/pdf_report.inc";
    }
    $dec = user_price_dec();
    if ($category == ALL_NUMERIC) {
        $category = 0;
    }
    if ($category == 0) {
        $cat = _('All');
    } else {
        $cat = get_category_name($category);
    }
    $cols = array(0, 50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700, 750, 800, 850, 900, 950, 1000, 1050, 1100, 1150, 1200);
    $headers = array(_('Date'), _('Client Name'), _('IMC'), _('Charge'), _('Sales'), _('Date'), _('CM#'), _('Returns'), _(''), _('Discount'), _('Balance'), _('Date'), _('PR/OR#'), _('Date'), _('OR #'), _('Partial'), _('Net'), _('Balance'), _('Date'), _(''), _('Commission'), _('w/tax'), _('Net Commission'));
    $header2 = array(_(''), '', '', _('Invoice'), _('Amount'), _(''), _(''), _(''), _(''), _(''), _(''), _(''), _(''), _(''), _(''), _(''), _(''), _(''), _(''), _(''), '', _(''), _(''));
    $aligns = array('left', 'center', 'center', 'center', 'right', 'right', 'right', 'right', 'right', 'right', 'right', 'right', 'right', 'right', 'right');
    $params = array(0 => $comments, 1 => array('text' => _('Period'), 'from' => $from, 'to' => $to), 2 => array('text' => _('Category'), 'from' => $cat, 'to' => ''));
    $rep = new FrontReport(_('Series Report'), "Series Report", user_pagesize(), 8, 'L');
    $rep->Font();
    $rep->Info($params, $cols, $header2, $aligns, $cols, $headers, $aligns);
    $rep->NewPage();
    $total = $grandtotal = 0.0;
    $total1 = $grandtotal1 = 0.0;
    $total2 = $grandtotal2 = 0.0;
    $catt = '';
    $res = getTransactions($imc, $from);
    while ($myrow = db_fetch($res)) {
        $company_data = get_company_prefs();
        $branch = get_branch($myrow["branch_code"]);
        $branch_data = get_branch_accounts($myrow['branch_code']);
        $dt = get_discount($branch_data['sales_discount_account'], $myrow['type'], $myrow['trans_no']);
        $salesman = get_imc_code($myrow['branch_code']);
        $res2 = get_return_details($myrow['order_']);
        $returns = 0;
        $rtn_dt = 0;
        while ($myrow2 = db_fetch($res2)) {
            $returns += $myrow2['ov_amount'];
            $credit_num = $myrow2['customized_no'];
            $cm_date = $myrow2['tran_date'];
            $res2 = get_return_discount($branch_data['sales_discount_account'], $myrow2['type'], $myrow2['trans_no']);
            while ($myrow3 = db_fetch($res2)) {
                $rtn_dt += abs($myrow3['amount']);
            }
        }
        $total_returns = $returns + $rtn_dt;
        $return_discount = $rtn_dt / $total_returns * 100;
        $discount = $myrow['discount'];
        $invoicetot = $myrow['ov_amount'] + $dt;
        $sales_discount = ($invoicetot - $total_returns) * ($return_discount / 100);
        $net_sales = $invoicetot - $total_returns - $sales_discount;
        $gross_commission = ($invoicetot - $total_returns) * ($myrow['commission'] / 100);
        $rep->TextCol(0, 1, $myrow['tran_date']);
        $rep->TextCol(1, 2, $myrow['br_name']);
        $rep->TextCol(2, 3, $salesman);
        $rep->TextCol(3, 4, $myrow['customized_no']);
        $rep->AmountCol(4, 5, $invoicetot, 2);
        $rep->TextCol(5, 6, $cm_date);
        $rep->TextCol(6, 7, $credit_num);
        $rep->AmountCol(7, 8, $total_returns, 2);
        $rep->TextCol(8, 9, $return_discount . "%");
        $rep->AmountCol(9, 10, $sales_discount, 2);
        $rep->AmountCol(10, 11, $net_sales, 2);
        $rep->TextCol(18, 19, $myrow['date']);
        $rep->TextCol(19, 20, $myrow['commission'] . "%");
        $rep->AmountCol(20, 21, $gross_commission, 2);
        $rep->AmountCol(21, 22, $myrow['with_tax'], 2);
        $rep->AmountCol(22, 23, $myrow['net_commission'], 2);
        $or = get_pr_details($myrow['type'], $myrow['trans_no']);
        while ($pr = db_fetch($or)) {
            $net_remittance = $net_sales - $pr['amt'];
            $rep->TextCol(11, 12, $pr['date_alloc']);
            $rep->TextCol(12, 13, $pr['customized_no']);
            $rep->TextCol(13, 14, _("DATE"));
            $rep->TextCol(14, 15, _("OR#"));
            $rep->TextCol(15, 16, "");
            $rep->AmountCol(17, 18, '', 2);
        }
        $rep->NewLine();
        //
    }
    $rep->NewLine();
    $rep->End();
}
开发者ID:knjy24,项目名称:FrontAccounting,代码行数:90,代码来源:rep_series_report_etc.php


注:本文中的FrontReport::End方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。