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


PHP getTransactions函数代码示例

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


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

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

示例2: print_work_order_listing

function print_work_order_listing()
{
    global $path_to_root, $wo_types_array;
    $item = $_POST['PARAM_0'];
    $location = $_POST['PARAM_1'];
    $open_only = $_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';
    if ($item == '') {
        $items = _('All');
    } else {
        $row = get_item($item);
        $items = $row['description'];
    }
    if ($location == '') {
        $loc = _('All');
    } else {
        $loc = get_location_name($location);
    }
    $open = $open_only == 1 ? _('Yes') : _('No');
    $cols = array(0, 100, 120, 165, 210, 275, 315, 375, 385, 440, 495, 555);
    $headers = array(_('Type'), '#', 'Reference', _('Location'), _('Item'), _('Required'), _('Manufactured'), ' ', _('Date'), _('Required By'), _('Closed'));
    $aligns = array('left', 'left', 'left', 'left', 'left', 'right', 'right', 'left', 'left', 'left', 'left');
    $params = array(0 => $comments, 1 => array('text' => _('Items'), 'from' => $items, 'to' => ''), 2 => array('text' => _('Location'), 'from' => $loc, 'to' => ''), 3 => array('text' => _('Open Only'), 'from' => $open, 'to' => ''));
    $rep = new FrontReport(_('Work Order Listing'), "WorkOrderListing", user_pagesize(), 9, $orientation);
    if ($orientation == 'L') {
        recalculate_cols($cols);
    }
    $rep->Font();
    $rep->Info($params, $cols, $headers, $aligns);
    $rep->NewPage();
    $res = getTransactions($item, $open_only, $location);
    while ($trans = db_fetch($res)) {
        $rep->TextCol(0, 1, $wo_types_array[$trans['type']]);
        $rep->TextCol(1, 2, $trans['id'], -1);
        $rep->TextCol(2, 3, $trans['wo_ref'], -1);
        $rep->TextCol(3, 4, $trans['location_name'], -1);
        $rep->TextCol(4, 5, $trans['description'], -1);
        $dec = get_qty_dec($trans['stock_id']);
        $rep->AmountCol(5, 6, $trans['units_reqd'], $dec);
        $rep->AmountCol(6, 7, $trans['units_issued'], $dec);
        $rep->TextCol(7, 8, '', -1);
        $rep->TextCol(8, 9, sql2date($trans['date_']), -1);
        $rep->TextCol(9, 10, sql2date($trans['required_by']), -1);
        $rep->TextCol(10, 11, $trans['closed'] ? ' ' : _('No'), -1);
        $rep->NewLine();
    }
    $rep->Line($rep->row);
    $rep->End();
}
开发者ID:M-Shahbaz,项目名称:FA,代码行数:57,代码来源:rep402.php

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

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

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

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

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

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

示例9: showTransactions

function showTransactions()
{
    // Global Fun!
    global $DB;
    global $MySelf;
    // Are we allowed to do this?
    if (!$MySelf->isAccountant()) {
        makeNotice("You are not an accountant to your corporation. Access denied.", "error", "Access denied");
    }
    if (isset($_GET['auth'])) {
        $auth = true;
    } else {
        $auth = false;
    }
    // Sanity check.
    numericCheck($_GET['id'], 0);
    $username = idToUsername($_GET['id']);
    $id = $_GET['id'];
    // Load the transaction log.
    $account = $auth ? "'s TEST Auth" : "";
    $page = "<h2>Transaction log for " . ucfirst($username) . "{$account}</h2>";
    $users = $DB->query("select id, username from users where ((authID in (select authID from users where id = '{$id}') and '{$auth}' = 1) or id = '{$id}')");
    while ($user = $users->fetchRow()) {
        $userid = $user['id'];
        $username = $user['username'];
        $trans = getTransactions($userid);
        if (!$trans) {
            $page .= "<b>There are no transactions for {$username}.</b>";
        } else {
            $page .= $trans;
        }
        $page .= "<br>";
    }
    // Add the backlink.
    $page .= "<br><a href=\"index.php?action=payout\">Back to Payouts</a>";
    // Return the page.
    return $page;
}
开发者ID:nuxi,项目名称:MiningBuddy,代码行数:38,代码来源:showTransactions.php

