本文整理汇总了PHP中database1::getMonthlyExpenses方法的典型用法代码示例。如果您正苦于以下问题:PHP database1::getMonthlyExpenses方法的具体用法?PHP database1::getMonthlyExpenses怎么用?PHP database1::getMonthlyExpenses使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类database1
的用法示例。
在下文中一共展示了database1::getMonthlyExpenses方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: revenueBarChart
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
/**
* Multiple horizontal bar chart demonstration.
*
*/
include "../../../COCONUT/libchart/libchart/classes/libchart.php";
$chart = new revenueBarChart(4000, 1500);
$ro = new database1();
$serie1 = new XYDataSet();
$serie1->addPoint(new Point("{$month} 31", number_format($ro->getMonthlyExpenses($month, "31", $year), 2)));
$serie1->addPoint(new Point("{$month} 30", number_format($ro->getMonthlyExpenses($month, "30", $year), 2)));
$serie1->addPoint(new Point("{$month} 29", number_format($ro->getMonthlyExpenses($month, "29", $year), 2)));
$serie1->addPoint(new Point("{$month} 28", number_format($ro->getMonthlyExpenses($month, "28", $year), 2)));
$serie1->addPoint(new Point("{$month} 27", number_format($ro->getMonthlyExpenses($month, "27", $year), 2)));
$serie1->addPoint(new Point("{$month} 26", number_format($ro->getMonthlyExpenses($month, "26", $year), 2)));
$serie1->addPoint(new Point("{$month} 25", number_format($ro->getMonthlyExpenses($month, "25", $year), 2)));
$serie1->addPoint(new Point("{$month} 24", number_format($ro->getMonthlyExpenses($month, "24", $year), 2)));
$serie1->addPoint(new Point("{$month} 23", number_format($ro->getMonthlyExpenses($month, "23", $year), 2)));
$serie1->addPoint(new Point("{$month} 22", number_format($ro->getMonthlyExpenses($month, "22", $year), 2)));
$serie1->addPoint(new Point("{$month} 21", number_format($ro->getMonthlyExpenses($month, "21", $year), 2)));
$serie1->addPoint(new Point("{$month} 20", number_format($ro->getMonthlyExpenses($month, "20", $year), 2)));
$serie1->addPoint(new Point("{$month} 19", number_format($ro->getMonthlyExpenses($month, "19", $year), 2)));
$serie1->addPoint(new Point("{$month} 18", number_format($ro->getMonthlyExpenses($month, "18", $year), 2)));
$serie1->addPoint(new Point("{$month} 17", number_format($ro->getMonthlyExpenses($month, "17", $year), 2)));
$serie1->addPoint(new Point("{$month} 16", number_format($ro->getMonthlyExpenses($month, "16", $year), 2)));
示例2:
$totalExpenses = 0;
$ro->coconutTableStart();
$ro->coconutTableRowStart();
$ro->coconutTableHeader("Date");
$ro->coconutTableHeader("IPD");
$ro->coconutTableHeader("OPD");
$ro->coconutTableHeader("Income");
$ro->coconutTableHeader("Expenses");
$ro->coconutTableRowStop();
$ro->coconutTableRowStart();
$firstDay = $ro->getPxRevenueDaily_ipd($month, "01", $year) + $ro->getPxRevenueDaily_opd($month, "01", $year);
$ro->coconutTableData(" {$month} 1, {$year} ");
$ro->coconutTableData(number_format($ro->getPxRevenueDaily_ipd($month, "01", $year), 2));
$ro->coconutTableData(number_format($ro->getPxRevenueDaily_opd($month, "01", $year), 2));
$ro->coconutTableData(number_format($firstDay, 2));
$ro->coconutTableData(number_format($ro->getMonthlyExpenses($month, "01", $year) * 1000, 2));
$totalIncome += $firstDay;
$totalExpenses += $ro->getMonthlyExpenses($month, "01", $year);
$ro->coconutTableRowStop();
$ro->coconutTableRowStart();
$secondDay = $ro->getPxRevenueDaily_ipd($month, "02", $year) + $ro->getPxRevenueDaily_opd($month, "02", $year);
$ro->coconutTableData(" {$month} 2, {$year} ");
$ro->coconutTableData(number_format($ro->getPxRevenueDaily_ipd($month, "02", $year), 2));
$ro->coconutTableData(number_format($ro->getPxRevenueDaily_opd($month, "02", $year), 2));
$ro->coconutTableData(number_format($secondDay, 2));
$ro->coconutTableData(number_format($ro->getMonthlyExpenses($month, "02", $year) * 1000, 2));
$totalIncome += $secondDay;
$totalExpenses += $ro->getMonthlyExpenses($month, "02", $year);
$ro->coconutTableRowStop();
$ro->coconutTableRowStart();
$thirdDay = $ro->getPxRevenueDaily_ipd($month, "03", $year) + $ro->getPxRevenueDaily_opd($month, "03", $year);