本文整理汇总了PHP中general::no_nota方法的典型用法代码示例。如果您正苦于以下问题:PHP general::no_nota方法的具体用法?PHP general::no_nota怎么用?PHP general::no_nota使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类general
的用法示例。
在下文中一共展示了general::no_nota方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: base_url
<?php
/*
* Session untuk ambil data cust dan meja
* - Variabel $sesi_cust['nama'] => Memuat data nama cust;
* - Variabel $sesi_cust['status'] => Memuat data status makan ditempan ato bungkus;
*/
$sesi_cust = $this->session->userdata('cust');
/*
* Generate No. Nota
*/
$IDbaru = general::no_nota('tbl_orderlist', 'no_nota');
/* Selesai */
?>
<div id="page-wrapper" style="margin-left: 0px;">
<div class="row">
<div class="col-lg-12">
<h1 class="page-header"><i class="fa fa-shopping-cart"></i> Transaksi Pembayaran</h1>
</div>
</div>
<!-- /.col-lg-12 -->
<div class="row">
<div class="col-lg-6">
<a href="<?php
echo base_url();
?>
"><button class="btn btn-primary"><i class="fa fa-fw fa-refresh"></i> Kembali</button></a><br/><br/>
</div>
示例2: 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);
}
}