Skip to content

Commit

Permalink
Merge pull request #6846 from hmislk/Issue6839
Browse files Browse the repository at this point in the history
closes#6339 Closes #6339
  • Loading branch information
Irani96 authored Aug 21, 2024
2 parents 51adc0f + ec73ceb commit 3746847
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 60 deletions.
137 changes: 80 additions & 57 deletions src/main/webapp/opd/bill_reprint.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,27 @@
<p:outputLabel value="Reprint" class="mt-2"></p:outputLabel>
<div class="d-flex gap-2">
<p:commandButton
value="To Refund Patient Balance"
rendered="#{opdBillController.batchBill.paymentMethod eq 'PatientDeposit'}"
class="ui-button-group m-1"
icon="fa fa-money-bill-alt"
action="#{patientController.navigateToPatientDepositRefundFromOPDBill(opdBillController.batchBill.patient)}"
ajax="false">
<f:setPropertyActionListener
value="#{billSearch.bill.patient}"
target="#{patientController.current}" >
</f:setPropertyActionListener>
</p:commandButton>
value="To Refund Patient Balance"
rendered="#{opdBillController.batchBill.paymentMethod eq 'PatientDeposit'}"
class="ui-button-group m-1"
icon="fa fa-money-bill-alt"
action="#{patientController.navigateToPatientDepositRefundFromOPDBill(opdBillController.batchBill.patient)}"
ajax="false">
<f:setPropertyActionListener
value="#{billSearch.bill.patient}"
target="#{patientController.current}" >
</f:setPropertyActionListener>
</p:commandButton>
<p:commandButton
value="Print to Original Bill"
class="ui-button-info m-1"
icon="fa fa-print"
action="#{opdBillController.navigateToOpdOriginalBillPrint()}"
rendered="#{webUserController.hasPrivilege('OpdReprintOriginalBill')}"
ajax="false">
</p:commandButton>
value="Print to Original Bill"
class="ui-button-info m-1"
icon="fa fa-print"
action="#{opdBillController.navigateToOpdOriginalBillPrint()}"
rendered="#{webUserController.hasPrivilege('OpdReprintOriginalBill')}"
ajax="false">
</p:commandButton>
</div>

</div>
</f:facet>
<div class="row">
Expand Down Expand Up @@ -153,49 +153,76 @@
</div>
</div>

<p:panelGrid columns="7" >

</p:panelGrid>

<div class="row">
<div class="col-6">
<div class="d-flex m-1">
<p:outputLabel value="Paper Type" class="m-2"></p:outputLabel>
<div class="col-8">
<div class="d-flex m-1 justify-content-between">
<div>
<p:outputLabel value="Paper Type" class="m-2"></p:outputLabel>
<p:selectOneMenu value="#{sessionController.departmentPreference.opdBillPaperType}" class="m-1" style="width: 13em;">
<f:selectItem itemLabel="Please Select Paper Type" />
<f:selectItems value="#{enumController.paperTypes}" />
</p:selectOneMenu>
<p:commandButton ajax="false" icon="fa fa-sync-alt" class="ui-button m-1" title="Redraw Bill"></p:commandButton>

</div>

<p:commandButton
value="Print Refund Bill"
class="ui-button-info m-1"
icon="fa fa-print"
style="float: right"
rendered="#{billSearch.bill.refunded}"
ajax="false">
<p:printer target="refundPrint" />
</p:commandButton>
</div>

<h:panelGroup id="groupPrint" >
<h:panelGroup rendered="#{sessionController.departmentPreference.opdBillPaperType eq 'FiveFivePaper'}" >
<ui:repeat value="#{billSearch.bill}" var="ffb">
<prints:five_five_paper_with_headings bill="#{ffb}" duplicate="true"/>
</ui:repeat>
</h:panelGroup>
<h:panelGroup rendered="#{sessionController.departmentPreference.opdBillPaperType eq 'FiveFivePrintedPaper'}" >
<ui:repeat value="#{billSearch.bill}" var="ffpp">
<prints:five_five_paper_without_headings bill="#{ffpp}" duplicate="true"/>
</ui:repeat>
</h:panelGroup>
<h:panelGroup rendered="#{sessionController.departmentPreference.opdBillPaperType eq 'PosPaper'}" >
<ui:repeat value="#{billSearch.bill}" var="pp">
<prints:posOpdBill bill="#{pp}" duplicate="true"/>
</ui:repeat>
</h:panelGroup>
<h:panelGroup rendered="#{sessionController.departmentPreference.opdBillPaperType eq 'FiveFivePaperCoustom1'}" >
<ui:repeat value="#{billSearch.bill}" var="ffb" >
<prints:five_five_paper_coustom_1 bill="#{ffb}" duplicate="true"/>
</ui:repeat>
</h:panelGroup>

