View Javadoc
1   /*
2    * The Kuali Financial System, a comprehensive financial management system for higher education.
3    * 
4    * Copyright 2005-2014 The Kuali Foundation
5    * 
6    * This program is free software: you can redistribute it and/or modify
7    * it under the terms of the GNU Affero General Public License as
8    * published by the Free Software Foundation, either version 3 of the
9    * License, or (at your option) any later version.
10   * 
11   * This program is distributed in the hope that it will be useful,
12   * but WITHOUT ANY WARRANTY; without even the implied warranty of
13   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14   * GNU Affero General Public License for more details.
15   * 
16   * You should have received a copy of the GNU Affero General Public License
17   * along with this program.  If not, see <http://www.gnu.org/licenses/>.
18   */
19  
20  package org.kuali.kfs.sys.businessobject;
21  
22  import java.io.Serializable;
23  import java.sql.Date;
24  import java.sql.Timestamp;
25  import java.util.LinkedHashMap;
26  
27  import org.apache.commons.lang.StringUtils;
28  import org.kuali.kfs.coa.businessobject.A21SubAccount;
29  import org.kuali.kfs.coa.businessobject.Account;
30  import org.kuali.kfs.coa.businessobject.AccountingPeriod;
31  import org.kuali.kfs.coa.businessobject.BalanceType;
32  import org.kuali.kfs.coa.businessobject.Chart;
33  import org.kuali.kfs.coa.businessobject.ObjectCode;
34  import org.kuali.kfs.coa.businessobject.ObjectType;
35  import org.kuali.kfs.coa.businessobject.ProjectCode;
36  import org.kuali.kfs.coa.businessobject.SubAccount;
37  import org.kuali.kfs.coa.businessobject.SubObjectCode;
38  import org.kuali.kfs.gl.businessobject.Transaction;
39  import org.kuali.kfs.gl.businessobject.TransientBalanceInquiryAttributes;
40  import org.kuali.kfs.sys.KFSConstants;
41  import org.kuali.kfs.sys.KFSPropertyConstants;
42  import org.kuali.kfs.sys.context.SpringContext;
43  import org.kuali.kfs.sys.document.validation.impl.AccountingDocumentRuleBaseConstants.GENERAL_LEDGER_PENDING_ENTRY_CODE;
44  import org.kuali.rice.core.api.util.type.KualiDecimal;
45  import org.kuali.rice.core.web.format.CurrencyFormatter;
46  import org.kuali.rice.kew.api.doctype.DocumentTypeService;
47  import org.kuali.rice.kew.doctype.bo.DocumentType;
48  import org.kuali.rice.kew.doctype.bo.DocumentTypeEBO;
49  import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
50  
51  /**
52   * The general ledger pending entry structure holds financial transaction info that will post to the general ledger as an entry.
53   */
54  public class GeneralLedgerPendingEntry extends PersistableBusinessObjectBase implements Transaction, Serializable, Cloneable {
55      private static final long serialVersionUID = 4041748389323105932L;
56      private String financialSystemOriginationCode;
57      private String documentNumber;
58      private Integer transactionLedgerEntrySequenceNumber;
59      private String chartOfAccountsCode;
60      private String accountNumber;
61      private String subAccountNumber;
62      private String financialObjectCode;
63      private String financialSubObjectCode;
64      private String financialBalanceTypeCode;
65      private String financialObjectTypeCode;
66      private Integer universityFiscalYear;
67      private String universityFiscalPeriodCode;
68      private String transactionLedgerEntryDescription;
69      private KualiDecimal transactionLedgerEntryAmount;
70      private String transactionDebitCreditCode;
71      private Date transactionDate;
72      private String financialDocumentTypeCode;
73      private String organizationDocumentNumber;
74      private String projectCode;
75      private String organizationReferenceId;
76      private String referenceFinancialDocumentTypeCode;
77      private String referenceFinancialSystemOriginationCode;
78      private String referenceFinancialDocumentNumber;
79      private Date financialDocumentReversalDate;
80      private String transactionEncumbranceUpdateCode;
81      private String financialDocumentApprovedCode;
82      private String acctSufficientFundsFinObjCd;
83      private boolean transactionEntryOffsetIndicator;
84      private Timestamp transactionEntryProcessedTs;
85  
86      private DocumentTypeEBO financialSystemDocumentTypeCode;
87      private FinancialSystemDocumentHeader documentHeader;
88  
89      private SystemOptions option;
90      private Chart chart;
91      private Account account;
92      private SubAccount subAccount;
93      private ObjectCode financialObject;
94      private SubObjectCode financialSubObject;
95      private BalanceType balanceType;
96      private ObjectType objectType;
97      private A21SubAccount a21SubAccount;
98      private TransientBalanceInquiryAttributes dummyBusinessObject;
99      private OriginationCode originationCode;
100     private ProjectCode project;
101     private OriginationCode referenceOriginationCode;
102     private DocumentTypeEBO referenceFinancialSystemDocumentTypeCode;
103 
104     @Deprecated
105     private transient AccountingPeriod accountingPeriod;
106 
107     /**
108      * Default no-arg constructor.
109      */
110     public GeneralLedgerPendingEntry() {
111         this.objectType = new ObjectType();
112         this.balanceType = new BalanceType();
113         this.dummyBusinessObject = new TransientBalanceInquiryAttributes();
114         this.financialObject = new ObjectCode();
115         this.financialDocumentApprovedCode = KFSConstants.PENDING_ENTRY_APPROVED_STATUS_CODE.NOT_PROCESSED;
116     }
117 
118     /**
119      * Copy constructor Constructs a GeneralLedgerPendingEntry.java.
120      *
121      * @param original entry to copy
122      */
123     public GeneralLedgerPendingEntry(GeneralLedgerPendingEntry original) {
124         financialSystemOriginationCode = original.getFinancialSystemOriginationCode();
125         documentNumber = original.getDocumentNumber();
126         transactionLedgerEntrySequenceNumber = original.getTransactionLedgerEntrySequenceNumber();
127         chartOfAccountsCode = original.getChartOfAccountsCode();
128         accountNumber = original.getAccountNumber();
129         subAccountNumber = original.getSubAccountNumber();
130         financialObjectCode = original.getFinancialObjectCode();
131         financialSubObjectCode = original.getFinancialSubObjectCode();
132         financialBalanceTypeCode = original.getFinancialBalanceTypeCode();
133         financialObjectTypeCode = original.getFinancialObjectTypeCode();
134         universityFiscalYear = original.getUniversityFiscalYear();
135         universityFiscalPeriodCode = original.getUniversityFiscalPeriodCode();
136         transactionLedgerEntryDescription = original.getTransactionLedgerEntryDescription();
137         transactionLedgerEntryAmount = original.getTransactionLedgerEntryAmount();
138         transactionDebitCreditCode = original.getTransactionDebitCreditCode();
139         transactionDate = original.getTransactionDate();
140         financialDocumentTypeCode = original.getFinancialDocumentTypeCode();
141         organizationDocumentNumber = original.getOrganizationDocumentNumber();
142         projectCode = original.getProjectCode();
143         organizationReferenceId = original.getOrganizationReferenceId();
144         referenceFinancialDocumentTypeCode = original.getReferenceFinancialDocumentTypeCode();
145         referenceFinancialSystemOriginationCode = original.getReferenceFinancialSystemOriginationCode();
146         referenceFinancialDocumentNumber = original.getReferenceFinancialDocumentNumber();
147         financialDocumentReversalDate = original.getFinancialDocumentReversalDate();
148         transactionEncumbranceUpdateCode = original.getTransactionEncumbranceUpdateCode();
149         financialDocumentApprovedCode = original.getFinancialDocumentApprovedCode();
150         acctSufficientFundsFinObjCd = original.getAcctSufficientFundsFinObjCd();
151         transactionEntryOffsetIndicator = original.isTransactionEntryOffsetIndicator();
152         transactionEntryProcessedTs = original.getTransactionEntryProcessedTs();
153 
154         financialSystemDocumentTypeCode = original.getFinancialSystemDocumentTypeCode();
155         documentHeader = original.getDocumentHeader();
156 
157         option = original.getOption();
158         chart = original.getChart();
159         account = original.getAccount();
160         subAccount = original.getSubAccount();
161         financialObject = original.getFinancialObject();
162         financialSubObject = original.getFinancialSubObject();
163         balanceType = original.getBalanceType();
164         a21SubAccount = original.getA21SubAccount();
165         dummyBusinessObject = original.getDummyBusinessObject();
166         originationCode = original.getOriginationCode();
167         project = original.getProject();
168         referenceOriginationCode = original.getReferenceOriginationCode();
169         referenceFinancialSystemDocumentTypeCode = original.getReferenceFinancialSystemDocumentTypeCode();
170     }
171 
172     public DocumentTypeEBO getReferenceFinancialSystemDocumentTypeCode() {
173         if ( StringUtils.isBlank( referenceFinancialDocumentTypeCode ) ) {
174             referenceFinancialSystemDocumentTypeCode = null;
175         } else {
176             if ( referenceFinancialSystemDocumentTypeCode == null || !StringUtils.equals(referenceFinancialDocumentTypeCode, referenceFinancialSystemDocumentTypeCode.getName() ) ) {
177                 org.kuali.rice.kew.api.doctype.DocumentType temp = SpringContext.getBean(DocumentTypeService.class).getDocumentTypeByName(referenceFinancialDocumentTypeCode);
178                 if ( temp != null ) {
179                     referenceFinancialSystemDocumentTypeCode = DocumentType.from( temp );
180                 } else {
181                     referenceFinancialSystemDocumentTypeCode = null;
182                 }
183             }
184         }
185         return referenceFinancialSystemDocumentTypeCode;
186     }
187 
188     public OriginationCode getReferenceOriginationCode() {
189         return referenceOriginationCode;
190     }
191 
192     public void setReferenceOriginationCode(OriginationCode referenceOriginationCode) {
193         this.referenceOriginationCode = referenceOriginationCode;
194     }
195 
196     public ProjectCode getProject() {
197         return project;
198     }
199 
200     public void setProject(ProjectCode project) {
201         this.project = project;
202     }
203 
204     public OriginationCode getOriginationCode() {
205         return originationCode;
206     }
207 
208     public void setOriginationCode(OriginationCode originationCode) {
209         this.originationCode = originationCode;
210     }
211 
212     @Override
213     public void setOption(SystemOptions option) {
214         this.option = option;
215     }
216 
217     @Override
218     public SystemOptions getOption() {
219         return option;
220     }
221 
222     /**
223      * Gets the documentNumber attribute.
224      *
225      * @return Returns the documentNumber
226      */
227     @Override
228     public String getDocumentNumber() {
229         return documentNumber;
230     }
231 
232     /**
233      * Sets the documentNumber attribute.
234      *
235      * @param documentNumber The documentNumber to set.
236      */
237     public void setDocumentNumber(String documentNumber) {
238         this.documentNumber = documentNumber;
239     }
240 
241     /**
242      * Gets the transactionLedgerEntrySequenceNumber attribute.
243      *
244      * @return Returns the transactionLedgerEntrySequenceNumber
245      */
246     @Override
247     public Integer getTransactionLedgerEntrySequenceNumber() {
248         return transactionLedgerEntrySequenceNumber;
249     }
250 
251     /**
252      * Sets the transactionLedgerEntrySequenceNumber attribute.
253      *
254      * @param transactionLedgerEntrySequenceNumber The transactionLedgerEntrySequenceNumber to set.
255      */
256     public void setTransactionLedgerEntrySequenceNumber(Integer transactionLedgerEntrySequenceNumber) {
257         this.transactionLedgerEntrySequenceNumber = transactionLedgerEntrySequenceNumber;
258     }
259 
260     /**
261      * Gets the chartOfAccountsCode attribute.
262      *
263      * @return Returns the chartOfAccountsCode
264      */
265     @Override
266     public String getChartOfAccountsCode() {
267         return chartOfAccountsCode;
268     }
269 
270     /**
271      * Sets the chartOfAccountsCode attribute.
272      *
273      * @param chartOfAccountsCode The chartOfAccountsCode to set.
274      */
275     public void setChartOfAccountsCode(String chartOfAccountsCode) {
276         this.chartOfAccountsCode = chartOfAccountsCode;
277     }
278 
279     /**
280      * Gets the accountNumber attribute.
281      *
282      * @return Returns the accountNumber
283      */
284     @Override
285     public String getAccountNumber() {
286         return accountNumber;
287     }
288 
289     /**
290      * Sets the accountNumber attribute.
291      *
292      * @param accountNumber The accountNumber to set.
293      */
294     public void setAccountNumber(String accountNumber) {
295         this.accountNumber = accountNumber;
296     }
297 
298     /**
299      * Gets the subAccountNumber attribute.
300      *
301      * @return Returns the subAccountNumber
302      */
303     @Override
304     public String getSubAccountNumber() {
305         return subAccountNumber;
306     }
307 
308     /**
309      * Sets the subAccountNumber attribute.
310      *
311      * @param subAccountNumber The subAccountNumber to set.
312      */
313     public void setSubAccountNumber(String subAccountNumber) {
314         this.subAccountNumber = subAccountNumber;
315     }
316 
317     /**
318      * Gets the financialObjectCode attribute.
319      *
320      * @return Returns the financialObjectCode
321      */
322     @Override
323     public String getFinancialObjectCode() {
324         return financialObjectCode;
325     }
326 
327     /**
328      * Sets the financialObjectCode attribute.
329      *
330      * @param financialObjectCode The financialObjectCode to set.
331      */
332     public void setFinancialObjectCode(String financialObjectCode) {
333         this.financialObjectCode = financialObjectCode;
334     }
335 
336     /**
337      * Gets the financialSubObjectCode attribute.
338      *
339      * @return Returns the financialSubObjectCode
340      */
341     @Override
342     public String getFinancialSubObjectCode() {
343         return financialSubObjectCode;
344     }
345 
346     /**
347      * Sets the financialSubObjectCode attribute.
348      *
349      * @param financialSubObjectCode The financialSubObjectCode to set.
350      */
351     public void setFinancialSubObjectCode(String financialSubObjectCode) {
352         this.financialSubObjectCode = financialSubObjectCode;
353     }
354 
355     /**
356      * Gets the financialBalanceTypeCode attribute.
357      *
358      * @return Returns the financialBalanceTypeCode
359      */
360     @Override
361     public String getFinancialBalanceTypeCode() {
362         return financialBalanceTypeCode;
363     }
364 
365     /**
366      * Sets the financialBalanceTypeCode attribute.
367      *
368      * @param financialBalanceTypeCode The financialBalanceTypeCode to set.
369      */
370     public void setFinancialBalanceTypeCode(String financialBalanceTypeCode) {
371         this.financialBalanceTypeCode = financialBalanceTypeCode;
372     }
373 
374     /**
375      * Gets the financialObjectTypeCode attribute.
376      *
377      * @return Returns the financialObjectTypeCode
378      */
379     @Override
380     public String getFinancialObjectTypeCode() {
381         return financialObjectTypeCode;
382     }
383 
384 
385     /**
386      * Sets the financialObjectTypeCode attribute.
387      *
388      * @param financialObjectTypeCode The financialObjectTypeCode to set.
389      */
390     public void setFinancialObjectTypeCode(String financialObjectTypeCode) {
391         this.financialObjectTypeCode = financialObjectTypeCode;
392     }
393 
394     /**
395      * Gets the universityFiscalYear attribute.
396      *
397      * @return Returns the universityFiscalYear
398      */
399     @Override
400     public Integer getUniversityFiscalYear() {
401         return universityFiscalYear;
402     }
403 
404 
405     /**
406      * Sets the universityFiscalYear attribute.
407      *
408      * @param universityFiscalYear The universityFiscalYear to set.
409      */
410     public void setUniversityFiscalYear(Integer universityFiscalYear) {
411         this.universityFiscalYear = universityFiscalYear;
412     }
413 
414     /**
415      * Gets the universityFiscalPeriodCode attribute.
416      *
417      * @return Returns the universityFiscalPeriodCode
418      */
419     @Override
420     public String getUniversityFiscalPeriodCode() {
421         return universityFiscalPeriodCode;
422     }
423 
424     /**
425      * Sets the universityFiscalPeriodCode attribute.
426      *
427      * @param universityFiscalPeriodCode The universityFiscalPeriodCode to set.
428      */
429     public void setUniversityFiscalPeriodCode(String universityFiscalPeriodCode) {
430         this.universityFiscalPeriodCode = universityFiscalPeriodCode;
431     }
432 
433     /**
434      * Gets the transactionLedgerEntryDescription attribute.
435      *
436      * @return Returns the transactionLedgerEntryDescription
437      */
438     @Override
439     public String getTransactionLedgerEntryDescription() {
440         return transactionLedgerEntryDescription;
441     }
442 
443     /**
444      * Sets the transactionLedgerEntryDescription attribute.
445      *
446      * @param transactionLedgerEntryDescription The transactionLedgerEntryDescription to set.
447      */
448     public void setTransactionLedgerEntryDescription(String transactionLedgerEntryDescription) {
449         this.transactionLedgerEntryDescription = transactionLedgerEntryDescription;
450     }
451 
452     /**
453      * Gets the transactionLedgerEntryAmount attribute.
454      *
455      * @return Returns the transactionLedgerEntryAmount
456      */
457     @Override
458     public KualiDecimal getTransactionLedgerEntryAmount() {
459         return transactionLedgerEntryAmount;
460     }
461 
462     /**
463      * Sets the transactionLedgerEntryAmount attribute.
464      *
465      * @param transactionLedgerEntryAmount The transactionLedgerEntryAmount to set.
466      */
467     public void setTransactionLedgerEntryAmount(KualiDecimal transactionLedgerEntryAmount) {
468         this.transactionLedgerEntryAmount = transactionLedgerEntryAmount;
469     }
470 
471     /**
472      * Gets the transactionDebitCreditCode attribute.
473      *
474      * @return Returns the transactionDebitCreditCode
475      */
476     @Override
477     public String getTransactionDebitCreditCode() {
478         return transactionDebitCreditCode;
479     }
480 
481     /**
482      * Sets the transactionDebitCreditCode attribute.
483      *
484      * @param transactionDebitCreditCode The transactionDebitCreditCode to set.
485      */
486     public void setTransactionDebitCreditCode(String transactionDebitCreditCode) {
487         this.transactionDebitCreditCode = transactionDebitCreditCode;
488     }
489 
490     /**
491      * Gets the transactionDate attribute.
492      *
493      * @return Returns the transactionDate
494      */
495     @Override
496     public Date getTransactionDate() {
497         return transactionDate;
498     }
499 
500     /**
501      * Sets the transactionDate attribute.
502      *
503      * @param transactionDate The transactionDate to set.
504      */
505     public void setTransactionDate(Date transactionDate) {
506         this.transactionDate = transactionDate;
507     }
508 
509     /**
510      * Gets the financialDocumentTypeCode attribute.
511      *
512      * @return Returns the financialDocumentTypeCode
513      */
514     @Override
515     public String getFinancialDocumentTypeCode() {
516         return financialDocumentTypeCode;
517     }
518 
519     /**
520      * Sets the financialDocumentTypeCode attribute.
521      *
522      * @param financialDocumentTypeCode The financialDocumentTypeCode to set.
523      */
524     public void setFinancialDocumentTypeCode(String financialDocumentTypeCode) {
525         this.financialDocumentTypeCode = financialDocumentTypeCode;
526     }
527 
528     /**
529      * Gets the organizationDocumentNumber attribute.
530      *
531      * @return Returns the organizationDocumentNumber
532      */
533     @Override
534     public String getOrganizationDocumentNumber() {
535         return organizationDocumentNumber;
536     }
537 
538     /**
539      * Sets the organizationDocumentNumber attribute.
540      *
541      * @param organizationDocumentNumber The organizationDocumentNumber to set.
542      */
543     public void setOrganizationDocumentNumber(String organizationDocumentNumber) {
544         this.organizationDocumentNumber = organizationDocumentNumber;
545     }
546 
547     /**
548      * Gets the projectCode attribute.
549      *
550      * @return Returns the projectCode
551      */
552     @Override
553     public String getProjectCode() {
554         return projectCode;
555     }
556 
557     /**
558      * Sets the projectCode attribute.
559      *
560      * @param projectCode The projectCode to set.
561      */
562     public void setProjectCode(String projectCode) {
563         this.projectCode = projectCode;
564     }
565 
566     /**
567      * Gets the organizationReferenceId attribute.
568      *
569      * @return Returns the organizationReferenceId
570      */
571     @Override
572     public String getOrganizationReferenceId() {
573         return organizationReferenceId;
574     }
575 
576     /**
577      * Sets the organizationReferenceId attribute.
578      *
579      * @param organizationReferenceId The organizationReferenceId to set.
580      */
581     public void setOrganizationReferenceId(String organizationReferenceId) {
582         this.organizationReferenceId = organizationReferenceId;
583     }
584 
585     /**
586      * Gets the referenceFinancialDocumentTypeCode attribute.
587      *
588      * @return Returns the referenceFinancialDocumentTypeCode
589      */
590     @Override
591     public String getReferenceFinancialDocumentTypeCode() {
592         return referenceFinancialDocumentTypeCode;
593     }
594 
595     /**
596      * Sets the referenceFinancialDocumentTypeCode attribute.
597      *
598      * @param referenceFinancialDocumentTypeCode The referenceFinancialDocumentTypeCode to set.
599      */
600     public void setReferenceFinancialDocumentTypeCode(String referenceFinancialDocumentTypeCode) {
601         this.referenceFinancialDocumentTypeCode = referenceFinancialDocumentTypeCode;
602     }
603 
604     /**
605      * Gets the referenceFinancialSystemOriginationCode attribute.
606      *
607      * @return Returns the referenceFinancialSystemOriginationCode
608      */
609     @Override
610     public String getReferenceFinancialSystemOriginationCode() {
611         return referenceFinancialSystemOriginationCode;
612     }
613 
614     /**
615      * Sets the referenceFinancialSystemOriginationCode attribute.
616      *
617      * @param referenceFinancialSystemOriginationCode The referenceFinancialSystemOriginationCode to set.
618      */
619     public void setReferenceFinancialSystemOriginationCode(String referenceFinancialSystemOriginationCode) {
620         this.referenceFinancialSystemOriginationCode = referenceFinancialSystemOriginationCode;
621     }
622 
623     /**
624      * Gets the referenceFinancialDocumentNumber attribute.
625      *
626      * @return Returns the referenceFinancialDocumentNumber
627      */
628     @Override
629     public String getReferenceFinancialDocumentNumber() {
630         return referenceFinancialDocumentNumber;
631     }
632 
633     /**
634      * Sets the referenceFinancialDocumentNumber attribute.
635      *
636      * @param referenceFinancialDocumentNumber The referenceFinancialDocumentNumber to set.
637      */
638     public void setReferenceFinancialDocumentNumber(String referenceFinancialDocumentNumber) {
639         this.referenceFinancialDocumentNumber = referenceFinancialDocumentNumber;
640     }
641 
642     /**
643      * Gets the financialDocumentReversalDate attribute.
644      *
645      * @return Returns the financialDocumentReversalDate
646      */
647     @Override
648     public Date getFinancialDocumentReversalDate() {
649         return financialDocumentReversalDate;
650     }
651 
652     /**
653      * Sets the financialDocumentReversalDate attribute.
654      *
655      * @param financialDocumentReversalDate The financialDocumentReversalDate to set.
656      */
657     public void setFinancialDocumentReversalDate(Date financialDocumentReversalDate) {
658         this.financialDocumentReversalDate = financialDocumentReversalDate;
659     }
660 
661     /**
662      * Gets the transactionEncumbranceUpdateCode attribute.
663      *
664      * @return Returns the transactionEncumbranceUpdateCode
665      */
666     @Override
667     public String getTransactionEncumbranceUpdateCode() {
668         return transactionEncumbranceUpdateCode;
669     }
670 
671     /**
672      * Sets the transactionEncumbranceUpdateCode attribute.
673      *
674      * @param transactionEncumbranceUpdateCode The transactionEncumbranceUpdateCode to set.
675      */
676     public void setTransactionEncumbranceUpdateCode(String transactionEncumbranceUpdateCode) {
677         this.transactionEncumbranceUpdateCode = transactionEncumbranceUpdateCode;
678     }
679 
680     /**
681      * Gets the financialDocumentApprovedCode attribute.
682      *
683      * @return Returns the financialDocumentApprovedCode
684      */
685     public String getFinancialDocumentApprovedCode() {
686         return financialDocumentApprovedCode;
687     }
688 
689 
690     /**
691      * Sets the financialDocumentApprovedCode attribute.
692      *
693      * @param financialDocumentApprovedCode The financialDocumentApprovedCode to set.
694      */
695     public void setFinancialDocumentApprovedCode(String financialDocumentApprovedCode) {
696         this.financialDocumentApprovedCode = financialDocumentApprovedCode;
697     }
698 
699     /**
700      * Gets the acctSufficientFundsFinObjCd attribute.
701      *
702      * @return Returns the acctSufficientFundsFinObjCd
703      */
704     public String getAcctSufficientFundsFinObjCd() {
705         return acctSufficientFundsFinObjCd;
706     }
707 
708     /**
709      * Sets the acctSufficientFundsFinObjCd attribute.
710      *
711      * @param acctSufficientFundsFinObjCd The acctSufficientFundsFinObjCd to set.
712      */
713     public void setAcctSufficientFundsFinObjCd(String acctSufficientFundsFinObjCd) {
714         this.acctSufficientFundsFinObjCd = acctSufficientFundsFinObjCd;
715     }
716 
717     /**
718      * Gets the transactionEntryOffsetIndicator attribute.
719      *
720      * @return Returns the transactionEntryOffsetIndicator
721      */
722     public boolean isTransactionEntryOffsetIndicator() {
723         return transactionEntryOffsetIndicator;
724     }
725 
726     /**
727      * Sets the transactionEntryOffsetIndicator attribute.
728      *
729      * @param transactionEntryOffsetIndicator The transactionEntryOffsetIndicator to set.
730      */
731     public void setTransactionEntryOffsetIndicator(boolean transactionEntryOffsetIndicator) {
732         this.transactionEntryOffsetIndicator = transactionEntryOffsetIndicator;
733     }
734 
735     /**
736      * Gets the transactionEntryProcessedTs attribute.
737      *
738      * @return Returns the transactionEntryProcessedTs
739      */
740     public Timestamp getTransactionEntryProcessedTs() {
741         return transactionEntryProcessedTs;
742     }
743 
744     /**
745      * Sets the transactionEntryProcessedTs attribute.
746      *
747      * @param transactionEntryProcessedTs The transactionEntryProcessedTs to set.
748      */
749     public void setTransactionEntryProcessedTs(Timestamp transactionEntryProcessedTs) {
750         this.transactionEntryProcessedTs = transactionEntryProcessedTs;
751     }
752 
753     /**
754      * @return Returns the financialSystemOriginationCode.
755      */
756     @Override
757     public String getFinancialSystemOriginationCode() {
758         return financialSystemOriginationCode;
759     }
760 
761     /**
762      * @param financialSystemOriginationCode The financialSystemOriginationCode to set.
763      */
764     public void setFinancialSystemOriginationCode(String financialSystemOriginationCode) {
765         this.financialSystemOriginationCode = financialSystemOriginationCode;
766     }
767 
768     /**
769      * @see org.kuali.rice.krad.bo.BusinessObjectBase#toStringMapper()
770      */
771     protected LinkedHashMap toStringMapper_RICE20_REFACTORME() {
772         LinkedHashMap m = new LinkedHashMap();
773         m.put("financialSystemOriginationCode", this.financialSystemOriginationCode);
774         m.put(KFSPropertyConstants.DOCUMENT_NUMBER, this.documentNumber);
775         if (transactionLedgerEntrySequenceNumber == null) {
776             m.put("transactionLedgerEntrySequenceNumber", null);
777         }
778         else {
779             m.put("transactionLedgerEntrySequenceNumber", this.transactionLedgerEntrySequenceNumber.toString());
780         }
781         return m;
782     }
783 
784     /**
785      * Gets the financialSystemDocumentTypeCode attribute.
786      * @return Returns the financialSystemDocumentTypeCode.
787      */
788     @Override
789     public DocumentTypeEBO getFinancialSystemDocumentTypeCode() {
790         if ( StringUtils.isBlank( financialDocumentTypeCode ) ) {
791             financialSystemDocumentTypeCode = null;
792         } else {
793             if ( financialSystemDocumentTypeCode == null || !StringUtils.equals(financialDocumentTypeCode, financialSystemDocumentTypeCode.getName() ) ) {
794                 org.kuali.rice.kew.api.doctype.DocumentType temp = SpringContext.getBean(DocumentTypeService.class).getDocumentTypeByName(financialDocumentTypeCode);
795                 if ( temp != null ) {
796                     financialSystemDocumentTypeCode = DocumentType.from( temp );
797                 } else {
798                     financialSystemDocumentTypeCode = null;
799                 }
800             }
801         }
802         return financialSystemDocumentTypeCode;
803     }
804 
805     /**
806      * Gets the documentHeader attribute.
807      *
808      * @return Returns the documentHeader.
809      */
810     public FinancialSystemDocumentHeader getDocumentHeader() {
811         return documentHeader;
812     }
813 
814     /**
815      * Sets the documentHeader attribute value.
816      *
817      * @param documentHeader The documentHeader to set.
818      */
819     public void setDocumentHeader(FinancialSystemDocumentHeader documentHeader) {
820         this.documentHeader = documentHeader;
821     }
822 
823     /**
824      * Gets the account attribute.
825      *
826      * @return Returns the account.
827      */
828     @Override
829     public Account getAccount() {
830         return account;
831     }
832 
833     /**
834      * Sets the account attribute value.
835      *
836      * @param account The account to set.
837      */
838     @Override
839     public void setAccount(Account account) {
840         this.account = account;
841     }
842 
843     /**
844      * Gets the balanceType attribute.
845      *
846      * @return Returns the balanceType.
847      */
848     @Override
849     public BalanceType getBalanceType() {
850         return balanceType;
851     }
852 
853     /**
854      * Sets the balanceType attribute value.
855      *
856      * @param balanceType The balanceType to set.
857      */
858     @Override
859     public void setBalanceType(BalanceType balanceType) {
860         this.balanceType = balanceType;
861     }
862 
863     /**
864      * Gets the chart attribute.
865      *
866      * @return Returns the chart.
867      */
868     @Override
869     public Chart getChart() {
870         return chart;
871     }
872 
873     /**
874      * Sets the chart attribute value.
875      *
876      * @param chart The chart to set.
877      */
878     @Override
879     public void setChart(Chart chart) {
880         this.chart = chart;
881     }
882 
883     /**
884      * Gets the financialObject attribute.
885      *
886      * @return Returns the financialObject.
887      */
888     @Override
889     public ObjectCode getFinancialObject() {
890         return financialObject;
891     }
892 
893     /**
894      * Sets the financialObject attribute value.
895      *
896      * @param financialObject The financialObject to set.
897      */
898     @Override
899     public void setFinancialObject(ObjectCode financialObject) {
900         this.financialObject = financialObject;
901     }
902 
903     /**
904      * Gets the objectType attribute.
905      *
906      * @return Returns the objectType.
907      */
908     @Override
909     public ObjectType getObjectType() {
910         return objectType;
911     }
912 
913     /**
914      * Sets the objectType attribute value.
915      *
916      * @param objectType The objectType to set.
917      */
918     @Override
919     public void setObjectType(ObjectType objectType) {
920         this.objectType = objectType;
921     }
922 
923     /**
924      * Gets the a21SubAccount attribute.
925      *
926      * @return Returns the a21SubAccount.
927      */
928     public A21SubAccount getA21SubAccount() {
929         return this.a21SubAccount;
930     }
931 
932     /**
933      * Sets the a21SubAccount attribute value.
934      *
935      * @param a21SubAccount The a21SubAccount to set.
936      */
937     public void setA21SubAccount(A21SubAccount a21SubAccount) {
938         this.a21SubAccount = a21SubAccount;
939     }
940 
941     /**
942      * Gets the dummyBusinessObject attribute.
943      *
944      * @return Returns the dummyBusinessObject.
945      */
946     public TransientBalanceInquiryAttributes getDummyBusinessObject() {
947         return this.dummyBusinessObject;
948     }
949 
950     /**
951      * Sets the dummyBusinessObject attribute value.
952      *
953      * @param dummyBusinessObject The dummyBusinessObject to set.
954      */
955     public void setDummyBusinessObject(TransientBalanceInquiryAttributes dummyBusinessObject) {
956         this.dummyBusinessObject = dummyBusinessObject;
957     }
958 
959     @Override
960     public SubAccount getSubAccount() {
961         return subAccount;
962     }
963 
964     public void setSubAccount(SubAccount subAccount) {
965         this.subAccount = subAccount;
966     }
967 
968     @Override
969     public SubObjectCode getFinancialSubObject() {
970         return financialSubObject;
971     }
972 
973     public void setFinancialSubObject(SubObjectCode financialSubObject) {
974         this.financialSubObject = financialSubObject;
975     }
976 
977     public boolean isSubAccountNumberBlank() {
978         return subAccountNumber == null || GENERAL_LEDGER_PENDING_ENTRY_CODE.getBlankSubAccountNumber().equals(subAccountNumber);
979     }
980 
981     public boolean isFinancialObjectCodeBlank() {
982         return financialObjectCode == null || GENERAL_LEDGER_PENDING_ENTRY_CODE.getBlankFinancialObjectCode().equals(financialObjectCode);
983     }
984 
985     public boolean isFinancialSubObjectCodeBlank() {
986         return financialSubObjectCode == null || GENERAL_LEDGER_PENDING_ENTRY_CODE.getBlankFinancialSubObjectCode().equals(financialSubObjectCode);
987     }
988 
989     public boolean isProjectCodeBlank() {
990         return projectCode == null || GENERAL_LEDGER_PENDING_ENTRY_CODE.getBlankProjectCode().equals(projectCode);
991     }
992 
993     public boolean isFinancialObjectTypeCodeBlank() {
994         return financialObjectTypeCode == null || GENERAL_LEDGER_PENDING_ENTRY_CODE.getBlankFinancialObjectType().equals(financialObjectTypeCode);
995     }
996 
997     @Deprecated
998     public AccountingPeriod getAccountingPeriod() {
999         return accountingPeriod;
1000     }
1001 
1002     @Deprecated
1003     public void setAccountingPeriod(AccountingPeriod accountingPeriod) {
1004         this.accountingPeriod = accountingPeriod;
1005     }
1006 
1007     /**
1008      * @return the amount formatted as a currency number
1009      */
1010     public String getCurrencyFormattedTransactionLedgerEntryAmount() {
1011         return (String) new CurrencyFormatter().format(getTransactionLedgerEntryAmount());
1012     }
1013 }