Git Product home page Git Product logo

fablabkasse's People

Contributors

bdrescher avatar cod3monk avatar mcx16 avatar mgmax avatar nightvisi0n avatar patkan avatar phdoerfler avatar sedrubal avatar vale avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fablabkasse's Issues

payment via mobile app

  • dummy code for workflow
  • HTTP JSON connection: polling and fetching cart
  • make configurable, document all settings: enable, server, app-url, etc.
  • document interface to server
  • test it
  • improve exception handling:
    • server down
    • Wenn App Server nicht erreichbar, kommt keine Fehlermeldung .
      • Und beim Abbrechen hängt sich die GUI auf.
    • exit cart importing on error TODO
  • sanity checks
    • filter invalid answers TODO
    • filter broken JSONs
      • don't add products with negative prices -> WONTFIX, user could do this anyway
    • don't import non existing products
  • app-server: add API key as "password protection"
  • app-server: forbid updating already used cart ids
  • #54 app-server: use https

kassenbuch: Cent-Bruchteile in Datenbank

es dürfen bei Buchungen (und Rechnungen???) keine Cent-Bruchteile irgendwo in der DB landen

  • assertions in kassenbuch.py ergänzen, um dies zu erzwingen (Buchungen müssen ganze Cents sein!)
  • in der DB mal gucken was da so landet wenn man krumme Beträge zahlt
    sqlite3 development.sqlite3, .dump, ...

fix sphinx warnings

The sphinx build throws a few errors and warnings that should be fixed.

cd doc/
make clean html

add docstrings

Improve documentation by adding reStructuredText docstrings to everything.

flickcharm submodule uses ssh URL

  • update INSTALLING with info that a github account is needed
  • undo local changes on kassenterminal (currently uses https as workaround)

improve config system

Improve the config system by using default values.
The git repo could supply a config.defaults.ini that gets loaded first.
In a second step the config.ini is loaded over the defaults.
The benefit is that most of the entries in the config file are nothing that the user needs to change normally.

AssertionError: paid amount != current total

187,15 Minuten x 0,30€ Laserzeit subventioniert (Artikel 9000) = 56,145
Zahlen per Vertrauenskasse (oder Automat)

59€ bezahlen (d.h. Spende)
-> Crash.

Log des ursprünglichen Auftretens:

2015-07-09 18:24:19 - root - DEBUG - addOrderLine 9000 None
2015-07-09 18:24:19 - root - DEBUG - updateOrder
2015-07-09 18:24:19 - root - DEBUG - on_order_clicked 0
2015-07-09 18:24:19 - root - DEBUG - updateOrder
2015-07-09 18:24:22 - root - DEBUG - updateOrder
2015-07-09 18:24:23 - root - DEBUG - updateOrder
2015-07-09 18:24:23 - root - DEBUG - updateOrder
2015-07-09 18:24:24 - root - DEBUG - updateOrder
2015-07-09 18:24:26 - root - DEBUG - updateOrder
2015-07-09 18:24:26 - root - DEBUG - updateOrder
2015-07-09 18:24:38 - root - INFO - started payment of 56,15 € with <class 'FabLabKasse.shopping.payment_methods.AutoCashPayment'>
2015-07-09 18:24:39 - root - INFO - canPayout: 26445 with max. rest 5 / to pay: 5615 / allowed overpay: 5000
2015-07-09 18:26:07 - root - INFO - cash accept finished: total 10000
2015-07-09 18:26:16 - root - INFO - trying to pay out 4100 on device 0
2015-07-09 18:27:28 - root - INFO - trying to pay out 100 on device 1
2015-07-09 18:27:33 - root - INFO - cash payout finished: total -4100
2015-07-09 18:27:43 - root - CRITICAL - Entschuldigung, das Programm wird wegen eines Fehlers beendet. 
 Wenn dir Rückgeld entgangen ist, melde dich bei [email protected] und gebe folgende Uhrzeit an:2015-07-09 18:27:43.642163.
Traceback (most recent call last):
  File "/home/kasse/FabLabKasse/FabLabKasse/gui.py", line 550, in payup
    paymentmethod.execute_and_store()
  File "/home/kasse/FabLabKasse/FabLabKasse/shopping/payment_methods.py", line 145, in execute_and_store
    self.shopping_backend.pay_order(self)
  File "/home/kasse/FabLabKasse/FabLabKasse/shopping/backend/offline_base.py", line 336, in pay_order
    assert method.amount_paid - method.amount_returned == self.get_current_total()
AssertionError

exampleCashServer zahlt in Handkasse

Der exampleCashServer scheint in Handkasse zu buchen.
Es wird nicht in Automatenkasse gebucht. Stattdessen wird auf die Handkasse aufgebucht. @sedrubal und ich haben aber leider gerade nicht gefunden, woher das kommt.

