// Fire event with updated instance
this.adminAddedReceiptEvent.fire(new ReceiptAddedEvent(updatedReceipt));
+ // Clear bean
+ this.clear();
+
// Return redirect outcome
return "add_receipt_item?faces-redirect=true"; //NOI18N
}
this.receiptUser = receiptUser;
}
+ /**
+ * Clears this bean
+ */
+ private void clear () {
+ // Clear all fields
+ this.setReceiptBarCodeNumber(null);
+ this.setReceiptBranchOffice(null);
+ this.setReceiptIssued(null);
+ this.setReceiptNumber(null);
+ this.setReceiptPaymentType(null);
+ this.setReceiptRegisterNumber(null);
+ this.setReceiptSellerEmployee(null);
+ this.setReceiptUser(null);
+ }
+
/**
* Creates a new instance from all available data of this bean.
* <p>
// Fire event with updated instance
this.addedReceiptEvent.fire(new ReceiptAddedEvent(updatedReceipt));
+ // Clear bean
+ this.clear();
+
// Return redirect outcome
return "add_receipt_item?faces-redirect=true"; //NOI18N
}
return this.allReceipts.contains(receipt);
}
+ /**
+ * Clears this bean
+ */
+ private void clear () {
+ // Clear all fields
+ this.setReceiptBarCodeNumber(null);
+ this.setReceiptBranchOffice(null);
+ this.setReceiptIssued(null);
+ this.setReceiptNumber(null);
+ this.setReceiptPaymentType(null);
+ this.setReceiptRegisterNumber(null);
+ this.setReceiptSellerEmployee(null);
+ }
+
/**
* Returns a fully created receipt instance (except primary key, of course)
* <p>
BUTTON_ADMIN_ADD_FINANCIAL_RECEIPT=Kassenbon hinzufuegen
ADMIN_FINANCIAL_RECEIPT_ISSUE_DATE_REQUIRED=Bitte geben Sie das Ausstellungsdatum des Kassenbons ein.
ADMIN_MENU_FINANCIAL_RECEIPTS_TITLE=Kassenbons
-LINK_ADMIN_LIST_FINANCIAL_RECEIPTS_TITLE=Listet alle registrierten Kassenbos/Rechnungen auf..
-LINK_ADMIN_LIST_FINANCIAL_RECEIPTS=Kassenbons/Rechnungen auflisten
+ADMIN_LINK_LIST_FINANCIAL_RECEIPTS_TITLE=Listet alle registrierten Kassenbons/Rechnungen auf..
+ADMIN_LINK_LIST_FINANCIAL_RECEIPTS=Kassenbons/Rechnungen auflisten
ADMIN_LIST_FINANCIAL_RECEIPTS_HEADER=Alle Kassenbons/Rechnungen auflisten
ADMIN_FINANCIAL_RECEIPT_BASIC_LEGEND=Grunddaten des Kassenbons
ADMIN_FINANCIAL_RECEIPT_BASIC_LEGEND_TITLE=Geben Sie hier die Grunddaten des neuen Kassenbons einn.
BUTTON_ADMIN_ADD_FINANCIAL_RECEIPT=Add receipt
ADMIN_FINANCIAL_RECEIPT_ISSUE_DATE_REQUIRED=Please enter date of issue of receipt.
ADMIN_MENU_FINANCIAL_RECEIPTS_TITLE=Receipts
-LINK_ADMIN_LIST_FINANCIAL_RECEIPTS_TITLE=Lists all registered receipts.
-LINK_ADMIN_LIST_FINANCIAL_RECEIPTS=List receipts
+ADMIN_LINK_LIST_FINANCIAL_RECEIPTS_TITLE=Lists all registered receipts.
+ADMIN_LINK_LIST_FINANCIAL_RECEIPTS=List receipts
ADMIN_LIST_FINANCIAL_RECEIPTS_HEADER=List all receipts
ADMIN_FINANCIAL_RECEIPT_BASIC_LEGEND=Basic data of receipt:
ADMIN_FINANCIAL_RECEIPT_BASIC_LEGEND_TITLE=Enter here basic data of the new receipt.
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:p="http://primefaces.org/ui">
- <fieldset class="fieldset">
- <legend title="#{project.ADMIN_FINANCIAL_RECEIPT_BASIC_LEGEND_TITLE}">
- <h:outputText value="#{project.ADMIN_FINANCIAL_RECEIPT_BASIC_LEGEND}" />
- </legend>
-
- <h:panelGrid columns="3" styleClass="table table-full">
+ <p:fieldset legend="#{project.ADMIN_FINANCIAL_RECEIPT_BASIC_LEGEND}">
+ <!--
+ @TODO: title="#{project.ADMIN_FINANCIAL_RECEIPT_BASIC_LEGEND_TITLE}"
+ -->
+ <p:panelGrid layout="grid" columns="2" columnClasses="ui-grid-col-4, ui-grid-col-8" styleClass="table table-full ui-noborder">
<p:outputLabel for="branchOffice" value="#{msg.ADMIN_SELECT_BRANCH_OFFICE}" />
<p:selectOneMenu
id="branchOffice"
<f:selectItem itemValue="#{null}" itemLabel="#{msg.PLEASE_SELECT}" noSelectionOption="true" itemDisabled="true" />
<f:selectItems value="#{branchOfficeController.allBranchOffices()}" var="branchOffice" itemValue="#{branchOffice}" itemLabel="#{branchOffice.branchCompany.companyName} #{branchOffice.branchStreet} #{branchOffice.branchHouseNumber}, #{branchOffice.branchCity}" />
</p:selectOneMenu>
- <p:message for="branchOffice" />
<p:outputLabel for="receiptIssued" value="#{project.ENTER_FINANCIAL_RECEIPT_ISSUE_DATE}" />
<p:calendar
styleClass="input"
title="#{project.ADMIN_RECEIPT_DATE_OF_ISSUE_TITLE}"
/>
- <p:message for="receiptIssued" />
<p:outputLabel for="receiptPaymentType" value="#{msg.ADMIN_SELECT_PAYMENT_TYPE}" />
<p:selectOneMenu
<f:selectItem itemValue="#{null}" itemLabel="#{msg.PLEASE_SELECT}" noSelectionOption="true" itemDisabled="true" />
<f:selectItems value="#{dataController.paymentTypes}" var="receiptPaymentType" itemValue="#{paymentType}" itemLabel="#{msg[paymentType.i18nKey]}" />
</p:selectOneMenu>
- <p:message for="receiptPaymentType" />
<p:outputLabel for="receiptSellerEmployee" value="#{msg.ADMIN_SELECT_SELLER_EMPLOYEE}" />
<p:selectOneMenu
<f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
<f:selectItems value="#{companyEmployeeController.allCompanyEmployees()}" var="companyEmployee" itemValue="#{companyEmployee}" itemLabel="#{companyEmployee.employeeNumber} #{beanHelper.renderContact(companyEmployee.employeePersonalData)}" itemDescription="#{companyEmployee.employeeCompany.companyName}, #{beanHelper.renderBranchOffice(companyEmployee.employeeBranchOffice)}" />
</p:selectOneMenu>
- <p:message for="receiptSellerEmployee" />
<p:outputLabel for="receiptUser" value="#{project.ADMIN_SELECT_FINANCIAL_RECEIPT_USER_OWNER}" />
<p:selectOneMenu
<f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
<f:selectItems value="#{userController.allUsers()}" var="receiptUser" itemValue="#{receiptUser}" itemLabel="#{receiptUser.userContact.contactFirstName} #{receiptUser.userContact.contactFamilyName} (#{receiptUser.userName})" />
</p:selectOneMenu>
- <p:message for="receiptUser" />
- </h:panelGrid>
- </fieldset>
-
- <fieldset class="fieldset">
- <legend title="#{project.ADMIN_FINANCIAL_RECEIPT_OTHER_LEGEND_TITLE}">
- <h:outputText value="#{project.ADMIN_FINANCIAL_RECEIPT_OTHER_LEGEND}" />
- </legend>
+ </p:panelGrid>
+ </p:fieldset>
- <h:panelGrid columns="3" styleClass="table table-full">
+ <p:fieldset legend="#{project.ADMIN_FINANCIAL_RECEIPT_OTHER_LEGEND}">
+ <!--
+ @TODO: title="#{project.ADMIN_FINANCIAL_RECEIPT_OTHER_LEGEND_TITLE}">
+ -->
+ <p:panelGrid layout="grid" columns="2" columnClasses="ui-grid-col-4, ui-grid-col-8" styleClass="table table-full">
<p:outputLabel for="receiptNumber" value="#{project.ENTER_FINANCIAL_RECEIPT_NUMBER}" />
<p:inputText styleClass="input" id="receiptNumber" size="10" maxlength="20" value="#{adminReceiptController.receiptNumber}" validatorMessage="#{msg.ENTERED_RECEIPT_NUMBER_INVALID}">
<f:validateLongRange minimum="1" maximum="9999999999" />
</p:inputText>
- <p:message for="receiptNumber" />
<p:outputLabel for="receiptRegisterNumber" value="#{project.ENTER_FINANCIAL_RECEIPT_REGISTER_NUMBER}" />
<p:inputText styleClass="input" id="receiptRegisterNumber" size="3" maxlength="10" value="#{adminReceiptController.receiptRegisterNumber}" validatorMessage="#{msg.ENTERED_RECEIPT_REGISTER_NUMBER_INVALID}">
<f:validateLongRange minimum="1" maximum="999" />
</p:inputText>
- <p:message for="receiptRegisterNumber" />
<p:outputLabel for="receiptBarCodeNumber" value="#{project.ENTER_FINANCIAL_RECEIPT_BARCODE_NUMBER}" />
<p:inputText styleClass="input" id="receiptBarCodeNumber" size="24" maxlength="24" value="#{adminReceiptController.receiptBarCodeNumber}" />
- <p:message for="receiptBarCodeNumber" />
- </h:panelGrid>
- </fieldset>
+ </p:panelGrid>
+ </p:fieldset>
</ui:composition>
xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:h="http://xmlns.jcp.org/jsf/html"
- xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
+ xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+ xmlns:p="http://primefaces.org/ui">
- <!-- Put your stuff here //-->
+ <p:submenu label="#{project.ADMIN_MENU_FINANCIAL_RECEIPTS_TITLE}">
+ <p:menuitem title="#{project.ADMIN_LINK_LIST_FINANCIAL_RECEIPTS_TITLE}" outcome="admin_list_receipts" value="#{project.ADMIN_LINK_LIST_FINANCIAL_RECEIPTS}" />
+ </p:submenu>
</ui:composition>
<h:outputText value="#{project.LOGIN_FINANCIAL_RECEIPT_BASIC_LEGEND}" />
</legend>
- <h:panelGrid columns="3" styleClass="table table-full">
+ <p:panelGrid layout="grid" columns="2" columnClasses="ui-grid-col-4, ui-grid-col-8" styleClass="table table-full">
<p:outputLabel for="branchOffice" value="#{project.LOGIN_SELECT_BRANCH_OFFICE}" />
<p:selectOneMenu
id="branchOffice"
<f:selectItems value="#{companyEmployeeController.allCompanyEmployees()}" var="companyHeadQuarters" itemValue="#{companyEmployee}" itemLabel="#{companyEmployee.foo}" />
</p:selectOneMenu>
<p:message for="receiptSellerEmployee" />
- </h:panelGrid>
+ </p:panelGrid>
</fieldset>
<fieldset class="fieldset">
<h:outputText value="#{project.LOGIN_FINANCIAL_RECEIPT_OTHER_LEGEND}" />
</legend>
- <h:panelGrid columns="3" styleClass="table table-full">
+ <p:panelGrid layout="grid" columns="2" columnClasses="ui-grid-col-4, ui-grid-col-8" styleClass="table table-full">
<p:outputLabel for="receiptNumber" value="#{project.FINANCIAL_RECEIPT_NUMBER}" />
<p:inputText styleClass="input" id="receiptNumber" size="10" maxlength="20" value="#{receiptController.receiptNumber}" validatorMessage="#{msg.ENTERED_RECEIPT_NUMBER_INVALID}">
<f:validateLongRange minimum="1" maximum="9999999999" />
<p:outputLabel for="receiptBarCodeNumber" value="#{project.FINANCIAL_RECEIPT_BARCODE_NUMBER}" />
<p:inputText styleClass="input" id="receiptBarCodeNumber" size="24" maxlength="24" value="#{receiptController.receiptBarCodeNumber}" />
<p:message for="receiptBarCodeNumber" />
- </h:panelGrid>
+ </p:panelGrid>
</fieldset>
</ui:composition>
<ui:define name="content">
<widgets:outputAdminFaxPanelGrid faxNumber="#{beanHelper.faxNumber}" />
- <p:dataTable id="contact_fax_link" var="contact" value="#{contactPhoneController.allCurrentFaxNumberContacts()}" summary="#{msg.TABLE_SUMMARY_ADMIN_SHOW_ADMINISTRATIVE_LINKS}" tableStyleClass="table table-medium">
+ <p:dataTable id="contact_fax_link" var="contact" value="#{contactPhoneController.allCurrentFaxNumberContacts()}" summary="#{msg.TABLE_SUMMARY_ADMIN_SHOW_ADMINISTRATIVE_LINKS}" tableStyleClass="table table-full">
<f:facet name="header">
<h:outputFormat value="#{msg.ADMIN_HEADER_SHOW_FAX_NUMBER_LINKS}">
<f:param value="#{beanHelper.faxNumber.phoneId}" />
id="table-list-financial-receipt"
var="receipt"
value="#{receiptController.allReceipts()}"
- widgetVar="receiptTable"
filteredValue="#{receiptController.filteredReceipts}"
tableStyleClass="table table-full"
rows="10"
rowsPerPageTemplate="5,10,20,50,100"
sortMode="multiple"
summary="#{project.TABLE_SUMMARY_ADMIN_LIST_FINANCIAL_RECEIPTS}"
- emptyMessage="#{project.ADMIN_FINANCIAL_RECEIPT_LIST_EMPTY}">
-
+ emptyMessage="#{project.ADMIN_FINANCIAL_RECEIPT_LIST_EMPTY}"
+ widgetVar="receiptList"
+ >
<f:facet name="header">
<h:outputText value="#{project.ADMIN_LIST_FINANCIAL_RECEIPTS_HEADER}" />
<p:commandButton id="toggler" type="button" value="#{msg.SELECT_SHOWN_COLUMNS}" styleClass="column-selector" />
</p:dataTable>
</h:form>
- <h:form id="form_admin_add_financial_receipt">
- <h:panelGrid columns="1" headerClass="table-header" footerClass="table-footer" styleClass="table table-full">
- <f:facet name="header">
- <h:outputText value="#{project.ADMIN_ADD_FINANCIAL_RECEIPT_TITLE}" />
- </f:facet>
+ <h:form>
+ <p:panelGrid layout="grid" columns="1" styleClass="table table-full">
+ <h:panelGroup styleClass="table-header" layout="block">
+ <h4>
+ <h:outputText value="#{project.ADMIN_ADD_FINANCIAL_RECEIPT_TITLE}" />
+ </h4>
+ </h:panelGroup>
- <p:column>
- <ui:include src="/WEB-INF/templates/admin/financial/receipt/admin_form_financial_receipt.tpl" />
- </p:column>
+ <ui:include src="/WEB-INF/templates/admin/financial/receipt/admin_form_financial_receipt.tpl" />
- <f:facet name="footer">
- <p:commandButton styleClass="reset divider-right" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
- <p:commandButton styleClass="submit" type="submit" id="button_add_financial_receipt" value="#{project.BUTTON_ADMIN_ADD_FINANCIAL_RECEIPT}" action="#{adminReceiptController.addReceipt()}" />
- </f:facet>
- </h:panelGrid>
+ <p:panelGrid columns="2" styleClass="table-footer" layout="grid">
+ <p:commandButton
+ styleClass="reset divider-right"
+ type="reset"
+ value="#{msg.BUTTON_RESET_FORM}"
+ />
+
+ <p:commandButton
+ styleClass="submit"
+ type="submit"
+ value="#{project.BUTTON_ADMIN_ADD_FINANCIAL_RECEIPT}"
+ action="#{adminReceiptController.addReceipt()}"
+ update=":master:form-list-financial-receipt:table-list-financial-receipt"
+ />
+ </p:panelGrid>
+ </p:panelGrid>
</h:form>
</ui:define>
</ui:composition>
<ui:define name="content">
<widgets:outputAdminLandLinePanelGrid landLineNumber="#{beanHelper.landLineNumber}" />
- <p:dataTable id="contact_landline_link" var="contact" value="#{contactPhoneController.allCurrentLandLineNumberContacts()}" summary="#{msg.TABLE_SUMMARY_ADMIN_SHOW_ADMINISTRATIVE_LINKS}" tableStyleClass="table table-medium">
+ <p:dataTable id="contact_landline_link" var="contact" value="#{contactPhoneController.allCurrentLandLineNumberContacts()}" summary="#{msg.TABLE_SUMMARY_ADMIN_SHOW_ADMINISTRATIVE_LINKS}" tableStyleClass="table table-full">
<f:facet name="header">
<h:outputFormat value="#{msg.ADMIN_HEADER_SHOW_LAND_LINE_NUMBER_LINKS}">
<f:param value="#{beanHelper.landLineNumber.phoneId}" />
<ui:define name="content">
<widgets:outputAdminMobilePanelGrid mobileNumber="#{beanHelper.mobileNumber}" />
- <p:dataTable id="contact_mobile_link" var="contact" value="#{contactPhoneController.allCurrentMobileNumberContacts()}" summary="#{msg.TABLE_SUMMARY_ADMIN_SHOW_ADMINISTRATIVE_LINKS}" tableStyleClass="table table-medium">
+ <p:dataTable id="contact_mobile_link" var="contact" value="#{contactPhoneController.allCurrentMobileNumberContacts()}" summary="#{msg.TABLE_SUMMARY_ADMIN_SHOW_ADMINISTRATIVE_LINKS}" tableStyleClass="table table-full">
<f:facet name="header">
<h:outputFormat value="#{msg.ADMIN_HEADER_SHOW_MOBILE_NUMBER_LINKS}">
<f:param value="#{beanHelper.mobileNumber.phoneId}" />
<ui:define name="content">
<h:form id="form_add_financials_income">
- <h:panelGroup styleClass="table table-medium" layout="block">
+ <h:panelGroup styleClass="table table-full" layout="block">
<div class="table-header">
<h:outputText value="#{project.LOGIN_FINANCIAL_ADD_INCOME_FORM_TITLE}" />
</div>
<ui:define name="content">
<h:form id="form_add_financial_receipt">
- <h:panelGrid columns="1" headerClass="table-header" footerClass="table-footer" styleClass="table table-full">
+ <p:panelGrid layout="grid" columns="1" headerClass="table-header" footerClass="table-footer" styleClass="table table-full">
<f:facet name="header">
<h:outputText value="#{project.LOGIN_ADD_FINANCIAL_RECEIPT_TITLE}" />
</f:facet>
<f:facet name="footer">
<p:commandButton styleClass="reset divider-right" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
- <p:commandButton styleClass="submit" type="submit" id="button_add_financial_receipt" value="#{project.BUTTON_LOGIN_ADD_FINANCIAL_RECEIPT}" action="#{receiptController.addReceipt()}" />
+ <p:commandButton styleClass="submit" type="submit" id="submit_add_financial_receipt" value="#{project.BUTTON_LOGIN_ADD_FINANCIAL_RECEIPT}" action="#{receiptController.addReceipt()}" />
</f:facet>
- </h:panelGrid>
+ </p:panelGrid>
</h:form>
</ui:define>
</ui:composition>
<ui:define name="content">
<h:panelGroup layout="block" styleClass="para">
- <h:panelGrid columns="4">
+ <p:panelGrid layout="grid" columns="4">
<f:facet name="header">
<h:outputText value="#{project.GENERAL_FINANCIAL_OVERVIEW}" />
</f:facet>
<h:outputLink id="totalReceipts" styleClass="data_field" target="list_user_financial_income" value="#{financialIncomeController.income.size()}" />
</h:column>
- </h:panelGrid>
+ </p:panelGrid>
</h:panelGroup>
<h:panelGroup layout="block" styleClass="para">