row.createCell((short) 4).setCellValue(
new HSSFRichTextString("Date Transaction"));
for (Map.Entry<Choix, Integer> entry : mapChoixIndex.entrySet())
{
Choix choix = entry.getKey();
int indexArticle = entry.getValue().intValue()
* NB_COLONNES_ARTICLE + IND_PART_ARTICLE_INDEX;
row.createCell((short) (indexArticle + IND_QTE)).setCellValue(
new HSSFRichTextString(choix.getDescription()));
row.createCell((short) (indexArticle + IND_PRIX_UNITAIRE))
.setCellValue(
new HSSFRichTextString("Tarif"
+ (entry.getValue().intValue() + 1)));
row.createCell((short) (indexArticle + IND_PRIX_TOTAL))
.setCellValue(
new HSSFRichTextString("S.Total"
+ (entry.getValue().intValue() + 1)));
}
row.createCell((short) indexDerniereCol).setCellValue(
new HSSFRichTextString("Total"));
HSSFUtils.applyStyle(row, style);
// --------- Liste des inscrits -------
int i = 3;
List<DossierArticleParPersonne> dossiers = articleService
.generateDossiersArticleParPersonne(evenement);
for (final DossierArticleParPersonne dossier : dossiers)
{
row = sheet.createRow((short) ++i);
// --------- Informations sur la personne inscrite -------
final Personne personneInscrite = dossier.getPersonneInscrite();
final Transaction transaction = dossier.getLatestTransaction();
row.createCell((short) 0).setCellValue(personneInscrite.getId());
row.createCell((short) 1).setCellValue(
new HSSFRichTextString(personneInscrite.getNom()));
row.createCell((short) 2).setCellValue(
new HSSFRichTextString(personneInscrite.getPrenom()));
if (transaction != null)
{
row.createCell((short) 3).setCellValue(
new HSSFRichTextString(transaction.getPersonne()
.getNomPrenom()));
HSSFUtils.createDateTimeCell(wb, row, 4, transaction
.getDateCreated());
}
for (Map.Entry<Choix, Integer> entry : mapChoixIndex.entrySet())
{
Choix choix = entry.getKey();
short index = (short) (entry.getValue().intValue()
* NB_COLONNES_ARTICLE + IND_PART_ARTICLE_INDEX);
if (dossier.getQte(choix) > 0)
{
row.createCell((short) (index + IND_QTE)).setCellValue(
dossier.getQte(choix));
}
HSSFUtils.createCurrencyCell(wb, row,
index + IND_PRIX_UNITAIRE, choix.getPrix());
HSSFUtils.createCurrencyCell(wb, row, index + IND_PRIX_TOTAL,
dossier.getTotalChoix(choix));
}
HSSFUtils.createCurrencyCell(wb, row, indexDerniereCol, dossier