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

10280 stock ledger report bug fix #10290

Merged
merged 181 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
181 commits
Select commit Hold shift + click to select a range
b19d275
Signed-off-by: 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 <ghp_d27pE4pV…
Oct 25, 2024
452c550
Merge branch 'issue#8242' of https://github.com/hmislk/hmis.git into …
Oct 25, 2024
7ebd833
Signed-off-by: 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 <ghp_d27pE4pV…
Oct 27, 2024
561bab4
Merge branch 'Issue#8300' of https://github.com/hmislk/hmis.git into …
Oct 27, 2024
a609585
Signed-off-by: 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 <ghp_d27pE4pV…
Oct 27, 2024
3e1b63f
Merge branch 'Issue#8310' of https://github.com/hmislk/hmis.git into …
Oct 27, 2024
052878e
Signed-off-by: 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 <ghp_d27pE4pV…
Oct 31, 2024
3f88429
Merge branch 'development' of https://github.com/hmislk/hmis.git into…
Oct 31, 2024
a835039
Merge branch 'Issue#8371' of https://github.com/hmislk/hmis.git into …
Oct 31, 2024
d998801
Merge branch 'Issue#8438' of https://github.com/hmislk/hmis.git into …
Oct 31, 2024
4b0de9a
Merge branch 'Issue#8151' of https://github.com/hmislk/hmis.git into …
Oct 31, 2024
1d61c8c
Merge branch 'issue#8389' of https://github.com/hmislk/hmis.git into …
Oct 31, 2024
d8a375f
Merge branch 'Issue#8372' of https://github.com/hmislk/hmis.git into …
Oct 31, 2024
b98a030
Merge branch 'Issue#8439' of https://github.com/hmislk/hmis.git into …
Oct 31, 2024
ff5fbf5
Merge branch 'development' of https://github.com/hmislk/hmis.git into…
Nov 4, 2024
aad9449
Merge branch 'issue#8530' of https://github.com/hmislk/hmis.git into …
Nov 4, 2024
35377b7
Merge branch 'Issue#8532' of https://github.com/hmislk/hmis.git into …
Nov 4, 2024
4a4a7e0
Merge branch 'Issue#8533' of https://github.com/hmislk/hmis.git into …
Nov 4, 2024
d71095d
Merge branch 'issue#8456' of https://github.com/hmislk/hmis.git into …
Nov 4, 2024
22bc31e
Merge branch 'development' of https://github.com/hmislk/hmis.git into…
Nov 13, 2024
84e630c
Merge branch 'Isue#8674' of https://github.com/hmislk/hmis.git into i…
Nov 13, 2024
9c9f388
Merge branch 'Issue#8507' of https://github.com/hmislk/hmis.git into …
Nov 13, 2024
def3626
Signed-off-by: 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 <ghp_d27pE4pV…
Nov 18, 2024
0c682fc
Merge branch 'development' of https://github.com/hmislk/hmis.git into…
Nov 18, 2024
6699eb0
Merge branch 'issue#8839' of https://github.com/hmislk/hmis.git into …
Nov 18, 2024
805afa4
Merge branch 'development' of https://github.com/hmislk/hmis.git into…
Nov 25, 2024
b20d035
Merge branch 'Issue#9016' of https://github.com/hmislk/hmis.git into …
Nov 25, 2024
d81359b
Merge branch 'development' of https://github.com/hmislk/hmis.git into…
Dec 5, 2024
78d30f6
Merge branch 'Issue#9335' of https://github.com/hmislk/hmis.git into …
Dec 5, 2024
8055cdb
Merge branch 'Issue#9362' of https://github.com/hmislk/hmis.git into …
Dec 5, 2024
d449924
Merge branch 'issue#9287' of https://github.com/hmislk/hmis.git into …
Dec 5, 2024
adf2d93
Signed-off-by: Dr M H B Ariyaratne <[email protected]>
buddhika75 Jan 6, 2025
0a65a43
9964 staff welfare bug fixes
imexh Jan 7, 2025
7c7b59b
Merge branch 'support_mobitel_sms_middleware_to_send_sms_#9970' into …
buddhika75 Jan 8, 2025
4830098
Signed-off-by: Isuru Ranaweera <[email protected]>
IsuruUdaraRanaweera Jan 9, 2025
574aa75
Merge branch 'development' of https://github.com/hmislk/hmis.git into…
IsuruUdaraRanaweera Jan 9, 2025
8c1aa9d
Signed-off-by: Isuru Ranaweera <[email protected]>
IsuruUdaraRanaweera Jan 9, 2025
4544d67
Signed-off-by: Pubudu-Piyankara <[email protected]>
Pubudu-Piyankara Jan 9, 2025
399e305
Closed #10050
Pubudu-Piyankara Jan 9, 2025
aeed73e
Signed-off-by: Pubudu-Piyankara <[email protected]>
Pubudu-Piyankara Jan 9, 2025
5b554ee
Merge branch '10003-collection-cente-bill-wise-detail-report-bugs' of…
Pubudu-Piyankara Jan 9, 2025
5baa186
Signed-off-by: Pubudu-Piyankara <[email protected]>
Pubudu-Piyankara Jan 9, 2025
0b270d5
Merge branch 'development' of https://github.com/hmislk/hmis.git into…
Pubudu-Piyankara Jan 9, 2025
2ae518e
Signed-off-by: Pubudu-Piyankara <[email protected]>
Pubudu-Piyankara Jan 9, 2025
34025da
Merge branch 'development' of https://github.com/hmislk/hmis.git into…
Pubudu-Piyankara Jan 9, 2025
6bfebab
Closed #10036
Pubudu-Piyankara Jan 9, 2025
9fc821f
Signed-off-by: DamithDeshan <[email protected]>
DamithDeshan Jan 10, 2025
2d370b0
Merge branch 'Issue#10013-Bug_Fix_on_OPD_Card_Can't_Add_Drug' of http…
DamithDeshan Jan 10, 2025
06cc404
closes #10062
DamithDeshan Jan 10, 2025
3a82226
Signed-off-by: DamithDeshan <[email protected]>
DamithDeshan Jan 10, 2025
823f5e8
Signed-off-by: Dr M H B Ariyaratne <[email protected]>
buddhika75 Jan 10, 2025
27d56d0
Merge branch 'coop-prod' of https://github.com/hmislk/hmis.git into 1…
buddhika75 Jan 10, 2025
3df6d2f
Merge branch '10027-export-amp-list' into 10064-refunds-and-cancellat…
buddhika75 Jan 10, 2025
6577c37
Merge branch 'coop-dev' of https://github.com/hmislk/hmis.git into 10…
buddhika75 Jan 10, 2025
463736a
Merge branch '#10036_Grn_report' of https://github.com/hmislk/hmis.gi…
buddhika75 Jan 10, 2025
5212ed2
Merge branch '10062_cannot_admit_opd_cards_without_room_no' of https:…
buddhika75 Jan 10, 2025
faa0e67
Merge branch 'ruhunu-dev' of https://github.com/hmislk/hmis.git into …
buddhika75 Jan 10, 2025
a06e9a5
Merge branch 'refs/heads/development' into 9964-Staff-Welfare-report-…
imexh Jan 10, 2025
7c7b693
9964 staff welfare bug fixes
imexh Jan 10, 2025
86795a4
10034 discount report bug fixes
imexh Jan 10, 2025
27c96b8
changed css file printOnly
IsuruUdaraRanaweera Jan 10, 2025
898ae18
Added a new table to print it without filter boxes
IsuruUdaraRanaweera Jan 10, 2025
514d651
10034 staff welfare report bug fixes
imexh Jan 10, 2025
88dd174
10034 discount report bug fixes
imexh Jan 10, 2025
bc1ea46
Signed-off-by: Sandith Pivithuru <[email protected]>
SandithP2001 Jan 10, 2025
40b8c7f
Merge branch 'development' of https://github.com/hmislk/hmis.git into…
SandithP2001 Jan 10, 2025
14863ad
Signed-off-by: Sandith Pivithuru <[email protected]>
SandithP2001 Jan 10, 2025
cae02d3
Signed-off-by: Sandith Pivithuru <[email protected]>
SandithP2001 Jan 10, 2025
622c514
Signed-off-by: Sandith Pivithuru <[email protected]>
SandithP2001 Jan 10, 2025
29d6e68
Pharmacy purchase order list ui improvement.
ChinthakaPrasad Jan 10, 2025
41b7d7d
Merge branch 'development' of https://github.com/hmislk/hmis.git into…
ChinthakaPrasad Jan 10, 2025
8685fb3
Signed-off-by: DamithDeshan <[email protected]>
DamithDeshan Jan 10, 2025
770be79
Signed-off-by: Dr M H B Ariyaratne <[email protected]>
buddhika75 Jan 10, 2025
93b32f1
Closes #10064
buddhika75 Jan 10, 2025
b939920
Signed-off-by: Dr M H B Ariyaratne <[email protected]>
buddhika75 Jan 10, 2025
8394c82
Merge branch '10064-refunds-and-cancellations-are-not-listed-in-inpat…
buddhika75 Jan 10, 2025
dd6c54b
Signed-off-by: Dr M H B Ariyaratne <[email protected]>
buddhika75 Jan 11, 2025
2ccd3a6
Merge pull request #10063
DamithDeshan Jan 11, 2025
d08d99b
closes #10079
DamithDeshan Jan 11, 2025
f7bf529
closes #10081
DamithDeshan Jan 11, 2025
300fd32
Signed-off-by: DamithDeshan <[email protected]>
DamithDeshan Jan 11, 2025
8f168ff
Merge branch '10044-need-sqeuencial-bill-numbers-for-pharmacy-direct-…
buddhika75 Jan 12, 2025
23e8407
Merge branch '10073-refunds-are-not-listed-in-inpatient-medicine-issu…
buddhika75 Jan 12, 2025
c583f52
Merge branch 'coop-dev' of https://github.com/hmislk/hmis.git into 10…
buddhika75 Jan 12, 2025
2d792ee
https://youtu.be/GDWy_tlJ2Gk
buddhika75 Jan 12, 2025
d961be7
Update rh_prod_ci_cd.yml
GSMgeeth Jan 12, 2025
9604797
Merge pull request #10090 from hmislk/10044-need-sqeuencial-bill-numb…
buddhika75 Jan 12, 2025
38553a7
Merge pull request #10091 from hmislk/10044-need-sqeuencial-bill-numb…
buddhika75 Jan 12, 2025
257d999
Merge pull request #10095 from hmislk/development
GSMgeeth Jan 12, 2025
f9d9cc3
Merge branch '10086-retail-bill-search-total-incorrect' into 10077-im…
buddhika75 Jan 12, 2025
dba6ee6
Merge branch 'coop-prod' of https://github.com/hmislk/hmis.git into 1…
buddhika75 Jan 12, 2025
1a1db2d
Signed-off-by: Dr M H B Ariyaratne <[email protected]>
buddhika75 Jan 13, 2025
3d18394
Closes #10097
buddhika75 Jan 13, 2025
b14572d
Merge branch '10088-all-cashier-summary-had-calculated-fund-bills' in…
buddhika75 Jan 13, 2025
027f76c
Merge branch '#10071_microbiology_report_in_lab_module' of https://gi…
buddhika75 Jan 13, 2025
f9b3c31
Merge branch '#10079_improving_microbiology_report_antibiotic_list_an…
buddhika75 Jan 13, 2025
6594242
Merge branch 'ruhunu-dev' of https://github.com/hmislk/hmis.git into …
buddhika75 Jan 14, 2025
e1ec6ac
Merge branch 'ruhunu-prod' of https://github.com/hmislk/hmis.git into…
buddhika75 Jan 14, 2025
011a0d0
Merge branch 'development' of https://github.com/hmislk/hmis.git into…
Jan 14, 2025
c1f00df
Signed-off-by: Buddhika Ariyaratne <[email protected]>
buddhika75 Jan 14, 2025
a4251b3
Signed-off-by: Buddhika Ariyaratne <[email protected]>
buddhika75 Jan 14, 2025
6b33c09
Signed-off-by: Buddhika Ariyaratne <[email protected]>
buddhika75 Jan 14, 2025
358054b
Closes #10077
buddhika75 Jan 14, 2025
2fc2774
Merge branch 'development' of https://github.com/hmislk/hmis.git into…
buddhika75 Jan 14, 2025
9f75c26
Closes with Production persistance.xml
buddhika75 Jan 14, 2025
36d1c24
Merge branch 'development' of https://github.com/hmislk/hmis.git into…
ChinthakaPrasad Jan 15, 2025
dd85ec5
fix: Expenses added to the GRN payment
ChinthakaPrasad Jan 15, 2025
3eacb59
Merge branch 'development' of https://github.com/hmislk/hmis.git into…
ChinthakaPrasad Jan 15, 2025
7a80c6e
Merge branch 'development' of https://github.com/hmislk/hmis.git into…
buddhika75 Jan 15, 2025
a80ec3e
Merge branch '#10081_add_to_option_for_disable_developers_privilege' …
buddhika75 Jan 15, 2025
5a74a96
Merge branch '10034-Discount-Report-bugfixes' of https://github.com/h…
buddhika75 Jan 15, 2025
5868019
Merge branch '10035-slowfastnone-movement-report' of https://github.c…
buddhika75 Jan 15, 2025
1248b80
Merge branch '10052-collection-center-book-wise-detail-report-bugs' o…
buddhika75 Jan 15, 2025
fc2d0e3
Merge branch '10097-remove-type-column-and-replace-truefalse-with-yes…
buddhika75 Jan 15, 2025
2d394d6
Merge branch '6264-add-expences-for-pharmacy-direct-purchase' of http…
buddhika75 Jan 15, 2025
dce7227
Merge branch '9964-Staff-Welfare-report-bugfixes' of https://github.c…
buddhika75 Jan 15, 2025
c534ff0
Closes #10102
buddhika75 Jan 15, 2025
436e9c6
Signed-off-by: Dr M H Buddhika Ariyaratne <[email protected]>
buddhika75 Jan 15, 2025
c75c836
Closes #10111
buddhika75 Jan 16, 2025
64d62b4
Signed-off-by: Dr M H B Ariyaratne <[email protected]>
buddhika75 Jan 16, 2025
90456fc
Merge branch '10077-improvements-for-bht-direct-issue-from-pharmacy' …
buddhika75 Jan 16, 2025
38e2b09
Merge branch '10102-shift-start-contains-handed-over-values-in-the-pr…
buddhika75 Jan 16, 2025
fd5e387
Merge branch '10111-retail-sale-medicine-search-optimization' of http…
buddhika75 Jan 16, 2025
68f5972
Closes #10114
buddhika75 Jan 16, 2025
81aa689
Signed-off-by: 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 <ghp_d27pE4pV…
Jan 16, 2025
f355710
Merge branch 'development' of https://github.com/hmislk/hmis.git into…
Jan 16, 2025
8ec0b5f
Merge branch '10111-retail-sale-medicine-search-optimization' of http…
Jan 16, 2025
f2fe4c9
Closes #10114
buddhika75 Jan 16, 2025
effcdae
Closes #4834
buddhika75 Jan 20, 2025
e4d5c28
Closes #10155
buddhika75 Jan 21, 2025
39eb9c7
Signed-off-by: Dr M H Buddhika Ariyaratne <[email protected]>
buddhika75 Jan 21, 2025
09755ee
Closes #9988
buddhika75 Jan 21, 2025
0e114fc
Signed-off-by: Dr M H Buddhika Ariyaratne <[email protected]>
buddhika75 Jan 22, 2025
f4dc7a1
Merge branch 'development' of https://github.com/hmislk/hmis.git into…
buddhika75 Jan 22, 2025
dc14809
Signed-off-by: Dr M H Buddhika Ariyaratne <[email protected]>
buddhika75 Jan 22, 2025
3f4c858
Merge pull request #10196 from hmislk/development
GSMgeeth Jan 23, 2025
a1400a1
# Fixed Purchase Rate Adjustment BillItem Double Issue
DamithDeshan Jan 24, 2025
a294a1e
#Fixed Store Sale Rate Adjustment BillItem Bug
DamithDeshan Jan 24, 2025
bdbaec4
#Fixed Staff Stock Adjustment Bug
DamithDeshan Jan 24, 2025
88a6ef6
closes #10221
DamithDeshan Jan 24, 2025
970a97b
Signed-off-by: DamithDeshan <[email protected]>
DamithDeshan Jan 24, 2025
2898ba1
Signed-off-by: Dr M H Buddhika Ariyaratne <[email protected]>
buddhika75 Jan 25, 2025
a5157fb
Signed-off-by: Dr M H Buddhika Ariyaratne <[email protected]>
buddhika75 Jan 25, 2025
9e3d463
Merge branch '#10223_improving_store_adjustment_bill_search' of https…
buddhika75 Jan 25, 2025
ed8e6f1
Signed-off-by: Dr M H Buddhika Ariyaratne <[email protected]>
buddhika75 Jan 25, 2025
bd69926
Closes #10227
buddhika75 Jan 25, 2025
c34099b
Signed-off-by: Dr M H Buddhika Ariyaratne <[email protected]>
buddhika75 Jan 25, 2025
a489d3c
Signed-off-by: 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 <ghp_d27pE4pV…
Jan 26, 2025
1a7c30a
Merge branch 'issue#7224' into 10239-improve-search-in-pharmacy-retai…
Jan 26, 2025
527ea61
Signed-off-by: Dr M H Buddhika Ariyaratne <[email protected]>
buddhika75 Jan 26, 2025
2bf6e4e
Closes #10243
buddhika75 Jan 26, 2025
14fc862
Merge branch 'development' of https://github.com/hmislk/hmis.git into…
buddhika75 Jan 26, 2025
4dadd2a
Signed-off-by: Dr M H Buddhika Ariyaratne <[email protected]>
buddhika75 Jan 26, 2025
c7ec08d
Merge branch '10111-retail-sale-medicine-search-optimization' of http…
buddhika75 Jan 26, 2025
e09ad6a
Signed-off-by: Dr M H Buddhika Ariyaratne <[email protected]>
buddhika75 Jan 26, 2025
f1039b4
Merge branch '10239-improve-search-in-pharmacy-retail-sale' of https:…
buddhika75 Jan 26, 2025
a8eff66
Signed-off-by: Dr M H Buddhika Ariyaratne <[email protected]>
buddhika75 Jan 26, 2025
2025e59
Closes #10239
buddhika75 Jan 26, 2025
b1f767e
Merge branch '10073-refunds-are-not-listed-in-inpatient-medicine-issu…
buddhika75 Jan 26, 2025
8a36d09
Merge branch '10114-different-bill-number-generation-strategies-for-o…
buddhika75 Jan 26, 2025
2b49f50
Merge branch '10155-pharmacy-refunds-not-shown-in-cashier-detail' int…
buddhika75 Jan 26, 2025
d753f7f
Merge branch '10223-improving-store-adjustment-bill-search' into 1023…
buddhika75 Jan 26, 2025
4e62066
Merge branch '10227-improvements-in-pharmacy-retail-sale-cancellation…
buddhika75 Jan 26, 2025
f2da05c
Merge branch '10239-improve-search-in-pharmacy-retail-sale' into 1023…
buddhika75 Jan 26, 2025
8adb228
Merge branch '4834-add-an-option-to-remove-a-registered-patient' into…
buddhika75 Jan 26, 2025
cb83043
Merge branch '9752-there-must-be-facility-to-enable-label-printing' i…
buddhika75 Jan 26, 2025
96140bd
Merge branch '9988-should-not-be-able-to-save-patient-without-a-phone…
buddhika75 Jan 26, 2025
bd7095d
Closes #10233
buddhika75 Jan 26, 2025
db97fc5
Closes #10230
buddhika75 Jan 27, 2025
f03ea85
Merge pull request #10265 from hmislk/10263-improve-the-prints-of-iss…
buddhika75 Jan 28, 2025
b08d0af
coop dev test
imexh Jan 29, 2025
99caccb
coop dev ci/cd test
imexh Jan 29, 2025
390d82f
New Attributes to stock history added
buddhika75 Jan 29, 2025
cfd580b
Retail Sale Cancellation payment error corrected
buddhika75 Jan 29, 2025
47e75d3
Merge pull request #10286 from hmislk/10285-stock-history-update
buddhika75 Jan 29, 2025
e3e67ad
Signed-off-by: Dr M H Buddhika Ariyaratne <[email protected]>
buddhika75 Jan 29, 2025
c96f5b3
Merge branch '10230-navigation-button-back-to-po-list-required-in-grn…
buddhika75 Jan 29, 2025
c6ab53f
Merge branch 'development' of https://github.com/hmislk/hmis.git into…
buddhika75 Jan 29, 2025
61822e2
Merge branch 'coop-dev' of https://github.com/hmislk/hmis.git into 10…
buddhika75 Jan 29, 2025
cfa3e2c
Signed-off-by: Dr M H Buddhika Ariyaratne <[email protected]>
buddhika75 Jan 29, 2025
f4688a6
stock ledger bugfix
imexh Jan 29, 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 .github/workflows/coop_dev_ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
mv $WAR_NAME $WAR_NAME.old
fi
"