示例10: manageWallet

function manageWallet()
{
    // Globals
    global $MySelf;
    global $DB;
    $MyCredits = getCredits($MySelf->getID());
    // Get (recent?) transactions
    $html = getTransactions($MySelf->getID());
    if ($MyCredits > 0) {
        // Create the dropdown menu with all pilots.
        $NamesDS = $DB->query("SELECT DISTINCT username, id FROM users WHERE deleted='0' ORDER BY username");
        $ddm = "<select name=\"to\">";
        while ($name = $NamesDS->fetchRow()) {
            // Lets not allow transfers to self.
            if ($name[id] != $MySelf->getID()) {
                $ddm .= "<option value=\"" . $name[id] . "\">" . ucfirst($name[username]) . "</option>";
            }
        }
        $ddm .= "</select>";
        $tt = new table(2, true);
        $tt->addHeader(">> Transfer ISK");
        $tt->addRow("#060622");
        $tt->addCol("You can transfer ISK into another Pilots wallet by using this form.", array("colspan" => 2));
        $tt->addRow();
        $tt->addCol("Transfer from:");
        $tt->addCol(ucfirst($MySelf->getUsername()));
        $tt->addRow();
        $tt->addCol("Transfer to:");
        $tt->addCol($ddm);
        $tt->addRow();
        $tt->addCol("Amount:");
        $tt->addCol("<input type=\"text\" name=\"amount\">");
        $tt->addRow();
        $tt->addCol("Reason:");
        $tt->addCol("<input type=\"text\" name=\"reason\">");
        $tt->addHeaderCentered("<input type=\"submit\" name=\"submit\" value=\"Transfer money\">");
        // Create form stuff, and embed the table within.
        $transfer = "<form action=\"index.php\" method=\"POST\">";
        $transfer .= $tt->flush();
        $transfer .= "<input type=\"hidden\" name=\"check\" value=\"true\">";
        $transfer .= "<input type=\"hidden\" name=\"action\" value=\"transferMoney\">";
        $transfer .= "</form>";
        // Create the payout form.
        $payout = new table(2, true);
        $payout->addHeader(">> Request payout");
        $payout->addRow("#060622");
        $payout->addCol("Fill out this form to request payout of ISK. An accountant will honor your request soon.", array("colspan" => 2));
        $payout->addRow();
        $payout->addCol("Payout amount:");
        $payout->addCol("<input type=\"text\" name=\"amount\" value=\"" . $MyCredits . "\"> ISK");
        $payout->addHeaderCentered("<input type=\"submit\" name=\"submit\" value=\"request payout\">");
        // Create form stuff, and embed the table within.
        $requestPayout = "<form action=\"index.php\" method=\"POST\">";
        $requestPayout .= $payout->flush();
        $requestPayout .= "<input type=\"hidden\" name=\"check\" value=\"true\">";
        $requestPayout .= "<input type=\"hidden\" name=\"action\" value=\"requestPayout\">";
        $requestPayout .= "</form>";
    }
    /*
     * Show current requests
     */
    $requests = $DB->query("SELECT * FROM payoutRequests WHERE payoutTime IS NULL AND applicant='" . $MySelf->getID() . "' ORDER BY time");
    $table = new table(4, true);
    $table->addHeader(">> Pending payout requests");
    $table->addRow("#060622");
    $table->addCol("request");
    $table->addCol("time");
    $table->addCol("amount");
    $table->addCol("Cancel");
    while ($request = $requests->fetchRow()) {
        $table->addRow();
        $table->addCol("#" . str_pad($request[request], "5", "0", STR_PAD_LEFT));
        $table->addCol(date("d.m.y H:i:s", $request[time]));
        $table->addCol(number_format($request[amount], 2) . " ISK");
        $table->addCol("<input type=\"checkbox\" name=\"" . $request[request] . "\" value=\"true\">");
        $haveRequest = true;
    }
    $table->addHeaderCentered("<input type=\"submit\" name=\"submit\" value=\"cancel marked requests\">");
    $takeBack = "<form action=\"index.php\" method=\"POST\">";
    $takeBack .= "<input type=\"hidden\" name=\"check\" value=\"true\">";
    $takeBack .= "<input type=\"hidden\" name=\"action\" value=\"deleteRequest\">";
    $takeBack .= $table->flush();
    $rakeBack .= "</form>";
    /*
     * Show fulfilled requests
     */
    $requests = $DB->query("SELECT * FROM payoutRequests WHERE payoutTime IS NOT NULL AND applicant='" . $MySelf->getID() . "' ORDER BY time");
    $table_done = new table(5, true);
    $table_done->addHeader(">> Fulfilled payout requests");
    $table_done->addRow("#060622");
    $table_done->addCol("request");
    $table_done->addCol("time");
    $table_done->addCol("amount");
    $table_done->addCol("Payout time");
    $table_done->addCol("Paid by");
    while ($request = $requests->fetchRow()) {
        $table_done->addRow();
        $table_done->addCol("#" . str_pad($request[request], "5", "0", STR_PAD_LEFT));
        $table_done->addCol(date("d.m.y H:i:s", $request[time]));
        $table_done->addCol(number_format($request[amount], 2) . " ISK");
//.........这里部分代码省略.........
开发者ID:nuxi,项目名称:MiningBuddy,代码行数:101,代码来源:manageWallet.php

示例11: print_inventory_planning

function print_inventory_planning()
{
    global $path_to_root;
    include_once $path_to_root . "reporting/includes/pdf_report.inc";
    $category = $_REQUEST['PARAM_0'];
    $location = $_REQUEST['PARAM_1'];
    $comments = $_REQUEST['PARAM_2'];
    $dec = user_qty_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, 50, 150, 180, 210, 240, 270, 300, 330, 390, 435, 480, 525);
    $per0 = strftime('%b', mktime(0, 0, 0, date('m'), date('d'), date('Y')));
    $per1 = strftime('%b', mktime(0, 0, 0, date('m') - 1, date('d'), date('Y')));
    $per2 = strftime('%b', mktime(0, 0, 0, date('m') - 2, date('d'), date('Y')));
    $per3 = strftime('%b', mktime(0, 0, 0, date('m') - 3, date('d'), date('Y')));
    $per4 = strftime('%b', mktime(0, 0, 0, date('m') - 4, date('d'), date('Y')));
    $headers = array(tr('Category'), '', $per4, $per3, $per2, $per1, $per0, '3*M', tr('QOH'), tr('Cust Ord'), tr('Supp Ord'), tr('Sugg Ord'));
    $aligns = array('left', 'left', 'right', 'right', 'right', 'right', 'right', 'right', 'right', '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 Planning Report'), "InventoryPlanning.pdf", user_pagesize());
    $rep->Font();
    $rep->Info($params, $cols, $headers, $aligns);
    $rep->Header();
    $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();
        }
        $custqty = getCustQty($trans['stock_id'], $trans['loc_code']);
        $custqty += getCustAsmQty($trans['stock_id'], $trans['loc_code']);
        $suppqty = getSuppQty($trans['stock_id'], $trans['loc_code']);
        $period = getPeriods($trans['stock_id'], $trans['loc_code']);
        $rep->NewLine();
        $rep->TextCol(0, 1, $trans['stock_id']);
        $rep->TextCol(1, 2, $trans['description']);
        $rep->TextCol(2, 3, number_format2($period['prd0'], $dec));
        $rep->TextCol(3, 4, number_format2($period['prd1'], $dec));
        $rep->TextCol(4, 5, number_format2($period['prd2'], $dec));
        $rep->TextCol(5, 6, number_format2($period['prd3'], $dec));
        $rep->TextCol(6, 7, number_format2($period['prd4'], $dec));
        $MaxMthSales = Max($period['prd0'], $period['prd1'], $period['prd2'], $period['prd3']);
        $IdealStockHolding = $MaxMthSales * 3;
        $rep->TextCol(7, 8, number_format2($IdealStockHolding, $dec));
        $rep->TextCol(8, 9, number_format2($trans['qty_on_hand'], $dec));
        $rep->TextCol(9, 10, number_format2($custqty, $dec));
        $rep->TextCol(10, 11, number_format2($suppqty, $dec));
        $SuggestedTopUpOrder = $IdealStockHolding - $trans['qty_on_hand'] + $custqty - $suppqty;
        if ($SuggestedTopUpOrder < 0.0) {
            $SuggestedTopUpOrder = 0.0;
        }
        $rep->TextCol(11, 12, number_format2($SuggestedTopUpOrder, $dec));
    }
    $rep->Line($rep->row - 4);
    $rep->End();
}
开发者ID:ravenii,项目名称:guardocs,代码行数:77,代码来源:rep302.php

示例12: time

$filter = (isset($_GET['filter']) and $_GET['filter']) ? $_GET['filter'] : 'all';
$today = time();
$day_start = date('Y-m-d ') . '00:00:00';
$day_end = date('Y-m-d ') . "23:59:59";
foreach ($temp as $ag) {
    $sched_from = $ag['g_schedFrom'];
    $sched_to = $ag['g_schedTo'];
    if (!$ag['g_isClosed'] and !$ag['g_isCancelled'] and !$ag['g_isDeleted'] or $today >= $sched_from and $today <= $sched_to or $ag['g_isClosed'] and $ag['g_lastUpdated'] >= $day_start and $ag['g_lastUpdated'] <= $day_end or $ag['g_isCancelled'] and $ag['g_lastUpdated'] >= $day_start and $ag['g_lastUpdated'] <= $day_end) {
        // cancelled today
        $all_games[$ag['g_id']] = $ag;
        //$all_bets = getAllBets($ag['g_id']);
        //$info_per_bet_item = getInfoPerBetItem($all_bets);
        //$all_games[$ag['g_id']]['info_per_bet_item'] = $info_per_bet_item;
    }
}
$transactions_today = getTransactions(strtotime($day_start), strtotime($day_end));
// get today's sales
foreach ($transactions_today as $td) {
    $sales_today += $td['tr_amount'];
}
$user_registrations = getUserRegistrations($day_start, $day_end);
$total_registrations = count($user_registrations);
// get today's house commission
$house_commissions = getHouseCommissions(strtotime($day_start), strtotime($day_end));
foreach ($house_commissions as $hc) {
    $total_house_commission += $hc['cd_amount'];
    // coins
}
$total_house_commission = $total_house_commission ? $total_house_commission / $config['currency_unit'] : 0;
?>
<!DOCTYPE html>
开发者ID:brianwang,项目名称:online-sports-betting,代码行数:31,代码来源:index.php

示例13: session_start

<?php 
session_start();
if (!(isset($_SESSION['wojiaonixue_internal_login_status']) and $_SESSION['wojiaonixue_internal_login_status'] == 'active')) {
    header("Location:login.html");
    exit;
}
header('Access-Control-Allow-Origin:*');
require_once "config.php";
require_once "processUtil.php";
require_once "globalData.php";
$codeParser = new CodeParser();
$conn = new mysqli($host, $user, $password, $database);
if ($_GET && $_GET["requestMethod"]) {
    $requestMethod = trim($_GET["requestMethod"]);
    if ($requestMethod == "getTransactions") {
        echo getTransactions($conn);
    } else {
        if ($requestMethod == "getTransactionsByStatus") {
            getTransactionsByStatus($conn);
        } else {
            if ($requestMethod == "myRecord") {
                getMyRecord($conn);
            } else {
                if ($requestMethod == "updateFollowStatus") {
                    updateFollowStatus($conn, $appid, $secret);
                } else {
                    if ($requestMethod == "manualCreateTransaction") {
                        manualCreateTransaction();
                    }
                }
            }
开发者ID:AnderLX,项目名称:wechat,代码行数:31,代码来源:supporting.php

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

示例15: 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();
}
开发者ID:ravenii,项目名称:guardocs,代码行数:86,代码来源:rep301.php


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