final Choix choix = article.getChoix();
// --------- Information sur la facture et la transaction -------
final Facture facture = dossier.getFacture();
final FactureItem factureItem = dossier.getFactureItem();
final Transaction transaction = dossier.getTransaction();
// --------- Personne qui a effectué la transaction -------
final Personne personneTransaction = dossier
.getPersonneTransaction();
row.createCell((short) 3).setCellValue(
new HSSFRichTextString(choix.getDescription()));
row.createCell((short) 4).setCellValue(
new HSSFRichTextString(article.getTextFieldValue()));
if (factureItem != null)
{
HSSFUtils.createCurrencyCell(wb, row, 5, factureItem.getPrix());
prixTotalChoix += factureItem.getPrix();
}
row.createCell((short) 6).setCellValue(article.getQuantite());
qteTotalChoix += article.getQuantite();
if (personneTransaction != null)
{
row.createCell((short) 7).setCellValue(
new HSSFRichTextString(personneTransaction
.getNomPrenom()));
}
if (facture != null)
{
row.createCell((short) 8).setCellValue(facture.getId());
}
if (transaction != null)
{
row.createCell((short) 9).setCellValue(
new HSSFRichTextString(transaction.getId().toString()));
row.createCell((short) 10)
.setCellValue(
new HSSFRichTextString(transaction
.getCardHolderName()));
HSSFUtils.createDateCell(wb, row, 11, transaction
.getDateCreated());
row.createCell((short) 12).setCellValue(
new HSSFRichTextString(transaction.getDateApproved()));
}
}
createLigneTotal(wb, sheet, ++i, qteTotalChoix, prixTotalChoix);