initial multi-church featureset

- Query reports were converted to script reports using AI
This commit is contained in:
meichthys 2026-03-06 06:14:58 +00:00
parent ddb7c42b95
commit c363d04934
96 changed files with 3810 additions and 2868 deletions

View File

@ -1,75 +1,80 @@
{
"actions": [],
"autoname": "format:Presentation {#}",
"creation": "2025-10-10 23:07:31.392203",
"description": "A slideshow presentation of `Presentation Slide`s",
"doctype": "DocType",
"documentation": "/app/manual%3A-communications",
"engine": "InnoDB",
"field_order": [
"title",
"section_break_hgry",
"slides"
],
"fields": [
{
"fieldname": "title",
"fieldtype": "Data",
"label": "Title"
},
{
"fieldname": "section_break_hgry",
"fieldtype": "Section Break"
},
{
"fieldname": "slides",
"fieldtype": "Table",
"label": "Slides",
"options": "Presentation Slide"
}
],
"grid_page_length": 50,
"index_web_pages_for_search": 1,
"links": [],
"modified": "2025-11-15 22:53:19.321184",
"modified_by": "Administrator",
"module": "Church Communications",
"name": "Presentation",
"naming_rule": "Expression",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Church Manager",
"select": 1,
"share": 1,
"write": 1
}
],
"row_format": "Dynamic",
"show_title_field_in_link": 1,
"sort_field": "modified",
"sort_order": "DESC",
"states": [],
"title_field": "title",
"track_changes": 1,
"track_views": 1
}
"actions": [],
"autoname": "format:Presentation {#}",
"creation": "2025-10-10 23:07:31.392203",
"description": "A slideshow presentation of `Presentation Slide`s",
"doctype": "DocType",
"documentation": "/app/manual%3A-communications",
"engine": "InnoDB",
"field_order": ["church", "title", "section_break_hgry", "slides"],
"fields": [
{
"fieldname": "church",
"fieldtype": "Link",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Church",
"options": "Church",
"search_index": 1
},
{
"fieldname": "title",
"fieldtype": "Data",
"label": "Title"
},
{
"fieldname": "section_break_hgry",
"fieldtype": "Section Break"
},
{
"fieldname": "slides",
"fieldtype": "Table",
"label": "Slides",
"options": "Presentation Slide"
}
],
"grid_page_length": 50,
"index_web_pages_for_search": 1,
"links": [],
"modified": "2025-11-15 22:53:19.321184",
"modified_by": "Administrator",
"module": "Church Communications",
"name": "Presentation",
"naming_rule": "Expression",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Church Manager",
"select": 1,
"share": 1,
"write": 1
}
],
"row_format": "Dynamic",
"show_title_field_in_link": 1,
"sort_field": "modified",
"sort_order": "DESC",
"states": [],
"title_field": "title",
"track_changes": 1,
"track_views": 1
}

View File

@ -56,10 +56,9 @@
"name": "Letters To Be Shared",
"owner": "Administrator",
"prepared_report": 0,
"query": "SELECT parenttype, parent, date, is_private, COALESCE(file, \" \"), content, name \nFROM `tabLetter` \nWHERE share_with_church = True\n AND shared_date IS NULL;",
"ref_doctype": "Person",
"report_name": "Letters To Be Shared",
"report_type": "Query Report",
"report_type": "Script Report",
"roles": [
{
"role": "Church Manager"
@ -69,4 +68,4 @@
}
],
"timeout": 0
}
}

View File

@ -0,0 +1,49 @@
import frappe
def execute(filters=None):
return get_columns(), get_data()
def get_columns():
return [
{"fieldname": "parenttype", "fieldtype": "Data", "label": "Type", "width": 120},
{"fieldname": "parent", "fieldtype": "Dynamic Link", "label": "From", "options": "parenttype", "width": 150},
{"fieldname": "date", "fieldtype": "Date", "label": "Received", "width": 100},
{"fieldname": "is_private", "fieldtype": "Check", "label": "Private?", "width": 80},
{"fieldname": "file", "fieldtype": "Data", "label": "File", "width": 200},
{"fieldname": "content", "fieldtype": "Data", "label": "Content", "width": 300},
]
def get_data():
church_condition = ""
values = {}
if not frappe.has_role("System Manager"):
church_condition = """AND COALESCE(`tabPerson`.church, `tabMissionary`.church) IN (
SELECT for_value FROM `tabUser Permission`
WHERE user = %(user)s AND allow = 'Church'
)"""
values["user"] = frappe.session.user
return frappe.db.sql(
f"""
SELECT
`tabLetter`.parenttype,
`tabLetter`.parent,
`tabLetter`.date,
`tabLetter`.is_private,
COALESCE(`tabLetter`.file, ''),
`tabLetter`.content,
`tabLetter`.name
FROM `tabLetter`
LEFT JOIN `tabPerson` ON `tabLetter`.parenttype = 'Person' AND `tabPerson`.name = `tabLetter`.parent
LEFT JOIN `tabMissionary` ON `tabLetter`.parenttype = 'Missionary' AND `tabMissionary`.name = `tabLetter`.parent
WHERE `tabLetter`.share_with_church = 1
AND `tabLetter`.shared_date IS NULL
{church_condition}
""",
values,
as_dict=True,
)

View File

@ -0,0 +1,73 @@
{
"custom_fields": [
{
"_assign": null,
"_comments": null,
"_liked_by": null,
"_user_tags": null,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"collapsible_depends_on": null,
"columns": 0,
"creation": "2025-11-15 00:00:00.000000",
"default": null,
"depends_on": null,
"description": "The church to which this user belongs. Leave blank for access to all churches",
"docstatus": 0,
"dt": "User",
"fetch_from": null,
"fetch_if_empty": 0,
"fieldname": "church",
"fieldtype": "Link",
"hidden": 0,
"hide_border": 0,
"hide_days": 0,
"hide_seconds": 0,
"idx": 0,
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_preview": 0,
"in_standard_filter": 0,
"insert_after": "full_name",
"is_system_generated": 0,
"is_virtual": 0,
"label": "Church",
"length": 0,
"link_filters": null,
"mandatory_depends_on": null,
"modified": "2025-11-15 00:00:00.000000",
"modified_by": "Administrator",
"module": null,
"name": "User-church",
"no_copy": 0,
"non_negative": 0,
"options": "Church",
"owner": "Administrator",
"permlevel": 0,
"placeholder": null,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"print_width": null,
"read_only": 0,
"read_only_depends_on": null,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"show_dashboard": 0,
"sort_options": 0,
"translatable": 0,
"unique": 0,
"width": null
}
],
"custom_perms": [],
"doctype": "User",
"links": [],
"property_setters": [],
"sync_on_migrate": 1
}

View File

@ -0,0 +1,37 @@
# Copyright (c) 2025, meichthys and contributors
# For license information, please see license.txt
import frappe
def sync_user_permission(doc, method):
"""Auto-create/update User Permission for Church when a user is saved.
Users with Church User or Church Manager roles are scoped to their assigned
church. System Manager and other roles are left unrestricted and can view
documents across all churches.
"""
user_roles = {r.role for r in doc.get("roles", [])}
if not user_roles:
return
church = doc.get("church")
# Remove existing User permissions for this user
frappe.db.delete("User Permission", {"user": doc.name, "allow": "Church"})
# Create new User Permission
if church:
frappe.get_doc(
{
"doctype": "User Permission",
"user": doc.name,
"allow": "Church",
"for_value": church,
"apply_to_all_doctypes": 1,
}
).insert(ignore_permissions=True)
frappe.defaults.set_user_default("church", church, user=doc.name)
else:
frappe.defaults.clear_user_default("church", user=doc.name)

View File

@ -1,173 +1,183 @@
{
"actions": [],
"allow_rename": 1,
"autoname": "format: {recipient} Alms {#}",
"creation": "2025-11-10 22:56:15.677299",
"description": "A request for financial support for a person or family",
"doctype": "DocType",
"documentation": "/app/manual%3A-finances",
"engine": "InnoDB",
"field_order": [
"status",
"recipient_type",
"recipient",
"column_break_ixvv",
"requestor",
"amount",
"expense_type",
"section_break_olzm",
"description"
],
"fields": [
{
"description": "The entity that would be receiving the alms.",
"fieldname": "recipient",
"fieldtype": "Dynamic Link",
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Recipient",
"options": "recipient_type",
"reqd": 1
},
{
"fieldname": "column_break_ixvv",
"fieldtype": "Column Break"
},
{
"fieldname": "section_break_olzm",
"fieldtype": "Section Break"
},
{
"fieldname": "description",
"fieldtype": "Small Text",
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Description",
"reqd": 1
},
{
"fieldname": "amount",
"fieldtype": "Currency",
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Amount",
"precision": "0"
},
{
"default": "Pending",
"fieldname": "status",
"fieldtype": "Select",
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Status",
"options": "Pending\nDeclined\nApproved\nDistributed",
"reqd": 1
},
{
"description": "Required to 'Create Expense'. The fund associated with the selected expense will be reduced by the alms 'Amount'.",
"documentation_url": "/app/manual%3A-finances",
"fieldname": "expense_type",
"fieldtype": "Link",
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Expense Type",
"options": "Expense Type"
},
{
"default": "Person",
"description": "The type of entity for which alms are being requested.",
"fieldname": "recipient_type",
"fieldtype": "Link",
"label": "Recipient Type",
"link_filters": "[[\"DocType\",\"name\",\"in\",[\"Person\",\"Family\"]]]",
"options": "DocType"
},
{
"description": "The person making the alms request.",
"fieldname": "requestor",
"fieldtype": "Link",
"in_filter": 1,
"in_preview": 1,
"label": "Requestor",
"options": "Person",
"reqd": 1
}
],
"grid_page_length": 50,
"index_web_pages_for_search": 1,
"links": [],
"modified": "2026-02-20 00:03:30.229450",
"modified_by": "Administrator",
"module": "Church Finances",
"name": "Alms Request",
"naming_rule": "Expression",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Church Manager",
"select": 1,
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"if_owner": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Church User",
"select": 1,
"share": 1,
"write": 1
}
],
"row_format": "Dynamic",
"show_preview_popup": 1,
"sort_field": "modified",
"sort_order": "DESC",
"states": [
{
"color": "Yellow",
"title": "Pending"
},
{
"color": "Red",
"title": "Declined"
},
{
"color": "Green",
"title": "Accepted"
},
{
"color": "Blue",
"title": "Distributed"
}
]
}
"actions": [],
"allow_rename": 1,
"autoname": "format: {recipient} Alms {#}",
"creation": "2025-11-10 22:56:15.677299",
"description": "A request for financial support for a person or family",
"doctype": "DocType",
"documentation": "/app/manual%3A-finances",
"engine": "InnoDB",
"field_order": [
"church",
"status",
"recipient_type",
"recipient",
"column_break_ixvv",
"requestor",
"amount",
"expense_type",
"section_break_olzm",
"description"
],
"fields": [
{
"fieldname": "church",
"fieldtype": "Link",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Church",
"options": "Church",
"search_index": 1
},
{
"description": "The entity that would be receiving the alms.",
"fieldname": "recipient",
"fieldtype": "Dynamic Link",
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Recipient",
"options": "recipient_type",
"reqd": 1
},
{
"fieldname": "column_break_ixvv",
"fieldtype": "Column Break"
},
{
"fieldname": "section_break_olzm",
"fieldtype": "Section Break"
},
{
"fieldname": "description",
"fieldtype": "Small Text",
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Description",
"reqd": 1
},
{
"fieldname": "amount",
"fieldtype": "Currency",
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Amount",
"precision": "0"
},
{
"default": "Pending",
"fieldname": "status",
"fieldtype": "Select",
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Status",
"options": "Pending\nDeclined\nApproved\nDistributed",
"reqd": 1
},
{
"description": "Required to 'Create Expense'. The fund associated with the selected expense will be reduced by the alms 'Amount'.",
"documentation_url": "/app/manual%3A-finances",
"fieldname": "expense_type",
"fieldtype": "Link",
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Expense Type",
"options": "Expense Type"
},
{
"default": "Person",
"description": "The type of entity for which alms are being requested.",
"fieldname": "recipient_type",
"fieldtype": "Link",
"label": "Recipient Type",
"link_filters": "[[\"DocType\",\"name\",\"in\",[\"Person\",\"Family\"]]]",
"options": "DocType"
},
{
"description": "The person making the alms request.",
"fieldname": "requestor",
"fieldtype": "Link",
"in_filter": 1,
"in_preview": 1,
"label": "Requestor",
"options": "Person",
"reqd": 1
}
],
"grid_page_length": 50,
"index_web_pages_for_search": 1,
"links": [],
"modified": "2026-02-20 00:03:30.229450",
"modified_by": "Administrator",
"module": "Church Finances",
"name": "Alms Request",
"naming_rule": "Expression",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Church Manager",
"select": 1,
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"if_owner": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Church User",
"select": 1,
"share": 1,
"write": 1
}
],
"row_format": "Dynamic",
"show_preview_popup": 1,
"sort_field": "modified",
"sort_order": "DESC",
"states": [
{
"color": "Yellow",
"title": "Pending"
},
{
"color": "Red",
"title": "Declined"
},
{
"color": "Green",
"title": "Accepted"
},
{
"color": "Blue",
"title": "Distributed"
}
]
}

View File

@ -1,136 +1,146 @@
{
"actions": [],
"allow_rename": 1,
"autoname": "format:{date}",
"creation": "2025-09-02 00:47:02.825073",
"description": "A specific collection of `Donation`s that are generally from `Person`s and associated with a specific `Function`s.",
"doctype": "DocType",
"documentation": "/app/manual%3A-finances",
"engine": "InnoDB",
"field_order": [
"date",
"event",
"notes",
"column_break_ijpy",
"total_amount",
"fund_totals",
"section_break_izta",
"donations",
"amended_from"
],
"fields": [
{
"description": "The `Function` associated with this collection.",
"fieldname": "event",
"fieldtype": "Link",
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Event",
"options": "Function",
"search_index": 1
},
{
"default": "now",
"fieldname": "date",
"fieldtype": "Datetime",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Date",
"reqd": 1
},
{
"fieldname": "section_break_izta",
"fieldtype": "Section Break"
},
{
"description": "For 'anonymous' donations, enter the total amount and leave `Person` and `Check #` blank. To apply a single check to multiple funds, create another donation record with the same check number. The `Bank Reconciliation Report` will combine the separate donations together for easier reconciliation with bank statements.",
"fieldname": "donations",
"fieldtype": "Table",
"label": "Donations",
"options": "Donation",
"reqd": 1
},
{
"fieldname": "column_break_ijpy",
"fieldtype": "Column Break"
},
{
"fieldname": "total_amount",
"fieldtype": "Currency",
"in_list_view": 1,
"in_preview": 1,
"label": "Total Amount",
"read_only": 1
},
{
"fieldname": "fund_totals",
"fieldtype": "Table",
"label": "Fund Totals",
"options": "Collection Fund Total",
"read_only": 1
},
{
"fieldname": "notes",
"fieldtype": "Small Text",
"in_preview": 1,
"label": "Notes"
},
{
"fieldname": "amended_from",
"fieldtype": "Link",
"label": "Amended From",
"no_copy": 1,
"options": "Collection",
"print_hide": 1,
"read_only": 1,
"search_index": 1
}
],
"grid_page_length": 50,
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
"modified": "2025-11-15 01:34:36.895717",
"modified_by": "Administrator",
"module": "Church Finances",
"name": "Collection",
"naming_rule": "Expression",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
},
{
"amend": 1,
"cancel": 1,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Church Manager",
"select": 1,
"share": 1,
"submit": 1,
"write": 1
}
],
"row_format": "Dynamic",
"show_preview_popup": 1,
"sort_field": "modified",
"sort_order": "DESC",
"states": [],
"track_changes": 1
}
"actions": [],
"allow_rename": 1,
"autoname": "format:{date}",
"creation": "2025-09-02 00:47:02.825073",
"description": "A specific collection of `Donation`s that are generally from `Person`s and associated with a specific `Function`s.",
"doctype": "DocType",
"documentation": "/app/manual%3A-finances",
"engine": "InnoDB",
"field_order": [
"church",
"date",
"event",
"notes",
"column_break_ijpy",
"total_amount",
"fund_totals",
"section_break_izta",
"donations",
"amended_from"
],
"fields": [
{
"fieldname": "church",
"fieldtype": "Link",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Church",
"options": "Church",
"search_index": 1
},
{
"description": "The `Function` associated with this collection.",
"fieldname": "event",
"fieldtype": "Link",
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Event",
"options": "Function",
"search_index": 1
},
{
"default": "now",
"fieldname": "date",
"fieldtype": "Datetime",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Date",
"reqd": 1
},
{
"fieldname": "section_break_izta",
"fieldtype": "Section Break"
},
{
"description": "For 'anonymous' donations, enter the total amount and leave `Person` and `Check #` blank. To apply a single check to multiple funds, create another donation record with the same check number. The `Bank Reconciliation Report` will combine the separate donations together for easier reconciliation with bank statements.",
"fieldname": "donations",
"fieldtype": "Table",
"label": "Donations",
"options": "Donation",
"reqd": 1
},
{
"fieldname": "column_break_ijpy",
"fieldtype": "Column Break"
},
{
"fieldname": "total_amount",
"fieldtype": "Currency",
"in_list_view": 1,
"in_preview": 1,
"label": "Total Amount",
"read_only": 1
},
{
"fieldname": "fund_totals",
"fieldtype": "Table",
"label": "Fund Totals",
"options": "Collection Fund Total",
"read_only": 1
},
{
"fieldname": "notes",
"fieldtype": "Small Text",
"in_preview": 1,
"label": "Notes"
},
{
"fieldname": "amended_from",
"fieldtype": "Link",
"label": "Amended From",
"no_copy": 1,
"options": "Collection",
"print_hide": 1,
"read_only": 1,
"search_index": 1
}
],
"grid_page_length": 50,
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
"modified": "2025-11-15 01:34:36.895717",
"modified_by": "Administrator",
"module": "Church Finances",
"name": "Collection",
"naming_rule": "Expression",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
},
{
"amend": 1,
"cancel": 1,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Church Manager",
"select": 1,
"share": 1,
"submit": 1,
"write": 1
}
],
"row_format": "Dynamic",
"show_preview_popup": 1,
"sort_field": "modified",
"sort_order": "DESC",
"states": [],
"track_changes": 1
}

View File

