本文整理汇总了PHP中Currency::getSingPrice方法的典型用法代码示例。如果您正苦于以下问题:PHP Currency::getSingPrice方法的具体用法?PHP Currency::getSingPrice怎么用?PHP Currency::getSingPrice使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Currency
的用法示例。
在下文中一共展示了Currency::getSingPrice方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getshipping_name_amount
public function getshipping_name_amount()
{
$shippingLink = AF::link(array('shipping' => 'update'), array('id' => $this->shipping_id));
return '[<a href="' . $shippingLink . '">' . $this->shipping_id . '</a>] <a href="' . $shippingLink . '">' . $this->shipping_name . "</a> (" . Currency::getSingPrice($this->amount_shipping, $this->currency_id) . ")";
}
示例2: getvoidrefund_revenue_formatted
public function getvoidrefund_revenue_formatted()
{
return Currency::getSingPrice($this->voidrefund_revenue, $this->currency_id);
}
示例3: getsum_amount_formatted
public function getsum_amount_formatted()
{
return Currency::getSingPrice($this->sum_amount, $this->currency_id);
}
示例4: __
echo __('total');
?>
</b></td><td><?php
echo $total['prospect_count'];
?>
</td><td><?php
echo $total['initial_customers'];
?>
</td><td><?php
echo $total['conversion_rate'];
?>
%</td><td><?php
echo Currency::getSingPrice($total['gross_revenue'], $total['currency_id']);
?>
</td><td><?php
echo Currency::getSingPrice($total['average_revenue'], $total['currency_id']);
?>
</td></tr>';
$("#widget_Reports_table tbody").append(total);
</script>
<?}?>
<?php
$this->widget($pagination, array());
?>
</div>
<script>
$(document).ready(function(){
$(".af_select_ajax").chosen({
示例5: isset
?>
</td>';
<?}else{?>
total += '<td><?php
echo isset($total["c{$i}_" . $field]) ? number_format($total["c{$i}_" . $field]) : '—';
?>
</td>';
<?}?>
<?}?>
<?}else{?>
<?foreach($extraFields as $field){?>
<?if(in_array($field, array('refund_revenue', 'net_revenue', 'potential_revenue', 'chargeback_loss'))){?>
total += '<td><?php
echo isset($total["c{$i}_" . $field]) ? Currency::getSingPrice(number_format($total["c{$i}_" . $field], 2), $item->gateway_currency) : '—';
?>
</td>';
<?}elseif(in_array($field, array('approval_rate', 'decline_rate', 'chargeback_rate', 'void_rate', 'cancel_rate', 'retention_rate'))){?>
total += '<td><?php
echo isset($total["c{$i}_" . $field]) ? number_format($total["c{$i}_" . $field] * 100, 2) . '%' : '—';
?>
</td>';
<?}else{?>
total += '<td><?php
echo isset($total["c{$i}_" . $field]) ? number_format($total["c{$i}_" . $field]) : '—';
?>
</td>';
<?}?>
<?}?>
示例6: chargebackAction
public function chargebackAction()
{
$clearArray = array();
$this->filter($clearArray);
if (!isset($this->params['cr_dates'])) {
$today = date("d.m.Y");
$this->params['cr_dates'] = $today . '-' . $today;
}
if (!isset($this->params['action_id'])) {
$this->params['action_id'] = '29,30';
}
$pagination = new Pagination(array('action' => $this->action, 'controller' => $this->controller, 'params' => $this->params, 'ajax' => true));
$models = AFActiveDataProvider::models('OrderLog', $this->params, $pagination);
$dataProvider = $models->getChargebackReport();
$total = $models->getChargebackTotalReport();
//$totalAmount = (isset($total[0]['sum_amount']))?$total[0]['sum_amount']:0;
$filterFields = $models->getoutFilterFields($clearArray, array('cr_dates'));
$fields = array('gateway', 'campaign', 'action_chargeback_formatted', 'sum_amount_formatted');
$currency = $models->getCurrency();
$rTotal = count($currency) == 1 ? Currency::getSingPrice($total[0]['sum_amount'], $currency[0]['currency_id']) : false;
$gateways = $models->getDSearchGateways();
$campaigns = $models->getDSearchCampaigns();
// set ajax table
if (AF::isAjaxRequestModels()) {
$this->view->includeFile('_chargeback_table', array('application', 'views', 'reports'), array('access' => $this->access, 'controller' => $this->controller, 'dataProvider' => $dataProvider, 'pagination' => $pagination, 'filterFields' => $filterFields, 'total' => $rTotal, 'fields' => $fields, 'gateways' => $gateways, 'campaigns' => $campaigns));
die;
}
Assets::css('jquery-ui');
Assets::js('//code.jquery.com/ui/1.10.3/jquery-ui.js');
Assets::js('dateRange/jquery.daterange');
Assets::js('ajax_table');
$this->render('chargeback', array('dataProvider' => $dataProvider, 'pagination' => $pagination, 'filterFields' => $filterFields, 'fields' => $fields, 'gateways' => $gateways, 'campaigns' => $campaigns, 'total' => $rTotal));
}
示例7: echo
echo $extraParamsArray[3];
?>
] <?php
echo $sids[$extraParamsArray[2]]['aff_name'];
?>
<?}else{?>—<?}?>
<?}?>
</td>
<?$countLine=0;foreach ($data as $key => $value){
$f=explode('_', $key, 2)?>
<td <?if(!in_array($f[1], $simpleReportFields)){?>class="rn_simple" <?}?> <?if($f[1]=='retention_rate' || ($f[1]=='net_revenue' && $f[0]=='c0') ){?>style="background-color: #eeeeee; border-right: 4px solid black"<?}?>>
<?
if (substr($key, -4) == 'rate')
echo (number_format($value * 100, 2)) . '%';
elseif (substr($key, -6) == 'amount' || substr($key, -4) == 'loss' || substr($key, -7) == 'revenue')
echo Currency::getSingPrice(number_format($value, 2), $reportCur[$extraParams]);
else
echo $value;
?>
</td>
<?$countLine++;}?>
<?
if( ($countTh-$countLine) > 0 ){
$allLine=count($extraFields[1])*($countR-1);
$shotLine=$countLine-count($extraFields[0]);
$countExtra=round($shotLine/count($extraFields[1]));
$ci=($countR-1)-$countExtra;
for($ii=0;$ii<$ci;$ii++)
{
示例8: getaverage_revenue_formatted
public function getaverage_revenue_formatted()
{
return Currency::getSingPrice($this->average_revenue, $this->currency_id);
}
示例9: printAction
function printAction()
{
$id = AF::get($this->params, 'id', FALSE);
if (!$id) {
throw new AFHttpException(0, 'no_id');
}
$orderArray = Order::getPrintFields($id);
if (!$orderArray) {
throw new AFHttpException(0, 'incorrect_id');
}
$orderModel = new Order();
$orderModel->order_id = $id;
$lables = $orderModel->attributeLabels();
$orderInfo = array('full_order_id' => $orderArray['order_id'], 'created' => $orderArray['created'], 'status' => $orderArray['status'], 'campaign_name' => $orderArray['campaign_id'], 'amount_product' => Currency::getSingPrice($orderArray['amount_product'], $orderArray['currency_id']), 'amount_shipping' => Currency::getSingPrice($orderArray['amount_shipping'], $orderArray['currency_id']));
if ($orderArray['amount_refunded']) {
$orderInfo['amount_refunded'] = Currency::getSingPrice($orderArray['amount_refunded'], $orderArray['currency_id']);
}
$modelAttempt = new Attempt();
$modelAttempt->getLastOrderAttempt($id, Attempt::DEBIT_TYPE);
$orderInfo2 = array('payment_total' => Currency::getSingPrice($orderArray['payment_total'], $orderArray['currency_id']), 'AFID' => $orderArray['aff_id'], 'SID' => $orderArray['sid'], 'c1' => $orderArray['c1'], 'c2' => $orderArray['c2'], 'c3' => $orderArray['c3'], 'billing_cycle' => $orderArray['billing_cycle'], 'tracking_number' => $modelAttempt->tracking_number ? $modelAttempt->tracking_number : __('no'));
$orderInfo2['rma_code'] = $orderArray['rma_code'] ? $orderArray['rma_code'] : __('no');
$orderInfo2['gateway_name'] = $orderArray['gateway_name'];
$orderInfo = array_merge($orderInfo, $orderInfo2);
$customerInfo = array('order_customer_name' => $orderArray['fname'] . ' ' . $orderArray['lname'], 'email' => $orderArray['email'], 'ip' => long2ip($orderArray['ip']), 'phone' => $orderArray['phone'], 'order_address1' => $orderArray['address1'], 'order_address2' => $orderArray['address2'], 'order_city' => $orderArray['city'], 'order_state' => $orderArray['state_name'], 'order_country' => $orderArray['country_name'], 'order_zip' => $orderArray['zip'], 'order_billing_fname' => $orderArray['billing_country_id'] ? $orderArray['billing_fname'] : $orderArray['fname'], 'order_billing_lname' => $orderArray['billing_country_id'] ? $orderArray['billing_lname'] : $orderArray['lname'], 'order_billing_address1' => $orderArray['billing_country_id'] ? $orderArray['billing_address1'] : $orderArray['address1'], 'order_billing_address2' => $orderArray['billing_country_id'] ? $orderArray['billing_address2'] : $orderArray['address2'], 'order_billing_city' => $orderArray['billing_country_id'] ? $orderArray['billing_city'] : $orderArray['city'], 'order_billing_state' => $orderArray['billing_country_id'] ? $orderArray['billing_state_name'] : $orderArray['state_name'], 'order_billing_country' => $orderArray['billing_country_id'] ? $orderArray['billing_country_name'] : $orderArray['country_name'], 'order_billing_zip' => $orderArray['billing_country_id'] ? $orderArray['billing_zip'] : $orderArray['zip']);
$paymentModel = new Payment();
$paymentModel->fillFromArray($orderArray);
$paymentInfo = array('payment_type' => $orderArray['payment_type']);
if ($orderArray['payment_type'] == 'pn') {
$addPaymentInfo = array('order_payment_status' => $modelAttempt->status, 'order_cc_number' => $paymentModel->cc_number_formatted, 'order_expiry_date' => $paymentModel->exp_date_formatted, 'order_transaction_id' => $modelAttempt->tracking_number ? $modelAttempt->tracking_number : __('no'));
$paymentInfo = array_merge($paymentInfo, $addPaymentInfo);
}
$orderProducts = $orderModel->getOrderProducts();
$this->layout = array('layouts', 'main_print');
$this->render('print', array('order' => $orderArray, 'lables' => $lables, 'orderInfo' => $orderInfo, 'customerInfo' => $customerInfo, 'paymentInfo' => $paymentInfo, 'orderProducts' => $orderProducts));
}