Skip to content

Commit

Permalink
Merge pull request #6743 from hmislk/Issue#6742
Browse files Browse the repository at this point in the history
Issue#6742 Closes #6742
  • Loading branch information
Irani96 authored Aug 4, 2024
2 parents 16fa8a3 + d45b3fd commit db58e70
Show file tree
Hide file tree
Showing 8 changed files with 1,200 additions and 221 deletions.
103 changes: 59 additions & 44 deletions src/main/webapp/pharmacy/pharmacy_bill_retail_sale_for_cashier.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,17 @@
<p:printer target="TokenPreview" ></p:printer>
</p:commandButton>

<p:commandButton
accesskey="a"
id="btnPrintTokenBill"
value="Print Token And Bill"
ajax="false"
icon="fa fa-print"
class="ui-button-info mx-1"
action="#" >
<p:printer target="gpBillPreviewTokenAndBill" ></p:printer>
</p:commandButton>

<p:outputLabel value="Paper Type" class="m-2"></p:outputLabel>
<p:selectOneMenu value="#{sessionController.departmentPreference.pharmacyBillPaperType}" class="m-1" id='ph' style="width: 13em;">
<f:selectItem itemLabel="Please Select Paper Type" />
Expand Down Expand Up @@ -780,59 +791,63 @@
</div>


<h:panelGroup rendered="#{pharmacySaleController.printBill ne null}" id="TokenPreview" class="m-2">
<h:panelGroup id="gpBillPreviewPosToken" rendered="#{sessionController.departmentPreference.pharmacyBillPaperType eq 'PosPaper'}">
<div >
<h:panelGroup rendered="#{sessionController.loggedPreference.pharmacyBillPrabodha eq false}">
<phi:saleBillToken id="saleBillToken" bill="#{pharmacySaleController.printBill}"></phi:saleBillToken>
</h:panelGroup>
</div>
</h:panelGroup>
<h:panelGroup id="gpBillPreviewFiveFiveToken" rendered="#{sessionController.departmentPreference.pharmacyBillPaperType eq 'FiveFivePaper'}">
<div >
<h:panelGroup rendered="#{sessionController.loggedPreference.pharmacyBillPrabodha eq false}">
<phi:saleBill_five_five_token id="saleBillTokenFiveFive" bill="#{pharmacySaleController.printBill}"></phi:saleBill_five_five_token>
</h:panelGroup>
</div>
<h:panelGroup id="gpBillPreviewTokenAndBill">
<h:panelGroup rendered="#{pharmacySaleController.printBill ne null}" id="TokenPreview" class="m-2">
<h:panelGroup id="gpBillPreviewPosToken" rendered="#{sessionController.departmentPreference.pharmacyBillPaperType eq 'PosPaper'}">
<div >
<h:panelGroup rendered="#{sessionController.loggedPreference.pharmacyBillPrabodha eq false}">
<phi:saleBillToken id="saleBillToken" bill="#{pharmacySaleController.printBill}"></phi:saleBillToken>
</h:panelGroup>
</div>
</h:panelGroup>
<h:panelGroup id="gpBillPreviewFiveFiveToken" rendered="#{sessionController.departmentPreference.pharmacyBillPaperType eq 'FiveFivePaper'}">
<div >
<h:panelGroup rendered="#{sessionController.loggedPreference.pharmacyBillPrabodha eq false}">
<phi:saleBill_five_five_token id="saleBillTokenFiveFive" bill="#{pharmacySaleController.printBill}"></phi:saleBill_five_five_token>
</h:panelGroup>
</div>
</h:panelGroup>

</h:panelGroup>

</h:panelGroup>
<h:panelGroup id="gpBillPreview">

<h:panelGroup id="gpBillPreview">
<!-- <h:panelGroup id="gpBillPreviewSingle">
<div >
<h:panelGroup rendered="#{sessionController.loggedPreference.pharmacyBillPrabodha eq false}" >
<phi:saleBill bill="#{pharmacySaleController.printBill}"></phi:saleBill>
</h:panelGroup>
</div>
</h:panelGroup>-->

<!-- <h:panelGroup id="gpBillPreviewSingle">
<div >
<h:panelGroup rendered="#{sessionController.loggedPreference.pharmacyBillPrabodha eq false}" >
<phi:saleBill bill="#{pharmacySaleController.printBill}"></phi:saleBill>
</h:panelGroup>
</div>
</h:panelGroup>-->
<h:panelGroup id="gpBillPreviewPos" rendered="#{sessionController.departmentPreference.pharmacyBillPaperType eq 'PosPaper'}">
<div >
<h:panelGroup rendered="#{sessionController.loggedPreference.pharmacyBillPrabodha eq false}">
<phi:saleBill_for_Cashier bill="#{pharmacySaleController.printBill}"></phi:saleBill_for_Cashier>
</h:panelGroup>
</div>
</h:panelGroup>

