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