Merge branch 'develop' into item-min-qty

This commit is contained in:
Marica
2020-01-03 12:13:00 +05:30
committed by GitHub
69 changed files with 3758 additions and 12695 deletions

View File

@@ -911,7 +911,10 @@ def get_payment_entry(dt, dn, party_amount=None, bank_account=None, bank_amount=
else: else:
party_account = get_party_account(party_type, doc.get(party_type.lower()), doc.company) party_account = get_party_account(party_type, doc.get(party_type.lower()), doc.company)
party_account_currency = doc.get("party_account_currency") or get_account_currency(party_account) if dt not in ("Sales Invoice", "Purchase Invoice"):
party_account_currency = get_account_currency(party_account)
else:
party_account_currency = doc.get("party_account_currency") or get_account_currency(party_account)
# payment type # payment type
if (dt == "Sales Order" or (dt in ("Sales Invoice", "Fees") and doc.outstanding_amount > 0)) \ if (dt == "Sales Order" or (dt in ("Sales Invoice", "Fees") and doc.outstanding_amount > 0)) \

View File

@@ -495,7 +495,7 @@ def get_pricing_rule_items(pr_doc):
if pr_doc.apply_rule_on_other: if pr_doc.apply_rule_on_other:
apply_on = frappe.scrub(pr_doc.apply_rule_on_other) apply_on = frappe.scrub(pr_doc.apply_rule_on_other)
apply_on_data.append(pr_doc.get(apply_on)) apply_on_data.append(pr_doc.get("other_" + apply_on))
return list(set(apply_on_data)) return list(set(apply_on_data))

View File

@@ -707,7 +707,7 @@
}, },
{ {
"fieldname": "other_charges_calculation", "fieldname": "other_charges_calculation",
"fieldtype": "Text", "fieldtype": "Long Text",
"label": "Taxes and Charges Calculation", "label": "Taxes and Charges Calculation",
"no_copy": 1, "no_copy": 1,
"oldfieldtype": "HTML", "oldfieldtype": "HTML",
@@ -1290,7 +1290,7 @@
"idx": 204, "idx": 204,
"is_submittable": 1, "is_submittable": 1,
"links": [], "links": [],
"modified": "2019-12-24 12:51:58.613538", "modified": "2019-12-30 19:13:49.610538",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Accounts", "module": "Accounts",
"name": "Purchase Invoice", "name": "Purchase Invoice",

View File

@@ -1,4 +1,5 @@
{ {
"actions": [],
"allow_import": 1, "allow_import": 1,
"autoname": "naming_series:", "autoname": "naming_series:",
"creation": "2013-05-24 19:29:05", "creation": "2013-05-24 19:29:05",
@@ -774,7 +775,7 @@
}, },
{ {
"fieldname": "other_charges_calculation", "fieldname": "other_charges_calculation",
"fieldtype": "Text", "fieldtype": "Long Text",
"label": "Taxes and Charges Calculation", "label": "Taxes and Charges Calculation",
"no_copy": 1, "no_copy": 1,
"oldfieldtype": "HTML", "oldfieldtype": "HTML",
@@ -1567,7 +1568,8 @@
"icon": "fa fa-file-text", "icon": "fa fa-file-text",
"idx": 181, "idx": 181,
"is_submittable": 1, "is_submittable": 1,
"modified": "2019-10-05 21:39:49.235990", "links": [],
"modified": "2019-12-30 19:15:59.580414",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Accounts", "module": "Accounts",
"name": "Sales Invoice", "name": "Sales Invoice",

View File

@@ -355,7 +355,8 @@ class SalesInvoice(SellingController):
"print_format": print_format, "print_format": print_format,
"allow_edit_rate": pos.get("allow_user_to_edit_rate"), "allow_edit_rate": pos.get("allow_user_to_edit_rate"),
"allow_edit_discount": pos.get("allow_user_to_edit_discount"), "allow_edit_discount": pos.get("allow_user_to_edit_discount"),
"campaign": pos.get("campaign") "campaign": pos.get("campaign"),
"allow_print_before_pay": pos.get("allow_print_before_pay")
} }
def update_time_sheet(self, sales_invoice): def update_time_sheet(self, sales_invoice):

View File

@@ -49,7 +49,7 @@
{% endfor %} {% endfor %}
<tr> <tr>
<td class="right" colspan="3" ><strong>Total (debit) </strong></td> <td class="right" colspan="3" ><strong>Total (debit) </strong></td>
<td class="left" >{{ gl | sum(attribute='debit') }}</td> <td class="left" >{{ frappe.format((gl | sum(attribute="debit")), {fieldtype: "Currency"}) }}</td>
</tr> </tr>
<tr> <tr>
<td class="top-bottom" colspan="5"><strong>Credit</strong></td> <td class="top-bottom" colspan="5"><strong>Credit</strong></td>
@@ -69,7 +69,7 @@
{% endfor %} {% endfor %}
<tr> <tr>
<td class="right" colspan="3"><strong>Total (credit) </strong></td> <td class="right" colspan="3"><strong>Total (credit) </strong></td>
<td class="left" >{{ gl | sum(attribute='credit') }}</td> <td class="left" >{{ frappe.format((gl | sum(attribute="credit")), {fieldtype: "Currency"}) }}</td>
</tr> </tr>
</table> </table>
<div> <div>

View File

@@ -33,7 +33,7 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for(var i=0, l=data.length-1; i<l; i++) { %} {% for(var i=0, l=data.length; i<l; i++) { %}
<tr> <tr>
{% if(data[i].posting_date) { %} {% if(data[i].posting_date) { %}
<td>{%= frappe.datetime.str_to_user(data[i].posting_date) %}</td> <td>{%= frappe.datetime.str_to_user(data[i].posting_date) %}</td>

View File

@@ -134,7 +134,7 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend(
if (doc.status != "On Hold") { if (doc.status != "On Hold") {
if(flt(doc.per_received, 2) < 100 && allow_receipt) { if(flt(doc.per_received, 2) < 100 && allow_receipt) {
cur_frm.add_custom_button(__('Receipt'), this.make_purchase_receipt, __('Create')); cur_frm.add_custom_button(__('Receipt'), this.make_purchase_receipt, __('Create'));
if(doc.is_subcontracted==="Yes") { if(doc.is_subcontracted==="Yes" && me.has_unsupplied_items()) {
cur_frm.add_custom_button(__('Material to Supplier'), cur_frm.add_custom_button(__('Material to Supplier'),
function() { me.make_stock_entry(); }, __("Transfer")); function() { me.make_stock_entry(); }, __("Transfer"));
} }
@@ -191,6 +191,10 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend(
set_schedule_date(this.frm); set_schedule_date(this.frm);
}, },
has_unsupplied_items: function() {
return this.frm.doc['supplied_items'].some(item => item.required_qty != item.supplied_qty)
},
make_stock_entry: function() { make_stock_entry: function() {
var items = $.map(cur_frm.doc.items, function(d) { return d.bom ? d.item_code : false; }); var items = $.map(cur_frm.doc.items, function(d) { return d.bom ? d.item_code : false; });
var me = this; var me = this;
@@ -267,7 +271,7 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend(
if (me.frm.doc['supplied_items']) { if (me.frm.doc['supplied_items']) {
me.frm.doc['supplied_items'].forEach((item, index) => { me.frm.doc['supplied_items'].forEach((item, index) => {
if (item.rm_item_code && item.main_item_code) { if (item.rm_item_code && item.main_item_code && item.required_qty - item.supplied_qty != 0) {
me.raw_material_data.push ({ me.raw_material_data.push ({
'name':item.name, 'name':item.name,
'item_code': item.main_item_code, 'item_code': item.main_item_code,

View File

@@ -610,7 +610,7 @@
}, },
{ {
"fieldname": "other_charges_calculation", "fieldname": "other_charges_calculation",
"fieldtype": "Text", "fieldtype": "Long Text",
"label": "Taxes and Charges Calculation", "label": "Taxes and Charges Calculation",
"no_copy": 1, "no_copy": 1,
"oldfieldtype": "HTML", "oldfieldtype": "HTML",
@@ -1055,7 +1055,7 @@
"idx": 105, "idx": 105,
"is_submittable": 1, "is_submittable": 1,
"links": [], "links": [],
"modified": "2019-12-24 12:44:13.137194", "modified": "2019-12-30 19:11:54.122264",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Buying", "module": "Buying",
"name": "Purchase Order", "name": "Purchase Order",

View File

@@ -336,6 +336,18 @@ def get_data():
"is_query_report": True, "is_query_report": True,
"name": "Item Variant Details", "name": "Item Variant Details",
"doctype": "Item" "doctype": "Item"
},
{
"type": "report",
"is_query_report": True,
"name": "Subcontracted Raw Materials To Be Transferred",
"doctype": "Purchase Order"
},
{
"type": "report",
"is_query_report": True,
"name": "Subcontracted Item To Be Received",
"doctype": "Purchase Order"
} }
] ]
}, },

View File

@@ -1163,8 +1163,13 @@ def check_and_delete_children(parent, data):
deleted_children.append(item) deleted_children.append(item)
for d in deleted_children: for d in deleted_children:
if parent.doctype == "Sales Order" and flt(d.delivered_qty): if parent.doctype == "Sales Order":
frappe.throw(_("Row #{0}: Cannot delete item {1} which has already been delivered").format(d.idx, d.item_code)) if flt(d.delivered_qty):
frappe.throw(_("Row #{0}: Cannot delete item {1} which has already been delivered").format(d.idx, d.item_code))
if flt(d.work_order_qty):
frappe.throw(_("Row #{0}: Cannot delete item {1} which has work order assigned to it.").format(d.idx, d.item_code))
if flt(d.ordered_qty):
frappe.throw(_("Row #{0}: Cannot delete item {1} which is assigned to customer's purchase order.").format(d.idx, d.item_code))
if parent.doctype == "Purchase Order" and flt(d.received_qty): if parent.doctype == "Purchase Order" and flt(d.received_qty):
frappe.throw(_("Row #{0}: Cannot delete item {1} which has already been received").format(d.idx, d.item_code)) frappe.throw(_("Row #{0}: Cannot delete item {1} which has already been received").format(d.idx, d.item_code))

View File

@@ -20,6 +20,7 @@ class StockController(AccountsController):
def validate(self): def validate(self):
super(StockController, self).validate() super(StockController, self).validate()
self.validate_inspection() self.validate_inspection()
self.validate_serialized_batch()
def make_gl_entries(self, gl_entries=None, repost_future_gle=True, from_repost=False): def make_gl_entries(self, gl_entries=None, repost_future_gle=True, from_repost=False):
if self.docstatus == 2: if self.docstatus == 2:
@@ -42,6 +43,17 @@ class StockController(AccountsController):
gl_entries = self.get_asset_gl_entry(gl_entries) gl_entries = self.get_asset_gl_entry(gl_entries)
make_gl_entries(gl_entries, from_repost=from_repost) make_gl_entries(gl_entries, from_repost=from_repost)
def validate_serialized_batch(self):
from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos
for d in self.get("items"):
if hasattr(d, 'serial_no') and hasattr(d, 'batch_no') and d.serial_no and d.batch_no:
serial_nos = get_serial_nos(d.serial_no)
for serial_no_data in frappe.get_all("Serial No",
filters={"name": ("in", serial_nos)}, fields=["batch_no", "name"]):
if serial_no_data.batch_no != d.batch_no:
frappe.throw(_("Row #{0}: Serial No {1} does not belong to Batch {2}")
.format(d.idx, serial_no_data.name, d.batch_no))
def get_gl_entries(self, warehouse_account=None, default_expense_account=None, def get_gl_entries(self, warehouse_account=None, default_expense_account=None,
default_cost_center=None): default_cost_center=None):

View File

@@ -1,560 +1,173 @@
{ {
"allow_copy": 0, "actions": [],
"allow_events_in_timeline": 0, "allow_import": 1,
"allow_guest_to_view": 0, "autoname": "naming_series:",
"allow_import": 1, "creation": "2018-05-10 12:04:08.396461",
"allow_rename": 0, "doctype": "DocType",
"autoname": "naming_series:", "editable_grid": 1,
"beta": 0, "engine": "InnoDB",
"creation": "2018-05-10 12:04:08.396461", "field_order": [
"custom": 0, "naming_series",
"docstatus": 0, "employee",
"doctype": "DocType", "employee_name",
"document_type": "", "salary_component",
"editable_grid": 1, "overwrite_salary_structure_amount",
"engine": "InnoDB", "deduct_full_tax_on_selected_payroll_date",
"column_break_5",
"company",
"payroll_date",
"salary_slip",
"type",
"department",
"amount",
"amended_from"
],
"fields": [ "fields": [
{ {
"allow_bulk_edit": 0, "fieldname": "naming_series",
"allow_in_quick_entry": 0, "fieldtype": "Select",
"allow_on_submit": 0, "label": "Series",
"bold": 0, "options": "HR-ADS-.YY.-.MM.-",
"collapsible": 0, "reqd": 1
"columns": 0, },
"default": "",
"fetch_if_empty": 0,
"fieldname": "naming_series",
"fieldtype": "Select",
"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": "Series",
"length": 0,
"no_copy": 0,
"options": "HR-ADS-.YY.-.MM.-",
"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,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "employee",
"allow_in_quick_entry": 0, "fieldtype": "Link",
"allow_on_submit": 0, "in_list_view": 1,
"bold": 0, "in_standard_filter": 1,
"collapsible": 0, "label": "Employee",
"columns": 0, "options": "Employee",
"fetch_if_empty": 0, "reqd": 1,
"fieldname": "employee", "search_index": 1
"fieldtype": "Link", },
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Employee",
"length": 0,
"no_copy": 0,
"options": "Employee",
"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": 1,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "salary_component",
"allow_in_quick_entry": 0, "fieldtype": "Link",
"allow_on_submit": 0, "in_list_view": 1,
"bold": 0, "in_standard_filter": 1,
"collapsible": 0, "label": "Salary Component",
"columns": 0, "options": "Salary Component",
"fetch_if_empty": 0, "reqd": 1,
"fieldname": "salary_component", "search_index": 1
"fieldtype": "Link", },
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Salary Component",
"length": 0,
"no_copy": 0,
"options": "Salary Component",
"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": 1,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "amount",
"allow_in_quick_entry": 0, "fieldtype": "Currency",
"allow_on_submit": 0, "in_list_view": 1,
"bold": 0, "label": "Amount",
"collapsible": 0, "reqd": 1
"columns": 0, },
"fetch_if_empty": 0,
"fieldname": "amount",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Amount",
"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,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "default": "1",
"allow_in_quick_entry": 0, "fieldname": "overwrite_salary_structure_amount",
"allow_on_submit": 0, "fieldtype": "Check",
"bold": 0, "label": "Overwrite Salary Structure Amount"
"collapsible": 0, },
"columns": 0,
"default": "1",
"fetch_if_empty": 0,
"fieldname": "overwrite_salary_structure_amount",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Overwrite Salary Structure Amount",
"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,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "default": "0",
"allow_in_quick_entry": 0, "fieldname": "deduct_full_tax_on_selected_payroll_date",
"allow_on_submit": 0, "fieldtype": "Check",
"bold": 0, "label": "Deduct Full Tax on Selected Payroll Date"
"collapsible": 0, },
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "deduct_full_tax_on_selected_payroll_date",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Deduct Full Tax on Selected Payroll Date",
"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,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "column_break_5",
"allow_in_quick_entry": 0, "fieldtype": "Column Break"
"allow_on_submit": 0, },
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "column_break_5",
"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,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "description": "Date on which this component is applied",
"allow_in_quick_entry": 0, "fieldname": "payroll_date",
"allow_on_submit": 0, "fieldtype": "Date",
"bold": 0, "in_list_view": 1,
"collapsible": 0, "label": "Payroll Date",
"columns": 0, "reqd": 1,
"default": "", "search_index": 1
"description": "Date on which this component is applied", },
"fetch_if_empty": 0,
"fieldname": "payroll_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Payroll Date",
"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": 1,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fetch_from": "employee.employee_name",
"allow_in_quick_entry": 0, "fieldname": "employee_name",
"allow_on_submit": 0, "fieldtype": "Data",
"bold": 0, "in_list_view": 1,
"collapsible": 0, "label": "Employee Name",
"columns": 0, "read_only": 1
"fetch_from": "employee.employee_name", },
"fetch_if_empty": 0,
"fieldname": "employee_name",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Employee Name",
"length": 0,
"no_copy": 0,
"options": "",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fetch_from": "employee.department",
"allow_in_quick_entry": 0, "fieldname": "department",
"allow_on_submit": 0, "fieldtype": "Link",
"bold": 0, "label": "Department",
"collapsible": 0, "options": "Department",
"columns": 0, "read_only": 1
"fetch_from": "employee.department", },
"fetch_if_empty": 0,
"fieldname": "department",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Department",
"length": 0,
"no_copy": 0,
"options": "Department",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "company",
"allow_in_quick_entry": 0, "fieldtype": "Link",
"allow_on_submit": 0, "label": "Company",
"bold": 0, "options": "Company",
"collapsible": 0, "reqd": 1
"columns": 0, },
"fetch_if_empty": 0,
"fieldname": "company",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Company",
"length": 0,
"no_copy": 0,
"options": "Company",
"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,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "salary_slip",
"allow_in_quick_entry": 0, "fieldtype": "Link",
"allow_on_submit": 0, "label": "Salary Slip",
"bold": 0, "options": "Salary Slip",
"collapsible": 0, "read_only": 1
"columns": 0, },
"fetch_if_empty": 0,
"fieldname": "salary_slip",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Salary Slip",
"length": 0,
"no_copy": 0,
"options": "Salary Slip",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fetch_from": "salary_component.type",
"allow_in_quick_entry": 0, "fieldname": "type",
"allow_on_submit": 0, "fieldtype": "Data",
"bold": 0, "label": "Salary Component Type",
"collapsible": 0, "read_only": 1
"columns": 0, },
"fetch_from": "salary_component.type",
"fetch_if_empty": 0,
"fieldname": "type",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Salary Component Type",
"length": 0,
"no_copy": 0,
"options": "",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "amended_from",
"allow_in_quick_entry": 0, "fieldtype": "Link",
"allow_on_submit": 0, "label": "Amended From",
"bold": 0, "no_copy": 1,
"collapsible": 0, "options": "Additional Salary",
"columns": 0, "print_hide": 1,
"fetch_if_empty": 0, "read_only": 1
"fieldname": "amended_from",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
"length": 0,
"no_copy": 1,
"options": "Additional Salary",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
} }
], ],
"has_web_view": 0, "is_submittable": 1,
"hide_heading": 0, "links": [],
"hide_toolbar": 0, "modified": "2019-12-12 19:07:23.635901",
"idx": 0, "modified_by": "Administrator",
"image_view": 0, "module": "HR",
"in_create": 0, "name": "Additional Salary",
"is_submittable": 1, "owner": "Administrator",
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2019-05-09 19:53:37.475839",
"modified_by": "Administrator",
"module": "HR",
"name": "Additional Salary",
"name_case": "",
"owner": "Administrator",
"permissions": [ "permissions": [
{ {
"amend": 1, "amend": 1,
"cancel": 1, "cancel": 1,
"create": 1, "create": 1,
"delete": 1, "delete": 1,
"email": 1, "email": 1,
"export": 1, "export": 1,
"if_owner": 0, "print": 1,
"import": 0, "read": 1,
"permlevel": 0, "report": 1,
"print": 1, "role": "System Manager",
"read": 1, "share": 1,
"report": 1, "submit": 1,
"role": "System Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 1,
"write": 1 "write": 1
}, },
{ {
"amend": 0, "create": 1,
"cancel": 0, "delete": 1,
"create": 1, "email": 1,
"delete": 1, "export": 1,
"email": 1, "print": 1,
"export": 1, "read": 1,
"if_owner": 0, "report": 1,
"import": 0, "role": "HR User",
"permlevel": 0, "share": 1,
"print": 1, "submit": 1,
"read": 1,
"report": 1,
"role": "HR User",
"set_user_permissions": 0,
"share": 1,
"submit": 1,
"write": 1 "write": 1
} }
], ],
"quick_entry": 0, "sort_field": "modified",
"read_only": 0, "sort_order": "DESC",
"read_only_onload": 0, "title_field": "employee",
"show_name_in_global_search": 0, "track_changes": 1
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "employee",
"track_changes": 1,
"track_seen": 0,
"track_views": 0
} }

View File

@@ -7,7 +7,8 @@ import frappe
from frappe.utils import getdate, nowdate from frappe.utils import getdate, nowdate
from frappe import _ from frappe import _
from frappe.model.document import Document from frappe.model.document import Document
from frappe.utils import cstr from frappe.utils import cstr, get_datetime, get_datetime_str
from frappe.utils import update_progress_bar
class Attendance(Document): class Attendance(Document):
def validate_duplicate_record(self): def validate_duplicate_record(self):
@@ -89,17 +90,85 @@ def add_attendance(events, start, end, conditions=None):
if e not in events: if e not in events:
events.append(e) events.append(e)
def mark_absent(employee, attendance_date, shift=None): def mark_attendance(employee, attendance_date, status, shift=None):
employee_doc = frappe.get_doc('Employee', employee) employee_doc = frappe.get_doc('Employee', employee)
if not frappe.db.exists('Attendance', {'employee':employee, 'attendance_date':attendance_date, 'docstatus':('!=', '2')}): if not frappe.db.exists('Attendance', {'employee':employee, 'attendance_date':attendance_date, 'docstatus':('!=', '2')}):
doc_dict = { doc_dict = {
'doctype': 'Attendance', 'doctype': 'Attendance',
'employee': employee, 'employee': employee,
'attendance_date': attendance_date, 'attendance_date': attendance_date,
'status': 'Absent', 'status': status,
'company': employee_doc.company, 'company': employee_doc.company,
'shift': shift 'shift': shift
} }
attendance = frappe.get_doc(doc_dict).insert() attendance = frappe.get_doc(doc_dict).insert()
attendance.submit() attendance.submit()
return attendance.name return attendance.name
@frappe.whitelist()
def mark_bulk_attendance(data):
import json
from pprint import pprint
if isinstance(data, frappe.string_types):
data = json.loads(data)
data = frappe._dict(data)
company = frappe.get_value('Employee', data.employee, 'company')
for date in data.unmarked_days:
doc_dict = {
'doctype': 'Attendance',
'employee': data.employee,
'attendance_date': get_datetime(date),
'status': data.status,
'company': company,
}
attendance = frappe.get_doc(doc_dict).insert()
attendance.submit()
def get_month_map():
return frappe._dict({
"January": 1,
"February": 2,
"March": 3,
"April": 4,
"May": 5,
"June": 6,
"July": 7,
"August": 8,
"September": 9,
"October": 10,
"November": 11,
"December": 12
})
@frappe.whitelist()
def get_unmarked_days(employee, month):
import calendar
month_map = get_month_map()
today = get_datetime()
dates_of_month = ['{}-{}-{}'.format(today.year, month_map[month], r) for r in range(1, calendar.monthrange(today.year, month_map[month])[1] + 1)]
length = len(dates_of_month)
month_start, month_end = dates_of_month[0], dates_of_month[length-1]
records = frappe.get_all("Attendance", fields = ['attendance_date', 'employee'] , filters = [
["attendance_date", ">", month_start],
["attendance_date", "<", month_end],
["employee", "=", employee],
["docstatus", "!=", 2]
])
marked_days = [get_datetime(record.attendance_date) for record in records]
unmarked_days = []
for date in dates_of_month:
date_time = get_datetime(date)
if today.day == date_time.day and today.month == date_time.month:
break
if date_time not in marked_days:
unmarked_days.append(date)
return unmarked_days

View File

@@ -2,5 +2,105 @@ frappe.listview_settings['Attendance'] = {
add_fields: ["status", "attendance_date"], add_fields: ["status", "attendance_date"],
get_indicator: function(doc) { get_indicator: function(doc) {
return [__(doc.status), doc.status=="Present" ? "green" : "darkgrey", "status,=," + doc.status]; return [__(doc.status), doc.status=="Present" ? "green" : "darkgrey", "status,=," + doc.status];
},
onload: function(list_view) {
let me = this;
const months = moment.months()
list_view.page.add_inner_button( __("Mark Attendance"), function(){
let dialog = new frappe.ui.Dialog({
title: __("Mark Attendance"),
fields: [
{
fieldname: 'employee',
label: __('For Employee'),
fieldtype: 'Link',
options: 'Employee',
reqd: 1,
onchange: function(){
dialog.set_df_property("unmarked_days", "hidden", 1);
dialog.set_df_property("status", "hidden", 1);
dialog.set_df_property("month", "value", '');
dialog.set_df_property("unmarked_days", "options", []);
}
},
{
label: __("For Month"),
fieldtype: "Select",
fieldname: "month",
options: months,
reqd: 1,
onchange: function(){
if(dialog.fields_dict.employee.value && dialog.fields_dict.month.value) {
dialog.set_df_property("status", "hidden", 0);
dialog.set_df_property("unmarked_days", "options", []);
me.get_multi_select_options(dialog.fields_dict.employee.value, dialog.fields_dict.month.value).then(options =>{
dialog.set_df_property("unmarked_days", "hidden", 0);
dialog.set_df_property("unmarked_days", "options", options);
});
}
}
},
{
label: __("Status"),
fieldtype: "Select",
fieldname: "status",
options: ["Present", "Absent", "Half Day"],
hidden:1,
reqd: 1,
},
{
label: __("Unmarked Attendance for days"),
fieldname: "unmarked_days",
fieldtype: "MultiCheck",
options: [],
columns: 2,
hidden: 1
},
],
primary_action(data){
frappe.confirm(__('Mark attendance as <b>' + data.status + '</b> for <b>' + data.month +'</b>' + ' on selected dates?'), () => {
frappe.call({
method: "erpnext.hr.doctype.attendance.attendance.mark_bulk_attendance",
args: {
data : data
},
callback: function(r) {
if(r.message === 1) {
frappe.show_alert({message:__("Attendance Marked"), indicator:'blue'});
cur_dialog.hide();
}
}
});
});
dialog.hide();
list_view.refresh();
},
primary_action_label: __('Mark Attendance')
});
dialog.show();
});
},
get_multi_select_options: function(employee, month){
return new Promise(resolve => {
frappe.call({
method: 'erpnext.hr.doctype.attendance.attendance.get_unmarked_days',
async: false,
args:{
employee: employee,
month: month,
}
}).then(r => {
var options = [];
for(var d in r.message){
var momentObj = moment(r.message[d], 'YYYY-MM-DD');
var date = momentObj.format('DD-MM-YYYY');
options.push({ "label":date, "value": r.message[d] , "checked": 1});
}
resolve(options);
});
});
} }
}; };

View File

@@ -14,7 +14,7 @@ class TestAttendance(unittest.TestCase):
employee = make_employee("test_mark_absent@example.com") employee = make_employee("test_mark_absent@example.com")
date = nowdate() date = nowdate()
frappe.db.delete('Attendance', {'employee':employee, 'attendance_date':date}) frappe.db.delete('Attendance', {'employee':employee, 'attendance_date':date})
from erpnext.hr.doctype.attendance.attendance import mark_absent from erpnext.hr.doctype.attendance.attendance import mark_attendance
attendance = mark_absent(employee, date) attendance = mark_attendance(employee, date, 'Absent')
fetch_attendance = frappe.get_value('Attendance', {'employee':employee, 'attendance_date':date, 'status':'Absent'}) fetch_attendance = frappe.get_value('Attendance', {'employee':employee, 'attendance_date':date, 'status':'Absent'})
self.assertEqual(attendance, fetch_attendance) self.assertEqual(attendance, fetch_attendance)

View File

@@ -1,575 +1,190 @@
{ {
"allow_copy": 0, "actions": [],
"allow_guest_to_view": 0, "allow_import": 1,
"allow_import": 1, "allow_rename": 1,
"allow_rename": 1, "autoname": "HR-ARQ-.YY.-.MM.-.#####",
"autoname": "HR-ARQ-.YY.-.MM.-.#####", "creation": "2018-04-13 15:37:40.918990",
"beta": 0, "doctype": "DocType",
"creation": "2018-04-13 15:37:40.918990", "editable_grid": 1,
"custom": 0, "engine": "InnoDB",
"docstatus": 0, "field_order": [
"doctype": "DocType", "employee",
"document_type": "", "employee_name",
"editable_grid": 1, "department",
"engine": "InnoDB", "column_break_5",
"company",
"from_date",
"to_date",
"half_day",
"half_day_date",
"reason_section",
"reason",
"column_break_4",
"explanation",
"amended_from"
],
"fields": [ "fields": [
{ {
"allow_bulk_edit": 0, "fieldname": "employee",
"allow_in_quick_entry": 0, "fieldtype": "Link",
"allow_on_submit": 0, "in_list_view": 1,
"bold": 0, "label": "Employee",
"collapsible": 0, "options": "Employee",
"columns": 0, "reqd": 1
"fieldname": "employee", },
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Employee",
"length": 0,
"no_copy": 0,
"options": "Employee",
"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,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fetch_from": "employee.employee_name",
"allow_in_quick_entry": 0, "fieldname": "employee_name",
"allow_on_submit": 0, "fieldtype": "Data",
"bold": 0, "label": "Employee Name",
"collapsible": 0, "read_only": 1
"columns": 0, },
"fetch_from": "employee.employee_name",
"fieldname": "employee_name",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Employee Name",
"length": 0,
"no_copy": 0,
"options": "",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fetch_from": "employee.department",
"allow_in_quick_entry": 0, "fieldname": "department",
"allow_on_submit": 0, "fieldtype": "Link",
"bold": 0, "label": "Department",
"collapsible": 0, "options": "Department",
"columns": 0, "read_only": 1
"fetch_from": "employee.department", },
"fieldname": "department",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Department",
"length": 0,
"no_copy": 0,
"options": "Department",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "company",
"allow_in_quick_entry": 0, "fieldtype": "Link",
"allow_on_submit": 0, "label": "Company",
"bold": 0, "options": "Company",
"collapsible": 0, "remember_last_selected_value": 1,
"columns": 0, "reqd": 1
"fieldname": "company", },
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Company",
"length": 0,
"no_copy": 0,
"options": "Company",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 1,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "column_break_5",
"allow_in_quick_entry": 0, "fieldtype": "Column Break"
"allow_on_submit": 0, },
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "column_break_5",
"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,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "from_date",
"allow_in_quick_entry": 0, "fieldtype": "Date",
"allow_on_submit": 0, "in_list_view": 1,
"bold": 0, "label": "From Date",
"collapsible": 0, "reqd": 1
"columns": 0, },
"fieldname": "from_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "From Date",
"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,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "to_date",
"allow_in_quick_entry": 0, "fieldtype": "Date",
"allow_on_submit": 0, "in_list_view": 1,
"bold": 0, "label": "To Date",
"collapsible": 0, "reqd": 1
"columns": 0, },
"fieldname": "to_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "To Date",
"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,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "default": "0",
"allow_in_quick_entry": 0, "fieldname": "half_day",
"allow_on_submit": 0, "fieldtype": "Check",
"bold": 0, "label": "Half Day"
"collapsible": 0, },
"columns": 0,
"fieldname": "half_day",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Half Day",
"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,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "depends_on": "half_day",
"allow_in_quick_entry": 0, "fieldname": "half_day_date",
"allow_on_submit": 0, "fieldtype": "Date",
"bold": 0, "label": "Half Day Date"
"collapsible": 0, },
"columns": 0,
"depends_on": "half_day",
"fieldname": "half_day_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Half Day Date",
"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,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "reason_section",
"allow_in_quick_entry": 0, "fieldtype": "Section Break",
"allow_on_submit": 0, "label": "Reason"
"bold": 0, },
"collapsible": 0,
"columns": 0,
"fieldname": "reason_section",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Reason",
"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,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "reason",
"allow_in_quick_entry": 0, "fieldtype": "Select",
"allow_on_submit": 0, "in_list_view": 1,
"bold": 0, "label": "Reason",
"collapsible": 0, "options": "Work From Home\nOn Duty",
"columns": 0, "reqd": 1
"fieldname": "reason", },
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Reason",
"length": 0,
"no_copy": 0,
"options": "Work From Home\nOn Duty",
"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,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "column_break_4",
"allow_in_quick_entry": 0, "fieldtype": "Column Break"
"allow_on_submit": 0, },
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "column_break_4",
"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,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "explanation",
"allow_in_quick_entry": 0, "fieldtype": "Small Text",
"allow_on_submit": 0, "label": "Explanation"
"bold": 0, },
"collapsible": 0,
"columns": 0,
"fieldname": "explanation",
"fieldtype": "Small Text",
"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": "Explanation",
"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,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "amended_from",
"allow_in_quick_entry": 0, "fieldtype": "Link",
"allow_on_submit": 0, "label": "Amended From",
"bold": 0, "no_copy": 1,
"collapsible": 0, "options": "Attendance Request",
"columns": 0, "print_hide": 1,
"fieldname": "amended_from", "read_only": 1
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
"length": 0,
"no_copy": 1,
"options": "Attendance Request",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
} }
], ],
"has_web_view": 0, "is_submittable": 1,
"hide_heading": 0, "links": [],
"hide_toolbar": 0, "modified": "2019-12-16 11:49:26.943173",
"idx": 0, "modified_by": "Administrator",
"image_view": 0, "module": "HR",
"in_create": 0, "name": "Attendance Request",
"is_submittable": 1, "owner": "Administrator",
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2018-08-21 17:09:48.117407",
"modified_by": "Administrator",
"module": "HR",
"name": "Attendance Request",
"name_case": "",
"owner": "Administrator",
"permissions": [ "permissions": [
{ {
"amend": 1, "amend": 1,
"cancel": 1, "cancel": 1,
"create": 1, "create": 1,
"delete": 1, "delete": 1,
"email": 1, "email": 1,
"export": 1, "export": 1,
"if_owner": 0, "print": 1,
"import": 0, "read": 1,
"permlevel": 0, "report": 1,
"print": 1, "role": "System Manager",
"read": 1, "share": 1,
"report": 1, "submit": 1,
"role": "System Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 1,
"write": 1 "write": 1
}, },
{ {
"amend": 1, "amend": 1,
"cancel": 1, "cancel": 1,
"create": 1, "create": 1,
"delete": 1, "delete": 1,
"email": 1, "email": 1,
"export": 1, "export": 1,
"if_owner": 0, "print": 1,
"import": 0, "read": 1,
"permlevel": 0, "report": 1,
"print": 1, "role": "HR Manager",
"read": 1, "share": 1,
"report": 1, "submit": 1,
"role": "HR Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 1,
"write": 1 "write": 1
}, },
{ {
"amend": 1, "amend": 1,
"cancel": 1, "cancel": 1,
"create": 1, "create": 1,
"delete": 1, "delete": 1,
"email": 1, "email": 1,
"export": 1, "export": 1,
"if_owner": 0, "print": 1,
"import": 0, "read": 1,
"permlevel": 0, "report": 1,
"print": 1, "role": "HR User",
"read": 1, "share": 1,
"report": 1, "submit": 1,
"role": "HR User",
"set_user_permissions": 0,
"share": 1,
"submit": 1,
"write": 1 "write": 1
}, },
{ {
"amend": 0, "create": 1,
"cancel": 0, "delete": 1,
"create": 1, "email": 1,
"delete": 1, "export": 1,
"email": 1, "print": 1,
"export": 1, "read": 1,
"if_owner": 0, "report": 1,
"import": 0, "role": "Employee",
"permlevel": 0, "share": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Employee",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1 "write": 1
} }
], ],
"quick_entry": 0, "sort_field": "modified",
"read_only": 0, "sort_order": "DESC",
"read_only_onload": 0, "title_field": "employee_name",
"show_name_in_global_search": 0, "track_changes": 1
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "employee_name",
"track_changes": 1,
"track_seen": 0,
"track_views": 0
} }

