]> git.mxchange.org Git - jfinancials-war.git/commitdiff
Don't cherry-pick:
authorRoland Häder <roland@mxchange.org>
Thu, 15 Sep 2022 03:53:20 +0000 (05:53 +0200)
committerRoland Häder <roland@mxchange.org>
Thu, 15 Sep 2022 03:53:20 +0000 (05:53 +0200)
- added recipient QR code field handling

Signed-off-by: Roland Häder <roland@mxchange.org>
src/java/org/mxchange/jfinancials/beans/financial/model/receipt/action/FinancialAdminReceiptActionWebViewBean.java
web/WEB-INF/templates/admin/financial/receipt/admin_form_financial_receipt.tpl
web/admin/financial/receipt/admin_receipt_list.xhtml

index c48b3d1ceb31437cd386038d7b7c1a8f336c5c63..1c3f14f5072b0621522d2b7a235c98b034f5633c 100644 (file)
@@ -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());
index 8c7df94b9e013e2cc9707419570e24b6e102091d..fdd1add224046429d6f5978b79d6ea0398b8427e 100644 (file)
                        <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}" />
 
index 28dafe7a07608573f37ed7bce01a0ce1e335824f..86dcc14709e3ee7888f5d83c372d0faefca17bd4 100644 (file)
 
                                                <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}" />