<h:panelGroup id="gpBillPreviewPos" rendered="#{sessionController.departmentPreference.pharmacyBillPaperType eq 'PosPaper'}">
<div >
<h:panelGroup rendered="#{sessionController.loggedPreference.pharmacyBillPrabodha eq false}">
<phi:saleBill bill="#{pharmacySaleController.printBill}"></phi:saleBill>
</h:panelGroup>
</div>
</h:panelGroup>
<h:panelGroup id="gpBillPreviewFiveFive" rendered="#{sessionController.departmentPreference.pharmacyBillPaperType eq 'FiveFivePaper'}">
<div >
<h:panelGroup rendered="#{sessionController.loggedPreference.pharmacyBillPrabodha eq false}" >
<phi:saleBill_five_five_for_Cashier bill="#{pharmacySaleController.printBill}"></phi:saleBill_five_five_for_Cashier>
</h:panelGroup>
</div>
</h:panelGroup>

<h:panelGroup id="gpBillPreviewFiveFive" rendered="#{sessionController.departmentPreference.pharmacyBillPaperType eq 'FiveFivePaper'}">
<div >
<h:panelGroup rendered="#{sessionController.loggedPreference.pharmacyBillPrabodha eq false}" >
<phi:saleBill_five_five bill="#{pharmacySaleController.printBill}"></phi:saleBill_five_five>
</h:panelGroup>
</div>
</h:panelGroup>
<h:panelGroup id="gpBillPreviewPosHeader" rendered="#{sessionController.loggedPreference.pharmacyBillPaperType eq 'PosHeaderPaper'}">
<div >
<h:panelGroup rendered="#{sessionController.loggedPreference.pharmacyBillPrabodha eq false}" >
<phi:saleBill_Header bill="#{pharmacySaleController.printBill}"></phi:saleBill_Header>
</h:panelGroup>
</div>
</h:panelGroup>

<h:panelGroup id="gpBillPreviewPosHeader" rendered="#{sessionController.loggedPreference.pharmacyBillPaperType eq 'PosHeaderPaper'}">
<div >
<h:panelGroup rendered="#{sessionController.loggedPreference.pharmacyBillPrabodha eq false}" >
<phi:saleBill_Header bill="#{pharmacySaleController.printBill}"></phi:saleBill_Header>
</h:panelGroup>
</div>
</h:panelGroup>
</h:panelGroup>

</h:panelGroup>

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

Expand Down
101 changes: 57 additions & 44 deletions src/main/webapp/pharmacy/pharmacy_bill_retail_sale_for_cashier_1.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,17 @@
<p:printer target="TokenPreview" ></p:printer>
</p:commandButton>

<p:commandButton
accesskey="a"
id="btnPrintTokenBill"
value="Print Token And Bill"
ajax="false"
icon="fa fa-print"
class="ui-button-info mx-1"
action="#" >
<p:printer target="gpBillPreviewTokenAndBill" ></p:printer>
</p:commandButton>

<p:outputLabel value="Paper Type" class="m-2"></p:outputLabel>
<p:selectOneMenu value="#{sessionController.departmentPreference.pharmacyBillPaperType}" class="m-1" id='ph' style="width: 13em;">
<f:selectItem itemLabel="Please Select Paper Type" />
Expand All @@ -780,60 +791,62 @@
<p:commandButton icon="fas fa-file-invoice" value="Sale 4" action="/pharmacy/pharmacy_bill_retail_sale_for_cashier_3" rendered="#{webUserController.hasPrivilege('PharmacySale')}" actionListener="#{pharmacySaleController3.pharmacyRetailSale()}" />
</div>

<h:panelGroup id="gpBillPreviewTokenAndBill">
<h:panelGroup rendered="#{pharmacySaleController1.printBill ne null}" id="TokenPreview" class="m-2">
<h:panelGroup id="gpBillPreviewPosToken" rendered="#{sessionController.departmentPreference.pharmacyBillPaperType eq 'PosPaper'}">
<div >
<h:panelGroup rendered="#{sessionController.loggedPreference.pharmacyBillPrabodha eq false}">
<phi:saleBillToken id="saleBillToken" bill="#{pharmacySaleController1.printBill}"></phi:saleBillToken>
</h:panelGroup>
</div>
</h:panelGroup>
<h:panelGroup id="gpBillPreviewFiveFiveToken" rendered="#{sessionController.departmentPreference.pharmacyBillPaperType eq 'FiveFivePaper'}">
<div >
<h:panelGroup rendered="#{sessionController.loggedPreference.pharmacyBillPrabodha eq false}">
<phi:saleBill_five_five_token id="saleBillTokenFiveFive" bill="#{pharmacySaleController1.printBill}"></phi:saleBill_five_five_token>
</h:panelGroup>
</div>
</h:panelGroup>

