Skip to content

Commit

Permalink
Merge pull request #5898 from hmislk/Issue#5893
Browse files Browse the repository at this point in the history
Issue#5893 Closes #5893
  • Loading branch information
Irani96 committed Jun 17, 2024
2 parents 58fa375 + e60f1a7 commit 98952c1
Show file tree
Hide file tree
Showing 17 changed files with 389 additions and 240 deletions.
2 changes: 1 addition & 1 deletion .github/counter.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2
2
Original file line number Diff line number Diff line change
Expand Up @@ -2365,6 +2365,15 @@ public void addChannelBooking(boolean reservedBooking) {
return;
}
}
if (configOptionApplicationController.getBooleanValueByKey("Channel Items Sessions Need to Have a Referance Doctor")) {
if (!(itemsAddedToBooking == null || itemsAddedToBooking.isEmpty())) {
if(referredBy == null){
JsfUtil.addErrorMessage("Referring Doctor is required");
settleSucessFully = false;
return;
}
}
}

if (selectedSessionInstance.getMaxNo() != 0) {
if (selectedSessionInstance.getBookedPatientCount() != null) {
Expand Down
14 changes: 12 additions & 2 deletions src/main/java/com/divudi/bean/opd/OpdBillController.java
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,17 @@ public void feeChangeListener(BillFee bf) {
calTotals();
}

public void changeBillDoctorByFee(BillFee bf) {
if (bf == null) {
return;
}
if (bf.getStaff() == null) {
return;
}
getCurrentlyWorkingStaff().add(staff);
selectedCurrentlyWorkingStaff = staff;
}

public String getStrTenderedValue() {
return strTenderedValue;
}
Expand Down Expand Up @@ -1838,7 +1849,6 @@ private void saveBatchBill() {
// b.setNetTotal(reminingCashPaid);
// }
// }

System.out.println("b.getNet = " + b.getNetTotal());
reminingCashPaid = reminingCashPaid - b.getNetTotal();
getBillFacade().edit(b);
Expand All @@ -1847,7 +1857,7 @@ private void saveBatchBill() {
}

newBatchBill.setNetTotal(dbl);
if (reminingCashPaid < 0 ){
if (reminingCashPaid < 0) {
newBatchBill.setBalance(Math.abs(reminingCashPaid));
}
newBatchBill.setCashBalance(reminingCashPaid);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,11 @@ public void settle() {

getReceivedBill().getBillItems().add(i);
}

if(getReceivedBill().getBillItems().isEmpty() || getReceivedBill().getBillItems() == null){
JsfUtil.addErrorMessage("Nothing to Recive, Please check Recieved Quantity");
return;
}

getReceivedBill().setDeptId(getBillNumberBean().institutionBillNumberGenerator(getSessionController().getDepartment(), BillType.StoreTransferReceive, BillClassType.BilledBill, BillNumberSuffix.STTR));
getReceivedBill().setInsId(getBillNumberBean().institutionBillNumberGenerator(getSessionController().getInstitution(), BillType.StoreTransferReceive, BillClassType.BilledBill, BillNumberSuffix.STTR));
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/com/divudi/data/ReportItemType.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public enum ReportItemType {
DataEntrySignature,
DataEntryUserName,
DataEntryUserDetails,
ApprovedAt,
ApprovedSignature,
ApprovedUserName,
ApprovedUserDetails,
Expand Down Expand Up @@ -58,6 +59,7 @@ public enum ReportItemType {
PatientSex,
Person,
Phn,
PrintedAt,
Phone,
QrCodeDetails,
QrCodeLink,
Expand All @@ -66,6 +68,7 @@ public enum ReportItemType {
Religion,
ReportedDate,
ReportedTime,
ReceivedAt,
SampledAt,
SampledDate,
SampledTime,
Expand Down Expand Up @@ -190,6 +193,13 @@ public String getLabel() {
return "Data Entered User's Name";
case DataEntryUserDetails:
return "Data Entered User's Details";
case ApprovedAt:
return "Approved Time";
case PrintedAt:
return "Printed Time";
case ReceivedAt:
return "Sample Received Time";

default:
return this.toString();
}
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.20240617.2
3.0.0.20240617.2
146 changes: 79 additions & 67 deletions src/main/webapp/admin/pricing/payment_scheme.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -13,90 +13,102 @@
<h:panelGroup >
<h:form >
<p:growl id="growl"/>
<p:focus id="selectFocus" context="gpSelect" />
<p:focus id="selectFocus" context="lstSelect" />
<p:focus id="detailFocus" context="gpDetail" />



<p:panel header="Manage Discount Scheme" style="height: 1000px" >
<h:panelGrid id ="gpVeda" columns="10" styleClass="alignTop">
<div class="row" style="height: 200px">
<div class="col-md-7">
<h:panelGrid id="gpSelect" columns="1" >
<p:panel style="width: 400px; height: 300px">
<h:panelGrid id="gpSelectText" >
<p:selectOneListbox id="lstSelect" class="w-100" scrollHeight="500" value="#{paymentSchemeController.current}" style="min-width: 350px">
<f:selectItems value="#{paymentSchemeController.items}" var="myItem" itemValue="#{myItem}" itemLabel="#{myItem.name}" ></f:selectItems>
<f:ajax render="gpDetail" execute="lstSelect" >
</f:ajax>
</p:selectOneListbox>
</h:panelGrid>

<h:panelGrid id="gpSelectButtons" columns="3" >

<p:commandButton
id="btnAdd"
value="Add"
action="#{paymentSchemeController.prepareAdd()}"
process="btnAdd"
update="gpDetail"/>

<p:commandButton ajax="false" id="btnDelete" onclick="if (!confirm('Are you sure you want to delete this record?'))
return false;" action="#{paymentSchemeController.delete()}" value="Delete" >
</p:commandButton>
<p:panel header="Manage Discount Scheme" >
<div class="d-flex gap-2 mb-2">
<p:commandButton
id="btnAdd"
value="Add"
icon="pi pi-plus"
class="ui-button-warning "
action="#{paymentSchemeController.prepareAdd()}"
process="btnAdd"
update="gpDetail"/>

<p:commandButton ajax="false" value="Fill"
action="#{paymentSchemeController.createPaymentSchemes()}"/>

</h:panelGrid>
</p:panel>
</h:panelGrid >
</div>
<div class="col-md-5">
<p:panel style="width: 600px;">
<h:panelGrid id="gpDetail" columns="1" style="width: 700px;">
<h:panelGrid id="gpDetailText" columns="2">
<h:outputText id="lblName" value="Name" ></h:outputText>
<h:inputText autocomplete="off" id="txtName" value="#{paymentSchemeController.current.name}" style="min-width: 300px"></h:inputText>
<h:outputText id="lblPrintingName" value="Printing Name" ></h:outputText>
<h:inputText autocomplete="off" id="txtPrintingName" value="#{paymentSchemeController.current.printingName}" style="min-width: 300px"></h:inputText>
<h:outputText id="lblOrder" value="Order No" />
<h:inputText autocomplete="off" id="txtOrder" value="#{paymentSchemeController.current.orderNo}" style="min-width: 300px" />
<h:outputLabel rendered="#{paymentSchemeController.current!=null}" value="Valid for Pharmacy" />
<p:selectBooleanCheckbox rendered="#{paymentSchemeController.current!=null}" value="#{paymentSchemeController.current.validForPharmacy}" style="min-width: 300px"></p:selectBooleanCheckbox>
<h:outputLabel rendered="#{paymentSchemeController.current!=null}" value="Valid for Billing" />
<p:selectBooleanCheckbox rendered="#{paymentSchemeController.current!=null}" value="#{paymentSchemeController.current.validForBilledBills}" style="min-width: 300px"></p:selectBooleanCheckbox>
<h:outputLabel rendered="#{paymentSchemeController.current!=null}" value="Valid for Cancellings and Refunds" />
<p:selectBooleanCheckbox rendered="#{paymentSchemeController.current!=null}" value="#{paymentSchemeController.current.validForCrBills}" style="min-width: 300px"></p:selectBooleanCheckbox>
<h:outputLabel rendered="#{paymentSchemeController.current!=null}" value="Valid for Channeling" />
<p:selectBooleanCheckbox rendered="#{paymentSchemeController.current!=null}" value="#{paymentSchemeController.current.validForChanneling}" style="min-width: 300px"></p:selectBooleanCheckbox>
<h:outputText value="Creator" ></h:outputText>
<h:outputText value="#{paymentSchemeController.current.creater.webUserPerson.name}" />
<h:outputText value="Created At" ></h:outputText>
<p:outputLabel value="#{paymentSchemeController.current.createdAt}" >
<f:convertDateTime pattern="#{sessionController.applicationPreference.longDateTimeFormat}" />
</p:outputLabel>
</h:panelGrid>
<h:panelGrid id="gpDetailButtons" columns="2">
<p:commandButton
ajax="false"
id="btnDelete"
icon="pi pi-trash"
class="ui-button-danger "
onclick="if (!confirm('Are you sure you want to delete this record?'))
return false;" action="#{paymentSchemeController.delete()}"
value="Delete" >
</p:commandButton>

<p:commandButton
ajax="false"
class="ui-button-info"
icon="pi pi-refresh"
value="Fill"
action="#{paymentSchemeController.createPaymentSchemes()}"/>
</div>
<div class="row" >
<div class="col-5">
<p:selectOneListbox
id="lstSelect"
filter="true"
class="w-100"
scrollHeight="500"
value="#{paymentSchemeController.current}">
<f:selectItems value="#{paymentSchemeController.items}" var="myItem" itemValue="#{myItem}" itemLabel="#{myItem.name}" ></f:selectItems>
<f:ajax render="gpDetail" execute="lstSelect" >
</f:ajax>
</p:selectOneListbox>
</div>
<div class="col-7">
<p:panel >
<f:facet name="header">
<h:outputText value="Details of the Discount Scheme" class="mt-2"></h:outputText>
<p:commandButton
id="btnSave"
value="Save"
icon="pi pi-save"
style="float: right;"
class="ui-button-success"
action="#{paymentSchemeController.saveSelected()}"
process="btnSave gpDetail"
update="lstSelect growl selectFocus"
>
</p:commandButton>
<p:defaultCommand target="btnSave"/>
</f:facet>
<h:panelGrid id="gpDetail" columns="1" >
<h:panelGrid id="gpDetailText" columns="2">
<h:outputText id="lblName" value="Name" ></h:outputText>
<p:inputText autocomplete="off" id="txtName" value="#{paymentSchemeController.current.name}" class="w-100" ></p:inputText>
<h:outputText id="lblPrintingName" value="Printing Name" ></h:outputText>
<p:inputText autocomplete="off" id="txtPrintingName" value="#{paymentSchemeController.current.printingName}" ></p:inputText>
<h:outputText id="lblOrder" value="Order No" />
<p:inputText autocomplete="off" id="txtOrder" value="#{paymentSchemeController.current.orderNo}" />
<h:outputLabel rendered="#{paymentSchemeController.current!=null}" value="Valid for Pharmacy" />
<p:selectBooleanCheckbox rendered="#{paymentSchemeController.current!=null}" value="#{paymentSchemeController.current.validForPharmacy}" ></p:selectBooleanCheckbox>
<h:outputLabel rendered="#{paymentSchemeController.current!=null}" value="Valid for Billing" />
<p:selectBooleanCheckbox rendered="#{paymentSchemeController.current!=null}" value="#{paymentSchemeController.current.validForBilledBills}" ></p:selectBooleanCheckbox>
<h:outputLabel rendered="#{paymentSchemeController.current!=null}" value="Valid for Cancellings and Refunds" />
<p:selectBooleanCheckbox rendered="#{paymentSchemeController.current!=null}" value="#{paymentSchemeController.current.validForCrBills}" ></p:selectBooleanCheckbox>
<h:outputLabel rendered="#{paymentSchemeController.current!=null}" value="Valid for Channeling" />
<p:selectBooleanCheckbox rendered="#{paymentSchemeController.current!=null}" value="#{paymentSchemeController.current.validForChanneling}"></p:selectBooleanCheckbox>
<h:outputText value="Creator" ></h:outputText>
<h:outputText value="#{paymentSchemeController.current.creater.webUserPerson.name}" />
<h:outputText value="Created At" ></h:outputText>
<p:outputLabel value="#{paymentSchemeController.current.createdAt}" >
<f:convertDateTime pattern="#{sessionController.applicationPreference.longDateTimeFormat}" />
</p:outputLabel>
</h:panelGrid>
<h:panelGrid id="gpDetailButtons" columns="2">


<p:defaultCommand target="btnSave"/>
</h:panelGrid>
</h:panelGrid>
</h:panelGrid>
</p:panel>
</div>
</p:panel>
</div>

</div>



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

Expand Down
8 changes: 8 additions & 0 deletions src/main/webapp/channel/channel_booking_by_date.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@

<div class="d-flex justify-content-end ">
<div class="d-flex align-items-center">
<p:commandButton
ajax="false"
title="OPD Billing"
icon="fa fa-fw fa-notes-medical"
styleClass="ui-button-warning mx-1"
action="#{opdBillController.navigateToNewOpdBill()}"
rendered="#{configOptionApplicationController.getBooleanValueByKey('Enable Navigation Button To OPD Billing From Channel Booking By Date')}"/>

<p:commandButton
ajax="false"
title="Completed"
Expand Down
Loading

0 comments on commit 98952c1

Please sign in to comment.