1.采购退货调整(订单是否退货)

2.采购订单价税合计逻辑注释
This commit is contained in:
龚豆豆 2025-12-18 18:05:08 +08:00
parent 2fd01e15bf
commit a0d2825ca8
2 changed files with 44 additions and 18 deletions

View File

@ -61,8 +61,12 @@ public class PuroderBillShareRefundPlugin extends AbstractBillPlugIn {
public void registerListener(EventObject e) {
super.registerListener(e);
this.addItemClickListeners("tbmainentry");
this.addItemClickListeners("tqq9_advcontoolbarap2");
this.addItemClickListeners("tbmain");
}
@Override
public void afterDeleteRow(AfterDeleteRowEventArgs e) {
super.afterDeleteRow(e);
@ -167,7 +171,6 @@ public class PuroderBillShareRefundPlugin extends AbstractBillPlugIn {
this.getModel().setValue("tqq9_disamount", tqq9_disamount, seq);//明细优惠金额
remainRefundAmt = remainRefundAmt.subtract(tqq9_disamount);
}
}
}
}
@ -439,20 +442,20 @@ public class PuroderBillShareRefundPlugin extends AbstractBillPlugIn {
this.getView().showErrorNotification("物料明细分录行" + seq + "含税单价超过最高采购限价,请修改");
}
}
if(StringUtils.equals("tqq9_amount",name)||StringUtils.equals("tqq9_disamount",name)){
DynamicObjectCollection billentries = dataEntity.getDynamicObjectCollection("billentry");
for (int i = 0; i < billentries.size(); i++) {
DynamicObject billentry = billentries.get(i);
BigDecimal tqq9_amount = billentry.getBigDecimal("tqq9_amount");//折扣前价税合计
BigDecimal tqq9_disamount = billentry.getBigDecimal("tqq9_disamount");//优惠(折扣)金额
BigDecimal tqq9_xfamount = billentry.getBigDecimal("tqq9_xfamount");//现返使用金额
BigDecimal tqq9_hfamount = billentry.getBigDecimal("tqq9_hfamount");//优惠(折扣)金额
BigDecimal amountandtax = tqq9_amount.subtract(tqq9_disamount).subtract(tqq9_xfamount).subtract(tqq9_hfamount);//折扣后价税合计
getModel().setValue("amountandtax", amountandtax,i);
}
getView().updateView();
}
// if(StringUtils.equals("tqq9_amount",name)||StringUtils.equals("tqq9_disamount",name)){
// DynamicObjectCollection billentries = dataEntity.getDynamicObjectCollection("billentry");
// for (int i = 0; i < billentries.size(); i++) {
// DynamicObject billentry = billentries.get(i);
// BigDecimal tqq9_amount = billentry.getBigDecimal("tqq9_amount");//折扣前价税合计
// BigDecimal tqq9_disamount = billentry.getBigDecimal("tqq9_disamount");//优惠(折扣)金额
// BigDecimal tqq9_xfamount = billentry.getBigDecimal("tqq9_xfamount");//现返使用金额
// BigDecimal tqq9_hfamount = billentry.getBigDecimal("tqq9_hfamount");//优惠(折扣)金额
// BigDecimal amountandtax = tqq9_amount.subtract(tqq9_disamount).subtract(tqq9_xfamount).subtract(tqq9_hfamount);//折扣后价税合计
// getModel().setValue("amountandtax", amountandtax,i);
// }
// getView().updateView();
//
// }
if (StringUtils.equals("supplier", name)) {
LCLogService lcLogService = new LCLogServiceImpl();
HashMap<String, String> tokenMap = new HashMap<String, String>();
@ -562,6 +565,28 @@ public class PuroderBillShareRefundPlugin extends AbstractBillPlugIn {
evt.setCancel(true);
this.getView().showErrorNotification("所选物料明细没有入库记录");
}
}else if(StringUtils.equals("tqq9_confirmreturn",itemKey)){
Boolean falg=false;
DynamicObjectCollection tqq9_entryentity = this.getModel().getDataEntity(true).getDynamicObjectCollection("tqq9_entryentity");
for (DynamicObject dynamicObject : tqq9_entryentity) {
falg=dynamicObject.getBoolean("dynamicObject");
}
if(falg){
this.getView().setVisible(true,"tqq9_combofield");
this.getView().setVisible(true,"tqq9_textfield3");
}else{
this.getView().showErrorNotification("请至少勾选一行退货信息");
}
}else if(StringUtils.equals("bar_push",itemKey)){
Object tqq9_combofield = getModel().getValue("tqq9_combofield");
Object tqq9_textfield3 = getModel().getValue("tqq9_textfield3");
if(tqq9_combofield==null||tqq9_textfield3==null){
this.getView().showErrorNotification("请填写退货信息");
}else{
DynamicObject dataEntity = this.getModel().getDataEntity(true);
SaveServiceHelper.save(new DynamicObject[]{dataEntity});
}
}
}
@ -609,7 +634,6 @@ public class PuroderBillShareRefundPlugin extends AbstractBillPlugIn {
String id = dynamicObject.getString("id");
ids.add(id);
}
}
if (im_purinblil != null) {
HashMap<String, ArrayList<BigDecimal>> map = new HashMap<>();

View File

@ -68,8 +68,10 @@ public class PurOrderPushPurRefundConverPlugin extends AbstractConvertPlugIn imp
for (DynamicObject dynamicObject : tqq9_entryentity) {
String tqq9_entryid = dynamicObject.getString("tqq9_entryid");
BigDecimal tqq9_pckyamount = dynamicObject.getBigDecimal("tqq9_pckyamount");
pckyMap.put(tqq9_entryid, tqq9_pckyamount);
Boolean tqq9_checkboxfield = dynamicObject.getBoolean("tqq9_checkboxfield");//是否退货
if(tqq9_checkboxfield){
pckyMap.put(tqq9_entryid, tqq9_pckyamount);
}
}
if (im_purinblil != null) {
HashMap<String, ArrayList<BigDecimal>> map = new HashMap<>();