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


PHP user_price_dec函数代码示例

本文整理汇总了PHP中user_price_dec函数的典型用法代码示例。如果您正苦于以下问题:PHP user_price_dec函数的具体用法?PHP user_price_dec怎么用?PHP user_price_dec使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了user_price_dec函数的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_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

示例4: 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

示例5: print_audit_trail

function print_audit_trail()
{
    global $path_to_root, $systypes_array;
    $from = $_POST['PARAM_0'];
    $to = $_POST['PARAM_1'];
    $systype = $_POST['PARAM_2'];
    $user = $_POST['PARAM_3'];
    $comments = $_POST['PARAM_4'];
    $orientation = $_POST['PARAM_5'];
    $destination = $_POST['PARAM_6'];
    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, 60, 120, 180, 240, 340, 400, 460, 520);
    $headers = array(_('Date'), _('Time'), _('User'), _('Trans Date'), _('Type'), _('#'), _('Action'), _('Amount'));
    $aligns = array('left', 'left', 'left', 'left', 'left', 'left', 'left', 'right');
    $usr = get_user($user);
    $user_id = $usr['user_id'];
    $params = array(0 => $comments, 1 => array('text' => _('Period'), 'from' => $from, 'to' => $to), 2 => array('text' => _('Type'), 'from' => $systype != -1 ? $systypes_array[$systype] : _('All'), 'to' => ''), 3 => array('text' => _('User'), 'from' => $user != -1 ? $user_id : _('All'), 'to' => ''));
    $rep = new FrontReport(_('Audit Trail'), "AuditTrail", user_pagesize(), 9, $orientation);
    if ($orientation == 'L') {
        recalculate_cols($cols);
    }
    $rep->Font();
    $rep->Info($params, $cols, $headers, $aligns);
    $rep->NewPage();
    $trans = getTransactions($from, $to, $systype, $user);
    while ($myrow = db_fetch($trans)) {
        $rep->TextCol(0, 1, sql2date(date("Y-m-d", $myrow['unix_stamp'])));
        if (user_date_format() == 0) {
            $rep->TextCol(1, 2, date("h:i:s a", $myrow['unix_stamp']));
        } else {
            $rep->TextCol(1, 2, date("H:i:s", $myrow['unix_stamp']));
        }
        $rep->TextCol(2, 3, $myrow['user_id']);
        $rep->TextCol(3, 4, sql2date($myrow['gl_date']));
        $rep->TextCol(4, 5, $systypes_array[$myrow['type']]);
        $rep->TextCol(5, 6, $myrow['trans_no']);
        if ($myrow['gl_seq'] == null) {
            $action = _('Changed');
        } else {
            $action = _('Closed');
        }
        $rep->TextCol(6, 7, $action);
        if ($myrow['amount'] != null) {
            $rep->AmountCol(7, 8, $myrow['amount'], $dec);
        }
        $rep->NewLine(1, 2);
    }
    $rep->Line($rep->row + 4);
    $rep->End();
}
开发者ID:knjy24,项目名称:FrontAccounting,代码行数:56,代码来源:rep710.php

示例6: render

 function render($id, $title)
 {
     global $path_to_root;
     include_once $path_to_root . "/reporting/includes/class.graphic.inc";
     $begin = begin_fiscalyear();
     $today = Today();
     $begin1 = date2sql($begin);
     $today1 = date2sql($today);
     $sql = "SELECT SUM(amount) AS total, c.class_name, c.ctype FROM\n            " . TB_PREF . "gl_trans," . TB_PREF . "chart_master AS a, " . TB_PREF . "chart_types AS t,\n            " . TB_PREF . "chart_class AS c WHERE\n            account = a.account_code AND a.account_type = t.id AND t.class_id = c.cid\n            AND IF(c.ctype > 3, tran_date >= '{$begin1}', tran_date >= '0000-00-00')\n            AND tran_date <= '{$today1}' ";
     if ($this->data_filter != '') {
         $sql .= ' AND ' . $this->data_filter;
     }
     $sql .= " GROUP BY c.cid ORDER BY c.cid";
     $result = db_query($sql, "Transactions could not be calculated");
     $calculated = _("Calculated Return");
     if ($this->graph_type == 'Table') {
         start_table(TABLESTYLE2, "width=98%");
         $total = 0;
         while ($myrow = db_fetch($result)) {
             if ($myrow['ctype'] > 3) {
                 $total += $myrow['total'];
                 $myrow['total'] = -$myrow['total'];
             }
             label_row($myrow['class_name'], number_format2($myrow['total'], user_price_dec()), "class='label' style='font-weight:bold;'", "style='font-weight:bold;' align=right");
         }
         label_row("&nbsp;", "");
         label_row($calculated, number_format2(-$total, user_price_dec()), "class='label' style='font-weight:bold;'", "style='font-weight:bold;' align=right");
         end_table(1);
     } else {
         $pg = new graph();
         $i = 0;
         $total = 0;
         while ($myrow = db_fetch($result)) {
             if ($myrow['ctype'] > 3) {
                 $total += $myrow['total'];
                 $myrow['total'] = -$myrow['total'];
                 $pg->x[$i] = $myrow['class_name'];
                 $pg->y[$i] = abs($myrow['total']);
                 $i++;
             }
         }
         $pg->x[$i] = $calculated;
         $pg->y[$i] = -$total;
         $pg->title = $title;
         $pg->axis_x = _("Class");
         $pg->axis_y = _("Amount");
         $pg->graphic_1 = $today;
         $pg->type = 5;
         $pg->skin = 1;
         $pg->built_in = false;
         $filename = company_path() . "/pdf_files/" . uniqid("") . ".png";
         $pg->display($filename, true);
         echo "<img src='{$filename}' border='0' alt='{$title}' style='max-width:100%'>";
     }
 }
