Compare commits
1 Commits
mariadb_li
...
v14.0.0-be
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fc75cfdeb6 |
@@ -9,13 +9,6 @@ trim_trailing_whitespace = true
|
|||||||
charset = utf-8
|
charset = utf-8
|
||||||
|
|
||||||
# python, js indentation settings
|
# python, js indentation settings
|
||||||
[{*.py,*.js,*.vue,*.css,*.scss,*.html}]
|
[{*.py,*.js}]
|
||||||
indent_style = tab
|
indent_style = tab
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
max_line_length = 110
|
|
||||||
|
|
||||||
# JSON files - mostly doctype schema files
|
|
||||||
[{*.json}]
|
|
||||||
insert_final_newline = false
|
|
||||||
indent_style = space
|
|
||||||
indent_size = 1
|
|
||||||
|
|||||||
69
.eslintrc
69
.eslintrc
@@ -2,32 +2,65 @@
|
|||||||
"env": {
|
"env": {
|
||||||
"browser": true,
|
"browser": true,
|
||||||
"node": true,
|
"node": true,
|
||||||
"es2022": true
|
"es6": true
|
||||||
},
|
},
|
||||||
"parserOptions": {
|
"parserOptions": {
|
||||||
|
"ecmaVersion": 9,
|
||||||
"sourceType": "module"
|
"sourceType": "module"
|
||||||
},
|
},
|
||||||
"extends": "eslint:recommended",
|
"extends": "eslint:recommended",
|
||||||
"rules": {
|
"rules": {
|
||||||
"indent": "off",
|
"indent": [
|
||||||
"brace-style": "off",
|
"error",
|
||||||
"no-mixed-spaces-and-tabs": "off",
|
"tab",
|
||||||
"no-useless-escape": "off",
|
{ "SwitchCase": 1 }
|
||||||
"space-unary-ops": ["error", { "words": true }],
|
],
|
||||||
"linebreak-style": "off",
|
"brace-style": [
|
||||||
"quotes": ["off"],
|
"error",
|
||||||
"semi": "off",
|
"1tbs"
|
||||||
"camelcase": "off",
|
],
|
||||||
"no-unused-vars": "off",
|
"space-unary-ops": [
|
||||||
"no-console": ["warn"],
|
"error",
|
||||||
"no-extra-boolean-cast": ["off"],
|
{ "words": true }
|
||||||
"no-control-regex": ["off"]
|
],
|
||||||
|
"linebreak-style": [
|
||||||
|
"error",
|
||||||
|
"unix"
|
||||||
|
],
|
||||||
|
"quotes": [
|
||||||
|
"off"
|
||||||
|
],
|
||||||
|
"semi": [
|
||||||
|
"warn",
|
||||||
|
"always"
|
||||||
|
],
|
||||||
|
"camelcase": [
|
||||||
|
"off"
|
||||||
|
],
|
||||||
|
"no-unused-vars": [
|
||||||
|
"warn"
|
||||||
|
],
|
||||||
|
"no-redeclare": [
|
||||||
|
"warn"
|
||||||
|
],
|
||||||
|
"no-console": [
|
||||||
|
"warn"
|
||||||
|
],
|
||||||
|
"no-extra-boolean-cast": [
|
||||||
|
"off"
|
||||||
|
],
|
||||||
|
"no-control-regex": [
|
||||||
|
"off"
|
||||||
|
],
|
||||||
|
"space-before-blocks": "warn",
|
||||||
|
"keyword-spacing": "warn",
|
||||||
|
"comma-spacing": "warn",
|
||||||
|
"key-spacing": "warn"
|
||||||
},
|
},
|
||||||
"root": true,
|
"root": true,
|
||||||
"globals": {
|
"globals": {
|
||||||
"frappe": true,
|
"frappe": true,
|
||||||
"Vue": true,
|
"Vue": true,
|
||||||
"SetVueGlobals": true,
|
|
||||||
"erpnext": true,
|
"erpnext": true,
|
||||||
"hub": true,
|
"hub": true,
|
||||||
"$": true,
|
"$": true,
|
||||||
@@ -64,10 +97,8 @@
|
|||||||
"is_null": true,
|
"is_null": true,
|
||||||
"in_list": true,
|
"in_list": true,
|
||||||
"has_common": true,
|
"has_common": true,
|
||||||
"posthog": true,
|
|
||||||
"has_words": true,
|
"has_words": true,
|
||||||
"validate_email": true,
|
"validate_email": true,
|
||||||
"open_web_template_values_editor": true,
|
|
||||||
"get_number_format": true,
|
"get_number_format": true,
|
||||||
"format_number": true,
|
"format_number": true,
|
||||||
"format_currency": true,
|
"format_currency": true,
|
||||||
@@ -123,8 +154,8 @@
|
|||||||
"before": true,
|
"before": true,
|
||||||
"beforeEach": true,
|
"beforeEach": true,
|
||||||
"onScan": true,
|
"onScan": true,
|
||||||
|
"html2canvas": true,
|
||||||
"extend_cscript": true,
|
"extend_cscript": true,
|
||||||
"localforage": true,
|
"localforage": true
|
||||||
"Plaid": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,20 +28,4 @@ b147b85e6ac19a9220cd1e2958a6ebd99373283a
|
|||||||
494bd9ef78313436f0424b918f200dab8fc7c20b
|
494bd9ef78313436f0424b918f200dab8fc7c20b
|
||||||
|
|
||||||
# bulk format python code with black
|
# bulk format python code with black
|
||||||
baec607ff5905b1c67531096a9cf50ec7ff00a5d
|
baec607ff5905b1c67531096a9cf50ec7ff00a5d
|
||||||
|
|
||||||
# bulk refactor with sourcery
|
|
||||||
eb9ee3f79b94e594fc6dfa4f6514580e125eee8c
|
|
||||||
|
|
||||||
# js formatting
|
|
||||||
ec74a5e56617bbd76ac402451468fd4668af543d
|
|
||||||
|
|
||||||
# ruff formatting
|
|
||||||
a308792ee7fda18a681e9181f4fd00b36385bc23
|
|
||||||
|
|
||||||
# noisy typing refactoring of get_item_details
|
|
||||||
7b7211ac79c248a79ba8a999ff34e734d874c0ae
|
|
||||||
d827ed21adc7b36047e247cbb0dc6388d048a7f9
|
|
||||||
|
|
||||||
# `frappe.flags.in_test` => `frappe.in_test`
|
|
||||||
7a482a69985c952de0e8193c9d4e086aee65ee6d
|
|
||||||
12
.github/ISSUE_TEMPLATE/feature_request.md
vendored
12
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@@ -12,18 +12,10 @@ Welcome to ERPNext issue tracker! Before creating an issue, please heed the foll
|
|||||||
|
|
||||||
1. This tracker should only be used to report bugs and request features / enhancements to ERPNext
|
1. This tracker should only be used to report bugs and request features / enhancements to ERPNext
|
||||||
- For questions and general support, checkout the manual https://erpnext.com/docs/user/manual/en or use https://discuss.erpnext.com
|
- For questions and general support, checkout the manual https://erpnext.com/docs/user/manual/en or use https://discuss.erpnext.com
|
||||||
|
- For documentation issues, refer to https://github.com/frappe/erpnext_com
|
||||||
2. Use the search function before creating a new issue. Duplicates will be closed and directed to
|
2. Use the search function before creating a new issue. Duplicates will be closed and directed to
|
||||||
the original discussion.
|
the original discussion.
|
||||||
3. When making a feature request, make sure to be as verbose as possible. The better you convey your message, the greater the drive to make it happen.
|
3. When making a feature request, make sure to be as verbose as possible. The better you convey your message, the greater the drive to make it happen.
|
||||||
|
|
||||||
|
|
||||||
Please keep in mind that we get many many requests and we can't possibly work on all of them, we prioritize development based on the goals of the product and organization. Feature requests are still welcome as it helps us in research when we do decide to work on the requested feature.
|
|
||||||
|
|
||||||
If you're in urgent need to a feature, please try the following channels to get paid developments done quickly:
|
|
||||||
1. Certified ERPNext partners: https://erpnext.com/partners
|
|
||||||
2. Developer community on ERPNext forums: https://discuss.erpnext.com/c/developers/5
|
|
||||||
3. Telegram group for ERPNext/Frappe development work: https://t.me/erpnext_opps
|
|
||||||
|
|
||||||
-->
|
-->
|
||||||
|
|
||||||
**Is your feature request related to a problem? Please describe.**
|
**Is your feature request related to a problem? Please describe.**
|
||||||
|
|||||||
2
.github/helper/.flake8_strict
vendored
2
.github/helper/.flake8_strict
vendored
@@ -66,8 +66,6 @@ ignore =
|
|||||||
F841,
|
F841,
|
||||||
E713,
|
E713,
|
||||||
E712,
|
E712,
|
||||||
B023,
|
|
||||||
B028
|
|
||||||
|
|
||||||
|
|
||||||
max-line-length = 200
|
max-line-length = 200
|
||||||
|
|||||||
93
.github/helper/documentation.py
vendored
93
.github/helper/documentation.py
vendored
@@ -1,65 +1,54 @@
|
|||||||
import sys
|
import sys
|
||||||
|
import requests
|
||||||
from urllib.parse import urlparse
|
from urllib.parse import urlparse
|
||||||
|
|
||||||
import requests
|
|
||||||
|
|
||||||
WEBSITE_REPOS = [
|
docs_repos = [
|
||||||
|
"frappe_docs",
|
||||||
|
"erpnext_documentation",
|
||||||
"erpnext_com",
|
"erpnext_com",
|
||||||
"frappe_io",
|
"frappe_io",
|
||||||
]
|
]
|
||||||
|
|
||||||
DOCUMENTATION_DOMAINS = [
|
|
||||||
"docs.erpnext.com",
|
|
||||||
"docs.frappe.io",
|
|
||||||
"frappeframework.com",
|
|
||||||
]
|
|
||||||
|
|
||||||
|
def uri_validator(x):
|
||||||
|
result = urlparse(x)
|
||||||
|
return all([result.scheme, result.netloc, result.path])
|
||||||
|
|
||||||
def is_valid_url(url: str) -> bool:
|
def docs_link_exists(body):
|
||||||
parts = urlparse(url)
|
for line in body.splitlines():
|
||||||
return all((parts.scheme, parts.netloc, parts.path))
|
for word in line.split():
|
||||||
|
if word.startswith('http') and uri_validator(word):
|
||||||
|
parsed_url = urlparse(word)
|
||||||
def is_documentation_link(word: str) -> bool:
|
if parsed_url.netloc == "github.com":
|
||||||
if not word.startswith("http") or not is_valid_url(word):
|
parts = parsed_url.path.split('/')
|
||||||
return False
|
if len(parts) == 5 and parts[1] == "frappe" and parts[2] in docs_repos:
|
||||||
|
return True
|
||||||
parsed_url = urlparse(word)
|
elif parsed_url.netloc == "docs.erpnext.com":
|
||||||
if parsed_url.netloc in DOCUMENTATION_DOMAINS:
|
return True
|
||||||
return True
|
|
||||||
|
|
||||||
if parsed_url.netloc == "github.com":
|
|
||||||
parts = parsed_url.path.split("/")
|
|
||||||
if len(parts) == 5 and parts[1] == "frappe" and parts[2] in WEBSITE_REPOS:
|
|
||||||
return True
|
|
||||||
|
|
||||||
return False
|
|
||||||
|
|
||||||
|
|
||||||
def contains_documentation_link(body: str) -> bool:
|
|
||||||
return any(is_documentation_link(word) for line in body.splitlines() for word in line.split())
|
|
||||||
|
|
||||||
|
|
||||||
def check_pull_request(number: str) -> "tuple[int, str]":
|
|
||||||
response = requests.get(f"https://api.github.com/repos/frappe/erpnext/pulls/{number}")
|
|
||||||
if not response.ok:
|
|
||||||
return 1, "Pull Request Not Found! ⚠️"
|
|
||||||
|
|
||||||
payload = response.json()
|
|
||||||
title = (payload.get("title") or "").lower().strip()
|
|
||||||
head_sha = (payload.get("head") or {}).get("sha")
|
|
||||||
body = (payload.get("body") or "").lower()
|
|
||||||
|
|
||||||
if not title.startswith("feat") or not head_sha or "no-docs" in body or "backport" in body:
|
|
||||||
return 0, "Skipping documentation checks... 🏃"
|
|
||||||
|
|
||||||
if contains_documentation_link(body):
|
|
||||||
return 0, "Documentation Link Found. You're Awesome! 🎉"
|
|
||||||
|
|
||||||
return 1, "Documentation Link Not Found! ⚠️"
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
exit_code, message = check_pull_request(sys.argv[1])
|
pr = sys.argv[1]
|
||||||
print(message)
|
response = requests.get("https://api.github.com/repos/frappe/erpnext/pulls/{}".format(pr))
|
||||||
sys.exit(exit_code)
|
|
||||||
|
if response.ok:
|
||||||
|
payload = response.json()
|
||||||
|
title = (payload.get("title") or "").lower().strip()
|
||||||
|
head_sha = (payload.get("head") or {}).get("sha")
|
||||||
|
body = (payload.get("body") or "").lower()
|
||||||
|
|
||||||
|
if (title.startswith("feat")
|
||||||
|
and head_sha
|
||||||
|
and "no-docs" not in body
|
||||||
|
and "backport" not in body
|
||||||
|
):
|
||||||
|
if docs_link_exists(body):
|
||||||
|
print("Documentation Link Found. You're Awesome! 🎉")
|
||||||
|
|
||||||
|
else:
|
||||||
|
print("Documentation Link Not Found! ⚠️")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
else:
|
||||||
|
print("Skipping documentation checks... 🏃")
|
||||||
|
|||||||
47
.github/helper/install.sh
vendored
47
.github/helper/install.sh
vendored
@@ -4,28 +4,14 @@ set -e
|
|||||||
|
|
||||||
cd ~ || exit
|
cd ~ || exit
|
||||||
|
|
||||||
|
sudo apt-get install redis-server libcups2-dev
|
||||||
curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | sudo bash
|
|
||||||
sudo apt update
|
|
||||||
sudo apt remove mysql-server mysql-client
|
|
||||||
sudo apt install libcups2-dev redis-server mariadb-client libmariadb-dev
|
|
||||||
|
|
||||||
pip cache remove mysqlclient
|
|
||||||
|
|
||||||
pip install frappe-bench
|
pip install frappe-bench
|
||||||
|
|
||||||
githubbranch=${GITHUB_BASE_REF:-${GITHUB_REF##*/}}
|
|
||||||
frappeuser=${FRAPPE_USER:-"frappe"}
|
frappeuser=${FRAPPE_USER:-"frappe"}
|
||||||
frappecommitish=${FRAPPE_BRANCH:-$githubbranch}
|
frappebranch=${FRAPPE_BRANCH:-${GITHUB_BASE_REF:-${GITHUB_REF##*/}}}
|
||||||
|
|
||||||
mkdir frappe
|
|
||||||
pushd frappe
|
|
||||||
git init
|
|
||||||
git remote add origin "https://github.com/${frappeuser}/frappe"
|
|
||||||
git fetch origin "${frappecommitish}" --depth 1
|
|
||||||
git checkout FETCH_HEAD
|
|
||||||
popd
|
|
||||||
|
|
||||||
|
git clone "https://github.com/${frappeuser}/frappe" --branch "${frappebranch}" --depth 1
|
||||||
bench init --skip-assets --frappe-path ~/frappe --python "$(which python)" frappe-bench
|
bench init --skip-assets --frappe-path ~/frappe --python "$(which python)" frappe-bench
|
||||||
|
|
||||||
mkdir ~/frappe-bench/sites/test_site
|
mkdir ~/frappe-bench/sites/test_site
|
||||||
@@ -38,14 +24,15 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
if [ "$DB" == "mariadb" ];then
|
if [ "$DB" == "mariadb" ];then
|
||||||
mariadb --host 127.0.0.1 --port 3306 -u root -proot -e "SET GLOBAL character_set_server = 'utf8mb4'"
|
mysql --host 127.0.0.1 --port 3306 -u root -e "SET GLOBAL character_set_server = 'utf8mb4'"
|
||||||
mariadb --host 127.0.0.1 --port 3306 -u root -proot -e "SET GLOBAL collation_server = 'utf8mb4_unicode_ci'"
|
mysql --host 127.0.0.1 --port 3306 -u root -e "SET GLOBAL collation_server = 'utf8mb4_unicode_ci'"
|
||||||
|
|
||||||
mariadb --host 127.0.0.1 --port 3306 -u root -proot -e "CREATE USER 'test_frappe'@'localhost' IDENTIFIED BY 'test_frappe'"
|
mysql --host 127.0.0.1 --port 3306 -u root -e "CREATE USER 'test_frappe'@'localhost' IDENTIFIED BY 'test_frappe'"
|
||||||
mariadb --host 127.0.0.1 --port 3306 -u root -proot -e "CREATE DATABASE test_frappe"
|
mysql --host 127.0.0.1 --port 3306 -u root -e "CREATE DATABASE test_frappe"
|
||||||
mariadb --host 127.0.0.1 --port 3306 -u root -proot -e "GRANT ALL PRIVILEGES ON \`test_frappe\`.* TO 'test_frappe'@'localhost'"
|
mysql --host 127.0.0.1 --port 3306 -u root -e "GRANT ALL PRIVILEGES ON \`test_frappe\`.* TO 'test_frappe'@'localhost'"
|
||||||
|
|
||||||
mariadb --host 127.0.0.1 --port 3306 -u root -proot -e "FLUSH PRIVILEGES"
|
mysql --host 127.0.0.1 --port 3306 -u root -e "UPDATE mysql.user SET Password=PASSWORD('travis') WHERE User='root'"
|
||||||
|
mysql --host 127.0.0.1 --port 3306 -u root -e "FLUSH PRIVILEGES"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$DB" == "postgres" ];then
|
if [ "$DB" == "postgres" ];then
|
||||||
@@ -55,13 +42,12 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
install_whktml() {
|
install_whktml() {
|
||||||
wget -O /tmp/wkhtmltox.deb https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.jammy_amd64.deb
|
wget -O /tmp/wkhtmltox.tar.xz https://github.com/frappe/wkhtmltopdf/raw/master/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz
|
||||||
sudo apt install /tmp/wkhtmltox.deb
|
tar -xf /tmp/wkhtmltox.tar.xz -C /tmp
|
||||||
|
sudo mv /tmp/wkhtmltox/bin/wkhtmltopdf /usr/local/bin/wkhtmltopdf
|
||||||
|
sudo chmod o+x /usr/local/bin/wkhtmltopdf
|
||||||
}
|
}
|
||||||
install_whktml &
|
install_whktml &
|
||||||
wkpid=$!
|
|
||||||
|
|
||||||
|
|
||||||
cd ~/frappe-bench || exit
|
cd ~/frappe-bench || exit
|
||||||
|
|
||||||
@@ -70,13 +56,10 @@ sed -i 's/schedule:/# schedule:/g' Procfile
|
|||||||
sed -i 's/socketio:/# socketio:/g' Procfile
|
sed -i 's/socketio:/# socketio:/g' Procfile
|
||||||
sed -i 's/redis_socketio:/# redis_socketio:/g' Procfile
|
sed -i 's/redis_socketio:/# redis_socketio:/g' Procfile
|
||||||
|
|
||||||
bench get-app payments --branch develop
|
|
||||||
bench get-app erpnext "${GITHUB_WORKSPACE}"
|
bench get-app erpnext "${GITHUB_WORKSPACE}"
|
||||||
|
|
||||||
if [ "$TYPE" == "server" ]; then bench setup requirements --dev; fi
|
if [ "$TYPE" == "server" ]; then bench setup requirements --dev; fi
|
||||||
|
|
||||||
wait $wkpid
|
bench start &> bench_run_logs.txt &
|
||||||
|
|
||||||
bench start &>> ~/frappe-bench/bench_start.log &
|
|
||||||
CI=Yes bench build --app frappe &
|
CI=Yes bench build --app frappe &
|
||||||
bench --site test_site reinstall --yes
|
bench --site test_site reinstall --yes
|
||||||
|
|||||||
5
.github/helper/site_config_mariadb.json
vendored
5
.github/helper/site_config_mariadb.json
vendored
@@ -8,10 +8,9 @@
|
|||||||
"mail_login": "test@example.com",
|
"mail_login": "test@example.com",
|
||||||
"mail_password": "test",
|
"mail_password": "test",
|
||||||
"admin_password": "admin",
|
"admin_password": "admin",
|
||||||
"use_mysqlclient": 1,
|
|
||||||
"root_login": "root",
|
"root_login": "root",
|
||||||
"root_password": "root",
|
"root_password": "travis",
|
||||||
"host_name": "http://test_site:8000",
|
"host_name": "http://test_site:8000",
|
||||||
"install_apps": ["payments", "erpnext"],
|
"install_apps": ["erpnext"],
|
||||||
"throttle_user_limit": 100
|
"throttle_user_limit": 100
|
||||||
}
|
}
|
||||||
|
|||||||
34
.github/helper/translation.py
vendored
34
.github/helper/translation.py
vendored
@@ -2,9 +2,7 @@ import re
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
errors_encounter = 0
|
errors_encounter = 0
|
||||||
pattern = re.compile(
|
pattern = re.compile(r"_\(([\"']{,3})(?P<message>((?!\1).)*)\1(\s*,\s*context\s*=\s*([\"'])(?P<py_context>((?!\5).)*)\5)*(\s*,(\s*?.*?\n*?)*(,\s*([\"'])(?P<js_context>((?!\11).)*)\11)*)*\)")
|
||||||
r"_\(([\"']{,3})(?P<message>((?!\1).)*)\1(\s*,\s*context\s*=\s*([\"'])(?P<py_context>((?!\5).)*)\5)*(\s*,(\s*?.*?\n*?)*(,\s*([\"'])(?P<js_context>((?!\11).)*)\11)*)*\)"
|
|
||||||
)
|
|
||||||
words_pattern = re.compile(r"_{1,2}\([\"'`]{1,3}.*?[a-zA-Z]")
|
words_pattern = re.compile(r"_{1,2}\([\"'`]{1,3}.*?[a-zA-Z]")
|
||||||
start_pattern = re.compile(r"_{1,2}\([f\"'`]{1,3}")
|
start_pattern = re.compile(r"_{1,2}\([f\"'`]{1,3}")
|
||||||
f_string_pattern = re.compile(r"_\(f[\"']")
|
f_string_pattern = re.compile(r"_\(f[\"']")
|
||||||
@@ -12,14 +10,14 @@ starts_with_f_pattern = re.compile(r"_\(f")
|
|||||||
|
|
||||||
# skip first argument
|
# skip first argument
|
||||||
files = sys.argv[1:]
|
files = sys.argv[1:]
|
||||||
files_to_scan = [_file for _file in files if _file.endswith((".py", ".js"))]
|
files_to_scan = [_file for _file in files if _file.endswith(('.py', '.js'))]
|
||||||
|
|
||||||
for _file in files_to_scan:
|
for _file in files_to_scan:
|
||||||
with open(_file) as f:
|
with open(_file, 'r') as f:
|
||||||
print(f"Checking: {_file}")
|
print(f'Checking: {_file}')
|
||||||
file_lines = f.readlines()
|
file_lines = f.readlines()
|
||||||
for line_number, line in enumerate(file_lines, 1):
|
for line_number, line in enumerate(file_lines, 1):
|
||||||
if "frappe-lint: disable-translate" in line:
|
if 'frappe-lint: disable-translate' in line:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
start_matches = start_pattern.search(line)
|
start_matches = start_pattern.search(line)
|
||||||
@@ -30,9 +28,7 @@ for _file in files_to_scan:
|
|||||||
has_f_string = f_string_pattern.search(line)
|
has_f_string = f_string_pattern.search(line)
|
||||||
if has_f_string:
|
if has_f_string:
|
||||||
errors_encounter += 1
|
errors_encounter += 1
|
||||||
print(
|
print(f'\nF-strings are not supported for translations at line number {line_number}\n{line.strip()[:100]}')
|
||||||
f"\nF-strings are not supported for translations at line number {line_number}\n{line.strip()[:100]}"
|
|
||||||
)
|
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
continue
|
continue
|
||||||
@@ -40,29 +36,25 @@ for _file in files_to_scan:
|
|||||||
match = pattern.search(line)
|
match = pattern.search(line)
|
||||||
error_found = False
|
error_found = False
|
||||||
|
|
||||||
if not match and line.endswith((",\n", "[\n")):
|
if not match and line.endswith((',\n', '[\n')):
|
||||||
# concat remaining text to validate multiline pattern
|
# concat remaining text to validate multiline pattern
|
||||||
line = "".join(file_lines[line_number - 1 :])
|
line = "".join(file_lines[line_number - 1:])
|
||||||
line = line[start_matches.start() + 1 :]
|
line = line[start_matches.start() + 1:]
|
||||||
match = pattern.match(line)
|
match = pattern.match(line)
|
||||||
|
|
||||||
if not match:
|
if not match:
|
||||||
error_found = True
|
error_found = True
|
||||||
print(f"\nTranslation syntax error at line number {line_number}\n{line.strip()[:100]}")
|
print(f'\nTranslation syntax error at line number {line_number}\n{line.strip()[:100]}')
|
||||||
|
|
||||||
if not error_found and not words_pattern.search(line):
|
if not error_found and not words_pattern.search(line):
|
||||||
error_found = True
|
error_found = True
|
||||||
print(
|
print(f'\nTranslation is useless because it has no words at line number {line_number}\n{line.strip()[:100]}')
|
||||||
f"\nTranslation is useless because it has no words at line number {line_number}\n{line.strip()[:100]}"
|
|
||||||
)
|
|
||||||
|
|
||||||
if error_found:
|
if error_found:
|
||||||
errors_encounter += 1
|
errors_encounter += 1
|
||||||
|
|
||||||
if errors_encounter > 0:
|
if errors_encounter > 0:
|
||||||
print(
|
print('\nVisit "https://frappeframework.com/docs/user/en/translations" to learn about valid translation strings.')
|
||||||
'\nVisit "https://frappeframework.com/docs/user/en/translations" to learn about valid translation strings.'
|
|
||||||
)
|
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
else:
|
else:
|
||||||
print("\nGood To Go!")
|
print('\nGood To Go!')
|
||||||
|
|||||||
40
.github/helper/update_pot_file.sh
vendored
40
.github/helper/update_pot_file.sh
vendored
@@ -1,40 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -e
|
|
||||||
cd ~ || exit
|
|
||||||
|
|
||||||
echo "Setting Up Bench..."
|
|
||||||
|
|
||||||
pip install frappe-bench
|
|
||||||
bench -v init frappe-bench --skip-assets --skip-redis-config-generation --python "$(which python)"
|
|
||||||
cd ./frappe-bench || exit
|
|
||||||
|
|
||||||
echo "Get ERPNext..."
|
|
||||||
bench get-app --skip-assets erpnext "${GITHUB_WORKSPACE}"
|
|
||||||
|
|
||||||
echo "Generating POT file..."
|
|
||||||
bench generate-pot-file --app erpnext
|
|
||||||
|
|
||||||
cd ./apps/erpnext || exit
|
|
||||||
|
|
||||||
echo "Configuring git user..."
|
|
||||||
git config user.email "developers@erpnext.com"
|
|
||||||
git config user.name "frappe-pr-bot"
|
|
||||||
|
|
||||||
echo "Setting the correct git remote..."
|
|
||||||
# Here, the git remote is a local file path by default. Let's change it to the upstream repo.
|
|
||||||
git remote set-url upstream https://github.com/frappe/erpnext.git
|
|
||||||
|
|
||||||
echo "Creating a new branch..."
|
|
||||||
isodate=$(date -u +"%Y-%m-%d")
|
|
||||||
branch_name="pot_${BASE_BRANCH}_${isodate}"
|
|
||||||
git checkout -b "${branch_name}"
|
|
||||||
|
|
||||||
echo "Commiting changes..."
|
|
||||||
git add erpnext/locale/main.pot
|
|
||||||
git commit -m "chore: update POT file"
|
|
||||||
|
|
||||||
gh auth setup-git
|
|
||||||
git push -u upstream "${branch_name}"
|
|
||||||
|
|
||||||
echo "Creating a PR..."
|
|
||||||
gh pr create --fill --base "${BASE_BRANCH}" --head "${branch_name}" --reviewer ${PR_REVIEWER} -R frappe/erpnext
|
|
||||||
4
.github/release.yml
vendored
4
.github/release.yml
vendored
@@ -1,4 +0,0 @@
|
|||||||
changelog:
|
|
||||||
exclude:
|
|
||||||
labels:
|
|
||||||
- skip-release-notes
|
|
||||||
20
.github/stale.yml
vendored
20
.github/stale.yml
vendored
@@ -12,14 +12,6 @@ exemptProjects: true
|
|||||||
# Set to true to ignore issues in a milestone (defaults to false)
|
# Set to true to ignore issues in a milestone (defaults to false)
|
||||||
exemptMilestones: true
|
exemptMilestones: true
|
||||||
|
|
||||||
# Skip the stale action for draft PRs
|
|
||||||
exemptDraftPr: true
|
|
||||||
|
|
||||||
# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
|
|
||||||
exemptLabels:
|
|
||||||
- hotfix
|
|
||||||
- no-stale
|
|
||||||
|
|
||||||
pulls:
|
pulls:
|
||||||
daysUntilStale: 15
|
daysUntilStale: 15
|
||||||
daysUntilClose: 3
|
daysUntilClose: 3
|
||||||
@@ -32,4 +24,14 @@ pulls:
|
|||||||
:) Also, even if it is closed, you can always reopen the PR when you're
|
:) Also, even if it is closed, you can always reopen the PR when you're
|
||||||
ready. Thank you for contributing.
|
ready. Thank you for contributing.
|
||||||
|
|
||||||
only: pulls
|
issues:
|
||||||
|
daysUntilStale: 60
|
||||||
|
daysUntilClose: 7
|
||||||
|
exemptLabels:
|
||||||
|
- valid
|
||||||
|
- to-validate
|
||||||
|
- QA
|
||||||
|
markComment: >
|
||||||
|
This issue has been automatically marked as inactive because it has not had
|
||||||
|
recent activity and it wasn't validated by maintainer team. It will be
|
||||||
|
closed within a week if no further activity occurs.
|
||||||
|
|||||||
2
.github/try-on-f-cloud-button.svg
vendored
2
.github/try-on-f-cloud-button.svg
vendored
@@ -1,4 +1,4 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="4 2 193 52">
|
<svg width="201" height="60" viewBox="0 0 201 60" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<g filter="url(#filter0_dd)">
|
<g filter="url(#filter0_dd)">
|
||||||
<rect x="4" y="2" width="193" height="52" rx="6" fill="#2490EF"/>
|
<rect x="4" y="2" width="193" height="52" rx="6" fill="#2490EF"/>
|
||||||
<path d="M28 22.2891H32.8786V35.5H36.2088V22.2891H41.0874V19.5H28V22.2891Z" fill="white"/>
|
<path d="M28 22.2891H32.8786V35.5H36.2088V22.2891H41.0874V19.5H28V22.2891Z" fill="white"/>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.4 KiB |
5
.github/workflows/backport.yml
vendored
5
.github/workflows/backport.yml
vendored
@@ -5,9 +5,6 @@ on:
|
|||||||
- closed
|
- closed
|
||||||
- labeled
|
- labeled
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
main:
|
main:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -24,6 +21,6 @@ jobs:
|
|||||||
- name: Run backport
|
- name: Run backport
|
||||||
uses: ./actions/backport
|
uses: ./actions/backport
|
||||||
with:
|
with:
|
||||||
token: ${{secrets.RELEASE_TOKEN}}
|
token: ${{secrets.BACKPORT_BOT_TOKEN}}
|
||||||
labelsToAdd: "backport"
|
labelsToAdd: "backport"
|
||||||
title: "{{originalTitle}}"
|
title: "{{originalTitle}}"
|
||||||
|
|||||||
4
.github/workflows/docker-release.yml
vendored
4
.github/workflows/docker-release.yml
vendored
@@ -2,10 +2,6 @@ name: Trigger Docker build on release
|
|||||||
on:
|
on:
|
||||||
release:
|
release:
|
||||||
types: [released]
|
types: [released]
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
curl:
|
curl:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
5
.github/workflows/docs-checker.yml
vendored
5
.github/workflows/docs-checker.yml
vendored
@@ -3,9 +3,6 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
types: [ opened, synchronize, reopened, edited ]
|
types: [ opened, synchronize, reopened, edited ]
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -15,7 +12,7 @@ jobs:
|
|||||||
- name: 'Setup Environment'
|
- name: 'Setup Environment'
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: '3.10'
|
python-version: 3.8
|
||||||
|
|
||||||
- name: 'Clone repo'
|
- name: 'Clone repo'
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|||||||
39
.github/workflows/generate-pot-file.yml
vendored
39
.github/workflows/generate-pot-file.yml
vendored
@@ -1,39 +0,0 @@
|
|||||||
# This workflow is agnostic to branches. Only maintain on develop branch.
|
|
||||||
# To add/remove branches just modify the matrix.
|
|
||||||
|
|
||||||
name: Regenerate POT file (translatable strings)
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
# 9:30 UTC => 3 PM IST Sunday
|
|
||||||
- cron: "30 9 * * 0"
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
regenerate-pot-file:
|
|
||||||
name: Regenerate POT file
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
branch: ["develop"]
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
ref: ${{ matrix.branch }}
|
|
||||||
|
|
||||||
- name: Setup Python
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: "3.12"
|
|
||||||
|
|
||||||
- name: Run script to update POT file
|
|
||||||
run: |
|
|
||||||
bash ${GITHUB_WORKSPACE}/.github/helper/update_pot_file.sh
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
|
||||||
BASE_BRANCH: ${{ matrix.branch }}
|
|
||||||
PR_REVIEWER: barredterra # change to your GitHub username if you copied this file
|
|
||||||
36
.github/workflows/initiate_release.yml
vendored
36
.github/workflows/initiate_release.yml
vendored
@@ -1,36 +0,0 @@
|
|||||||
# This workflow is agnostic to branches. Only maintain on develop branch.
|
|
||||||
# To add/remove versions just modify the matrix.
|
|
||||||
|
|
||||||
name: Create weekly release pull requests
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
# 9:30 UTC => 3 PM IST Tuesday
|
|
||||||
- cron: "30 9 * * 2"
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
stable-release:
|
|
||||||
name: Release
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
version: ["14", "15"]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: octokit/request-action@v2.x
|
|
||||||
with:
|
|
||||||
route: POST /repos/{owner}/{repo}/pulls
|
|
||||||
owner: frappe
|
|
||||||
repo: erpnext
|
|
||||||
title: |-
|
|
||||||
"chore: release v${{ matrix.version }}"
|
|
||||||
body: "Automated weekly release."
|
|
||||||
base: version-${{ matrix.version }}
|
|
||||||
head: version-${{ matrix.version }}-hotfix
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
|
||||||
30
.github/workflows/label-base-on-title.yml
vendored
30
.github/workflows/label-base-on-title.yml
vendored
@@ -1,30 +0,0 @@
|
|||||||
name: "Auto-label PRs based on title"
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request_target:
|
|
||||||
types: [opened, reopened]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
add-label-if-prefix-matches:
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
pull-requests: write
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Check PR title and add label if it matches prefixes
|
|
||||||
uses: actions/github-script@v7
|
|
||||||
continue-on-error: true
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
const title = context.payload.pull_request.title.toLowerCase();
|
|
||||||
const prefixes = ['chore', 'ci', 'style', 'test', 'refactor'];
|
|
||||||
|
|
||||||
// Check if the PR title starts with any of the prefixes
|
|
||||||
if (prefixes.some(prefix => title.startsWith(prefix))) {
|
|
||||||
await github.rest.issues.addLabels({
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
issue_number: context.payload.pull_request.number,
|
|
||||||
labels: ['skip-release-notes']
|
|
||||||
});
|
|
||||||
}
|
|
||||||
4
.github/workflows/labeller.yml
vendored
4
.github/workflows/labeller.yml
vendored
@@ -3,10 +3,6 @@ on:
|
|||||||
pull_request_target:
|
pull_request_target:
|
||||||
types: [opened, reopened]
|
types: [opened, reopened]
|
||||||
|
|
||||||
permissions:
|
|
||||||
issues: write
|
|
||||||
pull-requests: write
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
triage:
|
triage:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
38
.github/workflows/linters.yml
vendored
38
.github/workflows/linters.yml
vendored
@@ -3,43 +3,29 @@ name: Linters
|
|||||||
on:
|
on:
|
||||||
pull_request: { }
|
pull_request: { }
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
linters:
|
linters:
|
||||||
name: linters
|
name: linters
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Set up Python 3.10
|
- name: Set up Python 3.8
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: '3.10'
|
python-version: 3.8
|
||||||
cache: pip
|
|
||||||
|
|
||||||
- name: Install and Run Pre-commit
|
- name: Install and Run Pre-commit
|
||||||
uses: pre-commit/action@v3.0.0
|
uses: pre-commit/action@v2.0.3
|
||||||
|
|
||||||
semgrep:
|
|
||||||
name: semgrep
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Set up Python 3.10
|
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: '3.10'
|
|
||||||
cache: pip
|
|
||||||
|
|
||||||
- name: Download Semgrep rules
|
- name: Download Semgrep rules
|
||||||
run: git clone --depth 1 https://github.com/frappe/semgrep-rules.git frappe-semgrep-rules
|
run: git clone --depth 1 https://github.com/frappe/semgrep-rules.git frappe-semgrep-rules
|
||||||
|
|
||||||
- name: Download semgrep
|
- uses: returntocorp/semgrep-action@v1
|
||||||
run: pip install semgrep
|
env:
|
||||||
|
SEMGREP_TIMEOUT: 120
|
||||||
- name: Run Semgrep rules
|
with:
|
||||||
run: semgrep ci --config ./frappe-semgrep-rules/rules --config r/python.lang.correctness
|
config: >-
|
||||||
|
r/python.lang.correctness
|
||||||
|
./frappe-semgrep-rules/rules
|
||||||
|
|||||||
21
.github/workflows/lock.yml
vendored
21
.github/workflows/lock.yml
vendored
@@ -1,21 +0,0 @@
|
|||||||
name: 'Lock threads'
|
|
||||||
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: '0 0 * * *'
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
issues: write
|
|
||||||
pull-requests: write
|
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
lock:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: dessant/lock-threads@v5
|
|
||||||
with:
|
|
||||||
github-token: ${{ github.token }}
|
|
||||||
issue-inactive-days: 14
|
|
||||||
pr-inactive-days: 14
|
|
||||||
102
.github/workflows/patch.yml
vendored
102
.github/workflows/patch.yml
vendored
@@ -10,11 +10,8 @@ on:
|
|||||||
- '**.csv'
|
- '**.csv'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: patch-develop-${{ github.event_name }}-${{ github.event.number || github.event_name == 'workflow_dispatch' && github.run_id || '' }}
|
group: patch-develop-${{ github.event.number }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -26,50 +23,42 @@ jobs:
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
mysql:
|
mysql:
|
||||||
image: mariadb:10.6
|
image: mariadb:10.3
|
||||||
env:
|
env:
|
||||||
MARIADB_ROOT_PASSWORD: 'root'
|
MYSQL_ALLOW_EMPTY_PASSWORD: YES
|
||||||
ports:
|
ports:
|
||||||
- 3306:3306
|
- 3306:3306
|
||||||
options: --health-cmd="mariadb-admin ping" --health-interval=5s --health-timeout=2s --health-retries=3
|
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Clone
|
- name: Clone
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Check for valid Python & Merge Conflicts
|
|
||||||
run: |
|
|
||||||
python -m compileall -fq "${GITHUB_WORKSPACE}"
|
|
||||||
if grep -lr --exclude-dir=node_modules "^<<<<<<< " "${GITHUB_WORKSPACE}"
|
|
||||||
then echo "Found merge conflicts"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: 3.8
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 14
|
||||||
check-latest: true
|
check-latest: true
|
||||||
|
|
||||||
- name: Add to Hosts
|
- name: Add to Hosts
|
||||||
run: echo "127.0.0.1 test_site" | sudo tee -a /etc/hosts
|
run: echo "127.0.0.1 test_site" | sudo tee -a /etc/hosts
|
||||||
|
|
||||||
- name: Cache pip
|
- name: Cache pip
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ~/.cache/pip
|
path: ~/.cache/pip
|
||||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt', '**/pyproject.toml') }}
|
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-pip-
|
${{ runner.os }}-pip-
|
||||||
${{ runner.os }}-
|
${{ runner.os }}-
|
||||||
|
|
||||||
- name: Cache node modules
|
- name: Cache node modules
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v2
|
||||||
env:
|
env:
|
||||||
cache-name: cache-node-modules
|
cache-name: cache-node-modules
|
||||||
with:
|
with:
|
||||||
@@ -84,7 +73,7 @@ jobs:
|
|||||||
id: yarn-cache-dir-path
|
id: yarn-cache-dir-path
|
||||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||||
|
|
||||||
- uses: actions/cache@v4
|
- uses: actions/cache@v2
|
||||||
id: yarn-cache
|
id: yarn-cache
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||||
@@ -93,9 +82,7 @@ jobs:
|
|||||||
${{ runner.os }}-yarn-
|
${{ runner.os }}-yarn-
|
||||||
|
|
||||||
- name: Install
|
- name: Install
|
||||||
run: |
|
run: bash ${GITHUB_WORKSPACE}/.github/helper/install.sh
|
||||||
pip install frappe-bench
|
|
||||||
bash ${GITHUB_WORKSPACE}/.github/helper/install.sh
|
|
||||||
env:
|
env:
|
||||||
DB: mariadb
|
DB: mariadb
|
||||||
TYPE: server
|
TYPE: server
|
||||||
@@ -103,62 +90,29 @@ jobs:
|
|||||||
- name: Run Patch Tests
|
- name: Run Patch Tests
|
||||||
run: |
|
run: |
|
||||||
cd ~/frappe-bench/
|
cd ~/frappe-bench/
|
||||||
bench remove-app payments --force
|
wget https://erpnext.com/files/v10-erpnext.sql.gz
|
||||||
jq 'del(.install_apps)' ~/frappe-bench/sites/test_site/site_config.json > tmp.json
|
bench --site test_site --force restore ~/frappe-bench/v10-erpnext.sql.gz
|
||||||
mv tmp.json ~/frappe-bench/sites/test_site/site_config.json
|
|
||||||
|
|
||||||
wget https://erpnext.com/files/v13-erpnext.sql.gz
|
|
||||||
bench --site test_site --force restore ~/frappe-bench/v13-erpnext.sql.gz
|
|
||||||
|
|
||||||
git -C "apps/frappe" remote set-url upstream https://github.com/frappe/frappe.git
|
git -C "apps/frappe" remote set-url upstream https://github.com/frappe/frappe.git
|
||||||
git -C "apps/erpnext" remote set-url upstream https://github.com/frappe/erpnext.git
|
git -C "apps/erpnext" remote set-url upstream https://github.com/frappe/erpnext.git
|
||||||
|
|
||||||
|
for version in $(seq 12 13)
|
||||||
|
do
|
||||||
|
echo "Updating to v$version"
|
||||||
|
branch_name="version-$version-hotfix"
|
||||||
|
|
||||||
function update_to_version() {
|
git -C "apps/frappe" fetch --depth 1 upstream $branch_name:$branch_name
|
||||||
version=$1
|
git -C "apps/erpnext" fetch --depth 1 upstream $branch_name:$branch_name
|
||||||
|
|
||||||
branch_name="version-$version-hotfix"
|
git -C "apps/frappe" checkout -q -f $branch_name
|
||||||
echo "Updating to v$version"
|
git -C "apps/erpnext" checkout -q -f $branch_name
|
||||||
|
|
||||||
# Fetch and checkout branches
|
bench setup requirements --python
|
||||||
git -C "apps/frappe" fetch --depth 1 upstream $branch_name:$branch_name
|
bench --site test_site migrate
|
||||||
git -C "apps/erpnext" fetch --depth 1 upstream $branch_name:$branch_name
|
done
|
||||||
git -C "apps/frappe" checkout -q -f $branch_name
|
|
||||||
git -C "apps/erpnext" checkout -q -f $branch_name
|
|
||||||
|
|
||||||
# Resetup env and install apps
|
|
||||||
pgrep honcho | xargs kill
|
|
||||||
rm -rf ~/frappe-bench/env
|
|
||||||
bench -v setup env
|
|
||||||
bench pip install -e ./apps/erpnext
|
|
||||||
bench start &>> ~/frappe-bench/bench_start.log &
|
|
||||||
|
|
||||||
bench --site test_site migrate
|
|
||||||
}
|
|
||||||
|
|
||||||
update_to_version 14
|
|
||||||
update_to_version 15
|
|
||||||
|
|
||||||
echo "Updating to latest version"
|
echo "Updating to latest version"
|
||||||
git -C "apps/frappe" fetch --depth 1 upstream "${GITHUB_BASE_REF:-${GITHUB_REF##*/}}"
|
git -C "apps/frappe" checkout -q -f "${GITHUB_BASE_REF:-${GITHUB_REF##*/}}"
|
||||||
git -C "apps/frappe" checkout -q -f FETCH_HEAD
|
|
||||||
git -C "apps/erpnext" checkout -q -f "$GITHUB_SHA"
|
git -C "apps/erpnext" checkout -q -f "$GITHUB_SHA"
|
||||||
|
|
||||||
pgrep honcho | xargs kill
|
|
||||||
rm -rf ~/frappe-bench/env
|
|
||||||
bench -v setup env
|
|
||||||
bench pip install -e ./apps/erpnext
|
|
||||||
bench start &>> ~/frappe-bench/bench_start.log &
|
|
||||||
|
|
||||||
bench --site test_site migrate
|
bench --site test_site migrate
|
||||||
|
|
||||||
- name: Show bench output
|
|
||||||
if: ${{ always() }}
|
|
||||||
run: |
|
|
||||||
cd ~/frappe-bench
|
|
||||||
cat bench_start.log || true
|
|
||||||
cd logs
|
|
||||||
for f in ./*.log*; do
|
|
||||||
echo "Printing log: $f";
|
|
||||||
cat $f
|
|
||||||
done
|
|
||||||
|
|||||||
25
.github/workflows/patch_faux.yml
vendored
25
.github/workflows/patch_faux.yml
vendored
@@ -1,25 +0,0 @@
|
|||||||
# Tests are skipped for these files but github doesn't allow "passing" hence this is required.
|
|
||||||
|
|
||||||
name: Skipped Patch Test
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- "**.js"
|
|
||||||
- "**.css"
|
|
||||||
- "**.md"
|
|
||||||
- "**.html"
|
|
||||||
- "**.csv"
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
name: Patch Test
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Pass skipped tests unconditionally
|
|
||||||
run: "echo Skipped"
|
|
||||||
35
.github/workflows/release.yml
vendored
35
.github/workflows/release.yml
vendored
@@ -1,35 +0,0 @@
|
|||||||
name: Generate Semantic Release
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- version-13
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
release:
|
|
||||||
name: Release
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout Entire Repository
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Setup Node.js
|
|
||||||
uses: actions/setup-node@v2
|
|
||||||
with:
|
|
||||||
node-version: 20
|
|
||||||
- name: Setup dependencies
|
|
||||||
run: |
|
|
||||||
npm install @semantic-release/git @semantic-release/exec --no-save
|
|
||||||
- name: Create Release
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
|
||||||
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
|
||||||
GIT_AUTHOR_NAME: "Frappe PR Bot"
|
|
||||||
GIT_AUTHOR_EMAIL: "developers@frappe.io"
|
|
||||||
GIT_COMMITTER_NAME: "Frappe PR Bot"
|
|
||||||
GIT_COMMITTER_EMAIL: "developers@frappe.io"
|
|
||||||
run: npx semantic-release
|
|
||||||
42
.github/workflows/release_notes.yml
vendored
42
.github/workflows/release_notes.yml
vendored
@@ -1,42 +0,0 @@
|
|||||||
# This action:
|
|
||||||
#
|
|
||||||
# 1. Generates release notes using github API.
|
|
||||||
# 2. Strips unnecessary info like chore/style etc from notes.
|
|
||||||
# 3. Updates release info.
|
|
||||||
|
|
||||||
# This action needs to be maintained on all branches that do releases.
|
|
||||||
|
|
||||||
name: 'Release Notes'
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
tag_name:
|
|
||||||
description: 'Tag of release like v13.0.0'
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
release:
|
|
||||||
types: [released]
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
regen-notes:
|
|
||||||
name: 'Regenerate release notes'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Update notes
|
|
||||||
run: |
|
|
||||||
NEW_NOTES=$(gh api --method POST -H "Accept: application/vnd.github+json" /repos/frappe/erpnext/releases/generate-notes -f tag_name=$RELEASE_TAG \
|
|
||||||
| jq -r '.body' \
|
|
||||||
| sed -E '/^\* (chore|ci|test|docs|style)/d' \
|
|
||||||
| sed -E 's/by @mergify //'
|
|
||||||
)
|
|
||||||
RELEASE_ID=$(gh api -H "Accept: application/vnd.github+json" /repos/frappe/erpnext/releases/tags/$RELEASE_TAG | jq -r '.id')
|
|
||||||
gh api --method PATCH -H "Accept: application/vnd.github+json" /repos/frappe/erpnext/releases/$RELEASE_ID -f body="$NEW_NOTES"
|
|
||||||
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
|
||||||
RELEASE_TAG: ${{ github.event.inputs.tag_name || github.event.release.tag_name }}
|
|
||||||
133
.github/workflows/run-indinvidual-tests.yml
vendored
133
.github/workflows/run-indinvidual-tests.yml
vendored
@@ -1,133 +0,0 @@
|
|||||||
name: Individual
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: server-individual-tests-develop-${{ github.event_name }}-${{ github.event.number || github.event_name == 'workflow_dispatch' && github.run_id || '' }}
|
|
||||||
cancel-in-progress: false
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
discover:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
outputs:
|
|
||||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
|
||||||
steps:
|
|
||||||
- name: Clone
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- id: set-matrix
|
|
||||||
run: |
|
|
||||||
# Use grep and find to get the list of test files
|
|
||||||
matrix=$(find . -path '*/doctype/*/test_*.py' | xargs grep -l 'def test_' | awk '{
|
|
||||||
# Remove ./ prefix, file extension, and replace / with .
|
|
||||||
gsub(/^\.\//, "", $0)
|
|
||||||
gsub(/\.py$/, "", $0)
|
|
||||||
gsub(/\//, ".", $0)
|
|
||||||
# Add to array
|
|
||||||
tests[NR] = $0
|
|
||||||
}
|
|
||||||
END {
|
|
||||||
# Start JSON array
|
|
||||||
printf "{\n \"include\": [\n"
|
|
||||||
# Loop through array and create JSON objects
|
|
||||||
for (i=1; i<=NR; i++) {
|
|
||||||
printf " {\"test\": \"%s\"}", tests[i]
|
|
||||||
if (i < NR) printf ","
|
|
||||||
printf "\n"
|
|
||||||
}
|
|
||||||
# Close JSON array
|
|
||||||
printf " ]\n}"
|
|
||||||
}')
|
|
||||||
|
|
||||||
# Output the matrix
|
|
||||||
echo "matrix=$(echo "$matrix" | jq -c)" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
# For debugging (optional)
|
|
||||||
echo "Generated matrix:"
|
|
||||||
echo "$matrix"
|
|
||||||
test:
|
|
||||||
needs: discover
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 60
|
|
||||||
env:
|
|
||||||
NODE_ENV: "production"
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix: ${{fromJson(needs.discover.outputs.matrix)}}
|
|
||||||
|
|
||||||
name: Test
|
|
||||||
|
|
||||||
services:
|
|
||||||
mysql:
|
|
||||||
image: mariadb:10.6
|
|
||||||
env:
|
|
||||||
MARIADB_ROOT_PASSWORD: 'root'
|
|
||||||
ports:
|
|
||||||
- 3306:3306
|
|
||||||
options: --health-cmd="mariadb-admin ping" --health-interval=5s --health-timeout=2s --health-retries=3
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Clone
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup Python
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: '3.12'
|
|
||||||
|
|
||||||
- name: Setup Node
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 18
|
|
||||||
check-latest: true
|
|
||||||
|
|
||||||
- name: Add to Hosts
|
|
||||||
run: echo "127.0.0.1 test_site" | sudo tee -a /etc/hosts
|
|
||||||
|
|
||||||
- name: Cache pip
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: ~/.cache/pip
|
|
||||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt', '**/pyproject.toml') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pip-
|
|
||||||
${{ runner.os }}-
|
|
||||||
|
|
||||||
- name: Cache node modules
|
|
||||||
uses: actions/cache@v4
|
|
||||||
env:
|
|
||||||
cache-name: cache-node-modules
|
|
||||||
with:
|
|
||||||
path: ~/.npm
|
|
||||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-build-${{ env.cache-name }}-
|
|
||||||
${{ runner.os }}-build-
|
|
||||||
${{ runner.os }}-
|
|
||||||
|
|
||||||
- name: Get yarn cache directory path
|
|
||||||
id: yarn-cache-dir-path
|
|
||||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
||||||
|
|
||||||
- uses: actions/cache@v4
|
|
||||||
id: yarn-cache
|
|
||||||
with:
|
|
||||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
||||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-yarn-
|
|
||||||
|
|
||||||
- name: Install
|
|
||||||
run: bash ${GITHUB_WORKSPACE}/.github/helper/install.sh
|
|
||||||
env:
|
|
||||||
DB: mariadb
|
|
||||||
TYPE: server
|
|
||||||
FRAPPE_USER: ${{ github.event.inputs.user }}
|
|
||||||
FRAPPE_BRANCH: ${{ github.event.inputs.branch }}
|
|
||||||
|
|
||||||
- name: Run Tests
|
|
||||||
run: 'cd ~/frappe-bench/ && bench --site test_site run-tests --app erpnext --module ${{ matrix.test }}'
|
|
||||||
30
.github/workflows/semantic-commits.yml
vendored
30
.github/workflows/semantic-commits.yml
vendored
@@ -1,30 +0,0 @@
|
|||||||
name: Semantic Commits
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request: {}
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: commitcheck-erpnext-${{ github.event.number }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
commitlint:
|
|
||||||
name: Check Commit Titles
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
fetch-depth: 200
|
|
||||||
|
|
||||||
- uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 18
|
|
||||||
check-latest: true
|
|
||||||
|
|
||||||
- name: Check commit titles
|
|
||||||
run: |
|
|
||||||
npm install @commitlint/cli @commitlint/config-conventional
|
|
||||||
npx commitlint --verbose --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }}
|
|
||||||
27
.github/workflows/server-tests-mariadb-faux.yml
vendored
27
.github/workflows/server-tests-mariadb-faux.yml
vendored
@@ -1,27 +0,0 @@
|
|||||||
# Tests are skipped for these files but github doesn't allow "passing" hence this is required.
|
|
||||||
|
|
||||||
name: Skipped Tests
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- "**.js"
|
|
||||||
- "**.css"
|
|
||||||
- "**.md"
|
|
||||||
- "**.html"
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
container: [1, 2, 3, 4]
|
|
||||||
|
|
||||||
name: Python Unit Tests
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Pass skipped tests unconditionally
|
|
||||||
run: "echo Skipped"
|
|
||||||
92
.github/workflows/server-tests-mariadb.yml
vendored
92
.github/workflows/server-tests-mariadb.yml
vendored
@@ -1,99 +1,86 @@
|
|||||||
name: Server (Mariadb)
|
name: Server (Mariadb)
|
||||||
|
|
||||||
on:
|
on:
|
||||||
repository_dispatch:
|
|
||||||
types: [frappe-framework-change]
|
|
||||||
pull_request:
|
pull_request:
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- '**.js'
|
- '**.js'
|
||||||
- '**.css'
|
- '**.css'
|
||||||
- '**.md'
|
- '**.md'
|
||||||
- '**.html'
|
- '**.html'
|
||||||
schedule:
|
- '**.csv'
|
||||||
# Run everday at midnight UTC / 5:30 IST
|
push:
|
||||||
- cron: "0 0 * * *"
|
branches: [ develop ]
|
||||||
|
paths-ignore:
|
||||||
|
- '**.js'
|
||||||
|
- '**.md'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
user:
|
user:
|
||||||
description: 'Frappe Framework repository user (add your username for forks)'
|
description: 'user'
|
||||||
required: true
|
required: true
|
||||||
default: 'frappe'
|
default: 'frappe'
|
||||||
type: string
|
type: string
|
||||||
branch:
|
branch:
|
||||||
description: 'Frappe Framework branch'
|
description: 'Branch name'
|
||||||
default: 'develop'
|
default: 'develop'
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: server-mariadb-develop-${{ github.event_name }}-${{ github.event.number || github.event_name == 'workflow_dispatch' && github.run_id || '' }}
|
group: server-mariadb-develop-${{ github.event.number }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
env:
|
|
||||||
NODE_ENV: "production"
|
|
||||||
WITH_COVERAGE: ${{ github.event_name != 'pull_request' }}
|
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
container: [1, 2, 3, 4]
|
container: [1, 2, 3]
|
||||||
|
|
||||||
name: Python Unit Tests
|
name: Python Unit Tests
|
||||||
|
|
||||||
services:
|
services:
|
||||||
mysql:
|
mysql:
|
||||||
image: mariadb:10.6
|
image: mariadb:10.3
|
||||||
env:
|
env:
|
||||||
MARIADB_ROOT_PASSWORD: 'root'
|
MYSQL_ALLOW_EMPTY_PASSWORD: YES
|
||||||
ports:
|
ports:
|
||||||
- 3306:3306
|
- 3306:3306
|
||||||
options: --health-cmd="mariadb-admin ping" --health-interval=5s --health-timeout=2s --health-retries=3
|
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Clone
|
- name: Clone
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: '3.12'
|
python-version: 3.8
|
||||||
|
|
||||||
- name: Check for valid Python & Merge Conflicts
|
|
||||||
run: |
|
|
||||||
python -m compileall -fq "${GITHUB_WORKSPACE}"
|
|
||||||
if grep -lr --exclude-dir=node_modules "^<<<<<<< " "${GITHUB_WORKSPACE}"
|
|
||||||
then echo "Found merge conflicts"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 14
|
||||||
check-latest: true
|
check-latest: true
|
||||||
|
|
||||||
- name: Add to Hosts
|
- name: Add to Hosts
|
||||||
run: echo "127.0.0.1 test_site" | sudo tee -a /etc/hosts
|
run: echo "127.0.0.1 test_site" | sudo tee -a /etc/hosts
|
||||||
|
|
||||||
- name: Cache pip
|
- name: Cache pip
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ~/.cache/pip
|
path: ~/.cache/pip
|
||||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt', '**/pyproject.toml') }}
|
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-pip-
|
${{ runner.os }}-pip-
|
||||||
${{ runner.os }}-
|
${{ runner.os }}-
|
||||||
|
|
||||||
- name: Cache node modules
|
- name: Cache node modules
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v2
|
||||||
env:
|
env:
|
||||||
cache-name: cache-node-modules
|
cache-name: cache-node-modules
|
||||||
with:
|
with:
|
||||||
@@ -108,7 +95,7 @@ jobs:
|
|||||||
id: yarn-cache-dir-path
|
id: yarn-cache-dir-path
|
||||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||||
|
|
||||||
- uses: actions/cache@v4
|
- uses: actions/cache@v2
|
||||||
id: yarn-cache
|
id: yarn-cache
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||||
@@ -122,42 +109,19 @@ jobs:
|
|||||||
DB: mariadb
|
DB: mariadb
|
||||||
TYPE: server
|
TYPE: server
|
||||||
FRAPPE_USER: ${{ github.event.inputs.user }}
|
FRAPPE_USER: ${{ github.event.inputs.user }}
|
||||||
FRAPPE_BRANCH: ${{ github.event.client_payload.sha || github.event.inputs.branch }}
|
FRAPPE_BRANCH: ${{ github.event.inputs.branch }}
|
||||||
|
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
run: 'cd ~/frappe-bench/ && bench --site test_site run-parallel-tests --app erpnext --total-builds ${{ strategy.job-total }} --build-number ${{ matrix.container }}'
|
run: cd ~/frappe-bench/ && bench --site test_site run-parallel-tests --app erpnext --use-orchestrator --with-coverage
|
||||||
env:
|
env:
|
||||||
TYPE: server
|
TYPE: server
|
||||||
CAPTURE_COVERAGE: ${{ github.event_name != 'pull_request' }}
|
CI_BUILD_ID: ${{ github.run_id }}
|
||||||
|
ORCHESTRATOR_URL: http://test-orchestrator.frappe.io
|
||||||
|
|
||||||
- name: Show bench output
|
|
||||||
if: ${{ always() }}
|
|
||||||
run: cat ~/frappe-bench/bench_start.log || true
|
|
||||||
|
|
||||||
- name: Upload coverage data
|
- name: Upload coverage data
|
||||||
uses: actions/upload-artifact@v4
|
uses: codecov/codecov-action@v2
|
||||||
if: github.event_name != 'pull_request'
|
|
||||||
with:
|
|
||||||
name: coverage-${{ matrix.container }}
|
|
||||||
path: /home/runner/frappe-bench/sites/coverage.xml
|
|
||||||
|
|
||||||
coverage:
|
|
||||||
name: Coverage Wrap Up
|
|
||||||
needs: test
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: ${{ github.event_name != 'pull_request' }}
|
|
||||||
steps:
|
|
||||||
- name: Clone
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Download artifacts
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
|
|
||||||
- name: Upload coverage data
|
|
||||||
uses: codecov/codecov-action@v4
|
|
||||||
with:
|
with:
|
||||||
name: MariaDB
|
name: MariaDB
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
|
||||||
fail_ci_if_error: true
|
fail_ci_if_error: true
|
||||||
|
files: /home/runner/frappe-bench/sites/coverage.xml
|
||||||
verbose: true
|
verbose: true
|
||||||
|
|||||||
34
.github/workflows/server-tests-postgres.yml
vendored
34
.github/workflows/server-tests-postgres.yml
vendored
@@ -9,12 +9,9 @@ on:
|
|||||||
types: [opened, labelled, synchronize, reopened]
|
types: [opened, labelled, synchronize, reopened]
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: server-postgres-develop-${{ github.event_name }}-${{ github.event.number || github.event_name == 'workflow_dispatch' && github.run_id || '' }}
|
group: server-postgres-develop-${{ github.event.number }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
if: ${{ contains(github.event.pull_request.labels.*.name, 'postgres') }}
|
if: ${{ contains(github.event.pull_request.labels.*.name, 'postgres') }}
|
||||||
@@ -24,7 +21,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
container: [1]
|
container: [1, 2, 3]
|
||||||
|
|
||||||
name: Python Unit Tests
|
name: Python Unit Tests
|
||||||
|
|
||||||
@@ -44,41 +41,33 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Clone
|
- name: Clone
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: '3.12'
|
python-version: 3.8
|
||||||
|
|
||||||
- name: Check for valid Python & Merge Conflicts
|
|
||||||
run: |
|
|
||||||
python -m compileall -fq "${GITHUB_WORKSPACE}"
|
|
||||||
if grep -lr --exclude-dir=node_modules "^<<<<<<< " "${GITHUB_WORKSPACE}"
|
|
||||||
then echo "Found merge conflicts"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 14
|
||||||
check-latest: true
|
check-latest: true
|
||||||
|
|
||||||
- name: Add to Hosts
|
- name: Add to Hosts
|
||||||
run: echo "127.0.0.1 test_site" | sudo tee -a /etc/hosts
|
run: echo "127.0.0.1 test_site" | sudo tee -a /etc/hosts
|
||||||
|
|
||||||
- name: Cache pip
|
- name: Cache pip
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ~/.cache/pip
|
path: ~/.cache/pip
|
||||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt', '**/pyproject.toml') }}
|
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-pip-
|
${{ runner.os }}-pip-
|
||||||
${{ runner.os }}-
|
${{ runner.os }}-
|
||||||
|
|
||||||
- name: Cache node modules
|
- name: Cache node modules
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v2
|
||||||
env:
|
env:
|
||||||
cache-name: cache-node-modules
|
cache-name: cache-node-modules
|
||||||
with:
|
with:
|
||||||
@@ -93,7 +82,7 @@ jobs:
|
|||||||
id: yarn-cache-dir-path
|
id: yarn-cache-dir-path
|
||||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||||
|
|
||||||
- uses: actions/cache@v4
|
- uses: actions/cache@v2
|
||||||
id: yarn-cache
|
id: yarn-cache
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||||
@@ -101,6 +90,7 @@ jobs:
|
|||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-yarn-
|
${{ runner.os }}-yarn-
|
||||||
|
|
||||||
|
|
||||||
- name: Install
|
- name: Install
|
||||||
run: bash ${GITHUB_WORKSPACE}/.github/helper/install.sh
|
run: bash ${GITHUB_WORKSPACE}/.github/helper/install.sh
|
||||||
env:
|
env:
|
||||||
|
|||||||
6
.gitignore
vendored
6
.gitignore
vendored
@@ -2,6 +2,7 @@
|
|||||||
*.py~
|
*.py~
|
||||||
.DS_Store
|
.DS_Store
|
||||||
conf.py
|
conf.py
|
||||||
|
locale
|
||||||
latest_updates.json
|
latest_updates.json
|
||||||
.wnf-lang-status
|
.wnf-lang-status
|
||||||
*.egg-info
|
*.egg-info
|
||||||
@@ -14,8 +15,5 @@ __pycache__
|
|||||||
*~
|
*~
|
||||||
.idea/
|
.idea/
|
||||||
.vscode/
|
.vscode/
|
||||||
.helix/
|
|
||||||
node_modules/
|
node_modules/
|
||||||
.backportrc.json
|
.backportrc.json
|
||||||
# Aider AI Chat
|
|
||||||
.aider*
|
|
||||||
85
.mergify.yml
85
.mergify.yml
@@ -2,27 +2,23 @@ pull_request_rules:
|
|||||||
- name: Auto-close PRs on stable branch
|
- name: Auto-close PRs on stable branch
|
||||||
conditions:
|
conditions:
|
||||||
- and:
|
- and:
|
||||||
- and:
|
- and:
|
||||||
- author!=surajshetty3416
|
- author!=surajshetty3416
|
||||||
- author!=gavindsouza
|
- author!=gavindsouza
|
||||||
- author!=rohitwaghchaure
|
- author!=rohitwaghchaure
|
||||||
- author!=nabinhait
|
- author!=nabinhait
|
||||||
- author!=ankush
|
- author!=ankush
|
||||||
- author!=deepeshgarg007
|
- author!=deepeshgarg007
|
||||||
- author!=frappe-pr-bot
|
- or:
|
||||||
- author!=mergify[bot]
|
- base=version-13
|
||||||
- or:
|
- base=version-12
|
||||||
- base=version-13
|
|
||||||
- base=version-12
|
|
||||||
- base=version-14
|
|
||||||
- base=version-15
|
|
||||||
- base=version-16
|
|
||||||
actions:
|
actions:
|
||||||
close:
|
close:
|
||||||
comment:
|
comment:
|
||||||
message: |
|
message: |
|
||||||
@{{author}}, thanks for the contribution, but we do not accept pull requests on a stable branch. Please raise PR on an appropriate hotfix branch.
|
@{{author}}, thanks for the contribution, but we do not accept pull requests on a stable branch. Please raise PR on an appropriate hotfix branch.
|
||||||
https://github.com/frappe/erpnext/wiki/Pull-Request-Checklist#which-branch
|
https://github.com/frappe/erpnext/wiki/Pull-Request-Checklist#which-branch
|
||||||
|
|
||||||
- name: backport to develop
|
- name: backport to develop
|
||||||
conditions:
|
conditions:
|
||||||
- label="backport develop"
|
- label="backport develop"
|
||||||
@@ -32,6 +28,7 @@ pull_request_rules:
|
|||||||
- develop
|
- develop
|
||||||
assignees:
|
assignees:
|
||||||
- "{{ author }}"
|
- "{{ author }}"
|
||||||
|
|
||||||
- name: backport to version-14-hotfix
|
- name: backport to version-14-hotfix
|
||||||
conditions:
|
conditions:
|
||||||
- label="backport version-14-hotfix"
|
- label="backport version-14-hotfix"
|
||||||
@@ -41,15 +38,57 @@ pull_request_rules:
|
|||||||
- version-14-hotfix
|
- version-14-hotfix
|
||||||
assignees:
|
assignees:
|
||||||
- "{{ author }}"
|
- "{{ author }}"
|
||||||
- name: backport to version-15-hotfix
|
|
||||||
|
- name: backport to version-14-pre-release
|
||||||
conditions:
|
conditions:
|
||||||
- label="backport version-15-hotfix"
|
- label="backport version-14-pre-release"
|
||||||
actions:
|
actions:
|
||||||
backport:
|
backport:
|
||||||
branches:
|
branches:
|
||||||
- version-15-hotfix
|
- version-14-pre-release
|
||||||
assignees:
|
assignees:
|
||||||
- "{{ author }}"
|
- "{{ author }}"
|
||||||
|
|
||||||
|
- name: backport to version-13-hotfix
|
||||||
|
conditions:
|
||||||
|
- label="backport version-13-hotfix"
|
||||||
|
actions:
|
||||||
|
backport:
|
||||||
|
branches:
|
||||||
|
- version-13-hotfix
|
||||||
|
assignees:
|
||||||
|
- "{{ author }}"
|
||||||
|
|
||||||
|
- name: backport to version-13-pre-release
|
||||||
|
conditions:
|
||||||
|
- label="backport version-13-pre-release"
|
||||||
|
actions:
|
||||||
|
backport:
|
||||||
|
branches:
|
||||||
|
- version-13-pre-release
|
||||||
|
assignees:
|
||||||
|
- "{{ author }}"
|
||||||
|
|
||||||
|
- name: backport to version-12-hotfix
|
||||||
|
conditions:
|
||||||
|
- label="backport version-12-hotfix"
|
||||||
|
actions:
|
||||||
|
backport:
|
||||||
|
branches:
|
||||||
|
- version-12-hotfix
|
||||||
|
assignees:
|
||||||
|
- "{{ author }}"
|
||||||
|
|
||||||
|
- name: backport to version-12-pre-release
|
||||||
|
conditions:
|
||||||
|
- label="backport version-12-pre-release"
|
||||||
|
actions:
|
||||||
|
backport:
|
||||||
|
branches:
|
||||||
|
- version-12-pre-release
|
||||||
|
assignees:
|
||||||
|
- "{{ author }}"
|
||||||
|
|
||||||
- name: Automatic merge on CI success and review
|
- name: Automatic merge on CI success and review
|
||||||
conditions:
|
conditions:
|
||||||
- status-success=linters
|
- status-success=linters
|
||||||
@@ -80,6 +119,6 @@ pull_request_rules:
|
|||||||
merge:
|
merge:
|
||||||
method: squash
|
method: squash
|
||||||
commit_message_template: |
|
commit_message_template: |
|
||||||
{{ title }} (#{{ number }})
|
{{ title }} (#{{ number }})
|
||||||
|
|
||||||
{{ body }}
|
{{ body }}
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
exclude: 'node_modules|.git'
|
exclude: 'node_modules|.git'
|
||||||
default_stages: [pre-commit]
|
default_stages: [commit]
|
||||||
fail_fast: false
|
fail_fast: false
|
||||||
|
|
||||||
|
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
rev: v4.3.0
|
rev: v4.0.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: trailing-whitespace
|
- id: trailing-whitespace
|
||||||
files: "erpnext.*"
|
files: "erpnext.*"
|
||||||
@@ -15,58 +15,29 @@ repos:
|
|||||||
args: ['--branch', 'develop']
|
args: ['--branch', 'develop']
|
||||||
- id: check-merge-conflict
|
- id: check-merge-conflict
|
||||||
- id: check-ast
|
- id: check-ast
|
||||||
- id: check-json
|
|
||||||
- id: check-toml
|
|
||||||
- id: check-yaml
|
|
||||||
- id: debug-statements
|
|
||||||
|
|
||||||
- repo: https://github.com/pre-commit/mirrors-prettier
|
- repo: https://gitlab.com/pycqa/flake8
|
||||||
rev: v2.7.1
|
rev: 3.9.2
|
||||||
hooks:
|
hooks:
|
||||||
- id: prettier
|
- id: flake8
|
||||||
types_or: [javascript, vue, scss]
|
additional_dependencies: [
|
||||||
# Ignore any files that might contain jinja / bundles
|
'flake8-bugbear',
|
||||||
exclude: |
|
]
|
||||||
(?x)^(
|
args: ['--config', '.github/helper/.flake8_strict']
|
||||||
erpnext/public/dist/.*|
|
exclude: ".*setup.py$"
|
||||||
cypress/.*|
|
|
||||||
.*node_modules.*|
|
|
||||||
.*boilerplate.*|
|
|
||||||
erpnext/public/js/controllers/.*|
|
|
||||||
erpnext/templates/pages/order.js|
|
|
||||||
erpnext/templates/includes/.*
|
|
||||||
)$
|
|
||||||
|
|
||||||
- repo: https://github.com/pre-commit/mirrors-eslint
|
- repo: https://github.com/adityahase/black
|
||||||
rev: v8.44.0
|
rev: 9cb0a69f4d0030cdf687eddf314468b39ed54119
|
||||||
hooks:
|
hooks:
|
||||||
- id: eslint
|
- id: black
|
||||||
types_or: [javascript]
|
additional_dependencies: ['click==8.0.4']
|
||||||
args: ['--quiet']
|
|
||||||
# Ignore any files that might contain jinja / bundles
|
|
||||||
exclude: |
|
|
||||||
(?x)^(
|
|
||||||
erpnext/public/dist/.*|
|
|
||||||
cypress/.*|
|
|
||||||
.*node_modules.*|
|
|
||||||
.*boilerplate.*|
|
|
||||||
erpnext/public/js/controllers/.*|
|
|
||||||
erpnext/templates/pages/order.js|
|
|
||||||
erpnext/templates/includes/.*
|
|
||||||
)$
|
|
||||||
|
|
||||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
- repo: https://github.com/timothycrosley/isort
|
||||||
rev: v0.2.0
|
rev: 5.9.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: ruff
|
- id: isort
|
||||||
name: "Run ruff import sorter"
|
exclude: ".*setup.py$"
|
||||||
args: ["--select=I", "--fix"]
|
|
||||||
|
|
||||||
- id: ruff
|
|
||||||
name: "Run ruff linter"
|
|
||||||
|
|
||||||
- id: ruff-format
|
|
||||||
name: "Run ruff formatter"
|
|
||||||
|
|
||||||
ci:
|
ci:
|
||||||
autoupdate_schedule: weekly
|
autoupdate_schedule: weekly
|
||||||
|
|||||||
24
.releaserc
24
.releaserc
@@ -1,24 +0,0 @@
|
|||||||
{
|
|
||||||
"branches": ["version-13"],
|
|
||||||
"plugins": [
|
|
||||||
"@semantic-release/commit-analyzer", {
|
|
||||||
"preset": "angular",
|
|
||||||
"releaseRules": [
|
|
||||||
{"breaking": true, "release": false}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"@semantic-release/release-notes-generator",
|
|
||||||
[
|
|
||||||
"@semantic-release/exec", {
|
|
||||||
"prepareCmd": 'sed -ir "s/[0-9]*\.[0-9]*\.[0-9]*/${nextRelease.version}/" erpnext/__init__.py'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"@semantic-release/git", {
|
|
||||||
"assets": ["erpnext/__init__.py"],
|
|
||||||
"message": "chore(release): Bumped to Version ${nextRelease.version}\n\n${nextRelease.notes}"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"@semantic-release/github"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
43
CODEOWNERS
43
CODEOWNERS
@@ -3,22 +3,33 @@
|
|||||||
# These owners will be the default owners for everything in
|
# These owners will be the default owners for everything in
|
||||||
# the repo. Unless a later match takes precedence,
|
# the repo. Unless a later match takes precedence,
|
||||||
|
|
||||||
erpnext/accounts/ @ruthra-kumar
|
erpnext/accounts/ @nextchamp-saqib @deepeshgarg007
|
||||||
erpnext/assets/ @khushi8112
|
erpnext/assets/ @nextchamp-saqib @deepeshgarg007
|
||||||
erpnext/regional @ruthra-kumar
|
erpnext/erpnext_integrations/ @nextchamp-saqib
|
||||||
erpnext/selling @ruthra-kumar
|
erpnext/loan_management/ @nextchamp-saqib @deepeshgarg007
|
||||||
erpnext/support/ @ruthra-kumar
|
erpnext/regional @nextchamp-saqib @deepeshgarg007
|
||||||
pos*
|
erpnext/selling @nextchamp-saqib @deepeshgarg007
|
||||||
|
erpnext/support/ @nextchamp-saqib @deepeshgarg007
|
||||||
|
pos* @nextchamp-saqib
|
||||||
|
|
||||||
erpnext/buying/ @rohitwaghchaure
|
erpnext/buying/ @marination @rohitwaghchaure @ankush
|
||||||
erpnext/maintenance/ @rohitwaghchaure
|
erpnext/e_commerce/ @marination
|
||||||
erpnext/manufacturing/ @rohitwaghchaure
|
erpnext/maintenance/ @marination @rohitwaghchaure
|
||||||
erpnext/quality_management/ @rohitwaghchaure
|
erpnext/manufacturing/ @marination @rohitwaghchaure @ankush
|
||||||
erpnext/stock/ @rohitwaghchaure
|
erpnext/portal/ @marination
|
||||||
erpnext/subcontracting @rohitwaghchaure
|
erpnext/quality_management/ @marination @rohitwaghchaure
|
||||||
|
erpnext/shopping_cart/ @marination
|
||||||
|
erpnext/stock/ @marination @rohitwaghchaure @ankush
|
||||||
|
|
||||||
erpnext/controllers/ @ruthra-kumar @rohitwaghchaure
|
erpnext/crm/ @ruchamahabal @pateljannat
|
||||||
erpnext/patches/ @ruthra-kumar
|
erpnext/education/ @ruchamahabal @pateljannat
|
||||||
|
erpnext/hr/ @ruchamahabal @pateljannat
|
||||||
|
erpnext/payroll @ruchamahabal @pateljannat
|
||||||
|
erpnext/projects/ @ruchamahabal @pateljannat
|
||||||
|
|
||||||
.github/ @ruthra-kumar
|
erpnext/controllers/ @deepeshgarg007 @nextchamp-saqib @rohitwaghchaure @marination @ankush
|
||||||
pyproject.toml @akhilnarang
|
erpnext/patches/ @deepeshgarg007 @nextchamp-saqib @marination @ankush
|
||||||
|
erpnext/public/ @nextchamp-saqib @marination
|
||||||
|
|
||||||
|
.github/ @ankush
|
||||||
|
requirements.txt @gavindsouza
|
||||||
|
|||||||
216
README.md
216
README.md
@@ -1,161 +1,121 @@
|
|||||||
<div align="center">
|
<div align="center">
|
||||||
<a href="https://frappe.io/erpnext">
|
<img src="https://raw.githubusercontent.com/frappe/erpnext/develop/erpnext/public/images/erpnext-logo.png" height="128">
|
||||||
<img src="./erpnext/public/images/v16/erpnext.svg" alt="ERPNext Logo" height="80px" width="80xp"/>
|
|
||||||
</a>
|
|
||||||
<h2>ERPNext</h2>
|
<h2>ERPNext</h2>
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<p>Powerful, Intuitive and Open-Source ERP</p>
|
<p>ERP made simple</p>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
[](https://frappe.school)<br><br>
|
[](https://github.com/frappe/erpnext/actions/workflows/server-tests.yml)
|
||||||
[](https://github.com/frappe/erpnext/actions/workflows/server-tests-mariadb.yml)
|
[](https://github.com/erpnext/erpnext_ui_tests/actions/workflows/ui-tests.yml)
|
||||||
|
[](https://www.codetriage.com/frappe/erpnext)
|
||||||
|
[](https://codecov.io/gh/frappe/erpnext)
|
||||||
[](https://hub.docker.com/r/frappe/erpnext-worker)
|
[](https://hub.docker.com/r/frappe/erpnext-worker)
|
||||||
|
|
||||||
|
[https://erpnext.com](https://erpnext.com)
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
ERPNext as a monolith includes the following areas for managing businesses:
|
||||||
|
|
||||||
|
1. [Accounting](https://erpnext.com/open-source-accounting)
|
||||||
|
1. [Warehouse Management](https://erpnext.com/distribution/warehouse-management-system)
|
||||||
|
1. [CRM](https://erpnext.com/open-source-crm)
|
||||||
|
1. [Sales](https://erpnext.com/open-source-sales-purchase)
|
||||||
|
1. [Purchase](https://erpnext.com/open-source-sales-purchase)
|
||||||
|
1. [HRMS](https://erpnext.com/open-source-hrms)
|
||||||
|
1. [Project Management](https://erpnext.com/open-source-projects)
|
||||||
|
1. [Support](https://erpnext.com/open-source-help-desk-software)
|
||||||
|
1. [Asset Management](https://erpnext.com/open-source-asset-management-software)
|
||||||
|
1. [Quality Management](https://erpnext.com/docs/user/manual/en/quality-management)
|
||||||
|
1. [Manufacturing](https://erpnext.com/open-source-manufacturing-erp-software)
|
||||||
|
1. [Website Management](https://erpnext.com/open-source-website-builder-software)
|
||||||
|
1. [Customize ERPNext](https://erpnext.com/docs/user/manual/en/customize-erpnext)
|
||||||
|
1. [And More](https://erpnext.com/docs/user/manual/en/)
|
||||||
|
|
||||||
|
ERPNext requires MariaDB.
|
||||||
|
|
||||||
|
ERPNext is built on the [Frappe Framework](https://github.com/frappe/frappe), a full-stack web app framework built with Python & JavaScript.
|
||||||
|
|
||||||
|
- [User Guide](https://erpnext.com/docs/user)
|
||||||
|
- [Discussion Forum](https://discuss.erpnext.com/)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<img src="./erpnext/public/images/v16/hero_image.png"/>
|
<a href="https://frappecloud.com/deploy?apps=frappe,erpnext&source=erpnext_readme">
|
||||||
|
<img src=".github/try-on-f-cloud-button.svg" height="40">
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div align="center">
|
### Containerized Installation
|
||||||
<a href="https://erpnext-demo.frappe.cloud/api/method/erpnext_demo.erpnext_demo.auth.login_demo">Live Demo</a>
|
|
||||||
-
|
|
||||||
<a href="https://frappe.io/erpnext">Website</a>
|
|
||||||
-
|
|
||||||
<a href="https://docs.frappe.io/erpnext/">Documentation</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
## ERPNext
|
Use docker to deploy ERPNext in production or for development of [Frappe](https://github.com/frappe/frappe) apps. See https://github.com/frappe/frappe_docker for more details.
|
||||||
|
|
||||||
100% Open-Source ERP system to help you run your business.
|
### Full Install
|
||||||
|
|
||||||
### Motivation
|
|
||||||
|
|
||||||
Running a business is a complex task - handling invoices, tracking stock, managing personnel and even more ad-hoc activities. In a market where software is sold separately to manage each of these tasks, ERPNext does all of the above and more, for free.
|
|
||||||
|
|
||||||
### Key Features
|
|
||||||
|
|
||||||
- **Accounting**: All the tools you need to manage cash flow in one place, right from recording transactions to summarizing and analyzing financial reports.
|
|
||||||
- **Order Management**: Track inventory levels, replenish stock, and manage sales orders, customers, suppliers, shipments, deliverables, and order fulfillment.
|
|
||||||
- **Manufacturing**: Simplifies the production cycle, helps track material consumption, exhibits capacity planning, handles subcontracting, and more!
|
|
||||||
- **Asset Management**: From purchase to perishment, IT infrastructure to equipment. Cover every branch of your organization, all in one centralized system.
|
|
||||||
- **Projects**: Delivery both internal and external Projects on time, budget and Profitability. Track tasks, timesheets, and issues by project.
|
|
||||||
|
|
||||||
<details open>
|
|
||||||
|
|
||||||
<summary>More</summary>
|
|
||||||
<img src="https://erpnext.com/files/v16_bom.png"/>
|
|
||||||
<img src="https://erpnext.com/files/v16_stock_summary.png"/>
|
|
||||||
<img src="https://erpnext.com/files/v16_job_card.png"/>
|
|
||||||
<img src="https://erpnext.com/files/v16_tasks.png"/>
|
|
||||||
</details>
|
|
||||||
|
|
||||||
### Under the Hood
|
|
||||||
|
|
||||||
- [**Frappe Framework**](https://github.com/frappe/frappe): A full-stack web application framework written in Python and Javascript. The framework provides a robust foundation for building web applications, including a database abstraction layer, user authentication, and a REST API.
|
|
||||||
|
|
||||||
- [**Frappe UI**](https://github.com/frappe/frappe-ui): A Vue-based UI library, to provide a modern user interface. The Frappe UI library provides a variety of components that can be used to build single-page applications on top of the Frappe Framework.
|
|
||||||
|
|
||||||
## Production Setup
|
|
||||||
|
|
||||||
### Managed Hosting
|
|
||||||
|
|
||||||
You can try [Frappe Cloud](https://frappecloud.com), a simple, user-friendly and sophisticated [open-source](https://github.com/frappe/press) platform to host Frappe applications with peace of mind.
|
|
||||||
|
|
||||||
It takes care of installation, setup, upgrades, monitoring, maintenance and support of your Frappe deployments. It is a fully featured developer platform with an ability to manage and control multiple Frappe deployments.
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<a href="https://erpnext-demo.frappe.cloud/app/home" target="_blank">
|
|
||||||
<picture>
|
|
||||||
<source media="(prefers-color-scheme: dark)" srcset="https://frappe.io/files/try-on-fc-white.png">
|
|
||||||
<img src="https://frappe.io/files/try-on-fc-black.png" alt="Try on Frappe Cloud" height="28" />
|
|
||||||
</picture>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Self-Hosted
|
|
||||||
#### Docker
|
|
||||||
|
|
||||||
Prerequisites: docker, docker-compose, git. Refer [Docker Documentation](https://docs.docker.com) for more details on Docker setup.
|
|
||||||
|
|
||||||
Run following commands:
|
|
||||||
|
|
||||||
```
|
|
||||||
git clone https://github.com/frappe/frappe_docker
|
|
||||||
cd frappe_docker
|
|
||||||
docker compose -f pwd.yml up -d
|
|
||||||
```
|
|
||||||
|
|
||||||
After a couple of minutes, site should be accessible on your localhost port: 8080. Use below default login credentials to access the site.
|
|
||||||
- Username: Administrator
|
|
||||||
- Password: admin
|
|
||||||
|
|
||||||
See [Frappe Docker](https://github.com/frappe/frappe_docker?tab=readme-ov-file#to-run-on-arm64-architecture-follow-this-instructions) for ARM based docker setup.
|
|
||||||
|
|
||||||
|
|
||||||
## Development Setup
|
|
||||||
### Manual Install
|
|
||||||
|
|
||||||
The Easy Way: our install script for bench will install all dependencies (e.g. MariaDB). See https://github.com/frappe/bench for more details.
|
The Easy Way: our install script for bench will install all dependencies (e.g. MariaDB). See https://github.com/frappe/bench for more details.
|
||||||
|
|
||||||
New passwords will be created for the ERPNext "Administrator" user, the MariaDB root user, and the frappe user (the script displays the passwords and saves them to ~/frappe_passwords.txt).
|
New passwords will be created for the ERPNext "Administrator" user, the MariaDB root user, and the frappe user (the script displays the passwords and saves them to ~/frappe_passwords.txt).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
### Local
|
## License
|
||||||
|
|
||||||
To setup the repository locally follow the steps mentioned below:
|
GNU/General Public License (see [license.txt](license.txt))
|
||||||
|
|
||||||
1. Setup bench by following the [Installation Steps](https://frappeframework.com/docs/user/en/installation) and start the server
|
The ERPNext code is licensed as GNU General Public License (v3) and the Documentation is licensed as Creative Commons (CC-BY-SA-3.0) and the copyright is owned by Frappe Technologies Pvt Ltd (Frappe) and Contributors.
|
||||||
```
|
|
||||||
bench start
|
|
||||||
```
|
|
||||||
|
|
||||||
2. In a separate terminal window, run the following commands:
|
|
||||||
```
|
|
||||||
# Create a new site
|
|
||||||
bench new-site erpnext.localhost
|
|
||||||
```
|
|
||||||
|
|
||||||
3. Get the ERPNext app and install it
|
|
||||||
```
|
|
||||||
# Get the ERPNext app
|
|
||||||
bench get-app https://github.com/frappe/erpnext
|
|
||||||
|
|
||||||
# Install the app
|
|
||||||
bench --site erpnext.localhost install-app erpnext
|
|
||||||
```
|
|
||||||
|
|
||||||
4. Open the URL `http://erpnext.localhost:8000/app` in your browser, you should see the app running
|
|
||||||
|
|
||||||
## Learning and community
|
|
||||||
|
|
||||||
1. [Frappe School](https://school.frappe.io) - Learn Frappe Framework and ERPNext from the various courses by the maintainers or from the community.
|
|
||||||
2. [Official documentation](https://docs.erpnext.com/) - Extensive documentation for ERPNext.
|
|
||||||
3. [Discussion Forum](https://discuss.erpnext.com/) - Engage with community of ERPNext users and service providers.
|
|
||||||
4. [Telegram Group](https://erpnext_public.t.me) - Get instant help from huge community of users.
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
1. [Issue Guidelines](https://github.com/frappe/erpnext/wiki/Issue-Guidelines)
|
1. [Issue Guidelines](https://github.com/frappe/erpnext/wiki/Issue-Guidelines)
|
||||||
1. [Report Security Vulnerabilities](https://erpnext.com/security)
|
1. [Report Security Vulnerabilities](https://erpnext.com/security)
|
||||||
1. [Pull Request Requirements](https://github.com/frappe/erpnext/wiki/Contribution-Guidelines)
|
1. [Pull Request Requirements](https://github.com/frappe/erpnext/wiki/Contribution-Guidelines)
|
||||||
2. [Translations](https://crowdin.com/project/frappe)
|
1. [Translations](https://translate.erpnext.com)
|
||||||
|
1. [Chart of Accounts](https://charts.erpnext.com)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Logo and Trademark Policy
|
## Learning
|
||||||
|
|
||||||
Please read our [Logo and Trademark Policy](TRADEMARK_POLICY.md).
|
1. [Frappe School](https://frappe.school) - Learn Frappe Framework and ERPNext from the various courses by the maintainers or from the community.
|
||||||
|
|
||||||
<br />
|
---
|
||||||
<br />
|
|
||||||
<div align="center" style="padding-top: 0.75rem;">
|
## Logo and Trademark
|
||||||
<a href="https://frappe.io" target="_blank">
|
|
||||||
<picture>
|
The brand name ERPNext and the logo are trademarks of Frappe Technologies Pvt. Ltd.
|
||||||
<source media="(prefers-color-scheme: dark)" srcset="https://frappe.io/files/Frappe-white.png">
|
|
||||||
<img src="https://frappe.io/files/Frappe-black.png" alt="Frappe Technologies" height="28"/>
|
### Introduction
|
||||||
</picture>
|
|
||||||
</a>
|
Frappe Technologies Pvt. Ltd. (Frappe) owns and oversees the trademarks for the ERPNext name and logos. We have developed this trademark usage policy with the following goals in mind:
|
||||||
</div>
|
|
||||||
|
- We’d like to make it easy for anyone to use the ERPNext name or logo for community-oriented efforts that help spread and improve ERPNext.
|
||||||
|
- We’d like to make it clear how ERPNext-related businesses and projects can (and cannot) use the ERPNext name and logo.
|
||||||
|
- We’d like to make it hard for anyone to use the ERPNext name and logo to unfairly profit from, trick or confuse people who are looking for official ERPNext resources.
|
||||||
|
|
||||||
|
### Frappe Trademark Usage Policy
|
||||||
|
|
||||||
|
Permission from Frappe is required to use the ERPNext name or logo as part of any project, product, service, domain or company name.
|
||||||
|
|
||||||
|
We will grant permission to use the ERPNext name and logo for projects that meet the following criteria:
|
||||||
|
|
||||||
|
- The primary purpose of your project is to promote the spread and improvement of the ERPNext software.
|
||||||
|
- Your project is non-commercial in nature (it can make money to cover its costs or contribute to non-profit entities, but it cannot be run as a for-profit project or business).
|
||||||
|
Your project neither promotes nor is associated with entities that currently fail to comply with the GPL license under which ERPNext is distributed.
|
||||||
|
- If your project meets these criteria, you will be permitted to use the ERPNext name and logo to promote your project in any way you see fit with one exception: Please do not use ERPNext as part of a domain name.
|
||||||
|
|
||||||
|
Use of the ERPNext name and logo is additionally allowed in the following situations:
|
||||||
|
|
||||||
|
All other ERPNext-related businesses or projects can use the ERPNext name and logo to refer to and explain their services, but they cannot use them as part of a product, project, service, domain, or company name and they cannot use them in any way that suggests an affiliation with or endorsement by ERPNext or Frappe Technologies or the ERPNext open source project. For example, a consulting company can describe its business as “123 Web Services, offering ERPNext consulting for small businesses,” but cannot call its business “The ERPNext Consulting Company.”
|
||||||
|
|
||||||
|
Similarly, it’s OK to use the ERPNext logo as part of a page that describes your products or services, but it is not OK to use it as part of your company or product logo or branding itself. Under no circumstances is it permitted to use ERPNext as part of a top-level domain name.
|
||||||
|
|
||||||
|
We do not allow the use of the trademark in advertising, including AdSense/AdWords.
|
||||||
|
|
||||||
|
Please note that it is not the goal of this policy to limit commercial activity around ERPNext. We encourage ERPNext-based businesses, and we would love to see hundreds of them.
|
||||||
|
|
||||||
|
When in doubt about your use of the ERPNext name or logo, please contact Frappe Technologies for clarification.
|
||||||
|
|
||||||
|
(inspired by WordPress)
|
||||||
|
|||||||
@@ -1,36 +0,0 @@
|
|||||||
## Logo and Trademark Policy
|
|
||||||
|
|
||||||
The brand name ERPNext and the logo are trademarks of Frappe Technologies Pvt. Ltd.
|
|
||||||
|
|
||||||
### Introduction
|
|
||||||
|
|
||||||
Frappe Technologies Pvt. Ltd. (Frappe) owns and oversees the trademarks for the ERPNext name and logos. We have developed this trademark usage policy with the following goals in mind:
|
|
||||||
|
|
||||||
- We’d like to make it easy for anyone to use the ERPNext name or logo for community-oriented efforts that help spread and improve ERPNext.
|
|
||||||
- We’d like to make it clear how ERPNext-related businesses and projects can (and cannot) use the ERPNext name and logo.
|
|
||||||
- We’d like to make it hard for anyone to use the ERPNext name and logo to unfairly profit from, trick or confuse people who are looking for official ERPNext resources.
|
|
||||||
|
|
||||||
### Frappe Trademark Usage Policy
|
|
||||||
|
|
||||||
Permission from Frappe is required to use the ERPNext name or logo as part of any project, product, service, domain or company name.
|
|
||||||
|
|
||||||
We will grant permission to use the ERPNext name and logo for projects that meet the following criteria:
|
|
||||||
|
|
||||||
- The primary purpose of your project is to promote the spread and improvement of the ERPNext software.
|
|
||||||
- Your project is non-commercial in nature (it can make money to cover its costs or contribute to non-profit entities, but it cannot be run as a for-profit project or business).
|
|
||||||
Your project neither promotes nor is associated with entities that currently fail to comply with the GPL license under which ERPNext is distributed.
|
|
||||||
- If your project meets these criteria, you will be permitted to use the ERPNext name and logo to promote your project in any way you see fit with one exception: Please do not use ERPNext as part of a domain name.
|
|
||||||
|
|
||||||
Use of the ERPNext name and logo is additionally allowed in the following situations:
|
|
||||||
|
|
||||||
All other ERPNext-related businesses or projects can use the ERPNext name and logo to refer to and explain their services, but they cannot use them as part of a product, project, service, domain, or company name and they cannot use them in any way that suggests an affiliation with or endorsement by ERPNext or Frappe Technologies or the ERPNext open source project. For example, a consulting company can describe its business as “123 Web Services, offering ERPNext consulting for small businesses,” but cannot call its business “The ERPNext Consulting Company.”
|
|
||||||
|
|
||||||
Similarly, it’s OK to use the ERPNext logo as part of a page that describes your products or services, but it is not OK to use it as part of your company or product logo or branding itself. Under no circumstances is it permitted to use ERPNext as part of a top-level domain name.
|
|
||||||
|
|
||||||
We do not allow the use of the trademark in advertising, including AdSense/AdWords.
|
|
||||||
|
|
||||||
Please note that it is not the goal of this policy to limit commercial activity around ERPNext. We encourage ERPNext-based businesses, and we would love to see hundreds of them.
|
|
||||||
|
|
||||||
When in doubt about your use of the ERPNext name or logo, please contact Frappe Technologies for clarification.
|
|
||||||
|
|
||||||
(inspired by WordPress)
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
**/setup/setup_wizard/data/uom_data.json,erpnext.gettext.extractors.uom_data.extract
|
|
||||||
**/setup/doctype/incoterm/incoterms.csv,erpnext.gettext.extractors.incoterms.extract
|
|
||||||
**/setup/setup_wizard/data/*.txt,erpnext.gettext.extractors.lines_from_txt_file.extract
|
|
||||||
|
@@ -21,6 +21,7 @@ coverage:
|
|||||||
comment:
|
comment:
|
||||||
layout: "diff, files"
|
layout: "diff, files"
|
||||||
require_changes: true
|
require_changes: true
|
||||||
|
after_n_builds: 3
|
||||||
|
|
||||||
ignore:
|
ignore:
|
||||||
- "erpnext/demo"
|
- "erpnext/demo"
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
parserPreset: "conventional-changelog-conventionalcommits",
|
|
||||||
rules: {
|
|
||||||
"subject-empty": [2, "never"],
|
|
||||||
"type-case": [2, "always", "lower-case"],
|
|
||||||
"type-empty": [2, "never"],
|
|
||||||
"type-enum": [
|
|
||||||
2,
|
|
||||||
"always",
|
|
||||||
["build", "chore", "ci", "docs", "feat", "fix", "perf", "refactor", "revert", "style", "test"],
|
|
||||||
],
|
|
||||||
},
|
|
||||||
};
|
|
||||||
14
crowdin.yml
14
crowdin.yml
@@ -1,14 +0,0 @@
|
|||||||
files:
|
|
||||||
- source: /erpnext/locale/main.pot
|
|
||||||
translation: /erpnext/locale/%two_letters_code%.po
|
|
||||||
pull_request_title: "fix: sync translations from crowdin"
|
|
||||||
pull_request_labels:
|
|
||||||
- translation
|
|
||||||
- skip-release-notes
|
|
||||||
pull_request_reviewers:
|
|
||||||
- barredterra # change to your GitHub username if you copied this file
|
|
||||||
commit_message: "fix: %language% translations"
|
|
||||||
append_commit_message: false
|
|
||||||
languages_mapping:
|
|
||||||
two_letters_code:
|
|
||||||
pt-BR: pt_BR
|
|
||||||
11
cypress.json
Normal file
11
cypress.json
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"baseUrl": "http://test_site:8000/",
|
||||||
|
"projectId": "da59y9",
|
||||||
|
"adminPassword": "admin",
|
||||||
|
"defaultCommandTimeout": 20000,
|
||||||
|
"pageLoadTimeout": 15000,
|
||||||
|
"retries": {
|
||||||
|
"runMode": 2,
|
||||||
|
"openMode": 2
|
||||||
|
}
|
||||||
|
}
|
||||||
5
cypress/fixtures/example.json
Normal file
5
cypress/fixtures/example.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"name": "Using fixtures to represent data",
|
||||||
|
"email": "hello@cypress.io",
|
||||||
|
"body": "Fixtures are a great way to mock data for responses to routes"
|
||||||
|
}
|
||||||
44
cypress/integration/test_bulk_transaction_processing.js
Normal file
44
cypress/integration/test_bulk_transaction_processing.js
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
describe("Bulk Transaction Processing", () => {
|
||||||
|
before(() => {
|
||||||
|
cy.login();
|
||||||
|
cy.visit("/app/website");
|
||||||
|
});
|
||||||
|
|
||||||
|
it("Creates To Sales Order", () => {
|
||||||
|
cy.visit("/app/sales-order");
|
||||||
|
cy.url().should("include", "/sales-order");
|
||||||
|
cy.window()
|
||||||
|
.its("frappe.csrf_token")
|
||||||
|
.then((csrf_token) => {
|
||||||
|
return cy
|
||||||
|
.request({
|
||||||
|
url: "/api/method/erpnext.tests.ui_test_bulk_transaction_processing.create_records",
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
Accept: "application/json",
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
"X-Frappe-CSRF-Token": csrf_token,
|
||||||
|
},
|
||||||
|
timeout: 60000,
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
expect(res.status).eq(200);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
cy.wait(5000);
|
||||||
|
cy.get(
|
||||||
|
".list-row-head > .list-header-subject > .list-row-col > .list-check-all"
|
||||||
|
).check({ force: true });
|
||||||
|
cy.wait(3000);
|
||||||
|
cy.get(".actions-btn-group > .btn-primary").click({ force: true });
|
||||||
|
cy.wait(3000);
|
||||||
|
cy.get(".dropdown-menu-right > .user-action > .dropdown-item")
|
||||||
|
.contains("Sales Invoice")
|
||||||
|
.click({ force: true });
|
||||||
|
cy.wait(3000);
|
||||||
|
cy.get(".modal-content > .modal-footer > .standard-actions")
|
||||||
|
.contains("Yes")
|
||||||
|
.click({ force: true });
|
||||||
|
cy.contains("Creation of Sales Invoice successful");
|
||||||
|
});
|
||||||
|
});
|
||||||
13
cypress/integration/test_customer.js
Normal file
13
cypress/integration/test_customer.js
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
|
||||||
|
context('Customer', () => {
|
||||||
|
before(() => {
|
||||||
|
cy.login();
|
||||||
|
});
|
||||||
|
it('Check Customer Group', () => {
|
||||||
|
cy.visit(`app/customer/`);
|
||||||
|
cy.get('.primary-action').click();
|
||||||
|
cy.wait(500);
|
||||||
|
cy.get('.custom-actions > .btn').click();
|
||||||
|
cy.get_field('customer_group', 'Link').should('have.value', 'All Customer Groups');
|
||||||
|
});
|
||||||
|
});
|
||||||
44
cypress/integration/test_item.js
Normal file
44
cypress/integration/test_item.js
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
describe("Test Item Dashboard", () => {
|
||||||
|
before(() => {
|
||||||
|
cy.login();
|
||||||
|
cy.visit("/app/item");
|
||||||
|
cy.insert_doc(
|
||||||
|
"Item",
|
||||||
|
{
|
||||||
|
item_code: "e2e_test_item",
|
||||||
|
item_group: "All Item Groups",
|
||||||
|
opening_stock: 42,
|
||||||
|
valuation_rate: 100,
|
||||||
|
},
|
||||||
|
true
|
||||||
|
);
|
||||||
|
cy.go_to_doc("item", "e2e_test_item");
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should show dashboard with correct data on first load", () => {
|
||||||
|
cy.get(".stock-levels").contains("Stock Levels").should("be.visible");
|
||||||
|
cy.get(".stock-levels").contains("e2e_test_item").should("exist");
|
||||||
|
|
||||||
|
// reserved and available qty
|
||||||
|
cy.get(".stock-levels .inline-graph-count")
|
||||||
|
.eq(0)
|
||||||
|
.contains("0")
|
||||||
|
.should("exist");
|
||||||
|
cy.get(".stock-levels .inline-graph-count")
|
||||||
|
.eq(1)
|
||||||
|
.contains("42")
|
||||||
|
.should("exist");
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should persist on field change", () => {
|
||||||
|
cy.get('input[data-fieldname="disabled"]').check();
|
||||||
|
cy.wait(500);
|
||||||
|
cy.get(".stock-levels").contains("Stock Levels").should("be.visible");
|
||||||
|
cy.get(".stock-levels").should("have.length", 1);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should persist on reload", () => {
|
||||||
|
cy.reload();
|
||||||
|
cy.get(".stock-levels").contains("Stock Levels").should("be.visible");
|
||||||
|
});
|
||||||
|
});
|
||||||
116
cypress/integration/test_organizational_chart_desktop.js
Normal file
116
cypress/integration/test_organizational_chart_desktop.js
Normal file
@@ -0,0 +1,116 @@
|
|||||||
|
context('Organizational Chart', () => {
|
||||||
|
before(() => {
|
||||||
|
cy.login();
|
||||||
|
cy.visit('/app/website');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('navigates to org chart', () => {
|
||||||
|
cy.visit('/app');
|
||||||
|
cy.visit('/app/organizational-chart');
|
||||||
|
cy.url().should('include', '/organizational-chart');
|
||||||
|
|
||||||
|
cy.window().its('frappe.csrf_token').then(csrf_token => {
|
||||||
|
return cy.request({
|
||||||
|
url: `/api/method/erpnext.tests.ui_test_helpers.create_employee_records`,
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
Accept: 'application/json',
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
'X-Frappe-CSRF-Token': csrf_token
|
||||||
|
},
|
||||||
|
timeout: 60000
|
||||||
|
}).then(res => {
|
||||||
|
expect(res.status).eq(200);
|
||||||
|
cy.get('.frappe-control[data-fieldname=company] input').focus().as('input');
|
||||||
|
cy.get('@input')
|
||||||
|
.clear({ force: true })
|
||||||
|
.type('Test Org Chart{downarrow}{enter}', { force: true })
|
||||||
|
.blur({ force: true });
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('renders root nodes and loads children for the first expandable node', () => {
|
||||||
|
// check rendered root nodes and the node name, title, connections
|
||||||
|
cy.get('.hierarchy').find('.root-level ul.node-children').children()
|
||||||
|
.should('have.length', 2)
|
||||||
|
.first()
|
||||||
|
.as('first-child');
|
||||||
|
|
||||||
|
cy.get('@first-child').get('.node-name').contains('Test Employee 1');
|
||||||
|
cy.get('@first-child').get('.node-info').find('.node-title').contains('CEO');
|
||||||
|
cy.get('@first-child').get('.node-info').find('.node-connections').contains('· 2 Connections');
|
||||||
|
|
||||||
|
cy.call('erpnext.tests.ui_test_helpers.get_employee_records').then(employee_records => {
|
||||||
|
// children of 1st root visible
|
||||||
|
cy.get(`div[data-parent="${employee_records.message[0]}"]`).as('child-node');
|
||||||
|
cy.get('@child-node')
|
||||||
|
.should('have.length', 1)
|
||||||
|
.should('be.visible');
|
||||||
|
cy.get('@child-node').get('.node-name').contains('Test Employee 3');
|
||||||
|
|
||||||
|
// connectors between first root node and immediate child
|
||||||
|
cy.get(`path[data-parent="${employee_records.message[0]}"]`)
|
||||||
|
.should('be.visible')
|
||||||
|
.invoke('attr', 'data-child')
|
||||||
|
.should('equal', employee_records.message[2]);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('hides active nodes children and connectors on expanding sibling node', () => {
|
||||||
|
cy.call('erpnext.tests.ui_test_helpers.get_employee_records').then(employee_records => {
|
||||||
|
// click sibling
|
||||||
|
cy.get(`#${employee_records.message[1]}`)
|
||||||
|
.click()
|
||||||
|
.should('have.class', 'active');
|
||||||
|
|
||||||
|
// child nodes and connectors hidden
|
||||||
|
cy.get(`[data-parent="${employee_records.message[0]}"]`).should('not.be.visible');
|
||||||
|
cy.get(`path[data-parent="${employee_records.message[0]}"]`).should('not.be.visible');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('collapses previous level nodes and refreshes connectors on expanding child node', () => {
|
||||||
|
cy.call('erpnext.tests.ui_test_helpers.get_employee_records').then(employee_records => {
|
||||||
|
// click child node
|
||||||
|
cy.get(`#${employee_records.message[3]}`)
|
||||||
|
.click()
|
||||||
|
.should('have.class', 'active');
|
||||||
|
|
||||||
|
// previous level nodes: parent should be on active-path; other nodes should be collapsed
|
||||||
|
cy.get(`#${employee_records.message[0]}`).should('have.class', 'collapsed');
|
||||||
|
cy.get(`#${employee_records.message[1]}`).should('have.class', 'active-path');
|
||||||
|
|
||||||
|
// previous level connectors refreshed
|
||||||
|
cy.get(`path[data-parent="${employee_records.message[1]}"]`)
|
||||||
|
.should('have.class', 'collapsed-connector');
|
||||||
|
|
||||||
|
// child node's children and connectors rendered
|
||||||
|
cy.get(`[data-parent="${employee_records.message[3]}"]`).should('be.visible');
|
||||||
|
cy.get(`path[data-parent="${employee_records.message[3]}"]`).should('be.visible');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('expands previous level nodes', () => {
|
||||||
|
cy.call('erpnext.tests.ui_test_helpers.get_employee_records').then(employee_records => {
|
||||||
|
cy.get(`#${employee_records.message[0]}`)
|
||||||
|
.click()
|
||||||
|
.should('have.class', 'active');
|
||||||
|
|
||||||
|
cy.get(`[data-parent="${employee_records.message[0]}"]`)
|
||||||
|
.should('be.visible');
|
||||||
|
|
||||||
|
cy.get('ul.hierarchy').children().should('have.length', 2);
|
||||||
|
cy.get(`#connectors`).children().should('have.length', 1);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('edit node navigates to employee master', () => {
|
||||||
|
cy.call('erpnext.tests.ui_test_helpers.get_employee_records').then(employee_records => {
|
||||||
|
cy.get(`#${employee_records.message[0]}`).find('.btn-edit-node')
|
||||||
|
.click();
|
||||||
|
|
||||||
|
cy.url().should('include', `/employee/${employee_records.message[0]}`);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
195
cypress/integration/test_organizational_chart_mobile.js
Normal file
195
cypress/integration/test_organizational_chart_mobile.js
Normal file
@@ -0,0 +1,195 @@
|
|||||||
|
context('Organizational Chart Mobile', () => {
|
||||||
|
before(() => {
|
||||||
|
cy.login();
|
||||||
|
cy.visit('/app/website');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('navigates to org chart', () => {
|
||||||
|
cy.viewport(375, 667);
|
||||||
|
cy.visit('/app');
|
||||||
|
cy.visit('/app/organizational-chart');
|
||||||
|
cy.url().should('include', '/organizational-chart');
|
||||||
|
|
||||||
|
cy.window().its('frappe.csrf_token').then(csrf_token => {
|
||||||
|
return cy.request({
|
||||||
|
url: `/api/method/erpnext.tests.ui_test_helpers.create_employee_records`,
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
Accept: 'application/json',
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
'X-Frappe-CSRF-Token': csrf_token
|
||||||
|
},
|
||||||
|
timeout: 60000
|
||||||
|
}).then(res => {
|
||||||
|
expect(res.status).eq(200);
|
||||||
|
cy.get('.frappe-control[data-fieldname=company] input').focus().as('input');
|
||||||
|
cy.get('@input')
|
||||||
|
.clear({ force: true })
|
||||||
|
.type('Test Org Chart{downarrow}{enter}', { force: true })
|
||||||
|
.blur({ force: true });
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('renders root nodes', () => {
|
||||||
|
// check rendered root nodes and the node name, title, connections
|
||||||
|
cy.get('.hierarchy-mobile').find('.root-level').children()
|
||||||
|
.should('have.length', 2)
|
||||||
|
.first()
|
||||||
|
.as('first-child');
|
||||||
|
|
||||||
|
cy.get('@first-child').get('.node-name').contains('Test Employee 1');
|
||||||
|
cy.get('@first-child').get('.node-info').find('.node-title').contains('CEO');
|
||||||
|
cy.get('@first-child').get('.node-info').find('.node-connections').contains('· 2');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('expands root node', () => {
|
||||||
|
cy.call('erpnext.tests.ui_test_helpers.get_employee_records').then(employee_records => {
|
||||||
|
cy.get(`#${employee_records.message[1]}`)
|
||||||
|
.click()
|
||||||
|
.should('have.class', 'active');
|
||||||
|
|
||||||
|
// other root node removed
|
||||||
|
cy.get(`#${employee_records.message[0]}`).should('not.exist');
|
||||||
|
|
||||||
|
// children of active root node
|
||||||
|
cy.get('.hierarchy-mobile').find('.level').first().find('ul.node-children').children()
|
||||||
|
.should('have.length', 2);
|
||||||
|
|
||||||
|
cy.get(`div[data-parent="${employee_records.message[1]}"]`).first().as('child-node');
|
||||||
|
cy.get('@child-node').should('be.visible');
|
||||||
|
|
||||||
|
cy.get('@child-node')
|
||||||
|
.get('.node-name')
|
||||||
|
.contains('Test Employee 4');
|
||||||
|
|
||||||
|
// connectors between root node and immediate children
|
||||||
|
cy.get(`path[data-parent="${employee_records.message[1]}"]`).as('connectors');
|
||||||
|
cy.get('@connectors')
|
||||||
|
.should('have.length', 2)
|
||||||
|
.should('be.visible');
|
||||||
|
|
||||||
|
cy.get('@connectors')
|
||||||
|
.first()
|
||||||
|
.invoke('attr', 'data-child')
|
||||||
|
.should('eq', employee_records.message[3]);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('expands child node', () => {
|
||||||
|
cy.call('erpnext.tests.ui_test_helpers.get_employee_records').then(employee_records => {
|
||||||
|
cy.get(`#${employee_records.message[3]}`)
|
||||||
|
.click()
|
||||||
|
.should('have.class', 'active')
|
||||||
|
.as('expanded_node');
|
||||||
|
|
||||||
|
// 2 levels on screen; 1 on active path; 1 collapsed
|
||||||
|
cy.get('.hierarchy-mobile').children().should('have.length', 2);
|
||||||
|
cy.get(`#${employee_records.message[1]}`).should('have.class', 'active-path');
|
||||||
|
|
||||||
|
// children of expanded node visible
|
||||||
|
cy.get('@expanded_node')
|
||||||
|
.next()
|
||||||
|
.should('have.class', 'node-children')
|
||||||
|
.as('node-children');
|
||||||
|
|
||||||
|
cy.get('@node-children').children().should('have.length', 1);
|
||||||
|
cy.get('@node-children')
|
||||||
|
.first()
|
||||||
|
.get('.node-card')
|
||||||
|
.should('have.class', 'active-child')
|
||||||
|
.contains('Test Employee 7');
|
||||||
|
|
||||||
|
// orphan connectors removed
|
||||||
|
cy.get(`#connectors`).children().should('have.length', 2);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('renders sibling group', () => {
|
||||||
|
cy.call('erpnext.tests.ui_test_helpers.get_employee_records').then(employee_records => {
|
||||||
|
// sibling group visible for parent
|
||||||
|
cy.get(`#${employee_records.message[1]}`)
|
||||||
|
.next()
|
||||||
|
.as('sibling_group');
|
||||||
|
|
||||||
|
cy.get('@sibling_group')
|
||||||
|
.should('have.attr', 'data-parent', 'undefined')
|
||||||
|
.should('have.class', 'node-group')
|
||||||
|
.and('have.class', 'collapsed');
|
||||||
|
|
||||||
|
cy.get('@sibling_group').get('.avatar-group').children().as('siblings');
|
||||||
|
cy.get('@siblings').should('have.length', 1);
|
||||||
|
cy.get('@siblings')
|
||||||
|
.first()
|
||||||
|
.should('have.attr', 'title', 'Test Employee 1');
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('expands previous level nodes', () => {
|
||||||
|
cy.call('erpnext.tests.ui_test_helpers.get_employee_records').then(employee_records => {
|
||||||
|
cy.get(`#${employee_records.message[6]}`)
|
||||||
|
.click()
|
||||||
|
.should('have.class', 'active');
|
||||||
|
|
||||||
|
// clicking on previous level node should remove all the nodes ahead
|
||||||
|
// and expand that node
|
||||||
|
cy.get(`#${employee_records.message[3]}`).click();
|
||||||
|
cy.get(`#${employee_records.message[3]}`)
|
||||||
|
.should('have.class', 'active')
|
||||||
|
.should('not.have.class', 'active-path');
|
||||||
|
|
||||||
|
cy.get(`#${employee_records.message[6]}`).should('have.class', 'active-child');
|
||||||
|
cy.get('.hierarchy-mobile').children().should('have.length', 2);
|
||||||
|
cy.get(`#connectors`).children().should('have.length', 2);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('expands sibling group', () => {
|
||||||
|
cy.call('erpnext.tests.ui_test_helpers.get_employee_records').then(employee_records => {
|
||||||
|
// sibling group visible for parent
|
||||||
|
cy.get(`#${employee_records.message[6]}`).click();
|
||||||
|
|
||||||
|
cy.get(`#${employee_records.message[3]}`)
|
||||||
|
.next()
|
||||||
|
.click();
|
||||||
|
|
||||||
|
// siblings of parent should be visible
|
||||||
|
cy.get('.hierarchy-mobile').prev().as('sibling_group');
|
||||||
|
cy.get('@sibling_group')
|
||||||
|
.should('exist')
|
||||||
|
.should('have.class', 'sibling-group')
|
||||||
|
.should('not.have.class', 'collapsed');
|
||||||
|
|
||||||
|
cy.get(`#${employee_records.message[1]}`)
|
||||||
|
.should('be.visible')
|
||||||
|
.should('have.class', 'active');
|
||||||
|
|
||||||
|
cy.get(`[data-parent="${employee_records.message[1]}"]`)
|
||||||
|
.should('be.visible')
|
||||||
|
.should('have.length', 2)
|
||||||
|
.should('have.class', 'active-child');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('goes to the respective level after clicking on non-collapsed sibling group', () => {
|
||||||
|
cy.call('erpnext.tests.ui_test_helpers.get_employee_records').then(() => {
|
||||||
|
// click on non-collapsed sibling group
|
||||||
|
cy.get('.hierarchy-mobile')
|
||||||
|
.prev()
|
||||||
|
.click();
|
||||||
|
|
||||||
|
// should take you to that level
|
||||||
|
cy.get('.hierarchy-mobile').find('li.level .node-card').should('have.length', 2);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('edit node navigates to employee master', () => {
|
||||||
|
cy.call('erpnext.tests.ui_test_helpers.get_employee_records').then(employee_records => {
|
||||||
|
cy.get(`#${employee_records.message[0]}`).find('.btn-edit-node')
|
||||||
|
.click();
|
||||||
|
|
||||||
|
cy.url().should('include', `/employee/${employee_records.message[0]}`);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
17
cypress/plugins/index.js
Normal file
17
cypress/plugins/index.js
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
// ***********************************************************
|
||||||
|
// This example plugins/index.js can be used to load plugins
|
||||||
|
//
|
||||||
|
// You can change the location of this file or turn off loading
|
||||||
|
// the plugins file with the 'pluginsFile' configuration option.
|
||||||
|
//
|
||||||
|
// You can read more here:
|
||||||
|
// https://on.cypress.io/plugins-guide
|
||||||
|
// ***********************************************************
|
||||||
|
|
||||||
|
// This function is called when a project is opened or re-opened (e.g. due to
|
||||||
|
// the project's config changing)
|
||||||
|
|
||||||
|
module.exports = () => {
|
||||||
|
// `on` is used to hook into various events Cypress emits
|
||||||
|
// `config` is the resolved Cypress config
|
||||||
|
};
|
||||||
31
cypress/support/commands.js
Normal file
31
cypress/support/commands.js
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
// ***********************************************
|
||||||
|
// This example commands.js shows you how to
|
||||||
|
// create various custom commands and overwrite
|
||||||
|
// existing commands.
|
||||||
|
//
|
||||||
|
// For more comprehensive examples of custom
|
||||||
|
// commands please read more here:
|
||||||
|
// https://on.cypress.io/custom-commands
|
||||||
|
// ***********************************************
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// -- This is a parent command --
|
||||||
|
// Cypress.Commands.add("login", (email, password) => { ... });
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// -- This is a child command --
|
||||||
|
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... });
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// -- This is a dual command --
|
||||||
|
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... });
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// -- This is will overwrite an existing command --
|
||||||
|
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... });
|
||||||
|
|
||||||
|
const slug = (name) => name.toLowerCase().replace(" ", "-");
|
||||||
|
|
||||||
|
Cypress.Commands.add("go_to_doc", (doctype, name) => {
|
||||||
|
cy.visit(`/app/${slug(doctype)}/${encodeURIComponent(name)}`);
|
||||||
|
});
|
||||||
26
cypress/support/index.js
Normal file
26
cypress/support/index.js
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
// ***********************************************************
|
||||||
|
// This example support/index.js is processed and
|
||||||
|
// loaded automatically before your test files.
|
||||||
|
//
|
||||||
|
// This is a great place to put global configuration and
|
||||||
|
// behavior that modifies Cypress.
|
||||||
|
//
|
||||||
|
// You can change the location of this file or turn off
|
||||||
|
// automatically serving support files with the
|
||||||
|
// 'supportFile' configuration option.
|
||||||
|
//
|
||||||
|
// You can read more here:
|
||||||
|
// https://on.cypress.io/configuration
|
||||||
|
// ***********************************************************
|
||||||
|
|
||||||
|
// Import commands.js using ES2015 syntax:
|
||||||
|
import './commands';
|
||||||
|
import '../../../frappe/cypress/support/commands' // eslint-disable-line
|
||||||
|
|
||||||
|
|
||||||
|
// Alternatively you can use CommonJS syntax:
|
||||||
|
// require('./commands')
|
||||||
|
|
||||||
|
Cypress.Cookies.defaults({
|
||||||
|
preserve: 'sid'
|
||||||
|
});
|
||||||
12
cypress/tsconfig.json
Normal file
12
cypress/tsconfig.json
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"allowJs": true,
|
||||||
|
"baseUrl": "../node_modules",
|
||||||
|
"types": [
|
||||||
|
"cypress"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"**/*.*"
|
||||||
|
]
|
||||||
|
}
|
||||||
1
dev-requirements.txt
Normal file
1
dev-requirements.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
hypothesis~=6.31.0
|
||||||
@@ -1,12 +1,8 @@
|
|||||||
import functools
|
|
||||||
import inspect
|
import inspect
|
||||||
from typing import TypeVar
|
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
from frappe.model.document import Document
|
|
||||||
from frappe.utils.user import is_website_user
|
|
||||||
|
|
||||||
__version__ = "16.0.0-dev"
|
__version__ = "14.0.0-dev"
|
||||||
|
|
||||||
|
|
||||||
def get_default_company(user=None):
|
def get_default_company(user=None):
|
||||||
@@ -16,7 +12,7 @@ def get_default_company(user=None):
|
|||||||
if not user:
|
if not user:
|
||||||
user = frappe.session.user
|
user = frappe.session.user
|
||||||
|
|
||||||
companies = get_user_default_as_list("company", user)
|
companies = get_user_default_as_list(user, "company")
|
||||||
if companies:
|
if companies:
|
||||||
default_company = companies[0]
|
default_company = companies[0]
|
||||||
else:
|
else:
|
||||||
@@ -39,8 +35,10 @@ def get_default_cost_center(company):
|
|||||||
|
|
||||||
if not frappe.flags.company_cost_center:
|
if not frappe.flags.company_cost_center:
|
||||||
frappe.flags.company_cost_center = {}
|
frappe.flags.company_cost_center = {}
|
||||||
if company not in frappe.flags.company_cost_center:
|
if not company in frappe.flags.company_cost_center:
|
||||||
frappe.flags.company_cost_center[company] = frappe.get_cached_value("Company", company, "cost_center")
|
frappe.flags.company_cost_center[company] = frappe.get_cached_value(
|
||||||
|
"Company", company, "cost_center"
|
||||||
|
)
|
||||||
return frappe.flags.company_cost_center[company]
|
return frappe.flags.company_cost_center[company]
|
||||||
|
|
||||||
|
|
||||||
@@ -48,7 +46,7 @@ def get_company_currency(company):
|
|||||||
"""Returns the default company currency"""
|
"""Returns the default company currency"""
|
||||||
if not frappe.flags.company_currency:
|
if not frappe.flags.company_currency:
|
||||||
frappe.flags.company_currency = {}
|
frappe.flags.company_currency = {}
|
||||||
if company not in frappe.flags.company_currency:
|
if not company in frappe.flags.company_currency:
|
||||||
frappe.flags.company_currency[company] = frappe.db.get_value(
|
frappe.flags.company_currency[company] = frappe.db.get_value(
|
||||||
"Company", company, "default_currency", cache=True
|
"Company", company, "default_currency", cache=True
|
||||||
)
|
)
|
||||||
@@ -57,7 +55,7 @@ def get_company_currency(company):
|
|||||||
|
|
||||||
def set_perpetual_inventory(enable=1, company=None):
|
def set_perpetual_inventory(enable=1, company=None):
|
||||||
if not company:
|
if not company:
|
||||||
company = "_Test Company" if frappe.in_test else get_default_company()
|
company = "_Test Company" if frappe.flags.in_test else get_default_company()
|
||||||
|
|
||||||
company = frappe.get_doc("Company", company)
|
company = frappe.get_doc("Company", company)
|
||||||
company.enable_perpetual_inventory = enable
|
company.enable_perpetual_inventory = enable
|
||||||
@@ -77,12 +75,12 @@ def encode_company_abbr(name, company=None, abbr=None):
|
|||||||
|
|
||||||
def is_perpetual_inventory_enabled(company):
|
def is_perpetual_inventory_enabled(company):
|
||||||
if not company:
|
if not company:
|
||||||
company = "_Test Company" if frappe.in_test else get_default_company()
|
company = "_Test Company" if frappe.flags.in_test else get_default_company()
|
||||||
|
|
||||||
if not hasattr(frappe.local, "enable_perpetual_inventory"):
|
if not hasattr(frappe.local, "enable_perpetual_inventory"):
|
||||||
frappe.local.enable_perpetual_inventory = {}
|
frappe.local.enable_perpetual_inventory = {}
|
||||||
|
|
||||||
if company not in frappe.local.enable_perpetual_inventory:
|
if not company in frappe.local.enable_perpetual_inventory:
|
||||||
frappe.local.enable_perpetual_inventory[company] = (
|
frappe.local.enable_perpetual_inventory[company] = (
|
||||||
frappe.get_cached_value("Company", company, "enable_perpetual_inventory") or 0
|
frappe.get_cached_value("Company", company, "enable_perpetual_inventory") or 0
|
||||||
)
|
)
|
||||||
@@ -97,7 +95,7 @@ def get_default_finance_book(company=None):
|
|||||||
if not hasattr(frappe.local, "default_finance_book"):
|
if not hasattr(frappe.local, "default_finance_book"):
|
||||||
frappe.local.default_finance_book = {}
|
frappe.local.default_finance_book = {}
|
||||||
|
|
||||||
if company not in frappe.local.default_finance_book:
|
if not company in frappe.local.default_finance_book:
|
||||||
frappe.local.default_finance_book[company] = frappe.get_cached_value(
|
frappe.local.default_finance_book[company] = frappe.get_cached_value(
|
||||||
"Company", company, "default_finance_book"
|
"Company", company, "default_finance_book"
|
||||||
)
|
)
|
||||||
@@ -109,7 +107,7 @@ def get_party_account_type(party_type):
|
|||||||
if not hasattr(frappe.local, "party_account_types"):
|
if not hasattr(frappe.local, "party_account_types"):
|
||||||
frappe.local.party_account_types = {}
|
frappe.local.party_account_types = {}
|
||||||
|
|
||||||
if party_type not in frappe.local.party_account_types:
|
if not party_type in frappe.local.party_account_types:
|
||||||
frappe.local.party_account_types[party_type] = (
|
frappe.local.party_account_types[party_type] = (
|
||||||
frappe.db.get_value("Party Type", party_type, "account_type") or ""
|
frappe.db.get_value("Party Type", party_type, "account_type") or ""
|
||||||
)
|
)
|
||||||
@@ -122,14 +120,12 @@ def get_region(company=None):
|
|||||||
|
|
||||||
You can also set global company flag in `frappe.flags.company`
|
You can also set global company flag in `frappe.flags.company`
|
||||||
"""
|
"""
|
||||||
|
if company or frappe.flags.company:
|
||||||
if not company:
|
return frappe.get_cached_value("Company", company or frappe.flags.company, "country")
|
||||||
company = frappe.local.flags.company
|
elif frappe.flags.country:
|
||||||
|
return frappe.flags.country
|
||||||
if company:
|
else:
|
||||||
return frappe.get_cached_value("Company", company, "country")
|
return frappe.get_system_settings("country")
|
||||||
|
|
||||||
return frappe.flags.country or frappe.get_system_settings("country")
|
|
||||||
|
|
||||||
|
|
||||||
def allow_regional(fn):
|
def allow_regional(fn):
|
||||||
@@ -140,7 +136,6 @@ def allow_regional(fn):
|
|||||||
def myfunction():
|
def myfunction():
|
||||||
pass"""
|
pass"""
|
||||||
|
|
||||||
@functools.wraps(fn)
|
|
||||||
def caller(*args, **kwargs):
|
def caller(*args, **kwargs):
|
||||||
overrides = frappe.get_hooks("regional_overrides", {}).get(get_region())
|
overrides = frappe.get_hooks("regional_overrides", {}).get(get_region())
|
||||||
function_path = f"{inspect.getmodule(fn).__name__}.{fn.__name__}"
|
function_path = f"{inspect.getmodule(fn).__name__}.{fn.__name__}"
|
||||||
@@ -152,44 +147,3 @@ def allow_regional(fn):
|
|||||||
return frappe.get_attr(overrides[function_path][-1])(*args, **kwargs)
|
return frappe.get_attr(overrides[function_path][-1])(*args, **kwargs)
|
||||||
|
|
||||||
return caller
|
return caller
|
||||||
|
|
||||||
|
|
||||||
def check_app_permission():
|
|
||||||
if frappe.session.user == "Administrator":
|
|
||||||
return True
|
|
||||||
|
|
||||||
if is_website_user():
|
|
||||||
return False
|
|
||||||
|
|
||||||
return True
|
|
||||||
|
|
||||||
|
|
||||||
T = TypeVar("T")
|
|
||||||
|
|
||||||
|
|
||||||
def normalize_ctx_input(T: type) -> callable:
|
|
||||||
"""
|
|
||||||
Normalizes the first argument (ctx) of the decorated function by:
|
|
||||||
- Converting Document objects to dictionaries
|
|
||||||
- Parsing JSON strings
|
|
||||||
- Casting the result to the specified type T
|
|
||||||
"""
|
|
||||||
|
|
||||||
def decorator(func: callable):
|
|
||||||
# conserve annotations for frappe.utils.typing_validations
|
|
||||||
@functools.wraps(func, assigned=(a for a in functools.WRAPPER_ASSIGNMENTS if a != "__annotations__"))
|
|
||||||
def wrapper(ctx: T | Document | dict | str, *args, **kwargs):
|
|
||||||
if isinstance(ctx, Document):
|
|
||||||
ctx = T(**ctx.as_dict())
|
|
||||||
elif isinstance(ctx, dict):
|
|
||||||
ctx = T(**ctx)
|
|
||||||
else:
|
|
||||||
ctx = T(**frappe.parse_json(ctx))
|
|
||||||
|
|
||||||
return func(ctx, *args, **kwargs)
|
|
||||||
|
|
||||||
# set annotations from function
|
|
||||||
wrapper.__annotations__.update({k: v for k, v in func.__annotations__.items() if k != "ctx"})
|
|
||||||
return wrapper
|
|
||||||
|
|
||||||
return decorator
|
|
||||||
|
|||||||
@@ -10,42 +10,4 @@ Entries are:
|
|||||||
- Sales Invoice (Itemised)
|
- Sales Invoice (Itemised)
|
||||||
- Purchase Invoice (Itemised)
|
- Purchase Invoice (Itemised)
|
||||||
|
|
||||||
All accounting entries are stored in the `General Ledger`
|
All accounting entries are stored in the `General Ledger`
|
||||||
|
|
||||||
## Payment Ledger
|
|
||||||
Transactions on Receivable and Payable Account types will also be stored in `Payment Ledger`. This is so that payment reconciliation process only requires update on this ledger.
|
|
||||||
|
|
||||||
### Key Fields
|
|
||||||
| Field | Description |
|
|
||||||
|----------------------|----------------------------------|
|
|
||||||
| `account_type` | Receivable/Payable |
|
|
||||||
| `account` | Accounting head |
|
|
||||||
| `party` | Party Name |
|
|
||||||
| `voucher_no` | Voucher No |
|
|
||||||
| `against_voucher_no` | Linked voucher(secondary effect) |
|
|
||||||
| `amount` | can be +ve/-ve |
|
|
||||||
|
|
||||||
### Design
|
|
||||||
`debit` and `credit` have been replaced with `account_type` and `amount`. `against_voucher_no` is populated for all entries. So, outstanding amount can be calculated by summing up amount only using `against_voucher_no`.
|
|
||||||
|
|
||||||
Ex:
|
|
||||||
1. Consider an invoice for ₹100 and a partial payment of ₹80 against that invoice. Payment Ledger will have following entries.
|
|
||||||
|
|
||||||
| voucher_no | against_voucher_no | amount |
|
|
||||||
|------------|--------------------|--------|
|
|
||||||
| SINV-01 | SINV-01 | 100 |
|
|
||||||
| PAY-01 | SINV-01 | -80 |
|
|
||||||
|
|
||||||
|
|
||||||
2. Reconcile a Credit Note against an invoice using a Journal Entry
|
|
||||||
|
|
||||||
An invoice for ₹100 partially reconciled against a credit of ₹70 using a Journal Entry. Payment Ledger will have the following entries.
|
|
||||||
|
|
||||||
| voucher_no | against_voucher_no | amount |
|
|
||||||
|------------|--------------------|--------|
|
|
||||||
| SINV-01 | SINV-01 | 100 |
|
|
||||||
| | | |
|
|
||||||
| CR-NOTE-01 | CR-NOTE-01 | -70 |
|
|
||||||
| | | |
|
|
||||||
| JE-01 | CR-NOTE-01 | +70 |
|
|
||||||
| JE-01 | SINV-01 | -70 |
|
|
||||||
@@ -11,14 +11,14 @@ class ERPNextAddress(Address):
|
|||||||
def validate(self):
|
def validate(self):
|
||||||
self.validate_reference()
|
self.validate_reference()
|
||||||
self.update_compnay_address()
|
self.update_compnay_address()
|
||||||
super().validate()
|
super(ERPNextAddress, self).validate()
|
||||||
|
|
||||||
def link_address(self):
|
def link_address(self):
|
||||||
"""Link address based on owner"""
|
"""Link address based on owner"""
|
||||||
if self.is_your_company_address:
|
if self.is_your_company_address:
|
||||||
return
|
return
|
||||||
|
|
||||||
return super().link_address()
|
return super(ERPNextAddress, self).link_address()
|
||||||
|
|
||||||
def update_compnay_address(self):
|
def update_compnay_address(self):
|
||||||
for link in self.get("links"):
|
for link in self.get("links"):
|
||||||
@@ -26,11 +26,11 @@ class ERPNextAddress(Address):
|
|||||||
self.is_your_company_address = 1
|
self.is_your_company_address = 1
|
||||||
|
|
||||||
def validate_reference(self):
|
def validate_reference(self):
|
||||||
if self.is_your_company_address and not [row for row in self.links if row.link_doctype == "Company"]:
|
if self.is_your_company_address and not [
|
||||||
|
row for row in self.links if row.link_doctype == "Company"
|
||||||
|
]:
|
||||||
frappe.throw(
|
frappe.throw(
|
||||||
_(
|
_("Address needs to be linked to a Company. Please add a row for Company in the Links table."),
|
||||||
"Address needs to be linked to a Company. Please add a row for Company in the Links table."
|
|
||||||
),
|
|
||||||
title=_("Company Not Linked"),
|
title=_("Company Not Linked"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -4,19 +4,18 @@
|
|||||||
"creation": "2020-07-17 11:25:34.593061",
|
"creation": "2020-07-17 11:25:34.593061",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"doctype": "Dashboard Chart",
|
"doctype": "Dashboard Chart",
|
||||||
"dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\",\"from_fiscal_year\":\"erpnext.utils.get_fiscal_year()\",\"to_fiscal_year\":\"erpnext.utils.get_fiscal_year()\"}",
|
"dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\",\"from_fiscal_year\":\"frappe.sys_defaults.fiscal_year\",\"to_fiscal_year\":\"frappe.sys_defaults.fiscal_year\"}",
|
||||||
"filters_json": "{\"period\":\"Monthly\",\"budget_against\":\"Cost Center\",\"show_cumulative\":0}",
|
"filters_json": "{\"period\":\"Monthly\",\"budget_against\":\"Cost Center\",\"show_cumulative\":0}",
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
"is_public": 1,
|
"is_public": 1,
|
||||||
"is_standard": 1,
|
"is_standard": 1,
|
||||||
"modified": "2023-07-19 13:13:13.307073",
|
"modified": "2020-07-22 12:24:49.144210",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Budget Variance",
|
"name": "Budget Variance",
|
||||||
"number_of_groups": 0,
|
"number_of_groups": 0,
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"report_name": "Budget Variance Report",
|
"report_name": "Budget Variance Report",
|
||||||
"roles": [],
|
|
||||||
"timeseries": 0,
|
"timeseries": 0,
|
||||||
"type": "Bar",
|
"type": "Bar",
|
||||||
"use_report_chart": 1,
|
"use_report_chart": 1,
|
||||||
|
|||||||
@@ -4,19 +4,18 @@
|
|||||||
"creation": "2020-07-17 11:25:34.448572",
|
"creation": "2020-07-17 11:25:34.448572",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"doctype": "Dashboard Chart",
|
"doctype": "Dashboard Chart",
|
||||||
"dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\",\"from_fiscal_year\":\"erpnext.utils.get_fiscal_year()\",\"to_fiscal_year\":\"erpnext.utils.get_fiscal_year()\"}",
|
"dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\",\"from_fiscal_year\":\"frappe.sys_defaults.fiscal_year\",\"to_fiscal_year\":\"frappe.sys_defaults.fiscal_year\"}",
|
||||||
"filters_json": "{\"filter_based_on\":\"Fiscal Year\",\"period_start_date\":\"2020-04-01\",\"period_end_date\":\"2021-03-31\",\"periodicity\":\"Yearly\",\"include_default_book_entries\":1}",
|
"filters_json": "{\"filter_based_on\":\"Fiscal Year\",\"period_start_date\":\"2020-04-01\",\"period_end_date\":\"2021-03-31\",\"periodicity\":\"Yearly\",\"include_default_book_entries\":1}",
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
"is_public": 1,
|
"is_public": 1,
|
||||||
"is_standard": 1,
|
"is_standard": 1,
|
||||||
"modified": "2023-07-19 13:08:56.470390",
|
"modified": "2020-07-22 12:33:48.888943",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Profit and Loss",
|
"name": "Profit and Loss",
|
||||||
"number_of_groups": 0,
|
"number_of_groups": 0,
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"report_name": "Profit and Loss Statement",
|
"report_name": "Profit and Loss Statement",
|
||||||
"roles": [],
|
|
||||||
"timeseries": 0,
|
"timeseries": 0,
|
||||||
"type": "Bar",
|
"type": "Bar",
|
||||||
"use_report_chart": 1,
|
"use_report_chart": 1,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
frappe.provide("frappe.dashboards.chart_sources");
|
frappe.provide('frappe.dashboards.chart_sources');
|
||||||
|
|
||||||
frappe.dashboards.chart_sources["Account Balance Timeline"] = {
|
frappe.dashboards.chart_sources["Account Balance Timeline"] = {
|
||||||
method: "erpnext.accounts.dashboard_chart_source.account_balance_timeline.account_balance_timeline.get",
|
method: "erpnext.accounts.dashboard_chart_source.account_balance_timeline.account_balance_timeline.get",
|
||||||
@@ -9,14 +9,14 @@ frappe.dashboards.chart_sources["Account Balance Timeline"] = {
|
|||||||
fieldtype: "Link",
|
fieldtype: "Link",
|
||||||
options: "Company",
|
options: "Company",
|
||||||
default: frappe.defaults.get_user_default("Company"),
|
default: frappe.defaults.get_user_default("Company"),
|
||||||
reqd: 1,
|
reqd: 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldname: "account",
|
fieldname: "account",
|
||||||
label: __("Account"),
|
label: __("Account"),
|
||||||
fieldtype: "Link",
|
fieldtype: "Link",
|
||||||
options: "Account",
|
options: "Account",
|
||||||
reqd: 1,
|
reqd: 1
|
||||||
},
|
},
|
||||||
],
|
]
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ def get(
|
|||||||
filters = frappe.parse_json(filters) or frappe.parse_json(chart.filters_json)
|
filters = frappe.parse_json(filters) or frappe.parse_json(chart.filters_json)
|
||||||
|
|
||||||
account = filters.get("account")
|
account = filters.get("account")
|
||||||
filters.get("company")
|
company = filters.get("company")
|
||||||
|
|
||||||
if not account and chart_name:
|
if not account and chart_name:
|
||||||
frappe.throw(
|
frappe.throw(
|
||||||
@@ -76,13 +76,14 @@ def get(
|
|||||||
|
|
||||||
def build_result(account, dates, gl_entries):
|
def build_result(account, dates, gl_entries):
|
||||||
result = [[getdate(date), 0.0] for date in dates]
|
result = [[getdate(date), 0.0] for date in dates]
|
||||||
root_type = frappe.get_cached_value("Account", account, "root_type")
|
root_type = frappe.db.get_value("Account", account, "root_type")
|
||||||
|
|
||||||
# start with the first date
|
# start with the first date
|
||||||
date_index = 0
|
date_index = 0
|
||||||
|
|
||||||
# get balances in debit
|
# get balances in debit
|
||||||
for entry in gl_entries:
|
for entry in gl_entries:
|
||||||
|
|
||||||
# entry date is after the current pointer, so move the pointer forward
|
# entry date is after the current pointer, so move the pointer forward
|
||||||
while getdate(entry.posting_date) > result[date_index][0]:
|
while getdate(entry.posting_date) > result[date_index][0]:
|
||||||
date_index += 1
|
date_index += 1
|
||||||
@@ -132,6 +133,8 @@ def get_dates_from_timegrain(from_date, to_date, timegrain):
|
|||||||
|
|
||||||
dates = [get_period_ending(from_date, timegrain)]
|
dates = [get_period_ending(from_date, timegrain)]
|
||||||
while getdate(dates[-1]) < getdate(to_date):
|
while getdate(dates[-1]) < getdate(to_date):
|
||||||
date = get_period_ending(add_to_date(dates[-1], years=years, months=months, days=days), timegrain)
|
date = get_period_ending(
|
||||||
|
add_to_date(dates[-1], years=years, months=months, days=days), timegrain
|
||||||
|
)
|
||||||
dates.append(date)
|
dates.append(date)
|
||||||
return dates
|
return dates
|
||||||
|
|||||||
@@ -24,10 +24,14 @@ from erpnext.accounts.utils import get_account_currency
|
|||||||
def validate_service_stop_date(doc):
|
def validate_service_stop_date(doc):
|
||||||
"""Validates service_stop_date for Purchase Invoice and Sales Invoice"""
|
"""Validates service_stop_date for Purchase Invoice and Sales Invoice"""
|
||||||
|
|
||||||
enable_check = "enable_deferred_revenue" if doc.doctype == "Sales Invoice" else "enable_deferred_expense"
|
enable_check = (
|
||||||
|
"enable_deferred_revenue" if doc.doctype == "Sales Invoice" else "enable_deferred_expense"
|
||||||
|
)
|
||||||
|
|
||||||
old_stop_dates = {}
|
old_stop_dates = {}
|
||||||
old_doc = frappe.db.get_all(f"{doc.doctype} Item", {"parent": doc.name}, ["name", "service_stop_date"])
|
old_doc = frappe.db.get_all(
|
||||||
|
"{0} Item".format(doc.doctype), {"parent": doc.name}, ["name", "service_stop_date"]
|
||||||
|
)
|
||||||
|
|
||||||
for d in old_doc:
|
for d in old_doc:
|
||||||
old_stop_dates[d.name] = d.service_stop_date or ""
|
old_stop_dates[d.name] = d.service_stop_date or ""
|
||||||
@@ -58,14 +62,16 @@ def build_conditions(process_type, account, company):
|
|||||||
)
|
)
|
||||||
|
|
||||||
if account:
|
if account:
|
||||||
conditions += f"AND {deferred_account}={frappe.db.escape(account)}"
|
conditions += "AND %s='%s'" % (deferred_account, account)
|
||||||
elif company:
|
elif company:
|
||||||
conditions += f"AND p.company = {frappe.db.escape(company)}"
|
conditions += f"AND p.company = {frappe.db.escape(company)}"
|
||||||
|
|
||||||
return conditions
|
return conditions
|
||||||
|
|
||||||
|
|
||||||
def convert_deferred_expense_to_expense(deferred_process, start_date=None, end_date=None, conditions=""):
|
def convert_deferred_expense_to_expense(
|
||||||
|
deferred_process, start_date=None, end_date=None, conditions=""
|
||||||
|
):
|
||||||
# book the expense/income on the last day, but it will be trigger on the 1st of month at 12:00 AM
|
# book the expense/income on the last day, but it will be trigger on the 1st of month at 12:00 AM
|
||||||
|
|
||||||
if not start_date:
|
if not start_date:
|
||||||
@@ -75,14 +81,16 @@ def convert_deferred_expense_to_expense(deferred_process, start_date=None, end_d
|
|||||||
|
|
||||||
# check for the purchase invoice for which GL entries has to be done
|
# check for the purchase invoice for which GL entries has to be done
|
||||||
invoices = frappe.db.sql_list(
|
invoices = frappe.db.sql_list(
|
||||||
f"""
|
"""
|
||||||
select distinct item.parent
|
select distinct item.parent
|
||||||
from `tabPurchase Invoice Item` item, `tabPurchase Invoice` p
|
from `tabPurchase Invoice Item` item, `tabPurchase Invoice` p
|
||||||
where item.service_start_date<=%s and item.service_end_date>=%s
|
where item.service_start_date<=%s and item.service_end_date>=%s
|
||||||
and item.enable_deferred_expense = 1 and item.parent=p.name
|
and item.enable_deferred_expense = 1 and item.parent=p.name
|
||||||
and item.docstatus = 1 and ifnull(item.amount, 0) > 0
|
and item.docstatus = 1 and ifnull(item.amount, 0) > 0
|
||||||
{conditions}
|
{0}
|
||||||
""",
|
""".format(
|
||||||
|
conditions
|
||||||
|
),
|
||||||
(end_date, start_date),
|
(end_date, start_date),
|
||||||
) # nosec
|
) # nosec
|
||||||
|
|
||||||
@@ -95,7 +103,9 @@ def convert_deferred_expense_to_expense(deferred_process, start_date=None, end_d
|
|||||||
send_mail(deferred_process)
|
send_mail(deferred_process)
|
||||||
|
|
||||||
|
|
||||||
def convert_deferred_revenue_to_income(deferred_process, start_date=None, end_date=None, conditions=""):
|
def convert_deferred_revenue_to_income(
|
||||||
|
deferred_process, start_date=None, end_date=None, conditions=""
|
||||||
|
):
|
||||||
# book the expense/income on the last day, but it will be trigger on the 1st of month at 12:00 AM
|
# book the expense/income on the last day, but it will be trigger on the 1st of month at 12:00 AM
|
||||||
|
|
||||||
if not start_date:
|
if not start_date:
|
||||||
@@ -105,14 +115,16 @@ def convert_deferred_revenue_to_income(deferred_process, start_date=None, end_da
|
|||||||
|
|
||||||
# check for the sales invoice for which GL entries has to be done
|
# check for the sales invoice for which GL entries has to be done
|
||||||
invoices = frappe.db.sql_list(
|
invoices = frappe.db.sql_list(
|
||||||
f"""
|
"""
|
||||||
select distinct item.parent
|
select distinct item.parent
|
||||||
from `tabSales Invoice Item` item, `tabSales Invoice` p
|
from `tabSales Invoice Item` item, `tabSales Invoice` p
|
||||||
where item.service_start_date<=%s and item.service_end_date>=%s
|
where item.service_start_date<=%s and item.service_end_date>=%s
|
||||||
and item.enable_deferred_revenue = 1 and item.parent=p.name
|
and item.enable_deferred_revenue = 1 and item.parent=p.name
|
||||||
and item.docstatus = 1 and ifnull(item.amount, 0) > 0
|
and item.docstatus = 1 and ifnull(item.amount, 0) > 0
|
||||||
{conditions}
|
{0}
|
||||||
""",
|
""".format(
|
||||||
|
conditions
|
||||||
|
),
|
||||||
(end_date, start_date),
|
(end_date, start_date),
|
||||||
) # nosec
|
) # nosec
|
||||||
|
|
||||||
@@ -124,7 +136,7 @@ def convert_deferred_revenue_to_income(deferred_process, start_date=None, end_da
|
|||||||
send_mail(deferred_process)
|
send_mail(deferred_process)
|
||||||
|
|
||||||
|
|
||||||
def get_booking_dates(doc, item, posting_date=None, prev_posting_date=None):
|
def get_booking_dates(doc, item, posting_date=None):
|
||||||
if not posting_date:
|
if not posting_date:
|
||||||
posting_date = add_days(today(), -1)
|
posting_date = add_days(today(), -1)
|
||||||
|
|
||||||
@@ -134,42 +146,39 @@ def get_booking_dates(doc, item, posting_date=None, prev_posting_date=None):
|
|||||||
"deferred_revenue_account" if doc.doctype == "Sales Invoice" else "deferred_expense_account"
|
"deferred_revenue_account" if doc.doctype == "Sales Invoice" else "deferred_expense_account"
|
||||||
)
|
)
|
||||||
|
|
||||||
if not prev_posting_date:
|
prev_gl_entry = frappe.db.sql(
|
||||||
prev_gl_entry = frappe.db.sql(
|
"""
|
||||||
"""
|
select name, posting_date from `tabGL Entry` where company=%s and account=%s and
|
||||||
select name, posting_date from `tabGL Entry` where company=%s and account=%s and
|
voucher_type=%s and voucher_no=%s and voucher_detail_no=%s
|
||||||
voucher_type=%s and voucher_no=%s and voucher_detail_no=%s
|
and is_cancelled = 0
|
||||||
and is_cancelled = 0
|
order by posting_date desc limit 1
|
||||||
order by posting_date desc limit 1
|
""",
|
||||||
""",
|
(doc.company, item.get(deferred_account), doc.doctype, doc.name, item.name),
|
||||||
(doc.company, item.get(deferred_account), doc.doctype, doc.name, item.name),
|
as_dict=True,
|
||||||
as_dict=True,
|
)
|
||||||
)
|
|
||||||
|
|
||||||
prev_gl_via_je = frappe.db.sql(
|
prev_gl_via_je = frappe.db.sql(
|
||||||
"""
|
"""
|
||||||
SELECT p.name, p.posting_date FROM `tabJournal Entry` p, `tabJournal Entry Account` c
|
SELECT p.name, p.posting_date FROM `tabJournal Entry` p, `tabJournal Entry Account` c
|
||||||
WHERE p.name = c.parent and p.company=%s and c.account=%s
|
WHERE p.name = c.parent and p.company=%s and c.account=%s
|
||||||
and c.reference_type=%s and c.reference_name=%s
|
and c.reference_type=%s and c.reference_name=%s
|
||||||
and c.reference_detail_no=%s and c.docstatus < 2 order by posting_date desc limit 1
|
and c.reference_detail_no=%s and c.docstatus < 2 order by posting_date desc limit 1
|
||||||
""",
|
""",
|
||||||
(doc.company, item.get(deferred_account), doc.doctype, doc.name, item.name),
|
(doc.company, item.get(deferred_account), doc.doctype, doc.name, item.name),
|
||||||
as_dict=True,
|
as_dict=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
if prev_gl_via_je:
|
if prev_gl_via_je:
|
||||||
if (not prev_gl_entry) or (
|
if (not prev_gl_entry) or (
|
||||||
prev_gl_entry and prev_gl_entry[0].posting_date < prev_gl_via_je[0].posting_date
|
prev_gl_entry and prev_gl_entry[0].posting_date < prev_gl_via_je[0].posting_date
|
||||||
):
|
):
|
||||||
prev_gl_entry = prev_gl_via_je
|
prev_gl_entry = prev_gl_via_je
|
||||||
|
|
||||||
if prev_gl_entry:
|
|
||||||
start_date = getdate(add_days(prev_gl_entry[0].posting_date, 1))
|
|
||||||
else:
|
|
||||||
start_date = item.service_start_date
|
|
||||||
|
|
||||||
|
if prev_gl_entry:
|
||||||
|
start_date = getdate(add_days(prev_gl_entry[0].posting_date, 1))
|
||||||
else:
|
else:
|
||||||
start_date = getdate(add_days(prev_posting_date, 1))
|
start_date = item.service_start_date
|
||||||
|
|
||||||
end_date = get_last_day(start_date)
|
end_date = get_last_day(start_date)
|
||||||
if end_date >= item.service_end_date:
|
if end_date >= item.service_end_date:
|
||||||
end_date = item.service_end_date
|
end_date = item.service_end_date
|
||||||
@@ -220,7 +229,7 @@ def calculate_monthly_amount(
|
|||||||
if amount + already_booked_amount_in_account_currency > item.net_amount:
|
if amount + already_booked_amount_in_account_currency > item.net_amount:
|
||||||
amount = item.net_amount - already_booked_amount_in_account_currency
|
amount = item.net_amount - already_booked_amount_in_account_currency
|
||||||
|
|
||||||
if get_first_day(start_date) != start_date or get_last_day(end_date) != end_date:
|
if not (get_first_day(start_date) == start_date and get_last_day(end_date) == end_date):
|
||||||
partial_month = flt(date_diff(end_date, start_date)) / flt(
|
partial_month = flt(date_diff(end_date, start_date)) / flt(
|
||||||
date_diff(get_last_day(end_date), get_first_day(start_date))
|
date_diff(get_last_day(end_date), get_first_day(start_date))
|
||||||
)
|
)
|
||||||
@@ -231,7 +240,9 @@ def calculate_monthly_amount(
|
|||||||
already_booked_amount, already_booked_amount_in_account_currency = get_already_booked_amount(
|
already_booked_amount, already_booked_amount_in_account_currency = get_already_booked_amount(
|
||||||
doc, item
|
doc, item
|
||||||
)
|
)
|
||||||
base_amount = flt(item.base_net_amount - already_booked_amount, item.precision("base_net_amount"))
|
base_amount = flt(
|
||||||
|
item.base_net_amount - already_booked_amount, item.precision("base_net_amount")
|
||||||
|
)
|
||||||
if account_currency == doc.company_currency:
|
if account_currency == doc.company_currency:
|
||||||
amount = base_amount
|
amount = base_amount
|
||||||
else:
|
else:
|
||||||
@@ -251,13 +262,17 @@ def calculate_amount(doc, item, last_gl_entry, total_days, total_booking_days, a
|
|||||||
if account_currency == doc.company_currency:
|
if account_currency == doc.company_currency:
|
||||||
amount = base_amount
|
amount = base_amount
|
||||||
else:
|
else:
|
||||||
amount = flt(item.net_amount * total_booking_days / flt(total_days), item.precision("net_amount"))
|
amount = flt(
|
||||||
|
item.net_amount * total_booking_days / flt(total_days), item.precision("net_amount")
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
already_booked_amount, already_booked_amount_in_account_currency = get_already_booked_amount(
|
already_booked_amount, already_booked_amount_in_account_currency = get_already_booked_amount(
|
||||||
doc, item
|
doc, item
|
||||||
)
|
)
|
||||||
|
|
||||||
base_amount = flt(item.base_net_amount - already_booked_amount, item.precision("base_net_amount"))
|
base_amount = flt(
|
||||||
|
item.base_net_amount - already_booked_amount, item.precision("base_net_amount")
|
||||||
|
)
|
||||||
if account_currency == doc.company_currency:
|
if account_currency == doc.company_currency:
|
||||||
amount = base_amount
|
amount = base_amount
|
||||||
else:
|
else:
|
||||||
@@ -278,22 +293,26 @@ def get_already_booked_amount(doc, item):
|
|||||||
|
|
||||||
gl_entries_details = frappe.db.sql(
|
gl_entries_details = frappe.db.sql(
|
||||||
"""
|
"""
|
||||||
select sum({}) as total_credit, sum({}) as total_credit_in_account_currency, voucher_detail_no
|
select sum({0}) as total_credit, sum({1}) as total_credit_in_account_currency, voucher_detail_no
|
||||||
from `tabGL Entry` where company=%s and account=%s and voucher_type=%s and voucher_no=%s and voucher_detail_no=%s
|
from `tabGL Entry` where company=%s and account=%s and voucher_type=%s and voucher_no=%s and voucher_detail_no=%s
|
||||||
and is_cancelled = 0
|
and is_cancelled = 0
|
||||||
group by voucher_detail_no
|
group by voucher_detail_no
|
||||||
""".format(total_credit_debit, total_credit_debit_currency),
|
""".format(
|
||||||
|
total_credit_debit, total_credit_debit_currency
|
||||||
|
),
|
||||||
(doc.company, item.get(deferred_account), doc.doctype, doc.name, item.name),
|
(doc.company, item.get(deferred_account), doc.doctype, doc.name, item.name),
|
||||||
as_dict=True,
|
as_dict=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
journal_entry_details = frappe.db.sql(
|
journal_entry_details = frappe.db.sql(
|
||||||
"""
|
"""
|
||||||
SELECT sum(c.{}) as total_credit, sum(c.{}) as total_credit_in_account_currency, reference_detail_no
|
SELECT sum(c.{0}) as total_credit, sum(c.{1}) as total_credit_in_account_currency, reference_detail_no
|
||||||
FROM `tabJournal Entry` p , `tabJournal Entry Account` c WHERE p.name = c.parent and
|
FROM `tabJournal Entry` p , `tabJournal Entry Account` c WHERE p.name = c.parent and
|
||||||
p.company = %s and c.account=%s and c.reference_type=%s and c.reference_name=%s and c.reference_detail_no=%s
|
p.company = %s and c.account=%s and c.reference_type=%s and c.reference_name=%s and c.reference_detail_no=%s
|
||||||
and p.docstatus < 2 group by reference_detail_no
|
and p.docstatus < 2 group by reference_detail_no
|
||||||
""".format(total_credit_debit, total_credit_debit_currency),
|
""".format(
|
||||||
|
total_credit_debit, total_credit_debit_currency
|
||||||
|
),
|
||||||
(doc.company, item.get(deferred_account), doc.doctype, doc.name, item.name),
|
(doc.company, item.get(deferred_account), doc.doctype, doc.name, item.name),
|
||||||
as_dict=True,
|
as_dict=True,
|
||||||
)
|
)
|
||||||
@@ -315,20 +334,16 @@ def get_already_booked_amount(doc, item):
|
|||||||
|
|
||||||
|
|
||||||
def book_deferred_income_or_expense(doc, deferred_process, posting_date=None):
|
def book_deferred_income_or_expense(doc, deferred_process, posting_date=None):
|
||||||
enable_check = "enable_deferred_revenue" if doc.doctype == "Sales Invoice" else "enable_deferred_expense"
|
enable_check = (
|
||||||
|
"enable_deferred_revenue" if doc.doctype == "Sales Invoice" else "enable_deferred_expense"
|
||||||
|
)
|
||||||
|
|
||||||
accounts_frozen_upto = frappe.get_single_value("Accounts Settings", "acc_frozen_upto")
|
accounts_frozen_upto = frappe.get_cached_value("Accounts Settings", "None", "acc_frozen_upto")
|
||||||
|
|
||||||
def _book_deferred_revenue_or_expense(
|
def _book_deferred_revenue_or_expense(
|
||||||
item,
|
item, via_journal_entry, submit_journal_entry, book_deferred_entries_based_on
|
||||||
via_journal_entry,
|
|
||||||
submit_journal_entry,
|
|
||||||
book_deferred_entries_based_on,
|
|
||||||
prev_posting_date=None,
|
|
||||||
):
|
):
|
||||||
start_date, end_date, last_gl_entry = get_booking_dates(
|
start_date, end_date, last_gl_entry = get_booking_dates(doc, item, posting_date=posting_date)
|
||||||
doc, item, posting_date=posting_date, prev_posting_date=prev_posting_date
|
|
||||||
)
|
|
||||||
if not (start_date and end_date):
|
if not (start_date and end_date):
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -360,45 +375,43 @@ def book_deferred_income_or_expense(doc, deferred_process, posting_date=None):
|
|||||||
)
|
)
|
||||||
|
|
||||||
if not amount:
|
if not amount:
|
||||||
prev_posting_date = end_date
|
return
|
||||||
else:
|
|
||||||
gl_posting_date = end_date
|
|
||||||
prev_posting_date = None
|
|
||||||
# check if books nor frozen till endate:
|
|
||||||
if accounts_frozen_upto and getdate(end_date) <= getdate(accounts_frozen_upto):
|
|
||||||
gl_posting_date = get_last_day(add_days(accounts_frozen_upto, 1))
|
|
||||||
prev_posting_date = end_date
|
|
||||||
|
|
||||||
if via_journal_entry:
|
# check if books nor frozen till endate:
|
||||||
book_revenue_via_journal_entry(
|
if accounts_frozen_upto and (end_date) <= getdate(accounts_frozen_upto):
|
||||||
doc,
|
end_date = get_last_day(add_days(accounts_frozen_upto, 1))
|
||||||
credit_account,
|
|
||||||
debit_account,
|
if via_journal_entry:
|
||||||
amount,
|
book_revenue_via_journal_entry(
|
||||||
base_amount,
|
doc,
|
||||||
gl_posting_date,
|
credit_account,
|
||||||
project,
|
debit_account,
|
||||||
account_currency,
|
against,
|
||||||
item.cost_center,
|
amount,
|
||||||
item,
|
base_amount,
|
||||||
deferred_process,
|
end_date,
|
||||||
submit_journal_entry,
|
project,
|
||||||
)
|
account_currency,
|
||||||
else:
|
item.cost_center,
|
||||||
make_gl_entries(
|
item,
|
||||||
doc,
|
deferred_process,
|
||||||
credit_account,
|
submit_journal_entry,
|
||||||
debit_account,
|
)
|
||||||
against,
|
else:
|
||||||
amount,
|
make_gl_entries(
|
||||||
base_amount,
|
doc,
|
||||||
gl_posting_date,
|
credit_account,
|
||||||
project,
|
debit_account,
|
||||||
account_currency,
|
against,
|
||||||
item.cost_center,
|
amount,
|
||||||
item,
|
base_amount,
|
||||||
deferred_process,
|
end_date,
|
||||||
)
|
project,
|
||||||
|
account_currency,
|
||||||
|
item.cost_center,
|
||||||
|
item,
|
||||||
|
deferred_process,
|
||||||
|
)
|
||||||
|
|
||||||
# Returned in case of any errors because it tries to submit the same record again and again in case of errors
|
# Returned in case of any errors because it tries to submit the same record again and again in case of errors
|
||||||
if frappe.flags.deferred_accounting_error:
|
if frappe.flags.deferred_accounting_error:
|
||||||
@@ -406,17 +419,15 @@ def book_deferred_income_or_expense(doc, deferred_process, posting_date=None):
|
|||||||
|
|
||||||
if getdate(end_date) < getdate(posting_date) and not last_gl_entry:
|
if getdate(end_date) < getdate(posting_date) and not last_gl_entry:
|
||||||
_book_deferred_revenue_or_expense(
|
_book_deferred_revenue_or_expense(
|
||||||
item,
|
item, via_journal_entry, submit_journal_entry, book_deferred_entries_based_on
|
||||||
via_journal_entry,
|
|
||||||
submit_journal_entry,
|
|
||||||
book_deferred_entries_based_on,
|
|
||||||
prev_posting_date,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
via_journal_entry = cint(
|
via_journal_entry = cint(
|
||||||
frappe.db.get_singles_value("Accounts Settings", "book_deferred_entries_via_journal_entry")
|
frappe.db.get_singles_value("Accounts Settings", "book_deferred_entries_via_journal_entry")
|
||||||
)
|
)
|
||||||
submit_journal_entry = cint(frappe.db.get_singles_value("Accounts Settings", "submit_journal_entries"))
|
submit_journal_entry = cint(
|
||||||
|
frappe.db.get_singles_value("Accounts Settings", "submit_journal_entries")
|
||||||
|
)
|
||||||
book_deferred_entries_based_on = frappe.db.get_singles_value(
|
book_deferred_entries_based_on = frappe.db.get_singles_value(
|
||||||
"Accounts Settings", "book_deferred_entries_based_on"
|
"Accounts Settings", "book_deferred_entries_based_on"
|
||||||
)
|
)
|
||||||
@@ -436,7 +447,9 @@ def process_deferred_accounting(posting_date=None):
|
|||||||
posting_date = today()
|
posting_date = today()
|
||||||
|
|
||||||
if not cint(
|
if not cint(
|
||||||
frappe.db.get_singles_value("Accounts Settings", "automatically_process_deferred_accounting_entry")
|
frappe.db.get_singles_value(
|
||||||
|
"Accounts Settings", "automatically_process_deferred_accounting_entry"
|
||||||
|
)
|
||||||
):
|
):
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -526,12 +539,20 @@ def make_gl_entries(
|
|||||||
make_gl_entries(gl_entries, cancel=(doc.docstatus == 2), merge_entries=True)
|
make_gl_entries(gl_entries, cancel=(doc.docstatus == 2), merge_entries=True)
|
||||||
frappe.db.commit()
|
frappe.db.commit()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
if frappe.in_test:
|
if frappe.flags.in_test:
|
||||||
doc.log_error(f"Error while processing deferred accounting for Invoice {doc.name}")
|
traceback = frappe.get_traceback()
|
||||||
|
frappe.log_error(
|
||||||
|
title=_("Error while processing deferred accounting for Invoice {0}").format(doc.name),
|
||||||
|
message=traceback,
|
||||||
|
)
|
||||||
raise e
|
raise e
|
||||||
else:
|
else:
|
||||||
frappe.db.rollback()
|
frappe.db.rollback()
|
||||||
doc.log_error(f"Error while processing deferred accounting for Invoice {doc.name}")
|
traceback = frappe.get_traceback()
|
||||||
|
frappe.log_error(
|
||||||
|
title=_("Error while processing deferred accounting for Invoice {0}").format(doc.name),
|
||||||
|
message=traceback,
|
||||||
|
)
|
||||||
frappe.flags.deferred_accounting_error = True
|
frappe.flags.deferred_accounting_error = True
|
||||||
|
|
||||||
|
|
||||||
@@ -549,6 +570,7 @@ def book_revenue_via_journal_entry(
|
|||||||
doc,
|
doc,
|
||||||
credit_account,
|
credit_account,
|
||||||
debit_account,
|
debit_account,
|
||||||
|
against,
|
||||||
amount,
|
amount,
|
||||||
base_amount,
|
base_amount,
|
||||||
posting_date,
|
posting_date,
|
||||||
@@ -559,14 +581,16 @@ def book_revenue_via_journal_entry(
|
|||||||
deferred_process=None,
|
deferred_process=None,
|
||||||
submit="No",
|
submit="No",
|
||||||
):
|
):
|
||||||
|
|
||||||
if amount == 0:
|
if amount == 0:
|
||||||
return
|
return
|
||||||
|
|
||||||
journal_entry = frappe.new_doc("Journal Entry")
|
journal_entry = frappe.new_doc("Journal Entry")
|
||||||
journal_entry.posting_date = posting_date
|
journal_entry.posting_date = posting_date
|
||||||
journal_entry.company = doc.company
|
journal_entry.company = doc.company
|
||||||
journal_entry.voucher_type = "Deferred Revenue" if doc.doctype == "Sales Invoice" else "Deferred Expense"
|
journal_entry.voucher_type = (
|
||||||
journal_entry.process_deferred_accounting = deferred_process
|
"Deferred Revenue" if doc.doctype == "Sales Invoice" else "Deferred Expense"
|
||||||
|
)
|
||||||
|
|
||||||
debit_entry = {
|
debit_entry = {
|
||||||
"account": credit_account,
|
"account": credit_account,
|
||||||
@@ -609,11 +633,17 @@ def book_revenue_via_journal_entry(
|
|||||||
frappe.db.commit()
|
frappe.db.commit()
|
||||||
except Exception:
|
except Exception:
|
||||||
frappe.db.rollback()
|
frappe.db.rollback()
|
||||||
doc.log_error(f"Error while processing deferred accounting for Invoice {doc.name}")
|
traceback = frappe.get_traceback()
|
||||||
|
frappe.log_error(
|
||||||
|
title=_("Error while processing deferred accounting for Invoice {0}").format(doc.name),
|
||||||
|
message=traceback,
|
||||||
|
)
|
||||||
|
|
||||||
frappe.flags.deferred_accounting_error = True
|
frappe.flags.deferred_accounting_error = True
|
||||||
|
|
||||||
|
|
||||||
def get_deferred_booking_accounts(doctype, voucher_detail_no, dr_or_cr):
|
def get_deferred_booking_accounts(doctype, voucher_detail_no, dr_or_cr):
|
||||||
|
|
||||||
if doctype == "Sales Invoice":
|
if doctype == "Sales Invoice":
|
||||||
credit_account, debit_account = frappe.db.get_value(
|
credit_account, debit_account = frappe.db.get_value(
|
||||||
"Sales Invoice Item",
|
"Sales Invoice Item",
|
||||||
|
|||||||
@@ -1,31 +1,33 @@
|
|||||||
// Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors
|
// Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors
|
||||||
// License: GNU General Public License v3. See license.txt
|
// License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
frappe.ui.form.on("Account", {
|
frappe.ui.form.on('Account', {
|
||||||
setup: function (frm) {
|
setup: function(frm) {
|
||||||
frm.add_fetch("parent_account", "report_type", "report_type");
|
frm.add_fetch('parent_account', 'report_type', 'report_type');
|
||||||
frm.add_fetch("parent_account", "root_type", "root_type");
|
frm.add_fetch('parent_account', 'root_type', 'root_type');
|
||||||
},
|
},
|
||||||
onload: function (frm) {
|
onload: function(frm) {
|
||||||
frm.set_query("parent_account", function (doc) {
|
frm.set_query('parent_account', function(doc) {
|
||||||
return {
|
return {
|
||||||
filters: {
|
filters: {
|
||||||
is_group: 1,
|
"is_group": 1,
|
||||||
company: doc.company,
|
"company": doc.company
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
refresh: function (frm) {
|
refresh: function(frm) {
|
||||||
frm.toggle_display("account_name", frm.is_new());
|
frm.toggle_display('account_name', frm.is_new());
|
||||||
|
|
||||||
// hide fields if group
|
// hide fields if group
|
||||||
frm.toggle_display(["tax_rate"], cint(frm.doc.is_group) == 0);
|
frm.toggle_display(['account_type', 'tax_rate'], cint(frm.doc.is_group) == 0);
|
||||||
|
|
||||||
frm.toggle_enable(["is_group", "company", "account_number"], frm.is_new());
|
// disable fields
|
||||||
|
frm.toggle_enable(['is_group', 'company'], false);
|
||||||
|
|
||||||
if (cint(frm.doc.is_group) == 0) {
|
if (cint(frm.doc.is_group) == 0) {
|
||||||
frm.toggle_display("freeze_account", frm.doc.__onload && frm.doc.__onload.can_freeze_account);
|
frm.toggle_display('freeze_account', frm.doc.__onload
|
||||||
|
&& frm.doc.__onload.can_freeze_account);
|
||||||
}
|
}
|
||||||
|
|
||||||
// read-only for root accounts
|
// read-only for root accounts
|
||||||
@@ -36,147 +38,125 @@ frappe.ui.form.on("Account", {
|
|||||||
} else {
|
} else {
|
||||||
// credit days and type if customer or supplier
|
// credit days and type if customer or supplier
|
||||||
frm.set_intro(null);
|
frm.set_intro(null);
|
||||||
frm.trigger("account_type");
|
frm.trigger('account_type');
|
||||||
// show / hide convert buttons
|
// show / hide convert buttons
|
||||||
frm.trigger("add_toolbar_buttons");
|
frm.trigger('add_toolbar_buttons');
|
||||||
}
|
}
|
||||||
if (frm.has_perm("write")) {
|
if (frm.has_perm('write')) {
|
||||||
frm.add_custom_button(
|
frm.add_custom_button(__('Merge Account'), function () {
|
||||||
__("Merge Account"),
|
frm.trigger("merge_account");
|
||||||
function () {
|
}, __('Actions'));
|
||||||
frm.trigger("merge_account");
|
frm.add_custom_button(__('Update Account Name / Number'), function () {
|
||||||
},
|
frm.trigger("update_account_number");
|
||||||
__("Actions")
|
}, __('Actions'));
|
||||||
);
|
|
||||||
frm.add_custom_button(
|
|
||||||
__("Update Account Name / Number"),
|
|
||||||
function () {
|
|
||||||
frm.trigger("update_account_number");
|
|
||||||
},
|
|
||||||
__("Actions")
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
account_type: function (frm) {
|
account_type: function (frm) {
|
||||||
if (frm.doc.is_group == 0) {
|
if (frm.doc.is_group == 0) {
|
||||||
frm.toggle_display(["tax_rate"], frm.doc.account_type == "Tax");
|
frm.toggle_display(['tax_rate'], frm.doc.account_type == 'Tax');
|
||||||
frm.toggle_display("warehouse", frm.doc.account_type == "Stock");
|
frm.toggle_display('warehouse', frm.doc.account_type == 'Stock');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
add_toolbar_buttons: function (frm) {
|
add_toolbar_buttons: function(frm) {
|
||||||
frm.add_custom_button(
|
frm.add_custom_button(__('Chart of Accounts'), () => {
|
||||||
__("Chart of Accounts"),
|
frappe.set_route("Tree", "Account");
|
||||||
() => {
|
}, __('View'));
|
||||||
frappe.set_route("Tree", "Account");
|
|
||||||
},
|
|
||||||
__("View")
|
|
||||||
);
|
|
||||||
|
|
||||||
if (frm.doc.is_group == 1) {
|
if (frm.doc.is_group == 1) {
|
||||||
frm.add_custom_button(
|
frm.add_custom_button(__('Convert to Non-Group'), function () {
|
||||||
__("Convert to Non-Group"),
|
return frappe.call({
|
||||||
function () {
|
doc: frm.doc,
|
||||||
return frappe.call({
|
method: 'convert_group_to_ledger',
|
||||||
doc: frm.doc,
|
callback: function() {
|
||||||
method: "convert_group_to_ledger",
|
frm.refresh();
|
||||||
callback: function () {
|
}
|
||||||
frm.refresh();
|
});
|
||||||
},
|
}, __('Actions'));
|
||||||
});
|
|
||||||
},
|
|
||||||
__("Actions")
|
|
||||||
);
|
|
||||||
} else if (cint(frm.doc.is_group) == 0 && frappe.boot.user.can_read.indexOf("GL Entry") !== -1) {
|
|
||||||
frm.add_custom_button(
|
|
||||||
__("General Ledger"),
|
|
||||||
function () {
|
|
||||||
frappe.route_options = {
|
|
||||||
account: frm.doc.name,
|
|
||||||
from_date: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1],
|
|
||||||
to_date: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2],
|
|
||||||
company: frm.doc.company,
|
|
||||||
};
|
|
||||||
frappe.set_route("query-report", "General Ledger");
|
|
||||||
},
|
|
||||||
__("View")
|
|
||||||
);
|
|
||||||
|
|
||||||
frm.add_custom_button(
|
} else if (cint(frm.doc.is_group) == 0
|
||||||
__("Convert to Group"),
|
&& frappe.boot.user.can_read.indexOf("GL Entry") !== -1) {
|
||||||
function () {
|
frm.add_custom_button(__('General Ledger'), function () {
|
||||||
return frappe.call({
|
frappe.route_options = {
|
||||||
doc: frm.doc,
|
"account": frm.doc.name,
|
||||||
method: "convert_ledger_to_group",
|
"from_date": frappe.sys_defaults.year_start_date,
|
||||||
callback: function () {
|
"to_date": frappe.sys_defaults.year_end_date,
|
||||||
frm.refresh();
|
"company": frm.doc.company
|
||||||
},
|
};
|
||||||
});
|
frappe.set_route("query-report", "General Ledger");
|
||||||
},
|
}, __('View'));
|
||||||
__("Actions")
|
|
||||||
);
|
frm.add_custom_button(__('Convert to Group'), function () {
|
||||||
|
return frappe.call({
|
||||||
|
doc: frm.doc,
|
||||||
|
method: 'convert_ledger_to_group',
|
||||||
|
callback: function() {
|
||||||
|
frm.refresh();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}, __('Actions'));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
merge_account: function (frm) {
|
merge_account: function(frm) {
|
||||||
var d = new frappe.ui.Dialog({
|
var d = new frappe.ui.Dialog({
|
||||||
title: __("Merge with Existing Account"),
|
title: __('Merge with Existing Account'),
|
||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
label: "Name",
|
"label" : "Name",
|
||||||
fieldname: "name",
|
"fieldname": "name",
|
||||||
fieldtype: "Data",
|
"fieldtype": "Data",
|
||||||
reqd: 1,
|
"reqd": 1,
|
||||||
default: frm.doc.name,
|
"default": frm.doc.name
|
||||||
},
|
}
|
||||||
],
|
],
|
||||||
primary_action: function () {
|
primary_action: function() {
|
||||||
var data = d.get_values();
|
var data = d.get_values();
|
||||||
frappe.call({
|
frappe.call({
|
||||||
method: "erpnext.accounts.doctype.account.account.merge_account",
|
method: "erpnext.accounts.doctype.account.account.merge_account",
|
||||||
args: {
|
args: {
|
||||||
old: frm.doc.name,
|
old: frm.doc.name,
|
||||||
new: data.name,
|
new: data.name,
|
||||||
|
is_group: frm.doc.is_group,
|
||||||
|
root_type: frm.doc.root_type,
|
||||||
|
company: frm.doc.company
|
||||||
},
|
},
|
||||||
callback: function (r) {
|
callback: function(r) {
|
||||||
if (!r.exc) {
|
if(!r.exc) {
|
||||||
if (r.message) {
|
if(r.message) {
|
||||||
frappe.set_route("Form", "Account", r.message);
|
frappe.set_route("Form", "Account", r.message);
|
||||||
}
|
}
|
||||||
d.hide();
|
d.hide();
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
primary_action_label: __("Merge"),
|
primary_action_label: __('Merge')
|
||||||
});
|
});
|
||||||
d.show();
|
d.show();
|
||||||
},
|
},
|
||||||
|
|
||||||
update_account_number: function (frm) {
|
update_account_number: function(frm) {
|
||||||
var d = new frappe.ui.Dialog({
|
var d = new frappe.ui.Dialog({
|
||||||
title: __("Update Account Number / Name"),
|
title: __('Update Account Number / Name'),
|
||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
label: "Account Name",
|
"label": "Account Name",
|
||||||
fieldname: "account_name",
|
"fieldname": "account_name",
|
||||||
fieldtype: "Data",
|
"fieldtype": "Data",
|
||||||
reqd: 1,
|
"reqd": 1,
|
||||||
default: frm.doc.account_name,
|
"default": frm.doc.account_name
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Account Number",
|
"label": "Account Number",
|
||||||
fieldname: "account_number",
|
"fieldname": "account_number",
|
||||||
fieldtype: "Data",
|
"fieldtype": "Data",
|
||||||
default: frm.doc.account_number,
|
"default": frm.doc.account_number
|
||||||
},
|
}
|
||||||
],
|
],
|
||||||
primary_action: function () {
|
primary_action: function() {
|
||||||
var data = d.get_values();
|
var data = d.get_values();
|
||||||
if (
|
if(data.account_number === frm.doc.account_number && data.account_name === frm.doc.account_name) {
|
||||||
data.account_number === frm.doc.account_number &&
|
|
||||||
data.account_name === frm.doc.account_name
|
|
||||||
) {
|
|
||||||
d.hide();
|
d.hide();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -186,11 +166,11 @@ frappe.ui.form.on("Account", {
|
|||||||
args: {
|
args: {
|
||||||
account_number: data.account_number,
|
account_number: data.account_number,
|
||||||
account_name: data.account_name,
|
account_name: data.account_name,
|
||||||
name: frm.doc.name,
|
name: frm.doc.name
|
||||||
},
|
},
|
||||||
callback: function (r) {
|
callback: function(r) {
|
||||||
if (!r.exc) {
|
if(!r.exc) {
|
||||||
if (r.message) {
|
if(r.message) {
|
||||||
frappe.set_route("Form", "Account", r.message);
|
frappe.set_route("Form", "Account", r.message);
|
||||||
} else {
|
} else {
|
||||||
frm.set_value("account_number", data.account_number);
|
frm.set_value("account_number", data.account_number);
|
||||||
@@ -198,11 +178,11 @@ frappe.ui.form.on("Account", {
|
|||||||
}
|
}
|
||||||
d.hide();
|
d.hide();
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
primary_action_label: __("Update"),
|
primary_action_label: __('Update')
|
||||||
});
|
});
|
||||||
d.show();
|
d.show();
|
||||||
},
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
"allow_copy": 1,
|
"allow_copy": 1,
|
||||||
"allow_import": 1,
|
"allow_import": 1,
|
||||||
"creation": "2013-01-30 12:49:46",
|
"creation": "2013-01-30 12:49:46",
|
||||||
"default_view": "Tree",
|
|
||||||
"description": "Heads (or groups) against which Accounting Entries are made and balances are maintained.",
|
"description": "Heads (or groups) against which Accounting Entries are made and balances are maintained.",
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"document_type": "Setup",
|
"document_type": "Setup",
|
||||||
@@ -19,6 +18,7 @@
|
|||||||
"root_type",
|
"root_type",
|
||||||
"report_type",
|
"report_type",
|
||||||
"account_currency",
|
"account_currency",
|
||||||
|
"inter_company_account",
|
||||||
"column_break1",
|
"column_break1",
|
||||||
"parent_account",
|
"parent_account",
|
||||||
"account_type",
|
"account_type",
|
||||||
@@ -34,11 +34,15 @@
|
|||||||
{
|
{
|
||||||
"fieldname": "properties",
|
"fieldname": "properties",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"oldfieldtype": "Section Break"
|
"oldfieldtype": "Section Break",
|
||||||
|
"show_days": 1,
|
||||||
|
"show_seconds": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "column_break0",
|
"fieldname": "column_break0",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
|
"show_days": 1,
|
||||||
|
"show_seconds": 1,
|
||||||
"width": "50%"
|
"width": "50%"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -49,24 +53,29 @@
|
|||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "account_name",
|
"oldfieldname": "account_name",
|
||||||
"oldfieldtype": "Data",
|
"oldfieldtype": "Data",
|
||||||
"reqd": 1
|
"reqd": 1,
|
||||||
|
"show_days": 1,
|
||||||
|
"show_seconds": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "account_number",
|
"fieldname": "account_number",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"in_standard_filter": 1,
|
"in_standard_filter": 1,
|
||||||
"label": "Account Number"
|
"label": "Account Number",
|
||||||
|
"read_only": 1,
|
||||||
|
"show_days": 1,
|
||||||
|
"show_seconds": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"default": "0",
|
"default": "0",
|
||||||
"fieldname": "is_group",
|
"fieldname": "is_group",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
"label": "Is Group"
|
"label": "Is Group",
|
||||||
|
"show_days": 1,
|
||||||
|
"show_seconds": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fetch_from": "parent_account.company",
|
|
||||||
"fetch_if_empty": 1,
|
|
||||||
"fieldname": "company",
|
"fieldname": "company",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"in_standard_filter": 1,
|
"in_standard_filter": 1,
|
||||||
@@ -74,8 +83,11 @@
|
|||||||
"oldfieldname": "company",
|
"oldfieldname": "company",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
"options": "Company",
|
"options": "Company",
|
||||||
|
"read_only": 1,
|
||||||
"remember_last_selected_value": 1,
|
"remember_last_selected_value": 1,
|
||||||
"reqd": 1
|
"reqd": 1,
|
||||||
|
"show_days": 1,
|
||||||
|
"show_seconds": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "root_type",
|
"fieldname": "root_type",
|
||||||
@@ -83,7 +95,9 @@
|
|||||||
"in_standard_filter": 1,
|
"in_standard_filter": 1,
|
||||||
"label": "Root Type",
|
"label": "Root Type",
|
||||||
"options": "\nAsset\nLiability\nIncome\nExpense\nEquity",
|
"options": "\nAsset\nLiability\nIncome\nExpense\nEquity",
|
||||||
"read_only": 1
|
"read_only": 1,
|
||||||
|
"show_days": 1,
|
||||||
|
"show_seconds": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "report_type",
|
"fieldname": "report_type",
|
||||||
@@ -91,31 +105,46 @@
|
|||||||
"in_standard_filter": 1,
|
"in_standard_filter": 1,
|
||||||
"label": "Report Type",
|
"label": "Report Type",
|
||||||
"options": "\nBalance Sheet\nProfit and Loss",
|
"options": "\nBalance Sheet\nProfit and Loss",
|
||||||
"read_only": 1
|
"read_only": 1,
|
||||||
|
"show_days": 1,
|
||||||
|
"show_seconds": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"depends_on": "eval:doc.is_group==0",
|
"depends_on": "eval:doc.is_group==0",
|
||||||
"fieldname": "account_currency",
|
"fieldname": "account_currency",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"label": "Currency",
|
"label": "Currency",
|
||||||
"options": "Currency"
|
"options": "Currency",
|
||||||
|
"show_days": 1,
|
||||||
|
"show_seconds": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "0",
|
||||||
|
"fieldname": "inter_company_account",
|
||||||
|
"fieldtype": "Check",
|
||||||
|
"label": "Inter Company Account",
|
||||||
|
"show_days": 1,
|
||||||
|
"show_seconds": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "column_break1",
|
"fieldname": "column_break1",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
|
"show_days": 1,
|
||||||
|
"show_seconds": 1,
|
||||||
"width": "50%"
|
"width": "50%"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "parent_account",
|
"fieldname": "parent_account",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"ignore_user_permissions": 1,
|
"ignore_user_permissions": 1,
|
||||||
"in_preview": 1,
|
|
||||||
"label": "Parent Account",
|
"label": "Parent Account",
|
||||||
"oldfieldname": "parent_account",
|
"oldfieldname": "parent_account",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
"options": "Account",
|
"options": "Account",
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 1
|
"search_index": 1,
|
||||||
|
"show_days": 1,
|
||||||
|
"show_seconds": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Setting Account Type helps in selecting this Account in transactions.",
|
"description": "Setting Account Type helps in selecting this Account in transactions.",
|
||||||
@@ -125,16 +154,19 @@
|
|||||||
"label": "Account Type",
|
"label": "Account Type",
|
||||||
"oldfieldname": "account_type",
|
"oldfieldname": "account_type",
|
||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
"options": "\nAccumulated Depreciation\nAsset Received But Not Billed\nBank\nCash\nChargeable\nCapital Work in Progress\nCost of Goods Sold\nCurrent Asset\nCurrent Liability\nDepreciation\nDirect Expense\nDirect Income\nEquity\nExpense Account\nExpenses Included In Asset Valuation\nExpenses Included In Valuation\nFixed Asset\nIncome Account\nIndirect Expense\nIndirect Income\nLiability\nPayable\nReceivable\nRound Off\nRound Off for Opening\nStock\nStock Adjustment\nStock Received But Not Billed\nService Received But Not Billed\nTax\nTemporary",
|
"options": "\nAccumulated Depreciation\nAsset Received But Not Billed\nBank\nCash\nChargeable\nCapital Work in Progress\nCost of Goods Sold\nDepreciation\nEquity\nExpense Account\nExpenses Included In Asset Valuation\nExpenses Included In Valuation\nFixed Asset\nIncome Account\nPayable\nReceivable\nRound Off\nStock\nStock Adjustment\nStock Received But Not Billed\nService Received But Not Billed\nTax\nTemporary",
|
||||||
"search_index": 1
|
"show_days": 1,
|
||||||
|
"show_seconds": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Rate at which this tax is applied",
|
"description": "Rate at which this tax is applied",
|
||||||
"fieldname": "tax_rate",
|
"fieldname": "tax_rate",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"label": "Tax Rate",
|
"label": "Rate",
|
||||||
"oldfieldname": "tax_rate",
|
"oldfieldname": "tax_rate",
|
||||||
"oldfieldtype": "Currency"
|
"oldfieldtype": "Currency",
|
||||||
|
"show_days": 1,
|
||||||
|
"show_seconds": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "If the account is frozen, entries are allowed to restricted users.",
|
"description": "If the account is frozen, entries are allowed to restricted users.",
|
||||||
@@ -143,13 +175,17 @@
|
|||||||
"label": "Frozen",
|
"label": "Frozen",
|
||||||
"oldfieldname": "freeze_account",
|
"oldfieldname": "freeze_account",
|
||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select",
|
||||||
"options": "No\nYes"
|
"options": "No\nYes",
|
||||||
|
"show_days": 1,
|
||||||
|
"show_seconds": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "balance_must_be",
|
"fieldname": "balance_must_be",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"label": "Balance must be",
|
"label": "Balance must be",
|
||||||
"options": "\nDebit\nCredit"
|
"options": "\nDebit\nCredit",
|
||||||
|
"show_days": 1,
|
||||||
|
"show_seconds": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "lft",
|
"fieldname": "lft",
|
||||||
@@ -158,7 +194,9 @@
|
|||||||
"label": "Lft",
|
"label": "Lft",
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
"search_index": 1
|
"search_index": 1,
|
||||||
|
"show_days": 1,
|
||||||
|
"show_seconds": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "rgt",
|
"fieldname": "rgt",
|
||||||
@@ -167,7 +205,9 @@
|
|||||||
"label": "Rgt",
|
"label": "Rgt",
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
"search_index": 1
|
"search_index": 1,
|
||||||
|
"show_days": 1,
|
||||||
|
"show_seconds": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "old_parent",
|
"fieldname": "old_parent",
|
||||||
@@ -175,27 +215,33 @@
|
|||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
"label": "Old Parent",
|
"label": "Old Parent",
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
"read_only": 1
|
"read_only": 1,
|
||||||
|
"show_days": 1,
|
||||||
|
"show_seconds": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"default": "0",
|
"default": "0",
|
||||||
"depends_on": "eval:(doc.report_type == 'Profit and Loss' && !doc.is_group)",
|
"depends_on": "eval:(doc.report_type == 'Profit and Loss' && !doc.is_group)",
|
||||||
"fieldname": "include_in_gross",
|
"fieldname": "include_in_gross",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
"label": "Include in gross"
|
"label": "Include in gross",
|
||||||
|
"show_days": 1,
|
||||||
|
"show_seconds": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"default": "0",
|
"default": "0",
|
||||||
"fieldname": "disabled",
|
"fieldname": "disabled",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
"label": "Disable"
|
"label": "Disable",
|
||||||
|
"show_days": 1,
|
||||||
|
"show_seconds": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"icon": "fa fa-money",
|
"icon": "fa fa-money",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"is_tree": 1,
|
"is_tree": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2025-01-22 10:40:35.766017",
|
"modified": "2020-06-11 15:15:54.338622",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Account",
|
"name": "Account",
|
||||||
@@ -246,15 +292,14 @@
|
|||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "Accounts Manager",
|
"role": "Accounts Manager",
|
||||||
|
"set_user_permissions": 1,
|
||||||
"share": 1,
|
"share": 1,
|
||||||
"write": 1
|
"write": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"search_fields": "account_number",
|
"search_fields": "account_number",
|
||||||
"show_name_in_global_search": 1,
|
"show_name_in_global_search": 1,
|
||||||
"show_preview_popup": 1,
|
"sort_field": "modified",
|
||||||
"sort_field": "creation",
|
|
||||||
"sort_order": "ASC",
|
"sort_order": "ASC",
|
||||||
"states": [],
|
|
||||||
"track_changes": 1
|
"track_changes": 1
|
||||||
}
|
}
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
from frappe import _, throw
|
from frappe import _, throw
|
||||||
from frappe.utils import add_to_date, cint, cstr, pretty_date
|
from frappe.utils import cint, cstr
|
||||||
from frappe.utils.nestedset import NestedSet, get_ancestors_of, get_descendants_of
|
from frappe.utils.nestedset import NestedSet, get_ancestors_of, get_descendants_of
|
||||||
|
|
||||||
import erpnext
|
import erpnext
|
||||||
@@ -18,96 +18,35 @@ class BalanceMismatchError(frappe.ValidationError):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class InvalidAccountMergeError(frappe.ValidationError):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class Account(NestedSet):
|
class Account(NestedSet):
|
||||||
# begin: auto-generated types
|
|
||||||
# This code is auto-generated. Do not modify anything in this block.
|
|
||||||
|
|
||||||
from typing import TYPE_CHECKING
|
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
|
||||||
from frappe.types import DF
|
|
||||||
|
|
||||||
account_currency: DF.Link | None
|
|
||||||
account_name: DF.Data
|
|
||||||
account_number: DF.Data | None
|
|
||||||
account_type: DF.Literal[
|
|
||||||
"",
|
|
||||||
"Accumulated Depreciation",
|
|
||||||
"Asset Received But Not Billed",
|
|
||||||
"Bank",
|
|
||||||
"Cash",
|
|
||||||
"Chargeable",
|
|
||||||
"Capital Work in Progress",
|
|
||||||
"Cost of Goods Sold",
|
|
||||||
"Current Asset",
|
|
||||||
"Current Liability",
|
|
||||||
"Depreciation",
|
|
||||||
"Direct Expense",
|
|
||||||
"Direct Income",
|
|
||||||
"Equity",
|
|
||||||
"Expense Account",
|
|
||||||
"Expenses Included In Asset Valuation",
|
|
||||||
"Expenses Included In Valuation",
|
|
||||||
"Fixed Asset",
|
|
||||||
"Income Account",
|
|
||||||
"Indirect Expense",
|
|
||||||
"Indirect Income",
|
|
||||||
"Liability",
|
|
||||||
"Payable",
|
|
||||||
"Receivable",
|
|
||||||
"Round Off",
|
|
||||||
"Round Off for Opening",
|
|
||||||
"Stock",
|
|
||||||
"Stock Adjustment",
|
|
||||||
"Stock Received But Not Billed",
|
|
||||||
"Service Received But Not Billed",
|
|
||||||
"Tax",
|
|
||||||
"Temporary",
|
|
||||||
]
|
|
||||||
balance_must_be: DF.Literal["", "Debit", "Credit"]
|
|
||||||
company: DF.Link
|
|
||||||
disabled: DF.Check
|
|
||||||
freeze_account: DF.Literal["No", "Yes"]
|
|
||||||
include_in_gross: DF.Check
|
|
||||||
is_group: DF.Check
|
|
||||||
lft: DF.Int
|
|
||||||
old_parent: DF.Data | None
|
|
||||||
parent_account: DF.Link
|
|
||||||
report_type: DF.Literal["", "Balance Sheet", "Profit and Loss"]
|
|
||||||
rgt: DF.Int
|
|
||||||
root_type: DF.Literal["", "Asset", "Liability", "Income", "Expense", "Equity"]
|
|
||||||
tax_rate: DF.Float
|
|
||||||
# end: auto-generated types
|
|
||||||
|
|
||||||
nsm_parent_field = "parent_account"
|
nsm_parent_field = "parent_account"
|
||||||
|
|
||||||
def on_update(self):
|
def on_update(self):
|
||||||
if frappe.local.flags.ignore_update_nsm:
|
if frappe.local.flags.ignore_update_nsm:
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
super().on_update()
|
super(Account, self).on_update()
|
||||||
|
|
||||||
def onload(self):
|
def onload(self):
|
||||||
frozen_accounts_modifier = frappe.get_single_value("Accounts Settings", "frozen_accounts_modifier")
|
frozen_accounts_modifier = frappe.db.get_value(
|
||||||
|
"Accounts Settings", "Accounts Settings", "frozen_accounts_modifier"
|
||||||
|
)
|
||||||
if not frozen_accounts_modifier or frozen_accounts_modifier in frappe.get_roles():
|
if not frozen_accounts_modifier or frozen_accounts_modifier in frappe.get_roles():
|
||||||
self.set_onload("can_freeze_account", True)
|
self.set_onload("can_freeze_account", True)
|
||||||
|
|
||||||
def autoname(self):
|
def autoname(self):
|
||||||
from erpnext.accounts.utils import get_autoname_with_number
|
from erpnext.accounts.utils import get_autoname_with_number
|
||||||
|
|
||||||
self.name = get_autoname_with_number(self.account_number, self.account_name, self.company)
|
self.name = get_autoname_with_number(self.account_number, self.account_name, None, self.company)
|
||||||
|
|
||||||
def validate(self):
|
def validate(self):
|
||||||
|
from erpnext.accounts.utils import validate_field_number
|
||||||
|
|
||||||
if frappe.local.flags.allow_unverified_charts:
|
if frappe.local.flags.allow_unverified_charts:
|
||||||
return
|
return
|
||||||
self.validate_parent()
|
self.validate_parent()
|
||||||
self.validate_parent_child_account_type()
|
|
||||||
self.validate_root_details()
|
self.validate_root_details()
|
||||||
self.validate_account_number()
|
validate_field_number("Account", self.name, self.account_number, self.company, "account_number")
|
||||||
self.validate_group_or_ledger()
|
self.validate_group_or_ledger()
|
||||||
self.set_root_and_report_type()
|
self.set_root_and_report_type()
|
||||||
self.validate_mandatory()
|
self.validate_mandatory()
|
||||||
@@ -115,26 +54,11 @@ class Account(NestedSet):
|
|||||||
self.validate_balance_must_be_debit_or_credit()
|
self.validate_balance_must_be_debit_or_credit()
|
||||||
self.validate_account_currency()
|
self.validate_account_currency()
|
||||||
self.validate_root_company_and_sync_account_to_children()
|
self.validate_root_company_and_sync_account_to_children()
|
||||||
self.validate_receivable_payable_account_type()
|
|
||||||
|
|
||||||
def validate_parent_child_account_type(self):
|
|
||||||
if self.parent_account:
|
|
||||||
if self.account_type in [
|
|
||||||
"Direct Income",
|
|
||||||
"Indirect Income",
|
|
||||||
"Current Asset",
|
|
||||||
"Current Liability",
|
|
||||||
"Direct Expense",
|
|
||||||
"Indirect Expense",
|
|
||||||
]:
|
|
||||||
parent_account_type = frappe.db.get_value("Account", self.parent_account, ["account_type"])
|
|
||||||
if parent_account_type == self.account_type:
|
|
||||||
throw(_("Only Parent can be of type {0}").format(self.account_type))
|
|
||||||
|
|
||||||
def validate_parent(self):
|
def validate_parent(self):
|
||||||
"""Fetch Parent Details and validate parent account"""
|
"""Fetch Parent Details and validate parent account"""
|
||||||
if self.parent_account:
|
if self.parent_account:
|
||||||
par = frappe.get_cached_value(
|
par = frappe.db.get_value(
|
||||||
"Account", self.parent_account, ["name", "is_group", "company"], as_dict=1
|
"Account", self.parent_account, ["name", "is_group", "company"], as_dict=1
|
||||||
)
|
)
|
||||||
if not par:
|
if not par:
|
||||||
@@ -158,7 +82,7 @@ class Account(NestedSet):
|
|||||||
|
|
||||||
def set_root_and_report_type(self):
|
def set_root_and_report_type(self):
|
||||||
if self.parent_account:
|
if self.parent_account:
|
||||||
par = frappe.get_cached_value(
|
par = frappe.db.get_value(
|
||||||
"Account", self.parent_account, ["report_type", "root_type"], as_dict=1
|
"Account", self.parent_account, ["report_type", "root_type"], as_dict=1
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -168,7 +92,7 @@ class Account(NestedSet):
|
|||||||
self.root_type = par.root_type
|
self.root_type = par.root_type
|
||||||
|
|
||||||
if self.is_group:
|
if self.is_group:
|
||||||
db_value = self.get_doc_before_save()
|
db_value = frappe.db.get_value("Account", self.name, ["report_type", "root_type"], as_dict=1)
|
||||||
if db_value:
|
if db_value:
|
||||||
if self.report_type != db_value.report_type:
|
if self.report_type != db_value.report_type:
|
||||||
frappe.db.sql(
|
frappe.db.sql(
|
||||||
@@ -186,42 +110,24 @@ class Account(NestedSet):
|
|||||||
"Balance Sheet" if self.root_type in ("Asset", "Liability", "Equity") else "Profit and Loss"
|
"Balance Sheet" if self.root_type in ("Asset", "Liability", "Equity") else "Profit and Loss"
|
||||||
)
|
)
|
||||||
|
|
||||||
def validate_receivable_payable_account_type(self):
|
|
||||||
doc_before_save = self.get_doc_before_save()
|
|
||||||
receivable_payable_types = ["Receivable", "Payable"]
|
|
||||||
if (
|
|
||||||
doc_before_save
|
|
||||||
and doc_before_save.account_type in receivable_payable_types
|
|
||||||
and doc_before_save.account_type != self.account_type
|
|
||||||
):
|
|
||||||
# check for ledger entries
|
|
||||||
if frappe.db.get_all("GL Entry", filters={"account": self.name, "is_cancelled": 0}, limit=1):
|
|
||||||
msg = _(
|
|
||||||
"There are ledger entries against this account. Changing {0} to non-{1} in live system will cause incorrect output in 'Accounts {2}' report"
|
|
||||||
).format(
|
|
||||||
frappe.bold(_("Account Type")), doc_before_save.account_type, doc_before_save.account_type
|
|
||||||
)
|
|
||||||
frappe.msgprint(msg)
|
|
||||||
self.add_comment("Comment", msg)
|
|
||||||
|
|
||||||
def validate_root_details(self):
|
def validate_root_details(self):
|
||||||
doc_before_save = self.get_doc_before_save()
|
# does not exists parent
|
||||||
|
if frappe.db.exists("Account", self.name):
|
||||||
if doc_before_save and not doc_before_save.parent_account:
|
if not frappe.db.get_value("Account", self.name, "parent_account"):
|
||||||
throw(_("Root cannot be edited."), RootNotEditable)
|
throw(_("Root cannot be edited."), RootNotEditable)
|
||||||
|
|
||||||
if not self.parent_account and not self.is_group:
|
if not self.parent_account and not self.is_group:
|
||||||
throw(_("The root account {0} must be a group").format(frappe.bold(self.name)))
|
frappe.throw(_("The root account {0} must be a group").format(frappe.bold(self.name)))
|
||||||
|
|
||||||
def validate_root_company_and_sync_account_to_children(self):
|
def validate_root_company_and_sync_account_to_children(self):
|
||||||
# ignore validation while creating new compnay or while syncing to child companies
|
# ignore validation while creating new compnay or while syncing to child companies
|
||||||
if frappe.local.flags.ignore_root_company_validation or self.flags.ignore_root_company_validation:
|
if (
|
||||||
|
frappe.local.flags.ignore_root_company_validation or self.flags.ignore_root_company_validation
|
||||||
|
):
|
||||||
return
|
return
|
||||||
ancestors = get_root_company(self.company)
|
ancestors = get_root_company(self.company)
|
||||||
if ancestors:
|
if ancestors:
|
||||||
if frappe.get_cached_value(
|
if frappe.get_value("Company", self.company, "allow_account_creation_against_child_company"):
|
||||||
"Company", self.company, "allow_account_creation_against_child_company"
|
|
||||||
):
|
|
||||||
return
|
return
|
||||||
if not frappe.db.get_value(
|
if not frappe.db.get_value(
|
||||||
"Account", {"account_name": self.account_name, "company": ancestors[0]}, "name"
|
"Account", {"account_name": self.account_name, "company": ancestors[0]}, "name"
|
||||||
@@ -232,7 +138,7 @@ class Account(NestedSet):
|
|||||||
if not descendants:
|
if not descendants:
|
||||||
return
|
return
|
||||||
parent_acc_name_map = {}
|
parent_acc_name_map = {}
|
||||||
parent_acc_name, parent_acc_number = frappe.get_cached_value(
|
parent_acc_name, parent_acc_number = frappe.db.get_value(
|
||||||
"Account", self.parent_account, ["account_name", "account_number"]
|
"Account", self.parent_account, ["account_name", "account_number"]
|
||||||
)
|
)
|
||||||
filters = {
|
filters = {
|
||||||
@@ -253,28 +159,27 @@ class Account(NestedSet):
|
|||||||
self.create_account_for_child_company(parent_acc_name_map, descendants, parent_acc_name)
|
self.create_account_for_child_company(parent_acc_name_map, descendants, parent_acc_name)
|
||||||
|
|
||||||
def validate_group_or_ledger(self):
|
def validate_group_or_ledger(self):
|
||||||
doc_before_save = self.get_doc_before_save()
|
if self.get("__islocal"):
|
||||||
if not doc_before_save or cint(doc_before_save.is_group) == cint(self.is_group):
|
|
||||||
return
|
return
|
||||||
|
|
||||||
if self.check_gle_exists():
|
existing_is_group = frappe.db.get_value("Account", self.name, "is_group")
|
||||||
throw(_("Account with existing transaction cannot be converted to ledger"))
|
if cint(self.is_group) != cint(existing_is_group):
|
||||||
elif self.is_group:
|
if self.check_gle_exists():
|
||||||
if self.account_type and not self.flags.exclude_account_type_check:
|
throw(_("Account with existing transaction cannot be converted to ledger"))
|
||||||
throw(_("Cannot covert to Group because Account Type is selected."))
|
elif self.is_group:
|
||||||
elif self.check_if_child_exists():
|
if self.account_type and not self.flags.exclude_account_type_check:
|
||||||
throw(_("Account with child nodes cannot be set as ledger"))
|
throw(_("Cannot covert to Group because Account Type is selected."))
|
||||||
|
elif self.check_if_child_exists():
|
||||||
|
throw(_("Account with child nodes cannot be set as ledger"))
|
||||||
|
|
||||||
def validate_frozen_accounts_modifier(self):
|
def validate_frozen_accounts_modifier(self):
|
||||||
doc_before_save = self.get_doc_before_save()
|
old_value = frappe.db.get_value("Account", self.name, "freeze_account")
|
||||||
if not doc_before_save or doc_before_save.freeze_account == self.freeze_account:
|
if old_value and old_value != self.freeze_account:
|
||||||
return
|
frozen_accounts_modifier = frappe.db.get_value(
|
||||||
|
"Accounts Settings", None, "frozen_accounts_modifier"
|
||||||
frozen_accounts_modifier = frappe.get_cached_value(
|
)
|
||||||
"Accounts Settings", "Accounts Settings", "frozen_accounts_modifier"
|
if not frozen_accounts_modifier or frozen_accounts_modifier not in frappe.get_roles():
|
||||||
)
|
throw(_("You are not authorized to set Frozen value"))
|
||||||
if not frozen_accounts_modifier or frozen_accounts_modifier not in frappe.get_roles():
|
|
||||||
throw(_("You are not authorized to set Frozen value"))
|
|
||||||
|
|
||||||
def validate_balance_must_be_debit_or_credit(self):
|
def validate_balance_must_be_debit_or_credit(self):
|
||||||
from erpnext.accounts.utils import get_balance_on
|
from erpnext.accounts.utils import get_balance_on
|
||||||
@@ -296,11 +201,8 @@ class Account(NestedSet):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def validate_account_currency(self):
|
def validate_account_currency(self):
|
||||||
self.currency_explicitly_specified = True
|
|
||||||
|
|
||||||
if not self.account_currency:
|
if not self.account_currency:
|
||||||
self.account_currency = frappe.get_cached_value("Company", self.company, "default_currency")
|
self.account_currency = frappe.get_cached_value("Company", self.company, "default_currency")
|
||||||
self.currency_explicitly_specified = False
|
|
||||||
|
|
||||||
gl_currency = frappe.db.get_value("GL Entry", {"account": self.name}, "account_currency")
|
gl_currency = frappe.db.get_value("GL Entry", {"account": self.name}, "account_currency")
|
||||||
|
|
||||||
@@ -308,22 +210,6 @@ class Account(NestedSet):
|
|||||||
if frappe.db.get_value("GL Entry", {"account": self.name}):
|
if frappe.db.get_value("GL Entry", {"account": self.name}):
|
||||||
frappe.throw(_("Currency can not be changed after making entries using some other currency"))
|
frappe.throw(_("Currency can not be changed after making entries using some other currency"))
|
||||||
|
|
||||||
def validate_account_number(self, account_number=None):
|
|
||||||
if not account_number:
|
|
||||||
account_number = self.account_number
|
|
||||||
|
|
||||||
if account_number:
|
|
||||||
account_with_same_number = frappe.db.get_value(
|
|
||||||
"Account",
|
|
||||||
{"account_number": account_number, "company": self.company, "name": ["!=", self.name]},
|
|
||||||
)
|
|
||||||
if account_with_same_number:
|
|
||||||
frappe.throw(
|
|
||||||
_("Account Number {0} already used in account {1}").format(
|
|
||||||
account_number, account_with_same_number
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
def create_account_for_child_company(self, parent_acc_name_map, descendants, parent_acc_name):
|
def create_account_for_child_company(self, parent_acc_name_map, descendants, parent_acc_name):
|
||||||
for company in descendants:
|
for company in descendants:
|
||||||
company_bold = frappe.bold(company)
|
company_bold = frappe.bold(company)
|
||||||
@@ -337,9 +223,9 @@ class Account(NestedSet):
|
|||||||
)
|
)
|
||||||
|
|
||||||
# validate if parent of child company account to be added is a group
|
# validate if parent of child company account to be added is a group
|
||||||
if frappe.get_cached_value(
|
if frappe.db.get_value("Account", self.parent_account, "is_group") and not frappe.db.get_value(
|
||||||
"Account", self.parent_account, "is_group"
|
"Account", parent_acc_name_map[company], "is_group"
|
||||||
) and not frappe.get_cached_value("Account", parent_acc_name_map[company], "is_group"):
|
):
|
||||||
msg = _(
|
msg = _(
|
||||||
"While creating account for Child Company {0}, parent account {1} found as a ledger account."
|
"While creating account for Child Company {0}, parent account {1} found as a ledger account."
|
||||||
).format(company_bold, parent_acc_name_bold)
|
).format(company_bold, parent_acc_name_bold)
|
||||||
@@ -362,10 +248,8 @@ class Account(NestedSet):
|
|||||||
{
|
{
|
||||||
"company": company,
|
"company": company,
|
||||||
# parent account's currency should be passed down to child account's curreny
|
# parent account's currency should be passed down to child account's curreny
|
||||||
# if currency explicitly specified by user, child will inherit. else, default currency will be used.
|
# if it is None, it picks it up from default company currency, which might be unintended
|
||||||
"account_currency": self.account_currency
|
"account_currency": erpnext.get_company_currency(company),
|
||||||
if self.currency_explicitly_specified
|
|
||||||
else erpnext.get_company_currency(company),
|
|
||||||
"parent_account": parent_acc_name_map[company],
|
"parent_account": parent_acc_name_map[company],
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@@ -429,7 +313,7 @@ class Account(NestedSet):
|
|||||||
if self.check_gle_exists():
|
if self.check_gle_exists():
|
||||||
throw(_("Account with existing transaction can not be deleted"))
|
throw(_("Account with existing transaction can not be deleted"))
|
||||||
|
|
||||||
super().on_trash(True)
|
super(Account, self).on_trash(True)
|
||||||
|
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
@@ -437,9 +321,10 @@ class Account(NestedSet):
|
|||||||
def get_parent_account(doctype, txt, searchfield, start, page_len, filters):
|
def get_parent_account(doctype, txt, searchfield, start, page_len, filters):
|
||||||
return frappe.db.sql(
|
return frappe.db.sql(
|
||||||
"""select name from tabAccount
|
"""select name from tabAccount
|
||||||
where is_group = 1 and docstatus != 2 and company = {}
|
where is_group = 1 and docstatus != 2 and company = %s
|
||||||
and {} like {} order by name limit {} offset {}""".format("%s", searchfield, "%s", "%s", "%s"),
|
and %s like %s order by name limit %s, %s"""
|
||||||
(filters["company"], "%%%s%%" % txt, page_len, start),
|
% ("%s", searchfield, "%s", "%s", "%s"),
|
||||||
|
(filters["company"], "%%%s%%" % txt, start, page_len),
|
||||||
as_list=1,
|
as_list=1,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -477,30 +362,38 @@ def get_account_autoname(account_number, account_name, company):
|
|||||||
return " - ".join(parts)
|
return " - ".join(parts)
|
||||||
|
|
||||||
|
|
||||||
|
def validate_account_number(name, account_number, company):
|
||||||
|
if account_number:
|
||||||
|
account_with_same_number = frappe.db.get_value(
|
||||||
|
"Account", {"account_number": account_number, "company": company, "name": ["!=", name]}
|
||||||
|
)
|
||||||
|
if account_with_same_number:
|
||||||
|
frappe.throw(
|
||||||
|
_("Account Number {0} already used in account {1}").format(
|
||||||
|
account_number, account_with_same_number
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def update_account_number(name, account_name, account_number=None, from_descendant=False):
|
def update_account_number(name, account_name, account_number=None, from_descendant=False):
|
||||||
_ensure_idle_system()
|
account = frappe.db.get_value("Account", name, "company", as_dict=True)
|
||||||
account = frappe.get_cached_doc("Account", name)
|
|
||||||
if not account:
|
if not account:
|
||||||
return
|
return
|
||||||
|
|
||||||
old_acc_name, old_acc_number = account.account_name, account.account_number
|
old_acc_name, old_acc_number = frappe.db.get_value(
|
||||||
|
"Account", name, ["account_name", "account_number"]
|
||||||
|
)
|
||||||
|
|
||||||
# check if account exists in parent company
|
# check if account exists in parent company
|
||||||
ancestors = get_ancestors_of("Company", account.company)
|
ancestors = get_ancestors_of("Company", account.company)
|
||||||
allow_independent_account_creation = frappe.get_cached_value(
|
allow_independent_account_creation = frappe.get_value(
|
||||||
"Company", account.company, "allow_account_creation_against_child_company"
|
"Company", account.company, "allow_account_creation_against_child_company"
|
||||||
)
|
)
|
||||||
|
|
||||||
if ancestors and not allow_independent_account_creation:
|
if ancestors and not allow_independent_account_creation:
|
||||||
for ancestor in ancestors:
|
for ancestor in ancestors:
|
||||||
old_name = frappe.db.get_value(
|
if frappe.db.get_value("Account", {"account_name": old_acc_name, "company": ancestor}, "name"):
|
||||||
"Account",
|
|
||||||
{"account_number": old_acc_number, "account_name": old_acc_name, "company": ancestor},
|
|
||||||
"name",
|
|
||||||
)
|
|
||||||
|
|
||||||
if old_name and not from_descendant:
|
|
||||||
# same account in parent company exists
|
# same account in parent company exists
|
||||||
allow_child_account_creation = _("Allow Account Creation Against Child Company")
|
allow_child_account_creation = _("Allow Account Creation Against Child Company")
|
||||||
|
|
||||||
@@ -518,7 +411,7 @@ def update_account_number(name, account_name, account_number=None, from_descenda
|
|||||||
|
|
||||||
frappe.throw(message, title=_("Rename Not Allowed"))
|
frappe.throw(message, title=_("Rename Not Allowed"))
|
||||||
|
|
||||||
account.validate_account_number(account_number)
|
validate_account_number(name, account_number, account.company)
|
||||||
if account_number:
|
if account_number:
|
||||||
frappe.db.set_value("Account", name, "account_number", account_number.strip())
|
frappe.db.set_value("Account", name, "account_number", account_number.strip())
|
||||||
else:
|
else:
|
||||||
@@ -540,36 +433,24 @@ def update_account_number(name, account_name, account_number=None, from_descenda
|
|||||||
|
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def merge_account(old, new):
|
def merge_account(old, new, is_group, root_type, company):
|
||||||
_ensure_idle_system()
|
|
||||||
# Validate properties before merging
|
# Validate properties before merging
|
||||||
new_account = frappe.get_cached_doc("Account", new)
|
if not frappe.db.exists("Account", new):
|
||||||
old_account = frappe.get_cached_doc("Account", old)
|
|
||||||
|
|
||||||
if not new_account:
|
|
||||||
throw(_("Account {0} does not exist").format(new))
|
throw(_("Account {0} does not exist").format(new))
|
||||||
|
|
||||||
if (
|
val = list(frappe.db.get_value("Account", new, ["is_group", "root_type", "company"]))
|
||||||
cint(new_account.is_group),
|
|
||||||
new_account.root_type,
|
if val != [cint(is_group), root_type, company]:
|
||||||
new_account.company,
|
|
||||||
cstr(new_account.account_currency),
|
|
||||||
) != (
|
|
||||||
cint(old_account.is_group),
|
|
||||||
old_account.root_type,
|
|
||||||
old_account.company,
|
|
||||||
cstr(old_account.account_currency),
|
|
||||||
):
|
|
||||||
throw(
|
throw(
|
||||||
msg=_(
|
_(
|
||||||
"""Merging is only possible if following properties are same in both records. Is Group, Root Type, Company and Account Currency"""
|
"""Merging is only possible if following properties are same in both records. Is Group, Root Type, Company"""
|
||||||
),
|
)
|
||||||
title=("Invalid Accounts"),
|
|
||||||
exc=InvalidAccountMergeError,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if old_account.is_group and new_account.parent_account == old:
|
if is_group and frappe.db.get_value("Account", new, "parent_account") == old:
|
||||||
new_account.db_set("parent_account", frappe.get_cached_value("Account", old, "parent_account"))
|
frappe.db.set_value(
|
||||||
|
"Account", new, "parent_account", frappe.db.get_value("Account", old, "parent_account")
|
||||||
|
)
|
||||||
|
|
||||||
frappe.rename_doc("Account", old, new, merge=1, force=1)
|
frappe.rename_doc("Account", old, new, merge=1, force=1)
|
||||||
|
|
||||||
@@ -593,33 +474,7 @@ def sync_update_account_number_in_child(
|
|||||||
if old_acc_number:
|
if old_acc_number:
|
||||||
filters["account_number"] = old_acc_number
|
filters["account_number"] = old_acc_number
|
||||||
|
|
||||||
for d in frappe.db.get_values("Account", filters=filters, fieldname=["company", "name"], as_dict=True):
|
for d in frappe.db.get_values(
|
||||||
|
"Account", filters=filters, fieldname=["company", "name"], as_dict=True
|
||||||
|
):
|
||||||
update_account_number(d["name"], account_name, account_number, from_descendant=True)
|
update_account_number(d["name"], account_name, account_number, from_descendant=True)
|
||||||
|
|
||||||
|
|
||||||
def _ensure_idle_system():
|
|
||||||
# Don't allow renaming if accounting entries are actively being updated, there are two main reasons:
|
|
||||||
# 1. Correctness: It's next to impossible to ensure that renamed account is not being used *right now*.
|
|
||||||
# 2. Performance: Renaming requires locking out many tables entirely and severely degrades performance.
|
|
||||||
|
|
||||||
if frappe.in_test:
|
|
||||||
return
|
|
||||||
|
|
||||||
last_gl_update = None
|
|
||||||
try:
|
|
||||||
# We also lock inserts to GL entry table with for_update here.
|
|
||||||
last_gl_update = frappe.db.get_value("GL Entry", {}, "modified", for_update=True, wait=False)
|
|
||||||
except frappe.QueryTimeoutError:
|
|
||||||
# wait=False fails immediately if there's an active transaction.
|
|
||||||
last_gl_update = add_to_date(None, seconds=-1)
|
|
||||||
|
|
||||||
if not last_gl_update:
|
|
||||||
return
|
|
||||||
|
|
||||||
if last_gl_update > add_to_date(None, minutes=-5):
|
|
||||||
frappe.throw(
|
|
||||||
_(
|
|
||||||
"Last GL Entry update was done {}. This operation is not allowed while system is actively being used. Please wait for 5 minutes before retrying."
|
|
||||||
).format(pretty_date(last_gl_update)),
|
|
||||||
title=_("System In Use"),
|
|
||||||
)
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
frappe.provide("frappe.treeview_settings");
|
frappe.provide("frappe.treeview_settings")
|
||||||
|
|
||||||
frappe.treeview_settings["Account"] = {
|
frappe.treeview_settings["Account"] = {
|
||||||
breadcrumb: "Accounts",
|
breadcrumb: "Accounts",
|
||||||
@@ -7,13 +7,12 @@ frappe.treeview_settings["Account"] = {
|
|||||||
filters: [
|
filters: [
|
||||||
{
|
{
|
||||||
fieldname: "company",
|
fieldname: "company",
|
||||||
fieldtype: "Select",
|
fieldtype:"Select",
|
||||||
options: erpnext.utils.get_tree_options("company"),
|
options: erpnext.utils.get_tree_options("company"),
|
||||||
label: __("Company"),
|
label: __("Company"),
|
||||||
render_on_toolbar: true,
|
|
||||||
default: erpnext.utils.get_tree_default("company"),
|
default: erpnext.utils.get_tree_default("company"),
|
||||||
on_change: function () {
|
on_change: function() {
|
||||||
var me = frappe.treeview_settings["Account"].treeview;
|
var me = frappe.treeview_settings['Account'].treeview;
|
||||||
var company = me.page.fields_dict.company.get_value();
|
var company = me.page.fields_dict.company.get_value();
|
||||||
if (!company) {
|
if (!company) {
|
||||||
frappe.throw(__("Please set a Company"));
|
frappe.throw(__("Please set a Company"));
|
||||||
@@ -23,36 +22,30 @@ frappe.treeview_settings["Account"] = {
|
|||||||
args: {
|
args: {
|
||||||
company: company,
|
company: company,
|
||||||
},
|
},
|
||||||
callback: function (r) {
|
callback: function(r) {
|
||||||
if (r.message) {
|
if(r.message) {
|
||||||
let root_company = r.message.length ? r.message[0] : "";
|
let root_company = r.message.length ? r.message[0] : "";
|
||||||
me.page.fields_dict.root_company.set_value(root_company);
|
me.page.fields_dict.root_company.set_value(root_company);
|
||||||
|
|
||||||
frappe.db.get_value(
|
frappe.db.get_value("Company", {"name": company}, "allow_account_creation_against_child_company", (r) => {
|
||||||
"Company",
|
frappe.flags.ignore_root_company_validation = r.allow_account_creation_against_child_company;
|
||||||
{ name: company },
|
});
|
||||||
"allow_account_creation_against_child_company",
|
|
||||||
(r) => {
|
|
||||||
frappe.flags.ignore_root_company_validation =
|
|
||||||
r.allow_account_creation_against_child_company;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
});
|
});
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldname: "root_company",
|
fieldname: "root_company",
|
||||||
fieldtype: "Data",
|
fieldtype:"Data",
|
||||||
label: __("Root Company"),
|
label: __("Root Company"),
|
||||||
hidden: true,
|
hidden: true,
|
||||||
disable_onchange: true,
|
disable_onchange: true
|
||||||
},
|
}
|
||||||
],
|
],
|
||||||
root_label: "Accounts",
|
root_label: "Accounts",
|
||||||
get_tree_nodes: "erpnext.accounts.utils.get_children",
|
get_tree_nodes: 'erpnext.accounts.utils.get_children',
|
||||||
on_get_node: function (nodes, deep = false) {
|
on_get_node: function(nodes, deep=false) {
|
||||||
if (frappe.boot.user.can_read.indexOf("GL Entry") == -1) return;
|
if (frappe.boot.user.can_read.indexOf("GL Entry") == -1) return;
|
||||||
|
|
||||||
let accounts = [];
|
let accounts = [];
|
||||||
@@ -63,223 +56,147 @@ frappe.treeview_settings["Account"] = {
|
|||||||
accounts = nodes;
|
accounts = nodes;
|
||||||
}
|
}
|
||||||
|
|
||||||
frappe.db.get_single_value("Accounts Settings", "show_balance_in_coa").then((value) => {
|
const get_balances = frappe.call({
|
||||||
if (value) {
|
method: 'erpnext.accounts.utils.get_account_balances',
|
||||||
const get_balances = frappe.call({
|
args: {
|
||||||
method: "erpnext.accounts.utils.get_account_balances",
|
accounts: accounts,
|
||||||
args: {
|
company: cur_tree.args.company
|
||||||
accounts: accounts,
|
},
|
||||||
company: cur_tree.args.company,
|
});
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
get_balances.then((r) => {
|
get_balances.then(r => {
|
||||||
if (!r.message || r.message.length == 0) return;
|
if (!r.message || r.message.length == 0) return;
|
||||||
|
|
||||||
for (let account of r.message) {
|
for (let account of r.message) {
|
||||||
const node = cur_tree.nodes && cur_tree.nodes[account.value];
|
|
||||||
if (!node || node.is_root) continue;
|
|
||||||
|
|
||||||
// show Dr if positive since balance is calculated as debit - credit else show Cr
|
const node = cur_tree.nodes && cur_tree.nodes[account.value];
|
||||||
const balance = account.balance_in_account_currency || account.balance;
|
if (!node || node.is_root) continue;
|
||||||
const dr_or_cr = balance > 0 ? __("Dr") : __("Cr");
|
|
||||||
const format = (value, currency) => format_currency(Math.abs(value), currency);
|
|
||||||
|
|
||||||
if (account.balance !== undefined) {
|
// show Dr if positive since balance is calculated as debit - credit else show Cr
|
||||||
node.parent && node.parent.find(".balance-area").remove();
|
const balance = account.balance_in_account_currency || account.balance;
|
||||||
$(
|
const dr_or_cr = balance > 0 ? "Dr": "Cr";
|
||||||
'<span class="balance-area pull-right">' +
|
const format = (value, currency) => format_currency(Math.abs(value), currency);
|
||||||
(account.balance_in_account_currency
|
|
||||||
? format(
|
if (account.balance!==undefined) {
|
||||||
account.balance_in_account_currency,
|
node.parent && node.parent.find('.balance-area').remove();
|
||||||
account.account_currency
|
$('<span class="balance-area pull-right">'
|
||||||
) + " / "
|
+ (account.balance_in_account_currency ?
|
||||||
: "") +
|
(format(account.balance_in_account_currency, account.account_currency) + " / ") : "")
|
||||||
format(account.balance, account.company_currency) +
|
+ format(account.balance, account.company_currency)
|
||||||
" " +
|
+ " " + dr_or_cr
|
||||||
dr_or_cr +
|
+ '</span>').insertBefore(node.$ul);
|
||||||
"</span>"
|
}
|
||||||
).insertBefore(node.$ul);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
add_tree_node: "erpnext.accounts.utils.add_ac",
|
add_tree_node: 'erpnext.accounts.utils.add_ac',
|
||||||
menu_items: [
|
menu_items:[
|
||||||
{
|
{
|
||||||
label: __("New Company"),
|
label: __('New Company'),
|
||||||
action: function () {
|
action: function() { frappe.new_doc("Company", true) },
|
||||||
frappe.new_doc("Company", true);
|
condition: 'frappe.boot.user.can_create.indexOf("Company") !== -1'
|
||||||
},
|
}
|
||||||
condition: 'frappe.boot.user.can_create.indexOf("Company") !== -1',
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
fields: [
|
fields: [
|
||||||
{
|
{fieldtype:'Data', fieldname:'account_name', label:__('New Account Name'), reqd:true,
|
||||||
fieldtype: "Data",
|
description: __("Name of new Account. Note: Please don't create accounts for Customers and Suppliers")},
|
||||||
fieldname: "account_name",
|
{fieldtype:'Data', fieldname:'account_number', label:__('Account Number'),
|
||||||
label: __("New Account Name"),
|
description: __("Number of new Account, it will be included in the account name as a prefix")},
|
||||||
reqd: true,
|
{fieldtype:'Check', fieldname:'is_group', label:__('Is Group'),
|
||||||
description: __(
|
description: __('Further accounts can be made under Groups, but entries can be made against non-Groups')},
|
||||||
"Name of new Account. Note: Please don't create accounts for Customers and Suppliers"
|
{fieldtype:'Select', fieldname:'root_type', label:__('Root Type'),
|
||||||
),
|
options: ['Asset', 'Liability', 'Equity', 'Income', 'Expense'].join('\n'),
|
||||||
},
|
depends_on: 'eval:doc.is_group && !doc.parent_account'},
|
||||||
{
|
{fieldtype:'Select', fieldname:'account_type', label:__('Account Type'),
|
||||||
fieldtype: "Data",
|
options: frappe.get_meta("Account").fields.filter(d => d.fieldname=='account_type')[0].options,
|
||||||
fieldname: "account_number",
|
description: __("Optional. This setting will be used to filter in various transactions.")
|
||||||
label: __("Account Number"),
|
|
||||||
description: __("Number of new Account, it will be included in the account name as a prefix"),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
fieldtype: "Check",
|
|
||||||
fieldname: "is_group",
|
|
||||||
label: __("Is Group"),
|
|
||||||
description: __(
|
|
||||||
"Further accounts can be made under Groups, but entries can be made against non-Groups"
|
|
||||||
),
|
|
||||||
onchange: function () {
|
|
||||||
if (!this.value) {
|
|
||||||
this.layout.set_value("root_type", "");
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
fieldtype: "Select",
|
|
||||||
fieldname: "root_type",
|
|
||||||
label: __("Root Type"),
|
|
||||||
options: ["Asset", "Liability", "Equity", "Income", "Expense"].join("\n"),
|
|
||||||
depends_on: "eval:doc.is_group && !doc.parent_account",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
fieldtype: "Select",
|
|
||||||
fieldname: "account_type",
|
|
||||||
label: __("Account Type"),
|
|
||||||
options: frappe.get_meta("Account").fields.filter((d) => d.fieldname == "account_type")[0]
|
|
||||||
.options,
|
|
||||||
description: __("Optional. This setting will be used to filter in various transactions."),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
fieldtype: "Float",
|
|
||||||
fieldname: "tax_rate",
|
|
||||||
label: __("Tax Rate"),
|
|
||||||
depends_on: 'eval:doc.is_group==0&&doc.account_type=="Tax"',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
fieldtype: "Link",
|
|
||||||
fieldname: "account_currency",
|
|
||||||
label: __("Currency"),
|
|
||||||
options: "Currency",
|
|
||||||
description: __("Optional. Sets company's default currency, if not specified."),
|
|
||||||
},
|
},
|
||||||
|
{fieldtype:'Float', fieldname:'tax_rate', label:__('Tax Rate'),
|
||||||
|
depends_on: 'eval:doc.is_group==0&&doc.account_type=="Tax"'},
|
||||||
|
{fieldtype:'Link', fieldname:'account_currency', label:__('Currency'), options:"Currency",
|
||||||
|
description: __("Optional. Sets company's default currency, if not specified.")}
|
||||||
],
|
],
|
||||||
ignore_fields: ["parent_account"],
|
ignore_fields:["parent_account"],
|
||||||
onload: function (treeview) {
|
onload: function(treeview) {
|
||||||
frappe.treeview_settings["Account"].treeview = {};
|
frappe.treeview_settings['Account'].treeview = {};
|
||||||
$.extend(frappe.treeview_settings["Account"].treeview, treeview);
|
$.extend(frappe.treeview_settings['Account'].treeview, treeview);
|
||||||
function get_company() {
|
function get_company() {
|
||||||
return treeview.page.fields_dict.company.get_value();
|
return treeview.page.fields_dict.company.get_value();
|
||||||
}
|
}
|
||||||
|
|
||||||
// tools
|
// tools
|
||||||
treeview.page.add_inner_button(
|
treeview.page.add_inner_button(__("Chart of Cost Centers"), function() {
|
||||||
__("Chart of Cost Centers"),
|
frappe.set_route('Tree', 'Cost Center', {company: get_company()});
|
||||||
function () {
|
}, __('View'));
|
||||||
frappe.set_route("Tree", "Cost Center", { company: get_company() });
|
|
||||||
},
|
|
||||||
__("View"),
|
|
||||||
"default",
|
|
||||||
true
|
|
||||||
);
|
|
||||||
|
|
||||||
treeview.page.add_inner_button(
|
treeview.page.add_inner_button(__("Opening Invoice Creation Tool"), function() {
|
||||||
__("Opening Invoice Creation Tool"),
|
frappe.set_route('Form', 'Opening Invoice Creation Tool', {company: get_company()});
|
||||||
function () {
|
}, __('View'));
|
||||||
frappe.set_route("Form", "Opening Invoice Creation Tool", { company: get_company() });
|
|
||||||
},
|
|
||||||
__("View"),
|
|
||||||
"default",
|
|
||||||
true
|
|
||||||
);
|
|
||||||
|
|
||||||
treeview.page.add_divider_to_button_group(__("View"));
|
treeview.page.add_inner_button(__("Period Closing Voucher"), function() {
|
||||||
|
frappe.set_route('List', 'Period Closing Voucher', {company: get_company()});
|
||||||
|
}, __('View'));
|
||||||
|
|
||||||
|
|
||||||
|
treeview.page.add_inner_button(__("Journal Entry"), function() {
|
||||||
|
frappe.new_doc('Journal Entry', {company: get_company()});
|
||||||
|
}, __('Create'));
|
||||||
|
treeview.page.add_inner_button(__("Company"), function() {
|
||||||
|
frappe.new_doc('Company');
|
||||||
|
}, __('Create'));
|
||||||
|
|
||||||
// financial statements
|
// financial statements
|
||||||
for (let report of [
|
for (let report of ['Trial Balance', 'General Ledger', 'Balance Sheet',
|
||||||
"Trial Balance",
|
'Profit and Loss Statement', 'Cash Flow Statement', 'Accounts Payable', 'Accounts Receivable']) {
|
||||||
"General Ledger",
|
treeview.page.add_inner_button(__(report), function() {
|
||||||
"Balance Sheet",
|
frappe.set_route('query-report', report, {company: get_company()});
|
||||||
"Profit and Loss Statement",
|
}, __('Financial Statements'));
|
||||||
"Cash Flow",
|
|
||||||
"Accounts Payable",
|
|
||||||
"Accounts Receivable",
|
|
||||||
]) {
|
|
||||||
treeview.page.add_inner_button(
|
|
||||||
__(report),
|
|
||||||
function () {
|
|
||||||
frappe.set_route("query-report", report, { company: get_company() });
|
|
||||||
},
|
|
||||||
__("View")
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
post_render: function (treeview) {
|
post_render: function(treeview) {
|
||||||
frappe.treeview_settings["Account"].treeview["tree"] = treeview.tree;
|
frappe.treeview_settings['Account'].treeview["tree"] = treeview.tree;
|
||||||
if (treeview.can_create) {
|
treeview.page.set_primary_action(__("New"), function() {
|
||||||
treeview.page.set_primary_action(
|
let root_company = treeview.page.fields_dict.root_company.get_value();
|
||||||
__("New"),
|
|
||||||
function () {
|
if(root_company) {
|
||||||
let root_company = treeview.page.fields_dict.root_company.get_value();
|
frappe.throw(__("Please add the account to root level Company - {0}"), [root_company]);
|
||||||
if (root_company) {
|
} else {
|
||||||
frappe.throw(__("Please add the account to root level Company - {0}"), [
|
treeview.new_node();
|
||||||
root_company,
|
}
|
||||||
]);
|
}, "add");
|
||||||
} else {
|
|
||||||
treeview.new_node();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"add"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
toolbar: [
|
toolbar: [
|
||||||
{
|
{
|
||||||
label: __("Add Child"),
|
label:__("Add Child"),
|
||||||
condition: function (node) {
|
condition: function(node) {
|
||||||
return (
|
return frappe.boot.user.can_create.indexOf("Account") !== -1
|
||||||
frappe.boot.user.can_create.indexOf("Account") !== -1 &&
|
&& (!frappe.treeview_settings['Account'].treeview.page.fields_dict.root_company.get_value()
|
||||||
(!frappe.treeview_settings[
|
|| frappe.flags.ignore_root_company_validation)
|
||||||
"Account"
|
&& node.expandable && !node.hide_add;
|
||||||
].treeview.page.fields_dict.root_company.get_value() ||
|
|
||||||
frappe.flags.ignore_root_company_validation) &&
|
|
||||||
node.expandable &&
|
|
||||||
!node.hide_add
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
click: function () {
|
click: function() {
|
||||||
var me = frappe.views.trees["Account"];
|
var me = frappe.views.trees['Account'];
|
||||||
me.new_node();
|
me.new_node();
|
||||||
},
|
},
|
||||||
btnClass: "hidden-xs",
|
btnClass: "hidden-xs"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
condition: function (node) {
|
condition: function(node) {
|
||||||
return !node.root && frappe.boot.user.can_read.indexOf("GL Entry") !== -1;
|
return !node.root && frappe.boot.user.can_read.indexOf("GL Entry") !== -1
|
||||||
},
|
},
|
||||||
label: __("View Ledger"),
|
label: __("View Ledger"),
|
||||||
click: function (node, btn) {
|
click: function(node, btn) {
|
||||||
frappe.route_options = {
|
frappe.route_options = {
|
||||||
account: node.label,
|
"account": node.label,
|
||||||
from_date: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1],
|
"from_date": frappe.sys_defaults.year_start_date,
|
||||||
to_date: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2],
|
"to_date": frappe.sys_defaults.year_end_date,
|
||||||
company:
|
"company": frappe.treeview_settings['Account'].treeview.page.fields_dict.company.get_value()
|
||||||
frappe.treeview_settings["Account"].treeview.page.fields_dict.company.get_value(),
|
|
||||||
};
|
};
|
||||||
frappe.set_route("query-report", "General Ledger");
|
frappe.set_route("query-report", "General Ledger");
|
||||||
},
|
},
|
||||||
btnClass: "hidden-xs",
|
btnClass: "hidden-xs"
|
||||||
},
|
}
|
||||||
],
|
],
|
||||||
extend_toolbar: true,
|
extend_toolbar: true
|
||||||
};
|
}
|
||||||
|
|||||||
@@ -29,8 +29,8 @@ def create_charts(
|
|||||||
"root_type",
|
"root_type",
|
||||||
"is_group",
|
"is_group",
|
||||||
"tax_rate",
|
"tax_rate",
|
||||||
"account_currency",
|
|
||||||
]:
|
]:
|
||||||
|
|
||||||
account_number = cstr(child.get("account_number")).strip()
|
account_number = cstr(child.get("account_number")).strip()
|
||||||
account_name, account_name_in_db = add_suffix_if_duplicate(
|
account_name, account_name_in_db = add_suffix_if_duplicate(
|
||||||
account_name, account_number, accounts
|
account_name, account_number, accounts
|
||||||
@@ -38,9 +38,7 @@ def create_charts(
|
|||||||
|
|
||||||
is_group = identify_is_group(child)
|
is_group = identify_is_group(child)
|
||||||
report_type = (
|
report_type = (
|
||||||
"Balance Sheet"
|
"Balance Sheet" if root_type in ["Asset", "Liability", "Equity"] else "Profit and Loss"
|
||||||
if root_type in ["Asset", "Liability", "Equity"]
|
|
||||||
else "Profit and Loss"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
account = frappe.get_doc(
|
account = frappe.get_doc(
|
||||||
@@ -55,7 +53,7 @@ def create_charts(
|
|||||||
"account_number": account_number,
|
"account_number": account_number,
|
||||||
"account_type": child.get("account_type"),
|
"account_type": child.get("account_type"),
|
||||||
"account_currency": child.get("account_currency")
|
"account_currency": child.get("account_currency")
|
||||||
or frappe.get_cached_value("Company", company, "default_currency"),
|
or frappe.db.get_value("Company", company, "default_currency"),
|
||||||
"tax_rate": child.get("tax_rate"),
|
"tax_rate": child.get("tax_rate"),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@@ -75,7 +73,7 @@ def create_charts(
|
|||||||
# after all accounts are already inserted.
|
# after all accounts are already inserted.
|
||||||
frappe.local.flags.ignore_update_nsm = True
|
frappe.local.flags.ignore_update_nsm = True
|
||||||
_import_accounts(chart, None, None, root_account=True)
|
_import_accounts(chart, None, None, root_account=True)
|
||||||
rebuild_tree("Account")
|
rebuild_tree("Account", "parent_account")
|
||||||
frappe.local.flags.ignore_update_nsm = False
|
frappe.local.flags.ignore_update_nsm = False
|
||||||
|
|
||||||
|
|
||||||
@@ -97,17 +95,7 @@ def identify_is_group(child):
|
|||||||
is_group = child.get("is_group")
|
is_group = child.get("is_group")
|
||||||
elif len(
|
elif len(
|
||||||
set(child.keys())
|
set(child.keys())
|
||||||
- set(
|
- set(["account_name", "account_type", "root_type", "is_group", "tax_rate", "account_number"])
|
||||||
[
|
|
||||||
"account_name",
|
|
||||||
"account_type",
|
|
||||||
"root_type",
|
|
||||||
"is_group",
|
|
||||||
"tax_rate",
|
|
||||||
"account_number",
|
|
||||||
"account_currency",
|
|
||||||
]
|
|
||||||
)
|
|
||||||
):
|
):
|
||||||
is_group = 1
|
is_group = 1
|
||||||
else:
|
else:
|
||||||
@@ -116,7 +104,6 @@ def identify_is_group(child):
|
|||||||
return is_group
|
return is_group
|
||||||
|
|
||||||
|
|
||||||
@frappe.whitelist()
|
|
||||||
def get_chart(chart_template, existing_company=None):
|
def get_chart(chart_template, existing_company=None):
|
||||||
chart = {}
|
chart = {}
|
||||||
if existing_company:
|
if existing_company:
|
||||||
@@ -143,7 +130,7 @@ def get_chart(chart_template, existing_company=None):
|
|||||||
for fname in os.listdir(path):
|
for fname in os.listdir(path):
|
||||||
fname = frappe.as_unicode(fname)
|
fname = frappe.as_unicode(fname)
|
||||||
if fname.endswith(".json"):
|
if fname.endswith(".json"):
|
||||||
with open(os.path.join(path, fname)) as f:
|
with open(os.path.join(path, fname), "r") as f:
|
||||||
chart = f.read()
|
chart = f.read()
|
||||||
if chart and json.loads(chart).get("name") == chart_template:
|
if chart and json.loads(chart).get("name") == chart_template:
|
||||||
return json.loads(chart).get("tree")
|
return json.loads(chart).get("tree")
|
||||||
@@ -161,7 +148,7 @@ def get_charts_for_country(country, with_standard=False):
|
|||||||
) or frappe.local.flags.allow_unverified_charts:
|
) or frappe.local.flags.allow_unverified_charts:
|
||||||
charts.append(content["name"])
|
charts.append(content["name"])
|
||||||
|
|
||||||
country_code = frappe.get_cached_value("Country", country, "code")
|
country_code = frappe.db.get_value("Country", country, "code")
|
||||||
if country_code:
|
if country_code:
|
||||||
folders = ("verified",)
|
folders = ("verified",)
|
||||||
if frappe.local.flags.allow_unverified_charts:
|
if frappe.local.flags.allow_unverified_charts:
|
||||||
@@ -175,7 +162,7 @@ def get_charts_for_country(country, with_standard=False):
|
|||||||
for fname in os.listdir(path):
|
for fname in os.listdir(path):
|
||||||
fname = frappe.as_unicode(fname)
|
fname = frappe.as_unicode(fname)
|
||||||
if (fname.startswith(country_code) or fname.startswith(country)) and fname.endswith(".json"):
|
if (fname.startswith(country_code) or fname.startswith(country)) and fname.endswith(".json"):
|
||||||
with open(os.path.join(path, fname)) as f:
|
with open(os.path.join(path, fname), "r") as f:
|
||||||
_get_chart_name(f.read())
|
_get_chart_name(f.read())
|
||||||
|
|
||||||
# if more than one charts, returned then add the standard
|
# if more than one charts, returned then add the standard
|
||||||
@@ -198,7 +185,6 @@ def get_account_tree_from_existing_company(existing_company):
|
|||||||
"root_type",
|
"root_type",
|
||||||
"tax_rate",
|
"tax_rate",
|
||||||
"account_number",
|
"account_number",
|
||||||
"account_currency",
|
|
||||||
],
|
],
|
||||||
order_by="lft, rgt",
|
order_by="lft, rgt",
|
||||||
)
|
)
|
||||||
@@ -233,8 +219,6 @@ def build_account_tree(tree, parent, all_accounts):
|
|||||||
tree[child.account_name]["account_type"] = child.account_type
|
tree[child.account_name]["account_type"] = child.account_type
|
||||||
if child.tax_rate:
|
if child.tax_rate:
|
||||||
tree[child.account_name]["tax_rate"] = child.tax_rate
|
tree[child.account_name]["tax_rate"] = child.tax_rate
|
||||||
if child.account_currency:
|
|
||||||
tree[child.account_name]["account_currency"] = child.account_currency
|
|
||||||
if not parent:
|
if not parent:
|
||||||
tree[child.account_name]["root_type"] = child.root_type
|
tree[child.account_name]["root_type"] = child.root_type
|
||||||
|
|
||||||
@@ -251,13 +235,7 @@ def validate_bank_account(coa, bank_account):
|
|||||||
|
|
||||||
def _get_account_names(account_master):
|
def _get_account_names(account_master):
|
||||||
for account_name, child in account_master.items():
|
for account_name, child in account_master.items():
|
||||||
if account_name not in [
|
if account_name not in ["account_number", "account_type", "root_type", "is_group", "tax_rate"]:
|
||||||
"account_number",
|
|
||||||
"account_type",
|
|
||||||
"root_type",
|
|
||||||
"is_group",
|
|
||||||
"tax_rate",
|
|
||||||
]:
|
|
||||||
accounts.append(account_name)
|
accounts.append(account_name)
|
||||||
|
|
||||||
_get_account_names(child)
|
_get_account_names(child)
|
||||||
@@ -289,7 +267,6 @@ def build_tree_from_json(chart_template, chart_data=None, from_coa_importer=Fals
|
|||||||
"root_type",
|
"root_type",
|
||||||
"is_group",
|
"is_group",
|
||||||
"tax_rate",
|
"tax_rate",
|
||||||
"account_currency",
|
|
||||||
]:
|
]:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,289 @@
|
|||||||
|
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||||
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
|
"""
|
||||||
|
Import chart of accounts from OpenERP sources
|
||||||
|
"""
|
||||||
|
|
||||||
|
import ast
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
from xml.etree import ElementTree as ET
|
||||||
|
|
||||||
|
import frappe
|
||||||
|
from frappe.utils.csvutils import read_csv_content
|
||||||
|
|
||||||
|
path = "/Users/nabinhait/projects/odoo/addons"
|
||||||
|
|
||||||
|
accounts = {}
|
||||||
|
charts = {}
|
||||||
|
all_account_types = []
|
||||||
|
all_roots = {}
|
||||||
|
|
||||||
|
|
||||||
|
def go():
|
||||||
|
global accounts, charts
|
||||||
|
default_account_types = get_default_account_types()
|
||||||
|
|
||||||
|
country_dirs = []
|
||||||
|
for basepath, folders, files in os.walk(path):
|
||||||
|
basename = os.path.basename(basepath)
|
||||||
|
if basename.startswith("l10n_"):
|
||||||
|
country_dirs.append(basename)
|
||||||
|
|
||||||
|
for country_dir in country_dirs:
|
||||||
|
accounts, charts = {}, {}
|
||||||
|
country_path = os.path.join(path, country_dir)
|
||||||
|
manifest = ast.literal_eval(open(os.path.join(country_path, "__openerp__.py")).read())
|
||||||
|
data_files = (
|
||||||
|
manifest.get("data", []) + manifest.get("init_xml", []) + manifest.get("update_xml", [])
|
||||||
|
)
|
||||||
|
files_path = [os.path.join(country_path, d) for d in data_files]
|
||||||
|
xml_roots = get_xml_roots(files_path)
|
||||||
|
csv_content = get_csv_contents(files_path)
|
||||||
|
prefix = country_dir if csv_content else None
|
||||||
|
account_types = get_account_types(
|
||||||
|
xml_roots.get("account.account.type", []), csv_content.get("account.account.type", []), prefix
|
||||||
|
)
|
||||||
|
account_types.update(default_account_types)
|
||||||
|
|
||||||
|
if xml_roots:
|
||||||
|
make_maps_for_xml(xml_roots, account_types, country_dir)
|
||||||
|
|
||||||
|
if csv_content:
|
||||||
|
make_maps_for_csv(csv_content, account_types, country_dir)
|
||||||
|
make_account_trees()
|
||||||
|
make_charts()
|
||||||
|
|
||||||
|
create_all_roots_file()
|
||||||
|
|
||||||
|
|
||||||
|
def get_default_account_types():
|
||||||
|
default_types_root = []
|
||||||
|
default_types_root.append(
|
||||||
|
ET.parse(os.path.join(path, "account", "data", "data_account_type.xml")).getroot()
|
||||||
|
)
|
||||||
|
return get_account_types(default_types_root, None, prefix="account")
|
||||||
|
|
||||||
|
|
||||||
|
def get_xml_roots(files_path):
|
||||||
|
xml_roots = frappe._dict()
|
||||||
|
for filepath in files_path:
|
||||||
|
fname = os.path.basename(filepath)
|
||||||
|
if fname.endswith(".xml"):
|
||||||
|
tree = ET.parse(filepath)
|
||||||
|
root = tree.getroot()
|
||||||
|
for node in root[0].findall("record"):
|
||||||
|
if node.get("model") in [
|
||||||
|
"account.account.template",
|
||||||
|
"account.chart.template",
|
||||||
|
"account.account.type",
|
||||||
|
]:
|
||||||
|
xml_roots.setdefault(node.get("model"), []).append(root)
|
||||||
|
break
|
||||||
|
return xml_roots
|
||||||
|
|
||||||
|
|
||||||
|
def get_csv_contents(files_path):
|
||||||
|
csv_content = {}
|
||||||
|
for filepath in files_path:
|
||||||
|
fname = os.path.basename(filepath)
|
||||||
|
for file_type in ["account.account.template", "account.account.type", "account.chart.template"]:
|
||||||
|
if fname.startswith(file_type) and fname.endswith(".csv"):
|
||||||
|
with open(filepath, "r") as csvfile:
|
||||||
|
try:
|
||||||
|
csv_content.setdefault(file_type, []).append(read_csv_content(csvfile.read()))
|
||||||
|
except Exception as e:
|
||||||
|
continue
|
||||||
|
return csv_content
|
||||||
|
|
||||||
|
|
||||||
|
def get_account_types(root_list, csv_content, prefix=None):
|
||||||
|
types = {}
|
||||||
|
account_type_map = {
|
||||||
|
"cash": "Cash",
|
||||||
|
"bank": "Bank",
|
||||||
|
"tr_cash": "Cash",
|
||||||
|
"tr_bank": "Bank",
|
||||||
|
"receivable": "Receivable",
|
||||||
|
"tr_receivable": "Receivable",
|
||||||
|
"account rec": "Receivable",
|
||||||
|
"payable": "Payable",
|
||||||
|
"tr_payable": "Payable",
|
||||||
|
"equity": "Equity",
|
||||||
|
"stocks": "Stock",
|
||||||
|
"stock": "Stock",
|
||||||
|
"tax": "Tax",
|
||||||
|
"tr_tax": "Tax",
|
||||||
|
"tax-out": "Tax",
|
||||||
|
"tax-in": "Tax",
|
||||||
|
"charges_personnel": "Chargeable",
|
||||||
|
"fixed asset": "Fixed Asset",
|
||||||
|
"cogs": "Cost of Goods Sold",
|
||||||
|
}
|
||||||
|
for root in root_list:
|
||||||
|
for node in root[0].findall("record"):
|
||||||
|
if node.get("model") == "account.account.type":
|
||||||
|
data = {}
|
||||||
|
for field in node.findall("field"):
|
||||||
|
if (
|
||||||
|
field.get("name") == "code"
|
||||||
|
and field.text.lower() != "none"
|
||||||
|
and account_type_map.get(field.text)
|
||||||
|
):
|
||||||
|
data["account_type"] = account_type_map[field.text]
|
||||||
|
|
||||||
|
node_id = prefix + "." + node.get("id") if prefix else node.get("id")
|
||||||
|
types[node_id] = data
|
||||||
|
|
||||||
|
if csv_content and csv_content[0][0] == "id":
|
||||||
|
for row in csv_content[1:]:
|
||||||
|
row_dict = dict(zip(csv_content[0], row))
|
||||||
|
data = {}
|
||||||
|
if row_dict.get("code") and account_type_map.get(row_dict["code"]):
|
||||||
|
data["account_type"] = account_type_map[row_dict["code"]]
|
||||||
|
if data and data.get("id"):
|
||||||
|
node_id = prefix + "." + data.get("id") if prefix else data.get("id")
|
||||||
|
types[node_id] = data
|
||||||
|
return types
|
||||||
|
|
||||||
|
|
||||||
|
def make_maps_for_xml(xml_roots, account_types, country_dir):
|
||||||
|
"""make maps for `charts` and `accounts`"""
|
||||||
|
for model, root_list in xml_roots.items():
|
||||||
|
for root in root_list:
|
||||||
|
for node in root[0].findall("record"):
|
||||||
|
if node.get("model") == "account.account.template":
|
||||||
|
data = {}
|
||||||
|
for field in node.findall("field"):
|
||||||
|
if field.get("name") == "name":
|
||||||
|
data["name"] = field.text
|
||||||
|
if field.get("name") == "parent_id":
|
||||||
|
parent_id = field.get("ref") or field.get("eval")
|
||||||
|
data["parent_id"] = parent_id
|
||||||
|
|
||||||
|
if field.get("name") == "user_type":
|
||||||
|
value = field.get("ref")
|
||||||
|
if account_types.get(value, {}).get("account_type"):
|
||||||
|
data["account_type"] = account_types[value]["account_type"]
|
||||||
|
if data["account_type"] not in all_account_types:
|
||||||
|
all_account_types.append(data["account_type"])
|
||||||
|
|
||||||
|
data["children"] = []
|
||||||
|
accounts[node.get("id")] = data
|
||||||
|
|
||||||
|
if node.get("model") == "account.chart.template":
|
||||||
|
data = {}
|
||||||
|
for field in node.findall("field"):
|
||||||
|
if field.get("name") == "name":
|
||||||
|
data["name"] = field.text
|
||||||
|
if field.get("name") == "account_root_id":
|
||||||
|
data["account_root_id"] = field.get("ref")
|
||||||
|
data["id"] = country_dir
|
||||||
|
charts.setdefault(node.get("id"), {}).update(data)
|
||||||
|
|
||||||
|
|
||||||
|
def make_maps_for_csv(csv_content, account_types, country_dir):
|
||||||
|
for content in csv_content.get("account.account.template", []):
|
||||||
|
for row in content[1:]:
|
||||||
|
data = dict(zip(content[0], row))
|
||||||
|
account = {
|
||||||
|
"name": data.get("name"),
|
||||||
|
"parent_id": data.get("parent_id:id") or data.get("parent_id/id"),
|
||||||
|
"children": [],
|
||||||
|
}
|
||||||
|
user_type = data.get("user_type/id") or data.get("user_type:id")
|
||||||
|
if account_types.get(user_type, {}).get("account_type"):
|
||||||
|
account["account_type"] = account_types[user_type]["account_type"]
|
||||||
|
if account["account_type"] not in all_account_types:
|
||||||
|
all_account_types.append(account["account_type"])
|
||||||
|
|
||||||
|
accounts[data.get("id")] = account
|
||||||
|
if not account.get("parent_id") and data.get("chart_template_id:id"):
|
||||||
|
chart_id = data.get("chart_template_id:id")
|
||||||
|
charts.setdefault(chart_id, {}).update({"account_root_id": data.get("id")})
|
||||||
|
|
||||||
|
for content in csv_content.get("account.chart.template", []):
|
||||||
|
for row in content[1:]:
|
||||||
|
if row:
|
||||||
|
data = dict(zip(content[0], row))
|
||||||
|
charts.setdefault(data.get("id"), {}).update(
|
||||||
|
{
|
||||||
|
"account_root_id": data.get("account_root_id:id") or data.get("account_root_id/id"),
|
||||||
|
"name": data.get("name"),
|
||||||
|
"id": country_dir,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def make_account_trees():
|
||||||
|
"""build tree hierarchy"""
|
||||||
|
for id in accounts.keys():
|
||||||
|
account = accounts[id]
|
||||||
|
|
||||||
|
if account.get("parent_id"):
|
||||||
|
if accounts.get(account["parent_id"]):
|
||||||
|
# accounts[account["parent_id"]]["children"].append(account)
|
||||||
|
accounts[account["parent_id"]][account["name"]] = account
|
||||||
|
del account["parent_id"]
|
||||||
|
del account["name"]
|
||||||
|
|
||||||
|
# remove empty children
|
||||||
|
for id in accounts.keys():
|
||||||
|
if "children" in accounts[id] and not accounts[id].get("children"):
|
||||||
|
del accounts[id]["children"]
|
||||||
|
|
||||||
|
|
||||||
|
def make_charts():
|
||||||
|
"""write chart files in app/setup/doctype/company/charts"""
|
||||||
|
for chart_id in charts:
|
||||||
|
src = charts[chart_id]
|
||||||
|
if not src.get("name") or not src.get("account_root_id"):
|
||||||
|
continue
|
||||||
|
|
||||||
|
if not src["account_root_id"] in accounts:
|
||||||
|
continue
|
||||||
|
|
||||||
|
filename = src["id"][5:] + "_" + chart_id
|
||||||
|
|
||||||
|
print("building " + filename)
|
||||||
|
chart = {}
|
||||||
|
chart["name"] = src["name"]
|
||||||
|
chart["country_code"] = src["id"][5:]
|
||||||
|
chart["tree"] = accounts[src["account_root_id"]]
|
||||||
|
|
||||||
|
for key, val in chart["tree"].items():
|
||||||
|
if key in ["name", "parent_id"]:
|
||||||
|
chart["tree"].pop(key)
|
||||||
|
if type(val) == dict:
|
||||||
|
val["root_type"] = ""
|
||||||
|
if chart:
|
||||||
|
fpath = os.path.join(
|
||||||
|
"erpnext", "erpnext", "accounts", "doctype", "account", "chart_of_accounts", filename + ".json"
|
||||||
|
)
|
||||||
|
|
||||||
|
with open(fpath, "r") as chartfile:
|
||||||
|
old_content = chartfile.read()
|
||||||
|
if not old_content or (
|
||||||
|
json.loads(old_content).get("is_active", "No") == "No"
|
||||||
|
and json.loads(old_content).get("disabled", "No") == "No"
|
||||||
|
):
|
||||||
|
with open(fpath, "w") as chartfile:
|
||||||
|
chartfile.write(json.dumps(chart, indent=4, sort_keys=True))
|
||||||
|
|
||||||
|
all_roots.setdefault(filename, chart["tree"].keys())
|
||||||
|
|
||||||
|
|
||||||
|
def create_all_roots_file():
|
||||||
|
with open("all_roots.txt", "w") as f:
|
||||||
|
for filename, roots in sorted(all_roots.items()):
|
||||||
|
f.write(filename)
|
||||||
|
f.write("\n----------------------\n")
|
||||||
|
for r in sorted(roots):
|
||||||
|
f.write(r.encode("utf-8"))
|
||||||
|
f.write("\n")
|
||||||
|
f.write("\n\n\n")
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
go()
|
||||||
@@ -2,437 +2,397 @@
|
|||||||
"country_code": "at",
|
"country_code": "at",
|
||||||
"name": "Austria - Chart of Accounts",
|
"name": "Austria - Chart of Accounts",
|
||||||
"tree": {
|
"tree": {
|
||||||
"Klasse 0 Aktiva: Anlageverm\u00f6gen": {
|
"Summe Abschreibungen und Aufwendungen": {
|
||||||
"0100 Konzessionen ": {"account_type": "Fixed Asset"},
|
"7010 bis 7080 Abschreibungen auf das Anlageverm\u00f6gen (ausgenommen Finanzanlagen)": {},
|
||||||
"0110 Patentrechte und Lizenzen ": {"account_type": "Fixed Asset"},
|
"7100 bis 7190 Sonstige Steuern": {
|
||||||
"0120 Datenverarbeitungsprogramme ": {"account_type": "Fixed Asset"},
|
"account_type": "Tax"
|
||||||
"0130 Marken, Warenzeichen und Musterschutzrechte, sonstige Urheberrechte ": {"account_type": "Fixed Asset"},
|
},
|
||||||
"0140 Pacht- und Mietrechte ": {"account_type": "Fixed Asset"},
|
"7200 bis 7290 Instandhaltung u. Reinigung durh Dritte, Entsorgung, Beleuchtung": {},
|
||||||
"0150 Bezugs- und ähnliche Rechte ": {"account_type": "Fixed Asset"},
|
"7300 bis 7310 Transporte durch Dritte": {},
|
||||||
"0160 Geschäfts-/Firmenwert ": {"account_type": "Fixed Asset"},
|
"7320 bis 7330 Kfz - Aufwand": {},
|
||||||
"0170 Umgründungsmehrwert ": {"account_type": "Fixed Asset"},
|
"7340 bis 7350 Reise- und Fahraufwand": {},
|
||||||
"0180 Geleistete Anzahlungen auf immaterielle Vermögensgegenstände": {"account_type": "Fixed Asset"},
|
"7360 bis 7370 Tag- und N\u00e4chtigungsgelder": {},
|
||||||
"0190 Kumulierte Abschreibungen zu immateriellen Vermögensgegenständen ": {"account_type": "Fixed Asset"},
|
"7380 bis 7390 Nachrichtenaufwand": {},
|
||||||
"0200 Unbebaute Grundstücke, soweit nicht landwirtschaftlich genutzt ": {"account_type": "Fixed Asset"},
|
"7400 bis 7430 Miet- und Pachtaufwand": {},
|
||||||
"0210 Bebaute Grundstücke (Grundwert) ": {"account_type": "Fixed Asset"},
|
"7440 bis 7470 Leasingaufwand": {},
|
||||||
"0220 Landwirtschaftlich genutzte Grundstücke ": {"account_type": "Fixed Asset"},
|
"7480 bis 7490 Lizenzaufwand": {},
|
||||||
"0230 Grundstücksgleiche Rechte ": {"account_type": "Fixed Asset"},
|
"7500 bis 7530 Aufwand f\u00fcr beigestelltes Personal": {},
|
||||||
"0300 Betriebs- und Geschäftsgebäude auf eigenem Grund ": {"account_type": "Fixed Asset"},
|
"7540 bis 7570 Provisionen an Dritte": {},
|
||||||
"0310 Wohn- und Sozialgebäude auf eigenem Grund ": {"account_type": "Fixed Asset"},
|
"7580 bis 7590 Aufsichtsratsverg\u00fctungen": {},
|
||||||
"0320 Betriebs- und Geschäftsgebäude auf fremdem Grund ": {"account_type": "Fixed Asset"},
|
"7610 bis 7620 Druckerzeugnisse und Vervielf\u00e4ltigungen": {},
|
||||||
"0330 Wohn- und Sozialgebäude auf fremdem Grund ": {"account_type": "Fixed Asset"},
|
"7650 bis 7680 Werbung und Repr\u00e4sentationen": {},
|
||||||
"0340 Grundstückseinrichtungen auf eigenem Grund ": {"account_type": "Fixed Asset"},
|
"7700 bis 7740 Versicherungen": {},
|
||||||
"0350 Grundstückseinrichtungen auf fremdem Grund ": {"account_type": "Fixed Asset"},
|
"7750 bis 7760 Beratungs- und Pr\u00fcfungsaufwand": {},
|
||||||
"0360 Bauliche Investitionen in fremden (gepachteten) Betriebs- und Geschäftsgebäuden": {"account_type": "Fixed Asset"},
|
"7800 bis 7810 Schadensf\u00e4lle": {},
|
||||||
"0370 Bauliche Investitionen in fremden (gepachteten) Wohn- und Sozialgebäuden": {"account_type": "Fixed Asset"},
|
"7840 bis 7880 Verschiedene betriebliche Aufwendungen": {},
|
||||||
"0390 Kumulierte Abschreibungen zu Grundstücken ": {"account_type": "Fixed Asset"},
|
"7910 bis 7950 Aufwandsstellenrechung der Hersteller": {},
|
||||||
"0400 Maschinen und Geräte ": {"account_type": "Fixed Asset"},
|
"Abschreibungen auf aktivierte Aufwendungen f\u00fcr das Ingangs. u. Erweitern des Betriebes": {},
|
||||||
"0500 Maschinenwerkzeuge ": {"account_type": "Fixed Asset"},
|
"Abschreibungen vom Umlaufverm\u00f6gen, soweit diese die im Unternehmen \u00fcblichen Abschreibungen \u00fcbersteigen": {},
|
||||||
"0510 Allgemeine Werkzeuge und Handwerkzeuge ": {"account_type": "Fixed Asset"},
|
"Aufwandsstellenrechnung": {},
|
||||||
"0520 Prototypen, Formen, Modelle ": {"account_type": "Fixed Asset"},
|
"Aus- und Fortbildung": {},
|
||||||
"0530 Andere Erzeugungshilfsmittel (auch Softwarewerkzeuge)": {"account_type": "Fixed Asset"},
|
"Buchwert abgegangener Anlagen, ausgenommen Finanzanlagen": {},
|
||||||
"0540 Hebezeuge und Montageanlagen ": {"account_type": "Fixed Asset"},
|
"B\u00fcromaterial und Drucksorten": {},
|
||||||
"0550 Geringwertige Vermögensgegenstände, soweit im Erzeugungsprozess ": {"account_type": "Fixed Asset"},
|
"Fachliteratur und Zeitungen ": {},
|
||||||
"0560 Festwerte technische Anlagen und Maschinen ": {"account_type": "Fixed Asset"},
|
"Herstellungskosten der zur Erzielung der Umsatzerl\u00f6se erbrachten Leistungen": {},
|
||||||
"0590 Kumulierte Abschreibungen zu technischen Anlagen und Maschinen ": {"account_type": "Fixed Asset"},
|
"Mitgliedsbeitr\u00e4ge": {},
|
||||||
"0600 Betriebs- und Geschäftsausstattung, soweit nicht gesondert angeführt ": {"account_type": "Fixed Asset"},
|
"Skontoertr\u00e4ge auf sonstige betriebliche Aufwendungen": {},
|
||||||
"0610 Andere Anlagen, soweit nicht gesondert angeführt ": {"account_type": "Fixed Asset"},
|
"Sonstige betrieblichen Aufwendungen": {},
|
||||||
"0620 Büromaschinen, EDV-Anlagen ": {"account_type": "Fixed Asset"},
|
"Spenden und Trinkgelder": {},
|
||||||
"0630 PKW und Kombis ": {"account_type": "Fixed Asset"},
|
"Spesen des Geldverkehrs": {},
|
||||||
"0640 LKW ": {"account_type": "Fixed Asset"},
|
"Verluste aus dem Abgang vom Anlageverm\u00f6gen, ausgenommen Finanzanlagen": {},
|
||||||
"0650 Andere Beförderungsmittel ": {"account_type": "Fixed Asset"},
|
"Vertriebskosten": {},
|
||||||
"0660 Gebinde ": {"account_type": "Fixed Asset"},
|
"Verwaltungskosten": {},
|
||||||
"0670 Geringwertige Vermögensgegenstände, soweit nicht im Erzeugungssprozess verwendet": {"account_type": "Fixed Asset"},
|
"root_type": "Expense"
|
||||||
"0680 Festwerte außer technische Anlagen und Maschinen ": {"account_type": "Fixed Asset"},
|
|
||||||
"0690 Kumulierte Abschreibungen zu anderen Anlagen, Betriebs- und Geschäftsausstattung": {"account_type": "Fixed Asset"},
|
|
||||||
"0700 Geleistete Anzahlungen auf Sachanlagen ": {"account_type": "Fixed Asset"},
|
|
||||||
"0710 Anlagen in Bau ": {"account_type": "Fixed Asset"},
|
|
||||||
"0790 Kumulierte Abschreibungen zu geleisteten Anzahlungen auf Sachanlagen ": {"account_type": "Fixed Asset"},
|
|
||||||
"0800 Anteile an verbundenen Unternehmen ": {"account_type": "Fixed Asset"},
|
|
||||||
"0810 Beteiligungen an Gemeinschaftsunternehmen ": {"account_type": "Fixed Asset"},
|
|
||||||
"0820 Beteiligungen an angeschlossenen (assoziierten) Unternehmen ": {"account_type": "Fixed Asset"},
|
|
||||||
"0830 Eigene Anteile, Anteile an herrschenden oder mit Mehrheit beteiligten ": {"account_type": "Fixed Asset"},
|
|
||||||
"0840 Sonstige Beteiligungen ": {"account_type": "Fixed Asset"},
|
|
||||||
"0850 Ausleihungen an verbundene Unternehmen ": {"account_type": "Fixed Asset"},
|
|
||||||
"0860 Ausleihungen an Unternehmen mit Beteiligungsverhältnis": {"account_type": "Fixed Asset"},
|
|
||||||
"0870 Ausleihungen an Gesellschafter ": {"account_type": "Fixed Asset"},
|
|
||||||
"0880 Sonstige Ausleihungen ": {"account_type": "Fixed Asset"},
|
|
||||||
"0890 Anteile an Kapitalgesellschaften ohne Beteiligungscharakter ": {"account_type": "Fixed Asset"},
|
|
||||||
"0900 Anteile an Personengesellschaften ohne Beteiligungscharakter ": {"account_type": "Fixed Asset"},
|
|
||||||
"0910 Genossenschaftsanteile ohne Beteiligungscharakter ": {"account_type": "Fixed Asset"},
|
|
||||||
"0920 Anteile an Investmentfonds ": {"account_type": "Fixed Asset"},
|
|
||||||
"0930 Festverzinsliche Wertpapiere des Anlagevermögens ": {"account_type": "Fixed Asset"},
|
|
||||||
"0980 Geleistete Anzahlungen auf Finanzanlagen ": {"account_type": "Fixed Asset"},
|
|
||||||
"0990 Kumulierte Abschreibungen zu Finanzanlagen ": {"account_type": "Fixed Asset"},
|
|
||||||
"root_type": "Asset"
|
|
||||||
},
|
},
|
||||||
"Klasse 1 Aktiva: Vorr\u00e4te": {
|
"Summe Betriebliche Ertr\u00e4ge": {
|
||||||
"1000 Bezugsverrechnung": {"account_type": "Stock"},
|
"4400 bis 4490 Erl\u00f6sschm\u00e4lerungen": {},
|
||||||
"1100 Rohstoffe": {"account_type": "Stock"},
|
"4500 bis 4570 Ver\u00e4nderungen des Bestandes an fertigen und unfertigen Erzeugn. sowie an noch nicht abrechenbaren Leistungen": {},
|
||||||
"1200 Bezogene Teile": {"account_type": "Stock"},
|
"4580 bis 4590 andere aktivierte Eigenleistungen": {},
|
||||||
"1300 Hilfsstoffe": {"account_type": "Stock"},
|
"4600 bis 4620 Erl\u00f6se aus dem Abgang vom Anlageverm\u00f6gen, ausgen. Finanzanlagen": {},
|
||||||
"1350 Betriebsstoffe": {"account_type": "Stock"},
|
"4630 bis 4650 Ertr\u00e4ge aus dem Abgang vom Anlageverm\u00f6gen, ausgen. Finanzanlagen": {},
|
||||||
"1360 Vorrat Energietraeger": {"account_type": "Stock"},
|
"4660 bis 4670 Ertr\u00e4ge aus der Zuschreibung zum Anlageverm\u00f6gen, ausgen. Finanzanlagen": {},
|
||||||
"1400 Unfertige Erzeugnisse": {"account_type": "Stock"},
|
"4700 bis 4790 Ertr\u00e4ge aus der Aufl\u00f6sung von R\u00fcckstellungen": {},
|
||||||
"1500 Fertige Erzeugnisse": {"account_type": "Stock"},
|
"4800 bis 4990 \u00dcbrige betriebliche Ertr\u00e4ge": {},
|
||||||
"1600 Handelswarenvorrat": {"account_type": "Stock Received But Not Billed"},
|
"Erl\u00f6se 0 % Ausfuhrlieferungen/Drittl\u00e4nder": {},
|
||||||
"1700 Noch nicht abrechenbare Leistungen": {"account_type": "Stock"},
|
"Erl\u00f6se 10 %": {},
|
||||||
"1800 Geleistete Anzahlungen": {"account_type": "Stock"},
|
"Erl\u00f6se 20 %": {},
|
||||||
"1900 Wertberichtigungen": {"account_type": "Stock"},
|
"Erl\u00f6se aus im Inland stpfl. EG Lieferungen 10 % USt": {},
|
||||||
"root_type": "Asset"
|
"Erl\u00f6se aus im Inland stpfl. EG Lieferungen 20 % USt": {},
|
||||||
|
"Erl\u00f6se i.g. Lieferungen (stfr)": {},
|
||||||
|
"root_type": "Income"
|
||||||
},
|
},
|
||||||
"Klasse 3 Passiva: Verbindlichkeiten": {
|
"Summe Eigenkapital R\u00fccklagen Abschlusskonten": {
|
||||||
"3000 Allgemeine Verbindlichkeiten (Schuld)": {"account_type": "Payable"},
|
"9000 bis 9180 Gezeichnetes bzw. gewidmetes Kapital": {
|
||||||
"3010 R\u00fcckstellungen f\u00fcr Pensionen": {"account_type": "Payable"},
|
"account_type": "Equity"
|
||||||
"3020 Steuerr\u00fcckstellungen": {"account_type": "Tax"},
|
},
|
||||||
"3041 Sonstige R\u00fcckstellungen": {"account_type": "Payable"},
|
"9200 bis 9290 Kapitalr\u00fccklagen": {
|
||||||
"3110 Verbindlichkeiten gegen\u00fcber Bank": {"account_type": "Payable"},
|
"account_type": "Equity"
|
||||||
"3150 Verbindlichkeiten Darlehen": {"account_type": "Payable"},
|
},
|
||||||
"3185 Verbindlichkeiten Kreditkarte": {"account_type": "Payable"},
|
"9300 bis 9380 Gewinnr\u00fccklagen": {
|
||||||
"3380 Verbindlichkeiten aus der Annahme gezogener Wechsel u. d. Ausstellungen eigener Wechsel": {
|
"account_type": "Equity"
|
||||||
|
},
|
||||||
|
"9400 bis 9590 Bewertungsreserven uns sonst. unversteuerte R\u00fccklagen": {
|
||||||
|
"account_type": "Equity"
|
||||||
|
},
|
||||||
|
"9600 bis 9690 Privat und Verrechnungskonten bei Einzelunternehmen und Personengesellschaften": {},
|
||||||
|
"9700 bis 9790 Einlagen stiller Gesellschafter ": {},
|
||||||
|
"9900 bis 9999 Evidenzkonten": {},
|
||||||
|
"Bilanzgewinn (-verlust )": {
|
||||||
|
"account_type": "Equity"
|
||||||
|
},
|
||||||
|
"Er\u00f6ffnungsbilanz": {},
|
||||||
|
"Gewinn- und Verlustrechnung": {},
|
||||||
|
"Schlussbilanz": {},
|
||||||
|
"nicht eingeforderte ausstehende Einlagen": {
|
||||||
|
"account_type": "Equity"
|
||||||
|
},
|
||||||
|
"root_type": "Equity"
|
||||||
|
},
|
||||||
|
"Summe Finanzertr\u00e4ge und Aufwendungen": {
|
||||||
|
"8000 bis 8040 Ertr\u00e4ge aus Beteiligungen": {},
|
||||||
|
"8050 bis 8090 Ertr\u00e4ge aus anderen Wertpapieren und Ausleihungen des Finanzanlageverm\u00f6gens": {},
|
||||||
|
"8100 bis 8130 Sonstige Zinsen und \u00e4hnliche Ertr\u00e4ge": {},
|
||||||
|
"8220 bis 8250 Aufwendungen aus Beteiligungen": {},
|
||||||
|
"8260 bis 8270 Aufwendungen aus sonst. Fiananzanlagen und aus Wertpapieren des Umlaufverm\u00f6gens": {},
|
||||||
|
"8280 bis 8340 Zinsen und \u00e4hnliche Aufwendungem": {},
|
||||||
|
"8400 bis 8440 Au\u00dferordentliche Ertr\u00e4ge": {},
|
||||||
|
"8450 bis 8490 Au\u00dferordentliche Aufwendungen": {},
|
||||||
|
"8500 bis 8590 Steuern vom Einkommen und vom Ertrag": {
|
||||||
|
"account_type": "Tax"
|
||||||
|
},
|
||||||
|
"8600 bis 8690 Aufl\u00f6sung unversteuerten R\u00fccklagen": {},
|
||||||
|
"8700 bis 8740 Aufl\u00f6sung von Kapitalr\u00fccklagen": {},
|
||||||
|
"8750 bis 8790 Aufl\u00f6sung von Gewinnr\u00fccklagen": {},
|
||||||
|
"8800 bis 8890 Zuweisung von unversteuerten R\u00fccklagen": {},
|
||||||
|
"Buchwert abgegangener Beteiligungen": {},
|
||||||
|
"Buchwert abgegangener Wertpapiere des Umlaufverm\u00f6gens": {},
|
||||||
|
"Buchwert abgegangener sonstiger Finanzanlagen": {},
|
||||||
|
"Erl\u00f6se aus dem Abgang von Beteiligungen": {},
|
||||||
|
"Erl\u00f6se aus dem Abgang von Wertpapieren des Umlaufverm\u00f6gens": {},
|
||||||
|
"Erl\u00f6se aus dem Abgang von sonstigen Finanzanlagen": {},
|
||||||
|
"Ertr\u00e4ge aus dem Abgang von und der Zuschreibung zu Finanzanlagen": {},
|
||||||
|
"Ertr\u00e4ge aus dem Abgang von und der Zuschreibung zu Wertpapieren des Umlaufverm\u00f6gens": {},
|
||||||
|
"Gewinabfuhr bzw. Verlust\u00fcberrechnung aus Ergebnisabf\u00fchrungsvertr\u00e4gen": {},
|
||||||
|
"nicht ausgenutzte Lieferantenskonti": {},
|
||||||
|
"root_type": "Income"
|
||||||
|
},
|
||||||
|
"Summe Fremdkapital": {
|
||||||
|
"3020 bis 3030 Steuerr\u00fcckstellungen": {},
|
||||||
|
"3040 bis 3090 Sonstige R\u00fcckstellungen": {},
|
||||||
|
"3110 bis 3170 Verbindlichkeiten gegen\u00fcber Kredidinstituten": {},
|
||||||
|
"3180 bis 3190 Verbindlichkeiten gegen\u00fcber Finanzinstituten": {},
|
||||||
|
"3380 bis 3390 Verbindlichkeiten aus der Annahme gezogener Wechsel u. d. Ausstellungen eigener Wechsel": {
|
||||||
"account_type": "Payable"
|
"account_type": "Payable"
|
||||||
},
|
},
|
||||||
"3400 Verbindlichkeiten gegen\u00fc. verb. Untern., Verbindl. gegen\u00fc. Untern., mit denen eine Beteiligungsverh\u00e4lnis besteht": {},
|
"3400 bis 3470 Verbindlichkeiten gegen\u00fc. verb. Untern., Verbindl. gegen\u00fc. Untern., mit denen eine Beteiligungsverh\u00e4lnis besteht": {},
|
||||||
"3460 Verbindlichkeiten gegenueber Gesellschaftern": {"account_type": "Payable"},
|
"3600 bis 3690 Verbindlichkeiten im Rahmen der sozialen Sicherheit": {},
|
||||||
"3470 Einlagen stiller Gesellschafter": {"account_type": "Payable"},
|
"3700 bis 3890 \u00dcbrige sonstige Verbindlichkeiten": {},
|
||||||
"3585 Verbindlichkeiten Lohnsteuer": {"account_type": "Tax"},
|
"3900 bis 3990 Passive Rechnungsabgrenzungsposten": {},
|
||||||
"3590 Verbindlichkeiten Kommunalabgaben": {"account_type": "Tax"},
|
"Anleihen (einschlie\u00dflich konvertibler)": {},
|
||||||
"3595 Verbindlichkeiten Dienstgeberbeitrag": {"account_type": "Tax"},
|
"Erhaltene Anzahlungenauf Bestellungen": {},
|
||||||
"3600 Verbindlichkeiten Sozialversicherung": {"account_type": "Payable"},
|
"R\u00fcckstellungen f\u00fcr Abfertigung": {},
|
||||||
"3640 Verbindlichkeiten Loehne und Gehaelter": {"account_type": "Payable"},
|
"R\u00fcckstellungen f\u00fcr Pensionen": {},
|
||||||
"3700 Sonstige Verbindlichkeiten": {"account_type": "Payable"},
|
"USt. \u00a719 /art (reverse charge)": {
|
||||||
"3900 Passive Rechnungsabgrenzungsposten": {"account_type": "Payable"},
|
|
||||||
"3100 Anleihen (einschlie\u00dflich konvertibler)": {"account_type": "Payable"},
|
|
||||||
"3200 Erhaltene Anzahlungen auf Bestellungen": {"account_type": "Payable"},
|
|
||||||
"3040 R\u00fcckstellungen f\u00fcr Abfertigung": {"account_type": "Payable"},
|
|
||||||
|
|
||||||
"3530 USt. \u00a719 (reverse charge)": {
|
|
||||||
"account_type": "Tax"
|
"account_type": "Tax"
|
||||||
},
|
},
|
||||||
"3500 Verbindlichkeiten aus Umsatzsteuer": {"account_type": "Tax"},
|
"Umsatzsteuer": {},
|
||||||
"3580 Umsatzsteuer Zahllast": {
|
"Umsatzsteuer Zahllast": {
|
||||||
"account_type": "Tax"
|
"account_type": "Tax"
|
||||||
},
|
},
|
||||||
"3510 Umsatzsteuer Inland 20%": {
|
"Umsatzsteuer aus i.g. Erwerb 10%": {
|
||||||
"account_type": "Tax"
|
"account_type": "Tax"
|
||||||
},
|
},
|
||||||
"3515 Umsatzsteuer Inland 10%": {
|
"Umsatzsteuer aus i.g. Erwerb 20%": {
|
||||||
"account_type": "Tax"
|
"account_type": "Tax"
|
||||||
},
|
},
|
||||||
"3520 Umsatzsteuer aus i.g. Erwerb 20%": {
|
"Umsatzsteuer aus i.g. Lieferungen 10%": {
|
||||||
"account_type": "Tax"
|
"account_type": "Tax"
|
||||||
},
|
},
|
||||||
"3525 Umsatzsteuer aus i.g. Erwerb 10%": {
|
"Umsatzsteuer aus i.g. Lieferungen 20%": {
|
||||||
"account_type": "Tax"
|
"account_type": "Tax"
|
||||||
},
|
},
|
||||||
"3560 Umsatzsteuer-Evidenzkonto f\u00fcr erhaltene Anzahlungen auf Bestellungen": {},
|
"Umsatzsteuer-Evidenzkonto f\u00fcr erhaltene Anzahlungen auf Bestellungen": {},
|
||||||
"3360 Verbindlichkeiten aus Lieferungen u. Leistungen EU": {
|
"Verbindlichkeiten aus Lieferungen u. Leistungen EU": {
|
||||||
"account_type": "Payable"
|
"account_type": "Payable"
|
||||||
},
|
},
|
||||||
"3000 Verbindlichkeiten aus Lieferungen u. Leistungen Inland": {
|
"Verbindlichkeiten aus Lieferungen u. Leistungen Inland": {
|
||||||
"account_type": "Payable"
|
"account_type": "Payable"
|
||||||
},
|
},
|
||||||
"3370 Verbindlichkeiten aus Lieferungen u. Leistungen sonst. Ausland": {
|
"Verbindlichkeiten aus Lieferungen u. Leistungen sonst. Ausland": {
|
||||||
"account_type": "Payable"
|
"account_type": "Payable"
|
||||||
},
|
},
|
||||||
"3400 Verbindlichkeiten gegen\u00fcber verbundenen Unternehmen": {},
|
"Verbindlichkeiten gegen\u00fcber Gesellschaften": {},
|
||||||
"3570 Verrechnung Finanzamt": {
|
"Verrechnung Finanzamt": {
|
||||||
"account_type": "Tax"
|
"account_type": "Tax"
|
||||||
},
|
},
|
||||||
"root_type": "Liability"
|
"root_type": "Liability"
|
||||||
},
|
},
|
||||||
"Klasse 2 Aktiva: Umlaufverm\u00f6gen, Rechnungsabgrenzungen": {
|
"Summe Kontoklasse 0 Anlageverm\u00f6gen": {
|
||||||
"2030 Forderungen aus Lieferungen und Leistungen Inland (0% USt, umsatzsteuerfrei)": {
|
"44 bis 49 Sonstige Maschinen und maschinelle Anlagen": {},
|
||||||
|
"920 bis 930 Festverzinsliche Wertpapiere des Anlageverm\u00f6gens": {},
|
||||||
|
"940 bis 970 Sonstige Finanzanlagen, Wertrechte": {},
|
||||||
|
"Allgemeine Werkzeuge und Handwerkzeuge": {},
|
||||||
|
"Andere Bef\u00f6rderungsmittel": {},
|
||||||
|
"Andere Betriebs- und Gesch\u00e4ftsausstattung": {},
|
||||||
|
"Andere Erzeugungshilfsmittel": {},
|
||||||
|
"Anlagen im Bau": {},
|
||||||
|
"Anteile an Investmentfonds": {},
|
||||||
|
"Anteile an Kapitalgesellschaften ohne Beteiligungscharakter": {},
|
||||||
|
"Anteile an Personengesellschaften ohne Beteiligungscharakter": {},
|
||||||
|
"Anteile an verbundenen Unternehmen": {},
|
||||||
|
"Antriebsmaschinen": {},
|
||||||
|
"Aufwendungen f\u00fcs das Ingangssetzen u. Erweitern eines Betriebes": {},
|
||||||
|
"Ausleihungen an verbundene Unternehmen": {},
|
||||||
|
"Ausleihungen an verbundene Unternehmen, mit denen ein Beteiligungsverh\u00e4lnis besteht": {},
|
||||||
|
"Bauliche Investitionen in fremden (gepachteten) Betriebs- und Gesch\u00e4ftsgeb\u00e4uden": {},
|
||||||
|
"Bauliche Investitionen in fremden (gepachteten) Wohn- und Sozialgeb\u00e4uden": {},
|
||||||
|
"Bebaute Grundst\u00fccke (Grundwert)": {},
|
||||||
|
"Beheizungs- und Beleuchtungsanlagen": {},
|
||||||
|
"Beteiligungen an Gemeinschaftunternehmen": {},
|
||||||
|
"Beteiligungen an angeschlossenen (assoziierten) Unternehmen": {},
|
||||||
|
"Betriebs- und Gesch\u00e4ftsgeb\u00e4ude auf eigenem Grund": {},
|
||||||
|
"Betriebs- und Gesch\u00e4ftsgeb\u00e4ude auf fremdem Grund": {},
|
||||||
|
"B\u00fcromaschinen, EDV - Anlagen": {},
|
||||||
|
"Datenverarbeitungsprogramme": {},
|
||||||
|
"Energieversorgungsanlagen": {},
|
||||||
|
"Fertigungsmaschinen": {},
|
||||||
|
"Gebinde": {},
|
||||||
|
"Geleistete Anzahlungen": {},
|
||||||
|
"Genossenschaften ohne Beteiligungscharakter": {},
|
||||||
|
"Geringwertige Verm\u00f6gensgegenst\u00e4nde, soweit im Erzeugerprozess verwendet": {},
|
||||||
|
"Geringwertige Verm\u00f6gensgegenst\u00e4nde, soweit nicht im Erzeugungsprozess verwendet": {},
|
||||||
|
"Gesch\u00e4fts(Firmen)wert": {},
|
||||||
|
"Grundst\u00fcckseinrichtunten auf eigenem Grund": {},
|
||||||
|
"Grundst\u00fcckseinrichtunten auf fremdem Grund": {},
|
||||||
|
"Grundst\u00fccksgleiche Rechte": {},
|
||||||
|
"Hebezeuge und Montageanlagen": {},
|
||||||
|
"Konzessionen": {},
|
||||||
|
"Kumulierte Abschreibungen": {},
|
||||||
|
"LKW": {},
|
||||||
|
"Marken, Warenzeichen und Musterschutzrechte": {},
|
||||||
|
"Maschinenwerkzeuge": {},
|
||||||
|
"Nachrichten- und Kontrollanlagen": {},
|
||||||
|
"PKW": {},
|
||||||
|
"Pacht- und Mietrechte": {},
|
||||||
|
"Patentrechte und Lizenzen": {},
|
||||||
|
"Sonstige Ausleihungen": {},
|
||||||
|
"Sonstige Beteiligungen": {},
|
||||||
|
"Transportanlagen": {},
|
||||||
|
"Unbebaute Grundst\u00fccke": {},
|
||||||
|
"Vorrichtungen, Formen und Modelle": {},
|
||||||
|
"Wohn- und Sozialgeb\u00e4ude auf eigenem Grund": {},
|
||||||
|
"Wohn- und Sozialgeb\u00e4ude auf fremdem Grund": {},
|
||||||
|
"root_type": "Asset"
|
||||||
|
},
|
||||||
|
"Summe Personalaufwand": {
|
||||||
|
"6000 bis 6190 L\u00f6hne": {},
|
||||||
|
"6200 bis 6390 Geh\u00e4lter": {},
|
||||||
|
"6400 bis 6440 Aufwendungen f\u00fcr Abfertigungen": {},
|
||||||
|
"6450 bis 6490 Aufwendungen f\u00fcr Altersversorgung": {},
|
||||||
|
"6500 bis 6550 Gesetzlicher Sozialaufwand Arbeiter": {},
|
||||||
|
"6560 bis 6590 Gesetzlicher Sozialaufwand Angestellte": {},
|
||||||
|
"6600 bis 6650 Lohnabh\u00e4ngige Abgaben und Pflichtbeitr\u00e4gte": {},
|
||||||
|
"6660 bis 6690 Gehaltsabh\u00e4ngige Abgaben und Pflichtbeitr\u00e4gte": {},
|
||||||
|
"6700 bis 6890 Sonstige Sozialaufwendungen": {},
|
||||||
|
"Aufwandsstellenrechnung": {},
|
||||||
|
"root_type": "Expense"
|
||||||
|
},
|
||||||
|
"Summe Umlaufverm\u00f6gen": {
|
||||||
|
"2000 bis 2007 Forderungen aus Lief. und Leist. Inland": {
|
||||||
"account_type": "Receivable"
|
"account_type": "Receivable"
|
||||||
},
|
},
|
||||||
"2010 Forderungen aus Lieferungen und Leistungen Inland (10% USt, umsatzsteuerfrei)": {
|
"2100 bis 2120 Forderungen aus Lief. und Leist. EU": {
|
||||||
"account_type": "Receivable"
|
"account_type": "Receivable"
|
||||||
},
|
},
|
||||||
"2000 Forderungen aus Lieferungen und Leistungen Inland (20% USt, umsatzsteuerfrei)": {
|
"2150 bis 2170 Forderungen aus Lief. und Leist. Ausland": {
|
||||||
"account_type": "Receivable"
|
"account_type": "Receivable"
|
||||||
},
|
},
|
||||||
"2040 Forderungen aus Lieferungen und Leistungen Inland (sonstiger USt-Satz)": {
|
"2200 bis 2220 Forderungen gegen\u00fcber verbundenen Unternehmen": {
|
||||||
"account_type": "Receivable"
|
"account_type": "Receivable"
|
||||||
},
|
},
|
||||||
"2100 Forderungen aus Lieferungen und Leistungen EU": {
|
"2250 bis 2270 Forderungen gegen\u00fcber Unternehmen, mit denen ein Beteiligungsverh\u00e4ltnis besteht": {
|
||||||
"account_type": "Receivable"
|
"account_type": "Receivable"
|
||||||
},
|
},
|
||||||
"2150 Forderungen aus Lieferungen und Leistungen Ausland (Nicht-EU)": {
|
"2300 bis 2460 Sonstige Forderungen und Verm\u00f6gensgegenst\u00e4nde": {
|
||||||
"account_type": "Receivable"
|
"account_type": "Receivable"
|
||||||
},
|
},
|
||||||
"2200 Forderungen gegen\u00fcber verbundenen Unternehmen": {
|
"2630 bis 2670 Sonstige Wertpapiere": {
|
||||||
"account_type": "Receivable"
|
"account_type": "Receivable"
|
||||||
},
|
},
|
||||||
"2250 Forderungen gegen\u00fcber Unternehmen, mit denen ein Beteiligungsverh\u00e4ltnis besteht": {
|
"2750 bis 2770 Kassenbest\u00e4nde in Fremdw\u00e4hrung": {
|
||||||
"account_type": "Receivable"
|
"account_type": "Receivable"
|
||||||
},
|
},
|
||||||
"2300 Sonstige Forderungen und Verm\u00f6gensgegenst\u00e4nde": {
|
"Aktive Rechnungsabrenzungsposten": {
|
||||||
"account_type": "Receivable"
|
"account_type": "Receivable"
|
||||||
},
|
},
|
||||||
"2630 Sonstige Wertpapiere": {
|
"Anteile an verbundenen Unternehmen": {
|
||||||
"account_type": "Stock"
|
|
||||||
},
|
|
||||||
"2750 Kassenbest\u00e4nde in Fremdw\u00e4hrung": {
|
|
||||||
"account_type": "Cash"
|
|
||||||
},
|
|
||||||
"2900 Aktive Rechnungsabrenzungsposten": {
|
|
||||||
"account_type": "Receivable"
|
"account_type": "Receivable"
|
||||||
},
|
},
|
||||||
"2600 Anteile an verbundenen Unternehmen": {
|
"Bank / Guthaben bei Kreditinstituten": {
|
||||||
"account_type": "Equity"
|
|
||||||
},
|
|
||||||
"2680 Besitzwechsel ohne Forderungen": {
|
|
||||||
"account_type": "Receivable"
|
"account_type": "Receivable"
|
||||||
},
|
},
|
||||||
"2950 Aktiviertes Disagio": {
|
"Besitzwechsel ...": {
|
||||||
"account_type": "Receivable"
|
"account_type": "Receivable"
|
||||||
},
|
},
|
||||||
"2610 Eigene Anteile und Wertpapiere an mit Mehrheit beteiligten Unternehmen": {
|
"Disagio": {
|
||||||
"account_type": "Receivable"
|
"account_type": "Receivable"
|
||||||
},
|
},
|
||||||
"2570 Einfuhrumsatzsteuer (bezahlt)": {"account_type": "Tax"},
|
"Eigene Anteile (Wertpapiere)": {
|
||||||
|
|
||||||
"2460 Eingeforderte aber noch nicht eingezahlte Einlagen": {
|
|
||||||
"account_type": "Receivable"
|
"account_type": "Receivable"
|
||||||
},
|
},
|
||||||
"2180 Einzelwertberichtigungen zu Forderungen aus Lief. und Leist. Ausland": {
|
"Einfuhrumsatzsteuer (bezahlt)": {},
|
||||||
|
"Eingeforderte aber noch nicht eingezahlte Einlagen": {
|
||||||
"account_type": "Receivable"
|
"account_type": "Receivable"
|
||||||
},
|
},
|
||||||
"2130 Einzelwertberichtigungen zu Forderungen aus Lief. und Leist. EU": {
|
"Einzelwertberichtigungen zu Forderungen aus Lief. und Leist. Ausland": {
|
||||||
"account_type": "Receivable"
|
"account_type": "Receivable"
|
||||||
},
|
},
|
||||||
"2080 Einzelwertberichtigungen zu Forderungen aus Lief. und Leist. Inland ": {
|
"Einzelwertberichtigungen zu Forderungen aus Lief. und Leist. EU": {
|
||||||
"account_type": "Receivable"
|
"account_type": "Receivable"
|
||||||
},
|
},
|
||||||
"2270 Einzelwertberichtigungen zu Forderungen gegen\u00fcber Unternehmen mit denen ein Beteiligungsverh\u00e4ltnis besteht": {
|
"Einzelwertberichtigungen zu Forderungen aus Lief. und Leist. Inland ": {
|
||||||
"account_type": "Receivable"
|
"account_type": "Receivable"
|
||||||
},
|
},
|
||||||
"2230 Einzelwertberichtigungen zu Forderungen gegen\u00fcber verbundenen Unternehmen": {
|
"Einzelwertberichtigungen zu Forderungen gegen\u00fcber Unternehmen mit denen ein Beteiligungsverh\u00e4ltnis besteht": {
|
||||||
"account_type": "Receivable"
|
"account_type": "Receivable"
|
||||||
},
|
},
|
||||||
"2470 Einzelwertberichtigungen zu sonstigen Forderungen und Verm\u00f6gensgegenst\u00e4nden": {
|
"Einzelwertberichtigungen zu Forderungen gegen\u00fcber verbundenen Unternehmen": {
|
||||||
"account_type": "Receivable"
|
"account_type": "Receivable"
|
||||||
},
|
},
|
||||||
"2700 Kassenbestand": {
|
"Einzelwertberichtigungen zu sonstigen Forderungen und Verm\u00f6gensgegenst\u00e4nden": {
|
||||||
"account_type": "Cash"
|
|
||||||
},
|
|
||||||
"2190 Pauschalwertberichtigungen zu Forderungen aus Lief. und Leist. sonstiges Ausland": {
|
|
||||||
"account_type": "Receivable"
|
"account_type": "Receivable"
|
||||||
},
|
},
|
||||||
"2130 Pauschalwertberichtigungen zu Forderungen aus Lief. und Leist. EU": {
|
"Kassenbestand": {
|
||||||
"account_type": "Receivable"
|
"account_type": "Receivable"
|
||||||
},
|
},
|
||||||
"2100 Pauschalwertberichtigungen zu Forderungen aus Lief. und Leist. Inland ": {
|
"Pauschalwertberichtigungen zu Forderungen aus Lief. und Leist. Ausland": {
|
||||||
"account_type": "Receivable"
|
"account_type": "Receivable"
|
||||||
},
|
},
|
||||||
"2280 Pauschalwertberichtigungen zu Forderungen gegen\u00fcber Unternehmen mit denen ein Beteiligungsverh\u00e4ltnis besteht": {
|
"Pauschalwertberichtigungen zu Forderungen aus Lief. und Leist. EU": {
|
||||||
"account_type": "Receivable"
|
"account_type": "Receivable"
|
||||||
},
|
},
|
||||||
"2240 Pauschalwertberichtigungen zu Forderungen gegen\u00fcber verbundenen Unternehmen": {
|
"Pauschalwertberichtigungen zu Forderungen aus Lief. und Leist. Inland ": {
|
||||||
"account_type": "Receivable"
|
"account_type": "Receivable"
|
||||||
},
|
},
|
||||||
"2480 Pauschalwertberichtigungen zu sonstigen Forderungen und Verm\u00f6gensgegenst\u00e4nden": {
|
"Pauschalwertberichtigungen zu Forderungen gegen\u00fcber Unternehmen mit denen ein Beteiligungsverh\u00e4ltnis besteht": {
|
||||||
"account_type": "Receivable"
|
"account_type": "Receivable"
|
||||||
},
|
},
|
||||||
"2740 Postwertzeichen": {
|
"Pauschalwertberichtigungen zu Forderungen gegen\u00fcber verbundenen Unternehmen": {
|
||||||
"account_type": "Cash"
|
|
||||||
},
|
|
||||||
"2780 Schecks in Euro": {
|
|
||||||
"account_type": "Cash"
|
|
||||||
},
|
|
||||||
"2800 Guthaben bei Bank": {
|
|
||||||
"account_type": "Bank"
|
|
||||||
},
|
|
||||||
"2801 Guthaben bei Bank - Sparkonto": {
|
|
||||||
"account_type": "Bank"
|
|
||||||
},
|
|
||||||
"2810 Guthaben bei Paypal": {
|
|
||||||
"account_type": "Bank"
|
|
||||||
},
|
|
||||||
"2930 Mietvorauszahlungen": {
|
|
||||||
"account_type": "Receivable"
|
"account_type": "Receivable"
|
||||||
},
|
},
|
||||||
"2980 Abgrenzung latenter Steuern": {
|
"Pauschalwertberichtigungen zu sonstigen Forderungen und Verm\u00f6gensgegenst\u00e4nden": {
|
||||||
"account_type": "Receivable"
|
"account_type": "Receivable"
|
||||||
},
|
},
|
||||||
"2500 Vorsteuer": {
|
"Postwertzeichen": {
|
||||||
"account_type": "Receivable"
|
"account_type": "Receivable"
|
||||||
},
|
},
|
||||||
"2510 Vorsteuer Inland 10%": {
|
"Schecks in Inlandsw\u00e4hrung": {
|
||||||
|
"account_type": "Receivable"
|
||||||
|
},
|
||||||
|
"Sonstige Anteile": {
|
||||||
|
"account_type": "Receivable"
|
||||||
|
},
|
||||||
|
"Stempelmarken": {
|
||||||
|
"account_type": "Receivable"
|
||||||
|
},
|
||||||
|
"Steuerabgrenzung": {
|
||||||
|
"account_type": "Receivable"
|
||||||
|
},
|
||||||
|
"Unterschiedsbetrag gem. Abschnitt XII Pensionskassengesetz": {
|
||||||
|
"account_type": "Receivable"
|
||||||
|
},
|
||||||
|
"Unterschiedsbetrag zur gebotenen Pensionsr\u00fcckstellung": {
|
||||||
|
"account_type": "Receivable"
|
||||||
|
},
|
||||||
|
"Vorsteuer": {
|
||||||
|
"account_type": "Receivable"
|
||||||
|
},
|
||||||
|
"Vorsteuer aus ig. Erwerb 10%": {
|
||||||
"account_type": "Tax"
|
"account_type": "Tax"
|
||||||
},
|
},
|
||||||
"2895 Schwebende Geldbewegugen": {
|
"Vorsteuer aus ig. Erwerb 20%": {
|
||||||
"account_type": "Bank"
|
|
||||||
},
|
|
||||||
"2513 Vorsteuer Inland 5%": {
|
|
||||||
"account_type": "Tax"
|
"account_type": "Tax"
|
||||||
},
|
},
|
||||||
"2515 Vorsteuer Inland 20%": {
|
"Vorsteuer \u00a719/Art 19 ( reverse charge ) ": {
|
||||||
"account_type": "Tax"
|
"account_type": "Tax"
|
||||||
},
|
},
|
||||||
"2520 Vorsteuer aus innergemeinschaftlichem Erwerb 10%": {
|
"Wertberichtigungen": {
|
||||||
"account_type": "Tax"
|
|
||||||
},
|
|
||||||
"2525 Vorsteuer aus innergemeinschaftlichem Erwerb 20%": {
|
|
||||||
"account_type": "Tax"
|
|
||||||
},
|
|
||||||
"2530 Vorsteuer \u00a719/Art 19 ( reverse charge ) ": {
|
|
||||||
"account_type": "Tax"
|
|
||||||
},
|
|
||||||
"2690 Wertberichtigungen zu Wertpapieren und Anteilen": {
|
|
||||||
"account_type": "Receivable"
|
"account_type": "Receivable"
|
||||||
},
|
},
|
||||||
"root_type": "Asset"
|
"root_type": "Asset"
|
||||||
},
|
},
|
||||||
"Klasse 4: Betriebliche Erträge": {
|
"Summe Vorr\u00e4te": {
|
||||||
"4000 Erlöse 20 %": {"account_type": "Income Account"},
|
"1000 bis 1090 Bezugsverrechnung": {},
|
||||||
"4020 Erl\u00f6se 0 % steuerbefreit": {"account_type": "Income Account"},
|
"1100 bis 1190 Rohstoffe": {},
|
||||||
"4010 Erl\u00f6se 10 %": {"account_type": "Income Account"},
|
"1200 bis 1290 Bezogene Teile": {},
|
||||||
"4030 Erl\u00f6se 13 %": {"account_type": "Income Account"},
|
"1300 bis 1340 Hilfsstoffe": {},
|
||||||
"4040 Erl\u00f6se 0 % innergemeinschaftliche Lieferungen": {"account_type": "Income Account"},
|
"1350 bis 1390 Betriebsstoffe": {},
|
||||||
"4400 Erl\u00f6sreduktion 0 % steuerbefreit": {"account_type": "Expense Account"},
|
"1400 bis 1490 Unfertige Erzeugniss": {},
|
||||||
"4410 Erl\u00f6sreduktion 10 %": {"account_type": "Expense Account"},
|
"1500 bis 1590 Fertige Erzeugniss": {},
|
||||||
"4420 Erl\u00f6sreduktion 20 %": {"account_type": "Expense Account"},
|
"1600 bis 1690 Waren": {},
|
||||||
"4430 Erl\u00f6sreduktion 13 %": {"account_type": "Expense Account"},
|
"1700 bis 1790 Noch nicht abgerechenbare Leistungen": {},
|
||||||
"4440 Erl\u00f6sreduktion 0 % innergemeinschaftliche Lieferungen": {"account_type": "Expense Account"},
|
"1900 bis 1990 Wertberichtigungen": {},
|
||||||
"4500 Ver\u00e4nderungen des Bestandes an fertigen und unfertigen Erzeugn. sowie an noch nicht abrechenbaren Leistungen": {"account_type": "Income Account"},
|
"geleistete Anzahlungen": {},
|
||||||
"4580 Aktivierte Eigenleistungen": {"account_type": "Income Account"},
|
"root_type": "Asset"
|
||||||
"4600 Erl\u00f6se aus dem Abgang vom Anlageverm\u00f6gen, ausgen. Finanzanlagen": {"account_type": "Income Account"},
|
|
||||||
"4630 Ertr\u00e4ge aus dem Abgang vom Anlageverm\u00f6gen, ausgen. Finanzanlagen": {"account_type": "Income Account"},
|
|
||||||
"4660 Ertr\u00e4ge aus der Zuschreibung zum Anlageverm\u00f6gen, ausgen. Finanzanlagen": {"account_type": "Income Account"},
|
|
||||||
"4700 Ertr\u00e4ge aus der Aufl\u00f6sung von R\u00fcckstellungen": {"account_type": "Income Account"},
|
|
||||||
"4800 \u00dcbrige betriebliche Ertr\u00e4ge": {"account_type": "Income Account"},
|
|
||||||
"root_type": "Income"
|
|
||||||
},
|
},
|
||||||
"Klasse 5: Aufwand f\u00fcr Material und Leistungen": {
|
"Summe Wareneinsatz": {
|
||||||
"5000 Einkauf Partnerleistungen": {"account_type": "Cost of Goods Sold"},
|
"5100 bis 5190 Verbrauch an Rohstoffen": {},
|
||||||
"5100 Verbrauch an Rohstoffen": {"account_type": "Cost of Goods Sold"},
|
"5200 bis 5290 Verbrauch von bezogenen Fertig- und Einzelteilen": {},
|
||||||
"5200 Verbrauch von bezogenen Fertig- und Einzelteilen": {"account_type": "Cost of Goods Sold"},
|
"5300 bis 5390 Verbrauch von Hilfsstoffen": {},
|
||||||
"5300 Verbrauch von Hilfsstoffen": {"account_type": "Cost of Goods Sold"},
|
"5400 bis 5490 Verbrauch von Betriebsstoffen": {},
|
||||||
"5340 Verbrauch Verpackungsmaterial": {"account_type": "Cost of Goods Sold"},
|
"5500 bis 5590 Verbrauch von Werkzeugen und anderen Erzeugungshilfsmittel": {},
|
||||||
"5470 Verbrauch von Kleinmaterial": {"account_type": "Cost of Goods Sold"},
|
"5600 bis 5690 Verbrauch von Brenn- und Treibstoffen, Energie und Wasser": {},
|
||||||
"5450 Verbrauch von Reinigungsmaterial": {"account_type": "Cost of Goods Sold"},
|
"5700 bis 5790 Sonstige bezogene Herstellungsleistungen": {},
|
||||||
"5400 Verbrauch von Betriebsstoffen": {"account_type": "Cost of Goods Sold"},
|
"Aufwandsstellenrechnung": {},
|
||||||
"5500 Verbrauch von Werkzeugen und anderen Erzeugungshilfsmittel": {"account_type": "Cost of Goods Sold"},
|
"Skontoertr\u00e4ge auf Materialaufwand": {},
|
||||||
"5600 Verbrauch von Brenn- und Treibstoffen, Energie und Wasser": {"account_type": "Cost of Goods Sold"},
|
"Skontoertr\u00e4ge auf sonstige bezogene Herstellungsleistungen": {},
|
||||||
"5700 Bearbeitung durch Dritte": {"account_type": "Cost of Goods Sold"},
|
"Wareneinkauf 10 %": {},
|
||||||
"5900 Aufwandsstellenrechnung Material": {"account_type": "Cost of Goods Sold"},
|
"Wareneinkauf 20 %": {},
|
||||||
"5820 Skontoertr\u00e4ge (20% USt.)": {"account_type": "Income Account"},
|
"Wareneinkauf igErwerb 10 % VSt/10 % USt": {},
|
||||||
"5810 Skontoertr\u00e4ge (10% USt.)": {"account_type": "Income Account"},
|
"Wareneinkauf igErwerb 20 % VSt/20 % USt": {},
|
||||||
"5010 Handelswareneinkauf 10 %": {"account_type": "Cost of Goods Sold"},
|
"Wareneinkauf igErwerb ohne Vorsteuerabzug und 10 % USt": {},
|
||||||
"5020 Handelswareneinkauf 20 %": {"account_type": "Cost of Goods Sold"},
|
"Wareneinkauf igErwerb ohne Vorsteuerabzug und 20 % USt": {},
|
||||||
"5040 Handelswareneinkauf innergemeinschaftlicher Erwerb 10 % VSt/10 % USt": {"account_type": "Cost of Goods Sold"},
|
|
||||||
"5050 Handelswareneinkauf innergemeinschaftlicher Erwerb 20 % VSt/20 % USt": {"account_type": "Cost of Goods Sold"},
|
|
||||||
"5070 Handelswareneinkauf innergemeinschaftlicher Erwerb ohne Vorsteuerabzug und 10 % USt": {"account_type": "Cost of Goods Sold"},
|
|
||||||
"5080 Handelswareneinkauf innergemeinschaftlicher Erwerb ohne Vorsteuerabzug und 20 % USt": {"account_type": "Cost of Goods Sold"},
|
|
||||||
"root_type": "Expense"
|
"root_type": "Expense"
|
||||||
},
|
|
||||||
"Klasse 6: Personalaufwand": {
|
|
||||||
"6000 L\u00f6hne": {"account_type": "Payable"},
|
|
||||||
"6200 Geh\u00e4lter": {"account_type": "Payable"},
|
|
||||||
"6400 Aufwendungen f\u00fcr Abfertigungen": {"account_type": "Payable"},
|
|
||||||
"6450 Aufwendungen f\u00fcr Altersversorgung": {"account_type": "Payable"},
|
|
||||||
"6500 Gesetzlicher Sozialaufwand Arbeiter": {"account_type": "Payable"},
|
|
||||||
"6560 Gesetzlicher Sozialaufwand Angestellte": {"account_type": "Payable"},
|
|
||||||
"6600 Lohnabh\u00e4ngige Abgaben und Pflichtbeitr\u00e4gte": {"account_type": "Payable"},
|
|
||||||
"6660 Gehaltsabh\u00e4ngige Abgaben und Pflichtbeitr\u00e4gte": {"account_type": "Payable"},
|
|
||||||
"6700 Sonstige Sozialaufwendungen": {"account_type": "Payable"},
|
|
||||||
"6900 Aufwandsstellenrechnung Personal": {"account_type": "Payable"},
|
|
||||||
"root_type": "Expense"
|
|
||||||
},
|
|
||||||
"Klasse 7: Abschreibungen und sonstige betriebliche Aufwendungen": {
|
|
||||||
"7010 Abschreibungen auf das Anlageverm\u00f6gen (ausgenommen Finanzanlagen)": {"account_type": "Depreciation"},
|
|
||||||
"7100 Sonstige Steuern und Geb\u00fchren": {"account_type": "Tax"},
|
|
||||||
"7200 Instandhaltung u. Reinigung durch Dritte, Entsorgung, Energie": {"account_type": "Expense Account"},
|
|
||||||
"7300 Transporte durch Dritte": {"account_type": "Expense Account"},
|
|
||||||
"7310 Fahrrad - Aufwand": {"account_type": "Expense Account"},
|
|
||||||
"7320 Kfz - Aufwand": {"account_type": "Expense Account"},
|
|
||||||
"7330 LKW - Aufwand": {"account_type": "Expense Account"},
|
|
||||||
"7340 Lastenrad - Aufwand": {"account_type": "Expense Account"},
|
|
||||||
"7350 Reise- und Fahraufwand": {"account_type": "Expense Account"},
|
|
||||||
"7360 Tag- und N\u00e4chtigungsgelder": {"account_type": "Expense Account"},
|
|
||||||
"7380 Nachrichtenaufwand": {"account_type": "Expense Account"},
|
|
||||||
"7400 Miet- und Pachtaufwand": {"account_type": "Expense Account"},
|
|
||||||
"7440 Leasingaufwand": {"account_type": "Expense Account"},
|
|
||||||
"7480 Lizenzaufwand": {"account_type": "Expense Account"},
|
|
||||||
"7500 Aufwand f\u00fcr beigestelltes Personal": {"account_type": "Expense Account"},
|
|
||||||
"7540 Provisionen an Dritte": {"account_type": "Expense Account"},
|
|
||||||
"7580 Aufsichtsratsverg\u00fctungen": {"account_type": "Expense Account"},
|
|
||||||
"7610 Druckerzeugnisse und Vervielf\u00e4ltigungen": {"account_type": "Expense Account"},
|
|
||||||
"7650 Werbung und Repr\u00e4sentationen": {"account_type": "Expense Account"},
|
|
||||||
"7700 Versicherungen": {"account_type": "Expense Account"},
|
|
||||||
"7750 Beratungs- und Pr\u00fcfungsaufwand": {"account_type": "Expense Account"},
|
|
||||||
"7800 Forderungsverluste und Schadensf\u00e4lle": {"account_type": "Expense Account"},
|
|
||||||
"7840 Verschiedene betriebliche Aufwendungen": {"account_type": "Expense Account"},
|
|
||||||
"7910 Aufwandsstellenrechung der Hersteller": {"account_type": "Expense Account"},
|
|
||||||
"7060 Sofortabschreibungen geringwertig": {"account_type": "Expense Account"},
|
|
||||||
"7070 Abschreibungen vom Umlaufverm\u00f6gen, soweit diese die im Unternehmen \u00fcblichen Abschreibungen \u00fcbersteigen": {"account_type": "Depreciation"},
|
|
||||||
"7900 Aufwandsstellenrechnung": {"account_type": "Expense Account"},
|
|
||||||
"7770 Aus- und Fortbildung": {"account_type": "Expense Account"},
|
|
||||||
"7820 Buchwert abgegangener Anlagen, ausgenommen Finanzanlagen": {"account_type": "Expense Account"},
|
|
||||||
"7600 B\u00fcromaterial und Drucksorten": {"account_type": "Expense Account"},
|
|
||||||
"7630 Fachliteratur und Zeitungen ": {"account_type": "Expense Account"},
|
|
||||||
"7960 Herstellungskosten der zur Erzielung der Umsatzerl\u00f6se erbrachten Leistungen": {"account_type": "Expense Account"},
|
|
||||||
"7780 Mitgliedsbeitr\u00e4ge": {"account_type": "Expense Account"},
|
|
||||||
"7880 Skontoertr\u00e4ge auf sonstige betriebliche Aufwendungen": {"account_type": "Expense Account"},
|
|
||||||
"7990 Sonstige betrieblichen Aufwendungen": {"account_type": "Expense Account"},
|
|
||||||
"7680 Spenden und Trinkgelder": {"account_type": "Expense Account"},
|
|
||||||
"7790 Spesen des Geldverkehrs": {"account_type": "Expense Account"},
|
|
||||||
"7830 Verluste aus dem Abgang vom Anlageverm\u00f6gen, ausgenommen Finanzanlagen": {"account_type": "Expense Account"},
|
|
||||||
"7970 Vertriebskosten": {"account_type": "Expense Account"},
|
|
||||||
"7980 Verwaltungskosten": {"account_type": "Expense Account"},
|
|
||||||
"root_type": "Expense"
|
|
||||||
},
|
|
||||||
"Klasse 8: Finanz- und ausserordentliche Ertr\u00e4ge und Aufwendungen": {
|
|
||||||
"8000 Ertr\u00e4ge aus Beteiligungen": {"account_type": "Income Account"},
|
|
||||||
"8050 Ertr\u00e4ge aus anderen Wertpapieren und Ausleihungen des Finanzanlageverm\u00f6gens": {"account_type": "Income Account"},
|
|
||||||
"8100 Zinsen aus Bankguthaben": {"account_type": "Income Account"},
|
|
||||||
"8110 Zinsen aus gewaehrten Darlehen": {"account_type": "Income Account"},
|
|
||||||
"8130 Verzugszinsenertraege": {"account_type": "Income Account"},
|
|
||||||
"8220 Aufwendungen aus Beteiligungen": {"account_type": "Expense Account"},
|
|
||||||
"8260 Aufwendungen aus sonst. Fiananzanlagen und aus Wertpapieren des Umlaufverm\u00f6gens": {},
|
|
||||||
"8280 Zinsen und \u00e4hnliche Aufwendungem": {"account_type": "Expense Account"},
|
|
||||||
"8400 Au\u00dferordentliche Ertr\u00e4ge": {"account_type": "Income Account"},
|
|
||||||
"8450 Au\u00dferordentliche Aufwendungen": {"account_type": "Expense Account"},
|
|
||||||
"8500 Steuern vom Einkommen und vom Ertrag": {
|
|
||||||
"account_type": "Tax"
|
|
||||||
},
|
|
||||||
"8600 Aufl\u00f6sung unversteuerten R\u00fccklagen": {"account_type": "Income Account"},
|
|
||||||
"8700 Aufl\u00f6sung von Kapitalr\u00fccklagen": {"account_type": "Income Account"},
|
|
||||||
"8750 Aufl\u00f6sung von Gewinnr\u00fccklagen": {"account_type": "Income Account"},
|
|
||||||
"8800 Zuweisung zu unversteuerten R\u00fccklagen": {"account_type": "Expense Account"},
|
|
||||||
"8900 Zuweisung zu Gewinnr\u00fccklagen": {"account_type": "Expense Account"},
|
|
||||||
"8100 Buchwert abgegangener Beteiligungen": {"account_type": "Expense Account"},
|
|
||||||
"8130 Buchwert abgegangener Wertpapiere des Umlaufverm\u00f6gens": {"account_type": "Expense Account"},
|
|
||||||
"8120 Buchwert abgegangener sonstiger Finanzanlagen": {"account_type": "Expense Account"},
|
|
||||||
"8990 Gewinnabfuhr bzw. Verlust\u00fcberrechnung aus Ergebnisabf\u00fchrungsvertr\u00e4gen": {"account_type": "Expense Account"},
|
|
||||||
"8350 nicht ausgenutzte Lieferantenskonti": {"account_type": "Expense Account"},
|
|
||||||
"root_type": "Income"
|
|
||||||
},
|
|
||||||
"Klasse 9 Passiva: Eigenkapital, R\u00fccklagen, stille Einlagen, Abschlusskonten": {
|
|
||||||
"9000 Gezeichnetes bzw. gewidmetes Kapital": {
|
|
||||||
"account_type": "Equity"
|
|
||||||
},
|
|
||||||
"9200 Kapitalr\u00fccklagen": {
|
|
||||||
"account_type": "Equity"
|
|
||||||
},
|
|
||||||
"9300 Gewinnr\u00fccklagen": {
|
|
||||||
"account_type": "Equity"
|
|
||||||
},
|
|
||||||
"9400 Bewertungsreserven uns sonst. unversteuerte R\u00fccklagen": {
|
|
||||||
"account_type": "Equity"
|
|
||||||
},
|
|
||||||
"9600 Private Entnahmen": {"account_type": "Equity"},
|
|
||||||
"9610 Privatsteuern": {"account_type": "Equity"},
|
|
||||||
"9700 Einlagen stiller Gesellschafter ": {"account_type": "Equity"},
|
|
||||||
"9900 Evidenzkonto": {"account_type": "Equity"},
|
|
||||||
"9800 Er\u00f6ffnungsbilanzkonto (EBK)": {"account_type": "Equity"},
|
|
||||||
"9880 Jahresergebnis laut Gewinn- und Verlustrechnung (G+V)": {"account_type": "Equity"},
|
|
||||||
"9850 Schlussbilanzkonto (SBK)": {"account_type": "Round Off"},
|
|
||||||
"9190 nicht eingeforderte ausstehende Einlagen und berechtigte Entnahmen von Gesellschaftern": {
|
|
||||||
"account_type": "Equity"
|
|
||||||
},
|
|
||||||
"root_type": "Equity"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,531 @@
|
|||||||
|
{
|
||||||
|
"country_code": "tr",
|
||||||
|
"name": "Turkey - Tek D\u00fczen Hesap Plan\u0131",
|
||||||
|
"tree": {
|
||||||
|
"Duran Varl\u0131klar": {
|
||||||
|
"Di\u011fer Alacaklar": {
|
||||||
|
"Ba\u011fl\u0131 Ortakl\u0131klardan Alacaklar": {},
|
||||||
|
"Di\u011fer Alacak Senetleri Reeskontu(-)": {},
|
||||||
|
"Di\u011fer \u00c7e\u015fitli Alacaklar": {},
|
||||||
|
"Ortaklardan Alacaklar": {},
|
||||||
|
"Personelden Alacaklar": {},
|
||||||
|
"\u0130\u015ftiraklerden Alacaklar": {},
|
||||||
|
"\u015e\u00fcpheli Di\u011fer Alacaklar Kar\u015f\u0131l\u0131\u011f\u0131(-)": {}
|
||||||
|
},
|
||||||
|
"Di\u011fer Duran Varl\u0131klar": {
|
||||||
|
"Birikmi\u015f Amortismanlar(-)": {},
|
||||||
|
"Di\u011fer KDV": {},
|
||||||
|
"Di\u011fer \u00c7e\u015fitli Duran Varl\u0131klar": {},
|
||||||
|
"Elden \u00c7\u0131kar\u0131lacak Stoklar Ve Maddi Duran Varl\u0131klar": {},
|
||||||
|
"Gelecek Y\u0131llar \u0130htiyac\u0131 Stoklar": {},
|
||||||
|
"Gelecek Y\u0131llarda \u0130ndirilecek KDV": {},
|
||||||
|
"Pe\u015fin \u00d6denen Vergi Ve Fonlar": {},
|
||||||
|
"Stok De\u011fer D\u00fc\u015f\u00fckl\u00fc\u011f\u00fc Kar\u015f\u0131l\u0131\u011f\u0131(-)": {}
|
||||||
|
},
|
||||||
|
"Gelecek Y\u0131llara Ait Giderler ve Gelir Tahakkuklar\u0131": {
|
||||||
|
"Gelecek Y\u0131llara Ait Giderler": {},
|
||||||
|
"Gelir Tahakkuklar\u0131": {}
|
||||||
|
},
|
||||||
|
"Maddi Duran Varl\u0131klar": {
|
||||||
|
"Arazi Ve Arsalar": {},
|
||||||
|
"Binalar": {},
|
||||||
|
"Birikmi\u015f Amortismanlar(-)": {},
|
||||||
|
"Demirba\u015flar": {},
|
||||||
|
"Di\u011fer Maddi Duran Varl\u0131klar": {},
|
||||||
|
"Ta\u015f\u0131tlar": {},
|
||||||
|
"Tesis, Makine Ve Cihazlar": {},
|
||||||
|
"Verilen Avanslar": {},
|
||||||
|
"Yap\u0131lmakta Olan Yat\u0131r\u0131mlar": {},
|
||||||
|
"Yer Alt\u0131 Ve Yer \u00dcst\u00fc D\u00fczenleri": {}
|
||||||
|
},
|
||||||
|
"Maddi Olmayan Duran Varl\u0131klar": {
|
||||||
|
"Ara\u015ft\u0131rma Ve Geli\u015ftirme Giderleri": {},
|
||||||
|
"Birikmi\u015f Amortismanlar(-)": {},
|
||||||
|
"Di\u011fer Maddi Olmayan Duran Varl\u0131klar": {},
|
||||||
|
"Haklar": {},
|
||||||
|
"Kurulu\u015f Ve \u00d6rg\u00fctlenme Giderleri": {},
|
||||||
|
"Verilen Avanslar": {},
|
||||||
|
"\u00d6zel Maliyetler": {},
|
||||||
|
"\u015eerefiye": {}
|
||||||
|
},
|
||||||
|
"Mali Duran Varl\u0131klar": {
|
||||||
|
"Ba\u011fl\u0131 Menkul K\u0131ymetler": {},
|
||||||
|
"Ba\u011fl\u0131 Menkul K\u0131ymetler De\u011fer D\u00fc\u015f\u00fckl\u00fc\u011f\u00fc Kar\u015f\u0131l\u0131\u011f\u0131(-)": {},
|
||||||
|
"Ba\u011fl\u0131 Ortakl\u0131klar": {},
|
||||||
|
"Ba\u011fl\u0131 Ortakl\u0131klar Sermaye Paylar\u0131 De\u011fer D\u00fc\u015f\u00fckl\u00fc\u011f\u00fc Kar\u015f\u0131l\u0131\u011f\u0131(-)": {},
|
||||||
|
"Ba\u011fl\u0131 Ortakl\u0131klara Sermaye Taahh\u00fctleri(-)": {},
|
||||||
|
"Di\u011fer Mali Duran Varl\u0131klar": {},
|
||||||
|
"Di\u011fer Mali Duran Varl\u0131klar Kar\u015f\u0131l\u0131\u011f\u0131(-)": {},
|
||||||
|
"\u0130\u015ftirakler": {},
|
||||||
|
"\u0130\u015ftirakler Sermaye Paylar\u0131 De\u011fer D\u00fc\u015f\u00fckl\u00fc\u011f\u00fc Kar\u015f\u0131l\u0131\u011f\u0131(-)": {},
|
||||||
|
"\u0130\u015ftiraklere Sermaye Taahh\u00fctleri(-)": {}
|
||||||
|
},
|
||||||
|
"Ticari Alacaklar": {
|
||||||
|
"Alacak Senetleri": {},
|
||||||
|
"Alacak Senetleri Reeskontu(-)": {},
|
||||||
|
"Al\u0131c\u0131lar": {},
|
||||||
|
"Kazaqn\u0131lmam\u0131\u015f Finansal Kiralama Faiz Gelirleri(-)": {},
|
||||||
|
"Verilen Depozito Ve Teminatlar": {},
|
||||||
|
"\u015e\u00fcpheli Ticari Alacaklar Kar\u015f\u0131l\u0131\u011f\u0131(-)": {}
|
||||||
|
},
|
||||||
|
"root_type": "",
|
||||||
|
"\u00d6zel T\u00fckenmeye Tabi Varl\u0131klar": {
|
||||||
|
"Arama Giderleri": {},
|
||||||
|
"Birikmi\u015f T\u00fckenme Paylar\u0131(-)": {},
|
||||||
|
"Di\u011fer \u00d6zel T\u00fckenmeye Tabi Varl\u0131klar": {},
|
||||||
|
"Haz\u0131rl\u0131k Ve Geli\u015ftirme Giderleri": {},
|
||||||
|
"Verilen Avanslar": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"D\u00f6nen Varl\u0131klar": {
|
||||||
|
"Di\u011fer Alacaklar": {
|
||||||
|
"Ba\u011fl\u0131 Ortakl\u0131klardan Alacaklar": {},
|
||||||
|
"Di\u011fer Alacak Senetleri Reeskontu(-)": {},
|
||||||
|
"Di\u011fer \u00c7e\u015fitli Alacaklar": {},
|
||||||
|
"Ortaklardan Alacaklar": {},
|
||||||
|
"Personelden Alacaklar": {},
|
||||||
|
"\u0130\u015ftiraklerden Alacaklar": {},
|
||||||
|
"\u015e\u00fcpheli Di\u011fer Alacaklar": {},
|
||||||
|
"\u015e\u00fcpheli Di\u011fer Alacaklar Kar\u015f\u0131l\u0131\u011f\u0131(-)": {}
|
||||||
|
},
|
||||||
|
"Di\u011fer D\u00f6nen Varl\u0131klar": {
|
||||||
|
"Devreden KDV": {},
|
||||||
|
"Di\u011fer D\u00f6nen Varl\u0131klar Kar\u015f\u0131l\u0131\u011f\u0131(-)": {},
|
||||||
|
"Di\u011fer KDV": {},
|
||||||
|
"Di\u011fer \u00c7e\u015fitli D\u00f6nen Varl\u0131klar": {},
|
||||||
|
"Personel Avanslar\u0131": {},
|
||||||
|
"Pe\u015fin \u00d6denen Vergiler Ve Fonlar": {},
|
||||||
|
"Say\u0131m Ve Tesell\u00fcm Noksanlar\u0131": {},
|
||||||
|
"\u0130ndirilecek KDV": {},
|
||||||
|
"\u0130\u015f Avanslar\u0131": {}
|
||||||
|
},
|
||||||
|
"Gelecek Aylara Ait Giderler ve Gelir Tahakkuklar\u0131": {
|
||||||
|
"Gelecek Aylara Ait Giderler": {},
|
||||||
|
"Gelir Tahakkuklar\u0131": {}
|
||||||
|
},
|
||||||
|
"Haz\u0131r De\u011ferler": {
|
||||||
|
"Al\u0131nan \u00c7ekler": {},
|
||||||
|
"Bankalar": {
|
||||||
|
"account_type": "Bank"
|
||||||
|
},
|
||||||
|
"Di\u011fer Haz\u0131r De\u011ferler": {},
|
||||||
|
"Kasa": {
|
||||||
|
"account_type": "Cash"
|
||||||
|
},
|
||||||
|
"Verilen \u00c7ekler ve \u00d6deme Emirleri(-)": {}
|
||||||
|
},
|
||||||
|
"Menkul K\u0131ymetler": {
|
||||||
|
"Di\u011fer Menkul K\u0131ymetler": {},
|
||||||
|
"Hisse Senetleri": {},
|
||||||
|
"Kamu Kesimi Tahvil, Senet ve Bonolar\u0131": {},
|
||||||
|
"Menkul K\u0131ymetler De\u011fer D\u00fc\u015f\u00fckl\u00fc\u011f\u00fc Kar\u015f\u0131l\u0131\u011f\u0131(-)": {},
|
||||||
|
"\u00d6zel Kesim Tahvil Senet Ve Bonolar\u0131": {}
|
||||||
|
},
|
||||||
|
"Stoklar": {
|
||||||
|
"Mamuller": {},
|
||||||
|
"Stok De\u011fer D\u00fc\u015f\u00fckl\u00fc\u011f\u00fc Kar\u015f\u0131l\u0131\u011f\u0131(-)": {},
|
||||||
|
"Ticari Mallar": {},
|
||||||
|
"Verilen Sipari\u015f Avanslar\u0131": {},
|
||||||
|
"Yar\u0131 Mamuller": {},
|
||||||
|
"\u0130lk Madde Malzeme": {}
|
||||||
|
},
|
||||||
|
"Ticari Alacaklar": {
|
||||||
|
"Alacak Senetleri": {},
|
||||||
|
"Alacak Senetleri Reeskontu(-)": {},
|
||||||
|
"Al\u0131c\u0131lar": {},
|
||||||
|
"Di\u011fer Ticari Alacaklar": {},
|
||||||
|
"Kazan\u0131lmam\u0131\u015f Finansal Kiralama Faiz Gelirleri(-)": {},
|
||||||
|
"Verilen Depozito ve Teminatlar": {},
|
||||||
|
"\u015e\u00fcpheli Ticari Alacaklar": {},
|
||||||
|
"\u015e\u00fcpheli Ticari Alacaklar Kar\u015f\u0131l\u0131\u011f\u0131": {}
|
||||||
|
},
|
||||||
|
"Y\u0131llara Yayg\u0131n \u0130n\u015faat ve Onar\u0131m Maliyetleri": {
|
||||||
|
"Ta\u015feronlara Verilen Avanslar": {},
|
||||||
|
"Y\u0131llara Yayg\u0131n \u0130n\u015faat Ve Onar\u0131m Maliyetleri": {}
|
||||||
|
},
|
||||||
|
"root_type": ""
|
||||||
|
},
|
||||||
|
"Gelir Tablosu Hesaplar\u0131": {
|
||||||
|
"Br\u00fct Sat\u0131\u015flar": {
|
||||||
|
"Di\u011fer Gelirler": {},
|
||||||
|
"Yurt D\u0131\u015f\u0131 Sat\u0131\u015flar": {},
|
||||||
|
"Yurt \u0130\u00e7i Sat\u0131\u015flar": {}
|
||||||
|
},
|
||||||
|
"Di\u011fer Faaliyetlerden Olu\u015fan Gelir ve K\u00e2rlar": {
|
||||||
|
"Ba\u011fl\u0131 Ortakl\u0131klardan Temett\u00fc Gelirleri": {},
|
||||||
|
"Di\u011fer Ola\u011fan Gelir Ve K\u00e2rlar": {},
|
||||||
|
"Enflasyon D\u00fczeltme K\u00e2rlar\u0131": {},
|
||||||
|
"Faiz Gelirleri": {},
|
||||||
|
"Kambiyo K\u00e2rlar\u0131": {},
|
||||||
|
"Komisyon Gelirleri": {},
|
||||||
|
"Konusu Kalmayan Kar\u015f\u0131l\u0131klar": {},
|
||||||
|
"Menkul K\u0131ymet Sat\u0131\u015f K\u00e2rlar\u0131": {},
|
||||||
|
"Reeskont Faiz Gelirleri": {},
|
||||||
|
"\u0130\u015ftiraklerden Temett\u00fc Gelirleri": {}
|
||||||
|
},
|
||||||
|
"Di\u011fer Faaliyetlerden Olu\u015fan Gider ve Zararlar (-)": {
|
||||||
|
"Di\u011fer Ola\u011fan Gider Ve Zararlar(-)": {},
|
||||||
|
"Enflasyon D\u00fczeltmesi Zararlar\u0131(-)": {},
|
||||||
|
"Kambiyo Zararlar\u0131(-)": {},
|
||||||
|
"Kar\u015f\u0131l\u0131k Giderleri(-)": {},
|
||||||
|
"Komisyon Giderleri(-)": {},
|
||||||
|
"Menkul K\u0131ymet Sat\u0131\u015f Zararlar\u0131(-)": {},
|
||||||
|
"Reeskont Faiz Giderleri(-)": {}
|
||||||
|
},
|
||||||
|
"D\u00f6nem Net K\u00e2r\u0131 Ve Zarar\u0131": {
|
||||||
|
"D\u00f6nem K\u00e2r\u0131 Vergi Ve Di\u011fer Yasal Y\u00fck\u00fcml\u00fcl\u00fck Kar\u015f\u0131l\u0131klar\u0131(-)": {},
|
||||||
|
"D\u00f6nem K\u00e2r\u0131 Veya Zarar\u0131": {},
|
||||||
|
"D\u00f6nem Net K\u00e2r\u0131 Veya Zarar\u0131": {},
|
||||||
|
"Enflasyon D\u00fczeltme Hesab\u0131": {},
|
||||||
|
"Y\u0131llara Yayg\u0131n \u0130n\u015faat Ve Enflasyon D\u00fczeltme Hesab\u0131": {}
|
||||||
|
},
|
||||||
|
"Faaliyet Giderleri(-)": {
|
||||||
|
"Ara\u015ft\u0131rma Ve Geli\u015ftirme Giderleri(-)": {},
|
||||||
|
"Genel Y\u00f6netim Giderleri(-)": {},
|
||||||
|
"Pazarlama Sat\u0131\u015f Ve Da\u011f\u0131t\u0131m Giderleri(-)": {}
|
||||||
|
},
|
||||||
|
"Finansman Giderleri": {
|
||||||
|
"K\u0131sa Vadeli Bor\u00e7lanma Giderleri(-)": {},
|
||||||
|
"Uzun Vadeli Bor\u00e7lanma Giderleri(-)": {}
|
||||||
|
},
|
||||||
|
"Ola\u011fan D\u0131\u015f\u0131 Gelir Ve K\u00e2rlar": {
|
||||||
|
"Di\u011fer Ola\u011fan D\u0131\u015f\u0131 Gelir Ve K\u00e2rlar": {},
|
||||||
|
"\u00d6nceki D\u00f6nem Gelir Ve K\u00e2rlar\u0131": {}
|
||||||
|
},
|
||||||
|
"Ola\u011fan D\u0131\u015f\u0131 Gider Ve Zaralar(-)": {
|
||||||
|
"Di\u011fer Ola\u011fan D\u0131\u015f\u0131 Gider Ve Zararlar(-)": {},
|
||||||
|
"\u00c7al\u0131\u015fmayan K\u0131s\u0131m Gider Ve Zararlar\u0131(-)": {},
|
||||||
|
"\u00d6nceki D\u00f6nem Gider Ve Zararlar\u0131(-)": {}
|
||||||
|
},
|
||||||
|
"Sat\u0131\u015f \u0130ndirimleri (-)": {
|
||||||
|
"Di\u011fer \u0130ndirimler": {},
|
||||||
|
"Sat\u0131\u015f \u0130ndirimleri(-)": {},
|
||||||
|
"Sat\u0131\u015ftan \u0130adeler(-)": {}
|
||||||
|
},
|
||||||
|
"Sat\u0131\u015flar\u0131n Maliyeti(-)": {
|
||||||
|
"Di\u011fer Sat\u0131\u015flar\u0131n Maliyeti(-)": {},
|
||||||
|
"Sat\u0131lan Hizmet Maliyeti(-)": {},
|
||||||
|
"Sat\u0131lan Mamuller Maliyeti(-)": {},
|
||||||
|
"Sat\u0131lan Ticari Mallar Maliyeti(-)": {}
|
||||||
|
},
|
||||||
|
"root_type": ""
|
||||||
|
},
|
||||||
|
"K\u0131sa Vadeli Yabanc\u0131 Kaynaklar": {
|
||||||
|
"Al\u0131nan Avanslar": {
|
||||||
|
"Al\u0131nan Di\u011fer Avanslar": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"Al\u0131nan Sipari\u015f Avanslar\u0131": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"Bor\u00e7 ve Gider Kar\u015f\u0131l\u0131klar\u0131": {
|
||||||
|
"Di\u011fer Bor\u00e7 Ve Gider Kar\u015f\u0131l\u0131klar\u0131": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"D\u00f6nem K\u00e2r\u0131 Vergi Ve Di\u011fer Yasal Y\u00fck\u00fcml\u00fcl\u00fck Kar\u015f\u0131l\u0131klar\u0131": {
|
||||||
|
"account_type": "Tax"
|
||||||
|
},
|
||||||
|
"D\u00f6nem K\u00e2r\u0131n\u0131n Pe\u015fin \u00d6denen Vergi Ve Di\u011fer Y\u00fck\u00fcml\u00fcl\u00fckler(-)": {
|
||||||
|
"account_type": "Tax"
|
||||||
|
},
|
||||||
|
"K\u0131dem Tazminat\u0131 Kar\u015f\u0131l\u0131\u011f\u0131": {},
|
||||||
|
"Maliyet Giderleri Kar\u015f\u0131l\u0131\u011f\u0131": {},
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"Di\u011fer Bor\u00e7lar": {
|
||||||
|
"Ba\u011fl\u0131 Ortakl\u0131klara Bor\u00e7lar": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"Di\u011fer Bor\u00e7 Senetleri Reeskontu(-)": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"Di\u011fer \u00c7e\u015fitli Bor\u00e7lar": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"Ortaklara Bor\u00e7lar": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"Personele Bor\u00e7lar": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"account_type": "Payable",
|
||||||
|
"\u0130\u015ftiraklere Bor\u00e7lar": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Di\u011fer K\u0131sa Vadeli Yabanc\u0131 Kaynaklar": {
|
||||||
|
"Di\u011fer KDV": {
|
||||||
|
"account_type": "Tax"
|
||||||
|
},
|
||||||
|
"Di\u011fer \u00c7e\u015fitli Yabanc\u0131 Kaynaklar": {},
|
||||||
|
"Hesaplanan KDV": {
|
||||||
|
"account_type": "Tax"
|
||||||
|
},
|
||||||
|
"Merkez Ve \u015eubeler Cari Hesab\u0131": {},
|
||||||
|
"Say\u0131m Ve Tesell\u00fcm Fazlalar\u0131": {},
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"Gelecek Aylara Ait Gelirler Ve Gider Tahakkuklar\u0131": {
|
||||||
|
"Gelecek Aylara Ait Gelirler": {},
|
||||||
|
"Gider Tahakkuklar\u0131": {}
|
||||||
|
},
|
||||||
|
"Mali Bor\u00e7lar": {
|
||||||
|
"Banka Kredileri": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"Di\u011fer Mali Bor\u00e7lar": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"Ertelenmi\u015f Finansal Kiralama Bor\u00e7lanma Maliyetleri(-)": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"Finansal Kiralama \u0130\u015flemlerinden Bor\u00e7lar": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"Menkul K\u0131ymetler \u0130hra\u00e7 Fark\u0131(-)": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"Tahvil Anapara Bor\u00e7, Taksit Ve Faizleri": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"Uzun Vadeli Kredilerin Anapara Taksitleri Ve Faizleri": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"account_type": "Payable",
|
||||||
|
"\u00c7\u0131kar\u0131lan Bonolar Ve Senetler": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"\u00c7\u0131kar\u0131lm\u0131\u015f Di\u011fer Menkul K\u0131ymetler": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Ticari Bor\u00e7lar": {
|
||||||
|
"Al\u0131nan Depozito Ve Teminatlar": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"Bor\u00e7 Senetleri": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"Bor\u00e7 Senetleri Reeskontu(-)": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"Di\u011fer Ticari Bor\u00e7lar": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"Sat\u0131c\u0131lar": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"Y\u0131llara Yayg\u0131n \u0130n\u015faat Ve Onar\u0131m Hakedi\u015fleri": {
|
||||||
|
"350 Y\u0131llara Yayg\u0131n \u0130n\u015faat Ve Onar\u0131m Hakedi\u015fleri Bedelleri": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"root_type": "",
|
||||||
|
"\u00d6denecek Vergi ve Di\u011fer Y\u00fck\u00fcml\u00fcl\u00fckler": {
|
||||||
|
"Vadesi Ge\u00e7mi\u015f, Ertelenmi\u015f Veya Taksitlendirilmi\u015f Vergi Ve Di\u011fer Y\u00fck\u00fcml\u00fcl\u00fckler": {
|
||||||
|
"account_type": "Tax"
|
||||||
|
},
|
||||||
|
"account_type": "Tax",
|
||||||
|
"\u00d6denecek Di\u011fer Y\u00fck\u00fcml\u00fcl\u00fckler": {
|
||||||
|
"account_type": "Tax"
|
||||||
|
},
|
||||||
|
"\u00d6denecek Sosyal G\u00fcvenl\u00fck Kesintileri": {
|
||||||
|
"account_type": "Tax"
|
||||||
|
},
|
||||||
|
"\u00d6denecek Vergi Ve Fonlar": {
|
||||||
|
"account_type": "Tax"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Maliyet Hesaplar\u0131": {
|
||||||
|
"Ara\u015ft\u0131rma Ve Geli\u015ftirme Giderleri": {},
|
||||||
|
"Direkt \u0130lk Madde Ve Malzeme Giderleri": {
|
||||||
|
"Direk \u0130lk Madde Ve Malzeme Giderleri Hesab\u0131": {},
|
||||||
|
"Direkt \u0130lk Madde Ve Malzeme Fiyat Fark\u0131": {},
|
||||||
|
"Direkt \u0130lk Madde Ve Malzeme Miktar Fark\u0131": {},
|
||||||
|
"Direkt \u0130lk Madde Ve Malzeme Yans\u0131tma Hesab\u0131": {}
|
||||||
|
},
|
||||||
|
"Direkt \u0130\u015f\u00e7ilik Giderleri": {
|
||||||
|
"Direkt \u0130\u015f\u00e7ilik Giderleri": {},
|
||||||
|
"Direkt \u0130\u015f\u00e7ilik Giderleri Yans\u0131tma Hesab\u0131": {},
|
||||||
|
"Direkt \u0130\u015f\u00e7ilik S\u00fcre Farklar\u0131": {},
|
||||||
|
"Direkt \u0130\u015f\u00e7ilik \u00dccret Farklar\u0131": {}
|
||||||
|
},
|
||||||
|
"Finansman Giderleri": {
|
||||||
|
"Finansman Giderleri": {},
|
||||||
|
"Finansman Giderleri Fark Hesab\u0131": {},
|
||||||
|
"Finansman Giderleri Yans\u0131tma Hesab\u0131": {}
|
||||||
|
},
|
||||||
|
"Genel Y\u00f6netim Giderleri": {
|
||||||
|
"Genel Y\u00f6netim Gider Farklar\u0131 Hesab\u0131": {},
|
||||||
|
"Genel Y\u00f6netim Giderleri": {},
|
||||||
|
"Genel Y\u00f6netim Giderleri Yans\u0131tma Hesab\u0131": {}
|
||||||
|
},
|
||||||
|
"Genel \u00dcretim Giderleri": {
|
||||||
|
"Genel \u00dcretim Giderleri": {},
|
||||||
|
"Genel \u00dcretim Giderleri B\u00fct\u00e7e Farklar\u0131": {},
|
||||||
|
"Genel \u00dcretim Giderleri Kapasite Farklar\u0131": {},
|
||||||
|
"Genel \u00dcretim Giderleri Verimlilik Giderleri": {},
|
||||||
|
"Genel \u00dcretim Giderleri Yans\u0131tma Hesab\u0131": {}
|
||||||
|
},
|
||||||
|
"Hizmet \u00dcretim Maliyeti": {
|
||||||
|
"Hizmet \u00dcretim Maliyeti": {},
|
||||||
|
"Hizmet \u00dcretim Maliyeti Fark Hesaplar\u0131": {},
|
||||||
|
"Hizmet \u00dcretim Maliyeti Yans\u0131tma Hesab\u0131": {}
|
||||||
|
},
|
||||||
|
"Maliyet Muhasebesi Ba\u011flant\u0131 Hesaplar\u0131": {
|
||||||
|
"Maliyet Muhasebesi Ba\u011flant\u0131 Hesab\u0131": {},
|
||||||
|
"Maliyet Muhasebesi Yans\u0131tma Hesab\u0131": {}
|
||||||
|
},
|
||||||
|
"Pazarlama, Sat\u0131\u015f Ve Da\u011f\u0131t\u0131m Giderleri": {
|
||||||
|
"Atra\u015ft\u0131rma Ve Geli\u015ftirme Giderleri": {},
|
||||||
|
"Pazarlama Sat\u0131\u015f Ve Dag\u0131t\u0131m Giderleri Yans\u0131tma Hesab\u0131": {},
|
||||||
|
"Pazarlama Sat\u0131\u015f Ve Da\u011f\u0131t\u0131m Giderleri Fark Hesab\u0131": {}
|
||||||
|
},
|
||||||
|
"root_type": ""
|
||||||
|
},
|
||||||
|
"Naz\u0131m Hesaplar": {
|
||||||
|
"root_type": ""
|
||||||
|
},
|
||||||
|
"Serbest Hesaplar": {
|
||||||
|
"root_type": ""
|
||||||
|
},
|
||||||
|
"Uzun Vadeli Yabanc\u0131 Kaynaklar": {
|
||||||
|
"Al\u0131nan Avanslar": {
|
||||||
|
"Al\u0131nan Di\u011fer Avanslar": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"Al\u0131nan Sipari\u015f Avanslar\u0131": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"Bor\u00e7 Ve Gider Kar\u015f\u0131l\u0131klar\u0131": {
|
||||||
|
"Di\u011fer Bor\u00e7 Ve Gider Kar\u015f\u0131l\u0131klar\u0131": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"K\u0131dem Tazminat\u0131 Kar\u015f\u0131l\u0131\u011f\u0131": {},
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"Di\u011fer Bor\u00e7lar": {
|
||||||
|
"Ba\u011fl\u0131 Ortakl\u0131klara Bor\u00e7lar": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"Di\u011fer Bor\u00e7 Senetleri Reeskontu(-)": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"Di\u011fer \u00c7e\u015fitli Bor\u00e7lar": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"Kamuya Olan Ertelenmi\u015f Veya Taksitlendirilmi\u015f Bor\u00e7lar": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"Ortaklara Bor\u00e7lar": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"account_type": "Payable",
|
||||||
|
"\u0130\u015ftiraklere Bor\u00e7lar": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Di\u011fer Uzun Vadeli Yabanc\u0131 Kaynaklar": {
|
||||||
|
"Di\u011fer \u00c7e\u015fitli Uzun Vadeli Yabanc\u0131 Kaynaklar": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"Gelecek Y\u0131llara Ertelenmi\u015f Veya Terkin Edilecek KDV": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"Tesise Kat\u0131lma Paylar\u0131": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"Gelecek Y\u0131llara Ait Gelirler Ve Gider Tahakkuklar\u0131": {
|
||||||
|
"Gelecek Y\u0131llara Ait Gelirler": {},
|
||||||
|
"Gider Tahakkuklar\u0131": {}
|
||||||
|
},
|
||||||
|
"Mali Bor\u00e7lar": {
|
||||||
|
"Banka Kredileri": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"Di\u011fer Mali Bor\u00e7lar": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"Ertelenmi\u015f Finansal Kiralama Bor\u00e7lanma Maliyetleri(-)": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"Finansal Kiralama \u0130\u015flemlerinden Bor\u00e7lar": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"Menkul K\u0131ymetler \u0130hra\u00e7 Fark\u0131(-)": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"account_type": "Payable",
|
||||||
|
"\u00c7\u0131kar\u0131lm\u0131\u015f Di\u011fer Menkul K\u0131ymetler": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"\u00c7\u0131kar\u0131lm\u0131\u015f Tahviller": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Ticari Bor\u00e7lar": {
|
||||||
|
"Al\u0131nan Depozito Ve Teminatlar": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"Bor\u00e7 Senetleri": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"Bor\u00e7 Senetleri Reeskontu(-)": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"Di\u011fer Ticari Bor\u00e7lar": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"Sat\u0131c\u0131lar": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"root_type": ""
|
||||||
|
},
|
||||||
|
"\u00d6z Kaynaklar": {
|
||||||
|
"D\u00f6nem Net K\u00e2r\u0131 (Zarar\u0131)": {
|
||||||
|
"D\u00f6nem Net K\u00e2r\u0131": {},
|
||||||
|
"D\u00f6nem Net Zarar\u0131(-)": {}
|
||||||
|
},
|
||||||
|
"Ge\u00e7mi\u015f Y\u0131llar K\u00e2rlar\u0131": {
|
||||||
|
"Ge\u00e7mi\u015f Y\u0131llar K\u00e2rlar\u0131": {}
|
||||||
|
},
|
||||||
|
"Ge\u00e7mi\u015f Y\u0131llar Zararlar\u0131(-)": {
|
||||||
|
"Ge\u00e7mi\u015f Y\u0131llar Zararlar\u0131(-)": {}
|
||||||
|
},
|
||||||
|
"K\u00e2r Yedekleri": {
|
||||||
|
"Di\u011fer K\u00e2r Yedekleri": {},
|
||||||
|
"Ola\u011fan\u00fcst\u00fc Yedekler": {},
|
||||||
|
"Stat\u00fc Yedekleri": {},
|
||||||
|
"Yasal Yedekler": {},
|
||||||
|
"\u00d6zel Fonlar": {}
|
||||||
|
},
|
||||||
|
"Sermaye Yedekleri": {
|
||||||
|
"Di\u011fer Sermaye Yedekleri": {},
|
||||||
|
"Hisse Senedi \u0130ptal K\u00e2rlar\u0131": {},
|
||||||
|
"Hisse Senetleri \u0130hra\u00e7 Primleri": {},
|
||||||
|
"Maddi Duran Varl\u0131k Yeniden De\u011ferlenme Art\u0131\u015flar\u0131": {},
|
||||||
|
"Maliyet Art\u0131\u015flar\u0131 Fonu": {},
|
||||||
|
"\u0130\u015ftirakler Yeniden De\u011ferleme Art\u0131\u015flar\u0131": {}
|
||||||
|
},
|
||||||
|
"root_type": "",
|
||||||
|
"\u00d6denmi\u015f Sermaye": {
|
||||||
|
"Sermaye": {},
|
||||||
|
"\u00d6denmi\u015f Sermaye(-)": {
|
||||||
|
"account_type": "Payable"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -437,20 +437,12 @@
|
|||||||
},
|
},
|
||||||
"Sales": {
|
"Sales": {
|
||||||
"Sales from Other Regions": {
|
"Sales from Other Regions": {
|
||||||
"Sales from Other Region": {
|
"Sales from Other Region": {}
|
||||||
"account_type": "Income Account"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"Sales of same region": {
|
"Sales of same region": {
|
||||||
"Management Consultancy Fees 1": {
|
"Management Consultancy Fees 1": {},
|
||||||
"account_type": "Income Account"
|
"Sales Account": {},
|
||||||
},
|
"Sales of I/C": {}
|
||||||
"Sales Account": {
|
|
||||||
"account_type": "Income Account"
|
|
||||||
},
|
|
||||||
"Sales of I/C": {
|
|
||||||
"account_type": "Income Account"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root_type": "Income"
|
"root_type": "Income"
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -56,9 +56,7 @@
|
|||||||
"Constru\u00e7\u00f5es em Andamento de Im\u00f3veis Destinados \u00e0 Venda": {},
|
"Constru\u00e7\u00f5es em Andamento de Im\u00f3veis Destinados \u00e0 Venda": {},
|
||||||
"Estoques Destinados \u00e0 Doa\u00e7\u00e3o": {},
|
"Estoques Destinados \u00e0 Doa\u00e7\u00e3o": {},
|
||||||
"Im\u00f3veis Destinados \u00e0 Venda": {},
|
"Im\u00f3veis Destinados \u00e0 Venda": {},
|
||||||
"Insumos (materiais diretos)": {
|
"Insumos (materiais diretos)": {},
|
||||||
"account_type": "Stock"
|
|
||||||
},
|
|
||||||
"Insumos Agropecu\u00e1rios": {},
|
"Insumos Agropecu\u00e1rios": {},
|
||||||
"Mercadorias para Revenda": {},
|
"Mercadorias para Revenda": {},
|
||||||
"Outras 11": {},
|
"Outras 11": {},
|
||||||
@@ -148,65 +146,6 @@
|
|||||||
"root_type": "Asset"
|
"root_type": "Asset"
|
||||||
},
|
},
|
||||||
"CUSTOS DE PRODU\u00c7\u00c3O": {
|
"CUSTOS DE PRODU\u00c7\u00c3O": {
|
||||||
"CUSTO DOS PRODUTOS E SERVI\u00c7OS VENDIDOS": {
|
|
||||||
"CUSTO DOS PRODUTOS VENDIDOS": {
|
|
||||||
"CUSTO DOS PRODUTOS VENDIDOS PARA AS DEMAIS ATIVIDADES": {
|
|
||||||
"Custos dos Produtos Vendidos em Geral": {
|
|
||||||
"account_type": "Cost of Goods Sold"
|
|
||||||
},
|
|
||||||
"Outros Custos 4": {},
|
|
||||||
"account_type": "Cost of Goods Sold"
|
|
||||||
},
|
|
||||||
"CUSTO DOS PRODUTOS VENDIDOS PARA ASSIST\u00caNCIA SOCIAL": {
|
|
||||||
"Custos dos Produtos para Assist\u00eancia Social - Gratuidades": {},
|
|
||||||
"Custos dos Produtos para Assist\u00eancia Social - Vendidos": {},
|
|
||||||
"Outras": {}
|
|
||||||
},
|
|
||||||
"CUSTO DOS PRODUTOS VENDIDOS PARA EDUCA\u00c7\u00c3O": {
|
|
||||||
"Custos dos Produtos para Educa\u00e7\u00e3o - Gratuidades": {},
|
|
||||||
"Custos dos Produtos para Educa\u00e7\u00e3o - Vendidos": {},
|
|
||||||
"Outros Custos 6": {}
|
|
||||||
},
|
|
||||||
"CUSTO DOS PRODUTOS VENDIDOS PARA SA\u00daDE": {
|
|
||||||
"Custos dos Produtos para Sa\u00fade - Gratuidades": {},
|
|
||||||
"Custos dos Produtos para Sa\u00fade \u2013 Vendidos": {},
|
|
||||||
"Outros Custos 5": {}
|
|
||||||
},
|
|
||||||
"account_type": "Cost of Goods Sold"
|
|
||||||
},
|
|
||||||
"CUSTO DOS SERVI\u00c7OS PRESTADOS": {
|
|
||||||
"CUSTO DOS SERVI\u00c7OS PRESTADOS PARA AS DEMAIS ATIVIDADES": {
|
|
||||||
"Custo dos Servi\u00e7os Prestados em Geral": {},
|
|
||||||
"Outros Custos": {}
|
|
||||||
},
|
|
||||||
"CUSTO DOS SERVI\u00c7OS PRESTADOS PARA ASSIST\u00caNCIA SOCIAL": {
|
|
||||||
"Custo dos Servi\u00e7os Prestados a Conv\u00eanios/Contratos/Parcerias": {},
|
|
||||||
"Custo dos Servi\u00e7os Prestados a Doa\u00e7\u00f5es 1": {},
|
|
||||||
"Custo dos Servi\u00e7os Prestados a Doa\u00e7\u00f5es/Subven\u00e7\u00f5es Vinculadas 1": {},
|
|
||||||
"Custo dos Servi\u00e7os Prestados a Gratuidade 1": {},
|
|
||||||
"Custo dos Servi\u00e7os Prestados a Pacientes Particulares": {},
|
|
||||||
"Outros Custos 2": {}
|
|
||||||
},
|
|
||||||
"CUSTO DOS SERVI\u00c7OS PRESTADOS PARA EDUCA\u00c7\u00c3O": {
|
|
||||||
"Custo dos Servi\u00e7os Prestados a Alunos N\u00e3o Bolsistas": {},
|
|
||||||
"Custo dos Servi\u00e7os Prestados a Conv\u00eanios/Contratos/Parcerias (Exceto PROUNI)": {},
|
|
||||||
"Custo dos Servi\u00e7os Prestados a Doa\u00e7\u00f5es": {},
|
|
||||||
"Custo dos Servi\u00e7os Prestados a Doa\u00e7\u00f5es/Subven\u00e7\u00f5es Vinculadas": {},
|
|
||||||
"Custo dos Servi\u00e7os Prestados a Gratuidade": {},
|
|
||||||
"Custo dos Servi\u00e7os Prestados ao PROUNI": {},
|
|
||||||
"Outros Custos 1": {}
|
|
||||||
},
|
|
||||||
"CUSTO DOS SERVI\u00c7OS PRESTADOS PARA SA\u00daDE": {
|
|
||||||
"Custo dos Servi\u00e7os Prestados a Conv\u00eanios SUS": {},
|
|
||||||
"Custo dos Servi\u00e7os Prestados a Conv\u00eanios/Contratos/Parcerias 1": {},
|
|
||||||
"Custo dos Servi\u00e7os Prestados a Doa\u00e7\u00f5es 2": {},
|
|
||||||
"Custo dos Servi\u00e7os Prestados a Doa\u00e7\u00f5es/Subven\u00e7\u00f5es Vinculadas 2": {},
|
|
||||||
"Custo dos Servi\u00e7os Prestados a Gratuidade 2": {},
|
|
||||||
"Custo dos Servi\u00e7os Prestados a Pacientes Particulares 1": {},
|
|
||||||
"Outros Custos 3": {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"CUSTO DOS BENS E SERVI\u00c7OS PRODUZIDOS": {
|
"CUSTO DOS BENS E SERVI\u00c7OS PRODUZIDOS": {
|
||||||
"CUSTO DOS PRODUTOS DE FABRICA\u00c7\u00c3O PR\u00d3PRIA PRODUZIDOS": {
|
"CUSTO DOS PRODUTOS DE FABRICA\u00c7\u00c3O PR\u00d3PRIA PRODUZIDOS": {
|
||||||
"Alimenta\u00e7\u00e3o do Trabalhador": {},
|
"Alimenta\u00e7\u00e3o do Trabalhador": {},
|
||||||
@@ -682,9 +621,7 @@
|
|||||||
"Receita das Unidades Imobili\u00e1rias Vendidas": {},
|
"Receita das Unidades Imobili\u00e1rias Vendidas": {},
|
||||||
"Receita de Exporta\u00e7\u00e3o Direta de Mercadorias e Produtos": {},
|
"Receita de Exporta\u00e7\u00e3o Direta de Mercadorias e Produtos": {},
|
||||||
"Receita de Exporta\u00e7\u00e3o de Servi\u00e7os": {},
|
"Receita de Exporta\u00e7\u00e3o de Servi\u00e7os": {},
|
||||||
"Receita de Loca\u00e7\u00e3o de Bens M\u00f3veis e Im\u00f3veis": {
|
"Receita de Loca\u00e7\u00e3o de Bens M\u00f3veis e Im\u00f3veis": {},
|
||||||
"account_type": "Income Account"
|
|
||||||
},
|
|
||||||
"Receita de Vendas de Mercadorias e Produtos a Comercial Exportadora com Fim Espec\u00edfico de Exporta\u00e7\u00e3o": {}
|
"Receita de Vendas de Mercadorias e Produtos a Comercial Exportadora com Fim Espec\u00edfico de Exporta\u00e7\u00e3o": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -708,6 +645,65 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"RESULTADO OPERACIONAL": {
|
"RESULTADO OPERACIONAL": {
|
||||||
|
"CUSTO DOS PRODUTOS E SERVI\u00c7OS VENDIDOS": {
|
||||||
|
"CUSTO DOS PRODUTOS VENDIDOS": {
|
||||||
|
"CUSTO DOS PRODUTOS VENDIDOS PARA AS DEMAIS ATIVIDADES": {
|
||||||
|
"Custos dos Produtos Vendidos em Geral": {
|
||||||
|
"account_type": "Cost of Goods Sold"
|
||||||
|
},
|
||||||
|
"Outros Custos 4": {},
|
||||||
|
"account_type": "Cost of Goods Sold"
|
||||||
|
},
|
||||||
|
"CUSTO DOS PRODUTOS VENDIDOS PARA ASSIST\u00caNCIA SOCIAL": {
|
||||||
|
"Custos dos Produtos para Assist\u00eancia Social - Gratuidades": {},
|
||||||
|
"Custos dos Produtos para Assist\u00eancia Social - Vendidos": {},
|
||||||
|
"Outras": {}
|
||||||
|
},
|
||||||
|
"CUSTO DOS PRODUTOS VENDIDOS PARA EDUCA\u00c7\u00c3O": {
|
||||||
|
"Custos dos Produtos para Educa\u00e7\u00e3o - Gratuidades": {},
|
||||||
|
"Custos dos Produtos para Educa\u00e7\u00e3o - Vendidos": {},
|
||||||
|
"Outros Custos 6": {}
|
||||||
|
},
|
||||||
|
"CUSTO DOS PRODUTOS VENDIDOS PARA SA\u00daDE": {
|
||||||
|
"Custos dos Produtos para Sa\u00fade - Gratuidades": {},
|
||||||
|
"Custos dos Produtos para Sa\u00fade \u2013 Vendidos": {},
|
||||||
|
"Outros Custos 5": {}
|
||||||
|
},
|
||||||
|
"account_type": "Cost of Goods Sold"
|
||||||
|
},
|
||||||
|
"CUSTO DOS SERVI\u00c7OS PRESTADOS": {
|
||||||
|
"CUSTO DOS SERVI\u00c7OS PRESTADOS PARA AS DEMAIS ATIVIDADES": {
|
||||||
|
"Custo dos Servi\u00e7os Prestados em Geral": {},
|
||||||
|
"Outros Custos": {}
|
||||||
|
},
|
||||||
|
"CUSTO DOS SERVI\u00c7OS PRESTADOS PARA ASSIST\u00caNCIA SOCIAL": {
|
||||||
|
"Custo dos Servi\u00e7os Prestados a Conv\u00eanios/Contratos/Parcerias": {},
|
||||||
|
"Custo dos Servi\u00e7os Prestados a Doa\u00e7\u00f5es 1": {},
|
||||||
|
"Custo dos Servi\u00e7os Prestados a Doa\u00e7\u00f5es/Subven\u00e7\u00f5es Vinculadas 1": {},
|
||||||
|
"Custo dos Servi\u00e7os Prestados a Gratuidade 1": {},
|
||||||
|
"Custo dos Servi\u00e7os Prestados a Pacientes Particulares": {},
|
||||||
|
"Outros Custos 2": {}
|
||||||
|
},
|
||||||
|
"CUSTO DOS SERVI\u00c7OS PRESTADOS PARA EDUCA\u00c7\u00c3O": {
|
||||||
|
"Custo dos Servi\u00e7os Prestados a Alunos N\u00e3o Bolsistas": {},
|
||||||
|
"Custo dos Servi\u00e7os Prestados a Conv\u00eanios/Contratos/Parcerias (Exceto PROUNI)": {},
|
||||||
|
"Custo dos Servi\u00e7os Prestados a Doa\u00e7\u00f5es": {},
|
||||||
|
"Custo dos Servi\u00e7os Prestados a Doa\u00e7\u00f5es/Subven\u00e7\u00f5es Vinculadas": {},
|
||||||
|
"Custo dos Servi\u00e7os Prestados a Gratuidade": {},
|
||||||
|
"Custo dos Servi\u00e7os Prestados ao PROUNI": {},
|
||||||
|
"Outros Custos 1": {}
|
||||||
|
},
|
||||||
|
"CUSTO DOS SERVI\u00c7OS PRESTADOS PARA SA\u00daDE": {
|
||||||
|
"Custo dos Servi\u00e7os Prestados a Conv\u00eanios SUS": {},
|
||||||
|
"Custo dos Servi\u00e7os Prestados a Conv\u00eanios/Contratos/Parcerias 1": {},
|
||||||
|
"Custo dos Servi\u00e7os Prestados a Doa\u00e7\u00f5es 2": {},
|
||||||
|
"Custo dos Servi\u00e7os Prestados a Doa\u00e7\u00f5es/Subven\u00e7\u00f5es Vinculadas 2": {},
|
||||||
|
"Custo dos Servi\u00e7os Prestados a Gratuidade 2": {},
|
||||||
|
"Custo dos Servi\u00e7os Prestados a Pacientes Particulares 1": {},
|
||||||
|
"Outros Custos 3": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"DESPESAS OPERACIONAIS": {
|
"DESPESAS OPERACIONAIS": {
|
||||||
"DESPESAS OPERACIONAIS 1": {
|
"DESPESAS OPERACIONAIS 1": {
|
||||||
"DESPESAS OPERACIONAIS 2": {
|
"DESPESAS OPERACIONAIS 2": {
|
||||||
|
|||||||
@@ -33,9 +33,7 @@
|
|||||||
},
|
},
|
||||||
"Stocks": {
|
"Stocks": {
|
||||||
"Mati\u00e8res premi\u00e8res": {},
|
"Mati\u00e8res premi\u00e8res": {},
|
||||||
"Stock de produits fini": {
|
"Stock de produits fini": {},
|
||||||
"account_type": "Stock"
|
|
||||||
},
|
|
||||||
"Stock exp\u00e9di\u00e9 non-factur\u00e9": {},
|
"Stock exp\u00e9di\u00e9 non-factur\u00e9": {},
|
||||||
"Travaux en cours": {},
|
"Travaux en cours": {},
|
||||||
"account_type": "Stock"
|
"account_type": "Stock"
|
||||||
@@ -397,11 +395,9 @@
|
|||||||
},
|
},
|
||||||
"Produits": {
|
"Produits": {
|
||||||
"Revenus de ventes": {
|
"Revenus de ventes": {
|
||||||
"Escomptes de volume sur ventes": {},
|
" Escomptes de volume sur ventes": {},
|
||||||
"Autres produits d'exploitation": {},
|
"Autres produits d'exploitation": {},
|
||||||
"Ventes": {
|
"Ventes": {},
|
||||||
"account_type": "Income Account"
|
|
||||||
},
|
|
||||||
"Ventes avec des provinces harmonis\u00e9es": {},
|
"Ventes avec des provinces harmonis\u00e9es": {},
|
||||||
"Ventes avec des provinces non-harmonis\u00e9es": {},
|
"Ventes avec des provinces non-harmonis\u00e9es": {},
|
||||||
"Ventes \u00e0 l'\u00e9tranger": {}
|
"Ventes \u00e0 l'\u00e9tranger": {}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,532 +0,0 @@
|
|||||||
{
|
|
||||||
"country_code": "ch",
|
|
||||||
"name": "240812 Schulkontenrahmen VEB - DE",
|
|
||||||
"tree": {
|
|
||||||
"Aktiven": {
|
|
||||||
"account_number": "1",
|
|
||||||
"is_group": 1,
|
|
||||||
"root_type": "Asset",
|
|
||||||
"Umlaufvermögen": {
|
|
||||||
"account_number": "10",
|
|
||||||
"is_group": 1,
|
|
||||||
"Flüssige Mittel": {
|
|
||||||
"account_number": "100",
|
|
||||||
"is_group": 1,
|
|
||||||
"Kasse": {
|
|
||||||
"account_number": "1000",
|
|
||||||
"account_type": "Cash"
|
|
||||||
},
|
|
||||||
"Bankguthaben": {
|
|
||||||
"account_number": "1020",
|
|
||||||
"account_type": "Bank"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Kurzfristig gehaltene Aktiven mit Börsenkurs": {
|
|
||||||
"account_number": "106",
|
|
||||||
"is_group": 1,
|
|
||||||
"Wertschriften": {
|
|
||||||
"account_number": "1060"
|
|
||||||
},
|
|
||||||
"Wertberichtigungen Wertschriften": {
|
|
||||||
"account_number": "1069"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Forderungen aus Lieferungen und Leistungen": {
|
|
||||||
"account_number": "110",
|
|
||||||
"is_group": 1,
|
|
||||||
"Forderungen aus Lieferungen und Leistungen (Debitoren)": {
|
|
||||||
"account_number": "1100"
|
|
||||||
},
|
|
||||||
"Delkredere": {
|
|
||||||
"account_number": "1109"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Übrige kurzfristige Forderungen": {
|
|
||||||
"account_number": "114",
|
|
||||||
"is_group": 1,
|
|
||||||
"Vorschüsse und Darlehen": {
|
|
||||||
"account_number": "1140"
|
|
||||||
},
|
|
||||||
"Wertberichtigungen Vorschüsse und Darlehen": {
|
|
||||||
"account_number": "1149"
|
|
||||||
},
|
|
||||||
"Vorsteuer MWST Material, Waren, Dienstleistungen, Energie": {
|
|
||||||
"account_number": "1170"
|
|
||||||
},
|
|
||||||
"Vorsteuer MWST Investitionen, übriger Betriebsaufwand": {
|
|
||||||
"account_number": "1171"
|
|
||||||
},
|
|
||||||
"Verrechnungssteuer": {
|
|
||||||
"account_number": "1176"
|
|
||||||
},
|
|
||||||
"Forderungen gegenüber Sozialversicherungen und Vorsorgeeinrichtungen": {
|
|
||||||
"account_number": "1180"
|
|
||||||
},
|
|
||||||
"Quellensteuer": {
|
|
||||||
"account_number": "1189"
|
|
||||||
},
|
|
||||||
"Sonstige kurzfristige Forderungen": {
|
|
||||||
"account_number": "1190"
|
|
||||||
},
|
|
||||||
"Wertberichtigungen sonstige kurzfristige Forderungen": {
|
|
||||||
"account_number": "1199"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Vorräte und nicht fakturierte Dienstleistungen": {
|
|
||||||
"account_number": "120",
|
|
||||||
"is_group": 1,
|
|
||||||
"Handelswaren": {
|
|
||||||
"account_number": "1200"
|
|
||||||
},
|
|
||||||
"Rohstoffe": {
|
|
||||||
"account_number": "1210"
|
|
||||||
},
|
|
||||||
"Werkstoffe": {
|
|
||||||
"account_number": "1220"
|
|
||||||
},
|
|
||||||
"Hilfs- und Verbrauchsmaterial": {
|
|
||||||
"account_number": "1230"
|
|
||||||
},
|
|
||||||
"Handelswaren in Konsignation": {
|
|
||||||
"account_number": "1250"
|
|
||||||
},
|
|
||||||
"Fertige Erzeugnisse": {
|
|
||||||
"account_number": "1260"
|
|
||||||
},
|
|
||||||
"Unfertige Erzeugnisse": {
|
|
||||||
"account_number": "1270"
|
|
||||||
},
|
|
||||||
"Nicht fakturierte Dienstleistungen": {
|
|
||||||
"account_number": "1280"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Aktive Rechnungsabgrenzungen": {
|
|
||||||
"account_number": "130",
|
|
||||||
"is_group": 1,
|
|
||||||
"Bezahlter Aufwand des Folgejahres": {
|
|
||||||
"account_number": "1300"
|
|
||||||
},
|
|
||||||
"Noch nicht erhaltener Ertrag": {
|
|
||||||
"account_number": "1301"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Anlagevermögen": {
|
|
||||||
"account_number": "14",
|
|
||||||
"is_group": 1,
|
|
||||||
"Finanzanlagen": {
|
|
||||||
"account_number": "140",
|
|
||||||
"is_group": 1,
|
|
||||||
"Wertschriften": {
|
|
||||||
"account_number": "1400"
|
|
||||||
},
|
|
||||||
"Wertberichtigungen Wertschriften": {
|
|
||||||
"account_number": "1409"
|
|
||||||
},
|
|
||||||
"Darlehen": {
|
|
||||||
"account_number": "1440"
|
|
||||||
},
|
|
||||||
"Hypotheken": {
|
|
||||||
"account_number": "1441"
|
|
||||||
},
|
|
||||||
"Wertberichtigungen langfristige Forderungen": {
|
|
||||||
"account_number": "1449"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Beteiligungen": {
|
|
||||||
"account_number": "148",
|
|
||||||
"is_group": 1,
|
|
||||||
"Beteiligungen": {
|
|
||||||
"account_number": "1480"
|
|
||||||
},
|
|
||||||
"Wertberichtigungen Beteiligungen": {
|
|
||||||
"account_number": "1489"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Mobile Sachanlagen": {
|
|
||||||
"account_number": "150",
|
|
||||||
"is_group": 1,
|
|
||||||
"Maschinen und Apparate": {
|
|
||||||
"account_number": "1500"
|
|
||||||
},
|
|
||||||
"Wertberichtigungen Maschinen und Apparate": {
|
|
||||||
"account_number": "1509"
|
|
||||||
},
|
|
||||||
"Mobiliar und Einrichtungen": {
|
|
||||||
"account_number": "1510"
|
|
||||||
},
|
|
||||||
"Wertberichtigungen Mobiliar und Einrichtungen": {
|
|
||||||
"account_number": "1519"
|
|
||||||
},
|
|
||||||
"Büromaschinen, Informatik, Kommunikationstechnologie": {
|
|
||||||
"account_number": "1520"
|
|
||||||
},
|
|
||||||
"Wertberichtigungen Büromaschinen, Informatik, Kommunikationstechnologie": {
|
|
||||||
"account_number": "1529"
|
|
||||||
},
|
|
||||||
"Fahrzeuge": {
|
|
||||||
"account_number": "1530"
|
|
||||||
},
|
|
||||||
"Wertberichtigungen Fahrzeuge": {
|
|
||||||
"account_number": "1539"
|
|
||||||
},
|
|
||||||
"Werkzeuge und Geräte": {
|
|
||||||
"account_number": "1540"
|
|
||||||
},
|
|
||||||
"Wertberichtigungen Werkzeuge und Geräte": {
|
|
||||||
"account_number": "1549"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Immobile Sachanlagen": {
|
|
||||||
"account_number": "160",
|
|
||||||
"is_group": 1,
|
|
||||||
"Geschäftsliegenschaften": {
|
|
||||||
"account_number": "1600"
|
|
||||||
},
|
|
||||||
"Wertberichtigungen Geschäftsliegenschaften": {
|
|
||||||
"account_number": "1609"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Immaterielle Werte": {
|
|
||||||
"account_number": "170",
|
|
||||||
"is_group": 1,
|
|
||||||
"Patente, Know-how, Lizenzen, Rechte, Entwicklungen": {
|
|
||||||
"account_number": "1700"
|
|
||||||
},
|
|
||||||
"Wertberichtigungen Patente, Know-how, Lizenzen, Rechte, Entwicklungen": {
|
|
||||||
"account_number": "1709"
|
|
||||||
},
|
|
||||||
"Goodwill": {
|
|
||||||
"account_number": "1770"
|
|
||||||
},
|
|
||||||
"Wertberichtigungen Goodwill": {
|
|
||||||
"account_number": "1779"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Nicht einbezahltes Grund-, Gesellschafter- oder Stiftungskapital": {
|
|
||||||
"account_number": "180",
|
|
||||||
"is_group": 1,
|
|
||||||
"Nicht einbezahltes Aktien-, Stamm-, Anteilschein- oder Stiftungskapital": {
|
|
||||||
"account_number": "1850"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Passiven": {
|
|
||||||
"account_number": "2",
|
|
||||||
"is_group": 1,
|
|
||||||
"root_type": "Liability",
|
|
||||||
"Kurzfristiges Fremdkapital": {
|
|
||||||
"account_number": "20",
|
|
||||||
"is_group": 1,
|
|
||||||
"Verbindlichkeiten aus Lieferungen und Leistungen": {
|
|
||||||
"account_number": "200",
|
|
||||||
"is_group": 1,
|
|
||||||
"Verbindlichkeiten aus Lieferungen und Leistungen (Kreditoren)": {
|
|
||||||
"account_number": "2000"
|
|
||||||
},
|
|
||||||
"Erhaltene Anzahlungen": {
|
|
||||||
"account_number": "2030"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Kurzfristige verzinsliche Verbindlichkeiten": {
|
|
||||||
"account_number": "210",
|
|
||||||
"is_group": 1,
|
|
||||||
"Bankverbindlichkeiten": {
|
|
||||||
"account_number": "2100"
|
|
||||||
},
|
|
||||||
"Verbindlichkeiten aus Finanzierungsleasing": {
|
|
||||||
"account_number": "2120"
|
|
||||||
},
|
|
||||||
"Übrige verzinsliche Verbindlichkeiten": {
|
|
||||||
"account_number": "2140"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Übrige kurzfristige Verbindlichkeiten": {
|
|
||||||
"account_number": "220",
|
|
||||||
"is_group": 1,
|
|
||||||
"Geschuldete MWST (Umsatzsteuer)": {
|
|
||||||
"account_number": "2200"
|
|
||||||
},
|
|
||||||
"Abrechnungskonto MWST": {
|
|
||||||
"account_number": "2201"
|
|
||||||
},
|
|
||||||
"Verrechnungssteuer": {
|
|
||||||
"account_number": "2206"
|
|
||||||
},
|
|
||||||
"Direkte Steuern": {
|
|
||||||
"account_number": "2208"
|
|
||||||
},
|
|
||||||
"Sonstige kurzfristige Verbindlichkeiten": {
|
|
||||||
"account_number": "2210"
|
|
||||||
},
|
|
||||||
"Beschlossene Ausschüttungen": {
|
|
||||||
"account_number": "2261"
|
|
||||||
},
|
|
||||||
"Sozialversicherungen und Vorsorgeeinrichtungen": {
|
|
||||||
"account_number": "2270"
|
|
||||||
},
|
|
||||||
"Quellensteuer": {
|
|
||||||
"account_number": "2279"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Passive Rechnungsabgrenzungen und kurzfristige Rückstellungen": {
|
|
||||||
"account_number": "230",
|
|
||||||
"is_group": 1,
|
|
||||||
"Noch nicht bezahlter Aufwand": {
|
|
||||||
"account_number": "2300"
|
|
||||||
},
|
|
||||||
"Erhaltener Ertrag des Folgejahres": {
|
|
||||||
"account_number": "2301"
|
|
||||||
},
|
|
||||||
"Kurzfristige Rückstellungen": {
|
|
||||||
"account_number": "2330"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Langfristiges Fremdkapital": {
|
|
||||||
"account_number": "24",
|
|
||||||
"is_group": 1,
|
|
||||||
"Langfristige verzinsliche Verbindlichkeiten": {
|
|
||||||
"account_number": "240",
|
|
||||||
"is_group": 1,
|
|
||||||
"Bankverbindlichkeiten": {
|
|
||||||
"account_number": "2400"
|
|
||||||
},
|
|
||||||
"Verbindlichkeiten aus Finanzierungsleasing": {
|
|
||||||
"account_number": "2420"
|
|
||||||
},
|
|
||||||
"Obligationenanleihen": {
|
|
||||||
"account_number": "2430"
|
|
||||||
},
|
|
||||||
"Darlehen": {
|
|
||||||
"account_number": "2450"
|
|
||||||
},
|
|
||||||
"Hypotheken": {
|
|
||||||
"account_number": "2451"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Übrige langfristige Verbindlichkeiten": {
|
|
||||||
"account_number": "250",
|
|
||||||
"is_group": 1,
|
|
||||||
"Übrige langfristige Verbindlichkeiten (unverzinslich)": {
|
|
||||||
"account_number": "2500"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Rückstellungen sowie vom Gesetz vorgesehene ähnliche Positionen": {
|
|
||||||
"account_number": "260",
|
|
||||||
"is_group": 1,
|
|
||||||
"Rückstellungen": {
|
|
||||||
"account_number": "2600"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Eigenkapital (juristische Personen)": {
|
|
||||||
"account_number": "28",
|
|
||||||
"is_group": 1,
|
|
||||||
"Grund-, Gesellschafter- oder Stiftungskapital": {
|
|
||||||
"account_number": "280",
|
|
||||||
"is_group": 1,
|
|
||||||
"Aktien-, Stamm-, Anteilschein- oder Stiftungskapital": {
|
|
||||||
"account_number": "2800"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Reserven und Jahresgewinn oder Jahresverlust": {
|
|
||||||
"account_number": "290",
|
|
||||||
"is_group": 1,
|
|
||||||
"Gesetzliche Kapitalreserve": {
|
|
||||||
"account_number": "2900"
|
|
||||||
},
|
|
||||||
"Reserve für eigene Kapitalanteile": {
|
|
||||||
"account_number": "2930"
|
|
||||||
},
|
|
||||||
"Aufwertungsreserve": {
|
|
||||||
"account_number": "2940"
|
|
||||||
},
|
|
||||||
"Gesetzliche Gewinnreserve": {
|
|
||||||
"account_number": "2950"
|
|
||||||
},
|
|
||||||
"Freiwillige Gewinnreserven": {
|
|
||||||
"account_number": "2960"
|
|
||||||
},
|
|
||||||
"Gewinnvortrag oder Verlustvortrag": {
|
|
||||||
"account_number": "2970"
|
|
||||||
},
|
|
||||||
"Jahresgewinn oder Jahresverlust": {
|
|
||||||
"account_number": "2979"
|
|
||||||
},
|
|
||||||
"Eigene Aktien, Stammanteile oder Anteilscheine (Minusposten)": {
|
|
||||||
"account_number": "2980"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Betrieblicher Ertrag aus Lieferungen und Leistungen": {
|
|
||||||
"account_number": "3",
|
|
||||||
"is_group": 1,
|
|
||||||
"root_type": "Income",
|
|
||||||
"Produktionserlöse": {
|
|
||||||
"account_number": "3000"
|
|
||||||
},
|
|
||||||
"Handelserlöse": {
|
|
||||||
"account_number": "3200"
|
|
||||||
},
|
|
||||||
"Dienstleistungserlöse": {
|
|
||||||
"account_number": "3400"
|
|
||||||
},
|
|
||||||
"Übrige Erlöse aus Lieferungen und Leistungen": {
|
|
||||||
"account_number": "3600"
|
|
||||||
},
|
|
||||||
"Eigenleistungen": {
|
|
||||||
"account_number": "3700"
|
|
||||||
},
|
|
||||||
"Eigenverbrauch": {
|
|
||||||
"account_number": "3710"
|
|
||||||
},
|
|
||||||
"Erlösminderungen": {
|
|
||||||
"account_number": "3800"
|
|
||||||
},
|
|
||||||
"Verluste Forderungen (Debitoren), Veränderung Delkredere": {
|
|
||||||
"account_number": "3805"
|
|
||||||
},
|
|
||||||
"Bestandesänderungen unfertige Erzeugnisse": {
|
|
||||||
"account_number": "3900"
|
|
||||||
},
|
|
||||||
"Bestandesänderungen fertige Erzeugnisse": {
|
|
||||||
"account_number": "3901"
|
|
||||||
},
|
|
||||||
"Bestandesänderungen nicht fakturierte Dienstleistungen": {
|
|
||||||
"account_number": "3940"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Aufwand für Material, Handelswaren, Dienstleistungen und Energie": {
|
|
||||||
"account_number": "4",
|
|
||||||
"is_group": 1,
|
|
||||||
"root_type": "Expense",
|
|
||||||
"Materialaufwand Produktion": {
|
|
||||||
"account_number": "4000"
|
|
||||||
},
|
|
||||||
"Handelswarenaufwand": {
|
|
||||||
"account_number": "4200"
|
|
||||||
},
|
|
||||||
"Aufwand für bezogene Dienstleistungen": {
|
|
||||||
"account_number": "4400"
|
|
||||||
},
|
|
||||||
"Energieaufwand zur Leistungserstellung": {
|
|
||||||
"account_number": "4500"
|
|
||||||
},
|
|
||||||
"Aufwandminderungen": {
|
|
||||||
"account_number": "4900"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Personalaufwand": {
|
|
||||||
"account_number": "5",
|
|
||||||
"is_group": 1,
|
|
||||||
"root_type": "Expense",
|
|
||||||
"Lohnaufwand": {
|
|
||||||
"account_number": "5000"
|
|
||||||
},
|
|
||||||
"Sozialversicherungsaufwand": {
|
|
||||||
"account_number": "5700"
|
|
||||||
},
|
|
||||||
"Übriger Personalaufwand": {
|
|
||||||
"account_number": "5800"
|
|
||||||
},
|
|
||||||
"Leistungen Dritter": {
|
|
||||||
"account_number": "5900"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Übriger betrieblicher Aufwand, Abschreibungen und Wertberichtigungen sowie Finanzergebnis": {
|
|
||||||
"account_number": "6",
|
|
||||||
"is_group": 1,
|
|
||||||
"root_type": "Expense",
|
|
||||||
"Raumaufwand": {
|
|
||||||
"account_number": "6000"
|
|
||||||
},
|
|
||||||
"Unterhalt, Reparaturen, Ersatz mobile Sachanlagen": {
|
|
||||||
"account_number": "6100"
|
|
||||||
},
|
|
||||||
"Leasingaufwand mobile Sachanlagen": {
|
|
||||||
"account_number": "6105"
|
|
||||||
},
|
|
||||||
"Fahrzeug- und Transportaufwand": {
|
|
||||||
"account_number": "6200"
|
|
||||||
},
|
|
||||||
"Fahrzeugleasing und -mieten": {
|
|
||||||
"account_number": "6260"
|
|
||||||
},
|
|
||||||
"Sachversicherungen, Abgaben, Gebühren, Bewilligungen": {
|
|
||||||
"account_number": "6300"
|
|
||||||
},
|
|
||||||
"Energie- und Entsorgungsaufwand": {
|
|
||||||
"account_number": "6400"
|
|
||||||
},
|
|
||||||
"Verwaltungsaufwand": {
|
|
||||||
"account_number": "6500"
|
|
||||||
},
|
|
||||||
"Informatikaufwand inkl. Leasing": {
|
|
||||||
"account_number": "6570"
|
|
||||||
},
|
|
||||||
"Werbeaufwand": {
|
|
||||||
"account_number": "6600"
|
|
||||||
},
|
|
||||||
"Sonstiger betrieblicher Aufwand": {
|
|
||||||
"account_number": "6700"
|
|
||||||
},
|
|
||||||
"Abschreibungen und Wertberichtigungen auf Positionen des Anlagevermögens": {
|
|
||||||
"account_number": "6800"
|
|
||||||
},
|
|
||||||
"Finanzaufwand": {
|
|
||||||
"account_number": "6900"
|
|
||||||
},
|
|
||||||
"Finanzertrag": {
|
|
||||||
"account_number": "6950"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Betrieblicher Nebenerfolg": {
|
|
||||||
"account_number": "7",
|
|
||||||
"is_group": 1,
|
|
||||||
"root_type": "Income",
|
|
||||||
"Ertrag Nebenbetrieb": {
|
|
||||||
"account_number": "7000"
|
|
||||||
},
|
|
||||||
"Aufwand Nebenbetrieb": {
|
|
||||||
"account_number": "7010"
|
|
||||||
},
|
|
||||||
"Ertrag betriebliche Liegenschaft": {
|
|
||||||
"account_number": "7500"
|
|
||||||
},
|
|
||||||
"Aufwand betriebliche Liegenschaft": {
|
|
||||||
"account_number": "7510"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Betriebsfremder, ausserordentlicher, einmaliger oder periodenfremder Aufwand und Ertrag": {
|
|
||||||
"account_number": "8",
|
|
||||||
"is_group": 1,
|
|
||||||
"root_type": "Expense",
|
|
||||||
"Betriebsfremder Aufwand": {
|
|
||||||
"account_number": "8000"
|
|
||||||
},
|
|
||||||
"Betriebsfremder Ertrag": {
|
|
||||||
"account_number": "8100"
|
|
||||||
},
|
|
||||||
"Ausserordentlicher, einmaliger oder periodenfremder Aufwand": {
|
|
||||||
"account_number": "8500"
|
|
||||||
},
|
|
||||||
"Ausserordentlicher, einmaliger oder periodenfremder Ertrag": {
|
|
||||||
"account_number": "8510"
|
|
||||||
},
|
|
||||||
"Direkte Steuern": {
|
|
||||||
"account_number": "8900"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Abschluss": {
|
|
||||||
"account_number": "9",
|
|
||||||
"is_group": 1,
|
|
||||||
"root_type": "Equity",
|
|
||||||
"Jahresgewinn oder Jahresverlust": {
|
|
||||||
"account_number": "9200"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,569 +0,0 @@
|
|||||||
{
|
|
||||||
"country_code": "de",
|
|
||||||
"name": "SKR03 mit Kontonummern",
|
|
||||||
"tree": {
|
|
||||||
"Aktiva": {
|
|
||||||
"is_group": 1,
|
|
||||||
"root_type": "Asset",
|
|
||||||
"A - Anlagevermögen": {
|
|
||||||
"is_group": 1,
|
|
||||||
"EDV-Software": {
|
|
||||||
"account_number": "0027",
|
|
||||||
"account_type": "Fixed Asset"
|
|
||||||
},
|
|
||||||
"Geschäftsausstattung": {
|
|
||||||
"account_number": "0410",
|
|
||||||
"account_type": "Fixed Asset"
|
|
||||||
},
|
|
||||||
"Büroeinrichtung": {
|
|
||||||
"account_number": "0420",
|
|
||||||
"account_type": "Fixed Asset"
|
|
||||||
},
|
|
||||||
"Darlehen": {
|
|
||||||
"account_number": "0565"
|
|
||||||
},
|
|
||||||
"Maschinen": {
|
|
||||||
"account_number": "0210",
|
|
||||||
"account_type": "Fixed Asset"
|
|
||||||
},
|
|
||||||
"Betriebsausstattung": {
|
|
||||||
"account_number": "0400",
|
|
||||||
"account_type": "Fixed Asset"
|
|
||||||
},
|
|
||||||
"Ladeneinrichtung": {
|
|
||||||
"account_number": "0430",
|
|
||||||
"account_type": "Fixed Asset"
|
|
||||||
},
|
|
||||||
"Accumulated Depreciation": {
|
|
||||||
"account_type": "Accumulated Depreciation"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"B - Umlaufvermögen": {
|
|
||||||
"is_group": 1,
|
|
||||||
"I. Vorräte": {
|
|
||||||
"is_group": 1,
|
|
||||||
"Roh-, Hilfs- und Betriebsstoffe (Bestand)": {
|
|
||||||
"account_number": "3970",
|
|
||||||
"account_type": "Stock"
|
|
||||||
},
|
|
||||||
"Waren (Bestand)": {
|
|
||||||
"account_number": "3980",
|
|
||||||
"account_type": "Stock"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"II. Forderungen und sonstige Vermögensgegenstände": {
|
|
||||||
"is_group": 1,
|
|
||||||
"Forderungen aus Lieferungen und Leistungen mit Kontokorrent": {
|
|
||||||
"account_number": "1400",
|
|
||||||
"account_type": "Receivable",
|
|
||||||
"is_group": 1
|
|
||||||
},
|
|
||||||
"Forderungen aus Lieferungen und Leistungen ohne Kontokorrent": {
|
|
||||||
"account_number": "1410",
|
|
||||||
"account_type": "Receivable"
|
|
||||||
},
|
|
||||||
"Durchlaufende Posten": {
|
|
||||||
"account_number": "1590"
|
|
||||||
},
|
|
||||||
"Verrechnungskonto Gewinnermittlung § 4 Abs. 3 EStG, nicht ergebniswirksam": {
|
|
||||||
"account_number": "1371"
|
|
||||||
},
|
|
||||||
"Abziehbare Vorsteuer": {
|
|
||||||
"is_group": 1,
|
|
||||||
"Abziehbare Vorsteuer 7 %": {
|
|
||||||
"account_number": "1571",
|
|
||||||
"account_type": "Tax",
|
|
||||||
"tax_rate": 7.0
|
|
||||||
},
|
|
||||||
"Abziehbare Vorsteuer 19 %": {
|
|
||||||
"account_number": "1576",
|
|
||||||
"account_type": "Tax",
|
|
||||||
"tax_rate": 19.0
|
|
||||||
},
|
|
||||||
"Abziehbare Vorsteuer nach § 13b UStG 19 %": {
|
|
||||||
"account_number": "1577",
|
|
||||||
"account_type": "Tax",
|
|
||||||
"tax_rate": 19.0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"III. Wertpapiere": {
|
|
||||||
"is_group": 1,
|
|
||||||
"Anteile an verbundenen Unternehmen (Umlaufvermögen)": {
|
|
||||||
"account_number": "1340"
|
|
||||||
},
|
|
||||||
"Anteile an herrschender oder mit Mehrheit beteiligter Gesellschaft": {
|
|
||||||
"account_number": "1344"
|
|
||||||
},
|
|
||||||
"Sonstige Wertpapiere": {
|
|
||||||
"account_number": "1348"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"IV. Kassenbestand, Bundesbankguthaben, Guthaben bei Kreditinstituten und Schecks.": {
|
|
||||||
"is_group": 1,
|
|
||||||
"Kasse": {
|
|
||||||
"is_group": 1,
|
|
||||||
"account_type": "Cash",
|
|
||||||
"Kasse": {
|
|
||||||
"account_number": "1000",
|
|
||||||
"account_type": "Cash"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Bank": {
|
|
||||||
"is_group": 1,
|
|
||||||
"account_type": "Bank",
|
|
||||||
"Postbank": {
|
|
||||||
"account_number": "1100",
|
|
||||||
"account_type": "Bank"
|
|
||||||
},
|
|
||||||
"Bankkonto": {
|
|
||||||
"account_number": "1200",
|
|
||||||
"account_type": "Bank"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"C - Rechnungsabgrenzungsposten": {
|
|
||||||
"is_group": 1,
|
|
||||||
"Aktive Rechnungsabgrenzung": {
|
|
||||||
"account_number": "0980"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"D - Aktive latente Steuern": {
|
|
||||||
"is_group": 1,
|
|
||||||
"Aktive latente Steuern": {
|
|
||||||
"account_number": "0983"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"E - Aktiver Unterschiedsbetrag aus der Vermögensverrechnung": {
|
|
||||||
"is_group": 1
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Passiva": {
|
|
||||||
"is_group": 1,
|
|
||||||
"root_type": "Liability",
|
|
||||||
"A. Eigenkapital": {
|
|
||||||
"is_group": 1,
|
|
||||||
"I. Gezeichnetes Kapital": {
|
|
||||||
"is_group": 1
|
|
||||||
},
|
|
||||||
"II. Kapitalrücklage": {
|
|
||||||
"is_group": 1
|
|
||||||
},
|
|
||||||
"III. Gewinnrücklagen": {
|
|
||||||
"is_group": 1
|
|
||||||
},
|
|
||||||
"IV. Gewinnvortrag/Verlustvortrag": {
|
|
||||||
"is_group": 1
|
|
||||||
},
|
|
||||||
"V. Jahresüberschuß/Jahresfehlbetrag": {
|
|
||||||
"is_group": 1
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"B. Rückstellungen": {
|
|
||||||
"is_group": 1,
|
|
||||||
"I. Rückstellungen für Pensionen und ähnliche Verpflichtungen": {
|
|
||||||
"is_group": 1
|
|
||||||
},
|
|
||||||
"II. Steuerrückstellungen": {
|
|
||||||
"is_group": 1
|
|
||||||
},
|
|
||||||
"III. sonstige Rückstellungen": {
|
|
||||||
"is_group": 1
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"C. Verbindlichkeiten": {
|
|
||||||
"is_group": 1,
|
|
||||||
"I. Anleihen": {
|
|
||||||
"is_group": 1
|
|
||||||
},
|
|
||||||
"II. Verbindlichkeiten gegenüber Kreditinstituten": {
|
|
||||||
"is_group": 1
|
|
||||||
},
|
|
||||||
"III. Erhaltene Anzahlungen auf Bestellungen": {
|
|
||||||
"is_group": 1
|
|
||||||
},
|
|
||||||
"IV. Verbindlichkeiten aus Lieferungen und Leistungen": {
|
|
||||||
"is_group": 1,
|
|
||||||
"Verbindlichkeiten aus Lieferungen und Leistungen mit Kontokorrent": {
|
|
||||||
"account_number": "1600",
|
|
||||||
"account_type": "Payable",
|
|
||||||
"is_group": 1
|
|
||||||
},
|
|
||||||
"Verbindlichkeiten aus Lieferungen und Leistungen ohne Kontokorrent": {
|
|
||||||
"account_number": "1610",
|
|
||||||
"account_type": "Payable"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"V. Verbindlichkeiten aus der Annahme gezogener Wechsel und der Ausstellung eigener Wechsel": {
|
|
||||||
"is_group": 1
|
|
||||||
},
|
|
||||||
"VI. Verbindlichkeiten gegenüber verbundenen Unternehmen": {
|
|
||||||
"is_group": 1
|
|
||||||
},
|
|
||||||
"VII. Verbindlichkeiten gegenüber Unternehmen, mit denen ein Beteiligungsverhältnis besteht": {
|
|
||||||
"is_group": 1
|
|
||||||
},
|
|
||||||
"VIII. sonstige Verbindlichkeiten": {
|
|
||||||
"is_group": 1,
|
|
||||||
"Sonstige Verbindlichkeiten": {
|
|
||||||
"account_number": "1700",
|
|
||||||
"account_type": "Asset Received But Not Billed"
|
|
||||||
},
|
|
||||||
"Sonstige Verbindlichkeiten (1 bis 5 Jahre)": {
|
|
||||||
"account_number": "1702",
|
|
||||||
"account_type": "Stock Received But Not Billed"
|
|
||||||
},
|
|
||||||
"Verbindlichkeiten aus Lohn und Gehalt": {
|
|
||||||
"account_number": "1740",
|
|
||||||
"account_type": "Payable"
|
|
||||||
},
|
|
||||||
"Umsatzsteuer": {
|
|
||||||
"is_group": 1,
|
|
||||||
"Umsatzsteuer 7 %": {
|
|
||||||
"account_number": "1771",
|
|
||||||
"account_type": "Tax",
|
|
||||||
"tax_rate": 7.0
|
|
||||||
},
|
|
||||||
"Umsatzsteuer 19 %": {
|
|
||||||
"account_number": "1776",
|
|
||||||
"account_type": "Tax",
|
|
||||||
"tax_rate": 19.0
|
|
||||||
},
|
|
||||||
"Umsatzsteuer-Vorauszahlung": {
|
|
||||||
"account_number": "1780",
|
|
||||||
"account_type": "Tax"
|
|
||||||
},
|
|
||||||
"Umsatzsteuer-Vorauszahlung 1/11": {
|
|
||||||
"account_number": "1781"
|
|
||||||
},
|
|
||||||
"Umsatzsteuer nach § 13b UStG 19 %": {
|
|
||||||
"account_number": "1787",
|
|
||||||
"account_type": "Tax",
|
|
||||||
"tax_rate": 19.0
|
|
||||||
},
|
|
||||||
"Umsatzsteuer Vorjahr": {
|
|
||||||
"account_number": "1790"
|
|
||||||
},
|
|
||||||
"Umsatzsteuer frühere Jahre": {
|
|
||||||
"account_number": "1791"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"D. Rechnungsabgrenzungsposten": {
|
|
||||||
"is_group": 1,
|
|
||||||
"Passive Rechnungsabgrenzung": {
|
|
||||||
"account_number": "0990"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"E. Passive latente Steuern": {
|
|
||||||
"is_group": 1
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Erlöse u. Erträge 2/8": {
|
|
||||||
"is_group": 1,
|
|
||||||
"root_type": "Income",
|
|
||||||
"Erlöskonten 8": {
|
|
||||||
"is_group": 1,
|
|
||||||
"Erlöse": {
|
|
||||||
"account_number": "8200",
|
|
||||||
"account_type": "Income Account"
|
|
||||||
},
|
|
||||||
"Erlöse USt. 19 %": {
|
|
||||||
"account_number": "8400",
|
|
||||||
"account_type": "Income Account"
|
|
||||||
},
|
|
||||||
"Erlöse USt. 7 %": {
|
|
||||||
"account_number": "8300",
|
|
||||||
"account_type": "Income Account"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Ertragskonten 2": {
|
|
||||||
"is_group": 1,
|
|
||||||
"sonstige Zinsen und ähnliche Erträge": {
|
|
||||||
"account_number": "2650",
|
|
||||||
"account_type": "Income Account"
|
|
||||||
},
|
|
||||||
"Außerordentliche Erträge": {
|
|
||||||
"account_number": "2500",
|
|
||||||
"account_type": "Income Account"
|
|
||||||
},
|
|
||||||
"Sonstige Erträge": {
|
|
||||||
"account_number": "2700",
|
|
||||||
"account_type": "Income Account"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Aufwendungen 2/4": {
|
|
||||||
"is_group": 1,
|
|
||||||
"root_type": "Expense",
|
|
||||||
"Fremdleistungen": {
|
|
||||||
"account_number": "3100",
|
|
||||||
"account_type": "Expense Account"
|
|
||||||
},
|
|
||||||
"Fremdleistungen ohne Vorsteuer": {
|
|
||||||
"account_number": "3109",
|
|
||||||
"account_type": "Expense Account"
|
|
||||||
},
|
|
||||||
"Bauleistungen eines im Inland ansässigen Unternehmers 19 % Vorsteuer und 19 % Umsatzsteuer": {
|
|
||||||
"account_number": "3120",
|
|
||||||
"account_type": "Expense Account"
|
|
||||||
},
|
|
||||||
"Wareneingang": {
|
|
||||||
"account_number": "3200"
|
|
||||||
},
|
|
||||||
"Bezugsnebenkosten": {
|
|
||||||
"account_number": "3800",
|
|
||||||
"account_type": "Expenses Included In Asset Valuation"
|
|
||||||
},
|
|
||||||
"Herstellungskosten": {
|
|
||||||
"account_number": "4996",
|
|
||||||
"account_type": "Cost of Goods Sold"
|
|
||||||
},
|
|
||||||
"Verluste aus dem Abgang von Gegenständen des Anlagevermögens": {
|
|
||||||
"account_number": "2320",
|
|
||||||
"account_type": "Stock Adjustment"
|
|
||||||
},
|
|
||||||
"Verwaltungskosten": {
|
|
||||||
"account_number": "4997",
|
|
||||||
"account_type": "Expenses Included In Valuation"
|
|
||||||
},
|
|
||||||
"Vertriebskosten": {
|
|
||||||
"account_number": "4998",
|
|
||||||
"account_type": "Expenses Included In Valuation"
|
|
||||||
},
|
|
||||||
"Gegenkonto 4996-4998": {
|
|
||||||
"account_number": "4999"
|
|
||||||
},
|
|
||||||
"Abschreibungen": {
|
|
||||||
"is_group": 1,
|
|
||||||
"Abschreibungen auf Sachanlagen (ohne AfA auf Kfz und Gebäude)": {
|
|
||||||
"account_number": "4830",
|
|
||||||
"account_type": "Accumulated Depreciation"
|
|
||||||
},
|
|
||||||
"Abschreibungen auf Gebäude": {
|
|
||||||
"account_number": "4831",
|
|
||||||
"account_type": "Depreciation"
|
|
||||||
},
|
|
||||||
"Abschreibungen auf Kfz": {
|
|
||||||
"account_number": "4832",
|
|
||||||
"account_type": "Depreciation"
|
|
||||||
},
|
|
||||||
"Sofortabschreibung GWG": {
|
|
||||||
"account_number": "4855",
|
|
||||||
"account_type": "Expense Account"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Kfz-Kosten": {
|
|
||||||
"is_group": 1,
|
|
||||||
"Kfz-Steuer": {
|
|
||||||
"account_number": "4510",
|
|
||||||
"account_type": "Expense Account"
|
|
||||||
},
|
|
||||||
"Kfz-Versicherungen": {
|
|
||||||
"account_number": "4520",
|
|
||||||
"account_type": "Expense Account"
|
|
||||||
},
|
|
||||||
"laufende Kfz-Betriebskosten": {
|
|
||||||
"account_number": "4530",
|
|
||||||
"account_type": "Expense Account"
|
|
||||||
},
|
|
||||||
"Kfz-Reparaturen": {
|
|
||||||
"account_number": "4540",
|
|
||||||
"account_type": "Expense Account"
|
|
||||||
},
|
|
||||||
"Fremdfahrzeuge": {
|
|
||||||
"account_number": "4570",
|
|
||||||
"account_type": "Expense Account"
|
|
||||||
},
|
|
||||||
"sonstige Kfz-Kosten": {
|
|
||||||
"account_number": "4580",
|
|
||||||
"account_type": "Expense Account"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Personalkosten": {
|
|
||||||
"is_group": 1,
|
|
||||||
"Gehälter": {
|
|
||||||
"account_number": "4120",
|
|
||||||
"account_type": "Expense Account"
|
|
||||||
},
|
|
||||||
"gesetzliche soziale Aufwendungen": {
|
|
||||||
"account_number": "4130",
|
|
||||||
"account_type": "Expense Account"
|
|
||||||
},
|
|
||||||
"Aufwendungen für Altersvorsorge": {
|
|
||||||
"account_number": "4165",
|
|
||||||
"account_type": "Expense Account"
|
|
||||||
},
|
|
||||||
"Vermögenswirksame Leistungen": {
|
|
||||||
"account_number": "4170",
|
|
||||||
"account_type": "Expense Account"
|
|
||||||
},
|
|
||||||
"Aushilfslöhne": {
|
|
||||||
"account_number": "4190",
|
|
||||||
"account_type": "Expense Account"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Raumkosten": {
|
|
||||||
"is_group": 1,
|
|
||||||
"Miete und Nebenkosten": {
|
|
||||||
"account_number": "4210",
|
|
||||||
"account_type": "Expense Account"
|
|
||||||
},
|
|
||||||
"Gas, Wasser, Strom (Verwaltung, Vertrieb)": {
|
|
||||||
"account_number": "4240",
|
|
||||||
"account_type": "Expense Account"
|
|
||||||
},
|
|
||||||
"Reinigung": {
|
|
||||||
"account_number": "4250",
|
|
||||||
"account_type": "Expense Account"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Reparatur/Instandhaltung": {
|
|
||||||
"is_group": 1,
|
|
||||||
"Reparaturen und Instandhaltungen von anderen Anlagen und Betriebs- und Geschäftsausstattung": {
|
|
||||||
"account_number": "4805",
|
|
||||||
"account_type": "Expense Account"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Versicherungsbeiträge": {
|
|
||||||
"is_group": 1,
|
|
||||||
"Versicherungen": {
|
|
||||||
"account_number": "4360",
|
|
||||||
"account_type": "Expense Account"
|
|
||||||
},
|
|
||||||
"Beiträge": {
|
|
||||||
"account_number": "4380",
|
|
||||||
"account_type": "Expense Account"
|
|
||||||
},
|
|
||||||
"sonstige Ausgaben": {
|
|
||||||
"account_number": "4390",
|
|
||||||
"account_type": "Expense Account"
|
|
||||||
},
|
|
||||||
"steuerlich abzugsfähige Verspätungszuschläge und Zwangsgelder": {
|
|
||||||
"account_number": "4396",
|
|
||||||
"account_type": "Expense Account"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Werbe-/Reisekosten": {
|
|
||||||
"is_group": 1,
|
|
||||||
"Werbekosten": {
|
|
||||||
"account_number": "4610",
|
|
||||||
"account_type": "Expense Account"
|
|
||||||
},
|
|
||||||
"Aufmerksamkeiten": {
|
|
||||||
"account_number": "4653",
|
|
||||||
"account_type": "Expense Account"
|
|
||||||
},
|
|
||||||
"nicht abzugsfähige Betriebsausg. aus Werbe-, Repräs.- u. Reisekosten": {
|
|
||||||
"account_number": "4665",
|
|
||||||
"account_type": "Expense Account"
|
|
||||||
},
|
|
||||||
"Reisekosten Unternehmer": {
|
|
||||||
"account_number": "4670",
|
|
||||||
"account_type": "Expense Account"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"verschiedene Kosten": {
|
|
||||||
"is_group": 1,
|
|
||||||
"Porto": {
|
|
||||||
"account_number": "4910",
|
|
||||||
"account_type": "Expense Account"
|
|
||||||
},
|
|
||||||
"Telekom": {
|
|
||||||
"account_number": "4920",
|
|
||||||
"account_type": "Expense Account"
|
|
||||||
},
|
|
||||||
"Mobilfunk D2": {
|
|
||||||
"account_number": "4921",
|
|
||||||
"account_type": "Expense Account"
|
|
||||||
},
|
|
||||||
"Internet": {
|
|
||||||
"account_number": "4922",
|
|
||||||
"account_type": "Expense Account"
|
|
||||||
},
|
|
||||||
"Bürobedarf": {
|
|
||||||
"account_number": "4930",
|
|
||||||
"account_type": "Expense Account"
|
|
||||||
},
|
|
||||||
"Zeitschriften, Bücher": {
|
|
||||||
"account_number": "4940",
|
|
||||||
"account_type": "Expense Account"
|
|
||||||
},
|
|
||||||
"Fortbildungskosten": {
|
|
||||||
"account_number": "4945",
|
|
||||||
"account_type": "Expense Account"
|
|
||||||
},
|
|
||||||
"Buchführungskosten": {
|
|
||||||
"account_number": "4955",
|
|
||||||
"account_type": "Expense Account"
|
|
||||||
},
|
|
||||||
"Abschluß- u. Prüfungskosten": {
|
|
||||||
"account_number": "4957",
|
|
||||||
"account_type": "Expense Account"
|
|
||||||
},
|
|
||||||
"Nebenkosten des Geldverkehrs": {
|
|
||||||
"account_number": "4970",
|
|
||||||
"account_type": "Expense Account"
|
|
||||||
},
|
|
||||||
"Werkzeuge und Kleingeräte": {
|
|
||||||
"account_number": "4985",
|
|
||||||
"account_type": "Expense Account"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Zinsaufwendungen": {
|
|
||||||
"is_group": 1,
|
|
||||||
"Zinsaufwendungen für kurzfristige Verbindlichkeiten": {
|
|
||||||
"account_number": "2110",
|
|
||||||
"account_type": "Expense Account"
|
|
||||||
},
|
|
||||||
"Zinsaufwendungen für KFZ Finanzierung": {
|
|
||||||
"account_number": "2121",
|
|
||||||
"account_type": "Expense Account"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Anfangsbestand 9": {
|
|
||||||
"is_group": 1,
|
|
||||||
"root_type": "Equity",
|
|
||||||
"Saldenvortragskonten": {
|
|
||||||
"is_group": 1,
|
|
||||||
"Saldenvortrag Sachkonten": {
|
|
||||||
"account_number": "9000"
|
|
||||||
},
|
|
||||||
"Saldenvorträge Debitoren": {
|
|
||||||
"account_number": "9008"
|
|
||||||
},
|
|
||||||
"Saldenvorträge Kreditoren": {
|
|
||||||
"account_number": "9009"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Privatkonten 1": {
|
|
||||||
"is_group": 1,
|
|
||||||
"root_type": "Equity",
|
|
||||||
"Privatentnahmen/-einlagen": {
|
|
||||||
"is_group": 1,
|
|
||||||
"Privatentnahme allgemein": {
|
|
||||||
"account_number": "1800"
|
|
||||||
},
|
|
||||||
"Privatsteuern": {
|
|
||||||
"account_number": "1810"
|
|
||||||
},
|
|
||||||
"Sonderausgaben beschränkt abzugsfähig": {
|
|
||||||
"account_number": "1820"
|
|
||||||
},
|
|
||||||
"Sonderausgaben unbeschränkt abzugsfähig": {
|
|
||||||
"account_number": "1830"
|
|
||||||
},
|
|
||||||
"Außergewöhnliche Belastungen": {
|
|
||||||
"account_number": "1850"
|
|
||||||
},
|
|
||||||
"Privateinlagen": {
|
|
||||||
"account_number": "1890"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,531 @@
|
|||||||
|
{
|
||||||
|
"country_code": "de",
|
||||||
|
"name": "SKR03 mit Kontonummern",
|
||||||
|
"tree": {
|
||||||
|
"Aktiva": {
|
||||||
|
"is_group": 1,
|
||||||
|
"root_type": "Asset",
|
||||||
|
"A - Anlagevermögen": {
|
||||||
|
"is_group": 1,
|
||||||
|
"EDV-Software": {
|
||||||
|
"account_number": "0027",
|
||||||
|
"account_type": "Fixed Asset"
|
||||||
|
},
|
||||||
|
"Gesch\u00e4ftsausstattung": {
|
||||||
|
"account_number": "0410",
|
||||||
|
"account_type": "Fixed Asset"
|
||||||
|
},
|
||||||
|
"B\u00fcroeinrichtung": {
|
||||||
|
"account_number": "0420",
|
||||||
|
"account_type": "Fixed Asset"
|
||||||
|
},
|
||||||
|
"Darlehen": {
|
||||||
|
"account_number": "0565"
|
||||||
|
},
|
||||||
|
"Maschinen": {
|
||||||
|
"account_number": "0210",
|
||||||
|
"account_type": "Fixed Asset"
|
||||||
|
},
|
||||||
|
"Betriebsausstattung": {
|
||||||
|
"account_number": "0400",
|
||||||
|
"account_type": "Fixed Asset"
|
||||||
|
},
|
||||||
|
"Ladeneinrichtung": {
|
||||||
|
"account_number": "0430",
|
||||||
|
"account_type": "Fixed Asset"
|
||||||
|
},
|
||||||
|
"Accumulated Depreciation": {
|
||||||
|
"account_type": "Accumulated Depreciation"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"B - Umlaufvermögen": {
|
||||||
|
"is_group": 1,
|
||||||
|
"I. Vorräte": {
|
||||||
|
"is_group": 1,
|
||||||
|
"Roh-, Hilfs- und Betriebsstoffe (Bestand)": {
|
||||||
|
"account_number": "3970",
|
||||||
|
"account_type": "Stock"
|
||||||
|
},
|
||||||
|
"Waren (Bestand)": {
|
||||||
|
"account_number": "3980",
|
||||||
|
"account_type": "Stock"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"II. Forderungen und sonstige Vermögensgegenstände": {
|
||||||
|
"is_group": 1,
|
||||||
|
"Ford. a. Lieferungen und Leistungen": {
|
||||||
|
"account_number": "1400",
|
||||||
|
"account_type": "Receivable"
|
||||||
|
},
|
||||||
|
"Durchlaufende Posten": {
|
||||||
|
"account_number": "1590"
|
||||||
|
},
|
||||||
|
"Gewinnermittlung \u00a74/3 nicht Ergebniswirksam": {
|
||||||
|
"account_number": "1371"
|
||||||
|
},
|
||||||
|
"Abziehbare Vorsteuer": {
|
||||||
|
"account_type": "Tax",
|
||||||
|
"is_group": 1,
|
||||||
|
"Abziehbare Vorsteuer 7%": {
|
||||||
|
"account_number": "1571"
|
||||||
|
},
|
||||||
|
"Abziehbare Vorsteuer 19%": {
|
||||||
|
"account_number": "1576"
|
||||||
|
},
|
||||||
|
"Abziehbare Vorsteuer nach \u00a713b UStG 19%": {
|
||||||
|
"account_number": "1577"
|
||||||
|
},
|
||||||
|
"Leistungen \u00a713b UStG 19% Vorsteuer, 19% Umsatzsteuer": {
|
||||||
|
"account_number": "3120"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"III. Wertpapiere": {
|
||||||
|
"is_group": 1
|
||||||
|
},
|
||||||
|
"IV. Kassenbestand, Bundesbankguthaben, Guthaben bei Kreditinstituten und Schecks.": {
|
||||||
|
"is_group": 1,
|
||||||
|
"Kasse": {
|
||||||
|
"account_type": "Cash",
|
||||||
|
"is_group": 1,
|
||||||
|
"Kasse": {
|
||||||
|
"is_group": 1,
|
||||||
|
"account_number": "1000",
|
||||||
|
"account_type": "Cash"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Bank": {
|
||||||
|
"is_group": 1,
|
||||||
|
"account_type": "Bank",
|
||||||
|
"Postbank": {
|
||||||
|
"account_number": "1100",
|
||||||
|
"account_type": "Bank"
|
||||||
|
},
|
||||||
|
"Bankkonto": {
|
||||||
|
"account_number": "1200",
|
||||||
|
"account_type": "Bank"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"C - Rechnungsabgrenzungsposten": {
|
||||||
|
"is_group": 1,
|
||||||
|
"Aktive Rechnungsabgrenzung": {
|
||||||
|
"account_number": "0980"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"D - Aktive latente Steuern": {
|
||||||
|
"is_group": 1,
|
||||||
|
"Aktive latente Steuern": {
|
||||||
|
"account_number": "0983"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"E - Aktiver Unterschiedsbetrag aus der Vermögensverrechnung": {
|
||||||
|
"is_group": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Passiva": {
|
||||||
|
"is_group": 1,
|
||||||
|
"root_type": "Liability",
|
||||||
|
"A. Eigenkapital": {
|
||||||
|
"is_group": 1,
|
||||||
|
"I. Gezeichnetes Kapital": {
|
||||||
|
"is_group": 1
|
||||||
|
},
|
||||||
|
"II. Kapitalrücklage": {
|
||||||
|
"is_group": 1
|
||||||
|
},
|
||||||
|
"III. Gewinnrücklagen": {
|
||||||
|
"is_group": 1
|
||||||
|
},
|
||||||
|
"IV. Gewinnvortrag/Verlustvortrag": {
|
||||||
|
"is_group": 1
|
||||||
|
},
|
||||||
|
"V. Jahresüberschuß/Jahresfehlbetrag": {
|
||||||
|
"is_group": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"B. Rückstellungen": {
|
||||||
|
"is_group": 1,
|
||||||
|
"I. Rückstellungen für Pensionen und ähnliche Verpflichtungen": {
|
||||||
|
"is_group": 1
|
||||||
|
},
|
||||||
|
"II. Steuerrückstellungen": {
|
||||||
|
"is_group": 1
|
||||||
|
},
|
||||||
|
"III. sonstige Rückstellungen": {
|
||||||
|
"is_group": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"C. Verbindlichkeiten": {
|
||||||
|
"is_group": 1,
|
||||||
|
"I. Anleihen": {
|
||||||
|
"is_group": 1
|
||||||
|
},
|
||||||
|
"II. Verbindlichkeiten gegenüber Kreditinstituten": {
|
||||||
|
"is_group": 1
|
||||||
|
},
|
||||||
|
"III. Erhaltene Anzahlungen auf Bestellungen": {
|
||||||
|
"is_group": 1
|
||||||
|
},
|
||||||
|
"IV. Verbindlichkeiten aus Lieferungen und Leistungen": {
|
||||||
|
"is_group": 1,
|
||||||
|
"Verbindlichkeiten aus Lieferungen u. Leistungen": {
|
||||||
|
"account_number": "1600",
|
||||||
|
"account_type": "Payable"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"V. Verbindlichkeiten aus der Annahme gezogener Wechsel und der Ausstellung eigener Wechsel": {
|
||||||
|
"is_group": 1
|
||||||
|
},
|
||||||
|
"VI. Verbindlichkeiten gegenüber verbundenen Unternehmen": {
|
||||||
|
"is_group": 1
|
||||||
|
},
|
||||||
|
"VII. Verbindlichkeiten gegenüber Unternehmen, mit denen ein Beteiligungsverhältnis besteht": {
|
||||||
|
"is_group": 1
|
||||||
|
},
|
||||||
|
"VIII. sonstige Verbindlichkeiten": {
|
||||||
|
"is_group": 1,
|
||||||
|
"Sonstige Verbindlichkeiten": {
|
||||||
|
"account_number": "1700",
|
||||||
|
"account_type": "Asset Received But Not Billed"
|
||||||
|
},
|
||||||
|
"Sonstige Verbindlichkeiten (1 bis 5 Jahre)": {
|
||||||
|
"account_number": "1702",
|
||||||
|
"account_type": "Stock Received But Not Billed"
|
||||||
|
},
|
||||||
|
"Verbindlichkeiten aus Lohn und Gehalt": {
|
||||||
|
"account_number": "1740",
|
||||||
|
"account_type": "Payable"
|
||||||
|
},
|
||||||
|
"Umsatzsteuer": {
|
||||||
|
"is_group": 1,
|
||||||
|
"account_type": "Tax",
|
||||||
|
"Umsatzsteuer 7%": {
|
||||||
|
"account_number": "1771"
|
||||||
|
},
|
||||||
|
"Umsatzsteuer 19%": {
|
||||||
|
"account_number": "1776"
|
||||||
|
},
|
||||||
|
"Umsatzsteuer-Vorauszahlung": {
|
||||||
|
"account_number": "1780"
|
||||||
|
},
|
||||||
|
"Umsatzsteuer-Vorauszahlung 1/11": {
|
||||||
|
"account_number": "1781"
|
||||||
|
},
|
||||||
|
"Umsatzsteuer \u00a7 13b UStG 19%": {
|
||||||
|
"account_number": "1787"
|
||||||
|
},
|
||||||
|
"Umsatzsteuer Vorjahr": {
|
||||||
|
"account_number": "1790"
|
||||||
|
},
|
||||||
|
"Umsatzsteuer fr\u00fchere Jahre": {
|
||||||
|
"account_number": "1791"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"D. Rechnungsabgrenzungsposten": {
|
||||||
|
"is_group": 1,
|
||||||
|
"Passive Rechnungsabgrenzung": {
|
||||||
|
"account_number": "0990"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"E. Passive latente Steuern": {
|
||||||
|
"is_group": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Erl\u00f6se u. Ertr\u00e4ge 2/8": {
|
||||||
|
"is_group": 1,
|
||||||
|
"root_type": "Income",
|
||||||
|
"Erl\u00f6skonten 8": {
|
||||||
|
"is_group": 1,
|
||||||
|
"Erl\u00f6se": {
|
||||||
|
"account_number": "8200",
|
||||||
|
"account_type": "Income Account"
|
||||||
|
},
|
||||||
|
"Erl\u00f6se USt. 19%": {
|
||||||
|
"account_number": "8400",
|
||||||
|
"account_type": "Income Account"
|
||||||
|
},
|
||||||
|
"Erl\u00f6se USt. 7%": {
|
||||||
|
"account_number": "8300",
|
||||||
|
"account_type": "Income Account"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Ertragskonten 2": {
|
||||||
|
"is_group": 1,
|
||||||
|
"sonstige Zinsen und \u00e4hnliche Ertr\u00e4ge": {
|
||||||
|
"account_number": "2650",
|
||||||
|
"account_type": "Income Account"
|
||||||
|
},
|
||||||
|
"Au\u00dferordentliche Ertr\u00e4ge": {
|
||||||
|
"account_number": "2500",
|
||||||
|
"account_type": "Income Account"
|
||||||
|
},
|
||||||
|
"Sonstige Ertr\u00e4ge": {
|
||||||
|
"account_number": "2700",
|
||||||
|
"account_type": "Income Account"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Aufwendungen 2/4": {
|
||||||
|
"is_group": 1,
|
||||||
|
"root_type": "Expense",
|
||||||
|
"Wareneingang": {
|
||||||
|
"account_number": "3200"
|
||||||
|
},
|
||||||
|
"Bezugsnebenkosten": {
|
||||||
|
"account_number": "3800",
|
||||||
|
"account_type": "Expenses Included In Asset Valuation"
|
||||||
|
},
|
||||||
|
"Herstellungskosten": {
|
||||||
|
"account_number": "4996",
|
||||||
|
"account_type": "Cost of Goods Sold"
|
||||||
|
},
|
||||||
|
"Verluste aus dem Abgang von Gegenständen des Anlagevermögens": {
|
||||||
|
"account_number": "2320",
|
||||||
|
"account_type": "Stock Adjustment"
|
||||||
|
},
|
||||||
|
"Verwaltungskosten": {
|
||||||
|
"account_number": "4997",
|
||||||
|
"account_type": "Expenses Included In Valuation"
|
||||||
|
},
|
||||||
|
"Vertriebskosten": {
|
||||||
|
"account_number": "4998",
|
||||||
|
"account_type": "Expenses Included In Valuation"
|
||||||
|
},
|
||||||
|
"Gegenkonto 4996-4998": {
|
||||||
|
"account_number": "4999"
|
||||||
|
},
|
||||||
|
"Abschreibungen": {
|
||||||
|
"is_group": 1,
|
||||||
|
"Abschreibungen auf Sachanlagen (ohne AfA auf Kfz und Gebäude)": {
|
||||||
|
"account_number": "4830",
|
||||||
|
"account_type": "Accumulated Depreciation"
|
||||||
|
},
|
||||||
|
"Abschreibungen auf Gebäude": {
|
||||||
|
"account_number": "4831",
|
||||||
|
"account_type": "Depreciation"
|
||||||
|
},
|
||||||
|
"Abschreibungen auf Kfz": {
|
||||||
|
"account_number": "4832",
|
||||||
|
"account_type": "Depreciation"
|
||||||
|
},
|
||||||
|
"Sofortabschreibung GWG": {
|
||||||
|
"account_number": "4855",
|
||||||
|
"account_type": "Expense Account"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Kfz-Kosten": {
|
||||||
|
"is_group": 1,
|
||||||
|
"Kfz-Steuer": {
|
||||||
|
"account_number": "4510",
|
||||||
|
"account_type": "Expense Account"
|
||||||
|
},
|
||||||
|
"Kfz-Versicherungen": {
|
||||||
|
"account_number": "4520",
|
||||||
|
"account_type": "Expense Account"
|
||||||
|
},
|
||||||
|
"laufende Kfz-Betriebskosten": {
|
||||||
|
"account_number": "4530",
|
||||||
|
"account_type": "Expense Account"
|
||||||
|
},
|
||||||
|
"Kfz-Reparaturen": {
|
||||||
|
"account_number": "4540",
|
||||||
|
"account_type": "Expense Account"
|
||||||
|
},
|
||||||
|
"Fremdfahrzeuge": {
|
||||||
|
"account_number": "4570",
|
||||||
|
"account_type": "Expense Account"
|
||||||
|
},
|
||||||
|
"sonstige Kfz-Kosten": {
|
||||||
|
"account_number": "4580",
|
||||||
|
"account_type": "Expense Account"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Personalkosten": {
|
||||||
|
"is_group": 1,
|
||||||
|
"Geh\u00e4lter": {
|
||||||
|
"account_number": "4120",
|
||||||
|
"account_type": "Expense Account"
|
||||||
|
},
|
||||||
|
"gesetzliche soziale Aufwendungen": {
|
||||||
|
"account_number": "4130",
|
||||||
|
"account_type": "Expense Account"
|
||||||
|
},
|
||||||
|
"Aufwendungen f\u00fcr Altersvorsorge": {
|
||||||
|
"account_number": "4165",
|
||||||
|
"account_type": "Expense Account"
|
||||||
|
},
|
||||||
|
"Verm\u00f6genswirksame Leistungen": {
|
||||||
|
"account_number": "4170",
|
||||||
|
"account_type": "Expense Account"
|
||||||
|
},
|
||||||
|
"Aushilfsl\u00f6hne": {
|
||||||
|
"account_number": "4190",
|
||||||
|
"account_type": "Expense Account"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Raumkosten": {
|
||||||
|
"is_group": 1,
|
||||||
|
"Miete und Nebenkosten": {
|
||||||
|
"account_number": "4210",
|
||||||
|
"account_type": "Expense Account"
|
||||||
|
},
|
||||||
|
"Gas, Wasser, Strom (Verwaltung, Vertrieb)": {
|
||||||
|
"account_number": "4240",
|
||||||
|
"account_type": "Expense Account"
|
||||||
|
},
|
||||||
|
"Reinigung": {
|
||||||
|
"account_number": "4250",
|
||||||
|
"account_type": "Expense Account"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Reparatur/Instandhaltung": {
|
||||||
|
"is_group": 1,
|
||||||
|
"Reparatur u. Instandh. von Anlagen/Maschinen u. Betriebs- u. Gesch\u00e4ftsausst.": {
|
||||||
|
"account_number": "4805",
|
||||||
|
"account_type": "Expense Account"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Versicherungsbeitr\u00e4ge": {
|
||||||
|
"is_group": 1,
|
||||||
|
"Versicherungen": {
|
||||||
|
"account_number": "4360",
|
||||||
|
"account_type": "Expense Account"
|
||||||
|
},
|
||||||
|
"Beitr\u00e4ge": {
|
||||||
|
"account_number": "4380",
|
||||||
|
"account_type": "Expense Account"
|
||||||
|
},
|
||||||
|
"sonstige Ausgaben": {
|
||||||
|
"account_number": "4390",
|
||||||
|
"account_type": "Expense Account"
|
||||||
|
},
|
||||||
|
"steuerlich abzugsf\u00e4hige Versp\u00e4tungszuschl\u00e4ge und Zwangsgelder": {
|
||||||
|
"account_number": "4396",
|
||||||
|
"account_type": "Expense Account"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Werbe-/Reisekosten": {
|
||||||
|
"is_group": 1,
|
||||||
|
"Werbekosten": {
|
||||||
|
"account_number": "4610",
|
||||||
|
"account_type": "Expense Account"
|
||||||
|
},
|
||||||
|
"Aufmerksamkeiten": {
|
||||||
|
"account_number": "4653",
|
||||||
|
"account_type": "Expense Account"
|
||||||
|
},
|
||||||
|
"nicht abzugsf\u00e4hige Betriebsausg. aus Werbe-, Repr\u00e4s.- u. Reisekosten": {
|
||||||
|
"account_number": "4665",
|
||||||
|
"account_type": "Expense Account"
|
||||||
|
},
|
||||||
|
"Reisekosten Unternehmer": {
|
||||||
|
"account_number": "4670",
|
||||||
|
"account_type": "Expense Account"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"verschiedene Kosten": {
|
||||||
|
"is_group": 1,
|
||||||
|
"Porto": {
|
||||||
|
"account_number": "4910",
|
||||||
|
"account_type": "Expense Account"
|
||||||
|
},
|
||||||
|
"Telekom": {
|
||||||
|
"account_number": "4920",
|
||||||
|
"account_type": "Expense Account"
|
||||||
|
},
|
||||||
|
"Mobilfunk D2": {
|
||||||
|
"account_number": "4921",
|
||||||
|
"account_type": "Expense Account"
|
||||||
|
},
|
||||||
|
"Internet": {
|
||||||
|
"account_number": "4922",
|
||||||
|
"account_type": "Expense Account"
|
||||||
|
},
|
||||||
|
"B\u00fcrobedarf": {
|
||||||
|
"account_number": "4930",
|
||||||
|
"account_type": "Expense Account"
|
||||||
|
},
|
||||||
|
"Zeitschriften, B\u00fccher": {
|
||||||
|
"account_number": "4940",
|
||||||
|
"account_type": "Expense Account"
|
||||||
|
},
|
||||||
|
"Fortbildungskosten": {
|
||||||
|
"account_number": "4945",
|
||||||
|
"account_type": "Expense Account"
|
||||||
|
},
|
||||||
|
"Buchf\u00fchrungskosten": {
|
||||||
|
"account_number": "4955",
|
||||||
|
"account_type": "Expense Account"
|
||||||
|
},
|
||||||
|
"Abschlu\u00df- u. Pr\u00fcfungskosten": {
|
||||||
|
"account_number": "4957",
|
||||||
|
"account_type": "Expense Account"
|
||||||
|
},
|
||||||
|
"Nebenkosten des Geldverkehrs": {
|
||||||
|
"account_number": "4970",
|
||||||
|
"account_type": "Expense Account"
|
||||||
|
},
|
||||||
|
"Werkzeuge und Kleinger\u00e4te": {
|
||||||
|
"account_number": "4985",
|
||||||
|
"account_type": "Expense Account"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Zinsaufwendungen": {
|
||||||
|
"is_group": 1,
|
||||||
|
"Zinsaufwendungen f\u00fcr kurzfristige Verbindlichkeiten": {
|
||||||
|
"account_number": "2110",
|
||||||
|
"account_type": "Expense Account"
|
||||||
|
},
|
||||||
|
"Zinsaufwendungen f\u00fcr KFZ Finanzierung": {
|
||||||
|
"account_number": "2121",
|
||||||
|
"account_type": "Expense Account"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Anfangsbestand 9": {
|
||||||
|
"is_group": 1,
|
||||||
|
"root_type": "Equity",
|
||||||
|
"Saldenvortragskonten": {
|
||||||
|
"is_group": 1,
|
||||||
|
"Saldenvortrag Sachkonten": {
|
||||||
|
"account_number": "9000"
|
||||||
|
},
|
||||||
|
"Saldenvortr\u00e4ge Debitoren": {
|
||||||
|
"account_number": "9008"
|
||||||
|
},
|
||||||
|
"Saldenvortr\u00e4ge Kreditoren": {
|
||||||
|
"account_number": "9009"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Privatkonten 1": {
|
||||||
|
"is_group": 1,
|
||||||
|
"root_type": "Equity",
|
||||||
|
"Privatentnahmen/-einlagen": {
|
||||||
|
"is_group": 1,
|
||||||
|
"Privatentnahme allgemein": {
|
||||||
|
"account_number": "1800"
|
||||||
|
},
|
||||||
|
"Privatsteuern": {
|
||||||
|
"account_number": "1810"
|
||||||
|
},
|
||||||
|
"Sonderausgaben beschr\u00e4nkt abzugsf\u00e4hig": {
|
||||||
|
"account_number": "1820"
|
||||||
|
},
|
||||||
|
"Sonderausgaben unbeschr\u00e4nkt abzugsf\u00e4hig": {
|
||||||
|
"account_number": "1830"
|
||||||
|
},
|
||||||
|
"Au\u00dfergew\u00f6hnliche Belastungen": {
|
||||||
|
"account_number": "1850"
|
||||||
|
},
|
||||||
|
"Privateinlagen": {
|
||||||
|
"account_number": "1890"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1525,8 +1525,7 @@
|
|||||||
"41-Clients et comptes rattach\u00e9s (PASSIF)": {
|
"41-Clients et comptes rattach\u00e9s (PASSIF)": {
|
||||||
"Clients cr\u00e9diteurs": {
|
"Clients cr\u00e9diteurs": {
|
||||||
"Clients - Avances et acomptes re\u00e7us sur commandes": {
|
"Clients - Avances et acomptes re\u00e7us sur commandes": {
|
||||||
"account_number": "4191",
|
"account_number": "4191"
|
||||||
"account_type": "Income Account"
|
|
||||||
},
|
},
|
||||||
"Clients - Dettes pour emballages et mat\u00e9riels consign\u00e9s": {
|
"Clients - Dettes pour emballages et mat\u00e9riels consign\u00e9s": {
|
||||||
"account_number": "4196"
|
"account_number": "4196"
|
||||||
@@ -3142,4 +3141,4 @@
|
|||||||
"account_number": "7"
|
"account_number": "7"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user