本文整理汇总了PHP中Accounts::getCOGSAndExpensesInPeriod方法的典型用法代码示例。如果您正苦于以下问题:PHP Accounts::getCOGSAndExpensesInPeriod方法的具体用法?PHP Accounts::getCOGSAndExpensesInPeriod怎么用?PHP Accounts::getCOGSAndExpensesInPeriod使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Accounts
的用法示例。
在下文中一共展示了Accounts::getCOGSAndExpensesInPeriod方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: date
$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));
$serie1->addPoint(new Point($periodname2, $sales2));
示例2: right
$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/>
$period3,$periodname3,$sales3,$expenses3<br/>