1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.ole.select.businessobject;
17
18 import org.apache.commons.lang.StringUtils;
19 import org.kuali.ole.module.purap.PurapConstants;
20 import org.kuali.ole.module.purap.PurapPropertyConstants;
21 import org.kuali.ole.module.purap.businessobject.InvoiceItem;
22 import org.kuali.ole.module.purap.businessobject.PurApItemUseTax;
23 import org.kuali.ole.module.purap.businessobject.PurchaseOrderItem;
24 import org.kuali.ole.module.purap.document.InvoiceDocument;
25 import org.kuali.ole.module.purap.util.ExpiredOrClosedAccountEntry;
26 import org.kuali.ole.module.purap.util.PurApRelatedViews;
27 import org.kuali.ole.pojo.OleOrderRecord;
28 import org.kuali.ole.select.OleSelectConstant;
29 import org.kuali.ole.select.lookup.DocData;
30 import org.kuali.ole.sys.businessobject.UnitOfMeasure;
31 import org.kuali.rice.core.api.util.type.AbstractKualiDecimal;
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.kew.api.KewApiConstants;
35 import org.kuali.rice.kew.api.KewApiServiceLocator;
36 import org.kuali.rice.kew.api.doctype.DocumentType;
37 import org.kuali.rice.krad.util.KRADConstants;
38 import org.kuali.rice.krad.util.ObjectUtils;
39
40 import java.math.BigDecimal;
41 import java.util.ArrayList;
42 import java.util.HashMap;
43 import java.util.List;
44
45 public class OleInvoiceItem extends InvoiceItem {
46
47 private static org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(OleInvoiceItem.class);
48
49 protected String itemCurrencyType;
50 protected KualiDecimal itemForeignListPrice;
51 protected KualiDecimal itemForeignDiscount;
52 protected String itemForeignDiscountType;
53 protected KualiDecimal itemForeignDiscountAmt;
54 protected KualiDecimal itemForeignUnitCost;
55 protected KualiDecimal itemExchangeRate;
56 protected KualiDecimal itemUnitCostUSD;
57 protected KualiDecimal foreignCurrencyExtendedPrice;
58
59 protected boolean debitItem = true;
60 protected String invoiceListPrice;
61 protected String additionalUnitPrice;
62
63
64 protected Integer formatTypeId;
65 protected KualiInteger itemNoOfParts;
66 protected KualiDecimal itemListPrice;
67 protected KualiDecimal itemDiscount;
68 private String discountItem;
69 protected String itemDiscountType;
70 protected BigDecimal itemSurcharge;
71 protected String note;
72 protected List<OleInvoiceNote> notes;
73 protected Integer poItemIdentifier;
74
75 private Boolean relatedViewExist;
76 private transient PurApRelatedViews relatedViews;
77 private UnitOfMeasure itemUnitOfMeasure;
78
79 private String vendorItemIdentifier;
80
81
82 private BibInfoBean bibInfoBean;
83 protected String itemTitleId;
84 protected String bibUUID;
85 private DocData docData;
86 private InvoiceDocument invoiceDocument;
87 private OleOrderRecord oleOrderRecord;
88 protected Integer receiptStatusId;
89 private OleReceiptStatus oleReceiptStatus;
90 private boolean useTaxIndicator;
91
92
93
94 private KualiInteger oleItemQuantity;
95 private String oleCopiesOrdered;
96 private KualiInteger olePoOutstandingQuantity;
97 private String oleOpenQuantity;
98 private OleFormatType formatType = new OleFormatType();
99 private String poItemLink;
100
101
102
103 public String getOleOpenQuantity() {
104 if (getPoOutstandingQuantity() != null) {
105 return String.valueOf(super.getPoOutstandingQuantity().intValue());
106 }
107 return "0";
108 }
109
110 public void setOleOpenQuantity(String oleOpenQuantity) {
111 if (oleOpenQuantity != null) {
112 super.setPoOutstandingQuantity(new KualiDecimal(oleOpenQuantity));
113 }
114 }
115
116 public String getVendorItemIdentifier() {
117 return vendorItemIdentifier;
118 }
119
120 public void setVendorItemIdentifier(String vendorItemIdentifier) {
121 this.vendorItemIdentifier = vendorItemIdentifier;
122 }
123
124
125
126
127
128
129 public Integer getReceiptStatusId() {
130 return receiptStatusId;
131 }
132
133
134
135
136
137
138 public void setReceiptStatusId(Integer receiptStatusId) {
139 this.receiptStatusId = receiptStatusId;
140 }
141
142
143
144
145
146
147 public OleReceiptStatus getOleReceiptStatus() {
148 return oleReceiptStatus;
149 }
150
151
152
153
154
155
156 public void setOleReceiptStatus(OleReceiptStatus oleReceiptStatus) {
157 this.oleReceiptStatus = oleReceiptStatus;
158 }
159
160 public OleOrderRecord getOleOrderRecord() {
161 return oleOrderRecord;
162 }
163
164 public void setOleOrderRecord(OleOrderRecord oleOrderRecord) {
165 this.oleOrderRecord = oleOrderRecord;
166 }
167
168
169 protected boolean additionalChargeUsd;
170
171
172
173
174 public OleInvoiceItem() {
175 this.setItemNoOfParts(new KualiInteger(1));
176 this.setItemUnitOfMeasureCode(PurapConstants.InvoiceDocumentStrings.CUSTOMER_INVOICE_DETAIL_UOM_DEFAULT);
177 this.setOleItemQuantity(new KualiInteger(1));
178 this.setItemListPrice(new KualiDecimal(0.00));
179 notes = new ArrayList<OleInvoiceNote>();
180
181 this.setItemCurrencyType(OleSelectConstant.USD);
182 }
183
184
185
186
187
188
189
190
191 public OleInvoiceItem(PurchaseOrderItem poi, InvoiceDocument prqs, HashMap<String, ExpiredOrClosedAccountEntry> expiredOrClosedAccountList) {
192 super(poi, prqs, expiredOrClosedAccountList);
193 this.setInvoiceDocument(prqs);
194 LOG.debug("Inside OleInvoiceItem Constructor");
195 LOG.debug("Setting the Format,Discount and Price Details");
196 notes = new ArrayList<OleInvoiceNote>();
197
198 OlePurchaseOrderItem olePoi = (OlePurchaseOrderItem) poi;
199 olePoi.getItemTypeCode();
200 notes.addAll(olePoi.getInvoiceNotes());
201 this.setItemForeignListPrice(olePoi.getItemForeignListPrice());
202 this.setItemForeignDiscount(olePoi.getItemForeignDiscount());
203 this.setItemForeignDiscountType(olePoi.getItemForeignDiscountType());
204 this.setItemForeignDiscountAmt(olePoi.getItemForeignDiscountAmt());
205 this.setItemForeignUnitCost(olePoi.getItemForeignUnitCost());
206 this.setItemExchangeRate(olePoi.getItemExchangeRate());
207 this.setItemUnitCostUSD(olePoi.getItemUnitCostUSD());
208 this.setFormatTypeId(olePoi.getFormatTypeId());
209 this.setItemNoOfParts(olePoi.getNoOfPartsInvoiced());
210 this.setItemListPrice(olePoi.getItemListPrice());
211 this.setItemDiscount(olePoi.getItemDiscount() != null ? olePoi.getItemDiscount() : new KualiDecimal(0.00));
212 this.setItemDiscountType(olePoi.getItemDiscountType());
213 this.setItemCatalogNumber(olePoi.getItemCatalogNumber());
214 this.setPoItemIdentifier(olePoi.getItemIdentifier());
215 this.setExtendedPrice(olePoi.getExtendedPrice());
216 this.setItemQuantity(olePoi.getItemQuantity());
217 this.setBibInfoBean(olePoi.getBibInfoBean());
218 this.setItemTitleId(olePoi.getItemTitleId());
219 if (olePoi.getNoOfCopiesInvoiced() != null) {
220 this.setItemQuantity(olePoi.getNoOfCopiesInvoiced().kualiDecimalValue());
221 }
222 if (new KualiDecimal(olePoi.getInvoiceItemListPrice()).isLessThan(AbstractKualiDecimal.ZERO)) {
223 this.setInvoiceListPrice(olePoi.getInvoiceItemListPrice());
224 }
225 else {
226 this.setItemListPrice(new KualiDecimal(olePoi.getInvoiceItemListPrice()));
227 }
228
229 this.setItemUnitPrice(this.getItemListPrice().bigDecimalValue());
230 this.setExtendedPrice(this.calculateExtendedPrice()) ;
231
232 this.setItemCurrencyType(OleSelectConstant.USD);
233 this.setReceiptStatusId(olePoi.getReceiptStatusId());
234 this.setItemSurcharge(olePoi.getItemSurcharge());
235 this.setPurapDocumentIdentifier(prqs.getPurapDocumentIdentifier());
236 }
237
238
239
240
241
242
243
244 public OleInvoiceItem(PurchaseOrderItem poi, InvoiceDocument prqs) {
245 super(poi, prqs);
246 this.setInvoiceDocument(prqs);
247 LOG.debug("Inside OleInvoiceItem Constructor");
248 LOG.debug("Setting the Format,Discount and Price Details");
249 notes = new ArrayList<OleInvoiceNote>();
250 OlePurchaseOrderItem olePoi = (OlePurchaseOrderItem) poi;
251 notes.addAll(olePoi.getInvoiceNotes());
252 this.setItemForeignListPrice(olePoi.getItemForeignListPrice());
253 this.setItemForeignDiscount(olePoi.getItemForeignDiscount());
254 this.setItemForeignDiscountType(olePoi.getItemForeignDiscountType());
255 this.setItemForeignDiscountAmt(olePoi.getItemForeignDiscountAmt());
256 this.setItemForeignUnitCost(olePoi.getItemForeignUnitCost());
257 this.setItemExchangeRate(olePoi.getItemExchangeRate());
258 this.setItemUnitCostUSD(olePoi.getItemUnitCostUSD());
259 this.setFormatTypeId(olePoi.getFormatTypeId());
260 this.setItemNoOfParts(olePoi.getItemNoOfParts());
261 this.setItemListPrice(olePoi.getItemListPrice());
262 this.setItemDiscount(olePoi.getItemDiscount() != null ? olePoi.getItemDiscount() : new KualiDecimal(0.00));
263 this.setItemDiscountType(olePoi.getItemDiscountType());
264 this.setItemCatalogNumber(olePoi.getItemCatalogNumber());
265 this.setPoItemIdentifier(olePoi.getItemIdentifier());
266 if (olePoi.getNoOfCopiesInvoiced() != null) {
267 this.setItemQuantity(olePoi.getNoOfCopiesInvoiced().kualiDecimalValue());
268 }
269 if (new KualiDecimal(olePoi.getInvoiceItemListPrice()).isLessThan(AbstractKualiDecimal.ZERO)) {
270 this.setInvoiceListPrice(olePoi.getInvoiceItemListPrice());
271 }
272 else {
273 this.setItemListPrice(new KualiDecimal(olePoi.getInvoiceItemListPrice()));
274 }
275
276 this.setItemUnitPrice(this.getItemListPrice().bigDecimalValue());
277 this.setExtendedPrice(this.calculateExtendedPrice()) ;
278
279 this.setItemCurrencyType(OleSelectConstant.USD);
280 this.setPurapDocumentIdentifier(prqs.getPurapDocumentIdentifier());
281 }
282
283 @Override
284 public boolean isConsideredEnteredWithZero() {
285 return isConsideredEntered(true);
286 }
287
288 @Override
289 public boolean isConsideredEnteredWithoutZero() {
290 return isConsideredEntered(false);
291 }
292
293 private boolean isConsideredEntered(boolean allowsZero) {
294 if (getItemType().isLineItemIndicator()) {
295 if ((getItemType().isQuantityBasedGeneralLedgerIndicator())) {
296 if ((ObjectUtils.isNull(getItemQuantity()) || getItemQuantity().isZero()) && (ObjectUtils.isNull(getExtendedPrice()) || (allowsZero && getExtendedPrice().isZero()))) {
297 return false;
298 }
299 } else {
300 if (ObjectUtils.isNull(getExtendedPrice()) || (allowsZero && getExtendedPrice().isZero())) {
301 return false;
302 }
303 }
304 } else {
305 if ((ObjectUtils.isNull(getItemUnitPrice()) || (allowsZero && this.getItemUnitPrice().compareTo(new BigDecimal(0)) == 0)) && (StringUtils.isBlank(getItemDescription()))) {
306 return false;
307 }
308 }
309
310 return true;
311 }
312
313 public String getItemCurrencyType() {
314 return itemCurrencyType;
315 }
316
317 public void setItemCurrencyType(String itemCurrencyType) {
318 this.itemCurrencyType = itemCurrencyType;
319 }
320
321 public KualiDecimal getItemForeignListPrice() {
322 return itemForeignListPrice;
323 }
324
325 public void setItemForeignListPrice(KualiDecimal itemForeignListPrice) {
326 this.itemForeignListPrice = itemForeignListPrice;
327 }
328
329 public KualiDecimal getItemForeignDiscount() {
330 return itemForeignDiscount;
331 }
332
333 public void setItemForeignDiscount(KualiDecimal itemForeignDiscount) {
334 this.itemForeignDiscount = itemForeignDiscount;
335 }
336
337 public String getItemForeignDiscountType() {
338 return itemForeignDiscountType;
339 }
340
341 public void setItemForeignDiscountType(String itemForeignDiscountType) {
342 this.itemForeignDiscountType = itemForeignDiscountType;
343 }
344
345 public KualiDecimal getItemForeignDiscountAmt() {
346 return itemForeignDiscountAmt;
347 }
348
349 public void setItemForeignDiscountAmt(KualiDecimal itemForeignDiscountAmt) {
350 this.itemForeignDiscountAmt = itemForeignDiscountAmt;
351 }
352
353 public KualiDecimal getItemForeignUnitCost() {
354 return itemForeignUnitCost;
355 }
356
357 public void setItemForeignUnitCost(KualiDecimal itemForeignUnitCost) {
358 this.itemForeignUnitCost = itemForeignUnitCost;
359 }
360
361 public KualiDecimal getItemExchangeRate() {
362 return itemExchangeRate;
363 }
364
365 public void setItemExchangeRate(KualiDecimal itemExchangeRate) {
366 this.itemExchangeRate = itemExchangeRate;
367 }
368
369 public KualiDecimal getItemUnitCostUSD() {
370 return itemUnitCostUSD;
371 }
372
373 public void setItemUnitCostUSD(KualiDecimal itemUnitCostUSD) {
374 this.itemUnitCostUSD = itemUnitCostUSD;
375 }
376
377 public Integer getFormatTypeId() {
378 return formatTypeId;
379 }
380
381 public void setFormatTypeId(Integer formatTypeId) {
382 this.formatTypeId = formatTypeId;
383 }
384
385 public KualiInteger getItemNoOfParts() {
386 if (this.itemNoOfParts != null) {
387 return itemNoOfParts;
388 } else {
389 return itemNoOfParts;
390 }
391 }
392
393 public void setItemNoOfParts(KualiInteger itemNoOfParts) {
394 this.itemNoOfParts = itemNoOfParts;
395 }
396
397 public KualiDecimal getItemListPrice() {
398 return itemListPrice;
399 }
400
401 public void setItemListPrice(KualiDecimal itemListPrice) {
402 this.itemListPrice = itemListPrice;
403 }
404
405 public String getDiscountItem() {
406 return String.valueOf(itemDiscount) != null ? String.valueOf(itemDiscount) : "0" ;
407 }
408
409 public void setDiscountItem(String discountItem) {
410 this.itemDiscount = new KualiDecimal(discountItem);
411 }
412
413 public KualiDecimal getItemDiscount() {
414 return itemDiscount;
415 }
416
417 public void setItemDiscount(KualiDecimal itemDiscount) {
418 this.itemDiscount = itemDiscount;
419 }
420
421 public String getItemDiscountType() {
422 return itemDiscountType;
423 }
424
425 public void setItemDiscountType(String itemDiscountType) {
426 this.itemDiscountType = itemDiscountType;
427 }
428
429 public BigDecimal getItemSurcharge() {
430 return itemSurcharge;
431 }
432
433 public void setItemSurcharge(BigDecimal itemSurcharge) {
434 this.itemSurcharge = itemSurcharge;
435 }
436
437 public Integer getPoItemIdentifier() {
438 return poItemIdentifier;
439 }
440
441 public void setPoItemIdentifier(Integer poItemIdentifier) {
442 this.poItemIdentifier = poItemIdentifier;
443 }
444
445 public String getNote() {
446 return note;
447 }
448
449 public void setNote(String note) {
450 this.note = note;
451 }
452
453 public List<OleInvoiceNote> getNotes() {
454 return notes;
455 }
456
457 public void setNotes(List<OleInvoiceNote> notes) {
458 this.notes = notes;
459 }
460
461 public UnitOfMeasure getItemUnitOfMeasure() {
462 if (ObjectUtils.isNull(itemUnitOfMeasure) || !StringUtils.equalsIgnoreCase(itemUnitOfMeasure.getItemUnitOfMeasureCode(), getItemUnitOfMeasureCode())) {
463 refreshReferenceObject(PurapPropertyConstants.ITEM_UNIT_OF_MEASURE);
464 }
465 return itemUnitOfMeasure;
466 }
467
468 public void setItemUnitOfMeasure(UnitOfMeasure itemUnitOfMeasure) {
469 this.itemUnitOfMeasure = itemUnitOfMeasure;
470 }
471
472 public boolean getIsUnorderedItem() {
473 if (this.getItemTypeCode().equalsIgnoreCase(PurapConstants.ItemTypeCodes.ITEM_TYPE_UNORDERED_ITEM_CODE)) {
474 return false;
475 }
476 return true;
477 }
478
479 public KualiDecimal getForeignCurrencyExtendedPrice() {
480 return foreignCurrencyExtendedPrice;
481 }
482
483 public void setForeignCurrencyExtendedPrice(KualiDecimal foreignCurrencyExtendedPrice) {
484 this.foreignCurrencyExtendedPrice = foreignCurrencyExtendedPrice;
485 }
486
487 public String getItemTitleId() {
488 return itemTitleId;
489 }
490
491 public void setItemTitleId(String itemTitleId) {
492 this.itemTitleId = itemTitleId;
493 }
494
495 public BibInfoBean getBibInfoBean() {
496 return bibInfoBean;
497 }
498
499 public void setBibInfoBean(BibInfoBean bibInfoBean) {
500 this.bibInfoBean = bibInfoBean;
501 }
502
503 public String getBibUUID() {
504 return bibUUID;
505 }
506
507 public void setBibUUID(String bibUUID) {
508 this.bibUUID = bibUUID;
509 }
510
511 public DocData getDocData() {
512 return docData;
513 }
514
515 public void setDocData(DocData docData) {
516 this.docData = docData;
517 }
518
519 public InvoiceDocument getInvoiceDocument() {
520 return invoiceDocument;
521 }
522
523 public void setInvoiceDocument(InvoiceDocument invoiceDocument) {
524 setPurapDocument(invoiceDocument);
525 this.invoiceDocument = invoiceDocument;
526 }
527
528 public boolean isAdditionalChargeUsd() {
529 return additionalChargeUsd;
530 }
531
532 public void setAdditionalChargeUsd(boolean additionalChargeUsd) {
533 this.additionalChargeUsd = additionalChargeUsd;
534 }
535
536 public String getOleCopiesOrdered() {
537 return String.valueOf(super.getItemQuantity().intValue());
538 }
539
540 public void setOleCopiesOrdered(String oleCopiesOrdered) {
541 super.setItemQuantity(new KualiDecimal(oleCopiesOrdered));
542 }
543
544
545
546
547
548
549 public KualiInteger getOleItemQuantity() {
550 return new KualiInteger(super.getItemQuantity().intValue());
551 }
552
553
554
555
556
557
558 public void setOleItemQuantity(KualiInteger oleItemQuantity) {
559 super.setItemQuantity(new KualiDecimal(oleItemQuantity.intValue()));
560 }
561
562
563
564
565
566
567 public KualiInteger getOlePoOutstandingQuantity() {
568 if (getPoOutstandingQuantity() != null) {
569 return new KualiInteger(super.getPoOutstandingQuantity().intValue());
570 }
571 return new KualiInteger(0);
572 }
573
574
575
576
577
578
579 public void setOlePoOutstandingQuantity(KualiInteger olePoOutstandingQuantity) {
580 if (olePoOutstandingQuantity != null) {
581 super.setPoOutstandingQuantity(new KualiDecimal(olePoOutstandingQuantity.intValue()));
582 }
583 }
584
585 public boolean isUseTaxIndicator() {
586 return useTaxIndicator;
587 }
588
589 public void setUseTaxIndicator(boolean useTaxIndicator) {
590 this.useTaxIndicator = useTaxIndicator;
591 }
592
593 @Override
594 public KualiDecimal getItemTaxAmount() {
595 KualiDecimal taxAmount = KualiDecimal.ZERO;
596
597
598
599
600
601 if (this.isUseTaxIndicator() == false) {
602 taxAmount = this.getItemSalesTaxAmount();
603 } else {
604
605 for (PurApItemUseTax useTaxItem : this.getUseTaxItems()) {
606 taxAmount = taxAmount.add(useTaxItem.getTaxAmount());
607 }
608 }
609
610 return taxAmount;
611 }
612
613 public OleFormatType getFormatType() {
614 return formatType;
615 }
616
617 public void setFormatType(OleFormatType formatType) {
618 this.formatType = formatType;
619 }
620
621 public PurApRelatedViews getRelatedViews() {
622 if (!getRelatedViewExist()) {
623 relatedViews = new PurApRelatedViews(this.getInvoiceDocument()!=null?this.getInvoiceDocument().getDocumentNumber():null,
624 this.getAccountsPayablePurchasingDocumentLinkIdentifier()!=null?this.getAccountsPayablePurchasingDocumentLinkIdentifier():null);
625 ;
626 }
627 return relatedViews;
628 }
629
630 public void setRelatedViews(PurApRelatedViews relatedViews) {
631 this.relatedViews = relatedViews;
632 }
633
634 public Boolean getRelatedViewExist() {
635 if (this.relatedViews != null) {
636 this.relatedViewExist = Boolean.TRUE;
637 } else {
638 this.relatedViewExist = Boolean.FALSE;
639 }
640 return relatedViewExist;
641 }
642
643 public void setRelatedViewExist(Boolean relatedViewExist) {
644 this.relatedViewExist = relatedViewExist;
645 }
646
647 public boolean isDebitItem() {
648 return debitItem;
649 }
650
651 public void setDebitItem(boolean debitItem) {
652 this.debitItem = debitItem;
653 }
654
655 public String getInvoiceListPrice() {
656 if (!isDebitItem()) {
657 return this.getItemListPrice() != null ? this.getItemListPrice().negated().toString() : null;
658 }
659 return itemListPrice.toString();
660 }
661
662 public void setInvoiceListPrice(String invoiceListPrice) {
663 if (invoiceListPrice != null && !invoiceListPrice.isEmpty() &&
664 (new KualiDecimal(invoiceListPrice)).isLessThan(AbstractKualiDecimal.ZERO)) {
665 this.setDebitItem(false);
666 }
667 this.setItemListPrice((new KualiDecimal(invoiceListPrice)).abs());
668 this.invoiceListPrice = invoiceListPrice;
669 }
670
671 public String getAdditionalUnitPrice() {
672 if (!isDebitItem()) {
673 return this.getItemUnitPrice() != null ? this.getItemUnitPrice().negate().toString() : null;
674 }
675 return this.getItemUnitPrice() != null ? this.getItemUnitPrice().toString() : null;
676 }
677
678 public void setAdditionalUnitPrice(String additionalUnitPrice) {
679 if (additionalUnitPrice != null && !additionalUnitPrice.isEmpty() &&
680 (new KualiDecimal(additionalUnitPrice)).isLessThan(AbstractKualiDecimal.ZERO)) {
681 this.setDebitItem(false);
682 }
683 this.setItemUnitPrice((new BigDecimal(additionalUnitPrice)).abs());
684 this.additionalUnitPrice = additionalUnitPrice;
685 }
686
687 public String getPoItemLink() {
688 String documentTypeName = PurapConstants.PurchaseOrderDocTypes.PURCHASE_ORDER_DOCUMENT;
689 DocumentType docType = KewApiServiceLocator.getDocumentTypeService().getDocumentTypeByName(documentTypeName);
690 String docHandlerUrl = docType.getResolvedDocumentHandlerUrl();
691 int endSubString = docHandlerUrl.lastIndexOf("/");
692 String serverName = docHandlerUrl.substring(0, endSubString);
693 String handler = docHandlerUrl.substring(endSubString + 1, docHandlerUrl.lastIndexOf("?"));
694 return serverName + "/" + KRADConstants.PORTAL_ACTION + "?channelTitle=" + docType.getName() + "&channelUrl=" +
695 handler + "?" + KRADConstants.DISPATCH_REQUEST_PARAMETER + "=" + KRADConstants.DOC_HANDLER_METHOD + "&" +
696 KRADConstants.PARAMETER_DOC_ID + "=" + this.getPurchaseOrderDocument().getDocumentNumber() + "&" + KRADConstants.PARAMETER_COMMAND + "=" +
697 KewApiConstants.DOCSEARCH_COMMAND;
698 }
699
700 public void setPoItemLink(String poItemLink) {
701 this.poItemLink = poItemLink;
702 }
703 }