001/*
002 * Copyright 2006-2009 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
017/*
018 * Created on Aug 25, 2004
019 *
020 */
021package org.kuali.ole.module.purap.businessobject;
022
023import org.apache.commons.lang.StringUtils;
024import org.apache.commons.lang.builder.ToStringBuilder;
025import org.kuali.ole.module.purap.PurapConstants;
026import org.kuali.ole.module.purap.document.ElectronicInvoiceRejectDocument;
027import org.kuali.ole.module.purap.util.PurApDateFormatUtils;
028import org.kuali.ole.module.purap.util.cxml.CxmlExtrinsic;
029
030import java.math.BigDecimal;
031import java.text.ParseException;
032import java.text.SimpleDateFormat;
033import java.util.ArrayList;
034import java.util.Date;
035import java.util.List;
036
037
038public class ElectronicInvoiceItem {
039    private static org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(ElectronicInvoiceItem.class);
040
041    // this class is equiped to hold InvoiceDetailItem values as well as a few rudimentary
042    // InvoiceDetailServiceItem values
043
044    private String catalogNumber;
045    private String invoiceLineNumber;
046    private String quantity;
047    private String unitOfMeasure;
048    // UnitPrice is deprecated for InvoiceDetailServiceItem tags
049    private String unitPrice; // has money xml node
050    private String unitPriceCurrency;
051    private String subTotalAmount; // has money xml node
052    private String subTotalAmountCurrency;
053    private String invoiceLineSpecialHandlingAmount; // has money xml node
054    private String invoiceLineSpecialHandlingAmountCurrency;
055    private String invoiceLineShippingAmount; // has money xml node
056    private String invoiceLineShippingAmountCurrency;
057    private String taxAmount; // has money xml node  (not all tax fields are stored as tax should never occur)
058    private String taxAmountCurrency;
059    private String taxDescription;
060    // invoiceLineGrossAmount should = subtotalAmount + taxAmount + invoiceLineSpecialHandlingAmount + invoiceLineShippingAmount
061    private String invoiceLineGrossAmount; // subtotal + taxes + shipping + special handling
062    private String invoiceLineGrossAmountCurrency;
063    private String invoiceLineDiscountAmount; // has money xml node
064    private String invoiceLineDiscountAmountCurrency;
065    private String invoiceLineDiscountPercentageRate;
066    // invoiceLineNetAmount should = invoiceLineGrossAmount - invoiceLineDiscountAmount
067    private String invoiceLineNetAmount;  // has money xml node
068    private String invoiceLineNetAmountCurrency;
069    private String shippingDateString;
070    private Date shippingDate;
071
072    private List invoiceShippingContacts = new ArrayList();
073    private List comments = new ArrayList();
074    private List extrinsic = new ArrayList();
075
076    // following fields describe PO information
077    private String referenceLineNumber; // only match available for InvoiceDetailServiceItem values
078    private String referenceSerialNumber; // attribute of <InvoiceDetailItemReference> deprecated to be <SerialNumber> inside it
079    private List<String> referenceSerialNumbers = new ArrayList<String>(); // used only if above String field is null
080    private String referenceItemIDSupplierPartID;
081    private String referenceItemIDSupplierPartAuxID;
082    private String referenceDescription;
083    private String referenceManufacturerPartID;
084    private String referenceManufacturerName;
085    private String referenceCountryCode;
086    private String referenceCountryName;
087
088    private ElectronicInvoiceRejectDocument electronicInvoiceRejectDocument;
089
090    public ElectronicInvoiceItem() {
091    }
092
093    public Integer getReferenceLineNumberInteger() {
094        if (this.referenceLineNumber != null) {
095            return new Integer(Integer.parseInt(referenceLineNumber));
096        }
097        return null;
098    }
099
100    public String getInvoiceLineShippingDescription() {
101        return "";
102    }
103
104    public BigDecimal getInvoiceLineQuantityBigDecimal() {
105        if (StringUtils.isNotEmpty(quantity)) {
106            return new BigDecimal(this.quantity);
107        } else {
108            return null;
109        }
110    }
111
112    public BigDecimal getInvoiceLineUnitCostBigDecimal() {
113        BigDecimal unitprice = BigDecimal.ZERO;
114        if (StringUtils.isNotEmpty(unitPrice)) {
115            try {
116                unitprice = new BigDecimal(this.unitPrice);
117            } catch (NumberFormatException nfe) {
118                LOG.info("invalid unit price" + this.unitPrice);
119            }
120        }
121        return unitprice;
122    }
123
124    public BigDecimal getInvoiceLineSubTotalAmountBigDecimal() {
125        BigDecimal subTotalAmount = BigDecimal.ZERO;
126        if (StringUtils.isNotEmpty(this.subTotalAmount)) {
127            try {
128                subTotalAmount = new BigDecimal(this.subTotalAmount);
129            } catch (NumberFormatException nfe) {
130                LOG.info("invalid sub Total Amount " + this.subTotalAmount);
131            }
132        }
133        return subTotalAmount;
134    }
135
136    public BigDecimal getInvoiceLineTaxAmountBigDecimal() {
137        if (StringUtils.isNotEmpty(taxAmount)) {
138            return new BigDecimal(this.taxAmount);
139        } else {
140            return BigDecimal.ZERO;
141        }
142    }
143
144    public BigDecimal getInvoiceLineSpecialHandlingAmountBigDecimal() {
145        if (StringUtils.isNotEmpty(invoiceLineSpecialHandlingAmount)) {
146            return new BigDecimal(this.invoiceLineSpecialHandlingAmount);
147        } else {
148            return BigDecimal.ZERO;
149        }
150    }
151
152    public BigDecimal getInvoiceLineShippingAmountBigDecimal() {
153        if (StringUtils.isNotEmpty(invoiceLineShippingAmount)) {
154            return new BigDecimal(this.invoiceLineShippingAmount);
155        } else {
156            return BigDecimal.ZERO;
157        }
158    }
159
160    public BigDecimal getInvoiceLineGrossAmountBigDecimal() {
161        if (StringUtils.isNotEmpty(invoiceLineGrossAmount)) {
162            return new BigDecimal(this.invoiceLineGrossAmount);
163        } else {
164            return BigDecimal.ZERO;
165        }
166    }
167
168    public BigDecimal getInvoiceLineDiscountAmountBigDecimal() {
169        if (StringUtils.isNotEmpty(invoiceLineDiscountAmount)) {
170            return new BigDecimal(this.invoiceLineDiscountAmount);
171        } else {
172            return BigDecimal.ZERO;
173        }
174    }
175
176    public BigDecimal getInvoiceLineNetAmountBigDecimal() {
177        if (StringUtils.isNotEmpty(invoiceLineNetAmount)) {
178            return new BigDecimal(this.invoiceLineNetAmount);
179        } else {
180            return BigDecimal.ZERO;
181        }
182    }
183
184    /**
185     * @return Returns the shippingDateString.
186     */
187    public String getShippingDateString() {
188        return shippingDateString;
189    }
190
191    /**
192     * @param shippingDateString The shippingDateString to set.
193     */
194    public void setShippingDateString(String shippingDateString) {
195        this.shippingDateString = shippingDateString;
196        if ((shippingDateString != null) && (!("".equals(shippingDateString)))) {
197            SimpleDateFormat sdf = PurApDateFormatUtils.getSimpleDateFormat(PurapConstants.NamedDateFormats.CXML_DATE_FORMAT);
198            try {
199                this.shippingDate = sdf.parse(shippingDateString);
200            } catch (ParseException e) {
201                // setting shipping date to null to identify problem
202                LOG.error("setShippingDateString() SimpleDateFormat parser error attempting to set invalid date string " + shippingDateString + " in ShippingDate field... setting date to null");
203                this.shippingDate = null;
204            }
205        } else {
206            this.shippingDate = null;
207        }
208    }
209
210    /**
211     * @return Returns the catalogNumber.
212     */
213    public String getCatalogNumber() {
214        return catalogNumber;
215    }
216
217    /**
218     * @param catalogNumber The catalogNumber to set.
219     */
220    public void setCatalogNumber(String catalogNumber) {
221        this.catalogNumber = catalogNumber;
222    }
223
224    /**
225     * @return Returns the comments.
226     */
227    public List getComments() {
228        return comments;
229    }
230
231    /**
232     * @param comments The comments to set.
233     */
234    public void setComments(List comments) {
235        this.comments = comments;
236    }
237
238    /**
239     * @return Returns the extrinsic.
240     */
241    public List getExtrinsic() {
242        return extrinsic;
243    }
244
245    /**
246     * @param extrinsic The extrinsic to set.
247     */
248    public void setExtrinsic(List extrinsic) {
249        this.extrinsic = extrinsic;
250    }
251
252    /**
253     * @return Returns the invoiceLineDiscountAmount.
254     */
255    public String getInvoiceLineDiscountAmount() {
256        return invoiceLineDiscountAmount;
257    }
258
259    /**
260     * @param invoiceLineDiscountAmount The invoiceLineDiscountAmount to set.
261     */
262    public void setInvoiceLineDiscountAmount(String invoiceLineDiscountAmount) {
263        this.invoiceLineDiscountAmount = invoiceLineDiscountAmount;
264    }
265
266    /**
267     * @return Returns the invoiceLineDiscountAmountCurrency.
268     */
269    public String getInvoiceLineDiscountAmountCurrency() {
270        return invoiceLineDiscountAmountCurrency;
271    }
272
273    /**
274     * @param invoiceLineDiscountAmountCurrency
275     *         The invoiceLineDiscountAmountCurrency to set.
276     */
277    public void setInvoiceLineDiscountAmountCurrency(String invoiceLineDiscountAmountCurrency) {
278        this.invoiceLineDiscountAmountCurrency = invoiceLineDiscountAmountCurrency;
279    }
280
281    /**
282     * @return Returns the invoiceLineGrossAmount.
283     */
284    public String getInvoiceLineGrossAmount() {
285        return invoiceLineGrossAmount;
286    }
287
288    /**
289     * @param invoiceLineGrossAmount The invoiceLineGrossAmount to set.
290     */
291    public void setInvoiceLineGrossAmount(String invoiceLineGrossAmount) {
292        this.invoiceLineGrossAmount = invoiceLineGrossAmount;
293    }
294
295    /**
296     * @return Returns the invoiceLineGrossAmountCurrency.
297     */
298    public String getInvoiceLineGrossAmountCurrency() {
299        return invoiceLineGrossAmountCurrency;
300    }
301
302    /**
303     * @param invoiceLineGrossAmountCurrency The invoiceLineGrossAmountCurrency to set.
304     */
305    public void setInvoiceLineGrossAmountCurrency(String invoiceLineGrossAmountCurrency) {
306        this.invoiceLineGrossAmountCurrency = invoiceLineGrossAmountCurrency;
307    }
308
309    /**
310     * @return Returns the invoiceLineNetAmount.
311     */
312    public String getInvoiceLineNetAmount() {
313        return invoiceLineNetAmount;
314    }
315
316    /**
317     * @param invoiceLineNetAmount The invoiceLineNetAmount to set.
318     */
319    public void setInvoiceLineNetAmount(String invoiceLineNetAmount) {
320        this.invoiceLineNetAmount = invoiceLineNetAmount;
321    }
322
323    /**
324     * @return Returns the invoiceLineNetAmountCurrency.
325     */
326    public String getInvoiceLineNetAmountCurrency() {
327        return invoiceLineNetAmountCurrency;
328    }
329
330    /**
331     * @param invoiceLineNetAmountCurrency The invoiceLineNetAmountCurrency to set.
332     */
333    public void setInvoiceLineNetAmountCurrency(String invoiceLineNetAmountCurrency) {
334        this.invoiceLineNetAmountCurrency = invoiceLineNetAmountCurrency;
335    }
336
337    /**
338     * @return Returns the invoiceLineNumber.
339     */
340    public String getInvoiceLineNumber() {
341        return invoiceLineNumber;
342    }
343
344    /**
345     * @param invoiceLineNumber The invoiceLineNumber to set.
346     */
347    public void setInvoiceLineNumber(String invoiceLineNumber) {
348        this.invoiceLineNumber = invoiceLineNumber;
349    }
350
351    /**
352     * @return Returns the invoiceLineShippingAmount.
353     */
354    public String getInvoiceLineShippingAmount() {
355        return invoiceLineShippingAmount;
356    }
357
358    /**
359     * @param invoiceLineShippingAmount The invoiceLineShippingAmount to set.
360     */
361    public void setInvoiceLineShippingAmount(String invoiceLineShippingAmount) {
362        this.invoiceLineShippingAmount = invoiceLineShippingAmount;
363    }
364
365    /**
366     * @return Returns the invoiceLineShippingAmountCurrency.
367     */
368    public String getInvoiceLineShippingAmountCurrency() {
369        return invoiceLineShippingAmountCurrency;
370    }
371
372    /**
373     * @param invoiceLineShippingAmountCurrency
374     *         The invoiceLineShippingAmountCurrency to set.
375     */
376    public void setInvoiceLineShippingAmountCurrency(String invoiceLineShippingAmountCurrency) {
377        this.invoiceLineShippingAmountCurrency = invoiceLineShippingAmountCurrency;
378    }
379
380    /**
381     * @return Returns the invoiceLineSpecialHandlingAmount.
382     */
383    public String getInvoiceLineSpecialHandlingAmount() {
384        return invoiceLineSpecialHandlingAmount;
385    }
386
387    /**
388     * @param invoiceLineSpecialHandlingAmount
389     *         The invoiceLineSpecialHandlingAmount to set.
390     */
391    public void setInvoiceLineSpecialHandlingAmount(String invoiceLineSpecialHandlingAmount) {
392        this.invoiceLineSpecialHandlingAmount = invoiceLineSpecialHandlingAmount;
393    }
394
395    /**
396     * @return Returns the invoiceLineSpecialHandlingAmountCurrency.
397     */
398    public String getInvoiceLineSpecialHandlingAmountCurrency() {
399        return invoiceLineSpecialHandlingAmountCurrency;
400    }
401
402    /**
403     * @param invoiceLineSpecialHandlingAmountCurrency
404     *         The invoiceLineSpecialHandlingAmountCurrency to set.
405     */
406    public void setInvoiceLineSpecialHandlingAmountCurrency(
407            String invoiceLineSpecialHandlingAmountCurrency) {
408        this.invoiceLineSpecialHandlingAmountCurrency = invoiceLineSpecialHandlingAmountCurrency;
409    }
410
411    /**
412     * @return Returns the invoiceShippingContacts.
413     */
414    public List getInvoiceShippingContacts() {
415        return invoiceShippingContacts;
416    }
417
418    /**
419     * @param invoiceShippingContacts The invoiceShippingContacts to set.
420     */
421    public void setInvoiceShippingContacts(List invoiceShippingContacts) {
422        this.invoiceShippingContacts = invoiceShippingContacts;
423    }
424
425    public void addInvoiceShippingContacts(ElectronicInvoiceContact contact) {
426        invoiceShippingContacts.add(contact);
427    }
428
429    /**
430     * @return Returns the quantity.
431     */
432    public String getQuantity() {
433        return quantity;
434    }
435
436    /**
437     * @param quantity The quantity to set.
438     */
439    public void setQuantity(String quantity) {
440        this.quantity = quantity;
441    }
442
443    /**
444     * @return Returns the referenceCountryCode.
445     */
446    public String getReferenceCountryCode() {
447        return referenceCountryCode;
448    }
449
450    /**
451     * @param referenceCountryCode The referenceCountryCode to set.
452     */
453    public void setReferenceCountryCode(String referenceCountryCode) {
454        this.referenceCountryCode = referenceCountryCode;
455    }
456
457    /**
458     * @return Returns the referenceCountryName.
459     */
460    public String getReferenceCountryName() {
461        return referenceCountryName;
462    }
463
464    /**
465     * @param referenceCountryName The referenceCountryName to set.
466     */
467    public void setReferenceCountryName(String referenceCountryName) {
468        this.referenceCountryName = referenceCountryName;
469    }
470
471    /**
472     * @return Returns the referenceDescription.
473     */
474    public String getReferenceDescription() {
475        return referenceDescription;
476    }
477
478    /**
479     * @param referenceDescription The referenceDescription to set.
480     */
481    public void setReferenceDescription(String referenceDescription) {
482        this.referenceDescription = referenceDescription;
483    }
484
485    /**
486     * @return Returns the referenceItemIDSupplierPartAuxID.
487     */
488    public String getReferenceItemIDSupplierPartAuxID() {
489        return referenceItemIDSupplierPartAuxID;
490    }
491
492    /**
493     * @param referenceItemIDSupplierPartAuxID
494     *         The referenceItemIDSupplierPartAuxID to set.
495     */
496    public void setReferenceItemIDSupplierPartAuxID(String referenceItemIDSupplierPartAuxID) {
497        this.referenceItemIDSupplierPartAuxID = referenceItemIDSupplierPartAuxID;
498    }
499
500    /**
501     * @return Returns the referenceItemIDSupplierPartID.
502     */
503    public String getReferenceItemIDSupplierPartID() {
504        return referenceItemIDSupplierPartID;
505    }
506
507    /**
508     * @param referenceItemIDSupplierPartID The referenceItemIDSupplierPartID to set.
509     */
510    public void setReferenceItemIDSupplierPartID(String referenceItemIDSupplierPartID) {
511        this.referenceItemIDSupplierPartID = referenceItemIDSupplierPartID;
512    }
513
514    /**
515     * @return Returns the referenceLineNumber.
516     */
517    public String getReferenceLineNumber() {
518        return referenceLineNumber;
519    }
520
521    /**
522     * @param referenceLineNumber The referenceLineNumber to set.
523     */
524    public void setReferenceLineNumber(String referenceLineNumber) {
525        this.referenceLineNumber = referenceLineNumber;
526    }
527
528    /**
529     * @return Returns the referenceManufacturerName.
530     */
531    public String getReferenceManufacturerName() {
532        return referenceManufacturerName;
533    }
534
535    /**
536     * @param referenceManufacturerName The referenceManufacturerName to set.
537     */
538    public void setReferenceManufacturerName(String referenceManufacturerName) {
539        this.referenceManufacturerName = referenceManufacturerName;
540    }
541
542    /**
543     * @return Returns the referenceManufacturerPartID.
544     */
545    public String getReferenceManufacturerPartID() {
546        return referenceManufacturerPartID;
547    }
548
549    /**
550     * @param referenceManufacturerPartID The referenceManufacturerPartID to set.
551     */
552    public void setReferenceManufacturerPartID(String referenceManufacturerPartID) {
553        this.referenceManufacturerPartID = referenceManufacturerPartID;
554    }
555
556    /**
557     * @return Returns the referenceSerialNumber.
558     */
559    public String getReferenceSerialNumber() {
560        return referenceSerialNumber;
561    }
562
563    /**
564     * @param referenceSerialNumber The referenceSerialNumber to set.
565     */
566    public void setReferenceSerialNumber(String referenceSerialNumber) {
567        this.referenceSerialNumber = referenceSerialNumber;
568    }
569
570    /**
571     * @return Returns the referenceSerialNumbers.
572     */
573    public List getReferenceSerialNumbers() {
574        return referenceSerialNumbers;
575    }
576
577    /**
578     * @param referenceSerialNumbers The referenceSerialNumbers to set.
579     */
580    public void setReferenceSerialNumbers(List referenceSerialNumbers) {
581        this.referenceSerialNumbers = referenceSerialNumbers;
582    }
583
584    /**
585     * @return Returns the shippingDate.
586     */
587    public Date getShippingDate() {
588        return shippingDate;
589    }
590
591    /**
592     * @param shippingDate The shippingDate to set.
593     */
594    public void setShippingDate(Date shippingDate) {
595        this.shippingDate = shippingDate;
596    }
597
598    /**
599     * @return Returns the subtotalAmount.
600     */
601    public String getSubTotalAmount() {
602        return subTotalAmount;
603    }
604
605    /**
606     * @param subtotalAmount The subtotalAmount to set.
607     */
608    public void setSubTotalAmount(String subTotalAmount) {
609        this.subTotalAmount = subTotalAmount;
610    }
611
612    /**
613     * @return Returns the subtotalAmountCurrency.
614     */
615    public String getSubTotalAmountCurrency() {
616        return subTotalAmountCurrency;
617    }
618
619    /**
620     * @param subtotalAmountCurrency The subtotalAmountCurrency to set.
621     */
622    public void setSubTotalAmountCurrency(String subTotalAmountCurrency) {
623        this.subTotalAmountCurrency = subTotalAmountCurrency;
624    }
625
626    /**
627     * @return Returns the taxAmount.
628     */
629    public String getTaxAmount() {
630        return taxAmount;
631    }
632
633    /**
634     * @param taxAmount The taxAmount to set.
635     */
636    public void setTaxAmount(String taxAmount) {
637        this.taxAmount = taxAmount;
638    }
639
640    /**
641     * @return Returns the taxAmountCurrency.
642     */
643    public String getTaxAmountCurrency() {
644        return taxAmountCurrency;
645    }
646
647    /**
648     * @param taxAmountCurrency The taxAmountCurrency to set.
649     */
650    public void setTaxAmountCurrency(String taxAmountCurrency) {
651        this.taxAmountCurrency = taxAmountCurrency;
652    }
653
654    /**
655     * @return Returns the taxDescription.
656     */
657    public String getTaxDescription() {
658        return taxDescription;
659    }
660
661    /**
662     * @param taxDescription The taxDescription to set.
663     */
664    public void setTaxDescription(String taxDescription) {
665        this.taxDescription = taxDescription;
666    }
667
668    /**
669     * @return Returns the unitOfMeasure.
670     */
671    public String getUnitOfMeasure() {
672        return unitOfMeasure;
673    }
674
675    /**
676     * @param unitOfMeasure The unitOfMeasure to set.
677     */
678    public void setUnitOfMeasure(String unitOfMeasure) {
679        this.unitOfMeasure = unitOfMeasure;
680    }
681
682    /**
683     * @return Returns the unitPrice.
684     */
685    public String getUnitPrice() {
686        return unitPrice;
687    }
688
689    /**
690     * @param unitPrice The unitPrice to set.
691     */
692    public void setUnitPrice(String unitPrice) {
693        this.unitPrice = unitPrice;
694    }
695
696    /**
697     * @return Returns the unitPriceCurrency.
698     */
699    public String getUnitPriceCurrency() {
700        return unitPriceCurrency;
701    }
702
703    /**
704     * @param unitPriceCurrency The unitPriceCurrency to set.
705     */
706    public void setUnitPriceCurrency(String unitPriceCurrency) {
707        this.unitPriceCurrency = unitPriceCurrency;
708    }
709
710    public ElectronicInvoiceRejectDocument getElectronicInvoiceRejectDocument() {
711        return electronicInvoiceRejectDocument;
712    }
713
714    public void setElectronicInvoiceRejectDocument(ElectronicInvoiceRejectDocument electronicInvoiceRejectDocument) {
715        this.electronicInvoiceRejectDocument = electronicInvoiceRejectDocument;
716    }
717
718
719    public void addReferenceSerialNumber(String referenceSerialNumber) {
720        this.referenceSerialNumbers.add(referenceSerialNumber);
721    }
722
723    public String[] getReferenceSerialNumbersAsArray() {
724        if (referenceSerialNumbers.size() > 0) {
725            String[] serialNumbers = new String[referenceSerialNumbers.size()];
726            referenceSerialNumbers.toArray(serialNumbers);
727            return serialNumbers;
728        }
729        return null;
730    }
731
732    public void addExtrinsic(CxmlExtrinsic extrinsic) {
733        this.extrinsic.add(extrinsic);
734    }
735
736    public CxmlExtrinsic[] getExtrinsicAsArray() {
737        if (extrinsic.size() > 0) {
738            CxmlExtrinsic[] extrinsics = new CxmlExtrinsic[extrinsic.size()];
739            extrinsic.toArray(extrinsics);
740            return extrinsics;
741        }
742        return null;
743    }
744
745    public void addComments(String comment) {
746        this.comments.add(comment);
747    }
748
749    public String getInvoiceLineDiscountPercentageRate() {
750        return invoiceLineDiscountPercentageRate;
751    }
752
753    public void setInvoiceLineDiscountPercentageRate(String invoiceLineDiscountPercentageRate) {
754        this.invoiceLineDiscountPercentageRate = invoiceLineDiscountPercentageRate;
755    }
756
757    public String toString() {
758
759        ToStringBuilder toString = new ToStringBuilder(this);
760
761        toString.append("invoiceLineNumber", getInvoiceLineNumber());
762        toString.append("quantity", getQuantity());
763        toString.append("catalogNumber", getCatalogNumber());
764        toString.append("unitOfMeasure", getUnitOfMeasure());
765        toString.append("unitPrice", getUnitPrice());
766        toString.append("unitPriceCurrency", getUnitPriceCurrency());
767        toString.append("subTotalAmount", getSubTotalAmount());
768        toString.append("subTotalAmountCurrency", getSubTotalAmountCurrency());
769        toString.append("invoiceLineSpecialHandlingAmount", getInvoiceLineSpecialHandlingAmount());
770        toString.append("invoiceLineSpecialHandlingAmountCurrency", getInvoiceLineSpecialHandlingAmountCurrency());
771        toString.append("invoiceLineShippingAmount", getInvoiceLineShippingAmount());
772        toString.append("invoiceLineShippingAmountCurrency", getInvoiceLineShippingAmountCurrency());
773        toString.append("taxAmount", getTaxAmount());
774        toString.append("taxAmountCurrency", getTaxAmountCurrency());
775        toString.append("taxDescription", getTaxDescription());
776        toString.append("invoiceLineGrossAmount", getInvoiceLineGrossAmount());
777        toString.append("invoiceLineGrossAmountCurrency", getInvoiceLineGrossAmountCurrency());
778        toString.append("invoiceLineDiscountAmount", getInvoiceLineDiscountAmount());
779        toString.append("invoiceLineDiscountAmountCurrency", getInvoiceLineDiscountAmountCurrency());
780        toString.append("invoiceLineNetAmount", getInvoiceLineNetAmount());
781        toString.append("invoiceLineNetAmountCurrency", getInvoiceLineNetAmountCurrency());
782        toString.append("shippingDateString", getShippingDateString());
783
784        toString.append("referenceLineNumber", getReferenceLineNumber());
785        toString.append("referenceSerialNumber", getReferenceSerialNumber());
786        toString.append("referenceSerialNumbersList", getReferenceSerialNumbers());
787        toString.append("referenceItemIDSupplierPartID", getReferenceItemIDSupplierPartID());
788        toString.append("referenceItemIDSupplierPartAuxID", getReferenceItemIDSupplierPartAuxID());
789        toString.append("referenceDescription", getReferenceDescription());
790        toString.append("referenceManufacturerPartID", getReferenceManufacturerPartID());
791        toString.append("referenceManufacturerName", getReferenceManufacturerName());
792        toString.append("referenceCountryCode", getReferenceCountryCode());
793        toString.append("referenceCountryName", getReferenceCountryName());
794
795        toString.append("invoiceShippingContacts", getInvoiceShippingContacts());
796        toString.append("comments", getComments());
797        toString.append("extrinsic", getExtrinsic());
798
799        return toString.toString();
800
801    }
802
803
804}