本文整理匯總了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);