View File

@@ -1,569 +1,180 @@
{ {
"allow_copy": 0, "actions": [],
"allow_events_in_timeline": 0,
"allow_guest_to_view": 0,
"allow_import": 1, "allow_import": 1,
"allow_rename": 1, "allow_rename": 1,
"autoname": "",
"beta": 0,
"creation": "2013-02-05 11:48:26", "creation": "2013-02-05 11:48:26",
"custom": 0,
"docstatus": 0,
"doctype": "DocType", "doctype": "DocType",
"document_type": "Setup", "document_type": "Setup",
"editable_grid": 0, "engine": "InnoDB",
"field_order": [
"department_name",
"parent_department",
"column_break_3",
"company",
"is_group",
"disabled",
"section_break_4",
"leave_block_list",
"leave_section",
"leave_approvers",
"expense_section",
"expense_approvers",
"lft",
"rgt",
"old_parent"
],
"fields": [ "fields": [
{ {
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "department_name", "fieldname": "department_name",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1, "in_list_view": 1,
"in_standard_filter": 0,
"label": "Department", "label": "Department",
"length": 0,
"no_copy": 0,
"oldfieldname": "department_name", "oldfieldname": "department_name",
"oldfieldtype": "Data", "oldfieldtype": "Data",
"permlevel": 0, "reqd": 1
"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,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "parent_department", "fieldname": "parent_department",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1, "in_list_view": 1,
"in_standard_filter": 0,
"label": "Parent Department", "label": "Parent Department",
"length": 0, "options": "Department"
"no_copy": 0,
"options": "Department",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "company", "fieldname": "company",
"fieldtype": "Link", "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, "in_standard_filter": 1,
"label": "Company", "label": "Company",
"length": 0,
"no_copy": 0,
"options": "Company", "options": "Company",
"permlevel": 0, "reqd": 1
"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,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 1, "bold": 1,
"collapsible": 0, "default": "0",
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "is_group", "fieldname": "is_group",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1, "in_list_view": 1,
"in_standard_filter": 0, "label": "Is Group"
"label": "Is Group",
"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,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0, "default": "0",
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "disabled", "fieldname": "disabled",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 0, "label": "Disabled"
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Disabled",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "section_break_4", "fieldname": "section_break_4",
"fieldtype": "Section Break", "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,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"description": "Days for which Holidays are blocked for this department.", "description": "Days for which Holidays are blocked for this department.",
"fetch_if_empty": 0,
"fieldname": "leave_block_list", "fieldname": "leave_block_list",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1, "in_list_view": 1,
"in_standard_filter": 0,
"label": "Leave Block List", "label": "Leave Block List",
"length": 0, "options": "Leave Block List"
"no_copy": 0,
"options": "Leave Block List",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "leave_section", "fieldname": "leave_section",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "label": "Leave Approvers"
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Leave Approvers",
"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,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"description": "The first Leave Approver in the list will be set as the default Leave Approver.", "description": "The first Leave Approver in the list will be set as the default Leave Approver.",
"fetch_if_empty": 0,
"fieldname": "leave_approvers", "fieldname": "leave_approvers",
"fieldtype": "Table", "fieldtype": "Table",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Leave Approver", "label": "Leave Approver",
"length": 0, "options": "Department Approver"
"no_copy": 0,
"options": "Department Approver",
"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,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "expense_section", "fieldname": "expense_section",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "label": "Expense Approvers"
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Expense Approvers",
"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,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"description": "The first Expense Approver in the list will be set as the default Expense Approver.", "description": "The first Expense Approver in the list will be set as the default Expense Approver.",
"fetch_if_empty": 0,
"fieldname": "expense_approvers", "fieldname": "expense_approvers",
"fieldtype": "Table", "fieldtype": "Table",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Expense Approver", "label": "Expense Approver",
"length": 0, "options": "Department Approver"
"no_copy": 0,
"options": "Department Approver",
"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,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "lft", "fieldname": "lft",
"fieldtype": "Int", "fieldtype": "Int",
"hidden": 1, "hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "lft", "label": "lft",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 1, "print_hide": 1,
"print_hide_if_no_value": 0, "read_only": 1
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "rgt", "fieldname": "rgt",
"fieldtype": "Int", "fieldtype": "Int",
"hidden": 1, "hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "rgt", "label": "rgt",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 1, "print_hide": 1,
"print_hide_if_no_value": 0, "read_only": 1
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "old_parent", "fieldname": "old_parent",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 1, "hidden": 1,
"ignore_user_permissions": 1, "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Old Parent", "label": "Old Parent",
"length": 0, "print_hide": 1
"no_copy": 0, },
"permlevel": 0, {
"precision": "", "fieldname": "column_break_3",
"print_hide": 1, "fieldtype": "Column Break"
"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,
"translatable": 0,
"unique": 0
} }
], ],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"icon": "fa fa-sitemap", "icon": "fa fa-sitemap",
"idx": 1, "idx": 1,
"image_view": 0, "links": [],
"in_create": 0, "modified": "2019-12-12 14:48:35.254308",
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2019-06-25 18:43:05.550387",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "HR", "module": "HR",
"name": "Department", "name": "Department",
"owner": "Administrator", "owner": "Administrator",
"permissions": [ "permissions": [
{ {
"amend": 0,
"cancel": 0,
"create": 1, "create": 1,
"delete": 1, "delete": 1,
"email": 1, "email": 1,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1, "print": 1,
"read": 1, "read": 1,
"report": 1, "report": 1,
"role": "HR User", "role": "HR User",
"set_user_permissions": 0,
"share": 1, "share": 1,
"submit": 0,
"write": 1 "write": 1
}, },
{ {
"amend": 0,
"cancel": 0,
"create": 1, "create": 1,
"delete": 1, "delete": 1,
"email": 1, "email": 1,
"export": 1, "export": 1,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1, "print": 1,
"read": 1, "read": 1,
"report": 1, "report": 1,
"role": "Academics User", "role": "Academics User",
"set_user_permissions": 0,
"share": 1, "share": 1,
"submit": 0,
"write": 1 "write": 1
}, },
{ {
"amend": 0,
"cancel": 0,
"create": 1, "create": 1,
"delete": 1, "delete": 1,
"email": 1, "email": 1,
"export": 1, "export": 1,
"if_owner": 0,
"import": 1, "import": 1,
"permlevel": 0,
"print": 1, "print": 1,
"read": 1, "read": 1,
"report": 1, "report": 1,
"role": "HR Manager", "role": "HR Manager",
"set_user_permissions": 1, "set_user_permissions": 1,
"share": 1, "share": 1,
"submit": 0,
"write": 1 "write": 1
} }
], ],
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 1, "show_name_in_global_search": 1,
"sort_order": "ASC", "sort_field": "modified",
"track_changes": 0, "sort_order": "ASC"
"track_seen": 0,
"track_views": 0
} }

