-
Notifications
You must be signed in to change notification settings - Fork 7.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: use CombineDatetime
instead of Timestamp
in QB queries
#34895
Conversation
erpnext/stock/doctype/batch/batch.py
Outdated
@@ -192,7 +192,7 @@ def get_batch_qty( | |||
posting_time = nowtime() | |||
|
|||
query = query.where( | |||
Timestamp(sle.posting_date, sle.posting_time) <= Timestamp(posting_date, posting_time) | |||
UnixTimestamp(sle.posting_date, sle.posting_time) <= UnixTimestamp(posting_date, posting_time) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CombineDatetime
is what you're looking for not unix timestamp?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ankush Is there any difference between sql timestamp
and frappe.qb UnixTimestamp
? As we are using sql timestamp
in most of the queries.
2c287f7
to
91a398a
Compare
UnixTimestamp
instead of Timestamp
in QB queriesCombineDatetime
instead of Timestamp
in QB queries
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #34895 +/- ##
========================================
Coverage 63.87% 63.87%
========================================
Files 810 810
Lines 59746 59746
========================================
+ Hits 38162 38163 +1
+ Misses 21584 21583 -1
|
…-34895 fix: use `CombineDatetime` instead of `Timestamp` in QB queries (backport #34895)
Change
Timestamp
toCombineDatetime
for queries written infrappe.qb
.