Exemplo n.º 1
0
 /**
  * getInstanceメソッド
  *
  * このクラスのオブジェクトを生成する。
  * 既に生成されていたら、前回と同じものを返す。
  *
  * @return object $instance
  */
 public static function getInstance()
 {
     if (!self::$_instance) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }
Exemplo n.º 2
0
/**
 * salesReportDayGraph.php
 *
 * Copyright (c) 2009 Fraise, Inc.
 * All rights reserved.
 */
/**
 * 管理画面売り上げ集計(曜日ごと)リストグラフページ処理ファイル。
 *
 * @copyright   2009 Fraise, Inc.
 * @author      mitsuhiro nakamura
 */
require_once D_BASE_DIR . "/common/admin_common.php";
$param = $requestOBJ->getParameterExcept($exceptArray);
$AdmCalculationOBJ = AdmCalculation::getInstance();
// 売り上げ総金額
$columnArray = "";
$whereArray = "";
$otherArray = "";
$columnArray[] = "p.pay_type";
$columnArray[] = "SUM(p.receive_money) AS pay_total";
$columnArray[] = "CAST(p.create_datetime AS DATE) AS payment_date";
$whereArray[] = "o.disable = 0";
$whereArray[] = "o.is_paid = 1";
$whereArray[] = "o.is_cancel = 0";
$whereArray[] = "o.status IN (" . AdmOrdering::ORDERING_STATUS_PRE_COMPLETE . ", " . AdmOrdering::ORDERING_STATUS_COMPLETE . ", " . AdmOrdering::ORDERING_STATUS_REST . ")";
$otherArray[] = "GROUP BY payment_date, o.id ORDER BY payment_date";
if (ComValidation::isDate($param["date"])) {
    $whereArray[] = "p.create_datetime >= '" . date("Y-m-01 00:00:00", strtotime($param["date"])) . "'";
    $whereArray[] = "p.create_datetime <= '" . date("Y-m-t 23:59:59", strtotime($param["date"])) . "'";