Skip to content

Commit

Permalink
All cashier summary for logged department #9990 (#9991)
Browse files Browse the repository at this point in the history
* Signed-off-by: Buddhika <buddhika.ari@gmail.com>

* Signed-off-by: Chinthaka Prasad <chinthakaprasad30@gmail.com>

* Signed-off-by: Chinthaka Prasad <chinthakaprasad30@gmail.com>

* Signed-off-by: Pubudu-Piyankara <pubudupiyankara.me@gmail.com>

* Create build.yml

* Create deploy.yml

* Update build.yml

* Update deploy.yml

* Delete .github/workflows/deploy.yml

* Update and rename build.yml to manual_deployment.yml

* Delete .github/workflows/manual_deployment.yml

* Create dev_dispatch.yml

* Delete .github/workflows/dev_dispatch.yml

* Create custom_deployment.yml

* Update custom_deployment.yml

* Signed-off-by: Chinthaka Prasad <chinthakaprasad30@gmail.com>

* Signed-off-by: Dr M H B Ariyaratne <buddhika.ari@gmail.com>

* Signed-off-by: Dr M H B Ariyaratne <buddhika.ari@gmail.com>

* Issue #9942
Signed-off-by: Lawan Samarasekara <lawan.chaamindu1234@gmail.com>

* Signed-off-by: Dr M H B Ariyaratne <buddhika.ari@gmail.com>

* Signed-off-by: Dr M H B Ariyaratne <buddhika.ari@gmail.com>

* Signed-off-by: Dr M H B Ariyaratne <buddhika.ari@gmail.com>

* Signed-off-by: Dr M H B Ariyaratne <buddhika.ari@gmail.com>

* Signed-off-by: Buddhika <buddhika.ari@gmail.com>

* Signed-off-by: Buddhika <buddhika.ari@gmail.com>

* added opd and cc bills

* added batch cancel and refund

* Signed-off-by: Pubudu-Piyankara <pubudupiyankara.me@gmail.com>

* Signed-off-by: Chinthaka Prasad <chinthakaprasad30@gmail.com>

* Signed-off-by: Chinthaka Prasad <chinthakaprasad30@gmail.com>

* Update PharmacyCalculation.java

testing commit

* changed column width

* Signed-off-by: Isuru Ranaweera <isuru.udara.ranaweera@gmail.com>

* fixed null pointer exception bug

* Signed-off-by: Isuru Ranaweera <isuru.udara.ranaweera@gmail.com>

* fixed filter bug

* Signed-off-by: Isuru Ranaweera <isuru.udara.ranaweera@gmail.com>

* Closes #9960 Pharmacy_Retail_Sale_NOT_available_even_after_starting_a_new_Shift

Signed-off-by: Buddhika Ariyaratne <buddhika.ari@gmail.com>

* Signed-off-by: Buddhika Ariyaratne <buddhika.ari@gmail.com>

* Signed-off-by: PasinduW99 <pwathsara@gmail.com>

* closes #9966
Signed-off-by: PasinduW99 <pwathsara@gmail.com>

* Add to Bill view for Sale1,2,3,4
Signed-off-by: PasinduW99 <pwathsara@gmail.com>

* Signed-off-by: PasinduW99 <pwathsara@gmail.com>

* Signed-off-by: PasinduW99 <pwathsara@gmail.com>

* Signed-off-by: PasinduW99 <pwathsara@gmail.com>

* Signed-off-by: Buddhika Ariyaratne <buddhika.ari@gmail.com>

* Signed-off-by: Isuru Ranaweera <isuru.udara.ranaweera@gmail.com>

* Inword_Pharmacy_Bill_Improving
Signed-off-by: PasinduW99 <pwathsara@gmail.com>

* Closes #9975
Signed-off-by: Buddhika Ariyaratne <buddhika.ari@gmail.com>

* Signed-off-by: Buddhika Ariyaratne <buddhika.ari@gmail.com>

* Signed-off-by: Buddhika Ariyaratne <buddhika.ari@gmail.com>

* Signed-off-by: Buddhika Ariyaratne <buddhika.ari@gmail.com>

* Closes #9981
Signed-off-by: Buddhika Ariyaratne <buddhika.ari@gmail.com>

* Signed-off-by: Buddhika Ariyaratne <buddhika.ari@gmail.com>