View File

@@ -1,161 +1,51 @@
{ {
"allow_copy": 0, "actions": [],
"allow_guest_to_view": 0, "creation": "2017-10-17 08:19:43.142329",
"allow_import": 0, "doctype": "DocType",
"allow_rename": 0, "editable_grid": 1,
"beta": 0, "engine": "InnoDB",
"creation": "2017-10-17 08:19:43.142329", "field_order": [
"custom": 0, "class",
"docstatus": 0, "description",
"doctype": "DocType", "issuing_date",
"document_type": "", "expiry_date"
"editable_grid": 1, ],
"engine": "InnoDB",
"fields": [ "fields": [
{ {
"allow_bulk_edit": 0, "fieldname": "class",
"allow_on_submit": 0, "fieldtype": "Data",
"bold": 0, "in_list_view": 1,
"collapsible": 0, "label": "Driver licence class"
"columns": 0, },
"fieldname": "class",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Class",
"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, "fieldname": "description",
"allow_on_submit": 0, "fieldtype": "Data",
"bold": 0, "in_list_view": 1,
"collapsible": 0, "label": "Description"
"columns": 0, },
"fieldname": "description",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Description",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "issuing_date",
"allow_on_submit": 0, "fieldtype": "Date",
"bold": 0, "in_list_view": 1,
"collapsible": 0, "label": "Issuing Date"
"columns": 0, },
"fieldname": "issuing_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Issuing Date",
"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, "fieldname": "expiry_date",
"allow_on_submit": 0, "fieldtype": "Date",
"bold": 0, "in_list_view": 1,
"collapsible": 0, "label": "Expiry Date"
"columns": 0,
"fieldname": "expiry_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Expiry Date",
"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
} }
], ],
"has_web_view": 0, "istable": 1,
"hide_heading": 0, "links": [],
"hide_toolbar": 0, "modified": "2019-12-12 14:40:55.209022",
"idx": 0, "modified_by": "Administrator",
"image_view": 0, "module": "HR",
"in_create": 0, "name": "Driving License Category",
"is_submittable": 0, "owner": "Administrator",
"issingle": 0, "permissions": [],
"istable": 1, "quick_entry": 1,
"max_attachments": 0, "sort_field": "modified",
"modified": "2017-10-17 08:19:43.142329", "sort_order": "DESC",
"modified_by": "Administrator", "track_changes": 1
"module": "HR",
"name": "Driving License Category",
"name_case": "",
"owner": "Administrator",
"permissions": [],
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1,
"track_seen": 0
} }

View File

@@ -1,4 +1,5 @@
{ {
"actions": [],
"allow_events_in_timeline": 1, "allow_events_in_timeline": 1,
"allow_import": 1, "allow_import": 1,
"allow_rename": 1, "allow_rename": 1,
@@ -12,24 +13,25 @@
"basic_information", "basic_information",
"employee", "employee",
"naming_series", "naming_series",
"salutation",
"first_name", "first_name",
"middle_name", "middle_name",
"last_name", "last_name",
"salutation",
"employee_name", "employee_name",
"employment_type",
"image", "image",
"column_break1", "column_break1",
"company", "company",
"status", "status",
"employee_number",
"employment_type",
"gender", "gender",
"date_of_birth", "date_of_birth",
"date_of_joining", "date_of_joining",
"employee_number",
"emergency_contact_details", "emergency_contact_details",
"emergency_phone_number",
"person_to_be_contacted", "person_to_be_contacted",
"relation", "relation",
"column_break_19",
"emergency_phone_number",
"erpnext_user", "erpnext_user",
"user_id", "user_id",
"create_user", "create_user",
@@ -52,10 +54,10 @@
"attendance_and_leave_details", "attendance_and_leave_details",
"leave_policy", "leave_policy",
"attendance_device_id", "attendance_device_id",
"leave_approver",
"column_break_44", "column_break_44",
"holiday_list", "holiday_list",
"default_shift", "default_shift",
"leave_approver",
"salary_information", "salary_information",
"salary_mode", "salary_mode",
"bank_name", "bank_name",
@@ -65,14 +67,14 @@
"health_insurance_no", "health_insurance_no",
"contact_details", "contact_details",
"cell_number", "cell_number",
"prefered_contact_email",
"prefered_email", "prefered_email",
"company_email",
"personal_email", "personal_email",
"unsubscribed", "unsubscribed",
"column_break4",
"permanent_accommodation_type", "permanent_accommodation_type",
"permanent_address", "permanent_address",
"column_break4",
"prefered_contact_email",
"company_email",
"current_accommodation_type", "current_accommodation_type",
"current_address", "current_address",
"sb53", "sb53",
@@ -82,9 +84,9 @@
"date_of_issue", "date_of_issue",
"valid_upto", "valid_upto",
"place_of_issue", "place_of_issue",
"column_break6",
"marital_status", "marital_status",
"blood_group", "blood_group",
"column_break6",
"family_background", "family_background",
"health_details", "health_details",
"educational_qualification", "educational_qualification",
@@ -249,7 +251,6 @@
}, },
{ {
"allow_in_quick_entry": 1, "allow_in_quick_entry": 1,
"collapsible": 1,
"fieldname": "emergency_contact_details", "fieldname": "emergency_contact_details",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"label": "Emergency Contact" "label": "Emergency Contact"
@@ -776,12 +777,17 @@
"fieldtype": "Link", "fieldtype": "Link",
"label": "Leave Approver", "label": "Leave Approver",
"options": "User" "options": "User"
},
{
"fieldname": "column_break_19",
"fieldtype": "Column Break"
} }
], ],
"icon": "fa fa-user", "icon": "fa fa-user",
"idx": 24, "idx": 24,
"image_field": "image", "image_field": "image",
"modified": "2019-09-12 14:21:12.711280", "links": [],
"modified": "2019-12-11 13:22:18.323622",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "HR", "module": "HR",
"name": "Employee", "name": "Employee",

View File

@@ -1,4 +1,5 @@
{ {
"actions": [],
"autoname": "HR-EINV-.YY.-.MM.-.#####", "autoname": "HR-EINV-.YY.-.MM.-.#####",
"creation": "2018-04-13 16:13:43.404546", "creation": "2018-04-13 16:13:43.404546",
"doctype": "DocType", "doctype": "DocType",
@@ -7,13 +8,13 @@
"field_order": [ "field_order": [
"employee", "employee",
"incentive_amount", "incentive_amount",
"employee_name",
"additional_salary",
"column_break_5",
"payroll_date", "payroll_date",
"salary_component", "salary_component",
"amended_from",
"column_break_5",
"employee_name",
"department", "department",
"additional_salary" "amended_from"
], ],
"fields": [ "fields": [
{ {
@@ -81,7 +82,8 @@
} }
], ],
"is_submittable": 1, "is_submittable": 1,
"modified": "2019-09-03 16:48:16.822252", "links": [],
"modified": "2019-12-12 13:24:44.761540",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "HR", "module": "HR",
"name": "Employee Incentive", "name": "Employee Incentive",

View File

@@ -1,298 +1,88 @@
{ {
"allow_copy": 0, "actions": [],
"allow_events_in_timeline": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"autoname": "field:employee", "autoname": "field:employee",
"beta": 0,
"creation": "2019-04-16 10:07:48.303426", "creation": "2019-04-16 10:07:48.303426",
"custom": 0,
"docstatus": 0,
"doctype": "DocType", "doctype": "DocType",
"document_type": "",
"editable_grid": 0,
"engine": "InnoDB", "engine": "InnoDB",
"field_order": [
"employee",
"employee_name",
"column_break_3",
"designation",
"skills_section",
"employee_skills",
"trainings_section",
"trainings"
],
"fields": [ "fields": [
{ {
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "employee", "fieldname": "employee",
"fieldtype": "Link", "fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Employee", "label": "Employee",
"length": 0,
"no_copy": 0,
"options": "Employee", "options": "Employee",
"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,
"translatable": 0,
"unique": 1 "unique": 1
}, },
{ {
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_from": "employee.employee_name", "fetch_from": "employee.employee_name",
"fetch_if_empty": 0,
"fieldname": "employee_name", "fieldname": "employee_name",
"fieldtype": "Read Only", "fieldtype": "Read Only",
"hidden": 0, "label": "Employee Name"
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Employee Name",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_from": "employee.designation", "fetch_from": "employee.designation",
"fetch_if_empty": 0,
"fieldname": "designation", "fieldname": "designation",
"fieldtype": "Read Only", "fieldtype": "Read Only",
"hidden": 0, "label": "Designation"
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Designation",
"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,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "skills_section", "fieldname": "skills_section",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "label": "Skills"
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Skills",
"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,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "employee_skills", "fieldname": "employee_skills",
"fieldtype": "Table", "fieldtype": "Table",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Employee Skills", "label": "Employee Skills",
"length": 0, "options": "Employee Skill"
"no_copy": 0,
"options": "Employee Skill",
"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,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "trainings_section", "fieldname": "trainings_section",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"hidden": 0, "label": "Trainings"
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Trainings",
"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,
"translatable": 0,
"unique": 0
}, },
{ {
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "trainings", "fieldname": "trainings",
"fieldtype": "Table", "fieldtype": "Table",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Trainings", "label": "Trainings",
"length": 0, "options": "Employee Training"
"no_copy": 0, },
"options": "Employee Training", {
"permlevel": 0, "fieldname": "column_break_3",
"precision": "", "fieldtype": "Column Break"
"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,
"translatable": 0,
"unique": 0
} }
], ],
"has_web_view": 0, "links": [],
"hide_toolbar": 0, "modified": "2019-12-16 11:31:09.916893",
"idx": 0,
"in_create": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2019-04-16 16:16:40.058429",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "HR", "module": "HR",
"name": "Employee Skill Map", "name": "Employee Skill Map",
"name_case": "",
"owner": "Administrator", "owner": "Administrator",
"permissions": [ "permissions": [
{ {
"amend": 0,
"cancel": 0,
"create": 1, "create": 1,
"delete": 1, "delete": 1,
"email": 1, "email": 1,
"export": 1, "export": 1,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1, "print": 1,
"read": 1, "read": 1,
"report": 1, "report": 1,
"role": "System Manager", "role": "System Manager",
"set_user_permissions": 0,
"share": 1, "share": 1,
"submit": 0,
"write": 1 "write": 1
} }
], ],
"quick_entry": 1, "quick_entry": 1,
"read_only": 0,
"show_name_in_global_search": 0,
"sort_field": "modified", "sort_field": "modified",
"sort_order": "ASC", "sort_order": "ASC",
"title_field": "employee_name", "title_field": "employee_name"
"track_changes": 0,
"track_seen": 0,
"track_views": 0
} }

View File

@@ -1,238 +1,100 @@
{ {
"allow_copy": 0, "actions": [],
"allow_guest_to_view": 0, "creation": "2017-10-09 16:53:26.410762",
"allow_import": 0, "doctype": "DocType",
"allow_rename": 0, "document_type": "Document",
"beta": 0, "editable_grid": 1,
"creation": "2017-10-09 16:53:26.410762", "engine": "InnoDB",
"custom": 0, "field_order": [
"docstatus": 0, "employee_advance",
"doctype": "DocType", "posting_date",
"document_type": "Document", "advance_paid",
"editable_grid": 1, "column_break_4",
"engine": "InnoDB", "unclaimed_amount",
"allocated_amount",
"advance_account"
],
"fields": [ "fields": [
{ {
"allow_bulk_edit": 0, "columns": 2,
"allow_on_submit": 0, "fieldname": "employee_advance",
"bold": 0, "fieldtype": "Link",
"collapsible": 0, "in_list_view": 1,
"columns": 2, "label": "Employee Advance",
"fieldname": "employee_advance", "no_copy": 1,
"fieldtype": "Link", "oldfieldname": "journal_voucher",
"hidden": 0, "oldfieldtype": "Link",
"ignore_user_permissions": 0, "options": "Employee Advance",
"ignore_xss_filter": 0, "print_width": "250px",
"in_filter": 0, "reqd": 1,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Employee Advance",
"length": 0,
"no_copy": 1,
"oldfieldname": "journal_voucher",
"oldfieldtype": "Link",
"options": "Employee Advance",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"print_width": "250px",
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0,
"width": "250px" "width": "250px"
}, },
{ {
"allow_bulk_edit": 0, "columns": 2,
"allow_on_submit": 0, "fieldname": "posting_date",
"bold": 0, "fieldtype": "Date",
"collapsible": 0, "in_list_view": 1,
"columns": 2, "label": "Posting Date",
"fieldname": "posting_date", "read_only": 1
"fieldtype": "Date", },
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Posting Date",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "columns": 2,
"allow_on_submit": 0, "fieldname": "advance_paid",
"bold": 0, "fieldtype": "Currency",
"collapsible": 0, "in_list_view": 1,
"columns": 2, "label": "Advance Paid",
"fieldname": "advance_paid", "options": "Company:company.default_currency",
"fieldtype": "Currency", "read_only": 1
"hidden": 0, },
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Advance Paid",
"length": 0,
"no_copy": 0,
"options": "Company:company.default_currency",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "columns": 2,
"allow_on_submit": 0, "fieldname": "unclaimed_amount",
"bold": 0, "fieldtype": "Currency",
"collapsible": 0, "in_list_view": 1,
"columns": 2, "label": "Unclaimed amount",
"fieldname": "unclaimed_amount", "no_copy": 1,
"fieldtype": "Currency", "oldfieldname": "advance_amount",
"hidden": 0, "oldfieldtype": "Currency",
"ignore_user_permissions": 0, "options": "Company:company.default_currency",
"ignore_xss_filter": 0, "print_width": "120px",
"in_filter": 0, "read_only": 1,
"in_global_search": 0, "reqd": 1,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Unclaimed amount",
"length": 0,
"no_copy": 1,
"oldfieldname": "advance_amount",
"oldfieldtype": "Currency",
"options": "Company:company.default_currency",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"print_width": "120px",
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0,
"width": "120px" "width": "120px"
}, },
{ {
"allow_bulk_edit": 0, "columns": 2,
"allow_on_submit": 0, "fieldname": "allocated_amount",
"bold": 0, "fieldtype": "Currency",
"collapsible": 0, "in_list_view": 1,
"columns": 2, "label": "Allocated amount",
"fieldname": "allocated_amount", "no_copy": 1,
"fieldtype": "Currency", "oldfieldname": "allocated_amount",
"hidden": 0, "oldfieldtype": "Currency",
"ignore_user_permissions": 0, "options": "Company:company.default_currency",
"ignore_xss_filter": 0, "print_width": "120px",
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Allocated amount",
"length": 0,
"no_copy": 1,
"oldfieldname": "allocated_amount",
"oldfieldtype": "Currency",
"options": "Company:company.default_currency",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"print_width": "120px",
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0,
"width": "120px" "width": "120px"
}, },
{ {
"allow_bulk_edit": 0, "fieldname": "advance_account",
"allow_on_submit": 0, "fieldtype": "Link",
"bold": 0, "hidden": 1,
"collapsible": 0, "label": "Advance Account",
"columns": 0, "options": "Account"
"fieldname": "advance_account", },
"fieldtype": "Link", {
"hidden": 1, "fieldname": "column_break_4",
"ignore_user_permissions": 0, "fieldtype": "Column Break"
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Advance Account",
"length": 0,
"no_copy": 0,
"options": "Account",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
} }
], ],
"has_web_view": 0, "istable": 1,
"hide_heading": 0, "links": [],
"hide_toolbar": 0, "modified": "2019-12-11 13:53:22.111766",
"idx": 0, "modified_by": "Administrator",
"image_view": 0, "module": "HR",
"in_create": 0, "name": "Expense Claim Advance",
"is_submittable": 0, "owner": "Administrator",
"issingle": 0, "permissions": [],
"istable": 1, "quick_entry": 1,
"max_attachments": 0, "sort_field": "modified",
"modified": "2017-10-09 19:59:48.818139", "sort_order": "DESC"
"modified_by": "Administrator",
"module": "HR",
"name": "Expense Claim Advance",
"name_case": "",
"owner": "Administrator",
"permissions": [],
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 0,
"track_seen": 0
} }

