本文整理汇总了PHP中general::tax方法的典型用法代码示例。如果您正苦于以下问题:PHP general::tax方法的具体用法?PHP general::tax怎么用?PHP general::tax使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类general
的用法示例。
在下文中一共展示了general::tax方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: number_format
echo number_format($finalize->jml_bayar, 0, ',', '.');
?>
</td>
<td> </td>
<th>PPN</th>
<th>:</th>
<td style="border-right: 1px solid #b7b9b6;">Rp. <?php
echo number_format(general::tax($finalize->jml_bayar), 0, ',', '.');
?>
</td>
</tr>
<tr>
<th style="border-left: 1px solid #b7b9b6; vertical-align: middle;">Grand Total</th>
<th style="vertical-align: middle;">:</th>
<td style="vertical-align: middle;">Rp. <?php
echo number_format(general::tax($finalize->jml_bayar) + $finalize->jml_bayar, 0, ',', '.');
?>
</td>
<td> </td>
<th style="vertical-align: middle;">Bayar</th>
<th style="vertical-align: middle;">:</th>
<td style="border-right: 1px solid #b7b9b6; vertical-align: middle;"><?php
echo form_input(array('id' => 'bayar', 'name' => 'cash', 'class' => 'form-control'));
?>
</td>
</tr>
<tr>
<th style="border-left: 1px solid #b7b9b6; border-bottom: 1px solid #b7b9b6;"></th>
<th style="border-bottom: 1px solid #b7b9b6;"></th>
<td style="border-bottom: 1px solid #b7b9b6;"></td>
<td style="border-bottom: 1px solid #b7b9b6;"></td>
示例2: foreach
<tr>
<th>No</th>
<th>ID</th>
<th>Tanggal</th>
<th>Pemesan</th>
<th style="text-align: center;">Total</th>
<th style="text-align: center;">PPN</th>
<th style="text-align: center;"></th>
</tr>
<?php
if (!empty($order_list)) {
$no = 1;
$tax_total = 0;
$omz_total = 0;
foreach ($order_list as $order) {
$tax = general::tax($order->jml_bayar);
$tax_total = $tax_total + $tax;
$omz_total = $omz_total + $order->jml_bayar;
?>
<tr>
<td><strong><?php
echo $no;
?>
. </strong></td>
<td class="text-left"><a href="<?php
echo site_url('page=order&act=order_det&id=' . general::enkrip($order->no_nota));
?>
"><?php
echo $order->no_nota;
?>
</a></td>
示例3: trans_checkout
public function trans_checkout()
{
$module = $_GET['module'];
$totalamount = $_GET['total'];
if (!isset($module) or empty($module)) {
$this->session->set_flashdata('transaksi', '<div class="alert alert-warning">Transaksi gagal !!</div>');
redirect(base_url());
} else {
$kas = $this->cart->contents();
$no_nota = general::no_nota('tbl_orderlist', 'no_nota');
$cust = $this->session->userdata('cust');
$total = $this->cart->total();
$tax = general::tax($this->cart->total());
$gtotal = $total + $tax;
$nota = array('no_nota' => $no_nota, 'nama' => $cust['nama'], 'no_meja' => $cust['meja'], 'pelayan' => $cust['pelayan'], 'jml_bayar' => $total, 'jml_ppn' => $tax, 'jml_gtotal' => $gtotal, 'status_order' => 'confirm', 'status_payment' => 'unpaid', 'status_resto' => $cust['status']);
foreach ($kas as $cart) {
$nota_det = array('tgl' => date('Y-m-d H:i:s'), 'id_meja' => $cart['options']['id_meja'], 'id_menu' => $cart['options']['id_menu'], 'keterangan' => $cart['options']['keterangan'], 'tambahan' => $cart['options']['tambahan'], 'no_nota' => $no_nota, 'menu' => $cart['name'], 'harga' => $cart['price'], 'jml' => $cart['qty'], 'subtotal' => $cart['subtotal']);
crud::simpan('tbl_orderlist_det', $nota_det);
}
crud::simpan('tbl_orderlist', $nota);
$this->cart->destroy();
$this->session->unset_userdata('cust');
redirect('pesan/cetak.php?module=take_order&id=' . $this->encrypt->encode_url($cust['meja']) . '¬a=' . $no_nota . '&totalamount=' . $totalamount);
}
}