开发者ID:raqib,项目名称:ac_dev,代码行数:55,代码来源:glreturn.php

示例7: display_po_receive_items

function display_po_receive_items()
{
    global $table_style;
    start_table("colspan=7 {$table_style} width=90%");
    $th = array(tr("Item Code"), tr("Description"), tr("Ordered"), tr("Units"), tr("Received"), tr("Outstanding"), tr("This Delivery"), tr("Price"), tr("Total"));
    table_header($th);
    /*show the line items on the order with the quantity being received for modification */
    $total = 0;
    $k = 0;
    //row colour counter
    if (count($_SESSION['PO']->line_items) > 0) {
        foreach ($_SESSION['PO']->line_items as $ln_itm) {
            alt_table_row_color($k);
            $qty_outstanding = $ln_itm->quantity - $ln_itm->qty_received;
            if ($ln_itm->receive_qty == 0) {
                //If no quantites yet input default the balance to be received
                $ln_itm->receive_qty = $qty_outstanding;
            }
            $line_total = $ln_itm->receive_qty * $ln_itm->price;
            $total += $line_total;
            label_cell($ln_itm->stock_id);
            if ($qty_outstanding > 0) {
                text_cells(null, $ln_itm->stock_id . "Desc", $ln_itm->item_description, 30, 50);
            } else {
                label_cell($ln_itm->item_description);
            }
            qty_cell($ln_itm->quantity);
            label_cell($ln_itm->units);
            qty_cell($ln_itm->qty_received);
            qty_cell($qty_outstanding);
            if ($qty_outstanding > 0) {
                qty_cells(null, $ln_itm->line_no, qty_format($ln_itm->receive_qty), "align=right");
            } else {
                qty_cells(null, $ln_itm->line_no, qty_format($ln_itm->receive_qty), "align=right", "disabled");
            }
            amount_cell($ln_itm->price);
            amount_cell($line_total);
            end_row();
        }
    }
    $display_total = number_format2($total, user_price_dec());
    label_row(tr("Total value of items received"), $display_total, "colspan=8 align=right", "nowrap align=right");
    end_table();
}
开发者ID:ravenii,项目名称:guardocs,代码行数:44,代码来源:po_receive_items.php

