Merge pull request #5996 from KanchanChauhan/users-selection-for-project
'Project Users' role not required to add user to the project
diff --git a/.travis.yml b/.travis.yml
index 31f4408..9cad59f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,4 +1,5 @@
language: python
+dist: trusty
python:
- "2.7"
@@ -11,10 +12,14 @@
- "sh -e /etc/init.d/xvfb start"
install:
- - sudo apt-get purge -y mysql-common
- - wget https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh
- - sudo bash setup_frappe.sh --skip-setup-bench --mysql-root-password travis --bench-branch develop
- - sudo pip install --upgrade pip
+ - sudo apt-get purge -y mysql-common mysql-server mysql-client
+ # - wget https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh
+ # - sudo bash setup_frappe.sh --skip-setup-bench --mysql-root-password travis --bench-branch develop
+ - wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py
+ - sudo python install.py --develop --user travis --without-bench-setup
+ - sudo pip install -e ~/bench
+
+ # - sudo pip install --upgrade pip
- rm $TRAVIS_BUILD_DIR/.git/shallow
- bash $TRAVIS_BUILD_DIR/travis/bench_init.sh
- cp -r $TRAVIS_BUILD_DIR/test_sites/test_site ~/frappe-bench/sites/
@@ -30,7 +35,7 @@
- bench --verbose run-tests --driver Firefox
before_script:
- - mysql -e 'create database test_frappe'
+ - mysql -u root -ptravis -e 'create database test_frappe'
- echo "USE mysql;\nCREATE USER 'test_frappe'@'localhost' IDENTIFIED BY 'test_frappe';\nFLUSH PRIVILEGES;\n" | mysql -u root -ptravis
- echo "USE mysql;\nGRANT ALL PRIVILEGES ON \`test_frappe\`.* TO 'test_frappe'@'localhost';\n" | mysql -u root -ptravis
diff --git a/erpnext/__init__.py b/erpnext/__init__.py
index b592739..f4f4532 100644
--- a/erpnext/__init__.py
+++ b/erpnext/__init__.py
@@ -2,7 +2,7 @@
from __future__ import unicode_literals
import frappe
-__version__ = '7.0.10'
+__version__ = '7.0.18'
def get_default_company(user=None):
'''Get default company for user'''
diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.js b/erpnext/accounts/doctype/payment_entry/payment_entry.js
index a5fbfba..d155ecd 100644
--- a/erpnext/accounts/doctype/payment_entry/payment_entry.js
+++ b/erpnext/accounts/doctype/payment_entry/payment_entry.js
@@ -414,10 +414,7 @@
paid_amount: function(frm) {
frm.set_value("base_paid_amount", flt(frm.doc.paid_amount) * flt(frm.doc.source_exchange_rate));
-
frm.trigger("reset_received_amount");
-
- frm.set_paid_amount_based_on_received_amount = false;
},
received_amount: function(frm) {
@@ -436,22 +433,19 @@
frm.events.allocate_party_amount_against_ref_docs(frm, frm.doc.received_amount);
else
frm.events.set_difference_amount(frm);
+
+ frm.set_paid_amount_based_on_received_amount = false;
},
reset_received_amount: function(frm) {
if(!frm.set_paid_amount_based_on_received_amount &&
(frm.doc.paid_from_account_currency == frm.doc.paid_to_account_currency)) {
- // var total_deductions = frappe.utils.sum($.map(frm.doc.deductions || [],
- // function(d) { return d.amount}));
- //
- // var received_amount = frm.doc.paid_amount +
- // flt(total_deductions) / flt(frm.doc.source_exchange_rate);
- //
frm.set_value("received_amount", frm.doc.paid_amount);
frm.set_value("target_exchange_rate", frm.doc.source_exchange_rate);
frm.set_value("base_received_amount", frm.doc.base_paid_amount);
}
+
if(frm.doc.payment_type == "Receive")
frm.events.allocate_party_amount_against_ref_docs(frm, frm.doc.paid_amount);
else
@@ -611,7 +605,6 @@
if(frm.doc.total_allocated_amount < party_amount)
unallocated_amount = party_amount - frm.doc.total_allocated_amount;
}
-
frm.set_value("unallocated_amount", unallocated_amount);
var difference_amount = 0;
diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py
index 6c04cf5..175ebda 100644
--- a/erpnext/accounts/doctype/payment_entry/payment_entry.py
+++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py
@@ -569,10 +569,9 @@
@frappe.whitelist()
def get_reference_details(reference_doctype, reference_name, party_account_currency):
total_amount = outstanding_amount = exchange_rate = None
+ ref_doc = frappe.get_doc(reference_doctype, reference_name)
if reference_doctype != "Journal Entry":
- ref_doc = frappe.get_doc(reference_doctype, reference_name)
-
if party_account_currency == ref_doc.company_currency:
total_amount = ref_doc.base_grand_total
exchange_rate = 1
diff --git a/erpnext/accounts/doctype/sales_invoice/pos.py b/erpnext/accounts/doctype/sales_invoice/pos.py
index 605bf09..9f64e07 100644
--- a/erpnext/accounts/doctype/sales_invoice/pos.py
+++ b/erpnext/accounts/doctype/sales_invoice/pos.py
@@ -20,7 +20,7 @@
if pos_profile.get('name'):
pos_profile = frappe.get_doc('POS Profile', pos_profile.get('name'))
else:
- frappe.msgprint('<a href="#Form/POS Profile/New POS Profile">'
+ frappe.msgprint('<a href="#List/POS Profile">'
+ _("Welcome to POS: Create your POS Profile") + '</a>');
update_pos_profile_data(doc, pos_profile)
@@ -115,7 +115,7 @@
item.actual_qty = frappe.db.get_value('Bin', {'item_code': item.name,
'warehouse': item.default_warehouse}, 'actual_qty') or 0
item.serial_nos = get_serial_nos(item, pos_profile)
- item.batch_nos = frappe.db.sql_list("""select name from `tabBatch` where expiry_date > curdate()
+ item.batch_nos = frappe.db.sql_list("""select name from `tabBatch` where ifnull(expiry_date, '4000-10-10') > curdate()
and item = %(item_code)s""", {'item_code': item.item_code})
item_list.append(item)
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json
index af5790f..06bc635 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json
@@ -10,6 +10,7 @@
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
+ "editable_grid": 0,
"fields": [
{
"allow_on_submit": 0,
@@ -1135,7 +1136,7 @@
"no_copy": 0,
"permlevel": 0,
"precision": "2",
- "print_hide": 0,
+ "print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
@@ -3676,7 +3677,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2016-07-07 13:40:27.977803",
+ "modified": "2016-08-03 11:50:49.680278",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice",
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
index b284619..f055140 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
@@ -87,15 +87,6 @@
def before_save(self):
set_account_for_mode_of_payment(self)
- def update_change_amount(self):
- self.base_paid_amount = 0.0
- if self.paid_amount:
- self.base_paid_amount = flt(self.paid_amount * self.conversion_rate, self.precision("base_paid_amount"))
- self.change_amount = self.base_change_amount = 0.0
- if self.paid_amount > self.grand_total:
- self.change_amount = flt(self.paid_amount - self.grand_total, self.precision("change_amount"))
- self.base_change_amount = flt(self.change_amount * self.conversion_rate, self.precision("base_change_amount"))
-
def on_submit(self):
if not self.recurring_id:
frappe.get_doc('Authorization Control').validate_approving_authority(self.doctype,
@@ -110,6 +101,7 @@
self.update_status_updater_args()
self.update_prevdoc_status()
self.update_billing_status_in_dn()
+ self.clear_unallocated_mode_of_payments()
# Updating stock ledger should always be called after updating prevdoc status,
# because updating reserved qty in bin depends upon updated delivered qty in SO
@@ -296,6 +288,12 @@
frappe.throw(_("Debit To account must be a Receivable account"))
self.party_account_currency = account.account_currency
+
+ def clear_unallocated_mode_of_payments(self):
+ self.set("payments", self.get("payments", {"amount": ["not in", [0, None, ""]]}))
+
+ frappe.db.sql("""delete from `tabSales Invoice Payment` where parent = %s
+ and amount = 0""", self.name)
def validate_with_previous_doc(self):
super(SalesInvoice, self).validate_with_previous_doc({
@@ -504,6 +502,7 @@
gl_entries = merge_similar_entries(gl_entries)
self.make_pos_gl_entries(gl_entries)
+ self.make_gle_for_change(gl_entries)
self.make_write_off_gl_entry(gl_entries)
@@ -578,27 +577,24 @@
def make_pos_gl_entries(self, gl_entries):
if cint(self.is_pos) and self.paid_amount:
- # POS, make payment entries
- gl_entries.append(
- self.get_gl_dict({
- "account": self.debit_to,
- "party_type": "Customer",
- "party": self.customer,
- "against": self.cash_bank_account,
- "credit": flt(self.base_paid_amount - self.base_change_amount),
- "credit_in_account_currency": flt(self.base_paid_amount - self.base_change_amount) \
- if self.party_account_currency==self.company_currency else flt(self.paid_amount - self.change_amount),
- "against_voucher": self.return_against if cint(self.is_return) else self.name,
- "against_voucher_type": self.doctype,
- }, self.party_account_currency)
- )
-
- cash_account = ''
for payment_mode in self.payments:
- if payment_mode.type == 'Cash':
- cash_account = payment_mode.account
-
if payment_mode.base_amount > 0:
+ # POS, make payment entries
+ gl_entries.append(
+ self.get_gl_dict({
+ "account": self.debit_to,
+ "party_type": "Customer",
+ "party": self.customer,
+ "against": payment_mode.account,
+ "credit": payment_mode.base_amount,
+ "credit_in_account_currency": payment_mode.base_amount \
+ if self.party_account_currency==self.company_currency \
+ else payment_mode.amount,
+ "against_voucher": self.return_against if cint(self.is_return) else self.name,
+ "against_voucher_type": self.doctype,
+ }, self.party_account_currency)
+ )
+
payment_mode_account_currency = get_account_currency(payment_mode.account)
gl_entries.append(
self.get_gl_dict({
@@ -609,20 +605,44 @@
if payment_mode_account_currency==self.company_currency else payment_mode.amount
}, payment_mode_account_currency)
)
-
- if self.change_amount:
- cash_account = cash_account or self.payments[0].account
- cash_account_currency = get_account_currency(cash_account)
+
+ def make_gle_for_change(self, gl_entries):
+ if cint(self.is_pos) and self.change_amount:
+ cash_account = self.get_cash_account()
+ if cash_account:
+ gl_entries.append(
+ self.get_gl_dict({
+ "account": self.debit_to,
+ "party_type": "Customer",
+ "party": self.customer,
+ "against": cash_account,
+ "debit": flt(self.base_change_amount),
+ "debit_in_account_currency": flt(self.base_change_amount) \
+ if self.party_account_currency==self.company_currency else flt(self.change_amount),
+ "against_voucher": self.return_against if cint(self.is_return) else self.name,
+ "against_voucher_type": self.doctype
+ }, self.party_account_currency)
+ )
+
gl_entries.append(
self.get_gl_dict({
"account": cash_account,
"against": self.customer,
- "credit": self.base_change_amount,
- "credit_in_account_currency": self.base_change_amount \
- if payment_mode_account_currency==self.company_currency else self.change_amount
- }, payment_mode_account_currency)
+ "credit": self.base_change_amount
+ })
)
-
+
+
+ def get_cash_account(self):
+ cash_account = [d.account for d in self.payments if d.type=="Cash"]
+ if cash_account:
+ cash_account = cash_account[0]
+ else:
+ cash_account = frappe.db.get_value("Account",
+ filters={"company": self.company, "account_type": "Cash", "is_group": 0})
+
+ return cash_account
+
def make_write_off_gl_entry(self, gl_entries):
# write off entries, applicable if only pos
if self.write_off_account and self.write_off_amount:
diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py
index e7eee5f..dd28059 100644
--- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py
+++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py
@@ -503,7 +503,8 @@
[pos["taxes"][1]["account_head"], 0.0, 50.0],
[stock_in_hand, 0.0, abs(sle.stock_value_difference)],
[pos["items"][0]["expense_account"], abs(sle.stock_value_difference), 0.0],
- [si.debit_to, 0.0, si.paid_amount],
+ [si.debit_to, 0.0, 300.0],
+ [si.debit_to, 0.0, cash_amount],
["_Test Bank - _TC", 300.0, 0.0],
["Cash - _TC", cash_amount, 0.0]
])
diff --git a/erpnext/accounts/page/pos/pos.js b/erpnext/accounts/page/pos/pos.js
index a89f40e..1830103 100644
--- a/erpnext/accounts/page/pos/pos.js
+++ b/erpnext/accounts/page/pos/pos.js
@@ -423,16 +423,16 @@
if(key){
return $.grep(window.items, function(item){
- if( (item.item_code.toLowerCase().match(key)) ||
- (item.item_name.toLowerCase().match(key)) || (item.item_group.toLowerCase().match(key)) ){
+ if(in_list(item.batch_nos, me.search.$input.val())){
+ return me.item_batch_no[item.item_code] = me.search.$input.val()
+ } else if((item.item_code.toLowerCase().match(key)) ||
+ (item.item_name.toLowerCase().match(key)) || (item.item_group.toLowerCase().match(key))){
return true
}else if(item.barcode == me.search.$input.val()){
return item.barcode == me.search.$input.val();
} else if (in_list(Object.keys(item.serial_nos), me.search.$input.val())){
me.item_serial_no[item.item_code] = [me.search.$input.val(), item.serial_nos[me.search.$input.val()]]
return true
- } else if(in_list(item.batch_nos, me.search.$input.val())){
- return me.item_batch_no[item.item_code] = me.search.$input.val()
}
})
}else{
diff --git a/erpnext/accounts/report/accounts_payable/accounts_payable.html b/erpnext/accounts/report/accounts_payable/accounts_payable.html
index 07f9e47..d3020b2 100644
--- a/erpnext/accounts/report/accounts_payable/accounts_payable.html
+++ b/erpnext/accounts/report/accounts_payable/accounts_payable.html
@@ -1 +1 @@
-{% include "erpnext/accounts/report/accounts_receivable/accounts_receivable.html" %}
+{% include "accounts/report/accounts_receivable/accounts_receivable.html" %}
diff --git a/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.html b/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.html
index 07f9e47..d3020b2 100644
--- a/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.html
+++ b/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.html
@@ -1 +1 @@
-{% include "erpnext/accounts/report/accounts_receivable/accounts_receivable.html" %}
+{% include "accounts/report/accounts_receivable/accounts_receivable.html" %}
diff --git a/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.html b/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.html
index 07f9e47..d3020b2 100644
--- a/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.html
+++ b/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.html
@@ -1 +1 @@
-{% include "erpnext/accounts/report/accounts_receivable/accounts_receivable.html" %}
+{% include "accounts/report/accounts_receivable/accounts_receivable.html" %}
diff --git a/erpnext/accounts/report/balance_sheet/balance_sheet.html b/erpnext/accounts/report/balance_sheet/balance_sheet.html
index 14dc0a6..d4ae54d 100644
--- a/erpnext/accounts/report/balance_sheet/balance_sheet.html
+++ b/erpnext/accounts/report/balance_sheet/balance_sheet.html
@@ -1 +1 @@
-{% include "erpnext/accounts/report/financial_statements.html" %}
+{% include "accounts/report/financial_statements.html" %}
diff --git a/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.html b/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.html
index 14dc0a6..d4ae54d 100644
--- a/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.html
+++ b/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.html
@@ -1 +1 @@
-{% include "erpnext/accounts/report/financial_statements.html" %}
+{% include "accounts/report/financial_statements.html" %}
diff --git a/erpnext/accounts/report/trial_balance/trial_balance.html b/erpnext/accounts/report/trial_balance/trial_balance.html
index 14dc0a6..d4ae54d 100644
--- a/erpnext/accounts/report/trial_balance/trial_balance.html
+++ b/erpnext/accounts/report/trial_balance/trial_balance.html
@@ -1 +1 @@
-{% include "erpnext/accounts/report/financial_statements.html" %}
+{% include "accounts/report/financial_statements.html" %}
diff --git a/erpnext/buying/doctype/quality_inspection/quality_inspection.json b/erpnext/buying/doctype/quality_inspection/quality_inspection.json
index ba5396c..06246cc 100644
--- a/erpnext/buying/doctype/quality_inspection/quality_inspection.json
+++ b/erpnext/buying/doctype/quality_inspection/quality_inspection.json
@@ -3,10 +3,12 @@
"allow_import": 0,
"allow_rename": 0,
"autoname": "naming_series:",
+ "beta": 0,
"creation": "2013-04-30 13:13:03",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
+ "editable_grid": 1,
"fields": [
{
"allow_on_submit": 0,
@@ -16,6 +18,7 @@
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Series",
@@ -24,6 +27,7 @@
"options": "QI-",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -40,6 +44,7 @@
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 1,
"label": "Report Date",
@@ -49,6 +54,7 @@
"oldfieldtype": "Date",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -64,6 +70,7 @@
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
@@ -71,6 +78,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -86,6 +94,7 @@
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 1,
"label": "Inspection Type",
@@ -96,6 +105,7 @@
"options": "\nIncoming\nOutgoing\nIn Process",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -111,6 +121,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Purchase Receipt No",
@@ -121,6 +132,7 @@
"options": "Purchase Receipt",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -136,6 +148,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Delivery Note No",
@@ -146,6 +159,7 @@
"options": "Delivery Note",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -161,6 +175,7 @@
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
@@ -168,6 +183,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -183,6 +199,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 1,
"label": "Item Code",
@@ -193,6 +210,7 @@
"options": "Item",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -208,6 +226,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Item Serial No",
@@ -218,6 +237,7 @@
"options": "Serial No",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -233,6 +253,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Batch No",
@@ -243,6 +264,7 @@
"options": "Batch",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -258,6 +280,7 @@
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Sample Size",
@@ -267,6 +290,7 @@
"oldfieldtype": "Currency",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -282,6 +306,7 @@
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
@@ -289,6 +314,7 @@
"oldfieldtype": "Column Break",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -305,6 +331,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Item Name",
@@ -313,6 +340,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -328,6 +356,7 @@
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Description",
@@ -337,6 +366,7 @@
"oldfieldtype": "Small Text",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -353,6 +383,7 @@
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
@@ -360,6 +391,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -376,6 +408,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Inspected By",
@@ -386,6 +419,7 @@
"options": "User",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -401,6 +435,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Verified By",
@@ -410,6 +445,7 @@
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -425,6 +461,7 @@
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
@@ -432,6 +469,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -447,6 +485,7 @@
"fieldtype": "Text",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Remarks",
@@ -456,6 +495,7 @@
"oldfieldtype": "Text",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -471,6 +511,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 1,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Amended From",
@@ -481,6 +522,7 @@
"options": "Quality Inspection",
"permlevel": 0,
"print_hide": 1,
+ "print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -496,6 +538,7 @@
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "",
@@ -505,6 +548,7 @@
"options": "Simple",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -520,6 +564,7 @@
"fieldtype": "Button",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Get Specification Details",
@@ -528,6 +573,7 @@
"options": "get_item_specification_details",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -543,6 +589,7 @@
"fieldtype": "Table",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Readings",
@@ -553,6 +600,7 @@
"options": "Quality Inspection Reading",
"permlevel": 0,
"print_hide": 0,
+ "print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -565,13 +613,14 @@
"hide_toolbar": 0,
"icon": "icon-search",
"idx": 1,
+ "image_view": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 1,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2015-11-16 06:29:54.786379",
+ "modified": "2016-07-31 11:42:40.498926",
"modified_by": "Administrator",
"module": "Buying",
"name": "Quality Inspection",
@@ -598,7 +647,10 @@
"write": 1
}
],
+ "quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
- "search_fields": "item_code, report_date, purchase_receipt_no, delivery_note_no"
+ "search_fields": "item_code, report_date, purchase_receipt_no, delivery_note_no",
+ "sort_order": "ASC",
+ "track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/config/accounts.py b/erpnext/config/accounts.py
index a0fcb63..419d83f 100644
--- a/erpnext/config/accounts.py
+++ b/erpnext/config/accounts.py
@@ -27,6 +27,12 @@
"description": _("Bank/Cash transactions against party or for internal transfer")
},
{
+ "type": "page",
+ "name": "pos",
+ "label": _("POS"),
+ "description": _("Point of Sale")
+ },
+ {
"type": "report",
"name": "Accounts Receivable",
"doctype": "Sales Invoice",
diff --git a/erpnext/config/schools.py b/erpnext/config/schools.py
index ad4372b..78688c9 100644
--- a/erpnext/config/schools.py
+++ b/erpnext/config/schools.py
@@ -13,6 +13,10 @@
},
{
"type": "doctype",
+ "name": "Student Log"
+ },
+ {
+ "type": "doctype",
"name": "Student Batch"
},
{
diff --git a/erpnext/controllers/taxes_and_totals.py b/erpnext/controllers/taxes_and_totals.py
index eb75dee..28b2f7c 100644
--- a/erpnext/controllers/taxes_and_totals.py
+++ b/erpnext/controllers/taxes_and_totals.py
@@ -440,33 +440,32 @@
paid_amount = self.doc.paid_amount \
if self.doc.party_account_currency == self.doc.currency else self.doc.base_paid_amount
- self.doc.outstanding_amount = 0
- if total_amount_to_pay > paid_amount:
- self.doc.outstanding_amount = flt(total_amount_to_pay - flt(paid_amount),
- self.doc.precision("outstanding_amount"))
- self.change_amount()
+ self.calculate_change_amount()
+ self.doc.outstanding_amount = flt(total_amount_to_pay - flt(paid_amount) +
+ flt(self.doc.change_amount), self.doc.precision("outstanding_amount"))
+
elif self.doc.doctype == "Purchase Invoice":
self.doc.outstanding_amount = flt(total_amount_to_pay, self.doc.precision("outstanding_amount"))
def calculate_paid_amount(self):
paid_amount = base_paid_amount = 0.0
for payment in self.doc.get('payments'):
- payment.base_amount = flt(payment.amount * self.doc.conversion_rate)
- paid_amount += payment.amount
- base_paid_amount += payment.base_amount
+ if flt(payment.amount) > 0:
+ payment.base_amount = flt(payment.amount * self.doc.conversion_rate)
+ paid_amount += payment.amount
+ base_paid_amount += payment.base_amount
self.doc.paid_amount = flt(paid_amount, self.doc.precision("paid_amount"))
self.doc.base_paid_amount = flt(base_paid_amount, self.doc.precision("base_paid_amount"))
- def change_amount(self):
- change_amount = 0.0
+ def calculate_change_amount(self):
+ self.doc.change_amount = 0.0
if self.doc.paid_amount > self.doc.grand_total:
- change_amount = flt(self.doc.paid_amount - self.doc.grand_total,
- self.doc.precision("change_amount"))
+ self.doc.change_amount = flt(self.doc.paid_amount - self.doc.grand_total +
+ self.doc.write_off_amount, self.doc.precision("change_amount"))
- self.doc.change_amount = change_amount;
- self.doc.base_change_amount = flt(change_amount * self.doc.conversion_rate,
+ self.doc.base_change_amount = flt(self.doc.change_amount * self.doc.conversion_rate,
self.doc.precision("base_change_amount"))
def calculate_margin(self, item):
diff --git a/erpnext/crm/doctype/lead/lead.py b/erpnext/crm/doctype/lead/lead.py
index 0c3652f..e1c3918 100644
--- a/erpnext/crm/doctype/lead/lead.py
+++ b/erpnext/crm/doctype/lead/lead.py
@@ -38,7 +38,8 @@
frappe.throw(_("Campaign Name is required"))
if self.email_id:
- validate_email_add(self.email_id, True)
+ if not self.flags.ignore_email_validation:
+ validate_email_add(self.email_id, True)
if self.email_id == self.lead_owner:
# Lead Owner cannot be same as the Lead
diff --git a/erpnext/crm/doctype/opportunity/opportunity.py b/erpnext/crm/doctype/opportunity/opportunity.py
index 7978882..a2a1be2 100644
--- a/erpnext/crm/doctype/opportunity/opportunity.py
+++ b/erpnext/crm/doctype/opportunity/opportunity.py
@@ -63,6 +63,8 @@
"email_id": self.contact_email,
"lead_name": sender_name
})
+
+ lead.flags.ignore_email_validation = True
lead.insert(ignore_permissions=True)
lead_name = lead.name
diff --git a/erpnext/demo/demo.py b/erpnext/demo/demo.py
index 2435029..d1f4982 100644
--- a/erpnext/demo/demo.py
+++ b/erpnext/demo/demo.py
@@ -53,7 +53,7 @@
if not runs_for:
runs_for = frappe.utils.date_diff(frappe.utils.nowdate(), current_date)
# runs_for = 100
-
+
fixed_asset.work()
for i in xrange(runs_for):
@@ -72,9 +72,6 @@
stock.work()
accounts.work()
projects.run_projects(current_date)
- # run_stock()
- # run_accounts()
- # run_projects()
# run_messages()
current_date = frappe.utils.add_days(current_date, 1)
diff --git a/erpnext/demo/setup_data.py b/erpnext/demo/setup_data.py
index 3367527..cb33cb1 100644
--- a/erpnext/demo/setup_data.py
+++ b/erpnext/demo/setup_data.py
@@ -32,6 +32,7 @@
setup_employee()
setup_salary_structure()
setup_salary_structure_for_timesheet()
+ setup_leave_allocation()
setup_mode_of_payment()
setup_account_to_expense_type()
setup_user_roles()
@@ -430,3 +431,23 @@
})
pos.insert()
+
+def setup_leave_allocation():
+ year = now_datetime().year
+ for employee in frappe.get_all('Employee', fields=['name']):
+ leave_types = frappe.get_all("Leave Type", fields=['name', 'max_days_allowed'])
+ for leave_type in leave_types:
+ if not leave_type.max_days_allowed:
+ leave_type.max_days_allowed = 10
+
+ leave_allocation = frappe.get_doc({
+ "doctype": "Leave Allocation",
+ "employee": employee.name,
+ "from_date": "{0}-01-01".format(year),
+ "to_date": "{0}-12-31".format(year),
+ "leave_type": leave_type.name,
+ "new_leaves_allocated": random.randint(1, int(leave_type.max_days_allowed))
+ })
+ leave_allocation.insert()
+ leave_allocation.submit()
+ frappe.db.commit()
diff --git a/erpnext/demo/user/hr.py b/erpnext/demo/user/hr.py
index 28966ec..3d5ac83 100644
--- a/erpnext/demo/user/hr.py
+++ b/erpnext/demo/user/hr.py
@@ -1,15 +1,19 @@
from __future__ import unicode_literals
import frappe
import random
-from frappe.utils import random_string
+from frappe.utils import random_string, add_days
from erpnext.projects.doctype.timesheet.test_timesheet import make_timesheet
from erpnext.projects.doctype.timesheet.timesheet import make_salary_slip, make_sales_invoice
from frappe.utils.make_random import how_many, get_random
from erpnext.hr.doctype.expense_claim.expense_claim import get_expense_approver, make_bank_entry
+from erpnext.hr.doctype.leave_application.leave_application import get_leave_balance_on, OverlapError
def work():
frappe.set_user(frappe.db.get_global('demo_hr_user'))
year, month = frappe.flags.current_date.strftime("%Y-%m").split("-")
+
+ mark_attendance()
+ make_leave_application()
# process payroll
if not frappe.db.get_value("Salary Slip", {"month": month, "fiscal_year": year}):
@@ -123,4 +127,53 @@
sales_invoice.calculate_taxes_and_totals()
sales_invoice.insert()
sales_invoice.submit()
- frappe.db.commit()
\ No newline at end of file
+ frappe.db.commit()
+
+def make_leave_application():
+ allocated_leaves = frappe.get_all("Leave Allocation", fields=['employee', 'leave_type'])
+
+ for allocated_leave in allocated_leaves:
+ leave_balance = get_leave_balance_on(allocated_leave.employee, allocated_leave.leave_type, frappe.flags.current_date,
+ consider_all_leaves_in_the_allocation_period=True)
+ if leave_balance != 0:
+ if leave_balance == 1:
+ to_date = frappe.flags.current_date
+ else:
+ to_date = add_days(frappe.flags.current_date, random.randint(0, leave_balance-1))
+
+ leave_application = frappe.get_doc({
+ "doctype": "Leave Application",
+ "employee": allocated_leave.employee,
+ "from_date": frappe.flags.current_date,
+ "to_date": to_date,
+ "leave_type": allocated_leave.leave_type,
+ "status": "Approved"
+ })
+ try:
+ leave_application.insert()
+ leave_application.submit()
+ frappe.db.commit()
+ except (OverlapError):
+ frappe.db.rollback()
+
+def mark_attendance():
+ att_date = frappe.flags.current_date
+ for employee in frappe.get_all('Employee', fields=['name'], filters = {'status': 'Active'}):
+
+ if not frappe.db.get_value("Attendance", {"employee": employee.name, "att_date": att_date}):
+ attendance = frappe.get_doc({
+ "doctype": "Attendance",
+ "employee": employee.name,
+ "att_date": att_date
+ })
+ leave = frappe.db.sql("""select name from `tabLeave Application`
+ where employee = %s and %s between from_date and to_date and status = 'Approved'
+ and docstatus = 1""", (employee.name, att_date))
+
+ if leave:
+ attendance.status = "Absent"
+ else:
+ attendance.status = "Present"
+ attendance.save()
+ attendance.submit()
+ frappe.db.commit()
\ No newline at end of file
diff --git a/erpnext/demo/user/stock.py b/erpnext/demo/user/stock.py
index 46657fd..c86a11b 100644
--- a/erpnext/demo/user/stock.py
+++ b/erpnext/demo/user/stock.py
@@ -7,6 +7,8 @@
from frappe.desk import query_report
from erpnext.stock.stock_ledger import NegativeStockError
from erpnext.stock.doctype.serial_no.serial_no import SerialNoRequiredError, SerialNoQtyError
+from erpnext.stock.doctype.delivery_note.delivery_note import make_sales_return
+from erpnext.stock.doctype.purchase_receipt.purchase_receipt import make_purchase_return
def work():
frappe.set_user(frappe.db.get_global('demo_manufacturing_user'))
@@ -15,6 +17,8 @@
make_delivery_note()
make_stock_reconciliation()
submit_draft_stock_entries()
+ make_sales_return_records()
+ make_purchase_return_records()
def make_purchase_receipt():
if random.random() < 0.6:
@@ -95,3 +99,26 @@
OperationsNotCompleteError):
frappe.db.rollback()
+def make_sales_return_records():
+ for data in frappe.get_all('Delivery Note', fields=["name"], filters={"docstatus": 1}):
+ if random.random() < 0.2:
+ print "dn"
+ try:
+ dn = make_sales_return(data.name)
+ dn.insert()
+ dn.submit()
+ frappe.db.commit()
+ except Exception, e:
+ frappe.db.rollback()
+
+def make_purchase_return_records():
+ for data in frappe.get_all('Purchase Receipt', fields=["name"], filters={"docstatus": 1}):
+ if random.random() < 0.2:
+ print "purchase"
+ try:
+ pr = make_purchase_return(data.name)
+ pr.insert()
+ pr.submit()
+ frappe.db.commit()
+ except Exception, e:
+ frappe.db.rollback()
diff --git a/erpnext/docs/assets/img/accounts/asset-item.png b/erpnext/docs/assets/img/accounts/asset-item.png
new file mode 100644
index 0000000..4889214
--- /dev/null
+++ b/erpnext/docs/assets/img/accounts/asset-item.png
Binary files differ
diff --git a/erpnext/docs/assets/img/accounts/pos-customer.png b/erpnext/docs/assets/img/accounts/pos-customer.png
new file mode 100644
index 0000000..ffb058a
--- /dev/null
+++ b/erpnext/docs/assets/img/accounts/pos-customer.png
Binary files differ
diff --git a/erpnext/docs/assets/img/accounts/pos-item.png b/erpnext/docs/assets/img/accounts/pos-item.png
new file mode 100644
index 0000000..fb6c1f8
--- /dev/null
+++ b/erpnext/docs/assets/img/accounts/pos-item.png
Binary files differ
diff --git a/erpnext/docs/assets/img/accounts/pos-payment.png b/erpnext/docs/assets/img/accounts/pos-payment.png
new file mode 100644
index 0000000..0a0d37f
--- /dev/null
+++ b/erpnext/docs/assets/img/accounts/pos-payment.png
Binary files differ
diff --git a/erpnext/docs/assets/img/setup/print/cheque-1.png b/erpnext/docs/assets/img/setup/print/cheque-1.png
new file mode 100644
index 0000000..5134e93
--- /dev/null
+++ b/erpnext/docs/assets/img/setup/print/cheque-1.png
Binary files differ
diff --git a/erpnext/docs/assets/img/setup/print/cheque-2.png b/erpnext/docs/assets/img/setup/print/cheque-2.png
new file mode 100644
index 0000000..a11fa97
--- /dev/null
+++ b/erpnext/docs/assets/img/setup/print/cheque-2.png
Binary files differ
diff --git a/erpnext/docs/assets/img/setup/print/cheque-3.png b/erpnext/docs/assets/img/setup/print/cheque-3.png
new file mode 100644
index 0000000..4033706
--- /dev/null
+++ b/erpnext/docs/assets/img/setup/print/cheque-3.png
Binary files differ
diff --git a/erpnext/docs/assets/img/setup/print/cheque-4.png b/erpnext/docs/assets/img/setup/print/cheque-4.png
new file mode 100644
index 0000000..b623505
--- /dev/null
+++ b/erpnext/docs/assets/img/setup/print/cheque-4.png
Binary files differ
diff --git a/erpnext/docs/assets/img/setup/print/cheque-5.gif b/erpnext/docs/assets/img/setup/print/cheque-5.gif
new file mode 100644
index 0000000..f4ccda4
--- /dev/null
+++ b/erpnext/docs/assets/img/setup/print/cheque-5.gif
Binary files differ
diff --git a/erpnext/docs/assets/img/setup/print/sample-cheque.jpg b/erpnext/docs/assets/img/setup/print/sample-cheque.jpg
new file mode 100644
index 0000000..2bd3d7d
--- /dev/null
+++ b/erpnext/docs/assets/img/setup/print/sample-cheque.jpg
Binary files differ
diff --git a/erpnext/docs/assets/old_images/erpnext/pos-add-item.png b/erpnext/docs/assets/old_images/erpnext/pos-add-item.png
deleted file mode 100644
index 96e64d4..0000000
--- a/erpnext/docs/assets/old_images/erpnext/pos-add-item.png
+++ /dev/null
Binary files differ
diff --git a/erpnext/docs/assets/old_images/erpnext/pos-make-payment.png b/erpnext/docs/assets/old_images/erpnext/pos-make-payment.png
deleted file mode 100644
index c4ef00f..0000000
--- a/erpnext/docs/assets/old_images/erpnext/pos-make-payment.png
+++ /dev/null
Binary files differ
diff --git a/erpnext/docs/assets/old_images/erpnext/pos-remove-item.png b/erpnext/docs/assets/old_images/erpnext/pos-remove-item.png
deleted file mode 100644
index 46ffc2b..0000000
--- a/erpnext/docs/assets/old_images/erpnext/pos-remove-item.png
+++ /dev/null
Binary files differ
diff --git a/erpnext/docs/user/manual/en/accounts/managing-fixed-assets.md b/erpnext/docs/user/manual/en/accounts/managing-fixed-assets.md
index 5fc8a0b..f8dbe1d 100644
--- a/erpnext/docs/user/manual/en/accounts/managing-fixed-assets.md
+++ b/erpnext/docs/user/manual/en/accounts/managing-fixed-assets.md
@@ -2,30 +2,33 @@
## Asset Category
-To start first you should create an Asset Category, depending on the type of assets. For example, all your desktops and laptops can be part of an Asset Category named "Computers". Here, you can set default depreciation method, periodicity and depreciation related accounts, which will be applicable to all the assets under the category.
+Based on the type of assets, create Asset Category. For example, all your desktops and laptops can be part of an Asset Category named "Computers". Here you can set default depreciation method, periodicity and depreciation related accounts, which will be applicable to all the assets under the category.
<img class="screenshot" alt="Asset Category" src="{{docs_base_url}}/assets/img/accounts/asset-category.png">
-> **Note:** You can also set default depreciation related Accounts and Cost Centers in Company.
-
+> **Note:** You can also set default depreciation related Accounts and Cost Centers in Company master.
## Asset
-Next step will be creating the fixed asset record. Asset record is the heart of fixed asset management, all the activities like purchasing, depreciation, scrapping or sales are managed against it.
+Asset master is the heart of fixed asset management feature. All the transactions related to Asset like purchasing, sales, depreciation, scrapping will be managed from the Asset master.
<img class="screenshot" alt="Asset" src="{{docs_base_url}}/assets/img/accounts/asset.png">
Explanation of the fields:
-1. Asset Category: The category of assets it belongs to.
-2. Is Existing Asset: Check if the asset is being carried forward from the previous Fiscal Year. The existing assets which are partially / fully depreciated can also be created/maintained for the future reference.
-3. Status: The options are - Draft, Submitted, Partially Depreciated, Fully Depreciated, Sold and Scrapped.
-4. Warehouse: Set the location of the asset.
-5. Gross Purchase Amount: The purchase cost of the asset
-6. Expected Value After Useful Life: Useful Life is the time period over in which the company expects that the asset will be productive. After that period, either the asset is scrapped or sold. In case it is sold, mention the estimated value here. This value is also known as Salvage Value, Scrap Value or Residual Value.
-7. Opening Accumulated Depreciation: The accumulated depreciation amount which has already been booked for an existing asset.
-8. Current Value (After Depreciation): In case you are creating record of an existing asset which has already been partially/fully depreciated, mention the currect value of the asset. In case of new asset, mention the purchase amount or leave it blank.
-9. Depreciation Method: There are two options: Straight Line and Double Declining Balance.
+1. Item Code: An Item for the Asset must be a non-stock item, with "Is Asset" field checked.
+
+ <img class="screenshot" alt="Asset Item" src="{{docs_base_url}}/assets/img/accounts/asset-item.png">
+
+2. Asset Category: The category of assets it belongs to.
+3. Is Existing Asset: Check if the asset is being carried forward from the previous Fiscal Year. The existing assets which are partially / fully depreciated can also be created/maintained for the future reference.
+4. Status: The options are - Draft, Submitted, Partially Depreciated, Fully Depreciated, Sold and Scrapped.
+5. Warehouse: Set the location of the asset.
+6. Gross Purchase Amount: The purchase cost of the asset.
+7. Expected Value After Useful Life: Useful Life is the time period over in which the company expects that the asset will be productive. After that period, either the asset is scrapped or sold. In case it is sold, mention the estimated value here. This value is also known as Salvage Value, Scrap Value or Residual Value.
+8. Opening Accumulated Depreciation: The accumulated depreciation amount which has already been booked for an existing asset.
+9. Current Value (After Depreciation): In case you are creating record of an existing asset which has already been partially/fully depreciated, mention the current value of the asset. In case of new asset, mention the purchase amount or leave it blank.
+10. Depreciation Method: There are two options: Straight Line and Double Declining Balance.
- Straight Line: This method spreads the cost of the fixed asset evenly over its useful life.
- Double Declining Method: An accelerated method of depreciation, it results in higher depreciation expense in the earlier years of ownership.
10. Total Number of Depreciations: The total number of depreciations during the useful life. In case of existing assets which are partially depreciated, mention the number of pending depreciations.
@@ -52,16 +55,16 @@
## Purchase an Asset
-For purchasing a new asset, create and submit the asset record with all the depreciation settings. Then create a Purchase Invoice via "Make Purchase Invoice" button. On clicking the button, system will load a new Purchase Invoice form with pre-loaded items table. It will also set proper fixed asset account (defined in teh Asset Category) in the Expense Account field. You need to select Supplier and other necessary details and submit the Purchase Invoice.
+For purchasing a new asset, create and submit the asset record with all the depreciation settings. Then create a Purchase Invoice via "Make Purchase Invoice" button. On clicking the button, system will load a new Purchase Invoice form with pre-loaded items table. It will also set proper fixed asset account (defined in the Asset Category) in the Expense Account field. You need to select Supplier and other necessary details and submit the Purchase Invoice.
<img class="screenshot" alt="Asset" src="{{docs_base_url}}/assets/img/accounts/asset-purchase-invoice.png">
-On submission of the invoice, the "Fixed Asset Account" will be debited and payable account will be credited. It also updates purchase date, supplier and Purchase Invoice no in the Asset record.
+On submission of the invoice, the "Fixed Asset Account" will be debited and payable account will be credited. It also updates purchase date, supplier and Purchase Invoice no. in the Asset master.
## Sale an Asset
-To sale an asset, open the asset record and create a Sales Invoice using "Sale Asset" button. On submission of the Sales Invoice, following entries will take place:
+To sale an asset, open the asset record and create a Sales Invoice by clicking on "Sale Asset". On submission of the Sales Invoice, following entries will take place:
- "Receivable Account" (Debtors) will be debited by the sales amount.
- "Fixed Asset Account" will be credited by the purchase amount of asset.
diff --git a/erpnext/docs/user/manual/en/accounts/point-of-sale-pos-invoice.md b/erpnext/docs/user/manual/en/accounts/point-of-sale-pos-invoice.md
index 8f646f7..b0b6bcc 100644
--- a/erpnext/docs/user/manual/en/accounts/point-of-sale-pos-invoice.md
+++ b/erpnext/docs/user/manual/en/accounts/point-of-sale-pos-invoice.md
@@ -1,30 +1,22 @@
# Point of Sale Invoice
-Point of Sale (POS) is the place where a retail transaction is completed. It
-is the point at which a customer makes a payment to the merchant in exchange
-for goods or services. For retail operations, the delivery of goods, accrual
-of sale and payment all happens in one event, that is usually called the
-“Point of Sale”.
+For retail operations, the delivery of goods, accrual of sale and payment all happens in one event, that is usually called the “Point of Sale” (POS).
-You can make a Sales Invoice of type POS by checking on “Is POS”. When you
-check this, you will notice that some fields get hidden and some new ones
-emerge.
+<iframe width="660" height="371" src="https://www.youtube.com/embed/4WkelWkbP_c" frameborder="0" allowfullscreen></iframe>
-> Tip: In retail, you may not create a separate Customer record for each
-customer. You can create a general Customer called “Walk-in Customer” and make
-all your transactions against this Customer record.
+###Offline POS
-#### Setting Up POS
+POS transactions are generally quick, hence should have as less dependency as possible. In ERPNext, you can create POS Invoices even when not connected to the internet.
+
+POS Invoices created in the offline mode will be saved locally in the browser. If internet connection is lost which creating POS Invoice, you will still be able can proceed forward. Once internet connection is available again, offline invoices will be synced, and pushed onto your ERPNext account. To learn more on how POS Invoices can be created when offline, [check here.](https://frappe.io/blog/blog/erpnext-features/offline-pos-in-erpnext-7)
+
+#### POS Profile
In ERPNext all Sales and Purchase transactions, like Sales Invoice, Quotation, Sales Order, Purchase Order etc. can be edited via the POS. There two steps to Setup POS:
1. Enable POS View via (Setup > Customize > Feature Setup)
2. Create a [POS Setting]({{docs_base_url}}/user/manual/en/setting-up/pos-setting.html) record
-#### Switch to POS View
-
-Open any sales / purchase transaction. Click on the Computer <i class="icon-desktop"></i> Icon.
-
#### Different sections of the POS
* Update Stock: If this is checked, Stock Ledger Entries will be made when you “Submit” this Sales Invoice thereby eliminating the need for a separate Delivery Note.
@@ -32,17 +24,22 @@
* Update Payment Details like your Bank / Cash Account, Paid amount etc.
* If you are writing off certain amount. For example when you receive extra cash as a result of not having exact denomination of change, check on ‘Write off Outstanding Amount’ and set the Account.
+
+### Customer
+
+You can select one of the existing Customer from the Customer master. If Customer doesn't exist in the Customer master, enter Customer Name in the POS Invoice view itself. On creation of POS Invoice, Customer will be auto-created in the Customer master.
+
+<img class="screenshot" alt="POS Customer" src="{{docs_base_url}}/assets/img/accounts/pos-customer.png">
+
### Adding an Item
-At the billing counter, the retailer needs to select Items which the consumer
-buys. In the POS interface you can select an Item by two methods. One, is by
-clicking on the Item image and the other, is through the Barcode / Serial No.
+At the billing counter, the retailer needs to select Items which the consumer buys. In the POS interface you can select an Item by two methods. One, is by clicking on the Item image and the other, is through the Barcode / Serial No.
**Select Item** \- To select a product click on the Item image and add it into the cart. A cart is an area that prepares a customer for checkout by allowing to edit product information, adjust taxes and add discounts.
**Barcode / Serial No** \- A Barcode / Serial No is an optical machine-readable representation of data relating to the object to which it is attached. Enter Barcode / Serial No in the box as shown in the image below and pause for a second, the item will be automatically added to the cart.
-
+<img class="screenshot" alt="POS Item" src="{{docs_base_url}}/assets/img/accounts/pos-item.png">
> Tip: To change the quantity of an Item, enter your desired quantity in the
quantity box. These are mostly used if the same Item is purchased in bulk.
@@ -52,18 +49,11 @@
### Removing an Item
-There are two ways to remove an Item.
+Set Qty as zero to remove Item from the POS invoice. There are two ways to remove an Item.
- * Select an Item by clicking on the row of that Item from Item cart. Then click on “Del” button. OR
+ * If Item's Qty is 1, click on a minus sign to make it zero.
- * Enter 0(zero) quantity of any item to delete that item.
-
-To remove multiple Items together, select multiple rows & click on “Del”
-button.
-
-> Delete button appears only when Items are selected.
-
-
+ * Manually enter 0(zero) quantity.
### Make Payment
@@ -73,8 +63,8 @@
1. Click on “Make Payment” to get the Payment window.
2. Select your “Mode of Payment”.
3. Click on “Pay” button to Save the document.
-
-
+
+<img class="screenshot" alt="POS Payment" src="{{docs_base_url}}/assets/img/accounts/pos-payment.png">
Submit the document to finalise the record. After the document is submitted,
you can either print or email it directly to the customer.
diff --git a/erpnext/docs/user/manual/en/setting-up/print/cheque-print-template.md b/erpnext/docs/user/manual/en/setting-up/print/cheque-print-template.md
new file mode 100644
index 0000000..44dd412
--- /dev/null
+++ b/erpnext/docs/user/manual/en/setting-up/print/cheque-print-template.md
@@ -0,0 +1,45 @@
+#Cheque Print Template
+
+Business involves making payment to various parties like suppliers and employees. Payment can be made in various modes like cash, NEFT or cheque. If you are making a payment via cheque, you can also create a Print Format for printing Cheque from ERPNext based on the Payment Entry.
+
+<img class="screenshot" alt="Sample Cheque" src="{{docs_base_url}}/assets/img/setup/print/sample-cheque.jpg">
+
+Using the Cheque Print Template you can generate a new Print Format based. It will be created based the cheque format provided by your bank.
+
+####Create New
+
+To create a new Print Format based on the specific cheque’s format, go to:
+
+`Account > Tools > Cheque Printing Template > New`
+
+In the Cheque Print Template, for each value (say Payee, Date), exact co-ordinates are provided based on where that value should be printed on a cheque. Co-ordinates are provided in centi-meter.
+
+<img class="screenshot" alt="Sample Cheque" src="{{docs_base_url}}/assets/img/setup/print/cheque-1.png">
+
+####New Format via Scanning
+
+To speed up creation of a new cheque printing format, you can upload scanned image of the cheque. Considering the scanned image for the cheque, system automatically updates co-ordinates for each value like party name, amount, date, amount in words etc.
+
+<img class="screenshot" alt="Sample Cheque" src="{{docs_base_url}}/assets/img/setup/print/cheque-2.png">
+
+####New format by manual entry
+You can manually provide the co-ordinate for each value based on where you want to to be printed on the cheque.
+
+####Preview
+Based on co-ordinates provided for all the values, a preview be shown as to how the values will be printed on the cheque.
+
+<img class="screenshot" alt="Sample Cheque" src="{{docs_base_url}}/assets/img/setup/print/cheque-3.png">
+
+####New Print Format
+
+If the preview looks promising, click on the button to create a new Print Format for printing cheque. Based on the values provided in the Cheque Print Template, the system will auto-generate an HTML script for the cheque’s Print Format.
+
+<img class="screenshot" alt="Sample Cheque" src="{{docs_base_url}}/assets/img/setup/print/cheque-4.png">
+
+####Printing Cheque
+
+New print format generated for the cheque will be visible in the Payment Entry form. After creating the payment entry, you will be able to print transaction details on the cheque.
+
+<img class="screenshot" alt="Sample Cheque" src="{{docs_base_url}}/assets/img/setup/print/cheque-5.gif">
+
+
diff --git a/erpnext/docs/user/manual/en/setting-up/print/index.txt b/erpnext/docs/user/manual/en/setting-up/print/index.txt
index 0ddb217..59aedee 100644
--- a/erpnext/docs/user/manual/en/setting-up/print/index.txt
+++ b/erpnext/docs/user/manual/en/setting-up/print/index.txt
@@ -4,3 +4,4 @@
letter-head
address-template
terms-and-conditions
+cheque-print-template
\ No newline at end of file
diff --git a/erpnext/hr/doctype/deduction_type/README.md b/erpnext/hr/doctype/deduction_type/README.md
deleted file mode 100644
index 2a22774..0000000
--- a/erpnext/hr/doctype/deduction_type/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-Type of salary deduction.
-
-e.g. Tax paid on behalf of the employee that is deducted from the salary.
\ No newline at end of file
diff --git a/erpnext/hr/doctype/deduction_type/__init__.py b/erpnext/hr/doctype/deduction_type/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/erpnext/hr/doctype/deduction_type/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/erpnext/hr/doctype/deduction_type/deduction_type.js b/erpnext/hr/doctype/deduction_type/deduction_type.js
deleted file mode 100644
index b1d4ac6..0000000
--- a/erpnext/hr/doctype/deduction_type/deduction_type.js
+++ /dev/null
@@ -1,8 +0,0 @@
-// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
-// For license information, please see license.txt
-
-frappe.ui.form.on('Deduction Type', {
- refresh: function(frm) {
-
- }
-});
diff --git a/erpnext/hr/doctype/deduction_type/deduction_type.json b/erpnext/hr/doctype/deduction_type/deduction_type.json
deleted file mode 100644
index 5844570..0000000
--- a/erpnext/hr/doctype/deduction_type/deduction_type.json
+++ /dev/null
@@ -1,110 +0,0 @@
-{
- "allow_copy": 0,
- "allow_import": 1,
- "allow_rename": 1,
- "autoname": "field:deduction_name",
- "beta": 0,
- "creation": "2013-01-22 16:50:30",
- "custom": 0,
- "docstatus": 0,
- "doctype": "DocType",
- "document_type": "Setup",
- "editable_grid": 0,
- "fields": [
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "deduction_name",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 1,
- "label": "Name",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "deduction_name",
- "oldfieldtype": "Data",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "description",
- "fieldtype": "Small Text",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 1,
- "label": "Description",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "description",
- "oldfieldtype": "Small Text",
- "permlevel": 0,
- "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,
- "width": "300px"
- }
- ],
- "hide_heading": 0,
- "hide_toolbar": 0,
- "icon": "icon-flag",
- "idx": 1,
- "image_view": 0,
- "in_create": 0,
- "in_dialog": 0,
- "is_submittable": 0,
- "issingle": 0,
- "istable": 0,
- "max_attachments": 0,
- "modified": "2016-07-25 05:24:26.194533",
- "modified_by": "Administrator",
- "module": "HR",
- "name": "Deduction Type",
- "owner": "Administrator",
- "permissions": [
- {
- "amend": 0,
- "apply_user_permissions": 0,
- "cancel": 0,
- "create": 1,
- "delete": 1,
- "email": 1,
- "export": 0,
- "if_owner": 0,
- "import": 0,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
- "role": "HR User",
- "set_user_permissions": 0,
- "share": 1,
- "submit": 0,
- "write": 1
- }
- ],
- "quick_entry": 1,
- "read_only": 0,
- "read_only_onload": 0,
- "track_seen": 0
-}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/deduction_type/deduction_type.py b/erpnext/hr/doctype/deduction_type/deduction_type.py
deleted file mode 100644
index d2c8c9f..0000000
--- a/erpnext/hr/doctype/deduction_type/deduction_type.py
+++ /dev/null
@@ -1,10 +0,0 @@
-# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
-# License: GNU General Public License v3. See license.txt
-
-from __future__ import unicode_literals
-import frappe
-
-from frappe.model.document import Document
-
-class DeductionType(Document):
- pass
\ No newline at end of file
diff --git a/erpnext/hr/doctype/deduction_type/test_deduction_type.py b/erpnext/hr/doctype/deduction_type/test_deduction_type.py
deleted file mode 100644
index f1d9812..0000000
--- a/erpnext/hr/doctype/deduction_type/test_deduction_type.py
+++ /dev/null
@@ -1,7 +0,0 @@
-# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
-# License: GNU General Public License v3. See license.txt
-from __future__ import unicode_literals
-
-
-import frappe
-test_records = frappe.get_test_records('Deduction Type')
\ No newline at end of file
diff --git a/erpnext/hr/doctype/deduction_type/test_records.json b/erpnext/hr/doctype/deduction_type/test_records.json
deleted file mode 100644
index 25dab0f..0000000
--- a/erpnext/hr/doctype/deduction_type/test_records.json
+++ /dev/null
@@ -1,10 +0,0 @@
-[
- {
- "doctype": "Deduction Type",
- "deduction_name": "_Test Professional Tax"
- },
- {
- "doctype": "Deduction Type",
- "deduction_name": "_Test TDS"
- }
-]
\ No newline at end of file
diff --git a/erpnext/hr/doctype/department/department.json b/erpnext/hr/doctype/department/department.json
index 962b6f7..cd65d17 100644
--- a/erpnext/hr/doctype/department/department.json
+++ b/erpnext/hr/doctype/department/department.json
@@ -75,7 +75,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-07-25 05:24:26.129542",
+ "modified": "2016-08-01 12:44:43.338689",
"modified_by": "Administrator",
"module": "HR",
"name": "Department",
@@ -100,10 +100,31 @@
"share": 1,
"submit": 0,
"write": 1
+ },
+ {
+ "amend": 0,
+ "apply_user_permissions": 0,
+ "cancel": 0,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "export": 1,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Academics User",
+ "set_user_permissions": 0,
+ "share": 1,
+ "submit": 0,
+ "write": 1
}
],
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
+ "sort_order": "ASC",
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/earning_type/README.md b/erpnext/hr/doctype/earning_type/README.md
deleted file mode 100644
index 50aa1b3..0000000
--- a/erpnext/hr/doctype/earning_type/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-Type of earning that is a part of the salary.
-
-e.g. basic salary, bonus etc.
\ No newline at end of file
diff --git a/erpnext/hr/doctype/earning_type/__init__.py b/erpnext/hr/doctype/earning_type/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/erpnext/hr/doctype/earning_type/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/erpnext/hr/doctype/earning_type/earning_type.json b/erpnext/hr/doctype/earning_type/earning_type.json
deleted file mode 100644
index f380b46..0000000
--- a/erpnext/hr/doctype/earning_type/earning_type.json
+++ /dev/null
@@ -1,110 +0,0 @@
-{
- "allow_copy": 0,
- "allow_import": 1,
- "allow_rename": 1,
- "autoname": "field:earning_name",
- "beta": 0,
- "creation": "2013-01-24 11:03:32",
- "custom": 0,
- "docstatus": 0,
- "doctype": "DocType",
- "document_type": "Setup",
- "editable_grid": 0,
- "fields": [
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "earning_name",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 1,
- "label": "Name",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "earning_name",
- "oldfieldtype": "Data",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "description",
- "fieldtype": "Small Text",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 1,
- "label": "Description",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "description",
- "oldfieldtype": "Small Text",
- "permlevel": 0,
- "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,
- "width": "300px"
- }
- ],
- "hide_heading": 0,
- "hide_toolbar": 0,
- "icon": "icon-flag",
- "idx": 1,
- "image_view": 0,
- "in_create": 0,
- "in_dialog": 0,
- "is_submittable": 0,
- "issingle": 0,
- "istable": 0,
- "max_attachments": 0,
- "modified": "2016-07-25 05:24:26.055240",
- "modified_by": "Administrator",
- "module": "HR",
- "name": "Earning Type",
- "owner": "Administrator",
- "permissions": [
- {
- "amend": 0,
- "apply_user_permissions": 0,
- "cancel": 0,
- "create": 1,
- "delete": 1,
- "email": 1,
- "export": 0,
- "if_owner": 0,
- "import": 0,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
- "role": "HR User",
- "set_user_permissions": 0,
- "share": 1,
- "submit": 0,
- "write": 1
- }
- ],
- "quick_entry": 1,
- "read_only": 0,
- "read_only_onload": 0,
- "track_seen": 0
-}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/earning_type/earning_type.py b/erpnext/hr/doctype/earning_type/earning_type.py
deleted file mode 100644
index d774989..0000000
--- a/erpnext/hr/doctype/earning_type/earning_type.py
+++ /dev/null
@@ -1,10 +0,0 @@
-# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
-# License: GNU General Public License v3. See license.txt
-
-from __future__ import unicode_literals
-import frappe
-
-from frappe.model.document import Document
-
-class EarningType(Document):
- pass
\ No newline at end of file
diff --git a/erpnext/hr/doctype/earning_type/test_earning_type.py b/erpnext/hr/doctype/earning_type/test_earning_type.py
deleted file mode 100644
index e68a274..0000000
--- a/erpnext/hr/doctype/earning_type/test_earning_type.py
+++ /dev/null
@@ -1,7 +0,0 @@
-# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
-# License: GNU General Public License v3. See license.txt
-from __future__ import unicode_literals
-
-
-import frappe
-test_records = frappe.get_test_records('Earning Type')
\ No newline at end of file
diff --git a/erpnext/hr/doctype/earning_type/test_records.json b/erpnext/hr/doctype/earning_type/test_records.json
deleted file mode 100644
index 659ab52..0000000
--- a/erpnext/hr/doctype/earning_type/test_records.json
+++ /dev/null
@@ -1,12 +0,0 @@
-[
- {
- "doctype": "Earning Type",
- "earning_name": "_Test Basic Salary",
- "taxable": "Yes"
- },
- {
- "doctype": "Earning Type",
- "earning_name": "_Test Allowance",
- "taxable": "Yes"
- }
-]
\ No newline at end of file
diff --git a/erpnext/hr/doctype/interest/__init__.py b/erpnext/hr/doctype/interest/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/erpnext/hr/doctype/interest/__init__.py
diff --git a/erpnext/hr/doctype/earning_type/earning_type.js b/erpnext/hr/doctype/interest/interest.js
similarity index 80%
rename from erpnext/hr/doctype/earning_type/earning_type.js
rename to erpnext/hr/doctype/interest/interest.js
index 1dd6412..70e1b6a 100644
--- a/erpnext/hr/doctype/earning_type/earning_type.js
+++ b/erpnext/hr/doctype/interest/interest.js
@@ -1,7 +1,7 @@
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
-frappe.ui.form.on('Earning Type', {
+frappe.ui.form.on('Interest', {
refresh: function(frm) {
}
diff --git a/erpnext/hr/doctype/interest/interest.json b/erpnext/hr/doctype/interest/interest.json
new file mode 100644
index 0000000..955c40f
--- /dev/null
+++ b/erpnext/hr/doctype/interest/interest.json
@@ -0,0 +1,144 @@
+{
+ "allow_copy": 0,
+ "allow_import": 1,
+ "allow_rename": 0,
+ "autoname": "field:interest",
+ "beta": 0,
+ "creation": "2016-07-25 07:12:33.600702",
+ "custom": 0,
+ "docstatus": 0,
+ "doctype": "DocType",
+ "document_type": "Setup",
+ "editable_grid": 1,
+ "fields": [
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "interest",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Interest",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ }
+ ],
+ "hide_heading": 0,
+ "hide_toolbar": 0,
+ "idx": 0,
+ "image_view": 0,
+ "in_create": 0,
+ "in_dialog": 0,
+ "is_submittable": 0,
+ "issingle": 0,
+ "istable": 0,
+ "max_attachments": 0,
+ "modified": "2016-08-01 05:47:29.479141",
+ "modified_by": "Administrator",
+ "module": "HR",
+ "name": "Interest",
+ "name_case": "",
+ "owner": "Administrator",
+ "permissions": [
+ {
+ "amend": 0,
+ "apply_user_permissions": 0,
+ "cancel": 0,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "export": 1,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Academics User",
+ "set_user_permissions": 0,
+ "share": 1,
+ "submit": 0,
+ "write": 1
+ },
+ {
+ "amend": 0,
+ "apply_user_permissions": 0,
+ "cancel": 0,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "export": 1,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "HR Manager",
+ "set_user_permissions": 0,
+ "share": 1,
+ "submit": 0,
+ "write": 1
+ },
+ {
+ "amend": 0,
+ "apply_user_permissions": 0,
+ "cancel": 0,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "export": 1,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "HR User",
+ "set_user_permissions": 0,
+ "share": 1,
+ "submit": 0,
+ "write": 1
+ },
+ {
+ "amend": 0,
+ "apply_user_permissions": 0,
+ "cancel": 0,
+ "create": 0,
+ "delete": 0,
+ "email": 1,
+ "export": 1,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Employee",
+ "set_user_permissions": 0,
+ "share": 1,
+ "submit": 0,
+ "write": 0
+ }
+ ],
+ "quick_entry": 1,
+ "read_only": 0,
+ "read_only_onload": 0,
+ "sort_field": "modified",
+ "sort_order": "DESC",
+ "track_seen": 0
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/interest/interest.py b/erpnext/hr/doctype/interest/interest.py
new file mode 100644
index 0000000..2a9c19c
--- /dev/null
+++ b/erpnext/hr/doctype/interest/interest.py
@@ -0,0 +1,10 @@
+# -*- coding: utf-8 -*-
+# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
+# For license information, please see license.txt
+
+from __future__ import unicode_literals
+import frappe
+from frappe.model.document import Document
+
+class Interest(Document):
+ pass
diff --git a/erpnext/hr/doctype/interest/test_interest.py b/erpnext/hr/doctype/interest/test_interest.py
new file mode 100644
index 0000000..a7fe83b
--- /dev/null
+++ b/erpnext/hr/doctype/interest/test_interest.py
@@ -0,0 +1,12 @@
+# -*- coding: utf-8 -*-
+# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
+# See license.txt
+from __future__ import unicode_literals
+
+import frappe
+import unittest
+
+# test_records = frappe.get_test_records('Interest')
+
+class TestInterest(unittest.TestCase):
+ pass
diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.py b/erpnext/hr/doctype/salary_slip/salary_slip.py
index f83d144..3bc7f0e 100644
--- a/erpnext/hr/doctype/salary_slip/salary_slip.py
+++ b/erpnext/hr/doctype/salary_slip/salary_slip.py
@@ -61,9 +61,8 @@
self.pull_sal_struct(ss_doc)
def set_time_sheet(self):
- if self.salary_slip_based_on_timesheet and not self.get('timesheets'):
+ if self.salary_slip_based_on_timesheet:
self.set("timesheets", [])
-
timesheets = frappe.db.sql(""" select * from `tabTimesheet` where employee = %(employee)s and start_date BETWEEN %(start_date)s AND %(end_date)s and (status = 'Submitted' or
status = 'Billed')""", {'employee': self.employee, 'start_date': self.start_date, 'end_date': self.end_date}, as_dict=1)
diff --git a/erpnext/hr/doctype/salary_slip_deduction/README.md b/erpnext/hr/doctype/salary_slip_deduction/README.md
deleted file mode 100644
index d0f2219..0000000
--- a/erpnext/hr/doctype/salary_slip_deduction/README.md
+++ /dev/null
@@ -1,5 +0,0 @@
-Deduction detail in parent Salary Slip.
-
-e.g.
-
-- Tax paid on employee's behalf
\ No newline at end of file
diff --git a/erpnext/hr/doctype/salary_slip_deduction/__init__.py b/erpnext/hr/doctype/salary_slip_deduction/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/erpnext/hr/doctype/salary_slip_deduction/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/erpnext/hr/doctype/salary_slip_deduction/salary_slip_deduction.json b/erpnext/hr/doctype/salary_slip_deduction/salary_slip_deduction.json
deleted file mode 100644
index 89a1f21..0000000
--- a/erpnext/hr/doctype/salary_slip_deduction/salary_slip_deduction.json
+++ /dev/null
@@ -1,140 +0,0 @@
-{
- "allow_copy": 0,
- "allow_import": 0,
- "allow_rename": 0,
- "beta": 0,
- "creation": "2013-02-22 01:27:48",
- "custom": 0,
- "docstatus": 0,
- "doctype": "DocType",
- "document_type": "Setup",
- "editable_grid": 1,
- "fields": [
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "deduction_type",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 1,
- "label": "Type",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "d_type",
- "oldfieldtype": "Data",
- "options": "Deduction Type",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "print_width": "200px",
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0,
- "width": "200px"
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "d_amount",
- "fieldtype": "Currency",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Default Amount",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "d_amount",
- "oldfieldtype": "Currency",
- "options": "Company:company:default_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,
- "collapsible": 0,
- "fieldname": "d_depends_on_lwp",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Depends on Leave Without Pay",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "deduction_amount",
- "fieldtype": "Currency",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 1,
- "label": "Amount",
- "length": 0,
- "no_copy": 0,
- "options": "Company:company:default_currency",
- "permlevel": 0,
- "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": 0,
- "hide_toolbar": 0,
- "idx": 1,
- "image_view": 0,
- "in_create": 0,
- "in_dialog": 0,
- "is_submittable": 0,
- "issingle": 0,
- "istable": 1,
- "max_attachments": 0,
- "modified": "2016-07-11 03:28:07.000106",
- "modified_by": "Administrator",
- "module": "HR",
- "name": "Salary Slip Deduction",
- "owner": "Administrator",
- "permissions": [],
- "quick_entry": 1,
- "read_only": 0,
- "read_only_onload": 0,
- "sort_order": "ASC",
- "track_seen": 0
-}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/salary_slip_deduction/salary_slip_deduction.py b/erpnext/hr/doctype/salary_slip_deduction/salary_slip_deduction.py
deleted file mode 100644
index f42c34d..0000000
--- a/erpnext/hr/doctype/salary_slip_deduction/salary_slip_deduction.py
+++ /dev/null
@@ -1,10 +0,0 @@
-# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
-# License: GNU General Public License v3. See license.txt
-
-from __future__ import unicode_literals
-import frappe
-
-from frappe.model.document import Document
-
-class SalarySlipDeduction(Document):
- pass
\ No newline at end of file
diff --git a/erpnext/hr/doctype/salary_slip_earning/README.md b/erpnext/hr/doctype/salary_slip_earning/README.md
deleted file mode 100644
index 9da0167..0000000
--- a/erpnext/hr/doctype/salary_slip_earning/README.md
+++ /dev/null
@@ -1,6 +0,0 @@
-Earning detail in parent Salary Slip.
-
-e.g.
-
-- Basic Salary
-- Performance Bonus
diff --git a/erpnext/hr/doctype/salary_slip_earning/__init__.py b/erpnext/hr/doctype/salary_slip_earning/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/erpnext/hr/doctype/salary_slip_earning/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/erpnext/hr/doctype/salary_slip_earning/salary_slip_earning.json b/erpnext/hr/doctype/salary_slip_earning/salary_slip_earning.json
deleted file mode 100644
index 076d009..0000000
--- a/erpnext/hr/doctype/salary_slip_earning/salary_slip_earning.json
+++ /dev/null
@@ -1,140 +0,0 @@
-{
- "allow_copy": 0,
- "allow_import": 0,
- "allow_rename": 0,
- "beta": 0,
- "creation": "2013-02-22 01:27:48",
- "custom": 0,
- "docstatus": 0,
- "doctype": "DocType",
- "document_type": "Setup",
- "editable_grid": 1,
- "fields": [
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "earning_type",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 1,
- "label": "Type",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "e_type",
- "oldfieldtype": "Data",
- "options": "Earning Type",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "print_width": "",
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0,
- "width": "80px"
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "e_amount",
- "fieldtype": "Currency",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Default Amount",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "e_amount",
- "oldfieldtype": "Currency",
- "options": "Company:company:default_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,
- "collapsible": 0,
- "fieldname": "e_depends_on_lwp",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Depends on Leave Without Pay",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "earning_amount",
- "fieldtype": "Currency",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 1,
- "label": "Amount",
- "length": 0,
- "no_copy": 0,
- "options": "Company:company:default_currency",
- "permlevel": 0,
- "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": 0,
- "hide_toolbar": 0,
- "idx": 1,
- "image_view": 0,
- "in_create": 0,
- "in_dialog": 0,
- "is_submittable": 0,
- "issingle": 0,
- "istable": 1,
- "max_attachments": 0,
- "modified": "2016-07-11 03:28:07.074773",
- "modified_by": "Administrator",
- "module": "HR",
- "name": "Salary Slip Earning",
- "owner": "Administrator",
- "permissions": [],
- "quick_entry": 1,
- "read_only": 0,
- "read_only_onload": 0,
- "sort_order": "ASC",
- "track_seen": 0
-}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/salary_slip_earning/salary_slip_earning.py b/erpnext/hr/doctype/salary_slip_earning/salary_slip_earning.py
deleted file mode 100644
index 92e48c2..0000000
--- a/erpnext/hr/doctype/salary_slip_earning/salary_slip_earning.py
+++ /dev/null
@@ -1,10 +0,0 @@
-# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
-# License: GNU General Public License v3. See license.txt
-
-from __future__ import unicode_literals
-import frappe
-
-from frappe.model.document import Document
-
-class SalarySlipEarning(Document):
- pass
\ No newline at end of file
diff --git a/erpnext/hr/doctype/salary_structure_deduction/README.md b/erpnext/hr/doctype/salary_structure_deduction/README.md
deleted file mode 100644
index 0853539..0000000
--- a/erpnext/hr/doctype/salary_structure_deduction/README.md
+++ /dev/null
@@ -1 +0,0 @@
-Deduction details in parent Salary Structure.
\ No newline at end of file
diff --git a/erpnext/hr/doctype/salary_structure_deduction/__init__.py b/erpnext/hr/doctype/salary_structure_deduction/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/erpnext/hr/doctype/salary_structure_deduction/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/erpnext/hr/doctype/salary_structure_deduction/salary_structure_deduction.json b/erpnext/hr/doctype/salary_structure_deduction/salary_structure_deduction.json
deleted file mode 100644
index c361163..0000000
--- a/erpnext/hr/doctype/salary_structure_deduction/salary_structure_deduction.json
+++ /dev/null
@@ -1,116 +0,0 @@
-{
- "allow_copy": 0,
- "allow_import": 0,
- "allow_rename": 0,
- "beta": 0,
- "creation": "2013-02-22 01:27:48",
- "custom": 0,
- "docstatus": 0,
- "doctype": "DocType",
- "document_type": "Setup",
- "editable_grid": 1,
- "fields": [
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "deduction_type",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 1,
- "label": "Type",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "d_type",
- "oldfieldtype": "Select",
- "options": "Deduction Type",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "print_width": "200px",
- "read_only": 0,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0,
- "width": "200px"
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "d_modified_amt",
- "fieldtype": "Currency",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 1,
- "label": "Amount",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "d_modified_amt",
- "oldfieldtype": "Currency",
- "options": "Company:company:default_currency",
- "permlevel": 0,
- "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": "depend_on_lwp",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Reduce Deduction for Leave Without Pay (LWP)",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "depend_on_lwp",
- "oldfieldtype": "Check",
- "permlevel": 0,
- "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": 0,
- "hide_toolbar": 0,
- "idx": 1,
- "image_view": 0,
- "in_create": 0,
- "in_dialog": 0,
- "is_submittable": 0,
- "issingle": 0,
- "istable": 1,
- "max_attachments": 0,
- "modified": "2016-07-11 03:28:07.217367",
- "modified_by": "Administrator",
- "module": "HR",
- "name": "Salary Structure Deduction",
- "owner": "Administrator",
- "permissions": [],
- "quick_entry": 1,
- "read_only": 0,
- "read_only_onload": 0,
- "track_seen": 0
-}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/salary_structure_deduction/salary_structure_deduction.py b/erpnext/hr/doctype/salary_structure_deduction/salary_structure_deduction.py
deleted file mode 100644
index 16a67ad..0000000
--- a/erpnext/hr/doctype/salary_structure_deduction/salary_structure_deduction.py
+++ /dev/null
@@ -1,10 +0,0 @@
-# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
-# License: GNU General Public License v3. See license.txt
-
-from __future__ import unicode_literals
-import frappe
-
-from frappe.model.document import Document
-
-class SalaryStructureDeduction(Document):
- pass
\ No newline at end of file
diff --git a/erpnext/hr/doctype/salary_structure_earning/README.md b/erpnext/hr/doctype/salary_structure_earning/README.md
deleted file mode 100644
index d495cc4..0000000
--- a/erpnext/hr/doctype/salary_structure_earning/README.md
+++ /dev/null
@@ -1 +0,0 @@
-Earning details in parent Salary Structure.
\ No newline at end of file
diff --git a/erpnext/hr/doctype/salary_structure_earning/__init__.py b/erpnext/hr/doctype/salary_structure_earning/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/erpnext/hr/doctype/salary_structure_earning/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/erpnext/hr/doctype/salary_structure_earning/salary_structure_earning.json b/erpnext/hr/doctype/salary_structure_earning/salary_structure_earning.json
deleted file mode 100644
index e7e4cf4..0000000
--- a/erpnext/hr/doctype/salary_structure_earning/salary_structure_earning.json
+++ /dev/null
@@ -1,116 +0,0 @@
-{
- "allow_copy": 0,
- "allow_import": 0,
- "allow_rename": 0,
- "beta": 0,
- "creation": "2013-02-22 01:27:48",
- "custom": 0,
- "docstatus": 0,
- "doctype": "DocType",
- "editable_grid": 1,
- "fields": [
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "earning_type",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 1,
- "label": "Type",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "e_type",
- "oldfieldtype": "Data",
- "options": "Earning Type",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "print_width": "200px",
- "read_only": 0,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0,
- "width": "200px"
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "modified_value",
- "fieldtype": "Currency",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 1,
- "label": "Amount",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "modified_value",
- "oldfieldtype": "Currency",
- "options": "Company:company:default_currency",
- "permlevel": 0,
- "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": "depend_on_lwp",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Reduce Earning for Leave Without Pay (LWP)",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "depend_on_lwp",
- "oldfieldtype": "Check",
- "permlevel": 0,
- "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": 0,
- "hide_toolbar": 0,
- "idx": 1,
- "image_view": 0,
- "in_create": 0,
- "in_dialog": 0,
- "is_submittable": 0,
- "issingle": 0,
- "istable": 1,
- "max_attachments": 0,
- "modified": "2016-07-11 03:28:07.283082",
- "modified_by": "Administrator",
- "module": "HR",
- "name": "Salary Structure Earning",
- "owner": "Administrator",
- "permissions": [],
- "quick_entry": 1,
- "read_only": 0,
- "read_only_onload": 0,
- "sort_order": "ASC",
- "track_seen": 0
-}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/salary_structure_earning/salary_structure_earning.py b/erpnext/hr/doctype/salary_structure_earning/salary_structure_earning.py
deleted file mode 100644
index d80575b..0000000
--- a/erpnext/hr/doctype/salary_structure_earning/salary_structure_earning.py
+++ /dev/null
@@ -1,10 +0,0 @@
-# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
-# License: GNU General Public License v3. See license.txt
-
-from __future__ import unicode_literals
-import frappe
-
-from frappe.model.document import Document
-
-class SalaryStructureEarning(Document):
- pass
\ No newline at end of file
diff --git a/erpnext/manufacturing/doctype/production_order/production_order.py b/erpnext/manufacturing/doctype/production_order/production_order.py
index 2b173bf..0f6dae6 100644
--- a/erpnext/manufacturing/doctype/production_order/production_order.py
+++ b/erpnext/manufacturing/doctype/production_order/production_order.py
@@ -540,7 +540,7 @@
po = frappe.get_doc('Production Order', source_name)
ts = po.make_time_logs(open_new=True)
- if not ts.get('time_logs'):
+ if not ts or not ts.get('time_logs'):
frappe.throw(_("Already completed"))
return ts
diff --git a/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py b/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py
index 4770781..5fbcf1e 100644
--- a/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py
+++ b/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py
@@ -451,10 +451,8 @@
"company": self.company,
"requested_by": frappe.session.user
})
- if item_wrapper.default_bom:
- material_request.update({"material_request_type": "Manufacture"})
- else:
- material_request.update({"material_request_type": "Purchase"})
+ material_request.update({"material_request_type": item_wrapper.default_material_request_type})
+
for sales_order, requested_qty in items_to_be_requested[item].items():
material_request.append("items", {
"doctype": "Material Request Item",
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index d7c156d..4e99afa 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -264,7 +264,6 @@
erpnext.patches.v6_20x.remove_fiscal_year_from_holiday_list
erpnext.patches.v6_24.map_customer_address_to_shipping_address_on_po
erpnext.patches.v6_27.fix_recurring_order_status
-erpnext.patches.v6_20x.remove_customer_supplier_roles
erpnext.patches.v6_20x.update_product_bundle_description
erpnext.patches.v7_0.update_party_status
erpnext.patches.v7_0.update_item_projected
@@ -300,7 +299,12 @@
execute:frappe.delete_doc_if_exists("DocType", "Payment Tool Detail")
erpnext.patches.v7_0.setup_account_table_for_expense_claim_type_if_exists
erpnext.patches.v7_0.migrate_schools_to_erpnext
+erpnext.patches.v6_20x.remove_customer_supplier_roles
erpnext.patches.v7_0.remove_administrator_role_in_doctypes
erpnext.patches.v7_0.rename_fee_amount_to_fee_component
erpnext.patches.v7_0.calculate_total_costing_amount
-erpnext.patches.v7_0.fix_nonwarehouse_ledger_gl_entries_for_transactions
\ No newline at end of file
+erpnext.patches.v7_0.fix_nonwarehouse_ledger_gl_entries_for_transactions
+erpnext.patches.v7_0.remove_old_earning_deduction_doctypes
+erpnext.patches.v7_0.make_guardian
+erpnext.patches.v7_0.update_refdoc_in_landed_cost_voucher
+erpnext.patches.v7_0.set_material_request_type_in_item
\ No newline at end of file
diff --git a/erpnext/patches/v6_20x/remove_customer_supplier_roles.py b/erpnext/patches/v6_20x/remove_customer_supplier_roles.py
index e5e3d3f..eb69845 100644
--- a/erpnext/patches/v6_20x/remove_customer_supplier_roles.py
+++ b/erpnext/patches/v6_20x/remove_customer_supplier_roles.py
@@ -2,6 +2,11 @@
import frappe
def execute():
+ frappe.reload_doc("buying", "doctype", "request_for_quotation_supplier")
+ frappe.reload_doc("buying", "doctype", "request_for_quotation_item")
+ frappe.reload_doc("buying", "doctype", "request_for_quotation")
+ frappe.reload_doc("projects", "doctype", "timesheet")
+
for role in ('Customer', 'Supplier'):
frappe.db.sql('''delete from `tabUserRole`
where role=%s and parent in ("Administrator", "Guest")''', role)
diff --git a/erpnext/patches/v7_0/make_guardian.py b/erpnext/patches/v7_0/make_guardian.py
new file mode 100644
index 0000000..f654b79
--- /dev/null
+++ b/erpnext/patches/v7_0/make_guardian.py
@@ -0,0 +1,25 @@
+from __future__ import unicode_literals
+import frappe
+
+def execute():
+ if frappe.db.exists("DocType", "Student") and "father_name" in frappe.db.get_table_columns("Student"):
+ frappe.reload_doc("schools", "doctype", "student")
+ frappe.reload_doc("schools", "doctype", "guardian")
+ frappe.reload_doc("schools", "doctype", "guardian_interest")
+ frappe.reload_doc("hr", "doctype", "interest")
+
+ students = frappe.get_all("Student", fields=["name", "father_name", "father_email_id",
+ "mother_name", "mother_email_id"])
+ for stud in students:
+ if stud.father_name:
+ make_guardian(stud.father_name, stud.name, stud.father_email_id)
+ if stud.mother_name:
+ make_guardian(stud.mother_name, stud.name, stud.mother_email_id)
+
+def make_guardian(name, student, email=None):
+ frappe.get_doc({
+ 'doctype': 'Guardian',
+ 'guardian_name': name,
+ 'email': email,
+ 'student': student
+ }).insert()
diff --git a/erpnext/patches/v7_0/remove_old_earning_deduction_doctypes.py b/erpnext/patches/v7_0/remove_old_earning_deduction_doctypes.py
new file mode 100644
index 0000000..05a2c49
--- /dev/null
+++ b/erpnext/patches/v7_0/remove_old_earning_deduction_doctypes.py
@@ -0,0 +1,16 @@
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
+# License: GNU General Public License v3. See license.txt
+
+from __future__ import unicode_literals
+import frappe
+
+def execute():
+ if frappe.db.exists("DocType", "Salary Component"):
+ for dt in ("Salary Structure Earning", "Salary Structure Deduction", "Salary Slip Earning",
+ "Salary Slip Deduction", "Earning Type", "Deduction Type"):
+ frappe.delete_doc("DocType", dt)
+
+
+ for d in frappe.db.sql("""select name from `tabCustom Field`
+ where dt in ('Salary Detail', 'Salary Component')"""):
+ frappe.get_doc("Custom Field", d[0]).save()
\ No newline at end of file
diff --git a/erpnext/patches/v7_0/set_material_request_type_in_item.py b/erpnext/patches/v7_0/set_material_request_type_in_item.py
new file mode 100644
index 0000000..5fb14ad
--- /dev/null
+++ b/erpnext/patches/v7_0/set_material_request_type_in_item.py
@@ -0,0 +1,16 @@
+from __future__ import unicode_literals
+import frappe
+
+def execute():
+ frappe.reload_doctype("Item")
+ if "default_bom" in frappe.db.get_table_columns("Item"):
+ frappe.db.sql("""update `tabItem`
+ set default_material_request_type = (
+ case
+ when (default_bom is not null and default_bom != '')
+ then 'Manufacture'
+ else 'Purchase'
+ end )""")
+
+ else:
+ frappe.db.sql("update tabItem set default_material_request_type='Purchase'")
\ No newline at end of file
diff --git a/erpnext/patches/v7_0/update_refdoc_in_landed_cost_voucher.py b/erpnext/patches/v7_0/update_refdoc_in_landed_cost_voucher.py
new file mode 100644
index 0000000..2d562bb
--- /dev/null
+++ b/erpnext/patches/v7_0/update_refdoc_in_landed_cost_voucher.py
@@ -0,0 +1,15 @@
+from __future__ import unicode_literals
+import frappe
+
+def execute():
+ if "purchase_receipt" not in frappe.db.get_table_columns("Landed Cost Purchase Receipt"):
+ return
+
+ frappe.reload_doctype("Landed Cost Purchase Receipt")
+
+ frappe.db.sql("""
+ update `tabLanded Cost Purchase Receipt`
+ set receipt_document_type = 'Purchase Receipt', receipt_document = purchase_receipt
+ where (receipt_document is null or receipt_document = '')
+ and (purchase_receipt is not null and purchase_receipt != '')
+ """)
\ No newline at end of file
diff --git a/erpnext/portal/doctype/homepage/homepage.js b/erpnext/portal/doctype/homepage/homepage.js
index df7f5ce..100074f 100644
--- a/erpnext/portal/doctype/homepage/homepage.js
+++ b/erpnext/portal/doctype/homepage/homepage.js
@@ -15,7 +15,7 @@
method: 'frappe.client.get_value',
args: {
'doctype': 'Item',
- 'filters': featured_product.item_code,
+ 'filters': {'name': featured_product.item_code},
'fieldname': [
'item_name',
'web_long_description',
diff --git a/erpnext/projects/doctype/timesheet/timesheet.js b/erpnext/projects/doctype/timesheet/timesheet.js
index f3dfefa..e2e6459 100644
--- a/erpnext/projects/doctype/timesheet/timesheet.js
+++ b/erpnext/projects/doctype/timesheet/timesheet.js
@@ -31,7 +31,6 @@
onload: function(frm){
if (frm.doc.__islocal && frm.doc.time_logs) {
- frm.set_value("employee", "")
calculate_time_and_amount(frm);
}
},
diff --git a/erpnext/projects/doctype/timesheet/timesheet.py b/erpnext/projects/doctype/timesheet/timesheet.py
index 895ace3..a1b757c 100644
--- a/erpnext/projects/doctype/timesheet/timesheet.py
+++ b/erpnext/projects/doctype/timesheet/timesheet.py
@@ -293,7 +293,7 @@
@frappe.whitelist()
def get_employee_list(doctype, txt, searchfield, start, page_len, filters):
- return frappe.db.sql("""select distinct(employee) as employee
+ return frappe.db.sql("""select distinct employee, employee_name
from `tabSalary Structure` where salary_slip_based_on_timesheet=1
- and employee like %(txt)s limit %(start)s, %(page_len)s""",
- {'txt': "%%%s%%"%(txt), 'start': start, 'page_len': page_len})
+ and employee like %(txt)s or employee_name like %(txt)s limit %(start)s, %(page_len)s""",
+ {'txt': "%%%s%%"% txt, 'start': start, 'page_len': page_len})
diff --git a/erpnext/public/js/controllers/taxes_and_totals.js b/erpnext/public/js/controllers/taxes_and_totals.js
index 8405e3d..576bc71 100644
--- a/erpnext/public/js/controllers/taxes_and_totals.js
+++ b/erpnext/public/js/controllers/taxes_and_totals.js
@@ -561,28 +561,24 @@
this.calculate_paid_amount()
}
+ this.calculate_change_amount()
var outstanding_amount = 0.0
var paid_amount = (this.frm.doc.party_account_currency == this.frm.doc.currency) ?
this.frm.doc.paid_amount : this.frm.doc.base_paid_amount;
- if (total_amount_to_pay > paid_amount){
- outstanding_amount = flt(total_amount_to_pay - flt(paid_amount),
- precision("outstanding_amount"));
- }
+ this.frm.doc.outstanding_amount = flt(total_amount_to_pay - flt(paid_amount) +
+ flt(this.frm.doc.change_amount), precision("outstanding_amount"));
} else if(this.frm.doc.doctype == "Purchase Invoice") {
- var outstanding_amount = flt(total_amount_to_pay, precision("outstanding_amount"));
- }
-
- this.frm.doc.outstanding_amount = outstanding_amount;
- this.calculate_change_amount()
+ this.frm.doc.outstanding_amount = flt(total_amount_to_pay, precision("outstanding_amount"));
+ }
},
set_default_payment: function(total_amount_to_pay, update_paid_amount){
var me = this;
payment_status = true;
- if(this.frm.doc.is_pos && (!this.frm.doc.paid_amount || update_paid_amount===undefined || update_paid_amount)){
+ if(this.frm.doc.is_pos && (update_paid_amount===undefined || update_paid_amount)){
$.each(this.frm.doc['payments'] || [], function(index, data){
if(data.type == "Cash" && payment_status) {
data.amount = total_amount_to_pay;
@@ -610,15 +606,13 @@
},
calculate_change_amount: function(){
- var change_amount = 0.0;
+ this.frm.doc.change_amount = 0.0;
if(this.frm.doc.paid_amount > this.frm.doc.grand_total){
- change_amount = flt(this.frm.doc.paid_amount - this.frm.doc.grand_total,
- precision("change_amount"))
+ this.frm.doc.change_amount = flt(this.frm.doc.paid_amount - this.frm.doc.grand_total +
+ this.frm.doc.write_off_amount, precision("change_amount"));
}
- this.frm.doc.change_amount = flt(change_amount,
- precision("change_amount"))
- this.frm.doc.base_change_amount = flt(change_amount * this.frm.doc.conversion_rate,
- precision("base_change_amount"))
+ this.frm.doc.base_change_amount = flt(this.frm.doc.change_amount * this.frm.doc.conversion_rate,
+ precision("base_change_amount"));
},
})
diff --git a/erpnext/public/js/payment/payments.js b/erpnext/public/js/payment/payments.js
index 0638b84..7437f2a 100644
--- a/erpnext/public/js/payment/payments.js
+++ b/erpnext/public/js/payment/payments.js
@@ -57,6 +57,13 @@
currency: me.frm.doc.currency,
type: data.type
})).appendTo(multimode_payments)
+
+ if (data.type == 'Cash' && data.amount == me.frm.doc.paid_amount) {
+ me.idx = data.idx;
+ me.selected_mode = $(me.$body).find(repl("input[idx='%(idx)s']",{'idx': me.idx}));
+ me.highlight_selected_row();
+ me.bind_amount_change_event();
+ }
})
}else{
$("<p>No payment mode selected in pos profile</p>").appendTo(multimode_payments)
@@ -90,8 +97,10 @@
bind_payment_mode_keys_event: function(){
var me = this;
$(this.$body).find('.pos-payment-row').click(function(){
- me.idx = $(this).attr("idx");
- me.set_outstanding_amount()
+ if(me.frm.doc.outstanding_amount > 0){
+ me.idx = $(this).attr("idx");
+ me.set_outstanding_amount()
+ }
})
},
@@ -124,12 +133,16 @@
bind_amount_change_event: function(){
var me = this;
- me.selected_mode.change(function(){
+ this.selected_mode.change(function(){
me.payment_val = flt($(this).val()) || 0.0;
me.selected_mode.val(format_number(me.payment_val, 2))
me.idx = me.selected_mode.attr("idx")
me.update_paid_amount()
})
+
+ this.selected_mode.click(function(){
+ me.selected_mode.select();
+ })
},
clear_amount: function(){
@@ -140,6 +153,7 @@
me.selected_mode = $(me.$body).find(repl("input[idx='%(idx)s']",{'idx': me.idx}));
me.payment_val = 0.0;
me.selected_mode.val(0.0);
+ me.highlight_selected_row();
me.update_paid_amount();
})
},
diff --git a/erpnext/public/js/utils.js b/erpnext/public/js/utils.js
index 4081ca2..7330889 100644
--- a/erpnext/public/js/utils.js
+++ b/erpnext/public/js/utils.js
@@ -179,6 +179,22 @@
}
}
+frappe.form.link_formatters['Item'] = function(value, doc) {
+ if(doc && doc.item_name && doc.item_name !== value) {
+ return value + ': ' + doc.item_name;
+ } else {
+ return value;
+ }
+}
+
+frappe.form.link_formatters['Employee'] = function(value, doc) {
+ if(doc && doc.employee_name && doc.employee_name !== value) {
+ return value + ': ' + doc.employee_name;
+ } else {
+ return value;
+ }
+}
+
// add description on posting time
$(document).on('app_ready', function() {
if(!frappe.datetime.is_timezone_same()) {
diff --git a/erpnext/schools/doctype/guardian/__init__.py b/erpnext/schools/doctype/guardian/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/erpnext/schools/doctype/guardian/__init__.py
diff --git a/erpnext/hr/doctype/earning_type/earning_type.js b/erpnext/schools/doctype/guardian/guardian.js
similarity index 80%
copy from erpnext/hr/doctype/earning_type/earning_type.js
copy to erpnext/schools/doctype/guardian/guardian.js
index 1dd6412..139193f 100644
--- a/erpnext/hr/doctype/earning_type/earning_type.js
+++ b/erpnext/schools/doctype/guardian/guardian.js
@@ -1,7 +1,7 @@
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
-frappe.ui.form.on('Earning Type', {
+frappe.ui.form.on('Guardian', {
refresh: function(frm) {
}
diff --git a/erpnext/schools/doctype/guardian/guardian.json b/erpnext/schools/doctype/guardian/guardian.json
new file mode 100644
index 0000000..89e4bd0
--- /dev/null
+++ b/erpnext/schools/doctype/guardian/guardian.json
@@ -0,0 +1,211 @@
+{
+ "allow_copy": 0,
+ "allow_import": 0,
+ "allow_rename": 0,
+ "autoname": "GARD.####",
+ "beta": 0,
+ "creation": "2016-07-21 15:32:51.163292",
+ "custom": 0,
+ "docstatus": 0,
+ "doctype": "DocType",
+ "document_type": "",
+ "editable_grid": 1,
+ "fields": [
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "guardian_name",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Guardian Name",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "student",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Student",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Student",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "email_address",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Email Address",
+ "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": "mobile_nuber",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Mobile Nuber",
+ "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": "section_break_5",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "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": "interests",
+ "fieldtype": "Table",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Interests",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Guardian Interest",
+ "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": 0,
+ "hide_toolbar": 0,
+ "idx": 0,
+ "image_view": 0,
+ "in_create": 0,
+ "in_dialog": 0,
+ "is_submittable": 0,
+ "issingle": 0,
+ "istable": 0,
+ "max_attachments": 0,
+ "modified": "2016-07-25 07:20:11.458757",
+ "modified_by": "Administrator",
+ "module": "Schools",
+ "name": "Guardian",
+ "name_case": "",
+ "owner": "Administrator",
+ "permissions": [
+ {
+ "amend": 0,
+ "apply_user_permissions": 0,
+ "cancel": 0,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "export": 1,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Academics User",
+ "set_user_permissions": 0,
+ "share": 1,
+ "submit": 0,
+ "write": 1
+ }
+ ],
+ "quick_entry": 1,
+ "read_only": 0,
+ "read_only_onload": 0,
+ "sort_field": "modified",
+ "sort_order": "DESC",
+ "title_field": "guardian_name",
+ "track_seen": 0
+}
\ No newline at end of file
diff --git a/erpnext/schools/doctype/guardian/guardian.py b/erpnext/schools/doctype/guardian/guardian.py
new file mode 100644
index 0000000..1388cfe
--- /dev/null
+++ b/erpnext/schools/doctype/guardian/guardian.py
@@ -0,0 +1,10 @@
+# -*- coding: utf-8 -*-
+# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
+# For license information, please see license.txt
+
+from __future__ import unicode_literals
+import frappe
+from frappe.model.document import Document
+
+class Guardian(Document):
+ pass
diff --git a/erpnext/schools/doctype/guardian/test_guardian.py b/erpnext/schools/doctype/guardian/test_guardian.py
new file mode 100644
index 0000000..61420f6
--- /dev/null
+++ b/erpnext/schools/doctype/guardian/test_guardian.py
@@ -0,0 +1,12 @@
+# -*- coding: utf-8 -*-
+# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
+# See license.txt
+from __future__ import unicode_literals
+
+import frappe
+import unittest
+
+# test_records = frappe.get_test_records('Guardian')
+
+class TestGuardian(unittest.TestCase):
+ pass
diff --git a/erpnext/schools/doctype/guardian_interest/__init__.py b/erpnext/schools/doctype/guardian_interest/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/erpnext/schools/doctype/guardian_interest/__init__.py
diff --git a/erpnext/schools/doctype/guardian_interest/guardian_interest.json b/erpnext/schools/doctype/guardian_interest/guardian_interest.json
new file mode 100644
index 0000000..39f0059
--- /dev/null
+++ b/erpnext/schools/doctype/guardian_interest/guardian_interest.json
@@ -0,0 +1,63 @@
+{
+ "allow_copy": 0,
+ "allow_import": 0,
+ "allow_rename": 0,
+ "beta": 0,
+ "creation": "2016-07-25 07:19:55.113871",
+ "custom": 0,
+ "docstatus": 0,
+ "doctype": "DocType",
+ "document_type": "",
+ "editable_grid": 1,
+ "fields": [
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "interest",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 1,
+ "label": "Interest",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Interest",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ }
+ ],
+ "hide_heading": 0,
+ "hide_toolbar": 0,
+ "idx": 0,
+ "image_view": 0,
+ "in_create": 0,
+ "in_dialog": 0,
+ "is_submittable": 0,
+ "issingle": 0,
+ "istable": 1,
+ "max_attachments": 0,
+ "modified": "2016-07-25 07:20:32.837356",
+ "modified_by": "Administrator",
+ "module": "Schools",
+ "name": "Guardian Interest",
+ "name_case": "",
+ "owner": "Administrator",
+ "permissions": [],
+ "quick_entry": 1,
+ "read_only": 0,
+ "read_only_onload": 0,
+ "sort_field": "modified",
+ "sort_order": "DESC",
+ "track_seen": 0
+}
\ No newline at end of file
diff --git a/erpnext/schools/doctype/guardian_interest/guardian_interest.py b/erpnext/schools/doctype/guardian_interest/guardian_interest.py
new file mode 100644
index 0000000..f5c4cf1
--- /dev/null
+++ b/erpnext/schools/doctype/guardian_interest/guardian_interest.py
@@ -0,0 +1,10 @@
+# -*- coding: utf-8 -*-
+# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
+# For license information, please see license.txt
+
+from __future__ import unicode_literals
+import frappe
+from frappe.model.document import Document
+
+class GuardianInterest(Document):
+ pass
diff --git a/erpnext/schools/doctype/student/student.json b/erpnext/schools/doctype/student/student.json
index 4901dc4..22b8c4e 100644
--- a/erpnext/schools/doctype/student/student.json
+++ b/erpnext/schools/doctype/student/student.json
@@ -140,6 +140,31 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "fieldname": "student_email_id",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Student Email ID",
+ "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": 1
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
"default": "Today",
"fieldname": "joining_date",
"fieldtype": "Date",
@@ -218,182 +243,6 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
- "fieldname": "mother_name",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Mother's Name",
- "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": "mother_email_id",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Mother's / Guardian 1 Email ID",
- "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": "father_name",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Father's Name",
- "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": "father_email_id",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Father's/ Guardian 2 Email ID",
- "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": "contact",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Contact",
- "length": 0,
- "no_copy": 0,
- "options": "Contact",
- "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": "student_applicant",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Student Applicant",
- "length": 0,
- "no_copy": 0,
- "options": "Student Applicant",
- "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,
- "fieldname": "column_break_3",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "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": "date_of_birth",
"fieldtype": "Date",
"hidden": 0,
@@ -471,6 +320,56 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "fieldname": "column_break_3",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "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": "student_applicant",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Student Applicant",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Student Applicant",
+ "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,
"fieldname": "nationality",
"fieldtype": "Data",
"hidden": 0,
@@ -496,16 +395,17 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
- "fieldname": "student_email_id",
- "fieldtype": "Data",
+ "fieldname": "contact",
+ "fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
- "label": "Student Email ID",
+ "label": "Contact",
"length": 0,
"no_copy": 0,
+ "options": "Contact",
"permlevel": 0,
"precision": "",
"print_hide": 0,
@@ -515,7 +415,7 @@
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
- "unique": 1
+ "unique": 0
},
{
"allow_on_submit": 0,
@@ -556,7 +456,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2016-07-25 06:23:57.581538",
+ "modified": "2016-07-25 07:22:57.581638",
"modified_by": "Administrator",
"module": "Schools",
"name": "Student",
diff --git a/erpnext/schools/doctype/student/student_dashboard.py b/erpnext/schools/doctype/student/student_dashboard.py
index 0c22c7b..da2b9ad 100644
--- a/erpnext/schools/doctype/student/student_dashboard.py
+++ b/erpnext/schools/doctype/student/student_dashboard.py
@@ -6,10 +6,10 @@
'fieldname': 'student',
'transactions': [
{
- 'items': ['Student Group', 'Student Attendance', 'Program Enrollment' ]
+ 'items': ['Student Log', 'Student Group', 'Student Attendance']
},
{
- 'items': ['Fees', 'Examination']
+ 'items': ['Program Enrollment', 'Fees', 'Examination', 'Guardian']
}
]
}
\ No newline at end of file
diff --git a/erpnext/schools/doctype/student_log/__init__.py b/erpnext/schools/doctype/student_log/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/erpnext/schools/doctype/student_log/__init__.py
diff --git a/erpnext/hr/doctype/earning_type/earning_type.js b/erpnext/schools/doctype/student_log/student_log.js
similarity index 80%
copy from erpnext/hr/doctype/earning_type/earning_type.js
copy to erpnext/schools/doctype/student_log/student_log.js
index 1dd6412..40e63e9 100644
--- a/erpnext/hr/doctype/earning_type/earning_type.js
+++ b/erpnext/schools/doctype/student_log/student_log.js
@@ -1,7 +1,7 @@
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
-frappe.ui.form.on('Earning Type', {
+frappe.ui.form.on('Student Log', {
refresh: function(frm) {
}
diff --git a/erpnext/schools/doctype/student_log/student_log.json b/erpnext/schools/doctype/student_log/student_log.json
new file mode 100644
index 0000000..4bb5bd6
--- /dev/null
+++ b/erpnext/schools/doctype/student_log/student_log.json
@@ -0,0 +1,236 @@
+{
+ "allow_copy": 0,
+ "allow_import": 0,
+ "allow_rename": 0,
+ "autoname": "SLog.####",
+ "beta": 0,
+ "creation": "2016-07-29 03:27:22.451772",
+ "custom": 0,
+ "docstatus": 0,
+ "doctype": "DocType",
+ "document_type": "",
+ "editable_grid": 1,
+ "fields": [
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "student",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Student",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Student",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "type",
+ "fieldtype": "Select",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 1,
+ "label": "Type",
+ "length": 0,
+ "no_copy": 0,
+ "options": "General\nAcademic\nMedical\nAchievement",
+ "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,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "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": "student_name",
+ "fieldtype": "Read Only",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Student Name",
+ "length": 0,
+ "no_copy": 0,
+ "options": "student.title",
+ "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": "date",
+ "fieldtype": "Date",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 1,
+ "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": "section_break_5",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "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": "log",
+ "fieldtype": "Text Editor",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Log",
+ "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": 0,
+ "hide_toolbar": 0,
+ "idx": 0,
+ "image_view": 0,
+ "in_create": 0,
+ "in_dialog": 0,
+ "is_submittable": 0,
+ "issingle": 0,
+ "istable": 0,
+ "max_attachments": 0,
+ "modified": "2016-07-29 07:35:28.623364",
+ "modified_by": "Administrator",
+ "module": "Schools",
+ "name": "Student Log",
+ "name_case": "",
+ "owner": "Administrator",
+ "permissions": [
+ {
+ "amend": 0,
+ "apply_user_permissions": 0,
+ "cancel": 0,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "export": 1,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Academics User",
+ "set_user_permissions": 0,
+ "share": 1,
+ "submit": 0,
+ "write": 1
+ }
+ ],
+ "quick_entry": 0,
+ "read_only": 0,
+ "read_only_onload": 0,
+ "sort_field": "modified",
+ "sort_order": "DESC",
+ "title_field": "student_name",
+ "track_seen": 1
+}
\ No newline at end of file
diff --git a/erpnext/schools/doctype/student_log/student_log.py b/erpnext/schools/doctype/student_log/student_log.py
new file mode 100644
index 0000000..8b12886
--- /dev/null
+++ b/erpnext/schools/doctype/student_log/student_log.py
@@ -0,0 +1,10 @@
+# -*- coding: utf-8 -*-
+# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
+# For license information, please see license.txt
+
+from __future__ import unicode_literals
+import frappe
+from frappe.model.document import Document
+
+class StudentLog(Document):
+ pass
diff --git a/erpnext/schools/doctype/student_log/test_student_log.py b/erpnext/schools/doctype/student_log/test_student_log.py
new file mode 100644
index 0000000..1fe191f
--- /dev/null
+++ b/erpnext/schools/doctype/student_log/test_student_log.py
@@ -0,0 +1,12 @@
+# -*- coding: utf-8 -*-
+# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
+# See license.txt
+from __future__ import unicode_literals
+
+import frappe
+import unittest
+
+# test_records = frappe.get_test_records('Student Log')
+
+class TestStudentLog(unittest.TestCase):
+ pass
diff --git a/erpnext/setup/doctype/company/fixtures/india/__init__.py b/erpnext/setup/doctype/company/fixtures/india/__init__.py
index a97bf94..2aeec99 100644
--- a/erpnext/setup/doctype/company/fixtures/india/__init__.py
+++ b/erpnext/setup/doctype/company/fixtures/india/__init__.py
@@ -7,9 +7,9 @@
def install(company):
docs = [
- {'doctype': 'Salary Component', 'salary_component': 'Professional Tax', 'description': 'Professional Tax', 'salary_component': 'Professional Tax'},
- {'doctype': 'Salary Component', 'salary_component': 'Provident Fund', 'description': 'Provident fund', 'salary_component': 'Provident Fund'},
- {'doctype': 'Salary Component', 'salary_component': 'House Rent Allowance', 'description': 'House Rent Allowance', 'salary_component': 'House Rent Allowance', 'taxable': 'No'},
+ {'doctype': 'Salary Component', 'salary_component': 'Professional Tax', 'description': 'Professional Tax'},
+ {'doctype': 'Salary Component', 'salary_component': 'Provident Fund', 'description': 'Provident fund'},
+ {'doctype': 'Salary Component', 'salary_component': 'House Rent Allowance', 'description': 'House Rent Allowance'}
]
for d in docs:
diff --git a/erpnext/setup/setup_wizard/install_fixtures.py b/erpnext/setup/setup_wizard/install_fixtures.py
index a0e52dd..23549ff 100644
--- a/erpnext/setup/setup_wizard/install_fixtures.py
+++ b/erpnext/setup/setup_wizard/install_fixtures.py
@@ -27,12 +27,10 @@
{'doctype': 'Item Group', 'item_group_name': _('Consumable'),
'is_group': 0, 'parent_item_group': _('All Item Groups') },
- # deduction type
- {'doctype': 'Deduction Type', 'name': _('Income Tax'), 'description': _('Income Tax'), 'deduction_name': _('Income Tax')},
-
- # earning type
- {'doctype': 'Earning Type', 'name': _('Basic'), 'description': _('Basic'), 'earning_name': _('Basic'), 'taxable': 'Yes'},
-
+ # salary component
+ {'doctype': 'Salary Component', 'salary_component': _('Income Tax'), 'description': _('Income Tax')},
+ {'doctype': 'Salary Component', 'salary_component': _('Basic'), 'description': _('Basic')},
+
# expense claim type
{'doctype': 'Expense Claim Type', 'name': _('Calls'), 'expense_type': _('Calls')},
{'doctype': 'Expense Claim Type', 'name': _('Food'), 'expense_type': _('Food')},
diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js
index 17e379c..1f793d1 100644
--- a/erpnext/stock/doctype/item/item.js
+++ b/erpnext/stock/doctype/item/item.js
@@ -116,6 +116,14 @@
}
});
+frappe.ui.form.on('Item Reorder', {
+ reorder_levels_add: function(frm, cdt, cdn) {
+ var row = frappe.get_doc(cdt, cdn);
+ type = frm.doc.default_material_request_type
+ row.material_request_type = (type == 'Material Transfer')? 'Transfer' : type;
+ }
+})
+
$.extend(erpnext.item, {
setup_queries: function(frm) {
frm.fields_dict['expense_account'].get_query = function(doc) {
@@ -351,6 +359,7 @@
}
});
+
cur_frm.add_fetch('attribute', 'numeric_values', 'numeric_values');
cur_frm.add_fetch('attribute', 'from_range', 'from_range');
cur_frm.add_fetch('attribute', 'to_range', 'to_range');
diff --git a/erpnext/stock/doctype/item/item.json b/erpnext/stock/doctype/item/item.json
index e2aa274..b86378d 100644
--- a/erpnext/stock/doctype/item/item.json
+++ b/erpnext/stock/doctype/item/item.json
@@ -709,6 +709,33 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "default": "Purchase",
+ "fieldname": "default_material_request_type",
+ "fieldtype": "Select",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Default Material Request Type",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Purchase\nMaterial Transfer\nMaterial Issue\nManufacture",
+ "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": "is_stock_item",
"fieldname": "column_break1",
"fieldtype": "Column Break",
@@ -1966,7 +1993,7 @@
"collapsible": 0,
"depends_on": "show_in_website",
"fieldname": "route",
- "fieldtype": "Data",
+ "fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
@@ -1984,7 +2011,7 @@
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
- "unique": 1
+ "unique": 0
},
{
"allow_on_submit": 0,
@@ -2308,7 +2335,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 1,
- "modified": "2016-07-21 18:44:10.230372",
+ "modified": "2016-08-03 17:30:51.323382",
"modified_by": "Administrator",
"module": "Stock",
"name": "Item",
diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py
index cedfb24..b546df4 100644
--- a/erpnext/stock/doctype/item/item.py
+++ b/erpnext/stock/doctype/item/item.py
@@ -120,7 +120,10 @@
'''set opening stock'''
if not self.is_stock_item or self.has_serial_no or self.has_batch_no:
return
-
+
+ if not self.valuation_rate and self.standard_rate:
+ self.valuation_rate = self.standard_rate
+
if not self.valuation_rate:
frappe.throw(_("Valuation Rate is mandatory if Opening Stock entered"))
diff --git a/erpnext/stock/doctype/item_reorder/item_reorder.json b/erpnext/stock/doctype/item_reorder/item_reorder.json
index 4c98c3f..43eb98d 100644
--- a/erpnext/stock/doctype/item_reorder/item_reorder.json
+++ b/erpnext/stock/doctype/item_reorder/item_reorder.json
@@ -124,8 +124,9 @@
"label": "Material Request Type",
"length": 0,
"no_copy": 0,
- "options": "Purchase\nTransfer",
+ "options": "Purchase\nTransfer\nMaterial Issue\nManufacture",
"permlevel": 0,
+ "precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
@@ -146,7 +147,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2016-07-11 03:59:06.870780",
+ "modified": "2016-07-28 19:15:38.270046",
"modified_by": "Administrator",
"module": "Stock",
"name": "Item Reorder",
diff --git a/erpnext/stock/reorder_item.py b/erpnext/stock/reorder_item.py
index ad810a9..5131381 100644
--- a/erpnext/stock/reorder_item.py
+++ b/erpnext/stock/reorder_item.py
@@ -16,7 +16,7 @@
return _reorder_item()
def _reorder_item():
- material_requests = {"Purchase": {}, "Transfer": {}}
+ material_requests = {"Purchase": {}, "Transfer": {}, "Material Issue": {}, "Manufacture": {}}
warehouse_company = frappe._dict(frappe.db.sql("""select name, company from `tabWarehouse`
where disabled=0"""))
default_company = (erpnext.get_default_company() or
diff --git a/erpnext/templates/pages/demo.html b/erpnext/templates/pages/demo.html
index e1d98a1..8db6ad2 100644
--- a/erpnext/templates/pages/demo.html
+++ b/erpnext/templates/pages/demo.html
@@ -51,7 +51,7 @@
<!-- no-header -->
<div class="page-hero text-center">
- <img src="/assets/erpnext_demo/images/erp-icon-box.svg" style="max-width: 100px; max-height: 100px;">
+ <img src="/assets/erpnext/images/erp-icon.svg" style="max-width: 100px; max-height: 100px;">
<h1>ERPNext Demo</h1>
<p style="margin-top: 60px;">
<input id="lead-email" type="email"