优化入库单选择采购申请后计量单位赋值逻辑
This commit is contained in:
parent
444808e26e
commit
87a7ca645c
|
|
@ -52,6 +52,7 @@ import java.util.*;
|
||||||
* 11:冲销预付为否清空冲销分录逻辑
|
* 11:冲销预付为否清空冲销分录逻辑
|
||||||
* 12:进项发票分录-运费发票勾选逻辑
|
* 12:进项发票分录-运费发票勾选逻辑
|
||||||
* 13:费用汇总-运费费用项目行逻辑
|
* 13:费用汇总-运费费用项目行逻辑
|
||||||
|
* 14:计量单位锁定解锁逻辑-由计量单位锁定开发字段(勿删)决定
|
||||||
*/
|
*/
|
||||||
public class MaterialInbPurchaseApplyPlugin extends AbstractBillPlugIn implements Plugin, BeforeF7SelectListener, HyperLinkClickListener {
|
public class MaterialInbPurchaseApplyPlugin extends AbstractBillPlugIn implements Plugin, BeforeF7SelectListener, HyperLinkClickListener {
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -511,12 +512,15 @@ public class MaterialInbPurchaseApplyPlugin extends AbstractBillPlugIn implement
|
||||||
long zcgj_bigintfield = returnData.getLong("zcgj_bigintfield");//采购申请单id
|
long zcgj_bigintfield = returnData.getLong("zcgj_bigintfield");//采购申请单id
|
||||||
QFilter filter = new QFilter("purchaseentry.id", QCP.equals, zcgj_bigintfield);
|
QFilter filter = new QFilter("purchaseentry.id", QCP.equals, zcgj_bigintfield);
|
||||||
DynamicObjectCollection purchaseApply = QueryServiceHelper.query("ecma_purchaseapply",
|
DynamicObjectCollection purchaseApply = QueryServiceHelper.query("ecma_purchaseapply",
|
||||||
"billno,purchaseentry,purchaseentry.material,purchaseentry.purchaseqty,purchaseentry.entrytaxrate,purchaseentry.price,purchaseentry.id,purchaseentry.remarks,purchaseentry.zcgj_incount,purchaseentry.zcgj_model",
|
"billno,purchaseentry,purchaseentry.material,purchaseentry.purchaseqty," +
|
||||||
|
"purchaseentry.entrytaxrate,purchaseentry.price,purchaseentry.id,purchaseentry.remarks," +
|
||||||
|
"purchaseentry.zcgj_incount,purchaseentry.zcgj_model,purchaseentry.unit",
|
||||||
new QFilter[]{filter});//采购申请单
|
new QFilter[]{filter});//采购申请单
|
||||||
|
|
||||||
Object billno = purchaseApply.get(0).get("billno");//单据编码
|
Object billno = purchaseApply.get(0).get("billno");//单据编码
|
||||||
long material = purchaseApply.get(0).getLong("purchaseentry.material");//采购申请分录-资源编码
|
long material = purchaseApply.get(0).getLong("purchaseentry.material");//采购申请分录-资源编码
|
||||||
Object zcgj_model = purchaseApply.get(0).get("purchaseentry.zcgj_model");//采购申请分录-规格型号
|
Object zcgj_model = purchaseApply.get(0).get("purchaseentry.zcgj_model");//采购申请分录-规格型号
|
||||||
|
Object unit = purchaseApply.get(0).get("purchaseentry.unit");//采购申请分录-计量单位
|
||||||
BigDecimal purchaseQty = (BigDecimal) purchaseApply.get(0).get("purchaseentry.purchaseqty");//采购申请分录-采购数量
|
BigDecimal purchaseQty = (BigDecimal) purchaseApply.get(0).get("purchaseentry.purchaseqty");//采购申请分录-采购数量
|
||||||
BigDecimal zcgj_inCount = (BigDecimal) purchaseApply.get(0).get("purchaseentry.zcgj_incount");//采购申请分录-已入库数量
|
BigDecimal zcgj_inCount = (BigDecimal) purchaseApply.get(0).get("purchaseentry.zcgj_incount");//采购申请分录-已入库数量
|
||||||
Object entryTaxRate = purchaseApply.get(0).get("purchaseentry.entrytaxrate");//采购申请分录-税率
|
Object entryTaxRate = purchaseApply.get(0).get("purchaseentry.entrytaxrate");//采购申请分录-税率
|
||||||
|
|
@ -526,6 +530,7 @@ public class MaterialInbPurchaseApplyPlugin extends AbstractBillPlugIn implement
|
||||||
this.getModel().setValue("zcgj_purchaseapplynumb", billno, curIndex);//单据编码
|
this.getModel().setValue("zcgj_purchaseapplynumb", billno, curIndex);//单据编码
|
||||||
this.getModel().setValue("material", material, curIndex);//资源编码
|
this.getModel().setValue("material", material, curIndex);//资源编码
|
||||||
this.getModel().setValue("modelnum", zcgj_model, curIndex);//规格型号
|
this.getModel().setValue("modelnum", zcgj_model, curIndex);//规格型号
|
||||||
|
this.getModel().setValue("measureunit", unit, curIndex);//计量单位
|
||||||
this.getModel().setValue("entrytaxrate", entryTaxRate, curIndex);//税率名称
|
this.getModel().setValue("entrytaxrate", entryTaxRate, curIndex);//税率名称
|
||||||
this.getModel().setValue("qty", purchaseQty.subtract(zcgj_inCount), curIndex);//数量
|
this.getModel().setValue("qty", purchaseQty.subtract(zcgj_inCount), curIndex);//数量
|
||||||
this.getModel().setValue("price", price, curIndex);//入库单价
|
this.getModel().setValue("price", price, curIndex);//入库单价
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue