Compare commits
71 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
241139001e | ||
|
|
a10cd10640 | ||
|
|
44ef8654f9 | ||
|
|
71862f9024 | ||
|
|
a5e3c3a79f | ||
|
|
cc97ec9202 | ||
|
|
022ab63a0f | ||
|
|
cdf8016bcd | ||
|
|
18c8cf965f | ||
|
|
8e3da7f70e | ||
|
|
887285ed1a | ||
|
|
aeb0026354 | ||
|
|
1ce48e7032 | ||
|
|
99e31f97b8 | ||
|
|
4a864c1eea | ||
|
|
3e998bccba | ||
|
|
40016372c6 | ||
|
|
af22f84809 | ||
|
|
3894a5ed94 | ||
|
|
045b2877b7 | ||
|
|
148b62a206 | ||
|
|
d2cef208fe | ||
|
|
4c617d6496 | ||
|
|
f985ae1379 | ||
|
|
98aa544f25 | ||
|
|
6ad1082433 | ||
|
|
db781e607a | ||
|
|
521606e433 | ||
|
|
acc8995c48 | ||
|
|
f688af3809 | ||
|
|
9f2a27c99c | ||
|
|
6058dcc2ce | ||
|
|
35fc45eff9 | ||
|
|
57cc924d29 | ||
|
|
adbbb0b0f3 | ||
|
|
40ef7e7039 | ||
|
|
b1616a0cb3 | ||
|
|
3f0dfd720f | ||
|
|
e850655c1d | ||
|
|
5647bf081a | ||
|
|
56cb0aa9c1 | ||
|
|
7677ff00a2 | ||
|
|
62fd4007b0 | ||
|
|
75f3f81a9b | ||
|
|
870ce3cfea | ||
|
|
0ad2cc3def | ||
|
|
00f6c2d61d | ||
|
|
38008f8daa | ||
|
|
afb63af3b6 | ||
|
|
816ce33daf | ||
|
|
99748dbacf | ||
|
|
31287b00a6 | ||
|
|
5ec9f6930b | ||
|
|
40611e4f69 | ||
|
|
dd0bdc7fa6 | ||
|
|
bbce7b7e5d | ||
|
|
c799a22d55 | ||
|
|
b445633e56 | ||
|
|
6500af9aa2 | ||
|
|
8f2500083c | ||
|
|
cd3dbcb2ef | ||
|
|
bafcd7418a | ||
|
|
085b4842a1 | ||
|
|
49a7bde6e2 | ||
|
|
07ab4622e8 | ||
|
|
47caf51efe | ||
|
|
7862eb444f | ||
|
|
1f99bea6ce | ||
|
|
a5eee4629f | ||
|
|
5c5a853894 | ||
|
|
b06f155ceb |
@@ -4,7 +4,7 @@ import inspect
|
||||
import frappe
|
||||
from erpnext.hooks import regional_overrides
|
||||
|
||||
__version__ = '9.2.2'
|
||||
__version__ = '9.2.9'
|
||||
|
||||
def get_default_company(user=None):
|
||||
'''Get default company for user'''
|
||||
|
||||
@@ -851,7 +851,7 @@
|
||||
"4457-Taxes sur le chiffre d'affaires collect\u00e9es par l'entreprise": {
|
||||
"44571-TVA collect\u00e9e": {
|
||||
"account_type": "Tax",
|
||||
"tax_rate": 20.0
|
||||
"is_group": 1
|
||||
},
|
||||
"44578-Taxes assimil\u00e9es \u00e0 la TVA": {}
|
||||
},
|
||||
|
||||
@@ -648,13 +648,13 @@ frappe.ui.form.on('Payment Entry', {
|
||||
|
||||
set_difference_amount: function(frm) {
|
||||
var unallocated_amount = 0;
|
||||
var total_deductions = frappe.utils.sum($.map(frm.doc.deductions || [],
|
||||
function(d) { return flt(d.amount) }));
|
||||
|
||||
if(frm.doc.party) {
|
||||
var party_amount = frm.doc.payment_type=="Receive" ?
|
||||
frm.doc.paid_amount : frm.doc.received_amount;
|
||||
|
||||
var total_deductions = frappe.utils.sum($.map(frm.doc.deductions || [],
|
||||
function(d) { return flt(d.amount) }));
|
||||
|
||||
if(frm.doc.total_allocated_amount < party_amount) {
|
||||
if(frm.doc.payment_type == "Receive") {
|
||||
unallocated_amount = party_amount - (frm.doc.total_allocated_amount - total_deductions);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
"autoname": "hash",
|
||||
"autoname": "field:pos_profile_name",
|
||||
"beta": 0,
|
||||
"creation": "2013-05-24 12:15:51",
|
||||
"custom": 0,
|
||||
@@ -11,6 +11,96 @@
|
||||
"doctype": "DocType",
|
||||
"editable_grid": 0,
|
||||
"fields": [
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"default": "0",
|
||||
"fieldname": "disabled",
|
||||
"fieldtype": "Check",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Disabled",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "section_break_2",
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "pos_profile_name",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "POS Profile Name",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
@@ -112,9 +202,8 @@
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"depends_on": "update_stock",
|
||||
"fieldname": "warehouse",
|
||||
"fieldtype": "Link",
|
||||
"fieldname": "ignore_pricing_rule",
|
||||
"fieldtype": "Check",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
@@ -122,13 +211,11 @@
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Warehouse",
|
||||
"label": "Ignore Pricing Rule",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "warehouse",
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Warehouse",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
@@ -145,8 +232,8 @@
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "campaign",
|
||||
"fieldtype": "Link",
|
||||
"fieldname": "allow_delete",
|
||||
"fieldtype": "Check",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
@@ -154,10 +241,39 @@
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Campaign",
|
||||
"label": "Allow Delete",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "allow_user_to_edit_rate",
|
||||
"fieldtype": "Check",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Allow user to edit Rate",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Campaign",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
@@ -300,7 +416,8 @@
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "currency",
|
||||
"depends_on": "update_stock",
|
||||
"fieldname": "warehouse",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
@@ -309,19 +426,19 @@
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Currency",
|
||||
"label": "Warehouse",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "currency",
|
||||
"oldfieldtype": "Select",
|
||||
"options": "Currency",
|
||||
"oldfieldname": "warehouse",
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Warehouse",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
@@ -332,8 +449,8 @@
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "ignore_pricing_rule",
|
||||
"fieldtype": "Check",
|
||||
"fieldname": "campaign",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
@@ -341,69 +458,10 @@
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Ignore Pricing Rule",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "allow_delete",
|
||||
"fieldtype": "Check",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Allow Delete",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "allow_user_to_edit_rate",
|
||||
"fieldtype": "Check",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Allow user to edit Rate",
|
||||
"label": "Campaign",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Campaign",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
@@ -422,6 +480,7 @@
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"depends_on": "",
|
||||
"fieldname": "section_break_11",
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
@@ -482,6 +541,7 @@
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"depends_on": "",
|
||||
"fieldname": "section_break_14",
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
@@ -602,6 +662,7 @@
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"depends_on": "",
|
||||
"fieldname": "section_break_16",
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
@@ -882,6 +943,7 @@
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"depends_on": "",
|
||||
"fieldname": "offline_pos_section",
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
@@ -1037,6 +1099,7 @@
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"depends_on": "",
|
||||
"fieldname": "section_break_19",
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
@@ -1046,6 +1109,7 @@
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Accounting",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
@@ -1060,6 +1124,38 @@
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "currency",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Currency",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "currency",
|
||||
"oldfieldtype": "Select",
|
||||
"options": "Currency",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
@@ -1154,38 +1250,6 @@
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "taxes_and_charges",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Taxes and Charges",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "charge",
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Sales Taxes and Charges Template",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
@@ -1309,6 +1373,38 @@
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "taxes_and_charges",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Taxes and Charges",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "charge",
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Sales Taxes and Charges Template",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
}
|
||||
],
|
||||
"has_web_view": 0,
|
||||
@@ -1322,7 +1418,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-09-01 15:55:14.890452",
|
||||
"modified": "2017-10-27 06:45:32.957674",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "POS Profile",
|
||||
|
||||
@@ -41,6 +41,7 @@ def make_pos_profile():
|
||||
"expense_account": "_Test Account Cost for Goods Sold - _TC",
|
||||
"income_account": "Sales - _TC",
|
||||
"name": "_Test POS Profile",
|
||||
"pos_profile_name": "_Test POS Profile",
|
||||
"naming_series": "_T-POS Profile-",
|
||||
"selling_price_list": "_Test Price List",
|
||||
"territory": "_Test Territory",
|
||||
|
||||
@@ -92,6 +92,7 @@ def update_pos_profile_data(doc, pos_profile, company_data):
|
||||
doc.customer_group = pos_profile.get('customer_group') or get_root('Customer Group')
|
||||
doc.territory = pos_profile.get('territory') or get_root('Territory')
|
||||
doc.terms = frappe.db.get_value('Terms and Conditions', pos_profile.get('tc_name'), 'terms') or doc.terms or ''
|
||||
doc.offline_pos_name = ''
|
||||
|
||||
def get_root(table):
|
||||
root = frappe.db.sql(""" select name from `tab%(table)s` having
|
||||
|
||||
@@ -70,7 +70,6 @@ class SalesInvoice(SellingController):
|
||||
self.clear_unallocated_advances("Sales Invoice Advance", "advances")
|
||||
self.add_remarks()
|
||||
self.validate_write_off_account()
|
||||
self.validate_duplicate_offline_pos_entry()
|
||||
self.validate_account_for_change_amount()
|
||||
self.validate_fixed_asset()
|
||||
self.set_income_account_for_fixed_assets()
|
||||
@@ -305,6 +304,7 @@ class SalesInvoice(SellingController):
|
||||
self.account_for_change_amount = frappe.db.get_value('Company', self.company, 'default_cash_account')
|
||||
|
||||
if pos:
|
||||
self.pos_profile = pos.name
|
||||
if not for_validate and not self.customer:
|
||||
self.customer = pos.customer
|
||||
self.mode_of_payment = pos.mode_of_payment
|
||||
@@ -463,12 +463,6 @@ class SalesInvoice(SellingController):
|
||||
if flt(self.write_off_amount) and not self.write_off_account:
|
||||
msgprint(_("Please enter Write Off Account"), raise_exception=1)
|
||||
|
||||
def validate_duplicate_offline_pos_entry(self):
|
||||
if self.is_pos and self.offline_pos_name \
|
||||
and frappe.db.get_value('Sales Invoice',
|
||||
{'offline_pos_name': self.offline_pos_name, 'docstatus': 1}):
|
||||
frappe.throw(_("Duplicate offline pos sales invoice {0}").format(self.offline_pos_name))
|
||||
|
||||
def validate_account_for_change_amount(self):
|
||||
if flt(self.change_amount) and not self.account_for_change_amount:
|
||||
msgprint(_("Please enter Account for Change Amount"), raise_exception=1)
|
||||
|
||||
@@ -179,41 +179,12 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
||||
}
|
||||
},
|
||||
|
||||
dialog_actions: function () {
|
||||
var me = this;
|
||||
|
||||
$(this.list_body).find('.list-select-all').click(function () {
|
||||
me.removed_items = [];
|
||||
$(me.list_body).find('.list-delete').prop("checked", $(this).is(":checked"))
|
||||
if ($(this).is(":checked")) {
|
||||
$.each(me.si_docs, function (index, data) {
|
||||
for (key in data) {
|
||||
me.removed_items.push(key)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
me.toggle_delete_button();
|
||||
})
|
||||
|
||||
$(this.list_body).find('.list-delete').click(function () {
|
||||
me.name = $(this).parent().parent().attr('invoice-name');
|
||||
if ($(this).is(":checked")) {
|
||||
me.removed_items.push(me.name);
|
||||
} else {
|
||||
me.removed_items.pop(me.name)
|
||||
}
|
||||
|
||||
me.toggle_delete_button();
|
||||
})
|
||||
},
|
||||
|
||||
edit_record: function () {
|
||||
var me = this;
|
||||
|
||||
doc_data = this.get_invoice_doc(this.si_docs);
|
||||
if (doc_data) {
|
||||
this.frm.doc = doc_data[0][this.name];
|
||||
this.frm.doc = doc_data[0][this.frm.doc.offline_pos_name];
|
||||
this.set_missing_values();
|
||||
this.refresh(false);
|
||||
this.toggle_input_field();
|
||||
@@ -226,16 +197,15 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
||||
this.validate_list()
|
||||
this.remove_doc_from_localstorage()
|
||||
this.update_localstorage();
|
||||
// this.dialog_actions();
|
||||
this.toggle_delete_button();
|
||||
},
|
||||
|
||||
validate_list: function() {
|
||||
var me = this;
|
||||
this.si_docs = this.get_submitted_invoice()
|
||||
$.each(this.removed_items, function(index, name){
|
||||
$.each(this.removed_items, function(index, pos_name){
|
||||
$.each(me.si_docs, function(key, data){
|
||||
if(me.si_docs[key][name] && me.si_docs[key][name].offline_pos_name == name ){
|
||||
if(me.si_docs[key][pos_name] && me.si_docs[key][pos_name].offline_pos_name == pos_name ){
|
||||
frappe.throw(__("Submitted orders can not be deleted"))
|
||||
}
|
||||
})
|
||||
@@ -294,7 +264,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
||||
|
||||
return $.grep(this.si_docs, function (data) {
|
||||
for (key in data) {
|
||||
return key == me.name
|
||||
return key == me.frm.doc.offline_pos_name;
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -348,7 +318,6 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
||||
create_new: function () {
|
||||
var me = this;
|
||||
this.frm = {}
|
||||
this.name = null;
|
||||
this.load_data(true);
|
||||
this.setup();
|
||||
this.set_default_customer()
|
||||
@@ -362,6 +331,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
||||
|
||||
if (load_doc) {
|
||||
this.frm.doc = JSON.parse(localStorage.getItem('doc'));
|
||||
this.frm.doc.offline_pos_name = null;
|
||||
}
|
||||
|
||||
$.each(this.meta, function (i, data) {
|
||||
@@ -629,6 +599,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
||||
// this.list_customers.empty();
|
||||
this.si_docs = this.get_doc_from_localstorage();
|
||||
if (!this.si_docs.length) {
|
||||
this.list_customers.find('.list-customers-table').html("");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -655,7 +626,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
||||
me.list_customers_btn.toggleClass("view_customer");
|
||||
me.pos_bill.show();
|
||||
me.list_customers_btn.show();
|
||||
me.name = $(this).parents().attr('invoice-name')
|
||||
me.frm.doc.offline_pos_name = $(this).parents().attr('invoice-name')
|
||||
me.edit_record();
|
||||
})
|
||||
|
||||
@@ -675,11 +646,11 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
||||
});
|
||||
|
||||
$(this.wrapper).find('.list-delete').click(function () {
|
||||
me.name = $(this).parent().parent().attr('invoice-name');
|
||||
me.frm.doc.offline_pos_name = $(this).parent().parent().attr('invoice-name');
|
||||
if ($(this).is(":checked")) {
|
||||
me.removed_items.push(me.name);
|
||||
me.removed_items.push(me.frm.doc.offline_pos_name);
|
||||
} else {
|
||||
me.removed_items.pop(me.name)
|
||||
me.removed_items.pop(me.frm.doc.offline_pos_name)
|
||||
}
|
||||
|
||||
me.toggle_delete_button();
|
||||
@@ -1435,7 +1406,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
||||
},
|
||||
|
||||
update_paid_amount_status: function (update_paid_amount) {
|
||||
if (this.name) {
|
||||
if (this.frm.doc.offline_pos_name) {
|
||||
update_paid_amount = update_paid_amount ? false : true;
|
||||
}
|
||||
|
||||
@@ -1643,18 +1614,17 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
||||
|
||||
create_invoice: function () {
|
||||
var me = this;
|
||||
var invoice_data = {}
|
||||
var invoice_data = {};
|
||||
this.si_docs = this.get_doc_from_localstorage();
|
||||
if (this.name) {
|
||||
this.update_invoice()
|
||||
if (this.frm.doc.offline_pos_name) {
|
||||
this.update_invoice();
|
||||
} else {
|
||||
this.name = $.now();
|
||||
this.frm.doc.offline_pos_name = this.name;
|
||||
this.frm.doc.offline_pos_name = $.now();
|
||||
this.frm.doc.posting_date = frappe.datetime.get_today();
|
||||
this.frm.doc.posting_time = frappe.datetime.now_time();
|
||||
this.frm.doc.pos_profile = this.pos_profile_data['name'];
|
||||
invoice_data[this.name] = this.frm.doc
|
||||
this.si_docs.push(invoice_data)
|
||||
invoice_data[this.frm.doc.offline_pos_name] = this.frm.doc;
|
||||
this.si_docs.push(invoice_data);
|
||||
this.update_localstorage();
|
||||
this.set_primary_action();
|
||||
}
|
||||
@@ -1666,12 +1636,12 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
||||
this.si_docs = this.get_doc_from_localstorage();
|
||||
$.each(this.si_docs, function (index, data) {
|
||||
for (var key in data) {
|
||||
if (key == me.name) {
|
||||
if (key == me.frm.doc.offline_pos_name) {
|
||||
me.si_docs[index][key] = me.frm.doc;
|
||||
me.update_localstorage();
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
|
||||
update_localstorage: function () {
|
||||
@@ -1710,6 +1680,8 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
||||
freeze_screen = this.freeze_screen || false;
|
||||
|
||||
if ((this.si_docs.length || this.email_queue_list || this.customers_list) && !this.freeze) {
|
||||
this.freeze = true;
|
||||
|
||||
frappe.call({
|
||||
method: "erpnext.accounts.doctype.sales_invoice.pos.make_invoice",
|
||||
freeze: freeze_screen,
|
||||
@@ -1720,17 +1692,19 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
||||
},
|
||||
callback: function (r) {
|
||||
if (r.message) {
|
||||
me.freeze = false;
|
||||
me.customers = r.message.synced_customers_list;
|
||||
me.address = r.message.synced_address;
|
||||
me.contacts = r.message.synced_contacts;
|
||||
me.removed_items = r.message.invoice;
|
||||
me.removed_email = r.message.email_queue
|
||||
me.removed_customers = r.message.customers
|
||||
me.removed_email = r.message.email_queue;
|
||||
me.removed_customers = r.message.customers;
|
||||
me.remove_doc_from_localstorage();
|
||||
me.remove_email_queue_from_localstorage();
|
||||
me.remove_customer_from_localstorage();
|
||||
me.prepare_customer_mapper()
|
||||
me.autocomplete_customers()
|
||||
me.prepare_customer_mapper();
|
||||
me.autocomplete_customers();
|
||||
me.render_list_customers();
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -6,6 +6,7 @@ QUnit.test("test:Sales Invoice", function(assert) {
|
||||
() => {
|
||||
return frappe.tests.make("POS Profile", [
|
||||
{naming_series: "SINV"},
|
||||
{pos_profile_name: "_Test POS Profile"},
|
||||
{country: "India"},
|
||||
{currency: "INR"},
|
||||
{write_off_account: "Write Off - FT"},
|
||||
|
||||
@@ -204,8 +204,8 @@ def bom(doctype, txt, searchfield, start, page_len, filters):
|
||||
{
|
||||
'txt': "%%%s%%" % frappe.db.escape(txt),
|
||||
'_txt': txt.replace("%", ""),
|
||||
'start': start,
|
||||
'page_len': page_len
|
||||
'start': start or 0,
|
||||
'page_len': page_len or 20
|
||||
})
|
||||
|
||||
def get_project_name(doctype, txt, searchfield, start, page_len, filters):
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
introduction
|
||||
accounts
|
||||
projects
|
||||
schools
|
||||
|
||||
0
erpnext/docs/user/manual/es/projects/__init__.py
Normal file
0
erpnext/docs/user/manual/es/projects/__init__.py
Normal file
6
erpnext/docs/user/manual/es/projects/activity-cost.md
Normal file
6
erpnext/docs/user/manual/es/projects/activity-cost.md
Normal file
@@ -0,0 +1,6 @@
|
||||
# Costo de Actividad
|
||||
|
||||
El costo de la actividad registra la tasa de facturación por hora y la tasa de costos de un empleado en comparación con un tipo de actividad.
|
||||
El sistema hace uso de esta tasa mientras hace registros de tiempo. Se usa para Costeo de proyectos.
|
||||
|
||||
<img class="screenshot" alt="Activity Cost" src="/docs/assets/img/project/activity_cost.png">
|
||||
15
erpnext/docs/user/manual/es/projects/activity-type.md
Normal file
15
erpnext/docs/user/manual/es/projects/activity-type.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# Tipo de Actividad
|
||||
|
||||
Los tipos de actividad son la lista de los diferentes tipos de actividades sobre las que se hacen registro de tiempo.
|
||||
|
||||
<img class="screenshot" alt="Activity Type" src="/docs/assets/img/project/activity_type.png">
|
||||
|
||||
Por defecto, los siguientes tipos de actividades son creados.
|
||||
|
||||
* Planning
|
||||
* Research
|
||||
* Proposal Writing
|
||||
* Execution
|
||||
* Communication
|
||||
|
||||
{next}
|
||||
3
erpnext/docs/user/manual/es/projects/articles/index.md
Normal file
3
erpnext/docs/user/manual/es/projects/articles/index.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Artículos
|
||||
|
||||
{index}
|
||||
1
erpnext/docs/user/manual/es/projects/articles/index.txt
Normal file
1
erpnext/docs/user/manual/es/projects/articles/index.txt
Normal file
@@ -0,0 +1 @@
|
||||
project-costing
|
||||
@@ -0,0 +1,40 @@
|
||||
# Costeo de proyectos
|
||||
|
||||
Cada proyecto tiene multiples tareas asociadas a el. Para hacer el seguimiento del costo actual de un proyecto, primeramente en términos de servicios, el usuario
|
||||
tiene que crear un registro de tiempo basado en el tiempo que invirtió en una tarea del proyecto. Siguiendo los pasos de como puedes hacer el seguimiento del costo actual de un servicio usando el proyecto.
|
||||
|
||||
#### Tipo de actividad
|
||||
|
||||
Tipo de actividad es un maestro de los servicios ofrecidos por su personal. Puedes agregar un nuevo Tipo de Actividad desde:
|
||||
|
||||
`Project > Activity Type > New`
|
||||
|
||||
#### Costo de actividad
|
||||
|
||||
Costo de actividad es un maestro donde puedes hacer el seguimiento de los montos de facturación y costo de cada empleado, y por cada tipo de Tipo de Actividad.
|
||||
|
||||
<img alt="Activity Cost" class="screenshot" src="/docs/assets/img/articles/Screen Shot 2015-06-11 at 4.57.01 pm.png">
|
||||
|
||||
#### Registro de Tiempo
|
||||
|
||||
Basados en el tiempo actual invertido en una Tarea del Proyecto, El empleado va a crear un registro de tiempo.
|
||||
|
||||
<img alt="Time Log" class="screenshot" src="/docs/assets/img/articles/Screen Shot 2015-06-11 at 4.59.49 pm.png">
|
||||
|
||||
Al momento de seleccionar el Tipo de Actividad en el Registro de tiempo, el monto de Facturación y Costo del empleado va a ser traído de su respectivo registro en el master de Costo de Actividad.
|
||||
|
||||
<img alt="Time Log Costing" class="screenshot" src="/docs/assets/img/articles/Screen Shot 2015-06-11 at 5.00.06 pm.png">
|
||||
|
||||
Multiplicando esos montos con el total de número de horas en el registro de tiempo, nos da el monto de costos y Facturación para el registro de tiempo específico.
|
||||
|
||||
#### Costeo en Proyectos y Tareas
|
||||
|
||||
Basados en el total de registros de tiempos creados por una tarea en específico, su costo va a ser actualizado en el registro maestro de la tarea, o sea, en el detalle de la tarea.
|
||||
|
||||
<img alt="Costing in Task" class="screenshot" src="/docs/assets/img/articles/Screen Shot 2015-06-11 at 5.02.54 pm.png">
|
||||
|
||||
De la misma manera, el detalle del Proyecto va a actualizar su costo basado en el total de registros de tiempo a ese proyecto, y las tareas asociadas a ese proyecto.
|
||||
|
||||
<img alt="Costing in Project" class="screenshot" src="/docs/assets/img/articles/Screen Shot 2015-06-11 at 5.02.29 pm.png">
|
||||
|
||||
<!-- markdown -->
|
||||
15
erpnext/docs/user/manual/es/projects/index.md
Normal file
15
erpnext/docs/user/manual/es/projects/index.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# Proyectos
|
||||
|
||||
ERPNext le ayuda en la administración de su proyecto a traves de la creacion de tareas y
|
||||
poder asignarlas a diferentes personas.
|
||||
|
||||
Las compras y las ventas también se pueden rastrear en relación con los proyectos y
|
||||
esto puede ayudar a la empresa a controlar su presupuesto, entrega y rentabilidad para un proyecto.
|
||||
|
||||
Los proyectos pueden ser usados para manejar los proyectos internos, trabajos de manufacturación y
|
||||
planificación de servicios. Para los trabajos de servicios, los Time Sheets (hojas de tiempo) pueden ser creadas
|
||||
para facturar a los clientes, en caso que el proceso de facturación se haga basado en tiempo y dinero de tareas.
|
||||
|
||||
### Temas
|
||||
|
||||
{index}
|
||||
7
erpnext/docs/user/manual/es/projects/index.txt
Normal file
7
erpnext/docs/user/manual/es/projects/index.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
tasks
|
||||
project
|
||||
time-log-batch
|
||||
activity-type
|
||||
activity-cost
|
||||
articles
|
||||
timesheet
|
||||
110
erpnext/docs/user/manual/es/projects/project.md
Normal file
110
erpnext/docs/user/manual/es/projects/project.md
Normal file
@@ -0,0 +1,110 @@
|
||||
# Proyecto
|
||||
|
||||
El manejo de proyectos en ERPNext se hace a traves de tareas. Puedes crear un proyecto y asignar varias tareas al mismo.
|
||||
|
||||
<img class="screenshot" alt="Project" src="/docs/assets/img/project/project.png">
|
||||
|
||||
También puedes hacer el seguimiento del % completado del proyecto usando diferentes métodos.
|
||||
|
||||
1. Tareas Completadas
|
||||
2. Progreso de tareas
|
||||
3. Peso de tarea
|
||||
|
||||
<img class="screenshot" alt="Project" src="/docs/assets/img/project/project-percent-complete.png">
|
||||
|
||||
Algunos ejemplos de como el % completado es cálculado basado en tareas.
|
||||
|
||||
<img class="screenshot" alt="Project" src="/docs/assets/img/project/percent-complete-calc.png">
|
||||
|
||||
<img class="screenshot" alt="Project" src="/docs/assets/img/project/percent-complete-formula.png">
|
||||
|
||||
### Manejando tareas
|
||||
|
||||
Los proyecto pueden ser divididos en multiples tareas.
|
||||
Las tareas pueden ser creadas a traves del documento de Proyecto o pueden ser creadas via [Tarea](/docs/user/manual/en/projects/tasks.html)
|
||||
|
||||
<img class="screenshot" alt="Project" src="/docs/assets/img/project/project_task.png">
|
||||
|
||||
* Para ver las tareas creadas a un proyecto click en 'Tasks'
|
||||
|
||||
<img class="screenshot" alt="Project - View Task" src="/docs/assets/img/project/project_view_task.png">
|
||||
|
||||
<img class="screenshot" alt="Project - Task List" src="/docs/assets/img/project/project_task_list.png">
|
||||
|
||||
* También puedes ver las tareas desde la misma vista del proyecto.
|
||||
|
||||
<img class="screenshot" alt="Project - Task Grid" src="/docs/assets/img/project/project_task_grid.png">
|
||||
|
||||
* Para agregar peso a las tareas puedes seguir los pasos siguientes
|
||||
|
||||
<img class="screenshot" alt="Project - Task Grid" src="/docs/assets/img/project/tasks.png">
|
||||
<img class="screenshot" alt="Project - Task Grid" src="/docs/assets/img/project/task-weights.png">
|
||||
|
||||
|
||||
### Manejando tiempo
|
||||
|
||||
ERPNext usa [Time Log](/docs/user/manual/en/projects/time-log.html) para hacer el seguimiento del progreso de un Proyecto.
|
||||
Puedes crear registros de tiempo sobre cada Tarea.
|
||||
El tiempo actual de inicio y finalización junto con el costo deben ser actualizados basados en los Registros de Tiempo.
|
||||
|
||||
* Para ver los Registros de Tiempo realizados a un proyecto, dar click en 'Time Logs'
|
||||
|
||||
<img class="screenshot" alt="Project - View Time Log" src="/docs/assets/img/project/project_view_time_log.png">
|
||||
|
||||
<img class="screenshot" alt="Project - Time Log List" src="/docs/assets/img/project/project_time_log_list.png">
|
||||
|
||||
* Puedes agregar un registro de tiempo directamente y luego asociarlo con el proyecto.
|
||||
|
||||
<img class="screenshot" alt="Project - Link Time Log" src="/docs/assets/img/project/project_time_log_link.png">
|
||||
|
||||
### Gestión de gastos
|
||||
|
||||
Puede reservar la [Reclamación de gastos](/docs/user/manual/en/human-resources/expense-claim.html) contra una tarea de proyecto.
|
||||
El sistema actualizará el monto total de las reclamaciones de gastos en la sección de costos del proyecto.
|
||||
|
||||
* Para ver las reclamaciones de gastos realizadas en un proyecto, haga clic en 'Reclamaciones de gastos'
|
||||
|
||||
<img class="screenshot" alt="Project - View Expense Claim" src="/docs/assets/img/project/project_view_expense_claim.png">
|
||||
|
||||
* También puede crear un Reclamo de gastos directamente y vincularlo al Proyecto.
|
||||
|
||||
<img class="screenshot" alt="Project - Link Expense Claim" src="/docs/assets/img/project/project_expense_claim_link.png">
|
||||
|
||||
* El monto total de los Reclamos de gastos reservados contra un proyecto se muestra en 'Reclamo de gastos totales' en la Sección de Costos del proyecto
|
||||
|
||||
<img class="screenshot" alt="Project - Total Expense Claim" src="/docs/assets/img/project/project_total_expense_claim.png">
|
||||
|
||||
### Centro de Costo
|
||||
|
||||
Puedes crear un [Cost Center](/docs/user/manual/en/accounts/setup/cost-center.html) sobre un proyecto o usar un centro de costo existente para hacer el seguimiento de todos los gastos realizados al proyecto.
|
||||
|
||||
<img class="screenshot" alt="Project - Cost Center" src="/docs/assets/img/project/project_cost_center.png">
|
||||
|
||||
###Costeo del proyecto
|
||||
|
||||
La sección Costeo del proyecto le ayuda a rastrear el tiempo y los gastos incurridos en relación con el proyecto.
|
||||
|
||||
<img class="screenshot" alt="Project - Costing" src="/docs/assets/img/project/project_costing.png">
|
||||
|
||||
* La sección de cálculo de costos se actualiza según los registros de tiempo realizados.
|
||||
|
||||
* El margen bruto es la diferencia entre el monto total de costos y el monto total de facturación
|
||||
|
||||
###Facturación
|
||||
|
||||
Puedes crear/enlazar una [Sales Order](/docs/user/manual/en/selling/sales-order.html) a un proyecto. Una vez asociada puedes usar el módulo de ventas para facturar a un cliente sobre el proyecto.
|
||||
|
||||
<img class="screenshot" alt="Project - Sales Order" src="/docs/assets/img/project/project_sales_order.png">
|
||||
|
||||
###Gantt Chart
|
||||
|
||||
Un Gantt Chart muestra la planificación del proyecto.
|
||||
ERPNext te provee con una vista para visualizar las tareas de forma calendarizada usando un Gantt Chart (Hoja de Gantt).
|
||||
|
||||
* Para visualizar el gantt chart de un proyecto, ve hasta el proyecto y dar click en 'Gantt Chart'
|
||||
|
||||
<img class="screenshot" alt="Project - View Gantt Chart" src="/docs/assets/img/project/project_view_gantt_chart.png">
|
||||
|
||||
<img class="screenshot" alt="Project - Gantt Chart" src="/docs/assets/img/project/project_gantt_chart.png">
|
||||
|
||||
{next}
|
||||
61
erpnext/docs/user/manual/es/projects/tasks.md
Normal file
61
erpnext/docs/user/manual/es/projects/tasks.md
Normal file
@@ -0,0 +1,61 @@
|
||||
# Tareas
|
||||
|
||||
Proyecto es dividido en Tareas.
|
||||
En ERPNext, puedes crear las tareas de forma independiente.
|
||||
|
||||
<img class="screenshot" alt="Task" src="/docs/assets/img/project/task.png">
|
||||
|
||||
### Estado de una Tarea
|
||||
|
||||
Una tarea puede tener uno de los siguientes estados - Abierto, Trabajando, Pendiente de Revisión, Cerrado, o Cancelado.
|
||||
|
||||
<img class="screenshot" alt="Task - Status" src="/docs/assets/img/project/task_status.png">
|
||||
|
||||
* Por defecto, cada nueva tarea creada se le establece el estado 'Abierto'.
|
||||
|
||||
* Si un registro de tiempo es realizado sobre una tarea, su estado es asignado a 'Working'.
|
||||
|
||||
### Tarea Dependiente
|
||||
|
||||
Puedes especificar una lista de tareas dependientes en la sección 'Depende de'
|
||||
|
||||
<img class="screenshot" alt="Depends On" src="/docs/assets/img/project/task_depends_on.png">
|
||||
|
||||
* No puedes cerrar una tarea padre hasta que todas las tareas dependientes esten cerradas.
|
||||
|
||||
* Si una tarea dependiente se encuentra en retraso y se sobrepone con la fecha esperada de inicio de la tarea padre, el sistema va a re calandarizar la tarea padre.
|
||||
|
||||
### Manejando el tiempo
|
||||
|
||||
ERPNext usa [Time Log](/docs/user/manual/en/projects/time-log.html) para seguir el progreso de una tarea.
|
||||
Puedes crear varios registros de tiempo para cada tarea.
|
||||
El tiempo de inicio y fin actual junto con el costo es actualizado en base al Registro de Tiempo.
|
||||
|
||||
* Para ver el Registro de tiempo realizado a una tarea, dar click en 'Time Logs'
|
||||
|
||||
<img class="screenshot" alt="Task - View Time Log" src="/docs/assets/img/project/task_view_time_log.png">
|
||||
|
||||
<img class="screenshot" alt="Task - Time Log List" src="/docs/assets/img/project/task_time_log_list.png">
|
||||
|
||||
* Puedes también crear un Registro de Tiempo directamente y luego asociarlo a una Tarea.
|
||||
|
||||
<img class="screenshot" alt="Task - Link Time Log" src="/docs/assets/img/project/task_time_log_link.png">
|
||||
|
||||
### Gestión de gastos
|
||||
|
||||
Puede reservar la [Reclamación de gastos](/docs/user/manual/en/human-resources/expense-claim.html) contra una tarea de proyecto.
|
||||
El sistema actualizará el monto total de las reclamaciones de gastos en la sección de costos del proyecto.
|
||||
|
||||
* Para ver las reclamaciones de gastos realizadas en un proyecto, haga clic en 'Reclamaciones de gastos'
|
||||
|
||||
<img class="screenshot" alt="Task - View Expense Claim" src="/docs/assets/img/project/task_view_expense_claim.png">
|
||||
|
||||
* También puede crear un Reclamo de gastos directamente y vincularlo al Proyecto.
|
||||
|
||||
<img class="screenshot" alt="Task - Link Expense Claim" src="/docs/assets/img/project/task_expense_claim_link.png">
|
||||
|
||||
* El monto total de los Reclamos de gastos reservados contra un proyecto se muestra en 'Reclamo de gastos totales' en la Sección de Costos del proyecto
|
||||
|
||||
<img class="screenshot" alt="Task - Total Expense Claim" src="/docs/assets/img/project/task_total_expense_claim.png">
|
||||
|
||||
{next}
|
||||
25
erpnext/docs/user/manual/es/projects/time-log-batch.md
Normal file
25
erpnext/docs/user/manual/es/projects/time-log-batch.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# Lote de registro de tiempo
|
||||
|
||||
Puede facturar Registros de tiempo viéndolos juntos. Esto le da la flexibilidad de administrar la facturación de su cliente de la manera que desee. Para crear una nueva hoja de tiempo, ve a
|
||||
|
||||
> Projects > Time Sheet > New Time Sheet
|
||||
|
||||
O
|
||||
|
||||
Simplemente abra su lista de registro de tiempo y marque los elementos que desea agregar al registro de tiempo. A continuación, haga clic en el botón "Crear hoja de tiempo" y se seleccionarán estos registros de tiempo.
|
||||
|
||||
<img class="screenshot" alt="Time Log - Drag Calender" src="/docs/assets/img/project/time_sheet.gif">
|
||||
|
||||
###Creando Factura de Venta
|
||||
|
||||
* Despues de crear la Hoja de Tiempo/Horario, el botón "Crear Factura" debe aparecer.
|
||||
|
||||
<img class="screenshot" alt="Time Log - Drag Calender" src="/docs/assets/img/project/time_sheet_make_invoice.png">
|
||||
|
||||
* Haga clic en ese botón para hacer una factura de venta usando la hoja de tiempo.
|
||||
|
||||
<img class="screenshot" alt="Time Log - Drag Calender" src="/docs/assets/img/project/time_sheet_sales_invoice.png">
|
||||
|
||||
* Cuando "Presente" la Factura de Ventas, el número de Factura de Ventas se actualizará en los Registros de Tiempo y la Hoja de Horario y su estado cambiará a "Facturado".
|
||||
|
||||
{next}
|
||||
@@ -87,22 +87,24 @@ frappe.ui.form.on('Employee Loan', {
|
||||
},
|
||||
|
||||
employee_loan_application: function (frm) {
|
||||
return frappe.call({
|
||||
method: "erpnext.hr.doctype.employee_loan.employee_loan.get_employee_loan_application",
|
||||
args: {
|
||||
"employee_loan_application": frm.doc.employee_loan_application
|
||||
},
|
||||
callback: function (r) {
|
||||
if (!r.exc && r.message) {
|
||||
frm.set_value("loan_type", r.message.loan_type);
|
||||
frm.set_value("loan_amount", r.message.loan_amount);
|
||||
frm.set_value("repayment_method", r.message.repayment_method);
|
||||
frm.set_value("monthly_repayment_amount", r.message.repayment_amount);
|
||||
frm.set_value("repayment_periods", r.message.repayment_periods);
|
||||
frm.set_value("rate_of_interest", r.message.rate_of_interest);
|
||||
}
|
||||
}
|
||||
})
|
||||
if(frm.doc.employee_loan_application){
|
||||
return frappe.call({
|
||||
method: "erpnext.hr.doctype.employee_loan.employee_loan.get_employee_loan_application",
|
||||
args: {
|
||||
"employee_loan_application": frm.doc.employee_loan_application
|
||||
},
|
||||
callback: function (r) {
|
||||
if (!r.exc && r.message) {
|
||||
frm.set_value("loan_type", r.message.loan_type);
|
||||
frm.set_value("loan_amount", r.message.loan_amount);
|
||||
frm.set_value("repayment_method", r.message.repayment_method);
|
||||
frm.set_value("monthly_repayment_amount", r.message.repayment_amount);
|
||||
frm.set_value("repayment_periods", r.message.repayment_periods);
|
||||
frm.set_value("rate_of_interest", r.message.rate_of_interest);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
repayment_method: function (frm) {
|
||||
|
||||
@@ -27,13 +27,13 @@ QUnit.test("Test: Offer Letter [HR]", function (assert) {
|
||||
]},
|
||||
]);
|
||||
},
|
||||
() => frappe.timeout(12),
|
||||
() => frappe.timeout(10),
|
||||
() => frappe.click_button('Submit'),
|
||||
() => frappe.timeout(2),
|
||||
() => frappe.click_button('Yes'),
|
||||
() => frappe.timeout(8),
|
||||
() => frappe.timeout(5),
|
||||
// To check if the fields are correctly set
|
||||
() => {
|
||||
// To check if the fields are correctly set
|
||||
assert.ok(cur_frm.get_field('status').value=='Accepted',
|
||||
'Status of job offer is correct');
|
||||
assert.ok(cur_frm.get_field('designation').value=='Software Developer',
|
||||
@@ -45,7 +45,7 @@ QUnit.test("Test: Offer Letter [HR]", function (assert) {
|
||||
() => {
|
||||
assert.ok(cur_list.data[0].docstatus==1,'Offer Letter Submitted successfully');
|
||||
},
|
||||
() => frappe.timeout(4),
|
||||
() => frappe.timeout(2),
|
||||
() => done()
|
||||
]);
|
||||
});
|
||||
@@ -161,18 +161,15 @@ var calculate_earning_total = function(doc, dt, dn, reset_amount) {
|
||||
|
||||
tbl[i].amount = Math.round(tbl[i].default_amount)*(flt(doc.payment_days) /
|
||||
cint(doc.total_working_days)*100)/100;
|
||||
refresh_field('amount', tbl[i].name, 'earnings');
|
||||
|
||||
} else if(reset_amount) {
|
||||
tbl[i].amount = tbl[i].default_amount;
|
||||
refresh_field('amount', tbl[i].name, 'earnings');
|
||||
}
|
||||
if(!tbl[i].do_not_include_in_total) {
|
||||
total_earn += flt(tbl[i].amount);
|
||||
}
|
||||
}
|
||||
doc.gross_pay = total_earn;
|
||||
refresh_many(['amount','gross_pay']);
|
||||
refresh_many(['earnings', 'amount','gross_pay']);
|
||||
}
|
||||
|
||||
// Calculate deduction total
|
||||
@@ -183,17 +180,15 @@ var calculate_ded_total = function(doc, dt, dn, reset_amount) {
|
||||
for(var i = 0; i < tbl.length; i++){
|
||||
if(cint(tbl[i].depends_on_lwp) == 1) {
|
||||
tbl[i].amount = Math.round(tbl[i].default_amount)*(flt(doc.payment_days)/cint(doc.total_working_days)*100)/100;
|
||||
refresh_field('amount', tbl[i].name, 'deductions');
|
||||
} else if(reset_amount) {
|
||||
tbl[i].amount = tbl[i].default_amount;
|
||||
refresh_field('amount', tbl[i].name, 'deductions');
|
||||
}
|
||||
if(!tbl[i].do_not_include_in_total) {
|
||||
total_ded += flt(tbl[i].amount);
|
||||
}
|
||||
}
|
||||
doc.total_deduction = total_ded;
|
||||
refresh_field('total_deduction');
|
||||
refresh_many(['deductions', 'total_deduction']);
|
||||
}
|
||||
|
||||
// Calculate net payable amount
|
||||
|
||||
@@ -348,7 +348,8 @@ class SalarySlip(TransactionBase):
|
||||
/ cint(self.total_working_days)), self.precision("amount", component_type)
|
||||
)
|
||||
|
||||
elif not self.payment_days and not self.salary_slip_based_on_timesheet:
|
||||
elif not self.payment_days and not self.salary_slip_based_on_timesheet and \
|
||||
cint(d.depends_on_lwp):
|
||||
d.amount = 0
|
||||
elif not d.amount:
|
||||
d.amount = d.default_amount
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
QUnit.module('hr');
|
||||
|
||||
QUnit.test("Test: Training Event [HR]", function (assert) {
|
||||
assert.expect(4);
|
||||
assert.expect(5);
|
||||
let done = assert.async();
|
||||
let employee_name;
|
||||
|
||||
@@ -21,7 +21,8 @@ QUnit.test("Test: Training Event [HR]", function (assert) {
|
||||
{ employees: [
|
||||
[
|
||||
{employee: employee_name},
|
||||
{employee_name: 'Test Employee 1'}
|
||||
{employee_name: 'Test Employee 1'},
|
||||
{attendance: 'Optional'}
|
||||
]
|
||||
]},
|
||||
]);
|
||||
@@ -41,6 +42,9 @@ QUnit.test("Test: Training Event [HR]", function (assert) {
|
||||
|
||||
assert.ok(cur_frm.doc.employees[0].employee_name=='Test Employee 1',
|
||||
'Attendee Employee is correctly set');
|
||||
|
||||
assert.ok(cur_frm.doc.employees[0].attendance=='Optional',
|
||||
'Attendance is correctly set');
|
||||
},
|
||||
|
||||
() => frappe.set_route('List','Training Event','List'),
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
QUnit.module('hr');
|
||||
|
||||
QUnit.test("test: Training Event", function (assert) {
|
||||
// number of asserts
|
||||
assert.expect(1);
|
||||
let done = assert.async();
|
||||
|
||||
frappe.run_serially([
|
||||
// insert a new Training Event
|
||||
() => frappe.set_route("List", "Training Event", "List"),
|
||||
() => frappe.new_doc("Training Event"),
|
||||
() => frappe.timeout(1),
|
||||
() => frappe.click_link('Edit in full page'),
|
||||
() => cur_frm.set_value("event_name", "Test Event " + frappe.utils.get_random(10)),
|
||||
() => cur_frm.set_value("start_time", "2017-07-26, 2:00 pm PDT"),
|
||||
() => cur_frm.set_value("end_time", "2017-07-26, 2:30 pm PDT"),
|
||||
() => cur_frm.set_value("introduction", "This is a test report"),
|
||||
() => cur_frm.set_value("location", "Fake office"),
|
||||
() => frappe.click_button('Add Row'),
|
||||
() => frappe.db.get_value('Employee', {'employee_name':'Test Employee 1'}, 'name'),
|
||||
(r) => {
|
||||
console.log(r);
|
||||
return cur_frm.fields_dict.employees.grid.grid_rows[0].doc.employee = r.message.name;
|
||||
},
|
||||
() => {
|
||||
return cur_frm.fields_dict.employees.grid.grid_rows[0].doc.attendance = "Optional";
|
||||
},
|
||||
() => frappe.click_button('Save'),
|
||||
() => frappe.timeout(2),
|
||||
() => frappe.click_button('Submit'),
|
||||
() => frappe.timeout(2),
|
||||
() => frappe.click_button('Yes'),
|
||||
() => frappe.timeout(1),
|
||||
() => {
|
||||
assert.equal(cur_frm.doc.docstatus, 1);
|
||||
},
|
||||
() => done()
|
||||
]);
|
||||
|
||||
});
|
||||
@@ -809,7 +809,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-10-18 11:22:20.143491",
|
||||
"modified": "2017-10-23 06:13:29.065781",
|
||||
"modified_by": "Administrator",
|
||||
"module": "HR",
|
||||
"name": "Training Event",
|
||||
@@ -837,7 +837,7 @@
|
||||
"write": 1
|
||||
}
|
||||
],
|
||||
"quick_entry": 1,
|
||||
"quick_entry": 0,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"search_fields": "event_name",
|
||||
|
||||
@@ -5,7 +5,7 @@ def get_data():
|
||||
'fieldname': 'training_program',
|
||||
'transactions': [
|
||||
{
|
||||
'label': _('Training Event'),
|
||||
'label': _('Training Events'),
|
||||
'items': ['Training Event']
|
||||
},
|
||||
]
|
||||
|
||||
@@ -34,7 +34,9 @@ def get_categories():
|
||||
return response
|
||||
|
||||
@frappe.whitelist()
|
||||
def get_item_details(hub_sync_id):
|
||||
def get_item_details(hub_sync_id=None):
|
||||
if not hub_sync_id:
|
||||
return
|
||||
connection = get_connection()
|
||||
return connection.get_doc('Hub Item', hub_sync_id)
|
||||
|
||||
|
||||
@@ -382,6 +382,7 @@ erpnext.hub.Hub = class Hub {
|
||||
},
|
||||
method: "erpnext.hub_node.get_item_details",
|
||||
callback: (r) => {
|
||||
if (!r || !r.message) return;
|
||||
let item = r.message;
|
||||
this.item_cache[item_code] = item;
|
||||
this.render_item_page(item);
|
||||
@@ -483,7 +484,7 @@ erpnext.hub.Hub = class Hub {
|
||||
}
|
||||
frappe.call({
|
||||
method: 'erpnext.hub_node.get_company_details',
|
||||
args: {company_id: company_id}
|
||||
args: {hub_sync_id: company_id}
|
||||
}).then((r) => {
|
||||
if (r.message) {
|
||||
const company_details = r.message.company_details;
|
||||
|
||||
@@ -455,3 +455,6 @@ erpnext.patches.v9_0.add_healthcare_domain
|
||||
erpnext.patches.v9_0.set_variant_item_description
|
||||
erpnext.patches.v9_0.set_uoms_in_variant_field
|
||||
erpnext.patches.v9_0.copy_old_fees_field_data
|
||||
erpnext.patches.v9_0.set_pos_profile_name
|
||||
erpnext.patches.v9_0.remove_non_existing_warehouse_from_stock_settings
|
||||
execute:frappe.delete_doc_if_exists("DocType", "Program Fee")
|
||||
|
||||
@@ -5,6 +5,8 @@ from __future__ import unicode_literals
|
||||
import frappe
|
||||
|
||||
def execute():
|
||||
frappe.reload_doc("schools", "doctype", "fees")
|
||||
|
||||
if "total_amount" not in frappe.db.get_table_columns("Fees"):
|
||||
return
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
import frappe
|
||||
|
||||
def execute():
|
||||
default_warehouse = frappe.db.get_value("Stock Settings", None, "default_warehouse")
|
||||
if default_warehouse:
|
||||
if not frappe.db.get_value("Warehouse", {"name": default_warehouse}):
|
||||
frappe.db.set_value("Stock Settings", None, "default_warehouse", "")
|
||||
24
erpnext/patches/v9_0/set_pos_profile_name.py
Normal file
24
erpnext/patches/v9_0/set_pos_profile_name.py
Normal file
@@ -0,0 +1,24 @@
|
||||
# Copyright (c) 2017, Frappe and Contributors
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
|
||||
def execute():
|
||||
doctype = 'POS Profile'
|
||||
frappe.reload_doctype(doctype)
|
||||
|
||||
for pos in frappe.get_all(doctype, filters={'disabled': 0}):
|
||||
doc = frappe.get_doc(doctype, pos.name)
|
||||
|
||||
if not doc.user or doc.pos_profile_name: continue
|
||||
|
||||
try:
|
||||
doc.pos_profile_name = doc.user + ' - ' + doc.company
|
||||
doc.flags.ignore_validate = True
|
||||
doc.flags.ignore_mandatory = True
|
||||
doc.save()
|
||||
|
||||
frappe.rename_doc(doctype, doc.name, doc.pos_profile_name, force=True)
|
||||
except frappe.LinkValidationError:
|
||||
frappe.db.set_value("POS Profile", doc.name, 'disabled', 1)
|
||||
@@ -191,7 +191,6 @@ var update_time_rates = function(frm, cdt, cdn){
|
||||
var child = locals[cdt][cdn];
|
||||
if(!child.billable){
|
||||
frappe.model.set_value(cdt, cdn, 'billing_rate', 0.0);
|
||||
frappe.model.set_value(cdt, cdn, 'costing_rate', 0.0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -202,9 +201,8 @@ var calculate_billing_costing_amount = function(frm, cdt, cdn){
|
||||
|
||||
if(child.billing_hours && child.billable){
|
||||
billing_amount = (child.billing_hours * child.billing_rate);
|
||||
costing_amount = flt(child.costing_rate * child.billing_hours);
|
||||
}
|
||||
|
||||
costing_amount = flt(child.costing_rate * child.hours);
|
||||
frappe.model.set_value(cdt, cdn, 'billing_amount', billing_amount);
|
||||
frappe.model.set_value(cdt, cdn, 'costing_amount', costing_amount);
|
||||
calculate_time_and_amount(frm);
|
||||
|
||||
@@ -49,10 +49,10 @@ class Timesheet(Document):
|
||||
self.update_time_rates(d)
|
||||
|
||||
self.total_hours += flt(d.hours)
|
||||
self.total_costing_amount += flt(d.costing_amount)
|
||||
if d.billable:
|
||||
self.total_billable_hours += flt(d.billing_hours)
|
||||
self.total_billable_amount += flt(d.billing_amount)
|
||||
self.total_costing_amount += flt(d.costing_amount)
|
||||
self.total_billed_amount += flt(d.billing_amount) if d.sales_invoice else 0.0
|
||||
self.total_billed_hours += flt(d.billing_hours) if d.sales_invoice else 0.0
|
||||
|
||||
@@ -265,19 +265,19 @@ class Timesheet(Document):
|
||||
|
||||
def update_cost(self):
|
||||
for data in self.time_logs:
|
||||
if data.activity_type and data.billable:
|
||||
if data.activity_type or data.billable:
|
||||
rate = get_activity_cost(self.employee, data.activity_type)
|
||||
hours = data.billing_hours or 0
|
||||
costing_hours = data.billing_hours or data.hours or 0
|
||||
if rate:
|
||||
data.billing_rate = flt(rate.get('billing_rate')) if flt(data.billing_rate) == 0 else data.billing_rate
|
||||
data.costing_rate = flt(rate.get('costing_rate')) if flt(data.costing_rate) == 0 else data.costing_rate
|
||||
data.billing_amount = data.billing_rate * hours
|
||||
data.costing_amount = data.costing_rate * hours
|
||||
data.costing_amount = data.costing_rate * costing_hours
|
||||
|
||||
def update_time_rates(self, ts_detail):
|
||||
if not ts_detail.billable:
|
||||
ts_detail.billing_rate = 0.0
|
||||
ts_detail.costing_rate = 0.0
|
||||
|
||||
@frappe.whitelist()
|
||||
def get_projectwise_timesheet_data(project, parent=None):
|
||||
|
||||
@@ -38,7 +38,7 @@ $.extend(erpnext, {
|
||||
},
|
||||
|
||||
stale_rate_allowed: () => {
|
||||
return cint(frappe.boot.sysdefaults.allow_stale) || 1;
|
||||
return cint(frappe.boot.sysdefaults.allow_stale);
|
||||
},
|
||||
|
||||
setup_serial_no: function() {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
QUnit.module('schools');
|
||||
|
||||
QUnit.test('Test: Assessment Plan', function(assert){
|
||||
assert.expect(7);
|
||||
assert.expect(6);
|
||||
let done = assert.async();
|
||||
let room_name, instructor_name, assessment_name;
|
||||
|
||||
@@ -49,10 +49,6 @@ QUnit.test('Test: Assessment Plan', function(assert){
|
||||
assert.equal(cur_frm.doc.assessment_plan, assessment_name, 'Assessment correctly set');
|
||||
assert.equal(cur_frm.doc.student_group, 'test-course-wise-group-2', 'Course for Assessment correctly set');
|
||||
},
|
||||
() => cur_frm.print_doc(),
|
||||
() => frappe.timeout(1),
|
||||
() => {assert.ok($('.btn-print-print').is(':visible'), "Print Format Available");},
|
||||
|
||||
() => done()
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -7,23 +7,25 @@ cur_frm.add_fetch("assessment_plan", "maximum_assessment_score", "maximum_score"
|
||||
|
||||
frappe.ui.form.on("Assessment Result", {
|
||||
assessment_plan: function(frm) {
|
||||
frappe.call({
|
||||
method: "erpnext.schools.api.get_assessment_details",
|
||||
args: {
|
||||
assessment_plan: frm.doc.assessment_plan
|
||||
},
|
||||
callback: function(r) {
|
||||
if (r.message) {
|
||||
frm.doc.details = [];
|
||||
$.each(r.message, function(i, d) {
|
||||
var row = frappe.model.add_child(frm.doc, "Assessment Result Detail", "details");
|
||||
row.assessment_criteria = d.assessment_criteria;
|
||||
row.maximum_score = d.maximum_score;
|
||||
});
|
||||
if (frm.doc.assessment_plan) {
|
||||
frappe.call({
|
||||
method: "erpnext.schools.api.get_assessment_details",
|
||||
args: {
|
||||
assessment_plan: frm.doc.assessment_plan
|
||||
},
|
||||
callback: function(r) {
|
||||
if (r.message) {
|
||||
frm.doc.details = [];
|
||||
$.each(r.message, function(i, d) {
|
||||
var row = frappe.model.add_child(frm.doc, "Assessment Result Detail", "details");
|
||||
row.assessment_criteria = d.assessment_criteria;
|
||||
row.maximum_score = d.maximum_score;
|
||||
});
|
||||
}
|
||||
refresh_field("details");
|
||||
}
|
||||
refresh_field("details");
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
"issingle": 1,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-06-30 08:21:47.184562",
|
||||
"modified": "2017-11-08 11:51:43.247815",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Schools",
|
||||
"name": "Assessment Result Tool",
|
||||
@@ -188,17 +188,17 @@
|
||||
"cancel": 0,
|
||||
"create": 1,
|
||||
"delete": 0,
|
||||
"email": 1,
|
||||
"email": 0,
|
||||
"export": 0,
|
||||
"if_owner": 0,
|
||||
"import": 0,
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"print": 0,
|
||||
"read": 1,
|
||||
"report": 0,
|
||||
"role": "Academics User",
|
||||
"set_user_permissions": 0,
|
||||
"share": 1,
|
||||
"share": 0,
|
||||
"submit": 0,
|
||||
"write": 1
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"menu_index": 0,
|
||||
"modified": "2017-06-30 08:21:47.851347",
|
||||
"modified": "2017-11-02 17:57:18.069158",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Schools",
|
||||
"name": "Fee Category",
|
||||
@@ -116,6 +116,46 @@
|
||||
"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": "Accounts 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": "Accounts Manager",
|
||||
"set_user_permissions": 0,
|
||||
"share": 1,
|
||||
"submit": 0,
|
||||
"write": 1
|
||||
}
|
||||
],
|
||||
"quick_entry": 1,
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_global_search": 1,
|
||||
"in_list_view": 1,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Fee Structure",
|
||||
@@ -1029,7 +1029,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-09-19 16:24:17.266071",
|
||||
"modified": "2017-11-02 17:55:22.851581",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Schools",
|
||||
"name": "Fee Schedule",
|
||||
@@ -1039,7 +1039,7 @@
|
||||
{
|
||||
"amend": 1,
|
||||
"apply_user_permissions": 0,
|
||||
"cancel": 1,
|
||||
"cancel": 0,
|
||||
"create": 1,
|
||||
"delete": 1,
|
||||
"email": 1,
|
||||
@@ -1053,6 +1053,46 @@
|
||||
"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": "Accounts User",
|
||||
"set_user_permissions": 0,
|
||||
"share": 1,
|
||||
"submit": 1,
|
||||
"write": 1
|
||||
},
|
||||
{
|
||||
"amend": 0,
|
||||
"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": "Accounts Manager",
|
||||
"set_user_permissions": 0,
|
||||
"share": 1,
|
||||
"submit": 1,
|
||||
"write": 1
|
||||
}
|
||||
@@ -1060,6 +1100,7 @@
|
||||
"quick_entry": 0,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"restrict_to_domain": "Education",
|
||||
"show_name_in_global_search": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
"reqd": 0,
|
||||
"search_index": 1,
|
||||
"set_only_once": 0,
|
||||
"unique": 0,
|
||||
@@ -197,7 +197,7 @@
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
@@ -577,7 +577,7 @@
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"menu_index": 0,
|
||||
"modified": "2017-09-11 15:18:27.975666",
|
||||
"modified": "2017-11-02 17:43:16.796845",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Schools",
|
||||
"name": "Fee Structure",
|
||||
@@ -587,7 +587,7 @@
|
||||
{
|
||||
"amend": 1,
|
||||
"apply_user_permissions": 0,
|
||||
"cancel": 1,
|
||||
"cancel": 0,
|
||||
"create": 1,
|
||||
"delete": 1,
|
||||
"email": 1,
|
||||
@@ -601,6 +601,46 @@
|
||||
"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": "Accounts User",
|
||||
"set_user_permissions": 0,
|
||||
"share": 1,
|
||||
"submit": 1,
|
||||
"write": 1
|
||||
},
|
||||
{
|
||||
"amend": 0,
|
||||
"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": "Accounts Manager",
|
||||
"set_user_permissions": 0,
|
||||
"share": 1,
|
||||
"submit": 1,
|
||||
"write": 1
|
||||
}
|
||||
@@ -609,6 +649,7 @@
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"restrict_to_domain": "Education",
|
||||
"search_fields": "program, student_category, academic_year",
|
||||
"show_name_in_global_search": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 0,
|
||||
"allow_import": 1,
|
||||
"allow_rename": 0,
|
||||
"autoname": "naming_series:",
|
||||
"beta": 1,
|
||||
@@ -87,7 +87,7 @@
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_global_search": 1,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Student Name",
|
||||
@@ -118,7 +118,7 @@
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_global_search": 1,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Fee Schedule",
|
||||
@@ -158,7 +158,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
@@ -249,7 +249,7 @@
|
||||
"options": "Company",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 1,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 1,
|
||||
@@ -310,7 +310,7 @@
|
||||
"no_copy": 1,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 1,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
@@ -494,7 +494,7 @@
|
||||
"options": "Student Batch Name",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
@@ -708,7 +708,7 @@
|
||||
"options": "Currency",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"remember_last_selected_value": 0,
|
||||
@@ -739,7 +739,7 @@
|
||||
"options": "Fee Structure",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
@@ -1011,7 +1011,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
@@ -1132,7 +1132,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
@@ -1163,7 +1163,7 @@
|
||||
"options": "Account",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
@@ -1194,7 +1194,7 @@
|
||||
"options": "Account",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
@@ -1223,7 +1223,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
@@ -1254,6 +1254,35 @@
|
||||
"options": "Cost Center",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "data_42",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
@@ -1276,13 +1305,53 @@
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"menu_index": 0,
|
||||
"modified": "2017-09-20 23:17:09.819606",
|
||||
"modified": "2017-11-02 17:31:47.155873",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Schools",
|
||||
"name": "Fees",
|
||||
"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": "Accounts User",
|
||||
"set_user_permissions": 0,
|
||||
"share": 1,
|
||||
"submit": 1,
|
||||
"write": 1
|
||||
},
|
||||
{
|
||||
"amend": 0,
|
||||
"apply_user_permissions": 0,
|
||||
@@ -1297,7 +1366,7 @@
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"role": "Academics User",
|
||||
"role": "Accounts Manager",
|
||||
"set_user_permissions": 0,
|
||||
"share": 1,
|
||||
"submit": 1,
|
||||
@@ -1308,7 +1377,8 @@
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"restrict_to_domain": "Education",
|
||||
"show_name_in_global_search": 0,
|
||||
"search_fields": "student, student_name",
|
||||
"show_name_in_global_search": 1,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"title_field": "student_name",
|
||||
|
||||
@@ -223,67 +223,6 @@
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "fee_schedule",
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Fee Schedule",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "fees",
|
||||
"fieldtype": "Table",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Fees",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Program Fee",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
}
|
||||
],
|
||||
"has_web_view": 0,
|
||||
@@ -297,7 +236,7 @@
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"menu_index": 0,
|
||||
"modified": "2017-06-30 08:21:49.176708",
|
||||
"modified": "2017-11-02 18:08:20.823972",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Schools",
|
||||
"name": "Program",
|
||||
|
||||
@@ -12,10 +12,14 @@ class StudentApplicant(Document):
|
||||
def autoname(self):
|
||||
from frappe.model.naming import set_name_by_naming_series
|
||||
if self.student_admission:
|
||||
naming_series = None
|
||||
if self.program:
|
||||
# set the naming series from the student admission if provided.
|
||||
student_admission = get_student_admission_data(self.student_admission, self.program)
|
||||
if student_admission:
|
||||
naming_series = student_admission.get("applicant_naming_series")
|
||||
else:
|
||||
naming_series = None
|
||||
else:
|
||||
frappe.throw(_("Select the program first"))
|
||||
|
||||
@@ -40,15 +44,16 @@ class StudentApplicant(Document):
|
||||
|
||||
def validation_from_student_admission(self):
|
||||
student_admission = get_student_admission_data(self.student_admission, self.program)
|
||||
if student_admission:
|
||||
if ((
|
||||
student_admission.minimum_age
|
||||
and getdate(student_admission.minimum_age) > getdate(self.date_of_birth)
|
||||
) or (
|
||||
student_admission.maximum_age
|
||||
and getdate(student_admission.maximum_age) < getdate(self.date_of_birth)
|
||||
)):
|
||||
frappe.throw(_("Not eligible for the admission in this program as per DOB"))
|
||||
|
||||
# different validation for minimum and maximum age so that either min/max can also work independently.
|
||||
if student_admission and student_admission.minimum_age and \
|
||||
getdate(student_admission.minimum_age) < getdate(self.date_of_birth):
|
||||
frappe.throw(_("Not eligible for the admission in this program as per DOB"))
|
||||
|
||||
if student_admission and student_admission.maximum_age and \
|
||||
getdate(student_admission.maximum_age) > getdate(self.date_of_birth):
|
||||
frappe.throw(_("Not eligible for the admission in this program as per DOB"))
|
||||
|
||||
|
||||
def on_payment_authorized(self, *args, **kwargs):
|
||||
self.db_set('paid', 1)
|
||||
|
||||
@@ -273,7 +273,7 @@
|
||||
"issingle": 1,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-06-30 08:21:51.390809",
|
||||
"modified": "2017-11-08 11:53:27.994112",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Schools",
|
||||
"name": "Student Attendance Tool",
|
||||
@@ -306,17 +306,17 @@
|
||||
"cancel": 0,
|
||||
"create": 1,
|
||||
"delete": 0,
|
||||
"email": 1,
|
||||
"email": 0,
|
||||
"export": 0,
|
||||
"if_owner": 0,
|
||||
"import": 0,
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"print": 0,
|
||||
"read": 1,
|
||||
"report": 0,
|
||||
"role": "Academics User",
|
||||
"set_user_permissions": 0,
|
||||
"share": 1,
|
||||
"share": 0,
|
||||
"submit": 0,
|
||||
"write": 1
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import frappe
|
||||
from frappe.model.document import Document
|
||||
from frappe import _
|
||||
from erpnext.schools.utils import validate_duplicate_student
|
||||
from frappe.utils import cint
|
||||
|
||||
class StudentGroup(Document):
|
||||
def validate(self):
|
||||
@@ -34,9 +35,13 @@ class StudentGroup(Document):
|
||||
for d in self.students:
|
||||
if not frappe.db.get_value("Student", d.student, "enabled") and d.active:
|
||||
frappe.throw(_("{0} - {1} is inactive student".format(d.group_roll_number, d.student_name)))
|
||||
if self.group_based_on == "Batch" and d.student not in students and frappe.defaults.get_defaults().validate_batch:
|
||||
|
||||
if (self.group_based_on == "Batch") and cint(frappe.defaults.get_defaults().validate_batch)\
|
||||
and d.student not in students:
|
||||
frappe.throw(_("{0} - {1} is not enrolled in the Batch {2}".format(d.group_roll_number, d.student_name, self.batch)))
|
||||
if self.group_based_on == "Course" and d.student not in students and frappe.defaults.get_defaults().validate_course:
|
||||
|
||||
if (self.group_based_on == "Course") and cint(frappe.defaults.get_defaults().validate_course)\
|
||||
and (d.student not in students):
|
||||
frappe.throw(_("{0} - {1} is not enrolled in the Course {2}".format(d.group_roll_number, d.student_name, self.course)))
|
||||
|
||||
def validate_and_set_child_table_fields(self):
|
||||
@@ -108,14 +113,14 @@ def fetch_students(doctype, txt, searchfield, start, page_len, filters):
|
||||
students = ([d.student for d in enrolled_students if d.student not in student_group_student]
|
||||
if enrolled_students else [""]) or [""]
|
||||
return frappe.db.sql("""select name, title from tabStudent
|
||||
where name in ({0}) and `{1}` LIKE %s
|
||||
where name in ({0}) and (`{1}` LIKE %s or title LIKE %s)
|
||||
order by idx desc, name
|
||||
limit %s, %s""".format(", ".join(['%s']*len(students)), searchfield),
|
||||
tuple(students + ["%%%s%%" % txt, start, page_len]))
|
||||
tuple(students + ["%%%s%%" % txt, "%%%s%%" % txt, start, page_len]))
|
||||
else:
|
||||
return frappe.db.sql("""select name, title from tabStudent
|
||||
where `{0}` LIKE %s
|
||||
where `{0}` LIKE %s or title LIKE %s
|
||||
order by idx desc, name
|
||||
limit %s, %s""".format(searchfield),
|
||||
tuple(["%%%s%%" % txt, start, page_len]))
|
||||
tuple(["%%%s%%" % txt, "%%%s%%" % txt, start, page_len]))
|
||||
|
||||
|
||||
@@ -173,14 +173,16 @@ def get_column(assessment_criteria, total_maximum_score):
|
||||
def get_chart_data(grades, assessment_criteria_list, kounter):
|
||||
grades = sorted(grades)
|
||||
datasets = []
|
||||
|
||||
for grade in grades:
|
||||
tmp = []
|
||||
for ac in assessment_criteria_list:
|
||||
if grade in kounter[ac]:
|
||||
tmp.append(kounter[ac][grade])
|
||||
tmp = frappe._dict({"values":[], "title": grade})
|
||||
for criteria in assessment_criteria_list:
|
||||
if grade in kounter[criteria]:
|
||||
tmp["values"].append(kounter[criteria][grade])
|
||||
else:
|
||||
tmp.append(0)
|
||||
tmp["values"].append(0)
|
||||
datasets.append(tmp)
|
||||
|
||||
return {
|
||||
"data": {
|
||||
"labels": assessment_criteria_list,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 1,
|
||||
"allow_rename": 0,
|
||||
"beta": 0,
|
||||
@@ -12,6 +13,7 @@
|
||||
"editable_grid": 0,
|
||||
"fields": [
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -40,6 +42,7 @@
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -72,6 +75,37 @@
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "description",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 1,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Description",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -101,6 +135,7 @@
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -132,6 +167,7 @@
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -160,6 +196,7 @@
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -190,19 +227,19 @@
|
||||
"unique": 0
|
||||
}
|
||||
],
|
||||
"has_web_view": 0,
|
||||
"hide_heading": 0,
|
||||
"hide_toolbar": 0,
|
||||
"icon": "fa fa-sitemap",
|
||||
"idx": 1,
|
||||
"image_view": 0,
|
||||
"in_create": 0,
|
||||
"in_dialog": 0,
|
||||
"is_submittable": 0,
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-02-22 05:06:30.143089",
|
||||
"modified_by": "Administrator",
|
||||
"modified": "2017-10-18 14:23:06.538568",
|
||||
"modified_by": "tundebabzy@gmail.com",
|
||||
"module": "Selling",
|
||||
"name": "Product Bundle",
|
||||
"owner": "Administrator",
|
||||
|
||||
@@ -477,9 +477,11 @@ def make_delivery_note(source_name, target_doc=None):
|
||||
target.qty = flt(source.qty) - flt(source.delivered_qty)
|
||||
|
||||
item = frappe.db.get_value("Item", target.item_code, ["item_group", "selling_cost_center"], as_dict=1)
|
||||
target.cost_center = frappe.db.get_value("Project", source_parent.project, "cost_center") \
|
||||
or item.selling_cost_center \
|
||||
or frappe.db.get_value("Item Group", item.item_group, "default_cost_center")
|
||||
|
||||
if item:
|
||||
target.cost_center = frappe.db.get_value("Project", source_parent.project, "cost_center") \
|
||||
or item.selling_cost_center \
|
||||
or frappe.db.get_value("Item Group", item.item_group, "default_cost_center")
|
||||
|
||||
target_doc = get_mapped_doc("Sales Order", source_name, {
|
||||
"Sales Order": {
|
||||
|
||||
@@ -43,6 +43,7 @@ erpnext.pos.PointOfSale = class PointOfSale {
|
||||
|
||||
make() {
|
||||
return frappe.run_serially([
|
||||
() => frappe.dom.freeze(),
|
||||
() => {
|
||||
this.prepare_dom();
|
||||
this.prepare_menu();
|
||||
@@ -55,6 +56,7 @@ erpnext.pos.PointOfSale = class PointOfSale {
|
||||
frappe.timeout(1);
|
||||
this.make_items();
|
||||
this.bind_events();
|
||||
frappe.dom.unfreeze();
|
||||
},
|
||||
() => this.page.set_title(__('Point of Sale'))
|
||||
]);
|
||||
@@ -156,6 +158,7 @@ erpnext.pos.PointOfSale = class PointOfSale {
|
||||
}
|
||||
|
||||
update_item_in_cart(item_code, field='qty', value=1) {
|
||||
frappe.dom.freeze();
|
||||
if(this.cart.exists(item_code)) {
|
||||
const item = this.frm.doc.items.find(i => i.item_code === item_code);
|
||||
frappe.flags.hide_serial_batch_dialog = false;
|
||||
@@ -220,6 +223,7 @@ erpnext.pos.PointOfSale = class PointOfSale {
|
||||
this.cart.add_item(item);
|
||||
this.cart.update_taxes_and_totals();
|
||||
this.cart.update_grand_total();
|
||||
frappe.dom.unfreeze();
|
||||
}
|
||||
|
||||
update_item_in_frm(item, field, value) {
|
||||
@@ -232,8 +236,6 @@ erpnext.pos.PointOfSale = class PointOfSale {
|
||||
return frappe.model.set_value(item.doctype, item.name, field, value)
|
||||
.then(() => this.frm.script_manager.trigger('qty', item.doctype, item.name))
|
||||
.then(() => {
|
||||
console.log(item.qty, item.amount);
|
||||
|
||||
if (field === 'qty' && item.qty === 0) {
|
||||
frappe.model.clear_doc(item.doctype, item.name);
|
||||
}
|
||||
@@ -988,18 +990,18 @@ class POSItems {
|
||||
}
|
||||
|
||||
this.get_items({search_value: search_term, item_group })
|
||||
.then(({ items, serial_no, batch_no }) => {
|
||||
.then(({ items, serial_no, batch_no, barcode }) => {
|
||||
if (search_term) {
|
||||
this.search_index[search_term] = items;
|
||||
}
|
||||
|
||||
this.items = items;
|
||||
this.render_items(items);
|
||||
this.set_item_in_the_cart(items, serial_no, batch_no);
|
||||
this.set_item_in_the_cart(items, serial_no, batch_no, barcode);
|
||||
});
|
||||
}
|
||||
|
||||
set_item_in_the_cart(items, serial_no, batch_no) {
|
||||
set_item_in_the_cart(items, serial_no, batch_no, barcode) {
|
||||
if (serial_no) {
|
||||
this.events.update_cart(items[0].item_code,
|
||||
'serial_no', serial_no);
|
||||
@@ -1014,7 +1016,7 @@ class POSItems {
|
||||
return;
|
||||
}
|
||||
|
||||
if (items.length === 1) {
|
||||
if (items.length === 1 && (serial_no || batch_no || barcode)) {
|
||||
this.events.update_cart(items[0].item_code,
|
||||
'qty', '+1');
|
||||
this.reset_search_field();
|
||||
|
||||
@@ -67,6 +67,11 @@ def get_items(start, page_length, price_list, item_group, search_value=""):
|
||||
'batch_no': batch_no
|
||||
})
|
||||
|
||||
if barcode:
|
||||
res.update({
|
||||
'barcode': barcode
|
||||
})
|
||||
|
||||
return res
|
||||
|
||||
def get_conditions(item_code, serial_no, batch_no, barcode):
|
||||
|
||||
@@ -17,11 +17,11 @@ class CustomerGroup(NestedSet):
|
||||
|
||||
def validate_name_with_customer(self):
|
||||
if frappe.db.exists("Customer", self.name):
|
||||
frappe.msgprint(_("An Customer exists with same name"), raise_exception=1)
|
||||
frappe.msgprint(_("A customer with the same name already exists"), raise_exception=1)
|
||||
|
||||
def get_parent_customer_groups(customer_group):
|
||||
lft, rgt = frappe.db.get_value("Customer Group", customer_group, ['lft', 'rgt'])
|
||||
|
||||
return frappe.db.sql("""select name from `tabCustomer Group`
|
||||
where lft <= %s and rgt >= %s
|
||||
order by lft asc""", (lft, rgt), as_dict=True)
|
||||
order by lft asc""", (lft, rgt), as_dict=True)
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
from frappe.utils import cint
|
||||
|
||||
def boot_session(bootinfo):
|
||||
"""boot session - send website info if guest"""
|
||||
@@ -19,8 +20,8 @@ def boot_session(bootinfo):
|
||||
'territory')
|
||||
bootinfo.sysdefaults.customer_group = frappe.db.get_single_value('Selling Settings',
|
||||
'customer_group')
|
||||
bootinfo.sysdefaults.allow_stale = frappe.db.get_single_value('Accounts Settings',
|
||||
'allow_stale') or 1
|
||||
bootinfo.sysdefaults.allow_stale = cint(frappe.db.get_single_value('Accounts Settings',
|
||||
'allow_stale'))
|
||||
|
||||
bootinfo.notification_settings = frappe.get_doc("Notification Control",
|
||||
"Notification Control")
|
||||
|
||||
@@ -57,7 +57,7 @@ class Item(WebsiteGenerator):
|
||||
if not self.description:
|
||||
self.description = self.item_name
|
||||
|
||||
if self.is_sales_item and not self.is_item_from_hub:
|
||||
if self.is_sales_item and not self.get('is_item_from_hub'):
|
||||
self.publish_in_hub = 1
|
||||
|
||||
def after_insert(self):
|
||||
@@ -91,7 +91,7 @@ class Item(WebsiteGenerator):
|
||||
self.validate_barcode()
|
||||
self.cant_change()
|
||||
self.validate_warehouse_for_reorder()
|
||||
self.update_item_desc()
|
||||
self.update_bom_item_desc()
|
||||
self.synced_with_hub = 0
|
||||
|
||||
self.validate_has_variants()
|
||||
@@ -599,13 +599,27 @@ class Item(WebsiteGenerator):
|
||||
row.label = label
|
||||
row.description = desc
|
||||
|
||||
def update_item_desc(self):
|
||||
if frappe.db.get_value('BOM',self.name, 'description') != self.description:
|
||||
frappe.db.sql("""update `tabBOM` set description = %s where item = %s and docstatus < 2""",(self.description, self.name))
|
||||
frappe.db.sql("""update `tabBOM Item` set description = %s where
|
||||
item_code = %s and docstatus < 2""",(self.description, self.name))
|
||||
frappe.db.sql("""update `tabBOM Explosion Item` set description = %s where
|
||||
item_code = %s and docstatus < 2""",(self.description, self.name))
|
||||
def update_bom_item_desc(self):
|
||||
if self.is_new(): return
|
||||
|
||||
if self.db_get('description') != self.description:
|
||||
frappe.db.sql("""
|
||||
update `tabBOM`
|
||||
set description = %s
|
||||
where item = %s and docstatus < 2
|
||||
""", (self.description, self.name))
|
||||
|
||||
frappe.db.sql("""
|
||||
update `tabBOM Item`
|
||||
set description = %s
|
||||
where item_code = %s and docstatus < 2
|
||||
""", (self.description, self.name))
|
||||
|
||||
frappe.db.sql("""
|
||||
update `tabBOM Explosion Item`
|
||||
set description = %s
|
||||
where item_code = %s and docstatus < 2
|
||||
""", (self.description, self.name))
|
||||
|
||||
def update_template_item(self):
|
||||
"""Set Show in Website for Template Item if True for its Variant"""
|
||||
@@ -624,7 +638,8 @@ class Item(WebsiteGenerator):
|
||||
template_item.save()
|
||||
|
||||
def update_variants(self):
|
||||
if self.flags.dont_update_variants:
|
||||
if self.flags.dont_update_variants or \
|
||||
frappe.db.get_single_value('Item Variant Settings', 'do_not_update_variants'):
|
||||
return
|
||||
if self.has_variants:
|
||||
updated = []
|
||||
|
||||
@@ -12,6 +12,66 @@
|
||||
"editable_grid": 1,
|
||||
"engine": "InnoDB",
|
||||
"fields": [
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "section_break_3",
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"description": "If enabled then system will not update the fields of variants from the template but will copy the data of below mentioned fields while making new variant",
|
||||
"fieldname": "do_not_update_variants",
|
||||
"fieldtype": "Check",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Do not Update Variants",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
@@ -84,8 +144,8 @@
|
||||
"issingle": 1,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-09-11 12:05:16.288601",
|
||||
"modified_by": "rohit@erpnext.com",
|
||||
"modified": "2017-11-08 11:38:12.821404",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Stock",
|
||||
"name": "Item Variant Settings",
|
||||
"name_case": "",
|
||||
|
||||
@@ -32,7 +32,7 @@ class Issue(Document):
|
||||
if email_id:
|
||||
if not self.lead:
|
||||
self.lead = frappe.db.get_value("Lead", {"email_id": email_id})
|
||||
if not self.contact:
|
||||
if not self.contact and not self.customer:
|
||||
self.contact = frappe.db.get_value("Contact", {"email_id": email_id})
|
||||
|
||||
if self.contact:
|
||||
|
||||
@@ -28,11 +28,12 @@ def send_message(subject="Website Query", message="", sender="", status="Open"):
|
||||
)).insert(ignore_permissions=True)
|
||||
|
||||
opportunity = frappe.get_doc(dict(
|
||||
doctype='Opportunity',
|
||||
doctype ='Opportunity',
|
||||
enquiry_from = 'Customer' if customer else 'Lead',
|
||||
status = 'Open',
|
||||
title = subject,
|
||||
to_discuss=message
|
||||
contact_email = sender,
|
||||
to_discuss = message
|
||||
))
|
||||
|
||||
if customer:
|
||||
|
||||
@@ -72,7 +72,6 @@ erpnext/hr/doctype/appraisal/test_appraisal.js
|
||||
erpnext/hr/doctype/expense_claim_type/test_expense_claim_type.js
|
||||
erpnext/hr/doctype/expense_claim/test_expense_claim.js
|
||||
erpnext/hr/doctype/training_event/tests/test_training_event.js
|
||||
erpnext/hr/doctype/training_event/tests/test_training_event_attendance.js
|
||||
erpnext/hr/doctype/training_result_employee/test_training_result.js
|
||||
erpnext/hr/doctype/training_feedback/test_training_feedback.js
|
||||
erpnext/hr/doctype/loan_type/test_loan_type.js
|
||||
|
||||
Reference in New Issue
Block a user