Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

10423 disposal return recievable amount was wrong #10626

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
fc97e95
Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad…
ChinthakaPrasad Feb 10, 2025
00d5708
add new view for tranfer issue request and approval process
ChinthakaPrasad Feb 10, 2025
67b2715
add method to retrive all tranfer request
ChinthakaPrasad Feb 10, 2025
0c2cb8b
Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad…
ChinthakaPrasad Feb 10, 2025
8fadf52
Merge branch 'development' of https://github.com/hmislk/hmis.git into…
ChinthakaPrasad Feb 10, 2025
a2eb9a6
Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad…
ChinthakaPrasad Feb 10, 2025
319eaa8
Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad…
ChinthakaPrasad Feb 10, 2025
944b0e8
Add approval privillage and only privillage holder can approve the re…
ChinthakaPrasad Feb 10, 2025
368f93a
Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad…
ChinthakaPrasad Feb 10, 2025
b45b2a6
Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad…
ChinthakaPrasad Feb 10, 2025
06bb542
Merge branch 'development' of https://github.com/hmislk/hmis.git into…
ChinthakaPrasad Feb 10, 2025
28a0859
Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad…
ChinthakaPrasad Feb 11, 2025
77b242f
Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad…
ChinthakaPrasad Feb 11, 2025
fe7bcac
Merge branch 'development' of https://github.com/hmislk/hmis.git into…
ChinthakaPrasad Feb 11, 2025
7613d41
Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad…
ChinthakaPrasad Feb 11, 2025
7e14eab
Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad…
ChinthakaPrasad Feb 13, 2025
6cc2a92
Merge branch 'development' of https://github.com/hmislk/hmis.git into…
ChinthakaPrasad Feb 13, 2025
f98ff26
Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad…
ChinthakaPrasad Feb 13, 2025
8824dab
Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad…
ChinthakaPrasad Feb 13, 2025
943e008
Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad…
ChinthakaPrasad Feb 13, 2025
3fb4588
Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad…
ChinthakaPrasad Feb 14, 2025
29efeb3
Merge branch 'development' of https://github.com/hmislk/hmis.git into…
ChinthakaPrasad Feb 16, 2025
e0dc271
Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad…
ChinthakaPrasad Feb 16, 2025
13ca576
Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad…
ChinthakaPrasad Feb 17, 2025
a26f4c6
Merge branch 'development' of https://github.com/hmislk/hmis.git into…
ChinthakaPrasad Feb 17, 2025
8960f94
Merge branch 'development' of https://github.com/hmislk/hmis.git into…
ChinthakaPrasad Feb 18, 2025
da19c83
Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad…
ChinthakaPrasad Feb 18, 2025
3ece128
Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad…
ChinthakaPrasad Feb 18, 2025
182fdd0
Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad…
ChinthakaPrasad Feb 19, 2025
1342928
Merge branch 'development' of https://github.com/hmislk/hmis.git into…
ChinthakaPrasad Feb 19, 2025
81d600a
Signed-off-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad…
ChinthakaPrasad Feb 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.divudi</groupId>
<artifactId>coop</artifactId>
<artifactId>rh</artifactId>
<version>3.0.0</version>
<packaging>war</packaging>
<name>coop</name>
<name>rh</name>

<properties>
<endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/divudi/ws/common/ApplicationConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ private void addRestResourceClasses(Set<Class<?>> resources) {
resources.add(com.divudi.ws.finance.clinical.Fhir.class);
resources.add(com.divudi.ws.inward.ApiInward.class);
resources.add(com.divudi.ws.lims.Lims.class);
resources.add(com.divudi.ws.lims.LimsMiddlewareController.class);
resources.add(com.divudi.ws.lims.MiddlewareController.class);
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/WEB-INF/glassfish-web.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
<glassfish-web-app error-url="">
<context-root>/coop</context-root>
<context-root>/rh</context-root>
<class-loader delegate="true"/>
<jsp-config>
<property name="keepgenerated" value="true">
Expand Down
66 changes: 47 additions & 19 deletions src/main/webapp/pharmacy/pharmacy_bill_return_issue.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@

<div class="d-flex justify-content-between align-items-center">
<div>
<p:outputLabel value="Recievable Amount :" class="mt-2"/>
<p:outputLabel value="Recievable Amount : " class="mt-2"/>
<p:outputLabel
class="mx-2 mt-2"
id="total"
value="#{issueReturnController.returnBill.total}"
value=""
styleClass="totalAmount"
>
<f:convertNumber pattern="#,##0.00"></f:convertNumber>
</p:outputLabel>
</div>
<div class="d-flex align-items-center">
Expand Down Expand Up @@ -55,8 +57,7 @@
<p:dataTable
var="ph"
value="#{issueReturnController.billItems}"
scrollable="true"
scrollHeight="250"
scrollable="true"
rows="10"
id="itemList" >

Expand All @@ -69,22 +70,26 @@
<h:outputText value=" #{ph.item.name}" />

</p:column>
<p:column headerText="BillItem id" style="width:50px!important;">
<h:outputText value=" #{ph.id}" />

</p:column>
<p:column headerText="Item id" style="width:50px!important;">
<h:outputText value=" #{ph.item.id}" />

</p:column>
<!-- <p:column headerText="BillItem id" style="width:50px!important;">
<h:outputText value=" #{ph.id}" />
</p:column>
<p:column headerText="Item id" style="width:50px!important;">
<h:outputText value=" #{ph.item.id}" />
</p:column> -->

<p:column headerText="Balance Qty in Unit" style="width:25px!important;">
<h:outputText value="#{ph.remainingQty}" />
</p:column>

<p:column headerText="Purchase Rate" style="width:25px!important;">
<h:outputText value="#{ph.rate}" />
</p:column>
</p:column>

<p:column headerText="Retail Rate" style="width:25px!important;">
<h:outputText value="#{ph.pharmaceuticalBillItem.retailRate}" />
</p:column>


<p:column headerText="Batch No" style="width:25px!important;">
Expand All @@ -96,20 +101,40 @@
<f:convertDateTime pattern="#{sessionController.applicationPreference.longDateFormat}" />
</h:outputText>
</p:column>


<p:column styleClass="revieveItemPrice" headerText="Recievable Amount" style="width:25px!important;">
<h:outputText rendered="#{configOptionApplicationController.getBooleanValueByKey('Disposal bills shows purchase rate of bill items in the bill', false)}" value="#{ph.qty*ph.rate}" >
<f:convertNumber pattern="#,##0.00"></f:convertNumber>
</h:outputText>
<h:outputText rendered="#{!configOptionApplicationController.getBooleanValueByKey('Disposal bills shows purchase rate of bill items in the bill', false)}" value="#{ph.qty*ph.pharmaceuticalBillItem.retailRate}" >
<f:convertNumber pattern="#,##0.00"></f:convertNumber>
</h:outputText>
</p:column>

<p:column headerText="Returning Qty in Unit" style="width:25px!important;" >
<p:inputText autocomplete="off" value="#{ph.qty}" >
<f:ajax
event="blur"
render="@this :#{p:resolveFirstComponentWithId('total',view).clientId}"
execute="@this"
<p:ajax
event="change"
update="@this :#{p:resolveFirstComponentWithId('total',view).clientId} revieveItemPrice itemList"
process="@this"
oncomplete="calculateTotalRecievableAmount()"
listener="#{issueReturnController.onEdit(ph)}" >
</f:ajax>
</p:ajax>
</p:inputText>
</p:column>

</p:dataTable>
</h:panelGroup>
<script>
function calculateTotalRecievableAmount() {
const allItemAmount = document.querySelectorAll('.revieveItemPrice');

const totalAmount = Array.from(allItemAmount).map(td => parseFloat(td.innerText) || 0).reduce((sum, value) => sum + value, 0);
console.log('start');
document.querySelector('.totalAmount').innerText = totalAmount;

}
</script>

<p:panel rendered="#{issueReturnController.printPreview}">
<f:facet name="header">
Expand Down Expand Up @@ -158,6 +183,9 @@
</p:panel>

</h:form>
<script>

</script>
</ui:define>

</ui:composition>
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
value="To Return"
class="mx-2 ui-button-warning"
icon="fa fa-money-bill-wave"
action="pharmacy_bill_return_issue"
action="pharmacy_bill_return_issue?faces-redirect=true"
disabled="#{pharmacyBillSearch.bill.cancelled eq true}" >
<f:setPropertyActionListener
value="#{pharmacyBillSearch.bill}"
Expand Down
25 changes: 16 additions & 9 deletions src/main/webapp/pharmacy/pharmacy_search_issue_bill_item.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -74,22 +74,22 @@
<p:column headerText="No" styleClass="alignTop" width="2%">
<h:outputLabel value="#{i+1}"/>
</p:column>
<p:column headerText="Bill No" styleClass="alignTop" >
<p:column headerText="Bill No" styleClass="alignTop" width="10em">
<p:commandLink
ajax="false"
value="#{pi.bill.deptId}"
action="/pharmacy/pharmacy_reprint_bill_unit_issue">
<f:setPropertyActionListener value="#{pi.bill}" target="#{pharmacyBillSearch.bill}"/>
</p:commandLink>
</p:column>
<p:column headerText="Item Name" styleClass="alignTop" width="40%">
<p:column headerText="Item Name" styleClass="alignTop" width="20em">
<h:outputLabel value="#{pi.item.code}" ></h:outputLabel>
&nbsp;-&nbsp;
<h:outputLabel value="#{pi.item.name}" />
<h:outputLabel value="#{pi.item.name}" />

</p:column>

<p:column headerText="Billed At" width="10%">
<p:column headerText="Billed At" width="15em">
<h:outputLabel value="#{pi.bill.createdAt}" >
<f:convertDateTime pattern="dd MMM yyyy - hh mm ss a"/>
</h:outputLabel>
Expand All @@ -110,20 +110,27 @@
<f:convertDateTime pattern="#{sessionController.applicationPreference.longDateTimeFormat}" />
</h:outputLabel>
</h:panelGroup>
</p:column>
<p:column headerText="Qty" >
</p:column>

<p:column headerText="Billed By" width="10em" >
<h:outputLabel value="#{pi.bill.creater.name}" style="text-align: left;">
</h:outputLabel>
</p:column>


<p:column headerText="Qty" width="10em">
<h:outputLabel value="#{pi.qty}" >
<f:convertNumber pattern="#0.00"/>
</h:outputLabel>
</p:column>

<p:column headerText="Bill item Value">
<p:column headerText="Bill Retail Total" width="15em">
<h:outputLabel value="#{pi.netValue}" >
<f:convertNumber pattern="#,##0.00"/>
</h:outputLabel>
</p:column>

<p:column headerText="Department" styleClass="alignTop" >
<p:column headerText="To Department" styleClass="alignTop" width="10em">
<h:outputLabel value="#{pi.bill.toDepartment.name}" style="text-align: left;">
</h:outputLabel>
</p:column>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
<p:commandLink
ajax="false"
value="#{bill.deptId}"
action="pharmacy_reprint_bill_unit_issue_return">
action="pharmacy_reprint_bill_unit_issue_return?faces-redirect=true">
<f:setPropertyActionListener value="#{bill}" target="#{pharmacyIssueController.bill}"/>
</p:commandLink>
</p:column>
Expand Down Expand Up @@ -150,9 +150,7 @@
</h:panelGroup>
</p:column>



<p:column headerText="Value" style="text-align: right" >
<p:column headerText="Total Sale Value" style="text-align: right" >
<h:outputLabel value="#{bill.netTotal}" >
<f:convertNumber pattern="#,##0.00"/>
</h:outputLabel>
Expand Down
Loading