Merge branch 'hotfix'

This commit is contained in:
Anand Doshi 2016-04-27 15:43:21 +05:30
commit 1e2a3f58c1
8 changed files with 48 additions and 7 deletions

View File

@ -1,2 +1,2 @@
from __future__ import unicode_literals from __future__ import unicode_literals
__version__ = '6.27.11' __version__ = '6.27.12'

View File

@ -40,6 +40,11 @@ class FiscalYear(Document):
def on_update(self): def on_update(self):
check_duplicate_fiscal_year(self) check_duplicate_fiscal_year(self)
def on_trash(self):
global_defaults = frappe.get_doc("Global Defaults")
if global_defaults.current_fiscal_year == self.name:
frappe.throw(_("You cannot delete Fiscal Year {0}. Fiscal Year {0} is set as default in Global Settings").format(self.name))
@frappe.whitelist() @frappe.whitelist()
def check_duplicate_fiscal_year(doc): def check_duplicate_fiscal_year(doc):

View File

@ -161,6 +161,8 @@ def accumulate_values_into_parents(accounts, accounts_by_name):
def prepare_data(accounts, filters, total_row, parent_children_map): def prepare_data(accounts, filters, total_row, parent_children_map):
data = [] data = []
company_currency = frappe.db.get_value("Company", filters.company, "default_currency")
for d in accounts: for d in accounts:
has_value = False has_value = False
row = { row = {
@ -169,7 +171,8 @@ def prepare_data(accounts, filters, total_row, parent_children_map):
"parent_account": d.parent_account, "parent_account": d.parent_account,
"indent": d.indent, "indent": d.indent,
"from_date": filters.from_date, "from_date": filters.from_date,
"to_date": filters.to_date "to_date": filters.to_date,
"currency": company_currency
} }
prepare_opening_and_closing(d) prepare_opening_and_closing(d)
@ -201,37 +204,50 @@ def get_columns():
"fieldname": "opening_debit", "fieldname": "opening_debit",
"label": _("Opening (Dr)"), "label": _("Opening (Dr)"),
"fieldtype": "Currency", "fieldtype": "Currency",
"options": "currency",
"width": 120 "width": 120
}, },
{ {
"fieldname": "opening_credit", "fieldname": "opening_credit",
"label": _("Opening (Cr)"), "label": _("Opening (Cr)"),
"fieldtype": "Currency", "fieldtype": "Currency",
"options": "currency",
"width": 120 "width": 120
}, },
{ {
"fieldname": "debit", "fieldname": "debit",
"label": _("Debit"), "label": _("Debit"),
"fieldtype": "Currency", "fieldtype": "Currency",
"options": "currency",
"width": 120 "width": 120
}, },
{ {
"fieldname": "credit", "fieldname": "credit",
"label": _("Credit"), "label": _("Credit"),
"fieldtype": "Currency", "fieldtype": "Currency",
"options": "currency",
"width": 120 "width": 120
}, },
{ {
"fieldname": "closing_debit", "fieldname": "closing_debit",
"label": _("Closing (Dr)"), "label": _("Closing (Dr)"),
"fieldtype": "Currency", "fieldtype": "Currency",
"options": "currency",
"width": 120 "width": 120
}, },
{ {
"fieldname": "closing_credit", "fieldname": "closing_credit",
"label": _("Closing (Cr)"), "label": _("Closing (Cr)"),
"fieldtype": "Currency", "fieldtype": "Currency",
"options": "currency",
"width": 120 "width": 120
},
{
"fieldname": "currency",
"label": _("Currency"),
"fieldtype": "Link",
"options": "Currency",
"hidden": 1
} }
] ]

View File

@ -21,7 +21,7 @@ def execute(filters=None):
def get_data(filters, show_party_name): def get_data(filters, show_party_name):
party_name_field = "customer_name" if filters.get("party_type")=="Customer" else "supplier_name" party_name_field = "customer_name" if filters.get("party_type")=="Customer" else "supplier_name"
parties = frappe.get_all(filters.get("party_type"), fields = ["name", party_name_field], order_by="name") parties = frappe.get_all(filters.get("party_type"), fields = ["name", party_name_field], order_by="name")
company_currency = frappe.db.get_value("Company", filters.company, "default_currency")
opening_balances = get_opening_balances(filters) opening_balances = get_opening_balances(filters)
balances_within_period = get_balances_within_period(filters) balances_within_period = get_balances_within_period(filters)
@ -57,6 +57,10 @@ def get_data(filters, show_party_name):
"closing_credit": closing_credit "closing_credit": closing_credit
}) })
row.update({
"currency": company_currency
})
has_value = False has_value = False
if (opening_debit or opening_credit or debit or credit or closing_debit or closing_credit): if (opening_debit or opening_credit or debit or credit or closing_debit or closing_credit):
has_value =True has_value =True
@ -69,7 +73,8 @@ def get_data(filters, show_party_name):
data.append({ data.append({
"party": "'" + _("Totals") + "'", "party": "'" + _("Totals") + "'",
"debit": total_debit, "debit": total_debit,
"credit": total_credit "credit": total_credit,
"currency": company_currency
}) })
return data return data
@ -138,37 +143,50 @@ def get_columns(filters, show_party_name):
"fieldname": "opening_debit", "fieldname": "opening_debit",
"label": _("Opening (Dr)"), "label": _("Opening (Dr)"),
"fieldtype": "Currency", "fieldtype": "Currency",
"options": "currency",
"width": 120 "width": 120
}, },
{ {
"fieldname": "opening_credit", "fieldname": "opening_credit",
"label": _("Opening (Cr)"), "label": _("Opening (Cr)"),
"fieldtype": "Currency", "fieldtype": "Currency",
"options": "currency",
"width": 120 "width": 120
}, },
{ {
"fieldname": "debit", "fieldname": "debit",
"label": _("Debit"), "label": _("Debit"),
"fieldtype": "Currency", "fieldtype": "Currency",
"options": "currency",
"width": 120 "width": 120
}, },
{ {
"fieldname": "credit", "fieldname": "credit",
"label": _("Credit"), "label": _("Credit"),
"fieldtype": "Currency", "fieldtype": "Currency",
"options": "currency",
"width": 120 "width": 120
}, },
{ {
"fieldname": "closing_debit", "fieldname": "closing_debit",
"label": _("Closing (Dr)"), "label": _("Closing (Dr)"),
"fieldtype": "Currency", "fieldtype": "Currency",
"options": "currency",
"width": 120 "width": 120
}, },
{ {
"fieldname": "closing_credit", "fieldname": "closing_credit",
"label": _("Closing (Cr)"), "label": _("Closing (Cr)"),
"fieldtype": "Currency", "fieldtype": "Currency",
"options": "currency",
"width": 120 "width": 120
},
{
"fieldname": "currency",
"label": _("Currency"),
"fieldtype": "Link",
"options": "Currency",
"hidden": 1
} }
] ]

