From e3f93ef0360158c3c4c5796a9baeebbf0ddb53c9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 15 Sep 2022 06:07:39 +0200 Subject: [PATCH] Continued: - organized members - also compare QR code ... MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../model/receipt/FinancialReceipt.java | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/org/mxchange/jfinancials/model/receipt/FinancialReceipt.java b/src/org/mxchange/jfinancials/model/receipt/FinancialReceipt.java index 56bcba2..b70a016 100644 --- a/src/org/mxchange/jfinancials/model/receipt/FinancialReceipt.java +++ b/src/org/mxchange/jfinancials/model/receipt/FinancialReceipt.java @@ -141,6 +141,13 @@ public class FinancialReceipt implements BillableReceipt { @Enumerated (EnumType.STRING) private PaymentType receiptPaymentType; + /** + * Recipient QR code + */ + @Lob () + @Column (name = "receipt_qr_code") + private String receiptQrCode; + /** * Receipt register number */ @@ -180,13 +187,6 @@ public class FinancialReceipt implements BillableReceipt { @OneToOne (targetEntity = LoginUser.class, cascade = CascadeType.REFRESH) private User receiptUser; - /** - * Recipient QR code - */ - @Lob () - @Column (name = "receipt_qr_code") - private String receiptQrCode; - /** * Default constructor */ @@ -285,6 +285,8 @@ public class FinancialReceipt implements BillableReceipt { SafeNumberUtils.compare(this.getReceiptTransactionNumber(), billableReceipt.getReceiptTransactionNumber()), // ... payment type this.getReceiptPaymentType().compareTo(billableReceipt.getReceiptPaymentType()), + // ... next QR code + StringUtils.compare(this.getReceiptQrCode(), billableReceipt.getReceiptQrCode()), // ... register number SafeNumberUtils.compare(this.getReceiptRegisterNumber(), billableReceipt.getReceiptRegisterNumber()), // ... issue date @@ -332,6 +334,8 @@ public class FinancialReceipt implements BillableReceipt { return false; } else if (this.getReceiptPaymentType() != receipt.getReceiptPaymentType()) { return false; + } else if (!Objects.equals(this.getReceiptQrCode(), receipt.getReceiptQrCode())) { + return false; } else if (!Objects.equals(this.getReceiptRegisterNumber(), receipt.getReceiptRegisterNumber())) { return false; } else if (!Objects.equals(this.getReceiptSellerEmployee(), receipt.getReceiptSellerEmployee())) { -- 2.39.5