@ -1,112 +1,115 @@
{
"actions": [],
"allow_rename": 1,
"autoname": "format:{type} - {date}",
"creation": "2025-10-09 02:25:29.401455",
"description": "A financial transaction that reduces the balance of a `Fund`",
"doctype": "DocType",
"documentation": "/app/manual%3A-finances",
"engine": "InnoDB",
"field_order": [
"type",
"amount",
"date",
"notes",
"amended_from"
],
"fields": [
{
"fieldname": "amount",
"fieldtype": "Currency",
"in_list_view": 1,
"in_preview": 1,
"label": "Amount",
"reqd": 1
},
{
"fieldname": "type",
"fieldtype": "Link",
"in_filter": 1,
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Type",
"options": "Expense Type",
"reqd": 1,
"search_index": 1
},
{
"fieldname": "notes",
"fieldtype": "Small Text",
"in_list_view": 1,
"in_preview": 1,
"label": "Notes"
},
{
"fieldname": "amended_from",
"fieldtype": "Link",
"label": "Amended From",
"no_copy": 1,
"options": "Expense",
"print_hide": 1,
"read_only": 1,
"search_index": 1
},
{
"default": "Now",
"fieldname": "date",
"fieldtype": "Datetime",
"in_preview": 1,
"label": "Date"
}
],
"grid_page_length": 50,
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [
{
"link_doctype": "Fund",
"link_fieldname": "source"
}
],
"modified": "2025-11-15 01:36:35.919702",
"modified_by": "Administrator",
"module": "Church Finances",
"name": "Expense",
"naming_rule": "Expression",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
},
{
"amend": 1,
"cancel": 1,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Church Manager",
"select": 1,
"share": 1,
"submit": 1,
"write": 1
}
],
"row_format": "Dynamic",
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}
"actions": [],
"allow_rename": 1,
"autoname": "format:{type} - {date}",
"creation": "2025-10-09 02:25:29.401455",
"description": "A financial transaction that reduces the balance of a `Fund`",
"doctype": "DocType",
"documentation": "/app/manual%3A-finances",
"engine": "InnoDB",
"field_order": ["church", "type", "amount", "date", "notes", "amended_from"],
"fields": [
{
"fieldname": "church",
"fieldtype": "Link",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Church",
"options": "Church",
"search_index": 1
},
{
"fieldname": "amount",
"fieldtype": "Currency",
"in_list_view": 1,
"in_preview": 1,
"label": "Amount",
"reqd": 1
},
{
"fieldname": "type",
"fieldtype": "Link",
"in_filter": 1,
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Type",
"options": "Expense Type",
"reqd": 1,
"search_index": 1
},
{
"fieldname": "notes",
"fieldtype": "Small Text",
"in_list_view": 1,
"in_preview": 1,
"label": "Notes"
},
{
"fieldname": "amended_from",
"fieldtype": "Link",
"label": "Amended From",
"no_copy": 1,
"options": "Expense",
"print_hide": 1,
"read_only": 1,
"search_index": 1
},
{
"default": "Now",
"fieldname": "date",
"fieldtype": "Datetime",
"in_preview": 1,
"label": "Date"
}
],
"grid_page_length": 50,
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [
{
"link_doctype": "Fund",
"link_fieldname": "source"
}
],
"modified": "2025-11-15 01:36:35.919702",
"modified_by": "Administrator",
"module": "Church Finances",
"name": "Expense",
"naming_rule": "Expression",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
},
{
"amend": 1,
"cancel": 1,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Church Manager",
"select": 1,
"share": 1,
"submit": 1,
"write": 1
}
],
"row_format": "Dynamic",
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}

View File

@ -1,122 +1,131 @@
{
"actions": [],
"allow_rename": 1,
"autoname": "field:fund",
"creation": "2025-09-02 01:11:30.383380",
"description": "Financial funds of the church (i.e. General, Trust, etc).",
"doctype": "DocType",
"documentation": "/app/manual%3A-finances",
"engine": "InnoDB",
"field_order": [
"fund",
"description",
"column_break_ojjy",
"start_date",
"end_date",
"balance",
"section_break_xcgh",
"transactions"
],
"fields": [
{
"fieldname": "fund",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Name",
"reqd": 1,
"unique": 1
},
{
"allow_in_quick_entry": 1,
"fieldname": "description",
"fieldtype": "Small Text",
"in_preview": 1,
"label": "Description"
},
{
"fieldname": "column_break_ojjy",
"fieldtype": "Column Break"
},
{
"allow_in_quick_entry": 1,
"fieldname": "start_date",
"fieldtype": "Date",
"in_preview": 1,
"label": "Start Date"
},
{
"allow_in_quick_entry": 1,
"fieldname": "end_date",
"fieldtype": "Date",
"in_preview": 1,
"label": "End Date"
},
{
"fieldname": "balance",
"fieldtype": "Currency",
"in_preview": 1,
"label": "Balance"
},
{
"fieldname": "section_break_xcgh",
"fieldtype": "Section Break"
},
{
"fieldname": "transactions",
"fieldtype": "Table",
"label": "Transactions",
"options": "Financial Transaction"
}
],
"grid_page_length": 50,
"index_web_pages_for_search": 1,
"links": [
{
"link_doctype": "Collection",
"link_fieldname": "fund",
"table_fieldname": "donations"
}
],
"modified": "2026-03-04 21:36:25.539414",
"modified_by": "Administrator",
"module": "Church Finances",
"name": "Fund",
"naming_rule": "By fieldname",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Church Manager",
"select": 1,
"share": 1,
"write": 1
}
],
"quick_entry": 1,
"row_format": "Dynamic",
"show_preview_popup": 1,
"show_title_field_in_link": 1,
"sort_field": "modified",
"sort_order": "DESC",
"states": [],
"title_field": "fund",
"track_changes": 1
}
"actions": [],
"allow_rename": 1,
"autoname": "format:FUND-{####}",
"creation": "2025-09-02 01:11:30.383380",
"description": "Financial funds of the church (i.e. General, Trust, etc).",
"doctype": "DocType",
"documentation": "/app/manual%3A-finances",
"engine": "InnoDB",
"field_order": [
"church",
"fund",
"description",
"column_break_ojjy",
"start_date",
"end_date",
"balance",
"section_break_xcgh",
"transactions"
],
"fields": [
{
"fieldname": "church",
"fieldtype": "Link",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Church",
"options": "Church",
"search_index": 1
},
{
"fieldname": "fund",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Name",
"reqd": 1
},
{
"allow_in_quick_entry": 1,
"fieldname": "description",
"fieldtype": "Small Text",
"in_preview": 1,
"label": "Description"
},
{
"fieldname": "column_break_ojjy",
"fieldtype": "Column Break"
},
{
"allow_in_quick_entry": 1,
"fieldname": "start_date",
"fieldtype": "Date",
"in_preview": 1,
"label": "Start Date"
},
{
"allow_in_quick_entry": 1,
"fieldname": "end_date",
"fieldtype": "Date",
"in_preview": 1,
"label": "End Date"
},
{
"fieldname": "balance",
"fieldtype": "Currency",
"in_preview": 1,
"label": "Balance"
},
{
"fieldname": "section_break_xcgh",
"fieldtype": "Section Break"
},
{
"fieldname": "transactions",
"fieldtype": "Table",
"label": "Transactions",
"options": "Financial Transaction"
}
],
"grid_page_length": 50,
"index_web_pages_for_search": 1,
"links": [
{
"link_doctype": "Collection",
"link_fieldname": "fund",
"table_fieldname": "donations"
}
],
"modified": "2026-03-04 21:36:25.539414",
"modified_by": "Administrator",
"module": "Church Finances",
"name": "Fund",
"naming_rule": "Expression",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Church Manager",
"select": 1,
"share": 1,
"write": 1
}
],
"quick_entry": 1,
"row_format": "Dynamic",
"show_preview_popup": 1,
"show_title_field_in_link": 1,
"sort_field": "modified",
"sort_order": "DESC",
"states": [],
"title_field": "fund",
"track_changes": 1
}

View File

@ -1,139 +1,149 @@
{
"actions": [],
"allow_rename": 1,
"autoname": "format:{from_fund} to {to_fund} - {date}",
"creation": "2025-10-09 23:26:05.829776",
"description": "A financial currency transfer between two `Fund`s",
"doctype": "DocType",
"documentation": "/app/manual%3A-finances",
"engine": "InnoDB",
"field_order": [
"section_break_ev5b",
"from_fund",
"to_fund",
"column_break_qjba",
"amount",
"date",
"amended_from",
"section_break_wqbf",
"notes"
],
"fields": [
{
"fieldname": "section_break_ev5b",
"fieldtype": "Section Break"
},
{
"allow_in_quick_entry": 1,
"fieldname": "from_fund",
"fieldtype": "Link",
"in_filter": 1,
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "From Fund",
"options": "Fund",
"reqd": 1
},
{
"allow_in_quick_entry": 1,
"fieldname": "to_fund",
"fieldtype": "Link",
"in_filter": 1,
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "To Fund",
"options": "Fund",
"reqd": 1
},
{
"allow_in_quick_entry": 1,
"fieldname": "amount",
"fieldtype": "Currency",
"in_list_view": 1,
"in_preview": 1,
"label": "Amount",
"reqd": 1
},
{
"fieldname": "notes",
"fieldtype": "Small Text",
"in_list_view": 1,
"in_preview": 1,
"label": "Notes"
},
{
"fieldname": "amended_from",
"fieldtype": "Link",
"label": "Amended From",
"no_copy": 1,
"options": "Fund Transfer",
"print_hide": 1,
"read_only": 1,
"search_index": 1
},
{
"fieldname": "column_break_qjba",
"fieldtype": "Column Break"
},
{
"fieldname": "section_break_wqbf",
"fieldtype": "Section Break"
},
{
"default": "Now",
"fieldname": "date",
"fieldtype": "Datetime",
"in_list_view": 1,
"in_preview": 1,
"label": "Date",
"reqd": 1
}
],
"grid_page_length": 50,
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
"modified": "2025-11-13 23:57:45.954418",
"modified_by": "Administrator",
"module": "Church Finances",
"name": "Fund Transfer",
"naming_rule": "Expression",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"submit": 1,
"write": 1
},
{
"amend": 1,
"cancel": 1,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Church Manager",
"select": 1,
"share": 1,
"submit": 1,
"write": 1
}
],
"row_format": "Dynamic",
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}
"actions": [],
"allow_rename": 1,
"autoname": "format:{from_fund} to {to_fund} - {date}",
"creation": "2025-10-09 23:26:05.829776",
"description": "A financial currency transfer between two `Fund`s",
"doctype": "DocType",
"documentation": "/app/manual%3A-finances",
"engine": "InnoDB",
"field_order": [
"church",
"section_break_ev5b",
"from_fund",
"to_fund",
"column_break_qjba",
"amount",
"date",
"amended_from",
"section_break_wqbf",
"notes"
],
"fields": [
{
"fieldname": "church",
"fieldtype": "Link",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Church",
"options": "Church",
"search_index": 1
},
{
"fieldname": "section_break_ev5b",
"fieldtype": "Section Break"
},
{
"allow_in_quick_entry": 1,
"fieldname": "from_fund",
"fieldtype": "Link",
"in_filter": 1,
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "From Fund",
"options": "Fund",
"reqd": 1
},
{
"allow_in_quick_entry": 1,
"fieldname": "to_fund",
"fieldtype": "Link",
"in_filter": 1,
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "To Fund",
"options": "Fund",
"reqd": 1
},
{
"allow_in_quick_entry": 1,
"fieldname": "amount",
"fieldtype": "Currency",
"in_list_view": 1,
"in_preview": 1,
"label": "Amount",
"reqd": 1
},
{
"fieldname": "notes",
"fieldtype": "Small Text",
"in_list_view": 1,
"in_preview": 1,
"label": "Notes"
},
{
"fieldname": "amended_from",
"fieldtype": "Link",
"label": "Amended From",
"no_copy": 1,
"options": "Fund Transfer",
"print_hide": 1,
"read_only": 1,
"search_index": 1
},
{
"fieldname": "column_break_qjba",
"fieldtype": "Column Break"
},
{
"fieldname": "section_break_wqbf",
"fieldtype": "Section Break"
},
{
"default": "Now",
"fieldname": "date",
"fieldtype": "Datetime",
"in_list_view": 1,
"in_preview": 1,
"label": "Date",
"reqd": 1
}
],
"grid_page_length": 50,
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
"modified": "2025-11-13 23:57:45.954418",
"modified_by": "Administrator",
"module": "Church Finances",
"name": "Fund Transfer",
"naming_rule": "Expression",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"submit": 1,
"write": 1
},
{
"amend": 1,
"cancel": 1,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Church Manager",
"select": 1,
"share": 1,
"submit": 1,
"write": 1
}
],
"row_format": "Dynamic",
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}

View File

@ -26,10 +26,9 @@
"name": "Collection Bank Reconciliation",
"owner": "Administrator",
"prepared_report": 0,
"query": "SELECT\n parent as \"Collection\", \n fund as \"Fund\", \n person as \"Person\", \n payment_type as \"Payment Type\", \n check_number as \"Check #\", \n sum(amount) as \"Amount\", \n notes as \"Notes\"\nFROM `tabDonation`\nWHERE parent = %(parent_filter)s\nGROUP By check_number;",
"ref_doctype": "Collection",
"report_name": "Collection Bank Reconciliation",
"report_type": "Query Report",
"report_type": "Script Report",
"roles": [
{
"role": "System Manager"
@ -39,4 +38,4 @@
}
],
"timeout": 0
}
}

View File

@ -0,0 +1,50 @@
import frappe
def execute(filters=None):
return get_columns(), get_data(filters)
def get_columns():
return [
{"fieldname": "collection", "fieldtype": "Link", "label": "Collection", "options": "Collection", "width": 180},
{"fieldname": "fund", "fieldtype": "Data", "label": "Fund", "width": 150},
{"fieldname": "person", "fieldtype": "Link", "label": "Person", "options": "Person", "width": 150},
{"fieldname": "payment_type", "fieldtype": "Data", "label": "Payment Type", "width": 120},
{"fieldname": "check_number", "fieldtype": "Data", "label": "Check #", "width": 100},
{"fieldname": "amount", "fieldtype": "Currency", "label": "Amount", "width": 120},
{"fieldname": "notes", "fieldtype": "Data", "label": "Notes", "width": 200},
]
def get_data(filters):
filters = filters or {}
church_condition = ""
values = {"parent_filter": filters.get("parent_filter")}
if not frappe.has_role("System Manager"):
church_condition = """AND `tabCollection`.church IN (
SELECT for_value FROM `tabUser Permission`
WHERE user = %(user)s AND allow = 'Church'
)"""
values["user"] = frappe.session.user
return frappe.db.sql(
f"""
SELECT
`tabDonation`.parent as collection,
`tabDonation`.fund,
`tabDonation`.person,
`tabDonation`.payment_type,
`tabDonation`.check_number,
sum(`tabDonation`.amount) as amount,
`tabDonation`.notes
FROM `tabDonation`
INNER JOIN `tabCollection` ON `tabCollection`.name = `tabDonation`.parent
WHERE `tabDonation`.parent = %(parent_filter)s
{church_condition}
GROUP BY check_number
""",
values,
as_dict=True,
)

View File

@ -30,10 +30,9 @@
"name": "Fund Balances",
"owner": "Administrator",
"prepared_report": 0,
"query": "SELECT fund, balance\nFROM `tabFund`;",
"ref_doctype": "Fund",
"report_name": "Fund Balances",
"report_type": "Query Report",
"report_type": "Script Report",
"roles": [
{
"role": "Church User"
@ -43,4 +42,4 @@
}
],
"timeout": 0
}
}

View File

@ -0,0 +1,35 @@
import frappe
def execute(filters=None):
return get_columns(), get_data()
def get_columns():
return [
{"fieldname": "fund", "fieldtype": "Data", "label": "Fund", "width": 200},
{"fieldname": "balance", "fieldtype": "Currency", "label": "Balance", "width": 150},
]
def get_data():
church_condition = ""
values = {}
if not frappe.has_role("System Manager"):
church_condition = """AND church IN (
SELECT for_value FROM `tabUser Permission`
WHERE user = %(user)s AND allow = 'Church'
)"""
values["user"] = frappe.session.user
return frappe.db.sql(
f"""
SELECT fund, balance
FROM `tabFund`
WHERE 1=1
{church_condition}
""",
values,
as_dict=True,
)

View File

@ -60,10 +60,9 @@
"name": "Fund Transactions",
"owner": "Administrator",
"prepared_report": 0,
"query": "SELECT \n cf.fund, \n ft.amount, \n ft.notes, \n ft.creation\nFROM \n `tabFund` cf \nINNER JOIN \n `tabFinancial Transaction` ft ON ft.parent = cf.name \nWHERE \n ft.parenttype = 'Fund'\n AND (%(from_date)s IS NULL OR DATE(ft.creation) >= %(from_date)s) \n AND (%(to_date)s IS NULL OR DATE(ft.creation) <= %(to_date)s) \nORDER BY\n cf.fund, ft.creation DESC",
"ref_doctype": "Fund",
"report_name": "Fund Transactions",
"report_type": "Query Report",
"report_type": "Script Report",
"roles": [
{
"role": "Church User"
@ -73,4 +72,4 @@
}
],
"timeout": 0
}
}

View File

@ -0,0 +1,49 @@
import frappe
def execute(filters=None):
return get_columns(), get_data(filters)
def get_columns():
return [
{"fieldname": "fund", "fieldtype": "Data", "label": "Fund", "width": 200},
{"fieldname": "amount", "fieldtype": "Currency", "label": "Amount", "width": 120},
{"fieldname": "notes", "fieldtype": "Data", "label": "Notes", "width": 300},
{"fieldname": "creation", "fieldtype": "Datetime", "label": "Date", "width": 150},
]
def get_data(filters):
filters = filters or {}
church_condition = ""
values = {
"from_date": filters.get("from_date"),
"to_date": filters.get("to_date"),
}
if not frappe.has_role("System Manager"):
church_condition = """AND cf.church IN (
SELECT for_value FROM `tabUser Permission`
WHERE user = %(user)s AND allow = 'Church'
)"""
values["user"] = frappe.session.user
return frappe.db.sql(
f"""
SELECT
cf.fund,
ft.amount,
ft.notes,
ft.creation
FROM `tabFund` cf
INNER JOIN `tabFinancial Transaction` ft ON ft.parent = cf.name
WHERE ft.parenttype = 'Fund'
AND (%(from_date)s IS NULL OR DATE(ft.creation) >= %(from_date)s)
AND (%(to_date)s IS NULL OR DATE(ft.creation) <= %(to_date)s)
{church_condition}
ORDER BY cf.fund, ft.creation DESC
""",
values,
as_dict=True,
)

View File

