|
|
|
@ -86,11 +86,13 @@ $(function () {
|
|
|
|
|
$('#audVal').html(dataCache.price);
|
|
|
|
|
var realPrice = dataCache.price;
|
|
|
|
|
$('#audValReal').html(realPrice);
|
|
|
|
|
var poundage = updatePoundage(realPrice);
|
|
|
|
|
var surchargeData = calculateSurcharge(realPrice);
|
|
|
|
|
|
|
|
|
|
var price = poundage || realPrice;
|
|
|
|
|
var price = surchargeData.newPrice || realPrice;
|
|
|
|
|
var priceBeforeDiscount = price;
|
|
|
|
|
dataCache.discounts = [];
|
|
|
|
|
dataCache.tax = surchargeData.tax;
|
|
|
|
|
dataCache.surcharge = surchargeData.surcharge;
|
|
|
|
|
$(window.coupons).each(function () {
|
|
|
|
|
price = this.handleDiscount(price, dataCache.price, dataCache.discounts, dataCache.coupons);
|
|
|
|
|
});
|
|
|
|
@ -192,8 +194,11 @@ $(function () {
|
|
|
|
|
var bd = $('.weui_dialog_bd', dialog);
|
|
|
|
|
var currencySymbol = window.currency == 'CNY' ? '¥' : '$';
|
|
|
|
|
$('<p></p>').html('Input Price 输入金额:' + currencySymbol + dataCache.price).appendTo(bd);
|
|
|
|
|
if (dataCache.poundageValue > 0) {
|
|
|
|
|
$('<p></p>').html('Surcharge 手续费(' + window.rateValue + '%):+' + currencySymbol + dataCache.poundageValue).appendTo(bd);
|
|
|
|
|
if (parseFloat(dataCache.surcharge) > 0) {
|
|
|
|
|
$('<p></p>').html('Surcharge 手续费(' + window.rateValue + '%):+' + currencySymbol + dataCache.surcharge).appendTo(bd);
|
|
|
|
|
}
|
|
|
|
|
if (parseFloat(dataCache.tax) > 0) {
|
|
|
|
|
$('<p></p>').html('GST(10%):'+currencySymbol+dataCache.tax).appendTo(bd);
|
|
|
|
|
}
|
|
|
|
|
$(dataCache.discounts).each(function () {
|
|
|
|
|
$('<p></p>').html(this.title + ':-' + currencySymbol + this.amount).appendTo(bd);
|
|
|
|
@ -305,6 +310,7 @@ $(function () {
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
checkOrderStd();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|