* Signed-off-by: Buddhika Ariyaratne <buddhika.ari@gmail.com>

* Closes #9984

Signed-off-by: Buddhika Ariyaratne <buddhika.ari@gmail.com>

* Closes #9987
Signed-off-by: Buddhika Ariyaratne <buddhika.ari@gmail.com>

* Closes #3851
Signed-off-by: Buddhika Ariyaratne <buddhika.ari@gmail.com>

* Closes #9990
Signed-off-by: Buddhika Ariyaratne <buddhika.ari@gmail.com>

* Signed-off-by: Sandith Pivithuru <sandithpivithuru@gmail.com>

fixed

* Signed-off-by: Sandith Pivithuru <sandithpivithuru@gmail.com>

* Signed-off-by: Sandith Pivithuru <sandithpivithuru@gmail.com>

---------

Signed-off-by: Buddhika <buddhika.ari@gmail.com>
Signed-off-by: IsuruUdaraRanaweera <isuru.udara.ranaweera@gmail.com>
Signed-off-by: Dr M H B Ariyaratne <buddhika.ari@gmail.com>
Signed-off-by: Lawan Samarasekara <lawan.chaamindu1234@gmail.com>
Signed-off-by: Isuru Ranaweera <isuru.udara.ranaweera@gmail.com>
Signed-off-by: Buddhika Ariyaratne <buddhika.ari@gmail.com>
Signed-off-by: PasinduW99 <pwathsara@gmail.com>
Co-authored-by: IsuruUdaraRanaweera <isuru.udara.ranaweera@gmail.com>
Co-authored-by: Chinthaka Prasad <chinthakaprasad30@gmail.com>
Co-authored-by: Pubudu-Piyankara <pubudupiyankara.me@gmail.com>
Co-authored-by: Geeth Sandaru Madhushan <geeth.gsm@gmail.com>
Co-authored-by: Lawan Samarasekara <lawan.chaamindu1234@gmail.com>
Co-authored-by: imexh <chandikaranawella@gmail.com>
Co-authored-by: Chinthaka Prasad Wijerathna <118891516+ChinthakaPrasad@users.noreply.github.com>
Co-authored-by: PasinduW99 <pwathsara@gmail.com>
Co-authored-by: Pasindu Wathsara <113449846+PasinduW99@users.noreply.github.com>
Co-authored-by: Sandith Pivithuru <sandithpivithuru@gmail.com>
  • Loading branch information