@ -60,10 +60,9 @@
"name": "Fund Transactions By Date",
"owner": "Administrator",
"prepared_report": 0,
"query": "SELECT \n cf.fund, \n ft.amount, \n ft.notes, \n ft.creation\nFROM \n `tabFund` cf \nINNER JOIN \n `tabFinancial Transaction` ft ON ft.parent = cf.name \nWHERE \n ft.parenttype = 'Fund'\n AND (%(from_date)s IS NULL OR DATE(ft.creation) >= %(from_date)s) \n AND (%(to_date)s IS NULL OR DATE(ft.creation) <= %(to_date)s) \nORDER BY\n cf.fund, ft.creation DESC",
"ref_doctype": "Fund",
"report_name": "Fund Transactions By Date",
"report_type": "Query Report",
"report_type": "Script Report",
"roles": [
{
"role": "Church User"
@ -73,4 +72,4 @@
}
],
"timeout": 0
}
}

View File

@ -0,0 +1,49 @@
import frappe
def execute(filters=None):
return get_columns(), get_data(filters)
def get_columns():
return [
{"fieldname": "fund", "fieldtype": "Data", "label": "Fund", "width": 200},
{"fieldname": "amount", "fieldtype": "Currency", "label": "Amount", "width": 120},
{"fieldname": "notes", "fieldtype": "Data", "label": "Notes", "width": 300},
{"fieldname": "creation", "fieldtype": "Datetime", "label": "Date", "width": 150},
]
def get_data(filters):
filters = filters or {}
church_condition = ""
values = {
"from_date": filters.get("from_date"),
"to_date": filters.get("to_date"),
}
if not frappe.has_role("System Manager"):
church_condition = """AND cf.church IN (
SELECT for_value FROM `tabUser Permission`
WHERE user = %(user)s AND allow = 'Church'
)"""
values["user"] = frappe.session.user
return frappe.db.sql(
f"""
SELECT
cf.fund,
ft.amount,
ft.notes,
ft.creation
FROM `tabFund` cf
INNER JOIN `tabFinancial Transaction` ft ON ft.parent = cf.name
WHERE ft.parenttype = 'Fund'
AND (%(from_date)s IS NULL OR DATE(ft.creation) >= %(from_date)s)
AND (%(to_date)s IS NULL OR DATE(ft.creation) <= %(to_date)s)
{church_condition}
ORDER BY cf.fund, ft.creation DESC
""",
values,
as_dict=True,
)

View File

@ -1,93 +1,103 @@
{
"actions": [],
"allow_rename": 1,
"autoname": "field:title",
"creation": "2025-09-17 21:36:27.516552",
"description": "Specific beliefs of the church",
"doctype": "DocType",
"documentation": "/app/manual%3A-foundations",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"title",
"belief_statement",
"bible_references",
"publish"
],
"fields": [
{
"fieldname": "title",
"fieldtype": "Data",
"in_filter": 1,
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Title",
"reqd": 1,
"unique": 1
},
{
"fieldname": "belief_statement",
"fieldtype": "Text Editor",
"in_list_view": 1,
"label": "Belief Statement",
"reqd": 1
},
{
"fieldname": "bible_references",
"fieldtype": "Table",
"label": "Bible References",
"options": "Belief Bible References"
},
{
"default": "0",
"description": "Display this belief on the public website.",
"fieldname": "publish",
"fieldtype": "Check",
"label": "Publish"
}
],
"grid_page_length": 50,
"index_web_pages_for_search": 1,
"links": [],
"modified": "2026-03-04 21:40:03.305159",
"modified_by": "Administrator",
"module": "Church Foundations",
"name": "Belief",
"naming_rule": "By fieldname",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Church Manager",
"select": 1,
"share": 1,
"write": 1
}
],
"row_format": "Dynamic",
"show_title_field_in_link": 1,
"sort_field": "modified",
"sort_order": "DESC",
"states": [],
"title_field": "title",
"track_changes": 1
}
"actions": [],
"allow_rename": 1,
"autoname": "field:title",
"creation": "2025-09-17 21:36:27.516552",
"description": "Specific beliefs of the church",
"doctype": "DocType",
"documentation": "/app/manual%3A-foundations",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"church",
"title",
"belief_statement",
"bible_references",
"publish"
],
"fields": [
{
"fieldname": "church",
"fieldtype": "Link",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Church",
"options": "Church",
"search_index": 1
},
{
"fieldname": "title",
"fieldtype": "Data",
"in_filter": 1,
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Title",
"reqd": 1,
"unique": 1
},
{
"fieldname": "belief_statement",
"fieldtype": "Text Editor",
"in_list_view": 1,
"label": "Belief Statement",
"reqd": 1
},
{
"fieldname": "bible_references",
"fieldtype": "Table",
"label": "Bible References",
"options": "Belief Bible References"
},
{
"default": "0",
"description": "Display this belief on the public website.",
"fieldname": "publish",
"fieldtype": "Check",
"label": "Publish"
}
],
"grid_page_length": 50,
"index_web_pages_for_search": 1,
"links": [],
"modified": "2026-03-04 21:40:03.305159",
"modified_by": "Administrator",
"module": "Church Foundations",
"name": "Belief",
"naming_rule": "By fieldname",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Church Manager",
"select": 1,
"share": 1,
"write": 1
}
],
"row_format": "Dynamic",
"show_title_field_in_link": 1,
"sort_field": "modified",
"sort_order": "DESC",
"states": [],
"title_field": "title",
"track_changes": 1
}

View File

@ -0,0 +1,163 @@
{
"actions": [],
"allow_import": 1,
"allow_rename": 1,
"autoname": "field:church_name",
"creation": "2025-09-17 21:10:06.782386",
"default_view": "Tree",
"description": "A church or church branch.",
"doctype": "DocType",
"engine": "InnoDB",
"field_order": [
"church_name",
"legal_name",
"founding_date",
"column_break_rmsm",
"is_group",
"parent_church",
"address",
"default_bible_translation",
"mission_statement",
"section_break_nxne",
"about",
"hidden_fields_section",
"lft",
"rgt",
"old_parent"
],
"fields": [
{
"fieldname": "church_name",
"fieldtype": "Data",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Name",
"reqd": 1
},
{
"fieldname": "legal_name",
"fieldtype": "Data",
"label": "Legal Name"
},
{
"fieldname": "founding_date",
"fieldtype": "Date",
"label": "Founding Date"
},
{
"fieldname": "column_break_rmsm",
"fieldtype": "Column Break"
},
{
"default": "0",
"description": "Check this if other churches are grouped under this one.",
"fieldname": "is_group",
"fieldtype": "Check",
"label": "Is Group"
},
{
"description": "If this church is a branch of another, select the parent here.",
"fieldname": "parent_church",
"fieldtype": "Link",
"ignore_user_permissions": 1,
"label": "Parent Church",
"options": "Church"
},
{
"fieldname": "address",
"fieldtype": "Link",
"label": "Address",
"options": "Address"
},
{
"fieldname": "default_bible_translation",
"fieldtype": "Link",
"label": "Default Bible Translation",
"options": "Bible Translation"
},
{
"fieldname": "mission_statement",
"fieldtype": "Small Text",
"label": "Mission Statement"
},
{
"fieldname": "section_break_nxne",
"fieldtype": "Section Break"
},
{
"description": "A short description of the church. By default, this is used on the 'About Us' webpage.",
"fieldname": "about",
"fieldtype": "Text Editor",
"label": "About"
},
{
"fieldname": "hidden_fields_section",
"fieldtype": "Section Break",
"hidden": 1,
"label": "Hidden Fields"
},
{
"fieldname": "lft",
"fieldtype": "Int",
"hidden": 1,
"label": "Left",
"no_copy": 1,
"read_only": 1
},
{
"fieldname": "rgt",
"fieldtype": "Int",
"hidden": 1,
"label": "Right",
"no_copy": 1,
"read_only": 1
},
{
"fieldname": "old_parent",
"fieldtype": "Link",
"label": "Old Parent",
"options": "Church"
}
],
"grid_page_length": 50,
"index_web_pages_for_search": 1,
"is_tree": 1,
"links": [],
"modified": "2025-11-15 22:53:46.638825",
"modified_by": "Administrator",
"module": "Church Foundations",
"name": "Church",
"naming_rule": "By fieldname",
"nsm_parent_field": "parent_church",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"print": 1,
"read": 1,
"role": "System Manager",
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"print": 1,
"read": 1,
"role": "Church Manager",
"select": 1,
"share": 1,
"write": 1
}
],
"quick_entry": 1,
"row_format": "Dynamic",
"sort_field": "modified",
"sort_order": "DESC",
"states": [],
"title_field": "church_name",
"track_changes": 1
}

View File

@ -1,9 +1,8 @@
# Copyright (c) 2025, meichthys and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class Information(Document):
class Church(Document):
pass

View File

@ -0,0 +1,9 @@
# Copyright (c) 2025, meichthys and Contributors
# See license.txt For license information
import frappe
from frappe.tests import IntegrationTestCase
class TestChurch(IntegrationTestCase):
pass

View File

@ -1,8 +0,0 @@
// Copyright (c) 2025, meichthys and contributors
// For license information, please see license.txt
// frappe.ui.form.on("Information", {
// refresh(frm) {
// },
// });

View File

@ -1,99 +0,0 @@
{
"actions": [],
"allow_rename": 1,
"creation": "2025-09-17 21:10:06.782386",
"description": "Static Information related to the church",
"doctype": "DocType",
"documentation": "/app/manual%3A-foundations",
"engine": "InnoDB",
"field_order": [
"legal_name",
"founding_date",
"default_bible_translation",
"column_break_rmsm",
"address",
"mission_statement",
"section_break_nxne",
"about"
],
"fields": [
{
"fieldname": "legal_name",
"fieldtype": "Data",
"label": "Legal Name"
},
{
"fieldname": "founding_date",
"fieldtype": "Date",
"label": "Founding Date"
},
{
"fieldname": "column_break_rmsm",
"fieldtype": "Column Break"
},
{
"fieldname": "address",
"fieldtype": "Link",
"label": "Address",
"options": "Address"
},
{
"fieldname": "mission_statement",
"fieldtype": "Small Text",
"label": "Mission Statement"
},
{
"description": "A short description of the church. By default, this is used on the 'About Us' webpage.",
"fieldname": "about",
"fieldtype": "Text Editor",
"label": "About"
},
{
"fieldname": "section_break_nxne",
"fieldtype": "Section Break"
},
{
"fieldname": "default_bible_translation",
"fieldtype": "Link",
"label": "Default Bible Translation",
"options": "Bible Translation"
}
],
"grid_page_length": 50,
"index_web_pages_for_search": 1,
"issingle": 1,
"links": [],
"modified": "2025-11-15 22:53:46.638825",
"modified_by": "Administrator",
"module": "Church Foundations",
"name": "Information",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"print": 1,
"read": 1,
"role": "System Manager",
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"print": 1,
"read": 1,
"role": "Church Manager",
"select": 1,
"share": 1,
"write": 1
}
],
"row_format": "Dynamic",
"sort_field": "modified",
"sort_order": "DESC",
"states": [],
"track_changes": 1
}

View File

@ -1,9 +0,0 @@
# Copyright (c) 2025, meichthys and Contributors
# See license.txt
# import frappe
from frappe.tests.utils import FrappeTestCase
class TestInformation(FrappeTestCase):
pass

View File

@ -25,9 +25,9 @@
{
"hidden": 0,
"is_query_report": 0,
"label": "Information",
"label": "Churches",
"link_count": 0,
"link_to": "Information",
"link_to": "Church",
"link_type": "DocType",
"onboard": 0,
"type": "Link"

View File

@ -1,29 +1,29 @@
{
"charts": [],
"content": "[{\"id\":\"nnvMTG5Sl5\",\"type\":\"paragraph\",\"data\":{\"text\":\"<span class=\\\"h1\\\" style=\\\"font-weight: normal;\\\">\ud83d\udcc3Foundations Manual</span>\",\"col\":12}},{\"id\":\"B-CtTCmVDX\",\"type\":\"paragraph\",\"data\":{\"text\":\"<span style=\\\"font-weight: normal;\\\">The foundations module contains features related to founding and core beliefs/principles of the church.</span>\",\"col\":12}},{\"id\":\"gWj0UvVJC8\",\"type\":\"paragraph\",\"data\":{\"text\":\"<span class=\\\"h2\\\">\u2139\ufe0fInformation</span>\",\"col\":12}},{\"id\":\"on10zXJdTa\",\"type\":\"paragraph\",\"data\":{\"text\":\"The <a href=\\\"/app/church-information\\\">Information</a>&nbsp;page contains foundational information for the church.\",\"col\":12}},{\"id\":\"i1lPTPnBNf\",\"type\":\"paragraph\",\"data\":{\"text\":\"When adding <a href=\\\"/app/church-information\\\">church information</a>, note the following:<br>- This information may be displayed on the public website (i.e in the footer, or on the 'about' page).\",\"col\":12}},{\"id\":\"w8oEjl0tNc\",\"type\":\"paragraph\",\"data\":{\"text\":\"<span class=\\\"h2\\\" style=\\\"font-weight: normal;\\\">\ud83d\udcd4Beliefs</span>\",\"col\":12}},{\"id\":\"rx8sNKF0oc\",\"type\":\"paragraph\",\"data\":{\"text\":\"Beliefs are the foundational principles the church stands for.\",\"col\":12}},{\"id\":\"nVhOr1yDL4\",\"type\":\"paragraph\",\"data\":{\"text\":\"When adding <a href=\\\"/app/church-belief\\\">church beliefs</a>, note the following:<br>- For each belief, supporting&nbsp;<a href=\\\"/app/church-bible-reference\\\">Bible references</a> can be added.\",\"col\":12}}]",
"creation": "2025-10-26 22:35:59.512658",
"custom_blocks": [],
"docstatus": 0,
"doctype": "Workspace",
"for_user": "",
"hide_custom": 0,
"icon": "help",
"idx": 0,
"indicator_color": "green",
"is_hidden": 0,
"label": "Manual: Foundations",
"links": [],
"modified": "2026-03-01 23:53:34.041257",
"modified_by": "Administrator",
"module": "Church Foundations",
"name": "Manual: Foundations",
"number_cards": [],
"owner": "Administrator",
"parent_page": "Foundations",
"public": 1,
"quick_lists": [],
"roles": [],
"sequence_id": 9.0,
"shortcuts": [],
"title": "Manual: Foundations"
}
"charts": [],
"content": "[{\"id\":\"nnvMTG5Sl5\",\"type\":\"paragraph\",\"data\":{\"text\":\"<span class=\\\"h1\\\" style=\\\"font-weight: normal;\\\">\ud83d\udcc3Foundations Manual</span>\",\"col\":12}},{\"id\":\"B-CtTCmVDX\",\"type\":\"paragraph\",\"data\":{\"text\":\"<span style=\\\"font-weight: normal;\\\">The foundations module contains features related to founding and core beliefs/principles of the church.</span>\",\"col\":12}},{\"id\":\"Ch1a\",\"type\":\"paragraph\",\"data\":{\"text\":\"<span class=\\\"h2\\\" style=\\\"font-weight: normal;\\\">\u26ea Churches</span>\",\"col\":12}},{\"id\":\"Ch1b\",\"type\":\"paragraph\",\"data\":{\"text\":\"The <a href=\\\"/app/church\\\">Churches</a> list shows the churches and/or branches of a parent church. Churches can be organized in a hierarchical order: a parent church can have branches (also called churches).\",\"col\":12}},{\"id\":\"Ch1c\",\"type\":\"paragraph\",\"data\":{\"text\":\"Church-specific entities (Person, Family, Fund, Collection, etc.) have a Church field that is used to group entities by church\",\"col\":12}},{\"id\":\"Ch1d\",\"type\":\"paragraph\",\"data\":{\"text\":\"<span class=\\\"h3\\\">Multi-Campus Access</span>\",\"col\":12}},{\"id\":\"Ch1e\",\"type\":\"paragraph\",\"data\":{\"text\":\"User access is automatically limited to the church that is defined on the <a href=\\\"/app/user\\\">User</a> document:<br>- <b>System Manager</b>: sees all records across all churches (no restriction).<br>- <b>Church Manager</b> / <b>Church User</b>: sees only records belonging to their assigned church.\",\"col\":12}},{\"id\":\"Ch1f\",\"type\":\"paragraph\",\"data\":{\"text\":\"To assign a user to a church:<br>1. Open the <a href=\\\"/app/user\\\">User</a> record (with System Manager permissions).<br>2. Set the <b>Church</b> field to the desired church.<br>3. Save the user. A User Permission is automatically created to limit the user's access to the selected church documents.\",\"col\":12}},{\"id\":\"w8oEjl0tNc\",\"type\":\"paragraph\",\"data\":{\"text\":\"<span class=\\\"h2\\\" style=\\\"font-weight: normal;\\\">\ud83d\udcd4Beliefs</span>\",\"col\":12}},{\"id\":\"rx8sNKF0oc\",\"type\":\"paragraph\",\"data\":{\"text\":\"Beliefs are the foundational principles the church stands for.\",\"col\":12}},{\"id\":\"nVhOr1yDL4\",\"type\":\"paragraph\",\"data\":{\"text\":\"When adding <a href=\\\"/app/church-belief\\\">church beliefs</a>, note the following:<br>- For each belief, supporting&nbsp;<a href=\\\"/app/church-bible-reference\\\">Bible references</a> can be added.\",\"col\":12}}]",
"creation": "2025-10-26 22:35:59.512658",
"custom_blocks": [],
"docstatus": 0,
"doctype": "Workspace",
"for_user": "",
"hide_custom": 0,
"icon": "help",
"idx": 0,
"indicator_color": "green",
"is_hidden": 0,
"label": "Manual: Foundations",
"links": [],
"modified": "2026-03-05 18:54:20.073921",
"modified_by": "Administrator",
"module": "Church Foundations",
"name": "Manual: Foundations",
"number_cards": [],
"owner": "Administrator",
"parent_page": "Foundations",
"public": 1,
"quick_lists": [],
"roles": [],
"sequence_id": 9.0,
"shortcuts": [],
"title": "Manual: Foundations"
}

View File

@ -1,178 +1,188 @@
{
"actions": [],
"allow_rename": 1,
"creation": "2025-08-31 23:40:34.324092",
"description": "Any kind of church gathering. This includes regular services as well as one-off events.",
"doctype": "DocType",
"documentation": "/app/manual%3A-ministries",
"engine": "InnoDB",
"field_order": [
"type",
"event_name",
"all_day",
"start_date",
"start_time",
"end_date",
"end_time",
"column_break_bkje",
"attendance_total",
"address",
"description",
"section_break_bkwy",
"schedule",
"section_break_dlpa",
"attendance"
],
"fields": [
{
"allow_in_quick_entry": 1,
"default": "0",
"fieldname": "all_day",
"fieldtype": "Check",
"label": "All-Day ?"
},
{
"fieldname": "column_break_bkje",
"fieldtype": "Column Break"
},
{
"allow_in_quick_entry": 1,
"fieldname": "event_name",
"fieldtype": "Data",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Name",
"reqd": 1
},
{
"allow_in_quick_entry": 1,
"fieldname": "type",
"fieldtype": "Link",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Type",
"options": "Event Type",
"reqd": 1,
"search_index": 1
},
{
"fieldname": "address",
"fieldtype": "Link",
"in_preview": 1,
"label": "Address",
"options": "Address"
},
{
"fieldname": "description",
"fieldtype": "Small Text",
"in_preview": 1,
"label": "Description"
},
{
"allow_in_quick_entry": 1,
"default": "Today",
"fieldname": "start_date",
"fieldtype": "Date",
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Start Date",
"reqd": 1
},
{
"allow_in_quick_entry": 1,
"depends_on": "eval:!doc.all_day",
"fieldname": "start_time",
"fieldtype": "Time",
"in_preview": 1,
"label": "Start Time",
"mandatory_depends_on": "eval:!doc.all_day"
},
{
"allow_in_quick_entry": 1,
"fieldname": "end_date",
"fieldtype": "Date",
"in_preview": 1,
"label": "End Date"
},
{
"allow_in_quick_entry": 1,
"depends_on": "eval:!doc.all_day",
"fieldname": "end_time",
"fieldtype": "Time",
"in_preview": 1,
"label": "End Time"
},
{
"fieldname": "section_break_dlpa",
"fieldtype": "Section Break"
},
{
"description": "'Person's who attended this event.",
"fieldname": "attendance",
"fieldtype": "Table",
"label": "Attendance",
"options": "Event Attendance"
},
{
"description": "Includes `Confirmed`, `Assumed` attendance.",
"fieldname": "attendance_total",
"fieldtype": "Int",
"label": "Attendance Total",
"read_only": 1
},
{
"fieldname": "section_break_bkwy",
"fieldtype": "Section Break"
},
{
"fieldname": "schedule",
"fieldtype": "Table",
"label": "Schedule",
"options": "Event Schedule"
}
],
"grid_page_length": 50,
"index_web_pages_for_search": 1,
"links": [],
"modified": "2025-11-15 22:56:41.992819",
"modified_by": "Administrator",
"module": "Church Ministries",
"name": "Function",
"naming_rule": "By script",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Church Manager",
"select": 1,
"share": 1,
"write": 1
}
],
"row_format": "Dynamic",
"show_preview_popup": 1,
"sort_field": "modified",
"sort_order": "DESC",
"states": [],
"track_changes": 1,
"track_views": 1
}
"actions": [],
"allow_rename": 1,
"creation": "2025-08-31 23:40:34.324092",
"description": "Any kind of church gathering. This includes regular services as well as one-off events.",
"doctype": "DocType",
"documentation": "/app/manual%3A-ministries",
"engine": "InnoDB",
"field_order": [
"church",
"type",
"event_name",
"all_day",
"start_date",
"start_time",
"end_date",
"end_time",
"column_break_bkje",
"attendance_total",
"address",
"description",
"section_break_bkwy",
"schedule",
"section_break_dlpa",
"attendance"
],
"fields": [
{
"fieldname": "church",
"fieldtype": "Link",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Church",
"options": "Church",
"search_index": 1
},
{
"allow_in_quick_entry": 1,
"default": "0",
"fieldname": "all_day",
"fieldtype": "Check",
"label": "All-Day ?"
},
{
"fieldname": "column_break_bkje",
"fieldtype": "Column Break"
},
{
"allow_in_quick_entry": 1,
"fieldname": "event_name",
"fieldtype": "Data",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Name",
"reqd": 1
},
{
"allow_in_quick_entry": 1,
"fieldname": "type",
"fieldtype": "Link",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Type",
"options": "Event Type",
"reqd": 1,
"search_index": 1
},
{
"fieldname": "address",
"fieldtype": "Link",
"in_preview": 1,
"label": "Address",
"options": "Address"
},
{
"fieldname": "description",
"fieldtype": "Small Text",
"in_preview": 1,
"label": "Description"
},
{
"allow_in_quick_entry": 1,
"default": "Today",
"fieldname": "start_date",
"fieldtype": "Date",
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Start Date",
"reqd": 1
},
{
"allow_in_quick_entry": 1,
"depends_on": "eval:!doc.all_day",
"fieldname": "start_time",
"fieldtype": "Time",
"in_preview": 1,
"label": "Start Time",
"mandatory_depends_on": "eval:!doc.all_day"
},
{
"allow_in_quick_entry": 1,
"fieldname": "end_date",
"fieldtype": "Date",
"in_preview": 1,
"label": "End Date"
},
{
"allow_in_quick_entry": 1,
"depends_on": "eval:!doc.all_day",
"fieldname": "end_time",
"fieldtype": "Time",
"in_preview": 1,
"label": "End Time"
},
{
"fieldname": "section_break_dlpa",
"fieldtype": "Section Break"
},
{
"description": "'Person's who attended this event.",
"fieldname": "attendance",
"fieldtype": "Table",
"label": "Attendance",
"options": "Event Attendance"
},
{
"description": "Includes `Confirmed`, `Assumed` attendance.",
"fieldname": "attendance_total",
"fieldtype": "Int",
"label": "Attendance Total",
"read_only": 1
},
{
"fieldname": "section_break_bkwy",
"fieldtype": "Section Break"
},
{
"fieldname": "schedule",
"fieldtype": "Table",
"label": "Schedule",
"options": "Event Schedule"
}
],
"grid_page_length": 50,
"index_web_pages_for_search": 1,
"links": [],
"modified": "2025-11-15 22:56:41.992819",
"modified_by": "Administrator",
"module": "Church Ministries",
"name": "Function",
"naming_rule": "By script",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Church Manager",
"select": 1,
"share": 1,
"write": 1
}
],
"row_format": "Dynamic",
"show_preview_popup": 1,
"sort_field": "modified",
"sort_order": "DESC",
"states": [],
"track_changes": 1,
"track_views": 1
}

View File

@ -16,10 +16,9 @@
"name": "Event Attendance",
"owner": "Administrator",
"prepared_report": 0,
"query": "SELECT parent as Event, count(person) as `Attendance Count`\nFROM `tabEvent Attendance`\nWHERE attendance_type in (\"Assumed\", \"Confirmed\")\nGROUP BY parent;\n",
"ref_doctype": "Function",
"report_name": "Event Attendance",
"report_type": "Query Report",
"report_type": "Script Report",
"roles": [
{
"role": "System Manager"
@ -32,4 +31,4 @@
}
],
"timeout": 0
}
}

View File

@ -0,0 +1,39 @@
import frappe
def execute(filters=None):
return get_columns(), get_data()
def get_columns():
return [
{"fieldname": "event", "fieldtype": "Link", "label": "Event", "options": "Function", "width": 200},
{"fieldname": "attendance_count", "fieldtype": "Int", "label": "Attendance Count", "width": 150},
]
def get_data():
church_condition = ""
values = {}
if not frappe.has_role("System Manager"):
church_condition = """AND `tabFunction`.church IN (
SELECT for_value FROM `tabUser Permission`
WHERE user = %(user)s AND allow = 'Church'
)"""
values["user"] = frappe.session.user
return frappe.db.sql(
f"""
SELECT
`tabEvent Attendance`.parent as event,
count(`tabEvent Attendance`.person) as attendance_count
FROM `tabEvent Attendance`
INNER JOIN `tabFunction` ON `tabFunction`.name = `tabEvent Attendance`.parent
WHERE `tabEvent Attendance`.attendance_type IN ('Assumed', 'Confirmed')
{church_condition}
GROUP BY `tabEvent Attendance`.parent
""",
values,
as_dict=True,
)

View File

@ -34,11 +34,10 @@
"name": "Function Count by Type",
"owner": "Administrator",
"prepared_report": 0,
"query": "SELECT type as Type, count(name) as Counts\nFROM `tabFunction`\nWHERE (start_date IS NULL OR end_date IS NULL OR date(start_date) BETWEEN %(start)s AND %(end)s)\nGROUP BY type;",
"ref_doctype": "Function",
"reference_report": "Functions by Type",
"report_name": "Function Count by Type",
"report_type": "Query Report",
"report_type": "Script Report",
"roles": [
{
"role": "System Manager"
@ -51,4 +50,4 @@
}
],
"timeout": 0
}
}

View File

@ -0,0 +1,40 @@
import frappe
def execute(filters=None):
return get_columns(), get_data(filters)
def get_columns():
return [
{"fieldname": "type", "fieldtype": "Data", "label": "Type", "width": 200},
{"fieldname": "counts", "fieldtype": "Int", "label": "Count", "width": 100},
]
def get_data(filters):
filters = filters or {}
church_condition = ""
values = {
"start": filters.get("start"),
"end": filters.get("end"),
}
if not frappe.has_role("System Manager"):
church_condition = """AND church IN (
SELECT for_value FROM `tabUser Permission`
WHERE user = %(user)s AND allow = 'Church'
)"""
values["user"] = frappe.session.user
return frappe.db.sql(
f"""
SELECT type as type, count(name) as counts
FROM `tabFunction`
WHERE (start_date IS NULL OR end_date IS NULL OR date(start_date) BETWEEN %(start)s AND %(end)s)
{church_condition}
GROUP BY type
""",
values,
as_dict=True,
)

View File

@ -1,255 +1,265 @@
{
"actions": [],
"allow_rename": 1,
"autoname": "format:Missionary {#}",
"creation": "2025-09-18 22:33:05.489158",
"description": "Missionaries of the church.",
"doctype": "DocType",
"documentation": "/app/doctype?module=Church+Missions",
"engine": "InnoDB",
"field_order": [
"section_break_oyuw",
"title",
"person",
"agency",
"mission_statement",
"publish",
"sensitive",
"column_break_vedu",
"country",
"email",
"mailing_address",
"physical_address",
"website",
"photo",
"support_section",
"support_start_date",
"support_end_date",
"column_break_esna",
"support_amount",
"support_frequency",
"section_break_appf",
"notes",
"section_break_qxbh",
"letters",
"related_documents"
],
"fields": [
{
"fieldname": "agency",
"fieldtype": "Link",
"in_filter": 1,
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Agency",
"options": "Missionary Agency",
"search_index": 1
},
{
"fieldname": "country",
"fieldtype": "Link",
"in_filter": 1,
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Country",
"options": "Country"
},
{
"fieldname": "mailing_address",
"fieldtype": "Link",
"label": "Mailing Address",
"options": "Address"
},
{
"fieldname": "physical_address",
"fieldtype": "Link",
"label": "Physical Address",
"options": "Address"
},
{
"fieldname": "column_break_vedu",
"fieldtype": "Column Break"
},
{
"fieldname": "section_break_qxbh",
"fieldtype": "Section Break"
},
{
"description": "Link related documents here (i.e. `Person`s, `Function`s, `Collection`s, etc.)",
"fieldname": "related_documents",
"fieldtype": "Table",
"label": "Related Documents",
"options": "Dynamic Link"
},
{
"depends_on": "eval:!doc.photo",
"fieldname": "photo",
"fieldtype": "Attach Image",
"label": "Photo"
},
{
"description": "Name of the Missionary (Person / Family / Organization)",
"fieldname": "title",
"fieldtype": "Data",
"in_filter": 1,
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Title",
"reqd": 1,
"unique": 1
},
{
"fieldname": "website",
"fieldtype": "Data",
"label": "Website",
"options": "URL"
},
{
"fieldname": "notes",
"fieldtype": "Text Editor",
"label": "Notes"
},
{
"fieldname": "letters",
"fieldtype": "Table",
"label": "Letters to the Church",
"options": "Letter"
},
{
"fieldname": "support_amount",
"fieldtype": "Currency",
"in_preview": 1,
"label": "Support Amount",
"non_negative": 1
},
{
"fieldname": "support_frequency",
"fieldtype": "Link",
"in_preview": 1,
"label": "Support Frequency",
"mandatory_depends_on": "eval: doc.support_amount>0;",
"options": "Missionary Support Frequency"
},
{
"fieldname": "email",
"fieldtype": "Data",
"in_preview": 1,
"label": "Email",
"options": "Email"
},
{
"description": "Link an associated `Person` (or primary contact person)",
"fieldname": "person",
"fieldtype": "Link",
"label": "Person",
"options": "Person",
"reqd": 1
},
{
"collapsible": 1,
"collapsible_depends_on": "eval:doc.notes",
"fieldname": "section_break_appf",
"fieldtype": "Section Break",
"label": "Notes"
},
{
"collapsible": 1,
"collapsible_depends_on": "eval:doc.support_amount>0",
"fieldname": "support_section",
"fieldtype": "Section Break",
"label": "Support"
},
{
"fieldname": "column_break_esna",
"fieldtype": "Column Break"
},
{
"fieldname": "mission_statement",
"fieldtype": "Small Text",
"label": "Mission Statement"
},
{
"fieldname": "support_start_date",
"fieldtype": "Date",
"in_filter": 1,
"in_preview": 1,
"label": "Support Start Date",
"mandatory_depends_on": "eval:doc.support_amount>0"
},
{
"fieldname": "support_end_date",
"fieldtype": "Date",
"label": "Support End Date"
},
{
"default": "0",
"description": "Display this missionary on the public website.",
"fieldname": "publish",
"fieldtype": "Check",
"in_filter": 1,
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Publish"
},
{
"default": "0",
"description": "Is this missionary information sensitive? (i.e. restricted country)",
"fieldname": "sensitive",
"fieldtype": "Check",
"label": "Sensitive"
},
{
"fieldname": "section_break_oyuw",
"fieldtype": "Section Break"
}
],
"grid_page_length": 50,
"image_field": "photo",
"index_web_pages_for_search": 1,
"links": [],
"modified": "2026-02-19 00:58:04.376350",
"modified_by": "Administrator",
"module": "Church Missions",
"name": "Missionary",
"naming_rule": "Expression",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Church Manager",
"select": 1,
"share": 1,
"write": 1
}
],
"row_format": "Dynamic",
"show_preview_popup": 1,
"show_title_field_in_link": 1,
"sort_field": "modified",
"sort_order": "DESC",
"states": [],
"title_field": "title",
"track_changes": 1
}
"actions": [],
"allow_rename": 1,
"autoname": "format:Missionary {#}",
"creation": "2025-09-18 22:33:05.489158",
"description": "Missionaries of the church.",
"doctype": "DocType",
"documentation": "/app/doctype?module=Church+Missions",
"engine": "InnoDB",
"field_order": [
"section_break_oyuw",
"church",
"title",
"person",
"agency",
"mission_statement",
"publish",
"sensitive",
"column_break_vedu",
"country",
"email",
"mailing_address",
"physical_address",
"website",
"photo",
"support_section",
"support_start_date",
"support_end_date",
"column_break_esna",
"support_amount",
"support_frequency",
"section_break_appf",
"notes",
"section_break_qxbh",
"letters",
"related_documents"
],
"fields": [
{
"fieldname": "church",
"fieldtype": "Link",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Church",
"options": "Church",
"search_index": 1
},
{
"fieldname": "agency",
"fieldtype": "Link",
"in_filter": 1,
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Agency",
"options": "Missionary Agency",
"search_index": 1
},
{
"fieldname": "country",
"fieldtype": "Link",
"in_filter": 1,
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Country",
"options": "Country"
},
{
"fieldname": "mailing_address",
"fieldtype": "Link",
"label": "Mailing Address",
"options": "Address"
},
{
"fieldname": "physical_address",
"fieldtype": "Link",
"label": "Physical Address",
"options": "Address"
},
{
"fieldname": "column_break_vedu",
"fieldtype": "Column Break"
},
{
"fieldname": "section_break_qxbh",
"fieldtype": "Section Break"
},
{
"description": "Link related documents here (i.e. `Person`s, `Function`s, `Collection`s, etc.)",
"fieldname": "related_documents",
"fieldtype": "Table",
"label": "Related Documents",
"options": "Dynamic Link"
},
{
"depends_on": "eval:!doc.photo",
"fieldname": "photo",
"fieldtype": "Attach Image",
"label": "Photo"
},
{
"description": "Name of the Missionary (Person / Family / Organization)",
"fieldname": "title",
"fieldtype": "Data",
"in_filter": 1,
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Title",
"reqd": 1,
"unique": 1
},
{
"fieldname": "website",
"fieldtype": "Data",
"label": "Website",
"options": "URL"
},
{
"fieldname": "notes",
"fieldtype": "Text Editor",
"label": "Notes"
},
{
"fieldname": "letters",
"fieldtype": "Table",
"label": "Letters to the Church",
"options": "Letter"
},
{
"fieldname": "support_amount",
"fieldtype": "Currency",
"in_preview": 1,
"label": "Support Amount",
"non_negative": 1
},
{
"fieldname": "support_frequency",
"fieldtype": "Link",
"in_preview": 1,
"label": "Support Frequency",
"mandatory_depends_on": "eval: doc.support_amount>0;",
"options": "Missionary Support Frequency"
},
{
"fieldname": "email",
"fieldtype": "Data",
"in_preview": 1,
"label": "Email",
"options": "Email"
},
{
"description": "Link an associated `Person` (or primary contact person)",
"fieldname": "person",
"fieldtype": "Link",
"label": "Person",
"options": "Person",
"reqd": 1
},
{
"collapsible": 1,
"collapsible_depends_on": "eval:doc.notes",
"fieldname": "section_break_appf",
"fieldtype": "Section Break",
"label": "Notes"
},
{
"collapsible": 1,
"collapsible_depends_on": "eval:doc.support_amount>0",
"fieldname": "support_section",
"fieldtype": "Section Break",
"label": "Support"
},
{
"fieldname": "column_break_esna",
"fieldtype": "Column Break"
},
{
"fieldname": "mission_statement",
"fieldtype": "Small Text",
"label": "Mission Statement"
},
{
"fieldname": "support_start_date",
"fieldtype": "Date",
"in_filter": 1,
"in_preview": 1,
"label": "Support Start Date",
"mandatory_depends_on": "eval:doc.support_amount>0"
},
{
"fieldname": "support_end_date",
"fieldtype": "Date",
"label": "Support End Date"
},
{
"default": "0",
"description": "Display this missionary on the public website.",
"fieldname": "publish",
"fieldtype": "Check",
"in_filter": 1,
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Publish"
},
{
"default": "0",
"description": "Is this missionary information sensitive? (i.e. restricted country)",
"fieldname": "sensitive",
"fieldtype": "Check",
"label": "Sensitive"
},
{
"fieldname": "section_break_oyuw",
"fieldtype": "Section Break"
}
],
"grid_page_length": 50,
"image_field": "photo",
"index_web_pages_for_search": 1,
"links": [],
"modified": "2026-02-19 00:58:04.376350",
"modified_by": "Administrator",
"module": "Church Missions",
"name": "Missionary",
"naming_rule": "Expression",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Church Manager",
"select": 1,
"share": 1,
"write": 1
}
],
"row_format": "Dynamic",
"show_preview_popup": 1,
"show_title_field_in_link": 1,
"sort_field": "modified",
"sort_order": "DESC",
"states": [],
"title_field": "title",
"track_changes": 1
}

