Skip to content

Commit

Permalink
Merge pull request #26480 from Anuja-pawar/sa-vat-report
Browse files Browse the repository at this point in the history
feat(regional): South Africa VAT Audit Report
  • Loading branch information
deepeshgarg007 authored Aug 3, 2021
2 parents 471f48f + 4e1a205 commit b478449
Show file tree
Hide file tree
Showing 16 changed files with 524 additions and 1 deletion.
Empty file.
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
}
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
3 changes: 2 additions & 1 deletion erpnext/patches.txt
Original file line number Diff line number Diff line change
Expand Up @@ -296,4 +296,5 @@ erpnext.patches.v13_0.update_subscription_status_in_memberships
erpnext.patches.v13_0.update_amt_in_work_order_required_items
erpnext.patches.v13_0.update_export_type_for_gst
erpnext.patches.v13_0.update_tds_check_field #3
erpnext.patches.v13_0.shopify_deprecation_warning
erpnext.patches.v13_0.add_custom_field_for_south_africa
erpnext.patches.v13_0.shopify_deprecation_warning
13 changes: 13 additions & 0 deletions erpnext/patches/v13_0/add_custom_field_for_south_africa.py
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.
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
}
};
});
}
});
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
}
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
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 erpnext/regional/report/vat_audit_report/vat_audit_report.js
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 erpnext/regional/report/vat_audit_report/vat_audit_report.json
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"
}
]
}
Loading

0 comments on commit b478449

Please sign in to comment.