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


PHP Accounts::getSalesInPeriod方法代码示例

本文整理汇总了PHP中Accounts::getSalesInPeriod方法的典型用法代码示例。如果您正苦于以下问题:PHP Accounts::getSalesInPeriod方法的具体用法?PHP Accounts::getSalesInPeriod怎么用?PHP Accounts::getSalesInPeriod使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Accounts的用法示例。


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

示例1: date

$month = date("m", time());
$year = 2009;
$month = 6;
$period1 = $period->getPeriodID($year, $month);
for ($i = 0; $i < 6; $i++) {
    $year = date("Y", time());
    $month = date("m", time() - $i);
    if ($month <= 0) {
        $month = $month + 12;
        $year = $year - 1;
    }
    //$period1=$period->getPeriodID($year,$month);
    eval('$period' . (6 - $i) . "=" . $period->getPeriodID($year, $month) . ';');
    eval('$periodname' . (6 - $i) . "=" . $year . '-' . $month . ';');
}
echo "\n" . ($sales1 = $acc->getSalesInPeriod($period1));
echo "\n" . ($expenses1 = $acc->getCOGSAndExpensesInPeriod($period1));
echo "\n" . ($sales2 = $acc->getSalesInPeriod($period2));
echo "\n" . ($expenses2 = $acc->getCOGSAndExpensesInPeriod($period2));
echo "\n" . ($sales3 = $acc->getSalesInPeriod($period3));
echo "\n" . ($expenses3 = $acc->getCOGSAndExpensesInPeriod($period3));
echo "\n" . ($sales4 = $acc->getSalesInPeriod($period4));
echo "\n" . ($expenses4 = $acc->getCOGSAndExpensesInPeriod($period4));
echo "\n" . ($sales5 = $acc->getSalesInPeriod($period5));
echo "\n" . ($expenses5 = $acc->getCOGSAndExpensesInPeriod($period5));
echo "\n" . ($sales6 = $acc->getSalesInPeriod($period6));
echo "\n" . ($expenses6 = $acc->getCOGSAndExpensesInPeriod($period6));
/*	$chart = new LineChart();

	$serie1 = new XYDataSet();
	$serie1->addPoint(new Point($periodname1, $sales1));
开发者ID:gauravsaxena21,项目名称:simantz,代码行数:31,代码来源:1chartsalesexpenses_6month.php

示例2: right

 //$orimonth=8;
 $orimonth = right(left(getDateSession(), 7), 2);
 $oriyear = left(getDateSession(), 4);
 //$period1=$period->getPeriodID($year,$month);
 for ($i = 5; $i >= 0; $i--) {
     $year = $oriyear;
     $month = $orimonth - $i;
     if ($month <= 0) {
         $month = $month + 12;
         $year = $year - 1;
     }
     //$period1=$period->getPeriodID($year,$month);
     eval("\$period" . (5 - $i) . "=" . $period->getPeriodID($year, $month) . ";");
     eval("\$periodname" . (5 - $i) . "=\$year.'-'.\$month;");
 }
 $sales0 = $acc->getSalesInPeriod($period0);
 $expenses0 = $acc->getCOGSAndExpensesInPeriod($period0);
 $sales1 = $acc->getSalesInPeriod($period1);
 $expenses1 = $acc->getCOGSAndExpensesInPeriod($period1);
 $sales2 = $acc->getSalesInPeriod($period2);
 $expenses2 = $acc->getCOGSAndExpensesInPeriod($period2);
 $sales3 = $acc->getSalesInPeriod($period3);
 $expenses3 = $acc->getCOGSAndExpensesInPeriod($period3);
 $sales4 = $acc->getSalesInPeriod($period4);
 $expenses4 = $acc->getCOGSAndExpensesInPeriod($period4);
 $sales5 = $acc->getSalesInPeriod($period5);
 $expenses5 = $acc->getCOGSAndExpensesInPeriod($period5);
 /*echo <<< EOF
 $period0,$periodname0,$sales0,$expenses0<br/>
 $period1,$periodname1,$sales1,$expenses1<br/>
 $period2,$periodname2,$sales2,$expenses2<br/>
开发者ID:gauravsaxena21,项目名称:simantz,代码行数:31,代码来源:chartsalesexpenses_6month.php


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