Skip to content

fix: parse doc.creation to datetime in calculate_and_set_times#116

Open
expert369 wants to merge 2 commits into
ury-erp:developfrom
expert369:fix/pos-invoice-creation-datetime-typeerror
Open

fix: parse doc.creation to datetime in calculate_and_set_times#116
expert369 wants to merge 2 commits into
ury-erp:developfrom
expert369:fix/pos-invoice-creation-datetime-typeerror

Conversation

@expert369

Copy link
Copy Markdown

Fixes (https://github.com/ury-erp/ury/issues/102)

🐛 Problem

doc.creation was being passed as a string from the form/API layer, which caused a TypeError when used in time calculations inside calculate_and_set_times.

🔧 Solution

This update ensures doc.creation is parsed into a proper datetime object using datetime.strptime() before any arithmetic operations are performed.

✔️ Result

Time calculations now execute correctly without errors, preventing failures during POS Invoice submission.

expert369 and others added 2 commits May 13, 2026 11:19
Prevent TypeError when doc.creation is a string from API/form layer
by converting it to datetime before time calculations.
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.

1 participant