From: Roland Häder <roland@mxchange.org>
Date: Thu, 15 Sep 2022 03:53:20 +0000 (+0200)
Subject: Don't cherry-pick:
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a6b067a782226c57fcd213aae7870103e3d8ee20;p=jfinancials-war.git

Don't cherry-pick:
- added recipient QR code field handling

Signed-off-by: Roland Häder <roland@mxchange.org>
---

diff --git a/src/java/org/mxchange/jfinancials/beans/financial/model/receipt/action/FinancialAdminReceiptActionWebViewBean.java b/src/java/org/mxchange/jfinancials/beans/financial/model/receipt/action/FinancialAdminReceiptActionWebViewBean.java
index c48b3d1c..1c3f14f5 100644
--- a/src/java/org/mxchange/jfinancials/beans/financial/model/receipt/action/FinancialAdminReceiptActionWebViewBean.java
+++ b/src/java/org/mxchange/jfinancials/beans/financial/model/receipt/action/FinancialAdminReceiptActionWebViewBean.java
@@ -125,6 +125,11 @@ public class FinancialAdminReceiptActionWebViewBean extends BaseFinancialsBean i
 	 */
 	private PaymentType receiptPaymentType;
 
+	/**
+	 * QR code
+	 */
+	private String receiptQrCode;
+
 	/**
 	 * Register number
 	 */
@@ -238,6 +243,7 @@ public class FinancialAdminReceiptActionWebViewBean extends BaseFinancialsBean i
 		this.setReceiptIssued(this.getCurrentReceipt().getReceiptIssued());
 		this.setReceiptNumber(this.getCurrentReceipt().getReceiptNumber());
 		this.setReceiptPaymentType(this.getCurrentReceipt().getReceiptPaymentType());
+		this.setReceiptQrCode(this.getCurrentReceipt().getReceiptQrCode());
 		this.setReceiptRegisterNumber(this.getCurrentReceipt().getReceiptRegisterNumber());
 		this.setReceiptSellerEmployee(this.getCurrentReceipt().getReceiptSellerEmployee());
 		this.setReceiptSequenceNumber(this.getCurrentReceipt().getReceiptSequenceNumber());
@@ -499,9 +505,29 @@ public class FinancialAdminReceiptActionWebViewBean extends BaseFinancialsBean i
 		this.receiptUser = receiptUser;
 	}
 