# Copy new WAR file to the server
rsync -aL --progress -e "ssh -i private_key.pem" ./*.war $SERVER_USER@$SERVER_IP:/tmp/$WAR_NAME

Expand Down Expand Up @@ -126,7 +126,7 @@ jobs:
fi
rm /tmp/payara-admin-pass.txt
"

# Check if the application is reachable
for i in {1..5}; do
RESPONSE_CODE=$(curl -s -o /dev/null -w "%{http_code}" https://$SUBDOMAIN.carecode.org/$APP_NAME/faces/index1.xhtml)
Expand Down
28 changes: 23 additions & 5 deletions src/main/java/com/divudi/bean/pharmacy/PharmacyBillSearch.java
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,25 @@ public String navigateToCancelPharmacyDirectIssueToInpatients() {
return "/inward/pharmacy_cancel_bill_retail_bht?faces-redirect=true";
}

public String navigateToCancelPharmacyRetailSale() {
if (bill == null) {
JsfUtil.addErrorMessage("No Bill Selected");
return null;
}
paymentMethod = bill.getPaymentMethod();
return "/pharmacy/pharmacy_cancel_bill_retail?faces-redirect=true";
}

public String navigatePharmacyReprintPo() {
return "pharmacy_reprint_po?faces-redirect=true";
}

public String navigatePharmacyReprintRetailBill() {
if(bill==null){
JsfUtil.addErrorMessage("No Bill Selected");
}
return "/pharmacy/pharmacy_reprint_bill_sale?faces-redirect=true";
}

public String navigateToReprintPharmacyTransferIssue() {
if (bill == null) {
Expand Down Expand Up @@ -1202,7 +1218,7 @@ private CancelledBill pharmacyCreateCancelBill() {
cb.invertAndAssignValuesFromOtherBill(getBill());

cb.setPaymentScheme(getBill().getPaymentScheme());
cb.setPaymentMethod(getBill().getPaymentMethod());
cb.setPaymentMethod(paymentMethod);
cb.setBalance(0.0);
cb.setCreatedAt(new Date());
cb.setCreater(getSessionController().getLoggedUser());
Expand Down Expand Up @@ -1964,7 +1980,6 @@ private boolean checkDepartment(Bill bill) {
ConfigOptionApplicationController configOptionApplicationController;

public void pharmacyRetailCancelBillWithStock() throws ParseException {

if (getBill() != null && getBill().getId() != null && getBill().getId() != 0) {
if (pharmacyErrorCheck()) {
return;
Expand Down Expand Up @@ -2004,8 +2019,11 @@ public void pharmacyRetailCancelBillWithStock() throws ParseException {

CancelledBill cb = pharmacyCreateCancelBill();

cb.setDeptId(getBillNumberBean().institutionBillNumberGenerator(getSessionController().getDepartment(), cb.getBillType(), BillClassType.CancelledBill, BillNumberSuffix.SALCAN));
cb.setInsId(getBillNumberBean().institutionBillNumberGenerator(getSessionController().getInstitution(), cb.getBillType(), BillClassType.CancelledBill, BillNumberSuffix.SALCAN));

String deptId = getBillNumberBean().departmentBillNumberGeneratorYearly(getSessionController().getDepartment(), BillTypeAtomic.PHARMACY_RETAIL_SALE_CANCELLED);

cb.setDeptId(deptId);
cb.setInsId(deptId);

if (cb.getId() == null) {
getBillFacade().create(cb);
Expand All @@ -2024,7 +2042,7 @@ public void pharmacyRetailCancelBillWithStock() throws ParseException {
// getBill().getReferenceBill().setReferenceBill(null);
// getBillFacade().edit(getBill().getReferenceBill());
// }
getCashTransactionBean().saveBillCashOutTransaction(cb, getSessionController().getLoggedUser());
// getCashTransactionBean().saveBillCashOutTransaction(cb, getSessionController().getLoggedUser());

JsfUtil.addSuccessMessage("Cancelled");
// ////System.out.println("going to cancel staff payments");
Expand Down
65 changes: 60 additions & 5 deletions src/main/java/com/divudi/entity/pharmacy/StockHistory.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* @author Buddhika
*/
@Entity
public class StockHistory implements Serializable, RetirableEntity {
public class StockHistory implements Serializable, RetirableEntity {

private static final long serialVersionUID = 1L;
@Id
Expand Down Expand Up @@ -71,11 +71,18 @@ public class StockHistory implements Serializable, RetirableEntity {
int hxWeek;
// This give the sotck of this Item for this department
private Double itemStock;
// This give the sotck of this Item for this Institution
private Double institutionItemStock;
// This give the sotck of this Item for the system
private Double totalItemStock;

private Double itemStockValueAtSaleRate;
private Double institutionItemStockValueAtSaleRate;
private Double totalItemStockValueAtSaleRate;

private Double itemStockValueAtPurchaseRate;
private Double institutionItemStockValueAtPurchaseRate;
private Double totalItemStockValueAtPurchaseRate;


//Created Properties
@ManyToOne
private WebUser creater;
Expand All @@ -89,6 +96,8 @@ public class StockHistory implements Serializable, RetirableEntity {
private Date retiredAt;
private String retireComments;



public Date getStockAt() {
return stockAt;
}
Expand Down Expand Up @@ -353,7 +362,53 @@ public Double getTotalItemStock() {
public void setTotalItemStock(Double totalItemStock) {
this.totalItemStock = totalItemStock;
}



public Double getItemStockValueAtSaleRate() {
return itemStockValueAtSaleRate;
}

public void setItemStockValueAtSaleRate(Double itemStockValueAtSaleRate) {
this.itemStockValueAtSaleRate = itemStockValueAtSaleRate;
}

public Double getInstitutionItemStockValueAtSaleRate() {
return institutionItemStockValueAtSaleRate;
}

public void setInstitutionItemStockValueAtSaleRate(Double institutionItemStockValueAtSaleRate) {
this.institutionItemStockValueAtSaleRate = institutionItemStockValueAtSaleRate;
}

public Double getTotalItemStockValueAtSaleRate() {
return totalItemStockValueAtSaleRate;
}

public void setTotalItemStockValueAtSaleRate(Double totalItemStockValueAtSaleRate) {
this.totalItemStockValueAtSaleRate = totalItemStockValueAtSaleRate;
}

public Double getItemStockValueAtPurchaseRate() {
return itemStockValueAtPurchaseRate;
}

public void setItemStockValueAtPurchaseRate(Double itemStockValueAtPurchaseRate) {
this.itemStockValueAtPurchaseRate = itemStockValueAtPurchaseRate;
}

public Double getInstitutionItemStockValueAtPurchaseRate() {
return institutionItemStockValueAtPurchaseRate;
}

public void setInstitutionItemStockValueAtPurchaseRate(Double institutionItemStockValueAtPurchaseRate) {
this.institutionItemStockValueAtPurchaseRate = institutionItemStockValueAtPurchaseRate;
}

public Double getTotalItemStockValueAtPurchaseRate() {
return totalItemStockValueAtPurchaseRate;
}

public void setTotalItemStockValueAtPurchaseRate(Double totalItemStockValueAtPurchaseRate) {
this.totalItemStockValueAtPurchaseRate = totalItemStockValueAtPurchaseRate;
}

}
7 changes: 6 additions & 1 deletion src/main/webapp/pharmacy/pharmacy_cancel_bill_retail.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@
<p:spacer width="200" />
<p:inputText placeholder="Enter Comments to Cancel Bill" value="#{pharmacyBillSearch.bill.comments}" class="p-2 w-50" />
<h:panelGrid columns="2" class="my-2">
<p:commandButton class="ui-button-danger" icon="fas fa-cancel" value="Cancel" ajax="false" action="#{pharmacyBillSearch.pharmacyRetailCancelBillWithStock()}" >
<p:commandButton
class="ui-button-danger"
icon="fas fa-cancel"
value="CANCEL"
ajax="false"
action="#{pharmacyBillSearch.pharmacyRetailCancelBillWithStock()}" >
</p:commandButton>
<p:commandButton class="ui-button-secondary mx-2" icon="fas fa-arrow-left" value="Back" onclick="history.back(); return false;" >
</p:commandButton>
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/pharmacy/pharmacy_reprint_bill_sale.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
value="To Cancel"
icon="fa fa-cancel"
class="ui-button-danger"
action="pharmacy_cancel_bill_retail?faces-redirect=true"
action="#{pharmacyBillSearch.navigateToCancelPharmacyRetailSale()}"
disabled="#{pharmacyBillSearch.bill.cancelled}"
rendered="#{webUserController.hasPrivilege('PharmacySaleCancel')}">
</p:commandButton>
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/pharmacy/pharmacy_search_sale_bill.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
ajax="false"
value="#{bill.deptId}"
disabled="#{bill.referenceBill eq null}"
action="pharmacy_reprint_bill_sale">
action="#{pharmacyBillSearch.navigatePharmacyReprintRetailBill()}">
<f:setPropertyActionListener value="#{bill.referenceBill}" target="#{pharmacyBillSearch.bill}"/>
</p:commandLink>
</p:column>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@
<h:outputText value="#{f.pbItem.purchaseRate}"><f:convertNumber pattern="#,##0.00" /></h:outputText>
</p:column>
<p:column headerText="Closing Stock Value" width="15em">
<h:outputText value="" />
<h:outputText value="#{f.itemStockValueAtPurchaseRate}" />
</p:column>
<p:column headerText="Locator" width="5em">
<h:outputText value="" />
Expand Down