Exemple #1
0
<?php

set_include_path("../");
include_once "inc/essentials.php";
include_once "inc/functions.php";
include_once "models/masterdata.php";
include_once "pages/message.php";
$akun = load_data_akun();
$bank = load_data_bank();
$cara_bayar = array('Cash', 'Voucher', 'Credit Card', 'Debet Card');
?>

<script type="text/javascript">
$(function() {
    load_data_billing();
    $('#search').keyup(function() {
        var value = $(this).val();
        load_data_billing('',value,'');
    });
});
function hitung_kembalian() {
    //var tTagihan    = parseInt(currencyToNumber($('#total_tagihan').val()));
    var tPembayaran = parseInt(currencyToNumber($('#pembayaran').val()));
    var nBayar      = parseInt(currencyToNumber($('#serahuang').val()));
    
    var kembalian   = nBayar-tPembayaran;
    if (kembalian < 0) {
        $('#label').html('Kekurangan:');
        $('#kembalian').html(numberToCurrency(kembalian));
    } else {
        $('#label').html('Kembalian:');
Exemple #2
0
    <th width="10%">Kode Akun</th>
    <th width="4%">#</th>
</tr>
</thead>
<tbody>
    <?php 
$limit = 10;
$page = $_GET['page'];
if ($_GET['page'] === '') {
    $page = 1;
    $offset = 0;
} else {
    $offset = ($page - 1) * $limit;
}
$param = array('id' => $_GET['id_bank'], 'limit' => $limit, 'start' => $offset, 'search' => $_GET['search']);
$list_data = load_data_bank($param);
$master_barang = $list_data['data'];
$total_data = $list_data['total'];
foreach ($master_barang as $key => $data) {
    $str = $data->id . '#' . $data->nama . '#' . $data->charge . '#' . $data->kode_akun;
    ?>
    <tr class="<?php 
    echo $key % 2 == 0 ? 'even' : 'odd';
    ?>
">
        <td align="center"><?php 
    echo ++$key;
    ?>
</td>
        <td><?php 
    echo $data->nama;