diff --git a/changai/changai/api/v2/assets/metaschema_clean_v2.json b/changai/changai/api/v2/assets/metaschema_clean_v2.json index 3e1ce0c..b45af24 100644 --- a/changai/changai/api/v2/assets/metaschema_clean_v2.json +++ b/changai/changai/api/v2/assets/metaschema_clean_v2.json @@ -2978,6 +2978,7 @@ "customer_details": "TEXT", "customer_home_address_test": "TEXT", "test_field": "TEXT", + "test_sync_test": "TEXT", "customer_primary_address": "TEXT", "primary_address": "TEXT", "customer_primary_contact": "TEXT", @@ -16390,5 +16391,18 @@ "parent": "TEXT", "parentfield": "TEXT", "parenttype": "TEXT" + }, + "tabTesting1": { + "testing1_data": "TEXT", + "name": "TEXT", + "owner": "TEXT", + "creation": "TEXT", + "modified": "TEXT", + "modified_by": "TEXT", + "docstatus": "INT", + "idx": "INT", + "parent": "TEXT", + "parentfield": "TEXT", + "parenttype": "TEXT" } } \ No newline at end of file diff --git a/changai/changai/api/v2/auto_gen_api.py b/changai/changai/api/v2/auto_gen_api.py index 1c931dd..3f86a9b 100644 --- a/changai/changai/api/v2/auto_gen_api.py +++ b/changai/changai/api/v2/auto_gen_api.py @@ -11,7 +11,7 @@ import yaml import frappe from frappe import _ -from changai.changai.api.v2.build_cards_faiss_index_v2 import build_schema_fvs_job,build_master_data_fvs_job,build_table_fvs_job +from changai.changai.api.v2.build_cards_faiss_index_v2 import build_schema_fvs_job,build_master_data_fvs_job,build_table_fvs_job,_generate_table_description from frappe.utils import now_datetime, add_to_date from anthropic import Anthropic import openai @@ -68,17 +68,7 @@ def get_mod(app_names: list[str]): for app in app_names for module in frappe.get_all("Module Def", filters={"app_name": app}, pluck="name") ] -SYSTEM_FIELDS = [ - {"fieldname": "name", "fieldtype": "Data", "label": "ID"}, - {"fieldname": "docstatus", "fieldtype": "Int", "label": "Document Status"}, - {"fieldname": "owner", "fieldtype": "Link", "label": "Owner", "options": "User"}, - {"fieldname": "creation", "fieldtype": "Datetime", "label": "Created On"}, - {"fieldname": "modified", "fieldtype": "Datetime", "label": "Last Modified"}, - {"fieldname": "parent", "fieldtype": "Data", "label": "Parent Document"}, - {"fieldname": "parenttype", "fieldtype": "Data", "label": "Parent DocType"}, - {"fieldname": "parentfield", "fieldtype": "Data", "label": "Parent Field"}, - {"fieldname": "idx", "fieldtype": "Int", "label": "Row Index"}, -] + EXCLUDED_FIELDTYPES: Set[str] = { # Layout / Structure โ€” no data value "Section Break", @@ -168,14 +158,6 @@ def _strip_tab(t: str) -> str: t = (t or "").strip() return t[3:] if t.startswith("tab") else t -MODULES_TO_SYNC = [ - "Customer", - "Supplier", - "Item", - "Warehouse", - "Company", - "Account"] - def _normalize_master_data_payload(payload: Any) -> tuple[Dict[str, Any], List[Dict[str, Any]]]: if not isinstance(payload, dict): @@ -189,121 +171,14 @@ def _normalize_master_data_payload(payload: Any) -> tuple[Dict[str, Any], List[D return meta, data -def _extract_existing_keys(data: List[Any]) -> Set[tuple]: - keys: Set[tuple] = set() - for row in data: - if not isinstance(row, dict): - continue - dt = row.get("entity_type") - eid = row.get("entity_id") - if dt and eid: - keys.add((dt, eid)) - return keys - - -def _build_master_data_row(entity_type: str, entity_id:str,title_field:str,filter: Optional[Dict[str, Any]]) -> Dict[str, Any]: +def _build_master_data_row(entity_type: str, entity_id:str,doc_name:str, title_field:str,filter: Optional[Dict[str, Any]]) -> Dict[str, Any]: return { "entity_type": entity_type, "entity_id": entity_id, + "doc_name": doc_name or entity_id, "filters": filter or {"field": title_field if title_field else "name", "value": entity_id}, } - -def _get_master_data_filters(last_sync: Optional[str]) -> Dict[str, Any]: - if not last_sync: - return {} - return {"creation": [">", last_sync]} - - -@frappe.whitelist(allow_guest=False) -def update_masterdata(): - frappe.enqueue( - "changai.changai.api.v2.auto_gen_api.sync_master_data_smart", - queue="long", - timeout=1800, - ) - frappe.enqueue( - "changai.changai.api.v2.build_cards_faiss_index_v2.build_master_data_fvs_job", - queue="long", - timeout=1800, - ) - return { - "ok":True, - "message":"Master Data update running in RQ Job" - } - -@frappe.whitelist(allow_guest=False) -def sync_master_data_smart() -> Dict[str, Any]: - file_name = "master_data.yaml" - payload = _read_filedoctype(file_name, RAG_FOLDER) - meta, data = _normalize_master_data_payload(payload) - added_total = 0 - removed_total = 0 - added_by_module: Dict[str, int] = {} - removed_by_module: Dict[str, int] = {} - fetched_by_module: Dict[str, int] = {} - rebuilt_rows: List[Dict[str, Any]] = [] - for mod in MODULES_TO_SYNC: - entity_type = f"tab{mod}" - existing_rows = [ - row for row in data - if isinstance(row, dict) and row.get("entity_type") == entity_type - ] - existing_ids = { - row.get("entity_id") - for row in existing_rows - if row.get("entity_id") - } - meta_doc = frappe.get_meta(mod) - title_field = meta_doc.title_field or "name" - fields =["name"] - if title_field !="name": - fields.append(title_field) - live_records = frappe.get_all(mod, fields=fields,limit_page_length=0) - live_ids = {rec.get("name") for rec in live_records if rec.get("name")} - fetched_by_module[mod] = len(live_ids) - added_ids = live_ids - existing_ids - removed_ids = existing_ids - live_ids - added_by_module[mod] = len(added_ids) - removed_by_module[mod] = len(removed_ids) - added_total += len(added_ids) - removed_total += len(removed_ids) - for rec in live_records: - if mod == "Item": - item_code = rec.get("name") - item_name = rec.get(title_field) - if item_code: - filters = [{"field": "item_code", "value": item_code}] - if item_name and item_name != item_code: - filters.append({"field": "item_name", "value": item_name}) - rebuilt_rows.append( - _build_master_data_row(entity_type, item_code, title_field, filters) - ) - else: - entity_id = rec.get(title_field) if title_field in rec else rec.get("name") - rebuilt_rows.append(_build_master_data_row(entity_type, entity_id, title_field, None)) - final_data = rebuilt_rows - meta["last_sync"] = str(now_datetime()) - settings = frappe.get_single("ChangAI Settings") - settings.last_masterdata_sync = meta["last_sync"] - settings.save(ignore_permissions=True) - payload_out = {"_meta": meta, "data": final_data} - file_doc = write_filedoctype(file_name, payload_out, folder=RAG_FOLDER) - return { - "ok": True, - "message": _("Master data sync complete."), - "added_total": added_total, - "removed_total": removed_total, - "added_by_module": added_by_module, - "removed_by_module": removed_by_module, - "fetched_by_module": fetched_by_module, - "last_sync_used": meta.get("last_sync"), - "new_last_sync": meta["last_sync"], - "file_url": file_doc.file_url, - "fvs_error": None, - } - - def _clean_schema_fields(by_table: Dict[str, Dict[str, Any]]) -> None: for block in by_table.values(): for field in block.get("fields", []) or []: @@ -318,9 +193,10 @@ def _clean_schema_fields(by_table: Dict[str, Dict[str, Any]]) -> None: field.pop("child_hint", None) -def get_doctypes_changed_since(last_sync: Optional[str]) -> List[str]: - app_names=["erpnext","frappe"] - erpnext_modules = get_mod(app_names) +def get_doctypes_changed_since(last_sync: Optional[str],erpnext_modules: Optional[List[str]] = None) -> List[str]: + if erpnext_modules is None: + app_names=["erpnext","frappe"] + erpnext_modules = get_mod(app_names) filters = { "module": ["in", erpnext_modules], "issingle": 0, @@ -367,10 +243,6 @@ def _normalize_schema_payload(payload: Any) -> tuple[Dict[str, Any], List[Dict[s return meta, tables_blocks -def _normalize_existing_tables(existing_tables: Any) -> List[str]: - return existing_tables if isinstance(existing_tables, list) else [] - - def _build_table_map(tables_blocks: List[Any]) -> Dict[str, Dict[str, Any]]: return { block.get("table"): block @@ -379,27 +251,10 @@ def _build_table_map(tables_blocks: List[Any]) -> Dict[str, Dict[str, Any]]: } -def _get_changed_doctypes(last_sync_raw: Optional[str]) -> List[str]: +def _get_changed_doctypes(last_sync_raw: Optional[str],erpnext_modules: Optional[List[str]] = None) -> List[str]: if not last_sync_raw: return [] - return get_doctypes_changed_since(last_sync_raw) - - -def _get_tables_to_process( - by_table: Dict[str, Dict[str, Any]], - existing_tables: List[str], - changed_doctypes: List[str], -) -> tuple[Set[str], Set[str], Set[str], List[str], List[str]]: - changed_tables = {_tab(dt) for dt in changed_doctypes} - existing_tables_set = set(existing_tables) - missing_from_schema = {t for t in existing_tables if t not in by_table} - new_from_changed = { - t for t in changed_tables - if t not in by_table and t not in existing_tables_set - } - tables_to_process = sorted(changed_tables | missing_from_schema | new_from_changed) - merged_tables = sorted(existing_tables_set | changed_tables) - return changed_tables, missing_from_schema, new_from_changed, tables_to_process, merged_tables + return get_doctypes_changed_since(last_sync_raw,erpnext_modules) def _get_existing_fields_for_table(by_table: Dict[str, Dict[str, Any]], table: str) -> Dict[str, Dict[str, Any]]: @@ -447,17 +302,13 @@ def _update_or_create_table_block( table: str, fields: List[Dict[str, Any]], ) -> None: - if table in by_table: - by_table[table]["fields"] = fields - by_table[table]["desc_done"] = not _has_pending_descriptions(fields) - return - by_table[table] = { - "table": table, - "description": "", - "fields": fields, - "grain":"", - "desc_done": False, - } + block = by_table.setdefault(table, {}) + block["table"] = table + block.setdefault("description", "") + block.setdefault("grain", "") + block["fields"] = fields + block["desc_done"] = not _has_pending_descriptions(fields) + def _build_field_entry( field_meta: Any, existing_fields: Dict[str, Dict[str, Any]], @@ -522,22 +373,18 @@ def _build_field_entry( def _write_schema_outputs( meta: Dict[str, Any], by_table: Dict[str, Dict[str, Any]], - current_tables: List[str], + table_dict_with_desc: List[Dict[str,Any]], ) -> None: reports = [] - ordered_blocks = [by_table[t] for t in current_tables if t in by_table] - final_tables = [block["table"] for block in ordered_blocks] + current_table_names = [row.get("table") for row in table_dict_with_desc if isinstance(row, dict) and row.get("table")] + ordered_blocks = [by_table[t] for t in current_table_names if t in by_table] reports = frappe.get_all("Report",fields=["name","report_name","ref_doctype"]) write_filedoctype( SCHEMA_YAML, {"_meta": meta, "tables": ordered_blocks}, folder=RAG_FOLDER, ) - write_filedoctype( - TABLES_JSON, - final_tables, - folder=RAG_FOLDER, - ) + write_filedoctype(TABLES_JSON, table_dict_with_desc, folder=RAG_FOLDER) write_filedoctype( REPORTS_JSON, reports, @@ -560,20 +407,20 @@ def _infer_grain_label(meta_dt: Any, table: str) -> str: def _process_schema_table(table: str, by_table: Dict[str, Dict[str, Any]]) -> bool: - dt = _strip_tab(table) - if not frappe.db.exists("DocType", dt): - return False - - frappe.clear_cache(doctype=dt) - meta_dt = frappe.get_meta(dt) - block = by_table.setdefault(table, {}) - block["is_table"] = bool(meta_dt.istable) - block["grain"] = _infer_grain_label(meta_dt, table) - existing_fields = _get_existing_fields_for_table(by_table, table) - fields = _build_fields_from_meta(meta_dt, existing_fields) - _update_or_create_table_block(by_table, table, fields) + dt = _strip_tab(table) + if not frappe.db.exists("DocType", dt): + return False - return True + frappe.clear_cache(doctype=dt) + meta_dt = frappe.get_meta(dt) + block = by_table.setdefault(table, {}) + block.setdefault("table", table) # โ† insert this first, so "table:" is always the leading key + block["is_table"] = bool(meta_dt.istable) + block["grain"] = _infer_grain_label(meta_dt, table) + existing_fields = _get_existing_fields_for_table(by_table, table) + fields = _build_fields_from_meta(meta_dt, existing_fields) + _update_or_create_table_block(by_table, table, fields) + return True @@ -590,9 +437,9 @@ def fill_missing_field_descriptions( if not isinstance(tables_blocks, list): return {"ok": False, "message": _("schema.yaml invalid")} - client = _get_claude_client() - if not client: - return {"ok": False, "message": _("Claude API key missing")} + # client = _get_claude_client() + # if not client: + # return {"ok": False, "message": _("Claude API key missing")} updated_tables = 0 updated_fields = 0 processed_updated_tables = 0 @@ -603,7 +450,7 @@ def fill_missing_field_descriptions( _reset_frappe_local_cache() result = _process_table_for_missing_descriptions( - client=client, + # client=client, block=block, batch_size=batch_size, ) @@ -637,19 +484,7 @@ def fill_missing_field_descriptions( "fields_updated": updated_fields, "status": "Complete" if consecutive_errors <= 5 else "Partial Failure", } - - - -# def clear_schema_field_caches() -> None: -# """ -# Call this when schema_fvs is rebuilt/refreshed. -# """ -# global _TABLE_FIELD_DOCS_CACHE, _TABLE_FIELD_VS_CACHE, _FULL_FIELDS_VS -# with _TABLE_FIELD_CACHE_LOCK: -# _TABLE_FIELD_DOCS_CACHE = None -# _TABLE_FIELD_VS_CACHE = OrderedDict() -# _FULL_FIELDS_VS = None - +from changai.changai.api.v2.build_cards_faiss_index_v2 import enrich_tables_descriptions @frappe.whitelist(allow_guest=False) def sync_tables_and_schema_smart() -> Dict[str, Any]: @@ -657,9 +492,9 @@ def sync_tables_and_schema_smart() -> Dict[str, Any]: meta, tables_blocks = _normalize_schema_payload(payload) by_table = _build_table_map(tables_blocks) last_sync_raw = meta.get("last_sync") - changed_doctypes = _get_changed_doctypes(last_sync_raw) app_names=["erpnext","frappe"] erpnext_modules = get_mod(app_names) + changed_doctypes = _get_changed_doctypes(last_sync_raw,erpnext_modules) current_doctypes = frappe.get_all( "DocType", filters={ @@ -674,7 +509,8 @@ def sync_tables_and_schema_smart() -> Dict[str, Any]: changed_tables = {_tab(dt) for dt in changed_doctypes} missing_from_schema = {t for t in current_tables if t not in by_table} - tables_to_process = current_tables + tables_to_process = sorted(changed_tables | missing_from_schema) + table_dict_with_desc = enrich_tables_descriptions(current_tables) for table in tables_to_process: _process_schema_table(table, by_table) @@ -693,19 +529,16 @@ def sync_tables_and_schema_smart() -> Dict[str, Any]: settings.save(ignore_permissions=True) try: - _write_schema_outputs(meta, by_table, current_tables) + _write_schema_outputs(meta, by_table, table_dict_with_desc) except Exception as e: + frappe.log_error(frappe.get_traceback(), str(e)) return {"ok": False, "error": str(e)} - return { "ok": True, "changed_tables": len(changed_tables), "missing_added": len(missing_from_schema), "total_tables": len(current_tables), - "message": f"Synced {len(changed_tables)} changed + {len(missing_from_schema)} missing tables", } - - def _get_claude_client() -> Optional[Anthropic]: settings = frappe.get_single("ChangAI Settings") @@ -868,128 +701,142 @@ def _save_schema_checkpoint(meta: Dict[str, Any], tables_blocks: List[Dict[str, ) -def _process_pending_field_batches( - client, - table: str, - pending_fields: List[Dict[str, Any]], - batch_size: int, -) -> Dict[str, int]: - updated_in_table = 0 - updated_fields = 0 - consecutive_errors = 0 - for i in range(0, len(pending_fields), batch_size): - batch = pending_fields[i:i + batch_size] - desc_map = _smart_desc_map(client, table, batch) - if not desc_map: - consecutive_errors += 1 - continue - consecutive_errors = 0 - for field in batch: - field_name = field.get("name") - if field_name in desc_map: - field["description"] = desc_map[field_name].strip() - updated_fields += 1 - updated_in_table += 1 - return { - "updated_in_table": updated_in_table, - "updated_fields": updated_fields, - "consecutive_errors": consecutive_errors, - } - -def _process_table_for_missing_descriptions( - client, - block: Dict[str, Any], - batch_size: int, -) -> Dict[str, int]: +def _process_table_for_missing_descriptions(block: Dict[str, Any], batch_size: int) -> Dict[str, int]: if not isinstance(block, dict): - return { - "updated_in_table": 0, - "updated_fields": 0, - "consecutive_errors": 0, - "skipped": 1, - } + return {"updated_in_table": 0, "updated_fields": 0, "consecutive_errors": 0, "skipped": 1} table = block.get("table") pending_fields = _get_pending_fields(block) if not pending_fields: block["desc_done"] = True - return { - "updated_in_table": 0, - "updated_fields": 0, - "consecutive_errors": 0, - "skipped": 0, - } + return {"updated_in_table": 0, "updated_fields": 0, "consecutive_errors": 0, "skipped": 0} block["desc_done"] = False try: - result = _process_pending_field_batches( - client=client, - table=table, - pending_fields=pending_fields, - batch_size=batch_size, - ) + result = _process_pending_field_batches(table=table, pending_fields=pending_fields, batch_size=batch_size) # no client= except Exception as e: frappe.logger().error(f"Critical error in table {table}: {e}") - return { - "updated_in_table": 0, - "updated_fields": 0, - "consecutive_errors": 1, - "skipped": 0, - } + return {"updated_in_table": 0, "updated_fields": 0, "consecutive_errors": 1, "skipped": 0} if result["updated_in_table"]: _mark_table_desc_done(block) - result["skipped"] = 0 return result - -@frappe.whitelist() -def sync_schema_and_enqueue_descriptions() -> Dict[str, Any]: +def _process_pending_field_batches(table: str, pending_fields: List[Dict[str, Any]], batch_size: int) -> Dict[str, int]: + updated_in_table = 0 + updated_fields = 0 + consecutive_errors = 0 + for i in range(0, len(pending_fields), batch_size): + batch = pending_fields[i:i + batch_size] + desc_map = _smart_desc_map_gemini(table, batch) # was _smart_desc_map(client, table, batch) + if not desc_map: + consecutive_errors += 1 + continue + consecutive_errors = 0 + for field in batch: + field_name = field.get("name") + if field_name in desc_map: + field["description"] = desc_map[field_name].strip() + updated_fields += 1 + updated_in_table += 1 + return {"updated_in_table": updated_in_table, "updated_fields": updated_fields, "consecutive_errors": consecutive_errors} +def _smart_desc_map_gemini(table_name: str, fields: List[Dict[str, Any]]) -> Dict[str, str]: + field_names = _get_field_names(fields) + if not field_names: + return {} + prompt = _build_desc_prompt(table_name, field_names) + system_prompt = "Return ONLY a valid JSON object. No markdown. No extra text." + for attempt in range(3): + try: + response = call_gemini(prompt, system_prompt) + text = (response or "").strip() + parsed = _extract_json_object(text) + normalized = _normalize_desc_map(parsed) + if normalized: + return normalized + frappe.logger().warning(f"Gemini returned non-JSON table={table_name} attempt={attempt+1} preview={text[:200]!r}") + except Exception as e: + frappe.logger().error(f"Gemini error table={table_name} attempt={attempt+1}: {e}") + time.sleep(2 * (attempt + 1)) + return {} +def full_schema_rebuild_job(): res = sync_tables_and_schema_smart() - if not res.get("ok"): - return res + if res and res.get("ok"): + fill_missing_field_descriptions() + convert_yaml_schema_to_sqlglot_meta() + build_table_fvs_job() + build_schema_fvs_job() + +SCHEMA_REBUILD_LOCK_KEY = "changai:schema_full_rebuild_pending" +def _schedule_full_schema_rebuild(): + if frappe.cache().get_value(SCHEMA_REBUILD_LOCK_KEY): + return + frappe.cache().set_value(SCHEMA_REBUILD_LOCK_KEY, "1", expires_in_sec=14400 + 60) frappe.enqueue( - "changai.changai.api.v2.auto_gen_api.fill_missing_field_descriptions", + "changai.changai.api.v2.auto_gen_api.full_schema_rebuild_job", queue="long", timeout=14400, ) - convert_yaml_schema_to_sqlglot_meta() - frappe.enqueue( - "changai.changai.api.v2.build_cards_faiss_index_v2.build_table_fvs_job", - queue="long", - timeout=1800, - ) - frappe.enqueue( - "changai.changai.api.v2.build_cards_faiss_index_v2.build_schema_fvs_job", - queue="long", - timeout=1800, - ) - # clear_schema_field_caches() - return {"ok": True, "message": _("Schema updated โœ… Field descriptions running in background ๐Ÿง ")} +@frappe.whitelist() +def schema_sync(doc=None,method=None): + if method == "on_update" and doc and doc.creation == doc.modified: + return + if not doc: + return + if frappe.flags.in_migrate or frappe.flags.in_install: + return _schedule_full_schema_rebuild() + else: + frappe.enqueue( + "changai.changai.api.v2.auto_gen_api.sync_schema_single", + queue="long", + timeout =14400, + doctype_name=doc.name, + deleted=(method == "after_delete"),) + +def _write_schema_outputs_incremental(meta, by_table, deleted_table: Optional[str] = None): + ordered_blocks = list(by_table.values()) + write_filedoctype(SCHEMA_YAML, {"_meta": meta, "tables": ordered_blocks}, folder=RAG_FOLDER) + + tables_payload = _read_filedoctype(TABLES_JSON, RAG_FOLDER) or [] + tables_payload = [row for row in tables_payload if isinstance(row, dict)] + + valid_tables = set(by_table.keys()) + tables_payload = [row for row in tables_payload if row.get("table") in valid_tables] + + if not deleted_table: + for table_name, block in by_table.items(): + existing = next((r for r in tables_payload if r.get("table") == table_name), None) + desc = block.get("description", "") or "" + if not desc.strip() and not existing: + desc = _generate_table_description(table_name) + if existing: + if desc.strip(): + existing["description"] = desc + # else: leave existing row untouched, no description update needed + else: + tables_payload.append({"table": table_name, "description": desc}) -def _get_field_names(fields: List[Dict[str, Any]]) -> List[str]: - return [ - field.get("name") - for field in fields - if isinstance(field, dict) and field.get("name") - ] - - -def _build_desc_prompt(table_name: str, field_names: List[str]) -> str: - return f""" -Generate SHORT, HIGH-SIGNAL ERP field descriptions for embedding retrieval. - -Table: {table_name} - -Rules: -- Do NOT rename fields. -- 1 sentence per field. -- Focus on WHEN/WHY this field is used in business questions. -- Output ONLY JSON object: {{"field_name": "description"}} + write_filedoctype(TABLES_JSON, tables_payload, folder=RAG_FOLDER) -Fields: -{json.dumps(field_names, ensure_ascii=False)} -""".strip() +@frappe.whitelist() +def sync_schema_single(doctype_name: str, deleted: bool = False): + payload = _read_filedoctype(SCHEMA_YAML, RAG_FOLDER) + meta, tables_blocks = _normalize_schema_payload(payload) + by_table = _build_table_map(tables_blocks) + table = _tab(doctype_name) + if deleted or not frappe.db.exists("DocType",doctype_name): + by_table.pop(table,None) + else: + _process_schema_table(table, by_table) + block = by_table.get(table) + if block: + _process_table_for_missing_descriptions(block=block, batch_size=15) + _clean_schema_fields(by_table) + meta["last_sync"] = str(now_datetime()) + _write_schema_outputs_incremental(meta, by_table, deleted_table=table if deleted else None) + convert_yaml_schema_to_sqlglot_meta() + build_table_fvs_job() + build_schema_fvs_job() def _call_openai_desc_map_once(client, prompt: str): return client.chat.completions.create( @@ -1024,4 +871,181 @@ def _smart_desc_map_openai(client, table_name: str, fields: List[Dict[str, Any]] except Exception as e: frappe.logger().error(f"OpenAI error table={table_name} attempt={attempt+1}: {e}") time.sleep(2 * (attempt + 1)) - return {} \ No newline at end of file + return {} + + +def _upsert_master_data_record(mod:str, doc_name:str): + entity_type = f"tab{mod}" + file_name = "master_data.yaml" + payload = _read_filedoctype(file_name, RAG_FOLDER) + meta, data = _normalize_master_data_payload(payload) + meta_doc = frappe.get_meta(mod) + title_field = meta_doc.title_field or "name" + if not frappe.db.exists(mod,doc_name): + return + fields = ["name"] + if title_field != "name": + fields.append(title_field) + rec = frappe.db.get_value(mod,doc_name,fields,as_dict=True) or {} + if mod == "Item": + item_code = rec.get("name") + item_name = rec.get(title_field) # item_name is title_field and item_code is the name field + if not item_code: + return + filters = [{"field": "item_code", "value": item_code}] + if item_name and item_name!=item_code: + filters.append({"field": "item_name", "value": item_name}) + new_row = _build_master_data_row(entity_type, item_code, doc_name, title_field, filters) + else: + entity_id = rec.get(title_field) if title_field in rec else rec.get("name") + if not entity_id: + return + new_row = _build_master_data_row(entity_type, entity_id, doc_name, title_field, None) + data = [ + row for row in data + if not (isinstance(row,dict) and row.get("entity_type")==entity_type and row.get("doc_name") == doc_name) + ] + data.append(new_row) + meta["last_sync"]= str(now_datetime()) + write_filedoctype(file_name, {"_meta": meta, "data": data}, folder=RAG_FOLDER) + + + +def _remove_master_data_record(mod:str,doc_name:str): + entity_type = f"tab{mod}" + file_name = "master_data.yaml" + payload = _read_filedoctype(file_name, RAG_FOLDER) + meta, data = _normalize_master_data_payload(payload) + data = [ + row for row in data + if not(isinstance(row,dict) and row.get("entity_type") == entity_type and row.get("doc_name") == doc_name) + ] + meta["last_sync"] =str(now_datetime()) + write_filedoctype(file_name, {"_meta": meta, "data": data}, folder=RAG_FOLDER) + +def _schedule_debounced_fvs_rebuild(): + if frappe.cache().get_value(MASTERDATA_REBUILD_LOCK_KEY): + return + frappe.cache().set_value( + MASTERDATA_REBUILD_LOCK_KEY, + "1", + expires_in_sec=DEBOUNCE_SEC + MASTERDATA_REBUILD_LOCK_BUFFER_SEC + ) + frappe.enqueue( + "changai.changai.api.v2.auto_gen_api.debounced_rebuild_master_fvs", + queue="long", + timeout=1800, + ) +def debounced_rebuild_master_fvs(): + time.sleep(DEBOUNCE_SEC) + try: + build_master_data_fvs_job() + finally: + frappe.cache().delete_value(MASTERDATA_REBUILD_LOCK_KEY) + +def sync_and_rebuild_masterdata_single(mod:str,doc_name :str,action:str): + if action == "delete": + _remove_master_data_record(mod, doc_name) + else: + _upsert_master_data_record(mod,doc_name) + _schedule_debounced_fvs_rebuild() + + +@frappe.whitelist() +def update_masterdata(doc = None,method = None): + if not doc: + return + if method == "on_update" and doc.creation == doc.modified: + return + mod = doc.doctype # get doctype name + if method == "after_delete": + meta_doc = frappe.get_meta(mod) + frappe.enqueue( + "changai.changai.api.v2.auto_gen_api.sync_and_rebuild_masterdata_single", + queue="short", + timeout=300, + mod=mod, + doc_name=doc.name, + action="delete", + ) + else: + frappe.enqueue( + "changai.changai.api.v2.auto_gen_api.sync_and_rebuild_masterdata_single", + queue="short", + timeout=300, + mod=mod, + doc_name=doc.name, + action="upsert", + ) + + + +DEBOUNCE_SEC =60 +MASTERDATA_REBUILD_LOCK_BUFFER_SEC =300 +MASTERDATA_REBUILD_LOCK_KEY = "changai:masterdata_fvs_rebuild_pending" +MODULES_TO_SYNC = [ + "Customer", + "Supplier", + "Item", + "Warehouse", + "Company", + "Account" +] + + +@frappe.whitelist(allow_guest=False) +def sync_master_data_smart() -> Dict[str, Any]: + file_name = "master_data.yaml" + payload = _read_filedoctype(file_name, RAG_FOLDER) + meta, data = _normalize_master_data_payload(payload) + rebuilt_rows: List[Dict[str, Any]] = [] + for mod in MODULES_TO_SYNC: + entity_type = f"tab{mod}" + meta_doc = frappe.get_meta(mod) + title_field = meta_doc.title_field or "name" + fields = ["name"] + if title_field != "name": + fields.append(title_field) + live_records = frappe.get_all(mod, fields=fields, limit_page_length=0) + for rec in live_records: + if mod == "Item": + item_code = rec.get("name") + item_name = rec.get(title_field) + if item_code: + filters = [{"field": "item_code", "value": item_code}] + if item_name and item_name != item_code: + filters.append({"field": "item_name", "value": item_name}) + rebuilt_rows.append( + _build_master_data_row(entity_type, item_code, rec.get("name"), title_field, filters) + ) + else: + entity_id = rec.get(title_field) if title_field in rec else rec.get("name") + rebuilt_rows.append( + _build_master_data_row(entity_type, entity_id, rec.get("name"), title_field, None) + ) + final_data = rebuilt_rows + meta["last_sync"] = str(now_datetime()) + settings = frappe.get_single("ChangAI Settings") + settings.last_masterdata_sync = meta["last_sync"] + settings.save(ignore_permissions=True) + payload_out = {"_meta": meta, "data": final_data} + write_filedoctype(file_name, payload_out, folder=RAG_FOLDER) + + +def sync_and_rebuild_masterdata(): + sync_master_data_smart() + # call vector api + build_master_data_fvs_job() + + +#run after migrate - single full scan call +@frappe.whitelist() +def rebuild_masterdata_after_migrate(doc=None,method=None): + try: + sync_and_rebuild_masterdata() + except Exception: + frappe.log_error(frappe.get_traceback(), "ChangAI patch: masterdata rebuild failed") + try: + full_schema_rebuild_job() + except Exception: + frappe.log_error(frappe.get_traceback(), "ChangAI patch: schema rebuild failed") diff --git a/changai/changai/api/v2/build_cards_faiss_index_v2.py b/changai/changai/api/v2/build_cards_faiss_index_v2.py index 2841cb8..8827c91 100644 --- a/changai/changai/api/v2/build_cards_faiss_index_v2.py +++ b/changai/changai/api/v2/build_cards_faiss_index_v2.py @@ -141,23 +141,95 @@ def build_report_docs(report_list: List[Dict[str, Any]]) -> List[Document]: return docs def build_table_docs(table_list: List[str]) -> List[Document]: - """ - Build one Document per table name from tables.json. - tables.json is a flat list: ["tabSales Invoice", "tabPurchase Order", ...] - """ docs = [] - for table_name in table_list: - if not isinstance(table_name, str) or not table_name.strip(): + for row in table_list: + if not isinstance(row, dict): + continue + table_name = row.get("table") or "" + description = row.get("description", "") or "" + if not isinstance(table_name,str) or not table_name.strip(): continue + page_content = f"[TABLE] {table_name}" + if description: + page_content += f"\n{description}" docs.append(Document( - page_content=f"[TABLE] {table_name}", + page_content=page_content, metadata={ "type": "table", "table": table_name, + "description": description } )) return docs +from changai.changai.api.v2.clients import call_gemini +def _generate_table_description(table_name: str): + SYSTEM_PROMPT = """You are a database documentation assistant for an ERPNext semantic search system. ERPNext is a well-known open-source ERP application with a fixed, well-documented set of DocTypes. Your job is to write short, accurate, plain-language descriptions of ERPNext database tables so that an embedding model can match user questions to the correct table. + +Rules you must always follow: +- Table names are prefixed with "tab" followed by the exact DocType name (e.g. "tabSales Invoice" = the Sales Invoice DocType). Identify the precise, real ERPNext DocType before describing it โ€” do not guess loosely from surface wording. +- ERPNext has many DocTypes with similar-sounding names that represent DIFFERENT stages of a business process (e.g. a request/commitment stage vs. a fulfillment stage vs. a billing/payment stage vs. an internal movement). Think carefully about which exact stage and transaction type this specific DocType represents, and make that distinction clear in your description โ€” do not default to the most generic or most common-sounding interpretation of the name. +- Write exactly ONE sentence, maximum 30 words. +- Use plain business language โ€” avoid technical/database jargon (no "entity," "record set," "schema," etc.). +- Describe the real-world business data or transaction this table represents, and its stage/purpose in the business process where relevant, not how it's structured internally. +- Do NOT repeat the table name verbatim in your description. +- Do NOT include quotes, labels, preambles, or any text other than the description itself. +- If you are not confident about the exact ERPNext DocType semantics for a given table, describe it cautiously and generically rather than inventing specifics that may be wrong. + +Output format: plain text, one sentence, nothing else.""" + + USER_PROMPT = f"""Table name: {table_name} +This is a table from ERPNext. First identify the exact ERPNext DocType it corresponds to (strip the "tab" prefix). Then consider what distinguishes it from any similarly-named or similarly-purposed DocTypes in ERPNext, and write a description that reflects its specific, accurate business role. +Write the description now. +Output format: plain text, one sentence only โ€” no quotes, no labels, no preamble, nothing else.""" + + try: + response = call_gemini(USER_PROMPT, SYSTEM_PROMPT) + return response + except Exception: + frappe.log_error(frappe.get_traceback(), f"Gemini description generation failed: {table_name}") + return "" + +def enrich_tables_descriptions(table_list: List[Any]) -> List[Dict[str, Any]]: + normalized = [] + + for row in table_list: + if isinstance(row, str): + row = {"table": row, "description": ""} + elif not isinstance(row, dict): + continue # skip genuinely invalid entries + + if not row.get("description"): + table_name = row.get("table") + if table_name: + desc = _generate_table_description(table_name) + if desc: + row["description"] = desc + + normalized.append(row) # <-- always append the (possibly converted) row + return normalized # <-- return the converted list, not the original + +def _save_tables_json_to_file_doc(tables_list: List[Dict[str, Any]], file_name: str = "tables.json", folder: str = RAG_FOLDER): + """ + Write updated tables.json back to the Frappe File doctype so future + rebuilds pick up the generated descriptions without re-calling Gemini. + """ + file_id = frappe.db.get_value("File", {"file_name": file_name, "folder": folder}, "name") + content = json.dumps(tables_list, indent=2, ensure_ascii=False) + + if file_id: + doc = frappe.get_doc("File", file_id) + doc.save_file(content=content.encode("utf-8"), overwrite=True) + else: + frappe.get_doc({ + "doctype": "File", + "file_name": file_name, + "folder": folder, + "content": content, + }).insert(ignore_permissions=True) + + frappe.db.commit() + def _is_valid_schema_table(table_block: Any) -> bool: return isinstance(table_block, dict) and "table" in table_block diff --git a/changai/changai/api/v2/clients.py b/changai/changai/api/v2/clients.py index 72417bc..d5d9dd9 100644 --- a/changai/changai/api/v2/clients.py +++ b/changai/changai/api/v2/clients.py @@ -1,5 +1,6 @@ import frappe import requests +import httpx import json import time from frappe import _ @@ -11,8 +12,12 @@ from changai.changai.api.v2.schema_utils import (ChangAIConfig, CHANGAI_SETTINGS, CHANGAI_GUIDE_LINK, ERPGULF_LINK, get_settings_url) _GEMINI_CLIENT = None _GEMINI_CONFIG = None +_GEMINI_IS_VERTEX = False APPLICATION_JSON = "application/json" MODEL_ID = "gemini-2.5-flash-lite" +FREE_TIER_MODEL_ID = "gemini-3.5-flash-lite" +# Without a timeout a stalled Gemini call keeps the chat request open indefinitely +GEMINI_TIMEOUT_MS = 60000 STATUS_200 = 200 @@ -114,15 +119,21 @@ def _get_api_key_client(config): title=_("Gemini Authentication Not Configured"), ) - return genai.Client(api_key=api_key) + return genai.Client( + api_key=api_key, + http_options=types.HttpOptions(timeout=GEMINI_TIMEOUT_MS), + ) def _build_gemini_client(config): + global _GEMINI_IS_VERTEX project_id, credentials_json, location = _get_gemini_vertex_config(config) if project_id or credentials_json or location: + _GEMINI_IS_VERTEX = True return _build_vertex_gemini_client(project_id, location, credentials_json) + _GEMINI_IS_VERTEX = False return _get_api_key_client(config) @@ -143,6 +154,18 @@ def _clean_gemini_response_text(text: str) -> str: def _handle_gemini_api_exception(e: Exception) -> None: + if isinstance(e, (httpx.TimeoutException, httpx.ConnectError)): + frappe.log_error(frappe.get_traceback(), "Gemini API Connection Error") + frappe.throw( + _("Could not reach the Gemini API within {0} seconds.

" + "Please check that this server has outbound internet access to generativelanguage.googleapis.com " + "(or aiplatform.googleapis.com for Vertex AI) and try again.
" + "Check ChangAI Quick Start Guide ๐Ÿ‘‡:
" + "Click here
" + "ERPGulf.com." +).format(GEMINI_TIMEOUT_MS // 1000, CHANGAI_GUIDE_LINK, ERPGULF_LINK), + title=_("Gemini API Unreachable"), + ) if isinstance(e, google_exceptions.ResourceExhausted): frappe.throw( _("Gemini API quota exceeded.

Please wait and try again or upgrade your plan.
Check Quick Start Guide ๐Ÿ‘‡:
" @@ -238,6 +261,7 @@ def _build_vertex_gemini_client(project_id: str, location: str, credentials_json project=project_id, location=location, credentials=creds, + http_options=types.HttpOptions(timeout=GEMINI_TIMEOUT_MS), ) @@ -302,7 +326,7 @@ def call_gemini(prompt: str,sys_prompt: str) -> Union[str, Dict[str, Any]]: system_instruction=sys_prompt, ) response = client.models.generate_content( - model=MODEL_ID, + model=MODEL_ID if _GEMINI_IS_VERTEX else FREE_TIER_MODEL_ID, config=gemini_config, contents=_build_gemini_contents(prompt), ) diff --git a/changai/changai/api/v2/fvs_stores/erpnext/emb_dir/field_docs.pkl b/changai/changai/api/v2/fvs_stores/erpnext/emb_dir/field_docs.pkl index 2650d8b..ff7c57f 100644 Binary files a/changai/changai/api/v2/fvs_stores/erpnext/emb_dir/field_docs.pkl and b/changai/changai/api/v2/fvs_stores/erpnext/emb_dir/field_docs.pkl differ diff --git a/changai/changai/api/v2/fvs_stores/erpnext/emb_dir/field_embs.npy b/changai/changai/api/v2/fvs_stores/erpnext/emb_dir/field_embs.npy index 28aa17e..22288b9 100644 Binary files a/changai/changai/api/v2/fvs_stores/erpnext/emb_dir/field_embs.npy and b/changai/changai/api/v2/fvs_stores/erpnext/emb_dir/field_embs.npy differ diff --git a/changai/changai/api/v2/fvs_stores/erpnext/emb_dir/table_to_idx.pkl b/changai/changai/api/v2/fvs_stores/erpnext/emb_dir/table_to_idx.pkl index 57f1cba..f194255 100644 Binary files a/changai/changai/api/v2/fvs_stores/erpnext/emb_dir/table_to_idx.pkl and b/changai/changai/api/v2/fvs_stores/erpnext/emb_dir/table_to_idx.pkl differ diff --git a/changai/changai/api/v2/fvs_stores/erpnext/report_fvs/index.faiss b/changai/changai/api/v2/fvs_stores/erpnext/report_fvs/index.faiss index 86d3856..236a144 100644 Binary files a/changai/changai/api/v2/fvs_stores/erpnext/report_fvs/index.faiss and b/changai/changai/api/v2/fvs_stores/erpnext/report_fvs/index.faiss differ diff --git a/changai/changai/api/v2/fvs_stores/erpnext/table_fvs/index.faiss b/changai/changai/api/v2/fvs_stores/erpnext/table_fvs/index.faiss index f3fcec5..faf4b46 100644 Binary files a/changai/changai/api/v2/fvs_stores/erpnext/table_fvs/index.faiss and b/changai/changai/api/v2/fvs_stores/erpnext/table_fvs/index.faiss differ diff --git a/changai/changai/api/v2/fvs_stores/erpnext/table_fvs/index.pkl b/changai/changai/api/v2/fvs_stores/erpnext/table_fvs/index.pkl index 7cc13aa..aee404b 100644 Binary files a/changai/changai/api/v2/fvs_stores/erpnext/table_fvs/index.pkl and b/changai/changai/api/v2/fvs_stores/erpnext/table_fvs/index.pkl differ diff --git a/changai/changai/api/v2/schema.yaml b/changai/changai/api/v2/schema.yaml new file mode 100644 index 0000000..cd45a92 --- /dev/null +++ b/changai/changai/api/v2/schema.yaml @@ -0,0 +1,56916 @@ +_meta: + last_sync: '2026-08-03 16:11:49.327682' + last_doctype_sync: '2026-05-04 16:01:53.273315' + last_desc_sync_partial: '2026-02-11 18:03:00.028676' + last_desc_sync: '2026-07-16 11:36:16.128056' +tables: +- table: tabAbout Us Team Member + description: '' + fields: + - name: full_name + fieldtype: Data + label: Full Name + description: Complete name of the team member displayed publicly, used when searching + or filtering by team member identity. + - name: bio + fieldtype: Small Text + label: Bio + description: Biographical description or background information about the team + member, used when searching for expertise or team member details. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabAbout Us Team + Member). Comparison-ready across parent records.' +- table: tabAccess Log + description: '' + fields: + - name: export_from + fieldtype: Data + label: Export From + description: Source module or document type from which data was exported, used + for tracking export origins. + - name: user + fieldtype: Link + label: 'User ' + description: User who performed the logged access or action, used for user activity + analysis and security audits. + join_hint: + table: tabUser + 'on': user = tabUser.name + - name: reference_document + fieldtype: Data + label: Reference Document + description: Document that was accessed or modified, used for tracking which records + users interacted with. + - name: timestamp + fieldtype: Datetime + label: Timestamp + description: Exact date and time when the access event occurred, used for precise + activity timeline analysis. + - name: file_type + fieldtype: Data + label: File Type + description: Format of exported or accessed file, used for filtering logs by document + type in compliance reports. + - name: method + fieldtype: Data + label: Method + description: Action or operation performed, used for categorizing access events + like view, edit, export, or delete. + - name: report_name + fieldtype: Data + label: Report Name + description: Used to identify which specific report or dashboard was accessed + by users for audit and usage analytics. + - name: filters + fieldtype: Code + label: Filters + description: Used to track what filter criteria users applied when running reports + to understand data segmentation patterns and common query parameters. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Access Log document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabAccount + description: Heads (or groups) against which Accounting Entries are made and balances + are maintained. + fields: + - name: disabled + fieldtype: Check + label: Disable + description: Indicates whether the account is inactive or no longer in use, relevant + when filtering for active accounts or analyzing historical account status changes. + - name: account_name + fieldtype: Data + label: Account Name + description: Full descriptive name of the account used when users search by account + description, generate financial reports, or need human-readable account identification. + - name: account_number + fieldtype: Data + label: Account Number + description: Unique identifier for the account used in financial transactions + and reporting queries. + - name: is_group + fieldtype: Check + label: Is Group + description: Indicates whether the account is a parent grouping account rather + than a transactional account. + - name: company + fieldtype: Link + label: Company + description: The specific company or entity that owns or is associated with this + account in multi-company environments. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: root_type + fieldtype: Select + label: Root Type + description: Top-level classification of account as Asset, Liability, Equity, + Income, or Expense for financial statement categorization + options: + - Asset + - Liability + - Income + - Expense + - Equity + - name: report_type + fieldtype: Select + label: Report Type + description: Balance Sheet or Profit and Loss statement assignment determining + where the account appears in financial reports + options: + - Balance Sheet + - Profit and Loss + - name: account_currency + fieldtype: Link + label: Currency + description: Currency in which transactions for this account are denominated and + recorded + join_hint: + table: tabCurrency + 'on': account_currency = tabCurrency.name + - name: parent_account + fieldtype: Link + label: Parent Account + description: Links account to its parent in the chart of accounts hierarchy for + rollup reporting and multi-level financial structures. + join_hint: + table: tabAccount + 'on': parent_account = tabAccount.name + - name: account_type + fieldtype: Select + label: Account Type + description: Categorizes account as asset, liability, equity, revenue, or expense + for financial statement classification and balance sheet vs income statement + placement. + options: + - Accumulated Depreciation + - Asset Received But Not Billed + - Bank + - Cash + - Chargeable + - Capital Work in Progress + - Cost of Goods Sold + - Current Asset + - Current Liability + - Depreciation + - Direct Expense + - Direct Income + - Equity + - Expense Account + - Expenses Included In Asset Valuation + - Expenses Included In Valuation + - Fixed Asset + - Income Account + - Indirect Expense + - Indirect Income + - Liability + - Payable + - Receivable + - Round Off + - Round Off for Opening + - Stock + - Stock Adjustment + - Stock Received But Not Billed + - Service Received But Not Billed + - Tax + - Temporary + - name: tax_rate + fieldtype: Float + label: Tax Rate + description: Default tax percentage applied to transactions using this account + for automatic tax calculation on sales or purchases. + - name: freeze_account + fieldtype: Select + label: Frozen + description: Whether the account is frozen and cannot accept new transactions + or postings. + options: + - 'No' + - 'Yes' + - name: balance_must_be + fieldtype: Select + label: Balance must be + description: Required balance constraint for the account such as debit, credit, + or no restriction. + options: + - Debit + - Credit + - name: lft + fieldtype: Int + label: Lft + description: Left boundary value in nested set model for hierarchical account + tree traversal and parent-child queries. + - name: rgt + fieldtype: Int + label: Rgt + description: Right boundary value in nested set hierarchy for account tree traversal + and subtree queries. + - name: old_parent + fieldtype: Data + label: Old Parent + description: Previous parent account before reparenting or restructuring the account + hierarchy. + - name: include_in_gross + fieldtype: Check + label: Include in gross + description: Whether this account's balance is included in gross profit or gross + margin calculations. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Account document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabAccount Closing Balance + description: '' + fields: + - name: closing_date + fieldtype: Date + label: Closing Date + description: The specific date when the account balance was closed or finalized + for a reporting period. + - name: account + fieldtype: Link + label: Account + description: The account identifier for which the closing balance is recorded. + join_hint: + table: tabAccount + 'on': account = tabAccount.name + - name: cost_center + fieldtype: Link + label: Cost Center + description: Cost center associated with the account closing balance for departmental + or divisional financial tracking. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + - name: debit + fieldtype: Currency + label: Debit Amount + description: Debit balance amount at account closing, representing assets or expenses + with debit-side balances. + - name: credit + fieldtype: Currency + label: Credit Amount + description: Credit balance amount at account closing, representing liabilities, + equity, or revenue with credit-side balances. + - name: account_currency + fieldtype: Link + label: Account Currency + description: Currency in which the account balance and transactions are denominated, + used when filtering or analyzing balances by specific currency. + join_hint: + table: tabCurrency + 'on': account_currency = tabCurrency.name + - name: debit_in_account_currency + fieldtype: Currency + label: Debit Amount in Account Currency + description: Total debit amount in the account's native currency, used when calculating + net balance or analyzing debit activity without currency conversion. + - name: credit_in_account_currency + fieldtype: Currency + label: Credit Amount in Account Currency + description: Total credit amount in the account's native currency, used when calculating + net balance or analyzing credit activity without currency conversion. + - name: project + fieldtype: Link + label: Project + description: Filter or group account closing balances by specific project to analyze + project-level financial positions. + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: company + fieldtype: Link + label: Company + description: Filter or group account closing balances by specific company entity + in multi-company environments. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: finance_book + fieldtype: Link + label: Finance Book + description: Filter account closing balances by alternative accounting book for + parallel accounting scenarios like tax vs management reporting. + join_hint: + table: tabFinance Book + 'on': finance_book = tabFinance Book.name + - name: period_closing_voucher + fieldtype: Link + label: Period Closing Voucher + description: The voucher document used to close accounting periods and transfer + balances. + join_hint: + table: tabPeriod Closing Voucher + 'on': period_closing_voucher = tabPeriod Closing Voucher.name + - name: is_period_closing_voucher_entry + fieldtype: Check + label: Is Period Closing Voucher Entry + description: Indicates whether this balance entry was created by the period closing + process. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Account Closing Balance document (master/transaction). + Use only for single-entity lookups, not cross-record comparison unless fields + are per-relationship (e.g. supplier, price_list).' +- table: tabAccounting Dimension + description: '' + fields: + - name: document_type + fieldtype: Link + label: Reference Document Type + description: Specifies the category or type of accounting dimension such as cost + center, department, or project for organizing financial data. + join_hint: + table: tabDocType + 'on': document_type = tabDocType.name + - name: label + fieldtype: Data + label: Dimension Name + description: Human-readable display name for the accounting dimension used in + reports and user interfaces when presenting financial breakdowns. + - name: fieldname + fieldtype: Data + label: Fieldname + description: Name or code identifying the accounting dimension used for financial + segmentation and reporting analysis + - name: dimension_defaults + fieldtype: Table + label: Dimension Defaults + description: '' + child_hint: + child_table: tabAccounting Dimension Detail + fieldname: dimension_defaults + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: dimension_defaults + - name: disabled + fieldtype: Check + label: Disable + description: Indicates whether the accounting dimension is currently inactive + and unavailable for use in transactions + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Accounting Dimension document (master/transaction). Use + only for single-entity lookups, not cross-record comparison unless fields are + per-relationship (e.g. supplier, price_list).' +- table: tabAccounting Dimension Detail + description: '' + fields: + - name: company + fieldtype: Link + label: Company + description: The specific company entity this accounting dimension belongs to + in multi-company environments. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: reference_document + fieldtype: Link + label: Reference Document + description: The source transaction or document that created or is linked to this + accounting dimension entry. + join_hint: + table: tabDocType + 'on': reference_document = tabDocType.name + - name: default_dimension + fieldtype: Dynamic Link + label: Default Dimension + description: The default accounting dimension value automatically applied to transactions + when no specific dimension is selected. + - name: mandatory_for_bs + fieldtype: Check + label: Mandatory For Balance Sheet + description: Indicates whether this dimension must be specified on balance sheet + account transactions. + - name: mandatory_for_pl + fieldtype: Check + label: Mandatory For Profit and Loss Account + description: Indicates whether this dimension must be specified on profit and + loss account transactions. + - name: automatically_post_balancing_accounting_entry + fieldtype: Check + label: Automatically post balancing accounting entry + description: Whether the system automatically creates offsetting journal entries + to balance transactions for this accounting dimension. + - name: offsetting_account + fieldtype: Link + label: Offsetting Account + description: The account used to automatically balance entries when posting transactions + involving this accounting dimension. + join_hint: + table: tabAccount + 'on': offsetting_account = tabAccount.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabAccounting Dimension + Detail). Comparison-ready across parent records.' +- table: tabAccounting Dimension Filter + description: '' + fields: + - name: accounting_dimension + fieldtype: Select + label: Accounting Dimension + description: The specific accounting dimension (like cost center, project, department) + that this filter applies to + - name: fieldname + fieldtype: Data + label: Fieldname + description: The document field being filtered on to determine which accounting + dimension values are allowed or applied + - name: disabled + fieldtype: Check + label: Disabled + description: Whether this accounting dimension filter is inactive and excluded + from transactions or reports. + - name: company + fieldtype: Link + label: Company + description: The specific company entity to which this accounting dimension filter + applies. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: apply_restriction_on_values + fieldtype: Check + label: Apply restriction on dimension values + description: Whether this filter enforces restrictions on which dimension values + can be selected or used in transactions. + - name: allow_or_restrict + fieldtype: Select + label: Allow Or Restrict Dimension + description: Whether the filter permits or blocks the specified accounts and dimensions + from being used together + options: + - Allow + - Restrict + - name: accounts + fieldtype: Table + label: Applicable On Account + description: '' + child_hint: + child_table: tabApplicable On Account + fieldname: accounts + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: accounts + - name: dimensions + fieldtype: Table + label: Applicable Dimension + description: '' + child_hint: + child_table: tabAllowed Dimension + fieldname: dimensions + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: dimensions + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Accounting Dimension Filter document (master/transaction). + Use only for single-entity lookups, not cross-record comparison unless fields + are per-relationship (e.g. supplier, price_list).' +- table: tabAccounting Period + description: '' + fields: + - name: period_name + fieldtype: Data + label: Period Name + description: Human-readable label for the accounting period used when users reference + periods like 'Q1 2024' or 'January 2024' in queries. + - name: start_date + fieldtype: Date + label: Start Date + description: Beginning date of the accounting period used when determining which + transactions fall within a specific fiscal timeframe. + - name: end_date + fieldtype: Date + label: End Date + description: The final date of the accounting period, used when filtering or identifying + periods by their closing boundary. + - name: company + fieldtype: Link + label: Company + description: The company entity to which this accounting period belongs, used + to filter periods by organizational unit. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: closed_documents + fieldtype: Table + label: Closed Documents + description: '' + child_hint: + child_table: tabClosed Document + fieldname: closed_documents + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: closed_documents + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Accounting Period document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabActivity Cost + description: '' + fields: + - name: activity_type + fieldtype: Link + label: Activity Type + description: Category or classification of the activity such as meeting, travel, + training, or project work + join_hint: + table: tabActivity Type + 'on': activity_type = tabActivity Type.name + - name: employee + fieldtype: Link + label: Employee + description: Employee who performed or is associated with this activity cost + join_hint: + table: tabEmployee + 'on': employee = tabEmployee.name + - name: employee_name + fieldtype: Data + label: Employee Name + description: Name of the employee whose activity costs are being tracked for labor + expense analysis and project costing. + - name: department + fieldtype: Link + label: Department + description: Department to which the employee belongs for cost allocation and + departmental expense reporting. + join_hint: + table: tabDepartment + 'on': department = tabDepartment.name + - name: billing_rate + fieldtype: Currency + label: Billing Rate + description: Hourly or unit rate charged to customers or projects for this employee's + work. + - name: costing_rate + fieldtype: Currency + label: Costing Rate + description: Hourly or unit rate used to calculate the cost of an activity or + resource allocation. + - name: title + fieldtype: Data + label: title + description: Name or label identifying the specific activity being costed. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Activity Cost document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabActivity Log + description: '' + fields: + - name: subject + fieldtype: Small Text + label: Subject + description: Brief summary of the activity or action performed, used for quick + scanning of audit trails. + - name: content + fieldtype: Text Editor + label: Message + description: Detailed description of the activity including changes made, used + for comprehensive audit review. + - name: communication_date + fieldtype: Datetime + label: Date + description: Date and time when the logged activity or communication occurred. + - name: ip_address + fieldtype: Data + label: IP Address + description: IP address from which the activity was performed, used for security + audits and access tracking. + - name: operation + fieldtype: Select + label: Operation + description: Type of operation performed such as create, update, delete, or login, + used for filtering specific actions. + options: + - Login + - Logout + - Impersonate + - name: status + fieldtype: Select + label: Status + description: Current status of the activity log entry, used for tracking completion + or resolution state. + options: + - Success + - Failed + - Linked + - Closed + - name: reference_doctype + fieldtype: Link + label: Reference Document Type + description: Identifies the type of primary document being tracked in the activity + log, used when filtering activities by document category. + join_hint: + table: tabDocType + 'on': reference_doctype = tabDocType.name + - name: reference_name + fieldtype: Dynamic Link + label: Reference Name + description: Specifies the unique identifier of the primary document being logged, + used when retrieving activity history for a specific record. + - name: timeline_doctype + fieldtype: Link + label: Timeline DocType + description: Defines the document type displayed in timeline views, used when + organizing chronological activity feeds by record type. + join_hint: + table: tabDocType + 'on': timeline_doctype = tabDocType.name + - name: timeline_name + fieldtype: Dynamic Link + label: Timeline Name + description: Contains the specific record identifier shown in timeline displays, + used when tracking activity sequences for individual documents. + - name: link_doctype + fieldtype: Link + label: Link DocType + description: Captures the type of related or linked document in the activity, + used when analyzing cross-document relationships and interactions. + join_hint: + table: tabDocType + 'on': link_doctype = tabDocType.name + - name: link_name + fieldtype: Dynamic Link + label: Link Name + description: Stores the identifier of the linked document, used when tracing connections + between related records in activity analysis. + - name: user + fieldtype: Link + label: User + description: Records which user performed the activity, used when auditing user + actions or analyzing individual productivity and engagement. + join_hint: + table: tabUser + 'on': user = tabUser.name + - name: full_name + fieldtype: Data + label: Full Name + description: Displays the complete name of the user who performed the activity, + used in reports requiring human-readable user identification. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Activity Log document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabActivity Type + description: '' + fields: + - name: activity_type + fieldtype: Data + label: Activity Type + description: Category or classification of the activity used when analyzing work + types, resource allocation, or project phases. + - name: costing_rate + fieldtype: Currency + label: Default Costing Rate + description: Standard rate applied to calculate costs for this activity type used + when determining project expenses or billing amounts. + - name: billing_rate + fieldtype: Currency + label: Default Billing Rate + description: Rate charged to customers for this activity type when billing for + time or services. + - name: disabled + fieldtype: Check + label: Disabled + description: Whether this activity type is currently inactive and unavailable + for selection in new transactions. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Activity Type document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabAddress + description: '' + fields: + - name: address_title + fieldtype: Data + label: Address Title + description: Display name or label for the address, used to quickly identify addresses + like 'Headquarters' or 'Warehouse'. + - name: address_type + fieldtype: Select + label: Address Type + description: Classification of address purpose such as Billing, Shipping, or Office, + used for filtering addresses by function. + options: + - Billing + - Shipping + - Office + - Personal + - Plant + - Postal + - Shop + - Subsidiary + - Warehouse + - Current + - Permanent + - Other + - name: address_line1 + fieldtype: Data + label: Address Line 1 + description: Primary street address information, used for shipping, billing, and + location-based queries. + - name: address_line2 + fieldtype: Data + label: Address Line 2 + description: Secondary address details like suite or apartment number, used to + complete full address information. + - name: custom_building_number + fieldtype: Data + label: Building Number + description: Building or premise number for the address, used in regions requiring + separate building identification. + - name: city + fieldtype: Data + label: City/Town + description: City or municipality of the address, used for geographic filtering, + shipping zones, and regional analysis. + - name: county + fieldtype: Data + label: County + description: Used to filter or group addresses by county for regional sales analysis + or logistics planning. + - name: state + fieldtype: Data + label: State/Province + description: Used to identify the state or province of an address for tax calculations, + compliance reporting, and regional segmentation. + - name: country + fieldtype: Link + label: Country + description: Used to determine international shipping requirements, tax jurisdictions, + and country-specific business rules. + join_hint: + table: tabCountry + 'on': country = tabCountry.name + - name: pincode + fieldtype: Data + label: Postal Code + description: Used to validate delivery zones, calculate shipping costs, and perform + geographic proximity analysis. + - name: email_id + fieldtype: Data + label: Email Address + description: Used to send transactional communications, invoices, and shipping + notifications to the address contact. + - name: phone + fieldtype: Data + label: Phone + description: Used to contact customers or vendors for order confirmations, delivery + coordination, and support inquiries. + - name: fax + fieldtype: Data + label: Fax + description: Used for legacy document transmission requirements with specific + customers or regulatory bodies. + - name: tax_category + fieldtype: Link + label: Tax Category + description: Used to apply correct tax rates and rules based on the address location + for invoicing and compliance. + join_hint: + table: tabTax Category + 'on': tax_category = tabTax Category.name + - name: is_primary_address + fieldtype: Check + label: Preferred Billing Address + description: Used to identify the default address for billing, communication, + and primary business correspondence. + - name: is_shipping_address + fieldtype: Check + label: Preferred Shipping Address + description: Used to determine valid delivery destinations when processing sales + orders and shipments. + - name: disabled + fieldtype: Check + label: Disabled + description: Used to exclude inactive or obsolete addresses from selection in + transactions and reports. + - name: is_your_company_address + fieldtype: Check + label: Is Your Company Address + description: Used to distinguish internal company locations from customer or vendor + addresses for reporting and operations. + - name: links + fieldtype: Table + label: Links + description: '' + child_hint: + child_table: tabDynamic Link + fieldname: links + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: links + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Address document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabAddress Template + description: '' + fields: + - name: country + fieldtype: Link + label: Country + description: Country for which this address format template applies + join_hint: + table: tabCountry + 'on': country = tabCountry.name + - name: is_default + fieldtype: Check + label: Is Default + description: Whether this is the default address template for the specified country + - name: template + fieldtype: Code + label: Template + description: Jinja template defining the address format and field arrangement + for display or printing + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Address Template document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabAdvance Payment Ledger Entry + description: '' + fields: + - name: company + fieldtype: Link + label: Company + description: Company entity to which this advance payment transaction belongs + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: voucher_type + fieldtype: Link + label: Voucher Type + description: Classification of the accounting voucher document associated with + this advance payment + join_hint: + table: tabDocType + 'on': voucher_type = tabDocType.name + - name: voucher_no + fieldtype: Dynamic Link + label: Voucher No + description: Identifier of the advance payment transaction being recorded in this + ledger entry. + - name: against_voucher_type + fieldtype: Link + label: Against Voucher Type + description: Type of document (e.g., Sales Invoice, Purchase Invoice) that this + advance payment is being applied against or allocated to. + join_hint: + table: tabDocType + 'on': against_voucher_type = tabDocType.name + - name: against_voucher_no + fieldtype: Dynamic Link + label: Against Voucher No + description: Specific document number that this advance payment is being applied + against or allocated to. + - name: amount + fieldtype: Currency + label: Amount + description: Monetary value of the advance payment transaction in the specified + currency. + - name: currency + fieldtype: Link + label: Currency + description: Currency code for the advance payment amount. + join_hint: + table: tabCurrency + 'on': currency = tabCurrency.name + - name: event + fieldtype: Data + label: Event + description: Business event or trigger that created or modified this advance payment + ledger entry. + - name: delinked + fieldtype: Check + label: DeLinked + description: Indicates whether this advance payment ledger entry has been disconnected + or unlinked from its original invoice or payment document. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Advance Payment Ledger Entry document (master/transaction). + Use only for single-entity lookups, not cross-record comparison unless fields + are per-relationship (e.g. supplier, price_list).' +- table: tabAdvance Tax + description: '' + fields: + - name: reference_type + fieldtype: Link + label: Reference Type + description: Specifies the document type (e.g., Sales Invoice, Purchase Invoice) + against which advance tax was paid or allocated. + join_hint: + table: tabDocType + 'on': reference_type = tabDocType.name + - name: reference_name + fieldtype: Dynamic Link + label: Reference Name + description: Links to the specific document number where this advance tax payment + was applied or originated. + - name: reference_detail + fieldtype: Data + label: Reference Detail + description: Identifies the specific tax payment voucher or transaction reference + for the advance tax entry + - name: account_head + fieldtype: Link + label: Account Head + description: Tax ledger account under which the advance tax payment is classified + join_hint: + table: tabAccount + 'on': account_head = tabAccount.name + - name: allocated_amount + fieldtype: Currency + label: Allocated Amount + description: Amount of advance tax that has been applied or adjusted against actual + tax liability + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabAdvance Tax). + Comparison-ready across parent records.' +- table: tabAdvance Taxes and Charges + description: '' + fields: + - name: add_deduct_tax + fieldtype: Select + label: Add Or Deduct + description: Whether this line adds tax to or deducts tax from the transaction + total + options: + - Add + - Deduct + - name: charge_type + fieldtype: Select + label: Type + description: Category or method of tax calculation such as actual amount, percentage + of net total, or on previous row total + options: + - Actual + - On Paid Amount + - On Previous Row Amount + - On Previous Row Total + - name: row_id + fieldtype: Data + label: 'Reference Row #' + description: Sequence number identifying the position of this tax or charge line + within the advance payment document. + - name: account_head + fieldtype: Link + label: Account Head + description: Ledger account to which this advance tax or charge amount is posted. + join_hint: + table: tabAccount + 'on': account_head = tabAccount.name + - name: description + fieldtype: Small Text + label: Description + description: Explanatory text describing the nature or purpose of this specific + advance tax or charge. + - name: included_in_paid_amount + fieldtype: Check + label: Considered In Paid Amount + description: Whether this advance tax or charge was already included in the amount + paid upfront by the customer or supplier. + - name: cost_center + fieldtype: Link + label: Cost Center + description: The cost center to which this advance tax or charge should be allocated + for financial tracking and reporting. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + - name: project + fieldtype: Link + label: Project + description: The project to which this advance tax or charge should be attributed + for project-based accounting and cost tracking. + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: rate + fieldtype: Float + label: Tax Rate + description: Percentage or rate applied to calculate the advance tax or charge + amount + - name: currency + fieldtype: Link + label: Account Currency + description: Currency in which the advance tax or charge amount is denominated + join_hint: + table: tabCurrency + 'on': currency = tabCurrency.name + - name: tax_amount + fieldtype: Currency + label: Amount + description: Calculated monetary value of the advance tax or charge after applying + the rate + - name: total + fieldtype: Currency + label: Total + description: Total amount including tax for this advance tax line item. + - name: allocated_amount + fieldtype: Currency + label: Allocated Amount + description: Portion of the advance tax amount that has been allocated or applied + to invoices or transactions. + - name: base_tax_amount + fieldtype: Currency + label: Amount (Company Currency) + description: Tax amount converted to the company's base currency before any allocations. + - name: base_total + fieldtype: Currency + label: Total (Company Currency) + description: Total amount of advance taxes and charges in base currency before + any adjustments or conversions + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabAdvance Taxes + and Charges). Comparison-ready across parent records.' +- table: tabAllowed Dimension + description: '' + fields: + - name: accounting_dimension + fieldtype: Link + label: Accounting Dimension + description: The dimension type being restricted, such as cost center, department, + project, or branch + join_hint: + table: tabDocType + 'on': accounting_dimension = tabDocType.name + - name: dimension_value + fieldtype: Dynamic Link + label: dimension_value + description: The specific value within the dimension that is allowed, such as + a particular cost center code or department name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabAllowed Dimension). + Comparison-ready across parent records.' +- table: tabAllowed To Transact With + description: '' + fields: + - name: company + fieldtype: Link + label: Company + description: Company that has authorization or permission to transact with the + specified party + join_hint: + table: tabCompany + 'on': company = tabCompany.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabAllowed To Transact + With). Comparison-ready across parent records.' +- table: tabAmended Document Naming Settings + description: '' + fields: + - name: document_type + fieldtype: Link + label: DocType + description: Specific DocType for which this amended document naming rule applies. + join_hint: + table: tabDocType + 'on': document_type = tabDocType.name + - name: action + fieldtype: Select + label: Action + description: Naming action or pattern to apply when the specified document type + is amended. + options: + - Amend Counter + - Default Naming + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabAmended Document + Naming Settings). Comparison-ready across parent records.' +- table: tabApplicable On Account + description: '' + fields: + - name: applicable_on_account + fieldtype: Link + label: Accounts + description: Specifies the account type, category, or GL account where this rule + or setting applies for transaction processing or validation. + join_hint: + table: tabAccount + 'on': applicable_on_account = tabAccount.name + - name: is_mandatory + fieldtype: Check + label: Is Mandatory + description: Indicates whether the account applicability is required or optional + when processing transactions or applying business rules. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabApplicable On + Account). Comparison-ready across parent records.' +- table: tabAppointment + description: '' + fields: + - name: scheduled_time + fieldtype: Datetime + label: Scheduled Time + description: Date and time when the appointment is planned to occur + - name: status + fieldtype: Select + label: Status + description: Current state of the appointment such as scheduled, confirmed, completed, + or cancelled + options: + - Open + - Unverified + - Closed + - name: customer_name + fieldtype: Data + label: Name + description: Full name of the customer who scheduled or is associated with the + appointment. + - name: customer_phone_number + fieldtype: Data + label: Phone Number + description: Phone number to contact the customer about the appointment. + - name: customer_skype + fieldtype: Data + label: Skype ID + description: Skype username or ID for reaching the customer via Skype for the + appointment. + - name: customer_email + fieldtype: Data + label: Email + description: Email address of the customer for whom the appointment is scheduled. + - name: customer_details + fieldtype: Long Text + label: Details + description: Additional information about the customer such as phone number, address, + or special notes. + - name: appointment_with + fieldtype: Link + label: Appointment With + description: Name or identifier of the staff member, service provider, or resource + assigned to conduct the appointment. + join_hint: + table: tabDocType + 'on': appointment_with = tabDocType.name + - name: party + fieldtype: Dynamic Link + label: Party + description: The customer, patient, or contact person associated with this appointment + - name: calendar_event + fieldtype: Link + label: Calendar Event + description: Links this appointment to a calendar entry for scheduling and time + management + join_hint: + table: tabEvent + 'on': calendar_event = tabEvent.name + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Appointment document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabAppointment Booking Slots + description: '' + fields: + - name: day_of_week + fieldtype: Select + label: Day Of Week + description: Day when the appointment slot is available, used to filter bookings + by weekday or analyze appointment patterns across the week. + options: + - Sunday + - Monday + - Tuesday + - Wednesday + - Thursday + - Friday + - Saturday + - name: from_time + fieldtype: Time + label: 'From Time ' + description: Start time of the appointment slot, used to find available slots + within specific time ranges or analyze booking distribution throughout the day. + - name: to_time + fieldtype: Time + label: To Time + description: End time of the appointment booking slot, used when searching for + availability windows or filtering slots by when they finish. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabAppointment Booking + Slots). Comparison-ready across parent records.' +- table: tabAsset + description: '' + fields: + - name: company + fieldtype: Link + label: Company + description: The company entity that owns or is associated with the asset + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: item_code + fieldtype: Link + label: Item Code + description: The product or item catalog code linked to the asset for tracking + the underlying item type + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: asset_owner + fieldtype: Select + label: Asset Owner + description: Individual person responsible for or assigned to the asset, used + when identifying who holds or manages specific assets. + options: + - Company + - Supplier + - Customer + - name: asset_owner_company + fieldtype: Link + label: Asset Owner Company + description: Company or organizational entity that owns the asset, used when filtering + assets by corporate ownership or legal entity. + join_hint: + table: tabCompany + 'on': asset_owner_company = tabCompany.name + - name: is_existing_asset + fieldtype: Check + label: Is Existing Asset + description: Indicates whether the asset was already owned before system implementation + or acquired previously, distinguishing legacy assets from newly purchased ones. + - name: is_composite_asset + fieldtype: Check + label: Is Composite Asset + description: Indicates whether the asset is made up of multiple sub-assets or + components that can be tracked separately. + - name: supplier + fieldtype: Link + label: Supplier + description: The vendor or company from whom the asset was purchased or acquired. + join_hint: + table: tabSupplier + 'on': supplier = tabSupplier.name + - name: customer + fieldtype: Link + label: Customer + description: The customer who owns or is associated with this asset, used when + tracking customer-owned equipment or assets under customer contracts. + join_hint: + table: tabCustomer + 'on': customer = tabCustomer.name + - name: journal_entry_for_scrap + fieldtype: Link + label: Journal Entry for Scrap + description: The accounting journal entry created when this asset is scrapped + or disposed of, used to track the financial transaction of asset disposal. + join_hint: + table: tabJournal Entry + 'on': journal_entry_for_scrap = tabJournal Entry.name + - name: naming_series + fieldtype: Select + label: Naming Series + description: The prefix pattern used to generate the asset's identifier code, + used when searching for assets by their numbering scheme or series. + options: + - ACC-ASS-.YYYY.- + - name: asset_name + fieldtype: Data + label: Asset Name + description: The identifying name or label of the asset used when searching for + or referring to a specific asset. + - name: asset_category + fieldtype: Link + label: Asset Category + description: The classification or type of asset used to filter or group assets + by their functional category such as equipment, vehicles, or furniture. + join_hint: + table: tabAsset Category + 'on': asset_category = tabAsset Category.name + - name: location + fieldtype: Link + label: Location + description: The physical location or site where the asset is currently situated + or assigned. + join_hint: + table: tabLocation + 'on': location = tabLocation.name + - name: split_from + fieldtype: Link + label: Split From + description: Original asset identifier when this asset was created by splitting + or dividing a parent asset into multiple child assets + join_hint: + table: tabAsset + 'on': split_from = tabAsset.name + - name: custodian + fieldtype: Link + label: Custodian + description: Person or employee responsible for the physical possession and day-to-day + care of the asset + join_hint: + table: tabEmployee + 'on': custodian = tabEmployee.name + - name: department + fieldtype: Link + label: Department + description: Organizational department or business unit that owns, uses, or is + charged for the asset + join_hint: + table: tabDepartment + 'on': department = tabDepartment.name + - name: disposal_date + fieldtype: Date + label: Disposal Date + description: Date when the asset was sold, scrapped, or otherwise removed from + service. + - name: cost_center + fieldtype: Link + label: Cost Center + description: Department or business unit responsible for the asset's expenses + and depreciation. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + - name: purchase_receipt + fieldtype: Link + label: Purchase Receipt + description: Reference to the receiving document that recorded the asset's initial + acquisition into inventory. + join_hint: + table: tabPurchase Receipt + 'on': purchase_receipt = tabPurchase Receipt.name + - name: purchase_receipt_item + fieldtype: Data + label: Purchase Receipt Item + description: Links asset to the specific line item on the goods receipt document + when the asset was physically received into inventory. + - name: purchase_invoice + fieldtype: Link + label: Purchase Invoice + description: Links asset to the supplier invoice document used for the purchase + transaction and accounting entry. + join_hint: + table: tabPurchase Invoice + 'on': purchase_invoice = tabPurchase Invoice.name + - name: purchase_invoice_item + fieldtype: Data + label: Purchase Invoice Item + description: Links asset to the specific line item on the supplier invoice that + corresponds to this asset's purchase details and pricing. + - name: purchase_date + fieldtype: Date + label: Purchase Date + description: Date when the asset was purchased or acquired by the organization. + - name: available_for_use_date + fieldtype: Date + label: Available-for-use Date + description: Date when the asset was ready and placed into service or operational + use, which may differ from purchase date and typically triggers depreciation. + - name: gross_purchase_amount + fieldtype: Currency + label: Net Purchase Amount + description: Total purchase price of the asset before any depreciation, discounts, + or adjustments. + - name: asset_quantity + fieldtype: Int + label: Asset Quantity + description: Number of units of this asset, relevant when asking about asset counts + or quantities owned. + - name: additional_asset_cost + fieldtype: Currency + label: Additional Asset Cost + description: Extra costs beyond the base asset price such as installation, shipping, + or setup fees. + - name: total_asset_cost + fieldtype: Currency + label: Total Asset Cost + description: Complete cost of the asset including base price and all additional + costs, used for total valuation queries. + - name: calculate_depreciation + fieldtype: Check + label: Calculate Depreciation + description: Whether depreciation is automatically calculated for this asset, + relevant when users ask which assets are or aren't being depreciated. + - name: opening_accumulated_depreciation + fieldtype: Currency + label: Opening Accumulated Depreciation + description: Total depreciation already recorded before the asset entered the + current system, used when users ask about historical depreciation or asset book + value at migration. + - name: opening_number_of_booked_depreciations + fieldtype: Int + label: Opening Number of Booked Depreciations + description: Count of depreciation periods already recorded before the asset entered + the current system, relevant when users ask about depreciation history or remaining + useful life calculations. + - name: is_fully_depreciated + fieldtype: Check + label: Is Fully Depreciated + description: Whether the asset has reached its full depreciation value and no + further depreciation will be calculated. + - name: finance_books + fieldtype: Table + label: Finance Books + description: '' + child_hint: + child_table: tabAsset Finance Book + fieldname: finance_books + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: finance_books + - name: depreciation_method + fieldtype: Select + label: Depreciation Method + description: The calculation method used to depreciate the asset such as straight-line, + declining balance, or written down value. + options: + - Straight Line + - Double Declining Balance + - Manual + - name: value_after_depreciation + fieldtype: Currency + label: Value After Depreciation + description: Current net book value of the asset after applying accumulated depreciation + charges. + - name: total_number_of_depreciations + fieldtype: Int + label: Total Number of Depreciations + description: Count of depreciation periods or transactions that have been processed + for the asset. + - name: frequency_of_depreciation + fieldtype: Int + label: Frequency of Depreciation (Months) + description: How often depreciation is calculated and recorded for the asset, + such as monthly, quarterly, or annually. + - name: next_depreciation_date + fieldtype: Date + label: Next Depreciation Date + description: Date when the asset's next depreciation calculation is scheduled + to occur, used when querying upcoming depreciation events or schedules. + - name: policy_number + fieldtype: Data + label: Policy number + description: Insurance policy identifier for the asset, used when searching for + assets by their insurance coverage or policy details. + - name: insurer + fieldtype: Data + label: Insurer + description: Name of the insurance company providing coverage for the asset, used + when filtering or grouping assets by insurance provider. + - name: insured_value + fieldtype: Data + label: Insured value + description: The monetary amount for which the asset is insured against loss or + damage. + - name: insurance_start_date + fieldtype: Date + label: Insurance Start Date + description: The date when insurance coverage for the asset begins. + - name: insurance_end_date + fieldtype: Date + label: Insurance End Date + description: The date when insurance coverage for the asset expires or terminates. + - name: comprehensive_insurance + fieldtype: Data + label: Comprehensive Insurance + description: Whether the asset is covered by comprehensive insurance for damage, + theft, or loss. + - name: maintenance_required + fieldtype: Check + label: Maintenance Required + description: Whether the asset requires scheduled or ongoing maintenance activities. + - name: status + fieldtype: Select + label: Status + description: Current operational or lifecycle status of the asset such as active, + disposed, under maintenance, or retired. + options: + - Draft + - Submitted + - Partially Depreciated + - Fully Depreciated + - Sold + - Scrapped + - In Maintenance + - Out of Order + - Issue + - Receipt + - Capitalized + - Work In Progress + - name: booked_fixed_asset + fieldtype: Check + label: Booked Fixed Asset + description: Whether the asset has been formally recorded in fixed asset accounting + records for depreciation and financial reporting. + - name: purchase_amount + fieldtype: Currency + label: Purchase Amount + description: Original acquisition cost or purchase price paid for the asset. + - name: default_finance_book + fieldtype: Link + label: Default Finance Book + description: Primary finance book used for tracking this asset's depreciation + and accounting entries when multiple books exist. + join_hint: + table: tabFinance Book + 'on': default_finance_book = tabFinance Book.name + - name: depr_entry_posting_status + fieldtype: Select + label: Depreciation Entry Posting Status + description: Status indicating whether depreciation journal entries for this asset + have been posted to the general ledger. + options: + - Successful + - Failed + - name: amended_from + fieldtype: Link + label: Amended From + description: Reference to the previous asset document that this asset record was + amended or corrected from. + join_hint: + table: tabAsset + 'on': amended_from = tabAsset.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Asset document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabAsset Activity + description: '' + fields: + - name: asset + fieldtype: Link + label: Asset + description: Reference to the asset on which the activity was performed, used + when filtering or analyzing activities for specific equipment or property. + join_hint: + table: tabAsset + 'on': asset = tabAsset.name + - name: date + fieldtype: Datetime + label: Date + description: Timestamp when the asset activity occurred, used when analyzing activity + history, scheduling patterns, or finding recent maintenance events. + - name: user + fieldtype: Link + label: User + description: Person who performed or logged the activity on the asset + join_hint: + table: tabUser + 'on': user = tabUser.name + - name: subject + fieldtype: Small Text + label: Subject + description: Brief title or summary describing what the asset activity was about + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Asset Activity document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabAsset Capitalization + description: '' + fields: + - name: title + fieldtype: Data + label: Title + description: Human-readable label or subject describing the asset capitalization + entry + - name: naming_series + fieldtype: Select + label: Series + description: Prefix pattern used to auto-generate the asset capitalization name + options: + - ACC-ASC-.YYYY.- + - name: capitalization_method + fieldtype: Select + label: Capitalization Method + description: Method used to capitalize the asset, such as manual entry, automatic + from purchase order, or batch capitalization. + options: + - Create a new composite asset + - Choose a WIP composite asset + - name: target_item_code + fieldtype: Link + label: Target Item Code + description: Code identifying the specific item or asset being capitalized. + join_hint: + table: tabItem + 'on': target_item_code = tabItem.name + - name: target_item_name + fieldtype: Data + label: Target Item Name + description: Name or description of the specific item or asset being capitalized. + - name: target_asset + fieldtype: Link + label: Target Asset + description: Asset identifier being capitalized or created from the capitalization + transaction. + join_hint: + table: tabAsset + 'on': target_asset = tabAsset.name + - name: target_asset_name + fieldtype: Data + label: Asset Name + description: Name of the asset being capitalized or created from the capitalization + transaction. + - name: target_qty + fieldtype: Float + label: Target Qty + description: Quantity of the asset being capitalized or created in the transaction. + - name: target_asset_location + fieldtype: Link + label: Target Asset Location + description: Location where the capitalized asset will be physically placed or + assigned after capitalization. + join_hint: + table: tabLocation + 'on': target_asset_location = tabLocation.name + - name: company + fieldtype: Link + label: Company + description: Company entity that owns or is capitalizing the asset. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: posting_date + fieldtype: Date + label: Posting Date + description: Date when the asset capitalization transaction is recorded in the + financial ledger. + - name: posting_time + fieldtype: Time + label: Posting Time + description: Time when the asset capitalization transaction was posted, used when + querying capitalizations by specific time of day. + - name: set_posting_time + fieldtype: Check + label: Edit Posting Date and Time + description: Indicates whether the posting time was manually specified rather + than automatically assigned at submission. + - name: finance_book + fieldtype: Link + label: Finance Book + description: Specific finance book or accounting ledger where this asset capitalization + is recorded, used for multi-book accounting scenarios. + join_hint: + table: tabFinance Book + 'on': finance_book = tabFinance Book.name + - name: target_batch_no + fieldtype: Link + label: Target Batch No + description: Batch number assigned to the capitalized asset after conversion from + consumable or inventory. + join_hint: + table: tabBatch + 'on': target_batch_no = tabBatch.name + - name: target_serial_no + fieldtype: Small Text + label: Target Serial No + description: Serial number assigned to the capitalized asset after conversion + from consumable or inventory. + - name: amended_from + fieldtype: Link + label: Amended From + description: Reference to the previous asset capitalization document that this + record amends or replaces. + join_hint: + table: tabAsset Capitalization + 'on': amended_from = tabAsset Capitalization.name + - name: target_is_fixed_asset + fieldtype: Check + label: Target Is Fixed Asset + description: Whether the capitalized asset is classified as a fixed asset for + accounting and depreciation purposes. + - name: target_has_batch_no + fieldtype: Check + label: Target Has Batch No + description: Whether the capitalized asset requires batch number tracking for + inventory management and traceability. + - name: target_has_serial_no + fieldtype: Check + label: Target Has Serial No + description: Whether the capitalized asset requires serial number tracking for + individual item identification and warranty management. + - name: stock_items + fieldtype: Table + label: Stock Items + description: '' + child_hint: + child_table: tabAsset Capitalization Stock Item + fieldname: stock_items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: stock_items + - name: stock_items_total + fieldtype: Currency + label: Consumed Stock Total Value + description: Total monetary value or count of all stock items included in this + asset capitalization transaction. + - name: asset_items + fieldtype: Table + label: Assets + description: '' + child_hint: + child_table: tabAsset Capitalization Asset Item + fieldname: asset_items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: asset_items + - name: asset_items_total + fieldtype: Currency + label: Consumed Asset Total Value + description: Total value or count of asset line items being capitalized in this + transaction. + - name: service_items + fieldtype: Table + label: Services + description: '' + child_hint: + child_table: tabAsset Capitalization Service Item + fieldname: service_items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: service_items + - name: service_items_total + fieldtype: Currency + label: Service Expense Total Amount + description: Total value of service line items being capitalized, distinct from + physical asset items. + - name: total_value + fieldtype: Currency + label: Total Value + description: Total capitalized value of the asset for questions about asset worth, + book value, or capitalization amounts. + - name: target_incoming_rate + fieldtype: Currency + label: Target Incoming Rate + description: Expected or planned rate at which asset value will be added or capitalized, + used when asking about future capitalization schedules or planned asset value + increases. + - name: cost_center + fieldtype: Link + label: Cost Center + description: Cost center assigned to the capitalized asset for questions about + departmental allocation, expense tracking by business unit, or organizational + responsibility. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + - name: project + fieldtype: Link + label: Project + description: Project from which costs are being capitalized into a fixed asset. + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: target_fixed_asset_account + fieldtype: Link + label: Target Fixed Asset Account + description: Fixed asset account where the capitalized project costs will be recorded. + join_hint: + table: tabAccount + 'on': target_fixed_asset_account = tabAccount.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Asset Capitalization document (master/transaction). Use + only for single-entity lookups, not cross-record comparison unless fields are + per-relationship (e.g. supplier, price_list).' +- table: tabAsset Capitalization Asset Item + description: '' + fields: + - name: asset + fieldtype: Link + label: Asset + description: Links to the parent asset being capitalized, used when analyzing + capitalization details for a specific fixed asset or rolling up costs to the + asset level. + join_hint: + table: tabAsset + 'on': asset = tabAsset.name + - name: asset_name + fieldtype: Data + label: Asset Name + description: Display name of the asset being capitalized, used when searching + or filtering capitalization records by asset description without joining to + the asset table. + - name: finance_book + fieldtype: Link + label: Finance Book + description: Identifies which financial book or accounting entity this asset capitalization + belongs to for multi-book accounting scenarios. + join_hint: + table: tabFinance Book + 'on': finance_book = tabFinance Book.name + - name: item_code + fieldtype: Link + label: Item Code + description: Unique identifier code for the capitalized asset item being tracked. + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: item_name + fieldtype: Data + label: Item Name + description: Descriptive name of the capitalized asset item for human-readable + identification. + - name: current_asset_value + fieldtype: Currency + label: Current Asset Value + description: The present-day value of the capitalized asset after accounting for + depreciation or adjustments since acquisition. + - name: asset_value + fieldtype: Currency + label: Asset Value + description: The original or initial value of the asset at the time of capitalization + or purchase. + - name: cost_center + fieldtype: Link + label: Cost Center + description: The organizational unit or department to which this capitalized asset's + costs and expenses are allocated. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + - name: project + fieldtype: Link + label: Project + description: Project associated with the capitalized asset for tracking capital + expenditures and asset allocation by project. + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: fixed_asset_account + fieldtype: Link + label: Fixed Asset Account + description: General ledger account where the capitalized asset value is recorded + for balance sheet reporting. + join_hint: + table: tabAccount + 'on': fixed_asset_account = tabAccount.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabAsset Capitalization + Asset Item). Comparison-ready across parent records.' +- table: tabAsset Capitalization Service Item + description: '' + fields: + - name: item_code + fieldtype: Link + label: Item Code + description: Code or SKU of the service item being capitalized as an asset + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: item_name + fieldtype: Data + label: Item Name + description: Descriptive name of the service item being capitalized as an asset + - name: expense_account + fieldtype: Link + label: Expense Account + description: Account charged for service expenses related to asset capitalization + activities. + join_hint: + table: tabAccount + 'on': expense_account = tabAccount.name + - name: qty + fieldtype: Float + label: Qty + description: Quantity of the service item applied to the asset capitalization. + - name: uom + fieldtype: Link + label: UOM + description: Unit of measurement for the service item quantity in asset capitalization. + join_hint: + table: tabUOM + 'on': uom = tabUOM.name + - name: rate + fieldtype: Currency + label: Rate + description: Unit price or hourly rate applied to the service item for calculating + capitalization costs. + - name: amount + fieldtype: Currency + label: Amount + description: Total monetary value of the service item being capitalized into the + asset. + - name: cost_center + fieldtype: Link + label: Cost Center + description: Organizational unit or department to which the service item's capitalization + expense is allocated. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabAsset Capitalization + Service Item). Comparison-ready across parent records.' +- table: tabAsset Capitalization Stock Item + description: '' + fields: + - name: item_code + fieldtype: Link + label: Item Code + description: Stock item code being capitalized as a fixed asset + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: item_name + fieldtype: Data + label: Item Name + description: Name of the stock item being capitalized as a fixed asset + - name: warehouse + fieldtype: Link + label: Warehouse + description: Location where the capitalized asset stock item is stored or received. + join_hint: + table: tabWarehouse + 'on': warehouse = tabWarehouse.name + - name: purchase_receipt_item + fieldtype: Data + label: Purchase Receipt Item + description: Links to the specific purchase receipt line item that brought this + asset stock into inventory. + - name: stock_qty + fieldtype: Float + label: Quantity + description: Quantity of the asset item in stock units available for capitalization. + - name: actual_qty + fieldtype: Float + label: Actual Qty in Warehouse + description: Quantity of stock item physically available or consumed during asset + capitalization + - name: valuation_rate + fieldtype: Currency + label: Valuation Rate + description: Per-unit cost or rate used to value the stock item for capitalization + purposes + - name: amount + fieldtype: Currency + label: Amount + description: Total monetary value of the stock item being capitalized, typically + quantity multiplied by valuation rate + - name: stock_uom + fieldtype: Link + label: Stock UOM + description: Unit of measurement for the capitalized asset stock item quantity. + join_hint: + table: tabUOM + 'on': stock_uom = tabUOM.name + - name: serial_and_batch_bundle + fieldtype: Link + label: Serial and Batch Bundle + description: Reference to bundled serial numbers or batch identifiers for tracking + individual asset items. + join_hint: + table: tabSerial and Batch Bundle + 'on': serial_and_batch_bundle = tabSerial and Batch Bundle.name + - name: use_serial_batch_fields + fieldtype: Check + label: Use Serial No / Batch Fields + description: Indicates whether this asset capitalization uses serial number or + batch tracking for inventory control. + - name: serial_no + fieldtype: Text + label: Serial No + description: Unique identifier for individually tracked items in asset capitalization, + used when querying specific serialized equipment or assets. + - name: batch_no + fieldtype: Link + label: Batch No + description: Batch identifier for grouped items in asset capitalization, used + when querying assets purchased or capitalized together as a lot. + join_hint: + table: tabBatch + 'on': batch_no = tabBatch.name + - name: cost_center + fieldtype: Link + label: Cost Center + description: Department or business unit to which the capitalized asset stock + item is allocated for expense tracking and budgeting purposes. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabAsset Capitalization + Stock Item). Comparison-ready across parent records.' +- table: tabAsset Category + description: '' + fields: + - name: asset_category_name + fieldtype: Data + label: Asset Category Name + description: Full descriptive name of the asset category used for classification + and reporting + - name: enable_cwip_accounting + fieldtype: Check + label: Enable Capital Work in Progress Accounting + description: Indicates whether Capital Work in Progress accounting is activated + for assets in this category + - name: non_depreciable_category + fieldtype: Check + label: Non Depreciable Category + description: Indicates whether assets in this category are excluded from depreciation + calculations. + - name: finance_books + fieldtype: Table + label: Finance Books + description: '' + child_hint: + child_table: tabAsset Finance Book + fieldname: finance_books + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: finance_books + - name: accounts + fieldtype: Table + label: Accounts + description: '' + child_hint: + child_table: tabAsset Category Account + fieldname: accounts + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: accounts + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Asset Category document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabAsset Category Account + description: '' + fields: + - name: company_name + fieldtype: Link + label: Company + description: Company to which this asset category account configuration belongs + join_hint: + table: tabCompany + 'on': company_name = tabCompany.name + - name: fixed_asset_account + fieldtype: Link + label: Fixed Asset Account + description: General ledger account where the capitalized value of assets in this + category is recorded + join_hint: + table: tabAccount + 'on': fixed_asset_account = tabAccount.name + - name: accumulated_depreciation_account + fieldtype: Link + label: Accumulated Depreciation Account + description: Account where cumulative depreciation for assets in this category + is recorded over their lifetime. + join_hint: + table: tabAccount + 'on': accumulated_depreciation_account = tabAccount.name + - name: depreciation_expense_account + fieldtype: Link + label: Depreciation Expense Account + description: Account where periodic depreciation expense is charged for assets + in this category during each accounting period. + join_hint: + table: tabAccount + 'on': depreciation_expense_account = tabAccount.name + - name: capital_work_in_progress_account + fieldtype: Link + label: Capital Work In Progress Account + description: Account for tracking costs of assets in this category that are under + construction or development and not yet ready for use. + join_hint: + table: tabAccount + 'on': capital_work_in_progress_account = tabAccount.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabAsset Category + Account). Comparison-ready across parent records.' +- table: tabAsset Depreciation Schedule + description: '' + fields: + - name: asset + fieldtype: Link + label: Asset + description: The asset being depreciated in this schedule + join_hint: + table: tabAsset + 'on': asset = tabAsset.name + - name: naming_series + fieldtype: Select + label: Naming Series + description: Prefix pattern used to generate the depreciation schedule name + options: + - ACC-ADS-.YYYY.- + - name: company + fieldtype: Link + label: Company + description: Company entity that owns the asset being depreciated + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: gross_purchase_amount + fieldtype: Currency + label: Gross Purchase Amount + description: Original purchase price of the asset before any depreciation + - name: opening_accumulated_depreciation + fieldtype: Currency + label: Opening Accumulated Depreciation + description: Total depreciation accumulated on the asset at the beginning of the + period + - name: opening_number_of_booked_depreciations + fieldtype: Int + label: Opening Number of Booked Depreciations + description: Number of depreciation entries already recorded before the current + schedule period, used when querying historical depreciation counts or calculating + remaining depreciations. + - name: finance_book + fieldtype: Link + label: Finance Book + description: Name of the finance book (e.g., Tax Book, GAAP Book) that this depreciation + schedule applies to, used when filtering or comparing depreciation across different + accounting standards. + join_hint: + table: tabFinance Book + 'on': finance_book = tabFinance Book.name + - name: finance_book_id + fieldtype: Int + label: Finance Book Id + description: Numeric identifier for the finance book, used for joining to finance + book records or filtering by specific book ID. + - name: depreciation_method + fieldtype: Select + label: Depreciation Method + description: Method used to calculate asset depreciation such as straight-line, + declining balance, or units of production. + options: + - Straight Line + - Double Declining Balance + - Written Down Value + - Manual + - name: total_number_of_depreciations + fieldtype: Int + label: Total Number of Depreciations + description: Total count of depreciation periods or installments planned for the + asset over its useful life. + - name: rate_of_depreciation + fieldtype: Percent + label: Rate of Depreciation + description: Percentage or rate applied to calculate periodic depreciation expense + for the asset. + - name: daily_prorata_based + fieldtype: Check + label: Depreciate based on daily pro-rata + description: Indicates whether depreciation is calculated proportionally based + on the number of days the asset was in use during the period. + - name: shift_based + fieldtype: Check + label: Depreciate based on shifts + description: Indicates whether depreciation is calculated based on the number + of shifts or operational hours the asset was used rather than time elapsed. + - name: frequency_of_depreciation + fieldtype: Int + label: Frequency of Depreciation (Months) + description: Defines how often depreciation is calculated and recorded, such as + monthly, quarterly, or annually. + - name: expected_value_after_useful_life + fieldtype: Currency + label: Expected Value After Useful Life + description: Residual or salvage value of the asset after full depreciation, used + when calculating total depreciable amount or end-of-life asset worth. + - name: depreciation_schedule + fieldtype: Table + label: Depreciation Schedule + description: '' + child_hint: + child_table: tabDepreciation Schedule + fieldname: depreciation_schedule + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: depreciation_schedule + - name: notes + fieldtype: Small Text + label: Notes + description: Additional comments or explanations about the depreciation schedule, + used when searching for context about depreciation methods, assumptions, or + special conditions. + - name: status + fieldtype: Select + label: Status + description: Current state of the depreciation schedule such as draft, submitted, + or cancelled. + options: + - Draft + - Active + - Cancelled + - name: amended_from + fieldtype: Link + label: Amended From + description: Links to the previous version of this depreciation schedule if it + was amended or corrected. + join_hint: + table: tabAsset Depreciation Schedule + 'on': amended_from = tabAsset Depreciation Schedule.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Asset Depreciation Schedule document (master/transaction). + Use only for single-entity lookups, not cross-record comparison unless fields + are per-relationship (e.g. supplier, price_list).' +- table: tabAsset Finance Book + description: '' + fields: + - name: finance_book + fieldtype: Link + label: Finance Book + description: Links to the finance book entity to track depreciation separately + for different accounting standards or legal entities. + join_hint: + table: tabFinance Book + 'on': finance_book = tabFinance Book.name + - name: depreciation_method + fieldtype: Select + label: Depreciation Method + description: Defines the calculation method for asset depreciation (straight-line, + declining balance, etc.) used when analyzing depreciation expense patterns. + options: + - Straight Line + - Double Declining Balance + - Written Down Value + - Manual + - name: total_number_of_depreciations + fieldtype: Int + label: Total Number of Depreciations + description: Total planned depreciation entries for the asset over its useful + life in this finance book. + - name: total_number_of_booked_depreciations + fieldtype: Int + label: 'Total Number of Booked Depreciations ' + description: Count of depreciation entries already posted or recorded for the + asset in this finance book. + - name: daily_prorata_based + fieldtype: Check + label: Depreciate based on daily pro-rata + description: Whether depreciation is calculated on a daily prorated basis rather + than monthly or annual periods. + - name: shift_based + fieldtype: Check + label: Depreciate based on shifts + description: Whether depreciation is calculated based on asset usage shifts rather + than time periods. + - name: frequency_of_depreciation + fieldtype: Int + label: Frequency of Depreciation (Months) + description: How often depreciation is calculated and posted (monthly, quarterly, + yearly). + - name: depreciation_start_date + fieldtype: Date + label: Depreciation Posting Date + description: The date from which depreciation calculation begins for the asset + in this finance book. + - name: salvage_value_percentage + fieldtype: Percent + label: Salvage Value Percentage + description: Percentage of original asset value expected to remain at end of useful + life, used when calculating depreciation based on a percentage rather than absolute + amount. + - name: expected_value_after_useful_life + fieldtype: Currency + label: Expected Value After Useful Life + description: Estimated residual value of the asset when it reaches the end of + its planned useful life before any actual depreciation calculations. + - name: value_after_depreciation + fieldtype: Currency + label: Value After Depreciation + description: Current net book value of the asset after applying accumulated depreciation + to date. + - name: rate_of_depreciation + fieldtype: Percent + label: Rate of Depreciation (%) + description: Percentage rate applied annually or per period to calculate depreciation + expense for the asset in this finance book. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabAsset Finance + Book). Comparison-ready across parent records.' +- table: tabAsset Maintenance + description: '' + fields: + - name: asset_name + fieldtype: Link + label: Asset Name + description: The specific asset or equipment that is being maintained or serviced + join_hint: + table: tabAsset + 'on': asset_name = tabAsset.name + - name: company + fieldtype: Link + label: Company + description: Company that owns or is responsible for the asset being maintained + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: maintenance_team + fieldtype: Link + label: Maintenance Team + description: Team or group assigned to perform maintenance work on the asset. + join_hint: + table: tabAsset Maintenance Team + 'on': maintenance_team = tabAsset Maintenance Team.name + - name: maintenance_manager + fieldtype: Data + label: Maintenance Manager + description: Manager responsible for overseeing maintenance activities for the + asset. + - name: asset_maintenance_tasks + fieldtype: Table + label: Maintenance Tasks + description: '' + child_hint: + child_table: tabAsset Maintenance Task + fieldname: asset_maintenance_tasks + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: asset_maintenance_tasks + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Asset Maintenance document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabAsset Maintenance Log + description: '' + fields: + - name: asset_maintenance + fieldtype: Link + label: Asset Maintenance + description: Links to the parent asset maintenance schedule to track which equipment + or asset this maintenance activity belongs to. + join_hint: + table: tabAsset Maintenance + 'on': asset_maintenance = tabAsset Maintenance.name + - name: naming_series + fieldtype: Select + label: Series + description: Defines the auto-numbering pattern used to generate unique identifiers + for maintenance log entries. + options: + - ACC-AML-.YYYY.- + - name: task + fieldtype: Link + label: Task + description: Unique identifier for a specific maintenance activity or work order + performed on an asset. + join_hint: + table: tabAsset Maintenance Task + 'on': task = tabAsset Maintenance Task.name + - name: task_name + fieldtype: Data + label: Task Name + description: Descriptive label of the maintenance work performed, used when searching + by activity description rather than ID. + - name: periodicity + fieldtype: Data + label: Periodicity + description: Frequency or schedule interval for recurring maintenance activities + such as daily, weekly, monthly, quarterly, or annual. + - name: has_certificate + fieldtype: Check + label: 'Has Certificate ' + description: Indicates whether a maintenance activity resulted in or requires + a certification document or compliance certificate. + - name: maintenance_status + fieldtype: Select + label: Maintenance Status + description: Current state of the maintenance task such as scheduled, in progress, + completed, overdue, or cancelled. + options: + - Planned + - Completed + - Cancelled + - Overdue + - name: task_assignee_email + fieldtype: Data + label: Task Assignee Email + description: Email address of the person assigned to the maintenance task for + contact or notification purposes. + - name: due_date + fieldtype: Date + label: Due Date + description: Target completion date for the maintenance task or when the work + must be finished. + - name: completion_date + fieldtype: Date + label: Completion Date + description: Date when the asset maintenance work was finished or closed out. + - name: actions_performed + fieldtype: Text Editor + label: Actions performed + description: Detailed record of specific maintenance tasks, repairs, or services + executed during the maintenance activity. + - name: amended_from + fieldtype: Link + label: Amended From + description: Links to the original maintenance log entry that was amended or corrected + by this record. + join_hint: + table: tabAsset Maintenance Log + 'on': amended_from = tabAsset Maintenance Log.name + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Asset Maintenance Log document (master/transaction). Use + only for single-entity lookups, not cross-record comparison unless fields are + per-relationship (e.g. supplier, price_list).' +- table: tabAsset Maintenance Task + description: '' + fields: + - name: maintenance_task + fieldtype: Data + label: Maintenance Task + description: Links to the specific maintenance procedure or checklist being performed, + used when querying what work is being done on assets. + - name: maintenance_type + fieldtype: Select + label: Maintenance Type + description: Categorizes maintenance as preventive, corrective, or breakdown, + used when analyzing maintenance strategies or filtering tasks by service approach. + options: + - Preventive Maintenance + - Calibration + - name: maintenance_status + fieldtype: Select + label: Maintenance Status + description: Current state of the maintenance task such as planned, in progress, + completed, or cancelled. + options: + - Planned + - Overdue + - Cancelled + - name: start_date + fieldtype: Date + label: Start Date + description: Date when the maintenance task is scheduled to begin or actually + began. + - name: periodicity + fieldtype: Select + label: Periodicity + description: Frequency or recurrence pattern of the maintenance task such as daily, + weekly, monthly, or one-time. + options: + - Daily + - Weekly + - Monthly + - Quarterly + - Half-yearly + - Yearly + - 2 Yearly + - 3 Yearly + - name: end_date + fieldtype: Date + label: End Date + description: Date when the maintenance task is scheduled to be completed or was + actually finished. + - name: certificate_required + fieldtype: Check + label: Certificate Required + description: Indicates whether a certification or compliance document must be + obtained upon completing this maintenance task. + - name: assign_to + fieldtype: Link + label: Assign To + description: Person or team responsible for performing this maintenance task. + join_hint: + table: tabUser + 'on': assign_to = tabUser.name + - name: next_due_date + fieldtype: Date + label: Next Due Date + description: Scheduled date when the maintenance task is next required to be performed. + - name: last_completion_date + fieldtype: Date + label: Last Completion Date + description: Date when the maintenance task was most recently completed. + - name: description + fieldtype: Text Editor + label: Description + description: Details what maintenance work needs to be performed on the asset, + such as inspection, repair, or replacement tasks. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabAsset Maintenance + Task). Comparison-ready across parent records.' +- table: tabAsset Maintenance Team + description: '' + fields: + - name: maintenance_team_name + fieldtype: Data + label: Maintenance Team Name + description: Full name of the maintenance team responsible for servicing assets. + - name: maintenance_manager + fieldtype: Link + label: Maintenance Manager + description: Person who manages and oversees this maintenance team's operations + and assignments. + join_hint: + table: tabUser + 'on': maintenance_manager = tabUser.name + - name: company + fieldtype: Link + label: Company + description: Company or organizational entity that owns or operates this maintenance + team, used to filter teams by business unit or legal entity. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: maintenance_team_members + fieldtype: Table + label: Maintenance Team Members + description: '' + child_hint: + child_table: tabMaintenance Team Member + fieldname: maintenance_team_members + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: maintenance_team_members + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Asset Maintenance Team document (master/transaction). Use + only for single-entity lookups, not cross-record comparison unless fields are + per-relationship (e.g. supplier, price_list).' +- table: tabAsset Movement + description: '' + fields: + - name: company + fieldtype: Link + label: Company + description: Company or business entity where the asset movement occurred + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: purpose + fieldtype: Select + label: Purpose + description: Reason or business justification for moving the asset, such as transfer, + maintenance, or relocation + options: + - Issue + - Receipt + - Transfer + - Transfer and Issue + - name: transaction_date + fieldtype: Datetime + label: Transaction Date + description: Date when the asset movement or transfer occurred, used to track + timing of asset location changes or custody transfers. + - name: assets + fieldtype: Table + label: Assets + description: '' + child_hint: + child_table: tabAsset Movement Item + fieldname: assets + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: assets + - name: reference_doctype + fieldtype: Link + label: Reference Document Type + description: Type of source document that triggered the asset movement such as + delivery note, purchase receipt, or asset transfer form. + join_hint: + table: tabDocType + 'on': reference_doctype = tabDocType.name + - name: reference_name + fieldtype: Dynamic Link + label: Reference Document Name + description: Unique identifier or code assigned to this specific asset movement + transaction for tracking and reference purposes. + - name: amended_from + fieldtype: Link + label: Amended From + description: Links to the original asset movement document that this record corrects + or replaces after amendment. + join_hint: + table: tabAsset Movement + 'on': amended_from = tabAsset Movement.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Asset Movement document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabAsset Movement Item + description: '' + fields: + - name: company + fieldtype: Link + label: Company + description: Company entity that owns or is responsible for the asset being moved + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: asset + fieldtype: Link + label: Asset + description: Specific asset item being transferred or relocated in this movement + join_hint: + table: tabAsset + 'on': asset = tabAsset.name + - name: source_location + fieldtype: Link + label: Source Location + description: Location where the asset is being moved from in this movement transaction. + join_hint: + table: tabLocation + 'on': source_location = tabLocation.name + - name: from_employee + fieldtype: Link + label: From Employee + description: Employee who previously held or was responsible for the asset before + this movement. + join_hint: + table: tabEmployee + 'on': from_employee = tabEmployee.name + - name: asset_name + fieldtype: Data + label: Asset Name + description: Name or identifier of the specific asset being moved or transferred. + - name: target_location + fieldtype: Link + label: Target Location + description: Destination location where the asset is being moved to in this movement + transaction. + join_hint: + table: tabLocation + 'on': target_location = tabLocation.name + - name: to_employee + fieldtype: Link + label: To Employee + description: Employee who will be responsible for or assigned to the asset after + the movement. + join_hint: + table: tabEmployee + 'on': to_employee = tabEmployee.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabAsset Movement + Item). Comparison-ready across parent records.' +- table: tabAsset Repair + description: '' + fields: + - name: asset + fieldtype: Link + label: Asset + description: The specific asset or equipment that is being repaired or has undergone + repair + join_hint: + table: tabAsset + 'on': asset = tabAsset.name + - name: company + fieldtype: Link + label: Company + description: The company or business entity that owns the asset or is responsible + for the repair + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: naming_series + fieldtype: Select + label: Series + description: The prefix or pattern used to generate repair record identifiers, + relevant when searching for repairs by document number format. + options: + - ACC-ASR-.YYYY.- + - name: failure_date + fieldtype: Datetime + label: Failure Date + description: The date when the asset broke down or malfunctioned, used to find + repairs by when the problem originally occurred. + - name: repair_status + fieldtype: Select + label: Repair Status + description: Current state of the asset repair such as pending, in progress, completed, + or cancelled. + options: + - Pending + - Completed + - Cancelled + - name: completion_date + fieldtype: Datetime + label: Completion Date + description: Date when the asset repair was finished or closed. + - name: cost_center + fieldtype: Link + label: Cost Center + description: Department or business unit charged for the repair expenses. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + - name: project + fieldtype: Link + label: Project + description: Project associated with the asset repair work for cost allocation + or tracking repair activities by project. + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: purchase_invoice + fieldtype: Link + label: Purchase Invoice + description: Invoice document linked to the repair for tracking vendor billing + and payment for repair services or parts. + join_hint: + table: tabPurchase Invoice + 'on': purchase_invoice = tabPurchase Invoice.name + - name: capitalize_repair_cost + fieldtype: Check + label: Capitalize Repair Cost + description: Whether the repair cost should be added to the asset's book value + rather than expensed immediately. + - name: stock_consumption + fieldtype: Check + label: Stock Consumed During Repair + description: Total value of inventory items consumed or used during the asset + repair process. + - name: repair_cost + fieldtype: Currency + label: Repair Cost + description: Total cost incurred for the repair including labor, services, and + other charges excluding stock consumption. + - name: stock_items + fieldtype: Table + label: Stock Items + description: '' + child_hint: + child_table: tabAsset Repair Consumed Item + fieldname: stock_items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: stock_items + - name: total_repair_cost + fieldtype: Currency + label: Total Repair Cost + description: Total cost incurred for the repair work performed on the asset. + - name: increase_in_asset_life + fieldtype: Int + label: Increase In Asset Life(Months) + description: Additional useful life in years or months added to the asset as a + result of the repair or refurbishment. + - name: description + fieldtype: Long Text + label: Error Description + description: Detailed explanation of the repair work performed, issues addressed, + or parts replaced on the asset. + - name: actions_performed + fieldtype: Long Text + label: Actions performed + description: Specific repair work, maintenance tasks, or corrective actions completed + during the asset repair service. + - name: downtime + fieldtype: Data + label: Downtime + description: Duration the asset was unavailable or out of service due to the repair. + - name: amended_from + fieldtype: Link + label: Amended From + description: Reference to the original asset repair record that this document + corrects or replaces. + join_hint: + table: tabAsset Repair + 'on': amended_from = tabAsset Repair.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Asset Repair document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabAsset Repair Consumed Item + description: '' + fields: + - name: item_code + fieldtype: Link + label: Item + description: Identifies which spare part or consumable was used during the asset + repair process. + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: warehouse + fieldtype: Link + label: Warehouse + description: Specifies the storage location from which the repair item was issued + or consumed. + join_hint: + table: tabWarehouse + 'on': warehouse = tabWarehouse.name + - name: valuation_rate + fieldtype: Currency + label: Valuation Rate + description: Unit cost or price per item consumed during the asset repair. + - name: consumed_quantity + fieldtype: Data + label: Consumed Quantity + description: Number of units of the item used or consumed in the asset repair. + - name: total_value + fieldtype: Currency + label: Total Value + description: Total monetary value of the consumed item calculated from quantity + and rate. + - name: serial_no + fieldtype: Small Text + label: Serial No + description: Unique identifier of the specific item consumed during the asset + repair, used when tracking individual serialized parts or components. + - name: serial_and_batch_bundle + fieldtype: Link + label: Serial and Batch Bundle + description: Reference to grouped serial or batch numbers for items consumed in + the repair, used when multiple units or batches are consumed together. + join_hint: + table: tabSerial and Batch Bundle + 'on': serial_and_batch_bundle = tabSerial and Batch Bundle.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabAsset Repair Consumed + Item). Comparison-ready across parent records.' +- table: tabAsset Shift Allocation + description: '' + fields: + - name: asset + fieldtype: Link + label: Asset + description: The asset being assigned to shifts or work schedules + join_hint: + table: tabAsset + 'on': asset = tabAsset.name + - name: naming_series + fieldtype: Select + label: Naming Series + description: Prefix pattern used to generate the name identifier for asset shift + allocation records + options: + - ACC-ASA-.YYYY.- + - name: finance_book + fieldtype: Link + label: Finance Book + description: Identifies which financial book or accounting entity this asset shift + allocation applies to when multiple books are maintained. + join_hint: + table: tabFinance Book + 'on': finance_book = tabFinance Book.name + - name: amended_from + fieldtype: Link + label: Amended From + description: References the original asset shift allocation document that this + record corrects or replaces. + join_hint: + table: tabAsset Shift Allocation + 'on': amended_from = tabAsset Shift Allocation.name + - name: depreciation_schedule + fieldtype: Table + label: Depreciation Schedule + description: '' + child_hint: + child_table: tabDepreciation Schedule + fieldname: depreciation_schedule + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: depreciation_schedule + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Asset Shift Allocation document (master/transaction). Use + only for single-entity lookups, not cross-record comparison unless fields are + per-relationship (e.g. supplier, price_list).' +- table: tabAsset Shift Factor + description: '' + fields: + - name: shift_name + fieldtype: Data + label: Shift Name + description: Name of the work shift or time period this factor applies to + - name: shift_factor + fieldtype: Float + label: Shift Factor + description: Multiplier or adjustment value applied to asset calculations during + this shift + - name: default + fieldtype: Check + label: Default + description: Indicates whether this shift factor is the default selection for + asset depreciation calculations. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Asset Shift Factor document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabAsset Value Adjustment + description: '' + fields: + - name: company + fieldtype: Link + label: Company + description: Company entity to which this asset value adjustment belongs + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: asset + fieldtype: Link + label: Asset + description: The specific asset being adjusted in value through this transaction + join_hint: + table: tabAsset + 'on': asset = tabAsset.name + - name: date + fieldtype: Date + label: Date + description: Date when the asset value adjustment was recorded or became effective, + used for time-based queries and period-specific reporting. + - name: finance_book + fieldtype: Link + label: Finance Book + description: Specific finance book or accounting ledger where this adjustment + is recorded, used when querying adjustments for particular legal entities or + reporting frameworks. + join_hint: + table: tabFinance Book + 'on': finance_book = tabFinance Book.name + - name: amended_from + fieldtype: Link + label: Amended From + description: References the previous version of this asset value adjustment if + it was corrected or modified after initial creation. + join_hint: + table: tabAsset Value Adjustment + 'on': amended_from = tabAsset Value Adjustment.name + - name: current_asset_value + fieldtype: Currency + label: Current Asset Value + description: The asset's book value before this adjustment is applied. + - name: new_asset_value + fieldtype: Currency + label: New Asset Value + description: The asset's book value after this adjustment is applied. + - name: difference_amount + fieldtype: Currency + label: Difference Amount + description: The calculated variance between current asset value and book value + that needs to be adjusted. + - name: difference_account + fieldtype: Link + label: Difference Account + description: The general ledger account where the asset value difference is posted. + join_hint: + table: tabAccount + 'on': difference_account = tabAccount.name + - name: journal_entry + fieldtype: Link + label: Journal Entry + description: The accounting journal entry created to record the asset value adjustment + transaction. + join_hint: + table: tabJournal Entry + 'on': journal_entry = tabJournal Entry.name + - name: cost_center + fieldtype: Link + label: Cost Center + description: Cost center to which the asset value adjustment is allocated for + accounting and expense tracking purposes. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Asset Value Adjustment document (master/transaction). Use + only for single-entity lookups, not cross-record comparison unless fields are + per-relationship (e.g. supplier, price_list).' +- table: tabAssignment Rule + description: '' + fields: + - name: document_type + fieldtype: Link + label: Document Type + description: The DocType or entity type to which this assignment rule applies + for automatic task assignment. + join_hint: + table: tabDocType + 'on': document_type = tabDocType.name + - name: due_date_based_on + fieldtype: Select + label: Due Date Based On + description: Field name used to calculate or determine the due date for assignments + created by this rule. + - name: priority + fieldtype: Int + label: Priority + description: Priority level assigned to tasks or assignments created by this rule. + - name: disabled + fieldtype: Check + label: Disabled + description: Indicates whether this assignment rule is currently active or temporarily + disabled. + - name: description + fieldtype: Small Text + label: Description + description: Explanation of what this assignment rule does and when it triggers. + - name: assign_condition + fieldtype: Code + label: Assign Condition + description: Conditional expression that determines when this assignment rule + should be applied to documents. + - name: unassign_condition + fieldtype: Code + label: Unassign Condition + description: Condition that triggers automatic removal of assigned users from + a record. + - name: close_condition + fieldtype: Code + label: Close Condition + description: Condition that automatically closes or completes the assignment when + met. + - name: assignment_days + fieldtype: Table + label: Assignment Days + description: '' + child_hint: + child_table: tabAssignment Rule Day + fieldname: assignment_days + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: assignment_days + - name: rule + fieldtype: Select + label: Rule + description: The assignment rule definition that determines how records are distributed + to users or groups. + options: + - Round Robin + - Load Balancing + - Based on Field + - name: field + fieldtype: Select + label: Field + description: The field being evaluated or modified by the assignment rule logic. + - name: users + fieldtype: Table MultiSelect + label: Users + description: List of users eligible to receive assignments based on this rule. + child_hint: + child_table: tabAssignment Rule User + fieldname: users + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: users + - name: last_user + fieldtype: Link + label: Last User + description: The most recent user who was assigned or processed this assignment + rule. + join_hint: + table: tabUser + 'on': last_user = tabUser.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Assignment Rule document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabAssignment Rule Day + description: '' + fields: + - name: day + fieldtype: Select + label: Day + description: Specific day of the week when this assignment rule is active or applicable. + options: + - Monday + - Tuesday + - Wednesday + - Thursday + - Friday + - Saturday + - Sunday + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabAssignment Rule + Day). Comparison-ready across parent records.' +- table: tabAssignment Rule User + description: '' + fields: + - name: user + fieldtype: Link + label: User + description: Specific user assigned to receive documents when this assignment + rule is triggered. + join_hint: + table: tabUser + 'on': user = tabUser.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabAssignment Rule + User). Comparison-ready across parent records.' +- table: tabAuthorization Rule + description: '' + fields: + - name: transaction + fieldtype: Select + label: Transaction + description: The transaction type (e.g., Sales Order, Purchase Order) that this + authorization rule applies to. + options: + - Sales Order + - Purchase Order + - Quotation + - Delivery Note + - Sales Invoice + - Purchase Invoice + - Purchase Receipt + - name: based_on + fieldtype: Select + label: Based On + description: The criteria field (e.g., Grand Total, Customer) that triggers this + authorization rule. + options: + - Grand Total + - Average Discount + - Customerwise Discount + - Itemwise Discount + - Item Group wise Discount + - Not Applicable + - name: customer_or_item + fieldtype: Select + label: Customer or Item + description: Specifies whether the rule applies to specific customers or items. + options: + - Customer + - Item + - Item Group + - name: master_name + fieldtype: Dynamic Link + label: Customer / Item / Item Group + description: The specific customer or item name that this authorization rule is + restricted to. + - name: company + fieldtype: Link + label: Company + description: The company for which this authorization rule is applicable, used + for multi-company filtering. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: value + fieldtype: Float + label: Authorized Value + description: The threshold amount or quantity that triggers the authorization + requirement. + - name: system_role + fieldtype: Link + label: Applicable To (Role) + description: The role that is authorized to approve transactions matching this + rule. + join_hint: + table: tabRole + 'on': system_role = tabRole.name + - name: to_emp + fieldtype: Link + label: Applicable To (Employee) + description: The specific employee who is authorized to approve under this rule. + join_hint: + table: tabEmployee + 'on': to_emp = tabEmployee.name + - name: system_user + fieldtype: Link + label: Applicable To (User) + description: The specific user account authorized to approve transactions under + this rule. + join_hint: + table: tabUser + 'on': system_user = tabUser.name + - name: to_designation + fieldtype: Link + label: Applicable To (Designation) + description: The employee designation (e.g., Manager, Director) authorized to + approve under this rule. + join_hint: + table: tabDesignation + 'on': to_designation = tabDesignation.name + - name: approving_role + fieldtype: Link + label: Approving Role (above authorized value) + description: Used to identify which role is authorized to approve transactions + or requests when querying approval workflows by role-based permissions. + join_hint: + table: tabRole + 'on': approving_role = tabRole.name + - name: approving_user + fieldtype: Link + label: Approving User (above authorized value) + description: Used to identify which specific user is authorized to approve transactions + or requests when querying approval workflows by individual approver. + join_hint: + table: tabUser + 'on': approving_user = tabUser.name + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Authorization Rule document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabAuto Email Report + description: '' + fields: + - name: report + fieldtype: Link + label: Report + description: Name of the report that will be automatically generated and emailed. + join_hint: + table: tabReport + 'on': report = tabReport.name + - name: user + fieldtype: Link + label: Based on Permissions For User + description: Recipient user who will receive the automated email report. + join_hint: + table: tabUser + 'on': user = tabUser.name + - name: enabled + fieldtype: Check + label: Enabled + description: Flag indicating whether this automated email report schedule is currently + active. + - name: reference_report + fieldtype: Data + label: Reference Report + description: Base report template or configuration that this automated email references. + - name: send_if_data + fieldtype: Check + label: Send only if there is any data + description: Flag to send the email only when the report contains data rows. + - name: data_modified_till + fieldtype: Int + label: Only Send Records Updated in Last X Hours + description: Tracks the last data modification timestamp to determine which records + to include in the automated email report. + - name: no_of_rows + fieldtype: Int + label: No of Rows (Max 500) + description: Limits the number of records returned in the email report for controlling + report size and readability. + - name: filters + fieldtype: Text + label: Filters + description: Defines the criteria for selecting which records appear in the automated + email report. + - name: filter_meta + fieldtype: Text + label: Filter Meta + description: Stores metadata about filter configurations applied to the automated + email report. + - name: from_date_field + fieldtype: Select + label: From Date Field + description: Specifies which date field to use as the start boundary when filtering + report data by date range. + - name: to_date_field + fieldtype: Select + label: To Date Field + description: Specifies which date field to use as the end boundary when filtering + report data by date range. + - name: dynamic_date_period + fieldtype: Select + label: Period + description: Sets relative time periods like 'Last Month' or 'This Quarter' for + automatically updating report date ranges. + options: + - Daily + - Weekly + - Monthly + - Quarterly + - Half Yearly + - Yearly + - name: use_first_day_of_period + fieldtype: Check + label: Use First Day of Period + description: Determines whether the report date range starts from the first day + of the selected period or uses exact dates. + - name: email_to + fieldtype: Small Text + label: Email To + description: Lists the recipient email addresses who will receive the automated + report. + - name: day_of_week + fieldtype: Select + label: Day of Week + description: Specifies which day the weekly automated email report should be sent. + options: + - Monday + - Tuesday + - Wednesday + - Thursday + - Friday + - Saturday + - Sunday + - name: sender + fieldtype: Link + label: Sender + description: Identifies the email address shown as the sender when the automated + report is delivered. + join_hint: + table: tabEmail Account + 'on': sender = tabEmail Account.name + - name: frequency + fieldtype: Select + label: Frequency + description: Controls how often the automated email report is sent, such as daily, + weekly, or monthly. + options: + - Daily + - Weekdays + - Weekly + - Monthly + - name: format + fieldtype: Select + label: Format + description: Defines the file format of the automated email report attachment + like PDF, Excel, or HTML. + options: + - HTML + - XLSX + - CSV + - name: description + fieldtype: Text Editor + label: Message + description: Provides a summary of what the automated email report contains and + its business purpose. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Auto Email Report document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabAuto Repeat + description: '' + fields: + - name: reference_doctype + fieldtype: Link + label: Reference Document Type + description: Document type that will be automatically duplicated on schedule. + join_hint: + table: tabDocType + 'on': reference_doctype = tabDocType.name + - name: reference_document + fieldtype: Dynamic Link + label: Reference Document + description: Specific document instance that serves as the template for auto-repeat. + - name: submit_on_creation + fieldtype: Check + label: Submit on Creation + description: Whether automatically created documents should be submitted immediately + or remain as drafts. + - name: start_date + fieldtype: Date + label: Start Date + description: Date when the automatic repetition schedule begins. + - name: end_date + fieldtype: Date + label: End Date + description: Date when the automatic repetition schedule stops. + - name: disabled + fieldtype: Check + label: Disabled + description: Whether this auto-repeat configuration is currently active or paused. + - name: frequency + fieldtype: Select + label: Frequency + description: Defines how often the document recurs (daily, weekly, monthly, yearly) + for automated repetition scheduling. + options: + - Daily + - Weekly + - Monthly + - Quarterly + - Half-yearly + - Yearly + - name: repeat_on_day + fieldtype: Int + label: Repeat on Day + description: Specifies the exact day of the month (1-31) when monthly recurring + documents should be generated. + - name: repeat_on_last_day + fieldtype: Check + label: Repeat on Last Day of the Month + description: Indicates whether the document should repeat on the last day of each + month regardless of month length. + - name: next_schedule_date + fieldtype: Date + label: Next Schedule Date + description: Shows the upcoming date when the next automated document will be + created based on the repeat schedule. + - name: repeat_on_days + fieldtype: Table + label: Repeat on Days + description: '' + child_hint: + child_table: tabAuto Repeat Day + fieldname: repeat_on_days + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: repeat_on_days + - name: notify_by_email + fieldtype: Check + label: Notify by Email + description: Controls whether email notifications are sent to recipients when + the recurring document is auto-generated. + - name: recipients + fieldtype: Small Text + label: Recipients + description: Contains email addresses of users who receive notifications when + the automated document is created. + - name: template + fieldtype: Link + label: Template + description: References the document template used as the base for generating + each recurring instance. + join_hint: + table: tabEmail Template + 'on': template = tabEmail Template.name + - name: subject + fieldtype: Data + label: Subject + description: Defines the email subject line used when notifying recipients about + the auto-generated document. + - name: message + fieldtype: Text + label: Message + description: Contains the email body text sent to recipients along with the auto-generated + document notification. + - name: print_format + fieldtype: Link + label: Print Format + description: Specifies the layout format applied when the recurring document is + generated or attached to notifications. + join_hint: + table: tabPrint Format + 'on': print_format = tabPrint Format.name + - name: status + fieldtype: Select + label: Status + description: Indicates whether the auto-repeat schedule is active, paused, or + disabled for document generation. + options: + - Active + - Disabled + - Completed + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Auto Repeat document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabAuto Repeat Day + description: '' + fields: + - name: day + fieldtype: Select + label: Day + description: Specific day of the month when the auto repeat transaction should + be generated. + options: + - Monday + - Tuesday + - Wednesday + - Thursday + - Friday + - Saturday + - Sunday + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabAuto Repeat Day). + Comparison-ready across parent records.' +- table: tabAvailability Of Slots + description: '' + fields: + - name: day_of_week + fieldtype: Select + label: Day Of Week + description: Day when the slot is available for scheduling or booking + options: + - Sunday + - Monday + - Tuesday + - Wednesday + - Thursday + - Friday + - Saturday + - name: from_time + fieldtype: Time + label: From Time + description: Start time when the availability slot begins + - name: to_time + fieldtype: Time + label: To Time + description: End time of an available slot or time period when availability concludes + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabAvailability Of + Slots). Comparison-ready across parent records.' +- table: tabBOM + description: '' + fields: + - name: item + fieldtype: Link + label: Item + description: Finished product or assembly that this BOM produces or manufactures + join_hint: + table: tabItem + 'on': item = tabItem.name + - name: company + fieldtype: Link + label: Company + description: Company entity that owns or uses this bill of materials + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: uom + fieldtype: Link + label: Item UOM + description: Unit of measurement for the component or material quantity in the + bill of materials. + join_hint: + table: tabUOM + 'on': uom = tabUOM.name + - name: quantity + fieldtype: Float + label: Quantity + description: Amount of component or material required in the bill of materials + assembly. + - name: is_active + fieldtype: Check + label: Is Active + description: Whether this bill of materials entry is currently valid and should + be used in production or costing calculations. + - name: is_default + fieldtype: Check + label: Is Default + description: Indicates whether this BOM is the default bill of materials for the + item when multiple BOMs exist. + - name: allow_alternative_item + fieldtype: Check + label: Allow Alternative Item + description: Controls whether substitute or alternative items can be used in place + of the specified BOM components during production or material planning. + - name: set_rate_of_sub_assembly_item_based_on_bom + fieldtype: Check + label: Set rate of sub-assembly item based on BOM + description: Determines if the cost/price of sub-assembly items should be automatically + calculated from their underlying BOM rather than using a fixed rate. + - name: project + fieldtype: Link + label: Project + description: Project associated with this bill of materials for tracking manufacturing + or assembly costs and materials by project. + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: rm_cost_as_per + fieldtype: Select + label: Rate Of Materials Based On + description: Method used to determine raw material costs in BOM calculations, + such as valuation rate, price list, or last purchase rate. + options: + - Valuation Rate + - Last Purchase Rate + - Price List + - name: buying_price_list + fieldtype: Link + label: Price List + description: Price list used to fetch purchase prices for raw materials and components + in the BOM cost calculation. + join_hint: + table: tabPrice List + 'on': buying_price_list = tabPrice List.name + - name: price_list_currency + fieldtype: Link + label: Price List Currency + description: Currency used in the price list associated with this BOM for standard + pricing references. + join_hint: + table: tabCurrency + 'on': price_list_currency = tabCurrency.name + - name: plc_conversion_rate + fieldtype: Float + label: Price List Exchange Rate + description: Exchange rate to convert between the price list currency and the + BOM's transaction currency. + - name: currency + fieldtype: Link + label: Currency + description: Transaction currency for this BOM's costs and pricing calculations. + join_hint: + table: tabCurrency + 'on': currency = tabCurrency.name + - name: conversion_rate + fieldtype: Float + label: Conversion Rate + description: Rate used to convert quantities between the finished item and raw + material units of measure in the bill of materials. + - name: items + fieldtype: Table + label: Items + description: '' + child_hint: + child_table: tabBOM Item + fieldname: items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: items + - name: with_operations + fieldtype: Check + label: With Operations + description: Indicates whether this BOM includes manufacturing operations, routing + steps, or workstation instructions for production. + - name: transfer_material_against + fieldtype: Select + label: Transfer Material Against + description: Specifies whether materials are transferred against a work order + or a BOM during manufacturing execution. + options: + - Work Order + - Job Card + - name: routing + fieldtype: Link + label: Routing + description: The manufacturing routing or process sequence that defines operations + to produce this BOM item. + join_hint: + table: tabRouting + 'on': routing = tabRouting.name + - name: fg_based_operating_cost + fieldtype: Check + label: Finished Goods based Operating Cost + description: Indicates whether operating costs are calculated based on the finished + goods quantity rather than individual operation costs. + - name: operating_cost_per_bom_quantity + fieldtype: Currency + label: Operating Cost Per BOM Quantity + description: Total operating cost to produce one BOM quantity unit, used when + calculating manufacturing costs or profitability per batch. + - name: operations + fieldtype: Table + label: Operations + description: '' + child_hint: + child_table: tabBOM Operation + fieldname: operations + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: operations + - name: scrap_items + fieldtype: Table + label: Scrap Items + description: '' + child_hint: + child_table: tabBOM Scrap Item + fieldname: scrap_items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: scrap_items + - name: process_loss_percentage + fieldtype: Percent + label: '% Process Loss' + description: Percentage of material expected to be lost or wasted during the manufacturing + process for this BOM item. + - name: process_loss_qty + fieldtype: Float + label: Process Loss Qty + description: Absolute quantity of material expected to be lost or wasted during + the manufacturing process for this BOM item. + - name: operating_cost + fieldtype: Currency + label: Operating Cost + description: Labor, machine, or overhead cost incurred to execute the manufacturing + operation for this BOM item, excluding material costs. + - name: raw_material_cost + fieldtype: Currency + label: Raw Material Cost + description: Cost of raw materials required to produce one unit of the finished + item in this BOM. + - name: scrap_material_cost + fieldtype: Currency + label: Scrap Material Cost + description: Cost of materials expected to be wasted or scrapped during production + of one unit. + - name: base_operating_cost + fieldtype: Currency + label: Operating Cost (Company Currency) + description: Labor and overhead costs for manufacturing operations excluding material + costs. + - name: base_raw_material_cost + fieldtype: Currency + label: Raw Material Cost (Company Currency) + description: Cost of raw materials needed to produce one unit of the finished + item, excluding scrap or waste materials. + - name: base_scrap_material_cost + fieldtype: Currency + label: Scrap Material Cost(Company Currency) + description: Cost of materials expected to be wasted or scrapped during production + of one unit of the finished item. + - name: total_cost + fieldtype: Currency + label: Total Cost + description: Complete cost to produce one unit including raw materials, scrap, + operations, and all other BOM-related expenses. + - name: base_total_cost + fieldtype: Currency + label: Total Cost (Company Currency) + description: Total cost of all materials and operations required to manufacture + one unit of the finished item at base quantities. + - name: item_name + fieldtype: Data + label: Item Name + description: The finished product or assembly that this bill of materials defines + how to manufacture. + - name: description + fieldtype: Small Text + label: Item Description + description: Explanatory text about this bill of materials structure, purpose, + or manufacturing notes. + - name: has_variants + fieldtype: Check + label: Has Variants + description: Indicates whether this BOM produces items with multiple attribute + variations like size or color. + - name: inspection_required + fieldtype: Check + label: Quality Inspection Required + description: Indicates whether manufactured items from this BOM must undergo quality + inspection before use or sale. + - name: quality_inspection_template + fieldtype: Link + label: Quality Inspection Template + description: The specific inspection checklist or template used when quality inspection + is required for this BOM. + join_hint: + table: tabQuality Inspection Template + 'on': quality_inspection_template = tabQuality Inspection Template.name + - name: exploded_items + fieldtype: Table + label: Exploded Items + description: '' + child_hint: + child_table: tabBOM Explosion Item + fieldname: exploded_items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: exploded_items + - name: show_in_website + fieldtype: Check + label: Show in Website + description: Whether this BOM is visible on the website for customer or public + viewing. + - name: route + fieldtype: Small Text + label: Route + description: Manufacturing method or production path such as subcontracting, in-house + manufacturing, or purchase for this BOM. + - name: thumbnail + fieldtype: Data + label: Thumbnail + description: Image preview of the bill of materials or finished product for visual + identification + - name: show_items + fieldtype: Check + label: Show Items + description: Controls whether component items and raw materials are displayed + in the BOM view + - name: show_operations + fieldtype: Check + label: Show Operations + description: Controls whether manufacturing operations and routing steps are displayed + in the BOM view + - name: web_long_description + fieldtype: Text Editor + label: Website Description + description: Detailed product description for the BOM displayed on web or e-commerce + platforms. + - name: bom_creator + fieldtype: Link + label: BOM Creator + description: User or person who created or defined this bill of materials. + join_hint: + table: tabBOM Creator + 'on': bom_creator = tabBOM Creator.name + - name: bom_creator_item + fieldtype: Data + label: BOM Creator Item + description: Specific item or product that was used as the template or source + when creating this BOM. + - name: amended_from + fieldtype: Link + label: Amended From + description: Links to the original BOM document that this BOM was amended or corrected + from, used when tracking BOM revision history or finding which BOM replaced + another. + join_hint: + table: tabBOM + 'on': amended_from = tabBOM.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per BOM document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabBOM Creator + description: '' + fields: + - name: item_code + fieldtype: Link + label: Finished Good + description: SKU or product code of the item being manufactured in this BOM + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: item_name + fieldtype: Data + label: Item Name + description: Descriptive name of the finished product or manufactured item in + this BOM + - name: item_group + fieldtype: Link + label: Item Group + description: Category or classification of the item being produced in the bill + of materials, used when filtering or analyzing BOMs by product type or family. + join_hint: + table: tabItem Group + 'on': item_group = tabItem Group.name + - name: qty + fieldtype: Float + label: Quantity + description: Quantity of the finished item or component specified in this BOM + entry, referenced when calculating material requirements or production volumes. + - name: project + fieldtype: Link + label: Project + description: Specific project associated with this BOM configuration, used when + BOMs are customized or tracked separately for different customer projects or + initiatives. + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: uom + fieldtype: Link + label: UOM + description: Unit of measurement for the BOM item quantity, relevant when users + ask about measurement units or quantity specifications in bill of materials + join_hint: + table: tabUOM + 'on': uom = tabUOM.name + - name: rm_cost_as_per + fieldtype: Select + label: Rate Of Materials Based On + description: Pricing basis for raw material costs in the BOM, used when users + inquire about cost calculation methods or valuation sources for materials + options: + - Valuation Rate + - Last Purchase Rate + - Price List + - name: set_rate_based_on_warehouse + fieldtype: Check + label: Set Valuation Rate Based on Source Warehouse + description: Whether item rates are determined by specific warehouse locations, + relevant when users ask about location-dependent pricing or warehouse-specific + costing + - name: buying_price_list + fieldtype: Link + label: Price List + description: Price list used to determine purchase costs for raw materials and + components in this BOM + join_hint: + table: tabPrice List + 'on': buying_price_list = tabPrice List.name + - name: price_list_currency + fieldtype: Link + label: Price List Currency + description: Currency in which the buying price list prices are denominated + join_hint: + table: tabCurrency + 'on': price_list_currency = tabCurrency.name + - name: plc_conversion_rate + fieldtype: Float + label: Price List Exchange Rate + description: Exchange rate to convert buying price list currency to company base + currency for cost calculations + - name: currency + fieldtype: Link + label: Currency + description: Currency in which BOM costs and prices are denominated for this bill + of materials + join_hint: + table: tabCurrency + 'on': currency = tabCurrency.name + - name: conversion_rate + fieldtype: Float + label: Conversion Rate + description: Exchange rate used to convert BOM costs from the BOM currency to + the company's base currency + - name: default_warehouse + fieldtype: Link + label: Default Source Warehouse + description: Warehouse from which raw materials and components for this BOM are + sourced by default + join_hint: + table: tabWarehouse + 'on': default_warehouse = tabWarehouse.name + - name: company + fieldtype: Link + label: Company + description: Company entity that owns or manages the bill of materials being created. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: items + fieldtype: Table + label: Items + description: '' + child_hint: + child_table: tabBOM Creator Item + fieldname: items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: items + - name: raw_material_cost + fieldtype: Currency + label: Total Cost + description: Total cost of raw materials required to produce the item defined + in this BOM. + - name: remarks + fieldtype: Text Editor + label: Remarks + description: User-entered notes or comments about the BOM creation process or + configuration. + - name: status + fieldtype: Select + label: Status + description: Current state of the BOM creation workflow such as draft, in progress, + completed, or failed. + options: + - Draft + - Submitted + - In Progress + - Completed + - Failed + - Cancelled + - name: error_log + fieldtype: Text + label: Error Log + description: Error messages or failure details encountered during BOM creation + or processing. + - name: amended_from + fieldtype: Link + label: Amended From + description: Links to the original BOM Creator document that this version was + amended from, used when tracking BOM revision history or finding the source + document before amendments. + join_hint: + table: tabBOM Creator + 'on': amended_from = tabBOM Creator.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per BOM Creator document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabBOM Creator Item + description: '' + fields: + - name: item_code + fieldtype: Link + label: Item Code + description: Alphanumeric code identifying the specific item in the BOM creator + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: item_name + fieldtype: Data + label: Item Name + description: Human-readable name or description of the item in the BOM creator + - name: item_group + fieldtype: Link + label: Item Group + description: Category or classification of the finished good item being created + in the BOM. + join_hint: + table: tabItem Group + 'on': item_group = tabItem Group.name + - name: fg_item + fieldtype: Link + label: Finished Goods Item + description: The finished good item code or name that this BOM produces. + join_hint: + table: tabItem + 'on': fg_item = tabItem.name + - name: source_warehouse + fieldtype: Link + label: Source Warehouse + description: Warehouse location from which raw materials or components are sourced + for this BOM. + join_hint: + table: tabWarehouse + 'on': source_warehouse = tabWarehouse.name + - name: is_expandable + fieldtype: Check + label: Is Expandable + description: Indicates whether this BOM item can be further broken down into sub-components + or child items. + - name: sourced_by_supplier + fieldtype: Check + label: Sourced by Supplier + description: Indicates whether this BOM item is procured externally from a supplier + rather than manufactured internally. + - name: bom_created + fieldtype: Check + label: BOM Created + description: Indicates whether a bill of materials has been successfully created + for this item. + - name: allow_alternative_item + fieldtype: Check + label: Allow Alternative Item + description: Whether substitute items can be used in place of this BOM component + during production or material shortages. + - name: description + fieldtype: Small Text + label: description + description: Descriptive text or notes about this BOM item component explaining + its purpose or specifications. + - name: qty + fieldtype: Float + label: Qty + description: Quantity of this item required in the bill of materials for producing + one unit of the finished product. + - name: rate + fieldtype: Currency + label: Rate + description: Price or cost per unit of the BOM item component used in cost calculations + and valuation. + - name: uom + fieldtype: Link + label: UOM + description: Unit of measurement for the BOM item component (e.g., kg, pieces, + liters) as specified in the bill of materials. + join_hint: + table: tabUOM + 'on': uom = tabUOM.name + - name: stock_qty + fieldtype: Float + label: Stock Qty + description: Quantity of the BOM item component in stock/inventory UOM, accounting + for UOM conversion from the BOM UOM. + - name: conversion_factor + fieldtype: Float + label: Conversion Factor + description: Multiplier to convert the BOM item quantity from its unit of measure + to the stock unit of measure. + - name: stock_uom + fieldtype: Link + label: Stock UOM + description: Standard unit of measure used for inventory tracking and stock management + of this BOM item. + join_hint: + table: tabUOM + 'on': stock_uom = tabUOM.name + - name: amount + fieldtype: Currency + label: Amount + description: Total monetary value or cost of this item in the bill of materials. + - name: base_rate + fieldtype: Currency + label: Base Rate + description: Rate per unit of this BOM item in base currency before any adjustments + or conversions. + - name: base_amount + fieldtype: Currency + label: Base Amount + description: Total cost of this BOM item in base currency, typically rate multiplied + by quantity. + - name: do_not_explode + fieldtype: Check + label: Do Not Explode + description: Flag indicating whether this BOM item should be treated as a single + unit rather than expanded into its sub-components during BOM explosion or manufacturing. + - name: parent_row_no + fieldtype: Data + label: Parent Row No + description: Row number of the parent item in the BOM structure to establish hierarchical + relationships between components. + - name: fg_reference_id + fieldtype: Data + label: Finished Goods Reference + description: Reference identifier for the finished good that this BOM item belongs + to or produces. + - name: instruction + fieldtype: Small Text + label: Instruction + description: Manufacturing or assembly instructions specific to this BOM item + for production guidance. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabBOM Creator Item). + Comparison-ready across parent records.' +- table: tabBOM Explosion Item + description: '' + fields: + - name: item_code + fieldtype: Link + label: Item Code + description: Code of the component or raw material item in the bill of materials + explosion. + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: item_name + fieldtype: Data + label: Item Name + description: Name of the component or raw material item in the bill of materials + explosion. + - name: source_warehouse + fieldtype: Link + label: Source Warehouse + description: Warehouse location from which the BOM component item is sourced or + issued during production. + join_hint: + table: tabWarehouse + 'on': source_warehouse = tabWarehouse.name + - name: operation + fieldtype: Link + label: Operation + description: Manufacturing operation or workstation step where this BOM component + is consumed or used. + join_hint: + table: tabOperation + 'on': operation = tabOperation.name + - name: description + fieldtype: Text Editor + label: Description + description: Textual details or notes about the BOM explosion item explaining + its purpose or specifications. + - name: stock_qty + fieldtype: Float + label: Stock Qty + description: Available inventory quantity of the BOM component for checking material + availability before production. + - name: rate + fieldtype: Currency + label: Rate + description: Unit cost or price of the BOM component used in calculating total + material costs and production expenses. + - name: qty_consumed_per_unit + fieldtype: Float + label: Qty Consumed Per Unit + description: Quantity of this component material required to produce one unit + of the parent item in the bill of materials. + - name: stock_uom + fieldtype: Link + label: Stock UOM + description: Unit of measurement for the component item's inventory quantity in + this BOM explosion. + join_hint: + table: tabUOM + 'on': stock_uom = tabUOM.name + - name: amount + fieldtype: Currency + label: Amount + description: Total monetary value of the component quantity consumed in this BOM + explosion line. + - name: include_item_in_manufacturing + fieldtype: Check + label: Include Item In Manufacturing + description: Whether this BOM item is included when manufacturing the parent item, + used to filter active components in production planning and material requirements. + - name: sourced_by_supplier + fieldtype: Check + label: Sourced by Supplier + description: Whether this BOM item is procured from an external supplier rather + than manufactured in-house, used to distinguish purchased components from manufactured + subassemblies. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabBOM Explosion + Item). Comparison-ready across parent records.' +- table: tabBOM Item + description: '' + fields: + - name: item_code + fieldtype: Link + label: Item Code + description: Code of the component or raw material included in this BOM line. + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: item_name + fieldtype: Data + label: Item Name + description: Name of the component or raw material included in this BOM line. + - name: operation + fieldtype: Link + label: Item operation + description: Manufacturing operation or workstation where this BOM item is consumed + or assembled. + join_hint: + table: tabOperation + 'on': operation = tabOperation.name + - name: do_not_explode + fieldtype: Check + label: Do Not Explode + description: Indicates whether this BOM item should be treated as a single unit + without expanding into its sub-components during production or material planning. + - name: bom_no + fieldtype: Link + label: BOM No + description: Identifier linking this item to its parent bill of materials structure. + join_hint: + table: tabBOM + 'on': bom_no = tabBOM.name + - name: source_warehouse + fieldtype: Link + label: Source Warehouse + description: Warehouse from which the component item should be sourced or issued + for production. + join_hint: + table: tabWarehouse + 'on': source_warehouse = tabWarehouse.name + - name: allow_alternative_item + fieldtype: Check + label: Allow Alternative Item + description: Whether a substitute component can be used in place of this BOM item + during manufacturing. + - name: is_stock_item + fieldtype: Check + label: Is Stock Item + description: Whether this BOM component is a stocked inventory item versus a non-stock + or service item. + - name: description + fieldtype: Text Editor + label: Item Description + description: Text description of the component or material item included in the + bill of materials + - name: qty + fieldtype: Float + label: Qty + description: Quantity of this component required in the bill of materials assembly + - name: uom + fieldtype: Link + label: UOM + description: Unit of measurement for the BOM item quantity as specified in the + bill of materials recipe or formula. + join_hint: + table: tabUOM + 'on': uom = tabUOM.name + - name: stock_qty + fieldtype: Float + label: Stock Qty + description: Quantity of the BOM item converted to stock UOM for inventory consumption + calculations. + - name: stock_uom + fieldtype: Link + label: Stock UOM + description: Standard inventory unit of measurement used for stock tracking and + warehouse transactions, which may differ from the BOM recipe UOM. + join_hint: + table: tabUOM + 'on': stock_uom = tabUOM.name + - name: conversion_factor + fieldtype: Float + label: Conversion Factor + description: Factor to convert the BOM item's unit of measure to the base or standard + unit for quantity calculations. + - name: rate + fieldtype: Currency + label: Rate + description: Effective cost or price per unit of this BOM item after applying + conversion factors or adjustments. + - name: base_rate + fieldtype: Currency + label: Basic Rate (Company Currency) + description: Standard or original cost per unit of this BOM item before any conversion + or adjustments are applied. + - name: amount + fieldtype: Currency + label: Amount + description: Total cost of this BOM item component in transaction currency for + the specified quantity. + - name: base_amount + fieldtype: Currency + label: Amount (Company Currency) + description: Total cost of this BOM item component converted to company base currency. + - name: qty_consumed_per_unit + fieldtype: Float + label: Qty Consumed Per Unit + description: Quantity of this component material required to produce one unit + of the finished item. + - name: has_variants + fieldtype: Check + label: Has Variants + description: Indicates whether the BOM item has multiple variants or configurations + that can be selected during manufacturing or assembly. + - name: include_item_in_manufacturing + fieldtype: Check + label: Include Item In Manufacturing + description: Controls whether this BOM component is actually consumed or included + when manufacturing the parent item. + - name: original_item + fieldtype: Link + label: Original Item + description: References the source or template item code when this BOM item was + copied or derived from another item. + join_hint: + table: tabItem + 'on': original_item = tabItem.name + - name: sourced_by_supplier + fieldtype: Check + label: Sourced by Supplier + description: Indicates whether this BOM item is procured from an external supplier + rather than manufactured internally + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabBOM Item). Comparison-ready + across parent records.' +- table: tabBOM Operation + description: '' + fields: + - name: sequence_id + fieldtype: Int + label: Sequence ID + description: Order in which this operation is performed in the manufacturing process + - name: operation + fieldtype: Link + label: Operation + description: The specific manufacturing task or work step to be performed + join_hint: + table: tabOperation + 'on': operation = tabOperation.name + - name: workstation_type + fieldtype: Link + label: Workstation Type + description: Category or classification of workstation where the BOM operation + is performed, used when filtering operations by general workstation capabilities + or groupings. + join_hint: + table: tabWorkstation Type + 'on': workstation_type = tabWorkstation Type.name + - name: workstation + fieldtype: Link + label: Workstation + description: Specific workstation or machine where the BOM operation is executed, + used when identifying exact production location or resource assignment. + join_hint: + table: tabWorkstation + 'on': workstation = tabWorkstation.name + - name: time_in_mins + fieldtype: Float + label: Operation Time + description: Duration in minutes required to complete the BOM operation at the + workstation, used when calculating production time, scheduling, or capacity + planning. + - name: fixed_time + fieldtype: Check + label: Fixed Time + description: Time required for operation setup or preparation regardless of batch + size. + - name: hour_rate + fieldtype: Currency + label: Hour Rate + description: Actual or effective hourly cost rate applied to this operation including + adjustments or overrides. + - name: base_hour_rate + fieldtype: Currency + label: Base Hour Rate(Company Currency) + description: Standard or default hourly cost rate for this operation before any + adjustments. + - name: operating_cost + fieldtype: Currency + label: Operating Cost + description: Total cost to perform this operation including adjustments, used + when calculating actual production costs per operation + - name: base_operating_cost + fieldtype: Currency + label: Operating Cost(Company Currency) + description: Standard or default cost for this operation before any adjustments + or multipliers are applied + - name: batch_size + fieldtype: Int + label: Batch Size + description: Quantity of items processed together in this operation, used when + calculating per-unit operation costs or scheduling batch production + - name: set_cost_based_on_bom_qty + fieldtype: Check + label: Set Operating Cost Based On BOM Quantity + description: Indicates whether operation cost scales with BOM quantity or remains + fixed per batch. + - name: cost_per_unit + fieldtype: Float + label: Cost Per Unit + description: Actual cost charged per unit for this operation in transaction currency, + used when calculating total operation costs for production orders. + - name: base_cost_per_unit + fieldtype: Float + label: Base Cost Per Unit + description: Standard operation cost per unit in base currency before any quantity-based + adjustments or currency conversion. + - name: description + fieldtype: Text Editor + label: Description + description: Detailed explanation or notes about what work is performed in this + manufacturing operation step. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabBOM Operation). + Comparison-ready across parent records.' +- table: tabBOM Scrap Item + description: '' + fields: + - name: item_code + fieldtype: Link + label: Item Code + description: Code of the item that is scrapped or wasted during the BOM production + process. + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: item_name + fieldtype: Data + label: Item Name + description: Name of the item that is scrapped or wasted during the BOM production + process. + - name: stock_qty + fieldtype: Float + label: Qty + description: Quantity of scrap material generated from the BOM production process. + - name: rate + fieldtype: Currency + label: Rate + description: Unit valuation or cost per unit of the scrap item. + - name: amount + fieldtype: Currency + label: Amount + description: Total monetary value of the scrap quantity, typically stock_qty multiplied + by rate. + - name: stock_uom + fieldtype: Link + label: Stock UOM + description: Unit of measurement for the scrap item quantity in inventory (e.g., + kg, pieces, liters). + join_hint: + table: tabUOM + 'on': stock_uom = tabUOM.name + - name: base_rate + fieldtype: Currency + label: Basic Rate (Company Currency) + description: Price per unit of the scrap item in the company's base currency. + - name: base_amount + fieldtype: Currency + label: Basic Amount (Company Currency) + description: Total value of the scrap item in the company's base currency, calculated + from quantity and rate. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabBOM Scrap Item). + Comparison-ready across parent records.' +- table: tabBOM Update Batch + description: '' + fields: + - name: level + fieldtype: Int + label: Level + description: Indicates the BOM hierarchy depth or processing stage of the batch, + used when filtering updates by structural level or priority. + - name: batch_no + fieldtype: Int + label: Batch No. + description: Sequential or generated batch number for grouping related BOM updates + together, used when querying or reporting on specific update batches. + - name: boms_updated + fieldtype: Long Text + label: BOMs Updated + description: Number of bill of materials records that were modified or refreshed + in this batch update operation. + - name: status + fieldtype: Select + label: Status + description: Current state of the batch update process such as pending, in progress, + completed, or failed. + options: + - Pending + - Completed + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabBOM Update Batch). + Comparison-ready across parent records.' +- table: tabBOM Update Log + description: BOM Update Tool Log with job status maintained + fields: + - name: update_type + fieldtype: Select + label: Update Type + description: Type of change made to the BOM such as creation, modification, or + deletion + options: + - Replace BOM + - Update Cost + - name: status + fieldtype: Select + label: Status + description: Current state of the BOM update such as pending, approved, or rejected + options: + - Queued + - In Progress + - Completed + - Failed + - name: current_bom + fieldtype: Link + label: Current BOM + description: The bill of materials identifier that was active before the update + occurred. + join_hint: + table: tabBOM + 'on': current_bom = tabBOM.name + - name: new_bom + fieldtype: Link + label: New BOM + description: The bill of materials identifier that became active after the update + was applied. + join_hint: + table: tabBOM + 'on': new_bom = tabBOM.name + - name: error_log + fieldtype: Link + label: Error Log + description: Details of failures or issues encountered during the BOM update process. + join_hint: + table: tabError Log + 'on': error_log = tabError Log.name + - name: current_level + fieldtype: Int + label: Current Level + description: Indicates the hierarchical depth or tier in the bill of materials + structure being processed or updated. + - name: processed_boms + fieldtype: Long Text + label: Processed BOMs + description: Tracks which bill of materials records have been completed or handled + during the update operation. + - name: bom_batches + fieldtype: Table + label: bom_batches + description: '' + child_hint: + child_table: tabBOM Update Batch + fieldname: bom_batches + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: bom_batches + - name: amended_from + fieldtype: Link + label: Amended From + description: Links to the previous BOM update log entry when a BOM change record + is amended or corrected after initial creation. + join_hint: + table: tabBOM Update Log + 'on': amended_from = tabBOM Update Log.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per BOM Update Log document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabBOM Website Item + description: '' + fields: + - name: item_code + fieldtype: Link + label: Item Code + description: SKU or product code of the item in the bill of materials for website + display + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: item_name + fieldtype: Data + label: Item Name + description: Display name or title of the item shown on the website for this BOM + entry + - name: description + fieldtype: Text Editor + label: Item Description + description: Description or details of the website item included in the bill of + materials. + - name: qty + fieldtype: Float + label: Qty + description: Quantity of the website item required in the bill of materials. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabBOM Website Item). + Comparison-ready across parent records.' +- table: tabBOM Website Operation + description: '' + fields: + - name: operation + fieldtype: Link + label: Operation + description: Defines the manufacturing operation or process step to be performed, + used when querying production workflows and routing sequences. + join_hint: + table: tabOperation + 'on': operation = tabOperation.name + - name: workstation + fieldtype: Link + label: Workstation + description: Specifies the workstation or work center where the operation is executed, + used when analyzing capacity, scheduling, or location-specific production activities. + join_hint: + table: tabWorkstation + 'on': workstation = tabWorkstation.name + - name: time_in_mins + fieldtype: Float + label: Operation Time + description: Duration required to complete this website operation step in the + bill of materials manufacturing process. + - name: thumbnail + fieldtype: Data + label: Thumbnail + description: Image preview or icon representing this website operation for visual + identification in the BOM. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabBOM Website Operation). + Comparison-ready across parent records.' +- table: tabBank + description: '' + fields: + - name: bank_name + fieldtype: Data + label: Bank Name + description: Official name of the financial institution where the account is held, + used when filtering or reporting on transactions by specific banks. + - name: swift_number + fieldtype: Data + label: SWIFT number + description: International bank identifier code used for cross-border payments, + wire transfers, and validating international banking relationships. + - name: website + fieldtype: Data + label: Website + description: Bank's official website URL for reference or online banking access + - name: bank_transaction_mapping + fieldtype: Table + label: Bank Transaction Mapping + description: '' + child_hint: + child_table: tabBank Transaction Mapping + fieldname: bank_transaction_mapping + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: bank_transaction_mapping + - name: plaid_access_token + fieldtype: Data + label: Plaid Access Token + description: Authentication token for connecting to bank accounts through Plaid + API integration + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Bank document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabBank Account + description: '' + fields: + - name: account_name + fieldtype: Data + label: Account Name + description: Display name of the bank account used when users search for or filter + by specific bank accounts in financial queries. + - name: account + fieldtype: Link + label: Company Account + description: Link to the chart of accounts GL account used when reconciling bank + transactions to the general ledger or analyzing cash positions. + join_hint: + table: tabAccount + 'on': account = tabAccount.name + - name: bank + fieldtype: Link + label: Bank + description: The financial institution where the account is held, used when filtering + or searching accounts by banking provider. + join_hint: + table: tabBank + 'on': bank = tabBank.name + - name: account_type + fieldtype: Link + label: Account Type + description: The primary classification of the bank account such as checking, + savings, or credit, used to distinguish broad account categories. + join_hint: + table: tabBank Account Type + 'on': account_type = tabBank Account Type.name + - name: account_subtype + fieldtype: Link + label: Account Subtype + description: The specific subcategory within the account type providing more granular + classification, used when the main account type needs further refinement. + join_hint: + table: tabBank Account Subtype + 'on': account_subtype = tabBank Account Subtype.name + - name: disabled + fieldtype: Check + label: Disabled + description: Whether the bank account is inactive and no longer available for + transactions or selection + - name: is_default + fieldtype: Check + label: Is Default Account + description: Whether this bank account is automatically selected as the primary + account for payments and receipts + - name: is_company_account + fieldtype: Check + label: Is Company Account + description: Whether the bank account belongs to the company itself rather than + a customer, supplier, or employee + - name: company + fieldtype: Link + label: Company + description: The company that owns or operates this bank account. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: party_type + fieldtype: Link + label: Party Type + description: The type of entity linked to this bank account, such as Customer, + Supplier, or Employee. + join_hint: + table: tabDocType + 'on': party_type = tabDocType.name + - name: party + fieldtype: Dynamic Link + label: Party + description: The specific entity (customer, supplier, employee, etc.) associated + with this bank account. + - name: iban + fieldtype: Data + label: IBAN + description: International Bank Account Number for cross-border payments and international + banking transactions + - name: branch_code + fieldtype: Data + label: Branch Code + description: Bank branch identifier for routing domestic transactions to specific + branch locations + - name: bank_account_no + fieldtype: Data + label: Bank Account No + description: Local bank account number for domestic banking operations and internal + account identification + - name: integration_id + fieldtype: Data + label: Integration ID + description: Identifier linking this bank account to an external banking system + or financial institution integration. + - name: last_integration_date + fieldtype: Date + label: Last Integration Date + description: Most recent date when bank account data was synchronized or updated + from the connected external system. + - name: mask + fieldtype: Data + label: Mask + description: Partially hidden or obscured bank account number showing only last + few digits for security purposes. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Bank Account document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabBank Account Subtype + description: '' + fields: + - name: account_subtype + fieldtype: Data + label: Account Subtype + description: Specific classification or category of the bank account within its + broader account type + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Bank Account Subtype document (master/transaction). Use + only for single-entity lookups, not cross-record comparison unless fields are + per-relationship (e.g. supplier, price_list).' +- table: tabBank Account Type + description: '' + fields: + - name: account_type + fieldtype: Data + label: Account Type + description: Classification of the bank account such as savings, checking, or + current account + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Bank Account Type document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabBank Clearance Detail + description: '' + fields: + - name: payment_document + fieldtype: Link + label: Payment Document + description: Links to the source payment document being cleared, used when investigating + which invoices, expense claims, or payment vouchers are included in bank reconciliation. + join_hint: + table: tabDocType + 'on': payment_document = tabDocType.name + - name: payment_entry + fieldtype: Dynamic Link + label: Payment Entry + description: References the payment entry transaction being reconciled, used when + matching bank statement lines to actual payment records or tracking clearance + status of outgoing payments. + - name: against_account + fieldtype: Data + label: Against Account + description: The account being reconciled or matched against in the bank clearance + transaction, such as the ledger account corresponding to the bank entry. + - name: amount + fieldtype: Data + label: Amount + description: The monetary value of the transaction being cleared or reconciled + in the bank clearance process. + - name: posting_date + fieldtype: Date + label: Posting Date + description: The date when the bank clearance transaction was recorded in the + accounting system. + - name: cheque_number + fieldtype: Data + label: Cheque Number + description: Identifies the specific cheque being cleared, used when tracking + or reconciling individual cheque transactions. + - name: cheque_date + fieldtype: Date + label: Cheque Date + description: Date the cheque was issued or written, used when searching for cheques + by their original issuance date rather than when they cleared. + - name: clearance_date + fieldtype: Date + label: Clearance Date + description: Date the cheque was actually cleared by the bank, used when reconciling + bank statements or finding when funds were actually debited. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabBank Clearance + Detail). Comparison-ready across parent records.' +- table: tabBank Guarantee + description: '' + fields: + - name: bg_type + fieldtype: Select + label: Bank Guarantee Type + description: Category of bank guarantee such as performance guarantee, bid bond, + advance payment guarantee, or financial guarantee + options: + - Receiving + - Providing + - name: reference_doctype + fieldtype: Link + label: Reference Document Type + description: Type of source document linked to this bank guarantee such as Sales + Order, Purchase Order, or Project + join_hint: + table: tabDocType + 'on': reference_doctype = tabDocType.name + - name: reference_docname + fieldtype: Dynamic Link + label: Reference Document Name + description: The document ID or name of the transaction (like sales order, purchase + order, or contract) that this bank guarantee secures or relates to. + - name: customer + fieldtype: Link + label: Customer + description: The customer for whom this bank guarantee is issued, typically when + the company provides a performance or payment guarantee to a client. + join_hint: + table: tabCustomer + 'on': customer = tabCustomer.name + - name: supplier + fieldtype: Link + label: Supplier + description: The supplier who issued this bank guarantee to the company, typically + when a vendor provides a guarantee for their performance or advance payment. + join_hint: + table: tabSupplier + 'on': supplier = tabSupplier.name + - name: project + fieldtype: Link + label: Project + description: The project for which the bank guarantee is issued or associated + with. + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: amount + fieldtype: Currency + label: Amount + description: The monetary value or sum of the bank guarantee. + - name: start_date + fieldtype: Date + label: Start Date + description: The date when the bank guarantee becomes effective or valid. + - name: validity + fieldtype: Int + label: Validity in Days + description: Duration period or number of days the bank guarantee remains valid + from its start date. + - name: end_date + fieldtype: Date + label: End Date + description: Expiration date when the bank guarantee terminates and is no longer + enforceable. + - name: bank + fieldtype: Link + label: Bank + description: Financial institution that issued or underwrites the bank guarantee. + join_hint: + table: tabBank + 'on': bank = tabBank.name + - name: bank_account + fieldtype: Link + label: Bank Account + description: The bank account from which the bank guarantee is issued or secured, + used when identifying the guaranteeing bank relationship. + join_hint: + table: tabBank Account + 'on': bank_account = tabBank Account.name + - name: account + fieldtype: Link + label: Account + description: The general ledger account for recording bank guarantee transactions + and liabilities in financial statements. + join_hint: + table: tabAccount + 'on': account = tabAccount.name + - name: bank_account_no + fieldtype: Data + label: Bank Account No + description: The specific account number at the bank associated with the guarantee, + used when referencing exact banking details or account identifiers. + - name: iban + fieldtype: Data + label: IBAN + description: International Bank Account Number for the bank guarantee account + used in cross-border transactions and international banking operations. + - name: branch_code + fieldtype: Data + label: Branch Code + description: Specific bank branch identifier where the bank guarantee was issued + or is maintained. + - name: swift_number + fieldtype: Data + label: SWIFT number + description: Bank Identifier Code (BIC/SWIFT) for international wire transfers + and identifying the financial institution in the bank guarantee. + - name: more_information + fieldtype: Text Editor + label: Clauses and Conditions + description: Additional notes or details about the bank guarantee terms, conditions, + or special instructions. + - name: bank_guarantee_number + fieldtype: Data + label: Bank Guarantee Number + description: Unique identifier assigned by the bank to this specific guarantee + instrument. + - name: name_of_beneficiary + fieldtype: Data + label: Name of Beneficiary + description: Party or entity entitled to claim payment under the bank guarantee. + - name: margin_money + fieldtype: Currency + label: Margin Money + description: Amount of collateral or security deposit provided to the bank for + issuing the bank guarantee. + - name: charges + fieldtype: Currency + label: Charges Incurred + description: Fees or commission charged by the bank for issuing and maintaining + the bank guarantee. + - name: fixed_deposit_number + fieldtype: Data + label: Fixed Deposit Number + description: Reference number of the fixed deposit pledged as security for the + bank guarantee. + - name: amended_from + fieldtype: Link + label: Amended From + description: Links to the original bank guarantee document that this amended version + replaces or modifies. + join_hint: + table: tabBank Guarantee + 'on': amended_from = tabBank Guarantee.name + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Bank Guarantee document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabBank Statement Import + description: '' + fields: + - name: company + fieldtype: Link + label: Company + description: Company entity associated with this bank statement import + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: bank_account + fieldtype: Link + label: Bank Account + description: Specific bank account from which the statement data was imported + join_hint: + table: tabBank Account + 'on': bank_account = tabBank Account.name + - name: bank + fieldtype: Link + label: Bank + description: The bank account from which the statement is being imported. + join_hint: + table: tabBank + 'on': bank = tabBank.name + - name: custom_delimiters + fieldtype: Check + label: Custom delimiters + description: User-defined separator characters used to parse imported bank statement + files when standard delimiters don't apply. + - name: delimiter_options + fieldtype: Data + label: Delimiter options + description: Available separator character choices (comma, tab, semicolon, etc.) + for parsing the imported bank statement file format. + - name: google_sheets_url + fieldtype: Data + label: Import from Google Sheets + description: URL of the Google Sheets document containing bank transactions to + import into the system. + - name: status + fieldtype: Select + label: Status + description: Current processing state of the bank statement import (pending, completed, + failed, or in progress). + options: + - Pending + - Success + - Partial Success + - Error + - name: template_options + fieldtype: Code + label: Template Options + description: Configuration settings or mapping rules that define how columns in + the import file correspond to transaction fields. + - name: template_warnings + fieldtype: Code + label: Template Warnings + description: Warnings or validation messages generated during bank statement import + template processing. + - name: show_failed_logs + fieldtype: Check + label: Show Failed Logs + description: Controls visibility of failed transaction logs during bank statement + import review. + - name: reference_doctype + fieldtype: Link + label: Document Type + description: The document type that imported bank statement transactions are linked + to or reconciled against. + join_hint: + table: tabDocType + 'on': reference_doctype = tabDocType.name + - name: import_type + fieldtype: Select + label: Import Type + description: Specifies the format or method of the bank statement being imported + (e.g., CSV, OFX, manual entry). + options: + - Insert New Records + - Update Existing Records + - name: submit_after_import + fieldtype: Check + label: Submit After Import + description: Indicates whether the imported bank statement should be automatically + submitted for processing after import completion. + - name: mute_emails + fieldtype: Check + label: Don't Send Emails + description: Controls whether email notifications are suppressed during or after + the bank statement import process. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Bank Statement Import document (master/transaction). Use + only for single-entity lookups, not cross-record comparison unless fields are + per-relationship (e.g. supplier, price_list).' +- table: tabBank Transaction + description: '' + fields: + - name: naming_series + fieldtype: Select + label: Series + description: Prefix pattern used to auto-generate transaction names or reference + numbers + options: + - ACC-BTN-.YYYY.- + - name: date + fieldtype: Date + label: Date + description: Date when the bank transaction occurred or was recorded + - name: status + fieldtype: Select + label: Status + description: Current state of the bank transaction such as pending, cleared, reconciled, + or cancelled. + options: + - Pending + - Settled + - Unreconciled + - Reconciled + - Cancelled + - name: bank_account + fieldtype: Link + label: Bank Account + description: The specific bank account where this transaction occurred or was + recorded. + join_hint: + table: tabBank Account + 'on': bank_account = tabBank Account.name + - name: company + fieldtype: Link + label: Company + description: The company entity that owns the bank account and to which this transaction + belongs. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: amended_from + fieldtype: Link + label: Amended From + description: References the original bank transaction that was corrected or modified + by this transaction. + join_hint: + table: tabBank Transaction + 'on': amended_from = tabBank Transaction.name + - name: deposit + fieldtype: Currency + label: Deposit + description: Amount of money added to the bank account in this transaction. + - name: withdrawal + fieldtype: Currency + label: Withdrawal + description: Amount of money removed from the bank account in this transaction. + - name: currency + fieldtype: Link + label: Currency + description: Currency code for the transaction amount, used when filtering or + analyzing transactions by monetary denomination. + join_hint: + table: tabCurrency + 'on': currency = tabCurrency.name + - name: description + fieldtype: Small Text + label: Description + description: Textual details or memo about the transaction purpose or nature, + used when searching for specific transaction types or vendors. + - name: reference_number + fieldtype: Small Text + label: Reference Number + description: Unique identifier or check number for the transaction, used when + looking up specific transactions by their reference code. + - name: transaction_id + fieldtype: Data + label: Transaction ID + description: Unique identifier for referencing a specific bank transaction in + queries about transaction details, reconciliation, or audit trails. + - name: transaction_type + fieldtype: Data + label: Transaction Type + description: Category of bank transaction such as deposit, withdrawal, transfer, + or fee, used when filtering or analyzing transactions by their nature. + - name: payment_entries + fieldtype: Table + label: Payment Entries + description: '' + child_hint: + child_table: tabBank Transaction Payments + fieldname: payment_entries + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: payment_entries + - name: allocated_amount + fieldtype: Currency + label: Allocated Amount + description: Amount from the bank transaction that has been matched or reconciled + to invoices, payments, or other accounting documents. + - name: unallocated_amount + fieldtype: Currency + label: Unallocated Amount + description: Amount from the bank transaction that remains unmatched and needs + to be reconciled or assigned to accounting entries. + - name: party_type + fieldtype: Link + label: Party Type + description: Type of entity involved in the transaction such as Customer, Supplier, + Employee, or Shareholder. + join_hint: + table: tabDocType + 'on': party_type = tabDocType.name + - name: party + fieldtype: Dynamic Link + label: Party + description: Internal party (customer/supplier) linked to this transaction when + matched to an invoice or payment. + - name: bank_party_name + fieldtype: Data + label: Party Name/Account Holder (Bank Statement) + description: External party name as it appears on the bank statement from the + bank's records. + - name: bank_party_account_number + fieldtype: Data + label: Party Account No. (Bank Statement) + description: External party's bank account number as shown on the bank statement. + - name: bank_party_iban + fieldtype: Data + label: Party IBAN (Bank Statement) + description: International Bank Account Number of the counterparty involved in + the transaction, used when searching for transactions by recipient or sender + account number. + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Bank Transaction document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabBank Transaction Mapping + description: '' + fields: + - name: bank_transaction_field + fieldtype: Select + label: Field in Bank Transaction + description: Target field in the bank transaction record where imported data will + be mapped. + - name: file_field + fieldtype: Data + label: Column in Bank File + description: Source column name from the imported file that provides data for + the bank transaction field. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabBank Transaction + Mapping). Comparison-ready across parent records.' +- table: tabBank Transaction Payments + description: '' + fields: + - name: payment_document + fieldtype: Link + label: Payment Document + description: Links to the source document being paid (invoice, expense claim, + journal entry), used when identifying which receivable or payable is being settled + by this bank transaction. + join_hint: + table: tabDocType + 'on': payment_document = tabDocType.name + - name: payment_entry + fieldtype: Dynamic Link + label: Payment Entry + description: References the formal payment entry record created in the system, + used when tracing bank transactions back to their corresponding payment vouchers + or reconciling payments with accounting entries. + - name: allocated_amount + fieldtype: Currency + label: Allocated Amount + description: Amount from the bank transaction that has been allocated or matched + to this specific payment entry. + - name: clearance_date + fieldtype: Date + label: Clearance Date + description: Date when the bank transaction payment was cleared or reconciled + in the banking system. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabBank Transaction + Payments). Comparison-ready across parent records.' +- table: tabBatch + description: '' + fields: + - name: disabled + fieldtype: Check + label: Disabled + description: Whether the batch is inactive and cannot be used in transactions + - name: use_batchwise_valuation + fieldtype: Check + label: Use Batch-wise Valuation + description: Whether inventory valuation is calculated separately for this specific + batch rather than aggregated + - name: batch_id + fieldtype: Data + label: Batch ID + description: Unique identifier for a specific production or inventory batch used + when tracking lot numbers or batch-specific information. + - name: item + fieldtype: Link + label: Item + description: Item code or SKU associated with this batch used when querying which + product a batch contains. + join_hint: + table: tabItem + 'on': item = tabItem.name + - name: item_name + fieldtype: Data + label: Item Name + description: Human-readable product name for the item in this batch used when + searching batches by product description rather than code. + - name: parent_batch + fieldtype: Link + label: Parent Batch + description: Identifies the source or originating batch from which this batch + was derived or split. + join_hint: + table: tabBatch + 'on': parent_batch = tabBatch.name + - name: manufacturing_date + fieldtype: Date + label: Manufacturing Date + description: The date when the batch was produced or manufactured. + - name: batch_qty + fieldtype: Float + label: Batch Quantity + description: The quantity of items or units contained in this batch. + - name: stock_uom + fieldtype: Link + label: Batch UOM + description: Unit of measurement for inventory quantities in this batch, relevant + when users ask about batch quantities, stock levels, or unit conversions. + join_hint: + table: tabUOM + 'on': stock_uom = tabUOM.name + - name: expiry_date + fieldtype: Date + label: Expiry Date + description: Date when the batch expires or becomes unusable, relevant when users + ask about expired inventory, shelf life, or batches nearing expiration. + - name: supplier + fieldtype: Link + label: Supplier + description: Vendor or supplier who provided this batch, relevant when users ask + about batch sourcing, supplier-specific inventory, or tracing product origins. + join_hint: + table: tabSupplier + 'on': supplier = tabSupplier.name + - name: reference_doctype + fieldtype: Link + label: Source Document Type + description: Type of document this batch is linked to, such as Purchase Receipt + or Stock Entry, used when tracing batch origin or transactions. + join_hint: + table: tabDocType + 'on': reference_doctype = tabDocType.name + - name: reference_name + fieldtype: Dynamic Link + label: Source Document Name + description: Specific document ID this batch was created from, used when finding + which receipt or entry generated a particular batch. + - name: description + fieldtype: Small Text + label: Batch Description + description: Free-text notes or details about the batch characteristics, quality, + or special handling instructions. + - name: qty_to_produce + fieldtype: Float + label: Qty To Produce + description: Target quantity planned for manufacturing in this batch. + - name: produced_qty + fieldtype: Float + label: Produced Qty + description: Actual quantity completed or manufactured from this batch. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Batch document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabBin + description: '' + fields: + - name: item_code + fieldtype: Link + label: Item Code + description: The product or material identifier stored in this bin location + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: warehouse + fieldtype: Link + label: Warehouse + description: The warehouse facility where this bin is physically located + join_hint: + table: tabWarehouse + 'on': warehouse = tabWarehouse.name + - name: actual_qty + fieldtype: Float + label: Actual Qty + description: Current physical quantity of items available in the bin for inventory + checks and stock availability queries + - name: planned_qty + fieldtype: Float + label: Planned Qty + description: Quantity expected to be in the bin after pending stock entries or + transfers are completed + - name: indented_qty + fieldtype: Float + label: Requested Qty + description: Quantity requested or reserved through material requests that will + reduce available stock + - name: ordered_qty + fieldtype: Float + label: Ordered Qty + description: Quantity of items on purchase orders not yet received into this bin. + - name: projected_qty + fieldtype: Float + label: Projected Qty + description: Future available quantity accounting for current stock plus incoming + orders minus reservations and commitments. + - name: reserved_qty + fieldtype: Float + label: Reserved Qty + description: Quantity allocated or reserved for specific sales orders, work orders, + or customer commitments that cannot be used elsewhere. + - name: reserved_qty_for_production + fieldtype: Float + label: Reserved Qty for Production + description: Quantity allocated for manufacturing orders or work orders that cannot + be used for other purposes. + - name: reserved_qty_for_sub_contract + fieldtype: Float + label: Reserved Qty for Subcontract + description: Quantity set aside for subcontracting operations where external vendors + perform manufacturing work. + - name: reserved_qty_for_production_plan + fieldtype: Float + label: Reserved Qty for Production Plan + description: Quantity reserved for planned production activities that have not + yet been converted to firm manufacturing orders. + - name: reserved_stock + fieldtype: Float + label: Reserved Stock + description: Quantity of stock allocated or committed for pending orders, sales, + or production that cannot be used for new transactions. + - name: stock_uom + fieldtype: Link + label: UOM + description: Unit of measurement used for tracking inventory quantities in this + bin, such as pieces, kilograms, or liters. + join_hint: + table: tabUOM + 'on': stock_uom = tabUOM.name + - name: valuation_rate + fieldtype: Float + label: Valuation Rate + description: Per-unit cost or value assigned to inventory in this bin for accounting + and financial reporting purposes. + - name: stock_value + fieldtype: Float + label: Stock Value + description: Monetary value of inventory currently stored in this bin location, + used when analyzing warehouse asset worth or bin-level inventory valuation. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Bin document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabBisect Nodes + description: '' + fields: + - name: root + fieldtype: Link + label: Root + description: Identifies the top-level parent node in a hierarchical bisect structure + join_hint: + table: tabBisect Nodes + 'on': root = tabBisect Nodes.name + - name: left_child + fieldtype: Link + label: Left Child + description: References the left branch node in a binary tree traversal or bisection + hierarchy + join_hint: + table: tabBisect Nodes + 'on': left_child = tabBisect Nodes.name + - name: right_child + fieldtype: Link + label: Right Child + description: References the right branch node in a hierarchical bisect structure + for navigating organizational or data tree relationships. + join_hint: + table: tabBisect Nodes + 'on': right_child = tabBisect Nodes.name + - name: period_from_date + fieldtype: Datetime + label: Period_from_date + description: Start date of the time period or date range covered by this bisect + node. + - name: period_to_date + fieldtype: Datetime + label: Period To Date + description: End date of the time period or date range covered by this bisect + node. + - name: difference + fieldtype: Float + label: Difference + description: Variance or delta between two compared values in the bisect analysis. + - name: balance_sheet_summary + fieldtype: Float + label: Balance Sheet Summary + description: Aggregated balance sheet data used when analyzing asset, liability, + or equity discrepancies. + - name: profit_loss_summary + fieldtype: Float + label: Profit and Loss Summary + description: Aggregated income statement data used when analyzing revenue, expense, + or net income discrepancies. + - name: generated + fieldtype: Check + label: Generated + description: Indicates whether the bisect node was automatically created by the + system or manually defined by a user. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Bisect Nodes document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabBlanket Order + description: '' + fields: + - name: naming_series + fieldtype: Select + label: Series + description: Prefix pattern that determines how blanket order names are automatically + formatted and numbered + options: + - MFG-BLR-.YYYY.- + - name: blanket_order_type + fieldtype: Select + label: Order Type + description: Indicates whether the blanket order is for purchasing from suppliers + or selling to customers + options: + - Selling + - Purchasing + - name: customer + fieldtype: Link + label: Customer + description: Customer account identifier for blanket orders sold to a customer. + join_hint: + table: tabCustomer + 'on': customer = tabCustomer.name + - name: customer_name + fieldtype: Data + label: Customer Name + description: Customer's display name for blanket orders sold to a customer. + - name: supplier + fieldtype: Link + label: Supplier + description: Supplier account identifier for blanket orders purchased from a supplier. + join_hint: + table: tabSupplier + 'on': supplier = tabSupplier.name + - name: supplier_name + fieldtype: Data + label: Supplier Name + description: Vendor or supplier providing goods or services under this blanket + purchase agreement. + - name: order_no + fieldtype: Data + label: Order No + description: Unique identifier for the blanket order used to reference or track + the agreement. + - name: order_date + fieldtype: Date + label: Order Date + description: Date when the blanket order agreement was created or established. + - name: from_date + fieldtype: Date + label: From Date + description: Start date of the blanket order validity period for querying when + coverage begins. + - name: to_date + fieldtype: Date + label: To Date + description: End date of the blanket order validity period for querying when coverage + expires. + - name: company + fieldtype: Link + label: Company + description: Company entity associated with the blanket order for filtering orders + by organizational unit. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: items + fieldtype: Table + label: Item + description: '' + child_hint: + child_table: tabBlanket Order Item + fieldname: items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: items + - name: amended_from + fieldtype: Link + label: Amended From + description: References the original blanket order document that this current + version amends or replaces. + join_hint: + table: tabBlanket Order + 'on': amended_from = tabBlanket Order.name + - name: tc_name + fieldtype: Link + label: Terms + description: The terms and conditions template applied to this blanket order for + contractual agreements. + join_hint: + table: tabTerms and Conditions + 'on': tc_name = tabTerms and Conditions.name + - name: terms + fieldtype: Text Editor + label: Terms and Conditions Details + description: Payment terms negotiated for the blanket order, such as net 30 or + payment on delivery. + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Blanket Order document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabBlanket Order Item + description: '' + fields: + - name: item_code + fieldtype: Link + label: Item Code + description: SKU or product code for the item on the blanket order + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: item_name + fieldtype: Data + label: Item Name + description: Descriptive product name for the item on the blanket order + - name: party_item_code + fieldtype: Data + label: Party Item Code + description: The customer's or supplier's own product code or SKU for this blanket + order item, used when matching external item references. + - name: qty + fieldtype: Float + label: Quantity + description: The total quantity committed or agreed upon for this item in the + blanket order. + - name: rate + fieldtype: Currency + label: Rate + description: The unit price agreed upon for this blanket order item. + - name: ordered_qty + fieldtype: Float + label: Ordered Quantity + description: Quantity of items ordered under this blanket order line for matching + questions about total committed volumes or order quantities. + - name: terms_and_conditions + fieldtype: Text + label: Terms and Conditions + description: Legal terms, payment conditions, delivery requirements, or contractual + clauses governing this blanket order item for questions about agreement terms + or contract conditions. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabBlanket Order + Item). Comparison-ready across parent records.' +- table: tabBlock Module + description: '' + fields: + - name: module + fieldtype: Data + label: Module + description: ERP module name this block belongs to (e.g., Accounts, HR, Sales), + used to filter blocks by functional area. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabBlock Module). + Comparison-ready across parent records.' +- table: tabBlog Category + description: '' + fields: + - name: published + fieldtype: Check + label: Published + description: Flag indicating if the category is live and visible on the website. + - name: title + fieldtype: Data + label: Title + description: Display name of the blog category shown to website visitors. + - name: description + fieldtype: Small Text + label: Description + description: Explanatory text describing the blog category's content scope. + - name: route + fieldtype: Data + label: Route + description: URL path segment used to access this category on the website. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Blog Category document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabBlog Post + description: '' + fields: + - name: title + fieldtype: Data + label: Title + description: Blog post headline used for searching, displaying, and identifying + content. + - name: blog_category + fieldtype: Link + label: Blog Category + description: Category classification used to filter and group blog posts by topic. + join_hint: + table: tabBlog Category + 'on': blog_category = tabBlog Category.name + - name: blogger + fieldtype: Link + label: Blogger + description: Author or contributor reference used to filter posts by writer. + join_hint: + table: tabBlogger + 'on': blogger = tabBlogger.name + - name: route + fieldtype: Data + label: Route + description: URL path used for web routing and generating blog post links. + - name: read_time + fieldtype: Int + label: Read Time + description: Estimated reading duration used to display time commitment to readers. + - name: published_on + fieldtype: Date + label: Published On + description: Publication date used to filter, sort, and display when content went + live. + - name: published + fieldtype: Check + label: Published + description: Indicates if the blog post is live and visible to readers, used to + filter active content in reports and public queries. + - name: featured + fieldtype: Check + label: Featured + description: Marks high-priority posts for homepage or promotional placement, + used when identifying spotlight content for campaigns. + - name: hide_cta + fieldtype: Check + label: Hide CTA + description: Controls whether call-to-action elements display on the post, relevant + when analyzing conversion-optimized versus informational content. + - name: enable_email_notification + fieldtype: Check + label: Enable Email Notification + description: Determines if subscribers receive alerts for this post, used to track + which content triggers email campaigns. + - name: disable_comments + fieldtype: Check + label: Disable Comments + description: Indicates if reader comments are blocked, used when filtering posts + by engagement settings or moderation requirements. + - name: disable_likes + fieldtype: Check + label: Disable Likes + description: Shows if like/reaction functionality is turned off, relevant for + analyzing engagement feature availability across posts. + - name: blog_intro + fieldtype: Small Text + label: Blog Intro + description: Contains the summary or excerpt text, used when searching for posts + by preview content or generating content snippets. + - name: content_type + fieldtype: Select + label: Content Type + description: Specifies the format or category of the post, used to segment and + filter content by type in analytics and searches. + options: + - Markdown + - Rich Text + - HTML + - name: content + fieldtype: Text Editor + label: Content + description: Stores the main body text in raw format, used for full-text search + and content analysis queries. + - name: email_sent + fieldtype: Check + label: Email Sent + description: Tracks whether notification emails were dispatched for this post, + used in email campaign reporting and delivery verification. + - name: meta_title + fieldtype: Data + label: Meta Title + description: Stores the SEO title tag content, used when optimizing or searching + posts by search engine metadata. + - name: meta_description + fieldtype: Small Text + label: Meta Description + description: Contains the SEO description tag, used for search optimization analysis + and metadata-based content queries. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Blog Post document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabBlogger + description: '' + fields: + - name: disabled + fieldtype: Check + label: Disabled + description: Flag indicating if blogger is inactive, used to filter out deactivated + bloggers from active lists. + - name: short_name + fieldtype: Data + label: Short Name + description: Abbreviated blogger name for display in compact views or dropdown + selections. + - name: full_name + fieldtype: Data + label: Full Name + description: Complete name of the blogger, used for formal displays and searching + by author name. + - name: user + fieldtype: Link + label: User + description: Linked system user account for the blogger, used to connect blog + posts to user permissions. + join_hint: + table: tabUser + 'on': user = tabUser.name + - name: bio + fieldtype: Small Text + label: Bio + description: Blogger biography text, used when displaying author information or + searching by expertise. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Blogger document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabBranch + description: '' + fields: + - name: branch + fieldtype: Data + label: Branch + description: The actual branch name or code representing a physical or organizational + location, used for location-based reporting and filtering. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Branch document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabBrand + description: '' + fields: + - name: brand + fieldtype: Data + label: Brand Name + description: The actual brand name or label, used when filtering products, sales, + or inventory by brand. + - name: description + fieldtype: Text + label: Description + description: Detailed text about the brand, used when searching for brand information + or displaying brand details. + - name: brand_defaults + fieldtype: Table + label: Brand Defaults + description: '' + child_hint: + child_table: tabItem Default + fieldname: brand_defaults + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: brand_defaults + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Brand document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabBudget + description: '' + fields: + - name: naming_series + fieldtype: Select + label: Series + description: Prefix pattern used to generate the budget identifier code + options: + - BUDGET-.YYYY.- + - name: budget_against + fieldtype: Select + label: Budget Against + description: Entity type the budget is allocated for, such as Cost Center or Project + options: + - Cost Center + - Project + - name: company + fieldtype: Link + label: Company + description: Identifies which company entity the budget belongs to in multi-company + environments. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: cost_center + fieldtype: Link + label: Cost Center + description: Identifies the department or organizational unit responsible for + the budget allocation. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + - name: project + fieldtype: Link + label: Project + description: Links the budget to a specific project for project-based budget tracking + and analysis. + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: fiscal_year + fieldtype: Link + label: Fiscal Year + description: The fiscal year period this budget applies to, used when filtering + or comparing budgets across different years. + join_hint: + table: tabFiscal Year + 'on': fiscal_year = tabFiscal Year.name + - name: monthly_distribution + fieldtype: Link + label: Monthly Distribution + description: Breakdown of budget amounts allocated across individual months within + the fiscal year. + join_hint: + table: tabMonthly Distribution + 'on': monthly_distribution = tabMonthly Distribution.name + - name: amended_from + fieldtype: Link + label: Amended From + description: Reference to the original budget document that this budget revises + or replaces, used to track budget revision history. + join_hint: + table: tabBudget + 'on': amended_from = tabBudget.name + - name: applicable_on_material_request + fieldtype: Check + label: Applicable on Material Request + description: Whether this budget applies to and controls spending on material + requests. + - name: action_if_annual_budget_exceeded_on_mr + fieldtype: Select + label: Action if Annual Budget Exceeded on MR + description: What happens when a material request would exceed the annual budget + limit (warn, stop, or ignore). + options: + - Stop + - Warn + - Ignore + - name: action_if_accumulated_monthly_budget_exceeded_on_mr + fieldtype: Select + label: Action if Accumulated Monthly Budget Exceeded on MR + description: What happens when a material request would exceed the accumulated + monthly budget limit (warn, stop, or ignore). + options: + - Stop + - Warn + - Ignore + - name: applicable_on_purchase_order + fieldtype: Check + label: Applicable on Purchase Order + description: Whether this budget applies to and controls purchase order transactions. + - name: action_if_annual_budget_exceeded_on_po + fieldtype: Select + label: Action if Annual Budget Exceeded on PO + description: What happens when a purchase order would exceed the annual budget + limit (ignore, warn, or stop). + options: + - Stop + - Warn + - Ignore + - name: action_if_accumulated_monthly_budget_exceeded_on_po + fieldtype: Select + label: Action if Accumulated Monthly Budget Exceeded on PO + description: What happens when a purchase order would exceed the cumulative monthly + budget limit (ignore, warn, or stop). + options: + - Stop + - Warn + - Ignore + - name: applicable_on_booking_actual_expenses + fieldtype: Check + label: Applicable on booking actual expenses + description: Whether this budget applies when recording actual expense transactions, + used to determine if budget controls activate during expense entry. + - name: action_if_annual_budget_exceeded + fieldtype: Select + label: Action if Annual Budget Exceeded on Actual + description: What happens when total spending exceeds the yearly budget limit, + such as blocking transactions, warning users, or allowing overruns. + options: + - Stop + - Warn + - Ignore + - name: action_if_accumulated_monthly_budget_exceeded + fieldtype: Select + label: Action if Accumulated Monthly Budget Exceeded on Actual + description: What happens when cumulative monthly spending exceeds the accumulated + monthly budget threshold, controlling whether transactions are stopped, warned, + or permitted. + options: + - Stop + - Warn + - Ignore + - name: accounts + fieldtype: Table + label: Budget Accounts + description: '' + child_hint: + child_table: tabBudget Account + fieldname: accounts + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: accounts + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Budget document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabBudget Account + description: '' + fields: + - name: account + fieldtype: Link + label: Account + description: General ledger account code or identifier that this budget is allocated + to + join_hint: + table: tabAccount + 'on': account = tabAccount.name + - name: budget_amount + fieldtype: Currency + label: Budget Amount + description: Planned or allocated monetary amount for this budget account + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabBudget Account). + Comparison-ready across parent records.' +- table: tabBulk Transaction Log Detail + description: '' + fields: + - name: from_doctype + fieldtype: Link + label: From Doctype + description: Source document type from which this bulk transaction originated. + join_hint: + table: tabDocType + 'on': from_doctype = tabDocType.name + - name: transaction_name + fieldtype: Dynamic Link + label: Name + description: Name or identifier of the specific transaction processed in this + bulk operation. + - name: date + fieldtype: Date + label: 'Date ' + description: Date when this individual transaction within the bulk operation was + executed. + - name: time + fieldtype: Time + label: Time + description: Time when this individual transaction within the bulk operation was + executed. + - name: transaction_status + fieldtype: Data + label: Status + description: Current status of this individual transaction indicating success, + failure, or pending state. + - name: error_description + fieldtype: Long Text + label: Error Description + description: Detailed error message explaining why this transaction failed during + bulk processing. + - name: to_doctype + fieldtype: Link + label: To Doctype + description: Identifies the target document type when users need to analyze bulk + transaction destinations or filter operations by the type of records being created + or updated. + join_hint: + table: tabDocType + 'on': to_doctype = tabDocType.name + - name: retried + fieldtype: Int + label: Retried + description: Indicates whether a failed bulk transaction was retried, used when + investigating error resolution patterns or identifying transactions that required + multiple processing attempts. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Bulk Transaction Log Detail document (master/transaction). + Use only for single-entity lookups, not cross-record comparison unless fields + are per-relationship (e.g. supplier, price_list).' +- table: tabCRM Note + description: '' + fields: + - name: note + fieldtype: Text Editor + label: Note + description: Full text content or body of the CRM note + - name: added_by + fieldtype: Link + label: Added By + description: User or employee who created or authored the CRM note + join_hint: + table: tabUser + 'on': added_by = tabUser.name + - name: added_on + fieldtype: Datetime + label: Added On + description: Date and time when the CRM note was created or first added to the + system + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabCRM Note). Comparison-ready + across parent records.' +- table: tabCalendar View + description: '' + fields: + - name: reference_doctype + fieldtype: Link + label: Reference Document Type + description: Target DocType that this calendar displays (e.g., Event, Task), used + to identify which business objects are visualized. + join_hint: + table: tabDocType + 'on': reference_doctype = tabDocType.name + - name: subject_field + fieldtype: Select + label: Subject Field + description: Field from reference DocType shown as calendar entry title, used + to determine what text appears on calendar items. + - name: start_date_field + fieldtype: Select + label: Start Date Field + description: Field from reference DocType containing start date/time, essential + for positioning entries on calendar timeline. + - name: end_date_field + fieldtype: Select + label: End Date Field + description: Field from reference DocType containing end date/time, used to determine + duration and span of calendar entries. + - name: all_day + fieldtype: Check + label: All Day + description: Boolean indicating if calendar entries default to all-day events, + affects time-based filtering and display logic. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Calendar View document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabCall Log + description: '' + fields: + - name: id + fieldtype: Data + label: ID + description: System-generated unique identifier for the call record, used for + internal database operations. + - name: from + fieldtype: Data + label: From + description: Phone number or contact identifier of the caller, used to identify + who initiated the call. + - name: to + fieldtype: Data + label: To + description: Phone number or contact identifier of the call recipient, used to + identify who received the call. + - name: call_received_by + fieldtype: Link + label: Call Received By + description: Name or identifier of the person who answered the call, used for + tracking call handling responsibility. + join_hint: + table: tabEmployee + 'on': call_received_by = tabEmployee.name + - name: employee_user_id + fieldtype: Link + label: Employee User Id + description: Employee user ID linked to the call, used to associate calls with + specific staff members for performance tracking. + join_hint: + table: tabUser + 'on': employee_user_id = tabUser.name + - name: medium + fieldtype: Data + label: Medium + description: Communication channel used for the call such as phone or VoIP, used + to analyze preferred contact methods. + - name: start_time + fieldtype: Datetime + label: Start Time + description: Used to filter calls by when they began or analyze call timing patterns + during specific business hours or date ranges. + - name: end_time + fieldtype: Datetime + label: End Time + description: Used to determine when calls concluded or calculate time-based metrics + for call completion analysis. + - name: type + fieldtype: Select + label: Type + description: Used to categorize and filter calls by their classification or purpose + in business operations. + options: + - Incoming + - Outgoing + - name: customer + fieldtype: Link + label: Customer + description: Used to identify which customer account or contact the call is associated + with for customer-specific analysis. + join_hint: + table: tabCustomer + 'on': customer = tabCustomer.name + - name: status + fieldtype: Select + label: Status + description: Used to filter calls by their current state such as completed, missed, + or in-progress for workflow tracking. + options: + - Ringing + - In Progress + - Completed + - Failed + - Busy + - No Answer + - Queued + - Canceled + - name: duration + fieldtype: Duration + label: Duration + description: Used to measure call length in reports, calculate average handling + time, or identify unusually long or short calls. + - name: recording_url + fieldtype: Data + label: Recording URL + description: Used to access the audio recording of the call for quality review + or compliance purposes. + - name: type_of_call + fieldtype: Link + label: Type Of Call + description: Used to distinguish between inbound, outbound, or internal calls + for directional call volume analysis. + join_hint: + table: tabTelephony Call Type + 'on': type_of_call = tabTelephony Call Type.name + - name: summary + fieldtype: Small Text + label: Summary + description: Used to search call content or understand call outcomes without listening + to full recordings. + - name: links + fieldtype: Table + label: Links + description: '' + child_hint: + child_table: tabDynamic Link + fieldname: links + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: links + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Call Log document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabCampaign + description: Keep Track of Sales Campaigns. Keep track of Leads, Quotations, Sales + Order etc from Campaigns to gauge Return on Investment. + fields: + - name: campaign_name + fieldtype: Data + label: Campaign Name + description: The marketing or business name of the campaign, used when searching + for campaigns by their display title or promotional label. + - name: naming_series + fieldtype: Select + label: Naming Series + description: The prefix pattern used to generate campaign identifiers, relevant + when filtering campaigns by their numbering scheme or organizational convention. + options: + - SAL-CAM-.YYYY.- + - name: campaign_schedules + fieldtype: Table + label: Campaign Schedules + description: '' + child_hint: + child_table: tabCampaign Email Schedule + fieldname: campaign_schedules + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: campaign_schedules + - name: description + fieldtype: Text + label: Description + description: Detailed explanation of the campaign's purpose, goals, target audience, + or messaging strategy. + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Campaign document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabCampaign Email Schedule + description: '' + fields: + - name: email_template + fieldtype: Link + label: Email Template + description: Template used for the email content in this campaign schedule + join_hint: + table: tabEmail Template + 'on': email_template = tabEmail Template.name + - name: send_after_days + fieldtype: Int + label: Send After (days) + description: Number of days to wait before sending this campaign email + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabCampaign Email + Schedule). Comparison-ready across parent records.' +- table: tabCampaign Item + description: '' + fields: + - name: campaign + fieldtype: Link + label: Campaign + description: Reference to the parent marketing campaign that this item belongs + to + join_hint: + table: tabCampaign + 'on': campaign = tabCampaign.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabCampaign Item). + Comparison-ready across parent records.' +- table: tabCashier Closing + description: '' + fields: + - name: naming_series + fieldtype: Select + label: Series + description: Prefix pattern used to auto-generate the cashier closing document + name + options: + - POS-CLO- + - name: user + fieldtype: Link + label: User + description: Cashier or employee who performed the cash register closing + join_hint: + table: tabUser + 'on': user = tabUser.name + - name: date + fieldtype: Date + label: Date + description: Date of the cashier closing event or shift reconciliation. + - name: from_time + fieldtype: Time + label: From Time + description: Start time of the cashier shift or period being closed. + - name: time + fieldtype: Time + label: To Time + description: End time when the cashier closing was completed or recorded. + - name: expense + fieldtype: Float + label: Expense + description: Amount of cash paid out for expenses during the cashier shift or + closing period. + - name: custody + fieldtype: Float + label: Custody + description: Cash amount held in custody or safekeeping, typically representing + funds set aside or reserved from the cashier drawer. + - name: returns + fieldtype: Float + label: Returns + description: Total value of cash refunds or returns processed during the cashier + closing period. + - name: outstanding_amount + fieldtype: Float + label: Outstanding Amount + description: Amount remaining unpaid or uncollected at the time of cashier closing. + - name: payments + fieldtype: Table + label: Payments + description: '' + child_hint: + child_table: tabCashier Closing Payments + fieldname: payments + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: payments + - name: net_amount + fieldtype: Float + label: Net Amount + description: Final calculated amount after reconciling payments and outstanding + balances for the cashier closing. + - name: amended_from + fieldtype: Link + label: Amended From + description: Links to the original cashier closing document that this amended + version replaces or corrects. + join_hint: + table: tabCashier Closing + 'on': amended_from = tabCashier Closing.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Cashier Closing document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabCashier Closing Payments + description: '' + fields: + - name: mode_of_payment + fieldtype: Link + label: Mode of Payment + description: Payment method used for the transaction, queried when analyzing payment + type distribution or reconciling cash versus card payments + join_hint: + table: tabMode of Payment + 'on': mode_of_payment = tabMode of Payment.name + - name: amount + fieldtype: Float + label: Amount + description: Monetary value of the payment, used when calculating total collections, + variances, or reconciling cashier closing balances + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabCashier Closing + Payments). Comparison-ready across parent records.' +- table: tabChangelog Feed + description: '' + fields: + - name: title + fieldtype: Data + label: Title + description: Human-readable title of the change event, used when searching or + displaying what changed. + - name: app_name + fieldtype: Data + label: App Name + description: Application or module name where the change occurred, used to filter + changes by system area. + - name: link + fieldtype: Long Text + label: Link + description: Reference URL or document link related to the change, used to navigate + to affected records. + - name: posting_timestamp + fieldtype: Datetime + label: Posting Timestamp + description: Official timestamp when the change was posted, used for accurate + chronological reporting and audit trails. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Changelog Feed document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabCheque Print Template + description: '' + fields: + - name: has_print_format + fieldtype: Check + label: Has Print Format + description: Indicates whether this cheque template has an associated custom print + format configured for rendering the cheque + - name: bank_name + fieldtype: Data + label: Bank Name + description: Name of the bank for which this cheque template is designed, used + when filtering or selecting templates for specific banking institutions + - name: cheque_size + fieldtype: Select + label: Cheque Size + description: Standard cheque paper size format used when printing cheques from + this template. + options: + - Regular + - A4 + - name: starting_position_from_top_edge + fieldtype: Float + label: Starting position from top edge + description: Vertical offset distance from the top edge of the paper where cheque + printing begins. + - name: cheque_width + fieldtype: Float + label: Cheque Width + description: Horizontal width dimension of the cheque on the printed template. + - name: cheque_height + fieldtype: Float + label: Cheque Height + description: Physical height dimension of the printed cheque template for layout + and printing configuration. + - name: is_account_payable + fieldtype: Check + label: Is Account Payable + description: Indicates whether this cheque template is designated for accounts + payable transactions versus other payment types. + - name: acc_pay_dist_from_top_edge + fieldtype: Float + label: Distance from top edge + description: Vertical distance from the top edge of the cheque to where the accounts + payable amount should be printed. + - name: acc_pay_dist_from_left_edge + fieldtype: Float + label: Distance from left edge + description: Distance in measurement units from the left edge of the cheque to + where the payee account number prints. + - name: message_to_show + fieldtype: Data + label: Message to show + description: Custom message or memo text that appears on the printed cheque. + - name: date_dist_from_top_edge + fieldtype: Float + label: Distance from top edge + description: Distance in measurement units from the top edge of the cheque to + where the date prints. + - name: date_dist_from_left_edge + fieldtype: Float + label: Starting location from left edge + description: Horizontal position in millimeters or inches from the left edge of + the cheque where the date should be printed. + - name: payer_name_from_top_edge + fieldtype: Float + label: Distance from top edge + description: Vertical position in millimeters or inches from the top edge of the + cheque where the payer name should be printed. + - name: payer_name_from_left_edge + fieldtype: Float + label: Starting location from left edge + description: Horizontal position in millimeters or inches from the left edge of + the cheque where the payer name should be printed. + - name: amt_in_words_from_top_edge + fieldtype: Float + label: Distance from top edge + description: Vertical position measurement from the top of the cheque where the + amount in words should be printed. + - name: amt_in_words_from_left_edge + fieldtype: Float + label: Starting location from left edge + description: Horizontal position measurement from the left edge of the cheque + where the amount in words should be printed. + - name: amt_in_word_width + fieldtype: Float + label: Width of amount in word + description: Maximum width allocated for printing the amount in words on the cheque. + - name: amt_in_words_line_spacing + fieldtype: Float + label: Line spacing for amount in words + description: Vertical spacing between lines when printing the cheque amount in + words across multiple lines. + - name: amt_in_figures_from_top_edge + fieldtype: Float + label: Distance from top edge + description: Distance from the top edge of the cheque to where the numeric amount + is printed. + - name: amt_in_figures_from_left_edge + fieldtype: Float + label: Starting location from left edge + description: Distance from the left edge of the cheque to where the numeric amount + is printed. + - name: acc_no_dist_from_top_edge + fieldtype: Float + label: Distance from top edge + description: Vertical spacing from top of cheque to where account number prints, + used when positioning account number on printed cheques. + - name: acc_no_dist_from_left_edge + fieldtype: Float + label: Starting location from left edge + description: Horizontal spacing from left edge of cheque to where account number + prints, used when positioning account number on printed cheques. + - name: signatory_from_top_edge + fieldtype: Float + label: Distance from top edge + description: Vertical spacing from top of cheque to where signature line or signatory + name prints, used when positioning signature area on printed cheques. + - name: signatory_from_left_edge + fieldtype: Float + label: Starting location from left edge + description: Horizontal position measurement for placing the signatory signature + or name on a printed cheque, measured from the left edge of the cheque. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Cheque Print Template document (master/transaction). Use + only for single-entity lookups, not cross-record comparison unless fields are + per-relationship (e.g. supplier, price_list).' +- table: tabClient Script + description: '' + fields: + - name: dt + fieldtype: Link + label: DocType + description: Target doctype where this client script executes, used to find all + scripts affecting a specific form or module. + join_hint: + table: tabDocType + 'on': dt = tabDocType.name + - name: view + fieldtype: Select + label: Apply To + description: Form view type where the script runs (Form, List, etc.), used to + filter scripts by interface context. + options: + - List + - Form + - name: module + fieldtype: Link + label: Module (for export) + description: ERP module this client script belongs to, used for organizing and + filtering scripts by functional area. + join_hint: + table: tabModule Def + 'on': module = tabModule Def.name + - name: enabled + fieldtype: Check + label: Enabled + description: Boolean flag indicating if the client script is active, used to filter + only operational automation rules. + - name: script + fieldtype: Code + label: Script + description: JavaScript code that executes on the client side, used when analyzing + or debugging form behavior and validations. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Client Script document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabClosed Document + description: '' + fields: + - name: document_type + fieldtype: Link + label: Document Type + description: Category or type of the closed document such as invoice, purchase + order, or sales order + join_hint: + table: tabDocType + 'on': document_type = tabDocType.name + - name: closed + fieldtype: Check + label: Closed + description: Indicates whether the document has been finalized and locked from + further modifications + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabClosed Document). + Comparison-ready across parent records.' +- table: tabClosing Stock Balance + description: '' + fields: + - name: naming_series + fieldtype: Select + label: Naming Series + description: Prefix pattern used to generate the closing stock balance record + name + options: + - CBAL-.##### + - name: company + fieldtype: Link + label: Company + description: Company entity to which this closing stock balance belongs + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: status + fieldtype: Select + label: Status + description: Current state of the closing stock balance record, such as draft, + submitted, or cancelled. + options: + - Draft + - Queued + - In Progress + - Completed + - Failed + - Canceled + - name: from_date + fieldtype: Date + label: From Date + description: Start date of the period for which the closing stock balance is calculated. + - name: to_date + fieldtype: Date + label: To Date + description: End date of the period for which the closing stock balance is calculated. + - name: item_code + fieldtype: Link + label: Item Code + description: Unique identifier for the specific product or material whose closing + stock balance is being tracked. + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: item_group + fieldtype: Link + label: Item Group + description: Category or classification of the item, used when querying stock + balances by product type or family. + join_hint: + table: tabItem Group + 'on': item_group = tabItem Group.name + - name: include_uom + fieldtype: Link + label: Include UOM + description: Unit of measurement for the stock quantity, relevant when users need + to know whether stock is measured in pieces, kilograms, liters, or other units. + join_hint: + table: tabUOM + 'on': include_uom = tabUOM.name + - name: warehouse + fieldtype: Link + label: Warehouse + description: The specific warehouse location where the closing stock balance is + recorded. + join_hint: + table: tabWarehouse + 'on': warehouse = tabWarehouse.name + - name: warehouse_type + fieldtype: Link + label: Warehouse Type + description: The category or classification of the warehouse (e.g., finished goods, + raw materials, transit) for the closing stock balance. + join_hint: + table: tabWarehouse Type + 'on': warehouse_type = tabWarehouse Type.name + - name: amended_from + fieldtype: Link + label: Amended From + description: Reference to the previous closing stock balance document that this + record corrects or replaces. + join_hint: + table: tabClosing Stock Balance + 'on': amended_from = tabClosing Stock Balance.name + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Closing Stock Balance document (master/transaction). Use + only for single-entity lookups, not cross-record comparison unless fields are + per-relationship (e.g. supplier, price_list).' +- table: tabCode List + description: '' + fields: + - name: title + fieldtype: Data + label: Title + description: Human-readable name of the code list, used for searching and displaying + code list options. + - name: canonical_uri + fieldtype: Data + label: Canonical URI + description: Standard URI identifier for the code list, used when integrating + with external systems or standards. + - name: url + fieldtype: Data + label: URL + description: Web address or reference link for the code list, used to access external + code list definitions. + - name: default_common_code + fieldtype: Link + label: Default Common Code + description: Default code value from this list, used when auto-populating fields + or setting standard defaults. + join_hint: + table: tabCommon Code + 'on': default_common_code = tabCommon Code.name + - name: version + fieldtype: Data + label: Version + description: Version number of the code list, used to track updates and ensure + correct code list version is applied. + - name: publisher + fieldtype: Data + label: Publisher + description: Organization or entity that published the code list, used for filtering + by authoritative source. + - name: publisher_id + fieldtype: Data + label: Publisher ID + description: Identifies the organization or entity that publishes and maintains + the code list, used when filtering or grouping codes by their authoritative + source. + - name: description + fieldtype: Small Text + label: Description + description: Provides the human-readable meaning or definition of a code value, + used when users need to understand what a code represents or search for codes + by their business meaning. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Code List document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabColor + description: '' + fields: [] + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Color document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabComment + description: '' + fields: + - name: comment_type + fieldtype: Select + label: Comment Type + description: Classification of comment (e.g., Comment, Info, Workflow), used to + filter by comment purpose or system vs user comments. + options: + - Comment + - Like + - Info + - Label + - Workflow + - Created + - Submitted + - Cancelled + - Updated + - Deleted + - Assigned + - Assignment Completed + - Attachment + - Attachment Removed + - Shared + - Unshared + - Bot + - Relinked + - Edit + - name: comment_email + fieldtype: Data + label: Comment Email + description: Email address associated with the comment, used when comments originate + from email communications or external users. + - name: subject + fieldtype: Text + label: Subject + description: Comment subject or title, used for searching comment topics and displaying + comment summaries. + - name: comment_by + fieldtype: Data + label: Comment By + description: Name or identifier of the person making the comment, used for attribution + and filtering by commenter. + - name: published + fieldtype: Check + label: Published + description: Flag indicating if comment is visible to external users, used to + filter public vs internal comments. + - name: seen + fieldtype: Check + label: Seen + description: Flag indicating if comment has been read by relevant users, used + to identify unread or pending comments. + - name: reference_doctype + fieldtype: Link + label: Reference Document Type + description: Identifies the type of document being commented on, used to filter + comments by module or entity type. + join_hint: + table: tabDocType + 'on': reference_doctype = tabDocType.name + - name: reference_name + fieldtype: Dynamic Link + label: Reference Name + description: Links to the specific document instance being commented on, used + to retrieve all comments for a particular record. + - name: reference_owner + fieldtype: Data + label: Reference Owner + description: Tracks who owns the document being commented on, used for filtering + comments by document ownership or responsibility. + - name: ip_address + fieldtype: Data + label: IP Address + description: Records the IP address from which the comment was submitted, used + for security auditing and tracking comment sources. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Comment document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabCommon Code + description: '' + fields: + - name: code_list + fieldtype: Link + label: Code List + description: Category or grouping identifier that classifies which standardized + code list this entry belongs to. + join_hint: + table: tabCode List + 'on': code_list = tabCode List.name + - name: canonical_uri + fieldtype: Data + label: Canonical URI + description: Standardized URI reference for external code system integration and + cross-system mapping. + - name: title + fieldtype: Data + label: Title + description: Human-readable label for the common code, used in display and search + scenarios. + - name: common_code + fieldtype: Data + label: Common Code + description: The actual standardized code value used for data validation, mapping, + and business logic. + - name: description + fieldtype: Small Text + label: Description + description: Detailed explanation of what the common code represents, used for + understanding code meaning and usage. + - name: additional_data + fieldtype: Code + label: Additional Data + description: Supplementary JSON or text data for extended attributes not covered + by standard fields. + - name: applies_to + fieldtype: Table + label: Applies To + description: '' + child_hint: + child_table: tabDynamic Link + fieldname: applies_to + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: applies_to + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Common Code document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabCommunication + description: '' + fields: + - name: subject + fieldtype: Small Text + label: Subject + description: Communication subject line or title, used when searching for specific + topics or conversation threads. + - name: communication_medium + fieldtype: Select + label: Type + description: Channel type (Email, Phone, Chat, Meeting) used to analyze interaction + methods and communication preferences. + options: + - Email + - Chat + - Phone + - SMS + - Event + - Meeting + - Visit + - Other + - name: sender + fieldtype: Data + label: From + description: Email address or identifier of the person who sent the communication, + used for tracking outbound vs inbound messages. + - name: recipients + fieldtype: Code + label: To + description: Primary recipient email addresses, used when identifying who received + communications or analyzing customer touchpoints. + - name: cc + fieldtype: Code + label: CC + description: Carbon copy recipients, used when tracking stakeholders included + in communications for visibility. + - name: bcc + fieldtype: Code + label: BCC + description: Blind carbon copy recipients, used when analyzing hidden recipients + or compliance tracking. + - name: phone_no + fieldtype: Data + label: Phone No. + description: Used to filter communications by recipient or sender phone number + for SMS or call tracking queries. + - name: delivery_status + fieldtype: Select + label: Delivery Status + description: Used to check whether emails, SMS, or notifications were successfully + delivered or failed. + options: + - Sent + - Bounced + - Opened + - Marked As Spam + - Rejected + - Delayed + - Soft-Bounced + - Clicked + - Recipient Unsubscribed + - Error + - Expired + - Sending + - Read + - Scheduled + - name: content + fieldtype: Text Editor + label: Message + description: Used to search full message body including HTML formatting when analyzing + communication details or keywords. + - name: text_content + fieldtype: Code + label: Text Content + description: Used to search plain text version of messages for keyword matching + without HTML markup. + - name: communication_type + fieldtype: Select + label: Communication Type + description: Used to filter by channel such as Email, SMS, Call, or Chat when + analyzing communication methods. + options: + - Communication + - Comment + - Chat + - Notification + - Feedback + - Automated Message + - name: comment_type + fieldtype: Select + label: Comment Type + description: Used to distinguish between standard comments, system-generated notes, + or workflow-related annotations. + options: + - Comment + - Like + - Info + - Label + - Workflow + - Created + - Submitted + - Cancelled + - Updated + - Deleted + - Assigned + - Assignment Completed + - Attachment + - Attachment Removed + - Shared + - Unshared + - Relinked + - name: status + fieldtype: Select + label: Status + description: Used to filter communications by lifecycle state such as Open, Replied, + Closed, or Pending. + options: + - Open + - Replied + - Closed + - Linked + - name: sent_or_received + fieldtype: Select + label: Sent or Received + description: Used to separate outbound versus inbound communications for directional + analysis. + options: + - Sent + - Received + - name: communication_date + fieldtype: Datetime + label: Date + description: Used to filter communications by timestamp for date range queries + and chronological analysis. + - name: read_receipt + fieldtype: Check + label: Sent Read Receipt + description: Used to determine if read confirmation was requested for tracking + message acknowledgment requirements. + - name: send_after + fieldtype: Datetime + label: Send After + description: Used to identify scheduled or delayed communications that are queued + for future delivery. + - name: sender_full_name + fieldtype: Data + label: From Full Name + description: Used to filter or group communications by the person who initiated + the message. + - name: read_by_recipient + fieldtype: Check + label: Read by Recipient + description: Used to verify whether the recipient has opened or acknowledged the + communication. + - name: read_by_recipient_on + fieldtype: Datetime + label: Read by Recipient On + description: Used to track exact timestamp when recipient opened the message for + response time analysis. + - name: reference_doctype + fieldtype: Link + label: Reference Document Type + description: Used to link communications back to source documents like Sales Order, + Customer, or Support Ticket. + join_hint: + table: tabDocType + 'on': reference_doctype = tabDocType.name + - name: reference_name + fieldtype: Dynamic Link + label: Reference Name + description: Identifies the linked document or transaction this communication + relates to, used when tracking correspondence about specific sales orders, invoices, + or support tickets. + - name: email_account + fieldtype: Link + label: Email Account + description: Indicates which company email account sent or received this message, + used when filtering communications by department inbox or shared mailbox. + join_hint: + table: tabEmail Account + 'on': email_account = tabEmail Account.name + - name: company + fieldtype: Link + label: Company + description: Links the communication to a specific customer or vendor organization, + used when analyzing all correspondence history with a business partner. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: in_reply_to + fieldtype: Link + label: In Reply To + description: References the parent message ID in an email thread, used when reconstructing + conversation chains or tracking response times. + join_hint: + table: tabCommunication + 'on': in_reply_to = tabCommunication.name + - name: user + fieldtype: Link + label: User + description: Identifies the system user who created or is assigned to this communication + record, used when measuring individual response activity or workload distribution. + join_hint: + table: tabUser + 'on': user = tabUser.name + - name: email_template + fieldtype: Link + label: Email Template + description: Indicates which predefined template was used to generate this message, + used when analyzing effectiveness of standardized communication formats. + join_hint: + table: tabEmail Template + 'on': email_template = tabEmail Template.name + - name: unread_notification_sent + fieldtype: Check + label: Unread Notification Sent + description: Tracks whether an alert was sent to notify users of this unread message, + used to prevent duplicate notifications in workflow automation. + - name: seen + fieldtype: Check + label: Seen + description: Flags whether the communication has been viewed by the assigned user, + used when identifying pending items requiring attention or follow-up. + - name: _user_tags + fieldtype: Data + label: User Tags + description: Stores custom labels applied by users for categorization, used when + filtering communications by topic, priority, or custom workflow stages. + - name: timeline_links + fieldtype: Table + label: Timeline Links + description: '' + child_hint: + child_table: tabCommunication Link + fieldname: timeline_links + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: timeline_links + - name: message_id + fieldtype: Small Text + label: Message ID + description: Contains the unique email header identifier from the mail server, + used when preventing duplicate imports or matching replies to original messages. + - name: uid + fieldtype: Int + label: UID + description: Stores the IMAP server's unique identifier for this email, used during + synchronization to track which messages have already been fetched. + - name: imap_folder + fieldtype: Data + label: IMAP Folder + description: Indicates which mailbox folder contains this email on the server, + used when organizing communications by inbox, sent items, or custom folders. + - name: email_status + fieldtype: Select + label: Email Status + description: Tracks the delivery state of outbound emails such as sent, bounced, + or failed, used when monitoring communication success rates and identifying + delivery issues. + options: + - Open + - Spam + - Trash + - name: has_attachment + fieldtype: Check + label: Has Attachment + description: Indicates whether files or documents were attached to the communication, + used to filter communications with supporting materials or documentation. + - name: rating + fieldtype: Int + label: Rating + description: Stores the quality or satisfaction score assigned to the communication, + used to analyze communication effectiveness and customer satisfaction trends. + - name: feedback_request + fieldtype: Data + label: Feedback Request + description: Flags whether the communication included a request for customer or + recipient feedback, used to track feedback solicitation efforts and response + rates. + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Communication document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabCommunication Link + description: '' + fields: + - name: link_doctype + fieldtype: Link + label: Link DocType + description: Document type being linked to the communication record. + join_hint: + table: tabDocType + 'on': link_doctype = tabDocType.name + - name: link_name + fieldtype: Dynamic Link + label: Link Name + description: Specific document ID of the linked record in the communication. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabCommunication + Link). Comparison-ready across parent records.' +- table: tabCommunication Medium + description: '' + fields: + - name: communication_channel + fieldtype: Select + label: Communication Channel + description: The specific channel identifier (email, phone, chat) used to route + and categorize customer interactions. + - name: communication_medium_type + fieldtype: Select + label: Communication Medium Type + description: Classification of the medium (inbound, outbound, both) used to determine + message flow direction and routing rules. + options: + - Voice + - Email + - Chat + - name: catch_all + fieldtype: Link + label: Catch All + description: Flag indicating if this medium handles unmatched communications, + used for default routing and fallback scenarios. + join_hint: + table: tabEmployee Group + 'on': catch_all = tabEmployee Group.name + - name: provider + fieldtype: Link + label: Provider + description: Third-party service provider name used for integration setup and + vendor-specific communication routing. + join_hint: + table: tabSupplier + 'on': provider = tabSupplier.name + - name: disabled + fieldtype: Check + label: Disabled + description: Active status flag used to exclude inactive communication mediums + from routing and selection options. + - name: timeslots + fieldtype: Table + label: Timeslots + description: '' + child_hint: + child_table: tabCommunication Medium Timeslot + fieldname: timeslots + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: timeslots + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Communication Medium document (master/transaction). Use + only for single-entity lookups, not cross-record comparison unless fields are + per-relationship (e.g. supplier, price_list).' +- table: tabCommunication Medium Timeslot + description: '' + fields: + - name: day_of_week + fieldtype: Select + label: Day of Week + description: Specific day when this communication channel is available for contact. + options: + - Monday + - Tuesday + - Wednesday + - Thursday + - Friday + - Saturday + - Sunday + - name: from_time + fieldtype: Time + label: From Time + description: Start time when communication is permitted through this medium on + the specified day. + - name: to_time + fieldtype: Time + label: To Time + description: End time when communication availability closes for this medium on + the specified day. + - name: employee_group + fieldtype: Link + label: Employee Group + description: Group of employees for whom this timeslot applies or who manage communications + during this period. + join_hint: + table: tabEmployee Group + 'on': employee_group = tabEmployee Group.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabCommunication + Medium Timeslot). Comparison-ready across parent records.' +- table: tabCompany + description: '' + fields: + - name: company_name + fieldtype: Data + label: Company + description: Official company name used in reports, transactions, and legal documents + across all modules. + - name: abbr + fieldtype: Data + label: Abbr + description: Company abbreviation prefix used in account codes, naming series, + and cross-company transaction identification. + - name: default_currency + fieldtype: Link + label: Default Currency + description: Primary currency for financial transactions, used in multi-currency + reporting and exchange rate queries. + join_hint: + table: tabCurrency + 'on': default_currency = tabCurrency.name + - name: country + fieldtype: Link + label: Country + description: Company's country of operation, used for tax calculations, compliance + reporting, and localization rules. + join_hint: + table: tabCountry + 'on': country = tabCountry.name + - name: is_group + fieldtype: Check + label: Is Group + description: Indicates if this is a parent company in a group structure, used + for consolidated reporting and hierarchical queries. + - name: default_holiday_list + fieldtype: Link + label: Default Holiday List + description: Standard holiday calendar for the company, used in leave management, + payroll, and delivery date calculations. + join_hint: + table: tabHoliday List + 'on': default_holiday_list = tabHoliday List.name + - name: custom__company_name_in_arabic__ + fieldtype: Data + label: ' Company name in Arabic ' + description: Arabic translation of company name, used for bilingual documents + and regional compliance in Arabic-speaking markets. + - name: custom_registration_type + fieldtype: Select + label: ZATCA - Registration Type + description: Type of business registration (LLC, corporation, etc.), used for + legal reporting and tax classification. + options: + - CRN + - MOM + - MLS + - '700' + - SAG + - OTH + - name: custom_company_registration + fieldtype: Data + label: ZATCA - Registration Number + description: Official registration number, used for tax filings, invoices, and + government compliance documents. + - name: custom_zatca__location_for_csr_configuratoin + fieldtype: Data + label: ZATCA- Location for CSR Configuratoin + description: ZATCA e-invoicing location identifier for Saudi Arabia, used in tax + authority integration and CSR certificate generation. + - name: custom_zatca__company_category_for_csr_configuration + fieldtype: Data + label: ZATCA - Company category for CSR Configuration + description: Used when configuring ZATCA e-invoicing compliance settings or determining + CSR certificate requirements for Saudi Arabian tax authorities. + - name: default_letter_head + fieldtype: Link + label: Default Letter Head + description: Used when generating printed documents, reports, or official correspondence + to determine which company letterhead template to apply. + join_hint: + table: tabLetter Head + 'on': default_letter_head = tabLetter Head.name + - name: tax_id + fieldtype: Data + label: Tax ID + description: Used when filtering transactions by tax registration number, validating + tax compliance, or reporting to tax authorities. + - name: domain + fieldtype: Data + label: Domain + description: Used when filtering companies by industry sector or business vertical + for segmented analysis and reporting. + - name: date_of_establishment + fieldtype: Date + label: Date of Establishment + description: Used when calculating company age, analyzing historical performance + trends, or filtering by business maturity. + - name: parent_company + fieldtype: Link + label: Parent Company + description: Used when analyzing corporate hierarchies, consolidating group financials, + or filtering subsidiaries by parent organization. + join_hint: + table: tabCompany + 'on': parent_company = tabCompany.name + - name: date_of_incorporation + fieldtype: Date + label: Date of Incorporation + description: Used when determining legal entity age, compliance requirements based + on incorporation date, or regulatory reporting timelines. + - name: phone_no + fieldtype: Data + label: Phone No + description: Used when retrieving company contact information for communication, + vendor management, or customer service purposes. + - name: email + fieldtype: Data + label: Email + description: Used when sending automated notifications, official correspondence, + or retrieving primary company contact details. + - name: company_description + fieldtype: Text Editor + label: Company Description + description: Used when searching for companies by business activities, services + offered, or operational characteristics. + - name: date_of_commencement + fieldtype: Date + label: Date of Commencement + description: Used when calculating operational history, determining business start + date for accounting periods, or analyzing time-to-operation metrics. + - name: fax + fieldtype: Data + label: Fax + description: Used when legacy communication methods are required or retrieving + alternative contact channels for formal documentation. + - name: website + fieldtype: Data + label: Website + description: Used when accessing company online presence, validating vendor legitimacy, + or retrieving digital contact information. + - name: registration_details + fieldtype: Code + label: Registration Details + description: Used when verifying legal registration information, compliance documentation, + or regulatory filing requirements. + - name: lft + fieldtype: Int + label: Lft + description: Used for nested set model queries to efficiently retrieve company + hierarchies and organizational tree structures. + - name: rgt + fieldtype: Int + label: Rgt + description: Right boundary value in nested set model for company hierarchy traversal + and organizational structure queries. + - name: old_parent + fieldtype: Data + label: old_parent + description: Tracks previous parent company before reorganization for audit trail + and historical hierarchy analysis. + - name: create_chart_of_accounts_based_on + fieldtype: Select + label: Create Chart Of Accounts Based On + description: Template source for initializing chart of accounts when setting up + a new company. + options: + - Standard Template + - Existing Company + - name: existing_company + fieldtype: Link + label: 'Existing Company ' + description: Reference company to copy chart of accounts from during new company + setup. + join_hint: + table: tabCompany + 'on': existing_company = tabCompany.name + - name: chart_of_accounts + fieldtype: Select + label: Chart Of Accounts Template + description: Selected accounting framework template that defines the company's + account structure and classification. + - name: default_bank_account + fieldtype: Link + label: Default Bank Account + description: Primary bank account used for automatic bank transaction posting + and cash management operations. + join_hint: + table: tabAccount + 'on': default_bank_account = tabAccount.name + - name: default_cash_account + fieldtype: Link + label: Default Cash Account + description: Primary cash account used for petty cash transactions and cash-based + payment entries. + join_hint: + table: tabAccount + 'on': default_cash_account = tabAccount.name + - name: default_receivable_account + fieldtype: Link + label: Default Receivable Account + description: Default account for recording customer invoices and tracking amounts + owed to the company. + join_hint: + table: tabAccount + 'on': default_receivable_account = tabAccount.name + - name: default_payable_account + fieldtype: Link + label: Default Payable Account + description: Default account for recording supplier bills and tracking amounts + the company owes. + join_hint: + table: tabAccount + 'on': default_payable_account = tabAccount.name + - name: write_off_account + fieldtype: Link + label: Write Off Account + description: Account used for recording bad debts and invoice amount write-offs + when payments are uncollectible. + join_hint: + table: tabAccount + 'on': write_off_account = tabAccount.name + - name: unrealized_profit_loss_account + fieldtype: Link + label: Unrealized Profit / Loss Account + description: Account for tracking foreign exchange gains or losses not yet realized + through settlement. + join_hint: + table: tabAccount + 'on': unrealized_profit_loss_account = tabAccount.name + - name: allow_account_creation_against_child_company + fieldtype: Check + label: Allow Account Creation Against Child Company + description: Permission flag that enables creating GL accounts directly under + subsidiary companies in the hierarchy. + - name: default_expense_account + fieldtype: Link + label: Default Cost of Goods Sold Account + description: Fallback account for posting expense transactions when no specific + expense account is specified. + join_hint: + table: tabAccount + 'on': default_expense_account = tabAccount.name + - name: default_income_account + fieldtype: Link + label: Default Income Account + description: Fallback account for posting revenue transactions when no specific + income account is specified. + join_hint: + table: tabAccount + 'on': default_income_account = tabAccount.name + - name: default_discount_account + fieldtype: Link + label: Default Payment Discount Account + description: Account used for recording discounts given to customers or received + from suppliers. + join_hint: + table: tabAccount + 'on': default_discount_account = tabAccount.name + - name: payment_terms + fieldtype: Link + label: Default Payment Terms Template + description: Used when analyzing standard payment conditions or credit terms applied + to customer and supplier transactions for this company. + join_hint: + table: tabPayment Terms Template + 'on': payment_terms = tabPayment Terms Template.name + - name: cost_center + fieldtype: Link + label: Default Cost Center + description: Used when identifying the default cost center for expense allocation + and financial reporting at the company level. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + - name: default_finance_book + fieldtype: Link + label: Default Finance Book + description: Used when determining which finance book to apply for multi-book + accounting or regulatory reporting requirements. + join_hint: + table: tabFinance Book + 'on': default_finance_book = tabFinance Book.name + - name: exchange_gain_loss_account + fieldtype: Link + label: Exchange Gain / Loss Account + description: Used when tracking realized foreign exchange gains or losses from + settled multi-currency transactions. + join_hint: + table: tabAccount + 'on': exchange_gain_loss_account = tabAccount.name + - name: unrealized_exchange_gain_loss_account + fieldtype: Link + label: Unrealized Exchange Gain/Loss Account + description: Used when recording unrealized foreign exchange gains or losses from + open foreign currency positions at period end. + join_hint: + table: tabAccount + 'on': unrealized_exchange_gain_loss_account = tabAccount.name + - name: round_off_account + fieldtype: Link + label: Round Off Account + description: Used when posting minor rounding differences that occur during invoice + calculations and payment processing. + join_hint: + table: tabAccount + 'on': round_off_account = tabAccount.name + - name: round_off_cost_center + fieldtype: Link + label: Round Off Cost Center + description: Used when allocating rounding adjustment amounts to a specific cost + center for expense tracking purposes. + join_hint: + table: tabCost Center + 'on': round_off_cost_center = tabCost Center.name + - name: round_off_for_opening + fieldtype: Link + label: Round Off for Opening + description: Used when determining whether to apply rounding adjustments to opening + balance entries during period initialization. + join_hint: + table: tabAccount + 'on': round_off_for_opening = tabAccount.name + - name: default_deferred_revenue_account + fieldtype: Link + label: Default Deferred Revenue Account + description: Used when automatically posting unearned revenue for advance billing + or subscription-based revenue recognition scenarios. + join_hint: + table: tabAccount + 'on': default_deferred_revenue_account = tabAccount.name + - name: default_deferred_expense_account + fieldtype: Link + label: Default Deferred Expense Account + description: Used when automatically posting prepaid expenses or costs that need + to be amortized over future periods. + join_hint: + table: tabAccount + 'on': default_deferred_expense_account = tabAccount.name + - name: book_advance_payments_in_separate_party_account + fieldtype: Check + label: Book Advance Payments in Separate Party Account + description: Used when determining whether advance payments from customers or + to suppliers are tracked in dedicated accounts separate from regular receivables + or payables. + - name: reconcile_on_advance_payment_date + fieldtype: Check + label: Reconcile on Advance Payment Date + description: Used when configuring whether advance payment reconciliation occurs + on the payment date rather than invoice date. + - name: reconciliation_takes_effect_on + fieldtype: Select + label: Reconciliation Takes Effect On + description: Used when determining the effective date for reconciling payments + against invoices in accounts receivable and payable processes. + options: + - Advance Payment Date + - Oldest Of Invoice Or Advance + - Reconciliation Date + - name: default_advance_received_account + fieldtype: Link + label: Default Advance Received Account + description: Used when automatically posting customer advance payments or deposits + received before invoice issuance. + join_hint: + table: tabAccount + 'on': default_advance_received_account = tabAccount.name + - name: default_advance_paid_account + fieldtype: Link + label: Default Advance Paid Account + description: Used when automatically posting supplier advance payments or deposits + made before receiving goods or invoices. + join_hint: + table: tabAccount + 'on': default_advance_paid_account = tabAccount.name + - name: auto_exchange_rate_revaluation + fieldtype: Check + label: Auto Create Exchange Rate Revaluation + description: Used when determining if the system should automatically revalue + foreign currency balances due to exchange rate fluctuations. + - name: auto_err_frequency + fieldtype: Select + label: Frequency + description: Used when configuring how often automatic exchange rate revaluation + should run (daily, monthly, etc.). + options: + - Daily + - Weekly + - Monthly + - name: submit_err_jv + fieldtype: Check + label: Submit ERR Journals? + description: Used when deciding if exchange rate revaluation journal vouchers + should be automatically submitted or remain in draft. + - name: exception_budget_approver_role + fieldtype: Link + label: Exception Budget Approver Role + description: Used when identifying which role can approve transactions that exceed + budget limits. + join_hint: + table: tabRole + 'on': exception_budget_approver_role = tabRole.name + - name: accumulated_depreciation_account + fieldtype: Link + label: Accumulated Depreciation Account + description: Used when posting asset depreciation to track the total depreciation + accumulated over an asset's life. + join_hint: + table: tabAccount + 'on': accumulated_depreciation_account = tabAccount.name + - name: depreciation_expense_account + fieldtype: Link + label: Depreciation Expense Account + description: Used when recording periodic depreciation expense for fixed assets + in financial statements. + join_hint: + table: tabAccount + 'on': depreciation_expense_account = tabAccount.name + - name: series_for_depreciation_entry + fieldtype: Data + label: Series for Asset Depreciation Entry (Journal Entry) + description: Used when generating depreciation journal entries to determine the + naming sequence or numbering pattern. + - name: expenses_included_in_asset_valuation + fieldtype: Link + label: Expenses Included In Asset Valuation + description: Used when determining which expense types should be capitalized into + the asset cost rather than expensed immediately. + join_hint: + table: tabAccount + 'on': expenses_included_in_asset_valuation = tabAccount.name + - name: disposal_account + fieldtype: Link + label: Gain/Loss Account on Asset Disposal + description: Used when recording the sale or disposal of fixed assets to capture + gains or losses. + join_hint: + table: tabAccount + 'on': disposal_account = tabAccount.name + - name: depreciation_cost_center + fieldtype: Link + label: Asset Depreciation Cost Center + description: Used when allocating depreciation expenses to a specific cost center + for departmental accounting. + join_hint: + table: tabCost Center + 'on': depreciation_cost_center = tabCost Center.name + - name: capital_work_in_progress_account + fieldtype: Link + label: Capital Work In Progress Account + description: Used when tracking costs of assets under construction or development + before they are ready for use. + join_hint: + table: tabAccount + 'on': capital_work_in_progress_account = tabAccount.name + - name: asset_received_but_not_billed + fieldtype: Link + label: Asset Received But Not Billed + description: Used when recording fixed assets that have been received but for + which supplier invoices have not yet arrived. + join_hint: + table: tabAccount + 'on': asset_received_but_not_billed = tabAccount.name + - name: default_buying_terms + fieldtype: Link + label: Default Buying Terms + description: Used when creating purchase orders to automatically populate standard + payment and delivery terms. + join_hint: + table: tabTerms and Conditions + 'on': default_buying_terms = tabTerms and Conditions.name + - name: sales_monthly_history + fieldtype: Small Text + label: Sales Monthly History + description: Used when analyzing historical monthly sales data for trends, forecasting, + or performance comparison. + - name: monthly_sales_target + fieldtype: Currency + label: Monthly Sales Target + description: Used when tracking sales performance against the company's monthly + revenue goals. + - name: total_monthly_sales + fieldtype: Currency + label: Total Monthly Sales + description: Used to track aggregate monthly revenue performance and compare sales + trends across periods. + - name: default_selling_terms + fieldtype: Link + label: Default Selling Terms + description: Applied when querying standard payment terms or credit conditions + offered to customers at sale. + join_hint: + table: tabTerms and Conditions + 'on': default_selling_terms = tabTerms and Conditions.name + - name: default_warehouse_for_sales_return + fieldtype: Link + label: Default Warehouse for Sales Return + description: Referenced when processing customer returns to determine which warehouse + receives returned inventory. + join_hint: + table: tabWarehouse + 'on': default_warehouse_for_sales_return = tabWarehouse.name + - name: credit_limit + fieldtype: Currency + label: Credit Limit + description: Used to evaluate customer creditworthiness and enforce maximum outstanding + receivables thresholds. + - name: default_expense_claim_payable_account + fieldtype: Link + label: Default Expense Claim Payable Account + description: Applied when posting employee expense reimbursements to determine + the liability account. + join_hint: + table: tabAccount + 'on': default_expense_claim_payable_account = tabAccount.name + - name: default_employee_advance_account + fieldtype: Link + label: Default Employee Advance Account + description: Referenced when recording salary advances or prepayments issued to + employees. + join_hint: + table: tabAccount + 'on': default_employee_advance_account = tabAccount.name + - name: default_payroll_payable_account + fieldtype: Link + label: Default Payroll Payable Account + description: Used when processing payroll to post net salary liabilities before + payment disbursement. + join_hint: + table: tabAccount + 'on': default_payroll_payable_account = tabAccount.name + - name: transactions_annual_history + fieldtype: Code + label: Transactions Annual History + description: Defines retention period when querying historical transaction data + or archiving old records. + - name: enable_perpetual_inventory + fieldtype: Check + label: Enable Perpetual Inventory + description: Determines whether real-time inventory valuation and COGS calculations + are active for stock queries. + - name: enable_provisional_accounting_for_non_stock_items + fieldtype: Check + label: Enable Provisional Accounting For Non Stock Items + description: Controls whether service or non-inventory purchases create temporary + accrual entries before invoicing. + - name: default_inventory_account + fieldtype: Link + label: Default Inventory Account + description: Applied when posting stock receipts or issues to determine the asset + account for inventory valuation. + join_hint: + table: tabAccount + 'on': default_inventory_account = tabAccount.name + - name: stock_adjustment_account + fieldtype: Link + label: Stock Adjustment Account + description: Used when recording inventory write-offs, shrinkage, or quantity + corrections to capture valuation changes. + join_hint: + table: tabAccount + 'on': stock_adjustment_account = tabAccount.name + - name: default_in_transit_warehouse + fieldtype: Link + label: Default In-Transit Warehouse + description: Referenced when tracking goods shipped between locations that haven't + reached destination warehouse. + join_hint: + table: tabWarehouse + 'on': default_in_transit_warehouse = tabWarehouse.name + - name: stock_received_but_not_billed + fieldtype: Link + label: Stock Received But Not Billed + description: Applied when goods are received without supplier invoice to create + accrued liability entries. + join_hint: + table: tabAccount + 'on': stock_received_but_not_billed = tabAccount.name + - name: default_provisional_account + fieldtype: Link + label: Default Provisional Account + description: Used for temporary postings of non-stock item purchases pending final + invoice and expense allocation. + join_hint: + table: tabAccount + 'on': default_provisional_account = tabAccount.name + - name: expenses_included_in_valuation + fieldtype: Link + label: Expenses Included In Valuation + description: Used when determining whether expense costs should be included in + inventory or asset valuation calculations. + join_hint: + table: tabAccount + 'on': expenses_included_in_valuation = tabAccount.name + - name: default_operating_cost_account + fieldtype: Link + label: Default Operating Cost Account + description: Used when posting operational expenses to specify the default general + ledger account for cost allocation. + join_hint: + table: tabAccount + 'on': default_operating_cost_account = tabAccount.name + - name: custom_zatca_invoice_enabled + fieldtype: Check + label: ZATCA invoice enabled + description: Used when checking if Saudi ZATCA e-invoicing integration is activated + for this company. + - name: custom_costcenter + fieldtype: Check + label: Conside Cost-Center as branch. ( If checked- Need to add Branch CRN and + Address in Cost Center ) + description: Used when filtering or reporting financial transactions by the company's + default cost center dimension. + - name: custom_submit_line_item_discount_to_zatca + fieldtype: Check + label: 'POS Submit line item discount to ZATCA( Applicable for POS Only ) ' + description: Used when determining whether individual line discounts should be + transmitted to ZATCA in e-invoice submissions. + - name: custom_phase_1_or_2 + fieldtype: Select + label: Phase 1 or 2 ? + description: Used when identifying which ZATCA e-invoicing compliance phase the + company is operating under. + options: + - Phase-1 + - Phase-2 + - name: custom_send_einvoice_background + fieldtype: Check + label: 'Display ZATCA response on the screen ( Untick for silent submission ) ' + description: Used when determining if e-invoices should be sent to ZATCA asynchronously + in background jobs. + - name: custom_select + fieldtype: Select + label: Select + description: Used when applying a custom selection or classification option specific + to company configuration. + options: + - Simulation + - Sandbox + - Production + - name: custom_send_invoice_to_zatca + fieldtype: Select + label: Send POS invoice to ZATCA + description: Used when checking if invoices from this company should be automatically + transmitted to ZATCA. + options: + - Live + - Batches + - Background + - name: custom_submit_or_not + fieldtype: Check + label: 'If Invoice still in Draft status, submit and send to ZATCA( Applicable + for B2C/POS Invoice only ) ' + description: Used when determining whether documents require submission to external + authorities or systems. + - name: custom_start_time + fieldtype: Time + label: Background submission Start Time + description: Used when defining the company's standard business day or operational + period start time. + - name: custom_end_time + fieldtype: Time + label: Background submission End Time + description: Used when defining the company's standard business day or operational + period end time. + - name: custom_start_time_session + fieldtype: Time + label: Background submission Start Time ( Session-2 ) + description: Used when setting the beginning time for company work sessions or + shift periods. + - name: custom_end_time_session + fieldtype: Time + label: Background submission End Time ( Session-2 ) + description: Used when setting the ending time for company work sessions or shift + periods. + - name: custom_csr_config + fieldtype: Long Text + label: CSR Config + description: Used when retrieving the company's Certificate Signing Request configuration + for ZATCA e-invoicing authentication. + - name: custom_csr_data + fieldtype: Long Text + label: CSR Data + description: Used when retrieving certificate signing request data for e-invoicing + compliance setup and authentication. + - name: custom_attach_xml_with_invoice + fieldtype: Check + label: Attach XML with invoice + description: Used when determining whether to include XML file attachments with + invoice documents during generation or sending. + - name: custom_attach_xml_with_qr_code + fieldtype: Check + label: Attach XML with QR code + description: Used when checking if XML files should be bundled with QR code attachments + on invoices. + - name: custom_attach_qr_code_doctype + fieldtype: Check + label: Attach QR code doctype + description: Used when identifying which document types should automatically include + QR code attachments. + - name: custom_attach_e_invoice_send_status_with_invoice + fieldtype: Check + label: Attach e_invoice send status with invoice + description: Used when tracking whether e-invoice transmission status should be + displayed or attached to invoice records. + - name: custom_pih + fieldtype: Small Text + label: pih + description: Used when retrieving the previous invoice hash for e-invoicing chain + validation and compliance requirements. + - name: custom_private_key + fieldtype: Small Text + label: Private Key + description: Used when accessing cryptographic private key for signing e-invoices + and authentication with tax authorities. + - name: custom_public_key + fieldtype: Small Text + label: public key + description: Used when retrieving public key for e-invoice verification and certificate-based + authentication processes. + - name: custom_certificate + fieldtype: Long Text + label: certificate + description: Used when accessing digital certificate for e-invoicing authentication + and secure transmission to tax portals. + - name: custom_sandbox_url + fieldtype: Data + label: Sandbox URL + description: Used when connecting to testing environment for e-invoicing integration + development and validation. + - name: custom_simulation_url + fieldtype: Data + label: Simulation URL + description: Used when routing e-invoice submissions to simulation environment + for compliance testing before production. + - name: custom_production_url + fieldtype: Data + label: Production URL + description: Used when submitting live e-invoices to the official tax authority + production endpoint. + - name: custom_otp + fieldtype: Data + label: OTP + description: Used when retrieving one-time password for e-invoicing system authentication + and secure API access. + - name: custom_basic_auth_from_csid + fieldtype: Long Text + label: Basic Auth from CSID + description: Used when checking if basic authentication credentials should be + derived from compliance security ID for API calls. + - name: custom_compliance_request_id_ + fieldtype: Small Text + label: 'Compliance request id ' + description: Used when tracking compliance clearance request identifier for e-invoicing + onboarding and approval status. + - name: custom_validation_type + fieldtype: Select + label: Validation Type + description: Specifies the validation method or compliance standard applied to + company transactions, used when filtering companies by regulatory validation + requirements. + options: + - Simplified Invoice + - Standard Invoice + - Simplified Credit Note + - Standard Credit Note + - Simplified Debit Note + - Standard Debit Note + - name: custom_sample_invoice_number_to_test + fieldtype: Data + label: Sample Invoice Number to Test + description: Stores a test invoice number for validation or integration testing + purposes, referenced when troubleshooting invoice processing or API connections. + - name: custom_basic_auth_from_production + fieldtype: Long Text + label: Final Auth CSID + description: Indicates whether basic authentication credentials are sourced from + the production environment, used when auditing security configurations or integration + setups. + - name: custom_zatca_offline_machines + fieldtype: Table + label: ZATCA Offline Machines + description: '' + child_hint: + child_table: tabZatca POS table + fieldname: custom_zatca_offline_machines + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: custom_zatca_offline_machines + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Company document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabCompany History + description: '' + fields: + - name: year + fieldtype: Data + label: Year + description: The year this historical event or milestone occurred for the company. + - name: highlight + fieldtype: Text + label: Highlight + description: Description of the significant event, achievement, or milestone that + occurred in this year. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabCompany History). + Comparison-ready across parent records.' +- table: tabCompetitor + description: '' + fields: + - name: competitor_name + fieldtype: Data + label: Competitor Name + description: Full business name of the competing company + - name: website + fieldtype: Data + label: Website + description: Web address or URL of the competitor's online presence + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Competitor document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabCompetitor Detail + description: '' + fields: + - name: competitor + fieldtype: Link + label: Competitor + description: Specifies the competing company or product being tracked for benchmarking, + market share analysis, and competitive intelligence reporting. + join_hint: + table: tabCompetitor + 'on': competitor = tabCompetitor.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabCompetitor Detail). + Comparison-ready across parent records.' +- table: tabConnected App + description: '' + fields: + - name: provider_name + fieldtype: Data + label: Provider Name + description: Name of the OAuth or SSO provider (e.g., Google, Microsoft) used + to identify the authentication service. + - name: openid_configuration + fieldtype: Data + label: OpenID Configuration + description: URL endpoint for OpenID Connect discovery document used to configure + OAuth authentication parameters. + - name: client_id + fieldtype: Data + label: Client Id + description: OAuth client identifier issued by the provider, required for authenticating + API requests. + - name: redirect_uri + fieldtype: Data + label: Redirect URI + description: Callback URL where the provider sends users after authentication, + used in OAuth flow configuration. + - name: client_secret + fieldtype: Password + label: Client Secret + description: Confidential OAuth credential used to securely authenticate the application + with the provider. + - name: scopes + fieldtype: Table + label: Scopes + description: '' + child_hint: + child_table: tabOAuth Scope + fieldname: scopes + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: scopes + - name: authorization_uri + fieldtype: Small Text + label: Authorization URI + description: Endpoint URL used when initiating OAuth authorization flows to authenticate + users with external connected applications. + - name: token_uri + fieldtype: Data + label: Token URI + description: Endpoint URL used to exchange authorization codes for access tokens + or refresh existing tokens in OAuth integrations. + - name: revocation_uri + fieldtype: Data + label: Revocation URI + description: Endpoint URL used to programmatically revoke access tokens when disconnecting + or deauthorizing connected applications. + - name: userinfo_uri + fieldtype: Data + label: Userinfo URI + description: Endpoint URL used to retrieve authenticated user profile information + from the connected application after successful authorization. + - name: introspection_uri + fieldtype: Data + label: Introspection URI + description: Endpoint URL used to validate token status and retrieve metadata + about active access tokens for security verification. + - name: query_parameters + fieldtype: Table + label: Query Parameters + description: '' + child_hint: + child_table: tabQuery Parameters + fieldname: query_parameters + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: query_parameters + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Connected App document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabConsole Log + description: '' + fields: + - name: script + fieldtype: Code + label: Script + description: The actual script or code that was executed, used when searching + for specific commands or debugging script errors. + - name: type + fieldtype: Data + label: Type + description: Classification of console log entry (error, warning, info), used + to filter by severity when troubleshooting issues. + - name: committed + fieldtype: Check + label: Committed + description: Indicates whether the script execution was committed to database, + used to verify if changes were permanently saved. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Console Log document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabContact + description: '' + fields: + - name: first_name + fieldtype: Data + label: First Name + description: Contact's first name, used for personalized communication and name-based + searches. + - name: middle_name + fieldtype: Data + label: Middle Name + description: Contact's middle name, used for complete name identification and + formal records. + - name: last_name + fieldtype: Data + label: Last Name + description: Contact's last name, used for surname-based searches and formal identification. + - name: full_name + fieldtype: Data + label: Full Name + description: Complete name of contact, used for display purposes and full name + searches. + - name: email_id + fieldtype: Data + label: Email Address + description: Primary email address of contact, used for communication and email-based + contact lookup. + - name: user + fieldtype: Link + label: User Id + description: Linked system user account if contact has portal access, used to + identify contacts with login credentials. + join_hint: + table: tabUser + 'on': user = tabUser.name + - name: address + fieldtype: Link + label: Address + description: Used when searching for contact location, mailing address, or filtering + contacts by geographic region. + join_hint: + table: tabAddress + 'on': address = tabAddress.name + - name: sync_with_google_contacts + fieldtype: Check + label: Sync with Google Contacts + description: Used when determining if a contact should be synchronized with Google + Contacts integration. + - name: status + fieldtype: Select + label: Status + description: Used when filtering active versus inactive contacts or checking contact + availability for communications. + options: + - Passive + - Open + - Replied + - name: salutation + fieldtype: Link + label: Salutation + description: Used when personalizing communications or filtering contacts by formal + title like Mr., Ms., Dr. + join_hint: + table: tabSalutation + 'on': salutation = tabSalutation.name + - name: designation + fieldtype: Data + label: Designation + description: Used when searching for contacts by job title or role within their + organization. + - name: gender + fieldtype: Link + label: Gender + description: Used when segmenting contacts for demographic analysis or personalized + marketing campaigns. + join_hint: + table: tabGender + 'on': gender = tabGender.name + - name: phone + fieldtype: Data + label: Phone + description: Used when retrieving primary phone numbers for contact outreach or + communication purposes. + - name: mobile_no + fieldtype: Data + label: Mobile No + description: Used when finding mobile phone numbers for SMS campaigns or urgent + contact needs. + - name: company_name + fieldtype: Data + label: Company Name + description: Used when searching for contacts affiliated with specific organizations + or filtering by employer. + - name: google_contacts + fieldtype: Link + label: Google Contacts + description: Used when checking if contact data is linked to Google Contacts system. + join_hint: + table: tabGoogle Contacts + 'on': google_contacts = tabGoogle Contacts.name + - name: google_contacts_id + fieldtype: Data + label: Google Contacts Id + description: Used when matching or syncing contact records with specific Google + Contacts entries. + - name: pulled_from_google_contacts + fieldtype: Check + label: Pulled from Google Contacts + description: Used when identifying contacts originally imported from Google Contacts + versus manually created. + - name: email_ids + fieldtype: Table + label: Email IDs + description: '' + child_hint: + child_table: tabContact Email + fieldname: email_ids + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: email_ids + - name: phone_nos + fieldtype: Table + label: Contact Numbers + description: '' + child_hint: + child_table: tabContact Phone + fieldname: phone_nos + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: phone_nos + - name: links + fieldtype: Table + label: Links + description: '' + child_hint: + child_table: tabDynamic Link + fieldname: links + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: links + - name: is_primary_contact + fieldtype: Check + label: Is Primary Contact + description: Used to identify the main point of contact for a customer or account + when routing communications or escalations. + - name: is_billing_contact + fieldtype: Check + label: Is Billing Contact + description: Used to determine who should receive invoices, payment notifications, + and billing-related correspondence. + - name: department + fieldtype: Data + label: Department + description: Used to route inquiries or segment contacts by organizational function + such as Sales, IT, Finance, or Operations. + - name: unsubscribed + fieldtype: Check + label: Unsubscribed + description: Used to filter out contacts who have opted out of marketing emails + or promotional communications for compliance. + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Contact document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabContact Email + description: '' + fields: + - name: email_id + fieldtype: Data + label: Email ID + description: The actual email address value for contacting this person. + - name: is_primary + fieldtype: Check + label: Is Primary + description: Indicates if this is the main email address to use when contacting + this person. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabContact Email). + Comparison-ready across parent records.' +- table: tabContact Phone + description: '' + fields: + - name: phone + fieldtype: Data + label: Number + description: The actual phone number value used for calling or messaging the contact. + - name: is_primary_phone + fieldtype: Check + label: Is Primary Phone + description: Indicates if this is the main landline or office phone number for + the contact. + - name: is_primary_mobile_no + fieldtype: Check + label: Is Primary Mobile + description: Indicates if this is the primary mobile number for the contact. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabContact Phone). + Comparison-ready across parent records.' +- table: tabContract + description: '' + fields: + - name: party_type + fieldtype: Select + label: Party Type + description: Type of entity involved in the contract such as customer, vendor, + supplier, or partner + options: + - Customer + - Supplier + - Employee + - name: is_signed + fieldtype: Check + label: Signed + description: Whether the contract has been executed with signatures from all parties + - name: party_name + fieldtype: Dynamic Link + label: Party Name + description: Name of the external organization or individual that is the counterparty + to the contract. + - name: party_user + fieldtype: Link + label: Party User + description: Internal user or employee responsible for managing or owning the + relationship with the contract counterparty. + join_hint: + table: tabUser + 'on': party_user = tabUser.name + - name: status + fieldtype: Select + label: Status + description: Current state of the contract such as draft, active, expired, or + terminated. + options: + - Unsigned + - Active + - Inactive + - name: fulfilment_status + fieldtype: Select + label: Fulfilment Status + description: Current state of contract execution indicating whether obligations + are pending, in progress, completed, or breached. + options: + - N/A + - Unfulfilled + - Partially Fulfilled + - Fulfilled + - Lapsed + - name: party_full_name + fieldtype: Data + label: Party Full Name + description: Complete legal name of the counterparty or customer entity involved + in the contract. + - name: start_date + fieldtype: Date + label: Start Date + description: Date when the contract becomes effective and obligations begin. + - name: end_date + fieldtype: Date + label: End Date + description: Contract expiration or termination date for identifying when agreements + conclude or need renewal + - name: signee + fieldtype: Data + label: Signee + description: Person or party who signed the contract, used to identify the authorized + individual or entity executing the agreement + - name: signed_on + fieldtype: Datetime + label: Signed On + description: Date when the contract was executed or signed, distinct from creation + or start dates + - name: ip_address + fieldtype: Data + label: IP Address + description: IP address from which the contract was created or last modified, + relevant for audit trail and security tracking queries. + - name: contract_template + fieldtype: Link + label: Contract Template + description: Standardized contract format or template type used to generate this + contract, useful when searching for contracts based on specific template categories + or structures. + join_hint: + table: tabContract Template + 'on': contract_template = tabContract Template.name + - name: contract_terms + fieldtype: Text Editor + label: Contract Terms + description: Specific negotiated terms, conditions, clauses, and provisions within + the contract, queried when searching for payment terms, delivery conditions, + warranties, or other contractual obligations. + - name: requires_fulfilment + fieldtype: Check + label: Requires Fulfilment + description: Whether the contract has deliverables or obligations that must be + completed or fulfilled by one or both parties. + - name: fulfilment_deadline + fieldtype: Date + label: Fulfilment Deadline + description: The date by which all contract deliverables or obligations must be + completed. + - name: fulfilment_terms + fieldtype: Table + label: Fulfilment Terms + description: '' + child_hint: + child_table: tabContract Fulfilment Checklist + fieldname: fulfilment_terms + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: fulfilment_terms + - name: signed_by_company + fieldtype: Link + label: Signed By (Company) + description: Company that initiates or issues the contract for the other party + to sign. + join_hint: + table: tabUser + 'on': signed_by_company = tabUser.name + - name: document_type + fieldtype: Select + label: Document Type + description: Category or classification of the contract document such as NDA, + service agreement, or purchase order. + options: + - Quotation + - Project + - Sales Order + - Purchase Order + - Sales Invoice + - Purchase Invoice + - name: document_name + fieldtype: Dynamic Link + label: Document Name + description: The title or identifier name assigned to the contract document for + reference and searching. + - name: amended_from + fieldtype: Link + label: Amended From + description: Links to the original contract that this contract amends or replaces, + used when tracking contract revisions and amendments. + join_hint: + table: tabContract + 'on': amended_from = tabContract.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Contract document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabContract Fulfilment Checklist + description: '' + fields: + - name: fulfilled + fieldtype: Check + label: Fulfilled + description: Whether this checklist item has been completed or satisfied + - name: requirement + fieldtype: Data + label: Requirement + description: The specific obligation, condition, or deliverable that must be met + for this checklist item + - name: notes + fieldtype: Text + label: Notes + description: Additional comments or observations about the contract fulfillment + checklist item or overall checklist status. + - name: amended_from + fieldtype: Link + label: Amended From + description: Reference to the previous version of this checklist when it has been + modified or corrected after initial creation. + join_hint: + table: tabContract Fulfilment Checklist + 'on': amended_from = tabContract Fulfilment Checklist.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabContract Fulfilment + Checklist). Comparison-ready across parent records.' +- table: tabContract Template + description: '' + fields: + - name: title + fieldtype: Data + label: Title + description: Display name or heading of the contract template shown to users when + selecting or viewing templates + - name: contract_terms + fieldtype: Text Editor + label: Contract Terms and Conditions + description: Legal terms, conditions, clauses, and provisions text that define + the contractual obligations and rights in the template + - name: requires_fulfilment + fieldtype: Check + label: Requires Fulfilment + description: Indicates whether the contract template mandates physical delivery, + service completion, or other fulfilment obligations before payment or closure. + - name: fulfilment_terms + fieldtype: Table + label: Fulfilment Terms and Conditions + description: '' + child_hint: + child_table: tabContract Template Fulfilment Terms + fieldname: fulfilment_terms + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: fulfilment_terms + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Contract Template document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabContract Template Fulfilment Terms + description: '' + fields: + - name: requirement + fieldtype: Data + label: Requirement + description: Specific condition or obligation that must be met to fulfill this + contract template term + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabContract Template + Fulfilment Terms). Comparison-ready across parent records.' +- table: tabCost Center + description: Track separate Income and Expense for product verticals or divisions. + fields: + - name: cost_center_name + fieldtype: Data + label: Cost Center Name + description: Full descriptive name of the cost center, used when searching by + department name, business unit name, or organizational division. + - name: cost_center_number + fieldtype: Data + label: Cost Center Number + description: Numeric or alphanumeric code assigned to the cost center, used when + querying by official cost center codes in financial reports or accounting systems. + - name: parent_cost_center + fieldtype: Link + label: Parent Cost Center + description: Hierarchical cost center that this cost center rolls up to for consolidated + financial reporting and analysis. + join_hint: + table: tabCost Center + 'on': parent_cost_center = tabCost Center.name + - name: company + fieldtype: Link + label: Company + description: Legal entity or business unit that owns and operates this cost center. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: custom_zatca__registration_type + fieldtype: Select + label: Zatca - Registration Type + description: Saudi Arabia ZATCA tax authority registration classification for + VAT and e-invoicing compliance. + options: + - CRN + - MOM + - MLS + - '700' + - SAG + - OTH + - name: custom_zatca__registration_number + fieldtype: Data + label: Zatca - Registration Number + description: ZATCA tax registration number for Saudi Arabian tax compliance and + invoicing requirements. + - name: custom_zatca_branch_address + fieldtype: Link + label: Zatca Branch Address + description: Physical branch address required for ZATCA tax authority reporting + in Saudi Arabia. + join_hint: + table: tabAddress + 'on': custom_zatca_branch_address = tabAddress.name + - name: is_group + fieldtype: Check + label: Is Group + description: Indicates whether this cost center is a parent grouping container + for other cost centers or an individual operational cost center. + - name: disabled + fieldtype: Check + label: Disabled + description: Whether the cost center is inactive and should be excluded from active + operations or selections. + - name: lft + fieldtype: Int + label: lft + description: Left boundary value for nested set hierarchy positioning of cost + centers in organizational tree structure. + - name: rgt + fieldtype: Int + label: rgt + description: Right boundary value for nested set hierarchy positioning of cost + centers in organizational tree structure. + - name: old_parent + fieldtype: Link + label: old_parent + description: Previous parent cost center before a reorganization or hierarchy + change. + join_hint: + table: tabCost Center + 'on': old_parent = tabCost Center.name + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Cost Center document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabCost Center Allocation + description: '' + fields: + - name: main_cost_center + fieldtype: Link + label: Main Cost Center + description: The primary cost center to which expenses or resources are being + allocated + join_hint: + table: tabCost Center + 'on': main_cost_center = tabCost Center.name + - name: company + fieldtype: Link + label: Company + description: The company entity that owns or is associated with this cost center + allocation + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: valid_from + fieldtype: Date + label: Valid From + description: Date when this cost center allocation becomes effective for distributing + costs across centers. + - name: allocation_percentages + fieldtype: Table + label: Cost Center Allocation Percentages + description: '' + child_hint: + child_table: tabCost Center Allocation Percentage + fieldname: allocation_percentages + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: allocation_percentages + - name: amended_from + fieldtype: Link + label: Amended From + description: Reference to the previous allocation record that this entry replaces + or modifies. + join_hint: + table: tabCost Center Allocation + 'on': amended_from = tabCost Center Allocation.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Cost Center Allocation document (master/transaction). Use + only for single-entity lookups, not cross-record comparison unless fields are + per-relationship (e.g. supplier, price_list).' +- table: tabCost Center Allocation Percentage + description: '' + fields: + - name: cost_center + fieldtype: Link + label: Cost Center + description: The cost center receiving the allocated portion of expenses or revenue + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + - name: percentage + fieldtype: Percent + label: Percentage (%) + description: The proportion of total amount allocated to this cost center, typically + queried when analyzing cost distribution or split ratios + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabCost Center Allocation + Percentage). Comparison-ready across parent records.' +- table: tabCountry + description: '' + fields: + - name: country_name + fieldtype: Data + label: Country Name + description: Full official country name used for display, filtering, and matching + in address forms and regional reports. + - name: date_format + fieldtype: Data + label: Date Format + description: Default date display format for the country, used to localize date + fields in transactions and reports. + - name: time_format + fieldtype: Data + label: Time format + description: Default time display format for the country, used to localize time + fields in user interfaces. + - name: time_zones + fieldtype: Text + label: Time Zones + description: Available time zones for the country, used for scheduling and timestamp + localization in multi-region operations. + - name: code + fieldtype: Data + label: Code + description: ISO country code used for international transactions, tax compliance, + and integration with external systems. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Country document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabCoupon Code + description: '' + fields: + - name: coupon_name + fieldtype: Data + label: Coupon Name + description: Marketing or display name of the coupon shown to customers and in + promotional materials + - name: coupon_type + fieldtype: Select + label: Coupon Type + description: Category or classification of the coupon such as percentage discount, + fixed amount, free shipping, or buy-one-get-one + options: + - Promotional + - Gift Card + - name: customer + fieldtype: Link + label: Customer + description: Customer who is authorized to use this coupon code for discounts + or promotions + join_hint: + table: tabCustomer + 'on': customer = tabCustomer.name + - name: coupon_code + fieldtype: Data + label: Coupon Code + description: Unique code that customers enter at checkout to apply discounts or + promotional pricing + - name: pricing_rule + fieldtype: Link + label: Pricing Rule + description: Pricing rule that defines the discount type, amount, and conditions + applied when this coupon code is used + join_hint: + table: tabPricing Rule + 'on': pricing_rule = tabPricing Rule.name + - name: valid_from + fieldtype: Date + label: Valid From + description: Start date when the coupon code becomes active and can be applied + to transactions. + - name: valid_upto + fieldtype: Date + label: Valid Upto + description: End date when the coupon code expires and can no longer be used. + - name: maximum_use + fieldtype: Int + label: Maximum Use + description: Total number of times the coupon code can be redeemed across all + customers before becoming inactive. + - name: used + fieldtype: Int + label: Used + description: Indicates whether the coupon code has been redeemed or applied to + a transaction. + - name: description + fieldtype: Text Editor + label: Coupon Description + description: Text explaining the purpose, promotion details, or terms associated + with the coupon code. + - name: amended_from + fieldtype: Link + label: Amended From + description: References the original coupon code record if this coupon was created + as a modification or correction of another. + join_hint: + table: tabCoupon Code + 'on': amended_from = tabCoupon Code.name + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Coupon Code document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabCurrency + description: '' + fields: + - name: currency_name + fieldtype: Data + label: Currency Name + description: Full name of the currency used for display in reports, dropdowns, + and user-facing transaction forms. + - name: enabled + fieldtype: Check + label: Enabled + description: Active status flag used to filter available currencies for transaction + entry and hide deprecated currencies. + - name: fraction + fieldtype: Data + label: Fraction + description: Decimal precision for currency amounts, used to determine rounding + rules in financial calculations and display. + - name: fraction_units + fieldtype: Int + label: Fraction Units + description: Name of the fractional unit used for displaying minor currency denominations + in reports and invoices. + - name: smallest_currency_fraction_value + fieldtype: Currency + label: Smallest Currency Fraction Value + description: Minimum transactional unit value used for rounding calculations and + cash payment validations. + - name: symbol + fieldtype: Data + label: Symbol + description: Currency symbol used for formatting monetary amounts in reports, + invoices, and financial statements. + - name: symbol_on_right + fieldtype: Check + label: Show Currency Symbol on Right Side + description: Indicates whether the currency symbol appears after the amount in + formatted displays, used when formatting financial reports and invoices for + regional conventions. + - name: number_format + fieldtype: Select + label: Number Format + description: Defines the decimal and thousand separator pattern for currency amounts, + used when formatting monetary values according to regional standards. + options: + - '#,###.##' + - '#.###,##' + - '# ###.##' + - '# ###,##' + - '#''###.##' + - '#, ###.##' + - '#,##,###.##' + - '#,###.###' + - '#.###' + - '#,###' + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Currency document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabCurrency Exchange + description: '' + fields: + - name: date + fieldtype: Date + label: Date + description: Effective date for which this currency exchange rate applies + - name: from_currency + fieldtype: Link + label: From Currency + description: Source currency code being converted from in the exchange transaction + join_hint: + table: tabCurrency + 'on': from_currency = tabCurrency.name + - name: to_currency + fieldtype: Link + label: To Currency + description: Target currency code being converted to in the exchange transaction + join_hint: + table: tabCurrency + 'on': to_currency = tabCurrency.name + - name: exchange_rate + fieldtype: Float + label: Exchange Rate + description: Conversion rate multiplier to calculate the target currency amount + from source currency + - name: for_buying + fieldtype: Check + label: For Buying + description: Indicates if this exchange rate applies to purchase transactions + - name: for_selling + fieldtype: Check + label: For Selling + description: Indicates if this exchange rate applies to sales transactions + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Currency Exchange document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabCurrency Exchange Settings Details + description: '' + fields: + - name: key + fieldtype: Data + label: Key + description: Serves as the unique identifier for the currency exchange configuration + parameter, used when looking up specific system settings or technical references + for exchange rate processing. + - name: value + fieldtype: Data + label: Value + description: Contains the actual configuration value or exchange rate data for + the setting, used when retrieving current rates, conversion factors, or parameter + values for currency calculations. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabCurrency Exchange + Settings Details). Comparison-ready across parent records.' +- table: tabCurrency Exchange Settings Result + description: '' + fields: + - name: key + fieldtype: Data + label: Key + description: Unique identifier code for the currency exchange settings used in + lookups and integrations + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabCurrency Exchange + Settings Result). Comparison-ready across parent records.' +- table: tabCustom DocPerm + description: '' + fields: + - name: parent + fieldtype: Data + label: Reference Document Type + description: The custom document type to which this permission rule applies. + - name: role + fieldtype: Link + label: Role + description: The user role to which this permission rule grants or restricts access. + join_hint: + table: tabRole + 'on': role = tabRole.name + - name: if_owner + fieldtype: Check + label: If user is the owner + description: Flag indicating whether this permission applies only when the user + owns the document. + - name: permlevel + fieldtype: Int + label: Level + description: Permission level number used to control field-level access within + the document. + - name: select + fieldtype: Check + label: Select + description: Flag indicating whether users with this role can select or view this + document in lists. + - name: read + fieldtype: Check + label: Read + description: Flag indicating whether users with this role can read or view this + document. + - name: write + fieldtype: Check + label: Write + description: Flag indicating whether users with this role can edit or modify this + document. + - name: create + fieldtype: Check + label: Create + description: Indicates if the user role has permission to create new documents + of this type. + - name: delete + fieldtype: Check + label: Delete + description: Indicates if the user role has permission to delete documents of + this type. + - name: submit + fieldtype: Check + label: Submit + description: Indicates if the user role has permission to submit documents for + approval or finalization. + - name: cancel + fieldtype: Check + label: Cancel + description: Indicates if the user role has permission to cancel submitted or + approved documents. + - name: amend + fieldtype: Check + label: Amend + description: Indicates if the user role has permission to amend cancelled documents + by creating corrected versions. + - name: report + fieldtype: Check + label: Report + description: Indicates if the user role has permission to access and view reports + based on this document type. + - name: export + fieldtype: Check + label: Export + description: Indicates if the user role has permission to export document data + to external formats like Excel or CSV. + - name: import + fieldtype: Check + label: Import + description: Indicates if the user role has permission to import bulk data into + documents of this type. + - name: share + fieldtype: Check + label: Share + description: Indicates if the user role has permission to share documents with + other users or groups. + - name: print + fieldtype: Check + label: Print + description: Indicates if the user role has permission to print physical or PDF + copies of documents. + - name: email + fieldtype: Check + label: Email + description: Indicates if the user role has permission to send documents via email + to internal or external recipients. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Custom DocPerm document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabCustom Field + description: '' + fields: + - name: is_system_generated + fieldtype: Check + label: Is System Generated + description: Indicates if this custom field was auto-generated by the system versus + manually created. + - name: dt + fieldtype: Link + label: DocType + description: The target DocType where this custom field appears and collects data. + join_hint: + table: tabDocType + 'on': dt = tabDocType.name + - name: module + fieldtype: Link + label: Module (for export) + description: The ERP module under which this custom field is categorized for organizational + purposes. + join_hint: + table: tabModule Def + 'on': module = tabModule Def.name + - name: label + fieldtype: Data + label: Label + description: The display name shown to users for this custom field on forms and + reports. + - name: placeholder + fieldtype: Data + label: Placeholder + description: The hint text displayed inside the custom field before user input. + - name: fieldname + fieldtype: Data + label: Fieldname + description: The technical database column name used to store this custom field's + data. + - name: insert_after + fieldtype: Select + label: Insert After + description: Specifies the field after which this custom field should be positioned + in the form layout. + - name: length + fieldtype: Int + label: Length + description: Defines the maximum character length allowed for text-based field + inputs. + - name: link_filters + fieldtype: JSON + label: Link Filters + description: Contains filter conditions that restrict which linked documents can + be selected in this field. + - name: fieldtype + fieldtype: Select + label: Field Type + description: Determines the data type and input control for this field such as + text, number, date, or link. + options: + - Autocomplete + - Attach + - Attach Image + - Barcode + - Button + - Check + - Code + - Color + - Column Break + - Currency + - Data + - Date + - Datetime + - Duration + - Dynamic Link + - Float + - Fold + - Geolocation + - Heading + - HTML + - HTML Editor + - Icon + - Image + - Int + - JSON + - Link + - Long Text + - Markdown Editor + - Password + - Percent + - Phone + - Read Only + - Rating + - Section Break + - Select + - Signature + - Small Text + - Tab Break + - Table + - Table MultiSelect + - Text + - Text Editor + - Time + - name: precision + fieldtype: Select + label: Precision + description: Sets the number of decimal places displayed for numeric and currency + fields. + options: + - '0' + - '1' + - '2' + - '3' + - '4' + - '5' + - '6' + - '7' + - '8' + - '9' + - name: hide_seconds + fieldtype: Check + label: Hide Seconds + description: Controls whether seconds are displayed in time and datetime field + values. + - name: hide_days + fieldtype: Check + label: Hide Days + description: Controls whether days are displayed in duration field values. + - name: options + fieldtype: Small Text + label: Options + description: Defines available choices for select fields or specifies the linked + DocType for link fields. + - name: sort_options + fieldtype: Check + label: Sort Options + description: Determines whether options in select fields are displayed in alphabetical + order. + - name: fetch_from + fieldtype: Small Text + label: Fetch From + description: Specifies which field value to automatically retrieve from a linked + document. + - name: fetch_if_empty + fieldtype: Check + label: Fetch on Save if Empty + description: Controls whether fetched values overwrite existing data or only populate + empty fields. + - name: collapsible + fieldtype: Check + label: Collapsible + description: Determines if this field section can be collapsed to hide its contents + in the form. + - name: collapsible_depends_on + fieldtype: Code + label: Collapsible Depends On + description: Defines the condition that controls when this collapsible section + is expandable. + - name: default + fieldtype: Text + label: Default Value + description: Sets the initial value automatically populated when creating a new + document. + - name: depends_on + fieldtype: Code + label: Depends On + description: Defines the condition that determines when this field is visible + or enabled in the form. + - name: mandatory_depends_on + fieldtype: Code + label: Mandatory Depends On + description: Defines conditional logic that makes this custom field required based + on values in other fields. + - name: read_only_depends_on + fieldtype: Code + label: Read Only Depends On + description: Defines conditional logic that makes this custom field non-editable + based on values in other fields. + - name: non_negative + fieldtype: Check + label: Non Negative + description: Enforces that numeric values in this custom field cannot be negative + numbers. + - name: reqd + fieldtype: Check + label: Is Mandatory Field + description: Indicates whether this custom field must always be filled before + saving the document. + - name: unique + fieldtype: Check + label: Unique + description: Enforces that values entered in this custom field must be unique + across all records. + - name: is_virtual + fieldtype: Check + label: Is Virtual + description: Indicates this custom field is computed dynamically and not stored + in the database. + - name: read_only + fieldtype: Check + label: Read Only + description: Indicates this custom field cannot be edited by users after initial + creation. + - name: ignore_user_permissions + fieldtype: Check + label: Ignore User Permissions + description: Allows this custom field to bypass standard user permission restrictions + for access. + - name: hidden + fieldtype: Check + label: Hidden + description: Indicates this custom field is not visible in the form interface + to users. + - name: print_hide + fieldtype: Check + label: Print Hide + description: Indicates this custom field is excluded from printed documents and + PDF outputs. + - name: print_hide_if_no_value + fieldtype: Check + label: Print Hide If No Value + description: Excludes this custom field from printed documents when it contains + no value. + - name: print_width + fieldtype: Data + label: Print Width + description: Defines the column width allocation for this custom field in printed + formats. + - name: no_copy + fieldtype: Check + label: No Copy + description: Prevents this custom field's value from being copied when duplicating + the document. + - name: allow_on_submit + fieldtype: Check + label: Allow on Submit + description: Allows this custom field to be edited even after the document is + submitted. + - name: in_list_view + fieldtype: Check + label: In List View + description: Indicates this custom field appears as a column in the document list + view. + - name: in_standard_filter + fieldtype: Check + label: In Standard Filter + description: Indicates if this custom field appears as a filter option in standard + list views for quick data filtering. + - name: in_global_search + fieldtype: Check + label: In Global Search + description: Determines if this field's values are searchable through the global + search bar across the system. + - name: in_preview + fieldtype: Check + label: In Preview + description: Controls whether this field displays in document preview tooltips + when hovering over links. + - name: bold + fieldtype: Check + label: Bold + description: Makes the field label display in bold formatting to emphasize important + fields in forms. + - name: report_hide + fieldtype: Check + label: Report Hide + description: Excludes this field from appearing in report builder and query results + by default. + - name: search_index + fieldtype: Check + label: Index + description: Enables database indexing on this field to improve search and filter + performance for large datasets. + - name: allow_in_quick_entry + fieldtype: Check + label: Allow in Quick Entry + description: Permits this field to appear in quick entry forms for rapid data + entry workflows. + - name: ignore_xss_filter + fieldtype: Check + label: Ignore XSS Filter + description: Bypasses cross-site scripting sanitization for fields that need to + store HTML or script content. + - name: translatable + fieldtype: Check + label: Translatable + description: Marks field values as translatable content that should be included + in multi-language translation workflows. + - name: hide_border + fieldtype: Check + label: Hide Border + description: Removes the visual border around this field in forms for cleaner + UI presentation. + - name: show_dashboard + fieldtype: Check + label: Show Dashboard + description: Enables this field's data to be displayed in dashboard widgets and + summary views. + - name: description + fieldtype: Text + label: Field Description + description: Stores help text that explains the field's purpose and appears as + a tooltip for users. + - name: permlevel + fieldtype: Int + label: Permission Level + description: Assigns a permission level to control which user roles can view or + edit this field. + - name: width + fieldtype: Data + label: Width + description: Sets the display width of the field in form layouts as a percentage + or pixel value. + - name: columns + fieldtype: Int + label: Columns + description: Defines how many grid columns this field spans in multi-column form + layouts. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Custom Field document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabCustom HTML Block + description: '' + fields: + - name: private + fieldtype: Check + label: Private + description: Flag indicating whether this HTML block is visible only to specific + users or roles. + - name: html + fieldtype: Code + label: html + description: HTML content of the block, used when searching for specific markup + or display elements. + - name: script + fieldtype: Code + label: script + description: JavaScript code embedded in the block, used for custom client-side + functionality and interactions. + - name: style + fieldtype: Code + label: style + description: CSS styling rules applied to the HTML block, used for custom formatting + and appearance. + - name: roles + fieldtype: Table + label: Roles + description: '' + child_hint: + child_table: tabHas Role + fieldname: roles + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: roles + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Custom HTML Block document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabCustom Role + description: '' + fields: + - name: page + fieldtype: Link + label: Page + description: Specific page or form where this custom role permission applies. + join_hint: + table: tabPage + 'on': page = tabPage.name + - name: report + fieldtype: Link + label: Report + description: Report to which this custom role grants access or permissions. + join_hint: + table: tabReport + 'on': report = tabReport.name + - name: roles + fieldtype: Table + label: Role + description: '' + child_hint: + child_table: tabHas Role + fieldname: roles + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: roles + - name: ref_doctype + fieldtype: Data + label: Reference Document Type + description: Document type that this custom role configuration references or controls + access to. + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Custom Role document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabCustomer + description: Buyer of Goods and Services. + fields: + - name: naming_series + fieldtype: Select + label: Series + description: Prefix pattern that determines the customer ID format for auto-generated + customer codes + options: + - CUST-.YYYY.- + - name: salutation + fieldtype: Link + label: Salutation + description: Title or honorific for the customer contact person such as Mr, Mrs, + Dr, or Ms + join_hint: + table: tabSalutation + 'on': salutation = tabSalutation.name + - name: customer_name + fieldtype: Data + label: Customer Name + description: Primary customer name used for searching, filtering, and identifying + customers in queries about orders, invoices, or relationships. + - name: zatca_customer_name_in_arabic + fieldtype: Data + label: Customer Name Arabic + description: Arabic version of customer name required for Saudi ZATCA tax compliance + and Arabic-language invoicing. + - name: custom_b2c + fieldtype: Check + label: 'ZATCA type Simplified ( B2C ) ' + description: Indicates whether customer is a business-to-consumer account, used + to filter retail versus business customers. + - name: custom_buyer_id_type + fieldtype: Select + label: Customer ID Type for ZATCA + description: Type or category of the custom buyer identifier used for this customer. + options: + - CRN + - TIN + - MOM + - MLS + - '700' + - SAG + - NAT + - GCC + - IQA + - PAS + - OTH + - name: custom_buyer_id + fieldtype: Data + label: Customer ID Number for ZATCA + description: Custom identifier assigned to the customer as a buyer in external + or partner systems. + - name: custom_buyer_id_type_ar + fieldtype: Data + label: Custom Buyer Id Type (ar) + description: Arabic label for buyer identification document type, used in Arabic + compliance reports and customer verification processes. + - name: customer_type + fieldtype: Select + label: Customer Type + description: Classification of the customer such as individual, business, government, + or reseller. + options: + - Company + - Individual + - Partnership + - name: customer_group + fieldtype: Link + label: Customer Group + description: Customer classification or segment for pricing, discounts, or business + categorization such as wholesale, retail, or VIP. + join_hint: + table: tabCustomer Group + 'on': customer_group = tabCustomer Group.name + - name: territory + fieldtype: Link + label: Territory + description: Geographic sales region or area assigned to the customer for sales + management and regional analysis. + join_hint: + table: tabTerritory + 'on': territory = tabTerritory.name + - name: gender + fieldtype: Link + label: Gender + description: Customer's gender for demographic analysis and personalized marketing. + join_hint: + table: tabGender + 'on': gender = tabGender.name + - name: lead_name + fieldtype: Link + label: From Lead + description: Name of potential customer in initial contact stage before qualification. + join_hint: + table: tabLead + 'on': lead_name = tabLead.name + - name: opportunity_name + fieldtype: Link + label: From Opportunity + description: Name of qualified sales opportunity with defined deal potential and + timeline. + join_hint: + table: tabOpportunity + 'on': opportunity_name = tabOpportunity.name + - name: prospect_name + fieldtype: Link + label: From Prospect + description: Name of researched potential customer being evaluated for outreach + or engagement. + join_hint: + table: tabProspect + 'on': prospect_name = tabProspect.name + - name: account_manager + fieldtype: Link + label: Account Manager + description: Employee or user responsible for managing the customer relationship + and handling their account. + join_hint: + table: tabUser + 'on': account_manager = tabUser.name + - name: default_currency + fieldtype: Link + label: Billing Currency + description: Currency used for transactions and invoicing with this customer. + join_hint: + table: tabCurrency + 'on': default_currency = tabCurrency.name + - name: default_bank_account + fieldtype: Link + label: Default Company Bank Account + description: Bank account designated for receiving payments from this customer. + join_hint: + table: tabBank Account + 'on': default_bank_account = tabBank Account.name + - name: default_price_list + fieldtype: Link + label: Default Price List + description: Price list automatically applied to sales transactions for this customer, + relevant when users ask about customer pricing or discounts. + join_hint: + table: tabPrice List + 'on': default_price_list = tabPrice List.name + - name: custom_data + fieldtype: Data + label: Custom Data + description: Custom JSON or text field for storing additional customer attributes + not covered by standard fields, used for extended customer profiling. + - name: is_internal_customer + fieldtype: Check + label: Is Internal Customer + description: Indicates whether this customer is an internal entity within the + organization, used to distinguish inter-company or internal transactions from + external sales. + - name: represents_company + fieldtype: Link + label: Represents Company + description: The company entity this customer record represents in inter-company + transactions, relevant when querying internal customer relationships or cross-company + dealings. + join_hint: + table: tabCompany + 'on': represents_company = tabCompany.name + - name: companies + fieldtype: Table + label: Allowed To Transact With + description: Identifies the specific company an account belongs to, crucial for + segmenting customer data and understanding organizational hierarchies. + child_hint: + child_table: tabAllowed To Transact With + fieldname: companies + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: companies + - name: market_segment + fieldtype: Link + label: Market Segment + description: Customer categorization by business size or type (enterprise, SMB, + mid-market) used when filtering or analyzing customers by strategic segment. + join_hint: + table: tabMarket Segment + 'on': market_segment = tabMarket Segment.name + - name: industry + fieldtype: Link + label: Industry + description: Customer's business sector or vertical (manufacturing, healthcare, + retail, technology) used when querying customers by their line of business. + join_hint: + table: tabIndustry Type + 'on': industry = tabIndustry Type.name + - name: customer_pos_id + fieldtype: Data + label: Customer POS id + description: Point of sale system identifier for the customer used in retail or + transaction processing queries. + - name: website + fieldtype: Data + label: Website + description: Customer's website URL for identifying online presence or filtering + by web-enabled customers. + - name: language + fieldtype: Link + label: Print Language + description: Preferred language for customer communications, invoices, and correspondence. + join_hint: + table: tabLanguage + 'on': language = tabLanguage.name + - name: customer_details + fieldtype: Text + label: Customer Details + description: Full customer information including name, contact details, and account + settings for queries about customer profiles or account information. + - name: customer_home_address_test + fieldtype: Data + label: customer home address test + description: Test or temporary field for customer residential address, used during + address validation or data migration scenarios. + - name: test_field + fieldtype: Data + label: test_field + description: This is a placeholder field for testing purposes and has no defined + business use. + - name: test_sync_test + fieldtype: Data + label: test_sync_updated + description: This field is used for testing synchronization processes and does + not represent a business entity. + - name: customer_primary_address + fieldtype: Link + label: Customer Primary Address + description: Main address associated with the customer record for queries about + where the customer is located or their default shipping/billing location. + join_hint: + table: tabAddress + 'on': customer_primary_address = tabAddress.name + - name: primary_address + fieldtype: Text + label: Primary Address + description: Primary address identifier or reference for the customer, used when + linking to address records or querying customer location data. + - name: customer_primary_contact + fieldtype: Link + label: Customer Primary Contact + description: Primary contact person's name for the customer account, used when + users need to know who to reach out to at the customer organization. + join_hint: + table: tabContact + 'on': customer_primary_contact = tabContact.name + - name: tax_id + fieldtype: Data + label: Tax ID + description: Customer's tax identification number for tax reporting and compliance + purposes. + - name: tax_category + fieldtype: Link + label: Tax Category + description: Tax treatment classification determining which taxes apply to sales + transactions with this customer. + join_hint: + table: tabTax Category + 'on': tax_category = tabTax Category.name + - name: tax_withholding_category + fieldtype: Link + label: Tax Withholding Category + description: Classification for withholding tax obligations when paying or transacting + with this customer. + join_hint: + table: tabTax Withholding Category + 'on': tax_withholding_category = tabTax Withholding Category.name + - name: payment_terms + fieldtype: Link + label: Default Payment Terms Template + description: When customer payment is due and what discounts apply for early payment, + such as net 30 or 2/10 net 30. + join_hint: + table: tabPayment Terms Template + 'on': payment_terms = tabPayment Terms Template.name + - name: credit_limits + fieldtype: Table + label: Credit Limit + description: Indicates the maximum amount of credit extended to a customer, used + to manage financial risk and authorize transactions. + child_hint: + child_table: tabCustomer Credit Limit + fieldname: credit_limits + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: credit_limits + - name: accounts + fieldtype: Table + label: Accounts + description: Represents a customer's financial account, used for tracking transactions, + payments, and overall account status. + child_hint: + child_table: tabParty Account + fieldname: accounts + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: accounts + - name: loyalty_program + fieldtype: Link + label: Loyalty Program + description: Customer's enrolled loyalty or rewards program name for identifying + program membership and benefits eligibility. + join_hint: + table: tabLoyalty Program + 'on': loyalty_program = tabLoyalty Program.name + - name: loyalty_program_tier + fieldtype: Data + label: Loyalty Program Tier + description: Customer's current tier or level within their loyalty program such + as bronze, silver, gold, or platinum for tier-based analysis and benefits. + - name: sales_team + fieldtype: Table + label: Sales Team + description: Assigns a customer to a specific sales representative or team, used + for performance tracking and customer relationship management. + child_hint: + child_table: tabSales Team + fieldname: sales_team + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: sales_team + - name: default_sales_partner + fieldtype: Link + label: Sales Partner + description: Sales partner automatically assigned to transactions for this customer + for commission tracking and partner performance analysis. + join_hint: + table: tabSales Partner + 'on': default_sales_partner = tabSales Partner.name + - name: default_commission_rate + fieldtype: Float + label: Commission Rate + description: Commission percentage automatically applied to sales transactions + with this customer. + - name: so_required + fieldtype: Check + label: Allow Sales Invoice Creation Without Sales Order + description: Whether a sales order must be created before generating delivery + notes or sales invoices for this customer. + - name: dn_required + fieldtype: Check + label: Allow Sales Invoice Creation Without Delivery Note + description: Whether delivery notes are mandatory for transactions with this customer. + - name: is_frozen + fieldtype: Check + label: Is Frozen + description: Whether the customer account is temporarily frozen from making new + transactions. + - name: disabled + fieldtype: Check + label: Disabled + description: Whether the customer record is permanently deactivated and excluded + from active operations. + - name: portal_users + fieldtype: Table + label: Customer Portal Users + description: Identifies users who have access to the customer portal, used for + managing user access and communication channels. + child_hint: + child_table: tabPortal User + fieldname: portal_users + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: portal_users + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Customer document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabCustomer Credit Limit + description: '' + fields: + - name: company + fieldtype: Link + label: Company + description: Company entity to which this customer credit limit applies + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: credit_limit + fieldtype: Currency + label: Credit Limit + description: Maximum credit amount approved for the customer to purchase on account + - name: bypass_credit_limit_check + fieldtype: Check + label: Bypass Credit Limit Check at Sales Order + description: Whether credit limit validation is disabled for this customer, allowing + orders or transactions to proceed regardless of outstanding balance or limit. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabCustomer Credit + Limit). Comparison-ready across parent records.' +- table: tabCustomer Group + description: '' + fields: + - name: customer_group_name + fieldtype: Data + label: Customer Group Name + description: Display name of the customer group, used when searching or reporting + on customer segments like Retail or Wholesale. + - name: parent_customer_group + fieldtype: Link + label: Parent Customer Group + description: References the parent in a hierarchical customer group structure, + used for nested segmentation and rollup reporting. + join_hint: + table: tabCustomer Group + 'on': parent_customer_group = tabCustomer Group.name + - name: is_group + fieldtype: Check + label: Is Group + description: Indicates if this is a parent node in the hierarchy, used to distinguish + container groups from leaf-level operational segments. + - name: default_price_list + fieldtype: Link + label: Default Price List + description: Price list automatically applied to customers in this group, used + for pricing strategy queries and discount analysis. + join_hint: + table: tabPrice List + 'on': default_price_list = tabPrice List.name + - name: payment_terms + fieldtype: Link + label: Default Payment Terms Template + description: Default payment terms template for this customer group, used when + analyzing credit policies and payment conditions by segment. + join_hint: + table: tabPayment Terms Template + 'on': payment_terms = tabPayment Terms Template.name + - name: lft + fieldtype: Int + label: lft + description: Left boundary in nested set model for hierarchical queries, used + for efficient tree traversal in customer group reporting. + - name: rgt + fieldtype: Int + label: rgt + description: Right boundary in nested set model for hierarchical queries, used + alongside lft for subtree selection and rollup calculations. + - name: old_parent + fieldtype: Link + label: old_parent + description: Previous parent customer group before reorganization, used for tracking + hierarchy changes and migration audits. + join_hint: + table: tabCustomer Group + 'on': old_parent = tabCustomer Group.name + - name: accounts + fieldtype: Table + label: Accounts + description: '' + child_hint: + child_table: tabParty Account + fieldname: accounts + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: accounts + - name: credit_limits + fieldtype: Table + label: Credit Limit + description: '' + child_hint: + child_table: tabCustomer Credit Limit + fieldname: credit_limits + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: credit_limits + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Customer Group document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabCustomer Group Item + description: '' + fields: + - name: customer_group + fieldtype: Link + label: Customer Group + description: The customer group to which this item pricing or access rule applies + join_hint: + table: tabCustomer Group + 'on': customer_group = tabCustomer Group.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabCustomer Group + Item). Comparison-ready across parent records.' +- table: tabCustomer Item + description: '' + fields: + - name: customer + fieldtype: Link + label: 'Customer ' + description: The customer for whom this specific item pricing, terms, or preferences + apply + join_hint: + table: tabCustomer + 'on': customer = tabCustomer.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabCustomer Item). + Comparison-ready across parent records.' +- table: tabCustomize Form Field + description: '' + fields: + - name: is_system_generated + fieldtype: Check + label: Is System Generated + description: Indicates whether this field was automatically created by the system + versus manually added. + - name: label + fieldtype: Data + label: Label + description: Display name shown to users for this custom form field. + - name: fieldtype + fieldtype: Select + label: Type + description: Data type of the custom field such as text, number, date, or select. + options: + - Autocomplete + - Attach + - Attach Image + - Barcode + - Button + - Check + - Code + - Color + - Column Break + - Currency + - Data + - Date + - Datetime + - Duration + - Dynamic Link + - Float + - Fold + - Geolocation + - Heading + - HTML + - HTML Editor + - Icon + - Image + - Int + - Link + - Long Text + - Markdown Editor + - Password + - Percent + - Phone + - Rating + - Read Only + - Section Break + - Select + - Signature + - Small Text + - Tab Break + - Table + - Table MultiSelect + - Text + - Text Editor + - Time + - name: fieldname + fieldtype: Data + label: Name + description: Internal database column name used to store this custom field's data. + - name: non_negative + fieldtype: Check + label: Non Negative + description: Constraint flag ensuring numeric field values cannot be negative. + - name: reqd + fieldtype: Check + label: Mandatory + description: Indicates whether this custom field is mandatory and must be filled + before saving. + - name: unique + fieldtype: Check + label: Unique + description: Used when checking if a field value must be unique across all records + to prevent duplicates. + - name: is_virtual + fieldtype: Check + label: Is Virtual + description: Used when determining if a field is computed dynamically rather than + stored in the database. + - name: in_list_view + fieldtype: Check + label: In List View + description: Used when configuring which fields appear in list views or grid displays + of records. + - name: in_standard_filter + fieldtype: Check + label: In Standard Filter + description: Used when enabling a field as a quick filter option in standard list + view filters. + - name: in_global_search + fieldtype: Check + label: In Global Search + description: Used when determining if a field's content is searchable through + the global search bar. + - name: in_preview + fieldtype: Check + label: In Preview + description: Used when configuring which fields display in hover previews or quick + view popups. + - name: bold + fieldtype: Check + label: Bold + description: Used when emphasizing important fields by making their labels appear + in bold text. + - name: no_copy + fieldtype: Check + label: No Copy + description: Used when preventing a field's value from being copied during document + duplication operations. + - name: allow_in_quick_entry + fieldtype: Check + label: Allow in Quick Entry + description: Used when enabling a field to appear in quick entry forms for rapid + data entry. + - name: translatable + fieldtype: Check + label: Translatable + description: Used when determining if a field's content can be translated into + multiple languages. + - name: link_filters + fieldtype: JSON + label: Link Filters + description: Used when applying dynamic filters to link field options based on + other field values. + - name: default + fieldtype: Small Text + label: Default + description: Used when setting the automatic initial value assigned to a field + in new records. + - name: precision + fieldtype: Select + label: Precision + description: Used when defining the number of decimal places for numeric or currency + fields. + options: + - '0' + - '1' + - '2' + - '3' + - '4' + - '5' + - '6' + - '7' + - '8' + - '9' + - name: length + fieldtype: Int + label: Length + description: Used when setting the maximum character limit for text or data fields. + - name: options + fieldtype: Small Text + label: Options + description: Used when defining the available choices for select, multi-select, + or link fields. + - name: sort_options + fieldtype: Check + label: Sort Options + description: Controls whether dropdown options are alphabetically sorted for user + selection fields. + - name: fetch_from + fieldtype: Small Text + label: Fetch From + description: Specifies the source field path from which to auto-populate this + field's value when a linked document is selected. + - name: fetch_if_empty + fieldtype: Check + label: Fetch on Save if Empty + description: Determines if auto-fetch from linked documents only occurs when the + target field is currently empty. + - name: show_dashboard + fieldtype: Check + label: Show Dashboard + description: Controls whether this field appears in dashboard views and summary + reports for quick insights. + - name: depends_on + fieldtype: Code + label: Depends On + description: Defines conditional logic expression that determines when this field + becomes visible or enabled based on other field values. + - name: permlevel + fieldtype: Int + label: Perm Level + description: Sets the permission level required for users to view or edit this + field beyond standard document permissions. + - name: hidden + fieldtype: Check + label: Hidden + description: Indicates if the field is completely hidden from the form interface + regardless of user permissions. + - name: read_only + fieldtype: Check + label: Read Only + description: Specifies whether the field displays data but prevents user editing + after initial entry or calculation. + - name: collapsible + fieldtype: Check + label: Collapsible + description: Enables the field section to be collapsed or expanded by users to + manage form layout complexity. + - name: allow_bulk_edit + fieldtype: Check + label: Allow Bulk Edit + description: Permits users to update this field across multiple records simultaneously + through bulk operations. + - name: collapsible_depends_on + fieldtype: Code + label: Collapsible Depends On + description: Defines conditional expression that controls when a collapsible section + can be expanded or collapsed. + - name: ignore_user_permissions + fieldtype: Check + label: Ignore User Permissions + description: Bypasses standard user permission restrictions when fetching or displaying + linked document data in this field. + - name: allow_on_submit + fieldtype: Check + label: Allow on Submit + description: Permits editing of this field even after the parent document has + been submitted and locked. + - name: report_hide + fieldtype: Check + label: Report Hide + description: Excludes this field from appearing in report builder and query results + to reduce clutter. + - name: remember_last_selected_value + fieldtype: Check + label: Remember Last Selected Value + description: Automatically pre-fills this field with the user's most recently + selected value in new documents. + - name: hide_border + fieldtype: Check + label: Hide Border + description: Controls whether field border is hidden in form layout for visual + customization. + - name: ignore_xss_filter + fieldtype: Check + label: Ignore XSS Filter + description: Determines if cross-site scripting filter is bypassed for this field's + content. + - name: mandatory_depends_on + fieldtype: Code + label: Mandatory Depends On + description: Defines conditional logic expression that makes field required based + on other field values. + - name: read_only_depends_on + fieldtype: Code + label: Read Only Depends On + description: Specifies conditional logic expression that makes field read-only + based on other field values. + - name: in_filter + fieldtype: Check + label: In Filter + description: Indicates if field appears as filterable option in list views and + reports. + - name: hide_seconds + fieldtype: Check + label: Hide Seconds + description: Controls whether seconds component is hidden in datetime or time + field display. + - name: hide_days + fieldtype: Check + label: Hide Days + description: Controls whether days component is hidden in duration or date range + field display. + - name: description + fieldtype: Text + label: Description + description: Stores help text or instructions displayed below the field to guide + users. + - name: placeholder + fieldtype: Data + label: Placeholder + description: Defines example text shown inside empty field to indicate expected + input format. + - name: print_hide + fieldtype: Check + label: Print Hide + description: Determines if field is excluded from printed documents and PDF outputs. + - name: print_hide_if_no_value + fieldtype: Check + label: Print Hide If No Value + description: Controls whether empty field is hidden in printed documents to save + space. + - name: print_width + fieldtype: Data + label: Print Width + description: Specifies field width in print format using CSS units or percentage. + - name: columns + fieldtype: Int + label: Columns + description: Defines number of grid columns field occupies in form layout for + responsive design. + - name: width + fieldtype: Data + label: Width + description: Sets field width in form view using CSS units or percentage. + - name: is_custom_field + fieldtype: Check + label: Is Custom Field + description: Indicates if field was added by user customization rather than standard + system field. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabCustomize Form + Field). Comparison-ready across parent records.' +- table: tabCustoms Tariff Number + description: '' + fields: + - name: tariff_number + fieldtype: Data + label: Tariff Number + description: Official harmonized system code used for customs classification and + duty calculation + - name: description + fieldtype: Data + label: Description + description: Detailed explanation of goods or product categories covered by this + tariff classification + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Customs Tariff Number document (master/transaction). Use + only for single-entity lookups, not cross-record comparison unless fields are + per-relationship (e.g. supplier, price_list).' +- table: tabDashboard + description: '' + fields: + - name: dashboard_name + fieldtype: Data + label: Dashboard Name + description: Display name of the dashboard, used when searching or filtering dashboards + by human-readable title. + - name: is_default + fieldtype: Check + label: Is Default + description: Flag indicating if this is the default dashboard for a module, used + to identify primary dashboards. + - name: is_standard + fieldtype: Check + label: Is Standard + description: Flag indicating if this is a system-provided dashboard, used to distinguish + custom from standard dashboards. + - name: module + fieldtype: Link + label: Module + description: ERP module this dashboard belongs to (e.g., Sales, Accounting), used + for filtering dashboards by functional area. + join_hint: + table: tabModule Def + 'on': module = tabModule Def.name + - name: charts + fieldtype: Table + label: Charts + description: '' + child_hint: + child_table: tabDashboard Chart Link + fieldname: charts + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: charts + - name: chart_options + fieldtype: Code + label: Chart Options + description: Configuration settings for chart display and behavior, used when + analyzing dashboard layout or customization. + - name: cards + fieldtype: Table + label: Cards + description: '' + child_hint: + child_table: tabNumber Card Link + fieldname: cards + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: cards + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Dashboard document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabDashboard Chart + description: '' + fields: + - name: is_standard + fieldtype: Check + label: Is Standard + description: Indicates if chart is system-provided or custom-built, used to filter + standard vs custom charts. + - name: module + fieldtype: Link + label: Module + description: ERP module this chart belongs to (e.g., Sales, Accounting), used + to filter charts by functional area. + join_hint: + table: tabModule Def + 'on': module = tabModule Def.name + - name: chart_name + fieldtype: Data + label: Chart Name + description: Display name of the chart shown to users, used for searching charts + by recognizable business labels. + - name: chart_type + fieldtype: Select + label: Chart Type + description: Visualization type (bar, line, pie, etc.), used when filtering charts + by specific graph format requirements. + options: + - Count + - Sum + - Average + - Group By + - Custom + - Report + - name: report_name + fieldtype: Link + label: Report Name + description: Source report providing data for this chart, used to link charts + to their underlying data reports. + join_hint: + table: tabReport + 'on': report_name = tabReport.name + - name: use_report_chart + fieldtype: Check + label: Use Report Chart + description: Flag indicating whether to use chart configuration from the linked + report, used to determine chart rendering source. + - name: x_field + fieldtype: Select + label: X Field + description: Field used for the horizontal axis or primary dimension in chart + visualization queries. + - name: y_axis + fieldtype: Table + label: Y Axis + description: '' + child_hint: + child_table: tabDashboard Chart Field + fieldname: y_axis + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: y_axis + - name: source + fieldtype: Link + label: Chart Source + description: Origin module or DocType from which the chart data is pulled. + join_hint: + table: tabDashboard Chart Source + 'on': source = tabDashboard Chart Source.name + - name: document_type + fieldtype: Link + label: Document Type + description: Primary DocType being visualized when filtering or analyzing dashboard + charts. + join_hint: + table: tabDocType + 'on': document_type = tabDocType.name + - name: parent_document_type + fieldtype: Link + label: Parent Document Type + description: Parent DocType reference used when chart data involves child table + relationships. + join_hint: + table: tabDocType + 'on': parent_document_type = tabDocType.name + - name: based_on + fieldtype: Select + label: Time Series Based On + description: Core field or dimension on which the chart aggregation or grouping + is calculated. + - name: value_based_on + fieldtype: Select + label: Value Based On + description: Specific field used to compute the numerical values displayed in + the chart. + - name: group_by_type + fieldtype: Select + label: Group By Type + description: Grouping method applied when segmenting chart data by time periods + or categories. + options: + - Count + - Sum + - Average + - name: group_by_based_on + fieldtype: Select + label: Group By Based On + description: Field used as the grouping dimension for aggregating chart data. + - name: aggregate_function_based_on + fieldtype: Select + label: Aggregate Function Based On + description: Mathematical operation (sum, count, average) applied to calculate + chart values. + - name: number_of_groups + fieldtype: Int + label: Number of Groups + description: Limit on how many categories or segments are displayed in the chart. + - name: is_public + fieldtype: Check + label: Is Public + description: Indicates whether the dashboard chart is accessible to all users + or restricted. + - name: heatmap_year + fieldtype: Select + label: Year + description: Specific year filter applied when displaying heatmap-style chart + visualizations. + - name: timespan + fieldtype: Select + label: Timespan + description: Time range or period covered by the chart data for trend analysis. + options: + - Last Year + - Last Quarter + - Last Month + - Last Week + - Select Date Range + - name: from_date + fieldtype: Date + label: From Date + description: Starting date boundary when filtering chart data by date range. + - name: to_date + fieldtype: Date + label: To Date + description: End date for filtering dashboard chart data within a specific time + range. + - name: time_interval + fieldtype: Select + label: Time Interval + description: Defines the time grouping period (daily, weekly, monthly) for aggregating + chart data. + options: + - Yearly + - Quarterly + - Monthly + - Weekly + - Daily + - name: timeseries + fieldtype: Check + label: Time Series + description: Indicates whether the chart displays data over time for trend analysis. + - name: type + fieldtype: Select + label: Type + description: Specifies the chart visualization format (bar, line, pie) used to + display data. + options: + - Line + - Bar + - Percentage + - Pie + - Donut + - Heatmap + - name: show_values_over_chart + fieldtype: Check + label: Show Values over Chart + description: Controls whether numeric data labels appear directly on chart elements + for quick reference. + - name: currency + fieldtype: Link + label: Currency + description: Defines the currency used for monetary values displayed in financial + charts. + join_hint: + table: tabCurrency + 'on': currency = tabCurrency.name + - name: filters_json + fieldtype: Code + label: Filters JSON + description: Stores static filter criteria applied to limit chart data to specific + conditions. + - name: dynamic_filters_json + fieldtype: Code + label: Dynamic Filters JSON + description: Contains user-adjustable filter parameters that change chart data + interactively. + - name: custom_options + fieldtype: Code + label: Custom Options + description: Holds additional chart configuration settings beyond standard properties. + - name: last_synced_on + fieldtype: Datetime + label: Last Synced On + description: Timestamp indicating when chart data was last refreshed from source + systems. + - name: roles + fieldtype: Table + label: Roles + description: '' + child_hint: + child_table: tabHas Role + fieldname: roles + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: roles + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Dashboard Chart document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabDashboard Chart Field + description: '' + fields: + - name: y_field + fieldtype: Select + label: Y Field + description: Data field mapped to the Y-axis for chart visualization and metrics + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabDashboard Chart + Field). Comparison-ready across parent records.' +- table: tabDashboard Chart Link + description: '' + fields: + - name: chart + fieldtype: Link + label: Chart + description: Reference to the specific chart being linked to this dashboard. + join_hint: + table: tabDashboard Chart + 'on': chart = tabDashboard Chart.name + - name: width + fieldtype: Select + label: Width + description: Display width allocation for the chart on the dashboard layout. + options: + - Half + - Full + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabDashboard Chart + Link). Comparison-ready across parent records.' +- table: tabDashboard Chart Source + description: '' + fields: + - name: source_name + fieldtype: Data + label: Source Name + description: Name of the data source or report feeding this chart, used to identify + which data populates the visualization. + - name: module + fieldtype: Link + label: Module + description: ERP module (Sales, Accounting, HR, etc.) this chart belongs to, used + for filtering charts by functional area. + join_hint: + table: tabModule Def + 'on': module = tabModule Def.name + - name: timeseries + fieldtype: Check + label: Timeseries + description: Indicates if the chart displays time-based data, used when filtering + for trend or historical analysis charts. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Dashboard Chart Source document (master/transaction). Use + only for single-entity lookups, not cross-record comparison unless fields are + per-relationship (e.g. supplier, price_list).' +- table: tabDashboard Settings + description: '' + fields: + - name: user + fieldtype: Link + label: User + description: Specific user assigned to these dashboard settings, used when filtering + personalized dashboard views or user-specific configurations. + join_hint: + table: tabUser + 'on': user = tabUser.name + - name: chart_config + fieldtype: Code + label: Chart Configuration + description: JSON configuration defining chart properties and data sources, used + when rendering or customizing dashboard visualizations. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Dashboard Settings document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabData Import + description: '' + fields: + - name: reference_doctype + fieldtype: Link + label: Document Type + description: Target doctype being imported into (e.g., Customer, Item), used to + filter imports by destination entity type. + join_hint: + table: tabDocType + 'on': reference_doctype = tabDocType.name + - name: import_type + fieldtype: Select + label: Import Type + description: Method of import (Insert, Update, or Insert/Update), used to determine + how data will be processed. + options: + - Insert New Records + - Update Existing Records + - name: payload_count + fieldtype: Int + label: Payload Count + description: Number of records in the import file, used to assess import size + and track processing volume. + - name: google_sheets_url + fieldtype: Data + label: Import from Google Sheets + description: URL of Google Sheets source, used when importing directly from cloud + spreadsheets. + - name: status + fieldtype: Select + label: Status + description: Current processing status (Pending, Success, Failed), used to monitor + import completion and troubleshoot errors. + options: + - Pending + - Success + - Partial Success + - Error + - Timed Out + - name: submit_after_import + fieldtype: Check + label: Submit After Import + description: Controls whether imported records are automatically submitted after + import completion, used when users need records immediately active in workflows. + - name: mute_emails + fieldtype: Check + label: Don't Send Emails + description: Suppresses automated email notifications during bulk import operations, + used to prevent notification spam when importing large datasets. + - name: template_options + fieldtype: Code + label: Template Options + description: Defines available column mapping and transformation choices for the + import template, used when configuring how source data maps to system fields. + - name: template_warnings + fieldtype: Code + label: Template Warnings + description: Displays validation warnings about template configuration issues, + used to identify potential data quality problems before executing the import. + - name: show_failed_logs + fieldtype: Check + label: Show Only Failed Logs + description: Toggles visibility of error records and failure details from import + execution, used when troubleshooting why specific records failed to import. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Data Import document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabData Import Log + description: '' + fields: + - name: data_import + fieldtype: Link + label: Data Import + description: Reference to the main Data Import document, used when querying all + logs associated with a specific import job. + join_hint: + table: tabData Import + 'on': data_import = tabData Import.name + - name: row_indexes + fieldtype: Code + label: Row Indexes + description: Comma-separated list of row numbers from the source file that this + log entry relates to, used when identifying which data rows succeeded or failed. + - name: success + fieldtype: Check + label: Success + description: Boolean flag indicating whether the import operation for these rows + succeeded, used for filtering successful versus failed imports. + - name: docname + fieldtype: Data + label: Reference Name + description: Name of the document that was created or updated during import, used + when tracking which records were affected by the import. + - name: messages + fieldtype: Code + label: Messages + description: User-friendly messages or warnings generated during the import process, + used for understanding import outcomes without technical details. + - name: exception + fieldtype: Text + label: Exception + description: Technical error details or stack trace if the import failed, used + for debugging and troubleshooting failed import operations. + - name: log_index + fieldtype: Int + label: Log Index + description: Unique identifier for tracking individual data import operations, + used when investigating specific import failures or auditing import history + chronologically. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Data Import Log document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabDefaultValue + description: '' + fields: + - name: defkey + fieldtype: Data + label: Key + description: Key or field name for which this default value applies. + - name: defvalue + fieldtype: Text + label: Value + description: The actual default value that will be applied to the specified key. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabDefaultValue). + Comparison-ready across parent records.' +- table: tabDeleted Document + description: '' + fields: + - name: deleted_name + fieldtype: Data + label: Deleted Name + description: Original name/ID of the document before deletion, used to search + and identify deleted records. + - name: deleted_doctype + fieldtype: Data + label: Deleted DocType + description: Type of document that was deleted, used to filter deleted records + by module or entity type. + - name: restored + fieldtype: Check + label: Restored + description: Flag indicating whether this deleted document has been restored, + used to track recovery actions. + - name: data + fieldtype: Code + label: Data + description: Serialized content of the deleted document, used for restoration + or audit review of deleted information. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Deleted Document document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabDelivery Note + description: '' + fields: + - name: title + fieldtype: Data + label: Title + description: Custom display name or label for the delivery note, used when users + want to reference a specific delivery by a memorable name instead of the system + identifier. + - name: naming_series + fieldtype: Select + label: Series + description: Prefix pattern that determines how delivery note identifiers are + automatically formatted and numbered. + options: + - MAT-DN-.YYYY.- + - MAT-DN-RET-.YYYY.- + - name: customer + fieldtype: Link + label: Customer + description: Customer account identifier for the recipient of the delivered goods + join_hint: + table: tabCustomer + 'on': customer = tabCustomer.name + - name: tax_id + fieldtype: Data + label: Tax Id + description: Tax identification number of the customer receiving the delivery + - name: customer_name + fieldtype: Data + label: Customer Name + description: Name of the customer receiving the delivery, used when searching + by company or person name rather than account code + - name: posting_date + fieldtype: Date + label: Date + description: Date when the delivery note is officially recorded in the accounting + system, used for financial period tracking and reporting queries. + - name: posting_time + fieldtype: Time + label: Posting Time + description: Time when the delivery note is officially recorded, used when precise + timestamp queries are needed beyond just the date. + - name: set_posting_time + fieldtype: Check + label: Edit Posting Date and Time + description: Indicates whether the posting date and time were manually specified + rather than automatically set at creation. + - name: company + fieldtype: Link + label: Company + description: The company entity that issued or owns this delivery note. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: amended_from + fieldtype: Link + label: Amended From + description: References the original delivery note that this document amends or + corrects. + join_hint: + table: tabDelivery Note + 'on': amended_from = tabDelivery Note.name + - name: is_return + fieldtype: Check + label: Is Return + description: Indicates whether this delivery note represents a return of goods + from customer back to supplier. + - name: issue_credit_note + fieldtype: Check + label: Issue Credit Note + description: Whether a credit note should be issued for this delivery note, typically + queried when processing returns or customer refunds. + - name: return_against + fieldtype: Link + label: Return Against Delivery Note + description: Reference to the original delivery note that this return delivery + is against, used to track which shipment is being returned. + join_hint: + table: tabDelivery Note + 'on': return_against = tabDelivery Note.name + - name: cost_center + fieldtype: Link + label: Cost Center + description: The cost center assigned to this delivery for accounting allocation + and expense tracking purposes. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + - name: project + fieldtype: Link + label: Project + description: Project associated with the delivery for tracking shipments by project + or job + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: currency + fieldtype: Link + label: Currency + description: Currency in which the delivery note transaction is recorded + join_hint: + table: tabCurrency + 'on': currency = tabCurrency.name + - name: conversion_rate + fieldtype: Float + label: Exchange Rate + description: Exchange rate used to convert delivery note amounts from transaction + currency to base currency + - name: selling_price_list + fieldtype: Link + label: Price List + description: Price list applied to determine item selling prices for this delivery + join_hint: + table: tabPrice List + 'on': selling_price_list = tabPrice List.name + - name: price_list_currency + fieldtype: Link + label: Price List Currency + description: Currency of the price list used for this delivery's item pricing + join_hint: + table: tabCurrency + 'on': price_list_currency = tabCurrency.name + - name: plc_conversion_rate + fieldtype: Float + label: Price List Exchange Rate + description: Exchange rate used to convert price list currency to delivery transaction + currency + - name: ignore_pricing_rule + fieldtype: Check + label: Ignore Pricing Rule + description: Whether pricing rules are bypassed for this delivery note, relevant + when users ask about deliveries with manual pricing or exceptions to standard + pricing. + - name: scan_barcode + fieldtype: Data + label: Scan Barcode + description: Barcode value scanned during delivery processing, used when users + search for deliveries by scanned barcode or track barcode-based fulfillment. + - name: last_scanned_warehouse + fieldtype: Data + label: Last Scanned Warehouse + description: Most recent warehouse where a barcode scan occurred for this delivery, + relevant when users ask which warehouse location last processed or scanned items. + - name: set_warehouse + fieldtype: Link + label: Set Source Warehouse + description: Source warehouse from which items are being delivered or dispatched + in this delivery note. + join_hint: + table: tabWarehouse + 'on': set_warehouse = tabWarehouse.name + - name: set_target_warehouse + fieldtype: Link + label: Set Target Warehouse + description: Destination warehouse to which items are being transferred when the + delivery note involves inter-warehouse stock movement. + join_hint: + table: tabWarehouse + 'on': set_target_warehouse = tabWarehouse.name + - name: items + fieldtype: Table + label: Delivery Note Item + description: '' + child_hint: + child_table: tabDelivery Note Item + fieldname: items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: items + - name: total_qty + fieldtype: Float + label: Total Quantity + description: Total quantity of all items in the delivery note, used when asking + about total units delivered or shipped. + - name: total_net_weight + fieldtype: Float + label: Total Net Weight + description: Combined net weight of all items in the delivery note, used when + asking about shipment weight or logistics calculations. + - name: base_total + fieldtype: Currency + label: Total (Company Currency) + description: Total value of the delivery note in base currency before taxes and + charges, used when asking about delivery value or goods amount. + - name: base_net_total + fieldtype: Currency + label: Net Total (Company Currency) + description: Net total amount in base currency before taxes and after discounts, + used when querying delivery note values in company's default currency. + - name: total + fieldtype: Currency + label: Total + description: Grand total amount including all taxes, charges, and discounts in + transaction currency, used when querying final delivery note value. + - name: net_total + fieldtype: Currency + label: Net Total + description: Net total amount in transaction currency before taxes and after discounts, + used when querying pre-tax delivery note values in the currency of the transaction. + - name: tax_category + fieldtype: Link + label: Tax Category + description: Tax classification applied to the delivery note determining which + tax rates and rules apply to the shipment. + join_hint: + table: tabTax Category + 'on': tax_category = tabTax Category.name + - name: taxes_and_charges + fieldtype: Link + label: Sales Taxes and Charges Template + description: Template or configuration defining the specific tax types, rates, + and additional charges calculated on this delivery note. + join_hint: + table: tabSales Taxes and Charges Template + 'on': taxes_and_charges = tabSales Taxes and Charges Template.name + - name: shipping_rule + fieldtype: Link + label: Shipping Rule + description: Rule or policy governing shipping costs, carrier selection, or delivery + terms applied to this delivery note. + join_hint: + table: tabShipping Rule + 'on': shipping_rule = tabShipping Rule.name + - name: incoterm + fieldtype: Link + label: Incoterm + description: Shipping terms code defining responsibility transfer point between + seller and buyer such as FOB, CIF, or EXW for this delivery. + join_hint: + table: tabIncoterm + 'on': incoterm = tabIncoterm.name + - name: named_place + fieldtype: Data + label: Named Place + description: Specific geographic location associated with the incoterm where responsibility + transfers, such as port name or warehouse address. + - name: taxes + fieldtype: Table + label: Sales Taxes and Charges + description: '' + child_hint: + child_table: tabSales Taxes and Charges + fieldname: taxes + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: taxes + - name: base_total_taxes_and_charges + fieldtype: Currency + label: Total Taxes and Charges (Company Currency) + description: Total amount of all taxes and charges in base currency, used when + analyzing delivery note tax totals in company's default currency. + - name: total_taxes_and_charges + fieldtype: Currency + label: Total Taxes and Charges + description: Total amount of all taxes and charges in transaction currency, used + when querying delivery note tax totals in the currency of the specific transaction. + - name: base_grand_total + fieldtype: Currency + label: Grand Total (Company Currency) + description: Final total amount including all items, taxes and charges in base + currency, used when analyzing complete delivery note values in company's default + currency. + - name: base_rounding_adjustment + fieldtype: Currency + label: Rounding Adjustment (Company Currency) + description: Amount added or subtracted to round the total to a convenient value + in base currency. + - name: base_rounded_total + fieldtype: Currency + label: Rounded Total (Company Currency) + description: Final total amount after applying rounding adjustment in base currency. + - name: base_in_words + fieldtype: Data + label: In Words (Company Currency) + description: Text representation of the base currency total amount written out + in words for formal documentation. + - name: grand_total + fieldtype: Currency + label: Grand Total + description: Total delivery value before any rounding adjustments are applied + - name: rounding_adjustment + fieldtype: Currency + label: Rounding Adjustment + description: Amount added or subtracted to round the grand total to a convenient + figure + - name: rounded_total + fieldtype: Currency + label: Rounded Total + description: Final delivery total after applying rounding adjustment to the grand + total + - name: in_words + fieldtype: Data + label: In Words + description: Total amount expressed as text words for printing on delivery documents + - name: disable_rounded_total + fieldtype: Check + label: Disable Rounded Total + description: Whether rounding is disabled for the delivery note total amount + - name: apply_discount_on + fieldtype: Select + label: Apply Additional Discount On + description: Whether discounts are calculated on grand total or net total before + taxes + options: + - Grand Total + - Net Total + - name: base_discount_amount + fieldtype: Currency + label: Additional Discount Amount (Company Currency) + description: Discount amount calculated from line item discounts before applying + any additional document-level discounts. + - name: additional_discount_percentage + fieldtype: Float + label: Additional Discount Percentage + description: Extra percentage discount applied at the delivery note level after + base discounts. + - name: discount_amount + fieldtype: Currency + label: Additional Discount Amount + description: Total final discount amount on the delivery note combining base and + additional discounts. + - name: other_charges_calculation + fieldtype: Text Editor + label: Taxes and Charges Calculation + description: Additional fees or charges applied to the delivery beyond standard + item costs, such as handling fees, fuel surcharges, or packaging costs. + - name: packed_items + fieldtype: Table + label: Packed Items + description: '' + child_hint: + child_table: tabPacked Item + fieldname: packed_items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: packed_items + - name: pricing_rules + fieldtype: Table + label: Pricing Rule Detail + description: '' + child_hint: + child_table: tabPricing Rule Detail + fieldname: pricing_rules + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: pricing_rules + - name: customer_address + fieldtype: Link + label: Billing Address Name + description: Linked customer address record for the delivery destination, used + when filtering or grouping deliveries by specific customer address IDs or address + records. + join_hint: + table: tabAddress + 'on': customer_address = tabAddress.name + - name: address_display + fieldtype: Small Text + label: Billing Address + description: Formatted full delivery address text as it appears on shipping labels + and delivery documents. + - name: contact_person + fieldtype: Link + label: Contact Person + description: Specific person to contact at the delivery location for coordination, + receipt confirmation, or delivery issues. + join_hint: + table: tabContact + 'on': contact_person = tabContact.name + - name: contact_display + fieldtype: Small Text + label: Contact + description: Name of the person to contact regarding this delivery note for questions + about shipment receipt or delivery issues + - name: contact_mobile + fieldtype: Small Text + label: Mobile No + description: Mobile phone number to reach the delivery contact person for urgent + delivery coordination or real-time shipment updates + - name: contact_email + fieldtype: Data + label: Contact Email + description: Email address of the delivery contact person for non-urgent delivery + communications or documentation requests + - name: shipping_address_name + fieldtype: Link + label: Shipping Address + description: Name of the recipient or location where goods are being delivered + to. + join_hint: + table: tabAddress + 'on': shipping_address_name = tabAddress.name + - name: shipping_address + fieldtype: Small Text + label: Shipping Address + description: Full address details where goods are being shipped or delivered to + the customer. + - name: dispatch_address_name + fieldtype: Link + label: Dispatch Address Name + description: Name of the warehouse, facility, or location from which goods are + being sent out. + join_hint: + table: tabAddress + 'on': dispatch_address_name = tabAddress.name + - name: dispatch_address + fieldtype: Small Text + label: Dispatch Address + description: Address from which goods are physically shipped or dispatched to + the customer. + - name: company_address + fieldtype: Link + label: Company Address Name + description: Official registered address of the company issuing the delivery note. + join_hint: + table: tabAddress + 'on': company_address = tabAddress.name + - name: company_address_display + fieldtype: Small Text + label: Company Address + description: Formatted version of the company address as it appears on printed + delivery note documents. + - name: company_contact_person + fieldtype: Link + label: Company Contact Person + description: Contact person at the company receiving the delivery, used when users + ask who to coordinate with or who accepted the shipment. + join_hint: + table: tabContact + 'on': company_contact_person = tabContact.name + - name: tc_name + fieldtype: Link + label: Terms + description: Name of the terms and conditions template applied to this delivery + note, used when users ask about contractual terms or legal agreements governing + the delivery. + join_hint: + table: tabTerms and Conditions + 'on': tc_name = tabTerms and Conditions.name + - name: terms + fieldtype: Text Editor + label: Terms and Conditions Details + description: Full text or details of the specific terms and conditions for this + delivery, used when users need the actual contractual language or delivery stipulations. + - name: per_billed + fieldtype: Percent + label: '% Amount Billed' + description: Percentage of the delivery note that has been invoiced to the customer + - name: status + fieldtype: Select + label: Status + description: Current state of the delivery note such as draft, submitted, completed, + or cancelled + options: + - Draft + - To Bill + - Completed + - Return Issued + - Cancelled + - Closed + - name: per_installed + fieldtype: Percent + label: '% Installed' + description: Percentage of delivered items that have been installed at the customer + location + - name: installation_status + fieldtype: Select + label: Installation Status + description: Status indicating whether delivered items have been installed at + the customer site + - name: per_returned + fieldtype: Percent + label: '% Returned' + description: Percentage of delivered items that have been returned by the customer + - name: transporter + fieldtype: Link + label: Transporter + description: Shipping company or carrier responsible for delivering the goods + to the customer + join_hint: + table: tabSupplier + 'on': transporter = tabSupplier.name + - name: driver + fieldtype: Link + label: Driver + description: Name or identifier of the person driving the delivery vehicle for + this shipment + join_hint: + table: tabDriver + 'on': driver = tabDriver.name + - name: lr_no + fieldtype: Data + label: Transport Receipt No + description: Lorry receipt number or consignment note number issued by the transporter + for tracking the shipment + - name: vehicle_no + fieldtype: Data + label: Vehicle No + description: Registration or license plate number of the vehicle used for delivery + - name: transporter_name + fieldtype: Data + label: Transporter Name + description: Name of the logistics company or carrier responsible for shipping + the goods. + - name: driver_name + fieldtype: Data + label: Driver Name + description: Name of the person driving the vehicle delivering the goods. + - name: lr_date + fieldtype: Date + label: Transport Receipt Date + description: Date on the lorry receipt or transport document, indicating when + goods were handed to the transporter. + - name: po_no + fieldtype: Small Text + label: Customer's Purchase Order No + description: Customer's purchase order number referenced when tracking or matching + deliveries to customer orders. + - name: po_date + fieldtype: Date + label: Customer's Purchase Order Date + description: Date of the customer's purchase order used when filtering or sorting + deliveries by when the customer placed their order. + - name: sales_partner + fieldtype: Link + label: Sales Partner + description: Third-party partner or agent involved in the sale, referenced when + analyzing partner performance or filtering deliveries by sales channel. + join_hint: + table: tabSales Partner + 'on': sales_partner = tabSales Partner.name + - name: amount_eligible_for_commission + fieldtype: Currency + label: Amount Eligible for Commission + description: The portion of the delivery note value that qualifies for sales commission + calculation, excluding non-commissionable items or adjustments. + - name: commission_rate + fieldtype: Float + label: Commission Rate (%) + description: The percentage rate applied to calculate commission for this delivery + note, typically based on salesperson, product category, or customer terms. + - name: total_commission + fieldtype: Currency + label: Total Commission + description: The final commission amount earned on this delivery note, calculated + from the eligible amount and commission rate. + - name: sales_team + fieldtype: Table + label: Sales Team + description: '' + child_hint: + child_table: tabSales Team + fieldname: sales_team + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: sales_team + - name: auto_repeat + fieldtype: Link + label: Auto Repeat + description: Indicates if this delivery note is part of a recurring delivery schedule + or subscription-based fulfillment pattern. + join_hint: + table: tabAuto Repeat + 'on': auto_repeat = tabAuto Repeat.name + - name: letter_head + fieldtype: Link + label: Letter Head + description: The letterhead template or branding format applied to the printed + or PDF version of this delivery note. + join_hint: + table: tabLetter Head + 'on': letter_head = tabLetter Head.name + - name: print_without_amount + fieldtype: Check + label: Print Without Amount + description: Controls whether delivery note prints with or without monetary amounts + shown + - name: group_same_items + fieldtype: Check + label: Group same items + description: Controls whether identical items are consolidated into single lines + on the delivery note + - name: select_print_heading + fieldtype: Link + label: Print Heading + description: Custom heading or title to display when printing the delivery note + join_hint: + table: tabPrint Heading + 'on': select_print_heading = tabPrint Heading.name + - name: language + fieldtype: Data + label: Print Language + description: Language code for delivery note document generation and customer + communication preferences. + - name: is_internal_customer + fieldtype: Check + label: Is Internal Customer + description: Indicates whether the delivery is to an internal company entity or + external customer for inter-company transfer tracking. + - name: represents_company + fieldtype: Link + label: Represents Company + description: Company entity that this delivery note is issued on behalf of in + multi-company or branch scenarios. + join_hint: + table: tabCompany + 'on': represents_company = tabCompany.name + - name: inter_company_reference + fieldtype: Link + label: Inter Company Reference + description: Links to the corresponding purchase receipt or sales invoice when + goods are transferred between related company entities. + join_hint: + table: tabPurchase Receipt + 'on': inter_company_reference = tabPurchase Receipt.name + - name: customer_group + fieldtype: Link + label: Customer Group + description: Classification or category of the customer receiving the delivery, + used for filtering deliveries by customer segment or type. + join_hint: + table: tabCustomer Group + 'on': customer_group = tabCustomer Group.name + - name: territory + fieldtype: Link + label: Territory + description: Geographic region or sales area assigned to the customer receiving + the delivery, used for location-based delivery analysis. + join_hint: + table: tabTerritory + 'on': territory = tabTerritory.name + - name: source + fieldtype: Link + label: Source + description: Origin or channel through which the delivery order was created or + received, such as sales order, purchase return, or stock transfer. + join_hint: + table: tabLead Source + 'on': source = tabLead Source.name + - name: campaign + fieldtype: Link + label: Campaign + description: Marketing campaign associated with the delivery to track promotional + or seasonal fulfillment activities. + join_hint: + table: tabCampaign + 'on': campaign = tabCampaign.name + - name: excise_page + fieldtype: Data + label: Excise Page Number + description: Page number or reference in excise documentation for regulatory compliance + tracking of taxable goods delivery. + - name: instructions + fieldtype: Text + label: Instructions + description: Special handling instructions, delivery notes, or specific requirements + provided for the delivery personnel or recipient. + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Delivery Note document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabDelivery Note Item + description: '' + fields: + - name: barcode + fieldtype: Data + label: Barcode + description: Barcode value scanned or associated with the delivered item for tracking + and verification. + - name: has_item_scanned + fieldtype: Check + label: Has Item Scanned + description: Indicates whether the item was physically scanned during the delivery + process. + - name: item_code + fieldtype: Link + label: Item Code + description: Internal product identifier used when asking about specific items + delivered or shipped to customers. + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: item_name + fieldtype: Data + label: Item Name + description: Product name or description used when asking about delivered items + by their common or display name. + - name: customer_item_code + fieldtype: Data + label: Customer's Item Code + description: Customer's own product identifier or SKU used when asking about deliveries + using the customer's naming convention rather than internal codes. + - name: description + fieldtype: Text Editor + label: Description + description: Text describing the specific item being delivered, used when searching + for what products or goods were included in a delivery. + - name: brand + fieldtype: Link + label: Brand Name + description: Brand or manufacturer name of the delivered item, used when filtering + or searching deliveries by product brand. + join_hint: + table: tabBrand + 'on': brand = tabBrand.name + - name: item_group + fieldtype: Link + label: Item Group + description: Category or classification grouping of the delivered item, used when + analyzing deliveries by product type or category. + join_hint: + table: tabItem Group + 'on': item_group = tabItem Group.name + - name: qty + fieldtype: Float + label: Quantity + description: Quantity of items actually delivered in this delivery note line. + - name: stock_uom + fieldtype: Link + label: Stock UOM + description: Unit of measurement for the delivered quantity (e.g., pieces, kg, + liters). + join_hint: + table: tabUOM + 'on': stock_uom = tabUOM.name + - name: uom + fieldtype: Link + label: UOM + description: Unit of measurement for the delivered item quantity (e.g., boxes, + kg, pieces) as recorded on the delivery note. + join_hint: + table: tabUOM + 'on': uom = tabUOM.name + - name: conversion_factor + fieldtype: Float + label: UOM Conversion Factor + description: Multiplier to convert the delivery note item quantity from its UOM + to the base stock UOM. + - name: stock_qty + fieldtype: Float + label: Qty in Stock UOM + description: Quantity of the delivered item expressed in the base stock UOM after + applying the conversion factor. + - name: returned_qty + fieldtype: Float + label: Returned Qty in Stock UOM + description: Quantity of items returned from this delivery, used when tracking + customer returns or partial rejections against delivered goods. + - name: price_list_rate + fieldtype: Currency + label: Price List Rate + description: Item selling price from the price list in transaction currency, used + when verifying pricing or analyzing delivery values before currency conversion. + - name: base_price_list_rate + fieldtype: Currency + label: Price List Rate (Company Currency) + description: Item selling price from the price list in company base currency, + used for standardized financial reporting and multi-currency delivery analysis. + - name: margin_type + fieldtype: Select + label: Margin Type + description: Indicates whether the margin is calculated as a percentage or fixed + amount on the delivered item. + options: + - Percentage + - Amount + - name: margin_rate_or_amount + fieldtype: Float + label: Margin Rate or Amount + description: The numeric value of the margin applied, interpreted based on margin_type + as either a percentage rate or absolute amount. + - name: rate_with_margin + fieldtype: Currency + label: Rate With Margin + description: The final unit price of the delivered item after applying the margin + to the base rate. + - name: discount_percentage + fieldtype: Float + label: Discount (%) on Price List Rate with Margin + description: Percentage discount applied directly to this delivery note item line. + - name: discount_amount + fieldtype: Currency + label: Discount Amount + description: Monetary discount applied directly to this delivery note item line. + - name: distributed_discount_amount + fieldtype: Currency + label: Distributed Discount Amount + description: Portion of header-level or document-level discount allocated to this + specific item line. + - name: base_rate_with_margin + fieldtype: Currency + label: Rate With Margin (Company Currency) + description: Unit price including margin adjustments before applying currency + conversion or taxes, used when analyzing pricing with markup. + - name: rate + fieldtype: Currency + label: Rate + description: Final unit price applied to the delivery note item after all adjustments + including currency conversion. + - name: amount + fieldtype: Currency + label: Amount + description: Total line value for the delivered quantity calculated as rate multiplied + by quantity. + - name: base_rate + fieldtype: Currency + label: Rate (Company Currency) + description: Unit price in company's base currency before applying pricing rules + or discounts. + - name: base_amount + fieldtype: Currency + label: Amount (Company Currency) + description: Total line amount in company's base currency before applying pricing + rules or discounts. + - name: pricing_rules + fieldtype: Small Text + label: Pricing Rules + description: Applied promotional or contractual pricing rules that modified the + standard rate for this delivery. + - name: stock_uom_rate + fieldtype: Currency + label: Rate of Stock UOM + description: Rate per stock unit of measure, used when querying item pricing in + base inventory units rather than transaction units. + - name: is_free_item + fieldtype: Check + label: Is Free Item + description: Indicates whether the item was given at no charge as a promotional + or complimentary item in the delivery. + - name: grant_commission + fieldtype: Check + label: Grant Commission + description: Indicates whether this delivered item is eligible for sales commission + calculation. + - name: net_rate + fieldtype: Currency + label: Net Rate + description: Unit price of the delivered item excluding taxes, used when calculating + pre-tax line totals or comparing prices before tax application. + - name: net_amount + fieldtype: Currency + label: Net Amount + description: Total line amount for the delivered item excluding taxes, used when + analyzing delivery value before tax or reconciling pre-tax revenue. + - name: item_tax_template + fieldtype: Link + label: Item Tax Template + description: Tax configuration applied to the delivered item, used when identifying + which tax rules or rates govern this specific item on the delivery note. + join_hint: + table: tabItem Tax Template + 'on': item_tax_template = tabItem Tax Template.name + - name: base_net_rate + fieldtype: Currency + label: Net Rate (Company Currency) + description: Unit price in company base currency after discounts but before taxes, + used when analyzing delivery pricing in standard currency. + - name: base_net_amount + fieldtype: Currency + label: Net Amount (Company Currency) + description: Total line amount in company base currency after discounts but before + taxes, used when analyzing delivery values in standard currency. + - name: billed_amt + fieldtype: Currency + label: Billed Amt + description: Amount already invoiced for this delivery note item, used to track + billing progress or identify unbilled deliveries. + - name: incoming_rate + fieldtype: Currency + label: Incoming Rate + description: Purchase or acquisition cost per unit of the item at the time of + receipt, used when analyzing cost basis or margins on delivered goods. + - name: weight_per_unit + fieldtype: Float + label: Weight Per Unit + description: Weight of a single unit of the item, used when calculating shipping + costs or total weight from quantity. + - name: total_weight + fieldtype: Float + label: Total Weight + description: Combined weight of all units of this item in the delivery, used for + freight calculations and logistics planning. + - name: weight_uom + fieldtype: Link + label: Weight UOM + description: Unit of measurement for the item's weight on this delivery note line. + join_hint: + table: tabUOM + 'on': weight_uom = tabUOM.name + - name: warehouse + fieldtype: Link + label: Warehouse + description: Source warehouse from which the item is being delivered or shipped. + join_hint: + table: tabWarehouse + 'on': warehouse = tabWarehouse.name + - name: target_warehouse + fieldtype: Link + label: Target Warehouse + description: Destination warehouse to which the item is being transferred in warehouse-to-warehouse + delivery transactions. + join_hint: + table: tabWarehouse + 'on': target_warehouse = tabWarehouse.name + - name: quality_inspection + fieldtype: Link + label: Quality Inspection + description: Quality inspection record associated with this delivered item for + tracking inspection results and compliance. + join_hint: + table: tabQuality Inspection + 'on': quality_inspection = tabQuality Inspection.name + - name: allow_zero_valuation_rate + fieldtype: Check + label: Allow Zero Valuation Rate + description: Indicates whether this delivery note item can have a zero inventory + valuation rate. + - name: against_sales_order + fieldtype: Link + label: Against Sales Order + description: Sales order that this delivery note item is fulfilling or linked + to. + join_hint: + table: tabSales Order + 'on': against_sales_order = tabSales Order.name + - name: so_detail + fieldtype: Data + label: Against Sales Order Item + description: Links this delivery note item to the originating sales order line + item. + - name: against_sales_invoice + fieldtype: Link + label: Against Sales Invoice + description: Links this delivery note item to the sales invoice it was billed + against. + join_hint: + table: tabSales Invoice + 'on': against_sales_invoice = tabSales Invoice.name + - name: si_detail + fieldtype: Data + label: Against Sales Invoice Item + description: Links this delivery note item to the specific sales invoice line + item it corresponds to. + - name: dn_detail + fieldtype: Data + label: Against Delivery Note Item + description: Unique identifier for the delivery note item line, referenced when + querying specific items within a delivery note. + - name: against_pick_list + fieldtype: Link + label: Against Pick List + description: Indicates whether this delivery note item was created from a pick + list, used to filter or identify items originating from warehouse picking operations. + join_hint: + table: tabPick List + 'on': against_pick_list = tabPick List.name + - name: pick_list_item + fieldtype: Data + label: Pick List Item + description: Links to the specific pick list item that generated this delivery + note item, used to trace back to the original picking instruction. + - name: serial_and_batch_bundle + fieldtype: Link + label: Serial and Batch Bundle + description: Reference to bundled serial and batch number tracking when items + use the bundle-based inventory system for lot traceability. + join_hint: + table: tabSerial and Batch Bundle + 'on': serial_and_batch_bundle = tabSerial and Batch Bundle.name + - name: use_serial_batch_fields + fieldtype: Check + label: Use Serial No / Batch Fields + description: Indicates whether this delivery note item uses individual serial/batch + fields instead of the bundle system for tracking. + - name: serial_no + fieldtype: Text + label: Serial No + description: Specific serial number assigned to this delivered item for individual + unit traceability and warranty tracking. + - name: batch_no + fieldtype: Link + label: Batch No + description: Batch or lot number assigned to the delivered items for traceability + and inventory tracking purposes. + join_hint: + table: tabBatch + 'on': batch_no = tabBatch.name + - name: actual_qty + fieldtype: Float + label: Qty (Warehouse) + description: Total quantity of items actually delivered in the base unit of measure. + - name: actual_batch_qty + fieldtype: Float + label: Available Batch Qty at From Warehouse + description: Quantity actually delivered for the specific batch referenced in + this line item. + - name: company_total_stock + fieldtype: Float + label: Qty (Company) + description: Total stock quantity available across the entire company for the + item being delivered. + - name: installed_qty + fieldtype: Float + label: Installed Qty + description: Quantity of items that have been installed at the customer location + as part of the delivery. + - name: packed_qty + fieldtype: Float + label: Packed Qty + description: Quantity of items that have been packed for this delivery note. + - name: received_qty + fieldtype: Float + label: Received Qty + description: Quantity of items actually received against this delivery note line, + used when verifying shipment fulfillment or tracking receipt discrepancies. + - name: expense_account + fieldtype: Link + label: Expense Account + description: General ledger account charged for this delivered item when it represents + an expense rather than inventory. + join_hint: + table: tabAccount + 'on': expense_account = tabAccount.name + - name: item_tax_rate + fieldtype: Small Text + label: Item Tax Rate + description: Tax percentage or rate applied to this specific delivery note item + for calculating tax amounts. + - name: material_request + fieldtype: Link + label: Material Request + description: Links delivery note item to the original material request that initiated + the procurement process. + join_hint: + table: tabMaterial Request + 'on': material_request = tabMaterial Request.name + - name: purchase_order + fieldtype: Link + label: Purchase Order + description: Links delivery note item to the purchase order document used to order + the goods from the supplier. + join_hint: + table: tabPurchase Order + 'on': purchase_order = tabPurchase Order.name + - name: purchase_order_item + fieldtype: Data + label: Purchase Order Item + description: Links delivery note item to the specific line item on the purchase + order that corresponds to this delivered item. + - name: material_request_item + fieldtype: Data + label: Material Request Item + description: Links this delivery to the original material request line item that + triggered the procurement or fulfillment. + - name: cost_center + fieldtype: Link + label: Cost Center + description: Identifies which department or business unit should be charged for + this delivered item's costs. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + - name: project + fieldtype: Link + label: Project + description: Associates this delivered item with a specific project for tracking + project-related shipments and expenses. + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: page_break + fieldtype: Check + label: Page Break + description: Indicates whether a page break should occur before this delivery + note item when printing or generating documents. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabDelivery Note + Item). Comparison-ready across parent records.' +- table: tabDelivery Stop + description: '' + fields: + - name: customer + fieldtype: Link + label: Customer + description: Customer associated with this delivery stop + join_hint: + table: tabCustomer + 'on': customer = tabCustomer.name + - name: address + fieldtype: Link + label: Address Name + description: Physical location or street address where the delivery will be made + join_hint: + table: tabAddress + 'on': address = tabAddress.name + - name: locked + fieldtype: Check + label: Locked + description: Indicates whether the delivery stop is locked and cannot be modified + or rescheduled. + - name: customer_address + fieldtype: Small Text + label: Customer Address + description: The physical delivery location address where goods are to be delivered + for this stop. + - name: visited + fieldtype: Check + label: Visited + description: Indicates whether the delivery driver has arrived at or completed + this delivery stop. + - name: delivery_note + fieldtype: Link + label: Delivery Note + description: The delivery note document identifier associated with this delivery + stop + join_hint: + table: tabDelivery Note + 'on': delivery_note = tabDelivery Note.name + - name: grand_total + fieldtype: Currency + label: Grand Total + description: The total monetary value of goods being delivered at this stop + - name: contact + fieldtype: Link + label: Contact Name + description: The person to contact or who received the delivery at this stop location + join_hint: + table: tabContact + 'on': contact = tabContact.name + - name: email_sent_to + fieldtype: Data + label: Email sent to + description: Email address where delivery notifications or stop-related communications + were sent + - name: customer_contact + fieldtype: Small Text + label: Customer Contact + description: Primary contact person at the customer location for this delivery + stop + - name: distance + fieldtype: Float + label: Distance + description: Distance traveled to reach this delivery stop, typically from the + previous stop or depot + - name: estimated_arrival + fieldtype: Datetime + label: Estimated Arrival + description: Estimated date and time when the delivery vehicle is expected to + arrive at this stop location. + - name: lat + fieldtype: Float + label: Latitude + description: Latitude coordinate of the delivery stop location for mapping and + routing purposes. + - name: uom + fieldtype: Link + label: UOM + description: Unit of measure for quantities being delivered or picked up at this + stop. + join_hint: + table: tabUOM + 'on': uom = tabUOM.name + - name: lng + fieldtype: Float + label: Longitude + description: Longitude coordinate of the delivery stop location for mapping and + route optimization queries. + - name: details + fieldtype: Text Editor + label: Details + description: Additional notes or special instructions about the delivery stop + such as access codes, delivery preferences, or location-specific requirements. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabDelivery Stop). + Comparison-ready across parent records.' +- table: tabDelivery Trip + description: '' + fields: + - name: naming_series + fieldtype: Select + label: Series + description: Prefix pattern used to auto-generate delivery trip names + options: + - MAT-DT-.YYYY.- + - name: company + fieldtype: Link + label: Company + description: Company entity that owns or operates this delivery trip + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: email_notification_sent + fieldtype: Check + label: Initial Email Notification Sent + description: Whether email notification has been sent for this delivery trip + - name: driver + fieldtype: Link + label: Driver + description: Driver ID or code assigned to the delivery trip + join_hint: + table: tabDriver + 'on': driver = tabDriver.name + - name: driver_name + fieldtype: Data + label: Driver Name + description: Full name of the driver assigned to the delivery trip + - name: driver_email + fieldtype: Data + label: Driver Email + description: Email address of the driver assigned to the delivery trip for contact + or notification purposes. + - name: driver_address + fieldtype: Link + label: Driver Address + description: Residential or home address of the driver assigned to the delivery + trip. + join_hint: + table: tabAddress + 'on': driver_address = tabAddress.name + - name: total_distance + fieldtype: Float + label: Total Estimated Distance + description: Total distance covered or planned for the entire delivery trip, typically + measured in kilometers or miles. + - name: uom + fieldtype: Link + label: Distance UOM + description: Unit of measurement for distance or volume metrics tracked during + the delivery trip. + join_hint: + table: tabUOM + 'on': uom = tabUOM.name + - name: vehicle + fieldtype: Link + label: Vehicle + description: The specific vehicle assigned to execute this delivery trip. + join_hint: + table: tabVehicle + 'on': vehicle = tabVehicle.name + - name: departure_time + fieldtype: Datetime + label: Departure Time + description: The scheduled or actual time when the vehicle departed to begin the + delivery trip. + - name: employee + fieldtype: Link + label: Employee + description: Driver or employee assigned to execute this delivery trip. + join_hint: + table: tabEmployee + 'on': employee = tabEmployee.name + - name: delivery_stops + fieldtype: Table + label: Delivery Stop + description: '' + child_hint: + child_table: tabDelivery Stop + fieldname: delivery_stops + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: delivery_stops + - name: status + fieldtype: Select + label: Status + description: Current state of the delivery trip such as scheduled, in transit, + completed, or cancelled. + options: + - Draft + - Scheduled + - In Transit + - Completed + - Cancelled + - name: amended_from + fieldtype: Link + label: Amended From + description: Links to the original delivery trip document that was corrected or + modified by this amended version. + join_hint: + table: tabDelivery Trip + 'on': amended_from = tabDelivery Trip.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Delivery Trip document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabDepartment + description: '' + fields: + - name: department_name + fieldtype: Data + label: Department + description: Display name of the department, used when searching or filtering + by specific organizational units. + - name: parent_department + fieldtype: Link + label: Parent Department + description: Reference to the higher-level department in the hierarchy, used for + organizational structure queries and reporting rollups. + join_hint: + table: tabDepartment + 'on': parent_department = tabDepartment.name + - name: company + fieldtype: Link + label: Company + description: Company to which this department belongs, used for multi-company + filtering and organizational segmentation. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: is_group + fieldtype: Check + label: Is Group + description: Indicates if this department contains sub-departments, used to distinguish + parent nodes in hierarchical queries. + - name: disabled + fieldtype: Check + label: Disabled + description: Flag showing if the department is inactive, used to exclude obsolete + departments from active operations. + - name: payroll_cost_center + fieldtype: Link + label: Payroll Cost Center + description: Default cost center for payroll expenses of this department, used + in salary processing and financial allocation. + join_hint: + table: tabCost Center + 'on': payroll_cost_center = tabCost Center.name + - name: leave_block_list + fieldtype: Link + label: Leave Block List + description: Reference to leave restrictions applicable to this department, used + when validating leave requests during blocked periods. + join_hint: + table: tabLeave Block List + 'on': leave_block_list = tabLeave Block List.name + - name: shift_request_approver + fieldtype: Table + label: Shift Request Approver + description: '' + child_hint: + child_table: tabDepartment Approver + fieldname: shift_request_approver + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: shift_request_approver + - name: leave_approvers + fieldtype: Table + label: Leave Approver + description: '' + child_hint: + child_table: tabDepartment Approver + fieldname: leave_approvers + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: leave_approvers + - name: expense_approvers + fieldtype: Table + label: Expense Approver + description: '' + child_hint: + child_table: tabDepartment Approver + fieldname: expense_approvers + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: expense_approvers + - name: lft + fieldtype: Int + label: lft + description: Left boundary value in nested set model used when querying department + hierarchies or organizational tree structures. + - name: rgt + fieldtype: Int + label: rgt + description: Right boundary value in nested set model used when determining department + descendants or subtree ranges in organizational queries. + - name: old_parent + fieldtype: Data + label: Old Parent + description: Previous parent department identifier used when tracking department + reorganizations or analyzing historical reporting structure changes. + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Department document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabDependent Task + description: '' + fields: + - name: task + fieldtype: Link + label: Task + description: Parent or primary task that has dependent tasks associated with it + join_hint: + table: tabTask + 'on': task = tabTask.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabDependent Task). + Comparison-ready across parent records.' +- table: tabDepreciation Schedule + description: '' + fields: + - name: schedule_date + fieldtype: Date + label: Schedule Date + description: Date when the depreciation expense is scheduled to be recorded or + recognized + - name: depreciation_amount + fieldtype: Currency + label: Depreciation Amount + description: Monetary value of depreciation expense allocated for the scheduled + period + - name: accumulated_depreciation_amount + fieldtype: Currency + label: Accumulated Depreciation Amount + description: Total depreciation accumulated on an asset from acquisition through + the current period. + - name: journal_entry + fieldtype: Link + label: Journal Entry + description: Accounting journal entry reference created when depreciation is posted + to the general ledger. + join_hint: + table: tabJournal Entry + 'on': journal_entry = tabJournal Entry.name + - name: shift + fieldtype: Link + label: Shift + description: Work shift or time period during which the asset was used for depreciation + calculation purposes. + join_hint: + table: tabAsset Shift Factor + 'on': shift = tabAsset Shift Factor.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabDepreciation Schedule). + Comparison-ready across parent records.' +- table: tabDesignation + description: '' + fields: + - name: designation_name + fieldtype: Data + label: Designation + description: The official job title or position name, used when searching for + employees by role or analyzing organizational structure. + - name: description + fieldtype: Text + label: Description + description: Detailed explanation of the designation's responsibilities and scope, + used when clarifying job role requirements. + - name: appraisal_template + fieldtype: Link + label: Appraisal Template + description: Linked performance review template for this designation, used when + setting up or analyzing appraisals by job title. + join_hint: + table: tabAppraisal Template + 'on': appraisal_template = tabAppraisal Template.name + - name: skills + fieldtype: Table + label: Skills + description: '' + child_hint: + child_table: tabDesignation Skill + fieldname: skills + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: skills + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Designation document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabDesktop Icon + description: '' + fields: + - name: module_name + fieldtype: Data + label: Module Name + description: ERP module to which this desktop icon is associated for navigation + purposes. + - name: label + fieldtype: Data + label: Label + description: Display text shown to users for this desktop icon. + - name: standard + fieldtype: Check + label: Standard + description: Indicates whether this is a standard system icon or custom-created. + - name: custom + fieldtype: Check + label: Custom + description: Flag identifying if the desktop icon was custom-created by users + versus system-provided. + - name: app + fieldtype: Data + label: App + description: Application or workspace where this desktop icon appears. + - name: description + fieldtype: Small Text + label: Description + description: Explanatory text describing the purpose or function of this desktop + icon. + - name: category + fieldtype: Data + label: Category + description: Used to group or classify desktop icons for organizational filtering + and navigation purposes. + - name: hidden + fieldtype: Check + label: Hidden + description: Indicates whether the desktop icon is concealed from user view, relevant + when controlling workspace visibility. + - name: blocked + fieldtype: Check + label: Blocked + description: Shows if the desktop icon is disabled or restricted from user access, + used in permission and access control queries. + - name: force_show + fieldtype: Check + label: Force Show + description: Determines if the icon must always display regardless of other visibility + settings, used when ensuring critical module access. + - name: type + fieldtype: Select + label: Type + description: Specifies the desktop icon type such as module, report, or page, + used when filtering icons by functional category. + options: + - module + - list + - link + - page + - query-report + - name: _doctype + fieldtype: Link + label: _doctype + description: References the associated document type that the desktop icon links + to, used when mapping icons to specific business objects. + join_hint: + table: tabDocType + 'on': _doctype = tabDocType.name + - name: _report + fieldtype: Link + label: _report + description: Links to a specific report when the icon serves as a report shortcut, + used in report access and navigation queries. + join_hint: + table: tabReport + 'on': _report = tabReport.name + - name: link + fieldtype: Small Text + label: Link + description: Contains the URL or route path the icon navigates to, used when troubleshooting + navigation or customizing user workflows. + - name: color + fieldtype: Data + label: Color + description: Defines the visual color scheme of the icon, used when customizing + workspace appearance or branding. + - name: icon + fieldtype: Data + label: Icon + description: Specifies the icon graphic or symbol displayed, used when identifying + or customizing visual representations. + - name: reverse + fieldtype: Check + label: Reverse Icon Color + description: Controls inverted display styling of the icon, used when applying + alternative visual themes or highlighting. + - name: idx + fieldtype: Int + label: Idx + description: Display order or sequence position of the desktop icon in the interface. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Desktop Icon document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabDiscounted Invoice + description: '' + fields: + - name: sales_invoice + fieldtype: Link + label: Invoice + description: Links to the original sales invoice that received the discount, used + when analyzing which invoices were discounted or reconciling discount impacts. + join_hint: + table: tabSales Invoice + 'on': sales_invoice = tabSales Invoice.name + - name: customer + fieldtype: Link + label: Customer + description: Identifies the customer who received the discounted invoice, used + when analyzing discount patterns by customer or evaluating customer-specific + pricing strategies. + join_hint: + table: tabCustomer + 'on': customer = tabCustomer.name + - name: posting_date + fieldtype: Date + label: Date + description: Date when the discounted invoice transaction was recorded in the + accounting ledger. + - name: outstanding_amount + fieldtype: Currency + label: Outstanding Amount + description: Remaining unpaid balance on the discounted invoice after payments + and adjustments. + - name: debit_to + fieldtype: Link + label: Debit to + description: Account that receives the debit entry for the discounted invoice + transaction. + join_hint: + table: tabAccount + 'on': debit_to = tabAccount.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabDiscounted Invoice). + Comparison-ready across parent records.' +- table: tabDiscussion Reply + description: '' + fields: + - name: topic + fieldtype: Link + label: Topic + description: Subject or title of the reply, used when searching or categorizing + discussion contributions. + join_hint: + table: tabDiscussion Topic + 'on': topic = tabDiscussion Topic.name + - name: reply + fieldtype: Text Editor + label: Reply + description: Actual text content of the user's response in the discussion thread. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Discussion Reply document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabDiscussion Topic + description: '' + fields: + - name: title + fieldtype: Data + label: Title + description: Discussion topic title or subject used for searching and identifying + conversation threads. + - name: reference_doctype + fieldtype: Link + label: Reference Doctype + description: Document type being discussed, used to find all discussions related + to specific modules like Sales Order or Project. + join_hint: + table: tabDocType + 'on': reference_doctype = tabDocType.name + - name: reference_docname + fieldtype: Dynamic Link + label: Reference Docname + description: Specific document name being discussed, used to retrieve all discussion + topics about a particular record. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Discussion Topic document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabDocField + description: '' + fields: + - name: label + fieldtype: Data + label: Label + description: User-facing display name shown for this field in forms and reports. + - name: fieldtype + fieldtype: Select + label: Type + description: Data type of the field such as Data, Link, Select, or Currency. + options: + - Autocomplete + - Attach + - Attach Image + - Barcode + - Button + - Check + - Code + - Color + - Column Break + - Currency + - Data + - Date + - Datetime + - Duration + - Dynamic Link + - Float + - Fold + - Geolocation + - Heading + - HTML + - HTML Editor + - Icon + - Image + - Int + - JSON + - Link + - Long Text + - Markdown Editor + - Password + - Percent + - Phone + - Read Only + - Rating + - Section Break + - Select + - Signature + - Small Text + - Tab Break + - Table + - Table MultiSelect + - Text + - Text Editor + - Time + - name: fieldname + fieldtype: Data + label: Name + description: Internal system name used to reference this field in code and database. + - name: length + fieldtype: Int + label: Length + description: Maximum character length allowed for text-based field types. + - name: precision + fieldtype: Select + label: Precision + description: Number of decimal places for numeric and currency field types. + options: + - '0' + - '1' + - '2' + - '3' + - '4' + - '5' + - '6' + - '7' + - '8' + - '9' + - name: non_negative + fieldtype: Check + label: Non Negative + description: Indicates whether this numeric field restricts values to zero or + positive numbers only. + - name: hide_days + fieldtype: Check + label: Hide Days + description: Controls whether date fields display only date without day-of-week + labels in forms and reports. + - name: hide_seconds + fieldtype: Check + label: Hide Seconds + description: Determines if time fields suppress seconds display, showing only + hours and minutes for cleaner datetime presentation. + - name: reqd + fieldtype: Check + label: Mandatory + description: Marks field as mandatory for form submission, used to enforce data + completeness for critical business information. + - name: is_virtual + fieldtype: Check + label: Virtual + description: Indicates field is computed dynamically rather than stored, used + for calculated values and derived metrics. + - name: search_index + fieldtype: Check + label: Index + description: Enables database indexing on field for faster filtering and searching + in large datasets and reports. + - name: options + fieldtype: Small Text + label: Options + description: Defines selectable values for dropdown/multi-select fields, controlling + allowed choices for standardized data entry. + - name: sort_options + fieldtype: Check + label: Sort Options + description: Specifies custom ordering for dropdown options instead of alphabetical, + used for priority-based or logical sequencing. + - name: show_dashboard + fieldtype: Check + label: Show Dashboard + description: Controls field visibility in dashboard widgets and summary views + for key performance indicators. + - name: link_filters + fieldtype: JSON + label: Link Filters + description: Restricts linked document options based on filter criteria, used + to show only relevant related records. + - name: default + fieldtype: Small Text + label: Default + description: Sets automatic initial value when creating new records, used for + common values or calculated defaults. + - name: fetch_from + fieldtype: Small Text + label: Fetch From + description: Automatically pulls value from linked document field, used to cascade + related information across documents. + - name: fetch_if_empty + fieldtype: Check + label: Fetch on Save if Empty + description: Controls whether fetch_from overwrites existing values or only populates + empty fields during data entry. + - name: hidden + fieldtype: Check + label: Hidden + description: Completely hides field from all views while preserving data, used + for deprecated or system-only fields. + - name: show_on_timeline + fieldtype: Check + label: Show on Timeline + description: Displays field changes in document timeline/activity feed for audit + trail and change tracking. + - name: bold + fieldtype: Check + label: Bold + description: Renders field label in bold font to emphasize important or frequently-used + fields in forms. + - name: allow_in_quick_entry + fieldtype: Check + label: Allow in Quick Entry + description: Used when determining if a field should appear in quick entry forms + for rapid data creation. + - name: translatable + fieldtype: Check + label: Translatable + description: Used when identifying fields whose values need translation across + multiple languages in multilingual deployments. + - name: print_hide + fieldtype: Check + label: Print Hide + description: Used when configuring which fields to exclude from printed documents + and PDF exports. + - name: print_hide_if_no_value + fieldtype: Check + label: Print Hide If No Value + description: Used when conditionally hiding empty fields from printed outputs + to reduce clutter. + - name: report_hide + fieldtype: Check + label: Report Hide + description: Used when determining field visibility in report builder and query + report configurations. + - name: depends_on + fieldtype: Code + label: Display Depends On (JS) + description: Used when implementing conditional field visibility based on values + of other fields in the form. + - name: collapsible + fieldtype: Check + label: Collapsible + description: Used when making field sections expandable/collapsible to improve + form layout and user experience. + - name: collapsible_depends_on + fieldtype: Code + label: Collapsible Depends On (JS) + description: Used when conditionally showing collapsible sections based on other + field values. + - name: hide_border + fieldtype: Check + label: Hide Border + description: Used when customizing form layout by removing visual borders around + field sections. + - name: in_list_view + fieldtype: Check + label: In List View + description: Used when determining which fields display as columns in list views + and grid layouts. + - name: in_standard_filter + fieldtype: Check + label: In List Filter + description: Used when enabling fields as quick filter options in list view sidebars. + - name: in_preview + fieldtype: Check + label: In Preview + description: Used when selecting fields to show in document preview popups and + hover cards. + - name: in_filter + fieldtype: Check + label: In Filter + description: Used when making fields available as filter criteria in list views + and reports. + - name: in_global_search + fieldtype: Check + label: In Global Search + description: Used when determining which fields are searchable through the global + search bar. + - name: read_only + fieldtype: Check + label: Read Only + description: Used when restricting field editing to prevent user modifications + after certain conditions. + - name: allow_on_submit + fieldtype: Check + label: Allow on Submit + description: Indicates if this field can be modified after the document is submitted, + used when checking edit permissions on locked documents. + - name: ignore_user_permissions + fieldtype: Check + label: Ignore User Permissions + description: Determines if user-level permissions are bypassed for this field, + relevant when analyzing access control exceptions. + - name: allow_bulk_edit + fieldtype: Check + label: Allow Bulk Edit + description: Specifies whether this field can be updated across multiple records + simultaneously, used when validating bulk operation capabilities. + - name: make_attachment_public + fieldtype: Check + label: Make Attachment Public (by default) + description: Controls if attachments in this field are publicly accessible without + login, used when reviewing document sharing and security settings. + - name: permlevel + fieldtype: Int + label: Perm Level + description: Defines the permission level required to access this field, used + when filtering fields by role-based access restrictions. + - name: ignore_xss_filter + fieldtype: Check + label: Ignore XSS Filter + description: Indicates if cross-site scripting filters are disabled for this field, + relevant when auditing security configurations. + - name: unique + fieldtype: Check + label: Unique + description: Enforces uniqueness constraint on field values across all records, + used when validating data integrity and preventing duplicates. + - name: no_copy + fieldtype: Check + label: No Copy + description: Prevents this field's value from being copied when duplicating a + document, used when identifying fields that must remain unique per instance. + - name: set_only_once + fieldtype: Check + label: Set only once + description: Restricts this field to be set only during creation and never modified, + used when enforcing immutable data requirements. + - name: remember_last_selected_value + fieldtype: Check + label: Remember Last Selected Value + description: Enables the system to auto-populate this field with the user's previous + selection, used when analyzing user experience optimizations. + - name: mandatory_depends_on + fieldtype: Code + label: Mandatory Depends On (JS) + description: Defines conditional logic that makes this field required based on + other field values, used when validating dynamic form requirements. + - name: read_only_depends_on + fieldtype: Code + label: Read Only Depends On (JS) + description: Specifies conditions under which this field becomes non-editable, + used when analyzing conditional field access rules. + - name: print_width + fieldtype: Data + label: Print Width + description: Sets the width of this field in printed documents, used when customizing + print layout formatting. + - name: width + fieldtype: Data + label: Width + description: Defines the display width of this field in the form interface, used + when optimizing form layout and responsiveness. + - name: max_height + fieldtype: Data + label: Max Height + description: Limits the maximum vertical space this field can occupy, used when + controlling text area or table field dimensions. + - name: columns + fieldtype: Int + label: Columns + description: Defines the number of columns for field layout when displaying forms + or controlling field width in document types. + - name: description + fieldtype: Small Text + label: Description + description: Contains the user-facing label or help text that explains what data + should be entered in this field. + - name: documentation_url + fieldtype: Data + label: Documentation URL + description: Links to external documentation or help resources that provide detailed + guidance on how to use this field. + - name: placeholder + fieldtype: Data + label: Placeholder + description: Stores the example text shown inside an empty field to guide users + on the expected input format or value. + - name: oldfieldname + fieldtype: Data + label: oldfieldname + description: Preserves the previous field name during schema migrations or field + renaming to maintain data migration traceability. + - name: oldfieldtype + fieldtype: Data + label: oldfieldtype + description: Records the former field type before conversion, used for tracking + field type changes during system upgrades or customizations. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabDocField). Comparison-ready + across parent records.' +- table: tabDocPerm + description: '' + fields: + - name: role + fieldtype: Link + label: Role + description: The user role to which this permission rule grants or restricts access. + join_hint: + table: tabRole + 'on': role = tabRole.name + - name: if_owner + fieldtype: Check + label: If user is the owner + description: Flag indicating whether this permission applies only when the user + owns the document. + - name: permlevel + fieldtype: Int + label: Level + description: Permission level number used to control field-level access granularity. + - name: select + fieldtype: Check + label: Select + description: Grants permission to view documents in list views and reports. + - name: read + fieldtype: Check + label: Read + description: Grants permission to open and read the full document details. + - name: write + fieldtype: Check + label: Write + description: Grants permission to edit and modify the document. + - name: create + fieldtype: Check + label: Create + description: Used to check if a user has permission to create new documents of + a specific type. + - name: delete + fieldtype: Check + label: Delete + description: Used to verify if a user can permanently remove documents from the + system. + - name: submit + fieldtype: Check + label: Submit + description: Used to determine if a user can submit documents for approval or + finalize draft documents. + - name: cancel + fieldtype: Check + label: Cancel + description: Used to check if a user has authority to cancel or void submitted + documents. + - name: amend + fieldtype: Check + label: Amend + description: Used to verify if a user can modify or amend already submitted documents. + - name: report + fieldtype: Check + label: Report + description: Used to control if a user can generate or access reports based on + document data. + - name: export + fieldtype: Check + label: Export + description: Used to check if a user has permission to export document data to + external formats. + - name: import + fieldtype: Check + label: Import + description: Used to determine if a user can import data to create or update documents + in bulk. + - name: share + fieldtype: Check + label: Share + description: Used to verify if a user can share documents with other users or + groups. + - name: print + fieldtype: Check + label: Print + description: Used to check if a user has permission to print physical or PDF copies + of documents. + - name: email + fieldtype: Check + label: Email + description: Used to control if a user can send documents via email to internal + or external recipients. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabDocPerm). Comparison-ready + across parent records.' +- table: tabDocShare + description: '' + fields: + - name: user + fieldtype: Link + label: User + description: User who is granted access to the shared document. + join_hint: + table: tabUser + 'on': user = tabUser.name + - name: share_doctype + fieldtype: Link + label: Document Type + description: Document type being shared with the user. + join_hint: + table: tabDocType + 'on': share_doctype = tabDocType.name + - name: share_name + fieldtype: Dynamic Link + label: Document Name + description: Specific document name being shared with the user. + - name: read + fieldtype: Check + label: Read + description: Flag indicating if the user has read permission on the shared document. + - name: write + fieldtype: Check + label: Write + description: Flag indicating if the user has write permission on the shared document. + - name: share + fieldtype: Check + label: Share + description: Flag indicating if the user can further share this document with + others. + - name: submit + fieldtype: Check + label: Submit + description: Indicates whether the document share has been submitted or finalized + for access by the specified users or groups. + - name: everyone + fieldtype: Check + label: Everyone + description: Flags if the document is shared with all users in the system rather + than specific individuals or groups. + - name: notify_by_email + fieldtype: Check + label: Notify by email + description: Controls whether users receive email notifications when a document + is shared with them or when share permissions change. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per DocShare document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabDocType + description: '' + fields: + - name: module + fieldtype: Link + label: Module + description: ERP module this DocType belongs to (e.g., Sales, HR), used to filter + DocTypes by functional area. + join_hint: + table: tabModule Def + 'on': module = tabModule Def.name + - name: is_submittable + fieldtype: Check + label: Is Submittable + description: Indicates if documents of this type require submission workflow, + used to identify DocTypes with approval processes. + - name: istable + fieldtype: Check + label: Is Child Table + description: Indicates if this DocType is a child table, used to distinguish between + master and child table types. + - name: issingle + fieldtype: Check + label: Is Single + description: Indicates if only one record exists for this DocType, used to identify + singleton configuration DocTypes. + - name: is_tree + fieldtype: Check + label: Is Tree + description: Indicates if this DocType supports hierarchical tree structure, used + for nested organizational or category queries. + - name: is_calendar_and_gantt + fieldtype: Check + label: Is Calendar and Gantt + description: Indicates if this DocType supports calendar and Gantt chart views, + used for time-based project or scheduling queries. + - name: editable_grid + fieldtype: Check + label: Editable Grid + description: Indicates if users can edit multiple records directly in list view + without opening individual forms. + - name: quick_entry + fieldtype: Check + label: Quick Entry + description: Determines if a simplified quick-entry dialog appears for rapid data + entry instead of the full form. + - name: grid_page_length + fieldtype: Int + label: Grid Page Length + description: Sets the default number of records displayed per page in list views + for this document type. + - name: rows_threshold_for_grid_search + fieldtype: Int + label: Rows Threshold for Grid Search + description: Defines the minimum number of rows required before search functionality + appears in child table grids. + - name: track_changes + fieldtype: Check + label: Track Changes + description: Enables version history tracking to audit all modifications made + to documents of this type. + - name: track_seen + fieldtype: Check + label: Track Seen + description: Records which users have viewed each document for visibility and + follow-up tracking. + - name: track_views + fieldtype: Check + label: Track Views + description: Counts how many times each document has been accessed for analytics + and engagement monitoring. + - name: custom + fieldtype: Check + label: Custom? + description: Identifies if this document type was created by users rather than + being part of the core system. + - name: beta + fieldtype: Check + label: Beta + description: Marks document types still in testing phase that may have incomplete + features or require feedback. + - name: is_virtual + fieldtype: Check + label: Is Virtual + description: Indicates if this is a virtual DocType without database storage, + used for UI-only forms or reports. + - name: queue_in_background + fieldtype: Check + label: Queue in Background (BETA) + description: Determines if save operations for this document type run asynchronously + to prevent timeout on large transactions. + - name: naming_rule + fieldtype: Select + label: Naming Rule + description: Specifies the method used to generate unique identifiers when creating + new documents of this type. + options: + - Set by user + - Autoincrement + - By fieldname + - By "Naming Series" field + - Expression + - Expression (old style) + - Random + - By script + - name: autoname + fieldtype: Data + label: Auto Name + description: Defines the pattern or field used for automatic document naming based + on the selected naming rule. + - name: allow_rename + fieldtype: Check + label: Allow Rename + description: Controls whether users can change the document name after creation + for this document type. + - name: description + fieldtype: Small Text + label: Description + description: Provides explanatory text about the document type's purpose shown + in user interfaces and documentation. + - name: documentation + fieldtype: Data + label: Documentation Link + description: Used to link to help documentation or wiki pages that explain how + to use this document type. + - name: image_field + fieldtype: Data + label: Image Field + description: Specifies which field contains the primary image to display in list + views and document headers. + - name: timeline_field + fieldtype: Data + label: Timeline Field + description: Defines which date field to use for displaying documents on timeline + views and calendars. + - name: nsm_parent_field + fieldtype: Data + label: Parent Field (Tree) + description: Used for nested set model hierarchies to define parent-child relationships + in tree-structured documents. + - name: max_attachments + fieldtype: Int + label: Max Attachments + description: Limits the number of files that can be attached to documents of this + type. + - name: hide_toolbar + fieldtype: Check + label: Hide Sidebar, Menu, and Comments + description: Controls whether the standard toolbar with actions and menu is visible + to users. + - name: allow_copy + fieldtype: Check + label: Hide Copy + description: Determines if users can duplicate existing documents to create new + ones with copied data. + - name: allow_import + fieldtype: Check + label: Allow Import (via Data Import Tool) + description: Enables bulk data import functionality via CSV or Excel files for + this document type. + - name: allow_events_in_timeline + fieldtype: Check + label: Allow events in timeline + description: Controls whether activities and events appear in the document's timeline + sidebar. + - name: allow_auto_repeat + fieldtype: Check + label: Allow Auto Repeat + description: Enables automatic recurring document creation on scheduled intervals + for subscription-like scenarios. + - name: make_attachments_public + fieldtype: Check + label: Make Attachments Public by Default + description: Sets whether file attachments are accessible without login via public + URLs. + - name: title_field + fieldtype: Data + label: Title Field + description: Specifies which field value to display as the document title in links + and references. + - name: show_title_field_in_link + fieldtype: Check + label: Show Title in Link Fields + description: Controls whether the title field value appears when this document + is linked from other documents. + - name: translated_doctype + fieldtype: Check + label: Translate Link Fields + description: Indicates if this document type supports multi-language translations + for field labels and values. + - name: search_fields + fieldtype: Data + label: Search Fields + description: Defines which fields are searched when users perform quick searches + or filters on this document type. + - name: default_print_format + fieldtype: Data + label: Default Print Format + description: Specifies which print layout to use when generating PDF or printed + documents for this document type. + - name: sort_field + fieldtype: Data + label: Default Sort Field + description: Determines which field is used to order records by default when displaying + lists of this document type. + - name: sort_order + fieldtype: Select + label: Default Sort Order + description: Controls whether records are sorted in ascending or descending order + based on the sort field. + options: + - ASC + - DESC + - name: default_view + fieldtype: Select + label: Default View + description: Defines the initial view layout (list, report, calendar, etc.) shown + when users navigate to this document type. + - name: force_re_route_to_default_view + fieldtype: Check + label: Force Re-route to Default View + description: Forces users to always see the default view instead of their last-used + view for this document type. + - name: document_type + fieldtype: Select + label: Show in Module Section + description: Categorizes whether this is a master data record, transaction document, + or system configuration type. + options: + - Document + - Setup + - System + - Other + - name: icon + fieldtype: Data + label: Icon + description: Stores the visual icon identifier displayed in menus and navigation + for this document type. + - name: color + fieldtype: Data + label: Color + description: Defines the color theme used in the interface when viewing or working + with this document type. + - name: show_preview_popup + fieldtype: Check + label: Show Preview Popup + description: Controls whether a quick preview popup appears when hovering over + or clicking links to this document type. + - name: show_name_in_global_search + fieldtype: Check + label: Make "name" searchable in Global Search + description: Determines if this document type's records appear in the global search + results across the system. + - name: default_email_template + fieldtype: Link + label: Default Email Template + description: Specifies which email template to use when sending emails related + to this document type. + join_hint: + table: tabEmail Template + 'on': default_email_template = tabEmail Template.name + - name: email_append_to + fieldtype: Check + label: Allow document creation via Email + description: Defines which document type incoming emails should be linked or attached + to when received. + - name: sender_field + fieldtype: Data + label: Sender Email Field + description: Identifies the field containing the sender's email address when sending + emails from this document type. + - name: sender_name_field + fieldtype: Data + label: Sender Name Field + description: Identifies the field containing the sender's display name when sending + emails from this document type. + - name: recipient_account_field + fieldtype: Data + label: Recipient Account Field + description: Specifies which field contains the recipient's account or email address + for outgoing communications. + - name: subject_field + fieldtype: Data + label: Subject Field + description: Identifies which field serves as the document title or subject line + for display in lists and search results. + - name: permissions + fieldtype: Table + label: Permissions + description: '' + child_hint: + child_table: tabDocPerm + fieldname: permissions + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: permissions + - name: restrict_to_domain + fieldtype: Link + label: Restrict To Domain + description: Limits document visibility to users within a specific domain when + multi-tenancy or data segregation is required. + join_hint: + table: tabDomain + 'on': restrict_to_domain = tabDomain.name + - name: read_only + fieldtype: Check + label: User Cannot Search + description: Indicates whether the document type is locked from editing, typically + used for system-generated or archived records. + - name: in_create + fieldtype: Check + label: User Cannot Create + description: Controls whether this document type appears in the quick-create menu + for rapid data entry. + - name: protect_attached_files + fieldtype: Check + label: Protect Attached Files + description: Enforces permission checks on file attachments to prevent unauthorized + access to documents. + - name: actions + fieldtype: Table + label: Actions + description: '' + child_hint: + child_table: tabDocType Action + fieldname: actions + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: actions + - name: links + fieldtype: Table + label: Links + description: '' + child_hint: + child_table: tabDocType Link + fieldname: links + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: links + - name: states + fieldtype: Table + label: States + description: '' + child_hint: + child_table: tabDocType State + fieldname: states + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: states + - name: has_web_view + fieldtype: Check + label: Has Web View + description: Indicates whether this document type has a public-facing web page, + relevant for portal or website queries. + - name: allow_guest_to_view + fieldtype: Check + label: Allow Guest to View + description: Determines if unauthenticated users can access documents of this + type on the website. + - name: index_web_pages_for_search + fieldtype: Check + label: Index Web Pages for Search + description: Controls whether web views of this document type are indexed for + search engine optimization. + - name: route + fieldtype: Data + label: Route + description: Specifies the URL pattern for accessing documents of this type on + the web portal. + - name: is_published_field + fieldtype: Data + label: Is Published Field + description: Identifies which field controls whether individual documents are + visible on the website. + - name: website_search_field + fieldtype: Data + label: Website Search Field + description: Designates which field is used for full-text search on the website + portal. + - name: engine + fieldtype: Select + label: Database Engine + description: Specifies the database storage engine used for the document type + table, relevant when troubleshooting performance or storage issues. + options: + - InnoDB + - MyISAM + - name: migration_hash + fieldtype: Data + label: migration_hash + description: Tracks the version hash of database schema migrations applied to + this document type, used when verifying deployment status or rollback scenarios. + - name: fields + fieldtype: Table + label: Fields + description: '' + child_hint: + child_table: tabDocField + fieldname: fields + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: fields + - name: row_format + fieldtype: Select + label: Row Format + description: Defines the physical row storage format for the document type table, + relevant when optimizing storage compression or investigating database capacity. + options: + - Dynamic + - Compressed + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per DocType document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabDocType Action + description: '' + fields: + - name: label + fieldtype: Data + label: Label + description: Display name shown to users for this action button or link. + - name: action_type + fieldtype: Select + label: Action Type + description: Defines whether this is a server action, client script, or route + navigation. + options: + - Server Action + - Route + - name: action + fieldtype: Small Text + label: Action / Route + description: The actual code, function name, or route path executed when action + is triggered. + - name: group + fieldtype: Data + label: Group + description: Categorizes actions into groups like 'Create', 'View', or 'Print' + for organization. + - name: hidden + fieldtype: Check + label: Hidden + description: Controls visibility of this action based on conditions or user permissions. + - name: custom + fieldtype: Check + label: Custom + description: Indicates if this action was added through customization rather than + standard configuration. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabDocType Action). + Comparison-ready across parent records.' +- table: tabDocType Layout + description: '' + fields: + - name: document_type + fieldtype: Link + label: Document Type + description: The DocType for which this custom layout configuration applies. + join_hint: + table: tabDocType + 'on': document_type = tabDocType.name + - name: route + fieldtype: Data + label: Route + description: URL path or routing identifier used to access this layout view. + - name: fields + fieldtype: Table + label: Fields + description: '' + child_hint: + child_table: tabDocType Layout Field + fieldname: fields + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: fields + - name: client_script + fieldtype: Code + label: Client Script + description: Custom JavaScript code that executes on the client side for this + layout. + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per DocType Layout document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabDocType Layout Field + description: '' + fields: + - name: label + fieldtype: Data + label: Label + description: Display name or caption shown to users for this field in the document + layout. + - name: fieldname + fieldtype: Select + label: Fieldname + description: Internal field name used in the database and code for this layout + field. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabDocType Layout + Field). Comparison-ready across parent records.' +- table: tabDocType Link + description: '' + fields: + - name: link_doctype + fieldtype: Link + label: Link DocType + description: Target document type that this link points to or references. + join_hint: + table: tabDocType + 'on': link_doctype = tabDocType.name + - name: link_fieldname + fieldtype: Data + label: Link Fieldname + description: Field name in the linked document type used for the relationship. + - name: parent_doctype + fieldtype: Link + label: Parent DocType + description: Source document type from which the link originates. + join_hint: + table: tabDocType + 'on': parent_doctype = tabDocType.name + - name: table_fieldname + fieldtype: Data + label: Table Fieldname + description: Child table field name where this link relationship is defined. + - name: group + fieldtype: Data + label: Group + description: Grouping category for organizing related document type links together. + - name: hidden + fieldtype: Check + label: Hidden + description: Flag indicating if this link should be hidden from user interface. + - name: is_child_table + fieldtype: Check + label: Is Child Table + description: Indicates whether this document type link represents a child table + relationship, used when filtering or identifying nested table structures within + parent documents. + - name: custom + fieldtype: Check + label: Custom + description: Flags whether this document type link was created by a user versus + being a standard system link, used when distinguishing custom configurations + from default ERP relationships. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabDocType Link). + Comparison-ready across parent records.' +- table: tabDocType State + description: '' + fields: + - name: title + fieldtype: Data + label: Title + description: Human-readable name of the workflow state, used when displaying state + options or current document status. + - name: color + fieldtype: Select + label: Color + description: Visual indicator color for this state in UI, used when rendering + workflow status badges or indicators. + options: + - Blue + - Cyan + - Gray + - Green + - Light Blue + - Orange + - Pink + - Purple + - Red + - Yellow + - name: custom + fieldtype: Check + label: Custom + description: Flag indicating if this is a user-created custom state, used to distinguish + standard vs customized workflows. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabDocType State). + Comparison-ready across parent records.' +- table: tabDocument Follow + description: '' + fields: + - name: ref_doctype + fieldtype: Link + label: Doctype + description: Type of document being followed by the user. + join_hint: + table: tabDocType + 'on': ref_doctype = tabDocType.name + - name: ref_docname + fieldtype: Dynamic Link + label: Document Name + description: Specific document name that the user is following. + - name: user + fieldtype: Link + label: User + description: User who is following the referenced document for notifications. + join_hint: + table: tabUser + 'on': user = tabUser.name + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Document Follow document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabDocument Naming Rule + description: '' + fields: + - name: document_type + fieldtype: Link + label: Document Type + description: The DocType this naming rule applies to, used to find naming conventions + for specific documents. + join_hint: + table: tabDocType + 'on': document_type = tabDocType.name + - name: disabled + fieldtype: Check + label: Disabled + description: Whether this naming rule is currently active or inactive. + - name: priority + fieldtype: Int + label: Priority + description: Execution order when multiple naming rules match the same document + type. + - name: conditions + fieldtype: Table + label: Conditions + description: '' + child_hint: + child_table: tabDocument Naming Rule Condition + fieldname: conditions + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: conditions + - name: prefix + fieldtype: Data + label: Prefix + description: Text or field-based prefix added to the document name when this rule + applies. + - name: counter + fieldtype: Int + label: Counter + description: Numeric sequence counter used to generate sequential document numbers. + - name: prefix_digits + fieldtype: Int + label: Digits + description: Specifies the number of leading digits in the document number prefix, + used when configuring document numbering formats or validating document ID structures. + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Document Naming Rule document (master/transaction). Use + only for single-entity lookups, not cross-record comparison unless fields are + per-relationship (e.g. supplier, price_list).' +- table: tabDocument Naming Rule Condition + description: '' + fields: + - name: field + fieldtype: Select + label: Field + description: The document field to evaluate when applying this naming condition. + - name: condition + fieldtype: Select + label: Condition + description: The comparison operator used to evaluate the field value (equals, + contains, greater than, etc). + options: + - '=' + - '!=' + - '>' + - < + - '>=' + - <= + - name: value + fieldtype: Data + label: Value + description: The expected value to match against the field when determining if + this naming rule applies. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabDocument Naming + Rule Condition). Comparison-ready across parent records.' +- table: tabDocument Share Key + description: '' + fields: + - name: reference_doctype + fieldtype: Link + label: Reference Document Type + description: Type of document being shared via this key, used to identify what + resource is accessible. + join_hint: + table: tabDocType + 'on': reference_doctype = tabDocType.name + - name: reference_docname + fieldtype: Dynamic Link + label: Reference Document Name + description: Specific document name being shared, used to determine which record + the key grants access to. + - name: key + fieldtype: Data + label: Key + description: Unique token string used for authentication when accessing the shared + document via public link. + - name: expires_on + fieldtype: Date + label: Expires On + description: Expiration date after which the share key becomes invalid, used to + enforce time-limited access. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Document Share Key document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabDomain + description: '' + fields: + - name: domain + fieldtype: Data + label: Domain + description: Business domain category or industry vertical (e.g., Manufacturing, + Retail, Healthcare) that this record represents or belongs to. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Domain document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabDowntime Entry + description: '' + fields: + - name: naming_series + fieldtype: Select + label: Naming Series + description: Prefix pattern used to generate the downtime entry name + options: + - DT- + - name: workstation + fieldtype: Link + label: Workstation / Machine + description: The specific workstation or machine that experienced the downtime + join_hint: + table: tabWorkstation + 'on': workstation = tabWorkstation.name + - name: operator + fieldtype: Link + label: Operator + description: Employee or machine operator who logged or is responsible for the + downtime event + join_hint: + table: tabEmployee + 'on': operator = tabEmployee.name + - name: from_time + fieldtype: Datetime + label: From Time + description: Start timestamp when the downtime period began + - name: to_time + fieldtype: Datetime + label: To Time + description: End timestamp when the downtime period concluded + - name: downtime + fieldtype: Float + label: Downtime + description: Duration or period when equipment or production was not operational. + - name: stop_reason + fieldtype: Select + label: Stop Reason + description: Categorized cause or reason code explaining why the downtime occurred. + options: + - Excessive machine set up time + - Unplanned machine maintenance + - On-machine press checks + - Machine operator errors + - Machine malfunction + - Electricity down + - Other + - name: remarks + fieldtype: Text + label: Remarks + description: Additional notes or detailed explanation about the downtime incident. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Downtime Entry document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabDriver + description: '' + fields: + - name: naming_series + fieldtype: Select + label: Series + description: Auto-numbering prefix pattern for driver IDs, used to maintain consistent + driver code formats across the organization. + options: + - HR-DRI-.YYYY.- + - name: full_name + fieldtype: Data + label: Full Name + description: Complete legal name of the driver, used for official documentation, + contracts, and compliance reporting. + - name: status + fieldtype: Select + label: Status + description: Current employment or availability status of the driver, used to + filter active drivers for assignment and scheduling. + options: + - Active + - Suspended + - Left + - name: transporter + fieldtype: Link + label: Transporter + description: Link to the transportation company or vendor employing this driver, + used for subcontractor management and vendor analysis. + join_hint: + table: tabSupplier + 'on': transporter = tabSupplier.name + - name: employee + fieldtype: Link + label: Employee + description: Link to employee master if driver is internal staff, used to connect + payroll, HR records, and driver assignments. + join_hint: + table: tabEmployee + 'on': employee = tabEmployee.name + - name: cell_number + fieldtype: Data + label: Cellphone Number + description: Mobile contact number for the driver, used for dispatch communication + and emergency contact during deliveries. + - name: address + fieldtype: Link + label: Address + description: Physical or mailing address of the driver, used for correspondence, + compliance documentation, and emergency contact. + join_hint: + table: tabAddress + 'on': address = tabAddress.name + - name: license_number + fieldtype: Data + label: License Number + description: Official driving license identification number, used for regulatory + compliance verification and validation. + - name: issuing_date + fieldtype: Date + label: Issuing Date + description: Date when the driver's license was issued, used to calculate license + validity and compliance tracking. + - name: expiry_date + fieldtype: Date + label: Expiry Date + description: Date when the driver's license expires, used to prevent assignment + of drivers with expired licenses and trigger renewal alerts. + - name: driving_license_category + fieldtype: Table + label: Driving License Category + description: '' + child_hint: + child_table: tabDriving License Category + fieldname: driving_license_category + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: driving_license_category + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Driver document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabDriving License Category + description: '' + fields: + - name: class + fieldtype: Data + label: Driver licence class + description: Classification or type of the driving license category (e.g., Class + A, B, C), used when validating driver qualifications. + - name: description + fieldtype: Data + label: Description + description: Detailed explanation of what vehicles or conditions this license + category covers, used for compliance and assignment decisions. + - name: issuing_date + fieldtype: Date + label: Issuing Date + description: Date when the driving license category was issued to the holder, + used for validity verification. + - name: expiry_date + fieldtype: Date + label: Expiry Date + description: Date when the driving license category expires, used to check if + driver authorization is still valid. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabDriving License + Category). Comparison-ready across parent records.' +- table: tabDunning + description: '' + fields: + - name: naming_series + fieldtype: Select + label: Series + description: Prefix pattern used to auto-generate dunning notice numbers + options: + - DUNN-.MM.-.YY.- + - name: customer + fieldtype: Link + label: Customer + description: Customer who is being sent the dunning notice for outstanding or + overdue invoices + join_hint: + table: tabCustomer + 'on': customer = tabCustomer.name + - name: customer_name + fieldtype: Data + label: Customer Name + description: Name of the customer being dunned for overdue payments or outstanding + invoices. + - name: company + fieldtype: Link + label: Company + description: Company entity that issued the dunning notice or owns the receivable. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: posting_date + fieldtype: Date + label: Date + description: Date when the dunning notice or related transaction was posted to + the accounting ledger. + - name: posting_time + fieldtype: Time + label: Posting Time + description: Time of day when the dunning notice was posted or created. + - name: status + fieldtype: Select + label: Status + description: Current state of the dunning process such as draft, sent, resolved, + or cancelled. + options: + - Draft + - Resolved + - Unresolved + - Cancelled + - name: currency + fieldtype: Link + label: Currency + description: Currency in which the dunning amounts and outstanding balances are + denominated. + join_hint: + table: tabCurrency + 'on': currency = tabCurrency.name + - name: conversion_rate + fieldtype: Float + label: Conversion Rate + description: Exchange rate used to convert dunning amounts from transaction currency + to company base currency. + - name: dunning_type + fieldtype: Link + label: Dunning Type + description: Classification of the dunning notice such as first reminder, second + reminder, final notice, or legal action. + join_hint: + table: tabDunning Type + 'on': dunning_type = tabDunning Type.name + - name: rate_of_interest + fieldtype: Float + label: Rate of Interest (%) Yearly + description: Interest percentage charged on overdue amounts as specified in the + dunning notice or agreement. + - name: overdue_payments + fieldtype: Table + label: Overdue Payments + description: '' + child_hint: + child_table: tabOverdue Payment + fieldname: overdue_payments + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: overdue_payments + - name: total_interest + fieldtype: Currency + label: Total Interest + description: Accumulated interest charges on overdue payments or late balances. + - name: dunning_fee + fieldtype: Currency + label: Dunning Fee + description: Fee charged to the customer for dunning collection activities or + late payment reminders. + - name: dunning_amount + fieldtype: Currency + label: Dunning Amount + description: Total amount subject to dunning collection in transaction currency, + used when asking about overdue payment amounts or dunning fees charged to customers. + - name: base_dunning_amount + fieldtype: Currency + label: Dunning Amount (Company Currency) + description: Dunning amount converted to company base currency for consolidated + reporting across multiple currencies. + - name: spacer + fieldtype: Data + label: Spacer + description: Visual separator or placeholder field with no business data value. + - name: total_outstanding + fieldtype: Currency + label: Total Outstanding + description: Unpaid balance remaining on the dunning notice after payments and + credits applied + - name: grand_total + fieldtype: Currency + label: Grand Total + description: Total amount originally due on the dunning notice before any payments + or adjustments + - name: language + fieldtype: Link + label: Print Language + description: Language in which the dunning notice was generated or should be communicated + to the customer + join_hint: + table: tabLanguage + 'on': language = tabLanguage.name + - name: body_text + fieldtype: Text Editor + label: Body Text + description: Main content of the dunning letter sent to customers regarding overdue + payments or outstanding balances. + - name: letter_head + fieldtype: Link + label: Letter Head + description: Header section of the dunning letter containing company branding, + logo, or sender information. + join_hint: + table: tabLetter Head + 'on': letter_head = tabLetter Head.name + - name: closing_text + fieldtype: Text Editor + label: Closing Text + description: Final paragraph or sign-off text at the end of the dunning letter, + typically containing contact information or payment instructions. + - name: income_account + fieldtype: Link + label: Income Account + description: Account where dunning fees or charges are recorded as revenue + join_hint: + table: tabAccount + 'on': income_account = tabAccount.name + - name: cost_center + fieldtype: Link + label: Cost Center + description: Cost center to which dunning-related expenses or activities are allocated + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + - name: amended_from + fieldtype: Link + label: Amended From + description: Reference to the original dunning document that this dunning replaces + or corrects + join_hint: + table: tabDunning + 'on': amended_from = tabDunning.name + - name: customer_address + fieldtype: Link + label: Customer Address + description: Physical or billing address of the customer being dunned for overdue + payments. + join_hint: + table: tabAddress + 'on': customer_address = tabAddress.name + - name: address_display + fieldtype: Small Text + label: Address + description: Formatted address string used when displaying or printing dunning + notices to customers. + - name: contact_person + fieldtype: Link + label: Contact Person + description: Specific individual at the customer organization to contact regarding + overdue invoices and payment collection. + join_hint: + table: tabContact + 'on': contact_person = tabContact.name + - name: contact_display + fieldtype: Small Text + label: Contact + description: Name of the person to contact for dunning communications or payment + follow-up + - name: contact_mobile + fieldtype: Small Text + label: Mobile No + description: Mobile phone number to reach the dunning contact for urgent payment + matters + - name: contact_email + fieldtype: Data + label: Contact Email + description: Email address for sending dunning notices and payment reminders to + the contact + - name: company_address + fieldtype: Link + label: Company Address + description: Company address used for dunning correspondence and legal notices + sent to customers. + join_hint: + table: tabAddress + 'on': company_address = tabAddress.name + - name: company_address_display + fieldtype: Small Text + label: Company Address Display + description: Formatted version of company address for display on dunning letters + and customer-facing documents. + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Dunning document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabDunning Letter Text + description: '' + fields: + - name: language + fieldtype: Link + label: Language + description: Language code or locale in which the dunning letter text is written, + used when matching letters to customer language preferences + join_hint: + table: tabLanguage + 'on': language = tabLanguage.name + - name: is_default_language + fieldtype: Check + label: Is Default Language + description: Indicates whether this dunning letter text serves as the fallback + template when no language-specific version matches the customer's language + - name: body_text + fieldtype: Text Editor + label: Body Text + description: Main message content of the dunning letter sent to customers regarding + overdue payments or outstanding balances. + - name: closing_text + fieldtype: Text Editor + label: Closing Text + description: Final closing statement or sign-off text that appears at the end + of the dunning letter after the main body content. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabDunning Letter + Text). Comparison-ready across parent records.' +- table: tabDunning Type + description: '' + fields: + - name: dunning_type + fieldtype: Data + label: Dunning Type + description: Classification or category of the dunning process such as letter-based, + email-based, or legal action dunning + - name: is_default + fieldtype: Check + label: Is Default + description: Indicates whether this dunning type is automatically applied to new + customers or accounts without explicit assignment + - name: company + fieldtype: Link + label: Company + description: Company entity to which this dunning type configuration applies. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: dunning_fee + fieldtype: Currency + label: Dunning Fee + description: Fixed fee amount charged to customers when this dunning type is applied + for overdue payments. + - name: rate_of_interest + fieldtype: Float + label: Rate of Interest (%) Yearly + description: Percentage interest rate applied to overdue amounts when using this + dunning type. + - name: dunning_letter_text + fieldtype: Table + label: dunning_letter_text + description: '' + child_hint: + child_table: tabDunning Letter Text + fieldname: dunning_letter_text + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: dunning_letter_text + - name: income_account + fieldtype: Link + label: Income Account + description: Account where dunning fees or charges are recorded as revenue. + join_hint: + table: tabAccount + 'on': income_account = tabAccount.name + - name: cost_center + fieldtype: Link + label: Cost Center + description: Cost center to which dunning-related expenses or activities are allocated. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Dunning Type document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabDynamic Link + description: '' + fields: + - name: link_doctype + fieldtype: Link + label: Link Document Type + description: Target DocType that this link points to, used to filter links by + the type of document being referenced. + join_hint: + table: tabDocType + 'on': link_doctype = tabDocType.name + - name: link_name + fieldtype: Dynamic Link + label: Link Name + description: ID of the target document being linked, used to retrieve the actual + linked record. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabDynamic Link). + Comparison-ready across parent records.' +- table: tabEmail Account + description: '' + fields: + - name: email_id + fieldtype: Data + label: Email Address + description: The actual email address associated with this account, used for identifying + which mailbox handles communications. + - name: company + fieldtype: Link + label: Company + description: Company entity linked to this email account, essential for multi-company + filtering and organizational segmentation. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: email_account_name + fieldtype: Data + label: Email Account Name + description: Display name for the email account used in user interfaces and reports + to identify the account purpose. + - name: domain + fieldtype: Link + label: Domain + description: Email domain configuration reference, used when filtering accounts + by domain provider or custom domain setup. + join_hint: + table: tabEmail Domain + 'on': domain = tabEmail Domain.name + - name: service + fieldtype: Select + label: Service + description: Email service provider type (Gmail, Outlook, etc.), relevant for + troubleshooting and provider-specific queries. + options: + - GMail + - Sendgrid + - SparkPost + - Yahoo Mail + - Outlook.com + - Yandex.Mail + - name: auth_method + fieldtype: Select + label: Method + description: Authentication method used for email access, important for security + audits and connection troubleshooting. + options: + - Basic + - OAuth + - name: backend_app_flow + fieldtype: Check + label: Authenticate as Service Principal + description: Used when identifying the authentication workflow or integration + method configured for automated email processing. + - name: password + fieldtype: Password + label: Password + description: Used when troubleshooting authentication failures or updating email + account credentials for system access. + - name: awaiting_password + fieldtype: Check + label: Awaiting password + description: Used when identifying email accounts with incomplete setup that require + password entry before activation. + - name: ascii_encode_password + fieldtype: Check + label: Use ASCII encoding for password + description: Used when diagnosing encoding issues or determining if legacy ASCII + password encoding is enabled for compatibility. + - name: connected_app + fieldtype: Link + label: Connected App + description: Used when tracking which third-party application or OAuth service + is linked to this email account. + join_hint: + table: tabConnected App + 'on': connected_app = tabConnected App.name + - name: connected_user + fieldtype: Link + label: Connected User + description: Used when identifying which system user owns or has authorized access + to this email account. + join_hint: + table: tabUser + 'on': connected_user = tabUser.name + - name: login_id_is_different + fieldtype: Check + label: Use different Email ID + description: Used when the email login username differs from the email address + itself for authentication purposes. + - name: login_id + fieldtype: Data + label: Alternative Email ID + description: Used when retrieving the actual username credential required to authenticate + to the email server. + - name: enable_incoming + fieldtype: Check + label: Enable Incoming + description: Used when determining if this account is configured to receive and + process incoming emails. + - name: default_incoming + fieldtype: Check + label: Default Incoming + description: Used when identifying the primary email account designated for receiving + all incoming system communications. + - name: use_imap + fieldtype: Check + label: Use IMAP + description: Used when filtering accounts configured for IMAP protocol versus + POP3 for email retrieval. + - name: use_ssl + fieldtype: Check + label: Use SSL + description: Used when auditing email accounts for SSL encryption to ensure secure + communication channels. + - name: use_starttls + fieldtype: Check + label: Use STARTTLS + description: Used when identifying accounts using STARTTLS encryption upgrade + for secure email transmission. + - name: email_server + fieldtype: Data + label: Incoming Server + description: Used when troubleshooting connectivity issues or identifying which + mail server hosts this account. + - name: incoming_port + fieldtype: Data + label: Port + description: Used when diagnosing connection problems or verifying the network + port configured for receiving emails. + - name: attachment_limit + fieldtype: Int + label: Attachment Limit (MB) + description: Used when determining maximum file size allowed for email attachments + in MB. + - name: email_sync_option + fieldtype: Select + label: Email Sync Option + description: Used when configuring which emails to synchronize (all, unseen, or + by date range). + options: + - ALL + - UNSEEN + - name: initial_sync_count + fieldtype: Select + label: Initial Sync Count + description: Used when setting how many historical emails to retrieve during first-time + account setup. + options: + - '100' + - '250' + - '500' + - name: imap_folder + fieldtype: Table + label: IMAP Folder + description: '' + child_hint: + child_table: tabIMAP Folder + fieldname: imap_folder + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: imap_folder + - name: append_emails_to_sent_folder + fieldtype: Check + label: Append Emails to Sent Folder + description: Used when determining whether sent emails should be saved back to + the mail server's sent folder. + - name: sent_folder_name + fieldtype: Data + label: Sent Folder Name + description: Used when identifying the specific folder name where sent emails + are stored on the server. + - name: append_to + fieldtype: Link + label: Append To + description: Used when specifying which DocType incoming emails should automatically + create or link to. + join_hint: + table: tabDocType + 'on': append_to = tabDocType.name + - name: create_contact + fieldtype: Check + label: Create Contacts from Incoming Emails + description: Used when determining whether new contacts should be auto-created + from unknown email senders. + - name: enable_automatic_linking + fieldtype: Check + label: Enable Automatic Linking in Documents + description: Used when configuring whether emails should automatically link to + existing documents based on references. + - name: notify_if_unreplied + fieldtype: Check + label: Notify if unreplied + description: Used when enabling alerts for emails that remain unanswered beyond + a time threshold. + - name: unreplied_for_mins + fieldtype: Int + label: Notify if unreplied for (in mins) + description: Used when setting the time duration in minutes before triggering + unreplied email notifications. + - name: send_notification_to + fieldtype: Small Text + label: Send Notification to + description: Used when specifying which users or roles receive alerts about unreplied + emails. + - name: enable_outgoing + fieldtype: Check + label: Enable Outgoing + description: Used when determining whether this account can send outbound emails + via SMTP. + - name: use_tls + fieldtype: Check + label: Use TLS + description: Used when configuring TLS encryption for secure incoming email connections. + - name: use_ssl_for_outgoing + fieldtype: Check + label: Use SSL + description: Used when enabling SSL encryption for secure outbound SMTP email + transmission. + - name: smtp_server + fieldtype: Data + label: Outgoing Server + description: Used to identify which mail server handles outgoing emails for troubleshooting + delivery issues or configuring email integrations. + - name: smtp_port + fieldtype: Data + label: Port + description: Referenced when diagnosing email connection failures or verifying + secure transmission protocols. + - name: default_outgoing + fieldtype: Check + label: Default Outgoing + description: Queried to determine which email account is automatically selected + for sending system-generated notifications and user emails. + - name: always_use_account_email_id_as_sender + fieldtype: Check + label: Always use this email address as sender address + description: Checked when investigating sender address discrepancies or enforcing + consistent from-address policies. + - name: always_use_account_name_as_sender_name + fieldtype: Check + label: Always use this name as sender name + description: Used to verify sender name consistency in outbound communications + and branding compliance. + - name: send_unsubscribe_message + fieldtype: Check + label: Send unsubscribe message in email + description: Referenced when analyzing unsubscribe workflow behavior or compliance + with email marketing regulations. + - name: track_email_status + fieldtype: Check + label: Track Email Status + description: Queried to determine if delivery, open, and click tracking is enabled + for campaign analytics and follow-up automation. + - name: no_smtp_authentication + fieldtype: Check + label: Disable SMTP server authentication + description: Checked when troubleshooting authentication errors or configuring + email accounts for internal relay servers. + - name: always_bcc + fieldtype: Data + label: Always BCC Address + description: Used to identify automatic blind copy recipients for compliance monitoring + or management oversight requirements. + - name: add_signature + fieldtype: Check + label: Add Signature + description: Referenced when determining if email signatures are automatically + appended to outgoing messages. + - name: signature + fieldtype: Text Editor + label: Signature + description: Queried to retrieve or audit the signature content used in outbound + emails for branding and legal compliance. + - name: enable_auto_reply + fieldtype: Check + label: Enable Auto Reply + description: Checked to verify if out-of-office or automated response functionality + is active on the account. + - name: auto_reply_message + fieldtype: Text Editor + label: Auto Reply Message + description: Referenced to review or update the content sent in automated responses + to incoming emails. + - name: footer + fieldtype: Text Editor + label: Footer Content + description: Used to retrieve standard footer text appended to emails for disclaimers, + legal notices, or branding. + - name: uidvalidity + fieldtype: Data + label: UIDVALIDITY + description: Referenced for IMAP synchronization troubleshooting to detect mailbox + state changes or reset conditions. + - name: uidnext + fieldtype: Int + label: UIDNEXT + description: Tracks the next unique identifier to be assigned to incoming emails + for synchronization and message ordering purposes. + - name: no_failed + fieldtype: Int + label: no failed attempts + description: Counts failed email delivery or synchronization attempts to monitor + account health and troubleshoot connectivity issues. + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Email Account document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabEmail Campaign + description: '' + fields: + - name: campaign_name + fieldtype: Link + label: Campaign + description: Display name or title of the email campaign used in marketing communications + join_hint: + table: tabCampaign + 'on': campaign_name = tabCampaign.name + - name: email_campaign_for + fieldtype: Select + label: 'Email Campaign For ' + description: Target entity, audience segment, or purpose that this email campaign + is designed to reach + options: + - Lead + - Contact + - Email Group + - name: recipient + fieldtype: Dynamic Link + label: Recipient + description: Email address or contact who receives the campaign message + - name: sender + fieldtype: Link + label: Sender + description: Email address or contact who sends the campaign message + join_hint: + table: tabUser + 'on': sender = tabUser.name + - name: start_date + fieldtype: Date + label: Start Date + description: Date when the email campaign begins or is scheduled to launch + - name: end_date + fieldtype: Date + label: End Date + description: Date when the email campaign concludes or is scheduled to stop sending + messages. + - name: status + fieldtype: Select + label: Status + description: Current state of the email campaign such as draft, active, paused, + completed, or cancelled. + options: + - Scheduled + - In Progress + - Completed + - Unsubscribed + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Email Campaign document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabEmail Digest + description: '' + fields: + - name: enabled + fieldtype: Check + label: Enabled + description: Indicates whether this email digest is actively scheduled to send. + - name: company + fieldtype: Link + label: For Company + description: Company for which this email digest aggregates and reports financial + data. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: frequency + fieldtype: Select + label: How frequently? + description: How often the digest is sent (daily, weekly, monthly) to recipients. + options: + - Daily + - Weekly + - Monthly + - name: next_send + fieldtype: Data + label: 'Next email will be sent on:' + description: Scheduled date and time when this digest will be sent next. + - name: recipients + fieldtype: Table MultiSelect + label: Recipients + description: List of users or email addresses who receive this periodic digest. + child_hint: + child_table: tabEmail Digest Recipient + fieldname: recipients + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: recipients + - name: income + fieldtype: Check + label: New Income + description: Whether to include current period income figures in the digest. + - name: expenses_booked + fieldtype: Check + label: New Expenses + description: Whether to include current period expense figures in the digest. + - name: income_year_to_date + fieldtype: Check + label: Annual Income + description: Whether to include cumulative year-to-date income in the digest. + - name: expense_year_to_date + fieldtype: Check + label: Annual Expenses + description: Whether to include cumulative year-to-date expenses in the digest. + - name: bank_balance + fieldtype: Check + label: Bank Balance + description: Whether to include current bank account balances in the digest. + - name: credit_balance + fieldtype: Check + label: Bank Credit Balance + description: Used when checking customer credit limits or available credit for + new orders and payment capacity analysis. + - name: invoiced_amount + fieldtype: Check + label: Receivables + description: Used when analyzing billed revenue, tracking invoice totals, or measuring + actual sales recognized in a period. + - name: payables + fieldtype: Check + label: Payables + description: Used when reviewing outstanding vendor payments, cash flow obligations, + or accounts payable aging analysis. + - name: sales_orders_to_bill + fieldtype: Check + label: Sales Orders to Bill + description: Used when identifying unbilled sales orders, tracking billing backlog, + or managing revenue recognition workflows. + - name: purchase_orders_to_bill + fieldtype: Check + label: Purchase Orders to Bill + description: Used when monitoring vendor invoices expected but not yet received + against issued purchase orders. + - name: sales_order + fieldtype: Check + label: New Sales Orders + description: Used when tracking customer orders, analyzing order volume, or reviewing + order fulfillment status. + - name: purchase_order + fieldtype: Check + label: New Purchase Orders + description: Used when monitoring procurement activity, tracking vendor orders, + or analyzing purchasing patterns. + - name: sales_orders_to_deliver + fieldtype: Check + label: Sales Orders to Deliver + description: Used when identifying pending shipments, managing fulfillment queues, + or tracking delivery backlog. + - name: purchase_orders_to_receive + fieldtype: Check + label: Purchase Orders to Receive + description: Used when monitoring expected inventory receipts, tracking inbound + shipments, or managing receiving operations. + - name: sales_invoice + fieldtype: Check + label: New Sales Invoice + description: Used when analyzing customer billing activity, tracking receivables, + or reviewing revenue documentation. + - name: purchase_invoice + fieldtype: Check + label: New Purchase Invoice + description: Used when reviewing vendor bills received, tracking payable amounts, + or reconciling purchase orders to invoices. + - name: new_quotations + fieldtype: Check + label: New Quotations + description: Used when tracking recently created quotes, monitoring sales pipeline + entry, or analyzing quoting activity. + - name: pending_quotations + fieldtype: Check + label: Open Quotations + description: Used when reviewing open quotes awaiting customer response, tracking + quote conversion opportunities, or managing sales follow-up. + - name: issue + fieldtype: Check + label: Open Issues + description: Used when monitoring support tickets, tracking problem resolution, + or analyzing customer service workload. + - name: project + fieldtype: Check + label: Open Projects + description: Used when tracking project status, analyzing project portfolio, or + monitoring project-based revenue and costs. + - name: purchase_orders_items_overdue + fieldtype: Check + label: Purchase Orders Items Overdue + description: Used to identify and track purchase order line items that have passed + their expected delivery or due dates without completion. + - name: calendar_events + fieldtype: Check + label: Upcoming Calendar Events + description: Used to retrieve scheduled meetings, appointments, and time-based + activities for user awareness and planning. + - name: todo_list + fieldtype: Check + label: Open To Do + description: Used to display pending tasks and action items that require user + attention or completion. + - name: notifications + fieldtype: Check + label: Open Notifications + description: Used to alert users about system events, approvals, updates, or important + changes requiring acknowledgment or action. + - name: add_quote + fieldtype: Check + label: Add Quote + description: Used to include sales quotation details or summaries when communicating + pricing proposals to customers or stakeholders. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Email Digest document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabEmail Digest Recipient + description: '' + fields: + - name: recipient + fieldtype: Link + label: Recipient + description: Email address or user receiving the digest, used when identifying + who gets scheduled email reports. + join_hint: + table: tabUser + 'on': recipient = tabUser.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabEmail Digest Recipient). + Comparison-ready across parent records.' +- table: tabEmail Domain + description: '' + fields: + - name: domain_name + fieldtype: Data + label: Domain Name + description: The actual email domain name used to filter or route incoming emails + by domain. + - name: email_server + fieldtype: Data + label: Incoming Server + description: Mail server hostname or IP address used for connecting to this email + domain. + - name: use_imap + fieldtype: Check + label: Use IMAP + description: Flag indicating whether IMAP protocol is enabled for retrieving emails + from this domain. + - name: use_ssl + fieldtype: Check + label: Use SSL + description: Flag indicating whether SSL encryption is enabled for secure email + communication with this domain. + - name: use_starttls + fieldtype: Check + label: Use STARTTLS + description: Flag indicating whether STARTTLS encryption upgrade is enabled for + this email domain connection. + - name: incoming_port + fieldtype: Data + label: Port + description: Network port number used for receiving incoming emails from this + domain's mail server. + - name: attachment_limit + fieldtype: Int + label: Attachment Limit (MB) + description: Used to enforce or check maximum email attachment size restrictions + when troubleshooting send failures or configuring email policies. + - name: smtp_server + fieldtype: Data + label: Outgoing Server + description: Used to identify which outgoing mail server handles email delivery + for domain configuration or connectivity troubleshooting. + - name: use_tls + fieldtype: Check + label: Use TLS + description: Used to verify if transport layer security is enabled for email transmission + when auditing security settings or diagnosing connection issues. + - name: use_ssl_for_outgoing + fieldtype: Check + label: Use SSL + description: Used to confirm SSL encryption is active for outbound emails when + reviewing security compliance or resolving authentication problems. + - name: smtp_port + fieldtype: Data + label: Port + description: Used to identify the network port for outgoing email traffic when + configuring email clients or diagnosing delivery failures. + - name: append_emails_to_sent_folder + fieldtype: Check + label: Append Emails to Sent Folder + description: Used to determine if sent emails are automatically saved to a folder + for record-keeping or audit trail purposes. + - name: sent_folder_name + fieldtype: Data + label: Sent Folder Name + description: Used to locate where outbound emails are stored when users search + for sent message history or configure folder synchronization. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Email Domain document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabEmail Flag Queue + description: '' + fields: + - name: is_completed + fieldtype: Check + label: Is Completed + description: Indicates whether the email flagging action has been completed. + - name: communication + fieldtype: Data + label: Communication + description: Reference to the communication document associated with this email + flag. + - name: action + fieldtype: Select + label: Action + description: Type of flagging action to be performed on the email. + options: + - Read + - Unread + - name: email_account + fieldtype: Data + label: Email Account + description: Email account where the flagging action should be executed. + - name: uid + fieldtype: Data + label: UID + description: Unique identifier of the email message on the email server. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Email Flag Queue document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabEmail Group + description: '' + fields: + - name: title + fieldtype: Data + label: Title + description: Display name of the email group used for searching and presenting + subscriber lists to users. + - name: total_subscribers + fieldtype: Int + label: Total Subscribers + description: Count of active subscribers in this group, used for reporting list + size and engagement metrics. + - name: confirmation_email_template + fieldtype: Link + label: Confirmation Email Template + description: Template used for double opt-in confirmation emails when subscribers + join this group. + join_hint: + table: tabEmail Template + 'on': confirmation_email_template = tabEmail Template.name + - name: welcome_email_template + fieldtype: Link + label: Welcome Email Template + description: Template sent to new subscribers after joining, used in onboarding + workflow queries. + join_hint: + table: tabEmail Template + 'on': welcome_email_template = tabEmail Template.name + - name: welcome_url + fieldtype: Data + label: Welcome URL + description: Landing page URL for new subscribers, used in campaign setup and + redirect tracking. + - name: add_query_parameters + fieldtype: Check + label: Add Query Parameters + description: Flag indicating whether to append tracking parameters to links for + analytics and campaign attribution. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Email Group document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabEmail Group Member + description: '' + fields: + - name: email_group + fieldtype: Link + label: Email Group + description: Name of the email group this member is associated with. + join_hint: + table: tabEmail Group + 'on': email_group = tabEmail Group.name + - name: email + fieldtype: Data + label: Email + description: Email address of the member in this group, used for targeting campaigns + and communications. + - name: unsubscribed + fieldtype: Check + label: Unsubscribed + description: Flag indicating if this member has opted out of receiving emails + from this group. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Email Group Member document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabEmail Queue + description: '' + fields: + - name: sender + fieldtype: Data + label: Sender + description: Email address sending the message, used when filtering by sender + or troubleshooting delivery issues. + - name: recipients + fieldtype: Table + label: Recipient + description: '' + child_hint: + child_table: tabEmail Queue Recipient + fieldname: recipients + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: recipients + - name: show_as_cc + fieldtype: Small Text + label: Show as cc + description: Recipients to display in CC field, used when analyzing email visibility + and transparency. + - name: message + fieldtype: Code + label: Message + description: Email body content, used when searching email content or reviewing + communication history. + - name: status + fieldtype: Select + label: Status + description: Current send status of the email, used when monitoring delivery success + or identifying failed sends. + options: + - Not Sent + - Sending + - Sent + - Partially Sent + - Error + - name: error + fieldtype: Code + label: Error + description: Error message if email failed to send, used when troubleshooting + delivery failures. + - name: message_id + fieldtype: Small Text + label: Message ID + description: Unique identifier for tracking email delivery status and preventing + duplicate sends across systems. + - name: reference_doctype + fieldtype: Link + label: Reference Document Type + description: Links email to the source document type (e.g., Sales Order, Invoice) + for tracing which business transaction triggered the email. + join_hint: + table: tabDocType + 'on': reference_doctype = tabDocType.name + - name: reference_name + fieldtype: Data + label: Reference DocName + description: Identifies the specific document instance that generated this email + for audit trails and follow-up tracking. + - name: communication + fieldtype: Link + label: Communication + description: References the communication record containing email content, recipients, + and conversation history for thread continuity. + join_hint: + table: tabCommunication + 'on': communication = tabCommunication.name + - name: send_after + fieldtype: Datetime + label: Send After + description: Schedules delayed email delivery for time-sensitive campaigns, reminders, + or workflow-based notifications. + - name: priority + fieldtype: Int + label: Priority + description: Determines sending order when multiple emails are queued, ensuring + urgent transactional emails go first. + - name: add_unsubscribe_link + fieldtype: Check + label: Add Unsubscribe Link + description: Controls whether marketing compliance unsubscribe footer is added + for bulk campaigns versus transactional emails. + - name: unsubscribe_param + fieldtype: Data + label: Unsubscribe Param + description: Stores the parameter used to identify recipient preferences when + processing unsubscribe requests. + - name: unsubscribe_method + fieldtype: Data + label: Unsubscribe Method + description: Defines the technical endpoint or handler that processes unsubscribe + actions from email links. + - name: expose_recipients + fieldtype: Data + label: Expose Recipients + description: Controls whether all recipient email addresses are visible to each + other in To/CC fields. + - name: attachments + fieldtype: Code + label: Attachments + description: Lists files to be included with the email, typically invoices, reports, + or supporting documents from the reference transaction. + - name: retry + fieldtype: Int + label: Retry + description: Tracks failed delivery attempts to determine when to stop retrying + and flag emails for manual review. + - name: email_account + fieldtype: Link + label: Email Account + description: Specifies which configured SMTP account sends this email for brand + separation or departmental routing. + join_hint: + table: tabEmail Account + 'on': email_account = tabEmail Account.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Email Queue document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabEmail Queue Recipient + description: '' + fields: + - name: recipient + fieldtype: Data + label: Recipient + description: Email address of the person receiving this queued email + - name: status + fieldtype: Select + label: Status + description: Current delivery status of the email to this recipient such as sent, + pending, or failed + options: + - Not Sent + - Sent + - name: error + fieldtype: Code + label: Error + description: Error message captured when email delivery to this recipient fails + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabEmail Queue Recipient). + Comparison-ready across parent records.' +- table: tabEmail Rule + description: '' + fields: + - name: email_id + fieldtype: Data + label: Email ID + description: Email address or pattern that this rule applies to, used when searching + rules by sender or recipient. + - name: is_spam + fieldtype: Check + label: Is Spam + description: Flag indicating whether emails matching this rule should be marked + as spam, used in spam filtering queries. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Email Rule document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabEmail Template + description: '' + fields: + - name: subject + fieldtype: Data + label: Subject + description: Email subject line text used when searching for templates by topic + or purpose. + - name: use_html + fieldtype: Check + label: Use HTML + description: Flag indicating whether the template uses HTML formatting versus + plain text for email body. + - name: response_html + fieldtype: Code + label: 'Response ' + description: HTML-formatted email body content used when the template requires + rich formatting and styling. + - name: response + fieldtype: Text Editor + label: Response + description: Plain text or default email body content used for simple template + messages without HTML. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Email Template document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabEmail Unsubscribe + description: '' + fields: + - name: email + fieldtype: Data + label: Email + description: Email address that requested unsubscription, used to filter communications + and honor opt-out preferences. + - name: reference_doctype + fieldtype: Link + label: Reference Document Type + description: Type of document the unsubscribe applies to, used when unsubscribing + from specific module communications. + join_hint: + table: tabDocType + 'on': reference_doctype = tabDocType.name + - name: reference_name + fieldtype: Dynamic Link + label: Reference Name + description: Specific document name the unsubscribe applies to, used for targeted + unsubscribe from particular records. + - name: global_unsubscribe + fieldtype: Check + label: Global Unsubscribe + description: Flag indicating if user opted out of all communications versus specific + types, critical for compliance filtering. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Email Unsubscribe document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabEmployee + description: '' + fields: + - name: employee + fieldtype: Data + label: Employee + description: Primary employee ID or code used as the main reference in HR transactions, + payroll, and attendance tracking. + - name: naming_series + fieldtype: Select + label: Series + description: Auto-numbering pattern prefix for employee IDs, used to identify + employee groups or organizational divisions. + options: + - HR-EMP- + - name: first_name + fieldtype: Data + label: First Name + description: Employee's first name in primary language, used for name-based searches + and personalized communications. + - name: middle_name + fieldtype: Data + label: Middle Name + description: Employee's middle name, used for complete legal name identification + and formal documentation. + - name: last_name + fieldtype: Data + label: Last Name + description: Employee's surname or family name, used for alphabetical sorting + and family-based searches. + - name: employee_name + fieldtype: Data + label: Full Name + description: Full concatenated name of the employee, used for display in reports, + dropdowns, and user-facing interfaces. + - name: gender + fieldtype: Link + label: Gender + description: Employee's gender classification, used for demographic reporting, + compliance, and diversity analytics. + join_hint: + table: tabGender + 'on': gender = tabGender.name + - name: date_of_birth + fieldtype: Date + label: Date of Birth + description: Employee's birth date, used to calculate age, retirement eligibility, + and age-related benefits or compliance. + - name: salutation + fieldtype: Link + label: Salutation + description: Used to filter or display employees by title (Mr., Ms., Dr.) in formal + communications and reports. + join_hint: + table: tabSalutation + 'on': salutation = tabSalutation.name + - name: custom_restrict_location + fieldtype: Check + label: Restrict Location + description: Used to enforce location-based access control or filter employees + by permitted work locations. + - name: date_of_joining + fieldtype: Date + label: Date of Joining + description: Used to calculate tenure, filter by hire date ranges, or analyze + employee retention and onboarding cohorts. + - name: status + fieldtype: Select + label: Status + description: Used to filter active vs inactive employees or analyze workforce + status changes (Active, Left, Suspended). + options: + - Active + - Inactive + - Suspended + - Left + - name: user_id + fieldtype: Link + label: User ID + description: Used to link employee records to system user accounts for authentication + and permission queries. + join_hint: + table: tabUser + 'on': user_id = tabUser.name + - name: create_user_permission + fieldtype: Check + label: Create User Permission + description: Used to determine if an employee record should automatically generate + system login credentials. + - name: company + fieldtype: Link + label: Company + description: Used to filter employees by legal entity in multi-company organizations + or consolidate headcount by company. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: department + fieldtype: Link + label: Department + description: Used to filter, group, or analyze employees by organizational department + for reporting and resource allocation. + join_hint: + table: tabDepartment + 'on': department = tabDepartment.name + - name: employment_type + fieldtype: Link + label: Employment Type + description: Used to segment workforce by contract type (Full-time, Part-time, + Contract, Intern) for compliance and benefits analysis. + join_hint: + table: tabEmployment Type + 'on': employment_type = tabEmployment Type.name + - name: employee_number + fieldtype: Data + label: Employee Number + description: Used as unique identifier to search, reference, or integrate employee + records across systems. + - name: designation + fieldtype: Link + label: Designation + description: Used to filter or group employees by job title for organizational + charts, compensation analysis, and role-based reporting. + join_hint: + table: tabDesignation + 'on': designation = tabDesignation.name + - name: reports_to + fieldtype: Link + label: Reports to + description: Used to build reporting hierarchies, identify managers, or analyze + organizational structure and span of control. + join_hint: + table: tabEmployee + 'on': reports_to = tabEmployee.name + - name: branch + fieldtype: Link + label: Branch + description: Used to filter employees by physical office location for site-specific + reporting and resource planning. + join_hint: + table: tabBranch + 'on': branch = tabBranch.name + - name: grade + fieldtype: Link + label: Grade + description: Used to segment employees by level or pay grade for compensation + benchmarking and career progression analysis. + join_hint: + table: tabEmployee Grade + 'on': grade = tabEmployee Grade.name + - name: job_applicant + fieldtype: Link + label: Job Applicant + description: Used to trace employee records back to original application for recruitment + funnel analysis and source tracking. + join_hint: + table: tabJob Applicant + 'on': job_applicant = tabJob Applicant.name + - name: scheduled_confirmation_date + fieldtype: Date + label: Offer Date + description: Used to track when an employee's probation period is planned to end + and when confirmation reviews are due. + - name: final_confirmation_date + fieldtype: Date + label: Confirmation Date + description: Used to identify when an employee was officially confirmed as permanent + after completing probation. + - name: contract_end_date + fieldtype: Date + label: Contract End Date + description: Used to find employees with expiring contracts, plan renewals, or + filter fixed-term employees by contract duration. + - name: notice_number_of_days + fieldtype: Int + label: Notice (days) + description: Used to calculate last working dates during resignation processing + and determine notice period requirements by role or contract. + - name: date_of_retirement + fieldtype: Date + label: Date Of Retirement + description: Used to identify employees approaching retirement for succession + planning and retirement benefit processing. + - name: cell_number + fieldtype: Data + label: Mobile + description: Used to contact employees via mobile phone for urgent communications + or SMS notifications. + - name: personal_email + fieldtype: Data + label: Personal Email + description: Used to reach employees on non-company email for personal matters, + post-exit communications, or when company email is unavailable. + - name: company_email + fieldtype: Data + label: Company Email + description: Used for official work communications, system access, and identifying + active employees in corporate directories. + - name: prefered_contact_email + fieldtype: Select + label: Prefered Contact Email + description: Used to determine which email address to use when sending employee + communications or notifications. + options: + - Company Email + - Personal Email + - User ID + - name: prefered_email + fieldtype: Data + label: Prefered Email + description: Used to route employee correspondence to their chosen email address + for HR or administrative communications. + - name: unsubscribed + fieldtype: Check + label: Unsubscribed + description: Used to filter employees who opted out of non-essential email communications + or marketing messages. + - name: current_address + fieldtype: Small Text + label: Current Address + description: Used for payroll tax calculations, shipping work equipment, or contacting + employees at their present residence. + - name: current_accommodation_type + fieldtype: Select + label: Current Address Is + description: Used for relocation assistance decisions, housing allowance eligibility, + or employee living situation analysis. + options: + - Rented + - Owned + - name: permanent_address + fieldtype: Small Text + label: Permanent Address + description: Used for official records, background verification, or correspondence + when current address is temporary. + - name: permanent_accommodation_type + fieldtype: Select + label: Permanent Address Is + description: Used to assess employee housing stability for loan applications or + relocation benefit determinations. + options: + - Rented + - Owned + - name: person_to_be_contacted + fieldtype: Data + label: Emergency Contact Name + description: Emergency contact person name used when retrieving employee emergency + contact information or safety compliance records. + - name: emergency_phone_number + fieldtype: Data + label: Emergency Phone + description: Emergency contact phone number used for urgent employee contact situations + or safety incident reporting. + - name: relation + fieldtype: Data + label: Relation + description: Relationship of emergency contact to employee used when validating + emergency contact eligibility or dependent relationships. + - name: attendance_device_id + fieldtype: Data + label: Attendance Device ID (Biometric/RF tag ID) + description: Biometric or card device identifier used when tracking employee attendance, + access control, or time clock integration. + - name: holiday_list + fieldtype: Link + label: Holiday List + description: Assigned holiday calendar used when calculating working days, leave + eligibility, or payroll processing for location-specific holidays. + join_hint: + table: tabHoliday List + 'on': holiday_list = tabHoliday List.name + - name: default_shift + fieldtype: Link + label: Default Shift + description: Standard work shift assignment used when scheduling employees, calculating + shift allowances, or planning workforce coverage. + join_hint: + table: tabShift Type + 'on': default_shift = tabShift Type.name + - name: expense_approver + fieldtype: Link + label: Expense Approver + description: Manager who approves expense claims used when routing expense reports + or analyzing approval workflows. + join_hint: + table: tabUser + 'on': expense_approver = tabUser.name + - name: leave_approver + fieldtype: Link + label: Leave Approver + description: Manager who approves leave requests used when routing time-off requests + or tracking leave approval patterns. + join_hint: + table: tabUser + 'on': leave_approver = tabUser.name + - name: shift_request_approver + fieldtype: Link + label: Shift Request Approver + description: Manager who approves shift changes used when processing shift swap + requests or managing schedule modifications. + join_hint: + table: tabUser + 'on': shift_request_approver = tabUser.name + - name: ctc + fieldtype: Currency + label: Cost to Company (CTC) + description: Cost to company total compensation used when analyzing total employee + costs, budget planning, or compensation benchmarking. + - name: salary_currency + fieldtype: Link + label: Salary Currency + description: Currency of salary payment used when processing multi-currency payroll + or converting compensation across regions. + join_hint: + table: tabCurrency + 'on': salary_currency = tabCurrency.name + - name: salary_mode + fieldtype: Select + label: Salary Mode + description: Payment method such as bank transfer or cash used when processing + payroll disbursements or analyzing payment preferences. + options: + - Bank + - Cash + - Cheque + - name: payroll_cost_center + fieldtype: Link + label: Payroll Cost Center + description: Department or division for payroll expense allocation used when distributing + labor costs or generating departmental financial reports. + join_hint: + table: tabCost Center + 'on': payroll_cost_center = tabCost Center.name + - name: bank_name + fieldtype: Data + label: Bank Name + description: Employee's bank for salary deposit used when processing payroll transfers + or managing banking relationships. + - name: bank_ac_no + fieldtype: Data + label: Bank A/C No. + description: Employee's bank account number used when executing salary payments + or verifying direct deposit setup. + - name: iban + fieldtype: Data + label: IBAN + description: Used to identify employee bank account for salary payments, reimbursements, + and direct deposit setup. + - name: marital_status + fieldtype: Select + label: Marital Status + description: Used for benefits eligibility, tax withholding calculations, and + dependent coverage determination. + options: + - Single + - Married + - Divorced + - Widowed + - name: family_background + fieldtype: Small Text + label: Family Background + description: Used for emergency contact information, dependent verification, and + family-related leave requests. + - name: blood_group + fieldtype: Select + label: Blood Group + description: Used for medical emergencies, workplace safety incidents, and occupational + health records. + options: + - A+ + - A- + - B+ + - B- + - AB+ + - AB- + - O+ + - O- + - name: health_details + fieldtype: Small Text + label: Health Details + description: Used for workplace accommodations, fitness-for-duty assessments, + and occupational health compliance. + - name: health_insurance_provider + fieldtype: Link + label: Health Insurance Provider + description: Used to identify which insurance company covers the employee for + claims processing and benefits administration. + join_hint: + table: tabEmployee Health Insurance + 'on': health_insurance_provider = tabEmployee Health Insurance.name + - name: health_insurance_no + fieldtype: Data + label: Health Insurance No + description: Used to process medical claims, verify coverage, and coordinate benefits + with healthcare providers. + - name: passport_number + fieldtype: Data + label: Passport Number + description: Used for international travel arrangements, work visa processing, + and expatriate assignments. + - name: valid_upto + fieldtype: Date + label: Valid Upto + description: Used to verify passport validity for business travel authorization + and immigration compliance. + - name: date_of_issue + fieldtype: Date + label: Date of Issue + description: Used to track passport issuance timeline for renewal planning and + travel document verification. + - name: place_of_issue + fieldtype: Data + label: Place of Issue + description: Used to identify passport issuing authority for visa applications + and international assignment eligibility. + - name: bio + fieldtype: Text Editor + label: Bio / Cover Letter + description: Used for employee directory profiles, organizational charts, and + internal communication introductions. + - name: education + fieldtype: Table + label: Education + description: '' + child_hint: + child_table: tabEmployee Education + fieldname: education + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: education + - name: external_work_history + fieldtype: Table + label: External Work History + description: '' + child_hint: + child_table: tabEmployee External Work History + fieldname: external_work_history + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: external_work_history + - name: internal_work_history + fieldtype: Table + label: Internal Work History + description: '' + child_hint: + child_table: tabEmployee Internal Work History + fieldname: internal_work_history + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: internal_work_history + - name: resignation_letter_date + fieldtype: Date + label: Resignation Letter Date + description: Date when employee formally submitted resignation letter, used to + calculate notice period compliance and track resignation timelines. + - name: relieving_date + fieldtype: Date + label: Relieving Date + description: Official last working day when employee was relieved from duties, + used for final settlement calculations and employment duration reporting. + - name: held_on + fieldtype: Date + label: Exit Interview Held On + description: Date when exit interview or clearance meeting was conducted, used + to track offboarding process completion. + - name: new_workplace + fieldtype: Data + label: New Workplace + description: Name of organization employee is joining after resignation, used + for competitor analysis and talent migration tracking. + - name: leave_encashed + fieldtype: Select + label: Leave Encashed? + description: Number of unused leave days converted to cash payment during exit, + used for final settlement and leave liability calculations. + options: + - 'Yes' + - 'No' + - name: encashment_date + fieldtype: Date + label: Encashment Date + description: Date when leave encashment payment was processed, used for payroll + reconciliation and exit settlement tracking. + - name: reason_for_leaving + fieldtype: Small Text + label: Reason for Leaving + description: Primary cause for employee resignation such as better opportunity + or relocation, used for attrition analysis and retention insights. + - name: feedback + fieldtype: Small Text + label: Feedback + description: Exit interview comments or employee feedback about their experience, + used for organizational improvement and culture analysis. + - name: lft + fieldtype: Int + label: lft + description: Left boundary value in nested set model for organizational hierarchy, + used for efficient tree traversal queries in reporting structure. + - name: rgt + fieldtype: Int + label: rgt + description: Right boundary value in nested set model for organizational hierarchy, + used for efficient subtree queries in reporting structure. + - name: old_parent + fieldtype: Data + label: Old Parent + description: Previous reporting manager or parent node before organizational change, + used for tracking reporting line history and restructuring analysis. + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Employee document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabEmployee Education + description: '' + fields: + - name: school_univ + fieldtype: Small Text + label: School/University + description: Name of the educational institution where the qualification was obtained, + used when searching employees by alma mater or institution reputation. + - name: qualification + fieldtype: Data + label: Qualification + description: Degree or certification name obtained by the employee, used when + filtering candidates by educational credentials or job requirements. + - name: level + fieldtype: Select + label: Level + description: Educational level such as graduate, postgraduate, or doctorate, used + to assess qualification hierarchy and eligibility for positions. + options: + - Graduate + - Post Graduate + - Under Graduate + - name: year_of_passing + fieldtype: Int + label: Year of Passing + description: Year the employee completed this qualification, used to calculate + experience since graduation or verify recency of education. + - name: class_per + fieldtype: Data + label: Class / Percentage + description: Percentage or grade achieved in the qualification, used to evaluate + academic performance for promotions or hiring decisions. + - name: maj_opt_subj + fieldtype: Text + label: Major/Optional Subjects + description: Major or optional subject studied during the qualification, used + to match employee expertise with specialized role requirements. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabEmployee Education). + Comparison-ready across parent records.' +- table: tabEmployee External Work History + description: '' + fields: + - name: company_name + fieldtype: Data + label: Company + description: Name of the previous employer where the employee worked, used when + analyzing candidate work background and employment patterns. + - name: designation + fieldtype: Data + label: Designation + description: Job title or role held at the previous company, used when evaluating + candidate experience levels and career progression. + - name: salary + fieldtype: Currency + label: Salary + description: Compensation received at the previous employer, used for salary benchmarking + and determining competitive offer amounts. + - name: address + fieldtype: Small Text + label: Address + description: Location or address of the previous employer, used when analyzing + geographic work history and relocation patterns. + - name: contact + fieldtype: Data + label: Contact + description: Contact information for the previous employer, used for employment + verification and reference checks. + - name: total_experience + fieldtype: Data + label: Total Experience + description: Duration of employment at this previous company, used when calculating + cumulative work experience and tenure patterns. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabEmployee External + Work History). Comparison-ready across parent records.' +- table: tabEmployee Group + description: '' + fields: + - name: employee_group_name + fieldtype: Data + label: Name + description: Display name of the employee group, used when searching for or identifying + specific employee groupings by their business label. + - name: employee_list + fieldtype: Table + label: Employee + description: '' + child_hint: + child_table: tabEmployee Group Table + fieldname: employee_list + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: employee_list + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Employee Group document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabEmployee Group Table + description: '' + fields: + - name: employee + fieldtype: Link + label: Employee + description: Employee ID linked to this group assignment, used to find which groups + a specific employee belongs to. + join_hint: + table: tabEmployee + 'on': employee = tabEmployee.name + - name: employee_name + fieldtype: Data + label: Employee Name + description: Full name of the employee in this group, used for displaying human-readable + group membership lists. + - name: user_id + fieldtype: Data + label: ERPNext User ID + description: System user account associated with the employee, used to link group + permissions and access rights to login credentials. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabEmployee Group + Table). Comparison-ready across parent records.' +- table: tabEmployee Internal Work History + description: '' + fields: + - name: branch + fieldtype: Link + label: Branch + description: Branch location where the employee worked during this period, used + to analyze employee movement across office locations. + join_hint: + table: tabBranch + 'on': branch = tabBranch.name + - name: department + fieldtype: Link + label: Department + description: Department where the employee worked during this period, used to + track career progression and inter-departmental transfers. + join_hint: + table: tabDepartment + 'on': department = tabDepartment.name + - name: designation + fieldtype: Link + label: Designation + description: Job title or position held during this period, used to analyze promotions, + role changes, and career advancement. + join_hint: + table: tabDesignation + 'on': designation = tabDesignation.name + - name: from_date + fieldtype: Date + label: From Date + description: Start date of this work assignment, used to determine when an employee + began in a specific role, department, or branch. + - name: to_date + fieldtype: Date + label: To Date + description: End date of this work assignment, used to calculate tenure in positions + and identify current versus historical assignments. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabEmployee Internal + Work History). Comparison-ready across parent records.' +- table: tabEnergy Point Log + description: '' + fields: + - name: user + fieldtype: Link + label: User + description: User who received or lost the energy points, used for analyzing individual + user engagement and rewards. + join_hint: + table: tabUser + 'on': user = tabUser.name + - name: type + fieldtype: Select + label: Type + description: Classification of the point transaction such as appreciation, review, + or auto-generated, used for filtering point sources. + options: + - Auto + - Appreciation + - Criticism + - Review + - Revert + - name: points + fieldtype: Int + label: Points + description: Numerical value of energy points awarded or deducted, used for calculating + user scores and leaderboards. + - name: rule + fieldtype: Link + label: Rule + description: Reference to the energy point rule that triggered this log entry, + used for understanding which actions earned points. + join_hint: + table: tabEnergy Point Rule + 'on': rule = tabEnergy Point Rule.name + - name: reference_doctype + fieldtype: Link + label: Reference Document Type + description: Document type that triggered the energy point transaction, used for + analyzing which modules drive engagement. + join_hint: + table: tabDocType + 'on': reference_doctype = tabDocType.name + - name: reference_name + fieldtype: Data + label: Reference Name + description: Specific document identifier that triggered the energy points, used + for tracing points back to source actions. + - name: reverted + fieldtype: Check + label: Reverted + description: Indicates if this energy point transaction was reversed or cancelled, + used when analyzing valid versus invalidated point awards. + - name: revert_of + fieldtype: Link + label: Revert Of + description: References the original energy point log entry that this record reverses, + used to trace point correction history and audit trails. + join_hint: + table: tabEnergy Point Log + 'on': revert_of = tabEnergy Point Log.name + - name: reason + fieldtype: Text + label: Reason + description: Explains why energy points were awarded or deducted, used when filtering + or grouping point transactions by achievement type or business justification. + - name: seen + fieldtype: Check + label: Seen + description: Tracks whether the user has viewed this energy point notification, + used to identify unread point awards and measure user engagement with the gamification + system. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Energy Point Log document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabEnergy Point Rule + description: '' + fields: + - name: enabled + fieldtype: Check + label: Enabled + description: Whether this energy point rule is currently active and awarding points. + - name: rule_name + fieldtype: Data + label: Rule Name + description: Descriptive name of the rule used to identify what action earns points. + - name: reference_doctype + fieldtype: Link + label: Reference Document Type + description: The DocType this rule monitors for triggering point awards. + join_hint: + table: tabDocType + 'on': reference_doctype = tabDocType.name + - name: for_doc_event + fieldtype: Select + label: For Document Event + description: The document event (create, submit, cancel) that triggers point allocation. + options: + - New + - Submit + - Cancel + - Value Change + - Custom + - name: field_to_check + fieldtype: Select + label: Field To Check + description: Specific field in the reference DocType evaluated to determine point + eligibility. + - name: points + fieldtype: Int + label: Points + description: Number of energy points awarded when this rule conditions are met. + - name: for_assigned_users + fieldtype: Check + label: Allot Points To Assigned Users + description: Determines if energy points are awarded only to users explicitly + assigned to the document or task. + - name: user_field + fieldtype: Select + label: User Field + description: Specifies which field in the document contains the user who should + receive energy points. + - name: multiplier_field + fieldtype: Select + label: Multiplier Field + description: Defines a numeric field whose value multiplies the base points awarded + (e.g., deal value, quantity). + - name: max_points + fieldtype: Int + label: Maximum Points + description: Sets the maximum number of energy points that can be awarded per + occurrence of this rule. + - name: apply_only_once + fieldtype: Check + label: Apply Only Once + description: Controls whether points are awarded only on the first trigger or + repeatedly for each qualifying event. + - name: condition + fieldtype: Code + label: Condition + description: Defines the criteria or filter that must be met for the energy point + rule to execute and award points. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Energy Point Rule document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabError Log + description: '' + fields: + - name: seen + fieldtype: Check + label: Seen + description: Flag indicating whether the error has been reviewed, used to filter + unresolved or pending errors. + - name: reference_doctype + fieldtype: Link + label: Reference DocType + description: Document type where the error originated, used to analyze which modules + generate most errors. + join_hint: + table: tabDocType + 'on': reference_doctype = tabDocType.name + - name: reference_name + fieldtype: Data + label: Reference Name + description: Specific document name that caused the error, used to trace errors + back to source records. + - name: method + fieldtype: Data + label: Title + description: Function or API method that failed, used to identify which operations + are failing. + - name: error + fieldtype: Code + label: Error + description: Error message or exception details, used to search for specific error + types or patterns. + - name: trace_id + fieldtype: Data + label: Trace ID + description: Unique trace identifier for correlating related errors across distributed + operations. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Error Log document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabEvent + description: '' + fields: + - name: subject + fieldtype: Small Text + label: Subject + description: Event title or description, primary field for searching and identifying + event content. + - name: event_category + fieldtype: Select + label: Event Category + description: Classification of event purpose (meeting, call, task), used to group + and filter events by type. + options: + - Event + - Meeting + - Call + - Sent/Received Email + - Other + - name: event_type + fieldtype: Select + label: Event Type + description: Specific event classification (public, private, cancelled), used + for access control and status filtering. + options: + - Private + - Public + - name: send_reminder + fieldtype: Check + label: Send an email reminder in the morning + description: Flag indicating if reminder notifications are enabled, used to filter + events with active reminders. + - name: repeat_this_event + fieldtype: Check + label: Repeat this Event + description: Flag for recurring events, used to identify and manage repeating + schedules. + - name: starts_on + fieldtype: Datetime + label: Starts on + description: Used to filter or identify when an event begins, commonly in scheduling + queries and availability checks. + - name: ends_on + fieldtype: Datetime + label: Ends on + description: Used to determine when an event concludes, essential for duration + calculations and conflict detection. + - name: status + fieldtype: Select + label: Status + description: Used to filter events by their current state such as confirmed, cancelled, + or tentative. + options: + - Open + - Completed + - Closed + - Cancelled + - name: sender + fieldtype: Data + label: Sender + description: Used to identify who created or sent the event invitation, relevant + for ownership and accountability queries. + - name: all_day + fieldtype: Check + label: All Day + description: Used to distinguish full-day events from time-specific appointments + in scheduling and calendar views. + - name: sync_with_google_calendar + fieldtype: Check + label: Sync with Google Calendar + description: Used to determine if an event should be synchronized with external + Google Calendar systems. + - name: add_video_conferencing + fieldtype: Check + label: Add Video Conferencing + description: Used to identify events that require or include video meeting capabilities. + - name: google_calendar + fieldtype: Link + label: Google Calendar + description: Used to link events to a specific Google Calendar account or calendar + name. + join_hint: + table: tabGoogle Calendar + 'on': google_calendar = tabGoogle Calendar.name + - name: google_calendar_id + fieldtype: Data + label: Google Calendar ID + description: Used to reference the unique identifier of the associated Google + Calendar for integration purposes. + - name: google_calendar_event_id + fieldtype: Data + label: Google Calendar Event ID + description: Used to match events with their corresponding Google Calendar event + entries for sync operations. + - name: google_meet_link + fieldtype: Small Text + label: Google Meet Link + description: Used to retrieve the video conferencing URL when users need to join + virtual meetings. + - name: pulled_from_google_calendar + fieldtype: Check + label: Pulled from Google Calendar + description: Used to identify events that originated from Google Calendar rather + than being created internally. + - name: repeat_on + fieldtype: Select + label: Repeat On + description: Used to define the recurrence pattern for repeating events such as + weekly or monthly schedules. + options: + - Daily + - Weekly + - Monthly + - Yearly + - name: repeat_till + fieldtype: Date + label: Repeat Till + description: Used to determine the end date for recurring events in series scheduling + queries. + - name: monday + fieldtype: Check + label: Monday + description: Used to indicate if an event occurs on Mondays in weekly recurrence + patterns. + - name: tuesday + fieldtype: Check + label: Tuesday + description: Used to filter or identify events scheduled on Tuesdays in weekly + recurring patterns. + - name: wednesday + fieldtype: Check + label: Wednesday + description: Used to filter or identify events scheduled on Wednesdays in weekly + recurring patterns. + - name: thursday + fieldtype: Check + label: Thursday + description: Used to filter or identify events scheduled on Thursdays in weekly + recurring patterns. + - name: friday + fieldtype: Check + label: Friday + description: Used to filter or identify events scheduled on Fridays in weekly + recurring patterns. + - name: saturday + fieldtype: Check + label: Saturday + description: Used to filter or identify events scheduled on Saturdays in weekly + recurring patterns. + - name: sunday + fieldtype: Check + label: Sunday + description: Used to filter or identify events scheduled on Sundays in weekly + recurring patterns. + - name: description + fieldtype: Text Editor + label: Description + description: Used to search event details, meeting agendas, or understand the + purpose and content of scheduled events. + - name: event_participants + fieldtype: Table + label: Event Participants + description: '' + child_hint: + child_table: tabEvent Participants + fieldname: event_participants + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: event_participants + - name: reference_doctype + fieldtype: Link + label: Reference Document Type + description: Used to link events to source documents like Sales Orders or Projects + when tracking event context. + join_hint: + table: tabDocType + 'on': reference_doctype = tabDocType.name + - name: reference_docname + fieldtype: Dynamic Link + label: Reference Doc + description: Used to identify the specific document instance that triggered or + is associated with the event. + - name: links + fieldtype: Table + label: Links + description: '' + child_hint: + child_table: tabDynamic Link + fieldname: links + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: links + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Event document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabEvent Participants + description: '' + fields: + - name: reference_doctype + fieldtype: Link + label: Reference Document Type + description: Type of linked document for the participant, used when attendees + are contacts, leads, or customers. + join_hint: + table: tabDocType + 'on': reference_doctype = tabDocType.name + - name: reference_docname + fieldtype: Dynamic Link + label: Reference Name + description: Specific document name of the linked participant record, used to + retrieve full attendee details from other modules. + - name: email + fieldtype: Data + label: Email + description: Participant email address used for event invitations, reminders, + and filtering attendees by contact information. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabEvent Participants). + Comparison-ready across parent records.' +- table: tabExchange Rate Revaluation + description: '' + fields: + - name: posting_date + fieldtype: Date + label: Posting Date + description: Date when the exchange rate revaluation was posted to the general + ledger + - name: rounding_loss_allowance + fieldtype: Float + label: Rounding Loss Allowance + description: Maximum acceptable rounding difference amount allowed when calculating + revaluation gains or losses + - name: company + fieldtype: Link + label: Company + description: Identifies which company entity the exchange rate revaluation applies + to for multi-entity organizations. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: accounts + fieldtype: Table + label: Exchange Rate Revaluation Account + description: '' + child_hint: + child_table: tabExchange Rate Revaluation Account + fieldname: accounts + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: accounts + - name: gain_loss_unbooked + fieldtype: Currency + label: Gain/Loss from Revaluation + description: Indicates the calculated unrealized foreign exchange gain or loss + amount that has not yet been posted to the general ledger. + - name: gain_loss_booked + fieldtype: Currency + label: Gain/Loss already booked + description: Realized foreign exchange gains or losses that have been posted to + accounting ledgers from this revaluation. + - name: total_gain_loss + fieldtype: Currency + label: Total Gain/Loss + description: Total calculated foreign exchange gain or loss amount from this revaluation, + including both booked and unbooked amounts. + - name: amended_from + fieldtype: Link + label: Amended From + description: Reference to the previous exchange rate revaluation document that + this record amends or corrects. + join_hint: + table: tabExchange Rate Revaluation + 'on': amended_from = tabExchange Rate Revaluation.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Exchange Rate Revaluation document (master/transaction). + Use only for single-entity lookups, not cross-record comparison unless fields + are per-relationship (e.g. supplier, price_list).' +- table: tabExchange Rate Revaluation Account + description: '' + fields: + - name: account + fieldtype: Link + label: Account + description: The general ledger account that will be revalued for foreign currency + gains or losses, used when identifying which accounts require currency revaluation. + join_hint: + table: tabAccount + 'on': account = tabAccount.name + - name: party_type + fieldtype: Link + label: Party Type + description: The type of party (Customer, Supplier, Employee) associated with + the revaluation account, used when filtering revaluations by business relationship + category. + join_hint: + table: tabDocType + 'on': party_type = tabDocType.name + - name: party + fieldtype: Dynamic Link + label: Party + description: The customer or supplier whose foreign currency balance is being + revalued for exchange rate gains or losses. + - name: account_currency + fieldtype: Link + label: Account Currency + description: The foreign currency in which the party's account balance is denominated. + join_hint: + table: tabCurrency + 'on': account_currency = tabCurrency.name + - name: balance_in_account_currency + fieldtype: Currency + label: Balance In Account Currency + description: The outstanding amount owed by or to the party in their account's + foreign currency before revaluation. + - name: new_balance_in_account_currency + fieldtype: Currency + label: New Balance In Account Currency + description: The recalculated account balance in the original account currency + after applying the new exchange rate for revaluation. + - name: current_exchange_rate + fieldtype: Float + label: Current Exchange Rate + description: The exchange rate currently in effect before revaluation adjustments + are applied. + - name: new_exchange_rate + fieldtype: Float + label: New Exchange Rate + description: The updated exchange rate being applied during the revaluation process + to recalculate foreign currency balances. + - name: balance_in_base_currency + fieldtype: Currency + label: Balance In Base Currency + description: Original account balance converted to base currency before revaluation + adjustments are applied. + - name: new_balance_in_base_currency + fieldtype: Currency + label: New Balance In Base Currency + description: Updated account balance in base currency after applying current exchange + rates during revaluation. + - name: gain_loss + fieldtype: Currency + label: Gain/Loss + description: Calculated foreign exchange gain or loss amount resulting from the + difference between original and revalued balances. + - name: zero_balance + fieldtype: Check + label: Zero Balance + description: Indicates whether the revaluation account should have its balance + zeroed out or reset during exchange rate revaluation processing. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabExchange Rate + Revaluation Account). Comparison-ready across parent records.' +- table: tabFile + description: '' + fields: + - name: file_name + fieldtype: Data + label: File Name + description: Original name of the uploaded file, used for searching files by name + or extension. + - name: is_private + fieldtype: Check + label: Is Private + description: Flag indicating if file has restricted access, used to filter between + public and private files in permission queries. + - name: file_type + fieldtype: Data + label: File Type + description: MIME type or category of the file (PDF, image, document), used to + filter files by format in search queries. + - name: is_home_folder + fieldtype: Check + label: Is Home Folder + description: Flag identifying user's home folder, used to locate root-level personal + file storage locations. + - name: is_attachments_folder + fieldtype: Check + label: Is Attachments Folder + description: Flag identifying system attachments folder, used to distinguish system-managed + attachment storage from user folders. + - name: file_size + fieldtype: Int + label: File Size + description: Size of the file in bytes, used for storage analysis, finding large + files, or filtering by size constraints. + - name: file_url + fieldtype: Code + label: File URL + description: Used to retrieve or reference the actual file location when users + need to access uploaded documents or attachments. + - name: thumbnail_url + fieldtype: Small Text + label: Thumbnail URL + description: Used to display preview images of files in lists or galleries before + opening the full document. + - name: folder + fieldtype: Link + label: Folder + description: Used to filter or organize files by directory structure when searching + within specific file locations. + join_hint: + table: tabFile + 'on': folder = tabFile.name + - name: is_folder + fieldtype: Check + label: Is Folder + description: Used to distinguish between folder containers and actual files when + navigating file hierarchies or counting documents. + - name: attached_to_doctype + fieldtype: Link + label: Attached To DocType + description: Used to find all files linked to a specific document type like Sales + Order, Customer, or Invoice. + join_hint: + table: tabDocType + 'on': attached_to_doctype = tabDocType.name + - name: attached_to_name + fieldtype: Data + label: Attached To Name + description: Used to retrieve all attachments for a specific document instance + by its unique identifier. + - name: attached_to_field + fieldtype: Data + label: Attached To Field + description: Used to identify which specific field on a form contains the file + attachment when multiple attachment points exist. + - name: old_parent + fieldtype: Data + label: old_parent + description: Used to track file movement history or restore previous folder locations + after reorganization. + - name: content_hash + fieldtype: Data + label: Content Hash + description: Used to detect duplicate files or verify file integrity when checking + for unchanged document versions. + - name: uploaded_to_dropbox + fieldtype: Check + label: Uploaded To Dropbox + description: Used to filter files that have been synchronized to Dropbox for external + cloud storage tracking. + - name: uploaded_to_google_drive + fieldtype: Check + label: Uploaded To Google Drive + description: Used to identify files backed up to Google Drive when checking cloud + synchronization status. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per File document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabFinance Book + description: '' + fields: + - name: finance_book_name + fieldtype: Data + label: Name + description: Display name of the finance book used when users specify which accounting + book or ledger to query + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Finance Book document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabFiscal Year + description: Represents a Financial Year. All accounting entries and other major + transactions are tracked against the Fiscal Year. + fields: + - name: year + fieldtype: Data + label: Year Name + description: Numeric calendar year value of the fiscal year, used when users query + by specific year numbers or date ranges. + - name: disabled + fieldtype: Check + label: Disabled + description: Indicates whether the fiscal year is inactive or no longer available + for transaction posting or selection. + - name: is_short_year + fieldtype: Check + label: Is Short/Long Year + description: Indicates whether the fiscal year has fewer than 12 months, relevant + when users ask about partial or abbreviated fiscal periods. + - name: year_start_date + fieldtype: Date + label: Year Start Date + description: The date when the fiscal year begins, used when users need to identify + the starting point of a fiscal period or filter transactions from the start + of the year. + - name: year_end_date + fieldtype: Date + label: Year End Date + description: The date when the fiscal year ends, used when users need to identify + the closing point of a fiscal period or filter transactions through year-end. + - name: companies + fieldtype: Table + label: Companies + description: '' + child_hint: + child_table: tabFiscal Year Company + fieldname: companies + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: companies + - name: auto_created + fieldtype: Check + label: Auto Created + description: Whether the fiscal year was automatically created by the system rather + than manually defined by a user + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Fiscal Year document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabFiscal Year Company + description: '' + fields: + - name: company + fieldtype: Link + label: Company + description: Company entity associated with this fiscal year configuration for + multi-company financial period tracking + join_hint: + table: tabCompany + 'on': company = tabCompany.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabFiscal Year Company). + Comparison-ready across parent records.' +- table: tabForm Tour + description: '' + fields: + - name: title + fieldtype: Data + label: Title + description: Display name of the form tour shown to users, used when searching + or listing available tours. + - name: view_name + fieldtype: Select + label: View + description: Target view where this tour is displayed, used to filter tours by + specific form views. + options: + - Workspaces + - List + - Form + - Tree + - Page + - name: workspace_name + fieldtype: Link + label: Select Workspace + description: Workspace where the tour is accessible, used to organize tours by + functional area or module. + join_hint: + table: tabWorkspace + 'on': workspace_name = tabWorkspace.name + - name: list_name + fieldtype: Select + label: Select List View + description: List view associated with this tour, used when tours guide users + through list-based interfaces. + options: + - List + - Report + - Dashboard + - Kanban + - Gantt + - Calendar + - File + - Image + - Inbox + - Map + - name: report_name + fieldtype: Link + label: Select Report + description: Report associated with this tour, used when tours explain report + functionality or navigation. + join_hint: + table: tabReport + 'on': report_name = tabReport.name + - name: dashboard_name + fieldtype: Link + label: Select Dashboard + description: Dashboard associated with this tour, used when tours guide users + through dashboard features. + join_hint: + table: tabDashboard + 'on': dashboard_name = tabDashboard.name + - name: new_document_form + fieldtype: Check + label: New Document Form + description: Indicates if this tour guides users through creating a new document + in a specific DocType form. + - name: page_name + fieldtype: Link + label: Select Page + description: Specifies the target page where this UI tour is activated and displayed + to users. + join_hint: + table: tabPage + 'on': page_name = tabPage.name + - name: reference_doctype + fieldtype: Link + label: Reference Document + description: Links the tour to a specific DocType when demonstrating document-related + workflows or forms. + join_hint: + table: tabDocType + 'on': reference_doctype = tabDocType.name + - name: module + fieldtype: Link + label: Module + description: Identifies which ERP module this tour belongs to for organizational + and filtering purposes. + join_hint: + table: tabModule Def + 'on': module = tabModule Def.name + - name: ui_tour + fieldtype: Check + label: UI Tour + description: Stores the unique identifier or name of the user interface tour for + reference and activation. + - name: track_steps + fieldtype: Check + label: Track Steps + description: Enables step-by-step progress tracking to monitor user completion + of the tour. + - name: is_standard + fieldtype: Check + label: Is Standard + description: Marks whether this tour is a system-provided standard tour or a custom + user-created tour. + - name: save_on_complete + fieldtype: Check + label: Save on Completion + description: Determines if the system automatically saves progress or data when + the tour is completed. + - name: first_document + fieldtype: Check + label: Show First Document Tour + description: Flags if this tour is triggered when a user creates their very first + document in a DocType. + - name: include_name_field + fieldtype: Check + label: Include Name Field + description: Controls whether the document name field is included as part of the + tour steps. + - name: page_route + fieldtype: Small Text + label: Page Route + description: Defines the URL route path where the tour should be launched or made + available. + - name: steps + fieldtype: Table + label: Steps + description: '' + child_hint: + child_table: tabForm Tour Step + fieldname: steps + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: steps + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Form Tour document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabForm Tour Step + description: '' + fields: + - name: ui_tour + fieldtype: Check + label: UI Tour + description: Reference to the UI Tour definition this step belongs to. + - name: is_table_field + fieldtype: Check + label: Is Table Field + description: Indicates if this step highlights a field within a child table. + - name: title + fieldtype: Data + label: Title + description: Display title of the tour step shown to users during the tour. + - name: parent_fieldname + fieldtype: Select + label: Parent Field + description: Parent field name when the step targets a nested or child table field. + - name: fieldname + fieldtype: Select + label: Fieldname + description: Specific form field that this tour step highlights or explains. + - name: element_selector + fieldtype: Data + label: Element Selector + description: CSS selector used to identify the UI element this step should highlight. + - name: parent_element_selector + fieldtype: Data + label: Parent Element Selector + description: CSS selector identifying the parent container element where the tour + step should be anchored or displayed. + - name: position + fieldtype: Select + label: Position + description: Placement location of the tour popover relative to the target element + such as top, bottom, left, or right. + options: + - Left + - Left Center + - Left Bottom + - Top + - Top Center + - Top Right + - Right + - Right Center + - Right Bottom + - Bottom + - Bottom Center + - Bottom Right + - Mid Center + - name: hide_buttons + fieldtype: Check + label: Hide Buttons + description: Flag indicating whether navigation buttons should be hidden for this + step, typically for read-only informational steps. + - name: popover_element + fieldtype: Check + label: Popover Element + description: CSS selector of the specific UI element that the tour popover should + point to or highlight. + - name: modal_trigger + fieldtype: Check + label: Modal Trigger + description: Indicates if this tour step should trigger a modal dialog before + proceeding to the next step. + - name: offset_x + fieldtype: Int + label: Offset X + description: Horizontal pixel offset to fine-tune the popover position from its + default calculated location. + - name: offset_y + fieldtype: Int + label: Offset Y + description: Vertical pixel offset to fine-tune the popover position from its + default calculated location. + - name: next_on_click + fieldtype: Check + label: Next on Click + description: Flag determining if clicking the highlighted element automatically + advances to the next tour step. + - name: label + fieldtype: Data + label: Label + description: Short title or heading displayed at the top of the tour step popover. + - name: fieldtype + fieldtype: Data + label: Fieldtype + description: Data type classification of this configuration field within the form + tour step definition. + - name: has_next_condition + fieldtype: Check + label: Has Next Condition + description: Flag indicating whether conditional logic determines which step follows + this one instead of sequential progression. + - name: next_step_condition + fieldtype: Code + label: Next Step Condition + description: Expression or rule evaluated to determine which tour step should + display next based on user actions or system state. + - name: next_form_tour + fieldtype: Link + label: Next Form Tour + description: Reference to another form tour that should launch when this tour + step or sequence completes. + join_hint: + table: tabForm Tour + 'on': next_form_tour = tabForm Tour.name + - name: child_doctype + fieldtype: Data + label: Child Doctype + description: Identifies the specific child table or document type that this tour + step is demonstrating or highlighting within the form. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabForm Tour Step). + Comparison-ready across parent records.' +- table: tabGL Entry + description: '' + fields: + - name: posting_date + fieldtype: Date + label: Posting Date + description: Date when the entry was officially recorded in the general ledger + for accounting period purposes + - name: transaction_date + fieldtype: Date + label: Transaction Date + description: Date when the underlying business transaction actually occurred, + which may differ from when it was posted + - name: fiscal_year + fieldtype: Link + label: Fiscal Year + description: The fiscal year period to which this general ledger entry is assigned + for financial reporting and year-end closing purposes. + join_hint: + table: tabFiscal Year + 'on': fiscal_year = tabFiscal Year.name + - name: due_date + fieldtype: Date + label: Due Date + description: The date by which payment or settlement related to this GL entry + is expected or required. + - name: account + fieldtype: Link + label: Account + description: The general ledger account number or code that categorizes this entry + for financial statement classification and reporting. + join_hint: + table: tabAccount + 'on': account = tabAccount.name + - name: account_currency + fieldtype: Link + label: Account Currency + description: Currency in which the general ledger account transaction is recorded, + relevant when users ask about foreign currency transactions or multi-currency + accounting entries. + join_hint: + table: tabCurrency + 'on': account_currency = tabCurrency.name + - name: against + fieldtype: Text + label: Against + description: Reference to the offsetting account or party in a double-entry transaction, + used when users need to trace what account was debited or credited against the + current entry. + - name: party_type + fieldtype: Link + label: Party Type + description: Classification of the external entity involved in the transaction + such as Customer, Supplier, or Employee, relevant when users filter GL entries + by business relationship type. + join_hint: + table: tabDocType + 'on': party_type = tabDocType.name + - name: party + fieldtype: Dynamic Link + label: Party + description: The customer, supplier, or other external entity involved in the + transaction when the GL entry relates to a receivable, payable, or party-specific + transaction. + - name: voucher_type + fieldtype: Link + label: Voucher Type + description: The category or classification of the accounting document such as + Payment Entry, Sales Invoice, Purchase Invoice, or Journal Entry. + join_hint: + table: tabDocType + 'on': voucher_type = tabDocType.name + - name: voucher_no + fieldtype: Dynamic Link + label: Voucher No + description: The unique identifier or document number of the source transaction + that created this GL entry. + - name: voucher_subtype + fieldtype: Small Text + label: Voucher Subtype + description: Classification of journal entry by operational purpose such as opening, + closing, or contra entries. + - name: transaction_currency + fieldtype: Link + label: Transaction Currency + description: Currency in which the original transaction amount was recorded, relevant + for multi-currency queries. + join_hint: + table: tabCurrency + 'on': transaction_currency = tabCurrency.name + - name: against_voucher_type + fieldtype: Link + label: Against Voucher Type + description: Document type being referenced or settled by this entry, such as + invoice or payment voucher. + join_hint: + table: tabDocType + 'on': against_voucher_type = tabDocType.name + - name: against_voucher + fieldtype: Dynamic Link + label: Against Voucher + description: Reference to the original voucher being adjusted, settled, or reversed + by this entry. + - name: voucher_detail_no + fieldtype: Data + label: Voucher Detail No + description: Specific line item number within a multi-line voucher for tracking + individual transaction details. + - name: transaction_exchange_rate + fieldtype: Float + label: Transaction Exchange Rate + description: Exchange rate applied at the time of this specific transaction for + foreign currency conversion. + - name: debit_in_account_currency + fieldtype: Currency + label: Debit Amount in Account Currency + description: Debit amount converted to the currency of the GL account being debited. + - name: debit + fieldtype: Currency + label: Debit Amount + description: Debit amount in the company's base or reporting currency for consolidated + financial statements. + - name: debit_in_transaction_currency + fieldtype: Currency + label: Debit Amount in Transaction Currency + description: Debit amount in the original currency of the transaction as recorded + at entry time. + - name: credit_in_account_currency + fieldtype: Currency + label: Credit Amount in Account Currency + description: Credit amount converted to the currency of the GL account being credited. + - name: credit + fieldtype: Currency + label: Credit Amount + description: Credit amount in the company's base or reporting currency for consolidated + financial statements. + - name: credit_in_transaction_currency + fieldtype: Currency + label: Credit Amount in Transaction Currency + description: Credit amount in the original currency of the business transaction + as entered. + - name: cost_center + fieldtype: Link + label: Cost Center + description: Department or organizational unit to which the transaction costs + are allocated for expense tracking and budgeting. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + - name: project + fieldtype: Link + label: Project + description: Specific project to which the transaction is assigned for project-based + accounting and profitability analysis. + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: finance_book + fieldtype: Link + label: Finance Book + description: Accounting book or ledger set used when maintaining multiple parallel + accounting standards or reporting requirements. + join_hint: + table: tabFinance Book + 'on': finance_book = tabFinance Book.name + - name: company + fieldtype: Link + label: Company + description: Company entity associated with the general ledger transaction for + multi-entity accounting. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: is_opening + fieldtype: Select + label: Is Opening + description: Indicates whether this entry represents opening balances brought + forward from a prior period. + options: + - 'No' + - 'Yes' + - name: is_advance + fieldtype: Select + label: Is Advance + description: Indicates whether this entry represents an advance payment or prepayment + transaction. + options: + - 'No' + - 'Yes' + - name: to_rename + fieldtype: Check + label: To Rename + description: Indicates the entry is marked for renaming or correction in a future + period. + - name: is_cancelled + fieldtype: Check + label: Is Cancelled + description: Indicates the entry has been voided or reversed, excluding it from + active financial reporting. + - name: remarks + fieldtype: Text + label: Remarks + description: Free-text notes or comments explaining the purpose, context, or special + circumstances of the journal entry. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per GL Entry document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabGender + description: '' + fields: + - name: gender + fieldtype: Data + label: Gender + description: The actual gender value or label (e.g., Male, Female, Non-binary), + used for demographic filtering and reporting across HR and CRM modules. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Gender document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabGlobal Search DocType + description: '' + fields: + - name: document_type + fieldtype: Link + label: Document Type + description: Specifies which DocType is enabled and indexed for global search + functionality. + join_hint: + table: tabDocType + 'on': document_type = tabDocType.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabGlobal Search + DocType). Comparison-ready across parent records.' +- table: tabGoogle Calendar + description: '' + fields: + - name: enable + fieldtype: Check + label: Enable + description: Flag indicating whether this Google Calendar sync is currently active. + - name: calendar_name + fieldtype: Data + label: Calendar Name + description: Name of the Google Calendar being synchronized with the ERP system. + - name: user + fieldtype: Link + label: User + description: ERP user account linked to this Google Calendar for event synchronization. + join_hint: + table: tabUser + 'on': user = tabUser.name + - name: pull_from_google_calendar + fieldtype: Check + label: Pull from Google Calendar + description: Flag enabling import of events from Google Calendar into the ERP + system. + - name: sync_as_public + fieldtype: Check + label: Sync events from Google as public + description: Flag determining whether synchronized calendar events are visible + to all users or kept private. + - name: push_to_google_calendar + fieldtype: Check + label: Push to Google Calendar + description: Flag enabling export of ERP events to the connected Google Calendar. + - name: google_calendar_id + fieldtype: Data + label: Google Calendar ID + description: Identifies which Google Calendar account is connected for syncing + events and availability data. + - name: refresh_token + fieldtype: Password + label: Refresh Token + description: Stores OAuth token used to maintain ongoing access to Google Calendar + API without re-authentication. + - name: authorization_code + fieldtype: Password + label: Authorization Code + description: Contains initial OAuth code exchanged during first-time Google Calendar + integration setup. + - name: next_sync_token + fieldtype: Password + label: Next Sync Token + description: Tracks incremental sync position to retrieve only new or changed + calendar events since last synchronization. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Google Calendar document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabGoogle Contacts + description: '' + fields: + - name: enable + fieldtype: Check + label: Enable + description: Flag indicating whether this Google Contacts synchronization is currently + active. + - name: email_id + fieldtype: Data + label: Email Address + description: Google account email address used for authenticating and syncing + contacts. + - name: last_sync_on + fieldtype: Datetime + label: Last Sync On + description: Timestamp of the most recent successful synchronization with Google + Contacts. + - name: authorization_code + fieldtype: Password + label: Authorization Code + description: OAuth authorization code obtained from Google for initial authentication + setup. + - name: refresh_token + fieldtype: Password + label: Refresh Token + description: OAuth refresh token used to maintain ongoing access to Google Contacts + API. + - name: next_sync_token + fieldtype: Password + label: Next Sync Token + description: Google API token used to fetch only incremental changes since the + last synchronization. + - name: pull_from_google_contacts + fieldtype: Check + label: Pull from Google Contacts + description: Used when syncing or importing contact data from Google Contacts + into the ERP system to maintain updated customer or vendor information. + - name: push_to_google_contacts + fieldtype: Check + label: Push to Google Contacts + description: Used when exporting or syncing ERP contact records to Google Contacts + to keep external contact lists current with internal business data. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Google Contacts document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabHas Domain + description: '' + fields: + - name: domain + fieldtype: Link + label: Domain + description: Business domain category assigned to the parent document for filtering + and organization. + join_hint: + table: tabDomain + 'on': domain = tabDomain.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabHas Domain). Comparison-ready + across parent records.' +- table: tabHas Role + description: '' + fields: + - name: role + fieldtype: Link + label: Role + description: The specific role being assigned to the user or entity + join_hint: + table: tabRole + 'on': role = tabRole.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabHas Role). Comparison-ready + across parent records.' +- table: tabHelp Article + description: '' + fields: + - name: title + fieldtype: Data + label: Title + description: Main heading or subject of the help article used for searching and + display. + - name: category + fieldtype: Link + label: Category + description: Classification or topic group for organizing and filtering help articles. + join_hint: + table: tabHelp Category + 'on': category = tabHelp Category.name + - name: published + fieldtype: Check + label: Published + description: Flag indicating whether this help article is visible to end users. + - name: author + fieldtype: Data + label: Author + description: Person or user who wrote or is responsible for this help article + content. + - name: level + fieldtype: Select + label: Level + description: Difficulty or expertise level required to understand this help article. + options: + - Beginner + - Intermediate + - Expert + - name: content + fieldtype: Text Editor + label: Content + description: Full text body of the help article containing instructions or information. + - name: likes + fieldtype: Int + label: Likes + description: Tracks the number of user likes or positive reactions to measure + article popularity and usefulness. + - name: route + fieldtype: Data + label: Route + description: Stores the URL path or navigation route used to access the help article + for linking and tracking purposes. + - name: helpful + fieldtype: Int + label: Helpful + description: Counts how many users marked the article as helpful to assess content + quality and relevance. + - name: not_helpful + fieldtype: Int + label: Not Helpful + description: Counts how many users marked the article as not helpful to identify + content needing improvement or revision. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Help Article document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabHelp Category + description: '' + fields: + - name: category_name + fieldtype: Data + label: Category Name + description: Name of the help category used for organizing and filtering help + articles. + - name: category_description + fieldtype: Text + label: Category Description + description: Detailed explanation of what topics or issues this help category + covers. + - name: published + fieldtype: Check + label: Published + description: Indicates whether this help category is visible to end users or still + in draft. + - name: help_articles + fieldtype: Int + label: Help Articles + description: Count or list of help articles associated with this category for + content analysis. + - name: route + fieldtype: Data + label: Route + description: URL path or slug used to access this help category in the web interface. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Help Category document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabHoliday + description: '' + fields: + - name: holiday_date + fieldtype: Date + label: Date + description: The actual date of the holiday, used to determine non-working days + for payroll, attendance, and scheduling calculations. + - name: weekly_off + fieldtype: Check + label: Weekly Off + description: Flag indicating if this is a recurring weekly off day rather than + a one-time holiday, used to distinguish regular weekends from special holidays. + - name: description + fieldtype: Text Editor + label: Description + description: Explanation or name of the holiday event, used to identify the reason + or occasion for the non-working day. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabHoliday). Comparison-ready + across parent records.' +- table: tabHoliday List + description: '' + fields: + - name: holiday_list_name + fieldtype: Data + label: Holiday List Name + description: Display name of the holiday list, used when searching for specific + holiday calendars by business unit or region. + - name: from_date + fieldtype: Date + label: From Date + description: Start date of the holiday period, used to determine applicable holiday + calendar for date range queries. + - name: to_date + fieldtype: Date + label: To Date + description: End date of the holiday period, used to determine applicable holiday + calendar for date range queries. + - name: total_holidays + fieldtype: Int + label: Total Holidays + description: Count of holidays in the list, used for workforce planning and leave + balance calculations. + - name: weekly_off + fieldtype: Select + label: Weekly Off + description: Default weekly off day (e.g., Sunday), used to determine standard + non-working days for attendance and scheduling. + options: + - Sunday + - Monday + - Tuesday + - Wednesday + - Thursday + - Friday + - Saturday + - name: country + fieldtype: Autocomplete + label: Country + description: Country for which the holiday list applies, used to filter holidays + by geographic location. + - name: subdivision + fieldtype: Autocomplete + label: Subdivision + description: State or regional subdivision within a country, used for location-specific + holiday calendar queries. + - name: holidays + fieldtype: Table + label: Holidays + description: '' + child_hint: + child_table: tabHoliday + fieldname: holidays + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: holidays + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Holiday List document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabHomepage Section + description: '' + fields: + - name: section_based_on + fieldtype: Select + label: Section Based On + description: Data source or query type that determines what content appears in + this section. + options: + - Cards + - Custom HTML + - name: section_cards + fieldtype: Table + label: Section Cards + description: '' + child_hint: + child_table: tabHomepage Section Card + fieldname: section_cards + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: section_cards + - name: no_of_columns + fieldtype: Select + label: Number of Columns + description: Number of columns used for layout when displaying cards in this section. + options: + - '1' + - '2' + - '3' + - '4' + - '6' + - name: section_html + fieldtype: Code + label: Section HTML + description: Custom HTML content rendered for this homepage section. + - name: section_order + fieldtype: Int + label: Section Order + description: Numeric value controlling the display order of this section relative + to other homepage sections. + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Homepage Section document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabHomepage Section Card + description: '' + fields: + - name: title + fieldtype: Data + label: Title + description: Main heading text displayed on the homepage card. + - name: subtitle + fieldtype: Data + label: Subtitle + description: Secondary descriptive text shown below the card title. + - name: content + fieldtype: Text + label: Content + description: Body text or detailed description content for the homepage card. + - name: route + fieldtype: Data + label: Route + description: URL path or navigation link triggered when the card is clicked. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabHomepage Section + Card). Comparison-ready across parent records.' +- table: tabIMAP Folder + description: '' + fields: + - name: folder_name + fieldtype: Data + label: Folder Name + description: Actual IMAP folder name on the mail server, used when filtering emails + by mailbox location. + - name: append_to + fieldtype: Link + label: Append To + description: Target DocType where emails from this folder are stored, used to + route incoming messages. + join_hint: + table: tabDocType + 'on': append_to = tabDocType.name + - name: uidvalidity + fieldtype: Data + label: UIDVALIDITY + description: IMAP UID validity value used to detect mailbox resets and prevent + duplicate email synchronization. + - name: uidnext + fieldtype: Data + label: UIDNEXT + description: Next expected IMAP UID used to track which emails have already been + synchronized from this folder. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabIMAP Folder). + Comparison-ready across parent records.' +- table: tabImport Supplier Invoice + description: '' + fields: + - name: invoice_series + fieldtype: Select + label: Invoice Series + description: Series or sequence group that categorizes or organizes invoices by + type, location, or numbering scheme + options: + - ACC-PINV-.YYYY.- + - name: company + fieldtype: Link + label: Company + description: The company entity or legal entity that is receiving and recording + this supplier invoice + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: item_code + fieldtype: Link + label: Item Code + description: Identifies the specific product or material being purchased on the + supplier invoice line. + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: supplier_group + fieldtype: Link + label: Supplier Group + description: Categorizes the supplier into a classification group for analyzing + spending patterns and vendor segmentation. + join_hint: + table: tabSupplier Group + 'on': supplier_group = tabSupplier Group.name + - name: tax_account + fieldtype: Link + label: Tax Account + description: Specifies the general ledger account where tax amounts from this + supplier invoice are posted. + join_hint: + table: tabAccount + 'on': tax_account = tabAccount.name + - name: default_buying_price_list + fieldtype: Link + label: Default Buying Price List + description: Price list applied to purchases from this supplier for determining + item costs and currency + join_hint: + table: tabPrice List + 'on': default_buying_price_list = tabPrice List.name + - name: status + fieldtype: Data + label: Status + description: Current state of the supplier invoice such as draft, submitted, paid, + or cancelled + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Import Supplier Invoice document (master/transaction). + Use only for single-entity lookups, not cross-record comparison unless fields + are per-relationship (e.g. supplier, price_list).' +- table: tabIncoming Call Handling Schedule + description: '' + fields: + - name: day_of_week + fieldtype: Select + label: Day Of Week + description: Specific weekday this schedule applies to, essential for queries + about call routing on particular days. + options: + - Monday + - Tuesday + - Wednesday + - Thursday + - Friday + - Saturday + - Sunday + - name: from_time + fieldtype: Time + label: From Time + description: Start time when this agent group becomes active for handling calls, + used in time-based routing queries. + - name: to_time + fieldtype: Time + label: To Time + description: End time when this agent group stops handling calls, used to determine + coverage gaps or overlaps. + - name: agent_group + fieldtype: Link + label: Agent Group + description: Designated team assigned to handle incoming calls during this time + slot, critical for staffing and routing queries. + join_hint: + table: tabEmployee Group + 'on': agent_group = tabEmployee Group.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabIncoming Call + Handling Schedule). Comparison-ready across parent records.' +- table: tabIncoming Call Settings + description: '' + fields: + - name: call_routing + fieldtype: Select + label: Call Routing + description: Routing logic or destination that determines where incoming calls + are directed. + options: + - Sequential + - Simultaneous + - name: greeting_message + fieldtype: Data + label: Greeting Message + description: Audio message or text played to callers when they first connect. + - name: agent_busy_message + fieldtype: Data + label: Agent Busy Message + description: Message played to callers when all agents are currently handling + other calls. + - name: agent_unavailable_message + fieldtype: Data + label: Agent Unavailable Message + description: Message played to callers when no agents are logged in or available. + - name: call_handling_schedule + fieldtype: Table + label: Call Handling Schedule + description: '' + child_hint: + child_table: tabIncoming Call Handling Schedule + fieldname: call_handling_schedule + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: call_handling_schedule + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Incoming Call Settings document (master/transaction). Use + only for single-entity lookups, not cross-record comparison unless fields are + per-relationship (e.g. supplier, price_list).' +- table: tabIncoterm + description: '' + fields: + - name: code + fieldtype: Data + label: Code + description: Standard Incoterm code like FOB or CIF, used to quickly identify + shipping responsibility and cost allocation rules. + - name: title + fieldtype: Data + label: Title + description: Display name of the Incoterm, used in dropdowns and reports when + selecting shipping terms for sales or purchase orders. + - name: description + fieldtype: Long Text + label: Description + description: Detailed explanation of the Incoterm's terms and conditions, used + to understand buyer-seller responsibilities for shipping costs and risks. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Incoterm document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabIndustry Type + description: '' + fields: + - name: industry + fieldtype: Data + label: Industry + description: Specific industry sector or business vertical classification + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Industry Type document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabInstallation Note + description: '' + fields: + - name: naming_series + fieldtype: Select + label: Series + description: Prefix pattern used to auto-generate the installation note name + options: + - MAT-INS-.YYYY.- + - name: customer + fieldtype: Link + label: Customer + description: Customer for whom the installation is being performed or documented + join_hint: + table: tabCustomer + 'on': customer = tabCustomer.name + - name: customer_address + fieldtype: Link + label: Customer Address + description: Physical location where installation service was performed or equipment + was installed + join_hint: + table: tabAddress + 'on': customer_address = tabAddress.name + - name: contact_person + fieldtype: Link + label: Contact Person + description: Individual at customer site who coordinated or received the installation + join_hint: + table: tabContact + 'on': contact_person = tabContact.name + - name: customer_name + fieldtype: Data + label: Name + description: Company or individual who requested or owns the installation + - name: address_display + fieldtype: Small Text + label: Address + description: Formatted address of the installation location for display purposes. + - name: contact_display + fieldtype: Small Text + label: Contact + description: Primary contact person's name at the installation site. + - name: contact_mobile + fieldtype: Small Text + label: Mobile No + description: Mobile phone number of the installation site contact person. + - name: contact_email + fieldtype: Data + label: Contact Email + description: Email address for the contact person associated with the installation + note. + - name: territory + fieldtype: Link + label: Territory + description: Geographic or sales territory where the installation is located. + join_hint: + table: tabTerritory + 'on': territory = tabTerritory.name + - name: customer_group + fieldtype: Link + label: Customer Group + description: Classification or category of the customer receiving the installation. + join_hint: + table: tabCustomer Group + 'on': customer_group = tabCustomer Group.name + - name: inst_date + fieldtype: Date + label: Installation Date + description: Date when installation work was performed or scheduled, used to find + installations by time period or verify completion timing. + - name: inst_time + fieldtype: Time + label: Installation Time + description: Time of day when installation work was performed or scheduled, used + to track specific appointment times or work duration. + - name: status + fieldtype: Select + label: Status + description: Current state of the installation note such as pending, completed, + or cancelled, used to filter active work or track progress. + options: + - Draft + - Submitted + - Cancelled + - name: company + fieldtype: Link + label: Company + description: The company entity associated with this installation note, used when + filtering or reporting installation activities by organizational unit. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: amended_from + fieldtype: Link + label: Amended From + description: References the original installation note that this document amends + or replaces, used to track document revision history. + join_hint: + table: tabInstallation Note + 'on': amended_from = tabInstallation Note.name + - name: remarks + fieldtype: Small Text + label: Remarks + description: Free-text comments or additional observations about the installation, + used when searching for specific notes or contextual details about the installation + work. + - name: items + fieldtype: Table + label: Items + description: '' + child_hint: + child_table: tabInstallation Note Item + fieldname: items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: items + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Installation Note document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabInstallation Note Item + description: '' + fields: + - name: item_code + fieldtype: Link + label: Item Code + description: Product or service code being installed, used when querying what + items were installed at customer locations. + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: serial_and_batch_bundle + fieldtype: Link + label: Serial and Batch Bundle + description: Links to serial numbers or batch tracking for installed items, used + when tracing specific units deployed in the field. + join_hint: + table: tabSerial and Batch Bundle + 'on': serial_and_batch_bundle = tabSerial and Batch Bundle.name + - name: serial_no + fieldtype: Small Text + label: Serial No + description: Unique identifier of the specific item or equipment installed at + the customer site. + - name: qty + fieldtype: Float + label: Installed Qty + description: Quantity of the item installed during this installation activity. + - name: description + fieldtype: Text Editor + label: Description + description: Details about the installed item including specifications, condition, + or installation notes. + - name: prevdoc_detail_docname + fieldtype: Data + label: Against Document Detail No + description: Identifies the specific line item or detail row from the previous + document that this installation note item references. + - name: prevdoc_docname + fieldtype: Data + label: Against Document No + description: Identifies the parent document (such as a delivery note or sales + order) that this installation note item originated from. + - name: prevdoc_doctype + fieldtype: Data + label: Document Type + description: Specifies the type of the previous document (e.g., Delivery Note, + Sales Order) that this installation note item is linked to. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabInstallation Note + Item). Comparison-ready across parent records.' +- table: tabInstalled Application + description: '' + fields: + - name: app_name + fieldtype: Data + label: Application Name + description: Name of the installed application, used to identify which app or + module is deployed in the system. + - name: app_version + fieldtype: Data + label: Application Version + description: Version number of the installed application, used for compatibility + checks and upgrade tracking. + - name: git_branch + fieldtype: Data + label: Git Branch + description: Source code branch used for this installation, used in development + environments to track deployment sources. + - name: has_setup_wizard + fieldtype: Check + label: Has Setup Wizard + description: Indicates if the application includes an initial setup wizard, used + to determine if configuration steps are needed. + - name: is_setup_complete + fieldtype: Check + label: Is Setup Complete? + description: Tracks whether the application setup process has been finished, used + to identify incomplete or pending installations. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabInstalled Application). + Comparison-ready across parent records.' +- table: tabIntegration Request + description: '' + fields: + - name: request_id + fieldtype: Data + label: Request ID + description: External system's unique identifier for this integration request, + used for correlation and tracking across systems. + - name: integration_request_service + fieldtype: Data + label: Service + description: Name of the integration service or API endpoint being called, used + to filter requests by integration type. + - name: is_remote_request + fieldtype: Check + label: Is Remote Request? + description: Flag indicating if request originated from external system, used + to distinguish inbound versus outbound integrations. + - name: request_description + fieldtype: Data + label: Request Description + description: Details about the integration request payload or purpose, used for + debugging and understanding integration context. + - name: status + fieldtype: Select + label: Status + description: Current processing state of the integration request (queued, completed, + failed), used to monitor integration health and retry failures. + options: + - Queued + - Authorized + - Completed + - Cancelled + - Failed + - name: url + fieldtype: Small Text + label: URL + description: API endpoint or webhook URL called during integration, used to identify + destination systems and troubleshoot connectivity issues. + - name: request_headers + fieldtype: Code + label: Request Headers + description: Stores HTTP headers sent with the integration request, used when + troubleshooting API authentication or connection issues. + - name: data + fieldtype: Code + label: Request Data + description: Contains the payload or parameters sent to the external system, used + when analyzing what information was transmitted in the integration. + - name: output + fieldtype: Code + label: Output + description: Captures the response received from the external system, used when + verifying successful data exchange or debugging integration failures. + - name: error + fieldtype: Code + label: Error + description: Records error messages or failure details from the integration attempt, + used when investigating why an integration request failed. + - name: reference_doctype + fieldtype: Link + label: Reference Document Type + description: Identifies the ERP document type that triggered this integration + request, used when tracing integrations back to source transactions. + join_hint: + table: tabDocType + 'on': reference_doctype = tabDocType.name + - name: reference_docname + fieldtype: Dynamic Link + label: Reference Document Name + description: Specifies the exact ERP document record that initiated this integration + request, used when linking integration activity to specific business documents. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Integration Request document (master/transaction). Use + only for single-entity lookups, not cross-record comparison unless fields are + per-relationship (e.g. supplier, price_list).' +- table: tabInventory Dimension + description: '' + fields: + - name: dimension_name + fieldtype: Data + label: Dimension Name + description: Business label of the inventory dimension used when users need to + identify which tracking attribute (e.g., size, color, location) applies to inventory + items. + - name: reference_document + fieldtype: Link + label: Reference Document + description: Source document or transaction reference linked to this dimension + entry used when tracing inventory dimension origins or auditing dimension setup + history. + join_hint: + table: tabDocType + 'on': reference_document = tabDocType.name + - name: disabled + fieldtype: Check + label: Disabled + description: Whether this inventory dimension is currently inactive or excluded + from use in transactions and reporting. + - name: source_fieldname + fieldtype: Data + label: Source Fieldname + description: The originating field name from the source system or table that maps + to this inventory dimension. + - name: target_fieldname + fieldtype: Data + label: Target Fieldname (Stock Ledger Entry) + description: The destination field name in the target system or table where this + inventory dimension data is mapped or stored. + - name: apply_to_all_doctypes + fieldtype: Check + label: Apply to All Inventory Documents + description: Whether inventory dimension rules apply across all transaction types + or only specific document types. + - name: validate_negative_stock + fieldtype: Check + label: Validate Negative Stock + description: Whether the system prevents or allows inventory balances to go below + zero for this dimension. + - name: document_type + fieldtype: Link + label: Apply to Document + description: Specific transaction or document type (e.g., Sales Order, Purchase + Receipt) to which this inventory dimension applies when not applied to all types. + join_hint: + table: tabDocType + 'on': document_type = tabDocType.name + - name: type_of_transaction + fieldtype: Select + label: Type of Transaction + description: Indicates whether the inventory transaction is a receipt, issue, + transfer, adjustment, or other movement type. + options: + - Inward + - Outward + - Both + - name: fetch_from_parent + fieldtype: Select + label: Fetch Value From + description: Controls whether dimension values are inherited from a parent document + or transaction. + - name: istable + fieldtype: Check + label: ' Is Child Table' + description: Indicates whether this dimension represents a tabular or multi-row + structure rather than a single value. + - name: condition + fieldtype: Code + label: Conditional Rule + description: Expression that determines when this inventory dimension field becomes + visible or applicable in transactions. + - name: reqd + fieldtype: Check + label: Mandatory + description: Indicates whether this inventory dimension field must be filled in + when creating or updating inventory records. + - name: mandatory_depends_on + fieldtype: Small Text + label: Mandatory Depends On + description: Expression that conditionally makes this inventory dimension field + required based on values in other fields. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Inventory Dimension document (master/transaction). Use + only for single-entity lookups, not cross-record comparison unless fields are + per-relationship (e.g. supplier, price_list).' +- table: tabInvoice Discounting + description: '' + fields: + - name: posting_date + fieldtype: Date + label: Posting Date + description: Date when the invoice discounting transaction was recorded in the + accounting system + - name: loan_start_date + fieldtype: Date + label: Loan Start Date + description: Date when the invoice discounting loan or financing period begins + - name: loan_period + fieldtype: Int + label: Loan Period (Days) + description: Duration of the invoice discounting loan expressed as a time period, + used when asking about loan length or term. + - name: loan_end_date + fieldtype: Date + label: Loan End Date + description: Specific date when the invoice discounting loan matures or must be + repaid, used when asking about loan expiration or repayment deadlines. + - name: status + fieldtype: Select + label: Status + description: Current state of the invoice discounting transaction such as pending, + approved, disbursed, or closed, used when filtering or asking about loan progress. + options: + - Draft + - Sanctioned + - Disbursed + - Settled + - Cancelled + - name: company + fieldtype: Link + label: Company + description: The business entity that owns or is associated with the invoice discounting + transaction. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: invoices + fieldtype: Table + label: Invoices + description: '' + child_hint: + child_table: tabDiscounted Invoice + fieldname: invoices + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: invoices + - name: total_amount + fieldtype: Currency + label: Total Amount + description: The aggregate monetary value of all invoices being discounted in + this transaction. + - name: bank_charges + fieldtype: Currency + label: Bank Charges + description: Fees charged by the bank for processing the invoice discounting transaction. + - name: short_term_loan + fieldtype: Link + label: Short Term Loan Account + description: Linked short-term loan record created when invoices are discounted + for immediate cash. + join_hint: + table: tabAccount + 'on': short_term_loan = tabAccount.name + - name: bank_account + fieldtype: Link + label: Bank Account + description: Bank account where discounted invoice funds are deposited or from + which repayment is made. + join_hint: + table: tabAccount + 'on': bank_account = tabAccount.name + - name: bank_charges_account + fieldtype: Link + label: Bank Charges Account + description: Account where fees charged by the bank for invoice discounting services + are recorded. + join_hint: + table: tabAccount + 'on': bank_charges_account = tabAccount.name + - name: accounts_receivable_credit + fieldtype: Link + label: Accounts Receivable Credit Account + description: Account credited when invoice discounting proceeds are received, + representing the reduction in receivables. + join_hint: + table: tabAccount + 'on': accounts_receivable_credit = tabAccount.name + - name: accounts_receivable_discounted + fieldtype: Link + label: Accounts Receivable Discounted Account + description: Account tracking invoices that have been discounted with a financial + institution but not yet collected from customers. + join_hint: + table: tabAccount + 'on': accounts_receivable_discounted = tabAccount.name + - name: accounts_receivable_unpaid + fieldtype: Link + label: Accounts Receivable Unpaid Account + description: Outstanding receivable amount not yet collected from customers, relevant + when checking unpaid balances or available discounting capacity. + join_hint: + table: tabAccount + 'on': accounts_receivable_unpaid = tabAccount.name + - name: amended_from + fieldtype: Link + label: Amended From + description: Reference to the original invoice discounting document that this + record corrects or replaces. + join_hint: + table: tabInvoice Discounting + 'on': amended_from = tabInvoice Discounting.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Invoice Discounting document (master/transaction). Use + only for single-entity lookups, not cross-record comparison unless fields are + per-relationship (e.g. supplier, price_list).' +- table: tabIssue + description: '' + fields: + - name: naming_series + fieldtype: Select + label: Series + description: Prefix pattern used to auto-generate issue names or numbers + options: + - ISS-.YYYY.- + - name: subject + fieldtype: Data + label: Subject + description: Brief title or summary describing what the issue is about + - name: customer + fieldtype: Link + label: Customer + description: The customer account or organization that is experiencing or reporting + the issue. + join_hint: + table: tabCustomer + 'on': customer = tabCustomer.name + - name: raised_by + fieldtype: Data + label: Raised By (Email) + description: The specific person or user who created or submitted the issue. + - name: status + fieldtype: Select + label: Status + description: The current state of the issue such as open, in progress, resolved, + or closed. + options: + - Open + - Replied + - On Hold + - Resolved + - Closed + - name: priority + fieldtype: Link + label: Priority + description: Urgency or importance level of the issue, used when filtering or + sorting by criticality such as high, medium, or low priority. + join_hint: + table: tabIssue Priority + 'on': priority = tabIssue Priority.name + - name: issue_type + fieldtype: Link + label: Issue Type + description: Category or classification of the issue such as bug, feature request, + task, or incident. + join_hint: + table: tabIssue Type + 'on': issue_type = tabIssue Type.name + - name: issue_split_from + fieldtype: Link + label: Issue Split From + description: Reference to the original parent issue when this issue was created + by splitting from another issue. + join_hint: + table: tabIssue + 'on': issue_split_from = tabIssue.name + - name: description + fieldtype: Text Editor + label: Description + description: Detailed explanation of the problem, request, or incident reported + in the issue + - name: service_level_agreement + fieldtype: Link + label: Service Level Agreement + description: SLA policy or tier governing response and resolution timeframes for + this issue + join_hint: + table: tabService Level Agreement + 'on': service_level_agreement = tabService Level Agreement.name + - name: response_by + fieldtype: Datetime + label: Response By + description: Deadline by which the first response to the issue must be provided + - name: agreement_status + fieldtype: Select + label: Service Level Agreement Status + description: Current status of the service level agreement associated with the + issue, used when filtering issues by whether SLA terms are being met or breached. + options: + - First Response Due + - Resolution Due + - Fulfilled + - Failed + - name: sla_resolution_by + fieldtype: Datetime + label: Resolution By + description: Target deadline by which the issue must be resolved according to + SLA terms, used when checking overdue issues or time remaining. + - name: service_level_agreement_creation + fieldtype: Datetime + label: Service Level Agreement Creation + description: The specific SLA contract or template applied when the issue was + created, used to identify which service tier or agreement governs the issue. + - name: on_hold_since + fieldtype: Datetime + label: On Hold Since + description: Timestamp when the issue was most recently placed on hold, used to + find currently held issues or calculate current hold duration. + - name: total_hold_time + fieldtype: Duration + label: Total Hold Time + description: Cumulative duration the issue has been on hold across all hold periods, + used to measure total time spent waiting or paused. + - name: first_response_time + fieldtype: Duration + label: First Response Time + description: Duration or timestamp from issue creation until the first response + was provided, used to measure initial support responsiveness. + - name: first_responded_on + fieldtype: Datetime + label: First Responded On + description: Timestamp when the issue received its first response from support + or assigned personnel. + - name: avg_response_time + fieldtype: Duration + label: Average Response Time + description: Average time taken to respond to updates or communications on this + issue. + - name: resolution_details + fieldtype: Text Editor + label: Resolution Details + description: Explanation or notes describing how the issue was resolved or closed. + - name: opening_date + fieldtype: Date + label: Opening Date + description: Date when the issue was first created or reported, used to track + issue age and response times. + - name: opening_time + fieldtype: Time + label: Opening Time + description: Time of day when the issue was first created or reported, used for + time-specific analysis and shift-based metrics. + - name: sla_resolution_date + fieldtype: Datetime + label: Resolution Date + description: Target deadline by which the issue must be resolved according to + service level agreement commitments. + - name: resolution_time + fieldtype: Duration + label: Resolution Time + description: Total time taken to resolve the issue including system processing + and wait times. + - name: user_resolution_time + fieldtype: Duration + label: User Resolution Time + description: Actual time spent by users actively working on resolving the issue, + excluding wait times. + - name: lead + fieldtype: Link + label: Lead + description: Person or team member assigned primary responsibility for managing + and resolving the issue. + join_hint: + table: tabLead + 'on': lead = tabLead.name + - name: contact + fieldtype: Link + label: Contact + description: The specific person or contact record associated with this issue + for follow-up or communication purposes. + join_hint: + table: tabContact + 'on': contact = tabContact.name + - name: email_account + fieldtype: Link + label: Email Account + description: The email account through which this issue was received or is being + managed. + join_hint: + table: tabEmail Account + 'on': email_account = tabEmail Account.name + - name: customer_name + fieldtype: Data + label: Customer Name + description: The name of the customer or company who reported or is affected by + this issue. + - name: project + fieldtype: Link + label: Project + description: The project this issue is associated with or belongs to. + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: company + fieldtype: Link + label: Company + description: The company or customer organization that reported or is affected + by this issue. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: via_customer_portal + fieldtype: Check + label: Via Customer Portal + description: Indicates whether this issue was submitted through the customer-facing + portal rather than internally. + - name: content_type + fieldtype: Data + label: Content Type + description: Type or category of the issue such as bug, feature request, task, + or incident for filtering and classification purposes. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Issue document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabIssue Priority + description: '' + fields: + - name: description + fieldtype: Small Text + label: Description + description: Detailed explanation of what the priority level means and when it + should be applied to issues + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Issue Priority document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabIssue Type + description: '' + fields: + - name: description + fieldtype: Small Text + label: Description + description: Detailed explanation or definition of what the issue type represents + and when it should be used + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Issue Type document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabItem + description: A Product or a Service that is bought, sold or kept in stock. + fields: + - name: naming_series + fieldtype: Select + label: Series + description: Prefix pattern used to auto-generate item codes for this item + options: + - STO-ITEM-.YYYY.- + - name: item_code + fieldtype: Data + label: Item Code + description: Unique identifier code for the item used in transactions, inventory + tracking, and as the primary reference across the system + - name: item_name + fieldtype: Data + label: Item Name + description: Primary identifier for products, materials, or services when searching, + filtering, or referencing specific items in inventory, sales, or purchasing + queries. + - name: item_group + fieldtype: Link + label: Item Group + description: Category or classification of items used to filter, group, or analyze + items by product type, family, or business segment. + join_hint: + table: tabItem Group + 'on': item_group = tabItem Group.name + - name: stock_uom + fieldtype: Link + label: Default Unit of Measure + description: Unit of measurement for inventory quantities such as pieces, kilograms, + or liters used when querying stock levels, consumption, or movement. + join_hint: + table: tabUOM + 'on': stock_uom = tabUOM.name + - name: disabled + fieldtype: Check + label: Disabled + description: Item is inactive and cannot be used in new transactions or purchases + - name: allow_alternative_item + fieldtype: Check + label: Allow Alternative Item + description: Item can be substituted with alternative items when out of stock + or unavailable + - name: is_stock_item + fieldtype: Check + label: Maintain Stock + description: Item inventory levels are tracked in warehouses versus non-stock + items like services or expenses + - name: has_variants + fieldtype: Check + label: Has Variants + description: Indicates whether this item has multiple variants like different + sizes, colors, or configurations that customers can choose from. + - name: opening_stock + fieldtype: Float + label: Opening Stock + description: The initial quantity of this item recorded when starting inventory + tracking or at the beginning of an accounting period. + - name: valuation_rate + fieldtype: Currency + label: Valuation Rate + description: The per-unit cost used to calculate the total value of this item's + inventory for accounting and financial reporting purposes. + - name: standard_rate + fieldtype: Currency + label: Standard Selling Rate + description: Default selling price per unit for this item when creating sales + transactions or quotations. + - name: is_fixed_asset + fieldtype: Check + label: Is Fixed Asset + description: Indicates whether this item represents a fixed asset like equipment, + machinery, or property rather than inventory or consumables. + - name: auto_create_assets + fieldtype: Check + label: Auto Create Assets on Purchase + description: Controls whether purchasing this item automatically generates individual + asset records for tracking depreciation and maintenance. + - name: is_grouped_asset + fieldtype: Check + label: Create Grouped Asset + description: Indicates whether this item represents a grouped or bundled asset + rather than an individual asset. + - name: asset_category + fieldtype: Link + label: Asset Category + description: The classification category for this item when it is treated as a + fixed asset, used to determine depreciation and accounting treatment. + join_hint: + table: tabAsset Category + 'on': asset_category = tabAsset Category.name + - name: asset_naming_series + fieldtype: Select + label: Asset Naming Series + description: The naming convention or prefix pattern used to automatically generate + identifiers for assets created from this item. + - name: over_delivery_receipt_allowance + fieldtype: Float + label: Over Delivery/Receipt Allowance (%) + description: Maximum percentage by which received quantity can exceed ordered + quantity for this item without requiring approval. + - name: over_billing_allowance + fieldtype: Float + label: Over Billing Allowance (%) + description: Maximum percentage by which billed amount can exceed ordered amount + for this item without requiring approval. + - name: description + fieldtype: Text Editor + label: Description + description: Primary text description or name of the item used for display, search, + and identification. + - name: brand + fieldtype: Link + label: Brand + description: Brand name or manufacturer of the item, used when filtering or searching + items by brand. + join_hint: + table: tabBrand + 'on': brand = tabBrand.name + - name: uoms + fieldtype: Table + label: UOMs + description: '' + child_hint: + child_table: tabUOM Conversion Detail + fieldname: uoms + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: uoms + - name: shelf_life_in_days + fieldtype: Int + label: Shelf Life In Days + description: Number of days the item remains usable before expiration, used when + checking perishability or expiration timeframes. + - name: end_of_life + fieldtype: Date + label: End of Life + description: Date when the item is discontinued or no longer available for sale + or production. + - name: default_material_request_type + fieldtype: Select + label: Default Material Request Type + description: Whether material requests for this item default to purchase, transfer, + manufacture, or customer provided. + options: + - Purchase + - Material Transfer + - Material Issue + - Manufacture + - Customer Provided + - name: valuation_method + fieldtype: Select + label: Valuation Method + description: Method used to calculate inventory value for this item such as FIFO, + LIFO, or moving average. + options: + - FIFO + - Moving Average + - LIFO + - name: warranty_period + fieldtype: Data + label: Warranty Period (in days) + description: Duration of warranty coverage for the item, used when users ask about + warranty length or coverage period. + - name: weight_per_unit + fieldtype: Float + label: Weight Per Unit + description: Physical weight of a single unit of the item, used when users ask + about item weight, shipping calculations, or weight-based pricing. + - name: weight_uom + fieldtype: Link + label: Weight UOM + description: Unit of measurement for the item's weight (e.g., kg, lbs, grams), + used when users need to know the weight measurement standard. + join_hint: + table: tabUOM + 'on': weight_uom = tabUOM.name + - name: allow_negative_stock + fieldtype: Check + label: Allow Negative Stock + description: Whether this item can be issued or sold even when inventory quantity + is zero or below. + - name: barcodes + fieldtype: Table + label: Barcodes + description: '' + child_hint: + child_table: tabItem Barcode + fieldname: barcodes + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: barcodes + - name: reorder_levels + fieldtype: Table + label: Reorder level based on Warehouse + description: '' + child_hint: + child_table: tabItem Reorder + fieldname: reorder_levels + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: reorder_levels + - name: has_batch_no + fieldtype: Check + label: Has Batch No + description: Item requires batch number tracking for inventory management and + traceability + - name: create_new_batch + fieldtype: Check + label: Automatically Create New Batch + description: Automatically generate a new batch number when this item is received + or manufactured + - name: batch_number_series + fieldtype: Data + label: Batch Number Series + description: Naming pattern or series used to auto-generate batch numbers for + this item + - name: has_expiry_date + fieldtype: Check + label: Has Expiry Date + description: Indicates whether this item expires and requires expiration date + tracking for inventory and sales. + - name: retain_sample + fieldtype: Check + label: Retain Sample + description: Indicates whether a sample of this item must be retained for quality + control or compliance purposes. + - name: sample_quantity + fieldtype: Int + label: Max Sample Quantity + description: The quantity of this item to retain as a sample when retain_sample + is enabled. + - name: has_serial_no + fieldtype: Check + label: Has Serial No + description: Indicates whether this item requires unique serial number tracking + for individual units. + - name: serial_no_series + fieldtype: Data + label: Serial Number Series + description: Naming pattern or prefix used to generate serial numbers for this + item when serial tracking is enabled. + - name: variant_of + fieldtype: Link + label: Variant Of + description: Parent item template from which this item inherits properties as + a size, color, or specification variant. + join_hint: + table: tabItem + 'on': variant_of = tabItem.name + - name: variant_based_on + fieldtype: Select + label: Variant Based On + description: Template item from which this variant inherits properties and configuration + when creating product variations. + options: + - Item Attribute + - Manufacturer + - name: attributes + fieldtype: Table + label: Variant Attributes + description: '' + child_hint: + child_table: tabItem Variant Attribute + fieldname: attributes + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: attributes + - name: enable_deferred_expense + fieldtype: Check + label: Enable Deferred Expense + description: Whether expense recognition is spread over time rather than recorded + immediately at purchase. + - name: no_of_months_exp + fieldtype: Int + label: No of Months (Expense) + description: Duration in months over which item expenses are amortized or recognized + when the item represents a prepaid or deferred expense. + - name: enable_deferred_revenue + fieldtype: Check + label: Enable Deferred Revenue + description: Indicates whether revenue from this item should be deferred and recognized + over time rather than immediately upon sale. + - name: no_of_months + fieldtype: Int + label: No of Months (Revenue) + description: Duration in months for general time-based item calculations such + as warranty periods, subscriptions, or service contracts. + - name: item_defaults + fieldtype: Table + label: Item Defaults + description: '' + child_hint: + child_table: tabItem Default + fieldname: item_defaults + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: item_defaults + - name: purchase_uom + fieldtype: Link + label: Default Purchase Unit of Measure + description: Unit of measurement used when purchasing this item from suppliers, + which may differ from the stock or sales unit. + join_hint: + table: tabUOM + 'on': purchase_uom = tabUOM.name + - name: min_order_qty + fieldtype: Float + label: Minimum Order Qty + description: Minimum quantity that must be ordered when purchasing this item from + suppliers. + - name: safety_stock + fieldtype: Float + label: Safety Stock + description: Minimum inventory quantity to maintain as buffer against stockouts + or demand variability. + - name: is_purchase_item + fieldtype: Check + label: Allow Purchase + description: Indicates whether this item is procured from external suppliers rather + than manufactured internally. + - name: lead_time_days + fieldtype: Int + label: Lead Time in days + description: Number of days required from order placement to receipt of the item + from supplier or production. + - name: last_purchase_rate + fieldtype: Float + label: Last Purchase Rate + description: Most recent purchase price paid for this item, used when analyzing + cost trends or comparing current purchase quotes against historical pricing. + - name: is_customer_provided_item + fieldtype: Check + label: Is Customer Provided Item + description: Indicates whether the customer supplies this item directly rather + than the company purchasing or manufacturing it, relevant for job work or consignment + scenarios. + - name: customer + fieldtype: Link + label: Customer + description: Specific customer who owns or is associated with this item, used + for customer-specific items, custom products, or serialized goods tied to a + particular customer account. + join_hint: + table: tabCustomer + 'on': customer = tabCustomer.name + - name: delivered_by_supplier + fieldtype: Check + label: Delivered by Supplier (Drop Ship) + description: Indicates whether the item is drop-shipped or delivered directly + from the supplier to the customer rather than through company inventory. + - name: supplier_items + fieldtype: Table + label: Supplier Items + description: '' + child_hint: + child_table: tabItem Supplier + fieldname: supplier_items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: supplier_items + - name: country_of_origin + fieldtype: Link + label: Country of Origin + description: The country where the item was manufactured or produced, relevant + for customs, tariffs, trade compliance, and country-specific sourcing queries. + join_hint: + table: tabCountry + 'on': country_of_origin = tabCountry.name + - name: customs_tariff_number + fieldtype: Link + label: Customs Tariff Number + description: Harmonized System code for international trade classification and + customs duty calculation. + join_hint: + table: tabCustoms Tariff Number + 'on': customs_tariff_number = tabCustoms Tariff Number.name + - name: sales_uom + fieldtype: Link + label: Default Sales Unit of Measure + description: Unit of measure used when selling this item to customers, such as + pieces, boxes, or kilograms. + join_hint: + table: tabUOM + 'on': sales_uom = tabUOM.name + - name: grant_commission + fieldtype: Check + label: Grant Commission + description: Whether sales of this item are eligible for commission payments to + sales representatives. + - name: is_sales_item + fieldtype: Check + label: Allow Sales + description: Whether this item can be sold to customers in sales transactions. + - name: max_discount + fieldtype: Float + label: Max Discount (%) + description: Maximum discount percentage allowed when selling this item. + - name: customer_items + fieldtype: Table + label: Customer Items + description: '' + child_hint: + child_table: tabItem Customer Detail + fieldname: customer_items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: customer_items + - name: taxes + fieldtype: Table + label: Taxes + description: '' + child_hint: + child_table: tabItem Tax + fieldname: taxes + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: taxes + - name: inspection_required_before_purchase + fieldtype: Check + label: Inspection Required before Purchase + description: Whether incoming purchased items must pass quality inspection before + being accepted into inventory. + - name: quality_inspection_template + fieldtype: Link + label: Quality Inspection Template + description: Predefined checklist or template used to perform quality inspections + on this item during purchase or manufacturing. + join_hint: + table: tabQuality Inspection Template + 'on': quality_inspection_template = tabQuality Inspection Template.name + - name: inspection_required_before_delivery + fieldtype: Check + label: Inspection Required before Delivery + description: Item must pass quality inspection before being delivered to customer + or released from warehouse + - name: include_item_in_manufacturing + fieldtype: Check + label: Include Item In Manufacturing + description: Item is available for use in production planning, bill of materials, + and manufacturing operations + - name: is_sub_contracted_item + fieldtype: Check + label: Supply Raw Materials for Purchase + description: Item production or processing is outsourced to external subcontractors + rather than manufactured in-house + - name: default_bom + fieldtype: Link + label: Default BOM + description: Bill of materials automatically selected when manufacturing or assembling + this item + join_hint: + table: tabBOM + 'on': default_bom = tabBOM.name + - name: customer_code + fieldtype: Small Text + label: Customer Code + description: Customer's own part number or SKU for this item in their system + - name: default_item_manufacturer + fieldtype: Link + label: Default Item Manufacturer + description: Primary manufacturer associated with this item for procurement and + sourcing + join_hint: + table: tabManufacturer + 'on': default_item_manufacturer = tabManufacturer.name + - name: default_manufacturer_part_no + fieldtype: Data + label: Default Manufacturer Part No + description: Manufacturer's part number for the item, used when searching by vendor + or supplier part codes. + - name: total_projected_qty + fieldtype: Float + label: Total Projected Qty + description: Forecasted quantity including current stock plus planned receipts + minus planned issues, used for future inventory availability queries. + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Item document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabItem Alternative + description: '' + fields: + - name: item_code + fieldtype: Link + label: Item Code + description: The primary item code for which alternative substitutes are defined + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: alternative_item_code + fieldtype: Link + label: Alternative Item Code + description: The substitute item code that can replace the primary item in transactions + or production + join_hint: + table: tabItem + 'on': alternative_item_code = tabItem.name + - name: two_way + fieldtype: Check + label: Two-way + description: Indicates whether the alternative item relationship works in both + directions, allowing either item to substitute for the other. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Item Alternative document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabItem Attribute + description: '' + fields: + - name: attribute_name + fieldtype: Data + label: Attribute Name + description: The name or type of the attribute being tracked, used when searching + for items by specific characteristics like color, size, or material. + - name: numeric_values + fieldtype: Check + label: Numeric Values + description: Indicates whether the attribute stores numeric data, used when filtering + for quantitative attributes or performing numerical comparisons on item properties. + - name: disabled + fieldtype: Check + label: Disabled + description: Whether this item attribute is currently inactive and should not + be used for new transactions or selections. + - name: from_range + fieldtype: Float + label: From Range + description: Starting value of the valid range for this attribute, used when filtering + or validating attribute values against minimum thresholds. + - name: increment + fieldtype: Float + label: Increment + description: Step value by which this attribute can change, used when determining + valid incremental values between the range limits. + - name: to_range + fieldtype: Float + label: To Range + description: Upper bound of a numeric or date range for filtering or validating + item attribute values. + - name: item_attribute_values + fieldtype: Table + label: Item Attribute Values + description: '' + child_hint: + child_table: tabItem Attribute Value + fieldname: item_attribute_values + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: item_attribute_values + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Item Attribute document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabItem Attribute Value + description: '' + fields: + - name: attribute_value + fieldtype: Data + label: Attribute Value + description: The specific value assigned to an item attribute, such as color 'Red' + or size 'Large', used when filtering or searching items by their characteristics. + - name: abbr + fieldtype: Data + label: Abbreviation + description: Shortened code or abbreviation for the attribute value, used when + users reference compact identifiers like 'RD' for Red or 'LG' for Large. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabItem Attribute + Value). Comparison-ready across parent records.' +- table: tabItem Barcode + description: '' + fields: + - name: barcode + fieldtype: Data + label: Barcode + description: Scannable barcode value used to identify and look up items during + inventory, sales, or receiving operations + - name: barcode_type + fieldtype: Select + label: Barcode Type + description: Format or standard of the barcode such as UPC, EAN, Code128, or QR + code + options: + - EAN + - UPC-A + - CODE-39 + - EAN-12 + - EAN-8 + - GS1 + - GTIN + - ISBN + - ISBN-10 + - ISBN-13 + - ISSN + - JAN + - PZN + - UPC + - name: uom + fieldtype: Link + label: UOM + description: Unit of measure for the barcode, relevant when users ask about item + quantities in specific units like boxes, pieces, or pallets associated with + a barcode. + join_hint: + table: tabUOM + 'on': uom = tabUOM.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabItem Barcode). + Comparison-ready across parent records.' +- table: tabItem Customer Detail + description: For the convenience of customers, these codes can be used in print + formats like Invoices and Delivery Notes + fields: + - name: customer_name + fieldtype: Link + label: Customer Name + description: Name of the specific customer associated with this item detail + join_hint: + table: tabCustomer + 'on': customer_name = tabCustomer.name + - name: customer_group + fieldtype: Link + label: Customer Group + description: Category or segment classification that groups customers with similar + characteristics for this item + join_hint: + table: tabCustomer Group + 'on': customer_group = tabCustomer Group.name + - name: ref_code + fieldtype: Data + label: Ref Code + description: Reference code identifying the customer-item relationship, used when + searching for specific customer-product associations or custom pricing arrangements. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabItem Customer + Detail). Comparison-ready across parent records.' +- table: tabItem Default + description: '' + fields: + - name: company + fieldtype: Link + label: Company + description: Company entity that owns or manages this item, relevant when filtering + items by organizational unit or legal entity + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: default_warehouse + fieldtype: Link + label: Default Warehouse + description: Primary storage location automatically assigned for this item's stock + transactions and inventory operations + join_hint: + table: tabWarehouse + 'on': default_warehouse = tabWarehouse.name + - name: default_price_list + fieldtype: Link + label: Default Price List + description: Price list automatically applied when this item is sold or purchased + in transactions + join_hint: + table: tabPrice List + 'on': default_price_list = tabPrice List.name + - name: default_discount_account + fieldtype: Link + label: Default Discount Account + description: General ledger account where discounts given on this item are recorded + join_hint: + table: tabAccount + 'on': default_discount_account = tabAccount.name + - name: buying_cost_center + fieldtype: Link + label: Default Buying Cost Center + description: Cost center assigned to track expenses when purchasing this item + join_hint: + table: tabCost Center + 'on': buying_cost_center = tabCost Center.name + - name: default_supplier + fieldtype: Link + label: Default Supplier + description: Primary vendor from whom this item is typically purchased or sourced + join_hint: + table: tabSupplier + 'on': default_supplier = tabSupplier.name + - name: expense_account + fieldtype: Link + label: Default Expense Account + description: General ledger account charged when this item is expensed rather + than capitalized or inventoried + join_hint: + table: tabAccount + 'on': expense_account = tabAccount.name + - name: default_provisional_account + fieldtype: Link + label: Default Provisional Account + description: Temporary holding account used for goods received but not yet invoiced + from suppliers + join_hint: + table: tabAccount + 'on': default_provisional_account = tabAccount.name + - name: selling_cost_center + fieldtype: Link + label: Default Selling Cost Center + description: Cost center assigned to track profitability or expenses when this + item is sold in sales transactions. + join_hint: + table: tabCost Center + 'on': selling_cost_center = tabCost Center.name + - name: income_account + fieldtype: Link + label: Default Income Account + description: Revenue account credited when this item is sold, determining where + sales income is recorded in the general ledger. + join_hint: + table: tabAccount + 'on': income_account = tabAccount.name + - name: deferred_expense_account + fieldtype: Link + label: Deferred Expense Account + description: Account used to defer expense recognition for this item until a later + period, typically for prepaid or amortized costs. + join_hint: + table: tabAccount + 'on': deferred_expense_account = tabAccount.name + - name: deferred_revenue_account + fieldtype: Link + label: Deferred Revenue Account + description: Account used to track revenue that has been invoiced but not yet + earned or recognized, typically for prepaid services or subscriptions. + join_hint: + table: tabAccount + 'on': deferred_revenue_account = tabAccount.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabItem Default). + Comparison-ready across parent records.' +- table: tabItem Group + description: '' + fields: + - name: item_group_name + fieldtype: Data + label: Item Group Name + description: Display name of the item group used for categorizing items in reports, + filters, and product hierarchies. + - name: parent_item_group + fieldtype: Link + label: Parent Item Group + description: Reference to the parent group in the hierarchy, used to build multi-level + item categorization trees. + join_hint: + table: tabItem Group + 'on': parent_item_group = tabItem Group.name + - name: is_group + fieldtype: Check + label: Is Group + description: Flag indicating if this is a parent category or leaf node, used to + distinguish grouping levels from actual item categories. + - name: item_group_defaults + fieldtype: Table + label: Item Group Defaults + description: '' + child_hint: + child_table: tabItem Default + fieldname: item_group_defaults + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: item_group_defaults + - name: taxes + fieldtype: Table + label: Taxes + description: '' + child_hint: + child_table: tabItem Tax + fieldname: taxes + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: taxes + - name: lft + fieldtype: Int + label: lft + description: Left boundary value in nested set model, used for efficient hierarchical + queries and tree traversal operations. + - name: old_parent + fieldtype: Link + label: old_parent + description: Previous parent item group before reorganization, used for tracking + hierarchy changes and data migration. + join_hint: + table: tabItem Group + 'on': old_parent = tabItem Group.name + - name: rgt + fieldtype: Int + label: rgt + description: Right boundary value in nested set model, used with lft for querying + all descendants in the item group tree. + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Item Group document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabItem Manufacturer + description: '' + fields: + - name: item_code + fieldtype: Link + label: Item Code + description: The specific item or product that this manufacturer produces or supplies + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: manufacturer + fieldtype: Link + label: Manufacturer + description: The company or entity that manufactures the item + join_hint: + table: tabManufacturer + 'on': manufacturer = tabManufacturer.name + - name: manufacturer_part_no + fieldtype: Data + label: Manufacturer Part Number + description: Manufacturer's unique part number for the item, used when searching + by vendor-specific part identifiers or cross-referencing supplier catalogs. + - name: item_name + fieldtype: Data + label: Item Name + description: Internal item name or code in the ERP system, used when querying + by company's own item identification rather than manufacturer's designation. + - name: description + fieldtype: Small Text + label: Description + description: Detailed text description of the item from the manufacturer, used + when searching by product characteristics, specifications, or features rather + than part numbers. + - name: is_default + fieldtype: Check + label: Is Default + description: Indicates whether this manufacturer is the primary or preferred manufacturer + for the item. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Item Manufacturer document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabItem Price + description: Log the selling and buying rate of an Item + fields: + - name: item_code + fieldtype: Link + label: Item Code + description: Unique item identifier used to retrieve specific product pricing + or filter price lists by particular SKUs. + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: uom + fieldtype: Link + label: UOM + description: Unit of measure that determines the pricing basis (e.g., per piece, + per kg) when comparing prices or calculating total costs. + join_hint: + table: tabUOM + 'on': uom = tabUOM.name + - name: packing_unit + fieldtype: Int + label: Packing Unit + description: Unit of measure for packaging or selling the item (e.g., box, carton, + pallet) used when users ask about packaging quantities or bulk pricing units. + - name: item_name + fieldtype: Data + label: Item Name + description: Name or title of the product or item being priced, used when users + search for specific products or reference items by their common name. + - name: brand + fieldtype: Link + label: Brand + description: Manufacturer or brand name of the item, used when users filter or + search for products by specific brands or compare pricing across brands. + join_hint: + table: tabBrand + 'on': brand = tabBrand.name + - name: item_description + fieldtype: Text + label: Item Description + description: Description of the item for which the price is defined, used when + searching prices by product name or characteristics. + - name: price_list + fieldtype: Link + label: Price List + description: Name of the price list this price belongs to, used when querying + prices for specific customer segments, regions, or pricing strategies. + join_hint: + table: tabPrice List + 'on': price_list = tabPrice List.name + - name: customer + fieldtype: Link + label: Customer + description: Specific customer for whom this price applies, used when looking + up customer-specific negotiated or contracted pricing. + join_hint: + table: tabCustomer + 'on': customer = tabCustomer.name + - name: supplier + fieldtype: Link + label: Supplier + description: Vendor or supplier from whom the item is purchased at this price + point. + join_hint: + table: tabSupplier + 'on': supplier = tabSupplier.name + - name: batch_no + fieldtype: Link + label: Batch No + description: Specific batch or lot number associated with this item price, used + when pricing varies by production batch. + join_hint: + table: tabBatch + 'on': batch_no = tabBatch.name + - name: buying + fieldtype: Check + label: Buying + description: Purchase price or cost at which the item is bought from the supplier. + - name: selling + fieldtype: Check + label: Selling + description: Indicates whether this price applies to sales transactions versus + purchasing transactions. + - name: currency + fieldtype: Link + label: Currency + description: The currency in which the price_list_rate is denominated for this + item price. + join_hint: + table: tabCurrency + 'on': currency = tabCurrency.name + - name: price_list_rate + fieldtype: Currency + label: Rate + description: The actual price amount for the item in the specified currency and + price list. + - name: valid_from + fieldtype: Date + label: Valid From + description: Start date when this item price becomes effective for purchases or + sales transactions. + - name: lead_time_days + fieldtype: Int + label: Lead Time in days + description: Number of days required between order placement and delivery availability + for this item at this price. + - name: valid_upto + fieldtype: Date + label: Valid Upto + description: End date when this item price expires and is no longer applicable + for transactions. + - name: note + fieldtype: Text + label: Note + description: Internal notes or comments about this specific item price, such as + reasons for price changes or special conditions. + - name: reference + fieldtype: Data + label: Reference + description: External reference number or code linking this price to a customer + agreement, contract, or vendor quote. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Item Price document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabItem Quality Inspection Parameter + description: '' + fields: + - name: specification + fieldtype: Link + label: Parameter + description: Detailed criteria, acceptable range, or standard that defines how + the quality parameter should be measured or what values are acceptable + join_hint: + table: tabQuality Inspection Parameter + 'on': specification = tabQuality Inspection Parameter.name + - name: parameter_group + fieldtype: Link + label: Parameter Group + description: Category or grouping that organizes related quality inspection parameters + together for classification purposes + join_hint: + table: tabQuality Inspection Parameter Group + 'on': parameter_group = tabQuality Inspection Parameter Group.name + - name: value + fieldtype: Data + label: Acceptance Criteria Value + description: Actual measured or observed result for a quality inspection parameter, + stored as text to accommodate both numeric and non-numeric values. + - name: numeric + fieldtype: Check + label: Numeric + description: Flag indicating whether the inspection parameter accepts numeric + measurements versus categorical or text-based observations. + - name: min_value + fieldtype: Float + label: Minimum Value + description: Minimum acceptable threshold for numeric quality inspection parameters + to determine pass/fail criteria. + - name: max_value + fieldtype: Float + label: Maximum Value + description: Maximum acceptable value threshold for numeric quality inspection + parameters + - name: formula_based_criteria + fieldtype: Check + label: Formula Based Criteria + description: Indicates whether the quality acceptance criteria is determined by + a formula rather than fixed min/max values + - name: acceptance_formula + fieldtype: Code + label: Acceptance Criteria Formula + description: Custom formula expression used to calculate or evaluate whether an + inspection result passes quality standards + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabItem Quality Inspection + Parameter). Comparison-ready across parent records.' +- table: tabItem Reorder + description: '' + fields: + - name: warehouse_group + fieldtype: Link + label: Check in (group) + description: Groups warehouses for consolidated reorder planning, used when analyzing + or setting reorder rules across multiple warehouse locations. + join_hint: + table: tabWarehouse + 'on': warehouse_group = tabWarehouse.name + - name: warehouse + fieldtype: Link + label: Request for + description: Specific warehouse location for the reorder rule, used when querying + inventory replenishment needs or reorder points at individual storage facilities. + join_hint: + table: tabWarehouse + 'on': warehouse = tabWarehouse.name + - name: warehouse_reorder_level + fieldtype: Float + label: Re-order Level + description: Minimum stock quantity threshold that triggers automatic reorder + for this item in a specific warehouse + - name: warehouse_reorder_qty + fieldtype: Float + label: Re-order Qty + description: Quantity to order when stock falls below the reorder level for this + item in a specific warehouse + - name: material_request_type + fieldtype: Select + label: Material Request Type + description: Type of material request generated when reordering (Purchase, Transfer, + Manufacture) + options: + - Purchase + - Transfer + - Material Issue + - Manufacture + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabItem Reorder). + Comparison-ready across parent records.' +- table: tabItem Supplier + description: '' + fields: + - name: supplier + fieldtype: Link + label: Supplier + description: The vendor or supplier company that provides this item for purchase. + join_hint: + table: tabSupplier + 'on': supplier = tabSupplier.name + - name: supplier_part_no + fieldtype: Data + label: Supplier Part Number + description: The part number or SKU assigned by the supplier to identify this + item in their catalog. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabItem Supplier). + Comparison-ready across parent records.' +- table: tabItem Tax + description: '' + fields: + - name: item_tax_template + fieldtype: Link + label: Item Tax Template + description: Links to the specific tax template applied to this item, used when + querying which tax rules or rates govern an item's taxation. + join_hint: + table: tabItem Tax Template + 'on': item_tax_template = tabItem Tax Template.name + - name: tax_category + fieldtype: Link + label: Tax Category + description: Classification of the item for tax purposes (e.g., taxable goods, + exempt services), used when filtering or grouping items by their tax treatment + type. + join_hint: + table: tabTax Category + 'on': tax_category = tabTax Category.name + - name: valid_from + fieldtype: Date + label: Valid From + description: Date when this tax rate becomes effective for the item + - name: minimum_net_rate + fieldtype: Float + label: Minimum Net Rate + description: Lowest net tax rate applicable to this item within the valid period + - name: maximum_net_rate + fieldtype: Float + label: Maximum Net Rate + description: Highest net tax rate applicable to this item within the valid period + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabItem Tax). Comparison-ready + across parent records.' +- table: tabItem Tax Template + description: '' + fields: + - name: title + fieldtype: Data + label: Title + description: Display label or descriptive name shown to users for the tax template + - name: company + fieldtype: Link + label: Company + description: Company or organization to which this tax template belongs + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: disabled + fieldtype: Check + label: Disabled + description: Whether this item tax template is inactive and cannot be used in + transactions. + - name: taxes + fieldtype: Table + label: Tax Rates + description: '' + child_hint: + child_table: tabItem Tax Template Detail + fieldname: taxes + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: taxes + - name: custom_exemption_reason_code + fieldtype: Select + label: Exemption Reason Code + description: User-defined code explaining why an item qualifies for tax exemption + under this template. + options: + - Standard 15% + - VATEX-SA-29 + - VATEX-SA-29-7 + - VATEX-SA-30 + - VATEX-SA-32 + - VATEX-SA-33 + - VATEX-SA-34-1 + - VATEX-SA-34-2 + - VATEX-SA-34-3 + - VATEX-SA-34-4 + - VATEX-SA-34-5 + - VATEX-SA-35 + - VATEX-SA-36 + - VATEX-SA-EDU + - VATEX-SA-HEA + - VATEX-SA-MLTRY + - VATEX-SA-OOS + - name: custom_zatca_tax_category + fieldtype: Select + label: Zatca Tax Category + description: ZATCA tax category classification for Saudi Arabian e-invoicing compliance + requirements + options: + - Standard + - Zero Rated + - Exempted + - Services outside scope of tax / Not subject to VAT + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Item Tax Template document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabItem Tax Template Detail + description: '' + fields: + - name: tax_type + fieldtype: Link + label: Tax + description: Category or classification of the tax being applied such as VAT, + sales tax, or excise tax + join_hint: + table: tabAccount + 'on': tax_type = tabAccount.name + - name: tax_rate + fieldtype: Float + label: Tax Rate + description: Percentage or decimal value representing the rate at which this tax + is calculated + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabItem Tax Template + Detail). Comparison-ready across parent records.' +- table: tabItem Variant + description: '' + fields: + - name: item_attribute + fieldtype: Link + label: Item Attribute + description: The attribute type or characteristic that defines how this variant + differs (e.g., color, size, material). + join_hint: + table: tabItem Attribute + 'on': item_attribute = tabItem Attribute.name + - name: item_attribute_value + fieldtype: Data + label: Item Attribute Value + description: The specific value assigned to the variant's attribute (e.g., 'Red' + for color, 'Large' for size). + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabItem Variant). + Comparison-ready across parent records.' +- table: tabItem Variant Attribute + description: '' + fields: + - name: variant_of + fieldtype: Link + label: Variant Of + description: description + join_hint: + table: tabItem + 'on': variant_of = tabItem.name + - name: attribute + fieldtype: Link + label: Attribute + description: description + join_hint: + table: tabItem Attribute + 'on': attribute = tabItem Attribute.name + - name: attribute_value + fieldtype: Data + label: Attribute Value + description: The specific value assigned to an item variant attribute, such as + color 'Red' or size 'Large'. + - name: numeric_values + fieldtype: Check + label: Numeric Values + description: Numeric representation of the attribute value when the attribute + is quantitative, such as weight in kilograms or length in centimeters. + - name: disabled + fieldtype: Check + label: Disabled + description: Indicates whether this attribute value is currently inactive and + unavailable for selection on item variants. + - name: from_range + fieldtype: Float + label: From Range + description: Starting value of the numeric range for this item variant attribute + specification + - name: increment + fieldtype: Float + label: Increment + description: Step value by which the attribute increases between the from_range + and to_range + - name: to_range + fieldtype: Float + label: To Range + description: Ending value of the numeric range for this item variant attribute + specification + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabItem Variant Attribute). + Comparison-ready across parent records.' +- table: tabItem Website Specification + description: Table for Item that will be shown in Web Site + fields: + - name: label + fieldtype: Data + label: Label + description: Display text shown to users for this website specification on the + item + - name: description + fieldtype: Text Editor + label: Description + description: Detailed explanation of what this website specification means or + includes for the item + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabItem Website Specification). + Comparison-ready across parent records.' +- table: tabJob Card + description: '' + fields: + - name: naming_series + fieldtype: Select + label: Naming Series + description: Prefix pattern used to generate job card numbers + options: + - PO-JOB.##### + - name: work_order + fieldtype: Link + label: Work Order + description: Reference to the parent work order that this job card belongs to + join_hint: + table: tabWork Order + 'on': work_order = tabWork Order.name + - name: bom_no + fieldtype: Link + label: BOM No + description: Bill of materials number defining the component list and structure + for manufacturing the production item on this job card. + join_hint: + table: tabBOM + 'on': bom_no = tabBOM.name + - name: production_item + fieldtype: Link + label: Production Item + description: The finished good or assembly being manufactured or produced by this + job card. + join_hint: + table: tabItem + 'on': production_item = tabItem.name + - name: employee + fieldtype: Table MultiSelect + label: Employee + description: Worker or operator assigned to execute or responsible for the manufacturing + tasks on this job card. + child_hint: + child_table: tabJob Card Time Log + fieldname: employee + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: employee + - name: posting_date + fieldtype: Date + label: Posting Date + description: Date when the job card transaction was posted to the accounting ledger. + - name: company + fieldtype: Link + label: Company + description: Company entity to which this job card belongs. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: for_quantity + fieldtype: Float + label: Qty To Manufacture + description: Target quantity of items to be produced or processed in this job + card. + - name: total_completed_qty + fieldtype: Float + label: Total Completed Qty + description: Quantity of items finished or produced through this job card operation. + - name: process_loss_qty + fieldtype: Float + label: Process Loss Qty + description: Quantity of materials lost or wasted during the manufacturing process. + - name: expected_start_date + fieldtype: Datetime + label: Expected Start Date + description: Planned or scheduled date when the job card operation should begin. + - name: time_required + fieldtype: Float + label: Expected Time Required (In Mins) + description: Total time needed to complete the job card operation or task. + - name: expected_end_date + fieldtype: Datetime + label: Expected End Date + description: Target date when the job card work is planned to be finished. + - name: scheduled_time_logs + fieldtype: Table + label: Scheduled Time Logs + description: '' + child_hint: + child_table: tabJob Card Scheduled Time + fieldname: scheduled_time_logs + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: scheduled_time_logs + - name: time_logs + fieldtype: Table + label: Time Logs + description: '' + child_hint: + child_table: tabJob Card Time Log + fieldname: time_logs + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: time_logs + - name: actual_start_date + fieldtype: Datetime + label: Actual Start Date + description: Date and time when work actually began on this job card, used to + track delays or compare planned versus actual start times. + - name: total_time_in_mins + fieldtype: Float + label: Total Time in Mins + description: Cumulative minutes spent on this job card across all time logs, used + when calculating labor costs or comparing estimated versus actual duration. + - name: actual_end_date + fieldtype: Datetime + label: Actual End Date + description: Date when the job card operation was actually completed, used to + track production delays or completion timing. + - name: operation + fieldtype: Link + label: Operation + description: Specific manufacturing operation or task being performed in this + job card, such as cutting, welding, or assembly. + join_hint: + table: tabOperation + 'on': operation = tabOperation.name + - name: wip_warehouse + fieldtype: Link + label: WIP Warehouse + description: Warehouse location where work-in-progress inventory for this job + card is stored during production. + join_hint: + table: tabWarehouse + 'on': wip_warehouse = tabWarehouse.name + - name: workstation_type + fieldtype: Link + label: Workstation Type + description: Category or classification of the workstation where job card operations + are performed, used when filtering or grouping by workstation category rather + than specific workstation location. + join_hint: + table: tabWorkstation Type + 'on': workstation_type = tabWorkstation Type.name + - name: workstation + fieldtype: Link + label: Workstation + description: Specific workstation or machine where the job card work is executed, + used when identifying exact production location or equipment. + join_hint: + table: tabWorkstation + 'on': workstation = tabWorkstation.name + - name: quality_inspection_template + fieldtype: Link + label: Quality Inspection Template + description: Template defining quality checks and inspection criteria to be performed + for this job card, used when querying quality control requirements or inspection + procedures. + join_hint: + table: tabQuality Inspection Template + 'on': quality_inspection_template = tabQuality Inspection Template.name + - name: quality_inspection + fieldtype: Link + label: Quality Inspection + description: Quality inspection details or results recorded for this job card + to track product compliance and defects. + join_hint: + table: tabQuality Inspection + 'on': quality_inspection = tabQuality Inspection.name + - name: sub_operations + fieldtype: Table + label: Sub Operations + description: '' + child_hint: + child_table: tabJob Card Operation + fieldname: sub_operations + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: sub_operations + - name: items + fieldtype: Table + label: Items + description: '' + child_hint: + child_table: tabJob Card Item + fieldname: items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: items + - name: scrap_items + fieldtype: Table + label: Scrap Items + description: '' + child_hint: + child_table: tabJob Card Scrap Item + fieldname: scrap_items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: scrap_items + - name: for_job_card + fieldtype: Link + label: For Job Card + description: Reference to the parent or related job card when this is a linked + or dependent job card + join_hint: + table: tabJob Card + 'on': for_job_card = tabJob Card.name + - name: is_corrective_job_card + fieldtype: Check + label: Is Corrective Job Card + description: Indicates whether this job card was created to correct defects or + rework issues from a previous job + - name: hour_rate + fieldtype: Currency + label: Hour Rate + description: Hourly labor or machine rate charged for work performed on this job + card. + - name: for_operation + fieldtype: Link + label: For Operation + description: Specific manufacturing or production operation this job card tracks + or executes. + join_hint: + table: tabOperation + 'on': for_operation = tabOperation.name + - name: project + fieldtype: Link + label: Project + description: Project associated with this job card for tracking work against project + budgets and timelines. + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: transferred_qty + fieldtype: Float + label: FG Qty from Transferred Raw Materials + description: Quantity of items actually transferred or moved from this job card + operation to the next stage + - name: requested_qty + fieldtype: Float + label: Requested Qty + description: Quantity of items originally requested or planned for this job card + operation + - name: status + fieldtype: Select + label: Status + description: Current state of the job card such as open, in progress, completed, + or cancelled. + options: + - Open + - Work In Progress + - Material Transferred + - On Hold + - Submitted + - Cancelled + - Completed + - name: operation_row_number + fieldtype: Select + label: Operation Row Number + description: Sequential position or order number of this operation within the + job card's operation list. + - name: operation_id + fieldtype: Data + label: Operation ID + description: Identifier linking to the specific manufacturing operation or routing + step being performed in this job card. + - name: sequence_id + fieldtype: Int + label: Sequence Id + description: Order of operations or steps within the job card workflow. + - name: remarks + fieldtype: Small Text + label: Remarks + description: Free-text notes or comments about the job card for additional context + or instructions. + - name: serial_and_batch_bundle + fieldtype: Link + label: Serial and Batch Bundle + description: Grouped serial numbers and batch identifiers tracked together for + this job card's materials or products. + join_hint: + table: tabSerial and Batch Bundle + 'on': serial_and_batch_bundle = tabSerial and Batch Bundle.name + - name: batch_no + fieldtype: Link + label: Batch No + description: Batch number associated with the manufacturing job for tracking groups + of items produced together. + join_hint: + table: tabBatch + 'on': batch_no = tabBatch.name + - name: serial_no + fieldtype: Small Text + label: Serial No + description: Unique serial number identifying this specific job card record. + - name: job_started + fieldtype: Check + label: Job Started + description: Indicates whether the manufacturing job has been started or is still + pending. + - name: started_time + fieldtype: Datetime + label: Started Time + description: Timestamp when the job card work actually began, used to track when + production or operations commenced. + - name: current_time + fieldtype: Int + label: Current Time + description: Real-time or last updated timestamp for the job card, used to calculate + elapsed time or current status duration. + - name: amended_from + fieldtype: Link + label: Amended From + description: Reference to the original job card that this one was amended or corrected + from, used to trace revisions and corrections. + join_hint: + table: tabJob Card + 'on': amended_from = tabJob Card.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Job Card document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabJob Card Item + description: '' + fields: + - name: item_code + fieldtype: Link + label: Item Code + description: Product or material code being manufactured or processed in this + job card operation + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: source_warehouse + fieldtype: Link + label: Source Warehouse + description: Warehouse location from which raw materials or components are issued + for this job card item + join_hint: + table: tabWarehouse + 'on': source_warehouse = tabWarehouse.name + - name: uom + fieldtype: Link + label: UOM + description: Unit of measurement for the item quantity used in this specific job + card operation or transaction. + join_hint: + table: tabUOM + 'on': uom = tabUOM.name + - name: item_group + fieldtype: Link + label: Item Group + description: Category or classification of the item being produced or consumed + in the job card. + join_hint: + table: tabItem Group + 'on': item_group = tabItem Group.name + - name: stock_uom + fieldtype: Link + label: Stock UOM + description: Base unit of measurement for the item as defined in inventory, which + may differ from the transaction uom. + join_hint: + table: tabUOM + 'on': stock_uom = tabUOM.name + - name: item_name + fieldtype: Data + label: Item Name + description: The specific item or material being consumed or produced in this + job card operation. + - name: description + fieldtype: Text + label: Description + description: Additional details or specifications about the item beyond its name. + - name: required_qty + fieldtype: Float + label: Required Qty + description: The quantity of the item needed or planned for this job card operation. + - name: transferred_qty + fieldtype: Float + label: Transferred Qty + description: Quantity of this item that has been transferred from the job card + to stock or another location. + - name: allow_alternative_item + fieldtype: Check + label: Allow Alternative Item + description: Whether a substitute item can be used in place of this item during + job card execution. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabJob Card Item). + Comparison-ready across parent records.' +- table: tabJob Card Operation + description: '' + fields: + - name: sub_operation + fieldtype: Link + label: Operation + description: Indicates whether this is a secondary or subsidiary operation under + a main operation + join_hint: + table: tabOperation + 'on': sub_operation = tabOperation.name + - name: completed_time + fieldtype: Data + label: Completed Time + description: Timestamp when the operation was finished or marked complete + - name: status + fieldtype: Select + label: Status + description: Current state of the job card operation such as pending, in progress, + completed, or on hold. + options: + - Complete + - Pause + - Pending + - Work In Progress + - name: completed_qty + fieldtype: Float + label: Completed Qty + description: Quantity of items finished for this specific operation in the job + card. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabJob Card Operation). + Comparison-ready across parent records.' +- table: tabJob Card Scheduled Time + description: '' + fields: + - name: from_time + fieldtype: Datetime + label: From Time + description: Start time of the scheduled work period for a job card operation + - name: to_time + fieldtype: Datetime + label: To Time + description: End time of the scheduled work period for a job card operation + - name: time_in_mins + fieldtype: Float + label: Time (In Mins) + description: Duration of scheduled time allocated for a job card operation or + task, used when querying how long work is planned to take. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabJob Card Scheduled + Time). Comparison-ready across parent records.' +- table: tabJob Card Scrap Item + description: '' + fields: + - name: item_code + fieldtype: Link + label: Scrap Item Code + description: Code of the scrapped item material or product + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: item_name + fieldtype: Data + label: Scrap Item Name + description: Name of the scrapped item material or product + - name: description + fieldtype: Small Text + label: Description + description: Details or notes about the scrapped item from the job card operation. + - name: stock_qty + fieldtype: Float + label: Qty + description: Quantity of the scrapped item recorded in stock units. + - name: stock_uom + fieldtype: Link + label: Stock UOM + description: Unit of measurement for the scrapped item quantity in stock. + join_hint: + table: tabUOM + 'on': stock_uom = tabUOM.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabJob Card Scrap + Item). Comparison-ready across parent records.' +- table: tabJob Card Time Log + description: '' + fields: + - name: employee + fieldtype: Link + label: Employee + description: Employee who performed or logged the work time on the job card + join_hint: + table: tabEmployee + 'on': employee = tabEmployee.name + - name: from_time + fieldtype: Datetime + label: From Time + description: Start timestamp when the employee began working on the job card task + - name: to_time + fieldtype: Datetime + label: To Time + description: End timestamp when work on the job card stopped or was completed + - name: time_in_mins + fieldtype: Float + label: Time In Mins + description: Total duration of work performed in minutes for this time log entry + - name: completed_qty + fieldtype: Float + label: Completed Qty + description: Quantity of items finished or produced during this specific time + log period + - name: operation + fieldtype: Link + label: Operation + description: The specific manufacturing operation or work step being performed + during this time log entry. + join_hint: + table: tabOperation + 'on': operation = tabOperation.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabJob Card Time + Log). Comparison-ready across parent records.' +- table: tabJournal Entry + description: '' + fields: + - name: is_system_generated + fieldtype: Check + label: Is System Generated + description: Indicates whether the journal entry was automatically created by + the system versus manually entered by a user, useful for auditing and filtering + automated transactions. + - name: title + fieldtype: Data + label: Title + description: Brief description or purpose of the journal entry used when searching + for specific transaction types or understanding the nature of accounting entries. + - name: voucher_type + fieldtype: Select + label: Entry Type + description: Type of accounting transaction such as sales invoice, purchase invoice, + payment entry, or journal entry used to categorize the source document. + options: + - Journal Entry + - Inter Company Journal Entry + - Bank Entry + - Cash Entry + - Credit Card Entry + - Debit Note + - Credit Note + - Contra Entry + - Excise Entry + - Write Off Entry + - Opening Entry + - Depreciation Entry + - Exchange Rate Revaluation + - Exchange Gain Or Loss + - Deferred Revenue + - Deferred Expense + - name: naming_series + fieldtype: Select + label: Series + description: Prefix pattern that determines the numbering sequence for journal + entry identifiers. + options: + - ACC-JV-.YYYY.- + - name: finance_book + fieldtype: Link + label: Finance Book + description: Separate accounting book for maintaining parallel financial records + under different accounting standards or for different legal entities. + join_hint: + table: tabFinance Book + 'on': finance_book = tabFinance Book.name + - name: process_deferred_accounting + fieldtype: Link + label: Process Deferred Accounting + description: Indicates whether this journal entry triggers deferred revenue or + expense recognition workflows. + join_hint: + table: tabProcess Deferred Accounting + 'on': process_deferred_accounting = tabProcess Deferred Accounting.name + - name: reversal_of + fieldtype: Link + label: Reversal Of + description: References the original journal entry that this entry reverses or + cancels. + join_hint: + table: tabJournal Entry + 'on': reversal_of = tabJournal Entry.name + - name: tax_withholding_category + fieldtype: Link + label: Tax Withholding Category + description: Specifies the tax withholding classification applied to this journal + entry for compliance and reporting. + join_hint: + table: tabTax Withholding Category + 'on': tax_withholding_category = tabTax Withholding Category.name + - name: from_template + fieldtype: Link + label: From Template + description: Indicates whether the journal entry was created from a predefined + template rather than manually entered from scratch. + join_hint: + table: tabJournal Entry Template + 'on': from_template = tabJournal Entry Template.name + - name: company + fieldtype: Link + label: Company + description: The specific company or legal entity to which this journal entry + belongs in a multi-company environment. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: posting_date + fieldtype: Date + label: Posting Date + description: The accounting period date when the journal entry is officially recorded + in the general ledger, affecting financial statements for that period. + - name: apply_tds + fieldtype: Check + label: 'Apply Tax Withholding Amount ' + description: Whether tax deducted at source is applied to this journal entry transaction. + - name: accounts + fieldtype: Table + label: Accounting Entries + description: '' + child_hint: + child_table: tabJournal Entry Account + fieldname: accounts + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: accounts + - name: cheque_no + fieldtype: Data + label: Reference Number + description: The check or cheque number associated with this journal entry payment. + - name: cheque_date + fieldtype: Date + label: Reference Date + description: Date on the cheque used for payment in this journal entry transaction. + - name: user_remark + fieldtype: Small Text + label: User Remark + description: Custom notes or comments added by the user to explain or annotate + this journal entry. + - name: total_debit + fieldtype: Currency + label: Total Debit + description: Sum of all debit amounts across all line items in this journal entry. + - name: total_credit + fieldtype: Currency + label: Total Credit + description: Sum of all credit amounts in the journal entry, used when analyzing + or validating credit-side transactions. + - name: difference + fieldtype: Currency + label: Difference (Dr - Cr) + description: Imbalance between total debits and total credits, used to identify + unbalanced or incomplete journal entries. + - name: multi_currency + fieldtype: Check + label: Multi Currency + description: Indicates whether the journal entry involves transactions in multiple + currencies. + - name: total_amount_currency + fieldtype: Link + label: Total Amount Currency + description: Currency code for the journal entry total amount, used when filtering + or grouping entries by currency type. + join_hint: + table: tabCurrency + 'on': total_amount_currency = tabCurrency.name + - name: total_amount + fieldtype: Currency + label: Total Amount + description: Net total monetary value of the journal entry, used for financial + calculations, balance verification, and amount-based queries. + - name: total_amount_in_words + fieldtype: Data + label: Total Amount in Words + description: Written text representation of the total amount, used for check printing, + formal documents, and compliance requirements. + - name: clearance_date + fieldtype: Date + label: Clearance Date + description: Date when a journal entry transaction was cleared or reconciled with + bank or other accounts. + - name: remark + fieldtype: Small Text + label: Remark + description: Additional notes or comments explaining the purpose or context of + the journal entry. + - name: paid_loan + fieldtype: Data + label: Paid Loan + description: Indicates whether this journal entry represents a loan payment transaction. + - name: inter_company_journal_entry_reference + fieldtype: Link + label: Inter Company Journal Entry Reference + description: Links to the corresponding journal entry in another company entity + when recording transactions between related companies or subsidiaries. + join_hint: + table: tabJournal Entry + 'on': inter_company_journal_entry_reference = tabJournal Entry.name + - name: bill_no + fieldtype: Data + label: Bill No + description: Vendor bill or invoice number associated with this journal entry + when recording payables or expense transactions. + - name: bill_date + fieldtype: Date + label: Bill Date + description: Date on the vendor bill or invoice, used to track when the bill was + issued rather than when it was recorded or paid. + - name: due_date + fieldtype: Date + label: Due Date + description: Date when payment or settlement of the journal entry is expected + or required. + - name: write_off_based_on + fieldtype: Select + label: Write Off Based On + description: Method or criteria used to determine the write-off calculation, such + as accounts receivable or accounts payable. + options: + - Accounts Receivable + - Accounts Payable + - name: write_off_amount + fieldtype: Currency + label: Write Off Amount + description: Monetary value being written off as uncollectible, expired, or otherwise + removed from active accounts. + - name: pay_to_recd_from + fieldtype: Data + label: Pay To / Recd From + description: Party name from whom payment was received or to whom payment was + made in this journal entry transaction. + - name: letter_head + fieldtype: Link + label: Letter Head + description: Letterhead template applied when printing this journal entry document. + join_hint: + table: tabLetter Head + 'on': letter_head = tabLetter Head.name + - name: select_print_heading + fieldtype: Link + label: Print Heading + description: Custom heading text that appears on the printed version of this journal + entry. + join_hint: + table: tabPrint Heading + 'on': select_print_heading = tabPrint Heading.name + - name: mode_of_payment + fieldtype: Link + label: Mode of Payment + description: Payment method used for the transaction such as cash, check, credit + card, or bank transfer. + join_hint: + table: tabMode of Payment + 'on': mode_of_payment = tabMode of Payment.name + - name: payment_order + fieldtype: Link + label: Payment Order + description: Reference to the payment order document that initiated or is associated + with this journal entry. + join_hint: + table: tabPayment Order + 'on': payment_order = tabPayment Order.name + - name: party_not_required + fieldtype: Check + label: Party Not Required + description: Indicates whether this journal entry can be created without specifying + a customer or supplier party. + - name: is_opening + fieldtype: Select + label: Is Opening + description: Indicates whether this journal entry records opening balances when + initializing accounts at the start of a fiscal period or company setup. + options: + - 'No' + - 'Yes' + - name: stock_entry + fieldtype: Link + label: Stock Entry + description: Links this journal entry to a stock/inventory movement transaction + that triggered automatic accounting entries. + join_hint: + table: tabStock Entry + 'on': stock_entry = tabStock Entry.name + - name: auto_repeat + fieldtype: Link + label: Auto Repeat + description: References the recurring schedule that automatically generates this + journal entry at defined intervals. + join_hint: + table: tabAuto Repeat + 'on': auto_repeat = tabAuto Repeat.name + - name: amended_from + fieldtype: Link + label: Amended From + description: Links to the original journal entry that this entry amends or corrects, + used when users ask about corrections, amendments, or the history of modified + journal entries. + join_hint: + table: tabJournal Entry + 'on': amended_from = tabJournal Entry.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Journal Entry document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabJournal Entry Account + description: '' + fields: + - name: account + fieldtype: Link + label: Account + description: The specific general ledger account code or identifier being debited + or credited in this journal entry line. + join_hint: + table: tabAccount + 'on': account = tabAccount.name + - name: account_type + fieldtype: Data + label: Account Type + description: The classification of the account such as Asset, Liability, Equity, + Income, or Expense to categorize the nature of the transaction. + - name: bank_account + fieldtype: Link + label: Bank Account + description: Bank account involved in the journal entry transaction for cash or + banking operations. + join_hint: + table: tabBank Account + 'on': bank_account = tabBank Account.name + - name: party_type + fieldtype: Link + label: Party Type + description: Type of entity associated with the journal entry such as Customer, + Supplier, Employee, or Shareholder. + join_hint: + table: tabDocType + 'on': party_type = tabDocType.name + - name: party + fieldtype: Dynamic Link + label: Party + description: Specific entity name or identifier linked to the journal entry when + the transaction involves a customer, supplier, or other party. + - name: cost_center + fieldtype: Link + label: Cost Center + description: Department or business unit to which this journal entry line is allocated + for expense tracking and budgeting. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + - name: project + fieldtype: Link + label: Project + description: Specific project to which this journal entry line is assigned for + project-based accounting and profitability analysis. + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: account_currency + fieldtype: Link + label: Account Currency + description: Currency in which this journal entry line's account maintains its + balance, which may differ from the transaction or company currency. + join_hint: + table: tabCurrency + 'on': account_currency = tabCurrency.name + - name: exchange_rate + fieldtype: Float + label: Exchange Rate + description: Rate used to convert foreign currency amounts to base currency for + this journal entry line. + - name: debit_in_account_currency + fieldtype: Currency + label: Debit + description: Debit amount in the original foreign currency of the account before + conversion. + - name: debit + fieldtype: Currency + label: Debit in Company Currency + description: Debit amount in the company's base currency after exchange rate conversion. + - name: credit_in_account_currency + fieldtype: Currency + label: Credit + description: Credit amount in the specific currency of the account, used when + analyzing transactions in their original currency rather than company base currency. + - name: credit + fieldtype: Currency + label: Credit in Company Currency + description: Credit amount converted to company base currency, used for consolidated + financial reporting and cross-account analysis. + - name: reference_type + fieldtype: Select + label: Reference Type + description: Type of document or transaction this journal entry relates to, such + as Sales Invoice, Purchase Order, or Payment Entry. + options: + - Sales Invoice + - Purchase Invoice + - Journal Entry + - Sales Order + - Purchase Order + - Expense Claim + - Asset + - Loan + - Payroll Entry + - Employee Advance + - Exchange Rate Revaluation + - Invoice Discounting + - Fees + - Full and Final Statement + - Payment Entry + - name: reference_name + fieldtype: Dynamic Link + label: Reference Name + description: Name or identifier of the external document or transaction that this + journal entry relates to, such as an invoice number, purchase order, or payment + reference. + - name: reference_due_date + fieldtype: Date + label: Reference Due Date + description: Due date associated with the referenced external document, used when + tracking payment deadlines or obligation dates tied to the journal entry. + - name: reference_detail_no + fieldtype: Data + label: Reference Detail No + description: Line item or detail number from the referenced external document, + used to link journal entries to specific lines in source transactions like invoice + line items or order details. + - name: advance_voucher_type + fieldtype: Link + label: Advance Voucher Type + description: Type of advance payment voucher linked to this journal entry account + line, used when tracking prepayments or advance settlements. + join_hint: + table: tabDocType + 'on': advance_voucher_type = tabDocType.name + - name: advance_voucher_no + fieldtype: Dynamic Link + label: Advance Voucher No + description: Reference number of the advance payment voucher being settled or + applied in this journal entry account line. + - name: is_advance + fieldtype: Select + label: Is Advance + description: Indicates whether this journal entry account line represents an advance + payment or prepayment transaction. + options: + - 'No' + - 'Yes' + - name: user_remark + fieldtype: Small Text + label: User Remark + description: Custom notes or comments added by users to explain the purpose or + context of this journal entry line item. + - name: against_account + fieldtype: Text + label: Against Account + description: The offsetting account that this journal entry line is posted against, + showing the other side of the accounting transaction. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabJournal Entry + Account). Comparison-ready across parent records.' +- table: tabJournal Entry Template + description: '' + fields: + - name: template_title + fieldtype: Data + label: Template Title + description: Descriptive title or label for the journal entry template used when + selecting or displaying templates + - name: voucher_type + fieldtype: Select + label: Journal Entry Type + description: Category or classification of the voucher associated with this template + such as payment, receipt, journal, or contra entry + options: + - Journal Entry + - Inter Company Journal Entry + - Bank Entry + - Cash Entry + - Credit Card Entry + - Debit Note + - Credit Note + - Contra Entry + - Excise Entry + - Write Off Entry + - Opening Entry + - Depreciation Entry + - Exchange Rate Revaluation + - name: naming_series + fieldtype: Select + label: Series + description: Prefix pattern for automatically generating journal entry template + identifiers + - name: company + fieldtype: Link + label: Company + description: Company entity to which this journal entry template belongs and will + be applied + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: is_opening + fieldtype: Select + label: Is Opening + description: Indicates whether this template is used for creating opening balance + journal entries + options: + - 'No' + - 'Yes' + - name: multi_currency + fieldtype: Check + label: Multi Currency + description: Indicates whether the journal entry template supports transactions + in multiple currencies or foreign exchange entries. + - name: accounts + fieldtype: Table + label: Accounting Entries + description: '' + child_hint: + child_table: tabJournal Entry Template Account + fieldname: accounts + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: accounts + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Journal Entry Template document (master/transaction). Use + only for single-entity lookups, not cross-record comparison unless fields are + per-relationship (e.g. supplier, price_list).' +- table: tabJournal Entry Template Account + description: '' + fields: + - name: account + fieldtype: Link + label: Account + description: General ledger account code or number assigned to this template line + for posting transactions + join_hint: + table: tabAccount + 'on': account = tabAccount.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabJournal Entry + Template Account). Comparison-ready across parent records.' +- table: tabKanban Board + description: '' + fields: + - name: kanban_board_name + fieldtype: Data + label: Kanban Board Name + description: Display name of the Kanban board used for user identification and + search. + - name: reference_doctype + fieldtype: Link + label: Reference Document Type + description: DocType that this Kanban board visualizes, used to find boards for + specific modules. + join_hint: + table: tabDocType + 'on': reference_doctype = tabDocType.name + - name: field_name + fieldtype: Select + label: Field Name + description: Field in the reference DocType used for grouping cards into columns. + - name: private + fieldtype: Check + label: Private + description: Indicates if the Kanban board is visible only to the owner or shared + with others. + - name: show_labels + fieldtype: Check + label: Show Labels + description: Controls whether labels are displayed on Kanban cards for visual + categorization. + - name: columns + fieldtype: Table + label: Columns + description: '' + child_hint: + child_table: tabKanban Board Column + fieldname: columns + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: columns + - name: filters + fieldtype: Code + label: Filters + description: Used to query which filter criteria or conditions are applied to + limit or segment the kanban board view by status, assignee, priority, or other + dimensions. + - name: fields + fieldtype: Code + label: Fields + description: Used to identify which data columns or attributes are displayed or + available in the kanban board configuration for task tracking and visualization. + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Kanban Board document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabKanban Board Column + description: '' + fields: + - name: column_name + fieldtype: Data + label: Column Name + description: Display label for the kanban column shown to users. + - name: status + fieldtype: Select + label: Status + description: Workflow status value that cards in this column represent. + options: + - Active + - Archived + - name: indicator + fieldtype: Select + label: Indicator + description: Color indicator used to visually distinguish this column on the board. + options: + - Blue + - Cyan + - Gray + - Green + - Light Blue + - Orange + - Pink + - Purple + - Red + - Yellow + - name: order + fieldtype: Code + label: Order + description: Numeric value controlling the left-to-right ordering of columns. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabKanban Board Column). + Comparison-ready across parent records.' +- table: tabLDAP Group Mapping + description: '' + fields: + - name: ldap_group + fieldtype: Data + label: LDAP Group + description: Active Directory or LDAP group name to be mapped for user authentication + and authorization. + - name: erpnext_role + fieldtype: Link + label: User Role + description: ERPNext role automatically assigned to users belonging to the specified + LDAP group. + join_hint: + table: tabRole + 'on': erpnext_role = tabRole.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabLDAP Group Mapping). + Comparison-ready across parent records.' +- table: tabLanded Cost Item + description: '' + fields: + - name: item_code + fieldtype: Link + label: Item Code + description: Code linking to the inventory item receiving the landed cost allocation, + used when analyzing cost impacts on specific products. + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: description + fieldtype: Text Editor + label: Description + description: Text explanation of the landed cost component (freight, duties, insurance) + used when filtering or grouping costs by type or category. + - name: receipt_document_type + fieldtype: Select + label: Receipt Document Type + description: Type of document associated with the goods receipt, such as purchase + order, transfer order, or return authorization. + options: + - Purchase Invoice + - Purchase Receipt + - name: receipt_document + fieldtype: Dynamic Link + label: Receipt Document + description: Identifier or number of the specific receipt document that triggered + the landed cost allocation. + - name: qty + fieldtype: Float + label: Qty + description: Quantity of items received in this landed cost allocation, used to + calculate per-unit landed cost distribution. + - name: rate + fieldtype: Currency + label: Rate + description: Rate per unit used to calculate the landed cost charge applied to + items in the shipment. + - name: amount + fieldtype: Currency + label: Amount + description: Total monetary value of the landed cost charge for this item. + - name: is_fixed_asset + fieldtype: Check + label: Is Fixed Asset + description: Indicates whether the landed cost item should be capitalized as a + fixed asset rather than expensed. + - name: applicable_charges + fieldtype: Currency + label: Applicable Charges + description: Total landed cost charges allocated to this item from freight, customs, + insurance and other import-related expenses. + - name: purchase_receipt_item + fieldtype: Data + label: Purchase Receipt Item + description: Reference to the specific line item on the purchase receipt that + this landed cost is being applied to. + - name: cost_center + fieldtype: Link + label: Cost Center + description: Cost center to which this landed cost item's expenses should be allocated + for accounting and budgeting purposes. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabLanded Cost Item). + Comparison-ready across parent records.' +- table: tabLanded Cost Purchase Receipt + description: '' + fields: + - name: receipt_document_type + fieldtype: Select + label: Receipt Document Type + description: Type of document associated with the receipt such as Purchase Receipt + or Purchase Invoice + options: + - Purchase Invoice + - Purchase Receipt + - name: receipt_document + fieldtype: Dynamic Link + label: Receipt Document + description: Specific document number or reference of the purchase receipt or + invoice linked to this landed cost + - name: supplier + fieldtype: Link + label: Supplier + description: The vendor or supplier from whom the goods were purchased and received. + join_hint: + table: tabSupplier + 'on': supplier = tabSupplier.name + - name: posting_date + fieldtype: Date + label: Posting Date + description: The accounting date when the purchase receipt transaction was recorded + in the financial ledger. + - name: grand_total + fieldtype: Currency + label: Grand Total + description: The total amount of the purchase receipt including all items, taxes, + and charges. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabLanded Cost Purchase + Receipt). Comparison-ready across parent records.' +- table: tabLanded Cost Taxes and Charges + description: '' + fields: + - name: expense_account + fieldtype: Link + label: Expense Account + description: General ledger account where this landed cost tax or charge expense + is recorded + join_hint: + table: tabAccount + 'on': expense_account = tabAccount.name + - name: account_currency + fieldtype: Link + label: Account Currency + description: Currency of the expense account used for this landed cost tax or + charge + join_hint: + table: tabCurrency + 'on': account_currency = tabCurrency.name + - name: exchange_rate + fieldtype: Float + label: Exchange Rate + description: Rate used to convert foreign currency charges to the base currency + for this landed cost tax or charge line item. + - name: description + fieldtype: Small Text + label: Description + description: Text explanation or label identifying the specific tax or charge + being applied to the landed cost. + - name: amount + fieldtype: Currency + label: Amount + description: Monetary value of the tax or charge applied to the landed cost in + the specified currency. + - name: base_amount + fieldtype: Currency + label: Amount (Company Currency) + description: Tax or charge amount in company's base currency for landed cost calculations. + - name: has_corrective_cost + fieldtype: Check + label: Has Corrective Cost + description: Indicates whether this tax or charge includes a corrective adjustment + to the landed cost. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabLanded Cost Taxes + and Charges). Comparison-ready across parent records.' +- table: tabLanded Cost Voucher + description: '' + fields: + - name: naming_series + fieldtype: Select + label: Series + description: Prefix pattern that determines the automatic numbering format for + landed cost voucher identifiers. + options: + - MAT-LCV-.YYYY.- + - name: company + fieldtype: Link + label: Company + description: The company entity to which this landed cost voucher belongs, used + when filtering or reporting landed costs by organizational unit. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: posting_date + fieldtype: Date + label: Posting Date + description: Date when the landed cost voucher is posted to the general ledger + for accounting purposes. + - name: purchase_receipts + fieldtype: Table + label: Purchase Receipts + description: '' + child_hint: + child_table: tabLanded Cost Purchase Receipt + fieldname: purchase_receipts + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: purchase_receipts + - name: items + fieldtype: Table + label: Purchase Receipt Items + description: '' + child_hint: + child_table: tabLanded Cost Item + fieldname: items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: items + - name: taxes + fieldtype: Table + label: Taxes and Charges + description: '' + child_hint: + child_table: tabLanded Cost Taxes and Charges + fieldname: taxes + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: taxes + - name: total_taxes_and_charges + fieldtype: Currency + label: Total Taxes and Charges (Company Currency) + description: Aggregate sum of all taxes and additional charges on the landed cost + voucher. + - name: distribute_charges_based_on + fieldtype: Select + label: Distribute Charges Based On + description: Method used to allocate landed costs across items, such as by quantity, + amount, or weight. + options: + - Qty + - Amount + - Distribute Manually + - name: amended_from + fieldtype: Link + label: Amended From + description: References the original landed cost voucher that this document amends + or corrects. + join_hint: + table: tabLanded Cost Voucher + 'on': amended_from = tabLanded Cost Voucher.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Landed Cost Voucher document (master/transaction). Use + only for single-entity lookups, not cross-record comparison unless fields are + per-relationship (e.g. supplier, price_list).' +- table: tabLanguage + description: '' + fields: + - name: enabled + fieldtype: Check + label: Enabled + description: Active status flag indicating if language is available for selection + in system interfaces and reports. + - name: language_code + fieldtype: Data + label: Language Code + description: ISO language code (e.g., en, fr, de) used for matching system translations + and locale settings. + - name: language_name + fieldtype: Data + label: Language Name + description: Human-readable language name displayed in user interfaces and language + selection menus. + - name: flag + fieldtype: Data + label: Flag + description: Country or region flag icon associated with the language for visual + identification in UI. + - name: based_on + fieldtype: Link + label: Based On + description: Source language used as translation reference, relevant when creating + derived language variants. + join_hint: + table: tabLanguage + 'on': based_on = tabLanguage.name + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Language document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabLead + description: '' + fields: + - name: naming_series + fieldtype: Select + label: Series + description: Prefix pattern used to generate the lead identifier code + options: + - CRM-LEAD-.YYYY.- + - name: salutation + fieldtype: Link + label: Salutation + description: Title or honorific for the lead contact such as Mr, Ms, Dr, or Prof + join_hint: + table: tabSalutation + 'on': salutation = tabSalutation.name + - name: first_name + fieldtype: Data + label: First Name + description: Lead's given name used when searching or filtering by first name + only + - name: middle_name + fieldtype: Data + label: Middle Name + description: Lead's middle name used when full legal name matching or detailed + contact information is needed + - name: last_name + fieldtype: Data + label: Last Name + description: Lead's family name or surname used when searching by last name or + sorting alphabetically + - name: lead_name + fieldtype: Data + label: Full Name + description: Name of the potential customer or prospect being tracked for sales + opportunities. + - name: job_title + fieldtype: Data + label: Job Title + description: Professional role or position title of the lead contact person. + - name: gender + fieldtype: Link + label: Gender + description: Gender identity of the lead contact for demographic segmentation + and personalization. + join_hint: + table: tabGender + 'on': gender = tabGender.name + - name: source + fieldtype: Link + label: Source + description: Where the lead originated from, such as website, referral, trade + show, or advertising campaign. + join_hint: + table: tabLead Source + 'on': source = tabLead Source.name + - name: lead_owner + fieldtype: Link + label: Lead Owner + description: The salesperson or team member responsible for managing and following + up with this lead. + join_hint: + table: tabUser + 'on': lead_owner = tabUser.name + - name: status + fieldtype: Select + label: Status + description: Current stage of the lead in the sales pipeline, such as new, contacted, + qualified, or converted. + options: + - Lead + - Open + - Replied + - Opportunity + - Quotation + - Lost Quotation + - Interested + - Converted + - Do Not Contact + - name: customer + fieldtype: Link + label: From Customer + description: The potential customer or prospect company/person associated with + this sales lead + join_hint: + table: tabCustomer + 'on': customer = tabCustomer.name + - name: type + fieldtype: Select + label: Lead Type + description: The classification or category of the lead such as prospect, opportunity, + or qualified lead stage + options: + - Client + - Channel Partner + - Consultant + - name: request_type + fieldtype: Select + label: Request Type + description: The nature or purpose of the initial inquiry such as product demo, + pricing request, or support inquiry + options: + - Product Enquiry + - Request for Information + - Suggestions + - Other + - name: email_id + fieldtype: Data + label: Email + description: Email address of the lead for contact and communication purposes + - name: website + fieldtype: Data + label: Website + description: Company or personal website URL associated with the lead + - name: mobile_no + fieldtype: Data + label: Mobile No + description: Mobile phone number of the lead for direct contact + - name: whatsapp_no + fieldtype: Data + label: WhatsApp + description: WhatsApp contact number for the lead, used when users need to reach + leads via WhatsApp messaging. + - name: phone + fieldtype: Data + label: Phone + description: Primary telephone number for the lead, used for voice calls and general + phone contact. + - name: phone_ext + fieldtype: Data + label: Phone Ext. + description: Telephone extension number appended to the primary phone number for + direct dialing to the lead. + - name: company_name + fieldtype: Data + label: Organization Name + description: Name of the organization or business associated with the lead + - name: no_of_employees + fieldtype: Select + label: No of Employees + description: Total employee count at the lead's organization, used to assess company + size and qualification criteria + options: + - 1-10 + - 11-50 + - 51-200 + - 201-500 + - 501-1000 + - 1000+ + - name: annual_revenue + fieldtype: Currency + label: Annual Revenue + description: Yearly revenue of the lead's organization, used to evaluate financial + capacity and lead prioritization + - name: industry + fieldtype: Link + label: Industry + description: The business sector or industry vertical of the lead such as manufacturing, + healthcare, or technology. + join_hint: + table: tabIndustry Type + 'on': industry = tabIndustry Type.name + - name: market_segment + fieldtype: Link + label: Market Segment + description: The specific market category or customer segment the lead belongs + to, such as enterprise, SMB, or mid-market. + join_hint: + table: tabMarket Segment + 'on': market_segment = tabMarket Segment.name + - name: territory + fieldtype: Link + label: Territory + description: The geographic sales region or area assigned to the lead for sales + coverage and ownership. + join_hint: + table: tabTerritory + 'on': territory = tabTerritory.name + - name: fax + fieldtype: Data + label: Fax + description: Fax number of the lead for contact purposes + - name: city + fieldtype: Data + label: City + description: City location of the lead's address + - name: state + fieldtype: Data + label: State/Province + description: State or province of the lead's address + - name: country + fieldtype: Link + label: Country + description: Geographic location of the lead used for territory assignment, regional + analysis, and market segmentation queries. + join_hint: + table: tabCountry + 'on': country = tabCountry.name + - name: qualification_status + fieldtype: Select + label: Qualification Status + description: Current stage in the lead qualification process indicating whether + the lead is unqualified, qualified, or disqualified. + options: + - Unqualified + - In Process + - Qualified + - name: qualified_by + fieldtype: Link + label: Qualified By + description: Person or user who performed the qualification action on the lead. + join_hint: + table: tabUser + 'on': qualified_by = tabUser.name + - name: qualified_on + fieldtype: Date + label: Qualified on + description: Date when the lead was marked as qualified or met qualification criteria + - name: campaign_name + fieldtype: Link + label: Campaign Name + description: Marketing campaign that generated or is associated with this lead + join_hint: + table: tabCampaign + 'on': campaign_name = tabCampaign.name + - name: company + fieldtype: Link + label: Company + description: Company or organization name of the lead + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: language + fieldtype: Link + label: Print Language + description: Preferred language for communicating with the lead + join_hint: + table: tabLanguage + 'on': language = tabLanguage.name + - name: title + fieldtype: Data + label: Title + description: Job title or role of the lead contact person + - name: disabled + fieldtype: Check + label: Disabled + description: Whether the lead record is inactive or excluded from active sales + processes + - name: unsubscribed + fieldtype: Check + label: Unsubscribed + description: Whether the lead has opted out of marketing communications or email + campaigns + - name: blog_subscriber + fieldtype: Check + label: Blog Subscriber + description: Whether the lead has subscribed to receive blog updates or content + notifications + - name: notes + fieldtype: Table + label: Notes + description: '' + child_hint: + child_table: tabCRM Note + fieldname: notes + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: notes + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Lead document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabLead Source + description: '' + fields: + - name: source_name + fieldtype: Data + label: Source Name + description: The marketing channel or campaign name where the lead originated, + used to analyze lead generation effectiveness and ROI. + - name: details + fieldtype: Text Editor + label: Details + description: Additional context about the lead source such as campaign specifics + or referral information, used when investigating lead quality or attribution + details. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Lead Source document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabLedger Health + description: '' + fields: + - name: voucher_type + fieldtype: Data + label: Voucher Type + description: Category or classification of the accounting voucher such as payment, + receipt, journal, or sales + - name: voucher_no + fieldtype: Data + label: Voucher No + description: Unique identifier number assigned to the specific voucher document + for tracking and reference + - name: checked_on + fieldtype: Datetime + label: Checked On + description: Date when ledger health validation was performed, used to find when + accounts were last audited or reconciled. + - name: debit_credit_mismatch + fieldtype: Check + label: Debit-Credit mismatch + description: Indicates whether debits and credits are out of balance, used to + identify accounting errors or unbalanced journal entries. + - name: general_and_payment_ledger_mismatch + fieldtype: Check + label: General and Payment Ledger mismatch + description: Indicates discrepancies between general ledger and payment ledger + totals, used to detect reconciliation issues between payment records and accounting + books. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Ledger Health document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabLedger Health Monitor Company + description: '' + fields: + - name: company + fieldtype: Link + label: Company + description: Company associated with the ledger health monitoring record for multi-entity + financial tracking + join_hint: + table: tabCompany + 'on': company = tabCompany.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabLedger Health + Monitor Company). Comparison-ready across parent records.' +- table: tabLedger Merge + description: '' + fields: + - name: root_type + fieldtype: Select + label: Root Type + description: Classification indicating whether this ledger merge represents an + asset, liability, equity, income, or expense category + options: + - Asset + - Liability + - Income + - Expense + - Equity + - name: account + fieldtype: Link + label: Account + description: Specific general ledger account number or code associated with this + ledger merge entry + join_hint: + table: tabAccount + 'on': account = tabAccount.name + - name: account_name + fieldtype: Data + label: Account Name + description: Name of the general ledger account involved in the transaction, used + when searching for transactions by account type or category. + - name: company + fieldtype: Link + label: Company + description: Company entity associated with the ledger entry, used when filtering + transactions by legal entity or business unit. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: status + fieldtype: Select + label: Status + description: Current state of the ledger entry such as draft, posted, or cancelled, + used when filtering for finalized versus pending transactions. + options: + - Pending + - Success + - Partial Success + - Error + - name: is_group + fieldtype: Check + label: Is Group + description: Indicates whether this ledger entry represents a grouped or consolidated + set of accounts rather than an individual account. + - name: merge_accounts + fieldtype: Table + label: Accounts to Merge + description: '' + child_hint: + child_table: tabLedger Merge Accounts + fieldname: merge_accounts + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: merge_accounts + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Ledger Merge document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabLedger Merge Accounts + description: '' + fields: + - name: account + fieldtype: Link + label: Account + description: Account code or identifier being merged or consolidated into a parent + account + join_hint: + table: tabAccount + 'on': account = tabAccount.name + - name: account_name + fieldtype: Data + label: Account Name + description: Full name of the account being merged, providing readable context + for the account code + - name: merged + fieldtype: Check + label: Merged + description: Indicates whether this ledger account has been merged into another + account and is no longer active for new transactions. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabLedger Merge Accounts). + Comparison-ready across parent records.' +- table: tabLetter Head + description: '' + fields: + - name: letter_head_name + fieldtype: Data + label: Letter Head Name + description: Business name of the letter head used for searching and selecting + letter heads in transactions and reports. + - name: source + fieldtype: Select + label: Letter Head Based On + description: HTML or image source content for the header section, queried when + customizing document headers. + options: + - Image + - HTML + - name: footer_source + fieldtype: Select + label: Footer Based On + description: HTML or image source content for the footer section, queried when + customizing document footers. + options: + - Image + - HTML + - name: disabled + fieldtype: Check + label: Disabled + description: Flag indicating if letter head is inactive, used to filter out unavailable + letter heads from selection lists. + - name: is_default + fieldtype: Check + label: Default Letter Head + description: Flag marking the default letter head for automatic application, used + to identify which letter head applies when none is specified. + - name: image_height + fieldtype: Float + label: Image Height + description: Height dimension of the letter head image in pixels, queried when + adjusting document layout and spacing. + - name: image_width + fieldtype: Float + label: Image Width + description: Width dimension for the letterhead header image used when formatting + printed documents and reports. + - name: align + fieldtype: Select + label: Align + description: Horizontal alignment setting for the letterhead header content when + generating business correspondence. + options: + - Left + - Right + - Center + - name: footer_image_height + fieldtype: Float + label: Image Height + description: Height dimension for the letterhead footer image used when formatting + printed documents. + - name: footer_image_width + fieldtype: Float + label: Image Width + description: Width dimension for the letterhead footer image used when formatting + printed documents. + - name: footer_align + fieldtype: Select + label: Align + description: Horizontal alignment setting for the letterhead footer content when + generating business correspondence. + options: + - Left + - Right + - Center + - name: header_script + fieldtype: Code + label: Header Script + description: Custom script or code executed in the letterhead header section for + dynamic content generation. + - name: footer_script + fieldtype: Code + label: Footer Script + description: Custom script or code executed in the letterhead footer section for + dynamic content generation. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Letter Head document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabLinked Location + description: '' + fields: + - name: location + fieldtype: Link + label: Location + description: The actual location being linked or referenced in this relationship + join_hint: + table: tabLocation + 'on': location = tabLocation.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabLinked Location). + Comparison-ready across parent records.' +- table: tabList Filter + description: '' + fields: + - name: filter_name + fieldtype: Data + label: Filter Name + description: Display name for the saved filter used when selecting filters in + list views. + - name: reference_doctype + fieldtype: Link + label: Reference Document Type + description: Target DocType that this filter applies to when querying records. + join_hint: + table: tabDocType + 'on': reference_doctype = tabDocType.name + - name: for_user + fieldtype: Link + label: For User + description: Specific user this filter is saved for, enabling personalized list + views. + join_hint: + table: tabUser + 'on': for_user = tabUser.name + - name: filters + fieldtype: Long Text + label: Filters + description: JSON string containing the filter conditions and criteria applied + to the list view. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per List Filter document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabList View Settings + description: '' + fields: + - name: disable_count + fieldtype: Check + label: Disable Count + description: Flag indicating whether record count is disabled in the list view, + used when optimizing performance or configuring display preferences. + - name: disable_comment_count + fieldtype: Check + label: Disable Comment Count + description: Flag indicating whether comment count display is disabled, used when + simplifying list views or improving load times. + - name: disable_sidebar_stats + fieldtype: Check + label: Disable Sidebar Stats + description: Flag indicating whether sidebar statistics are hidden, used when + customizing list view layout or reducing visual clutter. + - name: disable_auto_refresh + fieldtype: Check + label: Disable Auto Refresh + description: Flag indicating whether automatic list refresh is turned off, used + when preventing performance issues or controlling data update frequency. + - name: allow_edit + fieldtype: Check + label: Allow Bulk Editing + description: Flag indicating whether inline editing is enabled in the list view, + used when configuring user permissions or editing workflows. + - name: disable_automatic_recency_filters + fieldtype: Check + label: Disable Automatic Recency Filters + description: Flag indicating whether automatic date-based filters are disabled, + used when customizing default filter behavior or showing all historical records. + - name: total_fields + fieldtype: Select + label: Maximum Number of Fields + description: Used when analyzing the number of columns or data points configured + in a list view to assess view complexity or completeness. + options: + - '4' + - '5' + - '6' + - '7' + - '8' + - '9' + - '10' + - name: fields + fieldtype: Code + label: Fields + description: Used when querying which specific columns or attributes are displayed + in a list view configuration for reporting or customization purposes. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per List View Settings document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabLocation + description: '' + fields: + - name: location_name + fieldtype: Data + label: Location Name + description: Full descriptive name of the location, used when searching or filtering + by the complete location title + - name: parent_location + fieldtype: Link + label: Parent Location + description: The higher-level location that contains this location, used for hierarchical + queries about location relationships or organizational structure + join_hint: + table: tabLocation + 'on': parent_location = tabLocation.name + - name: is_container + fieldtype: Check + label: Is Container + description: Indicates whether the location can hold or store other items or materials + within it. + - name: is_group + fieldtype: Check + label: Is Group + description: Indicates whether the location represents a logical grouping of multiple + physical locations rather than a single physical space. + - name: latitude + fieldtype: Float + label: Latitude + description: Geographic coordinate for the location's north-south position, used + when querying location coordinates or mapping warehouse/facility positions. + - name: longitude + fieldtype: Float + label: Longitude + description: Geographic longitude coordinate of the location, used when filtering + or analyzing locations by geographic position or mapping requirements. + - name: area + fieldtype: Float + label: Area + description: Physical size or space measurement of the location, used when filtering + by location capacity or space availability. + - name: area_uom + fieldtype: Link + label: Area UOM + description: Unit of measurement for the area field (e.g., square feet, square + meters), used when interpreting or converting location size values. + join_hint: + table: tabUOM + 'on': area_uom = tabUOM.name + - name: lft + fieldtype: Int + label: lft + description: Left boundary value in nested set model for hierarchical location + queries involving parent-child or ancestor-descendant relationships + - name: rgt + fieldtype: Int + label: rgt + description: Right boundary value in nested set model for hierarchical location + queries involving parent-child or ancestor-descendant relationships + - name: old_parent + fieldtype: Data + label: Old Parent + description: Previous parent location before a location was moved or reparented + in the location hierarchy. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Location document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabLog Setting User + description: '' + fields: + - name: user + fieldtype: Link + label: User + description: Specific user account assigned to receive or access log notifications + and settings. + join_hint: + table: tabUser + 'on': user = tabUser.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabLog Setting User). + Comparison-ready across parent records.' +- table: tabLogs To Clear + description: '' + fields: + - name: ref_doctype + fieldtype: Link + label: Log DocType + description: The specific DocType whose logs will be cleared by this rule. + join_hint: + table: tabDocType + 'on': ref_doctype = tabDocType.name + - name: days + fieldtype: Int + label: Clear Logs After (days) + description: Number of days after which logs of the specified DocType will be + automatically cleared. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabLogs To Clear). + Comparison-ready across parent records.' +- table: tabLost Reason Detail + description: '' + fields: + - name: lost_reason + fieldtype: Link + label: Opportunity Lost Reason + description: Primary category or high-level classification of why an opportunity + or sale was lost + join_hint: + table: tabOpportunity Lost Reason + 'on': lost_reason = tabOpportunity Lost Reason.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabLost Reason Detail). + Comparison-ready across parent records.' +- table: tabLower Deduction Certificate + description: '' + fields: + - name: tax_withholding_category + fieldtype: Link + label: Tax Withholding Category + description: Category of tax for which lower withholding rate applies under this + certificate + join_hint: + table: tabTax Withholding Category + 'on': tax_withholding_category = tabTax Withholding Category.name + - name: fiscal_year + fieldtype: Link + label: Fiscal Year + description: Financial year during which the lower deduction certificate is valid + or applicable + join_hint: + table: tabFiscal Year + 'on': fiscal_year = tabFiscal Year.name + - name: company + fieldtype: Link + label: Company + description: Company entity for which the lower tax deduction certificate is issued + or applicable + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: certificate_no + fieldtype: Data + label: Certificate No + description: Unique certificate number assigned to the lower deduction certificate + by tax authorities + - name: supplier + fieldtype: Link + label: Supplier + description: Vendor or supplier who provided the lower deduction certificate for + reduced TDS withholding + join_hint: + table: tabSupplier + 'on': supplier = tabSupplier.name + - name: pan_no + fieldtype: Data + label: PAN No + description: Permanent Account Number of the entity for which the lower tax deduction + certificate is issued. + - name: valid_from + fieldtype: Date + label: Valid From + description: Start date from which the lower deduction certificate becomes effective. + - name: valid_upto + fieldtype: Date + label: Valid Upto + description: End date until which the lower deduction certificate remains valid. + - name: rate + fieldtype: Percent + label: Rate Of TDS As Per Certificate + description: Tax deduction rate percentage specified in the lower deduction certificate + for reduced TDS withholding + - name: certificate_limit + fieldtype: Currency + label: Certificate Limit + description: Maximum transaction amount or threshold up to which the lower deduction + rate applies under this certificate + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Lower Deduction Certificate document (master/transaction). + Use only for single-entity lookups, not cross-record comparison unless fields + are per-relationship (e.g. supplier, price_list).' +- table: tabLoyalty Point Entry + description: '' + fields: + - name: loyalty_program + fieldtype: Link + label: Loyalty Program + description: The loyalty program under which these points were earned or redeemed + join_hint: + table: tabLoyalty Program + 'on': loyalty_program = tabLoyalty Program.name + - name: loyalty_program_tier + fieldtype: Data + label: Loyalty Program Tier + description: The membership tier level of the customer at the time of this point + transaction + - name: customer + fieldtype: Link + label: Customer + description: Customer who earned or redeemed loyalty points in this transaction. + join_hint: + table: tabCustomer + 'on': customer = tabCustomer.name + - name: invoice_type + fieldtype: Link + label: Invoice Type + description: Type of document that triggered the loyalty point transaction, such + as Sales Invoice or Sales Order. + join_hint: + table: tabDocType + 'on': invoice_type = tabDocType.name + - name: invoice + fieldtype: Dynamic Link + label: Invoice + description: Specific document number or reference that generated this loyalty + point entry. + - name: redeem_against + fieldtype: Link + label: Redeem Against + description: The transaction or invoice document against which loyalty points + are being redeemed or applied. + join_hint: + table: tabLoyalty Point Entry + 'on': redeem_against = tabLoyalty Point Entry.name + - name: loyalty_points + fieldtype: Int + label: Loyalty Points + description: The number of loyalty points earned or redeemed in this transaction + entry. + - name: purchase_amount + fieldtype: Currency + label: Purchase Amount + description: The monetary value of the purchase that triggered the loyalty point + calculation or redemption. + - name: expiry_date + fieldtype: Date + label: Expiry Date + description: Date when loyalty points become invalid and can no longer be redeemed + by the customer. + - name: posting_date + fieldtype: Date + label: Posting Date + description: Date when the loyalty point transaction was recorded in the system. + - name: company + fieldtype: Link + label: Company + description: Company entity that issued or manages the loyalty points. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Loyalty Point Entry document (master/transaction). Use + only for single-entity lookups, not cross-record comparison unless fields are + per-relationship (e.g. supplier, price_list).' +- table: tabLoyalty Point Entry Redemption + description: '' + fields: + - name: sales_invoice + fieldtype: Data + label: Sales Invoice + description: Sales invoice where loyalty points were redeemed for payment or discount + - name: redemption_date + fieldtype: Date + label: Redemption Date + description: Date when loyalty points were redeemed by the customer + - name: redeemed_points + fieldtype: Int + label: Redeemed Points + description: Number of loyalty points deducted from customer balance when redeeming + rewards or benefits. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabLoyalty Point + Entry Redemption). Comparison-ready across parent records.' +- table: tabLoyalty Program + description: '' + fields: + - name: loyalty_program_name + fieldtype: Data + label: Loyalty Program Name + description: Full display name of the loyalty program as shown to customers and + in reports + - name: loyalty_program_type + fieldtype: Select + label: Loyalty Program Type + description: Classification of the loyalty program such as points-based, tier-based, + cashback, or referral + options: + - Single Tier Program + - Multiple Tier Program + - name: from_date + fieldtype: Date + label: From Date + description: Start date when the loyalty program becomes active for customers + to earn or redeem points. + - name: to_date + fieldtype: Date + label: To Date + description: End date when the loyalty program expires and is no longer valid + for transactions. + - name: customer_group + fieldtype: Link + label: Customer Group + description: Specific customer segment or tier eligible to participate in this + loyalty program. + join_hint: + table: tabCustomer Group + 'on': customer_group = tabCustomer Group.name + - name: customer_territory + fieldtype: Link + label: Customer Territory + description: Geographic region or sales territory where the loyalty program customer + is located or assigned. + join_hint: + table: tabTerritory + 'on': customer_territory = tabTerritory.name + - name: auto_opt_in + fieldtype: Check + label: Auto Opt In (For all customers) + description: Whether customers are automatically enrolled in the loyalty program + without explicit consent action. + - name: collection_rules + fieldtype: Table + label: Collection Rules + description: '' + child_hint: + child_table: tabLoyalty Program Collection + fieldname: collection_rules + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: collection_rules + - name: conversion_factor + fieldtype: Float + label: Conversion Factor + description: Ratio used to calculate how many loyalty points are earned or redeemed + per currency unit spent or received. + - name: expiry_duration + fieldtype: Int + label: Expiry Duration (in days) + description: Time period after which earned loyalty points become invalid and + can no longer be redeemed. + - name: expense_account + fieldtype: Link + label: Expense Account + description: General ledger account where loyalty program costs such as point + redemptions or rewards are recorded. + join_hint: + table: tabAccount + 'on': expense_account = tabAccount.name + - name: company + fieldtype: Link + label: Company + description: The company entity that owns or operates this loyalty program. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: cost_center + fieldtype: Link + label: Cost Center + description: The cost center responsible for expenses related to this loyalty + program. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + - name: project + fieldtype: Link + label: Project + description: The project associated with this loyalty program for tracking purposes. + join_hint: + table: tabProject + 'on': project = tabProject.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Loyalty Program document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabLoyalty Program Collection + description: '' + fields: + - name: tier_name + fieldtype: Data + label: Tier Name + description: Name of the specific loyalty tier level within a program such as + Bronze, Silver, Gold, or Platinum + - name: min_spent + fieldtype: Currency + label: Minimum Total Spent + description: Minimum spending amount required for a customer to qualify for or + maintain this loyalty tier + - name: collection_factor + fieldtype: Currency + label: Collection Factor (=1 LP) + description: Multiplier or percentage rate applied to transactions or purchases + to determine loyalty points earned in this program collection. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabLoyalty Program + Collection). Comparison-ready across parent records.' +- table: tabMaintenance Schedule + description: '' + fields: + - name: naming_series + fieldtype: Select + label: Series + description: Prefix pattern used to generate the maintenance schedule name + options: + - MAT-MSH-.YYYY.- + - name: customer + fieldtype: Link + label: Customer + description: Customer for whom the maintenance schedule is created + join_hint: + table: tabCustomer + 'on': customer = tabCustomer.name + - name: status + fieldtype: Select + label: Status + description: Current state of the maintenance schedule such as planned, in progress, + completed, or cancelled. + options: + - Draft + - Submitted + - Cancelled + - name: transaction_date + fieldtype: Date + label: Transaction Date + description: Date when the maintenance schedule record was created or last modified + in the system. + - name: items + fieldtype: Table + label: Items + description: '' + child_hint: + child_table: tabMaintenance Schedule Item + fieldname: items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: items + - name: schedules + fieldtype: Table + label: Schedules + description: '' + child_hint: + child_table: tabMaintenance Schedule Detail + fieldname: schedules + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: schedules + - name: customer_name + fieldtype: Data + label: Customer Name + description: Name of the customer or company receiving the scheduled maintenance + service + - name: contact_person + fieldtype: Link + label: Contact Person + description: Individual at the customer location who coordinates or approves maintenance + visits + join_hint: + table: tabContact + 'on': contact_person = tabContact.name + - name: contact_mobile + fieldtype: Data + label: Mobile No + description: Mobile phone number of the person responsible for or associated with + this maintenance schedule. + - name: contact_email + fieldtype: Data + label: Contact Email + description: Email address of the person responsible for or associated with this + maintenance schedule. + - name: contact_display + fieldtype: Small Text + label: Contact + description: Full name or display label of the person responsible for or associated + with this maintenance schedule. + - name: customer_address + fieldtype: Link + label: Customer Address + description: Specific address record linked to the customer where maintenance + is performed or equipment is located. + join_hint: + table: tabAddress + 'on': customer_address = tabAddress.name + - name: address_display + fieldtype: Small Text + label: Address + description: Formatted full address text for displaying the maintenance location + to users. + - name: territory + fieldtype: Link + label: Territory + description: Sales or service territory assigned to the maintenance schedule for + routing and assignment purposes. + join_hint: + table: tabTerritory + 'on': territory = tabTerritory.name + - name: customer_group + fieldtype: Link + label: Customer Group + description: Customer segment or category this maintenance schedule applies to, + used when filtering schedules by customer type or classification. + join_hint: + table: tabCustomer Group + 'on': customer_group = tabCustomer Group.name + - name: company + fieldtype: Link + label: Company + description: Legal entity or business unit that owns or manages this maintenance + schedule. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: amended_from + fieldtype: Link + label: Amended From + description: Reference to the previous version of this maintenance schedule if + it was modified or corrected after creation. + join_hint: + table: tabMaintenance Schedule + 'on': amended_from = tabMaintenance Schedule.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Maintenance Schedule document (master/transaction). Use + only for single-entity lookups, not cross-record comparison unless fields are + per-relationship (e.g. supplier, price_list).' +- table: tabMaintenance Schedule Detail + description: '' + fields: + - name: item_code + fieldtype: Link + label: Item Code + description: Code of the item or asset requiring maintenance in this schedule + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: item_name + fieldtype: Data + label: Item Name + description: Descriptive name of the item or asset requiring maintenance in this + schedule + - name: scheduled_date + fieldtype: Date + label: Scheduled Date + description: When maintenance was originally planned to occur, used to track planned + timing versus actual execution. + - name: actual_date + fieldtype: Date + label: Actual Date + description: When maintenance was actually performed, used to measure delays or + early completion against the schedule. + - name: sales_person + fieldtype: Link + label: Sales Person + description: The salesperson associated with this maintenance activity, used to + track service ownership or commission eligibility. + join_hint: + table: tabSales Person + 'on': sales_person = tabSales Person.name + - name: completion_status + fieldtype: Select + label: Completion Status + description: Current state of the maintenance task indicating whether it is pending, + in progress, completed, or cancelled. + options: + - Pending + - Partially Completed + - Fully Completed + - name: serial_no + fieldtype: Small Text + label: Serial No + description: Sequence number identifying the order or position of this maintenance + task within the schedule. + - name: item_reference + fieldtype: Link + label: Item Reference + description: Identifier linking to the specific equipment, asset, or item being + maintained in this scheduled task. + join_hint: + table: tabMaintenance Schedule Item + 'on': item_reference = tabMaintenance Schedule Item.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabMaintenance Schedule + Detail). Comparison-ready across parent records.' +- table: tabMaintenance Schedule Item + description: '' + fields: + - name: item_code + fieldtype: Link + label: Item Code + description: SKU or product code of the physical item being maintained + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: item_name + fieldtype: Data + label: Item Name + description: Human-readable product name of the physical item being maintained + - name: description + fieldtype: Text Editor + label: Description + description: Details what maintenance task or activity is scheduled to be performed + on equipment or assets. + - name: start_date + fieldtype: Date + label: Start Date + description: When the scheduled maintenance activity is planned to begin. + - name: end_date + fieldtype: Date + label: End Date + description: When the scheduled maintenance activity is planned to be completed + or conclude. + - name: periodicity + fieldtype: Select + label: Periodicity + description: Frequency or interval at which maintenance visits are scheduled, + such as weekly, monthly, quarterly, or annually. + options: + - Weekly + - Monthly + - Quarterly + - Half Yearly + - Yearly + - Random + - name: no_of_visits + fieldtype: Int + label: No of Visits + description: Total number of maintenance visits planned or required for this schedule + item. + - name: sales_person + fieldtype: Link + label: Sales Person + description: Sales representative responsible for the maintenance contract or + schedule. + join_hint: + table: tabSales Person + 'on': sales_person = tabSales Person.name + - name: serial_no + fieldtype: Small Text + label: Serial No + description: Unique identifier of the specific equipment or asset being maintained + under this schedule. + - name: sales_order + fieldtype: Link + label: Sales Order + description: Original sales order that delivered the equipment or asset requiring + scheduled maintenance. + join_hint: + table: tabSales Order + 'on': sales_order = tabSales Order.name + - name: serial_and_batch_bundle + fieldtype: Link + label: Serial and Batch Bundle + description: Groups multiple serial numbers or batch numbers together for bulk + maintenance scheduling. + join_hint: + table: tabSerial and Batch Bundle + 'on': serial_and_batch_bundle = tabSerial and Batch Bundle.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabMaintenance Schedule + Item). Comparison-ready across parent records.' +- table: tabMaintenance Team Member + description: '' + fields: + - name: team_member + fieldtype: Link + label: Team Member + description: Reference to the user or employee assigned as a maintenance team + member + join_hint: + table: tabUser + 'on': team_member = tabUser.name + - name: full_name + fieldtype: Data + label: Full Name + description: Complete name of the maintenance team member for display and search + purposes + - name: maintenance_role + fieldtype: Link + label: Maintenance Role + description: Role or job function of the team member in maintenance operations, + such as technician, supervisor, or engineer. + join_hint: + table: tabRole + 'on': maintenance_role = tabRole.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabMaintenance Team + Member). Comparison-ready across parent records.' +- table: tabMaintenance Visit + description: '' + fields: + - name: naming_series + fieldtype: Select + label: Series + description: Prefix pattern used to auto-generate the maintenance visit name + options: + - MAT-MVS-.YYYY.- + - name: customer + fieldtype: Link + label: Customer + description: Customer who requested or is receiving the maintenance service + join_hint: + table: tabCustomer + 'on': customer = tabCustomer.name + - name: customer_name + fieldtype: Data + label: Customer Name + description: Customer who requested or is receiving the maintenance visit service. + - name: address_display + fieldtype: Small Text + label: Address + description: Physical location where the maintenance visit is performed or scheduled. + - name: contact_display + fieldtype: Small Text + label: Contact + description: Person to reach regarding this maintenance visit for coordination + or communication. + - name: contact_mobile + fieldtype: Data + label: Mobile No + description: Mobile phone number of the person to contact regarding this maintenance + visit for scheduling or urgent communication. + - name: contact_email + fieldtype: Data + label: Contact Email + description: Email address of the person to contact regarding this maintenance + visit for confirmations and documentation. + - name: maintenance_schedule + fieldtype: Link + label: Maintenance Schedule + description: Planned date and time or recurrence pattern for when the maintenance + visit is scheduled to occur. + join_hint: + table: tabMaintenance Schedule + 'on': maintenance_schedule = tabMaintenance Schedule.name + - name: maintenance_schedule_detail + fieldtype: Link + label: Maintenance Schedule Detail + description: Links to the planned maintenance schedule entry that this visit fulfills + or executes. + join_hint: + table: tabMaintenance Schedule Detail + 'on': maintenance_schedule_detail = tabMaintenance Schedule Detail.name + - name: mntc_date + fieldtype: Date + label: Maintenance Date + description: The calendar date when the maintenance visit occurred or is scheduled + to occur. + - name: mntc_time + fieldtype: Time + label: Maintenance Time + description: The time of day when the maintenance visit occurred or is scheduled + to occur. + - name: completion_status + fieldtype: Select + label: Completion Status + description: Current state of the maintenance visit indicating whether it is scheduled, + in progress, completed, or cancelled. + options: + - Partially Completed + - Fully Completed + - name: maintenance_type + fieldtype: Select + label: Maintenance Type + description: Category of maintenance work performed such as preventive, corrective, + emergency, or routine inspection. + options: + - Scheduled + - Unscheduled + - Breakdown + - name: purposes + fieldtype: Table + label: Purposes + description: '' + child_hint: + child_table: tabMaintenance Visit Purpose + fieldname: purposes + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: purposes + - name: customer_feedback + fieldtype: Small Text + label: Customer Feedback + description: Customer comments or satisfaction ratings provided after the maintenance + visit was completed. + - name: status + fieldtype: Select + label: Status + description: Current stage of the maintenance visit such as scheduled, in progress, + completed, or cancelled. + options: + - Draft + - Cancelled + - Submitted + - name: amended_from + fieldtype: Link + label: Amended From + description: Reference to the original maintenance visit record that this visit + was created from as a correction or modification. + join_hint: + table: tabMaintenance Visit + 'on': amended_from = tabMaintenance Visit.name + - name: company + fieldtype: Link + label: Company + description: Company that owns or is responsible for the maintenance visit record. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: customer_address + fieldtype: Link + label: Customer Address + description: Physical location where the maintenance visit is scheduled or was + performed. + join_hint: + table: tabAddress + 'on': customer_address = tabAddress.name + - name: contact_person + fieldtype: Link + label: Contact Person + description: Individual at the customer site who can be reached regarding the + maintenance visit. + join_hint: + table: tabContact + 'on': contact_person = tabContact.name + - name: territory + fieldtype: Link + label: Territory + description: Geographic sales region or area assigned to the maintenance visit + for routing and regional analysis. + join_hint: + table: tabTerritory + 'on': territory = tabTerritory.name + - name: customer_group + fieldtype: Link + label: Customer Group + description: Customer classification or segment for the maintenance visit used + to filter by customer type or category. + join_hint: + table: tabCustomer Group + 'on': customer_group = tabCustomer Group.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Maintenance Visit document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabMaintenance Visit Purpose + description: '' + fields: + - name: item_code + fieldtype: Link + label: Item Code + description: Code linking this maintenance visit purpose to a specific inventory + item or service item being maintained + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: item_name + fieldtype: Data + label: Item Name + description: Name of the inventory item or service item associated with this maintenance + visit purpose + - name: service_person + fieldtype: Link + label: Sales Person + description: Technician or employee assigned to perform the maintenance visit + join_hint: + table: tabSales Person + 'on': service_person = tabSales Person.name + - name: serial_no + fieldtype: Link + label: Serial No + description: Unique identifier for the specific maintenance visit purpose record + join_hint: + table: tabSerial No + 'on': serial_no = tabSerial No.name + - name: description + fieldtype: Text Editor + label: Description + description: Reason or objective for the maintenance visit such as repair, inspection, + or preventive maintenance + - name: work_done + fieldtype: Small Text + label: Work Done + description: Description of maintenance tasks or repairs performed during the + visit. + - name: prevdoc_doctype + fieldtype: Link + label: Document Type + description: Type of the originating document that triggered or is linked to this + maintenance visit. + join_hint: + table: tabDocType + 'on': prevdoc_doctype = tabDocType.name + - name: prevdoc_docname + fieldtype: Dynamic Link + label: Against Document No + description: Identifier of the specific originating document that triggered or + is linked to this maintenance visit. + - name: maintenance_schedule_detail + fieldtype: Data + label: Maintenance Schedule Detail + description: Specific details or notes about what maintenance activities are planned + or performed during this visit. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabMaintenance Visit + Purpose). Comparison-ready across parent records.' +- table: tabManufacturer + description: Manufacturers used in Items + fields: + - name: short_name + fieldtype: Data + label: Short Name + description: Abbreviated manufacturer name for compact displays and quick identification. + - name: full_name + fieldtype: Data + label: Full Name + description: Complete legal or official manufacturer name including corporate + designations and full entity details. + - name: website + fieldtype: Data + label: Website + description: Manufacturer's official website URL for contact or product information + lookup + - name: country + fieldtype: Link + label: Country + description: Country where the manufacturer is headquartered or primarily operates + join_hint: + table: tabCountry + 'on': country = tabCountry.name + - name: notes + fieldtype: Small Text + label: Notes + description: Additional free-text information about the manufacturer such as certifications, + partnerships, or special terms + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Manufacturer document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabMarket Segment + description: '' + fields: + - name: market_segment + fieldtype: Data + label: Market Segment + description: Unique identifier code for the market segment used when joining to + other tables or searching by segment ID rather than name + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Market Segment document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabMarketing Campaign + description: '' + fields: + - name: campaign_description + fieldtype: Small Text + label: Campaign Description (Optional) + description: Detailed explanation of campaign objectives and strategy, used when + searching for campaigns by purpose or content. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Marketing Campaign document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabMaterial Request + description: '' + fields: + - name: naming_series + fieldtype: Select + label: Series + description: Prefix pattern that determines how material request IDs are auto-generated, + relevant when users ask about numbering schemes or request naming conventions + options: + - MAT-MR-.YYYY.- + - name: title + fieldtype: Data + label: Title + description: Descriptive label or summary of the material request purpose, used + when searching by subject or brief description rather than ID + - name: material_request_type + fieldtype: Select + label: Purpose + description: Type of material request such as Purchase, Material Transfer, Material + Issue, or Manufacture indicating the intended fulfillment method. + options: + - Purchase + - Material Transfer + - Material Issue + - Manufacture + - Customer Provided + - name: customer + fieldtype: Link + label: Customer + description: Customer for whom materials are being requested when the request + is customer-specific or linked to a sales order. + join_hint: + table: tabCustomer + 'on': customer = tabCustomer.name + - name: company + fieldtype: Link + label: Company + description: Company entity that owns and is requesting the materials for its + operations or projects. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: transaction_date + fieldtype: Date + label: Transaction Date + description: Date when the material request was created or submitted for processing. + - name: schedule_date + fieldtype: Date + label: Required By + description: Target date by which the requested materials are needed or expected + to be delivered. + - name: buying_price_list + fieldtype: Link + label: Price List + description: Price list used to estimate or evaluate costs when purchasing the + requested materials from suppliers. + join_hint: + table: tabPrice List + 'on': buying_price_list = tabPrice List.name + - name: amended_from + fieldtype: Link + label: Amended From + description: Links to the original material request that was amended or corrected + by this document. + join_hint: + table: tabMaterial Request + 'on': amended_from = tabMaterial Request.name + - name: scan_barcode + fieldtype: Data + label: Scan Barcode + description: Barcode value scanned to quickly add items to the material request. + - name: last_scanned_warehouse + fieldtype: Data + label: Last Scanned Warehouse + description: Warehouse automatically populated when a barcode is scanned for item + selection. + - name: set_from_warehouse + fieldtype: Link + label: Set Source Warehouse + description: Source warehouse from which materials will be transferred when fulfilling + this material request. + join_hint: + table: tabWarehouse + 'on': set_from_warehouse = tabWarehouse.name + - name: set_warehouse + fieldtype: Link + label: Set Target Warehouse + description: Default target warehouse where requested materials should be delivered + or stored. + join_hint: + table: tabWarehouse + 'on': set_warehouse = tabWarehouse.name + - name: items + fieldtype: Table + label: Items + description: '' + child_hint: + child_table: tabMaterial Request Item + fieldname: items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: items + - name: tc_name + fieldtype: Link + label: Terms + description: Terms and conditions template applied to this material request for + supplier agreements or procurement policies + join_hint: + table: tabTerms and Conditions + 'on': tc_name = tabTerms and Conditions.name + - name: terms + fieldtype: Text Editor + label: Terms and Conditions Content + description: Specific terms and conditions text or clauses governing this material + request's fulfillment + - name: status + fieldtype: Select + label: Status + description: Current approval or fulfillment status of the material request such + as draft, pending, approved, or completed + options: + - Draft + - Submitted + - Stopped + - Cancelled + - Pending + - Partially Ordered + - Partially Received + - Ordered + - Issued + - Transferred + - Received + - name: per_ordered + fieldtype: Percent + label: '% Ordered' + description: Percentage of requested material quantity that has been converted + to purchase orders or manufacturing orders. + - name: transfer_status + fieldtype: Select + label: Transfer Status + description: Status of inter-warehouse or inter-branch material transfer fulfillment + for this request. + options: + - Not Started + - In Transit + - Completed + - name: per_received + fieldtype: Percent + label: '% Received' + description: Percentage of requested material quantity that has been physically + received into inventory. + - name: letter_head + fieldtype: Link + label: Letter Head + description: Letterhead template used when printing or emailing the material request + document. + join_hint: + table: tabLetter Head + 'on': letter_head = tabLetter Head.name + - name: select_print_heading + fieldtype: Link + label: Print Heading + description: Custom heading that appears on the printed material request instead + of the default title. + join_hint: + table: tabPrint Heading + 'on': select_print_heading = tabPrint Heading.name + - name: job_card + fieldtype: Link + label: Job Card + description: Links this material request to a specific job card for production + or work order tracking. + join_hint: + table: tabJob Card + 'on': job_card = tabJob Card.name + - name: work_order + fieldtype: Link + label: Work Order + description: Links the material request to a specific manufacturing work order + that requires these materials for production. + join_hint: + table: tabWork Order + 'on': work_order = tabWork Order.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Material Request document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabMaterial Request Item + description: '' + fields: + - name: item_code + fieldtype: Link + label: Item Code + description: SKU or product code of the requested material + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: item_name + fieldtype: Data + label: Item Name + description: Human-readable product name or description of the requested material + - name: schedule_date + fieldtype: Date + label: Required By + description: Date when the requested material is needed or expected to be delivered + to fulfill the requirement. + - name: description + fieldtype: Text Editor + label: Description + description: Detailed text explaining the specific material item being requested, + including specifications or additional context. + - name: item_group + fieldtype: Link + label: Item Group + description: Category or classification grouping that the requested material belongs + to for organizational or reporting purposes. + join_hint: + table: tabItem Group + 'on': item_group = tabItem Group.name + - name: brand + fieldtype: Link + label: Brand + description: Brand or manufacturer of the requested material item, used when filtering + or searching material requests by specific brands. + join_hint: + table: tabBrand + 'on': brand = tabBrand.name + - name: qty + fieldtype: Float + label: Quantity + description: Quantity of material being requested in this line item, used to analyze + request volumes or check amounts needed. + - name: stock_uom + fieldtype: Link + label: Stock UOM + description: Unit of measurement for the requested quantity (e.g., pieces, kg, + liters), used to understand or filter by measurement units in material requests. + join_hint: + table: tabUOM + 'on': stock_uom = tabUOM.name + - name: from_warehouse + fieldtype: Link + label: Source Warehouse + description: Source warehouse from which material should be transferred to fulfill + this material request item. + join_hint: + table: tabWarehouse + 'on': from_warehouse = tabWarehouse.name + - name: warehouse + fieldtype: Link + label: Target Warehouse + description: Target warehouse where the requested material is needed or should + be delivered. + join_hint: + table: tabWarehouse + 'on': warehouse = tabWarehouse.name + - name: uom + fieldtype: Link + label: UOM + description: Unit of measurement for the requested material quantity in this item. + join_hint: + table: tabUOM + 'on': uom = tabUOM.name + - name: conversion_factor + fieldtype: Float + label: UOM Conversion Factor + description: Factor used to convert between the requested UOM and stock UOM for + quantity calculations. + - name: stock_qty + fieldtype: Float + label: Stock Qty + description: Quantity of the item expressed in the stock/inventory UOM after applying + conversion factor. + - name: min_order_qty + fieldtype: Float + label: Min Order Qty + description: Minimum quantity that must be ordered or requested for this item. + - name: projected_qty + fieldtype: Float + label: Projected Qty + description: Forecasted future quantity of the item accounting for planned receipts + and issues, used when asking about expected availability or future stock levels. + - name: actual_qty + fieldtype: Float + label: Actual Qty + description: Current physical quantity of the item available in stock right now, + used when asking about present inventory levels or what's on hand. + - name: ordered_qty + fieldtype: Float + label: Completed Qty + description: Quantity of the item that has been ordered through purchase orders + but not yet received, used when asking about pending incoming stock or outstanding + orders. + - name: received_qty + fieldtype: Float + label: Received Qty + description: Quantity of the material request item that has been physically received + into inventory against this request. + - name: rate + fieldtype: Currency + label: Rate + description: Actual transaction price per unit for this material request item + after applying discounts or adjustments. + - name: price_list_rate + fieldtype: Currency + label: Price List Rate + description: Standard catalog or list price per unit before any discounts or negotiations + are applied. + - name: amount + fieldtype: Currency + label: Amount + description: Total monetary value of the material request item, used when analyzing + costs or budgets for requested materials. + - name: expense_account + fieldtype: Link + label: Expense Account + description: General ledger account to which the cost of this material request + item will be charged, used when tracking departmental or project expenses. + join_hint: + table: tabAccount + 'on': expense_account = tabAccount.name + - name: wip_composite_asset + fieldtype: Link + label: WIP Composite Asset + description: Work-in-progress composite asset that this material request item + is associated with, used when tracking materials for multi-component asset construction + or assembly projects. + join_hint: + table: tabAsset + 'on': wip_composite_asset = tabAsset.name + - name: manufacturer + fieldtype: Link + label: Manufacturer + description: The company that manufactures the requested material item, used when + specifying or filtering by brand or supplier origin. + join_hint: + table: tabManufacturer + 'on': manufacturer = tabManufacturer.name + - name: manufacturer_part_no + fieldtype: Data + label: Manufacturer Part Number + description: The manufacturer's specific part number for the requested item, used + to identify exact components by vendor catalog reference. + - name: bom_no + fieldtype: Link + label: BOM No + description: The bill of materials number associated with this material request + item, used to link requests to specific production or assembly structures. + join_hint: + table: tabBOM + 'on': bom_no = tabBOM.name + - name: project + fieldtype: Link + label: Project + description: Project associated with the material request item for tracking project-specific + material needs and costs. + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: cost_center + fieldtype: Link + label: Cost Center + description: Cost center to which the material request item expense will be allocated + for budgeting and financial tracking. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + - name: lead_time_date + fieldtype: Date + label: Lead Time Date + description: Expected date when the requested material will be available or delivered + based on supplier lead time. + - name: sales_order + fieldtype: Link + label: Sales Order + description: Links this material request item to the originating sales order when + materials are being procured or manufactured to fulfill a specific customer + order. + join_hint: + table: tabSales Order + 'on': sales_order = tabSales Order.name + - name: sales_order_item + fieldtype: Data + label: Sales Order Item + description: Links to the specific line item in the sales order that triggered + this material request, enabling traceability from customer order line to material + procurement. + - name: production_plan + fieldtype: Link + label: Production Plan + description: Links this material request to a production plan when materials are + being requested as part of planned manufacturing operations rather than direct + sales orders. + join_hint: + table: tabProduction Plan + 'on': production_plan = tabProduction Plan.name + - name: material_request_plan_item + fieldtype: Data + label: Material Request Plan Item + description: Links this material request item to a specific material request plan + item when the request originates from production planning. + - name: job_card_item + fieldtype: Data + label: Job Card Item + description: Links this material request item to a specific job card item when + materials are requested for a manufacturing job. + - name: page_break + fieldtype: Check + label: Page Break + description: Controls whether a page break appears before this item when printing + the material request document. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabMaterial Request + Item). Comparison-ready across parent records.' +- table: tabMaterial Request Plan Item + description: '' + fields: + - name: item_code + fieldtype: Link + label: Item Code + description: Product or material being requested in this plan item + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: from_warehouse + fieldtype: Link + label: From Warehouse + description: Source warehouse from which the material will be transferred or issued + join_hint: + table: tabWarehouse + 'on': from_warehouse = tabWarehouse.name + - name: warehouse + fieldtype: Link + label: For Warehouse + description: Target warehouse where the requested material will be stored or delivered + to. + join_hint: + table: tabWarehouse + 'on': warehouse = tabWarehouse.name + - name: item_name + fieldtype: Data + label: Item Name + description: Full descriptive name of the product or material being requested, + used when searching by item description rather than code. + - name: material_request_type + fieldtype: Select + label: Type + description: Type of material request such as Purchase, Material Transfer, or + Material Issue, indicating how the material will be procured or moved. + options: + - Purchase + - Material Transfer + - Material Issue + - Manufacture + - Customer Provided + - name: quantity + fieldtype: Float + label: Plan to Request Qty + description: Material quantity planned to be requested for production or procurement + in this plan item. + - name: required_bom_qty + fieldtype: Float + label: Qty As Per BOM + description: Quantity of this material required according to the bill of materials + calculation for the planned production. + - name: schedule_date + fieldtype: Date + label: Required By + description: Target date when the material is needed or should be available for + production or fulfillment. + - name: uom + fieldtype: Link + label: UOM + description: Unit of measurement for the material request plan item quantity. + join_hint: + table: tabUOM + 'on': uom = tabUOM.name + - name: conversion_factor + fieldtype: Float + label: Conversion Factor + description: Factor to convert between the material request plan item UOM and + the base stock UOM. + - name: description + fieldtype: Text Editor + label: Description + description: Detailed text describing the material request plan item specifications + or requirements. + - name: min_order_qty + fieldtype: Float + label: Minimum Order Quantity + description: Minimum quantity that must be ordered for this material item in the + request plan. + - name: sales_order + fieldtype: Link + label: Sales Order + description: Sales order linked to this material request plan item, used when + planning materials for specific customer orders. + join_hint: + table: tabSales Order + 'on': sales_order = tabSales Order.name + - name: actual_qty + fieldtype: Float + label: Qty In Stock + description: Current available quantity of the material in inventory at the time + of planning. + - name: requested_qty + fieldtype: Float + label: Requested Qty + description: Quantity of material requested in the plan, used when asking about + total material requirements or demand. + - name: reserved_qty_for_production + fieldtype: Float + label: Reserved Qty for Production + description: Quantity already reserved or allocated for production orders, used + when checking material availability or committed stock. + - name: ordered_qty + fieldtype: Float + label: Ordered Qty + description: Quantity already ordered from suppliers or in purchase orders, used + when verifying procurement status or pending receipts. + - name: projected_qty + fieldtype: Float + label: Projected Qty + description: Forecasted inventory quantity available after accounting for planned + receipts and demands for this material. + - name: safety_stock + fieldtype: Float + label: Safety Stock + description: Minimum buffer inventory level maintained to prevent stockouts and + ensure continuous availability. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabMaterial Request + Plan Item). Comparison-ready across parent records.' +- table: tabMilestone + description: '' + fields: + - name: reference_type + fieldtype: Link + label: Document Type + description: Type of document this milestone tracks (e.g., Task, Issue), used + when analyzing milestone categories. + join_hint: + table: tabDocType + 'on': reference_type = tabDocType.name + - name: reference_name + fieldtype: Data + label: Document + description: Specific document being tracked by this milestone, used to link milestones + to their tracked entities. + - name: track_field + fieldtype: Data + label: Track Field + description: Field name being monitored for milestone completion, used when analyzing + what triggers milestone achievement. + - name: value + fieldtype: Data + label: Value + description: Target or actual value of the tracked field, used when measuring + milestone completion criteria. + - name: milestone_tracker + fieldtype: Link + label: Milestone Tracker + description: Reference to the milestone tracking configuration, used to group + milestones by tracking template. + join_hint: + table: tabMilestone Tracker + 'on': milestone_tracker = tabMilestone Tracker.name + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Milestone document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabMilestone Tracker + description: '' + fields: + - name: document_type + fieldtype: Link + label: Document Type to Track + description: Type of document being tracked for milestones, used to filter trackers + by business entity. + join_hint: + table: tabDocType + 'on': document_type = tabDocType.name + - name: track_field + fieldtype: Select + label: Field to Track + description: Specific field being monitored for milestone changes, used to identify + what data triggers milestone updates. + - name: disabled + fieldtype: Check + label: Disabled + description: Indicates if this milestone tracker is active or inactive, used to + filter out deactivated tracking rules. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Milestone Tracker document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabMode of Payment + description: '' + fields: + - name: mode_of_payment + fieldtype: Data + label: Mode of Payment + description: Identifies the payment method (cash, credit card, bank transfer, + etc.) used for filtering transactions and analyzing payment preferences. + - name: enabled + fieldtype: Check + label: Enabled + description: Indicates whether this payment mode is currently active and available + for selection in transactions. + - name: type + fieldtype: Select + label: Type + description: Cash, bank, credit card, or other payment method category + options: + - Cash + - Bank + - General + - Phone + - name: accounts + fieldtype: Table + label: Accounts + description: '' + child_hint: + child_table: tabMode of Payment Account + fieldname: accounts + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: accounts + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Mode of Payment document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabMode of Payment Account + description: '' + fields: + - name: company + fieldtype: Link + label: Company + description: Company entity to which this mode of payment account configuration + belongs + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: default_account + fieldtype: Link + label: Default Account + description: General ledger account used by default when processing transactions + with this payment mode + join_hint: + table: tabAccount + 'on': default_account = tabAccount.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabMode of Payment + Account). Comparison-ready across parent records.' +- table: tabModule Def + description: '' + fields: + - name: module_name + fieldtype: Data + label: Module Name + description: Business name of the module (e.g., Sales, Accounting), used when + searching for functionality by business domain. + - name: custom + fieldtype: Check + label: Custom + description: Flag indicating if module is custom-built vs standard, used to distinguish + client-specific customizations from base system modules. + - name: package + fieldtype: Link + label: Package + description: Software package containing this module, used to group modules by + deployment package or installation bundle. + join_hint: + table: tabPackage + 'on': package = tabPackage.name + - name: app_name + fieldtype: Select + label: App Name + description: Application name containing this module, used to filter modules by + installed apps or identify module source. + - name: restrict_to_domain + fieldtype: Link + label: Restrict To Domain + description: Domain restriction for module visibility, used to limit module access + based on business domain or industry vertical. + join_hint: + table: tabDomain + 'on': restrict_to_domain = tabDomain.name + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Module Def document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabModule Onboarding + description: '' + fields: + - name: title + fieldtype: Data + label: Title + description: Display name shown to users during the module onboarding process. + - name: subtitle + fieldtype: Data + label: Subtitle + description: Additional descriptive text providing context for the onboarding + step. + - name: module + fieldtype: Link + label: Module + description: ERP module this onboarding belongs to, used to filter onboarding + by functional area. + join_hint: + table: tabModule Def + 'on': module = tabModule Def.name + - name: allow_roles + fieldtype: Table MultiSelect + label: Allow Roles + description: Roles permitted to view or complete this onboarding, used for access + control queries. + child_hint: + child_table: tabOnboarding Permission + fieldname: allow_roles + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: allow_roles + - name: success_message + fieldtype: Data + label: Success Message + description: Message displayed to users upon successful completion of the onboarding. + - name: documentation_url + fieldtype: Data + label: Documentation URL + description: Link to external help documentation for this onboarding step. + - name: is_complete + fieldtype: Check + label: Is Complete + description: Used to filter or identify whether an employee has finished their + entire onboarding process. + - name: steps + fieldtype: Table + label: Steps + description: '' + child_hint: + child_table: tabOnboarding Step Map + fieldname: steps + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: steps + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Module Onboarding document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabModule Profile + description: '' + fields: + - name: module_profile_name + fieldtype: Data + label: Module Profile Name + description: Display name of the module profile used to group and control module + access. + - name: block_modules + fieldtype: Table + label: Block Modules + description: '' + child_hint: + child_table: tabBlock Module + fieldname: block_modules + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: block_modules + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Module Profile document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabMonthly Distribution + description: Helps you distribute the Budget/Target across months if you have seasonality + in your business. + fields: + - name: distribution_id + fieldtype: Data + label: Distribution Name + description: Used to uniquely identify and join specific monthly distribution + transactions across related tables. + - name: fiscal_year + fieldtype: Link + label: Fiscal Year + description: Used to filter or group monthly distributions by the accounting year + for period-over-period analysis and fiscal reporting. + join_hint: + table: tabFiscal Year + 'on': fiscal_year = tabFiscal Year.name + - name: percentages + fieldtype: Table + label: Monthly Distribution Percentages + description: '' + child_hint: + child_table: tabMonthly Distribution Percentage + fieldname: percentages + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: percentages + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Monthly Distribution document (master/transaction). Use + only for single-entity lookups, not cross-record comparison unless fields are + per-relationship (e.g. supplier, price_list).' +- table: tabMonthly Distribution Percentage + description: '' + fields: + - name: month + fieldtype: Data + label: Month + description: specific month for which the distribution percentage applies + - name: percentage_allocation + fieldtype: Float + label: Percentage Allocation + description: percentage value allocated or distributed for the corresponding month + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabMonthly Distribution + Percentage). Comparison-ready across parent records.' +- table: tabNavbar Item + description: '' + fields: + - name: item_label + fieldtype: Data + label: Item Label + description: Display text shown to users for this navbar menu item. + - name: item_type + fieldtype: Select + label: Item Type + description: Type of navbar element such as link, dropdown, or separator. + options: + - Route + - Action + - Separator + - name: route + fieldtype: Data + label: Route + description: URL path or route this navbar item navigates to when clicked. + - name: action + fieldtype: Data + label: Action + description: JavaScript action or function triggered when this navbar item is + selected. + - name: hidden + fieldtype: Check + label: Hidden + description: Visibility flag indicating if this navbar item should be hidden from + users. + - name: is_standard + fieldtype: Check + label: Is Standard + description: System flag indicating if this is a default navbar item that cannot + be deleted. + - name: condition + fieldtype: Code + label: Condition + description: Specifies the visibility or access rule that determines when this + navbar item appears or is enabled for users based on roles, permissions, or + system state. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabNavbar Item). + Comparison-ready across parent records.' +- table: tabNetwork Printer Settings + description: '' + fields: + - name: server_ip + fieldtype: Data + label: Server IP + description: IP address of the print server used to route print jobs to this network + printer. + - name: port + fieldtype: Int + label: Port + description: Network port number on the print server for communicating with this + printer. + - name: printer_name + fieldtype: Select + label: Printer Name + description: Name or identifier of the physical network printer for print job + routing. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Network Printer Settings document (master/transaction). + Use only for single-entity lookups, not cross-record comparison unless fields + are per-relationship (e.g. supplier, price_list).' +- table: tabNewsletter + description: '' + fields: + - name: email_sent_at + fieldtype: Datetime + label: Email Sent At + description: Timestamp when newsletter emails were dispatched, used when analyzing + send times or filtering by delivery date. + - name: total_recipients + fieldtype: Int + label: Total Recipients + description: Count of recipients who received the newsletter, used when measuring + campaign reach or analyzing audience size. + - name: total_views + fieldtype: Int + label: Total Views + description: Number of times newsletter was opened or viewed, used when calculating + engagement rates and campaign performance. + - name: email_sent + fieldtype: Check + label: Email Sent + description: Boolean flag indicating if newsletter has been sent, used when filtering + between draft and sent campaigns. + - name: sender_name + fieldtype: Data + label: Sender Name + description: Display name shown as email sender, used when filtering campaigns + by sender or analyzing sender performance. + - name: sender_email + fieldtype: Data + label: Sender Email + description: Email address used as sender, used when tracking campaigns by sending + account or validating sender identity. + - name: send_from + fieldtype: Data + label: Sender + description: Email address used as sender when filtering or analyzing which account + sent newsletters. + - name: email_group + fieldtype: Table + label: Audience + description: '' + child_hint: + child_table: tabNewsletter Email Group + fieldname: email_group + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: email_group + - name: subject + fieldtype: Small Text + label: Subject + description: Email subject line used when searching for specific newsletter topics + or campaigns. + - name: content_type + fieldtype: Select + label: Content Type + description: Format of newsletter content used when filtering by HTML, plain text, + or markdown newsletters. + options: + - Rich Text + - Markdown + - HTML + - name: message + fieldtype: Text Editor + label: Message + description: Plain text newsletter body used when searching newsletter content + or analyzing messaging. + - name: campaign + fieldtype: Link + label: Campaign + description: Marketing campaign identifier used when grouping or filtering newsletters + by promotional initiative. + join_hint: + table: tabMarketing Campaign + 'on': campaign = tabMarketing Campaign.name + - name: attachments + fieldtype: Table + label: Attachments + description: '' + child_hint: + child_table: tabNewsletter Attachment + fieldname: attachments + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: attachments + - name: send_unsubscribe_link + fieldtype: Check + label: Send Unsubscribe Link + description: Flag indicating if unsubscribe option was included used when analyzing + compliance or user preferences. + - name: send_webview_link + fieldtype: Check + label: Send Web View Link + description: Flag indicating if browser view option was included used when tracking + newsletter accessibility features. + - name: scheduled_to_send + fieldtype: Int + label: Scheduled To Send + description: Planned send date and time used when querying upcoming or past scheduled + newsletters. + - name: schedule_sending + fieldtype: Check + label: Schedule sending at a later time + description: Flag indicating if newsletter uses scheduled delivery used when filtering + automated versus immediate sends. + - name: schedule_send + fieldtype: Datetime + label: Send Email At + description: Timestamp for automated delivery used when analyzing send timing + or scheduling patterns. + - name: published + fieldtype: Check + label: Published + description: Flag indicating if newsletter was sent or is draft used when filtering + active campaigns versus unpublished content. + - name: route + fieldtype: Data + label: Route + description: Used to identify the distribution channel or delivery method for + the newsletter campaign. + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Newsletter document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabNewsletter Attachment + description: '' + fields: [] + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabNewsletter Attachment). + Comparison-ready across parent records.' +- table: tabNewsletter Email Group + description: '' + fields: + - name: email_group + fieldtype: Link + label: Email Group + description: The specific email group or mailing list being targeted by this newsletter. + join_hint: + table: tabEmail Group + 'on': email_group = tabEmail Group.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabNewsletter Email + Group). Comparison-ready across parent records.' +- table: tabNon Conformance + description: '' + fields: + - name: subject + fieldtype: Data + label: Subject + description: Brief title or category describing what the non-conformance is about, + used when searching for issues by topic or type. + - name: procedure + fieldtype: Link + label: Procedure + description: The documented process or standard operating procedure that was violated + or not followed, referenced when analyzing compliance gaps or process breakdowns. + join_hint: + table: tabQuality Procedure + 'on': procedure = tabQuality Procedure.name + - name: process_owner + fieldtype: Data + label: Process Owner + description: Person or department responsible for managing and resolving the non-conformance + issue + - name: full_name + fieldtype: Data + label: Full Name + description: Complete identifying name or title of the non-conformance record + - name: status + fieldtype: Select + label: Status + description: Current state of the non-conformance in its lifecycle such as open, + under investigation, closed, or resolved + options: + - Open + - Resolved + - Cancelled + - name: details + fieldtype: Text Editor + label: Details + description: Description of what went wrong or failed to meet specifications in + the non-conformance incident. + - name: corrective_action + fieldtype: Text Editor + label: Corrective Action + description: Actions taken to fix or remedy the specific non-conformance issue + that occurred. + - name: preventive_action + fieldtype: Text Editor + label: Preventive Action + description: Actions implemented to prevent the non-conformance from happening + again in the future. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Non Conformance document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabNote + description: '' + fields: + - name: title + fieldtype: Data + label: Title + description: Note headline or subject, used for searching and identifying note + content at a glance. + - name: public + fieldtype: Check + label: Public + description: Visibility flag indicating if note is shared with all users, used + to filter between private and shared notes. + - name: notify_on_login + fieldtype: Check + label: Notify users with a popup when they log in + description: Flag to show this note as notification when users log in, used for + important announcements. + - name: notify_on_every_login + fieldtype: Check + label: Notify Users On Every Login + description: Flag to repeatedly show note on each login, used for persistent reminders + or policies. + - name: expire_notification_on + fieldtype: Date + label: Expire Notification On + description: Date when login notification stops appearing, used to time-limit + announcements or reminders. + - name: content + fieldtype: Text Editor + label: Content + description: Full text body of the note, used for content search and displaying + detailed note information. + - name: seen_by + fieldtype: Table + label: Seen By Table + description: '' + child_hint: + child_table: tabNote Seen By + fieldname: seen_by + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: seen_by + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Note document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabNote Seen By + description: '' + fields: + - name: user + fieldtype: Link + label: User + description: User who has seen the note, used when checking if a specific person + has viewed a note or listing all viewers. + join_hint: + table: tabUser + 'on': user = tabUser.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabNote Seen By). + Comparison-ready across parent records.' +- table: tabNotification + description: '' + fields: + - name: enabled + fieldtype: Check + label: Enabled + description: Indicates whether this notification is currently active and will + trigger. + - name: is_standard + fieldtype: Check + label: Is Standard + description: Marks if this notification is a system-provided default configuration. + - name: module + fieldtype: Link + label: Module + description: ERP module to which this notification belongs for organizational + purposes. + join_hint: + table: tabModule Def + 'on': module = tabModule Def.name + - name: channel + fieldtype: Select + label: Channel + description: Delivery method for the notification such as email, SMS, Slack, or + system alert. + options: + - Email + - Slack + - System Notification + - SMS + - name: slack_webhook_url + fieldtype: Link + label: Slack Channel + description: Webhook URL used when sending notifications to Slack channels. + join_hint: + table: tabSlack Webhook URL + 'on': slack_webhook_url = tabSlack Webhook URL.name + - name: subject + fieldtype: Data + label: Subject + description: Message subject or title used in the notification when sent to recipients. + - name: event + fieldtype: Select + label: Send Alert On + description: Specifies the trigger event that causes this notification to fire, + used when analyzing what actions initiate alerts. + options: + - New + - Save + - Submit + - Cancel + - Days After + - Days Before + - Value Change + - Method + - Custom + - name: document_type + fieldtype: Link + label: Document Type + description: Identifies which ERP document or module this notification applies + to, used when filtering notifications by transaction type. + join_hint: + table: tabDocType + 'on': document_type = tabDocType.name + - name: method + fieldtype: Data + label: Trigger Method + description: Defines the delivery channel for the notification such as email or + SMS, used when determining how users receive alerts. + - name: date_changed + fieldtype: Select + label: Reference Date + description: Indicates the specific date field being monitored for changes that + trigger this notification, used when tracking date-based alerts. + - name: days_in_advance + fieldtype: Int + label: Days Before or After + description: Sets how many days before a due date the notification should be sent, + used when scheduling proactive reminders. + - name: value_changed + fieldtype: Select + label: Value Changed + description: Specifies which field value change triggers the notification, used + when monitoring specific data modifications. + - name: sender + fieldtype: Link + label: Sender + description: Defines the user account that appears as the notification sender, + used when identifying notification sources. + join_hint: + table: tabEmail Account + 'on': sender = tabEmail Account.name + - name: send_system_notification + fieldtype: Check + label: Send System Notification + description: Controls whether an in-system alert is generated in addition to external + notifications, used when configuring multi-channel alerts. + - name: sender_email + fieldtype: Data + label: Sender Email + description: Sets the email address that appears in the from field of notification + emails, used when customizing email sender identity. + - name: condition + fieldtype: Code + label: Condition + description: Contains the business rule or criteria that must be met for the notification + to send, used when filtering alerts by specific conditions. + - name: set_property_after_alert + fieldtype: Select + label: Set Property After Alert + description: Specifies a field that should be automatically updated after the + notification is sent, used when tracking notification delivery status. + - name: property_value + fieldtype: Data + label: Value To Be Set + description: Defines the value to set in the target field after notification delivery, + used when automating post-notification field updates. + - name: send_to_all_assignees + fieldtype: Check + label: Send To All Assignees + description: Determines whether all assigned users receive the notification or + only specific recipients, used when controlling notification distribution scope. + - name: recipients + fieldtype: Table + label: Recipients + description: '' + child_hint: + child_table: tabNotification Recipient + fieldname: recipients + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: recipients + - name: message_type + fieldtype: Select + label: Message Type + description: Categorizes the notification purpose such as warning or information, + used when filtering alerts by severity or intent. + options: + - Markdown + - HTML + - Plain Text + - name: message + fieldtype: Code + label: Message + description: Contains the notification text content sent to users when triggered + by workflow rules or system events. + - name: attach_print + fieldtype: Check + label: Attach Print + description: Indicates whether to include a PDF print attachment when sending + the notification email to recipients. + - name: print_format + fieldtype: Link + label: Print Format + description: Specifies which document print template to use when generating PDF + attachments for notification emails. + join_hint: + table: tabPrint Format + 'on': print_format = tabPrint Format.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Notification document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabNotification Log + description: '' + fields: + - name: subject + fieldtype: Text + label: Subject + description: Notification subject line or title, used when searching for specific + notification content or topics. + - name: for_user + fieldtype: Link + label: For User + description: Target user who should receive this notification, used to filter + notifications by recipient. + join_hint: + table: tabUser + 'on': for_user = tabUser.name + - name: type + fieldtype: Select + label: Type + description: Notification delivery method or category (email, alert, mention), + used to segment notifications by channel. + options: + - Mention + - Energy Point + - Assignment + - Share + - Alert + - name: email_content + fieldtype: Text Editor + label: Message + description: Full body text of the notification message, used when searching notification + content or analyzing communication details. + - name: document_type + fieldtype: Link + label: Document Type + description: Type of document that triggered this notification, used to filter + notifications by source module or form. + join_hint: + table: tabDocType + 'on': document_type = tabDocType.name + - name: read + fieldtype: Check + label: Read + description: Boolean flag indicating whether the notification has been viewed + by the recipient, used to identify unread notifications. + - name: document_name + fieldtype: Data + label: Document Link + description: Used to identify which document or transaction triggered the notification, + essential for tracking notification context and filtering alerts by document + type. + - name: attached_file + fieldtype: Code + label: Attached File + description: Used to verify if a notification includes file attachments and to + retrieve or audit documents distributed through notifications. + - name: from_user + fieldtype: Link + label: From User + description: Used to identify who sent or triggered the notification, critical + for tracking communication sources and analyzing notification patterns by sender. + join_hint: + table: tabUser + 'on': from_user = tabUser.name + - name: link + fieldtype: Small Text + label: Link + description: Used to access the referenced record or document directly from the + notification, enabling quick navigation to related transactions or forms. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Notification Log document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabNotification Recipient + description: '' + fields: + - name: receiver_by_document_field + fieldtype: Select + label: Receiver By Document Field + description: Document field used to dynamically determine the recipient email + address from the triggering document. + - name: receiver_by_role + fieldtype: Link + label: Receiver By Role + description: Role-based recipient selection where users with this role receive + the notification. + join_hint: + table: tabRole + 'on': receiver_by_role = tabRole.name + - name: cc + fieldtype: Code + label: CC + description: Email addresses to be copied on the notification as CC recipients. + - name: bcc + fieldtype: Code + label: BCC + description: Email addresses to be blind copied on the notification as BCC recipients. + - name: condition + fieldtype: Data + label: Condition + description: Python expression that must evaluate to true for this recipient to + receive the notification. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabNotification Recipient). + Comparison-ready across parent records.' +- table: tabNotification Settings + description: '' + fields: + - name: enabled + fieldtype: Check + label: Enabled + description: Master toggle indicating if notifications are active, used to filter + users who have notifications turned on or off. + - name: subscribed_documents + fieldtype: Table MultiSelect + label: Open Documents + description: List of document types user subscribes to, used when determining + which notifications to send based on document activity. + child_hint: + child_table: tabNotification Subscribed Document + fieldname: subscribed_documents + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: subscribed_documents + - name: enable_email_notifications + fieldtype: Check + label: Enable Email Notifications + description: Controls whether user receives email notifications, used to filter + users who want email alerts for system events. + - name: enable_email_mention + fieldtype: Check + label: Mentions + description: Indicates if user receives emails when mentioned in comments, used + to route mention-based notifications. + - name: enable_email_assignment + fieldtype: Check + label: Assignments + description: Controls email alerts for task assignments, used when determining + who gets notified about new assignments. + - name: enable_email_threads_on_assigned_document + fieldtype: Check + label: Email Threads on Assigned Document + description: Indicates if user receives threaded emails for assigned documents, + used to manage follow-up communication preferences. + - name: enable_email_energy_point + fieldtype: Check + label: Energy Points + description: Controls whether the user receives email notifications when they + earn or lose energy points in the gamification system. + - name: enable_email_share + fieldtype: Check + label: Document Share + description: Determines if the user gets email notifications when documents or + records are shared with them by other users. + - name: enable_email_event_reminders + fieldtype: Check + label: Event Reminders + description: Enables or disables email reminders for upcoming calendar events + and scheduled activities for the user. + - name: user + fieldtype: Link + label: User + description: Links to the specific user account whose notification preferences + are being configured in this record. + join_hint: + table: tabUser + 'on': user = tabUser.name + - name: seen + fieldtype: Check + label: Seen + description: Tracks whether the user has viewed or acknowledged their notification + settings, typically used for onboarding or settings updates. + - name: energy_points_system_notifications + fieldtype: Check + label: Energy Points + description: Controls whether the user receives in-system notifications for energy + point activities separate from email alerts. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Notification Settings document (master/transaction). Use + only for single-entity lookups, not cross-record comparison unless fields are + per-relationship (e.g. supplier, price_list).' +- table: tabNotification Subscribed Document + description: '' + fields: + - name: document + fieldtype: Link + label: Document + description: DocType name that users are subscribing to receive notifications + about. + join_hint: + table: tabDocType + 'on': document = tabDocType.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabNotification Subscribed + Document). Comparison-ready across parent records.' +- table: tabNumber Card + description: '' + fields: + - name: is_standard + fieldtype: Check + label: Is Standard + description: Indicates if this is a system-provided standard number card or custom-created. + - name: module + fieldtype: Link + label: Module + description: ERP module this number card belongs to for organizational grouping. + join_hint: + table: tabModule Def + 'on': module = tabModule Def.name + - name: label + fieldtype: Data + label: Label + description: Display name shown to users on dashboards and reports for this metric. + - name: type + fieldtype: Select + label: Type + description: Calculation method type determining how the number card aggregates + data. + options: + - Document Type + - Report + - Custom + - name: report_name + fieldtype: Link + label: Report Name + description: Linked report used as the data source for this number card metric. + join_hint: + table: tabReport + 'on': report_name = tabReport.name + - name: method + fieldtype: Data + label: Method + description: Custom Python method path called to calculate the number card value + dynamically. + - name: function + fieldtype: Select + label: Function + description: Defines the calculation or operation performed by this card, used + when analyzing what metric or KPI the card displays. + options: + - Count + - Sum + - Average + - Minimum + - Maximum + - name: aggregate_function_based_on + fieldtype: Select + label: Aggregate Function Based On + description: Specifies the field on which aggregation is performed, used when + determining the data source for calculated metrics. + - name: document_type + fieldtype: Link + label: Document Type + description: Identifies the primary ERP document this card analyzes, used when + filtering cards by transaction or master data type. + join_hint: + table: tabDocType + 'on': document_type = tabDocType.name + - name: parent_document_type + fieldtype: Link + label: Parent Document Type + description: References the related parent document type, used when analyzing + hierarchical or linked document relationships. + join_hint: + table: tabDocType + 'on': parent_document_type = tabDocType.name + - name: report_field + fieldtype: Select + label: Field + description: Indicates the specific field displayed in reports, used when identifying + which data attribute the card presents. + - name: report_function + fieldtype: Select + label: Function + description: Defines the aggregation method applied in reports, used when understanding + how data is summarized or calculated. + options: + - Sum + - Average + - Minimum + - Maximum + - name: is_public + fieldtype: Check + label: Is Public + description: Determines card visibility to all users versus restricted access, + used when filtering cards by access permissions. + - name: currency + fieldtype: Link + label: Currency + description: Specifies the currency for monetary values, used when filtering or + converting financial metrics across different currencies. + join_hint: + table: tabCurrency + 'on': currency = tabCurrency.name + - name: filters_config + fieldtype: Code + label: Filters Configuration + description: Stores filter configuration settings, used when analyzing how data + is pre-filtered or scoped for the card. + - name: show_percentage_stats + fieldtype: Check + label: Show Percentage Stats + description: Controls whether percentage calculations are displayed, used when + determining if relative metrics are shown alongside absolute values. + - name: stats_time_interval + fieldtype: Select + label: Stats Time Interval + description: Defines the time period for statistical calculations, used when analyzing + metrics over specific date ranges or intervals. + options: + - Daily + - Weekly + - Monthly + - Yearly + - name: filters_json + fieldtype: Code + label: Filters JSON + description: Contains structured filter criteria in JSON format, used when examining + complex multi-condition filtering logic. + - name: dynamic_filters_json + fieldtype: Code + label: Dynamic Filters JSON + description: Stores user-adjustable filter parameters, used when analyzing cards + with runtime-configurable filter options. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Number Card document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabNumber Card Link + description: '' + fields: + - name: card + fieldtype: Link + label: Card + description: Reference to the specific number card being linked for dashboard + or reporting display. + join_hint: + table: tabNumber Card + 'on': card = tabNumber Card.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabNumber Card Link). + Comparison-ready across parent records.' +- table: tabOAuth Authorization Code + description: '' + fields: + - name: client + fieldtype: Link + label: Client + description: OAuth client application that requested this authorization code, + used to identify which app is being authorized. + join_hint: + table: tabOAuth Client + 'on': client = tabOAuth Client.name + - name: user + fieldtype: Link + label: User + description: User who granted authorization, used when querying which users authorized + which applications. + join_hint: + table: tabUser + 'on': user = tabUser.name + - name: scopes + fieldtype: Text + label: Scopes + description: Permissions granted through this authorization code, used to determine + what access level was authorized. + - name: authorization_code + fieldtype: Data + label: Authorization Code + description: The actual authorization code value issued, used for token exchange + in OAuth flow. + - name: expiration_time + fieldtype: Datetime + label: Expiration time + description: When this authorization code expires, used to validate if code is + still usable for token exchange. + - name: redirect_uri_bound_to_authorization_code + fieldtype: Data + label: Redirect URI Bound To Auth Code + description: Redirect URI tied to this code for security validation, used to prevent + authorization code interception attacks. + - name: validity + fieldtype: Select + label: Validity + description: Used to check if an authorization code is still active and has not + expired when validating OAuth token exchange requests. + options: + - Valid + - Invalid + - name: nonce + fieldtype: Data + label: nonce + description: Used to verify the authenticity of token responses and prevent replay + attacks by matching the value sent in the original authorization request. + - name: code_challenge + fieldtype: Data + label: Code Challenge + description: Used in PKCE flow to validate that the token exchange request comes + from the same client that initiated the authorization by comparing against the + code_verifier. + - name: code_challenge_method + fieldtype: Select + label: Code challenge method + description: Used to determine which hashing algorithm (plain or S256) should + be applied when validating the code_challenge against the code_verifier during + token exchange. + options: + - s256 + - plain + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per OAuth Authorization Code document (master/transaction). + Use only for single-entity lookups, not cross-record comparison unless fields + are per-relationship (e.g. supplier, price_list).' +- table: tabOAuth Bearer Token + description: '' + fields: + - name: client + fieldtype: Link + label: Client + description: OAuth client application that requested this token, used to identify + which app is accessing the system. + join_hint: + table: tabOAuth Client + 'on': client = tabOAuth Client.name + - name: user + fieldtype: Link + label: User + description: Frappe user account associated with this token, determines whose + permissions apply for API access. + join_hint: + table: tabUser + 'on': user = tabUser.name + - name: scopes + fieldtype: Text + label: Scopes + description: Permission scopes granted to this token, defining what resources + and actions the client can access. + - name: access_token + fieldtype: Data + label: Access Token + description: Short-lived token string used for authenticating API requests on + behalf of the user. + - name: refresh_token + fieldtype: Data + label: Refresh Token + description: Long-lived token used to obtain new access tokens without re-authentication. + - name: expiration_time + fieldtype: Datetime + label: Expiration time + description: Timestamp when the access token expires, critical for determining + if token refresh is needed. + - name: expires_in + fieldtype: Int + label: Expires In + description: Used to determine token validity duration and when authentication + renewal is required for API access. + - name: status + fieldtype: Select + label: Status + description: Used to filter active versus revoked or expired tokens when troubleshooting + authentication issues or auditing access. + options: + - Active + - Revoked + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per OAuth Bearer Token document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabOAuth Client + description: '' + fields: + - name: client_id + fieldtype: Data + label: App Client ID + description: Public OAuth client identifier used when querying which applications + have API access. + - name: app_name + fieldtype: Data + label: App Name + description: Human-readable application name for identifying which external app + is requesting access. + - name: user + fieldtype: Link + label: User + description: ERP user account linked to this OAuth client for permission and access + control queries. + join_hint: + table: tabUser + 'on': user = tabUser.name + - name: allowed_roles + fieldtype: Table MultiSelect + label: Allowed Roles + description: Roles permitted to use this OAuth client, relevant for authorization + and security audits. + child_hint: + child_table: tabOAuth Client Role + fieldname: allowed_roles + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: allowed_roles + - name: client_secret + fieldtype: Data + label: App Client Secret + description: Confidential authentication key for the OAuth client, used in security + validation queries. + - name: skip_authorization + fieldtype: Check + label: Skip Authorization + description: Flag indicating if user consent is bypassed, relevant for trusted + application queries. + - name: scopes + fieldtype: Text + label: Scopes + description: Defines the access permissions and API resources this OAuth client + is authorized to request from users or systems. + - name: redirect_uris + fieldtype: Text + label: Redirect URIs + description: Lists the approved callback URLs where authorization codes or tokens + can be sent after user authentication. + - name: default_redirect_uri + fieldtype: Data + label: Default Redirect URI + description: Specifies the primary callback URL used when no explicit redirect + is provided during the OAuth authorization flow. + - name: grant_type + fieldtype: Select + label: Grant Type + description: Indicates the OAuth authorization method used by this client such + as authorization code, client credentials, or refresh token. + options: + - Authorization Code + - Implicit + - name: response_type + fieldtype: Select + label: Response Type + description: Determines what the authorization server returns during the OAuth + flow such as authorization code, access token, or ID token. + options: + - Code + - Token + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per OAuth Client document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabOAuth Client Role + description: '' + fields: + - name: role + fieldtype: Link + label: Role + description: ERPNext role granted to this OAuth client for API access permissions. + join_hint: + table: tabRole + 'on': role = tabRole.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabOAuth Client Role). + Comparison-ready across parent records.' +- table: tabOAuth Scope + description: '' + fields: + - name: scope + fieldtype: Data + label: Scope + description: OAuth permission scope value defining what resources or actions are + authorized for API access. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabOAuth Scope). + Comparison-ready across parent records.' +- table: tabOnboarding Permission + description: '' + fields: + - name: role + fieldtype: Link + label: Role + description: User role that is granted access or permissions during the onboarding + process. + join_hint: + table: tabRole + 'on': role = tabRole.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabOnboarding Permission). + Comparison-ready across parent records.' +- table: tabOnboarding Step + description: '' + fields: + - name: title + fieldtype: Data + label: Title + description: Display name of the onboarding step shown to users during setup. + - name: is_complete + fieldtype: Check + label: Is Complete + description: Indicates whether the user has completed this onboarding step. + - name: is_skipped + fieldtype: Check + label: Is Skipped + description: Tracks if the user chose to skip this onboarding step. + - name: intro_video_url + fieldtype: Data + label: Intro Video URL + description: Link to tutorial video explaining how to complete this onboarding + step. + - name: action + fieldtype: Select + label: Action + description: System action or form to be triggered when user initiates this onboarding + step. + options: + - Create Entry + - Update Settings + - Show Form Tour + - View Report + - Go to Page + - Watch Video + - name: action_label + fieldtype: Data + label: Action Label + description: Label displayed on the button or action that users click to complete + this onboarding step. + - name: reference_document + fieldtype: Link + label: Reference Document + description: The specific DocType that this onboarding step guides users to create + or interact with. + join_hint: + table: tabDocType + 'on': reference_document = tabDocType.name + - name: show_full_form + fieldtype: Check + label: Show Full Form? + description: Indicates whether the complete form should be displayed during this + onboarding step instead of a simplified view. + - name: show_form_tour + fieldtype: Check + label: Show Form Tour + description: Controls whether an interactive guided tour of the form is shown + to users during onboarding. + - name: form_tour + fieldtype: Link + label: Form Tour + description: Links to the specific Form Tour configuration that walks users through + form fields step-by-step. + join_hint: + table: tabForm Tour + 'on': form_tour = tabForm Tour.name + - name: is_single + fieldtype: Check + label: Is Single + description: Indicates if the reference document is a Single DocType with only + one record in the system. + - name: reference_report + fieldtype: Link + label: Reference Report + description: The report that users are guided to view or create as part of this + onboarding step. + join_hint: + table: tabReport + 'on': reference_report = tabReport.name + - name: report_reference_doctype + fieldtype: Data + label: Report Reference Doctype + description: The DocType on which the reference report is based for filtering + and data context. + - name: report_type + fieldtype: Data + label: Report Type + description: Specifies the type of report being referenced such as Report Builder, + Script Report, or Query Report. + - name: report_description + fieldtype: Data + label: Report Description + description: Explains the purpose and content of the report to help users understand + what insights they will gain. + - name: path + fieldtype: Data + label: Path + description: The URL or route path where users are directed when they initiate + this onboarding step. + - name: callback_title + fieldtype: Data + label: Callback Title + description: Title of the confirmation or success message shown after users complete + this onboarding action. + - name: callback_message + fieldtype: Small Text + label: Callback Message + description: Detailed message displayed to users after completing the step to + confirm success or provide next steps. + - name: validate_action + fieldtype: Check + label: Validate Field + description: Determines whether the system should verify that users actually completed + the required action before marking the step done. + - name: field + fieldtype: Select + label: Field + description: Specific form field that this onboarding step highlights or requires + users to fill during the guided process. + - name: value_to_validate + fieldtype: Data + label: Value to Validate + description: Used to verify employee data or document completeness during onboarding + workflow validation checks. + - name: video_url + fieldtype: Data + label: Video URL + description: Referenced when retrieving training or instructional video links + assigned to specific onboarding steps. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Onboarding Step document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabOnboarding Step Map + description: '' + fields: + - name: step + fieldtype: Link + label: Step + description: Reference to the specific onboarding step or task to be completed. + join_hint: + table: tabOnboarding Step + 'on': step = tabOnboarding Step.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabOnboarding Step + Map). Comparison-ready across parent records.' +- table: tabOpening Invoice Creation Tool Item + description: '' + fields: + - name: invoice_number + fieldtype: Data + label: Invoice Number + description: The invoice number being created or imported as an opening balance + entry. + - name: party_type + fieldtype: Link + label: Party Type + description: The type of party associated with the invoice, such as Customer or + Supplier, determining whether it's a receivable or payable. + join_hint: + table: tabDocType + 'on': party_type = tabDocType.name + - name: party + fieldtype: Dynamic Link + label: Party + description: The customer or supplier for whom opening invoice balances are being + created during initial system setup or migration. + - name: temporary_opening_account + fieldtype: Link + label: Temporary Opening Account + description: The intermediate ledger account used to offset opening invoice entries + before final reconciliation or adjustment. + join_hint: + table: tabAccount + 'on': temporary_opening_account = tabAccount.name + - name: posting_date + fieldtype: Date + label: Posting Date + description: The accounting date when the opening invoice balance is recorded + in the system, typically the go-live or migration date. + - name: due_date + fieldtype: Date + label: Due Date + description: Date when payment for this invoice item is expected or becomes overdue. + - name: item_name + fieldtype: Data + label: Item Name + description: Name or description of the specific product or service line item + on the opening invoice. + - name: outstanding_amount + fieldtype: Currency + label: Outstanding Amount + description: Unpaid balance remaining for this invoice item that still needs to + be collected. + - name: qty + fieldtype: Data + label: Quantity + description: Quantity of items being invoiced in the opening invoice creation + tool. + - name: cost_center + fieldtype: Link + label: Cost Center + description: Cost center assigned to allocate expenses or revenue for the invoice + item. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabOpening Invoice + Creation Tool Item). Comparison-ready across parent records.' +- table: tabOperation + description: '' + fields: + - name: workstation + fieldtype: Link + label: Default Workstation + description: Physical location or machine where the operation is performed, used + when querying where work happens + join_hint: + table: tabWorkstation + 'on': workstation = tabWorkstation.name + - name: is_corrective_operation + fieldtype: Check + label: Is Corrective Operation + description: Indicates whether this operation fixes defects or rework issues rather + than standard production work + - name: create_job_card_based_on_batch_size + fieldtype: Check + label: Create Job Card based on Batch Size + description: Whether production job cards are automatically split or created according + to the defined batch size for this operation. + - name: quality_inspection_template + fieldtype: Link + label: Quality Inspection Template + description: The quality inspection checklist or template applied when this operation + is completed or inspected. + join_hint: + table: tabQuality Inspection Template + 'on': quality_inspection_template = tabQuality Inspection Template.name + - name: batch_size + fieldtype: Int + label: Batch Size + description: The quantity of items processed together in a single batch for this + operation, used to determine production grouping and job card splitting. + - name: sub_operations + fieldtype: Table + label: sub_operations + description: '' + child_hint: + child_table: tabSub Operation + fieldname: sub_operations + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: sub_operations + - name: total_operation_time + fieldtype: Float + label: Total Operation Time + description: Complete duration to finish this operation including all sub-operations, + used when asking about cycle time, throughput, or scheduling. + - name: description + fieldtype: Text + label: Description + description: Textual explanation of what this operation does or produces, used + when searching operations by activity, purpose, or work content. + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Operation document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabOpportunity + description: Potential Sales Deal + fields: + - name: naming_series + fieldtype: Select + label: Series + description: The prefix pattern used to generate the opportunity ID number + options: + - CRM-OPP-.YYYY.- + - name: opportunity_from + fieldtype: Link + label: Opportunity From + description: The source type of the opportunity indicating whether it originated + from a Lead or an existing Customer + join_hint: + table: tabDocType + 'on': opportunity_from = tabDocType.name + - name: party_name + fieldtype: Dynamic Link + label: Party + description: The legal entity or organization name associated with the opportunity, + used when searching by official business name or parent company. + - name: customer_name + fieldtype: Data + label: Customer Name + description: The customer-facing or doing-business-as name for the opportunity, + used when searching by brand name or common customer identifier. + - name: status + fieldtype: Select + label: Status + description: Current stage of the opportunity in the sales pipeline such as prospecting, + qualified, proposal, negotiation, won, or lost. + options: + - Open + - Quotation + - Converted + - Lost + - Replied + - Closed + - name: opportunity_type + fieldtype: Link + label: Opportunity Type + description: Category or classification of the sales opportunity such as new business, + upsell, renewal, or cross-sell. + join_hint: + table: tabOpportunity Type + 'on': opportunity_type = tabOpportunity Type.name + - name: source + fieldtype: Link + label: Source + description: Origin or channel where the opportunity was generated such as referral, + website, trade show, or cold call. + join_hint: + table: tabLead Source + 'on': source = tabLead Source.name + - name: opportunity_owner + fieldtype: Link + label: Opportunity Owner + description: Sales representative or team member responsible for managing and + closing the opportunity. + join_hint: + table: tabUser + 'on': opportunity_owner = tabUser.name + - name: sales_stage + fieldtype: Link + label: Sales Stage + description: Current phase of the sales opportunity such as prospecting, qualification, + proposal, negotiation, or closed won/lost. + join_hint: + table: tabSales Stage + 'on': sales_stage = tabSales Stage.name + - name: expected_closing + fieldtype: Date + label: Expected Closing Date + description: Anticipated date when the opportunity is forecasted to close or be + won. + - name: probability + fieldtype: Percent + label: Probability (%) + description: Percentage likelihood that the opportunity will be successfully won + and closed. + - name: no_of_employees + fieldtype: Select + label: No of Employees + description: Number of employees at the prospect or customer organization associated + with this opportunity, used when qualifying opportunity size or segmenting by + company headcount. + options: + - 1-10 + - 11-50 + - 51-200 + - 201-500 + - 501-1000 + - 1000+ + - name: annual_revenue + fieldtype: Currency + label: Annual Revenue + description: Yearly revenue of the prospect or customer organization associated + with this opportunity, used when assessing deal potential or filtering by company + financial size. + - name: customer_group + fieldtype: Link + label: Customer Group + description: Classification or segment category assigned to the customer associated + with this opportunity, used when analyzing opportunities by customer type, tier, + or strategic grouping. + join_hint: + table: tabCustomer Group + 'on': customer_group = tabCustomer Group.name + - name: industry + fieldtype: Link + label: Industry + description: The industry vertical or sector of the customer or prospect associated + with the opportunity, such as manufacturing, healthcare, or retail. + join_hint: + table: tabIndustry Type + 'on': industry = tabIndustry Type.name + - name: market_segment + fieldtype: Link + label: Market Segment + description: The specific market segment or customer category within an industry, + such as enterprise, mid-market, or SMB. + join_hint: + table: tabMarket Segment + 'on': market_segment = tabMarket Segment.name + - name: website + fieldtype: Data + label: Website + description: The web address or URL of the customer or prospect organization related + to the opportunity. + - name: city + fieldtype: Data + label: City + description: City where the opportunity or customer is located, used when filtering + or analyzing opportunities by geographic city. + - name: state + fieldtype: Data + label: State/Province + description: State or province where the opportunity or customer is located, used + when filtering or analyzing opportunities by geographic region. + - name: country + fieldtype: Link + label: Country + description: Country where the opportunity or customer is located, used when filtering + or analyzing opportunities by geographic market or international presence. + join_hint: + table: tabCountry + 'on': country = tabCountry.name + - name: territory + fieldtype: Link + label: Territory + description: Geographic or organizational sales region assigned to the opportunity + for territory management and sales assignment purposes + join_hint: + table: tabTerritory + 'on': territory = tabTerritory.name + - name: currency + fieldtype: Link + label: Currency + description: Currency denomination in which the opportunity amount and related + financial values are expressed + join_hint: + table: tabCurrency + 'on': currency = tabCurrency.name + - name: conversion_rate + fieldtype: Float + label: Exchange Rate + description: Exchange rate used to convert the opportunity's currency amounts + to the base or home currency + - name: opportunity_amount + fieldtype: Currency + label: Opportunity Amount + description: Total potential revenue value of the sales opportunity in the transaction + currency. + - name: base_opportunity_amount + fieldtype: Currency + label: Opportunity Amount (Company Currency) + description: Total potential revenue value of the sales opportunity converted + to the company's base currency for consolidated reporting. + - name: company + fieldtype: Link + label: Company + description: The legal entity or business unit that owns or is pursuing this sales + opportunity. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: campaign + fieldtype: Link + label: Campaign + description: Marketing campaign that generated or is associated with this sales + opportunity + join_hint: + table: tabCampaign + 'on': campaign = tabCampaign.name + - name: transaction_date + fieldtype: Date + label: Opportunity Date + description: Date when the opportunity transaction occurred or was recorded + - name: language + fieldtype: Link + label: Print Language + description: Preferred language for communication with the opportunity contact + or account + join_hint: + table: tabLanguage + 'on': language = tabLanguage.name + - name: amended_from + fieldtype: Link + label: Amended From + description: References the original opportunity that this opportunity was created + from when amendments or revisions are made to an existing deal. + join_hint: + table: tabOpportunity + 'on': amended_from = tabOpportunity.name + - name: title + fieldtype: Data + label: Title + description: The name or headline of the sales opportunity used to identify and + search for specific deals. + - name: first_response_time + fieldtype: Duration + label: First Response Time + description: Tracks when the sales team first responded or engaged with the opportunity + after it was created or received. + - name: lost_reasons + fieldtype: Table MultiSelect + label: Lost Reasons + description: Reasons why an opportunity was lost or closed unsuccessfully, typically + selected from predefined categories. + child_hint: + child_table: tabOpportunity Lost Reason Detail + fieldname: lost_reasons + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: lost_reasons + - name: order_lost_reason + fieldtype: Small Text + label: Detailed Reason + description: Specific reason why an order associated with this opportunity was + lost, distinct from general opportunity loss reasons. + - name: competitors + fieldtype: Table MultiSelect + label: Competitors + description: Competitor companies or products that were involved in this sales + opportunity. + child_hint: + child_table: tabCompetitor Detail + fieldname: competitors + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: competitors + - name: contact_person + fieldtype: Link + label: Contact Person + description: Name of the individual at the customer organization who is the primary + contact for this sales opportunity. + join_hint: + table: tabContact + 'on': contact_person = tabContact.name + - name: job_title + fieldtype: Data + label: Job Title + description: Professional role or position title of the contact person associated + with this opportunity. + - name: contact_email + fieldtype: Data + label: Contact Email + description: Email address of the contact person for communication regarding this + sales opportunity. + - name: contact_mobile + fieldtype: Data + label: Contact Mobile + description: Mobile phone number of the primary contact person associated with + the opportunity. + - name: whatsapp + fieldtype: Data + label: WhatsApp + description: WhatsApp contact number for the opportunity, may differ from mobile + or phone. + - name: phone + fieldtype: Data + label: Phone + description: Primary landline or office phone number for the opportunity, distinct + from mobile contact. + - name: phone_ext + fieldtype: Data + label: Phone Ext. + description: Extension number for the opportunity contact's phone line + - name: customer_address + fieldtype: Link + label: Customer / Lead Address + description: Billing or primary address of the customer associated with the opportunity + join_hint: + table: tabAddress + 'on': customer_address = tabAddress.name + - name: address_display + fieldtype: Small Text + label: Address + description: Formatted full address string for displaying the opportunity location + or customer site + - name: contact_display + fieldtype: Small Text + label: Contact + description: The name or identifier of the primary contact person associated with + this sales opportunity. + - name: items + fieldtype: Table + label: Items + description: '' + child_hint: + child_table: tabOpportunity Item + fieldname: items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: items + - name: base_total + fieldtype: Currency + label: Total (Company Currency) + description: The total value of the opportunity before any adjustments like taxes, + discounts, or currency conversions. + - name: total + fieldtype: Currency + label: Total + description: Total monetary value of the sales opportunity including all products + and services being proposed to the customer + - name: notes + fieldtype: Table + label: Notes + description: '' + child_hint: + child_table: tabCRM Note + fieldname: notes + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: notes + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Opportunity document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabOpportunity Item + description: '' + fields: + - name: item_code + fieldtype: Link + label: Item Code + description: SKU or product code identifying the product or service being offered + in this opportunity + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: item_name + fieldtype: Data + label: Item Name + description: Descriptive name of the product or service being offered in this + opportunity + - name: uom + fieldtype: Link + label: UOM + description: Unit of measurement for the opportunity item quantity (e.g., pieces, + boxes, kilograms). + join_hint: + table: tabUOM + 'on': uom = tabUOM.name + - name: qty + fieldtype: Float + label: Qty + description: Quantity of the item included in the opportunity. + - name: brand + fieldtype: Link + label: Brand + description: Brand or manufacturer name of the product being offered in the opportunity. + join_hint: + table: tabBrand + 'on': brand = tabBrand.name + - name: item_group + fieldtype: Link + label: Item Group + description: Product category or classification of the opportunity line item for + grouping similar products together + join_hint: + table: tabItem Group + 'on': item_group = tabItem Group.name + - name: description + fieldtype: Text Editor + label: Description + description: Detailed text explaining what the opportunity line item is or includes + - name: base_rate + fieldtype: Currency + label: Rate (Company Currency) + description: Unit price or rate in the company's base currency before any currency + conversion adjustments. + - name: base_amount + fieldtype: Currency + label: Amount (Company Currency) + description: Total line item amount in the company's base currency before any + currency conversion adjustments. + - name: rate + fieldtype: Currency + label: Rate + description: Unit price or rate in the transaction currency as quoted to the customer. + - name: amount + fieldtype: Currency + label: Amount + description: Total monetary value of this specific product or service line item + within the sales opportunity. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabOpportunity Item). + Comparison-ready across parent records.' +- table: tabOpportunity Lost Reason + description: '' + fields: + - name: lost_reason + fieldtype: Data + label: Lost Reason + description: The actual reason or explanation for why an opportunity was lost, + such as pricing, competition, or timing issues + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Opportunity Lost Reason document (master/transaction). + Use only for single-entity lookups, not cross-record comparison unless fields + are per-relationship (e.g. supplier, price_list).' +- table: tabOpportunity Lost Reason Detail + description: '' + fields: + - name: lost_reason + fieldtype: Link + label: Opportunity Lost Reason + description: The reason why an opportunity was lost, such as pricing, competitor, + timing, or other business factors + join_hint: + table: tabOpportunity Lost Reason + 'on': lost_reason = tabOpportunity Lost Reason.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabOpportunity Lost + Reason Detail). Comparison-ready across parent records.' +- table: tabOpportunity Type + description: '' + fields: + - name: description + fieldtype: Small Text + label: Description + description: Detailed explanation or notes about what this opportunity type represents + and when to use it + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Opportunity Type document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabOverdue Payment + description: '' + fields: + - name: sales_invoice + fieldtype: Link + label: Sales Invoice + description: Links to the originating sales invoice document, used when investigating + which invoice has overdue amounts or analyzing payment delays by invoice. + join_hint: + table: tabSales Invoice + 'on': sales_invoice = tabSales Invoice.name + - name: payment_schedule + fieldtype: Data + label: Payment Schedule + description: References the specific payment schedule entry that is overdue, used + when tracking installment-based payments or analyzing which scheduled payments + are past due. + - name: dunning_level + fieldtype: Int + label: Dunning Level + description: Escalation stage or severity level of collection efforts for the + overdue payment + - name: payment_term + fieldtype: Link + label: Payment Term + description: Original agreed payment conditions or due date terms that were not + met + join_hint: + table: tabPayment Term + 'on': payment_term = tabPayment Term.name + - name: description + fieldtype: Small Text + label: Description + description: Explanatory notes or details about why the payment is overdue or + collection actions taken + - name: due_date + fieldtype: Date + label: Due Date + description: Original deadline when payment was expected before becoming overdue + - name: overdue_days + fieldtype: Data + label: Overdue Days + description: Number of days elapsed since the payment due date passed + - name: mode_of_payment + fieldtype: Link + label: Mode of Payment + description: Payment method or channel used or expected for the overdue transaction + join_hint: + table: tabMode of Payment + 'on': mode_of_payment = tabMode of Payment.name + - name: invoice_portion + fieldtype: Percent + label: Invoice Portion + description: The specific portion or line item of an invoice that is overdue for + payment. + - name: payment_amount + fieldtype: Currency + label: Payment Amount + description: The amount of money that was paid or is expected to be paid against + the overdue invoice. + - name: outstanding + fieldtype: Currency + label: Outstanding + description: The remaining unpaid balance that is still overdue after any payments + have been applied. + - name: paid_amount + fieldtype: Currency + label: Paid Amount + description: Amount actually paid by customer toward the overdue payment, used + when asking how much was received or settled. + - name: discounted_amount + fieldtype: Currency + label: Discounted Amount + description: Amount reduced or waived from the original overdue balance, used + when asking about payment reductions or forgiveness. + - name: interest + fieldtype: Currency + label: Interest + description: Additional charges accrued on the overdue payment, used when asking + about late fees or penalty amounts. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabOverdue Payment). + Comparison-ready across parent records.' +- table: tabPOS Closing Entry + description: '' + fields: + - name: period_start_date + fieldtype: Datetime + label: Period Start Date + description: Start date and time of the POS shift or period being closed, used + to find closings within a specific timeframe or that began on a certain date. + - name: period_end_date + fieldtype: Datetime + label: Period End Date + description: End date and time of the POS shift or period being closed, used to + identify when a closing was completed or to filter closings that ended on a + specific date. + - name: posting_date + fieldtype: Date + label: Posting Date + description: Date when the POS shift was closed and transactions were finalized + for accounting purposes. + - name: posting_time + fieldtype: Time + label: Posting Time + description: Time when the POS shift was closed and transactions were finalized. + - name: pos_opening_entry + fieldtype: Link + label: POS Opening Entry + description: Links to the corresponding POS shift opening record to match closing + with opening entries. + join_hint: + table: tabPOS Opening Entry + 'on': pos_opening_entry = tabPOS Opening Entry.name + - name: status + fieldtype: Select + label: Status + description: Current state of the POS closing entry such as draft, submitted, + or cancelled. + options: + - Draft + - Submitted + - Queued + - Failed + - Cancelled + - name: company + fieldtype: Link + label: Company + description: Company for which this POS closing entry was created. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: pos_profile + fieldtype: Link + label: POS Profile + description: POS profile or configuration used during the sales period being closed. + join_hint: + table: tabPOS Profile + 'on': pos_profile = tabPOS Profile.name + - name: user + fieldtype: Link + label: Cashier + description: Employee or cashier who performed the POS closing and is responsible + for the shift reconciliation. + join_hint: + table: tabUser + 'on': user = tabUser.name + - name: pos_transactions + fieldtype: Table + label: POS Transactions + description: '' + child_hint: + child_table: tabPOS Invoice Reference + fieldname: pos_transactions + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: pos_transactions + - name: payment_reconciliation + fieldtype: Table + label: Payment Reconciliation + description: '' + child_hint: + child_table: tabPOS Closing Entry Detail + fieldname: payment_reconciliation + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: payment_reconciliation + - name: grand_total + fieldtype: Currency + label: Grand Total + description: Final total amount including all taxes, discounts, and charges for + the POS closing entry. + - name: net_total + fieldtype: Currency + label: Net Total + description: Total amount before taxes are applied but after item-level discounts + in the POS closing entry. + - name: total_quantity + fieldtype: Float + label: Total Quantity + description: Total number of items or units sold across all transactions in the + POS closing entry. + - name: taxes + fieldtype: Table + label: Taxes + description: '' + child_hint: + child_table: tabPOS Closing Entry Taxes + fieldname: taxes + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: taxes + - name: error_message + fieldtype: Small Text + label: Error + description: Error or validation message captured when the POS closing entry failed + or encountered issues during processing. + - name: amended_from + fieldtype: Link + label: Amended From + description: Reference to the original POS closing entry that this entry corrects + or replaces, used when tracking corrections or amendments. + join_hint: + table: tabPOS Closing Entry + 'on': amended_from = tabPOS Closing Entry.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per POS Closing Entry document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabPOS Closing Entry Detail + description: '' + fields: + - name: mode_of_payment + fieldtype: Link + label: Mode of Payment + description: Payment method used for transactions in this closing entry line (cash, + card, check, etc.) + join_hint: + table: tabMode of Payment + 'on': mode_of_payment = tabMode of Payment.name + - name: opening_amount + fieldtype: Currency + label: Opening Amount + description: Starting cash or payment method balance at the beginning of the POS + shift + - name: expected_amount + fieldtype: Currency + label: Expected Amount + description: Expected cash or payment amount that should be present based on transactions + recorded during the shift or period. + - name: closing_amount + fieldtype: Currency + label: Closing Amount + description: Actual cash or payment amount counted and declared at the end of + the shift or period. + - name: difference + fieldtype: Currency + label: Difference + description: Variance between expected and actual closing amounts, indicating + overages or shortages in the register. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabPOS Closing Entry + Detail). Comparison-ready across parent records.' +- table: tabPOS Closing Entry Taxes + description: '' + fields: + - name: account_head + fieldtype: Link + label: Account Head + description: General ledger account where this tax amount is posted for accounting + purposes + join_hint: + table: tabAccount + 'on': account_head = tabAccount.name + - name: rate + fieldtype: Percent + label: Tax Rate + description: Tax percentage applied to calculate the tax amount for this entry + - name: amount + fieldtype: Currency + label: Amount + description: Tax amount collected or paid for a specific tax type during the POS + closing period. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabPOS Closing Entry + Taxes). Comparison-ready across parent records.' +- table: tabPOS Customer Group + description: '' + fields: + - name: customer_group + fieldtype: Link + label: Customer Group + description: Unique identifier and label for the customer group used when filtering, + segmenting, or analyzing customers by their assigned group category + join_hint: + table: tabCustomer Group + 'on': customer_group = tabCustomer Group.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabPOS Customer Group). + Comparison-ready across parent records.' +- table: tabPOS Field + description: '' + fields: + - name: fieldname + fieldtype: Select + label: Fieldname + description: Technical database column name used to map POS data fields to system + tables. + - name: label + fieldtype: Data + label: Label + description: User-facing display name shown in POS interface and reports for this + field. + - name: fieldtype + fieldtype: Data + label: Fieldtype + description: Data type of the POS field such as Currency, Data, Link, or Select + that determines how values are stored and displayed + - name: options + fieldtype: Text + label: Options + description: Configuration values or linked doctype name that defines valid choices + or relationships for the POS field + - name: default_value + fieldtype: Data + label: Default Value + description: Pre-populated value automatically assigned to the POS field when + creating new transactions + - name: reqd + fieldtype: Check + label: Mandatory + description: Indicates whether this POS field is mandatory and must be filled + in during transactions or data entry. + - name: read_only + fieldtype: Check + label: Read Only + description: Indicates whether this POS field can be edited by users or is locked + from modification. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabPOS Field). Comparison-ready + across parent records.' +- table: tabPOS Invoice + description: '' + fields: + - name: custom_ksa_einvoicing_xml + fieldtype: Data + label: KSA E-invoice xml + description: XML format data for Saudi Arabia ZATCA e-invoicing compliance and + submission + - name: custom_zatca_tax_category + fieldtype: Select + label: ZATCA Tax Category + description: Tax category classification code required for Saudi Arabian ZATCA + e-invoicing regulations + options: + - Standard + - Zero Rated + - Exempted + - Services outside scope of tax / Not subject to VAT + - name: custom_exemption_reason_code + fieldtype: Select + label: Exemption Reason Code + description: Tax exemption reason code for invoices claiming exemption from VAT + or other taxes. + options: + - VATEX-SA-29 + - VATEX-SA-29-7 + - VATEX-SA-30 + - VATEX-SA-32 + - VATEX-SA-33 + - VATEX-SA-34-1 + - VATEX-SA-34-2 + - VATEX-SA-34-3 + - VATEX-SA-34-4 + - VATEX-SA-34-5 + - VATEX-SA-35 + - VATEX-SA-36 + - VATEX-SA-EDU + - VATEX-SA-HEA + - VATEX-SA-MLTRY + - VATEX-SA-OOS + - name: custom_uuid + fieldtype: Data + label: UUID + description: Unique universal identifier for the POS invoice used for external + system integration and tracking. + - name: custom_zatca_status + fieldtype: Data + label: ZATCA Status + description: ZATCA (Saudi tax authority) compliance status indicating whether + the invoice has been successfully submitted, approved, or rejected for e-invoicing. + - name: title + fieldtype: Data + label: Title + description: Display name or identifier for the POS invoice transaction + - name: naming_series + fieldtype: Select + label: Series + description: Prefix pattern used to generate the POS invoice number + options: + - ACC-PSINV-.YYYY.- + - name: customer + fieldtype: Link + label: Customer + description: The customer who made the purchase in this POS transaction + join_hint: + table: tabCustomer + 'on': customer = tabCustomer.name + - name: customer_name + fieldtype: Data + label: Customer Name + description: Name of the customer who made the purchase at the point of sale. + - name: tax_id + fieldtype: Data + label: Tax Id + description: Tax identification number of the customer for tax reporting and compliance + purposes. + - name: pos_profile + fieldtype: Link + label: POS Profile + description: Configuration profile that determines POS settings like payment methods, + pricing rules, and warehouse for this transaction. + join_hint: + table: tabPOS Profile + 'on': pos_profile = tabPOS Profile.name + - name: consolidated_invoice + fieldtype: Link + label: Consolidated Sales Invoice + description: Reference to the master invoice when multiple POS transactions are + combined into a single consolidated billing document. + join_hint: + table: tabSales Invoice + 'on': consolidated_invoice = tabSales Invoice.name + - name: is_pos + fieldtype: Check + label: Include Payment (POS) + description: Indicates whether this invoice originated from a point-of-sale transaction + rather than a standard sales invoice. + - name: is_return + fieldtype: Check + label: Is Return (Credit Note) + description: Indicates whether this invoice represents a product return or refund + transaction rather than a sale. + - name: update_billed_amount_in_sales_order + fieldtype: Check + label: Update Billed Amount in Sales Order + description: Whether this POS invoice updates the billed amount back to the originating + sales order for tracking fulfillment progress. + - name: update_billed_amount_in_delivery_note + fieldtype: Check + label: Update Billed Amount in Delivery Note + description: Whether this POS invoice updates the billed amount back to the associated + delivery note for reconciling shipped versus invoiced quantities. + - name: company + fieldtype: Link + label: Company + description: The legal entity or business unit that issued this POS invoice for + financial reporting and multi-company operations. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: posting_date + fieldtype: Date + label: Date + description: Date when the POS invoice transaction is officially recorded in accounting + books + - name: posting_time + fieldtype: Time + label: Posting Time + description: Time when the POS invoice transaction is officially recorded in accounting + books + - name: set_posting_time + fieldtype: Check + label: Edit Posting Date and Time + description: Indicates whether the posting date and time were manually specified + instead of using current timestamp + - name: due_date + fieldtype: Date + label: Payment Due Date + description: Date when payment for the POS invoice is expected or required from + the customer. + - name: amended_from + fieldtype: Link + label: Amended From + description: Reference to the original POS invoice that this document amends or + corrects. + join_hint: + table: tabPOS Invoice + 'on': amended_from = tabPOS Invoice.name + - name: return_against + fieldtype: Link + label: Return Against + description: Reference to the original POS invoice for which this document represents + a return or credit. + join_hint: + table: tabPOS Invoice + 'on': return_against = tabPOS Invoice.name + - name: custom_zatca_pos_name + fieldtype: Link + label: ZATCA POS Name + description: Point of sale terminal or device name for Saudi ZATCA tax compliance + and invoice tracking. + join_hint: + table: tabZATCA Multiple Setting + 'on': custom_zatca_pos_name = tabZATCA Multiple Setting.name + - name: project + fieldtype: Link + label: Project + description: Project associated with this POS invoice for project-based revenue + tracking and cost allocation. + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: cost_center + fieldtype: Link + label: Cost Center + description: Cost center assigned to this POS invoice for departmental or location-based + financial reporting. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + - name: po_no + fieldtype: Data + label: Customer's Purchase Order + description: Purchase order number from the customer used to match invoices to + customer PO references or track order fulfillment. + - name: po_date + fieldtype: Date + label: Customer's Purchase Order Date + description: Date of the customer's purchase order used to identify when the order + was placed or filter invoices by PO timing. + - name: customer_address + fieldtype: Link + label: Customer Address + description: Billing or shipping address of the customer used to identify invoice + location, filter by region, or verify delivery details. + join_hint: + table: tabAddress + 'on': customer_address = tabAddress.name + - name: address_display + fieldtype: Small Text + label: Address + description: Formatted billing or shipping address shown on the POS invoice for + customer delivery or correspondence. + - name: contact_person + fieldtype: Link + label: Contact Person + description: Individual person associated with the customer account for this POS + transaction. + join_hint: + table: tabContact + 'on': contact_person = tabContact.name + - name: contact_display + fieldtype: Small Text + label: Contact + description: Formatted customer or contact name displayed on the POS invoice header. + - name: contact_mobile + fieldtype: Data + label: Mobile No + description: Mobile phone number of the customer for this POS transaction, used + when searching invoices by customer contact information. + - name: contact_email + fieldtype: Data + label: Contact Email + description: Email address of the customer for this POS transaction, used when + searching invoices by customer contact details or for receipt delivery. + - name: territory + fieldtype: Link + label: Territory + description: Sales territory or geographic region assigned to this POS invoice, + used for location-based sales analysis and regional performance tracking. + join_hint: + table: tabTerritory + 'on': territory = tabTerritory.name + - name: shipping_address_name + fieldtype: Link + label: Shipping Address Name + description: Name of the person or business receiving the shipment at the delivery + location. + join_hint: + table: tabAddress + 'on': shipping_address_name = tabAddress.name + - name: shipping_address + fieldtype: Small Text + label: Shipping Address + description: Full delivery address where the invoice items are shipped to the + customer. + - name: company_address + fieldtype: Link + label: Company Address Name + description: Address of the company issuing the POS invoice, typically the seller's + business location. + join_hint: + table: tabAddress + 'on': company_address = tabAddress.name + - name: company_address_display + fieldtype: Small Text + label: Company Address + description: Formatted company address appearing on POS invoices for customer-facing + documents and receipts. + - name: company_contact_person + fieldtype: Link + label: Company Contact Person + description: Designated contact person from the company for customer inquiries + related to this POS invoice. + join_hint: + table: tabContact + 'on': company_contact_person = tabContact.name + - name: currency + fieldtype: Link + label: Currency + description: Currency in which the POS invoice transaction amounts are denominated + and processed. + join_hint: + table: tabCurrency + 'on': currency = tabCurrency.name + - name: conversion_rate + fieldtype: Float + label: Exchange Rate + description: Exchange rate applied to convert transaction amounts from price list + currency to company base currency at time of invoice. + - name: selling_price_list + fieldtype: Link + label: Price List + description: Name of the price list used to determine item prices for this POS + invoice. + join_hint: + table: tabPrice List + 'on': selling_price_list = tabPrice List.name + - name: price_list_currency + fieldtype: Link + label: Price List Currency + description: Currency in which the selling price list prices are denominated, + may differ from company base currency. + join_hint: + table: tabCurrency + 'on': price_list_currency = tabCurrency.name + - name: plc_conversion_rate + fieldtype: Float + label: Price List Exchange Rate + description: Exchange rate used to convert price list currency amounts to company + base currency for this invoice. + - name: ignore_pricing_rule + fieldtype: Check + label: Ignore Pricing Rule + description: Whether promotional discounts, volume pricing, and other automatic + pricing rules were bypassed for this invoice. + - name: set_warehouse + fieldtype: Link + label: Source Warehouse + description: Default warehouse location from which all items on this invoice are + fulfilled or shipped. + join_hint: + table: tabWarehouse + 'on': set_warehouse = tabWarehouse.name + - name: update_stock + fieldtype: Check + label: Update Stock + description: Whether this POS invoice automatically updates inventory stock levels + upon submission. + - name: scan_barcode + fieldtype: Data + label: Scan Barcode + description: Barcode value scanned at POS to quickly add items to the invoice. + - name: last_scanned_warehouse + fieldtype: Data + label: Last Scanned Warehouse + description: Warehouse from which the most recently scanned item's stock will + be deducted. + - name: items + fieldtype: Table + label: Items + description: '' + child_hint: + child_table: tabPOS Invoice Item + fieldname: items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: items + - name: pricing_rules + fieldtype: Table + label: Pricing Rule Detail + description: '' + child_hint: + child_table: tabPricing Rule Detail + fieldname: pricing_rules + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: pricing_rules + - name: packed_items + fieldtype: Table + label: Packed Items + description: '' + child_hint: + child_table: tabPacked Item + fieldname: packed_items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: packed_items + - name: timesheets + fieldtype: Table + label: Time Sheets + description: '' + child_hint: + child_table: tabSales Invoice Timesheet + fieldname: timesheets + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: timesheets + - name: total_billing_amount + fieldtype: Currency + label: Total Billing Amount + description: Final amount charged to the customer including all items, taxes, + and adjustments on this POS invoice. + - name: total_qty + fieldtype: Float + label: Total Quantity + description: Sum of quantities across all line items sold in this POS invoice + transaction. + - name: base_total + fieldtype: Currency + label: Total (Company Currency) + description: Grand total of the POS invoice in company's base currency including + taxes and charges. + - name: base_net_total + fieldtype: Currency + label: Net Total (Company Currency) + description: Net total of the POS invoice in company's base currency excluding + taxes but after discounts. + - name: total + fieldtype: Currency + label: Total + description: Grand total of the POS invoice in transaction currency including + taxes and charges. + - name: net_total + fieldtype: Currency + label: Net Total + description: Total invoice amount before applying taxes, discounts, or additional + charges. + - name: total_net_weight + fieldtype: Float + label: Total Net Weight + description: Combined weight of all items in the invoice excluding packaging or + container weight. + - name: taxes_and_charges + fieldtype: Link + label: Sales Taxes and Charges Template + description: Total amount of taxes and additional charges applied to the invoice. + join_hint: + table: tabSales Taxes and Charges Template + 'on': taxes_and_charges = tabSales Taxes and Charges Template.name + - name: shipping_rule + fieldtype: Link + label: Shipping Rule + description: Shipping method or carrier rule applied to calculate delivery charges + for this POS invoice + join_hint: + table: tabShipping Rule + 'on': shipping_rule = tabShipping Rule.name + - name: tax_category + fieldtype: Link + label: Tax Category + description: Tax classification or category that determines which tax rates apply + to items on this invoice + join_hint: + table: tabTax Category + 'on': tax_category = tabTax Category.name + - name: taxes + fieldtype: Table + label: Sales Taxes and Charges + description: '' + child_hint: + child_table: tabSales Taxes and Charges + fieldname: taxes + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: taxes + - name: other_charges_calculation + fieldtype: Text Editor + label: Taxes and Charges Calculation + description: Additional fees or charges beyond standard taxes applied to the POS + invoice, such as shipping, handling, or service fees. + - name: base_total_taxes_and_charges + fieldtype: Currency + label: Total Taxes and Charges (Company Currency) + description: Total of all taxes and charges in the base currency before any currency + conversion. + - name: total_taxes_and_charges + fieldtype: Currency + label: Total Taxes and Charges + description: Total of all taxes and charges in the transaction currency after + applying exchange rates. + - name: loyalty_points + fieldtype: Int + label: Loyalty Points + description: Points earned by the customer from this transaction for future redemption. + - name: loyalty_amount + fieldtype: Currency + label: Loyalty Amount + description: Monetary value equivalent of loyalty points earned on this invoice. + - name: redeem_loyalty_points + fieldtype: Check + label: Redeem Loyalty Points + description: Points redeemed by the customer to reduce payment on this transaction. + - name: loyalty_program + fieldtype: Link + label: Loyalty Program + description: Loyalty program applied to this POS invoice for earning or redeeming + customer rewards points. + join_hint: + table: tabLoyalty Program + 'on': loyalty_program = tabLoyalty Program.name + - name: loyalty_redemption_account + fieldtype: Link + label: Redemption Account + description: General ledger account used to record the financial impact when loyalty + points are redeemed on this invoice. + join_hint: + table: tabAccount + 'on': loyalty_redemption_account = tabAccount.name + - name: loyalty_redemption_cost_center + fieldtype: Link + label: Redemption Cost Center + description: Cost center assigned to track departmental expenses when loyalty + points are redeemed on this invoice. + join_hint: + table: tabCost Center + 'on': loyalty_redemption_cost_center = tabCost Center.name + - name: coupon_code + fieldtype: Link + label: Coupon Code + description: Promotional or discount code applied to the invoice for tracking + which coupon was used. + join_hint: + table: tabCoupon Code + 'on': coupon_code = tabCoupon Code.name + - name: apply_discount_on + fieldtype: Select + label: Apply Additional Discount On + description: Specifies whether the discount applies to grand total or net total, + determining discount calculation basis. + options: + - Grand Total + - Net Total + - name: base_discount_amount + fieldtype: Currency + label: Additional Discount Amount (Company Currency) + description: Discount amount in base currency before any currency conversion or + tax adjustments. + - name: additional_discount_percentage + fieldtype: Float + label: Additional Discount Percentage + description: Percentage discount applied to the entire invoice after line-item + discounts, used when users ask about overall invoice-level discount rates. + - name: discount_amount + fieldtype: Currency + label: Additional Discount Amount + description: Total monetary value of all discounts applied to the invoice, used + when users ask about absolute discount amounts rather than percentages. + - name: base_grand_total + fieldtype: Currency + label: Grand Total (Company Currency) + description: Final invoice total in base currency before applying additional discounts + or taxes, used when users need the subtotal after line items but before invoice-level + adjustments. + - name: base_rounding_adjustment + fieldtype: Currency + label: Rounding Adjustment (Company Currency) + description: Amount added or subtracted to round the invoice total to the nearest + acceptable value in base currency. + - name: base_rounded_total + fieldtype: Currency + label: Rounded Total (Company Currency) + description: Final invoice total after applying rounding adjustment in base currency. + - name: base_in_words + fieldtype: Data + label: In Words (Company Currency) + description: Text representation of the base currency invoice amount spelled out + in words for printing on receipts or invoices. + - name: grand_total + fieldtype: Currency + label: Grand Total + description: Total invoice amount before any rounding adjustments are applied. + - name: rounding_adjustment + fieldtype: Currency + label: Rounding Adjustment + description: Amount added or subtracted to round the grand total to a convenient + figure. + - name: rounded_total + fieldtype: Currency + label: Rounded Total + description: Final invoice amount after applying rounding adjustment to the grand + total. + - name: in_words + fieldtype: Data + label: In Words + description: Total invoice amount expressed as text words for printing on receipts + and invoices. + - name: total_advance + fieldtype: Currency + label: Total Advance + description: Sum of all advance payments received from the customer before or + at the time of this POS invoice. + - name: outstanding_amount + fieldtype: Currency + label: Outstanding Amount + description: Remaining unpaid balance on this POS invoice after applying payments + and advances. + - name: allocate_advances_automatically + fieldtype: Check + label: Allocate Advances Automatically (FIFO) + description: Whether customer advance payments are automatically applied to this + invoice upon creation or submission. + - name: advances + fieldtype: Table + label: Advances + description: '' + child_hint: + child_table: tabSales Invoice Advance + fieldname: advances + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: advances + - name: payment_terms_template + fieldtype: Link + label: Payment Terms Template + description: The predefined payment terms schedule applied to this invoice defining + due dates and installment amounts. + join_hint: + table: tabPayment Terms Template + 'on': payment_terms_template = tabPayment Terms Template.name + - name: payment_schedule + fieldtype: Table + label: Payment Schedule + description: '' + child_hint: + child_table: tabPayment Schedule + fieldname: payment_schedule + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: payment_schedule + - name: cash_bank_account + fieldtype: Link + label: Cash/Bank Account + description: Bank or cash account where payment for this POS invoice will be deposited + or has been received. + join_hint: + table: tabAccount + 'on': cash_bank_account = tabAccount.name + - name: payments + fieldtype: Table + label: Sales Invoice Payment + description: '' + child_hint: + child_table: tabSales Invoice Payment + fieldname: payments + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: payments + - name: base_paid_amount + fieldtype: Currency + label: Paid Amount (Company Currency) + description: Total amount paid by customer in company's base currency before currency + conversion. + - name: paid_amount + fieldtype: Currency + label: Paid Amount + description: Total amount paid by customer in transaction currency. + - name: base_change_amount + fieldtype: Currency + label: Base Change Amount (Company Currency) + description: Change returned to customer in company's base currency when payment + exceeds invoice total. + - name: change_amount + fieldtype: Currency + label: Change Amount + description: Cash returned to customer when payment exceeds invoice total in point + of sale transactions. + - name: account_for_change_amount + fieldtype: Link + label: Account for Change Amount + description: General ledger account where cash change given to customers is recorded. + join_hint: + table: tabAccount + 'on': account_for_change_amount = tabAccount.name + - name: write_off_amount + fieldtype: Currency + label: Write Off Amount + description: Amount forgiven or removed from invoice total due to discrepancies, + damages, or business decisions. + - name: base_write_off_amount + fieldtype: Currency + label: Write Off Amount (Company Currency) + description: Amount written off in base currency when closing an invoice with + small payment discrepancies or rounding differences. + - name: write_off_outstanding_amount_automatically + fieldtype: Check + label: Write Off Outstanding Amount + description: Whether the system automatically writes off small remaining balances + when the invoice is marked as paid. + - name: write_off_account + fieldtype: Link + label: Write Off Account + description: General ledger account where write-off amounts are posted when invoice + balances are written off. + join_hint: + table: tabAccount + 'on': write_off_account = tabAccount.name + - name: write_off_cost_center + fieldtype: Link + label: Write Off Cost Center + description: Cost center assigned when writing off amounts from this POS invoice + for accounting allocation purposes + join_hint: + table: tabCost Center + 'on': write_off_cost_center = tabCost Center.name + - name: tc_name + fieldtype: Link + label: Terms + description: Name of the tax category applied to this POS invoice for tax calculation + and compliance + join_hint: + table: tabTerms and Conditions + 'on': tc_name = tabTerms and Conditions.name + - name: terms + fieldtype: Text Editor + label: Terms and Conditions Details + description: Payment terms defining when payment is due for this POS invoice + - name: letter_head + fieldtype: Link + label: Letter Head + description: Letterhead template used for printing or displaying the POS invoice + header with company branding and contact information. + join_hint: + table: tabLetter Head + 'on': letter_head = tabLetter Head.name + - name: group_same_items + fieldtype: Check + label: Group same items + description: Indicates whether identical items in the invoice are consolidated + into a single line with combined quantity. + - name: language + fieldtype: Data + label: Print Language + description: Language in which the POS invoice content and labels are displayed + or printed. + - name: select_print_heading + fieldtype: Link + label: Print Heading + description: Custom heading text that appears on printed POS invoice documents + instead of the default heading. + join_hint: + table: tabPrint Heading + 'on': select_print_heading = tabPrint Heading.name + - name: inter_company_invoice_reference + fieldtype: Link + label: Inter Company Invoice Reference + description: Links this POS invoice to a corresponding invoice in another company + entity for inter-company transactions. + join_hint: + table: tabPurchase Invoice + 'on': inter_company_invoice_reference = tabPurchase Invoice.name + - name: customer_group + fieldtype: Link + label: Customer Group + description: Classification or category of the customer making the purchase, used + for segmentation and group-based analysis. + join_hint: + table: tabCustomer Group + 'on': customer_group = tabCustomer Group.name + - name: campaign + fieldtype: Link + label: Campaign + description: Marketing or promotional campaign associated with the POS transaction + for tracking sales by promotion or offer. + join_hint: + table: tabCampaign + 'on': campaign = tabCampaign.name + - name: is_discounted + fieldtype: Check + label: Is Discounted + description: Whether any discount was applied to the invoice, used to identify + discounted versus full-price transactions. + - name: status + fieldtype: Select + label: Status + description: Current state of the POS invoice such as draft, paid, cancelled, + or returned. + options: + - Draft + - Return + - Credit Note Issued + - Consolidated + - Submitted + - Paid + - Unpaid + - Unpaid and Discounted + - Overdue and Discounted + - Overdue + - Cancelled + - name: source + fieldtype: Link + label: Source + description: Identifies the originating system or module that created this POS + invoice, such as mobile app, web portal, or third-party integration. + join_hint: + table: tabLead Source + 'on': source = tabLead Source.name + - name: debit_to + fieldtype: Link + label: Debit To + description: The receivable account that will be debited for the total invoice + amount owed by the customer. + join_hint: + table: tabAccount + 'on': debit_to = tabAccount.name + - name: party_account_currency + fieldtype: Link + label: Party Account Currency + description: The currency in which the customer's account balance and transactions + are maintained, which may differ from the invoice transaction currency. + join_hint: + table: tabCurrency + 'on': party_account_currency = tabCurrency.name + - name: is_opening + fieldtype: Select + label: Is Opening Entry + description: Indicates whether this POS invoice is an opening balance entry for + migration or initial setup purposes. + options: + - 'No' + - 'Yes' + - name: remarks + fieldtype: Small Text + label: Remarks + description: Free-text comments or notes about the POS transaction, often used + when searching for specific transaction details or special instructions. + - name: sales_partner + fieldtype: Link + label: Sales Partner + description: The partner, agent, or third-party entity credited with or associated + with this sale for commission or referral tracking. + join_hint: + table: tabSales Partner + 'on': sales_partner = tabSales Partner.name + - name: amount_eligible_for_commission + fieldtype: Currency + label: Amount Eligible for Commission + description: Sales amount that qualifies for commission calculation, excluding + non-commissionable items or discounts. + - name: commission_rate + fieldtype: Float + label: Commission Rate (%) + description: Percentage rate applied to eligible sales amount to calculate commission + earned. + - name: total_commission + fieldtype: Currency + label: Total Commission + description: Final commission amount earned on this invoice, calculated from eligible + amount and rate. + - name: sales_team + fieldtype: Table + label: Sales Team + description: '' + child_hint: + child_table: tabSales Team + fieldname: sales_team + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: sales_team + - name: from_date + fieldtype: Date + label: From Date + description: Start date of the period covered by this POS invoice + - name: to_date + fieldtype: Date + label: To Date + description: End date of the period covered by this POS invoice + - name: auto_repeat + fieldtype: Link + label: Auto Repeat + description: Indicates if this invoice is part of a recurring billing schedule + or subscription. + join_hint: + table: tabAuto Repeat + 'on': auto_repeat = tabAuto Repeat.name + - name: against_income_account + fieldtype: Small Text + label: Against Income Account + description: The revenue or income account credited when this invoice is posted. + - name: custom_zatca_full_response + fieldtype: Long Text + label: ZATCA Full Response + description: Complete response data from Saudi Arabia's ZATCA e-invoicing system + for compliance verification. + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per POS Invoice document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabPOS Invoice Item + description: '' + fields: + - name: barcode + fieldtype: Data + label: Barcode + description: Barcode scanned or entered for the item at point of sale + - name: has_item_scanned + fieldtype: Check + label: Has Item Scanned + description: Whether the item was added by scanning a barcode versus manual entry + - name: item_code + fieldtype: Link + label: Item + description: Internal product identifier used when searching for items sold through + point of sale by SKU or internal code. + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: item_name + fieldtype: Data + label: Item Name + description: Product name or description used when searching for items sold at + POS by their display name or label. + - name: customer_item_code + fieldtype: Data + label: Customer's Item Code + description: Customer's own product identifier or reference number used when customers + have custom SKUs or part numbers for items they purchase. + - name: description + fieldtype: Text Editor + label: Description + description: Text description of the product or service sold in the POS transaction, + used when searching for items by name or details. + - name: item_group + fieldtype: Link + label: Item Group + description: Category or classification grouping of the item, used for filtering + sales by product type or analyzing category performance. + join_hint: + table: tabItem Group + 'on': item_group = tabItem Group.name + - name: brand + fieldtype: Data + label: Brand Name + description: Manufacturer or brand name of the item sold, used for brand-specific + sales analysis or filtering transactions by brand. + - name: qty + fieldtype: Float + label: Quantity + description: Quantity of the item sold in this POS invoice line. + - name: stock_uom + fieldtype: Link + label: Stock UOM + description: Unit of measurement for the item quantity in this POS transaction. + join_hint: + table: tabUOM + 'on': stock_uom = tabUOM.name + - name: uom + fieldtype: Link + label: UOM + description: Unit of measurement for the item as sold in this POS transaction + (e.g., Box, Kg, Piece). + join_hint: + table: tabUOM + 'on': uom = tabUOM.name + - name: conversion_factor + fieldtype: Float + label: UOM Conversion Factor + description: Multiplier to convert the sold UOM quantity into the base stock UOM + quantity. + - name: stock_qty + fieldtype: Float + label: Qty as per Stock UOM + description: Quantity of the item in base stock units after applying the conversion + factor from the sold UOM. + - name: price_list_rate + fieldtype: Currency + label: Price List Rate + description: Item selling price from the price list in transaction currency before + any discounts or margin adjustments. + - name: base_price_list_rate + fieldtype: Currency + label: Price List Rate (Company Currency) + description: Item selling price from the price list converted to company base + currency. + - name: margin_type + fieldtype: Select + label: Margin Type + description: Whether profit margin is calculated as a percentage or fixed amount + on this item. + options: + - Percentage + - Amount + - name: margin_rate_or_amount + fieldtype: Float + label: Margin Rate or Amount + description: Markup added to item cost to determine selling price, either as percentage + or absolute amount. + - name: rate_with_margin + fieldtype: Currency + label: Rate With Margin + description: Final item price after applying margin but before discounts. + - name: discount_percentage + fieldtype: Percent + label: Discount (%) on Price List Rate with Margin + description: Percentage reduction applied to item price at point of sale. + - name: discount_amount + fieldtype: Currency + label: Discount Amount + description: Direct discount applied to this line item, used when calculating + item-level price reductions or promotional discounts. + - name: distributed_discount_amount + fieldtype: Currency + label: Distributed Discount Amount + description: Portion of invoice-level or header discount allocated to this line + item, used when analyzing how total discounts are spread across items. + - name: base_rate_with_margin + fieldtype: Currency + label: Rate With Margin (Company Currency) + description: Item rate including margin markup before discounts, used when analyzing + profit margins or comparing selling price to base cost. + - name: rate + fieldtype: Currency + label: Rate + description: Unit price of the item before applying quantity or discounts. + - name: amount + fieldtype: Currency + label: Amount + description: Total line item value after applying quantity and discounts but before + taxes. + - name: item_tax_template + fieldtype: Link + label: Item Tax Template + description: Tax configuration template applied to this specific item to determine + applicable tax rates and rules. + join_hint: + table: tabItem Tax Template + 'on': item_tax_template = tabItem Tax Template.name + - name: base_rate + fieldtype: Currency + label: Rate (Company Currency) + description: Unit price of the item before applying pricing rules, discounts, + or currency conversion. + - name: base_amount + fieldtype: Currency + label: Amount (Company Currency) + description: Total line amount before applying pricing rules, discounts, or currency + conversion. + - name: pricing_rules + fieldtype: Small Text + label: Pricing Rules + description: Specific promotional or conditional pricing rules applied to this + invoice line item. + - name: is_free_item + fieldtype: Check + label: Is Free Item + description: Indicates whether the item was given at no charge as a promotional + or complimentary item. + - name: grant_commission + fieldtype: Check + label: Grant Commission + description: Indicates whether this item qualifies for sales commission calculation. + - name: net_rate + fieldtype: Currency + label: Net Rate + description: Final price per unit after applying all discounts and adjustments + but before taxes. + - name: net_amount + fieldtype: Currency + label: Net Amount + description: Line item amount after item-level discounts but before taxes, in + transaction currency. + - name: base_net_rate + fieldtype: Currency + label: Net Rate (Company Currency) + description: Per-unit price after item-level discounts in company base currency, + used for multi-currency reporting. + - name: base_net_amount + fieldtype: Currency + label: Net Amount (Company Currency) + description: Line item amount after item-level discounts but before taxes, converted + to company base currency for consolidated reporting. + - name: delivered_by_supplier + fieldtype: Check + label: Delivered By Supplier + description: Indicates whether the item was directly shipped/delivered by the + supplier rather than from own inventory. + - name: income_account + fieldtype: Link + label: Income Account + description: The general ledger account where revenue from selling this item is + recorded. + join_hint: + table: tabAccount + 'on': income_account = tabAccount.name + - name: is_fixed_asset + fieldtype: Check + label: Is Fixed Asset + description: Indicates whether the item sold is a fixed asset (equipment, machinery, + property) rather than regular inventory or service. + - name: asset + fieldtype: Link + label: Asset + description: Fixed asset item being sold or transferred in this POS transaction + line. + join_hint: + table: tabAsset + 'on': asset = tabAsset.name + - name: finance_book + fieldtype: Link + label: Finance Book + description: Accounting book or entity for recording this POS item's financial + impact when multiple books are maintained. + join_hint: + table: tabFinance Book + 'on': finance_book = tabFinance Book.name + - name: expense_account + fieldtype: Link + label: Expense Account + description: General ledger account to record the cost or expense associated with + this POS item. + join_hint: + table: tabAccount + 'on': expense_account = tabAccount.name + - name: deferred_revenue_account + fieldtype: Link + label: Deferred Revenue Account + description: Accounting ledger account where revenue from this item is deferred + until earned over time. + join_hint: + table: tabAccount + 'on': deferred_revenue_account = tabAccount.name + - name: service_stop_date + fieldtype: Date + label: Service Stop Date + description: End date of the service period for this item, used to calculate revenue + recognition and service duration. + - name: enable_deferred_revenue + fieldtype: Check + label: Enable Deferred Revenue + description: Indicates whether this item's revenue should be recognized over time + rather than immediately at sale. + - name: service_start_date + fieldtype: Date + label: Service Start Date + description: Start date of service period for subscription or time-based items + sold through POS. + - name: service_end_date + fieldtype: Date + label: Service End Date + description: End date of service period for subscription or time-based items sold + through POS. + - name: weight_per_unit + fieldtype: Float + label: Weight Per Unit + description: Physical weight of a single unit of the item, used for shipping calculations + and logistics queries. + - name: total_weight + fieldtype: Float + label: Total Weight + description: Combined weight of all quantities of this item on the POS invoice + line, used when calculating shipping costs or logistics requirements. + - name: weight_uom + fieldtype: Link + label: Weight UOM + description: Unit of measurement for the item's weight (kg, lbs, grams), used + to interpret total_weight values. + join_hint: + table: tabUOM + 'on': weight_uom = tabUOM.name + - name: warehouse + fieldtype: Link + label: Warehouse + description: Storage location or facility from which this item was fulfilled or + inventory was deducted for the POS sale. + join_hint: + table: tabWarehouse + 'on': warehouse = tabWarehouse.name + - name: target_warehouse + fieldtype: Link + label: Customer Warehouse (Optional) + description: Warehouse where inventory from this POS invoice item will be delivered + or allocated. + join_hint: + table: tabWarehouse + 'on': target_warehouse = tabWarehouse.name + - name: quality_inspection + fieldtype: Link + label: Quality Inspection + description: Reference to quality inspection record required or performed for + this item before delivery. + join_hint: + table: tabQuality Inspection + 'on': quality_inspection = tabQuality Inspection.name + - name: serial_and_batch_bundle + fieldtype: Link + label: Serial and Batch Bundle + description: Bundle containing serial numbers or batch numbers assigned to this + specific item in the transaction. + join_hint: + table: tabSerial and Batch Bundle + 'on': serial_and_batch_bundle = tabSerial and Batch Bundle.name + - name: use_serial_batch_fields + fieldtype: Check + label: Use Serial No / Batch Fields + description: Indicates whether this invoice item tracks serial numbers or batch + numbers for inventory control and traceability. + - name: allow_zero_valuation_rate + fieldtype: Check + label: Allow Zero Valuation Rate + description: Indicates whether this item can be invoiced with zero valuation cost, + typically for free samples, promotional items, or non-stock items. + - name: item_tax_rate + fieldtype: Small Text + label: Item Tax Rate + description: Tax rates and percentages applied specifically to this invoice line + item, overriding default tax templates when item-specific taxation is needed. + - name: actual_batch_qty + fieldtype: Float + label: Available Batch Qty at Warehouse + description: Quantity of items from a specific batch used in this POS invoice + line item. + - name: actual_qty + fieldtype: Float + label: Available Qty at Warehouse + description: Total quantity of items sold in this POS invoice line item, regardless + of batch or serial number. + - name: serial_no + fieldtype: Text + label: Serial No + description: Specific serial number identifier for individually tracked items + sold in this POS invoice line item. + - name: batch_no + fieldtype: Link + label: Batch No + description: Batch number for inventory tracking of serialized or lot-controlled + items sold in this invoice line. + join_hint: + table: tabBatch + 'on': batch_no = tabBatch.name + - name: sales_order + fieldtype: Link + label: Sales Order + description: Reference to the originating sales order that this invoice item fulfills + or bills against. + join_hint: + table: tabSales Order + 'on': sales_order = tabSales Order.name + - name: so_detail + fieldtype: Data + label: Sales Order Item + description: Specific line item from the sales order that corresponds to this + invoice item. + - name: pos_invoice_item + fieldtype: Data + label: POS Invoice Item + description: Individual line item on a point-of-sale invoice representing a product + or service sold in a retail transaction. + - name: delivery_note + fieldtype: Link + label: Delivery Note + description: Reference to the delivery note document associated with this invoice + item when goods are shipped or delivered. + join_hint: + table: tabDelivery Note + 'on': delivery_note = tabDelivery Note.name + - name: dn_detail + fieldtype: Data + label: Delivery Note Item + description: Specific line item from the delivery note that corresponds to this + invoice item, linking shipped goods to billed items. + - name: delivered_qty + fieldtype: Float + label: Delivered Qty + description: Quantity of items actually delivered to the customer in this POS + invoice line, relevant for tracking fulfillment and delivery completion. + - name: cost_center + fieldtype: Link + label: Cost Center + description: Cost center assigned to this POS invoice item for internal expense + allocation and departmental accounting. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + - name: project + fieldtype: Link + label: Project + description: Project linked to this POS invoice item for tracking revenue and + costs against specific projects or jobs. + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: page_break + fieldtype: Check + label: Page Break + description: Indicates whether a page break should occur before this item when + printing the POS invoice. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabPOS Invoice Item). + Comparison-ready across parent records.' +- table: tabPOS Invoice Merge Log + description: '' + fields: + - name: company + fieldtype: Link + label: Company + description: Company entity where the POS invoice merge was executed + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: posting_date + fieldtype: Date + label: Posting Date + description: Accounting date when the merged POS invoices were posted to the general + ledger + - name: posting_time + fieldtype: Time + label: Posting Time + description: Time when the merged POS invoice was posted, used to filter or identify + when invoice consolidation occurred. + - name: merge_invoices_based_on + fieldtype: Select + label: Merge Invoices Based On + description: Criteria used to group and consolidate POS invoices such as customer + or payment method. + options: + - Customer + - Customer Group + - name: pos_closing_entry + fieldtype: Link + label: POS Closing Entry + description: Reference to the POS closing entry that triggered this invoice merge + operation. + join_hint: + table: tabPOS Closing Entry + 'on': pos_closing_entry = tabPOS Closing Entry.name + - name: customer + fieldtype: Link + label: Customer + description: The customer account associated with the merged POS invoices. + join_hint: + table: tabCustomer + 'on': customer = tabCustomer.name + - name: customer_group + fieldtype: Link + label: Customer Group + description: The customer group classification for the customer whose POS invoices + were merged. + join_hint: + table: tabCustomer Group + 'on': customer_group = tabCustomer Group.name + - name: pos_invoices + fieldtype: Table + label: POS Invoices + description: '' + child_hint: + child_table: tabPOS Invoice Reference + fieldname: pos_invoices + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: pos_invoices + - name: consolidated_invoice + fieldtype: Link + label: Consolidated Sales Invoice + description: The final merged invoice created when combining multiple POS invoices + into a single consolidated document. + join_hint: + table: tabSales Invoice + 'on': consolidated_invoice = tabSales Invoice.name + - name: consolidated_credit_note + fieldtype: Link + label: Consolidated Credit Note + description: The final merged credit note created when combining multiple POS + credit notes into a single consolidated document. + join_hint: + table: tabSales Invoice + 'on': consolidated_credit_note = tabSales Invoice.name + - name: amended_from + fieldtype: Link + label: Amended From + description: The previous version of this merge log entry if it was corrected + or modified after initial creation. + join_hint: + table: tabPOS Invoice Merge Log + 'on': amended_from = tabPOS Invoice Merge Log.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per POS Invoice Merge Log document (master/transaction). Use + only for single-entity lookups, not cross-record comparison unless fields are + per-relationship (e.g. supplier, price_list).' +- table: tabPOS Invoice Reference + description: '' + fields: + - name: pos_invoice + fieldtype: Link + label: POS Invoice + description: Links to the actual POS invoice document being referenced + join_hint: + table: tabPOS Invoice + 'on': pos_invoice = tabPOS Invoice.name + - name: posting_date + fieldtype: Date + label: Date + description: Date when the POS invoice transaction was posted to accounts + - name: customer + fieldtype: Link + label: Customer + description: Customer name or ID associated with the POS invoice for filtering + sales by customer or analyzing customer purchase history. + join_hint: + table: tabCustomer + 'on': customer = tabCustomer.name + - name: grand_total + fieldtype: Currency + label: Amount + description: Final total amount of the POS invoice including all items, taxes, + and discounts for revenue analysis and sales reporting. + - name: is_return + fieldtype: Check + label: Is Return + description: Indicates whether the POS invoice represents a product return or + refund transaction rather than a sale. + - name: return_against + fieldtype: Link + label: Return Against + description: Original POS invoice number that this return or credit note is issued + against + join_hint: + table: tabPOS Invoice + 'on': return_against = tabPOS Invoice.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabPOS Invoice Reference). + Comparison-ready across parent records.' +- table: tabPOS Item Group + description: '' + fields: + - name: item_group + fieldtype: Link + label: Item Group + description: The inventory item group or category that this POS item group is + linked to for product classification and pricing. + join_hint: + table: tabItem Group + 'on': item_group = tabItem Group.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabPOS Item Group). + Comparison-ready across parent records.' +- table: tabPOS Opening Entry + description: '' + fields: + - name: period_start_date + fieldtype: Datetime + label: Period Start Date + description: Date when the POS shift or opening period begins, used to filter + transactions or reconciliations by shift start time. + - name: period_end_date + fieldtype: Date + label: Period End Date + description: Date when the POS shift or opening period ends, used to calculate + shift duration or filter closing activities. + - name: status + fieldtype: Select + label: Status + description: Current state of the POS opening entry such as draft, submitted, + or cancelled. + options: + - Draft + - Open + - Closed + - Cancelled + - name: posting_date + fieldtype: Date + label: Posting Date + description: The accounting date when the POS opening transaction is recorded + in the financial ledger. + - name: set_posting_date + fieldtype: Check + label: Set Posting Date + description: Whether the posting date is manually specified or automatically determined + by the system. + - name: company + fieldtype: Link + label: Company + description: The company entity for which this POS opening entry is recorded. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: pos_profile + fieldtype: Link + label: POS Profile + description: The POS profile configuration that defines settings and defaults + for this POS opening session. + join_hint: + table: tabPOS Profile + 'on': pos_profile = tabPOS Profile.name + - name: pos_closing_entry + fieldtype: Data + label: POS Closing Entry + description: Links to the corresponding POS closing entry that finalizes this + opening session. + - name: user + fieldtype: Link + label: Cashier + description: The cashier or employee assigned to operate this POS register during + the shift. + join_hint: + table: tabUser + 'on': user = tabUser.name + - name: balance_details + fieldtype: Table + label: Opening Balance Details + description: '' + child_hint: + child_table: tabPOS Opening Entry Detail + fieldname: balance_details + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: balance_details + - name: amended_from + fieldtype: Link + label: Amended From + description: Reference to the previous POS opening entry that this document corrects + or replaces. + join_hint: + table: tabPOS Opening Entry + 'on': amended_from = tabPOS Opening Entry.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per POS Opening Entry document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabPOS Opening Entry Detail + description: '' + fields: + - name: mode_of_payment + fieldtype: Link + label: Mode of Payment + description: Payment method (cash, card, etc.) being tracked in this opening entry + line item + join_hint: + table: tabMode of Payment + 'on': mode_of_payment = tabMode of Payment.name + - name: opening_amount + fieldtype: Currency + label: Opening Amount + description: Starting balance amount for the specific payment mode when the POS + shift or register was opened + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabPOS Opening Entry + Detail). Comparison-ready across parent records.' +- table: tabPOS Payment Method + description: '' + fields: + - name: default + fieldtype: Check + label: Default + description: Whether this payment method is automatically selected when creating + a new POS transaction + - name: allow_in_returns + fieldtype: Check + label: Allow In Returns + description: Whether this payment method can be used when processing customer + returns or refunds + - name: mode_of_payment + fieldtype: Link + label: Mode of Payment + description: The payment method name or type used for POS transactions such as + cash, credit card, debit card, mobile payment, or gift card. + join_hint: + table: tabMode of Payment + 'on': mode_of_payment = tabMode of Payment.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabPOS Payment Method). + Comparison-ready across parent records.' +- table: tabPOS Profile + description: '' + fields: + - name: company + fieldtype: Link + label: Company + description: Company entity that owns or operates this POS profile + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: customer + fieldtype: Link + label: Customer + description: Default customer account assigned to transactions when no specific + customer is selected at this POS terminal + join_hint: + table: tabCustomer + 'on': customer = tabCustomer.name + - name: disabled + fieldtype: Check + label: Disabled + description: Indicates whether this POS profile is currently inactive or unavailable + for transactions. + - name: warehouse + fieldtype: Link + label: Warehouse + description: Default warehouse from which inventory is drawn for sales made through + this POS profile. + join_hint: + table: tabWarehouse + 'on': warehouse = tabWarehouse.name + - name: campaign + fieldtype: Link + label: Campaign + description: Marketing or promotional campaign associated with this POS profile + for tracking sales by promotion or offer period. + join_hint: + table: tabCampaign + 'on': campaign = tabCampaign.name + - name: company_address + fieldtype: Link + label: Company Address + description: Physical address of the company location where this POS profile operates, + used to identify store or outlet location. + join_hint: + table: tabAddress + 'on': company_address = tabAddress.name + - name: applicable_for_users + fieldtype: Table + label: Applicable for Users + description: '' + child_hint: + child_table: tabPOS Profile User + fieldname: applicable_for_users + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: applicable_for_users + - name: payments + fieldtype: Table + label: Payment Methods + description: '' + child_hint: + child_table: tabPOS Payment Method + fieldname: payments + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: payments + - name: hide_images + fieldtype: Check + label: Hide Images + description: Controls whether product images are displayed in the POS interface. + - name: hide_unavailable_items + fieldtype: Check + label: Hide Unavailable Items + description: Controls whether out-of-stock or unavailable products are shown in + the POS interface. + - name: auto_add_item_to_cart + fieldtype: Check + label: Automatically Add Filtered Item To Cart + description: Whether items are automatically added to cart when scanned or selected + at point of sale + - name: validate_stock_on_save + fieldtype: Check + label: Validate Stock on Save + description: Whether inventory availability is checked before completing a POS + transaction + - name: print_receipt_on_order_complete + fieldtype: Check + label: Print Receipt on Order Complete + description: Whether receipt automatically prints when a POS order is finalized + - name: update_stock + fieldtype: Check + label: Update Stock + description: Whether inventory levels are automatically adjusted when transactions + are processed through this POS profile + - name: ignore_pricing_rule + fieldtype: Check + label: Ignore Pricing Rule + description: Whether promotional discounts and pricing rules are bypassed for + sales made using this POS profile + - name: allow_rate_change + fieldtype: Check + label: Allow User to Edit Rate + description: Whether cashiers can manually modify item prices during checkout + at this POS terminal + - name: allow_discount_change + fieldtype: Check + label: Allow User to Edit Discount + description: Whether cashiers can modify discount amounts during checkout transactions. + - name: disable_grand_total_to_default_mop + fieldtype: Check + label: Disable auto setting Grand Total to default Payment Mode + description: Whether the system prevents automatically applying the invoice total + to the default payment method. + - name: allow_partial_payment + fieldtype: Check + label: Allow Partial Payment + description: Whether customers can pay invoices in multiple installments or split + payments across methods. + - name: item_groups + fieldtype: Table + label: Item Groups + description: '' + child_hint: + child_table: tabPOS Item Group + fieldname: item_groups + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: item_groups + - name: customer_groups + fieldtype: Table + label: Customer Groups + description: '' + child_hint: + child_table: tabPOS Customer Group + fieldname: customer_groups + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: customer_groups + - name: print_format + fieldtype: Link + label: Print Format + description: Determines the receipt or invoice template layout used when printing + from this POS profile. + join_hint: + table: tabPrint Format + 'on': print_format = tabPrint Format.name + - name: letter_head + fieldtype: Link + label: Letter Head + description: Letterhead template used for printed POS receipts and invoices from + this profile + join_hint: + table: tabLetter Head + 'on': letter_head = tabLetter Head.name + - name: tc_name + fieldtype: Link + label: Terms and Conditions + description: Terms and conditions template applied to POS transactions using this + profile + join_hint: + table: tabTerms and Conditions + 'on': tc_name = tabTerms and Conditions.name + - name: select_print_heading + fieldtype: Link + label: Print Heading + description: Custom heading text displayed on printed POS documents instead of + default title + join_hint: + table: tabPrint Heading + 'on': select_print_heading = tabPrint Heading.name + - name: selling_price_list + fieldtype: Link + label: Price List + description: Price list applied to sales transactions at this POS location to + determine item selling prices + join_hint: + table: tabPrice List + 'on': selling_price_list = tabPrice List.name + - name: currency + fieldtype: Link + label: Currency + description: Currency in which transactions are processed and recorded at this + POS profile + join_hint: + table: tabCurrency + 'on': currency = tabCurrency.name + - name: write_off_account + fieldtype: Link + label: Write Off Account + description: Account used to record small discrepancies or rounding differences + when closing POS transactions + join_hint: + table: tabAccount + 'on': write_off_account = tabAccount.name + - name: write_off_cost_center + fieldtype: Link + label: Write Off Cost Center + description: Cost center assigned to write-off transactions when discrepancies + or losses occur at point of sale. + join_hint: + table: tabCost Center + 'on': write_off_cost_center = tabCost Center.name + - name: write_off_limit + fieldtype: Currency + label: Write Off Limit + description: Maximum amount that can be written off in a single POS transaction + without requiring additional approval. + - name: account_for_change_amount + fieldtype: Link + label: Account for Change Amount + description: General ledger account where cash change given to customers is recorded + during POS transactions. + join_hint: + table: tabAccount + 'on': account_for_change_amount = tabAccount.name + - name: disable_rounded_total + fieldtype: Check + label: Disable Rounded Total + description: Whether invoice totals should not be rounded to nearest currency + unit at point of sale. + - name: income_account + fieldtype: Link + label: Income Account + description: Default general ledger account where sales revenue from POS transactions + is recorded. + join_hint: + table: tabAccount + 'on': income_account = tabAccount.name + - name: expense_account + fieldtype: Link + label: Expense Account + description: Default general ledger account where costs or expenses related to + POS operations are recorded. + join_hint: + table: tabAccount + 'on': expense_account = tabAccount.name + - name: taxes_and_charges + fieldtype: Link + label: Taxes and Charges + description: Tax template or rule set applied to transactions at this point of + sale location + join_hint: + table: tabSales Taxes and Charges Template + 'on': taxes_and_charges = tabSales Taxes and Charges Template.name + - name: tax_category + fieldtype: Link + label: Tax Category + description: Classification determining which tax rates apply based on customer + type, product category, or jurisdiction + join_hint: + table: tabTax Category + 'on': tax_category = tabTax Category.name + - name: apply_discount_on + fieldtype: Select + label: Apply Discount On + description: Whether discounts calculate from grand total or net total before + taxes + options: + - Grand Total + - Net Total + - name: cost_center + fieldtype: Link + label: Cost Center + description: Cost center to which POS transactions are allocated for accounting + and expense tracking purposes. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + - name: project + fieldtype: Link + label: Project + description: Project to which POS transactions are linked for project-based revenue + or cost allocation. + join_hint: + table: tabProject + 'on': project = tabProject.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per POS Profile document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabPOS Profile User + description: '' + fields: + - name: default + fieldtype: Check + label: Default + description: Indicates whether this is the default POS profile assigned to the + user + - name: user + fieldtype: Link + label: User + description: The specific user account linked to this POS profile assignment + join_hint: + table: tabUser + 'on': user = tabUser.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabPOS Profile User). + Comparison-ready across parent records.' +- table: tabPOS Search Fields + description: '' + fields: + - name: field + fieldtype: Select + label: Field + description: Technical field identifier used when mapping or referencing the actual + database column for POS search operations. + - name: fieldname + fieldtype: Data + label: Fieldname + description: System field name used when programmatically accessing or querying + specific POS search attributes in reports or integrations. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabPOS Search Fields). + Comparison-ready across parent records.' +- table: tabPSOA Cost Center + description: '' + fields: + - name: cost_center_name + fieldtype: Link + label: Cost Center + description: Full descriptive name of the cost center used when searching by department + name or organizational unit description + join_hint: + table: tabCost Center + 'on': cost_center_name = tabCost Center.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabPSOA Cost Center). + Comparison-ready across parent records.' +- table: tabPSOA Project + description: '' + fields: + - name: project_name + fieldtype: Link + label: Project + description: Full descriptive title of the project used when searching or filtering + by project description + join_hint: + table: tabProject + 'on': project_name = tabProject.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabPSOA Project). + Comparison-ready across parent records.' +- table: tabPackage + description: '' + fields: + - name: package_name + fieldtype: Data + label: Package Name + description: Display name of the package, used when searching for or identifying + packages by their business name. + - name: license_type + fieldtype: Select + label: License Type + description: Category or type of software license, used to filter packages by + licensing model or compliance requirements. + options: + - MIT License + - GNU General Public License + - GNU Affero General Public License + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Package document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabPackage Import + description: '' + fields: + - name: activate + fieldtype: Check + label: Activate + description: Flag indicating whether to activate the package after import, used + when controlling post-import behavior. + - name: force + fieldtype: Check + label: Force + description: Flag to force import even if conflicts exist, used when overriding + validation or compatibility checks. + - name: log + fieldtype: Code + label: Log + description: Import execution log containing messages and errors, used for troubleshooting + failed or problematic imports. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Package Import document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabPackage Release + description: '' + fields: + - name: package + fieldtype: Link + label: Package + description: Name or identifier of the software package being released. + join_hint: + table: tabPackage + 'on': package = tabPackage.name + - name: publish + fieldtype: Check + label: Publish + description: Flag indicating whether this package release is published and available + for deployment. + - name: path + fieldtype: Small Text + label: Path + description: File system or repository path where this package release is stored. + - name: major + fieldtype: Int + label: Major + description: Major version number used to identify breaking changes in the release. + - name: minor + fieldtype: Int + label: Minor + description: Minor version number used to identify feature additions in the release. + - name: patch + fieldtype: Int + label: Patch + description: Patch version number used to identify bug fixes in the release. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Package Release document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabPacked Item + description: '' + fields: + - name: parent_item + fieldtype: Link + label: Parent Item + description: The main item or bundle that contains this packed item as a component + join_hint: + table: tabItem + 'on': parent_item = tabItem.name + - name: item_code + fieldtype: Link + label: Item Code + description: The specific item being packed or included within the parent item + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: item_name + fieldtype: Data + label: Item Name + description: Name of the packed item product or SKU being stored or shipped. + - name: description + fieldtype: Text Editor + label: Description + description: Detailed text description or specifications of the packed item. + - name: warehouse + fieldtype: Link + label: From Warehouse + description: Warehouse location where the packed item is stored or managed. + join_hint: + table: tabWarehouse + 'on': warehouse = tabWarehouse.name + - name: target_warehouse + fieldtype: Link + label: To Warehouse (Optional) + description: Warehouse where the packed item will be stored or delivered after + packing. + join_hint: + table: tabWarehouse + 'on': target_warehouse = tabWarehouse.name + - name: conversion_factor + fieldtype: Float + label: Conversion Factor + description: Multiplier used to convert between the packed item's unit of measure + and the base unit. + - name: qty + fieldtype: Float + label: Qty + description: Quantity of the item in the packed configuration or bundle. + - name: rate + fieldtype: Currency + label: Rate + description: Price or cost per unit for this packed item in the bundle or package. + - name: uom + fieldtype: Link + label: UOM + description: Unit of measurement for the packed item quantity (e.g., box, kg, + pieces). + join_hint: + table: tabUOM + 'on': uom = tabUOM.name + - name: use_serial_batch_fields + fieldtype: Check + label: Use Serial No / Batch Fields + description: Whether this packed item requires serial number or batch tracking + for inventory control. + - name: serial_and_batch_bundle + fieldtype: Link + label: Serial and Batch Bundle + description: Bundle identifier linking multiple serial numbers or batch numbers + together for a packed item shipment or transaction. + join_hint: + table: tabSerial and Batch Bundle + 'on': serial_and_batch_bundle = tabSerial and Batch Bundle.name + - name: delivered_by_supplier + fieldtype: Check + label: Supplier delivers to Customer + description: Supplier or vendor name that physically delivered this packed item + to the warehouse or customer. + - name: serial_no + fieldtype: Text + label: Serial No + description: Unique serial number assigned to an individual packed item unit for + tracking and identification purposes. + - name: batch_no + fieldtype: Link + label: Batch No + description: Batch number assigned to the packed items for tracking and traceability + purposes. + join_hint: + table: tabBatch + 'on': batch_no = tabBatch.name + - name: actual_batch_qty + fieldtype: Float + label: Actual Batch Quantity + description: Actual quantity of items packed at the batch level, representing + the total count for the entire batch. + - name: actual_qty + fieldtype: Float + label: Actual Qty + description: Actual quantity of individual items packed, representing the item-level + count within the packing operation. + - name: projected_qty + fieldtype: Float + label: Projected Qty + description: Estimated or planned quantity expected to be packed for this item. + - name: ordered_qty + fieldtype: Float + label: Ordered Qty + description: Quantity of this item that was originally ordered by the customer. + - name: packed_qty + fieldtype: Float + label: Packed Qty + description: Actual quantity of this item that has been physically packed and + ready for shipment. + - name: incoming_rate + fieldtype: Currency + label: Incoming Rate + description: Rate or price per unit of the item when it was received or purchased + into inventory. + - name: picked_qty + fieldtype: Float + label: Picked Qty + description: Quantity of the item that has been physically picked from warehouse + or inventory for packing. + - name: page_break + fieldtype: Check + label: Page Break + description: Indicates whether a page break should occur before this item when + printing packing documents or lists. + - name: prevdoc_doctype + fieldtype: Data + label: Prevdoc DocType + description: Document type of the source document that was packed, such as Sales + Order or Delivery Note. + - name: parent_detail_docname + fieldtype: Data + label: Parent Detail docname + description: Reference to the specific line item from the parent document that + this packed item corresponds to. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabPacked Item). + Comparison-ready across parent records.' +- table: tabPacking Slip + description: Generate packing slips for packages to be delivered. Used to notify + package number, package contents and its weight. + fields: + - name: delivery_note + fieldtype: Link + label: Delivery Note + description: Reference to the associated delivery note document that this packing + slip was created from + join_hint: + table: tabDelivery Note + 'on': delivery_note = tabDelivery Note.name + - name: naming_series + fieldtype: Select + label: Series + description: Prefix pattern used to generate the packing slip number + options: + - MAT-PAC-.YYYY.- + - name: from_case_no + fieldtype: Int + label: From Package No. + description: Starting case number in a range of cases included in this packing + slip shipment. + - name: to_case_no + fieldtype: Int + label: To Package No. + description: Ending case number in a range of cases included in this packing slip + shipment. + - name: items + fieldtype: Table + label: Items + description: '' + child_hint: + child_table: tabPacking Slip Item + fieldname: items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: items + - name: net_weight_pkg + fieldtype: Float + label: Net Weight + description: Weight of packaged goods excluding packaging materials, used when + calculating shipping costs or verifying product weight without container. + - name: net_weight_uom + fieldtype: Link + label: Net Weight UOM + description: Unit of measurement for net weight (kg, lbs, etc), used when interpreting + or converting net weight values. + join_hint: + table: tabUOM + 'on': net_weight_uom = tabUOM.name + - name: gross_weight_pkg + fieldtype: Float + label: Gross Weight + description: Total weight of packaged goods including all packaging materials, + used when determining actual shipping weight or handling requirements. + - name: gross_weight_uom + fieldtype: Link + label: Gross Weight UOM + description: Unit of measurement for the total weight of the packed shipment including + packaging materials. + join_hint: + table: tabUOM + 'on': gross_weight_uom = tabUOM.name + - name: letter_head + fieldtype: Link + label: Letter Head + description: Letterhead template applied to the printed packing slip document + for branding. + join_hint: + table: tabLetter Head + 'on': letter_head = tabLetter Head.name + - name: amended_from + fieldtype: Link + label: Amended From + description: Reference to the original packing slip document that this version + corrects or replaces. + join_hint: + table: tabPacking Slip + 'on': amended_from = tabPacking Slip.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Packing Slip document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabPacking Slip Item + description: '' + fields: + - name: item_code + fieldtype: Link + label: Item Code + description: SKU or product code for the item being packed and shipped + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: item_name + fieldtype: Data + label: Item Name + description: Human-readable product name or description of the item being packed + - name: batch_no + fieldtype: Link + label: Batch No + description: Batch or lot number assigned to the items being packed for traceability + and inventory tracking purposes. + join_hint: + table: tabBatch + 'on': batch_no = tabBatch.name + - name: description + fieldtype: Text Editor + label: Description + description: Text description of the specific item included in the packing slip. + - name: qty + fieldtype: Float + label: Quantity + description: Quantity of the item being shipped or packed in this packing slip + line. + - name: net_weight + fieldtype: Float + label: Net Weight + description: Weight of the item excluding packaging, used when calculating shipping + costs or verifying actual product weight. + - name: stock_uom + fieldtype: Link + label: UOM + description: Unit of measure for inventory tracking and stock quantities, such + as pieces, boxes, or kilograms. + join_hint: + table: tabUOM + 'on': stock_uom = tabUOM.name + - name: weight_uom + fieldtype: Link + label: Weight UOM + description: Unit of measure specifically for the net_weight field, such as kg, + lbs, or grams. + join_hint: + table: tabUOM + 'on': weight_uom = tabUOM.name + - name: page_break + fieldtype: Check + label: Page Break + description: Indicates whether a page break should occur before this item when + printing the packing slip. + - name: dn_detail + fieldtype: Data + label: Delivery Note Item + description: Links this packing slip item to the corresponding delivery note item + detail. + - name: pi_detail + fieldtype: Data + label: Delivery Note Packed Item + description: Links this packing slip item to the corresponding purchase invoice + item detail. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabPacking Slip Item). + Comparison-ready across parent records.' +- table: tabPage + description: '' + fields: + - name: system_page + fieldtype: Check + label: System Page + description: Flag indicating if this is a core system page versus custom page, + used to filter standard vs user-created pages. + - name: page_name + fieldtype: Data + label: Page Name + description: Technical route name for the page URL, used when searching for pages + by their web address or navigation path. + - name: title + fieldtype: Data + label: Title + description: Display name shown to users in menus and headers, used when searching + for pages by their visible label. + - name: icon + fieldtype: Data + label: icon + description: Visual icon identifier for the page, used when customizing or filtering + pages by their graphical representation. + - name: module + fieldtype: Link + label: Module + description: Functional module the page belongs to (e.g., HR, Accounting), used + to filter pages by business area or department. + join_hint: + table: tabModule Def + 'on': module = tabModule Def.name + - name: restrict_to_domain + fieldtype: Link + label: Restrict To Domain + description: Domain limitation for page visibility, used to filter pages available + only in specific business domains or industries. + join_hint: + table: tabDomain + 'on': restrict_to_domain = tabDomain.name + - name: standard + fieldtype: Select + label: Standard + description: Indicates if this page is a standard system page versus a custom + page, used when filtering or analyzing page configurations by type. + options: + - 'Yes' + - 'No' + - name: roles + fieldtype: Table + label: Roles + description: '' + child_hint: + child_table: tabHas Role + fieldname: roles + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: roles + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Page document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabParty Account + description: '' + fields: + - name: company + fieldtype: Link + label: Company + description: Company entity that owns this party-account relationship, used when + filtering multi-company data or analyzing party relationships within specific + organizational units. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: account + fieldtype: Link + label: Default Account + description: The accounting ledger account linked to this party, used when querying + receivables/payables balances, generating financial reports, or analyzing party-specific + transactions. + join_hint: + table: tabAccount + 'on': account = tabAccount.name + - name: advance_account + fieldtype: Link + label: Advance Account + description: Account used to record advance payments made to or received from + this party before goods or services are delivered. + join_hint: + table: tabAccount + 'on': advance_account = tabAccount.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabParty Account). + Comparison-ready across parent records.' +- table: tabParty Link + description: '' + fields: + - name: primary_role + fieldtype: Link + label: Primary Role + description: Defines the main business function or relationship type of the first + party in the link + join_hint: + table: tabDocType + 'on': primary_role = tabDocType.name + - name: secondary_role + fieldtype: Link + label: Secondary Role + description: Defines the complementary business function or relationship type + of the second party in the link + join_hint: + table: tabDocType + 'on': secondary_role = tabDocType.name + - name: primary_party + fieldtype: Dynamic Link + label: Primary Party + description: Main party in a relationship between two parties, typically the parent + company, controlling entity, or primary account holder + - name: secondary_party + fieldtype: Dynamic Link + label: Secondary Party + description: Related party in a relationship between two parties, typically the + subsidiary, dependent entity, or linked account + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Party Link document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabParty Specific Item + description: '' + fields: + - name: party_type + fieldtype: Select + label: Party Type + description: Specifies whether this item configuration applies to a Customer or + Supplier relationship. + options: + - Customer + - Supplier + - name: party + fieldtype: Dynamic Link + label: Party Name + description: The specific customer or supplier for whom this item has special + pricing, terms, or restrictions. + - name: restrict_based_on + fieldtype: Select + label: Restrict Items Based On + description: Specifies the field or attribute type used to restrict which items + are available for a specific party, such as by item group, brand, or category. + options: + - Item + - Item Group + - Brand + - name: based_on_value + fieldtype: Dynamic Link + label: Based On Value + description: The actual value of the restriction criterion that determines item + availability for the party, such as a specific item group name or brand identifier. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Party Specific Item document (master/transaction). Use + only for single-entity lookups, not cross-record comparison unless fields are + per-relationship (e.g. supplier, price_list).' +- table: tabParty Type + description: '' + fields: + - name: party_type + fieldtype: Link + label: Party Type + description: Defines the category of business entity (Customer, Supplier, Employee, + etc.) used to segment transactional and master data queries. + join_hint: + table: tabDocType + 'on': party_type = tabDocType.name + - name: account_type + fieldtype: Select + label: Account Type + description: Specifies the default accounting classification (Receivable, Payable) + for this party type, used in financial reporting and GL account mapping. + options: + - Payable + - Receivable + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Party Type document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabPatch Log + description: '' + fields: + - name: patch + fieldtype: Code + label: Patch + description: Name or identifier of the applied patch, used when searching for + specific system updates or fixes. + - name: skipped + fieldtype: Check + label: Skipped + description: Flag indicating if patch was skipped during execution, used to identify + incomplete patch deployments. + - name: traceback + fieldtype: Code + label: Traceback + description: Error details if patch failed, used when troubleshooting patch execution + issues. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Patch Log document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabPause SLA On Status + description: '' + fields: + - name: status + fieldtype: Select + label: Status + description: The specific status value that triggers SLA timer pause when a record + enters this status + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabPause SLA On Status). + Comparison-ready across parent records.' +- table: tabPayment Entry + description: '' + fields: + - name: naming_series + fieldtype: Select + label: Series + description: Prefix pattern used to auto-generate payment entry names + options: + - ACC-PAY-.YYYY.- + - name: payment_type + fieldtype: Select + label: Payment Type + description: Whether the payment is a receipt from customer, payment to supplier, + or internal transfer between accounts + options: + - Receive + - Pay + - Internal Transfer + - name: payment_order_status + fieldtype: Select + label: Payment Order Status + description: Status of the payment order workflow such as initiated, approved, + or completed. + options: + - Initiated + - Payment Ordered + - name: posting_date + fieldtype: Date + label: Posting Date + description: Accounting date when the payment transaction is recorded in the general + ledger. + - name: company + fieldtype: Link + label: Company + description: Legal entity or business unit that made or received the payment. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: mode_of_payment + fieldtype: Link + label: Mode of Payment + description: Payment method used such as cash, check, credit card, bank transfer, + or wire transfer. + join_hint: + table: tabMode of Payment + 'on': mode_of_payment = tabMode of Payment.name + - name: party_type + fieldtype: Link + label: Party Type + description: Type of entity making or receiving payment such as Customer, Supplier, + Employee, or Shareholder. + join_hint: + table: tabDocType + 'on': party_type = tabDocType.name + - name: party + fieldtype: Dynamic Link + label: Party + description: Specific entity name making or receiving the payment corresponding + to the party type. + - name: party_name + fieldtype: Data + label: Party Name + description: Name of the customer or supplier who is making or receiving the payment. + - name: book_advance_payments_in_separate_party_account + fieldtype: Check + label: Book Advance Payments in Separate Party Account + description: Indicates whether advance payments are recorded in a dedicated account + separate from regular receivables or payables. + - name: reconcile_on_advance_payment_date + fieldtype: Check + label: Reconcile on Advance Payment Date + description: Indicates whether the payment reconciliation uses the advance payment + date instead of the invoice date. + - name: bank_account + fieldtype: Link + label: Company Bank Account + description: Company's own bank account used for receiving or disbursing payment + funds in this transaction. + join_hint: + table: tabBank Account + 'on': bank_account = tabBank Account.name + - name: party_bank_account + fieldtype: Link + label: Party Bank Account + description: Customer's or supplier's bank account used for receiving or sending + payment funds in this transaction. + join_hint: + table: tabBank Account + 'on': party_bank_account = tabBank Account.name + - name: contact_person + fieldtype: Link + label: Contact + description: Specific individual at the customer or supplier organization associated + with this payment transaction. + join_hint: + table: tabContact + 'on': contact_person = tabContact.name + - name: contact_email + fieldtype: Data + label: Email + description: Email address of the party (customer or supplier) associated with + this payment transaction. + - name: party_balance + fieldtype: Currency + label: Party Balance + description: Outstanding balance amount of the party after this payment is applied. + - name: paid_from + fieldtype: Link + label: Account Paid From + description: Source account from which the payment amount is debited or withdrawn. + join_hint: + table: tabAccount + 'on': paid_from = tabAccount.name + - name: paid_from_account_type + fieldtype: Data + label: Paid From Account Type + description: Classification of the source account from which payment was made, + such as bank, cash, or credit card account. + - name: paid_from_account_currency + fieldtype: Link + label: Account Currency (From) + description: Currency denomination of the source account from which the payment + was disbursed. + join_hint: + table: tabCurrency + 'on': paid_from_account_currency = tabCurrency.name + - name: paid_from_account_balance + fieldtype: Currency + label: Account Balance (From) + description: Available balance in the source account at the time of payment or + after payment execution. + - name: paid_to + fieldtype: Link + label: Account Paid To + description: The account receiving the payment funds (bank account, cash account, + or party account). + join_hint: + table: tabAccount + 'on': paid_to = tabAccount.name + - name: paid_to_account_type + fieldtype: Data + label: Paid To Account Type + description: The classification of the receiving account (e.g., Bank, Cash, Receivable, + Payable). + - name: paid_to_account_currency + fieldtype: Link + label: Account Currency (To) + description: The currency denomination of the receiving account. + join_hint: + table: tabCurrency + 'on': paid_to_account_currency = tabCurrency.name + - name: paid_to_account_balance + fieldtype: Currency + label: Account Balance (To) + description: Balance in the destination account after this payment was credited + or debited. + - name: paid_amount + fieldtype: Currency + label: Paid Amount + description: Total amount paid before applying any taxes or deductions. + - name: paid_amount_after_tax + fieldtype: Currency + label: Paid Amount After Tax + description: Net amount paid after taxes have been applied or withheld. + - name: source_exchange_rate + fieldtype: Float + label: Source Exchange Rate + description: Exchange rate between the source currency and company base currency + at the time of payment entry. + - name: base_paid_amount + fieldtype: Currency + label: Paid Amount (Company Currency) + description: Total payment amount converted to company base currency before applying + any tax adjustments. + - name: base_paid_amount_after_tax + fieldtype: Currency + label: Paid Amount After Tax (Company Currency) + description: Total payment amount converted to company base currency after including + tax withholdings or deductions. + - name: received_amount + fieldtype: Currency + label: Received Amount + description: Total amount received from customer or paid to supplier before applying + any withholding tax deductions. + - name: received_amount_after_tax + fieldtype: Currency + label: Received Amount After Tax + description: Net amount received or paid after deducting withholding taxes from + the received amount. + - name: target_exchange_rate + fieldtype: Float + label: Target Exchange Rate + description: Exchange rate used to convert payment amount from source currency + to target company currency. + - name: base_received_amount + fieldtype: Currency + label: Received Amount (Company Currency) + description: Total amount received in company base currency before tax adjustments + or deductions. + - name: base_received_amount_after_tax + fieldtype: Currency + label: Received Amount After Tax (Company Currency) + description: Total amount received in company base currency after applying tax + withholdings or deductions. + - name: references + fieldtype: Table + label: Payment References + description: '' + child_hint: + child_table: tabPayment Entry Reference + fieldname: references + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: references + - name: total_allocated_amount + fieldtype: Currency + label: Total Allocated Amount + description: Total amount from this payment that has been allocated or applied + against invoices, bills, or other documents in the payment's currency. + - name: base_total_allocated_amount + fieldtype: Currency + label: Total Allocated Amount (Company Currency) + description: Total amount from this payment that has been allocated or applied + against invoices, bills, or other documents converted to the company's base + currency. + - name: unallocated_amount + fieldtype: Currency + label: Unallocated Amount + description: Remaining payment amount that has not yet been allocated or applied + to any invoices, bills, or other documents. + - name: difference_amount + fieldtype: Currency + label: Difference Amount (Company Currency) + description: Variance between allocated payment amount and total references when + payment entry does not fully reconcile + - name: purchase_taxes_and_charges_template + fieldtype: Link + label: Purchase Taxes and Charges Template + description: Tax template applied to supplier payments or purchase-related payment + entries + join_hint: + table: tabPurchase Taxes and Charges Template + 'on': purchase_taxes_and_charges_template = tabPurchase Taxes and Charges Template.name + - name: sales_taxes_and_charges_template + fieldtype: Link + label: Sales Taxes and Charges Template + description: Tax template applied to customer payments or sales-related payment + entries + join_hint: + table: tabSales Taxes and Charges Template + 'on': sales_taxes_and_charges_template = tabSales Taxes and Charges Template.name + - name: apply_tax_withholding_amount + fieldtype: Check + label: Apply Tax Withholding Amount + description: Whether tax withholding is applied to this payment, relevant when + users ask about payments with or without tax withholding deductions. + - name: tax_withholding_category + fieldtype: Link + label: Tax Withholding Category + description: The specific tax withholding category applied to the payment, used + when users need to filter or report payments by withholding tax type. + join_hint: + table: tabTax Withholding Category + 'on': tax_withholding_category = tabTax Withholding Category.name + - name: taxes + fieldtype: Table + label: Advance Taxes and Charges + description: '' + child_hint: + child_table: tabAdvance Taxes and Charges + fieldname: taxes + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: taxes + - name: base_total_taxes_and_charges + fieldtype: Currency + label: Total Taxes and Charges (Company Currency) + description: Total amount of all taxes and charges applied to the payment in base + currency, used when analyzing tax components across multi-currency payments. + - name: total_taxes_and_charges + fieldtype: Currency + label: Total Taxes and Charges + description: Total amount of all taxes and charges applied to the payment in transaction + currency, used when calculating total payment costs including fees and taxes. + - name: deductions + fieldtype: Table + label: Payment Deductions or Loss + description: '' + child_hint: + child_table: tabPayment Entry Deduction + fieldname: deductions + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: deductions + - name: reference_no + fieldtype: Data + label: Cheque/Reference No + description: External reference number from bank transaction, check number, or + payment gateway transaction ID used to reconcile payments with bank statements. + - name: reference_date + fieldtype: Date + label: Cheque/Reference Date + description: Date on the external payment document or transaction, such as check + date or bank transfer date, which may differ from the posting date. + - name: clearance_date + fieldtype: Date + label: Clearance Date + description: Date when the payment was cleared or reconciled in the bank account, + used to track which payments have been matched with bank statements. + - name: project + fieldtype: Link + label: Project + description: Project associated with the payment transaction for tracking project-specific + expenses and revenues. + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: cost_center + fieldtype: Link + label: Cost Center + description: Cost center allocation for the payment to track departmental or functional + area financial activity. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + - name: status + fieldtype: Select + label: Status + description: Current state of the payment entry such as draft, submitted, or cancelled. + options: + - Draft + - Submitted + - Cancelled + - name: custom_remarks + fieldtype: Check + label: Custom Remarks + description: Custom or additional notes specific to business-defined payment workflows + or special instructions not captured in standard remarks. + - name: remarks + fieldtype: Small Text + label: Remarks + description: Standard internal notes or comments about the payment transaction + for general reference. + - name: base_in_words + fieldtype: Small Text + label: In Words (Company Currency) + description: Payment amount expressed in words in the base currency for check + printing or formal documentation. + - name: is_opening + fieldtype: Select + label: Is Opening + description: Indicates whether this payment entry is an opening balance entry + for migration or initial setup purposes. + options: + - 'No' + - 'Yes' + - name: letter_head + fieldtype: Link + label: Letter Head + description: The letterhead template to be used when printing this payment entry + document. + join_hint: + table: tabLetter Head + 'on': letter_head = tabLetter Head.name + - name: print_heading + fieldtype: Link + label: Print Heading + description: Custom heading text that appears on the printed version of this payment + entry instead of the default title. + join_hint: + table: tabPrint Heading + 'on': print_heading = tabPrint Heading.name + - name: payment_order + fieldtype: Link + label: Payment Order + description: Reference number or identifier linking this payment to a specific + payment order or instruction. + join_hint: + table: tabPayment Order + 'on': payment_order = tabPayment Order.name + - name: in_words + fieldtype: Small Text + label: In Words + description: Amount of the payment expressed as text in words, used when users + ask for written-out payment amounts. + - name: auto_repeat + fieldtype: Link + label: Auto Repeat + description: Links to recurring payment schedule configuration when users ask + about automated or repeating payments. + join_hint: + table: tabAuto Repeat + 'on': auto_repeat = tabAuto Repeat.name + - name: amended_from + fieldtype: Link + label: Amended From + description: References the original payment entry that was corrected or modified, + used when users ask about payment corrections or amendments. + join_hint: + table: tabPayment Entry + 'on': amended_from = tabPayment Entry.name + - name: title + fieldtype: Data + label: Title + description: User-defined label or reference name for the payment entry to identify + its purpose or context + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Payment Entry document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabPayment Entry Deduction + description: '' + fields: + - name: account + fieldtype: Link + label: Account + description: General ledger account to which this deduction amount is posted + join_hint: + table: tabAccount + 'on': account = tabAccount.name + - name: cost_center + fieldtype: Link + label: Cost Center + description: Cost center assigned to track this deduction for departmental or + project-based expense allocation + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + - name: amount + fieldtype: Currency + label: Amount (Company Currency) + description: Deduction amount subtracted from the payment entry total. + - name: is_exchange_gain_loss + fieldtype: Check + label: Is Exchange Gain / Loss? + description: Indicates whether this deduction represents a foreign exchange gain + or loss adjustment. + - name: description + fieldtype: Small Text + label: Description + description: Explanation or reason for the deduction applied to the payment. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabPayment Entry + Deduction). Comparison-ready across parent records.' +- table: tabPayment Entry Reference + description: '' + fields: + - name: reference_doctype + fieldtype: Link + label: Type + description: Type of document being referenced by this payment entry, such as + Sales Invoice, Purchase Invoice, or Journal Entry + join_hint: + table: tabDocType + 'on': reference_doctype = tabDocType.name + - name: reference_name + fieldtype: Dynamic Link + label: Name + description: Specific document ID or number of the referenced transaction that + this payment is allocated against + - name: due_date + fieldtype: Date + label: Due Date + description: Date when the referenced invoice or bill payment is expected or required + to be paid. + - name: bill_no + fieldtype: Data + label: Supplier Invoice No + description: Identifier of the supplier bill or purchase invoice being paid or + referenced in this payment entry. + - name: payment_term + fieldtype: Link + label: Payment Term + description: Credit terms or payment schedule applied to the referenced document, + such as Net 30 or immediate payment. + join_hint: + table: tabPayment Term + 'on': payment_term = tabPayment Term.name + - name: payment_term_outstanding + fieldtype: Float + label: Payment Term Outstanding + description: Outstanding amount remaining for a specific payment term in the payment + entry reference. + - name: account_type + fieldtype: Data + label: Account Type + description: Type of account associated with the payment reference (e.g., receivable, + payable, bank). + - name: payment_type + fieldtype: Data + label: Payment Type + description: Classification of payment method or transaction type (e.g., cash, + credit, advance) for the referenced payment. + - name: reconcile_effect_on + fieldtype: Date + label: Reconcile Effect On + description: Indicates whether the payment reconciliation affects the receivable + or payable account balance. + - name: total_amount + fieldtype: Float + label: Grand Total + description: The full original amount of the referenced invoice or document being + paid against. + - name: outstanding_amount + fieldtype: Float + label: Outstanding + description: The remaining unpaid balance on the referenced invoice or document + after this payment is applied. + - name: allocated_amount + fieldtype: Float + label: Allocated + description: Amount of payment allocated to a specific invoice or reference document + in the payment's currency. + - name: exchange_rate + fieldtype: Float + label: Exchange Rate + description: Currency conversion rate applied when payment currency differs from + the reference document currency. + - name: exchange_gain_loss + fieldtype: Currency + label: Exchange Gain/Loss + description: Realized gain or loss amount resulting from currency exchange rate + differences between payment and reference document. + - name: account + fieldtype: Link + label: Account + description: The general ledger account associated with this payment entry line + item for accounting purposes. + join_hint: + table: tabAccount + 'on': account = tabAccount.name + - name: payment_request + fieldtype: Link + label: Payment Request + description: Links to the payment request document that this payment entry is + fulfilling or referencing. + join_hint: + table: tabPayment Request + 'on': payment_request = tabPayment Request.name + - name: payment_request_outstanding + fieldtype: Float + label: Payment Request Outstanding + description: The remaining unpaid amount on the referenced payment request after + this payment entry is applied. + - name: advance_voucher_type + fieldtype: Link + label: Advance Voucher Type + description: Document type of the advance payment voucher being referenced or + adjusted in this payment entry. + join_hint: + table: tabDocType + 'on': advance_voucher_type = tabDocType.name + - name: advance_voucher_no + fieldtype: Dynamic Link + label: Advance Voucher No + description: Document number of the specific advance payment voucher being referenced + or adjusted in this payment entry. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabPayment Entry + Reference). Comparison-ready across parent records.' +- table: tabPayment Gateway Account + description: '' + fields: + - name: payment_gateway + fieldtype: Link + label: Payment Gateway + description: The third-party payment provider or service (e.g., Stripe, PayPal, + Razorpay) used for processing transactions + join_hint: + table: tabPayment Gateway + 'on': payment_gateway = tabPayment Gateway.name + - name: payment_channel + fieldtype: Select + label: Payment Channel + description: The specific payment method or channel type (e.g., credit card, bank + transfer, digital wallet) supported by this account + options: + - Email + - Phone + - name: company + fieldtype: Link + label: Company + description: Company entity that owns and operates this payment gateway account + for processing transactions. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: is_default + fieldtype: Check + label: Is Default + description: Indicates whether this payment gateway account is automatically selected + for new payment transactions. + - name: payment_account + fieldtype: Link + label: Payment Account + description: General ledger account where funds from this payment gateway are + recorded in the chart of accounts. + join_hint: + table: tabAccount + 'on': payment_account = tabAccount.name + - name: message + fieldtype: Small Text + label: Default Payment Request Message + description: Status or error message from the payment gateway regarding account + configuration or connectivity issues. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Payment Gateway Account document (master/transaction). + Use only for single-entity lookups, not cross-record comparison unless fields + are per-relationship (e.g. supplier, price_list).' +- table: tabPayment Ledger Entry + description: '' + fields: + - name: posting_date + fieldtype: Date + label: Posting Date + description: Date when the payment transaction was officially recorded in the + accounting books + - name: company + fieldtype: Link + label: Company + description: Legal entity or business unit to which the payment transaction belongs + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: account_type + fieldtype: Select + label: Account Type + description: Classifies whether the payment relates to a bank account, cash account, + or other financial account type. + options: + - Receivable + - Payable + - name: account + fieldtype: Link + label: Account + description: The specific financial account (bank or cash) where the payment transaction + was recorded. + join_hint: + table: tabAccount + 'on': account = tabAccount.name + - name: party_type + fieldtype: Link + label: Party Type + description: Identifies whether the payment counterparty is a customer, supplier, + employee, or other entity type. + join_hint: + table: tabDocType + 'on': party_type = tabDocType.name + - name: party + fieldtype: Dynamic Link + label: Party + description: Customer or supplier name associated with the payment transaction + - name: due_date + fieldtype: Date + label: Due Date + description: Date when the payment is expected or required to be settled + - name: voucher_detail_no + fieldtype: Data + label: Voucher Detail No + description: Reference number linking to the specific voucher or transaction document + - name: cost_center + fieldtype: Link + label: Cost Center + description: Department or business unit to which the payment is allocated for + expense tracking and budgeting purposes. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + - name: finance_book + fieldtype: Link + label: Finance Book + description: Accounting book or ledger set used when maintaining multiple parallel + accounting records for different reporting standards or entities. + join_hint: + table: tabFinance Book + 'on': finance_book = tabFinance Book.name + - name: voucher_type + fieldtype: Link + label: Voucher Type + description: Category of the source transaction document that created this payment + entry, such as Payment Entry, Journal Entry, or Sales Invoice. + join_hint: + table: tabDocType + 'on': voucher_type = tabDocType.name + - name: voucher_no + fieldtype: Dynamic Link + label: Voucher No + description: Unique identifier for the payment transaction document being recorded + in this ledger entry. + - name: against_voucher_type + fieldtype: Link + label: Against Voucher Type + description: Type of original document this payment is settling, such as Sales + Invoice, Purchase Invoice, or Journal Entry. + join_hint: + table: tabDocType + 'on': against_voucher_type = tabDocType.name + - name: against_voucher_no + fieldtype: Dynamic Link + label: Against Voucher No + description: Specific document number of the original transaction being paid or + settled by this payment. + - name: amount + fieldtype: Currency + label: Amount + description: Payment amount in the transaction currency used when asking about + payment values, totals, or filtering by payment size. + - name: account_currency + fieldtype: Link + label: Currency + description: Currency of the general ledger account receiving or disbursing the + payment, relevant when reconciling payments to account balances in specific + currencies. + join_hint: + table: tabCurrency + 'on': account_currency = tabCurrency.name + - name: amount_in_account_currency + fieldtype: Currency + label: Amount in Account Currency + description: Payment amount converted to the general ledger account's currency, + used when analyzing payments in the context of account-level reporting or multi-currency + reconciliation. + - name: delinked + fieldtype: Check + label: DeLinked + description: Indicates whether this payment ledger entry has been disconnected + from its original invoice or transaction reference. + - name: remarks + fieldtype: Text + label: Remarks + description: Free-text notes or comments about this specific payment ledger entry + for additional context or explanations. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Payment Ledger Entry document (master/transaction). Use + only for single-entity lookups, not cross-record comparison unless fields are + per-relationship (e.g. supplier, price_list).' +- table: tabPayment Order + description: '' + fields: + - name: naming_series + fieldtype: Select + label: Series + description: Prefix pattern or series code that determines how payment order names + are auto-generated for organizational categorization + options: + - PMO- + - name: company + fieldtype: Link + label: Company + description: The specific company entity that owns or processes this payment order, + used to filter payment orders by business unit or legal entity + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: payment_order_type + fieldtype: Select + label: Payment Order Type + description: Type of payment order such as outgoing payment, incoming payment, + or internal transfer used to categorize the payment transaction purpose. + options: + - Payment Request + - Payment Entry + - name: party + fieldtype: Link + label: Supplier + description: The external entity (supplier, customer, or other third party) involved + in the payment transaction. + join_hint: + table: tabSupplier + 'on': party = tabSupplier.name + - name: posting_date + fieldtype: Date + label: Posting Date + description: The accounting date when the payment order is recorded in the financial + books for period-specific financial reporting. + - name: company_bank + fieldtype: Link + label: Bank + description: The bank institution where the company holds the account used for + this payment order. + join_hint: + table: tabBank + 'on': company_bank = tabBank.name + - name: company_bank_account + fieldtype: Link + label: Company Bank Account + description: The specific company bank account number or identifier from which + the payment will be made. + join_hint: + table: tabBank Account + 'on': company_bank_account = tabBank Account.name + - name: account + fieldtype: Data + label: Account + description: The general ledger account or accounting code to which this payment + order is posted for financial tracking. + - name: references + fieldtype: Table + label: Payment Order Reference + description: '' + child_hint: + child_table: tabPayment Order Reference + fieldname: references + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: references + - name: amended_from + fieldtype: Link + label: Amended From + description: Links to the original payment order document that this payment order + amends or corrects. + join_hint: + table: tabPayment Order + 'on': amended_from = tabPayment Order.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Payment Order document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabPayment Order Reference + description: '' + fields: + - name: reference_doctype + fieldtype: Link + label: Type + description: Specifies the type of document being referenced by the payment order + such as Purchase Invoice or Sales Invoice. + join_hint: + table: tabDocType + 'on': reference_doctype = tabDocType.name + - name: reference_name + fieldtype: Dynamic Link + label: Name + description: Identifies the specific document instance being paid or referenced + in the payment order transaction. + - name: amount + fieldtype: Currency + label: Amount + description: Monetary value of the payment order reference, used when querying + payment amounts or financial totals. + - name: supplier + fieldtype: Link + label: Supplier + description: Vendor or supplier associated with this payment order reference, + used to identify who is being paid. + join_hint: + table: tabSupplier + 'on': supplier = tabSupplier.name + - name: payment_request + fieldtype: Link + label: Payment Request + description: Link to the originating payment request that this order reference + fulfills or responds to. + join_hint: + table: tabPayment Request + 'on': payment_request = tabPayment Request.name + - name: mode_of_payment + fieldtype: Link + label: Mode of Payment + description: Payment method used for the transaction such as cash, credit card, + bank transfer, or check. + join_hint: + table: tabMode of Payment + 'on': mode_of_payment = tabMode of Payment.name + - name: bank_account + fieldtype: Link + label: Bank Account + description: Specific bank account from which the payment was made or to which + it was received. + join_hint: + table: tabBank Account + 'on': bank_account = tabBank Account.name + - name: account + fieldtype: Link + label: Account + description: General ledger account to which this payment is posted for accounting + purposes. + join_hint: + table: tabAccount + 'on': account = tabAccount.name + - name: payment_reference + fieldtype: Data + label: Payment Reference + description: Unique identifier or reference number for the payment transaction + used to track and reconcile specific payments. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabPayment Order + Reference). Comparison-ready across parent records.' +- table: tabPayment Request + description: '' + fields: + - name: payment_request_type + fieldtype: Select + label: Payment Request Type + description: Category or classification of the payment request such as vendor + payment, employee reimbursement, or advance payment used to filter or group + payment requests by purpose + options: + - Outward + - Inward + - name: transaction_date + fieldtype: Date + label: Transaction Date + description: Date when the payment request was created or submitted used to find + payment requests within specific time periods or fiscal periods + - name: naming_series + fieldtype: Select + label: Series + description: Identifier prefix or pattern used when users search for payment requests + by document number format or series code + options: + - ACC-PRQ-.YYYY.- + - name: company + fieldtype: Link + label: Company + description: Company entity that issued the payment request, used when filtering + payment requests by organizational unit or legal entity + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: mode_of_payment + fieldtype: Link + label: Mode of Payment + description: Payment method or channel for the transaction such as credit card, + bank transfer, cash, or digital wallet + join_hint: + table: tabMode of Payment + 'on': mode_of_payment = tabMode of Payment.name + - name: party_type + fieldtype: Link + label: Party Type + description: Category of the entity making or receiving the payment request such + as Customer, Supplier, Employee, or Shareholder. + join_hint: + table: tabDocType + 'on': party_type = tabDocType.name + - name: party + fieldtype: Dynamic Link + label: Party + description: Unique identifier or code of the specific entity associated with + the payment request. + - name: party_name + fieldtype: Data + label: Party Name + description: Full display name of the entity making or receiving the payment request + for human-readable identification. + - name: reference_doctype + fieldtype: Link + label: Reference Doctype + description: Type of source document that triggered this payment request such + as Sales Invoice or Purchase Order + join_hint: + table: tabDocType + 'on': reference_doctype = tabDocType.name + - name: reference_name + fieldtype: Dynamic Link + label: Reference Name + description: Specific document ID or number of the source transaction that this + payment request is linked to + - name: grand_total + fieldtype: Currency + label: Amount + description: Total payment amount requested including all taxes and charges + - name: currency + fieldtype: Link + label: Transaction Currency + description: Currency in which the payment request amount is denominated and must + be paid. + join_hint: + table: tabCurrency + 'on': currency = tabCurrency.name + - name: is_a_subscription + fieldtype: Check + label: Is a Subscription + description: Indicates whether this payment request is part of a recurring subscription + arrangement rather than a one-time payment. + - name: outstanding_amount + fieldtype: Currency + label: Outstanding Amount + description: Remaining unpaid balance on the payment request after partial payments + or credits have been applied. + - name: party_account_currency + fieldtype: Link + label: Party Account Currency + description: Currency used for the party's account in this payment request, relevant + when users ask about payment currency or multi-currency transactions. + join_hint: + table: tabCurrency + 'on': party_account_currency = tabCurrency.name + - name: subscription_plans + fieldtype: Table + label: Subscription Plans + description: '' + child_hint: + child_table: tabSubscription Plan Detail + fieldname: subscription_plans + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: subscription_plans + - name: bank_account + fieldtype: Link + label: Bank Account + description: Bank account designated for receiving or processing this payment, + relevant when users ask which account funds should be transferred to or from. + join_hint: + table: tabBank Account + 'on': bank_account = tabBank Account.name + - name: bank + fieldtype: Link + label: Bank + description: Bank institution where payment will be sent or received for this + payment request. + join_hint: + table: tabBank + 'on': bank = tabBank.name + - name: cost_center + fieldtype: Link + label: Cost Center + description: Department or business unit responsible for the payment expense for + budgeting and financial tracking purposes + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + - name: project + fieldtype: Link + label: Project + description: Specific project to which the payment request is allocated for project-based + accounting and cost allocation + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: print_format + fieldtype: Select + label: Print Format + description: Template layout used when generating printed or PDF versions of the + payment request document + - name: email_to + fieldtype: Data + label: To + description: Recipient email address for payment request notifications or invoices + sent to customers or vendors + - name: subject + fieldtype: Data + label: Subject + description: Email subject line or payment request title describing the purpose + or reference of the payment + - name: payment_gateway_account + fieldtype: Link + label: Payment Gateway Account + description: Specific payment gateway or merchant account used to process this + payment request transaction + join_hint: + table: tabPayment Gateway Account + 'on': payment_gateway_account = tabPayment Gateway Account.name + - name: status + fieldtype: Select + label: Status + description: Current approval or processing state of the payment request such + as draft, pending, approved, or paid. + options: + - Draft + - Requested + - Initiated + - Partially Paid + - Payment Ordered + - Paid + - Failed + - Cancelled + - name: make_sales_invoice + fieldtype: Check + label: Make Sales Invoice + description: Indicates whether a sales invoice should be automatically created + from this payment request. + - name: message + fieldtype: Text + label: Message + description: User-entered notes or comments explaining the purpose or details + of the payment request. + - name: mute_email + fieldtype: Check + label: Mute Email + description: Whether email notifications are suppressed for this payment request. + - name: payment_url + fieldtype: Data + label: payment_url + description: The web link where the customer can view or complete the payment + online. + - name: payment_channel + fieldtype: Select + label: Payment Channel + description: Method or platform through which the payment is processed, such as + wire transfer, ACH, credit card, or online payment gateway. + options: + - Email + - Phone + - name: payment_order + fieldtype: Link + label: Payment Order + description: Reference to the specific order or transaction that this payment + request is intended to settle or fulfill. + join_hint: + table: tabPayment Order + 'on': payment_order = tabPayment Order.name + - name: amended_from + fieldtype: Link + label: Amended From + description: References the original payment request that this document amends + or replaces when corrections are made. + join_hint: + table: tabPayment Request + 'on': amended_from = tabPayment Request.name + - name: phone_number + fieldtype: Data + label: Phone Number + description: Contact phone number for the person or entity associated with this + payment request. + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Payment Request document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabPayment Schedule + description: '' + fields: + - name: payment_term + fieldtype: Link + label: Payment Term + description: Defines the payment term or condition associated with this schedule, + used when filtering or matching payment due date calculations. + join_hint: + table: tabPayment Term + 'on': payment_term = tabPayment Term.name + - name: description + fieldtype: Small Text + label: Description + description: Provides additional details about the payment schedule terms, used + when users need to understand payment timing rules or conditions. + - name: due_date + fieldtype: Date + label: Due Date + description: Date when a scheduled payment installment is expected to be paid + by the customer + - name: invoice_portion + fieldtype: Percent + label: Invoice Portion + description: Percentage or amount of the total invoice allocated to this specific + payment installment + - name: mode_of_payment + fieldtype: Link + label: Mode of Payment + description: Payment method specified for this scheduled installment such as cash, + check, wire transfer, or credit card + join_hint: + table: tabMode of Payment + 'on': mode_of_payment = tabMode of Payment.name + - name: due_date_based_on + fieldtype: Select + label: Due Date Based On + description: Determines the reference date from which payment due dates are calculated + (e.g., invoice date, posting date, delivery date). + options: + - Day(s) after invoice date + - Day(s) after the end of the invoice month + - Month(s) after the end of the invoice month + - name: credit_days + fieldtype: Int + label: Credit Days + description: Number of days added to the reference date to calculate the payment + due date. + - name: credit_months + fieldtype: Int + label: Credit Months + description: Number of months added to the reference date to calculate the payment + due date, typically used for longer payment terms. + - name: discount_date + fieldtype: Date + label: Discount Date + description: Date by which payment must be made to qualify for early payment discount + - name: discount + fieldtype: Float + label: Discount + description: Discount amount or percentage applied when payment is made by the + discount date + - name: discount_type + fieldtype: Select + label: Discount Type + description: Indicates whether discount is a percentage or fixed amount + options: + - Percentage + - Amount + - name: discount_validity_based_on + fieldtype: Select + label: Discount Validity Based On + description: Determines whether the discount expiration is calculated from invoice + date, posting date, or another reference date. + options: + - Day(s) after invoice date + - Day(s) after the end of the invoice month + - Month(s) after the end of the invoice month + - name: discount_validity + fieldtype: Int + label: Discount Validity + description: Number of days or specific date until which the early payment discount + remains valid. + - name: payment_amount + fieldtype: Currency + label: Payment Amount + description: The actual monetary amount due or scheduled to be paid for this installment. + - name: outstanding + fieldtype: Currency + label: Outstanding + description: Remaining unpaid balance on a scheduled payment after accounting + for payments and discounts + - name: paid_amount + fieldtype: Currency + label: Paid Amount + description: Total amount already paid toward this scheduled payment installment + - name: discounted_amount + fieldtype: Currency + label: Discounted Amount + description: Amount reduced from the scheduled payment due to early payment discounts + or other reductions + - name: base_payment_amount + fieldtype: Currency + label: Payment Amount (Company Currency) + description: Total scheduled payment amount in base currency for this installment + before any payments are applied. + - name: base_outstanding + fieldtype: Currency + label: Outstanding (Company Currency) + description: Remaining unpaid balance in base currency for this scheduled payment + after partial or full payments. + - name: base_paid_amount + fieldtype: Currency + label: Paid Amount (Company Currency) + description: Actual amount paid in base currency against this scheduled payment + installment. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabPayment Schedule). + Comparison-ready across parent records.' +- table: tabPayment Term + description: '' + fields: + - name: payment_term_name + fieldtype: Data + label: Payment Term Name + description: Descriptive label of the payment term used when searching for payment + conditions like 'Net 30' or 'Due on Receipt' in vendor or customer agreements. + - name: invoice_portion + fieldtype: Float + label: Invoice Portion (%) + description: Percentage or amount of invoice due under this term, used when analyzing + partial payment schedules or milestone-based billing structures. + - name: mode_of_payment + fieldtype: Link + label: Mode of Payment + description: Payment method associated with this term such as cash, check, wire + transfer, or credit card + join_hint: + table: tabMode of Payment + 'on': mode_of_payment = tabMode of Payment.name + - name: due_date_based_on + fieldtype: Select + label: Due Date Based On + description: Reference date used to calculate payment due date, typically posting + date or invoice date + options: + - Day(s) after invoice date + - Day(s) after the end of the invoice month + - Month(s) after the end of the invoice month + - name: credit_days + fieldtype: Int + label: Credit Days + description: Number of days allowed from the reference date until payment is due + - name: credit_months + fieldtype: Int + label: Credit Months + description: Number of months allowed for payment after invoice date + - name: discount_type + fieldtype: Select + label: Discount Type + description: Whether the discount is a percentage or fixed amount + options: + - Percentage + - Amount + - name: discount + fieldtype: Float + label: Discount + description: Early payment discount value applied when payment terms are met + - name: discount_validity_based_on + fieldtype: Select + label: Discount Validity Based On + description: Defines whether the discount period is calculated from invoice date, + month end, or other reference point for early payment terms. + options: + - Day(s) after invoice date + - Day(s) after the end of the invoice month + - Month(s) after the end of the invoice month + - name: discount_validity + fieldtype: Int + label: Discount Validity + description: Number of days or periods within which the customer must pay to receive + the early payment discount. + - name: description + fieldtype: Small Text + label: Description + description: Human-readable explanation or label for the payment term arrangement + shown to users and on documents. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Payment Term document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabPayment Terms Template + description: '' + fields: + - name: template_name + fieldtype: Data + label: Template Name + description: Display name of the payment terms template used when selecting payment + schedules for invoices or purchase orders. + - name: allocate_payment_based_on_payment_terms + fieldtype: Check + label: Allocate Payment Based On Payment Terms + description: Flag indicating whether payment amounts should be automatically distributed + according to the defined payment term schedule rather than manual allocation. + - name: terms + fieldtype: Table + label: Payment Terms + description: '' + child_hint: + child_table: tabPayment Terms Template Detail + fieldname: terms + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: terms + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Payment Terms Template document (master/transaction). Use + only for single-entity lookups, not cross-record comparison unless fields are + per-relationship (e.g. supplier, price_list).' +- table: tabPayment Terms Template Detail + description: '' + fields: + - name: payment_term + fieldtype: Link + label: Payment Term + description: The specific payment term code or identifier being configured in + this template detail line + join_hint: + table: tabPayment Term + 'on': payment_term = tabPayment Term.name + - name: description + fieldtype: Small Text + label: Description + description: Explanatory text describing the purpose or conditions of this payment + term template detail + - name: invoice_portion + fieldtype: Float + label: Invoice Portion (%) + description: Percentage or portion of the invoice amount allocated to this payment + installment. + - name: mode_of_payment + fieldtype: Link + label: Mode of Payment + description: Payment method or channel specified for this installment such as + cash, check, wire transfer, or credit card. + join_hint: + table: tabMode of Payment + 'on': mode_of_payment = tabMode of Payment.name + - name: due_date_based_on + fieldtype: Select + label: Due Date Based On + description: Reference point for calculating the payment due date such as invoice + date, delivery date, or end of month. + options: + - Day(s) after invoice date + - Day(s) after the end of the invoice month + - Month(s) after the end of the invoice month + - name: credit_days + fieldtype: Int + label: Credit Days + description: Number of days after invoice date before payment is due, used when + calculating payment due dates or evaluating credit periods offered to customers. + - name: credit_months + fieldtype: Int + label: Credit Months + description: Number of months after invoice date before payment is due, used for + longer-term payment arrangements or when credit terms are specified in months + rather than days. + - name: discount_type + fieldtype: Select + label: Discount Type + description: Type of early payment discount offered such as percentage or fixed + amount, used when determining discount calculation method for prompt payment + incentives. + options: + - Percentage + - Amount + - name: discount + fieldtype: Float + label: Discount + description: Percentage or amount deducted from invoice total when payment terms + conditions are met. + - name: discount_validity_based_on + fieldtype: Select + label: Discount Validity Based On + description: Criterion that determines how the discount eligibility period is + calculated, such as from invoice date or delivery date. + options: + - Day(s) after invoice date + - Day(s) after the end of the invoice month + - Month(s) after the end of the invoice month + - name: discount_validity + fieldtype: Int + label: Discount Validity + description: Number of days or time period during which the discount remains available + to the customer. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabPayment Terms + Template Detail). Comparison-ready across parent records.' +- table: tabPegged Currency Details + description: '' + fields: + - name: source_currency + fieldtype: Link + label: Currency + description: The currency that is pegged or fixed to another currency's value. + join_hint: + table: tabCurrency + 'on': source_currency = tabCurrency.name + - name: pegged_against + fieldtype: Link + label: Pegged Against + description: The target currency that the source currency's exchange rate is fixed + to. + join_hint: + table: tabCurrency + 'on': pegged_against = tabCurrency.name + - name: pegged_exchange_rate + fieldtype: Data + label: Exchange Rate + description: Fixed exchange rate at which a pegged currency is locked to another + currency, used when querying conversion rates for currencies with fixed pegs. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabPegged Currency + Details). Comparison-ready across parent records.' +- table: tabPeriod Closing Voucher + description: '' + fields: + - name: transaction_date + fieldtype: Date + label: Transaction Date + description: Date when the period closing transaction was recorded or executed + - name: company + fieldtype: Link + label: Company + description: Company entity to which this period closing voucher belongs + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: fiscal_year + fieldtype: Link + label: Fiscal Year + description: Fiscal year for which the period closing voucher applies, used when + querying closing entries by year. + join_hint: + table: tabFiscal Year + 'on': fiscal_year = tabFiscal Year.name + - name: period_start_date + fieldtype: Date + label: Period Start Date + description: Start date of the accounting period being closed, used to identify + which period's transactions are being closed. + - name: period_end_date + fieldtype: Date + label: Period End Date + description: End date of the accounting period being closed, used to determine + the cutoff for transactions included in the closing voucher. + - name: amended_from + fieldtype: Link + label: Amended From + description: References the original period closing voucher that this document + amends or corrects. + join_hint: + table: tabPeriod Closing Voucher + 'on': amended_from = tabPeriod Closing Voucher.name + - name: closing_account_head + fieldtype: Link + label: Closing Account Head + description: The account to which period-end balances are transferred during the + closing process. + join_hint: + table: tabAccount + 'on': closing_account_head = tabAccount.name + - name: gle_processing_status + fieldtype: Select + label: GL Entry Processing Status + description: Indicates whether general ledger entries have been successfully processed + for this closing voucher. + options: + - In Progress + - Completed + - Failed + - name: remarks + fieldtype: Small Text + label: Remarks + description: User-entered notes or comments explaining the reason for or context + about the period closing voucher. + - name: error_message + fieldtype: Text + label: Error Message + description: Error or validation message generated when the period closing voucher + fails processing or encounters issues. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Period Closing Voucher document (master/transaction). Use + only for single-entity lookups, not cross-record comparison unless fields are + per-relationship (e.g. supplier, price_list).' +- table: tabPersonal Data Deletion Request + description: '' + fields: + - name: email + fieldtype: Data + label: Email + description: Email address of the individual requesting personal data deletion + for GDPR compliance. + - name: status + fieldtype: Select + label: Status + description: Current processing status of the deletion request such as pending, + in progress, or completed. + options: + - Pending Verification + - Pending Approval + - On Hold + - Deleted + - name: anonymization_matrix + fieldtype: Code + label: Anonymization Matrix + description: Configuration defining which fields and data should be anonymized + during the deletion process. + - name: deletion_steps + fieldtype: Table + label: 'Deletion Steps ' + description: '' + child_hint: + child_table: tabPersonal Data Deletion Step + fieldname: deletion_steps + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: deletion_steps + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Personal Data Deletion Request document (master/transaction). + Use only for single-entity lookups, not cross-record comparison unless fields + are per-relationship (e.g. supplier, price_list).' +- table: tabPersonal Data Deletion Step + description: '' + fields: + - name: document_type + fieldtype: Data + label: Document Type + description: The specific DocType or table from which personal data will be deleted + in this step. + - name: status + fieldtype: Select + label: Status + description: Current execution status of this deletion step such as pending, completed, + or failed. + options: + - Pending + - Deleted + - name: partial + fieldtype: Check + label: Partial + description: Indicates whether this step performs partial deletion of records + versus complete removal. + - name: fields + fieldtype: Small Text + label: Fields + description: Specific field names within the document type that contain personal + data to be deleted. + - name: filtered_by + fieldtype: Data + label: Filtered By + description: Filter criteria or conditions used to identify which records should + have data deleted in this step. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabPersonal Data + Deletion Step). Comparison-ready across parent records.' +- table: tabPersonal Data Download Request + description: '' + fields: + - name: user + fieldtype: Link + label: User + description: User account for whom the personal data download is being requested. + join_hint: + table: tabUser + 'on': user = tabUser.name + - name: user_name + fieldtype: Data + label: User Name + description: Full name of the user requesting their personal data download. + - name: amended_from + fieldtype: Link + label: Amended From + description: Reference to the previous version if this request was amended from + another request. + join_hint: + table: tabPersonal Data Download Request + 'on': amended_from = tabPersonal Data Download Request.name + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Personal Data Download Request document (master/transaction). + Use only for single-entity lookups, not cross-record comparison unless fields + are per-relationship (e.g. supplier, price_list).' +- table: tabPick List + description: '' + fields: + - name: naming_series + fieldtype: Select + label: Series + description: Prefix pattern that determines how pick list names are automatically + formatted and numbered + options: + - STO-PICK-.YYYY.- + - name: company + fieldtype: Link + label: Company + description: Company entity that owns or operates under this pick list for multi-company + inventory operations + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: purpose + fieldtype: Select + label: Purpose + description: Reason or intended use for the pick list, such as sales order fulfillment, + transfer, or return. + options: + - Material Transfer for Manufacture + - Material Transfer + - Delivery + - name: customer + fieldtype: Link + label: Customer + description: Customer identifier or code associated with the pick list. + join_hint: + table: tabCustomer + 'on': customer = tabCustomer.name + - name: customer_name + fieldtype: Data + label: Customer Name + description: Full name of the customer associated with the pick list for human-readable + identification. + - name: work_order + fieldtype: Link + label: Work Order + description: Work order number for which materials are being picked from inventory. + join_hint: + table: tabWork Order + 'on': work_order = tabWork Order.name + - name: material_request + fieldtype: Link + label: Material Request + description: Material request document that initiated this pick list. + join_hint: + table: tabMaterial Request + 'on': material_request = tabMaterial Request.name + - name: for_qty + fieldtype: Float + label: Qty of Finished Goods Item + description: Quantity of finished goods or items that this pick list is intended + to produce or fulfill. + - name: parent_warehouse + fieldtype: Link + label: Warehouse + description: Warehouse location from which items are picked for this pick list + join_hint: + table: tabWarehouse + 'on': parent_warehouse = tabWarehouse.name + - name: consider_rejected_warehouses + fieldtype: Check + label: Consider Rejected Warehouses + description: Whether to include warehouses marked as rejected when selecting inventory + for picking + - name: pick_manually + fieldtype: Check + label: Pick Manually + description: Whether items on this pick list require manual selection rather than + automatic allocation + - name: ignore_pricing_rule + fieldtype: Check + label: Ignore Pricing Rule + description: Whether pricing rules are bypassed when picking items for this pick + list. + - name: scan_barcode + fieldtype: Data + label: Scan Barcode + description: Barcode value scanned to identify and add items during the picking + process. + - name: scan_mode + fieldtype: Check + label: Scan Mode + description: Method or mode used for barcode scanning during pick list execution + (e.g., manual entry vs scanner device). + - name: prompt_qty + fieldtype: Check + label: Prompt Qty + description: Quantity requested or suggested for picking from inventory. + - name: locations + fieldtype: Table + label: Item Locations + description: '' + child_hint: + child_table: tabPick List Item + fieldname: locations + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: locations + - name: amended_from + fieldtype: Link + label: Amended From + description: Reference to the original pick list document that this pick list + amends or replaces. + join_hint: + table: tabPick List + 'on': amended_from = tabPick List.name + - name: group_same_items + fieldtype: Check + label: Group Same Items + description: Whether identical items are grouped together on the pick list for + consolidated picking. + - name: status + fieldtype: Select + label: Status + description: Current workflow state of the pick list such as draft, open, completed, + or cancelled. + options: + - Draft + - Open + - Partly Delivered + - Completed + - Cancelled + - name: delivery_status + fieldtype: Select + label: Delivery Status + description: Shipment or delivery fulfillment state indicating whether picked + items have been dispatched or delivered. + options: + - Not Delivered + - Fully Delivered + - Partly Delivered + - name: per_delivered + fieldtype: Percent + label: '% Delivered' + description: Percentage of pick list items that have been physically delivered + to the customer or destination + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Pick List document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabPick List Item + description: '' + fields: + - name: item_code + fieldtype: Link + label: Item + description: SKU or product code of the item being picked from inventory + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: item_name + fieldtype: Data + label: Item Name + description: Human-readable product name or description of the item being picked + - name: description + fieldtype: Text + label: Description + description: Text describing the item being picked from inventory for fulfillment + or transfer purposes + - name: item_group + fieldtype: Data + label: Item Group + description: Category or classification grouping of the picked item for filtering + and organizing pick list items by product type + - name: warehouse + fieldtype: Link + label: Warehouse + description: Storage location or facility from which the item is being picked + join_hint: + table: tabWarehouse + 'on': warehouse = tabWarehouse.name + - name: qty + fieldtype: Float + label: Qty + description: Quantity of items ordered or requested to be picked from inventory + for this pick list line. + - name: stock_qty + fieldtype: Float + label: Qty (in Stock UOM) + description: Quantity expressed in stock or base unit of measure, accounting for + unit conversion from the ordered quantity. + - name: picked_qty + fieldtype: Float + label: Picked Qty (in Stock UOM) + description: Actual quantity that has been physically picked or fulfilled from + the warehouse for this pick list item. + - name: stock_reserved_qty + fieldtype: Float + label: Stock Reserved Qty (in Stock UOM) + description: Quantity of inventory reserved or allocated for this pick list item + that cannot be used for other orders. + - name: uom + fieldtype: Link + label: UOM + description: Unit of measurement for the pick list item quantity, such as pieces, + boxes, kilograms, or liters. + join_hint: + table: tabUOM + 'on': uom = tabUOM.name + - name: conversion_factor + fieldtype: Float + label: UOM Conversion Factor + description: Multiplier to convert between the pick list item's UOM and the base + or stock UOM. + - name: stock_uom + fieldtype: Link + label: Stock UOM + description: Unit of measurement for inventory quantities in this pick list item. + join_hint: + table: tabUOM + 'on': stock_uom = tabUOM.name + - name: delivered_qty + fieldtype: Float + label: Delivered Qty (in Stock UOM) + description: Quantity that has been delivered or fulfilled from this pick list + item. + - name: actual_qty + fieldtype: Float + label: Qty (Warehouse) + description: Quantity physically picked or available for this pick list item. + - name: company_total_stock + fieldtype: Float + label: Qty (Company) + description: Total stock quantity available across the entire company for this + pick list item. + - name: serial_and_batch_bundle + fieldtype: Link + label: Serial and Batch Bundle + description: Reference to the bundled serial numbers or batch numbers assigned + to this pick list item. + join_hint: + table: tabSerial and Batch Bundle + 'on': serial_and_batch_bundle = tabSerial and Batch Bundle.name + - name: use_serial_batch_fields + fieldtype: Check + label: Use Serial No / Batch Fields + description: Indicates whether this pick list item tracks inventory using serial + numbers or batch numbers. + - name: serial_no + fieldtype: Small Text + label: Serial No + description: Unique identifier for individually tracked items in the pick list, + used when querying specific serialized inventory units being picked. + - name: batch_no + fieldtype: Link + label: Batch No + description: Batch or lot number for grouped inventory items in the pick list, + used when tracking items by manufacturing batch or expiration date. + join_hint: + table: tabBatch + 'on': batch_no = tabBatch.name + - name: sales_order + fieldtype: Link + label: Sales Order + description: Sales order document linked to this pick list item, used when finding + which customer order is being fulfilled by this pick. + join_hint: + table: tabSales Order + 'on': sales_order = tabSales Order.name + - name: sales_order_item + fieldtype: Data + label: Sales Order Item + description: Links this pick list item to a specific line item on a sales order + being fulfilled. + - name: product_bundle_item + fieldtype: Data + label: Product Bundle Item + description: References a component item within a product bundle that needs to + be picked separately. + - name: material_request + fieldtype: Link + label: Material Request + description: Links this pick list item to a material request that triggered the + picking requirement. + join_hint: + table: tabMaterial Request + 'on': material_request = tabMaterial Request.name + - name: material_request_item + fieldtype: Data + label: Material Request Item + description: Links the pick list item to the specific material request item being + fulfilled or picked for delivery. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabPick List Item). + Comparison-ready across parent records.' +- table: tabPlant Floor + description: '' + fields: + - name: floor_name + fieldtype: Data + label: Floor Name + description: Descriptive name of the physical floor or level within the plant + facility + - name: company + fieldtype: Link + label: Company + description: Company or business entity that owns or operates this plant floor + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: warehouse + fieldtype: Link + label: Warehouse + description: Identifies which warehouse facility the plant floor is located in + or associated with for inventory and operations management. + join_hint: + table: tabWarehouse + 'on': warehouse = tabWarehouse.name + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Plant Floor document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabPortal Menu Item + description: '' + fields: + - name: title + fieldtype: Data + label: Title + description: Display label shown to portal users for this menu item. + - name: enabled + fieldtype: Check + label: Enabled + description: Whether this menu item is currently active and visible in the portal. + - name: route + fieldtype: Data + label: Route + description: URL path or route where users navigate when clicking this menu item. + - name: reference_doctype + fieldtype: Link + label: Reference Document Type + description: DocType that this menu item links to for displaying related records. + join_hint: + table: tabDocType + 'on': reference_doctype = tabDocType.name + - name: role + fieldtype: Link + label: Role + description: User role required to view and access this portal menu item. + join_hint: + table: tabRole + 'on': role = tabRole.name + - name: target + fieldtype: Data + label: Target + description: Browser target attribute controlling whether link opens in new window + or same tab. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabPortal Menu Item). + Comparison-ready across parent records.' +- table: tabPortal User + description: '' + fields: + - name: user + fieldtype: Link + label: User + description: Email or username of the person granted portal access, used to identify + external users with limited system access. + join_hint: + table: tabUser + 'on': user = tabUser.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabPortal User). + Comparison-ready across parent records.' +- table: tabPrepared Report + description: '' + fields: + - name: status + fieldtype: Select + label: Status + description: Current processing state used to filter reports by completion status + like queued, completed, or failed. + options: + - Error + - Queued + - Completed + - Started + - name: report_name + fieldtype: Data + label: Report Name + description: Name of the underlying report template used when searching for specific + report types or grouping by report category. + - name: queued_by + fieldtype: Data + label: Queued By + description: User who initiated the report generation used for tracking who requested + which reports. + - name: job_id + fieldtype: Data + label: Job ID + description: Background job identifier used to track asynchronous report processing + and troubleshoot generation issues. + - name: queued_at + fieldtype: Datetime + label: Queued At + description: Timestamp when report generation was queued used to measure processing + time and identify delays. + - name: report_end_time + fieldtype: Datetime + label: Finished At + description: Timestamp when report generation completed used to calculate processing + duration and filter recently finished reports. + - name: peak_memory_usage + fieldtype: Int + label: Peak Memory Usage + description: Used to monitor report generation performance and troubleshoot memory-related + failures or slowdowns during prepared report execution. + - name: error_message + fieldtype: Text + label: Error Message + description: Used to diagnose why a prepared report failed to generate or encountered + issues during processing. + - name: filters + fieldtype: Small Text + label: Filters + description: Used to identify which data subset criteria were applied when the + prepared report was generated or scheduled. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Prepared Report document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabPrice List + description: A Price List is a collection of Item Prices either Selling, Buying, + or both + fields: + - name: enabled + fieldtype: Check + label: Enabled + description: Indicates whether this price list is currently active and available + for use in transactions and pricing calculations. + - name: price_list_name + fieldtype: Data + label: Price List Name + description: Display name of the price list used when searching for pricing by + customer segment, region, or promotional campaign. + - name: currency + fieldtype: Link + label: Currency + description: Currency in which the prices in this price list are denominated. + join_hint: + table: tabCurrency + 'on': currency = tabCurrency.name + - name: buying + fieldtype: Check + label: Buying + description: Indicates this price list applies to purchase transactions from suppliers. + - name: selling + fieldtype: Check + label: Selling + description: Indicates this price list applies to sales transactions to customers. + - name: price_not_uom_dependent + fieldtype: Check + label: Price Not UOM Dependent + description: Whether pricing remains constant regardless of the unit of measure + selected for the item. + - name: countries + fieldtype: Table + label: Applicable for Countries + description: '' + child_hint: + child_table: tabPrice List Country + fieldname: countries + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: countries + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Price List document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabPrice List Country + description: '' + fields: + - name: country + fieldtype: Link + label: Country + description: The specific country to which this price list applies + join_hint: + table: tabCountry + 'on': country = tabCountry.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabPrice List Country). + Comparison-ready across parent records.' +- table: tabPricing Rule + description: '' + fields: + - name: naming_series + fieldtype: Select + label: Naming Series + description: Prefix pattern that determines how pricing rule names are auto-generated + when creating new rules + options: + - PRLE-.#### + - name: title + fieldtype: Data + label: Title + description: Human-readable label for the pricing rule used when searching by + descriptive name rather than technical identifier + - name: disable + fieldtype: Check + label: Disable + description: Whether the pricing rule is currently inactive and not being applied + to transactions. + - name: apply_on + fieldtype: Select + label: Apply On + description: The entity type the pricing rule targets, such as item code, item + group, brand, or transaction total. + options: + - Item Code + - Item Group + - Brand + - Transaction + - name: price_or_product_discount + fieldtype: Select + label: Price or Product Discount + description: Whether the rule provides a price adjustment or a free/discounted + product as the benefit. + options: + - Price + - Product + - name: warehouse + fieldtype: Link + label: Warehouse + description: Specific warehouse location where this pricing rule applies, used + when prices vary by storage facility or distribution center. + join_hint: + table: tabWarehouse + 'on': warehouse = tabWarehouse.name + - name: items + fieldtype: Table + label: Apply Rule On Item Code + description: '' + child_hint: + child_table: tabPricing Rule Item Code + fieldname: items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: items + - name: item_groups + fieldtype: Table + label: Apply Rule On Item Group + description: '' + child_hint: + child_table: tabPricing Rule Item Group + fieldname: item_groups + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: item_groups + - name: brands + fieldtype: Table + label: Apply Rule On Brand + description: '' + child_hint: + child_table: tabPricing Rule Brand + fieldname: brands + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: brands + - name: mixed_conditions + fieldtype: Check + label: Mixed Conditions + description: Indicates whether the pricing rule allows combining multiple condition + types (item groups, brands, categories) simultaneously in a single rule. + - name: is_cumulative + fieldtype: Check + label: Is Cumulative + description: Determines if this pricing rule can be stacked or combined with other + active pricing rules for the same transaction. + - name: coupon_code_based + fieldtype: Check + label: Coupon Code Based + description: Whether this pricing rule requires a coupon code to be applied at + checkout or transaction time. + - name: apply_rule_on_other + fieldtype: Select + label: Apply Rule On Other + description: Whether the pricing rule discount applies to a different item than + the one triggering the rule. + options: + - Item Code + - Item Group + - Brand + - name: other_item_code + fieldtype: Link + label: Item Code + description: The specific item that receives the discount when apply_rule_on_other + is enabled, used for buy X get Y promotions. + join_hint: + table: tabItem + 'on': other_item_code = tabItem.name + - name: other_item_group + fieldtype: Link + label: Item Group + description: Item group that triggers this pricing rule when combined with the + primary item in a transaction. + join_hint: + table: tabItem Group + 'on': other_item_group = tabItem Group.name + - name: other_brand + fieldtype: Link + label: Brand + description: Brand that triggers this pricing rule when combined with the primary + item in a transaction. + join_hint: + table: tabBrand + 'on': other_brand = tabBrand.name + - name: selling + fieldtype: Check + label: Selling + description: Indicates whether this pricing rule applies to sales transactions. + - name: buying + fieldtype: Check + label: Buying + description: Indicates whether this pricing rule applies to purchase transactions + from suppliers. + - name: applicable_for + fieldtype: Select + label: Applicable For + description: Defines the scope of entities this pricing rule targets, such as + customer groups, territories, or individual customers. + options: + - Customer + - Customer Group + - Territory + - Sales Partner + - Campaign + - Supplier + - Supplier Group + - name: customer + fieldtype: Link + label: Customer + description: Specific customer account to which this pricing rule exclusively + applies. + join_hint: + table: tabCustomer + 'on': customer = tabCustomer.name + - name: customer_group + fieldtype: Link + label: Customer Group + description: Specifies which customer segment or classification this pricing rule + applies to, used when filtering prices by customer type or category. + join_hint: + table: tabCustomer Group + 'on': customer_group = tabCustomer Group.name + - name: territory + fieldtype: Link + label: Territory + description: Defines the geographic region or sales area where this pricing rule + is valid, used when pricing varies by location. + join_hint: + table: tabTerritory + 'on': territory = tabTerritory.name + - name: sales_partner + fieldtype: Link + label: Sales Partner + description: Identifies the third-party distributor or reseller for whom this + pricing rule applies, used when different partners receive different pricing + terms. + join_hint: + table: tabSales Partner + 'on': sales_partner = tabSales Partner.name + - name: campaign + fieldtype: Link + label: Campaign + description: Marketing or promotional campaign associated with the pricing rule + to track campaign-specific pricing offers. + join_hint: + table: tabCampaign + 'on': campaign = tabCampaign.name + - name: supplier + fieldtype: Link + label: Supplier + description: Specific supplier for whom this pricing rule applies when purchasing + items. + join_hint: + table: tabSupplier + 'on': supplier = tabSupplier.name + - name: supplier_group + fieldtype: Link + label: Supplier Group + description: Group of suppliers to which this pricing rule applies, used when + the rule should apply to multiple suppliers at once. + join_hint: + table: tabSupplier Group + 'on': supplier_group = tabSupplier Group.name + - name: min_qty + fieldtype: Float + label: Min Qty (As Per Stock UOM) + description: Minimum quantity threshold required for the pricing rule to apply + to a transaction + - name: max_qty + fieldtype: Float + label: Max Qty (As Per Stock UOM) + description: Maximum quantity threshold up to which the pricing rule remains applicable + - name: min_amt + fieldtype: Currency + label: Min Amt + description: Minimum transaction amount threshold required for the pricing rule + to activate + - name: max_amt + fieldtype: Currency + label: Max Amt + description: Maximum discount or benefit amount that can be applied under this + pricing rule. + - name: same_item + fieldtype: Check + label: Same Item + description: Indicates whether the pricing rule applies quantity-based discounts + to the same item being purchased. + - name: free_item + fieldtype: Link + label: Free Item + description: Item code or product that is given free as part of this pricing rule + promotion. + join_hint: + table: tabItem + 'on': free_item = tabItem.name + - name: free_qty + fieldtype: Float + label: Qty + description: Quantity of free items given when pricing rule conditions are met. + - name: free_item_rate + fieldtype: Currency + label: Free Item Rate + description: Valuation rate of the free item for accounting and inventory purposes. + - name: free_item_uom + fieldtype: Link + label: UOM + description: Unit of measurement for the free item quantity being offered. + join_hint: + table: tabUOM + 'on': free_item_uom = tabUOM.name + - name: round_free_qty + fieldtype: Check + label: Round Free Qty + description: Whether free item quantities are rounded to whole numbers in promotional + pricing calculations. + - name: dont_enforce_free_item_qty + fieldtype: Check + label: Don't Enforce Free Item Qty + description: Whether the system allows partial or flexible free item quantities + instead of enforcing exact promotional amounts. + - name: is_recursive + fieldtype: Check + label: Is Recursive + description: Whether the pricing rule applies repeatedly to qualifying transaction + amounts or only once per transaction. + - name: recurse_for + fieldtype: Float + label: Recurse Every (As Per Transaction UOM) + description: Number of periods or units to recursively apply the pricing rule + forward in time or quantity. + - name: apply_recursion_over + fieldtype: Float + label: Apply Recursion Over (As Per Transaction UOM) + description: Dimension over which the pricing rule repeats, such as time periods, + quantity tiers, or transaction count. + - name: valid_from + fieldtype: Date + label: Valid From + description: Start date from which the pricing rule becomes active and applicable + to transactions. + - name: valid_upto + fieldtype: Date + label: Valid Upto + description: End date when the pricing rule expires or stops being applicable + to transactions + - name: company + fieldtype: Link + label: Company + description: Company entity to which this pricing rule is restricted or belongs + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: currency + fieldtype: Link + label: Currency + description: Currency in which the pricing rule's amounts or discounts are denominated + join_hint: + table: tabCurrency + 'on': currency = tabCurrency.name + - name: margin_type + fieldtype: Select + label: Margin Type + description: Whether the pricing rule applies margin as a percentage or fixed + amount. + options: + - Percentage + - Amount + - name: margin_rate_or_amount + fieldtype: Float + label: Margin Rate or Amount + description: The numerical margin value applied when this pricing rule calculates + profit margins. + - name: rate_or_discount + fieldtype: Select + label: Rate or Discount + description: Whether the pricing rule applies a final price rate or a discount + reduction. + options: + - Rate + - Discount Percentage + - Discount Amount + - name: apply_discount_on + fieldtype: Select + label: Apply Discount On + description: Specifies whether the pricing rule discount applies to grand total, + net total, or specific item amounts. + options: + - Grand Total + - Net Total + - name: rate + fieldtype: Currency + label: Rate + description: Percentage discount rate applied when the pricing rule is triggered. + - name: discount_amount + fieldtype: Currency + label: Discount Amount + description: Fixed monetary discount amount applied when the pricing rule is triggered, + as opposed to a percentage rate. + - name: discount_percentage + fieldtype: Float + label: Discount Percentage + description: Percentage discount applied when pricing rule conditions are met + - name: for_price_list + fieldtype: Link + label: For Price List + description: Specific price list to which this pricing rule applies + join_hint: + table: tabPrice List + 'on': for_price_list = tabPrice List.name + - name: condition + fieldtype: Code + label: Condition + description: Expression or criteria that must be satisfied for the pricing rule + to activate + - name: apply_multiple_pricing_rules + fieldtype: Check + label: Apply Multiple Pricing Rules + description: Whether multiple pricing rules can be applied simultaneously to the + same transaction or item. + - name: apply_discount_on_rate + fieldtype: Check + label: Apply Discount on Discounted Rate + description: Whether the discount calculation is based on the item rate versus + other bases like amount or quantity. + - name: threshold_percentage + fieldtype: Percent + label: Threshold for Suggestion (In Percentage) + description: Minimum percentage threshold that must be met for the pricing rule + to trigger or apply. + - name: validate_applied_rule + fieldtype: Check + label: Validate Applied Rule + description: Whether the pricing rule requires validation or confirmation before + being applied to transactions. + - name: rule_description + fieldtype: Small Text + label: Rule Description + description: Text explanation of what the pricing rule does and when it applies. + - name: has_priority + fieldtype: Check + label: Has Priority + description: Whether this pricing rule has a priority value set to determine precedence + when multiple rules match. + - name: priority + fieldtype: Select + label: Priority + description: Determines which pricing rule applies when multiple rules match the + same transaction, with lower numbers taking precedence. + options: + - '1' + - '2' + - '3' + - '4' + - '5' + - '6' + - '7' + - '8' + - '9' + - '10' + - '11' + - '12' + - '13' + - '14' + - '15' + - '16' + - '17' + - '18' + - '19' + - '20' + - name: promotional_scheme_id + fieldtype: Data + label: Promotional Scheme Id + description: Unique identifier linking this pricing rule to a specific promotional + campaign or scheme. + - name: promotional_scheme + fieldtype: Link + label: Promotional Scheme + description: Name or title of the promotional campaign associated with this pricing + rule, used when searching for rules by promotion name. + join_hint: + table: tabPromotional Scheme + 'on': promotional_scheme = tabPromotional Scheme.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Pricing Rule document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabPricing Rule Brand + description: '' + fields: + - name: brand + fieldtype: Link + label: Brand + description: The specific brand to which this pricing rule applies, used when + filtering or applying discounts based on product brand + join_hint: + table: tabBrand + 'on': brand = tabBrand.name + - name: uom + fieldtype: Link + label: UOM + description: Unit of measurement for which this brand pricing rule is valid, used + when pricing varies by UOM for the same brand + join_hint: + table: tabUOM + 'on': uom = tabUOM.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabPricing Rule Brand). + Comparison-ready across parent records.' +- table: tabPricing Rule Detail + description: '' + fields: + - name: pricing_rule + fieldtype: Link + label: Pricing Rule + description: References the parent pricing rule that this detail line belongs + to + join_hint: + table: tabPricing Rule + 'on': pricing_rule = tabPricing Rule.name + - name: item_code + fieldtype: Data + label: Item Code + description: Specific product or item that this pricing rule detail applies to + - name: margin_type + fieldtype: Data + label: Margin Type + description: Specifies whether the pricing rule applies a percentage-based or + amount-based margin calculation. + - name: rate_or_discount + fieldtype: Data + label: Rate or Discount + description: Indicates whether the pricing rule modifies the selling rate directly + or applies a discount to the base price. + - name: child_docname + fieldtype: Data + label: Child Docname + description: References the specific item, item group, brand, or other entity + to which this pricing rule detail applies. + - name: rule_applied + fieldtype: Check + label: Rule Applied + description: Indicates whether this pricing rule detail was actually applied to + a transaction or remains unapplied. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabPricing Rule Detail). + Comparison-ready across parent records.' +- table: tabPricing Rule Item Code + description: '' + fields: + - name: item_code + fieldtype: Link + label: Item Code + description: Specific product or item SKU that this pricing rule applies to + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: uom + fieldtype: Link + label: UOM + description: Unit of measure for which this pricing rule is valid when selling + or purchasing the item + join_hint: + table: tabUOM + 'on': uom = tabUOM.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabPricing Rule Item + Code). Comparison-ready across parent records.' +- table: tabPricing Rule Item Group + description: '' + fields: + - name: item_group + fieldtype: Link + label: Item Group + description: Specifies which product category this pricing rule applies to, used + when setting up group-based discounts or special pricing. + join_hint: + table: tabItem Group + 'on': item_group = tabItem Group.name + - name: uom + fieldtype: Link + label: UOM + description: Defines the unit of measurement for which this pricing rule is valid, + used when pricing varies by quantity unit like boxes vs pieces. + join_hint: + table: tabUOM + 'on': uom = tabUOM.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabPricing Rule Item + Group). Comparison-ready across parent records.' +- table: tabPrint Format + description: '' + fields: + - name: print_format_for + fieldtype: Select + label: Print Format For + description: Legacy field indicating the target document type for this print format. + options: + - DocType + - Report + - name: doc_type + fieldtype: Link + label: DocType + description: Target DocType this print format applies to, used when selecting + templates for specific documents. + join_hint: + table: tabDocType + 'on': doc_type = tabDocType.name + - name: report + fieldtype: Link + label: Report + description: Associated report name if this print format is designed for a specific + report output. + join_hint: + table: tabReport + 'on': report = tabReport.name + - name: module + fieldtype: Link + label: Module + description: ERP module this print format belongs to, used for filtering templates + by functional area. + join_hint: + table: tabModule Def + 'on': module = tabModule Def.name + - name: default_print_language + fieldtype: Link + label: Default Print Language + description: Default language for this print format, relevant for multi-language + document generation. + join_hint: + table: tabLanguage + 'on': default_print_language = tabLanguage.name + - name: standard + fieldtype: Select + label: Standard + description: Indicates if this is a system-provided standard template versus a + custom user-created format. + options: + - 'No' + - 'Yes' + - name: custom_format + fieldtype: Check + label: Custom Format + description: Indicates if this is a user-created custom print format rather than + a standard system format. + - name: disabled + fieldtype: Check + label: Disabled + description: Used to filter out inactive print formats that should not appear + in selection lists. + - name: pdf_generator + fieldtype: Select + label: PDF Generator + description: Specifies which PDF rendering engine to use when generating PDF output + from this format. + options: + - wkhtmltopdf + - name: print_format_type + fieldtype: Select + label: Print Format Type + description: Distinguishes between server-side, client-side, or JavaScript-based + print format rendering methods. + options: + - Jinja + - JS + - name: raw_printing + fieldtype: Check + label: Raw Printing + description: Enables direct printer command output for thermal or receipt printers + bypassing HTML rendering. + - name: html + fieldtype: Code + label: HTML + description: Contains the custom HTML template code used to render the print format + layout. + - name: raw_commands + fieldtype: Code + label: Raw Commands + description: Stores printer-specific commands like ESC/POS for direct hardware + printing without formatting. + - name: margin_top + fieldtype: Float + label: Margin Top + description: Defines top page margin in millimeters when generating printed or + PDF documents. + - name: margin_bottom + fieldtype: Float + label: Margin Bottom + description: Defines bottom page margin in millimeters when generating printed + or PDF documents. + - name: margin_left + fieldtype: Float + label: Margin Left + description: Defines left page margin in millimeters when generating printed or + PDF documents. + - name: margin_right + fieldtype: Float + label: Margin Right + description: Defines right page margin in millimeters when generating printed + or PDF documents. + - name: align_labels_right + fieldtype: Check + label: Align Labels to the Right + description: Controls whether field labels are right-aligned for improved form + readability. + - name: show_section_headings + fieldtype: Check + label: Show Section Headings + description: Determines if section headers are displayed in the printed output + for document organization. + - name: line_breaks + fieldtype: Check + label: Show Line Breaks after Sections + description: Controls whether line breaks in text fields are preserved in the + printed output. + - name: absolute_value + fieldtype: Check + label: Show Absolute Values + description: Forces numeric values to display as positive numbers regardless of + their actual sign. + - name: font_size + fieldtype: Int + label: Font Size + description: Specifies the default text size for printed documents, used when + customizing print layout appearance or adjusting readability. + - name: font + fieldtype: Data + label: Google Font + description: Defines the typeface family applied to printed documents, relevant + when standardizing brand presentation or document styling. + - name: page_number + fieldtype: Select + label: Page Number + description: Controls whether page numbers appear on printed output, used when + configuring multi-page document navigation or formal report requirements. + options: + - Hide + - Top Left + - Top Center + - Top Right + - Bottom Left + - Bottom Center + - Bottom Right + - name: css + fieldtype: Code + label: Custom CSS + description: Contains custom stylesheet rules for print layout styling, queried + when applying advanced formatting or brand-specific design requirements. + - name: format_data + fieldtype: Code + label: Format Data + description: Stores the structural configuration and field mappings for the print + template, used when analyzing or modifying print layout logic. + - name: print_format_builder + fieldtype: Check + label: Print Format Builder + description: Indicates whether the visual drag-and-drop builder was used to create + this format, relevant when identifying user-friendly versus code-based templates. + - name: print_format_builder_beta + fieldtype: Check + label: Print Format Builder Beta + description: Flags formats created with the beta version of the builder tool, + used when troubleshooting or migrating legacy print templates. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Print Format document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabPrint Format Field Template + description: '' + fields: + - name: document_type + fieldtype: Link + label: Document Type + description: DocType for which this print format field template is configured. + join_hint: + table: tabDocType + 'on': document_type = tabDocType.name + - name: field + fieldtype: Data + label: Default Template For Field + description: Specific field from the document type being formatted for printing. + - name: template_file + fieldtype: Data + label: Template File + description: File path or reference to the template file used for rendering this + field. + - name: module + fieldtype: Link + label: Module + description: ERP module to which this print format field template belongs. + join_hint: + table: tabModule Def + 'on': module = tabModule Def.name + - name: standard + fieldtype: Check + label: Standard + description: Indicates if this is a standard system template or custom user-created + template. + - name: template + fieldtype: Code + label: Template + description: Jinja or HTML template code defining how this field renders in print + output. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Print Format Field Template document (master/transaction). + Use only for single-entity lookups, not cross-record comparison unless fields + are per-relationship (e.g. supplier, price_list).' +- table: tabPrint Heading + description: '' + fields: + - name: print_heading + fieldtype: Data + label: Print Heading + description: The actual heading text displayed on printed documents like invoices + and purchase orders. + - name: description + fieldtype: Small Text + label: Description + description: Additional details explaining the purpose or usage context of this + print heading. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Print Heading document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabPrint Style + description: '' + fields: + - name: print_style_name + fieldtype: Data + label: Print Style Name + description: Display name of the print style used when selecting formatting options + for printed documents. + - name: disabled + fieldtype: Check + label: Disabled + description: Flag indicating if this print style is inactive and should not appear + in selection lists. + - name: standard + fieldtype: Check + label: Standard + description: Flag marking whether this is a system-provided print style that cannot + be deleted. + - name: css + fieldtype: Code + label: CSS + description: Custom CSS code that defines the visual formatting applied when this + print style is used for document printing. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Print Style document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabProcess Deferred Accounting + description: '' + fields: + - name: company + fieldtype: Link + label: Company + description: Company entity to which this deferred accounting process belongs + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: type + fieldtype: Select + label: Type + description: Classification of the deferred accounting process such as revenue + or expense deferral + options: + - Income + - Expense + - name: account + fieldtype: Link + label: Account + description: The accounting ledger account where deferred revenue or expense amounts + are recorded. + join_hint: + table: tabAccount + 'on': account = tabAccount.name + - name: posting_date + fieldtype: Date + label: Posting Date + description: The date when the deferred accounting transaction was posted to the + general ledger. + - name: start_date + fieldtype: Date + label: Service Start Date + description: The date when the deferral period begins for recognizing the deferred + revenue or expense. + - name: end_date + fieldtype: Date + label: Service End Date + description: End date of the deferred accounting period for recognizing revenue + or expenses over time. + - name: amended_from + fieldtype: Link + label: Amended From + description: Links to the original deferred accounting document that this record + amends or replaces. + join_hint: + table: tabProcess Deferred Accounting + 'on': amended_from = tabProcess Deferred Accounting.name + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Process Deferred Accounting document (master/transaction). + Use only for single-entity lookups, not cross-record comparison unless fields + are per-relationship (e.g. supplier, price_list).' +- table: tabProcess Payment Reconciliation + description: '' + fields: + - name: company + fieldtype: Link + label: Company + description: Company entity for which the payment reconciliation is being performed + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: party_type + fieldtype: Link + label: Party Type + description: Type of party involved in the payment reconciliation such as Customer + or Supplier + join_hint: + table: tabDocType + 'on': party_type = tabDocType.name + - name: party + fieldtype: Dynamic Link + label: Party + description: The customer or supplier whose payments are being reconciled against + invoices or advances. + - name: receivable_payable_account + fieldtype: Link + label: Receivable/Payable Account + description: The main accounts receivable or accounts payable ledger account for + tracking outstanding amounts owed by or to the party. + join_hint: + table: tabAccount + 'on': receivable_payable_account = tabAccount.name + - name: default_advance_account + fieldtype: Link + label: Default Advance Account + description: The ledger account used to record advance payments made to suppliers + or received from customers before invoicing. + join_hint: + table: tabAccount + 'on': default_advance_account = tabAccount.name + - name: from_invoice_date + fieldtype: Date + label: From Invoice Date + description: Start date for filtering invoices by their invoice date in the reconciliation + period + - name: to_invoice_date + fieldtype: Date + label: To Invoice Date + description: End date for filtering invoices by their invoice date in the reconciliation + period + - name: from_payment_date + fieldtype: Date + label: From Payment Date + description: Start date for filtering payments by their payment date in the reconciliation + period + - name: to_payment_date + fieldtype: Date + label: To Payment Date + description: End date of the payment period range being reconciled, used when + filtering reconciliations by date range or specific payment cycles. + - name: cost_center + fieldtype: Link + label: Cost Center + description: Cost center associated with the payment reconciliation, used when + analyzing or filtering reconciliations by department or business unit. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + - name: bank_cash_account + fieldtype: Link + label: Bank/Cash Account + description: Bank or cash account being reconciled against payment records, used + when identifying which account's transactions are being matched. + join_hint: + table: tabAccount + 'on': bank_cash_account = tabAccount.name + - name: status + fieldtype: Select + label: Status + description: Current state of the payment reconciliation process such as draft, + submitted, reconciled, or cancelled. + options: + - Queued + - Running + - Paused + - Completed + - Partially Reconciled + - Failed + - Cancelled + - name: error_log + fieldtype: Long Text + label: Error Log + description: Details of errors or issues encountered during the payment reconciliation + process. + - name: amended_from + fieldtype: Link + label: Amended From + description: Reference to the original payment reconciliation record that this + document corrects or replaces. + join_hint: + table: tabProcess Payment Reconciliation + 'on': amended_from = tabProcess Payment Reconciliation.name + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Process Payment Reconciliation document (master/transaction). + Use only for single-entity lookups, not cross-record comparison unless fields + are per-relationship (e.g. supplier, price_list).' +- table: tabProcess Payment Reconciliation Log + description: '' + fields: + - name: process_pr + fieldtype: Link + label: Parent Document + description: Links to the parent payment reconciliation process that this log + entry tracks or documents + join_hint: + table: tabProcess Payment Reconciliation + 'on': process_pr = tabProcess Payment Reconciliation.name + - name: status + fieldtype: Select + label: Status + description: Current state of the payment reconciliation process such as pending, + completed, failed, or in progress + options: + - Running + - Paused + - Reconciled + - Partially Reconciled + - Failed + - Cancelled + - name: allocated + fieldtype: Check + label: Allocated + description: Amount of payment that has been assigned or distributed to specific + invoices or obligations in this reconciliation entry. + - name: reconciled + fieldtype: Check + label: Reconciled + description: Amount that has been successfully matched and confirmed between payment + records and accounting entries. + - name: total_allocations + fieldtype: Int + label: Total Allocations + description: Cumulative sum of all payment amounts distributed across all invoices + or line items in this reconciliation process. + - name: reconciled_entries + fieldtype: Int + label: Reconciled Entries + description: Number or list of payment entries successfully matched and reconciled + during the payment reconciliation process. + - name: error_log + fieldtype: Long Text + label: Reconciliation Error Log + description: Details of failures, mismatches, or exceptions encountered during + payment reconciliation attempts. + - name: allocations + fieldtype: Table + label: Allocations + description: '' + child_hint: + child_table: tabProcess Payment Reconciliation Log Allocations + fieldname: allocations + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: allocations + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Process Payment Reconciliation Log document (master/transaction). + Use only for single-entity lookups, not cross-record comparison unless fields + are per-relationship (e.g. supplier, price_list).' +- table: tabProcess Payment Reconciliation Log Allocations + description: '' + fields: + - name: reference_type + fieldtype: Link + label: Reference Type + description: Type of document or transaction being allocated against in the payment + reconciliation, such as invoice, credit note, or journal entry + join_hint: + table: tabDocType + 'on': reference_type = tabDocType.name + - name: reference_name + fieldtype: Dynamic Link + label: Reference Name + description: Specific document number or transaction identifier that the payment + allocation is linked to + - name: reference_row + fieldtype: Data + label: Reference Row + description: Links this allocation to a specific row in the parent payment reconciliation + log entry. + - name: invoice_type + fieldtype: Link + label: Invoice Type + description: Indicates whether the allocated invoice is a sales invoice, purchase + invoice, credit note, or other document type. + join_hint: + table: tabDocType + 'on': invoice_type = tabDocType.name + - name: invoice_number + fieldtype: Dynamic Link + label: Invoice Number + description: The specific invoice or document number that this payment allocation + is applied against. + - name: allocated_amount + fieldtype: Currency + label: Allocated Amount + description: Amount successfully matched and applied from a payment to a specific + invoice or transaction during reconciliation. + - name: unreconciled_amount + fieldtype: Currency + label: Unreconciled Amount + description: Remaining amount that could not be matched or allocated to any invoice + or transaction after reconciliation attempts. + - name: amount + fieldtype: Currency + label: Amount + description: Total original amount of the payment or transaction entry before + any allocation or reconciliation processing. + - name: is_advance + fieldtype: Data + label: Is Advance + description: Indicates whether the allocation represents an advance payment made + before the invoice or service delivery. + - name: difference_amount + fieldtype: Currency + label: Difference Amount + description: The variance between the allocated payment amount and the invoice + amount, often due to rounding, discounts, or exchange rate fluctuations. + - name: gain_loss_posting_date + fieldtype: Date + label: Difference Posting Date + description: The date when foreign exchange gains or losses from this payment + allocation are posted to the accounting ledger. + - name: difference_account + fieldtype: Link + label: Difference Account + description: Account where reconciliation differences or variances are posted + when payment amounts don't match exactly + join_hint: + table: tabAccount + 'on': difference_account = tabAccount.name + - name: exchange_rate + fieldtype: Float + label: Exchange Rate + description: Rate used to convert foreign currency payment amounts to base currency + during reconciliation + - name: currency + fieldtype: Link + label: Currency + description: Currency in which the allocated payment or invoice amount is denominated + join_hint: + table: tabCurrency + 'on': currency = tabCurrency.name + - name: reconciled + fieldtype: Check + label: Reconciled + description: Whether this payment allocation has been successfully matched and + reconciled with corresponding bank or accounting records + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabProcess Payment + Reconciliation Log Allocations). Comparison-ready across parent records.' +- table: tabProcess Period Closing Voucher + description: '' + fields: + - name: parent_pcv + fieldtype: Link + label: PCV + description: Links to a parent period closing voucher when this voucher is part + of a hierarchical or multi-level closing process. + join_hint: + table: tabPeriod Closing Voucher + 'on': parent_pcv = tabPeriod Closing Voucher.name + - name: status + fieldtype: Select + label: Status + description: Current state of the period closing voucher such as draft, submitted, + approved, or cancelled. + options: + - Queued + - Running + - Paused + - Completed + - Cancelled + - name: p_l_closing_balance + fieldtype: JSON + label: P&L Closing Balance + description: Closing balance for profit and loss accounts at period end, used + when querying income statement or P&L account balances after period closing. + - name: normal_balances + fieldtype: Table + label: Dates to Process + description: '' + child_hint: + child_table: tabProcess Period Closing Voucher Detail + fieldname: normal_balances + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: normal_balances + - name: bs_closing_balance + fieldtype: JSON + label: Balance Sheet Closing Balance + description: Closing balance for balance sheet accounts at period end, used when + querying asset, liability, or equity account balances after period closing. + - name: z_opening_balances + fieldtype: Table + label: Opening Balances + description: '' + child_hint: + child_table: tabProcess Period Closing Voucher Detail + fieldname: z_opening_balances + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: z_opening_balances + - name: amended_from + fieldtype: Link + label: Amended From + description: References the original period closing voucher that this document + amends or corrects. + join_hint: + table: tabProcess Period Closing Voucher + 'on': amended_from = tabProcess Period Closing Voucher.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Process Period Closing Voucher document (master/transaction). + Use only for single-entity lookups, not cross-record comparison unless fields + are per-relationship (e.g. supplier, price_list).' +- table: tabProcess Period Closing Voucher Detail + description: '' + fields: + - name: processing_date + fieldtype: Date + label: Processing Date + description: Date when the period closing voucher was processed or executed + - name: report_type + fieldtype: Select + label: Report Type + description: Category or classification of the closing report being generated + options: + - Profit and Loss + - Balance Sheet + - name: status + fieldtype: Select + label: Status + description: Current state of the period closing voucher detail indicating whether + it is draft, posted, approved, or cancelled. + options: + - Queued + - Running + - Paused + - Completed + - Cancelled + - name: closing_balance + fieldtype: JSON + label: Closing Balance + description: Final balance amount for the account or entity at the end of the + closing period. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabProcess Period + Closing Voucher Detail). Comparison-ready across parent records.' +- table: tabProcess Statement Of Accounts + description: '' + fields: + - name: report + fieldtype: Select + label: Report + description: The generated report document or output file containing the statement + of accounts + options: + - General Ledger + - Accounts Receivable + - name: from_date + fieldtype: Date + label: From Date + description: Starting date of the period covered by the statement of accounts + - name: posting_date + fieldtype: Date + label: Posting Date + description: Date when the financial transaction was recorded in the accounting + ledger, used to filter statement of accounts by time period. + - name: company + fieldtype: Link + label: Company + description: Legal entity or business unit that owns the account, used to filter + statements by organizational boundary. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: account + fieldtype: Link + label: Account + description: Specific ledger account (receivable, payable, or general ledger) + for which the statement of accounts is generated. + join_hint: + table: tabAccount + 'on': account = tabAccount.name + - name: categorize_by + fieldtype: Select + label: Categorize By + description: Grouping dimension for organizing statement of accounts entries such + as by customer, invoice, or payment type. + options: + - Categorize by Voucher + - Categorize by Voucher (Consolidated) + - name: cost_center + fieldtype: Table MultiSelect + label: Cost Center + description: Cost center associated with the transactions in the statement for + expense allocation and financial tracking. + child_hint: + child_table: tabPSOA Cost Center + fieldname: cost_center + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: cost_center + - name: territory + fieldtype: Link + label: Territory + description: Geographic or organizational territory assigned to the customer or + transactions in the statement. + join_hint: + table: tabTerritory + 'on': territory = tabTerritory.name + - name: ignore_exchange_rate_revaluation_journals + fieldtype: Check + label: Ignore Exchange Rate Revaluation and Gain / Loss Journals + description: Whether to exclude foreign currency revaluation entries when generating + the statement of accounts. + - name: ignore_cr_dr_notes + fieldtype: Check + label: Ignore System Generated Credit / Debit Notes + description: Whether to exclude credit notes and debit notes when generating the + statement of accounts. + - name: to_date + fieldtype: Date + label: To Date + description: The ending date for transactions and balances included in the statement + of accounts. + - name: finance_book + fieldtype: Link + label: Finance Book + description: Identifies which accounting book or ledger this statement of accounts + belongs to for multi-book accounting scenarios. + join_hint: + table: tabFinance Book + 'on': finance_book = tabFinance Book.name + - name: currency + fieldtype: Link + label: Currency + description: The currency in which the statement of accounts amounts are denominated + and displayed. + join_hint: + table: tabCurrency + 'on': currency = tabCurrency.name + - name: project + fieldtype: Table MultiSelect + label: Project + description: Links the statement of accounts to a specific project for project-based + financial tracking and reporting. + child_hint: + child_table: tabPSOA Project + fieldname: project + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: project + - name: payment_terms_template + fieldtype: Link + label: Payment Terms Template + description: Payment terms template applied to the customer account for this statement + period. + join_hint: + table: tabPayment Terms Template + 'on': payment_terms_template = tabPayment Terms Template.name + - name: sales_partner + fieldtype: Link + label: Sales Partner + description: External sales partner or channel partner associated with the customer's + transactions in this statement. + join_hint: + table: tabSales Partner + 'on': sales_partner = tabSales Partner.name + - name: sales_person + fieldtype: Link + label: Sales Person + description: Internal sales representative or employee responsible for the customer + account in this statement. + join_hint: + table: tabSales Person + 'on': sales_person = tabSales Person.name + - name: show_remarks + fieldtype: Check + label: Show Remarks + description: Whether to display remarks or comments on the statement of accounts + document. + - name: based_on_payment_terms + fieldtype: Check + label: Based On Payment Terms + description: Whether the statement is organized or filtered according to the customer's + payment terms. + - name: customer_collection + fieldtype: Select + label: Select Customers By + description: The specific group or set of customers included in this statement + of accounts. + options: + - Customer Group + - Territory + - Sales Partner + - Sales Person + - name: collection_name + fieldtype: Dynamic Link + label: Recipient + description: Name or identifier of the collection group this statement of accounts + belongs to for organizing multiple statements together. + - name: primary_mandatory + fieldtype: Check + label: Send To Primary Contact + description: Indicates whether this statement of accounts is the primary mandatory + one that must be processed or sent. + - name: show_net_values_in_party_account + fieldtype: Check + label: Show Net Values in Party Account + description: Controls whether net values (after adjustments, returns, or offsets) + are displayed in the party's account statement instead of gross amounts. + - name: customers + fieldtype: Table + label: Customers + description: '' + child_hint: + child_table: tabProcess Statement Of Accounts Customer + fieldname: customers + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: customers + - name: orientation + fieldtype: Select + label: Orientation + description: Page layout direction for the statement document, either portrait + or landscape format + options: + - Landscape + - Portrait + - name: include_break + fieldtype: Check + label: Page Break After Each SoA + description: Whether to insert page breaks between different customers or sections + in the statement + - name: include_ageing + fieldtype: Check + label: Include Ageing Summary + description: Whether to show aging analysis of outstanding amounts by time period + on the statement of accounts. + - name: ageing_based_on + fieldtype: Select + label: Ageing Based On + description: The date field used to calculate aging buckets (e.g., posting date, + due date, or invoice date). + options: + - Due Date + - Posting Date + - name: letter_head + fieldtype: Link + label: Letter Head + description: The company letterhead template to display at the top of the printed + statement of accounts. + join_hint: + table: tabLetter Head + 'on': letter_head = tabLetter Head.name + - name: terms_and_conditions + fieldtype: Link + label: Terms and Conditions + description: Legal terms or payment conditions text included on the statement + of accounts document sent to customers. + join_hint: + table: tabTerms and Conditions + 'on': terms_and_conditions = tabTerms and Conditions.name + - name: enable_auto_email + fieldtype: Check + label: Enable Auto Email + description: Whether the statement of accounts is automatically emailed to customers + on a scheduled basis. + - name: sender + fieldtype: Link + label: Sender + description: Email address or user account that sends the statement of accounts + to customers. + join_hint: + table: tabEmail Account + 'on': sender = tabEmail Account.name + - name: frequency + fieldtype: Select + label: Frequency + description: How often statement of accounts are generated or sent to customers + (daily, weekly, monthly, quarterly). + options: + - Weekly + - Monthly + - Quarterly + - name: filter_duration + fieldtype: Int + label: Filter Duration (Months) + description: Time period or date range used to filter transactions included in + the statement of accounts. + - name: start_date + fieldtype: Date + label: Start Date + description: Beginning date from which statement of accounts processing or transaction + inclusion starts. + - name: pdf_name + fieldtype: Data + label: PDF Name + description: Name of the generated PDF file for the statement of accounts document. + - name: subject + fieldtype: Data + label: Subject + description: Email subject line used when sending the statement of accounts to + customers. + - name: cc_to + fieldtype: Table MultiSelect + label: CC To + description: Email addresses to be copied when sending the statement of accounts. + child_hint: + child_table: tabProcess Statement Of Accounts CC + fieldname: cc_to + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: cc_to + - name: body + fieldtype: Text Editor + label: Body + description: Main content or detailed text of the statement of accounts, typically + referenced when searching for specific transaction descriptions, notes, or detailed + account information within the statement. + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Process Statement Of Accounts document (master/transaction). + Use only for single-entity lookups, not cross-record comparison unless fields + are per-relationship (e.g. supplier, price_list).' +- table: tabProcess Statement Of Accounts CC + description: '' + fields: + - name: cc + fieldtype: Link + label: CC + description: Carbon copy recipient or cost center associated with the statement + of accounts process + join_hint: + table: tabUser + 'on': cc = tabUser.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabProcess Statement + Of Accounts CC). Comparison-ready across parent records.' +- table: tabProcess Statement Of Accounts Customer + description: '' + fields: + - name: customer + fieldtype: Link + label: Customer + description: Customer account ID for whom the statement of accounts is being generated + join_hint: + table: tabCustomer + 'on': customer = tabCustomer.name + - name: customer_name + fieldtype: Data + label: Customer Name + description: Display name of the customer receiving the statement of accounts + - name: billing_email + fieldtype: Data + label: Billing Email + description: Email address where invoices and billing statements are sent to the + customer. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabProcess Statement + Of Accounts Customer). Comparison-ready across parent records.' +- table: tabProcess Subscription + description: '' + fields: + - name: posting_date + fieldtype: Date + label: Posting Date + description: Date when the subscription transaction was posted to the system, + used when filtering subscription activities by time period or analyzing subscription + processing timelines. + - name: subscription + fieldtype: Link + label: Subscription + description: Reference to the subscription plan or agreement being processed, + used when analyzing which subscriptions are being executed or linking process + records to subscription master data. + join_hint: + table: tabSubscription + 'on': subscription = tabSubscription.name + - name: amended_from + fieldtype: Link + label: Amended From + description: Links to the original subscription that was amended or corrected + by this subscription record. + join_hint: + table: tabProcess Subscription + 'on': amended_from = tabProcess Subscription.name + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Process Subscription document (master/transaction). Use + only for single-entity lookups, not cross-record comparison unless fields are + per-relationship (e.g. supplier, price_list).' +- table: tabProduct Bundle + description: Aggregate a group of Items into another Item. This is useful if you + are maintaining the stock of the packed items and not the bundled item + fields: + - name: new_item_code + fieldtype: Link + label: Parent Item + description: The SKU or item code assigned to the bundled product as a single + sellable unit, distinct from individual component item codes. + join_hint: + table: tabItem + 'on': new_item_code = tabItem.name + - name: description + fieldtype: Data + label: Description + description: Detailed explanation of what the bundle contains or its purpose, + used when searching for bundles by their contents or characteristics rather + than name. + - name: disabled + fieldtype: Check + label: Disabled + description: Whether the product bundle is inactive and unavailable for use in + transactions or sales. + - name: items + fieldtype: Table + label: Items + description: '' + child_hint: + child_table: tabProduct Bundle Item + fieldname: items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: items + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Product Bundle document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabProduct Bundle Item + description: '' + fields: + - name: item_code + fieldtype: Link + label: Item + description: References the SKU or product identifier of the bundled item for + linking to master product data and pricing. + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: qty + fieldtype: Float + label: Qty + description: Specifies how many units of this item are included in the bundle + for calculating total quantities and costs. + - name: description + fieldtype: Text Editor + label: Description + description: Text description of the individual item included in the product bundle. + - name: rate + fieldtype: Float + label: Rate + description: Quantity or ratio of this item included per unit of the parent bundle + product. + - name: uom + fieldtype: Link + label: UOM + description: Unit of measurement for the bundle item quantity (e.g., pieces, kg, + liters). + join_hint: + table: tabUOM + 'on': uom = tabUOM.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabProduct Bundle + Item). Comparison-ready across parent records.' +- table: tabProduction Plan + description: '' + fields: + - name: naming_series + fieldtype: Select + label: Naming Series + description: Prefix pattern used to auto-generate production plan names following + organizational numbering conventions + options: + - MFG-PP-.YYYY.- + - name: company + fieldtype: Link + label: Company + description: Company entity that owns and executes this production plan, relevant + when filtering plans by business unit or legal entity + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: get_items_from + fieldtype: Select + label: Get Items From + description: Source location or document type from which items are pulled into + the production plan, such as sales orders or material requests. + options: + - Sales Order + - Material Request + - name: posting_date + fieldtype: Date + label: Posting Date + description: Date when the production plan is officially recorded or executed + in the system. + - name: item_code + fieldtype: Link + label: Item Code + description: Unique identifier of the finished good or product being planned for + production. + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: customer + fieldtype: Link + label: Customer + description: The customer for whom the production is being planned or executed. + join_hint: + table: tabCustomer + 'on': customer = tabCustomer.name + - name: warehouse + fieldtype: Link + label: Warehouse + description: The warehouse location where produced goods will be stored or from + which materials will be sourced for production. + join_hint: + table: tabWarehouse + 'on': warehouse = tabWarehouse.name + - name: project + fieldtype: Link + label: Project + description: The specific project associated with this production plan, linking + production activities to project-based manufacturing or custom orders. + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: sales_order_status + fieldtype: Select + label: Sales Order Status + description: Status of the sales order linked to this production plan, used to + filter production by order fulfillment state like pending, confirmed, or completed. + options: + - To Deliver and Bill + - To Bill + - To Deliver + - name: from_date + fieldtype: Date + label: From Date + description: Start date of the production plan period, used when querying production + scheduled to begin within a specific timeframe. + - name: to_date + fieldtype: Date + label: To Date + description: End date of the production plan period, used when querying production + scheduled to complete by a specific deadline. + - name: from_delivery_date + fieldtype: Date + label: From Delivery Date + description: Start date of the delivery date range for production planning purposes. + - name: to_delivery_date + fieldtype: Date + label: To Delivery Date + description: End date of the delivery date range for production planning purposes. + - name: sales_orders + fieldtype: Table + label: Sales Orders + description: '' + child_hint: + child_table: tabProduction Plan Sales Order + fieldname: sales_orders + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: sales_orders + - name: material_requests + fieldtype: Table + label: Material Requests + description: '' + child_hint: + child_table: tabProduction Plan Material Request + fieldname: material_requests + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: material_requests + - name: combine_items + fieldtype: Check + label: Consolidate Sales Order Items + description: Referenced when users ask whether multiple items or materials should + be consolidated or grouped together in this production plan. + - name: po_items + fieldtype: Table + label: Assembly Items + description: '' + child_hint: + child_table: tabProduction Plan Item + fieldname: po_items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: po_items + - name: prod_plan_references + fieldtype: Table + label: Production Plan Item Reference + description: '' + child_hint: + child_table: tabProduction Plan Item Reference + fieldname: prod_plan_references + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: prod_plan_references + - name: combine_sub_items + fieldtype: Check + label: Consolidate Sub Assembly Items + description: Flag indicating whether sub-assembly components should be consolidated + or kept separate in the production plan + - name: sub_assembly_warehouse + fieldtype: Link + label: Sub Assembly Warehouse + description: Warehouse location where sub-assemblies or intermediate components + are stored during production + join_hint: + table: tabWarehouse + 'on': sub_assembly_warehouse = tabWarehouse.name + - name: skip_available_sub_assembly_item + fieldtype: Check + label: Skip Available Sub Assembly Items + description: Whether to exclude sub-assembly items that are already in stock when + planning production requirements. + - name: sub_assembly_items + fieldtype: Table + label: sub_assembly_items + description: '' + child_hint: + child_table: tabProduction Plan Sub Assembly Item + fieldname: sub_assembly_items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: sub_assembly_items + - name: include_non_stock_items + fieldtype: Check + label: Include Non Stock Items + description: Whether to include items not normally held in inventory (non-stock + items) in the production plan. + - name: include_subcontracted_items + fieldtype: Check + label: Include Subcontracted Items + description: Whether items manufactured by external subcontractors are included + in this production plan. + - name: consider_minimum_order_qty + fieldtype: Check + label: Consider Minimum Order Qty + description: Whether minimum order quantity constraints are applied when calculating + production quantities. + - name: include_safety_stock + fieldtype: Check + label: Include Safety Stock in Required Qty Calculation + description: Whether safety stock buffer quantities are factored into production + planning calculations. + - name: ignore_existing_ordered_qty + fieldtype: Check + label: Ignore Available Stock + description: Whether to exclude already ordered quantities when calculating material + requirements for this production plan + - name: for_warehouse + fieldtype: Link + label: Raw Materials Warehouse + description: Target warehouse where the planned production items will be stored + upon completion + join_hint: + table: tabWarehouse + 'on': for_warehouse = tabWarehouse.name + - name: mr_items + fieldtype: Table + label: Raw Materials + description: '' + child_hint: + child_table: tabMaterial Request Plan Item + fieldname: mr_items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: mr_items + - name: total_planned_qty + fieldtype: Float + label: Total Planned Qty + description: Target quantity intended to be manufactured according to the production + plan. + - name: total_produced_qty + fieldtype: Float + label: Total Produced Qty + description: Actual quantity that has been manufactured so far against the plan. + - name: status + fieldtype: Select + label: Status + description: Current state of the production plan such as draft, in progress, + completed, or cancelled. + options: + - Draft + - Submitted + - Not Started + - In Process + - Completed + - Closed + - Cancelled + - Material Requested + - name: warehouses + fieldtype: Table MultiSelect + label: Warehouses + description: Target warehouse where the production output will be stored after + manufacturing completion. + child_hint: + child_table: tabProduction Plan Material Request Warehouse + fieldname: warehouses + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: warehouses + - name: amended_from + fieldtype: Link + label: Amended From + description: Reference to the original production plan document that this plan + amends or replaces. + join_hint: + table: tabProduction Plan + 'on': amended_from = tabProduction Plan.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Production Plan document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabProduction Plan Item + description: '' + fields: + - name: include_exploded_items + fieldtype: Check + label: Include Exploded Items + description: Whether to expand and include sub-components or bill of materials + items in the production plan + - name: item_code + fieldtype: Link + label: Item Code + description: The product or material code being planned for production + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: bom_no + fieldtype: Link + label: BOM No + description: Bill of materials identifier for the production plan item specifying + which BOM version to use for manufacturing. + join_hint: + table: tabBOM + 'on': bom_no = tabBOM.name + - name: planned_qty + fieldtype: Float + label: Planned Qty + description: Target quantity scheduled to be produced for this production plan + item. + - name: stock_uom + fieldtype: Link + label: UOM + description: Unit of measurement for the planned production quantity (pieces, + kg, liters, etc). + join_hint: + table: tabUOM + 'on': stock_uom = tabUOM.name + - name: warehouse + fieldtype: Link + label: Finished Goods Warehouse + description: Location where the production plan item will be manufactured or stored + after production + join_hint: + table: tabWarehouse + 'on': warehouse = tabWarehouse.name + - name: planned_start_date + fieldtype: Datetime + label: Planned Start Date + description: Scheduled date when production of this item is intended to begin + - name: pending_qty + fieldtype: Float + label: Pending Qty + description: Quantity of the item that is planned but not yet started or completed + in production + - name: ordered_qty + fieldtype: Float + label: Ordered Qty + description: Quantity planned or requested to be produced for this production + plan item. + - name: description + fieldtype: Text Editor + label: Description + description: Text description or details about what is being produced in this + production plan item. + - name: produced_qty + fieldtype: Float + label: Produced Qty + description: Actual quantity that has been manufactured or completed so far for + this production plan item. + - name: sales_order + fieldtype: Link + label: Sales Order + description: Links production plan item to the originating customer sales order + driving production demand. + join_hint: + table: tabSales Order + 'on': sales_order = tabSales Order.name + - name: sales_order_item + fieldtype: Data + label: Sales Order Item + description: Specific line item from the sales order that this production plan + item fulfills. + - name: material_request + fieldtype: Link + label: Material Request + description: Material request document generated or linked to procure raw materials + needed for this production plan item. + join_hint: + table: tabMaterial Request + 'on': material_request = tabMaterial Request.name + - name: material_request_item + fieldtype: Data + label: material_request_item + description: Links to the specific material request line item that triggered or + is associated with this production plan item. + - name: product_bundle_item + fieldtype: Link + label: Product Bundle Item + description: References a component item within a product bundle when the production + plan involves bundled products. + join_hint: + table: tabItem + 'on': product_bundle_item = tabItem.name + - name: item_reference + fieldtype: Data + label: Item Reference + description: General reference identifier for the item being produced, used when + querying what is planned for manufacturing. + - name: temporary_name + fieldtype: Data + label: temporary name + description: Temporary or working name assigned to a production plan item during + draft or planning stages before finalization. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabProduction Plan + Item). Comparison-ready across parent records.' +- table: tabProduction Plan Item Reference + description: '' + fields: + - name: item_reference + fieldtype: Data + label: Item Reference + description: The specific item or product code being referenced in the production + plan + - name: sales_order + fieldtype: Link + label: Sales Order Reference + description: The sales order number that triggered or is linked to this production + plan item + join_hint: + table: tabSales Order + 'on': sales_order = tabSales Order.name + - name: sales_order_item + fieldtype: Data + label: Sales Order Item + description: Links production plan to the specific sales order line item that + triggered or requires this production. + - name: qty + fieldtype: Data + label: Qty + description: Quantity of items to be produced for this production plan reference. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabProduction Plan + Item Reference). Comparison-ready across parent records.' +- table: tabProduction Plan Material Request + description: '' + fields: + - name: material_request + fieldtype: Link + label: Material Request + description: Reference to the specific material request document linked to this + production plan + join_hint: + table: tabMaterial Request + 'on': material_request = tabMaterial Request.name + - name: material_request_date + fieldtype: Date + label: Material Request Date + description: Date when the material request was created or submitted for this + production plan + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabProduction Plan + Material Request). Comparison-ready across parent records.' +- table: tabProduction Plan Material Request Warehouse + description: '' + fields: + - name: warehouse + fieldtype: Link + label: Warehouse + description: Warehouse location where materials for the production plan are requested + from or stored + join_hint: + table: tabWarehouse + 'on': warehouse = tabWarehouse.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabProduction Plan + Material Request Warehouse). Comparison-ready across parent records.' +- table: tabProduction Plan Sales Order + description: '' + fields: + - name: sales_order + fieldtype: Link + label: Sales Order + description: Reference to the sales order that triggered or is associated with + this production plan + join_hint: + table: tabSales Order + 'on': sales_order = tabSales Order.name + - name: sales_order_date + fieldtype: Date + label: Sales Order Date + description: Date when the associated sales order was created or placed + - name: customer + fieldtype: Link + label: Customer + description: Customer name or identifier associated with the sales order in the + production plan + join_hint: + table: tabCustomer + 'on': customer = tabCustomer.name + - name: grand_total + fieldtype: Currency + label: Grand Total + description: Total monetary value of the sales order including all items, taxes, + and charges + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabProduction Plan + Sales Order). Comparison-ready across parent records.' +- table: tabProduction Plan Sub Assembly Item + description: '' + fields: + - name: production_item + fieldtype: Link + label: Sub Assembly Item Code + description: Item code or SKU of the sub-assembly component being produced or + consumed in the production plan + join_hint: + table: tabItem + 'on': production_item = tabItem.name + - name: item_name + fieldtype: Data + label: Item Name + description: Human-readable name or description of the sub-assembly item for display + and search purposes + - name: fg_warehouse + fieldtype: Link + label: Target Warehouse + description: Warehouse location where the finished goods from this sub-assembly + will be stored after production completion. + join_hint: + table: tabWarehouse + 'on': fg_warehouse = tabWarehouse.name + - name: parent_item_code + fieldtype: Link + label: Finished Good + description: Item code of the parent finished good or higher-level assembly that + requires this sub-assembly component. + join_hint: + table: tabItem + 'on': parent_item_code = tabItem.name + - name: schedule_date + fieldtype: Datetime + label: Schedule Date + description: Planned date when this sub-assembly production should be completed + to meet the parent item's production timeline. + - name: qty + fieldtype: Float + label: Required Qty + description: Quantity of the sub-assembly item required for the production plan. + - name: bom_no + fieldtype: Link + label: Bom No + description: Bill of materials number identifying which BOM structure this sub-assembly + belongs to. + join_hint: + table: tabBOM + 'on': bom_no = tabBOM.name + - name: bom_level + fieldtype: Int + label: Level (BOM) + description: Hierarchical level of the sub-assembly within the BOM structure, + indicating its depth in the assembly tree. + - name: type_of_manufacturing + fieldtype: Select + label: Manufacturing Type + description: Specifies whether the sub-assembly is manufactured in-house, outsourced, + or produced through another manufacturing method. + options: + - In House + - Subcontract + - Material Request + - name: supplier + fieldtype: Link + label: Supplier + description: Identifies the vendor supplying the sub-assembly when manufacturing + is outsourced or purchased externally. + join_hint: + table: tabSupplier + 'on': supplier = tabSupplier.name + - name: wo_produced_qty + fieldtype: Float + label: Produced Qty + description: Tracks the actual quantity of the sub-assembly that has been completed + or produced against the work order. + - name: purchase_order + fieldtype: Link + label: Purchase Order + description: Purchase order number linked to procure this sub-assembly item for + the production plan. + join_hint: + table: tabPurchase Order + 'on': purchase_order = tabPurchase Order.name + - name: production_plan_item + fieldtype: Data + label: Production Plan Item + description: Specific item from the parent production plan that requires this + sub-assembly. + - name: ordered_qty + fieldtype: Float + label: Ordered Qty + description: Quantity of the sub-assembly item ordered to fulfill production requirements. + - name: received_qty + fieldtype: Float + label: Received Qty + description: Quantity of sub-assembly items actually received into inventory for + this production plan. + - name: indent + fieldtype: Int + label: Indent + description: Hierarchical level or nesting depth of this sub-assembly item within + the production plan structure. + - name: uom + fieldtype: Link + label: UOM + description: Unit of measurement for the sub-assembly item quantity (e.g., pieces, + kg, liters). + join_hint: + table: tabUOM + 'on': uom = tabUOM.name + - name: stock_uom + fieldtype: Link + label: Stock UOM + description: Unit of measurement for the sub-assembly item quantity in the production + plan + join_hint: + table: tabUOM + 'on': stock_uom = tabUOM.name + - name: description + fieldtype: Small Text + label: description + description: Detailed text describing the sub-assembly item or component in the + production plan + - name: actual_qty + fieldtype: Float + label: Actual Qty + description: Current available quantity of the sub-assembly item in stock + - name: projected_qty + fieldtype: Float + label: Projected Qty + description: Quantity of the sub-assembly item planned or forecasted to be produced + in this production plan. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabProduction Plan + Sub Assembly Item). Comparison-ready across parent records.' +- table: tabProject + description: '' + fields: + - name: naming_series + fieldtype: Select + label: Series + description: Prefix pattern that determines how project identifiers are auto-generated, + relevant when asking about project numbering schemes or conventions + options: + - PROJ-.#### + - name: project_name + fieldtype: Data + label: Project Name + description: Full descriptive title of the project, used when searching by what + the project is called or its business purpose + - name: status + fieldtype: Select + label: Status + description: Current stage or state of the project such as planning, in progress, + on hold, completed, or cancelled. + options: + - Open + - Completed + - Cancelled + - name: project_type + fieldtype: Link + label: Project Type + description: Category or classification of the project such as internal, customer, + research, maintenance, or implementation. + join_hint: + table: tabProject Type + 'on': project_type = tabProject Type.name + - name: is_active + fieldtype: Select + label: Is Active + description: Whether the project is currently active and ongoing versus inactive, + closed, or archived. + options: + - 'Yes' + - 'No' + - name: percent_complete_method + fieldtype: Select + label: '% Complete Method' + description: Method used to calculate project completion percentage, such as manual + entry, task-based, or effort-based calculation. + options: + - Manual + - Task Completion + - Task Progress + - Task Weight + - name: percent_complete + fieldtype: Percent + label: '% Completed' + description: Current completion percentage of the project, used when users ask + how far along or what progress a project has made. + - name: project_template + fieldtype: Link + label: From Template + description: Indicates whether this project is a reusable template for creating + new projects rather than an active project instance. + join_hint: + table: tabProject Template + 'on': project_template = tabProject Template.name + - name: expected_start_date + fieldtype: Date + label: Expected Start Date + description: When the project is planned or scheduled to begin work. + - name: expected_end_date + fieldtype: Date + label: Expected End Date + description: When the project is planned or scheduled to be completed. + - name: priority + fieldtype: Select + label: Priority + description: Urgency or importance level assigned to the project for resource + allocation and scheduling decisions. + options: + - Medium + - Low + - High + - name: department + fieldtype: Link + label: Department + description: Department responsible for or assigned to the project + join_hint: + table: tabDepartment + 'on': department = tabDepartment.name + - name: customer + fieldtype: Link + label: Customer + description: Customer or client for whom the project is being performed + join_hint: + table: tabCustomer + 'on': customer = tabCustomer.name + - name: sales_order + fieldtype: Link + label: Sales Order + description: Sales order that initiated or is linked to the project + join_hint: + table: tabSales Order + 'on': sales_order = tabSales Order.name + - name: users + fieldtype: Table + label: Users + description: '' + child_hint: + child_table: tabProject User + fieldname: users + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: users + - name: copied_from + fieldtype: Data + label: Copied From + description: The source project from which this project was duplicated or cloned. + - name: notes + fieldtype: Text Editor + label: Notes + description: Free-text comments, remarks, or additional information about the + project. + - name: actual_start_date + fieldtype: Date + label: Actual Start Date (via Timesheet) + description: Date when work on the project actually began, used to compare against + planned start or analyze project delays. + - name: actual_time + fieldtype: Float + label: Actual Time in Hours (via Timesheet) + description: Total time actually spent on the project, used to compare against + estimated time or analyze project effort and overruns. + - name: actual_end_date + fieldtype: Date + label: Actual End Date (via Timesheet) + description: Date when the project actually completed, used to compare against + planned end date or analyze project duration and delays. + - name: estimated_costing + fieldtype: Currency + label: Estimated Cost + description: Projected or budgeted cost for the project before actual expenses + are incurred. + - name: total_costing_amount + fieldtype: Currency + label: Total Costing Amount (via Timesheet) + description: Actual total cost accumulated for the project including all expense + categories. + - name: total_expense_claim + fieldtype: Currency + label: Total Expense Claim (via Expense Claims) + description: Sum of all expense claims associated with project for budget tracking + and cost analysis. + - name: total_purchase_cost + fieldtype: Currency + label: Total Purchase Cost (via Purchase Invoice) + description: Total amount spent specifically on purchases or procurement for the + project. + - name: company + fieldtype: Link + label: Company + description: Company that owns or is responsible for the project + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: total_sales_amount + fieldtype: Currency + label: Total Sales Amount (via Sales Order) + description: Total revenue value of the project including all billable and non-billable + amounts + - name: total_billable_amount + fieldtype: Currency + label: Total Billable Amount (via Timesheet) + description: Amount that can be invoiced to the customer, excluding non-billable + costs or internal expenses + - name: total_billed_amount + fieldtype: Currency + label: Total Billed Amount (via Sales Invoice) + description: Total revenue invoiced to the customer for this project across all + billing milestones and transactions. + - name: total_consumed_material_cost + fieldtype: Currency + label: Total Consumed Material Cost (via Stock Entry) + description: Actual cost of materials used or consumed during project execution, + distinct from labor or overhead costs. + - name: cost_center + fieldtype: Link + label: Default Cost Center + description: Accounting department or business unit to which project expenses + and revenues are allocated for financial tracking. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + - name: gross_margin + fieldtype: Currency + label: Gross Margin + description: Total profit amount from the project calculated as revenue minus + direct costs. + - name: per_gross_margin + fieldtype: Percent + label: Gross Margin % + description: Gross margin expressed as a percentage of total project revenue. + - name: collect_progress + fieldtype: Check + label: Collect Progress + description: Current status or completion percentage of payment collection from + the customer for the project. + - name: holiday_list + fieldtype: Link + label: Holiday List + description: Which holidays or non-working days apply to this project for scheduling + and resource planning purposes + join_hint: + table: tabHoliday List + 'on': holiday_list = tabHoliday List.name + - name: frequency + fieldtype: Select + label: Frequency To Collect Progress + description: How often project tasks, reports, or recurring activities are scheduled + or repeated + options: + - Hourly + - Twice Daily + - Daily + - Weekly + - name: from_time + fieldtype: Time + label: From Time + description: Start time of day for project work hours or time-based project activities + - name: to_time + fieldtype: Time + label: To Time + description: Project end time or deadline when the project is scheduled to complete + or finish + - name: first_email + fieldtype: Time + label: First Email + description: Primary email contact for the project, typically the main point of + contact or project owner + - name: second_email + fieldtype: Time + label: Second Email + description: Secondary or alternate email contact for the project, used when additional + notification or backup contact is needed + - name: daily_time_to_send + fieldtype: Time + label: Daily Time to send + description: Time of day when daily project notifications or reports are scheduled + to be sent + - name: day_to_send + fieldtype: Select + label: Day to Send + description: Specific day of the week or month when recurring project notifications + or reports are scheduled to be sent + options: + - Monday + - Tuesday + - Wednesday + - Thursday + - Friday + - Saturday + - Sunday + - name: weekly_time_to_send + fieldtype: Time + label: Weekly Time to send + description: Time of day when weekly project notifications or reports are scheduled + to be sent + - name: subject + fieldtype: Data + label: Subject + description: Project title or name used to identify and search for specific projects + - name: message + fieldtype: Text + label: Message + description: Detailed project description, notes, or additional context about + the project scope and objectives + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Project document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabProject Template + description: '' + fields: + - name: project_type + fieldtype: Link + label: Project Type + description: Category or classification of projects this template is designed + for + join_hint: + table: tabProject Type + 'on': project_type = tabProject Type.name + - name: tasks + fieldtype: Table + label: Tasks + description: '' + child_hint: + child_table: tabProject Template Task + fieldname: tasks + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: tasks + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Project Template document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabProject Template Task + description: '' + fields: + - name: task + fieldtype: Link + label: Task + description: Specifies the individual task within a template, used when querying + what tasks are included in a template or when comparing task sequences across + different project templates. + join_hint: + table: tabTask + 'on': task = tabTask.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabProject Template + Task). Comparison-ready across parent records.' +- table: tabProject Type + description: '' + fields: + - name: project_type + fieldtype: Data + label: Project Type + description: Unique code or identifier for the project type used in system references + and lookups + - name: description + fieldtype: Text + label: Description + description: Detailed explanation of what the project type represents and when + it should be applied to projects + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Project Type document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabProject Update + description: '' + fields: + - name: naming_series + fieldtype: Data + label: Series + description: Prefix pattern for auto-generating project update names, used when + configuring numbering schemes for update tracking. + - name: project + fieldtype: Link + label: Project + description: Links to the parent project being updated, used when filtering or + reporting updates for a specific project. + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: sent + fieldtype: Check + label: Sent + description: Whether the project update has been sent or distributed to stakeholders + or team members + - name: date + fieldtype: Date + label: Date + description: The calendar date when the project update was created or issued + - name: time + fieldtype: Time + label: Time + description: The specific time of day when the project update was created or issued + - name: users + fieldtype: Table + label: Users + description: '' + child_hint: + child_table: tabProject User + fieldname: users + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: users + - name: amended_from + fieldtype: Link + label: Amended From + description: Reference to the previous project update that this update corrects + or replaces when amendments are made. + join_hint: + table: tabProject Update + 'on': amended_from = tabProject Update.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Project Update document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabProject User + description: '' + fields: + - name: user + fieldtype: Link + label: User + description: User assigned to the project, used when identifying project team + members or filtering by resource allocation. + join_hint: + table: tabUser + 'on': user = tabUser.name + - name: welcome_email_sent + fieldtype: Check + label: Welcome email sent + description: Whether an initial welcome email has been delivered to the project + user + - name: view_attachments + fieldtype: Check + label: View attachments + description: Whether the user has permission to view files and documents attached + to the project. + - name: hide_timesheets + fieldtype: Check + label: Hide timesheets + description: Whether timesheet entries are hidden from this user's view of the + project. + - name: project_status + fieldtype: Text + label: Project Status + description: The current lifecycle stage or state of the project such as active, + completed, on hold, or cancelled. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabProject User). + Comparison-ready across parent records.' +- table: tabPromotional Scheme + description: '' + fields: + - name: apply_on + fieldtype: Select + label: Apply On + description: Specifies whether the promotion applies to item codes, item groups, + or brands to determine eligible products + options: + - Item Code + - Item Group + - Brand + - Transaction + - name: disable + fieldtype: Check + label: Disable + description: Indicates if the promotional scheme is currently inactive and should + not be applied to transactions + - name: items + fieldtype: Table + label: Pricing Rule Item Code + description: '' + child_hint: + child_table: tabPricing Rule Item Code + fieldname: items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: items + - name: item_groups + fieldtype: Table + label: Pricing Rule Item Group + description: '' + child_hint: + child_table: tabPricing Rule Item Group + fieldname: item_groups + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: item_groups + - name: brands + fieldtype: Table + label: Pricing Rule Brand + description: '' + child_hint: + child_table: tabPricing Rule Brand + fieldname: brands + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: brands + - name: mixed_conditions + fieldtype: Check + label: Mixed Conditions + description: Whether the promotional scheme allows combining different types of + conditions like quantity and amount thresholds together. + - name: is_cumulative + fieldtype: Check + label: Is Cumulative + description: Whether benefits from this promotional scheme can stack with other + active promotions or are applied exclusively. + - name: apply_rule_on_other + fieldtype: Select + label: Apply Rule On Other + description: Whether the scheme's pricing or discount rules apply to other items + beyond those meeting the qualifying conditions. + options: + - Item Code + - Item Group + - Brand + - name: other_item_code + fieldtype: Link + label: Item Code + description: Identifies the additional or alternative product offered as part + of the promotional scheme. + join_hint: + table: tabItem + 'on': other_item_code = tabItem.name + - name: other_item_group + fieldtype: Link + label: Item Group + description: Categorizes the additional or alternative product by its product + group in the promotional scheme. + join_hint: + table: tabItem Group + 'on': other_item_group = tabItem Group.name + - name: other_brand + fieldtype: Link + label: Brand + description: Specifies the brand of the additional or alternative product included + in the promotional scheme. + join_hint: + table: tabBrand + 'on': other_brand = tabBrand.name + - name: selling + fieldtype: Check + label: Selling + description: Indicates whether this promotional scheme applies to sales transactions + or customer-facing pricing. + - name: buying + fieldtype: Check + label: Buying + description: Indicates whether this promotional scheme applies to purchase transactions + or supplier-facing pricing. + - name: applicable_for + fieldtype: Select + label: Applicable For + description: Specifies the scope or entity type this promotional scheme targets, + such as specific items, item groups, customers, or territories. + options: + - Customer + - Customer Group + - Territory + - Sales Partner + - Campaign + - Supplier + - Supplier Group + - name: customer + fieldtype: Table MultiSelect + label: Customer + description: Specific customer account to which this promotional scheme applies + or is restricted. + child_hint: + child_table: tabCustomer Item + fieldname: customer + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: customer + - name: customer_group + fieldtype: Table MultiSelect + label: Customer Group + description: Customer classification or segment eligible for this promotional + scheme when not targeting individual customers. + child_hint: + child_table: tabCustomer Group Item + fieldname: customer_group + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: customer_group + - name: territory + fieldtype: Table MultiSelect + label: Territory + description: Geographic region or sales territory where this promotional scheme + is valid or applicable. + child_hint: + child_table: tabTerritory Item + fieldname: territory + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: territory + - name: sales_partner + fieldtype: Table MultiSelect + label: Sales Partner + description: Identifies the external sales partner or distributor associated with + this promotional scheme for partner-specific incentive programs. + child_hint: + child_table: tabSales Partner Item + fieldname: sales_partner + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: sales_partner + - name: campaign + fieldtype: Table MultiSelect + label: Campaign + description: Links this promotional scheme to a specific marketing campaign to + track campaign-driven discounts and offers. + child_hint: + child_table: tabCampaign Item + fieldname: campaign + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: campaign + - name: supplier + fieldtype: Table MultiSelect + label: Supplier + description: Specifies the supplier providing promotional support or funding for + this scheme, typically for vendor-funded promotions. + child_hint: + child_table: tabSupplier Item + fieldname: supplier + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: supplier + - name: supplier_group + fieldtype: Table MultiSelect + label: Supplier Group + description: Identifies which group of suppliers this promotional scheme applies + to for filtering or analyzing promotions by supplier category. + child_hint: + child_table: tabSupplier Group Item + fieldname: supplier_group + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: supplier_group + - name: valid_from + fieldtype: Date + label: Valid From + description: Start date when the promotional scheme becomes active and can be + applied to transactions. + - name: valid_upto + fieldtype: Date + label: Valid Upto + description: End date when the promotional scheme expires and is no longer applicable + to transactions. + - name: company + fieldtype: Link + label: Company + description: Identifies which company entity the promotional scheme applies to + for multi-company filtering. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: currency + fieldtype: Link + label: Currency + description: Specifies the currency in which promotional scheme discounts, thresholds, + or pricing are denominated. + join_hint: + table: tabCurrency + 'on': currency = tabCurrency.name + - name: price_discount_slabs + fieldtype: Table + label: Promotional Scheme Price Discount + description: '' + child_hint: + child_table: tabPromotional Scheme Price Discount + fieldname: price_discount_slabs + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: price_discount_slabs + - name: product_discount_slabs + fieldtype: Table + label: Promotional Scheme Product Discount + description: '' + child_hint: + child_table: tabPromotional Scheme Product Discount + fieldname: product_discount_slabs + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: product_discount_slabs + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Promotional Scheme document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabPromotional Scheme Price Discount + description: '' + fields: + - name: disable + fieldtype: Check + label: Disable + description: Whether this promotional scheme price discount is currently inactive + or deactivated + - name: apply_multiple_pricing_rules + fieldtype: Check + label: Apply Multiple Pricing Rules + description: Whether multiple pricing rules can be stacked or combined for this + promotional scheme + - name: rule_description + fieldtype: Small Text + label: Rule Description + description: Text explanation of the promotional discount rule conditions and + terms for this price discount tier. + - name: min_qty + fieldtype: Float + label: Min Qty + description: Minimum purchase quantity required to qualify for this promotional + price discount tier. + - name: max_qty + fieldtype: Float + label: Max Qty + description: Maximum purchase quantity allowed for this promotional price discount + tier before moving to next tier. + - name: min_amount + fieldtype: Currency + label: Min Amount + description: Minimum purchase amount required to qualify for this promotional + discount tier + - name: max_amount + fieldtype: Currency + label: Max Amount + description: Maximum purchase amount threshold for this promotional discount tier + - name: rate_or_discount + fieldtype: Select + label: Discount Type + description: Percentage or fixed discount value applied when purchase amount falls + within this tier's range + options: + - Rate + - Discount Percentage + - Discount Amount + - name: rate + fieldtype: Currency + label: Rate + description: Price per unit after applying the promotional scheme discount. + - name: discount_amount + fieldtype: Currency + label: Discount Amount + description: Fixed monetary value deducted from the original price in the promotional + scheme. + - name: discount_percentage + fieldtype: Float + label: Discount Percentage + description: Percentage reduction applied to the original price in the promotional + scheme. + - name: for_price_list + fieldtype: Link + label: For Price List + description: Price list to which this promotional discount scheme applies, used + when querying promotions for specific customer pricing tiers or regions. + join_hint: + table: tabPrice List + 'on': for_price_list = tabPrice List.name + - name: warehouse + fieldtype: Link + label: Warehouse + description: Warehouse location where this promotional discount is valid, used + when filtering promotions by inventory or fulfillment location. + join_hint: + table: tabWarehouse + 'on': warehouse = tabWarehouse.name + - name: threshold_percentage + fieldtype: Percent + label: Threshold for Suggestion + description: Minimum percentage threshold that must be met to trigger this promotional + discount, used when checking discount eligibility conditions. + - name: validate_applied_rule + fieldtype: Check + label: Validate Applied Rule + description: Whether the promotional scheme validates or checks if the discount + rule was correctly applied to transactions. + - name: priority + fieldtype: Select + label: Priority + description: Order of precedence when multiple promotional schemes or discount + rules could apply to the same transaction. + options: + - '1' + - '2' + - '3' + - '4' + - '5' + - '6' + - '7' + - '8' + - '9' + - '10' + - '11' + - '12' + - '13' + - '14' + - '15' + - '16' + - '17' + - '18' + - '19' + - '20' + - name: apply_discount_on_rate + fieldtype: Check + label: Apply Discount on Rate + description: Whether the discount percentage or amount is calculated based on + the item's rate or price. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabPromotional Scheme + Price Discount). Comparison-ready across parent records.' +- table: tabPromotional Scheme Product Discount + description: '' + fields: + - name: disable + fieldtype: Check + label: Disable + description: Whether this promotional scheme product discount is inactive and + should not be applied to transactions + - name: apply_multiple_pricing_rules + fieldtype: Check + label: Apply Multiple Pricing Rules + description: Whether multiple promotional pricing rules can be stacked or combined + for the same product in this scheme + - name: rule_description + fieldtype: Small Text + label: Rule Description + description: Describes the specific discount rule or condition applied to products + in this promotional scheme. + - name: min_qty + fieldtype: Float + label: Min Qty + description: Minimum product quantity required to qualify for this promotional + discount. + - name: max_qty + fieldtype: Float + label: Max Qty + description: Maximum product quantity eligible for this promotional discount tier. + - name: min_amount + fieldtype: Currency + label: Min Amount + description: Minimum purchase amount or quantity threshold required to qualify + for the promotional discount on products. + - name: max_amount + fieldtype: Currency + label: Max Amount + description: Maximum purchase amount or quantity threshold up to which the promotional + discount applies to products. + - name: same_item + fieldtype: Check + label: Same Item + description: Indicates whether the discount applies only when purchasing multiple + units of the same product versus mixed products. + - name: free_item + fieldtype: Link + label: Item Code + description: The product code or item that is given for free as part of this promotional + discount scheme. + join_hint: + table: tabItem + 'on': free_item = tabItem.name + - name: free_qty + fieldtype: Float + label: Qty + description: The quantity of the free item provided when the promotional scheme + conditions are met. + - name: free_item_uom + fieldtype: Link + label: UOM + description: The unit of measure for the free item quantity in this promotional + scheme. + join_hint: + table: tabUOM + 'on': free_item_uom = tabUOM.name + - name: free_item_rate + fieldtype: Currency + label: Rate + description: Rate or price assigned to the free item given as part of the promotional + discount scheme. + - name: round_free_qty + fieldtype: Check + label: Round Free Qty + description: Whether to round the calculated free quantity to the nearest whole + number in the promotion. + - name: warehouse + fieldtype: Link + label: Warehouse + description: Specific warehouse location where the promotional product discount + scheme is applicable or valid. + join_hint: + table: tabWarehouse + 'on': warehouse = tabWarehouse.name + - name: threshold_percentage + fieldtype: Percent + label: Threshold for Suggestion + description: Minimum percentage threshold required for the product discount to + apply in the promotional scheme. + - name: priority + fieldtype: Select + label: Priority + description: Ranking order that determines which promotional discount applies + when multiple schemes are eligible for the same product. + options: + - '1' + - '2' + - '3' + - '4' + - '5' + - '6' + - '7' + - '8' + - '9' + - '10' + - '11' + - '12' + - '13' + - '14' + - '15' + - '16' + - '17' + - '18' + - '19' + - '20' + - name: is_recursive + fieldtype: Check + label: Is Recursive + description: Whether the promotional discount applies repeatedly or cascades through + multiple levels of the product hierarchy or transaction. + - name: recurse_for + fieldtype: Float + label: Recurse Every (As Per Transaction UOM) + description: Specifies the entity or dimension (like customer group or territory) + for which the discount applies recursively to child records in the hierarchy. + - name: apply_recursion_over + fieldtype: Float + label: Apply Recursion Over (As Per Transaction UOM) + description: Defines the specific hierarchical field or relationship path over + which the promotional discount recursion is applied. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabPromotional Scheme + Product Discount). Comparison-ready across parent records.' +- table: tabProperty Setter + description: '' + fields: + - name: is_system_generated + fieldtype: Check + label: Is System Generated + description: Flag indicating whether this property setter was auto-generated by + the system versus manually created. + - name: doctype_or_field + fieldtype: Select + label: Applied On + description: Specifies whether this property setter applies to an entire DocType + or a specific field. + options: + - DocField + - DocType + - DocType Link + - DocType Action + - DocType State + - name: doc_type + fieldtype: Link + label: DocType + description: Target DocType name that this property setter customizes. + join_hint: + table: tabDocType + 'on': doc_type = tabDocType.name + - name: field_name + fieldtype: Data + label: Field Name + description: Specific field name within the DocType being customized by this property + setter. + - name: row_name + fieldtype: Data + label: Row Name + description: Identifier for the specific row when applying property changes to + child table entries. + - name: module + fieldtype: Link + label: Module (for export) + description: Module or app where this property setter customization is organized. + join_hint: + table: tabModule Def + 'on': module = tabModule Def.name + - name: property + fieldtype: Data + label: Property + description: Identifies which system configuration or setting is being modified, + used when searching for specific parameter changes or configuration history. + - name: property_type + fieldtype: Data + label: Property Type + description: Categorizes the kind of property being set, used when filtering configuration + changes by technical domain or data type. + - name: value + fieldtype: Small Text + label: Set Value + description: Contains the actual configured value assigned to a property, used + when analyzing what settings were applied or comparing configuration states. + - name: default_value + fieldtype: Data + label: Default Value + description: Stores the original or system-recommended value for a property, used + when identifying customizations or determining if settings deviate from standards. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Property Setter document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabProspect + description: '' + fields: + - name: company_name + fieldtype: Data + label: Company Name + description: Name of the organization or business entity the prospect represents + - name: customer_group + fieldtype: Link + label: Customer Group + description: Classification or segment assigned to the prospect for targeting + and qualification purposes + join_hint: + table: tabCustomer Group + 'on': customer_group = tabCustomer Group.name + - name: no_of_employees + fieldtype: Select + label: No. of Employees + description: Number of employees at the prospect company, used to assess company + size and sales opportunity scale. + options: + - 1-10 + - 11-50 + - 51-200 + - 201-500 + - 501-1000 + - 1000+ + - name: annual_revenue + fieldtype: Currency + label: Annual Revenue + description: Yearly revenue of the prospect company, used to evaluate financial + capacity and prioritize high-value opportunities. + - name: market_segment + fieldtype: Link + label: Market Segment + description: Industry or business category the prospect operates in, used to target + specific verticals or filter by sector. + join_hint: + table: tabMarket Segment + 'on': market_segment = tabMarket Segment.name + - name: industry + fieldtype: Link + label: Industry + description: The business sector or market vertical of the prospect, used when + filtering or analyzing prospects by their type of business activity. + join_hint: + table: tabIndustry Type + 'on': industry = tabIndustry Type.name + - name: territory + fieldtype: Link + label: Territory + description: The geographic region or sales area assigned to the prospect, used + when routing leads or analyzing prospects by location-based assignments. + join_hint: + table: tabTerritory + 'on': territory = tabTerritory.name + - name: prospect_owner + fieldtype: Link + label: Prospect Owner + description: The salesperson or team member responsible for managing and following + up with the prospect. + join_hint: + table: tabUser + 'on': prospect_owner = tabUser.name + - name: website + fieldtype: Data + label: Website + description: URL of the prospect's company website for online presence and contact + information + - name: fax + fieldtype: Data + label: Fax + description: Fax number for the prospect, used when traditional document transmission + methods are required + - name: company + fieldtype: Link + label: Company + description: Name of the company or organization the prospect represents or is + affiliated with + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: leads + fieldtype: Table + label: leads + description: '' + child_hint: + child_table: tabProspect Lead + fieldname: leads + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: leads + - name: opportunities + fieldtype: Table + label: Opportunities + description: '' + child_hint: + child_table: tabProspect Opportunity + fieldname: opportunities + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: opportunities + - name: notes + fieldtype: Table + label: Notes + description: '' + child_hint: + child_table: tabCRM Note + fieldname: notes + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: notes + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Prospect document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabProspect Lead + description: '' + fields: + - name: lead + fieldtype: Link + label: Lead + description: Foreign key linking to the lead record, used when querying prospect + conversion status or analyzing lead source effectiveness. + join_hint: + table: tabLead + 'on': lead = tabLead.name + - name: lead_name + fieldtype: Data + label: Lead Name + description: Display name of the associated lead, used for reporting and filtering + prospects by their originating lead information. + - name: email + fieldtype: Data + label: Email + description: Email address of the prospect for contact and communication purposes. + - name: mobile_no + fieldtype: Data + label: Mobile No + description: Mobile phone number of the prospect for direct contact. + - name: lead_owner + fieldtype: Data + label: Lead Owner + description: Sales representative or team member responsible for managing and + following up with this prospect. + - name: status + fieldtype: Data + label: Status + description: Current stage of the prospect lead in the sales pipeline, such as + new, contacted, qualified, or converted. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabProspect Lead). + Comparison-ready across parent records.' +- table: tabProspect Opportunity + description: '' + fields: + - name: opportunity + fieldtype: Link + label: Opportunity + description: Describes the sales opportunity or deal being pursued, used when + searching for specific deals or opportunity types. + join_hint: + table: tabOpportunity + 'on': opportunity = tabOpportunity.name + - name: amount + fieldtype: Currency + label: Amount + description: Contains the monetary value of the opportunity, used when analyzing + deal sizes, revenue forecasts, or filtering by value thresholds. + - name: stage + fieldtype: Data + label: Stage + description: Current sales pipeline stage of the opportunity such as prospecting, + qualification, proposal, negotiation, or closed. + - name: deal_owner + fieldtype: Data + label: Deal Owner + description: Sales representative or team member responsible for managing and + closing this opportunity. + - name: probability + fieldtype: Percent + label: Probability + description: Likelihood percentage that this opportunity will close successfully + and convert to a sale. + - name: expected_closing + fieldtype: Date + label: Closing + description: Date when the sales opportunity is anticipated to close or convert + to a won deal. + - name: currency + fieldtype: Link + label: Currency + description: Currency in which the opportunity value and revenue amounts are denominated. + join_hint: + table: tabCurrency + 'on': currency = tabCurrency.name + - name: contact_person + fieldtype: Link + label: Contact Person + description: Primary contact or decision-maker associated with this sales opportunity + at the prospect organization. + join_hint: + table: tabContact + 'on': contact_person = tabContact.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabProspect Opportunity). + Comparison-ready across parent records.' +- table: tabPurchase Invoice + description: '' + fields: + - name: title + fieldtype: Data + label: Title + description: Supplier name associated with the purchase invoice, used when searching + invoices by vendor or supplier + - name: naming_series + fieldtype: Select + label: Series + description: Prefix pattern that determines how purchase invoice numbers are automatically + formatted and sequenced + options: + - ACC-PINV-.YYYY.- + - ACC-PINV-RET-.YYYY.- + - name: supplier + fieldtype: Link + label: Supplier + description: Unique identifier for the vendor who issued the purchase invoice, + used when filtering or joining supplier records. + join_hint: + table: tabSupplier + 'on': supplier = tabSupplier.name + - name: supplier_name + fieldtype: Data + label: Supplier Name + description: Display name of the vendor on the purchase invoice, used when searching + by vendor name or displaying human-readable reports. + - name: company + fieldtype: Link + label: Company + description: The company entity that received goods or services and is responsible + for paying this purchase invoice. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: posting_date + fieldtype: Date + label: Date + description: The date when this purchase invoice was officially recorded in the + accounting ledger, used for financial period reporting and aging analysis. + - name: posting_time + fieldtype: Time + label: Posting Time + description: The time of day when this purchase invoice was posted to the accounting + system, used when precise transaction timing matters for audit trails or same-day + sequencing. + - name: set_posting_time + fieldtype: Check + label: Edit Posting Date and Time + description: Indicates whether the posting date was manually specified rather + than defaulting to the transaction creation time. + - name: due_date + fieldtype: Date + label: Due Date + description: The date by which payment for this purchase invoice must be made + to the supplier. + - name: is_paid + fieldtype: Check + label: Is Paid + description: Indicates whether the purchase invoice has been fully paid or remains + outstanding. + - name: is_return + fieldtype: Check + label: Is Return (Debit Note) + description: Indicates whether this purchase invoice represents a return of goods + to the supplier rather than a new purchase. + - name: return_against + fieldtype: Link + label: Return Against Purchase Invoice + description: References the original purchase invoice document that this return + invoice is reversing or crediting. + join_hint: + table: tabPurchase Invoice + 'on': return_against = tabPurchase Invoice.name + - name: update_outstanding_for_self + fieldtype: Check + label: Update Outstanding for Self + description: Controls whether this purchase invoice updates its own outstanding + amount when it is also referenced as a return document by another invoice. + - name: update_billed_amount_in_purchase_order + fieldtype: Check + label: Update Billed Amount in Purchase Order + description: Whether this invoice updates the billed amount on the linked purchase + order to track billing progress against the order. + - name: update_billed_amount_in_purchase_receipt + fieldtype: Check + label: Update Billed Amount in Purchase Receipt + description: Whether this invoice updates the billed amount on the linked purchase + receipt to track billing against received goods. + - name: apply_tds + fieldtype: Check + label: Apply Tax Withholding Amount + description: Whether tax deducted at source is applied to this purchase invoice + for withholding tax compliance. + - name: tax_withholding_category + fieldtype: Link + label: Tax Withholding Category + description: Category for tax withholding applied to this purchase invoice, used + when filtering or reporting on invoices by withholding tax type. + join_hint: + table: tabTax Withholding Category + 'on': tax_withholding_category = tabTax Withholding Category.name + - name: amended_from + fieldtype: Link + label: Amended From + description: Reference to the original purchase invoice that this invoice amends + or corrects. + join_hint: + table: tabPurchase Invoice + 'on': amended_from = tabPurchase Invoice.name + - name: custom_zatca_summary_invoice + fieldtype: Check + label: ZATCA Summary Invoice + description: Indicates whether this purchase invoice is a ZATCA-compliant summary + invoice for Saudi Arabian tax reporting. + - name: custom_zatca_3rd_party_invoice + fieldtype: Check + label: ZATCA 3rd party invoice + description: Indicates if this purchase invoice was issued by a third party on + behalf of the supplier for ZATCA compliance purposes. + - name: custom_zatca_self_billed_invoice + fieldtype: Check + label: ZATCA Self billed Invoice + description: Indicates if this purchase invoice was created by the buyer instead + of the supplier for ZATCA compliance purposes. + - name: custom_zatca_import_invoice + fieldtype: Check + label: ZATCA Import Invoice + description: Indicates if this purchase invoice is for imported goods requiring + ZATCA import tax treatment. + - name: custom_zatca_nominal_invoice + fieldtype: Check + label: ZATCA NOMINAL Invoice + description: Indicates if this is a nominal invoice under ZATCA regulations for + Saudi Arabia tax compliance purposes. + - name: custom_zatca_tax_category + fieldtype: Select + label: ZATCA Tax Category + description: ZATCA tax category classification code for Saudi Arabia e-invoicing + compliance determining applicable VAT treatment. + options: + - Standard + - Zero Rated + - Exempted + - Services outside scope of tax / Not subject to VAT + - name: custom_exemption_reason_code + fieldtype: Select + label: Exemption Reason Code + description: Code explaining why the invoice is exempt from standard tax under + ZATCA regulations for Saudi Arabia compliance reporting. + options: + - Standard 15% + - VATEX-SA-29 + - VATEX-SA-29-7 + - VATEX-SA-30 + - VATEX-SA-32 + - VATEX-SA-33 + - VATEX-SA-34-1 + - VATEX-SA-34-2 + - VATEX-SA-34-3 + - VATEX-SA-34-4 + - VATEX-SA-34-5 + - VATEX-SA-35 + - VATEX-SA-36 + - VATEX-SA-EDU + - VATEX-SA-HEA + - VATEX-SA-MLTRY + - VATEX-SA-OOS + - name: bill_no + fieldtype: Data + label: Supplier Invoice No + description: Supplier's invoice or bill number used to reference or search for + specific purchase invoices from vendors. + - name: bill_date + fieldtype: Date + label: Supplier Invoice Date + description: Date on the supplier's invoice, used when filtering or searching + purchases by when the vendor issued the bill. + - name: cost_center + fieldtype: Link + label: Cost Center + description: Accounting cost center assigned to this purchase invoice for expense + allocation and departmental cost tracking. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + - name: project + fieldtype: Link + label: Project + description: Links the purchase invoice to a specific project for tracking project-related + procurement costs and expenses. + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: currency + fieldtype: Link + label: Currency + description: The currency in which the purchase invoice amount is denominated + and will be paid. + join_hint: + table: tabCurrency + 'on': currency = tabCurrency.name + - name: conversion_rate + fieldtype: Float + label: Exchange Rate + description: The exchange rate used to convert the invoice currency to the company's + base currency for accounting purposes. + - name: use_transaction_date_exchange_rate + fieldtype: Check + label: Use Transaction Date Exchange Rate + description: Whether the invoice uses the exchange rate from the transaction date + rather than a manually specified rate. + - name: buying_price_list + fieldtype: Link + label: Price List + description: The price list applied to determine purchase prices for items on + this invoice. + join_hint: + table: tabPrice List + 'on': buying_price_list = tabPrice List.name + - name: price_list_currency + fieldtype: Link + label: Price List Currency + description: The currency in which the price list is denominated, which may differ + from the invoice currency. + join_hint: + table: tabCurrency + 'on': price_list_currency = tabCurrency.name + - name: plc_conversion_rate + fieldtype: Float + label: Price List Exchange Rate + description: Exchange rate used to convert price list currency to transaction + currency for this purchase invoice. + - name: ignore_pricing_rule + fieldtype: Check + label: Ignore Pricing Rule + description: Whether automated pricing rules and discounts were bypassed when + creating this purchase invoice. + - name: scan_barcode + fieldtype: Data + label: Scan Barcode + description: Barcode scanned to quickly add items to the purchase invoice during + data entry. + - name: last_scanned_warehouse + fieldtype: Data + label: Last Scanned Warehouse + description: Warehouse location most recently scanned during purchase invoice + item receipt or barcode processing. + - name: update_stock + fieldtype: Check + label: Update Stock + description: Indicates whether this purchase invoice automatically updates inventory + stock levels upon submission. + - name: set_warehouse + fieldtype: Link + label: Set Accepted Warehouse + description: Default warehouse location assigned to all items in this purchase + invoice for stock receipt. + join_hint: + table: tabWarehouse + 'on': set_warehouse = tabWarehouse.name + - name: set_from_warehouse + fieldtype: Link + label: Set From Warehouse + description: Warehouse from which purchased items are received or set to be stocked + after invoice processing. + join_hint: + table: tabWarehouse + 'on': set_from_warehouse = tabWarehouse.name + - name: is_subcontracted + fieldtype: Check + label: Is Subcontracted + description: Indicates whether the purchase invoice relates to subcontracted manufacturing + or production work. + - name: rejected_warehouse + fieldtype: Link + label: Rejected Warehouse + description: Warehouse where rejected or non-conforming items from this purchase + are stored or returned. + join_hint: + table: tabWarehouse + 'on': rejected_warehouse = tabWarehouse.name + - name: supplier_warehouse + fieldtype: Link + label: Supplier Warehouse + description: Warehouse location from which the supplier ships or delivers the + purchased items. + join_hint: + table: tabWarehouse + 'on': supplier_warehouse = tabWarehouse.name + - name: items + fieldtype: Table + label: Items + description: '' + child_hint: + child_table: tabPurchase Invoice Item + fieldname: items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: items + - name: total_qty + fieldtype: Float + label: Total Quantity + description: Sum of quantities across all line items in the purchase invoice. + - name: total_net_weight + fieldtype: Float + label: Total Net Weight + description: Total weight of all items in the purchase invoice excluding packaging + or container weight. + - name: base_total + fieldtype: Currency + label: Total (Company Currency) + description: Total amount of the purchase invoice in company's base currency before + any taxes or discounts are applied. + - name: base_net_total + fieldtype: Currency + label: Net Total (Company Currency) + description: Total amount of the purchase invoice in company's base currency after + discounts but before taxes. + - name: total + fieldtype: Currency + label: Total + description: Grand total amount of the purchase invoice including all taxes, charges, + and discounts. + - name: net_total + fieldtype: Currency + label: Net Total + description: Subtotal amount before applying taxes and additional charges but + after item-level discounts. + - name: tax_withholding_net_total + fieldtype: Currency + label: Tax Withholding Net Total + description: Net amount subject to tax withholding or tax deducted at source calculations. + - name: base_tax_withholding_net_total + fieldtype: Currency + label: Base Tax Withholding Net Total + description: Net total amount after tax withholding in base currency, used when + calculating vendor payments with withholding tax deductions. + - name: tax_category + fieldtype: Link + label: Tax Category + description: Classification of tax treatment applied to the invoice, used to determine + which tax rules or rates apply based on vendor or transaction type. + join_hint: + table: tabTax Category + 'on': tax_category = tabTax Category.name + - name: taxes_and_charges + fieldtype: Link + label: Purchase Taxes and Charges Template + description: Template or configuration name defining which specific taxes and + additional charges are applied to this purchase invoice. + join_hint: + table: tabPurchase Taxes and Charges Template + 'on': taxes_and_charges = tabPurchase Taxes and Charges Template.name + - name: shipping_rule + fieldtype: Link + label: Shipping Rule + description: Shipping method or carrier rule applied to the purchase invoice for + freight calculation and logistics tracking. + join_hint: + table: tabShipping Rule + 'on': shipping_rule = tabShipping Rule.name + - name: incoterm + fieldtype: Link + label: Incoterm + description: International commercial terms code defining responsibility transfer + point between buyer and seller for shipping costs and risk. + join_hint: + table: tabIncoterm + 'on': incoterm = tabIncoterm.name + - name: named_place + fieldtype: Data + label: Named Place + description: Specific geographic location or port referenced in the incoterm where + responsibility transfers between parties. + - name: taxes + fieldtype: Table + label: Purchase Taxes and Charges + description: '' + child_hint: + child_table: tabPurchase Taxes and Charges + fieldname: taxes + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: taxes + - name: base_taxes_and_charges_added + fieldtype: Currency + label: Taxes and Charges Added (Company Currency) + description: Total value of additional taxes and charges in base currency that + increase the invoice amount. + - name: base_taxes_and_charges_deducted + fieldtype: Currency + label: Taxes and Charges Deducted (Company Currency) + description: Total value of taxes and charges in base currency that decrease the + invoice amount such as tax credits or deductions. + - name: base_total_taxes_and_charges + fieldtype: Currency + label: Total Taxes and Charges (Company Currency) + description: Net total of all taxes and charges in base currency after adding + and deducting applicable amounts. + - name: taxes_and_charges_added + fieldtype: Currency + label: Taxes and Charges Added + description: Sum of all tax and charge amounts that increase the invoice total. + - name: taxes_and_charges_deducted + fieldtype: Currency + label: Taxes and Charges Deducted + description: Sum of all tax and charge amounts that decrease the invoice total. + - name: total_taxes_and_charges + fieldtype: Currency + label: Total Taxes and Charges + description: Sum of all tax and charge amounts applied to the purchase invoice, + used when analyzing tax costs or verifying tax calculations. + - name: base_grand_total + fieldtype: Currency + label: Grand Total (Company Currency) + description: Final total amount of the purchase invoice in base currency including + all items, taxes, and charges. + - name: base_rounding_adjustment + fieldtype: Currency + label: Rounding Adjustment (Company Currency) + description: Adjustment amount in base currency applied to round the final invoice + total to the nearest acceptable value. + - name: base_rounded_total + fieldtype: Currency + label: Rounded Total (Company Currency) + description: Total amount in base currency after applying rounding adjustments + to the invoice. + - name: base_in_words + fieldtype: Data + label: In Words (Company Currency) + description: Text representation of the base currency total amount written out + in words for formal documentation. + - name: grand_total + fieldtype: Currency + label: Grand Total + description: Final total amount of the invoice in transaction currency including + all taxes, charges, and discounts. + - name: rounding_adjustment + fieldtype: Currency + label: Rounding Adjustment + description: Amount added or subtracted to round the invoice total to the nearest + whole number or decimal place. + - name: use_company_roundoff_cost_center + fieldtype: Check + label: Use Company Default Round Off Cost Center + description: Whether the company's default cost center is applied to the rounding + adjustment line item. + - name: rounded_total + fieldtype: Currency + label: Rounded Total + description: Final invoice total after applying rounding adjustment to the calculated + total. + - name: in_words + fieldtype: Data + label: In Words + description: Total invoice amount expressed as text words for check printing and + formal documentation + - name: total_advance + fieldtype: Currency + label: Total Advance + description: Sum of all advance payments or prepayments applied against this purchase + invoice + - name: outstanding_amount + fieldtype: Currency + label: Outstanding Amount + description: Remaining unpaid balance on the purchase invoice after deducting + payments and advances + - name: disable_rounded_total + fieldtype: Check + label: Disable Rounded Total + description: Whether invoice total rounding is disabled, relevant when users ask + about exact unrounded totals or rounding behavior. + - name: apply_discount_on + fieldtype: Select + label: Apply Additional Discount On + description: Specifies whether discounts apply to grand total or net total, used + when users ask how discounts are calculated. + options: + - Grand Total + - Net Total + - name: base_discount_amount + fieldtype: Currency + label: Additional Discount Amount (Company Currency) + description: Total discount amount in base currency, used when users ask about + total discounts applied to the invoice in company's default currency. + - name: additional_discount_percentage + fieldtype: Float + label: Additional Discount Percentage + description: Percentage discount applied to the entire invoice beyond item-level + discounts, used when calculating total invoice discount. + - name: discount_amount + fieldtype: Currency + label: Additional Discount Amount + description: Total monetary value of all discounts applied to the invoice, used + when analyzing actual discount given in currency. + - name: tax_withheld_vouchers + fieldtype: Table + label: Tax Withheld Vouchers + description: '' + child_hint: + child_table: tabTax Withheld Vouchers + fieldname: tax_withheld_vouchers + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: tax_withheld_vouchers + - name: other_charges_calculation + fieldtype: Text Editor + label: Taxes and Charges Calculation + description: Additional fees or charges beyond item costs, such as freight, handling, + or insurance charges added to the purchase invoice total. + - name: pricing_rules + fieldtype: Table + label: Pricing Rule Detail + description: '' + child_hint: + child_table: tabPricing Rule Detail + fieldname: pricing_rules + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: pricing_rules + - name: supplied_items + fieldtype: Table + label: Supplied Items + description: '' + child_hint: + child_table: tabPurchase Receipt Item Supplied + fieldname: supplied_items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: supplied_items + - name: mode_of_payment + fieldtype: Link + label: Mode of Payment + description: Payment method used for the purchase invoice such as cash, check, + credit card, or bank transfer. + join_hint: + table: tabMode of Payment + 'on': mode_of_payment = tabMode of Payment.name + - name: base_paid_amount + fieldtype: Currency + label: Paid Amount (Company Currency) + description: Amount already paid against this purchase invoice in the company's + base currency. + - name: clearance_date + fieldtype: Date + label: Clearance Date + description: Date when the payment for this purchase invoice was cleared or reconciled + in the bank account. + - name: cash_bank_account + fieldtype: Link + label: Cash/Bank Account + description: Account from which payment for this purchase invoice was made or + will be made. + join_hint: + table: tabAccount + 'on': cash_bank_account = tabAccount.name + - name: paid_amount + fieldtype: Currency + label: Paid Amount + description: Total amount already paid against this purchase invoice. + - name: allocate_advances_automatically + fieldtype: Check + label: Set Advances and Allocate (FIFO) + description: Whether advance payments to the supplier are automatically applied + to this invoice. + - name: only_include_allocated_payments + fieldtype: Check + label: Only Include Allocated Payments + description: Whether to include only payments that have been allocated to specific + invoices, excluding unallocated or advance payments. + - name: advances + fieldtype: Table + label: Advances + description: '' + child_hint: + child_table: tabPurchase Invoice Advance + fieldname: advances + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: advances + - name: advance_tax + fieldtype: Table + label: Advance Tax + description: '' + child_hint: + child_table: tabAdvance Tax + fieldname: advance_tax + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: advance_tax + - name: write_off_amount + fieldtype: Currency + label: Write Off Amount + description: Amount written off from the purchase invoice in transaction currency, + used when querying invoice adjustments or discrepancies that were written off. + - name: base_write_off_amount + fieldtype: Currency + label: Write Off Amount (Company Currency) + description: Amount written off from the purchase invoice in company base currency, + used for consolidated reporting across multiple currencies. + - name: write_off_account + fieldtype: Link + label: Write Off Account + description: General ledger account where the write-off amount is posted, used + when analyzing where invoice write-offs are recorded financially. + join_hint: + table: tabAccount + 'on': write_off_account = tabAccount.name + - name: write_off_cost_center + fieldtype: Link + label: Write Off Cost Center + description: Cost center assigned when writing off discrepancies or variances + on this purchase invoice. + join_hint: + table: tabCost Center + 'on': write_off_cost_center = tabCost Center.name + - name: supplier_address + fieldtype: Link + label: Select Supplier Address + description: Specific supplier address linked to this purchase invoice, relevant + when supplier has multiple locations. + join_hint: + table: tabAddress + 'on': supplier_address = tabAddress.name + - name: address_display + fieldtype: Small Text + label: Address + description: Formatted full address text for display purposes, combining all address + components into readable format. + - name: contact_person + fieldtype: Link + label: Contact Person + description: Name of the specific individual at the supplier who is the point + of contact for this purchase invoice. + join_hint: + table: tabContact + 'on': contact_person = tabContact.name + - name: contact_display + fieldtype: Small Text + label: Contact + description: Formatted display name or full contact information for the supplier + contact person on this purchase invoice. + - name: contact_mobile + fieldtype: Small Text + label: Mobile No + description: Mobile phone number of the supplier contact person associated with + this purchase invoice. + - name: contact_email + fieldtype: Small Text + label: Contact Email + description: Email address of the supplier contact person for this purchase invoice. + - name: dispatch_address + fieldtype: Link + label: 'Select Dispatch Address ' + description: Address identifier where purchased goods are to be delivered or received. + join_hint: + table: tabAddress + 'on': dispatch_address = tabAddress.name + - name: dispatch_address_display + fieldtype: Text Editor + label: Dispatch Address + description: Formatted delivery address text for display purposes, differs from + dispatch_address which is the identifier. + - name: shipping_address + fieldtype: Link + label: Select Shipping Address + description: Linked address record where purchased goods are delivered to the + buyer's location + join_hint: + table: tabAddress + 'on': shipping_address = tabAddress.name + - name: shipping_address_display + fieldtype: Small Text + label: Shipping Address + description: Formatted text showing the complete delivery address as it appears + on shipping documents + - name: billing_address + fieldtype: Link + label: Select Billing Address + description: Address where invoice is sent and payment correspondence is directed, + often differs from delivery location + join_hint: + table: tabAddress + 'on': billing_address = tabAddress.name + - name: billing_address_display + fieldtype: Small Text + label: Billing Address + description: Full formatted billing address for the purchase invoice, used when + searching by supplier billing location or address details. + - name: payment_terms_template + fieldtype: Link + label: Payment Terms Template + description: Template defining payment due dates and conditions for this purchase + invoice, referenced when querying payment schedules or terms agreements. + join_hint: + table: tabPayment Terms Template + 'on': payment_terms_template = tabPayment Terms Template.name + - name: ignore_default_payment_terms_template + fieldtype: Check + label: Ignore Default Payment Terms Template + description: Indicates whether the supplier's default payment terms were overridden + for this specific purchase invoice. + - name: payment_schedule + fieldtype: Table + label: Payment Schedule + description: '' + child_hint: + child_table: tabPayment Schedule + fieldname: payment_schedule + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: payment_schedule + - name: tc_name + fieldtype: Link + label: Terms + description: Terms and conditions template name applied to the purchase invoice + join_hint: + table: tabTerms and Conditions + 'on': tc_name = tabTerms and Conditions.name + - name: terms + fieldtype: Text Editor + label: Terms and Conditions + description: Payment terms defining due date calculation such as net 30 or due + on receipt + - name: status + fieldtype: Select + label: Status + description: Current state of the purchase invoice such as draft, submitted, paid, + or cancelled. + options: + - Draft + - Return + - Debit Note Issued + - Submitted + - Paid + - Partly Paid + - Unpaid + - Overdue + - Cancelled + - Internal Transfer + - name: per_received + fieldtype: Percent + label: Per Received + description: Percentage of items or quantity that has been physically received + against this purchase invoice. + - name: credit_to + fieldtype: Link + label: Credit To + description: General ledger account that will be credited when this purchase invoice + is posted, typically accounts payable or a liability account. + join_hint: + table: tabAccount + 'on': credit_to = tabAccount.name + - name: party_account_currency + fieldtype: Link + label: Party Account Currency + description: Currency in which the supplier's account balance is maintained, relevant + when asking about foreign currency purchases or supplier payment currencies. + join_hint: + table: tabCurrency + 'on': party_account_currency = tabCurrency.name + - name: is_opening + fieldtype: Select + label: Is Opening Entry + description: Indicates whether this purchase invoice is an opening balance entry + from a previous accounting period or system migration. + options: + - 'No' + - 'Yes' + - name: against_expense_account + fieldtype: Small Text + label: Against Expense Account + description: Expense account(s) debited by this purchase invoice, used when analyzing + spending by expense category or cost center allocation. + - name: unrealized_profit_loss_account + fieldtype: Link + label: Unrealized Profit / Loss Account + description: Account used to record unrealized gains or losses on this purchase + invoice, typically for foreign currency or valuation adjustments. + join_hint: + table: tabAccount + 'on': unrealized_profit_loss_account = tabAccount.name + - name: subscription + fieldtype: Link + label: Subscription + description: Links this purchase invoice to a recurring subscription plan if the + invoice is part of a subscription billing arrangement. + join_hint: + table: tabSubscription + 'on': subscription = tabSubscription.name + - name: auto_repeat + fieldtype: Link + label: Auto Repeat + description: Links this purchase invoice to an automatic repetition schedule for + recurring purchases at defined intervals. + join_hint: + table: tabAuto Repeat + 'on': auto_repeat = tabAuto Repeat.name + - name: from_date + fieldtype: Date + label: From Date + description: Start date of the billing period or service period covered by this + purchase invoice. + - name: to_date + fieldtype: Date + label: To Date + description: End date of the billing period or service period covered by this + purchase invoice. + - name: letter_head + fieldtype: Link + label: Letter Head + description: Letterhead template or branding header used when printing or displaying + this purchase invoice. + join_hint: + table: tabLetter Head + 'on': letter_head = tabLetter Head.name + - name: group_same_items + fieldtype: Check + label: Group same items + description: Whether identical line items are consolidated together on the purchase + invoice display or print output. + - name: select_print_heading + fieldtype: Link + label: Print Heading + description: Custom heading or title that appears when printing this purchase + invoice instead of the default label. + join_hint: + table: tabPrint Heading + 'on': select_print_heading = tabPrint Heading.name + - name: language + fieldtype: Data + label: Print Language + description: Language in which this purchase invoice is displayed or printed for + vendor communication. + - name: on_hold + fieldtype: Check + label: Hold Invoice + description: Whether the purchase invoice is currently on hold and blocked from + payment or processing. + - name: release_date + fieldtype: Date + label: Release Date + description: The date when a held purchase invoice was released or is scheduled + to be released for payment. + - name: hold_comment + fieldtype: Small Text + label: Reason For Putting On Hold + description: The reason or explanation for why the purchase invoice was placed + on hold. + - name: is_internal_supplier + fieldtype: Check + label: Is Internal Supplier + description: Whether the supplier is an internal company entity for inter-company + transactions. + - name: represents_company + fieldtype: Link + label: Represents Company + description: The company entity that the supplier represents in inter-company + or group transactions. + join_hint: + table: tabCompany + 'on': represents_company = tabCompany.name + - name: supplier_group + fieldtype: Link + label: Supplier Group + description: The classification or category grouping for the supplier used for + segmentation and reporting. + join_hint: + table: tabSupplier Group + 'on': supplier_group = tabSupplier Group.name + - name: inter_company_invoice_reference + fieldtype: Link + label: Inter Company Invoice Reference + description: Links to the corresponding invoice in inter-company transactions + when one company entity purchases from another within the same organization. + join_hint: + table: tabSales Invoice + 'on': inter_company_invoice_reference = tabSales Invoice.name + - name: is_old_subcontracting_flow + fieldtype: Check + label: Is Old Subcontracting Flow + description: Indicates whether this purchase invoice follows the legacy subcontracting + process rather than the current subcontracting workflow. + - name: remarks + fieldtype: Small Text + label: Remarks + description: Additional notes or comments about the purchase invoice for internal + reference or special instructions. + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Purchase Invoice document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabPurchase Invoice Advance + description: '' + fields: + - name: reference_type + fieldtype: Link + label: Reference Type + description: Type of document this advance is linked to, such as Purchase Order + or Payment Entry + join_hint: + table: tabDocType + 'on': reference_type = tabDocType.name + - name: reference_name + fieldtype: Dynamic Link + label: Reference Name + description: Specific document ID or number that this advance payment references + - name: remarks + fieldtype: Text + label: Remarks + description: Comments or notes explaining the reason for or details about the + advance payment allocation. + - name: reference_row + fieldtype: Data + label: Reference Row + description: Links to the specific row in the referenced advance document being + allocated against this purchase invoice. + - name: advance_amount + fieldtype: Currency + label: Advance Amount + description: The monetary value of advance payment being applied or allocated + to this purchase invoice. + - name: allocated_amount + fieldtype: Currency + label: Allocated Amount + description: Amount of advance payment that has been applied or allocated against + a purchase invoice. + - name: exchange_gain_loss + fieldtype: Currency + label: Exchange Gain/Loss + description: Gain or loss resulting from currency exchange rate differences between + advance payment and invoice settlement. + - name: ref_exchange_rate + fieldtype: Float + label: Reference Exchange Rate + description: Exchange rate used to convert the advance payment amount to the reference + or base currency. + - name: difference_posting_date + fieldtype: Date + label: Difference Posting Date + description: Date when exchange rate differences or payment variances from the + advance are posted to accounting ledgers. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabPurchase Invoice + Advance). Comparison-ready across parent records.' +- table: tabPurchase Invoice Item + description: '' + fields: + - name: item_code + fieldtype: Link + label: Item + description: Code of the product or service being purchased on this invoice line + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: product_bundle + fieldtype: Link + label: Product Bundle + description: Indicates if this line item represents a bundled set of products + sold together as a package + join_hint: + table: tabProduct Bundle + 'on': product_bundle = tabProduct Bundle.name + - name: item_name + fieldtype: Data + label: Item Name + description: The product or service being purchased, used when identifying what + was bought on the invoice. + - name: description + fieldtype: Text Editor + label: Description + description: Additional details or specifications about the purchased item beyond + its name, used when users need extended product information or technical specifications. + - name: brand + fieldtype: Link + label: Brand + description: The manufacturer or brand name of the purchased item, used when filtering + or searching purchases by specific brands or suppliers. + join_hint: + table: tabBrand + 'on': brand = tabBrand.name + - name: item_group + fieldtype: Link + label: Item Group + description: Category or classification of the purchased item for grouping similar + products together in analysis and reporting. + join_hint: + table: tabItem Group + 'on': item_group = tabItem Group.name + - name: received_qty + fieldtype: Float + label: Received Qty + description: Actual quantity of items physically received against this purchase + invoice line, used to track delivery fulfillment and discrepancies. + - name: qty + fieldtype: Float + label: Accepted Qty + description: Quantity of items invoiced by the supplier for this line item. + - name: rejected_qty + fieldtype: Float + label: Rejected Qty + description: Quantity of items rejected or returned from the invoiced amount due + to quality issues or discrepancies. + - name: uom + fieldtype: Link + label: UOM + description: Unit of measurement for the invoiced quantity such as pieces, kilograms, + or liters. + join_hint: + table: tabUOM + 'on': uom = tabUOM.name + - name: conversion_factor + fieldtype: Float + label: UOM Conversion Factor + description: Multiplier used when user asks about converting between purchase + unit and stock unit quantities. + - name: stock_uom + fieldtype: Link + label: Stock UOM + description: Base inventory unit of measure for the item, relevant when user asks + about stock or inventory units rather than purchase units. + join_hint: + table: tabUOM + 'on': stock_uom = tabUOM.name + - name: stock_qty + fieldtype: Float + label: Accepted Qty in Stock UOM + description: Quantity in base inventory units after conversion, relevant when + user asks about inventory impact or stock-level quantities from purchases. + - name: price_list_rate + fieldtype: Currency + label: Price List Rate + description: Item price from the price list in transaction currency before any + discounts or margin adjustments are applied. + - name: base_price_list_rate + fieldtype: Currency + label: Price List Rate (Company Currency) + description: Item price from the price list converted to company base currency + for multi-currency purchase invoice reporting. + - name: margin_type + fieldtype: Select + label: Margin Type + description: Defines whether margin is calculated as a percentage or fixed amount + when marking up or down from the price list rate. + options: + - Percentage + - Amount + - name: margin_rate_or_amount + fieldtype: Float + label: Margin Rate or Amount + description: Margin added to the base purchase rate, either as a percentage or + absolute amount, used when calculating marked-up item costs. + - name: rate_with_margin + fieldtype: Currency + label: Rate With Margin + description: Final purchase rate after applying margin to the base rate, representing + the actual cost per unit including markup. + - name: discount_percentage + fieldtype: Percent + label: Discount on Price List Rate (%) + description: Percentage discount applied to the purchase invoice item, reducing + the total cost from the supplier. + - name: discount_amount + fieldtype: Currency + label: Discount Amount + description: Discount applied directly to this invoice line item, used when calculating + item-level price reductions or promotional discounts. + - name: distributed_discount_amount + fieldtype: Currency + label: Distributed Discount Amount + description: Portion of invoice-level or header discount allocated to this line + item, used when header discounts are apportioned across items. + - name: base_rate_with_margin + fieldtype: Currency + label: Rate With Margin (Company Currency) + description: Item rate including markup or margin added to the base cost, used + when analyzing pricing that includes profit margin before other adjustments. + - name: rate + fieldtype: Currency + label: Rate + description: Unit price per item on the purchase invoice line before taxes and + discounts. + - name: amount + fieldtype: Currency + label: Amount + description: Total line amount for this purchase invoice item after applying quantity, + rate, and discounts but before taxes. + - name: item_tax_template + fieldtype: Link + label: Item Tax Template + description: Tax configuration template applied to this purchase invoice item + to determine applicable tax rates and accounts. + join_hint: + table: tabItem Tax Template + 'on': item_tax_template = tabItem Tax Template.name + - name: base_rate + fieldtype: Currency + label: Rate (Company Currency) + description: Unit price of the purchased item in company's base currency before + any currency conversion. + - name: base_amount + fieldtype: Currency + label: Amount (Company Currency) + description: Total line amount in company's base currency after currency conversion + from transaction currency. + - name: pricing_rules + fieldtype: Small Text + label: Pricing Rules + description: Applied pricing rule or discount scheme that determined the final + rate for this purchase item. + - name: stock_uom_rate + fieldtype: Currency + label: Rate of Stock UOM + description: Rate per stock unit of measure when user needs pricing in base inventory + units rather than purchase units. + - name: is_free_item + fieldtype: Check + label: Is Free Item + description: Indicates item was received at no charge as promotional or complimentary + goods. + - name: apply_tds + fieldtype: Check + label: Apply TDS + description: Whether tax deducted at source should be calculated on this line + item for withholding tax compliance. + - name: net_rate + fieldtype: Currency + label: Net Rate + description: Rate per unit after applying discounts but before taxes, used when + asking about discounted unit pricing on purchase invoice items. + - name: net_amount + fieldtype: Currency + label: Net Amount + description: Total amount for the line item after discounts but before taxes, + used when calculating or querying pre-tax totals. + - name: base_net_rate + fieldtype: Currency + label: Net Rate (Company Currency) + description: Rate per unit after discounts in the company's base currency, used + when querying purchase costs in standardized currency across multi-currency + transactions. + - name: base_net_amount + fieldtype: Currency + label: Net Amount (Company Currency) + description: Net amount of the purchase invoice line item in the company's base + currency, used when analyzing purchase costs in standardized currency. + - name: valuation_rate + fieldtype: Currency + label: Valuation Rate + description: Rate used to value inventory for this purchased item, relevant when + calculating stock value or cost of goods sold. + - name: sales_incoming_rate + fieldtype: Currency + label: Sales Incoming Rate + description: Incoming exchange rate for sales-related currency conversion on this + purchase item, used when purchase involves foreign currency transactions. + - name: item_tax_amount + fieldtype: Currency + label: Item Tax Amount Included in Value + description: Tax amount charged on this specific line item of the purchase invoice. + - name: landed_cost_voucher_amount + fieldtype: Currency + label: Landed Cost Voucher Amount + description: Additional costs allocated to this item from landed cost vouchers + such as freight, customs, or insurance. + - name: rm_supp_cost + fieldtype: Currency + label: Raw Materials Supplied Cost + description: Raw material supplementary cost for this purchased item beyond the + base price. + - name: warehouse + fieldtype: Link + label: Accepted Warehouse + description: Warehouse location where purchased items are received or stored for + this invoice line item. + join_hint: + table: tabWarehouse + 'on': warehouse = tabWarehouse.name + - name: serial_and_batch_bundle + fieldtype: Link + label: Serial and Batch Bundle + description: Reference to bundled serial numbers and batch numbers assigned to + this purchased item. + join_hint: + table: tabSerial and Batch Bundle + 'on': serial_and_batch_bundle = tabSerial and Batch Bundle.name + - name: use_serial_batch_fields + fieldtype: Check + label: Use Serial No / Batch Fields + description: Indicates whether this invoice item tracks inventory using serial + numbers or batch numbers. + - name: from_warehouse + fieldtype: Link + label: From Warehouse + description: Warehouse location from which purchased items are received or stocked + upon invoice processing. + join_hint: + table: tabWarehouse + 'on': from_warehouse = tabWarehouse.name + - name: quality_inspection + fieldtype: Link + label: Quality Inspection + description: Reference to the quality inspection record performed on purchased + items before acceptance. + join_hint: + table: tabQuality Inspection + 'on': quality_inspection = tabQuality Inspection.name + - name: rejected_warehouse + fieldtype: Link + label: Rejected Warehouse + description: Warehouse location where items failing quality inspection or rejected + goods are stored. + join_hint: + table: tabWarehouse + 'on': rejected_warehouse = tabWarehouse.name + - name: rejected_serial_and_batch_bundle + fieldtype: Link + label: Rejected Serial and Batch Bundle + description: References the bundle containing serial numbers and batch numbers + for items rejected during purchase invoice receipt. + join_hint: + table: tabSerial and Batch Bundle + 'on': rejected_serial_and_batch_bundle = tabSerial and Batch Bundle.name + - name: serial_no + fieldtype: Text + label: Serial No + description: Serial number assigned to the purchased item being invoiced for tracking + individual units. + - name: rejected_serial_no + fieldtype: Text + label: Rejected Serial No + description: Serial number of the specific item unit that was rejected during + purchase invoice receipt or quality inspection. + - name: batch_no + fieldtype: Link + label: Batch No + description: Batch or lot number assigned to the purchased items for tracking + and quality control purposes. + join_hint: + table: tabBatch + 'on': batch_no = tabBatch.name + - name: manufacturer + fieldtype: Link + label: Manufacturer + description: Company that manufactured the purchased item, distinct from the supplier + or vendor. + join_hint: + table: tabManufacturer + 'on': manufacturer = tabManufacturer.name + - name: manufacturer_part_no + fieldtype: Data + label: Manufacturer Part Number + description: Manufacturer's unique part number or SKU for the purchased item, + different from internal item codes or supplier part numbers. + - name: expense_account + fieldtype: Link + label: Expense Head + description: General ledger account where the cost of this purchased item is recorded + as an expense. + join_hint: + table: tabAccount + 'on': expense_account = tabAccount.name + - name: wip_composite_asset + fieldtype: Link + label: WIP Composite Asset + description: Links this purchase to a work-in-progress composite asset being constructed + or assembled. + join_hint: + table: tabAsset + 'on': wip_composite_asset = tabAsset.name + - name: is_fixed_asset + fieldtype: Check + label: Is Fixed Asset + description: Indicates whether this purchased item is a fixed asset (equipment, + property, vehicles) rather than inventory or expense. + - name: asset_location + fieldtype: Link + label: Asset Location + description: Physical location or site where the purchased asset will be placed + or used + join_hint: + table: tabLocation + 'on': asset_location = tabLocation.name + - name: asset_category + fieldtype: Link + label: Asset Category + description: Classification of the purchased item as a fixed asset type for depreciation + and accounting purposes + join_hint: + table: tabAsset Category + 'on': asset_category = tabAsset Category.name + - name: deferred_expense_account + fieldtype: Link + label: Deferred Expense Account + description: General ledger account for expenses that will be recognized over + time rather than immediately upon purchase + join_hint: + table: tabAccount + 'on': deferred_expense_account = tabAccount.name + - name: service_stop_date + fieldtype: Date + label: Service Stop Date + description: End date of the service period for this purchased item, used when + querying service duration or subscription end dates. + - name: enable_deferred_expense + fieldtype: Check + label: Enable Deferred Expense + description: Indicates whether this purchase invoice item uses deferred expense + accounting to spread costs over multiple periods. + - name: service_start_date + fieldtype: Date + label: Service Start Date + description: Start date of the service period for this purchased item, used when + querying service duration or subscription start dates. + - name: service_end_date + fieldtype: Date + label: Service End Date + description: End date of the service period for service items on the purchase + invoice, used when querying service duration or subscription end dates. + - name: allow_zero_valuation_rate + fieldtype: Check + label: Allow Zero Valuation Rate + description: Indicates whether this invoice item permits a zero valuation rate, + relevant when users ask about items purchased without standard costing or valuation. + - name: item_tax_rate + fieldtype: Code + label: Item Tax Rate + description: Tax rate percentage or tax configuration applied specifically to + this invoice line item, used when analyzing item-level tax amounts or rates + that differ from invoice defaults. + - name: bom + fieldtype: Link + label: BOM + description: Bill of Materials reference for the purchased item, used when tracking + manufactured or assembled items received through purchase invoices. + join_hint: + table: tabBOM + 'on': bom = tabBOM.name + - name: include_exploded_items + fieldtype: Check + label: Include Exploded Items + description: Indicates whether sub-components from the BOM are individually listed + in the invoice rather than showing only the parent item. + - name: purchase_invoice_item + fieldtype: Data + label: Purchase Invoice Item + description: Unique identifier for this specific line item on the purchase invoice. + - name: purchase_order + fieldtype: Link + label: Purchase Order + description: Reference to the original purchase order that authorized this invoice + item purchase. + join_hint: + table: tabPurchase Order + 'on': purchase_order = tabPurchase Order.name + - name: po_detail + fieldtype: Data + label: Purchase Order Item + description: Specific line item from the purchase order that this invoice item + corresponds to. + - name: purchase_receipt + fieldtype: Link + label: Purchase Receipt + description: Reference to the goods receipt document confirming physical delivery + of this invoiced item. + join_hint: + table: tabPurchase Receipt + 'on': purchase_receipt = tabPurchase Receipt.name + - name: pr_detail + fieldtype: Data + label: Purchase Receipt Detail + description: Links to the specific purchase receipt item that this invoice item + is billing against, used when matching invoices to received goods. + - name: sales_invoice_item + fieldtype: Data + label: Sales Invoice Item + description: References the original sales invoice item in inter-company transactions + or drop-ship scenarios where a purchase directly fulfills a sale. + - name: material_request + fieldtype: Link + label: Material Request + description: Links to the material request that initiated this purchase, used + when tracking procurement from requisition through invoicing. + join_hint: + table: tabMaterial Request + 'on': material_request = tabMaterial Request.name + - name: material_request_item + fieldtype: Data + label: Material Request Item + description: Links to the specific material request line item that triggered this + purchase, used when tracing purchases back to internal requisitions. + - name: weight_per_unit + fieldtype: Float + label: Weight Per Unit + description: Weight of a single unit of the purchased item, used for calculating + shipping costs or total weight per individual item. + - name: total_weight + fieldtype: Float + label: Total Weight + description: Combined weight of all units on this invoice line, used for freight + calculations and logistics planning. + - name: weight_uom + fieldtype: Link + label: Weight UOM + description: Unit of measurement for the weight of the purchased item (e.g., kg, + lbs, tons). + join_hint: + table: tabUOM + 'on': weight_uom = tabUOM.name + - name: project + fieldtype: Link + label: Project + description: Project to which this purchase invoice item is allocated for tracking + project-specific procurement costs. + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: cost_center + fieldtype: Link + label: Cost Center + description: Cost center to which this purchase invoice item's expense is assigned + for departmental or functional cost allocation. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + - name: page_break + fieldtype: Check + label: Page Break + description: Indicates whether a page break should occur before this invoice item + when printing or generating PDF documents. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabPurchase Invoice + Item). Comparison-ready across parent records.' +- table: tabPurchase Order + description: '' + fields: + - name: title + fieldtype: Data + label: Title + description: Descriptive label or subject line for the purchase order, used when + searching by what the order is about or its purpose + - name: naming_series + fieldtype: Select + label: Series + description: Prefix pattern or series code that determines how purchase order + numbers are auto-generated, used when filtering or grouping POs by their numbering + scheme + options: + - PUR-ORD-.YYYY.- + - name: supplier + fieldtype: Link + label: Supplier + description: Unique identifier code for the vendor fulfilling the purchase order, + used when filtering or joining supplier records. + join_hint: + table: tabSupplier + 'on': supplier = tabSupplier.name + - name: supplier_name + fieldtype: Data + label: Supplier Name + description: Human-readable name of the vendor, used when users ask about purchases + from a specific company by name. + - name: order_confirmation_no + fieldtype: Data + label: Order Confirmation No + description: Confirmation number provided by the supplier acknowledging receipt + of the purchase order, used to track supplier acceptance and reference external + supplier systems. + - name: order_confirmation_date + fieldtype: Date + label: Order Confirmation Date + description: Date when the supplier confirmed acceptance of the purchase order. + - name: transaction_date + fieldtype: Date + label: Date + description: Date when the purchase order transaction was recorded in the system. + - name: schedule_date + fieldtype: Date + label: Required By + description: Date when goods or services are scheduled to be delivered or received. + - name: company + fieldtype: Link + label: Company + description: The legal entity or business unit that owns this purchase order. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: apply_tds + fieldtype: Check + label: Apply Tax Withholding Amount + description: Whether tax deducted at source is applied to this purchase order. + - name: tax_withholding_category + fieldtype: Link + label: Tax Withholding Category + description: The specific type or classification of tax withholding applied to + this purchase order. + join_hint: + table: tabTax Withholding Category + 'on': tax_withholding_category = tabTax Withholding Category.name + - name: is_subcontracted + fieldtype: Check + label: Is Subcontracted + description: Indicates whether this purchase order involves subcontracting work + to an external vendor who will perform manufacturing or processing operations. + - name: has_unit_price_items + fieldtype: Check + label: Has Unit Price Items + description: Indicates whether this purchase order contains line items priced + per unit rather than as lump sum or other pricing methods. + - name: supplier_warehouse + fieldtype: Link + label: Supplier Warehouse + description: The warehouse location owned or managed by the supplier from which + goods on this purchase order will be shipped or sourced. + join_hint: + table: tabWarehouse + 'on': supplier_warehouse = tabWarehouse.name + - name: amended_from + fieldtype: Link + label: Amended From + description: Links to the original purchase order that was cancelled and replaced + by this amended version. + join_hint: + table: tabPurchase Order + 'on': amended_from = tabPurchase Order.name + - name: cost_center + fieldtype: Link + label: Cost Center + description: Accounting department or division to which purchase order expenses + are allocated for budgeting and financial tracking. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + - name: project + fieldtype: Link + label: Project + description: Specific project or job to which this purchase order is assigned + for tracking project-related procurement costs. + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: currency + fieldtype: Link + label: Currency + description: Currency in which the purchase order total and line item prices are + denominated. + join_hint: + table: tabCurrency + 'on': currency = tabCurrency.name + - name: conversion_rate + fieldtype: Float + label: Exchange Rate + description: Exchange rate used to convert purchase order amounts from the transaction + currency to the company's base currency. + - name: buying_price_list + fieldtype: Link + label: Price List + description: Price list applied to determine default item prices and discounts + for this purchase order. + join_hint: + table: tabPrice List + 'on': buying_price_list = tabPrice List.name + - name: price_list_currency + fieldtype: Link + label: Price List Currency + description: Currency in which the price list is denominated for this purchase + order. + join_hint: + table: tabCurrency + 'on': price_list_currency = tabCurrency.name + - name: plc_conversion_rate + fieldtype: Float + label: Price List Exchange Rate + description: Exchange rate used to convert price list currency to the purchase + order's transaction currency. + - name: ignore_pricing_rule + fieldtype: Check + label: Ignore Pricing Rule + description: Indicates whether automatic pricing rules are bypassed for this purchase + order. + - name: scan_barcode + fieldtype: Data + label: Scan Barcode + description: Barcode scanned during purchase order receiving or warehouse operations + to identify items. + - name: last_scanned_warehouse + fieldtype: Data + label: Last Scanned Warehouse + description: Warehouse location where the most recent barcode scan occurred for + this purchase order. + - name: set_from_warehouse + fieldtype: Link + label: Set From Warehouse + description: Source warehouse designated for fulfilling or transferring items + in this purchase order. + join_hint: + table: tabWarehouse + 'on': set_from_warehouse = tabWarehouse.name + - name: set_warehouse + fieldtype: Link + label: Set Target Warehouse + description: The warehouse location where all items in this purchase order will + be received and stored upon delivery. + join_hint: + table: tabWarehouse + 'on': set_warehouse = tabWarehouse.name + - name: items + fieldtype: Table + label: Items + description: '' + child_hint: + child_table: tabPurchase Order Item + fieldname: items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: items + - name: total_qty + fieldtype: Float + label: Total Quantity + description: The sum of quantities across all line items in the purchase order, + used when asking about total units being ordered. + - name: total_net_weight + fieldtype: Float + label: Total Net Weight + description: Total weight of all items in the purchase order excluding packaging, + used when calculating shipping costs or logistics capacity. + - name: base_total + fieldtype: Currency + label: Total (Company Currency) + description: Total purchase order amount in company's base currency before any + taxes or discounts are applied. + - name: base_net_total + fieldtype: Currency + label: Net Total (Company Currency) + description: Total purchase order amount in company's base currency after discounts + but before taxes. + - name: total + fieldtype: Currency + label: Total + description: Grand total amount of the purchase order including all taxes, charges, + and discounts. + - name: net_total + fieldtype: Currency + label: Net Total + description: Subtotal amount before taxes and additional charges are applied. + - name: tax_withholding_net_total + fieldtype: Currency + label: Tax Withholding Net Total + description: Net amount after deducting withholding tax that must be withheld + at source for tax compliance. + - name: base_tax_withholding_net_total + fieldtype: Currency + label: Base Tax Withholding Net Total + description: Net total amount after tax withholding deductions in base currency, + used when calculating final payment obligations to suppliers. + - name: pricing_rules + fieldtype: Table + label: Purchase Order Pricing Rule + description: '' + child_hint: + child_table: tabPricing Rule Detail + fieldname: pricing_rules + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: pricing_rules + - name: set_reserve_warehouse + fieldtype: Link + label: Set Reserve Warehouse + description: Designated warehouse location where purchased items will be reserved + or held upon receipt. + join_hint: + table: tabWarehouse + 'on': set_reserve_warehouse = tabWarehouse.name + - name: supplied_items + fieldtype: Table + label: Supplied Items + description: '' + child_hint: + child_table: tabPurchase Order Item Supplied + fieldname: supplied_items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: supplied_items + - name: tax_category + fieldtype: Link + label: Tax Category + description: Classification determining which tax rules apply to this purchase + order based on supplier location, item type, or regulatory requirements. + join_hint: + table: tabTax Category + 'on': tax_category = tabTax Category.name + - name: taxes_and_charges + fieldtype: Link + label: Purchase Taxes and Charges Template + description: Template or configuration defining the specific tax rates, additional + charges, and calculation methods applied to this purchase order. + join_hint: + table: tabPurchase Taxes and Charges Template + 'on': taxes_and_charges = tabPurchase Taxes and Charges Template.name + - name: shipping_rule + fieldtype: Link + label: Shipping Rule + description: Defines the shipping method or carrier service selected for delivering + the purchased goods. + join_hint: + table: tabShipping Rule + 'on': shipping_rule = tabShipping Rule.name + - name: incoterm + fieldtype: Link + label: Incoterm + description: International commercial term specifying which party bears shipping + costs, risks, and responsibilities during transport. + join_hint: + table: tabIncoterm + 'on': incoterm = tabIncoterm.name + - name: named_place + fieldtype: Data + label: Named Place + description: Specific geographic location referenced in the incoterm where risk + and cost transfer occurs between buyer and seller. + - name: taxes + fieldtype: Table + label: Purchase Taxes and Charges + description: '' + child_hint: + child_table: tabPurchase Taxes and Charges + fieldname: taxes + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: taxes + - name: base_taxes_and_charges_added + fieldtype: Currency + label: Taxes and Charges Added (Company Currency) + description: Total additional taxes and charges in base currency, such as freight, + handling fees, or VAT added to the purchase order. + - name: base_taxes_and_charges_deducted + fieldtype: Currency + label: Taxes and Charges Deducted (Company Currency) + description: Total taxes and charges subtracted in base currency, such as discounts, + rebates, or tax exemptions applied to the purchase order. + - name: base_total_taxes_and_charges + fieldtype: Currency + label: Total Taxes and Charges (Company Currency) + description: Net total of all taxes and charges applied to the purchase order + in base currency, used when asking for total tax amounts or tax impact on order + value. + - name: taxes_and_charges_added + fieldtype: Currency + label: Taxes and Charges Added + description: Sum of only the tax and charge amounts that increase the purchase + order total, used when asking specifically about additional costs or markup + taxes. + - name: taxes_and_charges_deducted + fieldtype: Currency + label: Taxes and Charges Deducted + description: Sum of only the tax and charge amounts that decrease the purchase + order total, used when asking about discounts, rebates, or deductions applied + through the tax system. + - name: total_taxes_and_charges + fieldtype: Currency + label: Total Taxes and Charges + description: Sum of all tax and charge amounts applied to the purchase order, + used when analyzing tax costs or total charges separate from item costs. + - name: base_grand_total + fieldtype: Currency + label: Grand Total (Company Currency) + description: Final total amount of the purchase order in base currency including + all items, taxes, charges, and adjustments. + - name: base_rounding_adjustment + fieldtype: Currency + label: Rounding Adjustment (Company Currency) + description: Amount added or subtracted in base currency to round the final purchase + order total to a standard precision. + - name: base_in_words + fieldtype: Data + label: In Words (Company Currency) + description: Total purchase order amount written in words in base currency for + check printing and formal documentation + - name: base_rounded_total + fieldtype: Currency + label: Rounded Total (Company Currency) + description: Purchase order total in base currency after applying rounding adjustments, + used when rounding rules differ from grand_total + - name: grand_total + fieldtype: Currency + label: Grand Total + description: Final total purchase order amount in transaction currency including + all taxes, charges, and discounts + - name: rounding_adjustment + fieldtype: Currency + label: Rounding Adjustment + description: Amount added or subtracted to round the purchase order total to a + whole number or specified precision. + - name: rounded_total + fieldtype: Currency + label: Rounded Total + description: Final purchase order total after applying rounding adjustment. + - name: disable_rounded_total + fieldtype: Check + label: Disable Rounded Total + description: Indicates whether automatic rounding of the purchase order total + is turned off. + - name: in_words + fieldtype: Data + label: In Words + description: Total purchase order amount expressed as text words for check writing + or formal documentation + - name: advance_paid + fieldtype: Currency + label: Advance Paid + description: Amount paid upfront to supplier before goods are received or invoice + is finalized + - name: apply_discount_on + fieldtype: Select + label: Apply Additional Discount On + description: Specifies whether discounts calculate from grand total or net total + before taxes and charges + options: + - Grand Total + - Net Total + - name: base_discount_amount + fieldtype: Currency + label: Additional Discount Amount (Company Currency) + description: Initial discount amount applied to the purchase order before any + additional discounts. + - name: additional_discount_percentage + fieldtype: Float + label: Additional Discount Percentage + description: Extra discount percentage applied on top of the base discount to + calculate final discount. + - name: discount_amount + fieldtype: Currency + label: Additional Discount Amount + description: Total final discount amount on the purchase order after applying + all discounts. + - name: other_charges_calculation + fieldtype: Text Editor + label: Taxes and Charges Calculation + description: Additional fees or costs beyond item prices such as freight, handling, + or miscellaneous charges applied to the purchase order. + - name: supplier_address + fieldtype: Link + label: Supplier Address + description: The specific address identifier or name of the supplier's location + for this purchase order. + join_hint: + table: tabAddress + 'on': supplier_address = tabAddress.name + - name: address_display + fieldtype: Small Text + label: Supplier Address Details + description: The formatted, human-readable full address text showing complete + supplier address details for display purposes. + - name: contact_person + fieldtype: Link + label: Supplier Contact + description: Name of the individual at the supplier who is the primary point of + contact for this purchase order. + join_hint: + table: tabContact + 'on': contact_person = tabContact.name + - name: contact_display + fieldtype: Small Text + label: Contact Name + description: Formatted display name combining contact person details for showing + in lists and reports. + - name: contact_mobile + fieldtype: Small Text + label: Contact Mobile No + description: Mobile phone number of the supplier contact person for urgent purchase + order communications. + - name: contact_email + fieldtype: Small Text + label: Contact Email + description: Email address of the supplier contact person for this purchase order. + - name: dispatch_address + fieldtype: Link + label: Dispatch Address + description: Address identifier where ordered goods should be delivered or dispatched + to. + join_hint: + table: tabAddress + 'on': dispatch_address = tabAddress.name + - name: dispatch_address_display + fieldtype: Text Editor + label: Dispatch Address Details + description: Formatted delivery address text showing where ordered goods should + be shipped. + - name: shipping_address + fieldtype: Link + label: Shipping Address + description: Physical location where purchased goods will be delivered to the + buyer + join_hint: + table: tabAddress + 'on': shipping_address = tabAddress.name + - name: shipping_address_display + fieldtype: Small Text + label: Shipping Address Details + description: Formatted shipping address text for display purposes, typically used + when showing the delivery destination in reports or documents + - name: billing_address + fieldtype: Link + label: Company Billing Address + description: Address where invoices are sent and payment is processed, may differ + from the delivery location + join_hint: + table: tabAddress + 'on': billing_address = tabAddress.name + - name: billing_address_display + fieldtype: Small Text + label: Billing Address Details + description: Formatted billing address for the purchase order used when users + ask where invoices should be sent or what the billing location is. + - name: customer + fieldtype: Link + label: Customer + description: Customer identifier or code referenced when users search by customer + ID or need to link to customer records. + join_hint: + table: tabCustomer + 'on': customer = tabCustomer.name + - name: customer_name + fieldtype: Data + label: Customer Name + description: Customer's display name used when users ask about purchase orders + by company or organization name rather than customer code. + - name: customer_contact_person + fieldtype: Link + label: Customer Contact + description: Name of the customer's contact person for this purchase order, used + when searching for orders by who to communicate with at the customer. + join_hint: + table: tabContact + 'on': customer_contact_person = tabContact.name + - name: customer_contact_display + fieldtype: Small Text + label: Customer Contact + description: Formatted display name of the customer contact combining multiple + name fields, used when users want the full presentable contact name. + - name: customer_contact_mobile + fieldtype: Small Text + label: Customer Mobile No + description: Mobile phone number of the customer's contact person, used when searching + for orders by contact phone or needing to reach the customer contact. + - name: customer_contact_email + fieldtype: Code + label: Customer Contact Email + description: Email address of the customer contact person for this purchase order, + used when searching for orders by customer communication details. + - name: payment_terms_template + fieldtype: Link + label: Payment Terms Template + description: Named template defining standard payment conditions (e.g., Net 30, + 2/10 Net 30), used when filtering orders by payment term type rather than specific + schedules. + join_hint: + table: tabPayment Terms Template + 'on': payment_terms_template = tabPayment Terms Template.name + - name: payment_schedule + fieldtype: Table + label: Payment Schedule + description: '' + child_hint: + child_table: tabPayment Schedule + fieldname: payment_schedule + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: payment_schedule + - name: tc_name + fieldtype: Link + label: Terms + description: Terms and conditions template name applied to the purchase order + for legal and contractual requirements. + join_hint: + table: tabTerms and Conditions + 'on': tc_name = tabTerms and Conditions.name + - name: terms + fieldtype: Text Editor + label: Terms and Conditions + description: Specific payment terms negotiated with the supplier such as net 30, + net 60, or early payment discounts. + - name: status + fieldtype: Select + label: Status + description: Current state of the purchase order in the procurement workflow such + as draft, submitted, approved, or closed. + options: + - Draft + - On Hold + - To Receive and Bill + - To Bill + - To Receive + - Completed + - Cancelled + - Closed + - Delivered + - name: per_billed + fieldtype: Percent + label: '% Billed' + description: Percentage of the purchase order that has been invoiced by the supplier, + used to track billing completion status. + - name: per_received + fieldtype: Percent + label: '% Received' + description: Percentage of the purchase order that has been physically received + into inventory, used to track delivery completion status. + - name: letter_head + fieldtype: Link + label: Letter Head + description: Company letterhead template applied to the printed purchase order + document. + join_hint: + table: tabLetter Head + 'on': letter_head = tabLetter Head.name + - name: group_same_items + fieldtype: Check + label: Group same items + description: Whether identical line items are consolidated together on the purchase + order display or print output. + - name: select_print_heading + fieldtype: Link + label: Print Heading + description: Custom heading or title that appears when printing this purchase + order document. + join_hint: + table: tabPrint Heading + 'on': select_print_heading = tabPrint Heading.name + - name: language + fieldtype: Data + label: Print Language + description: Language in which the purchase order document is generated or displayed + for the supplier. + - name: from_date + fieldtype: Date + label: From Date + description: Start date of the purchase order validity period or delivery schedule + timeframe. + - name: to_date + fieldtype: Date + label: To Date + description: End date of the purchase order validity period or delivery schedule + timeframe. + - name: auto_repeat + fieldtype: Link + label: Auto Repeat + description: Indicates whether this purchase order automatically recurs on a scheduled + basis. + join_hint: + table: tabAuto Repeat + 'on': auto_repeat = tabAuto Repeat.name + - name: is_internal_supplier + fieldtype: Check + label: Is Internal Supplier + description: Indicates whether the purchase order is placed with an internal supplier + or external vendor. + - name: represents_company + fieldtype: Link + label: Represents Company + description: The company entity that this purchase order represents or is issued + on behalf of in multi-company scenarios. + join_hint: + table: tabCompany + 'on': represents_company = tabCompany.name + - name: ref_sq + fieldtype: Link + label: Supplier Quotation + description: Reference to the supplier quotation document that this purchase order + was created from or is linked to. + join_hint: + table: tabSupplier Quotation + 'on': ref_sq = tabSupplier Quotation.name + - name: party_account_currency + fieldtype: Link + label: Party Account Currency + description: Currency used for the supplier's accounting transactions and balances + in this purchase order. + join_hint: + table: tabCurrency + 'on': party_account_currency = tabCurrency.name + - name: inter_company_order_reference + fieldtype: Link + label: Inter Company Order Reference + description: Reference to the linked sales order when this purchase order is part + of an inter-company transaction between related entities. + join_hint: + table: tabSales Order + 'on': inter_company_order_reference = tabSales Order.name + - name: is_old_subcontracting_flow + fieldtype: Check + label: Is Old Subcontracting Flow + description: Indicates whether this purchase order follows the legacy subcontracting + process rather than the current subcontracting workflow. + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Purchase Order document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabPurchase Order Item + description: '' + fields: + - name: fg_item + fieldtype: Link + label: Finished Good + description: Finished goods item code linked to this purchase order line when + the purchased material is intended for a specific finished product + join_hint: + table: tabItem + 'on': fg_item = tabItem.name + - name: fg_item_qty + fieldtype: Float + label: Finished Good Qty + description: Quantity of the finished goods item that will be produced using the + materials from this purchase order line + - name: item_code + fieldtype: Link + label: Item Code + description: Internal SKU or product identifier used when searching for what specific + item was ordered from a supplier. + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: supplier_part_no + fieldtype: Data + label: Supplier Part Number + description: Vendor's own part number or catalog code used when matching supplier + documentation or invoices to purchase orders. + - name: item_name + fieldtype: Data + label: Item Name + description: Human-readable product description used when searching by item type + or category rather than codes. + - name: brand + fieldtype: Link + label: Brand + description: Brand name or manufacturer of the purchased item, used when filtering + or analyzing purchases by specific brands. + join_hint: + table: tabBrand + 'on': brand = tabBrand.name + - name: product_bundle + fieldtype: Link + label: Product Bundle + description: Indicates if the item is part of a bundled product package, used + when identifying grouped or kit-based purchases. + join_hint: + table: tabProduct Bundle + 'on': product_bundle = tabProduct Bundle.name + - name: schedule_date + fieldtype: Date + label: Required By + description: Expected delivery or fulfillment date for the purchase order item, + used when tracking when items should arrive or be received. + - name: expected_delivery_date + fieldtype: Date + label: Expected Delivery Date + description: Date when the purchased item is expected to arrive, used when users + ask about delivery timing or when materials will be available. + - name: item_group + fieldtype: Link + label: Item Group + description: Category or classification of the purchased item, used when users + filter or analyze purchases by product type or grouping. + join_hint: + table: tabItem Group + 'on': item_group = tabItem Group.name + - name: description + fieldtype: Text Editor + label: Description + description: Detailed text describing the specific purchased item, used when users + search for items by characteristics or need to identify what was ordered. + - name: qty + fieldtype: Float + label: Quantity + description: Quantity of items ordered in this purchase order line, used when + asking about order volumes or amounts. + - name: stock_uom + fieldtype: Link + label: Stock UOM + description: Unit of measurement for the ordered quantity such as pieces, kilograms, + or boxes, used to specify how items are counted or measured. + join_hint: + table: tabUOM + 'on': stock_uom = tabUOM.name + - name: subcontracted_quantity + fieldtype: Float + label: Subcontracted Quantity + description: Quantity of items sent to a subcontractor for processing or manufacturing + as part of this purchase order line. + - name: uom + fieldtype: Link + label: UOM + description: Unit of measurement for the item quantity on this purchase order + line, such as pieces, kilograms, or liters. + join_hint: + table: tabUOM + 'on': uom = tabUOM.name + - name: conversion_factor + fieldtype: Float + label: UOM Conversion Factor + description: Multiplier to convert between the purchase order unit of measurement + and the item's base or stock unit of measurement. + - name: stock_qty + fieldtype: Float + label: Qty in Stock UOM + description: Current available stock quantity of the item at time of purchase + order creation, used when checking inventory levels before ordering. + - name: price_list_rate + fieldtype: Currency + label: Price List Rate + description: Standard catalog price for the item from the supplier's price list, + used when comparing quoted prices to list prices. + - name: last_purchase_rate + fieldtype: Currency + label: Last Purchase Rate + description: Actual price paid in the most recent previous purchase of this item, + used when comparing current order pricing to historical costs. + - name: base_price_list_rate + fieldtype: Currency + label: Price List Rate (Company Currency) + description: Original list price per unit from the price list before any discounts, + margins, or pricing rules are applied to the purchase order item. + - name: margin_type + fieldtype: Select + label: Margin Type + description: Indicates whether the margin is calculated as a percentage or a fixed + amount when determining the final rate from the base price. + options: + - Percentage + - Amount + - name: margin_rate_or_amount + fieldtype: Float + label: Margin Rate or Amount + description: The specific margin value applied to the base price, interpreted + as either a percentage or absolute amount based on the margin_type. + - name: rate_with_margin + fieldtype: Currency + label: Rate With Margin + description: Unit price including margin markup applied to the base cost, used + when users ask about marked-up pricing or selling rates on purchase orders. + - name: discount_percentage + fieldtype: Percent + label: Discount on Price List Rate (%) + description: Percentage discount applied to the item, used when users ask about + discount rates or percentage-based price reductions. + - name: discount_amount + fieldtype: Currency + label: Discount Amount + description: Absolute monetary value of the discount applied to the item, used + when users ask about the actual dollar amount saved or deducted. + - name: distributed_discount_amount + fieldtype: Currency + label: Distributed Discount Amount + description: Discount amount allocated to this purchase order line item after + distributing header-level or bulk discounts across items. + - name: base_rate_with_margin + fieldtype: Currency + label: Rate With Margin (Company Currency) + description: Unit price including the supplier's margin or markup before applying + discounts or taxes. + - name: rate + fieldtype: Currency + label: Rate + description: Final unit price for the purchase order item used to calculate the + line total. + - name: amount + fieldtype: Currency + label: Amount + description: Total line amount for the purchase order item after applying quantity, + rate, and discounts but before taxes. + - name: item_tax_template + fieldtype: Link + label: Item Tax Template + description: Tax configuration template applied to this purchase order item to + determine applicable tax rates and rules. + join_hint: + table: tabItem Tax Template + 'on': item_tax_template = tabItem Tax Template.name + - name: base_rate + fieldtype: Currency + label: Rate (Company Currency) + description: Unit price of the item in the company's base currency before any + currency conversion. + - name: base_amount + fieldtype: Currency + label: Amount (Company Currency) + description: Total line item value in company's base currency before taxes, used + when analyzing purchase costs in standardized currency. + - name: pricing_rules + fieldtype: Small Text + label: Pricing Rules + description: Applied promotional or contractual pricing rules that modified the + item's standard price, used when investigating discounts or special pricing. + - name: stock_uom_rate + fieldtype: Currency + label: Rate of Stock UOM + description: Price per stock unit of measure, used when the purchase unit differs + from inventory unit and per-stock-unit cost analysis is needed. + - name: is_free_item + fieldtype: Check + label: Is Free Item + description: Indicates whether this purchase order line item is a promotional + or bonus item with no charge. + - name: apply_tds + fieldtype: Check + label: Apply TDS + description: Indicates whether tax deducted at source should be calculated and + withheld on this purchase order item. + - name: net_rate + fieldtype: Currency + label: Net Rate + description: Final unit price after applying all discounts, taxes, and adjustments + for this purchase order item. + - name: net_amount + fieldtype: Currency + label: Net Amount + description: Line item total after discounts but before taxes in transaction currency, + used when asking about item-level purchase amounts or order line totals. + - name: base_net_rate + fieldtype: Currency + label: Net Rate (Company Currency) + description: Unit price after discounts in company base currency, used when asking + about standardized per-unit costs across different currency transactions. + - name: base_net_amount + fieldtype: Currency + label: Net Amount (Company Currency) + description: Line item total after discounts but before taxes in company base + currency, used when asking about purchase amounts in home currency for consolidated + reporting. + - name: from_warehouse + fieldtype: Link + label: From Warehouse + description: Source warehouse when transferring stock between warehouses as part + of the purchase order fulfillment. + join_hint: + table: tabWarehouse + 'on': from_warehouse = tabWarehouse.name + - name: warehouse + fieldtype: Link + label: Target Warehouse + description: Target warehouse where purchased items will be received and stored. + join_hint: + table: tabWarehouse + 'on': warehouse = tabWarehouse.name + - name: actual_qty + fieldtype: Float + label: Available Qty at Target Warehouse + description: Current available quantity of the item in stock at the time of purchase + order creation. + - name: company_total_stock + fieldtype: Float + label: Available Qty at Company + description: Total stock quantity available across the company for the item being + purchased, relevant when checking inventory levels before ordering. + - name: material_request + fieldtype: Link + label: Material Request + description: Reference to the material request document that triggered this purchase + order item, used to trace procurement back to the original requisition. + join_hint: + table: tabMaterial Request + 'on': material_request = tabMaterial Request.name + - name: material_request_item + fieldtype: Data + label: Material Request Item + description: Specific line item from the material request that this purchase order + item fulfills, used to link individual requested items to their procurement. + - name: sales_order + fieldtype: Link + label: Sales Order + description: Links this purchase order item to the originating sales order when + purchasing to fulfill a specific customer order. + join_hint: + table: tabSales Order + 'on': sales_order = tabSales Order.name + - name: sales_order_item + fieldtype: Data + label: Sales Order Item + description: Links this purchase order item to the specific line item on the sales + order being fulfilled. + - name: sales_order_packed_item + fieldtype: Data + label: Sales Order Packed Item + description: Links this purchase order item to a packed sales order item when + purchasing materials for already packed customer orders. + - name: supplier_quotation + fieldtype: Link + label: Supplier Quotation + description: Links to the supplier's quote document that this purchase order item + was created from or references. + join_hint: + table: tabSupplier Quotation + 'on': supplier_quotation = tabSupplier Quotation.name + - name: supplier_quotation_item + fieldtype: Link + label: Supplier Quotation Item + description: Links to the specific line item in the supplier's quotation that + corresponds to this purchase order item. + join_hint: + table: tabSupplier Quotation Item + 'on': supplier_quotation_item = tabSupplier Quotation Item.name + - name: delivered_by_supplier + fieldtype: Check + label: To be Delivered to Customer + description: Identifies which supplier actually delivered this item, relevant + when the delivering supplier differs from the ordering supplier or for tracking + delivery responsibility. + - name: against_blanket_order + fieldtype: Check + label: Against Blanket Order + description: Indicates whether this purchase order item is created from a blanket + purchase order agreement. + - name: blanket_order + fieldtype: Link + label: Blanket Order + description: References the specific blanket purchase order agreement from which + this item was created. + join_hint: + table: tabBlanket Order + 'on': blanket_order = tabBlanket Order.name + - name: blanket_order_rate + fieldtype: Currency + label: Blanket Order Rate + description: The negotiated price per unit from the blanket purchase order agreement + applied to this item. + - name: received_qty + fieldtype: Float + label: Received Qty + description: Quantity of items physically received from the supplier for this + purchase order line. + - name: returned_qty + fieldtype: Float + label: Returned Qty + description: Quantity of items sent back to the supplier after receipt due to + defects, overages, or other issues. + - name: billed_amt + fieldtype: Currency + label: Billed Amount + description: Total invoiced amount from the supplier for this purchase order line + item. + - name: expense_account + fieldtype: Link + label: Expense Account + description: General ledger account charged when the purchased item is expensed + rather than capitalized or inventoried. + join_hint: + table: tabAccount + 'on': expense_account = tabAccount.name + - name: wip_composite_asset + fieldtype: Link + label: WIP Composite Asset + description: Links the purchase order item to a work-in-progress composite asset + being assembled or constructed. + join_hint: + table: tabAsset + 'on': wip_composite_asset = tabAsset.name + - name: manufacturer + fieldtype: Link + label: Manufacturer + description: Original manufacturer or brand of the item being purchased, which + may differ from the supplier or vendor. + join_hint: + table: tabManufacturer + 'on': manufacturer = tabManufacturer.name + - name: manufacturer_part_no + fieldtype: Data + label: Manufacturer Part Number + description: Manufacturer's part number for the purchased item, used when searching + by vendor-specific part identifiers rather than internal item codes. + - name: bom + fieldtype: Link + label: BOM + description: Bill of materials linked to this purchase order item, relevant when + purchasing items that have component breakdowns or subassemblies. + join_hint: + table: tabBOM + 'on': bom = tabBOM.name + - name: include_exploded_items + fieldtype: Check + label: Include Exploded Items + description: Indicates whether to show individual BOM components as separate line + items instead of the parent item, used when analyzing detailed component-level + purchases. + - name: weight_per_unit + fieldtype: Float + label: Weight Per Unit + description: Weight of a single unit of the purchased item, used when calculating + shipping costs or comparing item specifications per unit. + - name: total_weight + fieldtype: Float + label: Total Weight + description: Combined weight of all units in this purchase order line, used for + freight planning and total shipment weight calculations. + - name: weight_uom + fieldtype: Link + label: Weight UOM + description: Unit of measurement for weight fields (e.g., kg, lbs, tons), used + to interpret weight_per_unit and total_weight values. + join_hint: + table: tabUOM + 'on': weight_uom = tabUOM.name + - name: project + fieldtype: Link + label: Project + description: Project code or identifier to which the purchased item will be charged + or allocated for tracking project-specific procurement costs. + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: cost_center + fieldtype: Link + label: Cost Center + description: Cost center code to which the purchased item expense will be allocated + for departmental or organizational budget tracking. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + - name: is_fixed_asset + fieldtype: Check + label: Is Fixed Asset + description: Indicates whether the purchased item is a fixed asset that will be + capitalized rather than expensed immediately. + - name: item_tax_rate + fieldtype: Code + label: Item Tax Rate + description: Tax percentage applied to this purchase order line item for calculating + tax amounts. + - name: production_plan + fieldtype: Link + label: Production Plan + description: Links this purchase order item to a specific production plan when + materials are procured for manufacturing. + join_hint: + table: tabProduction Plan + 'on': production_plan = tabProduction Plan.name + - name: production_plan_item + fieldtype: Data + label: Production Plan Item + description: Links to the specific line item within a production plan that triggered + this purchase requirement. + - name: production_plan_sub_assembly_item + fieldtype: Data + label: Production Plan Sub Assembly Item + description: Links this purchase order item to a specific sub-assembly component + in a production plan when procuring materials for manufacturing. + - name: page_break + fieldtype: Check + label: Page Break + description: Controls whether a page break appears before this line item when + printing or generating PDF versions of the purchase order. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabPurchase Order + Item). Comparison-ready across parent records.' +- table: tabPurchase Order Item Supplied + description: '' + fields: + - name: main_item_code + fieldtype: Link + label: Item Code + description: Code of the finished or main product item that was ordered in the + purchase order + join_hint: + table: tabItem + 'on': main_item_code = tabItem.name + - name: rm_item_code + fieldtype: Link + label: Raw Material Item Code + description: Code of the raw material or component item that was actually supplied + to fulfill the main item + join_hint: + table: tabItem + 'on': rm_item_code = tabItem.name + - name: stock_uom + fieldtype: Link + label: Stock Uom + description: Unit of measurement for inventory tracking when users ask about stock + quantities or warehouse units for supplied items + join_hint: + table: tabUOM + 'on': stock_uom = tabUOM.name + - name: reserve_warehouse + fieldtype: Link + label: Reserve Warehouse + description: Specific warehouse location where inventory is reserved when users + ask where supplied materials are allocated or held + join_hint: + table: tabWarehouse + 'on': reserve_warehouse = tabWarehouse.name + - name: conversion_factor + fieldtype: Float + label: Conversion Factor + description: Multiplier to convert between purchase unit and stock unit when users + ask about unit conversions or quantity reconciliation + - name: bom_detail_no + fieldtype: Data + label: BOM Detail No + description: Bill of materials detail number linking the supplied item to a specific + BOM component or subassembly line. + - name: reference_name + fieldtype: Data + label: Reference Name + description: Name or identifier of the supplier, vendor, or source providing this + purchase order item. + - name: rate + fieldtype: Currency + label: Rate + description: Unit price or cost per item for this supplied purchase order line. + - name: amount + fieldtype: Currency + label: Amount + description: Total monetary value of the supplied items for this purchase order + line. + - name: required_qty + fieldtype: Float + label: Required Qty + description: Quantity of items originally ordered or still needed to fulfill the + purchase order. + - name: supplied_qty + fieldtype: Float + label: Supplied Qty + description: Quantity of items actually received or delivered against the purchase + order. + - name: consumed_qty + fieldtype: Float + label: Consumed Qty + description: Quantity of supplied items that have been consumed or used in production + or operations. + - name: returned_qty + fieldtype: Float + label: Returned Qty + description: Quantity of supplied items that were returned to the supplier after + delivery. + - name: total_supplied_qty + fieldtype: Float + label: Total Supplied Qty + description: Total quantity of items delivered by the supplier for this purchase + order line, including both consumed and returned amounts. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabPurchase Order + Item Supplied). Comparison-ready across parent records.' +- table: tabPurchase Receipt + description: '' + fields: + - name: title + fieldtype: Data + label: Title + description: Custom display name or label for the purchase receipt that provides + human-readable context beyond the system identifier + - name: naming_series + fieldtype: Select + label: Series + description: Prefix pattern that determines how purchase receipt identifiers are + automatically generated and sequenced + options: + - MAT-PRE-.YYYY.- + - MAT-PR-RET-.YYYY.- + - name: supplier + fieldtype: Link + label: Supplier + description: Vendor ID or code for the supplier providing the purchased goods + in this receipt. + join_hint: + table: tabSupplier + 'on': supplier = tabSupplier.name + - name: supplier_name + fieldtype: Data + label: Supplier Name + description: Full business name of the vendor who delivered the goods, used when + searching by supplier company name rather than code. + - name: supplier_delivery_note + fieldtype: Data + label: Supplier Delivery Note + description: External reference number or note from the supplier's delivery documentation + accompanying the shipment. + - name: subcontracting_receipt + fieldtype: Link + label: Subcontracting Receipt + description: Indicates whether this purchase receipt is for materials received + from a subcontractor who performed manufacturing or processing work. + join_hint: + table: tabSubcontracting Receipt + 'on': subcontracting_receipt = tabSubcontracting Receipt.name + - name: posting_date + fieldtype: Date + label: Date + description: The accounting date when the purchase receipt transaction is recorded + in the financial ledger. + - name: posting_time + fieldtype: Time + label: Posting Time + description: The time of day when the purchase receipt transaction was posted + to the system. + - name: set_posting_time + fieldtype: Check + label: Edit Posting Date and Time + description: Indicates whether the posting date and time were manually specified + instead of using the current timestamp. + - name: company + fieldtype: Link + label: Company + description: The company entity that received the purchased goods or materials. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: apply_putaway_rule + fieldtype: Check + label: Apply Putaway Rule + description: Indicates whether automatic warehouse putaway rules should be applied + to determine storage locations for received items. + - name: is_return + fieldtype: Check + label: Is Return + description: Indicates whether this purchase receipt represents returned goods + to the supplier rather than received goods. + - name: return_against + fieldtype: Link + label: Return Against Purchase Receipt + description: References the original purchase receipt document that this return + is being made against. + join_hint: + table: tabPurchase Receipt + 'on': return_against = tabPurchase Receipt.name + - name: cost_center + fieldtype: Link + label: Cost Center + description: The cost center to which the expenses or inventory from this purchase + receipt should be allocated for accounting purposes. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + - name: project + fieldtype: Link + label: Project + description: The project associated with this purchase receipt for tracking project-specific + procurement and costs. + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: currency + fieldtype: Link + label: Currency + description: The currency in which the purchase receipt transaction amounts are + denominated. + join_hint: + table: tabCurrency + 'on': currency = tabCurrency.name + - name: conversion_rate + fieldtype: Float + label: Exchange Rate + description: The exchange rate used to convert the purchase receipt currency to + the company's base currency. + - name: buying_price_list + fieldtype: Link + label: Price List + description: Price list applied to this purchase receipt for determining item + rates and currency + join_hint: + table: tabPrice List + 'on': buying_price_list = tabPrice List.name + - name: price_list_currency + fieldtype: Link + label: Price List Currency + description: Currency of the price list used in this purchase receipt + join_hint: + table: tabCurrency + 'on': price_list_currency = tabCurrency.name + - name: plc_conversion_rate + fieldtype: Float + label: Price List Exchange Rate + description: Exchange rate used to convert price list currency to company base + currency for this purchase receipt + - name: ignore_pricing_rule + fieldtype: Check + label: Ignore Pricing Rule + description: Whether pricing rules were bypassed when processing this purchase + receipt. + - name: scan_barcode + fieldtype: Data + label: Scan Barcode + description: Barcode value scanned during receipt entry for item identification. + - name: last_scanned_warehouse + fieldtype: Data + label: Last Scanned Warehouse + description: Most recent warehouse location captured during barcode scanning operations + for this receipt. + - name: set_warehouse + fieldtype: Link + label: Accepted Warehouse + description: Target warehouse where accepted purchased items are received and + stored upon delivery + join_hint: + table: tabWarehouse + 'on': set_warehouse = tabWarehouse.name + - name: set_from_warehouse + fieldtype: Link + label: Set From Warehouse + description: Source warehouse from which items are being transferred in an inter-warehouse + purchase receipt scenario + join_hint: + table: tabWarehouse + 'on': set_from_warehouse = tabWarehouse.name + - name: rejected_warehouse + fieldtype: Link + label: Rejected Warehouse + description: Warehouse designated for storing items that failed quality inspection + or were rejected during receipt + join_hint: + table: tabWarehouse + 'on': rejected_warehouse = tabWarehouse.name + - name: is_subcontracted + fieldtype: Check + label: Is Subcontracted + description: Indicates whether this purchase receipt involves subcontracted manufacturing + where materials are sent to a supplier for processing. + - name: supplier_warehouse + fieldtype: Link + label: Supplier Warehouse + description: The warehouse location at the supplier's facility where goods are + stored or staged before delivery. + join_hint: + table: tabWarehouse + 'on': supplier_warehouse = tabWarehouse.name + - name: items + fieldtype: Table + label: Items + description: '' + child_hint: + child_table: tabPurchase Receipt Item + fieldname: items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: items + - name: total_qty + fieldtype: Float + label: Total Quantity + description: Total quantity of all items received in this purchase receipt across + all line items. + - name: total_net_weight + fieldtype: Float + label: Total Net Weight + description: Combined net weight of all items received in this purchase receipt. + - name: base_total + fieldtype: Currency + label: Total (Company Currency) + description: Total value of received items in base currency before taxes and charges. + - name: base_net_total + fieldtype: Currency + label: Net Total (Company Currency) + description: Net total of all items in base currency before taxes and charges, + used when querying receipt values in company's default currency. + - name: total + fieldtype: Currency + label: Total + description: Grand total of the purchase receipt including all taxes, charges, + and discounts in transaction currency. + - name: net_total + fieldtype: Currency + label: Net Total + description: Net total of all items in transaction currency before applying taxes + and additional charges. + - name: tax_withholding_net_total + fieldtype: Currency + label: Tax Withholding Net Total + description: Net total amount after applying tax withholding deductions on the + purchase receipt in transaction currency. + - name: base_tax_withholding_net_total + fieldtype: Currency + label: Base Tax Withholding Net Total + description: Net total amount after applying tax withholding deductions on the + purchase receipt in base company currency. + - name: tax_category + fieldtype: Link + label: Tax Category + description: Tax classification applied to the purchase receipt determining which + tax rules and rates apply to the transaction. + join_hint: + table: tabTax Category + 'on': tax_category = tabTax Category.name + - name: taxes_and_charges + fieldtype: Link + label: Purchase Taxes and Charges Template + description: Tax template applied to calculate taxes on this purchase receipt + join_hint: + table: tabPurchase Taxes and Charges Template + 'on': taxes_and_charges = tabPurchase Taxes and Charges Template.name + - name: shipping_rule + fieldtype: Link + label: Shipping Rule + description: Shipping cost calculation rule applied to determine freight charges + for this receipt + join_hint: + table: tabShipping Rule + 'on': shipping_rule = tabShipping Rule.name + - name: incoterm + fieldtype: Link + label: Incoterm + description: International commercial terms defining delivery responsibilities + and risk transfer between buyer and supplier + join_hint: + table: tabIncoterm + 'on': incoterm = tabIncoterm.name + - name: named_place + fieldtype: Data + label: Named Place + description: Delivery location or place name where purchased goods are received + or shipped to. + - name: taxes + fieldtype: Table + label: Purchase Taxes and Charges + description: '' + child_hint: + child_table: tabPurchase Taxes and Charges + fieldname: taxes + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: taxes + - name: base_taxes_and_charges_added + fieldtype: Currency + label: Taxes and Charges Added (Company Currency) + description: Total tax amount added to the purchase receipt in base currency before + any currency conversion. + - name: base_taxes_and_charges_deducted + fieldtype: Currency + label: Taxes and Charges Deducted (Company Currency) + description: Total amount of taxes and charges deducted from the purchase receipt + value in base currency. + - name: base_total_taxes_and_charges + fieldtype: Currency + label: Total Taxes and Charges (Company Currency) + description: Total sum of all taxes and charges applied to the purchase receipt + in base currency. + - name: taxes_and_charges_added + fieldtype: Currency + label: Taxes and Charges Added + description: Total amount of taxes and charges added to the purchase receipt value + in transaction currency. + - name: taxes_and_charges_deducted + fieldtype: Currency + label: Taxes and Charges Deducted + description: Tax amount deducted at source (TDS/TCS) from the purchase receipt + total, used when calculating net payable amount to supplier. + - name: total_taxes_and_charges + fieldtype: Currency + label: Total Taxes and Charges + description: Total sum of all taxes and charges added to the purchase receipt + before any deductions, used when analyzing tax burden or comparing gross vs + net amounts. + - name: base_grand_total + fieldtype: Currency + label: Grand Total (Company Currency) + description: Final total amount of the purchase receipt in company's base currency + including items, taxes, and charges, used for financial reporting and cross-currency + purchase comparisons. + - name: base_rounding_adjustment + fieldtype: Currency + label: Rounding Adjustment (Company Currency) + description: Amount added or subtracted to round the total to a convenient value + in base currency. + - name: base_rounded_total + fieldtype: Currency + label: Rounded Total (Company Currency) + description: Final total amount after applying rounding adjustment in base currency. + - name: base_in_words + fieldtype: Data + label: In Words (Company Currency) + description: Text representation of the base currency total amount spelled out + in words for formal documentation. + - name: grand_total + fieldtype: Currency + label: Grand Total + description: Total amount of the purchase receipt including all items, taxes, + and charges before any rounding adjustments. + - name: rounding_adjustment + fieldtype: Currency + label: Rounding Adjustment + description: Amount added or subtracted to round the grand total to a convenient + figure. + - name: rounded_total + fieldtype: Currency + label: Rounded Total + description: Final total amount after applying rounding adjustment to the grand + total, typically used for actual payment. + - name: in_words + fieldtype: Data + label: In Words + description: Total amount of the purchase receipt expressed as text words for + check writing or formal documentation + - name: disable_rounded_total + fieldtype: Check + label: Disable Rounded Total + description: Whether to prevent automatic rounding of the total amount to the + nearest whole number + - name: apply_discount_on + fieldtype: Select + label: Apply Additional Discount On + description: Whether discounts are calculated on the grand total or on individual + line item net amounts + options: + - Grand Total + - Net Total + - name: base_discount_amount + fieldtype: Currency + label: Additional Discount Amount (Company Currency) + description: Discount amount calculated from line items before applying any additional + document-level discounts. + - name: additional_discount_percentage + fieldtype: Float + label: Additional Discount Percentage + description: Extra discount percentage applied at the document level after line + item discounts. + - name: discount_amount + fieldtype: Currency + label: Additional Discount Amount + description: Total final discount amount including both line item and additional + document-level discounts. + - name: other_charges_calculation + fieldtype: Text Editor + label: Taxes and Charges Calculation + description: Formula or method used to calculate additional charges beyond item + costs on the purchase receipt. + - name: pricing_rules + fieldtype: Table + label: Pricing Rule Detail + description: '' + child_hint: + child_table: tabPricing Rule Detail + fieldname: pricing_rules + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: pricing_rules + - name: supplied_items + fieldtype: Table + label: Consumed Items + description: '' + child_hint: + child_table: tabPurchase Receipt Item Supplied + fieldname: supplied_items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: supplied_items + - name: supplier_address + fieldtype: Link + label: Supplier Address + description: Link to the specific supplier address record used for this purchase + receipt delivery or billing location. + join_hint: + table: tabAddress + 'on': supplier_address = tabAddress.name + - name: address_display + fieldtype: Small Text + label: Address + description: Formatted full address text showing where goods were received or + supplier location for display purposes. + - name: contact_person + fieldtype: Link + label: Contact Person + description: Person at the supplier organization who is the point of contact for + this purchase receipt transaction. + join_hint: + table: tabContact + 'on': contact_person = tabContact.name + - name: contact_display + fieldtype: Small Text + label: Contact + description: Name of the contact person at the supplier who handled or coordinated + the purchase receipt delivery. + - name: contact_mobile + fieldtype: Small Text + label: Mobile No + description: Mobile phone number of the supplier contact person associated with + the purchase receipt. + - name: contact_email + fieldtype: Small Text + label: Contact Email + description: Email address of the supplier contact person associated with the + purchase receipt. + - name: dispatch_address + fieldtype: Link + label: Dispatch Address Template + description: Address from which the supplier dispatched or shipped the goods to + the buyer. + join_hint: + table: tabAddress + 'on': dispatch_address = tabAddress.name + - name: dispatch_address_display + fieldtype: Text Editor + label: Dispatch Address + description: Formatted display version of the supplier's dispatch address for + presentation purposes. + - name: shipping_address + fieldtype: Link + label: Shipping Address Template + description: Destination address where the purchased goods are being delivered + or received by the buyer. + join_hint: + table: tabAddress + 'on': shipping_address = tabAddress.name + - name: shipping_address_display + fieldtype: Small Text + label: Shipping Address + description: Formatted shipping address where purchased goods are delivered, used + when users ask where items were or will be received. + - name: billing_address + fieldtype: Link + label: Billing Address + description: Address associated with the supplier's billing or invoice for the + purchase receipt. + join_hint: + table: tabAddress + 'on': billing_address = tabAddress.name + - name: billing_address_display + fieldtype: Small Text + label: Billing Address + description: Formatted billing address for the supplier, used when users need + the invoice or payment address for a purchase receipt. + - name: tc_name + fieldtype: Link + label: Terms + description: Tax category applied to the purchase receipt for tax calculation + and compliance purposes. + join_hint: + table: tabTerms and Conditions + 'on': tc_name = tabTerms and Conditions.name + - name: terms + fieldtype: Text Editor + label: Terms and Conditions + description: Payment terms agreed with the supplier specifying when payment is + due for the received goods. + - name: status + fieldtype: Select + label: Status + description: Current state of the purchase receipt such as draft, submitted, completed, + or cancelled. + options: + - Draft + - Partly Billed + - To Bill + - Completed + - Return Issued + - Cancelled + - Closed + - name: per_billed + fieldtype: Percent + label: '% Amount Billed' + description: Percentage of the purchase receipt quantity that has been converted + into purchase invoices. + - name: per_returned + fieldtype: Percent + label: '% Returned' + description: Percentage of the purchase receipt quantity that has been returned + to the supplier. + - name: auto_repeat + fieldtype: Link + label: Auto Repeat + description: Reference to a recurring schedule if this purchase receipt is part + of an automated repeat pattern. + join_hint: + table: tabAuto Repeat + 'on': auto_repeat = tabAuto Repeat.name + - name: letter_head + fieldtype: Link + label: Letter Head + description: Letterhead template used when printing or emailing this purchase + receipt document. + join_hint: + table: tabLetter Head + 'on': letter_head = tabLetter Head.name + - name: group_same_items + fieldtype: Check + label: Group same items + description: Whether identical items are consolidated into single lines when printing + this purchase receipt. + - name: select_print_heading + fieldtype: Link + label: Print Heading + description: Custom heading text that appears at the top of the printed purchase + receipt instead of the default title. + join_hint: + table: tabPrint Heading + 'on': select_print_heading = tabPrint Heading.name + - name: language + fieldtype: Data + label: Print Language + description: Language used for printing or displaying the purchase receipt document. + - name: transporter_name + fieldtype: Data + label: Transporter Name + description: Name of the shipping or logistics company that delivered the purchased + goods. + - name: lr_no + fieldtype: Data + label: Vehicle Number + description: Lorry receipt number or transport document reference number for tracking + the shipment. + - name: lr_date + fieldtype: Date + label: Vehicle Date + description: Date on the lorry receipt or transport document accompanying the + goods delivery + - name: instructions + fieldtype: Small Text + label: Instructions + description: Special handling or processing instructions provided for receiving + the purchased goods + - name: is_internal_supplier + fieldtype: Check + label: Is Internal Supplier + description: Indicates whether the supplier is an internal company entity or branch + rather than an external vendor + - name: represents_company + fieldtype: Link + label: Represents Company + description: The company entity that this purchase receipt is recorded for in + multi-company scenarios. + join_hint: + table: tabCompany + 'on': represents_company = tabCompany.name + - name: inter_company_reference + fieldtype: Link + label: Inter Company Reference + description: Links to a related inter-company transaction when goods are received + from another company within the same corporate group. + join_hint: + table: tabDelivery Note + 'on': inter_company_reference = tabDelivery Note.name + - name: remarks + fieldtype: Small Text + label: Remarks + description: Additional notes or comments about the purchase receipt transaction. + - name: range + fieldtype: Data + label: Range + description: Specifies the number range or series prefix used for generating purchase + receipt document numbers. + - name: amended_from + fieldtype: Link + label: Amended From + description: References the original purchase receipt document that this record + amends or corrects. + join_hint: + table: tabPurchase Receipt + 'on': amended_from = tabPurchase Receipt.name + - name: is_old_subcontracting_flow + fieldtype: Check + label: Is Old Subcontracting Flow + description: Indicates whether this purchase receipt follows the legacy subcontracting + process instead of the current workflow. + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Purchase Receipt document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabPurchase Receipt Item + description: '' + fields: + - name: barcode + fieldtype: Data + label: Barcode + description: Barcode scanned or entered for the received item to verify product + identity during goods receipt + - name: has_item_scanned + fieldtype: Check + label: Has Item Scanned + description: Indicates whether the item was physically scanned with a barcode + scanner during the receipt process + - name: item_code + fieldtype: Link + label: Item Code + description: Identifies the specific product or material received in the purchase + receipt. + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: product_bundle + fieldtype: Link + label: Product Bundle + description: Indicates if the received item is a bundled package of multiple products + sold together as one unit. + join_hint: + table: tabProduct Bundle + 'on': product_bundle = tabProduct Bundle.name + - name: supplier_part_no + fieldtype: Data + label: Supplier Part Number + description: The vendor's unique part number or SKU for the received item, used + when referencing supplier catalogs or cross-referencing vendor documentation. + - name: item_name + fieldtype: Data + label: Item Name + description: The specific product or material code received from the supplier, + used when querying what items were purchased. + - name: description + fieldtype: Text Editor + label: Description + description: Detailed text explaining the item's specifications or characteristics, + used when searching by product features or attributes rather than item code. + - name: brand + fieldtype: Link + label: Brand + description: The manufacturer or brand name of the received item, used when filtering + purchases by specific brands or comparing brand-level procurement. + join_hint: + table: tabBrand + 'on': brand = tabBrand.name + - name: item_group + fieldtype: Link + label: Item Group + description: Category or classification of the purchased item for grouping similar + products together + join_hint: + table: tabItem Group + 'on': item_group = tabItem Group.name + - name: received_qty + fieldtype: Float + label: Received Quantity + description: Actual quantity of items physically received from the supplier in + this receipt transaction + - name: qty + fieldtype: Float + label: Accepted Quantity + description: Quantity of items received and accepted in this purchase receipt + line. + - name: rejected_qty + fieldtype: Float + label: Rejected Quantity + description: Quantity of items rejected or not accepted during receipt inspection. + - name: uom + fieldtype: Link + label: UOM + description: Unit of measurement for the received quantity (e.g., pieces, kg, + boxes). + join_hint: + table: tabUOM + 'on': uom = tabUOM.name + - name: stock_uom + fieldtype: Link + label: Stock UOM + description: Unit of measurement for inventory tracking of the received item. + join_hint: + table: tabUOM + 'on': stock_uom = tabUOM.name + - name: conversion_factor + fieldtype: Float + label: Conversion Factor + description: Multiplier to convert between the purchase unit and stock unit for + the received item. + - name: retain_sample + fieldtype: Check + label: Retain Sample + description: Indicates whether a sample of the received item should be kept for + quality testing or reference. + - name: sample_quantity + fieldtype: Int + label: Sample Quantity + description: Quantity of items received as free samples or for testing purposes, + not added to regular inventory. + - name: received_stock_qty + fieldtype: Float + label: Received Qty in Stock UOM + description: Actual quantity of items physically received in the warehouse or + storage location in stock UOM. + - name: stock_qty + fieldtype: Float + label: Accepted Qty in Stock UOM + description: Total quantity added to inventory after accounting for UOM conversion, + rejections, and samples. + - name: returned_qty + fieldtype: Float + label: Returned Qty in Stock UOM + description: Quantity of this item that has been returned to the supplier after + receipt. + - name: price_list_rate + fieldtype: Currency + label: Price List Rate + description: Standard catalog price per unit in transaction currency before discounts + or negotiations. + - name: base_price_list_rate + fieldtype: Currency + label: Price List Rate (Company Currency) + description: Standard catalog price per unit converted to company base currency. + - name: margin_type + fieldtype: Select + label: Margin Type + description: Whether the margin on the purchase receipt item is calculated as + a percentage or fixed amount. + options: + - Percentage + - Amount + - name: margin_rate_or_amount + fieldtype: Float + label: Margin Rate or Amount + description: The numeric value of the margin, interpreted as either a percentage + rate or absolute amount depending on margin_type. + - name: rate_with_margin + fieldtype: Currency + label: Rate With Margin + description: The final unit rate of the item after applying the margin to the + base purchase rate. + - name: discount_percentage + fieldtype: Percent + label: Discount on Price List Rate (%) + description: Percentage discount applied directly to this purchase receipt item + line. + - name: discount_amount + fieldtype: Currency + label: Discount Amount + description: Absolute monetary discount applied directly to this purchase receipt + item line before distribution. + - name: distributed_discount_amount + fieldtype: Currency + label: Distributed Discount Amount + description: Portion of invoice-level or header-level discount allocated to this + specific item line. + - name: base_rate_with_margin + fieldtype: Currency + label: Rate With Margin (Company Currency) + description: Unit price in company base currency after applying margin percentage + but before taxes, used when analyzing purchase costs with margin adjustments + across different currencies. + - name: rate + fieldtype: Currency + label: Rate + description: Actual unit price per item in transaction currency as agreed with + supplier, used when querying what was paid per unit for received items. + - name: amount + fieldtype: Currency + label: Amount + description: Total line value for the received quantity before taxes (rate ร— quantity), + used when asking about total cost or value of specific items received. + - name: base_rate + fieldtype: Currency + label: Rate (Company Currency) + description: Unit price of the purchased item in company's base currency before + any currency conversion. + - name: base_amount + fieldtype: Currency + label: Amount (Company Currency) + description: Total line amount for the purchased item in company's base currency + before any currency conversion. + - name: pricing_rules + fieldtype: Small Text + label: Pricing Rules + description: Specific pricing rule or discount scheme applied to this purchase + receipt line item. + - name: stock_uom_rate + fieldtype: Currency + label: Rate of Stock UOM + description: Rate per unit in the stock unit of measurement, used when querying + item costs in base inventory units rather than purchase units. + - name: is_free_item + fieldtype: Check + label: Is Free Item + description: Indicates whether this item was received as a free or promotional + item without charge. + - name: apply_tds + fieldtype: Check + label: Apply TDS + description: Indicates whether tax deducted at source should be applied to this + purchase receipt item. + - name: net_rate + fieldtype: Currency + label: Net Rate + description: Rate per unit of the item after applying discounts but before taxes, + used when analyzing pre-tax unit pricing on purchase receipts. + - name: net_amount + fieldtype: Currency + label: Net Amount + description: Total amount for the line item after discounts but before taxes, + used when calculating pre-tax purchase values. + - name: item_tax_template + fieldtype: Link + label: Item Tax Template + description: Tax template applied to this specific item, used when identifying + which tax rules or rates govern this purchased item. + join_hint: + table: tabItem Tax Template + 'on': item_tax_template = tabItem Tax Template.name + - name: base_net_rate + fieldtype: Currency + label: Net Rate (Company Currency) + description: Price per unit in company base currency after discounts and before + taxes, used for financial reporting and margin analysis. + - name: base_net_amount + fieldtype: Currency + label: Net Amount (Company Currency) + description: Total line amount in company base currency after discounts and before + taxes, used for financial totals and accounting entries. + - name: valuation_rate + fieldtype: Currency + label: Valuation Rate + description: Cost per unit used for inventory valuation and stock ledger entries, + may differ from purchase price when including landed costs. + - name: sales_incoming_rate + fieldtype: Currency + label: Sales Incoming Rate + description: Exchange rate used to convert purchase receipt amounts to sales or + reporting currency for items received from suppliers. + - name: item_tax_amount + fieldtype: Currency + label: Item Tax Amount Included in Value + description: Total tax amount calculated for this specific item line in the purchase + receipt. + - name: rm_supp_cost + fieldtype: Currency + label: Raw Materials Supplied Cost + description: Raw material cost charged by the supplier for this item, excluding + taxes and additional charges. + - name: landed_cost_voucher_amount + fieldtype: Currency + label: Landed Cost Voucher Amount + description: Additional costs allocated to this receipt item from landed cost + vouchers such as freight, customs, or insurance charges. + - name: amount_difference_with_purchase_invoice + fieldtype: Currency + label: Amount Difference with Purchase Invoice + description: Variance between the purchase receipt item amount and the corresponding + purchase invoice amount, used to identify billing discrepancies. + - name: billed_amt + fieldtype: Currency + label: Billed Amt + description: Total amount that has been invoiced for this receipt item, used to + track how much of the received goods have been billed. + - name: warehouse + fieldtype: Link + label: Accepted Warehouse + description: The warehouse where purchased items are received and stored after + acceptance. + join_hint: + table: tabWarehouse + 'on': warehouse = tabWarehouse.name + - name: rejected_warehouse + fieldtype: Link + label: Rejected Warehouse + description: The warehouse where rejected or non-conforming purchased items are + stored separately. + join_hint: + table: tabWarehouse + 'on': rejected_warehouse = tabWarehouse.name + - name: from_warehouse + fieldtype: Link + label: From Warehouse + description: The source warehouse when transferring items between warehouses during + purchase receipt processing. + join_hint: + table: tabWarehouse + 'on': from_warehouse = tabWarehouse.name + - name: material_request + fieldtype: Link + label: Material Request + description: Links to the original material request document that initiated the + procurement process for this received item. + join_hint: + table: tabMaterial Request + 'on': material_request = tabMaterial Request.name + - name: purchase_order + fieldtype: Link + label: Purchase Order + description: Links to the purchase order document that authorized the purchase + of this received item. + join_hint: + table: tabPurchase Order + 'on': purchase_order = tabPurchase Order.name + - name: purchase_invoice + fieldtype: Link + label: Purchase Invoice + description: Links to the supplier invoice document associated with this received + item for payment processing. + join_hint: + table: tabPurchase Invoice + 'on': purchase_invoice = tabPurchase Invoice.name + - name: allow_zero_valuation_rate + fieldtype: Check + label: Allow Zero Valuation Rate + description: Indicates whether this receipt item can have zero cost or valuation, + relevant when querying items received without assigned value. + - name: return_qty_from_rejected_warehouse + fieldtype: Check + label: Return Qty from Rejected Warehouse + description: Quantity being returned specifically from the rejected warehouse + location, used when tracking returns of previously rejected goods. + - name: is_fixed_asset + fieldtype: Check + label: Is Fixed Asset + description: Identifies whether the received item is a fixed asset rather than + regular inventory, relevant for asset procurement and capitalization queries. + - name: asset_location + fieldtype: Link + label: Asset Location + description: Physical location where the received asset will be placed or stored + after receipt + join_hint: + table: tabLocation + 'on': asset_location = tabLocation.name + - name: asset_category + fieldtype: Link + label: Asset Category + description: Classification of the received item as a fixed asset type for accounting + and depreciation purposes + join_hint: + table: tabAsset Category + 'on': asset_category = tabAsset Category.name + - name: schedule_date + fieldtype: Date + label: Required By + description: Planned or expected date for the purchase receipt delivery or processing + - name: quality_inspection + fieldtype: Link + label: Quality Inspection + description: References the quality inspection record performed on this received + item to verify it meets acceptance criteria. + join_hint: + table: tabQuality Inspection + 'on': quality_inspection = tabQuality Inspection.name + - name: material_request_item + fieldtype: Data + label: Material Request Item + description: Links to the original material request line that triggered this purchase + receipt item. + - name: purchase_order_item + fieldtype: Data + label: Purchase Order Item + description: Links to the specific purchase order line item that this receipt + fulfills or partially fulfills. + - name: purchase_invoice_item + fieldtype: Data + label: Purchase Invoice Item + description: Links to the corresponding purchase invoice line item when the received + goods have been invoiced by the supplier. + - name: purchase_receipt_item + fieldtype: Data + label: Purchase Receipt Item + description: Self-reference to this purchase receipt line item, used for tracking + item-level receipt details like quantity received, rate, and item code. + - name: delivery_note_item + fieldtype: Data + label: Delivery Note Item + description: Links to the customer delivery note line item when this purchase + receipt is for a drop-ship or inter-warehouse transfer scenario. + - name: putaway_rule + fieldtype: Link + label: Putaway Rule + description: Rule determining warehouse location assignment for received items + during putaway operations. + join_hint: + table: tabPutaway Rule + 'on': putaway_rule = tabPutaway Rule.name + - name: serial_and_batch_bundle + fieldtype: Link + label: Serial and Batch Bundle + description: Bundled collection linking this receipt item to its serial numbers + and batch numbers for inventory tracking. + join_hint: + table: tabSerial and Batch Bundle + 'on': serial_and_batch_bundle = tabSerial and Batch Bundle.name + - name: use_serial_batch_fields + fieldtype: Check + label: Use Serial No / Batch Fields + description: Indicates whether serial and batch numbers are managed through individual + fields rather than bundles for this receipt item. + - name: rejected_serial_and_batch_bundle + fieldtype: Link + label: Rejected Serial and Batch Bundle + description: References the bundle containing serial numbers and batch numbers + for items rejected during receipt inspection or quality control. + join_hint: + table: tabSerial and Batch Bundle + 'on': rejected_serial_and_batch_bundle = tabSerial and Batch Bundle.name + - name: serial_no + fieldtype: Text + label: Serial No + description: The serial number assigned to the accepted item received in this + purchase receipt line. + - name: rejected_serial_no + fieldtype: Text + label: Rejected Serial No + description: The serial number of the item that was rejected during receipt inspection, + separate from accepted items. + - name: batch_no + fieldtype: Link + label: Batch No + description: Batch number assigned to the received items for inventory tracking + and traceability purposes. + join_hint: + table: tabBatch + 'on': batch_no = tabBatch.name + - name: include_exploded_items + fieldtype: Check + label: Include Exploded Items + description: Indicates whether sub-assembly or component items from a bill of + materials are expanded and shown as separate line items in the receipt. + - name: bom + fieldtype: Link + label: BOM + description: Bill of materials reference used when receiving manufactured or assembled + items that need component tracking. + join_hint: + table: tabBOM + 'on': bom = tabBOM.name + - name: weight_per_unit + fieldtype: Float + label: Weight Per Unit + description: Weight of a single unit of the received item, used when calculating + total shipment weight or analyzing per-unit logistics costs. + - name: total_weight + fieldtype: Float + label: Total Weight + description: Total combined weight of all units received in this line item, used + for freight cost verification and warehouse capacity planning. + - name: weight_uom + fieldtype: Link + label: Weight UOM + description: Unit of measurement for weight values (kg, lbs, etc.), used to interpret + weight_per_unit and total_weight in the correct measurement system. + join_hint: + table: tabUOM + 'on': weight_uom = tabUOM.name + - name: manufacturer + fieldtype: Link + label: Manufacturer + description: The company that manufactured the received item, relevant when users + need to filter or report purchases by manufacturer brand or source. + join_hint: + table: tabManufacturer + 'on': manufacturer = tabManufacturer.name + - name: manufacturer_part_no + fieldtype: Data + label: Manufacturer Part Number + description: The manufacturer's specific part number for the received item, used + when users need to identify items by vendor-specific SKU rather than internal + item codes. + - name: expense_account + fieldtype: Link + label: Expense Account + description: The general ledger expense account to which the cost of this received + item is posted, relevant when users need to track spending by accounting category + or cost center. + join_hint: + table: tabAccount + 'on': expense_account = tabAccount.name + - name: item_tax_rate + fieldtype: Code + label: Item Tax Rate + description: Tax rate percentage applied to this purchased item for calculating + tax amounts on the receipt. + - name: wip_composite_asset + fieldtype: Link + label: WIP Composite Asset + description: Asset account used when the received item is part of a work-in-progress + composite or bundled asset. + join_hint: + table: tabAsset + 'on': wip_composite_asset = tabAsset.name + - name: provisional_expense_account + fieldtype: Link + label: Provisional Expense Account + description: Temporary expense account used to record costs when the purchase + invoice has not yet been received or matched. + join_hint: + table: tabAccount + 'on': provisional_expense_account = tabAccount.name + - name: project + fieldtype: Link + label: Project + description: Project associated with this purchased item for tracking project-specific + procurement costs and materials. + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: cost_center + fieldtype: Link + label: Cost Center + description: Cost center to which this purchased item's expenses are allocated + for departmental or divisional accounting. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + - name: page_break + fieldtype: Check + label: Page Break + description: Indicates whether a page break should occur before this item when + printing the purchase receipt document. + - name: sales_order + fieldtype: Link + label: Sales Order + description: Links the purchased item to the originating sales order when the + purchase is made to fulfill a specific customer order (drop ship or make-to-order + scenarios). + join_hint: + table: tabSales Order + 'on': sales_order = tabSales Order.name + - name: sales_order_item + fieldtype: Data + label: Sales Order Item + description: Links to the specific line item on the sales order that this purchase + receipt item fulfills. + - name: subcontracting_receipt_item + fieldtype: Data + label: Subcontracting Receipt Item + description: References the subcontracted item being received back from the subcontractor + after processing or manufacturing. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabPurchase Receipt + Item). Comparison-ready across parent records.' +- table: tabPurchase Receipt Item Supplied + description: '' + fields: + - name: main_item_code + fieldtype: Link + label: Item Code + description: Finished or parent product code that was manufactured or assembled + using the supplied raw material + join_hint: + table: tabItem + 'on': main_item_code = tabItem.name + - name: rm_item_code + fieldtype: Link + label: Raw Material Item Code + description: Raw material or component item code that was supplied by the vendor + for subcontracting or manufacturing + join_hint: + table: tabItem + 'on': rm_item_code = tabItem.name + - name: item_name + fieldtype: Data + label: Item Name + description: Raw material or component item supplied to subcontractor for manufacturing + or processing. + - name: bom_detail_no + fieldtype: Data + label: BOM Detail No + description: Reference to specific bill of materials line item that defines which + component is being supplied. + - name: description + fieldtype: Text Editor + label: Description + description: Additional details or specifications about the supplied item beyond + the item name. + - name: stock_uom + fieldtype: Link + label: Stock Uom + description: Unit of measurement for the supplied item in inventory stock terms. + join_hint: + table: tabUOM + 'on': stock_uom = tabUOM.name + - name: conversion_factor + fieldtype: Float + label: Conversion Factor + description: Multiplier to convert between the purchase unit and stock unit for + the supplied item. + - name: reference_name + fieldtype: Data + label: Reference Name + description: Identifier linking this supplied item record to its source purchase + order or receipt item. + - name: rate + fieldtype: Currency + label: Rate + description: Price per unit of the supplied item received in the purchase receipt. + - name: amount + fieldtype: Currency + label: Amount + description: Total monetary value of the supplied item quantity received (rate + multiplied by quantity). + - name: required_qty + fieldtype: Float + label: Available Qty For Consumption + description: Quantity of the supplied item that was needed or requested for the + purchase receipt. + - name: consumed_qty + fieldtype: Float + label: Qty to Be Consumed + description: Quantity of raw material consumed or used during the purchase receipt + process for subcontracting or manufacturing. + - name: current_stock + fieldtype: Float + label: Current Stock + description: Available stock quantity of the item at the time of the purchase + receipt transaction. + - name: batch_no + fieldtype: Link + label: Batch No + description: Batch or lot number identifying the specific production batch of + the supplied raw material or component. + join_hint: + table: tabBatch + 'on': batch_no = tabBatch.name + - name: serial_no + fieldtype: Text + label: Serial No + description: Unique identifier for tracking individual serialized items supplied + in the purchase receipt. + - name: purchase_order + fieldtype: Link + label: Purchase Order + description: Reference to the original purchase order document that authorized + this item receipt. + join_hint: + table: tabPurchase Order + 'on': purchase_order = tabPurchase Order.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabPurchase Receipt + Item Supplied). Comparison-ready across parent records.' +- table: tabPurchase Taxes and Charges + description: '' + fields: + - name: category + fieldtype: Select + label: Consider Tax or Charge for + description: Classification of the charge as either a tax type or an additional + charge type applied to the purchase + options: + - Valuation and Total + - Valuation + - Total + - name: add_deduct_tax + fieldtype: Select + label: Add or Deduct + description: Whether this tax or charge increases or decreases the total purchase + amount + options: + - Add + - Deduct + - name: charge_type + fieldtype: Select + label: Type + description: Whether this tax or charge is applied on the net total, previous + row total, or as a flat amount. + options: + - Actual + - On Net Total + - On Previous Row Amount + - On Previous Row Total + - On Item Quantity + - name: row_id + fieldtype: Data + label: 'Reference Row #' + description: Reference to a specific line item in the purchase order or invoice + to which this tax or charge applies. + - name: included_in_print_rate + fieldtype: Check + label: Is this Tax included in Basic Rate? + description: Whether this tax or charge amount is already included in the item + rate shown on printed documents. + - name: included_in_paid_amount + fieldtype: Check + label: Considered In Paid Amount + description: Whether this tax or charge was already included in the amount paid + to the supplier rather than added separately. + - name: account_head + fieldtype: Link + label: Account Head + description: The general ledger account where this tax or charge amount is posted + for accounting purposes. + join_hint: + table: tabAccount + 'on': account_head = tabAccount.name + - name: description + fieldtype: Small Text + label: Description + description: Explanatory text describing the nature or purpose of this specific + tax or charge line item. + - name: is_tax_withholding_account + fieldtype: Check + label: Is Tax Withholding Account + description: Indicates whether this tax line represents a withholding tax deducted + from supplier payment rather than an additional tax charge. + - name: rate + fieldtype: Float + label: Tax Rate + description: The percentage or fixed amount applied to calculate this specific + tax or charge on the purchase transaction. + - name: cost_center + fieldtype: Link + label: Cost Center + description: The cost center to which this particular tax or charge line is allocated + for expense tracking and budgeting purposes. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + - name: project + fieldtype: Link + label: Project + description: Project associated with this purchase tax or charge line item for + cost allocation and tracking. + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: account_currency + fieldtype: Link + label: Account Currency + description: Currency of the accounting ledger where this tax or charge is recorded. + join_hint: + table: tabCurrency + 'on': account_currency = tabCurrency.name + - name: tax_amount + fieldtype: Currency + label: Amount + description: Calculated monetary value of the tax or charge applied to the purchase + transaction. + - name: tax_amount_after_discount_amount + fieldtype: Currency + label: Tax Amount After Discount Amount + description: Tax amount calculated after applying discounts to the purchase item + or invoice. + - name: total + fieldtype: Currency + label: Total + description: Total amount including both the base charge and tax for this purchase + tax line item. + - name: base_tax_amount + fieldtype: Currency + label: Amount (Company Currency) + description: Tax amount in the company's base currency before any discounts are + applied. + - name: base_total + fieldtype: Currency + label: Total (Company Currency) + description: Total tax amount in company base currency before any discounts are + applied to the tax. + - name: base_tax_amount_after_discount_amount + fieldtype: Currency + label: Tax Amount After Discount Amount + description: Tax amount in company base currency after applying discount on the + tax itself. + - name: item_wise_tax_detail + fieldtype: Code + label: Item Wise Tax Detail + description: Breakdown of tax amounts calculated separately for each item in the + purchase transaction. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabPurchase Taxes + and Charges). Comparison-ready across parent records.' +- table: tabPurchase Taxes and Charges Template + description: Standard tax template that can be applied to all Purchase Transactions. + This template can contain a list of tax heads and also other expense heads like + "Shipping", "Insurance", "Handling", etc. + fields: + - name: title + fieldtype: Data + label: Title + description: Display name of the purchase taxes and charges template shown to + users when selecting tax configurations for purchases. + - name: is_default + fieldtype: Check + label: Default + description: Indicates whether this purchase tax template is automatically applied + to new purchase transactions. + - name: disabled + fieldtype: Check + label: Disabled + description: Whether this purchase tax template is inactive and unavailable for + use in transactions. + - name: company + fieldtype: Link + label: Company + description: The specific company entity this purchase tax template applies to. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: tax_category + fieldtype: Link + label: Tax Category + description: The classification of tax type this template represents, such as + VAT, GST, or customs duty categories. + join_hint: + table: tabTax Category + 'on': tax_category = tabTax Category.name + - name: taxes + fieldtype: Table + label: Purchase Taxes and Charges + description: '' + child_hint: + child_table: tabPurchase Taxes and Charges + fieldname: taxes + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: taxes + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Purchase Taxes and Charges Template document (master/transaction). + Use only for single-entity lookups, not cross-record comparison unless fields + are per-relationship (e.g. supplier, price_list).' +- table: tabPutaway Rule + description: '' + fields: + - name: disable + fieldtype: Check + label: Disable + description: Indicates whether the putaway rule is currently active or inactive + for warehouse operations + - name: item_code + fieldtype: Link + label: Item + description: Specific product or material identifier that this putaway rule applies + to when determining storage locations + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: item_name + fieldtype: Data + label: Item Name + description: Item being assigned a putaway location rule for warehouse storage + placement. + - name: warehouse + fieldtype: Link + label: Warehouse + description: Warehouse facility where the putaway rule applies for incoming item + placement. + join_hint: + table: tabWarehouse + 'on': warehouse = tabWarehouse.name + - name: priority + fieldtype: Int + label: Priority + description: Execution order when multiple putaway rules match the same item and + warehouse combination. + - name: company + fieldtype: Link + label: Company + description: Identifies which company or business entity the putaway rule applies + to in multi-company environments. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: capacity + fieldtype: Float + label: Capacity + description: Maximum quantity or volume that can be stored in the location governed + by this putaway rule. + - name: uom + fieldtype: Link + label: UOM + description: Unit of measure for the capacity value, such as pallets, cases, kilograms, + or cubic meters. + join_hint: + table: tabUOM + 'on': uom = tabUOM.name + - name: conversion_factor + fieldtype: Float + label: Conversion Factor + description: Factor to convert between the putaway unit of measure and the stock + unit of measure for warehouse storage calculations. + - name: stock_uom + fieldtype: Link + label: Stock UOM + description: Unit of measure used for tracking inventory quantities in the warehouse + location. + join_hint: + table: tabUOM + 'on': stock_uom = tabUOM.name + - name: stock_capacity + fieldtype: Float + label: Capacity in Stock UOM + description: Maximum quantity of items that can be stored in the warehouse location + based on the stock unit of measure. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Putaway Rule document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabQuality Action + description: '' + fields: + - name: corrective_preventive + fieldtype: Select + label: Corrective/Preventive + description: Whether the quality action addresses an existing problem (corrective) + or prevents future occurrences (preventive) + options: + - Corrective + - Preventive + - name: review + fieldtype: Link + label: Review + description: Review notes, comments, or evaluation details documenting the assessment + or outcome of the quality action + join_hint: + table: tabQuality Review + 'on': review = tabQuality Review.name + - name: feedback + fieldtype: Link + label: Feedback + description: Comments or notes describing the corrective or preventive action + taken in response to a quality issue + join_hint: + table: tabQuality Feedback + 'on': feedback = tabQuality Feedback.name + - name: status + fieldtype: Select + label: Status + description: Current state of the quality action such as open, in progress, completed, + or closed + options: + - Open + - Completed + - name: date + fieldtype: Date + label: Date + description: When the quality action was recorded, initiated, or is due for completion + - name: goal + fieldtype: Link + label: Goal + description: Target or objective that the quality action aims to achieve or address + join_hint: + table: tabQuality Goal + 'on': goal = tabQuality Goal.name + - name: procedure + fieldtype: Link + label: Procedure + description: Steps or methods to be followed when executing the quality action + join_hint: + table: tabQuality Procedure + 'on': procedure = tabQuality Procedure.name + - name: resolutions + fieldtype: Table + label: Resolutions + description: '' + child_hint: + child_table: tabQuality Action Resolution + fieldname: resolutions + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: resolutions + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Quality Action document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabQuality Action Resolution + description: '' + fields: + - name: problem + fieldtype: Long Text + label: Problem + description: Description of the quality issue or defect identified, used when + analyzing root causes or searching for similar past problems. + - name: resolution + fieldtype: Text Editor + label: Resolution + description: Documented solution or corrective action taken, used when looking + up how quality issues were resolved or finding resolution patterns. + - name: status + fieldtype: Select + label: Status + description: Current state of the quality action resolution such as open, in progress, + completed, or closed. + options: + - Open + - Completed + - name: responsible + fieldtype: Link + label: Responsible + description: Person or team assigned to resolve or complete the quality action. + join_hint: + table: tabUser + 'on': responsible = tabUser.name + - name: completion_by + fieldtype: Date + label: Completion By + description: Target deadline or due date by which the quality action must be resolved. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabQuality Action + Resolution). Comparison-ready across parent records.' +- table: tabQuality Feedback + description: '' + fields: + - name: template + fieldtype: Link + label: Template + description: template + join_hint: + table: tabQuality Feedback Template + 'on': template = tabQuality Feedback Template.name + - name: document_type + fieldtype: Select + label: Type + description: document_type + options: + - User + - Customer + - name: document_name + fieldtype: Dynamic Link + label: Feedback By + description: Name or identifier of the quality feedback document or record being + referenced + - name: parameters + fieldtype: Table + label: Parameters + description: '' + child_hint: + child_table: tabQuality Feedback Parameter + fieldname: parameters + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: parameters + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Quality Feedback document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabQuality Feedback Parameter + description: '' + fields: + - name: parameter + fieldtype: Data + label: Parameter + description: Defines the measurable criterion or metric used to assess quality + performance against standards. + - name: rating + fieldtype: Select + label: Rating + description: Captures the score or evaluation result assigned to a quality parameter + during inspection or review processes. + options: + - '1' + - '2' + - '3' + - '4' + - '5' + - name: feedback + fieldtype: Text Editor + label: Feedback + description: Quality feedback comments or observations recorded about a product, + process, or service defect or issue + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabQuality Feedback + Parameter). Comparison-ready across parent records.' +- table: tabQuality Feedback Template + description: '' + fields: + - name: template + fieldtype: Data + label: Template Name + description: Actual content or structure of the quality feedback form including + questions, rating scales, and evaluation criteria + - name: parameters + fieldtype: Table + label: Parameters + description: '' + child_hint: + child_table: tabQuality Feedback Template Parameter + fieldname: parameters + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: parameters + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Quality Feedback Template document (master/transaction). + Use only for single-entity lookups, not cross-record comparison unless fields + are per-relationship (e.g. supplier, price_list).' +- table: tabQuality Feedback Template Parameter + description: '' + fields: + - name: parameter + fieldtype: Data + label: Parameter + description: Specific parameter or variable being measured or evaluated within + the quality feedback template + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabQuality Feedback + Template Parameter). Comparison-ready across parent records.' +- table: tabQuality Goal + description: '' + fields: + - name: goal + fieldtype: Data + label: Goal + description: Target quality metric or performance threshold used when evaluating + whether quality standards are being met. + - name: frequency + fieldtype: Select + label: Monitoring Frequency + description: How often the quality goal is measured or reviewed, used when scheduling + quality assessments and determining reporting periods. + options: + - None + - Daily + - Weekly + - Monthly + - Quarterly + - name: procedure + fieldtype: Link + label: Procedure + description: Quality control procedure or inspection method being tracked for + goal-setting and performance measurement + join_hint: + table: tabQuality Procedure + 'on': procedure = tabQuality Procedure.name + - name: weekday + fieldtype: Select + label: Weekday + description: Day of the week for scheduled quality inspections or recurring quality + goal targets + options: + - Monday + - Tuesday + - Wednesday + - Thursday + - Friday + - Saturday + - name: date + fieldtype: Select + label: Date + description: Specific calendar date when a quality goal is set, measured, or due + for achievement + options: + - '1' + - '2' + - '3' + - '4' + - '5' + - '6' + - '7' + - '8' + - '9' + - '10' + - '11' + - '12' + - '13' + - '14' + - '15' + - '16' + - '17' + - '18' + - '19' + - '20' + - '21' + - '22' + - '23' + - '24' + - '25' + - '26' + - '27' + - '28' + - '29' + - '30' + - name: objectives + fieldtype: Table + label: Objectives + description: '' + child_hint: + child_table: tabQuality Goal Objective + fieldname: objectives + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: objectives + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Quality Goal document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabQuality Goal Objective + description: '' + fields: + - name: objective + fieldtype: Text + label: Objective + description: Description of what the quality goal aims to achieve or measure in + terms of quality improvement or standards + - name: target + fieldtype: Data + label: Target + description: Numeric or measurable target value that the quality objective is + trying to reach or maintain + - name: uom + fieldtype: Link + label: UOM + description: Unit of measurement for the quality goal objective, such as percentage, + count, or defect rate. + join_hint: + table: tabUOM + 'on': uom = tabUOM.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabQuality Goal Objective). + Comparison-ready across parent records.' +- table: tabQuality Inspection + description: '' + fields: + - name: naming_series + fieldtype: Select + label: Series + description: Auto-numbering pattern for quality inspection documents, used when + searching or filtering inspections by series prefix or organizational unit. + options: + - MAT-QA-.YYYY.- + - name: company + fieldtype: Link + label: Company + description: Company entity that performed the quality inspection, used when filtering + inspection records by business unit or legal entity. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: report_date + fieldtype: Date + label: Report Date + description: Date when the quality inspection was reported or recorded. + - name: status + fieldtype: Select + label: Status + description: Current state of the quality inspection such as pending, approved, + rejected, or completed. + options: + - Accepted + - Rejected + - name: child_row_reference + fieldtype: Data + label: Child Row Reference + description: Links to detailed inspection line items or sub-records associated + with this quality inspection. + - name: inspection_type + fieldtype: Select + label: Inspection Type + description: Type of quality inspection performed such as incoming, in-process, + final, or audit inspection. + options: + - Incoming + - Outgoing + - In Process + - name: reference_type + fieldtype: Select + label: Reference Type + description: Category of the document or transaction being inspected such as Purchase + Receipt, Delivery Note, Stock Entry, or Job Card. + options: + - Purchase Receipt + - Purchase Invoice + - Subcontracting Receipt + - Delivery Note + - Sales Invoice + - Stock Entry + - Job Card + - name: reference_name + fieldtype: Dynamic Link + label: Reference Name + description: Specific document ID or transaction number of the item being inspected. + - name: item_code + fieldtype: Link + label: Item Code + description: Product or material identifier for the inspected item + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: item_serial_no + fieldtype: Link + label: Item Serial No + description: Unique serial number for individually tracked items undergoing quality + inspection + join_hint: + table: tabSerial No + 'on': item_serial_no = tabSerial No.name + - name: batch_no + fieldtype: Link + label: Batch No + description: Production batch or lot number for items inspected as a group + join_hint: + table: tabBatch + 'on': batch_no = tabBatch.name + - name: sample_size + fieldtype: Float + label: Sample Size + description: Number of units or quantity selected from a batch for quality inspection + testing + - name: item_name + fieldtype: Data + label: Item Name + description: Name or identifier of the product or material being inspected for + quality + - name: description + fieldtype: Small Text + label: Description + description: Detailed notes or findings about the quality inspection results, + defects, or observations + - name: bom_no + fieldtype: Link + label: BOM No + description: Bill of materials number associated with the inspected item or production + batch. + join_hint: + table: tabBOM + 'on': bom_no = tabBOM.name + - name: quality_inspection_template + fieldtype: Link + label: Quality Inspection Template + description: Template defining the inspection criteria, parameters, and standards + applied to this quality check. + join_hint: + table: tabQuality Inspection Template + 'on': quality_inspection_template = tabQuality Inspection Template.name + - name: manual_inspection + fieldtype: Check + label: Manual Inspection + description: Indicates whether the inspection was performed manually by personnel + rather than through automated systems. + - name: readings + fieldtype: Table + label: Readings + description: '' + child_hint: + child_table: tabQuality Inspection Reading + fieldname: readings + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: readings + - name: inspected_by + fieldtype: Link + label: Inspected By + description: Person who performed the quality inspection and collected the readings + join_hint: + table: tabUser + 'on': inspected_by = tabUser.name + - name: verified_by + fieldtype: Data + label: Verified By + description: Person who reviewed and approved the inspection results after initial + inspection + - name: remarks + fieldtype: Text + label: Remarks + description: Additional notes or comments about the quality inspection results, + issues found, or special observations + - name: amended_from + fieldtype: Link + label: Amended From + description: Reference to the original quality inspection document that this record + corrects or replaces + join_hint: + table: tabQuality Inspection + 'on': amended_from = tabQuality Inspection.name + - name: letter_head + fieldtype: Link + label: Letter Head + description: Company letterhead template used when printing or emailing the quality + inspection report + join_hint: + table: tabLetter Head + 'on': letter_head = tabLetter Head.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Quality Inspection document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabQuality Inspection Parameter + description: '' + fields: + - name: parameter + fieldtype: Data + label: Parameter + description: Specific quality metric or characteristic being measured during inspection + processes. + - name: parameter_group + fieldtype: Link + label: Parameter Group + description: Category or classification grouping related quality parameters together + for organizational purposes. + join_hint: + table: tabQuality Inspection Parameter Group + 'on': parameter_group = tabQuality Inspection Parameter Group.name + - name: description + fieldtype: Text Editor + label: Description + description: Detailed explanation or specification of the quality inspection parameter + being measured or evaluated + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Quality Inspection Parameter document (master/transaction). + Use only for single-entity lookups, not cross-record comparison unless fields + are per-relationship (e.g. supplier, price_list).' +- table: tabQuality Inspection Parameter Group + description: '' + fields: + - name: group_name + fieldtype: Data + label: Parameter Group Name + description: description + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Quality Inspection Parameter Group document (master/transaction). + Use only for single-entity lookups, not cross-record comparison unless fields + are per-relationship (e.g. supplier, price_list).' +- table: tabQuality Inspection Reading + description: '' + fields: + - name: specification + fieldtype: Link + label: Parameter + description: The quality standard, requirement, or acceptance criteria being measured + or verified in this inspection reading + join_hint: + table: tabQuality Inspection Parameter + 'on': specification = tabQuality Inspection Parameter.name + - name: parameter_group + fieldtype: Link + label: Parameter Group + description: Category or grouping that organizes related inspection parameters + or measurements together + join_hint: + table: tabQuality Inspection Parameter Group + 'on': parameter_group = tabQuality Inspection Parameter Group.name + - name: status + fieldtype: Select + label: Status + description: Indicates whether the quality inspection reading passed, failed, + or is pending review. + options: + - Accepted + - Rejected + - name: value + fieldtype: Data + label: Acceptance Criteria Value + description: The actual recorded measurement or observation from the quality inspection, + which may be text, numeric, or categorical. + - name: numeric + fieldtype: Check + label: Numeric + description: The numerical representation of the inspection reading value, used + when the measurement is quantitative rather than qualitative. + - name: manual_inspection + fieldtype: Check + label: Manual Inspection + description: Whether the quality inspection reading requires manual verification + or measurement by an inspector rather than automated testing. + - name: min_value + fieldtype: Float + label: Minimum Value + description: The minimum acceptable threshold or lower specification limit for + this quality inspection measurement. + - name: max_value + fieldtype: Float + label: Maximum Value + description: The maximum acceptable threshold or upper specification limit for + this quality inspection measurement. + - name: formula_based_criteria + fieldtype: Check + label: Formula Based Criteria + description: Indicates whether the quality inspection uses a formula to determine + pass/fail rather than simple threshold values. + - name: acceptance_formula + fieldtype: Code + label: Acceptance Criteria Formula + description: The formula expression used to calculate whether an inspection reading + meets acceptance criteria. + - name: reading_value + fieldtype: Data + label: Reading Value + description: The actual measured or recorded value from the quality inspection + test or measurement. + - name: reading_1 + fieldtype: Data + label: Reading 1 + description: First measurement value recorded during quality inspection for a + specific parameter or characteristic. + - name: reading_2 + fieldtype: Data + label: Reading 2 + description: Second measurement value recorded during quality inspection for a + specific parameter or characteristic. + - name: reading_3 + fieldtype: Data + label: Reading 3 + description: Third measurement value recorded during quality inspection for a + specific parameter or characteristic. + - name: reading_4 + fieldtype: Data + label: Reading 4 + description: Fourth measurement value recorded during quality inspection for multi-point + testing scenarios. + - name: reading_5 + fieldtype: Data + label: Reading 5 + description: Fifth measurement value recorded during quality inspection for multi-point + testing scenarios. + - name: reading_6 + fieldtype: Data + label: Reading 6 + description: Sixth measurement value recorded during quality inspection for multi-point + testing scenarios. + - name: reading_7 + fieldtype: Data + label: Reading 7 + description: Seventh measurement value recorded during quality inspection for + multi-point testing scenarios + - name: reading_8 + fieldtype: Data + label: Reading 8 + description: Eighth measurement value recorded during quality inspection for multi-point + testing scenarios + - name: reading_9 + fieldtype: Data + label: Reading 9 + description: Ninth measurement value recorded during quality inspection for multi-point + testing scenarios + - name: reading_10 + fieldtype: Data + label: Reading 10 + description: The tenth measurement value recorded during a quality inspection, + used when users ask about the 10th reading or measurement in a multi-point inspection + sequence. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabQuality Inspection + Reading). Comparison-ready across parent records.' +- table: tabQuality Inspection Template + description: '' + fields: + - name: quality_inspection_template_name + fieldtype: Data + label: Quality Inspection Template Name + description: The descriptive title or label of the quality inspection template + used when searching or referencing specific inspection procedures + - name: item_quality_inspection_parameter + fieldtype: Table + label: Item Quality Inspection Parameter + description: '' + child_hint: + child_table: tabItem Quality Inspection Parameter + fieldname: item_quality_inspection_parameter + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: item_quality_inspection_parameter + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Quality Inspection Template document (master/transaction). + Use only for single-entity lookups, not cross-record comparison unless fields + are per-relationship (e.g. supplier, price_list).' +- table: tabQuality Meeting + description: '' + fields: + - name: status + fieldtype: Select + label: Status + description: Current state of the quality meeting such as scheduled, completed, + or cancelled + options: + - Open + - Closed + - name: agenda + fieldtype: Table + label: Agenda + description: '' + child_hint: + child_table: tabQuality Meeting Agenda + fieldname: agenda + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: agenda + - name: minutes + fieldtype: Table + label: Minutes + description: '' + child_hint: + child_table: tabQuality Meeting Minutes + fieldname: minutes + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: minutes + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Quality Meeting document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabQuality Meeting Agenda + description: '' + fields: + - name: agenda + fieldtype: Text Editor + label: Agenda + description: Detailed content or topics to be discussed in the quality meeting + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabQuality Meeting + Agenda). Comparison-ready across parent records.' +- table: tabQuality Meeting Minutes + description: '' + fields: + - name: document_type + fieldtype: Select + label: Document Type + description: Category or classification of the quality meeting document (e.g., + audit, review, inspection) + options: + - Quality Review + - Quality Action + - Quality Feedback + - name: document_name + fieldtype: Dynamic Link + label: Document Name + description: File name or descriptive title of the attached quality meeting minutes + document + - name: minute + fieldtype: Text Editor + label: Minute + description: The detailed notes, discussion points, action items, and decisions + recorded during the quality meeting + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabQuality Meeting + Minutes). Comparison-ready across parent records.' +- table: tabQuality Procedure + description: '' + fields: + - name: quality_procedure_name + fieldtype: Data + label: Quality Procedure + description: Full descriptive name of the quality procedure used when searching + by procedure title or description + - name: process_owner + fieldtype: Link + label: Process Owner + description: Person or role responsible for managing and overseeing the quality + procedure + join_hint: + table: tabUser + 'on': process_owner = tabUser.name + - name: process_owner_full_name + fieldtype: Data + label: Process Owner Full Name + description: Full name of the person responsible for the quality procedure, used + when searching by owner or accountability. + - name: processes + fieldtype: Table + label: Processes + description: '' + child_hint: + child_table: tabQuality Procedure Process + fieldname: processes + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: processes + - name: parent_quality_procedure + fieldtype: Link + label: Parent Procedure + description: Links to a higher-level quality procedure when this is a sub-procedure + or nested component, used for hierarchical procedure navigation. + join_hint: + table: tabQuality Procedure + 'on': parent_quality_procedure = tabQuality Procedure.name + - name: is_group + fieldtype: Check + label: Is Group + description: Indicates whether this quality procedure is a parent grouping container + for organizing other procedures rather than an individual executable procedure. + - name: rgt + fieldtype: Int + label: Right Index + description: Right boundary value in nested set model for hierarchical quality + procedure tree traversal and ancestor-descendant queries. + - name: lft + fieldtype: Int + label: Left Index + description: Left boundary value in nested set model for hierarchical quality + procedure tree traversal and ancestor-descendant queries. + - name: old_parent + fieldtype: Data + label: old_parent + description: Previous parent quality procedure before reassignment or hierarchy + change, used when tracking procedure reorganization history or auditing what + the prior parent procedure was. + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Quality Procedure document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabQuality Procedure Process + description: '' + fields: + - name: process_description + fieldtype: Text Editor + label: Process Description + description: Detailed explanation of what happens during this quality procedure + process step, including actions, requirements, and expected outcomes + - name: procedure + fieldtype: Link + label: Sub Procedure + description: Reference to the parent quality procedure that this process belongs + to or implements + join_hint: + table: tabQuality Procedure + 'on': procedure = tabQuality Procedure.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabQuality Procedure + Process). Comparison-ready across parent records.' +- table: tabQuality Review + description: '' + fields: + - name: goal + fieldtype: Link + label: Goal + description: Defines the target objective or performance standard being evaluated + during the quality review process. + join_hint: + table: tabQuality Goal + 'on': goal = tabQuality Goal.name + - name: date + fieldtype: Date + label: Date + description: Specifies when the quality review was conducted or scheduled, used + for tracking review timing and historical analysis. + - name: procedure + fieldtype: Link + label: Procedure + description: The quality control procedure or inspection method being followed + during the review process. + join_hint: + table: tabQuality Procedure + 'on': procedure = tabQuality Procedure.name + - name: status + fieldtype: Select + label: Status + description: Current state of the quality review such as pending, approved, rejected, + or in progress. + options: + - Open + - Passed + - Failed + - name: reviews + fieldtype: Table + label: Reviews + description: '' + child_hint: + child_table: tabQuality Review Objective + fieldname: reviews + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: reviews + - name: additional_information + fieldtype: Text + label: Additional Information + description: Free-text notes or supplementary details about the quality review + that don't fit in structured fields. + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Quality Review document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabQuality Review Objective + description: '' + fields: + - name: objective + fieldtype: Text + label: Objective + description: Description of what quality aspect or goal is being evaluated or + measured in the review + - name: target + fieldtype: Data + label: Target + description: Desired outcome, benchmark value, or performance threshold the quality + review objective aims to achieve + - name: uom + fieldtype: Link + label: UOM + description: Unit of measurement for the quality review objective, such as percentage, + count, or defect rate. + join_hint: + table: tabUOM + 'on': uom = tabUOM.name + - name: status + fieldtype: Select + label: Status + description: Current state of the quality review objective, such as active, completed, + or pending. + options: + - Open + - Passed + - Failed + - name: review + fieldtype: Text Editor + label: Review + description: The quality review process or assessment that this objective belongs + to or is being evaluated under. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabQuality Review + Objective). Comparison-ready across parent records.' +- table: tabQuery Parameters + description: '' + fields: + - name: key + fieldtype: Data + label: Key + description: Parameter name or variable identifier, used when filtering or searching + for specific query parameters by name. + - name: value + fieldtype: Data + label: Value + description: Actual value assigned to the query parameter, used when analyzing + parameter settings or filtering by parameter values. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabQuery Parameters). + Comparison-ready across parent records.' +- table: tabQuotation + description: '' + fields: + - name: title + fieldtype: Data + label: Title + description: Customer or prospect name associated with the quotation + - name: naming_series + fieldtype: Select + label: Series + description: Prefix pattern used to generate the quotation number + options: + - SAL-QTN-.YYYY.- + - name: quotation_to + fieldtype: Link + label: Quotation To + description: Specifies whether the quotation is issued to a customer, lead, or + prospect entity type. + join_hint: + table: tabDocType + 'on': quotation_to = tabDocType.name + - name: party_name + fieldtype: Dynamic Link + label: Party + description: The unique identifier or code of the entity receiving the quotation + (customer ID, lead ID, or prospect ID). + - name: customer_name + fieldtype: Data + label: Customer Name + description: The display name of the customer, lead, or prospect receiving the + quotation. + - name: transaction_date + fieldtype: Date + label: Date + description: Date when the quotation was created or issued to the customer. + - name: valid_till + fieldtype: Date + label: Valid Till + description: Expiration date until which the quoted prices and terms remain valid + for customer acceptance. + - name: order_type + fieldtype: Select + label: Order Type + description: Category or classification of the quotation such as standard sale, + service, project-based, or custom order type. + options: + - Sales + - Maintenance + - Shopping Cart + - name: company + fieldtype: Link + label: Company + description: The company entity that issued or owns this quotation. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: has_unit_price_items + fieldtype: Check + label: Has Unit Price Items + description: Indicates whether this quotation includes line items with individual + unit pricing. + - name: amended_from + fieldtype: Link + label: Amended From + description: References the original quotation that this quotation amends or revises. + join_hint: + table: tabQuotation + 'on': amended_from = tabQuotation.name + - name: currency + fieldtype: Link + label: Currency + description: Currency in which the quotation prices and amounts are denominated + join_hint: + table: tabCurrency + 'on': currency = tabCurrency.name + - name: conversion_rate + fieldtype: Float + label: Exchange Rate + description: Exchange rate used to convert quotation amounts from the quotation + currency to the base company currency + - name: selling_price_list + fieldtype: Link + label: Price List + description: Price list applied to determine item rates and pricing rules for + this quotation + join_hint: + table: tabPrice List + 'on': selling_price_list = tabPrice List.name + - name: price_list_currency + fieldtype: Link + label: Price List Currency + description: Currency in which the quotation prices are listed and displayed to + the customer. + join_hint: + table: tabCurrency + 'on': price_list_currency = tabCurrency.name + - name: plc_conversion_rate + fieldtype: Float + label: Price List Exchange Rate + description: Exchange rate used to convert price list currency amounts to the + quotation's base currency. + - name: ignore_pricing_rule + fieldtype: Check + label: Ignore Pricing Rule + description: Indicates whether automatic pricing rules and discounts are bypassed + for this quotation. + - name: scan_barcode + fieldtype: Data + label: Scan Barcode + description: Barcode scanned or associated with the quotation for tracking or + identification purposes. + - name: last_scanned_warehouse + fieldtype: Data + label: Last Scanned Warehouse + description: Warehouse location where the quotation or its items were most recently + scanned. + - name: items + fieldtype: Table + label: Items + description: '' + child_hint: + child_table: tabQuotation Item + fieldname: items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: items + - name: total_qty + fieldtype: Float + label: Total Quantity + description: Total quantity of all items in the quotation across all line items + - name: total_net_weight + fieldtype: Float + label: Total Net Weight + description: Combined net weight of all items in the quotation + - name: base_total + fieldtype: Currency + label: Total (Company Currency) + description: Quotation subtotal in base currency before taxes, discounts, and + shipping charges + - name: base_net_total + fieldtype: Currency + label: Net Total (Company Currency) + description: Net total amount in company's base currency before taxes, used when + analyzing quotation values across multiple currencies. + - name: total + fieldtype: Currency + label: Total + description: Final quotation amount including all taxes, discounts, and charges, + used when asking about the complete quotation value the customer sees. + - name: net_total + fieldtype: Currency + label: Net Total + description: Subtotal amount in quotation currency after discounts but before + taxes, used when asking about pre-tax quotation value. + - name: tax_category + fieldtype: Link + label: Tax Category + description: Tax classification applied to the quotation determining which tax + rules apply based on customer type, location, or product category. + join_hint: + table: tabTax Category + 'on': tax_category = tabTax Category.name + - name: taxes_and_charges + fieldtype: Link + label: Sales Taxes and Charges Template + description: Specific tax template or charge configuration defining the actual + tax rates, accounts, and calculation methods applied to this quotation. + join_hint: + table: tabSales Taxes and Charges Template + 'on': taxes_and_charges = tabSales Taxes and Charges Template.name + - name: shipping_rule + fieldtype: Link + label: Shipping Rule + description: Shipping cost calculation rule applied to determine freight charges + based on order value, weight, or destination. + join_hint: + table: tabShipping Rule + 'on': shipping_rule = tabShipping Rule.name + - name: incoterm + fieldtype: Link + label: Incoterm + description: Shipping terms code defining buyer and seller responsibilities for + delivery, risk, and costs (e.g., FOB, CIF, EXW). + join_hint: + table: tabIncoterm + 'on': incoterm = tabIncoterm.name + - name: named_place + fieldtype: Data + label: Named Place + description: Specific location associated with the incoterm where risk and cost + transfer occurs (port, warehouse, or delivery address). + - name: taxes + fieldtype: Table + label: Sales Taxes and Charges + description: '' + child_hint: + child_table: tabSales Taxes and Charges + fieldname: taxes + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: taxes + - name: base_total_taxes_and_charges + fieldtype: Currency + label: Total Taxes and Charges (Company Currency) + description: Total amount of all taxes and charges in base currency before any + currency conversion or exchange rate adjustments. + - name: total_taxes_and_charges + fieldtype: Currency + label: Total Taxes and Charges + description: Total amount of all taxes and charges in the quotation's transaction + currency after applying exchange rates. + - name: base_grand_total + fieldtype: Currency + label: Grand Total (Company Currency) + description: Final total amount of the quotation including all items, taxes, and + charges in base currency before currency conversion. + - name: base_rounding_adjustment + fieldtype: Currency + label: Rounding Adjustment (Company Currency) + description: Amount added or subtracted to round the quotation total to a convenient + number in base currency. + - name: base_rounded_total + fieldtype: Currency + label: Rounded Total (Company Currency) + description: Final quotation total after applying rounding adjustment in base + currency. + - name: base_in_words + fieldtype: Data + label: In Words (Company Currency) + description: Text representation of the quotation total amount in base currency, + typically used for formal quotation documents. + - name: grand_total + fieldtype: Currency + label: Grand Total + description: Total quotation amount before any rounding adjustments are applied. + - name: rounding_adjustment + fieldtype: Currency + label: Rounding Adjustment + description: Amount added or subtracted to round the grand total to a convenient + figure. + - name: rounded_total + fieldtype: Currency + label: Rounded Total + description: Final quotation amount after applying rounding adjustment to the + grand total. + - name: disable_rounded_total + fieldtype: Check + label: Disable Rounded Total + description: Whether the quotation total should be displayed without rounding + to the nearest whole number. + - name: in_words + fieldtype: Data + label: In Words + description: The quotation total amount expressed as text words rather than numeric + digits. + - name: apply_discount_on + fieldtype: Select + label: Apply Additional Discount On + description: Whether discounts are calculated on the grand total or on individual + line items in the quotation. + options: + - Grand Total + - Net Total + - name: base_discount_amount + fieldtype: Currency + label: Additional Discount Amount (Company Currency) + description: Discount amount applied before any additional discounts or coupons, + used when calculating the initial price reduction on the quotation. + - name: coupon_code + fieldtype: Link + label: Coupon Code + description: Promotional or marketing code entered by customer to receive special + discounts or offers on the quotation. + join_hint: + table: tabCoupon Code + 'on': coupon_code = tabCoupon Code.name + - name: additional_discount_percentage + fieldtype: Float + label: Additional Discount Percentage + description: Extra percentage discount applied on top of base discounts, typically + for negotiated deals or special customer pricing. + - name: discount_amount + fieldtype: Currency + label: Additional Discount Amount + description: Total discount value applied to the quotation in currency units, + used when asking about discount totals or quotation price reductions. + - name: referral_sales_partner + fieldtype: Link + label: Referral Sales Partner + description: External partner or agent who referred the customer for this quotation, + used when tracking partner-sourced opportunities or commission eligibility. + join_hint: + table: tabSales Partner + 'on': referral_sales_partner = tabSales Partner.name + - name: other_charges_calculation + fieldtype: Text Editor + label: Taxes and Charges Calculation + description: Additional fees or charges beyond line items such as handling fees, + setup costs, or miscellaneous charges added to the quotation total. + - name: packed_items + fieldtype: Table + label: Bundle Items + description: '' + child_hint: + child_table: tabPacked Item + fieldname: packed_items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: packed_items + - name: pricing_rules + fieldtype: Table + label: Pricing Rule Detail + description: '' + child_hint: + child_table: tabPricing Rule Detail + fieldname: pricing_rules + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: pricing_rules + - name: customer_address + fieldtype: Link + label: Customer Address + description: Delivery or billing address associated with the customer for this + quotation. + join_hint: + table: tabAddress + 'on': customer_address = tabAddress.name + - name: address_display + fieldtype: Small Text + label: Address + description: Formatted address of the customer or prospect receiving the quotation. + - name: contact_person + fieldtype: Link + label: Contact Person + description: Name or identifier of the individual at the customer organization + who is the primary contact for this quotation. + join_hint: + table: tabContact + 'on': contact_person = tabContact.name + - name: contact_display + fieldtype: Small Text + label: Contact + description: Formatted display name and details of the contact person associated + with this quotation. + - name: contact_mobile + fieldtype: Small Text + label: Mobile No + description: Mobile phone number of the customer contact person for this quotation + - name: contact_email + fieldtype: Data + label: Contact Email + description: Email address of the customer contact person for this quotation + - name: shipping_address_name + fieldtype: Link + label: Shipping Address + description: Name or label identifying the delivery location for quoted items + join_hint: + table: tabAddress + 'on': shipping_address_name = tabAddress.name + - name: shipping_address + fieldtype: Small Text + label: Shipping Address + description: Address where quoted goods will be delivered if the quotation is + accepted and converted to an order. + - name: company_address + fieldtype: Link + label: Company Address Name + description: Address of the company issuing the quotation, used as the sender + or return address. + join_hint: + table: tabAddress + 'on': company_address = tabAddress.name + - name: company_address_display + fieldtype: Small Text + label: Company Address + description: Formatted version of the company address for display on printed quotations + and customer-facing documents. + - name: company_contact_person + fieldtype: Link + label: Company Contact Person + description: The internal employee or representative from the selling company + who is responsible for this quotation. + join_hint: + table: tabContact + 'on': company_contact_person = tabContact.name + - name: payment_terms_template + fieldtype: Link + label: Payment Terms Template + description: The predefined payment terms template applied to this quotation, + such as Net 30 or COD. + join_hint: + table: tabPayment Terms Template + 'on': payment_terms_template = tabPayment Terms Template.name + - name: payment_schedule + fieldtype: Table + label: Payment Schedule + description: '' + child_hint: + child_table: tabPayment Schedule + fieldname: payment_schedule + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: payment_schedule + - name: tc_name + fieldtype: Link + label: Terms + description: Name of the terms and conditions template applied to the quotation + join_hint: + table: tabTerms and Conditions + 'on': tc_name = tabTerms and Conditions.name + - name: terms + fieldtype: Text Editor + label: Term Details + description: Full text of the terms and conditions or special clauses included + in the quotation + - name: auto_repeat + fieldtype: Link + label: Auto Repeat + description: Whether this quotation is set to automatically recur or regenerate + on a schedule + join_hint: + table: tabAuto Repeat + 'on': auto_repeat = tabAuto Repeat.name + - name: letter_head + fieldtype: Link + label: Letter Head + description: Letterhead template used when printing or emailing this quotation + join_hint: + table: tabLetter Head + 'on': letter_head = tabLetter Head.name + - name: group_same_items + fieldtype: Check + label: Group same items + description: Whether identical items are consolidated into single lines on the + printed quotation + - name: select_print_heading + fieldtype: Link + label: Print Heading + description: Custom heading text that appears at the top of the printed quotation + document + join_hint: + table: tabPrint Heading + 'on': select_print_heading = tabPrint Heading.name + - name: language + fieldtype: Data + label: Print Language + description: Language in which the quotation document is written or will be presented + to the customer. + - name: lost_reasons + fieldtype: Table MultiSelect + label: Lost Reasons + description: Reasons why the quotation was not converted to a sale or why the + deal was lost. + child_hint: + child_table: tabQuotation Lost Reason Detail + fieldname: lost_reasons + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: lost_reasons + - name: competitors + fieldtype: Table MultiSelect + label: Competitors + description: Competing companies or vendors that the customer is considering as + alternatives to this quotation. + child_hint: + child_table: tabCompetitor Detail + fieldname: competitors + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: competitors + - name: order_lost_reason + fieldtype: Small Text + label: Detailed Reason + description: Reason why the quotation was lost or not converted to a sales order, + used when analyzing why deals failed. + - name: status + fieldtype: Select + label: Status + description: Current state of the quotation such as draft, submitted, accepted, + or lost, used to filter quotations by their progress stage. + options: + - Draft + - Open + - Replied + - Partially Ordered + - Ordered + - Lost + - Cancelled + - Expired + - name: customer_group + fieldtype: Link + label: Customer Group + description: Classification or category of the customer receiving the quotation, + used to segment quotations by customer type or market segment. + join_hint: + table: tabCustomer Group + 'on': customer_group = tabCustomer Group.name + - name: territory + fieldtype: Link + label: Territory + description: Geographic sales region or area assigned to the quotation for tracking + regional sales performance and assignments + join_hint: + table: tabTerritory + 'on': territory = tabTerritory.name + - name: campaign + fieldtype: Link + label: Campaign + description: Marketing campaign that generated or is associated with this quotation + for tracking campaign effectiveness + join_hint: + table: tabCampaign + 'on': campaign = tabCampaign.name + - name: source + fieldtype: Link + label: Source + description: Origin or channel through which the quotation request was received, + such as website, referral, or direct contact + join_hint: + table: tabLead Source + 'on': source = tabLead Source.name + - name: opportunity + fieldtype: Link + label: Opportunity + description: Sales opportunity or lead associated with this quotation for tracking + potential deals. + join_hint: + table: tabOpportunity + 'on': opportunity = tabOpportunity.name + - name: supplier_quotation + fieldtype: Link + label: Supplier Quotation + description: Indicates this is a quotation received from a supplier rather than + sent to a customer. + join_hint: + table: tabSupplier Quotation + 'on': supplier_quotation = tabSupplier Quotation.name + - name: enq_det + fieldtype: Text + label: Opportunity Item + description: Reference to the enquiry or request for quotation that prompted this + quotation. + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Quotation document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabQuotation Item + description: '' + fields: + - name: item_code + fieldtype: Link + label: Item Code + description: The seller's internal product or service identifier for the quoted + item + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: customer_item_code + fieldtype: Data + label: Customer's Item Code + description: The customer's own product identifier or part number for the quoted + item, used when customer references items by their internal codes + - name: item_name + fieldtype: Data + label: Item Name + description: Product or service code being quoted to the customer + - name: description + fieldtype: Text Editor + label: Description + description: Detailed specification or additional information about the quoted + item beyond its name + - name: item_group + fieldtype: Link + label: Item Group + description: Product category or classification for the quoted item used for grouping + and filtering + join_hint: + table: tabItem Group + 'on': item_group = tabItem Group.name + - name: brand + fieldtype: Link + label: Brand + description: Brand or manufacturer name of the quoted item, used when filtering + or searching quotations by product brand. + join_hint: + table: tabBrand + 'on': brand = tabBrand.name + - name: qty + fieldtype: Float + label: Quantity + description: Quantity of the item being quoted, used when asking about volumes, + amounts, or total units in quotation line items. + - name: stock_uom + fieldtype: Link + label: Stock UOM + description: Base unit of measure for the item in inventory (e.g., pieces, kg) + used when asking about standard stock units regardless of quotation UOM. + join_hint: + table: tabUOM + 'on': stock_uom = tabUOM.name + - name: uom + fieldtype: Link + label: UOM + description: Unit of measure for this specific quotation line (e.g., box, dozen) + used when asking about quoted quantities or pricing units that may differ from + stock units. + join_hint: + table: tabUOM + 'on': uom = tabUOM.name + - name: conversion_factor + fieldtype: Float + label: UOM Conversion Factor + description: Multiplier to convert the quotation UOM to stock UOM used when asking + how many stock units equal one quotation unit. + - name: stock_qty + fieldtype: Float + label: Qty as per Stock UOM + description: Quantity available in stock at the time of quotation creation, used + when checking if quoted items can be fulfilled from current inventory. + - name: actual_qty + fieldtype: Float + label: Qty (Warehouse) + description: Real-time quantity currently available in warehouse, used when verifying + current stock levels against quoted amounts. + - name: company_total_stock + fieldtype: Float + label: Qty (Company) + description: Total quantity available across all warehouses company-wide, used + when checking overall inventory availability beyond single warehouse. + - name: price_list_rate + fieldtype: Currency + label: Price List Rate + description: Price per unit from the price list in the quotation's currency, before + any discounts or margins are applied. + - name: base_price_list_rate + fieldtype: Currency + label: Price List Rate (Company Currency) + description: Price per unit from the price list converted to the company's base + currency for standardized reporting. + - name: margin_type + fieldtype: Select + label: Margin Type + description: Whether margin is calculated as a percentage or fixed amount on top + of the rate. + options: + - Percentage + - Amount + - name: margin_rate_or_amount + fieldtype: Float + label: Margin Rate or Amount + description: Margin added to the base rate, either as a percentage or fixed amount, + used when calculating profitability or markup on quoted items. + - name: rate_with_margin + fieldtype: Currency + label: Rate With Margin + description: Final rate after applying margin to the base rate, representing the + actual quoted price per unit before discounts. + - name: discount_percentage + fieldtype: Percent + label: Discount (%) on Price List Rate with Margin + description: Percentage discount applied to reduce the quoted price, used when + analyzing price reductions or promotional offers. + - name: discount_amount + fieldtype: Currency + label: Discount Amount + description: Total discount applied to this quotation line item, used when asking + about discounts given on specific quoted products or services. + - name: distributed_discount_amount + fieldtype: Currency + label: Distributed Discount Amount + description: Portion of header-level or distributed discount allocated to this + line item, used when analyzing how overall quotation discounts are spread across + items. + - name: base_rate_with_margin + fieldtype: Currency + label: Rate With Margin (Company Currency) + description: Unit price including margin before discounts, used when asking about + pricing with profit margin factored in but before any discount reductions. + - name: rate + fieldtype: Currency + label: Rate + description: Price per unit of the item before applying any discounts or additional + charges on the quotation line. + - name: net_rate + fieldtype: Currency + label: Net Rate + description: Final price per unit after applying discounts, pricing rules, or + other adjustments to the base rate. + - name: amount + fieldtype: Currency + label: Amount + description: Total line value calculated from quantity and net rate, representing + the final extended price for this quotation item. + - name: net_amount + fieldtype: Currency + label: Net Amount + description: Total amount for this quotation line item after applying discounts + but before taxes. + - name: item_tax_template + fieldtype: Link + label: Item Tax Template + description: Tax template applied to this quotation item defining which tax rates + and rules apply. + join_hint: + table: tabItem Tax Template + 'on': item_tax_template = tabItem Tax Template.name + - name: base_rate + fieldtype: Currency + label: Rate (Company Currency) + description: Unit price of the item in the company's base currency before any + discounts or taxes. + - name: base_net_rate + fieldtype: Currency + label: Net Rate (Company Currency) + description: Unit price after applying discounts but before taxes, in company + base currency. + - name: base_amount + fieldtype: Currency + label: Amount (Company Currency) + description: Total line amount before discounts and taxes, in company base currency. + - name: base_net_amount + fieldtype: Currency + label: Net Amount (Company Currency) + description: Total line amount after applying discounts but before taxes, in company + base currency. + - name: pricing_rules + fieldtype: Small Text + label: Pricing Rules + description: Identifies which pricing rule was applied to calculate this quotation + item's price or discount. + - name: stock_uom_rate + fieldtype: Currency + label: Rate of Stock UOM + description: Price per unit in the item's base stock unit of measure, before quantity + or UOM conversions. + - name: is_free_item + fieldtype: Check + label: Is Free Item + description: Indicates whether this item is provided at no charge as part of a + promotion or bundle. + - name: is_alternative + fieldtype: Check + label: Is Alternative + description: Indicates this quotation item is offered as an alternative option + rather than a primary item. + - name: has_alternative_item + fieldtype: Check + label: Has Alternative Item + description: Indicates this quotation item has one or more alternative items associated + with it. + - name: valuation_rate + fieldtype: Currency + label: Valuation Rate + description: Cost or internal valuation rate of the item used for margin calculations, + distinct from the selling price shown to customers. + - name: gross_profit + fieldtype: Currency + label: Gross Profit + description: Profit margin or amount calculated for this quotation line item, + used when analyzing profitability or pricing strategy of quoted products. + - name: weight_per_unit + fieldtype: Float + label: Weight Per Unit + description: Weight of a single unit of the quoted item, used when calculating + shipping costs or comparing product specifications per unit. + - name: total_weight + fieldtype: Float + label: Total Weight + description: Combined weight of all units in this quotation line, used when determining + total shipping weight or logistics requirements for the quoted quantity. + - name: weight_uom + fieldtype: Link + label: Weight UOM + description: Unit of measurement for the quoted item's weight (e.g., kg, lbs) + used when users ask about weight specifications or shipping calculations. + join_hint: + table: tabUOM + 'on': weight_uom = tabUOM.name + - name: warehouse + fieldtype: Link + label: Warehouse + description: Warehouse location from which the quoted item will be fulfilled, + relevant when users ask about stock availability or delivery source for quotations. + join_hint: + table: tabWarehouse + 'on': warehouse = tabWarehouse.name + - name: against_blanket_order + fieldtype: Check + label: Against Blanket Order + description: Indicates whether this quotation item is linked to an existing blanket + purchase order, used when users ask about items quoted under long-term or framework + agreements. + - name: blanket_order + fieldtype: Link + label: Blanket Order + description: Reference to a blanket order agreement when this quotation item is + linked to a pre-negotiated bulk purchase arrangement. + join_hint: + table: tabBlanket Order + 'on': blanket_order = tabBlanket Order.name + - name: blanket_order_rate + fieldtype: Currency + label: Blanket Order Rate + description: Pre-negotiated price from the blanket order agreement applied to + this quotation item. + - name: prevdoc_doctype + fieldtype: Link + label: Against Doctype + description: Type of the previous document that generated or is linked to this + quotation item, such as Opportunity or Lead. + join_hint: + table: tabDocType + 'on': prevdoc_doctype = tabDocType.name + - name: prevdoc_docname + fieldtype: Dynamic Link + label: Against Docname + description: Reference to the previous document that generated this quotation + item, such as an opportunity or lead identifier. + - name: projected_qty + fieldtype: Float + label: Projected Qty + description: Expected available quantity of the item considering current stock + and planned production or procurement. + - name: item_tax_rate + fieldtype: Code + label: Item Tax Rate + description: Tax rate percentage applied specifically to this quotation line item. + - name: additional_notes + fieldtype: Text + label: Additional Notes + description: Free-text notes or comments specific to this quotation line item, + used when users ask about special instructions, remarks, or additional details + for individual quoted items. + - name: page_break + fieldtype: Check + label: Page Break + description: Controls whether a page break occurs before this quotation item when + printing or generating PDF documents, relevant when users ask about quotation + formatting or print layout. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabQuotation Item). + Comparison-ready across parent records.' +- table: tabQuotation Lost Reason + description: '' + fields: + - name: order_lost_reason + fieldtype: Data + label: Quotation Lost Reason + description: The actual reason why a quotation was lost, used for analyzing patterns + in lost sales opportunities and improving win rates. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Quotation Lost Reason document (master/transaction). Use + only for single-entity lookups, not cross-record comparison unless fields are + per-relationship (e.g. supplier, price_list).' +- table: tabQuotation Lost Reason Detail + description: '' + fields: + - name: lost_reason + fieldtype: Link + label: Quotation Lost Reason + description: The specific reason why the quotation was lost, used for analyzing + patterns in lost deals and improving win rates. + join_hint: + table: tabQuotation Lost Reason + 'on': lost_reason = tabQuotation Lost Reason.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabQuotation Lost + Reason Detail). Comparison-ready across parent records.' +- table: tabReminder + description: '' + fields: + - name: user + fieldtype: Link + label: User + description: Target user who should receive the reminder notification, used for + filtering user-specific reminders. + join_hint: + table: tabUser + 'on': user = tabUser.name + - name: remind_at + fieldtype: Datetime + label: Remind At + description: Scheduled date and time when the reminder should trigger, used for + querying upcoming or overdue reminders. + - name: description + fieldtype: Small Text + label: Description + description: Reminder message content explaining what needs attention, used in + notification searches. + - name: reminder_doctype + fieldtype: Link + label: Document Type + description: Document type that this reminder is associated with, used for filtering + reminders by module. + join_hint: + table: tabDocType + 'on': reminder_doctype = tabDocType.name + - name: reminder_docname + fieldtype: Dynamic Link + label: Document Name + description: Specific document name that this reminder references, used to link + reminder to source record. + - name: notified + fieldtype: Check + label: notified + description: Flag indicating whether the reminder notification has been sent, + used to filter pending versus completed reminders. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Reminder document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabReport + description: '' + fields: + - name: report_name + fieldtype: Data + label: Report Name + description: Display name of the report shown to users, used when searching for + reports by their business title. + - name: ref_doctype + fieldtype: Link + label: Ref DocType + description: The primary document type this report queries or analyzes, used to + find all reports related to a specific business entity like Sales Order or Invoice. + join_hint: + table: tabDocType + 'on': ref_doctype = tabDocType.name + - name: reference_report + fieldtype: Data + label: Reference Report + description: Base report that this report extends or copies from, used to trace + report inheritance and dependencies. + - name: is_standard + fieldtype: Select + label: Is Standard + description: Flag indicating if this is a system-provided report versus a custom + user-created report, used to filter standard versus customized reports. + options: + - 'No' + - 'Yes' + - name: module + fieldtype: Link + label: Module + description: Business module or functional area the report belongs to (Sales, + Accounting, HR), used to categorize and filter reports by department. + join_hint: + table: tabModule Def + 'on': module = tabModule Def.name + - name: report_type + fieldtype: Select + label: Report Type + description: Technical type of report (Report Builder, Query Report, Script Report), + used to filter reports by their implementation method or complexity. + options: + - Report Builder + - Query Report + - Script Report + - Custom Report + - name: letter_head + fieldtype: Link + label: Letter Head + description: Used when filtering or formatting reports that require company letterhead + branding for official documents. + join_hint: + table: tabLetter Head + 'on': letter_head = tabLetter Head.name + - name: add_total_row + fieldtype: Check + label: Add Total Row + description: Used when users need to include or exclude summary totals at the + bottom of report outputs. + - name: disabled + fieldtype: Check + label: Disabled + description: Used to filter out inactive reports or check if a report is available + for execution. + - name: prepared_report + fieldtype: Check + label: Prepared Report + description: Used when querying pre-generated or cached report instances for faster + retrieval. + - name: add_translate_data + fieldtype: Check + label: Add Translate Data + description: Used when reports need multilingual support or translation of field + labels and values. + - name: timeout + fieldtype: Int + label: Timeout (In Seconds) + description: Used when configuring or troubleshooting report execution time limits + for long-running queries. + - name: filters + fieldtype: Table + label: Filters + description: '' + child_hint: + child_table: tabReport Filter + fieldname: filters + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: filters + - name: columns + fieldtype: Table + label: Columns + description: '' + child_hint: + child_table: tabReport Column + fieldname: columns + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: columns + - name: query + fieldtype: Code + label: Query + description: Used when examining the underlying SQL or database query that generates + the report data. + - name: report_script + fieldtype: Code + label: Script + description: Used when customizing report logic through server-side Python code + for data processing. + - name: javascript + fieldtype: Code + label: Javascript + description: Used when adding client-side interactivity or custom UI behavior + to report displays. + - name: json + fieldtype: Code + label: JSON + description: Used when retrieving structured report configuration or metadata + in JSON format for integrations. + - name: roles + fieldtype: Table + label: Roles + description: '' + child_hint: + child_table: tabHas Role + fieldname: roles + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: roles + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Report document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabReport Column + description: '' + fields: + - name: fieldname + fieldtype: Data + label: Fieldname + description: Database field name or expression that this column retrieves data + from. + - name: label + fieldtype: Data + label: Label + description: User-facing column header text displayed in the report output. + - name: fieldtype + fieldtype: Select + label: Fieldtype + description: Data type of the column determining formatting and filtering options. + options: + - Check + - Currency + - Data + - Date + - Datetime + - Duration + - Dynamic Link + - Float + - Fold + - Int + - Link + - Select + - Time + - name: options + fieldtype: Data + label: Options + description: Additional configuration like linked doctype for Link fields or select + options. + - name: width + fieldtype: Int + label: Width + description: Column width in pixels controlling the display size in the report + grid. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabReport Column). + Comparison-ready across parent records.' +- table: tabReport Filter + description: '' + fields: + - name: label + fieldtype: Data + label: Label + description: User-facing display name shown for this filter in the report interface. + - name: fieldtype + fieldtype: Select + label: Fieldtype + description: Data type of the filter field such as text, date, or select. + options: + - Check + - Currency + - Data + - Date + - Datetime + - Dynamic Link + - Float + - Fold + - Int + - Link + - Select + - Time + - name: fieldname + fieldtype: Data + label: Fieldname + description: Technical field name used to identify the filter in queries and code. + - name: mandatory + fieldtype: Check + label: Mandatory + description: Indicates whether users must provide a value for this filter before + running the report. + - name: wildcard_filter + fieldtype: Check + label: Wildcard Filter + description: Enables partial text matching with wildcards when filtering report + data. + - name: options + fieldtype: Small Text + label: Options + description: Configuration values such as dropdown choices or linked document + types for this filter. + - name: default + fieldtype: Small Text + label: Default + description: Indicates whether this report filter is the default selection applied + automatically when the report is first opened or accessed. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabReport Filter). + Comparison-ready across parent records.' +- table: tabRepost Accounting Ledger + description: '' + fields: + - name: company + fieldtype: Link + label: Company + description: Company entity to which this accounting ledger entry belongs + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: delete_cancelled_entries + fieldtype: Check + label: Delete Cancelled Ledger Entries + description: Whether cancelled or voided accounting entries should be permanently + removed from this ledger + - name: vouchers + fieldtype: Table + label: Vouchers + description: '' + child_hint: + child_table: tabRepost Accounting Ledger Items + fieldname: vouchers + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: vouchers + - name: amended_from + fieldtype: Link + label: Amended From + description: Reference to the original repost accounting ledger document that + this entry amends or corrects. + join_hint: + table: tabRepost Accounting Ledger + 'on': amended_from = tabRepost Accounting Ledger.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Repost Accounting Ledger document (master/transaction). + Use only for single-entity lookups, not cross-record comparison unless fields + are per-relationship (e.g. supplier, price_list).' +- table: tabRepost Accounting Ledger Items + description: '' + fields: + - name: voucher_type + fieldtype: Link + label: Voucher Type + description: Category or classification of the accounting voucher such as payment, + receipt, journal, sales, or purchase + join_hint: + table: tabDocType + 'on': voucher_type = tabDocType.name + - name: voucher_no + fieldtype: Dynamic Link + label: Voucher No + description: Sequential or reference number assigned to the voucher document for + tracking and audit purposes + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabRepost Accounting + Ledger Items). Comparison-ready across parent records.' +- table: tabRepost Allowed Types + description: '' + fields: + - name: document_type + fieldtype: Link + label: Doctype + description: The type of document that can be reposted from or to + join_hint: + table: tabDocType + 'on': document_type = tabDocType.name + - name: allowed + fieldtype: Check + label: Allowed + description: Whether reposting is permitted between the document types + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabRepost Allowed + Types). Comparison-ready across parent records.' +- table: tabRepost Item Valuation + description: '' + fields: + - name: based_on + fieldtype: Select + label: Based On + description: Source document or transaction type that triggered the repost valuation + entry + options: + - Transaction + - Item and Warehouse + - name: voucher_type + fieldtype: Link + label: Voucher Type + description: Classification of the accounting voucher created during the repost + valuation process + join_hint: + table: tabDocType + 'on': voucher_type = tabDocType.name + - name: voucher_no + fieldtype: Dynamic Link + label: Voucher No + description: Reference number of the repost transaction used to track or filter + specific item valuation adjustments. + - name: item_code + fieldtype: Link + label: Item Code + description: Identifier of the product or material whose valuation is being reposted. + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: warehouse + fieldtype: Link + label: Warehouse + description: Storage location where the item valuation repost applies. + join_hint: + table: tabWarehouse + 'on': warehouse = tabWarehouse.name + - name: posting_date + fieldtype: Date + label: Posting Date + description: Date when the item revaluation transaction was posted to the ledger. + - name: posting_time + fieldtype: Time + label: Posting Time + description: Time when the item revaluation transaction was posted to the ledger. + - name: status + fieldtype: Select + label: Status + description: Current processing state of the revaluation entry such as draft, + submitted, or cancelled. + options: + - Queued + - In Progress + - Completed + - Skipped + - Failed + - name: company + fieldtype: Link + label: Company + description: Company entity for which this item valuation record applies. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: allow_negative_stock + fieldtype: Check + label: Allow Negative Stock + description: Indicates whether stock quantity was permitted to go below zero for + this valuation entry. + - name: via_landed_cost_voucher + fieldtype: Check + label: Via Landed Cost Voucher + description: Indicates whether this valuation adjustment was created through a + landed cost voucher allocation. + - name: allow_zero_rate + fieldtype: Check + label: Allow Zero Rate + description: Whether items with zero valuation rate are permitted in this repost + valuation operation. + - name: recreate_stock_ledgers + fieldtype: Check + label: Recreate Stock Ledgers + description: Whether to rebuild stock ledger entries from scratch during the reposting + process. + - name: amended_from + fieldtype: Link + label: Amended From + description: Reference to the original repost item valuation document that this + one corrects or replaces. + join_hint: + table: tabRepost Item Valuation + 'on': amended_from = tabRepost Item Valuation.name + - name: error_log + fieldtype: Long Text + label: Error Log + description: Errors encountered during reposting of item valuations for troubleshooting + failed repost operations. + - name: items_to_be_repost + fieldtype: Code + label: Items to Be Repost + description: Items queued or pending for valuation reposting to correct inventory + accounting discrepancies. + - name: distinct_item_and_warehouse + fieldtype: Code + label: Distinct Item and Warehouse + description: Unique combinations of items and warehouses requiring separate valuation + reposting to ensure location-specific inventory accuracy. + - name: total_reposting_count + fieldtype: Int + label: Total Reposting Count + description: Total number of reposting entries generated when revaluing inventory + items across multiple accounting periods or ledgers. + - name: current_index + fieldtype: Int + label: Current Index + description: Sequential position of this specific reposting entry within the complete + set of revaluation repostings. + - name: gl_reposting_index + fieldtype: Int + label: GL reposting index + description: Index specifically tracking the general ledger reposting sequence + for this item valuation adjustment. + - name: affected_transactions + fieldtype: Code + label: Affected Transactions + description: Number of inventory transactions impacted or revalued during the + reposting process. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Repost Item Valuation document (master/transaction). Use + only for single-entity lookups, not cross-record comparison unless fields are + per-relationship (e.g. supplier, price_list).' +- table: tabRepost Payment Ledger + description: '' + fields: + - name: company + fieldtype: Link + label: Company + description: Company entity associated with this reposted payment transaction + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: posting_date + fieldtype: Date + label: Posting Date + description: Date when the reposted payment was recorded in the accounting ledger + - name: voucher_type + fieldtype: Link + label: Voucher Type + description: Type of accounting voucher or transaction document being reposted, + used when filtering repost operations by document category. + join_hint: + table: tabDocType + 'on': voucher_type = tabDocType.name + - name: add_manually + fieldtype: Check + label: Add Manually + description: Indicates whether the repost entry was created by manual user action + rather than automated system process. + - name: repost_status + fieldtype: Select + label: Repost Status + description: Current processing state of the repost operation, used to track whether + reposting is pending, completed, or failed. + options: + - Queued + - Failed + - Completed + - name: repost_error_log + fieldtype: Long Text + label: Repost Error Log + description: Error messages or logs generated when payment ledger reposting fails + or encounters issues. + - name: repost_vouchers + fieldtype: Table + label: Selected Vouchers + description: '' + child_hint: + child_table: tabRepost Payment Ledger Items + fieldname: repost_vouchers + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: repost_vouchers + - name: amended_from + fieldtype: Link + label: Amended From + description: Reference to the original repost payment ledger document that this + record amends or corrects. + join_hint: + table: tabRepost Payment Ledger + 'on': amended_from = tabRepost Payment Ledger.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Repost Payment Ledger document (master/transaction). Use + only for single-entity lookups, not cross-record comparison unless fields are + per-relationship (e.g. supplier, price_list).' +- table: tabRepost Payment Ledger Items + description: '' + fields: + - name: voucher_type + fieldtype: Link + label: Voucher Type + description: Category or classification of the payment voucher such as payment + entry, journal entry, or expense claim + join_hint: + table: tabDocType + 'on': voucher_type = tabDocType.name + - name: voucher_no + fieldtype: Dynamic Link + label: Voucher No + description: Reference number of the specific voucher document associated with + this repost payment ledger transaction + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabRepost Payment + Ledger Items). Comparison-ready across parent records.' +- table: tabRequest for Quotation + description: '' + fields: + - name: naming_series + fieldtype: Select + label: Series + description: Prefix pattern that determines the automatic numbering format for + RFQ document names + options: + - PUR-RFQ-.YYYY.- + - name: company + fieldtype: Link + label: Company + description: The company entity issuing the request for quotation to suppliers + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: billing_address + fieldtype: Link + label: Company Billing Address + description: Structured billing address identifier for the vendor in this request + for quotation. + join_hint: + table: tabAddress + 'on': billing_address = tabAddress.name + - name: billing_address_display + fieldtype: Small Text + label: Billing Address Details + description: Formatted billing address text as it appears on printed or displayed + request for quotation documents. + - name: vendor + fieldtype: Link + label: Supplier + description: Supplier or vendor being asked to provide a price quotation for goods + or services. + join_hint: + table: tabSupplier + 'on': vendor = tabSupplier.name + - name: transaction_date + fieldtype: Date + label: Date + description: Date when the request for quotation was created or submitted to vendors. + - name: schedule_date + fieldtype: Date + label: Required Date + description: Target or planned date for receiving vendor quotations or completing + the RFQ process. + - name: status + fieldtype: Select + label: Status + description: Current state of the request for quotation such as draft, sent, responded, + or closed. + options: + - Draft + - Submitted + - Cancelled + - name: has_unit_price_items + fieldtype: Check + label: Has Unit Price Items + description: Indicates whether the quotation request includes items with specified + unit prices for supplier comparison. + - name: amended_from + fieldtype: Link + label: Amended From + description: References the original quotation request that this document revises + or replaces. + join_hint: + table: tabRequest for Quotation + 'on': amended_from = tabRequest for Quotation.name + - name: suppliers + fieldtype: Table + label: Suppliers + description: '' + child_hint: + child_table: tabRequest for Quotation Supplier + fieldname: suppliers + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: suppliers + - name: items + fieldtype: Table + label: Items + description: '' + child_hint: + child_table: tabRequest for Quotation Item + fieldname: items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: items + - name: email_template + fieldtype: Link + label: Email Template + description: Template used to format the email sent to suppliers when requesting + quotations + join_hint: + table: tabEmail Template + 'on': email_template = tabEmail Template.name + - name: send_attached_files + fieldtype: Check + label: Send Attached Files + description: Whether supporting documents or attachments are included when sending + the quotation request to suppliers + - name: send_document_print + fieldtype: Check + label: Send Document Print + description: Indicates whether to send a printed document version to the supplier + when transmitting the RFQ. + - name: message_for_supplier + fieldtype: Text Editor + label: Message for Supplier + description: Custom message or instructions included in the RFQ communication + to the supplier. + - name: incoterm + fieldtype: Link + label: Incoterm + description: International commercial terms defining delivery responsibilities + and costs between buyer and supplier for this RFQ. + join_hint: + table: tabIncoterm + 'on': incoterm = tabIncoterm.name + - name: named_place + fieldtype: Data + label: Named Place + description: Delivery location or destination specified in the request for quotation + where goods or services should be delivered. + - name: tc_name + fieldtype: Link + label: Terms + description: Name of the terms and conditions template or agreement applied to + this request for quotation. + join_hint: + table: tabTerms and Conditions + 'on': tc_name = tabTerms and Conditions.name + - name: terms + fieldtype: Text Editor + label: Terms and Conditions + description: Payment terms or conditions defining when and how payment should + be made for the quoted items. + - name: select_print_heading + fieldtype: Link + label: Print Heading + description: Heading text that appears at the top of the printed or PDF version + of the request for quotation document. + join_hint: + table: tabPrint Heading + 'on': select_print_heading = tabPrint Heading.name + - name: letter_head + fieldtype: Link + label: Letter Head + description: Company letterhead template applied to the request for quotation + for branding and official correspondence formatting. + join_hint: + table: tabLetter Head + 'on': letter_head = tabLetter Head.name + - name: opportunity + fieldtype: Link + label: Opportunity + description: Sales opportunity or lead that originated or is associated with this + request for quotation. + join_hint: + table: tabOpportunity + 'on': opportunity = tabOpportunity.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Request for Quotation document (master/transaction). Use + only for single-entity lookups, not cross-record comparison unless fields are + per-relationship (e.g. supplier, price_list).' +- table: tabRequest for Quotation Item + description: '' + fields: + - name: item_code + fieldtype: Link + label: Item Code + description: Internal product or material code being requested for quotation from + suppliers + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: supplier_part_no + fieldtype: Data + label: Supplier Part No + description: Vendor's own part number or SKU for the item being quoted, as provided + by the supplier + - name: item_name + fieldtype: Data + label: Item Name + description: The name or title of the product or service being requested for quotation. + - name: schedule_date + fieldtype: Date + label: Required Date + description: The expected delivery date or timeline when the quoted item should + be supplied. + - name: description + fieldtype: Text Editor + label: Description + description: Detailed specifications, requirements, or additional information + about the item being quoted beyond its name. + - name: item_group + fieldtype: Link + label: Item Group + description: Product category or classification of the requested item for grouping + similar materials or products together + join_hint: + table: tabItem Group + 'on': item_group = tabItem Group.name + - name: brand + fieldtype: Link + label: Brand + description: Manufacturer or brand name of the requested item for vendor or quality + specification purposes + join_hint: + table: tabBrand + 'on': brand = tabBrand.name + - name: qty + fieldtype: Float + label: Quantity + description: Quantity of the item being requested from the supplier in the specified + unit of measurement. + - name: stock_uom + fieldtype: Link + label: Stock UOM + description: Standard unit of measurement used for inventory tracking of this + item in the warehouse. + join_hint: + table: tabUOM + 'on': stock_uom = tabUOM.name + - name: uom + fieldtype: Link + label: UOM + description: Unit of measurement for the quotation request, which may differ from + the stock unit for purchasing purposes. + join_hint: + table: tabUOM + 'on': uom = tabUOM.name + - name: conversion_factor + fieldtype: Float + label: UOM Conversion Factor + description: Factor used to convert between the requested unit of measure and + the stock unit of measure for this item. + - name: stock_qty + fieldtype: Float + label: Qty as per Stock UOM + description: Quantity of the item expressed in stock keeping units after applying + the conversion factor. + - name: warehouse + fieldtype: Link + label: Warehouse + description: Warehouse location where the requested item is expected to be sourced + or delivered from. + join_hint: + table: tabWarehouse + 'on': warehouse = tabWarehouse.name + - name: material_request + fieldtype: Link + label: Material Request + description: Links to the originating material request document that triggered + this RFQ item, used when tracing procurement back to internal requisitions. + join_hint: + table: tabMaterial Request + 'on': material_request = tabMaterial Request.name + - name: material_request_item + fieldtype: Data + label: Material Request Item + description: References the specific line item from the material request that + corresponds to this RFQ item, used for detailed item-level traceability. + - name: project_name + fieldtype: Link + label: Project + description: Identifies the project this RFQ item will be charged to or used for, + relevant when filtering procurement by project or analyzing project-specific + purchasing. + join_hint: + table: tabProject + 'on': project_name = tabProject.name + - name: page_break + fieldtype: Check + label: Page Break + description: Indicates whether a page break should occur before this item when + printing the request for quotation document. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabRequest for Quotation + Item). Comparison-ready across parent records.' +- table: tabRequest for Quotation Supplier + description: '' + fields: + - name: supplier + fieldtype: Link + label: Supplier + description: The vendor or company being asked to provide a price quote. + join_hint: + table: tabSupplier + 'on': supplier = tabSupplier.name + - name: contact + fieldtype: Link + label: Contact + description: The specific person at the supplier organization who is the point + of contact for this quotation request. + join_hint: + table: tabContact + 'on': contact = tabContact.name + - name: quote_status + fieldtype: Select + label: Quote Status + description: Current status of the supplier's quotation response such as pending, + submitted, accepted, or rejected. + options: + - Pending + - Received + - name: email_id + fieldtype: Data + label: Email Id + description: Email address of the supplier contact for quotation communication + and submission. + - name: send_email + fieldtype: Check + label: Send Email + description: Whether to send email notification to this supplier for the quotation + request. + - name: email_sent + fieldtype: Check + label: Email Sent + description: Whether the email notification has already been sent to this supplier. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabRequest for Quotation + Supplier). Comparison-ready across parent records.' +- table: tabReview Level + description: '' + fields: + - name: level_name + fieldtype: Data + label: Level Name + description: Descriptive name of the review stage used to identify approval steps + in workflow reports. + - name: role + fieldtype: Link + label: Role + description: User role authorized to perform reviews at this level, used for access + control and assignment. + join_hint: + table: tabRole + 'on': role = tabRole.name + - name: review_points + fieldtype: Int + label: Review Points + description: Criteria or checklist items to evaluate at this review stage, used + in compliance and quality checks. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabReview Level). + Comparison-ready across parent records.' +- table: tabRole + description: '' + fields: + - name: role_name + fieldtype: Data + label: Role Name + description: Display name of the role, primary field for searching and identifying + user permissions. + - name: home_page + fieldtype: Data + label: Home Page + description: Default landing page URL for users with this role, used for role-based + navigation setup. + - name: restrict_to_domain + fieldtype: Link + label: Restrict To Domain + description: Domain restriction for the role, used to limit role visibility to + specific business modules. + join_hint: + table: tabDomain + 'on': restrict_to_domain = tabDomain.name + - name: disabled + fieldtype: Check + label: Disabled + description: Flag indicating if role is inactive, used to filter out unavailable + roles from permission checks. + - name: is_custom + fieldtype: Check + label: Is Custom + description: Indicates custom-created role versus system role, used for filtering + standard versus tailored permissions. + - name: desk_access + fieldtype: Check + label: Desk Access + description: Flag determining if role grants access to desk interface, used for + separating portal and desk users. + - name: two_factor_auth + fieldtype: Check + label: Two Factor Authentication + description: Indicates whether two-factor authentication is required or enabled + for this role, used when analyzing security requirements or access control policies. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Role document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabRole Profile + description: '' + fields: + - name: role_profile + fieldtype: Data + label: Role Name + description: Name of the role profile being assigned, which contains a predefined + set of roles and permissions. + - name: roles + fieldtype: Table + label: Roles Assigned + description: '' + child_hint: + child_table: tabHas Role + fieldname: roles + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: roles + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Role Profile document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabRoute History + description: '' + fields: + - name: route + fieldtype: Data + label: Route + description: The routing destination or stage name, used to track where documents + were sent or which approval stage was reached. + - name: user + fieldtype: Link + label: User + description: User assigned to or involved in this routing step, used to identify + who should act on routed documents. + join_hint: + table: tabUser + 'on': user = tabUser.name + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Route History document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabRouting + description: '' + fields: + - name: routing_name + fieldtype: Data + label: Routing Name + description: Descriptive display name of the routing used in manufacturing operations + and work orders + - name: disabled + fieldtype: Check + label: Disabled + description: Indicates whether this routing is currently inactive and unavailable + for use in production + - name: operations + fieldtype: Table + label: BOM Operation + description: '' + child_hint: + child_table: tabBOM Operation + fieldname: operations + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: operations + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Routing document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabSLA Fulfilled On Status + description: '' + fields: + - name: status + fieldtype: Select + label: Status + description: Current state indicating whether the SLA was met, missed, or is pending + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabSLA Fulfilled + On Status). Comparison-ready across parent records.' +- table: tabSMS Log + description: '' + fields: + - name: sender_name + fieldtype: Data + label: Sender Name + description: Name or identifier of the SMS sender, used to filter messages by + sending account or gateway. + - name: sent_on + fieldtype: Date + label: Sent On + description: Actual timestamp when SMS was transmitted, used to analyze delivery + timing and performance. + - name: message + fieldtype: Small Text + label: Message + description: Content of the SMS text sent, used to search or analyze message content + and templates. + - name: no_of_requested_sms + fieldtype: Int + label: No of Requested SMS + description: Number of SMS units requested for sending, used to track intended + message volume. + - name: requested_numbers + fieldtype: Code + label: Requested Numbers + description: Phone numbers to which SMS was intended to be sent, used to identify + recipients and analyze distribution. + - name: no_of_sent_sms + fieldtype: Int + label: No of Sent SMS + description: Actual number of SMS units successfully sent, used to measure delivery + success and calculate costs. + - name: sent_to + fieldtype: Code + label: Sent To + description: Identifies the recipient phone number or contact for tracking SMS + delivery, analyzing communication patterns, and filtering messages by destination. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per SMS Log document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabSMS Parameter + description: '' + fields: + - name: parameter + fieldtype: Data + label: Parameter + description: Name of the SMS gateway parameter being configured for API integration. + - name: value + fieldtype: Data + label: Value + description: Actual value assigned to the SMS parameter for gateway communication. + - name: header + fieldtype: Check + label: Header + description: Indicates if this parameter should be sent in the HTTP header during + SMS API calls. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabSMS Parameter). + Comparison-ready across parent records.' +- table: tabSales Invoice + description: '' + fields: + - name: custom_ksa_einvoicing_xml + fieldtype: Data + label: KSA E-Invoicing XML + description: XML data for Saudi Arabia e-invoicing compliance used when querying + KSA tax authority submission requirements or ZATCA integration + - name: custom_ksa_einvoicing_xml_ar + fieldtype: Data + label: Custom Ksa Einvoicing Xml (ar) + description: Arabic XML content for KSA e-invoicing compliance, used when retrieving + ZATCA-formatted invoice data in Arabic. + - name: title + fieldtype: Data + label: Title + description: Customer or account name associated with the invoice used when searching + invoices by customer identity + - name: naming_series + fieldtype: Select + label: Series + description: Prefix pattern for invoice numbering used when searching by invoice + number format or series + options: + - ACC-SINV-.YYYY.- + - ACC-SINV-RET-.YYYY.- + - name: customer + fieldtype: Link + label: Customer + description: Customer name or ID who is being billed, used when querying invoices + by customer + join_hint: + table: tabCustomer + 'on': customer = tabCustomer.name + - name: custom_b2c + fieldtype: Check + label: B2C + description: Indicates whether this is a business-to-consumer transaction, used + to filter retail vs business sales + - name: customer_name + fieldtype: Small Text + label: Customer Name + description: Name of the customer who is being invoiced for goods or services + sold. + - name: tax_id + fieldtype: Data + label: Tax Id + description: Tax identification number of the customer for tax reporting and compliance + purposes. + - name: company + fieldtype: Link + label: Company + description: The company entity that issued this sales invoice, relevant when + operating multiple legal entities or subsidiaries. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: company_tax_id + fieldtype: Data + label: Company Tax ID + description: Tax identification number of the company issuing the sales invoice + for tax compliance and reporting. + - name: posting_date + fieldtype: Date + label: Date + description: Date when the sales invoice was officially recorded in the accounting + books, used for financial period analysis and revenue recognition. + - name: posting_time + fieldtype: Time + label: Posting Time + description: Time when the sales invoice was posted to the accounting system, + used for precise transaction sequencing and audit trails. + - name: set_posting_time + fieldtype: Check + label: Edit Posting Date and Time + description: Indicates whether the invoice posting date and time were manually + specified rather than automatically set at creation. + - name: due_date + fieldtype: Date + label: Payment Due Date + description: The date by which payment for the invoice is expected or required + from the customer. + - name: custom_uuid + fieldtype: Small Text + label: UUID + description: A unique identifier for the sales invoice used for external system + integration or custom tracking purposes. + - name: custom_zatca_status + fieldtype: Data + label: ZATCA Status + description: Status of the invoice submission to ZATCA (Saudi Arabian tax authority) + for e-invoicing compliance. + - name: custom_zatca_status_ar + fieldtype: Data + label: Custom Zatca Status (ar) + description: ZATCA clearance status in Arabic, used to check Saudi e-invoicing + submission and approval status for compliance tracking. + - name: is_pos + fieldtype: Check + label: Include Payment (POS) + description: Indicates whether this invoice was created through a point-of-sale + system rather than standard invoicing. + - name: pos_profile + fieldtype: Link + label: POS Profile + description: The specific point-of-sale configuration or terminal profile used + when creating this POS invoice. + join_hint: + table: tabPOS Profile + 'on': pos_profile = tabPOS Profile.name + - name: is_consolidated + fieldtype: Check + label: Is Consolidated + description: Indicates whether this sales invoice combines multiple shipments + or delivery notes into a single invoice. + - name: is_return + fieldtype: Check + label: Is Return (Credit Note) + description: Indicates whether this sales invoice represents a customer return + or credit note transaction. + - name: return_against + fieldtype: Link + label: Return Against + description: References the original sales invoice document that this return invoice + is issued against. + join_hint: + table: tabSales Invoice + 'on': return_against = tabSales Invoice.name + - name: update_outstanding_for_self + fieldtype: Check + label: Update Outstanding for Self + description: Whether this invoice automatically updates its own outstanding amount + when payments are received or credit notes are applied + - name: update_billed_amount_in_sales_order + fieldtype: Check + label: Update Billed Amount in Sales Order + description: Whether this invoice automatically updates the billed amount in the + linked sales order when posted + - name: update_billed_amount_in_delivery_note + fieldtype: Check + label: Update Billed Amount in Delivery Note + description: Whether this invoice automatically updates the billed amount in the + linked delivery note when posted + - name: is_debit_note + fieldtype: Check + label: Is Rate Adjustment Entry (Debit Note) + description: Indicates whether this invoice is a debit note used to increase the + amount owed by the customer due to additional charges or corrections. + - name: amended_from + fieldtype: Link + label: Amended From + description: References the original sales invoice that this document amends or + corrects. + join_hint: + table: tabSales Invoice + 'on': amended_from = tabSales Invoice.name + - name: custom_zatca_third_party_invoice + fieldtype: Check + label: ZATCA 3rd party invoice + description: Indicates whether this invoice involves a third party for Saudi ZATCA + e-invoicing compliance purposes. + - name: custom_zatca_nominal_invoice + fieldtype: Check + label: ZATCA NOMINAL Invoice + description: Indicates if this is a ZATCA-compliant nominal invoice for Saudi + Arabia tax authority reporting purposes. + - name: custom_zatca_export_invoice + fieldtype: Check + label: ZATCA Export Invoice + description: Indicates if this is a ZATCA-compliant export invoice for goods or + services sold outside Saudi Arabia. + - name: custom_summary_invoice + fieldtype: Check + label: ZATCA Summary Invoice + description: Indicates if this is a summary invoice consolidating multiple transactions + into a single billing document. + - name: custom_self_billed_invoice + fieldtype: Check + label: ZATCA Self billed Invoice + description: Indicates whether the invoice was created by the buyer on behalf + of the supplier rather than by the supplier themselves. + - name: custom_user_invoice_number + fieldtype: Data + label: User Invoice Number + description: User-defined invoice number that differs from the system invoice + number, often used for custom numbering schemes or external reference requirements. + - name: custom_zatca_tax_category + fieldtype: Select + label: ZATCA Tax Category + description: Saudi Arabia ZATCA tax classification code determining the applicable + VAT treatment and reporting category for the invoice. + options: + - Standard + - Zero Rated + - Exempted + - Services outside scope of tax / Not subject to VAT + - name: custom_exemption_reason_code + fieldtype: Select + label: Exemption Reason Code + description: Code indicating why the invoice is exempt from tax or specific regulations. + options: + - Standard 15% + - VATEX-SA-29 + - VATEX-SA-29-7 + - VATEX-SA-30 + - VATEX-SA-32 + - VATEX-SA-33 + - VATEX-SA-34-1 + - VATEX-SA-34-2 + - VATEX-SA-34-3 + - VATEX-SA-34-4 + - VATEX-SA-34-5 + - VATEX-SA-35 + - VATEX-SA-36 + - VATEX-SA-EDU + - VATEX-SA-HEA + - VATEX-SA-MLTRY + - VATEX-SA-OOS + - name: custom_zatca_discount_reason_code + fieldtype: Data + label: ZATCA Discount reason code + description: ZATCA-compliant code specifying the reason for applying a discount + on the invoice. + - name: custom_zatca_discount_reason + fieldtype: Data + label: ZATCA Discount reason + description: Text description explaining why a discount was applied, for ZATCA + compliance reporting. + - name: custom_submit_line_item_discount_to_zatca + fieldtype: Check + label: Submit line item discount to ZATCA. + description: Whether line item discounts are submitted to ZATCA (Saudi tax authority) + for this sales invoice. + - name: cost_center + fieldtype: Link + label: Cost Center + description: Cost center assigned to the sales invoice for financial tracking + and allocation purposes. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + - name: project + fieldtype: Link + label: Project + description: Project associated with the sales invoice for tracking revenue and + costs by project. + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: currency + fieldtype: Link + label: Currency + description: Currency in which the sales invoice total and line items are denominated + and billed to the customer. + join_hint: + table: tabCurrency + 'on': currency = tabCurrency.name + - name: conversion_rate + fieldtype: Float + label: Exchange Rate + description: Exchange rate applied to convert foreign currency amounts to the + company's base currency for this invoice. + - name: selling_price_list + fieldtype: Link + label: Price List + description: Price list used to determine item rates and pricing rules applied + when creating this sales invoice. + join_hint: + table: tabPrice List + 'on': selling_price_list = tabPrice List.name + - name: price_list_currency + fieldtype: Link + label: Price List Currency + description: Currency in which the price list is denominated, relevant when analyzing + sales in original price list currency rather than transaction or company currency. + join_hint: + table: tabCurrency + 'on': price_list_currency = tabCurrency.name + - name: plc_conversion_rate + fieldtype: Float + label: Price List Exchange Rate + description: Exchange rate used to convert from price list currency to transaction + currency, relevant when reconciling pricing differences across currencies. + - name: ignore_pricing_rule + fieldtype: Check + label: Ignore Pricing Rule + description: Indicates whether automatic pricing rules were bypassed for this + invoice, relevant when identifying manual pricing overrides or exceptions. + - name: scan_barcode + fieldtype: Data + label: Scan Barcode + description: Barcode scanned during sales invoice processing for item identification + and tracking. + - name: update_stock + fieldtype: Check + label: Update Stock + description: Indicates whether this sales invoice triggers automatic inventory + stock level reduction. + - name: last_scanned_warehouse + fieldtype: Data + label: Last Scanned Warehouse + description: Warehouse location where the barcode was most recently scanned during + invoice fulfillment. + - name: set_warehouse + fieldtype: Link + label: Source Warehouse + description: Warehouse location from which all invoice items are delivered or + sourced when user asks about fulfillment origin or stock depletion location + for the entire sales invoice. + join_hint: + table: tabWarehouse + 'on': set_warehouse = tabWarehouse.name + - name: set_target_warehouse + fieldtype: Link + label: Set Target Warehouse + description: Destination warehouse for stock transfers or inter-warehouse sales + when user asks where goods are being moved or delivered to at the warehouse + level. + join_hint: + table: tabWarehouse + 'on': set_target_warehouse = tabWarehouse.name + - name: items + fieldtype: Table + label: Items + description: '' + child_hint: + child_table: tabSales Invoice Item + fieldname: items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: items + - name: total_qty + fieldtype: Float + label: Total Quantity + description: Total quantity of all items sold in the invoice, used when asking + about units or volume sold. + - name: total_net_weight + fieldtype: Float + label: Total Net Weight + description: Combined net weight of all items in the invoice, used when asking + about shipping weight or physical mass of goods sold. + - name: base_total + fieldtype: Currency + label: Total (Company Currency) + description: Invoice subtotal in company's base currency before taxes and discounts, + used when asking about pre-tax revenue or base amounts. + - name: base_net_total + fieldtype: Currency + label: Net Total (Company Currency) + description: Net total amount in company's base currency, used when analyzing + sales across multiple currencies or for consolidated financial reporting. + - name: total + fieldtype: Currency + label: Total + description: Final invoice amount including all taxes and charges, used when asking + about the actual amount customer must pay. + - name: net_total + fieldtype: Currency + label: Net Total + description: Invoice subtotal before taxes and additional charges in transaction + currency, used when analyzing pre-tax sales revenue. + - name: tax_category + fieldtype: Link + label: Tax Category + description: Tax classification determining which tax rates apply to the invoice + based on customer type, location, or product category. + join_hint: + table: tabTax Category + 'on': tax_category = tabTax Category.name + - name: taxes_and_charges + fieldtype: Link + label: Sales Taxes and Charges Template + description: Specific tax template or configuration defining the actual tax rates, + accounts, and calculation rules applied to this invoice. + join_hint: + table: tabSales Taxes and Charges Template + 'on': taxes_and_charges = tabSales Taxes and Charges Template.name + - name: shipping_rule + fieldtype: Link + label: Shipping Rule + description: Shipping cost calculation rule applied to determine freight charges + based on order value, weight, or destination. + join_hint: + table: tabShipping Rule + 'on': shipping_rule = tabShipping Rule.name + - name: incoterm + fieldtype: Link + label: Incoterm + description: International commercial term defining delivery responsibility and + cost allocation between buyer and seller (e.g., FOB, CIF, EXW). + join_hint: + table: tabIncoterm + 'on': incoterm = tabIncoterm.name + - name: named_place + fieldtype: Data + label: Named Place + description: Specific geographic location associated with the incoterm where risk + and cost transfer occurs. + - name: taxes + fieldtype: Table + label: Sales Taxes and Charges + description: '' + child_hint: + child_table: tabSales Taxes and Charges + fieldname: taxes + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: taxes + - name: base_total_taxes_and_charges + fieldtype: Currency + label: Total Taxes and Charges (Company Currency) + description: Total amount of all taxes and charges in company's base currency, + used when analyzing tax amounts across invoices with different transaction currencies. + - name: total_taxes_and_charges + fieldtype: Currency + label: Total Taxes and Charges + description: Total amount of all taxes and charges in the invoice's transaction + currency, used when reviewing tax amounts as they appear to the customer. + - name: base_grand_total + fieldtype: Currency + label: Grand Total (Company Currency) + description: Final invoice amount including all items, taxes, and charges in company's + base currency, used for financial reporting and cross-currency invoice analysis. + - name: base_rounding_adjustment + fieldtype: Currency + label: Rounding Adjustment (Company Currency) + description: Amount added or subtracted to round the invoice total to the nearest + whole number in base currency. + - name: base_rounded_total + fieldtype: Currency + label: Rounded Total (Company Currency) + description: Final invoice total after applying rounding adjustment in base currency. + - name: base_in_words + fieldtype: Small Text + label: In Words (Company Currency) + description: Text representation of the base currency invoice total amount spelled + out in words for printing on documents. + - name: grand_total + fieldtype: Currency + label: Grand Total + description: Final total amount payable by customer after all taxes, discounts, + and adjustments including rounding. + - name: rounding_adjustment + fieldtype: Currency + label: Rounding Adjustment + description: Amount added or subtracted to round the invoice total to nearest + currency unit. + - name: use_company_roundoff_cost_center + fieldtype: Check + label: Use Company default Cost Center for Round off + description: Whether rounding adjustment amounts are allocated to the default + company-level cost center instead of invoice line item cost centers. + - name: rounded_total + fieldtype: Currency + label: Rounded Total + description: Final invoice amount after applying rounding adjustments to the grand + total + - name: in_words + fieldtype: Small Text + label: In Words + description: Grand total amount expressed as text words for printing on invoice + documents + - name: total_advance + fieldtype: Currency + label: Total Advance + description: Sum of all advance payments received from customer prior to this + invoice + - name: outstanding_amount + fieldtype: Currency + label: Outstanding Amount + description: Remaining unpaid balance on the invoice after accounting for payments + and credits + - name: disable_rounded_total + fieldtype: Check + label: Disable Rounded Total + description: Whether invoice total rounding is turned off for this transaction + - name: apply_discount_on + fieldtype: Select + label: Apply Additional Discount On + description: Specifies whether discounts are calculated on grand total or net + total before taxes + options: + - Grand Total + - Net Total + - name: base_discount_amount + fieldtype: Currency + label: Additional Discount Amount (Company Currency) + description: Discount amount in base currency before taxes and additional discounts, + used when calculating total invoice value or analyzing discount trends. + - name: is_cash_or_non_trade_discount + fieldtype: Check + label: Is Cash or Non Trade Discount + description: Indicates whether the discount is a cash/prompt payment discount + or non-trade discount rather than a standard trade discount, relevant for accounting + classification and payment term analysis. + - name: additional_discount_account + fieldtype: Link + label: Discount Account + description: General ledger account where additional discounts beyond standard + trade discounts are posted, used when tracking discount expenses or reconciling + discount accounting entries. + join_hint: + table: tabAccount + 'on': additional_discount_account = tabAccount.name + - name: additional_discount_percentage + fieldtype: Float + label: Additional Discount Percentage + description: Percentage discount applied to the entire invoice total after line-item + discounts, used when users ask about overall invoice-level discount rates or + additional discounts beyond item discounts. + - name: discount_amount + fieldtype: Currency + label: Additional Discount Amount + description: Absolute monetary value of total discounts on the invoice, used when + users ask about the dollar amount of discounts given rather than percentages. + - name: other_charges_calculation + fieldtype: Text Editor + label: Taxes and Charges Calculation + description: Formula or method used to calculate miscellaneous charges like shipping, + handling, or fees added to the invoice, relevant when users ask how additional + charges are computed. + - name: pricing_rules + fieldtype: Table + label: Pricing Rule Detail + description: '' + child_hint: + child_table: tabPricing Rule Detail + fieldname: pricing_rules + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: pricing_rules + - name: packed_items + fieldtype: Table + label: Packed Items + description: '' + child_hint: + child_table: tabPacked Item + fieldname: packed_items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: packed_items + - name: timesheets + fieldtype: Table + label: Time Sheets + description: '' + child_hint: + child_table: tabSales Invoice Timesheet + fieldname: timesheets + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: timesheets + - name: total_billing_hours + fieldtype: Float + label: Total Billing Hours + description: Total hours billed on this sales invoice, used when analyzing time-based + billing or hourly service revenue. + - name: total_billing_amount + fieldtype: Currency + label: Total Billing Amount + description: Total monetary amount billed on this sales invoice, used when querying + invoice totals, revenue, or amounts owed by customers. + - name: cash_bank_account + fieldtype: Link + label: Cash/Bank Account + description: Bank account designated for cash payments related to this sales invoice, + used when tracking which account received or will receive payment. + join_hint: + table: tabAccount + 'on': cash_bank_account = tabAccount.name + - name: payments + fieldtype: Table + label: Sales Invoice Payment + description: '' + child_hint: + child_table: tabSales Invoice Payment + fieldname: payments + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: payments + - name: base_paid_amount + fieldtype: Currency + label: Paid Amount (Company Currency) + description: Amount paid in company's default accounting currency for multi-currency + reporting + - name: paid_amount + fieldtype: Currency + label: Paid Amount + description: Amount paid in the invoice's transaction currency + - name: base_change_amount + fieldtype: Currency + label: Base Change Amount (Company Currency) + description: Change amount returned to customer in base currency when payment + exceeds invoice total. + - name: change_amount + fieldtype: Currency + label: Change Amount + description: Change amount returned to customer in transaction currency when payment + exceeds invoice total. + - name: account_for_change_amount + fieldtype: Link + label: Account for Change Amount + description: General ledger account where change amounts returned to customers + are posted. + join_hint: + table: tabAccount + 'on': account_for_change_amount = tabAccount.name + - name: allocate_advances_automatically + fieldtype: Check + label: Allocate Advances Automatically (FIFO) + description: Whether advance payments are automatically applied to this invoice + without manual allocation + - name: only_include_allocated_payments + fieldtype: Check + label: Only Include Allocated Payments + description: Whether to restrict payment display or processing to payments that + have been explicitly allocated to this invoice + - name: advances + fieldtype: Table + label: Advances + description: '' + child_hint: + child_table: tabSales Invoice Advance + fieldname: advances + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: advances + - name: write_off_amount + fieldtype: Currency + label: Write Off Amount + description: Amount written off from the invoice in transaction currency when + closing with a small remaining balance or bad debt. + - name: base_write_off_amount + fieldtype: Currency + label: Write Off Amount (Company Currency) + description: Amount written off from the invoice converted to company base currency + for consolidated reporting. + - name: write_off_outstanding_amount_automatically + fieldtype: Check + label: Write Off Outstanding Amount + description: Whether the system automatically writes off small remaining balances + when the invoice is marked as paid. + - name: write_off_account + fieldtype: Link + label: Write Off Account + description: Account used when writing off small differences or rounding amounts + on the invoice. + join_hint: + table: tabAccount + 'on': write_off_account = tabAccount.name + - name: write_off_cost_center + fieldtype: Link + label: Write Off Cost Center + description: Cost center assigned to track write-off amounts for budgeting and + financial analysis. + join_hint: + table: tabCost Center + 'on': write_off_cost_center = tabCost Center.name + - name: redeem_loyalty_points + fieldtype: Check + label: Redeem Loyalty Points + description: Indicates whether customer loyalty points were redeemed as payment + on this invoice. + - name: loyalty_points + fieldtype: Int + label: Loyalty Points + description: Points earned or redeemed by the customer on this sales invoice transaction. + - name: loyalty_amount + fieldtype: Currency + label: Loyalty Amount + description: Monetary value equivalent of loyalty points for this sales invoice. + - name: loyalty_program + fieldtype: Link + label: Loyalty Program + description: Name or identifier of the loyalty program applied to this sales invoice. + join_hint: + table: tabLoyalty Program + 'on': loyalty_program = tabLoyalty Program.name + - name: loyalty_redemption_account + fieldtype: Link + label: Redemption Account + description: Accounting ledger account where loyalty points redeemed by the customer + on this invoice are recorded as expense or contra-revenue. + join_hint: + table: tabAccount + 'on': loyalty_redemption_account = tabAccount.name + - name: loyalty_redemption_cost_center + fieldtype: Link + label: Redemption Cost Center + description: Cost center allocated for tracking loyalty point redemptions applied + to this invoice. + join_hint: + table: tabCost Center + 'on': loyalty_redemption_cost_center = tabCost Center.name + - name: customer_address + fieldtype: Link + label: Customer Address + description: Billing or primary address of the customer associated with this sales + invoice. + join_hint: + table: tabAddress + 'on': customer_address = tabAddress.name + - name: address_display + fieldtype: Small Text + label: Address + description: Formatted billing or shipping address shown on the sales invoice + for customer correspondence and delivery purposes. + - name: contact_person + fieldtype: Link + label: Contact Person + description: Individual person at the customer organization responsible for or + associated with this sales invoice transaction. + join_hint: + table: tabContact + 'on': contact_person = tabContact.name + - name: contact_display + fieldtype: Small Text + label: Contact + description: Formatted display name and details of the customer contact shown + on the sales invoice. + - name: contact_mobile + fieldtype: Small Text + label: Mobile No + description: Mobile phone number of the customer contact for this sales invoice + - name: contact_email + fieldtype: Data + label: Contact Email + description: Email address of the customer contact for this sales invoice + - name: territory + fieldtype: Link + label: Territory + description: Geographic sales territory or region assigned to this sales invoice + join_hint: + table: tabTerritory + 'on': territory = tabTerritory.name + - name: shipping_address_name + fieldtype: Link + label: Shipping Address Name + description: Name of the location or recipient where goods are to be delivered + to the customer. + join_hint: + table: tabAddress + 'on': shipping_address_name = tabAddress.name + - name: shipping_address + fieldtype: Small Text + label: Shipping Address + description: Full address details where goods are to be delivered to the customer. + - name: dispatch_address_name + fieldtype: Link + label: Dispatch Address Name + description: Name of the warehouse or location from which goods are shipped out. + join_hint: + table: tabAddress + 'on': dispatch_address_name = tabAddress.name + - name: dispatch_address + fieldtype: Small Text + label: Dispatch Address + description: Address from which goods are shipped or dispatched to the customer + for this sales invoice. + - name: company_address + fieldtype: Link + label: Company Address Name + description: Company's address used as the billing or legal address on this sales + invoice. + join_hint: + table: tabAddress + 'on': company_address = tabAddress.name + - name: company_address_display + fieldtype: Small Text + label: Company Address + description: Formatted display version of the company address shown on the printed + or rendered sales invoice. + - name: company_contact_person + fieldtype: Link + label: Company Contact Person + description: Contact person representing the company issuing the sales invoice, + used when identifying who from the seller's organization is responsible for + the transaction. + join_hint: + table: tabContact + 'on': company_contact_person = tabContact.name + - name: ignore_default_payment_terms_template + fieldtype: Check + label: Ignore Default Payment Terms Template + description: Indicates whether to bypass the standard payment terms template for + this specific sales invoice. + - name: payment_terms_template + fieldtype: Link + label: Payment Terms Template + description: Template defining payment conditions and schedules applied to this + sales invoice, such as net 30 or installment terms. + join_hint: + table: tabPayment Terms Template + 'on': payment_terms_template = tabPayment Terms Template.name + - name: payment_schedule + fieldtype: Table + label: Payment Schedule + description: '' + child_hint: + child_table: tabPayment Schedule + fieldname: payment_schedule + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: payment_schedule + - name: tc_name + fieldtype: Link + label: Terms + description: Name of the terms and conditions template or agreement applied to + this sales invoice + join_hint: + table: tabTerms and Conditions + 'on': tc_name = tabTerms and Conditions.name + - name: terms + fieldtype: Text Editor + label: Terms and Conditions Details + description: Payment terms specifying the due date calculation such as net 30, + due on receipt, or end of month + - name: po_no + fieldtype: Data + label: Customer's Purchase Order + description: Customer's purchase order number referenced when matching invoices + to customer PO documents or tracking which customer order triggered the sale. + - name: po_date + fieldtype: Date + label: Customer's Purchase Order Date + description: Date on the customer's purchase order, used when verifying order + timing or reconciling invoice dates against customer PO dates. + - name: debit_to + fieldtype: Link + label: Debit To + description: Accounts receivable ledger account debited for this invoice, used + when identifying which customer account or receivable account was charged. + join_hint: + table: tabAccount + 'on': debit_to = tabAccount.name + - name: party_account_currency + fieldtype: Link + label: Party Account Currency + description: Currency in which the customer's account balance is maintained, relevant + when analyzing foreign currency transactions or customer-specific currency exposure. + join_hint: + table: tabCurrency + 'on': party_account_currency = tabCurrency.name + - name: is_opening + fieldtype: Select + label: Is Opening Entry + description: Indicates whether this sales invoice is an opening balance entry + from a prior accounting period, used to filter out historical migration data. + options: + - 'No' + - 'Yes' + - name: unrealized_profit_loss_account + fieldtype: Link + label: Unrealized Profit / Loss Account + description: Account where unrealized gains or losses from foreign exchange rate + changes on this invoice are recorded before payment settlement. + join_hint: + table: tabAccount + 'on': unrealized_profit_loss_account = tabAccount.name + - name: against_income_account + fieldtype: Small Text + label: Against Income Account + description: Income account credited when posting this sales invoice revenue. + - name: sales_partner + fieldtype: Link + label: Sales Partner + description: External partner or affiliate who referred or facilitated this sale. + join_hint: + table: tabSales Partner + 'on': sales_partner = tabSales Partner.name + - name: amount_eligible_for_commission + fieldtype: Currency + label: Amount Eligible for Commission + description: Portion of invoice amount qualifying for commission calculation to + sales partner or team. + - name: commission_rate + fieldtype: Float + label: Commission Rate (%) + description: Percentage rate applied to calculate sales commission for this invoice. + - name: total_commission + fieldtype: Currency + label: Total Commission + description: Total commission amount earned from this invoice across all sales + team members. + - name: sales_team + fieldtype: Table + label: Sales Contributions and Incentives + description: '' + child_hint: + child_table: tabSales Team + fieldname: sales_team + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: sales_team + - name: letter_head + fieldtype: Link + label: Letter Head + description: Letterhead template used when printing or emailing this sales invoice + join_hint: + table: tabLetter Head + 'on': letter_head = tabLetter Head.name + - name: group_same_items + fieldtype: Check + label: Group same items + description: Whether identical items are consolidated into single lines when printing + this invoice + - name: select_print_heading + fieldtype: Link + label: Print Heading + description: Custom heading text that appears on the printed sales invoice instead + of the default title + join_hint: + table: tabPrint Heading + 'on': select_print_heading = tabPrint Heading.name + - name: language + fieldtype: Data + label: Print Language + description: Language code for the invoice document, relevant when filtering invoices + by customer language preference or generating localized reports. + - name: subscription + fieldtype: Link + label: Subscription + description: Links invoice to a recurring subscription contract, used to identify + subscription-based revenue versus one-time sales. + join_hint: + table: tabSubscription + 'on': subscription = tabSubscription.name + - name: from_date + fieldtype: Date + label: From Date + description: Start date of the billing period covered by this invoice, particularly + for subscription or service-based invoices spanning a date range. + - name: auto_repeat + fieldtype: Link + label: Auto Repeat + description: Linked recurring invoice schedule that automatically generates this + sales invoice at specified intervals. + join_hint: + table: tabAuto Repeat + 'on': auto_repeat = tabAuto Repeat.name + - name: to_date + fieldtype: Date + label: To Date + description: End date of the billing period or service delivery timeframe covered + by this sales invoice. + - name: status + fieldtype: Select + label: Status + description: Current state of the sales invoice such as draft, submitted, paid, + unpaid, overdue, cancelled, or returned. + options: + - Draft + - Return + - Credit Note Issued + - Submitted + - Paid + - Partly Paid + - Unpaid + - Unpaid and Discounted + - Partly Paid and Discounted + - Overdue and Discounted + - Overdue + - Cancelled + - Internal Transfer + - name: inter_company_invoice_reference + fieldtype: Link + label: Inter Company Invoice Reference + description: Links to the corresponding invoice in another company entity when + this invoice is part of an inter-company transaction between related legal entities. + join_hint: + table: tabPurchase Invoice + 'on': inter_company_invoice_reference = tabPurchase Invoice.name + - name: campaign + fieldtype: Link + label: Campaign + description: Marketing campaign associated with this sales invoice to track revenue + attribution and campaign effectiveness. + join_hint: + table: tabCampaign + 'on': campaign = tabCampaign.name + - name: represents_company + fieldtype: Link + label: Represents Company + description: The company entity that this invoice legally represents when operating + in a multi-company or franchise structure. + join_hint: + table: tabCompany + 'on': represents_company = tabCompany.name + - name: source + fieldtype: Link + label: Source + description: Identifies the origin or channel through which the sales invoice + was created, such as web, POS, or API integration. + join_hint: + table: tabLead Source + 'on': source = tabLead Source.name + - name: customer_group + fieldtype: Link + label: Customer Group + description: Categorizes the customer into a segment or classification for pricing, + discounts, or reporting purposes. + join_hint: + table: tabCustomer Group + 'on': customer_group = tabCustomer Group.name + - name: custom_zatca_full_response + fieldtype: Long Text + label: ZATCA Full Response + description: Contains the complete response from ZATCA (Saudi tax authority) e-invoicing + system for compliance and audit verification. + - name: is_internal_customer + fieldtype: Check + label: Is Internal Customer + description: Whether the invoice is for an internal customer or inter-company + transaction rather than an external third-party customer. + - name: is_discounted + fieldtype: Check + label: Is Discounted + description: Whether any discount has been applied to the invoice, useful for + filtering invoices with or without discounts. + - name: remarks + fieldtype: Small Text + label: Remarks + description: Additional notes or comments about the sales invoice such as special + instructions, delivery notes, or payment terms. + - name: custom_zatca_pos_name + fieldtype: Link + label: ZATCA POS Machine name + description: Point of sale terminal or device name for Saudi ZATCA e-invoicing + compliance and tax reporting. + join_hint: + table: tabZATCA Multiple Setting + 'on': custom_zatca_pos_name = tabZATCA Multiple Setting.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Sales Invoice document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabSales Invoice Advance + description: '' + fields: + - name: reference_type + fieldtype: Link + label: Reference Type + description: Type of document linked to this advance payment such as Sales Order + or Payment Entry + join_hint: + table: tabDocType + 'on': reference_type = tabDocType.name + - name: reference_name + fieldtype: Dynamic Link + label: Reference Name + description: Specific document number or ID of the referenced transaction that + this advance is allocated against + - name: remarks + fieldtype: Text + label: Remarks + description: Comments or notes explaining the reason for or details about the + advance payment allocation. + - name: reference_row + fieldtype: Data + label: Reference Row + description: Links to the specific row in the referenced advance document being + allocated against this invoice. + - name: advance_amount + fieldtype: Currency + label: Advance amount + description: The monetary value of the advance payment being applied or allocated + to this sales invoice. + - name: allocated_amount + fieldtype: Currency + label: Allocated amount + description: Amount of advance payment that has been applied or allocated against + the sales invoice. + - name: exchange_gain_loss + fieldtype: Currency + label: Exchange Gain/Loss + description: Gain or loss resulting from currency exchange rate differences between + advance payment and invoice allocation. + - name: ref_exchange_rate + fieldtype: Float + label: Reference Exchange Rate + description: Exchange rate used to convert the advance payment currency to the + invoice currency at time of allocation. + - name: difference_posting_date + fieldtype: Date + label: Difference Posting Date + description: Date when the difference amount between advance payment and actual + invoice is posted to accounting ledger. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabSales Invoice + Advance). Comparison-ready across parent records.' +- table: tabSales Invoice Item + description: '' + fields: + - name: barcode + fieldtype: Data + label: Barcode + description: Barcode value scanned or associated with the item at point of sale + - name: has_item_scanned + fieldtype: Check + label: Has Item Scanned + description: Indicates whether the item was added by scanning a barcode versus + manual entry + - name: item_code + fieldtype: Link + label: Item + description: Internal product identifier used when asking about specific items + sold, inventory SKUs, or product performance in sales. + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: item_name + fieldtype: Data + label: Item Name + description: Product or service name as it appears on the sales invoice, used + when searching by product description rather than code. + - name: customer_item_code + fieldtype: Data + label: Customer's Item Code + description: Customer's own product identifier for the item, used when customers + reference their internal part numbers or SKUs in sales inquiries. + - name: description + fieldtype: Text Editor + label: Description + description: Text description of the specific product or service sold on this + invoice line item + - name: item_group + fieldtype: Link + label: Item Group + description: Product category or classification for grouping similar items in + sales analysis + join_hint: + table: tabItem Group + 'on': item_group = tabItem Group.name + - name: brand + fieldtype: Data + label: Brand Name + description: Manufacturer or brand name of the product sold + - name: qty + fieldtype: Float + label: Quantity + description: Quantity of the item sold on this invoice line, used when asking + about units sold or invoice volume. + - name: stock_uom + fieldtype: Link + label: Stock UOM + description: Unit of measurement for the item quantity (e.g., pieces, kg, liters), + used when specifying or filtering by measurement units. + join_hint: + table: tabUOM + 'on': stock_uom = tabUOM.name + - name: uom + fieldtype: Link + label: UOM + description: Unit of measurement for the item quantity on the sales invoice line + (e.g., boxes, kilograms, pieces). + join_hint: + table: tabUOM + 'on': uom = tabUOM.name + - name: conversion_factor + fieldtype: Float + label: UOM Conversion Factor + description: Multiplier to convert the invoice line item quantity from the transaction + UOM to the base stock UOM. + - name: stock_qty + fieldtype: Float + label: Qty as per Stock UOM + description: Quantity of the item in base stock units after applying the conversion + factor from the transaction UOM. + - name: price_list_rate + fieldtype: Currency + label: Price List Rate + description: Item's standard selling price from the price list in transaction + currency before any discounts or margin adjustments. + - name: base_price_list_rate + fieldtype: Currency + label: Price List Rate (Company Currency) + description: Item's standard selling price from the price list converted to company's + base currency. + - name: margin_type + fieldtype: Select + label: Margin Type + description: Whether profit margin is calculated as a percentage or fixed amount + on this line item. + options: + - Percentage + - Amount + - name: margin_rate_or_amount + fieldtype: Float + label: Margin Rate or Amount + description: Profit margin added to base cost, used when calculating selling price + from cost price or analyzing markup on items sold. + - name: rate_with_margin + fieldtype: Currency + label: Rate With Margin + description: Final item rate after applying margin to base cost, used when querying + actual selling price including markup before discounts. + - name: discount_percentage + fieldtype: Percent + label: Discount (%) on Price List Rate with Margin + description: Percentage discount applied to item price, used when analyzing price + reductions or promotional discounts given to customers. + - name: discount_amount + fieldtype: Currency + label: Discount Amount + description: Direct discount applied to this invoice line item, used when calculating + item-level price reductions or promotional discounts. + - name: distributed_discount_amount + fieldtype: Currency + label: Distributed Discount Amount + description: Portion of invoice-level or header discount allocated to this line + item, used when analyzing how document-wide discounts affect individual items. + - name: base_rate_with_margin + fieldtype: Currency + label: Rate With Margin (Company Currency) + description: Item rate including profit margin before discounts, used when analyzing + markup or comparing selling price to cost. + - name: rate + fieldtype: Currency + label: Rate + description: Unit price per item on the sales invoice line before applying quantity + or discounts. + - name: amount + fieldtype: Currency + label: Amount + description: Total line item value after multiplying rate by quantity and applying + any item-level discounts. + - name: item_tax_template + fieldtype: Link + label: Item Tax Template + description: Tax rule or template applied to calculate taxes for this specific + invoice line item. + join_hint: + table: tabItem Tax Template + 'on': item_tax_template = tabItem Tax Template.name + - name: base_rate + fieldtype: Currency + label: Rate (Company Currency) + description: Unit price in company's base currency before any discounts, taxes, + or currency conversion. + - name: base_amount + fieldtype: Currency + label: Amount (Company Currency) + description: Total line amount in company's base currency (base_rate ร— quantity) + before discounts and taxes. + - name: pricing_rules + fieldtype: Small Text + label: Pricing Rules + description: Applied promotional or tiered pricing rules that determined the final + rate for this item. + - name: stock_uom_rate + fieldtype: Currency + label: Rate of Stock UOM + description: Rate per stock unit of measure when the item is sold in a different + UOM than the base stock UOM. + - name: is_free_item + fieldtype: Check + label: Is Free Item + description: Indicates whether this item was given at no charge as part of a promotion + or bundle. + - name: grant_commission + fieldtype: Check + label: Grant Commission + description: Indicates whether sales commission should be calculated and paid + for this particular item. + - name: net_rate + fieldtype: Currency + label: Net Rate + description: Price per unit after applying item-level discounts but before taxes, + used when asking about discounted unit pricing or margin calculations. + - name: net_amount + fieldtype: Currency + label: Net Amount + description: Total line item value after item-level discounts but before taxes, + used when asking about discounted line totals or pre-tax revenue. + - name: base_net_rate + fieldtype: Currency + label: Net Rate (Company Currency) + description: Price per unit after item-level discounts in company's base currency, + used for multi-currency reporting or consolidated financial analysis. + - name: base_net_amount + fieldtype: Currency + label: Net Amount (Company Currency) + description: Net invoice line amount in company base currency, used when analyzing + revenue or invoice totals across multiple currencies. + - name: delivered_by_supplier + fieldtype: Check + label: Delivered By Supplier + description: Indicates whether the item was shipped directly from supplier to + customer in a drop-shipping scenario. + - name: income_account + fieldtype: Link + label: Income Account + description: General ledger revenue account where this invoice line item's income + is recorded for financial reporting. + join_hint: + table: tabAccount + 'on': income_account = tabAccount.name + - name: is_fixed_asset + fieldtype: Check + label: Is Fixed Asset + description: Indicates whether the sold item is a fixed asset requiring depreciation + tracking rather than a regular inventory item. + - name: asset + fieldtype: Link + label: Asset + description: References the specific fixed asset record being sold or disposed + of in this invoice line. + join_hint: + table: tabAsset + 'on': asset = tabAsset.name + - name: finance_book + fieldtype: Link + label: Finance Book + description: Specifies which accounting book or ledger to use for recording depreciation + and asset transactions when selling fixed assets. + join_hint: + table: tabFinance Book + 'on': finance_book = tabFinance Book.name + - name: expense_account + fieldtype: Link + label: Expense Account + description: Account where the cost of goods sold or expense for this invoice + item is recorded when using perpetual inventory. + join_hint: + table: tabAccount + 'on': expense_account = tabAccount.name + - name: discount_account + fieldtype: Link + label: Discount Account + description: Account where discounts given on this invoice item are recorded as + contra-revenue or expense offsets. + join_hint: + table: tabAccount + 'on': discount_account = tabAccount.name + - name: deferred_revenue_account + fieldtype: Link + label: Deferred Revenue Account + description: Account where revenue for this invoice item is initially recorded + when revenue recognition is delayed until delivery or service completion. + join_hint: + table: tabAccount + 'on': deferred_revenue_account = tabAccount.name + - name: service_stop_date + fieldtype: Date + label: Service Stop Date + description: End date of service period for subscription or time-based items on + the invoice, used when calculating revenue recognition or service duration. + - name: enable_deferred_revenue + fieldtype: Check + label: Enable Deferred Revenue + description: Indicates whether this invoice item's revenue should be deferred + and recognized over time rather than immediately upon invoicing. + - name: service_start_date + fieldtype: Date + label: Service Start Date + description: Start date of service period for subscription or time-based items + on the invoice, used when calculating revenue recognition or service duration. + - name: service_end_date + fieldtype: Date + label: Service End Date + description: End date of service period for subscription or service-based invoice + line items. + - name: weight_per_unit + fieldtype: Float + label: Weight Per Unit + description: Weight of a single unit of the invoiced item, used for calculating + shipping costs or logistics planning. + - name: total_weight + fieldtype: Float + label: Total Weight + description: Combined weight of all units on this invoice line, calculated as + quantity times weight per unit. + - name: weight_uom + fieldtype: Link + label: Weight UOM + description: Unit of measurement for the item's weight on this invoice line. + join_hint: + table: tabUOM + 'on': weight_uom = tabUOM.name + - name: warehouse + fieldtype: Link + label: Warehouse + description: Warehouse from which the invoiced item was shipped or delivered. + join_hint: + table: tabWarehouse + 'on': warehouse = tabWarehouse.name + - name: target_warehouse + fieldtype: Link + label: Target Warehouse + description: Destination warehouse for items being transferred or delivered to + a different location than the source warehouse. + join_hint: + table: tabWarehouse + 'on': target_warehouse = tabWarehouse.name + - name: quality_inspection + fieldtype: Link + label: Quality Inspection + description: References the quality inspection record associated with this invoice + item when users need to verify inspection results or link invoices to quality + checks. + join_hint: + table: tabQuality Inspection + 'on': quality_inspection = tabQuality Inspection.name + - name: serial_and_batch_bundle + fieldtype: Link + label: Serial and Batch Bundle + description: Links to the bundled serial numbers and batch numbers for this invoice + item when tracking specific units or lots sold. + join_hint: + table: tabSerial and Batch Bundle + 'on': serial_and_batch_bundle = tabSerial and Batch Bundle.name + - name: use_serial_batch_fields + fieldtype: Check + label: Use Serial No / Batch Fields + description: Indicates whether this invoice item uses individual serial/batch + field entries instead of bundles when users need to understand the tracking + method applied. + - name: allow_zero_valuation_rate + fieldtype: Check + label: Allow Zero Valuation Rate + description: Indicates whether this invoice item can have a zero valuation rate + for inventory costing purposes. + - name: incoming_rate + fieldtype: Currency + label: Incoming Rate (Costing) + description: The original purchase or stock valuation rate of the item at the + time it entered inventory, used to calculate profit margins. + - name: item_tax_rate + fieldtype: Small Text + label: Item Tax Rate + description: The specific tax rate or tax configuration applied to this individual + invoice item, which may differ from the default tax rate. + - name: actual_batch_qty + fieldtype: Float + label: Available Batch Qty at Warehouse + description: Quantity of items from a specific batch included in this invoice + line, used when tracking batch-level inventory movements in sales. + - name: serial_no + fieldtype: Text + label: Serial No + description: Unique serial number of the individual item sold, used when querying + sales of specific serialized products or tracking warranty and service history. + - name: batch_no + fieldtype: Link + label: Batch No + description: Batch or lot identifier for the items sold, used when tracing product + batches for quality control, expiration tracking, or recall purposes. + join_hint: + table: tabBatch + 'on': batch_no = tabBatch.name + - name: actual_qty + fieldtype: Float + label: Qty (Warehouse) + description: Quantity of this item physically available in stock at the warehouse + at the time of invoice creation. + - name: company_total_stock + fieldtype: Float + label: Qty (Company) + description: Total quantity of this item available across all warehouses in the + company at the time of invoice creation. + - name: sales_order + fieldtype: Link + label: Sales Order + description: Reference to the originating sales order document that this invoice + item was created from. + join_hint: + table: tabSales Order + 'on': sales_order = tabSales Order.name + - name: so_detail + fieldtype: Data + label: Sales Order Item + description: Links invoice line item to the originating sales order line for tracking + fulfillment and order-to-invoice reconciliation. + - name: sales_invoice_item + fieldtype: Data + label: Sales Invoice Item + description: Unique identifier for this specific line item on the sales invoice. + - name: delivery_note + fieldtype: Link + label: Delivery Note + description: Links invoice line item to the delivery note that recorded the physical + shipment of these goods. + join_hint: + table: tabDelivery Note + 'on': delivery_note = tabDelivery Note.name + - name: dn_detail + fieldtype: Data + label: Delivery Note Item + description: Links to the specific delivery note line item that fulfilled this + invoice item, used when tracking which delivery corresponds to which invoice. + - name: delivered_qty + fieldtype: Float + label: Delivered Qty + description: Actual quantity delivered to the customer for this invoice line, + used when verifying fulfillment or comparing billed versus delivered amounts. + - name: pos_invoice + fieldtype: Link + label: POS Invoice + description: Indicates whether this invoice was created through the point-of-sale + system, used when filtering retail versus regular sales transactions. + join_hint: + table: tabPOS Invoice + 'on': pos_invoice = tabPOS Invoice.name + - name: pos_invoice_item + fieldtype: Data + label: POS Invoice Item + description: Links to the point-of-sale invoice item when the sales invoice originated + from a POS transaction. + - name: purchase_order + fieldtype: Link + label: Purchase Order + description: References the original purchase order when the sales invoice is + related to a drop-ship or back-to-back sales scenario. + join_hint: + table: tabPurchase Order + 'on': purchase_order = tabPurchase Order.name + - name: purchase_order_item + fieldtype: Data + label: Purchase Order Item + description: References the specific purchase order line item when the sales invoice + item is linked to procurement for drop-ship or back-to-back fulfillment. + - name: cost_center + fieldtype: Link + label: Cost Center + description: Department or business unit to which this invoice line item's revenue + or expense is allocated for financial tracking and analysis. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + - name: project + fieldtype: Link + label: Project + description: Specific project associated with this invoice line item for project-based + billing and cost allocation. + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: page_break + fieldtype: Check + label: Page Break + description: Indicates whether a page break should occur before this line item + when printing the sales invoice. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabSales Invoice + Item). Comparison-ready across parent records.' +- table: tabSales Invoice Payment + description: '' + fields: + - name: default + fieldtype: Check + label: Default + description: Indicates whether this is the default or primary payment method selected + for the sales invoice + - name: mode_of_payment + fieldtype: Link + label: Mode of Payment + description: The payment method used for this transaction such as cash, credit + card, bank transfer, or check + join_hint: + table: tabMode of Payment + 'on': mode_of_payment = tabMode of Payment.name + - name: amount + fieldtype: Currency + label: Amount + description: Payment amount received or applied against the sales invoice + - name: reference_no + fieldtype: Data + label: Reference No + description: External reference number from the payment transaction such as check + number, transaction ID, or bank reference + - name: account + fieldtype: Link + label: Account + description: Financial account or bank account where the payment was deposited + or processed + join_hint: + table: tabAccount + 'on': account = tabAccount.name + - name: base_amount + fieldtype: Currency + label: Base Amount (Company Currency) + description: The payment amount in the company's base currency, used when calculating + total payments received or analyzing cash flow across invoices. + - name: clearance_date + fieldtype: Date + label: Clearance Date + description: The date when the payment was confirmed or cleared by the bank, used + when reconciling payments or analyzing actual cash receipt timing. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabSales Invoice + Payment). Comparison-ready across parent records.' +- table: tabSales Invoice Timesheet + description: '' + fields: + - name: activity_type + fieldtype: Link + label: Activity Type + description: Category or type of billable activity performed during the timesheet + period + join_hint: + table: tabActivity Type + 'on': activity_type = tabActivity Type.name + - name: description + fieldtype: Small Text + label: Description + description: Detailed notes or explanation of the work performed in this timesheet + entry + - name: from_time + fieldtype: Datetime + label: From Time + description: Start time of the timesheet entry for billing a specific work period + on the sales invoice + - name: to_time + fieldtype: Datetime + label: To Time + description: End time of the timesheet entry for billing a specific work period + on the sales invoice + - name: billing_hours + fieldtype: Float + label: Billing Hours + description: Total billable hours calculated for this timesheet entry that will + be invoiced to the customer + - name: billing_amount + fieldtype: Currency + label: Billing Amount + description: Amount billed to customer for this timesheet entry on the sales invoice. + - name: time_sheet + fieldtype: Link + label: Time Sheet + description: Reference to the timesheet document from which this billable time + was invoiced. + join_hint: + table: tabTimesheet + 'on': time_sheet = tabTimesheet.name + - name: timesheet_detail + fieldtype: Data + label: Timesheet Detail + description: Specific line item or detail row from the timesheet that corresponds + to this invoice charge. + - name: project_name + fieldtype: Data + label: Project Name + description: Name of the project associated with the timesheet entries being invoiced. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabSales Invoice + Timesheet). Comparison-ready across parent records.' +- table: tabSales Order + description: '' + fields: + - name: title + fieldtype: Data + label: Title + description: Customer's purchase order number or reference name they use to identify + this order. + - name: naming_series + fieldtype: Select + label: Series + description: Prefix pattern used to generate the sales order name, determining + the numbering format for orders. + options: + - SAL-ORD-.YYYY.- + - name: customer + fieldtype: Link + label: Customer + description: Unique identifier linking to the customer account that placed the + sales order. + join_hint: + table: tabCustomer + 'on': customer = tabCustomer.name + - name: customer_name + fieldtype: Data + label: Customer Name + description: Display name of the customer for human-readable queries about who + ordered. + - name: tax_id + fieldtype: Data + label: Tax Id + description: Tax identification number of the customer for tax reporting and compliance + queries. + - name: order_type + fieldtype: Select + label: Order Type + description: Category or classification of the sales order such as standard sale, + return, exchange, or wholesale transaction. + options: + - Sales + - Maintenance + - Shopping Cart + - name: transaction_date + fieldtype: Date + label: Date + description: Date when the sales order was created or recorded in the system. + - name: delivery_date + fieldtype: Date + label: Delivery Date + description: Date when the order is scheduled to be delivered or was actually + delivered to the customer. + - name: po_no + fieldtype: Data + label: Customer's Purchase Order + description: Customer's purchase order number used to match sales orders to customer + procurement documents and inquiries. + - name: po_date + fieldtype: Date + label: Customer's Purchase Order Date + description: Date on the customer's purchase order, used to track customer order + timing and resolve discrepancies between customer records and sales orders. + - name: company + fieldtype: Link + label: Company + description: Company entity that owns this sales order, used to filter orders + by legal entity or business unit in multi-company environments. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: skip_delivery_note + fieldtype: Check + label: Skip Delivery Note + description: Whether this sales order bypasses delivery note creation and ships + directly, relevant when users ask about orders with direct shipping or no intermediate + delivery documentation. + - name: has_unit_price_items + fieldtype: Check + label: Has Unit Price Items + description: Indicates if the sales order contains line items priced per unit + rather than bulk or alternative pricing methods, useful for filtering orders + by pricing structure type. + - name: amended_from + fieldtype: Link + label: Amended From + description: References the original sales order that this order amends or corrects, + used when tracking order corrections, amendments, or version history. + join_hint: + table: tabSales Order + 'on': amended_from = tabSales Order.name + - name: cost_center + fieldtype: Link + label: Cost Center + description: Department or business unit to which the sales order revenue or costs + are allocated for internal accounting and profitability analysis. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + - name: project + fieldtype: Link + label: Project + description: Specific project or job associated with the sales order for tracking + project-based revenue and deliverables. + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: currency + fieldtype: Link + label: Currency + description: Currency in which the sales order prices, totals, and payment are + denominated. + join_hint: + table: tabCurrency + 'on': currency = tabCurrency.name + - name: conversion_rate + fieldtype: Float + label: Exchange Rate + description: Exchange rate applied to convert transaction currency to company + base currency for this sales order + - name: selling_price_list + fieldtype: Link + label: Price List + description: Name or identifier of the price list used to determine item prices + for this sales order + join_hint: + table: tabPrice List + 'on': selling_price_list = tabPrice List.name + - name: price_list_currency + fieldtype: Link + label: Price List Currency + description: Currency in which the price list prices are denominated, may differ + from transaction or base currency + join_hint: + table: tabCurrency + 'on': price_list_currency = tabCurrency.name + - name: plc_conversion_rate + fieldtype: Float + label: Price List Exchange Rate + description: Exchange rate used to convert price list currency to transaction + currency for this sales order. + - name: ignore_pricing_rule + fieldtype: Check + label: Ignore Pricing Rule + description: Indicates whether automatic pricing rules and discounts are bypassed + for this sales order. + - name: scan_barcode + fieldtype: Data + label: Scan Barcode + description: Barcode value scanned to quickly add items to the sales order. + - name: last_scanned_warehouse + fieldtype: Data + label: Last Scanned Warehouse + description: Warehouse location captured from the most recent barcode or scanner + input during order processing or fulfillment. + - name: set_warehouse + fieldtype: Link + label: Set Source Warehouse + description: Default or assigned warehouse designated for fulfilling items on + this sales order. + join_hint: + table: tabWarehouse + 'on': set_warehouse = tabWarehouse.name + - name: reserve_stock + fieldtype: Check + label: Reserve Stock + description: Indicates whether inventory is reserved or allocated for this sales + order to prevent overselling. + - name: items + fieldtype: Table + label: Items + description: '' + child_hint: + child_table: tabSales Order Item + fieldname: items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: items + - name: total_qty + fieldtype: Float + label: Total Quantity + description: Total quantity of all items ordered across all line items in the + sales order + - name: total_net_weight + fieldtype: Float + label: Total Net Weight + description: Combined net weight of all items in the sales order excluding packaging + - name: base_total + fieldtype: Currency + label: Total (Company Currency) + description: Grand total of the sales order in company's base currency including + taxes and charges. + - name: base_net_total + fieldtype: Currency + label: Net Total (Company Currency) + description: Sum of all line item amounts in company's base currency before applying + taxes, discounts, or additional charges. + - name: total + fieldtype: Currency + label: Total + description: Grand total of the sales order in transaction currency including + taxes and charges. + - name: net_total + fieldtype: Currency + label: Net Total + description: Total sales order amount before applying any taxes or additional + charges + - name: tax_category + fieldtype: Link + label: Tax Category + description: Classification that determines which tax rules apply to this sales + order based on customer type or location + join_hint: + table: tabTax Category + 'on': tax_category = tabTax Category.name + - name: taxes_and_charges + fieldtype: Link + label: Sales Taxes and Charges Template + description: Template or rule set defining specific tax rates and additional charges + applied to calculate the final order amount + join_hint: + table: tabSales Taxes and Charges Template + 'on': taxes_and_charges = tabSales Taxes and Charges Template.name + - name: shipping_rule + fieldtype: Link + label: Shipping Rule + description: Defines how shipping charges are calculated or applied to the order, + such as free shipping, flat rate, or carrier-based pricing. + join_hint: + table: tabShipping Rule + 'on': shipping_rule = tabShipping Rule.name + - name: incoterm + fieldtype: Link + label: Incoterm + description: International commercial term specifying which party bears shipping + costs, risks, and responsibilities during delivery (e.g., FOB, CIF, EXW). + join_hint: + table: tabIncoterm + 'on': incoterm = tabIncoterm.name + - name: named_place + fieldtype: Data + label: Named Place + description: Specific geographic location associated with the incoterm where risk + and cost transfer occurs, such as port of loading or destination city. + - name: taxes + fieldtype: Table + label: Sales Taxes and Charges + description: '' + child_hint: + child_table: tabSales Taxes and Charges + fieldname: taxes + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: taxes + - name: base_total_taxes_and_charges + fieldtype: Currency + label: Total Taxes and Charges (Company Currency) + description: Total sum of all taxes and additional charges in the company's base + currency before any currency conversion. + - name: total_taxes_and_charges + fieldtype: Currency + label: Total Taxes and Charges + description: Total sum of all taxes and additional charges in the transaction + currency after applying tax rules and rates. + - name: base_grand_total + fieldtype: Currency + label: Grand Total (Company Currency) + description: Total sales order value in company base currency before any rounding + adjustments are applied. + - name: base_rounding_adjustment + fieldtype: Currency + label: Rounding Adjustment (Company Currency) + description: Amount added or subtracted in base currency to round the final total + to a convenient number. + - name: base_rounded_total + fieldtype: Currency + label: Rounded Total (Company Currency) + description: Final sales order total in base currency after applying rounding + adjustment, used for actual payment amount. + - name: base_in_words + fieldtype: Data + label: In Words (Company Currency) + description: Grand total amount expressed as text words for check writing or formal + documentation purposes. + - name: grand_total + fieldtype: Currency + label: Grand Total + description: Final total amount of the sales order including all items, taxes, + charges, and adjustments that the customer must pay. + - name: rounding_adjustment + fieldtype: Currency + label: Rounding Adjustment + description: Small amount added or subtracted to round the final total to a convenient + number, typically to nearest whole currency unit. + - name: rounded_total + fieldtype: Currency + label: Rounded Total + description: Final invoice amount after applying rounding adjustments to the grand + total + - name: in_words + fieldtype: Data + label: In Words + description: Grand total amount expressed as text words for printing on invoices + and official documents + - name: advance_paid + fieldtype: Currency + label: Advance Paid + description: Amount of advance payment or deposit received from customer before + order fulfillment + - name: disable_rounded_total + fieldtype: Check + label: Disable Rounded Total + description: Whether rounding is disabled for the total amount on this sales order, + relevant when users ask about exact vs rounded totals. + - name: apply_discount_on + fieldtype: Select + label: Apply Additional Discount On + description: Specifies whether discounts are calculated on grand total or net + total, used when users need to understand discount calculation basis. + options: + - Grand Total + - Net Total + - name: base_discount_amount + fieldtype: Currency + label: Additional Discount Amount (Company Currency) + description: Total discount amount in base currency before any currency conversion, + used for multi-currency discount analysis and reporting. + - name: coupon_code + fieldtype: Link + label: Coupon Code + description: Promotional or marketing code applied to the sales order for tracking + campaign-based discounts. + join_hint: + table: tabCoupon Code + 'on': coupon_code = tabCoupon Code.name + - name: additional_discount_percentage + fieldtype: Float + label: Additional Discount Percentage + description: Extra percentage discount applied beyond standard pricing or coupon + discounts. + - name: discount_amount + fieldtype: Currency + label: Additional Discount Amount + description: Total monetary value of all discounts applied to the sales order. + - name: other_charges_calculation + fieldtype: Text Editor + label: Taxes and Charges Calculation + description: Additional fees or charges applied to the sales order beyond standard + item pricing, such as shipping, handling, or service fees. + - name: packed_items + fieldtype: Table + label: Packed Items + description: '' + child_hint: + child_table: tabPacked Item + fieldname: packed_items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: packed_items + - name: pricing_rules + fieldtype: Table + label: Pricing Rule Detail + description: '' + child_hint: + child_table: tabPricing Rule Detail + fieldname: pricing_rules + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: pricing_rules + - name: customer_address + fieldtype: Link + label: Customer Address + description: Specific address record linked to the customer where the order will + be shipped or billed. + join_hint: + table: tabAddress + 'on': customer_address = tabAddress.name + - name: address_display + fieldtype: Small Text + label: Address + description: Formatted full address text showing the complete shipping or billing + address for display purposes. + - name: customer_group + fieldtype: Link + label: Customer Group + description: Classification or segment of the customer such as wholesale, retail, + or VIP for pricing and business rules. + join_hint: + table: tabCustomer Group + 'on': customer_group = tabCustomer Group.name + - name: territory + fieldtype: Link + label: Territory + description: Geographic sales region or area assigned to this sales order for + regional performance tracking and commission allocation + join_hint: + table: tabTerritory + 'on': territory = tabTerritory.name + - name: contact_person + fieldtype: Link + label: Contact Person + description: Primary contact person ID or reference at the customer organization + for this sales order + join_hint: + table: tabContact + 'on': contact_person = tabContact.name + - name: contact_display + fieldtype: Small Text + label: Contact + description: Formatted display name of the contact person for this sales order, + used when showing human-readable contact information + - name: contact_phone + fieldtype: Data + label: Phone + description: Primary landline or office phone number for reaching the customer + about this sales order + - name: contact_mobile + fieldtype: Small Text + label: Mobile No + description: Mobile or cell phone number for reaching the customer about this + sales order + - name: contact_email + fieldtype: Data + label: Contact Email + description: Email address for sending order confirmations, invoices, and updates + to the customer + - name: shipping_address_name + fieldtype: Link + label: Shipping Address Name + description: Name or label identifying the shipping destination (e.g., 'Main Warehouse', + 'Customer Site B') where the order will be delivered. + join_hint: + table: tabAddress + 'on': shipping_address_name = tabAddress.name + - name: shipping_address + fieldtype: Small Text + label: Shipping Address + description: Full physical address details where the order will be shipped to + the customer or end recipient. + - name: dispatch_address_name + fieldtype: Link + label: Dispatch Address Name + description: Name or label identifying the origin location (e.g., 'Distribution + Center A', 'Factory 1') from where the order will be dispatched or sent. + join_hint: + table: tabAddress + 'on': dispatch_address_name = tabAddress.name + - name: dispatch_address + fieldtype: Small Text + label: Dispatch Address + description: Address where ordered goods will be shipped or delivered to the customer. + - name: company_address + fieldtype: Link + label: Company Address Name + description: Address of the company location or branch processing this sales order. + join_hint: + table: tabAddress + 'on': company_address = tabAddress.name + - name: company_address_display + fieldtype: Small Text + label: Company Address + description: Formatted version of the company address for display on documents + like invoices and sales order printouts. + - name: company_contact_person + fieldtype: Link + label: Company Contact Person + description: Primary contact person at the customer's company for this sales order. + join_hint: + table: tabContact + 'on': company_contact_person = tabContact.name + - name: payment_terms_template + fieldtype: Link + label: Payment Terms Template + description: Template defining standard payment conditions like net 30 or due + on receipt applied to this order. + join_hint: + table: tabPayment Terms Template + 'on': payment_terms_template = tabPayment Terms Template.name + - name: payment_schedule + fieldtype: Table + label: Payment Schedule + description: '' + child_hint: + child_table: tabPayment Schedule + fieldname: payment_schedule + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: payment_schedule + - name: tc_name + fieldtype: Link + label: Terms + description: Terms and conditions document name or identifier associated with + the sales order + join_hint: + table: tabTerms and Conditions + 'on': tc_name = tabTerms and Conditions.name + - name: terms + fieldtype: Text Editor + label: Terms and Conditions Details + description: Payment terms specifying when payment is due such as net 30, due + on receipt, or installment schedules + - name: status + fieldtype: Select + label: Status + description: Current state of the sales order such as draft, confirmed, shipped, + invoiced, or cancelled + options: + - Draft + - On Hold + - To Deliver and Bill + - To Bill + - To Deliver + - Completed + - Cancelled + - Closed + - name: delivery_status + fieldtype: Select + label: Delivery Status + description: Current fulfillment state of the order such as not delivered, partially + delivered, fully delivered, or closed. + options: + - Not Delivered + - Fully Delivered + - Partly Delivered + - Closed + - Not Applicable + - name: per_delivered + fieldtype: Percent + label: '% Delivered' + description: Percentage of ordered quantity that has been physically delivered + to the customer. + - name: per_billed + fieldtype: Percent + label: '% Amount Billed' + description: Percentage of the order value that has been invoiced to the customer. + - name: per_picked + fieldtype: Percent + label: '% Picked' + description: Percentage of ordered items that have been physically picked from + inventory for this sales order. + - name: billing_status + fieldtype: Select + label: Billing Status + description: Current invoicing state of the sales order indicating whether it + is unbilled, partially billed, or fully billed. + options: + - Not Billed + - Fully Billed + - Partly Billed + - Closed + - name: sales_partner + fieldtype: Link + label: Sales Partner + description: External partner or intermediary who referred or facilitated this + sales order and may receive commission. + join_hint: + table: tabSales Partner + 'on': sales_partner = tabSales Partner.name + - name: amount_eligible_for_commission + fieldtype: Currency + label: Amount Eligible for Commission + description: Sales order revenue amount that qualifies for commission calculation, + excluding non-commissionable items or adjustments. + - name: commission_rate + fieldtype: Float + label: Commission Rate + description: Percentage rate applied to eligible amount to calculate sales commission + for this order. + - name: total_commission + fieldtype: Currency + label: Total Commission + description: Final commission amount earned on this sales order after applying + the commission rate to eligible amount. + - name: sales_team + fieldtype: Table + label: Sales Team + description: '' + child_hint: + child_table: tabSales Team + fieldname: sales_team + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: sales_team + - name: loyalty_points + fieldtype: Int + label: Loyalty Points + description: Number of reward points earned or redeemed through this sales order + transaction. + - name: loyalty_amount + fieldtype: Currency + label: Loyalty Amount + description: Monetary value in currency associated with loyalty points for this + sales order, used when calculating loyalty program costs or customer rewards + in financial terms. + - name: from_date + fieldtype: Date + label: From Date + description: Start date of the sales order validity period or delivery schedule. + - name: to_date + fieldtype: Date + label: To Date + description: End date of the sales order validity period or delivery schedule. + - name: auto_repeat + fieldtype: Link + label: Auto Repeat + description: Indicates whether this sales order automatically recurs on a scheduled + basis. + join_hint: + table: tabAuto Repeat + 'on': auto_repeat = tabAuto Repeat.name + - name: letter_head + fieldtype: Link + label: Letter Head + description: Letterhead template used when printing or emailing this sales order + document + join_hint: + table: tabLetter Head + 'on': letter_head = tabLetter Head.name + - name: group_same_items + fieldtype: Check + label: Group same items + description: Whether identical items are consolidated into single lines when printing + the sales order + - name: select_print_heading + fieldtype: Link + label: Print Heading + description: Custom heading text that appears at the top of the printed sales + order instead of the default title + join_hint: + table: tabPrint Heading + 'on': select_print_heading = tabPrint Heading.name + - name: language + fieldtype: Data + label: Print Language + description: Language preference for the sales order document and customer communications. + - name: is_internal_customer + fieldtype: Check + label: Is Internal Customer + description: Indicates whether the customer is an internal entity within the organization + for inter-company transactions. + - name: represents_company + fieldtype: Link + label: Represents Company + description: The company entity that this sales order represents in multi-company + or subsidiary scenarios. + join_hint: + table: tabCompany + 'on': represents_company = tabCompany.name + - name: source + fieldtype: Link + label: Source + description: Origin or channel through which the sales order was created, such + as website, phone, email, or partner referral. + join_hint: + table: tabLead Source + 'on': source = tabLead Source.name + - name: inter_company_order_reference + fieldtype: Link + label: Inter Company Order Reference + description: Reference to the corresponding purchase order when this sales order + is between related company entities. + join_hint: + table: tabPurchase Order + 'on': inter_company_order_reference = tabPurchase Order.name + - name: campaign + fieldtype: Link + label: Campaign + description: Marketing campaign or promotion associated with this sales order + for tracking campaign effectiveness and attribution. + join_hint: + table: tabCampaign + 'on': campaign = tabCampaign.name + - name: party_account_currency + fieldtype: Link + label: Party Account Currency + description: Currency used for the customer's account balance and transactions + in this sales order + join_hint: + table: tabCurrency + 'on': party_account_currency = tabCurrency.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Sales Order document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabSales Order Item + description: '' + fields: + - name: item_code + fieldtype: Link + label: Item Code + description: Internal product/SKU code used to identify what item is being sold + in this order line + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: customer_item_code + fieldtype: Data + label: Customer's Item Code + description: Customer's own product code or SKU for the item, used when customer + references items by their internal numbering system + - name: ensure_delivery_based_on_produced_serial_no + fieldtype: Check + label: Ensure Delivery Based on Produced Serial No + description: Whether this item requires delivery only after a specific serial + number is manufactured or produced. + - name: is_stock_item + fieldtype: Check + label: Is Stock Item + description: Whether this item is a physical inventory item that requires stock + tracking, as opposed to a service or non-inventory item. + - name: reserve_stock + fieldtype: Check + label: Reserve Stock + description: Whether inventory quantity is reserved or allocated for this sales + order item to prevent overselling. + - name: delivery_date + fieldtype: Date + label: Delivery Date + description: Date when the ordered item is scheduled to be delivered to the customer + - name: item_name + fieldtype: Data + label: Item Name + description: Name or title of the product being sold in this order line + - name: description + fieldtype: Text Editor + label: Description + description: Detailed text explaining the item specifications, features, or custom + requirements for this order line + - name: item_group + fieldtype: Link + label: Item Group + description: Product category or classification for filtering and analyzing sales + by product type. + join_hint: + table: tabItem Group + 'on': item_group = tabItem Group.name + - name: brand + fieldtype: Link + label: Brand Name + description: Manufacturer or brand name of the sold item for brand-specific sales + analysis. + join_hint: + table: tabBrand + 'on': brand = tabBrand.name + - name: qty + fieldtype: Float + label: Quantity + description: Quantity of the item ordered by the customer in the specified unit + of measure. + - name: stock_uom + fieldtype: Link + label: Stock UOM + description: Base inventory unit of measure for the item as maintained in stock + records. + join_hint: + table: tabUOM + 'on': stock_uom = tabUOM.name + - name: uom + fieldtype: Link + label: UOM + description: Unit of measure for the ordered quantity as specified on this sales + order line, which may differ from the stock unit. + join_hint: + table: tabUOM + 'on': uom = tabUOM.name + - name: conversion_factor + fieldtype: Float + label: UOM Conversion Factor + description: Multiplier to convert the sales order item quantity from its sales + unit of measure to the stock/inventory unit of measure. + - name: stock_qty + fieldtype: Float + label: Qty as per Stock UOM + description: Total quantity of the sales order item expressed in the stock/inventory + unit of measure after applying conversion factor. + - name: stock_reserved_qty + fieldtype: Float + label: Stock Reserved Qty (in Stock UOM) + description: Quantity of inventory physically reserved or allocated from warehouse + stock specifically for this sales order item. + - name: price_list_rate + fieldtype: Currency + label: Price List Rate + description: Item's standard catalog price in transaction currency before discounts + or negotiations. + - name: base_price_list_rate + fieldtype: Currency + label: Price List Rate (Company Currency) + description: Item's standard catalog price converted to company base currency. + - name: margin_type + fieldtype: Select + label: Margin Type + description: Whether profit margin is calculated as a percentage or fixed amount. + options: + - Percentage + - Amount + - name: margin_rate_or_amount + fieldtype: Float + label: Margin Rate or Amount + description: Profit margin added to base cost, used when calculating selling price + from cost or analyzing markup on individual line items. + - name: rate_with_margin + fieldtype: Currency + label: Rate With Margin + description: Final unit price after applying margin to base cost, used when comparing + marked-up price versus discounted price or analyzing pre-discount selling price. + - name: discount_percentage + fieldtype: Percent + label: Discount (%) on Price List Rate with Margin + description: Percentage reduction applied to selling price, used when analyzing + price concessions, promotional discounts, or customer-specific pricing adjustments. + - name: discount_amount + fieldtype: Currency + label: Discount Amount + description: Discount applied directly to this sales order line item, used when + calculating item-level price reductions or promotional discounts. + - name: distributed_discount_amount + fieldtype: Currency + label: Distributed Discount Amount + description: Portion of order-level or header discount allocated to this line + item, used when header discounts are apportioned across items. + - name: base_rate_with_margin + fieldtype: Currency + label: Rate With Margin (Company Currency) + description: Item unit price including profit margin before discounts, used when + analyzing pricing with markup or comparing to cost. + - name: rate + fieldtype: Currency + label: Rate + description: Unit price per item before taxes and discounts applied to the line + item. + - name: amount + fieldtype: Currency + label: Amount + description: Total line item value after applying quantity, rate, and discounts + but before taxes. + - name: item_tax_template + fieldtype: Link + label: Item Tax Template + description: Tax configuration template applied to calculate taxes for this specific + line item. + join_hint: + table: tabItem Tax Template + 'on': item_tax_template = tabItem Tax Template.name + - name: base_rate + fieldtype: Currency + label: Basic Rate (Company Currency) + description: Unit price of the item before applying pricing rules, discounts, + or currency conversions. + - name: base_amount + fieldtype: Currency + label: Amount (Company Currency) + description: Total line amount in base currency before applying pricing rules + or discounts (base_rate ร— quantity). + - name: pricing_rules + fieldtype: Small Text + label: Pricing Rules + description: Specific promotional or conditional pricing rules applied to calculate + the final item price. + - name: stock_uom_rate + fieldtype: Currency + label: Rate of Stock UOM + description: Rate per unit in the stock unit of measure, used when querying item + pricing in base inventory units rather than sales units. + - name: is_free_item + fieldtype: Check + label: Is Free Item + description: Indicates whether the item is provided at no charge as a promotion + or bundle component. + - name: grant_commission + fieldtype: Check + label: Grant Commission + description: Indicates whether this line item is eligible for sales commission + calculation. + - name: net_rate + fieldtype: Currency + label: Net Rate + description: Price per unit after applying item-level discounts but before taxes, + in transaction currency. + - name: net_amount + fieldtype: Currency + label: Net Amount + description: Total line item value after item-level discounts but before taxes, + in transaction currency. + - name: base_net_rate + fieldtype: Currency + label: Net Rate (Company Currency) + description: Price per unit after applying item-level discounts but before taxes, + converted to company's base currency. + - name: base_net_amount + fieldtype: Currency + label: Net Amount (Company Currency) + description: Net sales value of the line item in base currency after discounts + but before taxes. + - name: billed_amt + fieldtype: Currency + label: Billed Amt + description: Total amount already invoiced for this sales order line item, used + to track billing progress against ordered quantity. + - name: valuation_rate + fieldtype: Currency + label: Valuation Rate + description: Cost or inventory valuation rate per unit used for margin analysis + and COGS calculation, distinct from selling price. + - name: gross_profit + fieldtype: Currency + label: Gross Profit + description: Profit amount for this sales order line item calculated as revenue + minus cost of goods sold. + - name: delivered_by_supplier + fieldtype: Check + label: Supplier delivers to Customer + description: Indicates whether this item is shipped directly from the supplier + to the customer rather than from company inventory. + - name: supplier + fieldtype: Link + label: Supplier + description: The vendor who supplies or drop-ships this specific item on the sales + order. + join_hint: + table: tabSupplier + 'on': supplier = tabSupplier.name + - name: weight_per_unit + fieldtype: Float + label: Weight Per Unit + description: Weight of a single unit of the ordered item, used when calculating + shipping costs or comparing product weights per piece. + - name: total_weight + fieldtype: Float + label: Total Weight + description: Combined weight of all units in this order line item, used for total + shipment weight and freight calculations. + - name: weight_uom + fieldtype: Link + label: Weight UOM + description: Unit of measurement for weight fields (e.g., kg, lbs, oz), used to + interpret weight_per_unit and total_weight values. + join_hint: + table: tabUOM + 'on': weight_uom = tabUOM.name + - name: warehouse + fieldtype: Link + label: Delivery Warehouse + description: Warehouse from which the ordered item will be delivered or fulfilled + to the customer. + join_hint: + table: tabWarehouse + 'on': warehouse = tabWarehouse.name + - name: target_warehouse + fieldtype: Link + label: Customer Warehouse (Optional) + description: Destination warehouse where the item should be transferred or moved + as part of the sales order. + join_hint: + table: tabWarehouse + 'on': target_warehouse = tabWarehouse.name + - name: prevdoc_docname + fieldtype: Link + label: Quotation + description: Reference to the preceding document that generated this sales order + item, such as a quotation or sales inquiry number. + join_hint: + table: tabQuotation + 'on': prevdoc_docname = tabQuotation.name + - name: quotation_item + fieldtype: Data + label: quotation_item + description: Links this sales order line item to the original quotation line item + it was created from. + - name: against_blanket_order + fieldtype: Check + label: Against Blanket Order + description: Indicates whether this sales order item is fulfilling a blanket order + agreement. + - name: blanket_order + fieldtype: Link + label: Blanket Order + description: References the specific blanket order contract that this sales order + item is drawn against. + join_hint: + table: tabBlanket Order + 'on': blanket_order = tabBlanket Order.name + - name: blanket_order_rate + fieldtype: Currency + label: Blanket Order Rate + description: Price per unit from a blanket purchase agreement applied to this + sales order line item. + - name: actual_qty + fieldtype: Float + label: Qty (Warehouse) + description: Quantity of this item currently available in stock at the time of + the sales order. + - name: company_total_stock + fieldtype: Float + label: Qty (Company) + description: Total quantity of this item available across all warehouses company-wide + when the sales order was created. + - name: bom_no + fieldtype: Link + label: BOM No + description: Bill of materials number for manufactured or assembled items on the + sales order line. + join_hint: + table: tabBOM + 'on': bom_no = tabBOM.name + - name: projected_qty + fieldtype: Float + label: Projected Qty + description: Expected available quantity after accounting for pending stock movements + and reservations. + - name: ordered_qty + fieldtype: Float + label: Ordered Qty + description: Quantity of the item that the customer ordered on this sales order + line. + - name: planned_qty + fieldtype: Float + label: Planned Quantity + description: Quantity planned for delivery or fulfillment on this sales order + line item. + - name: production_plan_qty + fieldtype: Float + label: Production Plan Qty + description: Quantity allocated to production planning for manufacturing this + item to fulfill the sales order. + - name: work_order_qty + fieldtype: Float + label: Work Order Qty + description: Quantity already issued to active work orders for manufacturing this + sales order item. + - name: delivered_qty + fieldtype: Float + label: Delivered Qty + description: Quantity of items actually delivered to the customer for this sales + order line. + - name: produced_qty + fieldtype: Float + label: Produced Quantity + description: Quantity of items manufactured or produced to fulfill this sales + order line. + - name: returned_qty + fieldtype: Float + label: Returned Qty + description: Quantity of items returned by the customer after delivery for this + sales order line. + - name: picked_qty + fieldtype: Float + label: Picked Qty (in Stock UOM) + description: Quantity of items physically picked from inventory for this order + line, used when tracking fulfillment progress or comparing picked versus ordered + amounts. + - name: additional_notes + fieldtype: Text + label: Additional Notes + description: Free-text notes or comments specific to this individual order line + item, used when searching for special instructions or item-level remarks. + - name: page_break + fieldtype: Check + label: Page Break + description: Controls whether a page break occurs before this line item when printing + or generating sales order documents. + - name: item_tax_rate + fieldtype: Code + label: Item Tax Rate + description: Tax percentage applied to this specific line item for calculating + tax amounts on the ordered product. + - name: transaction_date + fieldtype: Date + label: Sales Order Date + description: Date when the sales order transaction was recorded or posted in the + system. + - name: material_request + fieldtype: Link + label: Material Request + description: Reference to the material request document that triggered or is linked + to this sales order item. + join_hint: + table: tabMaterial Request + 'on': material_request = tabMaterial Request.name + - name: purchase_order + fieldtype: Link + label: Purchase Order + description: Customer's purchase order number or reference provided when placing + the sales order. + join_hint: + table: tabPurchase Order + 'on': purchase_order = tabPurchase Order.name + - name: material_request_item + fieldtype: Data + label: Material Request Item + description: Link to the internal material request item that triggered or is fulfilled + by this sales order item. + - name: purchase_order_item + fieldtype: Data + label: Purchase Order Item + description: Link to the purchase order item when this sales order item is directly + tied to procurement or drop-shipping. + - name: cost_center + fieldtype: Link + label: Cost Center + description: Department or business unit to which the sales order item's revenue + or costs are allocated for financial tracking and internal accounting. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + - name: project + fieldtype: Link + label: Project + description: Specific project or job to which the sales order item is linked for + project-based billing, tracking, and profitability analysis. + join_hint: + table: tabProject + 'on': project = tabProject.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabSales Order Item). + Comparison-ready across parent records.' +- table: tabSales Partner + description: '' + fields: + - name: partner_name + fieldtype: Data + label: Sales Partner Name + description: Official business name of the sales partner, used when searching + for or reporting on specific partner organizations. + - name: partner_type + fieldtype: Link + label: Partner Type + description: Classification of the partner relationship (reseller, distributor, + etc.), used to segment and analyze partners by business model. + join_hint: + table: tabSales Partner Type + 'on': partner_type = tabSales Partner Type.name + - name: territory + fieldtype: Link + label: Territory + description: Geographic region assigned to the sales partner, used for territory-based + sales analysis and commission calculations. + join_hint: + table: tabTerritory + 'on': territory = tabTerritory.name + - name: commission_rate + fieldtype: Float + label: Commission Rate + description: Percentage rate for partner commissions, used in revenue sharing + calculations and partner profitability analysis. + - name: targets + fieldtype: Table + label: Targets + description: '' + child_hint: + child_table: tabTarget Detail + fieldname: targets + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: targets + - name: show_in_website + fieldtype: Check + label: Show In Website + description: Flag indicating if partner appears on public website, used to filter + partners for web display and marketing purposes. + - name: referral_code + fieldtype: Data + label: Referral Code + description: Unique code for tracking partner referrals, used to attribute sales + and calculate referral-based commissions. + - name: route + fieldtype: Data + label: Route + description: URL path for the partner's website page, used in web queries and + partner portal navigation. + - name: partner_website + fieldtype: Data + label: Partner website + description: URL of the partner's official website, used for partner contact information + and external reference linking. + - name: introduction + fieldtype: Text + label: Introduction + description: Used when searching for initial context or summary information about + a sales partner's background or onboarding details. + - name: description + fieldtype: Text Editor + label: Description + description: Used when querying detailed characteristics, capabilities, or business + profile information about a sales partner. + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Sales Partner document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabSales Partner Item + description: '' + fields: + - name: sales_partner + fieldtype: Link + label: 'Sales Partner ' + description: The partner, distributor, or third-party entity involved in selling + this item + join_hint: + table: tabSales Partner + 'on': sales_partner = tabSales Partner.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabSales Partner + Item). Comparison-ready across parent records.' +- table: tabSales Partner Type + description: '' + fields: + - name: sales_partner_type + fieldtype: Data + label: Sales Partner Type + description: Unique identifier code or key for the sales partner type used in + transactions and classifications + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Sales Partner Type document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabSales Person + description: '' + fields: + - name: sales_person_name + fieldtype: Data + label: Sales Person Name + description: Display name of the sales person, used when searching or filtering + sales personnel by name. + - name: parent_sales_person + fieldtype: Link + label: Parent Sales Person + description: References the supervising sales person in hierarchy, used for analyzing + reporting structures and team organization. + join_hint: + table: tabSales Person + 'on': parent_sales_person = tabSales Person.name + - name: commission_rate + fieldtype: Data + label: Commission Rate + description: Percentage rate for calculating sales commissions, used in commission + calculations and compensation analysis. + - name: is_group + fieldtype: Check + label: Is Group + description: Indicates if this is a sales team/group rather than individual, used + to filter between teams and individual contributors. + - name: enabled + fieldtype: Check + label: Enabled + description: Active status flag, used to filter currently active sales personnel + versus inactive or terminated staff. + - name: employee + fieldtype: Link + label: Employee + description: Links to employee master record, used to join sales person data with + HR information like payroll or attendance. + join_hint: + table: tabEmployee + 'on': employee = tabEmployee.name + - name: department + fieldtype: Link + label: Department + description: Department assignment, used for filtering sales performance and targets + by organizational unit. + join_hint: + table: tabDepartment + 'on': department = tabDepartment.name + - name: lft + fieldtype: Int + label: lft + description: Left boundary in nested set model for hierarchy, used internally + for efficient tree traversal of sales organization structure. + - name: rgt + fieldtype: Int + label: rgt + description: Right boundary in nested set model for hierarchy, used internally + for efficient tree traversal of sales organization structure. + - name: old_parent + fieldtype: Data + label: old_parent + description: Previous parent in hierarchy before reorganization, used for tracking + historical reporting structure changes. + - name: targets + fieldtype: Table + label: Targets + description: '' + child_hint: + child_table: tabTarget Detail + fieldname: targets + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: targets + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Sales Person document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabSales Stage + description: '' + fields: + - name: stage_name + fieldtype: Data + label: Stage Name + description: Descriptive label of the sales stage such as Lead, Qualified, Proposal, + Negotiation, or Closed Won + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Sales Stage document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabSales Taxes and Charges + description: '' + fields: + - name: charge_type + fieldtype: Select + label: Type + description: Categorizes whether this is a tax (VAT, GST, sales tax) or other + charge (shipping, handling, customs duty) + options: + - Actual + - On Net Total + - On Previous Row Amount + - On Previous Row Total + - On Item Quantity + - name: row_id + fieldtype: Data + label: 'Reference Row #' + description: Sequential position of this tax or charge within the parent sales + document + - name: account_head + fieldtype: Link + label: Account Head + description: Ledger account where this sales tax or charge amount is posted for + accounting purposes + join_hint: + table: tabAccount + 'on': account_head = tabAccount.name + - name: description + fieldtype: Small Text + label: Description + description: Text explanation of the specific tax or charge line item appearing + on the sales document + - name: included_in_print_rate + fieldtype: Check + label: Is this Tax included in Basic Rate? + description: Whether this tax or charge is already included in the displayed item + rate or added separately + - name: included_in_paid_amount + fieldtype: Check + label: Considered In Paid Amount + description: Whether this tax or charge was already included in the payment amount + received from the customer. + - name: cost_center + fieldtype: Link + label: Cost Center + description: Cost center to which this sales tax or charge is allocated for expense + tracking and financial analysis. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + - name: project + fieldtype: Link + label: Project + description: Project to which this sales tax or charge is linked for project-specific + cost tracking and profitability analysis. + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: rate + fieldtype: Float + label: Tax Rate + description: Tax or charge percentage applied to the transaction base amount + - name: account_currency + fieldtype: Link + label: Account Currency + description: Currency of the accounting ledger where this tax or charge is posted + join_hint: + table: tabCurrency + 'on': account_currency = tabCurrency.name + - name: tax_amount + fieldtype: Currency + label: Amount + description: Calculated monetary value of the tax or charge in transaction currency + - name: total + fieldtype: Currency + label: Total + description: Cumulative tax total including this charge and all previous charges + in the tax calculation sequence. + - name: tax_amount_after_discount_amount + fieldtype: Currency + label: Tax Amount After Discount Amount + description: Tax amount calculated after applying any item-level or invoice-level + discounts. + - name: base_tax_amount + fieldtype: Currency + label: Amount (Company Currency) + description: Tax amount in the company's base currency before any currency conversion. + - name: base_total + fieldtype: Currency + label: Total (Company Currency) + description: Total tax amount in company base currency before applying any discounts + to the tax itself. + - name: base_tax_amount_after_discount_amount + fieldtype: Currency + label: Tax Amount After Discount Amount (Company Currency) + description: Final tax amount in company base currency after applying discounts + to the tax charge. + - name: item_wise_tax_detail + fieldtype: Code + label: Item Wise Tax Detail + description: Breakdown showing how this tax charge applies to each individual + item in the transaction. + - name: dont_recompute_tax + fieldtype: Check + label: Dont Recompute tax + description: Indicates whether tax amounts should remain fixed and not be automatically + recalculated when transaction values change. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabSales Taxes and + Charges). Comparison-ready across parent records.' +- table: tabSales Taxes and Charges Template + description: Standard tax template that can be applied to all Sales Transactions. + This template can contain a list of tax heads and also other expense/income heads + like "Shipping", "Insurance", "Handling" etc. + fields: + - name: title + fieldtype: Data + label: Title + description: Display name of the sales tax and charges template shown to users + - name: is_default + fieldtype: Check + label: Default + description: Whether this template is automatically applied to new sales transactions + - name: disabled + fieldtype: Check + label: Disabled + description: Whether this sales tax template is currently inactive and unavailable + for use in transactions. + - name: company + fieldtype: Link + label: Company + description: The specific company entity to which this sales tax template applies. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: tax_category + fieldtype: Link + label: Tax Category + description: The classification of tax type such as VAT, service tax, or GST that + this template represents. + join_hint: + table: tabTax Category + 'on': tax_category = tabTax Category.name + - name: taxes + fieldtype: Table + label: Sales Taxes and Charges + description: '' + child_hint: + child_table: tabSales Taxes and Charges + fieldname: taxes + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: taxes + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Sales Taxes and Charges Template document (master/transaction). + Use only for single-entity lookups, not cross-record comparison unless fields + are per-relationship (e.g. supplier, price_list).' +- table: tabSales Team + description: '' + fields: + - name: sales_person + fieldtype: Link + label: Sales Person + description: Individual salesperson assigned to or member of this sales team + join_hint: + table: tabSales Person + 'on': sales_person = tabSales Person.name + - name: contact_no + fieldtype: Data + label: Contact No. + description: Phone number to reach this sales team + - name: allocated_percentage + fieldtype: Float + label: Contribution (%) + description: Percentage of sales or revenue assigned to this team member for quota + or territory allocation purposes. + - name: allocated_amount + fieldtype: Currency + label: Contribution to Net Total + description: Specific dollar or currency amount allocated to this team member + as quota, budget, or target. + - name: commission_rate + fieldtype: Data + label: Commission Rate + description: Percentage rate used to calculate commission earnings for this sales + team member based on their sales performance. + - name: incentives + fieldtype: Currency + label: Incentives + description: Compensation bonuses or commission structures offered to the sales + team for achieving targets or closing deals. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabSales Team). Comparison-ready + across parent records.' +- table: tabSalutation + description: '' + fields: + - name: salutation + fieldtype: Data + label: Salutation + description: The actual salutation text value like Mr, Ms, Dr, used when addressing + contacts or filtering records by title prefix. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Salutation document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabScheduled Job Log + description: '' + fields: + - name: status + fieldtype: Select + label: Status + description: Current execution status of the scheduled job, used to filter successful, + failed, or running jobs. + options: + - Scheduled + - Complete + - Failed + - name: scheduled_job_type + fieldtype: Link + label: Scheduled Job + description: Type or category of the scheduled job, used to filter logs by specific + automation tasks or job names. + join_hint: + table: tabScheduled Job Type + 'on': scheduled_job_type = tabScheduled Job Type.name + - name: details + fieldtype: Code + label: Details + description: Execution details or summary message, used when investigating what + the job did or processed during execution. + - name: debug_log + fieldtype: Code + label: Debug Log + description: Detailed technical log output for troubleshooting, used when diagnosing + errors or debugging failed job executions. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Scheduled Job Log document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabScheduled Job Type + description: '' + fields: + - name: stopped + fieldtype: Check + label: Stopped + description: Flag indicating if the scheduled job is currently paused or disabled, + used when filtering active jobs or troubleshooting why jobs aren't running. + - name: method + fieldtype: Data + label: Method + description: Python function or method path to be executed by this scheduled job, + used when identifying what automation logic runs at scheduled intervals. + - name: server_script + fieldtype: Link + label: Server Script + description: Reference to a server script document that contains the job logic, + used when jobs are defined through the scripting interface rather than code. + join_hint: + table: tabServer Script + 'on': server_script = tabServer Script.name + - name: scheduler_event + fieldtype: Link + label: Scheduler Event + description: Predefined frequency category like hourly or daily, used when filtering + jobs by their execution timing or scheduling pattern. + join_hint: + table: tabScheduler Event + 'on': scheduler_event = tabScheduler Event.name + - name: frequency + fieldtype: Select + label: Frequency + description: Numeric interval value combined with scheduler_event for custom timing, + used when analyzing job frequency or scheduling specific intervals. + options: + - All + - Hourly + - Hourly Long + - Hourly Maintenance + - Daily + - Daily Long + - Daily Maintenance + - Weekly + - Weekly Long + - Monthly + - Monthly Long + - Cron + - Yearly + - Annual + - name: cron_format + fieldtype: Data + label: Cron Format + description: Cron expression defining exact execution schedule, used when jobs + require precise timing beyond standard frequency options. + - name: create_log + fieldtype: Check + label: Create Log + description: Indicates whether execution logs should be created when this scheduled + job type runs, used when troubleshooting job history or audit requirements. + - name: last_execution + fieldtype: Datetime + label: Last Execution + description: Timestamp of the most recent job execution, used when checking job + run history or diagnosing scheduling issues. + - name: next_execution + fieldtype: Datetime + label: Next Execution + description: Timestamp when the job is scheduled to run next, used when verifying + upcoming job schedules or planning system maintenance windows. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Scheduled Job Type document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabScheduler Event + description: '' + fields: + - name: scheduled_against + fieldtype: Link + label: Scheduled Against + description: Reference to the document or entity that triggers this scheduled + event. + join_hint: + table: tabDocType + 'on': scheduled_against = tabDocType.name + - name: method + fieldtype: Data + label: Method + description: Function or procedure name that executes when this scheduled event + runs. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Scheduler Event document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabSerial No + description: Distinct unit of an Item + fields: + - name: serial_no + fieldtype: Data + label: Serial No + description: Actual serial number value assigned to a specific item unit for tracking + individual pieces + - name: item_code + fieldtype: Link + label: Item Code + description: Product or item type that this serial number belongs to + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: batch_no + fieldtype: Link + label: Batch No + description: Batch identifier for tracking groups of serialized items that were + manufactured or purchased together. + join_hint: + table: tabBatch + 'on': batch_no = tabBatch.name + - name: warehouse + fieldtype: Link + label: Warehouse + description: Storage location where this specific serialized item is currently + held. + join_hint: + table: tabWarehouse + 'on': warehouse = tabWarehouse.name + - name: purchase_rate + fieldtype: Float + label: Incoming Rate + description: Unit cost paid when this serialized item was originally purchased. + - name: customer + fieldtype: Link + label: Customer + description: Customer who purchased or received the serialized item + join_hint: + table: tabCustomer + 'on': customer = tabCustomer.name + - name: status + fieldtype: Select + label: Status + description: Current state of the serial number such as available, delivered, + or inactive + options: + - Active + - Inactive + - Consumed + - Delivered + - Expired + - name: item_name + fieldtype: Data + label: Item Name + description: Product or item associated with this serial number + - name: description + fieldtype: Text + label: Description + description: Text description or name of the serialized item for identifying what + the serial number represents + - name: item_group + fieldtype: Link + label: Item Group + description: Product category or classification that the serialized item belongs + to for grouping similar items + join_hint: + table: tabItem Group + 'on': item_group = tabItem Group.name + - name: brand + fieldtype: Link + label: Brand + description: Manufacturer or brand name of the serialized item for filtering by + vendor or make + join_hint: + table: tabBrand + 'on': brand = tabBrand.name + - name: asset + fieldtype: Link + label: Asset + description: Links the serial number to a specific fixed asset or equipment item + being tracked. + join_hint: + table: tabAsset + 'on': asset = tabAsset.name + - name: asset_status + fieldtype: Select + label: Asset Status + description: Current operational or lifecycle status of the serialized asset (e.g., + active, in maintenance, retired). + options: + - Issue + - Receipt + - Transfer + - name: location + fieldtype: Link + label: Location + description: Physical location or warehouse where the serialized item is currently + stored or deployed. + join_hint: + table: tabLocation + 'on': location = tabLocation.name + - name: employee + fieldtype: Link + label: Employee + description: Employee assigned to or responsible for this serialized item + join_hint: + table: tabEmployee + 'on': employee = tabEmployee.name + - name: warranty_expiry_date + fieldtype: Date + label: Warranty Expiry Date + description: Date when the manufacturer's warranty coverage ends for this serial + numbered item + - name: amc_expiry_date + fieldtype: Date + label: AMC Expiry Date + description: Date when the Annual Maintenance Contract service period ends for + this serial numbered item + - name: maintenance_status + fieldtype: Select + label: Maintenance Status + description: Current maintenance state of the serialized item such as under maintenance, + operational, or out of service. + options: + - Under Warranty + - Out of Warranty + - Under AMC + - Out of AMC + - name: warranty_period + fieldtype: Int + label: Warranty Period (Days) + description: Duration or timeframe during which the serialized item is covered + under warranty. + - name: company + fieldtype: Link + label: Company + description: Company entity that owns or is associated with this serial numbered + item. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: work_order + fieldtype: Link + label: Work Order + description: Work order or manufacturing order associated with this serial number + for production tracking + join_hint: + table: tabWork Order + 'on': work_order = tabWork Order.name + - name: purchase_document_no + fieldtype: Data + label: Creation Document No + description: Purchase receipt or purchase order document number when this serial + numbered item was received or procured + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Serial No document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabSerial and Batch Bundle + description: '' + fields: + - name: naming_series + fieldtype: Select + label: Naming Series + description: Prefix pattern used to auto-generate the bundle name + options: + - SABB-.######## + - name: company + fieldtype: Link + label: Company + description: Company that owns or manages this serial and batch bundle + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: item_name + fieldtype: Data + label: Item Name + description: Item for which serial numbers or batch numbers are being tracked + and bundled. + - name: has_serial_no + fieldtype: Check + label: Has Serial No + description: Whether this item uses serial number tracking for individual unit + identification. + - name: has_batch_no + fieldtype: Check + label: Has Batch No + description: Whether this item uses batch number tracking for grouping units by + production lot or expiry. + - name: item_code + fieldtype: Link + label: Item Code + description: Identifies which product or material the serial/batch bundle applies + to. + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: warehouse + fieldtype: Link + label: Warehouse + description: Specifies the storage location where the serial/batch bundle is held + or transacted. + join_hint: + table: tabWarehouse + 'on': warehouse = tabWarehouse.name + - name: type_of_transaction + fieldtype: Select + label: Type of Transaction + description: Indicates whether the bundle transaction is inbound, outbound, or + another movement type. + options: + - Inward + - Outward + - Maintenance + - Asset Repair + - name: entries + fieldtype: Table + label: entries + description: '' + child_hint: + child_table: tabSerial and Batch Entry + fieldname: entries + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: entries + - name: total_qty + fieldtype: Float + label: Total Qty + description: Aggregate quantity across all serial/batch entries in this bundle. + - name: item_group + fieldtype: Link + label: Item Group + description: Product category or classification that the bundled serial/batch + items belong to. + join_hint: + table: tabItem Group + 'on': item_group = tabItem Group.name + - name: avg_rate + fieldtype: Float + label: Avg Rate + description: Average rate per unit calculated across all serial numbers or batches + in this bundle. + - name: total_amount + fieldtype: Float + label: Total Amount + description: Total monetary value of all serial numbers or batches combined in + this bundle. + - name: voucher_type + fieldtype: Link + label: Voucher Type + description: Type of transaction document that created or references this serial + and batch bundle. + join_hint: + table: tabDocType + 'on': voucher_type = tabDocType.name + - name: voucher_no + fieldtype: Dynamic Link + label: Voucher No + description: Transaction document number linking serial and batch bundles to their + source voucher + - name: voucher_detail_no + fieldtype: Data + label: Voucher Detail No + description: Line item number within the voucher identifying the specific transaction + detail for this bundle + - name: posting_date + fieldtype: Date + label: Posting Date + description: Date when the serial and batch bundle transaction was posted to the + ledger + - name: posting_time + fieldtype: Time + label: Posting Time + description: Time when the serial and batch bundle transaction was posted or recorded. + - name: returned_against + fieldtype: Data + label: Returned Against + description: Reference to the original serial and batch bundle document that this + return transaction is reversing. + - name: is_cancelled + fieldtype: Check + label: Is Cancelled + description: Indicates whether this serial and batch bundle transaction has been + cancelled or voided. + - name: is_rejected + fieldtype: Check + label: Is Rejected + description: Indicates whether the serial and batch bundle has been rejected during + quality inspection or receiving process. + - name: amended_from + fieldtype: Link + label: Amended From + description: Links to the original serial and batch bundle document that this + record corrects or replaces after amendment. + join_hint: + table: tabSerial and Batch Bundle + 'on': amended_from = tabSerial and Batch Bundle.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Serial and Batch Bundle document (master/transaction). + Use only for single-entity lookups, not cross-record comparison unless fields + are per-relationship (e.g. supplier, price_list).' +- table: tabSerial and Batch Entry + description: '' + fields: + - name: serial_no + fieldtype: Link + label: Serial No + description: Individual serial number assigned to a specific item unit for tracking + unique pieces of inventory + join_hint: + table: tabSerial No + 'on': serial_no = tabSerial No.name + - name: batch_no + fieldtype: Link + label: Batch No + description: Batch or lot number assigned to a group of items manufactured or + received together for tracking production runs or shipments + join_hint: + table: tabBatch + 'on': batch_no = tabBatch.name + - name: qty + fieldtype: Float + label: Qty + description: Quantity of items assigned to a specific serial number or batch in + the transaction. + - name: warehouse + fieldtype: Link + label: Warehouse + description: Storage location where the serial or batch numbered items are kept + or transferred. + join_hint: + table: tabWarehouse + 'on': warehouse = tabWarehouse.name + - name: delivered_qty + fieldtype: Float + label: Delivered Qty + description: Actual quantity of serial or batch numbered items that have been + physically delivered to the customer. + - name: incoming_rate + fieldtype: Float + label: Valuation Rate + description: Valuation rate per unit for items being received or added to inventory + in this serial/batch transaction. + - name: outgoing_rate + fieldtype: Float + label: Outgoing Rate + description: Valuation rate per unit for items being issued, consumed, or removed + from inventory in this serial/batch transaction. + - name: stock_value_difference + fieldtype: Float + label: Change in Stock Value + description: Net change in total inventory value resulting from this serial/batch + transaction. + - name: is_outward + fieldtype: Check + label: Is Outward + description: Indicates whether the serial/batch transaction represents inventory + leaving the warehouse (sales, material issue) versus incoming stock. + - name: stock_queue + fieldtype: Small Text + label: FIFO Stock Queue (qty, rate) + description: FIFO/LIFO queue data structure tracking the chronological order and + valuation of serial numbers or batches for consumption sequencing. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabSerial and Batch + Entry). Comparison-ready across parent records.' +- table: tabServer Script + description: '' + fields: + - name: script_type + fieldtype: Select + label: Script Type + description: Type of server script such as DocType Event, API, or Scheduler, used + to categorize automation purpose. + options: + - DocType Event + - Scheduler Event + - Permission Query + - API + - name: reference_doctype + fieldtype: Link + label: Reference Document Type + description: Target DocType that this script operates on, used when filtering + scripts by affected document type. + join_hint: + table: tabDocType + 'on': reference_doctype = tabDocType.name + - name: event_frequency + fieldtype: Select + label: Event Frequency + description: Frequency setting for scheduled scripts like hourly or daily, used + when configuring periodic automation. + options: + - All + - Hourly + - Daily + - Weekly + - Monthly + - Yearly + - Hourly Long + - Daily Long + - Weekly Long + - Monthly Long + - Cron + - name: cron_format + fieldtype: Data + label: Cron Format + description: Cron expression defining exact schedule timing, used for custom scheduling + patterns in automated scripts. + - name: doctype_event + fieldtype: Select + label: DocType Event + description: Specific DocType event trigger like before_save or after_insert, + used to determine when script executes. + options: + - Before Insert + - Before Validate + - Before Save + - After Insert + - After Save + - Before Rename + - After Rename + - Before Submit + - After Submit + - Before Cancel + - After Cancel + - Before Delete + - After Delete + - Before Save (Submitted Document) + - After Save (Submitted Document) + - Before Print + - On Payment Authorization + - name: api_method + fieldtype: Data + label: API Method + description: API endpoint method name for API-type scripts, used when exposing + custom server-side functions via REST. + - name: allow_guest + fieldtype: Check + label: Allow Guest + description: Controls whether unauthenticated users can execute this server script + without login credentials. + - name: module + fieldtype: Link + label: Module (for export) + description: Identifies which application module or domain this server script + belongs to for organizational grouping. + join_hint: + table: tabModule Def + 'on': module = tabModule Def.name + - name: disabled + fieldtype: Check + label: Disabled + description: Indicates if this server script is currently inactive and will not + execute when triggered. + - name: script + fieldtype: Code + label: Script + description: Contains the actual Python or JavaScript code that executes when + this server script is called. + - name: enable_rate_limit + fieldtype: Check + label: Enable Rate Limit + description: Determines whether execution frequency restrictions are enforced + to prevent abuse or overload. + - name: rate_limit_count + fieldtype: Int + label: Request Limit + description: Specifies the maximum number of times this script can be executed + within the rate limit time window. + - name: rate_limit_seconds + fieldtype: Int + label: Time Window (Seconds) + description: Defines the time window in seconds for measuring script execution + frequency against the rate limit count. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Server Script document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabService Day + description: '' + fields: + - name: workday + fieldtype: Select + label: Workday + description: Indicates whether this service day is a working day or non-working + day (weekend/holiday). + options: + - Monday + - Tuesday + - Wednesday + - Thursday + - Friday + - Saturday + - Sunday + - name: start_time + fieldtype: Time + label: Start Time + description: Time when the service day begins or service operations start. + - name: end_time + fieldtype: Time + label: End Time + description: Time when the service day or work shift concludes, used to calculate + duration or filter service periods by completion time. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabService Day). + Comparison-ready across parent records.' +- table: tabService Level Agreement + description: '' + fields: + - name: document_type + fieldtype: Link + label: Apply On + description: The entity or module this SLA applies to such as Issue, Support Ticket, + or Project Task + join_hint: + table: tabDocType + 'on': document_type = tabDocType.name + - name: default_priority + fieldtype: Link + label: Default Priority + description: The priority level automatically assigned to new items created under + this SLA + join_hint: + table: tabIssue Priority + 'on': default_priority = tabIssue Priority.name + - name: service_level + fieldtype: Data + label: Service Level Name + description: The name or identifier of the service level commitment tier (e.g., + Gold, Silver, Standard) that defines response and resolution time expectations. + - name: enabled + fieldtype: Check + label: Enabled + description: Whether this service level agreement is currently active and available + for assignment to customers or cases. + - name: default_service_level_agreement + fieldtype: Check + label: Default Service Level Agreement + description: Whether this SLA is automatically applied to new customers or service + requests when no specific SLA is specified. + - name: entity_type + fieldtype: Select + label: Entity Type + description: Type of record the SLA applies to, such as customer, project, or + ticket category. + options: + - Customer + - Customer Group + - Territory + - name: entity + fieldtype: Dynamic Link + label: Entity + description: Specific record or identifier the SLA is assigned to within the entity + type. + - name: condition + fieldtype: Code + label: Condition + description: Criteria or rules that must be met for the SLA to apply or trigger. + - name: start_date + fieldtype: Date + label: Start Date + description: When the service level agreement becomes active or effective for + the customer or contract. + - name: end_date + fieldtype: Date + label: End Date + description: When the service level agreement expires or is no longer valid for + the customer or contract. + - name: apply_sla_for_resolution + fieldtype: Check + label: Apply SLA for Resolution Time + description: Whether this SLA enforces resolution time commitments for incidents, + requests, or cases. + - name: priorities + fieldtype: Table + label: Priorities + description: '' + child_hint: + child_table: tabService Level Priority + fieldname: priorities + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: priorities + - name: sla_fulfilled_on + fieldtype: Table + label: SLA Fulfilled On + description: '' + child_hint: + child_table: tabSLA Fulfilled On Status + fieldname: sla_fulfilled_on + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: sla_fulfilled_on + - name: pause_sla_on + fieldtype: Table + label: SLA Paused On + description: '' + child_hint: + child_table: tabPause SLA On Status + fieldname: pause_sla_on + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: pause_sla_on + - name: holiday_list + fieldtype: Link + label: Holiday List + description: Which holidays or non-working days are excluded when calculating + SLA response and resolution times. + join_hint: + table: tabHoliday List + 'on': holiday_list = tabHoliday List.name + - name: support_and_resolution + fieldtype: Table + label: Working Hours + description: '' + child_hint: + child_table: tabService Day + fieldname: support_and_resolution + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: support_and_resolution + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Service Level Agreement document (master/transaction). + Use only for single-entity lookups, not cross-record comparison unless fields + are per-relationship (e.g. supplier, price_list).' +- table: tabService Level Priority + description: '' + fields: + - name: default_priority + fieldtype: Check + label: Default Priority + description: Initial priority value automatically assigned when this service level + is applied to a new case or ticket + - name: priority + fieldtype: Link + label: Priority + description: Current or active priority level for cases under this service level + agreement + join_hint: + table: tabIssue Priority + 'on': priority = tabIssue Priority.name + - name: response_time + fieldtype: Duration + label: First Response Time + description: Time allowed to initially respond to a service request at this priority + level. + - name: resolution_time + fieldtype: Duration + label: Resolution Time + description: Time allowed to fully resolve a service request at this priority + level. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabService Level + Priority). Comparison-ready across parent records.' +- table: tabSession Default + description: '' + fields: + - name: ref_doctype + fieldtype: Link + label: Document Type + description: Reference to the document type this session is associated with, used + when filtering sessions by the type of document being accessed. + join_hint: + table: tabDocType + 'on': ref_doctype = tabDocType.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabSession Default). + Comparison-ready across parent records.' +- table: tabShare Balance + description: '' + fields: + - name: share_type + fieldtype: Link + label: Share Type + description: Classification of shares (e.g., common, preferred) used when filtering + or analyzing share balances by ownership class or equity type. + join_hint: + table: tabShare Type + 'on': share_type = tabShare Type.name + - name: from_no + fieldtype: Int + label: From No + description: Starting share certificate or sequence number used when querying + share number ranges or tracking share issuance blocks. + - name: rate + fieldtype: Int + label: Rate + description: Price per share for valuing the shareholding position + - name: no_of_shares + fieldtype: Int + label: No of Shares + description: Total quantity of shares held by the shareholder + - name: to_no + fieldtype: Int + label: To No + description: Ending share certificate number in a range of consecutively numbered + shares + - name: amount + fieldtype: Int + label: Amount + description: The monetary value of shares held or transferred in this balance + record. + - name: is_company + fieldtype: Check + label: Is Company + description: Indicates whether the shareholder is a corporate entity rather than + an individual person. + - name: current_state + fieldtype: Select + label: Current State + description: The active status of this share balance record, such as draft, confirmed, + or cancelled. + options: + - Issued + - Purchased + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabShare Balance). + Comparison-ready across parent records.' +- table: tabShare Transfer + description: '' + fields: + - name: transfer_type + fieldtype: Select + label: Transfer Type + description: Category indicating whether shares are being transferred, sold, gifted, + or moved between parties + options: + - Issue + - Purchase + - Transfer + - name: date + fieldtype: Date + label: Date + description: Date when the share transfer was executed or became effective + - name: from_shareholder + fieldtype: Link + label: From Shareholder + description: Shareholder who is transferring or selling their shares to another + party. + join_hint: + table: tabShareholder + 'on': from_shareholder = tabShareholder.name + - name: from_folio_no + fieldtype: Data + label: From Folio No + description: Folio number of the shareholder account from which shares are being + transferred. + - name: to_shareholder + fieldtype: Link + label: To Shareholder + description: Shareholder who is receiving or purchasing the transferred shares. + join_hint: + table: tabShareholder + 'on': to_shareholder = tabShareholder.name + - name: to_folio_no + fieldtype: Data + label: To Folio No + description: Folio number of the recipient shareholder receiving the transferred + shares + - name: equity_or_liability_account + fieldtype: Link + label: Equity/Liability Account + description: Account used to record equity or liability side of the share transfer + transaction + join_hint: + table: tabAccount + 'on': equity_or_liability_account = tabAccount.name + - name: asset_account + fieldtype: Link + label: Asset Account + description: Account used to record the asset side of the share transfer transaction + join_hint: + table: tabAccount + 'on': asset_account = tabAccount.name + - name: share_type + fieldtype: Link + label: Share Type + description: Type or class of shares being transferred in the transaction + join_hint: + table: tabShare Type + 'on': share_type = tabShare Type.name + - name: from_no + fieldtype: Int + label: From No + description: Starting certificate number or share number in the range being transferred + from the original holder + - name: rate + fieldtype: Currency + label: Rate + description: Price per share or transfer rate at which the shares are being transferred + - name: no_of_shares + fieldtype: Int + label: No of Shares + description: Number of shares being transferred from one shareholder to another + - name: to_no + fieldtype: Int + label: To No + description: Ending share certificate number or sequence number after the transfer + - name: amount + fieldtype: Currency + label: Amount + description: Monetary value or consideration paid for the transferred shares + - name: company + fieldtype: Link + label: Company + description: The company entity where the share transfer transaction is being + recorded or executed. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: remarks + fieldtype: Long Text + label: Remarks + description: Additional notes or comments explaining the reason, context, or special + conditions of the share transfer. + - name: amended_from + fieldtype: Link + label: Amended From + description: Reference to the original share transfer document that this record + corrects or modifies. + join_hint: + table: tabShare Transfer + 'on': amended_from = tabShare Transfer.name + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Share Transfer document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabShare Type + description: '' + fields: + - name: title + fieldtype: Data + label: Title + description: Display name or label shown to users for the share type + - name: description + fieldtype: Long Text + label: Description + description: Detailed explanation of what the share type represents and its purpose + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Share Type document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabShareholder + description: '' + fields: + - name: title + fieldtype: Data + label: Title + description: Formal salutation or honorific prefix for the shareholder (Mr., Mrs., + Dr., etc.) + - name: naming_series + fieldtype: Select + label: naming_series + description: Prefix pattern used to auto-generate shareholder record identifiers + options: + - ACC-SH-.YYYY.- + - name: folio_no + fieldtype: Data + label: Folio no. + description: Unique identifier assigned to a shareholder's account for tracking + their holdings and transactions. + - name: company + fieldtype: Link + label: Company + description: Name or identifier of the shareholder when the shareholder is a corporate + entity rather than an individual. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: is_company + fieldtype: Check + label: Is Company + description: Indicates whether the shareholder is a corporate entity or an individual + person. + - name: share_balance + fieldtype: Table + label: Share Balance + description: '' + child_hint: + child_table: tabShare Balance + fieldname: share_balance + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: share_balance + - name: contact_list + fieldtype: Code + label: Contact List + description: Contact information or list of contacts associated with the shareholder, + used when looking up communication details or shareholder representatives. + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Shareholder document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabShipment + description: '' + fields: + - name: pickup_from_type + fieldtype: Select + label: Pickup from + description: Category or classification of the pickup location such as warehouse, + customer site, supplier, or distribution center + options: + - Company + - Customer + - Supplier + - name: pickup_company + fieldtype: Link + label: Company + description: Name of the company or organization where goods are being picked + up from + join_hint: + table: tabCompany + 'on': pickup_company = tabCompany.name + - name: pickup_customer + fieldtype: Link + label: Customer + description: Customer from whom goods are being picked up in reverse logistics + or return scenarios. + join_hint: + table: tabCustomer + 'on': pickup_customer = tabCustomer.name + - name: pickup_supplier + fieldtype: Link + label: Supplier + description: Supplier from whom goods are being picked up for inbound shipments + or direct procurement. + join_hint: + table: tabSupplier + 'on': pickup_supplier = tabSupplier.name + - name: pickup + fieldtype: Data + label: Pickup From + description: General pickup location or address where the shipment originates, + regardless of whether it's from a customer, supplier, or other entity. + - name: pickup_address_name + fieldtype: Link + label: Address + description: Name or label of the location where goods are collected from the + sender, such as warehouse name or facility identifier. + join_hint: + table: tabAddress + 'on': pickup_address_name = tabAddress.name + - name: pickup_address + fieldtype: Small Text + label: pickup_address + description: Full street address and location details where the shipment is physically + picked up from. + - name: pickup_contact_person + fieldtype: Link + label: Pickup Contact Person + description: Name of the individual responsible for coordinating or authorizing + the pickup at the origin location. + join_hint: + table: tabUser + 'on': pickup_contact_person = tabUser.name + - name: pickup_contact_name + fieldtype: Link + label: Contact + description: Name of the person to contact at the pickup location for shipment + collection. + join_hint: + table: tabContact + 'on': pickup_contact_name = tabContact.name + - name: pickup_contact_email + fieldtype: Data + label: Contact Email + description: Email address of the person to contact at the pickup location for + shipment collection. + - name: pickup_contact + fieldtype: Small Text + label: pickup_contact + description: Primary contact identifier or phone number for the person handling + pickup at the origin location. + - name: delivery_to_type + fieldtype: Select + label: Delivery to + description: Indicates whether the shipment is being delivered to a company, customer, + or other entity type. + options: + - Company + - Customer + - Supplier + - name: delivery_company + fieldtype: Link + label: Company + description: The company receiving the shipment when delivery_to_type is company. + join_hint: + table: tabCompany + 'on': delivery_company = tabCompany.name + - name: delivery_customer + fieldtype: Link + label: Customer + description: The customer receiving the shipment when delivery_to_type is customer. + join_hint: + table: tabCustomer + 'on': delivery_customer = tabCustomer.name + - name: delivery_supplier + fieldtype: Link + label: Supplier + description: The carrier or logistics company responsible for transporting the + shipment. + join_hint: + table: tabSupplier + 'on': delivery_supplier = tabSupplier.name + - name: delivery_to + fieldtype: Data + label: Delivery To + description: The recipient customer or location receiving the shipment. + - name: delivery_address_name + fieldtype: Link + label: Address + description: The named location or site identifier where the shipment is being + delivered, distinct from the recipient entity. + join_hint: + table: tabAddress + 'on': delivery_address_name = tabAddress.name + - name: delivery_address + fieldtype: Small Text + label: delivery_address + description: Physical location where the shipment is being delivered to the customer + or recipient. + - name: delivery_contact_name + fieldtype: Link + label: Contact + description: Name of the person receiving or responsible for accepting the shipment + at the delivery location. + join_hint: + table: tabContact + 'on': delivery_contact_name = tabContact.name + - name: delivery_contact_email + fieldtype: Data + label: Contact Email + description: Email address of the person receiving the shipment, used for delivery + notifications and coordination. + - name: delivery_contact + fieldtype: Small Text + label: delivery_contact + description: Person or contact information at the destination who receives or + signs for the shipment delivery. + - name: shipment_parcel + fieldtype: Table + label: Shipment Parcel + description: '' + child_hint: + child_table: tabShipment Parcel + fieldname: shipment_parcel + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: shipment_parcel + - name: parcel_template + fieldtype: Link + label: Parcel Template + description: Predefined parcel configuration with standard dimensions, weight, + or packaging specifications applied to shipments. + join_hint: + table: tabShipment Parcel Template + 'on': parcel_template = tabShipment Parcel Template.name + - name: total_weight + fieldtype: Float + label: Total Weight (kg) + description: Combined weight of all items in the shipment, used when filtering + or analyzing shipments by weight capacity or shipping cost calculations. + - name: shipment_delivery_note + fieldtype: Table + label: Shipment Delivery Note + description: '' + child_hint: + child_table: tabShipment Delivery Note + fieldname: shipment_delivery_note + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: shipment_delivery_note + - name: pallets + fieldtype: Select + label: Pallets + description: Number of pallets used in the shipment, relevant for warehouse space + planning, loading dock scheduling, or LTL freight calculations. + options: + - 'No' + - 'Yes' + - name: value_of_goods + fieldtype: Currency + label: Value of Goods + description: Total monetary value of items being shipped, used when filtering + or analyzing shipments by cargo worth or insurance requirements. + - name: pickup_date + fieldtype: Date + label: Pickup Date + description: Date when the shipment was or will be collected from origin, used + for scheduling queries and pickup timeline analysis. + - name: pickup_from + fieldtype: Time + label: Pickup from + description: Origin location or address where the shipment is collected, used + when searching by source warehouse, vendor location, or departure point. + - name: pickup_to + fieldtype: Time + label: Pickup to + description: Identifies the destination or recipient location for pickup delivery, + used when tracking where picked-up goods are being transported to. + - name: shipment_type + fieldtype: Select + label: Shipment Type + description: Categorizes the shipment method or service level (e.g., express, + standard, freight), used when filtering shipments by delivery speed or transportation + mode. + options: + - Goods + - Documents + - name: pickup_type + fieldtype: Select + label: Pickup Type + description: Defines how goods are collected from origin (e.g., scheduled, on-demand, + customer drop-off), used when analyzing pickup logistics and collection methods. + options: + - Pickup + - Self delivery + - name: incoterm + fieldtype: Link + label: Incoterm + description: International commercial terms defining buyer and seller responsibilities + for shipping costs, risk transfer, and delivery obligations (e.g., FOB, CIF, + DDP). + join_hint: + table: tabIncoterm + 'on': incoterm = tabIncoterm.name + - name: description_of_content + fieldtype: Small Text + label: Description of Content + description: Textual description of the goods or items being shipped in the shipment. + - name: service_provider + fieldtype: Data + label: Service Provider + description: Carrier or logistics company responsible for transporting the shipment + (e.g., FedEx, DHL, Maersk). + - name: shipment_id + fieldtype: Data + label: Shipment ID + description: Unique identifier for referencing a specific shipment in queries + about tracking, status updates, or shipment details. + - name: shipment_amount + fieldtype: Currency + label: Shipment Amount + description: Total monetary value or cost of the shipment, used when filtering + or analyzing shipments by financial value. + - name: status + fieldtype: Select + label: Status + description: Current state of the shipment in its lifecycle, used when searching + for shipments by delivery stage or completion state. + options: + - Draft + - Submitted + - Booked + - Cancelled + - Completed + - name: tracking_url + fieldtype: Small Text + label: Tracking URL + description: Web link to track the shipment's delivery status and location with + the carrier + - name: carrier + fieldtype: Data + label: Carrier + description: Shipping company or logistics provider handling the delivery such + as FedEx, UPS, or DHL + - name: carrier_service + fieldtype: Data + label: Carrier Service + description: Specific delivery service level or method used such as ground, overnight, + express, or standard shipping + - name: awb_number + fieldtype: Data + label: AWB Number + description: Air waybill number used to identify and track air freight shipments + with carriers. + - name: tracking_status + fieldtype: Select + label: Tracking Status + description: Current status code or stage of the shipment in transit (e.g., in-transit, + delivered, pending). + options: + - In Progress + - Delivered + - Returned + - Lost + - name: tracking_status_info + fieldtype: Data + label: Tracking Status Info + description: Detailed explanation or additional context about the current tracking + status, including reasons for delays or status changes. + - name: amended_from + fieldtype: Link + label: Amended From + description: References the original shipment record when this shipment was created + as a correction or amendment of a previous shipment. + join_hint: + table: tabShipment + 'on': amended_from = tabShipment.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Shipment document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabShipment Delivery Note + description: '' + fields: + - name: delivery_note + fieldtype: Link + label: Delivery Note + description: Links to the associated delivery note document, used when querying + which items were delivered or matching shipments to customer orders. + join_hint: + table: tabDelivery Note + 'on': delivery_note = tabDelivery Note.name + - name: grand_total + fieldtype: Currency + label: Value + description: Total value of the shipment including all charges, used when analyzing + shipment costs, revenue recognition, or financial reconciliation of deliveries. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabShipment Delivery + Note). Comparison-ready across parent records.' +- table: tabShipment Parcel + description: '' + fields: + - name: length + fieldtype: Int + label: Length (cm) + description: Parcel length dimension used when calculating shipping costs, validating + carrier requirements, or optimizing container loading. + - name: width + fieldtype: Int + label: Width (cm) + description: Parcel width dimension used when calculating shipping costs, validating + carrier requirements, or optimizing container loading. + - name: height + fieldtype: Int + label: Height (cm) + description: Physical height dimension of the parcel used when users ask about + package size, dimensions, or shipping volume calculations + - name: weight + fieldtype: Float + label: Weight (kg) + description: Physical weight of the parcel used when users ask about shipping + costs, weight limits, or freight calculations + - name: count + fieldtype: Int + label: Count + description: Number of parcels in the shipment used when users ask how many packages + or boxes are included in a shipment + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabShipment Parcel). + Comparison-ready across parent records.' +- table: tabShipment Parcel Template + description: '' + fields: + - name: parcel_template_name + fieldtype: Data + label: Parcel Template Name + description: Display name of the parcel template used when selecting standard + package dimensions for shipments. + - name: length + fieldtype: Int + label: Length (cm) + description: Physical length dimension of the parcel template used when calculating + shipping costs and validating package sizes. + - name: width + fieldtype: Int + label: Width (cm) + description: Physical width dimension of the parcel template used when users ask + about package size, shipping dimensions, or carrier requirements. + - name: height + fieldtype: Int + label: Height (cm) + description: Physical height dimension of the parcel template used when users + ask about package size, vertical clearance, or stacking constraints. + - name: weight + fieldtype: Float + label: Weight (kg) + description: Standard weight specification for the parcel template used when users + ask about shipping costs, weight limits, or carrier restrictions. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Shipment Parcel Template document (master/transaction). + Use only for single-entity lookups, not cross-record comparison unless fields + are per-relationship (e.g. supplier, price_list).' +- table: tabShipping Rule + description: Specify conditions to calculate shipping amount + fields: + - name: label + fieldtype: Data + label: Shipping Rule Label + description: Display name of the shipping rule shown to users when selecting or + viewing shipping options + - name: disabled + fieldtype: Check + label: Disabled + description: Indicates whether the shipping rule is currently inactive and unavailable + for use in transactions + - name: shipping_rule_type + fieldtype: Select + label: Shipping Rule Type + description: Identifies the category or method of shipping rule such as price-based, + weight-based, or region-based conditions. + options: + - Selling + - Buying + - name: company + fieldtype: Link + label: Company + description: The specific company entity to which this shipping rule applies when + operating in multi-company environments. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: account + fieldtype: Link + label: Shipping Account + description: The general ledger account used to record shipping charges or revenue + when this shipping rule is applied to transactions. + join_hint: + table: tabAccount + 'on': account = tabAccount.name + - name: cost_center + fieldtype: Link + label: Cost Center + description: Cost center to which shipping charges should be allocated for accounting + purposes + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + - name: project + fieldtype: Link + label: Project + description: Project to which shipping charges should be allocated when shipping + is project-specific + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: calculate_based_on + fieldtype: Select + label: Calculate Based On + description: Basis for calculating shipping charges such as net weight, gross + weight, net amount, or number of items + options: + - Fixed + - Net Total + - Net Weight + - name: shipping_amount + fieldtype: Currency + label: Shipping Amount + description: Cost or fee charged for shipping when this rule applies + - name: conditions + fieldtype: Table + label: Shipping Rule Conditions + description: '' + child_hint: + child_table: tabShipping Rule Condition + fieldname: conditions + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: conditions + - name: countries + fieldtype: Table + label: Valid for Countries + description: '' + child_hint: + child_table: tabShipping Rule Country + fieldname: countries + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: countries + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Shipping Rule document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabShipping Rule Condition + description: A condition for a Shipping Rule + fields: + - name: from_value + fieldtype: Float + label: From Value + description: Minimum threshold value that triggers this shipping rule condition + - name: to_value + fieldtype: Float + label: To Value + description: Maximum threshold value that triggers this shipping rule condition + - name: shipping_amount + fieldtype: Currency + label: Shipping Amount + description: Threshold shipping cost value used to evaluate whether this shipping + rule condition is met for order routing or carrier selection. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabShipping Rule + Condition). Comparison-ready across parent records.' +- table: tabShipping Rule Country + description: '' + fields: + - name: country + fieldtype: Link + label: Country + description: Country to which this shipping rule applies + join_hint: + table: tabCountry + 'on': country = tabCountry.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabShipping Rule + Country). Comparison-ready across parent records.' +- table: tabSlack Webhook URL + description: '' + fields: + - name: webhook_name + fieldtype: Data + label: Name + description: Descriptive name identifying the purpose or destination of this Slack + webhook. + - name: webhook_url + fieldtype: Data + label: Webhook URL + description: Actual Slack webhook URL endpoint where notifications are sent. + - name: show_document_link + fieldtype: Check + label: Show link to document + description: Flag indicating whether to include a clickable document link in Slack + notifications. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Slack Webhook URL document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabSocial Link Settings + description: '' + fields: + - name: social_link_type + fieldtype: Select + label: Social Link Type + description: Platform or service type for this social link, used to filter and + categorize social media connections. + options: + - facebook + - linkedin + - twitter + - email + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabSocial Link Settings). + Comparison-ready across parent records.' +- table: tabSocial Login Key + description: '' + fields: + - name: enable_social_login + fieldtype: Check + label: Enable Social Login + description: Flag indicating whether this social login provider is active for + user authentication. + - name: social_login_provider + fieldtype: Select + label: Social Login Provider + description: Third-party authentication provider name like Google, Facebook, or + GitHub used for login. + options: + - Custom + - Facebook + - Frappe + - GitHub + - Google + - Office 365 + - Salesforce + - fairlogin + - Keycloak + - name: client_id + fieldtype: Data + label: Client ID + description: OAuth client identifier provided by the social login provider for + API authentication. + - name: provider_name + fieldtype: Data + label: Provider Name + description: Display name of the social login provider shown to users during authentication. + - name: client_secret + fieldtype: Password + label: Client Secret + description: Confidential OAuth secret key used to authenticate with the social + login provider's API. + - name: icon + fieldtype: Data + label: Icon + description: Image or icon file representing the social login provider displayed + on login screens. + - name: base_url + fieldtype: Data + label: Base URL + description: Base URL of the social login provider used when configuring OAuth + authentication endpoints for third-party login integrations. + - name: sign_ups + fieldtype: Select + label: Sign ups + description: Indicates whether new user registrations are allowed through this + social login provider. + options: + - Allow + - Deny + - name: authorize_url + fieldtype: Data + label: Authorize URL + description: OAuth authorization endpoint URL where users are redirected to grant + permissions during social login flow. + - name: access_token_url + fieldtype: Data + label: Access Token URL + description: OAuth endpoint URL used to exchange authorization codes for access + tokens after user authentication. + - name: redirect_url + fieldtype: Data + label: Redirect URL + description: Callback URL where the social provider redirects users after successful + authentication to complete login process. + - name: api_endpoint + fieldtype: Data + label: API Endpoint + description: Social provider's API endpoint URL used to retrieve authenticated + user profile information after login. + - name: custom_base_url + fieldtype: Check + label: Custom Base URL + description: Override base URL for social providers requiring custom domain configurations + or self-hosted OAuth servers. + - name: api_endpoint_args + fieldtype: Code + label: API Endpoint Args + description: Query parameters or arguments passed to the API endpoint when fetching + user data from social provider. + - name: auth_url_data + fieldtype: Code + label: Auth URL Data + description: Additional data or parameters appended to the authorization URL to + customize OAuth authentication behavior. + - name: user_id_property + fieldtype: Data + label: User ID Property + description: JSON property path in the social provider's API response that contains + the unique user identifier for account mapping. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Social Login Key document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabSouth Africa VAT Account + description: '' + fields: + - name: account + fieldtype: Link + label: Account + description: General ledger account number linked to this South Africa VAT configuration + used when posting VAT amounts to the correct financial accounts. + join_hint: + table: tabAccount + 'on': account = tabAccount.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabSouth Africa VAT + Account). Comparison-ready across parent records.' +- table: tabSouth Africa VAT Settings + description: '' + fields: + - name: company + fieldtype: Link + label: Company + description: Company entity to which these South Africa VAT settings apply + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: vat_accounts + fieldtype: Table + label: VAT Accounts + description: '' + child_hint: + child_table: tabSouth Africa VAT Account + fieldname: vat_accounts + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: vat_accounts + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per South Africa VAT Settings document (master/transaction). + Use only for single-entity lookups, not cross-record comparison unless fields + are per-relationship (e.g. supplier, price_list).' +- table: tabStock Entry + description: '' + fields: + - name: naming_series + fieldtype: Select + label: Series + description: Prefix pattern used to generate stock entry document numbers + options: + - MAT-STE-.YYYY.- + - name: stock_entry_type + fieldtype: Link + label: Stock Entry Type + description: Category of stock movement such as material receipt, material issue, + material transfer, or manufacturing + join_hint: + table: tabStock Entry Type + 'on': stock_entry_type = tabStock Entry Type.name + - name: outgoing_stock_entry + fieldtype: Link + label: Stock Entry (Outward GIT) + description: Links to the original stock entry when receiving materials that were + previously sent for transfer, useful for tracking material movement between + warehouses. + join_hint: + table: tabStock Entry + 'on': outgoing_stock_entry = tabStock Entry.name + - name: purpose + fieldtype: Select + label: Purpose + description: Defines the transaction type such as Material Receipt, Material Issue, + Material Transfer, Manufacture, or Repack to categorize the stock movement. + options: + - Material Issue + - Material Receipt + - Material Transfer + - Material Transfer for Manufacture + - Material Consumption for Manufacture + - Manufacture + - Repack + - Send to Subcontractor + - Disassemble + - name: add_to_transit + fieldtype: Check + label: Add to Transit + description: Indicates whether materials are placed in a transit warehouse during + inter-warehouse transfers rather than directly moving to the target warehouse. + - name: work_order + fieldtype: Link + label: Work Order + description: Manufacturing or production order that this stock entry fulfills + or consumes materials for. + join_hint: + table: tabWork Order + 'on': work_order = tabWork Order.name + - name: purchase_order + fieldtype: Link + label: Purchase Order + description: Purchase order linked to this stock entry when receiving purchased + goods into inventory. + join_hint: + table: tabPurchase Order + 'on': purchase_order = tabPurchase Order.name + - name: subcontracting_order + fieldtype: Link + label: Subcontracting Order + description: Subcontracting purchase order where materials are sent to a subcontractor + or finished goods are received back. + join_hint: + table: tabSubcontracting Order + 'on': subcontracting_order = tabSubcontracting Order.name + - name: delivery_note_no + fieldtype: Link + label: Delivery Note No + description: Reference to the delivery note document associated with this stock + movement, used when tracking shipments or goods delivered to customers. + join_hint: + table: tabDelivery Note + 'on': delivery_note_no = tabDelivery Note.name + - name: sales_invoice_no + fieldtype: Link + label: Sales Invoice No + description: Reference to the sales invoice document linked to this stock transaction, + used when connecting inventory movements to customer billing. + join_hint: + table: tabSales Invoice + 'on': sales_invoice_no = tabSales Invoice.name + - name: pick_list + fieldtype: Link + label: Pick List + description: Reference to the pick list document used for warehouse picking operations, + relevant when tracking which items were selected from inventory for fulfillment. + join_hint: + table: tabPick List + 'on': pick_list = tabPick List.name + - name: purchase_receipt_no + fieldtype: Link + label: Purchase Receipt No + description: Reference to the purchase receipt document when stock entry is linked + to incoming purchased goods + join_hint: + table: tabPurchase Receipt + 'on': purchase_receipt_no = tabPurchase Receipt.name + - name: asset_repair + fieldtype: Link + label: Asset Repair + description: Links stock entry to a specific asset repair job when materials are + issued or consumed for fixing assets + join_hint: + table: tabAsset Repair + 'on': asset_repair = tabAsset Repair.name + - name: company + fieldtype: Link + label: Company + description: The company entity that owns or records this stock movement transaction + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: posting_date + fieldtype: Date + label: Posting Date + description: Date when the stock entry transaction is recorded in the ledger for + accounting and inventory valuation purposes. + - name: posting_time + fieldtype: Time + label: Posting Time + description: Time when the stock entry transaction is recorded in the ledger for + accounting and inventory valuation purposes. + - name: set_posting_time + fieldtype: Check + label: Edit Posting Date and Time + description: Indicates whether the posting date and time were manually specified + instead of using the current timestamp. + - name: inspection_required + fieldtype: Check + label: Inspection Required + description: Indicates whether incoming materials need quality inspection before + acceptance into inventory. + - name: apply_putaway_rule + fieldtype: Check + label: Apply Putaway Rule + description: Determines if automated warehouse location assignment rules should + be applied when receiving stock. + - name: from_bom + fieldtype: Check + label: From BOM + description: Indicates the stock entry was generated from a Bill of Materials + for manufacturing or production purposes. + - name: use_multi_level_bom + fieldtype: Check + label: Use Multi-Level BOM + description: Indicates whether the stock entry processes materials through multiple + levels of bill of materials instead of a single-level BOM. + - name: bom_no + fieldtype: Link + label: BOM No + description: The bill of materials identifier used for this stock entry, relevant + when manufacturing or material planning is involved. + join_hint: + table: tabBOM + 'on': bom_no = tabBOM.name + - name: fg_completed_qty + fieldtype: Float + label: 'Finished Good Quantity ' + description: The quantity of finished goods completed in this stock entry, used + when tracking manufacturing output. + - name: process_loss_percentage + fieldtype: Percent + label: '% Process Loss' + description: Percentage of material lost during manufacturing or processing operations, + used when analyzing production efficiency or waste rates. + - name: process_loss_qty + fieldtype: Float + label: Process Loss Qty + description: Actual quantity of material lost during manufacturing or processing + operations, used when calculating total waste or scrap amounts. + - name: from_warehouse + fieldtype: Link + label: Default Source Warehouse + description: Source warehouse from which stock is being transferred or issued, + used when tracking material movement origins. + join_hint: + table: tabWarehouse + 'on': from_warehouse = tabWarehouse.name + - name: source_warehouse_address + fieldtype: Link + label: Source Warehouse Address Link + description: Address link of the warehouse from which stock is being transferred + or issued. + join_hint: + table: tabAddress + 'on': source_warehouse_address = tabAddress.name + - name: source_address_display + fieldtype: Small Text + label: Source Warehouse Address + description: Formatted full address text of the source warehouse for display and + reporting purposes. + - name: to_warehouse + fieldtype: Link + label: Default Target Warehouse + description: Destination warehouse receiving stock in transfer, receipt, or manufacturing + operations. + join_hint: + table: tabWarehouse + 'on': to_warehouse = tabWarehouse.name + - name: target_warehouse_address + fieldtype: Link + label: Target Warehouse Address Link + description: Destination warehouse location details for material transfers or + stock movements. + join_hint: + table: tabAddress + 'on': target_warehouse_address = tabAddress.name + - name: target_address_display + fieldtype: Small Text + label: Target Warehouse Address + description: Formatted display version of the destination warehouse address for + stock transfers. + - name: scan_barcode + fieldtype: Data + label: Scan Barcode + description: Barcode value scanned to quickly identify and add items to the stock + entry. + - name: last_scanned_warehouse + fieldtype: Data + label: Last Scanned Warehouse + description: Warehouse most recently scanned during stock entry processing, relevant + for tracking scan sequence in mobile or barcode workflows. + - name: items + fieldtype: Table + label: Items + description: '' + child_hint: + child_table: tabStock Entry Detail + fieldname: items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: items + - name: total_outgoing_value + fieldtype: Currency + label: Total Outgoing Value (Consumption) + description: Total monetary value of inventory leaving the source warehouse in + this stock entry transaction. + - name: total_incoming_value + fieldtype: Currency + label: Total Incoming Value (Receipt) + description: Total value of items received or transferred into stock before additional + costs are applied. + - name: value_difference + fieldtype: Currency + label: Total Value Difference (Incoming - Outgoing) + description: Difference between incoming and outgoing stock values, used to identify + gains or losses during stock transfers or revaluations. + - name: additional_costs + fieldtype: Table + label: Additional Costs + description: '' + child_hint: + child_table: tabLanded Cost Taxes and Charges + fieldname: additional_costs + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: additional_costs + - name: total_additional_costs + fieldtype: Currency + label: Total Additional Costs + description: Sum of all additional costs like freight, insurance, or handling + charges added to the stock entry beyond item costs. + - name: supplier + fieldtype: Link + label: Supplier + description: Supplier ID or code from whom materials are being received in this + stock entry. + join_hint: + table: tabSupplier + 'on': supplier = tabSupplier.name + - name: supplier_name + fieldtype: Data + label: Supplier Name + description: Full name of the supplier providing materials for this stock entry. + - name: supplier_address + fieldtype: Link + label: Supplier Address + description: Supplier's address when stock entry involves material received from + or returned to a supplier + join_hint: + table: tabAddress + 'on': supplier_address = tabAddress.name + - name: address_display + fieldtype: Small Text + label: Address + description: Formatted display address for the stock entry location or party involved + - name: project + fieldtype: Link + label: Project + description: Project associated with this stock movement for tracking project-specific + inventory consumption or allocation + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: select_print_heading + fieldtype: Link + label: Print Heading + description: Custom heading text that appears on printed stock entry documents + instead of the default title. + join_hint: + table: tabPrint Heading + 'on': select_print_heading = tabPrint Heading.name + - name: letter_head + fieldtype: Link + label: Letter Head + description: Company letterhead template applied when printing this stock entry + document. + join_hint: + table: tabLetter Head + 'on': letter_head = tabLetter Head.name + - name: is_opening + fieldtype: Select + label: Is Opening + description: Indicates this stock entry records opening balances for inventory + items at the start of accounting. + options: + - 'No' + - 'Yes' + - name: remarks + fieldtype: Text + label: Remarks + description: Additional notes or comments about the stock entry transaction + - name: per_transferred + fieldtype: Percent + label: Per Transferred + description: Percentage of stock quantity that has been transferred to the target + location + - name: total_amount + fieldtype: Currency + label: Total Amount + description: Total monetary value of all items in the stock entry + - name: job_card + fieldtype: Link + label: Job Card + description: Reference to the job card or work order that this stock entry is + fulfilling or consuming materials for. + join_hint: + table: tabJob Card + 'on': job_card = tabJob Card.name + - name: amended_from + fieldtype: Link + label: Amended From + description: Reference to the original stock entry document that this entry is + correcting or replacing after amendment. + join_hint: + table: tabStock Entry + 'on': amended_from = tabStock Entry.name + - name: credit_note + fieldtype: Link + label: Credit Note + description: Link to the credit note document when this stock entry is created + to return goods against a credit note. + join_hint: + table: tabJournal Entry + 'on': credit_note = tabJournal Entry.name + - name: is_return + fieldtype: Check + label: Is Return + description: Indicates whether this stock entry represents a return transaction + of previously issued or transferred materials. + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Stock Entry document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabStock Entry Detail + description: '' + fields: + - name: barcode + fieldtype: Data + label: Barcode + description: Barcode scanned or entered for the item in this stock entry line + - name: has_item_scanned + fieldtype: Check + label: Has Item Scanned + description: Indicates whether the item was added to this stock entry line by + scanning a barcode + - name: s_warehouse + fieldtype: Link + label: Source Warehouse + description: Source warehouse from which stock is being transferred or issued + in the stock entry transaction. + join_hint: + table: tabWarehouse + 'on': s_warehouse = tabWarehouse.name + - name: t_warehouse + fieldtype: Link + label: Target Warehouse + description: Target warehouse to which stock is being received or transferred + in the stock entry transaction. + join_hint: + table: tabWarehouse + 'on': t_warehouse = tabWarehouse.name + - name: item_code + fieldtype: Link + label: Item Code + description: Identifier of the specific item or product being moved, transferred, + or adjusted in this stock entry line. + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: item_name + fieldtype: Data + label: Item Name + description: Name of the item being transferred, consumed, or manufactured in + the stock entry transaction. + - name: is_finished_item + fieldtype: Check + label: Is Finished Item + description: Indicates whether this item is the final manufactured product output + in a manufacturing stock entry. + - name: is_scrap_item + fieldtype: Check + label: Is Scrap Item + description: Indicates whether this item represents waste or scrap material generated + during the manufacturing process. + - name: quality_inspection + fieldtype: Link + label: Quality Inspection + description: References the quality inspection record linked to this stock entry + line item for tracking inspection results and compliance. + join_hint: + table: tabQuality Inspection + 'on': quality_inspection = tabQuality Inspection.name + - name: subcontracted_item + fieldtype: Link + label: Subcontracted Item + description: Identifies the finished item code received back from a subcontractor + in subcontracting stock entries. + join_hint: + table: tabItem + 'on': subcontracted_item = tabItem.name + - name: description + fieldtype: Text Editor + label: Description + description: Contains the detailed text description or specifications of the item + being transferred, manufactured, or adjusted in this stock entry line. + - name: item_group + fieldtype: Data + label: Item Group + description: Category or classification of the item being transferred or consumed + in the stock entry. + - name: qty + fieldtype: Float + label: Qty + description: Quantity of the item being moved, consumed, or manufactured in this + stock entry transaction. + - name: transfer_qty + fieldtype: Float + label: Qty as per Stock UOM + description: Quantity being transferred in the base unit of measure, used when + asking about actual stock movement amounts in standardized units. + - name: retain_sample + fieldtype: Check + label: Retain Sample + description: Indicates whether a sample is kept from this stock entry line, used + when filtering for quality control or sample retention requirements. + - name: uom + fieldtype: Link + label: UOM + description: Unit of measure for the item in this stock entry line, used when + specifying or filtering by measurement units like kg, pieces, or liters. + join_hint: + table: tabUOM + 'on': uom = tabUOM.name + - name: stock_uom + fieldtype: Link + label: Stock UOM + description: Unit of measurement for inventory tracking and stock balance calculations + in the warehouse system. + join_hint: + table: tabUOM + 'on': stock_uom = tabUOM.name + - name: conversion_factor + fieldtype: Float + label: Conversion Factor + description: Multiplier to convert between transaction UOM and stock UOM for quantity + calculations. + - name: sample_quantity + fieldtype: Int + label: Sample Quantity + description: Quantity of items set aside or allocated for quality testing, inspection, + or demonstration purposes. + - name: basic_rate + fieldtype: Currency + label: Basic Rate (as per Stock UOM) + description: Base price per unit of the item before any additional costs or adjustments + are applied. + - name: additional_cost + fieldtype: Currency + label: Additional Cost + description: Extra costs added per unit beyond the basic rate, such as freight, + handling, or processing charges. + - name: valuation_rate + fieldtype: Currency + label: Valuation Rate + description: Final total rate per unit used for inventory valuation, combining + basic rate and additional costs. + - name: allow_zero_valuation_rate + fieldtype: Check + label: Allow Zero Valuation Rate + description: Indicates whether this stock entry line item permits items with zero + valuation, relevant when querying transfers of non-valued or sample items. + - name: set_basic_rate_manually + fieldtype: Check + label: Set Basic Rate Manually + description: Indicates whether the basic rate was manually entered rather than + auto-calculated, useful for identifying user-overridden pricing in stock movements. + - name: basic_amount + fieldtype: Currency + label: Basic Amount + description: The base value of the item before additional charges or taxes in + this stock entry line, used for calculating total stock movement value. + - name: amount + fieldtype: Currency + label: Amount + description: Total monetary value of the stock entry line item, used when querying + transaction values or financial impact of stock movements. + - name: use_serial_batch_fields + fieldtype: Check + label: Use Serial No / Batch Fields + description: Indicates whether this stock entry line uses serial number or batch + tracking, relevant when filtering items with lot-level traceability. + - name: serial_and_batch_bundle + fieldtype: Link + label: Serial and Batch Bundle + description: Reference to the bundled serial numbers and batch numbers for this + stock entry line, used when tracking specific lot identities in inventory movements. + join_hint: + table: tabSerial and Batch Bundle + 'on': serial_and_batch_bundle = tabSerial and Batch Bundle.name + - name: serial_no + fieldtype: Text + label: Serial No + description: Unique identifier for individually tracked items in the stock movement, + used when querying specific serialized inventory units. + - name: batch_no + fieldtype: Link + label: Batch No + description: Identifier for items grouped by production or purchase batch, used + when tracking inventory by lot or expiration date. + join_hint: + table: tabBatch + 'on': batch_no = tabBatch.name + - name: expense_account + fieldtype: Link + label: Difference Account + description: General ledger account charged for stock consumption or write-offs, + used when analyzing costs of materials issued or scrapped. + join_hint: + table: tabAccount + 'on': expense_account = tabAccount.name + - name: cost_center + fieldtype: Link + label: Cost Center + description: Accounting dimension to allocate stock movement expenses for this + line item. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + - name: project + fieldtype: Link + label: Project + description: Links this stock movement line to a specific project for tracking + project-related inventory transactions. + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: actual_qty + fieldtype: Float + label: Actual Qty (at source/target) + description: Physical quantity of the item in the warehouse after this stock entry + transaction is completed. + - name: transferred_qty + fieldtype: Float + label: Transferred Qty + description: Quantity of items actually transferred or moved in this stock entry + line. + - name: bom_no + fieldtype: Link + label: BOM No + description: Bill of Materials reference number linked to this stock entry detail + for manufacturing operations. + join_hint: + table: tabBOM + 'on': bom_no = tabBOM.name + - name: allow_alternative_item + fieldtype: Check + label: Allow Alternative Item + description: Indicates whether substitute or alternative items can be used in + place of the specified item. + - name: material_request + fieldtype: Link + label: Material Request + description: Links this stock entry line to the material request document that + triggered or authorized the stock movement. + join_hint: + table: tabMaterial Request + 'on': material_request = tabMaterial Request.name + - name: material_request_item + fieldtype: Link + label: Material Request Item + description: Links to the specific line item within the material request that + this stock entry fulfills. + join_hint: + table: tabMaterial Request Item + 'on': material_request_item = tabMaterial Request Item.name + - name: original_item + fieldtype: Link + label: Original Item + description: Stores the initial item code before any item substitution or replacement + occurred during stock entry processing. + join_hint: + table: tabItem + 'on': original_item = tabItem.name + - name: against_stock_entry + fieldtype: Link + label: Against Stock Entry + description: References the original stock entry being reversed, returned, or + adjusted by this transaction. + join_hint: + table: tabStock Entry + 'on': against_stock_entry = tabStock Entry.name + - name: ste_detail + fieldtype: Data + label: Stock Entry Child + description: Links to another stock entry detail line when transferring or matching + items between stock entries. + - name: po_detail + fieldtype: Data + label: PO Supplied Item + description: Links this stock receipt or material transfer to the specific purchase + order line item being fulfilled. + - name: sco_rm_detail + fieldtype: Data + label: SCO Supplied Item + description: Links to subcontracting raw material details when this stock entry + transfers materials to a subcontractor. + - name: putaway_rule + fieldtype: Link + label: Putaway Rule + description: Identifies the warehouse putaway rule applied to determine the destination + location for incoming stock. + join_hint: + table: tabPutaway Rule + 'on': putaway_rule = tabPutaway Rule.name + - name: reference_purchase_receipt + fieldtype: Link + label: Reference Purchase Receipt + description: Links to the original purchase receipt document when this stock entry + is created from or relates to a goods receipt. + join_hint: + table: tabPurchase Receipt + 'on': reference_purchase_receipt = tabPurchase Receipt.name + - name: job_card_item + fieldtype: Data + label: Job Card Item + description: Item code or name associated with the job card for which this stock + entry is being made, used when tracking material consumption or production for + specific manufacturing jobs. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabStock Entry Detail). + Comparison-ready across parent records.' +- table: tabStock Entry Type + description: '' + fields: + - name: purpose + fieldtype: Select + label: Purpose + description: Business reason or use case for this stock entry type such as manufacturing + consumption, sales return, or warehouse replenishment + options: + - Material Issue + - Material Receipt + - Material Transfer + - Material Transfer for Manufacture + - Material Consumption for Manufacture + - Manufacture + - Repack + - Send to Subcontractor + - Disassemble + - name: add_to_transit + fieldtype: Check + label: Add to Transit + description: Whether this stock entry type creates in-transit inventory between + source and target warehouses during material transfer + - name: is_standard + fieldtype: Check + label: Is Standard + description: Indicates whether this stock entry type is a predefined system type + versus a custom user-created type. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Stock Entry Type document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabStock Ledger Entry + description: '' + fields: + - name: item_code + fieldtype: Link + label: Item Code + description: Product or material identifier for which stock movement is being + recorded + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: warehouse + fieldtype: Link + label: Warehouse + description: Storage location where the stock movement or balance change occurred + join_hint: + table: tabWarehouse + 'on': warehouse = tabWarehouse.name + - name: posting_date + fieldtype: Date + label: Posting Date + description: Date when the stock transaction was officially recorded in the ledger + for accounting and inventory valuation purposes. + - name: posting_time + fieldtype: Time + label: Posting Time + description: Time of day when the stock transaction was officially recorded, used + for precise chronological ordering within the same date. + - name: posting_datetime + fieldtype: Datetime + label: Posting Datetime + description: Combined date and time timestamp of when the stock transaction was + officially recorded, used for exact chronological sequencing of all stock movements. + - name: is_adjustment_entry + fieldtype: Check + label: Is Adjustment Entry + description: Indicates whether this stock ledger entry was created through a stock + reconciliation or adjustment process rather than a regular transaction. + - name: auto_created_serial_and_batch_bundle + fieldtype: Check + label: Auto Created Serial and Batch Bundle + description: Indicates whether the serial number and batch bundle was automatically + generated by the system during this stock transaction. + - name: voucher_type + fieldtype: Link + label: Voucher Type + description: The document type that created this stock movement, such as Purchase + Receipt, Delivery Note, Stock Entry, or Sales Invoice. + join_hint: + table: tabDocType + 'on': voucher_type = tabDocType.name + - name: voucher_no + fieldtype: Dynamic Link + label: Voucher No + description: Identifier of the transaction document (e.g., purchase receipt, delivery + note, stock entry) that created this stock movement. + - name: voucher_detail_no + fieldtype: Data + label: Voucher Detail No + description: Identifier of the specific line item within the voucher document + that caused this stock ledger entry. + - name: serial_and_batch_bundle + fieldtype: Link + label: Serial and Batch Bundle + description: Reference to grouped serial numbers or batch numbers associated with + this stock transaction. + join_hint: + table: tabSerial and Batch Bundle + 'on': serial_and_batch_bundle = tabSerial and Batch Bundle.name + - name: dependant_sle_voucher_detail_no + fieldtype: Data + label: Dependant SLE Voucher Detail No + description: Links to the voucher detail number of a dependent stock transaction + that triggered or relies on this ledger entry. + - name: recalculate_rate + fieldtype: Check + label: Recalculate Incoming/Outgoing Rate + description: Indicates whether the valuation rate should be recalculated for this + stock transaction, typically used when correcting or adjusting inventory valuations. + - name: actual_qty + fieldtype: Float + label: Qty Change + description: The physical quantity change in stock units for this transaction, + positive for receipts and negative for issues or consumption. + - name: qty_after_transaction + fieldtype: Float + label: Qty After Transaction + description: Remaining stock quantity after this transaction was applied, used + to check current or historical inventory levels at a point in time. + - name: incoming_rate + fieldtype: Currency + label: Incoming Rate + description: Valuation rate per unit for stock received or produced, used to calculate + the value of incoming inventory. + - name: outgoing_rate + fieldtype: Currency + label: Outgoing Rate + description: Valuation rate per unit for stock issued or consumed, used to calculate + the value of outgoing inventory and cost of goods sold. + - name: valuation_rate + fieldtype: Currency + label: Valuation Rate + description: Price per unit used to calculate inventory value at the time of the + stock transaction. + - name: stock_value + fieldtype: Currency + label: Balance Stock Value + description: Total monetary value of the stock quantity after this transaction. + - name: stock_value_difference + fieldtype: Currency + label: Change in Stock Value + description: Change in total inventory value caused by this specific stock movement. + - name: stock_queue + fieldtype: Long Text + label: FIFO Stock Queue (qty, rate) + description: FIFO or moving average queue tracking batch-wise stock valuation + and quantity for inventory costing calculations. + - name: company + fieldtype: Link + label: Company + description: Company entity that owns this stock transaction for multi-company + inventory segregation. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: stock_uom + fieldtype: Link + label: Stock UOM + description: Base unit of measurement for the item's stock quantity as defined + in the item master. + join_hint: + table: tabUOM + 'on': stock_uom = tabUOM.name + - name: project + fieldtype: Link + label: Project + description: Links inventory transaction to a specific project for project-based + inventory tracking and costing. + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: fiscal_year + fieldtype: Data + label: Fiscal Year + description: The accounting fiscal year period when the inventory transaction + occurred or is recorded. + - name: has_batch_no + fieldtype: Check + label: Has Batch No + description: Indicates whether the item in this stock transaction is tracked using + batch numbers for lot traceability. + - name: has_serial_no + fieldtype: Check + label: Has Serial No + description: Indicates whether the stock item in this transaction is tracked by + serial numbers. + - name: is_cancelled + fieldtype: Check + label: Is Cancelled + description: Indicates whether this stock ledger entry has been cancelled or reversed. + - name: to_rename + fieldtype: Check + label: To Rename + description: Indicates this entry is marked for renaming during item or warehouse + name changes. + - name: serial_no + fieldtype: Long Text + label: Serial No + description: Unique identifier for individually tracked items, used when querying + specific unit-level inventory movements or warranty tracking. + - name: batch_no + fieldtype: Data + label: Batch No + description: Identifier for groups of items manufactured or received together, + used when querying inventory by production lot or expiration date. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Stock Ledger Entry document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabStock Reconciliation + description: This tool helps you to update or fix the quantity and valuation of + stock in the system. It is typically used to synchronise the system values and + what actually exists in your warehouses. + fields: + - name: naming_series + fieldtype: Select + label: Series + description: Prefix pattern used to generate the stock reconciliation name + options: + - MAT-RECO-.YYYY.- + - name: company + fieldtype: Link + label: Company + description: Company entity for which the stock reconciliation is being performed + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: purpose + fieldtype: Select + label: Purpose + description: Reason or explanation for why the stock reconciliation was performed, + such as physical inventory count, damaged goods adjustment, or opening stock + entry. + options: + - Opening Stock + - Stock Reconciliation + - name: posting_date + fieldtype: Date + label: Posting Date + description: Date when the stock reconciliation transaction is recorded in the + accounting ledger and affects inventory valuation. + - name: posting_time + fieldtype: Time + label: Posting Time + description: Time of day when the stock reconciliation was posted to the system. + - name: set_posting_time + fieldtype: Check + label: Edit Posting Date and Time + description: Indicates whether the reconciliation uses a custom posting date and + time instead of the current timestamp. + - name: set_warehouse + fieldtype: Link + label: Default Warehouse + description: Indicates whether a single warehouse is applied to all items in the + reconciliation instead of individual warehouse assignments. + join_hint: + table: tabWarehouse + 'on': set_warehouse = tabWarehouse.name + - name: scan_barcode + fieldtype: Data + label: Scan Barcode + description: Field for scanning item barcodes to quickly add items to the stock + reconciliation. + - name: last_scanned_warehouse + fieldtype: Data + label: Last Scanned Warehouse + description: Warehouse location most recently scanned during the stock reconciliation + process. + - name: scan_mode + fieldtype: Check + label: Scan Mode + description: Method used to capture inventory data during reconciliation, such + as barcode scanning or manual entry. + - name: items + fieldtype: Table + label: Items + description: '' + child_hint: + child_table: tabStock Reconciliation Item + fieldname: items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: items + - name: expense_account + fieldtype: Link + label: Difference Account + description: Account where stock valuation differences or discrepancies are posted + as expenses during reconciliation. + join_hint: + table: tabAccount + 'on': expense_account = tabAccount.name + - name: difference_amount + fieldtype: Currency + label: Difference Amount + description: Total monetary value of stock discrepancies found between system + records and physical count. + - name: amended_from + fieldtype: Link + label: Amended From + description: Reference to the original stock reconciliation document that this + record corrects or replaces. + join_hint: + table: tabStock Reconciliation + 'on': amended_from = tabStock Reconciliation.name + - name: cost_center + fieldtype: Link + label: Cost Center + description: Cost center assigned to the stock reconciliation for accounting and + expense allocation purposes. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Stock Reconciliation document (master/transaction). Use + only for single-entity lookups, not cross-record comparison unless fields are + per-relationship (e.g. supplier, price_list).' +- table: tabStock Reconciliation Item + description: '' + fields: + - name: barcode + fieldtype: Data + label: Barcode + description: Barcode scanned or entered for the item being reconciled to match + physical inventory + - name: has_item_scanned + fieldtype: Data + label: Has Item Scanned + description: Indicates whether the item was added to reconciliation via barcode + scanning rather than manual entry + - name: item_code + fieldtype: Link + label: Item Code + description: Unique identifier for the inventory item being reconciled in the + stock reconciliation. + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: item_name + fieldtype: Data + label: Item Name + description: Display name of the inventory item being reconciled, used when searching + by product name rather than code. + - name: item_group + fieldtype: Link + label: Item Group + description: Category or classification of the item being reconciled, used for + filtering reconciliations by product type or family. + join_hint: + table: tabItem Group + 'on': item_group = tabItem Group.name + - name: warehouse + fieldtype: Link + label: Warehouse + description: Warehouse location where the stock reconciliation adjustment is being + made + join_hint: + table: tabWarehouse + 'on': warehouse = tabWarehouse.name + - name: qty + fieldtype: Float + label: Quantity + description: Adjusted quantity of the item after stock reconciliation + - name: valuation_rate + fieldtype: Currency + label: Valuation Rate + description: Per-unit inventory value used to calculate the total value of reconciled + stock + - name: amount + fieldtype: Currency + label: Amount + description: Total monetary value of the stock reconciliation item, used when + querying the financial impact or value of inventory adjustments. + - name: allow_zero_valuation_rate + fieldtype: Check + label: Allow Zero Valuation Rate + description: Indicates whether this item can have a zero valuation rate during + reconciliation, relevant when filtering items with special valuation handling. + - name: use_serial_batch_fields + fieldtype: Check + label: Use Serial No / Batch Fields + description: Indicates whether this item uses serial number or batch tracking + fields, relevant when querying items requiring lot or serial number management. + - name: reconcile_all_serial_batch + fieldtype: Check + label: Reconcile All Serial Nos / Batches + description: Indicates whether all serial numbers and batch numbers should be + reconciled for this item, used when users want to update all tracked units at + once. + - name: serial_and_batch_bundle + fieldtype: Link + label: Serial / Batch Bundle + description: The target serial and batch bundle after reconciliation, representing + the desired final state of serial/batch inventory for this item. + join_hint: + table: tabSerial and Batch Bundle + 'on': serial_and_batch_bundle = tabSerial and Batch Bundle.name + - name: current_serial_and_batch_bundle + fieldtype: Link + label: Current Serial / Batch Bundle + description: The existing serial and batch bundle before reconciliation, representing + the current state of serial/batch inventory being adjusted. + join_hint: + table: tabSerial and Batch Bundle + 'on': current_serial_and_batch_bundle = tabSerial and Batch Bundle.name + - name: serial_no + fieldtype: Long Text + label: Serial No + description: Unique identifier for individually tracked items in stock reconciliation, + used when querying specific serialized inventory units. + - name: batch_no + fieldtype: Link + label: Batch No + description: Batch or lot number for grouped inventory items in stock reconciliation, + used when querying stock by manufacturing batch or expiry grouping. + join_hint: + table: tabBatch + 'on': batch_no = tabBatch.name + - name: current_qty + fieldtype: Float + label: Current Qty + description: Existing quantity in system before reconciliation adjustment, used + when comparing actual physical count versus recorded stock levels. + - name: current_amount + fieldtype: Currency + label: Current Amount + description: The existing stock amount in the system before reconciliation adjustments + are applied. + - name: current_valuation_rate + fieldtype: Currency + label: Current Valuation Rate + description: The existing valuation rate per unit in the system before reconciliation + adjustments are applied. + - name: current_serial_no + fieldtype: Long Text + label: Current Serial No + description: The existing serial numbers assigned to items in the system before + reconciliation adjustments are applied. + - name: amount_difference + fieldtype: Currency + label: Amount Difference + description: Monetary value difference between actual counted stock value and + system stock value during reconciliation. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabStock Reconciliation + Item). Comparison-ready across parent records.' +- table: tabStock Reservation Entry + description: '' + fields: + - name: item_code + fieldtype: Link + label: Item Code + description: Product or material being reserved from available stock + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: warehouse + fieldtype: Link + label: Warehouse + description: Storage location where the reserved stock is held + join_hint: + table: tabWarehouse + 'on': warehouse = tabWarehouse.name + - name: has_serial_no + fieldtype: Check + label: Has Serial No + description: Indicates whether the reserved stock item is tracked by individual + serial numbers. + - name: has_batch_no + fieldtype: Check + label: Has Batch No + description: Indicates whether the reserved stock item is tracked by batch numbers + for lot control. + - name: voucher_type + fieldtype: Select + label: Voucher Type + description: The document type that created this stock reservation, such as Sales + Order or Work Order. + options: + - Sales Order + - name: voucher_no + fieldtype: Dynamic Link + label: Voucher No + description: Identifies the specific voucher document that created or is linked + to this stock reservation. + - name: voucher_detail_no + fieldtype: Data + label: Voucher Detail No + description: Identifies the specific line item or detail row within the voucher + that this stock reservation corresponds to. + - name: from_voucher_type + fieldtype: Select + label: From Voucher Type + description: Indicates the type of source document that originated this stock + reservation, such as Sales Order, Work Order, or Material Request. + options: + - Pick List + - Purchase Receipt + - name: from_voucher_no + fieldtype: Dynamic Link + label: From Voucher No + description: Source document number that created or triggered this stock reservation, + used to trace reservations back to sales orders, work orders, or other originating + transactions. + - name: from_voucher_detail_no + fieldtype: Data + label: From Voucher Detail No + description: Line item number within the source document that this reservation + corresponds to, used to identify which specific product line triggered the reservation. + - name: stock_uom + fieldtype: Link + label: Stock UOM + description: Unit of measurement for the reserved stock quantity, used when querying + reservations in base inventory units rather than transaction units. + join_hint: + table: tabUOM + 'on': stock_uom = tabUOM.name + - name: available_qty + fieldtype: Float + label: Available Qty to Reserve + description: Quantity available for reservation after accounting for existing + reservations and stock levels. + - name: voucher_qty + fieldtype: Float + label: Voucher Qty + description: Quantity specified in the source document or voucher that triggered + this reservation entry. + - name: reserved_qty + fieldtype: Float + label: Reserved Qty + description: Quantity currently reserved and allocated for this specific transaction + or order. + - name: delivered_qty + fieldtype: Float + label: Delivered Qty + description: Quantity that has been physically delivered against this stock reservation. + - name: reservation_based_on + fieldtype: Select + label: Reservation Based On + description: Source document type that triggered the stock reservation such as + Sales Order or Work Order. + options: + - Qty + - Serial and Batch + - name: sb_entries + fieldtype: Table + label: sb_entries + description: '' + child_hint: + child_table: tabSerial and Batch Entry + fieldname: sb_entries + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: sb_entries + - name: company + fieldtype: Link + label: Company + description: Company entity that owns or is associated with this stock reservation + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: project + fieldtype: Link + label: Project + description: Project for which inventory items are reserved or allocated + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: status + fieldtype: Select + label: Status + description: Current state of the stock reservation such as draft, active, delivered, + or cancelled + options: + - Draft + - Partially Reserved + - Reserved + - Partially Delivered + - Delivered + - Cancelled + - name: amended_from + fieldtype: Link + label: Amended From + description: Links to the original stock reservation entry that this entry amends + or corrects. + join_hint: + table: tabStock Reservation Entry + 'on': amended_from = tabStock Reservation Entry.name + - name: test + fieldtype: Data + label: test + description: Used to distinguish test or demo stock reservation entries from actual + production data in reporting and data cleanup operations. + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Stock Reservation Entry document (master/transaction). + Use only for single-entity lookups, not cross-record comparison unless fields + are per-relationship (e.g. supplier, price_list).' +- table: tabSub Operation + description: '' + fields: + - name: operation + fieldtype: Link + label: Operation + description: Parent operation or process that this sub-operation belongs to, used + when analyzing hierarchical production workflows. + join_hint: + table: tabOperation + 'on': operation = tabOperation.name + - name: time_in_mins + fieldtype: Float + label: Operation Time + description: Duration in minutes required to complete this sub-operation, used + when calculating total cycle times and production capacity. + - name: description + fieldtype: Small Text + label: Description + description: Detailed explanation or notes about the sub-operation's purpose, + process, or specifications + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabSub Operation). + Comparison-ready across parent records.' +- table: tabSubcontracting BOM + description: '' + fields: + - name: is_active + fieldtype: Check + label: Is Active + description: Indicates whether this subcontracting BOM is currently enabled and + available for use in production + - name: finished_good + fieldtype: Link + label: Finished Good + description: The final product item that will be manufactured through this subcontracting + process + join_hint: + table: tabItem + 'on': finished_good = tabItem.name + - name: finished_good_qty + fieldtype: Float + label: Finished Good Qty + description: Quantity of the finished good item produced from the subcontracting + bill of materials. + - name: finished_good_uom + fieldtype: Link + label: Finished Good UOM + description: Unit of measurement for the finished good quantity in the subcontracting + BOM. + join_hint: + table: tabUOM + 'on': finished_good_uom = tabUOM.name + - name: finished_good_bom + fieldtype: Link + label: Finished Good BOM + description: Bill of materials reference for the finished good item that will + be manufactured by the subcontractor. + join_hint: + table: tabBOM + 'on': finished_good_bom = tabBOM.name + - name: service_item + fieldtype: Link + label: Service Item + description: The specific service item code or name that will be provided by the + subcontractor as part of the subcontracting work. + join_hint: + table: tabItem + 'on': service_item = tabItem.name + - name: service_item_qty + fieldtype: Float + label: Service Item Qty + description: The quantity of the service item to be delivered or performed by + the subcontractor. + - name: service_item_uom + fieldtype: Link + label: Service Item UOM + description: The unit of measurement for the service item quantity, such as hours, + pieces, or kilograms. + join_hint: + table: tabUOM + 'on': service_item_uom = tabUOM.name + - name: conversion_factor + fieldtype: Float + label: Conversion Factor + description: Ratio used to convert quantities between the finished good and subcontracted + item units of measure in the subcontracting bill of materials. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Subcontracting BOM document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabSubcontracting Order + description: '' + fields: + - name: title + fieldtype: Data + label: Title + description: Human-readable label or short description of the subcontracting order + for display and quick identification. + - name: naming_series + fieldtype: Select + label: Series + description: Prefix pattern that determines how subcontracting order identifiers + are automatically formatted and numbered. + options: + - SC-ORD-.YYYY.- + - name: purchase_order + fieldtype: Link + label: Subcontracting Purchase Order + description: Purchase order number linking this subcontracting order to the procurement + document with the supplier + join_hint: + table: tabPurchase Order + 'on': purchase_order = tabPurchase Order.name + - name: supplier + fieldtype: Link + label: Job Worker + description: Supplier ID or code for the subcontractor performing the work + join_hint: + table: tabSupplier + 'on': supplier = tabSupplier.name + - name: supplier_name + fieldtype: Data + label: Job Worker Name + description: Full business name of the subcontractor, used when searching by company + name rather than code + - name: supplier_warehouse + fieldtype: Link + label: Job Worker Warehouse + description: Warehouse location at the supplier's facility where subcontracted + materials or finished goods are stored or delivered from. + join_hint: + table: tabWarehouse + 'on': supplier_warehouse = tabWarehouse.name + - name: company + fieldtype: Link + label: Company + description: Company entity that owns or initiated this subcontracting order. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: transaction_date + fieldtype: Date + label: Date + description: Date when the subcontracting order transaction was recorded or executed. + - name: schedule_date + fieldtype: Date + label: Required By + description: Date when the subcontracted items or services are scheduled to be + delivered or completed by the subcontractor. + - name: amended_from + fieldtype: Link + label: Amended From + description: Reference to the original subcontracting order document that this + order amends or replaces. + join_hint: + table: tabSubcontracting Order + 'on': amended_from = tabSubcontracting Order.name + - name: cost_center + fieldtype: Link + label: Cost Center + description: Accounting cost center to which the subcontracting expenses should + be allocated for financial tracking. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + - name: project + fieldtype: Link + label: Project + description: Project associated with the subcontracting order for tracking costs + and deliverables against specific project budgets. + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: set_warehouse + fieldtype: Link + label: Set Target Warehouse + description: Warehouse designated to receive finished goods from the subcontractor + after completion of work. + join_hint: + table: tabWarehouse + 'on': set_warehouse = tabWarehouse.name + - name: items + fieldtype: Table + label: Items + description: '' + child_hint: + child_table: tabSubcontracting Order Item + fieldname: items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: items + - name: total_qty + fieldtype: Float + label: Total Quantity + description: Total quantity of items or materials being subcontracted across all + line items in the order. + - name: total + fieldtype: Currency + label: Total + description: Total monetary value of the subcontracting order including all items, + services, and charges. + - name: service_items + fieldtype: Table + label: Service Items + description: '' + child_hint: + child_table: tabSubcontracting Order Service Item + fieldname: service_items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: service_items + - name: set_reserve_warehouse + fieldtype: Link + label: Set Reserve Warehouse + description: Warehouse designated to reserve raw materials or components for this + subcontracting order. + join_hint: + table: tabWarehouse + 'on': set_reserve_warehouse = tabWarehouse.name + - name: supplied_items + fieldtype: Table + label: Supplied Items + description: '' + child_hint: + child_table: tabSubcontracting Order Supplied Item + fieldname: supplied_items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: supplied_items + - name: supplier_address + fieldtype: Link + label: Job Worker Address + description: Physical location or address of the subcontractor performing the + work. + join_hint: + table: tabAddress + 'on': supplier_address = tabAddress.name + - name: address_display + fieldtype: Small Text + label: Job Worker Address Details + description: Formatted address of the subcontractor where work or materials will + be delivered for this order. + - name: contact_person + fieldtype: Link + label: Job Worker Contact + description: Name of the individual at the subcontractor responsible for coordinating + this order. + join_hint: + table: tabContact + 'on': contact_person = tabContact.name + - name: contact_display + fieldtype: Small Text + label: Contact Name + description: Formatted contact information including phone and email for the subcontractor + on this order. + - name: contact_mobile + fieldtype: Small Text + label: Contact Mobile No + description: Mobile phone number of the subcontractor contact person for urgent + communication or coordination about the order. + - name: contact_email + fieldtype: Small Text + label: Contact Email + description: Email address of the subcontractor contact person for formal correspondence + and order documentation. + - name: shipping_address + fieldtype: Link + label: Company Shipping Address + description: Delivery location where finished goods or materials from the subcontractor + should be sent. + join_hint: + table: tabAddress + 'on': shipping_address = tabAddress.name + - name: shipping_address_display + fieldtype: Small Text + label: Shipping Address Details + description: Formatted shipping address where subcontracted materials or finished + goods will be delivered. + - name: billing_address + fieldtype: Link + label: Company Billing Address + description: Address identifier for invoicing the subcontracting work. + join_hint: + table: tabAddress + 'on': billing_address = tabAddress.name + - name: billing_address_display + fieldtype: Small Text + label: Billing Address Details + description: Formatted billing address shown on subcontracting invoices and payment + documents. + - name: distribute_additional_costs_based_on + fieldtype: Select + label: 'Distribute Additional Costs Based On ' + description: Method or basis used to allocate extra costs across subcontracting + order items, such as by quantity, amount, or weight. + options: + - Qty + - Amount + - name: additional_costs + fieldtype: Table + label: Additional Costs + description: '' + child_hint: + child_table: tabLanded Cost Taxes and Charges + fieldname: additional_costs + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: additional_costs + - name: total_additional_costs + fieldtype: Currency + label: Total Additional Costs + description: Aggregate sum of all extra charges added to the subcontracting order + beyond the primary service or material costs. + - name: status + fieldtype: Select + label: Status + description: Current state of the subcontracting order such as draft, submitted, + completed, or cancelled. + options: + - Draft + - Open + - Partially Received + - Completed + - Material Transferred + - Partial Material Transferred + - Cancelled + - Closed + - name: per_received + fieldtype: Percent + label: '% Received' + description: Percentage of materials or items received from the subcontractor + against the total order quantity. + - name: select_print_heading + fieldtype: Link + label: Print Heading + description: Custom heading or title to display when printing the subcontracting + order document. + join_hint: + table: tabPrint Heading + 'on': select_print_heading = tabPrint Heading.name + - name: letter_head + fieldtype: Link + label: Letter Head + description: Letterhead template used for printing or emailing the subcontracting + order document to the supplier. + join_hint: + table: tabLetter Head + 'on': letter_head = tabLetter Head.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Subcontracting Order document (master/transaction). Use + only for single-entity lookups, not cross-record comparison unless fields are + per-relationship (e.g. supplier, price_list).' +- table: tabSubcontracting Order Item + description: '' + fields: + - name: item_code + fieldtype: Link + label: Item Code + description: SKU or product code of the item being subcontracted for inventory + and catalog lookups. + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: item_name + fieldtype: Data + label: Item Name + description: Descriptive name of the item being subcontracted for human-readable + identification and search. + - name: bom + fieldtype: Link + label: BOM + description: Bill of materials defining the components and raw materials required + to manufacture the subcontracted item. + join_hint: + table: tabBOM + 'on': bom = tabBOM.name + - name: include_exploded_items + fieldtype: Check + label: Include Exploded Items + description: Whether to expand multi-level bill of materials to show all nested + components in the subcontracting order. + - name: schedule_date + fieldtype: Date + label: Required By + description: Target date when the subcontracted item is expected to be completed + and returned by the supplier. + - name: expected_delivery_date + fieldtype: Date + label: Expected Delivery Date + description: Date when the subcontracted items are expected to be delivered back + from the subcontractor. + - name: description + fieldtype: Text Editor + label: Description + description: Detailed text describing the specific item or service being subcontracted + in this order line. + - name: qty + fieldtype: Float + label: Quantity + description: Quantity of items ordered from the subcontractor for this line item. + - name: received_qty + fieldtype: Float + label: Received Qty + description: Quantity of items actually received back from the subcontractor. + - name: returned_qty + fieldtype: Float + label: Returned Qty + description: Quantity of items sent back to the subcontractor after initial receipt + due to defects or other issues. + - name: stock_uom + fieldtype: Link + label: Stock UOM + description: Unit of measurement for inventory tracking of the subcontracted item + join_hint: + table: tabUOM + 'on': stock_uom = tabUOM.name + - name: conversion_factor + fieldtype: Float + label: Conversion Factor + description: Multiplier to convert between transaction unit and stock unit for + the subcontracted item + - name: rate + fieldtype: Currency + label: Rate + description: Price per unit charged for the subcontracted item or service + - name: amount + fieldtype: Currency + label: Amount + description: Total monetary value of the subcontracting order item including raw + materials and services. + - name: rm_cost_per_qty + fieldtype: Currency + label: Raw Material Cost Per Qty + description: Cost per unit for raw materials supplied to the subcontractor for + this item. + - name: service_cost_per_qty + fieldtype: Currency + label: Service Cost Per Qty + description: Cost per unit charged by the subcontractor for processing or manufacturing + services on this item. + - name: additional_cost_per_qty + fieldtype: Currency + label: Additional Cost Per Qty + description: Extra cost charged per unit quantity on top of the base subcontracting + rate for this item. + - name: warehouse + fieldtype: Link + label: Warehouse + description: Storage location where finished goods from this subcontracting order + item will be received or stored. + join_hint: + table: tabWarehouse + 'on': warehouse = tabWarehouse.name + - name: expense_account + fieldtype: Link + label: Expense Account + description: General ledger account where subcontracting costs for this item are + recorded as expenses. + join_hint: + table: tabAccount + 'on': expense_account = tabAccount.name + - name: manufacturer + fieldtype: Link + label: Manufacturer + description: The company that manufactures the subcontracted item or component + being ordered. + join_hint: + table: tabManufacturer + 'on': manufacturer = tabManufacturer.name + - name: manufacturer_part_no + fieldtype: Data + label: Manufacturer Part Number + description: The manufacturer's unique part number or SKU for the subcontracted + item. + - name: material_request + fieldtype: Link + label: Material Request + description: Links to the material request that triggered or required this subcontracting + order item. + join_hint: + table: tabMaterial Request + 'on': material_request = tabMaterial Request.name + - name: material_request_item + fieldtype: Data + label: Material Request Item + description: Links to the specific material request line that triggered this subcontracting + order item, used when tracing subcontracting orders back to their originating + material requirements. + - name: cost_center + fieldtype: Link + label: Cost Center + description: The cost center to which expenses for this subcontracting order item + are allocated for accounting and budgeting purposes. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + - name: project + fieldtype: Link + label: Project + description: The project to which this subcontracting order item is assigned for + project-based cost tracking and management. + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: purchase_order_item + fieldtype: Data + label: Purchase Order Item + description: Links this subcontracting order item to the corresponding purchase + order item that triggered the subcontracting requirement. + - name: page_break + fieldtype: Check + label: Page Break + description: Controls whether a page break appears before this item when printing + subcontracting order documents. + - name: subcontracting_conversion_factor + fieldtype: Float + label: Subcontracting Conversion Factor + description: Conversion ratio between the finished good quantity and the raw material + quantities supplied to the subcontractor. + - name: job_card + fieldtype: Link + label: Job Card + description: References the job card document associated with this subcontracting + order item for tracking production work. + join_hint: + table: tabJob Card + 'on': job_card = tabJob Card.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabSubcontracting + Order Item). Comparison-ready across parent records.' +- table: tabSubcontracting Order Service Item + description: '' + fields: + - name: item_code + fieldtype: Link + label: Item Code + description: Code of the service item being subcontracted, used when searching + by specific service SKU or item identifier. + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: item_name + fieldtype: Data + label: Item Name + description: Descriptive name of the service item being subcontracted, used when + searching by service description rather than code. + - name: qty + fieldtype: Float + label: Quantity + description: Quantity of service units ordered from the subcontractor for this + specific service item. + - name: rate + fieldtype: Currency + label: Rate + description: Unit price charged by the subcontractor per service unit for this + item. + - name: amount + fieldtype: Currency + label: Amount + description: Total monetary value for this service item, calculated from quantity + and rate. + - name: fg_item + fieldtype: Link + label: Finished Good Item + description: Finished good item code produced or assembled from this subcontracting + service operation. + join_hint: + table: tabItem + 'on': fg_item = tabItem.name + - name: fg_item_qty + fieldtype: Float + label: Finished Good Item Quantity + description: Quantity of finished good item expected to be produced from this + subcontracting service. + - name: purchase_order_item + fieldtype: Data + label: Purchase Order Item + description: Purchase order line item code that this subcontracting service is + linked to for procurement tracking. + - name: material_request + fieldtype: Link + label: Material Request + description: References the material request document that triggered or is linked + to this subcontracting service item for material planning purposes. + join_hint: + table: tabMaterial Request + 'on': material_request = tabMaterial Request.name + - name: material_request_item + fieldtype: Data + label: Material Request Item + description: References the specific line item within the material request that + corresponds to this subcontracting service item. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabSubcontracting + Order Service Item). Comparison-ready across parent records.' +- table: tabSubcontracting Order Supplied Item + description: '' + fields: + - name: main_item_code + fieldtype: Link + label: Item Code + description: Finished or semi-finished item code that the subcontractor will produce + or assemble + join_hint: + table: tabItem + 'on': main_item_code = tabItem.name + - name: rm_item_code + fieldtype: Link + label: Raw Material Item Code + description: Raw material or component item code supplied to the subcontractor + for manufacturing the main item + join_hint: + table: tabItem + 'on': rm_item_code = tabItem.name + - name: stock_uom + fieldtype: Link + label: Stock Uom + description: Unit of measurement for the supplied item in subcontracting orders, + used when querying inventory quantities or material requirements. + join_hint: + table: tabUOM + 'on': stock_uom = tabUOM.name + - name: conversion_factor + fieldtype: Float + label: Conversion Factor + description: Multiplier to convert between transaction unit and stock unit for + the supplied item, relevant when calculating actual stock quantities needed. + - name: reserve_warehouse + fieldtype: Link + label: Reserve Warehouse + description: Warehouse location from which raw materials or components are reserved + for this subcontracting supply, used when tracking material allocation or availability. + join_hint: + table: tabWarehouse + 'on': reserve_warehouse = tabWarehouse.name + - name: bom_detail_no + fieldtype: Data + label: BOM Detail No + description: Identifier linking the supplied item to a specific line in the bill + of materials for the subcontracting order. + - name: reference_name + fieldtype: Data + label: Reference Name + description: Name or label used to identify the supplied item in the subcontracting + context. + - name: rate + fieldtype: Currency + label: Rate + description: Price or cost per unit for the supplied item in the subcontracting + order. + - name: amount + fieldtype: Currency + label: Amount + description: Total monetary value of the supplied item in the subcontracting order. + - name: required_qty + fieldtype: Float + label: Required Qty + description: Quantity of the item needed to be supplied by the main company to + the subcontractor for production. + - name: supplied_qty + fieldtype: Float + label: Supplied Qty + description: Actual quantity of the item already delivered or transferred to the + subcontractor. + - name: consumed_qty + fieldtype: Float + label: Consumed Qty + description: Quantity of supplied item actually consumed or used by the subcontractor + in production. + - name: returned_qty + fieldtype: Float + label: Returned Qty + description: Quantity of supplied item returned back by the subcontractor after + completion or cancellation. + - name: total_supplied_qty + fieldtype: Float + label: Total Supplied Qty + description: Total quantity of item supplied to the subcontractor for the order. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabSubcontracting + Order Supplied Item). Comparison-ready across parent records.' +- table: tabSubcontracting Receipt + description: '' + fields: + - name: title + fieldtype: Data + label: Title + description: Display name or label for the subcontracting receipt + - name: naming_series + fieldtype: Select + label: Series + description: Prefix pattern used to generate the receipt identifier + options: + - MAT-SCR-.YYYY.- + - MAT-SCR-RET-.YYYY.- + - name: supplier + fieldtype: Link + label: Job Worker + description: Identifies which subcontracting supplier provided the materials or + components being received. + join_hint: + table: tabSupplier + 'on': supplier = tabSupplier.name + - name: supplier_name + fieldtype: Data + label: Job Worker Name + description: The display name of the subcontracting supplier for human-readable + identification and filtering. + - name: supplier_delivery_note + fieldtype: Data + label: Job Worker Delivery Note + description: The delivery note or challan number provided by the supplier when + shipping the subcontracted items. + - name: company + fieldtype: Link + label: Company + description: Identifies which company entity received the subcontracted materials + or services. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: posting_date + fieldtype: Date + label: Date + description: The date when the subcontracting receipt transaction was officially + recorded in the accounting system. + - name: posting_time + fieldtype: Time + label: Posting Time + description: The time of day when the subcontracting receipt transaction was officially + recorded. + - name: set_posting_time + fieldtype: Check + label: Edit Posting Date and Time + description: Indicates whether the posting date and time were manually specified + instead of using the current timestamp. + - name: is_return + fieldtype: Check + label: Is Return + description: Indicates whether this receipt represents returned materials being + sent back to the subcontractor. + - name: return_against + fieldtype: Link + label: Return Against Subcontracting Receipt + description: References the original subcontracting receipt document that this + return is being made against. + join_hint: + table: tabSubcontracting Receipt + 'on': return_against = tabSubcontracting Receipt.name + - name: cost_center + fieldtype: Link + label: Cost Center + description: Cost center to which this subcontracting receipt is allocated for + accounting and expense tracking purposes. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + - name: project + fieldtype: Link + label: Project + description: Project associated with this subcontracting receipt for tracking + project-specific subcontracted work and costs. + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: set_warehouse + fieldtype: Link + label: Accepted Warehouse + description: Warehouse where the finished goods from the subcontractor are received + and stored. + join_hint: + table: tabWarehouse + 'on': set_warehouse = tabWarehouse.name + - name: rejected_warehouse + fieldtype: Link + label: Rejected Warehouse + description: Warehouse where rejected or non-conforming items from the subcontracting + receipt are stored. + join_hint: + table: tabWarehouse + 'on': rejected_warehouse = tabWarehouse.name + - name: supplier_warehouse + fieldtype: Link + label: Job Worker Warehouse + description: Warehouse belonging to the subcontractor supplier from which materials + or finished goods are received. + join_hint: + table: tabWarehouse + 'on': supplier_warehouse = tabWarehouse.name + - name: items + fieldtype: Table + label: Items + description: '' + child_hint: + child_table: tabSubcontracting Receipt Item + fieldname: items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: items + - name: total_qty + fieldtype: Float + label: Total Quantity + description: Total quantity of items received from the subcontractor in this receipt + transaction. + - name: total + fieldtype: Currency + label: Total + description: Total monetary value of all items received in this subcontracting + receipt. + - name: supplied_items + fieldtype: Table + label: Consumed Items + description: '' + child_hint: + child_table: tabSubcontracting Receipt Supplied Item + fieldname: supplied_items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: supplied_items + - name: in_words + fieldtype: Data + label: In Words + description: Total receipt amount expressed as text for verification when users + ask about written-out values or check printing. + - name: bill_no + fieldtype: Data + label: Bill No + description: Supplier's bill or invoice number for the subcontracting receipt + when users reference external billing documents. + - name: bill_date + fieldtype: Date + label: Bill Date + description: Date on the supplier's bill or invoice when users need to match receipt + records to supplier billing dates. + - name: supplier_address + fieldtype: Link + label: Select Job Worker Address + description: Specific supplier address location used when filtering or identifying + where subcontracted materials or services are being sourced from. + join_hint: + table: tabAddress + 'on': supplier_address = tabAddress.name + - name: contact_person + fieldtype: Link + label: Contact Person + description: Individual at the supplier responsible for the subcontracting receipt, + used when identifying who to communicate with regarding this transaction. + join_hint: + table: tabContact + 'on': contact_person = tabContact.name + - name: address_display + fieldtype: Small Text + label: Address + description: Formatted complete address text used when users need the full readable + address for display or reporting purposes. + - name: contact_display + fieldtype: Small Text + label: Contact + description: Name of the contact person associated with the subcontracting receipt + for communication or coordination purposes. + - name: contact_mobile + fieldtype: Small Text + label: Mobile No + description: Mobile phone number of the contact person for the subcontracting + receipt. + - name: contact_email + fieldtype: Small Text + label: Contact Email + description: Email address of the contact person for the subcontracting receipt. + - name: shipping_address + fieldtype: Link + label: Select Shipping Address + description: Physical location where subcontracted materials or finished goods + are delivered from the subcontractor + join_hint: + table: tabAddress + 'on': shipping_address = tabAddress.name + - name: shipping_address_display + fieldtype: Small Text + label: Shipping Address + description: Formatted display version of the shipping address for subcontracted + items + - name: billing_address + fieldtype: Link + label: Select Billing Address + description: Address where invoices for subcontracting services should be sent + or associated with payment + join_hint: + table: tabAddress + 'on': billing_address = tabAddress.name + - name: billing_address_display + fieldtype: Small Text + label: Billing Address + description: Full formatted billing address for the subcontracting receipt, used + when users need to identify or filter by billing location details. + - name: distribute_additional_costs_based_on + fieldtype: Select + label: 'Distribute Additional Costs Based On ' + description: Method used to allocate extra costs across items (e.g., by quantity, + amount), relevant when users ask how additional charges are apportioned. + options: + - Qty + - Amount + - name: additional_costs + fieldtype: Table + label: Additional Costs + description: '' + child_hint: + child_table: tabLanded Cost Taxes and Charges + fieldname: additional_costs + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: additional_costs + - name: total_additional_costs + fieldtype: Currency + label: Total Additional Costs + description: Total of all additional costs (freight, insurance, customs, etc.) + added to the subcontracting receipt beyond the base item costs. + - name: amended_from + fieldtype: Link + label: Amended From + description: Reference to the previous subcontracting receipt document if this + receipt was created as an amendment or correction. + join_hint: + table: tabSubcontracting Receipt + 'on': amended_from = tabSubcontracting Receipt.name + - name: range + fieldtype: Data + label: Range + description: Numeric or alphanumeric series range identifier used for organizing + or grouping subcontracting receipt documents. + - name: represents_company + fieldtype: Link + label: Represents Company + description: The company entity that this subcontracting receipt transaction belongs + to or is recorded under. + join_hint: + table: tabCompany + 'on': represents_company = tabCompany.name + - name: status + fieldtype: Select + label: Status + description: Current state of the subcontracting receipt such as draft, submitted, + completed, or cancelled. + options: + - Draft + - Completed + - Return + - Return Issued + - Cancelled + - Closed + - name: per_returned + fieldtype: Percent + label: '% Returned' + description: Percentage of the received subcontracted items that have been returned + to the supplier. + - name: auto_repeat + fieldtype: Link + label: Auto Repeat + description: Indicates if this subcontracting receipt is part of a recurring schedule + or automatically repeats at defined intervals. + join_hint: + table: tabAuto Repeat + 'on': auto_repeat = tabAuto Repeat.name + - name: letter_head + fieldtype: Link + label: Letter Head + description: The letterhead template used when printing or generating documents + for this subcontracting receipt. + join_hint: + table: tabLetter Head + 'on': letter_head = tabLetter Head.name + - name: language + fieldtype: Data + label: Print Language + description: The language in which this subcontracting receipt document and its + printed outputs are displayed. + - name: instructions + fieldtype: Small Text + label: Instructions + description: Internal operational notes or procedural guidance for processing + the subcontracting receipt. + - name: select_print_heading + fieldtype: Link + label: Print Heading + description: Custom heading or title to display when printing the subcontracting + receipt document. + join_hint: + table: tabPrint Heading + 'on': select_print_heading = tabPrint Heading.name + - name: remarks + fieldtype: Small Text + label: Remarks + description: Additional comments or observations about the subcontracting receipt + transaction. + - name: transporter_name + fieldtype: Data + label: Transporter Name + description: Name of the logistics company or carrier that transported the subcontracted + materials or finished goods. + - name: lr_no + fieldtype: Data + label: Vehicle Number + description: Lorry receipt number or transport document reference issued by the + transporter for the shipment. + - name: lr_date + fieldtype: Date + label: Vehicle Date + description: Date when the lorry receipt or transport document was issued by the + transporter. + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Subcontracting Receipt document (master/transaction). Use + only for single-entity lookups, not cross-record comparison unless fields are + per-relationship (e.g. supplier, price_list).' +- table: tabSubcontracting Receipt Item + description: '' + fields: + - name: item_code + fieldtype: Link + label: Item Code + description: Code of the item received from the subcontractor, used to identify + which specific product or material was delivered. + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: item_name + fieldtype: Data + label: Item Name + description: Descriptive name of the item received from the subcontractor, used + when searching by product description rather than code. + - name: is_scrap_item + fieldtype: Check + label: Is Scrap Item + description: Indicates whether the received item is defective or scrap material + from the subcontractor + - name: description + fieldtype: Text Editor + label: Description + description: Detailed text describing the specific subcontracting receipt item + or its condition + - name: brand + fieldtype: Link + label: Brand + description: Brand name or manufacturer of the item received from the subcontractor + join_hint: + table: tabBrand + 'on': brand = tabBrand.name + - name: received_qty + fieldtype: Float + label: Received Quantity + description: Actual quantity of items physically received from the subcontractor + against the order. + - name: qty + fieldtype: Float + label: Accepted Quantity + description: Expected or ordered quantity of items to be received from the subcontractor. + - name: rejected_qty + fieldtype: Float + label: Rejected Quantity + description: Quantity of subcontracted items rejected upon receipt inspection + due to quality or specification failures. + - name: returned_qty + fieldtype: Float + label: Returned Qty + description: Quantity of subcontracted items returned to the subcontractor after + receipt. + - name: stock_uom + fieldtype: Link + label: Stock UOM + description: Unit of measurement for inventory tracking of the subcontracted item + received. + join_hint: + table: tabUOM + 'on': stock_uom = tabUOM.name + - name: conversion_factor + fieldtype: Float + label: Conversion Factor + description: Factor used when the subcontracted item is received in a different + unit of measure than originally ordered. + - name: rate + fieldtype: Currency + label: Rate + description: Unit price or cost per item for the subcontracted goods being received. + - name: amount + fieldtype: Currency + label: Amount + description: Total monetary value of the subcontracted items received, typically + rate multiplied by quantity. + - name: rm_cost_per_qty + fieldtype: Currency + label: Raw Material Cost Per Qty + description: Cost per quantity unit for raw materials consumed in subcontracting + production of this item. + - name: service_cost_per_qty + fieldtype: Currency + label: Service Cost Per Qty + description: Cost per quantity unit for subcontractor service charges or labor + for processing this item. + - name: additional_cost_per_qty + fieldtype: Currency + label: Additional Cost Per Qty + description: Cost per quantity unit for miscellaneous or overhead expenses beyond + raw materials and service charges for this item. + - name: scrap_cost_per_qty + fieldtype: Float + label: Scrap Cost Per Qty + description: Cost per unit of scrapped or rejected material in this subcontracting + receipt item. + - name: rm_supp_cost + fieldtype: Currency + label: Raw Materials Supplied Cost + description: Cost of raw materials supplied to the subcontractor for this receipt + item. + - name: warehouse + fieldtype: Link + label: Accepted Warehouse + description: Warehouse location where the subcontracted items from this receipt + are stored or received. + join_hint: + table: tabWarehouse + 'on': warehouse = tabWarehouse.name + - name: subcontracting_order + fieldtype: Link + label: Subcontracting Order + description: The source subcontracting order document that this receipt item is + linked to, used when tracing receipts back to their originating orders. + join_hint: + table: tabSubcontracting Order + 'on': subcontracting_order = tabSubcontracting Order.name + - name: subcontracting_order_item + fieldtype: Data + label: Subcontracting Order Item + description: The specific line item from the subcontracting order that this receipt + corresponds to, used when matching received items to what was originally ordered. + - name: subcontracting_receipt_item + fieldtype: Data + label: Subcontracting Receipt Item + description: The unique identifier for this specific receipt line item in the + subcontracting receipt document, used when referencing individual items received + from subcontractors. + - name: rejected_warehouse + fieldtype: Link + label: Rejected Warehouse + description: Warehouse where rejected or non-conforming items from subcontractor + receipt are stored or returned to. + join_hint: + table: tabWarehouse + 'on': rejected_warehouse = tabWarehouse.name + - name: bom + fieldtype: Link + label: BOM + description: Bill of materials reference that defines the components and materials + structure for the subcontracted item being received. + join_hint: + table: tabBOM + 'on': bom = tabBOM.name + - name: include_exploded_items + fieldtype: Check + label: Include Exploded Items + description: Whether to show individual component-level items from the BOM structure + rather than just the parent assembly in the receipt. + - name: quality_inspection + fieldtype: Link + label: Quality Inspection + description: Quality inspection document linked to this subcontracting receipt + item for tracking inspection results and approval status. + join_hint: + table: tabQuality Inspection + 'on': quality_inspection = tabQuality Inspection.name + - name: schedule_date + fieldtype: Date + label: Required By + description: Planned or expected date for receiving this subcontracted item from + the supplier. + - name: reference_name + fieldtype: Data + label: Reference Name + description: Display identifier combining document type and number for this subcontracting + receipt item, used when referencing the item in queries. + - name: serial_and_batch_bundle + fieldtype: Link + label: Serial and Batch Bundle + description: References the accepted serial numbers and batch numbers received + from the subcontractor for this item. + join_hint: + table: tabSerial and Batch Bundle + 'on': serial_and_batch_bundle = tabSerial and Batch Bundle.name + - name: use_serial_batch_fields + fieldtype: Check + label: Use Serial No / Batch Fields + description: Indicates whether this subcontracting receipt item tracks individual + serial numbers or batch numbers. + - name: rejected_serial_and_batch_bundle + fieldtype: Link + label: Rejected Serial and Batch Bundle + description: References the rejected serial numbers and batch numbers returned + or not accepted from the subcontractor for this item. + join_hint: + table: tabSerial and Batch Bundle + 'on': rejected_serial_and_batch_bundle = tabSerial and Batch Bundle.name + - name: serial_no + fieldtype: Small Text + label: Serial No + description: Serial number of the item received from the subcontractor for tracking + individual units. + - name: rejected_serial_no + fieldtype: Small Text + label: Rejected Serial No + description: Serial number of the item rejected during subcontracting receipt + inspection or quality check. + - name: batch_no + fieldtype: Link + label: Batch No + description: Batch number assigned to the received subcontracted items for lot + tracking and traceability. + join_hint: + table: tabBatch + 'on': batch_no = tabBatch.name + - name: manufacturer + fieldtype: Link + label: Manufacturer + description: Original manufacturer of the subcontracted item received, relevant + when tracking supplier parts by brand or OEM source. + join_hint: + table: tabManufacturer + 'on': manufacturer = tabManufacturer.name + - name: manufacturer_part_no + fieldtype: Data + label: Manufacturer Part Number + description: Manufacturer's part number for the subcontracted item received, used + to identify items by vendor-specific SKU rather than internal codes. + - name: expense_account + fieldtype: Link + label: Expense Account + description: General ledger account charged for subcontracting receipt costs, + relevant when analyzing expense allocation or cost accounting for outsourced + work. + join_hint: + table: tabAccount + 'on': expense_account = tabAccount.name + - name: service_expense_account + fieldtype: Link + label: Service Expense Account + description: Account where subcontracted service costs are expensed when receiving + items from the subcontractor. + join_hint: + table: tabAccount + 'on': service_expense_account = tabAccount.name + - name: cost_center + fieldtype: Link + label: Cost Center + description: Cost center to which this subcontracted receipt item's expenses are + allocated for tracking departmental or operational costs. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + - name: project + fieldtype: Link + label: Project + description: Project to which this subcontracted receipt item is linked for tracking + project-specific subcontracting costs and materials. + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: page_break + fieldtype: Check + label: Page Break + description: Controls whether a page break occurs before this item when printing + subcontracting receipt documents. + - name: purchase_order + fieldtype: Link + label: Purchase Order + description: The purchase order document from which this subcontracting receipt + item originates. + join_hint: + table: tabPurchase Order + 'on': purchase_order = tabPurchase Order.name + - name: purchase_order_item + fieldtype: Data + label: Purchase Order Item + description: The specific line item from the purchase order that this subcontracting + receipt corresponds to. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabSubcontracting + Receipt Item). Comparison-ready across parent records.' +- table: tabSubcontracting Receipt Supplied Item + description: '' + fields: + - name: main_item_code + fieldtype: Link + label: Item Code + description: Finished or semi-finished item code that the subcontractor is manufacturing + join_hint: + table: tabItem + 'on': main_item_code = tabItem.name + - name: rm_item_code + fieldtype: Link + label: Raw Material Item Code + description: Raw material or component item code supplied to the subcontractor + for manufacturing the main item + join_hint: + table: tabItem + 'on': rm_item_code = tabItem.name + - name: item_name + fieldtype: Data + label: Item Name + description: Raw material or component supplied to the subcontractor for manufacturing, + referenced when tracking what materials were provided for a specific subcontracting + job. + - name: bom_detail_no + fieldtype: Data + label: BOM Detail No + description: Reference to the specific line item in the bill of materials that + corresponds to this supplied item, used to link supplied materials back to the + production BOM structure. + - name: description + fieldtype: Text Editor + label: Description + description: Detailed text describing the supplied item, used when searching for + items by their characteristics or specifications rather than item code. + - name: stock_uom + fieldtype: Link + label: Stock UOM + description: Unit of measurement for the supplied item in inventory stock terms. + join_hint: + table: tabUOM + 'on': stock_uom = tabUOM.name + - name: conversion_factor + fieldtype: Float + label: Conversion Factor + description: Multiplier to convert between the transaction unit and stock unit + of measurement for the supplied item. + - name: reference_name + fieldtype: Data + label: Reference Name + description: Name or identifier of the supplied item being received in the subcontracting + process. + - name: rate + fieldtype: Currency + label: Rate + description: Unit price of the supplied item provided to the subcontractor for + this receipt transaction. + - name: amount + fieldtype: Currency + label: Amount + description: Total monetary value of the supplied item quantity in this subcontract + receipt. + - name: available_qty_for_consumption + fieldtype: Float + label: Available Qty For Consumption + description: Quantity of the supplied item remaining that can still be consumed + or used in subcontracted production. + - name: required_qty + fieldtype: Float + label: Required Qty + description: Quantity of supplied item needed for the subcontracting receipt production + process. + - name: consumed_qty + fieldtype: Float + label: Consumed Qty + description: Actual quantity of supplied item consumed during subcontracting receipt + execution. + - name: current_stock + fieldtype: Float + label: Current Stock + description: Available stock quantity of the supplied item at the time of subcontracting + receipt. + - name: serial_and_batch_bundle + fieldtype: Link + label: Serial / Batch Bundle + description: Identifier linking multiple serial or batch numbers supplied together + in this subcontracting receipt transaction. + join_hint: + table: tabSerial and Batch Bundle + 'on': serial_and_batch_bundle = tabSerial and Batch Bundle.name + - name: use_serial_batch_fields + fieldtype: Check + label: Use Serial No / Batch Fields + description: Indicates whether serial number or batch number tracking is enabled + for the supplied item in this receipt. + - name: subcontracting_order + fieldtype: Link + label: Subcontracting Order + description: Reference to the parent subcontracting order document for which these + supplied items were received. + join_hint: + table: tabSubcontracting Order + 'on': subcontracting_order = tabSubcontracting Order.name + - name: serial_no + fieldtype: Text + label: Serial No + description: Unique identifier for tracking individual units of supplied items + received from subcontractors. + - name: batch_no + fieldtype: Link + label: Batch No + description: Batch or lot number for grouping supplied items received from subcontractors + for quality control and traceability. + join_hint: + table: tabBatch + 'on': batch_no = tabBatch.name + - name: expense_account + fieldtype: Link + label: Expense Account + description: General ledger account where costs of supplied items received from + subcontractors are recorded. + join_hint: + table: tabAccount + 'on': expense_account = tabAccount.name + - name: cost_center + fieldtype: Link + label: Cost Center + description: Cost center to which the subcontracting receipt supplied item is + allocated for accounting and expense tracking purposes. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabSubcontracting + Receipt Supplied Item). Comparison-ready across parent records.' +- table: tabSubmission Queue + description: '' + fields: + - name: status + fieldtype: Select + label: Status + description: Current processing state of the queued submission (pending, processing, + completed, failed), used to monitor queue progress. + options: + - Queued + - Finished + - Failed + - name: created_at + fieldtype: Datetime + label: Created At + description: Timestamp when the background job was created, used for queue performance + analysis and SLA tracking. + - name: enqueued_by + fieldtype: Data + label: Enqueued By + description: User who triggered the submission to be queued, used for auditing + who initiated background processes. + - name: job_id + fieldtype: Link + label: Job Id + description: Background job identifier linking to the actual processing task, + used to trace job execution details. + join_hint: + table: tabRQ Job + 'on': job_id = tabRQ Job.name + - name: ended_at + fieldtype: Datetime + label: Ended At + description: Timestamp when the queued job completed or failed, used to calculate + processing duration and throughput. + - name: ref_doctype + fieldtype: Link + label: Reference DocType + description: DocType being processed in this queue entry, used to filter submissions + by document type. + join_hint: + table: tabDocType + 'on': ref_doctype = tabDocType.name + - name: ref_docname + fieldtype: Dynamic Link + label: Reference Docname + description: Identifies the source document being submitted to the queue for processing + or approval workflows. + - name: exception + fieldtype: Long Text + label: Exception + description: Captures error messages or validation failures that occurred during + submission processing or document validation. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Submission Queue document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabSubscription + description: '' + fields: + - name: party_type + fieldtype: Link + label: Party Type + description: Type of entity holding the subscription such as Customer, Supplier, + or Employee + join_hint: + table: tabDocType + 'on': party_type = tabDocType.name + - name: party + fieldtype: Dynamic Link + label: Party + description: Specific entity (customer, supplier, or employee) who owns or is + associated with this subscription + - name: company + fieldtype: Link + label: Company + description: The company entity that owns or is billed for this subscription + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: status + fieldtype: Select + label: Status + description: Current state of the subscription such as active, cancelled, expired, + or trial + options: + - Trialling + - Active + - Past Due Date + - Cancelled + - Unpaid + - Completed + - name: start_date + fieldtype: Date + label: Subscription Start Date + description: The date when the subscription began or becomes effective + - name: end_date + fieldtype: Date + label: Subscription End Date + description: When a subscription's scheduled termination or renewal date occurs, + regardless of whether it was canceled early. + - name: cancelation_date + fieldtype: Date + label: Cancelation Date + description: When a user actively canceled their subscription, which may occur + before the end_date. + - name: trial_period_start + fieldtype: Date + label: Trial Period Start Date + description: When a subscription's free trial began, used to identify trial users + or calculate trial duration. + - name: trial_period_end + fieldtype: Date + label: Trial Period End Date + description: Date when the subscription trial period expires and billing begins. + - name: follow_calendar_months + fieldtype: Check + label: Follow Calendar Months + description: Whether subscription billing cycles align with calendar month boundaries + rather than anniversary dates from start date. + - name: generate_new_invoices_past_due_date + fieldtype: Check + label: Generate New Invoices Past Due Date + description: Whether the system continues creating new invoices for subscriptions + that have overdue unpaid invoices. + - name: submit_invoice + fieldtype: Check + label: Submit Generated Invoices + description: Whether invoices for this subscription should be submitted or generated + automatically. + - name: current_invoice_start + fieldtype: Date + label: Current Invoice Start Date + description: Start date of the current billing period being invoiced for this + subscription. + - name: current_invoice_end + fieldtype: Date + label: Current Invoice End Date + description: End date of the current billing period being invoiced for this subscription. + - name: days_until_due + fieldtype: Int + label: Days Until Due + description: Number of days after invoice generation until payment is due for + subscription invoices + - name: generate_invoice_at + fieldtype: Select + label: Generate Invoice At + description: Timing or date when the next subscription invoice will be automatically + created + options: + - End of the current subscription period + - Beginning of the current subscription period + - Days before the current subscription period + - name: number_of_days + fieldtype: Int + label: Number of Days + description: Duration or length of the subscription billing period in days + - name: cancel_at_period_end + fieldtype: Check + label: Cancel At End Of Period + description: Indicates whether the subscription will automatically cancel when + the current billing period ends, relevant for questions about pending cancellations + or auto-renewal status. + - name: plans + fieldtype: Table + label: Plans + description: '' + child_hint: + child_table: tabSubscription Plan Detail + fieldname: plans + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: plans + - name: sales_tax_template + fieldtype: Link + label: Sales Taxes and Charges Template + description: The tax calculation template applied to this subscription for determining + sales tax rates and rules based on jurisdiction or product type. + join_hint: + table: tabSales Taxes and Charges Template + 'on': sales_tax_template = tabSales Taxes and Charges Template.name + - name: purchase_tax_template + fieldtype: Link + label: Purchase Taxes and Charges Template + description: Tax template applied to purchase transactions or invoices generated + from this subscription + join_hint: + table: tabPurchase Taxes and Charges Template + 'on': purchase_tax_template = tabPurchase Taxes and Charges Template.name + - name: apply_additional_discount + fieldtype: Select + label: Apply Additional Discount On + description: Whether an extra discount beyond line-item discounts is applied to + the subscription total + options: + - Grand Total + - Net Total + - name: additional_discount_percentage + fieldtype: Percent + label: Additional Discount Percentage + description: Percentage value of the extra discount applied at subscription level + when additional discounts are enabled + - name: additional_discount_amount + fieldtype: Currency + label: Additional Discount Amount + description: Extra discount applied to subscription beyond standard pricing or + promotional discounts. + - name: cost_center + fieldtype: Link + label: Cost Center + description: Accounting department or business unit charged for this subscription's + expenses. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Subscription document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabSubscription Invoice + description: '' + fields: + - name: document_type + fieldtype: Link + label: 'Document Type ' + description: Type of subscription invoice document such as credit note, debit + note, or standard invoice + join_hint: + table: tabDocType + 'on': document_type = tabDocType.name + - name: invoice + fieldtype: Dynamic Link + label: Invoice + description: Reference to the related sales invoice generated from this subscription + invoice + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabSubscription Invoice). + Comparison-ready across parent records.' +- table: tabSubscription Plan + description: '' + fields: + - name: plan_name + fieldtype: Data + label: Plan Name + description: Display name of the subscription plan shown to customers and used + in business conversations about plan offerings. + - name: currency + fieldtype: Link + label: Currency + description: Currency in which the subscription plan pricing is denominated and + billed to customers. + join_hint: + table: tabCurrency + 'on': currency = tabCurrency.name + - name: item + fieldtype: Link + label: Item + description: The product or service being sold under this subscription plan. + join_hint: + table: tabItem + 'on': item = tabItem.name + - name: price_determination + fieldtype: Select + label: Subscription Price Based On + description: How the subscription price is calculated, such as fixed rate, tiered + pricing, or usage-based billing. + options: + - Fixed Rate + - Based On Price List + - Monthly Rate + - name: cost + fieldtype: Currency + label: Cost + description: The internal cost to provide this subscription plan, used for profitability + analysis and margin calculations. + - name: price_list + fieldtype: Link + label: Price List + description: Price list that defines the pricing structure and rates applied to + this subscription plan. + join_hint: + table: tabPrice List + 'on': price_list = tabPrice List.name + - name: billing_interval + fieldtype: Select + label: Billing Interval + description: Unit of time between billing cycles such as day, week, month, or + year. + options: + - Day + - Week + - Month + - Year + - name: billing_interval_count + fieldtype: Int + label: Billing Interval Count + description: Number of billing intervals between charges, combining with billing_interval + to determine actual billing frequency. + - name: product_price_id + fieldtype: Data + label: Product Price ID + description: Links to the specific pricing tier or plan variant that determines + billing amount and frequency for this subscription. + - name: payment_gateway + fieldtype: Link + label: Payment Gateway + description: Identifies which payment processor handles transactions for this + subscription such as Stripe, PayPal, or Braintree. + join_hint: + table: tabPayment Gateway Account + 'on': payment_gateway = tabPayment Gateway Account.name + - name: cost_center + fieldtype: Link + label: Cost Center + description: Allocates subscription revenue or expenses to a specific department + or business unit for financial tracking and reporting. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Subscription Plan document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabSubscription Plan Detail + description: '' + fields: + - name: plan + fieldtype: Link + label: Plan + description: Links to the parent subscription plan for filtering and grouping + plan-level metrics and comparisons. + join_hint: + table: tabSubscription Plan + 'on': plan = tabSubscription Plan.name + - name: qty + fieldtype: Int + label: Quantity + description: Tracks quantity or allocation amount for the plan detail, used in + capacity analysis and usage calculations. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabSubscription Plan + Detail). Comparison-ready across parent records.' +- table: tabSuccess Action + description: '' + fields: + - name: ref_doctype + fieldtype: Link + label: Reference Document Type + description: Target document type that triggers or references this success action. + join_hint: + table: tabDocType + 'on': ref_doctype = tabDocType.name + - name: first_success_message + fieldtype: Data + label: First Success Message + description: Initial message displayed when the success action is first triggered. + - name: message + fieldtype: Data + label: Message + description: Main notification or confirmation message shown when the action completes + successfully. + - name: next_actions + fieldtype: Data + label: next_actions + description: Subsequent actions or workflows to be triggered after this success + action completes. + - name: action_timeout + fieldtype: Int + label: Action Timeout (Seconds) + description: Maximum time allowed for this success action to complete before timing + out. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Success Action document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabSupplier + description: Supplier of Goods or Services. + fields: + - name: naming_series + fieldtype: Select + label: Series + description: Prefix pattern used to auto-generate supplier IDs following organizational + naming conventions + options: + - SUP-.YYYY.- + - name: supplier_name + fieldtype: Data + label: Supplier Name + description: Full business name or legal name of the supplier as it appears in + contracts and invoices + - name: country + fieldtype: Link + label: Country + description: Geographic location where the supplier is based or operates from. + join_hint: + table: tabCountry + 'on': country = tabCountry.name + - name: supplier_group + fieldtype: Link + label: Supplier Group + description: Organizational grouping or category that clusters suppliers by business + relationship, strategic importance, or management structure. + join_hint: + table: tabSupplier Group + 'on': supplier_group = tabSupplier Group.name + - name: supplier_type + fieldtype: Select + label: Supplier Type + description: Classification of supplier by the nature of goods or services they + provide, such as raw materials, finished goods, or services. + options: + - Company + - Individual + - Partnership + - name: is_transporter + fieldtype: Check + label: Is Transporter + description: Indicates whether the supplier provides transportation or logistics + services in addition to or instead of goods. + - name: default_currency + fieldtype: Link + label: Billing Currency + description: The currency used for transactions and invoicing with this supplier. + join_hint: + table: tabCurrency + 'on': default_currency = tabCurrency.name + - name: default_bank_account + fieldtype: Link + label: Default Company Bank Account + description: The primary bank account for making payments to this supplier. + join_hint: + table: tabBank Account + 'on': default_bank_account = tabBank Account.name + - name: default_price_list + fieldtype: Link + label: Price List + description: Price list automatically applied when creating purchase transactions + with this supplier. + join_hint: + table: tabPrice List + 'on': default_price_list = tabPrice List.name + - name: is_internal_supplier + fieldtype: Check + label: Is Internal Supplier + description: Indicates the supplier is an internal company entity used for inter-company + or branch transfers. + - name: represents_company + fieldtype: Link + label: Represents Company + description: The internal company that this supplier represents when is_internal_supplier + is enabled. + join_hint: + table: tabCompany + 'on': represents_company = tabCompany.name + - name: companies + fieldtype: Table + label: Allowed To Transact With + description: '' + child_hint: + child_table: tabAllowed To Transact With + fieldname: companies + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: companies + - name: supplier_details + fieldtype: Text + label: Supplier Details + description: Full descriptive information about the supplier including business + overview, capabilities, and qualifications. + - name: website + fieldtype: Data + label: Website + description: Supplier's official website URL for accessing their online presence + and product catalogs. + - name: language + fieldtype: Link + label: Print Language + description: Preferred language for communications and documents with the supplier. + join_hint: + table: tabLanguage + 'on': language = tabLanguage.name + - name: tax_id + fieldtype: Data + label: Tax ID + description: Supplier's tax identification number or VAT registration number for + tax reporting and compliance. + - name: tax_category + fieldtype: Link + label: Tax Category + description: Tax classification determining which tax rates and rules apply to + purchases from this supplier. + join_hint: + table: tabTax Category + 'on': tax_category = tabTax Category.name + - name: tax_withholding_category + fieldtype: Link + label: Tax Withholding Category + description: Classification determining which tax withholding rules apply to payments + made to this supplier + join_hint: + table: tabTax Withholding Category + 'on': tax_withholding_category = tabTax Withholding Category.name + - name: supplier_primary_address + fieldtype: Link + label: Supplier Primary Address + description: Main business address for the supplier used for official correspondence + and tax documentation + join_hint: + table: tabAddress + 'on': supplier_primary_address = tabAddress.name + - name: primary_address + fieldtype: Text + label: Primary Address + description: Default address identifier linking to the supplier's main location + record + - name: supplier_primary_contact + fieldtype: Link + label: Supplier Primary Contact + description: Main contact person name at the supplier organization for business + communications and inquiries + join_hint: + table: tabContact + 'on': supplier_primary_contact = tabContact.name + - name: payment_terms + fieldtype: Link + label: Default Payment Terms Template + description: Payment terms negotiated with the supplier such as net 30, net 60, + or immediate payment requirements. + join_hint: + table: tabPayment Terms Template + 'on': payment_terms = tabPayment Terms Template.name + - name: accounts + fieldtype: Table + label: Accounts + description: '' + child_hint: + child_table: tabParty Account + fieldname: accounts + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: accounts + - name: allow_purchase_invoice_creation_without_purchase_order + fieldtype: Check + label: Allow Purchase Invoice Creation Without Purchase Order + description: Whether invoices from this supplier can be created and processed + without requiring a prior purchase order. + - name: allow_purchase_invoice_creation_without_purchase_receipt + fieldtype: Check + label: Allow Purchase Invoice Creation Without Purchase Receipt + description: Whether invoices from this supplier can be created before receiving + goods, relevant for payment processing workflows without prior receipt confirmation. + - name: is_frozen + fieldtype: Check + label: Is Frozen + description: Whether all transactions with this supplier are temporarily blocked, + used when querying which suppliers cannot currently be used for purchases or + payments. + - name: disabled + fieldtype: Check + label: Disabled + description: Whether this supplier is permanently deactivated and excluded from + active supplier lists, searches, and new transaction creation. + - name: warn_rfqs + fieldtype: Check + label: Warn RFQs + description: Flag indicating whether to show warnings when creating RFQs for this + supplier due to performance or compliance issues. + - name: warn_pos + fieldtype: Check + label: Warn POs + description: Flag indicating whether to show warnings when creating purchase orders + for this supplier due to performance or compliance issues. + - name: prevent_rfqs + fieldtype: Check + label: Prevent RFQs + description: Flag indicating whether to block creation of new RFQs for this supplier + entirely due to serious issues or blacklisting. + - name: prevent_pos + fieldtype: Check + label: Prevent POs + description: Whether this supplier is blocked from being used in point-of-sale + transactions. + - name: on_hold + fieldtype: Check + label: Block Supplier + description: Whether this supplier is temporarily suspended from new purchase + orders or transactions. + - name: hold_type + fieldtype: Select + label: Hold Type + description: The specific reason or category for why the supplier is on hold, + such as credit issues, quality problems, or compliance violations. + options: + - All + - Invoices + - Payments + - name: release_date + fieldtype: Date + label: Release Date + description: Date when the supplier relationship or account was activated or made + available for transactions. + - name: portal_users + fieldtype: Table + label: Supplier Portal Users + description: '' + child_hint: + child_table: tabPortal User + fieldname: portal_users + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: portal_users + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Supplier document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabSupplier Group + description: '' + fields: + - name: supplier_group_name + fieldtype: Data + label: Supplier Group Name + description: Display name of the supplier group, used when searching or categorizing + suppliers by group. + - name: parent_supplier_group + fieldtype: Link + label: Parent Supplier Group + description: Reference to the parent group in the hierarchy, used when analyzing + nested supplier group structures. + join_hint: + table: tabSupplier Group + 'on': parent_supplier_group = tabSupplier Group.name + - name: is_group + fieldtype: Check + label: Is Group + description: Flag indicating if this is a parent group node or leaf node, used + to filter grouping levels in hierarchical reports. + - name: payment_terms + fieldtype: Link + label: Default Payment Terms Template + description: Default payment terms template for suppliers in this group, used + when setting up new supplier payment conditions. + join_hint: + table: tabPayment Terms Template + 'on': payment_terms = tabPayment Terms Template.name + - name: accounts + fieldtype: Table + label: Accounts + description: '' + child_hint: + child_table: tabParty Account + fieldname: accounts + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: accounts + - name: lft + fieldtype: Int + label: lft + description: Left boundary value in nested set model, used for hierarchical tree + queries and supplier group structure navigation. + - name: rgt + fieldtype: Int + label: rgt + description: Right boundary value in nested set model, used for hierarchical tree + queries and retrieving all descendants. + - name: old_parent + fieldtype: Link + label: Old Parent + description: Previous parent group before reorganization, used for tracking supplier + group hierarchy changes and migrations. + join_hint: + table: tabSupplier Group + 'on': old_parent = tabSupplier Group.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Supplier Group document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabSupplier Group Item + description: '' + fields: + - name: supplier_group + fieldtype: Link + label: Supplier Group + description: Supplier group classification that this item belongs to for procurement + or vendor management purposes + join_hint: + table: tabSupplier Group + 'on': supplier_group = tabSupplier Group.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabSupplier Group + Item). Comparison-ready across parent records.' +- table: tabSupplier Item + description: '' + fields: + - name: supplier + fieldtype: Link + label: Supplier + description: supplier_who_provides_this_item + join_hint: + table: tabSupplier + 'on': supplier = tabSupplier.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabSupplier Item). + Comparison-ready across parent records.' +- table: tabSupplier Quotation + description: '' + fields: + - name: title + fieldtype: Data + label: Title + description: Brief descriptive label or subject line summarizing what the supplier + quotation is for + - name: naming_series + fieldtype: Select + label: Series + description: Prefix pattern used to generate the quotation number sequence + options: + - PUR-SQTN-.YYYY.- + - name: supplier + fieldtype: Link + label: Supplier + description: Identifier of the vendor providing the quotation, used when searching + for quotes from a specific supplier. + join_hint: + table: tabSupplier + 'on': supplier = tabSupplier.name + - name: supplier_name + fieldtype: Data + label: Supplier Name + description: Name of the vendor providing the quotation, used when searching by + supplier company name rather than identifier. + - name: company + fieldtype: Link + label: Company + description: The buying organization or entity receiving this quotation, used + when filtering quotes by which company location or subsidiary is purchasing. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: status + fieldtype: Select + label: Status + description: Current state of the supplier quotation such as draft, submitted, + ordered, or expired. + options: + - Draft + - Submitted + - Stopped + - Cancelled + - Expired + - name: transaction_date + fieldtype: Date + label: Date + description: Date when the supplier quotation was created or issued. + - name: valid_till + fieldtype: Date + label: Valid Till + description: Expiration date until which the supplier's quoted prices and terms + remain valid. + - name: quotation_number + fieldtype: Data + label: Quotation Number + description: Unique identifier for the supplier quotation used when referencing, + searching, or tracking a specific quote from a vendor. + - name: has_unit_price_items + fieldtype: Check + label: Has Unit Price Items + description: Indicates whether the quotation includes line items with individual + unit pricing rather than bulk or total pricing only. + - name: amended_from + fieldtype: Link + label: Amended From + description: References the original quotation number that this quotation revises + or replaces when changes were made after initial submission. + join_hint: + table: tabSupplier Quotation + 'on': amended_from = tabSupplier Quotation.name + - name: cost_center + fieldtype: Link + label: Cost Center + description: Cost center to which expenses from this supplier quotation will be + allocated for budgeting and financial tracking purposes. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + - name: project + fieldtype: Link + label: Project + description: Specific project associated with this supplier quotation for tracking + project-related procurement and costs. + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: currency + fieldtype: Link + label: Currency + description: Currency in which the supplier quotation prices and amounts are denominated. + join_hint: + table: tabCurrency + 'on': currency = tabCurrency.name + - name: conversion_rate + fieldtype: Float + label: Exchange Rate + description: Exchange rate used to convert supplier quotation amounts from price + list currency to company base currency. + - name: buying_price_list + fieldtype: Link + label: Price List + description: Specific price list from the supplier that applies to this quotation, + determining pricing terms and conditions. + join_hint: + table: tabPrice List + 'on': buying_price_list = tabPrice List.name + - name: price_list_currency + fieldtype: Link + label: Price List Currency + description: Currency in which the supplier's price list and quotation amounts + are denominated. + join_hint: + table: tabCurrency + 'on': price_list_currency = tabCurrency.name + - name: plc_conversion_rate + fieldtype: Float + label: Price List Exchange Rate + description: Exchange rate used to convert price list currency to transaction + currency for this supplier quotation. + - name: ignore_pricing_rule + fieldtype: Check + label: Ignore Pricing Rule + description: Whether automatic pricing rules are bypassed for this supplier quotation. + - name: items + fieldtype: Table + label: Items + description: '' + child_hint: + child_table: tabSupplier Quotation Item + fieldname: items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: items + - name: total_qty + fieldtype: Float + label: Total Quantity + description: Total quantity of all items in the supplier quotation across all + line items. + - name: total_net_weight + fieldtype: Float + label: Total Net Weight + description: Combined net weight of all items in the supplier quotation. + - name: base_total + fieldtype: Currency + label: Total (Company Currency) + description: Total amount of the supplier quotation in the company's base currency + before taxes and charges. + - name: base_net_total + fieldtype: Currency + label: Net Total (Company Currency) + description: Net total amount in company's base currency before taxes and after + discounts, used for multi-currency reporting and accounting consolidation. + - name: total + fieldtype: Currency + label: Total + description: Final grand total amount including all taxes, charges, and discounts + that the supplier quoted. + - name: net_total + fieldtype: Currency + label: Net Total + description: Subtotal amount in transaction currency after item-level discounts + but before taxes and additional charges. + - name: tax_category + fieldtype: Link + label: Tax Category + description: Tax classification applied to the supplier quotation determining + which tax rules apply based on supplier location, product type, or transaction + nature. + join_hint: + table: tabTax Category + 'on': tax_category = tabTax Category.name + - name: taxes_and_charges + fieldtype: Link + label: Purchase Taxes and Charges Template + description: Specific tax template or configuration defining the actual tax rates, + accounts, and charge calculations applied to this supplier quotation. + join_hint: + table: tabPurchase Taxes and Charges Template + 'on': taxes_and_charges = tabPurchase Taxes and Charges Template.name + - name: shipping_rule + fieldtype: Link + label: Shipping Rule + description: Shipping cost calculation rule applied to determine freight charges + based on order value, weight, or destination for this supplier quotation. + join_hint: + table: tabShipping Rule + 'on': shipping_rule = tabShipping Rule.name + - name: incoterm + fieldtype: Link + label: Incoterm + description: Shipping term code defining responsibility transfer point between + supplier and buyer such as FOB, CIF, or EXW. + join_hint: + table: tabIncoterm + 'on': incoterm = tabIncoterm.name + - name: named_place + fieldtype: Data + label: Named Place + description: Specific location associated with the incoterm where responsibility + transfers, such as port name or delivery address. + - name: taxes + fieldtype: Table + label: Purchase Taxes and Charges + description: '' + child_hint: + child_table: tabPurchase Taxes and Charges + fieldname: taxes + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: taxes + - name: base_taxes_and_charges_added + fieldtype: Currency + label: Taxes and Charges Added (Company Currency) + description: Total additional taxes and charges applied to the quotation in base + currency, used when calculating total cost increases from tax additions. + - name: base_taxes_and_charges_deducted + fieldtype: Currency + label: Taxes and Charges Deducted (Company Currency) + description: Total taxes and charges deducted or credited from the quotation in + base currency, used when calculating net reductions from tax credits or exemptions. + - name: base_total_taxes_and_charges + fieldtype: Currency + label: Total Taxes and Charges (Company Currency) + description: Net total of all taxes and charges (additions minus deductions) in + base currency, used when determining the complete tax impact on the quotation. + - name: taxes_and_charges_added + fieldtype: Currency + label: Taxes and Charges Added + description: Total amount of taxes and charges that increase the quotation value, + such as VAT, sales tax, or freight charges. + - name: taxes_and_charges_deducted + fieldtype: Currency + label: Taxes and Charges Deducted + description: Total amount of taxes and charges that decrease the quotation value, + such as tax credits, discounts, or rebates. + - name: total_taxes_and_charges + fieldtype: Currency + label: Total Taxes and Charges + description: Net total of all taxes and charges applied to the supplier quotation, + combining both additions and deductions. + - name: apply_discount_on + fieldtype: Select + label: Apply Additional Discount On + description: Specifies whether discounts are calculated on grand total or net + total, relevant when users ask how discount calculation basis is determined. + options: + - Grand Total + - Net Total + - name: base_discount_amount + fieldtype: Currency + label: Additional Discount Amount (Company Currency) + description: Fixed monetary discount amount applied before additional percentage + discounts, used when users ask about flat discount values on the quotation. + - name: additional_discount_percentage + fieldtype: Float + label: Additional Discount Percentage + description: Extra percentage discount applied after base discount, relevant when + users ask about secondary or stacked discount rates. + - name: discount_amount + fieldtype: Currency + label: Additional Discount Amount + description: Total discount value applied to the supplier quotation in the document's + currency. + - name: base_grand_total + fieldtype: Currency + label: Grand Total (Company Currency) + description: Final total amount of the supplier quotation in the company's base + currency, including all taxes, discounts, and adjustments. + - name: base_rounding_adjustment + fieldtype: Currency + label: Rounding Adjustment (Company Currency + description: Rounding correction applied to the final total in the company's base + currency to achieve a clean rounded amount. + - name: base_rounded_total + fieldtype: Currency + label: Rounded Total (Company Currency) + description: Total amount after rounding adjustments in base currency, used when + users ask about the final rounded quotation value before conversion. + - name: base_in_words + fieldtype: Data + label: In Words (Company Currency) + description: Written text representation of the quotation amount in base currency, + used when users need the spelled-out value for documents or reports. + - name: grand_total + fieldtype: Currency + label: Grand Total + description: Final total amount including all charges, taxes, and discounts in + transaction currency, used when users ask about the complete quotation value. + - name: rounding_adjustment + fieldtype: Currency + label: Rounding Adjustment + description: Amount added or subtracted to round the quotation total to a convenient + figure. + - name: rounded_total + fieldtype: Currency + label: Rounded Total + description: Final quotation total after applying rounding adjustment to the calculated + total. + - name: in_words + fieldtype: Data + label: In Words + description: Text representation of the quotation total amount written out in + words for formal documentation. + - name: disable_rounded_total + fieldtype: Check + label: Disable Rounded Total + description: Whether quotation totals are shown with exact decimal precision instead + of rounded amounts. + - name: other_charges_calculation + fieldtype: Text Editor + label: Taxes and Charges Calculation + description: Method or formula used to calculate additional charges beyond line + item costs in the quotation. + - name: pricing_rules + fieldtype: Table + label: Pricing Rule Detail + description: '' + child_hint: + child_table: tabPricing Rule Detail + fieldname: pricing_rules + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: pricing_rules + - name: supplier_address + fieldtype: Link + label: Supplier Address + description: Specific supplier address linked to this quotation for delivery or + billing purposes. + join_hint: + table: tabAddress + 'on': supplier_address = tabAddress.name + - name: address_display + fieldtype: Small Text + label: Address + description: Formatted full address text of the supplier as it appears on the + quotation document. + - name: contact_person + fieldtype: Link + label: Contact Person + description: Name of the individual at the supplier company who provided or is + responsible for this quotation. + join_hint: + table: tabContact + 'on': contact_person = tabContact.name + - name: contact_display + fieldtype: Small Text + label: Contact + description: Name of the supplier contact person for this quotation, used when + searching for quotes by who provided them. + - name: contact_mobile + fieldtype: Small Text + label: Mobile No + description: Mobile phone number of the supplier contact for this quotation, used + when users need to reach the quote provider by phone. + - name: contact_email + fieldtype: Data + label: Contact Email + description: Email address of the supplier contact for this quotation, used when + users need to communicate with or identify the quote provider electronically. + - name: shipping_address + fieldtype: Link + label: Shipping Address + description: Address where goods from this supplier quotation will be delivered + if accepted + join_hint: + table: tabAddress + 'on': shipping_address = tabAddress.name + - name: shipping_address_display + fieldtype: Small Text + label: Shipping Address Details + description: Formatted display version of the shipping address for presentation + and reports + - name: billing_address + fieldtype: Link + label: Company Billing Address + description: Address where invoices and payment-related documents for this supplier + quotation should be sent + join_hint: + table: tabAddress + 'on': billing_address = tabAddress.name + - name: billing_address_display + fieldtype: Small Text + label: Billing Address Details + description: Formatted billing address of the supplier for this quotation, used + when searching by supplier location or billing details. + - name: tc_name + fieldtype: Link + label: Terms Template + description: Name of the terms and conditions template applied to this supplier + quotation. + join_hint: + table: tabTerms and Conditions + 'on': tc_name = tabTerms and Conditions.name + - name: terms + fieldtype: Text Editor + label: Terms and Conditions + description: Full text of the terms and conditions or special agreements included + in this supplier quotation. + - name: letter_head + fieldtype: Link + label: Letter Head + description: Letterhead template used when printing or emailing this supplier + quotation document. + join_hint: + table: tabLetter Head + 'on': letter_head = tabLetter Head.name + - name: group_same_items + fieldtype: Check + label: Group same items + description: Whether identical items are consolidated into single lines when displaying + or printing the quotation. + - name: select_print_heading + fieldtype: Link + label: Print Heading + description: Custom heading text that appears at the top of the printed supplier + quotation instead of the default title. + join_hint: + table: tabPrint Heading + 'on': select_print_heading = tabPrint Heading.name + - name: language + fieldtype: Data + label: Print Language + description: Language in which the supplier quotation document is generated or + communicated. + - name: auto_repeat + fieldtype: Link + label: Auto Repeat + description: Indicates if this supplier quotation is set to automatically recur + at scheduled intervals. + join_hint: + table: tabAuto Repeat + 'on': auto_repeat = tabAuto Repeat.name + - name: is_subcontracted + fieldtype: Check + label: Is Subcontracted + description: Indicates whether the quoted items or services involve subcontracting + work to external parties. + - name: opportunity + fieldtype: Link + label: Opportunity + description: Links the supplier quotation to a sales opportunity when the quotation + is being prepared in response to a potential customer deal. + join_hint: + table: tabOpportunity + 'on': opportunity = tabOpportunity.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Supplier Quotation document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabSupplier Quotation Item + description: '' + fields: + - name: item_code + fieldtype: Link + label: Item Code + description: The company's internal item/product code being quoted by the supplier. + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: supplier_part_no + fieldtype: Data + label: Supplier Part Number + description: The supplier's own part number or SKU for the quoted item, distinct + from the company's internal item code. + - name: item_name + fieldtype: Data + label: Item Name + description: The product or material being quoted by the supplier, used when searching + for quotations by specific items or materials. + - name: lead_time_days + fieldtype: Int + label: Supplier Lead Time (days) + description: Number of days the supplier needs to deliver the item after order + placement, used when comparing supplier response times or planning procurement + timelines. + - name: expected_delivery_date + fieldtype: Date + label: Expected Delivery Date + description: The specific calendar date when the supplier commits to deliver the + item, used when checking delivery schedules or matching quotations to project + deadlines. + - name: is_free_item + fieldtype: Check + label: Is Free Item + description: Whether this quotation line item is offered at no charge as a promotional + or complimentary item. + - name: description + fieldtype: Text Editor + label: Description + description: Detailed text describing the quoted item, its specifications, or + additional notes about what the supplier is offering. + - name: item_group + fieldtype: Link + label: Item Group + description: The product category or classification that this quoted item belongs + to for grouping similar items. + join_hint: + table: tabItem Group + 'on': item_group = tabItem Group.name + - name: brand + fieldtype: Link + label: Brand + description: Brand name of the quoted item from the supplier. + join_hint: + table: tabBrand + 'on': brand = tabBrand.name + - name: qty + fieldtype: Float + label: Quantity + description: Quantity of the item quoted by the supplier. + - name: stock_uom + fieldtype: Link + label: Stock UOM + description: The base inventory unit of measure for the item being quoted, used + when asking about the supplier's quoted item in its standard stock-keeping unit. + join_hint: + table: tabUOM + 'on': stock_uom = tabUOM.name + - name: uom + fieldtype: Link + label: UOM + description: The unit of measure specified in this specific supplier quotation + line, used when asking about the quoted quantity unit which may differ from + stock UOM. + join_hint: + table: tabUOM + 'on': uom = tabUOM.name + - name: conversion_factor + fieldtype: Float + label: UOM Conversion Factor + description: The multiplier to convert between the quotation UOM and stock UOM, + used when asking how quoted quantities translate to base inventory units. + - name: stock_qty + fieldtype: Float + label: Qty as per Stock UOM + description: Quantity of the item currently available in supplier's stock at time + of quotation. + - name: price_list_rate + fieldtype: Currency + label: Price List Rate + description: Base unit price from supplier's standard price list before any discounts + or negotiations. + - name: discount_percentage + fieldtype: Percent + label: Discount on Price List Rate (%) + description: Percentage discount offered by supplier off the price list rate for + this quotation item. + - name: discount_amount + fieldtype: Currency + label: Discount Amount + description: Total discount value applied to this quotation item line, used when + asking about discounts given by suppliers on specific items. + - name: distributed_discount_amount + fieldtype: Currency + label: Distributed Discount Amount + description: Portion of document-level discount allocated to this item, used when + analyzing how header discounts are spread across line items. + - name: base_price_list_rate + fieldtype: Currency + label: Price List Rate (Company Currency) + description: Standard price from the supplier's price list before any discounts + or negotiations, used when comparing quoted prices to list prices. + - name: rate + fieldtype: Currency + label: Rate + description: Unit price quoted by the supplier for a single item in the quotation. + - name: amount + fieldtype: Currency + label: Amount + description: Total line amount for the quoted item after multiplying rate by quantity. + - name: item_tax_template + fieldtype: Link + label: Item Tax Template + description: Tax template applied to calculate taxes on this specific quoted item. + join_hint: + table: tabItem Tax Template + 'on': item_tax_template = tabItem Tax Template.name + - name: base_rate + fieldtype: Currency + label: Rate (Company Currency) + description: Unit price quoted by supplier before applying pricing rules or discounts. + - name: base_amount + fieldtype: Currency + label: Amount (Company Currency) + description: Total line amount before applying pricing rules or discounts, calculated + from base rate and quantity. + - name: pricing_rules + fieldtype: Small Text + label: Pricing Rules + description: Specific pricing rules or discount schemes applied to this quotation + line item. + - name: net_rate + fieldtype: Currency + label: Net Rate + description: Price per unit after applying discounts but before taxes, used when + comparing quoted unit prices from suppliers. + - name: net_amount + fieldtype: Currency + label: Net Amount + description: Total line item value after discounts but before taxes, used when + analyzing total quoted costs per item. + - name: base_net_rate + fieldtype: Currency + label: Net Rate (Company Currency) + description: Price per unit after discounts converted to company's base currency, + used for cross-currency supplier quote comparisons. + - name: base_net_amount + fieldtype: Currency + label: Net Amount (Company Currency) + description: Net amount of the quotation item in base currency, used when comparing + supplier quotes or calculating total costs before taxes and discounts. + - name: weight_per_unit + fieldtype: Float + label: Weight Per Unit + description: Weight of a single unit of the quoted item, used when calculating + shipping costs or comparing product specifications across suppliers. + - name: total_weight + fieldtype: Float + label: Total Weight + description: Total weight for the entire quantity of the quoted item, used when + estimating freight charges or logistics planning for the supplier quotation. + - name: weight_uom + fieldtype: Link + label: Weight UOM + description: Unit of measurement for the item's weight in the supplier quotation + line. + join_hint: + table: tabUOM + 'on': weight_uom = tabUOM.name + - name: warehouse + fieldtype: Link + label: Warehouse + description: Warehouse location where the quoted item would be received or stored + upon purchase. + join_hint: + table: tabWarehouse + 'on': warehouse = tabWarehouse.name + - name: prevdoc_doctype + fieldtype: Data + label: Reference Document Type + description: Document type of the preceding document that generated or is linked + to this quotation item, such as Material Request or Request for Quotation. + - name: material_request + fieldtype: Link + label: Material Request + description: Links this quotation item to the original material request that triggered + the procurement need. + join_hint: + table: tabMaterial Request + 'on': material_request = tabMaterial Request.name + - name: sales_order + fieldtype: Link + label: Sales Order + description: Links this quotation item to a customer sales order when procuring + specifically to fulfill that order. + join_hint: + table: tabSales Order + 'on': sales_order = tabSales Order.name + - name: request_for_quotation + fieldtype: Link + label: Request for Quotation + description: Links this quotation item to the RFQ document sent to suppliers to + solicit this quote. + join_hint: + table: tabRequest for Quotation + 'on': request_for_quotation = tabRequest for Quotation.name + - name: material_request_item + fieldtype: Data + label: Material Request Item + description: Links to the specific material request line item that originated + this quotation item, used when tracing supplier quotes back to internal purchase + requisitions. + - name: request_for_quotation_item + fieldtype: Data + label: Request for Quotation Item + description: Links to the specific RFQ line item that this supplier quotation + is responding to, used when comparing supplier responses to the original request + for quotation. + - name: item_tax_rate + fieldtype: Code + label: Item Tax Rate + description: Tax rate percentage or tax template applied to this quoted item, + used when calculating total quoted price including taxes or comparing tax treatment + across suppliers. + - name: manufacturer + fieldtype: Link + label: Manufacturer + description: Brand or company that produces the quoted item, used when filtering + or comparing quotes by product manufacturer. + join_hint: + table: tabManufacturer + 'on': manufacturer = tabManufacturer.name + - name: manufacturer_part_no + fieldtype: Data + label: Manufacturer Part Number + description: Manufacturer's specific part number for the quoted item, used to + identify exact product specifications or match against manufacturer catalogs. + - name: cost_center + fieldtype: Link + label: Cost Center + description: Accounting cost center to which the quoted item's expense will be + allocated, used for budget tracking and departmental cost analysis. + join_hint: + table: tabCost Center + 'on': cost_center = tabCost Center.name + - name: project + fieldtype: Link + label: Project + description: Links the quotation item to a specific project for tracking project-related + supplier quotes and procurement costs. + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: page_break + fieldtype: Check + label: Page Break + description: Controls whether a page break appears before this item when printing + or generating PDF versions of the supplier quotation. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabSupplier Quotation + Item). Comparison-ready across parent records.' +- table: tabSupplier Scorecard + description: '' + fields: + - name: supplier + fieldtype: Link + label: Supplier + description: Links to the supplier being evaluated, used when analyzing vendor + performance or filtering scorecards by supplier + join_hint: + table: tabSupplier + 'on': supplier = tabSupplier.name + - name: supplier_score + fieldtype: Data + label: Supplier Score + description: Calculated performance score used to compare supplier quality and + determine if suppliers meet minimum standards + - name: indicator_color + fieldtype: Data + label: Indicator Color + description: Visual status indicator (red/yellow/green) used to quickly identify + at-risk or high-performing suppliers + - name: status + fieldtype: Data + label: Status + description: Current state of the scorecard (active/inactive/draft) used to filter + valid performance evaluations + - name: period + fieldtype: Select + label: Evaluation Period + description: Time range for performance measurement used when analyzing supplier + trends over specific quarters or years + options: + - Per Week + - Per Month + - Per Year + - name: weighting_function + fieldtype: Small Text + label: Weighting Function + description: Calculation method for scoring used to understand how different criteria + contribute to overall supplier ratings + - name: standings + fieldtype: Table + label: Scoring Standings + description: '' + child_hint: + child_table: tabSupplier Scorecard Scoring Standing + fieldname: standings + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: standings + - name: criteria + fieldtype: Table + label: Scoring Criteria + description: '' + child_hint: + child_table: tabSupplier Scorecard Scoring Criteria + fieldname: criteria + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: criteria + - name: warn_rfqs + fieldtype: Check + label: Warn for new Request for Quotations + description: Threshold that triggers warnings when creating RFQs with underperforming + suppliers + - name: warn_pos + fieldtype: Check + label: Warn for new Purchase Orders + description: Threshold that triggers warnings when creating purchase orders with + poorly rated suppliers + - name: prevent_rfqs + fieldtype: Check + label: Prevent RFQs + description: Threshold that blocks RFQ creation with suppliers below acceptable + performance levels + - name: prevent_pos + fieldtype: Check + label: Prevent POs + description: Threshold that blocks purchase order creation with suppliers failing + minimum standards + - name: notify_supplier + fieldtype: Check + label: Notify Supplier + description: Flag indicating whether supplier receives automated alerts about + their performance scores + - name: notify_employee + fieldtype: Check + label: Notify Employee + description: Flag indicating whether internal staff receive alerts about supplier + performance issues + - name: employee + fieldtype: Link + label: Employee + description: Internal owner or manager responsible for the scorecard used when + routing performance review tasks + join_hint: + table: tabEmployee + 'on': employee = tabEmployee.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Supplier Scorecard document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabSupplier Scorecard Criteria + description: '' + fields: + - name: criteria_name + fieldtype: Data + label: Criteria Name + description: Descriptive label of the evaluation criterion used when analyzing + what performance aspects are being measured for suppliers. + - name: max_score + fieldtype: Float + label: Max Score + description: Maximum achievable points for this criterion used when calculating + percentage performance or normalizing supplier scores. + - name: formula + fieldtype: Small Text + label: Criteria Formula + description: Calculation method or scoring logic used when determining how supplier + performance is quantified for this criterion. + - name: weight + fieldtype: Percent + label: Criteria Weight + description: Relative importance percentage of this criterion used when computing + weighted overall supplier scorecard ratings. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Supplier Scorecard Criteria document (master/transaction). + Use only for single-entity lookups, not cross-record comparison unless fields + are per-relationship (e.g. supplier, price_list).' +- table: tabSupplier Scorecard Period + description: '' + fields: + - name: supplier + fieldtype: Link + label: Supplier + description: Links to the supplier being evaluated, used when filtering scorecards + by vendor or analyzing supplier performance. + join_hint: + table: tabSupplier + 'on': supplier = tabSupplier.name + - name: naming_series + fieldtype: Select + label: Naming Series + description: Auto-numbering prefix for scorecard period records, used when searching + by document number patterns. + options: + - PU-SSP-.YYYY.- + - name: total_score + fieldtype: Percent + label: Period Score + description: Aggregated performance score for the period, used when comparing + supplier rankings or filtering by performance thresholds. + - name: start_date + fieldtype: Date + label: Start Date + description: Beginning date of the evaluation period, used when filtering scorecards + by time range or fiscal period. + - name: end_date + fieldtype: Date + label: End Date + description: Closing date of the evaluation period, used when identifying active + scorecards or historical performance windows. + - name: criteria + fieldtype: Table + label: Criteria + description: '' + child_hint: + child_table: tabSupplier Scorecard Scoring Criteria + fieldname: criteria + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: criteria + - name: variables + fieldtype: Table + label: Variables + description: '' + child_hint: + child_table: tabSupplier Scorecard Scoring Variable + fieldname: variables + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: variables + - name: scorecard + fieldtype: Link + label: Supplier Scorecard Setup + description: Links to the master supplier scorecard template, used when grouping + periods by evaluation framework or scorecard type. + join_hint: + table: tabSupplier Scorecard + 'on': scorecard = tabSupplier Scorecard.name + - name: amended_from + fieldtype: Link + label: Amended From + description: References the previous version if this scorecard was corrected, + used when tracking scorecard revisions or audit trails. + join_hint: + table: tabSupplier Scorecard Period + 'on': amended_from = tabSupplier Scorecard Period.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Supplier Scorecard Period document (master/transaction). + Use only for single-entity lookups, not cross-record comparison unless fields + are per-relationship (e.g. supplier, price_list).' +- table: tabSupplier Scorecard Scoring Criteria + description: '' + fields: + - name: criteria_name + fieldtype: Link + label: Criteria Name + description: Name of the evaluation criterion used to assess supplier performance + such as quality, delivery, or cost. + join_hint: + table: tabSupplier Scorecard Criteria + 'on': criteria_name = tabSupplier Scorecard Criteria.name + - name: score + fieldtype: Percent + label: Score + description: Actual points earned by the supplier for this specific criterion + during the evaluation period. + - name: weight + fieldtype: Percent + label: Criteria Weight + description: Percentage or multiplier indicating the relative importance of this + criterion in the overall supplier scorecard calculation. + - name: max_score + fieldtype: Float + label: Max Score + description: Maximum possible points achievable for this criterion, used to calculate + percentage performance. + - name: formula + fieldtype: Small Text + label: Criteria Formula + description: Calculation method or expression used to derive the score for this + criterion from underlying metrics or data. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabSupplier Scorecard + Scoring Criteria). Comparison-ready across parent records.' +- table: tabSupplier Scorecard Scoring Standing + description: '' + fields: + - name: standing_name + fieldtype: Link + label: Standing Name + description: Display name of the performance standing (e.g., Preferred, Approved, + Poor) used when reporting supplier evaluation results. + join_hint: + table: tabSupplier Scorecard Standing + 'on': standing_name = tabSupplier Scorecard Standing.name + - name: standing_color + fieldtype: Select + label: Color + description: Visual indicator color assigned to this standing for dashboard displays + and supplier scorecards. + options: + - Blue + - Purple + - Green + - Yellow + - Orange + - Red + - name: min_grade + fieldtype: Percent + label: Min Grade + description: Minimum score threshold that qualifies a supplier for this performance + standing level. + - name: max_grade + fieldtype: Percent + label: Max Grade + description: Maximum score threshold that defines the upper boundary for this + performance standing level. + - name: warn_rfqs + fieldtype: Check + label: Warn RFQs + description: Flag indicating whether to display warnings when creating RFQs with + suppliers in this standing. + - name: warn_pos + fieldtype: Check + label: Warn Purchase Orders + description: Flag indicating whether to display warnings when creating purchase + orders with suppliers in this standing. + - name: prevent_rfqs + fieldtype: Check + label: Prevent RFQs + description: Flag that blocks RFQ creation with suppliers in this standing due + to poor performance. + - name: prevent_pos + fieldtype: Check + label: Prevent Purchase Orders + description: Flag that blocks purchase order creation with suppliers in this standing + due to poor performance. + - name: notify_supplier + fieldtype: Check + label: Notify Supplier + description: Flag indicating whether suppliers are automatically notified when + their scorecard reaches this standing. + - name: notify_employee + fieldtype: Check + label: Notify Employee + description: Flag indicating whether internal employees are alerted when a supplier + falls into this standing. + - name: employee_link + fieldtype: Link + label: 'Employee ' + description: Reference to the employee or role who should be notified about suppliers + in this performance standing. + join_hint: + table: tabEmployee + 'on': employee_link = tabEmployee.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabSupplier Scorecard + Scoring Standing). Comparison-ready across parent records.' +- table: tabSupplier Scorecard Scoring Variable + description: '' + fields: + - name: variable_label + fieldtype: Link + label: Variable Name + description: Display label for the scoring variable shown to users when configuring + or viewing supplier performance criteria. + join_hint: + table: tabSupplier Scorecard Variable + 'on': variable_label = tabSupplier Scorecard Variable.name + - name: description + fieldtype: Small Text + label: Description + description: Detailed explanation of what the scoring variable measures, used + when users need to understand the business meaning of a supplier performance + metric. + - name: value + fieldtype: Float + label: Value + description: Numeric or text value assigned to the scoring variable, used when + calculating supplier scores or evaluating performance thresholds. + - name: param_name + fieldtype: Data + label: Parameter Name + description: Technical parameter name used in system calculations and integrations + when processing supplier scorecard formulas. + - name: path + fieldtype: Data + label: Path + description: Hierarchical location or category path of the scoring variable, used + when organizing or filtering performance metrics by business area or evaluation + dimension. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabSupplier Scorecard + Scoring Variable). Comparison-ready across parent records.' +- table: tabSupplier Scorecard Standing + description: '' + fields: + - name: standing_name + fieldtype: Data + label: Standing Name + description: Display name of the performance tier (e.g., Preferred, Approved, + Probation) used when categorizing suppliers by their scorecard results. + - name: standing_color + fieldtype: Select + label: Color + description: Visual indicator color assigned to this standing level used in dashboards + and reports to quickly identify supplier performance status. + options: + - Blue + - Purple + - Green + - Yellow + - Orange + - Red + - name: min_grade + fieldtype: Percent + label: Min Grade + description: Minimum scorecard grade threshold that qualifies a supplier for this + standing level, used to automatically assign performance tiers. + - name: max_grade + fieldtype: Percent + label: Max Grade + description: Maximum scorecard grade threshold for this standing level, used to + define the upper boundary of this performance tier. + - name: warn_rfqs + fieldtype: Check + label: Warn RFQs + description: Flag indicating whether to display warnings when creating RFQs with + suppliers in this standing, used to alert buyers about performance concerns. + - name: warn_pos + fieldtype: Check + label: Warn Purchase Orders + description: Flag indicating whether to display warnings when creating purchase + orders with suppliers in this standing, used to prevent procurement from poor + performers. + - name: prevent_rfqs + fieldtype: Check + label: Prevent RFQs + description: Flag that blocks creation of new RFQs with suppliers in this standing, + used to enforce hard stops for unacceptable supplier performance. + - name: prevent_pos + fieldtype: Check + label: Prevent Purchase Orders + description: Flag that blocks creation of new purchase orders with suppliers in + this standing, used to completely restrict purchasing from failing suppliers. + - name: notify_supplier + fieldtype: Check + label: Notify Supplier + description: Flag indicating whether to automatically send notifications to suppliers + when they are assigned this standing, used for supplier performance communication. + - name: notify_employee + fieldtype: Check + label: Notify Other + description: Flag indicating whether to send alerts to internal employees when + a supplier reaches this standing level, used for escalation and awareness. + - name: employee_link + fieldtype: Link + label: Other + description: Reference to the employee or role to notify when suppliers fall into + this standing, used to route performance alerts to responsible procurement managers. + join_hint: + table: tabEmployee + 'on': employee_link = tabEmployee.name + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Supplier Scorecard Standing document (master/transaction). + Use only for single-entity lookups, not cross-record comparison unless fields + are per-relationship (e.g. supplier, price_list).' +- table: tabSupplier Scorecard Variable + description: '' + fields: + - name: variable_label + fieldtype: Data + label: Variable Name + description: Display name shown to users when viewing or filtering supplier performance + metrics in scorecards. + - name: is_custom + fieldtype: Check + label: Custom? + description: Indicates whether this scorecard variable was custom-created by the + organization versus being a standard system metric. + - name: param_name + fieldtype: Data + label: Parameter Name + description: Technical parameter name used in calculations and integrations when + evaluating supplier performance. + - name: path + fieldtype: Data + label: Path + description: Hierarchical location or category path showing where this variable + fits within the scorecard structure. + - name: description + fieldtype: Small Text + label: Description + description: Detailed explanation of what this scorecard variable measures and + how it evaluates supplier performance. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Supplier Scorecard Variable document (master/transaction). + Use only for single-entity lookups, not cross-record comparison unless fields + are per-relationship (e.g. supplier, price_list).' +- table: tabSupport Search Source + description: '' + fields: + - name: source_name + fieldtype: Data + label: Source Name + description: Display name of the external search source used when presenting search + options to support users. + - name: source_type + fieldtype: Select + label: Source Type + description: Classification of the search source system type used to determine + integration method and data handling. + options: + - API + - Link + - name: base_url + fieldtype: Data + label: Base URL + description: Root API endpoint URL used when connecting to the external search + source system. + - name: query_route + fieldtype: Data + label: Query Route String + description: API path appended to base URL for executing search queries against + the source. + - name: search_term_param_name + fieldtype: Data + label: Search Term Param Name + description: Query parameter name used to pass user search keywords to the external + API. + - name: response_result_key_path + fieldtype: Data + label: Response Result Key Path + description: JSON path to extract search result array from the API response payload. + - name: post_route + fieldtype: Data + label: Post Route String + description: API endpoint path used to retrieve full article or post details after + initial search. + - name: post_route_key_list + fieldtype: Data + label: Post Route Key List + description: List of JSON keys used to construct the detailed post retrieval request. + - name: post_title_key + fieldtype: Data + label: Post Title Key + description: JSON field name containing the article title in search results for + display. + - name: post_description_key + fieldtype: Data + label: Post Description Key + description: JSON field name containing the article summary or preview text in + search results. + - name: source_doctype + fieldtype: Link + label: Source DocType + description: ERP DocType name mapped to this search source for linking and reference + purposes. + join_hint: + table: tabDocType + 'on': source_doctype = tabDocType.name + - name: result_title_field + fieldtype: Data + label: Result Title Field + description: Field mapping for displaying search result titles in the support + interface. + - name: result_preview_field + fieldtype: Data + label: Result Preview Field + description: Field mapping for displaying search result preview snippets in the + support interface. + - name: result_route_field + fieldtype: Data + label: Result Route Field + description: Field mapping containing the navigation path or URL to access the + full search result. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabSupport Search + Source). Comparison-ready across parent records.' +- table: tabTag + description: '' + fields: + - name: description + fieldtype: Small Text + label: Description + description: Detailed explanation of the tag's purpose and usage guidelines for + consistent tagging across the organization. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Tag document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabTag Link + description: '' + fields: + - name: document_type + fieldtype: Link + label: Document Type + description: The DocType of the document being tagged, used to filter tagged records + by type. + join_hint: + table: tabDocType + 'on': document_type = tabDocType.name + - name: document_name + fieldtype: Dynamic Link + label: Document Name + description: The specific document ID being tagged, used to retrieve all tags + for a given record. + - name: tag + fieldtype: Link + label: Document Tag + description: The actual tag value assigned to the document, used for categorization + and filtering. + join_hint: + table: tabTag + 'on': tag = tabTag.name + - name: title + fieldtype: Data + label: Document Title + description: Display name or label for the tagged document, used for search and + reference. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Tag Link document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabTarget Detail + description: '' + fields: + - name: item_group + fieldtype: Link + label: Item Group + description: Product category or classification for which this sales target applies, + used when analyzing targets by product line. + join_hint: + table: tabItem Group + 'on': item_group = tabItem Group.name + - name: fiscal_year + fieldtype: Link + label: Fiscal Year + description: Financial year period for which this target is set, used when filtering + targets by annual planning cycles. + join_hint: + table: tabFiscal Year + 'on': fiscal_year = tabFiscal Year.name + - name: target_qty + fieldtype: Float + label: Target Qty + description: Quantity goal to be achieved for this item group, used when measuring + volume-based performance targets. + - name: target_amount + fieldtype: Float + label: Target Amount + description: Revenue or sales value goal to be achieved, used when measuring financial + performance against targets. + - name: distribution_id + fieldtype: Link + label: Target Distribution + description: Reference to monthly or periodic distribution plan for breaking down + annual targets, used for time-phased target tracking. + join_hint: + table: tabMonthly Distribution + 'on': distribution_id = tabMonthly Distribution.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabTarget Detail). + Comparison-ready across parent records.' +- table: tabTask + description: '' + fields: + - name: subject + fieldtype: Data + label: Subject + description: The main focus or topic of the task, helping to clarify its purpose + in business operations. + - name: project + fieldtype: Link + label: Project + description: The associated project that the task belongs to, essential for tracking + progress and resource allocation. + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: issue + fieldtype: Link + label: Issue + description: A related problem or concern that the task aims to address, guiding + prioritization and resolution efforts. + join_hint: + table: tabIssue + 'on': issue = tabIssue.name + - name: type + fieldtype: Link + label: Type + description: The classification of the task, which aids in understanding its nature + and required resources. + join_hint: + table: tabTask Type + 'on': type = tabTask Type.name + - name: is_group + fieldtype: Check + label: Is Group + description: Indicates whether the task is part of a group, which is important + for managing related activities collectively. + - name: is_template + fieldtype: Check + label: Is Template + description: Shows if the task is a template for future tasks, facilitating consistency + and efficiency in task creation. + - name: status + fieldtype: Select + label: Status + description: The current state of the task, crucial for monitoring progress and + making informed management decisions. + options: + - Open + - Working + - Pending Review + - Overdue + - Template + - Completed + - Cancelled + - name: priority + fieldtype: Select + label: Priority + description: The level of urgency assigned to the task, guiding resource allocation + and scheduling in business operations. + options: + - Low + - Medium + - High + - Urgent + - name: task_weight + fieldtype: Float + label: Weight + description: A measure of the task's complexity or effort required, used for workload + balancing and project planning. + - name: parent_task + fieldtype: Link + label: Parent Task + description: The overarching task that this task is linked to, important for understanding + dependencies and project structure. + join_hint: + table: tabTask + 'on': parent_task = tabTask.name + - name: completed_by + fieldtype: Link + label: Completed By + description: The individual who completed the task, necessary for accountability + and performance evaluation. + join_hint: + table: tabUser + 'on': completed_by = tabUser.name + - name: completed_on + fieldtype: Date + label: Completed On + description: The date when the task was finished, which is vital for tracking + timelines and project milestones. + - name: exp_start_date + fieldtype: Date + label: Expected Start Date + description: The expected start date for the task, used for scheduling and resource + planning in project management. + - name: expected_time + fieldtype: Float + label: Expected Time (in hours) + description: Used to estimate the time required to complete a task, aiding in + resource allocation and scheduling. + - name: start + fieldtype: Int + label: Begin On (Days) + description: Indicates the planned start date of a task, essential for project + timeline management. + - name: exp_end_date + fieldtype: Date + label: Expected End Date + description: Represents the expected completion date, helping to track project + deadlines and deliverables. + - name: progress + fieldtype: Percent + label: '% Progress' + description: Tracks the current status of task completion, allowing for performance + monitoring and adjustments. + - name: duration + fieldtype: Int + label: Duration (Days) + description: Defines the total time allocated for a task, critical for planning + and ensuring timely project execution. + - name: is_milestone + fieldtype: Check + label: Is Milestone + description: Identifies key points in the project timeline, helping stakeholders + recognize significant achievements. + - name: description + fieldtype: Text Editor + label: Task Description + description: Provides detailed information about the task, facilitating better + understanding and communication among team members. + - name: depends_on + fieldtype: Table + label: Dependent Tasks + description: '' + child_hint: + child_table: tabTask Depends On + fieldname: depends_on + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: depends_on + - name: depends_on_tasks + fieldtype: Code + label: Depends on Tasks + description: Lists tasks that are dependent on this task's completion, important + for managing project flow. + - name: act_start_date + fieldtype: Date + label: Actual Start Date (via Timesheet) + description: Records the actual start date of a task, allowing for comparison + with planned timelines and performance analysis. + - name: actual_time + fieldtype: Float + label: Actual Time in Hours (via Timesheet) + description: Used to track the real hours spent on a task for labor cost analysis + and productivity reporting. + - name: act_end_date + fieldtype: Date + label: Actual End Date (via Timesheet) + description: Used to determine when a task was actually completed for schedule + variance and performance tracking. + - name: total_costing_amount + fieldtype: Currency + label: Total Costing Amount (via Timesheet) + description: Used to analyze the total internal cost of a task for profitability + and budget variance reporting. + - name: total_expense_claim + fieldtype: Currency + label: Total Expense Claim (via Expense Claim) + description: Aggregates expense claims associated with this task for cost tracking + and budget analysis. + - name: total_billing_amount + fieldtype: Currency + label: Total Billable Amount (via Timesheet) + description: Used to calculate revenue from a task for invoicing and project profitability + analysis. + - name: review_date + fieldtype: Date + label: Review Date + description: Used to identify when a task is scheduled for quality review or approval + checkpoint. + - name: closing_date + fieldtype: Date + label: Closing Date + description: Used to determine when a task was officially closed for completion + reporting and audit trails. + - name: department + fieldtype: Link + label: Department + description: Used to filter and analyze tasks by organizational unit for departmental + performance and resource allocation. + join_hint: + table: tabDepartment + 'on': department = tabDepartment.name + - name: company + fieldtype: Link + label: Company + description: Used to segment tasks by business entity for multi-company reporting + and consolidation. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: lft + fieldtype: Int + label: lft + description: Used for hierarchical task tree queries to efficiently retrieve task + structures and parent-child relationships. + - name: rgt + fieldtype: Int + label: rgt + description: Used for hierarchical task tree queries to efficiently retrieve task + structures and subtask boundaries. + - name: old_parent + fieldtype: Data + label: Old Parent + description: Used to track task reparenting history for audit trails and organizational + change analysis. + - name: template_task + fieldtype: Data + label: Template Task + description: Used to identify if a task is a reusable template for standardizing + project creation and task duplication. + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Task document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabTask Depends On + description: '' + fields: + - name: task + fieldtype: Link + label: Task + description: The dependent task that cannot start or finish until another task + is completed. + join_hint: + table: tabTask + 'on': task = tabTask.name + - name: subject + fieldtype: Text + label: Subject + description: The predecessor task that must be completed before the dependent + task can proceed. + - name: project + fieldtype: Text + label: Project + description: The project context in which the task dependency relationship exists. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabTask Depends On). + Comparison-ready across parent records.' +- table: tabTask Type + description: '' + fields: + - name: weight + fieldtype: Float + label: Weight + description: Determines task priority or resource allocation weighting used when + calculating workload distribution or scheduling priorities. + - name: description + fieldtype: Small Text + label: Description + description: Provides detailed explanation of the task type used when users need + to understand task categorization rules or selection criteria. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Task Type document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabTax Category + description: '' + fields: + - name: title + fieldtype: Data + label: Title + description: Display label for the tax category shown to users when selecting + applicable tax classifications for items or transactions. + - name: disabled + fieldtype: Check + label: Disabled + description: Indicates whether this tax category is currently inactive and should + be excluded from selection in new transactions or configurations. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Tax Category document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabTax Rule + description: '' + fields: + - name: tax_type + fieldtype: Select + label: Tax Type + description: Specifies the type of tax applied, crucial for determining tax liabilities. + options: + - Sales + - Purchase + - name: use_for_shopping_cart + fieldtype: Check + label: Use for Shopping Cart + description: Indicates if the tax rule is applicable during online transactions, + impacting customer pricing. + - name: sales_tax_template + fieldtype: Link + label: Sales Tax Template + description: Links to the template used for calculating sales tax, ensuring consistency + in tax application. + join_hint: + table: tabSales Taxes and Charges Template + 'on': sales_tax_template = tabSales Taxes and Charges Template.name + - name: purchase_tax_template + fieldtype: Link + label: Purchase Tax Template + description: Associates with the template for purchase tax calculations, important + for vendor transactions. + join_hint: + table: tabPurchase Taxes and Charges Template + 'on': purchase_tax_template = tabPurchase Taxes and Charges Template.name + - name: customer + fieldtype: Link + label: Customer + description: Connects the tax rule to specific customers, allowing for tailored + tax applications based on customer profiles. + join_hint: + table: tabCustomer + 'on': customer = tabCustomer.name + - name: supplier + fieldtype: Link + label: Supplier + description: Links the tax rule to suppliers, essential for managing tax obligations + on purchases. + join_hint: + table: tabSupplier + 'on': supplier = tabSupplier.name + - name: item + fieldtype: Link + label: Item + description: Associates the tax rule with specific items, critical for accurate + tax calculations on sales. + join_hint: + table: tabItem + 'on': item = tabItem.name + - name: billing_city + fieldtype: Data + label: Billing City + description: Specifies the city for billing, necessary for determining local tax + rates. + - name: billing_county + fieldtype: Data + label: Billing County + description: Indicates the county for billing, which can affect tax calculations + based on regional regulations. + - name: billing_state + fieldtype: Data + label: Billing State + description: Defines the state for billing, crucial for compliance with state-specific + tax laws. + - name: billing_zipcode + fieldtype: Data + label: Billing Zipcode + description: Identifies the billing zip code, important for precise tax rate application + based on location. + - name: billing_country + fieldtype: Link + label: Billing Country + description: Specifies the country for billing, essential for international tax + compliance. + join_hint: + table: tabCountry + 'on': billing_country = tabCountry.name + - name: tax_category + fieldtype: Link + label: Tax Category + description: Categorizes the tax rule, helping in the organization and retrieval + of tax-related data. + join_hint: + table: tabTax Category + 'on': tax_category = tabTax Category.name + - name: customer_group + fieldtype: Link + label: Customer Group + description: Links the tax rule to specific customer groups, allowing for differentiated + tax treatment based on group characteristics. + join_hint: + table: tabCustomer Group + 'on': customer_group = tabCustomer Group.name + - name: supplier_group + fieldtype: Link + label: Supplier Group + description: Used to categorize suppliers for targeted procurement strategies + and performance analysis. + join_hint: + table: tabSupplier Group + 'on': supplier_group = tabSupplier Group.name + - name: item_group + fieldtype: Link + label: Item Group + description: Defines product categories for inventory management and sales reporting. + join_hint: + table: tabItem Group + 'on': item_group = tabItem Group.name + - name: shipping_city + fieldtype: Data + label: Shipping City + description: Indicates the city for shipping, essential for logistics planning + and delivery time estimation. + - name: shipping_county + fieldtype: Data + label: Shipping County + description: Provides geographical context for shipping, useful in regional sales + analysis and compliance. + - name: shipping_state + fieldtype: Data + label: Shipping State + description: Specifies the state for shipping, important for tax calculations + and shipping regulations. + - name: shipping_zipcode + fieldtype: Data + label: Shipping Zipcode + description: Identifies the precise delivery area, crucial for accurate shipping + costs and delivery timelines. + - name: shipping_country + fieldtype: Link + label: Shipping Country + description: Denotes the country for shipping, necessary for international trade + compliance and tariffs. + join_hint: + table: tabCountry + 'on': shipping_country = tabCountry.name + - name: from_date + fieldtype: Date + label: From Date + description: Marks the start date for the validity of the tax rule, important + for compliance and reporting periods. + - name: to_date + fieldtype: Date + label: To Date + description: Indicates the end date for the tax rule's applicability, essential + for managing rule changes over time. + - name: priority + fieldtype: Int + label: Priority + description: Determines the order of rule application, critical for resolving + conflicts in tax calculations. + - name: company + fieldtype: Link + label: Company + description: Used to filter tax rules by specific company entity when analyzing + tax configurations or determining which tax rates apply to transactions for + a particular legal entity. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Tax Rule document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabTax Withheld Vouchers + description: '' + fields: + - name: voucher_type + fieldtype: Data + label: Voucher Type + description: Classification of the voucher indicating the type of tax withholding + transaction being processed. + - name: voucher_name + fieldtype: Data + label: Voucher Name + description: Descriptive label for the voucher used when searching or reporting + on specific tax withholding events. + - name: taxable_amount + fieldtype: Currency + label: Taxable Amount + description: The base amount subject to tax withholding used when calculating + withholding obligations or analyzing taxable income. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabTax Withheld Vouchers). + Comparison-ready across parent records.' +- table: tabTax Withholding Account + description: '' + fields: + - name: company + fieldtype: Link + label: Company + description: Company entity associated with this tax withholding account, used + when filtering withholding configurations by legal entity or organizational + unit. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: account + fieldtype: Link + label: Account + description: General ledger account where tax withholding amounts are posted, + used when tracking liabilities or reconciling withheld taxes for remittance + to authorities. + join_hint: + table: tabAccount + 'on': account = tabAccount.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabTax Withholding + Account). Comparison-ready across parent records.' +- table: tabTax Withholding Category + description: '' + fields: + - name: category_name + fieldtype: Data + label: Category Name + description: Descriptive label for the withholding category used when classifying + and filtering tax deduction types across vendors or customers. + - name: round_off_tax_amount + fieldtype: Check + label: Round Off Tax Amount + description: Indicates whether calculated withholding tax should be rounded to + nearest whole number, used when precise tax amounts are required for compliance. + - name: consider_party_ledger_amount + fieldtype: Check + label: Consider Entire Party Ledger Amount + description: Determines if cumulative transaction amounts with the party should + be evaluated for threshold-based withholding, used when tax applies only after + spending limits. + - name: tax_on_excess_amount + fieldtype: Check + label: 'Only Deduct Tax On Excess Amount ' + description: Specifies whether withholding tax applies only to amounts exceeding + a threshold rather than the total, used for progressive tax calculations. + - name: rates + fieldtype: Table + label: Rates + description: '' + child_hint: + child_table: tabTax Withholding Rate + fieldname: rates + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: rates + - name: accounts + fieldtype: Table + label: Accounts + description: '' + child_hint: + child_table: tabTax Withholding Account + fieldname: accounts + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: accounts + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Tax Withholding Category document (master/transaction). + Use only for single-entity lookups, not cross-record comparison unless fields + are per-relationship (e.g. supplier, price_list).' +- table: tabTax Withholding Rate + description: '' + fields: + - name: from_date + fieldtype: Date + label: From Date + description: Used to determine when a tax withholding rate becomes effective for + payroll processing within a date range. + - name: to_date + fieldtype: Date + label: To Date + description: Used to determine when a tax withholding rate expires or is no longer + applicable for payroll calculations. + - name: tax_withholding_rate + fieldtype: Float + label: Tax Withholding Rate + description: Specifies the percentage rate applied to calculate tax withholding + amounts from employee compensation. + - name: single_threshold + fieldtype: Float + label: Single Transaction Threshold + description: Defines the income threshold for applying tax withholding rates to + individual payment transactions. + - name: cumulative_threshold + fieldtype: Float + label: Cumulative Transaction Threshold + description: Defines the year-to-date income threshold for applying progressive + tax withholding rates across multiple pay periods. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabTax Withholding + Rate). Comparison-ready across parent records.' +- table: tabTelephony Call Type + description: '' + fields: + - name: call_type + fieldtype: Data + label: Call Type + description: Classification of the telephony call (inbound, outbound, internal, + etc.), used to categorize and report on call activities. + - name: amended_from + fieldtype: Link + label: Amended From + description: Reference to the previous version if this call type was amended, + used for version control and change tracking. + join_hint: + table: tabTelephony Call Type + 'on': amended_from = tabTelephony Call Type.name + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Telephony Call Type document (master/transaction). Use + only for single-entity lookups, not cross-record comparison unless fields are + per-relationship (e.g. supplier, price_list).' +- table: tabTerms and Conditions + description: '' + fields: + - name: title + fieldtype: Data + label: Title + description: Display name of the terms and conditions template, used when selecting + T&C to apply to documents. + - name: disabled + fieldtype: Check + label: Disabled + description: Flag indicating if this terms and conditions template is inactive + and should not appear in selection lists. + - name: selling + fieldtype: Check + label: Selling + description: Flag indicating this T&C template is applicable to sales transactions + like quotations and sales orders. + - name: buying + fieldtype: Check + label: Buying + description: Flag indicating this T&C template is applicable to purchase transactions + like purchase orders and supplier quotations. + - name: hr + fieldtype: Check + label: HR + description: Flag indicating this T&C template is applicable to HR documents like + offer letters and employment contracts. + - name: terms + fieldtype: Text Editor + label: Terms and Conditions + description: The actual terms and conditions text content that will be inserted + into business documents. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Terms and Conditions document (master/transaction). Use + only for single-entity lookups, not cross-record comparison unless fields are + per-relationship (e.g. supplier, price_list).' +- table: tabTerritory + description: '' + fields: + - name: territory_name + fieldtype: Data + label: Territory Name + description: Display name of the sales territory, used in all sales reports, customer + assignments, and regional performance analysis. + - name: parent_territory + fieldtype: Link + label: Parent Territory + description: References the higher-level territory in the hierarchy, used for + roll-up reporting and multi-level regional analysis. + join_hint: + table: tabTerritory + 'on': parent_territory = tabTerritory.name + - name: is_group + fieldtype: Check + label: Is Group + description: Indicates if territory contains sub-territories, used to distinguish + parent regions from leaf-level sales areas in hierarchical queries. + - name: territory_manager + fieldtype: Link + label: Territory Manager + description: Sales manager responsible for this territory, used for performance + tracking and assignment of leads or customers. + join_hint: + table: tabSales Person + 'on': territory_manager = tabSales Person.name + - name: lft + fieldtype: Int + label: lft + description: Left boundary in nested set model for territory hierarchy, used internally + for efficient tree traversal queries. + - name: rgt + fieldtype: Int + label: rgt + description: Right boundary in nested set model for territory hierarchy, used + internally for efficient subtree and ancestor queries. + - name: old_parent + fieldtype: Link + label: old_parent + description: Previous parent territory before reorganization, used for tracking + territory restructuring history and migration. + join_hint: + table: tabTerritory + 'on': old_parent = tabTerritory.name + - name: targets + fieldtype: Table + label: Targets + description: '' + child_hint: + child_table: tabTarget Detail + fieldname: targets + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: targets + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Territory document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabTerritory Item + description: '' + fields: + - name: territory + fieldtype: Link + label: Territory + description: Links to the specific sales territory where this item is available + or authorized for sale, used when filtering products by geographic sales region. + join_hint: + table: tabTerritory + 'on': territory = tabTerritory.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabTerritory Item). + Comparison-ready across parent records.' +- table: tabTimesheet + description: '' + fields: + - name: title + fieldtype: Data + label: Title + description: Descriptive title of the timesheet entry, used for quick identification + of the work performed. + - name: naming_series + fieldtype: Select + label: Series + description: Defines the numbering pattern for timesheet entries, important for + maintaining order and consistency. + options: + - TS-.YYYY.- + - name: company + fieldtype: Link + label: Company + description: Indicates the company associated with the timesheet, crucial for + multi-company reporting and analysis. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: customer + fieldtype: Link + label: Customer + description: Links the timesheet to a specific customer, necessary for billing + and project tracking. + join_hint: + table: tabCustomer + 'on': customer = tabCustomer.name + - name: currency + fieldtype: Link + label: Currency + description: Specifies the currency used in the timesheet, important for financial + reporting and conversions. + join_hint: + table: tabCurrency + 'on': currency = tabCurrency.name + - name: exchange_rate + fieldtype: Float + label: Exchange Rate + description: Represents the conversion rate for the currency, used for accurate + financial calculations. + - name: sales_invoice + fieldtype: Link + label: Sales Invoice + description: Connects the timesheet to a sales invoice, essential for billing + and revenue recognition. + join_hint: + table: tabSales Invoice + 'on': sales_invoice = tabSales Invoice.name + - name: salary_slip + fieldtype: Link + label: Salary Slip + description: Link to generated salary slip from this timesheet, used when tracking + which timesheets have been processed for payroll. + join_hint: + table: tabSalary Slip + 'on': salary_slip = tabSalary Slip.name + - name: status + fieldtype: Select + label: Status + description: Indicates the current state of the timesheet, important for workflow + management and approvals. + options: + - Draft + - Submitted + - Billed + - Payslip + - Completed + - Cancelled + - name: parent_project + fieldtype: Link + label: Project + description: Associates the timesheet with a larger project, necessary for project + management and resource allocation. + join_hint: + table: tabProject + 'on': parent_project = tabProject.name + - name: employee + fieldtype: Link + label: Employee + description: Identifies the employee who logged the timesheet, crucial for performance + tracking and payroll. + join_hint: + table: tabEmployee + 'on': employee = tabEmployee.name + - name: employee_name + fieldtype: Data + label: Employee Name + description: Displays the name of the employee, used for clarity in reports and + communications. + - name: department + fieldtype: Link + label: Department + description: Specifies the department responsible for the timesheet, important + for departmental budgeting and analysis. + join_hint: + table: tabDepartment + 'on': department = tabDepartment.name + - name: user + fieldtype: Link + label: User + description: Indicates the user who created or modified the timesheet, essential + for audit trails and accountability. + join_hint: + table: tabUser + 'on': user = tabUser.name + - name: start_date + fieldtype: Date + label: Start Date + description: Marks the beginning date of the timesheet entry, important for time + tracking and project timelines. + - name: end_date + fieldtype: Date + label: End Date + description: Indicates the completion date of the timesheet, crucial for tracking + project timelines and deadlines. + - name: time_logs + fieldtype: Table + label: Time Sheets + description: '' + child_hint: + child_table: tabTimesheet Detail + fieldname: time_logs + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: time_logs + - name: total_hours + fieldtype: Float + label: Total Working Hours + description: Summarizes the total hours worked, providing insights into labor + utilization and resource allocation. + - name: total_billable_hours + fieldtype: Float + label: Total Billable Hours + description: Captures hours that can be charged to clients, vital for revenue + forecasting and billing accuracy. + - name: base_total_billable_amount + fieldtype: Currency + label: Base Total Billable Amount + description: Represents the total amount billed to clients based on billable hours, + important for financial reporting. + - name: base_total_billed_amount + fieldtype: Currency + label: Base Total Billed Amount + description: Shows the total amount invoiced to clients, necessary for cash flow + management and financial analysis. + - name: base_total_costing_amount + fieldtype: Currency + label: Base Total Costing Amount + description: Reflects the total costs incurred for labor, aiding in profitability + assessments and budgeting. + - name: total_billed_hours + fieldtype: Float + label: Total Billed Hours + description: Counts the hours that have been invoiced, important for tracking + billing efficiency and client agreements. + - name: total_billable_amount + fieldtype: Currency + label: Total Billable Amount + description: Indicates the overall amount that can be billed, essential for revenue + tracking and client relationship management. + - name: total_billed_amount + fieldtype: Currency + label: Total Billed Amount + description: Displays the total amount that has been billed, crucial for financial + reconciliation and performance evaluation. + - name: total_costing_amount + fieldtype: Currency + label: Total Costing Amount + description: Used to analyze actual labor costs incurred for timesheet entries + when calculating project profitability or employee cost allocation. + - name: per_billed + fieldtype: Percent + label: '% Amount Billed' + description: Used to determine what percentage of timesheet hours are billable + to clients versus internal or non-billable work. + - name: note + fieldtype: Text Editor + label: Note + description: Used when searching for additional context or comments explaining + timesheet entries, delays, or special circumstances. + - name: amended_from + fieldtype: Link + label: Amended From + description: Used to track timesheet correction history when auditing changes + or identifying which original timesheet was modified. + join_hint: + table: tabTimesheet + 'on': amended_from = tabTimesheet.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Timesheet document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabTimesheet Detail + description: '' + fields: + - name: activity_type + fieldtype: Link + label: Activity Type + description: Categorizes the nature of the work performed, aiding in resource + allocation analysis. + join_hint: + table: tabActivity Type + 'on': activity_type = tabActivity Type.name + - name: from_time + fieldtype: Datetime + label: From Time + description: Marks the start time of the activity, essential for calculating total + hours worked. + - name: description + fieldtype: Small Text + label: Description + description: Provides context for the timesheet entry, useful for project management + and reporting. + - name: expected_hours + fieldtype: Float + label: Expected Hrs + description: Indicates the anticipated duration of the task, helping in performance + evaluation. + - name: to_time + fieldtype: Datetime + label: To Time + description: Denotes the end time of the activity, critical for accurate billing + and payroll. + - name: hours + fieldtype: Float + label: Hrs + description: Represents the actual hours worked, necessary for assessing productivity + and project costs. + - name: completed + fieldtype: Check + label: Completed + description: Flags whether the task is finished, important for project tracking + and resource planning. + - name: project + fieldtype: Link + label: Project + description: Links the timesheet entry to a specific project, facilitating project-level + financial analysis. + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: project_name + fieldtype: Data + label: Project Name + description: Names the project associated with the entry, aiding in reporting + and stakeholder communication. + - name: task + fieldtype: Link + label: Task + description: Specifies the particular task undertaken, useful for detailed performance + assessments. + join_hint: + table: tabTask + 'on': task = tabTask.name + - name: is_billable + fieldtype: Check + label: Is Billable + description: Indicates if the hours can be charged to a client, crucial for revenue + tracking. + - name: sales_invoice + fieldtype: Link + label: Sales Invoice + description: Connects the timesheet entry to a sales invoice, important for financial + reconciliation. + join_hint: + table: tabSales Invoice + 'on': sales_invoice = tabSales Invoice.name + - name: billing_hours + fieldtype: Float + label: Billing Hours + description: Details the hours eligible for billing, essential for accurate client + invoicing. + - name: base_billing_rate + fieldtype: Currency + label: Billing Rate + description: Defines the standard rate charged for services, critical for revenue + forecasting. + - name: base_billing_amount + fieldtype: Currency + label: Billing Amount + description: Used to determine the initial charge for services rendered before + any adjustments. + - name: base_costing_rate + fieldtype: Currency + label: Costing Rate + description: Indicates the fundamental cost rate for labor or materials, essential + for budgeting and forecasting. + - name: base_costing_amount + fieldtype: Currency + label: Costing Amount + description: Represents the total base cost incurred, critical for assessing profitability. + - name: billing_rate + fieldtype: Currency + label: Billing Rate + description: Defines the rate charged to clients, key for revenue calculations + and pricing strategies. + - name: billing_amount + fieldtype: Currency + label: Billing Amount + description: The total amount billed to clients, necessary for financial reporting + and cash flow analysis. + - name: costing_rate + fieldtype: Currency + label: Costing Rate + description: Reflects the current cost rate, important for real-time expense tracking + and management. + - name: costing_amount + fieldtype: Currency + label: Costing Amount + description: The total cost incurred, vital for evaluating project performance + and financial health. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabTimesheet Detail). + Comparison-ready across parent records.' +- table: tabToDo + description: '' + fields: + - name: status + fieldtype: Select + label: Status + description: Current state of the to-do such as Open, Closed, or Cancelled, used + for filtering pending work. + options: + - Open + - Closed + - Cancelled + - name: priority + fieldtype: Select + label: Priority + description: Urgency level of the task, used when prioritizing workload or finding + high-priority items. + options: + - High + - Medium + - Low + - name: date + fieldtype: Date + label: Due Date + description: Due date or target completion date, used when finding overdue or + upcoming tasks. + - name: allocated_to + fieldtype: Link + label: Allocated To + description: User assigned to complete the to-do, used when querying workload + by team member. + join_hint: + table: tabUser + 'on': allocated_to = tabUser.name + - name: description + fieldtype: Text Editor + label: Description + description: Contains the task details or instructions; used when searching for + specific work items or understanding what needs to be done. + - name: reference_type + fieldtype: Link + label: Reference Type + description: Identifies the module or document type the task relates to (e.g., + Sales Order, Customer); used when filtering tasks by business area or linked + record type. + join_hint: + table: tabDocType + 'on': reference_type = tabDocType.name + - name: reference_name + fieldtype: Dynamic Link + label: Reference Name + description: Stores the specific document ID or name the task references; used + when tracking tasks related to particular transactions or records. + - name: role + fieldtype: Link + label: Role + description: Defines the user role responsible for the task; used when assigning + work by department or filtering tasks by functional responsibility. + join_hint: + table: tabRole + 'on': role = tabRole.name + - name: assigned_by + fieldtype: Link + label: Assigned By + description: Records the user ID who created or delegated the task; used when + tracking task ownership or analyzing who generates work for others. + join_hint: + table: tabUser + 'on': assigned_by = tabUser.name + - name: sender + fieldtype: Data + label: Sender + description: Captures the originating user or system that triggered the task; + used when tracing task sources from automated workflows or escalations. + - name: assignment_rule + fieldtype: Link + label: Assignment Rule + description: References the automation rule that created the task; used when analyzing + automated task generation patterns or troubleshooting workflow assignments. + join_hint: + table: tabAssignment Rule + 'on': assignment_rule = tabAssignment Rule.name + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per ToDo document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabToken Cache + description: '' + fields: + - name: user + fieldtype: Link + label: User + description: User account associated with this cached token, used to retrieve + tokens for specific user authentication requests. + join_hint: + table: tabUser + 'on': user = tabUser.name + - name: connected_app + fieldtype: Link + label: Connected App + description: Third-party application or service this token authenticates with, + used to filter tokens by integration. + join_hint: + table: tabConnected App + 'on': connected_app = tabConnected App.name + - name: provider_name + fieldtype: Data + label: Provider Name + description: OAuth or authentication provider name, used to identify which service + issued the token. + - name: access_token + fieldtype: Password + label: Access Token + description: Active authentication token for API access, used to authorize requests + to external services without re-authentication. + - name: refresh_token + fieldtype: Password + label: Refresh Token + description: Long-lived token for obtaining new access tokens, used when access + tokens expire to maintain continuous authentication. + - name: expires_in + fieldtype: Int + label: Expires In + description: Token validity duration in seconds, used to determine when token + refresh is needed and prevent expired token usage. + - name: state + fieldtype: Data + label: State + description: Used to verify OAuth flow integrity and prevent CSRF attacks by matching + the state parameter sent in the authorization request with the one received + in the callback. + - name: scopes + fieldtype: Table + label: Scopes + description: '' + child_hint: + child_table: tabOAuth Scope + fieldname: scopes + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: scopes + - name: success_uri + fieldtype: Data + label: Success URI + description: Specifies the redirect URL where users are sent after successful + OAuth authentication, used when configuring or troubleshooting authentication + flows. + - name: token_type + fieldtype: Data + label: Token Type + description: Indicates the OAuth token classification such as Bearer or MAC, referenced + when implementing proper authorization header formatting in API requests. + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Token Cache document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabTop Bar Item + description: '' + fields: + - name: label + fieldtype: Data + label: Label + description: Display text shown for this menu item in the top bar. + - name: url + fieldtype: Data + label: URL + description: Target link or route when the top bar item is clicked. + - name: open_in_new_tab + fieldtype: Check + label: Open URL in a New Tab + description: Flag indicating whether clicking this item opens the URL in a new + browser tab. + - name: right + fieldtype: Check + label: Align Right + description: Flag to position this menu item on the right side of the top bar. + - name: parent_label + fieldtype: Select + label: Parent Label + description: Label of the parent menu item if this is a nested dropdown option. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabTop Bar Item). + Comparison-ready across parent records.' +- table: tabTransaction Deletion Record + description: '' + fields: + - name: company + fieldtype: Link + label: Company + description: Company for which transactions are being deleted, used when filtering + deletion operations by organization. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: status + fieldtype: Select + label: Status + description: Current execution status of the deletion process, used to monitor + if deletion is pending, in progress, or completed. + options: + - Queued + - Running + - Failed + - Completed + - Cancelled + - name: error_log + fieldtype: Long Text + label: Error Log + description: Error messages encountered during deletion execution, used for troubleshooting + failed deletion operations. + - name: delete_bin_data + fieldtype: Check + label: Delete Bins + description: Flag indicating whether to delete inventory bin data, used when cleaning + up warehouse stock records. + - name: delete_leads_and_addresses + fieldtype: Check + label: Delete Leads and Addresses + description: Flag indicating whether to delete CRM leads and addresses, used when + purging customer prospect data. + - name: reset_company_default_values + fieldtype: Check + label: Reset Company Default Values + description: Flag indicating whether to reset company configuration to defaults, + used when reinitializing company settings. + - name: clear_notifications + fieldtype: Check + label: Clear Notifications + description: Flag indicating whether to clear system notifications, used when + removing old alerts and messages. + - name: initialize_doctypes_table + fieldtype: Check + label: Initialize Summary Table + description: Flag indicating whether to reinitialize doctype table structure, + used when resetting document type configurations. + - name: delete_transactions + fieldtype: Check + label: Delete Transactions + description: Flag indicating whether to proceed with transaction deletion, used + as master switch for deletion execution. + - name: doctypes + fieldtype: Table + label: Summary + description: '' + child_hint: + child_table: tabTransaction Deletion Record Details + fieldname: doctypes + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: doctypes + - name: doctypes_to_be_ignored + fieldtype: Table + label: Excluded DocTypes + description: '' + child_hint: + child_table: tabTransaction Deletion Record Item + fieldname: doctypes_to_be_ignored + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: doctypes_to_be_ignored + - name: amended_from + fieldtype: Link + label: Amended From + description: References the original transaction document that was cancelled and + replaced by an amended version for audit trail purposes. + join_hint: + table: tabTransaction Deletion Record + 'on': amended_from = tabTransaction Deletion Record.name + - name: process_in_single_transaction + fieldtype: Check + label: Process in Single Transaction + description: Determines whether all deletion operations should be executed atomically + within one database transaction to ensure data consistency. + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Transaction Deletion Record document (master/transaction). + Use only for single-entity lookups, not cross-record comparison unless fields + are per-relationship (e.g. supplier, price_list).' +- table: tabTransaction Deletion Record Details + description: '' + fields: + - name: doctype_name + fieldtype: Link + label: DocType + description: The document type being deleted, used when filtering deletion records + by module or entity type. + join_hint: + table: tabDocType + 'on': doctype_name = tabDocType.name + - name: docfield_name + fieldtype: Data + label: DocField + description: The specific field within the document type being deleted, used when + analyzing deletion scope at field level. + - name: no_of_docs + fieldtype: Int + label: No of Docs + description: Total count of documents affected by this deletion operation, used + when assessing deletion impact or volume. + - name: done + fieldtype: Check + label: Done + description: Completion status of the deletion process, used when checking if + deletion has finished or is still in progress. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabTransaction Deletion + Record Details). Comparison-ready across parent records.' +- table: tabTransaction Deletion Record Item + description: '' + fields: + - name: doctype_name + fieldtype: Link + label: DocType + description: Reference to the type of transaction document that was deleted, used + when filtering deletions by transaction category like invoices or orders. + join_hint: + table: tabDocType + 'on': doctype_name = tabDocType.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabTransaction Deletion + Record Item). Comparison-ready across parent records.' +- table: tabTransaction Log + description: '' + fields: + - name: row_index + fieldtype: Data + label: Row Index + description: Row position in child table transactions, used when auditing line-item + changes. + - name: reference_doctype + fieldtype: Data + label: Reference Document Type + description: Document type being tracked, used to filter transaction logs by entity + type. + - name: document_name + fieldtype: Data + label: Document Name + description: Name of the document being tracked, used to retrieve complete audit + history for specific records. + - name: timestamp + fieldtype: Datetime + label: Timestamp + description: Exact time of transaction occurrence, used for precise audit trails + and compliance investigations. + - name: checksum_version + fieldtype: Data + label: Checksum Version + description: Version of checksum algorithm, used when validating data integrity + across system upgrades. + - name: previous_hash + fieldtype: Small Text + label: Previous Hash + description: Hash of previous transaction, used to verify blockchain-style audit + trail integrity and detect tampering. + - name: transaction_hash + fieldtype: Small Text + label: Transaction Hash + description: Unique identifier for tracking and auditing individual transaction + records in compliance and reconciliation queries. + - name: chaining_hash + fieldtype: Small Text + label: Chaining Hash + description: Cryptographic link to previous transaction used when verifying transaction + sequence integrity and detecting tampering. + - name: data + fieldtype: Long Text + label: Data + description: JSON payload containing transaction details queried when analyzing + transaction content, changes, or historical values. + - name: amended_from + fieldtype: Link + label: Amended From + description: Reference to original transaction when identifying corrections, reversals, + or tracking amendment history. + join_hint: + table: tabTransaction Log + 'on': amended_from = tabTransaction Log.name + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Transaction Log document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabTranslation + description: '' + fields: + - name: contributed + fieldtype: Check + label: Contributed + description: Flag indicating if translation was community-contributed, used to + distinguish user-submitted from official translations. + - name: language + fieldtype: Link + label: Language + description: Target language code for the translation, used to filter and retrieve + translations by locale. + join_hint: + table: tabLanguage + 'on': language = tabLanguage.name + - name: source_text + fieldtype: Code + label: Source Text + description: Original text to be translated, used to search for translations of + specific content. + - name: context + fieldtype: Data + label: Context + description: Contextual information about where source text appears, used to provide + accurate domain-specific translations. + - name: translated_text + fieldtype: Code + label: Translated Text + description: The actual translated content in the target language, used to retrieve + localized text for display. + - name: contribution_status + fieldtype: Select + label: Contribution Status + description: Approval status of contributed translations, used to filter verified + versus pending community translations. + options: + - Pending + - Verified + - Rejected + - name: contribution_docname + fieldtype: Data + label: Contribution Document Name + description: Document name or identifier of the source contribution being translated, + used to track which original content is associated with each translation. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Translation document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabUAE VAT Account + description: '' + fields: + - name: account + fieldtype: Link + label: Account + description: account + join_hint: + table: tabAccount + 'on': account = tabAccount.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabUAE VAT Account). + Comparison-ready across parent records.' +- table: tabUAE VAT Settings + description: '' + fields: + - name: company + fieldtype: Link + label: Company + description: Specifies which company entity this UAE VAT configuration applies + to for multi-company VAT compliance. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: uae_vat_accounts + fieldtype: Table + label: UAE VAT Accounts + description: '' + child_hint: + child_table: tabUAE VAT Account + fieldname: uae_vat_accounts + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: uae_vat_accounts + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per UAE VAT Settings document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabUOM + description: '' + fields: + - name: enabled + fieldtype: Check + label: Enabled + description: Flag indicating if this UOM is active and available for use in transactions, + used to filter selectable units. + - name: uom_name + fieldtype: Data + label: UOM Name + description: Display name of the unit of measurement like Kg, Meter, Box, used + when selecting units in purchase, sales, or inventory transactions. + - name: must_be_whole_number + fieldtype: Check + label: Must be Whole Number + description: Flag requiring quantities in this UOM to be integers only, used for + units like pieces or boxes that cannot be fractional. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per UOM document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabUOM Category + description: '' + fields: + - name: category_name + fieldtype: Data + label: Category Name + description: Display name of the UOM category used when users need to identify + or report on groups of related units like weight, volume, or length. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per UOM Category document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabUOM Conversion Detail + description: '' + fields: + - name: uom + fieldtype: Link + label: UOM + description: Target unit of measure being converted to, used when finding how + to convert quantities from base units to alternative units like cases, pallets, + or dozens. + join_hint: + table: tabUOM + 'on': uom = tabUOM.name + - name: conversion_factor + fieldtype: Float + label: Conversion Factor + description: Multiplier that converts from base unit to target unit, used when + calculating equivalent quantities across different units of measure in inventory + or sales. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabUOM Conversion + Detail). Comparison-ready across parent records.' +- table: tabUOM Conversion Factor + description: '' + fields: + - name: category + fieldtype: Link + label: Category + description: Classification grouping for related UOM conversions, used to organize + conversion factors by measurement type. + join_hint: + table: tabUOM Category + 'on': category = tabUOM Category.name + - name: from_uom + fieldtype: Link + label: From + description: Source unit of measure being converted from, used when converting + quantities from one unit to another. + join_hint: + table: tabUOM + 'on': from_uom = tabUOM.name + - name: to_uom + fieldtype: Link + label: To + description: Target unit of measure being converted to, used when converting quantities + to a different unit. + join_hint: + table: tabUOM + 'on': to_uom = tabUOM.name + - name: value + fieldtype: Float + label: Value + description: Numeric conversion multiplier between from_uom and to_uom, used to + calculate equivalent quantities across units. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per UOM Conversion Factor document (master/transaction). Use + only for single-entity lookups, not cross-record comparison unless fields are + per-relationship (e.g. supplier, price_list).' +- table: tabUnhandled Email + description: '' + fields: + - name: email_account + fieldtype: Link + label: Email Account + description: Email account that received this unhandled email, used to identify + which inbox or account has processing issues. + join_hint: + table: tabEmail Account + 'on': email_account = tabEmail Account.name + - name: uid + fieldtype: Data + label: UID + description: Unique identifier from the email server for this message, used to + match unhandled emails with their source on the mail server. + - name: reason + fieldtype: Long Text + label: Reason + description: Explanation of why this email could not be processed, used to diagnose + and categorize email handling failures. + - name: message_id + fieldtype: Code + label: Message-id + description: Standard email Message-ID header value, used to uniquely identify + and track the original email across systems. + - name: raw + fieldtype: Code + label: Raw Email + description: Complete raw email content including headers and body, used when + investigating or reprocessing failed emails. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Unhandled Email document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabUnreconcile Payment + description: '' + fields: + - name: company + fieldtype: Link + label: Company + description: Company entity for which the payment unreconciliation is being processed + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: voucher_type + fieldtype: Link + label: Voucher Type + description: Document type of the original payment voucher being unreconciled, + such as Payment Entry or Journal Entry + join_hint: + table: tabDocType + 'on': voucher_type = tabDocType.name + - name: voucher_no + fieldtype: Dynamic Link + label: Voucher No + description: Reference number of the specific payment voucher being unreconciled + from invoices or bills + - name: allocations + fieldtype: Table + label: Allocations + description: '' + child_hint: + child_table: tabUnreconcile Payment Entries + fieldname: allocations + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: allocations + - name: amended_from + fieldtype: Link + label: Amended From + description: Reference to the previous unreconcile payment record if this transaction + is an amendment or correction + join_hint: + table: tabUnreconcile Payment + 'on': amended_from = tabUnreconcile Payment.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Unreconcile Payment document (master/transaction). Use + only for single-entity lookups, not cross-record comparison unless fields are + per-relationship (e.g. supplier, price_list).' +- table: tabUnreconcile Payment Entries + description: '' + fields: + - name: account + fieldtype: Data + label: Account + description: The ledger account from which the payment allocation is being reversed + or unreconciled. + - name: party_type + fieldtype: Data + label: Party Type + description: Specifies whether the unreconciled payment involves a Customer, Supplier, + or other entity type. + - name: party + fieldtype: Data + label: Party + description: The specific customer or supplier whose payment allocation is being + unreconciled. + - name: reference_doctype + fieldtype: Link + label: Reference Type + description: The document type (e.g., Sales Invoice, Purchase Invoice) that was + originally linked to the payment being unreconciled. + join_hint: + table: tabDocType + 'on': reference_doctype = tabDocType.name + - name: reference_name + fieldtype: Dynamic Link + label: Reference Name + description: The specific document number or ID of the invoice or transaction + being unlinked from the payment. + - name: allocated_amount + fieldtype: Currency + label: Allocated Amount + description: The monetary value of the payment allocation that is being reversed + or unreconciled. + - name: account_currency + fieldtype: Link + label: Account Currency + description: The currency in which the unreconciled payment and account are denominated. + join_hint: + table: tabCurrency + 'on': account_currency = tabCurrency.name + - name: unlinked + fieldtype: Check + label: Unlinked + description: Indicates whether the payment entry has been successfully unlinked + from its original reference document. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabUnreconcile Payment + Entries). Comparison-ready across parent records.' +- table: tabUser + description: '' + fields: + - name: enabled + fieldtype: Check + label: Enabled + description: Active status flag indicating whether the user can log in and access + the system. + - name: email + fieldtype: Data + label: Email + description: Primary email address for user login, notifications, and communication + purposes. + - name: first_name + fieldtype: Data + label: First Name + description: User's given name, used for personalization and formal identification + in reports. + - name: middle_name + fieldtype: Data + label: Middle Name + description: User's middle name for complete legal identification when required. + - name: last_name + fieldtype: Data + label: Last Name + description: User's family name, used for sorting, searching, and formal identification. + - name: full_name + fieldtype: Data + label: Full Name + description: Complete display name combining first, middle, and last names for + user identification in interfaces and reports. + - name: username + fieldtype: Data + label: Username + description: Unique identifier for user login and authentication, used to track + who performed actions or owns records. + - name: language + fieldtype: Link + label: Language + description: User's preferred language for interface display, relevant for localization + and communication preferences. + join_hint: + table: tabLanguage + 'on': language = tabLanguage.name + - name: time_zone + fieldtype: Autocomplete + label: Time Zone + description: User's time zone setting for accurate scheduling, reporting timestamps, + and meeting coordination. + - name: send_welcome_email + fieldtype: Check + label: Send Welcome Email + description: Flag indicating whether to send onboarding email, used in user provisioning + and setup workflows. + - name: unsubscribed + fieldtype: Check + label: Unsubscribed + description: Indicates if user opted out of system notifications or emails, used + to filter communication lists. + - name: role_profile_name + fieldtype: Link + label: Role Profile + description: Named role template assigned to user, used to identify permission + sets and access levels. + join_hint: + table: tabRole Profile + 'on': role_profile_name = tabRole Profile.name + - name: roles + fieldtype: Table + label: Roles Assigned + description: '' + child_hint: + child_table: tabHas Role + fieldname: roles + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: roles + - name: module_profile + fieldtype: Link + label: Module Profile + description: Profile controlling which ERP modules user can access, used for feature + access and license management. + join_hint: + table: tabModule Profile + 'on': module_profile = tabModule Profile.name + - name: block_modules + fieldtype: Table + label: Block Modules + description: '' + child_hint: + child_table: tabBlock Module + fieldname: block_modules + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: block_modules + - name: home_settings + fieldtype: Code + label: Home Settings + description: User's dashboard and homepage configuration preferences, used for + personalization and default view settings. + - name: gender + fieldtype: Link + label: Gender + description: User's gender information for demographic reporting and HR analytics. + join_hint: + table: tabGender + 'on': gender = tabGender.name + - name: birth_date + fieldtype: Date + label: Birth Date + description: User's date of birth for age calculations, HR compliance, and employee + lifecycle tracking. + - name: interest + fieldtype: Small Text + label: Interests + description: User's declared interests or specializations, used for project assignments + and skill matching. + - name: phone + fieldtype: Data + label: Phone + description: User's contact phone number for communication, emergency contact, + and directory lookups. + - name: location + fieldtype: Data + label: Location + description: User's physical location or office assignment, used for resource + allocation and geographic reporting. + - name: bio + fieldtype: Small Text + label: Bio + description: User biographical information for profile display and team directory + searches. + - name: mobile_no + fieldtype: Data + label: Mobile No + description: Contact phone number used for SMS notifications and two-factor authentication. + - name: mute_sounds + fieldtype: Check + label: Mute Sounds + description: Audio notification preference flag queried when determining alert + delivery methods. + - name: desk_theme + fieldtype: Select + label: Desk Theme + description: UI theme selection affecting user interface appearance and accessibility + requirements. + options: + - Light + - Dark + - Automatic + - name: search_bar + fieldtype: Check + label: Search Bar + description: Search functionality toggle used to control global search feature + availability. + - name: notifications + fieldtype: Check + label: Notifications + description: Notification settings controlling which system alerts and updates + the user receives. + - name: list_sidebar + fieldtype: Check + label: Sidebar + description: Sidebar display preference for list views affecting workspace layout + configuration. + - name: bulk_actions + fieldtype: Check + label: Bulk Actions + description: Permission flag indicating whether user can perform mass operations + on records. + - name: view_switcher + fieldtype: Check + label: View Switcher + description: Interface control preference for toggling between different data + view modes. + - name: form_sidebar + fieldtype: Check + label: Sidebar + description: Form layout preference controlling sidebar visibility in document + editing screens. + - name: timeline + fieldtype: Check + label: Timeline + description: Activity timeline display setting for tracking document and record + history visibility. + - name: dashboard + fieldtype: Check + label: Dashboard + description: Default dashboard assignment determining landing page after user + login. + - name: new_password + fieldtype: Password + label: Set New Password + description: Temporary field used during password change operations for credential + updates. + - name: logout_all_sessions + fieldtype: Check + label: Logout From All Devices After Changing Password + description: Security action flag to terminate all active user sessions across + devices. + - name: reset_password_key + fieldtype: Data + label: Reset Password Key + description: Temporary token used for secure password reset link validation and + expiration. + - name: last_reset_password_key_generated_on + fieldtype: Datetime + label: Last Reset Password Key Generated On + description: Used to track when a password reset request was initiated for security + auditing and troubleshooting login issues. + - name: last_password_reset_date + fieldtype: Date + label: Last Password Reset Date + description: Used to identify when users last changed their password for compliance + reporting and security policy enforcement. + - name: redirect_url + fieldtype: Small Text + label: Redirect URL + description: Used to determine where users should be directed after login or specific + actions for customized user experience workflows. + - name: document_follow_notify + fieldtype: Check + label: Send Notifications For Documents Followed By Me + description: Used to check if a user has enabled notifications for documents they + follow when analyzing engagement preferences. + - name: document_follow_frequency + fieldtype: Select + label: Frequency + description: Used to determine how often users receive digest notifications for + followed documents when configuring communication settings. + options: + - Hourly + - Daily + - Weekly + - name: follow_created_documents + fieldtype: Check + label: Auto follow documents that you create + description: Used to identify users who auto-follow documents they create for + collaboration and notification analysis. + - name: follow_commented_documents + fieldtype: Check + label: Auto follow documents that you comment on + description: Used to identify users who auto-follow documents they comment on + for engagement tracking and notification management. + - name: follow_liked_documents + fieldtype: Check + label: Auto follow documents that you Like + description: Used to identify users who auto-follow documents they like for content + engagement analysis. + - name: follow_assigned_documents + fieldtype: Check + label: Auto follow documents that are assigned to you + description: Used to identify users who auto-follow documents assigned to them + for task management and workflow tracking. + - name: follow_shared_documents + fieldtype: Check + label: Auto follow documents that are shared with you + description: Used to identify users who auto-follow documents shared with them + for collaboration pattern analysis. + - name: email_signature + fieldtype: Small Text + label: Email Signature + description: Used to retrieve user email signatures for email template generation + and communication customization. + - name: thread_notify + fieldtype: Check + label: Send Notifications For Email Threads + description: Used to check if users receive notifications for discussion thread + updates when analyzing communication preferences. + - name: send_me_a_copy + fieldtype: Check + label: Send Me A Copy of Outgoing Emails + description: Used to identify users who receive copies of their own sent emails + for record-keeping and audit requirements. + - name: allowed_in_mentions + fieldtype: Check + label: Allowed In Mentions + description: Used to filter users who can be mentioned or tagged in documents + and comments for access control. + - name: user_emails + fieldtype: Table + label: User Emails + description: '' + child_hint: + child_table: tabUser Email + fieldname: user_emails + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: user_emails + - name: default_workspace + fieldtype: Link + label: Default Workspace + description: Identifies the user's primary workspace for filtering activity and + access patterns by workspace assignment. + join_hint: + table: tabWorkspace + 'on': default_workspace = tabWorkspace.name + - name: default_app + fieldtype: Select + label: Default App + description: Specifies the user's starting application for analyzing user preferences + and app adoption metrics. + - name: defaults + fieldtype: Table + label: User Defaults + description: '' + child_hint: + child_table: tabDefaultValue + fieldname: defaults + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: defaults + - name: simultaneous_sessions + fieldtype: Int + label: Simultaneous Sessions + description: Tracks concurrent login sessions for security audits and license + compliance monitoring. + - name: restrict_ip + fieldtype: Small Text + label: Restrict IP + description: Lists allowed IP addresses for identifying users with IP-based access + restrictions and security policies. + - name: login_after + fieldtype: Int + label: Login After + description: Defines the earliest allowed login time for users with time-based + access restrictions. + - name: user_type + fieldtype: Link + label: User Type + description: Categorizes user role or license type for segmenting users in access + control and reporting queries. + join_hint: + table: tabUser Type + 'on': user_type = tabUser Type.name + - name: last_active + fieldtype: Datetime + label: Last Active + description: Captures the most recent user activity timestamp for identifying + inactive users and engagement analysis. + - name: login_before + fieldtype: Int + label: Login Before + description: Defines the latest allowed login time for users with time-based access + restrictions. + - name: bypass_restrict_ip_check_if_2fa_enabled + fieldtype: Check + label: Bypass Restricted IP Address Check If Two Factor Auth Enabled + description: Indicates whether IP restrictions are waived when two-factor authentication + is active for security policy analysis. + - name: last_known_versions + fieldtype: Text + label: Last Known Versions + description: Stores client application version information for compatibility tracking + and upgrade planning. + - name: social_logins + fieldtype: Table + label: Social Logins + description: '' + child_hint: + child_table: tabUser Social Login + fieldname: social_logins + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: social_logins + - name: api_key + fieldtype: Data + label: API Key + description: Contains the user's API authentication key for identifying programmatic + access and integration usage. + - name: api_secret + fieldtype: Password + label: API Secret + description: Used to authenticate external system integrations and API access + requests for the user. + - name: onboarding_status + fieldtype: Small Text + label: Onboarding Status + description: Used to track user setup progress and filter users by completion + stage in onboarding workflows. + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per User document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabUser Document Type + description: '' + fields: + - name: document_type + fieldtype: Link + label: Document Type + description: The specific DocType for which permissions are being granted to the + user. + join_hint: + table: tabDocType + 'on': document_type = tabDocType.name + - name: is_custom + fieldtype: Check + label: Is Custom + description: Indicates whether this is a custom document type or a standard system + DocType. + - name: read + fieldtype: Check + label: Read + description: Grants the user permission to view records of this document type. + - name: write + fieldtype: Check + label: Write + description: Grants the user permission to edit existing records of this document + type. + - name: create + fieldtype: Check + label: Create + description: Grants the user permission to create new records of this document + type. + - name: submit + fieldtype: Check + label: Submit + description: Grants the user permission to submit records of this document type + for approval. + - name: cancel + fieldtype: Check + label: Cancel + description: Used to track if a user document type can be cancelled, relevant + when checking document cancellation permissions or workflows. + - name: amend + fieldtype: Check + label: Amend + description: Used to determine if a user document type allows amendments, relevant + when validating document modification rights or amendment workflows. + - name: delete + fieldtype: Check + label: Delete + description: Used to verify if a user document type can be deleted, relevant when + checking deletion permissions or data retention policies. + - name: email + fieldtype: Check + label: Email + description: Used to control if a user document type can be emailed, relevant + when configuring document distribution or communication workflows. + - name: share + fieldtype: Check + label: Share + description: Used to determine if a user document type can be shared with others, + relevant when managing document collaboration or access control. + - name: print + fieldtype: Check + label: Print + description: Used to verify if a user document type has print permissions, relevant + when controlling document output or physical distribution. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabUser Document + Type). Comparison-ready across parent records.' +- table: tabUser Email + description: '' + fields: + - name: email_account + fieldtype: Link + label: Email Account + description: References the Email Account used for sending/receiving emails for + this user. + join_hint: + table: tabEmail Account + 'on': email_account = tabEmail Account.name + - name: email_id + fieldtype: Data + label: Email ID + description: The actual email address associated with the user for communication. + - name: awaiting_password + fieldtype: Check + label: Awaiting Password + description: Indicates if the email account is waiting for password setup to enable + functionality. + - name: used_oauth + fieldtype: Check + label: Used OAuth + description: Tracks whether OAuth authentication is used instead of password for + this email. + - name: enable_outgoing + fieldtype: Check + label: Enable Outgoing + description: Controls whether this email address can be used to send outgoing + emails. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabUser Email). Comparison-ready + across parent records.' +- table: tabUser Group + description: '' + fields: + - name: user_group_members + fieldtype: Table MultiSelect + label: User Group Members + description: List of users belonging to this group, used when querying group membership + or assigning permissions to multiple users. + child_hint: + child_table: tabUser Group Member + fieldname: user_group_members + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: user_group_members + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per User Group document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabUser Group Member + description: '' + fields: + - name: user + fieldtype: Link + label: User + description: The actual user assigned to this group, used when finding which users + belong to specific groups or checking user permissions. + join_hint: + table: tabUser + 'on': user = tabUser.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabUser Group Member). + Comparison-ready across parent records.' +- table: tabUser Invitation + description: '' + fields: + - name: email + fieldtype: Data + label: Email + description: Email address of the person being invited to the system. + - name: app_name + fieldtype: Select + label: App Name + description: Application or module the user is being invited to access. + - name: redirect_to_path + fieldtype: Data + label: Redirect To Path + description: URL path where the user will be redirected after accepting the invitation. + - name: roles + fieldtype: Table MultiSelect + label: Roles + description: Roles or permissions assigned to the user upon accepting the invitation. + child_hint: + child_table: tabUser Role + fieldname: roles + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: roles + - name: status + fieldtype: Select + label: Status + description: Current state of the invitation such as pending, accepted, or expired. + options: + - Pending + - Accepted + - Expired + - Cancelled + - name: invited_by + fieldtype: Link + label: Invited By + description: User who sent or initiated this invitation. + join_hint: + table: tabUser + 'on': invited_by = tabUser.name + - name: key + fieldtype: Data + label: Key + description: Unique identifier for tracking invitation status and acceptance workflow. + - name: user + fieldtype: Link + label: User + description: Links to the user account created or associated when invitation is + accepted. + join_hint: + table: tabUser + 'on': user = tabUser.name + - name: email_sent_at + fieldtype: Datetime + label: Email Sent At + description: Timestamp used to measure invitation delivery timing and calculate + response lag. + - name: accepted_at + fieldtype: Datetime + label: Accepted At + description: Timestamp indicating when user completed invitation acceptance, used + for conversion rate analysis. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per User Invitation document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabUser Permission + description: '' + fields: + - name: user + fieldtype: Link + label: User + description: User to whom this permission restriction applies. + join_hint: + table: tabUser + 'on': user = tabUser.name + - name: allow + fieldtype: Link + label: Allow + description: Document type that this permission grants access to. + join_hint: + table: tabDocType + 'on': allow = tabDocType.name + - name: for_value + fieldtype: Dynamic Link + label: For Value + description: Specific document value that the user is restricted to access. + - name: is_default + fieldtype: Check + label: Is Default + description: Whether this permission is automatically applied as the default filter + for the user. + - name: apply_to_all_doctypes + fieldtype: Check + label: Apply To All Document Types + description: Whether this permission restriction applies across all related document + types. + - name: applicable_for + fieldtype: Link + label: Applicable For + description: Specific document type where this permission restriction is enforced. + join_hint: + table: tabDocType + 'on': applicable_for = tabDocType.name + - name: hide_descendants + fieldtype: Check + label: Hide Descendants + description: Used to determine if a user's permission should exclude visibility + of subordinate records or child entities in hierarchical data structures. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per User Permission document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabUser Role + description: '' + fields: + - name: role + fieldtype: Link + label: Role + description: The specific role name assigned to the user, defining their permissions + and access level. + join_hint: + table: tabRole + 'on': role = tabRole.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabUser Role). Comparison-ready + across parent records.' +- table: tabUser Select Document Type + description: '' + fields: + - name: document_type + fieldtype: Link + label: Document Type + description: The specific DocType that the user has permission to select or access. + join_hint: + table: tabDocType + 'on': document_type = tabDocType.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabUser Select Document + Type). Comparison-ready across parent records.' +- table: tabUser Social Login + description: '' + fields: + - name: provider + fieldtype: Data + label: Provider + description: Social authentication platform name (Google, Facebook, etc.) used + for login method analysis. + - name: username + fieldtype: Data + label: Username + description: User's display name or handle from the social provider, used for + identity verification. + - name: userid + fieldtype: Data + label: User ID + description: Unique user identifier from the social provider, critical for matching + and authenticating social logins. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabUser Social Login). + Comparison-ready across parent records.' +- table: tabUser Type + description: '' + fields: + - name: is_standard + fieldtype: Check + label: Is Standard + description: Flag indicating whether this is a system-defined user type, used + to prevent modification of core configurations. + - name: role + fieldtype: Link + label: Role + description: Role assigned to this user type, used when determining which user + types have specific permission roles. + join_hint: + table: tabRole + 'on': role = tabRole.name + - name: apply_user_permission_on + fieldtype: Link + label: Apply User Permission On + description: Document type on which user permissions are applied, used for permission + scope queries. + join_hint: + table: tabDocType + 'on': apply_user_permission_on = tabDocType.name + - name: user_id_field + fieldtype: Select + label: User Id Field + description: Field name that identifies the user in the target document, used + for linking user permissions to records. + - name: user_doctypes + fieldtype: Table + label: Document Types + description: '' + child_hint: + child_table: tabUser Document Type + fieldname: user_doctypes + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: user_doctypes + - name: custom_select_doctypes + fieldtype: Table + label: Custom Document Types (Select Permission) + description: '' + child_hint: + child_table: tabUser Select Document Type + fieldname: custom_select_doctypes + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: custom_select_doctypes + - name: select_doctypes + fieldtype: Table + label: Document Types (Select Permissions Only) + description: '' + child_hint: + child_table: tabUser Select Document Type + fieldname: select_doctypes + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: select_doctypes + - name: user_type_modules + fieldtype: Table + label: User Type Module + description: '' + child_hint: + child_table: tabUser Type Module + fieldname: user_type_modules + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: user_type_modules + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per User Type document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabUser Type Module + description: '' + fields: + - name: module + fieldtype: Link + label: Module + description: Name of the ERP module (e.g., Sales, Accounting) assigned to this + user type, used when filtering user access by functional area. + join_hint: + table: tabModule Def + 'on': module = tabModule Def.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabUser Type Module). + Comparison-ready across parent records.' +- table: tabVariant Field + description: '' + fields: + - name: field_name + fieldtype: Autocomplete + label: Field Name + description: The technical identifier or system name of the variant field used + when querying or filtering product variations by specific attribute types like + size, color, or material. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabVariant Field). + Comparison-ready across parent records.' +- table: tabVehicle + description: '' + fields: + - name: license_plate + fieldtype: Data + label: License Plate + description: Vehicle registration number used for identification in compliance, + tracking, and reporting queries. + - name: make + fieldtype: Data + label: Make + description: Vehicle manufacturer brand used for filtering fleet composition and + maintenance planning by brand. + - name: model + fieldtype: Data + label: Model + description: Specific vehicle model name used for grouping similar vehicles and + analyzing performance by type. + - name: last_odometer + fieldtype: Int + label: Odometer Value (Last) + description: Most recent mileage reading used for maintenance scheduling, utilization + analysis, and depreciation calculations. + - name: acquisition_date + fieldtype: Date + label: Acquisition Date + description: Date when the vehicle was purchased or acquired, used for age analysis + and depreciation tracking. + - name: location + fieldtype: Data + label: Location + description: Current physical location or assignment of the vehicle, used for + fleet distribution and availability queries. + - name: chassis_no + fieldtype: Data + label: Chassis No + description: Vehicle identification number (VIN) used for unique identification + in legal, insurance, and compliance matters. + - name: vehicle_value + fieldtype: Currency + label: Vehicle Value + description: Current or acquisition value of the vehicle used for asset valuation, + insurance, and financial reporting. + - name: employee + fieldtype: Link + label: Employee + description: Employee assigned to or responsible for the vehicle, used for allocation + tracking and accountability. + join_hint: + table: tabEmployee + 'on': employee = tabEmployee.name + - name: insurance_company + fieldtype: Data + label: Insurance Company + description: Insurer providing coverage for the vehicle, used for insurance management + and claims processing queries. + - name: policy_no + fieldtype: Data + label: Policy No + description: Used to identify and link vehicle records to insurance policies or + tracking agreements. + - name: start_date + fieldtype: Date + label: Start Date + description: Used to determine when vehicle coverage, lease, or tracking period + begins for eligibility and timeline analysis. + - name: end_date + fieldtype: Date + label: End Date + description: Used to determine when vehicle coverage, lease, or tracking period + expires for renewal and active status queries. + - name: fuel_type + fieldtype: Select + label: Fuel Type + description: Used to filter and analyze vehicles by energy source for cost analysis, + emissions reporting, and fleet composition. + options: + - Petrol + - Diesel + - Natural Gas + - Electric + - name: uom + fieldtype: Link + label: Fuel UOM + description: Used to standardize measurement units for fuel consumption, distance, + or capacity calculations across vehicle records. + join_hint: + table: tabUOM + 'on': uom = tabUOM.name + - name: carbon_check_date + fieldtype: Date + label: Last Carbon Check + description: Used to track when emissions or environmental compliance inspections + were last performed for regulatory reporting. + - name: color + fieldtype: Data + label: Color + description: Used to identify and filter vehicles by exterior color for inventory + management and vehicle matching. + - name: wheels + fieldtype: Int + label: Wheels + description: Used to classify vehicles by wheel count for categorization, compliance, + and vehicle type identification. + - name: doors + fieldtype: Int + label: Doors + description: Used to classify vehicles by door count for segmentation, pricing, + and vehicle specification queries. + - name: amended_from + fieldtype: Link + label: Amended From + description: Used to track which previous vehicle record this entry replaces or + modifies for audit trail and change history. + join_hint: + table: tabVehicle + 'on': amended_from = tabVehicle.name + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Vehicle document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabVersion + description: '' + fields: + - name: ref_doctype + fieldtype: Link + label: DocType + description: Document type being versioned or tracked by this version record. + join_hint: + table: tabDocType + 'on': ref_doctype = tabDocType.name + - name: docname + fieldtype: Data + label: Document Name + description: Name of the specific document instance that this version captures. + - name: data + fieldtype: Code + label: Data + description: JSON or serialized content storing the actual versioned data or changes. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Version document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabVideo + description: '' + fields: + - name: title + fieldtype: Data + label: Title + description: Video title used for searching and displaying video content to users. + - name: provider + fieldtype: Select + label: Provider + description: Video hosting platform (YouTube, Vimeo, etc.) used to filter by source. + options: + - YouTube + - Vimeo + - name: url + fieldtype: Data + label: URL + description: Full video URL used for direct access and playback links. + - name: youtube_video_id + fieldtype: Data + label: Youtube ID + description: YouTube-specific identifier for embedding and tracking YouTube videos. + - name: publish_date + fieldtype: Date + label: Publish Date + description: Date the video was published, used for filtering and sorting by release + date. + - name: duration + fieldtype: Duration + label: Duration + description: Video length in seconds or time format for filtering by content length. + - name: like_count + fieldtype: Float + label: Likes + description: Used to measure video engagement and popularity when analyzing content + performance or identifying top-performing videos. + - name: view_count + fieldtype: Float + label: Views + description: Used to track video reach and audience size when evaluating content + visibility, trending videos, or campaign effectiveness. + - name: dislike_count + fieldtype: Float + label: Dislikes + description: Used to assess negative audience sentiment and content quality issues + when analyzing viewer reception or identifying problematic videos. + - name: comment_count + fieldtype: Float + label: Comments + description: Used to measure audience interaction and engagement level when evaluating + community activity or content that sparks discussion. + - name: description + fieldtype: Text Editor + label: Description + description: Used to understand video content, topics, and context when searching + for specific subject matter or categorizing videos by theme. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Video document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabView Log + description: '' + fields: + - name: viewed_by + fieldtype: Data + label: Viewed By + description: User who viewed the referenced document, used for tracking document + access and engagement. + - name: reference_doctype + fieldtype: Link + label: Reference Document Type + description: Type of document that was viewed, used for analyzing which document + types receive the most views. + join_hint: + table: tabDocType + 'on': reference_doctype = tabDocType.name + - name: reference_name + fieldtype: Dynamic Link + label: Reference name + description: Specific document identifier that was viewed, used for tracking individual + document access history. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per View Log document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabVoice Call Settings + description: '' + fields: + - name: user + fieldtype: Link + label: User + description: Agent or employee assigned to these voice call settings, used when + routing calls to specific users. + join_hint: + table: tabUser + 'on': user = tabUser.name + - name: call_receiving_device + fieldtype: Select + label: Call Receiving Device + description: Device type or endpoint where incoming calls are directed for this + user. + options: + - Computer + - Phone + - name: greeting_message + fieldtype: Data + label: Greeting Message + description: Initial message played to callers when they connect, used for customizing + call introductions. + - name: agent_busy_message + fieldtype: Data + label: Agent Busy Message + description: Message played when the assigned agent is already on another call, + used for managing caller expectations. + - name: agent_unavailable_message + fieldtype: Data + label: Agent Unavailable Message + description: Message played when the agent is offline or unavailable, used for + informing callers of alternative actions. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Voice Call Settings document (master/transaction). Use + only for single-entity lookups, not cross-record comparison unless fields are + per-relationship (e.g. supplier, price_list).' +- table: tabWarehouse + description: A logical Warehouse against which stock entries are made. + fields: + - name: disabled + fieldtype: Check + label: Disabled + description: Indicates if warehouse is inactive and excluded from transactions. + - name: warehouse_name + fieldtype: Data + label: Warehouse Name + description: Display name of the warehouse used in stock queries and inventory + reports. + - name: is_group + fieldtype: Check + label: Is Group Warehouse + description: Flags if this is a parent warehouse grouping multiple child warehouses + for hierarchical reporting. + - name: parent_warehouse + fieldtype: Link + label: Parent Warehouse + description: Links to parent warehouse for nested warehouse structures and consolidated + inventory views. + join_hint: + table: tabWarehouse + 'on': parent_warehouse = tabWarehouse.name + - name: is_rejected_warehouse + fieldtype: Check + label: Is Rejected Warehouse + description: Marks warehouse designated for storing rejected or non-conforming + inventory. + - name: account + fieldtype: Link + label: Account + description: General ledger account linked to warehouse for inventory valuation + and accounting integration. + join_hint: + table: tabAccount + 'on': account = tabAccount.name + - name: company + fieldtype: Link + label: Company + description: Company entity owning this warehouse for multi-company inventory + segregation. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: email_id + fieldtype: Data + label: Email Address + description: Contact email for warehouse communications and automated notifications. + - name: phone_no + fieldtype: Data + label: Phone No + description: Primary phone contact for warehouse operations and coordination. + - name: mobile_no + fieldtype: Data + label: Mobile No + description: Mobile contact for urgent warehouse matters and field communications. + - name: address_line_1 + fieldtype: Data + label: Address Line 1 + description: Primary street address for shipping, receiving, and warehouse location + queries. + - name: address_line_2 + fieldtype: Data + label: Address Line 2 + description: Secondary address details for precise warehouse location identification. + - name: city + fieldtype: Data + label: City + description: City location used in regional inventory distribution and logistics + planning. + - name: state + fieldtype: Data + label: State/Province + description: State or province for tax calculations and regional stock analysis. + - name: pin + fieldtype: Data + label: PIN + description: Postal code for shipping calculations and delivery zone determination. + - name: warehouse_type + fieldtype: Link + label: Warehouse Type + description: Classification of warehouse function such as storage, transit, or + retail for operational filtering. + join_hint: + table: tabWarehouse Type + 'on': warehouse_type = tabWarehouse Type.name + - name: default_in_transit_warehouse + fieldtype: Link + label: Default In-Transit Warehouse + description: Designated warehouse for goods in transit between locations during + stock transfers. + join_hint: + table: tabWarehouse + 'on': default_in_transit_warehouse = tabWarehouse.name + - name: lft + fieldtype: Int + label: lft + description: Left boundary in nested set model for warehouse hierarchy traversal. + - name: rgt + fieldtype: Int + label: rgt + description: Right boundary in nested set model for warehouse hierarchy queries. + - name: old_parent + fieldtype: Link + label: Old Parent + description: Previous parent warehouse tracked during hierarchy restructuring + and audit trails. + join_hint: + table: tabWarehouse + 'on': old_parent = tabWarehouse.name + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Warehouse document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabWarehouse Type + description: '' + fields: + - name: description + fieldtype: Small Text + label: Description + description: Detailed explanation of the warehouse type's purpose, operational + characteristics, or business function used when analyzing warehouse capabilities + or filtering by facility classification. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Warehouse Type document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabWarranty Claim + description: '' + fields: + - name: naming_series + fieldtype: Select + label: Series + description: Indicates the format of the claim number for systematic identification. + options: + - SER-WRN-.YYYY.- + - name: status + fieldtype: Select + label: Status + description: Reflects the current state of the warranty claim, essential for workflow + management. + options: + - Open + - Closed + - Work In Progress + - Cancelled + - name: complaint_date + fieldtype: Date + label: Issue Date + description: Records when the complaint was filed, crucial for tracking response + times. + - name: customer + fieldtype: Link + label: Customer + description: Identifies the customer associated with the claim, important for + customer service and follow-up. + join_hint: + table: tabCustomer + 'on': customer = tabCustomer.name + - name: serial_no + fieldtype: Link + label: Serial No + description: Tracks the specific item involved in the claim, necessary for warranty + validation. + join_hint: + table: tabSerial No + 'on': serial_no = tabSerial No.name + - name: complaint + fieldtype: Text Editor + label: Issue + description: Describes the issue reported by the customer, vital for understanding + and resolving the problem. + - name: item_code + fieldtype: Link + label: Item Code + description: References the product code related to the claim, used for inventory + and warranty checks. + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: item_name + fieldtype: Data + label: Item Name + description: Names the product associated with the claim, important for clarity + in communication. + - name: description + fieldtype: Small Text + label: Description + description: Provides additional details about the claim, useful for comprehensive + case analysis. + - name: warranty_amc_status + fieldtype: Select + label: Warranty / AMC Status + description: Indicates if the item is under warranty or AMC, essential for determining + coverage. + options: + - Under Warranty + - Out of Warranty + - Under AMC + - Out of AMC + - name: warranty_expiry_date + fieldtype: Date + label: Warranty Expiry Date + description: Shows when the warranty period ends, critical for assessing claim + validity. + - name: amc_expiry_date + fieldtype: Date + label: AMC Expiry Date + description: Indicates the end date of the Annual Maintenance Contract, important + for service continuity. + - name: resolution_date + fieldtype: Datetime + label: Resolution Date + description: Records when the claim was resolved, important for performance metrics. + - name: resolved_by + fieldtype: Link + label: Resolved By + description: Identifies the person who handled the resolution, useful for accountability + and service quality. + join_hint: + table: tabUser + 'on': resolved_by = tabUser.name + - name: resolution_details + fieldtype: Text + label: Resolution Details + description: Used to document the outcome and actions taken for warranty claims. + - name: customer_name + fieldtype: Data + label: Customer Name + description: Identifies the customer associated with the warranty claim for tracking + and reporting purposes. + - name: contact_person + fieldtype: Link + label: Contact Person + description: Specifies the primary contact for the warranty claim to facilitate + communication. + join_hint: + table: tabContact + 'on': contact_person = tabContact.name + - name: contact_display + fieldtype: Small Text + label: Contact + description: Provides a formatted view of the contact information for ease of + access in reports. + - name: contact_mobile + fieldtype: Data + label: Mobile No + description: Lists the mobile number of the contact person for quick communication + regarding the claim. + - name: contact_email + fieldtype: Data + label: Contact Email + description: Contains the email address of the contact person for sending updates + and documentation related to the claim. + - name: territory + fieldtype: Link + label: Territory + description: Indicates the geographical area relevant to the warranty claim, aiding + in regional analysis. + join_hint: + table: tabTerritory + 'on': territory = tabTerritory.name + - name: customer_group + fieldtype: Link + label: Customer Group + description: Categorizes customers into groups for targeted analysis and reporting + on warranty claims. + join_hint: + table: tabCustomer Group + 'on': customer_group = tabCustomer Group.name + - name: customer_address + fieldtype: Link + label: Customer Address + description: Records the physical address of the customer for logistics and service + purposes. + join_hint: + table: tabAddress + 'on': customer_address = tabAddress.name + - name: address_display + fieldtype: Small Text + label: Address + description: Formats the customer address for clarity in communication and documentation. + - name: service_address + fieldtype: Small Text + label: Service Address + description: Location where warranty service was performed or product is installed, + used to analyze claims by geographic region or service territory. + - name: company + fieldtype: Link + label: Company + description: Company entity that owns or processes the warranty claim, used to + filter claims by business unit or legal entity. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: complaint_raised_by + fieldtype: Data + label: Raised By + description: Customer or contact who initiated the warranty claim, used to track + claim originators and analyze customer complaint patterns. + - name: from_company + fieldtype: Data + label: From Company + description: Originating company when warranty claim involves inter-company transactions + or transfers between subsidiaries. + - name: amended_from + fieldtype: Link + label: Amended From + description: Reference to original warranty claim that was modified or corrected, + used to track claim revision history and amendments. + join_hint: + table: tabWarranty Claim + 'on': amended_from = tabWarranty Claim.name + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Warranty Claim document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabWeb Form + description: '' + fields: + - name: title + fieldtype: Data + label: Title + description: Display name of the web form shown to end users on the website. + - name: route + fieldtype: Data + label: Route + description: URL path where the web form is accessible on the website. + - name: published + fieldtype: Check + label: Published + description: Indicates if the web form is live and accessible to website visitors. + - name: doc_type + fieldtype: Link + label: Select DocType + description: Target DocType that this web form creates or updates records for. + join_hint: + table: tabDocType + 'on': doc_type = tabDocType.name + - name: module + fieldtype: Link + label: Module + description: ERP module this web form belongs to for organizational filtering. + join_hint: + table: tabModule Def + 'on': module = tabModule Def.name + - name: is_standard + fieldtype: Check + label: Is Standard + description: Indicates if this is a system-provided web form versus custom-created. + - name: introduction_text + fieldtype: Text Editor + label: Introduction + description: Used when searching for web forms by their introductory message or + instructions displayed to users before form submission. + - name: web_form_fields + fieldtype: Table + label: Web Form Fields + description: '' + child_hint: + child_table: tabWeb Form Field + fieldname: web_form_fields + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: web_form_fields + - name: anonymous + fieldtype: Check + label: Anonymous responses + description: Used when filtering web forms that allow submission without user + authentication or login. + - name: login_required + fieldtype: Check + label: Login required + description: Used when identifying web forms that mandate user authentication + before allowing form access or submission. + - name: apply_document_permissions + fieldtype: Check + label: Apply Document Permissions + description: Used when determining which web forms enforce backend document-level + security rules on submitted data. + - name: allow_edit + fieldtype: Check + label: Allow Editing After Submit + description: Used when finding web forms that permit users to modify their previously + submitted responses. + - name: allow_multiple + fieldtype: Check + label: Allow Multiple Responses + description: Used when searching for web forms that accept multiple submissions + from the same user. + - name: allow_delete + fieldtype: Check + label: Allow Delete + description: Used when identifying web forms where users can remove their own + submitted entries. + - name: allow_incomplete + fieldtype: Check + label: Allow Incomplete Forms + description: Used when filtering web forms that permit saving draft or partial + submissions for later completion. + - name: allow_comments + fieldtype: Check + label: Allow Comments + description: Used when finding web forms that enable user commenting or discussion + on submitted entries. + - name: allow_print + fieldtype: Check + label: Allow Print + description: Used when identifying web forms that provide print functionality + for submitted responses. + - name: print_format + fieldtype: Link + label: Print Format + description: Used when querying the specific print template or layout applied + to web form submissions. + join_hint: + table: tabPrint Format + 'on': print_format = tabPrint Format.name + - name: max_attachment_size + fieldtype: Int + label: Max attachment size + description: Used when filtering web forms by file upload size limits or troubleshooting + attachment restrictions. + - name: show_attachments + fieldtype: Check + label: Show Attachments + description: Used when determining which web forms display uploaded files or attachments + to users. + - name: allowed_embedding_domains + fieldtype: Small Text + label: Allowed embedding domains + description: Used when identifying which external websites or domains are permitted + to embed or iframe the web form. + - name: condition_json + fieldtype: JSON + label: Condition JSON + description: Used to filter which form submissions or records are displayed based + on dynamic conditional logic. + - name: show_list + fieldtype: Check + label: Show List + description: Indicates whether to display a list view of previous submissions + on the web form page. + - name: list_title + fieldtype: Data + label: Title + description: Defines the heading text shown above the list of previous form submissions. + - name: list_columns + fieldtype: Table + label: List Columns + description: '' + child_hint: + child_table: tabWeb Form List Column + fieldname: list_columns + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: list_columns + - name: show_sidebar + fieldtype: Check + label: Show Sidebar + description: Controls whether a sidebar navigation or information panel is visible + on the web form page. + - name: website_sidebar + fieldtype: Link + label: Website Sidebar + description: References the specific sidebar template or content to display alongside + the web form. + join_hint: + table: tabWebsite Sidebar + 'on': website_sidebar = tabWebsite Sidebar.name + - name: button_label + fieldtype: Data + label: Submit button label + description: Defines the text displayed on the form submission button instead + of default 'Submit'. + - name: breadcrumbs + fieldtype: Code + label: Breadcrumbs + description: Contains the navigation path links shown at the top of the web form + page for user orientation. + - name: success_title + fieldtype: Data + label: Success title + description: Sets the heading text displayed on the confirmation page after successful + form submission. + - name: success_url + fieldtype: Data + label: Success URL + description: Specifies the redirect destination URL after a user successfully + submits the web form. + - name: success_message + fieldtype: Text + label: Success message + description: Defines the confirmation message text shown to users after successful + form submission. + - name: meta_title + fieldtype: Data + label: Meta title + description: Sets the browser tab and SEO title tag for the web form page. + - name: meta_description + fieldtype: Small Text + label: Meta description + description: Provides the SEO description tag content for search engine indexing + of the web form page. + - name: client_script + fieldtype: Code + label: Client script + description: Contains custom JavaScript code that executes in the browser to add + dynamic form behavior or validation. + - name: custom_css + fieldtype: Code + label: Custom CSS + description: Holds custom styling rules to override default web form appearance + and branding. + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Web Form document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabWeb Form Field + description: '' + fields: + - name: fieldname + fieldtype: Select + label: Field + description: Internal field name mapping to the underlying DocType field. + - name: fieldtype + fieldtype: Select + label: Fieldtype + description: Data type of the field such as text, number, date, or select. + options: + - Attach + - Attach Image + - Check + - Currency + - Color + - Data + - Date + - Datetime + - Duration + - Float + - HTML + - Int + - Link + - Password + - Phone + - Rating + - Select + - Signature + - Small Text + - Text + - Text Editor + - Table + - Time + - Section Break + - Column Break + - Page Break + - name: label + fieldtype: Data + label: Custom Label + description: Display label shown to users on the web form. + - name: allow_read_on_all_link_options + fieldtype: Check + label: Allow Read On All Link Options + description: Whether users can view all linked document options regardless of + permissions. + - name: reqd + fieldtype: Check + label: Mandatory + description: Indicates if this field is mandatory for web form submission. + - name: read_only + fieldtype: Check + label: Read Only + description: Whether this field is displayed as non-editable on the web form. + - name: show_in_filter + fieldtype: Check + label: Show in filter + description: Controls whether this field appears as a filterable option in web + form list views or search interfaces. + - name: hidden + fieldtype: Check + label: Hidden + description: Determines if the field is hidden from display on the web form while + still capturing data in the background. + - name: options + fieldtype: Text + label: Options + description: Defines the selectable choices available for dropdown, radio, or + checkbox field types on the web form. + - name: max_length + fieldtype: Int + label: Max Length + description: Sets the maximum number of characters allowed for text input fields + to enforce data entry limits. + - name: max_value + fieldtype: Int + label: Max Value + description: Specifies the highest numeric value permitted for number or currency + fields to validate user input. + - name: precision + fieldtype: Select + label: Precision + description: Defines the number of decimal places allowed for numeric fields to + control calculation accuracy. + options: + - '0' + - '1' + - '2' + - '3' + - '4' + - '5' + - '6' + - '7' + - '8' + - '9' + - name: depends_on + fieldtype: Code + label: Display Depends On + description: Specifies conditional logic that determines when this field becomes + visible based on other field values. + - name: mandatory_depends_on + fieldtype: Code + label: Mandatory Depends On + description: Defines conditions under which this field becomes required based + on values entered in other fields. + - name: read_only_depends_on + fieldtype: Code + label: Read Only Depends On + description: Sets conditional logic that makes this field non-editable based on + specific values in other fields. + - name: description + fieldtype: Text + label: Description + description: Provides help text or instructions displayed to users explaining + the purpose or format of this field. + - name: default + fieldtype: Data + label: Default + description: Sets the pre-populated value that appears in this field when the + web form is first loaded. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabWeb Form Field). + Comparison-ready across parent records.' +- table: tabWeb Form List Column + description: '' + fields: + - name: fieldname + fieldtype: Select + label: Field + description: Name of the field from the linked DocType to display in this list + column. + - name: fieldtype + fieldtype: Data + label: Fieldtype + description: Data type of the field being displayed in this list column. + - name: label + fieldtype: Data + label: Custom Label + description: Display label shown as the column header in the web form list view. + - name: options + fieldtype: Text + label: Options + description: Additional configuration options for the field such as link targets + or select values. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabWeb Form List + Column). Comparison-ready across parent records.' +- table: tabWeb Page + description: '' + fields: + - name: title + fieldtype: Data + label: Title + description: Display name of the web page shown in navigation and search results. + - name: route + fieldtype: Data + label: Route + description: URL path for accessing the web page, used for navigation and link + generation. + - name: dynamic_route + fieldtype: Check + label: Dynamic Route + description: Indicates if the page URL is generated dynamically based on parameters. + - name: published + fieldtype: Check + label: Published + description: Publication status flag used to filter live versus draft web pages. + - name: module + fieldtype: Link + label: Module (for export) + description: ERP module that owns this web page, used for organizing content by + functional area. + join_hint: + table: tabModule Def + 'on': module = tabModule Def.name + - name: content_type + fieldtype: Select + label: Content Type + description: Classification of web page content type used for filtering and categorization. + options: + - Rich Text + - Markdown + - HTML + - Page Builder + - Slideshow + - name: slideshow + fieldtype: Link + label: Slideshow + description: Used to identify pages configured with rotating image or content + slideshows for homepage or promotional displays. + join_hint: + table: tabWebsite Slideshow + 'on': slideshow = tabWebsite Slideshow.name + - name: dynamic_template + fieldtype: Check + label: Dynamic Template + description: Indicates whether the page uses a dynamic template for rendering + content based on runtime data or user context. + - name: main_section + fieldtype: Text Editor + label: Main Section + description: Stores the primary content area of the web page, queried when analyzing + core page messaging or layout structure. + - name: page_blocks + fieldtype: Table + label: Page Building Blocks + description: '' + child_hint: + child_table: tabWeb Page Block + fieldname: page_blocks + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: page_blocks + - name: context_script + fieldtype: Code + label: Context Script + description: Contains server-side scripts that set page context or variables, + relevant for dynamic content generation queries. + - name: javascript + fieldtype: Code + label: Javascript + description: Stores custom JavaScript code for the page, queried when analyzing + client-side behavior or interactive features. + - name: insert_style + fieldtype: Check + label: Insert Style + description: Indicates whether custom styling is injected into the page, used + when troubleshooting or customizing page appearance. + - name: text_align + fieldtype: Select + label: Text Align + description: Defines content alignment settings for the page, queried when adjusting + or standardizing page layout presentation. + options: + - Left + - Center + - Right + - name: css + fieldtype: Code + label: CSS + description: Contains custom CSS styling rules for the page, used when modifying + or analyzing page-specific visual design. + - name: full_width + fieldtype: Check + label: Full Width + description: Indicates if the page uses full-width layout without container constraints, + relevant for responsive design queries. + - name: show_title + fieldtype: Check + label: Show Title + description: Controls whether the page title is displayed, queried when configuring + page header visibility or SEO elements. + - name: start_date + fieldtype: Datetime + label: Start Date + description: Defines when the page becomes active or visible, used for scheduling + promotional or time-sensitive content. + - name: end_date + fieldtype: Datetime + label: End Date + description: Specifies when the page expires or becomes inactive, queried for + managing temporary campaigns or seasonal content. + - name: meta_title + fieldtype: Data + label: Title + description: SEO page title used when analyzing search engine optimization performance + and web page discoverability. + - name: meta_description + fieldtype: Small Text + label: Description + description: SEO meta description used when evaluating search result snippets + and organic traffic optimization. + - name: show_sidebar + fieldtype: Check + label: Show Sidebar + description: Flag indicating whether sidebar is displayed, used when analyzing + page layout configurations and user interface settings. + - name: idx + fieldtype: Int + label: Priority + description: Display sequence order for sorting web pages in lists or hierarchies. + - name: website_sidebar + fieldtype: Link + label: Website Sidebar + description: Reference to the sidebar component used when querying which navigation + or content modules appear on specific pages. + join_hint: + table: tabWebsite Sidebar + 'on': website_sidebar = tabWebsite Sidebar.name + - name: enable_comments + fieldtype: Check + label: Enable Comments + description: Flag controlling comment functionality, used when analyzing user + engagement features and content interaction settings. + - name: breadcrumbs + fieldtype: Code + label: Breadcrumbs + description: Navigation path display setting used when analyzing site hierarchy, + user navigation patterns, and page structure. + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Web Page document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabWeb Page Block + description: '' + fields: + - name: web_template + fieldtype: Link + label: Web Template + description: Template component used to render this block, queried when finding + pages using specific design patterns. + join_hint: + table: tabWeb Template + 'on': web_template = tabWeb Template.name + - name: web_template_values + fieldtype: Code + label: Web Template Values + description: JSON data containing dynamic values passed to the web template for + content customization. + - name: css_class + fieldtype: Small Text + label: CSS Class + description: Custom CSS class names applied to this block for styling, used when + searching for specially formatted sections. + - name: section_id + fieldtype: Data + label: Section ID + description: HTML anchor ID for this block enabling direct navigation and deep + linking to page sections. + - name: add_container + fieldtype: Check + label: Add Container + description: Boolean flag indicating whether to wrap the block in a container + div for layout control. + - name: add_top_padding + fieldtype: Check + label: Add Space at Top + description: Boolean flag controlling whether spacing is added above the block + for visual separation. + - name: add_bottom_padding + fieldtype: Check + label: Add Space at Bottom + description: Controls whether extra spacing is added below the web page block + for visual separation between content sections. + - name: add_border_at_top + fieldtype: Check + label: Add Border at Top + description: Determines if a border line appears at the top of the block to visually + separate it from preceding content. + - name: add_border_at_bottom + fieldtype: Check + label: Add Border at Bottom + description: Determines if a border line appears at the bottom of the block to + visually separate it from following content. + - name: add_shade + fieldtype: Check + label: Add Gray Background + description: Controls whether a shaded background color is applied to the block + for visual emphasis or contrast. + - name: hide_block + fieldtype: Check + label: Hide Block + description: Indicates whether the block is hidden from display on the web page, + used for conditional content visibility. + - name: add_background_image + fieldtype: Check + label: Add Background Image + description: Specifies whether a background image is displayed behind the block + content for visual styling. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabWeb Page Block). + Comparison-ready across parent records.' +- table: tabWeb Page View + description: '' + fields: + - name: path + fieldtype: Data + label: Path + description: URL path of the viewed page, critical for identifying which pages + are visited, analyzing popular content, and tracking user navigation. + - name: referrer + fieldtype: Data + label: Referrer + description: Source URL that led to this page view, used for analyzing traffic + sources, campaign effectiveness, and user navigation flow. + - name: browser + fieldtype: Data + label: Browser + description: Web browser used for the page view, relevant for browser compatibility + analysis and understanding visitor technology preferences. + - name: browser_version + fieldtype: Data + label: Browser Version + description: Specific version of the browser used, important for technical support + decisions and identifying compatibility issues. + - name: is_unique + fieldtype: Data + label: Is Unique + description: Flag indicating if this is a unique visitor view, essential for calculating + unique visitor metrics versus total page views. + - name: time_zone + fieldtype: Data + label: Time Zone + description: Visitor's time zone during the page view, used for geographic analysis + and adjusting timestamps to local business hours. + - name: user_agent + fieldtype: Data + label: User Agent + description: Used to identify browser and device type when analyzing traffic sources + or troubleshooting display issues across platforms. + - name: source + fieldtype: Data + label: Source + description: Used to track which website, platform, or referrer drove traffic + when measuring marketing channel effectiveness. + - name: campaign + fieldtype: Data + label: Campaign + description: Used to attribute page views to specific marketing campaigns when + calculating campaign ROI and performance. + - name: medium + fieldtype: Data + label: Medium + description: Used to categorize traffic type such as email, social, or paid search + when comparing channel effectiveness. + - name: visitor_id + fieldtype: Data + label: Visitor ID + description: Used to track unique visitors across sessions when analyzing user + behavior patterns and return visitor rates. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Web Page View document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabWeb Template + description: '' + fields: + - name: type + fieldtype: Select + label: Type + description: Category or classification of the web template (e.g., page, component, + section) used to filter templates by purpose. + options: + - Component + - Section + - Navbar + - Footer + - name: standard + fieldtype: Check + label: Standard + description: Flag indicating if this is a system-provided template versus custom, + used to distinguish core from user-created templates. + - name: module + fieldtype: Link + label: Module + description: ERPNext module this template belongs to, used when filtering templates + by functional area or application module. + join_hint: + table: tabModule Def + 'on': module = tabModule Def.name + - name: template + fieldtype: Code + label: Template + description: HTML/Jinja template content or code, searched when looking for specific + markup or template logic. + - name: fields + fieldtype: Table + label: Fields + description: '' + child_hint: + child_table: tabWeb Template Field + fieldname: fields + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: fields + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Web Template document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabWeb Template Field + description: '' + fields: + - name: label + fieldtype: Data + label: Label + description: User-facing display name shown for this field on the web template. + - name: fieldname + fieldtype: Data + label: Fieldname + description: Internal field name used to reference this field in code and data + storage. + - name: fieldtype + fieldtype: Select + label: Fieldtype + description: Data type of the field such as text, number, date, or select. + options: + - Attach Image + - Check + - Data + - Int + - Link + - Select + - Small Text + - Text + - Markdown Editor + - Section Break + - Column Break + - Table Break + - name: reqd + fieldtype: Check + label: Mandatory + description: Indicates whether this field is mandatory for web template submission. + - name: options + fieldtype: Small Text + label: Options + description: Configuration options for the field such as dropdown values or linked + document types. + - name: default + fieldtype: Small Text + label: Default + description: Default value automatically populated when creating a new web template + instance. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabWeb Template Field). + Comparison-ready across parent records.' +- table: tabWebhook + description: '' + fields: + - name: webhook_doctype + fieldtype: Link + label: DocType + description: Target DocType that triggers this webhook when its documents change. + join_hint: + table: tabDocType + 'on': webhook_doctype = tabDocType.name + - name: webhook_docevent + fieldtype: Select + label: Doc Event + description: Specific document event that activates this webhook such as save, + submit, or delete. + options: + - after_insert + - on_update + - on_submit + - on_cancel + - on_trash + - on_update_after_submit + - on_change + - name: enabled + fieldtype: Check + label: Enabled + description: Indicates whether this webhook is currently active and will fire + on events. + - name: condition + fieldtype: Small Text + label: Condition + description: Python expression evaluated to determine if webhook should execute + for specific document changes. + - name: request_url + fieldtype: Small Text + label: Request URL + description: Destination URL endpoint where webhook payload is sent when triggered. + - name: is_dynamic_url + fieldtype: Check + label: Is Dynamic URL? + description: Indicates if the request URL contains dynamic placeholders resolved + at runtime from document fields. + - name: timeout + fieldtype: Int + label: Request Timeout + description: Maximum wait time in seconds before webhook request fails, used when + troubleshooting webhook performance or connection issues. + - name: background_jobs_queue + fieldtype: Autocomplete + label: Background Jobs Queue + description: Queue name for asynchronous webhook processing, used when analyzing + webhook execution timing and job scheduling. + - name: request_method + fieldtype: Select + label: Request Method + description: HTTP method (GET, POST, PUT, DELETE) for webhook calls, used when + configuring or filtering webhooks by their API interaction type. + options: + - POST + - PUT + - DELETE + - name: request_structure + fieldtype: Select + label: Request Structure + description: Format structure of the webhook payload (form-data, JSON, XML), used + when debugging data transmission or integration compatibility issues. + options: + - Form URL-Encoded + - JSON + - name: enable_security + fieldtype: Check + label: Enable Security + description: Flag indicating if authentication/security is required for webhook, + used when auditing secure integrations or access control. + - name: webhook_secret + fieldtype: Password + label: Webhook Secret + description: Secret key for webhook signature verification, used when validating + webhook authenticity or investigating security breaches. + - name: webhook_headers + fieldtype: Table + label: Headers + description: '' + child_hint: + child_table: tabWebhook Header + fieldname: webhook_headers + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: webhook_headers + - name: webhook_data + fieldtype: Table + label: Data + description: '' + child_hint: + child_table: tabWebhook Data + fieldname: webhook_data + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: webhook_data + - name: webhook_json + fieldtype: Code + label: JSON Request Body + description: JSON-formatted payload structure for webhook, used when reviewing + or troubleshooting structured data sent to APIs. + - name: preview_document + fieldtype: Dynamic Link + label: Select Document + description: Sample document used to test webhook before activation, used when + validating webhook configuration during setup. + - name: meets_condition + fieldtype: Data + label: Meets Condition? + description: Boolean indicating if trigger conditions are satisfied for webhook + execution, used when analyzing why webhooks fire or don't fire. + - name: preview_request_body + fieldtype: Code + label: Request Body + description: Sample request body generated for testing, used when validating webhook + payload format before going live. + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Webhook document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabWebhook Data + description: '' + fields: + - name: fieldname + fieldtype: Select + label: Fieldname + description: Name of the field being monitored or mapped in the webhook, used + when filtering webhook triggers by specific field changes. + - name: key + fieldtype: Data + label: Key + description: Webhook parameter or header key name, used when searching for specific + webhook authentication keys or custom header configurations. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabWebhook Data). + Comparison-ready across parent records.' +- table: tabWebhook Header + description: '' + fields: + - name: key + fieldtype: Small Text + label: Key + description: HTTP header name to be sent with the webhook request, such as Authorization + or Content-Type. + - name: value + fieldtype: Small Text + label: Value + description: HTTP header value corresponding to the key, containing the actual + header data sent in webhook requests. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabWebhook Header). + Comparison-ready across parent records.' +- table: tabWebhook Request Log + description: '' + fields: + - name: webhook + fieldtype: Link + label: Webhook + description: Reference to the webhook configuration that generated this request, + used for filtering logs by webhook type. + join_hint: + table: tabWebhook + 'on': webhook = tabWebhook.name + - name: reference_document + fieldtype: Data + label: Reference Document + description: Source document that triggered the webhook execution, used for tracing + webhook calls back to originating transactions. + - name: headers + fieldtype: Code + label: Headers + description: HTTP headers sent with the webhook request, used for debugging authentication + and content-type issues. + - name: data + fieldtype: Code + label: Data + description: Payload or body content sent in the webhook request, used for reviewing + what data was transmitted to external systems. + - name: user + fieldtype: Link + label: User + description: User context under which the webhook was executed, used for auditing + webhook activity by user. + join_hint: + table: tabUser + 'on': user = tabUser.name + - name: url + fieldtype: Text + label: URL + description: Target endpoint URL where the webhook request was sent, used for + identifying destination systems and troubleshooting delivery issues. + - name: response + fieldtype: Code + label: Response + description: Stores the HTTP response body received from the webhook endpoint, + used to verify successful data delivery or diagnose integration failures. + - name: error + fieldtype: Text + label: Error + description: Contains error messages when webhook delivery fails, used to troubleshoot + connection issues, timeouts, or endpoint rejections. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Webhook Request Log document (master/transaction). Use + only for single-entity lookups, not cross-record comparison unless fields are + per-relationship (e.g. supplier, price_list).' +- table: tabWebsite Attribute + description: '' + fields: + - name: attribute + fieldtype: Link + label: Attribute + description: Name or type of the website attribute being defined for display on + the website. + join_hint: + table: tabItem Attribute + 'on': attribute = tabItem Attribute.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabWebsite Attribute). + Comparison-ready across parent records.' +- table: tabWebsite Filter Field + description: '' + fields: + - name: fieldname + fieldtype: Autocomplete + label: Fieldname + description: Name of the actual field being used for filtering website content + or products. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabWebsite Filter + Field). Comparison-ready across parent records.' +- table: tabWebsite Item Group + description: '' + fields: + - name: item_group + fieldtype: Link + label: Item Group + description: The product category or item group displayed on the website, used + to link inventory classifications to web storefront navigation. + join_hint: + table: tabItem Group + 'on': item_group = tabItem Group.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabWebsite Item Group). + Comparison-ready across parent records.' +- table: tabWebsite Meta Tag + description: '' + fields: + - name: key + fieldtype: Data + label: Key + description: Meta tag attribute name (e.g., description, keywords, og:title) used + for SEO and social sharing. + - name: value + fieldtype: Text + label: Value + description: Content or value assigned to the meta tag key for webpage metadata + and search engine optimization. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabWebsite Meta Tag). + Comparison-ready across parent records.' +- table: tabWebsite Route Meta + description: '' + fields: + - name: meta_tags + fieldtype: Table + label: Meta Tags + description: '' + child_hint: + child_table: tabWebsite Meta Tag + fieldname: meta_tags + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: meta_tags + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Website Route Meta document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabWebsite Route Redirect + description: '' + fields: + - name: source + fieldtype: Small Text + label: Source + description: Original URL path that should be redirected from. + - name: target + fieldtype: Small Text + label: Target + description: Destination URL path where traffic should be redirected to. + - name: redirect_http_status + fieldtype: Select + label: Redirect HTTP Status + description: HTTP status code used for the redirect, typically 301 for permanent + or 302 for temporary redirects. + options: + - '301' + - '302' + - '307' + - '308' + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabWebsite Route + Redirect). Comparison-ready across parent records.' +- table: tabWebsite Sidebar + description: '' + fields: + - name: title + fieldtype: Data + label: Title + description: Display name or heading shown for this sidebar section on the website. + - name: sidebar_items + fieldtype: Table + label: Sidebar Items + description: '' + child_hint: + child_table: tabWebsite Sidebar Item + fieldname: sidebar_items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: sidebar_items + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Website Sidebar document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabWebsite Sidebar Item + description: '' + fields: + - name: title + fieldtype: Data + label: Title + description: Display label shown for this sidebar navigation item to website visitors. + - name: route + fieldtype: Data + label: Route + description: URL path or link destination when users click this sidebar item. + - name: group + fieldtype: Data + label: Group + description: Category or section grouping for organizing related sidebar items + together. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabWebsite Sidebar + Item). Comparison-ready across parent records.' +- table: tabWebsite Slideshow + description: '' + fields: + - name: slideshow_name + fieldtype: Data + label: Slideshow Name + description: Display name of the slideshow used for identification and selection. + - name: slideshow_items + fieldtype: Table + label: Slideshow Items + description: '' + child_hint: + child_table: tabWebsite Slideshow Item + fieldname: slideshow_items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: slideshow_items + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Website Slideshow document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabWebsite Slideshow Item + description: '' + fields: + - name: heading + fieldtype: Data + label: Heading + description: Title or headline text shown on this slideshow slide. + - name: description + fieldtype: Text + label: Description + description: Descriptive text or caption content displayed on this slide. + - name: url + fieldtype: Data + label: URL + description: Hyperlink destination when users click on this slideshow slide. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabWebsite Slideshow + Item). Comparison-ready across parent records.' +- table: tabWebsite Theme + description: '' + fields: + - name: theme + fieldtype: Data + label: Theme + description: Name or identifier of the selected theme template applied to the + website. + - name: module + fieldtype: Link + label: Module + description: ERP module to which this website theme belongs for organizational + purposes. + join_hint: + table: tabModule Def + 'on': module = tabModule Def.name + - name: custom + fieldtype: Check + label: Custom? + description: Flag indicating whether this is a custom-created theme versus a standard + system theme. + - name: google_font + fieldtype: Data + label: Google Font + description: Google Fonts family name selected for typography in this website + theme. + - name: font_size + fieldtype: Data + label: Font Size + description: Base font size setting that controls text display across the themed + website. + - name: font_properties + fieldtype: Data + label: Font Properties + description: Additional font styling attributes like weight, line height, or letter + spacing for the theme. + - name: button_rounded_corners + fieldtype: Check + label: Button Rounded Corners + description: Indicates whether buttons use rounded corners in the website theme + styling. + - name: button_shadows + fieldtype: Check + label: Button Shadows + description: Indicates whether buttons display shadow effects in the website theme + design. + - name: button_gradients + fieldtype: Check + label: Button Gradients + description: Indicates whether buttons use gradient color fills in the website + theme appearance. + - name: primary_color + fieldtype: Link + label: Primary Color + description: Defines the main brand color used throughout the website theme for + primary elements and branding. + join_hint: + table: tabColor + 'on': primary_color = tabColor.name + - name: text_color + fieldtype: Link + label: Text Color + description: Specifies the default text color applied across the website theme + for readability and consistency. + join_hint: + table: tabColor + 'on': text_color = tabColor.name + - name: light_color + fieldtype: Link + label: Light Color + description: Defines the light shade color used in the website theme for backgrounds + and subtle elements. + join_hint: + table: tabColor + 'on': light_color = tabColor.name + - name: dark_color + fieldtype: Link + label: Dark Color + description: Defines the dark shade color used in the website theme for contrast + and emphasis elements. + join_hint: + table: tabColor + 'on': dark_color = tabColor.name + - name: background_color + fieldtype: Link + label: Background Color + description: Specifies the main background color applied to pages in the website + theme. + join_hint: + table: tabColor + 'on': background_color = tabColor.name + - name: custom_overrides + fieldtype: Code + label: Custom Overrides + description: Contains custom CSS property overrides that modify default website + theme styles without editing core files. + - name: custom_scss + fieldtype: Code + label: Custom SCSS + description: Stores custom SCSS code for advanced theme styling beyond standard + configuration options. + - name: ignored_apps + fieldtype: Table + label: Ignored Apps + description: '' + child_hint: + child_table: tabWebsite Theme Ignore App + fieldname: ignored_apps + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: ignored_apps + - name: theme_scss + fieldtype: Code + label: Theme + description: Contains the compiled SCSS stylesheet code that defines the complete + website theme appearance. + - name: theme_url + fieldtype: Data + label: Theme URL + description: References the location or identifier of the base theme template + being used for the website. + - name: js + fieldtype: Code + label: JavaScript + description: Contains custom JavaScript code that adds interactive functionality + to the website theme. + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Website Theme document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabWebsite Theme Ignore App + description: '' + fields: + - name: app + fieldtype: Data + label: App + description: Name of the application to be ignored or excluded from the website + theme. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabWebsite Theme + Ignore App). Comparison-ready across parent records.' +- table: tabWork Order + description: '' + fields: + - name: naming_series + fieldtype: Select + label: Series + description: Defines the format for generating unique identifiers for work orders. + options: + - MFG-WO-.YYYY.- + - name: status + fieldtype: Select + label: Status + description: Indicates the current state of the work order, essential for workflow + management. + options: + - Draft + - Submitted + - Not Started + - In Process + - Completed + - Stopped + - Closed + - Cancelled + - name: production_item + fieldtype: Link + label: Item To Manufacture + description: Specifies the item being produced, crucial for inventory and production + planning. + join_hint: + table: tabItem + 'on': production_item = tabItem.name + - name: item_name + fieldtype: Data + label: Item Name + description: Provides a descriptive name for the production item, aiding in clarity + and communication. + - name: bom_no + fieldtype: Link + label: BOM No + description: Links to the Bill of Materials, necessary for understanding the components + required for production. + join_hint: + table: tabBOM + 'on': bom_no = tabBOM.name + - name: sales_order + fieldtype: Link + label: Sales Order + description: Connects the work order to a specific sales order, important for + fulfilling customer demands. + join_hint: + table: tabSales Order + 'on': sales_order = tabSales Order.name + - name: company + fieldtype: Link + label: Company + description: Identifies the organization responsible for the work order, vital + for financial and operational reporting. + join_hint: + table: tabCompany + 'on': company = tabCompany.name + - name: qty + fieldtype: Float + label: Qty To Manufacture + description: Represents the total quantity to be produced, essential for resource + allocation and scheduling. + - name: material_transferred_for_manufacturing + fieldtype: Float + label: Material Transferred for Manufacturing + description: Tracks materials moved to production, important for inventory management + and cost control. + - name: produced_qty + fieldtype: Float + label: Manufactured Qty + description: Records the quantity successfully produced, key for performance evaluation + and reporting. + - name: disassembled_qty + fieldtype: Float + label: Disassembled Qty + description: Indicates the quantity of items disassembled, relevant for reverse + logistics and inventory accuracy. + - name: process_loss_qty + fieldtype: Float + label: Process Loss Qty + description: Measures the quantity lost during production, critical for efficiency + analysis and waste reduction. + - name: project + fieldtype: Link + label: Project + description: Associates the work order with a specific project, important for + project management and cost tracking. + join_hint: + table: tabProject + 'on': project = tabProject.name + - name: required_items + fieldtype: Table + label: Required Items + description: '' + child_hint: + child_table: tabWork Order Item + fieldname: required_items + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: required_items + - name: allow_alternative_item + fieldtype: Check + label: Allow Alternative Item + description: Indicates if alternative items can be used, crucial for flexibility + in inventory management. + - name: use_multi_level_bom + fieldtype: Check + label: Use Multi-Level BOM + description: Specifies if a multi-level bill of materials is utilized, important + for complex product assembly tracking. + - name: skip_transfer + fieldtype: Check + label: Skip Material Transfer to WIP Warehouse + description: Determines if the transfer of materials can be bypassed, relevant + for streamlining operations in urgent scenarios. + - name: from_wip_warehouse + fieldtype: Check + label: Backflush Raw Materials From Work-in-Progress Warehouse + description: Identifies the work-in-progress warehouse, essential for tracking + material flow during production. + - name: update_consumed_material_cost_in_project + fieldtype: Check + label: Update Consumed Material Cost In Project + description: Indicates if the cost of consumed materials should be updated in + the project, vital for accurate budgeting. + - name: source_warehouse + fieldtype: Link + label: Source Warehouse + description: Denotes the origin warehouse for materials, important for inventory + management and logistics. + join_hint: + table: tabWarehouse + 'on': source_warehouse = tabWarehouse.name + - name: wip_warehouse + fieldtype: Link + label: Work-in-Progress Warehouse + description: Specifies the warehouse for work-in-progress items, critical for + monitoring production status. + join_hint: + table: tabWarehouse + 'on': wip_warehouse = tabWarehouse.name + - name: fg_warehouse + fieldtype: Link + label: Target Warehouse + description: Indicates the finished goods warehouse, essential for managing inventory + of completed products. + join_hint: + table: tabWarehouse + 'on': fg_warehouse = tabWarehouse.name + - name: scrap_warehouse + fieldtype: Link + label: Scrap Warehouse + description: Identifies the warehouse for scrap materials, important for waste + management and cost control. + join_hint: + table: tabWarehouse + 'on': scrap_warehouse = tabWarehouse.name + - name: has_serial_no + fieldtype: Check + label: Has Serial No + description: Indicates if items have a serial number, crucial for tracking and + warranty management. + - name: has_batch_no + fieldtype: Check + label: Has Batch No + description: Specifies if items are tracked by batch number, important for quality + control and traceability. + - name: batch_size + fieldtype: Float + label: Batch Size + description: Defines the quantity of items in a batch, relevant for production + planning and efficiency. + - name: transfer_material_against + fieldtype: Select + label: Transfer Material Against + description: Indicates the reference for material transfer, important for accurate + record-keeping and accountability. + options: + - Work Order + - Job Card + - name: operations + fieldtype: Table + label: Operations + description: '' + child_hint: + child_table: tabWork Order Operation + fieldname: operations + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: operations + - name: planned_start_date + fieldtype: Datetime + label: Planned Start Date + description: Specifies the intended start date for the work order, critical for + scheduling and project timelines. + - name: planned_end_date + fieldtype: Datetime + label: Planned End Date + description: Used to determine the expected completion date of a work order for + scheduling and resource allocation. + - name: expected_delivery_date + fieldtype: Date + label: Expected Delivery Date + description: Indicates when materials are anticipated to arrive, impacting project + timelines and inventory management. + - name: actual_start_date + fieldtype: Datetime + label: Actual Start Date + description: Records the date when work on the order actually begins, essential + for tracking project progress. + - name: actual_end_date + fieldtype: Datetime + label: Actual End Date + description: Captures the date when the work order is completed, critical for + performance analysis and reporting. + - name: lead_time + fieldtype: Float + label: Lead Time + description: Reflects the time required to complete a work order, aiding in planning + and efficiency assessments. + - name: planned_operating_cost + fieldtype: Currency + label: Planned Operating Cost + description: Estimates the budgeted costs associated with executing the work order, + important for financial forecasting. + - name: actual_operating_cost + fieldtype: Currency + label: Actual Operating Cost + description: Records the real costs incurred during the work order execution, + necessary for cost control and analysis. + - name: additional_operating_cost + fieldtype: Currency + label: Additional Operating Cost + description: Accounts for unexpected expenses that arise during the work order, + impacting overall budget management. + - name: corrective_operation_cost + fieldtype: Currency + label: Corrective Operation Cost + description: Tracks costs associated with corrective actions taken during the + work order, important for quality control assessments. + - name: total_operating_cost + fieldtype: Currency + label: Total Operating Cost + description: Summarizes all costs related to the work order, providing a comprehensive + view for financial evaluation. + - name: description + fieldtype: Small Text + label: Item Description + description: Offers a brief overview of the work order's purpose, aiding in clarity + and communication among stakeholders. + - name: stock_uom + fieldtype: Link + label: Stock UOM + description: Defines the unit of measure for stock items, crucial for inventory + management and procurement processes. + join_hint: + table: tabUOM + 'on': stock_uom = tabUOM.name + - name: material_request + fieldtype: Link + label: Material Request + description: Links to the request for materials needed for the work order, essential + for ensuring resource availability. + join_hint: + table: tabMaterial Request + 'on': material_request = tabMaterial Request.name + - name: material_request_item + fieldtype: Data + label: Material Request Item + description: Specifies individual items requested for the work order, important + for detailed inventory tracking. + - name: sales_order_item + fieldtype: Data + label: Sales Order Item + description: Associates the work order with specific sales order items, facilitating + order fulfillment and customer satisfaction. + - name: production_plan + fieldtype: Link + label: Production Plan + description: This field indicates the specific production plan associated with + a work order, essential for tracking manufacturing schedules and resource allocation. + join_hint: + table: tabProduction Plan + 'on': production_plan = tabProduction Plan.name + - name: production_plan_item + fieldtype: Data + label: Production Plan Item + description: This field identifies the individual item within the production plan, + used to manage and monitor the progress of specific components in the production + process. + - name: production_plan_sub_assembly_item + fieldtype: Data + label: Production Plan Sub-assembly Item + description: This field denotes sub-assembly items linked to the production plan, + crucial for understanding the hierarchy and dependencies in the manufacturing + workflow. + - name: product_bundle_item + fieldtype: Link + label: Product Bundle Item + description: This field specifies items that are part of a product bundle, important + for sales and inventory management to ensure accurate fulfillment of bundled + orders. + join_hint: + table: tabItem + 'on': product_bundle_item = tabItem.name + - name: amended_from + fieldtype: Link + label: Amended From + description: This field indicates the original work order that has been amended, + vital for tracking changes and maintaining historical accuracy in production + records. + join_hint: + table: tabWork Order + 'on': amended_from = tabWork Order.name + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Work Order document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabWork Order Item + description: '' + fields: + - name: operation + fieldtype: Link + label: Operation + description: Links item to specific manufacturing operation or production step + where it is consumed + join_hint: + table: tabOperation + 'on': operation = tabOperation.name + - name: item_code + fieldtype: Link + label: Item Code + description: Material or component SKU required for manufacturing this work order + join_hint: + table: tabItem + 'on': item_code = tabItem.name + - name: source_warehouse + fieldtype: Link + label: Source Warehouse + description: Warehouse location from which raw material will be transferred for + production + join_hint: + table: tabWarehouse + 'on': source_warehouse = tabWarehouse.name + - name: item_name + fieldtype: Data + label: Item Name + description: Human-readable name of the material or component being consumed + - name: description + fieldtype: Text + label: Description + description: Additional details about the item specification or usage in this + work order + - name: allow_alternative_item + fieldtype: Check + label: Allow Alternative Item + description: Indicates whether substitute materials can be used if primary item + is unavailable + - name: include_item_in_manufacturing + fieldtype: Check + label: Include Item In Manufacturing + description: Controls whether this item is actively required in the production + process + - name: required_qty + fieldtype: Float + label: Required Qty + description: Total quantity of material needed to complete the work order + - name: stock_uom + fieldtype: Link + label: Stock UOM + description: Unit of measurement for tracking inventory and consumption of this + item + join_hint: + table: tabUOM + 'on': stock_uom = tabUOM.name + - name: rate + fieldtype: Currency + label: Rate + description: Unit cost or price of the material for calculating work order valuation + - name: amount + fieldtype: Currency + label: Amount + description: Total cost calculated as required quantity multiplied by rate + - name: transferred_qty + fieldtype: Float + label: Transferred Qty + description: Quantity of material moved from source warehouse to production floor + - name: consumed_qty + fieldtype: Float + label: Consumed Qty + description: Actual quantity of material used or issued during manufacturing + - name: returned_qty + fieldtype: Float + label: 'Returned Qty ' + description: Quantity of unused material sent back to source warehouse after production + - name: available_qty_at_source_warehouse + fieldtype: Float + label: Available Qty at Source Warehouse + description: Current stock level at the originating warehouse for material planning + - name: available_qty_at_wip_warehouse + fieldtype: Float + label: Available Qty at WIP Warehouse + description: Current stock level at work-in-progress warehouse during production + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabWork Order Item). + Comparison-ready across parent records.' +- table: tabWork Order Operation + description: '' + fields: + - name: operation + fieldtype: Link + label: Operation + description: Defines the type of task being performed, essential for analyzing + workflow efficiency. + join_hint: + table: tabOperation + 'on': operation = tabOperation.name + - name: status + fieldtype: Select + label: Status + description: Indicates the current state of the operation, crucial for monitoring + progress and resource allocation. + options: + - Pending + - Work in Progress + - Completed + - name: completed_qty + fieldtype: Float + label: Completed Qty + description: Tracks the quantity of items completed, important for assessing productivity + and meeting targets. + - name: process_loss_qty + fieldtype: Float + label: Process Loss Qty + description: Records the quantity lost during processing, vital for identifying + inefficiencies and improving yield. + - name: bom + fieldtype: Link + label: BOM + description: Links to the bill of materials, necessary for ensuring the correct + components are used in production. + join_hint: + table: tabBOM + 'on': bom = tabBOM.name + - name: workstation_type + fieldtype: Link + label: Workstation Type + description: Specifies the category of workstation, important for resource planning + and operational analysis. + join_hint: + table: tabWorkstation Type + 'on': workstation_type = tabWorkstation Type.name + - name: workstation + fieldtype: Link + label: Workstation + description: Identifies the specific workstation where the operation occurs, essential + for tracking performance and capacity. + join_hint: + table: tabWorkstation + 'on': workstation = tabWorkstation.name + - name: sequence_id + fieldtype: Int + label: Sequence ID + description: Determines the order of operations, critical for maintaining workflow + and scheduling. + - name: description + fieldtype: Text Editor + label: Operation Description + description: Provides additional context about the operation, useful for clarifying + tasks and responsibilities. + - name: planned_start_time + fieldtype: Datetime + label: Planned Start Time + description: Indicates when the operation is scheduled to begin, important for + planning and resource allocation. + - name: hour_rate + fieldtype: Float + label: Hour Rate + description: Represents the labor cost per hour, essential for budgeting and cost + analysis. + - name: time_in_mins + fieldtype: Float + label: Time + description: Tracks the duration of the operation in minutes, crucial for efficiency + assessments and scheduling. + - name: planned_end_time + fieldtype: Datetime + label: Planned End Time + description: Specifies when the operation is expected to finish, important for + meeting deadlines and planning resources. + - name: batch_size + fieldtype: Float + label: Batch Size + description: Defines the number of units to be processed in one batch, critical + for production planning and inventory management. + - name: planned_operating_cost + fieldtype: Currency + label: Planned Operating Cost + description: Used to estimate budget requirements for operations before execution. + - name: actual_start_time + fieldtype: Datetime + label: Actual Start Time + description: Indicates when the operation commenced, crucial for tracking delays + and performance. + - name: actual_operation_time + fieldtype: Float + label: Actual Operation Time + description: Measures the duration of the operation, essential for efficiency + analysis. + - name: actual_end_time + fieldtype: Datetime + label: Actual End Time + description: Marks the completion time of the operation, important for scheduling + and reporting. + - name: actual_operating_cost + fieldtype: Currency + label: Actual Operating Cost + description: Reflects the real expenses incurred during the operation, vital for + financial assessments. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabWork Order Operation). + Comparison-ready across parent records.' +- table: tabWorkflow + description: '' + fields: + - name: workflow_name + fieldtype: Data + label: Workflow Name + description: Display name of the workflow, used when searching or selecting workflows + for document types. + - name: document_type + fieldtype: Link + label: Document Type + description: DocType this workflow applies to, used when finding which workflow + controls a specific document. + join_hint: + table: tabDocType + 'on': document_type = tabDocType.name + - name: is_active + fieldtype: Check + label: Is Active + description: Flag indicating if workflow is currently enabled, used to filter + operational workflows. + - name: override_status + fieldtype: Check + label: Don't Override Status + description: Flag indicating if workflow overrides default document status behavior, + used for custom state management. + - name: send_email_alert + fieldtype: Check + label: Send Email Alert + description: Flag indicating if email notifications are sent on workflow transitions, + used for communication settings. + - name: states + fieldtype: Table + label: Document States + description: '' + child_hint: + child_table: tabWorkflow Document State + fieldname: states + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: states + - name: transitions + fieldtype: Table + label: Transitions + description: '' + child_hint: + child_table: tabWorkflow Transition + fieldname: transitions + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: transitions + - name: workflow_state_field + fieldtype: Data + label: Workflow State Field + description: Identifies which field stores the current workflow status, used when + querying records by their approval or process state. + - name: workflow_data + fieldtype: JSON + label: Workflow Data + description: Contains metadata about workflow configuration and execution history, + used when auditing workflow behavior or troubleshooting process issues. + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Workflow document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabWorkflow Action + description: '' + fields: + - name: status + fieldtype: Select + label: Status + description: Current state of the workflow action (pending, approved, rejected), + used when filtering actions by completion status. + options: + - Open + - Completed + - name: reference_name + fieldtype: Dynamic Link + label: Reference Name + description: Name of the specific document instance being processed, used when + tracking workflow actions for particular records. + - name: reference_doctype + fieldtype: Link + label: Reference Document Type + description: Type of document this workflow action applies to, used when filtering + workflow actions by document category. + join_hint: + table: tabDocType + 'on': reference_doctype = tabDocType.name + - name: workflow_state + fieldtype: Data + label: Workflow State + description: Current workflow state of the document at this action, used when + analyzing which approval stage documents are in. + - name: completed_by_role + fieldtype: Link + label: Completed By Role + description: Role that completed this workflow action, relevant when analyzing + which departments or functions handle specific workflow steps. + join_hint: + table: tabRole + 'on': completed_by_role = tabRole.name + - name: completed_by + fieldtype: Link + label: Completed By User + description: Specific user who completed this workflow action, used when tracking + individual accountability in approval processes. + join_hint: + table: tabUser + 'on': completed_by = tabUser.name + - name: permitted_roles + fieldtype: Table MultiSelect + label: Permitted Roles + description: Used to filter or verify which roles have authorization to execute + or view a specific workflow action. + child_hint: + child_table: tabWorkflow Action Permitted Role + fieldname: permitted_roles + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: permitted_roles + - name: user + fieldtype: Link + label: User + description: Used to identify which specific user initiated, is assigned to, or + is responsible for a workflow action. + join_hint: + table: tabUser + 'on': user = tabUser.name + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Workflow Action document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabWorkflow Action Master + description: '' + fields: + - name: workflow_action_name + fieldtype: Data + label: Workflow Action Name + description: Display name of the workflow action (e.g., Approve, Reject, Submit), + used when searching for specific action types across workflows. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Workflow Action Master document (master/transaction). Use + only for single-entity lookups, not cross-record comparison unless fields are + per-relationship (e.g. supplier, price_list).' +- table: tabWorkflow Action Permitted Role + description: '' + fields: + - name: role + fieldtype: Link + label: Role + description: The specific user role that is permitted to execute this workflow + action. + join_hint: + table: tabRole + 'on': role = tabRole.name + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabWorkflow Action + Permitted Role). Comparison-ready across parent records.' +- table: tabWorkflow Document State + description: '' + fields: + - name: state + fieldtype: Link + label: State + description: Name of the workflow state that documents can be in. + join_hint: + table: tabWorkflow State + 'on': state = tabWorkflow State.name + - name: doc_status + fieldtype: Select + label: Doc Status + description: Document status value (draft/submitted/cancelled) that applies when + document reaches this state. + options: + - '0' + - '1' + - '2' + - name: update_field + fieldtype: Select + label: Update Field + description: Field name to be automatically updated when document enters this + state. + - name: update_value + fieldtype: Data + label: Update Value + description: Value to set in the update field when document transitions to this + state. + - name: is_optional_state + fieldtype: Check + label: Is Optional State + description: Indicates if this workflow state can be skipped during document progression. + - name: avoid_status_override + fieldtype: Check + label: Don't Override Status + description: Prevents automatic status field updates when document enters this + state. + - name: next_action_email_template + fieldtype: Link + label: Next Action Email Template + description: Email template used when notifying users about the next required + action in the workflow approval process. + join_hint: + table: tabEmail Template + 'on': next_action_email_template = tabEmail Template.name + - name: allow_edit + fieldtype: Link + label: Only Allow Edit For + description: Controls whether users can modify the document while it is in this + particular workflow state. + join_hint: + table: tabRole + 'on': allow_edit = tabRole.name + - name: send_email + fieldtype: Check + label: Send Email On State + description: Determines if an automated email notification should be sent when + the document transitions to this workflow state. + - name: message + fieldtype: Text + label: Message + description: Custom message or instructions displayed to users when the document + reaches this workflow state. + - name: workflow_builder_id + fieldtype: Data + label: Workflow Builder ID + description: Links this workflow state to its parent workflow configuration in + the workflow builder. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabWorkflow Document + State). Comparison-ready across parent records.' +- table: tabWorkflow State + description: '' + fields: + - name: workflow_state_name + fieldtype: Data + label: State + description: Display name of the workflow state used in status queries and filtering + documents by approval stage. + - name: icon + fieldtype: Select + label: Icon + description: Visual icon identifier for the workflow state in UI displays. + options: + - glass + - music + - search + - envelope + - heart + - star + - star-empty + - user + - film + - th-large + - th + - th-list + - ok + - remove + - zoom-in + - zoom-out + - 'off' + - signal + - cog + - trash + - home + - file + - time + - road + - download-alt + - download + - upload + - inbox + - play-circle + - repeat + - refresh + - list-alt + - lock + - flag + - headphones + - volume-off + - volume-down + - volume-up + - qrcode + - barcode + - tag + - tags + - book + - bookmark + - print + - camera + - font + - bold + - italic + - text-height + - text-width + - align-left + - align-center + - align-right + - align-justify + - list + - indent-left + - indent-right + - facetime-video + - picture + - pencil + - map-marker + - adjust + - tint + - edit + - share + - check + - move + - step-backward + - fast-backward + - backward + - play + - pause + - stop + - forward + - fast-forward + - step-forward + - eject + - chevron-left + - chevron-right + - plus-sign + - minus-sign + - remove-sign + - ok-sign + - question-sign + - info-sign + - screenshot + - remove-circle + - ok-circle + - ban-circle + - arrow-left + - arrow-right + - arrow-up + - arrow-down + - share-alt + - resize-full + - resize-small + - plus + - minus + - asterisk + - exclamation-sign + - gift + - leaf + - fire + - eye-open + - eye-close + - warning-sign + - plane + - calendar + - random + - comment + - magnet + - chevron-up + - chevron-down + - retweet + - shopping-cart + - folder-close + - folder-open + - resize-vertical + - resize-horizontal + - hdd + - bullhorn + - bell + - certificate + - thumbs-up + - thumbs-down + - hand-right + - hand-left + - hand-up + - hand-down + - circle-arrow-right + - circle-arrow-left + - circle-arrow-up + - circle-arrow-down + - globe + - wrench + - tasks + - filter + - briefcase + - fullscreen + - name: style + fieldtype: Select + label: Style + description: CSS styling or color coding for the workflow state used in visual + status indicators. + options: + - Primary + - Info + - Success + - Warning + - Danger + - Inverse + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Workflow State document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabWorkflow Transition + description: '' + fields: + - name: state + fieldtype: Link + label: State + description: The current workflow state from which this transition starts. + join_hint: + table: tabWorkflow State + 'on': state = tabWorkflow State.name + - name: action + fieldtype: Link + label: Action + description: The action label or button text that triggers this state transition. + join_hint: + table: tabWorkflow Action Master + 'on': action = tabWorkflow Action Master.name + - name: next_state + fieldtype: Link + label: Next State + description: The target workflow state that the document moves to after this transition. + join_hint: + table: tabWorkflow State + 'on': next_state = tabWorkflow State.name + - name: allowed + fieldtype: Link + label: Allowed + description: Role or user group permitted to execute this workflow transition. + join_hint: + table: tabRole + 'on': allowed = tabRole.name + - name: allow_self_approval + fieldtype: Check + label: Allow Self Approval + description: Whether the document owner can approve their own submission in this + transition. + - name: send_email_to_creator + fieldtype: Check + label: Send Email To Creator + description: Whether to notify the document creator when this transition occurs. + - name: condition + fieldtype: Code + label: Condition + description: Defines the business rule or criteria that must be met for a workflow + to transition from one state to another, used when analyzing approval logic + or automated process flows. + - name: workflow_builder_id + fieldtype: Data + label: Workflow Builder ID + description: Links to the workflow configuration template, used when identifying + which workflow design governs this transition or when analyzing workflow version + history. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabWorkflow Transition). + Comparison-ready across parent records.' +- table: tabWorkspace + description: '' + fields: + - name: label + fieldtype: Data + label: Name + description: Display name or menu label for the workspace, used when searching + for workspaces by their visible title. + - name: title + fieldtype: Data + label: Title + description: Full descriptive title of the workspace, used for workspace identification + and search queries. + - name: sequence_id + fieldtype: Float + label: Sequence Id + description: Numeric ordering value for workspace arrangement, used to control + the display sequence in navigation menus. + - name: for_user + fieldtype: Data + label: For User + description: Specific user this workspace is assigned to, used when filtering + personalized or user-specific workspaces. + - name: parent_page + fieldtype: Data + label: Parent Page + description: Parent workspace or page this workspace belongs under, used for hierarchical + navigation and workspace grouping. + - name: module + fieldtype: Link + label: Module + description: ERP module this workspace belongs to (e.g., Sales, Accounting), used + when filtering workspaces by functional area. + join_hint: + table: tabModule Def + 'on': module = tabModule Def.name + - name: indicator_color + fieldtype: Select + label: Indicator Color + description: Color coding used to visually distinguish workspace status or priority + in dashboards and workspace lists. + options: + - green + - cyan + - blue + - orange + - yellow + - gray + - grey + - red + - pink + - darkgrey + - purple + - light-blue + - name: restrict_to_domain + fieldtype: Link + label: Restrict to Domain + description: Domain restriction setting used when filtering workspaces by access + control or multi-tenant security requirements. + join_hint: + table: tabDomain + 'on': restrict_to_domain = tabDomain.name + - name: hide_custom + fieldtype: Check + label: Hide Custom DocTypes and Reports + description: Flag indicating whether custom elements are hidden, relevant when + users query workspace customization visibility. + - name: public + fieldtype: Check + label: Public + description: Public access flag used to filter workspaces available to all users + versus restricted workspaces. + - name: is_hidden + fieldtype: Check + label: Is Hidden + description: Visibility status used when determining which workspaces appear in + user navigation or workspace directories. + - name: content + fieldtype: Long Text + label: Content + description: Main workspace content or description searched when users look for + workspaces by topic or purpose. + - name: number_cards + fieldtype: Table + label: Number Cards + description: '' + child_hint: + child_table: tabWorkspace Number Card + fieldname: number_cards + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: number_cards + - name: charts + fieldtype: Table + label: Charts + description: '' + child_hint: + child_table: tabWorkspace Chart + fieldname: charts + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: charts + - name: shortcuts + fieldtype: Table + label: Shortcuts + description: '' + child_hint: + child_table: tabWorkspace Shortcut + fieldname: shortcuts + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: shortcuts + - name: links + fieldtype: Table + label: Links + description: '' + child_hint: + child_table: tabWorkspace Link + fieldname: links + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: links + - name: quick_lists + fieldtype: Table + label: Quick Lists + description: '' + child_hint: + child_table: tabWorkspace Quick List + fieldname: quick_lists + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: quick_lists + - name: custom_blocks + fieldtype: Table + label: Custom Blocks + description: '' + child_hint: + child_table: tabWorkspace Custom Block + fieldname: custom_blocks + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: custom_blocks + - name: roles + fieldtype: Table + label: Roles + description: '' + child_hint: + child_table: tabHas Role + fieldname: roles + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: roles + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Workspace document (master/transaction). Use only for single-entity + lookups, not cross-record comparison unless fields are per-relationship (e.g. + supplier, price_list).' +- table: tabWorkspace Chart + description: '' + fields: + - name: chart_name + fieldtype: Link + label: Chart Name + description: Technical name or identifier of the chart type being displayed in + the workspace. + join_hint: + table: tabDashboard Chart + 'on': chart_name = tabDashboard Chart.name + - name: label + fieldtype: Data + label: Label + description: User-facing display name for the chart shown in the workspace interface. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabWorkspace Chart). + Comparison-ready across parent records.' +- table: tabWorkspace Custom Block + description: '' + fields: + - name: custom_block_name + fieldtype: Link + label: Custom Block Name + description: Technical name or identifier of the custom block being added to the + workspace. + join_hint: + table: tabCustom HTML Block + 'on': custom_block_name = tabCustom HTML Block.name + - name: label + fieldtype: Data + label: Label + description: Display label shown to users for this custom block in the workspace + interface. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabWorkspace Custom + Block). Comparison-ready across parent records.' +- table: tabWorkspace Link + description: '' + fields: + - name: type + fieldtype: Select + label: Type + description: Category or grouping type for organizing workspace links. + options: + - Link + - Card Break + - name: label + fieldtype: Data + label: Label + description: Display text shown to users for this workspace link. + - name: icon + fieldtype: Data + label: Icon + description: Visual icon identifier displayed alongside the workspace link. + - name: hidden + fieldtype: Check + label: Hidden + description: Flag indicating whether this workspace link is visible to users. + - name: link_type + fieldtype: Select + label: Link Type + description: Target document type or resource that this workspace link points + to. + options: + - DocType + - Page + - Report + - name: link_to + fieldtype: Dynamic Link + label: Link To + description: Specifies the target DocType that this workspace link navigates to + when clicked. + - name: report_ref_doctype + fieldtype: Link + label: Report Ref DocType + description: References the DocType that a report is based on, used to identify + which module or entity the report analyzes. + join_hint: + table: tabDocType + 'on': report_ref_doctype = tabDocType.name + - name: dependencies + fieldtype: Data + label: Dependencies + description: Lists prerequisite modules or features required for this workspace + link to function properly. + - name: only_for + fieldtype: Link + label: Only for + description: Restricts workspace link visibility to specific user roles or user + types. + join_hint: + table: tabCountry + 'on': only_for = tabCountry.name + - name: onboard + fieldtype: Check + label: Onboard + description: Indicates whether this link appears in onboarding workflows for new + users. + - name: is_query_report + fieldtype: Check + label: Is Query Report + description: Flags whether the link opens a query-based report rather than a standard + report or DocType. + - name: link_count + fieldtype: Int + label: Link Count + description: Tracks the number of times this workspace link has been accessed + by users. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabWorkspace Link). + Comparison-ready across parent records.' +- table: tabWorkspace Number Card + description: '' + fields: + - name: number_card_name + fieldtype: Link + label: Number Card Name + description: Reference to the specific number card being displayed in this workspace. + join_hint: + table: tabNumber Card + 'on': number_card_name = tabNumber Card.name + - name: label + fieldtype: Data + label: Label + description: Custom display label for the number card shown in the workspace interface. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabWorkspace Number + Card). Comparison-ready across parent records.' +- table: tabWorkspace Quick List + description: '' + fields: + - name: document_type + fieldtype: Link + label: DocType + description: The DocType that this quick list entry links to, defining which module + or form it provides quick access to. + join_hint: + table: tabDocType + 'on': document_type = tabDocType.name + - name: label + fieldtype: Data + label: Label + description: Display text shown to users for this quick list item, used for navigation + and user interface presentation. + - name: quick_list_filter + fieldtype: Code + label: Quick List Filter + description: Predefined filter criteria applied when accessing the document type + through this quick list entry. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabWorkspace Quick + List). Comparison-ready across parent records.' +- table: tabWorkspace Shortcut + description: '' + fields: + - name: type + fieldtype: Select + label: Type + description: Category of shortcut such as Link, Report, or Dashboard used for + filtering shortcut types. + options: + - DocType + - Report + - Page + - Dashboard + - URL + - name: link_to + fieldtype: Dynamic Link + label: Link To + description: Target DocType or module that this shortcut navigates to when clicked. + - name: url + fieldtype: Data + label: URL + description: Custom URL path for shortcuts that link to external pages or specific + routes. + - name: doc_view + fieldtype: Select + label: DocType View + description: Specific view type like List, Report, or Tree applied when opening + the linked document. + options: + - List + - Report Builder + - Dashboard + - Tree + - New + - Calendar + - Kanban + - name: kanban_board + fieldtype: Link + label: Kanban Board + description: Kanban board configuration linked to this shortcut for project or + task views. + join_hint: + table: tabKanban Board + 'on': kanban_board = tabKanban Board.name + - name: label + fieldtype: Data + label: Label + description: Display text shown to users for this workspace shortcut. + - name: icon + fieldtype: Data + label: Icon + description: Visual identifier used when searching for or displaying workspace + shortcuts in the UI. + - name: restrict_to_domain + fieldtype: Link + label: Restrict to Domain + description: Domain restriction filter used when determining which shortcuts are + available to users based on their assigned domain. + join_hint: + table: tabDomain + 'on': restrict_to_domain = tabDomain.name + - name: report_ref_doctype + fieldtype: Link + label: Report Ref DocType + description: Reference to the source document type used when the shortcut links + to a report for navigation or analytics purposes. + join_hint: + table: tabDocType + 'on': report_ref_doctype = tabDocType.name + - name: stats_filter + fieldtype: Code + label: Count Filter + description: Filter criteria applied when calculating or displaying statistical + metrics on the workspace shortcut card. + - name: format + fieldtype: Data + label: Format + description: Display format specification used when rendering the shortcut's appearance + or layout type in the workspace. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabWorkspace Shortcut). + Comparison-ready across parent records.' +- table: tabWorkstation + description: '' + fields: + - name: workstation_name + fieldtype: Data + label: Workstation Name + description: The designated name of the workstation, used for easy reference in + production planning. + - name: workstation_type + fieldtype: Link + label: Workstation Type + description: Indicates the category of the workstation, helping to determine its + specific function in the production process. + join_hint: + table: tabWorkstation Type + 'on': workstation_type = tabWorkstation Type.name + - name: plant_floor + fieldtype: Link + label: Plant Floor + description: Specifies the location of the workstation within the plant, crucial + for optimizing workflow and layout. + join_hint: + table: tabPlant Floor + 'on': plant_floor = tabPlant Floor.name + - name: production_capacity + fieldtype: Int + label: Job Capacity + description: Represents the maximum output of the workstation, vital for capacity + planning and resource allocation. + - name: warehouse + fieldtype: Link + label: Warehouse + description: Identifies the associated warehouse for inventory management and + logistics coordination. + join_hint: + table: tabWarehouse + 'on': warehouse = tabWarehouse.name + - name: status + fieldtype: Select + label: Status + description: Indicates the operational status of the workstation, important for + maintenance scheduling and production continuity. + options: + - Production + - 'Off' + - Idle + - Problem + - Maintenance + - Setup + - name: hour_rate_electricity + fieldtype: Currency + label: Electricity Cost + description: The cost of electricity per hour, used for calculating operational + expenses and budgeting. + - name: hour_rate_consumable + fieldtype: Currency + label: Consumable Cost + description: The hourly cost of consumables, necessary for accurate cost analysis + and pricing strategies. + - name: hour_rate_rent + fieldtype: Currency + label: Rent Cost + description: The hourly rental cost of the workstation, important for financial + assessments and profitability calculations. + - name: hour_rate_labour + fieldtype: Currency + label: Wages + description: The hourly labor cost associated with the workstation, critical for + labor cost management and forecasting. + - name: hour_rate + fieldtype: Currency + label: Net Hour Rate + description: The total hourly cost of operating the workstation, essential for + comprehensive cost analysis. + - name: description + fieldtype: Text + label: Description + description: A brief overview of the workstation's capabilities, useful for understanding + its role in production. + - name: holiday_list + fieldtype: Link + label: Holiday List + description: A list of holidays affecting workstation operation, important for + scheduling and workforce planning. + join_hint: + table: tabHoliday List + 'on': holiday_list = tabHoliday List.name + - name: working_hours + fieldtype: Table + label: Working Hours + description: '' + child_hint: + child_table: tabWorkstation Working Hour + fieldname: working_hours + join_rules: + parent: parent document name + parenttype: parent DocType + parentfield: working_hours + - name: total_working_hours + fieldtype: Float + label: Total Working Hours + description: This field is used to assess employee productivity and operational + efficiency by tracking the total hours worked over a specific period. + desc_done: false + is_table: false + grain: 'GRAIN: 1 row per Workstation document (master/transaction). Use only for + single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabWorkstation Type + description: '' + fields: + - name: workstation_type + fieldtype: Data + label: Workstation Type + description: Categorizes the workstation to analyze performance and cost efficiency. + - name: hour_rate_electricity + fieldtype: Currency + label: Electricity Cost + description: Represents the cost of electricity per hour, crucial for budgeting + operational expenses. + - name: hour_rate_consumable + fieldtype: Currency + label: Consumable Cost + description: Indicates the cost of consumables per hour, important for calculating + total production costs. + - name: hour_rate_rent + fieldtype: Currency + label: Rent Cost + description: Reflects the hourly rental cost of the workstation, essential for + financial forecasting. + - name: hour_rate_labour + fieldtype: Currency + label: Wages + description: Denotes the labor cost per hour associated with the workstation, + vital for labor cost analysis. + - name: hour_rate + fieldtype: Currency + label: Net Hour Rate + description: Summarizes the total hourly cost of operating the workstation, used + for profitability assessments. + - name: description + fieldtype: Small Text + label: Description + description: Provides additional context about the workstation, aiding in decision-making + and resource allocation. + desc_done: true + is_table: false + grain: 'GRAIN: 1 row per Workstation Type document (master/transaction). Use only + for single-entity lookups, not cross-record comparison unless fields are per-relationship + (e.g. supplier, price_list).' +- table: tabWorkstation Working Hour + description: '' + fields: + - name: start_time + fieldtype: Time + label: Start Time + description: Indicates the beginning of the operational hours for scheduling and + resource allocation. + - name: hours + fieldtype: Float + label: Hours + description: Represents the total duration of operation, essential for capacity + planning and efficiency analysis. + - name: end_time + fieldtype: Time + label: End Time + description: Marks the conclusion of the operational hours, critical for shift + management and reporting. + - name: enabled + fieldtype: Check + label: Enabled + description: Indicates whether the workstation is active, important for operational + readiness and resource management. + desc_done: true + is_table: true + grain: 'GRAIN: 1 row per parent document + idx (child table of tabWorkstation Working + Hour). Comparison-ready across parent records.' diff --git a/changai/changai/api/v2/text2sql_pipeline_v2.py b/changai/changai/api/v2/text2sql_pipeline_v2.py index 0d0a2df..15d2fe9 100644 --- a/changai/changai/api/v2/text2sql_pipeline_v2.py +++ b/changai/changai/api/v2/text2sql_pipeline_v2.py @@ -124,6 +124,59 @@ def get_cud_prompt(cud_type, formatted_q, context): raise ValueError(f"Unsupported CUD type: {cud_type}") +@frappe.whitelist(allow_guest=True) +def create_refresh_token( refresh_token): + """ + Create a new access token using a refresh token. + + Args: + refresh_token: Refresh token string + + Returns: + Response with new token data or error message + """ + url = f"{frappe.local.conf.host_name}/api/method/frappe.integrations.oauth2.get_token" + + payload = f"grant_type=refresh_token&refresh_token={refresh_token}" + headers = {"Content-Type": "application/x-www-form-urlencoded"} + + try: + response = requests.post(url, headers=headers, data=payload, files=[]) + + if response.status_code == 200: + try: + message_json = json.loads(response.text) + new_message = { + "access_token": message_json["access_token"], + "expires_in": message_json["expires_in"], + "token_type": message_json["token_type"], + "scope": message_json["scope"], + "refresh_token": message_json["refresh_token"], + } + + return Response( + json.dumps({"data": new_message}), + status=200, + mimetype="application/json", + ) + except json.JSONDecodeError as e: + return Response( + json.dumps({"data": f"Error decoding JSON: {e}"}), + status=401, + mimetype="application/json", + ) + else: + return Response( + json.dumps({"data": response.text}), + status=401, + mimetype="application/json" + ) + except Exception as e: + return Response( + json.dumps({"data": f"Error: {str(e)}"}), + status=500, + mimetype="application/json" + ) @frappe.whitelist(allow_guest=True) # nosemgrep: security.guest-whitelisted-method - intentional, validates credentials via OAuth client lookup and Frappe password grant before returning a token def generate_token_secure(api_key: str, api_secret: str, app_key: str): diff --git a/changai/changai/doctype/changai_settings/changai_settings.js b/changai/changai/doctype/changai_settings/changai_settings.js index 5549758..ffedebb 100644 --- a/changai/changai/doctype/changai_settings/changai_settings.js +++ b/changai/changai/doctype/changai_settings/changai_settings.js @@ -199,7 +199,7 @@ frappe.ui.form.on("ChangAI Settings", { update_schema_file(frm) { frappe.call({ - method: "changai.changai.api.v2.auto_gen_api.sync_schema_and_enqueue_descriptions", + method: "changai.changai.api.v2.auto_gen_api.schema_sync", freeze: true, freeze_message: "Syncing schema...", callback(r) { diff --git a/changai/hooks.py b/changai/hooks.py index 4d30b11..053ebbc 100644 --- a/changai/hooks.py +++ b/changai/hooks.py @@ -118,7 +118,7 @@ # before_install = "changai.setup.install.install_system_deps" # after_install = "changai.changai.api.v2.install.after_install" -# after_migrate = "changai.changai.api.v2.install.after_migrate" +# after_migrate = "changai.changai.api.v2.auto_gen_api.rebuild_masterdata_after_migrate" # Uninstallation # ------------ @@ -169,12 +169,33 @@ # Document Events # --------------- # Hook on document methods and events +master_dts_to_sync = ["Customer", "Item", "Supplier", "Warehouse", "Account"] +schema_dts_to_sync = ["DocType", "Property Setter", "Custom Field"] +master_dts_events = { + dt: { + "after_insert": "changai.changai.api.v2.auto_gen_api.update_masterdata", + "on_update": "changai.changai.api.v2.auto_gen_api.update_masterdata", + "on_trash": "changai.changai.api.v2.auto_gen_api.update_masterdata", + } + for dt in master_dts_to_sync +} + +schema_dts_events = { + dt: { + "after_insert": "changai.changai.api.v2.auto_gen_api.schema_sync", + "on_update": "changai.changai.api.v2.auto_gen_api.schema_sync", + "on_trash": "changai.changai.api.v2.auto_gen_api.schema_sync", + } + for dt in schema_dts_to_sync +} doc_events = { -"Employee": { + "Employee": { "on_update": "changai.changai.api.v2.create_qr.create_qr_code", + }, + **master_dts_events, + **schema_dts_events, - } # "File":{"after_insert":"changai.changai.api.v2.gdoc_ai.on_file_upload"} # # "*": { # # "on_update": "method", diff --git a/changai/patches.txt b/changai/patches.txt index f15c3a9..73efa6f 100644 --- a/changai/patches.txt +++ b/changai/patches.txt @@ -3,4 +3,4 @@ # Read docs to understand patches: https://frappeframework.com/docs/v14/user/en/database-migrations [post_model_sync] -# Patches added in this section will be executed after doctypes are migrated \ No newline at end of file +# Patches added in this section will be executed after doctypes are migrated diff --git a/changai/public/dist/changai-chatbot.js b/changai/public/dist/changai-chatbot.js index bc9d5ba..f7746dd 100644 --- a/changai/public/dist/changai-chatbot.js +++ b/changai/public/dist/changai-chatbot.js @@ -1,69 +1,75 @@ -var vd=Object.defineProperty;var _d=(Pt,le,mt)=>le in Pt?vd(Pt,le,{enumerable:!0,configurable:!0,writable:!0,value:mt}):Pt[le]=mt;var ve=(Pt,le,mt)=>_d(Pt,typeof le!="symbol"?le+"":le,mt);(function(){"use strict";var Fs;function Pt(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const le={},mt=[],Jt=()=>{},Do=()=>!1,ts=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Hs=e=>e.startsWith("onUpdate:"),bt=Object.assign,Jr=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},No=Object.prototype.hasOwnProperty,me=(e,t)=>No.call(e,t),Q=Array.isArray,hn=e=>ns(e)==="[object Map]",ei=e=>ns(e)==="[object Set]",be=e=>typeof e=="function",Ce=e=>typeof e=="string",Ut=e=>typeof e=="symbol",Re=e=>e!==null&&typeof e=="object",ti=e=>(Re(e)||be(e))&&be(e.then)&&be(e.catch),ni=Object.prototype.toString,ns=e=>ni.call(e),Fo=e=>ns(e).slice(8,-1),si=e=>ns(e)==="[object Object]",zs=e=>Ce(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Pn=Pt(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ss=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Bo=/-(\w)/g,jt=ss(e=>e.replace(Bo,(t,n)=>n?n.toUpperCase():"")),Ho=/\B([A-Z])/g,en=ss(e=>e.replace(Ho,"-$1").toLowerCase()),ri=ss(e=>e.charAt(0).toUpperCase()+e.slice(1)),Us=ss(e=>e?`on${ri(e)}`:""),Vt=(e,t)=>!Object.is(e,t),rs=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},Vs=e=>{const t=parseFloat(e);return isNaN(t)?e:t},zo=e=>{const t=Ce(e)?Number(e):NaN;return isNaN(t)?e:t};let ii;const is=()=>ii||(ii=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});function qs(e){if(Q(e)){const t={};for(let n=0;n{if(n){const s=n.split(jo);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function we(e){let t="";if(Ce(e))t=e;else if(Q(e))for(let n=0;n!!(e&&e.__v_isRef===!0),et=e=>Ce(e)?e:e==null?"":Q(e)||Re(e)&&(e.toString===ni||!be(e.toString))?oi(e)?et(e.value):JSON.stringify(e,ai,2):String(e),ai=(e,t)=>oi(t)?ai(e,t.value):hn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],i)=>(n[Ws(s,i)+" =>"]=r,n),{})}:ei(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Ws(n))}:Ut(t)?Ws(t):Re(t)&&!Q(t)&&!si(t)?String(t):t,Ws=(e,t="")=>{var n;return Ut(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};let tt;class Go{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=tt,!t&&tt&&(this.index=(tt.scopes||(tt.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0&&--this._on===0&&(tt=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n0)return;if(On){let t=On;for(On=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;In;){let t=In;for(In=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function pi(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function di(e){let t,n=e.depsTail,s=n;for(;s;){const r=s.prevDep;s.version===-1?(s===n&&(n=r),Xs(s),Yo(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}e.deps=t,e.depsTail=n}function Zs(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(hi(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function hi(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Mn)||(e.globalVersion=Mn,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Zs(e))))return;e.flags|=2;const t=e.dep,n=_e,s=xt;_e=e,xt=!0;try{pi(e);const r=e.fn(e._value);(t.version===0||Vt(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{_e=n,xt=s,di(e),e.flags&=-3}}function Xs(e,t=!1){const{dep:n,prevSub:s,nextSub:r}=e;if(s&&(s.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)Xs(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Yo(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let xt=!0;const gi=[];function It(){gi.push(xt),xt=!1}function Ot(){const e=gi.pop();xt=e===void 0?!0:e}function mi(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=_e;_e=void 0;try{t()}finally{_e=n}}}let Mn=0;class Zo{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Qs{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!_e||!xt||_e===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==_e)n=this.activeLink=new Zo(_e,this),_e.deps?(n.prevDep=_e.depsTail,_e.depsTail.nextDep=n,_e.depsTail=n):_e.deps=_e.depsTail=n,bi(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=_e.depsTail,n.nextDep=void 0,_e.depsTail.nextDep=n,_e.depsTail=n,_e.deps===n&&(_e.deps=s)}return n}trigger(t){this.version++,Mn++,this.notify(t)}notify(t){Ks();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Ys()}}}function bi(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)bi(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Js=new WeakMap,tn=Symbol(""),er=Symbol(""),Ln=Symbol("");function Ve(e,t,n){if(xt&&_e){let s=Js.get(e);s||Js.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new Qs),r.map=s,r.key=n),r.track()}}function Mt(e,t,n,s,r,i){const l=Js.get(e);if(!l){Mn++;return}const a=o=>{o&&o.trigger()};if(Ks(),t==="clear")l.forEach(a);else{const o=Q(e),c=o&&zs(n);if(o&&n==="length"){const u=Number(s);l.forEach((d,g)=>{(g==="length"||g===Ln||!Ut(g)&&g>=u)&&a(d)})}else switch((n!==void 0||l.has(void 0))&&a(l.get(n)),c&&a(l.get(Ln)),t){case"add":o?c&&a(l.get("length")):(a(l.get(tn)),hn(e)&&a(l.get(er)));break;case"delete":o||(a(l.get(tn)),hn(e)&&a(l.get(er)));break;case"set":hn(e)&&a(l.get(tn));break}}Ys()}function gn(e){const t=ae(e);return t===e?t:(Ve(t,"iterate",Ln),ct(e)?t:t.map(He))}function ls(e){return Ve(e=ae(e),"iterate",Ln),e}const Xo={__proto__:null,[Symbol.iterator](){return tr(this,Symbol.iterator,He)},concat(...e){return gn(this).concat(...e.map(t=>Q(t)?gn(t):t))},entries(){return tr(this,"entries",e=>(e[1]=He(e[1]),e))},every(e,t){return Lt(this,"every",e,t,void 0,arguments)},filter(e,t){return Lt(this,"filter",e,t,n=>n.map(He),arguments)},find(e,t){return Lt(this,"find",e,t,He,arguments)},findIndex(e,t){return Lt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Lt(this,"findLast",e,t,He,arguments)},findLastIndex(e,t){return Lt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Lt(this,"forEach",e,t,void 0,arguments)},includes(...e){return nr(this,"includes",e)},indexOf(...e){return nr(this,"indexOf",e)},join(e){return gn(this).join(e)},lastIndexOf(...e){return nr(this,"lastIndexOf",e)},map(e,t){return Lt(this,"map",e,t,void 0,arguments)},pop(){return $n(this,"pop")},push(...e){return $n(this,"push",e)},reduce(e,...t){return xi(this,"reduce",e,t)},reduceRight(e,...t){return xi(this,"reduceRight",e,t)},shift(){return $n(this,"shift")},some(e,t){return Lt(this,"some",e,t,void 0,arguments)},splice(...e){return $n(this,"splice",e)},toReversed(){return gn(this).toReversed()},toSorted(e){return gn(this).toSorted(e)},toSpliced(...e){return gn(this).toSpliced(...e)},unshift(...e){return $n(this,"unshift",e)},values(){return tr(this,"values",He)}};function tr(e,t,n){const s=ls(e),r=s[t]();return s!==e&&!ct(e)&&(r._next=r.next,r.next=()=>{const i=r._next();return i.value&&(i.value=n(i.value)),i}),r}const Qo=Array.prototype;function Lt(e,t,n,s,r,i){const l=ls(e),a=l!==e&&!ct(e),o=l[t];if(o!==Qo[t]){const d=o.apply(e,i);return a?He(d):d}let c=n;l!==e&&(a?c=function(d,g){return n.call(this,He(d),g,e)}:n.length>2&&(c=function(d,g){return n.call(this,d,g,e)}));const u=o.call(l,c,s);return a&&r?r(u):u}function xi(e,t,n,s){const r=ls(e);let i=n;return r!==e&&(ct(e)?n.length>3&&(i=function(l,a,o){return n.call(this,l,a,o,e)}):i=function(l,a,o){return n.call(this,l,He(a),o,e)}),r[t](i,...s)}function nr(e,t,n){const s=ae(e);Ve(s,"iterate",Ln);const r=s[t](...n);return(r===-1||r===!1)&&rr(n[0])?(n[0]=ae(n[0]),s[t](...n)):r}function $n(e,t,n=[]){It(),Ks();const s=ae(e)[t].apply(e,n);return Ys(),Ot(),s}const Jo=Pt("__proto__,__v_isRef,__isVue"),yi=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Ut));function ea(e){Ut(e)||(e=String(e));const t=ae(this);return Ve(t,"has",e),t.hasOwnProperty(e)}class wi{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return i;if(n==="__v_raw")return s===(r?i?Ei:Si:i?ki:Ti).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const l=Q(t);if(!r){let o;if(l&&(o=Xo[n]))return o;if(n==="hasOwnProperty")return ea}const a=Reflect.get(t,n,qe(t)?t:s);return(Ut(n)?yi.has(n):Jo(n))||(r||Ve(t,"get",n),i)?a:qe(a)?l&&zs(n)?a:a.value:Re(a)?r?Ai(a):cs(a):a}}class vi extends wi{constructor(t=!1){super(!1,t)}set(t,n,s,r){let i=t[n];if(!this._isShallow){const o=qt(i);if(!ct(s)&&!qt(s)&&(i=ae(i),s=ae(s)),!Q(t)&&qe(i)&&!qe(s))return o?!1:(i.value=s,!0)}const l=Q(t)&&zs(n)?Number(n)e,os=e=>Reflect.getPrototypeOf(e);function ia(e,t,n){return function(...s){const r=this.__v_raw,i=ae(r),l=hn(i),a=e==="entries"||e===Symbol.iterator&&l,o=e==="keys"&&l,c=r[e](...s),u=n?sr:t?ps:He;return!t&&Ve(i,"iterate",o?er:tn),{next(){const{value:d,done:g}=c.next();return g?{value:d,done:g}:{value:a?[u(d[0]),u(d[1])]:u(d),done:g}},[Symbol.iterator](){return this}}}}function as(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function la(e,t){const n={get(r){const i=this.__v_raw,l=ae(i),a=ae(r);e||(Vt(r,a)&&Ve(l,"get",r),Ve(l,"get",a));const{has:o}=os(l),c=t?sr:e?ps:He;if(o.call(l,r))return c(i.get(r));if(o.call(l,a))return c(i.get(a));i!==l&&i.get(r)},get size(){const r=this.__v_raw;return!e&&Ve(ae(r),"iterate",tn),Reflect.get(r,"size",r)},has(r){const i=this.__v_raw,l=ae(i),a=ae(r);return e||(Vt(r,a)&&Ve(l,"has",r),Ve(l,"has",a)),r===a?i.has(r):i.has(r)||i.has(a)},forEach(r,i){const l=this,a=l.__v_raw,o=ae(a),c=t?sr:e?ps:He;return!e&&Ve(o,"iterate",tn),a.forEach((u,d)=>r.call(i,c(u),c(d),l))}};return bt(n,e?{add:as("add"),set:as("set"),delete:as("delete"),clear:as("clear")}:{add(r){!t&&!ct(r)&&!qt(r)&&(r=ae(r));const i=ae(this);return os(i).has.call(i,r)||(i.add(r),Mt(i,"add",r,r)),this},set(r,i){!t&&!ct(i)&&!qt(i)&&(i=ae(i));const l=ae(this),{has:a,get:o}=os(l);let c=a.call(l,r);c||(r=ae(r),c=a.call(l,r));const u=o.call(l,r);return l.set(r,i),c?Vt(i,u)&&Mt(l,"set",r,i):Mt(l,"add",r,i),this},delete(r){const i=ae(this),{has:l,get:a}=os(i);let o=l.call(i,r);o||(r=ae(r),o=l.call(i,r)),a&&a.call(i,r);const c=i.delete(r);return o&&Mt(i,"delete",r,void 0),c},clear(){const r=ae(this),i=r.size!==0,l=r.clear();return i&&Mt(r,"clear",void 0,void 0),l}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=ia(r,e,t)}),n}function us(e,t){const n=la(e,t);return(s,r,i)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(me(n,r)&&r in s?n:s,r,i)}const oa={get:us(!1,!1)},aa={get:us(!1,!0)},ua={get:us(!0,!1)},ca={get:us(!0,!0)},Ti=new WeakMap,ki=new WeakMap,Si=new WeakMap,Ei=new WeakMap;function fa(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function pa(e){return e.__v_skip||!Object.isExtensible(e)?0:fa(Fo(e))}function cs(e){return qt(e)?e:fs(e,!1,ta,oa,Ti)}function da(e){return fs(e,!1,sa,aa,ki)}function Ai(e){return fs(e,!0,na,ua,Si)}function kd(e){return fs(e,!0,ra,ca,Ei)}function fs(e,t,n,s,r){if(!Re(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=pa(e);if(i===0)return e;const l=r.get(e);if(l)return l;const a=new Proxy(e,i===2?s:n);return r.set(e,a),a}function mn(e){return qt(e)?mn(e.__v_raw):!!(e&&e.__v_isReactive)}function qt(e){return!!(e&&e.__v_isReadonly)}function ct(e){return!!(e&&e.__v_isShallow)}function rr(e){return e?!!e.__v_raw:!1}function ae(e){const t=e&&e.__v_raw;return t?ae(t):e}function ha(e){return!me(e,"__v_skip")&&Object.isExtensible(e)&&js(e,"__v_skip",!0),e}const He=e=>Re(e)?cs(e):e,ps=e=>Re(e)?Ai(e):e;function qe(e){return e?e.__v_isRef===!0:!1}function J(e){return ga(e,!1)}function ga(e,t){return qe(e)?e:new ma(e,t)}class ma{constructor(t,n){this.dep=new Qs,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:ae(t),this._value=n?t:He(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||ct(t)||qt(t);t=s?t:ae(t),Vt(t,n)&&(this._rawValue=t,this._value=s?t:He(t),this.dep.trigger())}}function ba(e){return qe(e)?e.value:e}const xa={get:(e,t,n)=>t==="__v_raw"?e:ba(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return qe(r)&&!qe(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function Ri(e){return mn(e)?e:new Proxy(e,xa)}class ya{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Qs(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Mn-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&_e!==this)return fi(this,!0),!0}get value(){const t=this.dep.track();return hi(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function wa(e,t,n=!1){let s,r;return be(e)?s=e:(s=e.get,r=e.set),new ya(s,r,n)}const ds={},hs=new WeakMap;let nn;function va(e,t=!1,n=nn){if(n){let s=hs.get(n);s||hs.set(n,s=[]),s.push(e)}}function _a(e,t,n=le){const{immediate:s,deep:r,once:i,scheduler:l,augmentJob:a,call:o}=n,c=$=>r?$:ct($)||r===!1||r===0?$t($,1):$t($);let u,d,g,y,E=!1,x=!1;if(qe(e)?(d=()=>e.value,E=ct(e)):mn(e)?(d=()=>c(e),E=!0):Q(e)?(x=!0,E=e.some($=>mn($)||ct($)),d=()=>e.map($=>{if(qe($))return $.value;if(mn($))return c($);if(be($))return o?o($,2):$()})):be(e)?t?d=o?()=>o(e,2):e:d=()=>{if(g){It();try{g()}finally{Ot()}}const $=nn;nn=u;try{return o?o(e,3,[y]):e(y)}finally{nn=$}}:d=Jt,t&&r){const $=d,U=r===!0?1/0:r;d=()=>$t($(),U)}const M=Ko(),m=()=>{u.stop(),M&&M.active&&Jr(M.effects,u)};if(i&&t){const $=t;t=(...U)=>{$(...U),m()}}let H=x?new Array(e.length).fill(ds):ds;const Y=$=>{if(!(!(u.flags&1)||!u.dirty&&!$))if(t){const U=u.run();if(r||E||(x?U.some((L,O)=>Vt(L,H[O])):Vt(U,H))){g&&g();const L=nn;nn=u;try{const O=[U,H===ds?void 0:x&&H[0]===ds?[]:H,y];H=U,o?o(t,3,O):t(...O)}finally{nn=L}}}else u.run()};return a&&a(Y),u=new ui(d),u.scheduler=l?()=>l(Y,!1):Y,y=$=>va($,!1,u),g=u.onStop=()=>{const $=hs.get(u);if($){if(o)o($,4);else for(const U of $)U();hs.delete(u)}},t?s?Y(!0):H=u.run():l?l(Y.bind(null,!0),!0):u.run(),m.pause=u.pause.bind(u),m.resume=u.resume.bind(u),m.stop=m,m}function $t(e,t=1/0,n){if(t<=0||!Re(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,qe(e))$t(e.value,t,n);else if(Q(e))for(let s=0;s{$t(s,t,n)});else if(si(e)){for(const s in e)$t(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&$t(e[s],t,n)}return e}const Dn=[];let ir=!1;function Sd(e,...t){if(ir)return;ir=!0,It();const n=Dn.length?Dn[Dn.length-1].component:null,s=n&&n.appContext.config.warnHandler,r=Ta();if(s)bn(s,n,11,[e+t.map(i=>{var l,a;return(a=(l=i.toString)==null?void 0:l.call(i))!=null?a:JSON.stringify(i)}).join(""),n&&n.proxy,r.map(({vnode:i})=>`at <${hl(n,i.type)}>`).join(` +var eh=Object.defineProperty;var th=(Pt,ie,pt)=>ie in Pt?eh(Pt,ie,{enumerable:!0,configurable:!0,writable:!0,value:pt}):Pt[ie]=pt;var ve=(Pt,ie,pt)=>th(Pt,typeof ie!="symbol"?ie+"":ie,pt);(function(){"use strict";var qs;function Pt(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const ie={},pt=[],sn=()=>{},ta=()=>!1,us=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Xs=e=>e.startsWith("onUpdate:"),dt=Object.assign,fi=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},na=Object.prototype.hasOwnProperty,he=(e,t)=>na.call(e,t),Q=Array.isArray,wn=e=>cs(e)==="[object Map]",pi=e=>cs(e)==="[object Set]",be=e=>typeof e=="function",Ce=e=>typeof e=="string",Ut=e=>typeof e=="symbol",Ee=e=>e!==null&&typeof e=="object",di=e=>(Ee(e)||be(e))&&be(e.then)&&be(e.catch),hi=Object.prototype.toString,cs=e=>hi.call(e),sa=e=>cs(e).slice(8,-1),gi=e=>cs(e)==="[object Object]",Js=e=>Ce(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,$n=Pt(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),fs=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},ra=/-(\w)/g,jt=fs(e=>e.replace(ra,(t,n)=>n?n.toUpperCase():"")),ia=/\B([A-Z])/g,rn=fs(e=>e.replace(ia,"-$1").toLowerCase()),mi=fs(e=>e.charAt(0).toUpperCase()+e.slice(1)),Qs=fs(e=>e?`on${mi(e)}`:""),Vt=(e,t)=>!Object.is(e,t),ps=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},tr=e=>{const t=parseFloat(e);return isNaN(t)?e:t},oa=e=>{const t=Ce(e)?Number(e):NaN;return isNaN(t)?e:t};let bi;const ds=()=>bi||(bi=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});function nr(e){if(Q(e)){const t={};for(let n=0;n{if(n){const s=n.split(aa);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function we(e){let t="";if(Ce(e))t=e;else if(Q(e))for(let n=0;n!!(e&&e.__v_isRef===!0),nt=e=>Ce(e)?e:e==null?"":Q(e)||Ee(e)&&(e.toString===hi||!be(e.toString))?yi(e)?nt(e.value):JSON.stringify(e,wi,2):String(e),wi=(e,t)=>yi(t)?wi(e,t.value):wn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],i)=>(n[sr(s,i)+" =>"]=r,n),{})}:pi(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>sr(n))}:Ut(t)?sr(t):Ee(t)&&!Q(t)&&!gi(t)?String(t):t,sr=(e,t="")=>{var n;return Ut(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};let st;class pa{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=st,!t&&st&&(this.index=(st.scopes||(st.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0&&--this._on===0&&(st=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n0)return;if(Dn){let t=Dn;for(Dn=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Nn;){let t=Nn;for(Nn=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function ki(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Si(e){let t,n=e.depsTail,s=n;for(;s;){const r=s.prevDep;s.version===-1?(s===n&&(n=r),ar(s),ha(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}e.deps=t,e.depsTail=n}function lr(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ei(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Ei(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Fn)||(e.globalVersion=Fn,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!lr(e))))return;e.flags|=2;const t=e.dep,n=_e,s=ht;_e=e,ht=!0;try{ki(e);const r=e.fn(e._value);(t.version===0||Vt(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{_e=n,ht=s,Si(e),e.flags&=-3}}function ar(e,t=!1){const{dep:n,prevSub:s,nextSub:r}=e;if(s&&(s.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)ar(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function ha(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let ht=!0;const Ai=[];function It(){Ai.push(ht),ht=!1}function Ot(){const e=Ai.pop();ht=e===void 0?!0:e}function Ri(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=_e;_e=void 0;try{t()}finally{_e=n}}}let Fn=0;class ga{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class ur{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!_e||!ht||_e===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==_e)n=this.activeLink=new ga(_e,this),_e.deps?(n.prevDep=_e.depsTail,_e.depsTail.nextDep=n,_e.depsTail=n):_e.deps=_e.depsTail=n,Ci(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=_e.depsTail,n.nextDep=void 0,_e.depsTail.nextDep=n,_e.depsTail=n,_e.deps===n&&(_e.deps=s)}return n}trigger(t){this.version++,Fn++,this.notify(t)}notify(t){ir();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{or()}}}function Ci(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)Ci(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const cr=new WeakMap,on=Symbol(""),fr=Symbol(""),Bn=Symbol("");function qe(e,t,n){if(ht&&_e){let s=cr.get(e);s||cr.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new ur),r.map=s,r.key=n),r.track()}}function Mt(e,t,n,s,r,i){const o=cr.get(e);if(!o){Fn++;return}const a=l=>{l&&l.trigger()};if(ir(),t==="clear")o.forEach(a);else{const l=Q(e),f=l&&Js(n);if(l&&n==="length"){const u=Number(s);o.forEach((h,g)=>{(g==="length"||g===Bn||!Ut(g)&&g>=u)&&a(h)})}else switch((n!==void 0||o.has(void 0))&&a(o.get(n)),f&&a(o.get(Bn)),t){case"add":l?f&&a(o.get("length")):(a(o.get(on)),wn(e)&&a(o.get(fr)));break;case"delete":l||(a(o.get(on)),wn(e)&&a(o.get(fr)));break;case"set":wn(e)&&a(o.get(on));break}}or()}function vn(e){const t=ae(e);return t===e?t:(qe(t,"iterate",Bn),lt(e)?t:t.map(Fe))}function hs(e){return qe(e=ae(e),"iterate",Bn),e}const ma={__proto__:null,[Symbol.iterator](){return pr(this,Symbol.iterator,Fe)},concat(...e){return vn(this).concat(...e.map(t=>Q(t)?vn(t):t))},entries(){return pr(this,"entries",e=>(e[1]=Fe(e[1]),e))},every(e,t){return Lt(this,"every",e,t,void 0,arguments)},filter(e,t){return Lt(this,"filter",e,t,n=>n.map(Fe),arguments)},find(e,t){return Lt(this,"find",e,t,Fe,arguments)},findIndex(e,t){return Lt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Lt(this,"findLast",e,t,Fe,arguments)},findLastIndex(e,t){return Lt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Lt(this,"forEach",e,t,void 0,arguments)},includes(...e){return dr(this,"includes",e)},indexOf(...e){return dr(this,"indexOf",e)},join(e){return vn(this).join(e)},lastIndexOf(...e){return dr(this,"lastIndexOf",e)},map(e,t){return Lt(this,"map",e,t,void 0,arguments)},pop(){return Hn(this,"pop")},push(...e){return Hn(this,"push",e)},reduce(e,...t){return Pi(this,"reduce",e,t)},reduceRight(e,...t){return Pi(this,"reduceRight",e,t)},shift(){return Hn(this,"shift")},some(e,t){return Lt(this,"some",e,t,void 0,arguments)},splice(...e){return Hn(this,"splice",e)},toReversed(){return vn(this).toReversed()},toSorted(e){return vn(this).toSorted(e)},toSpliced(...e){return vn(this).toSpliced(...e)},unshift(...e){return Hn(this,"unshift",e)},values(){return pr(this,"values",Fe)}};function pr(e,t,n){const s=hs(e),r=s[t]();return s!==e&&!lt(e)&&(r._next=r.next,r.next=()=>{const i=r._next();return i.value&&(i.value=n(i.value)),i}),r}const ba=Array.prototype;function Lt(e,t,n,s,r,i){const o=hs(e),a=o!==e&&!lt(e),l=o[t];if(l!==ba[t]){const h=l.apply(e,i);return a?Fe(h):h}let f=n;o!==e&&(a?f=function(h,g){return n.call(this,Fe(h),g,e)}:n.length>2&&(f=function(h,g){return n.call(this,h,g,e)}));const u=l.call(o,f,s);return a&&r?r(u):u}function Pi(e,t,n,s){const r=hs(e);let i=n;return r!==e&&(lt(e)?n.length>3&&(i=function(o,a,l){return n.call(this,o,a,l,e)}):i=function(o,a,l){return n.call(this,o,Fe(a),l,e)}),r[t](i,...s)}function dr(e,t,n){const s=ae(e);qe(s,"iterate",Bn);const r=s[t](...n);return(r===-1||r===!1)&&gr(n[0])?(n[0]=ae(n[0]),s[t](...n)):r}function Hn(e,t,n=[]){It(),ir();const s=ae(e)[t].apply(e,n);return or(),Ot(),s}const xa=Pt("__proto__,__v_isRef,__isVue"),Ii=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Ut));function ya(e){Ut(e)||(e=String(e));const t=ae(this);return qe(t,"has",e),t.hasOwnProperty(e)}class Oi{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return i;if(n==="__v_raw")return s===(r?i?Fi:Di:i?Ni:$i).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=Q(t);if(!r){let l;if(o&&(l=ma[n]))return l;if(n==="hasOwnProperty")return ya}const a=Reflect.get(t,n,We(t)?t:s);return(Ut(n)?Ii.has(n):xa(n))||(r||qe(t,"get",n),i)?a:We(a)?o&&Js(n)?a:a.value:Ee(a)?r?Bi(a):xs(a):a}}class Mi extends Oi{constructor(t=!1){super(!1,t)}set(t,n,s,r){let i=t[n];if(!this._isShallow){const l=qt(i);if(!lt(s)&&!qt(s)&&(i=ae(i),s=ae(s)),!Q(t)&&We(i)&&!We(s))return l?!1:(i.value=s,!0)}const o=Q(t)&&Js(n)?Number(n)e,gs=e=>Reflect.getPrototypeOf(e);function ka(e,t,n){return function(...s){const r=this.__v_raw,i=ae(r),o=wn(i),a=e==="entries"||e===Symbol.iterator&&o,l=e==="keys"&&o,f=r[e](...s),u=n?hr:t?ws:Fe;return!t&&qe(i,"iterate",l?fr:on),{next(){const{value:h,done:g}=f.next();return g?{value:h,done:g}:{value:a?[u(h[0]),u(h[1])]:u(h),done:g}},[Symbol.iterator](){return this}}}}function ms(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Sa(e,t){const n={get(r){const i=this.__v_raw,o=ae(i),a=ae(r);e||(Vt(r,a)&&qe(o,"get",r),qe(o,"get",a));const{has:l}=gs(o),f=t?hr:e?ws:Fe;if(l.call(o,r))return f(i.get(r));if(l.call(o,a))return f(i.get(a));i!==o&&i.get(r)},get size(){const r=this.__v_raw;return!e&&qe(ae(r),"iterate",on),Reflect.get(r,"size",r)},has(r){const i=this.__v_raw,o=ae(i),a=ae(r);return e||(Vt(r,a)&&qe(o,"has",r),qe(o,"has",a)),r===a?i.has(r):i.has(r)||i.has(a)},forEach(r,i){const o=this,a=o.__v_raw,l=ae(a),f=t?hr:e?ws:Fe;return!e&&qe(l,"iterate",on),a.forEach((u,h)=>r.call(i,f(u),f(h),o))}};return dt(n,e?{add:ms("add"),set:ms("set"),delete:ms("delete"),clear:ms("clear")}:{add(r){!t&&!lt(r)&&!qt(r)&&(r=ae(r));const i=ae(this);return gs(i).has.call(i,r)||(i.add(r),Mt(i,"add",r,r)),this},set(r,i){!t&&!lt(i)&&!qt(i)&&(i=ae(i));const o=ae(this),{has:a,get:l}=gs(o);let f=a.call(o,r);f||(r=ae(r),f=a.call(o,r));const u=l.call(o,r);return o.set(r,i),f?Vt(i,u)&&Mt(o,"set",r,i):Mt(o,"add",r,i),this},delete(r){const i=ae(this),{has:o,get:a}=gs(i);let l=o.call(i,r);l||(r=ae(r),l=o.call(i,r)),a&&a.call(i,r);const f=i.delete(r);return l&&Mt(i,"delete",r,void 0),f},clear(){const r=ae(this),i=r.size!==0,o=r.clear();return i&&Mt(r,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=ka(r,e,t)}),n}function bs(e,t){const n=Sa(e,t);return(s,r,i)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(he(n,r)&&r in s?n:s,r,i)}const Ea={get:bs(!1,!1)},Aa={get:bs(!1,!0)},Ra={get:bs(!0,!1)},Ca={get:bs(!0,!0)},$i=new WeakMap,Ni=new WeakMap,Di=new WeakMap,Fi=new WeakMap;function Pa(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Ia(e){return e.__v_skip||!Object.isExtensible(e)?0:Pa(sa(e))}function xs(e){return qt(e)?e:ys(e,!1,wa,Ea,$i)}function Oa(e){return ys(e,!1,_a,Aa,Ni)}function Bi(e){return ys(e,!0,va,Ra,Di)}function sh(e){return ys(e,!0,Ta,Ca,Fi)}function ys(e,t,n,s,r){if(!Ee(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=Ia(e);if(i===0)return e;const o=r.get(e);if(o)return o;const a=new Proxy(e,i===2?s:n);return r.set(e,a),a}function _n(e){return qt(e)?_n(e.__v_raw):!!(e&&e.__v_isReactive)}function qt(e){return!!(e&&e.__v_isReadonly)}function lt(e){return!!(e&&e.__v_isShallow)}function gr(e){return e?!!e.__v_raw:!1}function ae(e){const t=e&&e.__v_raw;return t?ae(t):e}function Ma(e){return!he(e,"__v_skip")&&Object.isExtensible(e)&&er(e,"__v_skip",!0),e}const Fe=e=>Ee(e)?xs(e):e,ws=e=>Ee(e)?Bi(e):e;function We(e){return e?e.__v_isRef===!0:!1}function ee(e){return La(e,!1)}function La(e,t){return We(e)?e:new $a(e,t)}class $a{constructor(t,n){this.dep=new ur,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:ae(t),this._value=n?t:Fe(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||lt(t)||qt(t);t=s?t:ae(t),Vt(t,n)&&(this._rawValue=t,this._value=s?t:Fe(t),this.dep.trigger())}}function Na(e){return We(e)?e.value:e}const Da={get:(e,t,n)=>t==="__v_raw"?e:Na(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return We(r)&&!We(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function Hi(e){return _n(e)?e:new Proxy(e,Da)}class Fa{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new ur(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Fn-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&_e!==this)return Ti(this,!0),!0}get value(){const t=this.dep.track();return Ei(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Ba(e,t,n=!1){let s,r;return be(e)?s=e:(s=e.get,r=e.set),new Fa(s,r,n)}const vs={},_s=new WeakMap;let ln;function Ha(e,t=!1,n=ln){if(n){let s=_s.get(n);s||_s.set(n,s=[]),s.push(e)}}function za(e,t,n=ie){const{immediate:s,deep:r,once:i,scheduler:o,augmentJob:a,call:l}=n,f=$=>r?$:lt($)||r===!1||r===0?$t($,1):$t($);let u,h,g,w,A=!1,_=!1;if(We(e)?(h=()=>e.value,A=lt(e)):_n(e)?(h=()=>f(e),A=!0):Q(e)?(_=!0,A=e.some($=>_n($)||lt($)),h=()=>e.map($=>{if(We($))return $.value;if(_n($))return f($);if(be($))return l?l($,2):$()})):be(e)?t?h=l?()=>l(e,2):e:h=()=>{if(g){It();try{g()}finally{Ot()}}const $=ln;ln=u;try{return l?l(e,3,[w]):e(w)}finally{ln=$}}:h=sn,t&&r){const $=h,Y=r===!0?1/0:r;h=()=>$t($(),Y)}const F=da(),b=()=>{u.stop(),F&&F.active&&fi(F.effects,u)};if(i&&t){const $=t;t=(...Y)=>{$(...Y),b()}}let U=_?new Array(e.length).fill(vs):vs;const Z=$=>{if(!(!(u.flags&1)||!u.dirty&&!$))if(t){const Y=u.run();if(r||A||(_?Y.some((C,N)=>Vt(C,U[N])):Vt(Y,U))){g&&g();const C=ln;ln=u;try{const N=[Y,U===vs?void 0:_&&U[0]===vs?[]:U,w];U=Y,l?l(t,3,N):t(...N)}finally{ln=C}}}else u.run()};return a&&a(Z),u=new vi(h),u.scheduler=o?()=>o(Z,!1):Z,w=$=>Ha($,!1,u),g=u.onStop=()=>{const $=_s.get(u);if($){if(l)l($,4);else for(const Y of $)Y();_s.delete(u)}},t?s?Z(!0):U=u.run():o?o(Z.bind(null,!0),!0):u.run(),b.pause=u.pause.bind(u),b.resume=u.resume.bind(u),b.stop=b,b}function $t(e,t=1/0,n){if(t<=0||!Ee(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,We(e))$t(e.value,t,n);else if(Q(e))for(let s=0;s{$t(s,t,n)});else if(gi(e)){for(const s in e)$t(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&$t(e[s],t,n)}return e}const zn=[];let mr=!1;function rh(e,...t){if(mr)return;mr=!0,It();const n=zn.length?zn[zn.length-1].component:null,s=n&&n.appContext.config.warnHandler,r=Ua();if(s)Tn(s,n,11,[e+t.map(i=>{var o,a;return(a=(o=i.toString)==null?void 0:o.call(i))!=null?a:JSON.stringify(i)}).join(""),n&&n.proxy,r.map(({vnode:i})=>`at <${Ao(n,i.type)}>`).join(` `),r]);else{const i=[`[Vue warn]: ${e}`,...t];r.length&&i.push(` -`,...ka(r))}Ot(),ir=!1}function Ta(){let e=Dn[Dn.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const s=e.component&&e.component.parent;e=s&&s.vnode}return t}function ka(e){const t=[];return e.forEach((n,s)=>{t.push(...s===0?[]:[` -`],...Sa(n))}),t}function Sa({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",s=e.component?e.component.parent==null:!1,r=` at <${hl(e.component,e.type,s)}`,i=">"+n;return e.props?[r,...Ea(e.props),i]:[r+i]}function Ea(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(s=>{t.push(...Ci(s,e[s]))}),n.length>3&&t.push(" ..."),t}function Ci(e,t,n){return Ce(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:qe(t)?(t=Ci(e,ae(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):be(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=ae(t),n?t:[`${e}=`,t])}function bn(e,t,n,s){try{return s?e(...s):e()}catch(r){gs(r,t,n)}}function Tt(e,t,n,s){if(be(e)){const r=bn(e,t,n,s);return r&&ti(r)&&r.catch(i=>{gs(i,t,n)}),r}if(Q(e)){const r=[];for(let i=0;i>>1,r=Ke[s],i=Nn(r);i=Nn(n)?Ke.push(e):Ke.splice(Ra(t),0,e),e.flags|=1,Ii()}}function Ii(){ms||(ms=Pi.then(Li))}function Ca(e){Q(e)?xn.push(...e):Wt&&e.id===-1?Wt.splice(yn+1,0,e):e.flags&1||(xn.push(e),e.flags|=1),Ii()}function Oi(e,t,n=kt+1){for(;nNn(n)-Nn(s));if(xn.length=0,Wt){Wt.push(...t);return}for(Wt=t,yn=0;yne.id==null?e.flags&2?-1:1/0:e.id;function Li(e){try{for(kt=0;kt{s._d&&ll(-1);const i=bs(t);let l;try{l=e(...r)}finally{bs(i),s._d&&ll(1)}return l};return s._n=!0,s._c=!0,s._d=!0,s}function Pa(e,t){if(ft===null)return e;const n=As(ft),s=e.dirs||(e.dirs=[]);for(let r=0;re.__isTeleport,Gt=Symbol("_leaveCb"),xs=Symbol("_enterCb");function Oa(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return zn(()=>{e.isMounted=!0}),ys(()=>{e.isUnmounting=!0}),e}const pt=[Function,Array],Fi={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:pt,onEnter:pt,onAfterEnter:pt,onEnterCancelled:pt,onBeforeLeave:pt,onLeave:pt,onAfterLeave:pt,onLeaveCancelled:pt,onBeforeAppear:pt,onAppear:pt,onAfterAppear:pt,onAppearCancelled:pt},Bi=e=>{const t=e.subTree;return t.component?Bi(t.component):t},Ma={name:"BaseTransition",props:Fi,setup(e,{slots:t}){const n=ul(),s=Oa();return()=>{const r=t.default&&ji(t.default(),!0);if(!r||!r.length)return;const i=Hi(r),l=ae(e),{mode:a}=l;if(s.isLeaving)return ar(i);const o=Ui(i);if(!o)return ar(i);let c=or(o,l,s,n,d=>c=d);o.type!==Ye&&Fn(o,c);let u=n.subTree&&Ui(n.subTree);if(u&&u.type!==Ye&&!on(o,u)&&Bi(n).type!==Ye){let d=or(u,l,s,n);if(Fn(u,d),a==="out-in"&&o.type!==Ye)return s.isLeaving=!0,d.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,u=void 0},ar(i);a==="in-out"&&o.type!==Ye?d.delayLeave=(g,y,E)=>{const x=zi(s,u);x[String(u.key)]=u,g[Gt]=()=>{y(),g[Gt]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{E(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return i}}};function Hi(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Ye){t=n;break}}return t}const La=Ma;function zi(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function or(e,t,n,s,r){const{appear:i,mode:l,persisted:a=!1,onBeforeEnter:o,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:g,onLeave:y,onAfterLeave:E,onLeaveCancelled:x,onBeforeAppear:M,onAppear:m,onAfterAppear:H,onAppearCancelled:Y}=t,$=String(e.key),U=zi(n,e),L=(q,se)=>{q&&Tt(q,s,9,se)},O=(q,se)=>{const fe=se[1];L(q,se),Q(q)?q.every(D=>D.length<=1)&&fe():q.length<=1&&fe()},ee={mode:l,persisted:a,beforeEnter(q){let se=o;if(!n.isMounted)if(i)se=M||o;else return;q[Gt]&&q[Gt](!0);const fe=U[$];fe&&on(e,fe)&&fe.el[Gt]&&fe.el[Gt](),L(se,[q])},enter(q){let se=c,fe=u,D=d;if(!n.isMounted)if(i)se=m||c,fe=H||u,D=Y||d;else return;let Z=!1;const Se=q[xs]=je=>{Z||(Z=!0,je?L(D,[q]):L(fe,[q]),ee.delayedLeave&&ee.delayedLeave(),q[xs]=void 0)};se?O(se,[q,Se]):Se()},leave(q,se){const fe=String(e.key);if(q[xs]&&q[xs](!0),n.isUnmounting)return se();L(g,[q]);let D=!1;const Z=q[Gt]=Se=>{D||(D=!0,se(),Se?L(x,[q]):L(E,[q]),q[Gt]=void 0,U[fe]===e&&delete U[fe])};U[fe]=e,y?O(y,[q,Z]):Z()},clone(q){const se=or(q,t,n,s,r);return r&&r(se),se}};return ee}function ar(e){if(ur(e))return e=Kt(e),e.children=null,e}function Ui(e){if(!ur(e))return Ni(e.type)&&e.children?Hi(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&be(n.default))return n.default()}}function Fn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Fn(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function ji(e,t=!1,n){let s=[],r=0;for(let i=0;i1)for(let i=0;iBn(E,t&&(Q(t)?t[x]:t),n,s,r));return}if(Hn(s)&&!r){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&Bn(e,t,n,s.component.subTree);return}const i=s.shapeFlag&4?As(s.component):s.el,l=r?null:i,{i:a,r:o}=e,c=t&&t.r,u=a.refs===le?a.refs={}:a.refs,d=a.setupState,g=ae(d),y=d===le?()=>!1:E=>me(g,E);if(c!=null&&c!==o&&(Ce(c)?(u[c]=null,y(c)&&(d[c]=null)):qe(c)&&(c.value=null)),be(o))bn(o,a,12,[l,u]);else{const E=Ce(o),x=qe(o);if(E||x){const M=()=>{if(e.f){const m=E?y(o)?d[o]:u[o]:o.value;r?Q(m)&&Jr(m,i):Q(m)?m.includes(i)||m.push(i):E?(u[o]=[i],y(o)&&(d[o]=u[o])):(o.value=[i],e.k&&(u[e.k]=o.value))}else E?(u[o]=l,y(o)&&(d[o]=l)):x&&(o.value=l,e.k&&(u[e.k]=l))};l?(M.id=-1,it(M,n)):M()}}}is().requestIdleCallback,is().cancelIdleCallback;const Hn=e=>!!e.type.__asyncLoader,ur=e=>e.type.__isKeepAlive;function Da(e,t,n=Zt,s=!1){if(n){const r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...l)=>{It();const a=yr(n),o=Tt(t,n,e,l);return a(),Ot(),o});return s?r.unshift(i):r.push(i),i}}const Vi=e=>(t,n=Zt)=>{(!qn||e==="sp")&&Da(e,(...s)=>t(...s),n)},zn=Vi("m"),ys=Vi("bum"),Na=Symbol.for("v-ndc");function ws(e,t,n,s){let r;const i=n,l=Q(e);if(l||Ce(e)){const a=l&&mn(e);let o=!1,c=!1;a&&(o=!ct(e),c=qt(e),e=ls(e)),r=new Array(e.length);for(let u=0,d=e.length;ut(a,o,void 0,i));else{const a=Object.keys(e);r=new Array(a.length);for(let o=0,c=a.length;oe?fl(e)?As(e):cr(e.parent):null,Un=bt(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>cr(e.parent),$root:e=>cr(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>e.type,$forceUpdate:e=>e.f||(e.f=()=>{lr(e.update)}),$nextTick:e=>e.n||(e.n=St.bind(e.proxy)),$watch:e=>Jt}),fr=(e,t)=>e!==le&&!e.__isScriptSetup&&me(e,t),Fa={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:i,accessCache:l,type:a,appContext:o}=e;let c;if(t[0]!=="$"){const y=l[t];if(y!==void 0)switch(y){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return i[t]}else{if(fr(s,t))return l[t]=1,s[t];if(r!==le&&me(r,t))return l[t]=2,r[t];if((c=e.propsOptions[0])&&me(c,t))return l[t]=3,i[t];if(n!==le&&me(n,t))return l[t]=4,n[t];l[t]=0}}const u=Un[t];let d,g;if(u)return t==="$attrs"&&Ve(e.attrs,"get",""),u(e);if((d=a.__cssModules)&&(d=d[t]))return d;if(n!==le&&me(n,t))return l[t]=4,n[t];if(g=o.config.globalProperties,me(g,t))return g[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:i}=e;return fr(r,t)?(r[t]=n,!0):s!==le&&me(s,t)?(s[t]=n,!0):me(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,propsOptions:i}},l){let a;return!!n[l]||e!==le&&me(e,l)||fr(t,l)||(a=i[0])&&me(a,l)||me(s,l)||me(Un,l)||me(r.config.globalProperties,l)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:me(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function qi(){return{app:null,config:{isNativeTag:Do,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Ba=0;function Ha(e,t){return function(s,r=null){be(s)||(s=bt({},s)),r!=null&&!Re(r)&&(r=null);const i=qi(),l=new WeakSet,a=[];let o=!1;const c=i.app={_uid:Ba++,_component:s,_props:r,_container:null,_context:i,_instance:null,version:Su,get config(){return i.config},set config(u){},use(u,...d){return l.has(u)||(u&&be(u.install)?(l.add(u),u.install(c,...d)):be(u)&&(l.add(u),u(c,...d))),c},mixin(u){return c},component(u,d){return d?(i.components[u]=d,c):i.components[u]},directive(u,d){return d?(i.directives[u]=d,c):i.directives[u]},mount(u,d,g){if(!o){const y=c._ceVNode||Me(s,r);return y.appContext=i,g===!0?g="svg":g===!1&&(g=void 0),e(y,u,g),o=!0,c._container=u,u.__vue_app__=c,As(y.component)}},onUnmount(u){a.push(u)},unmount(){o&&(Tt(a,c._instance,16),e(null,c._container),delete c._container.__vue_app__)},provide(u,d){return i.provides[u]=d,c},runWithContext(u){const d=wn;wn=c;try{return u()}finally{wn=d}}};return c}}let wn=null;function za(e,t,n=!1){const s=ul();if(s||wn){let r=wn?wn._context.provides:s?s.parent==null||s.ce?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return n&&be(t)?t.call(s&&s.proxy):t}}const Wi={},Gi=()=>Object.create(Wi),Ki=e=>Object.getPrototypeOf(e)===Wi;function Ua(e,t,n,s=!1){const r={},i=Gi();e.propsDefaults=Object.create(null),Yi(e,t,r,i);for(const l in e.propsOptions[0])l in r||(r[l]=void 0);n?e.props=s?r:da(r):e.type.props?e.props=r:e.props=i,e.attrs=i}function ja(e,t,n,s){const{props:r,attrs:i,vnode:{patchFlag:l}}=e,a=ae(r),[o]=e.propsOptions;let c=!1;if((s||l>0)&&!(l&16)){if(l&8){const u=e.vnode.dynamicProps;for(let d=0;de==="_"||e==="__"||e==="_ctx"||e==="$stable",hr=e=>Q(e)?e.map(At):[At(e)],qa=(e,t,n)=>{if(t._n)return t;const s=Di((...r)=>hr(t(...r)),n);return s._c=!1,s},Xi=(e,t,n)=>{const s=e._ctx;for(const r in e){if(dr(r))continue;const i=e[r];if(be(i))t[r]=qa(r,i,s);else if(i!=null){const l=hr(i);t[r]=()=>l}}},Qi=(e,t)=>{const n=hr(t);e.slots.default=()=>n},Ji=(e,t,n)=>{for(const s in t)(n||!dr(s))&&(e[s]=t[s])},Wa=(e,t,n)=>{const s=e.slots=Gi();if(e.vnode.shapeFlag&32){const r=t.__;r&&js(s,"__",r,!0);const i=t._;i?(Ji(s,t,n),n&&js(s,"_",i,!0)):Xi(t,s)}else t&&Qi(e,t)},Ga=(e,t,n)=>{const{vnode:s,slots:r}=e;let i=!0,l=le;if(s.shapeFlag&32){const a=t._;a?n&&a===1?i=!1:Ji(r,t,n):(i=!t.$stable,Xi(t,r)),l=t}else t&&(Qi(e,t),l={default:1});if(i)for(const a in r)!dr(a)&&l[a]==null&&delete r[a]},it=au;function Ka(e){return Ya(e)}function Ya(e,t){const n=is();n.__VUE__=!0;const{insert:s,remove:r,patchProp:i,createElement:l,createText:a,createComment:o,setText:c,setElementText:u,parentNode:d,nextSibling:g,setScopeId:y=Jt,insertStaticContent:E}=e,x=(f,h,b,k=null,v=null,_=null,P=void 0,C=null,A=!!h.dynamicChildren)=>{if(f===h)return;f&&!on(f,h)&&(k=ye(f),ue(f,v,_,!0),f=null),h.patchFlag===-2&&(A=!1,h.dynamicChildren=null);const{type:S,ref:z,shapeFlag:I}=h;switch(S){case _s:M(f,h,b,k);break;case Ye:m(f,h,b,k);break;case mr:f==null&&H(h,b,k,P);break;case ze:D(f,h,b,k,v,_,P,C,A);break;default:I&1?U(f,h,b,k,v,_,P,C,A):I&6?Z(f,h,b,k,v,_,P,C,A):(I&64||I&128)&&S.process(f,h,b,k,v,_,P,C,A,Ie)}z!=null&&v?Bn(z,f&&f.ref,_,h||f,!h):z==null&&f&&f.ref!=null&&Bn(f.ref,null,_,f,!0)},M=(f,h,b,k)=>{if(f==null)s(h.el=a(h.children),b,k);else{const v=h.el=f.el;h.children!==f.children&&c(v,h.children)}},m=(f,h,b,k)=>{f==null?s(h.el=o(h.children||""),b,k):h.el=f.el},H=(f,h,b,k)=>{[f.el,f.anchor]=E(f.children,h,b,k,f.el,f.anchor)},Y=({el:f,anchor:h},b,k)=>{let v;for(;f&&f!==h;)v=g(f),s(f,b,k),f=v;s(h,b,k)},$=({el:f,anchor:h})=>{let b;for(;f&&f!==h;)b=g(f),r(f),f=b;r(h)},U=(f,h,b,k,v,_,P,C,A)=>{h.type==="svg"?P="svg":h.type==="math"&&(P="mathml"),f==null?L(h,b,k,v,_,P,C,A):q(f,h,v,_,P,C,A)},L=(f,h,b,k,v,_,P,C)=>{let A,S;const{props:z,shapeFlag:I,transition:V,dirs:K}=f;if(A=f.el=l(f.type,_,z&&z.is,z),I&8?u(A,f.children):I&16&&ee(f.children,A,null,k,v,gr(f,_),P,C),K&&sn(f,null,k,"created"),O(A,f,f.scopeId,P,k),z){for(const de in z)de!=="value"&&!Pn(de)&&i(A,de,null,z[de],_,k);"value"in z&&i(A,"value",null,z.value,_),(S=z.onVnodeBeforeMount)&&Rt(S,k,f)}K&&sn(f,null,k,"beforeMount");const ne=Za(v,V);ne&&V.beforeEnter(A),s(A,h,b),((S=z&&z.onVnodeMounted)||ne||K)&&it(()=>{S&&Rt(S,k,f),ne&&V.enter(A),K&&sn(f,null,k,"mounted")},v)},O=(f,h,b,k,v)=>{if(b&&y(f,b),k)for(let _=0;_{for(let S=A;S{const C=h.el=f.el;let{patchFlag:A,dynamicChildren:S,dirs:z}=h;A|=f.patchFlag&16;const I=f.props||le,V=h.props||le;let K;if(b&&rn(b,!1),(K=V.onVnodeBeforeUpdate)&&Rt(K,b,h,f),z&&sn(h,f,b,"beforeUpdate"),b&&rn(b,!0),(I.innerHTML&&V.innerHTML==null||I.textContent&&V.textContent==null)&&u(C,""),S?se(f.dynamicChildren,S,C,b,k,gr(h,v),_):P||he(f,h,C,null,b,k,gr(h,v),_,!1),A>0){if(A&16)fe(C,I,V,b,v);else if(A&2&&I.class!==V.class&&i(C,"class",null,V.class,v),A&4&&i(C,"style",I.style,V.style,v),A&8){const ne=h.dynamicProps;for(let de=0;de{K&&Rt(K,b,h,f),z&&sn(h,f,b,"updated")},k)},se=(f,h,b,k,v,_,P)=>{for(let C=0;C{if(h!==b){if(h!==le)for(const _ in h)!Pn(_)&&!(_ in b)&&i(f,_,h[_],null,v,k);for(const _ in b){if(Pn(_))continue;const P=b[_],C=h[_];P!==C&&_!=="value"&&i(f,_,C,P,v,k)}"value"in b&&i(f,"value",h.value,b.value,v)}},D=(f,h,b,k,v,_,P,C,A)=>{const S=h.el=f?f.el:a(""),z=h.anchor=f?f.anchor:a("");let{patchFlag:I,dynamicChildren:V,slotScopeIds:K}=h;K&&(C=C?C.concat(K):K),f==null?(s(S,b,k),s(z,b,k),ee(h.children||[],b,z,v,_,P,C,A)):I>0&&I&64&&V&&f.dynamicChildren?(se(f.dynamicChildren,V,b,v,_,P,C),(h.key!=null||v&&h===v.subTree)&&el(f,h,!0)):he(f,h,b,z,v,_,P,C,A)},Z=(f,h,b,k,v,_,P,C,A)=>{h.slotScopeIds=C,f==null?h.shapeFlag&512?v.ctx.activate(h,b,k,P,A):Se(h,b,k,v,_,P,A):je(f,h,A)},Se=(f,h,b,k,v,_,P)=>{const C=f.component=gu(f,k,v);if(ur(f)&&(C.ctx.renderer=Ie),mu(C,!1,P),C.asyncDep){if(v&&v.registerDep(C,te,P),!f.el){const A=C.subTree=Me(Ye);m(null,A,h,b),f.placeholder=A.el}}else te(C,f,h,b,v,_,P)},je=(f,h,b)=>{const k=h.component=f.component;if(lu(f,h,b))if(k.asyncDep&&!k.asyncResolved){R(k,h,b);return}else k.next=h,k.update();else h.el=f.el,k.vnode=h},te=(f,h,b,k,v,_,P)=>{const C=()=>{if(f.isMounted){let{next:I,bu:V,u:K,parent:ne,vnode:de}=f;{const at=tl(f);if(at){I&&(I.el=de.el,R(f,I,P)),at.asyncDep.then(()=>{f.isUnmounted||C()});return}}let ie=I,ke;rn(f,!1),I?(I.el=de.el,R(f,I,P)):I=de,V&&rs(V),(ke=I.props&&I.props.onVnodeBeforeUpdate)&&Rt(ke,ne,I,de),rn(f,!0);const De=sl(f),ot=f.subTree;f.subTree=De,x(ot,De,d(ot.el),ye(ot),f,v,_),I.el=De.el,ie===null&&ou(f,De.el),K&&it(K,v),(ke=I.props&&I.props.onVnodeUpdated)&&it(()=>Rt(ke,ne,I,de),v)}else{let I;const{el:V,props:K}=h,{bm:ne,m:de,parent:ie,root:ke,type:De}=f,ot=Hn(h);rn(f,!1),ne&&rs(ne),!ot&&(I=K&&K.onVnodeBeforeMount)&&Rt(I,ie,h),rn(f,!0);{ke.ce&&ke.ce._def.shadowRoot!==!1&&ke.ce._injectChildStyle(De);const at=f.subTree=sl(f);x(null,at,b,k,f,v,_),h.el=at.el}if(de&&it(de,v),!ot&&(I=K&&K.onVnodeMounted)){const at=h;it(()=>Rt(I,ie,at),v)}(h.shapeFlag&256||ie&&Hn(ie.vnode)&&ie.vnode.shapeFlag&256)&&f.a&&it(f.a,v),f.isMounted=!0,h=b=k=null}};f.scope.on();const A=f.effect=new ui(C);f.scope.off();const S=f.update=A.run.bind(A),z=f.job=A.runIfDirty.bind(A);z.i=f,z.id=f.uid,A.scheduler=()=>lr(z),rn(f,!0),S()},R=(f,h,b)=>{h.component=f;const k=f.vnode.props;f.vnode=h,f.next=null,ja(f,h.props,k,b),Ga(f,h.children,b),It(),Oi(f),Ot()},he=(f,h,b,k,v,_,P,C,A=!1)=>{const S=f&&f.children,z=f?f.shapeFlag:0,I=h.children,{patchFlag:V,shapeFlag:K}=h;if(V>0){if(V&128){re(S,I,b,k,v,_,P,C,A);return}else if(V&256){Le(S,I,b,k,v,_,P,C,A);return}}K&8?(z&16&&Qe(S,v,_),I!==S&&u(b,I)):z&16?K&16?re(S,I,b,k,v,_,P,C,A):Qe(S,v,_,!0):(z&8&&u(b,""),K&16&&ee(I,b,k,v,_,P,C,A))},Le=(f,h,b,k,v,_,P,C,A)=>{f=f||mt,h=h||mt;const S=f.length,z=h.length,I=Math.min(S,z);let V;for(V=0;Vz?Qe(f,v,_,!0,!1,I):ee(h,b,k,v,_,P,C,A,I)},re=(f,h,b,k,v,_,P,C,A)=>{let S=0;const z=h.length;let I=f.length-1,V=z-1;for(;S<=I&&S<=V;){const K=f[S],ne=h[S]=A?Yt(h[S]):At(h[S]);if(on(K,ne))x(K,ne,b,null,v,_,P,C,A);else break;S++}for(;S<=I&&S<=V;){const K=f[I],ne=h[V]=A?Yt(h[V]):At(h[V]);if(on(K,ne))x(K,ne,b,null,v,_,P,C,A);else break;I--,V--}if(S>I){if(S<=V){const K=V+1,ne=KV)for(;S<=I;)ue(f[S],v,_,!0),S++;else{const K=S,ne=S,de=new Map;for(S=ne;S<=V;S++){const Ne=h[S]=A?Yt(h[S]):At(h[S]);Ne.key!=null&&de.set(Ne.key,S)}let ie,ke=0;const De=V-ne+1;let ot=!1,at=0;const Bt=new Array(De);for(S=0;S=De){ue(Ne,v,_,!0);continue}let Je;if(Ne.key!=null)Je=de.get(Ne.key);else for(ie=ne;ie<=V;ie++)if(Bt[ie-ne]===0&&on(Ne,h[ie])){Je=ie;break}Je===void 0?ue(Ne,v,_,!0):(Bt[Je-ne]=S+1,Je>=at?at=Je:ot=!0,x(Ne,h[Je],b,null,v,_,P,C,A),ke++)}const Jn=ot?Xa(Bt):mt;for(ie=Jn.length-1,S=De-1;S>=0;S--){const Ne=ne+S,Je=h[Ne],ut=h[Ne+1],Ht=Ne+1{const{el:_,type:P,transition:C,children:A,shapeFlag:S}=f;if(S&6){F(f.component.subTree,h,b,k);return}if(S&128){f.suspense.move(h,b,k);return}if(S&64){P.move(f,h,b,Ie);return}if(P===ze){s(_,h,b);for(let I=0;IC.enter(_),v);else{const{leave:I,delayLeave:V,afterLeave:K}=C,ne=()=>{f.ctx.isUnmounted?r(_):s(_,h,b)},de=()=>{I(_,()=>{ne(),K&&K()})};V?V(_,ne,de):de()}else s(_,h,b)},ue=(f,h,b,k=!1,v=!1)=>{const{type:_,props:P,ref:C,children:A,dynamicChildren:S,shapeFlag:z,patchFlag:I,dirs:V,cacheIndex:K}=f;if(I===-2&&(v=!1),C!=null&&(It(),Bn(C,null,b,f,!0),Ot()),K!=null&&(h.renderCache[K]=void 0),z&256){h.ctx.deactivate(f);return}const ne=z&1&&V,de=!Hn(f);let ie;if(de&&(ie=P&&P.onVnodeBeforeUnmount)&&Rt(ie,h,f),z&6)pe(f.component,b,k);else{if(z&128){f.suspense.unmount(b,k);return}ne&&sn(f,null,h,"beforeUnmount"),z&64?f.type.remove(f,h,b,Ie,k):S&&!S.hasOnce&&(_!==ze||I>0&&I&64)?Qe(S,h,b,!1,!0):(_===ze&&I&384||!v&&z&16)&&Qe(A,h,b),k&&ge(f)}(de&&(ie=P&&P.onVnodeUnmounted)||ne)&&it(()=>{ie&&Rt(ie,h,f),ne&&sn(f,null,h,"unmounted")},b)},ge=f=>{const{type:h,el:b,anchor:k,transition:v}=f;if(h===ze){Te(b,k);return}if(h===mr){$(f);return}const _=()=>{r(b),v&&!v.persisted&&v.afterLeave&&v.afterLeave()};if(f.shapeFlag&1&&v&&!v.persisted){const{leave:P,delayLeave:C}=v,A=()=>P(b,_);C?C(f.el,_,A):A()}else _()},Te=(f,h)=>{let b;for(;f!==h;)b=g(f),r(f),f=b;r(h)},pe=(f,h,b)=>{const{bum:k,scope:v,job:_,subTree:P,um:C,m:A,a:S,parent:z,slots:{__:I}}=f;nl(A),nl(S),k&&rs(k),z&&Q(I)&&I.forEach(V=>{z.renderCache[V]=void 0}),v.stop(),_&&(_.flags|=8,ue(P,f,h,b)),C&&it(C,h),it(()=>{f.isUnmounted=!0},h),h&&h.pendingBranch&&!h.isUnmounted&&f.asyncDep&&!f.asyncResolved&&f.suspenseId===h.pendingId&&(h.deps--,h.deps===0&&h.resolve())},Qe=(f,h,b,k=!1,v=!1,_=0)=>{for(let P=_;P{if(f.shapeFlag&6)return ye(f.component.subTree);if(f.shapeFlag&128)return f.suspense.next();const h=g(f.anchor||f.el),b=h&&h[Ia];return b?g(b):h};let j=!1;const st=(f,h,b)=>{f==null?h._vnode&&ue(h._vnode,null,null,!0):x(h._vnode||null,f,h,null,null,null,b),h._vnode=f,j||(j=!0,Oi(),Mi(),j=!1)},Ie={p:x,um:ue,m:F,r:ge,mt:Se,mc:ee,pc:he,pbc:se,n:ye,o:e};return{render:st,hydrate:void 0,createApp:Ha(st)}}function gr({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function rn({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Za(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function el(e,t,n=!1){const s=e.children,r=t.children;if(Q(s)&&Q(r))for(let i=0;i>1,e[n[a]]0&&(t[s]=n[i-1]),n[i]=s)}}for(i=n.length,l=n[i-1];i-- >0;)n[i]=l,l=t[l];return n}function tl(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:tl(t)}function nl(e){if(e)for(let t=0;tza(Qa);function ln(e,t,n){return eu(e,t,n)}function eu(e,t,n=le){const{immediate:s,deep:r,flush:i,once:l}=n,a=bt({},n),o=t&&s||!t&&i!=="post";let c;if(qn){if(i==="sync"){const y=Ja();c=y.__watcherHandles||(y.__watcherHandles=[])}else if(!o){const y=()=>{};return y.stop=Jt,y.resume=Jt,y.pause=Jt,y}}const u=Zt;a.call=(y,E,x)=>Tt(y,u,E,x);let d=!1;i==="post"?a.scheduler=y=>{it(y,u&&u.suspense)}:i!=="sync"&&(d=!0,a.scheduler=(y,E)=>{E?y():lr(y)}),a.augmentJob=y=>{t&&(y.flags|=4),d&&(y.flags|=2,u&&(y.id=u.uid,y.i=u))};const g=_a(e,t,a);return qn&&(c?c.push(g):o&&g()),g}const tu=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${jt(t)}Modifiers`]||e[`${en(t)}Modifiers`];function nu(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||le;let r=n;const i=t.startsWith("update:"),l=i&&tu(s,t.slice(7));l&&(l.trim&&(r=n.map(u=>Ce(u)?u.trim():u)),l.number&&(r=n.map(Vs)));let a,o=s[a=Us(t)]||s[a=Us(jt(t))];!o&&i&&(o=s[a=Us(en(t))]),o&&Tt(o,e,6,r);const c=s[a+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,Tt(c,e,6,r)}}function su(e,t,n=!1){const s=t.emitsCache,r=s.get(e);if(r!==void 0)return r;const i=e.emits;let l={};return i?(Q(i)?i.forEach(a=>l[a]=null):bt(l,i),Re(e)&&s.set(e,l),l):(Re(e)&&s.set(e,null),null)}function vs(e,t){return!e||!ts(t)?!1:(t=t.slice(2).replace(/Once$/,""),me(e,t[0].toLowerCase()+t.slice(1))||me(e,en(t))||me(e,t))}function Ed(){}function sl(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[i],slots:l,attrs:a,emit:o,render:c,renderCache:u,props:d,data:g,setupState:y,ctx:E,inheritAttrs:x}=e,M=bs(e);let m,H;try{if(n.shapeFlag&4){const $=r||s,U=$;m=At(c.call(U,$,u,d,y,g,E)),H=a}else{const $=t;m=At($.length>1?$(d,{attrs:a,slots:l,emit:o}):$(d,null)),H=t.props?a:ru(a)}}catch($){jn.length=0,gs($,e,1),m=Me(Ye)}let Y=m;if(H&&x!==!1){const $=Object.keys(H),{shapeFlag:U}=Y;$.length&&U&7&&(i&&$.some(Hs)&&(H=iu(H,i)),Y=Kt(Y,H,!1,!0))}return n.dirs&&(Y=Kt(Y,null,!1,!0),Y.dirs=Y.dirs?Y.dirs.concat(n.dirs):n.dirs),n.transition&&Fn(Y,n.transition),m=Y,bs(M),m}const ru=e=>{let t;for(const n in e)(n==="class"||n==="style"||ts(n))&&((t||(t={}))[n]=e[n]);return t},iu=(e,t)=>{const n={};for(const s in e)(!Hs(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function lu(e,t,n){const{props:s,children:r,component:i}=e,{props:l,children:a,patchFlag:o}=t,c=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&o>=0){if(o&1024)return!0;if(o&16)return s?rl(s,l,c):!!l;if(o&8){const u=t.dynamicProps;for(let d=0;de.__isSuspense;function au(e,t){t&&t.pendingBranch?Q(e)?t.effects.push(...e):t.effects.push(e):Ca(e)}const ze=Symbol.for("v-fgt"),_s=Symbol.for("v-txt"),Ye=Symbol.for("v-cmt"),mr=Symbol.for("v-stc"),jn=[];let lt=null;function B(e=!1){jn.push(lt=e?null:[])}function uu(){jn.pop(),lt=jn[jn.length-1]||null}let Vn=1;function ll(e,t=!1){Vn+=e,e<0&<&&t&&(lt.hasOnce=!0)}function ol(e){return e.dynamicChildren=Vn>0?lt||mt:null,uu(),Vn>0&<&<.push(e),e}function G(e,t,n,s,r,i){return ol(w(e,t,n,s,r,i,!0))}function Et(e,t,n,s,r){return ol(Me(e,t,n,s,r,!0))}function Ts(e){return e?e.__v_isVNode===!0:!1}function on(e,t){return e.type===t.type&&e.key===t.key}const al=({key:e})=>e!=null?e:null,ks=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Ce(e)||qe(e)||be(e)?{i:ft,r:e,k:t,f:!!n}:e:null);function w(e,t=null,n=null,s=0,r=null,i=e===ze?0:1,l=!1,a=!1){const o={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&al(t),ref:t&&ks(t),scopeId:$i,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:ft};return a?(br(o,n),i&128&&e.normalize(o)):n&&(o.shapeFlag|=Ce(n)?8:16),Vn>0&&!l&<&&(o.patchFlag>0||i&6)&&o.patchFlag!==32&<.push(o),o}const Me=cu;function cu(e,t=null,n=null,s=0,r=null,i=!1){if((!e||e===Na)&&(e=Ye),Ts(e)){const a=Kt(e,t,!0);return n&&br(a,n),Vn>0&&!i&<&&(a.shapeFlag&6?lt[lt.indexOf(e)]=a:lt.push(a)),a.patchFlag=-2,a}if(Tu(e)&&(e=e.__vccOpts),t){t=fu(t);let{class:a,style:o}=t;a&&!Ce(a)&&(t.class=we(a)),Re(o)&&(rr(o)&&!Q(o)&&(o=bt({},o)),t.style=qs(o))}const l=Ce(e)?1:il(e)?128:Ni(e)?64:Re(e)?4:be(e)?2:0;return w(e,t,n,s,r,l,i,!0)}function fu(e){return e?rr(e)||Ki(e)?bt({},e):e:null}function Kt(e,t,n=!1,s=!1){const{props:r,ref:i,patchFlag:l,children:a,transition:o}=e,c=t?pu(r||{},t):r,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&al(c),ref:t&&t.ref?n&&i?Q(i)?i.concat(ks(t)):[i,ks(t)]:ks(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ze?l===-1?16:l|16:l,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:o,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Kt(e.ssContent),ssFallback:e.ssFallback&&Kt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return o&&s&&Fn(u,o.clone(u)),u}function Ss(e=" ",t=0){return Me(_s,null,e,t)}function We(e="",t=!1){return t?(B(),Et(Ye,null,e)):Me(Ye,null,e)}function At(e){return e==null||typeof e=="boolean"?Me(Ye):Q(e)?Me(ze,null,e.slice()):Ts(e)?Yt(e):Me(_s,null,String(e))}function Yt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Kt(e)}function br(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(Q(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),br(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!Ki(t)?t._ctx=ft:r===3&&ft&&(ft.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else be(t)?(t={default:t,_ctx:ft},n=32):(t=String(t),s&64?(n=16,t=[Ss(t)]):n=8);e.children=t,e.shapeFlag|=n}function pu(...e){const t={};for(let n=0;nZt||ft;let Es,xr;{const e=is(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),i=>{r.length>1?r.forEach(l=>l(i)):r[0](i)}};Es=t("__VUE_INSTANCE_SETTERS__",n=>Zt=n),xr=t("__VUE_SSR_SETTERS__",n=>qn=n)}const yr=e=>{const t=Zt;return Es(e),e.scope.on(),()=>{e.scope.off(),Es(t)}},cl=()=>{Zt&&Zt.scope.off(),Es(null)};function fl(e){return e.vnode.shapeFlag&4}let qn=!1;function mu(e,t=!1,n=!1){t&&xr(t);const{props:s,children:r}=e.vnode,i=fl(e);Ua(e,s,i,t),Wa(e,r,n||t);const l=i?bu(e,t):void 0;return t&&xr(!1),l}function bu(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Fa);const{setup:s}=n;if(s){It();const r=e.setupContext=s.length>1?yu(e):null,i=yr(e),l=bn(s,e,0,[e.props,r]),a=ti(l);if(Ot(),i(),(a||e.sp)&&!Hn(e)&&$a(e),a){if(l.then(cl,cl),t)return l.then(o=>{pl(e,o)}).catch(o=>{gs(o,e,0)});e.asyncDep=l}else pl(e,l)}else dl(e)}function pl(e,t,n){be(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Re(t)&&(e.setupState=Ri(t)),dl(e)}function dl(e,t,n){const s=e.type;e.render||(e.render=s.render||Jt)}const xu={get(e,t){return Ve(e,"get",""),e[t]}};function yu(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,xu),slots:e.slots,emit:e.emit,expose:t}}function As(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Ri(ha(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Un)return Un[n](e)},has(t,n){return n in t||n in Un}})):e.proxy}const wu=/(?:^|[-_])(\w)/g,vu=e=>e.replace(wu,t=>t.toUpperCase()).replace(/[-_]/g,"");function _u(e,t=!0){return be(e)?e.displayName||e.name:e.name||t&&e.__name}function hl(e,t,n=!1){let s=_u(t);if(!s&&t.__file){const r=t.__file.match(/([^/\\]+)\.\w+$/);r&&(s=r[1])}if(!s&&e&&e.parent){const r=i=>{for(const l in i)if(i[l]===t)return l};s=r(e.components||e.parent.type.components)||r(e.appContext.components)}return s?vu(s):n?"App":"Anonymous"}function Tu(e){return be(e)&&"__vccOpts"in e}const Ee=(e,t)=>wa(e,t,qn);function ku(e,t,n){const s=arguments.length;return s===2?Re(t)&&!Q(t)?Ts(t)?Me(e,null,[t]):Me(e,t):Me(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&Ts(n)&&(n=[n]),Me(e,t,n))}const Su="3.5.18";let wr;const gl=typeof window!="undefined"&&window.trustedTypes;if(gl)try{wr=gl.createPolicy("vue",{createHTML:e=>e})}catch{}const ml=wr?e=>wr.createHTML(e):e=>e,Eu="http://www.w3.org/2000/svg",Au="http://www.w3.org/1998/Math/MathML",Dt=typeof document!="undefined"?document:null,bl=Dt&&Dt.createElement("template"),Ru={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?Dt.createElementNS(Eu,e):t==="mathml"?Dt.createElementNS(Au,e):n?Dt.createElement(e,{is:n}):Dt.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>Dt.createTextNode(e),createComment:e=>Dt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Dt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,i){const l=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===i||!(r=r.nextSibling)););else{bl.innerHTML=ml(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const a=bl.content;if(s==="svg"||s==="mathml"){const o=a.firstChild;for(;o.firstChild;)a.appendChild(o.firstChild);a.removeChild(o)}t.insertBefore(a,n)}return[l?l.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Xt="transition",Wn="animation",Gn=Symbol("_vtc"),xl={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Cu=bt({},Fi,xl),Pu=(e=>(e.displayName="Transition",e.props=Cu,e))((e,{slots:t})=>ku(La,Iu(e),t)),an=(e,t=[])=>{Q(e)?e.forEach(n=>n(...t)):e&&e(...t)},yl=e=>e?Q(e)?e.some(t=>t.length>1):e.length>1:!1;function Iu(e){const t={};for(const D in e)D in xl||(t[D]=e[D]);if(e.css===!1)return t;const{name:n="v",type:s,duration:r,enterFromClass:i=`${n}-enter-from`,enterActiveClass:l=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:o=i,appearActiveClass:c=l,appearToClass:u=a,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:g=`${n}-leave-active`,leaveToClass:y=`${n}-leave-to`}=e,E=Ou(r),x=E&&E[0],M=E&&E[1],{onBeforeEnter:m,onEnter:H,onEnterCancelled:Y,onLeave:$,onLeaveCancelled:U,onBeforeAppear:L=m,onAppear:O=H,onAppearCancelled:ee=Y}=t,q=(D,Z,Se,je)=>{D._enterCancelled=je,un(D,Z?u:a),un(D,Z?c:l),Se&&Se()},se=(D,Z)=>{D._isLeaving=!1,un(D,d),un(D,y),un(D,g),Z&&Z()},fe=D=>(Z,Se)=>{const je=D?O:H,te=()=>q(Z,D,Se);an(je,[Z,te]),wl(()=>{un(Z,D?o:i),Nt(Z,D?u:a),yl(je)||vl(Z,s,x,te)})};return bt(t,{onBeforeEnter(D){an(m,[D]),Nt(D,i),Nt(D,l)},onBeforeAppear(D){an(L,[D]),Nt(D,o),Nt(D,c)},onEnter:fe(!1),onAppear:fe(!0),onLeave(D,Z){D._isLeaving=!0;const Se=()=>se(D,Z);Nt(D,d),D._enterCancelled?(Nt(D,g),kl()):(kl(),Nt(D,g)),wl(()=>{D._isLeaving&&(un(D,d),Nt(D,y),yl($)||vl(D,s,M,Se))}),an($,[D,Se])},onEnterCancelled(D){q(D,!1,void 0,!0),an(Y,[D])},onAppearCancelled(D){q(D,!0,void 0,!0),an(ee,[D])},onLeaveCancelled(D){se(D),an(U,[D])}})}function Ou(e){if(e==null)return null;if(Re(e))return[vr(e.enter),vr(e.leave)];{const t=vr(e);return[t,t]}}function vr(e){return zo(e)}function Nt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Gn]||(e[Gn]=new Set)).add(t)}function un(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[Gn];n&&(n.delete(t),n.size||(e[Gn]=void 0))}function wl(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Mu=0;function vl(e,t,n,s){const r=e._endId=++Mu,i=()=>{r===e._endId&&s()};if(n!=null)return setTimeout(i,n);const{type:l,timeout:a,propCount:o}=Lu(e,t);if(!l)return s();const c=l+"end";let u=0;const d=()=>{e.removeEventListener(c,g),i()},g=y=>{y.target===e&&++u>=o&&d()};setTimeout(()=>{u(n[E]||"").split(", "),r=s(`${Xt}Delay`),i=s(`${Xt}Duration`),l=_l(r,i),a=s(`${Wn}Delay`),o=s(`${Wn}Duration`),c=_l(a,o);let u=null,d=0,g=0;t===Xt?l>0&&(u=Xt,d=l,g=i.length):t===Wn?c>0&&(u=Wn,d=c,g=o.length):(d=Math.max(l,c),u=d>0?l>c?Xt:Wn:null,g=u?u===Xt?i.length:o.length:0);const y=u===Xt&&/\b(transform|all)(,|$)/.test(s(`${Xt}Property`).toString());return{type:u,timeout:d,propCount:g,hasTransform:y}}function _l(e,t){for(;e.lengthTl(n)+Tl(e[s])))}function Tl(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function kl(){return document.body.offsetHeight}function $u(e,t,n){const s=e[Gn];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Sl=Symbol("_vod"),Du=Symbol("_vsh"),Nu=Symbol(""),Fu=/(^|;)\s*display\s*:/;function Bu(e,t,n){const s=e.style,r=Ce(n);let i=!1;if(n&&!r){if(t)if(Ce(t))for(const l of t.split(";")){const a=l.slice(0,l.indexOf(":")).trim();n[a]==null&&Rs(s,a,"")}else for(const l in t)n[l]==null&&Rs(s,l,"");for(const l in n)l==="display"&&(i=!0),Rs(s,l,n[l])}else if(r){if(t!==n){const l=s[Nu];l&&(n+=";"+l),s.cssText=n,i=Fu.test(n)}}else t&&e.removeAttribute("style");Sl in e&&(e[Sl]=i?s.display:"",e[Du]&&(s.display="none"))}const El=/\s*!important$/;function Rs(e,t,n){if(Q(n))n.forEach(s=>Rs(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=Hu(e,t);El.test(n)?e.setProperty(en(s),n.replace(El,""),"important"):e[s]=n}}const Al=["Webkit","Moz","ms"],_r={};function Hu(e,t){const n=_r[t];if(n)return n;let s=jt(t);if(s!=="filter"&&s in e)return _r[t]=s;s=ri(s);for(let r=0;rTr||(Vu.then(()=>Tr=0),Tr=Date.now());function Wu(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;Tt(Gu(s,n.value),t,5,[s])};return n.value=e,n.attached=qu(),n}function Gu(e,t){if(Q(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>r=>!r._stopped&&s&&s(r))}else return t}const Ml=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Ku=(e,t,n,s,r,i)=>{const l=r==="svg";t==="class"?$u(e,s,l):t==="style"?Bu(e,n,s):ts(t)?Hs(t)||Uu(e,t,n,s,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Yu(e,t,s,l))?(Pl(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Cl(e,t,s,l,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Ce(s))?Pl(e,jt(t),s,i,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Cl(e,t,s,l))};function Yu(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Ml(t)&&be(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return Ml(t)&&Ce(n)?!1:t in e}const Ll=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Q(t)?n=>rs(t,n):t};function Zu(e){e.target.composing=!0}function $l(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const kr=Symbol("_assign"),Xu={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e[kr]=Ll(r);const i=s||r.props&&r.props.type==="number";vn(e,t?"change":"input",l=>{if(l.target.composing)return;let a=e.value;n&&(a=a.trim()),i&&(a=Vs(a)),e[kr](a)}),n&&vn(e,"change",()=>{e.value=e.value.trim()}),t||(vn(e,"compositionstart",Zu),vn(e,"compositionend",$l),vn(e,"change",$l))},mounted(e,{value:t}){e.value=t==null?"":t},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:r,number:i}},l){if(e[kr]=Ll(l),e.composing)return;const a=(i||e.type==="number")&&!/^0\d/.test(e.value)?Vs(e.value):e.value,o=t==null?"":t;a!==o&&(document.activeElement===e&&e.type!=="range"&&(s&&t===n||r&&e.value.trim()===o)||(e.value=o))}},Qu=["ctrl","shift","alt","meta"],Ju={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Qu.some(n=>e[`${n}Key`]&&!t.includes(n))},dt=(e,t)=>{const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(r,...i)=>{for(let l=0;l{const t=tc().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=rc(s);if(!r)return;const i=t._component;!be(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const l=n(r,!1,sc(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),l},t};function sc(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function rc(e){return Ce(e)?document.querySelector(e):e}const ic=["aria-pressed"],lc={key:0,viewBox:"0 0 24 24",width:"20",height:"20","aria-hidden":"true"},oc={key:1,viewBox:"0 0 24 24",width:"18",height:"18","aria-hidden":"true",fill:"none"},ac={__name:"ChatbotToggler",props:{isOpen:{type:Boolean,required:!0}},emits:["toggle"],setup(e){return(t,n)=>(B(),G("button",{class:"fixed bottom-5 right-5 z-9999 grid h-12 w-12 appearance-none place-items-center rounded-full border border-white/20 bg-gradient-to-br from-brand-500 to-brand-600 text-white shadow-[0_20px_36px_-20px_rgba(109,79,194,0.85)] transition-all duration-250 hover:-translate-y-0.5 hover:from-brand-600 hover:to-violet-700 hover:shadow-[0_22px_40px_-22px_rgba(109,79,194,1)] focus:outline-none max-[600px]:bottom-3 max-[600px]:right-3 max-[600px]:h-13 max-[600px]:w-13",style:{"border-radius":"9999px"},"aria-pressed":e.isOpen?"true":"false",onClick:n[0]||(n[0]=s=>t.$emit("toggle"))},[e.isOpen?(B(),G("svg",oc,n[2]||(n[2]=[w("path",{d:"M6 6l12 12M18 6L6 18",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"},null,-1)]))):(B(),G("svg",lc,n[1]||(n[1]=[w("path",{d:"M4 4h16a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H8l-4 4v-4H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z",fill:"currentColor",stroke:"currentColor","stroke-width":"2","stroke-linecap":"miter","stroke-linejoin":"miter"},null,-1)])))],8,ic))}},uc={class:"chat-header relative flex min-h-14 items-center justify-between px-4 pb-2.5 pt-3 text-white sm:px-5"},cc={class:"flex min-w-0 flex-1 items-center gap-2 sm:gap-2.5"},fc={xmlns:"http://www.w3.org/2000/svg",width:"35",height:"35",viewBox:"0 0 1024 1024",class:"h-8 w-8 shrink-0 rounded-full bg-white p-1.5 shadow-md motion-safe:animate-soft-float",style:{fill:"#6d4fc2"}},pc={class:"ml-2 flex items-center gap-1.5"},dc=["title"],hc=["title","aria-label"],gc={key:0,viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},mc={key:1,viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},bc=["title","aria-label"],xc={key:0,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},yc={key:1,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},wc={key:2,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},vc={__name:"ChatHeader",props:{windowMode:{type:String,required:!0},autoReadEnabled:{type:Boolean,required:!0},activeTtsProvider:{type:String,required:!0}},emits:["close","cycleResize","toggleAutoRead"],setup(e){const t=e,n={default:"Compact",half:"Half Screen",full:"Full Screen"},s=Ee(()=>n[t.windowMode]||"Compact"),r=Ee(()=>t.windowMode==="default"?"Half Screen":t.windowMode==="half"?"Full Screen":"Compact"),i=Ee(()=>t.activeTtsProvider==="polly"?"TTS: Polly":t.activeTtsProvider==="browser"?"TTS: Browser":"TTS: Off"),l=Ee(()=>t.activeTtsProvider==="polly"?"bg-emerald-500/45":t.activeTtsProvider==="browser"?"bg-amber-500/45":"bg-slate-500/35");return(a,o)=>(B(),G("div",uc,[w("div",cc,[(B(),G("svg",fc,o[3]||(o[3]=[w("path",{d:"M738.3 287.6H285.7c-59 0-106.8 47.8-106.8 106.8v303.1c0 59 47.8 106.8 106.8 106.8h81.5v111.1c0 .7.8 1.1 1.4.7l166.9-110.6 41.8-.8h117.4l43.6-.4c59 0 106.8-47.8 106.8-106.8V394.5c0-59-47.8-106.9-106.8-106.9zM351.7 448.2c0-29.5 23.9-53.5 53.5-53.5s53.5 23.9 53.5 53.5-23.9 53.5-53.5 53.5-53.5-23.9-53.5-53.5zm157.9 267.1c-67.8 0-123.8-47.5-132.3-109h264.6c-8.6 61.5-64.5 109-132.3 109zm110-213.7c-29.5 0-53.5-23.9-53.5-53.5s23.9-53.5 53.5-53.5 53.5 23.9 53.5 53.5-23.9 53.5-53.5 53.5zM867.2 644.5V453.1h26.5c19.4 0 35.1 15.7 35.1 35.1v121.1c0 19.4-15.7 35.1-35.1 35.1h-26.5zM95.2 609.4V488.2c0-19.4 15.7-35.1 35.1-35.1h26.5v191.3h-26.5c-19.4 0-35.1-15.7-35.1-35.1zM561.5 149.6c0 23.4-15.6 43.3-36.9 49.7v44.9h-30v-44.9c-21.4-6.5-36.9-26.3-36.9-49.7 0-28.6 23.3-51.9 51.9-51.9s51.9 23.3 51.9 51.9z"},null,-1)]))),o[4]||(o[4]=w("h2",{class:"truncate text-xs font-semibold tracking-[0.01em] sm:text-base text-white/95"},"ChangAI from ERPGulf",-1))]),w("div",pc,[w("span",{class:we(["hidden rounded-full border border-white/25 px-2 py-1 text-[10px] font-semibold uppercase tracking-wide text-white/95 shadow-sm backdrop-blur-sm sm:inline",l.value]),title:`TTS provider: ${i.value}`},et(i.value),11,dc),w("button",{class:we(["h-8 min-w-8 appearance-none items-center justify-center rounded-md border border-white/20 px-2 text-xs font-semibold text-white/90 transition-all duration-200 focus:outline-none sm:flex",e.autoReadEnabled?"bg-white/24 shadow-sm":"hover:bg-white/15"]),style:{"border-radius":"0.375rem"},title:e.autoReadEnabled?"Auto speech on":"Auto speech off","aria-label":e.autoReadEnabled?"Turn off auto speech":"Turn on auto speech",onClick:o[0]||(o[0]=c=>a.$emit("toggleAutoRead"))},[e.autoReadEnabled?(B(),G("svg",gc,o[5]||(o[5]=[w("path",{d:"M11 5L6 9H3v6h3l5 4V5z"},null,-1),w("path",{d:"M15 9a4 4 0 0 1 0 6"},null,-1),w("path",{d:"M18 7a7 7 0 0 1 0 10"},null,-1)]))):(B(),G("svg",mc,o[6]||(o[6]=[w("path",{d:"M11 5L6 9H3v6h3l5 4V5z"},null,-1),w("path",{d:"M22 9l-6 6"},null,-1),w("path",{d:"M16 9l6 6"},null,-1)])))],10,hc),w("button",{class:we(["flex h-8 min-w-8 appearance-none items-center justify-center rounded-md border border-white/20 px-2 text-xs font-semibold text-white/90 transition-all duration-200 focus:outline-none","bg-white/20 shadow-sm hover:bg-white/25"]),style:{"border-radius":"0.375rem"},title:`Resize mode: ${s.value} (click to ${r.value})`,"aria-label":`Resize mode ${s.value}. Click to switch to ${r.value}`,onClick:o[1]||(o[1]=c=>a.$emit("cycleResize"))},[e.windowMode==="default"?(B(),G("svg",xc,o[7]||(o[7]=[w("rect",{x:"7",y:"8",width:"10",height:"8",rx:"2"},null,-1)]))):e.windowMode==="half"?(B(),G("svg",yc,o[8]||(o[8]=[w("rect",{x:"4",y:"5",width:"16",height:"14",rx:"2"},null,-1),w("path",{d:"M12 5v14"},null,-1)]))):(B(),G("svg",wc,o[9]||(o[9]=[w("rect",{x:"4",y:"5",width:"16",height:"14",rx:"2"},null,-1),w("path",{d:"M8 8H6v2M16 8h2v2M8 16H6v-2M16 16h2v-2"},null,-1)])))],8,bc),w("button",{class:"grid h-8 w-8 shrink-0 appearance-none place-items-center rounded-full border border-white/20 text-white transition-all duration-200 hover:scale-105 hover:bg-white/20 focus:outline-none focus-visible:ring-2 focus-visible:ring-white/70",style:{"border-radius":"9999px"},"aria-label":"Close chatbot",onClick:o[2]||(o[2]=c=>a.$emit("close"))},o[10]||(o[10]=[w("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",width:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[w("path",{d:"M6 9l6 6 6-6"})],-1)]))])]))}},_c={class:"flex gap-1.5 border-b border-slate-200/80 px-2.5 pb-2.5 pt-1"},Tc=["onClick"],kc={class:"inline-flex items-center gap-1.5"},Sc={__name:"TabBar",props:{modelValue:{type:String,required:!0},debugEnabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e){const t=e,n=Ee(()=>{const s=[{id:"chat",label:"Chats"},{id:"debug",label:"Debug"},{id:"support",label:"Support"},{id:"settings",label:"Settings"}];return t.debugEnabled?s:s.filter(r=>r.id!=="debug")});return(s,r)=>(B(),G("div",_c,[(B(!0),G(ze,null,ws(n.value,i=>(B(),G("button",{key:i.id,class:we(["group min-w-0 flex-1 h-9 appearance-none rounded-lg border border-transparent bg-transparent px-2 text-xs font-semibold transition-all duration-200 focus:outline-none",e.modelValue===i.id?"border-white/30 bg-linear-to-r from-violet-300/36 via-indigo-300/30 to-sky-300/28 text-white shadow-[0_4px_10px_rgba(20,24,40,0.22)]":"text-white/80 hover:border-white/25 hover:bg-white/12 hover:text-white"]),onClick:l=>s.$emit("update:modelValue",i.id)},[w("span",kc,[w("span",{class:we(["h-1.5 w-1.5 rounded-full transition-colors duration-200",e.modelValue===i.id?"bg-white":"bg-white/40 group-hover:bg-white/70"])},null,2),Ss(" "+et(i.label),1)])],10,Tc))),128))]))}},Ec=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},Ac={},Rc={xmlns:"http://www.w3.org/2000/svg",width:"50",height:"50",viewBox:"0 0 1024 1024",class:"h-7.5 w-7.5 shrink-0 self-end rounded-full bg-gradient-to-br from-brand-500 to-brand-600 p-1.5 fill-white shadow-[0_10px_18px_-12px_rgba(109,79,194,0.85)]"};function Cc(e,t){return B(),G("svg",Rc,t[0]||(t[0]=[w("path",{d:"M738.3 287.6H285.7c-59 0-106.8 47.8-106.8 106.8v303.1c0 59 47.8 106.8 106.8 106.8h81.5v111.1c0 .7.8 1.1 1.4.7l166.9-110.6 41.8-.8h117.4l43.6-.4c59 0 106.8-47.8 106.8-106.8V394.5c0-59-47.8-106.9-106.8-106.9zM351.7 448.2c0-29.5 23.9-53.5 53.5-53.5s53.5 23.9 53.5 53.5-23.9 53.5-53.5 53.5-53.5-23.9-53.5-53.5zm157.9 267.1c-67.8 0-123.8-47.5-132.3-109h264.6c-8.6 61.5-64.5 109-132.3 109zm110-213.7c-29.5 0-53.5-23.9-53.5-53.5s23.9-53.5 53.5-53.5 53.5 23.9 53.5 53.5-23.9 53.5-53.5 53.5zM867.2 644.5V453.1h26.5c19.4 0 35.1 15.7 35.1 35.1v121.1c0 19.4-15.7 35.1-35.1 35.1h-26.5zM95.2 609.4V488.2c0-19.4 15.7-35.1 35.1-35.1h26.5v191.3h-26.5c-19.4 0-35.1-15.7-35.1-35.1zM561.5 149.6c0 23.4-15.6 43.3-36.9 49.7v44.9h-30v-44.9c-21.4-6.5-36.9-26.3-36.9-49.7 0-28.6 23.3-51.9 51.9-51.9s51.9 23.3 51.9 51.9z"},null,-1)]))}const Nl=Ec(Ac,[["render",Cc]]),Cs={PIPELINE:"changai.changai.api.v2.text2sql_pipeline_v2.run_text2sql_pipeline",SUPPORT:"changai.changai.api.v2.helpdesk_api.support_bot",SETTINGS:"changai.changai.api.v2.schema_utils.get_frontend_settings",TTS:"changai.changai.api.v2.tts.synthesize_tts"};function Fl(e,t={},n="actual"){return n==="test"?Promise.resolve({Bot:`[TEST MODE] ${JSON.stringify(t)}`}):!window.frappe||!window.frappe.call?Promise.reject(new Error("Frappe API is unavailable in actual mode.")):new Promise((s,r)=>{window.frappe.call({method:e,args:t,callback(i){s(i.message)},error(i){r(i)}})})}function Pc(e,t,n="actual",s=null,r){if(n==="test")return{promise:Promise.resolve({Bot:`[TEST MODE] ${JSON.stringify({user_question:e,chat_id:t,request_id:s,sendNonErptoAI:r})}`}),cancel:()=>!1};if(!window.frappe||!window.frappe.call)return{promise:Promise.reject(new Error("Frappe API is unavailable in actual mode.")),cancel:()=>!1};let i=null,l=!1;return{promise:new Promise((c,u)=>{i=window.frappe.call({method:Cs.PIPELINE,args:{user_question:e,chat_id:t,request_id:s,sendNonErptoAI:r},callback(d){l=!0,c(d.message)},error(d){l=!0,u(d)}})}),cancel:()=>l||!i||typeof i.abort!="function"?!1:(i.abort(),l=!0,!0)}}function Ic(e,t="actual"){if(t==="test")return{promise:Promise.resolve(`[TEST MODE] ${JSON.stringify({message:e})}`),cancel:()=>!1};if(!window.frappe||!window.frappe.call)return{promise:Promise.reject(new Error("Frappe API is unavailable in actual mode.")),cancel:()=>!1};let n=null,s=!1;return{promise:new Promise((l,a)=>{n=window.frappe.call({method:Cs.SUPPORT,args:{message:e},callback(o){s=!0,l(o.message)},error(o){s=!0,a(o)}})}),cancel:()=>s||!n||typeof n.abort!="function"?!1:(n.abort(),s=!0,!0)}}function Oc(e="actual"){return Fl(Cs.SETTINGS,{},e)}function Mc(e,t="Zayd",n="actual"){return Fl(Cs.TTS,{text:e,voice_id:t},n)}function Sr(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var cn=Sr();function Bl(e){cn=e}var fn={exec:()=>null};function oe(e,t=""){let n=typeof e=="string"?e:e.source,s={replace:(r,i)=>{let l=typeof i=="string"?i:i.source;return l=l.replace(Ge.caret,"$1"),n=n.replace(r,l),s},getRegex:()=>new RegExp(n,t)};return s}var Lc=((e="")=>{try{return!!new RegExp("(?<=1)(?/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},$c=/^(?:[ \t]*(?:\n|$))+/,Dc=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Nc=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Kn=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Fc=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Er=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Hl=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,zl=oe(Hl).replace(/bull/g,Er).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Bc=oe(Hl).replace(/bull/g,Er).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Ar=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Hc=/^[^\n]+/,Rr=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,zc=oe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Rr).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Uc=oe(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Er).getRegex(),Ps="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Cr=/|$))/,jc=oe("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Cr).replace("tag",Ps).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ul=oe(Ar).replace("hr",Kn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Ps).getRegex(),Vc=oe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ul).getRegex(),Pr={blockquote:Vc,code:Dc,def:zc,fences:Nc,heading:Fc,hr:Kn,html:jc,lheading:zl,list:Uc,newline:$c,paragraph:Ul,table:fn,text:Hc},jl=oe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Kn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Ps).getRegex(),qc={...Pr,lheading:Bc,table:jl,paragraph:oe(Ar).replace("hr",Kn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",jl).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Ps).getRegex()},Wc={...Pr,html:oe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Cr).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:fn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:oe(Ar).replace("hr",Kn).replace("heading",` *#{1,6} *[^ -]`).replace("lheading",zl).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Gc=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Kc=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Vl=/^( {2,}|\\)\n(?!\s*$)/,Yc=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`+)[^`]+\k(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Lc?"(?`+)[^`]+\k(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Wl=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,ef=oe(Wl,"u").replace(/punct/g,_n).getRegex(),tf=oe(Wl,"u").replace(/punct/g,ql).getRegex(),Gl="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",nf=oe(Gl,"gu").replace(/notPunctSpace/g,Ir).replace(/punctSpace/g,Is).replace(/punct/g,_n).getRegex(),sf=oe(Gl,"gu").replace(/notPunctSpace/g,Qc).replace(/punctSpace/g,Xc).replace(/punct/g,ql).getRegex(),rf=oe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Ir).replace(/punctSpace/g,Is).replace(/punct/g,_n).getRegex(),lf=oe(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,_n).getRegex(),of="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",af=oe(of,"gu").replace(/notPunctSpace/g,Ir).replace(/punctSpace/g,Is).replace(/punct/g,_n).getRegex(),uf=oe(/\\(punct)/,"gu").replace(/punct/g,_n).getRegex(),cf=oe(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),ff=oe(Cr).replace("(?:-->|$)","-->").getRegex(),pf=oe("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",ff).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Os=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,df=oe(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Os).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Kl=oe(/^!?\[(label)\]\[(ref)\]/).replace("label",Os).replace("ref",Rr).getRegex(),Yl=oe(/^!?\[(ref)\](?:\[\])?/).replace("ref",Rr).getRegex(),hf=oe("reflink|nolink(?!\\()","g").replace("reflink",Kl).replace("nolink",Yl).getRegex(),Zl=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Or={_backpedal:fn,anyPunctuation:uf,autolink:cf,blockSkip:Jc,br:Vl,code:Kc,del:fn,delLDelim:fn,delRDelim:fn,emStrongLDelim:ef,emStrongRDelimAst:nf,emStrongRDelimUnd:rf,escape:Gc,link:df,nolink:Yl,punctuation:Zc,reflink:Kl,reflinkSearch:hf,tag:pf,text:Yc,url:fn},gf={...Or,link:oe(/^!?\[(label)\]\((.*?)\)/).replace("label",Os).getRegex(),reflink:oe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Os).getRegex()},Mr={...Or,emStrongRDelimAst:sf,emStrongLDelim:tf,delLDelim:lf,delRDelim:af,url:oe(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Zl).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:oe(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},Xl=e=>bf[e];function Ct(e,t){if(t){if(Ge.escapeTest.test(e))return e.replace(Ge.escapeReplace,Xl)}else if(Ge.escapeTestNoEncode.test(e))return e.replace(Ge.escapeReplaceNoEncode,Xl);return e}function Ql(e){try{e=encodeURI(e).replace(Ge.percentDecode,"%")}catch{return null}return e}function Jl(e,t){var i;let n=e.replace(Ge.findPipe,(l,a,o)=>{let c=!1,u=a;for(;--u>=0&&o[u]==="\\";)c=!c;return c?"|":" |"}),s=n.split(Ge.splitPipe),r=0;if(s[0].trim()||s.shift(),s.length>0&&!((i=s.at(-1))!=null&&i.trim())&&s.pop(),t)if(s.length>t)s.splice(t);else for(;s.length=0&&Ge.blankLine.test(t[n]);)n--;return t.length-n<=2?e:t.slice(0,n+1).join(` -`)}function xf(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let s=0;s0?-2:-1}function yf(e,t=0){let n=t,s="";for(let r of e)if(r===" "){let i=4-n%4;s+=" ".repeat(i),n+=i}else s+=r,n++;return s}function to(e,t,n,s,r){let i=t.href,l=t.title||null,a=e[1].replace(r.other.outputLinkReplace,"$1");s.state.inLink=!0;let o={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:l,text:a,tokens:s.inlineTokens(a)};return s.state.inLink=!1,o}function wf(e,t,n){let s=e.match(n.other.indentCodeCompensation);if(s===null)return t;let r=s[1];return t.split(` -`).map(i=>{let l=i.match(n.other.beginningSpace);if(l===null)return i;let[a]=l;return a.length>=r.length?i.slice(r.length):i}).join(` -`)}var Ls=class{constructor(e){ve(this,"options");ve(this,"rules");ve(this,"lexer");this.options=e||cn}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=this.options.pedantic?t[0]:eo(t[0]),s=n.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:n,codeBlockStyle:"indented",text:s}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],s=wf(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:s}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let s=Qt(n,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(n=s.trim())}return{type:"heading",raw:Qt(t[0],` -`),depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Qt(t[0],` -`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=Qt(t[0],` +`,...ja(r)),console.warn(...i)}Ot(),mr=!1}function Ua(){let e=zn[zn.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const s=e.component&&e.component.parent;e=s&&s.vnode}return t}function ja(e){const t=[];return e.forEach((n,s)=>{t.push(...s===0?[]:[` +`],...Va(n))}),t}function Va({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",s=e.component?e.component.parent==null:!1,r=` at <${Ao(e.component,e.type,s)}`,i=">"+n;return e.props?[r,...qa(e.props),i]:[r+i]}function qa(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(s=>{t.push(...zi(s,e[s]))}),n.length>3&&t.push(" ..."),t}function zi(e,t,n){return Ce(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:We(t)?(t=zi(e,ae(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):be(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=ae(t),n?t:[`${e}=`,t])}function Tn(e,t,n,s){try{return s?e(...s):e()}catch(r){Ts(r,t,n)}}function yt(e,t,n,s){if(be(e)){const r=Tn(e,t,n,s);return r&&di(r)&&r.catch(i=>{Ts(i,t,n)}),r}if(Q(e)){const r=[];for(let i=0;i>>1,r=Ze[s],i=Un(r);i=Un(n)?Ze.push(e):Ze.splice(Ga(t),0,e),e.flags|=1,ji()}}function ji(){ks||(ks=Ui.then(Wi))}function Ka(e){Q(e)?kn.push(...e):Wt&&e.id===-1?Wt.splice(Sn+1,0,e):e.flags&1||(kn.push(e),e.flags|=1),ji()}function Vi(e,t,n=wt+1){for(;nUn(n)-Un(s));if(kn.length=0,Wt){Wt.push(...t);return}for(Wt=t,Sn=0;Sne.id==null?e.flags&2?-1:1/0:e.id;function Wi(e){try{for(wt=0;wt{s._d&&yo(-1);const i=Ss(t);let o;try{o=e(...r)}finally{Ss(i),s._d&&yo(1)}return o};return s._n=!0,s._c=!0,s._d=!0,s}function Ya(e,t){if(at===null)return e;const n=$s(at),s=e.dirs||(e.dirs=[]);for(let r=0;re.__isTeleport,Gt=Symbol("_leaveCb"),Es=Symbol("_enterCb");function Xa(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Wn(()=>{e.isMounted=!0}),As(()=>{e.isUnmounting=!0}),e}const ut=[Function,Array],Zi={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:ut,onEnter:ut,onAfterEnter:ut,onEnterCancelled:ut,onBeforeLeave:ut,onLeave:ut,onAfterLeave:ut,onLeaveCancelled:ut,onBeforeAppear:ut,onAppear:ut,onAfterAppear:ut,onAppearCancelled:ut},Xi=e=>{const t=e.subTree;return t.component?Xi(t.component):t},Ja={name:"BaseTransition",props:Zi,setup(e,{slots:t}){const n=_o(),s=Xa();return()=>{const r=t.default&&to(t.default(),!0);if(!r||!r.length)return;const i=Ji(r),o=ae(e),{mode:a}=o;if(s.isLeaving)return yr(i);const l=eo(i);if(!l)return yr(i);let f=xr(l,o,s,n,h=>f=h);l.type!==Xe&&jn(l,f);let u=n.subTree&&eo(n.subTree);if(u&&u.type!==Xe&&!fn(l,u)&&Xi(n).type!==Xe){let h=xr(u,o,s,n);if(jn(u,h),a==="out-in"&&l.type!==Xe)return s.isLeaving=!0,h.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete h.afterLeave,u=void 0},yr(i);a==="in-out"&&l.type!==Xe?h.delayLeave=(g,w,A)=>{const _=Qi(s,u);_[String(u.key)]=u,g[Gt]=()=>{w(),g[Gt]=void 0,delete f.delayedLeave,u=void 0},f.delayedLeave=()=>{A(),delete f.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return i}}};function Ji(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Xe){t=n;break}}return t}const Qa=Ja;function Qi(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function xr(e,t,n,s,r){const{appear:i,mode:o,persisted:a=!1,onBeforeEnter:l,onEnter:f,onAfterEnter:u,onEnterCancelled:h,onBeforeLeave:g,onLeave:w,onAfterLeave:A,onLeaveCancelled:_,onBeforeAppear:F,onAppear:b,onAfterAppear:U,onAppearCancelled:Z}=t,$=String(e.key),Y=Qi(n,e),C=(W,X)=>{W&&yt(W,s,9,X)},N=(W,X)=>{const ue=X[1];C(W,X),Q(W)?W.every(B=>B.length<=1)&&ue():W.length<=1&&ue()},te={mode:o,persisted:a,beforeEnter(W){let X=l;if(!n.isMounted)if(i)X=F||l;else return;W[Gt]&&W[Gt](!0);const ue=Y[$];ue&&fn(e,ue)&&ue.el[Gt]&&ue.el[Gt](),C(X,[W])},enter(W){let X=f,ue=u,B=h;if(!n.isMounted)if(i)X=b||f,ue=U||u,B=Z||h;else return;let ge=!1;const Ae=W[Es]=je=>{ge||(ge=!0,je?C(B,[W]):C(ue,[W]),te.delayedLeave&&te.delayedLeave(),W[Es]=void 0)};X?N(X,[W,Ae]):Ae()},leave(W,X){const ue=String(e.key);if(W[Es]&&W[Es](!0),n.isUnmounting)return X();C(g,[W]);let B=!1;const ge=W[Gt]=Ae=>{B||(B=!0,X(),Ae?C(_,[W]):C(A,[W]),W[Gt]=void 0,Y[ue]===e&&delete Y[ue])};Y[ue]=e,w?N(w,[W,ge]):ge()},clone(W){const X=xr(W,t,n,s,r);return r&&r(X),X}};return te}function yr(e){if(wr(e))return e=Kt(e),e.children=null,e}function eo(e){if(!wr(e))return Yi(e.type)&&e.children?Ji(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&be(n.default))return n.default()}}function jn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,jn(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function to(e,t=!1,n){let s=[],r=0;for(let i=0;i1)for(let i=0;iVn(A,t&&(Q(t)?t[_]:t),n,s,r));return}if(qn(s)&&!r){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&Vn(e,t,n,s.component.subTree);return}const i=s.shapeFlag&4?$s(s.component):s.el,o=r?null:i,{i:a,r:l}=e,f=t&&t.r,u=a.refs===ie?a.refs={}:a.refs,h=a.setupState,g=ae(h),w=h===ie?()=>!1:A=>he(g,A);if(f!=null&&f!==l&&(Ce(f)?(u[f]=null,w(f)&&(h[f]=null)):We(f)&&(f.value=null)),be(l))Tn(l,a,12,[o,u]);else{const A=Ce(l),_=We(l);if(A||_){const F=()=>{if(e.f){const b=A?w(l)?h[l]:u[l]:l.value;r?Q(b)&&fi(b,i):Q(b)?b.includes(i)||b.push(i):A?(u[l]=[i],w(l)&&(h[l]=u[l])):(l.value=[i],e.k&&(u[e.k]=l.value))}else A?(u[l]=o,w(l)&&(h[l]=o)):_&&(l.value=o,e.k&&(u[e.k]=o))};o?(F.id=-1,it(F,n)):F()}}}ds().requestIdleCallback,ds().cancelIdleCallback;const qn=e=>!!e.type.__asyncLoader,wr=e=>e.type.__isKeepAlive;function tu(e,t,n=Zt,s=!1){if(n){const r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{It();const a=Pr(n),l=yt(t,n,e,o);return a(),Ot(),l});return s?r.unshift(i):r.push(i),i}}const no=e=>(t,n=Zt)=>{(!Zn||e==="sp")&&tu(e,(...s)=>t(...s),n)},Wn=no("m"),As=no("bum"),nu=Symbol.for("v-ndc");function Rs(e,t,n,s){let r;const i=n,o=Q(e);if(o||Ce(e)){const a=o&&_n(e);let l=!1,f=!1;a&&(l=!lt(e),f=qt(e),e=hs(e)),r=new Array(e.length);for(let u=0,h=e.length;ut(a,l,void 0,i));else{const a=Object.keys(e);r=new Array(a.length);for(let l=0,f=a.length;le?ko(e)?$s(e):vr(e.parent):null,Gn=dt(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>vr(e.parent),$root:e=>vr(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>e.type,$forceUpdate:e=>e.f||(e.f=()=>{br(e.update)}),$nextTick:e=>e.n||(e.n=vt.bind(e.proxy)),$watch:e=>sn}),_r=(e,t)=>e!==ie&&!e.__isScriptSetup&&he(e,t),su={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:i,accessCache:o,type:a,appContext:l}=e;let f;if(t[0]!=="$"){const w=o[t];if(w!==void 0)switch(w){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return i[t]}else{if(_r(s,t))return o[t]=1,s[t];if(r!==ie&&he(r,t))return o[t]=2,r[t];if((f=e.propsOptions[0])&&he(f,t))return o[t]=3,i[t];if(n!==ie&&he(n,t))return o[t]=4,n[t];o[t]=0}}const u=Gn[t];let h,g;if(u)return t==="$attrs"&&qe(e.attrs,"get",""),u(e);if((h=a.__cssModules)&&(h=h[t]))return h;if(n!==ie&&he(n,t))return o[t]=4,n[t];if(g=l.config.globalProperties,he(g,t))return g[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:i}=e;return _r(r,t)?(r[t]=n,!0):s!==ie&&he(s,t)?(s[t]=n,!0):he(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,propsOptions:i}},o){let a;return!!n[o]||e!==ie&&he(e,o)||_r(t,o)||(a=i[0])&&he(a,o)||he(s,o)||he(Gn,o)||he(r.config.globalProperties,o)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:he(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function so(){return{app:null,config:{isNativeTag:ta,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let ru=0;function iu(e,t){return function(s,r=null){be(s)||(s=dt({},s)),r!=null&&!Ee(r)&&(r=null);const i=so(),o=new WeakSet,a=[];let l=!1;const f=i.app={_uid:ru++,_component:s,_props:r,_container:null,_context:i,_instance:null,version:Vu,get config(){return i.config},set config(u){},use(u,...h){return o.has(u)||(u&&be(u.install)?(o.add(u),u.install(f,...h)):be(u)&&(o.add(u),u(f,...h))),f},mixin(u){return f},component(u,h){return h?(i.components[u]=h,f):i.components[u]},directive(u,h){return h?(i.directives[u]=h,f):i.directives[u]},mount(u,h,g){if(!l){const w=f._ceVNode||Oe(s,r);return w.appContext=i,g===!0?g="svg":g===!1&&(g=void 0),e(w,u,g),l=!0,f._container=u,u.__vue_app__=f,$s(w.component)}},onUnmount(u){a.push(u)},unmount(){l&&(yt(a,f._instance,16),e(null,f._container),delete f._container.__vue_app__)},provide(u,h){return i.provides[u]=h,f},runWithContext(u){const h=En;En=f;try{return u()}finally{En=h}}};return f}}let En=null;function ou(e,t,n=!1){const s=_o();if(s||En){let r=En?En._context.provides:s?s.parent==null||s.ce?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return n&&be(t)?t.call(s&&s.proxy):t}}const ro={},io=()=>Object.create(ro),oo=e=>Object.getPrototypeOf(e)===ro;function lu(e,t,n,s=!1){const r={},i=io();e.propsDefaults=Object.create(null),lo(e,t,r,i);for(const o in e.propsOptions[0])o in r||(r[o]=void 0);n?e.props=s?r:Oa(r):e.type.props?e.props=r:e.props=i,e.attrs=i}function au(e,t,n,s){const{props:r,attrs:i,vnode:{patchFlag:o}}=e,a=ae(r),[l]=e.propsOptions;let f=!1;if((s||o>0)&&!(o&16)){if(o&8){const u=e.vnode.dynamicProps;for(let h=0;he==="_"||e==="__"||e==="_ctx"||e==="$stable",Sr=e=>Q(e)?e.map(Tt):[Tt(e)],cu=(e,t,n)=>{if(t._n)return t;const s=Ki((...r)=>Sr(t(...r)),n);return s._c=!1,s},uo=(e,t,n)=>{const s=e._ctx;for(const r in e){if(kr(r))continue;const i=e[r];if(be(i))t[r]=cu(r,i,s);else if(i!=null){const o=Sr(i);t[r]=()=>o}}},co=(e,t)=>{const n=Sr(t);e.slots.default=()=>n},fo=(e,t,n)=>{for(const s in t)(n||!kr(s))&&(e[s]=t[s])},fu=(e,t,n)=>{const s=e.slots=io();if(e.vnode.shapeFlag&32){const r=t.__;r&&er(s,"__",r,!0);const i=t._;i?(fo(s,t,n),n&&er(s,"_",i,!0)):uo(t,s)}else t&&co(e,t)},pu=(e,t,n)=>{const{vnode:s,slots:r}=e;let i=!0,o=ie;if(s.shapeFlag&32){const a=t._;a?n&&a===1?i=!1:fo(r,t,n):(i=!t.$stable,uo(t,r)),o=t}else t&&(co(e,t),o={default:1});if(i)for(const a in r)!kr(a)&&o[a]==null&&delete r[a]},it=Au;function du(e){return hu(e)}function hu(e,t){const n=ds();n.__VUE__=!0;const{insert:s,remove:r,patchProp:i,createElement:o,createText:a,createComment:l,setText:f,setElementText:u,parentNode:h,nextSibling:g,setScopeId:w=sn,insertStaticContent:A}=e,_=(p,d,x,y=null,T=null,k=null,P=void 0,I=null,E=!!d.dynamicChildren)=>{if(p===d)return;p&&!fn(p,d)&&(y=Ft(p),pe(p,T,k,!0),p=null),d.patchFlag===-2&&(E=!1,d.dynamicChildren=null);const{type:S,ref:q,shapeFlag:O}=d;switch(S){case Ps:F(p,d,x,y);break;case Xe:b(p,d,x,y);break;case Ar:p==null&&U(d,x,y,P);break;case Be:B(p,d,x,y,T,k,P,I,E);break;default:O&1?Y(p,d,x,y,T,k,P,I,E):O&6?ge(p,d,x,y,T,k,P,I,E):(O&64||O&128)&&S.process(p,d,x,y,T,k,P,I,E,j)}q!=null&&T?Vn(q,p&&p.ref,k,d||p,!d):q==null&&p&&p.ref!=null&&Vn(p.ref,null,k,p,!0)},F=(p,d,x,y)=>{if(p==null)s(d.el=a(d.children),x,y);else{const T=d.el=p.el;d.children!==p.children&&f(T,d.children)}},b=(p,d,x,y)=>{p==null?s(d.el=l(d.children||""),x,y):d.el=p.el},U=(p,d,x,y)=>{[p.el,p.anchor]=A(p.children,d,x,y,p.el,p.anchor)},Z=({el:p,anchor:d},x,y)=>{let T;for(;p&&p!==d;)T=g(p),s(p,x,y),p=T;s(d,x,y)},$=({el:p,anchor:d})=>{let x;for(;p&&p!==d;)x=g(p),r(p),p=x;r(d)},Y=(p,d,x,y,T,k,P,I,E)=>{d.type==="svg"?P="svg":d.type==="math"&&(P="mathml"),p==null?C(d,x,y,T,k,P,I,E):W(p,d,T,k,P,I,E)},C=(p,d,x,y,T,k,P,I)=>{let E,S;const{props:q,shapeFlag:O,transition:z,dirs:G}=p;if(E=p.el=o(p.type,k,q&&q.is,q),O&8?u(E,p.children):O&16&&te(p.children,E,null,y,T,Er(p,k),P,I),G&&an(p,null,y,"created"),N(E,p,p.scopeId,P,y),q){for(const me in q)me!=="value"&&!$n(me)&&i(E,me,null,q[me],k,y);"value"in q&&i(E,"value",null,q.value,k),(S=q.onVnodeBeforeMount)&&kt(S,y,p)}G&&an(p,null,y,"beforeMount");const re=gu(T,z);re&&z.beforeEnter(E),s(E,d,x),((S=q&&q.onVnodeMounted)||re||G)&&it(()=>{S&&kt(S,y,p),re&&z.enter(E),G&&an(p,null,y,"mounted")},T)},N=(p,d,x,y,T)=>{if(x&&w(p,x),y)for(let k=0;k{for(let S=E;S{const I=d.el=p.el;let{patchFlag:E,dynamicChildren:S,dirs:q}=d;E|=p.patchFlag&16;const O=p.props||ie,z=d.props||ie;let G;if(x&&un(x,!1),(G=z.onVnodeBeforeUpdate)&&kt(G,x,d,p),q&&an(d,p,x,"beforeUpdate"),x&&un(x,!0),(O.innerHTML&&z.innerHTML==null||O.textContent&&z.textContent==null)&&u(I,""),S?X(p.dynamicChildren,S,I,x,y,Er(d,T),k):P||ye(p,d,I,null,x,y,Er(d,T),k,!1),E>0){if(E&16)ue(I,O,z,x,T);else if(E&2&&O.class!==z.class&&i(I,"class",null,z.class,T),E&4&&i(I,"style",O.style,z.style,T),E&8){const re=d.dynamicProps;for(let me=0;me{G&&kt(G,x,d,p),q&&an(d,p,x,"updated")},y)},X=(p,d,x,y,T,k,P)=>{for(let I=0;I{if(d!==x){if(d!==ie)for(const k in d)!$n(k)&&!(k in x)&&i(p,k,d[k],null,T,y);for(const k in x){if($n(k))continue;const P=x[k],I=d[k];P!==I&&k!=="value"&&i(p,k,I,P,T,y)}"value"in x&&i(p,"value",d.value,x.value,T)}},B=(p,d,x,y,T,k,P,I,E)=>{const S=d.el=p?p.el:a(""),q=d.anchor=p?p.anchor:a("");let{patchFlag:O,dynamicChildren:z,slotScopeIds:G}=d;G&&(I=I?I.concat(G):G),p==null?(s(S,x,y),s(q,x,y),te(d.children||[],x,q,T,k,P,I,E)):O>0&&O&64&&z&&p.dynamicChildren?(X(p.dynamicChildren,z,x,T,k,P,I),(d.key!=null||T&&d===T.subTree)&&po(p,d,!0)):ye(p,d,x,q,T,k,P,I,E)},ge=(p,d,x,y,T,k,P,I,E)=>{d.slotScopeIds=I,p==null?d.shapeFlag&512?T.ctx.activate(d,x,y,P,E):Ae(d,x,y,T,k,P,E):je(p,d,E)},Ae=(p,d,x,y,T,k,P)=>{const I=p.component=Lu(p,y,T);if(wr(p)&&(I.ctx.renderer=j),$u(I,!1,P),I.asyncDep){if(T&&T.registerDep(I,J,P),!p.el){const E=I.subTree=Oe(Xe);b(null,E,d,x),p.placeholder=E.el}}else J(I,p,d,x,T,k,P)},je=(p,d,x)=>{const y=d.component=p.component;if(Su(p,d,x))if(y.asyncDep&&!y.asyncResolved){R(y,d,x);return}else y.next=d,y.update();else d.el=p.el,y.vnode=d},J=(p,d,x,y,T,k,P)=>{const I=()=>{if(p.isMounted){let{next:O,bu:z,u:G,parent:re,vnode:me}=p;{const et=ho(p);if(et){O&&(O.el=me.el,R(p,O,P)),et.asyncDep.then(()=>{p.isUnmounted||I()});return}}let ce=O,Ne;un(p,!1),O?(O.el=me.el,R(p,O,P)):O=me,z&&ps(z),(Ne=O.props&&O.props.onVnodeBeforeUpdate)&&kt(Ne,re,O,me),un(p,!0);const Re=mo(p),Qe=p.subTree;p.subTree=Re,_(Qe,Re,h(Qe.el),Ft(Qe),p,T,k),O.el=Re.el,ce===null&&Eu(p,Re.el),G&&it(G,T),(Ne=O.props&&O.props.onVnodeUpdated)&&it(()=>kt(Ne,re,O,me),T)}else{let O;const{el:z,props:G}=d,{bm:re,m:me,parent:ce,root:Ne,type:Re}=p,Qe=qn(d);un(p,!1),re&&ps(re),!Qe&&(O=G&&G.onVnodeBeforeMount)&&kt(O,ce,d),un(p,!0);{Ne.ce&&Ne.ce._def.shadowRoot!==!1&&Ne.ce._injectChildStyle(Re);const et=p.subTree=mo(p);_(null,et,x,y,p,T,k),d.el=et.el}if(me&&it(me,T),!Qe&&(O=G&&G.onVnodeMounted)){const et=d;it(()=>kt(O,ce,et),T)}(d.shapeFlag&256||ce&&qn(ce.vnode)&&ce.vnode.shapeFlag&256)&&p.a&&it(p.a,T),p.isMounted=!0,d=x=y=null}};p.scope.on();const E=p.effect=new vi(I);p.scope.off();const S=p.update=E.run.bind(E),q=p.job=E.runIfDirty.bind(E);q.i=p,q.id=p.uid,E.scheduler=()=>br(q),un(p,!0),S()},R=(p,d,x)=>{d.component=p;const y=p.vnode.props;p.vnode=d,p.next=null,au(p,d.props,y,x),pu(p,d.children,x),It(),Vi(p),Ot()},ye=(p,d,x,y,T,k,P,I,E=!1)=>{const S=p&&p.children,q=p?p.shapeFlag:0,O=d.children,{patchFlag:z,shapeFlag:G}=d;if(z>0){if(z&128){ne(S,O,x,y,T,k,P,I,E);return}else if(z&256){$e(S,O,x,y,T,k,P,I,E);return}}G&8?(q&16&&Me(S,T,k),O!==S&&u(x,O)):q&16?G&16?ne(S,O,x,y,T,k,P,I,E):Me(S,T,k,!0):(q&8&&u(x,""),G&16&&te(O,x,y,T,k,P,I,E))},$e=(p,d,x,y,T,k,P,I,E)=>{p=p||pt,d=d||pt;const S=p.length,q=d.length,O=Math.min(S,q);let z;for(z=0;zq?Me(p,T,k,!0,!1,O):te(d,x,y,T,k,P,I,E,O)},ne=(p,d,x,y,T,k,P,I,E)=>{let S=0;const q=d.length;let O=p.length-1,z=q-1;for(;S<=O&&S<=z;){const G=p[S],re=d[S]=E?Yt(d[S]):Tt(d[S]);if(fn(G,re))_(G,re,x,null,T,k,P,I,E);else break;S++}for(;S<=O&&S<=z;){const G=p[O],re=d[z]=E?Yt(d[z]):Tt(d[z]);if(fn(G,re))_(G,re,x,null,T,k,P,I,E);else break;O--,z--}if(S>O){if(S<=z){const G=z+1,re=Gz)for(;S<=O;)pe(p[S],T,k,!0),S++;else{const G=S,re=S,me=new Map;for(S=re;S<=z;S++){const Ye=d[S]=E?Yt(d[S]):Tt(d[S]);Ye.key!=null&&me.set(Ye.key,S)}let ce,Ne=0;const Re=z-re+1;let Qe=!1,et=0;const tn=new Array(Re);for(S=0;S=Re){pe(Ye,T,k,!0);continue}let rt;if(Ye.key!=null)rt=me.get(Ye.key);else for(ce=re;ce<=z;ce++)if(tn[ce-re]===0&&fn(Ye,d[ce])){rt=ce;break}rt===void 0?pe(Ye,T,k,!0):(tn[rt-re]=S+1,rt>=et?et=rt:Qe=!0,_(Ye,d[rt],x,null,T,k,P,I,E),Ne++)}const os=Qe?mu(tn):pt;for(ce=os.length-1,S=Re-1;S>=0;S--){const Ye=re+S,rt=d[Ye],In=d[Ye+1],Ht=Ye+1{const{el:k,type:P,transition:I,children:E,shapeFlag:S}=p;if(S&6){M(p.component.subTree,d,x,y);return}if(S&128){p.suspense.move(d,x,y);return}if(S&64){P.move(p,d,x,j);return}if(P===Be){s(k,d,x);for(let O=0;OI.enter(k),T);else{const{leave:O,delayLeave:z,afterLeave:G}=I,re=()=>{p.ctx.isUnmounted?r(k):s(k,d,x)},me=()=>{O(k,()=>{re(),G&&G()})};z?z(k,re,me):me()}else s(k,d,x)},pe=(p,d,x,y=!1,T=!1)=>{const{type:k,props:P,ref:I,children:E,dynamicChildren:S,shapeFlag:q,patchFlag:O,dirs:z,cacheIndex:G}=p;if(O===-2&&(T=!1),I!=null&&(It(),Vn(I,null,x,p,!0),Ot()),G!=null&&(d.renderCache[G]=void 0),q&256){d.ctx.deactivate(p);return}const re=q&1&&z,me=!qn(p);let ce;if(me&&(ce=P&&P.onVnodeBeforeUnmount)&&kt(ce,d,p),q&6)bt(p.component,x,y);else{if(q&128){p.suspense.unmount(x,y);return}re&&an(p,null,d,"beforeUnmount"),q&64?p.type.remove(p,d,x,j,y):S&&!S.hasOnce&&(k!==Be||O>0&&O&64)?Me(S,d,x,!1,!0):(k===Be&&O&384||!T&&q&16)&&Me(E,d,x),y&&Ve(p)}(me&&(ce=P&&P.onVnodeUnmounted)||re)&&it(()=>{ce&&kt(ce,d,p),re&&an(p,null,d,"unmounted")},x)},Ve=p=>{const{type:d,el:x,anchor:y,transition:T}=p;if(d===Be){Te(x,y);return}if(d===Ar){$(p);return}const k=()=>{r(x),T&&!T.persisted&&T.afterLeave&&T.afterLeave()};if(p.shapeFlag&1&&T&&!T.persisted){const{leave:P,delayLeave:I}=T,E=()=>P(x,k);I?I(p.el,k,E):E()}else k()},Te=(p,d)=>{let x;for(;p!==d;)x=g(p),r(p),p=x;r(d)},bt=(p,d,x)=>{const{bum:y,scope:T,job:k,subTree:P,um:I,m:E,a:S,parent:q,slots:{__:O}}=p;go(E),go(S),y&&ps(y),q&&Q(O)&&O.forEach(z=>{q.renderCache[z]=void 0}),T.stop(),k&&(k.flags|=8,pe(P,p,d,x)),I&&it(I,d),it(()=>{p.isUnmounted=!0},d),d&&d.pendingBranch&&!d.isUnmounted&&p.asyncDep&&!p.asyncResolved&&p.suspenseId===d.pendingId&&(d.deps--,d.deps===0&&d.resolve())},Me=(p,d,x,y=!1,T=!1,k=0)=>{for(let P=k;P{if(p.shapeFlag&6)return Ft(p.component.subTree);if(p.shapeFlag&128)return p.suspense.next();const d=g(p.anchor||p.el),x=d&&d[Za];return x?g(x):d};let Bt=!1;const xn=(p,d,x)=>{p==null?d._vnode&&pe(d._vnode,null,null,!0):_(d._vnode||null,p,d,null,null,null,x),d._vnode=p,Bt||(Bt=!0,Vi(),qi(),Bt=!1)},j={p:_,um:pe,m:M,r:Ve,mt:Ae,mc:te,pc:ye,pbc:X,n:Ft,o:e};return{render:xn,hydrate:void 0,createApp:iu(xn)}}function Er({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function un({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function gu(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function po(e,t,n=!1){const s=e.children,r=t.children;if(Q(s)&&Q(r))for(let i=0;i>1,e[n[a]]0&&(t[s]=n[i-1]),n[i]=s)}}for(i=n.length,o=n[i-1];i-- >0;)n[i]=o,o=t[o];return n}function ho(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:ho(t)}function go(e){if(e)for(let t=0;tou(bu);function cn(e,t,n){return yu(e,t,n)}function yu(e,t,n=ie){const{immediate:s,deep:r,flush:i,once:o}=n,a=dt({},n),l=t&&s||!t&&i!=="post";let f;if(Zn){if(i==="sync"){const w=xu();f=w.__watcherHandles||(w.__watcherHandles=[])}else if(!l){const w=()=>{};return w.stop=sn,w.resume=sn,w.pause=sn,w}}const u=Zt;a.call=(w,A,_)=>yt(w,u,A,_);let h=!1;i==="post"?a.scheduler=w=>{it(w,u&&u.suspense)}:i!=="sync"&&(h=!0,a.scheduler=(w,A)=>{A?w():br(w)}),a.augmentJob=w=>{t&&(w.flags|=4),h&&(w.flags|=2,u&&(w.id=u.uid,w.i=u))};const g=za(e,t,a);return Zn&&(f?f.push(g):l&&g()),g}const wu=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${jt(t)}Modifiers`]||e[`${rn(t)}Modifiers`];function vu(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||ie;let r=n;const i=t.startsWith("update:"),o=i&&wu(s,t.slice(7));o&&(o.trim&&(r=n.map(u=>Ce(u)?u.trim():u)),o.number&&(r=n.map(tr)));let a,l=s[a=Qs(t)]||s[a=Qs(jt(t))];!l&&i&&(l=s[a=Qs(rn(t))]),l&&yt(l,e,6,r);const f=s[a+"Once"];if(f){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,yt(f,e,6,r)}}function _u(e,t,n=!1){const s=t.emitsCache,r=s.get(e);if(r!==void 0)return r;const i=e.emits;let o={};return i?(Q(i)?i.forEach(a=>o[a]=null):dt(o,i),Ee(e)&&s.set(e,o),o):(Ee(e)&&s.set(e,null),null)}function Cs(e,t){return!e||!us(t)?!1:(t=t.slice(2).replace(/Once$/,""),he(e,t[0].toLowerCase()+t.slice(1))||he(e,rn(t))||he(e,t))}function ih(){}function mo(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[i],slots:o,attrs:a,emit:l,render:f,renderCache:u,props:h,data:g,setupState:w,ctx:A,inheritAttrs:_}=e,F=Ss(e);let b,U;try{if(n.shapeFlag&4){const $=r||s,Y=$;b=Tt(f.call(Y,$,u,h,w,g,A)),U=a}else{const $=t;b=Tt($.length>1?$(h,{attrs:a,slots:o,emit:l}):$(h,null)),U=t.props?a:Tu(a)}}catch($){Kn.length=0,Ts($,e,1),b=Oe(Xe)}let Z=b;if(U&&_!==!1){const $=Object.keys(U),{shapeFlag:Y}=Z;$.length&&Y&7&&(i&&$.some(Xs)&&(U=ku(U,i)),Z=Kt(Z,U,!1,!0))}return n.dirs&&(Z=Kt(Z,null,!1,!0),Z.dirs=Z.dirs?Z.dirs.concat(n.dirs):n.dirs),n.transition&&jn(Z,n.transition),b=Z,Ss(F),b}const Tu=e=>{let t;for(const n in e)(n==="class"||n==="style"||us(n))&&((t||(t={}))[n]=e[n]);return t},ku=(e,t)=>{const n={};for(const s in e)(!Xs(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Su(e,t,n){const{props:s,children:r,component:i}=e,{props:o,children:a,patchFlag:l}=t,f=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return s?bo(s,o,f):!!o;if(l&8){const u=t.dynamicProps;for(let h=0;he.__isSuspense;function Au(e,t){t&&t.pendingBranch?Q(e)?t.effects.push(...e):t.effects.push(e):Ka(e)}const Be=Symbol.for("v-fgt"),Ps=Symbol.for("v-txt"),Xe=Symbol.for("v-cmt"),Ar=Symbol.for("v-stc"),Kn=[];let ot=null;function H(e=!1){Kn.push(ot=e?null:[])}function Ru(){Kn.pop(),ot=Kn[Kn.length-1]||null}let Yn=1;function yo(e,t=!1){Yn+=e,e<0&&ot&&t&&(ot.hasOnce=!0)}function wo(e){return e.dynamicChildren=Yn>0?ot||pt:null,Ru(),Yn>0&&ot&&ot.push(e),e}function K(e,t,n,s,r,i){return wo(v(e,t,n,s,r,i,!0))}function _t(e,t,n,s,r){return wo(Oe(e,t,n,s,r,!0))}function Is(e){return e?e.__v_isVNode===!0:!1}function fn(e,t){return e.type===t.type&&e.key===t.key}const vo=({key:e})=>e!=null?e:null,Os=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Ce(e)||We(e)||be(e)?{i:at,r:e,k:t,f:!!n}:e:null);function v(e,t=null,n=null,s=0,r=null,i=e===Be?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&vo(t),ref:t&&Os(t),scopeId:Gi,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:at};return a?(Rr(l,n),i&128&&e.normalize(l)):n&&(l.shapeFlag|=Ce(n)?8:16),Yn>0&&!o&&ot&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&ot.push(l),l}const Oe=Cu;function Cu(e,t=null,n=null,s=0,r=null,i=!1){if((!e||e===nu)&&(e=Xe),Is(e)){const a=Kt(e,t,!0);return n&&Rr(a,n),Yn>0&&!i&&ot&&(a.shapeFlag&6?ot[ot.indexOf(e)]=a:ot.push(a)),a.patchFlag=-2,a}if(Uu(e)&&(e=e.__vccOpts),t){t=Pu(t);let{class:a,style:l}=t;a&&!Ce(a)&&(t.class=we(a)),Ee(l)&&(gr(l)&&!Q(l)&&(l=dt({},l)),t.style=nr(l))}const o=Ce(e)?1:xo(e)?128:Yi(e)?64:Ee(e)?4:be(e)?2:0;return v(e,t,n,s,r,o,i,!0)}function Pu(e){return e?gr(e)||oo(e)?dt({},e):e:null}function Kt(e,t,n=!1,s=!1){const{props:r,ref:i,patchFlag:o,children:a,transition:l}=e,f=t?Iu(r||{},t):r,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:f,key:f&&vo(f),ref:t&&t.ref?n&&i?Q(i)?i.concat(Os(t)):[i,Os(t)]:Os(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Be?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Kt(e.ssContent),ssFallback:e.ssFallback&&Kt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&s&&jn(u,l.clone(u)),u}function Ms(e=" ",t=0){return Oe(Ps,null,e,t)}function Ge(e="",t=!1){return t?(H(),_t(Xe,null,e)):Oe(Xe,null,e)}function Tt(e){return e==null||typeof e=="boolean"?Oe(Xe):Q(e)?Oe(Be,null,e.slice()):Is(e)?Yt(e):Oe(Ps,null,String(e))}function Yt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Kt(e)}function Rr(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(Q(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),Rr(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!oo(t)?t._ctx=at:r===3&&at&&(at.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else be(t)?(t={default:t,_ctx:at},n=32):(t=String(t),s&64?(n=16,t=[Ms(t)]):n=8);e.children=t,e.shapeFlag|=n}function Iu(...e){const t={};for(let n=0;nZt||at;let Ls,Cr;{const e=ds(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),i=>{r.length>1?r.forEach(o=>o(i)):r[0](i)}};Ls=t("__VUE_INSTANCE_SETTERS__",n=>Zt=n),Cr=t("__VUE_SSR_SETTERS__",n=>Zn=n)}const Pr=e=>{const t=Zt;return Ls(e),e.scope.on(),()=>{e.scope.off(),Ls(t)}},To=()=>{Zt&&Zt.scope.off(),Ls(null)};function ko(e){return e.vnode.shapeFlag&4}let Zn=!1;function $u(e,t=!1,n=!1){t&&Cr(t);const{props:s,children:r}=e.vnode,i=ko(e);lu(e,s,i,t),fu(e,r,n||t);const o=i?Nu(e,t):void 0;return t&&Cr(!1),o}function Nu(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,su);const{setup:s}=n;if(s){It();const r=e.setupContext=s.length>1?Fu(e):null,i=Pr(e),o=Tn(s,e,0,[e.props,r]),a=di(o);if(Ot(),i(),(a||e.sp)&&!qn(e)&&eu(e),a){if(o.then(To,To),t)return o.then(l=>{So(e,l)}).catch(l=>{Ts(l,e,0)});e.asyncDep=o}else So(e,o)}else Eo(e)}function So(e,t,n){be(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ee(t)&&(e.setupState=Hi(t)),Eo(e)}function Eo(e,t,n){const s=e.type;e.render||(e.render=s.render||sn)}const Du={get(e,t){return qe(e,"get",""),e[t]}};function Fu(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Du),slots:e.slots,emit:e.emit,expose:t}}function $s(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Hi(Ma(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Gn)return Gn[n](e)},has(t,n){return n in t||n in Gn}})):e.proxy}const Bu=/(?:^|[-_])(\w)/g,Hu=e=>e.replace(Bu,t=>t.toUpperCase()).replace(/[-_]/g,"");function zu(e,t=!0){return be(e)?e.displayName||e.name:e.name||t&&e.__name}function Ao(e,t,n=!1){let s=zu(t);if(!s&&t.__file){const r=t.__file.match(/([^/\\]+)\.\w+$/);r&&(s=r[1])}if(!s&&e&&e.parent){const r=i=>{for(const o in i)if(i[o]===t)return o};s=r(e.components||e.parent.type.components)||r(e.appContext.components)}return s?Hu(s):n?"App":"Anonymous"}function Uu(e){return be(e)&&"__vccOpts"in e}const ke=(e,t)=>Ba(e,t,Zn);function ju(e,t,n){const s=arguments.length;return s===2?Ee(t)&&!Q(t)?Is(t)?Oe(e,null,[t]):Oe(e,t):Oe(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&Is(n)&&(n=[n]),Oe(e,t,n))}const Vu="3.5.18";let Ir;const Ro=typeof window!="undefined"&&window.trustedTypes;if(Ro)try{Ir=Ro.createPolicy("vue",{createHTML:e=>e})}catch{}const Co=Ir?e=>Ir.createHTML(e):e=>e,qu="http://www.w3.org/2000/svg",Wu="http://www.w3.org/1998/Math/MathML",Nt=typeof document!="undefined"?document:null,Po=Nt&&Nt.createElement("template"),Gu={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?Nt.createElementNS(qu,e):t==="mathml"?Nt.createElementNS(Wu,e):n?Nt.createElement(e,{is:n}):Nt.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>Nt.createTextNode(e),createComment:e=>Nt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Nt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,i){const o=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===i||!(r=r.nextSibling)););else{Po.innerHTML=Co(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const a=Po.content;if(s==="svg"||s==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Xt="transition",Xn="animation",Jn=Symbol("_vtc"),Io={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Ku=dt({},Zi,Io),Yu=(e=>(e.displayName="Transition",e.props=Ku,e))((e,{slots:t})=>ju(Qa,Zu(e),t)),pn=(e,t=[])=>{Q(e)?e.forEach(n=>n(...t)):e&&e(...t)},Oo=e=>e?Q(e)?e.some(t=>t.length>1):e.length>1:!1;function Zu(e){const t={};for(const B in e)B in Io||(t[B]=e[B]);if(e.css===!1)return t;const{name:n="v",type:s,duration:r,enterFromClass:i=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=i,appearActiveClass:f=o,appearToClass:u=a,leaveFromClass:h=`${n}-leave-from`,leaveActiveClass:g=`${n}-leave-active`,leaveToClass:w=`${n}-leave-to`}=e,A=Xu(r),_=A&&A[0],F=A&&A[1],{onBeforeEnter:b,onEnter:U,onEnterCancelled:Z,onLeave:$,onLeaveCancelled:Y,onBeforeAppear:C=b,onAppear:N=U,onAppearCancelled:te=Z}=t,W=(B,ge,Ae,je)=>{B._enterCancelled=je,dn(B,ge?u:a),dn(B,ge?f:o),Ae&&Ae()},X=(B,ge)=>{B._isLeaving=!1,dn(B,h),dn(B,w),dn(B,g),ge&&ge()},ue=B=>(ge,Ae)=>{const je=B?N:U,J=()=>W(ge,B,Ae);pn(je,[ge,J]),Mo(()=>{dn(ge,B?l:i),Dt(ge,B?u:a),Oo(je)||Lo(ge,s,_,J)})};return dt(t,{onBeforeEnter(B){pn(b,[B]),Dt(B,i),Dt(B,o)},onBeforeAppear(B){pn(C,[B]),Dt(B,l),Dt(B,f)},onEnter:ue(!1),onAppear:ue(!0),onLeave(B,ge){B._isLeaving=!0;const Ae=()=>X(B,ge);Dt(B,h),B._enterCancelled?(Dt(B,g),Do()):(Do(),Dt(B,g)),Mo(()=>{B._isLeaving&&(dn(B,h),Dt(B,w),Oo($)||Lo(B,s,F,Ae))}),pn($,[B,Ae])},onEnterCancelled(B){W(B,!1,void 0,!0),pn(Z,[B])},onAppearCancelled(B){W(B,!0,void 0,!0),pn(te,[B])},onLeaveCancelled(B){X(B),pn(Y,[B])}})}function Xu(e){if(e==null)return null;if(Ee(e))return[Or(e.enter),Or(e.leave)];{const t=Or(e);return[t,t]}}function Or(e){return oa(e)}function Dt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Jn]||(e[Jn]=new Set)).add(t)}function dn(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[Jn];n&&(n.delete(t),n.size||(e[Jn]=void 0))}function Mo(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Ju=0;function Lo(e,t,n,s){const r=e._endId=++Ju,i=()=>{r===e._endId&&s()};if(n!=null)return setTimeout(i,n);const{type:o,timeout:a,propCount:l}=Qu(e,t);if(!o)return s();const f=o+"end";let u=0;const h=()=>{e.removeEventListener(f,g),i()},g=w=>{w.target===e&&++u>=l&&h()};setTimeout(()=>{u(n[A]||"").split(", "),r=s(`${Xt}Delay`),i=s(`${Xt}Duration`),o=$o(r,i),a=s(`${Xn}Delay`),l=s(`${Xn}Duration`),f=$o(a,l);let u=null,h=0,g=0;t===Xt?o>0&&(u=Xt,h=o,g=i.length):t===Xn?f>0&&(u=Xn,h=f,g=l.length):(h=Math.max(o,f),u=h>0?o>f?Xt:Xn:null,g=u?u===Xt?i.length:l.length:0);const w=u===Xt&&/\b(transform|all)(,|$)/.test(s(`${Xt}Property`).toString());return{type:u,timeout:h,propCount:g,hasTransform:w}}function $o(e,t){for(;e.lengthNo(n)+No(e[s])))}function No(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Do(){return document.body.offsetHeight}function ec(e,t,n){const s=e[Jn];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Fo=Symbol("_vod"),tc=Symbol("_vsh"),nc=Symbol(""),sc=/(^|;)\s*display\s*:/;function rc(e,t,n){const s=e.style,r=Ce(n);let i=!1;if(n&&!r){if(t)if(Ce(t))for(const o of t.split(";")){const a=o.slice(0,o.indexOf(":")).trim();n[a]==null&&Ns(s,a,"")}else for(const o in t)n[o]==null&&Ns(s,o,"");for(const o in n)o==="display"&&(i=!0),Ns(s,o,n[o])}else if(r){if(t!==n){const o=s[nc];o&&(n+=";"+o),s.cssText=n,i=sc.test(n)}}else t&&e.removeAttribute("style");Fo in e&&(e[Fo]=i?s.display:"",e[tc]&&(s.display="none"))}const Bo=/\s*!important$/;function Ns(e,t,n){if(Q(n))n.forEach(s=>Ns(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=ic(e,t);Bo.test(n)?e.setProperty(rn(s),n.replace(Bo,""),"important"):e[s]=n}}const Ho=["Webkit","Moz","ms"],Mr={};function ic(e,t){const n=Mr[t];if(n)return n;let s=jt(t);if(s!=="filter"&&s in e)return Mr[t]=s;s=mi(s);for(let r=0;rLr||(uc.then(()=>Lr=0),Lr=Date.now());function fc(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;yt(pc(s,n.value),t,5,[s])};return n.value=e,n.attached=cc(),n}function pc(e,t){if(Q(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>r=>!r._stopped&&s&&s(r))}else return t}const Wo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,dc=(e,t,n,s,r,i)=>{const o=r==="svg";t==="class"?ec(e,s,o):t==="style"?rc(e,n,s):us(t)?Xs(t)||lc(e,t,n,s,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):hc(e,t,s,o))?(jo(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Uo(e,t,s,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Ce(s))?jo(e,jt(t),s,i,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Uo(e,t,s,o))};function hc(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Wo(t)&&be(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return Wo(t)&&Ce(n)?!1:t in e}const Go=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Q(t)?n=>ps(t,n):t};function gc(e){e.target.composing=!0}function Ko(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const $r=Symbol("_assign"),mc={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e[$r]=Go(r);const i=s||r.props&&r.props.type==="number";An(e,t?"change":"input",o=>{if(o.target.composing)return;let a=e.value;n&&(a=a.trim()),i&&(a=tr(a)),e[$r](a)}),n&&An(e,"change",()=>{e.value=e.value.trim()}),t||(An(e,"compositionstart",gc),An(e,"compositionend",Ko),An(e,"change",Ko))},mounted(e,{value:t}){e.value=t==null?"":t},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:r,number:i}},o){if(e[$r]=Go(o),e.composing)return;const a=(i||e.type==="number")&&!/^0\d/.test(e.value)?tr(e.value):e.value,l=t==null?"":t;a!==l&&(document.activeElement===e&&e.type!=="range"&&(s&&t===n||r&&e.value.trim()===l)||(e.value=l))}},bc=["ctrl","shift","alt","meta"],xc={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>bc.some(n=>e[`${n}Key`]&&!t.includes(n))},ct=(e,t)=>{const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(r,...i)=>{for(let o=0;o{const t=wc().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=Tc(s);if(!r)return;const i=t._component;!be(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const o=n(r,!1,_c(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},t};function _c(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Tc(e){return Ce(e)?document.querySelector(e):e}const kc=["aria-pressed"],Sc={key:0,viewBox:"0 0 24 24",width:"20",height:"20","aria-hidden":"true"},Ec={key:1,viewBox:"0 0 24 24",width:"18",height:"18","aria-hidden":"true",fill:"none"},Ac={__name:"ChatbotToggler",props:{isOpen:{type:Boolean,required:!0}},emits:["toggle"],setup(e){return(t,n)=>(H(),K("button",{class:"fixed bottom-5 right-5 z-9999 grid h-12 w-12 appearance-none place-items-center rounded-full border border-white/20 bg-gradient-to-br from-brand-500 to-brand-600 text-white shadow-[0_20px_36px_-20px_rgba(109,79,194,0.85)] transition-all duration-250 hover:-translate-y-0.5 hover:from-brand-600 hover:to-violet-700 hover:shadow-[0_22px_40px_-22px_rgba(109,79,194,1)] focus:outline-none max-[600px]:bottom-3 max-[600px]:right-3 max-[600px]:h-13 max-[600px]:w-13",style:{"border-radius":"9999px"},"aria-pressed":e.isOpen?"true":"false",onClick:n[0]||(n[0]=s=>t.$emit("toggle"))},[e.isOpen?(H(),K("svg",Ec,n[2]||(n[2]=[v("path",{d:"M6 6l12 12M18 6L6 18",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"},null,-1)]))):(H(),K("svg",Sc,n[1]||(n[1]=[v("path",{d:"M4 4h16a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H8l-4 4v-4H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z",fill:"currentColor",stroke:"currentColor","stroke-width":"2","stroke-linecap":"miter","stroke-linejoin":"miter"},null,-1)])))],8,kc))}},Rc={class:"chat-header relative flex min-h-14 items-center justify-between px-4 pb-2.5 pt-3 text-white sm:px-5"},Cc={class:"flex min-w-0 flex-1 items-center gap-2 sm:gap-2.5"},Pc={xmlns:"http://www.w3.org/2000/svg",width:"35",height:"35",viewBox:"0 0 1024 1024",class:"h-8 w-8 shrink-0 rounded-full bg-white p-1.5 shadow-md motion-safe:animate-soft-float",style:{fill:"#6d4fc2"}},Ic={class:"ml-2 flex items-center gap-1.5"},Oc=["title"],Mc=["title","aria-label"],Lc={key:0,viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},$c={key:1,viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},Nc=["title","aria-label"],Dc={key:0,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},Fc={key:1,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},Bc={key:2,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},Hc={__name:"ChatHeader",props:{windowMode:{type:String,required:!0},autoReadEnabled:{type:Boolean,required:!0},activeTtsProvider:{type:String,required:!0}},emits:["close","cycleResize","toggleAutoRead"],setup(e){const t=e,n={default:"Compact",half:"Half Screen",full:"Full Screen"},s=ke(()=>n[t.windowMode]||"Compact"),r=ke(()=>t.windowMode==="default"?"Half Screen":t.windowMode==="half"?"Full Screen":"Compact"),i=ke(()=>t.activeTtsProvider==="polly"?"TTS: Polly":t.activeTtsProvider==="browser"?"TTS: Browser":"TTS: Off"),o=ke(()=>t.activeTtsProvider==="polly"?"bg-emerald-500/45":t.activeTtsProvider==="browser"?"bg-amber-500/45":"bg-slate-500/35");return(a,l)=>(H(),K("div",Rc,[v("div",Cc,[(H(),K("svg",Pc,l[3]||(l[3]=[v("path",{d:"M738.3 287.6H285.7c-59 0-106.8 47.8-106.8 106.8v303.1c0 59 47.8 106.8 106.8 106.8h81.5v111.1c0 .7.8 1.1 1.4.7l166.9-110.6 41.8-.8h117.4l43.6-.4c59 0 106.8-47.8 106.8-106.8V394.5c0-59-47.8-106.9-106.8-106.9zM351.7 448.2c0-29.5 23.9-53.5 53.5-53.5s53.5 23.9 53.5 53.5-23.9 53.5-53.5 53.5-53.5-23.9-53.5-53.5zm157.9 267.1c-67.8 0-123.8-47.5-132.3-109h264.6c-8.6 61.5-64.5 109-132.3 109zm110-213.7c-29.5 0-53.5-23.9-53.5-53.5s23.9-53.5 53.5-53.5 53.5 23.9 53.5 53.5-23.9 53.5-53.5 53.5zM867.2 644.5V453.1h26.5c19.4 0 35.1 15.7 35.1 35.1v121.1c0 19.4-15.7 35.1-35.1 35.1h-26.5zM95.2 609.4V488.2c0-19.4 15.7-35.1 35.1-35.1h26.5v191.3h-26.5c-19.4 0-35.1-15.7-35.1-35.1zM561.5 149.6c0 23.4-15.6 43.3-36.9 49.7v44.9h-30v-44.9c-21.4-6.5-36.9-26.3-36.9-49.7 0-28.6 23.3-51.9 51.9-51.9s51.9 23.3 51.9 51.9z"},null,-1)]))),l[4]||(l[4]=v("h2",{class:"truncate text-xs font-semibold tracking-[0.01em] sm:text-base text-white/95"},"ChangAI from ERPGulf",-1))]),v("div",Ic,[v("span",{class:we(["hidden rounded-full border border-white/25 px-2 py-1 text-[10px] font-semibold uppercase tracking-wide text-white/95 shadow-sm backdrop-blur-sm sm:inline",o.value]),title:`TTS provider: ${i.value}`},nt(i.value),11,Oc),v("button",{class:we(["h-8 min-w-8 appearance-none items-center justify-center rounded-md border border-white/20 px-2 text-xs font-semibold text-white/90 transition-all duration-200 focus:outline-none sm:flex",e.autoReadEnabled?"bg-white/24 shadow-sm":"hover:bg-white/15"]),style:{"border-radius":"0.375rem"},title:e.autoReadEnabled?"Auto speech on":"Auto speech off","aria-label":e.autoReadEnabled?"Turn off auto speech":"Turn on auto speech",onClick:l[0]||(l[0]=f=>a.$emit("toggleAutoRead"))},[e.autoReadEnabled?(H(),K("svg",Lc,l[5]||(l[5]=[v("path",{d:"M11 5L6 9H3v6h3l5 4V5z"},null,-1),v("path",{d:"M15 9a4 4 0 0 1 0 6"},null,-1),v("path",{d:"M18 7a7 7 0 0 1 0 10"},null,-1)]))):(H(),K("svg",$c,l[6]||(l[6]=[v("path",{d:"M11 5L6 9H3v6h3l5 4V5z"},null,-1),v("path",{d:"M22 9l-6 6"},null,-1),v("path",{d:"M16 9l6 6"},null,-1)])))],10,Mc),v("button",{class:we(["flex h-8 min-w-8 appearance-none items-center justify-center rounded-md border border-white/20 px-2 text-xs font-semibold text-white/90 transition-all duration-200 focus:outline-none","bg-white/20 shadow-sm hover:bg-white/25"]),style:{"border-radius":"0.375rem"},title:`Resize mode: ${s.value} (click to ${r.value})`,"aria-label":`Resize mode ${s.value}. Click to switch to ${r.value}`,onClick:l[1]||(l[1]=f=>a.$emit("cycleResize"))},[e.windowMode==="default"?(H(),K("svg",Dc,l[7]||(l[7]=[v("rect",{x:"7",y:"8",width:"10",height:"8",rx:"2"},null,-1)]))):e.windowMode==="half"?(H(),K("svg",Fc,l[8]||(l[8]=[v("rect",{x:"4",y:"5",width:"16",height:"14",rx:"2"},null,-1),v("path",{d:"M12 5v14"},null,-1)]))):(H(),K("svg",Bc,l[9]||(l[9]=[v("rect",{x:"4",y:"5",width:"16",height:"14",rx:"2"},null,-1),v("path",{d:"M8 8H6v2M16 8h2v2M8 16H6v-2M16 16h2v-2"},null,-1)])))],8,Nc),v("button",{class:"grid h-8 w-8 shrink-0 appearance-none place-items-center rounded-full border border-white/20 text-white transition-all duration-200 hover:scale-105 hover:bg-white/20 focus:outline-none focus-visible:ring-2 focus-visible:ring-white/70",style:{"border-radius":"9999px"},"aria-label":"Close chatbot",onClick:l[2]||(l[2]=f=>a.$emit("close"))},l[10]||(l[10]=[v("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",width:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[v("path",{d:"M6 9l6 6 6-6"})],-1)]))])]))}},zc={class:"flex gap-1.5 border-b border-slate-200/80 px-2.5 pb-2.5 pt-1"},Uc=["onClick"],jc={class:"inline-flex items-center gap-1.5"},Vc={__name:"TabBar",props:{modelValue:{type:String,required:!0},debugEnabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e){const t=e,n=ke(()=>{const s=[{id:"chat",label:"Chats"},{id:"debug",label:"Debug"},{id:"support",label:"Support"},{id:"settings",label:"Settings"}];return t.debugEnabled?s:s.filter(r=>r.id!=="debug")});return(s,r)=>(H(),K("div",zc,[(H(!0),K(Be,null,Rs(n.value,i=>(H(),K("button",{key:i.id,class:we(["group min-w-0 flex-1 h-9 appearance-none rounded-lg border border-transparent bg-transparent px-2 text-xs font-semibold transition-all duration-200 focus:outline-none",e.modelValue===i.id?"border-white/30 bg-linear-to-r from-violet-300/36 via-indigo-300/30 to-sky-300/28 text-white shadow-[0_4px_10px_rgba(20,24,40,0.22)]":"text-white/80 hover:border-white/25 hover:bg-white/12 hover:text-white"]),onClick:o=>s.$emit("update:modelValue",i.id)},[v("span",jc,[v("span",{class:we(["h-1.5 w-1.5 rounded-full transition-colors duration-200",e.modelValue===i.id?"bg-white":"bg-white/40 group-hover:bg-white/70"])},null,2),Ms(" "+nt(i.label),1)])],10,Uc))),128))]))}},qc=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},Wc={},Gc={xmlns:"http://www.w3.org/2000/svg",width:"50",height:"50",viewBox:"0 0 1024 1024",class:"h-7.5 w-7.5 shrink-0 self-end rounded-full bg-gradient-to-br from-brand-500 to-brand-600 p-1.5 fill-white shadow-[0_10px_18px_-12px_rgba(109,79,194,0.85)]"};function Kc(e,t){return H(),K("svg",Gc,t[0]||(t[0]=[v("path",{d:"M738.3 287.6H285.7c-59 0-106.8 47.8-106.8 106.8v303.1c0 59 47.8 106.8 106.8 106.8h81.5v111.1c0 .7.8 1.1 1.4.7l166.9-110.6 41.8-.8h117.4l43.6-.4c59 0 106.8-47.8 106.8-106.8V394.5c0-59-47.8-106.9-106.8-106.9zM351.7 448.2c0-29.5 23.9-53.5 53.5-53.5s53.5 23.9 53.5 53.5-23.9 53.5-53.5 53.5-53.5-23.9-53.5-53.5zm157.9 267.1c-67.8 0-123.8-47.5-132.3-109h264.6c-8.6 61.5-64.5 109-132.3 109zm110-213.7c-29.5 0-53.5-23.9-53.5-53.5s23.9-53.5 53.5-53.5 53.5 23.9 53.5 53.5-23.9 53.5-53.5 53.5zM867.2 644.5V453.1h26.5c19.4 0 35.1 15.7 35.1 35.1v121.1c0 19.4-15.7 35.1-35.1 35.1h-26.5zM95.2 609.4V488.2c0-19.4 15.7-35.1 35.1-35.1h26.5v191.3h-26.5c-19.4 0-35.1-15.7-35.1-35.1zM561.5 149.6c0 23.4-15.6 43.3-36.9 49.7v44.9h-30v-44.9c-21.4-6.5-36.9-26.3-36.9-49.7 0-28.6 23.3-51.9 51.9-51.9s51.9 23.3 51.9 51.9z"},null,-1)]))}const Zo=qc(Wc,[["render",Kc]]),Xo=18e4,Ds={PIPELINE:"changai.changai.api.v2.text2sql_pipeline_v2.run_text2sql_pipeline",SUPPORT:"changai.changai.api.v2.helpdesk_api.support_bot",SETTINGS:"changai.changai.api.v2.schema_utils.get_frontend_settings",TTS:"changai.changai.api.v2.tts.synthesize_tts"};function Jo(e,t={},n="actual"){return n==="test"?Promise.resolve({Bot:`[TEST MODE] ${JSON.stringify(t)}`}):!window.frappe||!window.frappe.call?Promise.reject(new Error("Frappe API is unavailable in actual mode.")):new Promise((s,r)=>{window.frappe.call({method:e,args:t,callback(i){s(i.message)},error(i){r(i)}})})}function Yc(e,t,n="actual",s=null,r){if(n==="test")return{promise:Promise.resolve({Bot:`[TEST MODE] ${JSON.stringify({user_question:e,chat_id:t,request_id:s,sendNonErptoAI:r})}`}),cancel:()=>!1};if(!window.frappe||!window.frappe.call)return{promise:Promise.reject(new Error("Frappe API is unavailable in actual mode.")),cancel:()=>!1};let i=null,o=!1,a=null;return{promise:new Promise((u,h)=>{i=window.frappe.call({method:Ds.PIPELINE,args:{user_question:e,chat_id:t,request_id:s,sendNonErptoAI:r},callback(g){o||(o=!0,clearTimeout(a),u(g.message))},error(g){o||(o=!0,clearTimeout(a),h(g!=null?g:new Error("Request failed without a response from the server.")))}}),a=setTimeout(()=>{if(o)return;o=!0,i&&typeof i.abort=="function"&&i.abort();const g=new Error("Request timed out");g.code="CHANGAI_TIMEOUT",h(g)},Xo)}),cancel:()=>o||!i||typeof i.abort!="function"?!1:(i.abort(),o=!0,clearTimeout(a),!0)}}function Zc(e,t="actual"){if(t==="test")return{promise:Promise.resolve(`[TEST MODE] ${JSON.stringify({message:e})}`),cancel:()=>!1};if(!window.frappe||!window.frappe.call)return{promise:Promise.reject(new Error("Frappe API is unavailable in actual mode.")),cancel:()=>!1};let n=null,s=!1;return{promise:new Promise((o,a)=>{n=window.frappe.call({method:Ds.SUPPORT,args:{message:e},callback(l){s=!0,o(l.message)},error(l){s=!0,a(l)}})}),cancel:()=>s||!n||typeof n.abort!="function"?!1:(n.abort(),s=!0,!0)}}function Xc(e="actual"){return Jo(Ds.SETTINGS,{},e)}function Jc(e,t="Zayd",n="actual"){return Jo(Ds.TTS,{text:e,voice_id:t},n)}function Qo(){var e,t,n;return!!((n=(t=(e=window.frappe)==null?void 0:e.realtime)==null?void 0:t.socket)!=null&&n.connected)}function Nr(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var hn=Nr();function el(e){hn=e}var gn={exec:()=>null};function oe(e,t=""){let n=typeof e=="string"?e:e.source,s={replace:(r,i)=>{let o=typeof i=="string"?i:i.source;return o=o.replace(Ke.caret,"$1"),n=n.replace(r,o),s},getRegex:()=>new RegExp(n,t)};return s}var Qc=((e="")=>{try{return!!new RegExp("(?<=1)(?/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},ef=/^(?:[ \t]*(?:\n|$))+/,tf=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,nf=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Qn=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,sf=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Dr=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,tl=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,nl=oe(tl).replace(/bull/g,Dr).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),rf=oe(tl).replace(/bull/g,Dr).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Fr=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,of=/^[^\n]+/,Br=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,lf=oe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Br).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),af=oe(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Dr).getRegex(),Fs="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Hr=/|$))/,uf=oe("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Hr).replace("tag",Fs).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),sl=oe(Fr).replace("hr",Qn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Fs).getRegex(),cf=oe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",sl).getRegex(),zr={blockquote:cf,code:tf,def:lf,fences:nf,heading:sf,hr:Qn,html:uf,lheading:nl,list:af,newline:ef,paragraph:sl,table:gn,text:of},rl=oe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Qn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Fs).getRegex(),ff={...zr,lheading:rf,table:rl,paragraph:oe(Fr).replace("hr",Qn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",rl).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Fs).getRegex()},pf={...zr,html:oe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Hr).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:gn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:oe(Fr).replace("hr",Qn).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",nl).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},df=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,hf=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,il=/^( {2,}|\\)\n(?!\s*$)/,gf=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`+)[^`]+\k(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Qc?"(?`+)[^`]+\k(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),ll=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,wf=oe(ll,"u").replace(/punct/g,Rn).getRegex(),vf=oe(ll,"u").replace(/punct/g,ol).getRegex(),al="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",_f=oe(al,"gu").replace(/notPunctSpace/g,Ur).replace(/punctSpace/g,Bs).replace(/punct/g,Rn).getRegex(),Tf=oe(al,"gu").replace(/notPunctSpace/g,xf).replace(/punctSpace/g,bf).replace(/punct/g,ol).getRegex(),kf=oe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Ur).replace(/punctSpace/g,Bs).replace(/punct/g,Rn).getRegex(),Sf=oe(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Rn).getRegex(),Ef="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Af=oe(Ef,"gu").replace(/notPunctSpace/g,Ur).replace(/punctSpace/g,Bs).replace(/punct/g,Rn).getRegex(),Rf=oe(/\\(punct)/,"gu").replace(/punct/g,Rn).getRegex(),Cf=oe(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Pf=oe(Hr).replace("(?:-->|$)","-->").getRegex(),If=oe("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",Pf).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Hs=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,Of=oe(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Hs).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ul=oe(/^!?\[(label)\]\[(ref)\]/).replace("label",Hs).replace("ref",Br).getRegex(),cl=oe(/^!?\[(ref)\](?:\[\])?/).replace("ref",Br).getRegex(),Mf=oe("reflink|nolink(?!\\()","g").replace("reflink",ul).replace("nolink",cl).getRegex(),fl=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,jr={_backpedal:gn,anyPunctuation:Rf,autolink:Cf,blockSkip:yf,br:il,code:hf,del:gn,delLDelim:gn,delRDelim:gn,emStrongLDelim:wf,emStrongRDelimAst:_f,emStrongRDelimUnd:kf,escape:df,link:Of,nolink:cl,punctuation:mf,reflink:ul,reflinkSearch:Mf,tag:If,text:gf,url:gn},Lf={...jr,link:oe(/^!?\[(label)\]\((.*?)\)/).replace("label",Hs).getRegex(),reflink:oe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Hs).getRegex()},Vr={...jr,emStrongRDelimAst:Tf,emStrongLDelim:vf,delLDelim:Sf,delRDelim:Af,url:oe(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",fl).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:oe(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},pl=e=>Nf[e];function St(e,t){if(t){if(Ke.escapeTest.test(e))return e.replace(Ke.escapeReplace,pl)}else if(Ke.escapeTestNoEncode.test(e))return e.replace(Ke.escapeReplaceNoEncode,pl);return e}function dl(e){try{e=encodeURI(e).replace(Ke.percentDecode,"%")}catch{return null}return e}function hl(e,t){var i;let n=e.replace(Ke.findPipe,(o,a,l)=>{let f=!1,u=a;for(;--u>=0&&l[u]==="\\";)f=!f;return f?"|":" |"}),s=n.split(Ke.splitPipe),r=0;if(s[0].trim()||s.shift(),s.length>0&&!((i=s.at(-1))!=null&&i.trim())&&s.pop(),t)if(s.length>t)s.splice(t);else for(;s.length=0&&Ke.blankLine.test(t[n]);)n--;return t.length-n<=2?e:t.slice(0,n+1).join(` +`)}function Df(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let s=0;s0?-2:-1}function Ff(e,t=0){let n=t,s="";for(let r of e)if(r===" "){let i=4-n%4;s+=" ".repeat(i),n+=i}else s+=r,n++;return s}function ml(e,t,n,s,r){let i=t.href,o=t.title||null,a=e[1].replace(r.other.outputLinkReplace,"$1");s.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:o,text:a,tokens:s.inlineTokens(a)};return s.state.inLink=!1,l}function Bf(e,t,n){let s=e.match(n.other.indentCodeCompensation);if(s===null)return t;let r=s[1];return t.split(` +`).map(i=>{let o=i.match(n.other.beginningSpace);if(o===null)return i;let[a]=o;return a.length>=r.length?i.slice(r.length):i}).join(` +`)}var Us=class{constructor(e){ve(this,"options");ve(this,"rules");ve(this,"lexer");this.options=e||hn}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=this.options.pedantic?t[0]:gl(t[0]),s=n.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:n,codeBlockStyle:"indented",text:s}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],s=Bf(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:s}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let s=Jt(n,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(n=s.trim())}return{type:"heading",raw:Jt(t[0],` +`),depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Jt(t[0],` +`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=Jt(t[0],` `).split(` -`),s="",r="",i=[];for(;n.length>0;){let l=!1,a=[],o;for(o=0;o0;){let o=!1,a=[],l;for(l=0;l1,r={type:"list",raw:"",ordered:s,start:s?+n.slice(0,-1):"",loose:!1,items:[]};n=s?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=s?n:"[*+-]");let i=this.rules.other.listItemRegex(n),l=!1;for(;e;){let o=!1,c="",u="";if(!(t=i.exec(e))||this.rules.block.hr.test(e))break;c=t[0],e=e.substring(c.length);let d=yf(t[2].split(` +`),_=this.list(A);i[i.length-1]=_,s=s.substring(0,s.length-g.raw.length)+_.raw,r=r.substring(0,r.length-w.raw.length)+_.raw,n=A.substring(i.at(-1).raw.length).split(` +`);continue}}return{type:"blockquote",raw:s,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),s=n.length>1,r={type:"list",raw:"",ordered:s,start:s?+n.slice(0,-1):"",loose:!1,items:[]};n=s?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=s?n:"[*+-]");let i=this.rules.other.listItemRegex(n),o=!1;for(;e;){let l=!1,f="",u="";if(!(t=i.exec(e))||this.rules.block.hr.test(e))break;f=t[0],e=e.substring(f.length);let h=Ff(t[2].split(` `,1)[0],t[1].length),g=e.split(` -`,1)[0],y=!d.trim(),E=0;if(this.options.pedantic?(E=2,u=d.trimStart()):y?E=t[1].length+1:(E=d.search(this.rules.other.nonSpaceChar),E=E>4?1:E,u=d.slice(E),E+=t[1].length),y&&this.rules.other.blankLine.test(g)&&(c+=g+` -`,e=e.substring(g.length+1),o=!0),!o){let x=this.rules.other.nextBulletRegex(E),M=this.rules.other.hrRegex(E),m=this.rules.other.fencesBeginRegex(E),H=this.rules.other.headingBeginRegex(E),Y=this.rules.other.htmlBeginRegex(E),$=this.rules.other.blockquoteBeginRegex(E);for(;e;){let U=e.split(` -`,1)[0],L;if(g=U,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),L=g):L=g.replace(this.rules.other.tabCharGlobal," "),m.test(g)||H.test(g)||Y.test(g)||$.test(g)||x.test(g)||M.test(g))break;if(L.search(this.rules.other.nonSpaceChar)>=E||!g.trim())u+=` -`+L.slice(E);else{if(y||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||m.test(d)||H.test(d)||M.test(d))break;u+=` -`+g}y=!g.trim(),c+=U+` -`,e=e.substring(U.length+1),d=L.slice(E)}}r.loose||(l?r.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(l=!0)),r.items.push({type:"list_item",raw:c,task:!!this.options.gfm&&this.rules.other.listIsTask.test(u),loose:!1,text:u,tokens:[]}),r.raw+=c}let a=r.items.at(-1);if(a)a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let o of r.items){this.lexer.state.top=!1,o.tokens=this.lexer.blockTokens(o.text,[]);let c=o.tokens[0];if(o.task&&((c==null?void 0:c.type)==="text"||(c==null?void 0:c.type)==="paragraph")){o.text=o.text.replace(this.rules.other.listReplaceTask,""),c.raw=c.raw.replace(this.rules.other.listReplaceTask,""),c.text=c.text.replace(this.rules.other.listReplaceTask,"");for(let d=this.lexer.inlineQueue.length-1;d>=0;d--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[d].src)){this.lexer.inlineQueue[d].src=this.lexer.inlineQueue[d].src.replace(this.rules.other.listReplaceTask,"");break}let u=this.rules.other.listTaskCheckbox.exec(o.raw);if(u){let d={type:"checkbox",raw:u[0]+" ",checked:u[0]!=="[ ]"};o.checked=d.checked,r.loose?o.tokens[0]&&["paragraph","text"].includes(o.tokens[0].type)&&"tokens"in o.tokens[0]&&o.tokens[0].tokens?(o.tokens[0].raw=d.raw+o.tokens[0].raw,o.tokens[0].text=d.raw+o.tokens[0].text,o.tokens[0].tokens.unshift(d)):o.tokens.unshift({type:"paragraph",raw:d.raw,text:d.raw,tokens:[d]}):o.tokens.unshift(d)}}else o.task&&(o.task=!1);if(!r.loose){let u=o.tokens.filter(g=>g.type==="space"),d=u.length>0&&u.some(g=>this.rules.other.anyLine.test(g.raw));r.loose=d}}if(r.loose)for(let o of r.items){o.loose=!0;for(let c of o.tokens)c.type==="text"&&(c.type="paragraph")}return r}}html(e){let t=this.rules.block.html.exec(e);if(t){let n=eo(t[0]);return{type:"html",block:!0,raw:n,pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:n}}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:Qt(t[0],` -`),href:s,title:r}}}table(e){var l;let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=Jl(t[1]),s=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=(l=t[3])!=null&&l.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(` -`):[],i={type:"table",raw:Qt(t[0],` -`),header:[],align:[],rows:[]};if(n.length===s.length){for(let a of s)this.rules.other.tableAlignRight.test(a)?i.align.push("right"):this.rules.other.tableAlignCenter.test(a)?i.align.push("center"):this.rules.other.tableAlignLeft.test(a)?i.align.push("left"):i.align.push(null);for(let a=0;a({text:o,tokens:this.lexer.inline(o),header:!1,align:i.align[c]})));return i}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let n=t[1].trim();return{type:"heading",raw:Qt(t[0],` +`,1)[0],w=!h.trim(),A=0;if(this.options.pedantic?(A=2,u=h.trimStart()):w?A=t[1].length+1:(A=h.search(this.rules.other.nonSpaceChar),A=A>4?1:A,u=h.slice(A),A+=t[1].length),w&&this.rules.other.blankLine.test(g)&&(f+=g+` +`,e=e.substring(g.length+1),l=!0),!l){let _=this.rules.other.nextBulletRegex(A),F=this.rules.other.hrRegex(A),b=this.rules.other.fencesBeginRegex(A),U=this.rules.other.headingBeginRegex(A),Z=this.rules.other.htmlBeginRegex(A),$=this.rules.other.blockquoteBeginRegex(A);for(;e;){let Y=e.split(` +`,1)[0],C;if(g=Y,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),C=g):C=g.replace(this.rules.other.tabCharGlobal," "),b.test(g)||U.test(g)||Z.test(g)||$.test(g)||_.test(g)||F.test(g))break;if(C.search(this.rules.other.nonSpaceChar)>=A||!g.trim())u+=` +`+C.slice(A);else{if(w||h.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||b.test(h)||U.test(h)||F.test(h))break;u+=` +`+g}w=!g.trim(),f+=Y+` +`,e=e.substring(Y.length+1),h=C.slice(A)}}r.loose||(o?r.loose=!0:this.rules.other.doubleBlankLine.test(f)&&(o=!0)),r.items.push({type:"list_item",raw:f,task:!!this.options.gfm&&this.rules.other.listIsTask.test(u),loose:!1,text:u,tokens:[]}),r.raw+=f}let a=r.items.at(-1);if(a)a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let l of r.items){this.lexer.state.top=!1,l.tokens=this.lexer.blockTokens(l.text,[]);let f=l.tokens[0];if(l.task&&((f==null?void 0:f.type)==="text"||(f==null?void 0:f.type)==="paragraph")){l.text=l.text.replace(this.rules.other.listReplaceTask,""),f.raw=f.raw.replace(this.rules.other.listReplaceTask,""),f.text=f.text.replace(this.rules.other.listReplaceTask,"");for(let h=this.lexer.inlineQueue.length-1;h>=0;h--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[h].src)){this.lexer.inlineQueue[h].src=this.lexer.inlineQueue[h].src.replace(this.rules.other.listReplaceTask,"");break}let u=this.rules.other.listTaskCheckbox.exec(l.raw);if(u){let h={type:"checkbox",raw:u[0]+" ",checked:u[0]!=="[ ]"};l.checked=h.checked,r.loose?l.tokens[0]&&["paragraph","text"].includes(l.tokens[0].type)&&"tokens"in l.tokens[0]&&l.tokens[0].tokens?(l.tokens[0].raw=h.raw+l.tokens[0].raw,l.tokens[0].text=h.raw+l.tokens[0].text,l.tokens[0].tokens.unshift(h)):l.tokens.unshift({type:"paragraph",raw:h.raw,text:h.raw,tokens:[h]}):l.tokens.unshift(h)}}else l.task&&(l.task=!1);if(!r.loose){let u=l.tokens.filter(g=>g.type==="space"),h=u.length>0&&u.some(g=>this.rules.other.anyLine.test(g.raw));r.loose=h}}if(r.loose)for(let l of r.items){l.loose=!0;for(let f of l.tokens)f.type==="text"&&(f.type="paragraph")}return r}}html(e){let t=this.rules.block.html.exec(e);if(t){let n=gl(t[0]);return{type:"html",block:!0,raw:n,pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:n}}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:Jt(t[0],` +`),href:s,title:r}}}table(e){var o;let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=hl(t[1]),s=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=(o=t[3])!=null&&o.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(` +`):[],i={type:"table",raw:Jt(t[0],` +`),header:[],align:[],rows:[]};if(n.length===s.length){for(let a of s)this.rules.other.tableAlignRight.test(a)?i.align.push("right"):this.rules.other.tableAlignCenter.test(a)?i.align.push("center"):this.rules.other.tableAlignLeft.test(a)?i.align.push("left"):i.align.push(null);for(let a=0;a({text:l,tokens:this.lexer.inline(l),header:!1,align:i.align[f]})));return i}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let n=t[1].trim();return{type:"heading",raw:Jt(t[0],` `),depth:t[2].charAt(0)==="="?1:2,text:n,tokens:this.lexer.inline(n)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===` -`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let i=Qt(n.slice(0,-1),"\\");if((n.length-i.length)%2===0)return}else{let i=xf(t[2],"()");if(i===-2)return;if(i>-1){let l=(t[0].indexOf("!")===0?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,l).trim(),t[3]=""}}let s=t[2],r="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(s);i&&(s=i[1],r=i[3])}else r=t[3]?t[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?s=s.slice(1):s=s.slice(1,-1)),to(t,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let s=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=t[s.toLowerCase()];if(!r){let i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return to(n,r,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let s=this.rules.inline.emStrongLDelim.exec(e);if(!(!s||!s[1]&&!s[2]&&!s[3]&&!s[4]||s[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[3])||!n||this.rules.inline.punctuation.exec(n))){let r=[...s[0]].length-1,i,l,a=r,o=0,c=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+r);(s=c.exec(t))!==null;){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i)continue;if(l=[...i].length,s[3]||s[4]){a+=l;continue}else if((s[5]||s[6])&&r%3&&!((r+l)%3)){o+=l;continue}if(a-=l,a>0)continue;l=Math.min(l,l+a+o);let u=[...s[0]][0].length,d=e.slice(0,r+s.index+u+l);if(Math.min(r,l)%2){let y=d.slice(1,-1);return{type:"em",raw:d,text:y,tokens:this.lexer.inlineTokens(y)}}let g=d.slice(2,-2);return{type:"strong",raw:d,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(n),r=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return s&&r&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,n=""){let s=this.rules.inline.delLDelim.exec(e);if(s&&(!s[1]||!n||this.rules.inline.punctuation.exec(n))){let r=[...s[0]].length-1,i,l,a=r,o=this.rules.inline.delRDelim;for(o.lastIndex=0,t=t.slice(-1*e.length+r);(s=o.exec(t))!==null;){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i||(l=[...i].length,l!==r))continue;if(s[3]||s[4]){a+=l;continue}if(a-=l,a>0)continue;l=Math.min(l,l+a);let c=[...s[0]][0].length,u=e.slice(0,r+s.index+c+l),d=u.slice(r,-r);return{type:"del",raw:u,text:d,tokens:this.lexer.inlineTokens(d)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,s;return t[2]==="@"?(n=t[1],s="mailto:"+n):(n=t[1],s=n),{type:"link",raw:t[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n,s;let t;if(t=this.rules.inline.url.exec(e)){let r,i;if(t[2]==="@")r=t[0],i="mailto:"+r;else{let l;do l=t[0],t[0]=(s=(n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])!=null?s:"";while(l!==t[0]);r=t[0],t[1]==="www."?i="http://"+t[0]:i=t[0]}return{type:"link",raw:t[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},yt=class Xr{constructor(t){ve(this,"tokens");ve(this,"options");ve(this,"state");ve(this,"inlineQueue");ve(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||cn,this.options.tokenizer=this.options.tokenizer||new Ls,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:Ge,block:Ms.normal,inline:Yn.normal};this.options.pedantic?(n.block=Ms.pedantic,n.inline=Yn.pedantic):this.options.gfm&&(n.block=Ms.gfm,this.options.breaks?n.inline=Yn.breaks:n.inline=Yn.gfm),this.tokenizer.rules=n}static get rules(){return{block:Ms,inline:Yn}}static lex(t,n){return new Xr(n).lex(t)}static lexInline(t,n){return new Xr(n).inlineTokens(t)}lex(t){t=t.replace(Ge.carriageReturn,` -`),this.blockTokens(t,this.tokens);for(let n=0;n(o=u.call({lexer:this},t,n))?(t=t.substring(o.raw.length),n.push(o),!0):!1))continue;if(o=this.tokenizer.space(t)){t=t.substring(o.raw.length);let u=n.at(-1);o.raw.length===1&&u!==void 0?u.raw+=` -`:n.push(o);continue}if(o=this.tokenizer.code(t)){t=t.substring(o.raw.length);let u=n.at(-1);(u==null?void 0:u.type)==="paragraph"||(u==null?void 0:u.type)==="text"?(u.raw+=(u.raw.endsWith(` +`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let i=Jt(n.slice(0,-1),"\\");if((n.length-i.length)%2===0)return}else{let i=Df(t[2],"()");if(i===-2)return;if(i>-1){let o=(t[0].indexOf("!")===0?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,o).trim(),t[3]=""}}let s=t[2],r="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(s);i&&(s=i[1],r=i[3])}else r=t[3]?t[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?s=s.slice(1):s=s.slice(1,-1)),ml(t,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let s=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=t[s.toLowerCase()];if(!r){let i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return ml(n,r,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let s=this.rules.inline.emStrongLDelim.exec(e);if(!(!s||!s[1]&&!s[2]&&!s[3]&&!s[4]||s[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[3])||!n||this.rules.inline.punctuation.exec(n))){let r=[...s[0]].length-1,i,o,a=r,l=0,f=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(f.lastIndex=0,t=t.slice(-1*e.length+r);(s=f.exec(t))!==null;){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i)continue;if(o=[...i].length,s[3]||s[4]){a+=o;continue}else if((s[5]||s[6])&&r%3&&!((r+o)%3)){l+=o;continue}if(a-=o,a>0)continue;o=Math.min(o,o+a+l);let u=[...s[0]][0].length,h=e.slice(0,r+s.index+u+o);if(Math.min(r,o)%2){let w=h.slice(1,-1);return{type:"em",raw:h,text:w,tokens:this.lexer.inlineTokens(w)}}let g=h.slice(2,-2);return{type:"strong",raw:h,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(n),r=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return s&&r&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,n=""){let s=this.rules.inline.delLDelim.exec(e);if(s&&(!s[1]||!n||this.rules.inline.punctuation.exec(n))){let r=[...s[0]].length-1,i,o,a=r,l=this.rules.inline.delRDelim;for(l.lastIndex=0,t=t.slice(-1*e.length+r);(s=l.exec(t))!==null;){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i||(o=[...i].length,o!==r))continue;if(s[3]||s[4]){a+=o;continue}if(a-=o,a>0)continue;o=Math.min(o,o+a);let f=[...s[0]][0].length,u=e.slice(0,r+s.index+f+o),h=u.slice(r,-r);return{type:"del",raw:u,text:h,tokens:this.lexer.inlineTokens(h)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,s;return t[2]==="@"?(n=t[1],s="mailto:"+n):(n=t[1],s=n),{type:"link",raw:t[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n,s;let t;if(t=this.rules.inline.url.exec(e)){let r,i;if(t[2]==="@")r=t[0],i="mailto:"+r;else{let o;do o=t[0],t[0]=(s=(n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])!=null?s:"";while(o!==t[0]);r=t[0],t[1]==="www."?i="http://"+t[0]:i=t[0]}return{type:"link",raw:t[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},gt=class ui{constructor(t){ve(this,"tokens");ve(this,"options");ve(this,"state");ve(this,"inlineQueue");ve(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||hn,this.options.tokenizer=this.options.tokenizer||new Us,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:Ke,block:zs.normal,inline:es.normal};this.options.pedantic?(n.block=zs.pedantic,n.inline=es.pedantic):this.options.gfm&&(n.block=zs.gfm,this.options.breaks?n.inline=es.breaks:n.inline=es.gfm),this.tokenizer.rules=n}static get rules(){return{block:zs,inline:es}}static lex(t,n){return new ui(n).lex(t)}static lexInline(t,n){return new ui(n).inlineTokens(t)}lex(t){t=t.replace(Ke.carriageReturn,` +`),this.blockTokens(t,this.tokens);for(let n=0;n(l=u.call({lexer:this},t,n))?(t=t.substring(l.raw.length),n.push(l),!0):!1))continue;if(l=this.tokenizer.space(t)){t=t.substring(l.raw.length);let u=n.at(-1);l.raw.length===1&&u!==void 0?u.raw+=` +`:n.push(l);continue}if(l=this.tokenizer.code(t)){t=t.substring(l.raw.length);let u=n.at(-1);(u==null?void 0:u.type)==="paragraph"||(u==null?void 0:u.type)==="text"?(u.raw+=(u.raw.endsWith(` `)?"":` -`)+o.raw,u.text+=` -`+o.text,this.inlineQueue.at(-1).src=u.text):n.push(o);continue}if(o=this.tokenizer.fences(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.heading(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.hr(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.blockquote(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.list(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.html(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.def(t)){t=t.substring(o.raw.length);let u=n.at(-1);(u==null?void 0:u.type)==="paragraph"||(u==null?void 0:u.type)==="text"?(u.raw+=(u.raw.endsWith(` +`)+l.raw,u.text+=` +`+l.text,this.inlineQueue.at(-1).src=u.text):n.push(l);continue}if(l=this.tokenizer.fences(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.heading(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.hr(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.blockquote(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.list(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.html(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.def(t)){t=t.substring(l.raw.length);let u=n.at(-1);(u==null?void 0:u.type)==="paragraph"||(u==null?void 0:u.type)==="text"?(u.raw+=(u.raw.endsWith(` `)?"":` -`)+o.raw,u.text+=` -`+o.raw,this.inlineQueue.at(-1).src=u.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title},n.push(o));continue}if(o=this.tokenizer.table(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.lheading(t)){t=t.substring(o.raw.length),n.push(o);continue}let c=t;if((a=this.options.extensions)!=null&&a.startBlock){let u=1/0,d=t.slice(1),g;this.options.extensions.startBlock.forEach(y=>{g=y.call({lexer:this},d),typeof g=="number"&&g>=0&&(u=Math.min(u,g))}),u<1/0&&u>=0&&(c=t.substring(0,u+1))}if(this.state.top&&(o=this.tokenizer.paragraph(c))){let u=n.at(-1);s&&(u==null?void 0:u.type)==="paragraph"?(u.raw+=(u.raw.endsWith(` +`)+l.raw,u.text+=` +`+l.raw,this.inlineQueue.at(-1).src=u.text):this.tokens.links[l.tag]||(this.tokens.links[l.tag]={href:l.href,title:l.title},n.push(l));continue}if(l=this.tokenizer.table(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.lheading(t)){t=t.substring(l.raw.length),n.push(l);continue}let f=t;if((a=this.options.extensions)!=null&&a.startBlock){let u=1/0,h=t.slice(1),g;this.options.extensions.startBlock.forEach(w=>{g=w.call({lexer:this},h),typeof g=="number"&&g>=0&&(u=Math.min(u,g))}),u<1/0&&u>=0&&(f=t.substring(0,u+1))}if(this.state.top&&(l=this.tokenizer.paragraph(f))){let u=n.at(-1);s&&(u==null?void 0:u.type)==="paragraph"?(u.raw+=(u.raw.endsWith(` `)?"":` -`)+o.raw,u.text+=` -`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=u.text):n.push(o),s=c.length!==t.length,t=t.substring(o.raw.length);continue}if(o=this.tokenizer.text(t)){t=t.substring(o.raw.length);let u=n.at(-1);(u==null?void 0:u.type)==="text"?(u.raw+=(u.raw.endsWith(` +`)+l.raw,u.text+=` +`+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=u.text):n.push(l),s=f.length!==t.length,t=t.substring(l.raw.length);continue}if(l=this.tokenizer.text(t)){t=t.substring(l.raw.length);let u=n.at(-1);(u==null?void 0:u.type)==="text"?(u.raw+=(u.raw.endsWith(` `)?"":` -`)+o.raw,u.text+=` -`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=u.text):n.push(o);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){var c,u,d,g,y,E;this.tokenizer.lexer=this;let s=t,r=null;if(this.tokens.links){let x=Object.keys(this.tokens.links);if(x.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(s))!==null;)x.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(s))!==null;)s=s.slice(0,r.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(s))!==null;)i=r[2]?r[2].length:0,s=s.slice(0,r.index+i)+"["+"a".repeat(r[0].length-i-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);s=(d=(u=(c=this.options.hooks)==null?void 0:c.emStrongMask)==null?void 0:u.call({lexer:this},s))!=null?d:s;let l=!1,a="",o=1/0;for(;t;){if(t.length(x=m.call({lexer:this},t,n))?(t=t.substring(x.raw.length),n.push(x),!0):!1))continue;if(x=this.tokenizer.escape(t)){t=t.substring(x.raw.length),n.push(x);continue}if(x=this.tokenizer.tag(t)){t=t.substring(x.raw.length),n.push(x);continue}if(x=this.tokenizer.link(t)){t=t.substring(x.raw.length),n.push(x);continue}if(x=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(x.raw.length);let m=n.at(-1);x.type==="text"&&(m==null?void 0:m.type)==="text"?(m.raw+=x.raw,m.text+=x.text):n.push(x);continue}if(x=this.tokenizer.emStrong(t,s,a)){t=t.substring(x.raw.length),n.push(x);continue}if(x=this.tokenizer.codespan(t)){t=t.substring(x.raw.length),n.push(x);continue}if(x=this.tokenizer.br(t)){t=t.substring(x.raw.length),n.push(x);continue}if(x=this.tokenizer.del(t,s,a)){t=t.substring(x.raw.length),n.push(x);continue}if(x=this.tokenizer.autolink(t)){t=t.substring(x.raw.length),n.push(x);continue}if(!this.state.inLink&&(x=this.tokenizer.url(t))){t=t.substring(x.raw.length),n.push(x);continue}let M=t;if((E=this.options.extensions)!=null&&E.startInline){let m=1/0,H=t.slice(1),Y;this.options.extensions.startInline.forEach($=>{Y=$.call({lexer:this},H),typeof Y=="number"&&Y>=0&&(m=Math.min(m,Y))}),m<1/0&&m>=0&&(M=t.substring(0,m+1))}if(x=this.tokenizer.inlineText(M)){t=t.substring(x.raw.length),x.raw.slice(-1)!=="_"&&(a=x.raw.slice(-1)),l=!0;let m=n.at(-1);(m==null?void 0:m.type)==="text"?(m.raw+=x.raw,m.text+=x.text):n.push(x);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return n}infiniteLoopError(t){let n="Infinite loop on byte: "+t;if(!this.options.silent)throw new Error(n)}},$s=class{constructor(e){ve(this,"options");ve(this,"parser");this.options=e||cn}space(e){return""}code({text:e,lang:t,escaped:n}){var i;let s=(i=(t||"").match(Ge.notSpaceStart))==null?void 0:i[0],r=e.replace(Ge.endingNewline,"")+` -`;return s?'
'+(n?r:Ct(r,!0))+`
-`:"
"+(n?r:Ct(r,!0))+`
+`)+l.raw,u.text+=` +`+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=u.text):n.push(l);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){var f,u,h,g,w,A;this.tokenizer.lexer=this;let s=t,r=null;if(this.tokens.links){let _=Object.keys(this.tokens.links);if(_.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(s))!==null;)_.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(s))!==null;)s=s.slice(0,r.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(s))!==null;)i=r[2]?r[2].length:0,s=s.slice(0,r.index+i)+"["+"a".repeat(r[0].length-i-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);s=(h=(u=(f=this.options.hooks)==null?void 0:f.emStrongMask)==null?void 0:u.call({lexer:this},s))!=null?h:s;let o=!1,a="",l=1/0;for(;t;){if(t.length(_=b.call({lexer:this},t,n))?(t=t.substring(_.raw.length),n.push(_),!0):!1))continue;if(_=this.tokenizer.escape(t)){t=t.substring(_.raw.length),n.push(_);continue}if(_=this.tokenizer.tag(t)){t=t.substring(_.raw.length),n.push(_);continue}if(_=this.tokenizer.link(t)){t=t.substring(_.raw.length),n.push(_);continue}if(_=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(_.raw.length);let b=n.at(-1);_.type==="text"&&(b==null?void 0:b.type)==="text"?(b.raw+=_.raw,b.text+=_.text):n.push(_);continue}if(_=this.tokenizer.emStrong(t,s,a)){t=t.substring(_.raw.length),n.push(_);continue}if(_=this.tokenizer.codespan(t)){t=t.substring(_.raw.length),n.push(_);continue}if(_=this.tokenizer.br(t)){t=t.substring(_.raw.length),n.push(_);continue}if(_=this.tokenizer.del(t,s,a)){t=t.substring(_.raw.length),n.push(_);continue}if(_=this.tokenizer.autolink(t)){t=t.substring(_.raw.length),n.push(_);continue}if(!this.state.inLink&&(_=this.tokenizer.url(t))){t=t.substring(_.raw.length),n.push(_);continue}let F=t;if((A=this.options.extensions)!=null&&A.startInline){let b=1/0,U=t.slice(1),Z;this.options.extensions.startInline.forEach($=>{Z=$.call({lexer:this},U),typeof Z=="number"&&Z>=0&&(b=Math.min(b,Z))}),b<1/0&&b>=0&&(F=t.substring(0,b+1))}if(_=this.tokenizer.inlineText(F)){t=t.substring(_.raw.length),_.raw.slice(-1)!=="_"&&(a=_.raw.slice(-1)),o=!0;let b=n.at(-1);(b==null?void 0:b.type)==="text"?(b.raw+=_.raw,b.text+=_.text):n.push(_);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return n}infiniteLoopError(t){let n="Infinite loop on byte: "+t;if(this.options.silent)console.error(n);else throw new Error(n)}},js=class{constructor(e){ve(this,"options");ve(this,"parser");this.options=e||hn}space(e){return""}code({text:e,lang:t,escaped:n}){var i;let s=(i=(t||"").match(Ke.notSpaceStart))==null?void 0:i[0],r=e.replace(Ke.endingNewline,"")+` +`;return s?'
'+(n?r:St(r,!0))+`
+`:"
"+(n?r:St(r,!0))+`
`}blockquote({tokens:e}){return`
${this.parser.parse(e)}
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`${this.parser.parseInline(e)} `}hr(e){return`
-`}list(e){let t=e.ordered,n=e.start,s="";for(let l=0;l +`}list(e){let t=e.ordered,n=e.start,s="";for(let o=0;o `+s+" `}listitem(e){return`
  • ${this.parser.parse(e.tokens)}
  • `}checkbox({checked:e}){return" '}paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

    -`}table(e){let t="",n="";for(let r=0;r${s}`),` +`}table(e){let t="",n="";for(let r=0;r${s}`),`
    `+t+` `+s+`
    `}tablerow({text:e}){return` ${e} `}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+` -`}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${Ct(e,!0)}`}br(e){return"
    "}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:n}){let s=this.parser.parseInline(n),r=Ql(e);if(r===null)return s;e=r;let i='
    ",i}image({href:e,title:t,text:n,tokens:s}){s&&(n=this.parser.parseInline(s,this.parser.textRenderer));let r=Ql(e);if(r===null)return Ct(n);e=r;let i=`${Ct(n)}{let o=l[a].flat(1/0);n=n.concat(this.walkTokens(o,t))}):l.tokens&&(n=n.concat(this.walkTokens(l.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let s={...n};if(s.async=this.defaults.async||s.async||!1,n.extensions&&(n.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){let i=t.renderers[r.name];i?t.renderers[r.name]=function(...l){let a=r.renderer.apply(this,l);return a===!1&&(a=i.apply(this,l)),a}:t.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=t[r.level];i?i.unshift(r.tokenizer):t[r.level]=[r.tokenizer],r.start&&(r.level==="block"?t.startBlock?t.startBlock.push(r.start):t.startBlock=[r.start]:r.level==="inline"&&(t.startInline?t.startInline.push(r.start):t.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(t.childTokens[r.name]=r.childTokens)}),s.extensions=t),n.renderer){let r=this.defaults.renderer||new $s(this.defaults);for(let i in n.renderer){if(!(i in r))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let l=i,a=n.renderer[l],o=r[l];r[l]=(...c)=>{let u=a.apply(r,c);return u===!1&&(u=o.apply(r,c)),u||""}}s.renderer=r}if(n.tokenizer){let r=this.defaults.tokenizer||new Ls(this.defaults);for(let i in n.tokenizer){if(!(i in r))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let l=i,a=n.tokenizer[l],o=r[l];r[l]=(...c)=>{let u=a.apply(r,c);return u===!1&&(u=o.apply(r,c)),u}}s.tokenizer=r}if(n.hooks){let r=this.defaults.hooks||new Zn;for(let i in n.hooks){if(!(i in r))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let l=i,a=n.hooks[l],o=r[l];Zn.passThroughHooks.has(i)?r[l]=c=>{if(this.defaults.async&&Zn.passThroughHooksRespectAsync.has(i))return(async()=>{let d=await a.call(r,c);return o.call(r,d)})();let u=a.call(r,c);return o.call(r,u)}:r[l]=(...c)=>{if(this.defaults.async)return(async()=>{let d=await a.apply(r,c);return d===!1&&(d=await o.apply(r,c)),d})();let u=a.apply(r,c);return u===!1&&(u=o.apply(r,c)),u}}s.hooks=r}if(n.walkTokens){let r=this.defaults.walkTokens,i=n.walkTokens;s.walkTokens=function(l){let a=[];return a.push(i.call(this,l)),r&&(a=a.concat(r.call(this,l))),a}}this.defaults={...this.defaults,...s}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return yt.lex(e,t!=null?t:this.defaults)}parser(e,t){return wt.parse(e,t!=null?t:this.defaults)}parseMarkdown(e){return(t,n)=>{let s={...n},r={...this.defaults,...s},i=this.onError(!!r.silent,!!r.async);if(this.defaults.async===!0&&s.async===!1)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return i(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(r.hooks&&(r.hooks.options=r,r.hooks.block=e),r.async)return(async()=>{let l=r.hooks?await r.hooks.preprocess(t):t,a=await(r.hooks?await r.hooks.provideLexer(e):e?yt.lex:yt.lexInline)(l,r),o=r.hooks?await r.hooks.processAllTokens(a):a;r.walkTokens&&await Promise.all(this.walkTokens(o,r.walkTokens));let c=await(r.hooks?await r.hooks.provideParser(e):e?wt.parse:wt.parseInline)(o,r);return r.hooks?await r.hooks.postprocess(c):c})().catch(i);try{r.hooks&&(t=r.hooks.preprocess(t));let l=(r.hooks?r.hooks.provideLexer(e):e?yt.lex:yt.lexInline)(t,r);r.hooks&&(l=r.hooks.processAllTokens(l)),r.walkTokens&&this.walkTokens(l,r.walkTokens);let a=(r.hooks?r.hooks.provideParser(e):e?wt.parse:wt.parseInline)(l,r);return r.hooks&&(a=r.hooks.postprocess(a)),a}catch(l){return i(l)}}}onError(e,t){return n=>{if(n.message+=` -Please report this to https://github.com/markedjs/marked.`,e){let s="

    An error occurred:

    "+Ct(n.message+"",!0)+"
    ";return t?Promise.resolve(s):s}if(t)return Promise.reject(n);throw n}}},pn=new vf;function xe(e,t){return pn.parse(e,t)}xe.options=xe.setOptions=function(e){return pn.setOptions(e),xe.defaults=pn.defaults,Bl(xe.defaults),xe},xe.getDefaults=Sr,xe.defaults=cn,xe.use=function(...e){return pn.use(...e),xe.defaults=pn.defaults,Bl(xe.defaults),xe},xe.walkTokens=function(e,t){return pn.walkTokens(e,t)},xe.parseInline=pn.parseInline,xe.Parser=wt,xe.parser=wt.parse,xe.Renderer=$s,xe.TextRenderer=Lr,xe.Lexer=yt,xe.lexer=yt.lex,xe.Tokenizer=Ls,xe.Hooks=Zn,xe.parse=xe,xe.options,xe.setOptions,xe.use,xe.walkTokens,xe.parseInline,wt.parse,yt.lex;function no(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,s=Array(t);n2?s-2:0),i=2;i1?n-1:0),r=1;r1?n-1:0),r=1;r2&&arguments[2]!==void 0?arguments[2]:Xn;if(ro&&ro(e,null),!Xe(t))return e;let s=t.length;for(;s--;){let r=t[s];if(typeof r=="string"){const i=n(r);i!==r&&(Af(t)||(t[s]=i),r=i)}e[r]=!0}return e}function Df(e){for(let t=0;t/g),jf=ht(/\${[\w\W]*/g),Vf=ht(/^data-[\-\w.\u00B7-\uFFFF]+$/),qf=ht(/^aria-[\-\w]+$/),mo=ht(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Wf=ht(/^(?:\w+script|data):/i),Gf=ht(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Kf=ht(/^html$/i),Yf=ht(/^[a-z][.\w]*(-[.\w]+)+$/i),Rn={element:1,text:3,progressingInstruction:7,comment:8,document:9},Zf=function(){return typeof window=="undefined"?null:window},Xf=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let s=null;const r="data-tt-policy-suffix";n&&n.hasAttribute(r)&&(s=n.getAttribute(r));const i="dompurify"+(s?"#"+s:"");try{return t.createPolicy(i,{createHTML(l){return l},createScriptURL(l){return l}})}catch{return null}},bo=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function xo(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Zf();const t=W=>xo(W);if(t.version="3.4.3",t.removed=[],!e||!e.document||e.document.nodeType!==Rn.document||!e.Element)return t.isSupported=!1,t;let n=e.document;const s=n,r=s.currentScript,i=e.DocumentFragment,l=e.HTMLTemplateElement,a=e.Node,o=e.Element,c=e.NodeFilter,u=e.NamedNodeMap,d=u===void 0?e.NamedNodeMap||e.MozNamedAttrMap:u,g=e.HTMLFormElement,y=e.DOMParser,E=e.trustedTypes,x=o.prototype,M=An(x,"cloneNode"),m=An(x,"remove"),H=An(x,"nextSibling"),Y=An(x,"childNodes"),$=An(x,"parentNode");if(typeof l=="function"){const W=n.createElement("template");W.content&&W.content.ownerDocument&&(n=W.content.ownerDocument)}let U,L="";const O=n,ee=O.implementation,q=O.createNodeIterator,se=O.createDocumentFragment,fe=O.getElementsByTagName,D=s.importNode;let Z=bo();t.isSupported=typeof so=="function"&&typeof $=="function"&&ee&&ee.createHTMLDocument!==void 0;const Se=zf,je=Uf,te=jf,R=Vf,he=qf,Le=Wf,re=Gf,F=Yf;let ue=mo,ge=null;const Te=X({},[...fo,...Fr,...Br,...Hr,...po]);let pe=null;const Qe=X({},[...ho,...zr,...go,...Ns]);let ye=Object.seal(Tn(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),j=null,st=null;const Ie=Object.seal(Tn(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ft=!0,f=!0,h=!1,b=!0,k=!1,v=!0,_=!1,P=!1,C=!1,A=!1,S=!1,z=!1,I=!0,V=!1;const K="user-content-";let ne=!0,de=!1,ie={},ke=null;const De=X({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ot=null;const at=X({},["audio","video","img","source","image","track"]);let Bt=null;const Jn=X({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ne="http://www.w3.org/1998/Math/MathML",Je="http://www.w3.org/2000/svg",ut="http://www.w3.org/1999/xhtml";let Ht=ut,Ur=!1,jr=null;const hd=X({},[Ne,Je,ut],Nr);let Vr=X({},["mi","mo","mn","ms","mtext"]),qr=X({},["annotation-xml"]);const gd=X({},["title","style","font","a","script"]);let es=null;const md=["application/xhtml+xml","text/html"],bd="text/html";let $e=null,Cn=null;const xd=n.createElement("form"),So=function(p){return p instanceof RegExp||p instanceof Function},Wr=function(){let p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Cn&&Cn===p)return;(!p||typeof p!="object")&&(p={}),p=nt(p),es=md.indexOf(p.PARSER_MEDIA_TYPE)===-1?bd:p.PARSER_MEDIA_TYPE,$e=es==="application/xhtml+xml"?Nr:Xn,ge=Ae(p,"ALLOWED_TAGS")&&Xe(p.ALLOWED_TAGS)?X({},p.ALLOWED_TAGS,$e):Te,pe=Ae(p,"ALLOWED_ATTR")&&Xe(p.ALLOWED_ATTR)?X({},p.ALLOWED_ATTR,$e):Qe,jr=Ae(p,"ALLOWED_NAMESPACES")&&Xe(p.ALLOWED_NAMESPACES)?X({},p.ALLOWED_NAMESPACES,Nr):hd,Bt=Ae(p,"ADD_URI_SAFE_ATTR")&&Xe(p.ADD_URI_SAFE_ATTR)?X(nt(Jn),p.ADD_URI_SAFE_ATTR,$e):Jn,ot=Ae(p,"ADD_DATA_URI_TAGS")&&Xe(p.ADD_DATA_URI_TAGS)?X(nt(at),p.ADD_DATA_URI_TAGS,$e):at,ke=Ae(p,"FORBID_CONTENTS")&&Xe(p.FORBID_CONTENTS)?X({},p.FORBID_CONTENTS,$e):De,j=Ae(p,"FORBID_TAGS")&&Xe(p.FORBID_TAGS)?X({},p.FORBID_TAGS,$e):nt({}),st=Ae(p,"FORBID_ATTR")&&Xe(p.FORBID_ATTR)?X({},p.FORBID_ATTR,$e):nt({}),ie=Ae(p,"USE_PROFILES")?p.USE_PROFILES&&typeof p.USE_PROFILES=="object"?nt(p.USE_PROFILES):p.USE_PROFILES:!1,Ft=p.ALLOW_ARIA_ATTR!==!1,f=p.ALLOW_DATA_ATTR!==!1,h=p.ALLOW_UNKNOWN_PROTOCOLS||!1,b=p.ALLOW_SELF_CLOSE_IN_ATTR!==!1,k=p.SAFE_FOR_TEMPLATES||!1,v=p.SAFE_FOR_XML!==!1,_=p.WHOLE_DOCUMENT||!1,A=p.RETURN_DOM||!1,S=p.RETURN_DOM_FRAGMENT||!1,z=p.RETURN_TRUSTED_TYPE||!1,C=p.FORCE_BODY||!1,I=p.SANITIZE_DOM!==!1,V=p.SANITIZE_NAMED_PROPS||!1,ne=p.KEEP_CONTENT!==!1,de=p.IN_PLACE||!1,ue=Ff(p.ALLOWED_URI_REGEXP)?p.ALLOWED_URI_REGEXP:mo,Ht=typeof p.NAMESPACE=="string"?p.NAMESPACE:ut,Vr=Ae(p,"MATHML_TEXT_INTEGRATION_POINTS")&&p.MATHML_TEXT_INTEGRATION_POINTS&&typeof p.MATHML_TEXT_INTEGRATION_POINTS=="object"?nt(p.MATHML_TEXT_INTEGRATION_POINTS):X({},["mi","mo","mn","ms","mtext"]),qr=Ae(p,"HTML_INTEGRATION_POINTS")&&p.HTML_INTEGRATION_POINTS&&typeof p.HTML_INTEGRATION_POINTS=="object"?nt(p.HTML_INTEGRATION_POINTS):X({},["annotation-xml"]);const T=Ae(p,"CUSTOM_ELEMENT_HANDLING")&&p.CUSTOM_ELEMENT_HANDLING&&typeof p.CUSTOM_ELEMENT_HANDLING=="object"?nt(p.CUSTOM_ELEMENT_HANDLING):Tn(null);if(ye=Tn(null),Ae(T,"tagNameCheck")&&So(T.tagNameCheck)&&(ye.tagNameCheck=T.tagNameCheck),Ae(T,"attributeNameCheck")&&So(T.attributeNameCheck)&&(ye.attributeNameCheck=T.attributeNameCheck),Ae(T,"allowCustomizedBuiltInElements")&&typeof T.allowCustomizedBuiltInElements=="boolean"&&(ye.allowCustomizedBuiltInElements=T.allowCustomizedBuiltInElements),k&&(f=!1),S&&(A=!0),ie&&(ge=X({},po),pe=Tn(null),ie.html===!0&&(X(ge,fo),X(pe,ho)),ie.svg===!0&&(X(ge,Fr),X(pe,zr),X(pe,Ns)),ie.svgFilters===!0&&(X(ge,Br),X(pe,zr),X(pe,Ns)),ie.mathMl===!0&&(X(ge,Hr),X(pe,go),X(pe,Ns))),Ie.tagCheck=null,Ie.attributeCheck=null,Ae(p,"ADD_TAGS")&&(typeof p.ADD_TAGS=="function"?Ie.tagCheck=p.ADD_TAGS:Xe(p.ADD_TAGS)&&(ge===Te&&(ge=nt(ge)),X(ge,p.ADD_TAGS,$e))),Ae(p,"ADD_ATTR")&&(typeof p.ADD_ATTR=="function"?Ie.attributeCheck=p.ADD_ATTR:Xe(p.ADD_ATTR)&&(pe===Qe&&(pe=nt(pe)),X(pe,p.ADD_ATTR,$e))),Ae(p,"ADD_URI_SAFE_ATTR")&&Xe(p.ADD_URI_SAFE_ATTR)&&X(Bt,p.ADD_URI_SAFE_ATTR,$e),Ae(p,"FORBID_CONTENTS")&&Xe(p.FORBID_CONTENTS)&&(ke===De&&(ke=nt(ke)),X(ke,p.FORBID_CONTENTS,$e)),Ae(p,"ADD_FORBID_CONTENTS")&&Xe(p.ADD_FORBID_CONTENTS)&&(ke===De&&(ke=nt(ke)),X(ke,p.ADD_FORBID_CONTENTS,$e)),ne&&(ge["#text"]=!0),_&&X(ge,["html","head","body"]),ge.table&&(X(ge,["tbody"]),delete j.tbody),p.TRUSTED_TYPES_POLICY){if(typeof p.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ds('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof p.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ds('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');U=p.TRUSTED_TYPES_POLICY,L=U.createHTML("")}else U===void 0&&(U=Xf(E,r)),U!==null&&typeof L=="string"&&(L=U.createHTML(""));Ze&&Ze(p),Cn=p},Eo=X({},[...Fr,...Br,...Bf]),Ao=X({},[...Hr,...Hf]),yd=function(p){let T=$(p);(!T||!T.tagName)&&(T={namespaceURI:Ht,tagName:"template"});const N=Xn(p.tagName),ce=Xn(T.tagName);return jr[p.namespaceURI]?p.namespaceURI===Je?T.namespaceURI===ut?N==="svg":T.namespaceURI===Ne?N==="svg"&&(ce==="annotation-xml"||Vr[ce]):!!Eo[N]:p.namespaceURI===Ne?T.namespaceURI===ut?N==="math":T.namespaceURI===Je?N==="math"&&qr[ce]:!!Ao[N]:p.namespaceURI===ut?T.namespaceURI===Je&&!qr[ce]||T.namespaceURI===Ne&&!Vr[ce]?!1:!Ao[N]&&(gd[N]||!Eo[N]):!!(es==="application/xhtml+xml"&&jr[p.namespaceURI]):!1},vt=function(p){Sn(t.removed,{element:p});try{$(p).removeChild(p)}catch{m(p)}},dn=function(p,T){try{Sn(t.removed,{attribute:T.getAttributeNode(p),from:T})}catch{Sn(t.removed,{attribute:null,from:T})}if(T.removeAttribute(p),p==="is")if(A||S)try{vt(T)}catch{}else try{T.setAttribute(p,"")}catch{}},Ro=function(p){let T=null,N=null;if(C)p=""+p;else{const Oe=oo(p,/^[\r\n\t ]+/);N=Oe&&Oe[0]}es==="application/xhtml+xml"&&Ht===ut&&(p=''+p+"");const ce=U?U.createHTML(p):p;if(Ht===ut)try{T=new y().parseFromString(ce,es)}catch{}if(!T||!T.documentElement){T=ee.createDocument(Ht,"template",null);try{T.documentElement.innerHTML=Ur?L:ce}catch{}}const Fe=T.body||T.documentElement;return p&&N&&Fe.insertBefore(n.createTextNode(N),Fe.childNodes[0]||null),Ht===ut?fe.call(T,_?"html":"body")[0]:_?T.documentElement:Fe},Co=function(p){return q.call(p.ownerDocument||p,p,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Gr=function(p){return p instanceof g&&(typeof p.nodeName!="string"||typeof p.textContent!="string"||typeof p.removeChild!="function"||!(p.attributes instanceof d)||typeof p.removeAttribute!="function"||typeof p.setAttribute!="function"||typeof p.namespaceURI!="string"||typeof p.insertBefore!="function"||typeof p.hasChildNodes!="function")},Kr=function(p){return typeof a=="function"&&p instanceof a};function zt(W,p,T){kn(W,N=>{N.call(t,p,T,Cn)})}const Po=function(p){let T=null;if(zt(Z.beforeSanitizeElements,p,null),Gr(p))return vt(p),!0;const N=$e(p.nodeName);if(zt(Z.uponSanitizeElement,p,{tagName:N,allowedTags:ge}),v&&p.hasChildNodes()&&!Kr(p.firstElementChild)&&Ue(/<[/\w!]/g,p.innerHTML)&&Ue(/<[/\w!]/g,p.textContent)||v&&p.namespaceURI===ut&&N==="style"&&Kr(p.firstElementChild)||p.nodeType===Rn.progressingInstruction||v&&p.nodeType===Rn.comment&&Ue(/<[/\w]/g,p.data))return vt(p),!0;if(j[N]||!(Ie.tagCheck instanceof Function&&Ie.tagCheck(N))&&!ge[N]){if(!j[N]&&Oo(N)&&(ye.tagNameCheck instanceof RegExp&&Ue(ye.tagNameCheck,N)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(N)))return!1;if(ne&&!ke[N]){const ce=$(p)||p.parentNode,Fe=Y(p)||p.childNodes;if(Fe&&ce){const Oe=Fe.length;for(let rt=Oe-1;rt>=0;--rt){const gt=M(Fe[rt],!0);ce.insertBefore(gt,H(p))}}}return vt(p),!0}return p instanceof o&&!yd(p)||(N==="noscript"||N==="noembed"||N==="noframes")&&Ue(/<\/no(script|embed|frames)/i,p.innerHTML)?(vt(p),!0):(k&&p.nodeType===Rn.text&&(T=p.textContent,kn([Se,je,te],ce=>{T=En(T,ce," ")}),p.textContent!==T&&(Sn(t.removed,{element:p.cloneNode()}),p.textContent=T)),zt(Z.afterSanitizeElements,p,null),!1)},Io=function(p,T,N){if(st[T]||I&&(T==="id"||T==="name")&&(N in n||N in xd))return!1;const ce=pe[T]||Ie.attributeCheck instanceof Function&&Ie.attributeCheck(T,p);if(!(f&&!st[T]&&Ue(R,T))){if(!(Ft&&Ue(he,T))){if(!ce||st[T]){if(!(Oo(p)&&(ye.tagNameCheck instanceof RegExp&&Ue(ye.tagNameCheck,p)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(p))&&(ye.attributeNameCheck instanceof RegExp&&Ue(ye.attributeNameCheck,T)||ye.attributeNameCheck instanceof Function&&ye.attributeNameCheck(T,p))||T==="is"&&ye.allowCustomizedBuiltInElements&&(ye.tagNameCheck instanceof RegExp&&Ue(ye.tagNameCheck,N)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(N))))return!1}else if(!Bt[T]){if(!Ue(ue,En(N,re,""))){if(!((T==="src"||T==="xlink:href"||T==="href")&&p!=="script"&&ao(N,"data:")===0&&ot[p])){if(!(h&&!Ue(Le,En(N,re,"")))){if(N)return!1}}}}}}return!0},wd=X({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Oo=function(p){return!wd[Xn(p)]&&Ue(F,p)},Mo=function(p){zt(Z.beforeSanitizeAttributes,p,null);const T=p.attributes;if(!T||Gr(p))return;const N={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:pe,forceKeepAttr:void 0};let ce=T.length;for(;ce--;){const Fe=T[ce],Oe=Fe.name,rt=Fe.namespaceURI,gt=Fe.value,_t=$e(Oe),Zr=gt;let Be=Oe==="value"?Zr:Of(Zr);if(N.attrName=_t,N.attrValue=Be,N.keepAttr=!0,N.forceKeepAttr=void 0,zt(Z.uponSanitizeAttribute,p,N),Be=N.attrValue,V&&(_t==="id"||_t==="name")&&ao(Be,K)!==0&&(dn(Oe,p),Be=K+Be),v&&Ue(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Be)){dn(Oe,p);continue}if(_t==="attributename"&&oo(Be,"href")){dn(Oe,p);continue}if(N.forceKeepAttr)continue;if(!N.keepAttr){dn(Oe,p);continue}if(!b&&Ue(/\/>/i,Be)){dn(Oe,p);continue}k&&kn([Se,je,te],$o=>{Be=En(Be,$o," ")});const Lo=$e(p.nodeName);if(!Io(Lo,_t,Be)){dn(Oe,p);continue}if(U&&typeof E=="object"&&typeof E.getAttributeType=="function"&&!rt)switch(E.getAttributeType(Lo,_t)){case"TrustedHTML":{Be=U.createHTML(Be);break}case"TrustedScriptURL":{Be=U.createScriptURL(Be);break}}if(Be!==Zr)try{rt?p.setAttributeNS(rt,Oe,Be):p.setAttribute(Oe,Be),Gr(p)?vt(p):lo(t.removed)}catch{dn(Oe,p)}}zt(Z.afterSanitizeAttributes,p,null)},Yr=function(p){let T=null;const N=Co(p);for(zt(Z.beforeSanitizeShadowDOM,p,null);T=N.nextNode();)zt(Z.uponSanitizeShadowNode,T,null),Po(T),Mo(T),T.content instanceof i&&Yr(T.content);zt(Z.afterSanitizeShadowDOM,p,null)},Bs=function(p){if(p.nodeType===Rn.element&&p.shadowRoot instanceof i){const ce=p.shadowRoot;Bs(ce),Yr(ce)}const T=p.childNodes;if(!T)return;const N=[];kn(T,ce=>{Sn(N,ce)});for(const ce of N)Bs(ce)};return t.sanitize=function(W){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},T=null,N=null,ce=null,Fe=null;if(Ur=!W,Ur&&(W=""),typeof W!="string"&&!Kr(W)&&(W=Nf(W),typeof W!="string"))throw Ds("dirty is not a string, aborting");if(!t.isSupported)return W;if(P||Wr(p),t.removed=[],typeof W=="string"&&(de=!1),de){const gt=W.nodeName;if(typeof gt=="string"){const _t=$e(gt);if(!ge[_t]||j[_t])throw Ds("root node is forbidden and cannot be sanitized in-place")}Bs(W)}else if(W instanceof a)T=Ro(""),N=T.ownerDocument.importNode(W,!0),N.nodeType===Rn.element&&N.nodeName==="BODY"||N.nodeName==="HTML"?T=N:T.appendChild(N),Bs(N);else{if(!A&&!k&&!_&&W.indexOf("<")===-1)return U&&z?U.createHTML(W):W;if(T=Ro(W),!T)return A?null:z?L:""}T&&C&&vt(T.firstChild);const Oe=Co(de?W:T);for(;ce=Oe.nextNode();)Po(ce),Mo(ce),ce.content instanceof i&&Yr(ce.content);if(de)return W;if(A){if(k){T.normalize();let gt=T.innerHTML;kn([Se,je,te],_t=>{gt=En(gt,_t," ")}),T.innerHTML=gt}if(S)for(Fe=se.call(T.ownerDocument);T.firstChild;)Fe.appendChild(T.firstChild);else Fe=T;return(pe.shadowroot||pe.shadowrootmode)&&(Fe=D.call(s,Fe,!0)),Fe}let rt=_?T.outerHTML:T.innerHTML;return _&&ge["!doctype"]&&T.ownerDocument&&T.ownerDocument.doctype&&T.ownerDocument.doctype.name&&Ue(Kf,T.ownerDocument.doctype.name)&&(rt=" -`+rt),k&&kn([Se,je,te],gt=>{rt=En(rt,gt," ")}),U&&z?U.createHTML(rt):rt},t.setConfig=function(){let W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Wr(W),P=!0},t.clearConfig=function(){Cn=null,P=!1},t.isValidAttribute=function(W,p,T){Cn||Wr({});const N=$e(W),ce=$e(p);return Io(N,ce,T)},t.addHook=function(W,p){typeof p=="function"&&Sn(Z[W],p)},t.removeHook=function(W,p){if(p!==void 0){const T=Pf(Z[W],p);return T===-1?void 0:If(Z[W],T,1)[0]}return lo(Z[W])},t.removeHooks=function(W){Z[W]=[]},t.removeAllHooks=function(){Z=bo()},t}var Qf=xo();const Jf={key:1,class:"flex min-w-0 max-w-[calc(100%-2.5rem)] flex-1 flex-col max-[600px]:max-w-[calc(100%-2.25rem)]"},ep={key:0,class:"flex w-fit flex-col items-start gap-1"},tp=["aria-label"],np={class:"inline-flex items-center gap-1.5"},sp={class:"text-[8px] font-semibold tracking-[0.12em] uppercase text-[#3a67c9]"},rp={key:1,class:"flex w-fit max-w-full flex-col items-start gap-2"},ip={class:"chat-card relative w-fit max-w-full whitespace-pre-line rounded-[10px_10px_10px_3px] px-4 py-3 text-xs leading-relaxed wrap-anywhere text-slate-900"},lp=["innerHTML"],op={key:0,class:"pointer-events-none absolute inset-x-0 bottom-0 h-14 rounded-b-[10px] bg-linear-to-t from-white via-white/92 to-white/0","aria-hidden":"true"},ap={key:0,class:"flex flex-wrap items-center gap-2"},up=["title","aria-label"],cp={key:1,class:"flex flex-wrap items-center"},fp=["title","aria-label"],pp={viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},dp=["innerHTML"],yo={__name:"ChatMessage",props:{message:{type:Object,required:!0},autoReadEnabled:{type:Boolean,default:!1},ttsConfig:{type:Object,default:()=>({enableVoiceChat:!1,pollyAvailable:!1,usePolly:!0,voiceId:"Zayd"})}},setup(e){const t=e,n=J(!1),s=J(null),r=J(!1),i=J(!1),l=Ee(()=>typeof window!="undefined"&&"speechSynthesis"in window&&"SpeechSynthesisUtterance"in window);function a(L){typeof window!="undefined"&&window.dispatchEvent(new CustomEvent("changai-tts-provider",{detail:{provider:L}}))}function o(L){if(typeof L!="string")return"";const O=L.replace(/[\u{1F000}-\u{1FFFF}]/gu,"").replace(/[\u{2600}-\u{26FF}]/gu,"").replace(/[\u{2700}-\u{27BF}]/gu,"").replace(/\*\*(.*?)\*\*/g,"$1").replace(/\*(.*?)\*/g,"$1").replace(/`([^`]+)`/g,"$1").replace(/#{1,6}\s+/g,"").replace(/[-*+]\s+/g,"").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/\s+/g," ");return O.includes("<")?(new DOMParser().parseFromString(L,"text/html").body.textContent||"").replace(/\s+/g," ").trim():O.trim()}function c(){l.value&&window.speechSynthesis.cancel(),s.value&&(s.value.pause(),s.value.src="",s.value=null),n.value=!1}function u(){var L,O,ee;if(i.value=!i.value,i.value)c();else{const q=M.value;if(!t.autoReadEnabled||!((L=t.ttsConfig)!=null&&L.enableVoiceChat)||!q||E())return;if((O=t.ttsConfig)!=null&&O.pollyAvailable&&((ee=t.ttsConfig)!=null&&ee.usePolly)){g(q).catch(se=>{d(q)});return}d(q)}}function d(L){if(!l.value||!L)return;window.dispatchEvent(new CustomEvent("changai-tts-stop")),window.speechSynthesis.cancel();const O=new SpeechSynthesisUtterance(L);O.rate=1,O.pitch=1,O.onend=()=>{n.value=!1},O.onerror=()=>{n.value=!1},n.value=!0,a("browser"),window.speechSynthesis.speak(O)}async function g(L){var fe;const O=await Mc(L,((fe=t.ttsConfig)==null?void 0:fe.voiceId)||"Zayd");if(!(O!=null&&O.ok)||!(O!=null&&O.audio_base64))throw new Error((O==null?void 0:O.error)||"Polly synthesis failed");window.dispatchEvent(new CustomEvent("changai-tts-stop")),c();const ee=(O==null?void 0:O.mime_type)||"audio/mpeg",q=new Audio(`data:${ee};base64,${O.audio_base64}`);s.value=q,n.value=!0;let se=!1;q.onplay=()=>{se=!0,a("polly")},q.onended=()=>{s.value===q&&(s.value=null),n.value=!1},q.onerror=()=>{s.value===q&&(s.value=null),n.value=!1},await q.play(),se||a("polly")}function y(){c()}function E(){var L;return!!((L=t.message)!=null&&L.isStatus)}function x(L){const O=L.target.closest("a");!O||!O.href||(L.preventDefault(),L.stopPropagation(),window.open(O.href,"_blank","noopener,noreferrer"))}const M=Ee(()=>{var L;return o(((L=t.message)==null?void 0:L.text)||"")}),m=Ee(()=>{var L;return((L=t.message)==null?void 0:L.role)!=="user"&&E()}),H=Ee(()=>{var L;return(L=t.message)!=null&&L.isStatus?t.message.statusType==="support"?"Sending to support":M.value||"Thinking":""}),Y=Ee(()=>{var ee;if(((ee=t.message)==null?void 0:ee.role)==="user"||m.value)return!1;const L=M.value,O=L.split(/\n+/).filter(Boolean).length;return L.length>520||O>8}),$=Ee(()=>{var L,O;return((L=t.message)==null?void 0:L.role)!=="user"&&!m.value&&((O=t.ttsConfig)==null?void 0:O.enableVoiceChat)}),U=Ee(()=>{var O;const L=((O=t.message)==null?void 0:O.text)||"";return Qf.sanitize(xe.parse(L))});return ln(()=>t.message.text,async(L,O)=>{var se,fe,D;if(!t.autoReadEnabled||t.message.role==="user"||i.value)return;if(!((se=t.ttsConfig)!=null&&se.enableVoiceChat)){a("off");return}const ee=o(L);if(!ee||E())return;const q=o(O||"");if(ee!==q){if((fe=t.ttsConfig)!=null&&fe.pollyAvailable&&((D=t.ttsConfig)!=null&&D.usePolly))try{await g(ee);return}catch{}d(ee)}}),ln(()=>t.message.text,()=>{r.value=!1,i.value=!1}),zn(()=>{typeof window!="undefined"&&window.addEventListener("changai-tts-stop",y)}),ys(()=>{typeof window!="undefined"&&window.removeEventListener("changai-tts-stop",y),n.value&&c()}),(L,O)=>(B(),G("div",{class:we(["motion-safe:animate-fade-rise flex w-full gap-1.5",e.message.role==="user"?"flex-col items-end":"items-start"])},[e.message.role!=="user"?(B(),Et(Nl,{key:0})):We("",!0),e.message.role!=="user"?(B(),G("div",Jf,[m.value?(B(),G("div",ep,[w("div",{class:"chat-card inline-flex w-fit rounded-[10px_10px_10px_3px] px-3 py-2",role:"status","aria-live":"polite","aria-label":H.value},[w("div",np,[O[1]||(O[1]=w("span",{class:"relative inline-flex h-4 w-4 shrink-0 items-center justify-center"},[w("span",{class:"absolute inset-0 rounded-full border border-transparent border-t-[#4b89ff] border-r-[#4b89ff]/70 animate-gemini-arc"}),w("svg",{viewBox:"0 0 24 24",class:"relative h-3 w-3 text-[#4b89ff] animate-gemini-spark","aria-hidden":"true"},[w("path",{fill:"currentColor",d:"M12 2.8c.52 3.22 1.6 5.66 3.22 7.28 1.62 1.62 4.06 2.7 7.28 3.22-3.22.52-5.66 1.6-7.28 3.22-1.62 1.62-2.7 4.06-3.22 7.28-.52-3.22-1.6-5.66-3.22-7.28-1.62-1.62-4.06-2.7-7.28-3.22 3.22-.52 5.66-1.6 7.28-3.22 1.62-1.62 2.7-4.06 3.22-7.28Z"})])],-1)),w("span",sp,et(H.value),1)])],8,tp)])):(B(),G("div",rp,[w("div",ip,[w("div",{class:we(["overflow-x-auto",Y.value&&!r.value?"max-h-48 overflow-y-hidden":""]),innerHTML:U.value,onClick:x},null,10,lp),Y.value&&!r.value?(B(),G("div",op)):We("",!0)]),Y.value?(B(),G("div",ap,[w("button",{type:"button",class:"inline-flex items-center rounded-full border border-slate-200 bg-white px-2.5 py-1 text-[10px] font-semibold uppercase tracking-[0.08em] text-slate-600 transition-colors duration-200 hover:border-brand-200 hover:text-brand-600",title:r.value?"Collapse response":"Expand response","aria-label":r.value?"Collapse response":"Expand response",onClick:O[0]||(O[0]=ee=>r.value=!r.value)},et(r.value?"Collapse":"Expand"),9,up)])):We("",!0),$.value?(B(),G("div",cp,[w("button",{type:"button",class:we(["inline-flex h-8 w-8 items-center justify-center rounded-full border transition-colors duration-200",i.value?"border-red-200 bg-red-50 text-red-600 hover:border-red-300 hover:bg-red-100":"border-green-200 bg-green-50 text-green-600 hover:border-green-300 hover:bg-green-100"]),title:i.value?"Unmute voice playback":"Mute voice playback","aria-label":i.value?"Unmute voice playback":"Mute voice playback",onClick:u},[(B(),G("svg",pp,[O[6]||(O[6]=w("path",{d:"M11 5L6 9H3v6h3l5 4V5Z"},null,-1)),i.value?(B(),G(ze,{key:0},[O[2]||(O[2]=w("path",{d:"M15 9l4 6"},null,-1)),O[3]||(O[3]=w("path",{d:"M19 9l-4 6"},null,-1))],64)):(B(),G(ze,{key:1},[O[4]||(O[4]=w("path",{d:"M15 10a3 3 0 0 1 0 4"},null,-1)),O[5]||(O[5]=w("path",{d:"M17.5 7.5a6 6 0 0 1 0 9"},null,-1))],64))]))],10,fp)])):We("",!0)]))])):(B(),G("div",{key:2,class:"w-fit max-w-[85%] whitespace-pre-line rounded-[13px_13px_3px_13px] bg-linear-to-br from-brand-500 to-brand-600 px-4 py-3 text-[11px] leading-relaxed wrap-anywhere text-white shadow-[0_14px_30px_-18px_rgba(109,79,194,0.85)] max-[600px]:max-w-[88%]",innerHTML:U.value},null,8,dp))],2))}},hp={class:"flex flex-col gap-4 sm:gap-5"},gp={class:"motion-safe:animate-fade-rise flex w-full items-start gap-1.5"},mp={__name:"ChatTab",props:{messages:{type:Array,required:!0},autoReadEnabled:{type:Boolean,default:!1},ttsConfig:{type:Object,required:!0}},setup(e){return(t,n)=>(B(),G("div",hp,[w("div",gp,[Me(Nl),n[0]||(n[0]=w("p",{class:"w-fit max-w-[calc(100%-2.5rem)] whitespace-pre-line rounded-[10px_10px_10px_3px] bg-brand-50 px-4 py-3 text-xs leading-relaxed wrap-anywhere text-slate-900 max-[600px]:max-w-[calc(100%-2.25rem)]"},[Ss(" Hello there ๐Ÿ‘‹ I am ChangAI from "),w("a",{target:"_blank",href:"https://erpgulf.com",rel:"noopener noreferrer",style:{color:"#1e90ff"}},"ERPGulf.com"),Ss(", your ERP assistant."),w("br"),w("a",{target:"_blank",href:"https://app.erpgulf.com/en/articles/chang-ai-quick-start-guide",rel:"noopener noreferrer",style:{color:"#1e90ff"}},"ChangAI Quick Start Guide - Click here.")],-1))]),(B(!0),G(ze,null,ws(e.messages,(s,r)=>(B(),Et(yo,{key:r,message:s,autoReadEnabled:e.autoReadEnabled,ttsConfig:e.ttsConfig},null,8,["message","autoReadEnabled","ttsConfig"]))),128))]))}};function wo(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function vo(e){var t,n;return(e==null?void 0:e.message)||((t=e==null?void 0:e.responseJSON)==null?void 0:t.exception)||((n=e==null?void 0:e.responseJSON)==null?void 0:n.message)||(e==null?void 0:e.responseText)||String(e)}function bp(e){return typeof e=="string"?e:e&&typeof e=="object"?e.error?`โš ๏ธ ${e.error}`:e.answer||e.text||"":""}const xp={key:0,class:"rounded-lg bg-brand-50 px-4 py-3 text-xs text-black"},yp={class:"whitespace-pre-wrap wrap-anywhere text-[11px] leading-relaxed text-black"},wp={key:1,class:"mb-3 min-w-0 overflow-x-auto rounded-lg bg-brand-50 p-2 text-[11px]"},vp={class:"whitespace-pre-wrap wrap-anywhere text-[11px] leading-relaxed text-black"},_p={__name:"DebugTab",props:{logs:{type:Array,required:!0},currentDebug:{type:Object,default:null}},setup(e){const t=new Set(["gemini_json_content","private_key","private_key_id","client_secret","client_id","aws_access_key","aws_secret_key","api_key","token","access_token","refresh_token","password","secret","authorization","embed_version_id","llm_version_id","entity_retriever","retriever","deploy_url","support_api_url","get_ticket_details_url"]);function n(r,i=0){if(i>10||r===null||r===void 0||typeof r=="string"||typeof r=="number"||typeof r=="boolean")return r;if(Array.isArray(r))return r.map(l=>n(l,i+1));if(typeof r=="object"){const l={};for(const[a,o]of Object.entries(r))t.has(a.toLowerCase())||(l[a]=n(o,i+1));return l}return r}function s(r){return wo(n(r))}return(r,i)=>(B(),G("div",null,[e.logs.length===0?(B(),G("p",xp,"No debug data yet.")):We("",!0),(B(!0),G(ze,null,ws(e.logs,(l,a)=>(B(),G("div",{key:a,class:"mb-3 min-w-0 overflow-x-auto rounded-lg bg-gray-100 p-2 text-[11px]"},[w("pre",yp,et(s(l)),1)]))),128)),e.currentDebug?(B(),G("div",wp,[w("pre",vp,et(s(e.currentDebug)),1)])):We("",!0)]))}},Tp={class:"flex flex-col gap-4 sm:gap-5"},kp={key:0,class:"chat-card motion-safe:animate-fade-rise rounded-lg px-4 py-3 text-xs text-slate-900"},Sp={__name:"SupportTab",props:{messages:{type:Array,required:!0},autoReadEnabled:{type:Boolean,default:!1},ttsConfig:{type:Object,required:!0}},setup(e){return(t,n)=>(B(),G("div",Tp,[e.messages.length===0?(B(),G("p",kp,"Send a message to Support.")):We("",!0),(B(!0),G(ze,null,ws(e.messages,(s,r)=>(B(),Et(yo,{key:r,message:s,autoReadEnabled:e.autoReadEnabled,ttsConfig:e.ttsConfig},null,8,["message","autoReadEnabled","ttsConfig"]))),128))]))}},Ep={class:"flex flex-col gap-4"},Ap={class:"chat-card motion-safe:animate-fade-rise rounded-xl p-4"},Rp={class:"flex items-start justify-between gap-4"},Cp=["aria-pressed","title"],Pp={class:"chat-card motion-safe:animate-fade-rise rounded-xl p-4"},Ip={class:"flex items-start justify-between gap-4"},Op={class:"mt-2 text-[11px] text-slate-500"},Mp={key:0,class:"mt-1 text-[11px] text-slate-500"},Lp={key:1,class:"mt-1 text-[11px] text-slate-500"},$p=["aria-pressed","disabled"],Dp={key:0,class:"mt-3 rounded-md bg-amber-50 px-2.5 py-2 text-xs text-amber-700"},Np={key:1,class:"mt-3 rounded-md bg-amber-50 px-2.5 py-2 text-xs text-amber-700"},Fp={class:"chat-card motion-safe:animate-fade-rise rounded-xl p-4"},Bp={class:"flex items-start justify-between gap-4"},Hp=["aria-pressed","title"],zp={class:"chat-card motion-safe:animate-fade-rise rounded-xl p-4"},Up={class:"flex items-start justify-between gap-4"},jp=["aria-pressed","title"],Vp={__name:"SettingsTab",props:{autoReadEnabled:{type:Boolean,required:!0},ttsConfig:{type:Object,required:!0},settings:{type:Object,default:null},debugEnabled:{type:Boolean,default:!1},sendNonERPtoaiEnabled:{type:Boolean,default:!1}},emits:["toggleAutoRead","togglePollyPreference","toggleDebug","toggleSendNonERP"],setup(e){const t=e,n=Ee(()=>{var s,r;return(s=t.ttsConfig)!=null&&s.enableVoiceChat?(r=t.ttsConfig)!=null&&r.pollyAvailable?"Available":"Unavailable":"Voice disabled on server"});return(s,r)=>{var i,l,a,o,c,u,d,g,y,E,x,M,m,H,Y;return B(),G("div",Ep,[r[10]||(r[10]=w("div",{class:"chat-card motion-safe:animate-fade-rise rounded-xl p-4 text-slate-900"},[w("h3",{class:"text-sm font-semibold tracking-[0.01em]"},"Speech Settings"),w("p",{class:"mt-1 text-xs leading-relaxed text-slate-600"},"These controls apply only inside this chatbot box for the current browser session.")],-1)),w("div",Ap,[w("div",Rp,[r[4]||(r[4]=w("div",null,[w("p",{class:"text-sm font-semibold text-slate-900"},"Auto Read Replies"),w("p",{class:"mt-1 text-xs text-slate-600"},"Automatically read bot replies aloud.")],-1)),w("button",{class:we(["group relative h-7 w-12 shrink-0 rounded-full border border-slate-200 transition-all duration-200",e.autoReadEnabled?"bg-emerald-500/95":"bg-slate-300"]),"aria-pressed":e.autoReadEnabled?"true":"false",title:e.autoReadEnabled?"Disable auto read":"Enable auto read",onClick:r[0]||(r[0]=$=>s.$emit("toggleAutoRead"))},[w("span",{class:we(["absolute top-0.5 h-5.5 w-5.5 rounded-full bg-white shadow-sm transition-all duration-200",e.autoReadEnabled?"left-[1.45rem]":"left-0.5"])},null,2)],10,Cp)]),w("p",{class:we(["mt-3 text-[11px] font-medium",e.autoReadEnabled?"text-emerald-700":"text-slate-500"])},et(e.autoReadEnabled?"Auto read is active.":"Auto read is currently off."),3)]),w("div",Pp,[w("div",Ip,[w("div",null,[r[5]||(r[5]=w("p",{class:"text-sm font-semibold text-slate-900"},"Use Amazon Polly",-1)),r[6]||(r[6]=w("p",{class:"mt-1 text-xs text-slate-600"},"Use Polly when available; otherwise browser speech is used automatically.",-1)),w("p",Op,"Availability: "+et(n.value),1),(i=e.settings)!=null&&i.aws_region?(B(),G("p",Mp,"Region: "+et(e.settings.aws_region),1)):We("",!0),(l=e.ttsConfig)!=null&&l.voiceId?(B(),G("p",Lp,"Voice: "+et(e.ttsConfig.voiceId),1)):We("",!0)]),w("button",{class:we(["relative h-7 w-12 shrink-0 rounded-full border border-slate-200 transition-all duration-200 disabled:cursor-not-allowed disabled:opacity-55",(a=e.ttsConfig)!=null&&a.usePolly&&((o=e.ttsConfig)!=null&&o.enableVoiceChat)&&((c=e.ttsConfig)!=null&&c.pollyAvailable)?"bg-emerald-500/95":"bg-slate-300"]),"aria-pressed":(u=e.ttsConfig)!=null&&u.usePolly&&((d=e.ttsConfig)!=null&&d.enableVoiceChat)&&((g=e.ttsConfig)!=null&&g.pollyAvailable)?"true":"false",disabled:!((y=e.ttsConfig)!=null&&y.pollyAvailable)||!((E=e.ttsConfig)!=null&&E.enableVoiceChat),onClick:r[1]||(r[1]=$=>s.$emit("togglePollyPreference"))},[w("span",{class:we(["absolute top-0.5 h-5.5 w-5.5 rounded-full bg-white shadow-sm transition-all duration-200",(x=e.ttsConfig)!=null&&x.usePolly&&((M=e.ttsConfig)!=null&&M.enableVoiceChat)&&((m=e.ttsConfig)!=null&&m.pollyAvailable)?"left-[1.45rem]":"left-0.5"])},null,2)],10,$p)]),(H=e.ttsConfig)!=null&&H.enableVoiceChat?(Y=e.ttsConfig)!=null&&Y.pollyAvailable?We("",!0):(B(),G("p",Np,"Polly is not available for this site. Browser speech will be used.")):(B(),G("p",Dp,"Voice chat is disabled in ChangAI Settings."))]),w("div",Fp,[w("div",Bp,[w("div",null,[r[7]||(r[7]=w("p",{class:"text-sm font-semibold text-slate-900"},"Enable Debug Tab",-1)),r[8]||(r[8]=w("p",{class:"mt-1 text-xs text-slate-600"}," Show or hide the Debug tab inside this chatbot. ",-1)),w("p",{class:we(["mt-2 text-[11px] font-medium",e.debugEnabled?"text-emerald-700":"text-slate-500"])},et(e.debugEnabled?"Debug tab is active.":"Debug tab is currently off."),3)]),w("button",{type:"button",class:we(["relative h-7 w-12 shrink-0 rounded-full border border-slate-200 transition-all duration-200",e.debugEnabled?"bg-emerald-500/95":"bg-slate-300"]),"aria-pressed":e.debugEnabled?"true":"false",title:e.debugEnabled?"Disable debug tab":"Enable debug tab",onClick:r[2]||(r[2]=$=>s.$emit("toggleDebug"))},[w("span",{class:we(["absolute top-0.5 h-5.5 w-5.5 rounded-full bg-white shadow-sm transition-all duration-200",e.debugEnabled?"left-[1.45rem]":"left-0.5"])},null,2)],10,Hp)])]),w("div",zp,[w("div",Up,[r[9]||(r[9]=w("div",null,[w("p",{class:"text-sm font-semibold text-slate-900"},"Send non-ERP questions directly to AI"),w("p",{class:"mt-1 text-xs text-slate-600"},"Questions unrelated to your ERP will skip the system and go straight to AI")],-1)),w("button",{class:we(["group relative h-7 w-12 shrink-0 rounded-full border border-slate-200 transition-all duration-200",e.sendNonERPtoaiEnabled?"bg-emerald-500/95":"bg-slate-300"]),"aria-pressed":e.sendNonERPtoaiEnabled?"true":"false",title:e.sendNonERPtoaiEnabled?"Non-ERP questions are being sent directly to AI":"Enable direct AI reply for non-ERP questions",onClick:r[3]||(r[3]=$=>s.$emit("toggleSendNonERP"))},[w("span",{class:we(["absolute top-0.5 h-5.5 w-5.5 rounded-full bg-white shadow-sm transition-all duration-200",e.sendNonERPtoaiEnabled?"left-[1.45rem]":"left-0.5"])},null,2)],10,jp)]),w("p",{class:we(["mt-3 text-[11px] font-medium",e.sendNonERPtoaiEnabled?"text-emerald-700":"text-slate-500"])},et(e.sendNonERPtoaiEnabled?"Non-ERP questions are now routed directly to AI":"Direct AI routing is currently off"),3)])])}}},qp={key:0,class:"pointer-events-none absolute -top-14 left-0 right-0 z-20 flex justify-center px-2",role:"status","aria-live":"polite"},Wp={__name:"StatusToast",props:{visible:{type:Boolean,required:!0},message:{type:String,default:""},type:{type:String,default:"info"},dismissible:{type:Boolean,default:!0}},emits:["close"],setup(e){const t=e,n=Ee(()=>t.type==="error"?"bg-red-50 text-red-700 ring-red-200":(t.type==="listening","bg-blue-50 text-blue-700 ring-blue-200")),s=Ee(()=>t.type==="error"?"bg-red-500":t.type==="listening"?"bg-blue-500 animate-pulse":"bg-blue-500");return(r,i)=>(B(),Et(Pu,{"enter-active-class":"transition duration-200 ease-out","enter-from-class":"translate-y-1 opacity-0","enter-to-class":"translate-y-0 opacity-100","leave-active-class":"transition duration-150 ease-in","leave-from-class":"translate-y-0 opacity-100","leave-to-class":"translate-y-1 opacity-0"},{default:Di(()=>[e.visible?(B(),G("div",qp,[w("div",{class:we(["pointer-events-auto flex max-w-[92%] items-start gap-2 rounded-lg px-3 py-2 text-xs shadow-lg ring-1",n.value])},[w("span",{class:we(["mt-0.5 h-2 w-2 shrink-0 rounded-full",s.value])},null,2),w("span",null,et(e.message),1),e.dismissible?(B(),G("button",{key:0,type:"button",class:"ml-1 appearance-none border-0 text-current/80 transition hover:text-current focus:outline-none","aria-label":"Dismiss notification",onClick:i[0]||(i[0]=l=>r.$emit("close"))}," ร— ")):We("",!0)],2)])):We("",!0)]),_:1}))}},Gp={class:"relative w-full"},Kp=["placeholder","disabled"],Yp=["title","aria-label","disabled"],Zp={key:0,viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor","aria-hidden":"true"},Xp={key:1,viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},Qp={key:2,viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true",class:"animate-spin"},Jp=["title","aria-label","disabled"],ed={key:0,viewBox:"0 0 24 24",width:"18",height:"18",fill:"none","aria-hidden":"true",class:"text-rose-600 motion-safe:animate-stop-button-pulse"},td={key:1,viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor","aria-hidden":"true"},nd={__name:"ChatForm",props:{placeholder:{type:String,default:"Message..."},disabled:{type:Boolean,default:!1},isAwaitingResponse:{type:Boolean,default:!1}},emits:["submit","cancel"],setup(e,{expose:t,emit:n}){const s=e,r=n,i=J(""),l=J(null),a=J(!1),o=J(!1),c=J(!1),u=J(!1),d=J(!1),g=J(!1),y=J(!1),E=J(""),x=J("info"),M=J("Voice input is unavailable in this browser/context.");let m=null,H=null,Y=null;const $=J(""),U=J(!1),L=Ee(()=>c.value?"Requesting microphone permission...":u.value?"Starting voice input...":d.value?"Stopping voice input...":o.value?a.value?"Stop voice input":"Start voice input":"Voice input is unavailable in this browser/context"),O=Ee(()=>s.isAwaitingResponse?"Stop response":"Send"),ee=Ee(()=>s.isAwaitingResponse?!1:s.disabled||!i.value.trim()),q=Ee(()=>s.isAwaitingResponse?"bg-white border border-rose-100 shadow-[0_8px_20px_-12px_rgba(159,18,57,0.35)] hover:bg-rose-50":"bg-linear-to-br from-brand-500 to-brand-600 text-white shadow-[0_10px_24px_-16px_rgba(109,79,194,0.85)] hover:from-brand-600 hover:to-violet-700");function se(){return typeof window=="undefined"?null:window.SpeechRecognition||window.webkitSpeechRecognition||null}function fe(){var ge;const re=se(),F=typeof window!="undefined"?window.isSecureContext:!1,ue=typeof navigator!="undefined"&&!!((ge=navigator.mediaDevices)!=null&&ge.getUserMedia);o.value=!!(re&&F&&ue),F?(!ue||!re)&&(M.value="Voice input is not supported in this browser."):M.value="Voice input requires HTTPS (or localhost).",re&&o.value&&(m=new re,m.continuous=!0,m.interimResults=!0,m.lang=typeof navigator!="undefined"&&navigator.language||"en-US",m.onstart=()=>{a.value=!0,u.value=!1,d.value=!1,D(),R("Listening... Tap mic to stop","listening",{persistent:!0,key:"listening"})},m.onend=()=>{a.value=!1,u.value=!1,d.value=!1,D(),$.value==="listening"&&he(),U.value&&(U.value=!1,Le())},m.onerror=Te=>{if(a.value=!1,u.value=!1,d.value=!1,D(),U.value=!1,(Te==null?void 0:Te.error)==="not-allowed"||(Te==null?void 0:Te.error)==="service-not-allowed"){R("Microphone permission denied. Please allow microphone access in browser settings.","error");return}if((Te==null?void 0:Te.error)==="audio-capture"){R("No microphone detected. Please connect a microphone and try again.","error");return}if((Te==null?void 0:Te.error)==="no-speech"){R("No speech detected. Try speaking a bit louder.","info");return}R("Voice input failed. Please try again.","error")},m.onresult=Te=>{let pe="";for(let Qe=Te.resultIndex;Qe{if(m&&!(!a.value&&!d.value))try{m.abort()}catch{d.value=!1,U.value=!1}},1200)}}function Se(){if(!o.value||!m){R(M.value,"error");return}if(a.value||u.value||d.value){Z({submitAfterStop:a.value});return}te()}async function je(){var re;if(g.value)return!0;if(!((re=navigator.mediaDevices)!=null&&re.getUserMedia))return R("Microphone API is unavailable in this browser.","error"),!1;c.value=!0,R("Requesting microphone permission...","info",{persistent:!0,key:"requesting"});try{return(await navigator.mediaDevices.getUserMedia({audio:!0})).getTracks().forEach(ue=>ue.stop()),g.value=!0,!0}catch(F){return(F==null?void 0:F.name)==="NotAllowedError"||(F==null?void 0:F.name)==="SecurityError"?R("Microphone permission denied. Please allow it and try again.","error"):(F==null?void 0:F.name)==="NotFoundError"?R("No microphone found on this device.","error"):R("Unable to access microphone. Please check browser permissions.","error"),!1}finally{c.value=!1,$.value==="requesting"&&he()}}async function te(){var F;if(!(!m||a.value||u.value||d.value||!await je()||!m)){U.value=!1,(F=l.value)==null||F.focus(),u.value=!0;try{m.start()}catch(ue){u.value=!1,d.value=!1,(ue==null?void 0:ue.name)!=="InvalidStateError"&&R("Unable to start voice input. Please try again.","error")}}}function R(re,F="info",ue={}){const{duration:ge=4200,persistent:Te=!1,key:pe=""}=ue;E.value=re,x.value=F,$.value=pe,y.value=!0,H&&clearTimeout(H),Te||(H=setTimeout(()=>{y.value=!1,$.value=""},ge))}function he(){y.value=!1,$.value="",H&&(clearTimeout(H),H=null)}function Le(){if(s.isAwaitingResponse){r("cancel");return}const re=i.value.trim();re&&((a.value||u.value||d.value)&&m&&Z({submitAfterStop:!1}),r("submit",re),i.value="")}return t({focus:()=>{var re;return(re=l.value)==null?void 0:re.focus()}}),zn(()=>{fe()}),ys(()=>{if(m&&(a.value||u.value||d.value)){U.value=!1,D();try{m.abort()}catch{}}D(),he()}),(re,F)=>(B(),G("div",Gp,[w("form",{class:"group flex min-h-11 items-center gap-2 rounded-full border border-slate-200/90 bg-white/95 px-3 shadow-[0_12px_26px_-20px_rgba(15,23,42,0.7)] transition-all duration-250 focus-within:-translate-y-0.5 focus-within:border-brand-200 focus-within:shadow-[0_18px_30px_-20px_rgba(13,110,253,0.5)] focus-within:ring-2 focus-within:ring-brand-500/25",style:{"border-radius":"9999px"},autocomplete:"off",onSubmit:dt(Le,["prevent"]),onClick:F[5]||(F[5]=dt(()=>{},["stop"])),onMousedown:F[6]||(F[6]=dt(()=>{},["stop"])),onKeydown:F[7]||(F[7]=dt(()=>{},["stop"])),onKeyup:F[8]||(F[8]=dt(()=>{},["stop"]))},[Pa(w("input",{ref_key:"inputRef",ref:l,type:"text","onUpdate:modelValue":F[0]||(F[0]=ue=>i.value=ue),class:"h-11 w-full border-none bg-transparent text-sm font-medium text-slate-800 placeholder:text-slate-400 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",placeholder:e.disabled?"Waiting for response...":e.placeholder,disabled:e.disabled,required:"",onKeydown:F[1]||(F[1]=dt(()=>{},["stop"])),onKeyup:F[2]||(F[2]=dt(()=>{},["stop"])),onKeypress:F[3]||(F[3]=dt(()=>{},["stop"])),onInput:F[4]||(F[4]=dt(()=>{},["stop"]))},null,40,Kp),[[Xu,i.value]]),w("button",{type:"button",class:we(["grid h-8 w-8 shrink-0 appearance-none place-items-center rounded-full border border-transparent text-slate-600 transition-all duration-200 hover:-translate-y-0.5 hover:border-slate-200 hover:bg-slate-100 hover:text-slate-900 focus:outline-none disabled:cursor-not-allowed disabled:opacity-40",a.value?"border-red-200 bg-red-100 text-red-600 shadow-[0_10px_20px_-18px_rgba(220,38,38,0.9)] hover:bg-red-100 hover:text-red-600":""]),style:{"border-radius":"9999px"},title:L.value,"aria-label":L.value,disabled:e.disabled||!o.value||c.value||u.value||d.value,onClick:Se},[a.value&&!c.value?(B(),G("svg",Zp,F[9]||(F[9]=[w("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"},null,-1)]))):c.value?(B(),G("svg",Qp,F[11]||(F[11]=[w("circle",{cx:"12",cy:"12",r:"9",opacity:"0.3"},null,-1),w("path",{d:"M21 12a9 9 0 0 1-9 9"},null,-1)]))):(B(),G("svg",Xp,F[10]||(F[10]=[w("path",{d:"M12 3a3 3 0 0 0-3 3v6a3 3 0 0 0 6 0V6a3 3 0 0 0-3-3z"},null,-1),w("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"},null,-1),w("path",{d:"M12 19v3"},null,-1)])))],10,Yp),w("button",{type:"submit",title:O.value,"aria-label":O.value,class:we(["grid h-8 w-8 shrink-0 appearance-none place-items-center rounded-full border-0 transition-all duration-200 hover:-translate-y-0.5 focus:outline-none disabled:cursor-not-allowed disabled:opacity-40",q.value]),style:{"border-radius":"9999px"},disabled:ee.value},[e.isAwaitingResponse?(B(),G("svg",ed,F[12]||(F[12]=[w("circle",{cx:"12",cy:"12",r:"8",stroke:"currentColor","stroke-width":"2.1",class:"opacity-95"},null,-1),w("rect",{x:"9",y:"9",width:"6",height:"6",rx:"1.35",fill:"currentColor"},null,-1)]))):(B(),G("svg",td,F[13]||(F[13]=[w("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.59 5.58L20 12l-8-8-8 8z"},null,-1)])))],10,Jp)],32),Me(Wp,{visible:y.value,message:E.value,type:x.value,dismissible:x.value!=="listening",onClose:he},null,8,["visible","message","type","dismissible"])]))}},sd={class:"relative overflow-hidden bg-linear-to-br from-brand-600 via-brand-500 to-violet-400"},rd={class:"min-w-0"},id={key:1,class:"border-t border-slate-200/80 bg-white/90 px-3 py-3 pb-[calc(12px+env(safe-area-inset-bottom))] backdrop-blur-sm sm:px-4 sm:py-4"},ld=56,od={__name:"ChatbotPopup",props:{isOpen:{type:Boolean,required:!0},activeTab:{type:String,required:!0},debugEnabled:{type:Boolean,default:!1},sendNonERPtoaiEnabled:{type:Boolean,default:!1},chatHistory:{type:Array,required:!0},debugLogs:{type:Array,required:!0},currentDebug:{type:Object,default:null},supportHistory:{type:Array,required:!0},autoReadEnabled:{type:Boolean,required:!0},ttsConfig:{type:Object,required:!0},activeTtsProvider:{type:String,required:!0},settings:{type:Object,default:null},isAwaitingChatResponse:{type:Boolean,default:!1},isAwaitingSupportResponse:{type:Boolean,default:!1}},emits:["close","submit","cancelResponse","update:activeTab","toggleAutoRead","togglePollyPreference","toggleDebug","toggleSendNonERP"],setup(e,{expose:t,emit:n}){const s=e,r=n,i=J(null),l=J(null),a=J(s.activeTab),o=J("default"),c=J(!1),u=Ee(()=>a.value==="support"?s.isAwaitingSupportResponse:a.value==="chat"?s.isAwaitingChatResponse:!1);function d(){const M=i.value;if(!s.isOpen||!M){c.value=!1;return}const m=M.scrollHeight-M.clientHeight;if(m<=4){c.value=!1;return}const H=m-M.scrollTop;c.value=H>ld}function g(){const M=i.value;M&&(M.scrollTo({top:M.scrollHeight,behavior:"smooth"}),setTimeout(()=>{d()},220))}function y(){St(()=>{d()})}function E(){if(o.value==="default"){o.value="half";return}if(o.value==="half"){o.value="full";return}o.value="default"}const x=Ee(()=>{const M="chat-shell fixed z-[9999] flex min-h-0 flex-col overflow-hidden border border-slate-200/80 shadow-[0_32px_80px_-44px_rgba(2,6,23,0.7),0_18px_40px_-24px_rgba(15,23,42,0.45)] transition-all duration-300 ease-out origin-bottom-right",m=s.isOpen?"pointer-events-auto opacity-100 translate-x-0 translate-y-0 scale-100 motion-safe:animate-surface-in":"pointer-events-none opacity-0 translate-x-1/5 translate-y-8 scale-95";return o.value==="full"?[M,m,"inset-0 h-screen w-screen max-h-screen max-w-screen rounded-none origin-center"]:o.value==="half"?[M,m,"bottom-[74px] right-5 h-[min(86vh,860px)] w-[min(50vw,860px)] rounded-2xl","max-[900px]:bottom-[78px] max-[900px]:right-3 max-[900px]:h-[min(86vh,760px)] max-[900px]:w-[min(70vw,760px)] max-[900px]:rounded-[14px]","max-[600px]:inset-0 max-[600px]:h-screen max-[600px]:w-screen max-[600px]:max-h-screen max-[600px]:max-w-screen max-[600px]:rounded-none max-[600px]:pb-[env(safe-area-inset-bottom)]"]:[M,m,"bottom-[74px] right-5 h-[min(560px,72vh)] w-[min(360px,calc(100vw-40px))] rounded-2xl","max-[900px]:bottom-[78px] max-[900px]:right-3 max-[900px]:h-[min(70vh,540px)] max-[900px]:w-[min(360px,calc(100vw-24px))] max-[900px]:rounded-[14px]","max-[600px]:inset-0 max-[600px]:h-screen max-[600px]:w-screen max-[600px]:max-h-screen max-[600px]:max-w-screen max-[600px]:rounded-none max-[600px]:pb-[env(safe-area-inset-bottom)]"]});return ln(()=>s.activeTab,M=>{a.value=M,y()}),ln(()=>s.isOpen,M=>{M&&a.value!=="settings"&&St(()=>{var m;return(m=l.value)==null?void 0:m.focus()}),y()}),ln(a,M=>{r("update:activeTab",M),y()}),ln(()=>[s.chatHistory.length,s.supportHistory.length,s.debugLogs.length,s.currentDebug],()=>{y()}),ln(()=>s.debugEnabled,M=>{!M&&a.value==="debug"&&(a.value="chat"),y()}),zn(()=>{y()}),t({scrollToBottom(){St(()=>{g()})}}),(M,m)=>(B(),G("div",{class:we(x.value),onKeydown:m[9]||(m[9]=dt(()=>{},["stop"])),onKeyup:m[10]||(m[10]=dt(()=>{},["stop"])),onKeypress:m[11]||(m[11]=dt(()=>{},["stop"]))},[m[14]||(m[14]=w("div",{class:"pointer-events-none absolute -right-14 -top-14 h-36 w-36 rounded-full bg-brand-500/15 blur-2xl"},null,-1)),m[15]||(m[15]=w("div",{class:"pointer-events-none absolute -bottom-14 -left-12 h-32 w-32 rounded-full bg-violet-400/15 blur-2xl"},null,-1)),w("div",sd,[m[12]||(m[12]=w("div",{class:"pointer-events-none absolute inset-0 opacity-45",style:{background:"linear-gradient(120deg, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0.02) 52%, rgba(255,255,255,0.12) 100%)"}},null,-1)),Me(vc,{windowMode:o.value,autoReadEnabled:e.autoReadEnabled,activeTtsProvider:e.activeTtsProvider,onClose:m[0]||(m[0]=H=>M.$emit("close")),onCycleResize:E,onToggleAutoRead:m[1]||(m[1]=H=>M.$emit("toggleAutoRead"))},null,8,["windowMode","autoReadEnabled","activeTtsProvider"]),Me(Sc,{modelValue:a.value,"onUpdate:modelValue":m[2]||(m[2]=H=>a.value=H),debugEnabled:e.debugEnabled},null,8,["modelValue","debugEnabled"])]),w("div",{class:"chat-scrollbar min-h-0 flex-1 overflow-x-hidden overflow-y-scroll bg-slate-50/60 px-4 py-4 max-[900px]:px-3.5 max-[900px]:py-3.5 max-[600px]:px-3 max-[600px]:py-3",ref_key:"chatBodyRef",ref:i,onScrollPassive:d},[w("div",rd,[a.value==="chat"?(B(),Et(mp,{key:0,messages:e.chatHistory,autoReadEnabled:e.autoReadEnabled,ttsConfig:e.ttsConfig},null,8,["messages","autoReadEnabled","ttsConfig"])):a.value==="debug"&&e.debugEnabled?(B(),Et(_p,{key:1,logs:e.debugLogs,currentDebug:e.currentDebug},null,8,["logs","currentDebug"])):a.value==="support"?(B(),Et(Sp,{key:2,messages:e.supportHistory,autoReadEnabled:e.autoReadEnabled,ttsConfig:e.ttsConfig},null,8,["messages","autoReadEnabled","ttsConfig"])):a.value==="settings"?(B(),Et(Vp,{key:3,autoReadEnabled:e.autoReadEnabled,ttsConfig:e.ttsConfig,settings:e.settings,debugEnabled:e.debugEnabled,sendNonERPtoaiEnabled:e.sendNonERPtoaiEnabled,onToggleAutoRead:m[3]||(m[3]=H=>M.$emit("toggleAutoRead")),onTogglePollyPreference:m[4]||(m[4]=H=>M.$emit("togglePollyPreference")),onToggleDebug:m[5]||(m[5]=H=>M.$emit("toggleDebug")),onToggleSendNonERP:m[6]||(m[6]=H=>M.$emit("toggleSendNonERP"))},null,8,["autoReadEnabled","ttsConfig","settings","debugEnabled","sendNonERPtoaiEnabled"])):We("",!0)])],544),c.value?(B(),G("button",{key:0,type:"button",class:we(["absolute right-4 z-20 grid h-9 w-9 place-items-center rounded-full border border-brand-200/70 bg-white/95 text-brand-600 shadow-[0_14px_26px_-16px_rgba(15,23,42,0.65)] transition-all duration-200 hover:-translate-y-0.5 hover:border-brand-300 hover:text-brand-700 focus:outline-none",a.value!=="settings"?"bottom-[calc(90px+env(safe-area-inset-bottom))] sm:bottom-[96px]":"bottom-4 sm:bottom-5"]),title:"Scroll to bottom","aria-label":"Scroll to bottom",onClick:g},m[13]||(m[13]=[w("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},[w("path",{d:"M7 10l5 5 5-5"})],-1)]),2)):We("",!0),a.value!=="settings"?(B(),G("div",id,[Me(nd,{ref_key:"chatFormRef",ref:l,placeholder:a.value==="support"?"Message Support...":"Message...",disabled:u.value,isAwaitingResponse:u.value,onSubmit:m[7]||(m[7]=H=>M.$emit("submit",H)),onCancel:m[8]||(m[8]=H=>M.$emit("cancelResponse"))},null,8,["placeholder","disabled","isAwaitingResponse"])])):We("",!0)],34))}},_o="changai_chat_id",To="changai_polly_enabled";function ad(){let e=sessionStorage.getItem(_o);return e||(e=`session_${Date.now()}_${crypto.randomUUID()}`,sessionStorage.setItem(_o,e)),e}function ud(){const e=localStorage.getItem(To);return e===null?!0:e==="true"}function cd(e){localStorage.setItem(To,String(!!e))}const fd={__name:"App",setup(e){const t=J(!1),n=J("chat"),s=J([]),r=J([]),i=J(!1),l=J([]),a=J(null),o=J("actual"),c=J(!0),u=J(null),d=J(!1),g=J(null),y=J((()=>{try{return localStorage.getItem("sendNonERPtoaiEnabled")==="true"}catch{return!1}})()),E=J({enableVoiceChat:!1,pollyAvailable:!1,usePolly:!0,voiceId:"Zayd",enable_changai:!1}),x=J("off"),M=J(null),m=J(null),H=Ee(()=>M.value!==null),Y=Ee(()=>m.value!==null);function $(){if(!E.value.enableVoiceChat){x.value="off";return}x.value=E.value.usePolly?"polly":"browser"}function U(te){var he;const R=(he=te==null?void 0:te.detail)==null?void 0:he.provider;(R==="polly"||R==="browser"||R==="off")&&(x.value=R)}async function L(){var R,he,Le,re,F;if(!(d.value||u.value)){d.value=!0;try{u.value=await Oc(o.value),E.value={enableVoiceChat:!!((R=u.value)!=null&&R.enable_voice_chat),pollyAvailable:!!((he=u.value)!=null&&he.polly_enabled),usePolly:!!((Le=u.value)!=null&&Le.polly_enabled)&&ud(),voiceId:((re=u.value)==null?void 0:re.polly_voice_id)||"Zayd",enable_changai:!!((F=u.value)!=null&&F.enable_changai)},$(),r.value.push({type:"settings",settings:u.value})}catch(ue){const ge=vo(ue);r.value.push({type:"settings",error:ge})}finally{d.value=!1}}}function O(){t.value=!t.value}function ee(){var te;(te=a.value)==null||te.scrollToBottom()}function q(){c.value=!c.value}function se(){const te=!E.value.usePolly;E.value={...E.value,usePolly:te&&E.value.pollyAvailable},cd(E.value.usePolly),$()}function fe(){y.value=!y.value,localStorage.setItem("sendNonERPtoaiEnabled",y.value)}async function D(te){n.value==="support"?await je(te):await Z(te)}async function Z(te){var Qe,ye;g.value=null,o.value==="actual"&&await L(),s.value.push({role:"user",text:te}),await St(),ee();const R=cs({role:"model",text:"Thinking...",cancelable:!0,isStatus:!0,statusType:"thinking"});s.value.push(R),await St(),ee();const he=j=>{var Ft;const st=Date.now(),Ie=((st-Te)/1e3).toFixed(2);if(Te=st,j.message){const f=`${j.message} (${Ie}s)`;pe.push(f),g.value=f,R.text=j.message,R.statusType="pipeline"}if(!j.done&&j.message&&(R.text=j.message,R.statusType="pipeline"),j.done){R.cancelable=!1,j.error?(R.text=`โš ๏ธ ${j.message||"Something failed"}`,R.isStatus=!1,R.statusType=null):(Ft=j.data)!=null&&Ft.answer&&(R.text=j.data.answer,R.isStatus=!1,R.statusType=null),frappe.realtime.off(ue,he),g.value=null;return}};let Le=!1;const re=ad(),F=`${re}_${Date.now()}`,ue=`debug_${F}`;frappe.realtime.on(ue,he);const ge=Pc(te,re,o.value,F,y.value);let Te=Date.now();const pe=[];M.value=()=>{Le||(Le=!0,ge.cancel(),frappe.realtime.off(ue,he),R.isStatus=!1,R.statusType=null,R.text="Cancelled by user.",r.value.push({type:"cancelled",user:te,steps:[...pe]}),g.value=null,R.cancelable=!1,M.value=null)};try{const j=await ge.promise;if(j!=null&&j.open_report){if(R.isStatus=!1,R.statusType=null,R.text=`Opening "${j.report_name}" report." `,r.value.push({type:"success",steps:[...pe],final_response:j,entity_raw:j.entity_raw}),g.value=null,!j.report_name){R.text="Report name extraction failed.Can you ask the same question again?";return}frappe.set_route("query-report",j.report_name,j.filters||{});return}else if(j!=null&&j.create_entity){R.isStatus=!1,R.statusType=null,R.cancelable=!1,R.text=`Opening "${j.doc}" doctype for creating a new record.`,r.value.push({type:"success",user:te,steps:[...pe],final_response:j}),g.value=null;const Ie=j.doc,Ft=j.fields_to_fill||{},f=j.child_tables||{},h=j.entity_name||"",b={Customer:{customer_name:h},Supplier:{supplier_name:h},Employee:{employee_name:h},Item:{item_code:h,item_name:h},Project:{project_name:h},Lead:{lead_name:h},Opportunity:{opportunity_name:h}},k=Object.keys(Ft).length>0?Ft:b[Ie]||{};frappe.route_options=k,frappe.set_route("Form",Ie,"new");let v=0;const _=setInterval(()=>{if(v++>50){clearInterval(_);return}cur_frm&&cur_frm.doctype===Ie&&cur_frm.is_new()&&(clearInterval(_),Object.entries(k).forEach(([P,C])=>{C&&cur_frm.fields_dict[P]&&(cur_frm.set_value(P,C),cur_frm.refresh_field(P))}),Object.entries(f).forEach(([P,C])=>{!Array.isArray(C)||!C.length||cur_frm.fields_dict[P]&&(C.forEach(A=>{const S=frappe.model.add_child(cur_frm.doc,P);Object.entries(A).forEach(([z,I])=>{I!=null&&I!==""&&frappe.model.set_value(S.doctype,S.name,z,I)})}),cur_frm.refresh_field(P))}))},200);return}if(j!=null&&j.stop_followup){R.isStatus=!1,R.statusType=null,R.cancelable=!1,R.text=j.message||"Youโ€™re welcome!",r.value.push({type:"stop_followup",user:te,steps:[...pe],final_response:j}),g.value=null;return}if(Le)return;R.cancelable=!1;const st=((Qe=bp(j==null?void 0:j.Bot))==null?void 0:Qe.trim())||"No response.";R.isStatus=!1,R.statusType=null,R.text=st,r.value.push({type:"success",user:te,steps:[...pe],final_response:j}),g.value=null}catch(j){if(Le)return;R.cancelable=!1,R.isStatus=!1,R.statusType=null;const st=vo(j);g.value=null,r.value.push({type:"failed",user:te,steps:[...pe],error:st}),(j==null?void 0:j.code)==="ERR_NETWORK_CHANGED"||(ye=j==null?void 0:j.message)!=null&&ye.includes("ERR_NETWORK_CHANGED")?(R.isStatus=!1,R.statusType=null,R.text="โš ๏ธ Network error. Please check your connection and try again."):(R.isStatus=!1,R.statusType=null,R.text="โš ๏ธ Something went wrong. Please try again.")}finally{frappe.realtime.off(ue,he),Le||(M.value=null)}await St(),ee()}function Se(){var te,R;if(n.value==="support"){(te=m.value)==null||te.call(m);return}(R=M.value)==null||R.call(M)}async function je(te){l.value.push({role:"user",text:te}),await St(),ee();const R=cs({role:"model",text:"Sending to support...",isStatus:!0,statusType:"support"});l.value.push(R),await St(),ee();let he=!1;const Le=Ic(te,o.value);m.value=()=>{he||(he=!0,Le.cancel(),R.isStatus=!1,R.statusType=null,R.text="Cancelled by user.",m.value=null)};try{const re=await Le.promise;if(he)return;R.isStatus=!1,R.statusType=null,R.text=re?wo(re):"Support request sent successfully."}catch{if(he)return;R.isStatus=!1,R.statusType=null,R.text="โš ๏ธ Failed to reach support. Please try again."}finally{he||(m.value=null)}await St(),ee()}return zn(()=>{typeof window!="undefined"&&window.addEventListener("changai-tts-provider",U),o.value==="actual"&&L()}),ys(()=>{typeof window!="undefined"&&window.removeEventListener("changai-tts-provider",U)}),(te,R)=>(B(),G(ze,null,[E.value.enable_changai?(B(),Et(ac,{key:0,isOpen:t.value,onToggle:O},null,8,["isOpen"])):We("",!0),Me(od,{ref_key:"popupRef",ref:a,isOpen:t.value,activeTab:n.value,"onUpdate:activeTab":R[0]||(R[0]=he=>n.value=he),chatHistory:s.value,debugLogs:r.value,currentDebug:g.value,supportHistory:l.value,autoReadEnabled:c.value,ttsConfig:E.value,activeTtsProvider:x.value,settings:u.value,isAwaitingChatResponse:H.value,isAwaitingSupportResponse:Y.value,debugEnabled:i.value,sendNonERPtoaiEnabled:y.value,onToggleDebug:R[1]||(R[1]=he=>i.value=!i.value),onClose:R[2]||(R[2]=he=>t.value=!1),onSubmit:D,onCancelResponse:Se,onToggleAutoRead:q,onTogglePollyPreference:se,onToggleSendNonERP:fe},null,8,["isOpen","activeTab","chatHistory","debugLogs","currentDebug","supportHistory","autoReadEnabled","ttsConfig","activeTtsProvider","settings","isAwaitingChatResponse","isAwaitingSupportResponse","debugEnabled","sendNonERPtoaiEnabled"])],64))}};function pd(){const e=document.querySelector('link[href*="/assets/changai/dist/changai-chatbot.css"]');if(e!=null&&e.href)return e.href;const t=Array.from(document.scripts).find(n=>{var s;return(s=n.src)==null?void 0:s.includes("/assets/changai/dist/changai-chatbot.js")});return t!=null&&t.src?t.src.replace(/changai-chatbot\.js(\?.*)?$/,"changai-chatbot.css$1"):null}function dd(e){const t=pd();if(!t){const n=Array.from(document.querySelectorAll("style[data-vite-dev-id]"));return n.length&&n.forEach(s=>{const r=document.createElement("style");r.dataset.changaiShadowDevStyle="1",r.textContent=s.textContent||"",e.appendChild(r)}),Promise.resolve()}return e.querySelector('link[data-changai-shadow-style="1"]')?Promise.resolve():new Promise(n=>{const s=document.createElement("link");s.rel="stylesheet",s.href=t,s.dataset.changaiShadowStyle="1",s.onload=()=>n(),s.onerror=()=>n(),e.appendChild(s),setTimeout(n,1200)})}async function ko(){if(document.getElementById("changai-chatbot-host"))return;const e=document.createElement("div");e.id="changai-chatbot-host",document.body.appendChild(e);const t=e.attachShadow({mode:"open"});await dd(t);const n=document.createElement("div");n.id="changai-chatbot-root",t.appendChild(n),nc(fd).mount(n);function s(r){r.stopPropagation()}n.addEventListener("keydown",s),n.addEventListener("keyup",s),n.addEventListener("keypress",s)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",ko):ko()})(); +`}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${St(e,!0)}`}br(e){return"
    "}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:n}){let s=this.parser.parseInline(n),r=dl(e);if(r===null)return s;e=r;let i='
    ",i}image({href:e,title:t,text:n,tokens:s}){s&&(n=this.parser.parseInline(s,this.parser.textRenderer));let r=dl(e);if(r===null)return St(n);e=r;let i=`${St(n)}{let l=o[a].flat(1/0);n=n.concat(this.walkTokens(l,t))}):o.tokens&&(n=n.concat(this.walkTokens(o.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let s={...n};if(s.async=this.defaults.async||s.async||!1,n.extensions&&(n.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){let i=t.renderers[r.name];i?t.renderers[r.name]=function(...o){let a=r.renderer.apply(this,o);return a===!1&&(a=i.apply(this,o)),a}:t.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=t[r.level];i?i.unshift(r.tokenizer):t[r.level]=[r.tokenizer],r.start&&(r.level==="block"?t.startBlock?t.startBlock.push(r.start):t.startBlock=[r.start]:r.level==="inline"&&(t.startInline?t.startInline.push(r.start):t.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(t.childTokens[r.name]=r.childTokens)}),s.extensions=t),n.renderer){let r=this.defaults.renderer||new js(this.defaults);for(let i in n.renderer){if(!(i in r))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let o=i,a=n.renderer[o],l=r[o];r[o]=(...f)=>{let u=a.apply(r,f);return u===!1&&(u=l.apply(r,f)),u||""}}s.renderer=r}if(n.tokenizer){let r=this.defaults.tokenizer||new Us(this.defaults);for(let i in n.tokenizer){if(!(i in r))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let o=i,a=n.tokenizer[o],l=r[o];r[o]=(...f)=>{let u=a.apply(r,f);return u===!1&&(u=l.apply(r,f)),u}}s.tokenizer=r}if(n.hooks){let r=this.defaults.hooks||new ts;for(let i in n.hooks){if(!(i in r))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let o=i,a=n.hooks[o],l=r[o];ts.passThroughHooks.has(i)?r[o]=f=>{if(this.defaults.async&&ts.passThroughHooksRespectAsync.has(i))return(async()=>{let h=await a.call(r,f);return l.call(r,h)})();let u=a.call(r,f);return l.call(r,u)}:r[o]=(...f)=>{if(this.defaults.async)return(async()=>{let h=await a.apply(r,f);return h===!1&&(h=await l.apply(r,f)),h})();let u=a.apply(r,f);return u===!1&&(u=l.apply(r,f)),u}}s.hooks=r}if(n.walkTokens){let r=this.defaults.walkTokens,i=n.walkTokens;s.walkTokens=function(o){let a=[];return a.push(i.call(this,o)),r&&(a=a.concat(r.call(this,o))),a}}this.defaults={...this.defaults,...s}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return gt.lex(e,t!=null?t:this.defaults)}parser(e,t){return mt.parse(e,t!=null?t:this.defaults)}parseMarkdown(e){return(t,n)=>{let s={...n},r={...this.defaults,...s},i=this.onError(!!r.silent,!!r.async);if(this.defaults.async===!0&&s.async===!1)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return i(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(r.hooks&&(r.hooks.options=r,r.hooks.block=e),r.async)return(async()=>{let o=r.hooks?await r.hooks.preprocess(t):t,a=await(r.hooks?await r.hooks.provideLexer(e):e?gt.lex:gt.lexInline)(o,r),l=r.hooks?await r.hooks.processAllTokens(a):a;r.walkTokens&&await Promise.all(this.walkTokens(l,r.walkTokens));let f=await(r.hooks?await r.hooks.provideParser(e):e?mt.parse:mt.parseInline)(l,r);return r.hooks?await r.hooks.postprocess(f):f})().catch(i);try{r.hooks&&(t=r.hooks.preprocess(t));let o=(r.hooks?r.hooks.provideLexer(e):e?gt.lex:gt.lexInline)(t,r);r.hooks&&(o=r.hooks.processAllTokens(o)),r.walkTokens&&this.walkTokens(o,r.walkTokens);let a=(r.hooks?r.hooks.provideParser(e):e?mt.parse:mt.parseInline)(o,r);return r.hooks&&(a=r.hooks.postprocess(a)),a}catch(o){return i(o)}}}onError(e,t){return n=>{if(n.message+=` +Please report this to https://github.com/markedjs/marked.`,e){let s="

    An error occurred:

    "+St(n.message+"",!0)+"
    ";return t?Promise.resolve(s):s}if(t)return Promise.reject(n);throw n}}},mn=new Hf;function xe(e,t){return mn.parse(e,t)}xe.options=xe.setOptions=function(e){return mn.setOptions(e),xe.defaults=mn.defaults,el(xe.defaults),xe},xe.getDefaults=Nr,xe.defaults=hn,xe.use=function(...e){return mn.use(...e),xe.defaults=mn.defaults,el(xe.defaults),xe},xe.walkTokens=function(e,t){return mn.walkTokens(e,t)},xe.parseInline=mn.parseInline,xe.Parser=mt,xe.parser=mt.parse,xe.Renderer=js,xe.TextRenderer=qr,xe.Lexer=gt,xe.lexer=gt.lex,xe.Tokenizer=Us,xe.Hooks=ts,xe.parse=xe,xe.options,xe.setOptions,xe.use,xe.walkTokens,xe.parseInline,mt.parse,gt.lex;function bl(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,s=Array(t);n2?s-2:0),i=2;i1?n-1:0),r=1;r1?n-1:0),r=1;r2&&arguments[2]!==void 0?arguments[2]:ss;if(yl&&yl(e,null),!Qt(t))return e;let s=t.length;for(;s--;){let r=t[s];if(typeof r=="string"){const i=n(r);i!==r&&(Wf(t)||(t[s]=i),r=i)}e[r]=!0}return e}function tp(e){for(let t=0;t/g),ap=ze(/\${[\w\W]*/g),up=ze(/^data-[\-\w.\u00B7-\uFFFF]+$/),cp=ze(/^aria-[\-\w]+$/),Pl=ze(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),fp=ze(/^(?:\w+script|data):/i),pp=ze(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),dp=ze(/^html$/i),hp=ze(/^[a-z][.\w]*(-[.\w]+)+$/i),Il=ze(/<[/\w!]/g),gp=ze(/<[/\w]/g),mp=ze(/<\/no(script|embed|frames)/i),bp=ze(/\/>/i),At={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},xp=function(){return typeof window=="undefined"?null:window},yp=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let s=null;const r="data-tt-policy-suffix";n&&n.hasAttribute(r)&&(s=n.getAttribute(r));const i="dompurify"+(s?"#"+s:"");try{return t.createPolicy(i,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}},Ol=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},en=function(t,n,s,r){return Le(t,n)&&Qt(t[n])?le(r.base?Je(r.base):{},t[n],r.transform):s};function Ml(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:xp();const t=D=>Ml(D);if(t.version="3.4.11",t.removed=[],!e||!e.document||e.document.nodeType!==At.document||!e.Element)return t.isSupported=!1,t;let n=e.document;const s=n,r=s.currentScript;e.DocumentFragment;const i=e.HTMLTemplateElement,o=e.Node,a=e.Element,l=e.NodeFilter,f=e.NamedNodeMap;f===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const u=e.DOMParser,h=e.trustedTypes,g=a.prototype,w=Et(g,"cloneNode"),A=Et(g,"remove"),_=Et(g,"nextSibling"),F=Et(g,"childNodes"),b=Et(g,"parentNode"),U=Et(g,"shadowRoot"),Z=Et(g,"attributes"),$=o&&o.prototype?Et(o.prototype,"nodeType"):null,Y=o&&o.prototype?Et(o.prototype,"nodeName"):null;if(typeof i=="function"){const D=n.createElement("template");D.content&&D.content.ownerDocument&&(n=D.content.ownerDocument)}let C,N="",te,W=!1,X=0;const ue=function(){if(X>0)throw bn('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},B=function(c){ue(),X++;try{return C.createHTML(c)}finally{X--}},ge=function(c){ue(),X++;try{return C.createScriptURL(c)}finally{X--}},Ae=function(){return W||(te=yp(h,r),W=!0),te},je=n,J=je.implementation,R=je.createNodeIterator,ye=je.createDocumentFragment,$e=je.getElementsByTagName,ne=s.importNode;let M=Ol();t.isSupported=typeof xl=="function"&&typeof b=="function"&&J&&J.createHTMLDocument!==void 0;const pe=op,Ve=lp,Te=ap,bt=up,Me=cp,Ft=fp,Bt=pp,xn=hp;let j=Pl,de=null;const p=le({},[...El,...Yr,...Zr,...Xr,...Al]);let d=null;const x=le({},[...Rl,...Jr,...Cl,...Vs]);let y=Object.seal(Cn(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),T=null,k=null;const P=Object.seal(Cn(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let I=!0,E=!0,S=!1,q=!0,O=!1,z=!0,G=!1,re=!1,me=null,ce=null,Ne=!1,Re=!1,Qe=!1,et=!1,tn=!0,os=!1;const Ye="user-content-";let rt=!0,In=!1,Ht={},Rt=null;const Qr=le({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Hl=null;const zl=le({},["audio","video","img","source","image","track"]);let ei=null;const Ul=le({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ws="http://www.w3.org/1998/Math/MathML",Gs="http://www.w3.org/2000/svg",Ct="http://www.w3.org/1999/xhtml";let On=Ct,ti=!1,ni=null;const Fd=le({},[Ws,Gs,Ct],Kr),jl=He(["mi","mo","mn","ms","mtext"]);let si=le({},jl);const Vl=He(["annotation-xml"]);let ri=le({},Vl);const Bd=le({},["title","style","font","a","script"]);let ls=null;const Hd=["application/xhtml+xml","text/html"],zd="text/html";let Se=null,Mn=null;const Ud=n.createElement("form"),ql=function(c){return c instanceof RegExp||c instanceof Function},ii=function(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Mn&&Mn===c)return;(!c||typeof c!="object")&&(c={}),c=Je(c),ls=Hd.indexOf(c.PARSER_MEDIA_TYPE)===-1?zd:c.PARSER_MEDIA_TYPE,Se=ls==="application/xhtml+xml"?Kr:ss,de=en(c,"ALLOWED_TAGS",p,{transform:Se}),d=en(c,"ALLOWED_ATTR",x,{transform:Se}),ni=en(c,"ALLOWED_NAMESPACES",Fd,{transform:Kr}),ei=en(c,"ADD_URI_SAFE_ATTR",Ul,{transform:Se,base:Ul}),Hl=en(c,"ADD_DATA_URI_TAGS",zl,{transform:Se,base:zl}),Rt=en(c,"FORBID_CONTENTS",Qr,{transform:Se}),T=en(c,"FORBID_TAGS",Je({}),{transform:Se}),k=en(c,"FORBID_ATTR",Je({}),{transform:Se}),Ht=Le(c,"USE_PROFILES")?c.USE_PROFILES&&typeof c.USE_PROFILES=="object"?Je(c.USE_PROFILES):c.USE_PROFILES:!1,I=c.ALLOW_ARIA_ATTR!==!1,E=c.ALLOW_DATA_ATTR!==!1,S=c.ALLOW_UNKNOWN_PROTOCOLS||!1,q=c.ALLOW_SELF_CLOSE_IN_ATTR!==!1,O=c.SAFE_FOR_TEMPLATES||!1,z=c.SAFE_FOR_XML!==!1,G=c.WHOLE_DOCUMENT||!1,Re=c.RETURN_DOM||!1,Qe=c.RETURN_DOM_FRAGMENT||!1,et=c.RETURN_TRUSTED_TYPE||!1,Ne=c.FORCE_BODY||!1,tn=c.SANITIZE_DOM!==!1,os=c.SANITIZE_NAMED_PROPS||!1,rt=c.KEEP_CONTENT!==!1,In=c.IN_PLACE||!1,j=sp(c.ALLOWED_URI_REGEXP)?c.ALLOWED_URI_REGEXP:Pl,On=typeof c.NAMESPACE=="string"?c.NAMESPACE:Ct,si=Le(c,"MATHML_TEXT_INTEGRATION_POINTS")&&c.MATHML_TEXT_INTEGRATION_POINTS&&typeof c.MATHML_TEXT_INTEGRATION_POINTS=="object"?Je(c.MATHML_TEXT_INTEGRATION_POINTS):le({},jl),ri=Le(c,"HTML_INTEGRATION_POINTS")&&c.HTML_INTEGRATION_POINTS&&typeof c.HTML_INTEGRATION_POINTS=="object"?Je(c.HTML_INTEGRATION_POINTS):le({},Vl);const m=Le(c,"CUSTOM_ELEMENT_HANDLING")&&c.CUSTOM_ELEMENT_HANDLING&&typeof c.CUSTOM_ELEMENT_HANDLING=="object"?Je(c.CUSTOM_ELEMENT_HANDLING):Cn(null);if(y=Cn(null),Le(m,"tagNameCheck")&&ql(m.tagNameCheck)&&(y.tagNameCheck=m.tagNameCheck),Le(m,"attributeNameCheck")&&ql(m.attributeNameCheck)&&(y.attributeNameCheck=m.attributeNameCheck),Le(m,"allowCustomizedBuiltInElements")&&typeof m.allowCustomizedBuiltInElements=="boolean"&&(y.allowCustomizedBuiltInElements=m.allowCustomizedBuiltInElements),ze(y),O&&(E=!1),Qe&&(Re=!0),Ht&&(de=le({},Al),d=Cn(null),Ht.html===!0&&(le(de,El),le(d,Rl)),Ht.svg===!0&&(le(de,Yr),le(d,Jr),le(d,Vs)),Ht.svgFilters===!0&&(le(de,Zr),le(d,Jr),le(d,Vs)),Ht.mathMl===!0&&(le(de,Xr),le(d,Cl),le(d,Vs))),P.tagCheck=null,P.attributeCheck=null,Le(c,"ADD_TAGS")&&(typeof c.ADD_TAGS=="function"?P.tagCheck=c.ADD_TAGS:Qt(c.ADD_TAGS)&&(de===p&&(de=Je(de)),le(de,c.ADD_TAGS,Se))),Le(c,"ADD_ATTR")&&(typeof c.ADD_ATTR=="function"?P.attributeCheck=c.ADD_ATTR:Qt(c.ADD_ATTR)&&(d===x&&(d=Je(d)),le(d,c.ADD_ATTR,Se))),Le(c,"ADD_URI_SAFE_ATTR")&&Qt(c.ADD_URI_SAFE_ATTR)&&le(ei,c.ADD_URI_SAFE_ATTR,Se),Le(c,"FORBID_CONTENTS")&&Qt(c.FORBID_CONTENTS)&&(Rt===Qr&&(Rt=Je(Rt)),le(Rt,c.FORBID_CONTENTS,Se)),Le(c,"ADD_FORBID_CONTENTS")&&Qt(c.ADD_FORBID_CONTENTS)&&(Rt===Qr&&(Rt=Je(Rt)),le(Rt,c.ADD_FORBID_CONTENTS,Se)),rt&&(de["#text"]=!0),G&&le(de,["html","head","body"]),de.table&&(le(de,["tbody"]),delete T.tbody),c.TRUSTED_TYPES_POLICY){if(typeof c.TRUSTED_TYPES_POLICY.createHTML!="function")throw bn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof c.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw bn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const L=C;C=c.TRUSTED_TYPES_POLICY;try{N=B("")}catch(V){throw C=L,V}}else c.TRUSTED_TYPES_POLICY===null?(C=void 0,N=""):(C===void 0&&(C=Ae()),C&&typeof N=="string"&&(N=B("")));He&&He(c),Mn=c},Wl=le({},[...Yr,...Zr,...rp]),Gl=le({},[...Xr,...ip]),jd=function(c,m,L){return m.namespaceURI===Ct?c==="svg":m.namespaceURI===Ws?c==="svg"&&(L==="annotation-xml"||si[L]):!!Wl[c]},Vd=function(c,m,L){return m.namespaceURI===Ct?c==="math":m.namespaceURI===Gs?c==="math"&&ri[L]:!!Gl[c]},qd=function(c,m,L){return m.namespaceURI===Gs&&!ri[L]||m.namespaceURI===Ws&&!si[L]?!1:!Gl[c]&&(Bd[c]||!Wl[c])},Wd=function(c){let m=b(c);(!m||!m.tagName)&&(m={namespaceURI:On,tagName:"template"});const L=ss(c.tagName),V=ss(m.tagName);return ni[c.namespaceURI]?c.namespaceURI===Gs?jd(L,m,V):c.namespaceURI===Ws?Vd(L,m,V):c.namespaceURI===Ct?qd(L,m,V):!!(ls==="application/xhtml+xml"&&ni[c.namespaceURI]):!1},nn=function(c){Pn(t.removed,{element:c});try{b(c).removeChild(c)}catch{if(A(c),!b(c))throw bn("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Kl=function(c){const m=F(c);if(m){const V=[];ns(m,se=>{Pn(V,se)}),ns(V,se=>{try{A(se)}catch{}})}const L=Z(c);if(L)for(let V=L.length-1;V>=0;--V){const se=L[V],fe=se&&se.name;if(typeof fe=="string")try{c.removeAttribute(fe)}catch{}}},yn=function(c,m){try{Pn(t.removed,{attribute:m.getAttributeNode(c),from:m})}catch{Pn(t.removed,{attribute:null,from:m})}if(m.removeAttribute(c),c==="is")if(Re||Qe)try{nn(m)}catch{}else try{m.setAttribute(c,"")}catch{}},Gd=function(c){const m=Z(c);if(m)for(let L=m.length-1;L>=0;--L){const V=m[L],se=V&&V.name;if(!(typeof se!="string"||d[Se(se)]))try{c.removeAttribute(se)}catch{}}},Kd=function(c){const m=[c];for(;m.length>0;){const L=m.pop();($?$(L):L.nodeType)===At.element&&Gd(L);const se=F(L);if(se)for(let fe=se.length-1;fe>=0;--fe)m.push(se[fe])}},Yl=function(c){let m=null,L=null;if(Ne)c=""+c;else{const fe=_l(c,/^[\r\n\t ]+/);L=fe&&fe[0]}ls==="application/xhtml+xml"&&On===Ct&&(c=''+c+"");const V=C?B(c):c;if(On===Ct)try{m=new u().parseFromString(V,ls)}catch{}if(!m||!m.documentElement){m=J.createDocument(On,"template",null);try{m.documentElement.innerHTML=ti?N:V}catch{}}const se=m.body||m.documentElement;return c&&L&&se.insertBefore(n.createTextNode(L),se.childNodes[0]||null),On===Ct?$e.call(m,G?"html":"body")[0]:G?m.documentElement:se},Zl=function(c){return R.call(c.ownerDocument||c,c,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Ks=function(c){return c=rs(c,pe," "),c=rs(c,Ve," "),c=rs(c,Te," "),c},oi=function(c){var m;c.normalize();const L=R.call(c.ownerDocument||c,c,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let V=L.nextNode();for(;V;)V.data=Ks(V.data),V=L.nextNode();const se=(m=c.querySelectorAll)===null||m===void 0?void 0:m.call(c,"template");se&&ns(se,fe=>{Ln(fe.content)&&oi(fe.content)})},Ys=function(c){const m=Y?Y(c):null;return typeof m!="string"||Se(m)!=="form"?!1:typeof c.nodeName!="string"||typeof c.textContent!="string"||typeof c.removeChild!="function"||c.attributes!==Z(c)||typeof c.removeAttribute!="function"||typeof c.setAttribute!="function"||typeof c.namespaceURI!="string"||typeof c.insertBefore!="function"||typeof c.hasChildNodes!="function"||c.nodeType!==$(c)||c.childNodes!==F(c)},Ln=function(c){if(!$||typeof c!="object"||c===null)return!1;try{return $(c)===At.documentFragment}catch{return!1}},as=function(c){if(!$||typeof c!="object"||c===null)return!1;try{return typeof $(c)=="number"}catch{return!1}};function zt(D,c,m){D.length!==0&&ns(D,L=>{L.call(t,c,m,Mn)})}const Yd=function(c,m){return!!(z&&c.hasChildNodes()&&!as(c.firstElementChild)&&Ue(Il,c.textContent)&&Ue(Il,c.innerHTML)||z&&c.namespaceURI===Ct&&m==="style"&&as(c.firstElementChild)||c.nodeType===At.processingInstruction||z&&c.nodeType===At.comment&&Ue(gp,c.data))},Zd=function(c,m){if(!T[m]&&Ql(m)&&(y.tagNameCheck instanceof RegExp&&Ue(y.tagNameCheck,m)||y.tagNameCheck instanceof Function&&y.tagNameCheck(m)))return!1;if(rt&&!Rt[m]){const L=b(c),V=F(c);if(V&&L){const se=V.length;for(let fe=se-1;fe>=0;--fe){const De=In?V[fe]:w(V[fe],!0);L.insertBefore(De,_(c))}}}return nn(c),!0},Xl=function(c){if(zt(M.beforeSanitizeElements,c,null),Ys(c))return nn(c),!0;const m=Se(Y?Y(c):c.nodeName);if(zt(M.uponSanitizeElement,c,{tagName:m,allowedTags:de}),Yd(c,m))return nn(c),!0;if(T[m]||!(P.tagCheck instanceof Function&&P.tagCheck(m))&&!de[m])return Zd(c,m);if(($?$(c):c.nodeType)===At.element&&!Wd(c)||(m==="noscript"||m==="noembed"||m==="noframes")&&Ue(mp,c.innerHTML))return nn(c),!0;if(O&&c.nodeType===At.text){const V=Ks(c.textContent);c.textContent!==V&&(Pn(t.removed,{element:c.cloneNode()}),c.textContent=V)}return zt(M.afterSanitizeElements,c,null),!1},Jl=function(c,m,L){if(k[m]||tn&&(m==="id"||m==="name")&&(L in n||L in Ud))return!1;const V=d[m]||P.attributeCheck instanceof Function&&P.attributeCheck(m,c);if(!(E&&Ue(bt,m))){if(!(I&&Ue(Me,m))){if(V){if(!ei[m]){if(!Ue(j,rs(L,Bt,""))){if(!((m==="src"||m==="xlink:href"||m==="href")&&c!=="script"&&Tl(L,"data:")===0&&Hl[c])){if(!(S&&!Ue(Ft,rs(L,Bt,"")))){if(L)return!1}}}}}else if(!(Ql(c)&&(y.tagNameCheck instanceof RegExp&&Ue(y.tagNameCheck,c)||y.tagNameCheck instanceof Function&&y.tagNameCheck(c))&&(y.attributeNameCheck instanceof RegExp&&Ue(y.attributeNameCheck,m)||y.attributeNameCheck instanceof Function&&y.attributeNameCheck(m,c))||m==="is"&&y.allowCustomizedBuiltInElements&&(y.tagNameCheck instanceof RegExp&&Ue(y.tagNameCheck,L)||y.tagNameCheck instanceof Function&&y.tagNameCheck(L))))return!1}}return!0},Xd=le({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Ql=function(c){return!Xd[ss(c)]&&Ue(xn,c)},Jd=function(c,m,L,V){if(C&&typeof h=="object"&&typeof h.getAttributeType=="function"&&!L)switch(h.getAttributeType(c,m)){case"TrustedHTML":return B(V);case"TrustedScriptURL":return ge(V)}return V},Qd=function(c,m,L,V){try{L?c.setAttributeNS(L,m,V):c.setAttribute(m,V),Ys(c)?nn(c):vl(t.removed)}catch{yn(m,c)}},ea=function(c){zt(M.beforeSanitizeAttributes,c,null);const m=c.attributes;if(!m||Ys(c))return;const L={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:d,forceKeepAttr:void 0};let V=m.length;const se=Se(c.nodeName);for(;V--;){const fe=m[V],De=fe.name,Ie=fe.namespaceURI,ft=fe.value,xt=Se(De),ai=ft;let tt=De==="value"?ai:Xf(ai);if(L.attrName=xt,L.attrValue=tt,L.keepAttr=!0,L.forceKeepAttr=void 0,zt(M.uponSanitizeAttribute,c,L),tt=L.attrValue,os&&(xt==="id"||xt==="name")&&Tl(tt,Ye)!==0&&(yn(De,c),tt=Ye+tt),z&&Ue(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,tt)){yn(De,c);continue}if(xt==="attributename"&&_l(tt,"href")){yn(De,c);continue}if(!L.forceKeepAttr){if(!L.keepAttr){yn(De,c);continue}if(!q&&Ue(bp,tt)){yn(De,c);continue}if(O&&(tt=Ks(tt)),!Jl(se,xt,tt)){yn(De,c);continue}tt=Jd(se,xt,Ie,tt),tt!==ai&&Qd(c,De,Ie,tt)}}zt(M.afterSanitizeAttributes,c,null)},Zs=function(c){let m=null;const L=Zl(c);for(zt(M.beforeSanitizeShadowDOM,c,null);m=L.nextNode();)if(zt(M.uponSanitizeShadowNode,m,null),Xl(m),ea(m),Ln(m.content)&&Zs(m.content),($?$(m):m.nodeType)===At.element){const se=U(m);Ln(se)&&(li(se),Zs(se))}zt(M.afterSanitizeShadowDOM,c,null)},li=function(c){const m=[{node:c,shadow:null}];for(;m.length>0;){const L=m.pop();if(L.shadow){Zs(L.shadow);continue}const V=L.node,fe=($?$(V):V.nodeType)===At.element,De=F(V);if(De)for(let Ie=De.length-1;Ie>=0;--Ie)m.push({node:De[Ie],shadow:null});if(fe){const Ie=Y?Y(V):null;if(typeof Ie=="string"&&Se(Ie)==="template"){const ft=V.content;Ln(ft)&&m.push({node:ft,shadow:null})}}if(fe){const Ie=U(V);Ln(Ie)&&m.push({node:null,shadow:Ie},{node:Ie,shadow:null})}}};return t.sanitize=function(D){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},m=null,L=null,V=null,se=null;if(ti=!D,ti&&(D=""),typeof D!="string"&&!as(D)&&(D=np(D),typeof D!="string"))throw bn("dirty is not a string, aborting");if(!t.isSupported)return D;re?(de=me,d=ce):ii(c),(M.uponSanitizeElement.length>0||M.uponSanitizeAttribute.length>0)&&(de=Je(de)),M.uponSanitizeAttribute.length>0&&(d=Je(d)),t.removed=[];const fe=In&&typeof D!="string"&&as(D);if(fe){const ft=Y?Y(D):D.nodeName;if(typeof ft=="string"){const xt=Se(ft);if(!de[xt]||T[xt])throw bn("root node is forbidden and cannot be sanitized in-place")}if(Ys(D))throw bn("root node is clobbered and cannot be sanitized in-place");try{li(D)}catch(xt){throw Kl(D),xt}}else if(as(D))m=Yl(""),L=m.ownerDocument.importNode(D,!0),L.nodeType===At.element&&L.nodeName==="BODY"||L.nodeName==="HTML"?m=L:m.appendChild(L),li(L);else{if(!Re&&!O&&!G&&D.indexOf("<")===-1)return C&&et?B(D):D;if(m=Yl(D),!m)return Re?null:et?N:""}m&&Ne&&nn(m.firstChild);const De=Zl(fe?D:m);try{for(;V=De.nextNode();)Xl(V),ea(V),Ln(V.content)&&Zs(V.content)}catch(ft){throw fe&&Kl(D),ft}if(fe)return ns(t.removed,ft=>{ft.element&&Kd(ft.element)}),O&&oi(D),D;if(Re){if(O&&oi(m),Qe)for(se=ye.call(m.ownerDocument);m.firstChild;)se.appendChild(m.firstChild);else se=m;return(d.shadowroot||d.shadowrootmode)&&(se=ne.call(s,se,!0)),se}let Ie=G?m.outerHTML:m.innerHTML;return G&&de["!doctype"]&&m.ownerDocument&&m.ownerDocument.doctype&&m.ownerDocument.doctype.name&&Ue(dp,m.ownerDocument.doctype.name)&&(Ie=" +`+Ie),O&&(Ie=Ks(Ie)),C&&et?B(Ie):Ie},t.setConfig=function(){let D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ii(D),re=!0,me=de,ce=d},t.clearConfig=function(){Mn=null,re=!1,me=null,ce=null,C=te,N=""},t.isValidAttribute=function(D,c,m){Mn||ii({});const L=Se(D),V=Se(c);return Jl(L,V,m)},t.addHook=function(D,c){typeof c=="function"&&Le(M,D)&&Pn(M[D],c)},t.removeHook=function(D,c){if(Le(M,D)){if(c!==void 0){const m=Yf(M[D],c);return m===-1?void 0:Zf(M[D],m,1)[0]}return vl(M[D])}},t.removeHooks=function(D){Le(M,D)&&(M[D]=[])},t.removeAllHooks=function(){M=Ol()},t}var wp=Ml();const vp={key:1,class:"flex min-w-0 max-w-[calc(100%-2.5rem)] flex-1 flex-col max-[600px]:max-w-[calc(100%-2.25rem)]"},_p={key:0,class:"flex w-fit flex-col items-start gap-1"},Tp=["aria-label"],kp={class:"inline-flex items-center gap-1.5"},Sp={class:"text-[8px] font-semibold tracking-[0.12em] uppercase text-[#3a67c9]"},Ep={key:1,class:"flex w-fit max-w-full flex-col items-start gap-2"},Ap={class:"chat-card relative w-fit max-w-full whitespace-pre-line rounded-[10px_10px_10px_3px] px-4 py-3 text-xs leading-relaxed wrap-anywhere text-slate-900"},Rp=["innerHTML"],Cp={key:0,class:"pointer-events-none absolute inset-x-0 bottom-0 h-14 rounded-b-[10px] bg-linear-to-t from-white via-white/92 to-white/0","aria-hidden":"true"},Pp={key:0,class:"flex flex-wrap items-center gap-2"},Ip=["title","aria-label"],Op={key:1,class:"flex flex-wrap items-center"},Mp=["title","aria-label"],Lp={viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},$p=["innerHTML"],Ll={__name:"ChatMessage",props:{message:{type:Object,required:!0},autoReadEnabled:{type:Boolean,default:!1},ttsConfig:{type:Object,default:()=>({enableVoiceChat:!1,pollyAvailable:!1,usePolly:!0,voiceId:"Zayd"})}},setup(e){const t=e,n=ee(!1),s=ee(null),r=ee(!1),i=ee(!1),o=ke(()=>typeof window!="undefined"&&"speechSynthesis"in window&&"SpeechSynthesisUtterance"in window);function a(C){typeof window!="undefined"&&window.dispatchEvent(new CustomEvent("changai-tts-provider",{detail:{provider:C}}))}function l(C){if(typeof C!="string")return"";const N=C.replace(/[\u{1F000}-\u{1FFFF}]/gu,"").replace(/[\u{2600}-\u{26FF}]/gu,"").replace(/[\u{2700}-\u{27BF}]/gu,"").replace(/\*\*(.*?)\*\*/g,"$1").replace(/\*(.*?)\*/g,"$1").replace(/`([^`]+)`/g,"$1").replace(/#{1,6}\s+/g,"").replace(/[-*+]\s+/g,"").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/\s+/g," ");return N.includes("<")?(new DOMParser().parseFromString(C,"text/html").body.textContent||"").replace(/\s+/g," ").trim():N.trim()}function f(){o.value&&window.speechSynthesis.cancel(),s.value&&(s.value.pause(),s.value.src="",s.value=null),n.value=!1}function u(){var C,N,te;if(i.value=!i.value,i.value)f();else{const W=F.value;if(!t.autoReadEnabled||!((C=t.ttsConfig)!=null&&C.enableVoiceChat)||!W||A())return;if((N=t.ttsConfig)!=null&&N.pollyAvailable&&((te=t.ttsConfig)!=null&&te.usePolly)){g(W).catch(X=>{console.warn("Polly TTS failed, falling back to browser speech:",X),h(W)});return}h(W)}}function h(C){if(!o.value||!C)return;window.dispatchEvent(new CustomEvent("changai-tts-stop")),window.speechSynthesis.cancel();const N=new SpeechSynthesisUtterance(C);N.rate=1,N.pitch=1,N.onend=()=>{n.value=!1},N.onerror=()=>{n.value=!1},n.value=!0,a("browser"),window.speechSynthesis.speak(N)}async function g(C){var ue;const N=await Jc(C,((ue=t.ttsConfig)==null?void 0:ue.voiceId)||"Zayd");if(!(N!=null&&N.ok)||!(N!=null&&N.audio_base64))throw new Error((N==null?void 0:N.error)||"Polly synthesis failed");window.dispatchEvent(new CustomEvent("changai-tts-stop")),f();const te=(N==null?void 0:N.mime_type)||"audio/mpeg",W=new Audio(`data:${te};base64,${N.audio_base64}`);s.value=W,n.value=!0;let X=!1;W.onplay=()=>{X=!0,a("polly")},W.onended=()=>{s.value===W&&(s.value=null),n.value=!1},W.onerror=()=>{s.value===W&&(s.value=null),n.value=!1},await W.play(),X||a("polly")}function w(){f()}function A(){var C;return!!((C=t.message)!=null&&C.isStatus)}function _(C){const N=C.target.closest("a");!N||!N.href||(C.preventDefault(),C.stopPropagation(),window.open(N.href,"_blank","noopener,noreferrer"))}const F=ke(()=>{var C;return l(((C=t.message)==null?void 0:C.text)||"")}),b=ke(()=>{var C;return((C=t.message)==null?void 0:C.role)!=="user"&&A()}),U=ke(()=>{var C;return(C=t.message)!=null&&C.isStatus?t.message.statusType==="support"?"Sending to support":F.value||"Thinking":""}),Z=ke(()=>{var te;if(((te=t.message)==null?void 0:te.role)==="user"||b.value)return!1;const C=F.value,N=C.split(/\n+/).filter(Boolean).length;return C.length>520||N>8}),$=ke(()=>{var C,N;return((C=t.message)==null?void 0:C.role)!=="user"&&!b.value&&((N=t.ttsConfig)==null?void 0:N.enableVoiceChat)}),Y=ke(()=>{var N;const C=((N=t.message)==null?void 0:N.text)||"";return wp.sanitize(xe.parse(C))});return cn(()=>t.message.text,async(C,N)=>{var X,ue,B;if(!t.autoReadEnabled||t.message.role==="user"||i.value)return;if(!((X=t.ttsConfig)!=null&&X.enableVoiceChat)){a("off");return}const te=l(C);if(!te||A())return;const W=l(N||"");if(te!==W){if((ue=t.ttsConfig)!=null&&ue.pollyAvailable&&((B=t.ttsConfig)!=null&&B.usePolly))try{await g(te);return}catch(ge){console.warn("Polly TTS failed, falling back to browser speech:",ge)}h(te)}}),cn(()=>t.message.text,()=>{r.value=!1,i.value=!1}),Wn(()=>{typeof window!="undefined"&&window.addEventListener("changai-tts-stop",w)}),As(()=>{typeof window!="undefined"&&window.removeEventListener("changai-tts-stop",w),n.value&&f()}),(C,N)=>(H(),K("div",{class:we(["motion-safe:animate-fade-rise flex w-full gap-1.5",e.message.role==="user"?"flex-col items-end":"items-start"])},[e.message.role!=="user"?(H(),_t(Zo,{key:0})):Ge("",!0),e.message.role!=="user"?(H(),K("div",vp,[b.value?(H(),K("div",_p,[v("div",{class:"chat-card inline-flex w-fit rounded-[10px_10px_10px_3px] px-3 py-2",role:"status","aria-live":"polite","aria-label":U.value},[v("div",kp,[N[1]||(N[1]=v("span",{class:"relative inline-flex h-4 w-4 shrink-0 items-center justify-center"},[v("span",{class:"absolute inset-0 rounded-full border border-transparent border-t-[#4b89ff] border-r-[#4b89ff]/70 animate-gemini-arc"}),v("svg",{viewBox:"0 0 24 24",class:"relative h-3 w-3 text-[#4b89ff] animate-gemini-spark","aria-hidden":"true"},[v("path",{fill:"currentColor",d:"M12 2.8c.52 3.22 1.6 5.66 3.22 7.28 1.62 1.62 4.06 2.7 7.28 3.22-3.22.52-5.66 1.6-7.28 3.22-1.62 1.62-2.7 4.06-3.22 7.28-.52-3.22-1.6-5.66-3.22-7.28-1.62-1.62-4.06-2.7-7.28-3.22 3.22-.52 5.66-1.6 7.28-3.22 1.62-1.62 2.7-4.06 3.22-7.28Z"})])],-1)),v("span",Sp,nt(U.value),1)])],8,Tp)])):(H(),K("div",Ep,[v("div",Ap,[v("div",{class:we(["overflow-x-auto",Z.value&&!r.value?"max-h-48 overflow-y-hidden":""]),innerHTML:Y.value,onClick:_},null,10,Rp),Z.value&&!r.value?(H(),K("div",Cp)):Ge("",!0)]),Z.value?(H(),K("div",Pp,[v("button",{type:"button",class:"inline-flex items-center rounded-full border border-slate-200 bg-white px-2.5 py-1 text-[10px] font-semibold uppercase tracking-[0.08em] text-slate-600 transition-colors duration-200 hover:border-brand-200 hover:text-brand-600",title:r.value?"Collapse response":"Expand response","aria-label":r.value?"Collapse response":"Expand response",onClick:N[0]||(N[0]=te=>r.value=!r.value)},nt(r.value?"Collapse":"Expand"),9,Ip)])):Ge("",!0),$.value?(H(),K("div",Op,[v("button",{type:"button",class:we(["inline-flex h-8 w-8 items-center justify-center rounded-full border transition-colors duration-200",i.value?"border-red-200 bg-red-50 text-red-600 hover:border-red-300 hover:bg-red-100":"border-green-200 bg-green-50 text-green-600 hover:border-green-300 hover:bg-green-100"]),title:i.value?"Unmute voice playback":"Mute voice playback","aria-label":i.value?"Unmute voice playback":"Mute voice playback",onClick:u},[(H(),K("svg",Lp,[N[6]||(N[6]=v("path",{d:"M11 5L6 9H3v6h3l5 4V5Z"},null,-1)),i.value?(H(),K(Be,{key:0},[N[2]||(N[2]=v("path",{d:"M15 9l4 6"},null,-1)),N[3]||(N[3]=v("path",{d:"M19 9l-4 6"},null,-1))],64)):(H(),K(Be,{key:1},[N[4]||(N[4]=v("path",{d:"M15 10a3 3 0 0 1 0 4"},null,-1)),N[5]||(N[5]=v("path",{d:"M17.5 7.5a6 6 0 0 1 0 9"},null,-1))],64))]))],10,Mp)])):Ge("",!0)]))])):(H(),K("div",{key:2,class:"w-fit max-w-[85%] whitespace-pre-line rounded-[13px_13px_3px_13px] bg-linear-to-br from-brand-500 to-brand-600 px-4 py-3 text-[11px] leading-relaxed wrap-anywhere text-white shadow-[0_14px_30px_-18px_rgba(109,79,194,0.85)] max-[600px]:max-w-[88%]",innerHTML:Y.value},null,8,$p))],2))}},Np={class:"flex flex-col gap-4 sm:gap-5"},Dp={class:"motion-safe:animate-fade-rise flex w-full items-start gap-1.5"},Fp={__name:"ChatTab",props:{messages:{type:Array,required:!0},autoReadEnabled:{type:Boolean,default:!1},ttsConfig:{type:Object,required:!0}},setup(e){return(t,n)=>(H(),K("div",Np,[v("div",Dp,[Oe(Zo),n[0]||(n[0]=v("p",{class:"w-fit max-w-[calc(100%-2.5rem)] whitespace-pre-line rounded-[10px_10px_10px_3px] bg-brand-50 px-4 py-3 text-xs leading-relaxed wrap-anywhere text-slate-900 max-[600px]:max-w-[calc(100%-2.25rem)]"},[Ms(" Hello there ๐Ÿ‘‹ I am ChangAI from "),v("a",{target:"_blank",href:"https://erpgulf.com",rel:"noopener noreferrer",style:{color:"#1e90ff"}},"ERPGulf.com"),Ms(", your ERP assistant."),v("br"),v("a",{target:"_blank",href:"https://app.erpgulf.com/en/articles/chang-ai-quick-start-guide",rel:"noopener noreferrer",style:{color:"#1e90ff"}},"ChangAI Quick Start Guide - Click here.")],-1))]),(H(!0),K(Be,null,Rs(e.messages,(s,r)=>(H(),_t(Ll,{key:r,message:s,autoReadEnabled:e.autoReadEnabled,ttsConfig:e.ttsConfig},null,8,["message","autoReadEnabled","ttsConfig"]))),128))]))}};function $l(e){try{return JSON.stringify(e,null,2)}catch(t){return console.warn("safeStringify failed:",t),String(e)}}function Bp(e){const t=document.createElement("div");return t.innerHTML=String(e),(t.textContent||t.innerText||"").trim()}function Hp(e){if(!(e!=null&&e._server_messages))return"";try{return JSON.parse(e._server_messages).map(t=>{try{return JSON.parse(t).message||""}catch{return t}}).map(Bp).filter(Boolean).join(` +`)}catch{return""}}function Nl(e){if(!e)return"No response from the server.";const t=e.responseJSON||(e._server_messages||e.exception?e:null),n=Hp(t);return n||(t!=null&&t.exception?String(t.exception).split(` +`)[0]:"")||e.message||(t==null?void 0:t.message)||(e.status?`HTTP ${e.status} ${e.statusText||""}`.trim():"")||String(e)}function zp(e){return typeof e=="string"?e:e&&typeof e=="object"?e.error?`โš ๏ธ ${e.error}`:e.answer||e.text||"":""}const Up={key:0,class:"rounded-lg bg-brand-50 px-4 py-3 text-xs text-black"},jp={class:"whitespace-pre-wrap wrap-anywhere text-[11px] leading-relaxed text-black"},Vp={key:1,class:"mb-3 min-w-0 overflow-x-auto rounded-lg bg-brand-50 p-2 text-[11px]"},qp={class:"whitespace-pre-wrap wrap-anywhere text-[11px] leading-relaxed text-black"},Wp={__name:"DebugTab",props:{logs:{type:Array,required:!0},currentDebug:{type:Object,default:null}},setup(e){const t=new Set(["gemini_json_content","private_key","private_key_id","client_secret","client_id","aws_access_key","aws_secret_key","api_key","token","access_token","refresh_token","password","secret","authorization","embed_version_id","llm_version_id","entity_retriever","retriever","deploy_url","support_api_url","get_ticket_details_url"]);function n(r,i=0){if(i>10||r===null||r===void 0||typeof r=="string"||typeof r=="number"||typeof r=="boolean")return r;if(Array.isArray(r))return r.map(o=>n(o,i+1));if(typeof r=="object"){const o={};for(const[a,l]of Object.entries(r))t.has(a.toLowerCase())||(o[a]=n(l,i+1));return o}return r}function s(r){return $l(n(r))}return(r,i)=>(H(),K("div",null,[e.logs.length===0?(H(),K("p",Up,"No debug data yet.")):Ge("",!0),(H(!0),K(Be,null,Rs(e.logs,(o,a)=>(H(),K("div",{key:a,class:"mb-3 min-w-0 overflow-x-auto rounded-lg bg-gray-100 p-2 text-[11px]"},[v("pre",jp,nt(s(o)),1)]))),128)),e.currentDebug?(H(),K("div",Vp,[v("pre",qp,nt(s(e.currentDebug)),1)])):Ge("",!0)]))}},Gp={class:"flex flex-col gap-4 sm:gap-5"},Kp={key:0,class:"chat-card motion-safe:animate-fade-rise rounded-lg px-4 py-3 text-xs text-slate-900"},Yp={__name:"SupportTab",props:{messages:{type:Array,required:!0},autoReadEnabled:{type:Boolean,default:!1},ttsConfig:{type:Object,required:!0}},setup(e){return(t,n)=>(H(),K("div",Gp,[e.messages.length===0?(H(),K("p",Kp,"Send a message to Support.")):Ge("",!0),(H(!0),K(Be,null,Rs(e.messages,(s,r)=>(H(),_t(Ll,{key:r,message:s,autoReadEnabled:e.autoReadEnabled,ttsConfig:e.ttsConfig},null,8,["message","autoReadEnabled","ttsConfig"]))),128))]))}},Zp={class:"flex flex-col gap-4"},Xp={class:"chat-card motion-safe:animate-fade-rise rounded-xl p-4"},Jp={class:"flex items-start justify-between gap-4"},Qp=["aria-pressed","title"],ed={class:"chat-card motion-safe:animate-fade-rise rounded-xl p-4"},td={class:"flex items-start justify-between gap-4"},nd={class:"mt-2 text-[11px] text-slate-500"},sd={key:0,class:"mt-1 text-[11px] text-slate-500"},rd={key:1,class:"mt-1 text-[11px] text-slate-500"},id=["aria-pressed","disabled"],od={key:0,class:"mt-3 rounded-md bg-amber-50 px-2.5 py-2 text-xs text-amber-700"},ld={key:1,class:"mt-3 rounded-md bg-amber-50 px-2.5 py-2 text-xs text-amber-700"},ad={class:"chat-card motion-safe:animate-fade-rise rounded-xl p-4"},ud={class:"flex items-start justify-between gap-4"},cd=["aria-pressed","title"],fd={class:"chat-card motion-safe:animate-fade-rise rounded-xl p-4"},pd={class:"flex items-start justify-between gap-4"},dd=["aria-pressed","title"],hd={__name:"SettingsTab",props:{autoReadEnabled:{type:Boolean,required:!0},ttsConfig:{type:Object,required:!0},settings:{type:Object,default:null},debugEnabled:{type:Boolean,default:!1},sendNonERPtoaiEnabled:{type:Boolean,default:!1}},emits:["toggleAutoRead","togglePollyPreference","toggleDebug","toggleSendNonERP"],setup(e){const t=e,n=ke(()=>{var s,r;return(s=t.ttsConfig)!=null&&s.enableVoiceChat?(r=t.ttsConfig)!=null&&r.pollyAvailable?"Available":"Unavailable":"Voice disabled on server"});return(s,r)=>{var i,o,a,l,f,u,h,g,w,A,_,F,b,U,Z;return H(),K("div",Zp,[r[10]||(r[10]=v("div",{class:"chat-card motion-safe:animate-fade-rise rounded-xl p-4 text-slate-900"},[v("h3",{class:"text-sm font-semibold tracking-[0.01em]"},"Speech Settings"),v("p",{class:"mt-1 text-xs leading-relaxed text-slate-600"},"These controls apply only inside this chatbot box for the current browser session.")],-1)),v("div",Xp,[v("div",Jp,[r[4]||(r[4]=v("div",null,[v("p",{class:"text-sm font-semibold text-slate-900"},"Auto Read Replies"),v("p",{class:"mt-1 text-xs text-slate-600"},"Automatically read bot replies aloud.")],-1)),v("button",{class:we(["group relative h-7 w-12 shrink-0 rounded-full border border-slate-200 transition-all duration-200",e.autoReadEnabled?"bg-emerald-500/95":"bg-slate-300"]),"aria-pressed":e.autoReadEnabled?"true":"false",title:e.autoReadEnabled?"Disable auto read":"Enable auto read",onClick:r[0]||(r[0]=$=>s.$emit("toggleAutoRead"))},[v("span",{class:we(["absolute top-0.5 h-5.5 w-5.5 rounded-full bg-white shadow-sm transition-all duration-200",e.autoReadEnabled?"left-[1.45rem]":"left-0.5"])},null,2)],10,Qp)]),v("p",{class:we(["mt-3 text-[11px] font-medium",e.autoReadEnabled?"text-emerald-700":"text-slate-500"])},nt(e.autoReadEnabled?"Auto read is active.":"Auto read is currently off."),3)]),v("div",ed,[v("div",td,[v("div",null,[r[5]||(r[5]=v("p",{class:"text-sm font-semibold text-slate-900"},"Use Amazon Polly",-1)),r[6]||(r[6]=v("p",{class:"mt-1 text-xs text-slate-600"},"Use Polly when available; otherwise browser speech is used automatically.",-1)),v("p",nd,"Availability: "+nt(n.value),1),(i=e.settings)!=null&&i.aws_region?(H(),K("p",sd,"Region: "+nt(e.settings.aws_region),1)):Ge("",!0),(o=e.ttsConfig)!=null&&o.voiceId?(H(),K("p",rd,"Voice: "+nt(e.ttsConfig.voiceId),1)):Ge("",!0)]),v("button",{class:we(["relative h-7 w-12 shrink-0 rounded-full border border-slate-200 transition-all duration-200 disabled:cursor-not-allowed disabled:opacity-55",(a=e.ttsConfig)!=null&&a.usePolly&&((l=e.ttsConfig)!=null&&l.enableVoiceChat)&&((f=e.ttsConfig)!=null&&f.pollyAvailable)?"bg-emerald-500/95":"bg-slate-300"]),"aria-pressed":(u=e.ttsConfig)!=null&&u.usePolly&&((h=e.ttsConfig)!=null&&h.enableVoiceChat)&&((g=e.ttsConfig)!=null&&g.pollyAvailable)?"true":"false",disabled:!((w=e.ttsConfig)!=null&&w.pollyAvailable)||!((A=e.ttsConfig)!=null&&A.enableVoiceChat),onClick:r[1]||(r[1]=$=>s.$emit("togglePollyPreference"))},[v("span",{class:we(["absolute top-0.5 h-5.5 w-5.5 rounded-full bg-white shadow-sm transition-all duration-200",(_=e.ttsConfig)!=null&&_.usePolly&&((F=e.ttsConfig)!=null&&F.enableVoiceChat)&&((b=e.ttsConfig)!=null&&b.pollyAvailable)?"left-[1.45rem]":"left-0.5"])},null,2)],10,id)]),(U=e.ttsConfig)!=null&&U.enableVoiceChat?(Z=e.ttsConfig)!=null&&Z.pollyAvailable?Ge("",!0):(H(),K("p",ld,"Polly is not available for this site. Browser speech will be used.")):(H(),K("p",od,"Voice chat is disabled in ChangAI Settings."))]),v("div",ad,[v("div",ud,[v("div",null,[r[7]||(r[7]=v("p",{class:"text-sm font-semibold text-slate-900"},"Enable Debug Tab",-1)),r[8]||(r[8]=v("p",{class:"mt-1 text-xs text-slate-600"}," Show or hide the Debug tab inside this chatbot. ",-1)),v("p",{class:we(["mt-2 text-[11px] font-medium",e.debugEnabled?"text-emerald-700":"text-slate-500"])},nt(e.debugEnabled?"Debug tab is active.":"Debug tab is currently off."),3)]),v("button",{type:"button",class:we(["relative h-7 w-12 shrink-0 rounded-full border border-slate-200 transition-all duration-200",e.debugEnabled?"bg-emerald-500/95":"bg-slate-300"]),"aria-pressed":e.debugEnabled?"true":"false",title:e.debugEnabled?"Disable debug tab":"Enable debug tab",onClick:r[2]||(r[2]=$=>s.$emit("toggleDebug"))},[v("span",{class:we(["absolute top-0.5 h-5.5 w-5.5 rounded-full bg-white shadow-sm transition-all duration-200",e.debugEnabled?"left-[1.45rem]":"left-0.5"])},null,2)],10,cd)])]),v("div",fd,[v("div",pd,[r[9]||(r[9]=v("div",null,[v("p",{class:"text-sm font-semibold text-slate-900"},"Send non-ERP questions directly to AI"),v("p",{class:"mt-1 text-xs text-slate-600"},"Questions unrelated to your ERP will skip the system and go straight to AI")],-1)),v("button",{class:we(["group relative h-7 w-12 shrink-0 rounded-full border border-slate-200 transition-all duration-200",e.sendNonERPtoaiEnabled?"bg-emerald-500/95":"bg-slate-300"]),"aria-pressed":e.sendNonERPtoaiEnabled?"true":"false",title:e.sendNonERPtoaiEnabled?"Non-ERP questions are being sent directly to AI":"Enable direct AI reply for non-ERP questions",onClick:r[3]||(r[3]=$=>s.$emit("toggleSendNonERP"))},[v("span",{class:we(["absolute top-0.5 h-5.5 w-5.5 rounded-full bg-white shadow-sm transition-all duration-200",e.sendNonERPtoaiEnabled?"left-[1.45rem]":"left-0.5"])},null,2)],10,dd)]),v("p",{class:we(["mt-3 text-[11px] font-medium",e.sendNonERPtoaiEnabled?"text-emerald-700":"text-slate-500"])},nt(e.sendNonERPtoaiEnabled?"Non-ERP questions are now routed directly to AI":"Direct AI routing is currently off"),3)])])}}},gd={key:0,class:"pointer-events-none absolute -top-14 left-0 right-0 z-20 flex justify-center px-2",role:"status","aria-live":"polite"},md={__name:"StatusToast",props:{visible:{type:Boolean,required:!0},message:{type:String,default:""},type:{type:String,default:"info"},dismissible:{type:Boolean,default:!0}},emits:["close"],setup(e){const t=e,n=ke(()=>t.type==="error"?"bg-red-50 text-red-700 ring-red-200":(t.type==="listening","bg-blue-50 text-blue-700 ring-blue-200")),s=ke(()=>t.type==="error"?"bg-red-500":t.type==="listening"?"bg-blue-500 animate-pulse":"bg-blue-500");return(r,i)=>(H(),_t(Yu,{"enter-active-class":"transition duration-200 ease-out","enter-from-class":"translate-y-1 opacity-0","enter-to-class":"translate-y-0 opacity-100","leave-active-class":"transition duration-150 ease-in","leave-from-class":"translate-y-0 opacity-100","leave-to-class":"translate-y-1 opacity-0"},{default:Ki(()=>[e.visible?(H(),K("div",gd,[v("div",{class:we(["pointer-events-auto flex max-w-[92%] items-start gap-2 rounded-lg px-3 py-2 text-xs shadow-lg ring-1",n.value])},[v("span",{class:we(["mt-0.5 h-2 w-2 shrink-0 rounded-full",s.value])},null,2),v("span",null,nt(e.message),1),e.dismissible?(H(),K("button",{key:0,type:"button",class:"ml-1 appearance-none border-0 text-current/80 transition hover:text-current focus:outline-none","aria-label":"Dismiss notification",onClick:i[0]||(i[0]=o=>r.$emit("close"))}," ร— ")):Ge("",!0)],2)])):Ge("",!0)]),_:1}))}},bd={class:"relative w-full"},xd=["placeholder","disabled"],yd=["title","aria-label","disabled"],wd={key:0,viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor","aria-hidden":"true"},vd={key:1,viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},_d={key:2,viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true",class:"animate-spin"},Td=["title","aria-label","disabled"],kd={key:0,viewBox:"0 0 24 24",width:"18",height:"18",fill:"none","aria-hidden":"true",class:"text-rose-600 motion-safe:animate-stop-button-pulse"},Sd={key:1,viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor","aria-hidden":"true"},Ed={__name:"ChatForm",props:{placeholder:{type:String,default:"Message..."},disabled:{type:Boolean,default:!1},isAwaitingResponse:{type:Boolean,default:!1}},emits:["submit","cancel"],setup(e,{expose:t,emit:n}){const s=e,r=n,i=ee(""),o=ee(null),a=ee(!1),l=ee(!1),f=ee(!1),u=ee(!1),h=ee(!1),g=ee(!1),w=ee(!1),A=ee(""),_=ee("info"),F=ee("Voice input is unavailable in this browser/context.");let b=null,U=null,Z=null;const $=ee(""),Y=ee(!1),C=ke(()=>f.value?"Requesting microphone permission...":u.value?"Starting voice input...":h.value?"Stopping voice input...":l.value?a.value?"Stop voice input":"Start voice input":"Voice input is unavailable in this browser/context"),N=ke(()=>s.isAwaitingResponse?"Stop response":"Send"),te=ke(()=>s.isAwaitingResponse?!1:s.disabled||!i.value.trim()),W=ke(()=>s.isAwaitingResponse?"bg-white border border-rose-100 shadow-[0_8px_20px_-12px_rgba(159,18,57,0.35)] hover:bg-rose-50":"bg-linear-to-br from-brand-500 to-brand-600 text-white shadow-[0_10px_24px_-16px_rgba(109,79,194,0.85)] hover:from-brand-600 hover:to-violet-700");function X(){return typeof window=="undefined"?null:window.SpeechRecognition||window.webkitSpeechRecognition||null}function ue(){var Ve;const ne=X(),M=typeof window!="undefined"?window.isSecureContext:!1,pe=typeof navigator!="undefined"&&!!((Ve=navigator.mediaDevices)!=null&&Ve.getUserMedia);l.value=!!(ne&&M&&pe),M?(!pe||!ne)&&(F.value="Voice input is not supported in this browser."):F.value="Voice input requires HTTPS (or localhost).",ne&&l.value&&(b=new ne,b.continuous=!0,b.interimResults=!0,b.lang=typeof navigator!="undefined"&&navigator.language||"en-US",b.onstart=()=>{a.value=!0,u.value=!1,h.value=!1,B(),R("Listening... Tap mic to stop","listening",{persistent:!0,key:"listening"})},b.onend=()=>{a.value=!1,u.value=!1,h.value=!1,B(),$.value==="listening"&&ye(),Y.value&&(Y.value=!1,$e())},b.onerror=Te=>{if(a.value=!1,u.value=!1,h.value=!1,B(),Y.value=!1,(Te==null?void 0:Te.error)==="not-allowed"||(Te==null?void 0:Te.error)==="service-not-allowed"){R("Microphone permission denied. Please allow microphone access in browser settings.","error");return}if((Te==null?void 0:Te.error)==="audio-capture"){R("No microphone detected. Please connect a microphone and try again.","error");return}if((Te==null?void 0:Te.error)==="no-speech"){R("No speech detected. Try speaking a bit louder.","info");return}R("Voice input failed. Please try again.","error")},b.onresult=Te=>{let bt="";for(let Me=Te.resultIndex;Me{if(b&&!(!a.value&&!h.value))try{b.abort()}catch{h.value=!1,Y.value=!1}},1200)}}function Ae(){if(!l.value||!b){R(F.value,"error");return}if(a.value||u.value||h.value){ge({submitAfterStop:a.value});return}J()}async function je(){var ne;if(g.value)return!0;if(!((ne=navigator.mediaDevices)!=null&&ne.getUserMedia))return R("Microphone API is unavailable in this browser.","error"),!1;f.value=!0,R("Requesting microphone permission...","info",{persistent:!0,key:"requesting"});try{return(await navigator.mediaDevices.getUserMedia({audio:!0})).getTracks().forEach(pe=>pe.stop()),g.value=!0,!0}catch(M){return(M==null?void 0:M.name)==="NotAllowedError"||(M==null?void 0:M.name)==="SecurityError"?R("Microphone permission denied. Please allow it and try again.","error"):(M==null?void 0:M.name)==="NotFoundError"?R("No microphone found on this device.","error"):R("Unable to access microphone. Please check browser permissions.","error"),!1}finally{f.value=!1,$.value==="requesting"&&ye()}}async function J(){var M;if(!(!b||a.value||u.value||h.value||!await je()||!b)){Y.value=!1,(M=o.value)==null||M.focus(),u.value=!0;try{b.start()}catch(pe){u.value=!1,h.value=!1,(pe==null?void 0:pe.name)!=="InvalidStateError"&&R("Unable to start voice input. Please try again.","error")}}}function R(ne,M="info",pe={}){const{duration:Ve=4200,persistent:Te=!1,key:bt=""}=pe;A.value=ne,_.value=M,$.value=bt,w.value=!0,U&&clearTimeout(U),Te||(U=setTimeout(()=>{w.value=!1,$.value=""},Ve))}function ye(){w.value=!1,$.value="",U&&(clearTimeout(U),U=null)}function $e(){if(s.isAwaitingResponse){r("cancel");return}const ne=i.value.trim();ne&&((a.value||u.value||h.value)&&b&&ge({submitAfterStop:!1}),r("submit",ne),i.value="")}return t({focus:()=>{var ne;return(ne=o.value)==null?void 0:ne.focus()}}),Wn(()=>{ue()}),As(()=>{if(b&&(a.value||u.value||h.value)){Y.value=!1,B();try{b.abort()}catch{}}B(),ye()}),(ne,M)=>(H(),K("div",bd,[v("form",{class:"group flex min-h-11 items-center gap-2 rounded-full border border-slate-200/90 bg-white/95 px-3 shadow-[0_12px_26px_-20px_rgba(15,23,42,0.7)] transition-all duration-250 focus-within:-translate-y-0.5 focus-within:border-brand-200 focus-within:shadow-[0_18px_30px_-20px_rgba(13,110,253,0.5)] focus-within:ring-2 focus-within:ring-brand-500/25",style:{"border-radius":"9999px"},autocomplete:"off",onSubmit:ct($e,["prevent"]),onClick:M[5]||(M[5]=ct(()=>{},["stop"])),onMousedown:M[6]||(M[6]=ct(()=>{},["stop"])),onKeydown:M[7]||(M[7]=ct(()=>{},["stop"])),onKeyup:M[8]||(M[8]=ct(()=>{},["stop"]))},[Ya(v("input",{ref_key:"inputRef",ref:o,type:"text","onUpdate:modelValue":M[0]||(M[0]=pe=>i.value=pe),class:"h-11 w-full border-none bg-transparent text-sm font-medium text-slate-800 placeholder:text-slate-400 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",placeholder:e.disabled?"Waiting for response...":e.placeholder,disabled:e.disabled,required:"",onKeydown:M[1]||(M[1]=ct(()=>{},["stop"])),onKeyup:M[2]||(M[2]=ct(()=>{},["stop"])),onKeypress:M[3]||(M[3]=ct(()=>{},["stop"])),onInput:M[4]||(M[4]=ct(()=>{},["stop"]))},null,40,xd),[[mc,i.value]]),v("button",{type:"button",class:we(["grid h-8 w-8 shrink-0 appearance-none place-items-center rounded-full border border-transparent text-slate-600 transition-all duration-200 hover:-translate-y-0.5 hover:border-slate-200 hover:bg-slate-100 hover:text-slate-900 focus:outline-none disabled:cursor-not-allowed disabled:opacity-40",a.value?"border-red-200 bg-red-100 text-red-600 shadow-[0_10px_20px_-18px_rgba(220,38,38,0.9)] hover:bg-red-100 hover:text-red-600":""]),style:{"border-radius":"9999px"},title:C.value,"aria-label":C.value,disabled:e.disabled||!l.value||f.value||u.value||h.value,onClick:Ae},[a.value&&!f.value?(H(),K("svg",wd,M[9]||(M[9]=[v("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"},null,-1)]))):f.value?(H(),K("svg",_d,M[11]||(M[11]=[v("circle",{cx:"12",cy:"12",r:"9",opacity:"0.3"},null,-1),v("path",{d:"M21 12a9 9 0 0 1-9 9"},null,-1)]))):(H(),K("svg",vd,M[10]||(M[10]=[v("path",{d:"M12 3a3 3 0 0 0-3 3v6a3 3 0 0 0 6 0V6a3 3 0 0 0-3-3z"},null,-1),v("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"},null,-1),v("path",{d:"M12 19v3"},null,-1)])))],10,yd),v("button",{type:"submit",title:N.value,"aria-label":N.value,class:we(["grid h-8 w-8 shrink-0 appearance-none place-items-center rounded-full border-0 transition-all duration-200 hover:-translate-y-0.5 focus:outline-none disabled:cursor-not-allowed disabled:opacity-40",W.value]),style:{"border-radius":"9999px"},disabled:te.value},[e.isAwaitingResponse?(H(),K("svg",kd,M[12]||(M[12]=[v("circle",{cx:"12",cy:"12",r:"8",stroke:"currentColor","stroke-width":"2.1",class:"opacity-95"},null,-1),v("rect",{x:"9",y:"9",width:"6",height:"6",rx:"1.35",fill:"currentColor"},null,-1)]))):(H(),K("svg",Sd,M[13]||(M[13]=[v("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.59 5.58L20 12l-8-8-8 8z"},null,-1)])))],10,Td)],32),Oe(md,{visible:w.value,message:A.value,type:_.value,dismissible:_.value!=="listening",onClose:ye},null,8,["visible","message","type","dismissible"])]))}},Ad={class:"relative overflow-hidden bg-linear-to-br from-brand-600 via-brand-500 to-violet-400"},Rd={class:"min-w-0"},Cd={key:1,class:"border-t border-slate-200/80 bg-white/90 px-3 py-3 pb-[calc(12px+env(safe-area-inset-bottom))] backdrop-blur-sm sm:px-4 sm:py-4"},Pd=56,Id={__name:"ChatbotPopup",props:{isOpen:{type:Boolean,required:!0},activeTab:{type:String,required:!0},debugEnabled:{type:Boolean,default:!1},sendNonERPtoaiEnabled:{type:Boolean,default:!1},chatHistory:{type:Array,required:!0},debugLogs:{type:Array,required:!0},currentDebug:{type:Object,default:null},supportHistory:{type:Array,required:!0},autoReadEnabled:{type:Boolean,required:!0},ttsConfig:{type:Object,required:!0},activeTtsProvider:{type:String,required:!0},settings:{type:Object,default:null},isAwaitingChatResponse:{type:Boolean,default:!1},isAwaitingSupportResponse:{type:Boolean,default:!1}},emits:["close","submit","cancelResponse","update:activeTab","toggleAutoRead","togglePollyPreference","toggleDebug","toggleSendNonERP"],setup(e,{expose:t,emit:n}){const s=e,r=n,i=ee(null),o=ee(null),a=ee(s.activeTab),l=ee("default"),f=ee(!1),u=ke(()=>a.value==="support"?s.isAwaitingSupportResponse:a.value==="chat"?s.isAwaitingChatResponse:!1);function h(){const F=i.value;if(!s.isOpen||!F){f.value=!1;return}const b=F.scrollHeight-F.clientHeight;if(b<=4){f.value=!1;return}const U=b-F.scrollTop;f.value=U>Pd}function g(){const F=i.value;F&&(F.scrollTo({top:F.scrollHeight,behavior:"smooth"}),setTimeout(()=>{h()},220))}function w(){vt(()=>{h()})}function A(){if(l.value==="default"){l.value="half";return}if(l.value==="half"){l.value="full";return}l.value="default"}const _=ke(()=>{const F="chat-shell fixed z-[9999] flex min-h-0 flex-col overflow-hidden border border-slate-200/80 shadow-[0_32px_80px_-44px_rgba(2,6,23,0.7),0_18px_40px_-24px_rgba(15,23,42,0.45)] transition-all duration-300 ease-out origin-bottom-right",b=s.isOpen?"pointer-events-auto opacity-100 translate-x-0 translate-y-0 scale-100 motion-safe:animate-surface-in":"pointer-events-none opacity-0 translate-x-1/5 translate-y-8 scale-95";return l.value==="full"?[F,b,"inset-0 h-screen w-screen max-h-screen max-w-screen rounded-none origin-center"]:l.value==="half"?[F,b,"bottom-[74px] right-5 h-[min(86vh,860px)] w-[min(50vw,860px)] rounded-2xl","max-[900px]:bottom-[78px] max-[900px]:right-3 max-[900px]:h-[min(86vh,760px)] max-[900px]:w-[min(70vw,760px)] max-[900px]:rounded-[14px]","max-[600px]:inset-0 max-[600px]:h-screen max-[600px]:w-screen max-[600px]:max-h-screen max-[600px]:max-w-screen max-[600px]:rounded-none max-[600px]:pb-[env(safe-area-inset-bottom)]"]:[F,b,"bottom-[74px] right-5 h-[min(560px,72vh)] w-[min(360px,calc(100vw-40px))] rounded-2xl","max-[900px]:bottom-[78px] max-[900px]:right-3 max-[900px]:h-[min(70vh,540px)] max-[900px]:w-[min(360px,calc(100vw-24px))] max-[900px]:rounded-[14px]","max-[600px]:inset-0 max-[600px]:h-screen max-[600px]:w-screen max-[600px]:max-h-screen max-[600px]:max-w-screen max-[600px]:rounded-none max-[600px]:pb-[env(safe-area-inset-bottom)]"]});return cn(()=>s.activeTab,F=>{a.value=F,w()}),cn(()=>s.isOpen,F=>{F&&a.value!=="settings"&&vt(()=>{var b;return(b=o.value)==null?void 0:b.focus()}),w()}),cn(a,F=>{r("update:activeTab",F),w()}),cn(()=>[s.chatHistory.length,s.supportHistory.length,s.debugLogs.length,s.currentDebug],()=>{w()}),cn(()=>s.debugEnabled,F=>{!F&&a.value==="debug"&&(a.value="chat"),w()}),Wn(()=>{w()}),t({scrollToBottom(){vt(()=>{g()})}}),(F,b)=>(H(),K("div",{class:we(_.value),onKeydown:b[9]||(b[9]=ct(()=>{},["stop"])),onKeyup:b[10]||(b[10]=ct(()=>{},["stop"])),onKeypress:b[11]||(b[11]=ct(()=>{},["stop"]))},[b[14]||(b[14]=v("div",{class:"pointer-events-none absolute -right-14 -top-14 h-36 w-36 rounded-full bg-brand-500/15 blur-2xl"},null,-1)),b[15]||(b[15]=v("div",{class:"pointer-events-none absolute -bottom-14 -left-12 h-32 w-32 rounded-full bg-violet-400/15 blur-2xl"},null,-1)),v("div",Ad,[b[12]||(b[12]=v("div",{class:"pointer-events-none absolute inset-0 opacity-45",style:{background:"linear-gradient(120deg, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0.02) 52%, rgba(255,255,255,0.12) 100%)"}},null,-1)),Oe(Hc,{windowMode:l.value,autoReadEnabled:e.autoReadEnabled,activeTtsProvider:e.activeTtsProvider,onClose:b[0]||(b[0]=U=>F.$emit("close")),onCycleResize:A,onToggleAutoRead:b[1]||(b[1]=U=>F.$emit("toggleAutoRead"))},null,8,["windowMode","autoReadEnabled","activeTtsProvider"]),Oe(Vc,{modelValue:a.value,"onUpdate:modelValue":b[2]||(b[2]=U=>a.value=U),debugEnabled:e.debugEnabled},null,8,["modelValue","debugEnabled"])]),v("div",{class:"chat-scrollbar min-h-0 flex-1 overflow-x-hidden overflow-y-scroll bg-slate-50/60 px-4 py-4 max-[900px]:px-3.5 max-[900px]:py-3.5 max-[600px]:px-3 max-[600px]:py-3",ref_key:"chatBodyRef",ref:i,onScrollPassive:h},[v("div",Rd,[a.value==="chat"?(H(),_t(Fp,{key:0,messages:e.chatHistory,autoReadEnabled:e.autoReadEnabled,ttsConfig:e.ttsConfig},null,8,["messages","autoReadEnabled","ttsConfig"])):a.value==="debug"&&e.debugEnabled?(H(),_t(Wp,{key:1,logs:e.debugLogs,currentDebug:e.currentDebug},null,8,["logs","currentDebug"])):a.value==="support"?(H(),_t(Yp,{key:2,messages:e.supportHistory,autoReadEnabled:e.autoReadEnabled,ttsConfig:e.ttsConfig},null,8,["messages","autoReadEnabled","ttsConfig"])):a.value==="settings"?(H(),_t(hd,{key:3,autoReadEnabled:e.autoReadEnabled,ttsConfig:e.ttsConfig,settings:e.settings,debugEnabled:e.debugEnabled,sendNonERPtoaiEnabled:e.sendNonERPtoaiEnabled,onToggleAutoRead:b[3]||(b[3]=U=>F.$emit("toggleAutoRead")),onTogglePollyPreference:b[4]||(b[4]=U=>F.$emit("togglePollyPreference")),onToggleDebug:b[5]||(b[5]=U=>F.$emit("toggleDebug")),onToggleSendNonERP:b[6]||(b[6]=U=>F.$emit("toggleSendNonERP"))},null,8,["autoReadEnabled","ttsConfig","settings","debugEnabled","sendNonERPtoaiEnabled"])):Ge("",!0)])],544),f.value?(H(),K("button",{key:0,type:"button",class:we(["absolute right-4 z-20 grid h-9 w-9 place-items-center rounded-full border border-brand-200/70 bg-white/95 text-brand-600 shadow-[0_14px_26px_-16px_rgba(15,23,42,0.65)] transition-all duration-200 hover:-translate-y-0.5 hover:border-brand-300 hover:text-brand-700 focus:outline-none",a.value!=="settings"?"bottom-[calc(90px+env(safe-area-inset-bottom))] sm:bottom-[96px]":"bottom-4 sm:bottom-5"]),title:"Scroll to bottom","aria-label":"Scroll to bottom",onClick:g},b[13]||(b[13]=[v("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},[v("path",{d:"M7 10l5 5 5-5"})],-1)]),2)):Ge("",!0),a.value!=="settings"?(H(),K("div",Cd,[Oe(Ed,{ref_key:"chatFormRef",ref:o,placeholder:a.value==="support"?"Message Support...":"Message...",disabled:u.value,isAwaitingResponse:u.value,onSubmit:b[7]||(b[7]=U=>F.$emit("submit",U)),onCancel:b[8]||(b[8]=U=>F.$emit("cancelResponse"))},null,8,["placeholder","disabled","isAwaitingResponse"])])):Ge("",!0)],34))}},Dl="changai_chat_id",Fl="changai_polly_enabled";function Od(){let e=sessionStorage.getItem(Dl);return e||(e=`session_${Date.now()}_${crypto.randomUUID()}`,sessionStorage.setItem(Dl,e)),e}function Md(){const e=localStorage.getItem(Fl);return e===null?!0:e==="true"}function Ld(e){localStorage.setItem(Fl,String(!!e))}const $d={__name:"App",setup(e){const t=ee(!1),n=ee("chat"),s=ee([]),r=ee([]),i=ee(!1),o=ee([]),a=ee(null),l=ee("actual"),f=ee(!0),u=ee(null),h=ee(!1),g=ee(null),w=ee((()=>{try{return localStorage.getItem("sendNonERPtoaiEnabled")==="true"}catch{return!1}})()),A=ee({enableVoiceChat:!1,pollyAvailable:!1,usePolly:!0,voiceId:"Zayd",enable_changai:!1}),_=ee("off"),F=ee(null),b=ee(null),U=ke(()=>F.value!==null),Z=ke(()=>b.value!==null);function $(){if(!A.value.enableVoiceChat){_.value="off";return}_.value=A.value.usePolly?"polly":"browser"}function Y(J){var ye;const R=(ye=J==null?void 0:J.detail)==null?void 0:ye.provider;(R==="polly"||R==="browser"||R==="off")&&(_.value=R)}async function C(){var J,R,ye,$e,ne,M;if((J=window.frappe)!=null&&J.call,!(h.value||u.value)){h.value=!0;try{u.value=await Xc(l.value),A.value={enableVoiceChat:!!((R=u.value)!=null&&R.enable_voice_chat),pollyAvailable:!!((ye=u.value)!=null&&ye.polly_enabled),usePolly:!!(($e=u.value)!=null&&$e.polly_enabled)&&Md(),voiceId:((ne=u.value)==null?void 0:ne.polly_voice_id)||"Zayd",enable_changai:!!((M=u.value)!=null&&M.enable_changai)},$(),r.value.push({type:"settings",settings:u.value})}catch(pe){const Ve=Nl(pe);console.error("Settings API Error:",pe),console.error("Settings error detail:",Ve),r.value.push({type:"settings",error:Ve})}finally{h.value=!1}}}function N(){t.value=!t.value}function te(){var J;(J=a.value)==null||J.scrollToBottom()}function W(){f.value=!f.value}function X(){const J=!A.value.usePolly;A.value={...A.value,usePolly:J&&A.value.pollyAvailable},Ld(A.value.usePolly),$()}function ue(){w.value=!w.value,localStorage.setItem("sendNonERPtoaiEnabled",w.value)}async function B(J){n.value==="support"?await je(J):await ge(J)}async function ge(J){var Bt,xn;g.value=null,l.value==="actual"&&await C(),s.value.push({role:"user",text:J}),await vt(),te();const R=xs({role:"model",text:"Thinking...",cancelable:!0,isStatus:!0,statusType:"thinking"});s.value.push(R),await vt(),te();let ye=!1;const $e=j=>{var d;ye=!0;const de=Date.now(),p=((de-bt)/1e3).toFixed(2);if(bt=de,j.message){const x=`${j.message} (${p}s)`;Me.push(x),g.value=x,R.text=j.message,R.statusType="pipeline"}if(!j.done&&j.message&&(R.text=j.message,R.statusType="pipeline"),j.done){R.cancelable=!1,j.error?(R.text=`โš ๏ธ ${j.message||"Something failed"}`,R.isStatus=!1,R.statusType=null):(d=j.data)!=null&&d.answer&&(R.text=j.data.answer,R.isStatus=!1,R.statusType=null),frappe.realtime.off(Ve,$e),g.value=null;return}};let ne=!1;const M=Od(),pe=`${M}_${Date.now()}`,Ve=`debug_${pe}`;frappe.realtime.on(Ve,$e);const Te=Yc(J,M,l.value,pe,w.value);let bt=Date.now();const Me=[],Ft=setTimeout(()=>{ye||!R.isStatus||(R.text=Qo()?"Still working...":"Still working... (live progress unavailable)")},2e4);F.value=()=>{ne||(ne=!0,Te.cancel(),clearTimeout(Ft),frappe.realtime.off(Ve,$e),R.isStatus=!1,R.statusType=null,R.text="Cancelled by user.",r.value.push({type:"cancelled",user:J,steps:[...Me]}),g.value=null,R.cancelable=!1,F.value=null)};try{const j=await Te.promise;if(j!=null&&j.open_report){if(R.isStatus=!1,R.statusType=null,R.text=`Opening "${j.report_name}" report." `,r.value.push({type:"success",steps:[...Me],final_response:j,entity_raw:j.entity_raw}),g.value=null,!j.report_name){R.text="Report name extraction failed.Can you ask the same question again?";return}frappe.set_route("query-report",j.report_name,j.filters||{});return}else if(j!=null&&j.create_entity){R.isStatus=!1,R.statusType=null,R.cancelable=!1,R.text=`Opening "${j.doc}" doctype for creating a new record.`,r.value.push({type:"success",user:J,steps:[...Me],final_response:j}),g.value=null;const p=j.doc,d=j.fields_to_fill||{},x=j.child_tables||{},y=j.entity_name||"",T={Customer:{customer_name:y},Supplier:{supplier_name:y},Employee:{employee_name:y},Item:{item_code:y,item_name:y},Project:{project_name:y},Lead:{lead_name:y},Opportunity:{opportunity_name:y}},k=Object.keys(d).length>0?d:T[p]||{};frappe.route_options=k,frappe.set_route("Form",p,"new");let P=0;const I=setInterval(()=>{if(P++>50){clearInterval(I);return}cur_frm&&cur_frm.doctype===p&&cur_frm.is_new()&&(clearInterval(I),Object.entries(k).forEach(([E,S])=>{S&&cur_frm.fields_dict[E]&&(cur_frm.set_value(E,S),cur_frm.refresh_field(E))}),Object.entries(x).forEach(([E,S])=>{!Array.isArray(S)||!S.length||cur_frm.fields_dict[E]&&(S.forEach(q=>{const O=frappe.model.add_child(cur_frm.doc,E);Object.entries(q).forEach(([z,G])=>{G!=null&&G!==""&&frappe.model.set_value(O.doctype,O.name,z,G)})}),cur_frm.refresh_field(E))}))},200);return}if(j!=null&&j.stop_followup){R.isStatus=!1,R.statusType=null,R.cancelable=!1,R.text=j.message||"Youโ€™re welcome!",r.value.push({type:"stop_followup",user:J,steps:[...Me],final_response:j}),g.value=null;return}if(ne)return;R.cancelable=!1;const de=((Bt=zp(j==null?void 0:j.Bot))==null?void 0:Bt.trim())||"No response.";R.isStatus=!1,R.statusType=null,R.text=de,r.value.push({type:"success",user:J,steps:[...Me],final_response:j}),g.value=null}catch(j){if(ne)return;R.cancelable=!1,R.isStatus=!1,R.statusType=null;const de=Nl(j);if(g.value=null,r.value.push({type:"failed",user:J,steps:[...Me],error:de}),console.error("ChangAI API Error:",j),(j==null?void 0:j.code)==="CHANGAI_TIMEOUT"){let d=`โš ๏ธ No response from the server after ${Math.round(Xo/6e4)} minutes.`;Qo()||(d+=` + +Realtime (socket.io) is not connected on this site, so live progress could not be shown. Please ask your administrator to check that the socketio process is running and that the reverse proxy forwards /socket.io.`),d+=` + +If the answer appears in ChangAI Logs, the request is being held open by a proxy or gateway timeout. Please check the server/proxy timeout settings.`,R.text=d}else(j==null?void 0:j.code)==="ERR_NETWORK_CHANGED"||(xn=j==null?void 0:j.message)!=null&&xn.includes("ERR_NETWORK_CHANGED")?R.text="โš ๏ธ Network error. Please check your connection and try again.":R.text=`โš ๏ธ Something went wrong: ${de}`}finally{clearTimeout(Ft),frappe.realtime.off(Ve,$e),ne||(F.value=null)}await vt(),te()}function Ae(){var J,R;if(n.value==="support"){(J=b.value)==null||J.call(b);return}(R=F.value)==null||R.call(F)}async function je(J){o.value.push({role:"user",text:J}),await vt(),te();const R=xs({role:"model",text:"Sending to support...",isStatus:!0,statusType:"support"});o.value.push(R),await vt(),te();let ye=!1;const $e=Zc(J,l.value);b.value=()=>{ye||(ye=!0,$e.cancel(),R.isStatus=!1,R.statusType=null,R.text="Cancelled by user.",b.value=null)};try{const ne=await $e.promise;if(ye)return;R.isStatus=!1,R.statusType=null,R.text=ne?$l(ne):"Support request sent successfully."}catch(ne){if(ye)return;console.error("Support API Error:",ne),R.isStatus=!1,R.statusType=null,R.text="โš ๏ธ Failed to reach support. Please try again."}finally{ye||(b.value=null)}await vt(),te()}return Wn(()=>{typeof window!="undefined"&&window.addEventListener("changai-tts-provider",Y),l.value==="actual"&&C()}),As(()=>{typeof window!="undefined"&&window.removeEventListener("changai-tts-provider",Y)}),(J,R)=>(H(),K(Be,null,[A.value.enable_changai?(H(),_t(Ac,{key:0,isOpen:t.value,onToggle:N},null,8,["isOpen"])):Ge("",!0),Oe(Id,{ref_key:"popupRef",ref:a,isOpen:t.value,activeTab:n.value,"onUpdate:activeTab":R[0]||(R[0]=ye=>n.value=ye),chatHistory:s.value,debugLogs:r.value,currentDebug:g.value,supportHistory:o.value,autoReadEnabled:f.value,ttsConfig:A.value,activeTtsProvider:_.value,settings:u.value,isAwaitingChatResponse:U.value,isAwaitingSupportResponse:Z.value,debugEnabled:i.value,sendNonERPtoaiEnabled:w.value,onToggleDebug:R[1]||(R[1]=ye=>i.value=!i.value),onClose:R[2]||(R[2]=ye=>t.value=!1),onSubmit:B,onCancelResponse:Ae,onToggleAutoRead:W,onTogglePollyPreference:X,onToggleSendNonERP:ue},null,8,["isOpen","activeTab","chatHistory","debugLogs","currentDebug","supportHistory","autoReadEnabled","ttsConfig","activeTtsProvider","settings","isAwaitingChatResponse","isAwaitingSupportResponse","debugEnabled","sendNonERPtoaiEnabled"])],64))}};function Nd(){const e=document.querySelector('link[href*="/assets/changai/dist/changai-chatbot.css"]');if(e!=null&&e.href)return e.href;const t=Array.from(document.scripts).find(n=>{var s;return(s=n.src)==null?void 0:s.includes("/assets/changai/dist/changai-chatbot.js")});return t!=null&&t.src?t.src.replace(/changai-chatbot\.js(\?.*)?$/,"changai-chatbot.css$1"):null}function Dd(e){const t=Nd();if(!t){const n=Array.from(document.querySelectorAll("style[data-vite-dev-id]"));return n.length&&n.forEach(s=>{const r=document.createElement("style");r.dataset.changaiShadowDevStyle="1",r.textContent=s.textContent||"",e.appendChild(r)}),Promise.resolve()}return e.querySelector('link[data-changai-shadow-style="1"]')?Promise.resolve():new Promise(n=>{const s=document.createElement("link");s.rel="stylesheet",s.href=t,s.dataset.changaiShadowStyle="1",s.onload=()=>n(),s.onerror=()=>n(),e.appendChild(s),setTimeout(n,1200)})}async function Bl(){if(document.getElementById("changai-chatbot-host"))return;const e=document.createElement("div");e.id="changai-chatbot-host",document.body.appendChild(e);const t=e.attachShadow({mode:"open"});await Dd(t);const n=document.createElement("div");n.id="changai-chatbot-root",t.appendChild(n),vc($d).mount(n);function s(r){r.stopPropagation()}n.addEventListener("keydown",s),n.addEventListener("keyup",s),n.addEventListener("keypress",s)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Bl):Bl()})(); diff --git a/frontend/src/App.vue b/frontend/src/App.vue index d84ddd4..fdce9d7 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -2,7 +2,7 @@ import { ref, reactive, computed, nextTick, onMounted, onBeforeUnmount } from 'vue' import ChatbotToggler from './components/ChatbotToggler.vue' import ChatbotPopup from './components/ChatbotPopup.vue' -import { runPipelineCancelable, callSupportBotCancelable, getSettingsDetails } from './utils/frappe.js' +import { runPipelineCancelable, callSupportBotCancelable, getSettingsDetails, isRealtimeConnected, PIPELINE_TIMEOUT_MS } from './utils/frappe.js' import { getOrCreateChatId, getPollyPreference, setPollyPreference } from './utils/session.js' import { normalizeBotText, getErrorText, safeStringify } from './utils/helpers.js' const showChatbot = ref(false) @@ -129,7 +129,9 @@ async function handleChatSubmit(message) { chatHistory.value.push(thinkingMsg) await nextTick() scrollToBottom() + let receivedUpdate = false const onPipelineUpdate = (msg) => { + receivedUpdate = true const now = Date.now() const seconds = ((now - lastStepTime) / 1000).toFixed(2) lastStepTime = now @@ -173,10 +175,18 @@ if (msg.done) { const request = runPipelineCancelable(message,chatId, responseMode.value,requestId,sendNonERPtoaiEnabled.value) let lastStepTime = Date.now() const steps = [] + // Without realtime the label never changes, so tell the user we are still waiting + const slowTimer = setTimeout(() => { + if (receivedUpdate || !thinkingMsg.isStatus) return + thinkingMsg.text = isRealtimeConnected() + ? 'Still working...' + : 'Still working... (live progress unavailable)' + }, 20000) cancelPendingChatRequest.value = () => { if (cancelled) return cancelled = true request.cancel() + clearTimeout(slowTimer) frappe.realtime.off(eventName, onPipelineUpdate) thinkingMsg.isStatus = false thinkingMsg.statusType = null @@ -332,18 +342,24 @@ if (response?.stop_followup) { error: errorText, }) console.error('ChangAI API Error:', err) - if (err?.code === "ERR_NETWORK_CHANGED" || err?.message?.includes("ERR_NETWORK_CHANGED")){ - thinkingMsg.isStatus = false - thinkingMsg.statusType = null + if (err?.code === 'CHANGAI_TIMEOUT') { + const minutes = Math.round(PIPELINE_TIMEOUT_MS / 60000) + let text = `โš ๏ธ No response from the server after ${minutes} minutes.` + if (!isRealtimeConnected()) { + text += '\n\nRealtime (socket.io) is not connected on this site, so live progress could not be shown. ' + + 'Please ask your administrator to check that the socketio process is running and that the reverse proxy forwards /socket.io.' + } + text += '\n\nIf the answer appears in ChangAI Logs, the request is being held open by a proxy or gateway timeout. Please check the server/proxy timeout settings.' + thinkingMsg.text = text + } + else if (err?.code === "ERR_NETWORK_CHANGED" || err?.message?.includes("ERR_NETWORK_CHANGED")){ thinkingMsg.text = 'โš ๏ธ Network error. Please check your connection and try again.' - } else{ - thinkingMsg.isStatus = false - thinkingMsg.statusType = null - thinkingMsg.text = 'โš ๏ธ Something went wrong. Please try again.' + thinkingMsg.text = `โš ๏ธ Something went wrong: ${errorText}` } } finally { + clearTimeout(slowTimer) frappe.realtime.off(eventName, onPipelineUpdate) if (!cancelled) { cancelPendingChatRequest.value = null diff --git a/frontend/src/utils/frappe.js b/frontend/src/utils/frappe.js index cd1ff6a..f4650d1 100644 --- a/frontend/src/utils/frappe.js +++ b/frontend/src/utils/frappe.js @@ -1,4 +1,5 @@ const IS_DEV = import.meta.env.DEV +export const PIPELINE_TIMEOUT_MS = 180000 export const API = { PIPELINE: 'changai.changai.api.v2.text2sql_pipeline_v2.run_text2sql_pipeline', @@ -65,6 +66,7 @@ export function runPipelineCancelable(userQuestion, chatId, mode = 'actual', req let requestHandle = null let settled = false + let timeoutId = null const promise = new Promise((resolve, reject) => { requestHandle = window.frappe.call({ @@ -76,14 +78,28 @@ export function runPipelineCancelable(userQuestion, chatId, mode = 'actual', req sendNonErptoAI: sendNonErptoAI, }, callback(r) { + if (settled) return settled = true + clearTimeout(timeoutId) resolve(r.message) }, error(err) { + if (settled) return settled = true - reject(err) + clearTimeout(timeoutId) + reject(err ?? new Error('Request failed without a response from the server.')) }, }) + + // frappe.call never settles if the connection stays open, so give up after a while + timeoutId = setTimeout(() => { + if (settled) return + settled = true + if (requestHandle && typeof requestHandle.abort === 'function') requestHandle.abort() + const err = new Error('Request timed out') + err.code = 'CHANGAI_TIMEOUT' + reject(err) + }, PIPELINE_TIMEOUT_MS) }) const cancel = () => { @@ -91,6 +107,7 @@ export function runPipelineCancelable(userQuestion, chatId, mode = 'actual', req if (!requestHandle || typeof requestHandle.abort !== 'function') return false requestHandle.abort() settled = true + clearTimeout(timeoutId) return true } @@ -155,3 +172,7 @@ export function synthesizeTTS(text, voiceId = 'Zayd', mode = 'actual') { voice_id: voiceId, }, mode) } + +export function isRealtimeConnected() { + return Boolean(window.frappe?.realtime?.socket?.connected) +} diff --git a/frontend/src/utils/helpers.js b/frontend/src/utils/helpers.js index d15a56e..f23e130 100644 --- a/frontend/src/utils/helpers.js +++ b/frontend/src/utils/helpers.js @@ -7,12 +7,44 @@ export function safeStringify(value) { } } +function stripHtml(text) { + const div = document.createElement('div') + div.innerHTML = String(text) + return (div.textContent || div.innerText || '').trim() +} + +// frappe.throw() messages arrive JSON-encoded inside _server_messages +function getServerMessage(body) { + if (!body?._server_messages) return '' + try { + return JSON.parse(body._server_messages) + .map((m) => { + try { + const parsed = JSON.parse(m) + return parsed.message || '' + } catch { + return m + } + }) + .map(stripHtml) + .filter(Boolean) + .join('\n') + } catch { + return '' + } +} + export function getErrorText(err) { + if (!err) return 'No response from the server.' + const body = err.responseJSON || (err._server_messages || err.exception ? err : null) + const serverMessage = getServerMessage(body) + if (serverMessage) return serverMessage + const exception = body?.exception ? String(body.exception).split('\n')[0] : '' return ( - err?.message || - err?.responseJSON?.exception || - err?.responseJSON?.message || - err?.responseText || + exception || + err.message || + body?.message || + (err.status ? `HTTP ${err.status} ${err.statusText || ''}`.trim() : '') || String(err) ) } diff --git a/frontend/vite.config.js b/frontend/vite.config.js index 2127ed8..f530c73 100644 --- a/frontend/vite.config.js +++ b/frontend/vite.config.js @@ -12,7 +12,9 @@ export default defineConfig({ }, plugins: [vue(), tailwindcss()], esbuild: { - drop: ['console', 'debugger'], + // keep console.error/warn so clients can report real errors + drop: ['debugger'], + pure: ['console.log', 'console.debug', 'console.info'], }, build: { outDir: resolve(__dirname, '../changai/public/dist'),