@Enumerated (EnumType.STRING)
private PaymentType receiptPaymentType;
+ /**
+ * Recipient QR code
+ */
+ @Lob ()
+ @Column (name = "receipt_qr_code")
+ private String receiptQrCode;
+
/**
* Receipt register number
*/
@OneToOne (targetEntity = LoginUser.class, cascade = CascadeType.REFRESH)
private User receiptUser;
- /**
- * Recipient QR code
- */
- @Lob ()
- @Column (name = "receipt_qr_code")
- private String receiptQrCode;
-
/**
* Default constructor
*/
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
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())) {