Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into hsr-insurance
Browse files Browse the repository at this point in the history
  • Loading branch information
akurungadam committed Dec 28, 2021
2 parents 5737503 + 00564e4 commit 1bfd99f
Show file tree
Hide file tree
Showing 34 changed files with 1,346 additions and 339 deletions.
13 changes: 6 additions & 7 deletions .github/helper/install.sh
Expand Up @@ -4,11 +4,8 @@ set -ex

cd ~ || exit

sudo apt-get install redis-server
sudo apt-get install redis-server libcups2-dev

sudo apt install nodejs

sudo apt install npm

pip install frappe-bench

Expand Down Expand Up @@ -36,7 +33,6 @@ wget -O /tmp/wkhtmltox.tar.xz https://github.com/frappe/wkhtmltopdf/raw/master/w
tar -xf /tmp/wkhtmltox.tar.xz -C /tmp
sudo mv /tmp/wkhtmltox/bin/wkhtmltopdf /usr/local/bin/wkhtmltopdf
sudo chmod o+x /usr/local/bin/wkhtmltopdf
sudo apt-get install libcups2-dev

cd ~/frappe-bench || exit

Expand All @@ -46,12 +42,15 @@ sed -i 's/schedule:/# schedule:/g' Procfile
sed -i 's/socketio:/# socketio:/g' Procfile
sed -i 's/redis_socketio:/# redis_socketio:/g' Procfile

bench get-app https://github.com/chillarAnand/erpnext --branch care
bench get-app https://github.com/frappe/erpnext

if [ "$TYPE" == "server" ]; then bench setup requirements --dev; fi


bench start &> bench_run_logs.txt &
bench --site test_site reinstall --yes

bench --verbose --site test_site install-app erpnext

bench get-app healthcare "${GITHUB_WORKSPACE}"
bench --verbose --site test_site install-app healthcare
bench --verbose --site test_site install-app healthcare
38 changes: 0 additions & 38 deletions .github/helper/semgrep_rules/README.md

This file was deleted.

17 changes: 0 additions & 17 deletions .github/helper/semgrep_rules/frappe_correctness.py

This file was deleted.

13 changes: 0 additions & 13 deletions .github/helper/semgrep_rules/frappe_correctness.yml

This file was deleted.

6 changes: 0 additions & 6 deletions .github/helper/semgrep_rules/security.py

This file was deleted.

14 changes: 0 additions & 14 deletions .github/helper/semgrep_rules/security.yml

This file was deleted.

37 changes: 0 additions & 37 deletions .github/helper/semgrep_rules/translate.js

This file was deleted.

53 changes: 0 additions & 53 deletions .github/helper/semgrep_rules/translate.py

This file was deleted.

63 changes: 0 additions & 63 deletions .github/helper/semgrep_rules/translate.yml

This file was deleted.

3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Expand Up @@ -91,7 +91,8 @@ jobs:
bash ${GITHUB_WORKSPACE}/.github/helper/install.sh
cd ~/frappe-bench/ && source env/bin/activate
cd apps/healthcare && pip install -r dev-requirements.txt
env:
TYPE: server

- name: Run Tests
run: cd ~/frappe-bench/ && bench --site test_site run-tests --app healthcare
Expand Down
19 changes: 18 additions & 1 deletion README.md
Expand Up @@ -3,6 +3,23 @@
Healthcare app for ERPNext


### Installation

Using bench, [install ERPNext](https://github.com/frappe/bench#installation) as mentioned here.

Once ERPNext is installed, add healthcare app to your bench by running

```sh
$ bench get-app healthcare
```

After that, you can install healthcare app on required site by running

```sh
$ bench --site demo.com install-app healthcare
```


### Documentation

Read documentation at https://docs.erpnext.com/docs/user/manual/en/healthcare
Expand All @@ -11,4 +28,4 @@ Read documentation at https://docs.erpnext.com/docs/user/manual/en/healthcare

#### License

MIT
GNU GPL V3. See [license.txt](https://github.com/frappe/healthcare/blob/develop/license.txt) for more information.
3 changes: 1 addition & 2 deletions dev-requirements.txt
@@ -1,2 +1 @@
pre-commit>=2.13.0,<=3.0.0
responses~=0.13.3
pre-commit>=2.13.0,<3.0.0
27 changes: 27 additions & 0 deletions healthcare/healthcare/custom_doctype/test_sales_invoice.py
@@ -0,0 +1,27 @@
import frappe
from erpnext.tests.utils import ERPNextTestCase

test_records = frappe.get_test_records('Sales Invoice')


class TestSalesInvoice(ERPNextTestCase):
def test_set_healthcare_services_should_preserve_state(self):
invoice = frappe.copy_doc(test_records[0])

count = len(invoice.items)
item = invoice.items[0]
checked_values = [{
'dt': 'Item',
'dn': item.item_name,
'item': item.item_code,
'qty': False,
'rate': False,
'income_account': False,
'description': False,
}]

invoice.set_healthcare_services(checked_values)
self.assertEqual(count + 1, len(invoice.items))

invoice.set_healthcare_services(checked_values)
self.assertEqual(count + 2, len(invoice.items))
Expand Up @@ -244,6 +244,7 @@
"set_only_once": 1
},
{
"allow_in_quick_entry": 1,
"fieldname": "gender",
"fieldtype": "Link",
"label": "Gender",
Expand Down Expand Up @@ -282,10 +283,11 @@
],
"image_field": "image",
"links": [],
"modified": "2021-08-24 10:42:08.513054",
"modified": "2021-10-20 08:30:46.786977",
"modified_by": "Administrator",
"module": "Healthcare",
"name": "Healthcare Practitioner",
"naming_rule": "By \"Naming Series\" field",
"owner": "Administrator",
"permissions": [
{
Expand Down Expand Up @@ -326,6 +328,7 @@
"write": 1
}
],
"quick_entry": 1,
"restrict_to_domain": "Healthcare",
"search_fields": "practitioner_name, mobile_phone, office_phone",
"show_name_in_global_search": 1,
Expand Down

0 comments on commit 1bfd99f

Please sign in to comment.