|
@@ -442,11 +442,11 @@ public class PurOrderController {
|
|
|
for (PurOrder o : list) {
|
|
|
|
|
|
String submit = o.getSubmit();
|
|
|
- Integer Status = o.getStatus();
|
|
|
+ Integer status = o.getStatus();
|
|
|
String code = o.getBillCode();
|
|
|
String version = o.getVersion();
|
|
|
|
|
|
- if (Status != null && Status.equals(1)) {
|
|
|
+ if (status != null && status == 1) {
|
|
|
sb.append("单号" + code).append("客户已确认,无法取消提交;");
|
|
|
continue;
|
|
|
}
|
|
@@ -532,11 +532,11 @@ public class PurOrderController {
|
|
|
Integer getStatus = o.getStatus();
|
|
|
String code = o.getBillCode();
|
|
|
|
|
|
- if (getSubmit == null || getSubmit == "" || getSubmit.equals(0)) {
|
|
|
+ if (getSubmit == null || getSubmit == "" || getSubmit.equals("0")) {
|
|
|
sb.append("单据编码" + code).append("还未提交,无法确认;");
|
|
|
continue;
|
|
|
}
|
|
|
- if (getStatus != null && getStatus.equals(1)) {
|
|
|
+ if (getStatus != null && getStatus==1) {
|
|
|
sb.append("单据编码" + code).append("已确认,请勿再次确认;");
|
|
|
continue;
|
|
|
}
|
|
@@ -796,19 +796,38 @@ public class PurOrderController {
|
|
|
SaleQuotationProduct saleQuotationProduct = saleQuotationProductList.stream().filter(e -> e.getId().equals(saleOrderProduct.getSourceId())).findFirst().orElse(null);
|
|
|
if (saleOrderProduct != null) {
|
|
|
PurQuotationSelectionProduct quotationSelectionProduct = purQuotationSelectionProductList.stream().filter(e -> e.getId().equals(saleQuotationProduct.getSourceId())).findFirst().orElse(null);
|
|
|
- if (oConvertUtils.isNotEmpty(quotationSelectionProduct.getDiscount())) {
|
|
|
- product.setDiscount(quotationSelectionProduct.getDiscount());
|
|
|
- product.setTaxPriceOriginal(quotationSelectionProduct.getTaxPrice());
|
|
|
- }else{
|
|
|
|
|
|
- BigDecimal dic = product.getDiscount() == null ? BigDecimal.ZERO : product.getDiscount();
|
|
|
- BigDecimal dis = (new BigDecimal("100").subtract(dic)).divide(new BigDecimal("100"));
|
|
|
+ if(quotationSelectionProduct!=null){
|
|
|
+ if (oConvertUtils.isNotEmpty(quotationSelectionProduct.getDiscount())) {
|
|
|
+ product.setDiscount(quotationSelectionProduct.getDiscount());
|
|
|
+ BigDecimal dic = product.getDiscount() == null ? BigDecimal.ZERO : product.getDiscount();
|
|
|
+ BigDecimal dis = (new BigDecimal("100").subtract(dic)).divide(new BigDecimal("100"));
|
|
|
|
|
|
- BigDecimal getSalePrice = product.getTaxPrice() == null ? BigDecimal.ZERO : product.getTaxPrice();
|
|
|
- BigDecimal setTaxPrice = getSalePrice.divide(dis, 4, BigDecimal.ROUND_HALF_UP);
|
|
|
+ BigDecimal getSalePrice = product.getTaxPrice() == null ? BigDecimal.ZERO : product.getTaxPrice();
|
|
|
+ BigDecimal setTaxPrice = getSalePrice.divide(dis, 2, BigDecimal.ROUND_HALF_UP);
|
|
|
|
|
|
- product.setTaxPriceOriginal(setTaxPrice);
|
|
|
+ product.setTaxPriceOriginal(setTaxPrice);
|
|
|
+ }else{
|
|
|
+ product.setDiscount(new BigDecimal("100"));
|
|
|
+ product.setTaxPriceOriginal(quotationSelectionProduct.getTaxPrice());
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ product.setDiscount(new BigDecimal("100"));
|
|
|
+ product.setTaxPriceOriginal(quotationSelectionProduct.getTaxPrice());
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
|