Ticket UUID: 26b1f1a224dcd294542c56bbb057f0ab1a5aeb7d
Title: Can't create an new bank account
Status: Fixed Type: Incident
Severity: Critical Priority: Immediate
Subsystem: Resolution: Fixed
Last Modified: 2015-03-11 00:12:16
Version Found In: 0.6.3 [release]
User Comments:
anonymous added on 2015-03-10 19:40:17:
I use to have 7 bank accounts (512A à 512G)
I destroy the 512B bank account.

Now I try to create a new bank account and I expériment the following error : 

Exception of type Exception happened !

0 - Unable to execute statement: column id is not unique
INSERT INTO compta_comptes (id, libelle, parent, plan_comptable, position)
            VALUES (:id, :libelle, :parent, :plan_comptable, :position);
{"id":"512G","libelle":"Livret","parent":"512","plan_comptable":0,"position":2}

In: /include/lib/Garradin/DB.php:215

http://les-vigilants-de-l-ouest.garradin.eu/admin/compta/banques/ajouter.php

#0 /home/garradin/garradin.eu/src/garradin/src/include/lib/Garradin/DB.php(271): Garradin\DB->simpleStatement('INSERT INTO com...', Array)
#1 /home/garradin/garradin.eu/src/garradin/src/include/lib/Garradin/Compta/Comptes.php(97): Garradin\DB->simpleInsert('compta_comptes', Array)
#2 /home/garradin/garradin.eu/src/garradin/src/include/lib/Garradin/Compta/Comptes_Bancaires.php(23): Garradin\Compta\Comptes->add(Array)
#3 /home/garradin/garradin.eu/src/garradin/src/www/admin/compta/banques/ajouter.php(30): Garradin\Compta\Comptes_Bancaires->add(Array)
#4 {main}
-------------
Garradin version: 0.6.3
Garradin manifest: 
PHP version: 5.4.36-0+deb7u3
HTTP_HOST: les-vigilants-de-l-ouest.garradin.eu
HTTP_USER_AGENT: Mozilla/5.0 (Windows NT 5.1; rv:36.0) Gecko/20100101 Firefox/36.0
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_ACCEPT_LANGUAGE: fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3
HTTP_ACCEPT_ENCODING: gzip, deflate
HTTP_DNT: 1
HTTP_COOKIE: nonag=1; PHPSESSID=0keh2vjgi2s7aec6dcohfsi7k4
HTTP_CONNECTION: keep-alive
CONTENT_TYPE: application/x-www-form-urlencoded
CONTENT_LENGTH: 144
PATH: /usr/local/bin:/usr/bin:/bin
SERVER_SIGNATURE: <address>Apache/2.2.22 (Debian) Server at les-vigilants-de-l-ouest.garradin.eu Port 80</address>

SERVER_SOFTWARE: Apache/2.2.22 (Debian)
SERVER_NAME: les-vigilants-de-l-ouest.garradin.eu
SERVER_ADDR: 5.135.163.151
SERVER_PORT: 80
REMOTE_ADDR: 85.69.113.194
DOCUMENT_ROOT: /home/garradin/garradin.eu/src/garradin/src/www
SERVER_ADMIN: [no address given]
SCRIPT_FILENAME: /home/garradin/garradin.eu/src/garradin/src/www/admin/compta/banques/ajouter.php
REMOTE_PORT: 2874
GATEWAY_INTERFACE: CGI/1.1
SERVER_PROTOCOL: HTTP/1.1
REQUEST_METHOD: POST
QUERY_STRING: 
REQUEST_URI: /admin/compta/banques/ajouter.php
SCRIPT_NAME: /admin/compta/banques/ajouter.php
PHP_SELF: /admin/compta/banques/ajouter.php
REQUEST_TIME_FLOAT: 1426016332.501
REQUEST_TIME: 1426016332

bohwaz added on 2015-03-10 23:12:16:
Corrigé  dans [39e72e6333]