Skip to content

Commit

Permalink
KFSPTS-30809 Fix clearing of DV Wire Transfer tab (#1586)
Browse files Browse the repository at this point in the history
  • Loading branch information
cah292 committed Apr 17, 2024
1 parent 2bed3e5 commit fffb60b
Showing 1 changed file with 36 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import org.kuali.kfs.sys.businessobject.PaymentSourceWireTransfer;
import org.kuali.kfs.sys.context.SpringContext;

import edu.cornell.kfs.fp.businessobject.DisbursementVoucherWireTransferExtendedAttribute;
import edu.cornell.kfs.fp.document.service.CuDisbursementVoucherTaxService;
import edu.cornell.kfs.pdp.service.CuCheckStubService;
import edu.cornell.kfs.sys.CUKFSKeyConstants;
Expand Down Expand Up @@ -95,6 +96,41 @@ protected boolean checkWireTransferTabState(final DisbursementVoucherDocument dv
return tabStatesOK;
}

@Override
protected boolean hasWireTransferValues(final PaymentSourceWireTransfer dvWireTransfer) {
boolean hasValues = super.hasWireTransferValues(dvWireTransfer);
final DisbursementVoucherWireTransferExtendedAttribute wireExtension =
(DisbursementVoucherWireTransferExtendedAttribute) dvWireTransfer.getExtension();
hasValues |= StringUtils.isNotBlank(wireExtension.getDisbVchrBankStreetAddress());
hasValues |= StringUtils.isNotBlank(wireExtension.getDisbVchrBankProvince());
hasValues |= StringUtils.isNotBlank(wireExtension.getDisbVchrBankSWIFTCode());
hasValues |= StringUtils.isNotBlank(wireExtension.getDisbVchrBankIBAN());
hasValues |= StringUtils.isNotBlank(wireExtension.getDisbVchrSortOrTransitCode());
hasValues |= StringUtils.isNotBlank(wireExtension.getDisbVchrCorrespondentBankName());
hasValues |= StringUtils.isNotBlank(wireExtension.getDisbVchrCorrespondentBankAddress());
hasValues |= StringUtils.isNotBlank(wireExtension.getDisbVchrCorrespondentBankRoutingNumber());
hasValues |= StringUtils.isNotBlank(wireExtension.getDisbVchrCorrespondentBankAccountNumber());
hasValues |= StringUtils.isNotBlank(wireExtension.getDisbVchrCorrespondentBankSwiftCode());
return hasValues;
}

@Override
protected void clearWireTransferValues(final PaymentSourceWireTransfer dvWireTransfer) {
super.clearWireTransferValues(dvWireTransfer);
final DisbursementVoucherWireTransferExtendedAttribute wireExtension =
(DisbursementVoucherWireTransferExtendedAttribute) dvWireTransfer.getExtension();
wireExtension.setDisbVchrBankStreetAddress(null);
wireExtension.setDisbVchrBankProvince(null);
wireExtension.setDisbVchrBankSWIFTCode(null);
wireExtension.setDisbVchrBankIBAN(null);
wireExtension.setDisbVchrSortOrTransitCode(null);
wireExtension.setDisbVchrCorrespondentBankName(null);
wireExtension.setDisbVchrCorrespondentBankAddress(null);
wireExtension.setDisbVchrCorrespondentBankRoutingNumber(null);
wireExtension.setDisbVchrCorrespondentBankAccountNumber(null);
wireExtension.setDisbVchrCorrespondentBankSwiftCode(null);
}

public CuCheckStubService getCuCheckStubService() {
if (cuCheckStubService == null) {
cuCheckStubService = SpringContext.getBean(CuCheckStubService.class);
Expand Down

0 comments on commit fffb60b

Please sign in to comment.