View File

@ -61,10 +61,9 @@
"name": "Missionary Letters",
"owner": "Administrator",
"prepared_report": 0,
"query": "SELECT parent, date, share_with_church, shared_date, is_private, file, content \nFROM `tabLetter`\nWHERE `tabLetter`.parenttype = \"Missionary\"\nORDER BY parent",
"ref_doctype": "Missionary",
"report_name": "Missionary Letters",
"report_type": "Query Report",
"report_type": "Script Report",
"roles": [
{
"role": "Church Manager"
@ -74,4 +73,4 @@
}
],
"timeout": 0
}
}

View File

@ -0,0 +1,49 @@
import frappe
def execute(filters=None):
return get_columns(), get_data()
def get_columns():
return [
{"fieldname": "parent", "fieldtype": "Link", "label": "From", "options": "Missionary", "width": 150},
{"fieldname": "date", "fieldtype": "Date", "label": "Date", "width": 100},
{"fieldname": "share_with_church", "fieldtype": "Check", "label": "Share w/ Church?", "width": 120},
{"fieldname": "shared_date", "fieldtype": "Date", "label": "Shared Date", "width": 100},
{"fieldname": "is_private", "fieldtype": "Check", "label": "Is Private?", "width": 100},
{"fieldname": "file", "fieldtype": "Link", "label": "File", "options": "File", "width": 150},
{"fieldname": "content", "fieldtype": "Data", "label": "Content", "width": 300},
]
def get_data():
church_condition = ""
values = {}
if not frappe.has_role("System Manager"):
church_condition = """AND `tabMissionary`.church IN (
SELECT for_value FROM `tabUser Permission`
WHERE user = %(user)s AND allow = 'Church'
)"""
values["user"] = frappe.session.user
return frappe.db.sql(
f"""
SELECT
`tabLetter`.parent,
`tabLetter`.date,
`tabLetter`.share_with_church,
`tabLetter`.shared_date,
`tabLetter`.is_private,
`tabLetter`.file,
`tabLetter`.content
FROM `tabLetter`
INNER JOIN `tabMissionary` ON `tabMissionary`.name = `tabLetter`.parent
WHERE `tabLetter`.parenttype = 'Missionary'
{church_condition}
ORDER BY `tabLetter`.parent
""",
values,
as_dict=True,
)

View File

@ -61,10 +61,9 @@
"name": "Missionary Letters Not Yet Read",
"owner": "Administrator",
"prepared_report": 0,
"query": "SELECT parent, date, share_with_church, shared_date, is_private, file, content \nFROM `tabLetter` \nWHERE `tabLetter`.parenttype=\"Missionary\" AND share_with_church=1 AND shared_date IS NULL\nORDER BY parent",
"ref_doctype": "Missionary",
"report_name": "Missionary Letters Not Yet Read",
"report_type": "Query Report",
"report_type": "Script Report",
"roles": [
{
"role": "Church Manager"
@ -74,4 +73,4 @@
}
],
"timeout": 0
}
}

View File

@ -0,0 +1,51 @@
import frappe
def execute(filters=None):
return get_columns(), get_data()
def get_columns():
return [
{"fieldname": "parent", "fieldtype": "Link", "label": "From", "options": "Missionary", "width": 150},
{"fieldname": "date", "fieldtype": "Date", "label": "Date", "width": 100},
{"fieldname": "share_with_church", "fieldtype": "Check", "label": "Share w/ Church?", "width": 120},
{"fieldname": "shared_date", "fieldtype": "Date", "label": "Shared Date", "width": 100},
{"fieldname": "is_private", "fieldtype": "Check", "label": "Is Private?", "width": 100},
{"fieldname": "file", "fieldtype": "Link", "label": "File", "options": "File", "width": 150},
{"fieldname": "content", "fieldtype": "Data", "label": "Content", "width": 300},
]
def get_data():
church_condition = ""
values = {}
if not frappe.has_role("System Manager"):
church_condition = """AND `tabMissionary`.church IN (
SELECT for_value FROM `tabUser Permission`
WHERE user = %(user)s AND allow = 'Church'
)"""
values["user"] = frappe.session.user
return frappe.db.sql(
f"""
SELECT
`tabLetter`.parent,
`tabLetter`.date,
`tabLetter`.share_with_church,
`tabLetter`.shared_date,
`tabLetter`.is_private,
`tabLetter`.file,
`tabLetter`.content
FROM `tabLetter`
INNER JOIN `tabMissionary` ON `tabMissionary`.name = `tabLetter`.parent
WHERE `tabLetter`.parenttype = 'Missionary'
AND `tabLetter`.share_with_church = 1
AND `tabLetter`.shared_date IS NULL
{church_condition}
ORDER BY `tabLetter`.parent
""",
values,
as_dict=True,
)

View File

@ -1,105 +1,115 @@
{
"actions": [],
"allow_import": 1,
"allow_rename": 1,
"autoname": "format: {title} {#}",
"creation": "2025-12-15 00:18:29.399376",
"description": "Items that the Church owns (i.e. appliances, equipment, etc)",
"doctype": "DocType",
"documentation": "/app/manual%3A-operations",
"engine": "InnoDB",
"field_order": [
"title",
"image",
"acquisition_date",
"location",
"notes"
],
"fields": [
{
"allow_in_quick_entry": 1,
"fieldname": "title",
"fieldtype": "Data",
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Title",
"reqd": 1
},
{
"allow_in_quick_entry": 1,
"fieldname": "image",
"fieldtype": "Attach Image",
"in_preview": 1,
"label": "Image"
},
{
"fieldname": "acquisition_date",
"fieldtype": "Date",
"in_filter": 1,
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Acquisition Date"
},
{
"fieldname": "location",
"fieldtype": "Data",
"in_filter": 1,
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Location"
},
{
"fieldname": "notes",
"fieldtype": "Text Editor",
"in_preview": 1,
"label": "Notes"
}
],
"grid_page_length": 50,
"image_field": "image",
"index_web_pages_for_search": 1,
"links": [],
"modified": "2025-12-15 00:32:16.361162",
"modified_by": "Administrator",
"module": "Church Operations",
"name": "Church Asset",
"naming_rule": "Expression",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"import": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Church Manager",
"share": 1,
"write": 1
}
],
"row_format": "Dynamic",
"search_fields": "title, notes, location",
"show_title_field_in_link": 1,
"sort_field": "modified",
"sort_order": "DESC",
"states": [],
"title_field": "title"
}
"actions": [],
"allow_import": 1,
"allow_rename": 1,
"autoname": "format: {title} {#}",
"creation": "2025-12-15 00:18:29.399376",
"description": "Items that the Church owns (i.e. appliances, equipment, etc)",
"doctype": "DocType",
"documentation": "/app/manual%3A-operations",
"engine": "InnoDB",
"field_order": [
"church",
"title",
"image",
"acquisition_date",
"location",
"notes"
],
"fields": [
{
"fieldname": "church",
"fieldtype": "Link",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Church",
"options": "Church",
"search_index": 1
},
{
"allow_in_quick_entry": 1,
"fieldname": "title",
"fieldtype": "Data",
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Title",
"reqd": 1
},
{
"allow_in_quick_entry": 1,
"fieldname": "image",
"fieldtype": "Attach Image",
"in_preview": 1,
"label": "Image"
},
{
"fieldname": "acquisition_date",
"fieldtype": "Date",
"in_filter": 1,
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Acquisition Date"
},
{
"fieldname": "location",
"fieldtype": "Data",
"in_filter": 1,
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Location"
},
{
"fieldname": "notes",
"fieldtype": "Text Editor",
"in_preview": 1,
"label": "Notes"
}
],
"grid_page_length": 50,
"image_field": "image",
"index_web_pages_for_search": 1,
"links": [],
"modified": "2025-12-15 00:32:16.361162",
"modified_by": "Administrator",
"module": "Church Operations",
"name": "Church Asset",
"naming_rule": "Expression",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"import": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Church Manager",
"share": 1,
"write": 1
}
],
"row_format": "Dynamic",
"search_fields": "title, notes, location",
"show_title_field_in_link": 1,
"sort_field": "modified",
"sort_order": "DESC",
"states": [],
"title_field": "title"
}

View File

@ -1,139 +1,149 @@
{
"actions": [],
"allow_import": 1,
"allow_rename": 1,
"autoname": "format:{title}",
"creation": "2026-01-05 23:28:09.404374",
"default_view": "Tree",
"description": "A physical location associated with the Church. (i.e. Office, Library, etc)",
"doctype": "DocType",
"engine": "InnoDB",
"field_order": [
"title",
"notes",
"column_break_djot",
"parent_church_location",
"is_group",
"photo",
"hidden_fields_section",
"lft",
"rgt",
"old_parent"
],
"fields": [
{
"allow_in_quick_entry": 1,
"fieldname": "title",
"fieldtype": "Data",
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Title",
"reqd": 1
},
{
"allow_in_quick_entry": 1,
"fieldname": "notes",
"fieldtype": "Text Editor",
"in_list_view": 1,
"in_preview": 1,
"label": "Notes"
},
{
"fieldname": "lft",
"fieldtype": "Int",
"hidden": 1,
"label": "Left",
"no_copy": 1,
"read_only": 1
},
{
"fieldname": "rgt",
"fieldtype": "Int",
"hidden": 1,
"label": "Right",
"no_copy": 1,
"read_only": 1
},
{
"default": "0",
"description": "Check this if other locations are located within this location.",
"fieldname": "is_group",
"fieldtype": "Check",
"label": "Is Group"
},
{
"fieldname": "old_parent",
"fieldtype": "Link",
"label": "Old Parent",
"options": "Church Location"
},
{
"description": "If this location is located within another location, choose the other location here.",
"fieldname": "parent_church_location",
"fieldtype": "Link",
"ignore_user_permissions": 1,
"label": "Parent Location",
"options": "Church Location"
},
{
"fieldname": "column_break_djot",
"fieldtype": "Column Break"
},
{
"fieldname": "hidden_fields_section",
"fieldtype": "Section Break",
"hidden": 1,
"label": "Hidden Fields"
},
{
"fieldname": "photo",
"fieldtype": "Attach Image",
"label": "Photo"
}
],
"grid_page_length": 50,
"image_field": "photo",
"index_web_pages_for_search": 1,
"is_tree": 1,
"links": [],
"modified": "2026-01-05 23:51:38.123146",
"modified_by": "Administrator",
"module": "Church Operations",
"name": "Church Location",
"naming_rule": "Expression",
"nsm_parent_field": "parent_church_location",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"import": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Church Manager",
"share": 1,
"write": 1
}
],
"quick_entry": 1,
"row_format": "Dynamic",
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}
"actions": [],
"allow_import": 1,
"allow_rename": 1,
"autoname": "format:{title}",
"creation": "2026-01-05 23:28:09.404374",
"default_view": "Tree",
"description": "A physical location associated with the Church. (i.e. Office, Library, etc)",
"doctype": "DocType",
"engine": "InnoDB",
"field_order": [
"church",
"title",
"notes",
"column_break_djot",
"parent_church_location",
"is_group",
"photo",
"hidden_fields_section",
"lft",
"rgt",
"old_parent"
],
"fields": [
{
"fieldname": "church",
"fieldtype": "Link",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Church",
"options": "Church",
"search_index": 1
},
{
"allow_in_quick_entry": 1,
"fieldname": "title",
"fieldtype": "Data",
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Title",
"reqd": 1
},
{
"allow_in_quick_entry": 1,
"fieldname": "notes",
"fieldtype": "Text Editor",
"in_list_view": 1,
"in_preview": 1,
"label": "Notes"
},
{
"fieldname": "lft",
"fieldtype": "Int",
"hidden": 1,
"label": "Left",
"no_copy": 1,
"read_only": 1
},
{
"fieldname": "rgt",
"fieldtype": "Int",
"hidden": 1,
"label": "Right",
"no_copy": 1,
"read_only": 1
},
{
"default": "0",
"description": "Check this if other locations are located within this location.",
"fieldname": "is_group",
"fieldtype": "Check",
"label": "Is Group"
},
{
"fieldname": "old_parent",
"fieldtype": "Link",
"label": "Old Parent",
"options": "Church Location"
},
{
"description": "If this location is located within another location, choose the other location here.",
"fieldname": "parent_church_location",
"fieldtype": "Link",
"ignore_user_permissions": 1,
"label": "Parent Location",
"options": "Church Location"
},
{
"fieldname": "column_break_djot",
"fieldtype": "Column Break"
},
{
"fieldname": "hidden_fields_section",
"fieldtype": "Section Break",
"hidden": 1,
"label": "Hidden Fields"
},
{
"fieldname": "photo",
"fieldtype": "Attach Image",
"label": "Photo"
}
],
"grid_page_length": 50,
"image_field": "photo",
"index_web_pages_for_search": 1,
"is_tree": 1,
"links": [],
"modified": "2026-01-05 23:51:38.123146",
"modified_by": "Administrator",
"module": "Church Operations",
"name": "Church Location",
"naming_rule": "Expression",
"nsm_parent_field": "parent_church_location",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"import": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Church Manager",
"share": 1,
"write": 1
}
],
"quick_entry": 1,
"row_format": "Dynamic",
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}

View File

@ -1,218 +1,228 @@
{
"actions": [],
"allow_import": 1,
"autoname": "format:Task {#}",
"creation": "2025-12-15 00:41:21.858015",
"description": "Things that need to get done (Like a checklist or ToDo list)",
"doctype": "DocType",
"documentation": "/app/manual%3A-operations",
"engine": "InnoDB",
"field_order": [
"section_break_fgnk",
"title",
"status",
"due_date",
"assigned_person",
"column_break_yrnx",
"is_group",
"parent_task",
"section_break_kwag",
"task_items",
"section_break_ysry",
"notes",
"hidden_fields_section",
"old_parent",
"lft",
"rgt"
],
"fields": [
{
"fieldname": "section_break_fgnk",
"fieldtype": "Section Break"
},
{
"fieldname": "lft",
"fieldtype": "Int",
"hidden": 1,
"label": "Left",
"no_copy": 1,
"read_only": 1
},
{
"fieldname": "rgt",
"fieldtype": "Int",
"hidden": 1,
"label": "Right",
"no_copy": 1,
"read_only": 1
},
{
"allow_in_quick_entry": 1,
"default": "0",
"description": "Checking this box allows you to add 'generic' sub-tasks and link them to this task. For items that already exist in the system, use the 'Task Items' table below.",
"fieldname": "is_group",
"fieldtype": "Check",
"in_preview": 1,
"in_standard_filter": 1,
"label": "Is Group"
},
{
"fieldname": "old_parent",
"fieldtype": "Link",
"label": "Old Parent",
"options": "Church Task"
},
{
"allow_in_quick_entry": 1,
"fieldname": "title",
"fieldtype": "Data",
"in_list_view": 1,
"in_preview": 1,
"label": "Title",
"reqd": 1
},
{
"allow_in_quick_entry": 1,
"fieldname": "due_date",
"fieldtype": "Datetime",
"in_filter": 1,
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Due Date"
},
{
"allow_in_quick_entry": 1,
"fieldname": "assigned_person",
"fieldtype": "Link",
"in_filter": 1,
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Assigned Person",
"options": "Person"
},
{
"fieldname": "column_break_yrnx",
"fieldtype": "Column Break"
},
{
"fieldname": "section_break_ysry",
"fieldtype": "Section Break"
},
{
"allow_in_quick_entry": 1,
"fieldname": "notes",
"fieldtype": "Text Editor",
"in_list_view": 1,
"in_preview": 1,
"label": "Notes"
},
{
"fieldname": "hidden_fields_section",
"fieldtype": "Section Break",
"hidden": 1,
"label": "Hidden Fields"
},
{
"allow_in_quick_entry": 1,
"description": "If this task is a sub-task, select the parent task here.",
"fieldname": "parent_task",
"fieldtype": "Link",
"ignore_user_permissions": 1,
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Parent Task",
"options": "Church Task"
},
{
"fieldname": "section_break_kwag",
"fieldtype": "Section Break"
},
{
"allow_in_quick_entry": 1,
"description": "For generic items that do not exist in the system, you can create a checklist in the notes section below or create sub-tasks by checking 'Is Group' and then creating new tasks wit hthis task selected in the new task's 'Parent Task' field. ",
"fieldname": "task_items",
"fieldtype": "Table",
"label": "Task Items",
"options": "Church Task Item"
},
{
"allow_in_quick_entry": 1,
"default": "Open",
"fieldname": "status",
"fieldtype": "Select",
"in_filter": 1,
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Status",
"options": "Open\nAssigned\nIn Progress\nCompleted",
"reqd": 1
}
],
"grid_page_length": 50,
"index_web_pages_for_search": 1,
"is_tree": 1,
"links": [],
"modified": "2025-12-20 22:59:11.776100",
"modified_by": "Administrator",
"module": "Church Operations",
"name": "Church Task",
"naming_rule": "Expression",
"nsm_parent_field": "parent_task",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"import": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Church Manager",
"share": 1,
"write": 1
}
],
"quick_entry": 1,
"row_format": "Dynamic",
"search_fields": "title, notes",
"show_title_field_in_link": 1,
"sort_field": "modified",
"sort_order": "DESC",
"states": [
{
"color": "Red",
"title": "Open"
},
{
"color": "Purple",
"title": "Assigned"
},
{
"color": "Yellow",
"title": "In Progress"
},
{
"color": "Green",
"title": "Completed"
}
],
"title_field": "title"
}
"actions": [],
"allow_import": 1,
"autoname": "format:Task {#}",
"creation": "2025-12-15 00:41:21.858015",
"description": "Things that need to get done (Like a checklist or ToDo list)",
"doctype": "DocType",
"documentation": "/app/manual%3A-operations",
"engine": "InnoDB",
"field_order": [
"section_break_fgnk",
"church",
"title",
"status",
"due_date",
"assigned_person",
"column_break_yrnx",
"is_group",
"parent_task",
"section_break_kwag",
"task_items",
"section_break_ysry",
"notes",
"hidden_fields_section",
"old_parent",
"lft",
"rgt"
],
"fields": [
{
"fieldname": "section_break_fgnk",
"fieldtype": "Section Break"
},
{
"fieldname": "church",
"fieldtype": "Link",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Church",
"options": "Church",
"search_index": 1
},
{
"fieldname": "lft",
"fieldtype": "Int",
"hidden": 1,
"label": "Left",
"no_copy": 1,
"read_only": 1
},
{
"fieldname": "rgt",
"fieldtype": "Int",
"hidden": 1,
"label": "Right",
"no_copy": 1,
"read_only": 1
},
{
"allow_in_quick_entry": 1,
"default": "0",
"description": "Checking this box allows you to add 'generic' sub-tasks and link them to this task. For items that already exist in the system, use the 'Task Items' table below.",
"fieldname": "is_group",
"fieldtype": "Check",
"in_preview": 1,
"in_standard_filter": 1,
"label": "Is Group"
},
{
"fieldname": "old_parent",
"fieldtype": "Link",
"label": "Old Parent",
"options": "Church Task"
},
{
"allow_in_quick_entry": 1,
"fieldname": "title",
"fieldtype": "Data",
"in_list_view": 1,
"in_preview": 1,
"label": "Title",
"reqd": 1
},
{
"allow_in_quick_entry": 1,
"fieldname": "due_date",
"fieldtype": "Datetime",
"in_filter": 1,
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Due Date"
},
{
"allow_in_quick_entry": 1,
"fieldname": "assigned_person",
"fieldtype": "Link",
"in_filter": 1,
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Assigned Person",
"options": "Person"
},
{
"fieldname": "column_break_yrnx",
"fieldtype": "Column Break"
},
{
"fieldname": "section_break_ysry",
"fieldtype": "Section Break"
},
{
"allow_in_quick_entry": 1,
"fieldname": "notes",
"fieldtype": "Text Editor",
"in_list_view": 1,
"in_preview": 1,
"label": "Notes"
},
{
"fieldname": "hidden_fields_section",
"fieldtype": "Section Break",
"hidden": 1,
"label": "Hidden Fields"
},
{
"allow_in_quick_entry": 1,
"description": "If this task is a sub-task, select the parent task here.",
"fieldname": "parent_task",
"fieldtype": "Link",
"ignore_user_permissions": 1,
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Parent Task",
"options": "Church Task"
},
{
"fieldname": "section_break_kwag",
"fieldtype": "Section Break"
},
{
"allow_in_quick_entry": 1,
"description": "For generic items that do not exist in the system, you can create a checklist in the notes section below or create sub-tasks by checking 'Is Group' and then creating new tasks wit hthis task selected in the new task's 'Parent Task' field. ",
"fieldname": "task_items",
"fieldtype": "Table",
"label": "Task Items",
"options": "Church Task Item"
},
{
"allow_in_quick_entry": 1,
"default": "Open",
"fieldname": "status",
"fieldtype": "Select",
"in_filter": 1,
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Status",
"options": "Open\nAssigned\nIn Progress\nCompleted",
"reqd": 1
}
],
"grid_page_length": 50,
"index_web_pages_for_search": 1,
"is_tree": 1,
"links": [],
"modified": "2025-12-20 22:59:11.776100",
"modified_by": "Administrator",
"module": "Church Operations",
"name": "Church Task",
"naming_rule": "Expression",
"nsm_parent_field": "parent_task",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"import": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Church Manager",
"share": 1,
"write": 1
}
],
"quick_entry": 1,
"row_format": "Dynamic",
"search_fields": "title, notes",
"show_title_field_in_link": 1,
"sort_field": "modified",
"sort_order": "DESC",
"states": [
{
"color": "Red",
"title": "Open"
},
{
"color": "Purple",
"title": "Assigned"
},
{
"color": "Yellow",
"title": "In Progress"
},
{
"color": "Green",
"title": "Completed"
}
],
"title_field": "title"
}