+	/**
+	 * Getter for receipt QR code
+	 * <p>
+	 * @return Receipt QR code
+	 */
+	public String getReceiptQrCode () {
+		return this.receiptQrCode;
+	}
+
+	/**
+	 * Setter for receipt QR code
+	 * <p>
+	 * @param receiptQrCode Receipt QR code
+	 */
+	public void setReceiptQrCode (final String receiptQrCode) {
+		this.receiptQrCode = receiptQrCode;
+	}
+
 	/**
 	 * Updates receipt instance with new data. This copies all fields from this
 	 * backing bean into currentReceipt instance which should be still there.
+	 *
+	 * @return Redirect target
 	 */
 	public String updateReceipt () {
 		// Is current instance still there?
@@ -559,6 +585,7 @@ public class FinancialAdminReceiptActionWebViewBean extends BaseFinancialsBean i
 		this.setReceiptIssued(null);
 		this.setReceiptNumber(null);
 		this.setReceiptPaymentType(null);
+		this.setReceiptQrCode(null);
 		this.setReceiptRegisterNumber(null);
 		this.setReceiptResumptionOf(null);
 		this.setReceiptSellerEmployee(null);
@@ -585,6 +612,7 @@ public class FinancialAdminReceiptActionWebViewBean extends BaseFinancialsBean i
 		receipt.setReceiptBonusCard(this.getReceiptBonusCard());
 		receipt.setReceiptId(this.getReceiptId());
 		receipt.setReceiptNumber(this.getReceiptNumber());
+		receipt.setReceiptQrCode(this.getReceiptQrCode());
 		receipt.setReceiptRegisterNumber(this.getReceiptRegisterNumber());
 		receipt.setReceiptResumptionOf(this.getReceiptResumptionOf());
 		receipt.setReceiptSellerEmployee(this.getReceiptSellerEmployee());
diff --git a/web/WEB-INF/templates/admin/financial/receipt/admin_form_financial_receipt.tpl b/web/WEB-INF/templates/admin/financial/receipt/admin_form_financial_receipt.tpl
index 8c7df94b..fdd1add2 100644
--- a/web/WEB-INF/templates/admin/financial/receipt/admin_form_financial_receipt.tpl
+++ b/web/WEB-INF/templates/admin/financial/receipt/admin_form_financial_receipt.tpl
@@ -172,6 +172,9 @@
 			<p:outputLabel for="receiptBarCodeNumber" value="#{project.ENTER_RECEIPT_BARCODE_NUMBER}" />
 			<p:inputText id="receiptBarCodeNumber" size="20" maxlength="255" value="#{adminReceiptActionController.receiptBarCodeNumber}" />
 
+			<p:outputLabel for="receiptQrCode" value="#{project.ENTER_RECEIPT_QRCODE}" />
+			<p:inputText id="receiptQrCode" size="20" maxlength="255" value="#{adminReceiptActionController.receiptQrCode}" />
+
 			<p:outputLabel for="receiptSequenceNumber" value="#{project.ENTER_RECEIPT_SEQUENCE_NUMBER}" />
 			<p:inputText id="receiptSequenceNumber" size="10" maxlength="20" value="#{adminReceiptActionController.receiptSequenceNumber}" />
 
diff --git a/web/admin/financial/receipt/admin_receipt_list.xhtml b/web/admin/financial/receipt/admin_receipt_list.xhtml
index 28dafe7a..86dcc147 100644
--- a/web/admin/financial/receipt/admin_receipt_list.xhtml
+++ b/web/admin/financial/receipt/admin_receipt_list.xhtml
@@ -462,7 +462,23 @@
 
 						<p:outputLabel value="#{project.BARCODE_NUMBER_HEADER}" title="#{project.RECEIPT_BARCODE_TITLE}" />
 						<h:outputText value="#{project.RECEIPT_NO_BARCODE_ASSIGNED}" rendered="#{empty receiptListController.selectedReceipt.receiptBarCodeNumber}" />
-						<p:barcode format="svg" width="100%" type="#{initParam['receipt_barcode_type']}" value="#{receiptListController.selectedReceipt.receiptBarCodeNumber}" rendered="#{not empty receiptListController.selectedReceipt.receiptBarCodeNumber}" />
+						<p:barcode
+							format="svg"
+							width="100%"
+							type="#{initParam['receipt_barcode_type']}"
+							value="#{receiptListController.selectedReceipt.receiptBarCodeNumber}"
+							rendered="#{not empty receiptListController.selectedReceipt.receiptBarCodeNumber}"
+							/>
+
+						<p:outputLabel value="#{project.QRCODE_HEADER}" title="#{project.RECEIPT_QRCODE_TITLE}" />
+						<h:outputText value="#{project.RECEIPT_NO_BARCODE_ASSIGNED}" rendered="#{empty receiptListController.selectedReceipt.receiptQrCode}" />
+						<p:barcode
+							format="svg"
+							width="100%"
+							type="qrcode"
+							value="#{receiptListController.selectedReceipt.receiptQrCode}"
+							rendered="#{not empty receiptListController.selectedReceipt.receiptQrCode}"
+							/>
 
 						<p:outputLabel value="#{project.RECEIPT_SEQUENCE_NUMBER_HEADER}" title="#{project.RECEIPT_SEQUENCE_NUMBER_TITLE}" />
 						<h:outputText value="#{receiptListController.selectedReceipt.receiptSequenceNumber}" />