function price_for($rt_shop_product, $config = array()) { $format_was = '<span class="price-before">%s<em>%s</em></span>'; $format_now = '<span class="price-now">%s<em>%s</em></span>'; $config['format_was'] = isset($config['format_was']) ? $config['format_was'] : $format_was; $config['format_now'] = isset($config['format_now']) ? $config['format_now'] : $format_now; $config['format_now_preffix_from'] = isset($config['format_now_preffix_from']) ? $config['format_now_preffix_from'] : __('From') . ' '; $config['format_now_preffix_only'] = isset($config['format_now_preffix_only']) ? $config['format_now_preffix_only'] : ''; $config['format_now_preffix_now_only'] = isset($config['format_now_preffix_now_only']) ? $config['format_now_preffix_now_only'] : __('Now') . ' '; $config['format_now_preffix_now_from_only'] = isset($config['format_now_preffix_now_from_only']) ? $config['format_now_preffix_now_from_only'] : __('Now') . ' '; // This might need to be changes to "Now from"? $config['format_was_preffix'] = isset($config['format_was_preffix']) ? $config['format_was_preffix'] : __('Was') . ' '; $currency = sfConfig::get('app_rt_currency', 'USD'); $price_min = $rt_shop_product->isOnPromotion() ? $rt_shop_product->getMinimumPrice() : $rt_shop_product->getMinRetailPrice(); $price_max = max($rt_shop_product->getMaxRetailPrice(), $rt_shop_product->getMaxPromotionPrice()); if (!$rt_shop_product->isOnPromotion()) { return sprintf($config['format_now'], $price_min != $price_max ? $config['format_now_preffix_from'] : $config['format_now_preffix_only'], format_currency($price_min, $currency)); } $string = ''; $retail_prices_match = $rt_shop_product->getMaxRetailPrice() == $rt_shop_product->getMinRetailPrice(); $promo_prices_match = $rt_shop_product->getMaxPromotionPrice() == $rt_shop_product->getMinPromotionPrice(); if ($retail_prices_match) { $string = sprintf($config['format_was'], $config['format_was_preffix'], format_currency($price_max, $currency)); } $string .= ' ' . sprintf($config['format_now'], $promo_prices_match ? $config['format_now_preffix_now_only'] : $config['format_now_preffix_now_from_only'], format_currency($price_min, $currency)); return $string; }
protected function format_currency($floatcurr, $curr = 'USD') { if (defined('STRICT_TYPES') && CAMEL_CASE == '1') { return (string) self::parameters(['floatcurr' => [DT::INT64, DT::UINT64, DT::FLOAT], 'curr' => DT::STRING])->call(__FUNCTION__)->with($floatcurr, $curr)->returning(DT::STRING); } else { return (string) format_currency($floatcurr, $curr); } }
/** * pZ: modal_product_lookups_json * */ public function modal_product_lookups_json() { $this->load->model('mdl_products'); $products = $this->mdl_products->get()->result(); $data = array(); foreach ($products as $product) { $data[] = array('ProductName' => $product->product_name, 'ProductFormatPrice' => format_currency($product->product_price), 'ProductPrice' => format_amount($product->product_price)); } echo json_encode($data); }
public function get_all_value() { $value = array('gia_bon_dung' => $this->gia_bon_dung, 'gia_ong_dan_dau' => $this->gia_ong_dan_dau, 'gia_tu_bom' => $this->gia_tu_bom, 'gia_ong_khoi' => $this->gia_ong_khoi * $this->gen_number, 'gia_ong_nhung_non_che' => $this->gia_ong_nhung_non_che * $this->gen_number, 'gia_cap_dong_luc' => $this->gia_cap_dong_luc * $this->gen_number, 'gia_cap_te' => $this->gia_cap_te * $this->gen_number, 'gia_cap_dieu_khien' => $this->gia_cap_dieu_khien * $this->gen_number, 'gia_bao_ve_cap' => $this->gia_bao_ve_cap, 'gia_nhien_lieu_chay_nt' => $this->gia_nhien_lieu_chay_nt * $this->gen_number, 'gia_vat_tu_phu' => $this->gia_vat_tu_phu * $this->gen_number, 'gia_kiem_dinh' => $this->gia_kiem_dinh, 'gia_nhan_cong' => $this->gia_nhan_cong * $this->gen_number, 'gia_vc_duong_ngan' => $this->gia_vc_duong_ngan, 'gia_vc_duong_dai' => $this->gia_vc_duong_dai, 'gia_vc_thu_cong' => $this->gia_vc_thu_cong, 'gia_ats' => $this->gia_ats, 'gia_thoat_nhiet' => $this->gia_thoat_nhiet, 'gia_lam_gio' => $this->gia_lam_gio); $total_price = 0; foreach ($value as $price) { $total_price = $total_price + $price; } $parameters = array('kVA' => $this->kVA, 'phase' => $this->phase, 'gen_number' => $this->gen_number, 'total_money' => $total_price, 'total_price' => format_currency($total_price), 'gia_bon_dung_price' => format_currency($this->gia_bon_dung), 'gia_ong_dan_dau_price' => format_currency($this->gia_ong_dan_dau), 'gia_tu_bom_price' => format_currency($this->gia_tu_bom), 'gia_ong_khoi_price' => format_currency($this->gia_ong_khoi), 'gia_ong_nhung_non_che_price' => format_currency($this->gia_ong_nhung_non_che), 'gia_cap_dong_luc_price' => format_currency($this->gia_cap_dong_luc), 'gia_cap_te_price' => format_currency($this->gia_cap_te), 'gia_cap_dieu_khien_price' => format_currency($this->gia_cap_dieu_khien), 'gia_bao_ve_cap_price' => format_currency($this->gia_bao_ve_cap), 'gia_nhien_lieu_chay_nt_price' => format_currency($this->gia_nhien_lieu_chay_nt), 'gia_vat_tu_phu_price' => format_currency($this->gia_vat_tu_phu), 'gia_kd_cl_price' => format_currency($this->gia_kd_cl), 'gia_kd_tt3_price' => format_currency($this->gia_kd_tt3), 'gia_thu_tai_gia_price' => format_currency($this->gia_thu_tai_gia), 'gia_kiem_dinh_price' => format_currency($this->gia_kiem_dinh), 'gia_nhan_cong_price' => format_currency($this->gia_nhan_cong), 'gia_thao_ra_vo' => format_currency($this->gia_thao_ra_vo), 'gia_lap_may_price' => format_currency($this->gia_lap_may), 'gia_lap_dat_ats_price' => format_currency($this->gia_lap_dat_ats), 'gia_lap_tu_hoa_price' => format_currency($this->gia_lap_tu_hoa), 'gia_hd_sd_nt_price' => format_currency($this->gia_hd_sd_nt), 'gia_day_vao_vi_tri_dg_price' => format_currency($this->gia_day_vao_vi_tri_dg), 'gia_day_vao_vi_tri_pt_price' => format_currency($this->gia_day_vao_vi_tri_pt), 'distance' => $this->distance, 'error_distance' => $this->error_distance, 'gia_vc_duong_ngan_price' => format_currency($this->gia_vc_duong_ngan), 'gia_vc_duong_dai_price' => format_currency($this->gia_vc_duong_dai), 'gia_vc_thu_cong_price' => format_currency($this->gia_vc_thu_cong), 'gia_ats' => format_currency($this->gia_ats), 'gia_thoat_nhiet' => format_currency($this->gia_thoat_nhiet), 'gia_lam_gio' => format_currency($this->gia_lam_gio)); //pr(array_merge($parameters, $value));exit; return json_encode(array_merge($parameters, $value)); }
public function testFormatCurrency() { // $this->markTestIncomplete('Test Incomplete.'); // $this->markTestSkipped('Test Skipped'); // $this->fail('Test fail'); $this->assertEquals(format_currency(123.45), '123,45 EURO', 'pos: 1'); $this->assertEquals(format_currency(123), '123,00 EURO', 'pos: 2'); $this->assertEquals(format_currency(5678), '5 678,00 EURO', 'pos: 3'); $this->assertEquals(format_currency(-123.1), '-123,10 EURO', 'pos: 4'); $this->assertEquals(format_currency(-5678.1), '-5 678,10 EURO', 'pos: 5'); }
function parse_template($object, $body) { if (preg_match_all('/{{{([^{|}]*)}}}/', $body, $template_vars)) { foreach ($template_vars[1] as $var) { switch ($var) { case 'invoice_guest_url': $replace = site_url('guest/view/invoice/' . $object->invoice_url_key); break; case 'invoice_date_due': $replace = date_from_mysql($object->invoice_date_due, TRUE); break; case 'invoice_date_created': $replace = date_from_mysql($object->invoice_date_created, TRUE); break; case 'invoice_total': $replace = format_currency($object->invoice_total); break; case 'invoice_paid': $replace = format_currency($object->invoice_paid); break; case 'invoice_balance': $replace = format_currency($object->invoice_balance); break; case 'quote_total': $replace = format_currency($object->quote_total); break; case 'quote_date_created': $replace = date_from_mysql($object->quote_date_created, TRUE); break; case 'quote_date_expires': $replace = date_from_mysql($object->quote_date_expires, TRUE); break; case 'quote_guest_url': $replace = site_url('guest/view/quote/' . $object->quote_url_key); break; default: $replace = $object->{$var}; } $body = str_replace('{{{' . $var . '}}}', $replace, $body); } } return $body; }
public function setup() { parent::setup(); // Helpers sfContext::getInstance()->getConfiguration()->loadHelpers(array('Number')); // Form format $this->getWidgetSchema()->setFormFormatterName(sfConfig::get('app_rt_public_form_formatter_name', 'RtList')); // Voucher amount selection $options = sfConfig::get('app_rt_shop_gift_voucher_amount', array(10, 20, 25, 30, 40, 50, 75, 100, 150, 200, 300)); // Add currency definition to amount $amounts = array(); $amounts[''] = '--'; foreach ($options as $key => $item) { $amounts[$item] = format_currency($item, sfConfig::get('app_rt_currency', 'USD')); } // Widgets $this->widgetSchema['reduction_value'] = new sfWidgetFormSelect(array('choices' => $amounts)); $this->widgetSchema['first_name'] = new sfWidgetFormInput(array(), array()); $this->widgetSchema['last_name'] = new sfWidgetFormInput(array(), array()); $this->widgetSchema['email_address'] = new sfWidgetFormInput(array(), array()); $this->widgetSchema['message'] = new sfWidgetFormTextarea(array(), array()); // Validators $this->setValidator('reduction_value', new sfValidatorChoice(array('choices' => array_keys($amounts), 'required' => true), array('required' => 'Please make a selection'))); $this->setValidator('first_name', new sfValidatorString(array('required' => true), array('required' => 'Please provide a first name'))); $this->setValidator('last_name', new sfValidatorString(array('required' => true), array('required' => 'Please provide a last name'))); $this->setValidator('email_address', new sfValidatorEmail(array('required' => true), array('required' => 'Please provide a valid email address'))); $this->setValidator('message', new sfValidatorString(array('required' => false, 'max_length' => 255), array('max_length' => 'Message is too long (%max_length% characters max.)'))); // Add labels $this->widgetSchema->setLabel('reduction_value', "Gift Voucher Amount"); $this->widgetSchema->setLabel('first_name', "Recipient First Name"); $this->widgetSchema->setLabel('last_name', "Recipient Last Name"); $this->widgetSchema->setLabel('email_address', "Recipient Email"); // Help texts $this->widgetSchema->setHelp('first_name', 'Required'); $this->widgetSchema->setHelp('last_name', 'Required'); $this->widgetSchema->setHelp('email_address', 'Required - The voucher will be sent here'); $this->widgetSchema->setNameFormat('rt_shop_voucher[%s]'); $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema); }
function send_notification($gc_data) { $this->load->helper('formatting_helper'); $row = $this->db->where('id', '1')->get('canned_messages')->row_array(); // set replacement values for subject & body $row['subject'] = str_replace('{from}', $gc_data['from'], $row['subject']); $row['subject'] = str_replace('{site_name}', $this->config->item('company_name'), $row['subject']); $row['content'] = str_replace('{code}', $gc_data['code'], $row['content']); $row['content'] = str_replace('{amount}', format_currency($gc_data['beginning_amount']), $row['content']); $row['content'] = str_replace('{from}', $gc_data['from'], $row['content']); $row['content'] = str_replace('{personal_message}', nl2br($gc_data['personal_message']), $row['content']); $row['content'] = str_replace('{url}', $this->config->item('base_url'), $row['content']); $row['content'] = str_replace('{site_name}', $this->config->item('company_name'), $row['content']); $this->load->library('email'); $config['mailtype'] = 'html'; $this->email->initialize($config); $this->email->from($this->config->item('email')); $this->email->to($gc_data['to_email']); $this->email->subject($row['subject']); $this->email->message($row['content']); $this->email->send(); }
<tbody> <?php foreach ($payments as $payment) { ?> <tr> <td><?php echo date_from_mysql($payment->payment_date); ?> </td> <td><?php echo $payment->invoice_number; ?> </td> <td><?php echo format_currency($payment->payment_amount); ?> </td> <td><?php echo $payment->payment_method_name; ?> </td> <td><?php echo $payment->payment_note; ?> </td> <td> <div class="options btn-group"> <a class="btn btn-small dropdown-toggle" data-toggle="dropdown" href="#"><i class="icon-cog"></i> <?php echo lang('options'); ?>
<div><h1><?php //echo $product->name; ?> G50-<?php echo round($generator['generator_kVA']) . $generator['engine']->code . $generator['alternator']->code; ?> AB</h1></div> <div> Standby Power: <?php echo round($generator['generator_kVA']); ?> kVA </div> <div> Price: <?php echo format_currency($generator['price']); ?> </div> <div> Days: <?php echo $generator['days']; ?> </div> <!-- <div> Engine Power: <?php echo $generator['engine']->standby; ?> kWm, <?php echo round($generator['engine']->standby / 0.8); ?>
<span class="prod-price"><b><?php echo format_currency($b->saleprice); echo empty($b->unit) ? '' : '/' . $b->unit; ?> </b></span> <a href="<?php echo site_url(implode('/', $base_url) . '/' . $b->slug); ?> " class="btn btn-nxled btn-sm pull-right" style="margin-top:7px;text-transform:uppercase;"> Add To Cart </a> </div> <?php } else { ?> <div class="prod-priceCont clearfix" style="text-align:right;"> <span class="prod-price"><b><?php echo format_currency($b->price); echo empty($b->unit) ? '' : '/' . $b->unit; ?> </b></span> <a href="<?php echo site_url(implode('/', $base_url) . '/' . $b->slug); ?> " class="btn btn-nxled btn-sm pull-right" style="margin-top:7px;text-transform:uppercase;"> Add To Cart </a> </div> <?php } ?> </div><!-- prod-desc --> </div>
echo __('isLate'); ?> </label> <br/> <?php echo " " . ($cir_hist->isLate($now) ? __('Yes') . " (" . $cir_hist->getLateDays($now) . " " . __('days') . ")" : __('No')); ?> </td> <td > <label><?php echo __('Fine'); ?> </label> <br/> <?php echo " Rp. " . format_currency($cir_hist->getFineAmount($now)); echo input_hidden_tag('fine', $cir_hist->getFineAmount($now)); ?> </td> </tr> <tr> <td > <label><?php echo __('ColCondition'); ?> </label> <br/> <?php echo object_select_tag($item, 'getColConditionId', array('related_class' => 'ColCondition', 'control_name' => 'col_condition_id')); ?> </td>
echo format_currency($quote_tax_rate->quote_tax_rate_amount); ?> </td> </tr> <?php } ?> <tr class="amount-total border-top-n"> <td class="text-right color-d"> <b><?php echo lang('total'); ?> :</b> </td> <td class="text-right color-d"> <b><?php echo format_currency($quote->quote_total); ?> </b> </td> </tr> </table> </td> </tr> </table> </div> </body> </html>
echo lang('total'); ?> </td> <td class="amount"><b><?php echo format_currency($invoice->invoice_total); ?> </b></td> </tr> <tr> <td><?php echo lang('paid'); ?> </td> <td class="amount"><b><?php echo format_currency($invoice->invoice_paid); ?> </b></td> </tr> <tr> <td><b><?php echo lang('balance'); ?> </b></td> <td class="amount"><b><?php echo format_currency($invoice->invoice_balance); ?> </b></td> </tr> </table> </div> </div>
"> <p class="marginTop15"> <?php echo $gen['result']['alternator_manufacturer']; ?> <br> <?php echo $gen['result']['alt']->name; ?> </p> </div> <div class="resultado5 <?php echo $line2; ?> "><p class="marginTop20"><?php echo format_currency($gen['result']['generators']['price']); ?> </p></div> <div class="resultado6 <?php echo $line2; ?> "> <p class="marginTop20"><?php echo $gen['result']['generators']['days']; ?> </p> </div> <div class="resultado7 <?php echo $line2; ?> ">
private function _get_shipping_methods() { $shipping_methods = array(); /* do we need shipping? */ if (config_item('require_shipping')) { /* do the cart contents require shipping? */ if ($this->jcart->requires_shipping()) { /* ok so lets grab some shipping methods. If none exists, then we know that shipping isn't going to happen! */ foreach ($this->Settings_model->get_settings('shipping_modules') as $shipping_method => $order) { $this->load->add_package_path(APPPATH . 'packages/shipping/' . $shipping_method . '/'); /* eventually, we will sort by order, but I'm not concerned with that at the moment */ $this->load->library($shipping_method); $shipping_methods = array_merge($shipping_methods, $this->{$shipping_method}->rates()); } /* Free shipping coupon applied ? */ if ($this->jcart->is_free_shipping()) { /* add free shipping as an option, but leave other options in case they want to upgrade */ $shipping_methods[lang('free_shipping_basic')] = "0.00"; } /* format the values for currency display */ foreach ($shipping_methods as &$method) { /* convert numeric values into an array containing numeric & formatted values */ $method = array('num' => $method, 'str' => format_currency($method)); } } } if (!empty($shipping_methods)) { /* everything says that shipping is required! */ return $shipping_methods; } else { return false; } }
?> </span> <?php } else { ?> <span class="price_reg"> <?php echo format_currency($product->price); ?> </span> <?php } } else { ?> <span class="price_reg"> <?php echo format_currency($product->price); ?> </span> <?php } ?> </div> <?php if ((bool) $product->track_stock && $product->quantity < 1) { ?> <div class="stock_msg"><?php echo lang('out_of_stock'); ?> </div> <?php }
?> ","<?php echo $cir_history->getMember() ? $cir_history->getMember()->getName() ? $cir_history->getMember()->getName() : '-' : '-'; ?> ","<?php echo $cir_history->getColItem() ? $cir_history->getColItem()->toString() : '-'; ?> ","<?php echo $cir_history->getColItem() ? $cir_history->getColItem()->getCatalog() ? $cir_history->getColItem()->getCatalog()->getTitle() : '-' : '-'; ?> ","<?php echo $cir_history->getOrderDate() ? DateToIndo($cir_history->getOrderDate('Y/m/d')) : '-'; ?> ","<?php echo $cir_history->getDueDate() ? DateToIndo($cir_history->getDueDate('Y/m/d')) : '-'; ?> ","<?php echo $cir_history->getReturnDate('U') > 0 ? DateToIndo($cir_history->getReturnDate('Y/m/d')) : '-'; ?> ","<?php echo $cir_history->getOrderLength($now); ?> ","<?php echo format_currency($cir_history->getFine()); ?> ","<?php echo format_currency($cir_history->getMiscFine()); ?> " <?php }
<?php }; ?> </span> </td> <td> <span class="<?php if ($invoice->is_overdue) { ?>font-overdue<?php } ?>"> <?php echo date_from_mysql($invoice->invoice_date_due); ?> </span> </td> <td> <?php echo anchor('invoices/view/' . $invoice->invoice_id, $invoice->invoice_number); ?> </td> <td> <?php echo anchor('clients/view/' . $invoice->client_id, $invoice->client_name); ?> </td> <td class="amount"> <?php echo format_currency($invoice->invoice_balance * $invoice->invoice_sign); ?> </td> <td style="text-align: center;"> <a href="<?php echo site_url('invoices/generate_pdf/' . $invoice->invoice_id); ?>" title="<?php echo lang('download_pdf'); ?>" target="_blank"> <i class="fa fa-print"></i> </a> </td> </tr> <?php } ?> <tr> <td colspan="6" class="text-right small"> <?php echo anchor('invoices/status/all', lang('view_all')); ?> </td> </tr> </tbody>
function process_payment_return() { global $label; if ($_REQUEST['order_id'] != '' && $_REQUEST['nhezk5'] != '') { //print_r($_SESSION); if ($_SESSION['MDS_ID'] == '') { echo "Error: You must be logged in to view this page"; } else { //require ("../users/header.php"); ?> <div style='background-color: #ffffff; border-color:#C0C0C0; border-style:solid;padding:10px'> <p align="center"><center> <?php $sql = "SELECT * from orders where order_id='" . $_REQUEST['order_id'] . "' and user_id='" . $_SESSION['MDS_ID'] . "'"; $result = mysql_query($sql) or die(mysql_error() . $sql); $order_row = mysql_fetch_array($result); $check_amount = convert_to_currency($order_row['price'], $order_row['currency'], CHECK_CURRENCY); $check_amount = format_currency($check_amount, CHECK_CURRENCY, true); $label['payment_check_heading'] = str_replace("%INVOICE_AMOUNT%", $check_amount, $label['payment_check_heading']); //$label['payment_check_note'] = str_replace ("%CONTACT_EMAIL%", SITE_CONTACT_EMAIL, $label['payment_check_note']); //$label['payment_check_note'] = str_replace ("%INVOICE_CODE%", $_REQUEST['order_id'], $label['payment_check_note']); if (get_default_currency() != CHECK_CURRENCY) { echo convert_to_default_currency_formatted($order_row[currency], $order_row['price']) . " = " . $check_amount; echo "<br>"; } ?> <table width="70%"><tr><td> <b><?php echo $label['payment_check_heading']; ?> </b><br> <?php if (CHECK_NAME != '') { ?> <b><?php echo $label['payment_check_payable']; ?> </b><pre><?php echo CHECK_PAYABLE; ?> </pre><br> <?php } ?> <?php if (CHECK_ADDRESS != '') { ?> <b><?php echo $label['payment_check_address']; ?> </b><pre><?php echo CHECK_ADDRESS; ?> </pre><br> <?php } ?> <?php /*if ( CHECK_ACCOUNT_NAME != '') { ?> <b><?php echo $label['payment_check_currency'];?></b><pre><?php echo CHECK_CURRENCY; ?></pre><br> <?php } */ ?> </td></tr> </table> </p> </center> </div> <?php } } }
<div> <tr><td class="table-6-td-hd"></td> <td class="table-6-td-hd"></td> <td class="table-6-td-l">Sub Total</td> <td class="table-6-td-r" style="border-bottom: 1px solid #bfbfbf;"><?= format_currency($quote->quote_item_subtotal); ?></td> </tr> <tr> <td class="table-6-td-hd"></td> <td class="table-6-td-hd"></td> <td class="table-6-td-l">VAT</td> <td class="table-6-td-r"><?= format_currency($quote->quote_item_tax_total); ?></td> </tr> <tr><td class="table-6-td-hd"></td> <td class="table-6-td-hd"></td> <td class="table-6-td-l">Total</td> <td class="table-6-td-r"><?= format_currency($quote->quote_total); ?></td> </tr> </div> </table> <div style=""> <p style="font-size: 12px;">To proceed with this order please email me at <?= ($quote->user_email) ?> with an official purchase order reference quoting <?= $quote->quote_number;?> and we will get it scheduled in from this end. Once sheduled we will contact you to confirm the installation or delivery date. If you have any questions or issues, please email me or call me on <?= ($quote->user_mobile) ?>.</p> <p style="font-size: 12px;">Please be aware that if the order is placed after <?php echo date("d/m/Y", strtotime($quote->quote_date_expires)); ?> then the prices may haved changed so we may have to re-quote before accepting the order. </p> </div> </div> </div> </body> </html>
echo format_currency($relate->saleprice); ?> </b></span> </div> <div class="col-md-6"> <span class="price"><b><?php echo format_currency($product->price); ?> </b></span> </div> <?php } else { ?> <div class="col-md-12" style="padding: 0; text-align: right"> <span class="price"><b><?php echo format_currency($relate->price); ?> </b></span> </div> <?php } ?> </div> </div> </div> <!-- item --> <?php } ?> </div>
</div> </div> <div class="discount-field"> <div class="input-group input-group-sm"> <input id="quote_discount_percent" name="quote_discount_percent" value="<?php echo($quote->quote_discount_percent != 0 ? $quote->quote_discount_percent : ''); ?>" class="discount-option form-control input-sm amount"> <div class="input-group-addon">%</div> </div> </div> </td> </tr> <tr> <td><b><?php #echo lang('total'); ?>GROSS</b></td> <td class="amount"><b><?php echo format_currency($quote->quote_total); ?></b></td> </tr> <tr> <td >Total Cost Price</td> <td id="quote_total_cost" class="amount"></td> </tr> <tr> <td>Nett Profit</td> <td id="quote_nett_profit" class="amount"></td> </tr> <tr> <td>Profit %</td> <td id="quote_total_profit" class="amount"></td> </tr> </table> </div>
form-error<?php } ?> "> <?php if ($sf_request->hasError('formulario{cuota}')) { ?> <?php echo form_error('formulario{cuota}', array('class' => 'form-error-msg')); ?> <?php } ?> <?php $opciones = array('1' => __('menos de %1%', array('%1%' => format_currency(300, 'EUR'))), '2' => __('de %1% a %2%', array('%1%' => format_currency(300, 'EUR'), '%2%' => format_currency(600, 'EUR'))), '3' => __('de %1% a %2%', array('%1%' => format_currency(600, 'EUR'), '%2%' => format_currency(900, 'EUR'))), '4' => __('de %1% a %2%', array('%1%' => format_currency(900, 'EUR'), '%2%' => format_currency(1200, 'EUR'))), '5' => __('más de %1%', array('%1%' => format_currency(1200, 'EUR')))); $valorSeleccionado = $formulario->getCuota() ? $formulario->getCuota() : '0'; $html = ""; $html .= "<ul class=\"sf_admin_checklist\">\n"; for ($i = 1; $i <= count($opciones); $i++) { $html .= "<li>"; $html .= radiobutton_tag('formulario[cuota]', $i, $valorSeleccionado == $i, 'id=formulario_cuota_' . $i); $html .= "<label for=formulario_cuota_" . $i . ">"; $html .= $opciones[$i]; $html .= "</label>"; $html .= "</li>\n"; } $html .= "</ul>\n"; echo $html; ?> </div>
} ?> ><?php echo trans('yes'); ?> </option> </select> <p class="help-block"> <?php echo trans('example'); ?> : <span style="font-family: Monaco, Lucida Console, monospace"> <?php echo format_currency(123456.78); ?> </span> </p> </div> <div class="form-group"> <label class="control-label"> <?php echo trans('login_logo'); ?> </label> <?php if ($this->mdl_settings->setting('login_logo')) { ?> <img src="<?php
<td align="right" colspan="3"> <p>Shipping</p> </td> <td align="center"> <p class="times13"><?php echo "<span class='shipping'>" . format_currency($this->go_cart->shipping_cost()) . "</span>"; ?> </p> </td> </tr> <?php } ?> <tr> <td align="right" colspan="3"> <p>Grand Total</p> </td> <td align="center"> <p class="times13 bold"><?php echo "<span class='grandtotal'>" . format_currency($this->go_cart->total()) . "</span>"; ?> </p> </td> </tr> </table> </div> <br class="break"/> <?php }
<?php $includes_message = ''; if (sfConfig::get('app_rt_shop_tax_rate', 0) > 0 && sfConfig::get('app_rt_shop_tax_mode') == 'inclusive') { $includes_message = sprintf('(includes %s tax)', format_currency(rtShopCartManager::calcTaxComponent($rt_shop_order->getTotalCharge()), sfConfig::get('app_rt_currency', 'USD'))); } ?> <tr> <td colspan="4"><?php echo __('Total'); ?> <?php echo $includes_message; ?> :</td> <td><?php echo format_currency($rt_shop_order->getTotalCharge(), sfConfig::get('app_rt_currency', 'USD')); ?> </td> </tr> </tfoot> <?php } else { ?> <tbody> <tr> <td colspan="5"><?php echo __('No products added to cart'); ?> </td> </tr> </tbody>
$t->comment('*****************************************************************************'); // ItemsCharge $t->is($cm->getItemsCharge(), 140, 'ItemsCharge: ' . format_currency($cm->getItemsCharge(), sfConfig::get('app_rt_currency', 'USD'))); // SubTotal $t->is($cm->getSubTotal(), 140, 'SubTotal: ' . format_currency($cm->getSubTotal(), sfConfig::get('app_rt_currency', 'USD'))); $t->comment('-----------------------------------------------------------------------------'); // Tax $t->is($cm->getTaxCharge(), 14.0, 'Tax: ' . format_currency($cm->getTaxCharge(), sfConfig::get('app_rt_currency', 'USD'))); // Shipping $t->is($cm->getShippingCharge(), 10, 'Shipping: ' . format_currency($cm->getShippingCharge(), sfConfig::get('app_rt_currency', 'USD'))); $t->comment('-----------------------------------------------------------------------------'); // Pre total $t->is($cm->getPreTotalCharge(), 164.0, 'PreTotal: ' . format_currency($cm->getPreTotalCharge(), sfConfig::get('app_rt_currency', 'USD'))); $t->comment('============================================================================='); // Total $t->is($cm->getTotalCharge(), 164.0, 'Total: ' . format_currency($cm->getTotalCharge(), sfConfig::get('app_rt_currency', 'USD'))); $t->comment('============================================================================='); $t->comment(''); $t->diag('***************************************'); $t->diag('*** Voucher check'); $t->diag('***************************************'); $t->comment(''); $t->comment('--- BasertShopOrderActions::executeCheckVoucher() // dollarOff ----------------------------------------'); $t->diag('*** Case #1.0: Voucher #1: Non-applicable voucher'); $check_voucher_array1 = $cm->getCheckVoucherArray($voucher1->getCode()); $t->is($check_voucher_array1['error'], true, '->checkVoucher() has no applicable rtShopVoucher.'); $t->diag('*** Case #1.1: Voucher #2: Applicable voucher'); $check_voucher_array2 = $cm->getCheckVoucherArray($voucher2->getCode()); $t->is($check_voucher_array2['error'], false, '->checkVoucher() has applicable rtShopVoucher where code #' . $voucher2->getCode()); $t->comment('--- BasertShopOrderActions::executeCheckVoucher() // percentageOff ------------------------------------'); $t->diag('*** Case #1.2: Voucher #3: Non-applicable voucher');
} } // end unique item checks } // end stock entry exists if (sizeof($ERRORS) > 0) { draw_errors($ERRORS); } else { // Take away their money. $total = $stock->getPrice() * $quantity; $User->subtractCurrency($total); // Try and find a stack of this item in the user's inventory. $item = Item::stackFactory($User->getUserId(), $stock->getItemTypeId(), $db); $item->updateQuantity($item->getQuantity() + $quantity); // Remove the stock from the shope. $item_name = $stock->getItemName(); // store this for later. $stock->sell($quantity); // Stock could #destroy() itself during the #sell(), so don't // use it anymore. unset($stock); $_SESSION['shop_notice'] = "You have purchased " . number_format($quantity) . " <strong>{$item_name}</strong> for " . format_currency($total) . "!"; redirect("shop/{$shop->getShopId()}"); } // end do purchase break; // end purchase } // end switch } // end shop exists
echo $giftCard->excerpt; ?> </small> </td> <td colspan="2"> <?php echo format_currency($giftCard->total_price); ?> </td> </tr> <?php } ?> <tr> <td colspan="2"> <div style="font-size:17px;"><?php echo lang('total'); ?> </div> </td> <td colspan="2"> <div style="font-size:17px;"><?php echo format_currency($order->total); ?> </div> </td> </tr> </tbody> </table>