} if (isset($_POST['getIncome'])) { if ($_POST['in_from'] != NULL && $_POST['in_to'] != NULL) { $income = new incomes(); $incomes_bet = $income->getIncomeBetween($_POST['pr_from'], $_POST['pr_to']); $smarty->assign('incomes_bet', $incomes_bet); } else { echo "MESSAGE..enter complete info"; } } if (isset($_POST['getProfit'])) { if ($_POST['pr_from'] != NULL && $_POST['pr_to'] != NULL) { $income = new incomes(); $incomes_bet = $income->getIncomeOnlyBetween($_POST['pr_from'], $_POST['pr_to']); $expense = new expenses(); $expenses_bet = $expense->getExpenseOnlyBetween($_POST['pr_from'], $_POST['pr_to']); $profit_bet = $incomes_bet - $expenses_bet; $smarty->assign('profit_bet', $profit_bet); } else { echo "MESSAGE..enter complete info"; } } /*$chart= new charts(); $expense= new expenses(); $values=$expense->getAll('value'); $a = $expense->getA(); $array['chart'] = array("caption"=> "daily expenses", "subCaption"=> "Astar Transports", "xAxisName"=> "Days", "yAxisName"=> "Expense (In Rs.)", "numberPrefix"=> "Rs. ",