SQL functions

Added new SQL functions
- getClientByCard
- getValidReductions
- updateClient
- newReduction
- updateReduction

Fixed newClient

See in-file documentation for further details.