View File

@@ -1,4 +1,5 @@
{ {
"actions": [],
"creation": "2013-02-22 01:27:46", "creation": "2013-02-22 01:27:46",
"doctype": "DocType", "doctype": "DocType",
"editable_grid": 1, "editable_grid": 1,
@@ -12,9 +13,9 @@
"description", "description",
"section_break_6", "section_break_6",
"amount", "amount",
"cost_center",
"column_break_8", "column_break_8",
"sanctioned_amount", "sanctioned_amount"
"cost_center"
], ],
"fields": [ "fields": [
{ {
@@ -107,8 +108,9 @@
], ],
"idx": 1, "idx": 1,
"istable": 1, "istable": 1,
"modified": "2019-11-22 11:57:25.110942", "links": [],
"modified_by": "jangeles@bai.ph", "modified": "2019-12-11 13:42:33.233432",
"modified_by": "Administrator",
"module": "HR", "module": "HR",
"name": "Expense Claim Detail", "name": "Expense Claim Detail",
"owner": "harshada@webnotestech.com", "owner": "harshada@webnotestech.com",

View File

@@ -1,4 +1,5 @@
{ {
"actions": [],
"allow_import": 1, "allow_import": 1,
"allow_rename": 1, "allow_rename": 1,
"autoname": "field:expense_type", "autoname": "field:expense_type",
@@ -9,8 +10,8 @@
"field_order": [ "field_order": [
"deferred_expense_account", "deferred_expense_account",
"expense_type", "expense_type",
"description", "accounts",
"accounts" "description"
], ],
"fields": [ "fields": [
{ {
@@ -46,8 +47,9 @@
], ],
"icon": "fa fa-flag", "icon": "fa fa-flag",
"idx": 1, "idx": 1,
"modified": "2019-11-22 12:00:18.710408", "links": [],
"modified_by": "jangeles@bai.ph", "modified": "2019-12-11 13:38:59.534034",
"modified_by": "Administrator",
"module": "HR", "module": "HR",
"name": "Expense Claim Type", "name": "Expense Claim Type",
"owner": "harshada@webnotestech.com", "owner": "harshada@webnotestech.com",

View File

@@ -1,4 +1,5 @@
{ {
"actions": [],
"autoname": "hash", "autoname": "hash",
"creation": "2019-06-03 11:42:33.123976", "creation": "2019-06-03 11:42:33.123976",
"doctype": "DocType", "doctype": "DocType",
@@ -8,8 +9,8 @@
"field_order": [ "field_order": [
"account_head", "account_head",
"cost_center", "cost_center",
"col_break1",
"rate", "rate",
"col_break1",
"description", "description",
"section_break_6", "section_break_6",
"tax_amount", "tax_amount",
@@ -93,7 +94,8 @@
} }
], ],
"istable": 1, "istable": 1,
"modified": "2019-06-20 12:01:33.919555", "links": [],
"modified": "2019-12-11 13:50:02.883328",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "HR", "module": "HR",
"name": "Expense Taxes and Charges", "name": "Expense Taxes and Charges",

View File

@@ -1,4 +1,5 @@
{ {
"actions": [],
"creation": "2013-08-02 13:45:23", "creation": "2013-08-02 13:45:23",
"doctype": "DocType", "doctype": "DocType",
"document_type": "Other", "document_type": "Other",
@@ -13,6 +14,7 @@
"expense_approver_mandatory_in_expense_claim", "expense_approver_mandatory_in_expense_claim",
"payroll_settings", "payroll_settings",
"include_holidays_in_total_working_days", "include_holidays_in_total_working_days",
"disable_rounded_total",
"max_working_hours_against_timesheet", "max_working_hours_against_timesheet",
"column_break_11", "column_break_11",
"email_salary_slip_to_employee", "email_salary_slip_to_employee",
@@ -160,12 +162,20 @@
"fieldname": "auto_leave_encashment", "fieldname": "auto_leave_encashment",
"fieldtype": "Check", "fieldtype": "Check",
"label": "Auto Leave Encashment" "label": "Auto Leave Encashment"
},
{
"default": "0",
"description": "If checked, hides and disables Rounded Total field in Salary Slips",
"fieldname": "disable_rounded_total",
"fieldtype": "Check",
"label": "Disable Rounded Total"
} }
], ],
"icon": "fa fa-cog", "icon": "fa fa-cog",
"idx": 1, "idx": 1,
"issingle": 1, "issingle": 1,
"modified": "2019-08-05 13:07:17.993968", "links": [],
"modified": "2019-12-31 14:28:32.004121",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "HR", "module": "HR",
"name": "HR Settings", "name": "HR Settings",

View File

@@ -7,6 +7,8 @@ from __future__ import unicode_literals
import frappe import frappe
from frappe import _ from frappe import _
from frappe.model.document import Document from frappe.model.document import Document
from frappe.utils import cint
from frappe.custom.doctype.property_setter.property_setter import make_property_setter
class HRSettings(Document): class HRSettings(Document):
def validate(self): def validate(self):
@@ -22,3 +24,12 @@ class HRSettings(Document):
if self.email_salary_slip_to_employee and self.encrypt_salary_slips_in_emails: if self.email_salary_slip_to_employee and self.encrypt_salary_slips_in_emails:
if not self.password_policy: if not self.password_policy:
frappe.throw(_("Password policy for Salary Slips is not set")) frappe.throw(_("Password policy for Salary Slips is not set"))
def on_update(self):
self.toggle_rounded_total()
frappe.clear_cache()
def toggle_rounded_total(self):
self.disable_rounded_total = cint(self.disable_rounded_total)
make_property_setter("Salary Slip", "rounded_total", "hidden", self.disable_rounded_total, "Check")
make_property_setter("Salary Slip", "rounded_total", "print_hide", self.disable_rounded_total, "Check")

View File

@@ -10,6 +10,10 @@ frappe.ui.form.on("Job Offer", {
}); });
}, },
setup: function (frm) {
frm.email_field = "applicant_email";
},
select_terms: function (frm) { select_terms: function (frm) {
erpnext.utils.get_terms(frm.doc.select_terms, frm.doc, function (r) { erpnext.utils.get_terms(frm.doc.select_terms, frm.doc, function (r) {
if (!r.exc) { if (!r.exc) {

View File

@@ -1,618 +1,191 @@
{ {
"allow_copy": 0, "actions": [],
"allow_guest_to_view": 0, "allow_import": 1,
"allow_import": 1, "autoname": "HR-OFF-.YYYY.-.#####",
"allow_rename": 0, "creation": "2015-03-04 14:20:17.662207",
"autoname": "HR-OFF-.YYYY.-.#####", "doctype": "DocType",
"beta": 0, "document_type": "Document",
"creation": "2015-03-04 14:20:17.662207", "engine": "InnoDB",
"custom": 0, "field_order": [
"default_print_format": "", "job_applicant",
"docstatus": 0, "applicant_name",
"doctype": "DocType", "applicant_email",
"document_type": "Document", "column_break_3",
"editable_grid": 0, "status",
"offer_date",
"designation",
"company",
"section_break_4",
"offer_terms",
"section_break_14",
"select_terms",
"terms",
"printing_details",
"letter_head",
"column_break_16",
"select_print_heading",
"amended_from"
],
"fields": [ "fields": [
{ {
"allow_bulk_edit": 0, "fieldname": "job_applicant",
"allow_in_quick_entry": 0, "fieldtype": "Link",
"allow_on_submit": 0, "in_list_view": 1,
"bold": 0, "label": "Job Applicant",
"collapsible": 0, "options": "Job Applicant",
"columns": 0, "print_hide": 1,
"fieldname": "job_applicant", "reqd": 1
"fieldtype": "Link", },
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Job Applicant",
"length": 0,
"no_copy": 0,
"options": "Job Applicant",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"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,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fetch_from": "job_applicant.applicant_name",
"allow_in_quick_entry": 0, "fieldname": "applicant_name",
"allow_on_submit": 0, "fieldtype": "Data",
"bold": 0, "in_global_search": 1,
"collapsible": 0, "in_list_view": 1,
"columns": 0, "label": "Applicant Name",
"fetch_from": "job_applicant.applicant_name", "read_only": 1,
"fieldname": "applicant_name", "reqd": 1
"fieldtype": "Data", },
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 1,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Applicant Name",
"length": 0,
"no_copy": 0,
"options": "",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fetch_from": "job_applicant.email_id",
"allow_in_quick_entry": 0, "fieldname": "applicant_email",
"allow_on_submit": 0, "fieldtype": "Data",
"bold": 0, "in_global_search": 1,
"collapsible": 0, "label": "Applicant Email Address",
"columns": 0, "options": "Email",
"fieldname": "column_break_3", "read_only": 1
"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,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "column_break_3",
"allow_in_quick_entry": 0, "fieldtype": "Column Break"
"allow_on_submit": 1, },
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "status",
"fieldtype": "Select",
"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": "Status",
"length": 0,
"no_copy": 1,
"options": "Awaiting Response\nAccepted\nRejected",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "allow_on_submit": 1,
"allow_in_quick_entry": 0, "fieldname": "status",
"allow_on_submit": 0, "fieldtype": "Select",
"bold": 0, "in_standard_filter": 1,
"collapsible": 0, "label": "Status",
"columns": 0, "no_copy": 1,
"default": "", "options": "Awaiting Response\nAccepted\nRejected",
"fieldname": "offer_date", "print_hide": 1
"fieldtype": "Date", },
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Offer Date",
"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,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "offer_date",
"allow_in_quick_entry": 0, "fieldtype": "Date",
"allow_on_submit": 0, "label": "Offer Date",
"bold": 0, "reqd": 1
"collapsible": 0, },
"columns": 0,
"fieldname": "designation",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Designation",
"length": 0,
"no_copy": 0,
"options": "Designation",
"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,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "designation",
"allow_in_quick_entry": 0, "fieldtype": "Link",
"allow_on_submit": 0, "in_list_view": 1,
"bold": 0, "label": "Designation",
"collapsible": 0, "options": "Designation",
"columns": 0, "reqd": 1
"fieldname": "company", },
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Company",
"length": 0,
"no_copy": 0,
"options": "Company",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 1,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "company",
"allow_in_quick_entry": 0, "fieldtype": "Link",
"allow_on_submit": 0, "in_list_view": 1,
"bold": 0, "label": "Company",
"collapsible": 0, "options": "Company",
"columns": 0, "print_hide": 1,
"fieldname": "section_break_4", "remember_last_selected_value": 1,
"fieldtype": "Section Break", "reqd": 1
"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,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "section_break_4",
"allow_in_quick_entry": 0, "fieldtype": "Section Break"
"allow_on_submit": 0, },
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "offer_terms",
"fieldtype": "Table",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Job Offer Terms",
"length": 0,
"no_copy": 0,
"options": "Job Offer Term",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "offer_terms",
"allow_in_quick_entry": 0, "fieldtype": "Table",
"allow_on_submit": 0, "label": "Job Offer Terms",
"bold": 0, "options": "Job Offer Term"
"collapsible": 0, },
"columns": 0,
"fieldname": "section_break_14",
"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,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "section_break_14",
"allow_in_quick_entry": 0, "fieldtype": "Section Break"
"allow_on_submit": 0, },
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "select_terms",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Select Terms and Conditions",
"length": 0,
"no_copy": 0,
"options": "Terms and Conditions",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "select_terms",
"allow_in_quick_entry": 0, "fieldtype": "Link",
"allow_on_submit": 0, "label": "Select Terms and Conditions",
"bold": 0, "options": "Terms and Conditions",
"collapsible": 0, "print_hide": 1
"columns": 0, },
"fieldname": "terms",
"fieldtype": "Text Editor",
"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": "Terms and Conditions",
"length": 0,
"no_copy": 0,
"options": "",
"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,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "terms",
"allow_in_quick_entry": 0, "fieldtype": "Text Editor",
"allow_on_submit": 0, "label": "Terms and Conditions"
"bold": 0, },
"collapsible": 1,
"columns": 0,
"fieldname": "printing_details",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Printing Details",
"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,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "collapsible": 1,
"allow_in_quick_entry": 0, "fieldname": "printing_details",
"allow_on_submit": 1, "fieldtype": "Section Break",
"bold": 0, "label": "Printing Details"
"collapsible": 0, },
"columns": 0,
"fetch_from": "company.default_letter_head",
"fieldname": "letter_head",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Letter Head",
"length": 0,
"no_copy": 0,
"options": "Letter Head",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "allow_on_submit": 1,
"allow_in_quick_entry": 0, "fetch_from": "company.default_letter_head",
"allow_on_submit": 0, "fieldname": "letter_head",
"bold": 0, "fieldtype": "Link",
"collapsible": 0, "label": "Letter Head",
"columns": 0, "options": "Letter Head",
"fieldname": "column_break_16", "print_hide": 1
"fieldtype": "Column Break", },
"hidden": 0, {
"ignore_user_permissions": 0, "fieldname": "column_break_16",
"ignore_xss_filter": 0, "fieldtype": "Column Break",
"in_filter": 0, "print_hide": 1,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0,
"width": "50%" "width": "50%"
}, },
{ {
"allow_bulk_edit": 0, "allow_on_submit": 1,
"allow_in_quick_entry": 0, "fieldname": "select_print_heading",
"allow_on_submit": 1, "fieldtype": "Link",
"bold": 0, "label": "Print Heading",
"collapsible": 0, "options": "Print Heading",
"columns": 0, "print_hide": 1,
"fieldname": "select_print_heading", "report_hide": 1
"fieldtype": "Link", },
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Print Heading",
"length": 0,
"no_copy": 0,
"options": "Print Heading",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "amended_from",
"allow_in_quick_entry": 0, "fieldtype": "Link",
"allow_on_submit": 0, "label": "Amended From",
"bold": 0, "no_copy": 1,
"collapsible": 0, "options": "Job Offer",
"columns": 0, "print_hide": 1,
"fieldname": "amended_from", "read_only": 1
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
"length": 0,
"no_copy": 1,
"options": "Job Offer",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
} }
], ],
"has_web_view": 0, "is_submittable": 1,
"hide_heading": 0, "links": [],
"hide_toolbar": 0, "modified": "2019-12-31 02:40:33.650728",
"idx": 0, "modified_by": "Administrator",
"image_view": 0, "module": "HR",
"in_create": 0, "name": "Job Offer",
"is_submittable": 1, "owner": "Administrator",
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2018-08-21 16:15:35.616910",
"modified_by": "Administrator",
"module": "HR",
"name": "Job Offer",
"name_case": "",
"owner": "Administrator",
"permissions": [ "permissions": [
{ {
"amend": 1, "amend": 1,
"cancel": 1, "cancel": 1,
"create": 1, "create": 1,
"delete": 1, "delete": 1,
"email": 1, "email": 1,
"export": 1, "export": 1,
"if_owner": 0, "import": 1,
"import": 1, "print": 1,
"permlevel": 0, "read": 1,
"print": 1, "report": 1,
"read": 1, "role": "HR User",
"report": 1, "share": 1,
"role": "HR User", "submit": 1,
"set_user_permissions": 0,
"share": 1,
"submit": 1,
"write": 1 "write": 1
} }
], ],
"quick_entry": 0, "show_name_in_global_search": 1,
"read_only": 0, "sort_field": "modified",
"read_only_onload": 0, "sort_order": "DESC",
"show_name_in_global_search": 1, "title_field": "applicant_name"
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "applicant_name",
"track_changes": 0,
"track_seen": 0,
"track_views": 0
} }