View File

@ -7,7 +7,7 @@ app_publisher = "Frappe Technologies Pvt. Ltd."
app_description = """ERP made simple""" app_description = """ERP made simple"""
app_icon = "icon-th" app_icon = "icon-th"
app_color = "#e74c3c" app_color = "#e74c3c"
app_version = "6.27.11" app_version = "6.27.12"
app_email = "info@erpnext.com" app_email = "info@erpnext.com"
app_license = "GNU General Public License (v3)" app_license = "GNU General Public License (v3)"
source_link = "https://github.com/frappe/erpnext" source_link = "https://github.com/frappe/erpnext"

View File

@ -206,3 +206,5 @@ def get_month_details(year, month):
'month_end_date': med, 'month_end_date': med,
'month_days': month_days 'month_days': month_days
}) })
else:
frappe.throw(_("Fiscal Year {0} not found").format(year))

View File

@ -503,7 +503,7 @@ apps/erpnext/erpnext/setup/setup_wizard/install_fixtures.py +139,Proposal Writin
apps/erpnext/erpnext/setup/doctype/sales_person/sales_person.py +35,Another Sales Person {0} exists with the same Employee id,شخص آخر مبيعات {0} موجود مع نفس الرقم الوظيفي apps/erpnext/erpnext/setup/doctype/sales_person/sales_person.py +35,Another Sales Person {0} exists with the same Employee id,شخص آخر مبيعات {0} موجود مع نفس الرقم الوظيفي
apps/erpnext/erpnext/config/accounts.py +70,Masters,الماجستير apps/erpnext/erpnext/config/accounts.py +70,Masters,الماجستير
apps/erpnext/erpnext/config/accounts.py +127,Update Bank Transaction Dates,تواريخ عملية البنك التحديث apps/erpnext/erpnext/config/accounts.py +127,Update Bank Transaction Dates,تواريخ عملية البنك التحديث
apps/erpnext/erpnext/stock/stock_ledger.py +337,Negative Stock Error ({6}) for Item {0} in Warehouse {1} on {2} {3} in {4} {5},خطأ الأسهم السلبية ( { } 6 ) القطعة ل {0} في {1} في معرض النماذج ثلاثية على {2} {3} {4} في {5} apps/erpnext/erpnext/stock/stock_ledger.py +337,Negative Stock Error ({6}) for Item {0} in Warehouse {1} on {2} {3} in {4} {5},خطأ الأسهم السلبية ( {6} ) القطعة ل {0} في {1} في معرض النماذج ثلاثية على {2} {3} {4} في {5}
apps/erpnext/erpnext/config/projects.py +30,Time Tracking,تتبع الوقت apps/erpnext/erpnext/config/projects.py +30,Time Tracking,تتبع الوقت
DocType: Fiscal Year Company,Fiscal Year Company,الشركة السنة المالية DocType: Fiscal Year Company,Fiscal Year Company,الشركة السنة المالية
DocType: Packing Slip Item,DN Detail,DN التفاصيل DocType: Packing Slip Item,DN Detail,DN التفاصيل

1 DocType: Employee Salary Mode وضع الراتب
503 DocType: Time Log Billed توصف
504 DocType: Batch Batch Description دفعة الوصف
505 DocType: Delivery Note Time at which items were delivered from warehouse الوقت الذي تم تسليم العناصر من مستودع
506 DocType: Sales Invoice Sales Taxes and Charges الضرائب على المبيعات والرسوم
507 DocType: Employee Organization Profile الملف الشخصي المنظمة
508 DocType: Employee Reason for Resignation سبب الاستقالة
509 apps/erpnext/erpnext/config/hr.py +151 Template for performance appraisals. نموذج ل تقييم الأداء.

View File

@ -1,7 +1,7 @@
from setuptools import setup, find_packages from setuptools import setup, find_packages
from pip.req import parse_requirements from pip.req import parse_requirements
version = "6.27.11" version = "6.27.12"
requirements = parse_requirements("requirements.txt", session="") requirements = parse_requirements("requirements.txt", session="")
setup( setup(