对公报销单专票校验
This commit is contained in:
parent
eced8b9638
commit
e645995b8d
|
|
@ -43,16 +43,22 @@ public class InvoiceDeductionCheckOp extends AbstractOperationServicePlugIn {
|
||||||
for (ExtendedDataEntity extendedDataEntity : extendedDataEntities) {
|
for (ExtendedDataEntity extendedDataEntity : extendedDataEntities) {
|
||||||
DynamicObject dataEntity = extendedDataEntity.getDataEntity();
|
DynamicObject dataEntity = extendedDataEntity.getDataEntity();
|
||||||
DynamicObject costCompany = dataEntity.getDynamicObject("costcompany");//费用承担公司
|
DynamicObject costCompany = dataEntity.getDynamicObject("costcompany");//费用承担公司
|
||||||
|
String formid = dataEntity.getDynamicObjectType().getName();
|
||||||
if (costCompany != null) {
|
if (costCompany != null) {
|
||||||
Long companyId = costCompany.getLong("id");
|
Long companyId = costCompany.getLong("id");
|
||||||
if (OrgCheckUtils.isKS(companyId)) {
|
if (OrgCheckUtils.isKS(companyId)) {
|
||||||
DynamicObjectCollection expenseentryentity = dataEntity.getDynamicObjectCollection("expenseentryentity");//费用明细
|
|
||||||
boolean isCkInvoice= false;
|
boolean isCkInvoice= false;
|
||||||
|
boolean isCkInvoicezp= false;
|
||||||
|
DynamicObjectCollection expenseentryentity = dataEntity.getDynamicObjectCollection("expenseentryentity");//费用明细
|
||||||
for (DynamicObject dynamicObject : expenseentryentity) {
|
for (DynamicObject dynamicObject : expenseentryentity) {
|
||||||
boolean offset = dynamicObject.getBoolean("offset");
|
boolean offset = dynamicObject.getBoolean("offset");//可抵扣
|
||||||
if(offset){
|
if(offset){
|
||||||
isCkInvoice = offset;
|
isCkInvoice = offset;
|
||||||
}
|
}
|
||||||
|
boolean specialInvoice = dynamicObject.getBoolean("is_special_invoice");//专票
|
||||||
|
if(specialInvoice){
|
||||||
|
isCkInvoicezp = specialInvoice;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(isCkInvoice){
|
if(isCkInvoice){
|
||||||
String zcgjInvoiceremark = dataEntity.getString("zcgj_invoiceremark");
|
String zcgjInvoiceremark = dataEntity.getString("zcgj_invoiceremark");
|
||||||
|
|
@ -61,6 +67,13 @@ public class InvoiceDeductionCheckOp extends AbstractOperationServicePlugIn {
|
||||||
String message = String.format("费用可抵扣,必须上传发票 或 填写特殊说明 才能提交");
|
String message = String.format("费用可抵扣,必须上传发票 或 填写特殊说明 才能提交");
|
||||||
this.addFatalErrorMessage(extendedDataEntity, message);
|
this.addFatalErrorMessage(extendedDataEntity, message);
|
||||||
}
|
}
|
||||||
|
}else if(isCkInvoicezp){
|
||||||
|
String zcgjInvoiceremark = dataEntity.getString("zcgj_invoiceremark");
|
||||||
|
DynamicObjectCollection invoiceentry = dataEntity.getDynamicObjectCollection("invoiceentry");
|
||||||
|
if( (invoiceentry == null || invoiceentry.isEmpty()) && StringUtils.isEmpty(zcgjInvoiceremark) ){
|
||||||
|
String message = String.format("费用包含专票,必须上传发票 或 填写特殊说明 才能提交");
|
||||||
|
this.addFatalErrorMessage(extendedDataEntity, message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue