-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26480 from Anuja-pawar/sa-vat-report
feat(regional): South Africa VAT Audit Report
- Loading branch information
Showing
16 changed files
with
524 additions
and
1 deletion.
There are no files selected for viewing
Empty file.
34 changes: 34 additions & 0 deletions
34
erpnext/accounts/doctype/south_africa_vat_account/south_africa_vat_account.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,34 @@ | ||
{ | ||
"actions": [], | ||
"autoname": "account", | ||
"creation": "2021-07-08 22:04:24.634967", | ||
"doctype": "DocType", | ||
"editable_grid": 1, | ||
"engine": "InnoDB", | ||
"field_order": [ | ||
"account" | ||
], | ||
"fields": [ | ||
{ | ||
"allow_in_quick_entry": 1, | ||
"fieldname": "account", | ||
"fieldtype": "Link", | ||
"in_list_view": 1, | ||
"in_preview": 1, | ||
"label": "Account", | ||
"options": "Account" | ||
} | ||
], | ||
"index_web_pages_for_search": 1, | ||
"istable": 1, | ||
"links": [], | ||
"modified": "2021-07-08 22:35:33.202911", | ||
"modified_by": "Administrator", | ||
"module": "Accounts", | ||
"name": "South Africa VAT Account", | ||
"owner": "Administrator", | ||
"permissions": [], | ||
"sort_field": "modified", | ||
"sort_order": "DESC", | ||
"track_changes": 1 | ||
} |
8 changes: 8 additions & 0 deletions
8
erpnext/accounts/doctype/south_africa_vat_account/south_africa_vat_account.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,8 @@ | ||
# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and contributors | ||
# For license information, please see license.txt | ||
|
||
# import frappe | ||
from frappe.model.document import Document | ||
|
||
class SouthAfricaVATAccount(Document): | ||
pass |
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
13 changes: 13 additions & 0 deletions
13
erpnext/patches/v13_0/add_custom_field_for_south_africa.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,13 @@ | ||
# Copyright (c) 2020, Frappe and Contributors | ||
# License: GNU General Public License v3. See license.txt | ||
|
||
from __future__ import unicode_literals | ||
import frappe | ||
from erpnext.regional.south_africa.setup import make_custom_fields | ||
|
||
def execute(): | ||
company = frappe.get_all('Company', filters = {'country': 'South Africa'}) | ||
if not company: | ||
return | ||
|
||
make_custom_fields() |
Empty file.
23 changes: 23 additions & 0 deletions
23
erpnext/regional/doctype/south_africa_vat_settings/south_africa_vat_settings.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) 2021, Frappe Technologies Pvt. Ltd. and contributors | ||
// For license information, please see license.txt | ||
|
||
frappe.ui.form.on('South Africa VAT Settings', { | ||
refresh: function(frm) { | ||
frm.set_query("company", function() { | ||
return { | ||
filters: { | ||
country: "South Africa", | ||
} | ||
}; | ||
}); | ||
frm.set_query("account", "vat_accounts", function() { | ||
return { | ||
filters: { | ||
company: frm.doc.company, | ||
account_type: "Tax", | ||
is_group: 0 | ||
} | ||
}; | ||
}); | ||
} | ||
}); |
76 changes: 76 additions & 0 deletions
76
erpnext/regional/doctype/south_africa_vat_settings/south_africa_vat_settings.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,76 @@ | ||
{ | ||
"actions": [], | ||
"autoname": "field:company", | ||
"creation": "2021-07-08 22:34:33.668015", | ||
"doctype": "DocType", | ||
"editable_grid": 1, | ||
"engine": "InnoDB", | ||
"field_order": [ | ||
"company", | ||
"vat_accounts" | ||
], | ||
"fields": [ | ||
{ | ||
"fieldname": "company", | ||
"fieldtype": "Link", | ||
"in_list_view": 1, | ||
"label": "Company", | ||
"options": "Company", | ||
"reqd": 1, | ||
"unique": 1 | ||
}, | ||
{ | ||
"fieldname": "vat_accounts", | ||
"fieldtype": "Table", | ||
"label": "VAT Accounts", | ||
"options": "South Africa VAT Account", | ||
"reqd": 1 | ||
} | ||
], | ||
"index_web_pages_for_search": 1, | ||
"links": [], | ||
"modified": "2021-07-14 02:17:52.476762", | ||
"modified_by": "Administrator", | ||
"module": "Regional", | ||
"name": "South Africa VAT Settings", | ||
"owner": "Administrator", | ||
"permissions": [ | ||
{ | ||
"create": 1, | ||
"delete": 1, | ||
"email": 1, | ||
"export": 1, | ||
"print": 1, | ||
"read": 1, | ||
"report": 1, | ||
"role": "Accounts Manager", | ||
"share": 1, | ||
"write": 1 | ||
}, | ||
{ | ||
"create": 1, | ||
"delete": 1, | ||
"email": 1, | ||
"export": 1, | ||
"print": 1, | ||
"read": 1, | ||
"report": 1, | ||
"role": "Accounts User", | ||
"share": 1, | ||
"write": 1 | ||
}, | ||
{ | ||
"email": 1, | ||
"export": 1, | ||
"print": 1, | ||
"read": 1, | ||
"report": 1, | ||
"role": "Auditor", | ||
"share": 1 | ||
} | ||
], | ||
"quick_entry": 1, | ||
"sort_field": "modified", | ||
"sort_order": "DESC", | ||
"track_changes": 1 | ||
} |
8 changes: 8 additions & 0 deletions
8
erpnext/regional/doctype/south_africa_vat_settings/south_africa_vat_settings.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,8 @@ | ||
# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and contributors | ||
# For license information, please see license.txt | ||
|
||
# import frappe | ||
from frappe.model.document import Document | ||
|
||
class SouthAfricaVATSettings(Document): | ||
pass |
8 changes: 8 additions & 0 deletions
8
erpnext/regional/doctype/south_africa_vat_settings/test_south_africa_vat_settings.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,8 @@ | ||
# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors | ||
# See license.txt | ||
|
||
# import frappe | ||
import unittest | ||
|
||
class TestSouthAfricaVATSettings(unittest.TestCase): | ||
pass |
Empty file.
31 changes: 31 additions & 0 deletions
31
erpnext/regional/report/vat_audit_report/vat_audit_report.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,31 @@ | ||
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors | ||
// For license information, please see license.txt | ||
/* eslint-disable */ | ||
|
||
frappe.query_reports["VAT Audit Report"] = { | ||
"filters": [ | ||
{ | ||
"fieldname": "company", | ||
"label": __("Company"), | ||
"fieldtype": "Link", | ||
"options": "Company", | ||
"reqd": 1, | ||
"default": frappe.defaults.get_user_default("Company") | ||
}, | ||
{ | ||
"fieldname": "from_date", | ||
"label": __("From Date"), | ||
"fieldtype": "Date", | ||
"reqd": 1, | ||
"default": frappe.datetime.add_months(frappe.datetime.get_today(), -2), | ||
"width": "80" | ||
}, | ||
{ | ||
"fieldname": "to_date", | ||
"label": __("To Date"), | ||
"fieldtype": "Date", | ||
"reqd": 1, | ||
"default": frappe.datetime.get_today() | ||
} | ||
] | ||
}; |
32 changes: 32 additions & 0 deletions
32
erpnext/regional/report/vat_audit_report/vat_audit_report.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,32 @@ | ||
{ | ||
"add_total_row": 0, | ||
"columns": [], | ||
"creation": "2021-07-09 11:07:43.473518", | ||
"disable_prepared_report": 0, | ||
"disabled": 0, | ||
"docstatus": 0, | ||
"doctype": "Report", | ||
"filters": [], | ||
"idx": 0, | ||
"is_standard": "Yes", | ||
"modified": "2021-07-09 11:07:43.473518", | ||
"modified_by": "Administrator", | ||
"module": "Regional", | ||
"name": "VAT Audit Report", | ||
"owner": "Administrator", | ||
"prepared_report": 0, | ||
"ref_doctype": "GL Entry", | ||
"report_name": "VAT Audit Report", | ||
"report_type": "Script Report", | ||
"roles": [ | ||
{ | ||
"role": "Accounts User" | ||
}, | ||
{ | ||
"role": "Accounts Manager" | ||
}, | ||
{ | ||
"role": "Auditor" | ||
} | ||
] | ||
} |
Oops, something went wrong.