当前位置: 首页>>代码示例>>PHP>>正文


PHP format_rupiah函数代码示例

本文整理汇总了PHP中format_rupiah函数的典型用法代码示例。如果您正苦于以下问题:PHP format_rupiah函数的具体用法?PHP format_rupiah怎么用?PHP format_rupiah使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了format_rupiah函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: table_debet

 public function table_debet()
 {
     $param = $this->input->post();
     $data = $this->mr->getDataDebet($param);
     $table = '';
     $i = 1;
     foreach ($data->result() as $key => $value) {
         if ($value->claimed == 'no') {
             $claimed = '<span class="label label-sm label-danger">Unclaimed</span>';
         } else {
             $claimed = '<span class="label label-sm label-success">Claimed</span>';
         }
         $table .= '
         <tr>
             <td width="50px">' . $i . '</td>
             <td>' . $value->bank . '</td>
             <td style="text-align:right;">' . format_rupiah($value->jumlah) . '</td>
             <td>' . $claimed . '</td>
         </tr>
         ';
         $i++;
     }
     $table_null = '
     <tr>
         <td colspan="10">Tidak ada data.</td>
     </tr>
     ';
     echo isset($value) ? $table : $table_null;
 }
开发者ID:ahmadsm,项目名称:iwakkoicenter,代码行数:29,代码来源:claim.php

示例2: get_list_cashdraw

 function get_list_cashdraw($param = '')
 {
     $sql = "SELECT * FROM view_selling_cashdraw WHERE `date` = ? AND user_id = ?";
     $hasil = $this->db->query($sql, array($param['tgl_awal'], $param['pegawai']));
     $data = $hasil->result();
     $list = "";
     if ($data != null) {
         foreach ($data as $das => $value) {
             $selisih = $value->total_cash - $value->end_cash;
             $list .= '
                 <tr>
                     <td class="text-center">' . $value->cashdraw_no . '</td>
                     <td>' . format_rupiah($value->start_cash) . '</td>
                     <td>' . format_rupiah($value->omset) . '</td>
                     <td>' . format_rupiah($value->total_cash) . '</td>
                     <td>' . format_rupiah($value->end_cash) . '</td>
                     <td>' . format_rupiah($selisih) . '</td>
                     <td>' . $value->nama . '</td>
                     <td>' . $value->status . '</td>
                     <td class="text-center">
                         <a onclick="print(this.id)" id="' . $value->id . '" data-toggle="modal" href = "#modal-note"  title="Print" class="btn btn-xs btn-default"><i class="icon-print"></i> Print</a>
                     </td>
                 </tr>
             ';
         }
     } else {
         $list .= '
             <tr>
                 <td colspan="6">No data to view...</td>
             </tr>
         ';
     }
     return $list;
 }
开发者ID:ahmadsm,项目名称:iwakkoicenter,代码行数:34,代码来源:mdl_validasi.php

示例3: product_detail

 public function product_detail()
 {
     $product = $this->product->get_product($_GET['id']);
     $product_related = $this->product->get_all_product('related', 'published', 'all_records', $product['id_product_category']);
     $total_product_related = $this->product->get_all_product('related', 'published', 'total_data', $product['id_product_category']);
     $brand = $this->brand->get_brand($product['id']);
     if (isset($_SESSION['user_type']) && isset($_SESSION[''])) {
         $user_name = '';
     } else {
         $user_name = '';
     }
     if ($product['status'] == 0) {
         $status = 'Belum Tersedia';
     } else {
         $status = 'Tersedia';
     }
     $this->view->assign('captcha_src', SITE_CAPTCHA_SRC);
     $this->view->assign('product_brand', $brand['name']);
     $this->view->assign('product_status', $status);
     $this->view->assign('product_name', $product['name']);
     $this->view->assign('product_price', format_rupiah($product['price']));
     $this->view->assign('product_description', $product['description']);
     $this->view->assign('product_img_thumb', $this->img_dir . 'thumb_' . $product['image']);
     $this->view->assign('product_img', $this->img_dir . $product['image']);
     $this->view->assign('total_product_related', $total_product_related);
     $this->view->assign('product_related', $product_related);
     parent::fetch('product/product_detail', 'module');
 }