示例8: render

 function render($id, $title)
 {
     $sql = '';
     if (isset($this->orderby)) {
         $sql .= 'SELECT  `Week End`, `Week no`, `Gross Sales`, `Net Sales`, `Tax` ' . 'FROM (';
     }
     $sql .= 'SELECT max(bt.trans_date) `Week End`, ' . 'weekofyear(bt.trans_date) `Week no`, ' . 'sum((ttd.net_amount+ttd.amount)*ex_rate) `Gross Sales`, ' . 'sum(ttd.net_amount*ex_rate) `Net Sales`, ' . 'sum(ttd.amount*ex_rate) `Tax` ' . 'FROM ' . TB_PREF . 'bank_trans bt ' . 'INNER JOIN ' . TB_PREF . 'cust_allocations ca ' . 'ON bt.type = ca.trans_type_from ' . 'AND bt.trans_no = ca.trans_no_from ' . 'INNER JOIN ' . TB_PREF . 'debtor_trans dt ' . 'ON dt.type = ca.trans_type_from ' . 'AND dt.trans_no = ca.trans_no_from ' . 'INNER JOIN ' . TB_PREF . 'debtors_master dm ' . 'ON dt.debtor_no = dm.debtor_no ' . 'INNER JOIN ' . TB_PREF . 'trans_tax_details ttd ' . 'ON ttd.trans_type = ca.trans_type_to ' . 'AND ttd.trans_no = ca.trans_no_to ' . 'INNER JOIN ' . TB_PREF . 'tax_types tt ' . 'ON tt.id = ttd.tax_type_id ';
     if ($this->data_filter != '') {
         $sql .= ' WHERE ' . $this->data_filter;
     }
     $sql .= ' GROUP BY weekofyear(bt.trans_date) ';
     if (isset($this->orderby)) {
         $sql .= ') items order by `' . $this->orderby . '` ' . $this->orderby_seq;
     }
     if (isset($this->top)) {
         $sql .= ' limit ' . $this->top;
     }
     $result = db_query($sql) or die(_('Error getting weekly sales data'));
     $rows = array();
     //flag is not needed
     $flag = true;
     $table = array();
     $table['cols'] = array(array('label' => 'Week End', 'type' => 'string'), array('label' => 'Gross Sales', 'type' => 'number'));
     $rows = array();
     while ($r = db_fetch_assoc($result)) {
         $temp = array();
         // the following line will used to slice the Pie chart
         $temp[] = array('v' => (string) $r['Week End'], 'f' => sql2date($r['Week End']));
         $temp[] = array('v' => (double) $r['Gross Sales'], 'f' => number_format2($r['Gross Sales'], user_price_dec()));
         $rows[] = array('c' => $temp);
     }
     $table['rows'] = $rows;
     $jsonTable = json_encode($table);
     $js = "google.load('visualization', '1', {'packages':['corechart','table']});\ngoogle.setOnLoadCallback(drawChart" . $id . ");\nfunction drawChart" . $id . "() {\n  var data = new google.visualization.DataTable(" . $jsonTable . ");\n  var options = {";
     if ($this->graph_type != 'Table') {
         $js .= "height: 300, ";
     }
     $js .= "title: '" . $title . "'\n    };\n  var chart" . $id . " = new google.visualization." . $this->graph_type . "(document.getElementById('widget_div_" . $id . "'));\n  chart" . $id . ".draw(data, options);\n}";
     add_js_source($js);
 }
开发者ID:raqib,项目名称:ac_dev,代码行数:40,代码来源:weeklysales.php

