Compare commits
131 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
53133dbd4d | ||
|
|
cd339b2ecf | ||
|
|
c9d04ab1fc | ||
|
|
6f84026c24 | ||
|
|
24f45af27e | ||
|
|
3c364dd5b8 | ||
|
|
185110159e | ||
|
|
5940dc1a8e | ||
|
|
3e78558357 | ||
|
|
74dbd168c2 | ||
|
|
1d7bd0efb8 | ||
|
|
de745e1df6 | ||
|
|
77dd190cc8 | ||
|
|
ddde4bec39 | ||
|
|
9ed1891440 | ||
|
|
dfcf55d010 | ||
|
|
66126ffc7a | ||
|
|
7c52d09dc2 | ||
|
|
a88dec8775 | ||
|
|
86a477d07e | ||
|
|
bc691dccba | ||
|
|
e9674f8866 | ||
|
|
84306ccc4c | ||
|
|
feed313a66 | ||
|
|
62658fde45 | ||
|
|
981f6ea34e | ||
|
|
ba1c34eef3 | ||
|
|
3e001b5fac | ||
|
|
6201068f8f | ||
|
|
9421a109cf | ||
|
|
26005c25b2 | ||
|
|
180e43585f | ||
|
|
05cc36a864 | ||
|
|
1e5c251ce2 | ||
|
|
95c2ba9736 | ||
|
|
69e0441041 | ||
|
|
db0e57cdce | ||
|
|
51a593b0b5 | ||
|
|
cc8fb1a8d6 | ||
|
|
1892520324 | ||
|
|
3bf486c5c6 | ||
|
|
6b8024a834 | ||
|
|
33b10a0405 | ||
|
|
7bae70a993 | ||
|
|
e7d0639edc | ||
|
|
0d5e208f8c | ||
|
|
a163299991 | ||
|
|
acff41ddd2 | ||
|
|
e72ff9377a | ||
|
|
a948407460 | ||
|
|
ee70f26131 | ||
|
|
142b6187b3 | ||
|
|
14384c2787 | ||
|
|
7357902802 | ||
|
|
fa97b3cac7 | ||
|
|
95f53cca44 | ||
|
|
949ceb18fc | ||
|
|
7590b8fff1 | ||
|
|
5a8b7ca7be | ||
|
|
98151ce5b2 | ||
|
|
380dbb044f | ||
|
|
ee75d41da0 | ||
|
|
e26a42dc7a | ||
|
|
b2c9848886 | ||
|
|
b4bf757a15 | ||
|
|
fc49c2c5f9 | ||
|
|
384f0b18c0 | ||
|
|
2a2346422d | ||
|
|
548ea777a9 | ||
|
|
67047fbb06 | ||
|
|
10007ab4df | ||
|
|
444bedcd20 | ||
|
|
2af5dfa9cc | ||
|
|
4bc0f7d105 | ||
|
|
3642f987c7 | ||
|
|
07e5758a94 | ||
|
|
e326ae95ef | ||
|
|
5f59a0a00f | ||
|
|
fd288f36ec | ||
|
|
19cb34ce40 | ||
|
|
5342ec5055 | ||
|
|
593d2e3146 | ||
|
|
c4afd63e50 | ||
|
|
6fe4a336f1 | ||
|
|
154be9b693 | ||
|
|
d46235ed83 | ||
|
|
17a9940f00 | ||
|
|
4d3e8da4a2 | ||
|
|
d4d1f1b036 | ||
|
|
9b542f303c | ||
|
|
21a5658fdf | ||
|
|
0540d52449 | ||
|
|
8a9daece7e | ||
|
|
c85aa3d9c5 | ||
|
|
5662ad6d96 | ||
|
|
859843687e | ||
|
|
40cf3db0b1 | ||
|
|
26cf01aaba | ||
|
|
eac602304c | ||
|
|
ce1c63f776 | ||
|
|
95b550dd8f | ||
|
|
bb78f1ac16 | ||
|
|
feea2e3dec | ||
|
|
7dae3e1ed4 | ||
|
|
5658fdfaed | ||
|
|
1c93dd0591 | ||
|
|
c910e0c614 | ||
|
|
6c3ac9587e | ||
|
|
316f78f859 | ||
|
|
5b2af6ad40 | ||
|
|
00f7741288 | ||
|
|
3f8428e972 | ||
|
|
644a04b378 | ||
|
|
c9478fc4f1 | ||
|
|
7b13c11182 | ||
|
|
d69d961f2a | ||
|
|
cc887900e8 | ||
|
|
ead3ccfd52 | ||
|
|
84f25b3214 | ||
|
|
581a12c56a | ||
|
|
cd385c3735 | ||
|
|
49e17e4590 | ||
|
|
0e94785cdd | ||
|
|
8e282c2ed8 | ||
|
|
f027fd0c66 | ||
|
|
71b6494395 | ||
|
|
39c952a3f2 | ||
|
|
e7399dff2d | ||
|
|
29517d0b8c | ||
|
|
c96263ceb8 | ||
|
|
6cfb60dc98 |
@@ -23,7 +23,7 @@ script:
|
||||
- cd ~/frappe-bench
|
||||
- bench get-app erpnext $TRAVIS_BUILD_DIR
|
||||
- bench use test_site
|
||||
- bench reinstall
|
||||
- bench reinstall --yes
|
||||
- bench build
|
||||
- bench start &
|
||||
- sleep 10
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
|
||||
__version__ = '7.0.0'
|
||||
__version__ = '7.0.13'
|
||||
|
||||
def get_default_company(user=None):
|
||||
'''Get default company for user'''
|
||||
|
||||
@@ -251,8 +251,8 @@ class PaymentEntry(AccountsController):
|
||||
self.unallocated_amount = party_amount - self.total_allocated_amount
|
||||
|
||||
def set_difference_amount(self):
|
||||
base_unallocated_amount = flt(self.unallocated_amount) * \
|
||||
(self.source_exchange_rate if self.payment_type=="Receive" else self.target_exchange_rate)
|
||||
base_unallocated_amount = flt(self.unallocated_amount) * (flt(self.source_exchange_rate)
|
||||
if self.payment_type=="Receive" else flt(self.target_exchange_rate))
|
||||
|
||||
base_party_amount = flt(self.base_total_allocated_amount) + flt(base_unallocated_amount)
|
||||
|
||||
@@ -267,6 +267,8 @@ class PaymentEntry(AccountsController):
|
||||
if d.amount:
|
||||
self.difference_amount -= flt(d.amount)
|
||||
|
||||
self.difference_amount = flt(self.difference_amount, self.precision("difference_amount"))
|
||||
|
||||
def clear_unallocated_reference_document_rows(self):
|
||||
self.set("references", self.get("references", {"allocated_amount": ["not in", [0, None, ""]]}))
|
||||
|
||||
@@ -672,7 +674,7 @@ def get_payment_entry(dt, dn, party_amount=None, bank_account=None, bank_amount=
|
||||
|
||||
pe.setup_party_account_field()
|
||||
pe.set_missing_values()
|
||||
if bank:
|
||||
if party_account and bank:
|
||||
pe.set_exchange_rate()
|
||||
pe.set_amounts()
|
||||
return pe
|
||||
@@ -0,0 +1,8 @@
|
||||
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
|
||||
// For license information, please see license.txt
|
||||
|
||||
frappe.ui.form.on('Payment Gateway', {
|
||||
refresh: function(frm) {
|
||||
|
||||
}
|
||||
});
|
||||
@@ -3,11 +3,13 @@
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
"autoname": "field:gateway",
|
||||
"beta": 0,
|
||||
"creation": "2015-12-15 22:26:45.221162",
|
||||
"custom": 0,
|
||||
"docstatus": 0,
|
||||
"doctype": "DocType",
|
||||
"document_type": "",
|
||||
"editable_grid": 1,
|
||||
"fields": [
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
@@ -17,6 +19,7 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Gateway",
|
||||
@@ -37,39 +40,20 @@
|
||||
"hide_heading": 0,
|
||||
"hide_toolbar": 0,
|
||||
"idx": 0,
|
||||
"image_view": 0,
|
||||
"in_create": 1,
|
||||
"in_dialog": 0,
|
||||
"is_submittable": 0,
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2016-01-18 03:58:22.588834",
|
||||
"modified": "2016-07-25 05:24:22.726993",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Payment Gateway",
|
||||
"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": "Administrator",
|
||||
"set_user_permissions": 0,
|
||||
"share": 1,
|
||||
"submit": 0,
|
||||
"write": 1
|
||||
},
|
||||
{
|
||||
"amend": 0,
|
||||
"apply_user_permissions": 0,
|
||||
@@ -111,8 +95,10 @@
|
||||
"write": 0
|
||||
}
|
||||
],
|
||||
"quick_entry": 1,
|
||||
"read_only": 1,
|
||||
"read_only_onload": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC"
|
||||
"sort_order": "DESC",
|
||||
"track_seen": 0
|
||||
}
|
||||
@@ -2,11 +2,13 @@
|
||||
"allow_copy": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
"beta": 0,
|
||||
"creation": "2015-12-23 21:31:52.699821",
|
||||
"custom": 0,
|
||||
"docstatus": 0,
|
||||
"doctype": "DocType",
|
||||
"document_type": "",
|
||||
"editable_grid": 1,
|
||||
"fields": [
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
@@ -216,39 +218,20 @@
|
||||
"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-04-27 17:47:53.979690",
|
||||
"modified": "2016-07-25 01:35:06.341291",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Payment Gateway Account",
|
||||
"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": "Administrator",
|
||||
"set_user_permissions": 0,
|
||||
"share": 1,
|
||||
"submit": 0,
|
||||
"write": 1
|
||||
},
|
||||
{
|
||||
"amend": 0,
|
||||
"apply_user_permissions": 0,
|
||||
|
||||
@@ -585,7 +585,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2016-07-21 19:11:57.517964",
|
||||
"modified": "2016-07-25 01:34:44.372161",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Payment Request",
|
||||
@@ -631,26 +631,6 @@
|
||||
"share": 1,
|
||||
"submit": 1,
|
||||
"write": 1
|
||||
},
|
||||
{
|
||||
"amend": 1,
|
||||
"apply_user_permissions": 0,
|
||||
"cancel": 1,
|
||||
"create": 1,
|
||||
"delete": 1,
|
||||
"email": 1,
|
||||
"export": 1,
|
||||
"if_owner": 0,
|
||||
"import": 0,
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"role": "Administrator",
|
||||
"set_user_permissions": 0,
|
||||
"share": 1,
|
||||
"submit": 1,
|
||||
"write": 1
|
||||
}
|
||||
],
|
||||
"quick_entry": 0,
|
||||
|
||||
@@ -20,7 +20,7 @@ def get_pos_data():
|
||||
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 @@ def get_items(doc, pos_profile):
|
||||
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)
|
||||
|
||||
@@ -69,13 +69,13 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
||||
var me = this;
|
||||
// navigator.onLine
|
||||
this.connection_status = false;
|
||||
this.page.set_indicator("Offline", "grey")
|
||||
this.page.set_indicator(__("Offline"), "grey")
|
||||
frappe.call({
|
||||
method:"frappe.handler.ping",
|
||||
callback: function(r){
|
||||
if(r.message){
|
||||
me.connection_status = true;
|
||||
me.page.set_indicator("Online", "green")
|
||||
me.page.set_indicator(__("Online"), "green")
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -278,7 +278,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
||||
"fieldtype": "Data",
|
||||
"label": "Item",
|
||||
"fieldname": "pos_item",
|
||||
"placeholder": "Search Item"
|
||||
"placeholder": __("Search Item")
|
||||
},
|
||||
parent: this.wrapper.find(".search-area"),
|
||||
only_input: true,
|
||||
@@ -423,16 +423,16 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
||||
|
||||
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{
|
||||
|
||||
@@ -1 +1 @@
|
||||
{% include "erpnext/accounts/report/accounts_receivable/accounts_receivable.html" %}
|
||||
{% include "accounts/report/accounts_receivable/accounts_receivable.html" %}
|
||||
|
||||
@@ -1 +1 @@
|
||||
{% include "erpnext/accounts/report/accounts_receivable/accounts_receivable.html" %}
|
||||
{% include "accounts/report/accounts_receivable/accounts_receivable.html" %}
|
||||
|
||||
@@ -1 +1 @@
|
||||
{% include "erpnext/accounts/report/accounts_receivable/accounts_receivable.html" %}
|
||||
{% include "accounts/report/accounts_receivable/accounts_receivable.html" %}
|
||||
|
||||
@@ -1 +1 @@
|
||||
{% include "erpnext/accounts/report/financial_statements.html" %}
|
||||
{% include "accounts/report/financial_statements.html" %}
|
||||
|
||||
@@ -1 +1 @@
|
||||
{% include "erpnext/accounts/report/financial_statements.html" %}
|
||||
{% include "accounts/report/financial_statements.html" %}
|
||||
|
||||
@@ -1 +1 @@
|
||||
{% include "erpnext/accounts/report/financial_statements.html" %}
|
||||
{% include "accounts/report/financial_statements.html" %}
|
||||
|
||||
@@ -87,7 +87,7 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
|
||||
|
||||
refresh: function(doc) {
|
||||
this.frm.toggle_display("supplier_name",
|
||||
(this.supplier_name && this.frm.doc.supplier_name!==this.frm.doc.supplier));
|
||||
(this.frm.doc.supplier_name && this.frm.doc.supplier_name!==this.frm.doc.supplier));
|
||||
|
||||
if(this.frm.docstatus==0 &&
|
||||
(this.frm.doctype==="Purchase Order" || this.frm.doctype==="Material Request")) {
|
||||
|
||||
@@ -1,12 +1,24 @@
|
||||
from frappe import _
|
||||
|
||||
data = {
|
||||
'docstatus': 1,
|
||||
'fieldname': 'purchase_order',
|
||||
'internal_links': {
|
||||
'Material Request': ['items', 'material_request'],
|
||||
'Supplier Quotation': ['items', 'supplier_quotation'],
|
||||
'Project': ['project'],
|
||||
},
|
||||
'transactions': [
|
||||
{
|
||||
'label': _('Related'),
|
||||
'items': ['Purchase Receipt', 'Purchase Invoice', 'Stock Entry']
|
||||
'items': ['Purchase Receipt', 'Purchase Invoice']
|
||||
},
|
||||
{
|
||||
'label': _('Reference'),
|
||||
'items': ['Material Request', 'Supplier Quotation', 'Project']
|
||||
},
|
||||
{
|
||||
'label': _('Sub-contracting'),
|
||||
'items': ['Stock Entry']
|
||||
},
|
||||
]
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
@@ -3,12 +3,14 @@
|
||||
"allow_import": 1,
|
||||
"allow_rename": 1,
|
||||
"autoname": "naming_series:",
|
||||
"beta": 0,
|
||||
"creation": "2013-01-10 16:34:11",
|
||||
"custom": 0,
|
||||
"description": "Supplier of Goods or Services.",
|
||||
"docstatus": 0,
|
||||
"doctype": "DocType",
|
||||
"document_type": "Setup",
|
||||
"editable_grid": 0,
|
||||
"fields": [
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
@@ -705,16 +707,18 @@
|
||||
"icon": "icon-user",
|
||||
"idx": 370,
|
||||
"image_field": "image",
|
||||
"image_view": 0,
|
||||
"in_create": 0,
|
||||
"in_dialog": 0,
|
||||
"is_submittable": 0,
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2016-04-28 17:36:44.742525",
|
||||
"modified": "2016-07-25 05:20:29.238820",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Buying",
|
||||
"name": "Supplier",
|
||||
"name_case": "Title Case",
|
||||
"owner": "Administrator",
|
||||
"permissions": [
|
||||
{
|
||||
@@ -858,7 +862,7 @@
|
||||
"write": 0
|
||||
}
|
||||
],
|
||||
"quick_entry": 0,
|
||||
"quick_entry": 1,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"search_fields": "supplier_name, supplier_type",
|
||||
|
||||
@@ -11,10 +11,28 @@ def get_data():
|
||||
"type": "doctype",
|
||||
"name": "Student"
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Student Log"
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Student Batch"
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Student Group"
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Student Group Creation Tool"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Admission"),
|
||||
"items": [
|
||||
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Student Applicant"
|
||||
@@ -26,10 +44,6 @@ def get_data():
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Program Enrollment Tool"
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Student Group Creation Tool"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -47,11 +61,11 @@ def get_data():
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Scheduling Tool"
|
||||
"name": "Examination"
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Examination"
|
||||
"name": "Scheduling Tool"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -78,6 +92,23 @@ def get_data():
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("LMS"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Announcement"
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Topic"
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Discussion"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Setup"),
|
||||
"items": [
|
||||
|
||||
@@ -167,9 +167,7 @@ def make_return_doc(doctype, source_name, target_doc=None):
|
||||
target_doc.qty = -1* source_doc.qty
|
||||
if doctype == "Purchase Receipt":
|
||||
target_doc.received_qty = -1* source_doc.qty
|
||||
target_doc.prevdoc_doctype = source_doc.prevdoc_doctype
|
||||
target_doc.prevdoc_docname = source_doc.prevdoc_docname
|
||||
target_doc.prevdoc_detail_docname = source_doc.prevdoc_detail_docname
|
||||
target_doc.purchase_order = source_doc.purchase_order
|
||||
elif doctype == "Purchase Invoice":
|
||||
target_doc.received_qty = -1* source_doc.qty
|
||||
target_doc.purchase_order = source_doc.purchase_order
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
"docstatus": 0,
|
||||
"doctype": "DocType",
|
||||
"document_type": "Document",
|
||||
"editable_grid": 1,
|
||||
"fields": [
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
@@ -266,7 +267,7 @@
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "status",
|
||||
"oldfieldtype": "Select",
|
||||
"options": "Open\nQuotation\nLost\nReplied\nClosed",
|
||||
"options": "Open\nQuotation\nConverted\nLost\nReplied\nClosed",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
@@ -1001,7 +1002,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2016-06-14 15:50:55.080217",
|
||||
"modified": "2016-07-28 15:58:06.614493",
|
||||
"modified_by": "Administrator",
|
||||
"module": "CRM",
|
||||
"name": "Opportunity",
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe, json
|
||||
from frappe.utils import cstr, cint, get_fullname
|
||||
from frappe.utils import cstr, cint, get_fullname, validate_email_add
|
||||
from frappe import msgprint, _
|
||||
from frappe.model.mapper import get_mapped_doc
|
||||
from erpnext.setup.utils import get_exchange_rate
|
||||
@@ -43,15 +43,15 @@ class Opportunity(TransactionBase):
|
||||
|
||||
def make_new_lead_if_required(self):
|
||||
"""Set lead against new opportunity"""
|
||||
if not (self.lead or self.customer):
|
||||
if not (self.lead or self.customer) and self.contact_email and validate_email_add(self.contact_email):
|
||||
lead_name = frappe.db.get_value("Lead", {"email_id": self.contact_email})
|
||||
if not lead_name:
|
||||
sender_name = get_fullname(self.contact_email)
|
||||
if sender_name == self.contact_email:
|
||||
sender_name = None
|
||||
|
||||
if not sender_name and self.contact_email.index('@'):
|
||||
email_name = self.contact_email[0:self.contact_email.index('@')]
|
||||
if not sender_name and ('@' in self.contact_email):
|
||||
email_name = self.contact_email.split('@')[0]
|
||||
|
||||
email_split = email_name.split('.')
|
||||
sender_name = ''
|
||||
@@ -63,6 +63,7 @@ class Opportunity(TransactionBase):
|
||||
"email_id": self.contact_email,
|
||||
"lead_name": sender_name
|
||||
})
|
||||
|
||||
lead.insert(ignore_permissions=True)
|
||||
lead_name = lead.name
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ def setup_data():
|
||||
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 @@ def setup_pos_profile():
|
||||
})
|
||||
|
||||
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()
|
||||
|
||||
@@ -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 @@ def make_sales_invoice_for_timesheet(name):
|
||||
sales_invoice.calculate_taxes_and_totals()
|
||||
sales_invoice.insert()
|
||||
sales_invoice.submit()
|
||||
frappe.db.commit()
|
||||
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()
|
||||
@@ -7,6 +7,8 @@ import frappe, random
|
||||
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 @@ def work():
|
||||
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 @@ def submit_draft_stock_entries():
|
||||
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()
|
||||
|
||||
@@ -5,7 +5,9 @@ Social Login enables users to login to ERPNext via their Google, Facebook or Git
|
||||
Checkout the following Video Tutorials to understand how to enable social logins on ERPNext
|
||||
|
||||
* for FaceBook - https://www.youtube.com/watch?v=zC6Q6gIfiw8
|
||||
* for Google - https://www.youtube.com/watch?v=w_EAttrE9sw
|
||||
* for Google - https://www.youtube.com/watch?v=w_EAttrE9sw
|
||||
* for GitHub - https://www.youtube.com/watch?v=bG71DxxkVjQ
|
||||
|
||||
{next}
|
||||
For Google the *Authorized redirect URI* is [yoursite]/api/method/frappe.www.login.login_via_google
|
||||
|
||||
{next}
|
||||
|
||||
8
erpnext/hr/doctype/branch/branch.js
Normal file
8
erpnext/hr/doctype/branch/branch.js
Normal file
@@ -0,0 +1,8 @@
|
||||
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
|
||||
// For license information, please see license.txt
|
||||
|
||||
frappe.ui.form.on('Branch', {
|
||||
refresh: function(frm) {
|
||||
|
||||
}
|
||||
});
|
||||
@@ -3,11 +3,13 @@
|
||||
"allow_import": 1,
|
||||
"allow_rename": 1,
|
||||
"autoname": "field:branch",
|
||||
"beta": 0,
|
||||
"creation": "2013-01-10 16:34:13",
|
||||
"custom": 0,
|
||||
"docstatus": 0,
|
||||
"doctype": "DocType",
|
||||
"document_type": "Setup",
|
||||
"editable_grid": 0,
|
||||
"fields": [
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
@@ -17,6 +19,7 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 1,
|
||||
"label": "Branch",
|
||||
@@ -26,6 +29,7 @@
|
||||
"oldfieldtype": "Data",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@@ -38,13 +42,14 @@
|
||||
"hide_toolbar": 0,
|
||||
"icon": "icon-code-fork",
|
||||
"idx": 1,
|
||||
"image_view": 0,
|
||||
"in_create": 0,
|
||||
"in_dialog": 0,
|
||||
"is_submittable": 0,
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2015-11-16 06:29:42.974184",
|
||||
"modified": "2016-07-25 05:24:26.534086",
|
||||
"modified_by": "Administrator",
|
||||
"module": "HR",
|
||||
"name": "Branch",
|
||||
@@ -91,6 +96,8 @@
|
||||
"write": 1
|
||||
}
|
||||
],
|
||||
"quick_entry": 1,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0
|
||||
"read_only_onload": 0,
|
||||
"track_seen": 0
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
Type of salary deduction.
|
||||
|
||||
e.g. Tax paid on behalf of the employee that is deducted from the salary.
|
||||
@@ -1 +0,0 @@
|
||||
from __future__ import unicode_literals
|
||||
@@ -1,101 +0,0 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_import": 1,
|
||||
"allow_rename": 1,
|
||||
"autoname": "field:deduction_name",
|
||||
"creation": "2013-01-22 16:50:30",
|
||||
"custom": 0,
|
||||
"docstatus": 0,
|
||||
"doctype": "DocType",
|
||||
"document_type": "Setup",
|
||||
"fields": [
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "deduction_name",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 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,
|
||||
"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,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 1,
|
||||
"label": "Description",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "description",
|
||||
"oldfieldtype": "Small Text",
|
||||
"permlevel": 0,
|
||||
"print_hide": 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,
|
||||
"in_create": 0,
|
||||
"in_dialog": 0,
|
||||
"is_submittable": 0,
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2015-11-16 06:29:44.572917",
|
||||
"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
|
||||
}
|
||||
],
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0
|
||||
}
|
||||
@@ -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
|
||||
@@ -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')
|
||||
@@ -1,10 +0,0 @@
|
||||
[
|
||||
{
|
||||
"doctype": "Deduction Type",
|
||||
"deduction_name": "_Test Professional Tax"
|
||||
},
|
||||
{
|
||||
"doctype": "Deduction Type",
|
||||
"deduction_name": "_Test TDS"
|
||||
}
|
||||
]
|
||||
8
erpnext/hr/doctype/department/department.js
Normal file
8
erpnext/hr/doctype/department/department.js
Normal file
@@ -0,0 +1,8 @@
|
||||
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
|
||||
// For license information, please see license.txt
|
||||
|
||||
frappe.ui.form.on('Department', {
|
||||
refresh: function(frm) {
|
||||
|
||||
}
|
||||
});
|
||||
@@ -3,11 +3,13 @@
|
||||
"allow_import": 1,
|
||||
"allow_rename": 1,
|
||||
"autoname": "field:department_name",
|
||||
"beta": 0,
|
||||
"creation": "2013-02-05 11:48:26",
|
||||
"custom": 0,
|
||||
"docstatus": 0,
|
||||
"doctype": "DocType",
|
||||
"document_type": "Setup",
|
||||
"editable_grid": 0,
|
||||
"fields": [
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
@@ -17,6 +19,7 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 1,
|
||||
"label": "Department",
|
||||
@@ -26,6 +29,7 @@
|
||||
"oldfieldtype": "Data",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@@ -42,6 +46,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 1,
|
||||
"label": "Leave Block List",
|
||||
@@ -50,6 +55,7 @@
|
||||
"options": "Leave Block List",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -62,13 +68,14 @@
|
||||
"hide_toolbar": 0,
|
||||
"icon": "icon-sitemap",
|
||||
"idx": 1,
|
||||
"image_view": 0,
|
||||
"in_create": 0,
|
||||
"in_dialog": 0,
|
||||
"is_submittable": 0,
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2015-11-16 06:29:45.172261",
|
||||
"modified": "2016-08-01 12:44:43.338689",
|
||||
"modified_by": "Administrator",
|
||||
"module": "HR",
|
||||
"name": "Department",
|
||||
@@ -93,8 +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
|
||||
"read_only_onload": 0,
|
||||
"sort_order": "ASC",
|
||||
"track_seen": 0
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
Type of earning that is a part of the salary.
|
||||
|
||||
e.g. basic salary, bonus etc.
|
||||
@@ -1 +0,0 @@
|
||||
from __future__ import unicode_literals
|
||||
@@ -1,101 +0,0 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_import": 1,
|
||||
"allow_rename": 1,
|
||||
"autoname": "field:earning_name",
|
||||
"creation": "2013-01-24 11:03:32",
|
||||
"custom": 0,
|
||||
"docstatus": 0,
|
||||
"doctype": "DocType",
|
||||
"document_type": "Setup",
|
||||
"fields": [
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "earning_name",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 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,
|
||||
"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,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 1,
|
||||
"label": "Description",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "description",
|
||||
"oldfieldtype": "Small Text",
|
||||
"permlevel": 0,
|
||||
"print_hide": 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,
|
||||
"in_create": 0,
|
||||
"in_dialog": 0,
|
||||
"is_submittable": 0,
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2015-11-16 06:29:45.813984",
|
||||
"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
|
||||
}
|
||||
],
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0
|
||||
}
|
||||
@@ -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
|
||||
@@ -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')
|
||||
@@ -1,12 +0,0 @@
|
||||
[
|
||||
{
|
||||
"doctype": "Earning Type",
|
||||
"earning_name": "_Test Basic Salary",
|
||||
"taxable": "Yes"
|
||||
},
|
||||
{
|
||||
"doctype": "Earning Type",
|
||||
"earning_name": "_Test Allowance",
|
||||
"taxable": "Yes"
|
||||
}
|
||||
]
|
||||
@@ -3,11 +3,13 @@
|
||||
"allow_import": 1,
|
||||
"allow_rename": 1,
|
||||
"autoname": "field:employee_type_name",
|
||||
"beta": 0,
|
||||
"creation": "2013-01-10 16:34:14",
|
||||
"custom": 0,
|
||||
"docstatus": 0,
|
||||
"doctype": "DocType",
|
||||
"document_type": "Setup",
|
||||
"editable_grid": 0,
|
||||
"fields": [
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
@@ -17,6 +19,7 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 1,
|
||||
"label": "Employment Type",
|
||||
@@ -26,6 +29,7 @@
|
||||
"oldfieldtype": "Data",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@@ -38,13 +42,14 @@
|
||||
"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": "2015-11-16 06:29:46.733350",
|
||||
"modified": "2016-07-22 05:34:43.238512",
|
||||
"modified_by": "Administrator",
|
||||
"module": "HR",
|
||||
"name": "Employment Type",
|
||||
@@ -91,6 +96,9 @@
|
||||
"write": 1
|
||||
}
|
||||
],
|
||||
"quick_entry": 1,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0
|
||||
"read_only_onload": 0,
|
||||
"sort_order": "DESC",
|
||||
"track_seen": 0
|
||||
}
|
||||
8
erpnext/hr/doctype/interest/interest.js
Normal file
8
erpnext/hr/doctype/interest/interest.js
Normal file
@@ -0,0 +1,8 @@
|
||||
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
|
||||
// For license information, please see license.txt
|
||||
|
||||
frappe.ui.form.on('Interest', {
|
||||
refresh: function(frm) {
|
||||
|
||||
}
|
||||
});
|
||||
144
erpnext/hr/doctype/interest/interest.json
Normal file
144
erpnext/hr/doctype/interest/interest.json
Normal file
@@ -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
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (c) 2015, Frappe Technologies and contributors
|
||||
# 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 FeeAmount(Document):
|
||||
class Interest(Document):
|
||||
pass
|
||||
12
erpnext/hr/doctype/interest/test_interest.py
Normal file
12
erpnext/hr/doctype/interest/test_interest.py
Normal file
@@ -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
|
||||
8
erpnext/hr/doctype/offer_term/offer_term.js
Normal file
8
erpnext/hr/doctype/offer_term/offer_term.js
Normal file
@@ -0,0 +1,8 @@
|
||||
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
|
||||
// For license information, please see license.txt
|
||||
|
||||
frappe.ui.form.on('Offer Term', {
|
||||
refresh: function(frm) {
|
||||
|
||||
}
|
||||
});
|
||||
@@ -3,11 +3,13 @@
|
||||
"allow_import": 1,
|
||||
"allow_rename": 0,
|
||||
"autoname": "field:offer_term",
|
||||
"beta": 0,
|
||||
"creation": "2015-03-05 13:00:30.900471",
|
||||
"custom": 0,
|
||||
"docstatus": 0,
|
||||
"doctype": "DocType",
|
||||
"document_type": "Setup",
|
||||
"editable_grid": 0,
|
||||
"fields": [
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
@@ -17,6 +19,7 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Offer Term",
|
||||
@@ -25,6 +28,7 @@
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@@ -35,13 +39,15 @@
|
||||
],
|
||||
"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": "2015-11-16 06:29:50.848215",
|
||||
"modified": "2016-07-25 05:24:25.724664",
|
||||
"modified_by": "Administrator",
|
||||
"module": "HR",
|
||||
"name": "Offer Term",
|
||||
@@ -69,8 +75,10 @@
|
||||
"write": 1
|
||||
}
|
||||
],
|
||||
"quick_entry": 1,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC"
|
||||
"sort_order": "DESC",
|
||||
"track_seen": 0
|
||||
}
|
||||
@@ -61,11 +61,10 @@ class SalarySlip(TransactionBase):
|
||||
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 (status = 'Submitted' or
|
||||
status = 'Billed')""", {'employee': self.employee}, as_dict=1)
|
||||
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)
|
||||
|
||||
for data in timesheets:
|
||||
self.append('timesheets', {
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
Deduction detail in parent Salary Slip.
|
||||
|
||||
e.g.
|
||||
|
||||
- Tax paid on employee's behalf
|
||||
@@ -1 +0,0 @@
|
||||
from __future__ import unicode_literals
|
||||
@@ -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
|
||||
}
|
||||
@@ -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
|
||||
@@ -1,6 +0,0 @@
|
||||
Earning detail in parent Salary Slip.
|
||||
|
||||
e.g.
|
||||
|
||||
- Basic Salary
|
||||
- Performance Bonus
|
||||
@@ -1 +0,0 @@
|
||||
from __future__ import unicode_literals
|
||||
@@ -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
|
||||
}
|
||||
@@ -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
|
||||
@@ -1 +0,0 @@
|
||||
Deduction details in parent Salary Structure.
|
||||
@@ -1 +0,0 @@
|
||||
from __future__ import unicode_literals
|
||||
@@ -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
|
||||
}
|
||||
@@ -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
|
||||
@@ -1 +0,0 @@
|
||||
Earning details in parent Salary Structure.
|
||||
@@ -1 +0,0 @@
|
||||
from __future__ import unicode_literals
|
||||
@@ -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
|
||||
}
|
||||
@@ -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
|
||||
@@ -58,7 +58,7 @@ class MaintenanceSchedule(TransactionBase):
|
||||
if no_email_sp:
|
||||
frappe.msgprint(
|
||||
frappe._("Setting Events to {0}, since the Employee attached to the below Sales Persons does not have a User ID{1}").format(
|
||||
doc.owner, "<br>"+no_email_sp.join("<br>")
|
||||
self.owner, "<br>"+no_email_sp.join("<br>")
|
||||
))
|
||||
|
||||
scheduled_date = frappe.db.sql("""select scheduled_date from
|
||||
@@ -153,7 +153,7 @@ class MaintenanceSchedule(TransactionBase):
|
||||
elif not d.sales_person:
|
||||
throw(_("Please select Incharge Person's name"))
|
||||
|
||||
if getdate(d.start_date) > getdate(d.end_date):
|
||||
if getdate(d.start_date) >= getdate(d.end_date):
|
||||
throw(_("Start date should be less than end date for Item {0}").format(d.item_code))
|
||||
|
||||
def validate_sales_order(self):
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2016-07-08 08:42:35.126397",
|
||||
"modified": "2016-07-25 05:24:23.398894",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Manufacturing",
|
||||
"name": "Operation",
|
||||
@@ -146,7 +146,7 @@
|
||||
"write": 1
|
||||
}
|
||||
],
|
||||
"quick_entry": 0,
|
||||
"quick_entry": 1,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"sort_field": "modified",
|
||||
|
||||
@@ -112,8 +112,10 @@ class ProductionOrder(Document):
|
||||
|
||||
|
||||
def update_status(self, status=None):
|
||||
'''Update status of production order'''
|
||||
status = self.get_status()
|
||||
'''Update status of production order if unknown'''
|
||||
if not status:
|
||||
status = self.get_status()
|
||||
|
||||
if status != self.status:
|
||||
self.db_set("status", status)
|
||||
|
||||
|
||||
@@ -28,10 +28,11 @@ execute:frappe.reload_doc('support', 'doctype', 'newsletter') # 2014-01-31
|
||||
execute:frappe.reload_doc('hr', 'doctype', 'employee') # 2014-02-03
|
||||
execute:frappe.db.sql("update tabPage set module='Core' where name='Setup'")
|
||||
|
||||
# inserted this patch here since Item types are being changed
|
||||
erpnext.patches.v5_2.change_item_selects_to_checks
|
||||
erpnext.patches.v4_0.fields_to_be_renamed
|
||||
erpnext.patches.v4_0.rename_sitemap_to_route
|
||||
erpnext.patches.v7_0.re_route #2016-06-27
|
||||
|
||||
erpnext.patches.v4_0.fix_contact_address
|
||||
erpnext.patches.v4_0.customer_discount_to_pricing_rule
|
||||
execute:frappe.db.sql("""delete from `tabWebsite Item Group` where ifnull(item_group, '')=''""")
|
||||
@@ -263,7 +264,6 @@ execute:frappe.delete_doc_if_exists("Web Form", "contact") #2016-03-10
|
||||
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
|
||||
@@ -277,9 +277,8 @@ execute:frappe.db.sql('update tabQuotation set status="Cancelled" where docstatu
|
||||
execute:frappe.rename_doc("DocType", "Payments", "Sales Invoice Payment", force=True)
|
||||
erpnext.patches.v7_0.update_mins_to_first_response
|
||||
erpnext.patches.v6_20x.repost_valuation_rate_for_negative_inventory
|
||||
erpnext.patches.v7_0.re_route #2016-06-27
|
||||
erpnext.patches.v7_0.system_settings_setup_complete
|
||||
erpnext.patches.v7_0.set_naming_series_for_timesheet
|
||||
erpnext.patches.v7_0.set_naming_series_for_timesheet #2016-07-27
|
||||
execute:frappe.reload_doc('projects', 'doctype', 'project')
|
||||
execute:frappe.reload_doc('projects', 'doctype', 'project_user')
|
||||
erpnext.patches.v7_0.convert_timelogbatch_to_timesheet
|
||||
@@ -300,3 +299,11 @@ execute:frappe.delete_doc_if_exists("DocType", "Payment Tool")
|
||||
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
|
||||
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
|
||||
@@ -2,6 +2,10 @@ from __future__ import unicode_literals
|
||||
import frappe
|
||||
|
||||
def execute():
|
||||
frappe.reload_doc("buying", "doctype", "request_for_quotation_supplier")
|
||||
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)
|
||||
|
||||
16
erpnext/patches/v7_0/calculate_total_costing_amount.py
Normal file
16
erpnext/patches/v7_0/calculate_total_costing_amount.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import frappe
|
||||
from frappe.utils import flt
|
||||
|
||||
def execute():
|
||||
frappe.reload_doc('projects', 'doctype', 'timesheet')
|
||||
|
||||
for data in frappe.get_all('Timesheet', fields=["name, total_costing_amount"],
|
||||
filters = [["docstatus", "<", "2"]]):
|
||||
if flt(data.total_costing_amount) == 0.0:
|
||||
ts = frappe.get_doc('Timesheet', data.name)
|
||||
ts.update_cost()
|
||||
ts.calculate_total_amounts()
|
||||
ts.flags.ignore_validate = True
|
||||
ts.flags.ignore_mandatory = True
|
||||
ts.flags.ignore_validate_update_after_submit = True
|
||||
ts.save()
|
||||
@@ -0,0 +1,52 @@
|
||||
# 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
|
||||
|
||||
def execute():
|
||||
if not frappe.db.get_single_value("Accounts Settings", "auto_accounting_for_stock"):
|
||||
return
|
||||
|
||||
frappe.reload_doctype("Account")
|
||||
|
||||
warehouses = frappe.db.sql_list("""select name from tabAccount
|
||||
where account_type = 'Stock' and is_group = 0
|
||||
and (warehouse is null or warehouse = '')""")
|
||||
if warehouses:
|
||||
warehouses = set_warehouse_for_stock_account(warehouses)
|
||||
if not warehouses:
|
||||
return
|
||||
|
||||
stock_vouchers = frappe.db.sql("""select distinct sle.voucher_type, sle.voucher_no
|
||||
from `tabStock Ledger Entry` sle
|
||||
where sle.warehouse in (%s) and creation > '2016-05-01'
|
||||
and not exists(select name from `tabGL Entry`
|
||||
where account=sle.warehouse and voucher_type=sle.voucher_type and voucher_no=sle.voucher_no)
|
||||
order by sle.posting_date""" %
|
||||
', '.join(['%s']*len(warehouses)), tuple(warehouses))
|
||||
|
||||
rejected = []
|
||||
for voucher_type, voucher_no in stock_vouchers:
|
||||
try:
|
||||
frappe.db.sql("""delete from `tabGL Entry`
|
||||
where voucher_type=%s and voucher_no=%s""", (voucher_type, voucher_no))
|
||||
|
||||
voucher = frappe.get_doc(voucher_type, voucher_no)
|
||||
voucher.make_gl_entries()
|
||||
frappe.db.commit()
|
||||
except Exception, e:
|
||||
print frappe.get_traceback()
|
||||
rejected.append([voucher_type, voucher_no])
|
||||
frappe.db.rollback()
|
||||
|
||||
print rejected
|
||||
|
||||
def set_warehouse_for_stock_account(warehouse_account):
|
||||
for account in warehouse_account:
|
||||
if frappe.db.exists('Warehouse', account):
|
||||
frappe.db.set_value("Account", account, "warehouse", account)
|
||||
else:
|
||||
warehouse_account.remove(account)
|
||||
|
||||
return warehouse_account
|
||||
18
erpnext/patches/v7_0/make_guardian.py
Normal file
18
erpnext/patches/v7_0/make_guardian.py
Normal file
@@ -0,0 +1,18 @@
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
|
||||
def execute():
|
||||
students = frappe.get_list("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()
|
||||
@@ -0,0 +1,9 @@
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
|
||||
def execute():
|
||||
frappe.db.sql("""delete from tabDocPerm where role="Administrator" and parent in
|
||||
("Payment Gateway", "Payment Gateway Account", "Payment Request", "Academic Term", "Academic Year", "Course",
|
||||
"Course Schedule", "Examination", "Fee Category", "Fee Structure", "Fees", "Instructor", "Program", "Program Enrollment Tool",
|
||||
"Room", "Scheduling Tool", "Student", "Student Applicant", "Student Attendance", "Student Group", "Student Group Creation Tool")
|
||||
""")
|
||||
@@ -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()
|
||||
16
erpnext/patches/v7_0/rename_fee_amount_to_fee_component.py
Normal file
16
erpnext/patches/v7_0/rename_fee_amount_to_fee_component.py
Normal file
@@ -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
|
||||
|
||||
from frappe.model.utils.rename_field import rename_field
|
||||
|
||||
def execute():
|
||||
if frappe.db.exists("DocType", "Fee Amount"):
|
||||
frappe.rename_doc("DocType", "Fee Amount", "Fee Component")
|
||||
for dt in ("Fees", "Fee Structure"):
|
||||
frappe.reload_doctype(dt)
|
||||
rename_field(dt, "amount", "components")
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@ def execute():
|
||||
frappe.reload_doc('portal', 'doctype', 'homepage_featured_product')
|
||||
frappe.reload_doc('portal', 'doctype', 'homepage')
|
||||
frappe.reload_doc('portal', 'doctype', 'products_settings')
|
||||
frappe.reload_doctype('Item')
|
||||
frappe.reload_doctype('Item Group')
|
||||
|
||||
website_settings = frappe.get_doc('Website Settings', 'Website Settings')
|
||||
if frappe.db.exists('Web Page', website_settings.home_page):
|
||||
|
||||
15
erpnext/patches/v7_0/update_refdoc_in_landed_cost_voucher.py
Normal file
15
erpnext/patches/v7_0/update_refdoc_in_landed_cost_voucher.py
Normal file
@@ -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 != '')
|
||||
""")
|
||||
@@ -15,7 +15,7 @@ frappe.ui.form.on('Homepage Featured Product', {
|
||||
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',
|
||||
|
||||
@@ -3,11 +3,13 @@
|
||||
"allow_import": 1,
|
||||
"allow_rename": 1,
|
||||
"autoname": "field:activity_type",
|
||||
"beta": 0,
|
||||
"creation": "2013-03-05 10:14:59",
|
||||
"custom": 0,
|
||||
"docstatus": 0,
|
||||
"doctype": "DocType",
|
||||
"document_type": "Setup",
|
||||
"editable_grid": 0,
|
||||
"fields": [
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
@@ -17,6 +19,7 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Activity Type",
|
||||
@@ -24,6 +27,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@@ -39,6 +43,7 @@
|
||||
"fieldtype": "Currency",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Default Costing Rate",
|
||||
@@ -47,6 +52,7 @@
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -62,6 +68,7 @@
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"length": 0,
|
||||
@@ -69,6 +76,7 @@
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -84,6 +92,7 @@
|
||||
"fieldtype": "Currency",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Default Billing Rate",
|
||||
@@ -92,6 +101,7 @@
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -104,13 +114,14 @@
|
||||
"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": "2015-11-16 06:29:41.673241",
|
||||
"modified": "2016-07-25 05:24:26.717981",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Projects",
|
||||
"name": "Activity Type",
|
||||
@@ -157,6 +168,8 @@
|
||||
"write": 1
|
||||
}
|
||||
],
|
||||
"quick_entry": 1,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0
|
||||
"read_only_onload": 0,
|
||||
"track_seen": 0
|
||||
}
|
||||
@@ -5,11 +5,11 @@ cur_frm.add_fetch('employee', 'employee_name', 'employee_name');
|
||||
frappe.ui.form.on("Timesheet", {
|
||||
setup: function(frm) {
|
||||
frm.get_field('time_logs').grid.editable_fields = [
|
||||
{fieldname: 'billable', columns: 2},
|
||||
{fieldname: 'billable', columns: 1},
|
||||
{fieldname: 'activity_type', columns: 2},
|
||||
{fieldname: 'from_time', columns: 2},
|
||||
{fieldname: 'hours', columns: 2},
|
||||
{fieldname: 'to_time', columns: 2},
|
||||
{fieldname: 'from_time', columns: 3},
|
||||
{fieldname: 'hours', columns: 1},
|
||||
{fieldname: 'project', columns: 3}
|
||||
];
|
||||
|
||||
frm.fields_dict.employee.get_query = function() {
|
||||
@@ -22,7 +22,8 @@ frappe.ui.form.on("Timesheet", {
|
||||
child = locals[cdt][cdn];
|
||||
return{
|
||||
filters: {
|
||||
'project': child.project
|
||||
'project': child.project,
|
||||
'status': ["!=", "Closed"]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -30,15 +31,13 @@ frappe.ui.form.on("Timesheet", {
|
||||
|
||||
onload: function(frm){
|
||||
if (frm.doc.__islocal && frm.doc.time_logs) {
|
||||
frm.set_value("employee", "")
|
||||
calculate_time_and_amount(frm);
|
||||
}
|
||||
},
|
||||
|
||||
refresh: function(frm) {
|
||||
if(frm.doc.docstatus==1) {
|
||||
if(!frm.doc.sales_invoice && frm.doc.total_billing_amount > 0
|
||||
&& !frm.doc.production_order){
|
||||
if(!frm.doc.sales_invoice && frm.doc.total_billing_amount > 0){
|
||||
frm.add_custom_button(__("Make Sales Invoice"), function() { frm.trigger("make_invoice") },
|
||||
"icon-file-alt");
|
||||
}
|
||||
@@ -147,13 +146,16 @@ var calculate_time_and_amount = function(frm) {
|
||||
var tl = frm.doc.time_logs || [];
|
||||
total_hr = 0;
|
||||
total_billing_amount = 0;
|
||||
total_costing_amount = 0;
|
||||
for(var i=0; i<tl.length; i++) {
|
||||
if (tl[i].hours) {
|
||||
total_hr += tl[i].hours;
|
||||
total_billing_amount += tl[i].billing_amount;
|
||||
total_costing_amount += tl[i].costing_amount;
|
||||
}
|
||||
}
|
||||
|
||||
cur_frm.set_value("total_hours", total_hr);
|
||||
cur_frm.set_value("total_billing_amount", total_billing_amount);
|
||||
cur_frm.set_value("total_costing_amount", total_costing_amount);
|
||||
}
|
||||
@@ -157,7 +157,7 @@
|
||||
"no_copy": 1,
|
||||
"options": "Draft\nSubmitted\nBilled\nPayslip\nCompleted\nCancelled",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
@@ -478,7 +478,7 @@
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"default": "0",
|
||||
"description": "updated via Time Logs",
|
||||
"description": "",
|
||||
"fieldname": "total_hours",
|
||||
"fieldtype": "Float",
|
||||
"hidden": 0,
|
||||
@@ -529,7 +529,7 @@
|
||||
"collapsible": 0,
|
||||
"default": "0",
|
||||
"depends_on": "",
|
||||
"description": "updated via Time Logs",
|
||||
"description": "",
|
||||
"fieldname": "total_billing_amount",
|
||||
"fieldtype": "Float",
|
||||
"hidden": 0,
|
||||
@@ -551,6 +551,31 @@
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "total_costing_amount",
|
||||
"fieldtype": "Float",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Total Costing Amount",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
@@ -637,7 +662,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2016-07-13 23:44:05.086570",
|
||||
"modified": "2016-07-26 00:01:56.055046",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Projects",
|
||||
"name": "Timesheet",
|
||||
|
||||
@@ -20,14 +20,21 @@ class OverProductionLoggedError(frappe.ValidationError): pass
|
||||
class Timesheet(Document):
|
||||
def validate(self):
|
||||
self.set_status()
|
||||
self.total_hours = 0.0
|
||||
self.total_billing_amount = 0.0
|
||||
self.validate_dates()
|
||||
self.validate_time_logs()
|
||||
self.update_cost()
|
||||
self.calculate_total_amounts()
|
||||
|
||||
def calculate_total_amounts(self):
|
||||
self.total_hours = 0.0
|
||||
self.total_billing_amount = 0.0
|
||||
self.total_costing_amount = 0.0
|
||||
|
||||
for d in self.get("time_logs"):
|
||||
self.total_hours += flt(d.hours)
|
||||
if d.billable: self.total_billing_amount += flt(d.billing_amount)
|
||||
if d.billable:
|
||||
self.total_billing_amount += flt(d.billing_amount)
|
||||
self.total_costing_amount += flt(d.costing_amount)
|
||||
|
||||
def set_status(self):
|
||||
self.status = {
|
||||
@@ -88,12 +95,9 @@ class Timesheet(Document):
|
||||
frappe.throw(_("Row {0}: Completed Qty must be greater than zero.").format(data.idx))
|
||||
|
||||
if self.production_order and flt(pending_qty) < flt(data.completed_qty):
|
||||
frappe.throw(_("Row {0}: Completed Qty cannot be more than {0} for operation {1}").format(data.idx, pending_qty, self.operation),
|
||||
frappe.throw(_("Row {0}: Completed Qty cannot be more than {1} for operation {2}").format(data.idx, pending_qty, data.operation),
|
||||
OverProductionLoggedError)
|
||||
|
||||
if data.billable and flt(data.billing_rate) == 0.0 and data.activity_type:
|
||||
frappe.throw(_("Row {0}: Billing Rate must be greater than zero.").format(data.idx))
|
||||
|
||||
def update_production_order(self, time_sheet):
|
||||
if self.production_order:
|
||||
pro = frappe.get_doc('Production Order', self.production_order)
|
||||
@@ -223,7 +227,7 @@ class Timesheet(Document):
|
||||
|
||||
def update_cost(self):
|
||||
for data in self.time_logs:
|
||||
if data.activity_type and not data.billing_amount:
|
||||
if data.activity_type and (not data.billing_amount or not data.costing_amount):
|
||||
rate = get_activity_cost(self.employee, data.activity_type)
|
||||
hours = data.hours or 0
|
||||
if rate:
|
||||
@@ -289,7 +293,7 @@ def get_activity_cost(employee=None, activity_type=None):
|
||||
|
||||
@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})
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"depends_on": "eval:!parent.production_order",
|
||||
"depends_on": "",
|
||||
"fieldname": "billable",
|
||||
"fieldtype": "Check",
|
||||
"hidden": 0,
|
||||
@@ -27,7 +27,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
@@ -163,7 +163,7 @@
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"depends_on": "eval:!parent.production_order",
|
||||
"depends_on": "billable",
|
||||
"fieldname": "section_break_11",
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
@@ -265,7 +265,7 @@
|
||||
"collapsible": 0,
|
||||
"default": "0",
|
||||
"depends_on": "",
|
||||
"description": "To display value check Billable",
|
||||
"description": "",
|
||||
"fieldname": "billing_amount",
|
||||
"fieldtype": "Currency",
|
||||
"hidden": 0,
|
||||
@@ -292,7 +292,7 @@
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"default": "0",
|
||||
"description": "To display value check Billable",
|
||||
"description": "",
|
||||
"fieldname": "costing_amount",
|
||||
"fieldtype": "Currency",
|
||||
"hidden": 0,
|
||||
@@ -532,7 +532,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2016-07-21 09:59:01.622745",
|
||||
"modified": "2016-07-26 00:07:58.267131",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Projects",
|
||||
"name": "Timesheet Detail",
|
||||
|
||||
@@ -127,8 +127,9 @@
|
||||
.dashboard-list-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
.payment-toolbar {
|
||||
margin-left: 35px;
|
||||
.payment-toolbar .row {
|
||||
width: 323px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.payment-mode {
|
||||
cursor: pointer;
|
||||
@@ -159,6 +160,38 @@
|
||||
background-color: #FDFDFD;
|
||||
border-color: #e8e8e8;
|
||||
}
|
||||
.multimode-payments {
|
||||
padding-left: 30px;
|
||||
}
|
||||
.payment-toolbar {
|
||||
padding-right: 30px;
|
||||
}
|
||||
body[data-route="pos"] .modal-dialog {
|
||||
width: 750px;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
body[data-route="pos"] .modal-dialog {
|
||||
width: auto;
|
||||
}
|
||||
body[data-route="pos"] .modal-dialog .modal-content {
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
.amount-row h3 {
|
||||
font-size: 15px;
|
||||
}
|
||||
.pos-keyboard-key,
|
||||
.delete-btn {
|
||||
height: 50px;
|
||||
}
|
||||
.multimode-payments {
|
||||
padding-left: 15px;
|
||||
}
|
||||
.payment-toolbar {
|
||||
padding-right: 15px;
|
||||
}
|
||||
}
|
||||
.amount-label {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
@@ -582,7 +582,7 @@ erpnext.taxes_and_totals = erpnext.payments.extend({
|
||||
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;
|
||||
|
||||
@@ -11,7 +11,6 @@ erpnext.payments = erpnext.stock.StockController.extend({
|
||||
|
||||
this.dialog.show();
|
||||
this.$body = this.dialog.body;
|
||||
this.dialog.$wrapper.find('.modal-dialog').css("width", "750px");
|
||||
this.set_payment_primary_action();
|
||||
this.make_keyboard();
|
||||
},
|
||||
@@ -58,6 +57,13 @@ erpnext.payments = erpnext.stock.StockController.extend({
|
||||
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)
|
||||
@@ -91,8 +97,10 @@ erpnext.payments = erpnext.stock.StockController.extend({
|
||||
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()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -125,12 +133,16 @@ erpnext.payments = erpnext.stock.StockController.extend({
|
||||
|
||||
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(){
|
||||
@@ -141,6 +153,7 @@ erpnext.payments = erpnext.stock.StockController.extend({
|
||||
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();
|
||||
})
|
||||
},
|
||||
|
||||
@@ -1,40 +1,36 @@
|
||||
<div class="pos_payment row">
|
||||
<div class="col-sm-6">
|
||||
<div class="row">
|
||||
<div class="col-xs-6 text-center">
|
||||
<p class="amount-label"> Total <h3>{%= format_currency(grand_total, currency) %} </h3></p>
|
||||
</div>
|
||||
<div class="col-xs-6 text-center">
|
||||
<p class="amount-label"> Paid <h3 class="paid_amount">{%= format_currency(paid_amount, currency) %}</h3></p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="multimode-payments">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="row">
|
||||
<div class="col-xs-6 text-center">
|
||||
<p class="amount-label"> Outstanding <h3 class="outstanding_amount">{%= format_currency(outstanding_amount, currency) %} </h3></p>
|
||||
</div>
|
||||
<div class="col-xs-6 text-center">
|
||||
<p class="amount-label"> Change <h3 class="change_amount">{%= format_currency(change_amount, currency) %}</h3></p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="payment-toolbar">
|
||||
{% for(var i=0; i<3; i++) { %}
|
||||
<div class="row">
|
||||
{% for(var j=i*3; j<(i+1)*3; j++) { %}
|
||||
<button type="button" class="btn btn-default pos-keyboard-key">{{j+1}}</button>
|
||||
{% } %}
|
||||
</div>
|
||||
{% } %}
|
||||
<div class="row amount-row">
|
||||
<div class="col-xs-6 col-sm-3 text-center">
|
||||
<p class="amount-label"> Total <h3>{%= format_currency(grand_total, currency) %} </h3></p>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 text-center">
|
||||
<p class="amount-label"> Paid <h3 class="paid_amount">{%= format_currency(paid_amount, currency) %}</h3></p>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 text-center">
|
||||
<p class="amount-label"> Outstanding <h3 class="outstanding_amount">{%= format_currency(outstanding_amount, currency) %} </h3></p>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 text-center">
|
||||
<p class="amount-label"> Change <h3 class="change_amount">{%= format_currency(change_amount, currency) %}</h3>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 multimode-payments">
|
||||
</div>
|
||||
<div class="col-sm-6 payment-toolbar">
|
||||
{% for(var i=0; i<3; i++) { %}
|
||||
<div class="row">
|
||||
<button type="button" class="btn btn-default delete-btn">Del</button>
|
||||
<button type="button" class="btn btn-default pos-keyboard-key">0</button>
|
||||
<button type="button" class="btn btn-default pos-keyboard-key">.</button>
|
||||
{% for(var j=i*3; j<(i+1)*3; j++) { %}
|
||||
<button type="button" class="btn btn-default pos-keyboard-key">{{j+1}}</button>
|
||||
{% } %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% } %}
|
||||
<div class="row">
|
||||
<button type="button" class="btn btn-default delete-btn">Del</button>
|
||||
<button type="button" class="btn btn-default pos-keyboard-key">0</button>
|
||||
<button type="button" class="btn btn-default pos-keyboard-key">.</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -33,13 +33,13 @@ $.extend(erpnext, {
|
||||
|
||||
setup_serial_no: function() {
|
||||
var grid_row = cur_frm.open_grid_row();
|
||||
if(!grid_row || !grid_row.fields_dict.serial_no ||
|
||||
grid_row.fields_dict.serial_no.get_status()!=="Write") return;
|
||||
if(!grid_row || !grid_row.grid_form.fields_dict.serial_no ||
|
||||
grid_row.grid_form.fields_dict.serial_no.get_status()!=="Write") return;
|
||||
|
||||
var $btn = $('<button class="btn btn-sm btn-default">'+__("Add Serial No")+'</button>')
|
||||
.appendTo($("<div>")
|
||||
.css({"margin-bottom": "10px", "margin-top": "10px"})
|
||||
.appendTo(grid_row.fields_dict.serial_no.$wrapper));
|
||||
.appendTo(grid_row.grid_form.fields_dict.serial_no.$wrapper));
|
||||
|
||||
$btn.on("click", function() {
|
||||
var d = new frappe.ui.Dialog({
|
||||
@@ -69,7 +69,7 @@ $.extend(erpnext, {
|
||||
var serial_no = d.get_value("serial_no");
|
||||
if(serial_no) {
|
||||
var val = (grid_row.doc.serial_no || "").split("\n").concat([serial_no]).join("\n");
|
||||
grid_row.fields_dict.serial_no.set_model_value(val.trim());
|
||||
grid_row.grid_form.fields_dict.serial_no.set_model_value(val.trim());
|
||||
}
|
||||
d.hide();
|
||||
return false;
|
||||
@@ -179,6 +179,22 @@ erpnext.utils.map_current_doc = function(opts) {
|
||||
}
|
||||
}
|
||||
|
||||
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()) {
|
||||
@@ -190,4 +206,4 @@ $(document).on('app_ready', function() {
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -45,6 +45,7 @@ erpnext.utils.get_party_details = function(frm, method, args, callback) {
|
||||
frm.set_value(r.message);
|
||||
frm.updating_party_details = false;
|
||||
if(callback) callback();
|
||||
frm.refresh();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -162,7 +162,10 @@
|
||||
}
|
||||
|
||||
.payment-toolbar {
|
||||
margin-left: 35px;
|
||||
.row {
|
||||
width: 323px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
|
||||
.payment-mode {
|
||||
@@ -197,6 +200,41 @@
|
||||
border-color: #e8e8e8;
|
||||
}
|
||||
|
||||
.multimode-payments {
|
||||
padding-left: 30px;
|
||||
}
|
||||
|
||||
.payment-toolbar {
|
||||
padding-right: 30px;
|
||||
}
|
||||
|
||||
body[data-route="pos"] .modal-dialog {
|
||||
width: 750px;
|
||||
|
||||
@media (max-width: @screen-xs) {
|
||||
width: auto;
|
||||
|
||||
.modal-content {
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: @screen-xs) {
|
||||
.amount-row h3 {
|
||||
font-size: 15px;
|
||||
}
|
||||
.pos-keyboard-key, .delete-btn {
|
||||
height: 50px;
|
||||
}
|
||||
.multimode-payments {
|
||||
padding-left: 15px;
|
||||
}
|
||||
.payment-toolbar {
|
||||
padding-right: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
.amount-label {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
8
erpnext/schools/doctype/academic_term/academic_term.js
Normal file
8
erpnext/schools/doctype/academic_term/academic_term.js
Normal file
@@ -0,0 +1,8 @@
|
||||
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
|
||||
// For license information, please see license.txt
|
||||
|
||||
frappe.ui.form.on('Academic Term', {
|
||||
refresh: function(frm) {
|
||||
|
||||
}
|
||||
});
|
||||
@@ -3,11 +3,13 @@
|
||||
"allow_import": 1,
|
||||
"allow_rename": 1,
|
||||
"autoname": "field:term_name",
|
||||
"beta": 0,
|
||||
"creation": "2015-09-08 17:19:19.158228",
|
||||
"custom": 0,
|
||||
"docstatus": 0,
|
||||
"doctype": "DocType",
|
||||
"document_type": "Setup",
|
||||
"editable_grid": 0,
|
||||
"fields": [
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
@@ -17,13 +19,16 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Term 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,
|
||||
@@ -34,12 +39,15 @@
|
||||
],
|
||||
"hide_heading": 0,
|
||||
"hide_toolbar": 0,
|
||||
"idx": 0,
|
||||
"image_view": 0,
|
||||
"in_create": 0,
|
||||
"in_dialog": 0,
|
||||
"is_submittable": 0,
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"modified": "2016-07-18 10:30:50.243271",
|
||||
"max_attachments": 0,
|
||||
"modified": "2016-07-25 05:24:23.032319",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Schools",
|
||||
"name": "Academic Term",
|
||||
@@ -65,30 +73,12 @@
|
||||
"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": "Administrator",
|
||||
"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"
|
||||
"sort_order": "DESC",
|
||||
"track_seen": 0
|
||||
}
|
||||
@@ -3,11 +3,13 @@
|
||||
"allow_import": 1,
|
||||
"allow_rename": 0,
|
||||
"autoname": "field:academic_year_name",
|
||||
"beta": 0,
|
||||
"creation": "2015-09-07 12:49:51.303026",
|
||||
"custom": 0,
|
||||
"docstatus": 0,
|
||||
"doctype": "DocType",
|
||||
"document_type": "",
|
||||
"editable_grid": 0,
|
||||
"fields": [
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
@@ -17,13 +19,16 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Academic Year 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,
|
||||
@@ -39,13 +44,16 @@
|
||||
"fieldtype": "Date",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 1,
|
||||
"label": "Year Start 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,
|
||||
@@ -61,13 +69,16 @@
|
||||
"fieldtype": "Date",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 1,
|
||||
"label": "Year End 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,
|
||||
@@ -78,12 +89,15 @@
|
||||
],
|
||||
"hide_heading": 0,
|
||||
"hide_toolbar": 0,
|
||||
"idx": 0,
|
||||
"image_view": 0,
|
||||
"in_create": 0,
|
||||
"in_dialog": 0,
|
||||
"is_submittable": 0,
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"modified": "2016-07-18 10:30:50.243271",
|
||||
"max_attachments": 0,
|
||||
"modified": "2016-07-25 05:24:23.090530",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Schools",
|
||||
"name": "Academic Year",
|
||||
@@ -109,31 +123,13 @@
|
||||
"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": "Administrator",
|
||||
"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": ""
|
||||
"title_field": "",
|
||||
"track_seen": 0
|
||||
}
|
||||
@@ -197,33 +197,13 @@
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"menu_index": 0,
|
||||
"modified": "2016-07-22 06:02:14.586594",
|
||||
"modified": "2016-07-25 01:33:48.647068",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Schools",
|
||||
"name": "Course",
|
||||
"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": "Administrator",
|
||||
"set_user_permissions": 0,
|
||||
"share": 1,
|
||||
"submit": 0,
|
||||
"write": 1
|
||||
},
|
||||
{
|
||||
"amend": 0,
|
||||
"apply_user_permissions": 0,
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
[
|
||||
{
|
||||
"course_name": "_Test Course",
|
||||
"course_code": "TC100"
|
||||
"course_code": "TC100",
|
||||
"course_abbreviation": "TC"
|
||||
},
|
||||
{
|
||||
"course_name": "_Test Course 1",
|
||||
"course_code": "TC101"
|
||||
"course_code": "TC101",
|
||||
"course_abbreviation": "TC1"
|
||||
},
|
||||
{
|
||||
"course_name": "_Test Course 2",
|
||||
"course_code": "TC102"
|
||||
"course_code": "TC102",
|
||||
"course_abbreviation": "TC2"
|
||||
}
|
||||
]
|
||||
@@ -3,11 +3,13 @@
|
||||
"allow_import": 1,
|
||||
"allow_rename": 0,
|
||||
"autoname": "SH.####",
|
||||
"beta": 0,
|
||||
"creation": "2015-09-09 16:34:04.960369",
|
||||
"custom": 0,
|
||||
"docstatus": 0,
|
||||
"doctype": "DocType",
|
||||
"document_type": "Document",
|
||||
"editable_grid": 0,
|
||||
"fields": [
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
@@ -17,6 +19,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Student Group",
|
||||
@@ -26,6 +29,7 @@
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@@ -41,6 +45,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Instructor",
|
||||
@@ -50,6 +55,7 @@
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@@ -65,6 +71,7 @@
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"length": 0,
|
||||
@@ -72,6 +79,7 @@
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -87,6 +95,7 @@
|
||||
"fieldtype": "Read Only",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Course",
|
||||
@@ -96,6 +105,7 @@
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@@ -111,6 +121,7 @@
|
||||
"fieldtype": "Read Only",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Instructor Name",
|
||||
@@ -120,6 +131,7 @@
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -135,6 +147,7 @@
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"length": 0,
|
||||
@@ -142,6 +155,7 @@
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -158,6 +172,7 @@
|
||||
"fieldtype": "Date",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Schedule Date",
|
||||
@@ -166,6 +181,7 @@
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -181,6 +197,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Room",
|
||||
@@ -190,6 +207,7 @@
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@@ -205,6 +223,7 @@
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"length": 0,
|
||||
@@ -212,6 +231,7 @@
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -227,6 +247,7 @@
|
||||
"fieldtype": "Time",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 1,
|
||||
"label": "From Time",
|
||||
@@ -235,6 +256,7 @@
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@@ -250,6 +272,7 @@
|
||||
"fieldtype": "Time",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 1,
|
||||
"label": "To Time",
|
||||
@@ -258,6 +281,7 @@
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@@ -273,6 +297,7 @@
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Attendance",
|
||||
@@ -281,6 +306,7 @@
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -296,6 +322,7 @@
|
||||
"fieldtype": "HTML",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Students HTML",
|
||||
@@ -304,6 +331,7 @@
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -319,6 +347,7 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Title",
|
||||
@@ -327,6 +356,7 @@
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -338,6 +368,7 @@
|
||||
"hide_heading": 0,
|
||||
"hide_toolbar": 0,
|
||||
"idx": 0,
|
||||
"image_view": 0,
|
||||
"in_create": 0,
|
||||
"in_dialog": 0,
|
||||
"is_submittable": 0,
|
||||
@@ -345,33 +376,13 @@
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"menu_index": 0,
|
||||
"modified": "2016-07-18 10:30:50.243271",
|
||||
"modified": "2016-07-25 01:25:04.593769",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Schools",
|
||||
"name": "Course Schedule",
|
||||
"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": "Administrator",
|
||||
"set_user_permissions": 0,
|
||||
"share": 1,
|
||||
"submit": 0,
|
||||
"write": 1
|
||||
},
|
||||
{
|
||||
"amend": 0,
|
||||
"apply_user_permissions": 0,
|
||||
@@ -393,10 +404,11 @@
|
||||
"write": 1
|
||||
}
|
||||
],
|
||||
"quick_entry": 0,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"sort_field": "schedule_date",
|
||||
"sort_order": "DESC",
|
||||
"title_field": "title",
|
||||
"version": 0
|
||||
"track_seen": 0
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user