From b1194a2e9790a279bddf02bf931b288e2caf1982 Mon Sep 17 00:00:00 2001
From: =?utf8?q?Roland=20H=C3=A4der?= <roland@mxchange.org>
Date: Sat, 18 Nov 2017 00:22:59 +0100
Subject: [PATCH] Continued: - nowadays, there are receipt numbers larger than
 20 digits ...
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit

Signed-off-by: Roland Häder <roland@mxchange.org>
---
 .../jfinancials/model/receipt/BillableReceipt.java        | 4 ++--
 .../jfinancials/model/receipt/FinancialReceipt.java       | 6 +++---
 src/org/mxchange/jfinancials/model/receipt/Receipts.java  | 8 ++++----
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/org/mxchange/jfinancials/model/receipt/BillableReceipt.java b/src/org/mxchange/jfinancials/model/receipt/BillableReceipt.java
index 6563ab4..b717de8 100644
--- a/src/org/mxchange/jfinancials/model/receipt/BillableReceipt.java
+++ b/src/org/mxchange/jfinancials/model/receipt/BillableReceipt.java
@@ -120,14 +120,14 @@ public interface BillableReceipt extends Serializable {
 	 * <p>
 	 * @return Receipt number
 	 */
-	Long getReceiptNumber ();
+	String getReceiptNumber ();
 
 	/**
 	 * Setter for receipt number
 	 * <p>
 	 * @param receiptNumber Receipt number
 	 */
-	void setReceiptNumber (final Long receiptNumber);
+	void setReceiptNumber (final String receiptNumber);
 
 	/**
 	 * Getter for receipt register's number (cash register's number)
diff --git a/src/org/mxchange/jfinancials/model/receipt/FinancialReceipt.java b/src/org/mxchange/jfinancials/model/receipt/FinancialReceipt.java
index 09792d6..7a69728 100644
--- a/src/org/mxchange/jfinancials/model/receipt/FinancialReceipt.java
+++ b/src/org/mxchange/jfinancials/model/receipt/FinancialReceipt.java
@@ -117,7 +117,7 @@ public class FinancialReceipt implements BillableReceipt {
 	 * Receipt number
 	 */
 	@Column (name = "receipt_number")
-	private Long receiptNumber;
+	private String receiptNumber;
 
 	/**
 	 * Payment type (cash, credit card, EC card ...)
@@ -324,12 +324,12 @@ public class FinancialReceipt implements BillableReceipt {
 	}
 
 	@Override
-	public Long getReceiptNumber () {
+	public String getReceiptNumber () {
 		return this.receiptNumber;
 	}
 
 	@Override
-	public void setReceiptNumber (final Long receiptNumber) {
+	public void setReceiptNumber (final String receiptNumber) {
 		this.receiptNumber = receiptNumber;
 	}
 
diff --git a/src/org/mxchange/jfinancials/model/receipt/Receipts.java b/src/org/mxchange/jfinancials/model/receipt/Receipts.java
index c6e6493..9c1c893 100644
--- a/src/org/mxchange/jfinancials/model/receipt/Receipts.java
+++ b/src/org/mxchange/jfinancials/model/receipt/Receipts.java
@@ -55,9 +55,9 @@ public class Receipts implements Serializable {
 		} else if (receipt1.getReceiptBranchOffice().getBranchId() < 1) {
 			// Throw NPE
 			throw new NullPointerException(MessageFormat.format("receipt1.receiptBranchOffice.branchId={0} is not valid", receipt1.getReceiptBranchOffice().getBranchId()));
-		} else if ((receipt1.getReceiptNumber() instanceof Long) && (receipt1.getReceiptNumber() < 1)) {
+		} else if ((receipt1.getReceiptNumber() != null) && (receipt1.getReceiptNumber().isEmpty())) {
 			// Throw IAE
-			throw new IllegalArgumentException(MessageFormat.format("receipt1.receiptNumber={0} is not valid.", receipt1.getReceiptNumber()));
+			throw new IllegalArgumentException("receipt1.receiptNumber is empty.");
 		} else if (receipt1.getReceiptPaymentType()== null) {
 			// Throw NPE
 			throw new NullPointerException("receipt1.receiptPaymentType is null");
@@ -76,9 +76,9 @@ public class Receipts implements Serializable {
 		} else if (receipt2.getReceiptBranchOffice().getBranchId() < 1) {
 			// Throw NPE
 			throw new NullPointerException(MessageFormat.format("receipt2.receiptBranchOffice.branchId={0} is not valid", receipt2.getReceiptBranchOffice().getBranchId()));
-		} else if ((receipt2.getReceiptNumber() instanceof Long) && (receipt2.getReceiptNumber() < 1)) {
+		} else if ((receipt2.getReceiptNumber() != null) && (receipt2.getReceiptNumber().isEmpty())) {
 			// Throw IAE
-			throw new IllegalArgumentException(MessageFormat.format("receipt2.receiptNumber={0} is not valid.", receipt2.getReceiptNumber()));
+			throw new IllegalArgumentException("receipt2.receiptNumber is empty.");
 		} else if (receipt2.getReceiptPaymentType()== null) {
 			// Throw NPE
 			throw new NullPointerException("receipt2.receiptPaymentType is null");
-- 
2.39.5