示例9: render

 function render($id, $title)
 {
     $sql = 'SELECT * FROM (SELECT max(trans_date) `Week End`, ' . 'concat(cast(case when weekofyear(trans_date) = 1 and month(trans_date)=12 then year(trans_date) + 1 else year(trans_date) end as char),cast(weekofyear(trans_date) as char)) `Week No`, ' . 'sum(case when weekday(trans_date)=0 then gross_output else 0 end) Monday, ' . 'sum(case when weekday(trans_date)=1 then gross_output else 0 end) Tuesday, ' . 'sum(case when weekday(trans_date)=2 then gross_output else 0 end) Wednesday, ' . 'sum(case when weekday(trans_date)=3 then gross_output else 0 end) Thursday, ' . 'sum(case when weekday(trans_date)=4 then gross_output else 0 end) Friday, ' . 'sum(case when weekday(trans_date)=5 then gross_output else 0 end) Saturday, ' . 'sum(case when weekday(trans_date)=6 then gross_output else 0 end) Sunday ' . 'FROM (SELECT bt.trans_date trans_date, ' . 'sum((ttd.net_amount+ttd.amount)*ex_rate) gross_output, ' . 'sum(ttd.net_amount*ex_rate) net_output, ' . 'sum(ttd.amount*ex_rate) payable  ' . 'FROM ' . TB_PREF . 'bank_trans bt  ' . 'INNER JOIN ' . TB_PREF . 'cust_allocations ca  ' . 'ON bt.type = ca.trans_type_from  ' . 'AND bt.trans_no = ca.trans_no_from  ' . 'INNER JOIN ' . TB_PREF . 'debtor_trans dt  ' . 'ON dt.type = ca.trans_type_from  ' . 'AND dt.trans_no = ca.trans_no_from  ' . 'INNER JOIN ' . TB_PREF . 'debtors_master dm ' . 'ON dt.debtor_no = dm.debtor_no ' . 'INNER JOIN ' . TB_PREF . 'trans_tax_details ttd  ' . 'ON ttd.trans_type = ca.trans_type_to  ' . 'AND ttd.trans_no = ca.trans_no_to  ' . 'INNER JOIN ' . TB_PREF . 'tax_types tt  ' . 'ON tt.id = ttd.tax_type_id  ';
     if ($this->data_filter != '') {
         $sql .= ' WHERE ' . $this->data_filter;
     }
     $sql .= ' GROUP BY bt.trans_date  ' . ') days ' . 'GROUP BY concat(cast(case when weekofyear(trans_date) = 1 and month(trans_date)=12 then year(trans_date) + 1 else year(trans_date) end as char),cast(weekofyear(trans_date) as char)) ' . 'ORDER BY max(trans_date) desc ';
     if (isset($this->top)) {
         $sql .= ' limit ' . $this->top;
     }
     $sql .= ") weeks ORDER BY `Week End`";
     $result = db_query($sql) or die(_('Error getting daily sales data'));
     $rows = array();
     //flag is not needed
     $flag = true;
     $table = array();
     $table['cols'] = array(array('label' => 'Week End', 'type' => 'string'), array('label' => 'Monday', 'type' => 'number'), array('label' => 'Tuesday', 'type' => 'number'), array('label' => 'Wednesday', 'type' => 'number'), array('label' => 'Thursday', 'type' => 'number'), array('label' => 'Friday', 'type' => 'number'), array('label' => 'Saturday', 'type' => 'number'), array('label' => 'Sunday', 'type' => 'number'));
     $rows = array();
     while ($r = db_fetch_assoc($result)) {
         $temp = array();
         // the following line will used to slice the Pie chart
         $temp[] = array('v' => (string) $r['Week End'], 'f' => sql2date($r['Week End']));
         $temp[] = array('v' => (double) $r['Monday'], 'f' => number_format2($r['Monday'], user_price_dec()));
         $temp[] = array('v' => (double) $r['Tuesday'], 'f' => number_format2($r['Tuesday'], user_price_dec()));
         $temp[] = array('v' => (double) $r['Wednesday'], 'f' => number_format2($r['Wednesday'], user_price_dec()));
         $temp[] = array('v' => (double) $r['Thursday'], 'f' => number_format2($r['Thursday'], user_price_dec()));
         $temp[] = array('v' => (double) $r['Friday'], 'f' => number_format2($r['Friday'], user_price_dec()));
         $temp[] = array('v' => (double) $r['Saturday'], 'f' => number_format2($r['Saturday'], user_price_dec()));
         $temp[] = array('v' => (double) $r['Sunday'], 'f' => number_format2($r['Sunday'], user_price_dec()));
         $rows[] = array('c' => $temp);
     }
     $table['rows'] = $rows;
     $jsonTable = json_encode($table);
     $js = "google.load('visualization', '1', {'packages':['corechart','table']});\ngoogle.setOnLoadCallback(drawChart" . $id . ");\nfunction drawChart" . $id . "() {\n  var data = new google.visualization.DataTable(" . $jsonTable . ");\n  var options = {";
     if ($this->graph_type != 'Table') {
         $js .= "height: 300, ";
     }
     $js .= "title: '" . $title . "'\n      };\n  var chart" . $id . " = new google.visualization." . $this->graph_type . "(document.getElementById('widget_div_" . $id . "'));\n  chart" . $id . ".draw(data, options);\n}";
     add_js_source($js);
 }
开发者ID:BGCX067,项目名称:fa-dashboard-module-svn-to-git,代码行数:40,代码来源:dailysales.php

示例10: display_heading

}
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);
开发者ID:pthdnq,项目名称:ivalley-svn,代码行数:31,代码来源:bank_transfer_view.php

示例11: inventory_movements

