From: Roland Häder Date: Thu, 15 Sep 2022 04:07:39 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e3f93ef0360158c3c4c5796a9baeebbf0ddb53c9;p=jfinancials-core.git Continued: - organized members - also compare QR code ... Signed-off-by: Roland Häder --- 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())) {