コード例 #1
0
<?php

require_once "../../../class/Utils.php";
require_once "../../../class/DBWork.php";
require_once "../../../acct_class/DBAcctReportWork.php";
$acctWork = new DBAcctReportWork(true);
try {
    $acctWork->createWork($_POST, true);
    $res = $acctWork->requestCustomerLedger();
    $gycode = $acctWork->param["gycode"];
    $gycode_calc = false;
    if ((int) ($gycode / 100) == 1 or (int) ($gycode / 100) == 4) {
        $gycode_calc = true;
    }
    $yyyy = (int) substr($acctWork->param["from_yyyymmdd"], 0, 4);
    $tmp_sum = 0;
    $month_credit_sum = 0;
    $month_debit_sum = 0;
    $month_credit_total_sum = 0;
    $month_debit_total_sum = 0;
    $data = array();
    $month = 0;
    $tmp_month = 0;
    if (count($acctWork->result) > 0) {
        while ($item = $acctWork->fetchMapRow()) {
            $jp_yyyymmdd = (int) $item['jp_yyyymmdd'];
            $jp_rem = $item['jp_rem'];
            $customer_id = $item['customer_id'];
            $debit = $item['debit'];
            $credit = $item['credit'];
            $jp_id = $item['jp_id'];