Compare commits

..

40 Commits

Author SHA1 Message Date
Anand Doshi
574415b59b Merge branch 'develop' 2016-01-06 18:56:03 +05:30
Anand Doshi
0eee6bbf7e bumped to version 6.16.3 2016-01-06 19:26:03 +06:00
Anand Doshi
ed72a28e41 [minor] patch for billed in DN and PR 2016-01-06 18:53:12 +05:30
Anand Doshi
4e0908d055 [change-log] 2016-01-06 18:23:25 +05:30
Anand Doshi
3c2ffde95b Merge pull request #4573 from anandpdoshi/fix/stock-entry-calculate-amount-in-js
[fix] Stock Entry: calculate amount in javascript
2016-01-06 18:04:53 +05:30
Anand Doshi
2c021dcdcd [fix] Stock Entry: calculate amount in javascript 2016-01-06 17:47:39 +05:30
Rushabh Mehta
1ee5ae1e25 [fix] [minor] don't show cancelled sales orders 2016-01-06 16:47:18 +05:30
Anand Doshi
0aadb9e213 Merge pull request #4584 from nabinhait/last_pur_rate
Get last purchase rate button in Purchase Order
2016-01-06 16:33:07 +05:30
Anand Doshi
a0693983cc Merge branch 'nabinhait-billing_status' into develop 2016-01-06 16:32:19 +05:30
Anand Doshi
6b71ef5843 [refactor] changed set_modified, change_modified to update_modified like in the framework 2016-01-06 16:32:06 +05:30
Nabin Hait
602683fdc0 Get last purchase rate button in Purchase Order 2016-01-06 16:03:58 +05:30
Nabin Hait
1eea26fc5c [patch] Update billing status in Delivery Note and Purchase Receipt 2016-01-06 15:42:44 +05:30
Nabin Hait
c040075bd4 [patch] Update billing status in Delivery Note and Purchase Receipt 2016-01-06 15:42:44 +05:30
Nabin Hait
a2afb16f6b [testcase] Billing status in Purchase Receipt 2016-01-06 15:42:44 +05:30
Nabin Hait
bdab0eea0f Billing status in Purchase Receipt 2016-01-06 15:42:43 +05:30
Nabin Hait
ba5d6b5004 [test-case] for billing status in DN 2016-01-06 15:42:27 +05:30
Nabin Hait
5b13b99441 Update billing status in Delivery Note if directly invoiced against SO 2016-01-06 15:42:27 +05:30
Anand Doshi
a3e87c7af1 Merge branch 'umairsy-develop' into develop 2016-01-06 15:06:27 +05:30
Umair Sayyed
31e2a709d5 updated articles in Accounts 2016-01-06 15:06:11 +05:30
Umair Sayyed
e083cde3d7 updated articles 2016-01-06 15:05:31 +05:30
Anand Doshi
09fc4a456e Merge pull request #4582 from nabinhait/develop
Chart of accounts added for Singapore and some other fixes
2016-01-06 15:01:49 +05:30
Anand Doshi
4774c41958 [fix] validate_multi_currency 2016-01-06 14:16:10 +05:30
Anand Doshi
03e7e581d8 [minor] removed Communication table 2016-01-06 13:23:45 +05:30
Anand Doshi
e88ffe032e [fix] show fields like sales_order, against_sales_order, schedule_date in item grid if In List View is checked 2016-01-06 12:54:59 +05:30
Nabin Hait
ea8bc8ecb0 Chart of accounts added for Singapore and some other fixes 2016-01-06 12:32:48 +05:30
Anand Doshi
a40c6282a1 [fix] don't allow import for child tables 2016-01-06 12:20:25 +05:30
Anand Doshi
570d1783f9 Merge branch 'develop' 2016-01-05 19:09:36 +05:30
Anand Doshi
2076203fc1 bumped to version 6.16.2 2016-01-05 19:39:35 +06:00
Anand Doshi
d7b7f74ac9 [docs] 2016-01-05 19:08:09 +05:30
Anand Doshi
d27308d1cd Merge pull request #4575 from nabinhait/report_fix_1
[fix] minor fix in stock projected qty
2016-01-05 18:41:48 +05:30
Anand Doshi
06a82d4e1f Merge pull request #4574 from rmehta/translations
Translation fixes
2016-01-05 18:41:18 +05:30
Anand Doshi
f9eff57531 [fix] credit limit 2016-01-05 16:00:33 +05:30
Rushabh Mehta
e64fbd6d3c [minor] fixes for chart_of_accounts_builder app 2016-01-04 18:11:21 +05:30
Anand Doshi
88e709e1f0 Merge branch 'develop' 2016-01-04 17:58:13 +05:30
Anand Doshi
988a1ab419 bumped to version 6.16.1 2016-01-04 18:28:13 +06:00
Anand Doshi
13bf123b24 [hotfix] item on web 2016-01-04 17:51:35 +05:30
Nabin Hait
d35d74346d [fix] minor fix in stock projected qty 2016-01-04 16:16:49 +05:30
Rushabh Mehta
969d48a554 [translations] fixes #4534-38 2016-01-04 16:09:40 +05:30
Rushabh Mehta
5760b79747 [translations] fixes #4533 2016-01-04 15:57:01 +05:30
Rushabh Mehta
eb961370ff [translations] fixes #4532 2016-01-04 15:48:37 +05:30
169 changed files with 4687 additions and 3696 deletions

View File

@@ -1,2 +1,2 @@
from __future__ import unicode_literals
__version__ = '6.16.0'
__version__ = '6.16.3'

View File

@@ -23,6 +23,8 @@ class Account(Document):
frappe.db.get_value("Company", self.company, "abbr")
def validate(self):
if frappe.local.flags.allow_unverified_charts:
return
self.validate_parent()
self.validate_root_details()
self.set_root_and_report_type()

View File

@@ -8,7 +8,7 @@ from unidecode import unidecode
def create_charts(chart_name, company):
chart = get_chart(chart_name)
if chart:
accounts = []
@@ -40,9 +40,9 @@ def create_charts(chart_name, company):
"account_currency": frappe.db.get_value("Company", company, "default_currency")
})
if root_account:
if root_account or frappe.local.flags.allow_unverified_charts:
account.flags.ignore_mandatory = True
account.insert()
accounts.append(account_name_in_db)
@@ -67,13 +67,17 @@ def get_chart(chart_name):
from erpnext.accounts.doctype.account.chart_of_accounts.verified import standard_chart_of_accounts
return standard_chart_of_accounts.get()
else:
path = os.path.join(os.path.dirname(__file__), "verified")
for fname in os.listdir(path):
if fname.endswith(".json"):
with open(os.path.join(path, fname), "r") as f:
chart = f.read()
if chart and json.loads(chart).get("name") == chart_name:
return json.loads(chart).get("tree")
folders = ("verified",)
if frappe.local.flags.allow_unverified_charts:
folders = ("verified", "unverified")
for folder in folders:
path = os.path.join(os.path.dirname(__file__), folder)
for fname in os.listdir(path):
if fname.endswith(".json"):
with open(os.path.join(path, fname), "r") as f:
chart = f.read()
if chart and json.loads(chart).get("name") == chart_name:
return json.loads(chart).get("tree")
@frappe.whitelist()
def get_charts_for_country(country):
@@ -82,24 +86,22 @@ def get_charts_for_country(country):
def _get_chart_name(content):
if content:
content = json.loads(content)
if content and content.get("is_active", "No") == "Yes" and content.get("disabled", "No") == "No":
if content and content.get("disabled", "No") == "No":
charts.append(content["name"])
country_code = frappe.db.get_value("Country", country, "code")
if country_code:
path = os.path.join(os.path.dirname(__file__), "verified")
for fname in os.listdir(path):
if fname.startswith(country_code) and fname.endswith(".json"):
with open(os.path.join(path, fname), "r") as f:
_get_chart_name(f.read())
folders = ("verified",)
if frappe.local.flags.allow_unverified_charts:
folders = ("verified", "unverified")
# countries_use_OHADA_system = ["Benin", "Burkina Faso", "Cameroon", "Central African Republic", "Comoros",
# "Congo", "Ivory Coast", "Gabon", "Guinea", "Guinea Bissau", "Equatorial Guinea", "Mali", "Niger",
# "Replica of Democratic Congo", "Senegal", "Chad", "Togo"]
#
# if country in countries_use_OHADA_system:
# with open(os.path.join(os.path.dirname(__file__), "syscohada_syscohada_chart_template.json"), "r") as f:
# _get_chart_name(f.read())
for folder in folders:
path = os.path.join(os.path.dirname(__file__), folder)
for fname in os.listdir(path):
if fname.startswith(country_code) and fname.endswith(".json"):
with open(os.path.join(path, fname), "r") as f:
_get_chart_name(f.read())
if len(charts) != 1:
charts.append("Standard")

View File

