]> git.mxchange.org Git - jfinancials-war.git/commitdiff
Don't cherry-pick:
authorRoland Häder <roland@mxchange.org>
Sun, 7 Jun 2020 12:39:04 +0000 (14:39 +0200)
committerRoland Häder <roland@mxchange.org>
Sun, 7 Jun 2020 12:39:04 +0000 (14:39 +0200)
- added resumption of (other) receipt

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

index 2332e2a2533004b3d5b859684f9f26d0bf69c80f..c48b3d1ceb31437cd386038d7b7c1a8f336c5c63 100644 (file)
@@ -130,6 +130,11 @@ public class FinancialAdminReceiptActionWebViewBean extends BaseFinancialsBean i
         */
        private Long receiptRegisterNumber;
 
+       /**
+        * Current receipt is a resumption of this receipt
+        */
+       private BillableReceipt receiptResumptionOf;
+
        /**
         * Selling employee
         */
@@ -404,6 +409,24 @@ public class FinancialAdminReceiptActionWebViewBean extends BaseFinancialsBean i
                this.receiptRegisterNumber = receiptRegisterNumber;
        }
 
+       /**
+        * Getter for receipt's resumption of an other receipt
+        * <p>
+        * @return Current receipt is based on this receipt
+        */
+       public BillableReceipt getReceiptResumptionOf () {
+               return this.receiptResumptionOf;
+       }
+
+       /**
+        * Setter for receipt's resumption of an other receipt
+        * <p>
+        * @param receiptResumptionOf Current receipt is based on this receipt
+        */
+       public void setReceiptResumptionOf (final BillableReceipt receiptResumptionOf) {
+               this.receiptResumptionOf = receiptResumptionOf;
+       }
+
        /**
         * Getter for receipt seller employee
         * <p>
@@ -537,6 +560,7 @@ public class FinancialAdminReceiptActionWebViewBean extends BaseFinancialsBean i
                this.setReceiptNumber(null);
                this.setReceiptPaymentType(null);
                this.setReceiptRegisterNumber(null);
+               this.setReceiptResumptionOf(null);
                this.setReceiptSellerEmployee(null);
                this.setReceiptSequenceNumber(null);
                this.setReceiptTransactionNumber(null);
@@ -562,6 +586,7 @@ public class FinancialAdminReceiptActionWebViewBean extends BaseFinancialsBean i
                receipt.setReceiptId(this.getReceiptId());
                receipt.setReceiptNumber(this.getReceiptNumber());
                receipt.setReceiptRegisterNumber(this.getReceiptRegisterNumber());
+               receipt.setReceiptResumptionOf(this.getReceiptResumptionOf());
                receipt.setReceiptSellerEmployee(this.getReceiptSellerEmployee());
                receipt.setReceiptSequenceNumber(this.getReceiptSequenceNumber());
                receipt.setReceiptTransactionNumber(this.getReceiptTransactionNumber());
index 8eb9e23f1c95242ac70563af0d536c0e803cec11..350a0f4f9fadf8e554e5c711721f6693b7012554 100644 (file)
@@ -192,3 +192,5 @@ ADMIN_ENABLE_INCOME_REQUIRED=Sie muessen entweder das Einkommen aktivieren oder
 ADMIN_ENABLE_INCOME=Einkommen aktiviert?
 #@TODO Please fix German umlauts!
 ADMIN_ENABLE_INCOME_TITLE=Bitte waehlen Sie aus, ob das Einkommen aktiviert ist.
+#@TODO Please fix German umlauts!
+SELECT_RECEIPT_RESUMPTION_OF=Waehle wiederaufgenommenen Kassenbon aus:
index d9bf44d2126c117beefb0591d02a5ea3938a1300..bea4f033026d224f886e74d75d64b6a552fc2085 100644 (file)
@@ -162,3 +162,4 @@ ADMIN_ERROR_FINANCIAL_RECEIPT_ITEM_NOT_CHANGED=Error: You did not change the rec
 ADMIN_ENABLE_INCOME_REQUIRED=You have to whether enable or disabled the income.
 ADMIN_ENABLE_INCOME=Income enabled?
 ADMIN_ENABLE_INCOME_TITLE=Please choose whether the income is enabled.
+SELECT_RECEIPT_RESUMPTION_OF=Select which receipt is being resumed:
index 4d2486c11c137918802474c5a75fc15f22829b4a..cefc83cc43aa325eb457068bd43a5426d393f2dc 100644 (file)
                                        itemLabel="#{beanHelper.renderContact(receiptUser.userContact)} (#{receiptUser.userName})"
                                        />
                        </p:selectOneMenu>
+
+                       <p:outputLabel for="receiptResumptionOf" value="#{project.SELECT_RECEIPT_RESUMPTION_OF}" />
+                       <p:selectOneMenu
+                               id="receiptResumptionOf"
+                               value="#{adminReceiptActionController.receiptResumptionOf}"
+                               filter="true"
+                               filterMatchMode="contains"
+                               >
+
+                               <f:converter converterId="ReceiptConverter" />
+
+                               <f:selectItem
+                                       itemValue="#{null}"
+                                       itemLabel="#{msg.PLEASE_SELECT}"
+                                       noSelectionOption="true"
+                                       itemDisabled="true"
+                                       />
+
+                               <f:selectItems
+                                       value="#{receiptListController.allReceipts}"
+                                       var="receipt"
+                                       itemValue="#{receipt}"
+                                       itemLabel="#{receiptBeanHelper.renderReceipt(receipt, false)}"
+                                       />
+                       </p:selectOneMenu>
                </p:panelGrid>
        </p:fieldset>