From a70adda7bf30fb377af4308c9e78567b5b54431e Mon Sep 17 00:00:00 2001 From: dulingling Date: Fri, 5 Jun 2020 11:04:09 +0800 Subject: [PATCH] =?UTF-8?q?upd:=E4=BF=AE=E5=A4=8Dupay-pdf=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=AF=BC=E5=87=BA=E6=8A=B1=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../manage/tradelog/core/impls/TradeLogServiceImpl.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 161b185d0..e0b8e97de 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ 4.0.0 manage - 2.3.25 + 2.3.26 UTF-8 2.3.0 diff --git a/src/main/java/au/com/royalpay/payment/manage/tradelog/core/impls/TradeLogServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/tradelog/core/impls/TradeLogServiceImpl.java index 8f2f32e14..263dd12a5 100644 --- a/src/main/java/au/com/royalpay/payment/manage/tradelog/core/impls/TradeLogServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/tradelog/core/impls/TradeLogServiceImpl.java @@ -992,7 +992,8 @@ public class TradeLogServiceImpl implements TradeLogService { } BigDecimal transactionFee = item.getBigDecimal("transaction_fee"); BigDecimal transactionFeeTax = item.getBigDecimal("transaction_fee").divide(new BigDecimal(10), 2, RoundingMode.HALF_UP); - BigDecimal realRoyalpayCharge = item.getBigDecimal("total_surcharge").add(taxAmount).subtract(transactionFee).subtract(transactionFeeTax).subtract(incrementalSurcharge).subtract(incrementalTax); + BigDecimal realRoyalpayCharge = (item.containsKey("total_surcharge")?item.getBigDecimal("total_surcharge"):BigDecimal.ZERO) + .add(taxAmount).subtract(transactionFee).subtract(transactionFeeTax).subtract(incrementalSurcharge).subtract(incrementalTax); item.put("incremental_surcharge", incrementalSurcharge.add(incrementalTax).setScale(2, RoundingMode.HALF_UP)); item.put("total_surcharge_intax", realRoyalpayCharge.setScale(2, RoundingMode.HALF_UP)); item.put("transaction_fee_intax", transactionFee.add(transactionFeeTax).setScale(2, RoundingMode.HALF_UP));