Implement Alms (Resolves #80)

This commit is contained in:
meichthys 2025-11-11 05:35:26 +00:00
parent 234e6a37bd
commit 0308083087
5 changed files with 169 additions and 0 deletions

View File

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

View File

@ -0,0 +1,143 @@
{
"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",
"engine": "InnoDB",
"field_order": [
"recipient_type",
"recipient",
"column_break_ixvv",
"status",
"amount",
"section_break_olzm",
"description"
],
"fields": [
{
"default": "Church Person",
"fieldname": "recipient_type",
"fieldtype": "Link",
"label": "Recipient Type",
"link_filters": "[[\"DocType\",\"name\",\"in\",[\"Church Family\",\"Church Person\"]]]",
"options": "DocType",
"reqd": 1
},
{
"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",
"label": "Status",
"options": "Pending\nDeclined\nApproved\nDistributed"
}
],
"grid_page_length": 50,
"index_web_pages_for_search": 1,
"links": [],
"modified": "2025-11-11 00:01:41.374332",
"modified_by": "Administrator",
"module": "Church Finances",
"name": "Church 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",
"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

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

View File

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