<h:panelGroup rendered="#{pharmacySaleController1.printBill ne null}" id="TokenPreview" class="m-2">
<h:panelGroup id="gpBillPreviewPosToken" rendered="#{sessionController.departmentPreference.pharmacyBillPaperType eq 'PosPaper'}">
<div >
<h:panelGroup rendered="#{sessionController.loggedPreference.pharmacyBillPrabodha eq false}">
<phi:saleBillToken id="saleBillToken" bill="#{pharmacySaleController1.printBill}"></phi:saleBillToken>
</h:panelGroup>
</div>
</h:panelGroup>
<h:panelGroup id="gpBillPreviewFiveFiveToken" rendered="#{sessionController.departmentPreference.pharmacyBillPaperType eq 'FiveFivePaper'}">
<div >
<h:panelGroup rendered="#{sessionController.loggedPreference.pharmacyBillPrabodha eq false}">
<phi:saleBill_five_five_token id="saleBillTokenFiveFive" bill="#{pharmacySaleController1.printBill}"></phi:saleBill_five_five_token>
</h:panelGroup>
</div>
</h:panelGroup>

</h:panelGroup>
<h:panelGroup id="gpBillPreview">

<h:panelGroup id="gpBillPreview">
<!-- <h:panelGroup id="gpBillPreviewSingle">
<div >
<h:panelGroup rendered="#{sessionController.loggedPreference.pharmacyBillPrabodha eq false}" >
<phi:saleBill bill="#{pharmacySaleController1.printBill}"></phi:saleBill>
</h:panelGroup>
</div>
</h:panelGroup>-->

<!-- <h:panelGroup id="gpBillPreviewSingle">
<div >
<h:panelGroup rendered="#{sessionController.loggedPreference.pharmacyBillPrabodha eq false}" >
<phi:saleBill bill="#{pharmacySaleController1.printBill}"></phi:saleBill>
</h:panelGroup>
</div>
</h:panelGroup>-->
<h:panelGroup id="gpBillPreviewPos" rendered="#{sessionController.departmentPreference.pharmacyBillPaperType eq 'PosPaper'}">
<div >
<h:panelGroup rendered="#{sessionController.loggedPreference.pharmacyBillPrabodha eq false}">
<phi:saleBill_for_Cashier bill="#{pharmacySaleController1.printBill}"></phi:saleBill_for_Cashier>
</h:panelGroup>
</div>
</h:panelGroup>

<h:panelGroup id="gpBillPreviewPos" rendered="#{sessionController.departmentPreference.pharmacyBillPaperType eq 'PosPaper'}">
<div >
<h:panelGroup rendered="#{sessionController.loggedPreference.pharmacyBillPrabodha eq false}">
<phi:saleBill bill="#{pharmacySaleController1.printBill}"></phi:saleBill>
</h:panelGroup>
</div>
</h:panelGroup>
<h:panelGroup id="gpBillPreviewFiveFive" rendered="#{sessionController.departmentPreference.pharmacyBillPaperType eq 'FiveFivePaper'}">
<div >
<h:panelGroup rendered="#{sessionController.loggedPreference.pharmacyBillPrabodha eq false}" >
<phi:saleBill_five_five_for_Cashier bill="#{pharmacySaleController1.printBill}"></phi:saleBill_five_five_for_Cashier>
</h:panelGroup>
</div>
</h:panelGroup>

<h:panelGroup id="gpBillPreviewFiveFive" rendered="#{sessionController.departmentPreference.pharmacyBillPaperType eq 'FiveFivePaper'}">
<div >
<h:panelGroup rendered="#{sessionController.loggedPreference.pharmacyBillPrabodha eq false}" >
<phi:saleBill_five_five bill="#{pharmacySaleController1.printBill}"></phi:saleBill_five_five>
</h:panelGroup>
</div>
</h:panelGroup>
<h:panelGroup id="gpBillPreviewPosHeader" rendered="#{sessionController.loggedPreference.pharmacyBillPaperType eq 'PosHeaderPaper'}">
<div >
<h:panelGroup rendered="#{sessionController.loggedPreference.pharmacyBillPrabodha eq false}" >
<phi:saleBill_Header bill="#{pharmacySaleController1.printBill}"></phi:saleBill_Header>
</h:panelGroup>
</div>
</h:panelGroup>

<h:panelGroup id="gpBillPreviewPosHeader" rendered="#{sessionController.loggedPreference.pharmacyBillPaperType eq 'PosHeaderPaper'}">
<div >
<h:panelGroup rendered="#{sessionController.loggedPreference.pharmacyBillPrabodha eq false}" >
<phi:saleBill_Header bill="#{pharmacySaleController1.printBill}"></phi:saleBill_Header>
</h:panelGroup>
</div>
</h:panelGroup>

</h:panelGroup>

</p:panel>
</h:form>
</ui:define>
Expand Down
Loading

0 comments on commit db58e70

Please sign in to comment.