001    /*
002     * Copyright 2011 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    package org.kuali.kfs.module.cam.businessobject;
017    
018    import java.sql.Date;
019    import java.util.LinkedHashMap;
020    
021    import org.kuali.kfs.coa.businessobject.Account;
022    import org.kuali.kfs.coa.businessobject.AccountingPeriod;
023    import org.kuali.kfs.coa.businessobject.Chart;
024    import org.kuali.kfs.coa.businessobject.ObjectCode;
025    import org.kuali.kfs.coa.businessobject.ProjectCode;
026    import org.kuali.kfs.coa.businessobject.SubAccount;
027    import org.kuali.kfs.coa.businessobject.SubObjectCode;
028    import org.kuali.kfs.module.cam.CamsConstants;
029    import org.kuali.kfs.module.cam.document.service.AssetGlobalService;
030    import org.kuali.kfs.sys.businessobject.OriginationCode;
031    import org.kuali.kfs.sys.businessobject.SystemOptions;
032    import org.kuali.kfs.sys.context.SpringContext;
033    import org.kuali.kfs.sys.service.UniversityDateService;
034    import org.kuali.rice.kew.doctype.bo.DocumentTypeEBO;
035    import org.kuali.rice.kew.service.impl.KEWModuleService;
036    import org.kuali.rice.kns.bo.DocumentHeader;
037    import org.kuali.rice.kns.bo.PersistableBusinessObjectBase;
038    import org.kuali.rice.kns.util.KualiDecimal;
039    
040    /**
041     * @author Kuali Nervous System Team (kualidev@oncourse.iu.edu)
042     */
043    public class AssetPayment extends PersistableBusinessObjectBase {
044    
045        private Long capitalAssetNumber;
046        private Integer paymentSequenceNumber;
047        private String chartOfAccountsCode;
048        private String accountNumber;
049        private String subAccountNumber;
050        private String financialObjectCode;
051        private String financialSubObjectCode;
052        private String financialSystemOriginationCode;
053        private String financialDocumentTypeCode;
054        private String documentNumber;
055        private Integer financialDocumentPostingYear;
056        private String financialDocumentPostingPeriodCode;
057        private Date financialDocumentPostingDate;
058        private String projectCode;
059        private String organizationReferenceId;
060        private KualiDecimal accountChargeAmount;
061        private String purchaseOrderNumber;
062        private String requisitionNumber;
063        private KualiDecimal primaryDepreciationBaseAmount;
064        private KualiDecimal accumulatedPrimaryDepreciationAmount;
065        private KualiDecimal previousYearPrimaryDepreciationAmount;
066        private KualiDecimal period1Depreciation1Amount;
067        private KualiDecimal period2Depreciation1Amount;
068        private KualiDecimal period3Depreciation1Amount;
069        private KualiDecimal period4Depreciation1Amount;
070        private KualiDecimal period5Depreciation1Amount;
071        private KualiDecimal period6Depreciation1Amount;
072        private KualiDecimal period7Depreciation1Amount;
073        private KualiDecimal period8Depreciation1Amount;
074        private KualiDecimal period9Depreciation1Amount;
075        private KualiDecimal period10Depreciation1Amount;
076        private KualiDecimal period11Depreciation1Amount;
077        private KualiDecimal period12Depreciation1Amount;
078        private String transferPaymentCode;
079    
080        private Asset asset;
081        private Chart chartOfAccounts;
082        private SubAccount subAccount;
083        private ObjectCode financialObject;
084        private Account account;
085        private SubObjectCode financialSubObject;
086        private ProjectCode project;
087        private AccountingPeriod financialDocumentPostingPeriod;
088        private DocumentTypeEBO financialSystemDocumentTypeCode;
089        private DocumentHeader documentHeader;
090        private OriginationCode financialSystemOrigination;
091        private SystemOptions option;
092    
093        // Non-persisted attributes:
094        private KualiDecimal yearToDate;
095    
096        /**
097         * Default constructor.
098         */
099        public AssetPayment() {}
100    
101        /**
102         * Constructs an AssetPayment
103         * 
104         * @param assetPaymentDetail
105         * @param withAmounts indicates whether amount fields should be copied from the assetPayment object
106         */
107        public AssetPayment(AssetPayment assetPayment, boolean withAmounts) {
108            setCapitalAssetNumber(assetPayment.getCapitalAssetNumber());
109            setPaymentSequenceNumber(assetPayment.getPaymentSequenceNumber());
110            setChartOfAccountsCode(assetPayment.getChartOfAccountsCode());
111            setAccountNumber(assetPayment.getAccountNumber());
112            setSubAccountNumber(assetPayment.getSubAccountNumber());
113            setFinancialObjectCode(assetPayment.getFinancialObjectCode());
114            setFinancialSubObjectCode(assetPayment.getFinancialSubObjectCode());
115            setFinancialSystemOriginationCode(assetPayment.getFinancialSystemOriginationCode());
116            setFinancialDocumentTypeCode(assetPayment.getFinancialDocumentTypeCode());
117            setDocumentNumber(assetPayment.getDocumentNumber());
118            setFinancialDocumentPostingYear(assetPayment.getFinancialDocumentPostingYear());
119            setFinancialDocumentPostingPeriodCode(assetPayment.getFinancialDocumentPostingPeriodCode());
120            setFinancialDocumentPostingDate(assetPayment.getFinancialDocumentPostingDate());
121            setProjectCode(assetPayment.getProjectCode());
122            setOrganizationReferenceId(assetPayment.getOrganizationReferenceId());
123            setPurchaseOrderNumber(assetPayment.getPurchaseOrderNumber());
124            setRequisitionNumber(assetPayment.getRequisitionNumber());
125            setTransferPaymentCode(assetPayment.getTransferPaymentCode());
126            
127            if (withAmounts) {
128                setAccountChargeAmount(assetPayment.getAccountChargeAmount());
129                setPrimaryDepreciationBaseAmount(assetPayment.getPrimaryDepreciationBaseAmount());
130                setAccumulatedPrimaryDepreciationAmount(assetPayment.getAccumulatedPrimaryDepreciationAmount());
131                setPreviousYearPrimaryDepreciationAmount(assetPayment.getPreviousYearPrimaryDepreciationAmount());
132                setPeriod1Depreciation1Amount(assetPayment.getPeriod1Depreciation1Amount());
133                setPeriod2Depreciation1Amount(assetPayment.getPeriod2Depreciation1Amount());
134                setPeriod3Depreciation1Amount(assetPayment.getPeriod3Depreciation1Amount());
135                setPeriod4Depreciation1Amount(assetPayment.getPeriod4Depreciation1Amount());
136                setPeriod5Depreciation1Amount(assetPayment.getPeriod5Depreciation1Amount());
137                setPeriod6Depreciation1Amount(assetPayment.getPeriod6Depreciation1Amount());
138                setPeriod7Depreciation1Amount(assetPayment.getPeriod7Depreciation1Amount());
139                setPeriod8Depreciation1Amount(assetPayment.getPeriod8Depreciation1Amount());
140                setPeriod9Depreciation1Amount(assetPayment.getPeriod9Depreciation1Amount());
141                setPeriod10Depreciation1Amount(assetPayment.getPeriod10Depreciation1Amount());
142                setPeriod11Depreciation1Amount(assetPayment.getPeriod11Depreciation1Amount());
143                setPeriod12Depreciation1Amount(assetPayment.getPeriod12Depreciation1Amount());
144            }
145        }
146        
147        /**
148         * Constructs a AssetPayment for use with Asset Payment
149         * 
150         * @param assetPaymentDetail
151         */
152        public AssetPayment(AssetPaymentDetail assetPaymentDetail) {
153            setChartOfAccountsCode(assetPaymentDetail.getChartOfAccountsCode());
154            setAccountNumber(assetPaymentDetail.getAccountNumber());
155            setSubAccountNumber(assetPaymentDetail.getSubAccountNumber());
156            setFinancialObjectCode(assetPaymentDetail.getFinancialObjectCode());
157            setFinancialSubObjectCode(assetPaymentDetail.getFinancialSubObjectCode());
158            setFinancialSystemOriginationCode(assetPaymentDetail.getExpenditureFinancialSystemOriginationCode());
159            setFinancialDocumentTypeCode(assetPaymentDetail.getExpenditureFinancialDocumentTypeCode());
160            setDocumentNumber(assetPaymentDetail.getExpenditureFinancialDocumentNumber());
161            setFinancialDocumentPostingYear(assetPaymentDetail.getPostingYear());
162            setFinancialDocumentPostingPeriodCode(assetPaymentDetail.getPostingPeriodCode());
163            setFinancialDocumentPostingDate(assetPaymentDetail.getExpenditureFinancialDocumentPostedDate());        
164            setProjectCode(assetPaymentDetail.getProjectCode());
165            setOrganizationReferenceId(assetPaymentDetail.getOrganizationReferenceId());
166            setPurchaseOrderNumber(assetPaymentDetail.getPurchaseOrderNumber());
167            setRequisitionNumber(assetPaymentDetail.getRequisitionNumber());
168        }
169        
170        /**
171         * Constructs a AssetPayment for use with Asset Separate
172         * 
173         * @param assetPaymentDetail
174         * @param acquisitionTypeCode
175         */
176        public AssetPayment(AssetPaymentDetail assetPaymentDetail, String acquisitionTypeCode) {
177            this(assetPaymentDetail);
178    
179            AssetGlobalService assetGlobalService = SpringContext.getBean(AssetGlobalService.class);
180            if (assetGlobalService.getNewAcquisitionTypeCode().equals(acquisitionTypeCode)) {
181                setFinancialDocumentPostingDate(assetPaymentDetail.getExpenditureFinancialDocumentPostedDate());
182                setFinancialDocumentPostingYear(assetPaymentDetail.getPostingYear());
183                setFinancialDocumentPostingPeriodCode(assetPaymentDetail.getPostingPeriodCode());
184            }
185            else {
186                UniversityDateService universityDateService = SpringContext.getBean(UniversityDateService.class);
187    
188                setFinancialDocumentPostingDate(universityDateService.getCurrentUniversityDate().getUniversityDate());
189                setFinancialDocumentPostingYear(universityDateService.getCurrentUniversityDate().getUniversityFiscalYear());
190                setFinancialDocumentPostingPeriodCode(universityDateService.getCurrentUniversityDate().getUniversityFiscalAccountingPeriod());
191            }
192        }
193        
194        /**
195         * Gets the capitalAssetNumber attribute.
196         * 
197         * @return Returns the capitalAssetNumber
198         * 
199         */
200        public Long getCapitalAssetNumber() {
201            return capitalAssetNumber;
202        }
203    
204        /**
205         * Sets the capitalAssetNumber attribute.
206         * 
207         * @param capitalAssetNumber The capitalAssetNumber to set.
208         * 
209         */
210        public void setCapitalAssetNumber(Long capitalAssetNumber) {
211            this.capitalAssetNumber = capitalAssetNumber;
212        }
213    
214    
215        /**
216         * Gets the paymentSequenceNumber attribute.
217         * 
218         * @return Returns the paymentSequenceNumber
219         * 
220         */
221        public Integer getPaymentSequenceNumber() {
222            return paymentSequenceNumber;
223        }
224    
225        /**
226         * Sets the paymentSequenceNumber attribute.
227         * 
228         * @param paymentSequenceNumber The paymentSequenceNumber to set.
229         * 
230         */
231        public void setPaymentSequenceNumber(Integer paymentSequenceNumber) {
232            this.paymentSequenceNumber = paymentSequenceNumber;
233        }
234    
235    
236        /**
237         * Gets the chartOfAccountsCode attribute.
238         * 
239         * @return Returns the chartOfAccountsCode
240         * 
241         */
242        public String getChartOfAccountsCode() {
243            return chartOfAccountsCode;
244        }
245    
246        /**
247         * Sets the chartOfAccountsCode attribute.
248         * 
249         * @param chartOfAccountsCode The chartOfAccountsCode to set.
250         * 
251         */
252        public void setChartOfAccountsCode(String chartOfAccountsCode) {
253            this.chartOfAccountsCode = chartOfAccountsCode;
254        }
255    
256    
257        /**
258         * Gets the accountNumber attribute.
259         * 
260         * @return Returns the accountNumber
261         * 
262         */
263        public String getAccountNumber() {
264            return accountNumber;
265        }
266    
267        /**
268         * Sets the accountNumber attribute.
269         * 
270         * @param accountNumber The accountNumber to set.
271         * 
272         */
273        public void setAccountNumber(String accountNumber) {
274            this.accountNumber = accountNumber;
275        }
276    
277    
278        /**
279         * Gets the subAccountNumber attribute.
280         * 
281         * @return Returns the subAccountNumber
282         * 
283         */
284        public String getSubAccountNumber() {
285            return subAccountNumber;
286        }
287    
288        /**
289         * Sets the subAccountNumber attribute.
290         * 
291         * @param subAccountNumber The subAccountNumber to set.
292         * 
293         */
294        public void setSubAccountNumber(String subAccountNumber) {
295            this.subAccountNumber = subAccountNumber;
296        }
297    
298    
299        /**
300         * Gets the financialObjectCode attribute.
301         * 
302         * @return Returns the financialObjectCode
303         * 
304         */
305        public String getFinancialObjectCode() {
306            return financialObjectCode;
307        }
308    
309        /**
310         * Sets the financialObjectCode attribute.
311         * 
312         * @param financialObjectCode The financialObjectCode to set.
313         * 
314         */
315        public void setFinancialObjectCode(String financialObjectCode) {
316            this.financialObjectCode = financialObjectCode;
317        }
318    
319    
320        /**
321         * Gets the financialSubObjectCode attribute.
322         * 
323         * @return Returns the financialSubObjectCode
324         * 
325         */
326        public String getFinancialSubObjectCode() {
327            return financialSubObjectCode;
328        }
329    
330        /**
331         * Sets the financialSubObjectCode attribute.
332         * 
333         * @param financialSubObjectCode The financialSubObjectCode to set.
334         * 
335         */
336        public void setFinancialSubObjectCode(String financialSubObjectCode) {
337            this.financialSubObjectCode = financialSubObjectCode;
338        }
339    
340    
341        /**
342         * Gets the financialSystemOriginationCode attribute.
343         * 
344         * @return Returns the financialSystemOriginationCode
345         * 
346         */
347        public String getFinancialSystemOriginationCode() {
348            return financialSystemOriginationCode;
349        }
350    
351        /**
352         * Sets the financialSystemOriginationCode attribute.
353         * 
354         * @param financialSystemOriginationCode The financialSystemOriginationCode to set.
355         * 
356         */
357        public void setFinancialSystemOriginationCode(String financialSystemOriginationCode) {
358            this.financialSystemOriginationCode = financialSystemOriginationCode;
359        }
360    
361    
362        /**
363         * Gets the financialDocumentTypeCode attribute.
364         * 
365         * @return Returns the financialDocumentTypeCode
366         * 
367         */
368        public String getFinancialDocumentTypeCode() {
369            return financialDocumentTypeCode;
370        }
371    
372        /**
373         * Sets the financialDocumentTypeCode attribute.
374         * 
375         * @param financialDocumentTypeCode The financialDocumentTypeCode to set.
376         * 
377         */
378        public void setFinancialDocumentTypeCode(String financialDocumentTypeCode) {
379            this.financialDocumentTypeCode = financialDocumentTypeCode;
380        }
381    
382    
383        /**
384         * Gets the documentNumber attribute.
385         * 
386         * @return Returns the documentNumber
387         * 
388         */
389        public String getDocumentNumber() {
390            return documentNumber;
391        }
392    
393        /**
394         * Sets the documentNumber attribute.
395         * 
396         * @param documentNumber The documentNumber to set.
397         * 
398         */
399        public void setDocumentNumber(String documentNumber) {
400            this.documentNumber = documentNumber;
401        }
402    
403    
404        /**
405         * Gets the financialDocumentPostingYear attribute.
406         * 
407         * @return Returns the financialDocumentPostingYear
408         * 
409         */
410        public Integer getFinancialDocumentPostingYear() {
411            return financialDocumentPostingYear;
412        }
413    
414        /**
415         * Sets the financialDocumentPostingYear attribute.
416         * 
417         * @param financialDocumentPostingYear The financialDocumentPostingYear to set.
418         * 
419         */
420        public void setFinancialDocumentPostingYear(Integer financialDocumentPostingYear) {
421            this.financialDocumentPostingYear = financialDocumentPostingYear;
422        }
423    
424    
425        /**
426         * Gets the financialDocumentPostingPeriodCode attribute.
427         * 
428         * @return Returns the financialDocumentPostingPeriodCode
429         * 
430         */
431        public String getFinancialDocumentPostingPeriodCode() {
432            return financialDocumentPostingPeriodCode;
433        }
434    
435        /**
436         * Sets the financialDocumentPostingPeriodCode attribute.
437         * 
438         * @param financialDocumentPostingPeriodCode The financialDocumentPostingPeriodCode to set.
439         * 
440         */
441        public void setFinancialDocumentPostingPeriodCode(String financialDocumentPostingPeriodCode) {
442            this.financialDocumentPostingPeriodCode = financialDocumentPostingPeriodCode;
443        }
444    
445    
446        /**
447         * Gets the financialDocumentPostingDate attribute.
448         * 
449         * @return Returns the financialDocumentPostingDate
450         * 
451         */
452        public Date getFinancialDocumentPostingDate() {
453            return financialDocumentPostingDate;
454        }
455    
456        /**
457         * Sets the financialDocumentPostingDate attribute.
458         * 
459         * @param financialDocumentPostingDate The financialDocumentPostingDate to set.
460         * 
461         */
462        public void setFinancialDocumentPostingDate(Date financialDocumentPostingDate) {
463            this.financialDocumentPostingDate = financialDocumentPostingDate;
464        }
465    
466    
467        /**
468         * Gets the projectCode attribute.
469         * 
470         * @return Returns the projectCode
471         * 
472         */
473        public String getProjectCode() {
474            return projectCode;
475        }
476    
477        /**
478         * Sets the projectCode attribute.
479         * 
480         * @param projectCode The projectCode to set.
481         * 
482         */
483        public void setProjectCode(String projectCode) {
484            this.projectCode = projectCode;
485        }
486    
487    
488        /**
489         * Gets the organizationReferenceId attribute.
490         * 
491         * @return Returns the organizationReferenceId
492         * 
493         */
494        public String getOrganizationReferenceId() {
495            return organizationReferenceId;
496        }
497    
498        /**
499         * Sets the organizationReferenceId attribute.
500         * 
501         * @param organizationReferenceId The organizationReferenceId to set.
502         * 
503         */
504        public void setOrganizationReferenceId(String organizationReferenceId) {
505            this.organizationReferenceId = organizationReferenceId;
506        }
507    
508    
509        /**
510         * Gets the accountChargeAmount attribute.
511         * 
512         * @return Returns the accountChargeAmount
513         * 
514         */
515        public KualiDecimal getAccountChargeAmount() {
516            return accountChargeAmount;
517        }
518    
519        /**
520         * Sets the accountChargeAmount attribute.
521         * 
522         * @param accountChargeAmount The accountChargeAmount to set.
523         * 
524         */
525        public void setAccountChargeAmount(KualiDecimal accountChargeAmount) {
526            this.accountChargeAmount = accountChargeAmount;
527        }
528    
529    
530        /**
531         * Gets the purchaseOrderNumber attribute.
532         * 
533         * @return Returns the purchaseOrderNumber
534         * 
535         */
536        public String getPurchaseOrderNumber() {
537            return purchaseOrderNumber;
538        }
539    
540        /**
541         * Sets the purchaseOrderNumber attribute.
542         * 
543         * @param purchaseOrderNumber The purchaseOrderNumber to set.
544         * 
545         */
546        public void setPurchaseOrderNumber(String purchaseOrderNumber) {
547            this.purchaseOrderNumber = purchaseOrderNumber;
548        }
549    
550    
551        /**
552         * Gets the requisitionNumber attribute.
553         * 
554         * @return Returns the requisitionNumber
555         * 
556         */
557        public String getRequisitionNumber() {
558            return requisitionNumber;
559        }
560    
561        /**
562         * Sets the requisitionNumber attribute.
563         * 
564         * @param requisitionNumber The requisitionNumber to set.
565         * 
566         */
567        public void setRequisitionNumber(String requisitionNumber) {
568            this.requisitionNumber = requisitionNumber;
569        }
570    
571    
572        /**
573         * Gets the primaryDepreciationBaseAmount attribute.
574         * 
575         * @return Returns the primaryDepreciationBaseAmount
576         * 
577         */
578        public KualiDecimal getPrimaryDepreciationBaseAmount() {
579            return primaryDepreciationBaseAmount;
580        }
581    
582        /**
583         * Sets the primaryDepreciationBaseAmount attribute.
584         * 
585         * @param primaryDepreciationBaseAmount The primaryDepreciationBaseAmount to set.
586         * 
587         */
588        public void setPrimaryDepreciationBaseAmount(KualiDecimal primaryDepreciationBaseAmount) {
589            this.primaryDepreciationBaseAmount = primaryDepreciationBaseAmount;
590        }
591    
592    
593        /**
594         * Gets the accumulatedPrimaryDepreciationAmount attribute.
595         * 
596         * @return Returns the accumulatedPrimaryDepreciationAmount
597         * 
598         */
599        public KualiDecimal getAccumulatedPrimaryDepreciationAmount() {
600            return accumulatedPrimaryDepreciationAmount;
601        }
602    
603        /**
604         * Sets the accumulatedPrimaryDepreciationAmount attribute.
605         * 
606         * @param accumulatedPrimaryDepreciationAmount The accumulatedPrimaryDepreciationAmount to set.
607         * 
608         */
609        public void setAccumulatedPrimaryDepreciationAmount(KualiDecimal accumulatedPrimaryDepreciationAmount) {
610            this.accumulatedPrimaryDepreciationAmount = accumulatedPrimaryDepreciationAmount;
611        }
612    
613    
614        /**
615         * Gets the previousYearPrimaryDepreciationAmount attribute.
616         * 
617         * @return Returns the previousYearPrimaryDepreciationAmount
618         * 
619         */
620        public KualiDecimal getPreviousYearPrimaryDepreciationAmount() {
621            return previousYearPrimaryDepreciationAmount;
622        }
623    
624        /**
625         * Sets the previousYearPrimaryDepreciationAmount attribute.
626         * 
627         * @param previousYearPrimaryDepreciationAmount The previousYearPrimaryDepreciationAmount to set.
628         * 
629         */
630        public void setPreviousYearPrimaryDepreciationAmount(KualiDecimal previousYearPrimaryDepreciationAmount) {
631            this.previousYearPrimaryDepreciationAmount = previousYearPrimaryDepreciationAmount;
632        }
633    
634    
635        /**
636         * Gets the period1Depreciation1Amount attribute.
637         * 
638         * @return Returns the period1Depreciation1Amount
639         * 
640         */
641        public KualiDecimal getPeriod1Depreciation1Amount() {
642            return period1Depreciation1Amount;
643        }
644    
645        /**
646         * Sets the period1Depreciation1Amount attribute.
647         * 
648         * @param period1Depreciation1Amount The period1Depreciation1Amount to set.
649         * 
650         */
651        public void setPeriod1Depreciation1Amount(KualiDecimal period1Depreciation1Amount) {
652            this.period1Depreciation1Amount = period1Depreciation1Amount;
653        }
654    
655    
656        /**
657         * Gets the period2Depreciation1Amount attribute.
658         * 
659         * @return Returns the period2Depreciation1Amount
660         * 
661         */
662        public KualiDecimal getPeriod2Depreciation1Amount() {
663            return period2Depreciation1Amount;
664        }
665    
666        /**
667         * Sets the period2Depreciation1Amount attribute.
668         * 
669         * @param period2Depreciation1Amount The period2Depreciation1Amount to set.
670         * 
671         */
672        public void setPeriod2Depreciation1Amount(KualiDecimal period2Depreciation1Amount) {
673            this.period2Depreciation1Amount = period2Depreciation1Amount;
674        }
675    
676    
677        /**
678         * Gets the period3Depreciation1Amount attribute.
679         * 
680         * @return Returns the period3Depreciation1Amount
681         * 
682         */
683        public KualiDecimal getPeriod3Depreciation1Amount() {
684            return period3Depreciation1Amount;
685        }
686    
687        /**
688         * Sets the period3Depreciation1Amount attribute.
689         * 
690         * @param period3Depreciation1Amount The period3Depreciation1Amount to set.
691         * 
692         */
693        public void setPeriod3Depreciation1Amount(KualiDecimal period3Depreciation1Amount) {
694            this.period3Depreciation1Amount = period3Depreciation1Amount;
695        }
696    
697    
698        /**
699         * Gets the period4Depreciation1Amount attribute.
700         * 
701         * @return Returns the period4Depreciation1Amount
702         * 
703         */
704        public KualiDecimal getPeriod4Depreciation1Amount() {
705            return period4Depreciation1Amount;
706        }
707    
708        /**
709         * Sets the period4Depreciation1Amount attribute.
710         * 
711         * @param period4Depreciation1Amount The period4Depreciation1Amount to set.
712         * 
713         */
714        public void setPeriod4Depreciation1Amount(KualiDecimal period4Depreciation1Amount) {
715            this.period4Depreciation1Amount = period4Depreciation1Amount;
716        }
717    
718    
719        /**
720         * Gets the period5Depreciation1Amount attribute.
721         * 
722         * @return Returns the period5Depreciation1Amount
723         * 
724         */
725        public KualiDecimal getPeriod5Depreciation1Amount() {
726            return period5Depreciation1Amount;
727        }
728    
729        /**
730         * Sets the period5Depreciation1Amount attribute.
731         * 
732         * @param period5Depreciation1Amount The period5Depreciation1Amount to set.
733         * 
734         */
735        public void setPeriod5Depreciation1Amount(KualiDecimal period5Depreciation1Amount) {
736            this.period5Depreciation1Amount = period5Depreciation1Amount;
737        }
738    
739    
740        /**
741         * Gets the period6Depreciation1Amount attribute.
742         * 
743         * @return Returns the period6Depreciation1Amount
744         * 
745         */
746        public KualiDecimal getPeriod6Depreciation1Amount() {
747            return period6Depreciation1Amount;
748        }
749    
750        /**
751         * Sets the period6Depreciation1Amount attribute.
752         * 
753         * @param period6Depreciation1Amount The period6Depreciation1Amount to set.
754         * 
755         */
756        public void setPeriod6Depreciation1Amount(KualiDecimal period6Depreciation1Amount) {
757            this.period6Depreciation1Amount = period6Depreciation1Amount;
758        }
759    
760    
761        /**
762         * Gets the period7Depreciation1Amount attribute.
763         * 
764         * @return Returns the period7Depreciation1Amount
765         * 
766         */
767        public KualiDecimal getPeriod7Depreciation1Amount() {
768            return period7Depreciation1Amount;
769        }
770    
771        /**
772         * Sets the period7Depreciation1Amount attribute.
773         * 
774         * @param period7Depreciation1Amount The period7Depreciation1Amount to set.
775         * 
776         */
777        public void setPeriod7Depreciation1Amount(KualiDecimal period7Depreciation1Amount) {
778            this.period7Depreciation1Amount = period7Depreciation1Amount;
779        }
780    
781    
782        /**
783         * Gets the period8Depreciation1Amount attribute.
784         * 
785         * @return Returns the period8Depreciation1Amount
786         * 
787         */
788        public KualiDecimal getPeriod8Depreciation1Amount() {
789            return period8Depreciation1Amount;
790        }
791    
792        /**
793         * Sets the period8Depreciation1Amount attribute.
794         * 
795         * @param period8Depreciation1Amount The period8Depreciation1Amount to set.
796         * 
797         */
798        public void setPeriod8Depreciation1Amount(KualiDecimal period8Depreciation1Amount) {
799            this.period8Depreciation1Amount = period8Depreciation1Amount;
800        }
801    
802    
803        /**
804         * Gets the period9Depreciation1Amount attribute.
805         * 
806         * @return Returns the period9Depreciation1Amount
807         * 
808         */
809        public KualiDecimal getPeriod9Depreciation1Amount() {
810            return period9Depreciation1Amount;
811        }
812    
813        /**
814         * Sets the period9Depreciation1Amount attribute.
815         * 
816         * @param period9Depreciation1Amount The period9Depreciation1Amount to set.
817         * 
818         */
819        public void setPeriod9Depreciation1Amount(KualiDecimal period9Depreciation1Amount) {
820            this.period9Depreciation1Amount = period9Depreciation1Amount;
821        }
822    
823    
824        /**
825         * Gets the period10Depreciation1Amount attribute.
826         * 
827         * @return Returns the period10Depreciation1Amount
828         * 
829         */
830        public KualiDecimal getPeriod10Depreciation1Amount() {
831            return period10Depreciation1Amount;
832        }
833    
834        /**
835         * Sets the period10Depreciation1Amount attribute.
836         * 
837         * @param period10Depreciation1Amount The period10Depreciation1Amount to set.
838         * 
839         */
840        public void setPeriod10Depreciation1Amount(KualiDecimal period10Depreciation1Amount) {
841            this.period10Depreciation1Amount = period10Depreciation1Amount;
842        }
843    
844    
845        /**
846         * Gets the period11Depreciation1Amount attribute.
847         * 
848         * @return Returns the period11Depreciation1Amount
849         * 
850         */
851        public KualiDecimal getPeriod11Depreciation1Amount() {
852            return period11Depreciation1Amount;
853        }
854    
855        /**
856         * Sets the period11Depreciation1Amount attribute.
857         * 
858         * @param period11Depreciation1Amount The period11Depreciation1Amount to set.
859         * 
860         */
861        public void setPeriod11Depreciation1Amount(KualiDecimal period11Depreciation1Amount) {
862            this.period11Depreciation1Amount = period11Depreciation1Amount;
863        }
864    
865    
866        /**
867         * Gets the period12Depreciation1Amount attribute.
868         * 
869         * @return Returns the period12Depreciation1Amount
870         * 
871         */
872        public KualiDecimal getPeriod12Depreciation1Amount() {
873            return period12Depreciation1Amount;
874        }
875    
876        /**
877         * Sets the period12Depreciation1Amount attribute.
878         * 
879         * @param period12Depreciation1Amount The period12Depreciation1Amount to set.
880         * 
881         */
882        public void setPeriod12Depreciation1Amount(KualiDecimal period12Depreciation1Amount) {
883            this.period12Depreciation1Amount = period12Depreciation1Amount;
884        }
885    
886    
887        /**
888         * Gets the transferPaymentCode attribute.
889         * 
890         * @return Returns the transferPaymentCode
891         * 
892         */
893        public String getTransferPaymentCode() {
894            return transferPaymentCode;
895        }
896    
897        /**
898         * Sets the transferPaymentCode attribute.
899         * 
900         * @param transferPaymentCode The transferPaymentCode to set.
901         * 
902         */
903        public void setTransferPaymentCode(String transferPaymentCode) {
904            this.transferPaymentCode = transferPaymentCode;
905        }
906    
907    
908        /**
909         * Gets the asset attribute.
910         * 
911         * @return Returns the asset
912         * 
913         */
914        public Asset getAsset() {
915            return asset;
916        }
917    
918        /**
919         * Sets the asset attribute.
920         * 
921         * @param asset The asset to set.
922         * @deprecated
923         */
924        public void setAsset(Asset asset) {
925            this.asset = asset;
926        }
927    
928        /**
929         * Gets the chartOfAccounts attribute.
930         * 
931         * @return Returns the chartOfAccounts
932         * 
933         */
934        public Chart getChartOfAccounts() {
935            return chartOfAccounts;
936        }
937    
938        /**
939         * Sets the chartOfAccounts attribute.
940         * 
941         * @param chartOfAccounts The chartOfAccounts to set.
942         * @deprecated
943         */
944        public void setChartOfAccounts(Chart chartOfAccounts) {
945            this.chartOfAccounts = chartOfAccounts;
946        }
947    
948        /**
949         * Gets the subAccount attribute.
950         * 
951         * @return Returns the subAccount
952         * 
953         */
954        public SubAccount getSubAccount() {
955            return subAccount;
956        }
957    
958        /**
959         * Sets the subAccount attribute.
960         * 
961         * @param subAccount The subAccount to set.
962         * @deprecated
963         */
964        public void setSubAccount(SubAccount subAccount) {
965            this.subAccount = subAccount;
966        }
967    
968        /**
969         * Gets the financialObject attribute.
970         * 
971         * @return Returns the financialObject
972         * 
973         */
974        public ObjectCode getFinancialObject() {
975            return financialObject;
976        }
977    
978        /**
979         * Sets the financialObject attribute.
980         * 
981         * @param financialObject The financialObject to set.
982         * @deprecated
983         */
984        public void setFinancialObject(ObjectCode financialObject) {
985            this.financialObject = financialObject;
986        }
987    
988        /**
989         * Gets the account attribute.
990         * 
991         * @return Returns the account
992         * 
993         */
994        public Account getAccount() {
995            return account;
996        }
997    
998        /**
999         * Sets the account attribute.
1000         * 
1001         * @param account The account to set.
1002         * @deprecated
1003         */
1004        public void setAccount(Account account) {
1005            this.account = account;
1006        }
1007    
1008        /**
1009         * Gets the financialSubObject attribute.
1010         * 
1011         * @return Returns the financialSubObject
1012         * 
1013         */
1014        public SubObjectCode getFinancialSubObject() {
1015            return financialSubObject;
1016        }
1017    
1018        /**
1019         * Sets the financialSubObject attribute.
1020         * 
1021         * @param financialSubObject The financialSubObject to set.
1022         * @deprecated
1023         */
1024        public void setFinancialSubObject(SubObjectCode financialSubObject) {
1025            this.financialSubObject = financialSubObject;
1026        }
1027    
1028        /**
1029         * Gets the project attribute.
1030         * 
1031         * @return Returns the project
1032         * 
1033         */
1034        public ProjectCode getProject() {
1035            return project;
1036        }
1037    
1038        /**
1039         * Sets the project attribute.
1040         * 
1041         * @param project The project to set.
1042         * @deprecated
1043         */
1044        public void setProject(ProjectCode project) {
1045            this.project = project;
1046        }
1047    
1048        /**
1049         * Gets the documentHeader attribute.
1050         * 
1051         * @return Returns the documentHeader.
1052         */
1053        public DocumentHeader getDocumentHeader() {
1054            return documentHeader;
1055        }
1056    
1057        /**
1058         * Sets the documentHeader attribute value.
1059         * 
1060         * @param documentHeader The documentHeader to set.
1061         * @deprecated
1062         */
1063        public void setDocumentHeader(DocumentHeader documentHeader) {
1064            this.documentHeader = documentHeader;
1065        }
1066    
1067        /**
1068         * Gets the financialSystemDocumentTypeCode attribute. 
1069         * @return Returns the financialSystemDocumentTypeCode.
1070         */
1071        public DocumentTypeEBO getFinancialSystemDocumentTypeCode() {
1072            return financialSystemDocumentTypeCode = SpringContext.getBean(KEWModuleService.class).retrieveExternalizableBusinessObjectIfNecessary(this, financialSystemDocumentTypeCode, "financialSystemDocumentTypeCode");
1073        }
1074    
1075        /**
1076         * Gets the financialDocumentPostingPeriod attribute.
1077         * 
1078         * @return Returns the financialDocumentPostingPeriod.
1079         */
1080        public AccountingPeriod getFinancialDocumentPostingPeriod() {
1081            return financialDocumentPostingPeriod;
1082        }
1083    
1084        /**
1085         * Sets the financialDocumentPostingPeriod attribute value.
1086         * 
1087         * @param financialDocumentPostingPeriod The financialDocumentPostingPeriod to set.
1088         * @deprecated
1089         */
1090        public void setFinancialDocumentPostingPeriod(AccountingPeriod financialDocumentPostingPeriod) {
1091            this.financialDocumentPostingPeriod = financialDocumentPostingPeriod;
1092        }
1093    
1094        /**
1095         * Gets the financialSystemOrigination attribute.
1096         * 
1097         * @return Returns the financialSystemOrigination.
1098         */
1099        public OriginationCode getFinancialSystemOrigination() {
1100            return financialSystemOrigination;
1101        }
1102    
1103        /**
1104         * Sets the financialSystemOrigination attribute value.
1105         * 
1106         * @param financialSystemOrigination The financialSystemOrigination to set.
1107         * @deprecated
1108         */
1109        public void setFinancialSystemOrigination(OriginationCode financialSystemOrigination) {
1110            this.financialSystemOrigination = financialSystemOrigination;
1111        }
1112    
1113        /**
1114         * Gets the option attribute.
1115         * 
1116         * @return Returns the option.
1117         */
1118        public SystemOptions getOption() {
1119            return option;
1120        }
1121    
1122        /**
1123         * Sets the option attribute value.
1124         * 
1125         * @param option The option to set.
1126         * @deprecated
1127         */
1128        public void setOption(SystemOptions option) {
1129            this.option = option;
1130        }
1131    
1132        /**
1133         * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper()
1134         */
1135        protected LinkedHashMap<String, String> toStringMapper() {
1136            LinkedHashMap<String, String> m = new LinkedHashMap<String, String>();
1137            m.put("capitalAssetNumber", this.capitalAssetNumber.toString());
1138            m.put("paymentSequenceNumber", this.paymentSequenceNumber.toString());
1139            m.put("objectId", this.getObjectId());
1140            m.put("versionNumber" ,(this.getVersionNumber() == null ? "" : this.getVersionNumber().toString()) );
1141            m.put("chartOfAccountsCode" , this.getChartOfAccountsCode());
1142            m.put("accountNumber",getAccountNumber());
1143            m.put("subAccountNumber",getSubAccountNumber());
1144            m.put("financialObjectCode",getFinancialObjectCode());
1145            m.put("financialSubObjectCode",getFinancialSubObjectCode());
1146            m.put("financialSystemOriginationCode" ,this.getFinancialSystemOriginationCode() );
1147            m.put("financialDocumentTypeCode" , this.getFinancialDocumentTypeCode());
1148            m.put("documentNumber", this.getDocumentNumber());
1149            m.put("FinancialDocumentPostingYear",this.getFinancialDocumentPostingYear().toString());
1150            m.put("FinancialDocumentPostingPeriodCode",this.getFinancialDocumentPostingPeriodCode());
1151            m.put("financialDocumentPostingDate" , (this.getFinancialDocumentPostingDate() != null ? this.getFinancialDocumentPostingDate().toString() : ""));
1152            m.put("projectCode",getProjectCode());
1153            m.put("organizationReferenceId" , this.getOrganizationReferenceId());
1154            m.put("accountChargeAmount", ( this.getAccountChargeAmount() == null ? "NULL" : this.getAccountChargeAmount().toString()));
1155            m.put("purchaseOrderNumber" , this.getPurchaseOrderNumber());
1156            m.put("requisitionNumber" , this.getRequisitionNumber());
1157            m.put("primaryDepreciationBaseAmount" , (this.getPrimaryDepreciationBaseAmount() != null ? this.getPrimaryDepreciationBaseAmount().toString() : "0.00"));
1158            m.put("accumulatedPrimaryDepreciationAmount" , (this.getAccumulatedPrimaryDepreciationAmount() != null ? this.getAccumulatedPrimaryDepreciationAmount().toString():"0.00"));
1159            m.put("previousYearPrimaryDepreciationAmount" , (this.getPreviousYearPrimaryDepreciationAmount() != null ? this.getPreviousYearPrimaryDepreciationAmount().toString() : "0.00"));
1160            m.put("period1Depreciation1Amount" , (this.getPeriod1Depreciation1Amount() != null ? this.getPeriod1Depreciation1Amount().toString() : "NULL"));
1161            m.put("period2Depreciation1Amount" , (this.getPeriod2Depreciation1Amount() != null ? this.getPeriod2Depreciation1Amount().toString() : "NULL"));
1162            m.put("period3Depreciation1Amount" , (this.getPeriod3Depreciation1Amount() != null ? this.getPeriod3Depreciation1Amount().toString() : "NULL"));
1163            m.put("period4Depreciation1Amount" , (this.getPeriod4Depreciation1Amount() != null ? this.getPeriod4Depreciation1Amount().toString() : "NULL"));
1164            m.put("period5Depreciation1Amount" , (this.getPeriod5Depreciation1Amount() != null ? this.getPeriod5Depreciation1Amount().toString() : "NULL"));
1165            m.put("period6Depreciation1Amount" , (this.getPeriod6Depreciation1Amount() != null ? this.getPeriod6Depreciation1Amount().toString() : "NULL"));
1166            m.put("period7Depreciation1Amount" , (this.getPeriod7Depreciation1Amount() != null ? this.getPeriod7Depreciation1Amount().toString() : "NULL"));
1167            m.put("period8Depreciation1Amount" , (this.getPeriod8Depreciation1Amount() != null ? this.getPeriod8Depreciation1Amount().toString() : "NULL"));
1168            m.put("period9Depreciation1Amount" , (this.getPeriod9Depreciation1Amount() != null ? this.getPeriod9Depreciation1Amount().toString() : "NULL"));
1169            m.put("period10Depreciation1Amount" ,(this.getPeriod10Depreciation1Amount() != null ? this.getPeriod10Depreciation1Amount().toString() : "NULL"));
1170            m.put("period11Depreciation1Amount" ,(this.getPeriod11Depreciation1Amount() != null ? this.getPeriod11Depreciation1Amount().toString() : "NULL"));
1171            m.put("period12Depreciation1Amount" ,(this.getPeriod12Depreciation1Amount() != null ? this.getPeriod12Depreciation1Amount().toString() : "NULL"));
1172            m.put("transferPaymentCode" , this.getTransferPaymentCode());
1173            return m;
1174        }
1175    
1176        /**
1177         * Get the yearToDate attribute
1178         * 
1179         * @return Returns the yearToDate
1180         */
1181        public KualiDecimal getYearToDate() {
1182            return yearToDate;
1183        }
1184    
1185        /**
1186         * Sets the yearToDate attribute value.
1187         * 
1188         * @param yearToDate The yearToDate to set.
1189         */
1190        public void setYearToDate(KualiDecimal yearToDate) {
1191            this.yearToDate = yearToDate;
1192        }
1193    }