-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: E Invoice Import (first draft)
- Loading branch information
1 parent
d4fb3ad
commit 5c44b9b
Showing
10 changed files
with
612 additions
and
2 deletions.
There are no files selected for viewing
Empty file.
Empty file.
23 changes: 23 additions & 0 deletions
23
eu_einvoice/european_e_invoice/doctype/e_invoice_import/e_invoice_import.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,23 @@ | ||
// Copyright (c) 2024, ALYF GmbH and contributors | ||
// For license information, please see license.txt | ||
|
||
frappe.ui.form.on("E Invoice Import", { | ||
setup(frm) { | ||
frm.set_query("company", function () { | ||
return { | ||
filters: { | ||
is_group: 0, | ||
}, | ||
}; | ||
}); | ||
|
||
frm.set_query("supplier_address", function (doc) { | ||
return { | ||
filters: [ | ||
["Dynamic Link", "link_doctype", "=", "Supplier"], | ||
["Dynamic Link", "link_name", "=", doc.supplier], | ||
], | ||
}; | ||
}); | ||
}, | ||
}); |
290 changes: 290 additions & 0 deletions
290
eu_einvoice/european_e_invoice/doctype/e_invoice_import/e_invoice_import.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,290 @@ | ||
{ | ||
"actions": [], | ||
"allow_rename": 1, | ||
"autoname": "hash", | ||
"creation": "2024-08-24 09:41:48.844623", | ||
"doctype": "DocType", | ||
"engine": "InnoDB", | ||
"field_order": [ | ||
"file_section_section", | ||
"einvoice", | ||
"header_section", | ||
"issue_date", | ||
"id", | ||
"section_break_z2sq", | ||
"amended_from", | ||
"trade_tab", | ||
"agreement_section", | ||
"seller_name", | ||
"seller_tax_id", | ||
"seller_address_line_1", | ||
"seller_address_line_2", | ||
"seller_city", | ||
"seller_postcode", | ||
"seller_country", | ||
"supplier", | ||
"create_supplier", | ||
"supplier_address", | ||
"create_supplier_address", | ||
"column_break_reul", | ||
"buyer_name", | ||
"buyer_address_line_1", | ||
"buyer_address_line_2", | ||
"buyer_city", | ||
"buyer_postcode", | ||
"buyer_country", | ||
"company", | ||
"items_section", | ||
"items", | ||
"settlement_section", | ||
"currency" | ||
], | ||
"fields": [ | ||
{ | ||
"fieldname": "section_break_z2sq", | ||
"fieldtype": "Section Break" | ||
}, | ||
{ | ||
"fieldname": "amended_from", | ||
"fieldtype": "Link", | ||
"label": "Amended From", | ||
"no_copy": 1, | ||
"options": "E Invoice Import", | ||
"print_hide": 1, | ||
"read_only": 1, | ||
"search_index": 1 | ||
}, | ||
{ | ||
"fieldname": "file_section_section", | ||
"fieldtype": "Section Break", | ||
"label": "File Section" | ||
}, | ||
{ | ||
"fieldname": "einvoice", | ||
"fieldtype": "Attach", | ||
"label": "E-Invoice" | ||
}, | ||
{ | ||
"fieldname": "trade_tab", | ||
"fieldtype": "Tab Break", | ||
"label": "Trade" | ||
}, | ||
{ | ||
"fieldname": "agreement_section", | ||
"fieldtype": "Section Break", | ||
"label": "Agreement" | ||
}, | ||
{ | ||
"fieldname": "seller_name", | ||
"fieldtype": "Data", | ||
"label": "Seller Name", | ||
"read_only": 1 | ||
}, | ||
{ | ||
"fieldname": "seller_address_line_1", | ||
"fieldtype": "Data", | ||
"label": "Seller Address Line 1", | ||
"read_only": 1 | ||
}, | ||
{ | ||
"fieldname": "seller_address_line_2", | ||
"fieldtype": "Data", | ||
"label": "Seller Address Line 2", | ||
"read_only": 1 | ||
}, | ||
{ | ||
"fieldname": "seller_city", | ||
"fieldtype": "Data", | ||
"label": "Seller City", | ||
"read_only": 1 | ||
}, | ||
{ | ||
"fieldname": "seller_postcode", | ||
"fieldtype": "Data", | ||
"label": "Seller Postcode", | ||
"read_only": 1 | ||
}, | ||
{ | ||
"fieldname": "seller_country", | ||
"fieldtype": "Link", | ||
"label": "Seller Country", | ||
"options": "Country", | ||
"read_only": 1 | ||
}, | ||
{ | ||
"default": "0", | ||
"fieldname": "create_supplier", | ||
"fieldtype": "Check", | ||
"label": "Create Supplier", | ||
"read_only_depends_on": "supplier" | ||
}, | ||
{ | ||
"fieldname": "column_break_reul", | ||
"fieldtype": "Column Break" | ||
}, | ||
{ | ||
"fieldname": "buyer_name", | ||
"fieldtype": "Data", | ||
"label": "Buyer Name", | ||
"read_only": 1 | ||
}, | ||
{ | ||
"fieldname": "buyer_address_line_1", | ||
"fieldtype": "Data", | ||
"label": "Buyer Address Line 1", | ||
"read_only": 1 | ||
}, | ||
{ | ||
"fieldname": "buyer_address_line_2", | ||
"fieldtype": "Data", | ||
"label": "Buyer Address Line 2", | ||
"read_only": 1 | ||
}, | ||
{ | ||
"fieldname": "buyer_city", | ||
"fieldtype": "Data", | ||
"label": "Buyer City", | ||
"read_only": 1 | ||
}, | ||
{ | ||
"fieldname": "buyer_postcode", | ||
"fieldtype": "Data", | ||
"label": "Buyer Postcode", | ||
"read_only": 1 | ||
}, | ||
{ | ||
"fieldname": "buyer_country", | ||
"fieldtype": "Link", | ||
"label": "Buyer Country", | ||
"options": "Country", | ||
"read_only": 1 | ||
}, | ||
{ | ||
"fieldname": "items_section", | ||
"fieldtype": "Section Break", | ||
"label": "Items" | ||
}, | ||
{ | ||
"fieldname": "items", | ||
"fieldtype": "Table", | ||
"label": "Items", | ||
"options": "E Invoice Item" | ||
}, | ||
{ | ||
"fieldname": "supplier", | ||
"fieldtype": "Link", | ||
"label": "Supplier", | ||
"options": "Supplier" | ||
}, | ||
{ | ||
"fieldname": "company", | ||
"fieldtype": "Link", | ||
"label": "Company", | ||
"options": "Company" | ||
}, | ||
{ | ||
"fieldname": "supplier_address", | ||
"fieldtype": "Link", | ||
"label": "Supplier Address", | ||
"options": "Address", | ||
"read_only_depends_on": "eval: !doc.supplier" | ||
}, | ||
{ | ||
"default": "0", | ||
"fieldname": "create_supplier_address", | ||
"fieldtype": "Check", | ||
"label": "Create Supplier Address", | ||
"read_only_depends_on": "eval: doc.supplier_address || (!doc.supplier && !doc.create_supplier)" | ||
}, | ||
{ | ||
"fieldname": "seller_tax_id", | ||
"fieldtype": "Data", | ||
"label": "Seller Tax ID", | ||
"read_only": 1 | ||
}, | ||
{ | ||
"fieldname": "header_section", | ||
"fieldtype": "Section Break", | ||
"label": "Header" | ||
}, | ||
{ | ||
"fieldname": "issue_date", | ||
"fieldtype": "Date", | ||
"label": "Issue Date", | ||
"read_only": 1 | ||
}, | ||
{ | ||
"fieldname": "id", | ||
"fieldtype": "Data", | ||
"label": "ID", | ||
"read_only": 1 | ||
}, | ||
{ | ||
"fieldname": "settlement_section", | ||
"fieldtype": "Section Break", | ||
"label": "Settlement" | ||
}, | ||
{ | ||
"fieldname": "currency", | ||
"fieldtype": "Link", | ||
"label": "Currency", | ||
"options": "Currency" | ||
} | ||
], | ||
"index_web_pages_for_search": 1, | ||
"is_submittable": 1, | ||
"links": [], | ||
"modified": "2024-08-25 12:39:27.030108", | ||
"modified_by": "Administrator", | ||
"module": "European e-Invoice", | ||
"name": "E Invoice Import", | ||
"naming_rule": "Random", | ||
"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": "Purchase User", | ||
"submit": 1, | ||
"write": 1 | ||
}, | ||
{ | ||
"amend": 1, | ||
"cancel": 1, | ||
"create": 1, | ||
"delete": 1, | ||
"email": 1, | ||
"export": 1, | ||
"print": 1, | ||
"read": 1, | ||
"report": 1, | ||
"role": "Purchase Manager", | ||
"share": 1, | ||
"submit": 1, | ||
"write": 1 | ||
} | ||
], | ||
"sort_field": "creation", | ||
"sort_order": "DESC", | ||
"states": [] | ||
} |
Oops, something went wrong.