View File

@@ -1,25 +1,28 @@
{ {
"actions": [],
"allow_copy": 1, "allow_copy": 1,
"creation": "2013-01-10 16:34:15", "creation": "2013-01-10 16:34:15",
"doctype": "DocType", "doctype": "DocType",
"engine": "InnoDB",
"field_order": [ "field_order": [
"select_employees_section", "select_employees_section",
"company", "company",
"employment_type", "employment_type",
"branch", "branch",
"column_break1",
"department", "department",
"column_break1",
"designation", "designation",
"employee_grade", "employee_grade",
"employee", "employee",
"allocate_leaves_section", "allocate_leaves_section",
"from_date", "from_date",
"to_date", "to_date",
"leave_policy",
"leave_type",
"carry_forward", "carry_forward",
"no_of_days", "no_of_days",
"allocate" "allocate",
"column_break_16",
"leave_policy",
"leave_type"
], ],
"fields": [ "fields": [
{ {
@@ -125,13 +128,18 @@
"fieldname": "allocate_leaves_section", "fieldname": "allocate_leaves_section",
"fieldtype": "Section Break", "fieldtype": "Section Break",
"label": "Allocate Leaves" "label": "Allocate Leaves"
},
{
"fieldname": "column_break_16",
"fieldtype": "Column Break"
} }
], ],
"hide_toolbar": 1, "hide_toolbar": 1,
"icon": "fa fa-cog", "icon": "fa fa-cog",
"idx": 1, "idx": 1,
"issingle": 1, "issingle": 1,
"modified": "2019-05-24 09:41:34.105741", "links": [],
"modified": "2019-12-12 18:51:41.573349",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "HR", "module": "HR",
"name": "Leave Control Panel", "name": "Leave Control Panel",

View File

@@ -1,577 +1,198 @@
{ {
"allow_copy": 0, "actions": [],
"allow_guest_to_view": 0, "allow_import": 1,
"allow_import": 1, "allow_rename": 1,
"allow_rename": 1, "autoname": "HR-ENC-.YYYY.-.#####",
"autoname": "HR-ENC-.YYYY.-.#####", "creation": "2018-04-13 15:31:51.197046",
"beta": 0, "doctype": "DocType",
"creation": "2018-04-13 15:31:51.197046", "editable_grid": 1,
"custom": 0, "engine": "InnoDB",
"docstatus": 0, "field_order": [
"doctype": "DocType", "leave_period",
"document_type": "", "employee",
"editable_grid": 1, "employee_name",
"engine": "InnoDB", "department",
"column_break_4",
"leave_type",
"leave_allocation",
"leave_balance",
"encashable_days",
"amended_from",
"payroll",
"encashment_amount",
"encashment_date",
"additional_salary"
],
"fields": [ "fields": [
{ {
"allow_bulk_edit": 0, "fieldname": "leave_period",
"allow_in_quick_entry": 0, "fieldtype": "Link",
"allow_on_submit": 0, "in_list_view": 1,
"bold": 0, "label": "Leave Period",
"collapsible": 0, "options": "Leave Period",
"columns": 0, "reqd": 1
"fieldname": "leave_period", },
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Leave Period",
"length": 0,
"no_copy": 0,
"options": "Leave Period",
"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,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "employee",
"allow_in_quick_entry": 0, "fieldtype": "Link",
"allow_on_submit": 0, "in_list_view": 1,
"bold": 0, "label": "Employee",
"collapsible": 0, "options": "Employee",
"columns": 0, "reqd": 1
"fieldname": "employee", },
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Employee",
"length": 0,
"no_copy": 0,
"options": "Employee",
"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,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fetch_from": "employee.employee_name",
"allow_in_quick_entry": 0, "fieldname": "employee_name",
"allow_on_submit": 0, "fieldtype": "Data",
"bold": 0, "label": "Employee Name",
"collapsible": 0, "read_only": 1
"columns": 0, },
"fetch_from": "employee.employee_name",
"fieldname": "employee_name",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Employee Name",
"length": 0,
"no_copy": 0,
"options": "",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fetch_from": "employee.department",
"allow_in_quick_entry": 0, "fieldname": "department",
"allow_on_submit": 0, "fieldtype": "Link",
"bold": 0, "label": "Department",
"collapsible": 0, "options": "Department",
"columns": 0, "read_only": 1
"fetch_from": "employee.department", },
"fieldname": "department",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Department",
"length": 0,
"no_copy": 0,
"options": "Department",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "leave_type",
"allow_in_quick_entry": 0, "fieldtype": "Link",
"allow_on_submit": 0, "in_list_view": 1,
"bold": 0, "label": "Leave Type",
"collapsible": 0, "options": "Leave Type",
"columns": 0, "reqd": 1
"fieldname": "leave_type", },
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Leave Type",
"length": 0,
"no_copy": 0,
"options": "Leave Type",
"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,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "column_break_4",
"allow_in_quick_entry": 0, "fieldtype": "Column Break"
"allow_on_submit": 0, },
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "column_break_4",
"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,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "leave_allocation",
"allow_in_quick_entry": 0, "fieldtype": "Link",
"allow_on_submit": 0, "label": "Leave Allocation",
"bold": 0, "no_copy": 1,
"collapsible": 0, "options": "Leave Allocation",
"columns": 0, "read_only": 1
"fieldname": "leave_allocation", },
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Leave Allocation",
"length": 0,
"no_copy": 1,
"options": "Leave Allocation",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "leave_balance",
"allow_in_quick_entry": 0, "fieldtype": "Float",
"allow_on_submit": 0, "label": "Leave Balance",
"bold": 0, "no_copy": 1,
"collapsible": 0, "read_only": 1
"columns": 0, },
"fieldname": "leave_balance",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Leave Balance",
"length": 0,
"no_copy": 1,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "encashable_days",
"allow_in_quick_entry": 0, "fieldtype": "Float",
"allow_on_submit": 0, "label": "Encashable days",
"bold": 0, "no_copy": 1,
"collapsible": 0, "read_only": 1
"columns": 0, },
"fieldname": "encashable_days",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Encashable days",
"length": 0,
"no_copy": 1,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "amended_from",
"allow_in_quick_entry": 0, "fieldtype": "Link",
"allow_on_submit": 0, "label": "Amended From",
"bold": 0, "no_copy": 1,
"collapsible": 0, "options": "Leave Encashment",
"columns": 0, "print_hide": 1,
"fieldname": "amended_from", "read_only": 1
"fieldtype": "Link", },
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
"length": 0,
"no_copy": 1,
"options": "Leave Encashment",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "payroll",
"allow_in_quick_entry": 0, "fieldtype": "Section Break",
"allow_on_submit": 0, "label": "Payroll"
"bold": 0, },
"collapsible": 0,
"columns": 0,
"fieldname": "payroll",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Payroll",
"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,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "encashment_amount",
"allow_in_quick_entry": 0, "fieldtype": "Currency",
"allow_on_submit": 0, "in_list_view": 1,
"bold": 0, "label": "Encashment Amount",
"collapsible": 0, "no_copy": 1,
"columns": 0, "read_only": 1
"fieldname": "encashment_amount", },
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Encashment Amount",
"length": 0,
"no_copy": 1,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "default": "Today",
"allow_in_quick_entry": 0, "fieldname": "encashment_date",
"allow_on_submit": 0, "fieldtype": "Date",
"bold": 0, "label": "Encashment Date"
"collapsible": 0, },
"columns": 0,
"default": "Today",
"fieldname": "encashment_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Encashment Date",
"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,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "additional_salary",
"allow_in_quick_entry": 0, "fieldtype": "Link",
"allow_on_submit": 0, "label": "Additional Salary",
"bold": 0, "no_copy": 1,
"collapsible": 0, "options": "Additional Salary",
"columns": 0, "read_only": 1
"fieldname": "additional_salary",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Additional Salary",
"length": 0,
"no_copy": 1,
"options": "Additional Salary",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
} }
], ],
"has_web_view": 0, "is_submittable": 1,
"hide_heading": 0, "links": [],
"hide_toolbar": 0, "modified": "2019-12-16 11:51:57.732223",
"idx": 0, "modified_by": "Administrator",
"image_view": 0, "module": "HR",
"in_create": 0, "name": "Leave Encashment",
"is_submittable": 1, "owner": "Administrator",
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2018-08-21 16:15:43.829272",
"modified_by": "Administrator",
"module": "HR",
"name": "Leave Encashment",
"name_case": "",
"owner": "Administrator",
"permissions": [ "permissions": [
{ {
"amend": 1, "amend": 1,
"cancel": 1, "cancel": 1,
"create": 1, "create": 1,
"delete": 1, "delete": 1,
"email": 1, "email": 1,
"export": 1, "export": 1,
"if_owner": 0, "print": 1,
"import": 0, "read": 1,
"permlevel": 0, "report": 1,
"print": 1, "role": "System Manager",
"read": 1, "share": 1,
"report": 1, "submit": 1,
"role": "System Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 1,
"write": 1 "write": 1
}, },
{ {
"amend": 1, "amend": 1,
"cancel": 1, "cancel": 1,
"create": 1, "create": 1,
"delete": 1, "delete": 1,
"email": 1, "email": 1,
"export": 1, "export": 1,
"if_owner": 0, "print": 1,
"import": 0, "read": 1,
"permlevel": 0, "report": 1,
"print": 1, "role": "HR Manager",
"read": 1, "share": 1,
"report": 1, "submit": 1,
"role": "HR Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 1,
"write": 1 "write": 1
}, },
{ {
"amend": 1, "amend": 1,
"cancel": 1, "cancel": 1,
"create": 1, "create": 1,
"delete": 1, "delete": 1,
"email": 1, "email": 1,
"export": 1, "export": 1,
"if_owner": 0, "print": 1,
"import": 0, "read": 1,
"permlevel": 0, "report": 1,
"print": 1, "role": "HR User",
"read": 1, "share": 1,
"report": 1, "submit": 1,
"role": "HR User",
"set_user_permissions": 0,
"share": 1,
"submit": 1,
"write": 1 "write": 1
}, },
{ {
"amend": 0, "create": 1,
"cancel": 0, "delete": 1,
"create": 1, "email": 1,
"delete": 1, "export": 1,
"email": 1, "print": 1,
"export": 1, "read": 1,
"if_owner": 0, "report": 1,
"import": 0, "role": "Employee",
"permlevel": 0, "share": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Employee",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1 "write": 1
} }
], ],
"quick_entry": 0, "sort_field": "modified",
"read_only": 0, "sort_order": "DESC",
"read_only_onload": 0, "track_changes": 1
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1,
"track_seen": 0,
"track_views": 0
} }

View File

@@ -1,4 +1,5 @@
{ {
"actions": [],
"allow_import": 1, "allow_import": 1,
"allow_rename": 1, "allow_rename": 1,
"autoname": "field:leave_type_name", "autoname": "field:leave_type_name",
@@ -24,10 +25,12 @@
"encashment", "encashment",
"allow_encashment", "allow_encashment",
"encashment_threshold_days", "encashment_threshold_days",
"column_break_17",
"earning_component", "earning_component",
"earned_leave", "earned_leave",
"is_earned_leave", "is_earned_leave",
"earned_leave_frequency", "earned_leave_frequency",
"column_break_22",
"rounding" "rounding"
], ],
"fields": [ "fields": [
@@ -172,11 +175,20 @@
"fieldname": "maximum_carry_forwarded_leaves", "fieldname": "maximum_carry_forwarded_leaves",
"fieldtype": "Float", "fieldtype": "Float",
"label": "Maximum Carry Forwarded Leaves" "label": "Maximum Carry Forwarded Leaves"
},
{
"fieldname": "column_break_17",
"fieldtype": "Column Break"
},
{
"fieldname": "column_break_22",
"fieldtype": "Column Break"
} }
], ],
"icon": "fa fa-flag", "icon": "fa fa-flag",
"idx": 1, "idx": 1,
"modified": "2019-09-06 18:48:48.946074", "links": [],
"modified": "2019-12-12 12:48:37.780254",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "HR", "module": "HR",
"name": "Leave Type", "name": "Leave Type",

File diff suppressed because it is too large Load Diff

View File

