Skip to content

fix(pos_profile): import cint for allow_credit_sale resolution - #373

Merged
engahmed1190 merged 1 commit into
developfrom
fix/pos-profile-cint-import
Sep 9, 2026
Merged

fix(pos_profile): import cint for allow_credit_sale resolution#373
engahmed1190 merged 1 commit into
developfrom
fix/pos-profile-cint-import

Conversation

@MohamedAliSmk

Copy link
Copy Markdown
Collaborator

Summary

  • Adds the missing from frappe.utils import cint in pos_next/api/pos_profile.py.
  • get_receivable_accounts already calls cint(...) at the allow_credit_sale gate; without the import this is a live NameError on develop.

Why its own PR

Split out of #318's a4f6ffd ruff sweep so this is reviewable as a real bug fix, not formatting. The rest of that sweep was dropped from #318 (N3).

Test plan

  • Import pos_next.api.pos_profile under site context (loads clean)
  • Call get_receivable_accounts for a profile with POS Settings / credit sale enabled — no NameError
  • Same call with credit sale disabled — returns [] as before

Made with Cursor

get_receivable_accounts calls cint() without importing it, which raises
NameError on develop when credit-sale gating runs. This is a real bug fix
(F821), not formatting — keep it reviewable on its own.

Co-authored-by: Cursor <cursoragent@cursor.com>
@MohamedAliSmk MohamedAliSmk mentioned this pull request Sep 9, 2026
4 tasks
@engahmed1190
engahmed1190 merged commit 582ef7b into develop Sep 9, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants