Merge branch 'hotfix20180227gst'

master
yixian 7 years ago
commit ab82fb7661

@ -175,7 +175,7 @@ public class PartnerManageController {
clientManager.setClientRetailPaySurCharge(clientMoniker, config.getBooleanValue("retail_surcharge")); clientManager.setClientRetailPaySurCharge(clientMoniker, config.getBooleanValue("retail_surcharge"));
} }
@ManagerMapping(value = "/{clientMoniker}/tax_in_surcharge", method = RequestMethod.PUT, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN, ManagerRole.BD_USER, ManagerRole.SERVANT}) @ManagerMapping(value = "/{clientMoniker}/tax_in_surcharge", method = RequestMethod.PUT, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN})
public void setClientTaxPayer(@PathVariable String clientMoniker, @RequestBody JSONObject config) { public void setClientTaxPayer(@PathVariable String clientMoniker, @RequestBody JSONObject config) {
clientManager.setClientTaxInSurcharge(clientMoniker, config.getBooleanValue("tax_in_surcharge")); clientManager.setClientTaxInSurcharge(clientMoniker, config.getBooleanValue("tax_in_surcharge"));
} }

@ -100,9 +100,11 @@ $(function () {
dataCache.discounts = []; dataCache.discounts = [];
dataCache.tax = surchargeData.tax; dataCache.tax = surchargeData.tax;
dataCache.surcharge = surchargeData.surcharge; dataCache.surcharge = surchargeData.surcharge;
$(window.coupons).each(function () { $(window.coupons).each(function () {
price = this.handleDiscount(price, dataCache.price, dataCache.discounts, dataCache.coupons); price = this.handleDiscount(price, dataCache.price, dataCache.discounts, dataCache.coupons);
}); });
dataCache.customSurcharge = new Decimal(price).sub(realPrice).toFixed(2,Decimal.ROUND_HALF_UP);
dataCache.finalPrice = new Decimal(price).toFixed(2, Decimal.ROUND_FLOOR); dataCache.finalPrice = new Decimal(price).toFixed(2, Decimal.ROUND_FLOOR);
var rate = 'CNY' == window.currency ? 1 : exchangeRate; var rate = 'CNY' == window.currency ? 1 : exchangeRate;
var cnyVal = Decimal.mul(price, rate).toFixed(2, Decimal.ROUND_HALF_UP); var cnyVal = Decimal.mul(price, rate).toFixed(2, Decimal.ROUND_HALF_UP);
@ -201,11 +203,8 @@ $(function () {
var bd = $('.weui_dialog_bd', dialog); var bd = $('.weui_dialog_bd', dialog);
var currencySymbol = window.currency == 'AUD' ? '$' : '¥'; var currencySymbol = window.currency == 'AUD' ? '$' : '¥';
$('<p></p>').html('Input Price 输入金额:' + currencySymbol + dataCache.price).appendTo(bd); $('<p></p>').html('Input Price 输入金额:' + currencySymbol + dataCache.price).appendTo(bd);
if (parseFloat(dataCache.surcharge) > 0) { if (parseFloat(dataCache.customSurcharge) > 0) {
$('<p></p>').html('Surcharge 手续费(' + window.rateValue + '%):+' + currencySymbol + dataCache.surcharge).appendTo(bd); $('<p></p>').html('Surcharge 手续费(' + window.rateValue + '%):+' + currencySymbol + dataCache.customSurcharge).appendTo(bd);
}
if (parseFloat(dataCache.tax) > 0) {
$('<p></p>').html('GST(10%):'+currencySymbol+dataCache.tax).appendTo(bd);
} }
$(dataCache.discounts).each(function () { $(dataCache.discounts).each(function () {
$('<p></p>').html(this.title + ':-' + currencySymbol + this.amount).appendTo(bd); $('<p></p>').html(this.title + ':-' + currencySymbol + this.amount).appendTo(bd);

@ -92,6 +92,7 @@ $(function () {
$(window.coupons).each(function () { $(window.coupons).each(function () {
price = this.handleDiscount(price, dataCache.price, dataCache.discounts, dataCache.coupons); price = this.handleDiscount(price, dataCache.price, dataCache.discounts, dataCache.coupons);
}); });
dataCache.customSurcharge = new Decimal(price).sub(realPrice).toFixed(2,Decimal.ROUND_HALF_UP);
dataCache.finalPrice = new Decimal(price).toFixed(2, Decimal.ROUND_FLOOR); dataCache.finalPrice = new Decimal(price).toFixed(2, Decimal.ROUND_FLOOR);
var rate = 'CNY' == window.currency ? 1 : exchangeRate; var rate = 'CNY' == window.currency ? 1 : exchangeRate;
var cnyVal = Decimal.mul(price, rate).toFixed(2, Decimal.ROUND_HALF_UP); var cnyVal = Decimal.mul(price, rate).toFixed(2, Decimal.ROUND_HALF_UP);
@ -190,11 +191,8 @@ $(function () {
var bd = $('.weui_dialog_bd', dialog); var bd = $('.weui_dialog_bd', dialog);
var currencySymbol = window.currency == 'AUD' ? '$' : '¥'; var currencySymbol = window.currency == 'AUD' ? '$' : '¥';
$('<p></p>').html('Input Price 输入金额:' + currencySymbol + dataCache.price).appendTo(bd); $('<p></p>').html('Input Price 输入金额:' + currencySymbol + dataCache.price).appendTo(bd);
if (parseFloat(dataCache.surcharge) > 0) { if (parseFloat(dataCache.customSurcharge) > 0) {
$('<p></p>').html('Surcharge 手续费(' + window.rateValue + '%):+' + currencySymbol + dataCache.surcharge).appendTo(bd); $('<p></p>').html('Surcharge 手续费(' + window.rateValue + '%):+' + currencySymbol + dataCache.customSurcharge).appendTo(bd);
}
if (parseFloat(dataCache.tax) > 0) {
$('<p></p>').html('GST(10%):'+currencySymbol+dataCache.tax).appendTo(bd);
} }
$(dataCache.discounts).each(function () { $(dataCache.discounts).each(function () {
$('<p></p>').html(this.title + ':-' + currencySymbol + this.amount).appendTo(bd); $('<p></p>').html(this.title + ':-' + currencySymbol + this.amount).appendTo(bd);

Loading…
Cancel
Save