View File

@ -1,123 +1,133 @@
{
"actions": [],
"allow_import": 1,
"autoname": "format:Family {#}",
"creation": "2025-08-22 00:15:20.425153",
"description": "A family of people ('Person's) that are considered to be part of the same household. One 'Person' can be set to be the Head of Household for a family. ",
"doctype": "DocType",
"documentation": "/app/manual%3A-people",
"engine": "InnoDB",
"field_order": [
"section_break_acrr",
"family_name",
"head_of_household",
"home_address",
"photo",
"column_break_pmch",
"members"
],
"fields": [
{
"fieldname": "column_break_pmch",
"fieldtype": "Column Break"
},
{
"fieldname": "home_address",
"fieldtype": "Link",
"in_preview": 1,
"label": "Home Address",
"options": "Address"
},
{
"allow_in_quick_entry": 1,
"fieldname": "family_name",
"fieldtype": "Data",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Name",
"reqd": 1
},
{
"allow_in_quick_entry": 1,
"fieldname": "head_of_household",
"fieldtype": "Link",
"in_preview": 1,
"in_standard_filter": 1,
"is_virtual": 1,
"label": "Head of Household",
"options": "Person"
},
{
"fieldname": "photo",
"fieldtype": "Attach Image",
"in_preview": 1,
"label": "Photo"
},
{
"fieldname": "section_break_acrr",
"fieldtype": "Section Break"
},
{
"fieldname": "members",
"fieldtype": "Table",
"label": "Family Members",
"options": "Family Members"
}
],
"grid_page_length": 50,
"image_field": "photo",
"index_web_pages_for_search": 1,
"links": [
{
"link_doctype": "Person",
"link_fieldname": "family"
},
{
"link_doctype": "Alms Request",
"link_fieldname": "recipient"
}
],
"modified": "2025-12-20 23:03:58.407158",
"modified_by": "Administrator",
"module": "Church People",
"name": "Family",
"naming_rule": "Expression",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"import": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Church Manager",
"select": 1,
"share": 1,
"write": 1
}
],
"quick_entry": 1,
"row_format": "Dynamic",
"show_preview_popup": 1,
"show_title_field_in_link": 1,
"sort_field": "modified",
"sort_order": "DESC",
"states": [],
"title_field": "family_name",
"track_changes": 1
}
"actions": [],
"allow_import": 1,
"autoname": "format:Family {#}",
"creation": "2025-08-22 00:15:20.425153",
"description": "A family of people ('Person's) that are considered to be part of the same household. One 'Person' can be set to be the Head of Household for a family. ",
"doctype": "DocType",
"documentation": "/app/manual%3A-people",
"engine": "InnoDB",
"field_order": [
"section_break_acrr",
"church",
"family_name",
"head_of_household",
"home_address",
"photo",
"column_break_pmch",
"members"
],
"fields": [
{
"fieldname": "church",
"fieldtype": "Link",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Church",
"options": "Church",
"search_index": 1
},
{
"fieldname": "column_break_pmch",
"fieldtype": "Column Break"
},
{
"fieldname": "home_address",
"fieldtype": "Link",
"in_preview": 1,
"label": "Home Address",
"options": "Address"
},
{
"allow_in_quick_entry": 1,
"fieldname": "family_name",
"fieldtype": "Data",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Name",
"reqd": 1
},
{
"allow_in_quick_entry": 1,
"fieldname": "head_of_household",
"fieldtype": "Link",
"in_preview": 1,
"in_standard_filter": 1,
"is_virtual": 1,
"label": "Head of Household",
"options": "Person"
},
{
"fieldname": "photo",
"fieldtype": "Attach Image",
"in_preview": 1,
"label": "Photo"
},
{
"fieldname": "section_break_acrr",
"fieldtype": "Section Break"
},
{
"fieldname": "members",
"fieldtype": "Table",
"label": "Family Members",
"options": "Family Members"
}
],
"grid_page_length": 50,
"image_field": "photo",
"index_web_pages_for_search": 1,
"links": [
{
"link_doctype": "Person",
"link_fieldname": "family"
},
{
"link_doctype": "Alms Request",
"link_fieldname": "recipient"
}
],
"modified": "2025-12-20 23:03:58.407158",
"modified_by": "Administrator",
"module": "Church People",
"name": "Family",
"naming_rule": "Expression",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"import": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Church Manager",
"select": 1,
"share": 1,
"write": 1
}
],
"quick_entry": 1,
"row_format": "Dynamic",
"show_preview_popup": 1,
"show_title_field_in_link": 1,
"sort_field": "modified",
"sort_order": "DESC",
"states": [],
"title_field": "family_name",
"track_changes": 1
}

View File

@ -1,388 +1,398 @@
{
"actions": [],
"allow_import": 1,
"allow_rename": 1,
"autoname": "format:Person {#}",
"creation": "2025-08-21 01:19:39.714186",
"description": "A person that has interacted with the church in some way (i.e. attendee, member, visitor, etc).",
"doctype": "DocType",
"documentation": "/app/manual%3A-people",
"engine": "InnoDB",
"field_order": [
"personal_information_section",
"first_name",
"last_name",
"full_name",
"gender",
"column_break_agva",
"photo",
"birthday",
"alergies",
"portal_user",
"church_records_section",
"is_member",
"membership_date",
"membership_status",
"column_break_lvwv",
"is_baptized",
"baptism_date",
"section_break_osjz",
"positions",
"contact_information_tab",
"contact_information_section",
"home_address",
"different_mailing_address",
"mailing_address",
"column_break_vzrz",
"primary_phone",
"email",
"section_break_eqre",
"letters",
"family_tab",
"column_break_gwhd",
"family",
"is_head_of_household",
"is_married",
"anniversary",
"spouse",
"column_break_fkwj",
"relationships",
"notes_tab",
"notes"
],
"fields": [
{
"allow_in_quick_entry": 1,
"fieldname": "first_name",
"fieldtype": "Data",
"in_list_view": 1,
"label": "First Name",
"reqd": 1
},
{
"allow_in_quick_entry": 1,
"fieldname": "last_name",
"fieldtype": "Data",
"in_standard_filter": 1,
"label": "Last Name"
},
{
"fieldname": "full_name",
"fieldtype": "Data",
"in_preview": 1,
"label": "Full Name",
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "column_break_gwhd",
"fieldtype": "Column Break"
},
{
"allow_in_quick_entry": 1,
"default": "0",
"description": "Is this person a church member?",
"fieldname": "is_member",
"fieldtype": "Check",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Is Member"
},
{
"allow_in_quick_entry": 1,
"default": "Today",
"depends_on": "eval:doc.is_member",
"description": "When did the person become a member?",
"fieldname": "membership_date",
"fieldtype": "Date",
"label": "Membership Date",
"mandatory_depends_on": "eval:doc.is_member"
},
{
"fieldname": "birthday",
"fieldtype": "Date",
"label": "Birthday"
},
{
"fieldname": "personal_information_section",
"fieldtype": "Section Break",
"label": "Personal Information"
},
{
"fieldname": "contact_information_section",
"fieldtype": "Section Break"
},
{
"fieldname": "home_address",
"fieldtype": "Link",
"label": "Home Address",
"options": "Address"
},
{
"depends_on": "eval: doc.different_mailing_address",
"fieldname": "mailing_address",
"fieldtype": "Link",
"label": "Mailing Address",
"options": "Address"
},
{
"fieldname": "column_break_vzrz",
"fieldtype": "Column Break"
},
{
"fieldname": "primary_phone",
"fieldtype": "Phone",
"in_preview": 1,
"label": "Primary Phone"
},
{
"fieldname": "email",
"fieldtype": "Data",
"in_preview": 1,
"label": "Email"
},
{
"allow_in_quick_entry": 1,
"fieldname": "family",
"fieldtype": "Link",
"in_list_view": 1,
"in_preview": 1,
"label": "Family",
"options": "Family",
"print_hide": 1,
"search_index": 1
},
{
"allow_in_quick_entry": 1,
"default": "0",
"depends_on": "eval:doc.family;",
"description": "Is this person 'Head of Household\" for their Family?",
"fieldname": "is_head_of_household",
"fieldtype": "Check",
"in_list_view": 1,
"label": "Is Head of Household",
"print_hide": 1
},
{
"fieldname": "photo",
"fieldtype": "Attach Image",
"label": "Photo"
},
{
"fieldname": "contact_information_tab",
"fieldtype": "Tab Break",
"label": "Contact"
},
{
"fieldname": "alergies",
"fieldtype": "Data",
"label": "Alergies",
"print_hide": 1
},
{
"fieldname": "church_records_section",
"fieldtype": "Section Break",
"label": "Church Records"
},
{
"fieldname": "column_break_lvwv",
"fieldtype": "Column Break"
},
{
"allow_in_quick_entry": 1,
"depends_on": "eval:doc.is_member",
"fieldname": "membership_status",
"fieldtype": "Link",
"in_preview": 1,
"label": "Membership Status",
"mandatory_depends_on": "eval:doc.is_member",
"options": "Member Status",
"search_index": 1
},
{
"default": "0",
"fieldname": "is_baptized",
"fieldtype": "Check",
"label": "Is Baptized"
},
{
"depends_on": "eval:doc.is_baptized",
"fieldname": "baptism_date",
"fieldtype": "Date",
"label": "Baptism Date"
},
{
"fieldname": "positions",
"fieldtype": "Table",
"label": "Positions",
"options": "Position"
},
{
"fieldname": "section_break_osjz",
"fieldtype": "Section Break"
},
{
"fieldname": "column_break_agva",
"fieldtype": "Column Break"
},
{
"fieldname": "family_tab",
"fieldtype": "Tab Break",
"label": "Family"
},
{
"default": "0",
"fieldname": "is_married",
"fieldtype": "Check",
"label": "Is Married",
"print_hide": 1
},
{
"depends_on": "eval:doc.is_married;",
"fieldname": "anniversary",
"fieldtype": "Date",
"label": "Anniversary"
},
{
"depends_on": "eval:doc.is_married;",
"fieldname": "spouse",
"fieldtype": "Link",
"in_preview": 1,
"label": "Spouse",
"link_filters": "[[\"Person\",\"name\",\"!=\",\"{{doc.id}}\"]]",
"options": "Person"
},
{
"fieldname": "column_break_fkwj",
"fieldtype": "Column Break"
},
{
"fieldname": "notes_tab",
"fieldtype": "Tab Break",
"in_preview": 1,
"label": "Notes"
},
{
"fieldname": "notes",
"fieldtype": "Text Editor",
"label": "Notes",
"print_hide": 1
},
{
"allow_in_quick_entry": 1,
"description": "Note: Relations are not automatically reciprocal. (i.e. If you are editing 'Mark' and add 'Jane' as 'Sister', Jane's record will not automatically be updated to show 'Mark' as 'Brother'. ",
"fieldname": "relationships",
"fieldtype": "Table",
"label": "Notable Relationships",
"options": "Person Relation",
"print_hide": 1
},
{
"allow_in_quick_entry": 1,
"default": "Unknown",
"fieldname": "gender",
"fieldtype": "Select",
"label": "Gender",
"options": "Female\nMale\nUnknown",
"print_hide": 1
},
{
"fieldname": "section_break_eqre",
"fieldtype": "Section Break"
},
{
"fieldname": "letters",
"fieldtype": "Table",
"label": "Letters to the Church",
"options": "Letter",
"print_hide": 1
},
{
"fieldname": "portal_user",
"fieldtype": "Link",
"label": "Portal User",
"options": "User"
},
{
"default": "0",
"fieldname": "different_mailing_address",
"fieldtype": "Check",
"label": "Different Mailing Address"
}
],
"grid_page_length": 50,
"image_field": "photo",
"index_web_pages_for_search": 1,
"links": [
{
"link_doctype": "Prayer Request",
"link_fieldname": "requestor"
},
{
"link_doctype": "Prayer",
"link_fieldname": "person"
},
{
"link_doctype": "Collection",
"link_fieldname": "person"
},
{
"link_doctype": "Function",
"link_fieldname": "person"
},
{
"link_doctype": "Alms Request",
"link_fieldname": "recipient"
}
],
"modified": "2026-02-22 23:11:46.660564",
"modified_by": "Administrator",
"module": "Church People",
"name": "Person",
"naming_rule": "Expression",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"import": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Church Manager",
"select": 1,
"share": 1,
"write": 1
},
{
"read": 1,
"role": "Church User",
"write": 1
}
],
"quick_entry": 1,
"route": "church-personz",
"row_format": "Dynamic",
"search_fields": "last_name, first_name",
"show_preview_popup": 1,
"show_title_field_in_link": 1,
"sort_field": "modified",
"sort_order": "DESC",
"states": [],
"title_field": "full_name",
"track_changes": 1
}
"actions": [],
"allow_import": 1,
"allow_rename": 1,
"autoname": "format:Person {#}",
"creation": "2025-08-21 01:19:39.714186",
"description": "A person that has interacted with the church in some way (i.e. attendee, member, visitor, etc).",
"doctype": "DocType",
"documentation": "/app/manual%3A-people",
"engine": "InnoDB",
"field_order": [
"personal_information_section",
"church",
"first_name",
"last_name",
"full_name",
"gender",
"column_break_agva",
"photo",
"birthday",
"alergies",
"portal_user",
"church_records_section",
"is_member",
"membership_date",
"membership_status",
"column_break_lvwv",
"is_baptized",
"baptism_date",
"section_break_osjz",
"positions",
"contact_information_tab",
"contact_information_section",
"home_address",
"different_mailing_address",
"mailing_address",
"column_break_vzrz",
"primary_phone",
"email",
"section_break_eqre",
"letters",
"family_tab",
"column_break_gwhd",
"family",
"is_head_of_household",
"is_married",
"anniversary",
"spouse",
"column_break_fkwj",
"relationships",
"notes_tab",
"notes"
],
"fields": [
{
"fieldname": "church",
"fieldtype": "Link",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Church",
"options": "Church",
"search_index": 1
},
{
"allow_in_quick_entry": 1,
"fieldname": "first_name",
"fieldtype": "Data",
"in_list_view": 1,
"label": "First Name",
"reqd": 1
},
{
"allow_in_quick_entry": 1,
"fieldname": "last_name",
"fieldtype": "Data",
"in_standard_filter": 1,
"label": "Last Name"
},
{
"fieldname": "full_name",
"fieldtype": "Data",
"in_preview": 1,
"label": "Full Name",
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "column_break_gwhd",
"fieldtype": "Column Break"
},
{
"allow_in_quick_entry": 1,
"default": "0",
"description": "Is this person a church member?",
"fieldname": "is_member",
"fieldtype": "Check",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Is Member"
},
{
"allow_in_quick_entry": 1,
"default": "Today",
"depends_on": "eval:doc.is_member",
"description": "When did the person become a member?",
"fieldname": "membership_date",
"fieldtype": "Date",
"label": "Membership Date",
"mandatory_depends_on": "eval:doc.is_member"
},
{
"fieldname": "birthday",
"fieldtype": "Date",
"label": "Birthday"
},
{
"fieldname": "personal_information_section",
"fieldtype": "Section Break",
"label": "Personal Information"
},
{
"fieldname": "contact_information_section",
"fieldtype": "Section Break"
},
{
"fieldname": "home_address",
"fieldtype": "Link",
"label": "Home Address",
"options": "Address"
},
{
"depends_on": "eval: doc.different_mailing_address",
"fieldname": "mailing_address",
"fieldtype": "Link",
"label": "Mailing Address",
"options": "Address"
},
{
"fieldname": "column_break_vzrz",
"fieldtype": "Column Break"
},
{
"fieldname": "primary_phone",
"fieldtype": "Phone",
"in_preview": 1,
"label": "Primary Phone"
},
{
"fieldname": "email",
"fieldtype": "Data",
"in_preview": 1,
"label": "Email"
},
{
"allow_in_quick_entry": 1,
"fieldname": "family",
"fieldtype": "Link",
"in_list_view": 1,
"in_preview": 1,
"label": "Family",
"options": "Family",
"print_hide": 1,
"search_index": 1
},
{
"allow_in_quick_entry": 1,
"default": "0",
"depends_on": "eval:doc.family;",
"description": "Is this person 'Head of Household\" for their Family?",
"fieldname": "is_head_of_household",
"fieldtype": "Check",
"in_list_view": 1,
"label": "Is Head of Household",
"print_hide": 1
},
{
"fieldname": "photo",
"fieldtype": "Attach Image",
"label": "Photo"
},
{
"fieldname": "contact_information_tab",
"fieldtype": "Tab Break",
"label": "Contact"
},
{
"fieldname": "alergies",
"fieldtype": "Data",
"label": "Alergies",
"print_hide": 1
},
{
"fieldname": "church_records_section",
"fieldtype": "Section Break",
"label": "Church Records"
},
{
"fieldname": "column_break_lvwv",
"fieldtype": "Column Break"
},
{
"allow_in_quick_entry": 1,
"depends_on": "eval:doc.is_member",
"fieldname": "membership_status",
"fieldtype": "Link",
"in_preview": 1,
"label": "Membership Status",
"mandatory_depends_on": "eval:doc.is_member",
"options": "Member Status",
"search_index": 1
},
{
"default": "0",
"fieldname": "is_baptized",
"fieldtype": "Check",
"label": "Is Baptized"
},
{
"depends_on": "eval:doc.is_baptized",
"fieldname": "baptism_date",
"fieldtype": "Date",
"label": "Baptism Date"
},
{
"fieldname": "positions",
"fieldtype": "Table",
"label": "Positions",
"options": "Position"
},
{
"fieldname": "section_break_osjz",
"fieldtype": "Section Break"
},
{
"fieldname": "column_break_agva",
"fieldtype": "Column Break"
},
{
"fieldname": "family_tab",
"fieldtype": "Tab Break",
"label": "Family"
},
{
"default": "0",
"fieldname": "is_married",
"fieldtype": "Check",
"label": "Is Married",
"print_hide": 1
},
{
"depends_on": "eval:doc.is_married;",
"fieldname": "anniversary",
"fieldtype": "Date",
"label": "Anniversary"
},
{
"depends_on": "eval:doc.is_married;",
"fieldname": "spouse",
"fieldtype": "Link",
"in_preview": 1,
"label": "Spouse",
"link_filters": "[[\"Person\",\"name\",\"!=\",\"{{doc.id}}\"]]",
"options": "Person"
},
{
"fieldname": "column_break_fkwj",
"fieldtype": "Column Break"
},
{
"fieldname": "notes_tab",
"fieldtype": "Tab Break",
"in_preview": 1,
"label": "Notes"
},
{
"fieldname": "notes",
"fieldtype": "Text Editor",
"label": "Notes",
"print_hide": 1
},
{
"allow_in_quick_entry": 1,
"description": "Note: Relations are not automatically reciprocal. (i.e. If you are editing 'Mark' and add 'Jane' as 'Sister', Jane's record will not automatically be updated to show 'Mark' as 'Brother'. ",
"fieldname": "relationships",
"fieldtype": "Table",
"label": "Notable Relationships",
"options": "Person Relation",
"print_hide": 1
},
{
"allow_in_quick_entry": 1,
"default": "Unknown",
"fieldname": "gender",
"fieldtype": "Select",
"label": "Gender",
"options": "Female\nMale\nUnknown",
"print_hide": 1
},
{
"fieldname": "section_break_eqre",
"fieldtype": "Section Break"
},
{
"fieldname": "letters",
"fieldtype": "Table",
"label": "Letters to the Church",
"options": "Letter",
"print_hide": 1
},
{
"fieldname": "portal_user",
"fieldtype": "Link",
"label": "Portal User",
"options": "User"
},
{
"default": "0",
"fieldname": "different_mailing_address",
"fieldtype": "Check",
"label": "Different Mailing Address"
}
],
"grid_page_length": 50,
"image_field": "photo",
"index_web_pages_for_search": 1,
"links": [
{
"link_doctype": "Prayer Request",
"link_fieldname": "requestor"
},
{
"link_doctype": "Prayer",
"link_fieldname": "person"
},
{
"link_doctype": "Collection",
"link_fieldname": "person"
},
{
"link_doctype": "Function",
"link_fieldname": "person"
},
{
"link_doctype": "Alms Request",
"link_fieldname": "recipient"
}
],
"modified": "2026-02-22 23:11:46.660564",
"modified_by": "Administrator",
"module": "Church People",
"name": "Person",
"naming_rule": "Expression",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"import": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Church Manager",
"select": 1,
"share": 1,
"write": 1
},
{
"read": 1,
"role": "Church User",
"write": 1
}
],
"quick_entry": 1,
"route": "church-personz",
"row_format": "Dynamic",
"search_fields": "last_name, first_name",
"show_preview_popup": 1,
"show_title_field_in_link": 1,
"sort_field": "modified",
"sort_order": "DESC",
"states": [],
"title_field": "full_name",
"track_changes": 1
}

