Example #1
0
function dateIndo($date = 0, $day = false, $time = false, $format = 0)
{
    // 0=01 Januari 1970,1 = 01/01/1970
    $bulan = get_bulan_all();
    $hari = get_hari_all();
    $d = date('d', $date);
    $m = date('m', $date);
    $y = date('Y', $date);
    $n = date('N', $date);
    $t = date('H:i', $date);
    if ($day) {
        switch ($format) {
            case 0:
                $date = $hari[$n] . ", " . $d . " " . $bulan[$m] . " " . $y . " ";
                break;
            case 1:
                $date = "{$hari[$n]}, {$d}/{$m}/{$y} ";
        }
    } else {
        $date = $d . " " . $bulan[$m] . " " . $y . " ";
    }
    if ($time) {
        $date .= $t;
    }
    return $date;
}
Example #2
0
function dateToIndo($date = "", $day = false, $time = false)
{
    $bulan = get_bulan_all();
    $hari = get_hari_all();
    $d = date('d', strtotime($date));
    $m = date('m', strtotime($date));
    $y = date('Y', strtotime($date));
    $n = date('N', strtotime($date));
    $t = date('H:i', strtotime($date));
    if ($day) {
        $date = $hari[$n] . ", " . $d . " " . $bulan[$m] . " " . $y . " ";
    } else {
        $date = $d . " " . $bulan[$m] . " " . $y . " ";
    }
    if ($time) {
        $date .= $t;
    }
    return $date;
}
Example #3
0
<br />
<b>Bulan/Tahun Transaksi</b> <?php 
echo get_bulan_all($_POST['bulan']);
?>
 <?php 
echo $_POST['tahun'];
?>
<table width="100%" border="1" cellspacing="1" cellpadding="2" rules="all">
	<tr>
		<th>Tanggal</th>
		<th>No Trx</th>
		<th>Kode Barang</th>
		<th>Harga Jual</th>
		<th>Qty</th>
		<th>Sub Total</th>
	</tr>
	<?php 
$total = 0;
$qtyTotal = 0;
foreach ($data->result_array() as $r) {
    $subTotal = $r['qty'] * $r['harga'];
    $total += $subTotal;
    $qtyTotal += $r['qty'];
    ?>
	<tr>
		<td><?php 
    echo $r['tanggal'];
    ?>
</td>
		<td><?php 
    echo $r['no_trx'];
Example #4
0
                            </div>
                        </div>
                    </div>
                </form>
			</div>
		</div>
        <div class="col-md-6">
            <div class="box box-success">
                <form id="frm_bulan" enctype="multipart/form-data" method="POST" class="form-horizontal" target="_blank" action="{urlCetak}/bulan">
                <input type="hidden" name="mode" value="bulanan" />
                    <div class="box-body">
                        <div class="form-group">
                            <label for="username" class="col-sm-4">Laporan Bulanan</label>
                            <div class="col-sm-3">
                                <?php 
$bulan = get_bulan_all();
?>
                                <select id="bulan" name="bulan" class="form-control input-sm">
                                    <?php 
foreach ($bulan as $key => $value) {
    ?>
                                    <option value="<?php 
    echo $key;
    ?>
"><?php 
    echo $value;
    ?>
</option>
                                    <?php 
}
?>