入库单优化
This commit is contained in:
parent
91c33e4536
commit
f24e11f8c0
|
|
@ -349,14 +349,6 @@ public class MaterialInbPurchaseApplyPlugin extends AbstractBillPlugIn implement
|
||||||
} else {
|
} else {
|
||||||
this.getModel().setValue("zcgj_freight_invoice", false, rowIndex);//运费发票
|
this.getModel().setValue("zcgj_freight_invoice", false, rowIndex);//运费发票
|
||||||
}
|
}
|
||||||
DynamicObject invoiceTypeId = invoice.getDynamicObject("invoicetypeid");
|
|
||||||
if (invoiceTypeId != null) {
|
|
||||||
String invoiceTypeIdName = invoiceTypeId.getString("name");
|
|
||||||
if (!invoiceTypeIdName.contains("专")) {
|
|
||||||
this.getModel().setValue("zcgj_invoicetax", BigDecimal.ZERO, rowIndex);
|
|
||||||
this.getModel().setValue("zcgj_oftaxinvoiceamount", dataEntity.get("zcgj_invoiceamount"), rowIndex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
this.getModel().setValue("zcgj_freight_invoice", false);//运费发票
|
this.getModel().setValue("zcgj_freight_invoice", false);//运费发票
|
||||||
}
|
}
|
||||||
|
|
@ -403,6 +395,23 @@ public class MaterialInbPurchaseApplyPlugin extends AbstractBillPlugIn implement
|
||||||
BigDecimal transAmount = (BigDecimal) this.getModel().getValue("transamount");//总运费
|
BigDecimal transAmount = (BigDecimal) this.getModel().getValue("transamount");//总运费
|
||||||
BigDecimal totalAmount = matAmount.add(transAmount);
|
BigDecimal totalAmount = matAmount.add(transAmount);
|
||||||
this.getModel().setValue("totalamount", totalAmount);//入库总金额
|
this.getModel().setValue("totalamount", totalAmount);//入库总金额
|
||||||
|
} else if ("zcgj_applyinvoftaxamt".equals(key)) {
|
||||||
|
//本次申请金额
|
||||||
|
ChangeData[] changeSet = e.getChangeSet();
|
||||||
|
ChangeData changeData = changeSet[0];
|
||||||
|
int rowIndex = changeData.getRowIndex();
|
||||||
|
DynamicObject dataEntity = changeData.getDataEntity();
|
||||||
|
DynamicObject invoice = dataEntity.getDynamicObject("zcgj_invoice");//发票号码
|
||||||
|
if (invoice != null) {
|
||||||
|
DynamicObject invoiceTypeId = invoice.getDynamicObject("invoicetypeid");
|
||||||
|
if (invoiceTypeId != null) {
|
||||||
|
String invoiceTypeIdName = invoiceTypeId.getString("name");
|
||||||
|
if (!invoiceTypeIdName.contains("专")) {
|
||||||
|
this.getModel().setValue("zcgj_invoicetax", BigDecimal.ZERO, rowIndex);
|
||||||
|
this.getModel().setValue("zcgj_oftaxinvoiceamount", dataEntity.get("zcgj_invoiceamount"), rowIndex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ public class MaterialInBillSubmitValidatorOp extends AbstractOperationServicePlu
|
||||||
e.getFieldKeys().add("matamount");
|
e.getFieldKeys().add("matamount");
|
||||||
e.getFieldKeys().add("mataxamount");
|
e.getFieldKeys().add("mataxamount");
|
||||||
e.getFieldKeys().add("zcgj_freight_invoice");
|
e.getFieldKeys().add("zcgj_freight_invoice");
|
||||||
|
e.getFieldKeys().add("zcgj_no_invoice");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -48,9 +49,10 @@ public class MaterialInBillSubmitValidatorOp extends AbstractOperationServicePlu
|
||||||
ExtendedDataEntity[] extendedDataEntities = this.getDataEntities();
|
ExtendedDataEntity[] extendedDataEntities = this.getDataEntities();
|
||||||
for (ExtendedDataEntity extendedDataEntity : extendedDataEntities) {
|
for (ExtendedDataEntity extendedDataEntity : extendedDataEntities) {
|
||||||
DynamicObject ecma_MaterialInBill = extendedDataEntity.getDataEntity();
|
DynamicObject ecma_MaterialInBill = extendedDataEntity.getDataEntity();
|
||||||
|
boolean zcgj_no_invoice = ecma_MaterialInBill.getBoolean("zcgj_no_invoice");//无物资发票
|
||||||
DynamicObjectCollection entryEntityCollection = ecma_MaterialInBill.getDynamicObjectCollection("zcgj_entryentity");//合同进项发票信息
|
DynamicObjectCollection entryEntityCollection = ecma_MaterialInBill.getDynamicObjectCollection("zcgj_entryentity");//合同进项发票信息
|
||||||
DynamicObjectCollection entryEntity2Collection = ecma_MaterialInBill.getDynamicObjectCollection("entryentity");//入库单分录
|
DynamicObjectCollection entryEntity2Collection = ecma_MaterialInBill.getDynamicObjectCollection("entryentity");//入库单分录
|
||||||
if (entryEntityCollection != null && entryEntityCollection.size() > 0 && entryEntity2Collection != null && entryEntity2Collection.size() > 0) {
|
if (!zcgj_no_invoice && entryEntity2Collection != null && entryEntity2Collection.size() > 0) {
|
||||||
String invoice_type = ecma_MaterialInBill.getString("zcgj_invoice_type");//发票类型
|
String invoice_type = ecma_MaterialInBill.getString("zcgj_invoice_type");//发票类型
|
||||||
boolean zcgj_notraninvoice = ecma_MaterialInBill.getBoolean("zcgj_notraninvoice");//无运费发票
|
boolean zcgj_notraninvoice = ecma_MaterialInBill.getBoolean("zcgj_notraninvoice");//无运费发票
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue