Search in sources :

Example 1 with AccountingLineOverride

use of org.kuali.kfs.sys.businessobject.AccountingLineOverride in project cu-kfs by CU-CommunityApps.

the class LaborAccountingLineOverride method processForOutput.

/**
 * @deprecated use {@link processForOutput(AccountingDocument document, AccountingLine line)} instead.
 */
@Deprecated
public static void processForOutput(AccountingLine line) {
    AccountingLineOverride fromCurrentCode = AccountingLineOverride.valueOf(line.getOverrideCode());
    AccountingLineOverride needed = determineNeededOverrides(line);
    // KFSMI-9133 : updating system to automatically check expired account boxes on the source side
    // of the transaction, since those are read only.  Otherwise, amounts in expired accounts
    // could never be transferred
    line.setAccountExpiredOverrideNeeded(needed.hasComponent(COMPONENT.EXPIRED_ACCOUNT));
    if (line.getAccountExpiredOverrideNeeded()) {
        line.setAccountExpiredOverride(fromCurrentCode.hasComponent(COMPONENT.EXPIRED_ACCOUNT));
    }
    line.setObjectBudgetOverride(fromCurrentCode.hasComponent(COMPONENT.NON_BUDGETED_OBJECT));
    line.setObjectBudgetOverrideNeeded(needed.hasComponent(COMPONENT.NON_BUDGETED_OBJECT));
    line.setNonFringeAccountOverride(fromCurrentCode.hasComponent(COMPONENT.NON_FRINGE_ACCOUNT_USED));
    line.setNonFringeAccountOverrideNeeded(needed.hasComponent(COMPONENT.NON_FRINGE_ACCOUNT_USED));
}
Also used : AccountingLineOverride(org.kuali.kfs.sys.businessobject.AccountingLineOverride)

Example 2 with AccountingLineOverride

use of org.kuali.kfs.sys.businessobject.AccountingLineOverride in project cu-kfs by CU-CommunityApps.

the class LaborAccountingLineOverride method processForOutput.

/**
 * Prepares the given AccountingLine in a Struts Action for display by a JSP. This means converting the override code to
 * checkboxes for display and input, as well as analyzing the accounting line and determining which override checkboxes are
 * needed.
 *
 * @param line
 */
public static void processForOutput(AccountingDocument document, AccountingLine line) {
    AccountingLineOverride fromCurrentCode = AccountingLineOverride.valueOf(line.getOverrideCode());
    AccountingLineOverride needed = determineNeededOverrides(document, line);
    // KFSMI-9133 : updating system to automatically check expired account boxes on the source side
    // of the transaction, since those are read only.  Otherwise, amounts in expired accounts
    // could never be transferred
    line.setAccountExpiredOverrideNeeded(needed.hasComponent(COMPONENT.EXPIRED_ACCOUNT));
    if (line.getAccountExpiredOverrideNeeded()) {
        line.setAccountExpiredOverride(fromCurrentCode.hasComponent(COMPONENT.EXPIRED_ACCOUNT));
    }
    line.setObjectBudgetOverride(fromCurrentCode.hasComponent(COMPONENT.NON_BUDGETED_OBJECT));
    line.setObjectBudgetOverrideNeeded(needed.hasComponent(COMPONENT.NON_BUDGETED_OBJECT));
    line.setNonFringeAccountOverride(fromCurrentCode.hasComponent(COMPONENT.NON_FRINGE_ACCOUNT_USED));
    line.setNonFringeAccountOverrideNeeded(needed.hasComponent(COMPONENT.NON_FRINGE_ACCOUNT_USED));
}
Also used : AccountingLineOverride(org.kuali.kfs.sys.businessobject.AccountingLineOverride)

Aggregations

AccountingLineOverride (org.kuali.kfs.sys.businessobject.AccountingLineOverride)2