Exemplo n.º 1
0
echo "<tr valign=\"top\">";
$liability = new Accountlist();
echo "<td width=\"" . $left_width . "\">";
$liability->init(2);
echo "<table border=0 cellpadding=5 class=\"simple-table balance-sheet-table\" width=\"100%\">";
echo "<thead><tr><th>Liabilities and Owners Equity</th><th align=\"right\">Amount</th></tr></thead>";
$liability->account_st_short(0);
echo "</table>";
echo "</td>";
$liability_total = -$liability->total;
$asset = new Accountlist();
echo "<td width=\"" . $right_width . "\">";
$asset->init(1);
echo "<table border=0 cellpadding=5 class=\"simple-table balance-sheet-table\" width=\"100%\">";
echo "<thead><tr><th>Assets</th><th align=\"right\">Amount</th></tr></thead>";
$asset->account_st_short(0);
echo "</table>";
echo "</td>";
$asset_total = $asset->total;
echo "</tr>";
$income = new Accountlist();
$income->init(3);
$expense = new Accountlist();
$expense->init(4);
$income_total = -$income->total;
$expense_total = $expense->total;
$pandl = $income_total - $expense_total;
$diffop = $this->Ledger_model->get_diff_op_balance();
/* Liability side */
$total = $liability_total;
echo "<tr valign=\"top\" class=\"total-area\">";
Exemplo n.º 2
0
    $net_expense->account_st_short(0);
    $net_expense_total += $net_expense->total;
}
echo "</table>";
echo "</td>";
/* Net P/L : Incomes */
$net_income_total = 0;
$this->db->from('groups')->where('parent_id', 3)->where('affects_gross !=', 1);
$net_income_list_q = $this->db->get();
echo "<td>";
echo "<table border=0 cellpadding=5 class=\"simple-table profit-loss-table\" width=\"100%\">";
echo "<thead><tr><th>Incomes (Net)</th><th align=\"right\">Amount</th></tr></thead>";
foreach ($net_income_list_q->result() as $row) {
    $net_income = new Accountlist();
    $net_income->init($row->id);
    $net_income->account_st_short(0);
    $net_income_total += $net_income->total;
}
echo "</table>";
echo "</td>";
$net_income_total = -$net_income_total;
/* Converting to positive value since Cr */
echo "</tr>";
/* Calculating Net P/L */
$netpl = $net_income_total - $net_expense_total + $grosspl;
/* Showing Net P/L : Expenses */
$nettotal = $net_expense_total;
echo "<tr valign=\"top\" class=\"total-area\">";
echo "<td>";
echo "<table border=0 cellpadding=5 class=\"simple-table profit-loss-total-table\" width=\"100%\">";
echo "<tr valign=\"top\">";