Compare commits
163 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f6c396f176 | ||
|
|
93b5367485 | ||
|
|
5995010007 | ||
|
|
0d38a6b495 | ||
|
|
a85b68ee77 | ||
|
|
ca31425bb4 | ||
|
|
253c53cf53 | ||
|
|
ac3b2aa913 | ||
|
|
5d7e8d9e83 | ||
|
|
6a5cf672c1 | ||
|
|
5f7b88d9c3 | ||
|
|
465d8352aa | ||
|
|
38ada81487 | ||
|
|
e38c70c8bc | ||
|
|
157c334737 | ||
|
|
4b12896941 | ||
|
|
7b0c682635 | ||
|
|
d45a036b5e | ||
|
|
d7d9cd2938 | ||
|
|
7e7dc0f254 | ||
|
|
e9cf1aba77 | ||
|
|
c2bf50042f | ||
|
|
ca89b6f59c | ||
|
|
12ec71781d | ||
|
|
659a225f24 | ||
|
|
d0ebd7f7c2 | ||
|
|
adfe84b04f | ||
|
|
7916590528 | ||
|
|
fdce7a0dc3 | ||
|
|
b3d4326dcc | ||
|
|
54fcf85317 | ||
|
|
689da20e7b | ||
|
|
eb92d907bc | ||
|
|
0cd792ebb2 | ||
|
|
e4afab7fb0 | ||
|
|
bf4915b285 | ||
|
|
7e661437b1 | ||
|
|
818ad397c8 | ||
|
|
ce9ac7885e | ||
|
|
c320537e4c | ||
|
|
9283377f87 | ||
|
|
331566d612 | ||
|
|
ff70f38eac | ||
|
|
d1552f97e4 | ||
|
|
baa4afd67b | ||
|
|
2f0c34385b | ||
|
|
258f7da778 | ||
|
|
799a9cabe7 | ||
|
|
24f0b13b22 | ||
|
|
2d79a641c2 | ||
|
|
7a9bd41a72 | ||
|
|
cf1e0508af | ||
|
|
88906cfc63 | ||
|
|
e72c98dafb | ||
|
|
f8b412ba98 | ||
|
|
c8a25b6dac | ||
|
|
724cc35421 | ||
|
|
67ae3a7f22 | ||
|
|
8854f8bd50 | ||
|
|
fe05645051 | ||
|
|
29d64cae34 | ||
|
|
84e50fe371 | ||
|
|
2ef20a968c | ||
|
|
fdc7d7f3de | ||
|
|
a68fff470c | ||
|
|
552f7ab678 | ||
|
|
2424aa73d7 | ||
|
|
50835cbaa0 | ||
|
|
f3a318921f | ||
|
|
529f5ce503 | ||
|
|
177a26849d | ||
|
|
d144a4c621 | ||
|
|
d2484ece24 | ||
|
|
04ea4910f0 | ||
|
|
65a27395fe | ||
|
|
91dcd8d952 | ||
|
|
4d2d996782 | ||
|
|
47afc55939 | ||
|
|
8c72fa2e4f | ||
|
|
0096240a65 | ||
|
|
864f134610 | ||
|
|
81fcbbefe5 | ||
|
|
8a1c58c3c3 | ||
|
|
ae696d005a | ||
|
|
89cec18467 | ||
|
|
4bcc2316a9 | ||
|
|
012c9a0916 | ||
|
|
c080479f1f | ||
|
|
a109141624 | ||
|
|
064530d11f | ||
|
|
6799e27390 | ||
|
|
c6d75eb942 | ||
|
|
83f8344e62 | ||
|
|
ee59ecd396 | ||
|
|
7607cc9dfa | ||
|
|
32e453b8eb | ||
|
|
b32cf35fe5 | ||
|
|
9422f69fdf | ||
|
|
61ac683847 | ||
|
|
8fac2ad183 | ||
|
|
52e1ba7714 | ||
|
|
08ea710c8f | ||
|
|
4b544347a9 | ||
|
|
85bfc05efa | ||
|
|
e4f80a6eaa | ||
|
|
f69ffeb0b4 | ||
|
|
f7a9023fda | ||
|
|
3d6567411d | ||
|
|
0952df29dc | ||
|
|
76d965f340 | ||
|
|
c55b805b66 | ||
|
|
cf7df5d106 | ||
|
|
3b04b030eb | ||
|
|
67ddcf9d32 | ||
|
|
def2e4678c | ||
|
|
1e2d7b3519 | ||
|
|
3bd15fb19e | ||
|
|
a282c13d84 | ||
|
|
a689432a6e | ||
|
|
3da400b532 | ||
|
|
8a27cf3785 | ||
|
|
73456ac81a | ||
|
|
aa1be1ce92 | ||
|
|
654f186f95 | ||
|
|
09483d3c0f | ||
|
|
5886aafbae | ||
|
|
156eef1907 | ||
|
|
74e2e4672c | ||
|
|
f4ee682400 | ||
|
|
475d140b5c | ||
|
|
bdb2f95957 | ||
|
|
3e2c9d00f1 | ||
|
|
d678809939 | ||
|
|
59472e5449 | ||
|
|
c5f79d2ec4 | ||
|
|
b0df661e81 | ||
|
|
939db36ad4 | ||
|
|
4fcd8a6db3 | ||
|
|
769b6bada8 | ||
|
|
125996e21c | ||
|
|
7bf810300e | ||
|
|
edeb4dc7e0 | ||
|
|
62e3e75555 | ||
|
|
154385db1b | ||
|
|
82e303882e | ||
|
|
b679533f81 | ||
|
|
45540569ff | ||
|
|
d4e15ca359 | ||
|
|
e8270fe21c | ||
|
|
62c7deee00 | ||
|
|
fcefc601e0 | ||
|
|
b579fd7ada | ||
|
|
4f5ad50ecf | ||
|
|
5ad6126832 | ||
|
|
62d27ab7d3 | ||
|
|
f74010d379 | ||
|
|
0e4c5c9efb | ||
|
|
734d7795f8 | ||
|
|
464f108586 | ||
|
|
323e46ba5a | ||
|
|
62414565b1 | ||
|
|
426b8a14fd | ||
|
|
c9b6a07732 |
@@ -2,7 +2,8 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe
|
||||||
|
|
||||||
__version__ = '8.0.24'
|
__version__ = '8.0.41'
|
||||||
|
|
||||||
|
|
||||||
def get_default_company(user=None):
|
def get_default_company(user=None):
|
||||||
'''Get default company for user'''
|
'''Get default company for user'''
|
||||||
@@ -19,12 +20,14 @@ def get_default_company(user=None):
|
|||||||
|
|
||||||
return default_company
|
return default_company
|
||||||
|
|
||||||
|
|
||||||
def get_default_currency():
|
def get_default_currency():
|
||||||
'''Returns the currency of the default company'''
|
'''Returns the currency of the default company'''
|
||||||
company = get_default_company()
|
company = get_default_company()
|
||||||
if company:
|
if company:
|
||||||
return frappe.db.get_value('Company', company, 'default_currency')
|
return frappe.db.get_value('Company', company, 'default_currency')
|
||||||
|
|
||||||
|
|
||||||
def get_company_currency(company):
|
def get_company_currency(company):
|
||||||
'''Returns the default company currency'''
|
'''Returns the default company currency'''
|
||||||
if not frappe.flags.company_currency:
|
if not frappe.flags.company_currency:
|
||||||
@@ -33,11 +36,13 @@ def get_company_currency(company):
|
|||||||
frappe.flags.company_currency[company] = frappe.db.get_value('Company', company, 'default_currency')
|
frappe.flags.company_currency[company] = frappe.db.get_value('Company', company, 'default_currency')
|
||||||
return frappe.flags.company_currency[company]
|
return frappe.flags.company_currency[company]
|
||||||
|
|
||||||
|
|
||||||
def set_perpetual_inventory(enable=1):
|
def set_perpetual_inventory(enable=1):
|
||||||
accounts_settings = frappe.get_doc("Accounts Settings")
|
accounts_settings = frappe.get_doc("Accounts Settings")
|
||||||
accounts_settings.auto_accounting_for_stock = enable
|
accounts_settings.auto_accounting_for_stock = enable
|
||||||
accounts_settings.save()
|
accounts_settings.save()
|
||||||
|
|
||||||
|
|
||||||
def encode_company_abbr(name, company):
|
def encode_company_abbr(name, company):
|
||||||
'''Returns name encoded with company abbreviation'''
|
'''Returns name encoded with company abbreviation'''
|
||||||
company_abbr = frappe.db.get_value("Company", company, "abbr")
|
company_abbr = frappe.db.get_value("Company", company, "abbr")
|
||||||
@@ -46,4 +51,6 @@ def encode_company_abbr(name, company):
|
|||||||
if parts[-1].lower() != company_abbr.lower():
|
if parts[-1].lower() != company_abbr.lower():
|
||||||
parts.append(company_abbr)
|
parts.append(company_abbr)
|
||||||
|
|
||||||
return " - ".join([parts[0], company_abbr])
|
return " - ".join(parts)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -188,9 +188,9 @@ class Account(Document):
|
|||||||
account_balance = get_balance_on(self.name)
|
account_balance = get_balance_on(self.name)
|
||||||
|
|
||||||
if account_balance != stock_balance:
|
if account_balance != stock_balance:
|
||||||
frappe.throw(_('Account balance ({0}) and stock value ({1}) must be same')\
|
frappe.throw(_('Account balance ({0}) for {1} and stock value ({2}) for warehouse {3} must be same')
|
||||||
.format(fmt_money(account_balance, currency=self.account_currency),
|
.format(fmt_money(account_balance, currency=self.account_currency), self.name,
|
||||||
fmt_money(stock_balance, currency=self.account_currency)))
|
fmt_money(stock_balance, currency=self.account_currency), self.warehouse))
|
||||||
|
|
||||||
elif self.warehouse:
|
elif self.warehouse:
|
||||||
self.warehouse = None
|
self.warehouse = None
|
||||||
|
|||||||
@@ -125,13 +125,14 @@ def get_account_tree_from_existing_company(existing_company):
|
|||||||
account_tree = {}
|
account_tree = {}
|
||||||
|
|
||||||
# fill in tree starting with root accounts (those with no parent)
|
# fill in tree starting with root accounts (those with no parent)
|
||||||
|
if all_accounts:
|
||||||
build_account_tree(account_tree, None, all_accounts)
|
build_account_tree(account_tree, None, all_accounts)
|
||||||
return account_tree
|
return account_tree
|
||||||
|
|
||||||
def build_account_tree(tree, parent, all_accounts):
|
def build_account_tree(tree, parent, all_accounts):
|
||||||
# find children
|
# find children
|
||||||
parent_account = parent.name if parent else None
|
parent_account = parent.name if parent else ""
|
||||||
children = [acc for acc in all_accounts if acc.parent_account == parent_account]
|
children = [acc for acc in all_accounts if cstr(acc.parent_account) == parent_account]
|
||||||
|
|
||||||
# if no children, but a group account
|
# if no children, but a group account
|
||||||
if not children and parent.is_group:
|
if not children and parent.is_group:
|
||||||
|
|||||||
@@ -22,20 +22,10 @@
|
|||||||
},
|
},
|
||||||
"1120.000 Bank ": {
|
"1120.000 Bank ": {
|
||||||
"1121.000 Bank Rupiah": {
|
"1121.000 Bank Rupiah": {
|
||||||
"1121.0010 Bank 1": {
|
"is_group": 1
|
||||||
"account_type": "Bank"
|
|
||||||
},
|
|
||||||
"1121.0020 Bank 2": {
|
|
||||||
"account_type": "Bank"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"1122.000 Bank Other Currency": {
|
"1122.000 Bank Other Currency": {
|
||||||
"1122.0010 Bank 1": {
|
"is_group": 1
|
||||||
"account_type": "Bank"
|
|
||||||
},
|
|
||||||
"1122.0020 Bank 2": {
|
|
||||||
"account_type": "Bank"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"account_type": "Bank"
|
"account_type": "Bank"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -21,10 +21,13 @@ class AccountsSettings(Document):
|
|||||||
company.save()
|
company.save()
|
||||||
|
|
||||||
# Create account head for warehouses
|
# Create account head for warehouses
|
||||||
warehouse_list = frappe.db.sql("select name, company from tabWarehouse", as_dict=1)
|
warehouse_list = frappe.db.sql("""select name, company from tabWarehouse
|
||||||
|
where disabled=0""", as_dict=1)
|
||||||
warehouse_with_no_company = [d.name for d in warehouse_list if not d.company]
|
warehouse_with_no_company = [d.name for d in warehouse_list if not d.company]
|
||||||
if warehouse_with_no_company:
|
if warehouse_with_no_company:
|
||||||
frappe.throw(_("Company is missing in warehouses {0}").format(comma_and(warehouse_with_no_company)))
|
frappe.throw(_("Company is missing in warehouses {0}")
|
||||||
|
.format(comma_and(warehouse_with_no_company)))
|
||||||
|
|
||||||
for wh in warehouse_list:
|
for wh in warehouse_list:
|
||||||
wh_doc = frappe.get_doc("Warehouse", wh.name)
|
wh_doc = frappe.get_doc("Warehouse", wh.name)
|
||||||
wh_doc.flags.ignore_permissions = True
|
wh_doc.flags.ignore_permissions = True
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ frappe.ui.form.on('Asset', {
|
|||||||
erpnext.asset.scrap_asset(frm);
|
erpnext.asset.scrap_asset(frm);
|
||||||
});
|
});
|
||||||
|
|
||||||
frm.add_custom_button("Sale Asset", function() {
|
frm.add_custom_button("Sell Asset", function() {
|
||||||
erpnext.asset.make_sales_invoice(frm);
|
erpnext.asset.make_sales_invoice(frm);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -147,6 +147,7 @@ frappe.ui.form.on('Payment Entry', {
|
|||||||
var currency_field = (frm.doc.payment_type=="Receive") ? "paid_from_account_currency" : "paid_to_account_currency"
|
var currency_field = (frm.doc.payment_type=="Receive") ? "paid_from_account_currency" : "paid_to_account_currency"
|
||||||
frm.set_df_property("total_allocated_amount", "options", currency_field);
|
frm.set_df_property("total_allocated_amount", "options", currency_field);
|
||||||
frm.set_df_property("unallocated_amount", "options", currency_field);
|
frm.set_df_property("unallocated_amount", "options", currency_field);
|
||||||
|
frm.set_df_property("party_balance", "options", currency_field);
|
||||||
|
|
||||||
frm.set_currency_labels(["total_amount", "outstanding_amount", "allocated_amount"],
|
frm.set_currency_labels(["total_amount", "outstanding_amount", "allocated_amount"],
|
||||||
party_account_currency, "references");
|
party_account_currency, "references");
|
||||||
|
|||||||
@@ -681,7 +681,7 @@
|
|||||||
"print_hide_if_no_value": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
"remember_last_selected_value": 0,
|
"remember_last_selected_value": 0,
|
||||||
"report_hide": 1,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
@@ -728,7 +728,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2017-05-08 12:09:25.759145",
|
"modified": "2017-05-18 12:18:39.187714",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Payment Request",
|
"name": "Payment Request",
|
||||||
|
|||||||
@@ -285,9 +285,10 @@ def get_pricing_rules(args):
|
|||||||
|
|
||||||
def filter_pricing_rules(args, pricing_rules):
|
def filter_pricing_rules(args, pricing_rules):
|
||||||
# filter for qty
|
# filter for qty
|
||||||
|
stock_qty = args.get('qty') * args.get('conversion_factor', 1)
|
||||||
if pricing_rules:
|
if pricing_rules:
|
||||||
pricing_rules = filter(lambda x: (flt(args.get("qty"))>=flt(x.min_qty)
|
pricing_rules = filter(lambda x: (flt(stock_qty)>=flt(x.min_qty)
|
||||||
and (flt(args.get("qty"))<=x.max_qty if x.max_qty else True)), pricing_rules)
|
and (flt(stock_qty)<=x.max_qty if x.max_qty else True)), pricing_rules)
|
||||||
|
|
||||||
# add variant_of property in pricing rule
|
# add variant_of property in pricing rule
|
||||||
for p in pricing_rules:
|
for p in pricing_rules:
|
||||||
|
|||||||
@@ -5,6 +5,9 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import unittest
|
import unittest
|
||||||
import frappe
|
import frappe
|
||||||
|
from erpnext.selling.doctype.sales_order.test_sales_order import make_sales_order
|
||||||
|
from erpnext.stock.get_item_details import get_item_details
|
||||||
|
from frappe import MandatoryError
|
||||||
|
|
||||||
class TestPricingRule(unittest.TestCase):
|
class TestPricingRule(unittest.TestCase):
|
||||||
def test_pricing_rule_for_discount(self):
|
def test_pricing_rule_for_discount(self):
|
||||||
@@ -203,3 +206,46 @@ class TestPricingRule(unittest.TestCase):
|
|||||||
|
|
||||||
details = get_item_details(args)
|
details = get_item_details(args)
|
||||||
self.assertEquals(details.get("discount_percentage"), 17.5)
|
self.assertEquals(details.get("discount_percentage"), 17.5)
|
||||||
|
|
||||||
|
def test_pricing_rule_for_stock_qty(self):
|
||||||
|
frappe.db.sql("delete from `tabPricing Rule`")
|
||||||
|
|
||||||
|
test_record = {
|
||||||
|
"doctype": "Pricing Rule",
|
||||||
|
"title": "_Test Pricing Rule",
|
||||||
|
"apply_on": "Item Code",
|
||||||
|
"item_code": "_Test Item",
|
||||||
|
"selling": 1,
|
||||||
|
"price_or_discount": "Discount Percentage",
|
||||||
|
"price": 0,
|
||||||
|
"min_qty": 5,
|
||||||
|
"max_qty": 7,
|
||||||
|
"discount_percentage": 17.5,
|
||||||
|
"company": "_Test Company"
|
||||||
|
}
|
||||||
|
frappe.get_doc(test_record.copy()).insert()
|
||||||
|
|
||||||
|
if not frappe.db.get_value('UOM Conversion Detail',
|
||||||
|
{'parent': '_Test Item', 'uom': 'box'}):
|
||||||
|
item = frappe.get_doc('Item', '_Test Item')
|
||||||
|
item.append('uoms', {
|
||||||
|
'uom': 'Box',
|
||||||
|
'conversion_factor': 5
|
||||||
|
})
|
||||||
|
item.save(ignore_permissions=True)
|
||||||
|
|
||||||
|
# With pricing rule
|
||||||
|
so = make_sales_order(item_code="_Test Item", qty=1, uom="Box", do_not_submit=True)
|
||||||
|
so.items[0].price_list_rate = 100
|
||||||
|
so.submit()
|
||||||
|
so = frappe.get_doc('Sales Order', so.name)
|
||||||
|
self.assertEquals(so.items[0].discount_percentage, 17.5)
|
||||||
|
self.assertEquals(so.items[0].rate, 82.5)
|
||||||
|
|
||||||
|
# Without pricing rule
|
||||||
|
so = make_sales_order(item_code="_Test Item", qty=2, uom="Box", do_not_submit=True)
|
||||||
|
so.items[0].price_list_rate = 100
|
||||||
|
so.submit()
|
||||||
|
so = frappe.get_doc('Sales Order', so.name)
|
||||||
|
self.assertEquals(so.items[0].discount_percentage, 0)
|
||||||
|
self.assertEquals(so.items[0].rate, 100)
|
||||||
@@ -49,29 +49,38 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(doc.docstatus===0) {
|
if(doc.docstatus===0) {
|
||||||
cur_frm.add_custom_button(__('Purchase Order'), function() {
|
var me = this;
|
||||||
|
this.frm.add_custom_button(__('Purchase Order'), function() {
|
||||||
erpnext.utils.map_current_doc({
|
erpnext.utils.map_current_doc({
|
||||||
method: "erpnext.buying.doctype.purchase_order.purchase_order.make_purchase_invoice",
|
method: "erpnext.buying.doctype.purchase_order.purchase_order.make_purchase_invoice",
|
||||||
source_doctype: "Purchase Order",
|
source_doctype: "Purchase Order",
|
||||||
|
target: me.frm,
|
||||||
|
setters: {
|
||||||
|
supplier: me.frm.doc.supplier || undefined,
|
||||||
|
},
|
||||||
get_query_filters: {
|
get_query_filters: {
|
||||||
supplier: cur_frm.doc.supplier || undefined,
|
|
||||||
docstatus: 1,
|
docstatus: 1,
|
||||||
status: ["!=", "Closed"],
|
status: ["!=", "Closed"],
|
||||||
per_billed: ["<", 99.99],
|
per_billed: ["<", 99.99],
|
||||||
company: cur_frm.doc.company
|
company: me.frm.doc.company
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, __("Get items from"));
|
}, __("Get items from"));
|
||||||
|
|
||||||
cur_frm.add_custom_button(__('Purchase Receipt'), function() {
|
this.frm.add_custom_button(__('Purchase Receipt'), function() {
|
||||||
erpnext.utils.map_current_doc({
|
erpnext.utils.map_current_doc({
|
||||||
method: "erpnext.stock.doctype.purchase_receipt.purchase_receipt.make_purchase_invoice",
|
method: "erpnext.stock.doctype.purchase_receipt.purchase_receipt.make_purchase_invoice",
|
||||||
source_doctype: "Purchase Receipt",
|
source_doctype: "Purchase Receipt",
|
||||||
|
target: me.frm,
|
||||||
|
date_field: "posting_date",
|
||||||
|
setters: {
|
||||||
|
supplier: me.frm.doc.supplier || undefined,
|
||||||
|
},
|
||||||
get_query_filters: {
|
get_query_filters: {
|
||||||
supplier: cur_frm.doc.supplier || undefined,
|
|
||||||
docstatus: 1,
|
docstatus: 1,
|
||||||
status: ["!=", "Closed"],
|
status: ["!=", "Closed"],
|
||||||
company: cur_frm.doc.company
|
company: me.frm.doc.company,
|
||||||
|
is_return: 0
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, __("Get items from"));
|
}, __("Get items from"));
|
||||||
@@ -120,7 +129,7 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
|
|||||||
hide_fields(this.frm.doc);
|
hide_fields(this.frm.doc);
|
||||||
if(cint(this.frm.doc.is_paid)) {
|
if(cint(this.frm.doc.is_paid)) {
|
||||||
if(!this.frm.doc.company) {
|
if(!this.frm.doc.company) {
|
||||||
cur_frm.set_value("is_paid", 0)
|
this.frm.set_value("is_paid", 0)
|
||||||
msgprint(__("Please specify Company to proceed"));
|
msgprint(__("Please specify Company to proceed"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
"editable_grid": 0,
|
"editable_grid": 0,
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 1,
|
"allow_on_submit": 1,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -43,6 +44,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -74,6 +76,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -105,6 +108,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 1,
|
"bold": 1,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -136,6 +140,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -166,6 +171,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -195,6 +201,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -224,6 +231,7 @@
|
|||||||
"width": "50%"
|
"width": "50%"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -253,6 +261,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -284,6 +293,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -315,6 +325,7 @@
|
|||||||
"width": "100px"
|
"width": "100px"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -334,7 +345,7 @@
|
|||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
"print_hide": 0,
|
"print_hide": 1,
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"remember_last_selected_value": 0,
|
"remember_last_selected_value": 0,
|
||||||
@@ -345,6 +356,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -376,6 +388,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 1,
|
"collapsible": 1,
|
||||||
@@ -406,6 +419,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -437,6 +451,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -465,6 +480,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -495,6 +511,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -525,6 +542,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -555,6 +573,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -586,6 +605,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 1,
|
"collapsible": 1,
|
||||||
@@ -615,6 +635,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -644,6 +665,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -673,6 +695,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -702,6 +725,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -730,6 +754,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -758,6 +783,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -786,6 +812,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -814,6 +841,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -845,6 +873,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -874,6 +903,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 1,
|
"collapsible": 1,
|
||||||
@@ -903,6 +933,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -934,6 +965,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -966,6 +998,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -993,6 +1026,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1022,6 +1056,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1051,6 +1086,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1080,6 +1116,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1108,6 +1145,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1138,6 +1176,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1168,6 +1207,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1199,6 +1239,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1226,6 +1267,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1256,6 +1298,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1288,6 +1331,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1315,6 +1359,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1345,6 +1390,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1376,6 +1422,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1406,6 +1453,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1437,6 +1485,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1468,6 +1517,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1497,6 +1547,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1527,6 +1578,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1558,6 +1610,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1589,6 +1642,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1620,6 +1674,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1648,6 +1703,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1679,6 +1735,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1710,6 +1767,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1740,6 +1798,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 1,
|
"collapsible": 1,
|
||||||
@@ -1770,6 +1829,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1801,6 +1861,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1831,6 +1892,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1859,6 +1921,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1888,6 +1951,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1918,6 +1982,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1946,6 +2011,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1977,6 +2043,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -2008,6 +2075,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -2037,6 +2105,7 @@
|
|||||||
"width": "50%"
|
"width": "50%"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -2068,6 +2137,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -2098,6 +2168,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -2129,6 +2200,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -2160,6 +2232,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 1,
|
"collapsible": 1,
|
||||||
@@ -2191,6 +2264,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -2221,6 +2295,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -2251,6 +2326,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -2279,6 +2355,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -2310,6 +2387,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -2340,6 +2418,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 1,
|
"collapsible": 1,
|
||||||
@@ -2371,6 +2450,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -2400,6 +2480,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -2430,6 +2511,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -2458,6 +2540,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -2488,6 +2571,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -2518,6 +2602,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 1,
|
"collapsible": 1,
|
||||||
@@ -2549,6 +2634,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -2579,6 +2665,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -2610,6 +2697,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 1,
|
"collapsible": 1,
|
||||||
@@ -2640,6 +2728,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -2669,6 +2758,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -2697,6 +2787,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -2726,6 +2817,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -2757,6 +2849,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -2789,6 +2882,7 @@
|
|||||||
"width": "50px"
|
"width": "50px"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -2819,6 +2913,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 1,
|
"collapsible": 1,
|
||||||
@@ -2848,6 +2943,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 1,
|
"allow_on_submit": 1,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -2878,6 +2974,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 1,
|
"allow_on_submit": 1,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -2909,6 +3006,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -2938,6 +3036,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 1,
|
"collapsible": 1,
|
||||||
@@ -2968,6 +3067,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -3000,6 +3100,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -3030,6 +3131,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -3063,6 +3165,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -3093,6 +3196,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -3120,6 +3224,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -3151,6 +3256,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -3181,6 +3287,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -3212,6 +3319,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 1,
|
"collapsible": 1,
|
||||||
@@ -3243,6 +3351,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 1,
|
"allow_on_submit": 1,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -3273,6 +3382,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 1,
|
"allow_on_submit": 1,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -3304,6 +3414,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 1,
|
"allow_on_submit": 1,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -3334,6 +3445,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 1,
|
"allow_on_submit": 1,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -3364,6 +3476,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 1,
|
"allow_on_submit": 1,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -3394,6 +3507,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 1,
|
"allow_on_submit": 1,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -3425,6 +3539,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 1,
|
"allow_on_submit": 1,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -3455,6 +3570,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 1,
|
"allow_on_submit": 1,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -3485,6 +3601,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -3513,6 +3630,7 @@
|
|||||||
"width": "50%"
|
"width": "50%"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -3543,6 +3661,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -3573,6 +3692,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 1,
|
"allow_on_submit": 1,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -3603,6 +3723,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -3646,7 +3767,7 @@
|
|||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"menu_index": 0,
|
"menu_index": 0,
|
||||||
"modified": "2017-04-10 12:05:28.082020",
|
"modified": "2017-05-17 10:35:40.729350",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Purchase Invoice",
|
"name": "Purchase Invoice",
|
||||||
|
|||||||
@@ -112,33 +112,44 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
|
|||||||
},
|
},
|
||||||
|
|
||||||
sales_order_btn: function() {
|
sales_order_btn: function() {
|
||||||
this.$sales_order_btn = cur_frm.add_custom_button(__('Sales Order'),
|
var me = this;
|
||||||
|
this.$sales_order_btn = this.frm.add_custom_button(__('Sales Order'),
|
||||||
function() {
|
function() {
|
||||||
erpnext.utils.map_current_doc({
|
erpnext.utils.map_current_doc({
|
||||||
method: "erpnext.selling.doctype.sales_order.sales_order.make_sales_invoice",
|
method: "erpnext.selling.doctype.sales_order.sales_order.make_sales_invoice",
|
||||||
source_doctype: "Sales Order",
|
source_doctype: "Sales Order",
|
||||||
|
target: me.frm,
|
||||||
|
setters: {
|
||||||
|
customer: me.frm.doc.customer || undefined,
|
||||||
|
},
|
||||||
get_query_filters: {
|
get_query_filters: {
|
||||||
docstatus: 1,
|
docstatus: 1,
|
||||||
status: ["!=", "Closed"],
|
status: ["!=", "Closed"],
|
||||||
per_billed: ["<", 99.99],
|
per_billed: ["<", 99.99],
|
||||||
customer: cur_frm.doc.customer || undefined,
|
company: me.frm.doc.company
|
||||||
company: cur_frm.doc.company
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, __("Get items from"));
|
}, __("Get items from"));
|
||||||
},
|
},
|
||||||
|
|
||||||
delivery_note_btn: function() {
|
delivery_note_btn: function() {
|
||||||
this.$delivery_note_btn = cur_frm.add_custom_button(__('Delivery Note'),
|
var me = this;
|
||||||
|
this.$delivery_note_btn = this.frm.add_custom_button(__('Delivery Note'),
|
||||||
function() {
|
function() {
|
||||||
erpnext.utils.map_current_doc({
|
erpnext.utils.map_current_doc({
|
||||||
method: "erpnext.stock.doctype.delivery_note.delivery_note.make_sales_invoice",
|
method: "erpnext.stock.doctype.delivery_note.delivery_note.make_sales_invoice",
|
||||||
source_doctype: "Delivery Note",
|
source_doctype: "Delivery Note",
|
||||||
|
target: me.frm,
|
||||||
|
date_field: "posting_date",
|
||||||
|
setters: {
|
||||||
|
customer: me.frm.doc.customer || undefined
|
||||||
|
},
|
||||||
get_query: function() {
|
get_query: function() {
|
||||||
var filters = {
|
var filters = {
|
||||||
company: cur_frm.doc.company
|
docstatus: 1,
|
||||||
|
company: me.frm.doc.company
|
||||||
};
|
};
|
||||||
if(cur_frm.doc.customer) filters["customer"] = cur_frm.doc.customer;
|
if(me.frm.doc.customer) filters["customer"] = me.frm.doc.customer;
|
||||||
return {
|
return {
|
||||||
query: "erpnext.controllers.queries.get_delivery_notes_to_be_billed",
|
query: "erpnext.controllers.queries.get_delivery_notes_to_be_billed",
|
||||||
filters: filters
|
filters: filters
|
||||||
@@ -288,6 +299,7 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
|
|||||||
this.calculate_write_off_amount()
|
this.calculate_write_off_amount()
|
||||||
}else {
|
}else {
|
||||||
this.frm.set_value("change_amount", 0.0)
|
this.frm.set_value("change_amount", 0.0)
|
||||||
|
this.frm.set_value("base_change_amount", 0.0)
|
||||||
}
|
}
|
||||||
|
|
||||||
this.frm.refresh_fields();
|
this.frm.refresh_fields();
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -17,6 +17,7 @@ from erpnext.stock.doctype.delivery_note.delivery_note import update_billed_amou
|
|||||||
from erpnext.projects.doctype.timesheet.timesheet import get_projectwise_timesheet_data
|
from erpnext.projects.doctype.timesheet.timesheet import get_projectwise_timesheet_data
|
||||||
from erpnext.accounts.doctype.asset.depreciation \
|
from erpnext.accounts.doctype.asset.depreciation \
|
||||||
import get_disposal_account_and_cost_center, get_gl_entries_on_asset_disposal
|
import get_disposal_account_and_cost_center, get_gl_entries_on_asset_disposal
|
||||||
|
from erpnext.stock.doctype.batch.batch import set_batch_nos
|
||||||
|
|
||||||
form_grid_templates = {
|
form_grid_templates = {
|
||||||
"items": "templates/form_grid/item_grid.html"
|
"items": "templates/form_grid/item_grid.html"
|
||||||
@@ -52,7 +53,7 @@ class SalesInvoice(SellingController):
|
|||||||
|
|
||||||
def validate(self):
|
def validate(self):
|
||||||
super(SalesInvoice, self).validate()
|
super(SalesInvoice, self).validate()
|
||||||
self.validate_posting_time()
|
self.validate_auto_set_posting_time()
|
||||||
self.so_dn_required()
|
self.so_dn_required()
|
||||||
self.validate_proj_cust()
|
self.validate_proj_cust()
|
||||||
self.validate_with_previous_doc()
|
self.validate_with_previous_doc()
|
||||||
@@ -79,6 +80,10 @@ class SalesInvoice(SellingController):
|
|||||||
if not self.is_opening:
|
if not self.is_opening:
|
||||||
self.is_opening = 'No'
|
self.is_opening = 'No'
|
||||||
|
|
||||||
|
if self._action != 'submit' and self.update_stock and not self.is_return:
|
||||||
|
set_batch_nos(self, 'warehouse', True)
|
||||||
|
|
||||||
|
|
||||||
self.set_against_income_account()
|
self.set_against_income_account()
|
||||||
self.validate_c_form()
|
self.validate_c_form()
|
||||||
self.validate_time_sheets_are_submitted()
|
self.validate_time_sheets_are_submitted()
|
||||||
@@ -378,6 +383,12 @@ class SalesInvoice(SellingController):
|
|||||||
def add_remarks(self):
|
def add_remarks(self):
|
||||||
if not self.remarks: self.remarks = 'No Remarks'
|
if not self.remarks: self.remarks = 'No Remarks'
|
||||||
|
|
||||||
|
def validate_auto_set_posting_time(self):
|
||||||
|
# Don't auto set the posting date and time if invoice is amended
|
||||||
|
if self.is_new() and self.amended_from:
|
||||||
|
self.set_posting_time = 1
|
||||||
|
|
||||||
|
self.validate_posting_time()
|
||||||
|
|
||||||
def so_dn_required(self):
|
def so_dn_required(self):
|
||||||
"""check in manage account if sales order / delivery note required or not."""
|
"""check in manage account if sales order / delivery note required or not."""
|
||||||
@@ -400,10 +411,10 @@ class SalesInvoice(SellingController):
|
|||||||
throw(_("Customer {0} does not belong to project {1}").format(self.customer,self.project))
|
throw(_("Customer {0} does not belong to project {1}").format(self.customer,self.project))
|
||||||
|
|
||||||
def validate_pos(self):
|
def validate_pos(self):
|
||||||
if flt(self.paid_amount) + flt(self.write_off_amount) \
|
if self.is_return:
|
||||||
- flt(self.grand_total) > 1/(10**(self.precision("grand_total") + 1)) and self.is_return:
|
if flt(self.paid_amount) + flt(self.write_off_amount) - flt(self.grand_total) < \
|
||||||
frappe.throw(_("""Paid amount + Write Off Amount can not be greater than Grand Total"""))
|
1/(10**(self.precision("grand_total") + 1)):
|
||||||
|
frappe.throw(_("Paid amount + Write Off Amount can not be greater than Grand Total"))
|
||||||
|
|
||||||
def validate_item_code(self):
|
def validate_item_code(self):
|
||||||
for d in self.get('items'):
|
for d in self.get('items'):
|
||||||
@@ -820,7 +831,8 @@ def make_delivery_note(source_name, target_doc=None):
|
|||||||
"parent": "against_sales_invoice",
|
"parent": "against_sales_invoice",
|
||||||
"serial_no": "serial_no",
|
"serial_no": "serial_no",
|
||||||
"sales_order": "against_sales_order",
|
"sales_order": "against_sales_order",
|
||||||
"so_detail": "so_detail"
|
"so_detail": "so_detail",
|
||||||
|
"cost_center": "cost_center"
|
||||||
},
|
},
|
||||||
"postprocess": update_item,
|
"postprocess": update_item,
|
||||||
"condition": lambda doc: doc.delivered_by_supplier!=1
|
"condition": lambda doc: doc.delivered_by_supplier!=1
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
"editable_grid": 1,
|
"editable_grid": 1,
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -41,6 +42,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 1,
|
"bold": 1,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -72,6 +74,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -99,6 +102,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -129,6 +133,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -157,6 +162,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 1,
|
"collapsible": 1,
|
||||||
@@ -186,6 +192,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -218,6 +225,7 @@
|
|||||||
"width": "200px"
|
"width": "200px"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -246,6 +254,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -276,6 +285,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -305,6 +315,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -333,6 +344,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 1,
|
"bold": 1,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -363,6 +375,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -392,6 +405,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -419,6 +433,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -449,6 +464,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -478,6 +494,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -507,6 +524,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -535,6 +553,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -566,6 +585,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -597,6 +617,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 1,
|
"collapsible": 1,
|
||||||
@@ -626,65 +647,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"depends_on": "price_list_rate",
|
|
||||||
"fieldname": "discount_percentage",
|
|
||||||
"fieldtype": "Percent",
|
|
||||||
"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": "Discount on Price List Rate (%)",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"oldfieldname": "adj_rate",
|
|
||||||
"oldfieldtype": "Float",
|
|
||||||
"permlevel": 0,
|
|
||||||
"print_hide": 1,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "column_break_19",
|
|
||||||
"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,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -716,6 +679,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -746,12 +710,13 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
"depends_on": "eval:doc.margin_type && doc.price_list_rate",
|
"depends_on": "eval:doc.margin_type && doc.price_list_rate && doc.margin_rate_or_amount",
|
||||||
"fieldname": "total_margin",
|
"fieldname": "rate_with_margin",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
@@ -760,7 +725,7 @@
|
|||||||
"in_global_search": 0,
|
"in_global_search": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Total Margin",
|
"label": "Rate With Margin",
|
||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -776,6 +741,69 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"columns": 0,
|
||||||
|
"fieldname": "column_break_19",
|
||||||
|
"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_bulk_edit": 0,
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"columns": 0,
|
||||||
|
"depends_on": "price_list_rate",
|
||||||
|
"fieldname": "discount_percentage",
|
||||||
|
"fieldtype": "Percent",
|
||||||
|
"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": "Discount (%) on Price List Rate with Margin",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"oldfieldname": "adj_rate",
|
||||||
|
"oldfieldtype": "Float",
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "2",
|
||||||
|
"print_hide": 1,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"remember_last_selected_value": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -803,6 +831,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 1,
|
"bold": 1,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -834,6 +863,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -865,6 +895,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -892,6 +923,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -923,6 +955,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -954,6 +987,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -983,6 +1017,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1011,6 +1046,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1041,6 +1077,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1071,6 +1108,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1099,6 +1137,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1129,6 +1168,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1159,6 +1199,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 1,
|
"collapsible": 1,
|
||||||
@@ -1189,6 +1230,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1218,6 +1260,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 1,
|
"collapsible": 1,
|
||||||
@@ -1246,6 +1289,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1279,6 +1323,7 @@
|
|||||||
"width": "120px"
|
"width": "120px"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1309,6 +1354,7 @@
|
|||||||
"width": "120px"
|
"width": "120px"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1336,6 +1382,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1370,6 +1417,7 @@
|
|||||||
"width": "120px"
|
"width": "120px"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 1,
|
"collapsible": 1,
|
||||||
@@ -1400,6 +1448,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1431,6 +1480,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1461,6 +1511,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1492,6 +1543,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1521,6 +1573,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1548,6 +1601,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1577,6 +1631,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1607,6 +1662,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1639,6 +1695,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1669,6 +1726,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1699,6 +1757,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 1,
|
"allow_on_submit": 1,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1730,6 +1789,7 @@
|
|||||||
"width": "150px"
|
"width": "150px"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 1,
|
"allow_on_submit": 1,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1760,6 +1820,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 1,
|
"collapsible": 1,
|
||||||
@@ -1789,6 +1850,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1820,6 +1882,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1850,6 +1913,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1878,6 +1942,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1909,6 +1974,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1939,6 +2005,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1969,6 +2036,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -1998,6 +2066,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -2028,6 +2097,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -2056,6 +2126,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 1,
|
"allow_on_submit": 1,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -2094,7 +2165,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2017-04-19 11:53:26.682964",
|
"modified": "2017-05-10 17:14:42.681757",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Sales Invoice Item",
|
"name": "Sales Invoice Item",
|
||||||
|
|||||||
@@ -78,8 +78,16 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
|||||||
|
|
||||||
make_menu_list: function () {
|
make_menu_list: function () {
|
||||||
var me = this;
|
var me = this;
|
||||||
|
|
||||||
this.page.clear_menu();
|
this.page.clear_menu();
|
||||||
|
|
||||||
|
// for mobile
|
||||||
|
this.page.add_menu_item(__("Pay"), function () {
|
||||||
|
me.validate();
|
||||||
|
me.update_paid_amount_status(true);
|
||||||
|
me.create_invoice();
|
||||||
|
me.make_payment();
|
||||||
|
}).addClass('visible-xs');
|
||||||
|
|
||||||
this.page.add_menu_item(__("New Sales Invoice"), function () {
|
this.page.add_menu_item(__("New Sales Invoice"), function () {
|
||||||
me.save_previous_entry();
|
me.save_previous_entry();
|
||||||
me.create_new();
|
me.create_new();
|
||||||
@@ -347,8 +355,14 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
|||||||
|
|
||||||
this.print_template_data = frappe.render_template("print_template", {
|
this.print_template_data = frappe.render_template("print_template", {
|
||||||
content: this.print_template,
|
content: this.print_template,
|
||||||
title: "POS", base_url: frappe.urllib.get_base_url(), print_css: frappe.boot.print_css,
|
title: "POS",
|
||||||
print_settings: this.print_settings, header: this.letter_head.header, footer: this.letter_head.footer
|
base_url: frappe.urllib.get_base_url(),
|
||||||
|
print_css: frappe.boot.print_css,
|
||||||
|
print_settings: this.print_settings,
|
||||||
|
header: this.letter_head.header,
|
||||||
|
footer: this.letter_head.footer,
|
||||||
|
landscape: false,
|
||||||
|
columns: []
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -695,7 +709,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
|||||||
filter: function (item, input) {
|
filter: function (item, input) {
|
||||||
var value = item.value.toLowerCase();
|
var value = item.value.toLowerCase();
|
||||||
if (value.indexOf('is_action') !== -1 ||
|
if (value.indexOf('is_action') !== -1 ||
|
||||||
value.indexOf(input) !== -1) {
|
value.indexOf(input.toLowerCase()) !== -1) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -788,7 +802,8 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
|||||||
|
|
||||||
add_customer: function() {
|
add_customer: function() {
|
||||||
this.frm.doc.customer = "";
|
this.frm.doc.customer = "";
|
||||||
this.update_customer(true)
|
this.update_customer(true);
|
||||||
|
this.numeric_keypad.show();
|
||||||
},
|
},
|
||||||
|
|
||||||
update_customer: function (new_customer) {
|
update_customer: function (new_customer) {
|
||||||
|
|||||||
@@ -7,10 +7,13 @@ import frappe
|
|||||||
import datetime
|
import datetime
|
||||||
from frappe import _, msgprint, scrub
|
from frappe import _, msgprint, scrub
|
||||||
from frappe.defaults import get_user_permissions
|
from frappe.defaults import get_user_permissions
|
||||||
from frappe.utils import add_days, getdate, formatdate, get_first_day, date_diff, add_years, get_timestamp
|
from frappe.utils import add_days, getdate, formatdate, get_first_day, date_diff, \
|
||||||
|
add_years, get_timestamp, nowdate, flt
|
||||||
from frappe.geo.doctype.address.address import get_address_display, get_default_address
|
from frappe.geo.doctype.address.address import get_address_display, get_default_address
|
||||||
from frappe.email.doctype.contact.contact import get_contact_details, get_default_contact
|
from frappe.email.doctype.contact.contact import get_contact_details, get_default_contact
|
||||||
from erpnext.exceptions import PartyFrozen, InvalidCurrency, PartyDisabled, InvalidAccountCurrency
|
from erpnext.exceptions import PartyFrozen, InvalidCurrency, PartyDisabled, InvalidAccountCurrency
|
||||||
|
from erpnext.accounts.utils import get_fiscal_year
|
||||||
|
from erpnext import get_default_currency
|
||||||
|
|
||||||
class DuplicatePartyAccountError(frappe.ValidationError): pass
|
class DuplicatePartyAccountError(frappe.ValidationError): pass
|
||||||
|
|
||||||
@@ -360,3 +363,38 @@ def get_timeline_data(doctype, name):
|
|||||||
out.update({ timestamp: count })
|
out.update({ timestamp: count })
|
||||||
|
|
||||||
return out
|
return out
|
||||||
|
|
||||||
|
def get_dashboard_info(party_type, party):
|
||||||
|
current_fiscal_year = get_fiscal_year(nowdate(), as_dict=True)
|
||||||
|
company = frappe.db.get_default("company") or frappe.get_all("Company")[0].name
|
||||||
|
party_account_currency = get_party_account_currency(party_type, party, company)
|
||||||
|
company_default_currency = get_default_currency() \
|
||||||
|
or frappe.db.get_value('Company', company, 'default_currency')
|
||||||
|
|
||||||
|
if party_account_currency==company_default_currency:
|
||||||
|
total_field = "base_grand_total"
|
||||||
|
else:
|
||||||
|
total_field = "grand_total"
|
||||||
|
|
||||||
|
doctype = "Sales Invoice" if party_type=="Customer" else "Purchase Invoice"
|
||||||
|
|
||||||
|
billing_this_year = frappe.db.sql("""
|
||||||
|
select sum({0})
|
||||||
|
from `tab{1}`
|
||||||
|
where {2}=%s and docstatus=1 and posting_date between %s and %s
|
||||||
|
""".format(total_field, doctype, party_type.lower()),
|
||||||
|
(party, current_fiscal_year.year_start_date, current_fiscal_year.year_end_date))
|
||||||
|
|
||||||
|
total_unpaid = frappe.db.sql("""
|
||||||
|
select sum(debit_in_account_currency) - sum(credit_in_account_currency)
|
||||||
|
from `tabGL Entry`
|
||||||
|
where party_type = %s and party=%s""", (party_type, party))
|
||||||
|
|
||||||
|
info = {}
|
||||||
|
info["billing_this_year"] = flt(billing_this_year[0][0]) if billing_this_year else 0
|
||||||
|
info["currency"] = party_account_currency
|
||||||
|
info["total_unpaid"] = flt(total_unpaid[0][0]) if total_unpaid else 0
|
||||||
|
if party_type == "Supplier":
|
||||||
|
info["total_unpaid"] = -1 * info["total_unpaid"]
|
||||||
|
|
||||||
|
return info
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe
|
||||||
|
import re
|
||||||
from frappe import _
|
from frappe import _
|
||||||
from frappe.utils import (flt, getdate, get_first_day, get_last_day, date_diff,
|
from frappe.utils import (flt, getdate, get_first_day, get_last_day, date_diff,
|
||||||
add_months, add_days, formatdate, cint)
|
add_months, add_days, formatdate, cint)
|
||||||
@@ -277,6 +278,9 @@ def sort_root_accounts(roots):
|
|||||||
"""Sort root types as Asset, Liability, Equity, Income, Expense"""
|
"""Sort root types as Asset, Liability, Equity, Income, Expense"""
|
||||||
|
|
||||||
def compare_roots(a, b):
|
def compare_roots(a, b):
|
||||||
|
if a.value and re.split('\W+', a.value)[0].isdigit():
|
||||||
|
# if chart of accounts is numbered, then sort by number
|
||||||
|
return cmp(a.value, b.value)
|
||||||
if a.report_type != b.report_type and a.report_type == "Balance Sheet":
|
if a.report_type != b.report_type and a.report_type == "Balance Sheet":
|
||||||
return -1
|
return -1
|
||||||
if a.root_type != b.root_type and a.root_type == "Asset":
|
if a.root_type != b.root_type and a.root_type == "Asset":
|
||||||
|
|||||||
@@ -5,7 +5,15 @@
|
|||||||
</div>
|
</div>
|
||||||
{% } %}
|
{% } %}
|
||||||
<h2 class="text-center">{%= __("Statement of Account") %}</h2>
|
<h2 class="text-center">{%= __("Statement of Account") %}</h2>
|
||||||
<h4 class="text-center">{%= (filters.party || filters.account) && ((filters.party || filters.account) + ", ") || "" %} {%= filters.company %}</h4>
|
<h4 class="text-center">
|
||||||
|
{% if (filters.party_name) { %}
|
||||||
|
{%= filters.party_name %}
|
||||||
|
{% } else if (filters.party) { %}
|
||||||
|
{%= filters.party %}
|
||||||
|
{% } else if (filters.account) { %}
|
||||||
|
{%= filters.account %}
|
||||||
|
{% } %}
|
||||||
|
</h4>
|
||||||
<h5 class="text-center">
|
<h5 class="text-center">
|
||||||
{%= dateutil.str_to_user(filters.from_date) %}
|
{%= dateutil.str_to_user(filters.from_date) %}
|
||||||
{%= __("to") %}
|
{%= __("to") %}
|
||||||
|
|||||||
@@ -74,7 +74,26 @@ frappe.query_reports["General Ledger"] = {
|
|||||||
frappe.throw(__("Please select Party Type first"));
|
frappe.throw(__("Please select Party Type first"));
|
||||||
}
|
}
|
||||||
return party_type;
|
return party_type;
|
||||||
|
},
|
||||||
|
change: function() {
|
||||||
|
var party_type = frappe.query_report_filters_by_name.party_type.get_value();
|
||||||
|
var party = frappe.query_report_filters_by_name.party.get_value();
|
||||||
|
if(!party_type || !party) {
|
||||||
|
frappe.query_report_filters_by_name.party_name.set_value("");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var fieldname = party_type.toLowerCase() + "_name";
|
||||||
|
frappe.db.get_value(party_type, party, fieldname, function(value) {
|
||||||
|
frappe.query_report_filters_by_name.party_name.set_value(value[fieldname]);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname":"party_name",
|
||||||
|
"label": __("Party Name"),
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"hidden": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname":"group_by_voucher",
|
"fieldname":"group_by_voucher",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe, erpnext
|
||||||
from frappe import _
|
from frappe import _
|
||||||
from frappe.utils import flt, getdate, formatdate, cstr
|
from frappe.utils import flt, getdate, formatdate, cstr
|
||||||
from erpnext.accounts.report.financial_statements \
|
from erpnext.accounts.report.financial_statements \
|
||||||
@@ -53,6 +53,7 @@ def validate_filters(filters):
|
|||||||
def get_data(filters):
|
def get_data(filters):
|
||||||
accounts = frappe.db.sql("""select name, parent_account, account_name, root_type, report_type, lft, rgt
|
accounts = frappe.db.sql("""select name, parent_account, account_name, root_type, report_type, lft, rgt
|
||||||
from `tabAccount` where company=%s order by lft""", filters.company, as_dict=True)
|
from `tabAccount` where company=%s order by lft""", filters.company, as_dict=True)
|
||||||
|
company_currency = erpnext.get_company_currency(filters.company)
|
||||||
|
|
||||||
if not accounts:
|
if not accounts:
|
||||||
return None
|
return None
|
||||||
@@ -69,10 +70,10 @@ def get_data(filters):
|
|||||||
|
|
||||||
opening_balances = get_opening_balances(filters)
|
opening_balances = get_opening_balances(filters)
|
||||||
|
|
||||||
total_row = calculate_values(accounts, gl_entries_by_account, opening_balances, filters)
|
total_row = calculate_values(accounts, gl_entries_by_account, opening_balances, filters, company_currency)
|
||||||
accumulate_values_into_parents(accounts, accounts_by_name)
|
accumulate_values_into_parents(accounts, accounts_by_name)
|
||||||
|
|
||||||
data = prepare_data(accounts, filters, total_row, parent_children_map)
|
data = prepare_data(accounts, filters, total_row, parent_children_map, company_currency)
|
||||||
data = filter_out_zero_value_rows(data, parent_children_map,
|
data = filter_out_zero_value_rows(data, parent_children_map,
|
||||||
show_zero_values=filters.get("show_zero_values"))
|
show_zero_values=filters.get("show_zero_values"))
|
||||||
|
|
||||||
@@ -119,7 +120,7 @@ def get_rootwise_opening_balances(filters, report_type):
|
|||||||
|
|
||||||
return opening
|
return opening
|
||||||
|
|
||||||
def calculate_values(accounts, gl_entries_by_account, opening_balances, filters):
|
def calculate_values(accounts, gl_entries_by_account, opening_balances, filters, company_currency):
|
||||||
init = {
|
init = {
|
||||||
"opening_debit": 0.0,
|
"opening_debit": 0.0,
|
||||||
"opening_credit": 0.0,
|
"opening_credit": 0.0,
|
||||||
@@ -137,7 +138,8 @@ def calculate_values(accounts, gl_entries_by_account, opening_balances, filters)
|
|||||||
"credit": 0.0,
|
"credit": 0.0,
|
||||||
"parent_account": None,
|
"parent_account": None,
|
||||||
"indent": 0,
|
"indent": 0,
|
||||||
"has_value": True
|
"has_value": True,
|
||||||
|
"currency": company_currency
|
||||||
}
|
}
|
||||||
|
|
||||||
for d in accounts:
|
for d in accounts:
|
||||||
@@ -164,9 +166,8 @@ def accumulate_values_into_parents(accounts, accounts_by_name):
|
|||||||
for key in value_fields:
|
for key in value_fields:
|
||||||
accounts_by_name[d.parent_account][key] += d[key]
|
accounts_by_name[d.parent_account][key] += d[key]
|
||||||
|
|
||||||
def prepare_data(accounts, filters, total_row, parent_children_map):
|
def prepare_data(accounts, filters, total_row, parent_children_map, company_currency):
|
||||||
data = []
|
data = []
|
||||||
company_currency = frappe.db.get_value("Company", filters.company, "default_currency")
|
|
||||||
|
|
||||||
for d in accounts:
|
for d in accounts:
|
||||||
has_value = False
|
has_value = False
|
||||||
|
|||||||
@@ -153,30 +153,37 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend(
|
|||||||
},
|
},
|
||||||
|
|
||||||
add_from_mappers: function() {
|
add_from_mappers: function() {
|
||||||
cur_frm.add_custom_button(__('Material Request'),
|
var me = this;
|
||||||
|
this.frm.add_custom_button(__('Material Request'),
|
||||||
function() {
|
function() {
|
||||||
erpnext.utils.map_current_doc({
|
erpnext.utils.map_current_doc({
|
||||||
method: "erpnext.stock.doctype.material_request.material_request.make_purchase_order",
|
method: "erpnext.stock.doctype.material_request.material_request.make_purchase_order",
|
||||||
source_doctype: "Material Request",
|
source_doctype: "Material Request",
|
||||||
|
target: me.frm,
|
||||||
|
setters: {
|
||||||
|
company: me.frm.doc.company
|
||||||
|
},
|
||||||
get_query_filters: {
|
get_query_filters: {
|
||||||
material_request_type: "Purchase",
|
material_request_type: "Purchase",
|
||||||
docstatus: 1,
|
docstatus: 1,
|
||||||
status: ["!=", "Stopped"],
|
status: ["!=", "Stopped"],
|
||||||
per_ordered: ["<", 99.99],
|
per_ordered: ["<", 99.99],
|
||||||
company: cur_frm.doc.company
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, __("Add items from"));
|
}, __("Add items from"));
|
||||||
|
|
||||||
cur_frm.add_custom_button(__('Supplier Quotation'),
|
this.frm.add_custom_button(__('Supplier Quotation'),
|
||||||
function() {
|
function() {
|
||||||
erpnext.utils.map_current_doc({
|
erpnext.utils.map_current_doc({
|
||||||
method: "erpnext.buying.doctype.supplier_quotation.supplier_quotation.make_purchase_order",
|
method: "erpnext.buying.doctype.supplier_quotation.supplier_quotation.make_purchase_order",
|
||||||
source_doctype: "Supplier Quotation",
|
source_doctype: "Supplier Quotation",
|
||||||
|
target: me.frm,
|
||||||
|
setters: {
|
||||||
|
company: me.frm.doc.company
|
||||||
|
},
|
||||||
get_query_filters: {
|
get_query_filters: {
|
||||||
docstatus: 1,
|
docstatus: 1,
|
||||||
status: ["!=", "Stopped"],
|
status: ["!=", "Stopped"],
|
||||||
company: cur_frm.doc.company
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, __("Add items from"));
|
}, __("Add items from"));
|
||||||
|
|||||||
@@ -124,24 +124,28 @@ frappe.ui.form.on("Request for Quotation Supplier",{
|
|||||||
|
|
||||||
erpnext.buying.RequestforQuotationController = erpnext.buying.BuyingController.extend({
|
erpnext.buying.RequestforQuotationController = erpnext.buying.BuyingController.extend({
|
||||||
refresh: function() {
|
refresh: function() {
|
||||||
|
var me = this;
|
||||||
this._super();
|
this._super();
|
||||||
if (this.frm.doc.docstatus===0) {
|
if (this.frm.doc.docstatus===0) {
|
||||||
cur_frm.add_custom_button(__('Material Request'),
|
this.frm.add_custom_button(__('Material Request'),
|
||||||
function() {
|
function() {
|
||||||
erpnext.utils.map_current_doc({
|
erpnext.utils.map_current_doc({
|
||||||
method: "erpnext.stock.doctype.material_request.material_request.make_request_for_quotation",
|
method: "erpnext.stock.doctype.material_request.material_request.make_request_for_quotation",
|
||||||
source_doctype: "Material Request",
|
source_doctype: "Material Request",
|
||||||
|
target: me.frm,
|
||||||
|
setters: {
|
||||||
|
company: me.frm.doc.company
|
||||||
|
},
|
||||||
get_query_filters: {
|
get_query_filters: {
|
||||||
material_request_type: "Purchase",
|
material_request_type: "Purchase",
|
||||||
docstatus: 1,
|
docstatus: 1,
|
||||||
status: ["!=", "Stopped"],
|
status: ["!=", "Stopped"],
|
||||||
per_ordered: ["<", 99.99],
|
per_ordered: ["<", 99.99]
|
||||||
company: cur_frm.doc.company
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, __("Get items from"));
|
}, __("Get items from"));
|
||||||
// Get items from open Material Requests based on supplier
|
// Get items from open Material Requests based on supplier
|
||||||
cur_frm.add_custom_button(__('Possible Supplier'), function() {
|
this.frm.add_custom_button(__('Possible Supplier'), function() {
|
||||||
// Create a dialog window for the user to pick their supplier
|
// Create a dialog window for the user to pick their supplier
|
||||||
var d = new frappe.ui.Dialog({
|
var d = new frappe.ui.Dialog({
|
||||||
title: __('Select Possible Supplier'),
|
title: __('Select Possible Supplier'),
|
||||||
@@ -161,12 +165,15 @@ erpnext.buying.RequestforQuotationController = erpnext.buying.BuyingController.e
|
|||||||
erpnext.utils.map_current_doc({
|
erpnext.utils.map_current_doc({
|
||||||
method: "erpnext.buying.doctype.request_for_quotation.request_for_quotation.get_item_from_material_requests_based_on_supplier",
|
method: "erpnext.buying.doctype.request_for_quotation.request_for_quotation.get_item_from_material_requests_based_on_supplier",
|
||||||
source_name: v.supplier,
|
source_name: v.supplier,
|
||||||
|
target: me.frm,
|
||||||
|
setters: {
|
||||||
|
company: me.frm.doc.company
|
||||||
|
},
|
||||||
get_query_filters: {
|
get_query_filters: {
|
||||||
material_request_type: "Purchase",
|
material_request_type: "Purchase",
|
||||||
docstatus: 1,
|
docstatus: 1,
|
||||||
status: ["!=", "Stopped"],
|
status: ["!=", "Stopped"],
|
||||||
per_ordered: ["<", 99.99],
|
per_ordered: ["<", 99.99]
|
||||||
company: cur_frm.doc.company
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$(btn).done_working();
|
$(btn).done_working();
|
||||||
|
|||||||
@@ -688,7 +688,7 @@
|
|||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
"depends_on": "",
|
"depends_on": "",
|
||||||
"description": "Mention if non-standard receivable account",
|
"description": "Mention if non-standard payable account",
|
||||||
"fieldname": "accounts",
|
"fieldname": "accounts",
|
||||||
"fieldtype": "Table",
|
"fieldtype": "Table",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -850,7 +850,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2017-05-05 04:24:03.884380",
|
"modified": "2017-05-17 12:21:21.218428",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Buying",
|
"module": "Buying",
|
||||||
"name": "Supplier",
|
"name": "Supplier",
|
||||||
|
|||||||
@@ -6,11 +6,9 @@ import frappe
|
|||||||
import frappe.defaults
|
import frappe.defaults
|
||||||
from frappe import msgprint, _
|
from frappe import msgprint, _
|
||||||
from frappe.model.naming import make_autoname
|
from frappe.model.naming import make_autoname
|
||||||
from frappe.geo.address_and_contact import (load_address_and_contact,
|
from frappe.geo.address_and_contact import load_address_and_contact, delete_contact_and_address
|
||||||
delete_contact_and_address)
|
|
||||||
|
|
||||||
from erpnext.utilities.transaction_base import TransactionBase
|
from erpnext.utilities.transaction_base import TransactionBase
|
||||||
from erpnext.accounts.party import validate_party_accounts, get_timeline_data # keep this
|
from erpnext.accounts.party import validate_party_accounts, get_dashboard_info, get_timeline_data # keep this
|
||||||
|
|
||||||
class Supplier(TransactionBase):
|
class Supplier(TransactionBase):
|
||||||
def get_feed(self):
|
def get_feed(self):
|
||||||
@@ -22,22 +20,7 @@ class Supplier(TransactionBase):
|
|||||||
self.load_dashboard_info()
|
self.load_dashboard_info()
|
||||||
|
|
||||||
def load_dashboard_info(self):
|
def load_dashboard_info(self):
|
||||||
billing_this_year = frappe.db.sql("""
|
info = get_dashboard_info(self.doctype, self.name)
|
||||||
select sum(credit_in_account_currency) - sum(debit_in_account_currency)
|
|
||||||
from `tabGL Entry`
|
|
||||||
where voucher_type='Purchase Invoice' and party_type = 'Supplier'
|
|
||||||
and party=%s and fiscal_year = %s""",
|
|
||||||
(self.name, frappe.db.get_default("fiscal_year")))
|
|
||||||
|
|
||||||
total_unpaid = frappe.db.sql("""select sum(outstanding_amount)
|
|
||||||
from `tabPurchase Invoice`
|
|
||||||
where supplier=%s and docstatus = 1""", self.name)
|
|
||||||
|
|
||||||
|
|
||||||
info = {}
|
|
||||||
info["billing_this_year"] = billing_this_year[0][0] if billing_this_year else 0
|
|
||||||
info["total_unpaid"] = total_unpaid[0][0] if total_unpaid else 0
|
|
||||||
|
|
||||||
self.set_onload('dashboard_info', info)
|
self.set_onload('dashboard_info', info)
|
||||||
|
|
||||||
def autoname(self):
|
def autoname(self):
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ frappe.ui.form.on('Suppier Quotation', {
|
|||||||
|
|
||||||
erpnext.buying.SupplierQuotationController = erpnext.buying.BuyingController.extend({
|
erpnext.buying.SupplierQuotationController = erpnext.buying.BuyingController.extend({
|
||||||
refresh: function() {
|
refresh: function() {
|
||||||
|
var me = this;
|
||||||
this._super();
|
this._super();
|
||||||
if (this.frm.doc.docstatus === 1) {
|
if (this.frm.doc.docstatus === 1) {
|
||||||
cur_frm.add_custom_button(__("Purchase Order"), this.make_purchase_order,
|
cur_frm.add_custom_button(__("Purchase Order"), this.make_purchase_order,
|
||||||
@@ -25,17 +26,20 @@ erpnext.buying.SupplierQuotationController = erpnext.buying.BuyingController.ext
|
|||||||
}
|
}
|
||||||
else if (this.frm.doc.docstatus===0) {
|
else if (this.frm.doc.docstatus===0) {
|
||||||
|
|
||||||
cur_frm.add_custom_button(__('Material Request'),
|
this.frm.add_custom_button(__('Material Request'),
|
||||||
function() {
|
function() {
|
||||||
erpnext.utils.map_current_doc({
|
erpnext.utils.map_current_doc({
|
||||||
method: "erpnext.stock.doctype.material_request.material_request.make_supplier_quotation",
|
method: "erpnext.stock.doctype.material_request.material_request.make_supplier_quotation",
|
||||||
source_doctype: "Material Request",
|
source_doctype: "Material Request",
|
||||||
|
target: me.frm,
|
||||||
|
setters: {
|
||||||
|
company: me.frm.doc.company
|
||||||
|
},
|
||||||
get_query_filters: {
|
get_query_filters: {
|
||||||
material_request_type: "Purchase",
|
material_request_type: "Purchase",
|
||||||
docstatus: 1,
|
docstatus: 1,
|
||||||
status: ["!=", "Stopped"],
|
status: ["!=", "Stopped"],
|
||||||
per_ordered: ["<", 99.99],
|
per_ordered: ["<", 99.99]
|
||||||
company: cur_frm.doc.company
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, __("Get items from"));
|
}, __("Get items from"));
|
||||||
|
|||||||
@@ -18,10 +18,6 @@ def get_data():
|
|||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Student Log"
|
"name": "Student Log"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "doctype",
|
|
||||||
"name": "Student Batch"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Student Group"
|
"name": "Student Group"
|
||||||
@@ -58,10 +54,6 @@ def get_data():
|
|||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Program Enrollment Tool"
|
"name": "Program Enrollment Tool"
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "doctype",
|
|
||||||
"name": "Student Batch Creation Tool"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ class AccountsController(TransactionBase):
|
|||||||
self.validate_currency()
|
self.validate_currency()
|
||||||
|
|
||||||
if self.meta.get_field("is_recurring"):
|
if self.meta.get_field("is_recurring"):
|
||||||
if self.amended_from and self.recurring_id:
|
if self.amended_from and self.recurring_id == self.amended_from:
|
||||||
self.recurring_id = None
|
self.recurring_id = None
|
||||||
if not self.get("__islocal"):
|
if not self.get("__islocal"):
|
||||||
validate_recurring_document(self)
|
validate_recurring_document(self)
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ def create_variant(item, args):
|
|||||||
|
|
||||||
variant.set("attributes", variant_attributes)
|
variant.set("attributes", variant_attributes)
|
||||||
copy_attributes_to_variant(template, variant)
|
copy_attributes_to_variant(template, variant)
|
||||||
make_variant_item_code(template.item_code, variant)
|
make_variant_item_code(template.item_code, template.item_name, variant)
|
||||||
|
|
||||||
return variant
|
return variant
|
||||||
|
|
||||||
@@ -194,7 +194,7 @@ def copy_attributes_to_variant(item, variant):
|
|||||||
for d in variant.attributes:
|
for d in variant.attributes:
|
||||||
variant.description += "<p>" + d.attribute + ": " + cstr(d.attribute_value) + "</p>"
|
variant.description += "<p>" + d.attribute + ": " + cstr(d.attribute_value) + "</p>"
|
||||||
|
|
||||||
def make_variant_item_code(template_item_code, variant):
|
def make_variant_item_code(template_item_code, template_item_name, variant):
|
||||||
"""Uses template's item code and abbreviations to make variant's item code"""
|
"""Uses template's item code and abbreviations to make variant's item code"""
|
||||||
if variant.item_code:
|
if variant.item_code:
|
||||||
return
|
return
|
||||||
@@ -220,6 +220,4 @@ def make_variant_item_code(template_item_code, variant):
|
|||||||
|
|
||||||
if abbreviations:
|
if abbreviations:
|
||||||
variant.item_code = "{0}-{1}".format(template_item_code, "-".join(abbreviations))
|
variant.item_code = "{0}-{1}".format(template_item_code, "-".join(abbreviations))
|
||||||
|
variant.item_name = "{0}-{1}".format(template_item_name, "-".join(abbreviations))
|
||||||
if variant.item_code:
|
|
||||||
variant.item_name = variant.item_code
|
|
||||||
|
|||||||
@@ -222,19 +222,21 @@ def get_project_name(doctype, txt, searchfield, start, page_len, filters):
|
|||||||
"_txt": txt.replace('%', '')
|
"_txt": txt.replace('%', '')
|
||||||
})
|
})
|
||||||
|
|
||||||
def get_delivery_notes_to_be_billed(doctype, txt, searchfield, start, page_len, filters):
|
def get_delivery_notes_to_be_billed(doctype, txt, searchfield, start, page_len, filters, as_dict):
|
||||||
return frappe.db.sql("""select `tabDelivery Note`.name, `tabDelivery Note`.customer_name
|
return frappe.db.sql("""
|
||||||
|
select `tabDelivery Note`.name, `tabDelivery Note`.customer, `tabDelivery Note`.posting_date
|
||||||
from `tabDelivery Note`
|
from `tabDelivery Note`
|
||||||
where `tabDelivery Note`.`%(key)s` like %(txt)s and
|
where `tabDelivery Note`.`%(key)s` like %(txt)s and
|
||||||
`tabDelivery Note`.docstatus = 1 and status not in ("Stopped", "Closed") %(fcond)s
|
`tabDelivery Note`.docstatus = 1 and `tabDelivery Note`.is_return = 0
|
||||||
|
and status not in ("Stopped", "Closed") %(fcond)s
|
||||||
and (`tabDelivery Note`.per_billed < 100 or `tabDelivery Note`.grand_total = 0)
|
and (`tabDelivery Note`.per_billed < 100 or `tabDelivery Note`.grand_total = 0)
|
||||||
%(mcond)s order by `tabDelivery Note`.`%(key)s` asc
|
%(mcond)s order by `tabDelivery Note`.`%(key)s` asc
|
||||||
limit %(start)s, %(page_len)s""" % {
|
""" % {
|
||||||
"key": searchfield,
|
"key": searchfield,
|
||||||
"fcond": get_filters_cond(doctype, filters, []),
|
"fcond": get_filters_cond(doctype, filters, []),
|
||||||
"mcond": get_match_cond(doctype),
|
"mcond": get_match_cond(doctype),
|
||||||
"start": "%(start)s", "page_len": "%(page_len)s", "txt": "%(txt)s"
|
"txt": "%(txt)s"
|
||||||
}, { "start": start, "page_len": page_len, "txt": ("%%%s%%" % txt) })
|
}, { "txt": ("%%%s%%" % txt) }, as_dict=as_dict)
|
||||||
|
|
||||||
def get_batch_no(doctype, txt, searchfield, start, page_len, filters):
|
def get_batch_no(doctype, txt, searchfield, start, page_len, filters):
|
||||||
cond = ""
|
cond = ""
|
||||||
|
|||||||
@@ -53,8 +53,8 @@ def validate_returned_items(doc):
|
|||||||
|
|
||||||
valid_items = frappe._dict()
|
valid_items = frappe._dict()
|
||||||
|
|
||||||
select_fields = "item_code, qty, parenttype" if doc.doctype=="Purchase Invoice" \
|
select_fields = "item_code, qty, rate, parenttype" if doc.doctype=="Purchase Invoice" \
|
||||||
else "item_code, qty, serial_no, batch_no, parenttype"
|
else "item_code, qty, rate, serial_no, batch_no, parenttype"
|
||||||
|
|
||||||
if doc.doctype in ['Purchase Invoice', 'Purchase Receipt']:
|
if doc.doctype in ['Purchase Invoice', 'Purchase Receipt']:
|
||||||
select_fields += ",rejected_qty, received_qty"
|
select_fields += ",rejected_qty, received_qty"
|
||||||
@@ -83,9 +83,14 @@ def validate_returned_items(doc):
|
|||||||
ref = valid_items.get(d.item_code, frappe._dict())
|
ref = valid_items.get(d.item_code, frappe._dict())
|
||||||
validate_quantity(doc, d, ref, valid_items, already_returned_items)
|
validate_quantity(doc, d, ref, valid_items, already_returned_items)
|
||||||
|
|
||||||
if ref.batch_no and d.batch_no not in ref.batch_no:
|
if ref.rate and doc.doctype in ("Delivery Note", "Sales Invoice") and flt(d.rate) > ref.rate:
|
||||||
|
frappe.throw(_("Row # {0}: Rate cannot be greater than the rate used in {1} {2}")
|
||||||
|
.format(d.idx, doc.doctype, doc.return_against))
|
||||||
|
|
||||||
|
elif ref.batch_no and d.batch_no not in ref.batch_no:
|
||||||
frappe.throw(_("Row # {0}: Batch No must be same as {1} {2}")
|
frappe.throw(_("Row # {0}: Batch No must be same as {1} {2}")
|
||||||
.format(d.idx, doc.doctype, doc.return_against))
|
.format(d.idx, doc.doctype, doc.return_against))
|
||||||
|
|
||||||
elif ref.serial_no:
|
elif ref.serial_no:
|
||||||
if not d.serial_no:
|
if not d.serial_no:
|
||||||
frappe.throw(_("Row # {0}: Serial No is mandatory").format(d.idx))
|
frappe.throw(_("Row # {0}: Serial No is mandatory").format(d.idx))
|
||||||
@@ -131,6 +136,7 @@ def get_ref_item_dict(valid_items, ref_item_row):
|
|||||||
|
|
||||||
valid_items.setdefault(ref_item_row.item_code, frappe._dict({
|
valid_items.setdefault(ref_item_row.item_code, frappe._dict({
|
||||||
"qty": 0,
|
"qty": 0,
|
||||||
|
"rate": 0,
|
||||||
"rejected_qty": 0,
|
"rejected_qty": 0,
|
||||||
"received_qty": 0,
|
"received_qty": 0,
|
||||||
"serial_no": [],
|
"serial_no": [],
|
||||||
@@ -138,6 +144,7 @@ def get_ref_item_dict(valid_items, ref_item_row):
|
|||||||
}))
|
}))
|
||||||
item_dict = valid_items[ref_item_row.item_code]
|
item_dict = valid_items[ref_item_row.item_code]
|
||||||
item_dict["qty"] += ref_item_row.qty
|
item_dict["qty"] += ref_item_row.qty
|
||||||
|
item_dict["rate"] = ref_item_row.get("rate", 0)
|
||||||
|
|
||||||
if ref_item_row.parenttype in ['Purchase Invoice', 'Purchase Receipt']:
|
if ref_item_row.parenttype in ['Purchase Invoice', 'Purchase Receipt']:
|
||||||
item_dict["received_qty"] += ref_item_row.received_qty
|
item_dict["received_qty"] += ref_item_row.received_qty
|
||||||
|
|||||||
@@ -19,10 +19,10 @@ status_map = {
|
|||||||
["Converted", "has_customer"],
|
["Converted", "has_customer"],
|
||||||
],
|
],
|
||||||
"Opportunity": [
|
"Opportunity": [
|
||||||
["Quotation", "has_quotation"],
|
|
||||||
["Converted", "has_ordered_quotation"],
|
|
||||||
["Lost", "eval:self.status=='Lost'"],
|
["Lost", "eval:self.status=='Lost'"],
|
||||||
["Lost", "has_lost_quotation"],
|
["Lost", "has_lost_quotation"],
|
||||||
|
["Quotation", "has_active_quotation"],
|
||||||
|
["Converted", "has_ordered_quotation"],
|
||||||
["Closed", "eval:self.status=='Closed'"]
|
["Closed", "eval:self.status=='Closed'"]
|
||||||
],
|
],
|
||||||
"Quotation": [
|
"Quotation": [
|
||||||
@@ -46,8 +46,8 @@ status_map = {
|
|||||||
["Draft", None],
|
["Draft", None],
|
||||||
["Submitted", "eval:self.docstatus==1"],
|
["Submitted", "eval:self.docstatus==1"],
|
||||||
["Return", "eval:self.is_return==1 and self.docstatus==1"],
|
["Return", "eval:self.is_return==1 and self.docstatus==1"],
|
||||||
["Credit Note Issued", "eval:self.outstanding_amount < 0 and self.docstatus==1"],
|
["Paid", "eval:self.outstanding_amount<=0 and self.docstatus==1 and self.is_return==0"],
|
||||||
["Paid", "eval:self.outstanding_amount==0 and self.docstatus==1 and self.is_return==0"],
|
["Credit Note Issued", "eval:self.outstanding_amount < 0 and self.docstatus==1 and self.is_return==0 and get_value('Sales Invoice', {'is_return': 1, 'return_against': self.name, 'docstatus': 1})"],
|
||||||
["Unpaid", "eval:self.outstanding_amount > 0 and getdate(self.due_date) >= getdate(nowdate()) and self.docstatus==1"],
|
["Unpaid", "eval:self.outstanding_amount > 0 and getdate(self.due_date) >= getdate(nowdate()) and self.docstatus==1"],
|
||||||
["Overdue", "eval:self.outstanding_amount > 0 and getdate(self.due_date) < getdate(nowdate()) and self.docstatus==1"],
|
["Overdue", "eval:self.outstanding_amount > 0 and getdate(self.due_date) < getdate(nowdate()) and self.docstatus==1"],
|
||||||
["Cancelled", "eval:self.docstatus==2"],
|
["Cancelled", "eval:self.docstatus==2"],
|
||||||
@@ -56,8 +56,8 @@ status_map = {
|
|||||||
["Draft", None],
|
["Draft", None],
|
||||||
["Submitted", "eval:self.docstatus==1"],
|
["Submitted", "eval:self.docstatus==1"],
|
||||||
["Return", "eval:self.is_return==1 and self.docstatus==1"],
|
["Return", "eval:self.is_return==1 and self.docstatus==1"],
|
||||||
["Debit Note Issued", "eval:self.outstanding_amount < 0 and self.docstatus==1"],
|
["Paid", "eval:self.outstanding_amount<=0 and self.docstatus==1 and self.is_return==0"],
|
||||||
["Paid", "eval:self.outstanding_amount==0 and self.docstatus==1 and self.is_return==0"],
|
["Debit Note Issued", "eval:self.outstanding_amount < 0 and self.docstatus==1 and self.is_return==0 and get_value('Purchase Invoice', {'is_return': 1, 'return_against': self.name, 'docstatus': 1})"],
|
||||||
["Unpaid", "eval:self.outstanding_amount > 0 and getdate(self.due_date) >= getdate(nowdate()) and self.docstatus==1"],
|
["Unpaid", "eval:self.outstanding_amount > 0 and getdate(self.due_date) >= getdate(nowdate()) and self.docstatus==1"],
|
||||||
["Overdue", "eval:self.outstanding_amount > 0 and getdate(self.due_date) < getdate(nowdate()) and self.docstatus==1"],
|
["Overdue", "eval:self.outstanding_amount > 0 and getdate(self.due_date) < getdate(nowdate()) and self.docstatus==1"],
|
||||||
["Cancelled", "eval:self.docstatus==2"],
|
["Cancelled", "eval:self.docstatus==2"],
|
||||||
@@ -119,7 +119,8 @@ class StatusUpdater(Document):
|
|||||||
self.status = s[0]
|
self.status = s[0]
|
||||||
break
|
break
|
||||||
elif s[1].startswith("eval:"):
|
elif s[1].startswith("eval:"):
|
||||||
if frappe.safe_eval(s[1][5:], None, { "self": self.as_dict(), "getdate": getdate, "nowdate": nowdate }):
|
if frappe.safe_eval(s[1][5:], None, { "self": self.as_dict(), "getdate": getdate,
|
||||||
|
"nowdate": nowdate, "get_value": frappe.db.get_value }):
|
||||||
self.status = s[0]
|
self.status = s[0]
|
||||||
break
|
break
|
||||||
elif getattr(self, s[1])():
|
elif getattr(self, s[1])():
|
||||||
|
|||||||
@@ -59,10 +59,10 @@ class calculate_taxes_and_totals(object):
|
|||||||
(1.0 - (item.discount_percentage / 100.0)), item.precision("rate"))
|
(1.0 - (item.discount_percentage / 100.0)), item.precision("rate"))
|
||||||
|
|
||||||
if item.doctype in ['Quotation Item', 'Sales Order Item', 'Delivery Note Item', 'Sales Invoice Item']:
|
if item.doctype in ['Quotation Item', 'Sales Order Item', 'Delivery Note Item', 'Sales Invoice Item']:
|
||||||
item.total_margin = self.calculate_margin(item)
|
item.rate_with_margin = self.calculate_margin(item)
|
||||||
|
|
||||||
item.rate = flt(item.total_margin * (1.0 - (item.discount_percentage / 100.0)), item.precision("rate"))\
|
item.rate = flt(item.rate_with_margin * (1.0 - (item.discount_percentage / 100.0)), item.precision("rate"))\
|
||||||
if item.total_margin > 0 else item.rate
|
if item.rate_with_margin > 0 else item.rate
|
||||||
|
|
||||||
item.net_rate = item.rate
|
item.net_rate = item.rate
|
||||||
item.amount = flt(item.rate * item.qty, item.precision("amount"))
|
item.amount = flt(item.rate * item.qty, item.precision("amount"))
|
||||||
@@ -442,15 +442,15 @@ class calculate_taxes_and_totals(object):
|
|||||||
|
|
||||||
if self.doc.doctype == "Sales Invoice":
|
if self.doc.doctype == "Sales Invoice":
|
||||||
self.doc.round_floats_in(self.doc, ["paid_amount"])
|
self.doc.round_floats_in(self.doc, ["paid_amount"])
|
||||||
|
self.calculate_write_off_amount()
|
||||||
|
self.calculate_change_amount()
|
||||||
|
|
||||||
paid_amount = self.doc.paid_amount \
|
paid_amount = self.doc.paid_amount \
|
||||||
if self.doc.party_account_currency == self.doc.currency else self.doc.base_paid_amount
|
if self.doc.party_account_currency == self.doc.currency else self.doc.base_paid_amount
|
||||||
|
|
||||||
change_amount = self.doc.change_amount \
|
change_amount = self.doc.change_amount \
|
||||||
if self.doc.party_account_currency == self.doc.currency else self.doc.base_change_amount
|
if self.doc.party_account_currency == self.doc.currency else self.doc.base_change_amount
|
||||||
|
|
||||||
self.calculate_write_off_amount()
|
|
||||||
self.calculate_change_amount()
|
|
||||||
|
|
||||||
self.doc.outstanding_amount = flt(total_amount_to_pay - flt(paid_amount) +
|
self.doc.outstanding_amount = flt(total_amount_to_pay - flt(paid_amount) +
|
||||||
flt(change_amount), self.doc.precision("outstanding_amount"))
|
flt(change_amount), self.doc.precision("outstanding_amount"))
|
||||||
|
|
||||||
@@ -462,9 +462,12 @@ class calculate_taxes_and_totals(object):
|
|||||||
|
|
||||||
if self.doc.is_pos:
|
if self.doc.is_pos:
|
||||||
for payment in self.doc.get('payments'):
|
for payment in self.doc.get('payments'):
|
||||||
payment.base_amount = flt(payment.amount * self.doc.conversion_rate)
|
payment.amount = flt(payment.amount)
|
||||||
|
payment.base_amount = payment.amount * flt(self.doc.conversion_rate)
|
||||||
paid_amount += payment.amount
|
paid_amount += payment.amount
|
||||||
base_paid_amount += payment.base_amount
|
base_paid_amount += payment.base_amount
|
||||||
|
elif not self.doc.is_return:
|
||||||
|
self.doc.set('payments', [])
|
||||||
|
|
||||||
self.doc.paid_amount = flt(paid_amount, self.doc.precision("paid_amount"))
|
self.doc.paid_amount = flt(paid_amount, self.doc.precision("paid_amount"))
|
||||||
self.doc.base_paid_amount = flt(base_paid_amount, self.doc.precision("base_paid_amount"))
|
self.doc.base_paid_amount = flt(base_paid_amount, self.doc.precision("base_paid_amount"))
|
||||||
@@ -472,7 +475,9 @@ class calculate_taxes_and_totals(object):
|
|||||||
def calculate_change_amount(self):
|
def calculate_change_amount(self):
|
||||||
self.doc.change_amount = 0.0
|
self.doc.change_amount = 0.0
|
||||||
self.doc.base_change_amount = 0.0
|
self.doc.base_change_amount = 0.0
|
||||||
if self.doc.paid_amount > self.doc.grand_total:
|
if self.doc.paid_amount > self.doc.grand_total and not self.doc.is_return \
|
||||||
|
and any([d.type == "Cash" for d in self.doc.payments]):
|
||||||
|
|
||||||
self.doc.change_amount = flt(self.doc.paid_amount - self.doc.grand_total +
|
self.doc.change_amount = flt(self.doc.paid_amount - self.doc.grand_total +
|
||||||
self.doc.write_off_amount, self.doc.precision("change_amount"))
|
self.doc.write_off_amount, self.doc.precision("change_amount"))
|
||||||
|
|
||||||
@@ -487,7 +492,7 @@ class calculate_taxes_and_totals(object):
|
|||||||
self.doc.precision("base_write_off_amount"))
|
self.doc.precision("base_write_off_amount"))
|
||||||
|
|
||||||
def calculate_margin(self, item):
|
def calculate_margin(self, item):
|
||||||
total_margin = 0.0
|
rate_with_margin = 0.0
|
||||||
if item.price_list_rate:
|
if item.price_list_rate:
|
||||||
if item.pricing_rule and not self.doc.ignore_pricing_rule:
|
if item.pricing_rule and not self.doc.ignore_pricing_rule:
|
||||||
pricing_rule = frappe.get_doc('Pricing Rule', item.pricing_rule)
|
pricing_rule = frappe.get_doc('Pricing Rule', item.pricing_rule)
|
||||||
@@ -496,6 +501,6 @@ class calculate_taxes_and_totals(object):
|
|||||||
|
|
||||||
if item.margin_type and item.margin_rate_or_amount:
|
if item.margin_type and item.margin_rate_or_amount:
|
||||||
margin_value = item.margin_rate_or_amount if item.margin_type == 'Amount' else flt(item.price_list_rate) * flt(item.margin_rate_or_amount) / 100
|
margin_value = item.margin_rate_or_amount if item.margin_type == 'Amount' else flt(item.price_list_rate) * flt(item.margin_rate_or_amount) / 100
|
||||||
total_margin = flt(item.price_list_rate) + flt(margin_value)
|
rate_with_margin = flt(item.price_list_rate) + flt(margin_value)
|
||||||
|
|
||||||
return total_margin
|
return rate_with_margin
|
||||||
|
|||||||
73
erpnext/controllers/tests/test_mapper.py
Normal file
73
erpnext/controllers/tests/test_mapper.py
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
from __future__ import unicode_literals
|
||||||
|
import unittest
|
||||||
|
import frappe
|
||||||
|
|
||||||
|
import random, json
|
||||||
|
import frappe.utils
|
||||||
|
from frappe.utils import nowdate
|
||||||
|
from frappe.model import mapper
|
||||||
|
from frappe.test_runner import make_test_records
|
||||||
|
|
||||||
|
class TestMapper(unittest.TestCase):
|
||||||
|
def test_map_docs(self):
|
||||||
|
'''Test mapping of multiple source docs on a single target doc'''
|
||||||
|
|
||||||
|
make_test_records("Item")
|
||||||
|
items = frappe.get_all("Item", fields = ["name", "item_code"], filters = {'is_sales_item': 1, 'has_variants': 0})
|
||||||
|
customers = frappe.get_all("Customer")
|
||||||
|
if items and customers:
|
||||||
|
# Make source docs (quotations) and a target doc (sales order)
|
||||||
|
customer = random.choice(customers).name
|
||||||
|
qtn1, item_list_1 = self.make_quotation(items, customer)
|
||||||
|
qtn2, item_list_2 = self.make_quotation(items, customer)
|
||||||
|
so, item_list_3 = self.make_sales_order()
|
||||||
|
|
||||||
|
# Map source docs to target with corresponding mapper method
|
||||||
|
method = "erpnext.selling.doctype.quotation.quotation.make_sales_order"
|
||||||
|
updated_so = mapper.map_docs(method, json.dumps([qtn1.name, qtn2.name]), so)
|
||||||
|
|
||||||
|
# Assert that all inserted items are present in updated sales order
|
||||||
|
src_items = item_list_1 + item_list_2 + item_list_3
|
||||||
|
self.assertEqual(set([d.item_code for d in src_items]),
|
||||||
|
set([d.item_code for d in updated_so.items]))
|
||||||
|
|
||||||
|
def get_random_items(self, items, limit):
|
||||||
|
'''Get a number of random items from a list of given items'''
|
||||||
|
random_items = []
|
||||||
|
for i in range(0, limit):
|
||||||
|
random_items.append(random.choice(items))
|
||||||
|
return random_items
|
||||||
|
|
||||||
|
def make_quotation(self, items, customer):
|
||||||
|
item_list = self.get_random_items(items, 3)
|
||||||
|
qtn = frappe.get_doc({
|
||||||
|
"doctype": "Quotation",
|
||||||
|
"quotation_to": "Customer",
|
||||||
|
"customer": customer,
|
||||||
|
"order_type": "Sales"
|
||||||
|
})
|
||||||
|
for item in item_list:
|
||||||
|
qtn.append("items", {"qty": "2", "item_code": item.item_code})
|
||||||
|
|
||||||
|
qtn.submit()
|
||||||
|
return qtn, item_list
|
||||||
|
|
||||||
|
def make_sales_order(self):
|
||||||
|
item = frappe.get_doc({
|
||||||
|
"base_amount": 1000.0,
|
||||||
|
"base_rate": 100.0,
|
||||||
|
"description": "CPU",
|
||||||
|
"doctype": "Sales Order Item",
|
||||||
|
"item_code": "_Test Item Home Desktop 100",
|
||||||
|
"item_name": "CPU",
|
||||||
|
"parentfield": "items",
|
||||||
|
"qty": 10.0,
|
||||||
|
"rate": 100.0,
|
||||||
|
"warehouse": "_Test Warehouse - _TC",
|
||||||
|
"stock_uom": "_Test UOM",
|
||||||
|
"conversion_factor": 1.0,
|
||||||
|
"uom": "_Test UOM"
|
||||||
|
})
|
||||||
|
so = frappe.get_doc(frappe.get_test_records('Sales Order')[0])
|
||||||
|
so.insert(ignore_permissions=True)
|
||||||
|
return so, [item]
|
||||||
@@ -43,6 +43,7 @@ class Lead(SellingController):
|
|||||||
if self.email_id == self.contact_by:
|
if self.email_id == self.contact_by:
|
||||||
frappe.throw(_("Next Contact By cannot be same as the Lead Email Address"))
|
frappe.throw(_("Next Contact By cannot be same as the Lead Email Address"))
|
||||||
|
|
||||||
|
if self.is_new() or not self.image:
|
||||||
self.image = has_gravatar(self.email_id)
|
self.image = has_gravatar(self.email_id)
|
||||||
|
|
||||||
if self.contact_date and self.contact_date < now():
|
if self.contact_date and self.contact_date < now():
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ frappe.ui.form.on("Opportunity", {
|
|||||||
var doc = frm.doc;
|
var doc = frm.doc;
|
||||||
frm.events.enquiry_from(frm);
|
frm.events.enquiry_from(frm);
|
||||||
frm.trigger('set_contact_link');
|
frm.trigger('set_contact_link');
|
||||||
|
erpnext.toggle_naming_series();
|
||||||
|
|
||||||
if(!doc.__islocal && doc.status!=="Lost") {
|
if(!doc.__islocal && doc.status!=="Lost") {
|
||||||
if(doc.with_items){
|
if(doc.with_items){
|
||||||
@@ -53,6 +54,20 @@ frappe.ui.form.on("Opportunity", {
|
|||||||
frm.add_custom_button(__('Lost'),
|
frm.add_custom_button(__('Lost'),
|
||||||
cur_frm.cscript['Declare Opportunity Lost']);
|
cur_frm.cscript['Declare Opportunity Lost']);
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
if(!frm.doc.__islocal && frm.perm[0].write && frm.doc.docstatus==0) {
|
||||||
|
if(frm.doc.status==="Open") {
|
||||||
|
frm.add_custom_button(__("Close"), function() {
|
||||||
|
frm.set_value("status", "Closed");
|
||||||
|
frm.save();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
frm.add_custom_button(__("Reopen"), function() {
|
||||||
|
frm.set_value("status", "Open");
|
||||||
|
frm.save();
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -122,25 +137,6 @@ erpnext.crm.Opportunity = frappe.ui.form.Controller.extend({
|
|||||||
|
|
||||||
$.extend(cur_frm.cscript, new erpnext.crm.Opportunity({frm: cur_frm}));
|
$.extend(cur_frm.cscript, new erpnext.crm.Opportunity({frm: cur_frm}));
|
||||||
|
|
||||||
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
|
||||||
erpnext.toggle_naming_series();
|
|
||||||
|
|
||||||
var frm = cur_frm;
|
|
||||||
if(!doc.__islocal && frm.perm[0].write && doc.docstatus==0) {
|
|
||||||
if(frm.doc.status==="Open") {
|
|
||||||
frm.add_custom_button(__("Close"), function() {
|
|
||||||
frm.set_value("status", "Closed");
|
|
||||||
frm.save();
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
frm.add_custom_button(__("Reopen"), function() {
|
|
||||||
frm.set_value("status", "Open");
|
|
||||||
frm.save();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
cur_frm.cscript.onload_post_render = function(doc, cdt, cdn) {
|
cur_frm.cscript.onload_post_render = function(doc, cdt, cdn) {
|
||||||
if(doc.enquiry_from == 'Lead' && doc.lead)
|
if(doc.enquiry_from == 'Lead' && doc.lead)
|
||||||
cur_frm.cscript.lead(doc, cdt, cdn);
|
cur_frm.cscript.lead(doc, cdt, cdn);
|
||||||
|
|||||||
@@ -31,7 +31,6 @@ class Opportunity(TransactionBase):
|
|||||||
if not self.enquiry_from:
|
if not self.enquiry_from:
|
||||||
frappe.throw(_("Opportunity From field is mandatory"))
|
frappe.throw(_("Opportunity From field is mandatory"))
|
||||||
|
|
||||||
self.set_status()
|
|
||||||
self.validate_item_details()
|
self.validate_item_details()
|
||||||
self.validate_uom_is_integer("uom", "qty")
|
self.validate_uom_is_integer("uom", "qty")
|
||||||
self.validate_lead_cust()
|
self.validate_lead_cust()
|
||||||
@@ -75,7 +74,7 @@ class Opportunity(TransactionBase):
|
|||||||
self.lead = lead_name
|
self.lead = lead_name
|
||||||
|
|
||||||
def declare_enquiry_lost(self,arg):
|
def declare_enquiry_lost(self,arg):
|
||||||
if not self.has_quotation():
|
if not self.has_active_quotation():
|
||||||
frappe.db.set(self, 'status', 'Lost')
|
frappe.db.set(self, 'status', 'Lost')
|
||||||
frappe.db.set(self, 'order_lost_reason', arg)
|
frappe.db.set(self, 'order_lost_reason', arg)
|
||||||
else:
|
else:
|
||||||
@@ -84,20 +83,31 @@ class Opportunity(TransactionBase):
|
|||||||
def on_trash(self):
|
def on_trash(self):
|
||||||
self.delete_events()
|
self.delete_events()
|
||||||
|
|
||||||
def has_quotation(self):
|
def has_active_quotation(self):
|
||||||
return frappe.db.get_value("Quotation Item", {"prevdoc_docname": self.name, "docstatus": 1})
|
return frappe.db.sql("""
|
||||||
|
select q.name
|
||||||
|
from `tabQuotation` q, `tabQuotation Item` qi
|
||||||
|
where q.name = qi.parent and q.docstatus=1 and qi.prevdoc_docname =%s
|
||||||
|
and q.status not in ('Lost', 'Closed')""", self.name)
|
||||||
|
|
||||||
def has_ordered_quotation(self):
|
def has_ordered_quotation(self):
|
||||||
return frappe.db.sql("""select q.name from `tabQuotation` q, `tabQuotation Item` qi
|
return frappe.db.sql("""
|
||||||
where q.name = qi.parent and q.docstatus=1 and qi.prevdoc_docname =%s and q.status = 'Ordered'""", self.name)
|
select q.name
|
||||||
|
from `tabQuotation` q, `tabQuotation Item` qi
|
||||||
|
where q.name = qi.parent and q.docstatus=1 and qi.prevdoc_docname =%s
|
||||||
|
and q.status = 'Ordered'""", self.name)
|
||||||
|
|
||||||
def has_lost_quotation(self):
|
def has_lost_quotation(self):
|
||||||
return frappe.db.sql("""
|
lost_quotation = frappe.db.sql("""
|
||||||
select q.name
|
select q.name
|
||||||
from `tabQuotation` q, `tabQuotation Item` qi
|
from `tabQuotation` q, `tabQuotation Item` qi
|
||||||
where q.name = qi.parent and q.docstatus=1
|
where q.name = qi.parent and q.docstatus=1
|
||||||
and qi.prevdoc_docname =%s and q.status = 'Lost'
|
and qi.prevdoc_docname =%s and q.status = 'Lost'
|
||||||
""", self.name)
|
""", self.name)
|
||||||
|
if lost_quotation:
|
||||||
|
if self.has_active_quotation():
|
||||||
|
return False
|
||||||
|
return True
|
||||||
|
|
||||||
def validate_cust_name(self):
|
def validate_cust_name(self):
|
||||||
if self.customer:
|
if self.customer:
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 191 KiB |
BIN
erpnext/docs/assets/img/setup/integrations/stripe_coa.png
Normal file
BIN
erpnext/docs/assets/img/setup/integrations/stripe_coa.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 161 KiB |
BIN
erpnext/docs/assets/img/setup/integrations/stripe_setting.png
Normal file
BIN
erpnext/docs/assets/img/setup/integrations/stripe_setting.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 164 KiB |
@@ -64,7 +64,7 @@ On submission of the invoice, the "Fixed Asset Account" will be debited and paya
|
|||||||
|
|
||||||
## Sell an Asset
|
## Sell an Asset
|
||||||
|
|
||||||
To sale an asset, open the asset record and create a Sales Invoice by clicking on "Sale Asset". On submission of the Sales Invoice, following entries will take place:
|
To sell an asset, open the asset record and create a Sales Invoice by clicking on "Sell Asset". On submission of the Sales Invoice, following entries will take place:
|
||||||
|
|
||||||
- "Receivable Account" (Debtors) will be debited by the sales amount.
|
- "Receivable Account" (Debtors) will be debited by the sales amount.
|
||||||
- "Fixed Asset Account" will be credited by the purchase amount of asset.
|
- "Fixed Asset Account" will be credited by the purchase amount of asset.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
People who assist you in getting business are termed as Sales Partners. Sales Partners can be represented by different names in ERPNext. You can call them Channel Partner, Distributor, Dealer, Agent, Retailer, Implementation Partner, Reseller etc.
|
People who assist you in getting business are termed as Sales Partners. Sales Partners can be represented by different names in ERPNext. You can call them Channel Partner, Distributor, Dealer, Agent, Retailer, Implementation Partner, Reseller etc.
|
||||||
|
|
||||||
For each Sales Partner, you can define commission offer to them. When Sales Partner is selected in transactions, there commission is calculated over Net Total of Sales Order/Invoice or Delivery Note.
|
For each Sales Partner, you can define commission offer to them. When Sales Partner is selected in transactions, their commission is calculated over Net Total of Sales Order/Invoice or Delivery Note.
|
||||||
|
|
||||||
You can track Sales Personwise commission in the report under Selling module.
|
You can track Sales Personwise commission in the report under Selling module.
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ You can manage multiple incoming and outgoing Email Accounts in ERPNext. There h
|
|||||||
|
|
||||||
ERPNext will create templates for a bunch of email accounts by default. Not all of them are enabled. To enable them, you must set your account details.
|
ERPNext will create templates for a bunch of email accounts by default. Not all of them are enabled. To enable them, you must set your account details.
|
||||||
|
|
||||||
There are 2 types of email accounts, outgoing and incoming. Outgoing email accounts use an SMTP service to send emails and emails are retrived from your inbox using a POP service. Most email providers such as GMail, Outlook or Yahoo provide these services.
|
There are 2 types of email accounts, outgoing and incoming. Outgoing email accounts use an SMTP service to send emails and emails are retrived from your inbox using a IMAP or POP service. Most email providers such as GMail, Outlook or Yahoo provide these services.
|
||||||
|
|
||||||
<img class="screenshot" alt="Defining Criteria" src="{{docs_base_url}}/assets/img/setup/email/email-account-list.png">
|
<img class="screenshot" alt="Defining Criteria" src="{{docs_base_url}}/assets/img/setup/email/email-account-list.png">
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ To setup an incoming Email Account, check on **Enable Incoming** and set your PO
|
|||||||
|
|
||||||
### How ERPNext handles replies
|
### How ERPNext handles replies
|
||||||
|
|
||||||
In ERPNext when you send an email to a contact like a customer, the sender will be the user who sent the email. In the **Reply-To** property, the Email Address will be of the default incoming account (like `replies@yourcompany.com`). ERPNext will automatically extract these emails from the incoming account and tag it to the relvant communication
|
In ERPNext when you send an email to a contact like a customer, the sender will be the user who sent the email. In the **Reply-To** property, the Email Address will be of the default incoming account (like `replies@yourcompany.com`). ERPNext will automatically extract these emails from the incoming account and tag it to the relevant communication
|
||||||
|
|
||||||
### Notification for unreplied messages
|
### Notification for unreplied messages
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
#Setting up Stripe
|
||||||
|
|
||||||
|
To setup Stripe,
|
||||||
|
`Explore > Integrations > Stripe Settings`
|
||||||
|
|
||||||
|
#### Setup Stripe
|
||||||
|
|
||||||
|
To enable Stripe payment service, you need to configure parameters like Publishable Key, Secret Key
|
||||||
|
<img class="screenshot" alt="Razorpay Settings" src="{{docs_base_url}}/assets/img/setup/integrations/stripe_setting.png">
|
||||||
|
|
||||||
|
On enabling service, the system will create Payment Gateway record and Account head in chart of account with account type as Bank.
|
||||||
|
|
||||||
|
<img class="screenshot" alt="Stripe COA" src="{{docs_base_url}}/assets/img/setup/integrations/stripe_coa.png">
|
||||||
|
|
||||||
|
Also it will create Payment Gateway Account entry. Payment Gateway Account is configuration hub from this you can set account head from existing COA, default Payment Request email body template.
|
||||||
|
|
||||||
|
<img class="screenshot" alt="Payment Gateway Account" src="{{docs_base_url}}/assets/img/setup/integrations/payment_gateway_account_stripe.png">
|
||||||
|
|
||||||
|
After configuring Payment Gateway Account your system is able to accept online payments.
|
||||||
|
|
||||||
|
####Supporting transaction currencies
|
||||||
|
"AED", "ALL", "ANG", "ARS", "AUD", "AWG", "BBD", "BDT", "BIF", "BMD", "BND",
|
||||||
|
"BOB", "BRL", "BSD", "BWP", "BZD", "CAD", "CHF", "CLP", "CNY", "COP", "CRC", "CVE", "CZK", "DJF",
|
||||||
|
"DKK", "DOP", "DZD", "EGP", "ETB", "EUR", "FJD", "FKP", "GBP", "GIP", "GMD", "GNF", "GTQ", "GYD",
|
||||||
|
"HKD", "HNL", "HRK", "HTG", "HUF", "IDR", "ILS", "INR", "ISK", "JMD", "JPY", "KES", "KHR", "KMF",
|
||||||
|
"KRW", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "MAD", "MDL", "MNT", "MOP", "MRO", "MUR", "MVR",
|
||||||
|
"MWK", "MXN", "MYR", "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", "PAB", "PEN", "PGK", "PHP", "PKR",
|
||||||
|
"PLN", "PYG", "QAR", "RUB", "SAR", "SBD", "SCR", "SEK", "SGD", "SHP", "SLL", "SOS", "STD", "SVC",
|
||||||
|
"SZL", "THB", "TOP", "TTD", "TWD", "TZS", "UAH", "UGX", "USD", "UYU", "UZS", "VND", "VUV", "WST",
|
||||||
|
"XAF", "XOF", "XPF", "YER", "ZAR"
|
||||||
@@ -178,7 +178,8 @@ scheduler_events = {
|
|||||||
"erpnext.hr.doctype.employee.employee.send_birthday_reminders",
|
"erpnext.hr.doctype.employee.employee.send_birthday_reminders",
|
||||||
"erpnext.projects.doctype.task.task.set_tasks_as_overdue",
|
"erpnext.projects.doctype.task.task.set_tasks_as_overdue",
|
||||||
"erpnext.accounts.doctype.asset.depreciation.post_depreciation_entries",
|
"erpnext.accounts.doctype.asset.depreciation.post_depreciation_entries",
|
||||||
'erpnext.hr.doctype.daily_work_summary_settings.daily_work_summary_settings.send_summary'
|
"erpnext.hr.doctype.daily_work_summary_settings.daily_work_summary_settings.send_summary",
|
||||||
|
"erpnext.stock.doctype.serial_no.serial_no.update_maintenance_status"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ from erpnext.accounts.party import get_party_account
|
|||||||
from erpnext.accounts.general_ledger import make_gl_entries
|
from erpnext.accounts.general_ledger import make_gl_entries
|
||||||
from erpnext.accounts.doctype.sales_invoice.sales_invoice import get_bank_cash_account
|
from erpnext.accounts.doctype.sales_invoice.sales_invoice import get_bank_cash_account
|
||||||
from erpnext.controllers.accounts_controller import AccountsController
|
from erpnext.controllers.accounts_controller import AccountsController
|
||||||
|
from frappe.utils.csvutils import getlink
|
||||||
|
|
||||||
class InvalidExpenseApproverError(frappe.ValidationError): pass
|
class InvalidExpenseApproverError(frappe.ValidationError): pass
|
||||||
|
|
||||||
@@ -146,7 +147,7 @@ class ExpenseClaim(AccountsController):
|
|||||||
frappe.throw(_("Cost center is required to book an expense claim"))
|
frappe.throw(_("Cost center is required to book an expense claim"))
|
||||||
|
|
||||||
if not self.payable_account:
|
if not self.payable_account:
|
||||||
frappe.throw(_("Please set default payable account in the employee {0}").format(self.employee))
|
frappe.throw(_("Please set default payable account for the company {0}").format(getlink("Company",self.company)))
|
||||||
|
|
||||||
if self.is_paid:
|
if self.is_paid:
|
||||||
if not self.mode_of_payment:
|
if not self.mode_of_payment:
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ class JobApplicant(Document):
|
|||||||
|
|
||||||
def validate(self):
|
def validate(self):
|
||||||
self.check_email_id_is_unique()
|
self.check_email_id_is_unique()
|
||||||
|
if self.email_id:
|
||||||
validate_email_add(self.email_id, True)
|
validate_email_add(self.email_id, True)
|
||||||
|
|
||||||
if not self.applicant_name and self.email_id:
|
if not self.applicant_name and self.email_id:
|
||||||
|
|||||||
@@ -5,8 +5,10 @@ frappe.provide("erpnext.offer_letter");
|
|||||||
|
|
||||||
frappe.ui.form.on("Offer Letter", {
|
frappe.ui.form.on("Offer Letter", {
|
||||||
select_terms: function(frm) {
|
select_terms: function(frm) {
|
||||||
frappe.model.get_value("Terms and Conditions", frm.doc.select_terms, "terms", function(value) {
|
erpnext.utils.get_terms(frm.doc.select_terms, frm.doc, function(r) {
|
||||||
frm.set_value("terms", value.terms);
|
if(!r.exc) {
|
||||||
|
me.frm.set_value("terms", r.message);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ class ProcessPayroll(Document):
|
|||||||
|
|
||||||
|
|
||||||
def create_log(self, ss_list):
|
def create_log(self, ss_list):
|
||||||
if not ss_list:
|
if not ss_list or len(ss_list) < 1:
|
||||||
log = "<p>" + _("No employee for the above selected criteria OR salary slip already created") + "</p>"
|
log = "<p>" + _("No employee for the above selected criteria OR salary slip already created") + "</p>"
|
||||||
else:
|
else:
|
||||||
log = frappe.render_template("templates/includes/salary_slip_log.html",
|
log = frappe.render_template("templates/includes/salary_slip_log.html",
|
||||||
|
|||||||
@@ -99,7 +99,8 @@ class SalarySlip(TransactionBase):
|
|||||||
'''Returns data for evaluating formula'''
|
'''Returns data for evaluating formula'''
|
||||||
data = frappe._dict()
|
data = frappe._dict()
|
||||||
|
|
||||||
data.update(frappe.get_doc("Salary Structure Employee", {"employee": self.employee}).as_dict())
|
data.update(frappe.get_doc("Salary Structure Employee",
|
||||||
|
{"employee": self.employee, "parent": self.salary_structure}).as_dict())
|
||||||
|
|
||||||
data.update(frappe.get_doc("Employee", self.employee).as_dict())
|
data.update(frappe.get_doc("Employee", self.employee).as_dict())
|
||||||
data.update(self.as_dict())
|
data.update(self.as_dict())
|
||||||
@@ -326,10 +327,10 @@ class SalarySlip(TransactionBase):
|
|||||||
relieving_date = getdate(self.end_date)
|
relieving_date = getdate(self.end_date)
|
||||||
|
|
||||||
if not joining_date:
|
if not joining_date:
|
||||||
frappe.throw(_("Please set the Date Of Joining for employee {0}").format(frappe.bold(employee.employee)))
|
frappe.throw(_("Please set the Date Of Joining for employee {0}").format(frappe.bold(self.employee_name)))
|
||||||
|
|
||||||
for d in self.get(component_type):
|
for d in self.get(component_type):
|
||||||
if ((cint(d.depends_on_lwp) == 1 and not self.salary_slip_based_on_timesheet) or\
|
if self.salary_structure and ((cint(d.depends_on_lwp) == 1 and not self.salary_slip_based_on_timesheet) or\
|
||||||
getdate(self.start_date) < joining_date or getdate(self.end_date) > relieving_date):
|
getdate(self.start_date) < joining_date or getdate(self.end_date) > relieving_date):
|
||||||
|
|
||||||
d.amount = rounded((flt(d.default_amount) * flt(self.payment_days)
|
d.amount = rounded((flt(d.default_amount) * flt(self.payment_days)
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"allow_copy": 0,
|
"allow_copy": 0,
|
||||||
|
"allow_guest_to_view": 0,
|
||||||
"allow_import": 1,
|
"allow_import": 1,
|
||||||
"allow_rename": 1,
|
"allow_rename": 1,
|
||||||
"autoname": "field:event_name",
|
"autoname": "field:event_name",
|
||||||
@@ -12,6 +13,7 @@
|
|||||||
"editable_grid": 1,
|
"editable_grid": 1,
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -27,7 +29,7 @@
|
|||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Event Name",
|
"label": "Event Name",
|
||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 1,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@@ -41,6 +43,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 1,
|
"allow_on_submit": 1,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -71,6 +74,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -99,6 +103,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -129,6 +134,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -157,6 +163,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -186,6 +193,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -216,6 +224,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -244,6 +253,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -274,6 +284,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -303,6 +314,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -331,6 +343,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -361,6 +374,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -390,6 +404,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -418,6 +433,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -447,6 +463,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -476,6 +493,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -504,6 +522,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -533,6 +552,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -562,6 +582,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -592,6 +613,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 1,
|
"allow_on_submit": 1,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -622,6 +644,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -651,17 +674,17 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"has_web_view": 0,
|
||||||
"hide_heading": 0,
|
"hide_heading": 0,
|
||||||
"hide_toolbar": 0,
|
"hide_toolbar": 0,
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
"image_view": 0,
|
"image_view": 0,
|
||||||
"in_create": 0,
|
"in_create": 0,
|
||||||
"in_dialog": 0,
|
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2017-02-17 16:51:35.141403",
|
"modified": "2017-05-29 06:13:38.411039",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "HR",
|
"module": "HR",
|
||||||
"name": "Training Event",
|
"name": "Training Event",
|
||||||
|
|||||||
@@ -13,7 +13,9 @@ class TrainingResult(Document):
|
|||||||
|
|
||||||
def send_result(self):
|
def send_result(self):
|
||||||
for emp in self.employees:
|
for emp in self.employees:
|
||||||
message = "Thank You for attending {0}. You grade is {1}".format(self.training_event, emp.grade)
|
message = "Thank You for attending {0}.".format(self.training_event)
|
||||||
|
if emp.grade:
|
||||||
|
message = message + "Your grade: {0}".format(emp.grade)
|
||||||
frappe.sendmail(frappe.db.get_value("Employee", emp.employee, "company_email"), \
|
frappe.sendmail(frappe.db.get_value("Employee", emp.employee, "company_email"), \
|
||||||
subject=_("{0} Results".format(self.training_event)), \
|
subject=_("{0} Results".format(self.training_event)), \
|
||||||
content=message)
|
content=message)
|
||||||
|
|||||||
@@ -16,7 +16,15 @@ frappe.ui.form.on("Vehicle Log", {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(frm.doc.docstatus == 1) {
|
||||||
|
frm.add_custom_button(__('Expense Claim'), function() {
|
||||||
|
frm.events.expense_claim(frm)
|
||||||
|
}, __("Make"));
|
||||||
|
frm.page.set_inner_btn_group_as_primary(__("Make"));
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
expense_claim: function(frm){
|
expense_claim: function(frm){
|
||||||
frappe.call({
|
frappe.call({
|
||||||
method: "erpnext.hr.doctype.vehicle_log.vehicle_log.make_expense_claim",
|
method: "erpnext.hr.doctype.vehicle_log.vehicle_log.make_expense_claim",
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"allow_copy": 0,
|
"allow_copy": 0,
|
||||||
|
"allow_guest_to_view": 0,
|
||||||
"allow_import": 0,
|
"allow_import": 0,
|
||||||
"allow_rename": 0,
|
"allow_rename": 0,
|
||||||
"autoname": "naming_series:",
|
"autoname": "naming_series:",
|
||||||
@@ -12,6 +13,7 @@
|
|||||||
"editable_grid": 1,
|
"editable_grid": 1,
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -41,6 +43,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -71,6 +74,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -101,6 +105,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -131,6 +136,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -159,6 +165,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -187,6 +194,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -216,6 +224,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -245,6 +254,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -274,6 +284,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -303,6 +314,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -332,6 +344,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 1,
|
"collapsible": 1,
|
||||||
@@ -361,6 +374,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -390,6 +404,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -419,6 +434,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -447,6 +463,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -477,6 +494,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -506,6 +524,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 1,
|
"collapsible": 1,
|
||||||
@@ -519,7 +538,7 @@
|
|||||||
"in_global_search": 0,
|
"in_global_search": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Service_Details",
|
"label": "Service Details",
|
||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
@@ -535,6 +554,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -565,64 +585,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "section_break_20",
|
|
||||||
"fieldtype": "Section Break",
|
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"allow_on_submit": 1,
|
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"depends_on": "eval:doc.docstatus==1",
|
|
||||||
"fieldname": "expense_claim",
|
|
||||||
"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": "Make Expense Claim",
|
|
||||||
"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,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -652,17 +615,17 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"has_web_view": 0,
|
||||||
"hide_heading": 0,
|
"hide_heading": 0,
|
||||||
"hide_toolbar": 0,
|
"hide_toolbar": 0,
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
"image_view": 0,
|
"image_view": 0,
|
||||||
"in_create": 0,
|
"in_create": 0,
|
||||||
"in_dialog": 0,
|
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2017-02-17 16:53:17.975663",
|
"modified": "2017-05-15 13:17:59.575317",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "HR",
|
"module": "HR",
|
||||||
"name": "Vehicle Log",
|
"name": "Vehicle Log",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{%= frappe.boot.letter_heads[filters.letter_head || frappe.defaults.get_default("letter_head")] %}
|
{%= frappe.boot.letter_heads[filters.letter_head || frappe.defaults.get_default("letter_head")] %}
|
||||||
</div>
|
</div>
|
||||||
<h2 class="text-center">{%= __(report.report_name) %}</h2>
|
<h2 class="text-center">{%= __(report.report_name) %}</h2>
|
||||||
<h5 class="text-center">From {%= filters.date_range[0] %} to {%= filters.date_range[1] %}</h5>
|
<h5 class="text-center">{{ __("From") }} {%= filters.date_range[0] %} {{ __("to") }} {%= filters.date_range[1] %}</h5>
|
||||||
<hr>
|
<hr>
|
||||||
<table class="table table-bordered">
|
<table class="table table-bordered">
|
||||||
<thead>
|
<thead>
|
||||||
@@ -34,4 +34,4 @@
|
|||||||
{% } %}
|
{% } %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<p class="text-right text-muted">Printed On {%= dateutil.str_to_user(dateutil.get_datetime_as_string()) %}</p>
|
<p class="text-right text-muted">{{ __("Printed On") }} {%= dateutil.str_to_user(dateutil.get_datetime_as_string()) %}</p>
|
||||||
|
|||||||
@@ -33,10 +33,12 @@ erpnext.maintenance.MaintenanceSchedule = frappe.ui.form.Controller.extend({
|
|||||||
erpnext.utils.map_current_doc({
|
erpnext.utils.map_current_doc({
|
||||||
method: "erpnext.selling.doctype.sales_order.sales_order.make_maintenance_schedule",
|
method: "erpnext.selling.doctype.sales_order.sales_order.make_maintenance_schedule",
|
||||||
source_doctype: "Sales Order",
|
source_doctype: "Sales Order",
|
||||||
|
target: me.frm,
|
||||||
|
setters: {
|
||||||
|
customer: me.frm.doc.customer || undefined
|
||||||
|
},
|
||||||
get_query_filters: {
|
get_query_filters: {
|
||||||
docstatus: 1,
|
docstatus: 1,
|
||||||
order_type: me.frm.doc.order_type,
|
|
||||||
customer: me.frm.doc.customer || undefined,
|
|
||||||
company: me.frm.doc.company
|
company: me.frm.doc.company
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ class MaintenanceSchedule(TransactionBase):
|
|||||||
`tabMaintenance Schedule Item` msi where msi.parent=ms.name and
|
`tabMaintenance Schedule Item` msi where msi.parent=ms.name and
|
||||||
msi.sales_order=%s and ms.docstatus=1""", d.sales_order)
|
msi.sales_order=%s and ms.docstatus=1""", d.sales_order)
|
||||||
if chk:
|
if chk:
|
||||||
throw(_("Maintenance Schedule {0} exists against {0}").format(chk[0][0], d.sales_order))
|
throw(_("Maintenance Schedule {0} exists against {1}").format(chk[0][0], d.sales_order))
|
||||||
|
|
||||||
def validate(self):
|
def validate(self):
|
||||||
self.validate_maintenance_detail()
|
self.validate_maintenance_detail()
|
||||||
|
|||||||
@@ -27,41 +27,53 @@ erpnext.maintenance.MaintenanceVisit = frappe.ui.form.Controller.extend({
|
|||||||
refresh: function() {
|
refresh: function() {
|
||||||
frappe.dynamic_link = {doc: this.frm.doc, fieldname: 'customer', doctype: 'Customer'}
|
frappe.dynamic_link = {doc: this.frm.doc, fieldname: 'customer', doctype: 'Customer'}
|
||||||
|
|
||||||
|
var me = this;
|
||||||
|
|
||||||
if (this.frm.doc.docstatus===0) {
|
if (this.frm.doc.docstatus===0) {
|
||||||
cur_frm.add_custom_button(__('Maintenance Schedule'),
|
this.frm.add_custom_button(__('Maintenance Schedule'),
|
||||||
function() {
|
function() {
|
||||||
erpnext.utils.map_current_doc({
|
erpnext.utils.map_current_doc({
|
||||||
method: "erpnext.maintenance.doctype.maintenance_schedule.maintenance_schedule.make_maintenance_visit",
|
method: "erpnext.maintenance.doctype.maintenance_schedule.maintenance_schedule.make_maintenance_visit",
|
||||||
source_doctype: "Maintenance Schedule",
|
source_doctype: "Maintenance Schedule",
|
||||||
|
target: me.frm,
|
||||||
|
setters: {
|
||||||
|
customer: me.frm.doc.customer || undefined,
|
||||||
|
},
|
||||||
get_query_filters: {
|
get_query_filters: {
|
||||||
docstatus: 1,
|
docstatus: 1,
|
||||||
customer: cur_frm.doc.customer || undefined,
|
company: me.frm.doc.company
|
||||||
company: cur_frm.doc.company
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, __("Get items from"));
|
}, __("Get items from"));
|
||||||
cur_frm.add_custom_button(__('Warranty Claim'),
|
this.frm.add_custom_button(__('Warranty Claim'),
|
||||||
function() {
|
function() {
|
||||||
erpnext.utils.map_current_doc({
|
erpnext.utils.map_current_doc({
|
||||||
method: "erpnext.support.doctype.warranty_claim.warranty_claim.make_maintenance_visit",
|
method: "erpnext.support.doctype.warranty_claim.warranty_claim.make_maintenance_visit",
|
||||||
source_doctype: "Warranty Claim",
|
source_doctype: "Warranty Claim",
|
||||||
|
target: me.frm,
|
||||||
|
date_field: "complaint_date",
|
||||||
|
setters: {
|
||||||
|
customer: me.frm.doc.customer || undefined,
|
||||||
|
},
|
||||||
get_query_filters: {
|
get_query_filters: {
|
||||||
status: ["in", "Open, Work in Progress"],
|
status: ["in", "Open, Work in Progress"],
|
||||||
customer: cur_frm.doc.customer || undefined,
|
company: me.frm.doc.company
|
||||||
company: cur_frm.doc.company
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, __("Get items from"));
|
}, __("Get items from"));
|
||||||
cur_frm.add_custom_button(__('Sales Order'),
|
this.frm.add_custom_button(__('Sales Order'),
|
||||||
function() {
|
function() {
|
||||||
erpnext.utils.map_current_doc({
|
erpnext.utils.map_current_doc({
|
||||||
method: "erpnext.selling.doctype.sales_order.sales_order.make_maintenance_visit",
|
method: "erpnext.selling.doctype.sales_order.sales_order.make_maintenance_visit",
|
||||||
source_doctype: "Sales Order",
|
source_doctype: "Sales Order",
|
||||||
|
target: me.frm,
|
||||||
|
setters: {
|
||||||
|
customer: me.frm.doc.customer || undefined,
|
||||||
|
},
|
||||||
get_query_filters: {
|
get_query_filters: {
|
||||||
docstatus: 1,
|
docstatus: 1,
|
||||||
order_type: cur_frm.doc.order_type,
|
company: me.frm.doc.company,
|
||||||
customer: cur_frm.doc.customer || undefined,
|
order_type: me.frm.doc.order_type,
|
||||||
company: cur_frm.doc.company
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, __("Get items from"));
|
}, __("Get items from"));
|
||||||
|
|||||||
@@ -33,9 +33,7 @@ frappe.ui.form.on("BOM", {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if(frm.doc.docstatus==2) {
|
if(frm.doc.docstatus!=0) {
|
||||||
// show duplicate button when BOM is cancelled,
|
|
||||||
// its not very intuitive
|
|
||||||
frm.add_custom_button(__("Duplicate"), function() {
|
frm.add_custom_button(__("Duplicate"), function() {
|
||||||
frm.copy_doc();
|
frm.copy_doc();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ from erpnext.manufacturing.doctype.manufacturing_settings.manufacturing_settings
|
|||||||
from erpnext.stock.stock_balance import get_planned_qty, update_bin_qty
|
from erpnext.stock.stock_balance import get_planned_qty, update_bin_qty
|
||||||
from erpnext.manufacturing.doctype.bom.bom import get_bom_items_as_dict
|
from erpnext.manufacturing.doctype.bom.bom import get_bom_items_as_dict
|
||||||
from erpnext.stock.utils import get_bin
|
from erpnext.stock.utils import get_bin
|
||||||
|
from frappe.utils.csvutils import getlink
|
||||||
|
|
||||||
class OverProductionError(frappe.ValidationError): pass
|
class OverProductionError(frappe.ValidationError): pass
|
||||||
class StockOverProductionError(frappe.ValidationError): pass
|
class StockOverProductionError(frappe.ValidationError): pass
|
||||||
@@ -311,7 +312,7 @@ class ProductionOrder(Document):
|
|||||||
|
|
||||||
if timesheet and timesheet.get("time_logs"):
|
if timesheet and timesheet.get("time_logs"):
|
||||||
timesheet.save()
|
timesheet.save()
|
||||||
timesheets.append(timesheet.name)
|
timesheets.append(getlink("Timesheet", timesheet.name))
|
||||||
|
|
||||||
self.planned_end_date = self.operations[-1].planned_end_time
|
self.planned_end_date = self.operations[-1].planned_end_time
|
||||||
if timesheets:
|
if timesheets:
|
||||||
|
|||||||
@@ -392,3 +392,8 @@ erpnext.patches.v8_0.update_status_as_paid_for_completed_expense_claim
|
|||||||
erpnext.patches.v7_2.stock_uom_in_selling
|
erpnext.patches.v7_2.stock_uom_in_selling
|
||||||
erpnext.patches.v8_0.revert_manufacturers_table_from_item
|
erpnext.patches.v8_0.revert_manufacturers_table_from_item
|
||||||
erpnext.patches.v8_0.disable_instructor_role
|
erpnext.patches.v8_0.disable_instructor_role
|
||||||
|
erpnext.patches.v8_0.merge_student_batch_and_student_group
|
||||||
|
erpnext.patches.v8_0.rename_total_margin_to_rate_with_margin # 11-05-2017
|
||||||
|
erpnext.patches.v8_0.fix_status_for_invoices_with_negative_outstanding
|
||||||
|
erpnext.patches.v8_0.make_payments_table_blank_for_non_pos_invoice
|
||||||
|
erpnext.patches.v8_0.delete_schools_depricated_doctypes
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
import frappe
|
import frappe
|
||||||
|
|
||||||
def execute():
|
def execute():
|
||||||
frappe.reload_doc('schools', 'doctype', 'student_batch_student')
|
|
||||||
frappe.reload_doc('schools', 'doctype', 'student_group_student')
|
frappe.reload_doc('schools', 'doctype', 'student_group_student')
|
||||||
frappe.db.sql("update `tabStudent Batch Student` set active=1")
|
|
||||||
frappe.db.sql("update `tabStudent Group Student` set active=1")
|
frappe.db.sql("update `tabStudent Group Student` set active=1")
|
||||||
|
|||||||
@@ -3,16 +3,21 @@ from frappe.model.utils.rename_field import rename_field
|
|||||||
|
|
||||||
def execute():
|
def execute():
|
||||||
#Rename Grading Structure to Grading Scale
|
#Rename Grading Structure to Grading Scale
|
||||||
|
if not frappe.db.exists("DocType", "Grading Scale"):
|
||||||
frappe.rename_doc("DocType", "Grading Structure", "Grading Scale", force=True)
|
frappe.rename_doc("DocType", "Grading Structure", "Grading Scale", force=True)
|
||||||
|
if not frappe.db.exists("DocType", "Grading Scale Interval"):
|
||||||
frappe.rename_doc("DocType", "Grade Interval", "Grading Scale Interval", force=True)
|
frappe.rename_doc("DocType", "Grade Interval", "Grading Scale Interval", force=True)
|
||||||
|
|
||||||
frappe.reload_doc("schools", "doctype", "grading_scale_interval")
|
frappe.reload_doc("schools", "doctype", "grading_scale_interval")
|
||||||
|
if "to_score" in frappe.db.get_table_columns("Grading Scale Interval"):
|
||||||
rename_field("Grading Scale Interval", "to_score", "threshold")
|
rename_field("Grading Scale Interval", "to_score", "threshold")
|
||||||
|
|
||||||
|
if not frappe.db.exists("DocType", "Assessment Plan"):
|
||||||
frappe.rename_doc("DocType", "Assessment", "Assessment Plan", force=True)
|
frappe.rename_doc("DocType", "Assessment", "Assessment Plan", force=True)
|
||||||
|
|
||||||
#Rename Assessment Results
|
#Rename Assessment Results
|
||||||
frappe.reload_doc("schools", "doctype", "assessment_plan")
|
frappe.reload_doc("schools", "doctype", "assessment_plan")
|
||||||
|
if "grading_structure" in frappe.db.get_table_columns("Assessment Plan"):
|
||||||
rename_field("Assessment Plan", "grading_structure", "grading_scale")
|
rename_field("Assessment Plan", "grading_structure", "grading_scale")
|
||||||
|
|
||||||
frappe.reload_doc("schools", "doctype", "assessment_result")
|
frappe.reload_doc("schools", "doctype", "assessment_result")
|
||||||
@@ -20,9 +25,10 @@ def execute():
|
|||||||
frappe.reload_doc("schools", "doctype", "assessment_criteria")
|
frappe.reload_doc("schools", "doctype", "assessment_criteria")
|
||||||
|
|
||||||
|
|
||||||
for assessment in frappe.get_all("Assessment Plan", fields=["name", "grading_scale"], filters = [["docstatus", "!=", 2 ]]):
|
for assessment in frappe.get_all("Assessment Plan",
|
||||||
print assessment
|
fields=["name", "grading_scale"], filters = [["docstatus", "!=", 2 ]]):
|
||||||
for stud_result in frappe.db.sql("select * from `tabAssessment Result` where parent= %s", assessment.name, as_dict=True):
|
for stud_result in frappe.db.sql("select * from `tabAssessment Result` where parent= %s",
|
||||||
|
assessment.name, as_dict=True):
|
||||||
if stud_result.result:
|
if stud_result.result:
|
||||||
assessment_result = frappe.new_doc("Assessment Result")
|
assessment_result = frappe.new_doc("Assessment Result")
|
||||||
assessment_result.student = stud_result.student
|
assessment_result.student = stud_result.student
|
||||||
|
|||||||
14
erpnext/patches/v8_0/delete_schools_depricated_doctypes.py
Normal file
14
erpnext/patches/v8_0/delete_schools_depricated_doctypes.py
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# Copyright (c) 2017, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
import frappe
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
""" delete doctypes """
|
||||||
|
|
||||||
|
if frappe.db.exists("DocType", "Grading Structure"):
|
||||||
|
frappe.delete_doc("DocType", "Grading Structure", force=1)
|
||||||
|
|
||||||
|
if frappe.db.exists("DocType", "Grade Interval"):
|
||||||
|
frappe.delete_doc("DocType", "Grade Interval", force=1)
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
# Copyright (c) 2017, Frappe and Contributors
|
||||||
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
import frappe
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
for dt, status in [["Sales Invoice", "Credit Note Issued"], ["Purchase Invoice", "Debit Note Issued"]]:
|
||||||
|
invoices = frappe.db.sql("""
|
||||||
|
select name
|
||||||
|
from `tab{0}`
|
||||||
|
where
|
||||||
|
status = %s
|
||||||
|
and outstanding_amount < 0
|
||||||
|
and docstatus=1
|
||||||
|
and is_return=0
|
||||||
|
""".format(dt), status)
|
||||||
|
|
||||||
|
for inv in invoices:
|
||||||
|
return_inv = frappe.db.sql("""select name from `tab{0}`
|
||||||
|
where is_return=1 and return_against=%s and docstatus=1""".format(dt), inv[0])
|
||||||
|
if not return_inv:
|
||||||
|
frappe.db.sql("update `tab{0}` set status='Paid' where name = %s".format(dt), inv[0])
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
import frappe
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
frappe.reload_doctype('Sales Invoice')
|
||||||
|
|
||||||
|
frappe.db.sql("""
|
||||||
|
delete from
|
||||||
|
`tabSales Invoice Payment`
|
||||||
|
where
|
||||||
|
parent in (select name from `tabSales Invoice` where is_pos = 0)
|
||||||
|
""")
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
# Copyright (c) 2017, Frappe and Contributors
|
||||||
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
import frappe
|
||||||
|
from frappe.model.utils.rename_field import *
|
||||||
|
from frappe.model.mapper import get_mapped_doc
|
||||||
|
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
|
||||||
|
# for converting student batch into student group
|
||||||
|
frappe.reload_doctype("Student Group")
|
||||||
|
|
||||||
|
if frappe.db.table_exists("Student Batch"):
|
||||||
|
student_batches = frappe.db.sql('''select name as student_group_name, student_batch_name as batch,
|
||||||
|
program, academic_year, academic_term from `tabStudent Batch`''', as_dict=1)
|
||||||
|
|
||||||
|
for student_batch in student_batches:
|
||||||
|
# create student batch name if does not exists !!
|
||||||
|
if student_batch.get("batch") and not frappe.db.exists("Student Batch Name", student_batch.get("batch")):
|
||||||
|
frappe.get_doc({
|
||||||
|
"doctype": "Student Batch Name",
|
||||||
|
"batch_name": student_batch.get("batch")
|
||||||
|
}).insert(ignore_permissions=True)
|
||||||
|
|
||||||
|
student_batch.update({"doctype":"Student Group", "group_based_on": "Batch"})
|
||||||
|
doc = frappe.get_doc(student_batch)
|
||||||
|
|
||||||
|
if frappe.db.sql("SHOW COLUMNS FROM `tabStudent Batch Student` LIKE 'active'"):
|
||||||
|
cond = ", active"
|
||||||
|
else:
|
||||||
|
cond = " "
|
||||||
|
student_list = frappe.db.sql('''select student, student_name {cond} from `tabStudent Batch Student`
|
||||||
|
where parent=%s'''.format(cond=cond), (doc.name), as_dict=1)
|
||||||
|
|
||||||
|
if student_list:
|
||||||
|
for i, student in enumerate(student_list):
|
||||||
|
student.update({"group_roll_number": i+1})
|
||||||
|
doc.extend("students", student_list)
|
||||||
|
|
||||||
|
instructor_list = frappe.db.sql('''select instructor, instructor_name from `tabStudent Batch Instructor`
|
||||||
|
where parent=%s''', (doc.name), as_dict=1)
|
||||||
|
if instructor_list:
|
||||||
|
doc.extend("instructors", instructor_list)
|
||||||
|
doc.save()
|
||||||
|
|
||||||
|
# delete the student batch and child-table
|
||||||
|
if frappe.db.table_exists("Student Batch"):
|
||||||
|
frappe.delete_doc("DocType", "Student Batch", force=1)
|
||||||
|
if frappe.db.table_exists("Student Batch Student"):
|
||||||
|
frappe.delete_doc("DocType", "Student Batch Student", force=1)
|
||||||
|
if frappe.db.table_exists("Student Batch Instructor"):
|
||||||
|
frappe.delete_doc("DocType", "Student Batch Instructor", force=1)
|
||||||
|
|
||||||
|
# delete the student batch creation tool
|
||||||
|
if frappe.db.table_exists("Student Batch Creation Tool"):
|
||||||
|
frappe.delete_doc("DocType", "Student Batch Creation Tool", force=1)
|
||||||
|
|
||||||
|
# delete the student batch creation tool
|
||||||
|
if frappe.db.table_exists("Attendance Tool Student"):
|
||||||
|
frappe.delete_doc("DocType", "Attendance Tool Student", force=1)
|
||||||
|
|
||||||
|
# change the student batch to student group in the student attendance
|
||||||
|
frappe.reload_doctype("Student Attendance")
|
||||||
|
|
||||||
|
table_columns = frappe.db.get_table_columns("Student Attendance")
|
||||||
|
if "student_batch" in table_columns:
|
||||||
|
rename_field("Student Attendance", "student_batch", "student_group")
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
from __future__ import unicode_literals
|
||||||
|
import frappe
|
||||||
|
|
||||||
|
from frappe.model.utils.rename_field import rename_field
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
"""
|
||||||
|
Rename Total Margin field to Rate With Margin in
|
||||||
|
"Sales Order Item", "Sales Invoice Item", "Delivery Note Item",
|
||||||
|
"Quotation Item"
|
||||||
|
"""
|
||||||
|
|
||||||
|
for d in ("Sales Order Item", "Sales Invoice Item",
|
||||||
|
"Delivery Note Item", "Quotation Item"):
|
||||||
|
frappe.reload_doctype(d)
|
||||||
|
rename_field_if_exists(d, "total_margin", "rate_with_margin")
|
||||||
|
|
||||||
|
|
||||||
|
def rename_field_if_exists(doctype, old_fieldname, new_fieldname):
|
||||||
|
try:
|
||||||
|
rename_field(doctype, old_fieldname, new_fieldname)
|
||||||
|
except Exception, e:
|
||||||
|
if e.args[0] != 1054:
|
||||||
|
raise
|
||||||
@@ -216,9 +216,19 @@ class Project(Document):
|
|||||||
# duplicated project
|
# duplicated project
|
||||||
dependency_map = {}
|
dependency_map = {}
|
||||||
for task in self.tasks:
|
for task in self.tasks:
|
||||||
name, depends_on_tasks = frappe.db.get_value(
|
_task = frappe.db.get_value(
|
||||||
'Task', { "subject": task.title, "project": self.copied_from }, ['name', 'depends_on_tasks']
|
'Task',
|
||||||
|
{"subject": task.title, "project": self.copied_from},
|
||||||
|
['name', 'depends_on_tasks'],
|
||||||
|
as_dict=True
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if _task is None:
|
||||||
|
continue
|
||||||
|
|
||||||
|
name = _task.name
|
||||||
|
depends_on_tasks = _task.depends_on_tasks
|
||||||
|
|
||||||
depends_on_tasks = [x for x in depends_on_tasks.split(',') if x]
|
depends_on_tasks = [x for x in depends_on_tasks.split(',') if x]
|
||||||
dependency_map[task.title] = [ x['subject'] for x in frappe.get_list(
|
dependency_map[task.title] = [ x['subject'] for x in frappe.get_list(
|
||||||
'Task Depends On', {"parent": name}, ['subject'])]
|
'Task Depends On', {"parent": name}, ['subject'])]
|
||||||
|
|||||||
@@ -368,7 +368,8 @@ def get_events(start, end, filters=None):
|
|||||||
conditions = get_conditions(filters)
|
conditions = get_conditions(filters)
|
||||||
return frappe.db.sql("""select `tabTimesheet Detail`.name as name,
|
return frappe.db.sql("""select `tabTimesheet Detail`.name as name,
|
||||||
`tabTimesheet Detail`.docstatus as status, `tabTimesheet Detail`.parent as parent,
|
`tabTimesheet Detail`.docstatus as status, `tabTimesheet Detail`.parent as parent,
|
||||||
from_time as start_date, hours, activity_type, project, to_time as end_date,
|
from_time as start_date, hours, activity_type,
|
||||||
|
`tabTimesheet Detail`.project, to_time as end_date,
|
||||||
CONCAT(`tabTimesheet Detail`.parent, ' (', ROUND(hours,2),' hrs)') as title
|
CONCAT(`tabTimesheet Detail`.parent, ' (', ROUND(hours,2),' hrs)') as title
|
||||||
from `tabTimesheet Detail`, `tabTimesheet`
|
from `tabTimesheet Detail`, `tabTimesheet`
|
||||||
where `tabTimesheet Detail`.parent = `tabTimesheet`.name
|
where `tabTimesheet Detail`.parent = `tabTimesheet`.name
|
||||||
|
|||||||
@@ -270,6 +270,11 @@ body[data-route="pos"] .item-cart-items {
|
|||||||
border: 1px solid #d1d8dd;
|
border: 1px solid #d1d8dd;
|
||||||
border-top: none;
|
border-top: none;
|
||||||
}
|
}
|
||||||
|
@media (max-width: 767px) {
|
||||||
|
body[data-route="pos"] .item-cart-items {
|
||||||
|
height: 30vh;
|
||||||
|
}
|
||||||
|
}
|
||||||
body[data-route="pos"] .no-items-message {
|
body[data-route="pos"] .no-items-message {
|
||||||
min-height: 200px;
|
min-height: 200px;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -5,17 +5,17 @@ erpnext.taxes_and_totals = erpnext.payments.extend({
|
|||||||
setup: function() {},
|
setup: function() {},
|
||||||
apply_pricing_rule_on_item: function(item){
|
apply_pricing_rule_on_item: function(item){
|
||||||
if(item.margin_type == "Percentage"){
|
if(item.margin_type == "Percentage"){
|
||||||
item.total_margin = flt(item.price_list_rate)
|
item.rate_with_margin = flt(item.price_list_rate)
|
||||||
+ flt(item.price_list_rate) * ( flt(item.margin_rate_or_amount) / 100);
|
+ flt(item.price_list_rate) * ( flt(item.margin_rate_or_amount) / 100);
|
||||||
} else {
|
} else {
|
||||||
item.total_margin = flt(item.price_list_rate) + flt(item.margin_rate_or_amount);
|
item.rate_with_margin = flt(item.price_list_rate) + flt(item.margin_rate_or_amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
item.rate = flt(item.total_margin , precision("rate", item));
|
item.rate = flt(item.rate_with_margin , precision("rate", item));
|
||||||
|
|
||||||
if(item.discount_percentage){
|
if(item.discount_percentage){
|
||||||
discount_value = flt(item.total_margin) * flt(item.discount_percentage) / 100;
|
discount_value = flt(item.rate_with_margin) * flt(item.discount_percentage) / 100;
|
||||||
item.rate = flt((item.total_margin) - (discount_value), precision('rate', item));
|
item.rate = flt((item.rate_with_margin) - (discount_value), precision('rate', item));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -594,6 +594,8 @@ erpnext.taxes_and_totals = erpnext.payments.extend({
|
|||||||
paid_amount += data.amount;
|
paid_amount += data.amount;
|
||||||
base_paid_amount += data.base_amount;
|
base_paid_amount += data.base_amount;
|
||||||
})
|
})
|
||||||
|
} else if(!this.frm.doc.is_return){
|
||||||
|
this.frm.doc.payments = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
this.frm.doc.paid_amount = flt(paid_amount, precision("paid_amount"));
|
this.frm.doc.paid_amount = flt(paid_amount, precision("paid_amount"));
|
||||||
@@ -602,11 +604,18 @@ erpnext.taxes_and_totals = erpnext.payments.extend({
|
|||||||
|
|
||||||
calculate_change_amount: function(){
|
calculate_change_amount: function(){
|
||||||
this.frm.doc.change_amount = 0.0;
|
this.frm.doc.change_amount = 0.0;
|
||||||
|
this.frm.doc.base_change_amount = 0.0;
|
||||||
if(this.frm.doc.paid_amount > this.frm.doc.grand_total && !this.frm.doc.is_return) {
|
if(this.frm.doc.paid_amount > this.frm.doc.grand_total && !this.frm.doc.is_return) {
|
||||||
|
var payment_types = $.map(cur_frm.doc.payments, function(d) { return d.type });
|
||||||
|
if (in_list(payment_types, 'Cash')) {
|
||||||
this.frm.doc.change_amount = flt(this.frm.doc.paid_amount - this.frm.doc.grand_total +
|
this.frm.doc.change_amount = flt(this.frm.doc.paid_amount - this.frm.doc.grand_total +
|
||||||
this.frm.doc.write_off_amount, precision("change_amount"));
|
this.frm.doc.write_off_amount, precision("change_amount"));
|
||||||
this.frm.doc.base_change_amount = flt(this.frm.doc.base_paid_amount - this.frm.doc.base_grand_total +
|
|
||||||
this.frm.doc.base_write_off_amount, precision("base_change_amount"));
|
this.frm.doc.base_change_amount = flt(this.frm.doc.base_paid_amount -
|
||||||
|
this.frm.doc.base_grand_total + this.frm.doc.base_write_off_amount,
|
||||||
|
precision("base_change_amount"));
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -6,12 +6,31 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
|||||||
this._super();
|
this._super();
|
||||||
frappe.ui.form.on(this.frm.doctype + " Item", "rate", function(frm, cdt, cdn) {
|
frappe.ui.form.on(this.frm.doctype + " Item", "rate", function(frm, cdt, cdn) {
|
||||||
var item = frappe.get_doc(cdt, cdn);
|
var item = frappe.get_doc(cdt, cdn);
|
||||||
|
var has_margin_field = frappe.meta.has_field(cdt, 'margin_type');
|
||||||
|
|
||||||
frappe.model.round_floats_in(item, ["rate", "price_list_rate"]);
|
frappe.model.round_floats_in(item, ["rate", "price_list_rate"]);
|
||||||
|
|
||||||
if(item.price_list_rate) {
|
if(item.price_list_rate) {
|
||||||
item.discount_percentage = flt((1 - item.rate / item.price_list_rate) * 100.0, precision("discount_percentage", item));
|
if(item.rate > item.price_list_rate && has_margin_field) {
|
||||||
|
// if rate is greater than price_list_rate, set margin
|
||||||
|
// or set discount
|
||||||
|
item.discount_percentage = 0;
|
||||||
|
item.margin_type = 'Amount';
|
||||||
|
item.margin_rate_or_amount = flt(item.rate - item.price_list_rate,
|
||||||
|
precision("margin_rate_or_amount", item));
|
||||||
|
item.rate_with_margin = item.rate;
|
||||||
|
} else {
|
||||||
|
item.discount_percentage = flt((1 - item.rate / item.price_list_rate) * 100.0,
|
||||||
|
precision("discount_percentage", item));
|
||||||
|
item.margin_type = '';
|
||||||
|
item.margin_rate_or_amount = 0;
|
||||||
|
item.rate_with_margin = 0;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
item.discount_percentage = 0.0;
|
item.discount_percentage = 0.0;
|
||||||
|
item.margin_type = '';
|
||||||
|
item.margin_rate_or_amount = 0;
|
||||||
|
item.rate_with_margin = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
cur_frm.cscript.set_gross_profit(item);
|
cur_frm.cscript.set_gross_profit(item);
|
||||||
@@ -974,20 +993,12 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
|||||||
|
|
||||||
get_terms: function() {
|
get_terms: function() {
|
||||||
var me = this;
|
var me = this;
|
||||||
if(this.frm.doc.tc_name) {
|
|
||||||
return frappe.call({
|
erpnext.utils.get_terms(this.frm.doc.tc_name, this.frm.doc, function(r) {
|
||||||
method: 'erpnext.setup.doctype.terms_and_conditions.terms_and_conditions.get_terms_and_conditions',
|
|
||||||
args: {
|
|
||||||
template_name: this.frm.doc.tc_name,
|
|
||||||
doc: this.frm.doc
|
|
||||||
},
|
|
||||||
callback: function(r) {
|
|
||||||
if(!r.exc) {
|
if(!r.exc) {
|
||||||
me.frm.set_value("terms", r.message);
|
me.frm.set_value("terms", r.message);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
taxes_and_charges: function() {
|
taxes_and_charges: function() {
|
||||||
|
|||||||
@@ -1,20 +1,20 @@
|
|||||||
<div class="pos_payment row">
|
<div class="pos_payment row">
|
||||||
<div class="row" style="padding: 0px 30px;">
|
<div class="row" style="padding: 0px 30px;">
|
||||||
<h3>Total Amount: <span class="label label-default" style="font-size:20px;padding:5px">{%= format_currency(grand_total, currency) %}</span></h3>
|
<h3>{{ __("Total Amount") }}: <span class="label label-default" style="font-size:20px;padding:5px">{%= format_currency(grand_total, currency) %}</span></h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="row amount-row">
|
<div class="row amount-row">
|
||||||
<div class="col-xs-6 col-sm-3 text-center">
|
<div class="col-xs-6 col-sm-3 text-center">
|
||||||
<p class="amount-label"> Paid <h3 class="paid_amount">{%= format_currency(paid_amount, currency) %}</h3></p>
|
<p class="amount-label"> {{ __("Paid") }} <h3 class="paid_amount">{%= format_currency(paid_amount, currency) %}</h3></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-3 text-center">
|
<div class="col-xs-6 col-sm-3 text-center">
|
||||||
<p class="amount-label"> Outstanding <h3 class="outstanding_amount">{%= format_currency(outstanding_amount, currency) %} </h3></p>
|
<p class="amount-label"> {{ __("Outstanding") }} <h3 class="outstanding_amount">{%= format_currency(outstanding_amount, currency) %} </h3></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-3 text-center">
|
<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, null, 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>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-3 text-center">
|
<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, null, 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>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{% } %}
|
{% } %}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<button type="button" class="btn btn-default delete-btn">Del</button>
|
<button type="button" class="btn btn-default delete-btn">{{ __("Del") }}</button>
|
||||||
<button type="button" class="btn btn-default pos-keyboard-key">0</button>
|
<button type="button" class="btn btn-default pos-keyboard-key">0</button>
|
||||||
<button type="button" class="btn btn-default pos-keyboard-key">.</button>
|
<button type="button" class="btn btn-default pos-keyboard-key">.</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
<div class="no-items-message text-extra-muted">
|
<div class="no-items-message text-extra-muted">
|
||||||
<span class="text-center">
|
<span class="text-center">
|
||||||
<i class="fa fa-2x fa-shopping-cart"></i>
|
<i class="fa fa-2x fa-shopping-cart"></i>
|
||||||
<p>Tap items to add them here</p>
|
<p>{{ __("Tap items to add them here") }}</p>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="items">
|
<div class="items">
|
||||||
@@ -73,14 +73,14 @@
|
|||||||
{% for(var j=i*3; j
|
{% for(var j=i*3; j
|
||||||
<(i+1)*3; j++) { %} <button type="button" class="btn btn-default numeric-keypad" val="{{j+1}}">{{j+1}}</button>
|
<(i+1)*3; j++) { %} <button type="button" class="btn btn-default numeric-keypad" val="{{j+1}}">{{j+1}}</button>
|
||||||
{% } %}
|
{% } %}
|
||||||
<button type="button" id="pos-item-{{ chartData[i].toLowerCase() }}" class="btn text-center btn-default numeric-keypad pos-operation">{{ chartData[i] }}</button>
|
<button type="button" id="pos-item-{{ chartData[i].toLowerCase() }}" class="btn text-center btn-default numeric-keypad pos-operation">{{ __(chartData[i]) }}</button>
|
||||||
</div>
|
</div>
|
||||||
{% } %}
|
{% } %}
|
||||||
<div class="row text-right">
|
<div class="row text-right">
|
||||||
<button type="button" class="btn btn-default numeric-keypad numeric-del">Del</button>
|
<button type="button" class="btn btn-default numeric-keypad numeric-del">{{ __("Del") }}</button>
|
||||||
<button type="button" class="btn btn-default numeric-keypad" val="0">0</button>
|
<button type="button" class="btn btn-default numeric-keypad" val="0">0</button>
|
||||||
<button type="button" class="btn btn-default numeric-keypad" val=".">.</button>
|
<button type="button" class="btn btn-default numeric-keypad" val=".">.</button>
|
||||||
<button type="button" class="btn btn-primary numeric-keypad pos-pay">Pay</button>
|
<button type="button" class="btn btn-primary numeric-keypad pos-pay">{{ __("Pay") }}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -97,7 +97,7 @@
|
|||||||
<div class="no-items-message text-extra-muted">
|
<div class="no-items-message text-extra-muted">
|
||||||
<span class="text-center">
|
<span class="text-center">
|
||||||
<i class="fa fa-2x fa-user"></i>
|
<i class="fa fa-2x fa-user"></i>
|
||||||
<p>No Customers yet!</p>
|
<p>{{ __("No Customers yet!") }}</p>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -112,7 +112,7 @@
|
|||||||
<div class="pos-list-row pos-bill-header text-muted h6">
|
<div class="pos-list-row pos-bill-header text-muted h6">
|
||||||
<div class="cell subject search-item-group">
|
<div class="cell subject search-item-group">
|
||||||
<div class="dropdown">
|
<div class="dropdown">
|
||||||
<a class="text-muted dropdown-toggle" data-toggle="dropdown"><span class="dropdown-text">All Item Groups</span><i class="caret"></i></a>
|
<a class="text-muted dropdown-toggle" data-toggle="dropdown"><span class="dropdown-text">{{ __("All Item Groups") }}</span><i class="caret"></i></a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<div class="pos-item-wrapper image-view-item" data-item-code="{{item_code}}">
|
<div class="pos-item-wrapper image-view-item" data-item-code="{{item_code}}">
|
||||||
<div class="image-view-header doclist-row">
|
<div class="image-view-header doclist-row">
|
||||||
<div class="list-value">
|
<div class="list-value">
|
||||||
<a class="grey list-id" data-name="{{item_code}}" title="{{ item_name || item_code}}">{{item_name || item_code}}<br>({{item_stock}})</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>
|
</div>
|
||||||
<div class="image-view-body">
|
<div class="image-view-body">
|
||||||
|
|||||||
@@ -1,22 +1,22 @@
|
|||||||
<div class="pos-selected-item-action" data-item-code="{%= item_code %}">
|
<div class="pos-selected-item-action" data-item-code="{%= item_code %}">
|
||||||
<div class="pos-list-row">
|
<div class="pos-list-row">
|
||||||
<div class="cell">Quantity:</div>
|
<div class="cell">{{ __("Quantity") }}:</div>
|
||||||
<input type="tel" class="form-control cell pos-item-qty" value="{%= qty %}"/>
|
<input type="tel" class="form-control cell pos-item-qty" value="{%= qty %}"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="pos-list-row">
|
<div class="pos-list-row">
|
||||||
<div class="cell">Price List Rate:</div>
|
<div class="cell">{{ __("Price List Rate") }}:</div>
|
||||||
<input type="tel" class="form-control cell" disabled value="{%= price_list_rate %}"/>
|
<input type="tel" class="form-control cell" disabled value="{%= price_list_rate %}"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="pos-list-row">
|
<div class="pos-list-row">
|
||||||
<div class="cell">Discount:</div>
|
<div class="cell">{{ __("Discount") }}:</div>
|
||||||
<input type="tel" class="form-control cell pos-item-disc" value="{%= discount_percentage %}">
|
<input type="tel" class="form-control cell pos-item-disc" value="{%= discount_percentage %}">
|
||||||
</div>
|
</div>
|
||||||
<div class="pos-list-row">
|
<div class="pos-list-row">
|
||||||
<div class="cell">Price:</div>
|
<div class="cell">{{ __("Price") }}:</div>
|
||||||
<input type="tel" class="form-control cell pos-item-price" value="{%= rate %}"/>
|
<input type="tel" class="form-control cell pos-item-price" value="{%= rate %}"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="pos-list-row">
|
<div class="pos-list-row">
|
||||||
<div class="cell">Amount:</div>
|
<div class="cell">{{ __("Amount") }}:</div>
|
||||||
<input type="tel" class="form-control cell pos-amount" value="{%= amount %}"/>
|
<input type="tel" class="form-control cell pos-amount" value="{%= amount %}"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<label>
|
<label>
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
data-idx="{{idx}}"
|
data-group_roll_number="{{group_roll_number}}"
|
||||||
data-student="{{student}}"
|
data-student="{{student}}"
|
||||||
data-student-name="{{student_name}}"
|
data-student-name="{{student_name}}"
|
||||||
class="students-check"
|
class="students-check"
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
checked
|
checked
|
||||||
{% endif %}
|
{% endif %}
|
||||||
>
|
>
|
||||||
{{ idx }} - {{ student_name }}
|
{{ group_roll_number }} - {{ student_name }}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -104,6 +104,21 @@ $.extend(erpnext.utils, {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
refresh_field(table_fieldname);
|
refresh_field(table_fieldname);
|
||||||
|
},
|
||||||
|
|
||||||
|
get_terms: function(tc_name, doc, callback) {
|
||||||
|
if(tc_name) {
|
||||||
|
return frappe.call({
|
||||||
|
method: 'erpnext.setup.doctype.terms_and_conditions.terms_and_conditions.get_terms_and_conditions',
|
||||||
|
args: {
|
||||||
|
template_name: tc_name,
|
||||||
|
doc: doc
|
||||||
|
},
|
||||||
|
callback: function(r) {
|
||||||
|
callback(r)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -114,8 +129,8 @@ erpnext.utils.map_current_doc = function(opts) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
var _map = function() {
|
var _map = function() {
|
||||||
// remove first item row if empty
|
|
||||||
if($.isArray(cur_frm.doc.items) && cur_frm.doc.items.length > 0) {
|
if($.isArray(cur_frm.doc.items) && cur_frm.doc.items.length > 0) {
|
||||||
|
// remove first item row if empty
|
||||||
if(!cur_frm.doc.items[0].item_code) {
|
if(!cur_frm.doc.items[0].item_code) {
|
||||||
cur_frm.doc.items = cur_frm.doc.items.splice(1);
|
cur_frm.doc.items = cur_frm.doc.items.splice(1);
|
||||||
}
|
}
|
||||||
@@ -134,7 +149,8 @@ erpnext.utils.map_current_doc = function(opts) {
|
|||||||
var item_qty_map = {};
|
var item_qty_map = {};
|
||||||
|
|
||||||
$.each(cur_frm.doc.items, function(i, d) {
|
$.each(cur_frm.doc.items, function(i, d) {
|
||||||
if(d[link_fieldname]==opts.source_name) {
|
opts.source_name.forEach(function(src) {
|
||||||
|
if(d[link_fieldname]==src) {
|
||||||
already_set = true;
|
already_set = true;
|
||||||
if (item_qty_map[d.item_code])
|
if (item_qty_map[d.item_code])
|
||||||
item_qty_map[d.item_code] += flt(d.qty);
|
item_qty_map[d.item_code] += flt(d.qty);
|
||||||
@@ -142,10 +158,12 @@ erpnext.utils.map_current_doc = function(opts) {
|
|||||||
item_qty_map[d.item_code] = flt(d.qty);
|
item_qty_map[d.item_code] = flt(d.qty);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
if(already_set) {
|
if(already_set) {
|
||||||
frappe.model.with_doc(opts.source_doctype, opts.source_name, function(r) {
|
opts.source_name.forEach(function(src) {
|
||||||
var source_doc = frappe.model.get_doc(opts.source_doctype, opts.source_name);
|
frappe.model.with_doc(opts.source_doctype, src, function(r) {
|
||||||
|
var source_doc = frappe.model.get_doc(opts.source_doctype, src);
|
||||||
$.each(source_doc.items || [], function(i, row) {
|
$.each(source_doc.items || [], function(i, row) {
|
||||||
if(row.qty > flt(item_qty_map[row.item_code])) {
|
if(row.qty > flt(item_qty_map[row.item_code])) {
|
||||||
already_set = false;
|
already_set = false;
|
||||||
@@ -156,21 +174,23 @@ erpnext.utils.map_current_doc = function(opts) {
|
|||||||
|
|
||||||
if(already_set) {
|
if(already_set) {
|
||||||
frappe.msgprint(__("You have already selected items from {0} {1}",
|
frappe.msgprint(__("You have already selected items from {0} {1}",
|
||||||
[opts.source_doctype, opts.source_name]));
|
[opts.source_doctype, src]));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return frappe.call({
|
return frappe.call({
|
||||||
// Sometimes we hit the limit for URL length of a GET request
|
// Sometimes we hit the limit for URL length of a GET request
|
||||||
// as we send the full target_doc. Hence this is a POST request.
|
// as we send the full target_doc. Hence this is a POST request.
|
||||||
type: "POST",
|
type: "POST",
|
||||||
method: opts.method,
|
method: 'frappe.model.mapper.map_docs',
|
||||||
args: {
|
args: {
|
||||||
"source_name": opts.source_name,
|
"method": opts.method,
|
||||||
"target_doc": cur_frm.doc
|
"source_names": opts.source_name,
|
||||||
|
"target_doc": cur_frm.doc,
|
||||||
},
|
},
|
||||||
callback: function(r) {
|
callback: function(r) {
|
||||||
if(!r.exc) {
|
if(!r.exc) {
|
||||||
@@ -181,29 +201,26 @@ erpnext.utils.map_current_doc = function(opts) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
if(opts.source_doctype) {
|
if(opts.source_doctype) {
|
||||||
var d = new frappe.ui.Dialog({
|
var d = new frappe.ui.form.MultiSelectDialog({
|
||||||
title: __("Get From ") + __(opts.source_doctype),
|
doctype: opts.source_doctype,
|
||||||
fields: [
|
target: opts.target,
|
||||||
{
|
date_field: opts.date_field || undefined,
|
||||||
fieldtype: "Link",
|
setters: opts.setters,
|
||||||
label: __(opts.source_doctype),
|
|
||||||
fieldname: opts.source_doctype,
|
|
||||||
options: opts.source_doctype,
|
|
||||||
get_query: opts.get_query,
|
get_query: opts.get_query,
|
||||||
reqd:1
|
action: function(selections, args) {
|
||||||
},
|
let values = selections;
|
||||||
]
|
if(values.length === 0){
|
||||||
});
|
frappe.msgprint(__("Please select Quotations"))
|
||||||
d.set_primary_action(__('Get Items'), function() {
|
|
||||||
var values = d.get_values();
|
|
||||||
if(!values)
|
|
||||||
return;
|
return;
|
||||||
opts.source_name = values[opts.source_doctype];
|
}
|
||||||
d.hide();
|
opts.source_name = values;
|
||||||
|
opts.setters = args;
|
||||||
|
d.dialog.hide();
|
||||||
_map();
|
_map();
|
||||||
})
|
},
|
||||||
d.show();
|
});
|
||||||
} else if(opts.source_name) {
|
} else if(opts.source_name) {
|
||||||
|
opts.source_name = [opts.source_name];
|
||||||
_map();
|
_map();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -321,6 +321,10 @@ body[data-route="pos"] {
|
|||||||
overflow: auto;
|
overflow: auto;
|
||||||
border: 1px solid @border-color;
|
border: 1px solid @border-color;
|
||||||
border-top: none;
|
border-top: none;
|
||||||
|
|
||||||
|
@media (max-width: @screen-xs) {
|
||||||
|
height: 30vh;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.no-items-message {
|
.no-items-message {
|
||||||
|
|||||||
@@ -33,26 +33,26 @@ def enroll_student(source_name):
|
|||||||
return program_enrollment
|
return program_enrollment
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def check_attendance_records_exist(course_schedule=None, student_batch=None, date=None):
|
def check_attendance_records_exist(course_schedule=None, student_group=None, date=None):
|
||||||
"""Check if Attendance Records are made against the specified Course Schedule or Student Batch for given date.
|
"""Check if Attendance Records are made against the specified Course Schedule or Student Group for given date.
|
||||||
|
|
||||||
:param course_schedule: Course Schedule.
|
:param course_schedule: Course Schedule.
|
||||||
:param student_batch: Student Batch.
|
:param student_group: Student Group.
|
||||||
:param date: Date.
|
:param date: Date.
|
||||||
"""
|
"""
|
||||||
if course_schedule:
|
if course_schedule:
|
||||||
return frappe.get_list("Student Attendance", filters={"course_schedule": course_schedule})
|
return frappe.get_list("Student Attendance", filters={"course_schedule": course_schedule})
|
||||||
else:
|
else:
|
||||||
return frappe.get_list("Student Attendance", filters={"student_batch": student_batch, "date": date})
|
return frappe.get_list("Student Attendance", filters={"student_group": student_group, "date": date})
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def mark_attendance(students_present, students_absent, course_schedule=None, student_batch=None, date=None):
|
def mark_attendance(students_present, students_absent, course_schedule=None, student_group=None, date=None):
|
||||||
"""Creates Multiple Attendance Records.
|
"""Creates Multiple Attendance Records.
|
||||||
|
|
||||||
:param students_present: Students Present JSON.
|
:param students_present: Students Present JSON.
|
||||||
:param students_absent: Students Absent JSON.
|
:param students_absent: Students Absent JSON.
|
||||||
:param course_schedule: Course Schedule.
|
:param course_schedule: Course Schedule.
|
||||||
:param student_batch: Student Batch.
|
:param student_group: Student Group.
|
||||||
:param date: Date.
|
:param date: Date.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@@ -60,15 +60,15 @@ def mark_attendance(students_present, students_absent, course_schedule=None, stu
|
|||||||
absent = json.loads(students_absent)
|
absent = json.loads(students_absent)
|
||||||
|
|
||||||
for d in present:
|
for d in present:
|
||||||
make_attendance_records(d["student"], d["student_name"], "Present", course_schedule, student_batch, date)
|
make_attendance_records(d["student"], d["student_name"], "Present", course_schedule, student_group, date)
|
||||||
|
|
||||||
for d in absent:
|
for d in absent:
|
||||||
make_attendance_records(d["student"], d["student_name"], "Absent", course_schedule, student_batch, date)
|
make_attendance_records(d["student"], d["student_name"], "Absent", course_schedule, student_group, date)
|
||||||
|
|
||||||
frappe.db.commit()
|
frappe.db.commit()
|
||||||
frappe.msgprint(_("Attendance has been marked successfully."))
|
frappe.msgprint(_("Attendance has been marked successfully."))
|
||||||
|
|
||||||
def make_attendance_records(student, student_name, status, course_schedule=None, student_batch=None, date=None):
|
def make_attendance_records(student, student_name, status, course_schedule=None, student_group=None, date=None):
|
||||||
"""Creates/Update Attendance Record.
|
"""Creates/Update Attendance Record.
|
||||||
|
|
||||||
:param student: Student.
|
:param student: Student.
|
||||||
@@ -79,7 +79,7 @@ def make_attendance_records(student, student_name, status, course_schedule=None,
|
|||||||
student_attendance_list = frappe.get_list("Student Attendance", fields = ['name'], filters = {
|
student_attendance_list = frappe.get_list("Student Attendance", fields = ['name'], filters = {
|
||||||
"student": student,
|
"student": student,
|
||||||
"course_schedule": course_schedule,
|
"course_schedule": course_schedule,
|
||||||
"student_batch": student_batch,
|
"student_group": student_group,
|
||||||
"date": date
|
"date": date
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -90,7 +90,7 @@ def make_attendance_records(student, student_name, status, course_schedule=None,
|
|||||||
student_attendance.student = student
|
student_attendance.student = student
|
||||||
student_attendance.student_name = student_name
|
student_attendance.student_name = student_name
|
||||||
student_attendance.course_schedule = course_schedule
|
student_attendance.course_schedule = course_schedule
|
||||||
student_attendance.student_batch = student_batch
|
student_attendance.student_group = student_group
|
||||||
student_attendance.date = date
|
student_attendance.date = date
|
||||||
student_attendance.status = status
|
student_attendance.status = status
|
||||||
student_attendance.save()
|
student_attendance.save()
|
||||||
@@ -105,16 +105,6 @@ def get_student_guardians(student):
|
|||||||
filters={"parent": student})
|
filters={"parent": student})
|
||||||
return guardians
|
return guardians
|
||||||
|
|
||||||
@frappe.whitelist()
|
|
||||||
def get_student_batch_students(student_batch):
|
|
||||||
"""Returns List of student, student_name, idx in Student Batch.
|
|
||||||
|
|
||||||
:param student_batch: Student Batch.
|
|
||||||
"""
|
|
||||||
students = frappe.get_list("Student Batch Student", fields=["student", "student_name", "idx"] ,
|
|
||||||
filters={"parent": student_batch, "active": 1}, order_by= "idx")
|
|
||||||
return students
|
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def get_student_group_students(student_group):
|
def get_student_group_students(student_group):
|
||||||
"""Returns List of student, student_name in Student Group.
|
"""Returns List of student, student_name in Student Group.
|
||||||
@@ -122,7 +112,7 @@ def get_student_group_students(student_group):
|
|||||||
:param student_group: Student Group.
|
:param student_group: Student Group.
|
||||||
"""
|
"""
|
||||||
students = frappe.get_list("Student Group Student", fields=["student", "student_name"] ,
|
students = frappe.get_list("Student Group Student", fields=["student", "student_name"] ,
|
||||||
filters={"parent": student_group, "active": 1}, order_by= "idx")
|
filters={"parent": student_group, "active": 1}, order_by= "group_roll_number")
|
||||||
return students
|
return students
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
@@ -199,12 +189,9 @@ def get_assessment_criteria(course):
|
|||||||
fields=["assessment_criteria", "weightage"], filters={"parent": course}, order_by= "idx")
|
fields=["assessment_criteria", "weightage"], filters={"parent": course}, order_by= "idx")
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def get_assessment_students(assessment_plan, student_group=None, student_batch=None):
|
def get_assessment_students(assessment_plan, student_group):
|
||||||
student_list = []
|
|
||||||
if student_group:
|
|
||||||
student_list = get_student_group_students(student_group)
|
student_list = get_student_group_students(student_group)
|
||||||
elif student_batch:
|
|
||||||
student_list = get_student_batch_students(student_batch)
|
|
||||||
for i, student in enumerate(student_list):
|
for i, student in enumerate(student_list):
|
||||||
result = get_result(student.student, assessment_plan)
|
result = get_result(student.student, assessment_plan)
|
||||||
if result:
|
if result:
|
||||||
@@ -286,8 +273,6 @@ def update_email_group(doctype, name):
|
|||||||
email_group.save()
|
email_group.save()
|
||||||
email_list = []
|
email_list = []
|
||||||
students = []
|
students = []
|
||||||
if doctype == "Student Batch":
|
|
||||||
students = get_student_batch_students(name)
|
|
||||||
if doctype == "Student Group":
|
if doctype == "Student Group":
|
||||||
students = get_student_group_students(name)
|
students = get_student_group_students(name)
|
||||||
for stud in students:
|
for stud in students:
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
|
|
||||||
// For license information, please see license.txt
|
|
||||||
|
|
||||||
frappe.ui.form.on('Assessment Code', {
|
|
||||||
refresh: function(frm) {
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
@@ -1,89 +0,0 @@
|
|||||||
{
|
|
||||||
"allow_copy": 0,
|
|
||||||
"allow_import": 1,
|
|
||||||
"allow_rename": 1,
|
|
||||||
"autoname": "field:assessment_code",
|
|
||||||
"beta": 0,
|
|
||||||
"creation": "2017-02-13 19:33:43.843028",
|
|
||||||
"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": "assessment_code",
|
|
||||||
"fieldtype": "Data",
|
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Assessment 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
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"hide_heading": 0,
|
|
||||||
"hide_toolbar": 0,
|
|
||||||
"idx": 0,
|
|
||||||
"image_view": 0,
|
|
||||||
"in_create": 0,
|
|
||||||
"in_dialog": 0,
|
|
||||||
"is_submittable": 0,
|
|
||||||
"issingle": 0,
|
|
||||||
"istable": 0,
|
|
||||||
"max_attachments": 0,
|
|
||||||
"modified": "2017-02-13 19:33:47.037170",
|
|
||||||
"modified_by": "Administrator",
|
|
||||||
"module": "Schools",
|
|
||||||
"name": "Assessment Code",
|
|
||||||
"name_case": "",
|
|
||||||
"owner": "Administrator",
|
|
||||||
"permissions": [
|
|
||||||
{
|
|
||||||
"amend": 0,
|
|
||||||
"apply_user_permissions": 0,
|
|
||||||
"cancel": 0,
|
|
||||||
"create": 1,
|
|
||||||
"delete": 1,
|
|
||||||
"email": 1,
|
|
||||||
"export": 1,
|
|
||||||
"if_owner": 0,
|
|
||||||
"import": 0,
|
|
||||||
"permlevel": 0,
|
|
||||||
"print": 1,
|
|
||||||
"read": 1,
|
|
||||||
"report": 1,
|
|
||||||
"role": "Academics User",
|
|
||||||
"set_user_permissions": 0,
|
|
||||||
"share": 1,
|
|
||||||
"submit": 0,
|
|
||||||
"write": 1
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"quick_entry": 1,
|
|
||||||
"read_only": 0,
|
|
||||||
"read_only_onload": 0,
|
|
||||||
"sort_field": "modified",
|
|
||||||
"sort_order": "DESC",
|
|
||||||
"track_changes": 0,
|
|
||||||
"track_seen": 0
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
|
|
||||||
# For license information, please see license.txt
|
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
|
||||||
import frappe
|
|
||||||
from frappe.model.document import Document
|
|
||||||
|
|
||||||
class AssessmentCode(Document):
|
|
||||||
pass
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
|
||||||
# See license.txt
|
|
||||||
from __future__ import unicode_literals
|
|
||||||
|
|
||||||
import frappe
|
|
||||||
import unittest
|
|
||||||
|
|
||||||
# test_records = frappe.get_test_records('Assessment Code')
|
|
||||||
|
|
||||||
class TestAssessmentCode(unittest.TestCase):
|
|
||||||
pass
|
|
||||||
@@ -2,7 +2,6 @@
|
|||||||
// For license information, please see license.txt
|
// For license information, please see license.txt
|
||||||
|
|
||||||
cur_frm.add_fetch("student_group", "course", "course");
|
cur_frm.add_fetch("student_group", "course", "course");
|
||||||
cur_frm.add_fetch("student_group", "student_batch", "student_batch");
|
|
||||||
cur_frm.add_fetch("examiner", "instructor_name", "examiner_name");
|
cur_frm.add_fetch("examiner", "instructor_name", "examiner_name");
|
||||||
cur_frm.add_fetch("supervisor", "instructor_name", "supervisor_name");
|
cur_frm.add_fetch("supervisor", "instructor_name", "supervisor_name");
|
||||||
|
|
||||||
@@ -12,7 +11,7 @@ frappe.ui.form.on("Assessment Plan", {
|
|||||||
frm.add_custom_button(__("Assessment Result"), function() {
|
frm.add_custom_button(__("Assessment Result"), function() {
|
||||||
frappe.route_options = {
|
frappe.route_options = {
|
||||||
assessment_plan: frm.doc.name,
|
assessment_plan: frm.doc.name,
|
||||||
student_batch: frm.doc.student_batch
|
student_group: frm.doc.student_group
|
||||||
}
|
}
|
||||||
frappe.set_route("Form", "Assessment Result Tool");
|
frappe.set_route("Form", "Assessment Result Tool");
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -43,68 +43,6 @@
|
|||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"allow_bulk_edit": 0,
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "assessment_group",
|
|
||||||
"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": 1,
|
|
||||||
"label": "Assessment Group",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"options": "Assessment Group",
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"allow_bulk_edit": 0,
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "student_batch",
|
|
||||||
"fieldtype": "Link",
|
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 1,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Student Batch",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"options": "Student Batch",
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
@@ -113,7 +51,7 @@
|
|||||||
"columns": 0,
|
"columns": 0,
|
||||||
"fieldname": "student_group",
|
"fieldname": "student_group",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 1,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
@@ -131,7 +69,38 @@
|
|||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"remember_last_selected_value": 0,
|
"remember_last_selected_value": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 1,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
|
"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": 1,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"in_standard_filter": 1,
|
||||||
|
"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,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
@@ -171,19 +140,19 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
"fieldname": "course",
|
"fieldname": "assessment_group",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_global_search": 1,
|
"in_global_search": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 1,
|
"in_standard_filter": 1,
|
||||||
"label": "Course",
|
"label": "Assessment Group",
|
||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Course",
|
"options": "Assessment Group",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@@ -191,7 +160,7 @@
|
|||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"remember_last_selected_value": 0,
|
"remember_last_selected_value": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 1,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
@@ -664,7 +633,7 @@
|
|||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"menu_index": 0,
|
"menu_index": 0,
|
||||||
"modified": "2017-04-25 12:23:32.528982",
|
"modified": "2017-05-02 12:54:11.991616",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Schools",
|
"module": "Schools",
|
||||||
"name": "Assessment Plan",
|
"name": "Assessment Plan",
|
||||||
|
|||||||
@@ -9,21 +9,15 @@ from frappe import _
|
|||||||
|
|
||||||
class AssessmentPlan(Document):
|
class AssessmentPlan(Document):
|
||||||
def validate(self):
|
def validate(self):
|
||||||
if not (self.student_batch or self.student_group):
|
|
||||||
frappe.throw(_("Please select Student Group or Student Batch"))
|
|
||||||
self.validate_student_batch()
|
|
||||||
self.validate_overlap()
|
self.validate_overlap()
|
||||||
self.validate_max_score()
|
self.validate_max_score()
|
||||||
|
|
||||||
def validate_overlap(self):
|
def validate_overlap(self):
|
||||||
"""Validates overlap for Student Group/Student Batch, Instructor, Room"""
|
"""Validates overlap for Student Group, Instructor, Room"""
|
||||||
|
|
||||||
from erpnext.schools.utils import validate_overlap_for
|
from erpnext.schools.utils import validate_overlap_for
|
||||||
|
|
||||||
#Validate overlapping course schedules.
|
#Validate overlapping course schedules.
|
||||||
if self.student_batch:
|
|
||||||
validate_overlap_for(self, "Course Schedule", "student_batch")
|
|
||||||
|
|
||||||
if self.student_group:
|
if self.student_group:
|
||||||
validate_overlap_for(self, "Course Schedule", "student_group")
|
validate_overlap_for(self, "Course Schedule", "student_group")
|
||||||
|
|
||||||
@@ -31,19 +25,12 @@ class AssessmentPlan(Document):
|
|||||||
validate_overlap_for(self, "Course Schedule", "room")
|
validate_overlap_for(self, "Course Schedule", "room")
|
||||||
|
|
||||||
#validate overlapping assessment schedules.
|
#validate overlapping assessment schedules.
|
||||||
if self.student_batch:
|
|
||||||
validate_overlap_for(self, "Assessment Plan", "student_batch")
|
|
||||||
|
|
||||||
if self.student_group:
|
if self.student_group:
|
||||||
validate_overlap_for(self, "Assessment Plan", "student_group")
|
validate_overlap_for(self, "Assessment Plan", "student_group")
|
||||||
|
|
||||||
validate_overlap_for(self, "Assessment Plan", "room")
|
validate_overlap_for(self, "Assessment Plan", "room")
|
||||||
validate_overlap_for(self, "Assessment Plan", "supervisor", self.supervisor)
|
validate_overlap_for(self, "Assessment Plan", "supervisor", self.supervisor)
|
||||||
|
|
||||||
def validate_student_batch(self):
|
|
||||||
if self.student_group:
|
|
||||||
self.student_batch = frappe.db.get_value("Student Group", self.student_group, "student_batch")
|
|
||||||
|
|
||||||
def validate_max_score(self):
|
def validate_max_score(self):
|
||||||
max_score = 0
|
max_score = 0
|
||||||
for d in self.assessment_criteria:
|
for d in self.assessment_criteria:
|
||||||
|
|||||||
@@ -3,12 +3,11 @@
|
|||||||
// For license information, please see license.txt
|
// For license information, please see license.txt
|
||||||
|
|
||||||
cur_frm.add_fetch("assessment_plan", "student_group", "student_group");
|
cur_frm.add_fetch("assessment_plan", "student_group", "student_group");
|
||||||
cur_frm.add_fetch("assessment_plan", "student_batch", "student_batch");
|
|
||||||
|
|
||||||
frappe.ui.form.on('Assessment Result Tool', {
|
frappe.ui.form.on('Assessment Result Tool', {
|
||||||
refresh: function(frm) {
|
refresh: function(frm) {
|
||||||
if (frappe.route_options) {
|
if (frappe.route_options) {
|
||||||
frm.set_value("student_batch", frappe.route_options.student_batch);
|
frm.set_value("student_group", frappe.route_options.student_group);
|
||||||
frm.set_value("assessment_plan", frappe.route_options.assessment_plan);
|
frm.set_value("assessment_plan", frappe.route_options.assessment_plan);
|
||||||
frappe.route_options = null;
|
frappe.route_options = null;
|
||||||
}
|
}
|
||||||
@@ -17,12 +16,11 @@ frappe.ui.form.on('Assessment Result Tool', {
|
|||||||
},
|
},
|
||||||
|
|
||||||
assessment_plan: function(frm) {
|
assessment_plan: function(frm) {
|
||||||
if(!(frm.doc.student_batch || frm.doc.student_group)) return;
|
if(!frm.doc.student_group) return;
|
||||||
frappe.call({
|
frappe.call({
|
||||||
method: "erpnext.schools.api.get_assessment_students",
|
method: "erpnext.schools.api.get_assessment_students",
|
||||||
args: {
|
args: {
|
||||||
"assessment_plan": frm.doc.assessment_plan,
|
"assessment_plan": frm.doc.assessment_plan,
|
||||||
"student_batch": frm.doc.student_batch,
|
|
||||||
"student_group": frm.doc.student_group
|
"student_group": frm.doc.student_group
|
||||||
},
|
},
|
||||||
callback: function(r) {
|
callback: function(r) {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"allow_copy": 1,
|
"allow_copy": 1,
|
||||||
|
"allow_guest_to_view": 0,
|
||||||
"allow_import": 0,
|
"allow_import": 0,
|
||||||
"allow_rename": 0,
|
"allow_rename": 0,
|
||||||
"beta": 0,
|
"beta": 0,
|
||||||
@@ -12,6 +13,7 @@
|
|||||||
"engine": "InnoDB",
|
"engine": "InnoDB",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -23,6 +25,7 @@
|
|||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Assessment Plan",
|
"label": "Assessment Plan",
|
||||||
@@ -42,6 +45,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -52,6 +56,7 @@
|
|||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"length": 0,
|
||||||
@@ -69,6 +74,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -79,6 +85,7 @@
|
|||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Student Group",
|
"label": "Student Group",
|
||||||
@@ -92,41 +99,13 @@
|
|||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
"remember_last_selected_value": 0,
|
"remember_last_selected_value": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 1,
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "student_batch",
|
|
||||||
"fieldtype": "Link",
|
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Student Batch",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"options": "Student Batch",
|
|
||||||
"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,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -138,6 +117,7 @@
|
|||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"length": 0,
|
||||||
@@ -155,6 +135,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -165,6 +146,7 @@
|
|||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Result HTML",
|
"label": "Result HTML",
|
||||||
@@ -183,17 +165,17 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"has_web_view": 0,
|
||||||
"hide_heading": 1,
|
"hide_heading": 1,
|
||||||
"hide_toolbar": 1,
|
"hide_toolbar": 1,
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
"image_view": 0,
|
"image_view": 0,
|
||||||
"in_create": 0,
|
"in_create": 0,
|
||||||
"in_dialog": 0,
|
|
||||||
"is_submittable": 0,
|
"is_submittable": 0,
|
||||||
"issingle": 1,
|
"issingle": 1,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2017-01-05 15:45:59.338722",
|
"modified": "2017-05-02 15:12:30.953036",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Schools",
|
"module": "Schools",
|
||||||
"name": "Assessment Result Tool",
|
"name": "Assessment Result Tool",
|
||||||
@@ -210,7 +192,6 @@
|
|||||||
"export": 0,
|
"export": 0,
|
||||||
"if_owner": 0,
|
"if_owner": 0,
|
||||||
"import": 0,
|
"import": 0,
|
||||||
"is_custom": 0,
|
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print": 1,
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
@@ -225,6 +206,7 @@
|
|||||||
"quick_entry": 1,
|
"quick_entry": 1,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"read_only_onload": 0,
|
"read_only_onload": 0,
|
||||||
|
"show_name_in_global_search": 0,
|
||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC",
|
"sort_order": "DESC",
|
||||||
"track_changes": 0,
|
"track_changes": 0,
|
||||||
|
|||||||
@@ -1,114 +0,0 @@
|
|||||||
{
|
|
||||||
"allow_copy": 0,
|
|
||||||
"allow_import": 0,
|
|
||||||
"allow_rename": 0,
|
|
||||||
"beta": 0,
|
|
||||||
"creation": "2015-11-10 16:28:51.366668",
|
|
||||||
"custom": 0,
|
|
||||||
"docstatus": 0,
|
|
||||||
"doctype": "DocType",
|
|
||||||
"document_type": "",
|
|
||||||
"editable_grid": 1,
|
|
||||||
"fields": [
|
|
||||||
{
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"fieldname": "student",
|
|
||||||
"fieldtype": "Link",
|
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 1,
|
|
||||||
"label": "Student",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"options": "Student",
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 1,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"fieldname": "student_name",
|
|
||||||
"fieldtype": "Data",
|
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 1,
|
|
||||||
"label": "Student Name",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 1,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"fieldname": "status",
|
|
||||||
"fieldtype": "Select",
|
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"label": "Status",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"options": "Absent\nPresent\n",
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"unique": 0
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"hide_heading": 0,
|
|
||||||
"hide_toolbar": 0,
|
|
||||||
"idx": 0,
|
|
||||||
"image_view": 0,
|
|
||||||
"in_create": 0,
|
|
||||||
"in_dialog": 0,
|
|
||||||
"is_submittable": 0,
|
|
||||||
"issingle": 0,
|
|
||||||
"istable": 1,
|
|
||||||
"max_attachments": 0,
|
|
||||||
"modified": "2016-07-21 12:30:02.983801",
|
|
||||||
"modified_by": "Administrator",
|
|
||||||
"module": "Schools",
|
|
||||||
"name": "Attendance Tool Student",
|
|
||||||
"name_case": "",
|
|
||||||
"owner": "Administrator",
|
|
||||||
"permissions": [],
|
|
||||||
"quick_entry": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"read_only_onload": 0,
|
|
||||||
"sort_field": "modified",
|
|
||||||
"sort_order": "DESC",
|
|
||||||
"track_seen": 0
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# Copyright (c) 2015, Frappe Technologies and contributors
|
|
||||||
# For license information, please see license.txt
|
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
|
||||||
import frappe
|
|
||||||
from frappe.model.document import Document
|
|
||||||
|
|
||||||
class AttendanceToolStudent(Document):
|
|
||||||
pass
|
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
frappe.provide("schools")
|
frappe.provide("schools")
|
||||||
|
|
||||||
|
cur_frm.add_fetch("student_group", "course", "course")
|
||||||
frappe.ui.form.on("Course Schedule", {
|
frappe.ui.form.on("Course Schedule", {
|
||||||
refresh: function(frm) {
|
refresh: function(frm) {
|
||||||
if (!frm.doc.__islocal) {
|
if (!frm.doc.__islocal) {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"allow_copy": 0,
|
"allow_copy": 0,
|
||||||
|
"allow_guest_to_view": 0,
|
||||||
"allow_import": 1,
|
"allow_import": 1,
|
||||||
"allow_rename": 0,
|
"allow_rename": 0,
|
||||||
"autoname": "naming_series:",
|
"autoname": "naming_series:",
|
||||||
@@ -13,36 +14,7 @@
|
|||||||
"engine": "InnoDB",
|
"engine": "InnoDB",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "student_batch",
|
|
||||||
"fieldtype": "Link",
|
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 1,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Student Batch",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"options": "Student Batch",
|
|
||||||
"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,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -67,12 +39,13 @@
|
|||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"remember_last_selected_value": 0,
|
"remember_last_selected_value": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 1,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -103,6 +76,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -133,6 +107,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -161,6 +136,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -192,6 +168,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -222,6 +199,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -250,6 +228,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -280,6 +259,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -310,6 +290,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -338,6 +319,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -367,6 +349,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -396,6 +379,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -425,18 +409,18 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"has_web_view": 0,
|
||||||
"hide_heading": 0,
|
"hide_heading": 0,
|
||||||
"hide_toolbar": 0,
|
"hide_toolbar": 0,
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
"image_view": 0,
|
"image_view": 0,
|
||||||
"in_create": 0,
|
"in_create": 0,
|
||||||
"in_dialog": 0,
|
|
||||||
"is_submittable": 0,
|
"is_submittable": 0,
|
||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"menu_index": 0,
|
"menu_index": 0,
|
||||||
"modified": "2017-02-17 17:14:46.074804",
|
"modified": "2017-05-02 12:12:35.785061",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Schools",
|
"module": "Schools",
|
||||||
"name": "Course Schedule",
|
"name": "Course Schedule",
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ class CourseSchedule(Document):
|
|||||||
def validate(self):
|
def validate(self):
|
||||||
self.instructor_name = frappe.db.get_value("Instructor", self.instructor, "instructor_name")
|
self.instructor_name = frappe.db.get_value("Instructor", self.instructor, "instructor_name")
|
||||||
self.set_title()
|
self.set_title()
|
||||||
self.validate_mandatory()
|
|
||||||
self.validate_course()
|
self.validate_course()
|
||||||
self.validate_date()
|
self.validate_date()
|
||||||
self.validate_overlap()
|
self.validate_overlap()
|
||||||
@@ -20,17 +19,10 @@ class CourseSchedule(Document):
|
|||||||
"""Set document Title"""
|
"""Set document Title"""
|
||||||
self.title = self.course + " by " + (self.instructor_name if self.instructor_name else self.instructor)
|
self.title = self.course + " by " + (self.instructor_name if self.instructor_name else self.instructor)
|
||||||
|
|
||||||
def validate_mandatory(self):
|
|
||||||
if not (self.student_batch or self.student_group):
|
|
||||||
frappe.throw(_("""Student Batch or Student Group is mandatory"""))
|
|
||||||
|
|
||||||
def validate_course(self):
|
def validate_course(self):
|
||||||
if self.student_group:
|
group_based_on, course = frappe.db.get_value("Student Group", self.student_group, ["group_based_on", "course"])
|
||||||
self.course= frappe.db.get_value("Student Group", self.student_group, "course")
|
if group_based_on == "Course":
|
||||||
|
self.course = course
|
||||||
def set_student_batch(self):
|
|
||||||
if self.student_group:
|
|
||||||
self.student_batch = frappe.db.get_value("Student Group", self.student_group, "student_batch")
|
|
||||||
|
|
||||||
def validate_date(self):
|
def validate_date(self):
|
||||||
"""Validates if from_time is greater than to_time"""
|
"""Validates if from_time is greater than to_time"""
|
||||||
@@ -38,14 +30,11 @@ class CourseSchedule(Document):
|
|||||||
frappe.throw(_("From Time cannot be greater than To Time."))
|
frappe.throw(_("From Time cannot be greater than To Time."))
|
||||||
|
|
||||||
def validate_overlap(self):
|
def validate_overlap(self):
|
||||||
"""Validates overlap for Student Group/Student Batch, Instructor, Room"""
|
"""Validates overlap for Student Group, Instructor, Room"""
|
||||||
|
|
||||||
from erpnext.schools.utils import validate_overlap_for
|
from erpnext.schools.utils import validate_overlap_for
|
||||||
|
|
||||||
#Validate overlapping course schedules.
|
#Validate overlapping course schedules.
|
||||||
if self.student_batch:
|
|
||||||
validate_overlap_for(self, "Course Schedule", "student_batch")
|
|
||||||
|
|
||||||
if self.student_group:
|
if self.student_group:
|
||||||
validate_overlap_for(self, "Course Schedule", "student_group")
|
validate_overlap_for(self, "Course Schedule", "student_group")
|
||||||
|
|
||||||
@@ -53,9 +42,6 @@ class CourseSchedule(Document):
|
|||||||
validate_overlap_for(self, "Course Schedule", "room")
|
validate_overlap_for(self, "Course Schedule", "room")
|
||||||
|
|
||||||
#validate overlapping assessment schedules.
|
#validate overlapping assessment schedules.
|
||||||
if self.student_batch:
|
|
||||||
validate_overlap_for(self, "Assessment Plan", "student_batch")
|
|
||||||
|
|
||||||
if self.student_group:
|
if self.student_group:
|
||||||
validate_overlap_for(self, "Assessment Plan", "student_group")
|
validate_overlap_for(self, "Assessment Plan", "student_group")
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
// For license information, please see license.txt
|
// For license information, please see license.txt
|
||||||
|
|
||||||
cur_frm.add_fetch("student_group", "program", "program");
|
cur_frm.add_fetch("student_group", "program", "program");
|
||||||
cur_frm.add_fetch("student_group", "student_batch", "student_batch");
|
|
||||||
cur_frm.add_fetch("student_group", "course", "course");
|
cur_frm.add_fetch("student_group", "course", "course");
|
||||||
cur_frm.add_fetch("student_group", "academic_year", "academic_year");
|
cur_frm.add_fetch("student_group", "academic_year", "academic_year");
|
||||||
cur_frm.add_fetch("student_group", "academic_term", "academic_term");
|
cur_frm.add_fetch("student_group", "academic_term", "academic_term");
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user