@@ -1,765 +1,203 @@
{ {
"allow_copy": 0, "actions": [],
"allow_events_in_timeline": 0, "creation": "2016-06-30 15:32:36.385111",
"allow_guest_to_view": 0, "doctype": "DocType",
"allow_import": 0, "editable_grid": 1,
"allow_rename": 0, "engine": "InnoDB",
"beta": 0, "field_order": [
"creation": "2016-06-30 15:32:36.385111", "salary_component",
"custom": 0, "abbr",
"docstatus": 0, "statistical_component",
"doctype": "DocType", "column_break_3",
"document_type": "", "deduct_full_tax_on_selected_payroll_date",
"editable_grid": 1, "depends_on_payment_days",
"is_tax_applicable",
"is_flexible_benefit",
"variable_based_on_taxable_salary",
"section_break_2",
"condition",
"amount_based_on_formula",
"formula",
"amount",
"do_not_include_in_total",
"default_amount",
"additional_amount",
"tax_on_flexible_benefit",
"tax_on_additional_salary",
"section_break_11",
"condition_and_formula_help"
],
"fields": [ "fields": [
{ {
"allow_bulk_edit": 0, "fieldname": "salary_component",
"allow_in_quick_entry": 0, "fieldtype": "Link",
"allow_on_submit": 0, "in_list_view": 1,
"bold": 0, "label": "Component",
"collapsible": 0, "options": "Salary Component",
"columns": 0, "reqd": 1
"fetch_if_empty": 0, },
"fieldname": "salary_component",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Component",
"length": 0,
"no_copy": 0,
"options": "Salary Component",
"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,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "columns": 1,
"allow_in_quick_entry": 0, "depends_on": "eval:doc.parenttype=='Salary Structure'",
"allow_on_submit": 0, "fetch_from": "salary_component.salary_component_abbr",
"bold": 0, "fieldname": "abbr",
"collapsible": 0, "fieldtype": "Data",
"columns": 1, "in_list_view": 1,
"default": "", "label": "Abbr",
"depends_on": "eval:doc.parenttype=='Salary Structure'", "print_hide": 1,
"fetch_from": "salary_component.salary_component_abbr", "read_only": 1
"fetch_if_empty": 0, },
"fieldname": "abbr",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Abbr",
"length": 0,
"no_copy": 0,
"options": "",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "column_break_3",
"allow_in_quick_entry": 0, "fieldtype": "Column Break"
"allow_on_submit": 0, },
"bold": 0,
"collapsible": 0,
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "column_break_3",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "default": "0",
"allow_in_quick_entry": 0, "description": "If selected, the value specified or calculated in this component will not contribute to the earnings or deductions. However, it's value can be referenced by other components that can be added or deducted. ",
"allow_on_submit": 0, "fetch_from": "salary_component.statistical_component",
"bold": 0, "fieldname": "statistical_component",
"collapsible": 0, "fieldtype": "Check",
"columns": 0, "in_list_view": 1,
"description": "If selected, the value specified or calculated in this component will not contribute to the earnings or deductions. However, it's value can be referenced by other components that can be added or deducted. ", "label": "Statistical Component"
"fetch_from": "salary_component.statistical_component", },
"fetch_if_empty": 0,
"fieldname": "statistical_component",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Statistical Component",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "default": "0",
"allow_in_quick_entry": 0, "fetch_from": "salary_component.is_tax_applicable",
"allow_on_submit": 0, "fieldname": "is_tax_applicable",
"bold": 0, "fieldtype": "Check",
"collapsible": 0, "label": "Is Tax Applicable",
"columns": 0, "print_hide": 1,
"fetch_from": "salary_component.is_tax_applicable", "read_only": 1
"fetch_if_empty": 0, },
"fieldname": "is_tax_applicable",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Tax Applicable",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "default": "0",
"allow_in_quick_entry": 0, "fetch_from": "salary_component.is_flexible_benefit",
"allow_on_submit": 0, "fieldname": "is_flexible_benefit",
"bold": 0, "fieldtype": "Check",
"collapsible": 0, "label": "Is Flexible Benefit",
"columns": 0, "print_hide": 1,
"fetch_from": "salary_component.is_flexible_benefit", "read_only": 1
"fetch_if_empty": 0, },
"fieldname": "is_flexible_benefit",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Flexible Benefit",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "default": "0",
"allow_in_quick_entry": 0, "fetch_from": "salary_component.variable_based_on_taxable_salary",
"allow_on_submit": 0, "fieldname": "variable_based_on_taxable_salary",
"bold": 0, "fieldtype": "Check",
"collapsible": 0, "label": "Variable Based On Taxable Salary",
"columns": 0, "print_hide": 1,
"default": "", "read_only": 1
"fetch_from": "salary_component.variable_based_on_taxable_salary", },
"fetch_if_empty": 0,
"fieldname": "variable_based_on_taxable_salary",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Variable Based On Taxable Salary",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "default": "0",
"allow_in_quick_entry": 0, "fetch_from": "salary_component.depends_on_payment_days",
"allow_on_submit": 0, "fieldname": "depends_on_payment_days",
"bold": 0, "fieldtype": "Check",
"collapsible": 0, "label": "Depends on Payment Days",
"columns": 0, "print_hide": 1,
"depends_on": "", "read_only": 1
"fetch_from": "salary_component.depends_on_payment_days", },
"fetch_if_empty": 0,
"fieldname": "depends_on_payment_days",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Depends on Payment Days",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "default": "0",
"allow_in_quick_entry": 0, "fieldname": "deduct_full_tax_on_selected_payroll_date",
"allow_on_submit": 0, "fieldtype": "Check",
"bold": 0, "label": "Deduct Full Tax on Selected Payroll Date",
"collapsible": 0, "print_hide": 1,
"columns": 0, "read_only": 1
"fetch_if_empty": 0, },
"fieldname": "deduct_full_tax_on_selected_payroll_date",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Deduct Full Tax on Selected Payroll Date",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "depends_on": "eval:doc.is_flexible_benefit != 1",
"allow_in_quick_entry": 0, "fieldname": "section_break_2",
"allow_on_submit": 0, "fieldtype": "Section Break"
"bold": 0, },
"collapsible": 0,
"columns": 0,
"depends_on": "eval:doc.is_flexible_benefit != 1",
"fetch_if_empty": 0,
"fieldname": "section_break_2",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "allow_on_submit": 1,
"allow_in_quick_entry": 0, "depends_on": "eval:doc.parenttype=='Salary Structure'",
"allow_on_submit": 1, "fieldname": "condition",
"bold": 0, "fieldtype": "Code",
"collapsible": 0, "label": "Condition"
"columns": 0, },
"depends_on": "eval:doc.parenttype=='Salary Structure'",
"fetch_if_empty": 0,
"fieldname": "condition",
"fieldtype": "Code",
"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": "Condition",
"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,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "default": "0",
"allow_in_quick_entry": 0, "depends_on": "eval:doc.parenttype=='Salary Structure'",
"allow_on_submit": 0, "fieldname": "amount_based_on_formula",
"bold": 0, "fieldtype": "Check",
"collapsible": 0, "label": "Amount based on formula"
"columns": 0, },
"default": "0",
"depends_on": "eval:doc.parenttype=='Salary Structure'",
"fetch_from": "",
"fetch_if_empty": 0,
"fieldname": "amount_based_on_formula",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amount based on formula",
"length": 0,
"no_copy": 0,
"options": "",
"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,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "allow_on_submit": 1,
"allow_in_quick_entry": 0, "depends_on": "eval:doc.amount_based_on_formula!==0 && doc.parenttype==='Salary Structure'",
"allow_on_submit": 1, "fieldname": "formula",
"bold": 0, "fieldtype": "Code",
"collapsible": 0, "in_list_view": 1,
"columns": 0, "label": "Formula"
"default": "", },
"depends_on": "eval:doc.amount_based_on_formula!==0 && doc.parenttype==='Salary Structure'",
"description": "",
"fetch_if_empty": 0,
"fieldname": "formula",
"fieldtype": "Code",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Formula",
"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,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "depends_on": "eval:doc.amount_based_on_formula!==1 || doc.parenttype==='Salary Slip'",
"allow_in_quick_entry": 0, "fieldname": "amount",
"allow_on_submit": 0, "fieldtype": "Currency",
"bold": 0, "in_list_view": 1,
"collapsible": 0, "label": "Amount",
"columns": 0, "options": "Company:company:default_currency"
"depends_on": "eval:doc.amount_based_on_formula!==1 || doc.parenttype==='Salary Slip'", },
"fetch_if_empty": 0,
"fieldname": "amount",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Amount",
"length": 0,
"no_copy": 0,
"options": "Company:company:default_currency",
"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,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "default": "0",
"allow_in_quick_entry": 0, "fieldname": "do_not_include_in_total",
"allow_on_submit": 0, "fieldtype": "Check",
"bold": 0, "label": "Do not include in total"
"collapsible": 0, },
"columns": 0,
"fetch_if_empty": 0,
"fieldname": "do_not_include_in_total",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Do not include in total",
"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,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "depends_on": "eval:doc.parenttype=='Salary Structure'",
"allow_in_quick_entry": 0, "fieldname": "default_amount",
"allow_on_submit": 0, "fieldtype": "Currency",
"bold": 0, "label": "Default Amount",
"collapsible": 0, "options": "Company:company:default_currency",
"columns": 0, "print_hide": 1
"depends_on": "eval:doc.parenttype=='Salary Structure'", },
"fetch_if_empty": 0,
"fieldname": "default_amount",
"fieldtype": "Currency",
"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": "Default Amount",
"length": 0,
"no_copy": 0,
"options": "Company:company:default_currency",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "additional_amount",
"allow_in_quick_entry": 0, "fieldtype": "Currency",
"allow_on_submit": 0, "hidden": 1,
"bold": 0, "label": "Additional Amount",
"collapsible": 0, "no_copy": 1,
"columns": 0, "print_hide": 1,
"default": "", "read_only": 1
"fetch_from": "", },
"fetch_if_empty": 0,
"fieldname": "additional_amount",
"fieldtype": "Currency",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Additional Amount",
"length": 0,
"no_copy": 1,
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "depends_on": "eval:doc.parenttype=='Salary Slip' && doc.parentfield=='deductions' && doc.variable_based_on_taxable_salary == 1",
"allow_in_quick_entry": 0, "fieldname": "tax_on_flexible_benefit",
"allow_on_submit": 0, "fieldtype": "Currency",
"bold": 0, "label": "Tax on flexible benefit",
"collapsible": 0, "read_only": 1
"columns": 0, },
"depends_on": "eval:doc.parenttype=='Salary Slip' && doc.parentfield=='deductions' && doc.variable_based_on_taxable_salary == 1",
"fetch_if_empty": 0,
"fieldname": "tax_on_flexible_benefit",
"fieldtype": "Currency",
"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": "Tax on flexible benefit",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "depends_on": "eval:doc.parenttype=='Salary Slip' && doc.parentfield=='deductions' && doc.variable_based_on_taxable_salary == 1",
"allow_in_quick_entry": 0, "fieldname": "tax_on_additional_salary",
"allow_on_submit": 0, "fieldtype": "Currency",
"bold": 0, "label": "Tax on additional salary",
"collapsible": 0, "read_only": 1
"columns": 0, },
"depends_on": "eval:doc.parenttype=='Salary Slip' && doc.parentfield=='deductions' && doc.variable_based_on_taxable_salary == 1",
"fetch_if_empty": 0,
"fieldname": "tax_on_additional_salary",
"fieldtype": "Currency",
"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": "Tax on additional salary",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "depends_on": "eval:doc.parenttype=='Salary Structure'",
"allow_in_quick_entry": 0, "fieldname": "section_break_11",
"allow_on_submit": 0, "fieldtype": "Column Break"
"bold": 0, },
"collapsible": 0,
"columns": 0,
"depends_on": "eval:doc.parenttype=='Salary Structure'",
"fetch_if_empty": 0,
"fieldname": "section_break_11",
"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,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "depends_on": "eval:doc.parenttype=='Salary Structure'",
"allow_in_quick_entry": 0, "fieldname": "condition_and_formula_help",
"allow_on_submit": 0, "fieldtype": "HTML",
"bold": 0, "label": "Condition and Formula Help",
"collapsible": 0, "options": "<h3>Condition and Formula Help</h3>\n\n<p>Notes:</p>\n\n<ol>\n<li>Use field <code>base</code> for using base salary of the Employee</li>\n<li>Use Salary Component abbreviations in conditions and formulas. <code>BS = Basic Salary</code></li>\n<li>Use field name for employee details in conditions and formulas. <code>Employment Type = employment_type</code><code>Branch = branch</code></li>\n<li>Use field name from Salary Slip in conditions and formulas. <code>Payment Days = payment_days</code><code>Leave without pay = leave_without_pay</code></li>\n<li>Direct Amount can also be entered based on Condtion. See example 3</li></ol>\n\n<h4>Examples</h4>\n<ol>\n<li>Calculating Basic Salary based on <code>base</code>\n<pre><code>Condition: base &lt; 10000</code></pre>\n<pre><code>Formula: base * .2</code></pre></li>\n<li>Calculating HRA based on Basic Salary<code>BS</code> \n<pre><code>Condition: BS &gt; 2000</code></pre>\n<pre><code>Formula: BS * .1</code></pre></li>\n<li>Calculating TDS based on Employment Type<code>employment_type</code> \n<pre><code>Condition: employment_type==\"Intern\"</code></pre>\n<pre><code>Amount: 1000</code></pre></li>\n</ol>"
"columns": 0,
"depends_on": "eval:doc.parenttype=='Salary Structure'",
"fetch_if_empty": 0,
"fieldname": "condition_and_formula_help",
"fieldtype": "HTML",
"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": "Condition and Formula Help",
"length": 0,
"no_copy": 0,
"options": "<h3>Condition and Formula Help</h3>\n\n<p>Notes:</p>\n\n<ol>\n<li>Use field <code>base</code> for using base salary of the Employee</li>\n<li>Use Salary Component abbreviations in conditions and formulas. <code>BS = Basic Salary</code></li>\n<li>Use field name for employee details in conditions and formulas. <code>Employment Type = employment_type</code><code>Branch = branch</code></li>\n<li>Use field name from Salary Slip in conditions and formulas. <code>Payment Days = payment_days</code><code>Leave without pay = leave_without_pay</code></li>\n<li>Direct Amount can also be entered based on Condtion. See example 3</li></ol>\n\n<h4>Examples</h4>\n<ol>\n<li>Calculating Basic Salary based on <code>base</code>\n<pre><code>Condition: base &lt; 10000</code></pre>\n<pre><code>Formula: base * .2</code></pre></li>\n<li>Calculating HRA based on Basic Salary<code>BS</code> \n<pre><code>Condition: BS &gt; 2000</code></pre>\n<pre><code>Formula: BS * .1</code></pre></li>\n<li>Calculating TDS based on Employment Type<code>employment_type</code> \n<pre><code>Condition: employment_type==\"Intern\"</code></pre>\n<pre><code>Amount: 1000</code></pre></li>\n</ol>",
"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,
"translatable": 0,
"unique": 0
} }
], ],
"has_web_view": 0, "istable": 1,
"hide_heading": 0, "links": [],
"hide_toolbar": 0, "modified": "2019-12-31 17:15:25.646689",
"idx": 0, "modified_by": "Administrator",
"image_view": 0, "module": "HR",
"in_create": 0, "name": "Salary Detail",
"is_submittable": 0, "owner": "Administrator",
"issingle": 0, "permissions": [],
"istable": 1, "quick_entry": 1,
"max_attachments": 0, "sort_field": "modified",
"modified": "2019-05-11 17:33:08.508653", "sort_order": "DESC"
"modified_by": "Administrator",
"module": "HR",
"name": "Salary Detail",
"name_case": "",
"owner": "Administrator",
"permissions": [],
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 0,
"track_seen": 0,
"track_views": 0
} }

File diff suppressed because it is too large Load Diff

View File

@@ -50,7 +50,8 @@ class SalarySlip(TransactionBase):
self.calculate_net_pay() self.calculate_net_pay()
company_currency = erpnext.get_company_currency(self.company) company_currency = erpnext.get_company_currency(self.company)
self.total_in_words = money_in_words(self.rounded_total, company_currency) total = self.net_pay if self.is_rounding_total_disabled() else self.rounded_total
self.total_in_words = money_in_words(total, company_currency)
if frappe.db.get_single_value("HR Settings", "max_working_hours_against_timesheet"): if frappe.db.get_single_value("HR Settings", "max_working_hours_against_timesheet"):
max_working_hours = frappe.db.get_single_value("HR Settings", "max_working_hours_against_timesheet") max_working_hours = frappe.db.get_single_value("HR Settings", "max_working_hours_against_timesheet")
@@ -90,6 +91,9 @@ class SalarySlip(TransactionBase):
if date_diff(self.end_date, self.start_date) < 0: if date_diff(self.end_date, self.start_date) < 0:
frappe.throw(_("To date cannot be before From date")) frappe.throw(_("To date cannot be before From date"))
def is_rounding_total_disabled(self):
return cint(frappe.db.get_single_value("HR Settings", "disable_rounded_total"))
def check_existing(self): def check_existing(self):
if not self.salary_slip_based_on_timesheet: if not self.salary_slip_based_on_timesheet:
ret_exist = frappe.db.sql("""select name from `tabSalary Slip` ret_exist = frappe.db.sql("""select name from `tabSalary Slip`

File diff suppressed because it is too large Load Diff

View File

@@ -1,524 +1,170 @@
{ {
"allow_copy": 0, "actions": [],
"allow_guest_to_view": 0, "allow_import": 1,
"allow_import": 1, "autoname": "HR-SSA-.YY.-.MM.-.#####",
"allow_rename": 0, "creation": "2018-04-13 16:38:41.769237",
"autoname": "HR-SSA-.YY.-.MM.-.#####", "doctype": "DocType",
"beta": 0, "editable_grid": 1,
"creation": "2018-04-13 16:38:41.769237", "engine": "InnoDB",
"custom": 0, "field_order": [
"docstatus": 0, "employee",
"doctype": "DocType", "employee_name",
"document_type": "", "department",
"editable_grid": 1, "designation",
"engine": "InnoDB", "column_break_6",
"salary_structure",
"from_date",
"company",
"section_break_7",
"base",
"column_break_9",
"variable",
"amended_from"
],
"fields": [ "fields": [
{ {
"allow_bulk_edit": 0, "fieldname": "employee",
"allow_in_quick_entry": 0, "fieldtype": "Link",
"allow_on_submit": 0, "in_list_view": 1,
"bold": 0, "in_standard_filter": 1,
"collapsible": 0, "label": "Employee",
"columns": 0, "options": "Employee",
"fieldname": "employee", "reqd": 1,
"fieldtype": "Link", "search_index": 1
"hidden": 0, },
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Employee",
"length": 0,
"no_copy": 0,
"options": "Employee",
"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": 1,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fetch_from": "employee.employee_name",
"allow_in_quick_entry": 0, "fieldname": "employee_name",
"allow_on_submit": 0, "fieldtype": "Data",
"bold": 0, "label": "Employee Name",
"collapsible": 0, "read_only": 1
"columns": 0, },
"fetch_from": "employee.employee_name",
"fieldname": "employee_name",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Employee Name",
"length": 0,
"no_copy": 0,
"options": "",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fetch_from": "employee.department",
"allow_in_quick_entry": 0, "fieldname": "department",
"allow_on_submit": 0, "fieldtype": "Link",
"bold": 0, "in_standard_filter": 1,
"collapsible": 0, "label": "Department",
"columns": 0, "options": "Department",
"fetch_from": "employee.department", "read_only": 1
"fieldname": "department", },
"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": "Department",
"length": 0,
"no_copy": 0,
"options": "Department",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fetch_from": "employee.designation",
"allow_in_quick_entry": 0, "fieldname": "designation",
"allow_on_submit": 0, "fieldtype": "Link",
"bold": 0, "in_standard_filter": 1,
"collapsible": 0, "label": "Designation",
"columns": 0, "options": "Designation",
"fetch_from": "employee.designation", "read_only": 1
"fieldname": "designation", },
"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": "Designation",
"length": 0,
"no_copy": 0,
"options": "Designation",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "column_break_6",
"allow_in_quick_entry": 0, "fieldtype": "Column Break"
"allow_on_submit": 0, },
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "column_break_6",
"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,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "salary_structure",
"allow_in_quick_entry": 0, "fieldtype": "Link",
"allow_on_submit": 0, "in_list_view": 1,
"bold": 0, "in_standard_filter": 1,
"collapsible": 0, "label": "Salary Structure",
"columns": 0, "options": "Salary Structure",
"fieldname": "salary_structure", "reqd": 1,
"fieldtype": "Link", "search_index": 1
"hidden": 0, },
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Salary Structure",
"length": 0,
"no_copy": 0,
"options": "Salary Structure",
"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": 1,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "from_date",
"allow_in_quick_entry": 0, "fieldtype": "Date",
"allow_on_submit": 0, "label": "From Date",
"bold": 0, "reqd": 1
"collapsible": 0, },
"columns": 0,
"fieldname": "from_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "From Date",
"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,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "company",
"allow_in_quick_entry": 0, "fieldtype": "Link",
"allow_on_submit": 0, "label": "Company",
"bold": 0, "options": "Company",
"collapsible": 0, "read_only": 1,
"columns": 0, "reqd": 1
"fieldname": "company", },
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Company",
"length": 0,
"no_copy": 0,
"options": "Company",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "section_break_7",
"allow_in_quick_entry": 0, "fieldtype": "Section Break"
"allow_on_submit": 0, },
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "section_break_7",
"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,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "base",
"allow_in_quick_entry": 0, "fieldtype": "Currency",
"allow_on_submit": 0, "label": "Base",
"bold": 0, "options": "Company:company:default_currency"
"collapsible": 0, },
"columns": 0,
"fieldname": "base",
"fieldtype": "Currency",
"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": "Base",
"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,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "column_break_9",
"allow_in_quick_entry": 0, "fieldtype": "Column Break"
"allow_on_submit": 0, },
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "column_break_9",
"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,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "variable",
"allow_in_quick_entry": 0, "fieldtype": "Currency",
"allow_on_submit": 0, "label": "Variable",
"bold": 0, "options": "Company:company:default_currency"
"collapsible": 0, },
"columns": 0,
"fieldname": "variable",
"fieldtype": "Currency",
"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": "Variable",
"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,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "amended_from",
"allow_in_quick_entry": 0, "fieldtype": "Link",
"allow_on_submit": 0, "label": "Amended From",
"bold": 0, "no_copy": 1,
"collapsible": 0, "options": "Salary Structure Assignment",
"columns": 0, "print_hide": 1,
"fieldname": "amended_from", "read_only": 1
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
"length": 0,
"no_copy": 1,
"options": "Salary Structure Assignment",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
} }
], ],
"has_web_view": 0, "is_submittable": 1,
"hide_heading": 0, "links": [],
"hide_toolbar": 0, "modified": "2019-12-31 16:35:34.415099",
"idx": 0, "modified_by": "Administrator",
"image_view": 0, "module": "HR",
"in_create": 0, "name": "Salary Structure Assignment",
"is_submittable": 1, "owner": "Administrator",
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2018-08-21 16:15:48.755450",
"modified_by": "Administrator",
"module": "HR",
"name": "Salary Structure Assignment",
"name_case": "",
"owner": "Administrator",
"permissions": [ "permissions": [
{ {
"amend": 0, "create": 1,
"cancel": 0, "delete": 1,
"create": 1, "email": 1,
"delete": 1, "export": 1,
"email": 1, "print": 1,
"export": 1, "read": 1,
"if_owner": 0, "report": 1,
"import": 0, "role": "System Manager",
"permlevel": 0, "share": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1 "write": 1
}, },
{ {
"amend": 1, "amend": 1,
"cancel": 1, "cancel": 1,
"create": 1, "create": 1,
"delete": 1, "delete": 1,
"email": 1, "email": 1,
"export": 1, "export": 1,
"if_owner": 0, "print": 1,
"import": 0, "read": 1,
"permlevel": 0, "report": 1,
"print": 1, "role": "HR Manager",
"read": 1, "share": 1,
"report": 1, "submit": 1,
"role": "HR Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 1,
"write": 1 "write": 1
}, },
{ {
"amend": 0, "create": 1,
"cancel": 0, "email": 1,
"create": 1, "export": 1,
"delete": 0, "print": 1,
"email": 1, "read": 1,
"export": 1, "report": 1,
"if_owner": 0, "role": "HR User",
"import": 0, "share": 1,
"permlevel": 0, "submit": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "HR User",
"set_user_permissions": 0,
"share": 1,
"submit": 1,
"write": 1 "write": 1
} }
], ],
"quick_entry": 0, "sort_field": "modified",
"read_only": 0, "sort_order": "DESC",
"read_only_onload": 0, "title_field": "employee_name",
"show_name_in_global_search": 0, "track_changes": 1
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "employee_name",
"track_changes": 1,
"track_seen": 0,
"track_views": 0
} }