开发者ID:asmari,项目名称:zcosp,代码行数:28,代码来源:site.php

示例4: FancyTable

 function FancyTable($header, $data)
 {
     // Colors, line width and bold font
     $this->SetFillColor(255, 165, 74);
     $this->SetTextColor(255);
     $this->SetDrawColor(128, 0, 0);
     $this->SetLineWidth(0.2);
     $this->SetFont('', 'B');
     // Header
     $w = array(10, 10, 35, 70, 30, 20, 10);
     for ($i = 0; $i < count($header); $i++) {
         $this->Cell($w[$i], 7, $header[$i], 1, 0, 'C', true);
     }
     $this->Ln();
     // Color and font restoration
     $this->SetFillColor(224, 235, 255);
     $this->SetTextColor(0);
     $this->SetFont('');
     // Data
     $fill = false;
     foreach ($data as $row) {
         $this->Cell($w[0], 6, $row[0], 'LR', 0, 'L', $fill);
         $this->Cell($w[1], 6, $row[1], 'LR', 0, 'L', $fill);
         $this->Cell($w[2], 6, $row[2], 'LR', 0, 'L', $fill);
         $this->Cell($w[3], 6, $row[3], 'LR', 0, 'L', $fill);
         $this->Cell($w[4], 6, $row[4], 'LR', 0, 'L', $fill);
         $this->Cell($w[5], 6, format_rupiah($row[5]), 'LR', 0, 'R', $fill);
         $this->Cell($w[6], 6, $row[6], 'LR', 0, 'L', $fill);
         $this->Ln();
         $fill = !$fill;
     }
     // Closing line
     $this->Cell(array_sum($w), 0, '', 'T');
 }
开发者ID:nurullaeli07,项目名称:try,代码行数:34,代码来源:slip_pdf.php

示例5: get_list_produk

    function get_list_produk($reference)
    {
        $sql = "SELECT * FROM atombizz_retur_internal_tmp WHERE reference='{$reference}' order by id asc";
        $data = $this->db->query($sql);
        $list = '';
        $i = 1;
        foreach ($data->result() as $das) {
            $list .= '
				<tr>
					<td class="text-center">' . $i . '</td>
					<td>' . $das->product_name . '</td>
					<td>' . $das->quantity . '</td>
					<td>' . format_rupiah($das->hpp) . '</td>
					<td class="text-right">' . format_rupiah($das->sub_total) . '</td>
					<td class="text-center">
						<a onclick="actEdit(' . $das->id . ')" data-toggle="tooltip" title="Edit" class="btn btn-xs btn-default"><i class="icon-pencil"></i></a>
						<a onclick="actDel(' . $das->id . ')" data-toggle="tooltip" title="Delete" class="btn btn-xs btn-default"><i class="icon-remove"></i></a>
					</td>
				</tr>
			';
            $i++;
        }
        $list_null = '
			<tr>
				<td colspan="6">No data to view...</td>
			</tr>
		';
        return $list != '' ? $list : $list_null;
    }
开发者ID:ahmadsm,项目名称:iwakkoicenter,代码行数:29,代码来源:mdl_retur_internal.php

示例6: saldo

 public function saldo()
 {
     $param = $this->input->post();
     $data = $this->mp->saldo($param);
     if ($data) {
         $data->saldo_show = format_rupiah($data->saldo);
         echo json_encode($data);
     } else {
         echo FALSE;
     }
 }
开发者ID:ahmadsm,项目名称:iwakkoicenter,代码行数:11,代码来源:kasbon.php

示例7: diskon

 function diskon()
 {
     // diskon
     $harga = format_rupiah($r[harga]);
     $disc = $r[diskon] / 100 * $r[harga];
     $hargadisc = number_format($r[harga] - $disc, 0, ",", ".");
     $d = $r['diskon'];
     $hargatetap = "<span class='price'> <br /></span>&nbsp;\n                    <span style=\"color:#ff6600;font-size:14px;\"> Rp. <b>{$hargadisc},-</b></span>";
     $hargadiskon = "<span style='text-decoration:line-through;font-size:14px;' class='price'>Rp. {$harga} <br /></span>\n\t\t\t\t\t<div style='text-align=center;font-size:14px;'>&nbsp;diskon {$d}%</div> \n                    <span style=\"color:#ff6600;font-size:14px;\"> Rp. <b>{$hargadisc},-</b></span>";
     if ($d != 0) {
         $divharga = $hargadiskon;
     } else {
         $divharga = $hargatetap;
     }
 }