</h:panelGroup>
<div class="d-flex gap-2">
<div class="col-6">
<h:panelGroup id="groupPrint" >
<h:panelGroup rendered="#{sessionController.departmentPreference.opdBillPaperType eq 'FiveFivePaper'}" >
<ui:repeat value="#{billSearch.bill}" var="ffb">
<prints:five_five_paper_with_headings bill="#{ffb}" duplicate="true"/>
</ui:repeat>
</h:panelGroup>
<h:panelGroup rendered="#{sessionController.departmentPreference.opdBillPaperType eq 'FiveFivePrintedPaper'}" >
<ui:repeat value="#{billSearch.bill}" var="ffpp">
<prints:five_five_paper_without_headings bill="#{ffpp}" duplicate="true"/>
</ui:repeat>
</h:panelGroup>
<h:panelGroup rendered="#{sessionController.departmentPreference.opdBillPaperType eq 'PosPaper'}" >
<ui:repeat value="#{billSearch.bill}" var="pp">
<prints:posOpdBill bill="#{pp}" duplicate="true"/>
</ui:repeat>
</h:panelGroup>
<h:panelGroup rendered="#{sessionController.departmentPreference.opdBillPaperType eq 'FiveFivePaperCoustom1'}" >
<ui:repeat value="#{billSearch.bill}" var="ffb" >
<prints:five_five_paper_coustom_1 bill="#{ffb}" duplicate="true"/>
</ui:repeat>
</h:panelGroup>
</h:panelGroup>
</div>
<div class="col-6">
<h:panelGroup rendered="#{billSearch.bill.refunded}">
<h:panelGroup id="refundPrint" >
<h:panelGroup rendered="#{sessionController.loggedPreference.opdBillPaperType eq 'PosPaper'}">
<bi:opdPOSReturnBill bill="#{billSearch.bill.refundedBill}" />
</h:panelGroup>

<h:panelGroup rendered="#{sessionController.loggedPreference.opdBillPaperType eq 'FiveFivePaperCoustom1'}">
<prints:five_five_paper_coustom_1 bill="#{billSearch.bill.refundedBill}" refunded="true" duplicate="true"/>
</h:panelGroup>

<h:panelGroup rendered="#{sessionController.departmentPreference.opdBillPaperType eq 'FiveFivePrintedPaper'}" >
<bi:opdReturnfive_five_paper_without_headings
bill="#{billSearch.bill.refundedBill}"/>
</h:panelGroup>
</h:panelGroup>
</h:panelGroup>
</div>
</div>
</div>
<div class="col-6">


<div class="col-4">

<p:panel header="">
<f:facet name="header">
<h:outputText styleClass="fas fa-id-card-alt"></h:outputText>
Expand Down Expand Up @@ -345,10 +372,6 @@
</div>
</div>





</p:panel>
<p:dialog header="Edit Bill" widgetVar="editBill" resizable="false" showEffect="fade" hideEffect="fade" width="800">
<h:panelGroup id="printPnl" class="m-2" >
Expand Down
3 changes: 2 additions & 1 deletion src/main/webapp/opd/opd_batch_bill_print.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@
</div>

<div class="col-4" >
<p:commandButton value="Print"
<p:commandButton
value="Print"
class="ui-button-info m-1"
icon="fa fa-print"
ajax="false">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
<!-- INTERFACE -->
<cc:interface>
<cc:attribute name="bill" type="com.divudi.entity.Bill" />
<cc:attribute name="duplicate" type="java.lang.Boolean"/>
<cc:attribute name="duplicate" type="java.lang.Boolean" default="false"/>
<cc:attribute name="refunded" type="java.lang.Boolean" default="false"/>
<cc:attribute name="payments" ></cc:attribute>
</cc:interface>

Expand Down Expand Up @@ -45,7 +46,12 @@
</div>

<div class="headingBillFiveFive" style="text-align: center;font-weight: bold;">
<h:outputLabel value="OPD Receipt" />
<h:panelGroup rendered="#{cc.attrs.refunded}" >
<h:outputLabel value="OPD Refuned Receipt" />
</h:panelGroup>
<h:panelGroup rendered="#{!cc.attrs.refunded}" >
<h:outputLabel value="OPD Receipt" />
</h:panelGroup><br/>
<h:outputLabel value="**Duplicate**" rendered="#{cc.attrs.duplicate eq true}" />
<h:outputLabel value="**Cancelled**" rendered="#{cc.attrs.bill.cancelled eq true}" />
</div>
Expand Down

0 comments on commit 3746847

Please sign in to comment.