fau-fablab / FabLabKasse

FabLabKasse, a Point-of-Sale Software for FabLabs and other public and trust-based workshops
https://fablabkasse.readthedocs.io
GNU General Public License v3.0
15 stars 4 forks source link

WIP: Fix kassenbuch get_buchungen for microseconds #143

Open mgmax opened 8 years ago

mgmax commented 8 years ago

Using Datetime() in the SQLite query strips away the microseconds. SQLites cannot do datetime formatting for microseconds, even with strftime().

First workaround: Discards all microseconds when filtering for a specific time range.

Problem: This may create a race-condition if a booking is made at xxx.100 seconds and then kassenbuch show is called at xxx.200 sec, because the booking was made after xxx.000 sec and the snapshot_time mechanism filters out the booking from the "future".

codecov-io commented 8 years ago

Current coverage is 28.33% (diff: 95.83%)

Merging #143 into development will increase coverage by 0.14%

@@           development       #143   diff @@
=============================================
  Files               54         54          
  Lines             6774       6789    +15   
  Methods              0          0          
  Messages             0          0          
  Branches             0          0          
=============================================
+ Hits              1910       1924    +14   
- Misses            4864       4865     +1   
  Partials             0          0          

Powered by Codecov. Last update 2017193...00a9448