View File

@ -8,6 +8,10 @@ from frappe.utils import get_link_to_form
class Person(Document):
def on_update(self):
# Sync church to linked portal user when church field changes
if self.portal_user and self.has_value_changed("church"):
frappe.db.set_value("User", self.portal_user, "church", self.church)
# Update Family Member list in Family
if self.family:
family = frappe.get_doc("Family", self.family)

View File

@ -61,10 +61,9 @@
"name": "People Letters Not Yet Read",
"owner": "Administrator",
"prepared_report": 0,
"query": "SELECT parent, date, share_with_church, shared_date, is_private, file, content \nFROM `tabLetter` \nWHERE `tabLetter`.parenttype=\"Person\" AND share_with_church=1 AND shared_date IS NULL\nORDER BY parent",
"ref_doctype": "Missionary",
"report_name": "People Letters Not Yet Read",
"report_type": "Query Report",
"report_type": "Script Report",
"roles": [
{
"role": "Church Manager"
@ -74,4 +73,4 @@
}
],
"timeout": 0
}
}

View File

@ -0,0 +1,51 @@
import frappe
def execute(filters=None):
return get_columns(), get_data()
def get_columns():
return [
{"fieldname": "parent", "fieldtype": "Link", "label": "From", "options": "Person", "width": 150},
{"fieldname": "date", "fieldtype": "Date", "label": "Date", "width": 100},
{"fieldname": "share_with_church", "fieldtype": "Check", "label": "Share w/ Church?", "width": 120},
{"fieldname": "shared_date", "fieldtype": "Date", "label": "Shared Date", "width": 100},
{"fieldname": "is_private", "fieldtype": "Check", "label": "Is Private?", "width": 100},
{"fieldname": "file", "fieldtype": "Link", "label": "File", "options": "File", "width": 150},
{"fieldname": "content", "fieldtype": "Data", "label": "Content", "width": 300},
]
def get_data():
church_condition = ""
values = {}
if not frappe.has_role("System Manager"):
church_condition = """AND `tabPerson`.church IN (
SELECT for_value FROM `tabUser Permission`
WHERE user = %(user)s AND allow = 'Church'
)"""
values["user"] = frappe.session.user
return frappe.db.sql(
f"""
SELECT
`tabLetter`.parent,
`tabLetter`.date,
`tabLetter`.share_with_church,
`tabLetter`.shared_date,
`tabLetter`.is_private,
`tabLetter`.file,
`tabLetter`.content
FROM `tabLetter`
INNER JOIN `tabPerson` ON `tabPerson`.name = `tabLetter`.parent
WHERE `tabLetter`.parenttype = 'Person'
AND `tabLetter`.share_with_church = 1
AND `tabLetter`.shared_date IS NULL
{church_condition}
ORDER BY `tabLetter`.parent
""",
values,
as_dict=True,
)

View File

@ -61,10 +61,9 @@
"name": "Person Letters",
"owner": "Administrator",
"prepared_report": 0,
"query": "SELECT parent, date, share_with_church, shared_date, is_private, file, content \nFROM `tabLetter`\nWHERE `tabLetter`.parenttype = \"Person\"\nORDER BY parent;",
"ref_doctype": "Person",
"report_name": "Person Letters",
"report_type": "Query Report",
"report_type": "Script Report",
"roles": [
{
"role": "Church Manager"
@ -74,4 +73,4 @@
}
],
"timeout": 0
}
}

View File

@ -0,0 +1,49 @@
import frappe
def execute(filters=None):
return get_columns(), get_data()
def get_columns():
return [
{"fieldname": "parent", "fieldtype": "Link", "label": "From", "options": "Person", "width": 150},
{"fieldname": "date", "fieldtype": "Date", "label": "Date", "width": 100},
{"fieldname": "share_with_church", "fieldtype": "Check", "label": "Share w/ Church?", "width": 120},
{"fieldname": "shared_date", "fieldtype": "Date", "label": "Shared Date", "width": 100},
{"fieldname": "is_private", "fieldtype": "Check", "label": "Is Private?", "width": 100},
{"fieldname": "file", "fieldtype": "Link", "label": "File", "options": "File", "width": 150},
{"fieldname": "content", "fieldtype": "Data", "label": "Content", "width": 300},
]
def get_data():
church_condition = ""
values = {}
if not frappe.has_role("System Manager"):
church_condition = """AND `tabPerson`.church IN (
SELECT for_value FROM `tabUser Permission`
WHERE user = %(user)s AND allow = 'Church'
)"""
values["user"] = frappe.session.user
return frappe.db.sql(
f"""
SELECT
`tabLetter`.parent,
`tabLetter`.date,
`tabLetter`.share_with_church,
`tabLetter`.shared_date,
`tabLetter`.is_private,
`tabLetter`.file,
`tabLetter`.content
FROM `tabLetter`
INNER JOIN `tabPerson` ON `tabPerson`.name = `tabLetter`.parent
WHERE `tabLetter`.parenttype = 'Person'
{church_condition}
ORDER BY `tabLetter`.parent
""",
values,
as_dict=True,
)

View File

@ -1,101 +1,111 @@
{
"actions": [],
"allow_rename": 1,
"autoname": "format:Prayer {######}",
"creation": "2025-10-08 22:02:44.303677",
"description": "A recorded prayer, written or spoken",
"doctype": "DocType",
"documentation": "/app/manual%3A-prayers",
"engine": "InnoDB",
"field_order": [
"person",
"file",
"column_break_hfvl",
"content",
"section_break_ojgz",
"topics"
],
"fields": [
{
"fieldname": "person",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Person",
"options": "Person",
"reqd": 1,
"search_index": 1
},
{
"fieldname": "file",
"fieldtype": "Attach",
"label": "File"
},
{
"fieldname": "content",
"fieldtype": "Small Text",
"label": "Content"
},
{
"fieldname": "column_break_hfvl",
"fieldtype": "Column Break"
},
{
"fieldname": "section_break_ojgz",
"fieldtype": "Section Break"
},
{
"description": "Items that were prayed for or about. ",
"fieldname": "topics",
"fieldtype": "Table",
"label": "Prayer Topics",
"options": "Prayer Topic"
}
],
"grid_page_length": 50,
"index_web_pages_for_search": 1,
"links": [
{
"link_doctype": "Function",
"link_fieldname": "item"
}
],
"modified": "2025-11-15 22:56:20.377317",
"modified_by": "Administrator",
"module": "Church Prayers",
"name": "Prayer",
"naming_rule": "Expression",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Church Manager",
"select": 1,
"share": 1,
"write": 1
}
],
"row_format": "Dynamic",
"search_fields": "content, person",
"sort_field": "modified",
"sort_order": "DESC",
"states": [],
"track_views": 1
}
"actions": [],
"allow_rename": 1,
"autoname": "format:Prayer {######}",
"creation": "2025-10-08 22:02:44.303677",
"description": "A recorded prayer, written or spoken",
"doctype": "DocType",
"documentation": "/app/manual%3A-prayers",
"engine": "InnoDB",
"field_order": [
"church",
"person",
"file",
"column_break_hfvl",
"content",
"section_break_ojgz",
"topics"
],
"fields": [
{
"fieldname": "church",
"fieldtype": "Link",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Church",
"options": "Church",
"search_index": 1
},
{
"fieldname": "person",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Person",
"options": "Person",
"reqd": 1,
"search_index": 1
},
{
"fieldname": "file",
"fieldtype": "Attach",
"label": "File"
},
{
"fieldname": "content",
"fieldtype": "Small Text",
"label": "Content"
},
{
"fieldname": "column_break_hfvl",
"fieldtype": "Column Break"
},
{
"fieldname": "section_break_ojgz",
"fieldtype": "Section Break"
},
{
"description": "Items that were prayed for or about. ",
"fieldname": "topics",
"fieldtype": "Table",
"label": "Prayer Topics",
"options": "Prayer Topic"
}
],
"grid_page_length": 50,
"index_web_pages_for_search": 1,
"links": [
{
"link_doctype": "Function",
"link_fieldname": "item"
}
],
"modified": "2025-11-15 22:56:20.377317",
"modified_by": "Administrator",
"module": "Church Prayers",
"name": "Prayer",
"naming_rule": "Expression",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Church Manager",
"select": 1,
"share": 1,
"write": 1
}
],
"row_format": "Dynamic",
"search_fields": "content, person",
"sort_field": "modified",
"sort_order": "DESC",
"states": [],
"track_views": 1
}

View File

@ -1,188 +1,198 @@
{
"actions": [],
"allow_import": 1,
"autoname": "format:Prayer Request {#}",
"creation": "2025-09-13 00:16:52.698863",
"description": "A request for prayer from (or for) a `Person`.",
"doctype": "DocType",
"documentation": "/app/manual%3A-prayers",
"engine": "InnoDB",
"field_order": [
"status",
"type",
"recipient_type",
"recipient",
"column_break_ynvf",
"requestor",
"is_private",
"section_break_usaz",
"request"
],
"fields": [
{
"allow_in_quick_entry": 1,
"default": "Requested",
"fieldname": "status",
"fieldtype": "Link",
"in_filter": 1,
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Status",
"options": "Prayer Request Status",
"reqd": 1
},
{
"fieldname": "column_break_ynvf",
"fieldtype": "Column Break",
"placeholder": "If this request is for a specific person, select/add the person here."
},
{
"fieldname": "section_break_usaz",
"fieldtype": "Section Break"
},
{
"allow_in_quick_entry": 1,
"fieldname": "request",
"fieldtype": "Small Text",
"in_filter": 1,
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Request",
"mandatory_depends_on": "eval: doc.type!=\"Unspoken\";"
},
{
"allow_in_quick_entry": 1,
"default": "0",
"description": "Check this if you don't want this request shared with the church body.",
"fieldname": "is_private",
"fieldtype": "Check",
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Is Private"
},
{
"allow_in_quick_entry": 1,
"fieldname": "type",
"fieldtype": "Link",
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Type",
"options": "Prayer Request Type",
"reqd": 1
},
{
"description": "The person who made the request.",
"fieldname": "requestor",
"fieldtype": "Link",
"in_filter": 1,
"in_preview": 1,
"label": "Requestor",
"options": "Person",
"reqd": 1
},
{
"allow_in_quick_entry": 1,
"description": "The person for whom prayers will be prayed.",
"fieldname": "recipient",
"fieldtype": "Dynamic Link",
"in_filter": 1,
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Recipient",
"options": "recipient_type",
"search_index": 1
},
{
"default": "Person",
"description": "The type of entity for which prayer is being requested.",
"fieldname": "recipient_type",
"fieldtype": "Link",
"label": "Recipient Type",
"options": "DocType"
}
],
"grid_page_length": 50,
"links": [
{
"link_doctype": "Prayer",
"link_fieldname": "topic",
"table_fieldname": "topics"
}
],
"modified": "2026-02-19 23:47:54.971006",
"modified_by": "Administrator",
"module": "Church Prayers",
"name": "Prayer Request",
"naming_rule": "Expression",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Church Manager",
"select": 1,
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"if_owner": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Church User",
"select": 1,
"share": 1,
"write": 1
}
],
"row_format": "Dynamic",
"search_fields": "status,type,recipient",
"show_preview_popup": 1,
"show_title_field_in_link": 1,
"sort_field": "modified",
"sort_order": "DESC",
"states": [
{
"color": "Purple",
"title": "Answered"
},
{
"color": "Yellow",
"title": "Requested"
},
{
"color": "Blue",
"title": "Being Prayed For"
}
],
"title_field": "request",
"track_changes": 1,
"track_seen": 1,
"track_views": 1
}
"actions": [],
"allow_import": 1,
"autoname": "format:Prayer Request {#}",
"creation": "2025-09-13 00:16:52.698863",
"description": "A request for prayer from (or for) a `Person`.",
"doctype": "DocType",
"documentation": "/app/manual%3A-prayers",
"engine": "InnoDB",
"field_order": [
"church",
"status",
"type",
"recipient_type",
"recipient",
"column_break_ynvf",
"requestor",
"is_private",
"section_break_usaz",
"request"
],
"fields": [
{
"fieldname": "church",
"fieldtype": "Link",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Church",
"options": "Church",
"search_index": 1
},
{
"allow_in_quick_entry": 1,
"default": "Requested",
"fieldname": "status",
"fieldtype": "Link",
"in_filter": 1,
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Status",
"options": "Prayer Request Status",
"reqd": 1
},
{
"fieldname": "column_break_ynvf",
"fieldtype": "Column Break",
"placeholder": "If this request is for a specific person, select/add the person here."
},
{
"fieldname": "section_break_usaz",
"fieldtype": "Section Break"
},
{
"allow_in_quick_entry": 1,
"fieldname": "request",
"fieldtype": "Small Text",
"in_filter": 1,
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Request",
"mandatory_depends_on": "eval: doc.type!=\"Unspoken\";"
},
{
"allow_in_quick_entry": 1,
"default": "0",
"description": "Check this if you don't want this request shared with the church body.",
"fieldname": "is_private",
"fieldtype": "Check",
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Is Private"
},
{
"allow_in_quick_entry": 1,
"fieldname": "type",
"fieldtype": "Link",
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Type",
"options": "Prayer Request Type",
"reqd": 1
},
{
"description": "The person who made the request.",
"fieldname": "requestor",
"fieldtype": "Link",
"in_filter": 1,
"in_preview": 1,
"label": "Requestor",
"options": "Person",
"reqd": 1
},
{
"allow_in_quick_entry": 1,
"description": "The person for whom prayers will be prayed.",
"fieldname": "recipient",
"fieldtype": "Dynamic Link",
"in_filter": 1,
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Recipient",
"options": "recipient_type",
"search_index": 1
},
{
"default": "Person",
"description": "The type of entity for which prayer is being requested.",
"fieldname": "recipient_type",
"fieldtype": "Link",
"label": "Recipient Type",
"options": "DocType"
}
],
"grid_page_length": 50,
"links": [
{
"link_doctype": "Prayer",
"link_fieldname": "topic",
"table_fieldname": "topics"
}
],
"modified": "2026-02-19 23:47:54.971006",
"modified_by": "Administrator",
"module": "Church Prayers",
"name": "Prayer Request",
"naming_rule": "Expression",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Church Manager",
"select": 1,
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"if_owner": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Church User",
"select": 1,
"share": 1,
"write": 1
}
],
"row_format": "Dynamic",
"search_fields": "status,type,recipient",
"show_preview_popup": 1,
"show_title_field_in_link": 1,
"sort_field": "modified",
"sort_order": "DESC",
"states": [
{
"color": "Purple",
"title": "Answered"
},
{
"color": "Yellow",
"title": "Requested"
},
{
"color": "Blue",
"title": "Being Prayed For"
}
],
"title_field": "request",
"track_changes": 1,
"track_seen": 1,
"track_views": 1
}

