Skip to content
Merged
12 changes: 11 additions & 1 deletion .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,14 @@ jobs:
pip install "erpnext @ git+https://github.com/frappe/erpnext.git@version-15"
cd ${GITHUB_WORKSPACE}
pip install --no-deps .
pip-audit --desc on
# The pyjwt advisories below live in PyJWT 2.12.1, which frappe
# version-15 hard-pins (PyJWT~=2.12.1, i.e. <2.13). They are fixed in
# 2.13.0 but pos_next cannot upgrade a dependency frappe constrains —
# this is an upstream-frappe issue, not a pos_next one. Ignore the
# specific IDs (NOT the package) so the gate still fails on any NEW
# vulnerability; revisit when frappe relaxes its PyJWT pin.
pip-audit --desc on \
--ignore-vuln PYSEC-2026-175 \
--ignore-vuln PYSEC-2026-177 \
--ignore-vuln PYSEC-2026-178 \
--ignore-vuln PYSEC-2026-179
1 change: 1 addition & 0 deletions pos_next/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def after_install():
def after_migrate():
"""Hook that runs after bench migrate"""
try:

# Reclaim POS Settings if ERPNext re-imported its Single on top of ours.
# Must run in after_migrate (not as a one-shot patch) because ERPNext's
# doctype sync runs after pos_next's and would overwrite anything we did
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"actions": [],
"creation": "2025-11-05 00:00:00.000000",
"creation": "2025-11-05 00:00:00",
"doctype": "DocType",
"engine": "InnoDB",
"field_order": [
Expand Down Expand Up @@ -29,66 +29,65 @@
"fields": [
{
"default": "1",
"description": "Branding is always enabled unless you provide the Master Key to disable it",
"fieldname": "enabled",
"fieldtype": "Check",
"in_list_view": 1,
"label": "Enabled",
"description": "Branding is always enabled unless you provide the Master Key to disable it",
"read_only": 1
},
{
"collapsible": 0,
"fieldname": "master_key_section",
"fieldtype": "Section Break",
"label": "🔐 Master Key Protection"
"label": "\ud83d\udd10 Master Key Protection"
},
{
"fieldname": "master_key_help",
"fieldtype": "HTML",
"label": "Master Key Help",
"options": "<div class=\"alert alert-warning\"><strong>🔒 Protected Configuration:</strong><br><br> To <strong>disable branding</strong>, uncheck 'Enabled' and provide the Master Key<br> To <strong>modify branding fields</strong> (text, name, URL, interval), provide the Master Key<br> Master Key format: <code>{\"key\": \"...\", \"phrase\": \"...\"}</code><br><br>⚠️ The Master Key is not stored in the system and must be kept secure.<br>📧 Contact BrainWise support if you've lost the key.</div>"
"options": "<div class=\"alert alert-warning\"><strong>\ud83d\udd12 Protected Configuration:</strong><br><br>\u2022 To <strong>disable branding</strong>, uncheck 'Enabled' and provide the Master Key<br>\u2022 To <strong>modify branding fields</strong> (text, name, URL, interval), provide the Master Key<br>\u2022 Master Key format: <code>{\"key\": \"...\", \"phrase\": \"...\"}</code><br><br>\u26a0\ufe0f The Master Key is not stored in the system and must be kept secure.<br>\ud83d\udce7 Contact BrainWise support if you've lost the key.</div>"
},
{
"description": "Required to disable branding OR modify any branding configuration fields. The key will NOT be stored after validation.",
"fieldname": "master_key_provided",
"fieldtype": "Password",
"label": "Master Key (JSON)",
"description": "Required to disable branding OR modify any branding configuration fields. The key will NOT be stored after validation."
"label": "Master Key (JSON)"
},
{
"fieldname": "section_break_branding",
"fieldtype": "Section Break",
"label": "🎨 Branding Configuration"
"label": "\ud83c\udfa8 Branding Configuration"
},
{
"fieldname": "branding_locked_notice",
"fieldtype": "HTML",
"options": "<div class=\"alert alert-info\" style=\"margin-bottom: 15px;\"><strong>🔒 These fields are protected and read-only.</strong><br>To modify them, provide the Master Key above.</div>"
"options": "<div class=\"alert alert-info\" style=\"margin-bottom: 15px;\"><strong>\ud83d\udd12 These fields are protected and read-only.</strong><br>To modify them, provide the Master Key above.</div>"
},
{
"default": "Powered by",
"fieldname": "brand_text",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Brand Text",
"reqd": 1,
"read_only": 1
"read_only": 1,
"reqd": 1
},
{
"default": "BrainWise",
"fieldname": "brand_name",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Brand Name",
"reqd": 1,
"read_only": 1
"read_only": 1,
"reqd": 1
},
{
"default": "https://nexus.brainwise.me",
"fieldname": "brand_url",
"fieldtype": "Data",
"label": "Brand URL",
"reqd": 1,
"read_only": 1
"read_only": 1,
"reqd": 1
},
{
"fieldname": "column_break_config",
Expand Down Expand Up @@ -167,7 +166,7 @@
"index_web_pages_for_search": 1,
"issingle": 1,
"links": [],
"modified": "2025-11-05 12:00:00.000000",
"modified": "2026-06-03 15:54:13.334363",
"modified_by": "Administrator",
"module": "POS Next",
"name": "BrainWise Branding",
Expand All @@ -186,13 +185,18 @@
"read": 1,
"role": "Sales Manager"
},
{
"read": 1,
"role": "Nexus POS Manager"
},
{
"read": 1,
"role": "Sales User"
}
],
"row_format": "Dynamic",
"sort_field": "modified",
"sort_order": "DESC",
"states": [],
"track_changes": 1
}
}
18 changes: 16 additions & 2 deletions pos_next/pos_next/doctype/pos_closing_shift/pos_closing_shift.json
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,11 @@
],
"is_submittable": 1,
"links": [],
"modified": "2023-06-12 03:01:49.146706",
"modified": "2026-06-03 15:54:11.316195",
"modified_by": "Administrator",
"module": "POS Next",
"name": "POS Closing Shift",
"naming_rule": "Expression (old style)",
"naming_rule": "Expression",
"owner": "Administrator",
"permissions": [
{
Expand Down Expand Up @@ -234,6 +234,19 @@
"submit": 1,
"write": 1
},
{
"cancel": 1,
"create": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Nexus POS Manager",
"share": 1,
"submit": 1,
"write": 1
},
{
"cancel": 1,
"create": 1,
Expand Down Expand Up @@ -261,6 +274,7 @@
"write": 1
}
],
"row_format": "Dynamic",
"sort_field": "modified",
"sort_order": "DESC",
"states": [],
Expand Down
29 changes: 22 additions & 7 deletions pos_next/pos_next/doctype/pos_coupon/pos_coupon.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
"used",
"one_use",
"column_break_11",
"description"
"description",
"referral_code"
],
"fields": [
{
Expand Down Expand Up @@ -110,20 +111,20 @@
"label": "ERPNext Integration"
},
{
"description": "Linked ERPNext Coupon Code for accounting integration",
"fieldname": "erpnext_coupon_code",
"fieldtype": "Link",
"label": "ERPNext Coupon Code",
"options": "Coupon Code",
"read_only": 1,
"description": "Linked ERPNext Coupon Code for accounting integration"
"read_only": 1
},
{
"description": "Auto-generated Pricing Rule for discount application",
"fieldname": "pricing_rule",
"fieldtype": "Link",
"label": "Pricing Rule",
"options": "Pricing Rule",
"read_only": 1,
"description": "Auto-generated Pricing Rule for discount application"
"read_only": 1
},
{
"fieldname": "referral_code",
Expand Down Expand Up @@ -173,10 +174,10 @@
"precision": "2"
},
{
"description": "Maximum discount that can be applied",
"fieldname": "max_amount",
"fieldtype": "Currency",
"label": "Maximum Discount Amount",
"description": "Maximum discount that can be applied",
"options": "Company:company:default_currency",
"precision": "2"
},
Expand Down Expand Up @@ -263,7 +264,7 @@
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2021-07-30 00:17:17.711972",
"modified": "2026-06-03 15:54:12.732125",
"modified_by": "Administrator",
"module": "POS Next",
"name": "POS Coupon",
Expand Down Expand Up @@ -305,6 +306,18 @@
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Nexus POS Manager",
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
Expand All @@ -319,8 +332,10 @@
}
],
"quick_entry": 1,
"row_format": "Dynamic",
"sort_field": "modified",
"sort_order": "DESC",
"states": [],
"title_field": "coupon_code",
"track_changes": 1
}
17 changes: 16 additions & 1 deletion pos_next/pos_next/doctype/pos_offer/pos_offer.json
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,8 @@
}
],
"index_web_pages_for_search": 1,
"modified": "2021-07-25 17:09:55.634113",
"links": [],
"modified": "2026-06-03 15:54:12.013952",
"modified_by": "Administrator",
"module": "POS Next",
"name": "POS Offer",
Expand Down Expand Up @@ -347,6 +348,18 @@
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Nexus POS Manager",
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
Expand Down Expand Up @@ -381,9 +394,11 @@
"write": 1
}
],
"row_format": "Dynamic",
"show_name_in_global_search": 1,
"show_preview_popup": 1,
"sort_field": "modified",
"sort_order": "DESC",
"states": [],
"track_changes": 1
}
32 changes: 23 additions & 9 deletions pos_next/pos_next/doctype/pos_opening_shift/pos_opening_shift.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,17 +121,16 @@
"read_only": 1
},
{
"allow_on_submit": 1,
"fieldname": "pos_closing_shift",
"fieldtype": "Data",
"label": "POS Closing Shift",
"read_only": 0,
"read_only_depends_on": "eval:doc.docstatus==1"
}
],
"allow_on_submit": 1,
"fieldname": "pos_closing_shift",
"fieldtype": "Data",
"label": "POS Closing Shift",
"read_only_depends_on": "eval:doc.docstatus==1"
}
],
"is_submittable": 1,
"links": [],
"modified": "2022-11-22 15:04:30.555123",
"modified": "2026-06-03 15:54:10.799263",
"modified_by": "Administrator",
"module": "POS Next",
"name": "POS Opening Shift",
Expand Down Expand Up @@ -164,6 +163,19 @@
"submit": 1,
"write": 1
},
{
"cancel": 1,
"create": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Nexus POS Manager",
"share": 1,
"submit": 1,
"write": 1
},
{
"cancel": 1,
"create": 1,
Expand Down Expand Up @@ -191,7 +203,9 @@
"write": 1
}
],
"row_format": "Dynamic",
"sort_field": "modified",
"sort_order": "DESC",
"states": [],
"track_changes": 1
}
Loading
Loading