function inventory_movements()
{
    global $path_to_root;
    $from_date = $_POST['PARAM_0'];
    $to_date = $_POST['PARAM_1'];
    $category = $_POST['PARAM_2'];
    $location = $_POST['PARAM_3'];
    $comments = $_POST['PARAM_4'];
    $orientation = $_POST['PARAM_5'];
    $destination = $_POST['PARAM_6'];
    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 == '') {
        $loc = _('All');
    } else {
        $loc = get_location_name($location);
    }
    $cols = array(0, 60, 130, 160, 185, 215, 250, 275, 305, 340, 365, 395, 430, 455, 485, 520);
    $headers = array(_('Category'), _('Description'), _('UOM'), '', '', _('OpeningStock'), '', '', _('StockIn'), '', '', _('Delivery'), '', '', _('ClosingStock'));
    $headers2 = array("", "", "", _("QTY"), _("Rate"), _("Value"), _("QTY"), _("Rate"), _("Value"), _("QTY"), _("Rate"), _("Value"), _("QTY"), _("Rate"), _("Value"));
    $aligns = array('left', 'left', 'left', 'right', 'right', 'right', 'right', 'right', 'right', 'right', 'right', 'right', 'right', 'right', 'right');
    $params = array(0 => $comments, 1 => array('text' => _('Period'), 'from' => $from_date, 'to' => $to_date), 2 => array('text' => _('Category'), 'from' => $cat, 'to' => ''), 3 => array('text' => _('Location'), 'from' => $loc, 'to' => ''));
    $rep = new FrontReport(_('Costed Inventory Movements'), "CostedInventoryMovements", user_pagesize(), 8, $orientation);
    if ($orientation == 'L') {
        recalculate_cols($cols);
    }
    $rep->Font();
    $rep->Info($params, $cols, $headers2, $aligns, $cols, $headers, $aligns);
    $rep->NewPage();
    $totval_open = $totval_in = $totval_out = $totval_close = 0;
    $result = fetch_items($category);
    $dec = user_price_dec();
    $catgor = '';
    while ($myrow = db_fetch($result)) {
        if ($catgor != $myrow['description']) {
            $rep->NewLine(2);
            $rep->fontSize += 2;
            $rep->TextCol(0, 3, $myrow['category_id'] . " - " . $myrow['description']);
            $catgor = $myrow['description'];
            $rep->fontSize -= 2;
            $rep->NewLine();
        }
        $rep->NewLine();
        $rep->TextCol(0, 1, $myrow['stock_id']);
        $rep->TextCol(1, 2, $myrow['name']);
        $rep->TextCol(2, 3, $myrow['units']);
        $qoh_start = get_qoh_on_date($myrow['stock_id'], $location, add_days($from_date, -1));
        $qoh_end = get_qoh_on_date($myrow['stock_id'], $location, $to_date);
        $inward = trans_qty($myrow['stock_id'], $location, $from_date, $to_date);
        $outward = trans_qty($myrow['stock_id'], $location, $from_date, $to_date, false);
        $openCost = avg_unit_cost($myrow['stock_id'], $location, $from_date);
        $unitCost = avg_unit_cost($myrow['stock_id'], $location, add_days($to_date, 1));
        $rep->AmountCol(3, 4, $qoh_start, get_qty_dec($myrow['stock_id']));
        $rep->AmountCol(4, 5, $openCost, $dec);
        $openCost *= $qoh_start;
        $totval_open += $openCost;
        $rep->AmountCol(5, 6, $openCost);
        if ($inward > 0) {
            $rep->AmountCol(6, 7, $inward, get_qty_dec($myrow['stock_id']));
            $unitCost_in = trans_qty_unit_cost($myrow['stock_id'], $location, $from_date, $to_date);
            $rep->AmountCol(7, 8, $unitCost_in, $dec);
            $unitCost_in *= $inward;
            $totval_in += $unitCost_in;
            $rep->AmountCol(8, 9, $unitCost_in);
        }
        if ($outward > 0) {
            $rep->AmountCol(9, 10, $outward, get_qty_dec($myrow['stock_id']));
            $unitCost_out = trans_qty_unit_cost($myrow['stock_id'], $location, $from_date, $to_date, false);
            $rep->AmountCol(10, 11, $unitCost_out, $dec);
            $unitCost_out *= $outward;
            $totval_out += $unitCost_out;
            $rep->AmountCol(11, 12, $unitCost_out);
        }
        $rep->AmountCol(12, 13, $qoh_end, get_qty_dec($myrow['stock_id']));
        $rep->AmountCol(13, 14, $unitCost, $dec);
        $unitCost *= $qoh_end;
        $totval_close += $unitCost;
        $rep->AmountCol(14, 15, $unitCost);
        $rep->NewLine(0, 1);
    }
    $rep->Line($rep->row - 4);
    $rep->NewLine(2);
    $rep->TextCol(0, 1, _("Total"));
    $rep->AmountCol(5, 6, $totval_open);
    $rep->AmountCol(8, 9, $totval_in);
    $rep->AmountCol(11, 12, $totval_out);
    $rep->AmountCol(14, 15, $totval_close);
    $rep->Line($rep->row - 4);
//.........这里部分代码省略.........
开发者ID:nativebandung,项目名称:frontaccounting,代码行数:101,代码来源:rep308.php

示例12: 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 #'), _('Amount'), _('Partial'), _('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'), "SeriesReport", 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;
        $credit_num = "";
        $cm_date = "";
        $num = db_num_rows($res2);
        $var = array();
        while ($myrow2 = db_fetch($res2)) {
            $returns += $myrow2['ov_amount'];
            if ($num > 1) {
                $credit_num .= $myrow2['customized_no'] . "/";
                $cm_date = $myrow2['tran_date'] . "/";
            } else {
                $credit_num .= $myrow2['customized_no'];
                $cm_date = $myrow2['tran_date'];
            }
            $var = array($myrow2['trans_no']);
            //$res2 = get_return_discount($branch_data['sales_discount_account'], $myrow2['type'], $myrow2['trans_no']);
            //	while ($myrow3 = db_fetch($res2)){
            //		$rtn_dt += abs($myrow3['amount']);
            //	}
        }
        foreach ($var as $vars) {
            $res2 = get_return_discount($branch_data['sales_discount_account'], ST_CUSTCREDIT, $vars);
            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;
        $invoice_discount = $dt / $invoicetot * 100;
        $sales_discount = ($invoicetot - $total_returns) * ($invoice_discount / 100);
        $net_sales = $invoicetot - $total_returns - $sales_discount;
        $gross_commission = ($invoicetot - $total_returns) * ($myrow['commission'] / 100);
        $tot_invoice = $invoicetot - $invoicetot * ($invoice_discount / 100);
        $sample = $invoicetot - $total_returns;
        $rep->TextCol(0, 1, $myrow['tranDate']);
        $rep->TextCol(1, 2, $myrow['br_name']);
        $rep->TextCol(2, 3, $salesman);
        $rep->TextCol(3, 4, $myrow['customized_no']);
        if ($myrow['IsVoid'] == '') {
            $rep->AmountCol(4, 5, $invoicetot, 2);
            $rep->TextCol(5, 6, $cm_date);
            $rep->TextCol(6, 7, $credit_num);
            if ($total_returns != 0) {
                $rep->AmountCol(7, 8, $total_returns, 2);
            }
            if ($invoice_discount < 0) {
                $rep->TextCol(8, 9, "CLIENT SALES/SALES DISCOUNT NOT DEFINED.");
            } else {
                $rep->TextCol(8, 9, $invoice_discount . "%");
            }
            if ($sales_discount < 0) {
                $rep->TextCol(9, 10, "ERROR.");
            } else {
                if ($sales_discount != 0) {
                    $rep->AmountCol(9, 10, $sales_discount, 2);
                }
            }
//.........这里部分代码省略.........
开发者ID:knjy24,项目名称:FrontAccounting,代码行数:101,代码来源:rep_series_report.php

示例13: print_invoices

function print_invoices()
{
    global $path_to_root, $alternative_tax_include_on_docs, $suppress_tax_rates, $no_zero_lines_amount;
    include_once $path_to_root . "/reporting/includes/pdf_report.inc";
    $from = $_POST['PARAM_0'];
    $to = $_POST['PARAM_1'];
    $currency = $_POST['PARAM_2'];
    $email = $_POST['PARAM_3'];
    $pay_service = $_POST['PARAM_4'];
    $comments = $_POST['PARAM_5'];
    $orientation = $_POST['PARAM_6'];
    $TotalDiscount = 0;
    if (!$from || !$to) {
        return;
    }
    $orientation = $orientation ? 'L' : 'P';
    $dec = user_price_dec();
    $fno = explode("-", $from);
    $tno = explode("-", $to);
    $from = min($fno[0], $tno[0]);
    $to = max($fno[0], $tno[0]);
    $cols = array(4, 60, 225, 300, 325, 385, 450, 515);
    // $headers in doctext.inc
    $aligns = array('left', 'left', 'right', 'left', 'right', 'right', 'right');
    $params = array('comments' => $comments);
    $cur = get_company_Pref('curr_default');
    if ($email == 0) {
        $rep = new FrontReport(_('INVOICE'), "InvoiceBulk", user_pagesize(), 9, $orientation);
    }
    if ($orientation == 'L') {
        recalculate_cols($cols);
    }
    for ($i = $from; $i <= $to; $i++) {
        if (!exists_customer_trans(ST_SALESINVOICE, $i)) {
            continue;
        }
        $sign = 1;
        $myrow = get_customer_trans($i, ST_SALESINVOICE);
        $transId = get_payment_id($i);
        $urrow = get_customer_trans($transId['trans_no_from'], ST_CUSTPAYMENT);
        $baccount = get_default_bank_account($myrow['curr_code']);
        $params['bankaccount'] = $baccount['id'];
        $branch = get_branch($myrow["branch_code"]);
        $sales_order = get_sales_order_header($myrow["order_"], ST_SALESORDER);
        if ($email == 1) {
            $rep = new FrontReport("", "", user_pagesize(), 9, $orientation);
            $rep->title = _('INVOICE');
            $rep->filename = "Invoice" . $myrow['reference'] . ".pdf";
        }
        $rep->SetHeaderType('Header2');
        $rep->currency = $cur;
        $rep->Font();
        $rep->Info($params, $cols, null, $aligns);
        $contacts = get_branch_contacts($branch['branch_code'], 'invoice', $branch['debtor_no'], true);
        $baccount['payment_service'] = $pay_service;
        $rep->SetCommonData($myrow, $branch, $sales_order, $baccount, ST_SALESINVOICE, $contacts);
        $rep->NewPage();
        $result = get_customer_trans_details(ST_SALESINVOICE, $i);
        //   print_r($result);
        $SubTotal = 0;
        while ($myrow2 = db_fetch($result)) {
            if ($myrow2["quantity"] == 0) {
                continue;
            }
            $Net = round2($sign * ((1 - $myrow2["discount_percent"]) * $myrow2["unit_price"] * $myrow2["quantity"]), user_price_dec());
            $SubTotal += $Net;
            $DisplayPrice = number_format2($myrow2["unit_price"], $dec);
            $DisplayQty = number_format2($sign * $myrow2["quantity"], get_qty_dec($myrow2['stock_id']));
            $DisplayNet = number_format2($Net, $dec);
            if ($myrow2["discount_percent"] == 0) {
                $DisplayDiscount = 0;
            } else {
                $DisplayDiscount = number_format2($myrow2["discount_percent"] * 100, user_percent_dec()) . "%";
            }
            $rep->fontSize += 5;
            $rep->TextCol(0, 1, $myrow2['stock_id'], -2);
            $oldrow = $rep->row;
            $rep->TextColLines(1, 5, $myrow2['StockDescription'], -2);
            $newrow = $rep->row;
            $rep->row = $oldrow;
            if ($Net != 0.0 || !is_service($myrow2['mb_flag']) || !isset($no_zero_lines_amount) || $no_zero_lines_amount == 0) {
                //$rep->TextCol(2, 3,	$DisplayQty, -2);
                //$rep->TextCol(3, 4,	$myrow2['units'], -2);
                $rep->TextCol(5, 6, $DisplayPrice, -2);
                //$rep->TextCol(5, 6,	$DisplayDiscount, -2);
                $rep->TextCol(6, 7, $DisplayNet, -2);
                $TotalDiscount += $DisplayPrice * ($DisplayDiscount / 100);
            }
            $rep->row = $newrow;
            //$rep->NewLine(1);
            if ($rep->row < $rep->bottomMargin + 15 * $rep->lineHeight) {
                $rep->NewPage();
            }
            $rep->fontSize -= 5;
        }
        $memo = get_comments_string(ST_SALESINVOICE, $i);
        if ($memo != "") {
            $rep->NewLine();
            $rep->TextColLines(1, 5, $memo, -2);
        }
//.........这里部分代码省略.........
开发者ID:raqib,项目名称:ac_dev,代码行数:101,代码来源:rep107_due_draft.php

示例14: print_subsidiary_ledger

function print_subsidiary_ledger()
{
    global $path_to_root, $systypes_array;
    $dim = get_company_pref('use_dimension');
    $dimension = $dimension2 = 0;
    $from = $_POST['PARAM_0'];
    $to = $_POST['PARAM_1'];
    $cat = $_POST['PARAM_2'];
    $account = $_POST['PARAM_3'];
    $account2 = $_POST['PARAM_4'];
    if ($destination) {
        include_once $path_to_root . "/reporting/includes/excel_report.inc";
    } else {
        include_once $path_to_root . "/reporting/includes/pdf_report2.inc";
    }
    $orientation = $orientation ? 'L' : 'P';
    $rep = new FrontReport(_('Subsidiary Ledger Report'), "SubsidiaryLedger", user_pagesize(), 9, L);
    $dec = user_price_dec();
    //$headers = array(_('Type'),   _('Ref'), _('#'),   _('Date'), _('Dimension')." 1", _('Dimension')." 2",
    //      _('Person/Item'), _('Debit'),   _('Credit'), _('Balance'));
    //$cols = array(0, 80, 100, 150, 210, 280, 340, 400, 450, 510, 570);
    $cols = array(0, 50, 140, 200, 210, 400, 450, 550, 600, 650);
    //------------0--1---2-----3----4----5----6----7----8----9----10-------
    //-----------------------dim1-dim2-----------------------------------
    //-----------------------dim1----------------------------------------
    //-------------------------------------------------------------------
    $aligns = array('left', 'left', 'left', 'left', 'left', 'right', 'right', 'right', 'right', 'right');
    //$headers = array(_('ID'), '', '', '', '', '', '', _('Debit'), _('Credit'), _('Balance'));
    $params = array(0 => $comments, 1 => array('text' => _('Period'), 'from' => $from, 'to' => $to), 2 => array('text' => _('Accounts'), 'from' => $fromacc, 'to' => $fromacc));
    if ($orientation == 'L') {
        recalculate_cols($cols);
    }
    $rep->SetHeaderType('header3');
    $rep->Font();
    $rep->Info($params, $cols, $headers, $aligns);
    $rep->NewPage();
    if ($cat == 3) {
        $person = get_salesman_name($account);
    }
    if ($cat == 1) {
        $person = get_supplier_name($account);
    }
    /*$rep->TextCol(0,2, $cat);
      $rep->NewLine();*/
    $rep->Font('bold');
    $rep->TextCol(0, 2, "Name:" . $person);
    $rep->NewLine();
    $rep->TextCol(0, 1, "ID:");
    $rep->TextCol(1, 2, "Src:");
    $rep->TextCol(2, 3, "Date:");
    $rep->TextCol(4, 5, "Memo:");
    $rep->TextCol(5, 6, "Account:");
    $rep->TextCol(6, 7, "Debit:");
    $rep->TextCol(8, 9, "Credit:");
    $rep->Font();
    $rep->NewLine(2);
    $result = getTransaction($from, $to, $cat, $account, $account2);
    $type = '';
    while ($myrow = db_fetch($result)) {
        if ($myrow['Voided'] == '' && $myrow['amount'] > 0) {
            $comments = get_comments_string($myrow['type'], $myrow['type_no']);
            $custom = get_custom_no($myrow['type_no'], $myrow['type']);
            if ($myrow['type'] == ST_DISBURSEMENT) {
                $type = "CD";
            }
            if ($myrow['type'] == ST_PURCHASEORDER) {
                $type = "P.O.";
            }
            if ($myrow['type'] == ST_SUPPAYMENT) {
                $type = "CD";
            }
            //else
            //    $type = $systypes_array[$myrow["type"]];
            $rep->TextCol(0, 1, "#" . $custom);
            $rep->TextCol(1, 2, $type);
            $rep->TextCol(2, 3, $myrow['tranDate']);
            $rep->TextCol(4, 5, $comments);
            $rep->TextCol(5, 6, $myrow['account']);
            $dr += $myrow['amount'];
            $rep->AmountCol(6, 7, $myrow['amount'], 2);
            $rep->NewLine();
        } else {
            if ($myrow['Voided'] == '' && $myrow['amount'] < 0) {
                $cr += $myrow['amount'];
                //$rep->AmountCol(8,9, $myrow['amount'], 2);
            }
        }
    }
    $rep->NewLine(2);
    $rep->Font('bold');
    $rep->AmountCol(6, 7, $dr, 2);
    $rep->NewLine(2);
    $rep->TextCol(1, 2, "Net Activity: ");
    $rep->AmountCol(2, 4, $cr, 2);
    $rep->End();
}
开发者ID:knjy24,项目名称:FrontAccounting,代码行数:96,代码来源:rep711.php

示例15: array

            $th = array(_("Account Code"), _("Account Description"), _("Dimension"), _("Amount"), _("Memo"));
        } else {
            $th = array(_("Account Code"), _("Account Description"), _("Amount"), _("Memo"));
        }
    }
    table_header($th);
    $k = 0;
    //row colour counter
    $total_amount = 0;
    while ($item = db_fetch($items)) {
        if ($item["account"] != $to_trans["account_code"]) {
            alt_table_row_color($k);
            label_cell($item["account"]);
            label_cell($item["account_name"]);
            if ($dim >= 1) {
                label_cell(get_dimension_string($item['dimension_id'], true));
            }
            if ($dim > 1) {
                label_cell(get_dimension_string($item['dimension2_id'], true));
            }
            amount_cell(-$item["amount"]);
            label_cell($item["memo_"]);
            end_row();
            $total_amount += $item["amount"];
        }
    }
    label_row(_("Total"), number_format2(-$total_amount, user_price_dec()), "colspan=" . (2 + $dim) . " align=right", "align=right");
    end_table(1);
    display_allocations_from($to_trans['person_type_id'], $to_trans['person_id'], 2, $trans_no, $to_trans['settled_amount']);
}
end_page(true, false, false, ST_BANKDEPOSIT, $trans_no);
开发者ID:knjy24,项目名称:FrontAccounting,代码行数:31,代码来源:gl_deposit_view.php


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