feat: Add first two doctypes

This commit is contained in:
Glen Whitney 2020-11-17 06:01:06 +00:00
parent 3401d531b6
commit d62077be59
11 changed files with 296 additions and 0 deletions

View File

@ -0,0 +1,8 @@
// Copyright (c) 2020, Studio Infinity and contributors
// For license information, please see license.txt
frappe.ui.form.on('JW Account Mapping', {
// refresh: function(frm) {
// }
});

View File

@ -0,0 +1,97 @@
{
"actions": [],
"allow_import": 1,
"allow_rename": 1,
"autoname": "format:{charge_type} - {charge_subtype}",
"creation": "2020-11-16 23:00:45.241794",
"description": "Each JW Account Mapping document specifies the ERPNext Account to be used for a line in a Justworks invoice that is being imported as an ERPNext Journal Entry. If the Map to Account field is left empty, then lines with the give Charge (type and subtype) will be ignored.",
"doctype": "DocType",
"document_type": "Setup",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"charge_type",
"charge_subtype",
"map_to_account"
],
"fields": [
{
"description": "The value of the \"Charge type\" column in a Justworks invoice that this mapping should apply to. Wild card characters ? (to match any single character in the value) and * (to match any sequence of characters in the value) are allowed.",
"fieldname": "charge_type",
"fieldtype": "Data",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Charge Type",
"reqd": 1
},
{
"bold": 1,
"description": "The value of the \"Charge subtype\" column in a Justworks invoice that this mapping should apply to. Wild card characters ? (to match any single character in the value) and * (to match any sequence of characters in the value) are allowed.",
"fieldname": "charge_subtype",
"fieldtype": "Data",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Charge Subtype",
"reqd": 1
},
{
"allow_in_quick_entry": 1,
"bold": 1,
"description": "The ERPNext account that the specified Charge (type and subtype) should map to.",
"fieldname": "map_to_account",
"fieldtype": "Link",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Map to Account",
"options": "Account"
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2020-11-17 00:08:38.932239",
"modified_by": "Administrator",
"module": "Justworks ERPNext Connector",
"name": "JW Account Mapping",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
},
{
"create": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts User",
"share": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts Manager",
"share": 1,
"write": 1
}
],
"quick_entry": 1,
"show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1
}

View File

@ -0,0 +1,10 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2020, Studio Infinity and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
# import frappe
from frappe.model.document import Document
class JWAccountMapping(Document):
pass

View File

@ -0,0 +1,10 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2020, Studio Infinity and Contributors
# See license.txt
from __future__ import unicode_literals
# import frappe
import unittest
class TestJWAccountMapping(unittest.TestCase):
pass

View File

@ -0,0 +1,8 @@
// Copyright (c) 2020, Studio Infinity and contributors
// For license information, please see license.txt
frappe.ui.form.on('JW Employee Allocation', {
// refresh: function(frm) {
// }
});

View File

@ -0,0 +1,143 @@
{
"actions": [],
"allow_import": 1,
"allow_rename": 1,
"autoname": "format:{employee_name}_{####}",
"creation": "2020-11-17 00:49:16.498573",
"description": "Each JW Employee Allocation document represents a portion of the charges related to a given employee in a Justworks invoice that will be allocated to the accounting dimensions specified. The total percentage of all of the allocations active on a given date (i.e., the given date is between the Start Date and End Date of the record) must sum to 100%.",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"employee",
"employee_name",
"start_date",
"end_date",
"percentage",
"accounting_dimensions_section",
"cost_center",
"dimension_col_break",
"amended_from"
],
"fields": [
{
"fieldname": "employee",
"fieldtype": "Link",
"label": "Employee",
"options": "Employee",
"reqd": 1
},
{
"default": "employee.employee_name",
"fieldname": "employee_name",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Employee Name",
"read_only": 1
},
{
"default": "Today",
"description": "The initial date this allocation is valid",
"fieldname": "start_date",
"fieldtype": "Date",
"in_list_view": 1,
"label": "Start Date",
"reqd": 1
},
{
"allow_on_submit": 1,
"description": "The final date this allocation is valid. Leave blank for currently valid allocations.",
"fieldname": "end_date",
"fieldtype": "Date",
"in_list_view": 1,
"label": "End Date"
},
{
"description": "What percent of the employee's costs go to this allocation",
"fieldname": "percentage",
"fieldtype": "Percent",
"in_list_view": 1,
"label": "Percentage",
"reqd": 1
},
{
"fieldname": "accounting_dimensions_section",
"fieldtype": "Section Break",
"label": "Accounting Dimensions"
},
{
"fieldname": "cost_center",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Cost Center",
"options": "Cost Center",
"reqd": 1
},
{
"fieldname": "dimension_col_break",
"fieldtype": "Column Break"
},
{
"fieldname": "amended_from",
"fieldtype": "Link",
"label": "Amended From",
"no_copy": 1,
"options": "JW Employee Allocation",
"print_hide": 1,
"read_only": 1
}
],
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
"modified": "2020-11-17 00:49:16.498573",
"modified_by": "Administrator",
"module": "Justworks ERPNext Connector",
"name": "JW Employee Allocation",
"owner": "Administrator",
"permissions": [
{
"cancel": 1,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"submit": 1,
"write": 1
},
{
"cancel": 1,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts Manager",
"share": 1,
"submit": 1,
"write": 1
},
{
"create": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts User",
"share": 1,
"submit": 1,
"write": 1
}
],
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1
}

View File

@ -0,0 +1,10 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2020, Studio Infinity and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
# import frappe
from frappe.model.document import Document
class JWEmployeeAllocation(Document):
pass

View File

@ -0,0 +1,10 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2020, Studio Infinity and Contributors
# See license.txt
from __future__ import unicode_literals
# import frappe
import unittest
class TestJWEmployeeAllocation(unittest.TestCase):
pass