コード例 #1
0
ファイル: getYearTotal.php プロジェクト: noelesp/BBudget-v1.0
function YTDIncomeTotal()
{
    //Set Current Year
    $year = date("Y");
    for ($counter = 0; $counter <= 11; $counter += 1) {
        $x = $x + 1;
        $YTDIncome = $YTDIncome + yearIncomeTotal($x, $year);
    }
    return $YTDIncome;
}
コード例 #2
0
include 'getYearTotal.php';
$Month = array("Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre");
$x = 0;
$sumTotal = 0;
echo "<center>";
echo "<tr><td>Mes</td>";
echo "<td>Ofrenda Total</td>";
//echo "<td>Linea</td></tr>";
for ($counter = 0; $counter <= 11; $counter += 1) {
    $x = $x + 1;
    echo "<tr><td>";
    echo $Month[$counter];
    echo "</td><td>";
    echo "\$ " . number_format(yearIncomeTotal($x, $year), 2);
    echo "</td>";
    $sumTotal = $sumTotal + yearIncomeTotal($x, $year);
}
//echo "<td rowspan='12'>";
//echo "<img src='http://chart.apis.google.com/chart?chs=250x100&amp;chd=t:50,40,10&amp;chco=00FF00|FF0000|0000F4&amp;cht=p3&amp;chl=Ingresos|Gastos|Misiones' >";
//echo "</td>";
//echo "</tr>";
echo "</table>";
echo "<center><h2><blockquote>Total Ofrenda: \$<b>" . number_format($sumTotal, 2) . "</b></blockquote></h2></center>";
print "<p><a href='Ofrenda-Anual.php'>Reporte Anual</a> |   <a href='index.php'>Inicio</a></p>";
echo "</center>";
?>




コード例 #3
0
    echo "<tr><td>";
    echo $Month[$counter];
    echo "</td><td>";
    echo "\$ " . number_format(yearIncomeTotal($x, $year), 2);
    // Current Fiscal Year Income Total
    $fiscalYearIncome = $fiscalYearIncome + yearIncomeTotal($x, $year);
    echo "</td>";
    echo "<td>";
    echo "\$ " . number_format(yearExpenseTotal($x, $year), 2);
    // Current Fiscal Year Expense Total
    $fiscalYearExpense = $fiscalYearExpense + yearExpenseTotal($x, $year);
    echo "</td>";
    echo "<td>";
    echo "\$ " . number_format(yearIncomeTotal($x, $prevYear), 2);
    //Previous Fiscal Year Income Total
    $prevFYIncome = $prevFYIncome + yearIncomeTotal($x, $prevYear);
    echo "</td>";
    echo "<td>";
    echo "\$ " . number_format(yearExpenseTotal($x, $prevYear), 2);
    //Previous Fiscal Year Expense Total
    $prevFYExpense = $prevFYExpense + yearExpenseTotal($x, $prevYear);
    echo "</td>";
    echo "</tr>";
}
echo "</table>";
$balance = $fiscalYearIncome - $fiscalYearExpense;
$prevBalance = $prevFYIncome - $prevFYExpense;
echo "<center><h3><blockquote>Total Ingresos: \$<b>" . number_format($fiscalYearIncome, 2) . "</b></blockquote></h2></center>";
//echo "$prevYear Total Ingresos: $".number_format($prevFYIncome,2);
echo "<center><h3><blockquote>Total Gastos: \$<b>" . number_format($fiscalYearExpense, 2) . "</b></blockquote></h2></center>";
//echo "$prevYear Total Gastos: $".number_format($prevFYExpense,2);