forked from woakes070048/gym_management
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GYM Management]: Added gym erpnext app
- Loading branch information
Showing
29 changed files
with
3,656 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Copyright (c) 2022, Nihantra C. Patel and contributors | ||
# For license information, please see license.txt | ||
|
||
|
||
import frappe | ||
import erpnext | ||
import gym_management | ||
|
||
def measurement_history(doc, event): | ||
|
||
test_d = frappe.db.get_value("Customer",{'name':doc.customer},'name') | ||
if test_d: | ||
test_doc = frappe.get_doc("Customer",test_d) | ||
|
||
# for remove duplicate row | ||
[test_doc.measurement_history_table.remove(d) for d in test_doc.get('measurement_history_table') if d.measurement_history == doc.name] | ||
|
||
row = test_doc.append('measurement_history_table', {}) | ||
row.measurement_history = doc.name | ||
row.date = doc.date | ||
row.customer = doc.customer | ||
row.weight = doc.weight | ||
row.height = doc.height | ||
row.bmi = doc.bmi | ||
row.bmr = doc.bmr | ||
row.neck = doc.neck | ||
row.biceps = doc.biceps | ||
row.hips = doc.hips | ||
row.calf = doc.calf | ||
row.chest = doc.chest | ||
row.waist = doc.waist | ||
row.thighs = doc.thighs | ||
test_doc.save() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
[ | ||
{ | ||
"context": null, | ||
"contributed": 0, | ||
"contribution_docname": null, | ||
"contribution_status": "", | ||
"docstatus": 0, | ||
"doctype": "Translation", | ||
"language": "en-US", | ||
"modified": "2022-06-28 15:05:29.689287", | ||
"name": "52187101c7", | ||
"parent": null, | ||
"parentfield": null, | ||
"parenttype": null, | ||
"source_text": "Item", | ||
"translated_text": "Equipment" | ||
}, | ||
{ | ||
"context": null, | ||
"contributed": 0, | ||
"contribution_docname": null, | ||
"contribution_status": "", | ||
"docstatus": 0, | ||
"doctype": "Translation", | ||
"language": "en-US", | ||
"modified": "2022-06-28 15:06:14.922612", | ||
"name": "955d5202e1", | ||
"parent": null, | ||
"parentfield": null, | ||
"parenttype": null, | ||
"source_text": "Skill", | ||
"translated_text": "Trainer Skill" | ||
}, | ||
{ | ||
"context": null, | ||
"contributed": 0, | ||
"contribution_docname": null, | ||
"contribution_status": "", | ||
"docstatus": 0, | ||
"doctype": "Translation", | ||
"language": "en-US", | ||
"modified": "2022-06-28 15:06:32.824758", | ||
"name": "1d523a2f18", | ||
"parent": null, | ||
"parentfield": null, | ||
"parenttype": null, | ||
"source_text": "Customer", | ||
"translated_text": "Registered Member" | ||
}, | ||
{ | ||
"context": null, | ||
"contributed": 0, | ||
"contribution_docname": null, | ||
"contribution_status": "", | ||
"docstatus": 0, | ||
"doctype": "Translation", | ||
"language": "en-US", | ||
"modified": "2022-06-28 15:07:16.574586", | ||
"name": "98ab247f14", | ||
"parent": null, | ||
"parentfield": null, | ||
"parenttype": null, | ||
"source_text": "Employee", | ||
"translated_text": "Trainer" | ||
}, | ||
{ | ||
"context": null, | ||
"contributed": 0, | ||
"contribution_docname": null, | ||
"contribution_status": "", | ||
"docstatus": 0, | ||
"doctype": "Translation", | ||
"language": "en-US", | ||
"modified": "2022-06-28 15:20:36.700214", | ||
"name": "37e42b8b4f", | ||
"parent": null, | ||
"parentfield": null, | ||
"parenttype": null, | ||
"source_text": "Item Group", | ||
"translated_text": "Gym Exercise Type" | ||
}, | ||
{ | ||
"context": null, | ||
"contributed": 0, | ||
"contribution_docname": null, | ||
"contribution_status": "", | ||
"docstatus": 0, | ||
"doctype": "Translation", | ||
"language": "en-US", | ||
"modified": "2022-06-28 15:24:36.973694", | ||
"name": "fa33737813", | ||
"parent": null, | ||
"parentfield": null, | ||
"parenttype": null, | ||
"source_text": "Item Code", | ||
"translated_text": "Equipment Code" | ||
}, | ||
{ | ||
"context": null, | ||
"contributed": 0, | ||
"contribution_docname": null, | ||
"contribution_status": "", | ||
"docstatus": 0, | ||
"doctype": "Translation", | ||
"language": "en-US", | ||
"modified": "2022-06-28 15:24:48.582819", | ||
"name": "d241394257", | ||
"parent": null, | ||
"parentfield": null, | ||
"parenttype": null, | ||
"source_text": "Item Name", | ||
"translated_text": "Equipment Name" | ||
}, | ||
{ | ||
"context": null, | ||
"contributed": 0, | ||
"contribution_docname": null, | ||
"contribution_status": "", | ||
"docstatus": 0, | ||
"doctype": "Translation", | ||
"language": "en-US", | ||
"modified": "2022-06-29 10:21:05.838144", | ||
"name": "857ebc82c0", | ||
"parent": null, | ||
"parentfield": null, | ||
"parenttype": null, | ||
"source_text": "Customer Group", | ||
"translated_text": "Registered Member Type" | ||
}, | ||
{ | ||
"context": null, | ||
"contributed": 0, | ||
"contribution_docname": null, | ||
"contribution_status": "", | ||
"docstatus": 0, | ||
"doctype": "Translation", | ||
"language": "en-US", | ||
"modified": "2022-06-29 10:23:16.852614", | ||
"name": "4978c4af0c", | ||
"parent": null, | ||
"parentfield": null, | ||
"parenttype": null, | ||
"source_text": "Customer Details", | ||
"translated_text": "Registered Member Details" | ||
} | ||
] |
Oops, something went wrong.