| org.kuali.kfs.web.struts.form.KualiAccountingDocumentFormBase org.kuali.module.financial.web.struts.form.VoucherForm
All known Subclasses: org.kuali.module.financial.web.struts.form.AuxiliaryVoucherForm, org.kuali.module.financial.web.struts.form.JournalVoucherForm,
VoucherForm | public class VoucherForm extends KualiAccountingDocumentFormBase (Code) | | This class is the Struts specific form object that works in conjunction with the pojo utilities to build the UI for Voucher
Document instances. This class is unique in that it leverages a helper data structure called the
VoucherAccountingLineHelper because Voucher documents, under some/none conditions, presents the user with
a debit and credit column for amount entry. New accounting lines use specific credit and debit amount fields b/c the new line is
explicitly known; however, already existing accounting lines need to exist within a list with ordering that matches the
accounting lines source list.
|
Method Summary | |
public AccountingPeriod | getAccountingPeriod() | public List | getAccountingPeriods() This method retrieves the list of valid accounting periods to display. | public String | getCurrencyFormattedCreditTotal() This method retrieves the voucher's credit total formatted as currency. | public String | getCurrencyFormattedDebitTotal() This method retrieves the voucher's debit total formatted as currency. | public String | getCurrencyFormattedTotal() This method retrieves the voucher's total formatted as currency. | public String | getFormattedReversalDate() This method returns the reversal date in the format MMM d, yyyy. | public KualiDecimal | getNewSourceLineCredit() This method retrieves the credit amount of the new accounting line that was added. | public KualiDecimal | getNewSourceLineDebit() This method retrieves the debit amount of the new accounting line that was added. | public String | getSelectedAccountingPeriod() This method retrieves the selectedAccountingPeriod. | public VoucherDocument | getVoucherDocument() | public VoucherAccountingLineHelper | getVoucherLineHelper(int index) This method retrieves the proper voucher helper line data structure at the passed in list index so that it matches up with
the correct accounting line at that index. | public List | getVoucherLineHelpers() Accessor to the list of
VoucherAccountingLineHelper instances. | public void | populate(HttpServletRequest request) Overrides the parent to call super.populate and then to call the two methods that are specific to loading the two select
lists on the page. | protected void | populateAccountingPeriodListForRendering() This method retrieves all of the "open for posting" accounting periods and prepares them to be rendered in a dropdown UI
component. | protected void | populateCreditAndDebitAmounts() If the balance type is an offset generation balance type, then the user is able to enter the amount as either a debit or a
credit, otherwise, they only need to deal with the amount field in this case we always need to update the underlying bo so
that the debit/credit code along with the amount, is properly set. | protected void | populateSelectedVoucherAccountingPeriod() This method parses the accounting period value from the form and builds a basic AccountingPeriod object so that the voucher
is properly persisted with the accounting period set for it. | public void | populateSourceAccountingLine(SourceAccountingLine sourceLine) Override the parent, to push the chosen accounting period and balance type down into the source accounting line object. | protected boolean | processDebitAndCreditForAllSourceLines() This method iterates through all of the source accounting lines associated with the voucher doc and accounts for any changes
to the credit and debit amounts, populate the source lines' amount and debit/credit code fields appropriately, so that they
can be persisted accurately. | protected boolean | processDebitAndCreditForNewSourceLine() This method uses the newly entered debit and credit amounts to populate the new source line that is to be added to the
voucher document. | protected boolean | processDebitAndCreditForSourceLine(SourceAccountingLine sourceLine, KualiDecimal debitAmount, KualiDecimal creditAmount, int index) This method checks the debit and credit attributes passed in, figures out which one has a value, and sets the source
accounting line's amount and debit/credit attribute appropriately. | public void | setAccountingPeriods(List accountingPeriods) This method sets the list of valid accounting periods to display. | public void | setNewSourceLineCredit(KualiDecimal newSourceLineCredit) This method sets the credit amount of the new accounting line that was added. | public void | setNewSourceLineDebit(KualiDecimal newSourceLineDebit) This method sets the debit amount of the new accounting line that was added. | public void | setSelectedAccountingPeriod(String selectedAccountingPeriod) This method sets the selectedAccountingPeriod. | public void | setVoucherLineHelpers(List voucherLineHelpers) This method sets the list of helper lines for the form. | protected boolean | validateCreditAndDebitAmounts(KualiDecimal debitAmount, KualiDecimal creditAmount, int index) This method checks to make sure that there isn't a value in both the credit and debit columns for a given accounting line. |
selectedAccountingPeriod | protected String selectedAccountingPeriod(Code) | | |
VoucherForm | public VoucherForm()(Code) | | Supplements a constructor for this voucher class
|
getAccountingPeriod | public AccountingPeriod getAccountingPeriod()(Code) | | AccountingPeriod associated with the currently selected period |
getAccountingPeriods | public List getAccountingPeriods()(Code) | | This method retrieves the list of valid accounting periods to display.
List |
getCurrencyFormattedCreditTotal | public String getCurrencyFormattedCreditTotal()(Code) | | This method retrieves the voucher's credit total formatted as currency.
String |
getCurrencyFormattedDebitTotal | public String getCurrencyFormattedDebitTotal()(Code) | | This method retrieves the voucher's debit total formatted as currency.
String |
getCurrencyFormattedTotal | public String getCurrencyFormattedTotal()(Code) | | This method retrieves the voucher's total formatted as currency.
String |
getFormattedReversalDate | public String getFormattedReversalDate()(Code) | | This method returns the reversal date in the format MMM d, yyyy.
String |
getNewSourceLineCredit | public KualiDecimal getNewSourceLineCredit()(Code) | | This method retrieves the credit amount of the new accounting line that was added.
KualiDecimal |
getNewSourceLineDebit | public KualiDecimal getNewSourceLineDebit()(Code) | | This method retrieves the debit amount of the new accounting line that was added.
KualiDecimal |
getSelectedAccountingPeriod | public String getSelectedAccountingPeriod()(Code) | | This method retrieves the selectedAccountingPeriod.
String |
getVoucherDocument | public VoucherDocument getVoucherDocument()(Code) | | Helper method to make casting easier
VoucherDocument |
getVoucherLineHelper | public VoucherAccountingLineHelper getVoucherLineHelper(int index)(Code) | | This method retrieves the proper voucher helper line data structure at the passed in list index so that it matches up with
the correct accounting line at that index.
Parameters: index - VoucherAccountingLineHelper |
getVoucherLineHelpers | public List getVoucherLineHelpers()(Code) | | Accessor to the list of
VoucherAccountingLineHelper instances. This method retrieves the list of
helper line objects for the form.
List |
populateAccountingPeriodListForRendering | protected void populateAccountingPeriodListForRendering()(Code) | | This method retrieves all of the "open for posting" accounting periods and prepares them to be rendered in a dropdown UI
component.
|
populateCreditAndDebitAmounts | protected void populateCreditAndDebitAmounts()(Code) | | If the balance type is an offset generation balance type, then the user is able to enter the amount as either a debit or a
credit, otherwise, they only need to deal with the amount field in this case we always need to update the underlying bo so
that the debit/credit code along with the amount, is properly set.
|
populateSelectedVoucherAccountingPeriod | protected void populateSelectedVoucherAccountingPeriod()(Code) | | This method parses the accounting period value from the form and builds a basic AccountingPeriod object so that the voucher
is properly persisted with the accounting period set for it.
|
processDebitAndCreditForAllSourceLines | protected boolean processDebitAndCreditForAllSourceLines()(Code) | | This method iterates through all of the source accounting lines associated with the voucher doc and accounts for any changes
to the credit and debit amounts, populate the source lines' amount and debit/credit code fields appropriately, so that they
can be persisted accurately. This accounts for the fact that users may change the amounts and/or flip-flop the credit debit
amounts on any accounting line after the initial add of the accounting line.
boolean |
processDebitAndCreditForNewSourceLine | protected boolean processDebitAndCreditForNewSourceLine()(Code) | | This method uses the newly entered debit and credit amounts to populate the new source line that is to be added to the
voucher document.
boolean True if the processing was successful, false otherwise. |
processDebitAndCreditForSourceLine | protected boolean processDebitAndCreditForSourceLine(SourceAccountingLine sourceLine, KualiDecimal debitAmount, KualiDecimal creditAmount, int index)(Code) | | This method checks the debit and credit attributes passed in, figures out which one has a value, and sets the source
accounting line's amount and debit/credit attribute appropriately. It assumes that if it finds something in the debit field,
it's a debit entry, otherwise it's a credit entry. If a user enters a value into both fields, it will assume the debit value,
then when the br eval framework applies the "add" rule, it will bomb out. If first checks to make sure that there isn't a
value in both the credit and debit columns.
Parameters: sourceLine - Parameters: debitAmount - Parameters: creditAmount - Parameters: index - if -1, then its a new line, if not -1 then it's an existing line boolean True if the processing was successful, false otherwise. |
setAccountingPeriods | public void setAccountingPeriods(List accountingPeriods)(Code) | | This method sets the list of valid accounting periods to display.
Parameters: accountingPeriods - |
setNewSourceLineCredit | public void setNewSourceLineCredit(KualiDecimal newSourceLineCredit)(Code) | | This method sets the credit amount of the new accounting line that was added.
Parameters: newSourceLineCredit - |
setNewSourceLineDebit | public void setNewSourceLineDebit(KualiDecimal newSourceLineDebit)(Code) | | This method sets the debit amount of the new accounting line that was added.
Parameters: newSourceLineDebit - |
setSelectedAccountingPeriod | public void setSelectedAccountingPeriod(String selectedAccountingPeriod)(Code) | | This method sets the selectedAccountingPeriod.
Parameters: selectedAccountingPeriod - |
setVoucherLineHelpers | public void setVoucherLineHelpers(List voucherLineHelpers)(Code) | | This method sets the list of helper lines for the form.
Parameters: voucherLineHelpers - |
validateCreditAndDebitAmounts | protected boolean validateCreditAndDebitAmounts(KualiDecimal debitAmount, KualiDecimal creditAmount, int index)(Code) | | This method checks to make sure that there isn't a value in both the credit and debit columns for a given accounting line.
Parameters: creditAmount - Parameters: debitAmount - Parameters: index - if -1, it's a new line, if not -1, then its an existing line boolean False if both the credit and debit fields have a value, true otherwise. |
Fields inherited from org.kuali.kfs.web.struts.form.KualiAccountingDocumentFormBase | protected FormFile sourceFile(Code)(Java Doc) protected FormFile targetFile(Code)(Java Doc)
|
|
|