View File

@ -55,10 +55,9 @@
"name": "Prayer Requests: Recently Answered",
"owner": "Administrator",
"prepared_report": 0,
"query": "SELECT status, type, related_person, request\nFROM `tabPrayer Request`\nWHERE creation > %(request_since)s and status = 'answered';",
"ref_doctype": "Prayer Request",
"report_name": "Prayer Requests: Recently Answered",
"report_type": "Query Report",
"report_type": "Script Report",
"roles": [
{
"role": "Church Manager"
@ -68,4 +67,4 @@
}
],
"timeout": 0
}
}

View File

@ -0,0 +1,39 @@
import frappe
def execute(filters=None):
return get_columns(), get_data(filters)
def get_columns():
return [
{"fieldname": "status", "fieldtype": "Link", "label": "Status", "options": "Prayer Request Status", "width": 120},
{"fieldname": "type", "fieldtype": "Link", "label": "Type", "options": "Prayer Request Type", "width": 120},
{"fieldname": "related_person", "fieldtype": "Link", "label": "Related Person", "options": "Person", "width": 150},
{"fieldname": "request", "fieldtype": "Data", "label": "Request", "width": 300},
]
def get_data(filters):
filters = filters or {}
church_condition = ""
values = {"request_since": filters.get("request_since")}
if not frappe.has_role("System Manager"):
church_condition = """AND church IN (
SELECT for_value FROM `tabUser Permission`
WHERE user = %(user)s AND allow = 'Church'
)"""
values["user"] = frappe.session.user
return frappe.db.sql(
f"""
SELECT status, type, related_person, request
FROM `tabPrayer Request`
WHERE creation > %(request_since)s
AND status = 'answered'
{church_condition}
""",
values,
as_dict=True,
)

View File

@ -63,10 +63,9 @@
"name": "Prayer Requests: Recently Created",
"owner": "Administrator",
"prepared_report": 0,
"query": "SELECT status, type, related_person, request, name\nFROM `tabPrayer Request`\nWHERE creation > %(request_since)s;",
"ref_doctype": "Prayer Request",
"report_name": "Prayer Requests: Recently Created",
"report_type": "Query Report",
"report_type": "Script Report",
"roles": [
{
"role": "Church Manager"
@ -76,4 +75,4 @@
}
],
"timeout": 0
}
}

View File

@ -0,0 +1,39 @@
import frappe
def execute(filters=None):
return get_columns(), get_data(filters)
def get_columns():
return [
{"fieldname": "status", "fieldtype": "Link", "label": "Status", "options": "Prayer Request Status", "width": 120},
{"fieldname": "type", "fieldtype": "Link", "label": "Type", "options": "Prayer Request Type", "width": 120},
{"fieldname": "related_person", "fieldtype": "Link", "label": "Related Person", "options": "Person", "width": 150},
{"fieldname": "request", "fieldtype": "Data", "label": "Request", "width": 300},
{"fieldname": "name", "fieldtype": "Link", "label": "Link to Request", "options": "Prayer Request", "width": 150},
]
def get_data(filters):
filters = filters or {}
church_condition = ""
values = {"request_since": filters.get("request_since")}
if not frappe.has_role("System Manager"):
church_condition = """AND church IN (
SELECT for_value FROM `tabUser Permission`
WHERE user = %(user)s AND allow = 'Church'
)"""
values["user"] = frappe.session.user
return frappe.db.sql(
f"""
SELECT status, type, related_person, request, name
FROM `tabPrayer Request`
WHERE creation > %(request_since)s
{church_condition}
""",
values,
as_dict=True,
)

View File

@ -1,100 +1,110 @@
{
"actions": [],
"allow_rename": 1,
"autoname": "field:title",
"creation": "2026-02-26 01:02:02.489497",
"doctype": "DocType",
"engine": "InnoDB",
"field_order": [
"title",
"prepared_by",
"notes",
"section_break_slides",
"slides",
"section_break_presentation_history",
"presentation_history"
],
"fields": [
{
"fieldname": "title",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Title",
"reqd": 1,
"unique": 1
},
{
"fieldname": "prepared_by",
"fieldtype": "Link",
"label": "Prepared By",
"options": "Person"
},
{
"fieldname": "section_break_slides",
"fieldtype": "Section Break",
"label": "Slides"
},
{
"fieldname": "slides",
"fieldtype": "Table",
"label": "Slides",
"options": "Sermon Slide"
},
{
"fieldname": "section_break_presentation_history",
"fieldtype": "Section Break",
"label": "Presentation History"
},
{
"fieldname": "presentation_history",
"fieldtype": "Table",
"label": "Presentation History",
"options": "Sermon Presentation"
},
{
"fieldname": "notes",
"fieldtype": "Text Editor",
"label": "Notes"
}
],
"grid_page_length": 50,
"index_web_pages_for_search": 1,
"links": [],
"modified": "2026-03-02 23:45:19.562241",
"modified_by": "Administrator",
"module": "Church Study",
"name": "Sermon",
"naming_rule": "By fieldname",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Church Manager",
"share": 1,
"write": 1
}
],
"row_format": "Dynamic",
"rows_threshold_for_grid_search": 20,
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}
"actions": [],
"allow_rename": 1,
"autoname": "field:title",
"creation": "2026-02-26 01:02:02.489497",
"doctype": "DocType",
"engine": "InnoDB",
"field_order": [
"church",
"title",
"prepared_by",
"notes",
"section_break_slides",
"slides",
"section_break_presentation_history",
"presentation_history"
],
"fields": [
{
"fieldname": "church",
"fieldtype": "Link",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Church",
"options": "Church",
"search_index": 1
},
{
"fieldname": "title",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Title",
"reqd": 1,
"unique": 1
},
{
"fieldname": "prepared_by",
"fieldtype": "Link",
"label": "Prepared By",
"options": "Person"
},
{
"fieldname": "section_break_slides",
"fieldtype": "Section Break",
"label": "Slides"
},
{
"fieldname": "slides",
"fieldtype": "Table",
"label": "Slides",
"options": "Sermon Slide"
},
{
"fieldname": "section_break_presentation_history",
"fieldtype": "Section Break",
"label": "Presentation History"
},
{
"fieldname": "presentation_history",
"fieldtype": "Table",
"label": "Presentation History",
"options": "Sermon Presentation"
},
{
"fieldname": "notes",
"fieldtype": "Text Editor",
"label": "Notes"
}
],
"grid_page_length": 50,
"index_web_pages_for_search": 1,
"links": [],
"modified": "2026-03-02 23:45:19.562241",
"modified_by": "Administrator",
"module": "Church Study",
"name": "Sermon",
"naming_rule": "By fieldname",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Church Manager",
"share": 1,
"write": 1
}
],
"row_format": "Dynamic",
"rows_threshold_for_grid_search": 20,
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}

View File

@ -67,6 +67,7 @@ app_include_js = [
# page_js = {"page" : "public/js/file.js"}
# include js in doctype views
doctype_js = {"User": "public/js/user.js"}
# doctype_js = {"doctype" : "public/js/doctype.js"}
# doctype_list_js = {"doctype" : "public/js/doctype_list.js"}
# doctype_tree_js = {"doctype" : "public/js/doctype_tree.js"}
@ -161,13 +162,12 @@ app_include_icons = ["/assets/church/icons/church.svg"]
# ---------------
# Hook on document methods and events
# doc_events = {
# "*": {
# "on_update": "method",
# "on_cancel": "method",
# "on_trash": "method"
# }
# }
doc_events = {
"User": {
"after_insert": "church.church_customizations.user_permissions.sync_user_permission",
"on_update": "church.church_customizations.user_permissions.sync_user_permission",
},
}
# Scheduled Tasks
# ---------------

View File

@ -1,38 +0,0 @@
[
{
"balance": 0.0,
"description": "Funds for the building & maintenance of the church.",
"docstatus": 0,
"doctype": "Fund",
"end_date": null,
"fund": "Building",
"modified": "2025-10-02 00:56:20.007430",
"name": "Building",
"start_date": null,
"transactions": []
},
{
"balance": 0.0,
"description": "Financial support for missionaries",
"docstatus": 0,
"doctype": "Fund",
"end_date": null,
"fund": "Missions",
"modified": "2025-10-02 01:02:06.137140",
"name": "Missions",
"start_date": null,
"transactions": []
},
{
"balance": 0.0,
"description": "Church general fund.",
"docstatus": 0,
"doctype": "Fund",
"end_date": null,
"fund": "General",
"modified": "2025-10-02 01:03:14.200750",
"name": "General",
"start_date": null,
"transactions": []
}
]

View File

@ -15,7 +15,7 @@
"insert_style": 0,
"javascript": null,
"main_section": null,
"main_section_html": "{% set legal_name = frappe.db.get_value(\"Information\", \"Information\", \"legal_name\") %}\n{% if legal_name %}\n{% set information = frappe.get_doc(\"Information\") %}\n<div class=\"row\">\n <div class=\"col-lg-12 mb-4\">\n <div class=\"card h-100\">\n <div class=\"card-header\">\n <strong>{{ information.legal_name }}</strong>\n {% if information.founding_date %}\n <br>\n Established: {{ information.founding_date }}\n {% endif %}\n </div>\n <div class=\"card-body\">\n <p class=\"card-text\">\n {{ information.about }}\n </p>\n </div>\n <div class=\"card-footer\">\n <div class=\"small text-muted\">\n {% if information.mission_statement %}\n <strong>Mission Statement</strong>\n <br>\n \"{{ information.mission_statement }}\"\n {% endif %}\n </div>\n </div>\n </div>\n </div>\n</div>\n{% else %}\n<div class=\"row justify-content-center\">\n <div class=\"col-lg-8 col-md-10 text-center\" style=\"padding: 60px 20px;\">\n <h2 style=\"color: #4a4a4a; margin-bottom: 16px;\">Welcome to Your Website</h2>\n <p style=\"font-size: 1.2em; color: #6c757d; margin-bottom: 32px;\">\n Your new church website is almost ready!<br>\n To get started, please log in and configure your church information.<br>\n <br>\n The default login credentials are:<br>\n Username: Administrator<br>\n Password: admin<br>\n Be sure to change the password immediately!\n </p>\n <a href=\"/login\" class=\"btn btn-primary btn-lg\" style=\"padding: 12px 40px; font-size: 1.1em;\">\n Log In to Get Started\n </a>\n </div>\n</div>\n{% endif %}\n",
"main_section_html": "{% set root_churches = frappe.get_list(\"Church\", fields=[\"name\"], filters={\"parent_church\": \"\"}, ignore_permissions=True, limit=1) %}\n{% if root_churches %}\n{% set church = frappe.get_doc(\"Church\", root_churches[0].name) %}\n<div class=\"row\">\n <div class=\"col-lg-12 mb-4\">\n <div class=\"card h-100\">\n <div class=\"card-header\">\n <strong>{{ church.legal_name or church.church_name }}</strong>\n {% if church.founding_date %}\n <br>\n Established: {{ church.founding_date }}\n {% endif %}\n </div>\n <div class=\"card-body\">\n <p class=\"card-text\">\n {{ church.about }}\n </p>\n </div>\n <div class=\"card-footer\">\n <div class=\"small text-muted\">\n {% if church.mission_statement %}\n <strong>Mission Statement</strong>\n <br>\n &ldquo;{{ church.mission_statement }}&rdquo;\n {% endif %}\n </div>\n </div>\n </div>\n </div>\n</div>\n{% else %}\n<div class=\"row justify-content-center\">\n <div class=\"col-lg-8 col-md-10 text-center\" style=\"padding: 60px 20px;\">\n <h2 style=\"color: #4a4a4a; margin-bottom: 16px;\">Welcome to Your Website</h2>\n <p style=\"font-size: 1.2em; color: #6c757d; margin-bottom: 32px;\">\n Your new church website is almost ready!<br>\n To get started, please log in and configure your church information.<br>\n <br>\n The default login credentials are:<br>\n Username: Administrator<br>\n Password: admin<br>\n Be sure to change the password immediately!\n </p>\n <a href=\"/login\" class=\"btn btn-primary btn-lg\" style=\"padding: 12px 40px; font-size: 1.1em;\">\n Log In to Get Started\n </a>\n </div>\n</div>\n{% endif %}",
"main_section_md": "",
"meta_description": null,
"meta_image": null,
@ -103,5 +103,40 @@
"text_align": "Center",
"title": "Missions",
"website_sidebar": null
},
{
"breadcrumbs": null,
"content_type": "HTML",
"context_script": "",
"css": null,
"docstatus": 0,
"doctype": "Web Page",
"dynamic_route": 0,
"dynamic_template": 1,
"enable_comments": 0,
"end_date": null,
"full_width": 0,
"header": null,
"insert_style": 0,
"javascript": null,
"main_section": null,
"main_section_html": "{% set root_churches = frappe.get_list(\"Church\", fields=[\"name\"], filters={\"parent_church\": \"\"}, ignore_permissions=True, limit=1) %}\n{% if root_churches %}\n{% set sub_churches = frappe.get_list(\"Church\", fields=[\"name\"], filters={\"parent_church\": root_churches[0].name}, ignore_permissions=True) %}\n<div class=\"row\">\n {% for doc in sub_churches %}\n {% set church = frappe.get_doc(\"Church\", doc.name) %}\n <div class=\"col-md-4 mb-4\">\n <div class=\"card h-100\">\n <div class=\"card-header\">\n <strong>{{ church.legal_name or church.church_name }}</strong>\n {% if church.founding_date %}\n <br>\n Established: {{ church.founding_date }}\n {% endif %}\n </div>\n <div class=\"card-body\">\n {% if church.about %}\n <p class=\"card-text\">{{ church.about }}</p>\n {% endif %}\n </div>\n {% if church.mission_statement %}\n <div class=\"card-footer\">\n <div class=\"small text-muted\">\n &ldquo;{{ church.mission_statement }}&rdquo;\n </div>\n </div>\n {% endif %}\n </div>\n </div>\n {% else %}\n <div class=\"col-12 text-center\">\n <p class=\"text-muted\">No sub-churches listed.</p>\n </div>\n {% endfor %}\n</div>\n{% endif %}",
"main_section_md": "",
"meta_description": null,
"meta_image": null,
"meta_title": null,
"modified": "2026-03-06 00:00:00.000000",
"module": "Church Website",
"name": "locations",
"page_blocks": [],
"published": 1,
"route": "locations",
"show_sidebar": 0,
"show_title": 1,
"slideshow": null,
"start_date": null,
"text_align": "Center",
"title": "Locations",
"website_sidebar": null
}
]
]

View File

@ -73,6 +73,16 @@
"right": 1,
"url": "/missions"
},
{
"label": "Locations",
"open_in_new_tab": 0,
"parent": "Website Settings",
"parent_label": null,
"parentfield": "top_bar_items",
"parenttype": "Website Settings",
"right": 1,
"url": "/locations"
},
{
"label": "Blog",
"open_in_new_tab": 0,
@ -117,4 +127,4 @@
"website_theme": "Standard",
"website_theme_image_link": null
}
]
]

View File

@ -1,17 +1,18 @@
import json
import os
import frappe
def execute():
seed_dir = os.path.join(os.path.dirname(__file__), "data")
if not os.path.isdir(seed_dir):
data_dir = os.path.join(os.path.dirname(__file__), "data")
if not os.path.isdir(data_dir):
return
for filename in sorted(os.listdir(seed_dir)):
for filename in sorted(os.listdir(data_dir)):
if not filename.endswith(".json"):
continue
with open(os.path.join(seed_dir, filename)) as f:
with open(os.path.join(data_dir, filename)) as f:
records = json.load(f)
for record in records:
doctype = record.get("doctype")
@ -19,4 +20,7 @@ def execute():
if not doctype or not name:
continue
if not frappe.db.exists(doctype, name):
frappe.get_doc(record).insert(ignore_permissions=True)
try:
frappe.get_doc(record).insert(ignore_permissions=True)
except Exception:
frappe.log_error(frappe.get_traceback(), f"insert_data patch failed: {doctype} {name}")

View File

@ -1,5 +1,17 @@
window.church = window.church || {};
// Auto-fill the `church` field on new documents using the current user's default church.
frappe.ui.form.on("*", {
onload(frm) {
if (frm.is_new() && frm.fields_dict.church) {
const default_church = frappe.defaults.get_user_default("church");
if (default_church) {
frm.set_value("church", default_church);
}
}
}
});
// Sets a query filter on a DocType link field to only show DocTypes belonging to the church app.
// fieldname: the Link field to filter
// child_table: (optional) the child table fieldname if the field is in a child doctype

17
church/public/js/user.js Normal file
View File

@ -0,0 +1,17 @@
const CHURCH_SCOPED_ROLES = new Set(["Church Manager", "Church User"]);
frappe.ui.form.on("User", {
validate(frm) {
const has_church_role = (frm.doc.roles || []).some(r => CHURCH_SCOPED_ROLES.has(r.role));
if (has_church_role && !frm.doc.church) {
frappe.msgprint({
title: __("Missing Church"),
message: __(
"This user has a church-scoped role but no Church is assigned. ",
"They will be able to see records from all churches until a church is set."
),
indicator: "orange",
});
}
},
});