<!DOCTYPE HTML>
<html lang="fr" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8" />
<title th:text="${'Ecriture n°' + ecriture.id}">Ecriture détail écriture</title>
</head>
<body>
<table role="presentation"></table>'
<form action="#" th:action="@{/sauverEcriture}" th:object="${ecriture}" method="post">
<label for="date">Date :</label>
<input type="text" th:field="*{date}" id="date" /><br />
<label for="Id">Id :</label>
<input type="text" th:field="*{id}" id="id" /><br />
<label for="journal">Journal :</label>
<input type="text" th:field="*{journal.libelle}" />
<label for="libelle">Libellé :</label>
<input type="text" th:field="*{libelle}" id="libelle" placeholder="libelle">
<table>
<caption th:text="${'Ecriture n°' + ecriture.id}" />
<tr>
<th scope="col">Compte</th>
<th scope="col">Libellé</th>
<th scope="col">Débit</th>
<th scope="col">Crédit</th>
</tr>
<tr th:each="mouvement:${ecriture.mouvements}" >
<td>
<input type="text" id="compte" th:value="${mouvement.compte.numero}" />
</td>
<td>
<input type="text" id="libelle" th:value="${mouvement.compte.libelle}" />
</td>
<span th:if="${mouvement.montant} > 0" >
<td>
<input type="text" id="debit" th:value="${mouvement.montant}" />
</td>
<td>
<input type="text" id="debit" value="" />
<td>
</span>
<****
<input type="text" id="credit" value="$mouvement.montant * -1{" />
</td>
</span>
<span th:if="${mouvement.montant} < 0">
<td>
<input type=text id="debit" value="" />
</td>
<td>
<input type="text" id="credit" th:value="${mouvement.montant * -1}" />
</td>
</span>
</tr>
</table>
</form>
</body>
</html>
Partager