From 998984a869dcb4d5f48108de5d00b3cf359571b4 Mon Sep 17 00:00:00 2001 From: Olara Moses Date: Fri, 18 Oct 2024 13:14:28 +0000 Subject: [PATCH 1/3] fix: Configure service types and billables to be used in billing app --- .../configuration/concepts/billingconcepts.csv | 4 ++++ distro/configuration/liquibase/liquibase.xml | 16 ++++++++++++++++ .../configuration/liquibase/sql/item_prices.sql | 15 +++++++++++++++ frontend/config-core_demo.json | 6 ++++++ 4 files changed, 41 insertions(+) create mode 100644 distro/configuration/concepts/billingconcepts.csv create mode 100644 distro/configuration/liquibase/liquibase.xml create mode 100644 distro/configuration/liquibase/sql/item_prices.sql diff --git a/distro/configuration/concepts/billingconcepts.csv b/distro/configuration/concepts/billingconcepts.csv new file mode 100644 index 000000000..f7b91f265 --- /dev/null +++ b/distro/configuration/concepts/billingconcepts.csv @@ -0,0 +1,4 @@ +Uuid,Void/Retire,Same as mappings,Fully specified name:en,Fully specified name:fr,Fully specified name:es,Short name:en,Short name:fr,Short name:es,Description:en,Description:fr,Description:es,Data class,Data type,Members,_version:1,_order:500 +3f6f6c92-8d5c-4a9e-bb1c-d3e00e4f8b71,,,Orthopedic Services,,,OPS,,,,,,Misc,Text,,, +550e8400-e29b-41d4-a716-446655440000,,,Nutrition Services,,,NTS,,,,,,Misc,Text,,, +0dfe7d9f-1dc9-4e68-b4cb-d19e1a006c54,,,Service Types,,,,,,,,,ConvSet,N/A,Antenatal Services;Orthopedic Services;Nutrition Services,, \ No newline at end of file diff --git a/distro/configuration/liquibase/liquibase.xml b/distro/configuration/liquibase/liquibase.xml new file mode 100644 index 000000000..f65552df9 --- /dev/null +++ b/distro/configuration/liquibase/liquibase.xml @@ -0,0 +1,16 @@ + + + + + + + SET foreign_key_checks = 0; + + SET foreign_key_checks = 1; + + diff --git a/distro/configuration/liquibase/sql/item_prices.sql b/distro/configuration/liquibase/sql/item_prices.sql new file mode 100644 index 000000000..f72c77922 --- /dev/null +++ b/distro/configuration/liquibase/sql/item_prices.sql @@ -0,0 +1,15 @@ +insert into cashier_item_price (`service_id`, `price`, `payment_mode`, `name`, `creator`, `date_created`, `uuid`) +values + ('1', '50.00', '1', 'Cash', '1', NOW(), uuid()), + ('1', '55.00', '2', 'Bank transfer', '1', NOW(), uuid()), + ('1', '55.00', '3', 'Paypal', '1', NOW(), uuid()), + + ('2', '80.00', '1', 'Cash', '1', NOW(), uuid()), + ('2', '90.00', '2', 'Bank transfer', '1', NOW(), uuid()), + ('2', '90.00', '3', 'Paypal', '1', NOW(), uuid()), + + ('3', '27.00', '1', 'Cash', '1', NOW(), uuid()), + ('3', '32.00', '2', 'Bank transfer', '1', NOW(), uuid()), + ('3', '32.00', '3', 'Paypal', '1', NOW(), uuid()), + + ('4', '15.00', '1', 'Cash', '1', NOW(), uuid()); \ No newline at end of file diff --git a/frontend/config-core_demo.json b/frontend/config-core_demo.json index f97a2389f..d2342747f 100644 --- a/frontend/config-core_demo.json +++ b/frontend/config-core_demo.json @@ -35,5 +35,11 @@ }, "@openmrs/esm-styleguide": { "Brand color #1": "#005d5d" + }, + "@openmrs/esm-billing-app": { + "serviceTypes": { + "billableService": "0dfe7d9f-1dc9-4e68-b4cb-d19e1a006c54" + }, + "defaultCurrency": "UGX" } } From 3d2a57dac415baf98dff6923b05af870e45e000d Mon Sep 17 00:00:00 2001 From: Olara Moses Date: Fri, 18 Oct 2024 14:03:02 +0000 Subject: [PATCH 2/3] Change default currency to USD --- frontend/config-core_demo.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/config-core_demo.json b/frontend/config-core_demo.json index d2342747f..cd6f2cb78 100644 --- a/frontend/config-core_demo.json +++ b/frontend/config-core_demo.json @@ -40,6 +40,6 @@ "serviceTypes": { "billableService": "0dfe7d9f-1dc9-4e68-b4cb-d19e1a006c54" }, - "defaultCurrency": "UGX" + "defaultCurrency": "USD" } } From a2815fcf19e2a41cbdabdd8e8c9c5ba6ae7f07ff Mon Sep 17 00:00:00 2001 From: Olara Moses Date: Mon, 21 Oct 2024 12:02:12 +0000 Subject: [PATCH 3/3] Revert adding prices via sql --- distro/configuration/liquibase/liquibase.xml | 16 ---------------- .../configuration/liquibase/sql/item_prices.sql | 15 --------------- 2 files changed, 31 deletions(-) delete mode 100644 distro/configuration/liquibase/liquibase.xml delete mode 100644 distro/configuration/liquibase/sql/item_prices.sql diff --git a/distro/configuration/liquibase/liquibase.xml b/distro/configuration/liquibase/liquibase.xml deleted file mode 100644 index f65552df9..000000000 --- a/distro/configuration/liquibase/liquibase.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - SET foreign_key_checks = 0; - - SET foreign_key_checks = 1; - - diff --git a/distro/configuration/liquibase/sql/item_prices.sql b/distro/configuration/liquibase/sql/item_prices.sql deleted file mode 100644 index f72c77922..000000000 --- a/distro/configuration/liquibase/sql/item_prices.sql +++ /dev/null @@ -1,15 +0,0 @@ -insert into cashier_item_price (`service_id`, `price`, `payment_mode`, `name`, `creator`, `date_created`, `uuid`) -values - ('1', '50.00', '1', 'Cash', '1', NOW(), uuid()), - ('1', '55.00', '2', 'Bank transfer', '1', NOW(), uuid()), - ('1', '55.00', '3', 'Paypal', '1', NOW(), uuid()), - - ('2', '80.00', '1', 'Cash', '1', NOW(), uuid()), - ('2', '90.00', '2', 'Bank transfer', '1', NOW(), uuid()), - ('2', '90.00', '3', 'Paypal', '1', NOW(), uuid()), - - ('3', '27.00', '1', 'Cash', '1', NOW(), uuid()), - ('3', '32.00', '2', 'Bank transfer', '1', NOW(), uuid()), - ('3', '32.00', '3', 'Paypal', '1', NOW(), uuid()), - - ('4', '15.00', '1', 'Cash', '1', NOW(), uuid()); \ No newline at end of file