-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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 #28125 from deepeshgarg007/ksa-vat-v13
feat(regional): KSA E-Invoicing and VAT Report
- Loading branch information
Showing
28 changed files
with
709 additions
and
6 deletions.
There are no files selected for viewing
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
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
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
Empty file.
49 changes: 49 additions & 0 deletions
49
erpnext/regional/doctype/ksa_vat_purchase_account/ksa_vat_purchase_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,49 @@ | ||
{ | ||
"actions": [], | ||
"creation": "2021-07-13 09:17:09.862163", | ||
"doctype": "DocType", | ||
"editable_grid": 1, | ||
"engine": "InnoDB", | ||
"field_order": [ | ||
"title", | ||
"item_tax_template", | ||
"account" | ||
], | ||
"fields": [ | ||
{ | ||
"fieldname": "account", | ||
"fieldtype": "Link", | ||
"in_list_view": 1, | ||
"label": "Account", | ||
"options": "Account", | ||
"reqd": 1 | ||
}, | ||
{ | ||
"fieldname": "title", | ||
"fieldtype": "Data", | ||
"in_list_view": 1, | ||
"label": "Title", | ||
"reqd": 1 | ||
}, | ||
{ | ||
"fieldname": "item_tax_template", | ||
"fieldtype": "Link", | ||
"in_list_view": 1, | ||
"label": "Item Tax Template", | ||
"options": "Item Tax Template", | ||
"reqd": 1 | ||
} | ||
], | ||
"index_web_pages_for_search": 1, | ||
"istable": 1, | ||
"links": [], | ||
"modified": "2021-08-04 06:42:38.205597", | ||
"modified_by": "Administrator", | ||
"module": "Regional", | ||
"name": "KSA VAT Purchase Account", | ||
"owner": "Administrator", | ||
"permissions": [], | ||
"sort_field": "modified", | ||
"sort_order": "DESC", | ||
"track_changes": 1 | ||
} |
9 changes: 9 additions & 0 deletions
9
erpnext/regional/doctype/ksa_vat_purchase_account/ksa_vat_purchase_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,9 @@ | ||
# Copyright (c) 2021, Havenir Solutions and contributors | ||
# For license information, please see license.txt | ||
|
||
# import frappe | ||
from frappe.model.document import Document | ||
|
||
|
||
class KSAVATPurchaseAccount(Document): | ||
pass |
Empty file.
8 changes: 8 additions & 0 deletions
8
erpnext/regional/doctype/ksa_vat_sales_account/ksa_vat_sales_account.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,8 @@ | ||
// Copyright (c) 2021, Havenir Solutions and contributors | ||
// For license information, please see license.txt | ||
|
||
frappe.ui.form.on('KSA VAT Sales Account', { | ||
// refresh: function(frm) { | ||
|
||
// } | ||
}); |
49 changes: 49 additions & 0 deletions
49
erpnext/regional/doctype/ksa_vat_sales_account/ksa_vat_sales_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,49 @@ | ||
{ | ||
"actions": [], | ||
"creation": "2021-07-13 08:46:33.820968", | ||
"doctype": "DocType", | ||
"editable_grid": 1, | ||
"engine": "InnoDB", | ||
"field_order": [ | ||
"title", | ||
"item_tax_template", | ||
"account" | ||
], | ||
"fields": [ | ||
{ | ||
"fieldname": "account", | ||
"fieldtype": "Link", | ||
"in_list_view": 1, | ||
"label": "Account", | ||
"options": "Account", | ||
"reqd": 1 | ||
}, | ||
{ | ||
"fieldname": "title", | ||
"fieldtype": "Data", | ||
"in_list_view": 1, | ||
"label": "Title", | ||
"reqd": 1 | ||
}, | ||
{ | ||
"fieldname": "item_tax_template", | ||
"fieldtype": "Link", | ||
"in_list_view": 1, | ||
"label": "Item Tax Template", | ||
"options": "Item Tax Template", | ||
"reqd": 1 | ||
} | ||
], | ||
"index_web_pages_for_search": 1, | ||
"istable": 1, | ||
"links": [], | ||
"modified": "2021-08-04 06:42:00.081407", | ||
"modified_by": "Administrator", | ||
"module": "Regional", | ||
"name": "KSA VAT Sales Account", | ||
"owner": "Administrator", | ||
"permissions": [], | ||
"sort_field": "modified", | ||
"sort_order": "DESC", | ||
"track_changes": 1 | ||
} |
9 changes: 9 additions & 0 deletions
9
erpnext/regional/doctype/ksa_vat_sales_account/ksa_vat_sales_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,9 @@ | ||
# Copyright (c) 2021, Havenir Solutions and contributors | ||
# For license information, please see license.txt | ||
|
||
# import frappe | ||
from frappe.model.document import Document | ||
|
||
|
||
class KSAVATSalesAccount(Document): | ||
pass |
9 changes: 9 additions & 0 deletions
9
erpnext/regional/doctype/ksa_vat_sales_account/test_ksa_vat_sales_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,9 @@ | ||
# Copyright (c) 2021, Havenir Solutions and Contributors | ||
# See license.txt | ||
|
||
# import frappe | ||
import unittest | ||
|
||
|
||
class TestKSAVATSalesAccount(unittest.TestCase): | ||
pass |
Empty file.
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, Havenir Solutions and contributors | ||
// For license information, please see license.txt | ||
|
||
frappe.ui.form.on('KSA VAT Setting', { | ||
onload: function () { | ||
frappe.breadcrumbs.add('Accounts', 'KSA VAT Setting'); | ||
} | ||
}); |
49 changes: 49 additions & 0 deletions
49
erpnext/regional/doctype/ksa_vat_setting/ksa_vat_setting.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,49 @@ | ||
{ | ||
"actions": [], | ||
"autoname": "field:company", | ||
"creation": "2021-07-13 08:49:01.100356", | ||
"doctype": "DocType", | ||
"editable_grid": 1, | ||
"engine": "InnoDB", | ||
"field_order": [ | ||
"company", | ||
"ksa_vat_sales_accounts", | ||
"ksa_vat_purchase_accounts" | ||
], | ||
"fields": [ | ||
{ | ||
"fieldname": "company", | ||
"fieldtype": "Link", | ||
"in_list_view": 1, | ||
"label": "Company", | ||
"options": "Company", | ||
"reqd": 1, | ||
"unique": 1 | ||
}, | ||
{ | ||
"fieldname": "ksa_vat_sales_accounts", | ||
"fieldtype": "Table", | ||
"label": "KSA VAT Sales Accounts", | ||
"options": "KSA VAT Sales Account", | ||
"reqd": 1 | ||
}, | ||
{ | ||
"fieldname": "ksa_vat_purchase_accounts", | ||
"fieldtype": "Table", | ||
"label": "KSA VAT Purchase Accounts", | ||
"options": "KSA VAT Purchase Account", | ||
"reqd": 1 | ||
} | ||
], | ||
"links": [], | ||
"modified": "2021-08-26 04:29:06.499378", | ||
"modified_by": "Administrator", | ||
"module": "Regional", | ||
"name": "KSA VAT Setting", | ||
"owner": "Administrator", | ||
"permissions": [], | ||
"sort_field": "modified", | ||
"sort_order": "DESC", | ||
"title_field": "company", | ||
"track_changes": 1 | ||
} |
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) 2021, Havenir Solutions and contributors | ||
# For license information, please see license.txt | ||
|
||
# import frappe | ||
from frappe.model.document import Document | ||
|
||
|
||
class KSAVATSetting(Document): | ||
pass |
5 changes: 5 additions & 0 deletions
5
erpnext/regional/doctype/ksa_vat_setting/ksa_vat_setting_list.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,5 @@ | ||
frappe.listview_settings['KSA VAT Setting'] = { | ||
onload () { | ||
frappe.breadcrumbs.add('Accounts'); | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
erpnext/regional/doctype/ksa_vat_setting/test_ksa_vat_setting.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) 2021, Havenir Solutions and Contributors | ||
# See license.txt | ||
|
||
# import frappe | ||
import unittest | ||
|
||
|
||
class TestKSAVATSetting(unittest.TestCase): | ||
pass |
Empty file.
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,60 @@ | ||
// Copyright (c) 2016, Havenir Solutions and contributors | ||
// For license information, please see license.txt | ||
/* eslint-disable */ | ||
|
||
frappe.query_reports["KSA VAT"] = { | ||
onload() { | ||
frappe.breadcrumbs.add('Accounts'); | ||
}, | ||
"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(), -1), | ||
}, | ||
{ | ||
"fieldname": "to_date", | ||
"label": __("To Date"), | ||
"fieldtype": "Date", | ||
"reqd": 1, | ||
"default": frappe.datetime.get_today() | ||
} | ||
], | ||
"formatter": function(value, row, column, data, default_formatter) { | ||
if (data | ||
&& (data.title=='VAT on Sales' || data.title=='VAT on Purchases') | ||
&& data.title==value) { | ||
value = $(`<span>${value}</span>`); | ||
var $value = $(value).css("font-weight", "bold"); | ||
value = $value.wrap("<p></p>").parent().html(); | ||
return value | ||
}else if (data.title=='Grand Total'){ | ||
if (data.title==value) { | ||
value = $(`<span>${value}</span>`); | ||
var $value = $(value).css("font-weight", "bold"); | ||
value = $value.wrap("<p></p>").parent().html(); | ||
return value | ||
}else{ | ||
value = default_formatter(value, row, column, data); | ||
value = $(`<span>${value}</span>`); | ||
var $value = $(value).css("font-weight", "bold"); | ||
value = $value.wrap("<p></p>").parent().html(); | ||
console.log($value) | ||
return value | ||
} | ||
}else{ | ||
value = default_formatter(value, row, column, data); | ||
return value; | ||
} | ||
}, | ||
}; |
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-13 08:54:38.000949", | ||
"disable_prepared_report": 1, | ||
"disabled": 1, | ||
"docstatus": 0, | ||
"doctype": "Report", | ||
"filters": [], | ||
"idx": 0, | ||
"is_standard": "Yes", | ||
"modified": "2021-08-26 04:14:37.202594", | ||
"modified_by": "Administrator", | ||
"module": "Regional", | ||
"name": "KSA VAT", | ||
"owner": "Administrator", | ||
"prepared_report": 1, | ||
"ref_doctype": "GL Entry", | ||
"report_name": "KSA VAT", | ||
"report_type": "Script Report", | ||
"roles": [ | ||
{ | ||
"role": "System Manager" | ||
}, | ||
{ | ||
"role": "Accounts Manager" | ||
}, | ||
{ | ||
"role": "Accounts User" | ||
} | ||
] | ||
} |
Oops, something went wrong.