-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Beitragsabrechnung (LAN-844) (#267)
- Loading branch information
1 parent
0835a36
commit 09efe4a
Showing
15 changed files
with
522 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
80 changes: 80 additions & 0 deletions
80
landa/landa_sales/doctype/landa_item_sales_summary/landa_item_sales_summary.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
{ | ||
"actions": [], | ||
"creation": "2024-07-11 19:13:40.115388", | ||
"doctype": "DocType", | ||
"editable_grid": 1, | ||
"engine": "InnoDB", | ||
"field_order": [ | ||
"item_code", | ||
"item_name", | ||
"billed", | ||
"credited", | ||
"net_billed", | ||
"rate", | ||
"amount" | ||
], | ||
"fields": [ | ||
{ | ||
"fieldname": "item_code", | ||
"fieldtype": "Link", | ||
"in_list_view": 1, | ||
"label": "Item Code", | ||
"options": "Item" | ||
}, | ||
{ | ||
"fieldname": "item_name", | ||
"fieldtype": "Data", | ||
"label": "Item Name", | ||
"read_only": 1 | ||
}, | ||
{ | ||
"columns": 1, | ||
"fieldname": "rate", | ||
"fieldtype": "Currency", | ||
"in_list_view": 1, | ||
"label": "Rate", | ||
"options": "Company:company:default_currency" | ||
}, | ||
{ | ||
"columns": 2, | ||
"fieldname": "amount", | ||
"fieldtype": "Currency", | ||
"in_list_view": 1, | ||
"label": "Amount", | ||
"options": "Company:company:default_currency" | ||
}, | ||
{ | ||
"columns": 1, | ||
"fieldname": "billed", | ||
"fieldtype": "Float", | ||
"in_list_view": 1, | ||
"label": "Billed" | ||
}, | ||
{ | ||
"columns": 1, | ||
"fieldname": "credited", | ||
"fieldtype": "Float", | ||
"in_list_view": 1, | ||
"label": "Credited" | ||
}, | ||
{ | ||
"columns": 1, | ||
"fieldname": "net_billed", | ||
"fieldtype": "Float", | ||
"in_list_view": 1, | ||
"label": "Net Billed" | ||
} | ||
], | ||
"index_web_pages_for_search": 1, | ||
"istable": 1, | ||
"links": [], | ||
"modified": "2024-08-30 20:01:57.750315", | ||
"modified_by": "Administrator", | ||
"module": "LANDA Sales", | ||
"name": "LANDA Item Sales Summary", | ||
"owner": "Administrator", | ||
"permissions": [], | ||
"sort_field": "modified", | ||
"sort_order": "DESC", | ||
"states": [] | ||
} |
9 changes: 9 additions & 0 deletions
9
landa/landa_sales/doctype/landa_item_sales_summary/landa_item_sales_summary.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright (c) 2024, ALYF GmbH and contributors | ||
# For license information, please see license.txt | ||
|
||
# import frappe | ||
from frappe.model.document import Document | ||
|
||
|
||
class LANDAItemSalesSummary(Document): | ||
pass |
Empty file.
56 changes: 56 additions & 0 deletions
56
landa/landa_sales/doctype/landa_payment_row/landa_payment_row.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
"actions": [], | ||
"creation": "2024-07-11 17:31:34.524661", | ||
"doctype": "DocType", | ||
"editable_grid": 1, | ||
"engine": "InnoDB", | ||
"field_order": [ | ||
"payment_entry", | ||
"payment_type", | ||
"reference_date", | ||
"amount" | ||
], | ||
"fields": [ | ||
{ | ||
"fetch_from": "payment_entry.reference_date", | ||
"fieldname": "reference_date", | ||
"fieldtype": "Date", | ||
"in_list_view": 1, | ||
"label": "Reference Date" | ||
}, | ||
{ | ||
"fieldname": "payment_entry", | ||
"fieldtype": "Link", | ||
"in_list_view": 1, | ||
"label": "Payment Entry", | ||
"options": "Payment Entry" | ||
}, | ||
{ | ||
"fieldname": "payment_type", | ||
"fieldtype": "Select", | ||
"in_list_view": 1, | ||
"label": "Payment Type", | ||
"options": "Receive\nPay" | ||
}, | ||
{ | ||
"fetch_from": "payment_entry.base_paid_amount", | ||
"fieldname": "amount", | ||
"fieldtype": "Currency", | ||
"in_list_view": 1, | ||
"label": "Amount", | ||
"options": "Company:company:default_currency" | ||
} | ||
], | ||
"index_web_pages_for_search": 1, | ||
"istable": 1, | ||
"links": [], | ||
"modified": "2024-07-11 17:56:13.983731", | ||
"modified_by": "Administrator", | ||
"module": "LANDA Sales", | ||
"name": "LANDA Payment Row", | ||
"owner": "Administrator", | ||
"permissions": [], | ||
"sort_field": "modified", | ||
"sort_order": "DESC", | ||
"states": [] | ||
} |
9 changes: 9 additions & 0 deletions
9
landa/landa_sales/doctype/landa_payment_row/landa_payment_row.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright (c) 2024, ALYF GmbH and contributors | ||
# For license information, please see license.txt | ||
|
||
# import frappe | ||
from frappe.model.document import Document | ||
|
||
|
||
class LANDAPaymentRow(Document): | ||
pass |
Empty file.
65 changes: 65 additions & 0 deletions
65
landa/landa_sales/doctype/statement_of_fees_and_payments/statement_of_fees_and_payments.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
// Copyright (c) 2024, ALYF GmbH and contributors | ||
// For license information, please see license.txt | ||
|
||
frappe.ui.form.on("Statement of Fees and Payments", { | ||
setup(frm) { | ||
frm.set_query("customer_address", (doc) => { | ||
return { | ||
filters: [ | ||
["Dynamic Link", "link_doctype", "=", "Customer"], | ||
["Dynamic Link", "link_name", "=", doc.customer], | ||
], | ||
}; | ||
}); | ||
|
||
frm.set_query("company_address", (doc) => { | ||
return { | ||
filters: [ | ||
["Dynamic Link", "link_doctype", "=", "Company"], | ||
["Dynamic Link", "link_name", "=", doc.company], | ||
], | ||
}; | ||
}); | ||
|
||
frm.set_query("payment_entry", "payments", (doc) => { | ||
return { | ||
filters: { | ||
company: doc.company, | ||
year_of_settlement: doc.year_of_settlement, | ||
party_type: "Customer", | ||
party: doc.customer, | ||
docstatus: 1, | ||
}, | ||
}; | ||
}); | ||
}, | ||
|
||
refresh(frm) { | ||
if (frm.is_new() && !frm.doc.year_of_settlement) { | ||
frm.set_value("year_of_settlement", new Date().getFullYear() - 1); | ||
} | ||
}, | ||
|
||
async company(frm) { | ||
if (frm.doc.company) { | ||
const default_address = await frappe.xcall( | ||
"erpnext.setup.doctype.company.company.get_default_company_address", | ||
{ name: frm.doc.company, existing_address: frm.doc.company_address || "" } | ||
); | ||
|
||
if (default_address) { | ||
frm.set_value("company_address", default_address); | ||
} else { | ||
frm.set_value("company_address", ""); | ||
} | ||
} | ||
}, | ||
|
||
customer_address(frm) { | ||
erpnext.utils.get_address_display(frm, "customer_address", "customer_address_display"); | ||
}, | ||
|
||
company_address(frm) { | ||
erpnext.utils.get_address_display(frm, "company_address", "company_address_display"); | ||
}, | ||
}); |
Oops, something went wrong.