开发者ID:muhamadyunus,项目名称:UASRPL,代码行数:15,代码来源:diskon_stok.php

示例8: get_all_product

 public function get_all_product($view = '', $attr = '', $mode = '', $id_pcategory = '')
 {
     parent::model('select');
     $this->db->select();
     $this->db->table($this->db_table);
     if ($attr == 'published') {
         $this->db->where('publish = "Y"');
     } else {
         if ($attr == 'unpublished') {
             $this->db->where('publish = "N"');
         }
     }
     if ($view == 'featured') {
         $this->db->where_and('featured = "Y"');
     } else {
         if ($view == 'latest') {
             $this->db->order('created');
             $this->db->sort('DESC');
             $this->db->limit('5');
         } else {
             if ($view == 'related') {
                 $this->db->where_and('id_product_category = "' . $id_pcategory . '"');
                 $this->db->limit('5');
             }
         }
     }
     $query = $this->db->build();
     if ($mode == 'total_data') {
         return $this->db->num_rows($query);
     } else {
         if ($mode == 'all_records') {
             $no = 0;
             while ($product = $this->db->fetch_array($query)) {
                 $data[] = array('no' => $no, 'id' => $product['id'], 'id_user' => $product['id_user'], 'id_product_category' => $product['id_product_category'], 'id_product_brand' => $product['id_product_brand'], 'name' => $product['name'], 'image' => $product['image'], 'price' => format_rupiah($product['price']), 'stock' => $product['stock'], 'status' => $product['status'], 'description' => $product['description'], 'featured' => $product['featured'], 'meta_desc' => $product['meta_desc'], 'meta_key' => $product['meta_key'], 'publish' => $product['publish'], 'created' => $product['created'], 'updated' => $product['updated']);
                 $no++;
             }
             return $data;
         }
     }
 }
开发者ID:asmari,项目名称:zcosp,代码行数:40,代码来源:model.php

示例9: view_cart

 public function view_cart($mode = '')
 {
     parent::model('custom');
     $this->db->custom(' SELECT * FROM order_temp, product 
                         WHERE session_id = "' . session_id() . '" 
                         AND order_temp.id_product=product.id');
     $query = $this->db->build();
     $total = 0;
     $data = '';
     while ($cart = $this->db->fetch_array($query)) {
         $subtotal = $cart['price'] * $cart['qty'];
         $total = $total + $subtotal;
         $data[] = array('id' => $cart['id'], 'session_id' => $cart['session_id'], 'id_product' => $cart['id_product'], 'product_name' => $cart['name'], 'product_price' => format_rupiah($cart['price']), 'qty' => $cart['qty'], 'subtotal' => format_rupiah($subtotal));
     }
     if ($mode == 'totalbuy') {
         return format_rupiah($total);
     } else {
         if ($mode == 'totaldata') {
             return $this->db->num_rows($query);
         } else {
             return $data;
         }
     }
 }
开发者ID:asmari,项目名称:zcosp,代码行数:24,代码来源:model.php

示例10: saldo

 public function saldo()
 {
     $param = $this->input->post();
     $data = $this->mp->get_saldo($param['faktur']);
     echo format_rupiah($data);
 }
开发者ID:ahmadsm,项目名称:iwakkoicenter,代码行数:6,代码来源:piutang.php

示例11: tanggal_format_indonesia

</td>
            <td><?php 
    echo $analisis->lab;
    ?>
</td>
            <td><?php 
    echo $analisis->jenis_conto;
    ?>
</td>
            <td><?php 
    echo $analisis->nama_pemohon;
    ?>
</td>
            <td><?php 
    echo tanggal_format_indonesia($analisis->tanggal_terima);
    ?>
</td>
            <td><?php 
    echo format_rupiah($analisis->biaya);
    ?>
</td>
            <td><?php 
    echo !$analisis->is_cancel ? 'PROSES' : 'CANCEL';
    ?>
</td>
        </tr>
    <?php 
}
?>
    </tbody>