11 people authored Jan 6, 2025
1 parent ff45c7d commit d11e73b
Show file tree
Hide file tree
Showing 8 changed files with 475 additions and 24 deletions.
11 changes: 9 additions & 2 deletions src/main/java/com/divudi/bean/common/SearchController.java
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,14 @@ public class SearchController implements Serializable {

// </editor-fold>
// <editor-fold defaultstate="collapsed" desc="Navigators">
public String navigateToMyDepartmentAllCashierSummary() {
department = sessionController.getDepartment();
institution = sessionController.getInstitution();
site = sessionController.getDepartment().getSite();
webUser=null;
return "/cashier/my_department_all_cashier_summary?faces-redirect=true";
}

public String navigateToUserDrawerDashboard() {
Drawer d = drawerController.getUsersDrawer(drawer.getDrawerUser());
drawerController.setCurrent(d);
Expand Down Expand Up @@ -17385,7 +17393,7 @@ public PharmacyAdjustmentRow(Item itm, double purchaseRate, double saleRate, dou
}

// </editor-fold>
// <editor-fold defaultstate="collapsed" desc="Getters and Setters">
// <editor-fold defaultstate="collapsed" desc="Getters and Setters">
public Item getItm() {
return itm;
}
Expand Down Expand Up @@ -18146,5 +18154,4 @@ public void prepareDataBillsAndBillItemsDownload() {
}

// </editor-fold>

}
Original file line number Diff line number Diff line change
Expand Up @@ -502,15 +502,21 @@ private TreeNode<PrivilegeHolder> createPrivilegeHolderTreeNodes() {
new DefaultTreeNode(new PrivilegeHolder(Privileges.CourierViewStatistics, "Courier View Statistics"), courierNode);
new DefaultTreeNode(new PrivilegeHolder(Privileges.CourierViewBillReports, "Courier View Bill Reports"), courierNode);
new DefaultTreeNode(new PrivilegeHolder(Privileges.CourierViewPaymentReports, "Courier View Payment Reports"), courierNode);

// User Menu
TreeNode userNode = new DefaultTreeNode(new PrivilegeHolder(null, "User"), allNode);
new DefaultTreeNode(new PrivilegeHolder(Privileges.UserMenu, "User Menu"), userNode);
new DefaultTreeNode(new PrivilegeHolder(Privileges.ChangeMyPassword, "Change User Password"), userNode);
new DefaultTreeNode(new PrivilegeHolder(Privileges.ChangeMyTheme, "Change User Theme"), userNode);
new DefaultTreeNode(new PrivilegeHolder(Privileges.ChangePreferece, "Change User Preferances"), userNode);
new DefaultTreeNode(new PrivilegeHolder(Privileges.ChangeMyApiKeys, "Change API Keys"), userNode);
new DefaultTreeNode(new PrivilegeHolder(Privileges.MyFinanacialTransactionManager, "User Financial Transaction Manager"), userNode);

// Search Privileges
TreeNode searchRootNode = new DefaultTreeNode(new PrivilegeHolder(null, "Search"), allNode);
new DefaultTreeNode(new PrivilegeHolder(Privileges.Search, "Search Menu"), searchRootNode);
new DefaultTreeNode(new PrivilegeHolder(Privileges.SearchGrand, "Grand Search"), searchRootNode);

// User Privileges
TreeNode userNode = new DefaultTreeNode(new PrivilegeHolder(null, "User"), allNode);
new DefaultTreeNode(new PrivilegeHolder(Privileges.ChangePreferece, "Change Theme"), userNode);

// Cash Transaction Privileges
TreeNode cashTransactionNode = new DefaultTreeNode(new PrivilegeHolder(null, "Cash Transaction"), allNode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2191,12 +2191,18 @@ public void processExpiryItemReport() {
if (amp != null) {
item = amp;
System.out.println("item = " + item);
jpql += "and s.item=:itm ";
jpql += "and s.itemBatch.item=:itm ";
m.put("itm", item);
}

jpql += " order by s.id ";
stocks = stockFacade.findByJpql(jpql, m, TemporalType.TIMESTAMP);
stockPurchaseValue = 0.0;
stockSaleValue = 0.0;
for (Stock ts : stocks) {
stockPurchaseValue = stockPurchaseValue + (ts.getItemBatch().getPurcahseRate() * ts.getStock());
stockSaleValue = stockSaleValue + (ts.getItemBatch().getRetailsaleRate() * ts.getStock());
}
}

public long calculateDaysRemaining(Date dateOfExpire) {
Expand Down
12 changes: 11 additions & 1 deletion src/main/java/com/divudi/data/Privileges.java
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,16 @@ public enum Privileges {
ChangeCreditLimitInCC("Change Credit Limit in Collecting Centre"),
ChangeCollectingCentre("Change Collecting Centre"),
//</editor-fold>

//<editor-fold defaultstate="collapsed" desc="User">
UserMenu("User Menu"),
ChangeMyPassword("Change My Password"),
ChangeMyTheme("Change My Theme"),
ChangePreferece("Change My Preference"),
ChangeMyApiKeys("Change My Api Keys"),
MyFinanacialTransactionManager("My Finanacial Transaction Manager"),
//</editor-fold>


//<editor-fold defaultstate="collapsed" desc="Admin">
SearchGrand("Search Grand"),
Expand All @@ -575,7 +585,7 @@ public enum Privileges {
Developers("Developers"),
// Administration
SearchAll("Search All"),
ChangePreferece("Change Preference"),

SendBulkSMS("Send Bulk SMS"),
SuperAdmin("Supper Admin"),
EditData("Edit Data"),
Expand Down
8 changes: 8 additions & 0 deletions src/main/webapp/cashier/index.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,14 @@
ajax="false"
action="#{financialTransactionController.navigateToMyCashierSummary()}" >
</p:commandButton>

<p:commandButton
class="my-1 w-100"
value="My Department All Cashier SUmmary"
icon=""
ajax="false"
action="#{searchController.navigateToMyDepartmentAllCashierSummary}" >
</p:commandButton>

<p:commandButton
class="my-1 w-100"
Expand Down
Loading

0 comments on commit d11e73b

Please sign in to comment.