|
|
@@ -5,6 +5,7 @@ import com.uas.platform.b2b.model.PurchaseOrder;
|
|
|
import com.uas.platform.b2b.model.PurchaseOrderItem;
|
|
|
import org.springframework.util.StringUtils;
|
|
|
|
|
|
+import java.text.DecimalFormat;
|
|
|
import java.util.Date;
|
|
|
|
|
|
/**
|
|
|
@@ -120,8 +121,9 @@ public class FxPurcAcceptItem {
|
|
|
this.acceptCode = acceptItem.getAccept().getCode();
|
|
|
this.acceptDate = acceptItem.getAccept().getDate();
|
|
|
this.acceptQty = acceptItem.getQty();
|
|
|
+ DecimalFormat df = new DecimalFormat("0.000000");
|
|
|
if (!StringUtils.isEmpty(acceptItem.getQty()) && !StringUtils.isEmpty(acceptItem.getOrderPrice())) {
|
|
|
- this.acceptAmount = acceptItem.getQty()*acceptItem.getOrderPrice() ;
|
|
|
+ this.acceptAmount = Double.parseDouble(df.format(acceptItem.getQty()*acceptItem.getOrderPrice())) ;
|
|
|
} else {
|
|
|
this.acceptAmount = 0d;
|
|
|
}
|
|
|
@@ -138,7 +140,12 @@ public class FxPurcAcceptItem {
|
|
|
this.acceptCode = acceptItem.getAccept().getCode();
|
|
|
this.acceptDate = acceptItem.getAccept().getDate();
|
|
|
this.acceptQty = acceptItem.getQty();
|
|
|
- this.acceptAmount = acceptItem.getQty()*acceptItem.getOrderPrice();
|
|
|
+ DecimalFormat df = new DecimalFormat("0.000000");
|
|
|
+ if (!StringUtils.isEmpty(acceptItem.getQty()) && !StringUtils.isEmpty(acceptItem.getOrderPrice())) {
|
|
|
+ this.acceptAmount = Double.parseDouble(df.format(acceptItem.getQty()*acceptItem.getOrderPrice())) ;
|
|
|
+ } else {
|
|
|
+ this.acceptAmount = 0d;
|
|
|
+ }
|
|
|
this.detno = acceptItem.getNumber();
|
|
|
if (!StringUtils.isEmpty(acceptItem.getCheckQty())) {
|
|
|
this.isCheck = acceptItem.getCheckQty() >= acceptItem.getQty() ? "已对账" : "已收货";
|