Compare commits

...

78 Commits

Author SHA1 Message Date
Nabin Hait
ed019123e2 Merge branch 'develop' 2017-04-17 15:36:59 +05:30
Nabin Hait
4d1cf53466 bumped to version 8.0.13 2017-04-17 16:06:58 +06:00
Nabin Hait
e2431fd5e9 minor fix 2017-04-17 15:35:36 +05:30
Nabin Hait
d12a4f5e8c Merge branch 'develop' 2017-04-17 15:12:18 +05:30
Nabin Hait
ad65be8250 bumped to version 8.0.12 2017-04-17 15:42:17 +06:00
Manas Solanki
ae30026005 Calender view fix for course schedule 2017-04-17 14:55:54 +05:30
Manas Solanki
54c4240d9c Changes in the program enrollment 2017-04-17 14:55:54 +05:30
Manas Solanki
79683d0871 Added school setting 2017-04-17 14:55:54 +05:30
Manas Solanki
a6d1876958 Changes in course and program 2017-04-17 14:55:54 +05:30
Manas Solanki
346928f2bc changes in program enrollment and tool 2017-04-17 14:55:54 +05:30
Nabin Hait
310d238d17 Merge pull request #8460 from rohitwaghchaure/client_followup_report
Client followup report
2017-04-17 14:13:38 +05:30
Nabin Hait
5e25731188 Update crm_reports.md 2017-04-17 14:13:20 +05:30
Nabin Hait
83ca262e38 Merge pull request #8453 from StrellaGroup/develop
[fix] Stock Entry - Change "Is Sample Item" to "Allow Zero Valuation Rate"
2017-04-17 14:00:12 +05:30
mbauskar
8a2e6f427b [minor] if address is not found then set the address_field to '' instead of None 2017-04-17 13:58:52 +05:30
Faris Ansari
8371c1c4cd Text overflow fix for product text in portal 2017-04-17 13:57:19 +05:30
Julian Robbins
361e7f6ddc Remove typos and use better English 2017-04-17 13:56:53 +05:30
rohitwaghchaure
798fd3484f Merge pull request #8469 from mbauskar/pos-fixes
[minor] POS & RFQ format_number fixes
2017-04-17 13:04:24 +05:30
mbauskar
22cedeb006 [minor] POS & RFQ format_number fixes 2017-04-17 12:24:24 +05:30
Rushabh Mehta
e3c117e32c [fix] validate preferred email if set in employee.py 2017-04-15 16:59:39 +05:30
Nabin Hait
68a8b0c2a9 Merge branch 'develop' 2017-04-14 17:32:37 +05:30
Nabin Hait
307543f968 bumped to version 8.0.11 2017-04-14 18:02:37 +06:00
Rohit Waghchaure
6681b0d2aa Documentation 2017-04-14 17:14:03 +05:30
Javier Wong
54d9c9eaf4 Merge branch 'develop' into develop 2017-04-14 18:33:44 +08:00
Javier Wong
9b11d9b45d [fix] Stock Entry - Change "Is Sample Item" to "Allow Zero Valuation Rate" 2017-04-14 18:24:04 +08:00
mbauskar
cca55ddc33 [minor][hot] fixes for KeyError: from_date for stock balance report 2017-04-14 14:54:11 +05:30
Rohit Waghchaure
1c68509426 [enhance] Report for prospects engaged but not converted 2017-04-14 12:28:59 +05:30
mbauskar
1e05077b1f [minor] sales register report fixes 2017-04-14 09:59:49 +05:30
joezsweet
b81244342f Create en-GB.csv
- added for compatibility with frappe languages
2017-04-13 19:09:06 +05:30
CH
8e92250798 Correction of issue #8354 2017-04-13 18:59:51 +05:30
CH
d20ec25c92 Removal of double brackets to setup the chart of accounts in the setup wizard 2017-04-13 18:59:06 +05:30
Nabin Hait
25bcb14c1d Merge pull request #8440 from mbauskar/cart-fixes
[minor] fides for add to card button issue
2017-04-13 18:49:22 +05:30
Nabin Hait
f6149f1507 Merge pull request #8429 from ckosiegbu/payroll_updates
Statistical Components for Salary Structure
2017-04-13 18:48:47 +05:30
Nabin Hait
2f3585f949 Update salary_slip.js 2017-04-13 18:47:25 +05:30
mbauskar
ed8ad9cfee [minor] fides for add to card button issue 2017-04-13 18:45:09 +05:30
Nabin Hait
3a2727c9eb Merge pull request #8430 from mbauskar/stock-entry-supplier-address
[minor] fetch supplier address, address_display on supplier trigger
2017-04-13 18:45:09 +05:30
Nabin Hait
16d92e7270 Update update_supplier_address_in_stock_entry.py 2017-04-13 18:44:33 +05:30
Nabin Hait
8c7eb444ef Merge pull request #8439 from mbauskar/subsciption-fixes
[minor] validate email address before get update button click
2017-04-13 18:41:49 +05:30
mbauskar
9a0efc7710 [minor] validate email address before get update button click 2017-04-13 18:18:18 +05:30
mbauskar
3ddfce4f17 [patch] move supplier_address to address_display and set supplier_address in SE 2017-04-13 16:46:41 +05:30
ckosiegbu
a236f4e586 Space to Tabs on salary_slip.py 2017-04-13 10:28:10 +01:00
Nabin Hait
0b62c6ebd4 Merge pull request #8432 from mbauskar/bom-tree-fixes
[minor] fixes in bom tree view template
2017-04-13 14:36:45 +05:30
mbauskar
40ca4c3bbb [minor] fixes in bom tree view template 2017-04-13 14:29:19 +05:30
Nabin Hait
c454dc7af5 Merge pull request #8420 from netchampfaris/pos
[POS] Show stock quantity of items
2017-04-13 13:26:58 +05:30
Rushabh Mehta
994cef5ee3 [minor] fix imports in old patches 2017-04-13 13:14:05 +05:30
Faris Ansari
185762aeeb update label 2017-04-13 12:36:08 +05:30
mbauskar
1b32d913a2 [minor] fetch supplier address, address_display on supplier trigger 2017-04-13 11:55:20 +05:30
ckosiegbu
64f29f819a Introduce the ability to specify in a Salary Structure that a component is statistical. This allows components to be used in calculations without being added/deducted from earnings deductions. 2017-04-13 00:00:37 +01:00
Nabin Hait
2efe05c1ce Merge pull request #8263 from frappe/revert-8126-issue8094
Revert "Add link field Package Code (fixes #8094)"
2017-04-12 19:50:43 +05:30
Nabin Hait
17c675547d Merge branch 'develop' 2017-04-12 19:00:52 +05:30
Nabin Hait
a220e96867 bumped to version 8.0.10 2017-04-12 19:30:52 +06:00
mbauskar
e471b02172 [minor] if packed item warehouse not found then set the parent item warehouse to packed items 2017-04-12 18:51:01 +05:30
Faris Ansari
19f90e984e [POS] Show stock quantity of items
- frappe/erpnext#8247
2017-04-12 16:06:31 +05:30
Faris Ansari
b5608f9b14 [fix] Default Print Format for Sales Invoice (#8419)
- frappe/erpnext#8416
2017-04-12 15:31:01 +05:30
rohitwaghchaure
5adce495aa Merge pull request #8417 from rohitwaghchaure/due_date_issue
[fix] POS, Due Date cannot be before Posting Date
2017-04-12 14:43:21 +05:30
Rushabh Mehta
66272a168d [minor] README.md + encode query parameter in search 2017-04-12 14:32:07 +05:30
Rohit Waghchaure
2192c244c0 [fix] POS, Due Date cannot be before Posting Date 2017-04-12 13:19:05 +05:30
Makarand Bauskar
141c244ece [minor] added order by args to get_*_list methods (#8413) 2017-04-12 13:02:28 +05:30
Nabin Hait
a57b020620 Merge branch 'develop' 2017-04-11 19:14:12 +05:30
Nabin Hait
d1fda1ff2b bumped to version 8.0.9 2017-04-11 19:44:12 +06:00
mbauskar
b9d0e7622a [translation] translation updates for - erpnext on 2017-04-04 2017-04-11 18:57:48 +05:30
mbauskar
2f9703c20e [minor] set company_currency as account_currency in general ledger if party type is employee 2017-04-11 18:56:41 +05:30
Khairil Zhafri
46b6d4ea47 Update student.json
Less binary gender option for Student
2017-04-11 18:55:31 +05:30
Khairil Zhafri
417145bec5 Update employee.json
Less binary gender options for Employee
2017-04-11 18:55:20 +05:30
Rohit Waghchaure
1ff1368280 [fix] Vehicle expense report not working 2017-04-11 18:54:32 +05:30
joezsweet
768a888bf2 [fix] validate supplier invoice
- modified to check for the selected supplier only
2017-04-11 18:52:46 +05:30
Julian Robbins
8037a0e3d5 Update assignment.md
A typo and improvement tom English
2017-04-11 18:51:34 +05:30
mbauskar
0b665ac791 [minor] don't throw error for buying transactions if price list is not selected 2017-04-11 18:51:12 +05:30
Rohit Waghchaure
87ad6d074a [enhance] Stock qty added in purchase invoice 2017-04-11 18:29:52 +05:30
Kanchan Chauhan
95108ac80b [Minor] Party validation for Employee 2017-04-11 18:29:27 +05:30
Dominik Ottenbreit
9b9777be3f Fix mistranslation "Lieferantennauftrag" -> "Bestellung"
There is the strange term of "Lieferantenauftrag" that has been used for
"Purchase Order" which translates to "Supplier Order". This is not
standard at all and should be fixed to "Bestellung".

A Google search for "Bestellung" returns 97 million results, a search
for "Lieferantenauftrag" returns 972 results so it should be clear what
is standard.
2017-04-11 18:28:35 +05:30
Nabin Hait
075b299673 bom traversing: argument mutable issue 2017-04-11 18:27:34 +05:30
mbauskar
e0271a8331 [minor] ReferenceError:doc fixes for delivery note 2017-04-11 17:54:22 +05:30
mbauskar
236f7aac7f [minor] track changes for transaction documents 2017-04-10 14:48:54 +05:30
Manas Solanki
29ee263093 Fix in student attendacne tool 2017-04-10 14:33:35 +05:30
Makarand Bauskar
4782e8b751 [minor] added safe_eval for status_updater and added getdate and nowdate (#8365) 2017-04-07 17:16:16 +05:30
Rushabh Mehta
b58979fd3e [added] frappe.safe_eval 2017-04-06 18:58:39 +05:30
Rushabh Mehta
9365641777 [added] frappe.safe_eval 2017-04-06 18:24:34 +05:30
Rushabh Mehta
9d9cb8b7b1 Revert "Add link field Package Code (fixes #8094)" 2017-03-31 14:35:23 +05:30
125 changed files with 4382 additions and 3709 deletions

View File

@@ -38,6 +38,14 @@ The ERPNext code is licensed as GNU General Public License (v3) and the Document
---
## Contributing
1. [Pull Request Requirements](https://github.com/frappe/erpnext/wiki/Pull-Request-Guidelines)
1. [Translations](https://translate.erpnext.com)
1. [Chart of Accounts](https://charts.erpnext.com)
---
## Logo and Trademark
The brand name ERPNext and the logo are trademarks of Frappe Technologies Pvt. Ltd.

View File

@@ -2,7 +2,7 @@
from __future__ import unicode_literals
import frappe
__version__ = '8.0.8'
__version__ = '8.0.13'
def get_default_company(user=None):
'''Get default company for user'''

View File

@@ -1,5 +1,6 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 1,
"allow_rename": 0,
"autoname": "naming_series:",
@@ -1325,19 +1326,19 @@
"unique": 0
}
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"icon": "fa fa-file-text",
"idx": 176,
"image_view": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 1,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
"modified": "2017-02-17 16:17:48.991851",
"modified": "2017-04-10 12:07:44.599804",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Journal Entry",
@@ -1412,6 +1413,6 @@
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "title",
"track_changes": 0,
"track_changes": 1,
"track_seen": 0
}

View File

@@ -1675,7 +1675,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2017-03-14 17:12:48.816644",
"modified": "2017-04-10 12:06:22.176045",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Entry",
@@ -1730,6 +1730,6 @@
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "title",
"track_changes": 0,
"track_changes": 1,
"track_seen": 0
}

View File

@@ -3646,7 +3646,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
"modified": "2017-03-15 14:29:51.957287",
"modified": "2017-04-10 12:05:28.082020",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Invoice",
@@ -3762,6 +3762,6 @@
"sort_order": "DESC",
"timeline_field": "supplier",
"title_field": "title",
"track_changes": 0,
"track_changes": 1,
"track_seen": 0
}

View File

@@ -628,10 +628,12 @@ class PurchaseInvoice(BuyingController):
pi = frappe.db.sql('''select name from `tabPurchase Invoice`
where
bill_no = %(bill_no)s
and supplier = %(supplier)s
and name != %(name)s
and docstatus < 2
and posting_date between %(year_start_date)s and %(year_end_date)s''', {
"bill_no": self.bill_no,
"supplier": self.supplier,
"name": self.name,
"year_start_date": fiscal_year.year_start_date,
"year_end_date": fiscal_year.year_end_date

View File

@@ -1,5 +1,6 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"autoname": "hash",
@@ -335,6 +336,36 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "stock_uom",
"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": "Stock UOM",
"length": 0,
"no_copy": 0,
"options": "UOM",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -419,6 +450,35 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "stock_qty",
"fieldtype": "Float",
"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": "Stock Qty",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -1366,7 +1426,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "is_sample_item",
"fieldname": "allow_zero_valuation_rate",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
@@ -1375,7 +1435,7 @@
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Sample Item",
"label": "Allow Zero Valuation Rate",
"length": 0,
"no_copy": 1,
"permlevel": 0,
@@ -1869,17 +1929,17 @@
"unique": 0
}
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 1,
"image_view": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2017-02-17 16:28:26.719053",
"modified": "2017-04-17 13:44:17.460674",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Invoice Item",

View File

@@ -296,9 +296,9 @@ def make_invoice(doc_list={}, email_queue_list={}, customers_list={}):
if not frappe.db.exists('Sales Invoice', {'offline_pos_name': name}):
validate_records(doc)
si_doc = frappe.new_doc('Sales Invoice')
si_doc.due_date = doc.get('posting_date')
si_doc.offline_pos_name = name
si_doc.update(doc)
si_doc.due_date = doc.get('posting_date')
submit_invoice(si_doc, name, doc)
name_list.append(name)
else:
@@ -404,4 +404,5 @@ def save_invoice(e, si_doc, name):
if not frappe.db.exists('Sales Invoice', {'offline_pos_name': name}):
si_doc.docstatus = 0
si_doc.flags.ignore_mandatory = True
si_doc.due_date = si_doc.posting_date
si_doc.insert()

View File

@@ -7,7 +7,7 @@
"beta": 0,
"creation": "2013-05-24 19:29:05",
"custom": 0,
"default_print_format": "Sample Print",
"default_print_format": "",
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
@@ -4417,8 +4417,8 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
"modified": "2017-03-29 05:09:56.656338",
"modified_by": "Administrator",
"modified": "2017-04-12 15:11:45.931485",
"modified_by": "faris@erpnext.com",
"module": "Accounts",
"name": "Sales Invoice",
"owner": "Administrator",
@@ -4513,6 +4513,6 @@
"sort_order": "DESC",
"timeline_field": "customer",
"title_field": "title",
"track_changes": 0,
"track_changes": 1,
"track_seen": 0
}

View File

@@ -1552,7 +1552,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "is_sample_item",
"fieldname": "allow_zero_valuation_rate",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
@@ -1561,7 +1561,7 @@
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Sample Item",
"label": "Allow Zero Valuation Rate",
"length": 0,
"no_copy": 1,
"permlevel": 0,
@@ -2094,7 +2094,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2017-03-30 16:26:36.507924",
"modified": "2017-04-05 23:28:13.520429",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice Item",

View File

@@ -951,6 +951,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
item_price: format_currency(me.price_list_data[obj.name], me.frm.doc.currency),
item_name: obj.name === obj.item_name ? "" : obj.item_name,
item_image: obj.image,
item_stock: __('Stock Qty') + ": " + me.get_actual_qty(obj),
color: frappe.get_palette(obj.item_name),
abbr: frappe.get_abbr(obj.item_name)
})).tooltip().appendTo($wrap);
@@ -1355,7 +1356,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
discount_percentage: d.discount_percentage || 0.0,
actual_qty: me.actual_qty_dict[d.item_code] || 0.0,
projected_qty: d.projected_qty,
rate: format_number(d.rate, me.frm.doc.currency),
rate: format_currency(d.rate, me.frm.doc.currency),
enabled: me.pos_profile_data["allow_user_to_edit_rate"] ? true : false,
amount: format_currency(d.amount, me.frm.doc.currency),
selected_class: (me.item_code == d.item_code) ? "active" : ""

