gst support

master
yixian 7 years ago
parent b169e046b4
commit c71e629188

@ -93,11 +93,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);
});
@ -199,8 +201,11 @@ $(function () {
var bd = $('.weui_dialog_bd', dialog);
var currencySymbol = window.currency == 'AUD' ? '$' : '¥';
$('<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);

@ -82,9 +82,11 @@ $(function () {
$('#audVal').html(dataCache.price);
var realPrice = dataCache.price;
$('#audValReal').html(realPrice);
var poundage = updatePoundage(realPrice);
var surchargeData = calculateSurcharge(realPrice);
var price = poundage || realPrice;
dataCache.tax = surchargeData.tax;
dataCache.surcharge = surchargeData.surcharge;
var price = surchargeData.newPrice || realPrice;
var priceBeforeDiscount = price;
dataCache.discounts = [];
$(window.coupons).each(function () {
@ -188,8 +190,11 @@ $(function () {
var bd = $('.weui_dialog_bd', dialog);
var currencySymbol = window.currency == 'AUD' ? '$' : '¥';
$('<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);

@ -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();
}

Loading…
Cancel
Save