</table>
开发者ID:phi314,项目名称:onix,代码行数:31,代码来源:permohonan_excel_v.php

示例12: foreach

                <th>Gaji</th>
                <th>TMT</th>
                <th></th>
            </tr>
        </thead>
        <tbody>
            <?php 
if (count($daftar_gaji) > 0) {
    foreach ($daftar_gaji as $d) {
        ?>
            <tr id="t_<?php 
        echo $d['id_gaji'];
        ?>
">
                <td align="right">Rp <?php 
        echo format_rupiah($d['gaji']);
        ?>
</td>
                <td><?php 
        echo format_tanggal_tampilan($d['TMT']);
        ?>
</td>
                <td>
                    <a onclick="hapus(<?php 
        echo $d['id_gaji'];
        ?>
); return false;" href="#">Hapus</a>
                </td>
            </tr>
            <?php 
    }
开发者ID:erxn,项目名称:siemas,代码行数:31,代码来源:list_gaji.php

示例13: get_list_produk_retur_out

    function get_list_produk_retur_out($reference)
    {
        $sql = "SELECT * FROM atombizz_retur_out_detail WHERE reference='{$reference}' order by id asc";
        $data = $this->db->query($sql);
        $list = '';
        $i = 1;
        foreach ($data->result() as $das) {
            // $hpp = ($das->unit_price - ($das->unit_price*$das->disc_reg/100) + ($das->unit_price*$das->tax_amount/100));
            $subtotal = $das->hpp * $das->quantity;
            $list .= '
				<tr>
					<td class="text-center">' . $i . '</td>
					<td>' . $das->product_name . '</td>
					<td class="money">' . $das->quantity . '</td>
					<td>' . format_rupiah($das->hpp) . '</td>
					<td>' . format_rupiah($subtotal) . '</td>
					<td class="text-center">
						<a onclick="actEdit(' . $das->id . ')" data-toggle="tooltip" title="Edit" class="btn btn-xs btn-default"><i class="icon-pencil"></i></a>
						
					</td>
				</tr>
			';
            $i++;
        }
        $list_null = '
			<tr>
				<td colspan="6">No data to view...</td>
			</tr>
		';
        return $list != '' ? $list : $list_null;
    }
开发者ID:ahmadsm,项目名称:iwakkoicenter,代码行数:31,代码来源:mdl_retur.php

示例14: format_rupiah

    echo $rows->nama;
    ?>
</td>
			<td><a href='index.php?mod=invoice&pg=invoice_detail&id=<?php 
    echo $rows->noinvoice;
    ?>
'><?php 
    echo $rows->noinvoice;
    ?>
</a></td>
			<td><?php 
    echo $rows->tanggal;
    ?>
</td>
				<td><?php 
    echo format_rupiah($rows->totalbayar);
    ?>
</td>
		
			<td><?php 
    echo get_status_invoice($rows->transfer);
    ?>
</td>
			<td><?php 
    echo tglkirim($rows->tglkirim);
    ?>
				
				</td>
			
				<td>	
					
开发者ID:alimin002,项目名称:gisecommerce,代码行数:30,代码来源:invoice_view.php

示例15: mysql_query

                                <th>Jumlah</th>
                                <th>Pilih</th>
                            </tr>
                            </thead>
                            <tbody>
                            <?php 
$qpembayaran = mysql_query("SELECT * FROM pembayaran WHERE nama!='Topup' ORDER BY created_at DESC");
while ($pembayaran = mysql_fetch_object($qpembayaran)) {
    ?>
                            <tr>
                                <td><?php 
    echo $pembayaran->nama;
    ?>
</td>
                                <td><?php 
    echo format_rupiah($pembayaran->jumlah);
    ?>
</td>
                                <td>
                                    <form action="transaksi_create.php" method="post">
                                        <button class="btn btn-warning" name="id" value="<?php 
    echo $pembayaran->id;
    ?>
">Pilih</button>
                                        <input type="hidden" name="submit_type" value="add_session_id_pembayaran">
                                        <input type="hidden" name="key" value="bulbasaur">
                                    </form>
                                </td>
                            </tr>
                            <?php 
}
开发者ID:phi314,项目名称:bulbasaur,代码行数:31,代码来源:transaksi_choose.php


注:本文中的format_rupiah函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。