Replaces user wallet ID with user ID
Updates the receivable entry model and related API endpoints to use the user's ID instead of the user's wallet ID. This change simplifies user identification and ensures consistency throughout the application.
This commit is contained in:
parent
2a14dd2e62
commit
eb9a3c1600
3 changed files with 5 additions and 5 deletions
|
|
@ -321,7 +321,7 @@ async def api_create_receivable_entry(
|
|||
|
||||
# Get or create user-specific receivable account
|
||||
user_receivable = await get_or_create_user_account(
|
||||
data.user_wallet, AccountType.ASSET, "Accounts Receivable"
|
||||
data.user_id, AccountType.ASSET, "Accounts Receivable"
|
||||
)
|
||||
|
||||
# Create journal entry
|
||||
|
|
@ -335,7 +335,7 @@ async def api_create_receivable_entry(
|
|||
account_id=user_receivable.id,
|
||||
debit=amount_sats,
|
||||
credit=0,
|
||||
description=f"Amount owed by user {data.user_wallet[:8]}",
|
||||
description=f"Amount owed by user {data.user_id[:8]}",
|
||||
metadata=metadata,
|
||||
),
|
||||
CreateEntryLine(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue