Merge branch 'develop'

This commit is contained in:
Nabin Hait 2016-02-03 15:23:56 +05:30
commit 2d4cc7e71f
192 changed files with 11198 additions and 8978 deletions

View File

@ -1,2 +1,2 @@
from __future__ import unicode_literals
__version__ = '6.19.0'
__version__ = '6.20.0'

View File

@ -209,9 +209,7 @@ class JournalEntry(AccountsController):
account = self.reference_accounts[reference_name]
if reference_type in ("Sales Order", "Purchase Order"):
order = frappe.db.get_value(reference_type, reference_name,
["docstatus", "per_billed", "status", "advance_paid",
"base_grand_total", "grand_total", "currency"], as_dict=1)
order = frappe.get_doc(reference_type, reference_name)
if order.docstatus != 1:
frappe.throw(_("{0} {1} is not submitted").format(reference_type, reference_name))
@ -225,12 +223,16 @@ class JournalEntry(AccountsController):
account_currency = get_account_currency(account)
if account_currency == self.company_currency:
voucher_total = order.base_grand_total
formatted_voucher_total = fmt_money(voucher_total, order.precision("base_grand_total"),
currency=account_currency)
else:
voucher_total = order.grand_total
formatted_voucher_total = fmt_money(voucher_total, order.precision("grand_total"),
currency=account_currency)
if flt(voucher_total) < (flt(order.advance_paid) + total):
frappe.throw(_("Advance paid against {0} {1} cannot be greater \
than Grand Total {2}").format(reference_type, reference_name, voucher_total))
than Grand Total {2}").format(reference_type, reference_name, formatted_voucher_total))
def validate_invoices(self):
"""Validate totals and docstatus for invoices"""
@ -797,7 +799,7 @@ def get_exchange_rate(account, account_currency=None, company=None,
company_currency = get_company_currency(company)
if account_currency != company_currency:
if reference_type in ("Sales Invoice", "Purchase Invoice") and reference_name:
if reference_type and reference_name and frappe.get_meta(reference_type).get_field("conversion_rate"):
exchange_rate = frappe.db.get_value(reference_type, reference_name, "conversion_rate")
elif account_details and account_details.account_type == "Bank" and \

View File

@ -42,6 +42,10 @@ frappe.ui.form.on("Payment Tool", "refresh", function(frm) {
frappe.ui.form.trigger("Payment Tool", "party_type");
});
frappe.ui.form.on("Payment Tool", "party_type", function(frm) {
frm.set_value("received_or_paid", frm.doc.party_type=="Customer" ? "Received" : "Paid");
});
frappe.ui.form.on("Payment Tool", "party", function(frm) {
if(frm.doc.party_type && frm.doc.party) {
return frappe.call({

View File

@ -71,7 +71,9 @@ class PaymentTool(Document):
d2.account = self.payment_account
d2.account_currency = bank_account_currency
d2.account_type = bank_account_type
d2.exchange_rate = get_exchange_rate(self.payment_account, self.company)
d2.exchange_rate = get_exchange_rate(self.payment_account, bank_account_currency, self.company,
debit=(abs(total_payment_amount) if total_payment_amount < 0 else 0),
credit=(total_payment_amount if total_payment_amount > 0 else 0))
d2.account_balance = get_balance_on(self.payment_account)
amount_field_bank = 'debit_in_account_currency' if total_payment_amount < 0 \

View File

@ -7,6 +7,7 @@
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "Document",
"fields": [
{
"allow_on_submit": 0,
@ -972,13 +973,13 @@
"collapsible": 0,
"fieldname": "target_warehouse",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"hidden": 1,
"ignore_user_permissions": 1,
"in_filter": 0,
"in_list_view": 0,
"label": "Target Warehouse",
"label": "Customer Warehouse (Optional)",
"length": 0,
"no_copy": 0,
"no_copy": 1,
"options": "Warehouse",
"permlevel": 0,
"precision": "",
@ -1444,7 +1445,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2016-01-06 02:23:06.432442",
"modified": "2016-02-01 11:16:58.288462",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice Item",

View File

@ -8,11 +8,12 @@ from frappe.utils import flt
from erpnext.accounts.report.financial_statements import (get_period_list, get_columns, get_data)
def execute(filters=None):
period_list = get_period_list(filters.fiscal_year, filters.periodicity, from_beginning=True)
asset = get_data(filters.company, "Asset", "Debit", period_list)
liability = get_data(filters.company, "Liability", "Credit", period_list)
equity = get_data(filters.company, "Equity", "Credit", period_list)
period_list = get_period_list(filters.fiscal_year, filters.periodicity)
asset = get_data(filters.company, "Asset", "Debit", period_list, only_current_fiscal_year=False)
liability = get_data(filters.company, "Liability", "Credit", period_list, only_current_fiscal_year=False)
equity = get_data(filters.company, "Equity", "Credit", period_list, only_current_fiscal_year=False)
provisional_profit_loss = get_provisional_profit_loss(asset, liability, equity,
period_list, filters.company)
@ -23,12 +24,13 @@ def execute(filters=None):
if provisional_profit_loss:
data.append(provisional_profit_loss)
columns = get_columns(period_list)
columns = get_columns(filters.periodicity, period_list, company=filters.company)
return columns, data
def get_provisional_profit_loss(asset, liability, equity, period_list, company):
if asset and (liability or equity):
total=0
provisional_profit_loss = {
"account_name": "'" + _("Provisional Profit / Loss (Credit)") + "'",
"account": None,
@ -49,6 +51,9 @@ def get_provisional_profit_loss(asset, liability, equity, period_list, company):
if provisional_profit_loss[period.key]:
has_value = True
total += flt(provisional_profit_loss[period.key])
provisional_profit_loss["total"] = total
if has_value:
return provisional_profit_loss

View File

@ -4,3 +4,9 @@
frappe.require("assets/erpnext/js/financial_statements.js");
frappe.query_reports["Cash Flow"] = erpnext.financial_statements;
frappe.query_reports["Cash Flow"]["filters"].push({
"fieldname": "accumulated_values",
"label": __("Accumulated Values"),
"fieldtype": "Check"
})

View File

@ -48,12 +48,14 @@ def execute(filters=None):
cash_flow_accounts.append(financing_accounts)
# compute net profit / loss
income = get_data(filters.company, "Income", "Credit", period_list, ignore_closing_entries=True)
expense = get_data(filters.company, "Expense", "Debit", period_list, ignore_closing_entries=True)
income = get_data(filters.company, "Income", "Credit", period_list,
accumulated_values=filters.accumulated_values, ignore_closing_entries=True)
expense = get_data(filters.company, "Expense", "Debit", period_list,
accumulated_values=filters.accumulated_values, ignore_closing_entries=True)
net_profit_loss = get_net_profit_loss(income, expense, period_list, filters.company)
data = []
company_currency = frappe.db.get_value("Company", filters.company, "default_currency")
for cash_flow_account in cash_flow_accounts:
@ -77,7 +79,8 @@ def execute(filters=None):
section_data.append(net_profit_loss)
for account in cash_flow_account['account_types']:
account_data = get_account_type_based_data(filters.company, account['account_type'], period_list)
account_data = get_account_type_based_data(filters.company,
account['account_type'], period_list, filters.accumulated_values)
account_data.update({
"account_name": account['label'],
"indent": 1,
@ -91,13 +94,14 @@ def execute(filters=None):
period_list, company_currency)
add_total_row_account(data, data, _("Net Change in Cash"), period_list, company_currency)
columns = get_columns(period_list)
columns = get_columns(filters.periodicity, period_list, filters.accumulated_values, filters.company)
return columns, data
def get_account_type_based_data(company, account_type, period_list):
def get_account_type_based_data(company, account_type, period_list, accumulated_values):
data = {}
total = 0
for period in period_list:
gl_sum = frappe.db.sql_list("""
select sum(credit) - sum(debit)
@ -105,7 +109,8 @@ def get_account_type_based_data(company, account_type, period_list):
where company=%s and posting_date >= %s and posting_date <= %s
and voucher_type != 'Period Closing Voucher'
and account in ( SELECT name FROM tabAccount WHERE account_type = %s)
""", (company, period['from_date'], period['to_date'], account_type))
""", (company, period["year_start_date"] if accumulated_values else period['from_date'],
period['to_date'], account_type))
if gl_sum and gl_sum[0]:
amount = gl_sum[0]
@ -113,12 +118,11 @@ def get_account_type_based_data(company, account_type, period_list):
amount *= -1
else:
amount = 0
total += amount
data.setdefault(period["key"], amount)
data.update({
"from_date": period['from_date'],
"to_date": period['to_date'],
period["key"]: amount
})
data["total"] = total
return data
@ -128,12 +132,14 @@ def add_total_row_account(out, data, label, period_list, currency):
"account": None,
"currency": currency
}
for row in data:
if row.get("parent_account"):
for period in period_list:
total_row.setdefault(period.key, 0.0)
total_row[period.key] += row.get(period.key, 0.0)
total_row.setdefault("total", 0.0)
total_row["total"] += row["total"]
out.append(total_row)
out.append({})

View File

@ -3,38 +3,42 @@
from __future__ import unicode_literals
import frappe
from frappe import _, _dict
from frappe import _
from frappe.utils import (flt, getdate, get_first_day, get_last_day,
add_months, add_days, formatdate)
def get_period_list(fiscal_year, periodicity, from_beginning=False):
"""Get a list of dict {"to_date": to_date, "key": key, "label": label}
def get_period_list(fiscal_year, periodicity):
"""Get a list of dict {"from_date": from_date, "to_date": to_date, "key": key, "label": label}
Periodicity can be (Yearly, Quarterly, Monthly)"""
fy_start_end_date = frappe.db.get_value("Fiscal Year", fiscal_year, ["year_start_date", "year_end_date"])
if not fy_start_end_date:
frappe.throw(_("Fiscal Year {0} not found.").format(fiscal_year))
start_date = getdate(fy_start_end_date[0])
end_date = getdate(fy_start_end_date[1])
# start with first day, so as to avoid year to_dates like 2-April if ever they occur]
year_start_date = get_first_day(getdate(fy_start_end_date[0]))
year_end_date = getdate(fy_start_end_date[1])
if periodicity == "Yearly":
period_list = [_dict({"to_date": end_date, "key": fiscal_year, "label": fiscal_year})]
period_list = [frappe._dict({"from_date": year_start_date, "to_date": year_end_date,
"key": fiscal_year, "label": fiscal_year})]
else:
months_to_add = {
"Half-yearly": 6,
"Half-Yearly": 6,
"Quarterly": 3,
"Monthly": 1
}[periodicity]
period_list = []
# start with first day, so as to avoid year to_dates like 2-April if ever they occur
to_date = get_first_day(start_date)
start_date = year_start_date
for i in xrange(12 / months_to_add):
to_date = add_months(to_date, months_to_add)
period = frappe._dict({
"from_date": start_date
})
to_date = add_months(start_date, months_to_add)
start_date = to_date
if to_date == get_first_day(to_date):
# if to_date is the first day, get the last day of previous month
to_date = add_days(to_date, -1)
@ -42,39 +46,48 @@ def get_period_list(fiscal_year, periodicity, from_beginning=False):
# to_date should be the last day of the new to_date's month
to_date = get_last_day(to_date)
if to_date <= end_date:
if to_date <= year_end_date:
# the normal case
period_list.append(_dict({ "to_date": to_date }))
# if it ends before a full year
if to_date == end_date:
break
period.to_date = to_date
else:
# if a fiscal year ends before a 12 month period
period_list.append(_dict({ "to_date": end_date }))
period.to_date = year_end_date
period_list.append(period)
if period.to_date == year_end_date:
break
# common processing
for opts in period_list:
key = opts["to_date"].strftime("%b_%Y").lower()
label = formatdate(opts["to_date"], "MMM YYYY")
if periodicity == "Monthly":
label = formatdate(opts["to_date"], "MMM YYYY")
else:
label = get_label(periodicity, opts["from_date"], opts["to_date"])
opts.update({
"key": key.replace(" ", "_").replace("-", "_"),
"label": label,
"year_start_date": start_date,
"year_end_date": end_date
"year_start_date": year_start_date,
"year_end_date": year_end_date
})
if from_beginning:
# set start date as None for all fiscal periods, used in case of Balance Sheet
opts["from_date"] = None
else:
opts["from_date"] = start_date
return period_list
def get_data(company, root_type, balance_must_be, period_list, ignore_closing_entries=False):
def get_label(periodicity, from_date, to_date):
if periodicity=="Yearly":
if formatdate(from_date, "YYYY") == formatdate(to_date, "YYYY"):
label = formatdate(from_date, "YYYY")
else:
label = formatdate(from_date, "YYYY") + "-" + formatdate(to_date, "YYYY")
else:
label = formatdate(from_date, "MMM YY") + "-" + formatdate(to_date, "MMM YY")
return label
def get_data(company, root_type, balance_must_be, period_list,
accumulated_values=1, only_current_fiscal_year=True, ignore_closing_entries=False):
accounts = get_accounts(company, root_type)
if not accounts:
return None
@ -86,29 +99,33 @@ def get_data(company, root_type, balance_must_be, period_list, ignore_closing_en
gl_entries_by_account = {}
for root in frappe.db.sql("""select lft, rgt from tabAccount
where root_type=%s and ifnull(parent_account, '') = ''""", root_type, as_dict=1):
set_gl_entries_by_account(company, period_list[0]["from_date"],
period_list[-1]["to_date"],root.lft, root.rgt, gl_entries_by_account,
ignore_closing_entries=ignore_closing_entries)
set_gl_entries_by_account(company,
period_list[0]["year_start_date"] if only_current_fiscal_year else None,
period_list[-1]["to_date"],
root.lft, root.rgt,
gl_entries_by_account, ignore_closing_entries=ignore_closing_entries)
calculate_values(accounts_by_name, gl_entries_by_account, period_list)
accumulate_values_into_parents(accounts, accounts_by_name, period_list)
calculate_values(accounts_by_name, gl_entries_by_account, period_list, accumulated_values)
accumulate_values_into_parents(accounts, accounts_by_name, period_list, accumulated_values)
out = prepare_data(accounts, balance_must_be, period_list, company_currency)
if out:
add_total_row(out, balance_must_be, period_list, company_currency)
return out
def calculate_values(accounts_by_name, gl_entries_by_account, period_list):
def calculate_values(accounts_by_name, gl_entries_by_account, period_list, accumulated_values):
for entries in gl_entries_by_account.values():
for entry in entries:
d = accounts_by_name.get(entry.account)
for period in period_list:
# check if posting date is within the period
if entry.posting_date <= period.to_date:
d[period.key] = d.get(period.key, 0.0) + flt(entry.debit) - flt(entry.credit)
if accumulated_values or entry.posting_date >= period.from_date:
d[period.key] = d.get(period.key, 0.0) + flt(entry.debit) - flt(entry.credit)
def accumulate_values_into_parents(accounts, accounts_by_name, period_list):
def accumulate_values_into_parents(accounts, accounts_by_name, period_list, accumulated_values):
"""accumulate children's values in parent accounts"""
for d in reversed(accounts):
if d.parent_account:
@ -124,13 +141,14 @@ def prepare_data(accounts, balance_must_be, period_list, company_currency):
for d in accounts:
# add to output
has_value = False
total = 0
row = {
"account_name": d.account_name,
"account": d.name,
"parent_account": d.parent_account,
"indent": flt(d.indent),
"from_date": year_start_date,
"to_date": year_end_date,
"year_start_date": year_start_date,
"year_end_date": year_end_date,
"currency": company_currency
}
for period in period_list:
@ -143,8 +161,10 @@ def prepare_data(accounts, balance_must_be, period_list, company_currency):
if abs(row[period.key]) >= 0.005:
# ignore zero values
has_value = True
total += flt(row[period.key])
if has_value:
row["total"] = total
out.append(row)
return out
@ -161,9 +181,12 @@ def add_total_row(out, balance_must_be, period_list, company_currency):
for period in period_list:
total_row.setdefault(period.key, 0.0)
total_row[period.key] += row.get(period.key, 0.0)
row[period.key] = ""
row[period.key] = ""
total_row.setdefault("total", 0.0)
total_row["total"] += flt(row["total"])
row["total"] = ""
out.append(total_row)
# blank row after Total
@ -245,7 +268,7 @@ def set_gl_entries_by_account(company, from_date, to_date, root_lft, root_rgt, g
return gl_entries_by_account
def get_columns(period_list, company=None):
def get_columns(periodicity, period_list, accumulated_values=1, company=None):
columns = [{
"fieldname": "account",
"label": _("Account"),
@ -261,7 +284,6 @@ def get_columns(period_list, company=None):
"options": "Currency",
"hidden": 1
})
for period in period_list:
columns.append({
"fieldname": period.key,
@ -270,5 +292,13 @@ def get_columns(period_list, company=None):
"options": "currency",
"width": 150
})
if periodicity!="Yearly":
if not accumulated_values:
columns.append({
"fieldname": "total",
"label": _("Total"),
"fieldtype": "Currency",
"width": 150
})
return columns
return columns

View File

@ -4,3 +4,9 @@
frappe.require("assets/erpnext/js/financial_statements.js");
frappe.query_reports["Profit and Loss Statement"] = erpnext.financial_statements;
frappe.query_reports["Profit and Loss Statement"]["filters"].push({
"fieldname": "accumulated_values",
"label": __("Accumulated Values"),
"fieldtype": "Check"
})

View File

@ -10,8 +10,11 @@ from erpnext.accounts.report.financial_statements import (get_period_list, get_c
def execute(filters=None):
period_list = get_period_list(filters.fiscal_year, filters.periodicity)
income = get_data(filters.company, "Income", "Credit", period_list, ignore_closing_entries=True)
expense = get_data(filters.company, "Expense", "Debit", period_list, ignore_closing_entries=True)
income = get_data(filters.company, "Income", "Credit", period_list,
accumulated_values=filters.accumulated_values, ignore_closing_entries=True)
expense = get_data(filters.company, "Expense", "Debit", period_list,
accumulated_values=filters.accumulated_values, ignore_closing_entries=True)
net_profit_loss = get_net_profit_loss(income, expense, period_list, filters.company)
data = []
@ -20,12 +23,13 @@ def execute(filters=None):
if net_profit_loss:
data.append(net_profit_loss)
columns = get_columns(period_list, filters.company)
columns = get_columns(filters.periodicity, period_list, filters.accumulated_values, filters.company)
return columns, data
def get_net_profit_loss(income, expense, period_list, company):
if income and expense:
total = 0
net_profit_loss = {
"account_name": "'" + _("Net Profit / Loss") + "'",
"account": None,
@ -33,7 +37,16 @@ def get_net_profit_loss(income, expense, period_list, company):
"currency": frappe.db.get_value("Company", company, "default_currency")
}
has_value = False
for period in period_list:
net_profit_loss[period.key] = flt(income[-2][period.key] - expense[-2][period.key], 3)
return net_profit_loss
if net_profit_loss[period.key]:
has_value=True
total += flt(net_profit_loss[period.key])
net_profit_loss["total"] = total
if has_value:
return net_profit_loss

View File

@ -1597,29 +1597,6 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "advance_paid",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Advance Paid",
"length": 0,
"no_copy": 1,
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@ -1694,6 +1671,30 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "advance_paid",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Advance Paid",
"length": 0,
"no_copy": 1,
"options": "party_account_currency",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@ -1968,6 +1969,31 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "party_account_currency",
"fieldtype": "Link",
"hidden": 1,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Party Account Currency",
"length": 0,
"no_copy": 1,
"options": "Currency",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@ -2508,7 +2534,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-01-15 04:13:35.179163",
"modified": "2016-01-29 01:41:08.478575",
"modified_by": "Administrator",
"module": "Buying",
"name": "Purchase Order",

View File

@ -0,0 +1,4 @@
- Added new **Employee Attendance Tool**, to manage attendace in bulk.
- In Profit and Loss Statement and Cash Flow repots, **accumulated periodic balance** is not optional based on filters
- Removed **Is Service Item** from Item, all sales items are available for service.
- Now **Sales Person Group** can be selected in a sales transaction. All the activities made by the children of any group, will also be considered as it's own activity.

View File

@ -60,9 +60,9 @@ def get_data():
"items": [
{
"type": "doctype",
"name": "Process Payroll",
"label": _("Process Payroll"),
"description":_("Generate Salary Slips"),
"name": "Employee Attendance Tool",
"label": _("Employee Attendance Tool"),
"description":_("Mark Employee Attendance in Bulk"),
"hide_count": True
},
{
@ -71,6 +71,14 @@ def get_data():
"description":_("Upload attendance from a .csv file"),
"hide_count": True
},
{
"type": "doctype",
"name": "Process Payroll",
"label": _("Process Payroll"),
"description":_("Generate Salary Slips"),
"hide_count": True
},
{
"type": "doctype",
"name": "Leave Control Panel",
@ -177,6 +185,12 @@ def get_data():
"name": "Employee Birthday",
"doctype": "Employee"
},
{
"type": "report",
"is_query_report": True,
"name": "Employee Holiday Attendance",
"doctype": "Employee"
},
{
"type": "report",
"name": "Employee Information",
@ -194,6 +208,7 @@ def get_data():
"name": "Monthly Attendance Sheet",
"doctype": "Attendance"
},
]
},
{

View File

@ -4,7 +4,7 @@
from __future__ import unicode_literals
import frappe
from frappe import _, throw
from frappe.utils import today, flt, cint
from frappe.utils import today, flt, cint, fmt_money
from erpnext.setup.utils import get_company_currency, get_exchange_rate
from erpnext.accounts.utils import get_fiscal_year, validate_fiscal_year, get_account_currency
from erpnext.utilities.transaction_base import TransactionBase
@ -386,27 +386,44 @@ class AccountsController(TransactionBase):
def set_total_advance_paid(self):
if self.doctype == "Sales Order":
dr_or_cr = "credit_in_account_currency"
party = self.customer
else:
dr_or_cr = "debit_in_account_currency"
party = self.supplier
advance_paid = frappe.db.sql("""
advance = frappe.db.sql("""
select
sum({dr_or_cr})
account_currency, sum({dr_or_cr}) as amount
from
`tabJournal Entry Account`
where
reference_type = %s and reference_name = %s
reference_type = %s and reference_name = %s and party=%s
and docstatus = 1 and is_advance = "Yes"
""".format(dr_or_cr=dr_or_cr), (self.doctype, self.name))
""".format(dr_or_cr=dr_or_cr), (self.doctype, self.name, party), as_dict=1)
if advance_paid:
advance_paid = flt(advance_paid[0][0], self.precision("advance_paid"))
if flt(self.base_grand_total) >= advance_paid:
frappe.db.set_value(self.doctype, self.name, "advance_paid", advance_paid)
else:
frappe.throw(_("Total advance ({0}) against Order {1} cannot be greater \
than the Grand Total ({2})")
.format(advance_paid, self.name, self.base_grand_total))
if advance:
advance = advance[0]
advance_paid = flt(advance.amount, self.precision("advance_paid"))
formatted_advance_paid = fmt_money(advance_paid, precision=self.precision("advance_paid"),
currency=advance.account_currency)
frappe.db.set_value(self.doctype, self.name, "party_account_currency",
advance.account_currency)
if advance.account_currency == self.currency:
order_total = self.grand_total
formatted_order_total = fmt_money(order_total, precision=self.precision("grand_total"),
currency=advance.account_currency)
else:
order_total = self.base_grand_total
formatted_order_total = fmt_money(order_total, precision=self.precision("base_grand_total"),
currency=advance.account_currency)
if order_total >= advance_paid:
frappe.db.set_value(self.doctype, self.name, "advance_paid", advance_paid)
else:
frappe.throw(_("Total advance ({0}) against Order {1} cannot be greater than the Grand Total ({2})")
.format(formatted_advance_paid, self.name, formatted_order_total))
@property
def company_abbr(self):

View File

@ -97,7 +97,7 @@ def validate_returned_items(doc):
frappe.throw(_("Row # {0}: Serial No {1} does not match with {2} {3}")
.format(d.idx, s, doc.doctype, doc.return_against))
if not d.warehouse:
if doc.doctype != "Purchase Invoice" and not d.get("warehouse"):
frappe.throw(_("Warehouse is mandatory"))
items_returned = True

View File

@ -161,7 +161,7 @@ class SellingController(StockController):
for d in self.get("items"):
if d.qty is None:
frappe.throw(_("Row {0}: Qty is mandatory").format(d.idx))
if self.has_product_bundle(d.item_code):
for p in self.get("packed_items"):
if p.parent_detail_docname == d.name and p.parent_item == d.item_code:
@ -199,17 +199,17 @@ class SellingController(StockController):
where so_detail = %s and docstatus = 1
and against_sales_order = %s
and parent != %s""", (so_detail, so, current_docname))
delivered_via_si = frappe.db.sql("""select sum(si_item.qty)
delivered_via_si = frappe.db.sql("""select sum(si_item.qty)
from `tabSales Invoice Item` si_item, `tabSales Invoice` si
where si_item.parent = si.name and si.update_stock = 1
and si_item.so_detail = %s and si.docstatus = 1
and si_item.so_detail = %s and si.docstatus = 1
and si_item.sales_order = %s
and si.name != %s""", (so_detail, so, current_docname))
total_delivered_qty = (flt(delivered_via_dn[0][0]) if delivered_via_dn else 0) \
+ (flt(delivered_via_si[0][0]) if delivered_via_si else 0)
return total_delivered_qty
def get_so_qty_and_warehouse(self, so_detail):
@ -230,10 +230,10 @@ def check_active_sales_items(obj):
for d in obj.get("items"):
if d.item_code:
item = frappe.db.sql("""select docstatus, is_sales_item,
is_service_item, income_account from tabItem where name = %s""",
income_account from tabItem where name = %s""",
d.item_code, as_dict=True)[0]
if item.is_sales_item == 0 and item.is_service_item == 0:
frappe.throw(_("Item {0} must be Sales or Service Item in {1}").format(d.item_code, d.idx))
if item.is_sales_item == 0:
frappe.throw(_("Item {0} must be a Sales Item in {1}").format(d.item_code, d.idx))
if getattr(d, "income_account", None) and not item.income_account:
frappe.db.set_value("Item", d.item_code, "income_account",
d.income_account)

View File

@ -31,10 +31,10 @@ def validate_filters(filters):
for f in ["Fiscal Year", "Based On", "Period", "Company"]:
if not filters.get(f.lower().replace(" ", "_")):
frappe.throw(_("{0} is mandatory").format(f))
if not frappe.db.exists("Fiscal Year", filters.get("fiscal_year")):
frappe.throw(_("Fiscal Year: {0} does not exists").format(filters.get("fiscal_year")))
if filters.get("based_on") == filters.get("group_by"):
frappe.throw(_("'Based On' and 'Group By' can not be same"))
@ -98,7 +98,8 @@ def get_data(filters, conditions):
(filters.get("company"), filters.get("fiscal_year"), row[i][0],
data1[d][0]), as_list=1)
des[ind] = row[i]
des[ind] = row[i][0]
for j in range(1,len(conditions["columns"])-inc):
des[j+inc] = row1[0][j]
@ -213,7 +214,7 @@ def based_wise_columns_query(based_on, trans):
elif based_on == "Customer":
based_on_details["based_on_cols"] = ["Customer:Link/Customer:120", "Territory:Link/Territory:120"]
based_on_details["based_on_select"] = "t1.customer_name, t1.territory, "
based_on_details["based_on_group_by"] = 't1.customer_name'
based_on_details["based_on_group_by"] = 't1.customer'
based_on_details["addl_tables"] = ''
elif based_on == "Customer Group":

View File

@ -52,8 +52,7 @@ erpnext.crm.Opportunity = frappe.ui.form.Controller.extend({
this.frm.set_query("item_code", "items", function() {
return {
query: "erpnext.controllers.queries.item_query",
filters: me.frm.doc.enquiry_type === "Maintenance" ?
{"is_service_item": 1} : {"is_sales_item":1}
filters: {"is_sales_item": 1}
};
});

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 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: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 708 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 930 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

View File

@ -315,6 +315,22 @@ finally will return default.</p>
<p class="docs-attr-name">
<a name="erpnext.accounts.party.validate_party_frozen_disabled" href="#erpnext.accounts.party.validate_party_frozen_disabled" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.accounts.party.<b>validate_party_frozen_disabled</b>
<i class="text-muted">(party_type, party_name)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p class="docs-attr-name">
<a name="erpnext.accounts.party.validate_party_gle_currency" href="#erpnext.accounts.party.validate_party_gle_currency" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>

View File

@ -54,20 +54,6 @@
<p class="docs-attr-name">
<a name="before_recurring" href="#before_recurring" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
<b>before_recurring</b>
<i class="text-muted">(self)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p class="docs-attr-name">
<a name="calculate_taxes_and_totals" href="#calculate_taxes_and_totals" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>

View File

@ -85,7 +85,7 @@
<a name="erpnext.controllers.recurring_document.make_new_document" href="#erpnext.controllers.recurring_document.make_new_document" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.controllers.recurring_document.<b>make_new_document</b>
<i class="text-muted">(ref_wrapper, date_field, posting_date)</i>
<i class="text-muted">(reference_doc, date_field, posting_date)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>

View File

@ -15,21 +15,6 @@
<h3 style="font-weight: normal;">Class <b>CustomerFrozen</b></h3>
<p style="padding-left: 30px;"><i>Inherits from frappe.exceptions.ValidationError</i></h4>
<div class="docs-attr-desc"><p></p>
</div>
<div style="padding-left: 30px;">
</div>
<hr>
<h3 style="font-weight: normal;">Class <b>InvalidAccountCurrency</b></h3>
<p style="padding-left: 30px;"><i>Inherits from frappe.exceptions.ValidationError</i></h4>
@ -58,6 +43,36 @@
<h3 style="font-weight: normal;">Class <b>PartyDisabled</b></h3>
<p style="padding-left: 30px;"><i>Inherits from frappe.exceptions.ValidationError</i></h4>
<div class="docs-attr-desc"><p></p>
</div>
<div style="padding-left: 30px;">
</div>
<hr>
<h3 style="font-weight: normal;">Class <b>PartyFrozen</b></h3>
<p style="padding-left: 30px;"><i>Inherits from frappe.exceptions.ValidationError</i></h4>
<div class="docs-attr-desc"><p></p>
</div>
<div style="padding-left: 30px;">
</div>
<hr>
<!-- autodoc -->

View File

@ -35,7 +35,7 @@
Version
</td>
<td>
<code>6.17.0</code>
<code>6.19.0</code>
</td>
</tr>
</table>

View File

@ -969,6 +969,10 @@ Credit</pre>
<li>

View File

@ -157,7 +157,7 @@
<td >
Closing Account Head
<p class="text-muted small">
The account head under Liability or Equity, in which Profit/Loss will be booked</p>
The account head under Liability, in which Profit/Loss will be booked</p>
</td>
<td>

View File

@ -1663,6 +1663,20 @@ Yearly</pre>
<p class="docs-attr-name">
<a name="on_recurring" href="#on_recurring" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
<b>on_recurring</b>
<i class="text-muted">(self, reference_doc)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p class="docs-attr-name">
<a name="on_submit" href="#on_submit" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>

View File

@ -2246,6 +2246,20 @@ Yearly</pre>
<p class="docs-attr-name">
<a name="on_recurring" href="#on_recurring" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
<b>on_recurring</b>
<i class="text-muted">(self, reference_doc)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p class="docs-attr-name">
<a name="on_submit" href="#on_submit" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>

View File

@ -596,8 +596,8 @@
<td ><code>target_warehouse</code></td>
<td >
Link</td>
<td >
Target Warehouse
<td class="text-muted" title="Hidden">
Customer Warehouse (Optional)
</td>
<td>

View File

@ -413,6 +413,15 @@ 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

@ -964,18 +964,6 @@ Net Total</pre>
<tr >
<td>65</td>
<td ><code>advance_paid</code></td>
<td >
Currency</td>
<td >
Advance Paid
</td>
<td></td>
</tr>
<tr >
<td>66</td>
<td ><code>column_break4</code></td>
<td class="info">
Column Break</td>
@ -987,7 +975,7 @@ Net Total</pre>
</tr>
<tr >
<td>67</td>
<td>66</td>
<td ><code>grand_total</code></td>
<td >
Currency</td>
@ -1001,7 +989,7 @@ Net Total</pre>
</tr>
<tr >
<td>68</td>
<td>67</td>
<td ><code>in_words</code></td>
<td >
Data</td>
@ -1012,6 +1000,20 @@ Net Total</pre>
<td></td>
</tr>
<tr >
<td>68</td>
<td ><code>advance_paid</code></td>
<td >
Currency</td>
<td >
Advance Paid
</td>
<td>
<pre>party_account_currency</pre>
</td>
</tr>
<tr class="info">
<td>69</td>
<td ><code>terms_section_break</code></td>
@ -1197,6 +1199,27 @@ Delivered</pre>
<tr >
<td>80</td>
<td ><code>party_account_currency</code></td>
<td >
Link</td>
<td class="text-muted" title="Hidden">
Party Account Currency
</td>
<td>
<a href="https://frappe.github.io/erpnext/current/models/geo/currency">Currency</a>
</td>
</tr>
<tr >
<td>81</td>
<td ><code>column_break_74</code></td>
<td class="info">
Column Break</td>
@ -1208,7 +1231,7 @@ Delivered</pre>
</tr>
<tr >
<td>81</td>
<td>82</td>
<td ><code>per_received</code></td>
<td >
Percent</td>
@ -1220,7 +1243,7 @@ Delivered</pre>
</tr>
<tr >
<td>82</td>
<td>83</td>
<td ><code>per_billed</code></td>
<td >
Percent</td>
@ -1232,7 +1255,7 @@ Delivered</pre>
</tr>
<tr class="info">
<td>83</td>
<td>84</td>
<td ><code>column_break5</code></td>
<td >
Section Break</td>
@ -1244,7 +1267,7 @@ Delivered</pre>
</tr>
<tr >
<td>84</td>
<td>85</td>
<td ><code>letter_head</code></td>
<td >
Link</td>
@ -1265,7 +1288,7 @@ Delivered</pre>
</tr>
<tr >
<td>85</td>
<td>86</td>
<td ><code>select_print_heading</code></td>
<td >
Link</td>
@ -1286,7 +1309,7 @@ Delivered</pre>
</tr>
<tr class="info">
<td>86</td>
<td>87</td>
<td ><code>raw_material_details</code></td>
<td >
Section Break</td>
@ -1300,7 +1323,7 @@ Delivered</pre>
</tr>
<tr >
<td>87</td>
<td>88</td>
<td ><code>supplied_items</code></td>
<td >
Table</td>
@ -1321,7 +1344,7 @@ Delivered</pre>
</tr>
<tr class="info">
<td>88</td>
<td>89</td>
<td ><code>recurring_order</code></td>
<td >
Section Break</td>
@ -1335,7 +1358,7 @@ Delivered</pre>
</tr>
<tr >
<td>89</td>
<td>90</td>
<td ><code>column_break</code></td>
<td class="info">
Column Break</td>
@ -1347,7 +1370,7 @@ Delivered</pre>
</tr>
<tr >
<td>90</td>
<td>91</td>
<td ><code>is_recurring</code></td>
<td >
Check</td>
@ -1359,7 +1382,7 @@ Delivered</pre>
</tr>
<tr >
<td>91</td>
<td>92</td>
<td ><code>recurring_type</code></td>
<td >
Select</td>
@ -1376,7 +1399,7 @@ Yearly</pre>
</tr>
<tr >
<td>92</td>
<td>93</td>
<td ><code>from_date</code></td>
<td >
Date</td>
@ -1389,7 +1412,7 @@ Yearly</pre>
</tr>
<tr >
<td>93</td>
<td>94</td>
<td ><code>to_date</code></td>
<td >
Date</td>
@ -1402,7 +1425,7 @@ Yearly</pre>
</tr>
<tr >
<td>94</td>
<td>95</td>
<td ><code>repeat_on_day_of_month</code></td>
<td >
Int</td>
@ -1415,7 +1438,7 @@ Yearly</pre>
</tr>
<tr >
<td>95</td>
<td>96</td>
<td ><code>end_date</code></td>
<td >
Date</td>
@ -1428,7 +1451,7 @@ Yearly</pre>
</tr>
<tr >
<td>96</td>
<td>97</td>
<td ><code>column_break83</code></td>
<td class="info">
Column Break</td>
@ -1440,7 +1463,7 @@ Yearly</pre>
</tr>
<tr >
<td>97</td>
<td>98</td>
<td ><code>next_date</code></td>
<td >
Date</td>
@ -1453,7 +1476,7 @@ Yearly</pre>
</tr>
<tr >
<td>98</td>
<td>99</td>
<td ><code>recurring_id</code></td>
<td >
Data</td>
@ -1465,7 +1488,7 @@ Yearly</pre>
</tr>
<tr >
<td>99</td>
<td>100</td>
<td ><code>notification_email_address</code></td>
<td >
Small Text</td>
@ -1478,7 +1501,7 @@ Yearly</pre>
</tr>
<tr >
<td>100</td>
<td>101</td>
<td ><code>recurring_print_format</code></td>
<td >
Link</td>
@ -1537,20 +1560,6 @@ Yearly</pre>
<p class="docs-attr-name">
<a name="before_recurring" href="#before_recurring" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
<b>before_recurring</b>
<i class="text-muted">(self)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p class="docs-attr-name">
<a name="check_for_stopped_or_closed_status" href="#check_for_stopped_or_closed_status" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>

View File

@ -113,11 +113,11 @@ Supplier of Goods or Services.
<tr >
<td>6</td>
<td ><code>is_frozen</code></td>
<td ><code>disabled</code></td>
<td >
Check</td>
<td >
Is Frozen
Disabled
</td>
<td></td>
@ -177,8 +177,36 @@ Supplier of Goods or Services.
</td>
</tr>
<tr >
<tr class="info">
<td>10</td>
<td ><code>section_credit_limit</code></td>
<td >
Section Break</td>
<td >
Credit Limit
</td>
<td></td>
</tr>
<tr >
<td>11</td>
<td ><code>credit_days_based_on</code></td>
<td >
Select</td>
<td >
Credit Days Based On
</td>
<td>
<pre>
Fixed Days
Last Day of the Next Month</pre>
</td>
</tr>
<tr >
<td>12</td>
<td ><code>credit_days</code></td>
<td >
Int</td>
@ -190,7 +218,7 @@ Supplier of Goods or Services.
</tr>
<tr class="info">
<td>11</td>
<td>13</td>
<td ><code>address_contacts</code></td>
<td >
Section Break</td>
@ -204,7 +232,7 @@ Supplier of Goods or Services.
</tr>
<tr >
<td>12</td>
<td>14</td>
<td ><code>address_html</code></td>
<td >
HTML</td>
@ -216,7 +244,7 @@ Supplier of Goods or Services.
</tr>
<tr >
<td>13</td>
<td>15</td>
<td ><code>column_break1</code></td>
<td class="info">
Column Break</td>
@ -228,7 +256,7 @@ Supplier of Goods or Services.
</tr>
<tr >
<td>14</td>
<td>16</td>
<td ><code>contact_html</code></td>
<td >
HTML</td>
@ -240,7 +268,7 @@ Supplier of Goods or Services.
</tr>
<tr class="info">
<td>15</td>
<td>17</td>
<td ><code>default_payable_accounts</code></td>
<td >
Section Break</td>
@ -252,7 +280,7 @@ Supplier of Goods or Services.
</tr>
<tr >
<td>16</td>
<td>18</td>
<td ><code>accounts</code></td>
<td >
Table</td>
@ -274,19 +302,19 @@ Supplier of Goods or Services.
</tr>
<tr class="info">
<td>17</td>
<td>19</td>
<td ><code>column_break2</code></td>
<td >
Section Break</td>
<td >
Supplier Details
More Information
</td>
<td></td>
</tr>
<tr >
<td>18</td>
<td>20</td>
<td ><code>website</code></td>
<td >
Data</td>
@ -298,7 +326,7 @@ Supplier of Goods or Services.
</tr>
<tr >
<td>19</td>
<td>21</td>
<td ><code>supplier_details</code></td>
<td >
Text</td>
@ -310,6 +338,18 @@ Supplier of Goods or Services.
<td></td>
</tr>
<tr >
<td>22</td>
<td ><code>is_frozen</code></td>
<td >
Check</td>
<td >
Is Frozen
</td>
<td></td>
</tr>
</tbody>
</table>

View File

@ -93,6 +93,15 @@
<li>
<a href="https://frappe.github.io/erpnext/current/models/hr/employee_attendance_tool">Employee Attendance Tool</a>
</li>
<li>

View File

@ -115,6 +115,15 @@
<li>
<a href="https://frappe.github.io/erpnext/current/models/hr/employee_attendance_tool">Employee Attendance Tool</a>
</li>
<li>

View File

@ -0,0 +1,244 @@
<!-- title: Employee Attendance Tool -->
<div class="dev-header">
<a class="btn btn-default btn-sm" disabled style="margin-bottom: 10px;">
Version 6.x.x</a>
<a class="btn btn-default btn-sm" href="https://github.com/frappe/erpnext/tree/develop/erpnext/hr/doctype/employee_attendance_tool"
target="_blank" style="margin-left: 10px; margin-bottom: 10px;"><i class="octicon octicon-mark-github"></i> Source</a>
</div>
<span class="label label-info">Single</span>
<h3>Fields</h3>
<table class="table table-bordered">
<thead>
<tr>
<th style="width: 5%">Sr</th>
<th style="width: 25%">Fieldname</th>
<th style="width: 20%">Type</th>
<th style="width: 25%">Label</th>
<th style="width: 25%">Options</th>
</tr>
</thead>
<tbody>
<tr >
<td>1</td>
<td ><code>date</code></td>
<td >
Date</td>
<td >
Date
</td>
<td></td>
</tr>
<tr >
<td>2</td>
<td ><code>department</code></td>
<td >
Link</td>
<td >
Department
</td>
<td>
<a href="https://frappe.github.io/erpnext/current/models/hr/department">Department</a>
</td>
</tr>
<tr >
<td>3</td>
<td ><code>column_break_3</code></td>
<td class="info">
Column Break</td>
<td >
</td>
<td></td>
</tr>
<tr >
<td>4</td>
<td ><code>branch</code></td>
<td >
Link</td>
<td >
Branch
</td>
<td>
<a href="https://frappe.github.io/erpnext/current/models/hr/branch">Branch</a>
</td>
</tr>
<tr >
<td>5</td>
<td ><code>company</code></td>
<td >
Link</td>
<td >
Company
</td>
<td>
<a href="https://frappe.github.io/erpnext/current/models/setup/company">Company</a>
</td>
</tr>
<tr class="info">
<td>6</td>
<td ><code>unmarked_attendance_section</code></td>
<td >
Section Break</td>
<td >
Unmarked Attendance
</td>
<td></td>
</tr>
<tr >
<td>7</td>
<td ><code>employees_html</code></td>
<td >
HTML</td>
<td >
Employees HTML
</td>
<td></td>
</tr>
<tr class="info">
<td>8</td>
<td ><code>marked_attendance_section</code></td>
<td >
Section Break</td>
<td >
Marked Attendance
</td>
<td></td>
</tr>
<tr >
<td>9</td>
<td ><code>marked_attendance_html</code></td>
<td >
HTML</td>
<td >
Marked Attendance HTML
</td>
<td></td>
</tr>
</tbody>
</table>
<hr>
<h3>Controller</h3>
<h4>erpnext.hr.doctype.employee_attendance_tool.employee_attendance_tool</h4>
<h3 style="font-weight: normal;">Class <b>EmployeeAttendanceTool</b></h3>
<p style="padding-left: 30px;"><i>Inherits from frappe.model.document.Document</i></h4>
<div class="docs-attr-desc"><p></p>
</div>
<div style="padding-left: 30px;">
</div>
<hr>
<p><span class="label label-info">Public API</span>
<br><code>/api/method/erpnext.hr.doctype.employee_attendance_tool.employee_attendance_tool.get_employees</code>
</p>
<p class="docs-attr-name">
<a name="erpnext.hr.doctype.employee_attendance_tool.employee_attendance_tool.get_employees" href="#erpnext.hr.doctype.employee_attendance_tool.employee_attendance_tool.get_employees" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.hr.doctype.employee_attendance_tool.employee_attendance_tool.<b>get_employees</b>
<i class="text-muted">(date, department=None, branch=None, company=None)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p><span class="label label-info">Public API</span>
<br><code>/api/method/erpnext.hr.doctype.employee_attendance_tool.employee_attendance_tool.mark_employee_attendance</code>
</p>
<p class="docs-attr-name">
<a name="erpnext.hr.doctype.employee_attendance_tool.employee_attendance_tool.mark_employee_attendance" href="#erpnext.hr.doctype.employee_attendance_tool.employee_attendance_tool.mark_employee_attendance" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
erpnext.hr.doctype.employee_attendance_tool.employee_attendance_tool.<b>mark_employee_attendance</b>
<i class="text-muted">(employee_list, status, date, company=None)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<!-- autodoc -->
<!-- jinja -->
<!-- static -->

View File

@ -40,7 +40,7 @@
<tr >
<td>1</td>
<td ><code>description</code></td>
<td class="danger" title="Mandatory"><code>description</code></td>
<td >
Text Editor</td>
<td >
@ -52,7 +52,7 @@
<tr >
<td>2</td>
<td ><code>holiday_date</code></td>
<td class="danger" title="Mandatory"><code>holiday_date</code></td>
<td >
Date</td>
<td >

View File

@ -183,11 +183,11 @@ Individual</pre>
<tr >
<td>10</td>
<td ><code>is_frozen</code></td>
<td ><code>disabled</code></td>
<td >
Check</td>
<td >
Is Frozen
Disabled
</td>
<td></td>
@ -389,7 +389,7 @@ Last Day of the Next Month</pre>
<td >
Section Break</td>
<td >
Customer Details
More Information
</td>
<td>
@ -422,8 +422,20 @@ Last Day of the Next Month</pre>
<td></td>
</tr>
<tr class="info">
<tr >
<td>27</td>
<td ><code>is_frozen</code></td>
<td >
Check</td>
<td >
Is Frozen
</td>
<td></td>
</tr>
<tr class="info">
<td>28</td>
<td ><code>sales_team_section_break</code></td>
<td >
Section Break</td>
@ -437,7 +449,7 @@ Last Day of the Next Month</pre>
</tr>
<tr >
<td>28</td>
<td>29</td>
<td ><code>default_sales_partner</code></td>
<td >
Link</td>
@ -458,7 +470,7 @@ Last Day of the Next Month</pre>
</tr>
<tr >
<td>29</td>
<td>30</td>
<td ><code>default_commission_rate</code></td>
<td >
Float</td>
@ -470,7 +482,7 @@ Last Day of the Next Month</pre>
</tr>
<tr class="info">
<td>30</td>
<td>31</td>
<td ><code>sales_team_section</code></td>
<td >
Section Break</td>
@ -482,7 +494,7 @@ Last Day of the Next Month</pre>
</tr>
<tr >
<td>31</td>
<td>32</td>
<td ><code>sales_team</code></td>
<td >
Table</td>

View File

@ -939,7 +939,7 @@ Net Total</pre>
</td>
<td>
<pre>Company:company:default_currency</pre>
<pre>party_account_currency</pre>
</td>
</tr>
@ -1206,6 +1206,27 @@ Net Total</pre>
<tr >
<td>79</td>
<td ><code>party_account_currency</code></td>
<td >
Link</td>
<td class="text-muted" title="Hidden">
Party Account Currency
</td>
<td>
<a href="https://frappe.github.io/erpnext/current/models/geo/currency">Currency</a>
</td>
</tr>
<tr >
<td>80</td>
<td ><code>column_break_77</code></td>
<td class="info">
Column Break</td>
@ -1217,7 +1238,7 @@ Net Total</pre>
</tr>
<tr >
<td>80</td>
<td>81</td>
<td ><code>source</code></td>
<td >
Select</td>
@ -1240,7 +1261,7 @@ Campaign</pre>
</tr>
<tr >
<td>81</td>
<td>82</td>
<td ><code>campaign</code></td>
<td >
Link</td>
@ -1261,7 +1282,7 @@ Campaign</pre>
</tr>
<tr class="info">
<td>82</td>
<td>83</td>
<td ><code>printing_details</code></td>
<td >
Section Break</td>
@ -1273,7 +1294,7 @@ Campaign</pre>
</tr>
<tr >
<td>83</td>
<td>84</td>
<td ><code>letter_head</code></td>
<td >
Link</td>
@ -1294,7 +1315,7 @@ Campaign</pre>
</tr>
<tr >
<td>84</td>
<td>85</td>
<td ><code>column_break4</code></td>
<td class="info">
Column Break</td>
@ -1306,7 +1327,7 @@ Campaign</pre>
</tr>
<tr >
<td>85</td>
<td>86</td>
<td ><code>select_print_heading</code></td>
<td >
Link</td>
@ -1327,7 +1348,7 @@ Campaign</pre>
</tr>
<tr class="info">
<td>86</td>
<td>87</td>
<td ><code>section_break_78</code></td>
<td >
Section Break</td>
@ -1339,7 +1360,7 @@ Campaign</pre>
</tr>
<tr >
<td>87</td>
<td>88</td>
<td class="danger" title="Mandatory"><code>status</code></td>
<td >
Select</td>
@ -1361,7 +1382,7 @@ Closed</pre>
</tr>
<tr >
<td>88</td>
<td>89</td>
<td ><code>delivery_status</code></td>
<td >
Select</td>
@ -1379,7 +1400,7 @@ Not Applicable</pre>
</tr>
<tr >
<td>89</td>
<td>90</td>
<td ><code>per_delivered</code></td>
<td >
Percent</td>
@ -1392,7 +1413,7 @@ Not Applicable</pre>
</tr>
<tr >
<td>90</td>
<td>91</td>
<td ><code>column_break_81</code></td>
<td class="info">
Column Break</td>
@ -1404,7 +1425,7 @@ Not Applicable</pre>
</tr>
<tr >
<td>91</td>
<td>92</td>
<td ><code>per_billed</code></td>
<td >
Percent</td>
@ -1417,7 +1438,7 @@ Not Applicable</pre>
</tr>
<tr >
<td>92</td>
<td>93</td>
<td ><code>billing_status</code></td>
<td >
Select</td>
@ -1434,7 +1455,7 @@ Closed</pre>
</tr>
<tr class="info">
<td>93</td>
<td>94</td>
<td ><code>sales_team_section_break</code></td>
<td >
Section Break</td>
@ -1448,7 +1469,7 @@ Closed</pre>
</tr>
<tr >
<td>94</td>
<td>95</td>
<td ><code>sales_partner</code></td>
<td >
Link</td>
@ -1469,7 +1490,7 @@ Closed</pre>
</tr>
<tr >
<td>95</td>
<td>96</td>
<td ><code>column_break7</code></td>
<td class="info">
Column Break</td>
@ -1481,7 +1502,7 @@ Closed</pre>
</tr>
<tr >
<td>96</td>
<td>97</td>
<td ><code>commission_rate</code></td>
<td >
Float</td>
@ -1493,7 +1514,7 @@ Closed</pre>
</tr>
<tr >
<td>97</td>
<td>98</td>
<td ><code>total_commission</code></td>
<td >
Currency</td>
@ -1507,7 +1528,7 @@ Closed</pre>
</tr>
<tr class="info">
<td>98</td>
<td>99</td>
<td ><code>section_break1</code></td>
<td >
Section Break</td>
@ -1519,7 +1540,7 @@ Closed</pre>
</tr>
<tr >
<td>99</td>
<td>100</td>
<td ><code>sales_team</code></td>
<td >
Table</td>
@ -1540,7 +1561,7 @@ Closed</pre>
</tr>
<tr class="info">
<td>100</td>
<td>101</td>
<td ><code>recurring_order</code></td>
<td >
Section Break</td>
@ -1554,7 +1575,7 @@ Closed</pre>
</tr>
<tr >
<td>101</td>
<td>102</td>
<td ><code>is_recurring</code></td>
<td >
Check</td>
@ -1567,7 +1588,7 @@ Closed</pre>
</tr>
<tr >
<td>102</td>
<td>103</td>
<td ><code>recurring_type</code></td>
<td >
Select</td>
@ -1586,7 +1607,7 @@ Yearly</pre>
</tr>
<tr >
<td>103</td>
<td>104</td>
<td ><code>from_date</code></td>
<td >
Date</td>
@ -1599,7 +1620,7 @@ Yearly</pre>
</tr>
<tr >
<td>104</td>
<td>105</td>
<td ><code>to_date</code></td>
<td >
Date</td>
@ -1612,7 +1633,7 @@ Yearly</pre>
</tr>
<tr >
<td>105</td>
<td>106</td>
<td ><code>repeat_on_day_of_month</code></td>
<td >
Int</td>
@ -1625,7 +1646,7 @@ Yearly</pre>
</tr>
<tr >
<td>106</td>
<td>107</td>
<td ><code>end_date</code></td>
<td >
Date</td>
@ -1638,7 +1659,7 @@ Yearly</pre>
</tr>
<tr >
<td>107</td>
<td>108</td>
<td ><code>column_break83</code></td>
<td class="info">
Column Break</td>
@ -1650,7 +1671,7 @@ Yearly</pre>
</tr>
<tr >
<td>108</td>
<td>109</td>
<td ><code>next_date</code></td>
<td >
Date</td>
@ -1663,7 +1684,7 @@ Yearly</pre>
</tr>
<tr >
<td>109</td>
<td>110</td>
<td ><code>recurring_id</code></td>
<td >
Data</td>
@ -1675,7 +1696,7 @@ Yearly</pre>
</tr>
<tr >
<td>110</td>
<td>111</td>
<td ><code>notification_email_address</code></td>
<td >
Small Text</td>
@ -1688,7 +1709,7 @@ Yearly</pre>
</tr>
<tr >
<td>111</td>
<td>112</td>
<td ><code>recurring_print_format</code></td>
<td >
Link</td>
@ -1803,6 +1824,20 @@ Yearly</pre>
<p class="docs-attr-name">
<a name="on_recurring" href="#on_recurring" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
<b>on_recurring</b>
<i class="text-muted">(self, reference_doc)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p class="docs-attr-name">
<a name="on_submit" href="#on_submit" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>

View File

@ -518,8 +518,8 @@
<td ><code>target_warehouse</code></td>
<td >
Link</td>
<td >
Target Warehouse
<td class="text-muted" title="Hidden">
Customer Warehouse (Optional)
</td>
<td>

View File

@ -824,6 +824,20 @@ Stop</pre>
<p class="docs-attr-name">
<a name="abbreviate" href="#abbreviate" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
<b>abbreviate</b>
<i class="text-muted">(self)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p class="docs-attr-name">
<a name="after_rename" href="#after_rename" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
@ -992,6 +1006,20 @@ Stop</pre>
<p class="docs-attr-name">
<a name="validate_abbr" href="#validate_abbr" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
<b>validate_abbr</b>
<i class="text-muted">(self)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<p class="docs-attr-name">
<a name="validate_currency" href="#validate_currency" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
@ -1169,6 +1197,15 @@ Stop</pre>
<li>
<a href="https://frappe.github.io/erpnext/current/models/hr/employee_attendance_tool">Employee Attendance Tool</a>
</li>
<li>

View File

@ -50,8 +50,36 @@
<td></td>
</tr>
<tr >
<tr class="info">
<td>2</td>
<td ><code>section_credit_limit</code></td>
<td >
Section Break</td>
<td >
Credit Limit
</td>
<td></td>
</tr>
<tr >
<td>3</td>
<td ><code>credit_days_based_on</code></td>
<td >
Select</td>
<td >
Credit Days Based On
</td>
<td>
<pre>
Fixed Days
Last Day of the Next Month</pre>
</td>
</tr>
<tr >
<td>4</td>
<td ><code>credit_days</code></td>
<td >
Int</td>
@ -63,7 +91,7 @@
</tr>
<tr class="info">
<td>3</td>
<td>5</td>
<td ><code>default_payable_account</code></td>
<td >
Section Break</td>
@ -75,7 +103,7 @@
</tr>
<tr >
<td>4</td>
<td>6</td>
<td ><code>accounts</code></td>
<td >
Table</td>

View File

@ -485,8 +485,8 @@
<td ><code>target_warehouse</code></td>
<td >
Link</td>
<td >
To Warehouse (Optional)
<td class="text-muted" title="Hidden">
Customer Warehouse (Optional)
</td>
<td>

View File

@ -867,19 +867,6 @@ Moving Average</pre>
<tr >
<td>57</td>
<td ><code>is_service_item</code></td>
<td >
Check</td>
<td >
Is Service Item
<p class="text-muted small">
Allow in Sales Order of type "Service"</p>
</td>
<td></td>
</tr>
<tr >
<td>58</td>
<td ><code>publish_in_hub</code></td>
<td >
Check</td>
@ -892,7 +879,7 @@ Moving Average</pre>
</tr>
<tr >
<td>59</td>
<td>58</td>
<td ><code>synced_with_hub</code></td>
<td >
Check</td>
@ -904,7 +891,7 @@ Moving Average</pre>
</tr>
<tr >
<td>60</td>
<td>59</td>
<td ><code>income_account</code></td>
<td >
Link</td>
@ -925,7 +912,7 @@ Moving Average</pre>
</tr>
<tr >
<td>61</td>
<td>60</td>
<td ><code>selling_cost_center</code></td>
<td >
Link</td>
@ -946,7 +933,7 @@ Moving Average</pre>
</tr>
<tr >
<td>62</td>
<td>61</td>
<td ><code>column_break3</code></td>
<td class="info">
Column Break</td>
@ -958,7 +945,7 @@ Moving Average</pre>
</tr>
<tr >
<td>63</td>
<td>62</td>
<td ><code>customer_items</code></td>
<td >
Table</td>
@ -979,7 +966,7 @@ Moving Average</pre>
</tr>
<tr >
<td>64</td>
<td>63</td>
<td ><code>max_discount</code></td>
<td >
Float</td>
@ -991,7 +978,7 @@ Moving Average</pre>
</tr>
<tr class="info">
<td>65</td>
<td>64</td>
<td ><code>item_tax_section_break</code></td>
<td >
Section Break</td>
@ -1005,7 +992,7 @@ Moving Average</pre>
</tr>
<tr >
<td>66</td>
<td>65</td>
<td ><code>taxes</code></td>
<td >
Table</td>
@ -1027,7 +1014,7 @@ Moving Average</pre>
</tr>
<tr class="info">
<td>67</td>
<td>66</td>
<td ><code>inspection_criteria</code></td>
<td >
Section Break</td>
@ -1041,7 +1028,7 @@ Moving Average</pre>
</tr>
<tr >
<td>68</td>
<td>67</td>
<td ><code>inspection_required</code></td>
<td >
Check</td>
@ -1053,7 +1040,7 @@ Moving Average</pre>
</tr>
<tr >
<td>69</td>
<td>68</td>
<td ><code>quality_parameters</code></td>
<td >
Table</td>
@ -1075,7 +1062,7 @@ Moving Average</pre>
</tr>
<tr class="info">
<td>70</td>
<td>69</td>
<td ><code>manufacturing</code></td>
<td >
Section Break</td>
@ -1089,7 +1076,7 @@ Moving Average</pre>
</tr>
<tr >
<td>71</td>
<td>70</td>
<td ><code>is_pro_applicable</code></td>
<td >
Check</td>
@ -1101,7 +1088,7 @@ Moving Average</pre>
</tr>
<tr >
<td>72</td>
<td>71</td>
<td ><code>is_sub_contracted_item</code></td>
<td >
Check</td>
@ -1114,7 +1101,7 @@ Moving Average</pre>
</tr>
<tr >
<td>73</td>
<td>72</td>
<td ><code>column_break_74</code></td>
<td class="info">
Column Break</td>
@ -1126,7 +1113,7 @@ Moving Average</pre>
</tr>
<tr >
<td>74</td>
<td>73</td>
<td ><code>default_bom</code></td>
<td >
Link</td>
@ -1147,7 +1134,7 @@ Moving Average</pre>
</tr>
<tr >
<td>75</td>
<td>74</td>
<td ><code>customer_code</code></td>
<td >
Data</td>
@ -1159,7 +1146,7 @@ Moving Average</pre>
</tr>
<tr class="info">
<td>76</td>
<td>75</td>
<td ><code>website_section</code></td>
<td >
Section Break</td>
@ -1173,7 +1160,7 @@ Moving Average</pre>
</tr>
<tr >
<td>77</td>
<td>76</td>
<td ><code>show_in_website</code></td>
<td >
Check</td>
@ -1185,7 +1172,7 @@ Moving Average</pre>
</tr>
<tr >
<td>78</td>
<td>77</td>
<td ><code>page_name</code></td>
<td >
Data</td>
@ -1198,7 +1185,7 @@ Moving Average</pre>
</tr>
<tr >
<td>79</td>
<td>78</td>
<td ><code>weightage</code></td>
<td >
Int</td>
@ -1211,7 +1198,7 @@ Moving Average</pre>
</tr>
<tr >
<td>80</td>
<td>79</td>
<td ><code>slideshow</code></td>
<td >
Link</td>
@ -1233,7 +1220,7 @@ Moving Average</pre>
</tr>
<tr >
<td>81</td>
<td>80</td>
<td ><code>website_image</code></td>
<td >
Attach</td>
@ -1246,7 +1233,7 @@ Moving Average</pre>
</tr>
<tr >
<td>82</td>
<td>81</td>
<td ><code>thumbnail</code></td>
<td >
Data</td>
@ -1258,7 +1245,7 @@ Moving Average</pre>
</tr>
<tr >
<td>83</td>
<td>82</td>
<td ><code>cb72</code></td>
<td class="info">
Column Break</td>
@ -1270,7 +1257,7 @@ Moving Average</pre>
</tr>
<tr >
<td>84</td>
<td>83</td>
<td ><code>website_warehouse</code></td>
<td >
Link</td>
@ -1292,7 +1279,7 @@ Moving Average</pre>
</tr>
<tr >
<td>85</td>
<td>84</td>
<td ><code>website_item_groups</code></td>
<td >
Table</td>
@ -1314,7 +1301,7 @@ Moving Average</pre>
</tr>
<tr class="info">
<td>86</td>
<td>85</td>
<td ><code>sb72</code></td>
<td >
Section Break</td>
@ -1326,7 +1313,7 @@ Moving Average</pre>
</tr>
<tr >
<td>87</td>
<td>86</td>
<td ><code>copy_from_item_group</code></td>
<td >
Button</td>
@ -1338,7 +1325,7 @@ Moving Average</pre>
</tr>
<tr >
<td>88</td>
<td>87</td>
<td ><code>website_specifications</code></td>
<td >
Table</td>
@ -1359,7 +1346,7 @@ Moving Average</pre>
</tr>
<tr >
<td>89</td>
<td>88</td>
<td ><code>web_long_description</code></td>
<td >
Text Editor</td>
@ -1371,7 +1358,7 @@ Moving Average</pre>
</tr>
<tr >
<td>90</td>
<td>89</td>
<td ><code>parent_website_route</code></td>
<td >
Read Only</td>

View File

@ -391,6 +391,8 @@ Price List Master
<li>

View File

@ -111,7 +111,8 @@
Currency</td>
<td >
Valuation Rate
<p class="text-muted small">
Do not include symbols (ex. $)</p>
</td>
<td></td>
</tr>

View File

@ -629,6 +629,8 @@ A logical Warehouse against which stock entries are made.
<li>

View File

@ -14,17 +14,17 @@ Click on Account for which Parent Account is to be changed.
####2. Edit Account
<img alt="Project Default Cost Center" class="screenshot" src="{{docs_base_url}}/assets/img/articles/change-parent-2.png">
<img alt="Project Default Cost Center" class="screenshot" src="{{docs_base_url}}/assets/img/articles/change-parent-1.png">
####3. Change Parent Account
Search and select preferred Parent Account and save.
<img alt="Project Default Cost Center" class="screenshot" src="{{docs_base_url}}/assets/img/articles/change-parent-3.png">
<img alt="Project Default Cost Center" class="screenshot" src="{{docs_base_url}}/assets/img/articles/change-parent-2.png">
Refresh system from Help menu to experience the change.
<img alt="Project Default Cost Center" class="screenshot" src="{{docs_base_url}}/assets/img/articles/change-parent-4.png">
<img alt="Project Default Cost Center" class="screenshot" src="{{docs_base_url}}/assets/img/articles/change-parent-3.png">
<div class="well"> Note: Parent cannot be customized for the Root Accounts, like Asset, Liability, Income, Expense, Equity.</div>

View File

@ -1,14 +1,15 @@
An Attendance record stating that an Employee has been present on a particular
day can be created manually by:
> Human Resources > Attendance > New Attendance
> Human Resources > Documents > Attendance > New Attendance
<img class="screenshot" alt="Attendence" src="{{docs_base_url}}/assets/img/human-resources/attendence.png">
You can get a monthly report of your Attendance data by going to the “Monthly
Attendance Details” report.
You can also bulk uppload attendence using the [Upload Attendence Tool ]({{docs_base_url}}/user/manual/en/human-resources/tools/upload-attendance.html)
You can easily set attendance for Employees using the [Employee Attendance Tool]({{docs_base_url}}/user/manual/en/human-resources/tools/employee-attendance-tool.html)
You can also bulk upload attendence using the [Upload Attendence Tool]({{docs_base_url}}/user/manual/en/human-resources/tools/upload-attendance.html)
{next}

View File

@ -18,6 +18,12 @@ Employee Information Report shows Report View of important information recorded
<img alt="Employee Information" class="screenshot" src="{{docs_base_url}}/assets/img/human-resources/employee-information-report.png">
### Employee Holiday Attendance
Employee Holiday Attendance shows the list of Employees who attended on Holidays.
<img alt="Employee Information" class="screenshot" src="{{docs_base_url}}/assets/img/human-resources/employee-holiday-report.png">
### Monthly Salary Register
Monthly Salary Register shows net pay and its components of employee(s) at a glance.

View File

@ -0,0 +1,9 @@
To go the attendance tool, go to:
> Human Resources > Tools > Employee Attendance Tool
This tool allows you to add attendance records for multiple employees quickly.
<img class="screenshot" alt="Attendence upload" src="{{docs_base_url}}/assets/img/human-resources/employee-attendance-tool.png">
{next}

View File

@ -1 +1,2 @@
employee-attendance-tool
upload-attendance

View File

@ -21,7 +21,7 @@ implementation should happen in two phases.
Once you are familiar with ERPNext, start entering your live data!
* Clean up the account of test data or better, start a fresh install.
* If you just want to clear your transactions and not your master data like Item, Customer, Supplier, BOM etc, you can click delete the Company against which you have made the transactions and start with a fresh Bill of Materials. To delete a company, open the Company Record via Setup > Masters > Company and delete the company by clicking on the **Delete Company** button at the bottom.
* If you just want to clear your transactions and not your master data like Item, Customer, Supplier, BOM etc, you can click delete the transactions of your Company and start fresh. To do so, open the Company Record via Setup > Masters > Company and delete your Company's transactions by clicking on the **Delete Company Transactions** button at the bottom of the Company Form.
* You can also setup a new account at [https://erpnext.com](https://erpnext.com), and use the 30-day free trial. [Find out more ways of deploying ERPNext](/introduction/getting-started-with-erpnext)
* Setup all the modules with Customer Groups, Item Groups, Warehouses, BOMs etc.
* Import Customers, Suppliers, Items, Contacts and Addresses using Data Import Tool.

View File

@ -1,31 +1,33 @@
<h1>Applying Discount</h1>
#Applying Discount
There are two ways Discount can be applied on an items in the sales transactions.
There are several ways Discount can be applied on an item in the sales transactions.
#### 1. Discount on "Price List Rate" of an item
In the Item table of transaction, after Price List Rate field, you will find Discount (%) field. Discount Rate applied in this field will be applicable on the Price List Rate of an item.
You can find the Discount (%) field in the Item table. Discount (%) is applied on the Price List Rate to get the selling Rate of the Item.
Before applying Discount (%).
<img alt="Discount Percentage" class="screenshot" src="{{docs_base_url}}/assets/img/articles/discount-1.png">
![Before discount]({{docs_base_url}}/assets/img/articles/Selection_00616c670.png)
The feature of Discount (%) is available in all sales and purchase transactions.
After applying Discount (%) under Discount on Price List Rate (%) field.
You can use Pricing Rule for auto-application of Discount (%). [Click here to learn how Pricing Rule functions.]({{docs_base_url}}/user/manual/en/accounts/pricing-rule.html)
![After discount]({{docs_base_url}}/assets/img/articles/Selection_007f81dc2.png)
You can apply percent discount in all sales and purchase transactions.
#### 2. Discount on Net Total and Grand Total
#### 2. Discount on Grand Total
In the "Additional Discount" section, you can apply discount as amount or as percentage.
In transactions, after Taxes and Charges table, you will find option to enter "Additional Discount Amount". Based on Amount entered in this field, item's Basic Rate and Taxes will be recalculated.
<img alt="Discount Percentage" class="screenshot" src="{{docs_base_url}}/assets/img/articles/discount-2.png">
Before applying Additional Discount Amount,
##### Discount on Net Total
![Discount]({{docs_base_url}}/assets/img/articles/Selection_0085ca13e.png)
If Discount Amount is applied on **Net Total**, then item's Net Rate and Net Amount is calculated as per the Discount Amount. Net Rate and Amount field will be visible only if Discount is applied using this feature.
After applying Additional Discount Amount.
<img alt="Discount Percentage" class="screenshot" src="{{docs_base_url}}/assets/img/articles/discount-on-net-total.png">
![Discount Amount]({{docs_base_url}}/assets/img/articles/Selection_010496ae2.png)
##### Discount on Grand Total
If Discount Amount is applied based on the **Grand Total**, then with item's Net Rate, Net Amount as well as taxes are also re-calculated as per Discount Amount.
<img alt="Discount Percentage" class="screenshot" src="{{docs_base_url}}/assets/img/articles/discount-on-grand-total.png">
<!-- markdown -->

View File

@ -0,0 +1,19 @@
#Close Sales Order
In the submitted Sales Orders, you will find **Stop** option. Stopping Sales Order will restrict user from creating Delivery Note and Sales Invoice against it.
<img alt="Close SO" class="screenshot" src="{{docs_base_url}}/assets/img/articles/close-1.png">
####Scenario
An order is received for ten Wind Turbines. Sales Order is also created for ten units. Due to scarcity of stock, only seven units are delivered to the customer. Pending three units are to be delivered soon. Customer informs that they don't need to deliver pending item, as they have purchased it from other vendor.
In this case, create Delivery Note and Sales Invoice will be created only for the seven units. And the Sales Order should be set as stopped.
<img alt="Closed SO" class="screenshot" src="{{docs_base_url}}/assets/img/articles/close-2.png">
Once Sales Order is set as stopped, you will not have pending quantities (three in this case) reflecting in Pending to Deliver and Pending to Invoice reports. To make further transactions against Stopped Sales Order, you should first Unstop it.
You will find same funtionality in the Purchase Order as well.
<!-- markdown -->

View File

@ -1,3 +1,5 @@
#Drop Ship
**Drop shipping** is a supply chain management technique in which the retailer does not keep goods in stock. Instead they transfer customer orders and shipment details to either the manufacturer, another retailer, or a wholesaler, who then ships the goods directly to the customer
In ERPNext, you can create a Drop Shipping by creating Purchase Order against Sales Order.
@ -7,16 +9,19 @@ In ERPNext, you can create a Drop Shipping by creating Purchase Order against Sa
#### Setup on Item Master
Set **_Delivered by Supplier (Drop Ship)_** and **_Default Supplier_** in Item Master.
<img class="screenshot" alt="Setup Item Master" src="{{docs_base_url}}/assets/img/selling/setup-drop-ship-on-item-master.png">
#### Setup on Sales Order
If Drop Shipping has set on Item master, it will automatically set **Supplier delivers to Customer** and **Supplier** on Salse Order Item.
You can setup Drop Shipping, on Sales Order Item. Under **Drop Ship** section, set **Supplier delivers to Customer** and select **Supplier** agaist which Purchase Order will get created.
<img class="screenshot" alt="Setup Drop Shipping on Sales Order Item" src="{{docs_base_url}}/assets/img/selling/setup-drop-ship-on-sales-order-item.png">
#### Create Purchase Order
After submitting a Sales Order, create Puchase Order.<br>
After submitting a Sales Order, create Puchase Order.
<img class="screenshot" alt="Setup Drop Shipping on Sales Order Item" src="{{docs_base_url}}/assets/img/selling/drop-ship-sales-order.png">
From Sales Order, all items, having **Supplier delivers to Customer** checked or **Supplier**(matching with supplier selected on For Supplier popup) mentioned, will get mapped onto Purchase Order.
@ -24,11 +29,18 @@ From Sales Order, all items, having **Supplier delivers to Customer** checked o
It will automatically set Customer, Customer Address and Contact Person.
After submitting Purchase Order, to update delivery status, use **Mark as Delivered** button on Purchase Order. It will update delivery percetage and delivered quantity on Sales Order.
<img class="screenshot" alt="Purchase Order for Drop Shipping" src="{{docs_base_url}}/assets/img/selling/drop-ship-purchase-order.png">
<span style="color:#18B52D">**_Close_**</span>, is a new feature introduced on **Purchase Order** and **Sales Order**, to close or to mark fulfillment.
<img class="screenshot" alt="Close Sales Order" src="{{docs_base_url}}/assets/img/selling/close-sales-order.png">
###Drop Shipping Print Format
You can notify, Suppliers by sending a email after submitting Purchase Order by attaching Drop Shipping print format.
<img class="screenshot" alt="Drop Dhip Print Format" src="{{docs_base_url}}/assets/img/selling/drop-ship-print-format.png">
<img class="screenshot" alt="Drop Dhip Print Format" src="{{docs_base_url}}/assets/img/selling/drop-ship-print-format.png">
###Video Help on Drop Ship
<iframe width="660" height="371" src="https://www.youtube.com/embed/hUc0hu_XLdo" frameborder="0" allowfullscreen></iframe>

View File

@ -1,28 +1,45 @@
<h1>ERPNext for Service Organizations</h1>
#ERPNext for Service Organization
**Question:** At first look, ERPNext looks primarily designed for the traders and manufacturers. Is ERPNext used by service companies as well?
**Question:** ERPNext looks primarily designed for the traders and manufacturers. Is ERPNext used by companies offering servies?
**Answer:**
About 30% of ERPNext customers comes from services background. These are companies into software development, certification services, individual consultants and many more. Being into services business ourselves, we use ERPNext to manage our sales, accounting, support and HR operations.
https://conf.erpnext.com/2014/videos/umair-sayyed
About 30% of ERPNext customers are companies into services. These are companies into software development, certification services, individual consultants and many more. Being into service business ourselves, we use ERPNext to manage our sales, accounting, support and HR operations. Check following video to learn how ERPNext uses ERPNext.
<iframe width="640" height="360" src="//www.youtube.com/embed/b6r7WxJMfFA" frameborder="0" allowfullscreen=""></iframe>
###Master Setup
Between the service and trading company, the most differentiating master is an item master. While trading and manufacturing business has stock item, with warehouse and other stock details, service items will have none of these details.
The setup for a Service company differs primarily for Items. They don't maintain the Stock for Items and thus, don't have Warehouses.
To create a services item, which will be non-stock item, in the Item master, you should set "Is Stock Item" field as "No".
To create a Service (non-stock) Item, in the item master, uncheck "Maintain Stock" field.
![non-stock item]({{docs_base_url}}/assets/img/articles/Screen Shot 2015-04-01 at 5.32.57 pm.png)
<img alt="Service Item" class="screenshot" src="{{docs_base_url}}/assets/img/articles/services-1.png">
When creating Sales Order for the services, select Order Type as **Maintenance**. Sales Order of Maintenance Type needs lesser details compared to stock item's order like Delivery Note, item warehouse etc.
Service company can still add stock items to mantain their fixed assets like computers, furniture and other office equipments.
###Hiding Non-required Features
Since many modules like Manufacturing and Stock will not be required for the services company, you can hide those modules from:
`Setup > Permissions > Show/Hide Modules`
Modules unchecked here will be hidden from all the User.
####Feature Setup
In Feature Setup, you can activate specific functionalities, and disable others. Based on this setting, forms and fields not required for your business will be hidden. [More on feature setup here](https://manual.erpnext.com/customize-erpnext/hiding-modules-and-features).
Within the form, there are many fields only needed for companies into trading and manufacturing businesses. These fields can be hidden for the service company. Feature Setup is a tool where you can enable/disable specific feature. If a feature is disabled, then fields relevant to that feature is hidden from all the forms. For example, if Serial No. feature is disabled, then Serial. No. field from Item as well as from all the sales and purchase transaction will be hidden.
[To learn more about Feature Setup, click here.]({{docs_base_url}}/user/manual/en/customize-erpnext/hiding-modules-and-features.html).
####Permissions
ERPNext is the permission driven system. User will be able to access system based on permissions assigned to him/her. So, if user is not assigned Role related to Stock and Manufacturing module, it will be hidden from user. [More on permission management in ERPNext here](https://manual.erpnext.com/setting-up/users-and-permissions).
ERPNext is the permission controlled system. Users access system based on permissions assigned to them. So, if user is not assigned Role related to Stock and Manufacturing module, it will be hidden from that User. [Click here to learn more about permission management.]({{docs_base_url}}/user/manual/en/setting-up/users-and-permissions.html).
You can also refer to help video on User and Permissions setting in ERPNext.
<iframe width="660" height="371" src="https://www.youtube.com/embed/fnBoRhBrwR4" frameborder="0" allowfullscreen></iframe>
<!-- markdown -->

View File

@ -1,6 +1,6 @@
applying-discount
drop-shipping
erpnext-for-services-organization
manage-shipping-rule
managing-sales-persons-in-sales-transactions
stopping-sales-order
shipping-rule
sales-persons-in-the-sales-transactions
close-sales-order

View File

@ -1,25 +0,0 @@
<h1>Manage Shipping Rule</h1>
Shipping Rule master help you define rules based on which shipping charge will be applied on sales transactions.
Most of the companies (mainly retail) have shipping charge applied based on invoice total. If invoice value is above certain range, then shipping charge applied will be lesser. If invoice total is less, then shipping charges applied will be higher. You can setup Shipping Rule to address the requirement of varying shipping charge based on total.
To setup Shipping Rule, go to:
Selling/Accounts >> Setup >> Shipping Rule
Here is an example of Shipping Rule master:
![Shipping Rule Master]({{docs_base_url}}/assets/img/articles/$SGrab_258.png)
Referring above, you will notice that shipping charges are reducing as range of total is increasing. This shipping charge will only be applied if transaction total falls under one of the above range, else not.
If shipping charges are applied based on Shipping Rule, then more values like Shipping Account, Cost Center will be needed as well to add row in the Taxes and Other Charges table of sales transaction. Hence these details are tracked as well in the Shipping Rule itself.
![Shipping Rule Filters]({{docs_base_url}}/assets/img/articles/$SGrab_260.png)
Apart from price range, Shipping Rule will also validate if its territory and company matches with that of Customer's territory and company.
Following is an example of how shipping charges are auto-applied on sales order based on Shipping Rule.
![Shipping Rule Application]({{docs_base_url}}/assets/img/articles/$SGrab_261.png)

View File

@ -1,43 +0,0 @@
<h1>Managing Sales Persons In Sales Transactions</h1>
In ERPNext, Sales Person master is maintained in [tree structure](https://erpnext.com/kb/setup/managing-tree-structure-masters). Sales Person table is available in all the Sales transactions, at the bottom of transactions form.
If you have specific Sales Person attached to Customer, you can mention Sales Person details in the Customer master itself. On selection of Customer in the transactions, you will have Sales Person details auto-fetched in that transaction.
####Sales Person Contribution
If you have more than one sales person working together on an order, then with listing all the sales person for that order, you will also need to define contribution based on their effort. For example, Sales Person Aasif, Harish and Jivan are working on order. While Aasif and Harish followed this order throughout, Jivan got involved just in the end. Accordingly you should define % Contribution in the sales transaction as:
![Sales Person]({{docs_base_url}}/assets/img/articles/Selection_01087d575.png)
Where Sales Order Net Total is 30,000.
<div class=well>Total % Contribution for all Sales Person must be 100%. If only one Sales Person is selected, then enter % Contribution as 100% for him/her.</div>
####Sales Person Transaction Report
You can check Sales Person Transaction Report from
`Selling > Standard Reports > Sales Person-wise Transaction Summary`
This report will be generated based on Sales Order, Delivery Note and Sales Invoice. This report will give you total amount of sales made by an employee over a period. Based on data provided from this report, you can determine incentives and plan appraisal for an employee.
![SP Report]({{docs_base_url}}/assets/img/articles/Selection_011.png)
####Sales Person wise Commission
ERPNext doesn't calculate commission payable to an Employee, but only provide total amount of sales made by him/her. As a work around, you can add your Sales Person as Sales Partner, as commission calculation feature is readily available in ERPNext. You can check Sales Partner's Commission report from
`Accounts > Standard Reports > Sales Partners Commission`
####Disable Sales Person Feature
If you don't track sales person wise performance, and doesn't wish to use this feature, you can disable it from:
`Setup > Customize > Features Setup`
![Feature Setup]({{docs_base_url}}/assets/img/articles/Selection_01244aec7.png)
After uncheck Sales Extras from Sales and Purchase section, refresh your ERPNext account's tab, so that forms will take effect based on your setting.
<!-- markdown -->

View File

@ -0,0 +1,45 @@
#Sales Persons in the Sales Transactions
In ERPNext, Sales Person master is maintained in [tree structure]({{docs_base_url}}/user/manual/en/setting-up/articles/managing-tree-structure-masters.html). Sales Person is selectable in all the sales transactions.
Sales Persons can be updated in the Customer master as well. On selection of Customer in the transactions, Sales Persons as updated in the Customer will fetch into sales transaction.
<img class="screenshot" alt="Sales Person Customer" src="{{docs_base_url}}/assets/img/articles/sales-person-transaction-1.png">
####Sales Person Contribution
If more than one sales persons are working together on an order, then contribution (%) should be set for each Sales Person.
<img class="screenshot" alt="Sales Person Order" src="{{docs_base_url}}/assets/img/articles/sales-person-transaction-2.png">
On saving transaction, based on the Net Total and Contriution (%), `Contribution to Net Total` will be calculated for each Sales Person.
<div class=well>Total % Contribution for all Sales Person must be 100%. If only one Sales Person is selected, then % Contribution will be 100.</div>
####Sales Person Transaction Report
Check Sales Person's Transaction report from:
`Selling > Standard Reports > Sales Personwise Transaction Summary`
This report can be generated based on Sales Order, Delivery Note and Sales Invoice. It will give you total amount of sale made by an employe.
<img class="screenshot" alt="Sales Person Report" src="{{docs_base_url}}/assets/img/articles/sales-person-transaction-3.png">
####Sales Person wise Commission
ERPNext only provide total amount of sale made by a Sales Person. If you offer commission to Sales Person, you should add Sales Person as Sales Partners in ERPNext. For Sales Partners, you can define Commission (%). On selected on Sales Partner in a sales transction, based on Net Total, Commission Amount is calculated as well. You can check Sales Partner's commission report from:
`Accounts > Standard Reports > Sales Partners Commission`
####Disable Sales Person Feature
If you don't track Sales Person wise performance, and doesn't wish to use this feature, you can disable it from:
`Setup > Customize > Features Setup`
<img class="screenshot" alt="Disable Sales Person" src="{{docs_base_url}}/assets/img/articles/sales-person-transaction-4.png">
On disabling this feature, fields and tables related to Sales Person will become hidden from masters and transcations.
<!-- markdown -->

View File

@ -0,0 +1,33 @@
#Shipping Rule
Shipping Rule master helps in defining a rule based on which shipping charge is applied on a sales transactions.
Most of the companies (mainly retail) have shipping charge applied based on the invoice total. If invoice value is above certain value, then shipping charge applied are lesser. If invoice value is less, then shipping charges applied are bit more than high shipping charges applied on a high value invoice. You can setup Shipping Rule to address the requirement of varying shipping charge based on the Net Total of sales transaction.
To setup Shipping Rule, go to:
`Selling > Setup > Shipping Rule` or `Accounts > Setup > Shipping Rule`
####Shipping Rule Conditions
<img alt="Shipping Rule Prices" class="screenshot" src="{{docs_base_url}}/assets/img/articles/shipping-charges-1.png">
Referring above, you will notice that shipping charges are reducing as valye is increasing. This shipping charge will only be applied if transaction total falls under one of the above range.
####Valid for Countries
You can set Shipping Charges valid for all the countries, or specify specific Country. If specific countries mentioned, then Shipping Charges will be applied only if Customer's country matches Country mentioned in the Shipping Rule.
<img alt="Shipping Rule " class="screenshot" src="{{docs_base_url}}/assets/img/articles/shipping-charges-2.gif">
####Shipping Account
If shipping charges are applied based on Shipping Rule, then more values like Shipping Account, Cost Center will be needed as well to add row in the Taxes and Other Charges table of transaction. Hence these details are tracked as well in the Shipping Rule.
<img alt="Shipping Account" class="screenshot" src="{{docs_base_url}}/assets/img/articles/shipping-charges-3.png">
####Shipping Rule Application
Following is an example of how shipping charges is auto-applied on Sales Order based on Shipping Rule.
<img alt="Shipping Rule Application" class="screenshot" src="{{docs_base_url}}/assets/img/articles/shipping-charges-4.gif">

View File

@ -1,17 +0,0 @@
<h1>Stopping a Sales Order</h1>
In the submitted Sales Orders, you will find **Stop** option. Stopping Sales Order will restrict user from creating Delivery Note and Sales Invoice against it.
![stop Sales Order]({{docs_base_url}}/assets/img/articles/$SGrab_439.png)
####Scenario
East Wind receives an order for ten laptops. Sales Order is also created for ten units. Due to scarcity of stock, only seven units are delivered to customer. Pending three units are to be delivered soon. Customer inform East Wind need not deliver pending item, as they have purchased it from other vendor.
In this case, after East Wind will create Delivery Note and Sales Invoice only for the seven units of Laptop, and set Sales Order as stopped.
![Sales Order Stopped]({{docs_base_url}}/assets/img/articles/$SGrab_440.png)
Once Sales Order is set as stopped, you will not have pending quantities (three in this case) reflecting in Pending to Deliver and Pending to Invoice reports. To make further transactions against Stopped Sales Order, you should first Unstop it.
<!-- markdown -->

View File

@ -14,6 +14,6 @@ This action will wipe out all the data related to that company like Quotation, I
<img alt="Delete Transactions" class="screenshot" src="{{docs_base_url}}/assets/img/articles/delete-company.png">
**Note:** If you want to delete the company record itself, the use the normal "Delete" button from Menu options. It will also delete Chart of Accounts, Chart of Cost Centers and Warehouse records for that company.
**Note:** If you want to delete the company record itself, use the normal "Delete" button from Menu options. It will also delete Chart of Accounts, Chart of Cost Centers and Warehouse records for that company.
<!-- markdown -->
<!-- markdown -->

View File

@ -24,7 +24,7 @@ Select Based On. Authorization Rule will be applied based on value selected in t
**Step 4:**
Select Role on whom this Authorization Rule will be applicable. As per the example considered, Sales User will be selected as Application To (Role). To be more specific you can also select Applicale To User, if you wish to apply to rule for specific Sales User, and not all Sales User. Its okay to not select Sales User, as its not mandatory.
Select Role on whom this Authorization Rule will be applicable. As per the example considered, Sales User will be selected as Application To (Role). To be more specific you can also select Applicable To User, if you wish to apply the rule for specific Sales User, and not all Sales User. Its okay to not select Sales User, as its not mandatory.
**Step 5:**

View File

@ -11,7 +11,7 @@ letters assigned to an individual Item. Serialized items are generally high valu
Non Serialized items are generally fast moving and low value item, hence doesn't need tracking for each unit. Items like screw, cotton waste, other consumables, stationary products can be categorized as non-serialized.
> Stock Reconciliation option is available for the non serialized Items only. For seriazlized and batch items, you should create Material Receipt entry in Stock Entry form.
> Stock Reconciliation option is available for the non serialized Items only. For serialized and batch items, you should create Material Receipt entry in Stock Entry form.
### Opening Stocks
@ -35,7 +35,7 @@ A predefined template of an spreadsheet file should be followed for importing it
The csv format is case-sensitive. Do not edit the headers which are preset in the template. In the Item Code and Warehouse column, enter exact Item Code and Warehouse as created in your ERPNext account. For quatity, enter stock level you wish to set for that item, in a specific warehouse.
#### **Step 3: Upload file and Enter Values in Stock Reconciliation Form
#### Step 3: Upload file and Enter Values in Stock Reconciliation Form
<img class="screenshot" alt="Stock Reconciliation" src="{{docs_base_url}}/assets/img/setup/stock-recon-2.png">

View File

@ -30,6 +30,6 @@
<div class="col-sm-8">
Watch video presentations from the ERPNext team and users from the 2014 ERPNext Conference.
<br><br>
<a href="https://conf.erpnext.com">Join us at the ERPNext Conference on October 9th 2015 in Mumbai</a>
<a href="https://conf.erpnext.com">ERPNext Conference on October 9th 2015 in Mumbai</a>
</div>
</div>
</div>

View File

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

View File

@ -26,6 +26,7 @@
"options": "Simple",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@ -51,6 +52,7 @@
"options": "ATT-",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@ -76,6 +78,7 @@
"options": "Employee",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@ -100,6 +103,7 @@
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@ -126,6 +130,7 @@
"options": "\nPresent\nAbsent\nHalf Day",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@ -151,6 +156,7 @@
"options": "Leave Type",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 1,
"reqd": 0,
@ -173,6 +179,7 @@
"oldfieldtype": "Column Break",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@ -198,6 +205,7 @@
"oldfieldtype": "Date",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@ -223,6 +231,7 @@
"options": "Fiscal Year",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@ -248,6 +257,7 @@
"options": "Company",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@ -271,6 +281,7 @@
"options": "Attendance",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@ -289,7 +300,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2015-11-16 06:29:42.089225",
"modified": "2016-01-25 15:36:36.252173",
"modified_by": "Administrator",
"module": "HR",
"name": "Attendance",

View File

@ -0,0 +1,21 @@
.top-toolbar{
padding-bottom: 30px;
margin-left: -17px;
}
.bottom-toolbar{
margin-left: -17px;
margin-top: 20px;
}
.btn{
margin-right: 5px;
}
.marked-employee-label{
font-weight: normal;
}
.checkbox{
margin-top: -3px;
}

View File

@ -0,0 +1,244 @@
frappe.ui.form.on("Employee Attendance Tool", {
refresh: function(frm) {
frm.disable_save();
},
onload: function(frm) {
erpnext.employee_attendance_tool.load_employees(frm);
},
date: function(frm) {
erpnext.employee_attendance_tool.load_employees(frm);
},
department: function(frm) {
erpnext.employee_attendance_tool.load_employees(frm);
},
branch: function(frm) {
erpnext.employee_attendance_tool.load_employees(frm);
},
company: function(frm) {
erpnext.employee_attendance_tool.load_employees(frm);
}
});
erpnext.employee_attendance_tool = {
load_employees: function(frm) {
if(frm.doc.date) {
frappe.call({
method: "erpnext.hr.doctype.employee_attendance_tool.employee_attendance_tool.get_employees",
args: {
date: frm.doc.date,
department: frm.doc.department,
branch: frm.doc.branch,
company: frm.doc.company
},
callback: function(r) {
if(r.message['unmarked'].length > 0) {
unhide_field('unmarked_attendance_section')
if(!frm.employee_area) {
frm.employee_area = $('<div>')
.appendTo(frm.fields_dict.employees_html.wrapper);
}
frm.EmployeeSelector = new erpnext.EmployeeSelector(frm, frm.employee_area, r.message['unmarked'])
}
else{
hide_field('unmarked_attendance_section')
}
if(r.message['marked'].length > 0) {
unhide_field('marked_attendance_section')
if(!frm.marked_employee_area) {
frm.marked_employee_area = $('<div>')
.appendTo(frm.fields_dict.marked_attendance_html.wrapper);
}
frm.marked_employee = new erpnext.MarkedEmployee(frm, frm.marked_employee_area, r.message['marked'])
}
else{
hide_field('marked_attendance_section')
}
}
});
}
}
}
erpnext.MarkedEmployee = Class.extend({
init: function(frm, wrapper, employee) {
this.wrapper = wrapper;
this.frm = frm;
this.make(frm, employee);
},
make: function(frm, employee) {
var me = this;
$(this.wrapper).empty();
var row;
$.each(employee, function(i, m) {
var attendance_icon = "icon-check";
var color_class = "";
if(m.status == "Absent") {
attendance_icon = "icon-check-empty"
color_class = "text-muted";
}
else if(m.status == "Half Day") {
attendance_icon = "icon-check-minus"
}
if (i===0 || i % 4===0) {
row = $('<div class="row"></div>').appendTo(me.wrapper);
}
$(repl('<div class="col-sm-3 %(color_class)s">\
<label class="marked-employee-label"><span class="%(icon)s"></span>\
%(employee)s</label>\
</div>', {
employee: m.employee_name,
icon: attendance_icon,
color_class: color_class
})).appendTo(row);
});
}
});
erpnext.EmployeeSelector = Class.extend({
init: function(frm, wrapper, employee) {
this.wrapper = wrapper;
this.frm = frm;
this.make(frm, employee);
},
make: function(frm, employee) {
var me = this;
$(this.wrapper).empty();
var employee_toolbar = $('<div class="col-sm-12 top-toolbar">\
<button class="btn btn-default btn-add btn-xs"></button>\
<button class="btn btn-xs btn-default btn-remove"></button>\
</div>').appendTo($(this.wrapper));
var mark_employee_toolbar = $('<div class="col-sm-12 bottom-toolbar">\
<button class="btn btn-primary btn-mark-present btn-xs"></button>\
<button class="btn btn-default btn-mark-absent btn-xs"></button>\
<button class="btn btn-default btn-mark-half-day btn-xs"></button></div>')
employee_toolbar.find(".btn-add")
.html(__('Check all'))
.on("click", function() {
$(me.wrapper).find('input[type="checkbox"]').each(function(i, check) {
if(!$(check).is(":checked")) {
check.checked = true;
}
});
});
employee_toolbar.find(".btn-remove")
.html(__('Uncheck all'))
.on("click", function() {
$(me.wrapper).find('input[type="checkbox"]').each(function(i, check) {
if($(check).is(":checked")) {
check.checked = false;
}
});
});
mark_employee_toolbar.find(".btn-mark-present")
.html(__('Mark Present'))
.on("click", function() {
var employee_present = [];
$(me.wrapper).find('input[type="checkbox"]').each(function(i, check) {
if($(check).is(":checked")) {
employee_present.push(employee[i]);
}
});
frappe.call({
method: "erpnext.hr.doctype.employee_attendance_tool.employee_attendance_tool.mark_employee_attendance",
args:{
"employee_list":employee_present,
"status":"Present",
"date":frm.doc.date,
"company":frm.doc.company
},
callback: function(r) {
erpnext.employee_attendance_tool.load_employees(frm);
}
});
});
mark_employee_toolbar.find(".btn-mark-absent")
.html(__('Mark Absent'))
.on("click", function() {
var employee_absent = [];
$(me.wrapper).find('input[type="checkbox"]').each(function(i, check) {
if($(check).is(":checked")) {
employee_absent.push(employee[i]);
}
});
frappe.call({
method: "erpnext.hr.doctype.employee_attendance_tool.employee_attendance_tool.mark_employee_attendance",
args:{
"employee_list":employee_absent,
"status":"Absent",
"date":frm.doc.date,
"company":frm.doc.company
},
callback: function(r) {
erpnext.employee_attendance_tool.load_employees(frm);
}
});
});
mark_employee_toolbar.find(".btn-mark-half-day")
.html(__('Mark Half Day'))
.on("click", function() {
var employee_half_day = [];
$(me.wrapper).find('input[type="checkbox"]').each(function(i, check) {
if($(check).is(":checked")) {
employee_half_day.push(employee[i]);
}
});
frappe.call({
method: "erpnext.hr.doctype.employee_attendance_tool.employee_attendance_tool.mark_employee_attendance",
args:{
"employee_list":employee_half_day,
"status":"Half Day",
"date":frm.doc.date,
"company":frm.doc.company
},
callback: function(r) {
erpnext.employee_attendance_tool.load_employees(frm);
}
});
});
var row;
$.each(employee, function(i, m) {
if (i===0 || (i % 4) === 0) {
row = $('<div class="row"></div>').appendTo(me.wrapper);
}
$(repl('<div class="col-sm-3 unmarked-employee-checkbox">\
<div class="checkbox">\
<label><input type="checkbox" class="employee-check" employee="%(employee)s"/>\
%(employee)s</label>\
</div></div>', {employee: m.employee_name})).appendTo(row);
});
mark_employee_toolbar.appendTo($(this.wrapper));
}
});

View File

@ -0,0 +1,275 @@
{
"allow_copy": 1,
"allow_import": 0,
"allow_rename": 0,
"creation": "2016-01-27 14:59:47.849379",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"fields": [
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"default": "Today",
"fieldname": "date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Date",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "department",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Department",
"length": 0,
"no_copy": 0,
"options": "Department",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break_3",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "branch",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Branch",
"length": 0,
"no_copy": 0,
"options": "Branch",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "company",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Company",
"length": 0,
"no_copy": 0,
"options": "Company",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "date",
"fieldname": "unmarked_attendance_section",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Unmarked Attendance",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "employees_html",
"fieldtype": "HTML",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Employees HTML",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "date",
"fieldname": "marked_attendance_section",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Marked Attendance",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "marked_attendance_html",
"fieldtype": "HTML",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Marked Attendance HTML",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"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": 1,
"hide_toolbar": 1,
"idx": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 1,
"istable": 0,
"max_attachments": 0,
"modified": "2016-01-29 02:14:36.034952",
"modified_by": "Administrator",
"module": "HR",
"name": "Employee Attendance Tool",
"name_case": "",
"owner": "Administrator",
"permissions": [
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 1,
"delete": 0,
"email": 0,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 0,
"read": 1,
"report": 0,
"role": "HR Manager",
"set_user_permissions": 0,
"share": 0,
"submit": 0,
"write": 1
}
],
"read_only": 0,
"read_only_onload": 0,
"sort_field": "modified",
"sort_order": "DESC"
}

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