Logiciel Pastèque/API/DB setup
= DB setup =
 [as postgres] 
 create user U with password 'Y'; 
 create database X with owner = U template = template0; 
 grant all privileges on database X to U; 
 [as pasteque user]
 \i res/database/postgresql/schema.sql 
= Configuration postgresql for dummies =
edit "/etc/postgresql/X.Y/main/pg_hba.conf"
 local all all peer
becomes
 local all postgres peer\\
 local all all md5
For crontask of pgdump:
edit "/root/.pgpass" (root:root 600)
 localhost:5432:<user>:<db>:<password>
Escape any : char with \:
= Account creation =
Use this snippet to generate passwords
 <html dir="ltr" lang="en-US">
 <head>
 <meta charset="UTF-8" />
 <title>password_hash</title>
 <style type="text/css">
 </style>
 </head>
 <body>
 Password hash generator
 Your <user>_id.ini file
 Server source code
 This is the php code running this page and filling the <user>_id.ini block.
 Standalone script
 Call with php-cli, enter the password twice, outputs the hash. Usage:

<body>
 </html>
Put the output into codice_1 and create an codice_2 file following this scheme
 type = postgresql
 host = localhost
 port = 5432
 name = "pg_user"
 user = "pg_db"
 password = "pg_pwd"
Obviously, you need to change codice_3, codice_4 and codice_5 parameters. You can either use codice_6 but it's not recommanded (in this case, obviously you need to change codice_7 to 3306)

Logiciel Pastèque/API/DB Fix for 8-alpha

= SQL fix for API 8.0 before alpha 6 =
API 8.0 alpha 1 to 5 have an error in the model declaration for Customer which implies a missing field in database. While the update requires to run an sql script, the barcode field from products has also been fixed to be not nullable, with the default empty string value from code for consistency with all the other string fields.
To update from any of those versions to alpha 6 or later, please update all the existing databases with the following scripts. Any database initialized with alpha 6 or later already includes these fixes.
For Postgresql:
 -- Postgresql fix
 ALTER TABLE customers ADD tariffarea_id INT DEFAULT NULL;
 ALTER TABLE customers ADD CONSTRAINT FK_62534E2154EC7A8F FOREIGN KEY (tariffarea_id) REFERENCES tariffareas (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
 CREATE INDEX IDX_62534E2154EC7A8F ON customers (tariffarea_id);
 UPDATE products set barcode = " where barcode is null;
 ALTER TABLE products ALTER barcode SET NOT NULL;
For Mysql/MariaDB:
 -- Mysql fix
 ALTER TABLE customers ADD tariffarea_id INT DEFAULT NULL;
 ALTER TABLE customers ADD CONSTRAINT FK_62534E2154EC7A8F FOREIGN KEY (tariffarea_id) REFERENCES tariffareas (id);
 CREATE INDEX IDX_62534E2154EC7A8F ON customers (tariffarea_id);
 UPDATE products SET barcode = " WHERE barcode IS NULL; 
 ALTER TABLE products CHANGE barcode barcode VARCHAR(255) NOT NULL;

Logiciel Pastèque/Desktop/Raccourcis clavier

Raccourcis généraux.
Ces raccourcis sont disponible pour quasiment tous les écrans.
Raccourcis de l'écran de ventes.
Utilisation du pavé numérique.
Le pavé numérique permet de saisir la quantité à inscrire dans la commande. Saisissez la quantité souhaitée puis cliquer sur produit pour l'ajouter. Pour un retour, tapez codice_25 puis la quantité retournée.
Pour rechercher un produit par code barre à la main, tapez celui-ci avec le pavé numérique puis cliquez sur le bouton codice_10 (ou entrée).
Pour saisir la quantité d'un produit par code barre tapez la quantité désirée suivie de codice_27 puis scannez votre code barre. Pour une saisie manuelle tapez la quantité suivie de codice_27 puis du code barre et appuyez sur le bouton codice_10.