View File

@@ -1,4 +1,5 @@
{ {
"actions": [],
"allow_import": 1, "allow_import": 1,
"autoname": "HR-SHA-.YY.-.MM.-.#####", "autoname": "HR-SHA-.YY.-.MM.-.#####",
"creation": "2018-04-13 16:25:04.562730", "creation": "2018-04-13 16:25:04.562730",
@@ -8,12 +9,12 @@
"field_order": [ "field_order": [
"employee", "employee",
"employee_name", "employee_name",
"department",
"shift_type", "shift_type",
"column_break_3", "column_break_3",
"company", "company",
"date", "date",
"shift_request", "shift_request",
"department",
"amended_from" "amended_from"
], ],
"fields": [ "fields": [
@@ -82,7 +83,8 @@
} }
], ],
"is_submittable": 1, "is_submittable": 1,
"modified": "2019-05-30 15:40:54.418427", "links": [],
"modified": "2019-12-12 15:49:06.956901",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "HR", "module": "HR",
"name": "Shift Assignment", "name": "Shift Assignment",

View File

@@ -11,7 +11,7 @@ from frappe.model.document import Document
from frappe.utils import cint, getdate, get_datetime from frappe.utils import cint, getdate, get_datetime
from erpnext.hr.doctype.shift_assignment.shift_assignment import get_actual_start_end_datetime_of_shift, get_employee_shift from erpnext.hr.doctype.shift_assignment.shift_assignment import get_actual_start_end_datetime_of_shift, get_employee_shift
from erpnext.hr.doctype.employee_checkin.employee_checkin import mark_attendance_and_link_log, calculate_working_hours from erpnext.hr.doctype.employee_checkin.employee_checkin import mark_attendance_and_link_log, calculate_working_hours
from erpnext.hr.doctype.attendance.attendance import mark_absent from erpnext.hr.doctype.attendance.attendance import mark_attendance
from erpnext.hr.doctype.employee.employee import get_holiday_list_for_employee from erpnext.hr.doctype.employee.employee import get_holiday_list_for_employee
class ShiftType(Document): class ShiftType(Document):
@@ -35,7 +35,7 @@ class ShiftType(Document):
def get_attendance(self, logs): def get_attendance(self, logs):
"""Return attendance_status, working_hours for a set of logs belonging to a single shift. """Return attendance_status, working_hours for a set of logs belonging to a single shift.
Assumtion: Assumtion:
1. These logs belongs to an single shift, single employee and is not in a holiday date. 1. These logs belongs to an single shift, single employee and is not in a holiday date.
2. Logs are in chronological order 2. Logs are in chronological order
""" """
@@ -43,10 +43,10 @@ class ShiftType(Document):
total_working_hours, in_time, out_time = calculate_working_hours(logs, self.determine_check_in_and_check_out, self.working_hours_calculation_based_on) total_working_hours, in_time, out_time = calculate_working_hours(logs, self.determine_check_in_and_check_out, self.working_hours_calculation_based_on)
if cint(self.enable_entry_grace_period) and in_time and in_time > logs[0].shift_start + timedelta(minutes=cint(self.late_entry_grace_period)): if cint(self.enable_entry_grace_period) and in_time and in_time > logs[0].shift_start + timedelta(minutes=cint(self.late_entry_grace_period)):
late_entry = True late_entry = True
if cint(self.enable_exit_grace_period) and out_time and out_time < logs[0].shift_end - timedelta(minutes=cint(self.early_exit_grace_period)): if cint(self.enable_exit_grace_period) and out_time and out_time < logs[0].shift_end - timedelta(minutes=cint(self.early_exit_grace_period)):
early_exit = True early_exit = True
if self.working_hours_threshold_for_absent and total_working_hours < self.working_hours_threshold_for_absent: if self.working_hours_threshold_for_absent and total_working_hours < self.working_hours_threshold_for_absent:
return 'Absent', total_working_hours, late_entry, early_exit return 'Absent', total_working_hours, late_entry, early_exit
if self.working_hours_threshold_for_half_day and total_working_hours < self.working_hours_threshold_for_half_day: if self.working_hours_threshold_for_half_day and total_working_hours < self.working_hours_threshold_for_half_day:
@@ -75,7 +75,7 @@ class ShiftType(Document):
for date in dates: for date in dates:
shift_details = get_employee_shift(employee, date, True) shift_details = get_employee_shift(employee, date, True)
if shift_details and shift_details.shift_type.name == self.name: if shift_details and shift_details.shift_type.name == self.name:
mark_absent(employee, date, self.name) mark_attendance(employee, date, self.name, 'Absent')
def get_assigned_employee(self, from_date=None, consider_default_shift=False): def get_assigned_employee(self, from_date=None, consider_default_shift=False):
filters = {'date':('>=', from_date), 'shift_type': self.name, 'docstatus': '1'} filters = {'date':('>=', from_date), 'shift_type': self.name, 'docstatus': '1'}
@@ -107,15 +107,15 @@ def get_filtered_date_list(employee, start_date, end_date, filter_attendance=Tru
condition_query = '' condition_query = ''
if filter_attendance: if filter_attendance:
condition_query += """ and a.selected_date not in ( condition_query += """ and a.selected_date not in (
select attendance_date from `tabAttendance` select attendance_date from `tabAttendance`
where docstatus = '1' and employee = %(employee)s where docstatus = 1 and employee = %(employee)s
and attendance_date between %(start_date)s and %(end_date)s)""" and attendance_date between %(start_date)s and %(end_date)s)"""
if holiday_list: if holiday_list:
condition_query += """ and a.selected_date not in ( condition_query += """ and a.selected_date not in (
select holiday_date from `tabHoliday` where parenttype = 'Holiday List' and select holiday_date from `tabHoliday` where parenttype = 'Holiday List' and
parentfield = 'holidays' and parent = %(holiday_list)s parentfield = 'holidays' and parent = %(holiday_list)s
and holiday_date between %(start_date)s and %(end_date)s)""" and holiday_date between %(start_date)s and %(end_date)s)"""
dates = frappe.db.sql("""select * from dates = frappe.db.sql("""select * from
({base_dates_query}) as a ({base_dates_query}) as a
where a.selected_date <= %(end_date)s {condition_query} where a.selected_date <= %(end_date)s {condition_query}

View File

@@ -1,4 +1,5 @@
{ {
"actions": [],
"autoname": "HR-TRQ-.YYYY.-.#####", "autoname": "HR-TRQ-.YYYY.-.#####",
"creation": "2018-05-15 06:32:33.950356", "creation": "2018-05-15 06:32:33.950356",
"doctype": "DocType", "doctype": "DocType",
@@ -11,8 +12,6 @@
"column_break_2", "column_break_2",
"purpose_of_travel", "purpose_of_travel",
"details_of_sponsor", "details_of_sponsor",
"section_break_4",
"description",
"employee_details", "employee_details",
"employee", "employee",
"employee_name", "employee_name",
@@ -23,6 +22,8 @@
"personal_id_type", "personal_id_type",
"personal_id_number", "personal_id_number",
"passport_number", "passport_number",
"section_break_4",
"description",
"travel_itinerary", "travel_itinerary",
"itinerary", "itinerary",
"costing_details", "costing_details",
@@ -33,7 +34,8 @@
"event_details", "event_details",
"name_of_organizer", "name_of_organizer",
"address_of_organizer", "address_of_organizer",
"other_details" "other_details",
"amended_from"
], ],
"fields": [ "fields": [
{ {
@@ -213,7 +215,8 @@
} }
], ],
"is_submittable": 1, "is_submittable": 1,
"modified": "2019-05-25 23:15:00.609186", "links": [],
"modified": "2019-12-12 18:42:26.451359",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "HR", "module": "HR",
"name": "Travel Request", "name": "Travel Request",

View File

@@ -70,7 +70,7 @@ def map_fields(items):
field_mappings = get_field_mappings() field_mappings = get_field_mappings()
table_fields = [d.fieldname for d in frappe.get_meta('Item').get_table_fields()] table_fields = [d.fieldname for d in frappe.get_meta('Item').get_table_fields()]
hub_seller_name = frappe.db.get_value('Marketplace Settings' , 'Marketplace Settings', 'hub_seller_name') hub_seller_name = frappe.db.get_value('Marketplace Settings', 'Marketplace Settings', 'hub_seller_name')
for item in items: for item in items:
for fieldname in table_fields: for fieldname in table_fields:
@@ -129,6 +129,7 @@ def update_item(ref_doc, data):
@frappe.whitelist() @frappe.whitelist()
def publish_selected_items(items_to_publish): def publish_selected_items(items_to_publish):
items_to_publish = json.loads(items_to_publish) items_to_publish = json.loads(items_to_publish)
items_to_update = []
if not len(items_to_publish): if not len(items_to_publish):
frappe.throw(_('No items to publish')) frappe.throw(_('No items to publish'))
@@ -136,14 +137,24 @@ def publish_selected_items(items_to_publish):
item_code = item.get('item_code') item_code = item.get('item_code')
frappe.db.set_value('Item', item_code, 'publish_in_hub', 1) frappe.db.set_value('Item', item_code, 'publish_in_hub', 1)
frappe.get_doc({ hub_dict = {
'doctype': 'Hub Tracked Item', 'doctype': 'Hub Tracked Item',
'item_code': item_code, 'item_code': item_code,
'published': 1,
'hub_category': item.get('hub_category'), 'hub_category': item.get('hub_category'),
'image_list': item.get('image_list') 'image_list': item.get('image_list')
}).insert(ignore_if_duplicate=True) }
if frappe.db.exists('Hub Tracked Item', item_code):
items_to_update.append(item)
hub_tracked_item = frappe.get_doc('Hub Tracked Item', item_code)
hub_tracked_item.update(hub_dict)
hub_tracked_item.save()
else:
frappe.get_doc(hub_dict).insert(ignore_if_duplicate=True)
items = map_fields(items_to_publish) items_to_publish = list(filter(lambda x: x not in items_to_update, items_to_publish))
new_items = map_fields(items_to_publish)
existing_items = map_fields(items_to_update)
try: try:
item_sync_preprocess(len(items)) item_sync_preprocess(len(items))
@@ -151,12 +162,26 @@ def publish_selected_items(items_to_publish):
# TODO: Publish Progress # TODO: Publish Progress
connection = get_hub_connection() connection = get_hub_connection()
connection.insert_many(items) connection.insert_many(new_items)
connection.bulk_update(existing_items)
item_sync_postprocess() item_sync_postprocess()
except Exception as e: except Exception as e:
frappe.log_error(message=e, title='Hub Sync Error') frappe.log_error(message=e, title='Hub Sync Error')
@frappe.whitelist()
def unpublish_item(item_code, hub_item_name):
''' Remove item listing from the marketplace '''
response = call_hub_method('unpublish_item', {
'hub_item_name': hub_item_name
})
if response:
frappe.db.set_value('Item', item_code, 'publish_in_hub', 0)
else:
frappe.throw(_('Unable to update remote activity'))
@frappe.whitelist() @frappe.whitelist()
def get_unregistered_users(): def get_unregistered_users():
settings = frappe.get_single('Marketplace Settings') settings = frappe.get_single('Marketplace Settings')

View File

@@ -77,6 +77,38 @@
"translatable": 0, "translatable": 0,
"unique": 0 "unique": 0
}, },
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "published",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Published",
"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,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "allow_bulk_edit": 0,
"allow_in_quick_entry": 0, "allow_in_quick_entry": 0,
@@ -120,7 +152,7 @@
"issingle": 0, "issingle": 0,
"istable": 0, "istable": 0,
"max_attachments": 0, "max_attachments": 0,
"modified": "2018-09-10 11:37:35.951019", "modified": "2019-12-10 11:37:35.951019",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Hub Node", "module": "Hub Node",
"name": "Hub Tracked Item", "name": "Hub Tracked Item",

View File

@@ -768,7 +768,7 @@ def add_additional_cost(stock_entry, work_order):
items = {} items = {}
for d in bom.get(table): for d in bom.get(table):
items.setdefault(d.item_code, d.rate) items.setdefault(d.item_code, d.amount)
non_stock_items = frappe.get_all('Item', non_stock_items = frappe.get_all('Item',
fields="name", filters={'name': ('in', list(items.keys())), 'ifnull(is_stock_item, 0)': 0}, as_list=1) fields="name", filters={'name': ('in', list(items.keys())), 'ifnull(is_stock_item, 0)': 0}, as_list=1)
@@ -777,7 +777,7 @@ def add_additional_cost(stock_entry, work_order):
stock_entry.append('additional_costs', { stock_entry.append('additional_costs', {
'expense_account': expenses_included_in_valuation, 'expense_account': expenses_included_in_valuation,
'description': name[0], 'description': name[0],
'amount': items.get(name[0]) 'amount': flt(items.get(name[0])) * flt(stock_entry.fg_completed_qty) / flt(bom.quantity)
}) })
@frappe.whitelist() @frappe.whitelist()

View File

@@ -77,8 +77,7 @@ frappe.ui.form.on("Work Order", {
return { return {
query: "erpnext.controllers.queries.item_query", query: "erpnext.controllers.queries.item_query",
filters:[ filters:[
['is_stock_item', '=',1], ['is_stock_item', '=',1]
['default_bom', '!=', '']
] ]
}; };
}); });

View File

@@ -684,8 +684,7 @@ def set_work_order_ops(name):
@frappe.whitelist() @frappe.whitelist()
def make_stock_entry(work_order_id, purpose, qty=None): def make_stock_entry(work_order_id, purpose, qty=None):
work_order = frappe.get_doc("Work Order", work_order_id) work_order = frappe.get_doc("Work Order", work_order_id)
if not frappe.db.get_value("Warehouse", work_order.wip_warehouse, "is_group") \ if not frappe.db.get_value("Warehouse", work_order.wip_warehouse, "is_group"):
and not work_order.skip_transfer:
wip_warehouse = work_order.wip_warehouse wip_warehouse = work_order.wip_warehouse
else: else:
wip_warehouse = None wip_warehouse = None

View File

@@ -655,3 +655,5 @@ erpnext.patches.v12_0.set_against_blanket_order_in_sales_and_purchase_order
erpnext.patches.v12_0.set_cost_center_in_child_table_of_expense_claim erpnext.patches.v12_0.set_cost_center_in_child_table_of_expense_claim
erpnext.patches.v12_0.set_lead_title_field erpnext.patches.v12_0.set_lead_title_field
erpnext.patches.v12_0.set_permission_einvoicing erpnext.patches.v12_0.set_permission_einvoicing
erpnext.patches.v12_0.set_published_in_hub_tracked_item
erpnext.patches.v12_0.set_job_offer_applicant_email

View File

@@ -7,10 +7,10 @@ def execute():
fields=["name", "prefered_contact_email", "company_email", "personal_email", "user_id"]) fields=["name", "prefered_contact_email", "company_email", "personal_email", "user_id"])
for employee in employees: for employee in employees:
preferred_email_field = frappe.scrub(employee.prefered_contact_email) if not employee.prefered_contact_email:
if not preferred_email_field:
continue continue
preferred_email_field = frappe.scrub(employee.prefered_contact_email)
preferred_email = employee.get(preferred_email_field) preferred_email = employee.get(preferred_email_field)
frappe.db.set_value("Employee", employee.name, "prefered_email", preferred_email, update_modified=False) frappe.db.set_value("Employee", employee.name, "prefered_email", preferred_email, update_modified=False)

View File

@@ -0,0 +1,12 @@
import frappe
def execute():
frappe.reload_doc("hr", "doctype", "job_offer")
frappe.db.sql("""
UPDATE
`tabJob Offer` AS offer
SET
applicant_email = (SELECT email_id FROM `tabJob Applicant` WHERE name = offer.job_applicant)
""")

View File

@@ -0,0 +1,12 @@
from __future__ import unicode_literals
import frappe
def execute():
frappe.reload_doc("Hub Node", "doctype", "Hub Tracked Item")
if not frappe.db.a_row_exists("Hub Tracked Item"):
return
frappe.db.sql('''
Update `tabHub Tracked Item`
SET published = 1
''')

View File

@@ -1398,7 +1398,8 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
remove_pricing_rule: function(item) { remove_pricing_rule: function(item) {
let me = this; let me = this;
const fields = ["discount_percentage", "discount_amount", "pricing_rules"]; const fields = ["discount_percentage",
"discount_amount", "margin_rate_or_amount", "rate_with_margin"];
if(item.remove_free_item) { if(item.remove_free_item) {
var items = []; var items = [];
@@ -1418,6 +1419,12 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
fields.forEach(f => { fields.forEach(f => {
row[f] = 0; row[f] = 0;
}); });
["pricing_rules", "margin_type"].forEach(field => {
if (row[field]) {
row[field] = '';
}
})
} }
}); });

View File

@@ -3,24 +3,24 @@ function ItemPublishDialog(primary_action, secondary_action) {
title: __('Edit Publishing Details'), title: __('Edit Publishing Details'),
fields: [ fields: [
{ {
"label": "Item Code", label: __('Item Code'),
"fieldname": "item_code", fieldname: 'item_code',
"fieldtype": "Data", fieldtype: 'Data',
"read_only": 1 read_only: 1
}, },
{ {
"label": "Hub Category", label: __('Hub Category'),
"fieldname": "hub_category", fieldname: 'hub_category',
"fieldtype": "Autocomplete", fieldtype: 'Autocomplete',
"options": [], options: [],
"reqd": 1 reqd: 1
}, },
{ {
"label": "Images", label: __('Images'),
"fieldname": "image_list", fieldname: 'image_list',
"fieldtype": "MultiSelect", fieldtype: 'MultiSelect',
"options": [], options: [],
"reqd": 1 reqd: 1
} }
], ],
primary_action_label: primary_action.label || __('Set Details'), primary_action_label: primary_action.label || __('Set Details'),
@@ -28,15 +28,12 @@ function ItemPublishDialog(primary_action, secondary_action) {
secondary_action: secondary_action.fn secondary_action: secondary_action.fn
}); });
hub.call('get_categories') hub.call('get_categories').then(categories => {
.then(categories => { categories = categories.map(d => d.name);
categories = categories.map(d => d.name); dialog.fields_dict.hub_category.set_data(categories);
dialog.fields_dict.hub_category.set_data(categories); });
});
return dialog; return dialog;
} }
export { export { ItemPublishDialog };
ItemPublishDialog
}

