Compare commits
No commits in common. "5432763ef9edbf1a1bcdd989aea8a468324bc117" and "91c33e45360ddf3b4fe24bdcc5588504abb6ea05" have entirely different histories.
5432763ef9
...
91c33e4536
|
|
@ -349,6 +349,14 @@ 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);//运费发票
|
||||||
}
|
}
|
||||||
|
|
@ -395,23 +403,6 @@ 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,7 +34,6 @@ 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
|
||||||
|
|
@ -49,10 +48,9 @@ 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 (!zcgj_no_invoice && entryEntity2Collection != null && entryEntity2Collection.size() > 0) {
|
if (entryEntityCollection != null && entryEntityCollection.size() > 0 && 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");//无运费发票
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,9 +23,6 @@ public class OutContractValidatorSubOp extends AbstractOperationServicePlugIn {
|
||||||
super.onPreparePropertys(e);
|
super.onPreparePropertys(e);
|
||||||
e.getFieldKeys().add("iseqsettle");//按设备费用结算单结算
|
e.getFieldKeys().add("iseqsettle");//按设备费用结算单结算
|
||||||
e.getFieldKeys().add("eqsettleentry");//设备费用结算分录
|
e.getFieldKeys().add("eqsettleentry");//设备费用结算分录
|
||||||
e.getFieldKeys().add("contract");//合同类型
|
|
||||||
e.getFieldKeys().add("itementry");//支付项分录
|
|
||||||
e.getFieldKeys().add("zcgj_processallocatentity");//工序分摊
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -60,13 +57,9 @@ public class OutContractValidatorSubOp extends AbstractOperationServicePlugIn {
|
||||||
"qtzchtzy".equals(contractTypeNumber);
|
"qtzchtzy".equals(contractTypeNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
DynamicObjectCollection itemEntryCollection = dataEntity.getDynamicObjectCollection("itementry");//支付项分录
|
DynamicObjectCollection processAllocEntityCollection = dataEntity.getDynamicObjectCollection("zcgj_processallocatentity");//设备费用结算分录
|
||||||
boolean processAllocEmpty = false;
|
boolean processAllocEmpty = processAllocEntityCollection.size() == 0;
|
||||||
if (itemEntryCollection.size() > 0) {
|
|
||||||
DynamicObject itemEntry = itemEntryCollection.get(0);
|
|
||||||
DynamicObjectCollection processAllocEntityCollection = itemEntry.getDynamicObjectCollection("zcgj_processallocatentity");//工序分摊
|
|
||||||
processAllocEmpty = processAllocEntityCollection.size() == 0;
|
|
||||||
}
|
|
||||||
if (priceTypeMatch && contractTypeMatch && processAllocEmpty) {
|
if (priceTypeMatch && contractTypeMatch && processAllocEmpty) {
|
||||||
this.addFatalErrorMessage(extendedDataEntity, "工序分摊必填!!");
|
this.addFatalErrorMessage(extendedDataEntity, "工序分摊必填!!");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue