Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/hmislk/hmis.git
Browse files Browse the repository at this point in the history
# Conflicts:
#	README.md
#	src/main/java/com/divudi/bean/common/EnumController.java
#	src/main/java/com/divudi/bean/common/SearchController.java
#	src/main/java/com/divudi/bean/store/StoreAdjustmentController.java
#	src/main/resources/META-INF/persistence.xml

Signed-off-by: buddhika75 <[email protected]>
  • Loading branch information
buddhika75 committed Aug 7, 2024
2 parents 9b64727 + e7b89b2 commit 1e3c3ea
Show file tree
Hide file tree
Showing 8 changed files with 106 additions and 63 deletions.
2 changes: 1 addition & 1 deletion .github/counter.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14
25
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Developed using Java Enterprise Edition, the system offers both a web applicatio

## Current Version

Current Version: 3.0.0.20240807.14 (This line will be automatically updated to reflect the latest version)
Current Version: 3.0.0.20240807.25 (This line will be automatically updated to reflect the latest version)

## History

Expand Down
13 changes: 12 additions & 1 deletion src/main/java/com/divudi/bean/common/EnumController.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public class EnumController implements Serializable {
@Inject
ConfigOptionApplicationController configOptionApplicationController;
List<PaymentMethod> paymentMethodsForOpdBilling;
List<PaymentMethod> paymentMethodsForOpdBillCanceling;
List<PaymentMethod> paymentMethodsForChanneling;
List<PaymentMethod> paymentMethodsForChannelSettling;
List<PaymentMethod> paymentMethodsForPharmacyBilling;
Expand Down Expand Up @@ -126,6 +127,16 @@ public void fillPaymentMethodsForOpdBilling() {
}
}
}

public void fillPaymentMethodsForOpdBillCanceling() {
paymentMethodsForOpdBillCanceling = new ArrayList<>();
for (PaymentMethod pm : PaymentMethod.values()) {
boolean include = configOptionApplicationController.getBooleanValueByKey(pm.getLabel() + " is available for OPD Bill Canceling", true);
if (include) {
paymentMethodsForOpdBillCanceling.add(pm);
}
}
}

public void fillPaymentMethodsForPackageBilling() {
paymentMethodsForOpdBilling = new ArrayList<>();
Expand Down Expand Up @@ -853,7 +864,7 @@ public List<PaymentMethod> getPaymentMethodsForStaffCreditSettle() {
public void setPaymentMethodsForStaffCreditSettle(List<PaymentMethod> paymentMethodsForStaffCreditSettle) {
this.paymentMethodsForStaffCreditSettle = paymentMethodsForStaffCreditSettle;
}

public List<PaymentMethod> getPaymentMethodsForPatientDepositRefund() {
paymentMethodsForPatientDepositRefund = new ArrayList<>();
for (PaymentMethod pm : PaymentMethod.values()) {
Expand Down
45 changes: 10 additions & 35 deletions src/main/java/com/divudi/bean/common/SearchController.java
Original file line number Diff line number Diff line change
Expand Up @@ -2567,7 +2567,6 @@ public void createTableBht(BillType btp) {
m.put("fd", getFromDate());
m.put("td", getToDate());
m.put("ins", getSessionController().getInstitution());
m.put("dep", getSessionController().getDepartment());
String sql;

sql = "Select b from Bill b "
Expand All @@ -2576,9 +2575,18 @@ public void createTableBht(BillType btp) {
+ " and b.createdAt between :fd and :td "
+ " and b.billType=:bt"
+ " and b.institution=:ins "
+ " and b.department=:dep "
+ " and type(b)=:class ";

if (webUserController.hasPrivilege("StoreAdministration")) {
if (getSearchKeyword().getDepartment() != null && !getSearchKeyword().getDepartment().trim().equals("")) {
sql += " and ((b.department.name) like :dep )";
m.put("dep", "%" + getSearchKeyword().getDepartment().trim().toUpperCase() + "%");
}
} else {
sql += "and b.department=:dep ";
m.put("dep", getSessionController().getDepartment());

}
if (getSearchKeyword().getPatientName() != null && !getSearchKeyword().getPatientName().trim().equals("")) {
sql += " and ((b.patientEncounter.patient.person.name) like :patientName )";
m.put("patientName", "%" + getSearchKeyword().getPatientName().trim().toUpperCase() + "%");
Expand Down Expand Up @@ -7200,39 +7208,6 @@ public void createCollectingCentreBillSearch() {

}

public void createStaffCreditBillList() {
String jpql;
Map m = new HashMap();
List<BillTypeAtomic> btas = new ArrayList<>();
jpql = "select b from Bill b "
+ "where b.toStaff is not null "
+ "and b.createdAt between :fromDate and :toDate "
+ "and b.retired = false "
+ "and b.cancelled = false "
+ "and b.refunded = false ";
jpql += " and b.billTypeAtomic in :btas ";
if (staff != null) {
jpql += " and b.toStaff=:staff ";
m.put("staff", staff);
}

btas.addAll(BillTypeAtomic.findByServiceType(ServiceType.OPD));
btas.addAll(BillTypeAtomic.findByServiceType(ServiceType.CHANNELLING));
btas.removeAll(BillTypeAtomic.findByCategory(BillCategory.PAYMENTS));

jpql += " order by b.createdAt desc";

m.put("fromDate", fromDate);
m.put("toDate", toDate);
m.put("btas", btas);

System.out.println("m = " + m);
System.out.println("jpql = " + jpql);

bills = getBillFacade().findByJpql(jpql, m, TemporalType.TIMESTAMP);
System.out.println("bills = " + bills);
}

public void createGeneralCreditBillList() {
String jpql;
Map m = new HashMap();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,7 @@ public void setStk(List<Stock> stk) {
this.stk = stk;
}


// public void fillSelectStock(){
// List<Stock> items = new ArrayList<>();
//
Expand Down
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.20240807.14
3.0.0.20240807.25
102 changes: 80 additions & 22 deletions src/main/webapp/store/store_issue.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,8 @@
<ui:composition template="/resources/template/template.xhtml">

<ui:define name="content">



<h:form id="bill" >
<p:growl id="panelError" />
<p:commandButton id="nullButton2" value="No Action" action="#" style="display: none;" ></p:commandButton>
<p:defaultCommand target="btnAdd" />

<p:panel rendered="#{!storeIssueController.billPreview}" >
Expand Down Expand Up @@ -71,9 +67,10 @@
<h:outputLabel value="Comment"/>
<p:inputTextarea class="w-100" value="#{storeIssueController.preBill.comments}" id="comment"/>

</h:panelGrid>


<p:watermark value="Request Number" for="req"/>
<p:watermark value="Issuing Department" for="acDept"/>
<p:watermark value="Comment" for="comment"/>
</h:panelGrid>
<p:commandButton
accesskey="s"
value="Issue"
Expand Down Expand Up @@ -275,25 +272,95 @@
</p:panel>

</div>
</div>
</p:panel>

<div class="col-4">
<p:panel>
<f:facet name="header">
<h:outputText styleClass="fas fa-share-square" />
<h:outputText class="mx-4" value="Issue Details" />
</f:facet>
<h:panelGrid columns="2" class="w-100">
<h:outputLabel value="Issuing Department"/>
<p:autoComplete
class="w-100"
inputStyleClass="w-100"
completeMethod="#{departmentController.completeDept}"
forceSelection="true"
var="w"
itemLabel="#{w.name}"
itemValue="#{w}"
value="#{storeIssueController.toDepartment}"
id="acDept">
<p:column headerText="Department Name">
#{w.name}
</p:column>
<p:column headerText="Institution Name">
#{w.institution.name}
</p:column>
<p:ajax process="acDept" update=":#{p:resolveFirstComponentWithId('pBillDetails',view).clientId} #{p:resolveFirstComponentWithId('tblBillItem',view).clientId} "
event="itemSelect" listener="#{storeIssueController.calculateAllRates}" />
</p:autoComplete>

</h:form>
<h:outputLabel value="Request Number"/>
<p:inputText class="w-100" value="#{storeIssueController.preBill.invoiceNumber}" id="req"/>

<h:form>
<h:outputLabel value="Comment"/>
<p:inputTextarea class="w-100" value="#{storeIssueController.preBill.comments}" id="comment"/>

<p:watermark value="Request Number" for="req"/>
<p:watermark value="Issuing Department" for="acDept"/>
<p:watermark value="Comment" for="comment"/>
</h:panelGrid>

<p:panel rendered="#{storeIssueController.billPreview}" >

<p:commandButton
accesskey="s"
value="Issue"
ajax="false"
icon="fas fa-check"
action="#{storeIssueController.settleBill()}"
class="w-25 ui-button-warning"
actionListener="#{storeIssueController.calculateAllRates}">

</p:commandButton>
</p:panel>
<p:panel header="Bill Details" id="pBillDetails" class="my-1" >
<f:facet name="header">
<h:outputText styleClass="fas fa-file-invoice"/>
<h:outputText class="mx-4" value="Bill Details" />
</f:facet>
<h:panelGrid columns="2" columnClasses="numberCol, textCol" id="total" >
<h:outputLabel value="Total" ></h:outputLabel>
<h:outputLabel value="#{storeIssueController.preBill.total}" >
<f:convertNumber pattern="#,##0.00" />
</h:outputLabel>

<h:outputLabel value="Margin" ></h:outputLabel>
<h:outputLabel value="#{storeIssueController.preBill.margin}" >
<f:convertNumber pattern="#,##0.00" />
</h:outputLabel>

<h:outputLabel value="Net Total" ></h:outputLabel>
<h:outputLabel value="#{storeIssueController.preBill.netTotal}" >
<f:convertNumber pattern="#,##0.00" />
</h:outputLabel>
</h:panelGrid>
</p:panel>
</div>
</div>
</p:panel>
</h:form>

<h:form>
<p:panel rendered="#{storeIssueController.billPreview}" >
<p:commandButton id="nullButton3" value="No Action" action="#" style="display: none;" ></p:commandButton>
<p:defaultCommand target="btnPrint" />

<div class="nonPrintBlock" >
<p:commandButton accesskey="p" id="btnPrint" value="Print"
<p:commandButton
accesskey="p"
id="btnPrint"
value="Print"
icon="fas fa-print"
ajax="false"
class="ui-button-info" action="#" >
Expand All @@ -307,24 +374,15 @@
ajax="false" action="/store/store_issue"
actionListener="#{storeIssueController.resetAll()}" >
</p:commandButton>

</div>
<div >
<h:panelGroup id="gpBillPreview">
<st:issue bill="#{storeIssueController.printBill}"></st:issue>
</h:panelGroup>
</div>



</p:panel>



</h:form>

</ui:define>

</ui:composition>

</h:body>
Expand Down
2 changes: 0 additions & 2 deletions src/main/webapp/store/store_reprint_bill_unit_issue.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
<p:panel >
<f:facet name="header" >
<div class="d-flex justify-content-between">

<h:outputLabel value="Reprint Store Issue" ></h:outputLabel>

<div class="d-flex gap-2">
<p:commandButton
ajax="false"
Expand Down

0 comments on commit 1e3c3ea

Please sign in to comment.