1.采购订单返利撤销bug修复
This commit is contained in:
parent
78be91c79d
commit
7cc5a594f2
|
|
@ -415,8 +415,6 @@ public class PuroderBillShareRefundPlugin extends AbstractBillPlugIn {
|
||||||
getModel().setValue("tqq9_zgcgxj", tqq9_maxprice_gz, rowIndex);
|
getModel().setValue("tqq9_zgcgxj", tqq9_maxprice_gz, rowIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// OperateOption operateOption = OperateOption.create();
|
|
||||||
// OperationServiceHelper.executeOperate("pricequery",dataEntity.getDynamicObjectType().getName(),new DynamicObject[]{dataEntity},operateOption);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (StringUtils.equals("priceandtax", name)) {
|
if (StringUtils.equals("priceandtax", name)) {
|
||||||
|
|
@ -503,6 +501,45 @@ public class PuroderBillShareRefundPlugin extends AbstractBillPlugIn {
|
||||||
getView().updateView();
|
getView().updateView();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// //勾选赠品后,折旧后价税合计为0
|
||||||
|
// if (StringUtils.equals("tqq9_payamount", name)) {
|
||||||
|
// BigDecimal tqq9_payamount = (BigDecimal) getModel().getValue("tqq9_payamount");
|
||||||
|
// DynamicObjectCollection billentries = dataEntity.getDynamicObjectCollection("billentry");
|
||||||
|
// if (tqq9_payamount.compareTo(BigDecimal.ZERO) == 0) {
|
||||||
|
// for (int i = 0; i < billentries.size(); i++) {
|
||||||
|
// getModel().setValue("ispresent", true, i);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// this.getView().updateView();
|
||||||
|
// }
|
||||||
|
|
||||||
|
// //主动勾选赠品,折扣后价税合计不为0
|
||||||
|
// if (StringUtils.equals("ispresent", name)) {
|
||||||
|
// ChangeData changeData = e.getChangeSet()[0];
|
||||||
|
// int rowIndex = changeData.getRowIndex();
|
||||||
|
// int seq = rowIndex;
|
||||||
|
// Boolean newValue = (Boolean) changeData.getNewValue();
|
||||||
|
// BigDecimal tqq9_payamount = (BigDecimal) getModel().getValue("tqq9_payamount");
|
||||||
|
// if (newValue && tqq9_payamount.compareTo(BigDecimal.ZERO) > 0) {
|
||||||
|
// getModel().setValue("qty", BigDecimal.ZERO,seq);
|
||||||
|
// getModel().setValue("priceandtax", BigDecimal.ZERO,seq);
|
||||||
|
// }
|
||||||
|
// this.getView().setEnable(true,"tqq9_discountamount");
|
||||||
|
// Boolean falg=true;
|
||||||
|
// DynamicObjectCollection billentries = dataEntity.getDynamicObjectCollection("billentry");
|
||||||
|
// for (DynamicObject billentry : billentries) {
|
||||||
|
// if (!billentry.getBoolean("ispresent")){
|
||||||
|
// falg=false;
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// if(falg){
|
||||||
|
// getModel().setValue("tqq9_discountamount",BigDecimal.ZERO);
|
||||||
|
// }
|
||||||
|
// this.getView().updateView();
|
||||||
|
//
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -514,12 +551,10 @@ public class PuroderBillShareRefundPlugin extends AbstractBillPlugIn {
|
||||||
BigDecimal totalallamount = dataEntity.getBigDecimal("totalallamount");
|
BigDecimal totalallamount = dataEntity.getBigDecimal("totalallamount");
|
||||||
BigDecimal tqq9_payamount = dataEntity.getBigDecimal("tqq9_payamount");
|
BigDecimal tqq9_payamount = dataEntity.getBigDecimal("tqq9_payamount");
|
||||||
if (totalallamount.compareTo(BigDecimal.ZERO) == 0) {
|
if (totalallamount.compareTo(BigDecimal.ZERO) == 0) {
|
||||||
DynamicObjectCollection purbillentry_pay = dataEntity.getDynamicObjectCollection("purbillentry_pay");
|
|
||||||
DynamicObjectCollection billentry = dataEntity.getDynamicObjectCollection("billentry");
|
DynamicObjectCollection billentry = dataEntity.getDynamicObjectCollection("billentry");
|
||||||
for (DynamicObject dynamicObject : billentry) {
|
for (DynamicObject dynamicObject : billentry) {
|
||||||
dynamicObject.set("ispresent", true);
|
dynamicObject.set("ispresent", true);
|
||||||
}
|
}
|
||||||
purbillentry_pay.clear();
|
|
||||||
}
|
}
|
||||||
if (tqq9_payamount.compareTo(BigDecimal.ZERO) == 0) {
|
if (tqq9_payamount.compareTo(BigDecimal.ZERO) == 0) {
|
||||||
DynamicObjectCollection purbillentry_pay = dataEntity.getDynamicObjectCollection("purbillentry_pay");
|
DynamicObjectCollection purbillentry_pay = dataEntity.getDynamicObjectCollection("purbillentry_pay");
|
||||||
|
|
|
||||||
|
|
@ -26,9 +26,7 @@ import tqq9.lc123.cloud.app.plugin.utils.HttpRequestUtils;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.math.RoundingMode;
|
import java.math.RoundingMode;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 采购订单操作插件
|
* 采购订单操作插件
|
||||||
|
|
@ -246,6 +244,9 @@ public class PurOrderBillRebatePlugin extends AbstractOperationServicePlugIn imp
|
||||||
}
|
}
|
||||||
dataEntity.set("tqq9_hshfsyje_old", tqq9_hshfsyje);//含税货返使用金额(旧)
|
dataEntity.set("tqq9_hshfsyje_old", tqq9_hshfsyje);//含税货返使用金额(旧)
|
||||||
SaveServiceHelper.save(new DynamicObject[]{dataEntity});
|
SaveServiceHelper.save(new DynamicObject[]{dataEntity});
|
||||||
|
}else if (tqq9_hshfsyje.compareTo(BigDecimal.ZERO) == 0){
|
||||||
|
dataEntity.set("tqq9_hshfsyje_old", tqq9_hshfsyje);//含税货返使用金额(旧)
|
||||||
|
SaveServiceHelper.save(new DynamicObject[]{dataEntity});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -301,6 +302,9 @@ public class PurOrderBillRebatePlugin extends AbstractOperationServicePlugIn imp
|
||||||
}
|
}
|
||||||
dataEntity.set("tqq9_hsxfsyje_old", tqq9_hsxfsyje);//含税现返使用金额(旧)
|
dataEntity.set("tqq9_hsxfsyje_old", tqq9_hsxfsyje);//含税现返使用金额(旧)
|
||||||
SaveServiceHelper.save(new DynamicObject[]{dataEntity});
|
SaveServiceHelper.save(new DynamicObject[]{dataEntity});
|
||||||
|
}else if(tqq9_hsxfsyje.compareTo(BigDecimal.ZERO) == 0){
|
||||||
|
dataEntity.set("tqq9_hsxfsyje_old", tqq9_hsxfsyje);//含税现返使用金额(旧)
|
||||||
|
SaveServiceHelper.save(new DynamicObject[]{dataEntity});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue