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


PHP Generic::formatRupiah方法代码示例

本文整理汇总了PHP中Generic::formatRupiah方法的典型用法代码示例。如果您正苦于以下问题:PHP Generic::formatRupiah方法的具体用法?PHP Generic::formatRupiah怎么用?PHP Generic::formatRupiah使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Generic的用法示例。


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

示例1: sendwithreturn

 public function sendwithreturn()
 {
     if (Efiwebsetting::getData('checkOAuth') == 'yes') {
         IMBAuth::checkOAuth();
     }
     $json = array();
     $json['status_code'] = 1;
     $idOrder = $_GET['id_order'];
     $toEmail = $_GET['email'];
     $order = new MasterOrderModel();
     $order->getByID($idOrder);
     $resto = new MasterRestaurantModel();
     $resto->getByID($order->id_restaurant);
     $subject = "Your receipt from " . $restoName . " , Receipt#" . $idOrder;
     $od = new OrderDetailModel();
     $d = new MasterDishModel();
     //      $dompdf = new Dompdf\Dompdf();
     global $db;
     $q = "SELECT {$od->table_name}.id_dish, {$d->table_name}.name, SUM(quantity) AS sum_qty, {$d->table_name}.price,\nSUM({$od->table_name}.price) AS sum_price, status_progress FROM `{$od->table_name}`\nRIGHT JOIN {$d->table_name} ON {$od->table_name}.id_dish = {$d->table_name}.id_dish WHERE id_order='{$idOrder}' GROUP BY id_dish";
     $arrDetails = $db->query($q, 2);
     $css_boot = _BPATH . "themes/tbstheme_ori/css/bootstrap.min.css";
     $image1 = _BPATH . _PHOTOURL . $resto->image_logo;
     if ($image1 == "") {
         $image1 = _BPATH . _PHOTOURL . "noimage.jpg";
     }
     $head = "<html xmlns=\"http://www.w3.org/1999/xhtml\">";
     $head = "<head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /><title>Notification email</title>";
     $head = $head . "<link href=" . $css_boot . " rel=\"stylesheet\">";
     $head = $head . "<link href=\"https://fonts.googleapis.com/css?family=Roboto+Condensed:400,700&subset=latin,latin-ext\" rel=\"stylesheet\" type=\"text/css\">";
     $head = $head . "</head>";
     $html = "<div style=\"max-width: 800px; box-shadow: 0 0 10px rgba(0, 0, 0, .15); font-size: 16px; line-height: 24px; font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; color: #555; margin: auto; padding: 30px; border: 1px solid #eee;\">\n<table style=\"width: 100%; line-height: inherit; text-align: left;\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td style=\"vertical-align: top; padding: 5px;\" colspan=\"2\">\n<table style=\"width: 100%; line-height: inherit; text-align: left;\">\n<tbody>\n<tr>\n<td style=\"vertical-align: top; font-size: 45px; line-height: 45px; color: #333; width: 50%; display: block; text-align: left; padding: 5px 5px 20px;\" align=\"left\" valign=\"top\"><img style=\"width: 50%; max-width: 300px;\" src=" . $image1 . " alt=\"\" /></td>\n</tr>\n<tr>\n<td style=\"vertical-align: top; width: 100%; display: block; text-align: left; padding: 5px 5px 40px;\" align=\"center\" valign=\"top\">";
     $html = $html . "<strong>" . $resto->name . "</strong><br />";
     $html = $html . $resto->district . " - " . $resto->city . " <br>";
     $html = $html . "Phone : " . $resto->phone_no . "</td>";
     $html = $html . "</tr>\n</tbody>\n</table>\n</td>\n</tr>\n<tr>\n<td style=\"vertical-align: top; padding: 5px;\" colspan=\"2\" valign=\"top\">\n<table style=\"width: 100%; line-height: inherit; text-align: left;\">\n<tbody>\n<tr>\n<td style=\"vertical-align: top; text-align: left; t width: 50%; display: block; padding: 5px 5px 20px;\" align=\"left\" valign=\"top\">";
     $html = $html . "</tr>";
     $html = $html . "Receipt #: " . $idOrder;
     $html = $html . "<br/>";
     $html = $html . "  Server : ";
     if ($order->type_order == "1" || $order->type_order == "3") {
         $html = $html . "Apps Order";
     } else {
         $html = $html . $order->server_name;
     }
     $html = $html . "<br/>";
     $html = $html . " Time Order : " . date("d M, Y H:m", strtotime($order->datetime_order));
     $html = $html . "<br/>";
     $html = $html . " Payment Method : " . Generic::selectPaymentMethod($order->status_payment);
     $html = $html . "<br/>";
     if ($order->type_order == "1" || $order->type_order == "3") {
         $html = $html . "Apps Order";
     } else {
         $html = $html . "Manual Order";
     }
     $html = $html . "<br/>";
     $html = $html . "</td>";
     $html = $html . "</tr> \n</tbody>\n</table>\n</td>\n</tr>\n<tr>\n<td style=\"vertical-align: top; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #ddd; font-weight: bold; background-color: #eee; padding: 5px;\" valign=\"top\" bgcolor=\"#eee\">Item</td>\n<td style=\"vertical-align: top; text-align: right; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #ddd; font-weight: bold; background-color: #eee; padding: 5px;\" align=\"center\" valign=\"top\" bgcolor=\"#eee\">#</td>\n<td style=\"vertical-align: top; text-align: right; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #ddd; font-weight: bold; background-color: #eee; padding: 5px;\" align=\"right\" valign=\"top\" bgcolor=\"#eee\">Price</td>\n  <td style=\"vertical-align: top; text-align: right; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #ddd; font-weight: bold; background-color: #eee; padding: 5px;\" align=\"right\" valign=\"top\" bgcolor=\"#eee\">Total</td>\n</tr>";
     foreach ($arrDetails as $details) {
         $void = "";
         if ($details->status_progress == "9") {
             $void = "<strong> Voided </strong>";
             $details->price = 0;
             $details->sum_price = 0;
         }
         $html = $html . "<tr><td style=\"vertical-align: top; border-bottom-width: 1px; border-bottom-color: #eee; border-bottom-style: solid; padding: 5px;\" valign=\"top\">" . $details->name . $void . "</td>";
         $html = $html . "<td style=\"vertical-align: top; text-align: right; border-bottom-width: 1px; border-bottom-color: #eee; border-bottom-style: solid; padding: 5px;\" align=\"right\" valign=\"top\">" . $details->sum_qty . "</td>";
         $html = $html . "<td style=\"vertical-align: top; text-align: right; border-bottom-width: 1px; border-bottom-color: #eee; border-bottom-style: solid; padding: 5px;\" align=\"right\" valign=\"top\">" . Generic::formatRupiah($details->price) . "</td>";
         $html = $html . "<td style=\"vertical-align: top; text-align: right; border-bottom-width: 1px; border-bottom-color: #eee; border-bottom-style: solid; padding: 5px;\" align=\"right\" valign=\"top\">" . Generic::formatRupiah($details->sum_price) . "</td></tr>";
     }
     $html = $html . "<tr>\n<td style=\"vertical-align: top; text-align: right; border-top-style: solid; border-top-width: 2px; border-top-color: #eee; font-weight: bold; padding: 5px;\" align=\"right\" valign=\"top\"></td>\n<td style=\"vertical-align: top; text-align: right; border-top-style: solid; border-top-width: 2px; border-top-color: #eee; font-weight: bold; padding: 5px;\" align=\"right\" valign=\"top\"></td>\n<td style=\"vertical-align: top; text-align: right; border-top-style: solid; border-top-width: 2px; border-top-color: #eee; font-weight: bold; padding: 5px;\" align=\"right\" valign=\"top\">Total : </td>\n<td style=\"vertical-align: top; text-align: right; border-top-style: solid; border-top-width: 2px; border-top-color: #eee; font-weight: bold; padding: 5px;\" align=\"right\" valign=\"top\">" . Generic::formatRupiah($order->total_cost) . "</td>\n</tr>\n<tr>\n<td style=\"vertical-align: top; text-align: right; border-top-style: solid; border-top-width: 2px; border-top-color: #eee; font-weight: bold; padding: 5px;\" align=\"right\" valign=\"top\"></td>\n<td style=\"vertical-align: top; text-align: right; border-top-style: solid; border-top-width: 2px; border-top-color: #eee; font-weight: bold; padding: 5px;\" align=\"right\" valign=\"top\"></td>\n<td style=\"vertical-align: top; text-align: right; border-top-style: solid; border-top-width: 2px; border-top-color: #eee; font-weight: bold; padding: 5px;\" align=\"right\" valign=\"top\">Disc Resto : </td>\n<td style=\"vertical-align: top; text-align: right; border-top-style: solid; border-top-width: 2px; border-top-color: #eee; font-weight: bold; padding: 5px;\" align=\"right\" valign=\"top\">" . Generic::formatRupiah($order->disc_resto) . "</td>\n</tr>\n<tr>\n<td style=\"vertical-align: top; text-align: right; font-weight: bold; padding: 5px;\" align=\"right\" valign=\"top\"></td>\n<td style=\"vertical-align: top; text-align: right; font-weight: bold; padding: 5px;\" align=\"right\" valign=\"top\"></td>\n<td style=\"vertical-align: top; text-align: right; font-weight: bold; padding: 5px;\" align=\"right\" valign=\"top\">Disc Credit Card : </td>\n<td style=\"vertical-align: top; text-align: right; font-weight: bold; padding: 5px;\" align=\"right\" valign=\"top\">" . Generic::formatRupiah($order->disc_bank) . "</td>\n</tr>\n<tr>\n<td style=\"vertical-align: top; text-align: right; font-weight: bold; padding: 5px;\" align=\"right\" valign=\"top\"></td>\n<td style=\"vertical-align: top; text-align: right; font-weight: bold; padding: 5px;\" align=\"right\" valign=\"top\"></td>\n<td style=\"vertical-align: top; text-align: right; font-weight: bold; padding: 5px;\" align=\"right\" valign=\"top\">Disc MR : </td>\n<td style=\"vertical-align: top; text-align: right; font-weight: bold; padding: 5px;\" align=\"right\" valign=\"top\">" . Generic::formatRupiah($order->disc_mr) . "</td>\n</tr>\n\n<tr>\n<td style=\"vertical-align: top; text-align: right; border-top-style: solid; border-top-width: 2px; border-top-color: #eee; font-weight: bold; padding: 5px;\" align=\"right\" valign=\"top\"></td>\n<td style=\"vertical-align: top; text-align: right; border-top-style: solid; border-top-width: 2px; border-top-color: #eee; font-weight: bold; padding: 5px;\" align=\"right\" valign=\"top\"></td>\n<td style=\"vertical-align: top; text-align: right; border-top-style: solid; border-top-width: 2px; border-top-color: #eee; font-weight: bold; padding: 5px;\" align=\"right\" valign=\"top\">Tax PB1 : </td>\n<td style=\"vertical-align: top; text-align: right; border-top-style: solid; border-top-width: 2px; border-top-color: #eee; font-weight: bold; padding: 5px;\" align=\"right\" valign=\"top\">" . Generic::formatRupiah($order->tax_pb1) . "</td>\n</tr>\n<tr>\n<td style=\"vertical-align: top; text-align: right; font-weight: bold; padding: 5px;\" align=\"right\" valign=\"top\"></td>\n<td style=\"vertical-align: top; text-align: right; font-weight: bold; padding: 5px;\" align=\"right\" valign=\"top\"></td>\n<td style=\"vertical-align: top; text-align: right; font-weight: bold; padding: 5px;\" align=\"right\" valign=\"top\">Service Charge : </td>\n<td style=\"vertical-align: top; text-align: right; font-weight: bold; padding: 5px;\" align=\"right\" valign=\"top\">" . Generic::formatRupiah($order->tax_pb1) . "</td>\n</tr>\n<tr>\n<td style=\"vertical-align: top; text-align: right; font-weight: bold; padding: 5px;\" align=\"right\" valign=\"top\"></td>\n<td style=\"vertical-align: top; text-align: right; font-weight: bold; padding: 5px;\" align=\"right\" valign=\"top\"></td>\n<td style=\"vertical-align: top; text-align: right; font-weight: bold; padding: 5px;\" align=\"right\" valign=\"top\">Other Charge : </td>\n<td style=\"vertical-align: top; text-align: right; font-weight: bold; padding: 5px;\" align=\"right\" valign=\"top\">" . Generic::formatRupiah($order->tax_pb1) . "</td>\n</tr>\n<tr>\n<td style=\"vertical-align: top; text-align: right; border-top-style: solid; border-top-width: 2px; border-top-color: #eee; font-weight: bold; padding: 5px;\" align=\"right\" valign=\"top\"></td>\n<td style=\"vertical-align: top; text-align: right; border-top-style: solid; border-top-width: 2px; border-top-color: #eee; font-weight: bold; padding: 5px;\" align=\"right\" valign=\"top\"></td>\n<td style=\"vertical-align: top; text-align: right; border-top-style: solid; border-top-width: 2px; border-top-color: #eee; font-weight: bold; padding: 5px;\" align=\"right\" valign=\"top\">Grand Total :</td>\n<td style=\"vertical-align: top; text-align: right; border-top-style: solid; border-top-width: 2px; border-top-color: #eee; font-weight: bold; padding: 5px;\" align=\"right\" valign=\"top\">" . Generic::formatRupiah($order->grand_total) . "</td>\n</tr>\n\n</tbody>\n</table>\n</div></html>";
     $html = $head . $html;
     $mail = new Leapmail();
     $res = $mail->sendEmailHTML($toEmail, $subject, $html);
     return $res;
 }