View File

@@ -58,6 +58,13 @@ export default {
this.search_value = ''; this.search_value = '';
this.get_items(); this.get_items();
}, },
mounted() {
frappe.route.on('change', () => {
if (frappe.get_route_str() === 'marketplace/home') {
this.get_items();
}
})
},
methods: { methods: {
get_items() { get_items() {
hub.call('get_data_for_homepage', frappe.defaults ? { hub.call('get_data_for_homepage', frappe.defaults ? {

View File

@@ -161,7 +161,8 @@ export default {
}, },
methods: { methods: {
get_item_details() { get_item_details() {
this.item_received = hub.call('get_item_details', { hub_item_name: this.hub_item_name }) this.item_received = hub
.call('get_item_details', { hub_item_name: this.hub_item_name })
.then(item => { .then(item => {
this.init = false; this.init = false;
this.item = item; this.item = item;
@@ -205,9 +206,7 @@ export default {
hub_user: frappe.session.user hub_user: frappe.session.user
}) })
.then(() => { .then(() => {
const saved_items_link = `<b><a href="#marketplace/saved-items">${__( const saved_items_link = `<b><a href="#marketplace/saved-items">${__('Saved')}</a></b>`;
'Saved'
)}</a></b>`;
frappe.show_alert(saved_items_link); frappe.show_alert(saved_items_link);
erpnext.hub.trigger('action:item_save'); erpnext.hub.trigger('action:item_save');
}) })
@@ -222,9 +221,7 @@ export default {
hub_user: frappe.session.user hub_user: frappe.session.user
}) })
.then(() => { .then(() => {
const featured_items_link = `<b><a href="#marketplace/featured-items">${__( const featured_items_link = `<b><a href="#marketplace/featured-items">${__('Added to Featured Items')}</a></b>`;
'Added to Featured Items'
)}</a></b>`;
frappe.show_alert(featured_items_link); frappe.show_alert(featured_items_link);
erpnext.hub.trigger('action:item_feature'); erpnext.hub.trigger('action:item_feature');
}) })
@@ -340,7 +337,17 @@ export default {
}, },
unpublish_item() { unpublish_item() {
frappe.msgprint(__('This feature is under development...')); frappe.confirm(__(`Unpublish {0}?`, [this.item.item_name]), () => {
frappe
.call('erpnext.hub_node.api.unpublish_item', {
item_code: this.item.item_code,
hub_item_name: this.hub_item_name
})
.then(r => {
frappe.set_route(`marketplace/home`);
frappe.show_alert(__('Item listing removed'));
});
});
} }
} }
}; };

View File

@@ -1,4 +1,5 @@
{ {
"actions": [],
"creation": "2019-08-28 17:29:42.115592", "creation": "2019-08-28 17:29:42.115592",
"doctype": "DocType", "doctype": "DocType",
"editable_grid": 1, "editable_grid": 1,
@@ -34,11 +35,12 @@
"fieldname": "bypass_credit_limit_check", "fieldname": "bypass_credit_limit_check",
"fieldtype": "Check", "fieldtype": "Check",
"in_list_view": 1, "in_list_view": 1,
"label": "Bypass Credit Limit Check" "label": "Bypass Credit Limit Check at Sales Order"
} }
], ],
"istable": 1, "istable": 1,
"modified": "2019-09-24 15:05:26.069911", "links": [],
"modified": "2019-12-31 15:43:05.822328",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Selling", "module": "Selling",
"name": "Customer Credit Limit", "name": "Customer Credit Limit",

View File

@@ -1,4 +1,5 @@
{ {
"actions": [],
"allow_import": 1, "allow_import": 1,
"autoname": "naming_series:", "autoname": "naming_series:",
"creation": "2013-05-24 19:29:08", "creation": "2013-05-24 19:29:08",
@@ -536,7 +537,7 @@
}, },
{ {
"fieldname": "other_charges_calculation", "fieldname": "other_charges_calculation",
"fieldtype": "Text", "fieldtype": "Long Text",
"label": "Taxes and Charges Calculation", "label": "Taxes and Charges Calculation",
"no_copy": 1, "no_copy": 1,
"oldfieldtype": "HTML", "oldfieldtype": "HTML",
@@ -927,8 +928,9 @@
"icon": "fa fa-shopping-cart", "icon": "fa fa-shopping-cart",
"idx": 82, "idx": 82,
"is_submittable": 1, "is_submittable": 1,
"links": [],
"max_attachments": 1, "max_attachments": 1,
"modified": "2019-11-12 13:19:11.895715", "modified": "2019-12-30 19:14:56.630270",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Selling", "module": "Selling",
"name": "Quotation", "name": "Quotation",

View File

@@ -12,7 +12,8 @@ frappe.ui.form.on("Sales Order", {
'Material Request': 'Material Request', 'Material Request': 'Material Request',
'Purchase Order': 'Purchase Order', 'Purchase Order': 'Purchase Order',
'Project': 'Project', 'Project': 'Project',
'Payment Entry': "Payment" 'Payment Entry': "Payment",
'Work Order': "Work Order"
} }
frm.add_fetch('customer', 'tax_id', 'tax_id'); frm.add_fetch('customer', 'tax_id', 'tax_id');

View File

@@ -1,4 +1,5 @@
{ {
"actions": [],
"allow_import": 1, "allow_import": 1,
"autoname": "naming_series:", "autoname": "naming_series:",
"creation": "2013-06-18 12:39:59", "creation": "2013-06-18 12:39:59",
@@ -619,7 +620,7 @@
}, },
{ {
"fieldname": "other_charges_calculation", "fieldname": "other_charges_calculation",
"fieldtype": "Text", "fieldtype": "Long Text",
"label": "Taxes and Charges Calculation", "label": "Taxes and Charges Calculation",
"no_copy": 1, "no_copy": 1,
"oldfieldtype": "HTML", "oldfieldtype": "HTML",
@@ -1194,7 +1195,8 @@
"icon": "fa fa-file-text", "icon": "fa fa-file-text",
"idx": 105, "idx": 105,
"is_submittable": 1, "is_submittable": 1,
"modified": "2019-10-23 14:26:42.767189", "links": [],
"modified": "2019-12-30 19:15:28.605085",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Selling", "module": "Selling",
"name": "Sales Order", "name": "Sales Order",

View File

@@ -416,7 +416,7 @@ class SalesOrder(SellingController):
def _get_delivery_date(ref_doc_delivery_date, red_doc_transaction_date, transaction_date): def _get_delivery_date(ref_doc_delivery_date, red_doc_transaction_date, transaction_date):
delivery_date = get_next_schedule_date(ref_doc_delivery_date, delivery_date = get_next_schedule_date(ref_doc_delivery_date,
auto_repeat_doc.frequency, cint(auto_repeat_doc.repeat_on_day)) auto_repeat_doc.frequency, auto_repeat_doc.start_date, cint(auto_repeat_doc.repeat_on_day))
if delivery_date <= transaction_date: if delivery_date <= transaction_date:
delivery_date_diff = frappe.utils.date_diff(ref_doc_delivery_date, red_doc_transaction_date) delivery_date_diff = frappe.utils.date_diff(ref_doc_delivery_date, red_doc_transaction_date)

View File

@@ -631,6 +631,7 @@ erpnext.pos.PointOfSale = class PointOfSale {
this.frm.allow_edit_rate = r.message.allow_edit_rate; this.frm.allow_edit_rate = r.message.allow_edit_rate;
this.frm.allow_edit_discount = r.message.allow_edit_discount; this.frm.allow_edit_discount = r.message.allow_edit_discount;
this.frm.doc.campaign = r.message.campaign; this.frm.doc.campaign = r.message.campaign;
this.frm.allow_print_before_pay = r.message.allow_print_before_pay;
} }
} }
@@ -672,7 +673,7 @@ erpnext.pos.PointOfSale = class PointOfSale {
} }
set_form_action() { set_form_action() {
if(this.frm.doc.docstatus == 1 || (this.frm.doc.allow_print_before_pay == 1&&this.frm.doc.items.length>0)){ if(this.frm.doc.docstatus == 1 || (this.frm.allow_print_before_pay == 1 && this.frm.doc.items.length > 0)){
this.page.set_secondary_action(__("Print"), async() => { this.page.set_secondary_action(__("Print"), async() => {
if(this.frm.doc.docstatus != 1 ){ if(this.frm.doc.docstatus != 1 ){
await this.frm.save(); await this.frm.save();

View File

@@ -226,16 +226,14 @@ def set_batch_nos(doc, warehouse_field, throw=False):
warehouse = d.get(warehouse_field, None) warehouse = d.get(warehouse_field, None)
if has_batch_no and warehouse and qty > 0: if has_batch_no and warehouse and qty > 0:
if not d.batch_no: if not d.batch_no:
d.batch_no = get_batch_no(d.item_code, warehouse, qty, throw) d.batch_no = get_batch_no(d.item_code, warehouse, qty, throw, d.serial_no)
else: else:
batch_qty = get_batch_qty(batch_no=d.batch_no, warehouse=warehouse) batch_qty = get_batch_qty(batch_no=d.batch_no, warehouse=warehouse)
if flt(batch_qty, d.precision("qty")) < flt(qty, d.precision("qty")): if flt(batch_qty, d.precision("qty")) < flt(qty, d.precision("qty")):
frappe.throw(_("Row #{0}: The batch {1} has only {2} qty. Please select another batch which has {3} qty available or split the row into multiple rows, to deliver/issue from multiple batches").format(d.idx, d.batch_no, batch_qty, qty)) frappe.throw(_("Row #{0}: The batch {1} has only {2} qty. Please select another batch which has {3} qty available or split the row into multiple rows, to deliver/issue from multiple batches").format(d.idx, d.batch_no, batch_qty, qty))
@frappe.whitelist() @frappe.whitelist()
def get_batch_no(item_code, warehouse, qty=1, throw=False): def get_batch_no(item_code, warehouse, qty=1, throw=False, serial_no=None):
""" """
Get batch number using First Expiring First Out method. Get batch number using First Expiring First Out method.
:param item_code: `item_code` of Item Document :param item_code: `item_code` of Item Document
@@ -245,7 +243,7 @@ def get_batch_no(item_code, warehouse, qty=1, throw=False):
""" """
batch_no = None batch_no = None
batches = get_batches(item_code, warehouse, qty, throw) batches = get_batches(item_code, warehouse, qty, throw, serial_no)
for batch in batches: for batch in batches:
if cint(qty) <= cint(batch.qty): if cint(qty) <= cint(batch.qty):
@@ -260,7 +258,23 @@ def get_batch_no(item_code, warehouse, qty=1, throw=False):
return batch_no return batch_no
def get_batches(item_code, warehouse, qty=1, throw=False): def get_batches(item_code, warehouse, qty=1, throw=False, serial_no=None):
from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos
cond = ''
if serial_no:
batch = frappe.get_all("Serial No",
fields = ["distinct batch_no"],
filters= {
"item_code": item_code,
"warehouse": warehouse,
"name": ("in", get_serial_nos(serial_no))
}
)
if batch and len(batch) > 1:
return []
cond = " and `tabBatch`.name = %s" %(frappe.db.escape(batch[0].batch_no))
return frappe.db.sql(""" return frappe.db.sql("""
select batch_id, sum(`tabStock Ledger Entry`.actual_qty) as qty select batch_id, sum(`tabStock Ledger Entry`.actual_qty) as qty
@@ -268,7 +282,7 @@ def get_batches(item_code, warehouse, qty=1, throw=False):
join `tabStock Ledger Entry` ignore index (item_code, warehouse) join `tabStock Ledger Entry` ignore index (item_code, warehouse)
on (`tabBatch`.batch_id = `tabStock Ledger Entry`.batch_no ) on (`tabBatch`.batch_id = `tabStock Ledger Entry`.batch_no )
where `tabStock Ledger Entry`.item_code = %s and `tabStock Ledger Entry`.warehouse = %s where `tabStock Ledger Entry`.item_code = %s and `tabStock Ledger Entry`.warehouse = %s
and (`tabBatch`.expiry_date >= CURDATE() or `tabBatch`.expiry_date IS NULL) and (`tabBatch`.expiry_date >= CURDATE() or `tabBatch`.expiry_date IS NULL) {0}
group by batch_id group by batch_id
order by `tabBatch`.expiry_date ASC, `tabBatch`.creation ASC order by `tabBatch`.expiry_date ASC, `tabBatch`.creation ASC
""", (item_code, warehouse), as_dict=True) """.format(cond), (item_code, warehouse), as_dict=True)

View File

@@ -1,4 +1,5 @@
{ {
"actions": [],
"allow_import": 1, "allow_import": 1,
"autoname": "naming_series:", "autoname": "naming_series:",
"creation": "2013-05-24 19:29:09", "creation": "2013-05-24 19:29:09",
@@ -682,7 +683,7 @@
}, },
{ {
"fieldname": "other_charges_calculation", "fieldname": "other_charges_calculation",
"fieldtype": "Text", "fieldtype": "Long Text",
"label": "Taxes and Charges Calculation", "label": "Taxes and Charges Calculation",
"no_copy": 1, "no_copy": 1,
"oldfieldtype": "HTML", "oldfieldtype": "HTML",
@@ -1238,7 +1239,8 @@
"icon": "fa fa-truck", "icon": "fa fa-truck",
"idx": 146, "idx": 146,
"is_submittable": 1, "is_submittable": 1,
"modified": "2019-09-27 14:24:20.269682", "links": [],
"modified": "2019-12-30 19:17:13.122644",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Stock", "module": "Stock",
"name": "Delivery Note", "name": "Delivery Note",

View File

@@ -551,7 +551,7 @@ class Item(WebsiteGenerator):
"""select parent from `tabItem Barcode` where barcode = %s and parent != %s""", (item_barcode.barcode, self.name)) """select parent from `tabItem Barcode` where barcode = %s and parent != %s""", (item_barcode.barcode, self.name))
if duplicate: if duplicate:
frappe.throw(_("Barcode {0} already used in Item {1}").format( frappe.throw(_("Barcode {0} already used in Item {1}").format(
item_barcode.barcode, duplicate[0][0]), frappe.DuplicateEntryError) item_barcode.barcode, duplicate[0][0]))
item_barcode.barcode_type = "" if item_barcode.barcode_type not in options else item_barcode.barcode_type item_barcode.barcode_type = "" if item_barcode.barcode_type not in options else item_barcode.barcode_type
if item_barcode.barcode_type and item_barcode.barcode_type.upper() in ('EAN', 'UPC-A', 'EAN-13', 'EAN-8'): if item_barcode.barcode_type and item_barcode.barcode_type.upper() in ('EAN', 'UPC-A', 'EAN-13', 'EAN-8'):

File diff suppressed because it is too large Load Diff

View File

@@ -616,7 +616,7 @@
}, },
{ {
"fieldname": "other_charges_calculation", "fieldname": "other_charges_calculation",
"fieldtype": "Text", "fieldtype": "Long Text",
"label": "Taxes and Charges Calculation", "label": "Taxes and Charges Calculation",
"no_copy": 1, "no_copy": 1,
"oldfieldtype": "HTML", "oldfieldtype": "HTML",
@@ -1059,7 +1059,7 @@
"idx": 261, "idx": 261,
"is_submittable": 1, "is_submittable": 1,
"links": [], "links": [],
"modified": "2019-12-24 12:52:17.216304", "modified": "2019-12-30 19:12:49.709711",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Stock", "module": "Stock",
"name": "Purchase Receipt", "name": "Purchase Receipt",

View File

@@ -922,8 +922,6 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({
this.frm.toggle_enable("from_warehouse", doc.purpose!='Material Receipt'); this.frm.toggle_enable("from_warehouse", doc.purpose!='Material Receipt');
this.frm.toggle_enable("to_warehouse", doc.purpose!='Material Issue'); this.frm.toggle_enable("to_warehouse", doc.purpose!='Material Issue');
this.frm.fields_dict["items"].grid.set_column_disp("s_warehouse", doc.purpose!='Material Receipt');
this.frm.fields_dict["items"].grid.set_column_disp("t_warehouse", doc.purpose!='Material Issue');
this.frm.fields_dict["items"].grid.set_column_disp("retain_sample", doc.purpose=='Material Receipt'); this.frm.fields_dict["items"].grid.set_column_disp("retain_sample", doc.purpose=='Material Receipt');
this.frm.fields_dict["items"].grid.set_column_disp("sample_quantity", doc.purpose=='Material Receipt'); this.frm.fields_dict["items"].grid.set_column_disp("sample_quantity", doc.purpose=='Material Receipt');

View File

@@ -75,6 +75,7 @@ class StockEntry(StockController):
set_batch_nos(self, 's_warehouse') set_batch_nos(self, 's_warehouse')
self.set_incoming_rate() self.set_incoming_rate()
self.validate_serialized_batch()
self.set_actual_qty() self.set_actual_qty()
self.calculate_rate_and_amount(update_finished_item_rate=False) self.calculate_rate_and_amount(update_finished_item_rate=False)
@@ -849,7 +850,7 @@ class StockEntry(StockController):
and po.name = %s""",self.purchase_order)) and po.name = %s""",self.purchase_order))
for item in itervalues(item_dict): for item in itervalues(item_dict):
if self.pro_doc and (cint(self.pro_doc.from_wip_warehouse) or not self.pro_doc.skip_transfer): if self.pro_doc and cint(self.pro_doc.from_wip_warehouse):
item["from_warehouse"] = self.pro_doc.wip_warehouse item["from_warehouse"] = self.pro_doc.wip_warehouse
#Get Reserve Warehouse from PO #Get Reserve Warehouse from PO
if self.purchase_order and self.purpose=="Send to Subcontractor": if self.purchase_order and self.purpose=="Send to Subcontractor":