View Javadoc
1   /*
2    * Copyright 2011 The Kuali Foundation.
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.ole.select.businessobject;
17  
18  import org.apache.commons.lang.StringUtils;
19  import org.kuali.ole.DocumentUniqueIDPrefix;
20  import org.kuali.ole.docstore.engine.service.storage.rdbms.pojo.BibInfoRecord;
21  import org.kuali.ole.module.purap.PurapConstants;
22  import org.kuali.ole.module.purap.businessobject.*;
23  import org.kuali.ole.module.purap.document.PurchaseOrderDocument;
24  import org.kuali.ole.pojo.OleOrderRecord;
25  import org.kuali.ole.select.bo.OLELinkPurapDonor;
26  import org.kuali.ole.select.bo.OLEPOClaimHistory;
27  import org.kuali.ole.select.document.OleInvoiceDocument;
28  import org.kuali.ole.select.document.OlePurchaseOrderDocument;
29  import org.kuali.ole.select.lookup.DocData;
30  import org.kuali.ole.sys.OLEConstants;
31  import org.kuali.ole.sys.context.SpringContext;
32  import org.kuali.rice.core.api.util.type.KualiDecimal;
33  import org.kuali.rice.core.api.util.type.KualiInteger;
34  import org.kuali.rice.kim.api.identity.Person;
35  import org.kuali.rice.kim.api.identity.PersonService;
36  import org.kuali.rice.krad.service.SequenceAccessorService;
37  import org.kuali.rice.krad.util.GlobalVariables;
38  import org.kuali.rice.krad.util.ObjectUtils;
39  
40  import java.math.BigDecimal;
41  import java.util.ArrayList;
42  import java.sql.Date;
43  import java.util.List;
44  
45  
46  public class OlePurchaseOrderItem extends PurchaseOrderItem implements OlePurchasingItem {
47  
48      protected static org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(OleRequisitionItem.class);
49      private boolean selected;
50      private BibInfoBean bibInfoBean;
51      protected String itemTitleId;
52      protected String linkToOrderOption;
53      protected String localTitleId;
54      protected String itemTitle;
55      protected String itemAuthor;
56      protected String requestorId;
57      protected String requestorFirstName;
58      private DocData docData;
59      protected KualiInteger itemNoOfParts;
60      private String noOfItemParts;
61      protected String internalRequestorId;
62      protected Integer requestorTypeId;
63      protected KualiDecimal itemListPrice;
64      protected KualiDecimal itemDiscount;
65      protected String itemDiscountType;
66      protected String vendorItemPoNumber;
67      protected String itemCurrencyType;
68      protected String donorSearchCodes;
69      protected KualiDecimal itemForeignListPrice;
70      protected KualiDecimal itemForeignDiscount;
71      protected String itemForeignDiscountType;
72      protected KualiDecimal itemForeignDiscountAmt;
73      protected KualiDecimal itemForeignUnitCost;
74      protected KualiDecimal itemExchangeRate;
75      protected KualiDecimal itemUnitCostUSD;
76      protected boolean latestExchangeRate;
77      protected Integer categoryId;
78      protected Integer formatTypeId;
79      protected Integer requestSourceTypeId;
80      protected Integer receiptStatusId;
81      private OleCategory category;
82      private OleFormatType formatTypeName;
83      private OleRequestSourceType oleRequestSourceType;
84      private OleReceiptStatus oleReceiptStatus;
85      protected Integer itemPriceSourceId;
86      private OleItemPriceSource itemPriceSource;
87      protected boolean itemRouteToRequestorIndicator;
88      protected boolean itemPublicViewIndicator;
89      private PurchaseOrderDocument purchaseOrder;
90      private OleOrderRecord oleOrderRecord;
91      private boolean poAdded = false;
92      protected String bibUUID;
93      private String noOfCopiesReceived;
94      private String noOfPartsReceived;
95      private KualiDecimal invoicePrice;
96      private KualiDecimal itemForeignUnitPrice;
97      private KualiInteger itemPoQty;
98      private String singleCopyNumber;
99  
100     private String donorId;
101     private String donorCode;
102     private List<OLELinkPurapDonor> oleDonors=new ArrayList<>();
103 
104     protected KualiDecimal itemForiegnExtendedPrice;
105     private String itemLocation;
106     /**
107      * For List of copies
108      */
109     private Integer itemCopiesId;
110     private KualiInteger parts;
111     private KualiDecimal itemCopies;
112     private String partEnumeration;
113     private String locationCopies;
114     private KualiInteger startingCopyNumber;
115     private List<OleCopies> copies = new ArrayList<OleCopies>();
116     private List<OleRequisitionCopies> oleCopies = new ArrayList<OleRequisitionCopies>();
117     private List<OleCopy> deletedCopiesList = new ArrayList<>();
118 
119     //For Displaying the Invoice List
120     private List<OleInvoiceDocument> invoiceDocuments = new ArrayList<OleInvoiceDocument>();
121     private List<InvoiceView> paymentHistoryInvoiceViews = null;
122     //For Invoice
123     private String invoiceItemListPrice;
124     private String invoiceForeignItemListPrice;
125     private String invoiceForeignDiscount;
126     private String invoiceExchangeRate;
127     private String invoiceForeignUnitCost;
128     private String invoiceForeignCurrency;
129     private String invoiceForeignDiscountType;
130 
131     private boolean doNotClaim;
132 
133     private KualiInteger claimCount;
134     private boolean claimPoAdded;
135     private Date claimDate;
136     private String claimNote;
137     private List<OLEPOClaimHistory> claimHistories = new ArrayList<>();
138 
139     private boolean claimFilter = false;
140     private String title;
141     private BibInfoRecord bibInfoRecord;
142 
143     public List<OLEPOClaimHistory> getClaimHistories() {
144         return claimHistories;
145     }
146 
147     public String getDonorSearchCodes() {
148         return donorSearchCodes;
149     }
150 
151     public void setDonorSearchCodes(String donorSearchCodes) {
152         this.donorSearchCodes = donorSearchCodes;
153     }
154 
155     public void setClaimHistories(List<OLEPOClaimHistory> claimHistories) {
156         this.claimHistories = claimHistories;
157     }
158 
159     public String getClaimNote() {
160         return claimNote;
161     }
162 
163     public void setClaimNote(String claimNote) {
164         this.claimNote = claimNote;
165     }
166 
167     public Date getClaimDate() {
168         return claimDate;
169     }
170 
171     public void setClaimDate(Date claimDate) {
172         this.claimDate = claimDate;
173     }
174 
175     public boolean isClaimPoAdded() {
176         return claimPoAdded;
177     }
178 
179     public void setClaimPoAdded(boolean claimPoAdded) {
180         this.claimPoAdded = claimPoAdded;
181     }
182 
183     public String getSingleCopyNumber() {
184         return singleCopyNumber;
185     }
186 
187     public void setSingleCopyNumber(String singleCopyNumber) {
188         this.singleCopyNumber = singleCopyNumber;
189     }
190 
191     public KualiInteger getClaimCount() {
192         return claimCount;
193     }
194 
195     public void setClaimCount(KualiInteger claimCount) {
196         this.claimCount = claimCount;
197     }
198 
199     public boolean isDoNotClaim() {
200         return doNotClaim;
201     }
202 
203     public void setDoNotClaim(boolean doNotClaim) {
204         this.doNotClaim = doNotClaim;
205     }
206 
207     public List<OLELinkPurapDonor> getOleDonors() {
208         return oleDonors;
209     }
210 
211     public void setOleDonors(List<OLELinkPurapDonor> oleDonors) {
212         this.oleDonors = oleDonors;
213     }
214 
215     public String getDonorId() {
216         return donorId;
217     }
218 
219     public void setDonorId(String donorId) {
220         this.donorId = donorId;
221     }
222 
223     public String getDonorCode() {
224         return donorCode;
225     }
226 
227     public void setDonorCode(String donorCode) {
228         this.donorCode = donorCode;
229     }
230     /**
231      * For List Payment History
232      */
233     private String paymentHistory;
234     private List<OleRequisitionPaymentHistory> requisitionPaymentHistory = new ArrayList<OleRequisitionPaymentHistory>();
235     private String itemTypeDescription;
236 
237     /**
238      * For Quantity As Integer
239      */
240     private KualiInteger oleItemQuantity;
241     private String copiesOrdered;
242 
243 
244     private OLERequestorPatronDocument olePatronDocument;
245     protected String olePatronId;
246     private String firstName;
247     private String enumeration;
248     private String location;
249     private String copyNumber;
250     private String receiptStatus;
251     private String caption;
252     private String volumeNumber;
253     private List<OleCopy> copyList = new ArrayList<>();
254 
255     private String                               itemStatus;
256 
257     private String vendorName;
258     private OlePurchaseOrderDocument olePurchaseOrderDocument;
259     // Subscription Date for Invoice Document
260     private Date subscriptionFromDate;
261     private Date subscriptionToDate;
262     private boolean subscriptionOverlap;
263 
264     public OlePurchaseOrderDocument getOlePurchaseOrderDocument() {
265         return olePurchaseOrderDocument;
266     }
267 
268     public void setOlePurchaseOrderDocument(OlePurchaseOrderDocument olePurchaseOrderDocument) {
269         this.olePurchaseOrderDocument = olePurchaseOrderDocument;
270     }
271     private String docFormat;
272     public String getDocFormat() {
273         return docFormat;
274     }
275 
276     public void setDocFormat(String docFormat) {
277         this.docFormat = docFormat;
278     }
279     // For Invoice Document
280     private boolean itemForInvoice = true;
281     private String openQuantity;
282     private KualiDecimal poOutstandingQuantity;
283     private List<OleInvoiceNote> invoiceNotes = new ArrayList<OleInvoiceNote>();
284     private boolean locationFlag;
285     private boolean itemLocationChangeFlag;
286     private KualiDecimal previousItemQuantity;
287     private KualiInteger previousItemNoOfParts;
288 
289     public String getLocalTitleId() {
290         return localTitleId;
291     }
292 
293     public void setLocalTitleId(String localTitleId) {
294         this.localTitleId = localTitleId;
295     }
296 
297     //Invoice Changes
298     private BigDecimal itemSurcharge;
299 
300     public String getItemStatus() {
301         return itemStatus;
302     }
303 
304     public void setItemStatus(String itemStatus) {
305         this.itemStatus = itemStatus;
306     }
307 
308     public BigDecimal getItemSurcharge() {
309         return itemSurcharge;
310     }
311 
312     public void setItemSurcharge(BigDecimal itemSurcharge) {
313         this.itemSurcharge = itemSurcharge;
314     }
315 
316     public List<OleRequisitionCopies> getOleCopies() {
317         return oleCopies;
318     }
319 
320     public void setOleCopies(List<OleRequisitionCopies> oleCopies) {
321         this.oleCopies = oleCopies;
322     }
323 
324     public String getEnumeration() {
325         return enumeration;
326     }
327 
328     public void setEnumeration(String enumeration) {
329         this.enumeration = enumeration;
330     }
331 
332     public String getLocation() {
333         return location;
334     }
335 
336     public void setLocation(String location) {
337         this.location = location;
338     }
339 
340     public String getCopyNumber() {
341         return copyNumber;
342     }
343 
344     public void setCopyNumber(String copyNumber) {
345         this.copyNumber = copyNumber;
346     }
347 
348     public boolean isSelected() {
349         return selected;
350     }
351 
352     public void setSelected(boolean selected) {
353         this.selected = selected;
354     }
355 
356     public String getReceiptStatus() {
357         return receiptStatus;
358     }
359 
360     public void setReceiptStatus(String receiptStatus) {
361         this.receiptStatus = receiptStatus;
362     }
363 
364     public String getCaption() {
365         return caption;
366     }
367 
368     public void setCaption(String caption) {
369         this.caption = caption;
370     }
371 
372     public String getVolumeNumber() {
373         return volumeNumber;
374     }
375 
376     public void setVolumeNumber(String volumeNumber) {
377         this.volumeNumber = volumeNumber;
378     }
379 
380     public List<OleCopy> getCopyList() {
381         return copyList;
382     }
383 
384     public void setCopyList(List<OleCopy> copyList) {
385         this.copyList = copyList;
386     }
387 
388     /**
389      * Gets the value of the receiptStatusId property
390      *
391      * @return receiptStatusId
392      */
393     public Integer getReceiptStatusId() {
394         return receiptStatusId;
395     }
396 
397     /**
398      * Sets the receiptStatusId value
399      *
400      * @param receiptStatusId
401      */
402     public void setReceiptStatusId(Integer receiptStatusId) {
403         this.receiptStatusId = receiptStatusId;
404     }
405 
406     /**
407      * Gets the instance of OleReceiptStatus
408      *
409      * @return oleReceiptStatus
410      */
411     public OleReceiptStatus getOleReceiptStatus() {
412         return oleReceiptStatus;
413     }
414 
415     /**
416      * Sets the instance value for OleReceiptStatus
417      *
418      * @param oleReceiptStatus
419      */
420     public void setOleReceiptStatus(OleReceiptStatus oleReceiptStatus) {
421         this.oleReceiptStatus = oleReceiptStatus;
422     }
423 
424     /**
425      * Gets the poAdded attribute.
426      *
427      * @return Returns the poAdded.
428      */
429     public boolean isPoAdded() {
430         return poAdded;
431     }
432 
433     /**
434      * Sets the poAdded attribute value.
435      *
436      * @param poAdded The poAdded to set.
437      */
438     public void setPoAdded(boolean poAdded) {
439         this.poAdded = poAdded;
440     }
441 
442     /**
443      * This for List of Notes
444      */
445     /*private List<OleNotes> notes;
446     private Integer noteTypeId;
447     private String note;*/
448 
449     private KualiDecimal itemReceivedTotalParts; // Added for OLE-2058
450     private KualiDecimal itemDamagedTotalParts; // Adde for OLE-2058
451 
452     /**
453      * This method... for getting NoteType Id
454      *
455      * @return noteTypeId
456      */
457    /* public Integer getNoteTypeId() {
458         return noteTypeId;
459     }
460 
461     *//**
462      * This method... for setting the NoteType Id
463      *
464      * @param noteTypeId
465      *//*
466     public void setNoteTypeId(Integer noteTypeId) {
467         this.noteTypeId = noteTypeId;
468     }
469 
470     *//**
471      * This method... for getting the Note description
472      *
473      * @return note
474      *//*
475     public String getNote() {
476         return note;
477     }
478 
479     *//**
480      * This method... for setting the Note description
481      *
482      * @param note
483      *//*
484     public void setNote(String note) {
485         this.note = note;
486     }
487 
488     *//**
489      * This method... for setting List of notes
490      *
491      * @param notes
492      *//*
493     public void setNotes(List<OleNotes> notes) {
494         this.notes = notes;
495     }
496 
497     *//**
498      * This method... for getting List of Notes
499      *
500      * @return notes
501      *//*
502     public List<OleNotes> getNotes() {
503         return notes;
504     }*/
505 
506     public OleOrderRecord getOleOrderRecord() {
507         return oleOrderRecord;
508     }
509 
510     public void setOleOrderRecord(OleOrderRecord oleOrderRecord) {
511         this.oleOrderRecord = oleOrderRecord;
512     }
513 
514     public OlePurchaseOrderItem() {
515         this.setItemNoOfParts(new KualiInteger(1));
516         this.setItemPublicViewIndicator(true);
517         this.setItemUnitOfMeasureCode(PurapConstants.PODocumentsStrings.CUSTOMER_INVOICE_DETAIL_UOM_DEFAULT);
518         this.setOleItemQuantity(new KualiInteger(1));
519         this.setItemListPrice(new KualiDecimal(0.00));
520         this.setNoOfCopiesReceived("");
521         this.getNewSourceLine().setAccountLinePercent(new BigDecimal(0));
522         this.setNoOfPartsReceived("");
523         /*if (GlobalVariables.getUserSession() != null) {
524             this.internalRequestorId = GlobalVariables.getUserSession().getPrincipalId();
525             this.setRequestorFirstName(getPersonName(GlobalVariables.getUserSession().getPrincipalId()));
526         }*/
527         /*    if(SpringContext.getBean(OleRequisitionService.class).getRequestor()!=null) {
528             String requestor=SpringContext.getBean(OleRequisitionService.class).getRequestor();
529             this.setRequestorFirstName(requestor);
530         }
531         OleRequisitionService oleRequestionService=new OleRequisitionServiceImpl();
532         if(oleRequestionService.getRequestor()!=null) {
533              String requestor=oleRequestionService.getRequestor();
534              this.setRequestorFirstName(requestor);
535          }*/
536         /**
537          * Initializing poNotes List
538          */
539         LOG.debug("Initializing OlePurchaseOrderNotes List");
540         //notes = new ArrayList<OleNotes>();
541     }
542 
543 
544     @Override
545     public PurchaseOrderDocument getPurchaseOrder() {
546         // TODO Auto-generated method stub
547         return super.getPurchaseOrder();
548     }
549 
550 
551     @Override
552     public void setPurchaseOrder(PurchaseOrderDocument purchaseOrder) {
553         // TODO Auto-generated method stub
554         setPurapDocument(purchaseOrder);
555         super.setPurchaseOrder(purchaseOrder);
556     }
557 
558 
559     public OlePurchaseOrderItem(OleRequisitionItem ri, OlePurchaseOrderDocument po, RequisitionCapitalAssetItem reqCamsItem) {
560         this();
561         // po.setVendorPoNumber(ri.getVendorItemPoNumber());
562         this.setPurchaseOrder(po);
563         SequenceAccessorService sas = SpringContext.getBean(SequenceAccessorService.class);
564         Integer itemIdentifier = sas.getNextAvailableSequenceNumber("PO_ITM_ID", PurchaseOrderDocument.class).intValue();
565         this.setItemIdentifier(itemIdentifier);
566         this.setItemLineNumber(ri.getItemLineNumber());
567         this.setItemUnitOfMeasureCode(ri.getItemUnitOfMeasureCode());
568         this.setItemNoOfParts(ri.getItemNoOfParts());
569         this.setItemQuantity(ri.getItemQuantity());
570         this.setItemCatalogNumber(ri.getItemCatalogNumber());
571         this.setPreviousItemQuantity(ri.getItemQuantity());
572         this.setPreviousItemNoOfParts(ri.getItemNoOfParts());
573         this.setItemDescription(ri.getItemDescription());
574         this.setSingleCopyNumber(ri.getSingleCopyNumber());
575         if(ri.getItemTitleId()!=null){
576             this.setDocFormat(DocumentUniqueIDPrefix.getBibFormatType(ri.getItemTitleId()));
577         }
578         if(ri.getItemUnitPrice()!=null){
579             this.setItemUnitPrice(ri.getItemUnitPrice().setScale(2, BigDecimal.ROUND_HALF_UP));
580         }
581         else{
582             this.setItemUnitPrice(ri.getItemUnitPrice());
583         }
584         this.setItemAuxiliaryPartIdentifier(ri.getItemAuxiliaryPartIdentifier());
585         this.setItemAssignedToTradeInIndicator(ri.getItemAssignedToTradeInIndicator());
586         this.setItemTaxAmount(ri.getItemTaxAmount());
587         this.setItemTitleId(ri.getItemTitleId());
588         this.setRequestorId(ri.getRequestorId());
589         this.setInternalRequestorId(ri.getInternalRequestorId());
590         this.setRequestorTypeId(ri.getRequestorTypeId());
591         this.setItemListPrice(ri.getItemListPrice());
592         this.setItemDiscount(ri.getItemDiscount());
593         this.setItemDiscountType(ri.getItemDiscountType());
594         this.setItemRouteToRequestorIndicator(ri.isItemRouteToRequestorIndicator());
595         this.setItemPublicViewIndicator(ri.isItemPublicViewIndicator());
596         this.setVendorItemPoNumber(ri.getVendorItemPoNumber());
597         // Foreign Currency Conversion
598         this.setItemCurrencyType(ri.getItemCurrencyType());
599         this.setItemForeignListPrice(ri.getItemForeignListPrice());
600         this.setItemForeignDiscount(ri.getItemForeignDiscount());
601         this.setItemForeignDiscountAmt(ri.getItemForeignDiscountAmt());
602         this.setItemForeignDiscountType(ri.getItemForeignDiscountType());
603         this.setItemForeignUnitCost(ri.getItemForeignUnitCost());
604         this.setItemExchangeRate(ri.getItemExchangeRate());
605         this.setItemUnitCostUSD(ri.getItemUnitCostUSD());
606         this.setCategory(ri.getCategory());
607         this.setCategoryId(ri.getCategoryId());
608         this.setFormatTypeName(ri.getFormatTypeName());
609         this.setFormatTypeId(ri.getFormatTypeId());
610         this.setOleRequestSourceType(ri.getOleRequestSourceType());
611         this.setRequestSourceTypeId(ri.getRequestSourceTypeId());
612         this.setReceiptStatusId(ri.getReceiptStatusId());
613         this.setItemPriceSource(ri.getItemPriceSource());
614         this.setItemPriceSourceId(ri.getItemPriceSourceId());
615         this.setItemLocation(ri.getItemLocation());
616         this.setItemStatus(ri.getItemStatus());
617         this.setOleDonors(ri.getOleDonors());
618         this.setDoNotClaim(ri.isDoNotClaim());
619         this.setClaimDate(ri.getClaimDate());
620         this.setLinkToOrderOption(ri.getLinkToOrderOption());
621 
622 
623         //copy use tax items over, and blank out keys (useTaxId and itemIdentifier)
624         for (PurApItemUseTax useTaxItem : ri.getUseTaxItems()) {
625             PurchaseOrderItemUseTax newItemUseTax = new PurchaseOrderItemUseTax(useTaxItem);
626             newItemUseTax.setItemIdentifier(itemIdentifier);
627             this.getUseTaxItems().add(newItemUseTax);
628 
629         }
630 
631         this.setExternalOrganizationB2bProductReferenceNumber(ri.getExternalOrganizationB2bProductReferenceNumber());
632         this.setExternalOrganizationB2bProductTypeName(ri.getExternalOrganizationB2bProductTypeName());
633 
634         this.setItemReceivedTotalQuantity(org.kuali.rice.core.api.util.type.KualiDecimal.ZERO);
635         this.setItemDamagedTotalQuantity(org.kuali.rice.core.api.util.type.KualiDecimal.ZERO);
636 
637         this.setItemTypeCode(ri.getItemTypeCode());
638 
639         if (ri.getSourceAccountingLines() != null && ri.getSourceAccountingLines().size() > 0 &&
640                 !StringUtils.equals(PurapConstants.ItemTypeCodes.ITEM_TYPE_ORDER_DISCOUNT_CODE, ri.getItemType().getItemTypeCode())) {
641             List accounts = new ArrayList();
642             for (PurApAccountingLine account : ri.getSourceAccountingLines()) {
643                 PurchaseOrderAccount poAccount = new PurchaseOrderAccount(account);
644                 poAccount.setPurchaseOrderItem(this);
645                 accounts.add(poAccount);
646             }
647             this.setSourceAccountingLines(accounts);
648         }
649         /**
650          * Setting the Notes of each item from OleRequisitionNotes to OlePurchaseOrderNotes List
651          */
652         if (ri.getNotes() != null && ri.getNotes().size() > 0 &&
653                 !StringUtils.equals(PurapConstants.ItemTypeCodes.ITEM_TYPE_ORDER_DISCOUNT_CODE, ri.getItemType().getItemTypeCode())) {
654             List notes = new ArrayList();
655             LOG.debug("Adding Notes from RequisitionItem to corresponding PurchaseOrderItem");
656             for (OleNotes note : ri.getNotes()) {
657                 OlePurchaseOrderNotes poNote = new OlePurchaseOrderNotes(note);
658                 poNote.setOlePurchaseOrderItem(this);
659                 poNote.setNoteType(note.getNoteType());
660                 notes.add(poNote);
661             }
662             this.setNotes(notes);
663         }
664         this.setCopyList(ri.getCopyList());
665         // By default, set the item active indicator to true.
666         // In amendment, the user can set it to false when they click on
667         // the inactivate button.
668         this.setItemActiveIndicator(true);
669 
670         this.setPurchasingCommodityCode(ri.getPurchasingCommodityCode());
671         this.setCommodityCode(getCommodityCode());
672 
673         // If the RequisitionItem has a CapitalAssetItem, create a new PurchasingCapitalAssetItem and add it to the PO.
674         if (ObjectUtils.isNotNull(reqCamsItem)) {
675             PurchaseOrderCapitalAssetItem newPOCapitalAssetItem = new PurchaseOrderCapitalAssetItem(reqCamsItem, itemIdentifier);
676             po.getPurchasingCapitalAssetItems().add(newPOCapitalAssetItem);
677         }
678     }
679 
680 
681     @Override
682     public Integer getRequestorTypeId() {
683         return requestorTypeId;
684     }
685 
686 
687     public void setRequestorTypeId(Integer requestorTypeId) {
688         this.requestorTypeId = requestorTypeId;
689     }
690 
691 
692     @Override
693     public String getInternalRequestorId() {
694         return internalRequestorId;
695     }
696 
697 
698     public void setInternalRequestorId(String internalRequestorId) {
699         this.internalRequestorId = internalRequestorId;
700     }
701 
702     @Override
703     public String getItemTitleId() {
704         return itemTitleId;
705     }
706 
707     public void setItemTitleId(String itemTitleId) {
708         this.itemTitleId = itemTitleId;
709     }
710 
711     public String getLinkToOrderOption() {
712         return linkToOrderOption;
713     }
714 
715     public void setLinkToOrderOption(String linkToOrderOption) {
716         this.linkToOrderOption = linkToOrderOption;
717     }
718 
719     public String getItemTitle() {
720         return itemTitle;
721     }
722 
723     public void setItemTitle(String itemTitle) {
724         this.itemTitle = itemTitle;
725     }
726 
727     public String getItemAuthor() {
728         return itemAuthor;
729     }
730 
731     public void setItemAuthor(String itemAuthor) {
732         this.itemAuthor = itemAuthor;
733     }
734 
735     @Override
736     public String getRequestorFirstName() {
737         return requestorFirstName;
738     }
739 
740     @Override
741     public void setRequestorFirstName(String requestorFirstName) {
742         this.requestorFirstName = requestorFirstName;
743     }
744 
745     @Override
746     public String getRequestorId() {
747         return requestorId;
748     }
749 
750 
751     public void setRequestorId(String requestorId) {
752         this.requestorId = requestorId;
753     }
754 
755     public BibInfoBean getBibInfoBean() {
756         return bibInfoBean;
757     }
758 
759 
760     @Override
761     public void setBibInfoBean(BibInfoBean bibInfoBean) {
762         this.bibInfoBean = bibInfoBean;
763     }
764 
765     public DocData getDocData() {
766         return docData;
767     }
768 
769     public void setDocData(DocData docData) {
770         this.docData = docData;
771     }
772 
773     public String getNoOfItemParts() {
774         if (this.itemNoOfParts != null) {
775             return String.valueOf(itemNoOfParts);
776         } else {
777             return String.valueOf(itemNoOfParts);
778         }
779     }
780 
781     public void setNoOfItemParts(String noOfItemParts) {
782         this.itemNoOfParts = new KualiInteger(noOfItemParts);
783     }
784 
785     public KualiInteger getItemNoOfParts() {
786         if (this.itemNoOfParts != null) {
787             return itemNoOfParts;
788         } else {
789             return itemNoOfParts;
790         }
791     }
792 
793 
794     public void setItemNoOfParts(KualiInteger itemNoOfParts) {
795         this.itemNoOfParts = itemNoOfParts;
796     }
797 
798     public KualiDecimal getItemListPrice() {
799         return itemListPrice;
800     }
801 
802 
803     public void setItemListPrice(KualiDecimal itemListPrice) {
804         this.itemListPrice = itemListPrice;
805     }
806 
807 
808     public KualiDecimal getItemDiscount() {
809         return itemDiscount;
810     }
811 
812 
813     public void setItemDiscount(KualiDecimal itemDiscount) {
814         this.itemDiscount = itemDiscount;
815     }
816 
817 
818     public String getItemDiscountType() {
819         return itemDiscountType;
820     }
821 
822 
823     public void setItemDiscountType(String itemDiscountType) {
824         this.itemDiscountType = itemDiscountType;
825     }
826 
827     public String getItemCurrencyType() {
828         return itemCurrencyType;
829     }
830 
831     public void setItemCurrencyType(String itemCurrencyType) {
832         this.itemCurrencyType = itemCurrencyType;
833     }
834 
835     public KualiDecimal getItemForeignListPrice() {
836         return itemForeignListPrice;
837     }
838 
839     public void setItemForeignListPrice(KualiDecimal itemForeignListPrice) {
840         this.itemForeignListPrice = itemForeignListPrice;
841     }
842 
843     public KualiDecimal getItemForeignDiscount() {
844         return itemForeignDiscount;
845     }
846 
847     public void setItemForeignDiscount(KualiDecimal itemForeignDiscount) {
848         this.itemForeignDiscount = itemForeignDiscount;
849     }
850 
851     public String getItemForeignDiscountType() {
852         return itemForeignDiscountType;
853     }
854 
855     public void setItemForeignDiscountType(String itemForeignDiscountType) {
856         this.itemForeignDiscountType = itemForeignDiscountType;
857     }
858 
859     public KualiDecimal getItemForeignDiscountAmt() {
860         return itemForeignDiscountAmt;
861     }
862 
863     public void setItemForeignDiscountAmt(KualiDecimal itemForeignDiscountAmt) {
864         this.itemForeignDiscountAmt = itemForeignDiscountAmt;
865     }
866 
867     public KualiDecimal getItemForeignUnitCost() {
868         return itemForeignUnitCost;
869     }
870 
871     public void setItemForeignUnitCost(KualiDecimal itemForeignUnitCost) {
872         this.itemForeignUnitCost = itemForeignUnitCost;
873     }
874 
875     public KualiDecimal getItemExchangeRate() {
876         return itemExchangeRate;
877     }
878 
879     public void setItemExchangeRate(KualiDecimal itemExchangeRate) {
880         this.itemExchangeRate = itemExchangeRate;
881     }
882 
883     public KualiDecimal getItemUnitCostUSD() {
884         return itemUnitCostUSD;
885     }
886 
887     public void setItemUnitCostUSD(KualiDecimal itemUnitCostUSD) {
888         this.itemUnitCostUSD = itemUnitCostUSD;
889     }
890 
891 
892     public Integer getCategoryId() {
893         return categoryId;
894     }
895 
896 
897     public void setCategoryId(Integer categoryId) {
898         this.categoryId = categoryId;
899     }
900 
901 
902     public Integer getFormatTypeId() {
903         return formatTypeId;
904     }
905 
906 
907     public void setFormatTypeId(Integer formatTypeId) {
908         this.formatTypeId = formatTypeId;
909     }
910 
911     public Integer getRequestSourceTypeId() {
912         return requestSourceTypeId;
913     }
914 
915 
916     public void setRequestSourceTypeId(Integer requestSourceTypeId) {
917         this.requestSourceTypeId = requestSourceTypeId;
918     }
919 
920     public OleCategory getCategory() {
921         return category;
922     }
923 
924 
925     public void setCategory(OleCategory category) {
926         this.category = category;
927     }
928 
929 
930     public OleFormatType getFormatTypeName() {
931         return formatTypeName;
932     }
933 
934 
935     public void setFormatTypeName(OleFormatType formatTypeName) {
936         this.formatTypeName = formatTypeName;
937     }
938 
939 
940     public OleRequestSourceType getOleRequestSourceType() {
941         return oleRequestSourceType;
942     }
943 
944 
945     public void setOleRequestSourceType(OleRequestSourceType oleRequestSourceType) {
946         this.oleRequestSourceType = oleRequestSourceType;
947     }
948 
949 
950     public Integer getItemPriceSourceId() {
951         return itemPriceSourceId;
952     }
953 
954 
955     public void setItemPriceSourceId(Integer itemPriceSourceId) {
956         this.itemPriceSourceId = itemPriceSourceId;
957     }
958 
959 
960     public OleItemPriceSource getItemPriceSource() {
961         return itemPriceSource;
962     }
963 
964 
965     public void setItemPriceSource(OleItemPriceSource itemPriceSource) {
966         this.itemPriceSource = itemPriceSource;
967     }
968 
969 
970     // Added for OLE-2058 Starts
971 
972     /**
973      * Gets the total parts received in a purchase order item.
974      *
975      * @return itemReceivedTotalParts.
976      */
977     public KualiDecimal getItemReceivedTotalParts() {
978         return itemReceivedTotalParts;
979     }
980 
981     /**
982      * Sets the total parts received in a purchase order item.
983      *
984      * @param itemReceivedTotalParts to set.
985      */
986     public void setItemReceivedTotalParts(KualiDecimal itemReceivedTotalParts) {
987         this.itemReceivedTotalParts = itemReceivedTotalParts;
988     }
989 
990     /**
991      * Gets the total parts damaged in a purchase order item.
992      *
993      * @return itemDamagedTotalParts.
994      */
995     public KualiDecimal getItemDamagedTotalParts() {
996         return itemDamagedTotalParts;
997     }
998 
999     /**
1000      * Sets the total parts damaged in a purchase order item.
1001      *
1002      * @param itemDamagedTotalParts to set.
1003      */
1004     public void setItemDamagedTotalParts(KualiDecimal itemDamagedTotalParts) {
1005         this.itemDamagedTotalParts = itemDamagedTotalParts;
1006     }
1007     // Added for OLE-2058 Ends
1008 
1009     public boolean isItemRouteToRequestorIndicator() {
1010         return itemRouteToRequestorIndicator;
1011     }
1012 
1013     public void setItemRouteToRequestorIndicator(boolean itemRouteToRequestorIndicator) {
1014         this.itemRouteToRequestorIndicator = itemRouteToRequestorIndicator;
1015     }
1016 
1017     public boolean isItemPublicViewIndicator() {
1018         return itemPublicViewIndicator;
1019     }
1020 
1021     public void setItemPublicViewIndicator(boolean itemPublicViewIndicator) {
1022         this.itemPublicViewIndicator = itemPublicViewIndicator;
1023     }
1024 
1025     public boolean isLatestExchangeRate() {
1026         return latestExchangeRate;
1027     }
1028 
1029     public void setLatestExchangeRate(boolean latestExchangeRate) {
1030         this.latestExchangeRate = latestExchangeRate;
1031     }
1032 
1033 
1034     /**
1035      * @see org.kuali.ole.module.purap.businessobject.PurchasingItemBase#getAccountingLineClass()
1036      */
1037     @Override
1038     public Class getAccountingLineClass() {
1039         return OlePurchaseOrderAccount.class;
1040     }
1041 
1042 
1043     public String getBibUUID() {
1044         return bibUUID;
1045     }
1046 
1047     public void setBibUUID(String bibUUID) {
1048         this.bibUUID = bibUUID;
1049     }
1050 
1051     public String getVendorItemPoNumber() {
1052         return vendorItemPoNumber;
1053     }
1054 
1055     public void setVendorItemPoNumber(String vendorItemPoNumber) {
1056         this.vendorItemPoNumber = vendorItemPoNumber;
1057     }
1058 
1059     @Override
1060     public void refresh() {
1061         // TODO Auto-generated method stub
1062 
1063     }
1064 
1065     public String getPersonName(String principalId) {
1066         Person person = SpringContext.getBean(PersonService.class).getPerson(principalId);
1067         if (person != null) {
1068             return person.getName();
1069         } else {
1070             return null;
1071         }
1072     }
1073 
1074     /**
1075      * Gets the no Of CopiesReceived in a purchase order item.
1076      *
1077      * @return noOfCopiesReceived.
1078      */
1079     public String getNoOfCopiesReceived() {
1080         return noOfCopiesReceived;
1081     }
1082 
1083     /**
1084      * Sets the no Of CopiesReceived in a purchase order item.
1085      *
1086      * @param noOfCopiesReceived to set.
1087      */
1088     public void setNoOfCopiesReceived(String noOfCopiesReceived) {
1089         this.noOfCopiesReceived = noOfCopiesReceived;
1090     }
1091 
1092     /**
1093      * Gets the no Of Parts Received in a purchase order item.
1094      *
1095      * @return noOfPartsReceived.
1096      */
1097     public String getNoOfPartsReceived() {
1098         return noOfPartsReceived;
1099     }
1100 
1101     /**
1102      * Sets the no Of Parts Received in a purchase order item.
1103      *
1104      * @param noOfPartsReceived to set.
1105      */
1106     public void setNoOfPartsReceived(String noOfPartsReceived) {
1107         this.noOfPartsReceived = noOfPartsReceived;
1108     }
1109 
1110     public KualiDecimal getInvoicePrice() {
1111         return invoicePrice;
1112     }
1113 
1114     public void setInvoicePrice(KualiDecimal invoicePrice) {
1115         this.invoicePrice = invoicePrice;
1116     }
1117 
1118     public KualiDecimal getItemForeignUnitPrice() {
1119         return itemForeignUnitPrice;
1120     }
1121 
1122     public void setItemForeignUnitPrice(KualiDecimal itemForeignUnitPrice) {
1123         this.itemForeignUnitPrice = itemForeignUnitPrice;
1124     }
1125 
1126     public KualiInteger getItemPoQty() {
1127         if (itemPoQty == null || itemPoQty.equals(KualiInteger.ZERO)) {
1128             itemPoQty = new KualiInteger(this.getItemQuantity().bigDecimalValue());
1129         }
1130         return itemPoQty;
1131     }
1132 
1133     public void setItemPoQty(KualiInteger itemPoQty) {
1134         this.itemPoQty = itemPoQty;
1135     }
1136 
1137     /**
1138      * Gets the itemForiegnExtendedPrice attribute.
1139      *
1140      * @return Returns the itemForiegnExtendedPrice.
1141      */
1142     public KualiDecimal getItemForiegnExtendedPrice() {
1143         return itemForiegnExtendedPrice;
1144     }
1145 
1146     /**
1147      * Sets the itemForiegnExtendedPrice attribute value.
1148      *
1149      * @param itemForiegnExtendedPrice The itemForiegnExtendedPrice to set.
1150      */
1151     public void setItemForiegnExtendedPrice(KualiDecimal itemForiegnExtendedPrice) {
1152         this.itemForiegnExtendedPrice = itemForiegnExtendedPrice;
1153     }
1154 
1155     /**
1156      * Gets the itemLocation attribute.
1157      *
1158      * @return Returns the itemLocation.
1159      */
1160     public String getItemLocation() {
1161         return itemLocation;
1162     }
1163 
1164     /**
1165      * Sets the itemLocation attribute value.
1166      *
1167      * @param itemLocation The itemLocation to set.
1168      */
1169     public void setItemLocation(String itemLocation) {
1170         this.itemLocation = itemLocation;
1171     }
1172 
1173     /**
1174      * Gets the itemCopiesId attribute.
1175      *
1176      * @return Returns the itemCopiesId.
1177      */
1178     public Integer getItemCopiesId() {
1179         return itemCopiesId;
1180     }
1181 
1182     /**
1183      * Sets the itemCopiesId attribute value.
1184      *
1185      * @param itemCopiesId The itemCopiesId to set.
1186      */
1187     public void setItemCopiesId(Integer itemCopiesId) {
1188         this.itemCopiesId = itemCopiesId;
1189     }
1190 
1191     /**
1192      * Gets the parts attribute.
1193      *
1194      * @return Returns the parts.
1195      */
1196     public KualiInteger getParts() {
1197         return parts;
1198     }
1199 
1200     /**
1201      * Sets the parts attribute value.
1202      *
1203      * @param parts The parts to set.
1204      */
1205     public void setParts(KualiInteger parts) {
1206         this.parts = parts;
1207     }
1208 
1209     /**
1210      * Gets the itemCopies attribute.
1211      *
1212      * @return Returns the itemCopies.
1213      */
1214     public KualiDecimal getItemCopies() {
1215         return itemCopies;
1216     }
1217 
1218     /**
1219      * Sets the itemCopies attribute value.
1220      *
1221      * @param itemCopies The itemCopies to set.
1222      */
1223     public void setItemCopies(KualiDecimal itemCopies) {
1224         this.itemCopies = itemCopies;
1225     }
1226 
1227     /**
1228      * Gets the partEnumeration attribute.
1229      *
1230      * @return Returns the partEnumeration.
1231      */
1232     public String getPartEnumeration() {
1233         return partEnumeration;
1234     }
1235 
1236     /**
1237      * Sets the partEnumeration attribute value.
1238      *
1239      * @param partEnumeration The partEnumeration to set.
1240      */
1241     public void setPartEnumeration(String partEnumeration) {
1242         this.partEnumeration = partEnumeration;
1243     }
1244 
1245     /**
1246      * Gets the locationCopies attribute.
1247      *
1248      * @return Returns the locationCopies.
1249      */
1250     public String getLocationCopies() {
1251         return locationCopies;
1252     }
1253 
1254     /**
1255      * Sets the locationCopies attribute value.
1256      *
1257      * @param locationCopies The locationCopies to set.
1258      */
1259     public void setLocationCopies(String locationCopies) {
1260         this.locationCopies = locationCopies;
1261     }
1262 
1263     /**
1264      * Gets the startingCopyNumber attribute.
1265      *
1266      * @return Returns the startingCopyNumber.
1267      */
1268     public KualiInteger getStartingCopyNumber() {
1269         return startingCopyNumber;
1270     }
1271 
1272     /**
1273      * Sets the startingCopyNumber attribute value.
1274      *
1275      * @param startingCopyNumber The startingCopyNumber to set.
1276      */
1277     public void setStartingCopyNumber(KualiInteger startingCopyNumber) {
1278         this.startingCopyNumber = startingCopyNumber;
1279     }
1280 
1281     /**
1282      * Gets the copies attribute.
1283      *
1284      * @return Returns the copies.
1285      */
1286     public List<OleCopies> getCopies() {
1287         return copies;
1288     }
1289 
1290     /**
1291      * Sets the copies attribute value.
1292      *
1293      * @param copies The copies to set.
1294      */
1295     public void setCopies(List<OleCopies> copies) {
1296         this.copies = copies;
1297     }
1298 
1299     /**
1300      * Gets the paymentHistory attribute.
1301      *
1302      * @return Returns the paymentHistory.
1303      */
1304     public String getPaymentHistory() {
1305         return paymentHistory;
1306     }
1307 
1308     /**
1309      * Sets the paymentHistory attribute value.
1310      *
1311      * @param paymentHistory The paymentHistory to set.
1312      */
1313     public void setPaymentHistory(String paymentHistory) {
1314         this.paymentHistory = paymentHistory;
1315     }
1316 
1317     /**
1318      * Gets the requisitionPaymentHistory attribute.
1319      *
1320      * @return Returns the requisitionPaymentHistory.
1321      */
1322     public List<OleRequisitionPaymentHistory> getRequisitionPaymentHistory() {
1323         return requisitionPaymentHistory;
1324     }
1325 
1326     /**
1327      * Sets the requisitionPaymentHistory attribute value.
1328      *
1329      * @param requisitionPaymentHistory The requisitionPaymentHistory to set.
1330      */
1331     public void setRequisitionPaymentHistory(List<OleRequisitionPaymentHistory> requisitionPaymentHistory) {
1332         this.requisitionPaymentHistory = requisitionPaymentHistory;
1333     }
1334 
1335     /**
1336      * Gets the itemTypeDescription attribute.
1337      *
1338      * @return Returns the itemTypeDescription.
1339      */
1340     public String getItemTypeDescription() {
1341         return itemTypeDescription;
1342     }
1343 
1344     /**
1345      * Sets the itemTypeDescription attribute value.
1346      *
1347      * @param itemTypeDescription The itemTypeDescription to set.
1348      */
1349     public void setItemTypeDescription(String itemTypeDescription) {
1350         this.itemTypeDescription = itemTypeDescription;
1351     }
1352 
1353     public String getCopiesOrdered() {
1354         return String.valueOf(super.getItemQuantity().intValue());
1355     }
1356 
1357     public void setCopiesOrdered(String copiesOrdered) {
1358         super.setItemQuantity(new KualiDecimal(copiesOrdered));
1359     }
1360 
1361     /**
1362      * Gets the oleItemQuantity attribute.
1363      *
1364      * @return Returns the oleItemQuantity.
1365      */
1366     public KualiInteger getOleItemQuantity() {
1367         return new KualiInteger(super.getItemQuantity().intValue());
1368     }
1369 
1370     /**
1371      * Sets the oleItemQuantity attribute value.
1372      *
1373      * @param oleItemQuantity The oleItemQuantity to set.
1374      */
1375     public void setOleItemQuantity(KualiInteger oleItemQuantity) {
1376         super.setItemQuantity(new KualiDecimal(oleItemQuantity.intValue()));
1377     }
1378 
1379     /**
1380      * Gets the olePatronDocument attribute.
1381      *
1382      * @return Returns the olePatronDocument.
1383      */
1384     public OLERequestorPatronDocument getOlePatronDocument() {
1385         return olePatronDocument;
1386     }
1387 
1388     /**
1389      * Sets the olePatronDocument attribute value.
1390      *
1391      * @param olePatronDocument The olePatronDocument to set.
1392      */
1393     public void setOlePatronDocument(OLERequestorPatronDocument olePatronDocument) {
1394         this.olePatronDocument = olePatronDocument;
1395     }
1396 
1397     /**
1398      * Gets the olePatronId attribute.
1399      *
1400      * @return Returns the olePatronId.
1401      */
1402     public String getOlePatronId() {
1403         return olePatronId;
1404     }
1405 
1406     /**
1407      * Sets the olePatronId attribute value.
1408      *
1409      * @param olePatronId The olePatronId to set.
1410      */
1411     public void setOlePatronId(String olePatronId) {
1412         this.olePatronId = olePatronId;
1413     }
1414 
1415     /**
1416      * Sets the firstName attribute value.
1417      *
1418      * @param firstName The firstName to set.
1419      */
1420     public void setFirstName(String firstName) {
1421         this.firstName = firstName;
1422     }
1423 
1424     /**
1425      * Gets the firstName attribute.
1426      *
1427      * @return Returns the firstName.
1428      */
1429     public String getFirstName() {
1430         return firstName;
1431     }
1432 
1433 
1434     //Invoice Document
1435     private String copiesInvoicedNumber;
1436     private KualiInteger noOfCopiesInvoiced;
1437     private String partsInvoicedNumber;
1438     private KualiInteger noOfPartsInvoiced;
1439 
1440     public String getPartsInvoicedNumber() {
1441         return String.valueOf(noOfPartsInvoiced);
1442     }
1443 
1444     public void setPartsInvoicedNumber(String partsInvoicedNumber) {
1445         this.noOfPartsInvoiced = new KualiInteger(partsInvoicedNumber);
1446     }
1447 
1448     public String getCopiesInvoicedNumber() {
1449         return String.valueOf(noOfCopiesInvoiced);
1450     }
1451 
1452     public void setCopiesInvoicedNumber(String copiesInvoicedNumber) {
1453         // this.copiesInvoicedNumber = copiesInvoicedNumber;
1454         this.noOfCopiesInvoiced = new KualiInteger(copiesInvoicedNumber);
1455     }
1456 
1457     public KualiInteger getNoOfCopiesInvoiced() {
1458         return noOfCopiesInvoiced;
1459     }
1460 
1461     public void setNoOfCopiesInvoiced(KualiInteger noOfCopiesInvoiced) {
1462         this.noOfCopiesInvoiced = noOfCopiesInvoiced;
1463     }
1464 
1465     public KualiInteger getNoOfPartsInvoiced() {
1466         return noOfPartsInvoiced;
1467     }
1468 
1469     public void setNoOfPartsInvoiced(KualiInteger noOfPartsInvoiced) {
1470         this.noOfPartsInvoiced = noOfPartsInvoiced;
1471     }
1472 
1473     public boolean isItemForInvoice() {
1474         return itemForInvoice;
1475     }
1476 
1477     public void setItemForInvoice(boolean itemForInvoice) {
1478         this.itemForInvoice = itemForInvoice;
1479     }
1480 
1481     public List<OleInvoiceNote> getInvoiceNotes() {
1482         return invoiceNotes;
1483     }
1484 
1485     public void setInvoiceNotes(List<OleInvoiceNote> invoiceNotes) {
1486         this.invoiceNotes = invoiceNotes;
1487     }
1488 
1489     public String getOpenQuantity() {
1490         return String.valueOf(poOutstandingQuantity);
1491     }
1492 
1493     public void setOpenQuantity(String openQuantity) {
1494         this.poOutstandingQuantity = new KualiDecimal(openQuantity);
1495     }
1496 
1497     public KualiDecimal getPoOutstandingQuantity() {
1498         return poOutstandingQuantity;
1499     }
1500 
1501     public void setPoOutstandingQuantity(KualiDecimal poOutstandingQuantity) {
1502         this.poOutstandingQuantity = poOutstandingQuantity;
1503     }
1504 
1505     public String getInvoiceItemListPrice() {
1506         return invoiceItemListPrice;
1507     }
1508 
1509     public void setInvoiceItemListPrice(String invoiceItemListPrice) {
1510         this.invoiceItemListPrice = invoiceItemListPrice;
1511     }
1512 
1513     public String getInvoiceForeignItemListPrice() {
1514         return invoiceForeignItemListPrice;
1515     }
1516 
1517     public void setInvoiceForeignItemListPrice(String invoiceForeignItemListPrice) {
1518         this.invoiceForeignItemListPrice = invoiceForeignItemListPrice;
1519     }
1520 
1521     public String getInvoiceExchangeRate() {
1522         return invoiceExchangeRate;
1523     }
1524 
1525     public void setInvoiceExchangeRate(String invoiceExchangeRate) {
1526         this.invoiceExchangeRate = invoiceExchangeRate;
1527     }
1528 
1529     public String getInvoiceForeignDiscount() {
1530         return invoiceForeignDiscount;
1531     }
1532 
1533     public void setInvoiceForeignDiscount(String invoiceForeignDiscount) {
1534         this.invoiceForeignDiscount = invoiceForeignDiscount;
1535     }
1536 
1537     public String getInvoiceForeignUnitCost() {
1538         return invoiceForeignUnitCost;
1539     }
1540 
1541     public void setInvoiceForeignUnitCost(String invoiceForeignUnitCost) {
1542         this.invoiceForeignUnitCost = invoiceForeignUnitCost;
1543     }
1544 
1545     public String getInvoiceForeignCurrency() {
1546         return invoiceForeignCurrency;
1547     }
1548 
1549     public void setInvoiceForeignCurrency(String invoiceForeignCurrency) {
1550         this.invoiceForeignCurrency = invoiceForeignCurrency;
1551     }
1552 
1553     public String getInvoiceForeignDiscountType() {
1554         return invoiceForeignDiscountType;
1555     }
1556 
1557     public void setInvoiceForeignDiscountType(String invoiceForeignDiscountType) {
1558         this.invoiceForeignDiscountType = invoiceForeignDiscountType;
1559     }
1560 
1561     public Date getSubscriptionFromDate() {
1562         return subscriptionFromDate;
1563     }
1564 
1565     public void setSubscriptionFromDate(Date subscriptionFromDate) {
1566         this.subscriptionFromDate = subscriptionFromDate;
1567     }
1568 
1569     public Date getSubscriptionToDate() {
1570         return subscriptionToDate;
1571     }
1572 
1573     public void setSubscriptionToDate(Date subscriptionToDate) {
1574         this.subscriptionToDate = subscriptionToDate;
1575     }
1576 
1577     public boolean isSubscriptionOverlap() {
1578         return subscriptionOverlap;
1579     }
1580 
1581     public void setSubscriptionOverlap(boolean subscriptionOverlap) {
1582         this.subscriptionOverlap = subscriptionOverlap;
1583     }
1584 
1585     public List<OleCopy> getDeletedCopiesList() {
1586         return deletedCopiesList;
1587     }
1588 
1589     public void setDeletedCopiesList(List<OleCopy> deletedCopiesList) {
1590         this.deletedCopiesList = deletedCopiesList;
1591     }
1592 
1593     /**
1594      * This method returns the Invoice History for the given Item
1595      * @return paymentHistoryInvoiceViews
1596      */
1597     public List<InvoiceView> getPaymentHistoryInvoiceViews() {
1598         if (this.getPurapDocument() != null && ((OlePurchaseOrderDocument)this.getPurapDocument()).getRelatedViews() != null) {
1599             paymentHistoryInvoiceViews = ((OlePurchaseOrderDocument)this.getPurapDocument()).getRelatedViews().updateRelatedView
1600                     (InvoiceView.class, paymentHistoryInvoiceViews, false);
1601         }
1602 
1603         return paymentHistoryInvoiceViews;
1604     }
1605 
1606     /**
1607      * This method sets the Invoice History for the Given Items
1608      * @param paymentHistoryInvoiceViews
1609      */
1610     public void setPaymentHistoryInvoiceViews(List<InvoiceView> paymentHistoryInvoiceViews) {
1611         this.paymentHistoryInvoiceViews = paymentHistoryInvoiceViews;
1612     }
1613 
1614     public List<OleInvoiceDocument> getInvoiceDocuments() {
1615         return invoiceDocuments;
1616     }
1617 
1618     public void setInvoiceDocuments(List<OleInvoiceDocument> invoiceDocuments) {
1619         this.invoiceDocuments = invoiceDocuments;
1620     }
1621 
1622     public boolean isLocationFlag() {
1623         return locationFlag;
1624     }
1625 
1626     public void setLocationFlag(boolean locationFlag) {
1627         this.locationFlag = locationFlag;
1628     }
1629 
1630     public boolean isClaimFilter() {
1631         return claimFilter;
1632     }
1633 
1634     public void setClaimFilter(boolean claimFilter) {
1635         this.claimFilter = claimFilter;
1636     }
1637 
1638     public boolean isItemLocationChangeFlag() {
1639         return itemLocationChangeFlag;
1640     }
1641 
1642     public void setItemLocationChangeFlag(boolean itemLocationChangeFlag) {
1643         this.itemLocationChangeFlag = itemLocationChangeFlag;
1644     }
1645 
1646     public KualiDecimal getPreviousItemQuantity() {
1647         return previousItemQuantity;
1648     }
1649 
1650     public void setPreviousItemQuantity(KualiDecimal previousItemQuantity) {
1651         this.previousItemQuantity = previousItemQuantity;
1652     }
1653 
1654     public KualiInteger getPreviousItemNoOfParts() {
1655         return previousItemNoOfParts;
1656     }
1657 
1658     public void setPreviousItemNoOfParts(KualiInteger previousItemNoOfParts) {
1659         this.previousItemNoOfParts = previousItemNoOfParts;
1660     }
1661 
1662     //Added for Jira OLE-5370
1663     public String getTitle() {
1664         title = getItemDescription();
1665         if(title.contains(OLEConstants.ANGLE_BRACKET_LESS_THAN)){
1666             title = title.replace(OLEConstants.ANGLE_BRACKET_LESS_THAN,"&#60;");
1667         }
1668         if(title.contains(OLEConstants.ANGLE_BRACKET_GREATER_THAN)){
1669             title = title.replace(OLEConstants.ANGLE_BRACKET_GREATER_THAN,"&#62;");
1670         }
1671         return title;
1672     }
1673 
1674     public void setTitle(String title) {
1675         this.title = title;
1676     }
1677 
1678     public BibInfoRecord getBibInfoRecord() {
1679         return bibInfoRecord;
1680     }
1681 
1682     public void setBibInfoRecord(BibInfoRecord bibInfoRecord) {
1683         this.bibInfoRecord = bibInfoRecord;
1684     }
1685 }