]> git.mxchange.org Git - jfinancials-core.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Thu, 15 Sep 2022 04:07:39 +0000 (06:07 +0200)
committerRoland Häder <roland@mxchange.org>
Thu, 15 Sep 2022 04:09:59 +0000 (06:09 +0200)
- organized members
- also compare QR code ...

Signed-off-by: Roland Häder <roland@mxchange.org>
src/org/mxchange/jfinancials/model/receipt/FinancialReceipt.java

index 56bcba2b53530b50550d8d8b7f5d1ce901039842..b70a016dcd3ce813a8f1eb221418101c71f3e812 100644 (file)
@@ -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())) {