Fenster maximiert starten

Bei der aktuellen Version vom Terminal sieht man unten den blauen
Hintergrund durch, da das Fenster nicht maximiert ist.

Show last transaction after crash?

The terminal automatically restarts on a software crash.
Would it be helpful to show the last transaction upon start?
How to detect an abnormal start (coming from a crash)?
Is there a benefit from showing this information?
Is there a risk? Basically the user cannot trust the kassenbuch at this point!

kassenbuch.py: dead code kunde.beschreibung?

import FabLabKasse.kassenbuch as k
foo = k.Kunde("hans")
print foo.beschreibung

crashes:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "FabLabKasse/kassenbuch.py", line 530, in beschreibung
    if self.rechnung:
AttributeError: Kunde instance has no attribute 'rechnung'

is kunde.beschreibung unused?

refactor existing docstrings

Refactor existing docstrings to improve documentation and conformity with sphinx. Use reStructuredText as markup

GUI: Enter (from keyboard) in search bar crashes GUI

When pressing the Enter key while the search bar is focused the application crashes. It is irrelevant whether you already entered text.
Pressing the softkey Enter does not produce the bug.
The bug is reproducible.

Clear all button

A "clear all" button would be usefull in case of somebody left the terminal with a full cart.

It could be placed next to "Pay now"/"Jetzt zahlen" but then there should be a confirmation for confused users that wanted to pay.

FAU Card Bezahlung: schönere Fehlerbehandlung

Wenn man mal zuviel Zeit hat, kann man bei der FAU Card Bezahlung eine schönere Fehlerbehandlung einbauen. Ich habs just4fun auf dem Laptop mal eingeschalten, hab aber natürlich kein Gerät, und bekomm Fehlermeldungen und die Kasse stürtzt ab. Könnte mir vorstellen, dass die Kasse auch abstürtzt, wenn es Fehler mit dem Gerät gibt.

Entschuldigung, das Programm wird wegen eines Fehlers beendet. 
 Wenn dir Rückgeld entgangen ist, melde dich bei [email protected] und gebe folgende Uhrzeit an:2015-07-02 23:12:04.543275.
Traceback (most recent call last):
  File "/home/se/documents/fablab/github/FabLabKasse/FabLabKasse/gui.py", line 548, in payup
    paymentmethod = pm_diag.getSelectedMethodInstance(self, self.shoppingBackend, total)
  File "/home/se/documents/fablab/github/FabLabKasse/FabLabKasse/UI/PaymentMethodDialogCode.py", line 53, in getSelectedMethodInstance
    return self.method(parent, shopping_backend, amount_to_pay)
TypeError: Can't instantiate abstract class FAUCardPayment with abstract methods _show_dialog

Full exception details (stack limit 50):
Traceback (most recent call last):
  File "/home/se/documents/fablab/github/FabLabKasse/FabLabKasse/gui.py", line 548, in payup
    paymentmethod = pm_diag.getSelectedMethodInstance(self, self.shoppingBackend, total)
  File "/home/se/documents/fablab/github/FabLabKasse/FabLabKasse/UI/PaymentMethodDialogCode.py", line 53, in getSelectedMethodInstance
    return self.method(parent, shopping_backend, amount_to_pay)
TypeError: Can't instantiate abstract class FAUCardPayment with abstract methods _show_dialog

Traceback (most recent call last):
  File "/home/se/documents/fablab/github/FabLabKasse/FabLabKasse/gui.py", line 548, in payup
    paymentmethod = pm_diag.getSelectedMethodInstance(self, self.shoppingBackend, total)
  File "/home/se/documents/fablab/github/FabLabKasse/FabLabKasse/UI/PaymentMethodDialogCode.py", line 53, in getSelectedMethodInstance
    return self.method(parent, shopping_backend, amount_to_pay)
TypeError: Can't instantiate abstract class FAUCardPayment with abstract methods _show_dialog
GUI exited

Improve Unit testing

The project should use unittests. For this a structure should be designed to easily test the whole project.
How should the Unittest-files be namend? Should the classes be in the same file as the program code? How to find all unit-tests in the project?

Not called unittests:

  • FabLabKasse.cashPayment.client.PaymentDevicesManager.PaymentDevicesManager#_canPayout_Unittest
  • FabLabKasse/cashPayment/server/helpers/banknote_stack_helper.py:283
  • FabLabKasse/cashPayment/server/mdbCash/mdb.py:633
  • FabLabKasse.cashPayment.server.NV11.NV11Device.ESSPDevice.Helper#unitTest
  • FabLabKasse.cashPayment.server.NV11.NV11Device.ESSPDevice.ByteStreamReader#unitTest
  • doctest in FabLabKasse/kassenbuch.py:57
  • FabLabKasse/shopping/backend/abstract.py:466
  • evaluate pythoscope
  • move unittests to extra files (tests directory or test_modulename.py in same directory)

rounding of subcent values

Currently the sum of a cart woth subcent value is cut. Is rounding better?
for example:

2.985 becomes 2.98
proposal:
2.985 becomes 2.99

Highlight relevant information on crash

The crash-window shows a lot of information. Highlight the timestamp in bold red, because it is the only piece of information that is really relevant to the processing of the complaint.

history cleanup

look at all files in the repo:

  • license and author visible
  • clearly open source
  • no 'secrets' or specifics inside, like non-public google doc URLs

As soon as this is done, we can remove the "history cleanup" items from ./TODO, do a (forced) history cleanup and make the repo public :)

ADD support for other currencies

This is relevant for use in other countries and as long as we know of no other users low priority.

  • make the hardcoded money limits configurable since other courencies might have bigger values (for example Yen)
  • maybe think of a way to test whether big values will crash the code somewhere
  • make the currency-symbol configurable

Improve search

Die Suche (in legacy_offline_kassenbuch) ist langsam und unresponsiv.

  • herausfinden, woher die Wartezeiten kommen
  • überlegen, wie das besser gemacht werden kann (Multithreading, Suche nach Wartezeit, ...)
  • Verbesserungen implementieren

oerp backend broken

see "TODO update code to match new interface definition" in code, needs to be updated to match the interfaces described in shopping.backend.abstract and tested that it more-or-less works

app-server: self-signed SSL for HTTPS

Für die Benutzung des App-Server sollte über HTTPS kommuniziert werden, siehe #17.
Das verwendete Zertifikat ist self-signed.
requests scheint die Spezifikation von konkreten Zertifikaten zu unterstützen, siehe dazu stackoverflow.

accounting (legacy kassenbuch) testing

start with a clean checkout
follow the instructions (FAU specific ones) in TODO
test the "test case matrix" combinations specified there, incl receipt printing (use tools/dummy-printserver for testing)

reward:

  • 1 cookie per bug
  • 1 mate for the first accounting-related critical bug (wrong sum stored somewhere, half cents missing on receipt etc.)

Text when paying back aborted transaction

When paying back an aborted transaction the terminal says "Im Anschluss kannst du noch eine Quittung erhalten.".
The message should only be shown when a receipt really can be printed.

refactor receipt printing

reuse the code from kassenbuch.print_receipt to write a default implementation for AbstractShoppingBackend.print_receipt that goes through the order_lines and prints a receipt from that

user interface testing

start with a clean checkout
follow the instructions in README and also the FAU specific ones in TODO
play around with the UI and make it crash
reward: 1 cookie per bug

reset view when idle long enough

If the terminal is left unattended long enough and the cart is empty, reset to the default category

No idea how to implement this easily without adding a "reset timeout" handler to every single button and object

run.py --debug broken

just prints an error message.

How can I run python -m FabLabKasse.gui together with winpdb?

GUI: wrong conversion of quantities

When entering a quantity of e.g. 100 of a product the gui will express this as 1E+2. When clicking onto the product, the quantity "1E+2" gets converted wrongly into "12".
Bug found by @vale in relation to #4

design pattern: design-by-contract + inheritance

how should this case be handled?

  • an abstract baseclass, like shopping, documents certain "contracts" that an implementation must follow
  • this should somehow be checked with assertions before and after the function call, but without copying these assertions to every implementation

pseudocode:

@abstractmethod
def foo():
    assert everything_is_nice()
    ... here comes the subclass implementation ...
    assert everything_is_still_nice()

like here:

# TODO assert amount_paid - amount_returned == self.get_current_total()

legacy_offline_kassenbuch: refactor import, show product location

  • change the storage that is used between importProdukte and legacy_offline_kassenbuch startup to something that uses Product() and Category() objects directly, stored via some serialisation
  • also fill the location field (steal related code from the openerp backend)

ADD multi-language support

In theory QT has the means to provide a multi-language interface.

  • Check how to use this
  • then translate the UI to English
  • add menu to switch language of UI during usage (for foreign guests)

legacy_offline_kassenbuch: kein Runden

Ausgangspunkt:

  • 3,79 ml Ultraschallreiniger (0,01€/ml) gekauft
  • Gesamtpreis 4ct in Kassenterminal dargestellt
  • 4ct manuell bezahlt

Verbesserung:

kassenbuch.py zeigt:

Rechnungsnr.: 6
Datum: 2015-06-23 13:50
       3.79 ml       Universalkonzentrat für Ultraschallreiniger      0.010 EUR     0.04 EUR
       0.00 Euro     Rundung                                          1.000 EUR     0.00 EUR
Summe: 0,04 EUR

Es wäre besser den Reiniger als 0.0379 EUR aufzuführen und die Rundung als 0.0021 EUR.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.