View File

@@ -341,7 +341,7 @@ def validate_party_frozen_disabled(party_type, party_name):
elif party_type == "Employee":
if frappe.db.get_value("Employee", party_name, "status") == "Left":
frappe.msgprint(_("{0} {1} is not active").format(party_type, party_name), PartyDisabled, alert=True)
frappe.msgprint(_("{0} {1} is not active").format(party_type, party_name), alert=True)
def get_timeline_data(doctype, name):
'''returns timeline data for the past one year'''

View File

@@ -7,10 +7,10 @@
"docstatus": 0,
"doctype": "Print Format",
"font": "Default",
"html": "<style>\n\t.print-format table, .print-format tr, \n\t.print-format td, .print-format div, .print-format p {\n\t\tfont-family: Monospace;\n\t\tline-height: 200%;\n\t\tvertical-align: middle;\n\t}\n\t@media screen {\n\t\t.print-format {\n\t\t\twidth: 4in;\n\t\t\tpadding: 0.25in;\n\t\t\tmin-height: 8in;\n\t\t}\n\t}\n</style>\n\n<p class=\"text-center\">\n\t{{ company }}<br>\n\t{{ __(\"POS No : \") }}{{offline_pos_name}}<br>\n</p>\n<p>\n\t<b>{{ __(\"Date\") }}:</b> {{ dateutil.global_date_format(posting_date) }}<br>\n</p>\n\n<hr>\n<table class=\"table table-condensed cart no-border\">\n\t<thead>\n\t\t<tr>\n\t\t\t<th width=\"50%\">{{ __(\"Item\") }}</b></th>\n\t\t\t<th width=\"25%\" class=\"text-right\">{{ __(\"Qty\") }}</th>\n\t\t\t<th width=\"25%\" class=\"text-right\">{{ __(\"Amount\") }}</th>\n\t\t</tr>\n\t</thead>\n\t<tbody>\n\t\t{% for item in items %}\n\t\t<tr>\n\t\t\t<td>\n\t\t\t\t{{ item.item_name }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">{{ format_number(item.qty, precision(\"difference\")) }}<br>@ {{ format_currency(item.rate, currency) }}</td>\n\t\t\t<td class=\"text-right\">{{ format_currency(item.amount, currency) }}</td>\n\t\t</tr>\n\t\t{% endfor %}\n\t</tbody>\n</table>\n\n<table class=\"table table-condensed no-border\">\n\t<tbody>\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 70%\">\n\t\t\t\t{{ __(\"Net Total\") }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(total, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t\t{% for row in taxes %}\n\t\t{% if not row.included_in_print_rate %}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 70%\">\n\t\t\t\t{{ row.description }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(row.tax_amount, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t\t{% endif %}\n\t\t{% endfor %}\n\t\t{% if discount_amount %}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 75%\">\n\t\t\t\t{{ __(\"Discount\") }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(discount_amount, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t\t{% endif %}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 75%\">\n\t\t\t\t<b>{{ __(\"Grand Total\") }}</b>\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(grand_total, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 75%\">\n\t\t\t\t<b>{{ __(\"Paid Amount\") }}</b>\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(paid_amount, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t</tbody>\n</table>\n\n\n<hr>\n<p>{{ terms }}</p>\n<p class=\"text-center\">{{ __(\"Thank you, please visit again.\") }}</p>",
"html": "<style>\n\t.print-format table, .print-format tr, \n\t.print-format td, .print-format div, .print-format p {\n\t\tfont-family: Monospace;\n\t\tline-height: 200%;\n\t\tvertical-align: middle;\n\t}\n\t@media screen {\n\t\t.print-format {\n\t\t\twidth: 4in;\n\t\t\tpadding: 0.25in;\n\t\t\tmin-height: 8in;\n\t\t}\n\t}\n</style>\n\n<p class=\"text-center\">\n\t{{ company }}<br>\n\t{{ __(\"POS No : \") }}{{offline_pos_name}}<br>\n</p>\n<p>\n\t<b>{{ __(\"Date\") }}:</b> {{ dateutil.global_date_format(posting_date) }}<br>\n</p>\n\n<hr>\n<table class=\"table table-condensed cart no-border\">\n\t<thead>\n\t\t<tr>\n\t\t\t<th width=\"50%\">{{ __(\"Item\") }}</b></th>\n\t\t\t<th width=\"25%\" class=\"text-right\">{{ __(\"Qty\") }}</th>\n\t\t\t<th width=\"25%\" class=\"text-right\">{{ __(\"Amount\") }}</th>\n\t\t</tr>\n\t</thead>\n\t<tbody>\n\t\t{% for item in items %}\n\t\t<tr>\n\t\t\t<td>\n\t\t\t\t{{ item.item_name }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">{{ format_number(item.qty, null,precision(\"difference\")) }}<br>@ {{ format_currency(item.rate, currency) }}</td>\n\t\t\t<td class=\"text-right\">{{ format_currency(item.amount, currency) }}</td>\n\t\t</tr>\n\t\t{% endfor %}\n\t</tbody>\n</table>\n\n<table class=\"table table-condensed no-border\">\n\t<tbody>\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 70%\">\n\t\t\t\t{{ __(\"Net Total\") }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(total, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t\t{% for row in taxes %}\n\t\t{% if not row.included_in_print_rate %}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 70%\">\n\t\t\t\t{{ row.description }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(row.tax_amount, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t\t{% endif %}\n\t\t{% endfor %}\n\t\t{% if discount_amount %}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 75%\">\n\t\t\t\t{{ __(\"Discount\") }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(discount_amount, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t\t{% endif %}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 75%\">\n\t\t\t\t<b>{{ __(\"Grand Total\") }}</b>\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(grand_total, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 75%\">\n\t\t\t\t<b>{{ __(\"Paid Amount\") }}</b>\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(paid_amount, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t</tbody>\n</table>\n\n\n<hr>\n<p>{{ terms }}</p>\n<p class=\"text-center\">{{ __(\"Thank you, please visit again.\") }}</p>",
"idx": 0,
"line_breaks": 0,
"modified": "2017-01-12 14:56:12.571032",
"modified": "2017-04-17 12:12:00.153763",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Point of Sale",

View File

@@ -66,7 +66,8 @@ def set_account_currency(filters):
if gle_currency:
account_currency = gle_currency
else:
account_currency = frappe.db.get_value(filters.party_type, filters.party, "default_currency")
account_currency = None if filters.party_type == "Employee" else \
frappe.db.get_value(filters.party_type, filters.party, "default_currency")
filters["account_currency"] = account_currency or filters.company_currency

View File

@@ -7,7 +7,7 @@ from frappe.utils import flt
from frappe import msgprint, _
def execute(filters=None):
if not filters: filters = {}
if not filters: filters = frappe._dict({})
invoice_list = get_invoices(filters)
columns, income_accounts, tax_accounts = get_columns(invoice_list)

View File

@@ -340,7 +340,8 @@ def make_stock_entry(purchase_order, item_code):
stock_entry.purchase_order = purchase_order.name
stock_entry.supplier = purchase_order.supplier
stock_entry.supplier_name = purchase_order.supplier_name
stock_entry.supplier_address = purchase_order.address_display
stock_entry.supplier_address = purchase_order.supplier_address
stock_entry.address_display = purchase_order.address_display
stock_entry.company = purchase_order.company
stock_entry.from_bom = 1
po_item = [d for d in purchase_order.items if d.item_code == item_code][0]

View File

@@ -32,6 +32,12 @@ def get_data():
"label": _("Reports"),
"icon": "fa fa-list",
"items": [
{
"type": "report",
"is_query_report": True,
"name": "Lead Details",
"doctype": "Lead"
},
{
"type": "page",
"name": "sales-funnel",
@@ -40,15 +46,15 @@ def get_data():
},
{
"type": "report",
"name": "Minutes to First Response for Opportunity",
"doctype": "Opportunity",
"name": "Prospects Engaged But Not Converted",
"doctype": "Lead",
"is_query_report": True
},
{
"type": "report",
"is_query_report": True,
"name": "Lead Details",
"doctype": "Lead"
"name": "Minutes to First Response for Opportunity",
"doctype": "Opportunity",
"is_query_report": True
},
{
"type": "report",

View File

@@ -106,7 +106,7 @@ def get_data():
{
"type": "doctype",
"name": "Course Schedule",
"route": "Calendar/Course Schedule"
"route": "List/Course Schedule/Calendar"
},
{
"type": "doctype",
@@ -205,6 +205,10 @@ def get_data():
{
"type": "doctype",
"name": "Academic Year"
},
{
"type": "doctype",
"name": "School Settings"
}
]
},

View File

@@ -203,7 +203,7 @@ class SellingController(StockController):
if p.parent_detail_docname == d.name and p.parent_item == d.item_code:
# the packing details table's qty is already multiplied with parent's qty
il.append(frappe._dict({
'warehouse': p.warehouse,
'warehouse': p.warehouse or d.warehouse,
'item_code': p.item_code,
'qty': flt(p.qty),
'uom': p.uom,

View File

@@ -119,7 +119,7 @@ class StatusUpdater(Document):
self.status = s[0]
break
elif s[1].startswith("eval:"):
if eval(s[1][5:]):
if frappe.safe_eval(s[1][5:], None, { "self": self.as_dict(), "getdate": getdate, "nowdate": nowdate }):
self.status = s[0]
break
elif getattr(self, s[1])():

View File

@@ -54,14 +54,14 @@ class StockController(AccountsController):
self.check_expense_account(item_row)
# If item is not a sample item
# If the item does not have the allow zero valuation rate flag set
# and ( valuation rate not mentioned in an incoming entry
# or incoming entry not found while delivering the item),
# try to pick valuation rate from previous sle or Item master and update in SLE
# Otherwise, throw an exception
if not sle.stock_value_difference and self.doctype != "Stock Reconciliation" \
and not item_row.get("is_sample_item"):
and not item_row.get("allow_zero_valuation_rate"):
sle = self.update_stock_ledger_entries(sle)

View File

@@ -140,20 +140,16 @@ def period_wise_columns_query(filters, trans):
else:
trans_date = 'transaction_date'
qty_field = "t2.stock_qty"
if trans == 'Purchase Invoice':
qty_field = "t2.qty"
if filters.get("period") != 'Yearly':
for dt in bet_dates:
get_period_wise_columns(dt, filters.get("period"), pwc)
query_details = get_period_wise_query(dt, trans_date, query_details, qty_field)
query_details = get_period_wise_query(dt, trans_date, query_details)
else:
pwc = [_(filters.get("fiscal_year")) + " ("+_("Qty") + "):Float:120",
_(filters.get("fiscal_year")) + " ("+ _("Amt") + "):Currency:120"]
query_details = " SUM(%s), SUM(t2.base_net_amount),"%(qty_field)
query_details = " SUM(t2.stock_qty), SUM(t2.base_net_amount),"
query_details += 'SUM(%s), SUM(t2.base_net_amount)'%(qty_field)
query_details += 'SUM(t2.stock_qty), SUM(t2.base_net_amount)'
return pwc, query_details
def get_period_wise_columns(bet_dates, period, pwc):
@@ -164,10 +160,10 @@ def get_period_wise_columns(bet_dates, period, pwc):
pwc += [_(get_mon(bet_dates[0])) + "-" + _(get_mon(bet_dates[1])) + " (" + _("Qty") + "):Float:120",
_(get_mon(bet_dates[0])) + "-" + _(get_mon(bet_dates[1])) + " (" + _("Amt") + "):Currency:120"]
def get_period_wise_query(bet_dates, trans_date, query_details, qty_field):
query_details += """SUM(IF(t1.%(trans_date)s BETWEEN '%(sd)s' AND '%(ed)s', %(qty_field)s, NULL)),
def get_period_wise_query(bet_dates, trans_date, query_details):
query_details += """SUM(IF(t1.%(trans_date)s BETWEEN '%(sd)s' AND '%(ed)s', t2.stock_qty, NULL)),
SUM(IF(t1.%(trans_date)s BETWEEN '%(sd)s' AND '%(ed)s', t2.base_net_amount, NULL)),
""" % {"trans_date": trans_date, "sd": bet_dates[0],"ed": bet_dates[1], "qty_field": qty_field}
""" % {"trans_date": trans_date, "sd": bet_dates[0],"ed": bet_dates[1]}
return query_details
@frappe.whitelist(allow_guest=True)

View File

@@ -18,7 +18,7 @@ def get_list_context(context=None):
"get_list": get_transaction_list
}
def get_transaction_list(doctype, txt=None, filters=None, limit_start=0, limit_page_length=20):
def get_transaction_list(doctype, txt=None, filters=None, limit_start=0, limit_page_length=20, order_by="modified"):
from frappe.www.list import get_list
user = frappe.session.user
key = None

View File

@@ -0,0 +1,25 @@
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.query_reports["Prospects Engaged But Not Converted"] = {
"filters": [
{
"fieldname": "lead",
"label": __("Lead"),
"fieldtype": "Link",
"options": "Lead"
},
{
"fieldname": "no_of_interaction",
"label": __("Number of Interaction"),
"fieldtype": "Int",
"default": 1
},
{
"fieldname": "lead_age",
"label": __("Minimum Lead Age (Days)"),
"fieldtype": "Int",
"default": 60
},
]
}

View File

@@ -0,0 +1,29 @@
{
"add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2017-04-04 08:25:40.491063",
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
"idx": 0,
"is_standard": "Yes",
"modified": "2017-04-04 10:00:10.253224",
"modified_by": "Administrator",
"module": "CRM",
"name": "Prospects Engaged But Not Converted",
"owner": "Administrator",
"ref_doctype": "Lead",
"report_name": "Prospects Engaged But Not Converted",
"report_type": "Script Report",
"roles": [
{
"role": "Sales User"
},
{
"role": "Sales Manager"
},
{
"role": "System Manager"
}
]
}

View File

@@ -0,0 +1,74 @@
# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.utils import add_days, now
def execute(filters=None):
columns, data = [], []
set_defaut_value_for_filters(filters)
columns = get_columns()
data = get_data(filters)
return columns, data
def set_defaut_value_for_filters(filters):
if not filters.get('no_of_interaction'): filters["no_of_interaction"] = 1
if not filters.get('lead_age'): filters["lead_age"] = 60
def get_columns():
return [
_("Lead") + ":Link/Lead:100",
_("Name") + "::100",
_("Organization") + "::100",
_("Reference Document") + "::150",
_("Reference Name") + ":Dynamic Link/"+_("Reference Document")+":120",
_("Last Communication") + ":Data:200",
_("Last Communication Date") + ":Date:180"
]
def get_data(filters):
lead_details = []
lead_filters = get_lead_filters(filters)
for lead in frappe.get_all('Lead', fields = ['name', 'lead_name', 'company_name'], filters=lead_filters):
data = frappe.db.sql("""
select
`tabCommunication`.reference_doctype, `tabCommunication`.reference_name,
`tabCommunication`.content, `tabCommunication`.communication_date
from
(
(select name, lead from `tabOpportunity` where lead = %(lead)s)
union
(select name, lead from `tabQuotation` where lead = %(lead)s)
union
(select name, lead from `tabIssue` where lead = %(lead)s and status!='Closed')
union
(select %(lead)s, %(lead)s)
)
as ref_document, `tabCommunication`
where
`tabCommunication`.reference_name = ref_document.name and
`tabCommunication`.sent_or_received = 'Received'
order by
ref_document.lead, `tabCommunication`.creation desc limit %(limit)s""",
{'lead': lead.name, 'limit': filters.get('no_of_interaction')})
for lead_info in data:
lead_data = [lead.name, lead.lead_name, lead.company_name] + list(lead_info)
lead_details.append(lead_data)
return lead_details
def get_lead_filters(filters):
lead_creation_date = get_creation_date_based_on_lead_age(filters)
lead_filters = [["status", "!=", "Converted"], ["creation", ">", lead_creation_date]]
if filters.get('lead'):
lead_filters.append(["name", "=", filters.get('lead')])
return lead_filters
def get_creation_date_based_on_lead_age(filters):
return add_days(now(), (filters.get('lead_age') * -1))

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

View File

@@ -640,8 +640,8 @@ attach them to the start of each source file to most effectively state
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.</p>
<pre><code> &lt;one line="" to="" give="" the="" program's="" name="" and="" a="" brief="" idea="" of="" what="" it="" does.=""&gt;
Copyright (C) &lt;year&gt; &lt;name of="" author=""&gt;
<pre><code> &lt;one line to give the program's name and a brief idea of what it does.&gt;
Copyright (C) &lt;year&gt; &lt;name of author&gt;
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@@ -0,0 +1,40 @@
CRM module's reports helps users to get the information about the prospects. Using Following reports, user can analyze the data about prospect's history with a company and will helps user to build strong relationships with them.
###Lead Details
It has data about the leads and their contact and address details.
<img alt="Lead Details" class="screenshot"
src="{{docs_base_url}}/assets/img/crm/report/lead.png">
###Sales Funnel
By using the sales funnel report, and by quantifying the number of prospects at each stage of the process, you can get an idea of your potential customers.
More than this, by looking at the way these numbers change over time, you can identify problems in the sales pipeline and take any corrective action at the early stage.
For example, if you notice that very few communications with the prospects has taken place in a month which might indicate a decrease in the sales. From the next month, organization should make sure that more communications has to take place with the prospects.
<img alt="Lead Details" class="screenshot"
src="{{docs_base_url}}/assets/img/crm/report/sales_funnel.png">
###Prospects Engaged But Not Converted
Using this report, user gets the information about the leads who has shown interest in the business with you but due to some reason they were not converted into the customers.
<img alt="Lead Details" class="screenshot"
src="{{docs_base_url}}/assets/img/crm/report/prospects_engaged_but_not_converted.png">
###Minutes to First Response for Opportunity
Immediacy is so important and so valued
In this internet area, we all expect a quicker response time to any of our query. This report gives you the information about the first response time given to an opportunities or issues. Using this report, the organization can improve their first response time to the prospects which can help to the better sales in the future.
<img alt="Lead Details" class="screenshot"
src="{{docs_base_url}}/assets/img/crm/report/minutes_to_first_response.png">
###Customer Addresses And Contacts
It has data about the customers and their contact and address details.
<img alt="Lead Details" class="screenshot"
src="{{docs_base_url}}/assets/img/crm/report/customer_address_and_contact.png">
###Inactive Customers
This report shows the list of customers who has not purchased since long time.
<img alt="Lead Details" class="screenshot"
src="{{docs_base_url}}/assets/img/crm/report/inactive_customers.png">

View File

@@ -3,4 +3,5 @@ customer
opportunity
contact
newsletter
crm_reports
setup

View File

@@ -1,7 +1,7 @@
<img class="screenshot" alt="Production Order" src="{{docs_base_url}}/assets/img/manufacturing/manufacturing-flow.png">
Production Order (also called as Work Order) is a document that is given to
A Production Order (also known as a Work Order) is a document that is given to
the manufacturing shop floor by the Production Planner as a signal to produce
a certain quantity of a certain Item. Production Order also helps to generate
a certain quantity of a certain Item. The Production Order also helps to generate
the material requirements (Stock Entry) for the Item to be produced from its
**Bill of Materials**.
@@ -66,8 +66,8 @@ by:
* Progress in the Production Order can be tracked using [Timesheet]({{docs_base_url}}/user/manual/en/projects/timesheet/timesheet-against-production-order.html)
* Timesheet's time slots are created against Production Order Operations.
* Drafts of Timesheet is created based on the scheduled operations when an Production Order is Submitted.
* To create more Timesheet against an operation click 'Make Timesheet' button.
* Drafts of Timesheet are created based on the scheduled operations when an Production Order is Submitted.
* To create more Timesheets against an operation click 'Make Timesheet' button.
<img class="screenshot" alt="Make timesheet against PO" src="{{docs_base_url}}/assets/img/manufacturing/PO-operations-make-ts.png">
@@ -88,7 +88,7 @@ by:
### Stopping a Production Order
* When you stop a Production Order its status is changed to Stop indicating that all production process against that Production Order is to be ceased.
* To stop the Production Order click on the 'stop' Button
* To stop the Production Order click on the 'Stop' Button
1. On Submitting the Production Order, the system will reserve a slot for each of the Production Order Operations serially after the planned start date based on the workstation availability. The Workstation availability depends on the Workstation timings, holiday list and if some other Production Order Operation was scheduled in that slot. You can mention the number of days for the system to try scheduling the operations in the Manufacturing Settings. This is set to 30 Days by default. If the operation requires time exceeding the available slot, system shall ask you to break the operations. Once the scheduling is done system shall create Time Logs and save them. You can Modify them and submit them later.
2. You can also create additional time logs against an Operation. For doing so select the respective operation and click on 'Make Time Log'
@@ -98,7 +98,7 @@ by:
<img class="screenshot" alt="PO - stop" src="{{docs_base_url}}/assets/img/manufacturing/PO-stop.png">
* You can Also re-start a stopped Production Order.
* You can also re-start a stopped Production Order.
> Note : In order to make a Production Order against an Item you must specify 'Yes' to "Allow Production Order" on the Item form.

View File

@@ -22,7 +22,7 @@ With assignment, you can also leave a comment for the review of assignee.
####ToDo List of Assignee
This transaction will appear in the To-do list of the ser in “Todo” section.
This transaction will appear in the To-do list of the user in “Todo” section.
<img class="screenshot" alt="Assign" src="{{docs_base_url}}/assets/img/collaboration-tools/assign-3.png">
@@ -32,6 +32,6 @@ User will be able to remove assignment by clicking on "Assignment Completed" but
<img class="screenshot" alt="Assign" src="{{docs_base_url}}/assets/img/collaboration-tools/assign-4.png">
Once assignment is set as completed, Status of its ToDo record will be set as Closed.
Once assignment is set as completed, the Status of its ToDo record will be set as Closed.
{next}

View File

@@ -417,7 +417,7 @@
"no_copy": 0,
"oldfieldname": "gender",
"oldfieldtype": "Select",
"options": "\nMale\nFemale",
"options": "\nMale\nFemale\nOther",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,

View File

@@ -157,7 +157,7 @@ class Employee(Document):
delete_events(self.doctype, self.name)
def validate_prefered_email(self):
if not self.get(scrub(self.prefered_contact_email)):
if self.prefered_contact_email and not self.get(scrub(self.prefered_contact_email)):
frappe.msgprint(_("Please enter " + self.prefered_contact_email))

View File

@@ -934,7 +934,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
"modified": "2017-03-08 06:28:46.142302",
"modified": "2017-04-10 12:15:20.363859",
"modified_by": "Administrator",
"module": "HR",
"name": "Expense Claim",

View File

@@ -1,5 +1,6 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"beta": 0,
@@ -21,7 +22,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Component",
"length": 0,
"no_copy": 0,
@@ -31,6 +34,7 @@
"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,
@@ -49,7 +53,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Abbr",
"length": 0,
"no_copy": 0,
@@ -59,6 +65,65 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "column_break_3",
"fieldtype": "Column 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_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"description": "If selected, the value specified or calculated in this component will not contribute to the earnings or deductions. However, it's value can be referenced by other components that can be added or deducted. ",
"fieldname": "statistical_component",
"fieldtype": "Check",
"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": "Statistical Component",
"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,
@@ -76,7 +141,9 @@
"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,
@@ -84,6 +151,7 @@
"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,
@@ -102,7 +170,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Condition",
"length": 0,
"no_copy": 0,
@@ -111,6 +181,7 @@
"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,
@@ -130,7 +201,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amount based on formula",
"length": 0,
"no_copy": 0,
@@ -140,6 +213,7 @@
"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,
@@ -160,7 +234,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Formula",
"length": 0,
"no_copy": 0,
@@ -169,6 +245,7 @@
"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,
@@ -187,7 +264,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Amount",
"length": 0,
"no_copy": 0,
@@ -197,6 +276,7 @@
"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,
@@ -215,7 +295,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Depends on Leave Without Pay",
"length": 0,
"no_copy": 0,
@@ -224,6 +306,7 @@
"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,
@@ -242,7 +325,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Default Amount",
"length": 0,
"no_copy": 0,
@@ -252,6 +337,7 @@
"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,
@@ -270,7 +356,9 @@
"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,
@@ -278,6 +366,7 @@
"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,
@@ -296,7 +385,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Condition and Formula Help",
"length": 0,
"no_copy": 0,
@@ -306,6 +397,7 @@
"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,
@@ -313,18 +405,18 @@
"unique": 0
}
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
"image_view": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2016-09-20 05:29:26.373992",
"modified_by": "Administrator",
"modified": "2017-04-13 00:47:33.980646",
"modified_by": "chude.osiegbu@manqala.com",
"module": "HR",
"name": "Salary Detail",
"name_case": "",
@@ -333,7 +425,9 @@
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 0,
"track_seen": 0
}

View File

@@ -39,7 +39,7 @@ frappe.ui.form.on("Salary Slip", {
refresh: function(frm) {
frm.trigger("toggle_fields")
frm.trigger("toggle_reqd_fields")
salary_detail_fields = ['formula', 'abbr']
salary_detail_fields = ['formula', 'abbr', 'statistical_component']
cur_frm.fields_dict['earnings'].grid.set_column_disp(salary_detail_fields,false);
cur_frm.fields_dict['deductions'].grid.set_column_disp(salary_detail_fields,false);
},
@@ -138,7 +138,6 @@ var calculate_earning_total = function(doc, dt, dn, reset_amount) {
refresh_field('amount', tbl[i].name, 'earnings');
}
total_earn += flt(tbl[i].amount);
}
doc.gross_pay = total_earn;
refresh_many(['amount','gross_pay']);

View File

@@ -54,7 +54,7 @@ class SalarySlip(TransactionBase):
for key in ('earnings', 'deductions'):
for struct_row in self._salary_structure_doc.get(key):
amount = self.eval_condition_and_formula(struct_row, data)
if amount:
if amount and struct_row.statistical_component == 0:
self.update_component_row(struct_row, amount, key)
def update_component_row(self, struct_row, amount, key):
@@ -76,24 +76,24 @@ class SalarySlip(TransactionBase):
def eval_condition_and_formula(self, d, data):
try:
if d.condition:
if not eval(d.condition, {}, data):
if not frappe.safe_eval(d.condition, None, data):
return None
amount = d.amount
if d.amount_based_on_formula:
if d.formula:
amount = eval(d.formula, None, data)
amount = frappe.safe_eval(d.formula, None, data)
if amount:
data[d.abbr] = amount
return amount
except NameError as err:
frappe.throw(_("Name error: {0}".format(err)))
frappe.throw(_("Name error: {0}".format(err)))
except SyntaxError as err:
frappe.throw(_("Syntax error in formula or condition: {0}".format(err)))
frappe.throw(_("Syntax error in formula or condition: {0}".format(err)))
except Exception, e:
frappe.throw(_("Error in formula or condition: {0}".format(e)))
raise
frappe.throw(_("Error in formula or condition: {0}".format(e)))
raise
def get_data_for_eval(self):
'''Returns data for evaluating formula'''

View File

@@ -22,18 +22,6 @@ frappe.require("assets/erpnext/js/financial_statements.js", function() {
query_report.trigger_refresh();
});
}
},
{
"fieldname": "from_date",
"label": __("From Date"),
"fieldtype": "Date",
"default": frappe.defaults.get_user_default("year_start_date"),
},
{
"fieldname": "to_date",
"label": __("To Date"),
"fieldtype": "Date",
"default": frappe.defaults.get_user_default("year_end_date"),
}
]
}

View File

@@ -3,41 +3,41 @@
from __future__ import unicode_literals
import frappe
import erpnext
from frappe import _
from frappe.utils import flt,cstr
from erpnext.accounts.report.financial_statements import get_period_list
def execute(filters=None):
period_list = get_period_list(2016, 2016,"Monthly")
for period in period_list:
pass
columns, data = [], []
columns=get_columns()
data=get_log_data(filters)
chart=get_chart_data(data,period_list)
if filters.get('fiscal_year'):
company = erpnext.get_default_company()
period_list = get_period_list(filters.get('fiscal_year'), filters.get('fiscal_year'),"Monthly", company)
columns=get_columns()
data=get_log_data(filters)
chart=get_chart_data(data,period_list)
return columns, data, None, chart
def get_columns():
columns = [_("License") + ":Link/Vehicle:100", _("Make") + ":data:50",
_("Model") + ":data:50", _("Location") + ":data:100",
_("Log") + ":Link/Vehicle Log:100", _("Odometer") + ":Int:80",
_("Date") + ":Date:100", _("Fuel Qty") + ":Float:80",
_("Fuel Price") + ":Float:100",_("Service Expense") + ":Float:100"
_("Model") + ":data:50", _("Location") + ":data:100",
_("Log") + ":Link/Vehicle Log:100", _("Odometer") + ":Int:80",
_("Date") + ":Date:100", _("Fuel Qty") + ":Float:80",
_("Fuel Price") + ":Float:100",_("Service Expense") + ":Float:100"
]
return columns
def get_log_data(filters):
conditions=""
if filters.from_date:
conditions += " and date >= %(from_date)s"
if filters.to_date:
conditions += " and date <= %(to_date)s"
data = frappe.db.sql("""select vhcl.license_plate as "License",vhcl.make as "Make",vhcl.model as "Model",
vhcl.location as "Location",log.name as "Log",log.odometer as "Odometer",log.date as "Date",
log.fuel_qty as "Fuel Qty",log.price as "Fuel Price"
from `tabVehicle` vhcl,`tabVehicle Log` log
where vhcl.license_plate = log.license_plate and log.docstatus = 1 %s
order by date""" % (conditions,),filters, as_dict=1)
fy = frappe.db.get_value('Fiscal Year', filters.get('fiscal_year'), ['year_start_date', 'year_end_date'], as_dict=True)
data = frappe.db.sql("""select
vhcl.license_plate as "License", vhcl.make as "Make", vhcl.model as "Model",
vhcl.location as "Location", log.name as "Log", log.odometer as "Odometer",
log.date as "Date", log.fuel_qty as "Fuel Qty", log.price as "Fuel Price"
from
`tabVehicle` vhcl,`tabVehicle Log` log
where
vhcl.license_plate = log.license_plate and log.docstatus = 1 and date between %s and %s
order by date""" ,(fy.year_start_date, fy.year_end_date), as_dict=1)
dl=list(data)
for row in dl:
row["Service Expense"]= get_service_expense(row["Log"])
@@ -45,8 +45,8 @@ def get_log_data(filters):
def get_service_expense(logname):
expense_amount = frappe.db.sql("""select sum(expense_amount)
from `tabVehicle Log` log,`tabVehicle Service` ser
where ser.parent=log.name and log.name=%s""",logname)
from `tabVehicle Log` log,`tabVehicle Service` ser
where ser.parent=log.name and log.name=%s""",logname)
return flt(expense_amount[0][0]) if expense_amount else 0
def get_chart_data(data,period_list):

View File

@@ -1,5 +1,6 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 1,
"allow_rename": 0,
"beta": 0,
@@ -1574,18 +1575,18 @@
"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": 1,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2017-02-21 13:10:27.394012",
"modified": "2017-04-10 12:13:59.630780",
"modified_by": "Administrator",
"module": "Manufacturing",
"name": "BOM",
@@ -1659,6 +1660,6 @@
"show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 0,
"track_changes": 1,
"track_seen": 0
}

View File

@@ -281,12 +281,15 @@ class BOM(WebsiteGenerator):
return bom_list
def traverse_tree(self, bom_list=[]):
def traverse_tree(self, bom_list=None):
def _get_children(bom_no):
return [cstr(d[0]) for d in frappe.db.sql("""select bom_no from `tabBOM Item`
where parent = %s and ifnull(bom_no, '') != ''""", bom_no)]
count = 0
if not bom_list:
bom_list = []
if self.name not in bom_list:
bom_list.append(self.name)

View File

@@ -15,7 +15,9 @@
<a style="margin-right: 7px; margin-bottom: 7px" class="btn btn-default btn-xs" href="#Form/BOM/{{ data.value }}">
{{ __("Open BOM {0}", [data.value.bold()]) }}</a>
{% endif %}
{% if data.item_code %}
<a class="btn btn-default btn-xs" href="#Form/Item/{{ data.item_code }}">
{{ __("Open Item {0}", [data.item_code.bold()]) }}</a>
{% endif %}
</p>
</div>

View File

@@ -1316,7 +1316,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2017-03-28 19:19:08.559879",
"modified": "2017-04-10 12:13:09.312186",
"modified_by": "Administrator",
"module": "Manufacturing",
"name": "Production Order",
@@ -1369,6 +1369,6 @@
"show_name_in_global_search": 0,
"sort_order": "ASC",
"title_field": "production_item",
"track_changes": 0,
"track_changes": 1,
"track_seen": 0
}

View File

@@ -383,3 +383,6 @@ erpnext.patches.v8_0.manufacturer_childtable_migrate
erpnext.patches.v8_0.repost_reserved_qty_for_multiple_sales_uom
erpnext.patches.v8_0.addresses_linked_to_lead
execute:frappe.delete_doc('DocType', 'Purchase Common')
erpnext.patches.v8_0.update_stock_qty_value_in_purchase_invoice
erpnext.patches.v8_0.update_supplier_address_in_stock_entry
erpnext.patches.v8_0.rename_is_sample_item_to_allow_zero_valuation_rate

View File

@@ -4,7 +4,7 @@
from __future__ import unicode_literals
import frappe
from frappe.geo.country_info import get_all
from erpnext.setup.install import import_country_and_currency
from frappe.utils.install import import_country_and_currency
def execute():
frappe.reload_doc("setup", "doctype", "country")

View File

@@ -3,7 +3,7 @@
from __future__ import unicode_literals
from frappe.model import update_users_report_view_settings
from frappe.model.utils.rename_field import update_users_report_view_settings
from erpnext.patches.v4_0.fields_to_be_renamed import rename_map
def execute():

View File

@@ -3,9 +3,8 @@
from __future__ import unicode_literals
import frappe
from frappe.geo.country_info import get_country_info
from erpnext.setup.install import add_country_and_currency
def execute():
return
country = get_country_info(country="Turkey")
add_country_and_currency("Turkey", country)

View File

@@ -1,8 +1,8 @@
from __future__ import unicode_literals
import frappe
from frappe.www.style_settings import default_properties
def execute():
return
frappe.reload_doc('website', 'doctype', 'style_settings')
style_settings = frappe.get_doc("Style Settings", "Style Settings")
if not style_settings.apply_style:

View File

@@ -0,0 +1,12 @@
from __future__ import unicode_literals
import frappe
from frappe.model.utils.rename_field import rename_field
def execute():
doc_list = ["Purchase Invoice Item", "Stock Entry Detail", "Delivery Note Item",
"Purchase Receipt Item", "Sales Invoice Item"]
for doctype in doc_list:
frappe.reload_doctype(doctype)
rename_field(doctype, "is_sample_item", "allow_zero_valuation_rate")

View File

@@ -0,0 +1,9 @@
# Copyright (c) 2017, Frappe and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.reload_doc('accounts', 'doctype', 'purchase_invoice_item')
frappe.db.sql("update `tabPurchase Invoice Item` set stock_qty = qty, stock_uom = uom")

View File

@@ -0,0 +1,22 @@
# Copyright (c) 2017, Frappe and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
# copy supplier_address to address_display, and set supplier_address to blank
stock_entries = frappe.db.sql(""" select name, purchase_order, supplier_address from `tabStock Entry`
where ifnull(supplier_address, '') <> ''""", as_dict=True)
frappe.reload_doc('stock', 'doctype', 'stock_entry')
for stock_entry in stock_entries:
# move supplier address to address_display, and fetch the supplier address from purchase order
se = frappe.get_doc("Stock Entry", stock_entry.get("name"))
se.address_display = stock_entry.get("supplier_address")
se.supplier_address = frappe.db.get_value("Purchase Order", stock_entry.get("purchase_order"),"supplier_address") or None
se.db_update()

View File

@@ -214,7 +214,7 @@ def get_timeline_data(doctype, name):
and docstatus < 2
group by date(from_time)''', name))
def get_project_list(doctype, txt, filters, limit_start, limit_page_length=20):
def get_project_list(doctype, txt, filters, limit_start, limit_page_length=20, order_by="modified"):
return frappe.db.sql('''select distinct project.*
from tabProject project, `tabProject User` project_user
where

View File

@@ -26,8 +26,6 @@
background-size: cover;
background-repeat: no-repeat;
background-position: center top;
border-radius-top: 4px;
border-radius-right: 4px;
}
.product-image.missing-image {
width: 100%;
@@ -36,8 +34,6 @@
background-size: cover;
background-repeat: no-repeat;
background-position: center top;
border-radius-top: 4px;
border-radius-right: 4px;
position: relative;
background-color: #EBEFF2;
}
@@ -45,9 +41,6 @@
font-size: 32px;
color: #d1d8dd;
}
.product-text {
padding: 15px 0px;
}
.product-search {
margin-bottom: 15px;
}
@@ -246,6 +239,15 @@
padding: 15px;
word-wrap: break-word;
height: 75px;
display: block;
/* Fallback for non-webkit */
display: -webkit-box;
max-width: 100%;
margin: 0 auto;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}
.product-image-wrapper {
padding-bottom: 40px;

View File

@@ -10,11 +10,11 @@
<p class="amount-label"> Outstanding <h3 class="outstanding_amount">{%= format_currency(outstanding_amount, currency) %} </h3></p>
</div>
<div class="col-xs-6 col-sm-3 text-center">
<p class="amount-label"> Change <input class="form-control text-right change_amount bold" type="text" idx="change_amount" value="{{format_number(change_amount, 2)}}">
<p class="amount-label"> Change <input class="form-control text-right change_amount bold" type="text" idx="change_amount" value="{{format_number(change_amount, null, 2)}}">
</p>
</div>
<div class="col-xs-6 col-sm-3 text-center">
<p class="amount-label"> Write off <input class="form-control text-right write_off_amount bold" type="text" idx="write_off_amount" value="{{format_number(write_off_amount, 2)}}">
<p class="amount-label"> Write off <input class="form-control text-right write_off_amount bold" type="text" idx="write_off_amount" value="{{format_number(write_off_amount, null, 2)}}">
</p>
</div>
</div>

View File

@@ -1,7 +1,7 @@
<div class="pos-item-wrapper image-view-item" data-item-code="{{item_code}}">
<div class="image-view-header doclist-row">
<div class="list-value">
<a class="grey list-id" data-name="{{item_code}}" title="{{ item_name || item_code}}">{{item_name || item_code}}</a>
<a class="grey list-id" data-name="{{item_code}}" title="{{ item_name || item_code}}">{{item_name || item_code}}<br>({{item_stock}})</a>
</div>
</div>
<div class="image-view-body">

View File

@@ -90,7 +90,7 @@ erpnext.utils.get_address_display = function(frm, address_field, display_field,
}
})
} else {
frm.set_value(display_field, null);
frm.set_value(display_field, '');
}
};

View File

@@ -36,8 +36,6 @@
background-size: cover;
background-repeat: no-repeat;
background-position: center top;
border-radius-top: 4px;
border-radius-right: 4px;
}
.product-image.missing-image {
@@ -51,10 +49,6 @@
color: @border-color;
}
.product-text {
padding: 15px 0px;
}
.product-search {
margin-bottom: 15px;
}
@@ -316,6 +310,14 @@
padding: 15px;
word-wrap: break-word;
height: 75px;
display: block; /* Fallback for non-webkit */
display: -webkit-box;
max-width: 100%;
margin: 0 auto;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}
.product-image-wrapper {

View File

@@ -1,30 +1,18 @@
frappe.ui.form.on("Course", "refresh", function(frm) {
if(!cur_frm.doc.__islocal) {
frm.add_custom_button(__("Program"), function() {
frappe.route_options = {
"Program Course.course": frm.doc.name
}
frappe.set_route("List", "Program");
});
frm.add_custom_button(__("Student Group"), function() {
frappe.route_options = {
course: frm.doc.name
}
frappe.set_route("List", "Student Group");
});
frm.add_custom_button(__("Course Schedule"), function() {
frappe.route_options = {
course: frm.doc.name
}
frappe.set_route("List", "Course Schedule");
});
frm.add_custom_button(__("Assessment Plan"), function() {
frappe.route_options = {
course: frm.doc.name
}
frappe.set_route("List", "Assessment Plan");
});
}

View File

@@ -1,8 +1,9 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 1,
"allow_rename": 1,
"autoname": "field:course_name",
"autoname": "field:course_code",
"beta": 0,
"creation": "2015-09-07 12:39:55.181893",
"custom": 0,
@@ -24,7 +25,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Course Name",
"length": 0,
@@ -46,16 +47,46 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "course_code",
"fieldtype": "Data",
"fieldname": "department",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Department",
"length": 0,
"no_copy": 0,
"options": "Department",
"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_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "parent_course",
"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": "Course Code",
"label": "Parent Course (Leave blank, if this isn't part of Parent Course)",
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -103,7 +134,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "course_abbreviation",
"fieldname": "course_code",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
@@ -112,7 +143,7 @@
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Course Abbreviation",
"label": "Course Code",
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -122,7 +153,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
@@ -132,19 +163,18 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "department",
"fieldtype": "Link",
"fieldname": "course_abbreviation",
"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": 1,
"label": "Department",
"in_standard_filter": 0,
"label": "Course Abbreviation",
"length": 0,
"no_copy": 0,
"options": "Department",
"permlevel": 0,
"precision": "",
"print_hide": 0,
@@ -304,18 +334,18 @@
"unique": 0
}
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
"image_view": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
"modified": "2017-02-17 17:22:36.450073",
"modified": "2017-04-12 20:44:42.048564",
"modified_by": "Administrator",
"module": "Schools",
"name": "Course",
@@ -366,7 +396,7 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"search_fields": "department",
"search_fields": "course_name",
"show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",

View File

@@ -24,28 +24,28 @@ class TestCourseSchedule(unittest.TestCase):
cs1 = make_course_schedule_test_record(simulate= True)
cs2 = make_course_schedule_test_record(from_time= cs1.from_time, to_time= cs1.to_time,
student_group="TC2-TP-2014-2015-2014-2015 (_Test Academic Term)", room="RM0002", do_not_save= 1)
student_group="TC1-TP2--2014-2015-2014-2015 (_Test Academic Term)", room="RM0002", do_not_save= 1)
self.assertRaises(OverlapError, cs2.save)
def test_room_conflict(self):
cs1 = make_course_schedule_test_record(simulate= True)
cs2 = make_course_schedule_test_record(from_time= cs1.from_time, to_time= cs1.to_time,
student_group="TC2-TP-2014-2015-2014-2015 (_Test Academic Term)", instructor="_T-Instructor-00002", do_not_save= 1)
student_group="TC1-TP2--2014-2015-2014-2015 (_Test Academic Term)", instructor="_T-Instructor-00002", do_not_save= 1)
self.assertRaises(OverlapError, cs2.save)
def test_no_conflict(self):
cs1 = make_course_schedule_test_record(simulate= True)
make_course_schedule_test_record(from_time= cs1.from_time, to_time= cs1.to_time,
student_group="TC2-TP-2014-2015-2014-2015 (_Test Academic Term)", instructor="_T-Instructor-00002", room="RM0002")
student_group="TC1-TP2-2014-2015-2014-2015 (_Test Academic Term)", instructor="_T-Instructor-00002", room="RM0002")
def make_course_schedule_test_record(**args):
args = frappe._dict(args)
course_schedule = frappe.new_doc("Course Schedule")
course_schedule.student_group = args.student_group or "TC-TP-2014-2015-2014-2015 (_Test Academic Term)"
course_schedule.course = args.course or "_Test Course"
course_schedule.student_group = args.student_group or "TC-TP1-2014-2015-2014-2015 (_Test Academic Term)"
course_schedule.course = args.course or "TC100"
course_schedule.instructor = args.instructor or "_T-Instructor-00001"
course_schedule.room = args.room or "RM0001"

View File

@@ -18,7 +18,7 @@ class Fees(Document):
self.total_amount += d.amount
self.outstanding_amount = self.total_amount
def get_fee_list(doctype, txt, filters, limit_start, limit_page_length=20):
def get_fee_list(doctype, txt, filters, limit_start, limit_page_length=20, order_by="modified"):
user = frappe.session.user
student = frappe.db.sql("select name from `tabStudent` where student_email_id= %s", user)
if student:

View File

@@ -1,43 +1,27 @@
// Copyright (c) 2015, Frappe Technologies and contributors
// For license information, please see license.txt
cur_frm.add_fetch("course", "course_code", "course_code");
cur_frm.add_fetch('fee_structure', 'total_amount', 'amount');
frappe.ui.form.on("Program", "refresh", function(frm) {
if(!frm.doc.__islocal) {
frm.add_custom_button(__("Student Applicant"), function() {
frappe.route_options = {
program: frm.doc.name
}
frappe.set_route("List", "Student Applicant");
});
frm.add_custom_button(__("Program Enrollment"), function() {
frappe.route_options = {
program: frm.doc.name
}
frappe.set_route("List", "Program Enrollment");
});
frm.add_custom_button(__("Student Group"), function() {
frappe.route_options = {
program: frm.doc.name
}
frappe.set_route("List", "Student Group");
});
frm.add_custom_button(__("Fee Structure"), function() {
frappe.route_options = {
program: frm.doc.name
}
frappe.set_route("List", "Fee Structure");
});
frm.add_custom_button(__("Fees"), function() {
frappe.route_options = {
program: frm.doc.name
}
frappe.set_route("List", "Fees");
});
}

View File

@@ -1,8 +1,9 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 1,
"allow_rename": 1,
"autoname": "field:program_name",
"autoname": "field:program_code",
"beta": 0,
"creation": "2015-09-07 12:54:03.609282",
"custom": 0,
@@ -24,7 +25,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Program Name",
"length": 0,
@@ -46,47 +47,19 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "program_code",
"fieldtype": "Data",
"fieldname": "department",
"fieldtype": "Link",
"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": "Program Code",
"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_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "program_abbreviation",
"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": "Program Abbreviation",
"in_standard_filter": 1,
"label": "Department",
"length": 0,
"no_copy": 0,
"options": "Department",
"permlevel": 0,
"precision": "",
"print_hide": 0,
@@ -132,19 +105,47 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "department",
"fieldtype": "Link",
"fieldname": "program_code",
"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": "Program Code",
"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_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "program_abbreviation",
"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": 1,
"label": "Department",
"in_standard_filter": 0,
"label": "Program Abbreviation",
"length": 0,
"no_copy": 0,
"options": "Department",
"permlevel": 0,
"precision": "",
"print_hide": 0,
@@ -276,18 +277,18 @@
"unique": 0
}
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
"image_view": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
"modified": "2017-02-17 17:22:14.107052",
"modified": "2017-04-12 20:40:53.542488",
"modified_by": "Administrator",
"module": "Schools",
"name": "Program",
@@ -318,7 +319,7 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"search_fields": "department",
"search_fields": "program_name",
"show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",

View File

@@ -7,10 +7,4 @@ import frappe
from frappe.model.document import Document
class Program(Document):
def validate(self):
self.validate_course()
def validate_course(self):
for d in self.courses:
if not d.course_code:
d.course_code = frappe.db.get_value("Course", d.course, "course_code")
pass

View File

@@ -1,10 +1,12 @@
[
{
"program_name": "_Test Program",
"program_abbreviation": "TP"
"program_code": "_TP1",
"program_abbreviation": "TP1"
},
{
"program_name": "_Test Program 2",
"program_code": "_TP2",
"program_abbreviation": "TP2"
}
]

View File

@@ -1,5 +1,6 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"beta": 0,
@@ -41,36 +42,6 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "academic_term",
"fieldtype": "Link",
"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": "Academic Term",
"length": 0,
"no_copy": 0,
"options": "Academic Term",
"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_on_submit": 0,
"bold": 0,
@@ -104,7 +75,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "course_code",
"fieldname": "course_name",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
@@ -113,9 +84,10 @@
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Course Code",
"label": "Course Name",
"length": 0,
"no_copy": 0,
"options": "course.course_name",
"permlevel": 0,
"precision": "",
"print_hide": 0,
@@ -140,7 +112,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Required",
"length": 0,
@@ -158,18 +130,18 @@
"unique": 0
}
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
"image_view": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"menu_index": 0,
"modified": "2017-02-17 17:16:10.315691",
"modified": "2017-04-07 17:59:12.504949",
"modified_by": "Administrator",
"module": "Schools",
"name": "Program Course",

View File

@@ -4,6 +4,34 @@
cur_frm.add_fetch('fee_structure', 'total_amount', 'amount');
frappe.ui.form.on("Program Enrollment", {
onload: function(frm, cdt, cdn){
frm.set_query("academic_term", "fees", function(){
return{
"filters":{
"academic_year": (frm.doc.academic_year)
}
};
});
frm.fields_dict['fees'].grid.get_field('fee_structure').get_query = function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
return {
filters: {'academic_term': d.academic_term}
}
};
if (frm.doc.program) {
frm.set_query("course", "courses", function(doc, cdt, cdn) {
return{
query: "erpnext.schools.doctype.program_enrollment.program_enrollment.get_program_courses",
filters: {
'program': frm.doc.program
}
}
});
}
},
program: function(frm) {
if (frm.doc.program) {
frappe.call({
@@ -18,6 +46,7 @@ frappe.ui.form.on("Program Enrollment", {
}
}
});
frm.trigger.onload()
}
},
@@ -25,21 +54,24 @@ frappe.ui.form.on("Program Enrollment", {
frappe.ui.form.trigger("Program Enrollment", "program");
},
onload: function(frm, cdt, cdn){
cur_frm.set_query("academic_term", "fees", function(){
return{
"filters":{
"academic_year": (frm.doc.academic_year)
get_courses: function(frm) {
if (frm.doc.program) {
frm.set_value("courses",[]);
frappe.call({
method: "get_courses",
doc:frm.doc,
callback: function(r) {
if(r.message) {
frm.set_value("courses", r.message);
}
else {
frappe.msgprint(__("There is no mandatory course for the program {0}",[frm.doc.program]));
}
}
};
});
cur_frm.fields_dict['fees'].grid.get_field('fee_structure').get_query = function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
return {
filters: {'academic_term': d.academic_term}
}
};
})
}
else {
frappe.throw(__("Select the Program to fetch mandatory courses."))
}
}
});

View File

@@ -78,7 +78,37 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "student_category",
"fieldname": "academic_year",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Academic Year",
"length": 0,
"no_copy": 0,
"options": "Academic Year",
"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_on_submit": 1,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "academic_term",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
@@ -87,10 +117,10 @@
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Student Category",
"label": "Academic Term",
"length": 0,
"no_copy": 0,
"options": "Student Category",
"options": "Academic Term",
"permlevel": 0,
"precision": "",
"print_hide": 0,
@@ -108,8 +138,9 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "school_house",
"fieldtype": "Link",
"default": "Today",
"fieldname": "enrollment_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
@@ -117,10 +148,9 @@
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "School House",
"label": "Enrollment Date",
"length": 0,
"no_copy": 0,
"options": "School House",
"permlevel": 0,
"precision": "",
"print_hide": 0,
@@ -128,7 +158,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
@@ -192,7 +222,7 @@
"unique": 0
},
{
"allow_on_submit": 0,
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"columns": 0,
@@ -205,7 +235,7 @@
"in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Batch Name",
"label": "Batch",
"length": 0,
"no_copy": 0,
"options": "Student Batch Name",
@@ -226,19 +256,19 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "academic_year",
"fieldname": "student_category",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Academic Year",
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Student Category",
"length": 0,
"no_copy": 0,
"options": "Academic Year",
"options": "Student Category",
"permlevel": 0,
"precision": "",
"print_hide": 0,
@@ -246,7 +276,37 @@
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "school_house",
"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": "School House",
"length": 0,
"no_copy": 0,
"options": "School House",
"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
@@ -256,9 +316,8 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "Today",
"fieldname": "enrollment_date",
"fieldtype": "Date",
"fieldname": "enrolled_courses",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
@@ -266,7 +325,7 @@
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Enrollment Date",
"label": "Enrolled courses",
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -276,7 +335,66 @@
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "get_courses",
"fieldtype": "Button",
"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": "Get Courses",
"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_on_submit": 1,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "courses",
"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": "Courses",
"length": 0,
"no_copy": 0,
"options": "Program Enrollment Course",
"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
@@ -295,7 +413,7 @@
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
"label": "Fees",
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -412,7 +530,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
"modified": "2017-03-29 15:30:03.359985",
"modified": "2017-04-12 12:12:10.148274",
"modified_by": "Administrator",
"module": "Schools",
"name": "Program Enrollment",

View File

@@ -6,6 +6,7 @@ from __future__ import unicode_literals
import frappe
from frappe import msgprint, _
from frappe.model.document import Document
from frappe.desk.reportview import get_match_cond, get_filters_cond
from frappe.utils import comma_and
class ProgramEnrollment(Document):
@@ -54,3 +55,25 @@ class ProgramEnrollment(Document):
fee_list = ["""<a href="#Form/Fees/%s" target="_blank">%s</a>""" % \
(fee, fee) for fee in fee_list]
msgprint(_("Fee Records Created - {0}").format(comma_and(fee_list)))
def get_courses(self):
return frappe.db.sql('''select course, course_name from `tabProgram Course` where parent = %s and required = 1''', (self.program), as_dict=1)
@frappe.whitelist()
def get_program_courses(doctype, txt, searchfield, start, page_len, filters):
if filters.get('program'):
return frappe.db.sql("""select course, course_name from `tabProgram Course`
where parent = %(program)s and course like %(txt)s {match_cond}
order by
if(locate(%(_txt)s, course), locate(%(_txt)s, course), 99999),
idx desc,
`tabProgram Course`.course asc
limit {start}, {page_len}""".format(
match_cond=get_match_cond(doctype),
start=start,
page_len=page_len), {
"txt": "%{0}%".format(txt),
"_txt": txt.replace('%', ''),
"program": filters['program']
})

View File

@@ -0,0 +1,101 @@
{
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"beta": 0,
"creation": "2017-04-10 19:28:19.616308",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"fields": [
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "course",
"fieldtype": "Link",
"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": "Course",
"length": 0,
"no_copy": 0,
"options": "Course",
"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_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "course_name",
"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": "Course Name",
"length": 0,
"no_copy": 0,
"options": "course.course_name",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
}
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
"image_view": 0,
"in_create": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2017-04-12 11:49:50.433280",
"modified_by": "Administrator",
"module": "Schools",
"name": "Program Enrollment Course",
"name_case": "",
"owner": "Administrator",
"permissions": [],
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1,
"track_seen": 0
}

View File

@@ -6,5 +6,5 @@ from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class PackageCode(Document):
class ProgramEnrollmentCourse(Document):
pass

View File

@@ -11,11 +11,11 @@ from erpnext.schools.api import enroll_student
class ProgramEnrollmentTool(Document):
def get_students(self):
if not self.get_students_from:
frappe.throw(_("Mandatory feild - Get Students From"))
frappe.throw(_("Mandatory field - Get Students From"))
elif not self.program:
frappe.throw(_("Mandatory feild - Program"))
frappe.throw(_("Mandatory field - Program"))
elif not self.academic_year:
frappe.throw(_("Mandatory feild - Academic Year"))
frappe.throw(_("Mandatory field - Academic Year"))
else:
if self.get_students_from == "Student Applicants":
students = frappe.db.sql("select name as student_applicant, title as student_name from \

View File

@@ -1,7 +1,7 @@
// Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Package Code', {
frappe.ui.form.on('School Settings', {
refresh: function(frm) {
}

View File

@@ -4,7 +4,7 @@
"allow_import": 0,
"allow_rename": 0,
"beta": 0,
"creation": "2017-03-23 13:33:14.884692",
"creation": "2017-04-05 13:33:04.519313",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
@@ -17,8 +17,8 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "code",
"fieldtype": "Data",
"fieldname": "current_academic_year",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
@@ -26,9 +26,10 @@
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Code",
"label": "Current Academic Year",
"length": 0,
"no_copy": 0,
"options": "Academic Year",
"permlevel": 0,
"precision": "",
"print_hide": 0,
@@ -36,7 +37,7 @@
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
@@ -46,8 +47,8 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "description",
"fieldtype": "Small Text",
"fieldname": "current_academic_term",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
@@ -55,7 +56,37 @@
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Description",
"label": "Current Academic Term",
"length": 0,
"no_copy": 0,
"options": "Academic Term",
"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_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "attendance_freeze_date",
"fieldtype": "Date",
"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": "Attendance Freeze Date",
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -78,13 +109,13 @@
"image_view": 0,
"in_create": 0,
"is_submittable": 0,
"issingle": 0,
"issingle": 1,
"istable": 0,
"max_attachments": 0,
"modified": "2017-03-28 09:09:32.260877",
"modified": "2017-04-05 13:34:57.493516",
"modified_by": "Administrator",
"module": "Stock",
"name": "Package Code",
"module": "Schools",
"name": "School Settings",
"name_case": "",
"owner": "Administrator",
"permissions": [
@@ -95,34 +126,14 @@
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Stock Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1
},
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 1,
"delete": 0,
"email": 1,
"export": 1,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "Stock User",
"report": 0,
"role": "System Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
@@ -132,11 +143,9 @@
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"search_fields": "code",
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "code",
"track_changes": 0,
"track_changes": 1,
"track_seen": 0
}

View File

@@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
import frappe.defaults
from frappe.model.document import Document
school_keydict = {
# "key in defaults": "key in Global Defaults"
"academic_year": "current_academic_year",
"academic_term": "current_academic_term",
}
class SchoolSettings(Document):
def on_update(self):
"""update defaults"""
for key in school_keydict:
frappe.db.set_default(key, self.get(school_keydict[key], ''))
# clear cache
frappe.clear_cache()
def get_defaults(self):
return frappe.defaults.get_defaults()

View File

@@ -497,7 +497,7 @@
"label": "Gender",
"length": 0,
"no_copy": 0,
"options": "\nMale\nFemale",
"options": "\nMale\nFemale\nOther",
"permlevel": 0,
"precision": "",
"print_hide": 0,

View File

@@ -3,7 +3,7 @@
"first_name": "_Test",
"middle_name": "Student",
"last_name": "Name",
"program": "_Test Program",
"program": "TC101",
"date_of_birth": "2000-01-01",
"gender": "Male",
"blood_group": "A+"
@@ -13,7 +13,7 @@
"first_name": "_Test",
"middle_name": "Student",
"last_name": "Name 1",
"program": "_Test Program",
"program": "TC101",
"date_of_birth": "2000-01-01",
"gender": "Male",
"blood_group": "A+"
@@ -23,7 +23,7 @@
"first_name": "_Test",
"middle_name": "Student",
"last_name": "Name 2",
"program": "_Test Program",
"program": "TC101",
"date_of_birth": "2000-01-01",
"gender": "Male",
"blood_group": "A+"

View File

@@ -127,6 +127,8 @@ schools.StudentsEditor = Class.extend({
function() { //ifyes
frappe.call({
method: "erpnext.schools.api.mark_attendance",
freeze: true,
freeze_message: "Marking attendance",
args: {
"students_present": students_present,
"students_absent": students_absent,

View File

@@ -1,13 +1,13 @@
[
{
"program": "_Test Program",
"course": "_Test Course",
"program": "_TP1",
"course": "TC100",
"academic_year": "2014-2015",
"academic_term": "2014-2015 (_Test Academic Term)"
},
{
"program": "_Test Program",
"course": "_Test Course 2",
"program": "_TP2",
"course": "TC101",
"academic_year": "2014-2015",
"academic_term": "2014-2015 (_Test Academic Term)"
}

View File

@@ -9,9 +9,9 @@ from frappe import _
class OverlapError(frappe.ValidationError): pass
def validate_overlap_for(doc, doctype, fieldname, value=None):
"""Checks overlap for specified feild.
"""Checks overlap for specified field.
:param fieldname: Checks Overlap for this feild
:param fieldname: Checks Overlap for this field
"""
existing = get_overlap_for(doc, doctype, fieldname, value)
@@ -20,9 +20,9 @@ def validate_overlap_for(doc, doctype, fieldname, value=None):
doc.meta.get_label(fieldname) if not value else fieldname , value or doc.get(fieldname)), OverlapError)
def get_overlap_for(doc, doctype, fieldname, value=None):
"""Returns overlaping document for specified feild.
"""Returns overlaping document for specified field.
:param fieldname: Checks Overlap for this feild
:param fieldname: Checks Overlap for this field
"""
existing = frappe.db.sql("""select name, from_time, to_time from `tab{0}`

View File

@@ -3516,7 +3516,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2017-03-30 03:23:30.487992",
"modified": "2017-04-10 12:13:03.136885",
"modified_by": "Administrator",
"module": "Selling",
"name": "Sales Order",
@@ -3652,6 +3652,6 @@
"sort_order": "DESC",
"timeline_field": "customer",
"title_field": "title",
"track_changes": 0,
"track_changes": 1,
"track_seen": 0
}

View File

@@ -89,7 +89,7 @@ def create_fiscal_year_and_company(args):
'default_currency':args.get('currency'),
'country': args.get('country'),
'create_chart_of_accounts_based_on': 'Standard Template',
'chart_of_accounts': args.get(('chart_of_accounts')),
'chart_of_accounts': args.get('chart_of_accounts'),
'domain': args.get('domain')
}).insert()
@@ -607,5 +607,3 @@ def create_room(args):
room.save()
except frappe.DuplicateEntryError:
pass

View File

@@ -241,7 +241,7 @@ data_map = {
}
},
"Purchase Invoice Item": {
"columns": ["name", "parent", "item_code", "(qty * conversion_factor) as qty", "base_net_amount"],
"columns": ["name", "parent", "item_code", "stock_qty as qty", "base_net_amount"],
"conditions": ["docstatus=1", "ifnull(parent, '')!=''"],
"order_by": "parent",
"links": {

View File

@@ -22,7 +22,7 @@
</span>
</span>
</span>
<span class="inline-graph-half" title="{{ __("Acutal Qty {0} / Waiting Qty {1}", [d.actual_qty, d.pending_qty]) }}">
<span class="inline-graph-half" title="{{ __("Actual Qty {0} / Waiting Qty {1}", [d.actual_qty, d.pending_qty]) }}">
<span class="inline-graph-count">
{{ d.actual_qty }} {{ (d.pending_qty > 0) ? ("(" + d.pending_qty+ ")") : "" }}
</span>

View File

@@ -39,7 +39,7 @@ frappe.ui.form.on("Delivery Note", {
});
if (sys_defaults.auto_accounting_for_stock) {
frm.set_query('expense_account', 'items', function(frm) {
frm.set_query('expense_account', 'items', function(doc, cdt, cdn) {
return {
filters: {
"report_type": "Profit and Loss",
@@ -49,7 +49,7 @@ frappe.ui.form.on("Delivery Note", {
}
});
frm.set_query('cost_center', 'items', function(frm) {
frm.set_query('cost_center', 'items', function(doc, cdt, cdn) {
return {
filters: {
'company': doc.company,

View File

@@ -3288,7 +3288,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
"modified": "2017-04-03 03:13:58.051782",
"modified": "2017-04-10 12:03:29.645642",
"modified_by": "Administrator",
"module": "Stock",
"name": "Delivery Note",
@@ -3404,6 +3404,6 @@
"sort_order": "DESC",
"timeline_field": "customer",
"title_field": "title",
"track_changes": 0,
"track_changes": 1,
"track_seen": 0
}

View File

@@ -1648,7 +1648,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "is_sample_item",
"fieldname": "allow_zero_valuation_rate",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
@@ -1657,7 +1657,7 @@
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Sample Item",
"label": "Allow Zero Valuation Rate",
"length": 0,
"no_copy": 1,
"permlevel": 0,
@@ -1894,7 +1894,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2017-03-30 19:34:42.305637",
"modified": "2017-04-05 23:26:03.390869",
"modified_by": "Administrator",
"module": "Stock",
"name": "Delivery Note Item",

View File

@@ -466,36 +466,6 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "device_package_code",
"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": "Device Package Code",
"length": 0,
"no_copy": 0,
"options": "Package Code",
"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_on_submit": 0,
"bold": 0,
@@ -2984,8 +2954,8 @@
"issingle": 0,
"istable": 0,
"max_attachments": 1,
"modified": "2017-03-26 13:47:49.087140",
"modified_by": "Administrator",
"modified": "2017-03-24 15:46:18.569291",
"modified_by": "d.ottenbreit@eso-electronic.de",
"module": "Stock",
"name": "Item",
"owner": "Administrator",

View File

@@ -1,10 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
class TestDevicePackageCode(unittest.TestCase):
pass

View File

@@ -2846,7 +2846,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
"modified": "2017-04-05 03:17:55.726121",
"modified": "2017-04-10 12:02:07.434102",
"modified_by": "Administrator",
"module": "Stock",
"name": "Purchase Receipt",
@@ -2962,6 +2962,6 @@
"sort_order": "DESC",
"timeline_field": "supplier",
"title_field": "title",
"track_changes": 0,
"track_changes": 1,
"track_seen": 0
}

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