mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-31 07:28:04 +00:00
[fix] demo and process payroll for demo (#7224)
* [fix] demo and process payroll for demo * [fix] set payroll dates
This commit is contained in:
@@ -7,15 +7,17 @@ from __future__ import unicode_literals
|
||||
import frappe
|
||||
from frappe import _
|
||||
from frappe.model.document import Document
|
||||
from frappe.utils import get_datetime, get_datetime_str, formatdate
|
||||
from frappe.utils import get_datetime_str, formatdate, nowdate
|
||||
|
||||
class CurrencyExchange(Document):
|
||||
def autoname(self):
|
||||
self.name = formatdate(get_datetime_str(self.date),"yyyy-MM-dd") + "-" + self.from_currency + "-" + self.to_currency
|
||||
#self.name = self.date + "-" + self.from_currency + "-" + self.to_currency
|
||||
def autoname(self):
|
||||
if not self.date:
|
||||
self.date = nowdate()
|
||||
self.name = '{0}-{1}-{2}'.format(formatdate(get_datetime_str(self.date), "yyyy-MM-dd"),
|
||||
self.from_currency, self.to_currency)
|
||||
|
||||
def validate(self):
|
||||
self.validate_value("exchange_rate", ">", 0)
|
||||
def validate(self):
|
||||
self.validate_value("exchange_rate", ">", 0)
|
||||
|
||||
if self.from_currency == self.to_currency:
|
||||
frappe.throw(_("From Currency and To Currency cannot be same"))
|
||||
if self.from_currency == self.to_currency:
|
||||
frappe.throw(_("From Currency and To Currency cannot be same"))
|
||||
|
||||
@@ -31,8 +31,8 @@ def install(country=None):
|
||||
'is_group': 0, 'parent_item_group': _('All Item Groups') },
|
||||
|
||||
# salary component
|
||||
{'doctype': 'Salary Component', 'salary_component': _('Income Tax'), 'description': _('Income Tax')},
|
||||
{'doctype': 'Salary Component', 'salary_component': _('Basic'), 'description': _('Basic')},
|
||||
{'doctype': 'Salary Component', 'salary_component': _('Income Tax'), 'description': _('Income Tax'), 'type': 'Deduction'},
|
||||
{'doctype': 'Salary Component', 'salary_component': _('Basic'), 'description': _('Basic'), 'type': 'Earning'},
|
||||
|
||||
# expense claim type
|
||||
{'doctype': 'Expense Claim Type', 'name': _('Calls'), 'expense_type': _('Calls')},
|
||||
@@ -186,9 +186,6 @@ def install(country=None):
|
||||
|
||||
{'doctype': "Print Heading", 'print_heading': _("Credit Note")},
|
||||
{'doctype': "Print Heading", 'print_heading': _("Debit Note")},
|
||||
|
||||
{"doctype": "Salary Component", "salary_component": _("Basic")},
|
||||
{"doctype": "Salary Component", "salary_component": _("Income Tax")},
|
||||
]
|
||||
|
||||
from erpnext.setup.setup_wizard.industry_type import get_industry_types
|
||||
|
||||
Reference in New Issue
Block a user