<!DOCTYPE html>
<html lang="de" dir="ltr" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=0.75, user-scalable=no">

    <title>Manuelle Buchung</title>
    <link rel="stylesheet" th:href="@{/css/ecom.css}"/>
</head>

<body>
<nav th:replace="fragments/header :: header">Header</nav>
<div class="sidebar-layout content-width">
    <nav></nav>
    <div>
        <h1>Manuelle Buchung</h1>
    </div>
</div>
<main class="sidebar-layout content-width">
    <nav th:replace="fragments/intern :: sidebar"></nav>
    <div class="content-width">
        <form th:action="@{/intern/accounting/addManual}" th:object="${form_vals}" method="post" class="detailgrid">
            <div class="s">
                <label for="amount">Betrag</label>
                <input type="number" step="0.01" id="amount" th:field="*{amount}" />&nbsp;EUR
            </div>
            <div class="spacer"></div>

            <div class="s">
                <fieldset>
                    <label for="source">Von Konto:</label>
                    <fieldset>
                        <input type="radio" id="s-no" th:field="*{source}" value="None" required>
                        <label for="s-no">Kein Konto</label>
                    </fieldset>
                    <fieldset>
                        <input type="radio" id="s-main" th:field="*{source}" value="Main" required>
                        <label for="s-main">Hauptkonto</label>
                    </fieldset>
                    <fieldset>
                        <input type="radio" id="s-vat" th:field="*{source}" value="Vat" required>
                        <label for="s-vat">Mehrwertsteuerkonto</label>
                    </fieldset>
                    <fieldset>
                        <input type="radio" id="s-cust" th:field="*{source}" value="Cust" required>
                        <label for="s-cust">Kundenkonto</label>
                        <input placeholder="Kunden Nr." type="text" th:field="*{sourceCustomer}" value=""/>
                    </fieldset>
                    <fieldset>
                        <input type="radio" id="s-sup" th:field="*{source}" value="Sup" required>
                        <label for="s-sup">Lieferanten Konto</label>
                        <input placeholder="Lieferanten Nr." type="text" th:field="*{sourceSupplier}" value=""/>
                    </fieldset>
                </fieldset>
            </div>

            <div class="s">
                <fieldset>
                    <label for="destination">Nach Konto:</label>
                    <fieldset>
                        <input type="radio" id="d-no" th:field="*{destination}" value="None" required>
                        <label for="d-no">Kein Konto</label>
                    </fieldset>
                    <fieldset>
                        <input type="radio" id="d-main" th:field="*{destination}" value="Main" required>
                        <label for="d-main">Hauptkonto</label>
                    </fieldset>
                    <fieldset>
                        <input type="radio" id="d-vat" th:field="*{destination}" value="Vat" required>
                        <label for="d-vat">Mehrwertsteuerkonto</label>
                    </fieldset>
                    <fieldset>
                        <input type="radio" id="d-cust" th:field="*{destination}" value="Cust" required>
                        <label for="d-cust">Kundenkonto</label>
                        <input placeholder="Kunden Nr." type="text" th:field="*{destinationCustomer}" value=""/>
                    </fieldset>
                    <fieldset>
                        <input type="radio" id="d-sup" th:field="*{destination}" value="Sup" required>
                        <label for="d-sup">Lieferanten Konto</label>
                        <input placeholder="Lieferanten Nr." type="text" th:field="*{destinationSupplier}" value=""/>
                    </fieldset>
                </fieldset>
            </div>

            <div class="m">
                <fieldset>
                    <label for="reason">Buchungsgrund:</label>
                    <fieldset>
                        <input type="radio" id="r-start" th:field="*{reason}" value="Start">
                        <label for="r-start">Startbuchung</label>
                    </fieldset>
                    <fieldset>
                        <input type="radio" id="r-manual" th:field="*{reason}" value="Manual">
                        <label for="r-manual">Manuell</label>
                        <input placeholder="Grund" class="full-width" type="text" th:field="*{reasonText}" value=""
                               required="required"/>
                    </fieldset>
                </fieldset>
            </div>

            <div class="l">
                <p>
                    Manuelle Buchungen können nicht rückgängig gemacht werden! <br/>
                    Es können jedoch Gegenbuchungen erstellt werden.
                </p>
                <button type="submit">Buchung tätigen</button>
                <button type="reset">Zurücksetzen</button>
            </div>
        </form>
    </div>
</main>
<footer th:replace="fragments/footer :: footer"></footer>
</body>

</html>
