Problèmes embedForm pour gestion inventaire
Bonjour à tous,
J'ai un petit problème pour générer un formulaire et je ne vois pas trop comment faire. Je sais que j'ai des lacunes avec le Framework mais j’essaie d'avancer.
Voilà mon problème :
J'ai trois tables :
une table ARTICLES,
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
Articles:
connection: doctrine
tableName: articles
columns:
id:
type: integer(8)
fixed: false
unsigned: false
primary: true
autoincrement: true
a_mag:
type: string(50)
fixed: false
unsigned: false
primary: false
notnull: false
autoincrement: false
relations:
Magasins:
local: a_mag
foreign: m_id
type: one
ArticlesInventaire:
local: id
foreign: ai_codearticle
type: many |
une table INVENTAIRE
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
| Inventaires:
connection: doctrine
tableName: I_inventaires
columns:
id:
type: integer(8)
fixed: false
unsigned: false
primary: true
autoincrement: true
i_libelle:
type: string(255)
fixed: false
unsigned: false
primary: false
notnull: false
autoincrement: false
i_mag:
type: string(50)
fixed: false
unsigned: false
primary: false
notnull: false
autoincrement: false
i_etat:
type: string(3)
fixed: false
unsigned: false
primary: false
notnull: true
autoincrement: false
i_date:
type: string(50)
fixed: false
unsigned: false
primary: false
notnull: false
autoincrement: false
relations:
Magasins:
local: i_mag
foreign: m_id
type: one
ArticlesInventaire:
local: id
foreign: ai_inventaireid
orderBy: ai_codearticle
type: many |
et une table ARTICLE_INVENTAIRE.
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
ArticlesInventaire:
connection: doctrine
tableName: I_articlesinventaire
columns:
id:
type: integer(8)
fixed: false
unsigned: false
primary: true
autoincrement: true
ai_inventaireid:
type: integer(8)
fixed: false
unsigned: false
primary: false
notnull: true
autoincrement: false
ai_codearticle:
type: string(7)
fixed: false
unsigned: false
primary: false
notnull: true
autoincrement: false
relations:
Articles:
local: ai_codearticle
foreign: id
type: one
Inventaires:
local: ai_inventaireid
foreign: id
type: one |
Je cherche à faire une page ou je pourrais lier les articles à un inventaire en affichant la liste des articles (qui ne sont pas encore liés à l'inventaire) et en cochant simplement une checkbox pour lier les articles cochées à cet inventaire.
Je n'arrive pas à créer les formulaires adéquats pour faire ce que je souhaite et le faire proprement.
Je pense qu'il faut utiliser les formulaires imbriqués mais je ne vois pas trop comment je pourrais faire.
Mes recherches n'ont pas vraiment aboutis.
Auriez - vous quelques pistes pour moi ? Des tutos qui feraient ce que je cherche serait vraiment génial ?
Si je n'ai pas donné tout ce que vous avez besoin pour m'aider, n'hésitez pas à me demander.
J'espère que quelqu'un pourra m'aider.
En attendant, merci d'avance