Skip to content

Commit

Permalink
Merge pull request #6601 from hmislk/issue#6571
Browse files Browse the repository at this point in the history
Issue#6571 Closes #6571
  • Loading branch information
Irani96 authored Jul 26, 2024
2 parents c4d6533 + f8d8492 commit 5968f14
Show file tree
Hide file tree
Showing 6 changed files with 176 additions and 14 deletions.
2 changes: 0 additions & 2 deletions nb-configuration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,5 @@ Any value defined here will override the pom.xml file value but is only applicab
-->
<org-netbeans-modules-maven-jaxws.rest_2e_config_2e_type>ide</org-netbeans-modules-maven-jaxws.rest_2e_config_2e_type>
<org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_deploy_2e_server>pfv5ee8</org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_deploy_2e_server>
<netbeans.compile.on.save>none</netbeans.compile.on.save>
<org-netbeans-modules-maven-j2ee.netbeans_2e_deploy_2e_on_2e_save>false</org-netbeans-modules-maven-j2ee.netbeans_2e_deploy_2e_on_2e_save>
</properties>
</project-shared-configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,6 @@ public void debugDueFees() {
+ " and b.fee.feeType=:ftp"
+ " and b.bill.refunded=false "
+ " and b.bill.cancelled=false "
// + " and b.bill.singleBillSession.absent=false"
+ " and (b.feeValue - b.paidValue) > 0 "
+ " and b.bill.billType in :bt "
+ " and b.staff=:stf ";
Expand All @@ -366,6 +365,7 @@ public void debugDueFees() {
// + " order by b.bill.singleBillSession.serviceSession.sessionDate,"
// + " b.bill.singleBillSession.serviceSession.sessionTime,"
// + " b.bill.singleBillSession.serialNo ";

sql += " order by b.bill.singleBillSession.serviceSession.sessionDate,"
+ " b.bill.singleBillSession.serviceSession.sessionTime,"
+ " b.bill.singleBillSession.serialNo ";
Expand Down Expand Up @@ -447,7 +447,9 @@ public void calculateDueFees() {
+ " and b.fee.feeType=:ftp"
+ " and b.bill.refunded=false "
+ " and b.bill.cancelled=false "
// + " and b.bill.singleBillSession.absent=false"

// + " and b.bill.singleBillSession.absent=false"

+ " and (b.feeValue - b.paidValue) > 0 "
+ " and b.bill.billType in :bt "
+ " and b.staff=:stf ";
Expand Down Expand Up @@ -542,7 +544,6 @@ public void calculateSessionDueFees() {
+ " and b.fee.feeType=:ftp"
+ " and b.bill.refunded=false "
+ " and b.bill.cancelled=false "
// + " and b.bill.singleBillSession.absent=false"
+ " and (b.feeValue - b.paidValue) > 0 "
+ " and b.bill.billType in :bt "
+ " and b.bill.singleBillSession.sessionInstance=:si"
Expand Down Expand Up @@ -597,8 +598,8 @@ public void calculateSessionDoneFees() {
+ " and b.fee.feeType=:ftp"
+ " and b.bill.refunded=false "
+ " and b.bill.cancelled=false "
// + " and b.bill.singleBillSession.absent=false"
+ " and (b.feeValue - b.paidValue) < 1 "
+ " and b.bill.singleBillSession.absent=false"
+ " and (b.feeValue - b.paidValue) > 0 "
+ " and b.bill.billType in :bt "
+ " and b.bill.singleBillSession.sessionInstance=:si"
+ " and b.bill.singleBillSession.completed=:com";
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/META-INF/persistence.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.2" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_2.xsd">
<persistence-unit name="hmisPU" transaction-type="JTA">

<jta-data-source>jdbc/arogya</jta-data-source>

<exclude-unlisted-classes>false</exclude-unlisted-classes>
Expand Down
172 changes: 167 additions & 5 deletions src/main/webapp/cashier/initial_fund_bill.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,110 @@
<div class="col-md-7" >

<h:panelGroup id="paymentDetails" >
<ftm:ftmPaymentDetailCapture/>
<h:panelGroup
class="d-flex"
layout="block"
id="cheque"
rendered="#{financialTransactionController.currentPayment.paymentMethod eq 'Cheque'}" >

<div class="d-flex">
<p:inputText
autocomplete="off"
onfocus="this.select()"
value="#{financialTransactionController.currentPayment.paidValue}" id="txtVal">
<p:ajax process="@this" ></p:ajax>
</p:inputText>
<p:watermark value="Value" for="txtVal" />

<p:inputText class="mx-2" autocomplete="off" value="#{financialTransactionController.currentPayment.chequeRefNo}" id="chequNo">
<p:ajax process="@this" ></p:ajax>
</p:inputText>

<p:selectOneMenu value="#{financialTransactionController.currentPayment.bank}" style="width: 10em;">
<f:selectItem itemLabel="Select Bank"/>
<f:selectItems value="#{institutionController.banks}" var="inst" itemLabel="#{inst.name}" itemValue="#{inst}"/>
<p:ajax process="@this" ></p:ajax>
</p:selectOneMenu>

<p:calendar class="mx-2" value="#{financialTransactionController.currentPayment.chequeDate}" pattern="#{sessionController.applicationPreference.longDateFormat}" id="ChequeDate">
<p:ajax process="@this" ></p:ajax>
</p:calendar>

<p:watermark value="Cheque No" for="chequNo"/>
<p:watermark value="Cheque Date" for="ChequeDate"/>
</div>

</h:panelGroup>

<h:panelGroup class="d-flex" layout="block" id="cash" rendered="#{financialTransactionController.currentPayment.paymentMethod eq 'Cash'}">
<h:panelGroup layout="block" class="w-100">
<table class="table table-bordered">
<thead>
<tr>
<th>Total Value</th>
<th>
<p:inputText id="txtCashPaidValue" value="#{financialTransactionController.currentPayment.paidValue}" readonly="true" />
</th>
</tr>
<tr>
<th colspan="2">Denominations</th>
</tr>
</thead>
<tbody>
<ui:repeat value="#{configOptionApplicationController.denominations}" var="denomination">
<tr>
<td>
<p:outputLabel value="#{denomination.value}:" class="m-2" />
</td>
<td>
<p:inputText
class="ml-5 m2"
style="width:10em;"
value="#{denomination.count}"
required="true"
requiredMessage="Please enter the amount for #{denomination.value}">
<p:ajax
event="keyup"
process="@this"
update=":#{p:resolveFirstComponentWithId('txtCashPaidValue', view).clientId}"
listener="#{financialTransactionController.updateCashDenominations}" />
</p:inputText>
</td>
</tr>
</ui:repeat>
</tbody>
</table>
</h:panelGroup>
</h:panelGroup>










<h:panelGroup
class="d-flex"
layout="block"
id="card"
rendered="#{financialTransactionController.currentPayment.paymentMethod eq 'Card'}" >
<p:outputLabel value="Value" class="mt-2"></p:outputLabel>
<p:inputText
class="mx-3"
id="txtCardValue"
value="#{financialTransactionController.currentPayment.paidValue}" >
</p:inputText>

</h:panelGroup>

<p:watermark value="0.00" for="txtCardValue" />

</h:panelGroup>


</div>
<div class="col-md-1">
<p:commandButton
Expand All @@ -57,21 +158,82 @@
icon="fa fa-plus"
class="ui-button-success"
process="btnAdd cmdPayment paymentDetails"
update="paymentMethodsAddedTable cmdPayment paymentDetails"
update="tblPayments totals cmdPayment paymentDetails"
action="#{financialTransactionController.addPaymentToInitialFundBill()}" >
</p:commandButton>
</div>
</div>

</p:panel>
<p:panel header="Funds" >
<f:facet name="header">
<h:panelGroup id="totals">
<div class="d-flex justify-content-between">
<div>
<h:outputText value="Funds List" ></h:outputText>
</div>
<div class="d-flex">
<h:outputText value=" Total Funds : " ></h:outputText>
<p:outputLabel

class="mx-2"
value="#{financialTransactionController.currentBill.total}" >
</p:outputLabel>
</div>
</div>

<h:panelGroup id="paymentMethodsAddedTable" >
<ftm:ftmPaymentMethoDetailsAddedTable/>
</h:panelGroup>
</h:panelGroup>
</f:facet>

<p:dataTable id="tblPayments" value="#{financialTransactionController.currentBillPayments}" var="bp" >
<p:column headerText="Payment Method" width="20%">
<h:outputText value="#{bp.paymentMethod}" ></h:outputText>
</p:column>

<p:column headerText="Details" class="row d-grid" >
<h:panelGroup rendered="#{bp.paymentMethod eq 'Cheque'}">
<div class="row ">
<h:outputLabel value="Bank Name : #{bp.bank.name}" ></h:outputLabel>
</div>
<div class="row ">
<h:outputLabel value="Cheque No : #{bp.chequeRefNo}" ></h:outputLabel>
</div>
<div class="row ">
<h:outputLabel value="Cheque Date : #{bp.chequeDate}" >
<f:convertDateTime pattern="#{sessionController.applicationPreference.longDateFormat}" ></f:convertDateTime>
</h:outputLabel>
</div>
</h:panelGroup>
</p:column>

<p:column headerText="Value" width="20%">
<h:outputText value="#{bp.paidValue}" ></h:outputText>
</p:column>

<p:column headerText="Denominations" width="20%">
<ui:repeat value="#{bp.humanReadableDenominations}" var="denomination">
<h:outputText value="#{denomination}" />
<br />
</ui:repeat>
#{bp.currencyDenominationsJson}
</p:column>

<p:column headerText="Action" width="20%">
<p:commandButton
class="ui-button-danger"
icon=" fa-solid fa-trash"
id="btnRemove"
value="Remove"
action="#{financialTransactionController.removePayment}"
process="btnRemove tblPayments"
update=":#{p:resolveFirstComponentWithId('tblPayments',view).clientId} :#{p:resolveFirstComponentWithId('totals',view).clientId}"
>
<f:setPropertyActionListener value="#{bp}" target="#{financialTransactionController.removingPayment}" ></f:setPropertyActionListener>
</p:commandButton>
</p:column>
</p:dataTable>

</p:panel>

</p:panel>

Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/collecting_centre/bill.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@
<div class="col-md-3">
<h:panelGroup>
<p:outputLabel value="Referring Doctor"></p:outputLabel>
<p:commandLink id="btnAddNewDoc"
<p:commandLink rendered="#{configOptionApplicationController.getBooleanValueByKey('Enable Users to Add Referring Doctors to the System in Collecting Centre Billing')}" id="btnAddNewDoc"
type="button"
value="&nbsp;(+)"
oncomplete="PF('dlg').show();"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,11 @@
<f:convertDateTime pattern=" yyyy MMMM dd" ></f:convertDateTime>
</h:outputLabel>
<h:outputLabel value="-" />


<h:outputLabel value="#{cc.attrs.bill.singleBillSession.sessionInstance.startingTime}" >


<f:convertDateTime pattern="hh:mm a" ></f:convertDateTime>
</h:outputLabel>
</b>
Expand Down

0 comments on commit 5968f14

Please sign in to comment.