Skip to content

Commit

Permalink
Merge pull request #4651 from hmislk/Issue#4567
Browse files Browse the repository at this point in the history
Closes #4567
  • Loading branch information
Senula88 authored Apr 19, 2024
2 parents 85b9df3 + 04c4046 commit 49a9ab3
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 88 deletions.
2 changes: 1 addition & 1 deletion src/main/resources/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.0.20240417.12
3.0.0.20240419.2
181 changes: 94 additions & 87 deletions src/main/webapp/pharmacy/pharmacy_search.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -16,95 +16,102 @@
<h:outputLabel value="Pharmacy Bill Search"/>

</f:facet>
<h:panelGrid columns="18" >
<h:outputLabel value="From"/>
<p:calendar id="fromDate" value="#{searchController.fromDate}" navigator="true" pattern="#{sessionController.applicationPreference.longDateTimeFormat}" >
</p:calendar>
<p:spacer width="5" height="1" ></p:spacer>

<h:outputLabel value="To"/>
<p:calendar id="toDate" value="#{searchController.toDate}" navigator="true" pattern="#{sessionController.applicationPreference.longDateTimeFormat}" >
</p:calendar>
<p:spacer width="5" height="1" ></p:spacer>

<h:outputLabel value="Bill Type"/>
<p:selectOneMenu value="#{searchController.billType}">
<f:selectItem itemLabel="Select Bill Type"/>
<f:selectItems value="#{enumController.pharmacyBillTypes}" var="i" itemLabel="#{i.label}" itemValue="#{i}" />
<f:ajax event="change" execute="@this" render="detail" listener="#{searchController.makeNull}"/>
</p:selectOneMenu>
<p:spacer width="5" height="1" ></p:spacer>

<h:outputLabel value="List Count"/>
<p:inputText autocomplete="off" value="#{searchController.maxResult}" />
<p:spacer width="5" height="1" ></p:spacer>

<p:commandButton id="btnSearch" ajax="false" value="Search" action="#{searchController.createTableByBillType}"/>
<p:commandButton ajax="false" value="Search All" action="#{searchController.createTableByBillTypeAllDepartment}" rendered="false"/>
</h:panelGrid>
<div class="row">
<div class="col-2">
<h:outputLabel value="From Date"/>
<p:calendar id="fromDate" value="#{searchController.fromDate}" class="w-100" inputStyleClass="w-100" navigator="true" pattern="#{sessionController.applicationPreference.longDateTimeFormat}" >
</p:calendar>
<p:spacer height="1" ></p:spacer>

<h:outputLabel value="To Date"/>
<p:calendar id="toDate" value="#{searchController.toDate}" class="w-100" inputStyleClass="w-100" navigator="true" pattern="#{sessionController.applicationPreference.longDateTimeFormat}" >
</p:calendar>
<p:spacer height="1" ></p:spacer>

<h:outputLabel value="Bill Type"/>
<p:selectOneMenu value="#{searchController.billType}" class="w-100">
<f:selectItem itemLabel="Select Bill Type"/>
<f:selectItems value="#{enumController.pharmacyBillTypes}" var="i" itemLabel="#{i.label}" itemValue="#{i}" />
<f:ajax event="change" execute="@this" render="detail" listener="#{searchController.makeNull}"/>
</p:selectOneMenu>
<p:spacer height="1" ></p:spacer>

<h:outputLabel value="List Count"/>
<p:inputText autocomplete="off" value="#{searchController.maxResult}" class="w-100" />

<p:commandButton id="btnSearch" ajax="false"
icon="fas fa-search"
class="ui-button-warning w-100 mt-2"
value="Search" action="#{searchController.createTableByBillType}"/>
<p:commandButton ajax="false" value="Search All" action="#{searchController.createTableByBillTypeAllDepartment}" rendered="false"/>
</div>
<div class="col-10">
<h:panelGroup id="detail">
<h:panelGroup rendered="#{searchController.billType eq 'PharmacyGrnBill'}" >
<se:grn/>
</h:panelGroup>

<h:panelGroup rendered="#{searchController.billType eq 'PharmacyGrnReturn'}" >
<se:grn_return />
</h:panelGroup>

<h:panelGroup rendered="#{searchController.billType eq 'PharmacyOrder'}" >
<se:po_request />
</h:panelGroup>

<h:panelGroup rendered="#{searchController.billType eq 'PharmacyTransferRequest'}" >
<se:transfer_request />
</h:panelGroup>

<h:panelGroup rendered="#{searchController.billType eq 'PharmacyTransferIssue'}" >
<se:transfer_issue />
</h:panelGroup>

<h:panelGroup rendered="#{searchController.billType eq 'StoreTransferReceive'}" >
<se:transfer_recieve />
</h:panelGroup>

<h:panelGroup rendered="#{searchController.billType eq 'PharmacyOrderApprove'}" >
<se:po_approve />
</h:panelGroup>

<h:panelGroup rendered="#{searchController.billType eq 'PharmacyPre'}" >
<se:pre_bill />
</h:panelGroup>

<h:panelGroup rendered="#{searchController.billType eq 'PharmacyPurchaseBill'}" >
<se:purchase />
</h:panelGroup>

<h:panelGroup rendered="#{searchController.billType eq 'PurchaseReturn'}" >
<se:purchase_return />
</h:panelGroup>

<h:panelGroup rendered="#{searchController.billType eq 'PharmacySale'}" >
<se:sale />
</h:panelGroup>

<h:panelGroup rendered="#{searchController.billType eq 'PharmacyAdjustment'}" >
<se:adjustment />
</h:panelGroup>

<h:panelGroup rendered="#{searchController.billType eq 'PharmacyWholeSale'}" >
<se:pharmacy_whole_sale />
</h:panelGroup>

<h:panelGroup rendered="#{searchController.billType eq 'PharmacyIssue'}" >
<se:pharmacy_issue />
</h:panelGroup>

<h:panelGroup rendered="#{searchController.billType eq 'PharmacyTransferReceive'}" >
<se:pharmacy_transfer_recieve />
</h:panelGroup>
</h:panelGroup>
</div>
</div>

<p:defaultCommand target="btnSearch"/>
<h:panelGroup id="detail">
<h:panelGroup rendered="#{searchController.billType eq 'PharmacyGrnBill'}" >
<se:grn/>
</h:panelGroup>

<h:panelGroup rendered="#{searchController.billType eq 'PharmacyGrnReturn'}" >
<se:grn_return />
</h:panelGroup>

<h:panelGroup rendered="#{searchController.billType eq 'PharmacyOrder'}" >
<se:po_request />
</h:panelGroup>

<h:panelGroup rendered="#{searchController.billType eq 'PharmacyTransferRequest'}" >
<se:transfer_request />
</h:panelGroup>

<h:panelGroup rendered="#{searchController.billType eq 'PharmacyTransferIssue'}" >
<se:transfer_issue />
</h:panelGroup>

<h:panelGroup rendered="#{searchController.billType eq 'StoreTransferReceive'}" >
<se:transfer_recieve />
</h:panelGroup>

<h:panelGroup rendered="#{searchController.billType eq 'PharmacyOrderApprove'}" >
<se:po_approve />
</h:panelGroup>

<h:panelGroup rendered="#{searchController.billType eq 'PharmacyPre'}" >
<se:pre_bill />
</h:panelGroup>

<h:panelGroup rendered="#{searchController.billType eq 'PharmacyPurchaseBill'}" >
<se:purchase />
</h:panelGroup>

<h:panelGroup rendered="#{searchController.billType eq 'PurchaseReturn'}" >
<se:purchase_return />
</h:panelGroup>

<h:panelGroup rendered="#{searchController.billType eq 'PharmacySale'}" >
<se:sale />
</h:panelGroup>

<h:panelGroup rendered="#{searchController.billType eq 'PharmacyAdjustment'}" >
<se:adjustment />
</h:panelGroup>

<h:panelGroup rendered="#{searchController.billType eq 'PharmacyWholeSale'}" >
<se:pharmacy_whole_sale />
</h:panelGroup>

<h:panelGroup rendered="#{searchController.billType eq 'PharmacyIssue'}" >
<se:pharmacy_issue />
</h:panelGroup>

<h:panelGroup rendered="#{searchController.billType eq 'PharmacyTransferReceive'}" >
<se:pharmacy_transfer_recieve />
</h:panelGroup>
</h:panelGroup>

</p:panel>
</h:form>

Expand Down

0 comments on commit 49a9ab3

Please sign in to comment.