@@ -1,7 +1,6 @@
{
"country_code": "at",
"name": "Austria - Chart of Accounts",
"is_active": "Yes",
"tree": {
"Summe Abschreibungen und Aufwendungen": {
"7010 bis 7080 Abschreibungen auf das Anlageverm\u00f6gen (ausgenommen Finanzanlagen)": {},

View File

@@ -1,7 +1,6 @@
{
"country_code": "be",
"name": "Belgian PCMN",
"disabled": "Yes",
"tree": {
"CLASSE 1": {
"BENEFICE (PERTE) REPORTE(E)": {

View File

@@ -1,7 +1,6 @@
{
"country_code": "br",
"name": "Planilha de Contas Brasileira",
"is_active": "No",
"tree": {
"ATIVO": {
"CIRCULANTE": {

View File

@@ -1,7 +1,6 @@
{
"country_code": "ca",
"name": "Chart of Accounts for english-speaking provinces",
"is_active": "Yes",
"tree": {
"ASSETS": {
"CURRENT ASSETS": {

View File

@@ -1,7 +1,6 @@
{
"country_code": "ca",
"name": "Plan comptable pour les provinces francophones",
"is_active": "Yes",
"tree": {
"ACTIF": {
"ACTIFS COURANTS": {

View File

@@ -1,7 +1,6 @@
{
"country_code": "ch",
"name": "Plan comptable STERCHI",
"is_active": "Yes",
"disabled": "Yes",
"tree": {
"Actif": {

View File

@@ -1,7 +1,6 @@
{
"country_code": "co",
"name": "Unique Account Chart - PUC",
"is_active": "Yes",
"tree": {
"ACTIVO": {
"DEUDORES": {

View File

@@ -1,7 +1,6 @@
{
"country_code": "cr",
"name": "Costa Rica - Company 0",
"is_active": "Yes",
"tree": {
"0-Activo": {
"0-Activo circulante": {

View File

@@ -1,7 +1,6 @@
{
"country_code": "cr",
"name": "Costa Rica - Company 1",
"is_active": "Yes",
"tree": {
"xActivo": {
"root_type": "Asset",

View File

@@ -1,7 +1,7 @@
{
"country_code": "de",
"name": "Deutscher Kontenplan SKR04",
"is_active": "Yes",
"disabled": "Yes",
"tree": {
"Bilanz - Aktiva": {
"Anlageverm\u00f6gen": {

View File

@@ -1,7 +1,6 @@
{
"country_code": "de",
"name": "Deutscher Kontenplan SKR03",
"is_active": "No",
"disabled": "Yes",
"tree": {
"Aktiva": {

View File

@@ -1,6 +1,7 @@
{
"country_code": "es",
"name": "PGCE com\u00fan",
"disabled": "Yes",
"tree": {
"Acreedores y deudores por operaciones comerciales": {
"Acreedores varios": {

View File

@@ -1,7 +1,6 @@
{
"country_code": "et",
"name": "Ethiopia Tax and Account Chart Template",
"is_active": "Yes",
"tree": {
"ASSETS": {
"Cash and Cash Equivalents": {

View File

@@ -1,7 +1,6 @@
{
"country_code": "gt",
"name": "Plantilla de cuentas de Guatemala (sencilla)",
"is_active": "Yes",
"tree": {
"Activo": {
"Activo Corriente": {

View File

@@ -1,7 +1,6 @@
{
"country_code": "hn",
"name": "Plantilla de cuentas de Honduras (sencilla)",
"is_active": "Yes",
"tree": {
"Activo": {
"Activo Corriente": {

View File

@@ -1,6 +1,7 @@
{
"country_code": "lu",
"name": "PCMN Luxembourg",
"disabled": "Yes",
"tree": {
"TOTAL CLASSES 1 A 5": {
"CLASSE 1 - COMPTES DE CAPITAUX, DE PROVISIONS ET DE DETTES FINANCIERES": {

View File

@@ -1,7 +1,6 @@
{
"country_code": "pa",
"name": "Plan de Cuentas",
"is_active": "Yes",
"tree": {
"ACTIVOS": {
"Activo Fijo": {

View File

@@ -1,6 +1,7 @@
{
"country_code": "ro",
"name": "Romania - Chart of Accounts",
"disabled": "Yes",
"tree": {
"CONTURI FINANCIARE": {
"CONTURI DE BILANT": {

View File

@@ -1,223 +0,0 @@
{
"country_code": "sg",
"name": "Singapore Chart of Accounts",
"is_active": "Yes",
"tree": {
"Assets": {
"Cash and cash equivalents": {
"Cash on hand": {
"account_type": "Cash"
},
"Client trust account": {
"account_type": "Cash"
},
"Current": {
"account_type": "Bank"
},
"Money market": {
"account_type": "Cash"
},
"Rents held in trust": {
"account_type": "Cash"
},
"Savings": {
"account_type": "Cash"
},
"account_type": "Cash"
},
"Current assets": {
"Allowance for bad debts": {},
"Development costs": {},
"Employee cash advances": {},
"Inventory": {},
"Investments - other": {},
"Loans to officers": {},
"Loans to others": {},
"Loans to shareholders": {},
"Other Current Assets": {},
"Prepaid expenses": {},
"Retainage": {},
"Undeposited funds": {}
},
"Non-current assets": {
"Accumulated amortization of non-current assets": {},
"Available-for-sale financial assets": {},
"Deferred tax": {},
"Goodwill": {},
"Intangible Assets": {},
"Investments": {},
"Lease Buyout": {},
"Licences": {},
"Organisational costs": {},
"Other intangible assets": {},
"Other non-current assets": {},
"Prepayments and accrued income": {},
"Security Deposits": {}
},
"Property, plant and equipment": {
"Accumulated amortisation": {},
"Accumulated depletion": {},
"Accumulated depreciation": {},
"Buildings": {},
"Depletable assets": {},
"Furniture and fixtures": {},
"Leasehold improvements": {},
"Machinery and equipment": {},
"Other Assets": {},
"Vehicles": {}
},
"Purchase Tax Receivable": {
"Purchase Tax Account 0% EP": {},
"Purchase Tax Account 0% ME": {},
"Purchase Tax Account 0% NR": {},
"Purchase Tax Account 0% OP": {},
"Purchase Tax Account 0% ZP": {},
"Purchase Tax Account 7% BL": {},
"Purchase Tax Account 7% IM": {},
"Purchase Tax Account 7% TX-E33": {},
"Purchase Tax Account 7% TX-N33": {},
"Purchase Tax Account 7% TX-RE": {},
"Purchase Tax Account 7% TX7": {},
"Purchase Tax Account MES": {}
},
"Trade and other receivable": {
"Other Receivable Account": {
"account_type": "Receivable"
},
"Trade Receivable Account": {
"account_type": "Receivable"
},
"account_type": "Receivable"
},
"root_type": "Asset"
},
"Liabilities": {
"Current liabilities": {
"Client Trust Accounts - Liabilities": {},
"Current Tax Liability": {},
"Current portion of employee benefits obligations": {},
"Current portion of obligations under finance leases": {},
"GST Payable": {},
"Insurance Payable": {},
"Interest payables": {},
"Line of Credit": {},
"Loan Payable": {},
"Payroll Clearing": {},
"Payroll liabilities": {},
"Prepaid Expenses Payable": {},
"Provision for warranty obligations": {},
"Rents in trust - Liability": {},
"Short term borrowings": {}
},
"Equity": {
"Accumulated Adjustment": {},
"Opening Balance Equity": {},
"Ordinary shares": {},
"Owner's Equity": {},
"Paid-in capital or surplus": {},
"Partner's Equity": {},
"Preferred shares": {},
"Retained Earnings": {},
"Share capital": {},
"Treasury Shares": {}
},
"Non-current liabilities": {
"Accruals and Deferred Income": {},
"Bank loans": {},
"Long term borrowings": {},
"Long term employee benefit obligations": {},
"Notes Payable": {},
"Obligations under finance leases": {},
"Other non-current liabilities": {},
"Shareholder Notes Payable": {}
},
"Sale Tax Payables": {
" Sales Tax Account 0% ES33": {},
"Sales Tax Account 0% ESN33": {},
"Sales Tax Account 0% OS": {},
"Sales Tax Account 0% ZR": {},
"Sales Tax Account 7% DS": {},
"Sales Tax Account 7% SR": {}
},
"Trade and other payables": {
"Other Payable Account": {
"account_type": "Payable"
},
"Trade Payable Account": {
"account_type": "Payable"
},
"account_type": "Payable"
},
"root_type": "Liability"
},
"Cost of sales": {
"Cost of Good Sold": {
"Cost of Labour - COS": {},
"Equipment rental - COS": {},
"Freight and delivery - COS": {},
"Other costs of sales - COS": {},
"Supplies and materials - COS": {}
},
"root_type": "Expense"
},
"Income": {
"Other revenue": {
"Dividend revenue": {},
"Gain/loss on sale of fixed assets or investments": {},
"Interest earned": {},
"Other investment revenue": {},
"Other miscellaneous revenue": {},
"Tax-exempt interest": {}
},
"Revenue": {
"Discounts/refunds given": {},
"Non-profit revenue": {},
"Other primary revenue": {},
"Sales of product revenue": {},
"Service/fee revenue": {},
"Unapplied cash payment income": {}
},
"root_type": "Income"
},
"Indirect Expenses": {
"Expenses": {
"Administrative expenses": {},
"Advertising/promotional": {},
"Auto": {},
"Bad debts": {},
"Bank charges": {},
"Charitable contributions": {},
"Cost of labour": {},
"Distribution costs": {},
"Dues and subscriptions": {},
"Entertainment": {},
"Equipment rental": {},
"Finance costs": {},
"Insurance": {},
"Interest paid": {},
"Legal and professional fees": {},
"Meals and entertainment": {},
"Other miscellaneous service cost": {},
"Payroll expenses": {},
"Promotional meals": {},
"Rent or lease of buildings": {},
"Repair and maintenance": {},
"Shipping, freight, and delivery": {},
"Supplies": {},
"Taxes paid": {},
"Travel": {},
"Travel meals": {},
"Unapplied cash bill payment expense": {},
"Utilities": {}
},
"Other Expenses": {
"Amortisation": {},
"Depreciation": {},
"Exchange Gain or Loss": {},
"Other Expense": {},
"Penalties and settlements": {}
},
"root_type": "Expense"
}
}
}

View File

@@ -1,6 +1,7 @@
{
"country_code": "si",
"name": "Kontni na\u010drt za gospodarske dru\u017ebe",
"disabled": "Yes",
"tree": {
"DOLGORO\u010cNA SREDSTVA": {
"DANA DOLGORO\u010cNA POSOJILA IN TERJATVE ZA NEVPLA\u010cANI VPOKLICANI KAPITAL": {

View File

@@ -1,7 +1,6 @@
{
"country_code": "th",
"name": "Thailand Chart of Accounts",
"is_active": "Yes",
"tree": {
"Assets": {
"Account Receivable": {},

View File

@@ -1,7 +1,6 @@
{
"country_code": "uy",
"name": "Plan de Cuentas",
"is_active": "Yes",
"tree": {
"ACTIVO": {
"ACTIVO CORRIENTE": {

View File

@@ -1,7 +1,6 @@
{
"country_code": "ae",
"name": "U.A.E Chart of Accounts",
"is_active": "Yes",
"tree": {
"Assets": {
"Current Assets": {

View File

@@ -1,7 +1,6 @@
{
"country_code": "gt",
"name": "Cuentas de Guatemala",
"is_active": "Yes",
"tree": {
"Activos": {
"Activo Corriente": {

View File

@@ -1,7 +1,6 @@
{
"country_code": "in",
"name": "Chart of Accounts - India",
"is_active": "Yes",
"tree": {
"Application of Funds (Assets)": {
"Current Assets": {

View File

@@ -1,7 +1,6 @@
{
"country_code": "ni",
"name": "Catalogo de Cuentas Nicaragua",
"is_active": "Yes",
"tree": {
"Activo": {
"Activo Corriente": {

View File

@@ -0,0 +1,273 @@
{
"country_code": "sg",
"name": "Singapore Default Chart of Accounts",
"tree": {
"Assets": {
"Current assets": {
"Accounts Receivable": {
"Credit Cards": {
"AMEX Receivable": {},
"CUP Receivale": {},
"MC Receivable": {},
"NETS Receivable": {},
"VISA Receivable": {}
},
"Debtors": {
"account_type": "Receivable"
}
},
"Bank Accounts": {
"Paypal Account": {
"account_type": "Bank"
},
"account_type": "Bank"
},
"Cash in Hand": {
"Cash in Transit": {
"account_type": "Cash"
},
"Petty Cash": {
"account_type": "Cash"
}
},
"Loans and Advances-Assets": {
"Prepayments": {}
},
"Securities and Deposits": {
"Bank Guarantees": {},
"Bank Deposits": {},
"Rental Deposits": {}
},
"Stock Assets": {
"account_type": "Stock",
"is_group": 1
},
"Tax Assets": {
"GST-Input": {}
}
},
"Non-current assets": {
"Fixed Assets": {
"Accumulated Depreciation": {
"AccDep-Equipment-ICT": {},
"AccDep-Furniture and Fixtures": {},
"AccDep-Equipment-Office": {},
"AccDep-Motor Vehicle": {},
"AccDep-Plant and Machinery": {}
},
"Equipment-ICT": {},
"Furniture and Fixtures": {},
"Equipment-Office": {},
"Motor Vehicle": {},
"Plant and Machinery": {}
},
"Non-Fixed Assets": {
"Goodwill": {},
"Investments": {
"Investments-Associated Company": {},
"Investments-Subsidiary": {}
}
},
"Shares": {
"Shares-Quoted": {},
"Shares-Unquoted": {}
}
},
"Temporary Accunts": {
"Temporary Opening": {
"account_type": "Temporary"
}
},
"root_type": "Asset"
},
"Liabilities": {
"Current liabilities": {
"Accounts Payable": {
"Creditors":{
"account_type": "Payable"
}
},
"Duties and Taxes": {
"account_type": "Tax",
"Deferred Tax Liabilities-Current": {},
"GST-Output": {},
"Income Tax Payable": {}
},
"Loans-Current": {
"Amount Owing to Directors": {},
"Bank Overdaft Account": {},
"Secured Loans": {},
"Unsecured Loans": {}
},
"Provision and Accruals": {
"Accruals": {
"Accr-CPF": {},
"Accr-Sundry": {},
"Accr-Withholding Tax": {}
},
"Provisions": {
"Prov-Audit Fee": {},
"Prov-Others": {},
"Prov-Tax Fee": {},
"Prov-Bonus": {
"Prov-Bonus-Executive": {},
"Prov-Bonus-Non Executive": {}
}
}
},
"Sponsorship Funds": {},
"Stock Liabilities": {
"Stock Received But Not Billed": {
"account_type": "Stock Received But Not Billed"
}
}
},
"Non-current liabilities": {
"Deferred Tax Liabilities": {},
"Loans-Non Current": {}
},
"Capital Account": {
"Reserves and Surplus": {},
"Shareholder Funds": {}
},
"root_type": "Liability"
},
"Equity": {
"Share Capital": {},
"Current Year Earnings": {},
"Proposed Dividends": {},
"Retained Earnings": {},
"root_type": "Equity"
},
"Income": {
"Direct Income": {
"Management Income": {},
"Sales Income": {}
},
"Indirect Income": {
"Government Grants": {},
"Interest Income": {
"Current Account Interest Earned": {},
"Fixed Deposit Interest Earned": {}
},
"Other Income": {},
"Service Charges": {}
},
"root_type": "Income"
},
"Expenses": {
"Expenses-Administrative": {
"Audit Fees": {},
"Bank charges and interest": {},
"Currency Exchange Differences": {},
"Insurance": {},
"Interest on Loan": {},
"Legal and Professional Fees": {},
"Loss on Disposal of FA": {},
"Postal and Courier Charges": {},
"Printing and Stationery": {},
"Secretarial Fees": {},
"Tax Agent Fees": {}
},
"Expenses-Direct": {
"Cost of Goods Sold": {
"account_type": "Cost of Goods Sold"
},
"Cost of Sales": {},
"Expenses Included in Valuation": {
"account_type": "Expenses Included In Valuation"
},
"Stock Adjustment": {
"account_type": "Stock Adjustment"
}
},
"Expenses-Marketing": {
"Advertising and Promotion": {},
"Graphic Design Fees": {},
"Internet Marketing": {}
},
"Expenses-Operating": {
"Cleaning Costs": {},
"Commission Charges": {
"Comm-Credit Card": {},
"Comm-NETS": {},
"Comm-Paypal": {}
},
"Communication Costs": {
"Internet Connection": {},
"Telephone Costs": {}
},
"Entertainment Expenses": {},
"General Expenses": {},
"Licence Fees": {},
"Rental Costs": {
"Rental-Premises": {},
"Rental-Equipment": {},
"Rental-Storage": {}
},
"Repairs and Maintenance": {
"R&M-ICT": {},
"R&M-Building": {},
"R&M-Fixtures & Furniture": {},
"R&M-Office": {},
"R&M-Plant & Machinery": {}
},
"Service Fees": {},
"Subscription Fees": {
"Publication Subscriptions": {},
"TV Subscriptions": {}
},
"Travel Expenses": {},
"Utilities": {
"Utility-Electricity": {},
"Utility-Gas": {},
"Utility-Refuse Removal": {},
"Utility-Water": {}
}
},
"Expenses-Other": {
"Bad Debts Written Off": {},
"Depreciation": {
"Dep-ICT Equipment": {},
"Dep-Fixtures & Furniture": {},
"Dep-Motor Vehicle": {},
"Dep-Office Equipment": {},
"Dep-Plant & Machinery": {},
"Dep-Renovation": {}
},
"Donations": {},
"Round Off": {},
"Tax Expenses": {
"Tax Expenses": {}
}
},
"Expenses-Staff": {
"Bonuses": {
"Bonus-Executive": {},
"Bonus-Non Executive": {},
"Bonus-Performance": {}
},
"CPF": {},
"Directors Fees": {},
"FWL": {},
"Incentives": {},
"Medical Expenses": {},
"Salaries": {
"Casual Labour": {},
"Salary-Executive": {},
"Salary-Non Executive-Full Time": {},
"Salary-Non Executive-Part Time": {}
},
"SDF": {},
"Security Expenses": {},
"Staff Advertising": {},
"Staff Commission Paid": {},
"Staff Meals": {},
"Staff Training": {},
"Staff Transport": {},
"Staff Welfare": {}
},
"root_type": "Expense"
}
}
}

View File

@@ -0,0 +1,343 @@
{
"country_code": "sg",
"name": "Singapore F&B Chart of Accounts",
"tree": {
"Assets": {
"Current assets": {
"Accounts Receivable": {
"Credit Cards": {
"AMEX Receivable": {},
"CUP Receivale": {},
"MC Receivable": {},
"NETS Receivable": {},
"VISA Receivable": {}
},
"Debtors": {
"account_type": "Receivable"
}
},
"Bank Accounts": {
"Paypal Account": {
"account_type": "Bank"
},
"account_type": "Bank"
},
"Cash in Hand": {
"Cash in Transit": {
"account_type": "Cash"
},
"Petty Cash": {
"account_type": "Cash"
}
},
"Loans and Advances-Assets": {
"Prepayments": {}
},
"Securities and Deposits": {
"Bank Guarantees": {},
"Bank Deposits": {},
"Rental Deposits": {}
},
"Stock Assets": {
"account_type": "Stock",
"is_group": 1
},
"Tax Assets": {
"GST-Input": {}
}
},
"Non-current assets": {
"Fixed Assets": {
"Accumulated Depreciation": {
"AccDep-Equipment-AV": {},
"AccDep-Equipment-Bar": {},
"AccDep-Equipment-ICT": {},
"AccDep-Equipment-Electrical": {},
"AccDep-Furniture and Fixtures": {},
"AccDep-Equipment-Kitchen": {},
"AccDep-Equipment-Lighting": {},
"AccDep-Equipment-Office": {},
"AccDep-Motor Vehicle": {},
"AccDep-Plant and Machinery": {},
"AccDep-Renovation": {}
},
"Equipment-AV": {},
"Equipment-Bar": {},
"Equipment-ICT": {},
"Equipment-Electrical": {},
"Furniture and Fixtures": {},
"Equipment-Kitchen": {},
"Equipment-Lighting": {},
"Equipment-Office": {},
"Motor Vehicle": {},
"Plant and Machinery": {},
"Renovation": {}
},
"Non-Fixed Assets": {
"Goodwill": {},
"Investments": {
"Investments-Associated Company": {},
"Investments-Subsidiary": {}
}
},
"Shares": {
"Shares-Quoted": {},
"Shares-Unquoted": {}
}
},
"Temporary Accunts": {
"Temporary Opening": {
"account_type": "Temporary"
}
},
"root_type": "Asset"
},
"Liabilities": {
"Current liabilities": {
"Accounts Payable": {
"Creditors":{
"account_type": "Payable"
}
},
"Duties and Taxes": {
"account_type": "Tax",
"Deferred Tax Liabilities-Current": {},
"GST-Output": {},
"Income Tax Payable": {}
},
"Loans-Current": {
"Amount Owing to Directors": {},
"Bank Overdaft Account": {},
"Secured Loans": {},
"Unsecured Loans": {}
},
"Provision and Accruals": {
"Accruals": {
"Accr-CPF": {},
"Accr-Incentives": {},
"Accr-OCR Employee Card": {},
"Accr-Paypal Credit": {},
"Accr-Sundry": {},
"Accr-Tips": {},
"Accr-Withholding Tax": {}
},
"Provisions": {
"Prov-Audit Fee": {},
"Prov-Others": {},
"Prov-Tax Fee": {},
"Prov-Bonus": {
"Prov-Bonus-Executive": {},
"Prov-Bonus-Non Executive": {}
}
}
},
"Sponsorship Funds": {},
"Stock Liabilities": {
"Stock Received But Not Billed": {
"account_type": "Stock Received But Not Billed"
}
}
},
"Non-current liabilities": {
"Deferred Tax Liabilities": {},
"Loans-Non Current": {}
},
"Capital Account": {
"Reserves and Surplus": {},
"Shareholder Funds": {}
},
"root_type": "Liability"
},
"Equity": {
"Share Capital": {},
"Current Year Earnings": {},
"Proposed Dividends": {},
"Retained Earnings": {},
"root_type": "Equity"
},
"Income": {
"Direct Income": {
"Management Income": {},
"Sales Income": {
"Sales-Food": {},
"Sales-Beverage": {},
"Sales-Events and Functions": {},
"Sales-Merchandise": {},
"Sales-Pool Tables": {},
"Sales-Tobacco": {},
"Sales-Rental": {}
}
},
"Indirect Income": {
"Government Grants": {},
"Interest Income": {
"Current Account Interest Earned": {},
"Fixed Deposit Interest Earned": {}
},
"Other Income": {},
"Service Charges": {}
},
"root_type": "Income"
},
"Expenses": {
"Expenses-Administrative": {
"Admin Management Fees": {},
"Audit Fees": {},
"Auto": {},
"Bank charges and interest": {},
"Currency Exchange Differences": {},
"Insurance": {},
"Interest on Loan": {},
"Legal and Professional Fees": {},
"Loss on Disposal of FA": {},
"Postal and Courier Charges": {},
"Printing and Stationery": {},
"Secretarial Fees": {},
"Tax Agent Fees": {}
},
"Expenses-Direct": {
"Cost of Goods Sold": {
"account_type": "Cost of Goods Sold"
},
"Cost of Sales": {
"COS-Food": {},
"COS-Beverage": {},
"COS-Tobacco": {},
"COS-Events and Functions": {},
"COS-Merchandise": {}
},
"Expenses Included in Valuation": {
"account_type": "Expenses Included In Valuation"
},
"Stock Adjustment": {
"account_type": "Stock Adjustment"
}
},
"Expenses-Marketing": {
"Advertising and Promotion": {},
"Graphic Design Fees": {},
"Internet Marketing": {
"Marketing-Social Media": {},
"Marketing-Website": {}
}
},
"Expenses-Operating": {
"Cleaning Costs": {
"Cleaning-Kitchen": {},
"Cleaning-Laundry": {},
"Cleaning-Outlet": {}
},
"Commission Charges": {
"Comm-Credit Card": {},
"Comm-NETS": {},
"Comm-Paypal": {}
},
"Communication Costs": {
"Internet Connection": {},
"Telephone Costs": {}
},
"Disposals": {
"Disposals-Food": {},
"Disposals-Beverage": {},
"Disposals-Merchandise": {},
"Disposals-Others": {}
},
"Entertainment Expenses": {
"DJ Costs": {},
"Live Band Costs": {},
"Recorded Music Costs": {}
},
"FoC Accounts": {
"FoC-ENT": {},
"FoC-OC": {}
},
"General Expenses": {},
"Landscaping Costs": {},
"Licence Fees": {},
"Operational Supplies": {
"Supplies-Bar": {},
"Supplies-Guest": {},
"Supplies-Kitchen": {},
"Supplies-Restaurant": {},
"Supplies-Stewarding": {}
},
"Rental Costs": {
"Rental-Premises": {},
"Rental-Equipment": {},
"Rental-Storage": {}
},
"Repairs and Maintenance": {
"R&M-ICT": {},
"R&M-AV": {},
"R&M-Building": {},
"R&M-Electrical & Lighting": {},
"R&M-Fixtures & Furniture": {},
"R&M-Kitchen & Bar": {},
"R&M-Office": {},
"R&M-Plant & Machinery": {}
},
"Service Fees": {},
"Subscription Fees": {
"Publication Subscriptions": {},
"TV Subscriptions": {}
},
"Travel Expenses": {},
"Utilities": {
"Utility-Electricity": {},
"Utility-Gas": {},
"Utility-Refuse Removal": {},
"Utility-Water": {}
}
},
"Expenses-Other": {
"Bad Debts Written Off": {},
"Depreciation": {
"Dep-AV Equipment": {},
"Dep-Bar Equipment": {},
"Dep-ICT Equipment": {},
"Dep-Electrical Equipment": {},
"Dep-Fixtures & Furniture": {},
"Dep-Kitchen Equipment": {},
"Dep-Lighting Equipment": {},
"Dep-Motor Vehicle": {},
"Dep-Office Equipment": {},
"Dep-Plant & Machinery": {},
"Dep-Renovation": {}
},
"Donations": {},
"Round Off": {},
"Tax Expenses": {
"Tax Expenses": {}
}
},
"Expenses-Staff": {
"Bonuses": {
"Bonus-Executive": {},
"Bonus-Non Executive": {},
"Bonus-Performance": {}
},
"CPF": {},
"Directors Fees": {},
"FWL": {},
"Incentives": {},
"Medical Expenses": {},
"Salaries": {
"Casual Labour": {},
"Salary-Executive": {},
"Salary-Non Executive-Full Time": {},
"Salary-Non Executive-Part Time": {}
},
"SDF": {},
"Security Expenses": {},
"Staff Advertising": {},
"Staff Commission Paid": {},
"Staff Meals": {},
"Staff Training": {},
"Staff Transport": {},
"Staff Uniforms": {},
"Staff Welfare": {}
},
"root_type": "Expense"
}
}
}

View File

@@ -104,7 +104,7 @@ class JournalEntry(AccountsController):
msgprint(_("Row {0}: Please check 'Is Advance' against Account {1} if this is an advance entry.").format(d.idx, d.account))
elif d.reference_type in ("Sales Order", "Purchase Order") and d.is_advance != "Yes":
frappe.throw(_("Row {0}: Payment against Sales/Purchase Order should always be marked as advance").format(d.idx))
if d.is_advance == "Yes":
if d.party_type == 'Customer' and flt(d.debit) > 0:
frappe.throw(_("Row {0}: Advance against Customer must be credit").format(d.idx))
@@ -280,10 +280,14 @@ class JournalEntry(AccountsController):
alternate_currency = []
for d in self.get("accounts"):
account = frappe.db.get_value("Account", d.account, ["account_currency", "account_type"], as_dict=1)
d.account_currency = account.account_currency or self.company_currency
d.account_type = account.account_type
if account:
d.account_currency = account.account_currency
d.account_type = account.account_type
if d.account_currency!=self.company_currency and d.account_currency not in alternate_currency:
if not d.account_currency:
d.account_currency = self.company_currency
if d.account_currency != self.company_currency and d.account_currency not in alternate_currency:
alternate_currency.append(d.account_currency)
if alternate_currency:

View File

@@ -11,6 +11,7 @@ import frappe.defaults
from erpnext.controllers.buying_controller import BuyingController
from erpnext.accounts.party import get_party_account, get_due_date
from erpnext.accounts.utils import get_account_currency
from erpnext.stock.doctype.purchase_receipt.purchase_receipt import update_billed_amount_based_on_po
form_grid_templates = {
"items": "templates/form_grid/item_grid.html"
@@ -150,14 +151,14 @@ class PurchaseInvoice(BuyingController):
against_accounts = []
stock_items = self.get_stock_items()
for item in self.get("items"):
# in case of auto inventory accounting,
# in case of auto inventory accounting,
# against expense account is always "Stock Received But Not Billed"
# for a stock item and if not epening entry and not drop-ship entry
if auto_accounting_for_stock and item.item_code in stock_items \
and self.is_opening == 'No' and (not item.po_detail or
and self.is_opening == 'No' and (not item.po_detail or
not frappe.db.get_value("Purchase Order Item", item.po_detail, "delivered_by_supplier")):
item.expense_account = stock_not_billed_account
item.cost_center = None
@@ -246,6 +247,7 @@ class PurchaseInvoice(BuyingController):
self.update_against_document_in_jv()
self.update_prevdoc_status()
self.update_billing_status_for_zero_amount_refdoc("Purchase Order")
self.update_billing_status_in_pr()
self.update_project()
@@ -407,6 +409,8 @@ class PurchaseInvoice(BuyingController):
self.update_prevdoc_status()
self.update_billing_status_for_zero_amount_refdoc("Purchase Order")
self.update_billing_status_in_pr()
self.make_gl_entries_on_cancel()
self.update_project()
@@ -431,6 +435,21 @@ class PurchaseInvoice(BuyingController):
if pi:
frappe.throw("Supplier Invoice No exists in Purchase Invoice {0}".format(pi))
def update_billing_status_in_pr(self, update_modified=True):
updated_pr = []
for d in self.get("items"):
if d.pr_detail:
billed_amt = frappe.db.sql("""select sum(amount) from `tabPurchase Invoice Item`
where pr_detail=%s and docstatus=1""", d.pr_detail)
billed_amt = billed_amt and billed_amt[0][0] or 0
frappe.db.set_value("Purchase Receipt Item", d.pr_detail, "billed_amt", billed_amt, update_modified=update_modified)
updated_pr.append(d.purchase_receipt)
elif d.po_detail:
updated_pr += update_billed_amount_based_on_po(d.po_detail, update_modified)
for pr in set(updated_pr):
frappe.get_doc("Purchase Receipt", pr).update_billing_percentage(update_modified=update_modified)
@frappe.whitelist()
def get_expense_account(doctype, txt, searchfield, start, page_len, filters):
from erpnext.controllers.queries import get_match_cond

View File

@@ -12,6 +12,7 @@ from frappe.model.mapper import get_mapped_doc
from erpnext.controllers.selling_controller import SellingController
from erpnext.accounts.utils import get_account_currency
from erpnext.stock.doctype.delivery_note.delivery_note import update_billed_amount_based_on_so
form_grid_templates = {
"items": "templates/form_grid/item_grid.html"
@@ -98,6 +99,7 @@ class SalesInvoice(SellingController):
self.update_status_updater_args()
self.update_prevdoc_status()
self.update_billing_status_in_dn()
# this sequence because outstanding may get -ve
self.make_gl_entries()
@@ -111,6 +113,7 @@ class SalesInvoice(SellingController):
self.update_time_log_batch(self.name)
def before_cancel(self):
self.update_time_log_batch(None)
@@ -129,6 +132,7 @@ class SalesInvoice(SellingController):
self.update_status_updater_args()
self.update_prevdoc_status()
self.update_billing_status_in_dn()
if not self.is_return:
self.update_billing_status_for_zero_amount_refdoc("Sales Order")
@@ -381,7 +385,7 @@ class SalesInvoice(SellingController):
def validate_warehouse(self):
super(SalesInvoice, self).validate_warehouse()
for d in self.get('items'):
if not d.warehouse:
frappe.throw(_("Warehouse required at Row No {0}").format(d.idx))
@@ -410,7 +414,7 @@ class SalesInvoice(SellingController):
if self.c_form_applicable == 'Yes' and self.c_form_no:
msgprint(_("Please remove this Invoice {0} from C-Form {1}")
.format(self.name, self.c_form_no), raise_exception = 1)
def validate_dropship_item(self):
for item in self.items:
if item.sales_order:
@@ -630,6 +634,21 @@ class SalesInvoice(SellingController):
}, write_off_account_currency)
)
def update_billing_status_in_dn(self, update_modified=True):
updated_delivery_notes = []
for d in self.get("items"):
if d.dn_detail:
billed_amt = frappe.db.sql("""select sum(amount) from `tabSales Invoice Item`
where dn_detail=%s and docstatus=1""", d.dn_detail)
billed_amt = billed_amt and billed_amt[0][0] or 0
frappe.db.set_value("Delivery Note Item", d.dn_detail, "billed_amt", billed_amt, update_modified=update_modified)
updated_delivery_notes.append(d.delivery_note)
elif d.so_detail:
updated_delivery_notes += update_billed_amount_based_on_so(d.so_detail, update_modified)
for dn in set(updated_delivery_notes):
frappe.get_doc("Delivery Note", dn).update_billing_percentage(update_modified=update_modified)
def get_list_context(context=None):
from erpnext.controllers.website_list_for_contact import get_list_context
list_context = get_list_context(context)

View File

@@ -23,6 +23,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -48,6 +49,7 @@
"options": "Item",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -69,6 +71,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -93,6 +96,7 @@
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -115,6 +119,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -138,6 +143,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -162,6 +168,7 @@
"oldfieldtype": "Text",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"print_width": "200px",
"read_only": 0,
"report_hide": 0,
@@ -186,6 +193,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -210,6 +218,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -233,6 +242,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -255,6 +265,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -279,6 +290,7 @@
"oldfieldtype": "Currency",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -304,6 +316,7 @@
"options": "currency",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -329,6 +342,7 @@
"oldfieldtype": "Float",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -350,6 +364,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -373,6 +388,7 @@
"options": "UOM",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -398,6 +414,7 @@
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -419,6 +436,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -444,6 +462,7 @@
"options": "currency",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -469,6 +488,7 @@
"options": "currency",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 1,
@@ -490,6 +510,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -515,6 +536,7 @@
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 1,
@@ -540,6 +562,7 @@
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 1,
@@ -563,6 +586,7 @@
"options": "Pricing Rule",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -585,6 +609,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -609,6 +634,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -633,6 +659,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -655,6 +682,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -679,6 +707,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -703,6 +732,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -727,6 +757,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -750,6 +781,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -772,6 +804,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -797,6 +830,7 @@
"options": "Account",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"print_width": "120px",
"read_only": 0,
"report_hide": 0,
@@ -822,6 +856,7 @@
"options": "Account",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -844,6 +879,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -870,6 +906,7 @@
"options": "Cost Center",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"print_width": "120px",
"read_only": 0,
"report_hide": 0,
@@ -895,6 +932,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -920,6 +958,7 @@
"options": "Warehouse",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -944,6 +983,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -968,6 +1008,7 @@
"oldfieldtype": "Small Text",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -991,6 +1032,7 @@
"options": "Batch",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -1017,6 +1059,7 @@
"options": "Item Group",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -1041,6 +1084,7 @@
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -1065,6 +1109,7 @@
"oldfieldtype": "Small Text",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -1086,6 +1131,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -1109,6 +1155,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"print_width": "150px",
"read_only": 1,
"report_hide": 0,
@@ -1135,6 +1182,7 @@
"oldfieldtype": "Currency",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -1158,6 +1206,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -1181,6 +1230,7 @@
"options": "Time Log Batch",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -1197,7 +1247,7 @@
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 1,
"in_list_view": 1,
"in_list_view": 0,
"label": "Sales Order",
"length": 0,
"no_copy": 1,
@@ -1206,6 +1256,7 @@
"options": "Sales Order",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -1230,6 +1281,7 @@
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -1252,6 +1304,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -1277,6 +1330,7 @@
"options": "Delivery Note",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -1301,6 +1355,7 @@
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -1325,6 +1380,7 @@
"oldfieldtype": "Currency",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -1347,6 +1403,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -1369,6 +1426,7 @@
"no_copy": 1,
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 1,
"reqd": 0,
@@ -1386,7 +1444,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2015-11-16 06:29:56.335017",
"modified": "2016-01-06 02:23:06.432442",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice Item",

View File

@@ -14,7 +14,12 @@ frappe.query_reports["Budget Variance Report"] = {
fieldname: "period",
label: __("Period"),
fieldtype: "Select",
options: "Monthly\nQuarterly\nHalf-Yearly\nYearly",
options: [
{ "value": "Monthly", "label": __("Monthly") },
{ "value": "Quarterly", "label": __("Quarterly") },
{ "value": "Half-Yearly", "label": __("Half-Yearly") },
{ "value": "Yearly", "label": __("Yearly") }
],
default: "Monthly"
},
{
@@ -25,4 +30,4 @@ frappe.query_reports["Budget Variance Report"] = {
default: frappe.defaults.get_user_default("Company")
},
]
}
}

View File

@@ -56,6 +56,8 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend(
this.delivered_by_supplier).addClass("btn-primary");
}
} else if(doc.docstatus===0) {
cur_frm.add_custom_button(__('Get Last Purchase Rate'), this.get_last_purchase_rate);
cur_frm.cscript.add_from_mappers();
}
@@ -204,6 +206,16 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend(
delivered_by_supplier: function(){
cur_frm.cscript.update_status('Deliver', 'Delivered')
},
get_last_purchase_rate: function() {
frappe.call({
"method": "get_last_purchase_rate",
"doc": cur_frm.doc,
callback: function(r, rt) {
cur_frm.cscript.calculate_taxes_and_totals();
}
})
}
});

View File

@@ -8,6 +8,7 @@ from frappe.utils import cstr, flt
from frappe import msgprint, _, throw
from frappe.model.mapper import get_mapped_doc
from erpnext.controllers.buying_controller import BuyingController
from erpnext.stock.doctype.item.item import get_last_purchase_details
from erpnext.stock.stock_balance import update_bin_qty, get_ordered_qty
from frappe.desk.notifications import clear_doctype_notifications
@@ -83,6 +84,34 @@ class PurchaseOrder(BuyingController):
if d.prevdoc_detail_docname and not d.schedule_date:
d.schedule_date = frappe.db.get_value("Material Request Item",
d.prevdoc_detail_docname, "schedule_date")
def get_last_purchase_rate(self):
"""get last purchase rates for all items"""
conversion_rate = flt(self.get('conversion_rate')) or 1.0
for d in self.get("items"):
if d.item_code:
last_purchase_details = get_last_purchase_details(d.item_code, self.name)
if last_purchase_details:
d.base_price_list_rate = (last_purchase_details['base_price_list_rate'] *
(flt(d.conversion_factor) or 1.0))
d.discount_percentage = last_purchase_details['discount_percentage']
d.base_rate = last_purchase_details['base_rate'] * (flt(d.conversion_factor) or 1.0)
d.price_list_rate = d.base_price_list_rate / conversion_rate
d.rate = d.base_rate / conversion_rate
else:
# if no last purchase found, reset all values to 0
for field in ("base_price_list_rate", "base_rate",
"price_list_rate", "rate", "discount_percentage"):
d.set(field, 0)
item_last_purchase_rate = frappe.db.get_value("Item", d.item_code, "last_purchase_rate")
if item_last_purchase_rate:
d.base_price_list_rate = d.base_rate = d.price_list_rate \
= d.rate = item_last_purchase_rate
# Check for Stopped status
def check_for_stopped_or_closed_status(self, pc_obj):

View File

@@ -26,6 +26,7 @@
"options": "Item",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -49,6 +50,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -73,6 +75,7 @@
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -95,6 +98,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -111,7 +115,7 @@
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 1,
"in_list_view": 1,
"in_list_view": 0,
"label": "Reqd By Date",
"length": 0,
"no_copy": 0,
@@ -119,6 +123,7 @@
"oldfieldtype": "Date",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -142,6 +147,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -166,6 +172,7 @@
"oldfieldtype": "Small Text",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"print_width": "300px",
"read_only": 0,
"report_hide": 0,
@@ -189,6 +196,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -212,6 +220,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -236,6 +245,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -258,6 +268,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -282,6 +293,7 @@
"oldfieldtype": "Currency",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"print_width": "60px",
"read_only": 0,
"report_hide": 0,
@@ -309,6 +321,7 @@
"options": "UOM",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"print_width": "100px",
"read_only": 1,
"report_hide": 0,
@@ -332,6 +345,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -357,6 +371,7 @@
"options": "UOM",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"print_width": "100px",
"read_only": 0,
"report_hide": 0,
@@ -383,6 +398,7 @@
"oldfieldtype": "Currency",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"print_width": "100px",
"read_only": 0,
"report_hide": 0,
@@ -406,6 +422,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -429,6 +446,7 @@
"options": "currency",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -452,6 +470,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -473,6 +492,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -496,6 +516,7 @@
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -517,6 +538,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -542,6 +564,7 @@
"options": "currency",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -567,6 +590,7 @@
"options": "currency",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -588,6 +612,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -613,6 +638,7 @@
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"print_width": "100px",
"read_only": 1,
"report_hide": 0,
@@ -640,6 +666,7 @@
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 1,
@@ -663,6 +690,7 @@
"options": "Pricing Rule",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -685,6 +713,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -709,6 +738,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -733,6 +763,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -755,6 +786,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -779,6 +811,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -803,6 +836,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -825,6 +859,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -850,6 +885,7 @@
"options": "Warehouse",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -873,6 +909,7 @@
"options": "Project",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -898,6 +935,7 @@
"options": "DocType",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -923,6 +961,7 @@
"options": "prevdoc_doctype",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"print_width": "120px",
"read_only": 1,
"report_hide": 0,
@@ -949,6 +988,7 @@
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -972,6 +1012,7 @@
"options": "Supplier Quotation",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -995,6 +1036,7 @@
"options": "Supplier Quotation Item",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -1018,6 +1060,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -1039,6 +1082,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -1065,6 +1109,7 @@
"options": "Item Group",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -1090,6 +1135,7 @@
"options": "Brand",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -1114,6 +1160,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -1138,6 +1185,7 @@
"oldfieldtype": "Currency",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"print_width": "100px",
"read_only": 1,
"report_hide": 0,
@@ -1164,6 +1212,7 @@
"oldfieldtype": "Currency",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -1188,6 +1237,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -1211,6 +1261,7 @@
"options": "currency",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -1236,6 +1287,7 @@
"oldfieldtype": "Small Text",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 1,
"reqd": 0,
@@ -1260,6 +1312,7 @@
"oldfieldtype": "Check",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -1277,7 +1330,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2015-11-19 02:53:19.301428",
"modified": "2016-01-06 02:21:10.407871",
"modified_by": "Administrator",
"module": "Buying",
"name": "Purchase Order Item",

View File

@@ -25,7 +25,7 @@ cur_frm.cscript.make_dashboard = function(doc) {
if(doc.__islocal)
return;
if (in_list(user_roles, "Accounts User") || in_list(user_roles, "Accounts Manager"))
cur_frm.dashboard.set_headline('<span class="text-muted">Loading...</span>')
cur_frm.dashboard.set_headline('<span class="text-muted">' + __('Loading') + '</span>')
cur_frm.dashboard.add_doctype_badge("Supplier Quotation", "supplier");
cur_frm.dashboard.add_doctype_badge("Purchase Order", "supplier");
@@ -41,7 +41,7 @@ cur_frm.cscript.make_dashboard = function(doc) {
callback: function(r) {
if (in_list(user_roles, "Accounts User") || in_list(user_roles, "Accounts Manager")) {
cur_frm.dashboard.set_headline(
__("Total Billing This Year: ") + "<b>"
__("Total billing this year") + ": <b>"
+ format_currency(r.message.billing_this_year, cur_frm.doc.party_account_currency)
+ '</b> / <span class="text-muted">' + __("Total Unpaid") + ": <b>"
+ format_currency(r.message.total_unpaid, cur_frm.doc.party_account_currency)

View File

@@ -473,30 +473,6 @@
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "communications",
"fieldtype": "Table",
"hidden": 1,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Communications",
"length": 0,
"no_copy": 0,
"options": "Communication",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
}
],
"hide_heading": 0,
@@ -509,7 +485,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2015-12-08 12:52:56.827461",
"modified": "2016-01-06 02:35:18.285473",
"modified_by": "Administrator",
"module": "Buying",
"name": "Supplier",

View File

@@ -0,0 +1,6 @@
- Track billed status of a Delivery Note (DN) or Purchase Receipt (PR)
- Added new status **To Bill** and **Completed** in Delivery Note and Purchase Receipt
- The system looks for Invoices directly created from Delivery Note / Purchase Receipt *(Workflow: Order -> DN/PR -> Invoice)* and allocates these amounts directly to the DN/PR
- Next, it looks for Invoices not created from Delivery Note / Purchase Receipt, but from an Order *(Workflow: Order -> Invoice, Order -> DN/PR)* and the DN/PR is selected based on FIFO for allocating the billed amount
- In Stock Entry, re-calculate Additional Costs and Amount on changing Quantity or Rate
- Chart of Accounts for Singapore

View File

@@ -32,7 +32,8 @@ def get_data():
"icon": "icon-th",
"icon": "octicon octicon-credit-card",
"type": "page",
"link": "pos"
"link": "pos",
"label": _("POS")
},
"Projects": {
"color": "#8e44ad",
@@ -68,6 +69,7 @@ def get_data():
"force_show": True,
"icon": "octicon octicon-device-camera-video",
"type": "module",
"is_help": True
"is_help": True,
"label": _("Learn")
}
}

View File

@@ -52,13 +52,15 @@ status_map = {
],
"Delivery Note": [
["Draft", None],
["Submitted", "eval:self.docstatus==1"],
["To Bill", "eval:self.per_billed < 100 and self.docstatus == 1"],
["Completed", "eval:self.per_billed == 100 and self.docstatus == 1"],
["Cancelled", "eval:self.docstatus==2"],
["Closed", "eval:self.status=='Closed'"],
],
"Purchase Receipt": [
["Draft", None],
["Submitted", "eval:self.docstatus==1"],
["To Bill", "eval:self.per_billed < 100 and self.docstatus == 1"],
["Completed", "eval:self.per_billed == 100 and self.docstatus == 1"],
["Cancelled", "eval:self.docstatus==2"],
["Closed", "eval:self.status=='Closed'"],
]
@@ -79,7 +81,7 @@ class StatusUpdater(Document):
def set_status(self, update=False, status=None, update_modified=True):
if self.is_new():
return
if self.doctype in status_map:
_status = self.status
@@ -102,9 +104,9 @@ class StatusUpdater(Document):
if self.status != _status and self.status not in ("Submitted", "Cancelled"):
self.add_comment("Label", _(self.status))
if update:
frappe.db.set_value(self.doctype, self.name, "status", self.status,
frappe.db.set_value(self.doctype, self.name, "status", self.status,
update_modified=update_modified)
def validate_qty(self):
@@ -153,7 +155,6 @@ class StatusUpdater(Document):
# check if overflow is within tolerance
tolerance, self.tolerance, self.global_tolerance = get_tolerance_for(item['item_code'],
self.tolerance, self.global_tolerance)
overflow_percent = ((item[args['target_field']] - item[args['target_ref_field']]) /
item[args['target_ref_field']]) * 100
@@ -166,10 +167,10 @@ class StatusUpdater(Document):
throw(_("{0} must be reduced by {1} or you should increase overflow tolerance")
.format(_(item["target_ref_field"].title()), item["reduce_by"]))
def update_qty(self, change_modified=True):
def update_qty(self, update_modified=True):
"""Updates qty or amount at row level
:param change_modified: If true, updates `modified` and `modified_by` for target parent doc
:param update_modified: If true, updates `modified` and `modified_by` for target parent doc
"""
for args in self.status_updater:
# condition to include current record (if submit or no if cancel)
@@ -178,22 +179,19 @@ class StatusUpdater(Document):
else:
args['cond'] = ' and parent!="%s"' % self.name.replace('"', '\"')
args['set_modified'] = ''
if change_modified:
args['set_modified'] = ', modified = now(), modified_by = "{0}"'\
.format(frappe.db.escape(frappe.session.user))
self._update_children(args)
self._update_children(args, update_modified)
if "percent_join_field" in args:
self._update_percent_field(args)
self._update_percent_field_in_targets(args, update_modified)
def _update_children(self, args):
def _update_children(self, args, update_modified):
"""Update quantities or amount in child table"""
for d in self.get_all_children():
if d.doctype != args['source_dt']:
continue
self._update_modified(args, update_modified)
# updates qty in the child table
args['detail_id'] = d.get(args['join_field'])
@@ -212,44 +210,58 @@ class StatusUpdater(Document):
if not args.get("extra_cond"): args["extra_cond"] = ""
frappe.db.sql("""update `tab%(target_dt)s`
set %(target_field)s = (select ifnull(sum(%(source_field)s), 0)
from `tab%(source_dt)s` where `%(join_field)s`="%(detail_id)s"
and (docstatus=1 %(cond)s) %(extra_cond)s) %(second_source_condition)s
set %(target_field)s = (
(select ifnull(sum(%(source_field)s), 0)
from `tab%(source_dt)s` where `%(join_field)s`="%(detail_id)s"
and (docstatus=1 %(cond)s) %(extra_cond)s)
%(second_source_condition)s
)
%(update_modified)s
where name='%(detail_id)s'""" % args)
def _update_percent_field(self, args):
def _update_percent_field_in_targets(self, args, update_modified=True):
"""Update percent field in parent transaction"""
unique_transactions = set([d.get(args['percent_join_field']) for d in self.get_all_children(args['source_dt'])])
distinct_transactions = set([d.get(args['percent_join_field'])
for d in self.get_all_children(args['source_dt'])])
for name in unique_transactions:
if not name:
continue
for name in distinct_transactions:
if name:
args['name'] = name
self._update_percent_field(args, update_modified)
args['name'] = name
def _update_percent_field(self, args, update_modified=True):
"""Update percent field in parent transaction"""
# update percent complete in the parent table
if args.get('target_parent_field'):
frappe.db.sql("""update `tab%(target_parent_dt)s`
set %(target_parent_field)s = round(
ifnull((select
ifnull(sum(if(%(target_ref_field)s > %(target_field)s, %(target_field)s, %(target_ref_field)s)), 0)
/ sum(%(target_ref_field)s) * 100
from `tab%(target_dt)s` where parent="%(name)s"), 0), 2)
%(set_modified)s
where name='%(name)s'""" % args)
self._update_modified(args, update_modified)
# update field
if args.get('status_field'):
frappe.db.sql("""update `tab%(target_parent_dt)s`
set %(status_field)s = if(%(target_parent_field)s<0.001,
'Not %(keyword)s', if(%(target_parent_field)s>=99.99,
'Fully %(keyword)s', 'Partly %(keyword)s'))
where name='%(name)s'""" % args)
if args.get('target_parent_field'):
frappe.db.sql("""update `tab%(target_parent_dt)s`
set %(target_parent_field)s = round(
ifnull((select
ifnull(sum(if(%(target_ref_field)s > %(target_field)s, %(target_field)s, %(target_ref_field)s)), 0)
/ sum(%(target_ref_field)s) * 100
from `tab%(target_dt)s` where parent="%(name)s"), 0), 2)
%(update_modified)s
where name='%(name)s'""" % args)
if args.get("set_modified"):
target = frappe.get_doc(args["target_parent_dt"], name)
target.set_status(update=True)
target.notify_update()
# update field
if args.get('status_field'):
frappe.db.sql("""update `tab%(target_parent_dt)s`
set %(status_field)s = if(%(target_parent_field)s<0.001,
'Not %(keyword)s', if(%(target_parent_field)s>=99.99,
'Fully %(keyword)s', 'Partly %(keyword)s'))
where name='%(name)s'""" % args)
if update_modified:
target = frappe.get_doc(args["target_parent_dt"], args["name"])
target.set_status(update=True)
target.notify_update()
def _update_modified(self, args, update_modified):
args['update_modified'] = ''
if update_modified:
args['update_modified'] = ', modified = now(), modified_by = "{0}"'\
.format(frappe.db.escape(frappe.session.user))
def update_billing_status_for_zero_amount_refdoc(self, ref_dt):
ref_fieldname = ref_dt.lower().replace(" ", "_")

View File

@@ -312,6 +312,16 @@ class StockController(AccountsController):
for w in warehouses:
validate_warehouse_company(w, self.company)
def update_billing_percentage(self, update_modified=True):
self._update_percent_field({
"target_dt": self.doctype + " Item",
"target_parent_dt": self.doctype,
"target_parent_field": "per_billed",
"target_ref_field": "amount",
"target_field": "billed_amt",
"name": self.name,
}, update_modified)
def update_gl_entries_after(posting_date, posting_time, for_warehouses=None, for_items=None,
warehouse_account=None):

View File

@@ -90,12 +90,12 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
var frm = cur_frm;
if(frm.perm[0].write && doc.docstatus==0) {
if(frm.doc.status==="Open") {
frm.add_custom_button("Close", function() {
frm.add_custom_button(__("Close"), function() {
frm.set_value("status", "Closed");
frm.save();
});
} else {
frm.add_custom_button("Reopen", function() {
frm.add_custom_button(__("Reopen"), function() {
frm.set_value("status", "Open");
frm.save();
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 743 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 536 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

View File

@@ -35,7 +35,7 @@
Version
</td>
<td>
<code>6.15.1</code>
<code>6.16.2</code>
</td>
</tr>
</table>
@@ -52,4 +52,4 @@
<!-- autodoc -->
<!-- jinja -->
<!-- static -->
<!-- static -->

View File

@@ -152,7 +152,7 @@
<td >
Date</td>
<td >
From Date
From Invoice Date
</td>
<td></td>
@@ -164,7 +164,7 @@
<td >
Date</td>
<td >
To Date
To Invoice Date
</td>
<td></td>
@@ -176,7 +176,7 @@
<td >
Currency</td>
<td >
Minimum Amount
Minimum Invoice Amount
</td>
<td></td>
@@ -188,7 +188,7 @@
<td >
Currency</td>
<td >
Maximum Amount
Maximum Invoice Amount
</td>
<td></td>

View File

@@ -413,15 +413,6 @@ Net Weight</pre>
</li>
<li>
<a href="https://frappe.github.io/erpnext/current/models/shopping_cart/shopping_cart_shipping_rule">Shopping Cart Shipping Rule</a>
</li>
</ul>

View File

@@ -310,27 +310,6 @@ Supplier of Goods or Services.
<td></td>
</tr>
<tr >
<td>20</td>
<td ><code>communications</code></td>
<td >
Table</td>
<td class="text-muted" title="Hidden">
Communications
</td>
<td>
<a href="https://frappe.github.io/erpnext/current/models/core/communication">Communication</a>
</td>
</tr>
</tbody>
</table>

View File

@@ -679,18 +679,6 @@ Cheque</pre>
<tr >
<td>45</td>
<td ><code>emergency_contact_details</code></td>
<td >
HTML</td>
<td >
Emergency Contact Details
</td>
<td></td>
</tr>
<tr >
<td>46</td>
<td ><code>person_to_be_contacted</code></td>
<td >
Data</td>
@@ -702,7 +690,7 @@ Cheque</pre>
</tr>
<tr >
<td>47</td>
<td>46</td>
<td ><code>relation</code></td>
<td >
Data</td>
@@ -714,7 +702,7 @@ Cheque</pre>
</tr>
<tr >
<td>48</td>
<td>47</td>
<td ><code>emergency_phone_number</code></td>
<td >
Data</td>
@@ -726,7 +714,7 @@ Cheque</pre>
</tr>
<tr >
<td>49</td>
<td>48</td>
<td ><code>column_break4</code></td>
<td class="info">
Column Break</td>
@@ -738,7 +726,7 @@ Cheque</pre>
</tr>
<tr >
<td>50</td>
<td>49</td>
<td ><code>permanent_accommodation_type</code></td>
<td >
Select</td>
@@ -754,7 +742,7 @@ Owned</pre>
</tr>
<tr >
<td>51</td>
<td>50</td>
<td ><code>permanent_address</code></td>
<td >
Small Text</td>
@@ -766,7 +754,7 @@ Owned</pre>
</tr>
<tr >
<td>52</td>
<td>51</td>
<td ><code>current_accommodation_type</code></td>
<td >
Select</td>
@@ -782,7 +770,7 @@ Owned</pre>
</tr>
<tr >
<td>53</td>
<td>52</td>
<td ><code>current_address</code></td>
<td >
Small Text</td>
@@ -794,7 +782,7 @@ Owned</pre>
</tr>
<tr class="info">
<td>54</td>
<td>53</td>
<td ><code>sb53</code></td>
<td >
Section Break</td>
@@ -806,7 +794,7 @@ Owned</pre>
</tr>
<tr >
<td>55</td>
<td>54</td>
<td ><code>bio</code></td>
<td >
Text Editor</td>
@@ -819,7 +807,7 @@ Owned</pre>
</tr>
<tr class="info">
<td>56</td>
<td>55</td>
<td ><code>personal_details</code></td>
<td >
Section Break</td>
@@ -831,7 +819,7 @@ Owned</pre>
</tr>
<tr >
<td>57</td>
<td>56</td>
<td ><code>column_break5</code></td>
<td class="info">
Column Break</td>
@@ -843,7 +831,7 @@ Owned</pre>
</tr>
<tr >
<td>58</td>
<td>57</td>
<td ><code>passport_number</code></td>
<td >
Data</td>
@@ -855,7 +843,7 @@ Owned</pre>
</tr>
<tr >
<td>59</td>
<td>58</td>
<td ><code>date_of_issue</code></td>
<td >
Date</td>
@@ -867,7 +855,7 @@ Owned</pre>
</tr>
<tr >
<td>60</td>
<td>59</td>
<td ><code>valid_upto</code></td>
<td >
Date</td>
@@ -879,7 +867,7 @@ Owned</pre>
</tr>
<tr >
<td>61</td>
<td>60</td>
<td ><code>place_of_issue</code></td>
<td >
Data</td>
@@ -891,7 +879,7 @@ Owned</pre>
</tr>
<tr >
<td>62</td>
<td>61</td>
<td ><code>column_break6</code></td>
<td class="info">
Column Break</td>
@@ -903,7 +891,7 @@ Owned</pre>
</tr>
<tr >
<td>63</td>
<td>62</td>
<td ><code>marital_status</code></td>
<td >
Select</td>
@@ -921,7 +909,7 @@ Widowed</pre>
</tr>
<tr >
<td>64</td>
<td>63</td>
<td ><code>blood_group</code></td>
<td >
Select</td>
@@ -943,7 +931,7 @@ O-</pre>
</tr>
<tr >
<td>65</td>
<td>64</td>
<td ><code>family_background</code></td>
<td >
Small Text</td>
@@ -956,7 +944,7 @@ O-</pre>
</tr>
<tr >
<td>66</td>
<td>65</td>
<td ><code>health_details</code></td>
<td >
Small Text</td>
@@ -969,7 +957,7 @@ O-</pre>
</tr>
<tr class="info">
<td>67</td>
<td>66</td>
<td ><code>educational_qualification</code></td>
<td >
Section Break</td>
@@ -981,7 +969,7 @@ O-</pre>
</tr>
<tr >
<td>68</td>
<td>67</td>
<td ><code>education</code></td>
<td >
Table</td>
@@ -1002,7 +990,7 @@ O-</pre>
</tr>
<tr class="info">
<td>69</td>
<td>68</td>
<td ><code>previous_work_experience</code></td>
<td >
Section Break</td>
@@ -1016,7 +1004,7 @@ O-</pre>
</tr>
<tr >
<td>70</td>
<td>69</td>
<td ><code>external_work_history</code></td>
<td >
Table</td>
@@ -1037,7 +1025,7 @@ O-</pre>
</tr>
<tr class="info">
<td>71</td>
<td>70</td>
<td ><code>history_in_company</code></td>
<td >
Section Break</td>
@@ -1051,7 +1039,7 @@ O-</pre>
</tr>
<tr >
<td>72</td>
<td>71</td>
<td ><code>internal_work_history</code></td>
<td >
Table</td>
@@ -1072,7 +1060,7 @@ O-</pre>
</tr>
<tr class="info">
<td>73</td>
<td>72</td>
<td ><code>exit</code></td>
<td >
Section Break</td>
@@ -1084,7 +1072,7 @@ O-</pre>
</tr>
<tr >
<td>74</td>
<td>73</td>
<td ><code>column_break7</code></td>
<td class="info">
Column Break</td>
@@ -1096,7 +1084,7 @@ O-</pre>
</tr>
<tr >
<td>75</td>
<td>74</td>
<td ><code>resignation_letter_date</code></td>
<td >
Date</td>
@@ -1108,7 +1096,7 @@ O-</pre>
</tr>
<tr >
<td>76</td>
<td>75</td>
<td ><code>relieving_date</code></td>
<td >
Date</td>
@@ -1120,7 +1108,7 @@ O-</pre>
</tr>
<tr >
<td>77</td>
<td>76</td>
<td ><code>reason_for_leaving</code></td>
<td >
Data</td>
@@ -1132,7 +1120,7 @@ O-</pre>
</tr>
<tr >
<td>78</td>
<td>77</td>
<td ><code>leave_encashed</code></td>
<td >
Select</td>
@@ -1148,7 +1136,7 @@ No</pre>
</tr>
<tr >
<td>79</td>
<td>78</td>
<td ><code>encashment_date</code></td>
<td >
Date</td>
@@ -1160,7 +1148,7 @@ No</pre>
</tr>
<tr >
<td>80</td>
<td>79</td>
<td ><code>exit_interview_details</code></td>
<td class="info">
Column Break</td>
@@ -1172,7 +1160,7 @@ No</pre>
</tr>
<tr >
<td>81</td>
<td>80</td>
<td ><code>held_on</code></td>
<td >
Date</td>
@@ -1184,7 +1172,7 @@ No</pre>
</tr>
<tr >
<td>82</td>
<td>81</td>
<td ><code>reason_for_resignation</code></td>
<td >
Select</td>
@@ -1200,7 +1188,7 @@ Health Concerns</pre>
</tr>
<tr >
<td>83</td>
<td>82</td>
<td ><code>new_workplace</code></td>
<td >
Data</td>
@@ -1212,7 +1200,7 @@ Health Concerns</pre>
</tr>
<tr >
<td>84</td>
<td>83</td>
<td ><code>feedback</code></td>
<td >
Small Text</td>

View File

@@ -138,27 +138,6 @@ Hold</pre>
<td></td>
</tr>
<tr >
<td>8</td>
<td ><code>communications</code></td>
<td >
Table</td>
<td class="text-muted" title="Hidden">
Communications
</td>
<td>
<a href="https://frappe.github.io/erpnext/current/models/core/communication">Communication</a>
</td>
</tr>
</tbody>
</table>

View File

@@ -366,18 +366,6 @@
<tr >
<td>21</td>
<td ><code>html_21</code></td>
<td >
HTML</td>
<td >
</td>
<td></td>
</tr>
<tr >
<td>22</td>
<td ><code>earnings</code></td>
<td >
Table</td>
@@ -398,7 +386,7 @@
</tr>
<tr >
<td>23</td>
<td>22</td>
<td ><code>deduction</code></td>
<td class="info">
Column Break</td>
@@ -410,19 +398,7 @@
</tr>
<tr >
<td>24</td>
<td ><code>html_24</code></td>
<td >
HTML</td>
<td >
</td>
<td></td>
</tr>
<tr >
<td>25</td>
<td>23</td>
<td ><code>deductions</code></td>
<td >
Table</td>
@@ -443,7 +419,7 @@
</tr>
<tr class="info">
<td>26</td>
<td>24</td>
<td ><code>totals</code></td>
<td >
Section Break</td>
@@ -455,7 +431,7 @@
</tr>
<tr >
<td>27</td>
<td>25</td>
<td ><code>column_break_25</code></td>
<td class="info">
Column Break</td>
@@ -467,7 +443,7 @@
</tr>
<tr >
<td>28</td>
<td>26</td>
<td ><code>column_break_26</code></td>
<td class="info">
Column Break</td>
@@ -479,7 +455,7 @@
</tr>
<tr >
<td>29</td>
<td>27</td>
<td ><code>arrear_amount</code></td>
<td >
Currency</td>
@@ -493,7 +469,7 @@
</tr>
<tr >
<td>30</td>
<td>28</td>
<td ><code>leave_encashment_amount</code></td>
<td >
Currency</td>
@@ -507,7 +483,7 @@
</tr>
<tr >
<td>31</td>
<td>29</td>
<td ><code>gross_pay</code></td>
<td >
Currency</td>
@@ -521,7 +497,7 @@
</tr>
<tr >
<td>32</td>
<td>30</td>
<td ><code>total_deduction</code></td>
<td >
Currency</td>
@@ -535,7 +511,7 @@
</tr>
<tr >
<td>33</td>
<td>31</td>
<td ><code>net_pay</code></td>
<td >
Currency</td>
@@ -550,7 +526,7 @@
</tr>
<tr >
<td>34</td>
<td>32</td>
<td ><code>rounded_total</code></td>
<td >
Currency</td>
@@ -564,7 +540,7 @@
</tr>
<tr >
<td>35</td>
<td>33</td>
<td ><code>total_in_words</code></td>
<td >
Data</td>

View File

@@ -499,27 +499,6 @@ Last Day of the Next Month</pre>
</td>
</tr>
<tr >
<td>32</td>
<td ><code>communications</code></td>
<td >
Table</td>
<td class="text-muted" title="Hidden">
Communications
</td>
<td>
<a href="https://frappe.github.io/erpnext/current/models/core/communication">Communication</a>
</td>
</tr>

View File

@@ -226,27 +226,6 @@ No</pre>
</td>
</tr>
<tr >
<td>13</td>
<td ><code>communications</code></td>
<td >
Table</td>
<td class="text-muted" title="Hidden">
Communications
</td>
<td>
<a href="https://frappe.github.io/erpnext/current/models/core/communication">Communication</a>
</td>
</tr>

View File

@@ -1316,20 +1316,8 @@ Campaign</pre>
</td>
</tr>
<tr >
<td>86</td>
<td ><code>per_billed</code></td>
<td >
Currency</td>
<td >
% Amount Billed
</td>
<td></td>
</tr>
<tr class="info">
<td>87</td>
<td>86</td>
<td ><code>printing_details</code></td>
<td >
Section Break</td>
@@ -1341,7 +1329,7 @@ Campaign</pre>
</tr>
<tr >
<td>88</td>
<td>87</td>
<td ><code>letter_head</code></td>
<td >
Link</td>
@@ -1362,7 +1350,7 @@ Campaign</pre>
</tr>
<tr >
<td>89</td>
<td>88</td>
<td ><code>select_print_heading</code></td>
<td >
Link</td>
@@ -1383,7 +1371,7 @@ Campaign</pre>
</tr>
<tr >
<td>90</td>
<td>89</td>
<td ><code>column_break_88</code></td>
<td class="info">
Column Break</td>
@@ -1395,7 +1383,7 @@ Campaign</pre>
</tr>
<tr >
<td>91</td>
<td>90</td>
<td ><code>print_without_amount</code></td>
<td >
Check</td>
@@ -1407,7 +1395,7 @@ Campaign</pre>
</tr>
<tr class="info">
<td>92</td>
<td>91</td>
<td ><code>section_break_83</code></td>
<td >
Section Break</td>
@@ -1419,7 +1407,7 @@ Campaign</pre>
</tr>
<tr >
<td>93</td>
<td>92</td>
<td class="danger" title="Mandatory"><code>status</code></td>
<td >
Select</td>
@@ -1430,15 +1418,14 @@ Campaign</pre>
<td>
<pre>
Draft
To Bill
Completed
Submitted
Cancelled
Closed</pre>
</td>
</tr>
<tr >
<td>94</td>
<td>93</td>
<td ><code>per_installed</code></td>
<td >
Percent</td>
@@ -1451,7 +1438,7 @@ Closed</pre>
</tr>
<tr >
<td>95</td>
<td>94</td>
<td ><code>installation_status</code></td>
<td >
Select</td>
@@ -1463,7 +1450,7 @@ Closed</pre>
</tr>
<tr >
<td>96</td>
<td>95</td>
<td ><code>column_break_89</code></td>
<td class="info">
Column Break</td>
@@ -1475,7 +1462,7 @@ Closed</pre>
</tr>
<tr >
<td>97</td>
<td>96</td>
<td ><code>to_warehouse</code></td>
<td >
Link</td>
@@ -1497,7 +1484,7 @@ Closed</pre>
</tr>
<tr >
<td>98</td>
<td>97</td>
<td ><code>excise_page</code></td>
<td >
Data</td>
@@ -1509,7 +1496,7 @@ Closed</pre>
</tr>
<tr >
<td>99</td>
<td>98</td>
<td ><code>instructions</code></td>
<td >
Text</td>
@@ -1521,7 +1508,7 @@ Closed</pre>
</tr>
<tr class="info">
<td>100</td>
<td>99</td>
<td ><code>sales_team_section_break</code></td>
<td >
Section Break</td>
@@ -1535,7 +1522,7 @@ Closed</pre>
</tr>
<tr >
<td>101</td>
<td>100</td>
<td ><code>sales_partner</code></td>
<td >
Link</td>
@@ -1556,7 +1543,7 @@ Closed</pre>
</tr>
<tr >
<td>102</td>
<td>101</td>
<td ><code>column_break7</code></td>
<td class="info">
Column Break</td>
@@ -1568,7 +1555,7 @@ Closed</pre>
</tr>
<tr >
<td>103</td>
<td>102</td>
<td ><code>commission_rate</code></td>
<td >
Float</td>
@@ -1580,7 +1567,7 @@ Closed</pre>
</tr>
<tr >
<td>104</td>
<td>103</td>
<td ><code>total_commission</code></td>
<td >
Currency</td>
@@ -1594,7 +1581,7 @@ Closed</pre>
</tr>
<tr class="info">
<td>105</td>
<td>104</td>
<td ><code>section_break1</code></td>
<td >
Section Break</td>
@@ -1606,7 +1593,7 @@ Closed</pre>
</tr>
<tr >
<td>106</td>
<td>105</td>
<td ><code>sales_team</code></td>
<td >
Table</td>

View File

@@ -746,20 +746,6 @@
<tr >
<td>49</td>
<td ><code>billed_amt</code></td>
<td >
Currency</td>
<td >
Billed Amt
</td>
<td>
<pre>currency</pre>
</td>
</tr>
<tr >
<td>50</td>
<td ><code>page_break</code></td>
<td >
Check</td>

View File

@@ -1082,8 +1082,7 @@ Yes</pre>
<td>
<pre>
Draft
To Bill
Completed
Submitted
Cancelled
Closed</pre>
</td>
@@ -1158,18 +1157,6 @@ Closed</pre>
<tr >
<td>77</td>
<td ><code>per_billed</code></td>
<td >
Percent</td>
<td >
% Amount Billed
</td>
<td></td>
</tr>
<tr >
<td>78</td>
<td class="danger" title="Mandatory"><code>company</code></td>
<td >
Link</td>
@@ -1190,7 +1177,7 @@ Closed</pre>
</tr>
<tr >
<td>79</td>
<td>78</td>
<td class="danger" title="Mandatory"><code>fiscal_year</code></td>
<td >
Link</td>
@@ -1211,7 +1198,7 @@ Closed</pre>
</tr>
<tr class="info">
<td>80</td>
<td>79</td>
<td ><code>printing_settings</code></td>
<td >
Section Break</td>
@@ -1223,7 +1210,7 @@ Closed</pre>
</tr>
<tr >
<td>81</td>
<td>80</td>
<td ><code>letter_head</code></td>
<td >
Link</td>
@@ -1244,7 +1231,7 @@ Closed</pre>
</tr>
<tr >
<td>82</td>
<td>81</td>
<td ><code>select_print_heading</code></td>
<td >
Link</td>
@@ -1265,7 +1252,7 @@ Closed</pre>
</tr>
<tr >
<td>83</td>
<td>82</td>
<td ><code>other_details</code></td>
<td >
HTML</td>
@@ -1277,7 +1264,7 @@ Closed</pre>
</tr>
<tr >
<td>84</td>
<td>83</td>
<td ><code>instructions</code></td>
<td >
Small Text</td>
@@ -1289,7 +1276,7 @@ Closed</pre>
</tr>
<tr >
<td>85</td>
<td>84</td>
<td ><code>remarks</code></td>
<td >
Small Text</td>
@@ -1301,7 +1288,7 @@ Closed</pre>
</tr>
<tr class="info">
<td>86</td>
<td>85</td>
<td ><code>transporter_info</code></td>
<td >
Section Break</td>
@@ -1315,7 +1302,7 @@ Closed</pre>
</tr>
<tr >
<td>87</td>
<td>86</td>
<td ><code>transporter_name</code></td>
<td >
Data</td>
@@ -1327,7 +1314,7 @@ Closed</pre>
</tr>
<tr >
<td>88</td>
<td>87</td>
<td ><code>column_break5</code></td>
<td class="info">
Column Break</td>
@@ -1339,7 +1326,7 @@ Closed</pre>
</tr>
<tr >
<td>89</td>
<td>88</td>
<td ><code>lr_no</code></td>
<td >
Data</td>
@@ -1351,7 +1338,7 @@ Closed</pre>
</tr>
<tr >
<td>90</td>
<td>89</td>
<td ><code>lr_date</code></td>
<td >
Date</td>

View File

@@ -794,18 +794,6 @@
<tr >
<td>53</td>
<td ><code>billed_amt</code></td>
<td >
Currency</td>
<td >
Billed Amt
</td>
<td></td>
</tr>
<tr >
<td>54</td>
<td ><code>brand</code></td>
<td >
Link</td>
@@ -826,7 +814,7 @@
</tr>
<tr >
<td>55</td>
<td>54</td>
<td ><code>item_group</code></td>
<td >
Link</td>
@@ -847,7 +835,7 @@
</tr>
<tr >
<td>56</td>
<td>55</td>
<td ><code>rm_supp_cost</code></td>
<td >
Currency</td>
@@ -861,7 +849,7 @@
</tr>
<tr >
<td>57</td>
<td>56</td>
<td ><code>item_tax_amount</code></td>
<td >
Currency</td>
@@ -875,7 +863,7 @@
</tr>
<tr >
<td>58</td>
<td>57</td>
<td ><code>landed_cost_voucher_amount</code></td>
<td >
Currency</td>
@@ -887,7 +875,7 @@
</tr>
<tr >
<td>59</td>
<td>58</td>
<td ><code>valuation_rate</code></td>
<td >
Currency</td>
@@ -901,7 +889,7 @@
</tr>
<tr >
<td>60</td>
<td>59</td>
<td ><code>item_tax_rate</code></td>
<td >
Small Text</td>
@@ -915,7 +903,7 @@ Used for Taxes and Charges</p>
</tr>
<tr >
<td>61</td>
<td>60</td>
<td ><code>page_break</code></td>
<td >
Check</td>

View File

@@ -36,6 +36,6 @@ On submission of Stock Reconciliation, depreciation will booked for items asset
<img alt="Project Default Cost Center" class="screenshot" src="{{docs_base_url}}/assets/img/articles/depreciation-4.png">
Click [here]({{docs_base_url}}/user/manual/en/setting-up/stock-reconciliation-for-non-serialized-item) for steps to be followed when making Stock Reconciliation entry.
Click [here]({{docs_base_url}}/user/manual/en/setting-up/stock-reconciliation-for-non-serialized-item.html) for steps to be followed when making Stock Reconciliation entry.
<!-- markdown -->

View File

@@ -0,0 +1,5 @@
# Fiscal Year Creation
New Fiscal Year should be created each year, at the end of the current fiscal year. Creation of new Fiscal Year before its begining has been automated in ERPNext.
Three days prior to the end of the current Fiscal Year, system checks if new Fiscal Year for the incoming year is already created. If not, then system auto-creates new Fiscal Year.

View File

@@ -12,7 +12,7 @@ Only User with System Manager's Role Assigned has permission to create new Fisca
`Accounts > Setup > Fiscal Year`
Click [here]({{docs_base_url}}/user/manual/en/accounts/setup/fiscal-year) to learn more about Fiscal Year.
Click [here]({{docs_base_url}}/user/manual/en/accounts/setup/fiscal-year.html) to learn more about Fiscal Year.
#### Set Fiscal Year as Default
@@ -29,4 +29,5 @@ Default Fiscal Year will be updated in the Global Default setting as well. You c
Save Global Default, and Reload your ERPNext account. Then, default Fiscal Year will be auto-updated in your transactions.
Note: In transactions, you can manually select required Fiscal Year, from More Info section.
<!-- markdown -->

View File

@@ -0,0 +1,21 @@
#Freeze Accounting Entries
To freeze accounting entries upto a certain date, follow below given steps.
#### Step 1: Go to:
`Accounts > Setup > Accounts Settings`
#### Step 2: Set Date
Set date in the **Accounts Frozen Upto** field.
<img alt="Accounts Frozen Date" class="screenshot" src="{{docs_base_url}}/assets/img/articles/frozen-date-1.png">
Now, the system will not allow to make any accounting entries before set date. If at all someone tries creating entries, system will show error message as below.
<img alt="Frozen Date Error" class="screenshot" src="{{docs_base_url}}/assets/img/articles/frozen-date-2.png">
You can still allow user with certain role to create/edit entries beyound accounts frozen date. You can set that Role in the Account Settings itself.
<img alt="Frozen Date Error" class="screenshot" src="{{docs_base_url}}/assets/img/articles/frozen-date-3.png">

View File

@@ -1,18 +0,0 @@
#How to freeze accounting entries upto a specific date?
To freeze accounting entries upto a certain date, follow these steps:
#### Step 1: Go to
`Accounts > Setup > Accounts Settings
#### Step 2: Set the date in:
Accounts Frozen Upto field.
<img src="{{docs_base_path}}/assets/img/articles/freeze-accounting-entry.png" height="302" width="488">
Now, the system will not allow to make accounting entries before that date.
But you can allow a specific Role, to make/edit accounting entries before that date. To do that set the desired **Role**, in Role Allowed to Set Frozen Accounts &amp; Edit Frozen Entries field.

View File

@@ -4,16 +4,12 @@ changing-parent-account
depreciation-for-fixed-asset-items
difference-entry-button
fiscal-year-error
how-to-freeze-accounting-entries-upto-a-specific-date
how-to-freeze-accounting-ledger
freeze-accounting-entries
how-to-freeze-accouting-ledger
manage-foreign-exchange-difference
managing-transactions-in-multiple-currency
new-fiscal-year-auto-create-feature
pos-view
fiscal-year-creation
post-dated-cheque-entry
pricing-rule
recurring-order-and-invoices
update-stock-option-in-sales-invoice
updating-opening-balance-in-accounts-using-temporary-account
what-is-the-differences-of-total-and-valuation-in-tax-and-charges
withdrawing-salary-from-owners-equity-account
withdrawing-salary-from-owners-equity-account

Some files were not shown because too many files have changed in this diff Show More