开发者ID:CapsuleCorpIndonesia,项目名称:martabak_revolution,代码行数:75,代码来源:Receipt.php

示例2: viewOrderDetail

    public function viewOrderDetail()
    {
        $id_order = isset($_GET['id_order']) ? addslashes($_GET['id_order']) : "";
        global $db;
        //        $id_order = '350';
        $q = "SELECT * FROM menurevo__order_detail WHERE id_order='{$id_order}'";
        $arrOrderDetail = $db->query($q, 2);
        $q = "SELECT * FROM menurevo__ms_order WHERE id_order='{$id_order}'";
        $arrOrder = $db->query($q, 2);
        //         echo $q;
        ?>

        <div class="well">

            <table class="table responsive"style="background: #dedede; width: 100%;" >
                <tr>
                    <td style="width: 50%;">

                        <h2>Take Away Order ID <?php 
        echo $id_order;
        ?>
                            , Order No. <?php 
        echo $arrOrder[0]->order_number;
        ?>
</h2>
                        <br>
                        <table class="table responsive" style="background: #dedede;">
                            <tr >
                                <td>
                                    Server : <?php 
        echo $arrOrder[0]->server_name;
        ?>
                                </td> 
                                <td style="text-align: right;">
                                    <?php 
        echo $arrOrder[0]->datetime_order;
        ?>
                                </td> 
                            </tr>  
                            <tr>
                                <td>
                                    Total :
                                </td>
                                <td style="text-align: right;">
                                    <?php 
        echo Generic::formatRupiah($arrOrder[0]->total_cost);
        ?>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Disc Resto :
                                </td>
                                <td style="text-align: right;">
                                    <?php 
        echo Generic::formatRupiah($arrOrder[0]->disc_resto);
        ?>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Disc Bank :
                                </td>
                                <td style="text-align: right;">
                                    <?php 
        echo Generic::formatRupiah($arrOrder[0]->disc_bank);
        ?>
                                </td>

                            </tr>
                            <tr>
                                <td>
                                    Tax PB1 :
                                </td>
                                <td style="text-align: right;">
                                    <?php 
        echo Generic::formatRupiah($arrOrder[0]->tax_pb1);
        ?>
                                </td>

                            </tr>
                            <tr>
                                <td>
                                    Service Charge :
                                </td>
                                <td style="text-align: right;">
                                    <?php 
        echo Generic::formatRupiah($arrOrder[0]->service_charge);
        ?>
                                </td>

                            </tr>

                            <tr>
                                <td>
                                    Other Charge :
                                </td>
                                <td style="text-align: right;">
                                    <?php 
        echo Generic::formatRupiah($arrOrder[0]->other_charge);
//.........这里部分代码省略.........
开发者ID:CapsuleCorpIndonesia,项目名称:martabak_revolution,代码行数:101,代码来源:Report.php


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