Search in sources :

Example 21 with KualiAccountingDocumentFormBase

use of org.kuali.kfs.sys.web.struts.KualiAccountingDocumentFormBase in project cu-kfs by CU-CommunityApps.

the class CapitalAssetInformationActionBase method checkSelectForCapitalAccountingLines.

/**
 * checks "select" check box on capital accounting lines if there are
 * corresponding capital asset records.
 *
 * @param calfb
 */
protected void checkSelectForCapitalAccountingLines(CapitalAccountingLinesFormBase calfb) {
    CapitalAccountingLinesDocumentBase caldb = (CapitalAccountingLinesDocumentBase) calfb.getFinancialDocument();
    List<CapitalAccountingLines> capitalAccountingLines = caldb.getCapitalAccountingLines();
    KualiAccountingDocumentFormBase kadfb = calfb;
    List<CapitalAssetInformation> currentCapitalAssetInformation = this.getCurrentCapitalAssetInformationObject(kadfb);
    for (CapitalAccountingLines capitalAccountingLine : capitalAccountingLines) {
        if (currentCapitalAssetInformation.size() <= 0) {
            capitalAccountingLine.setSelectLine(false);
        } else {
            CapitalAssetInformation existingCapitalAsset = getCapitalAssetCreated(capitalAccountingLine, currentCapitalAssetInformation);
            if (ObjectUtils.isNotNull(existingCapitalAsset)) {
                capitalAccountingLine.setSelectLine(true);
            } else {
                capitalAccountingLine.setSelectLine(false);
            }
        }
    }
}
Also used : CapitalAssetInformation(org.kuali.kfs.fp.businessobject.CapitalAssetInformation) CapitalAccountingLines(org.kuali.kfs.fp.businessobject.CapitalAccountingLines) CapitalAccountingLinesDocumentBase(org.kuali.kfs.fp.document.CapitalAccountingLinesDocumentBase) KualiAccountingDocumentFormBase(org.kuali.kfs.sys.web.struts.KualiAccountingDocumentFormBase)

Example 22 with KualiAccountingDocumentFormBase

use of org.kuali.kfs.sys.web.struts.KualiAccountingDocumentFormBase in project cu-kfs by CU-CommunityApps.

the class CuPreEncumbranceAction method setTabStates.

protected void setTabStates(ActionForm form) {
    KualiAccountingDocumentFormBase kualiForm = (KualiAccountingDocumentFormBase) form;
    AccountingDocument accountingDocument = kualiForm.getFinancialDocument();
    Map<String, String> tabStates = kualiForm.getTabStates();
    setAutomaticPartialDisEncumbrancesTabsOpen(accountingDocument, tabStates);
    setGeneralLedgerPendingEntriesTabOpenWhenGLPEsExist(accountingDocument, tabStates);
    kualiForm.setTabStates(tabStates);
}
Also used : AccountingDocument(org.kuali.kfs.sys.document.AccountingDocument) KualiAccountingDocumentFormBase(org.kuali.kfs.sys.web.struts.KualiAccountingDocumentFormBase)

Aggregations

KualiAccountingDocumentFormBase (org.kuali.kfs.sys.web.struts.KualiAccountingDocumentFormBase)22 CapitalAssetInformation (org.kuali.kfs.fp.businessobject.CapitalAssetInformation)18 CapitalAccountingLines (org.kuali.kfs.fp.businessobject.CapitalAccountingLines)9 CapitalAccountingLinesDocumentBase (org.kuali.kfs.fp.document.CapitalAccountingLinesDocumentBase)9 ArrayList (java.util.ArrayList)8 KualiDecimal (org.kuali.rice.core.api.util.type.KualiDecimal)4 ActionForward (org.apache.struts.action.ActionForward)2 AccountingDocument (org.kuali.kfs.sys.document.AccountingDocument)2 PreEncumbranceDocument (edu.cornell.kfs.fp.document.PreEncumbranceDocument)1 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 Set (java.util.Set)1 Before (org.junit.Before)1 CapitalAssetAccountsGroupDetails (org.kuali.kfs.fp.businessobject.CapitalAssetAccountsGroupDetails)1 CapitalAssetEditable (org.kuali.kfs.fp.document.CapitalAssetEditable)1 CapitalAssetInformationDocumentBase (org.kuali.kfs.fp.document.CapitalAssetInformationDocumentBase)1 PreEncumbranceDocument (org.kuali.kfs.fp.document.PreEncumbranceDocument)1 CapitalAssetManagementModuleService (org.kuali.kfs.integration.cam.CapitalAssetManagementModuleService)1 Asset (org.kuali.kfs.integration.cam.businessobject.Asset)1 KualiDocumentFormBase (org.kuali.kfs.kns.web.struts.form.KualiDocumentFormBase)1