Esempio n. 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->requestGycodeReportDM();
    $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);
    $flag = $acctWork->param["flag"];
    $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;
    $gicho_credit = 0;
    $gicho_debit = 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'];