<commit_before><% var disabled = isEditable ? '' : 'disabled' %>

<link rel="stylesheet" type="text/css" href="/bundles/sulusalesorder/css/main.min.css"/>
<link rel="stylesheet" type="text/css" href="/bundles/sulusalescore/css/main.min.css"/>
<div class="order-form-container <%= disabled %>">
<form id="order-form" class="form-horizontal">
<input type="hidden" data-mapper-property="id"/>

<div class="grid-row">

    <div class="grid-row small changeListener">
        <div class="grid-col-6">
            <div class="form-group">
                <label for="account-input" class="required"><%=translate('salesorder.orders.account')%></label>

                <div id="account-input"></div>
            </div>
        </div>
        <div class="grid-col-6">
            <div class="form-group">
                <label for="order-date-input" class="required"><%=translate('salescore.orderDate')%></label>

                <div id="order-date"
                     data-form="true"
                     data-type="husky-input"
                     data-aura-component="input@husky"
                     data-aura-disabled="<%= !isEditable %>"
                        {#data-aura-datepicker-options='{"startDate":"<%= new Date() %>"}'#}
                     data-validation-required="true"
                     data-aura-skin="date"
                     data-aura-instance-name="order-date"
                     data-aura-input-id="order-date-input"
                     data-aura-input-name="order-date"
                     data-aura-input-name="order-date"
                     data-value="<%= parseDate(new Date()) %>"
                     data-mapper-property="orderDate">
                </div>
            </div>
        </div>
    </div>

    <div class="grid-row small changeListener">
        <div class="grid-col-6">
            <div class="form-group">
                <label for="contact-select" class="required"><%=translate('salesorder.orders.contact')%></label>

                <div id="contact-select"
                     data-aura-component="select@husky"
                     data-aura-data="[]"
                     data-aura-instance-name="contact-select"
                     data-aura-value-name="fullName"
                     data-aura-multiple-select="false"
                     data-aura-default-label="<%=translate('dropdown.please-choose')%>"
                     data-aura-pre-selected-elements="[]"
                     data-aura-disabled="<%= !isEditable %>"
                     data-validation-required="true"
                     data-type="husky-select"
                     data-mapper-property="contact"
                     data-form="true"></div>
            </div>
        </div>
        <div class="grid-col-6">
            <div class="form-group">
                <label for="commission"><%=translate('salesorder.orders.commission')%></label>
                <input id="commission" class="form-element" type="text" data-mapper-property="commission"
                <%= disabled %>/>
            </div>
        </div>
    </div>

    <div class="grid-row small changeListener">
        <div class="grid-col-6">
            <div class="form-group">
                <label for="responsible-contact-select" class="required"><%=translate('salesorder.orders.responsibleContact')%></label>

                <div id="responsible-contact-select"
                     data-aura-component="select@husky"
                     data-aura-data='{{ systemUser|json_encode()|raw }}'
                     data-aura-default-label="<%=translate('public.please-choose')%>"
                     data-aura-value-name="fullName"
                     data-aura-multiple-select="false"
                     data-aura-instance-name="responsible-contact-select"
                     data-aura-disabled="<%= !isEditable %>"
                     data-type="husky-select"
                     data-mapper-property="responsibleContact"
                     data-validation-required="true"
                     data-form="true">
                </div>
            </div>
        </div>

        <div class="grid-col-6">
            <div class="form-group changeListener">
                <label for="order-number"><%=translate('salesorder.orders.number')%></label>
                <input id="order-number" class="form-element" type="text" data-mapper-property="orderNumber"
                <%= disabled %>/>
            </div>
        </div>
    </div>

    <div class="grid-row changeListener">
        <div class="grid-col-6">
            <div class="form-group">
                <label for="tax-free"><%=translate('salesorder.orders.taxFree')%></label>

                <div>
                    <div class="custom-checkbox">
                        <input class="form-element husky-validate" type="checkbox" id="tax-free"
                               data-mapper-property="taxfree" <%= disabled %>>
                        <span class="icon"></span>
                    </div>
                </div>
            </div>
        </div>

        <div class="grid-col-6">
            <div class="form-group">
                <label for="cost-centre"><%=translate('salesorder.orders.costCentre')%></label>
                <input id="cost-centre" class="form-element" type="text" data-mapper-property="costCentre"
                <%= disabled %>/>
            </div>
        </div>
    </div>

    <div class="grid-row small">
        <div class="grid-col-12">
            <div class="form-group">
                <label for="delivery-address" class="required"><%=translate('address.delivery')%></label>

                <div id="delivery-address"
                     data-aura-component="editable-data-row@sulusalescore"
                     data-form="true"
                     data-aura-view="address"
                     data-mapper-property="deliveryAddress"
                     data-validation-required="true"
                     data-aura-instance-name="delivery-address"
                     data-aura-disabled="<%= !isEditable %>"
                     data-type="editableDataRow">
                </div>
            </div>
        </div>
    </div>

    <div class="grid-row small">
        <div class="grid-col-12">
            <div class="form-group">
                <label for="billing-address" class="required"><%=translate('address.invoice')%></label>

                <div id="billing-address"
                     data-aura-component="editable-data-row@sulusalescore"
                     data-form="true"
                     data-mapper-property="invoiceAddress"
                     data-aura-view="address"
                     data-validation-required="true"
                     data-aura-instance-name="billing-address"
                     data-aura-disabled="<%= !isEditable %>"
                     data-type="editableDataRow">
                </div>
            </div>
        </div>
    </div>

    <div class="grid-row small changeListener">
        <div class="grid-col-12">
            <div class="form-group">
                <label for="delivery-terms-select"><%=translate('contact.termsOfDelivery')%></label>

                <div id="delivery-terms-row"
                     data-aura-component="editable-data-row@sulusalescore"
                     data-aura-select-data='{{ termsOfDelivery|json_encode()|raw }}'
                     data-form="true"
                     data-mapper-property="termsOfDeliveryContent"
                     data-aura-view="simple"
                     data-aura-show-plus-icon="true"
                     data-aura-instance-name="delivery-terms"
                     data-aura-disabled="<%= !isEditable %>"
                     data-type="editableDataRow">
                </div>
            </div>
        </div>
    </div>
    <div class="grid-row small changeListener">
        <div class="grid-col-12">
            <div class="form-group">
                <label for="delivery-terms-select"><%=translate('contact.termsOfPayment')%></label>

                <div id="payment-terms-row"
                     data-aura-component="editable-data-row@sulusalescore"
                     data-aura-select-data='{{ termsOfPayment|json_encode()|raw }}'
                     data-form="true"
                     data-mapper-property="termsOfPaymentContent"
                     data-aura-view="simple"
                     data-aura-show-plus-icon="true"
                     data-aura-instance-name="payment-terms"
                     data-aura-disabled="<%= !isEditable %>"
                     data-type="editableDataRow">
                </div>
            </div>
        </div>
    </div>
</div>

<h2 class="divider"><%=translate('salescore.items')%></h2>

<div class="changeListener grid-row">
    <div id="order-items"
         data-aura-component="item-table@sulusalescore"
         data-aura-editable="<%= isEditable %>"
         data-form="true"
         data-type="itemTable"
         data-mapper-property="items">
    </div>
</div>

<h2 class="divider m-top-40"><%=translate('public.details')%></h2>

<div class="grid-row small changeListener">
    <div class="grid-col-6">
        <div class="form-group"><commit_msg>changes due to changes in item-table<commit_after><% var disabled = isEditable ? '' : 'disabled' %>

<link rel="stylesheet" type="text/css" href="/bundles/sulusalesorder/css/main.min.css"/>
<link rel="stylesheet" type="text/css" href="/bundles/sulusalescore/css/main.min.css"/>
<div class="order-form-container <%= disabled %>">
<form id="order-form" class="form-horizontal">
<input type="hidden" data-mapper-property="id"/>

<div class="grid-row">

    <div class="grid-row small changeListener">
        <div class="grid-col-6">
            <div class="form-group">
                <label for="account-input" class="required"><%=translate('salesorder.orders.account')%></label>

                <div id="account-input"></div>
            </div>
        </div>
        <div class="grid-col-6">
            <div class="form-group">
                <label for="order-date-input" class="required"><%=translate('salescore.orderDate')%></label>

                <div id="order-date"
                     data-form="true"
                     data-type="husky-input"
                     data-aura-component="input@husky"
                     data-aura-disabled="<%= !isEditable %>"
                        {#data-aura-datepicker-options='{"startDate":"<%= new Date() %>"}'#}
                     data-validation-required="true"
                     data-aura-skin="date"
                     data-aura-instance-name="order-date"
                     data-aura-input-id="order-date-input"
                     data-aura-input-name="order-date"
                     data-aura-input-name="order-date"
                     data-value="<%= parseDate(new Date()) %>"
                     data-mapper-property="orderDate">
                </div>
            </div>
        </div>
    </div>

    <div class="grid-row small changeListener">
        <div class="grid-col-6">
            <div class="form-group">
                <label for="contact-select" class="required"><%=translate('salesorder.orders.contact')%></label>

                <div id="contact-select"
                     data-aura-component="select@husky"
                     data-aura-data="[]"
                     data-aura-instance-name="contact-select"
                     data-aura-value-name="fullName"
                     data-aura-multiple-select="false"
                     data-aura-default-label="<%=translate('dropdown.please-choose')%>"
                     data-aura-pre-selected-elements="[]"
                     data-aura-disabled="<%= !isEditable %>"
                     data-validation-required="true"
                     data-type="husky-select"
                     data-mapper-property="contact"
                     data-form="true"></div>
            </div>
        </div>
        <div class="grid-col-6">
            <div class="form-group">
                <label for="commission"><%=translate('salesorder.orders.commission')%></label>
                <input id="commission" class="form-element" type="text" data-mapper-property="commission"
                <%= disabled %>/>
            </div>
        </div>
    </div>

    <div class="grid-row small changeListener">
        <div class="grid-col-6">
            <div class="form-group">
                <label for="responsible-contact-select" class="required"><%=translate('salesorder.orders.responsibleContact')%></label>

                <div id="responsible-contact-select"
                     data-aura-component="select@husky"
                     data-aura-data='{{ systemUser|json_encode()|raw }}'
                     data-aura-default-label="<%=translate('public.please-choose')%>"
                     data-aura-value-name="fullName"
                     data-aura-multiple-select="false"
                     data-aura-instance-name="responsible-contact-select"
                     data-aura-disabled="<%= !isEditable %>"
                     data-type="husky-select"
                     data-mapper-property="responsibleContact"
                     data-validation-required="true"
                     data-form="true">
                </div>
            </div>
        </div>

        <div class="grid-col-6">
            <div class="form-group changeListener">
                <label for="order-number"><%=translate('salesorder.orders.number')%></label>
                <input id="order-number" class="form-element" type="text" data-mapper-property="orderNumber"
                <%= disabled %>/>
            </div>
        </div>
    </div>

    <div class="grid-row changeListener">
        <div class="grid-col-6">
            <div class="form-group">
                <label for="tax-free"><%=translate('salesorder.orders.taxFree')%></label>

                <div>
                    <div class="custom-checkbox">
                        <input class="form-element husky-validate" type="checkbox" id="tax-free"
                               data-mapper-property="taxfree" <%= disabled %>>
                        <span class="icon"></span>
                    </div>
                </div>
            </div>
        </div>

        <div class="grid-col-6">
            <div class="form-group">
                <label for="cost-centre"><%=translate('salesorder.orders.costCentre')%></label>
                <input id="cost-centre" class="form-element" type="text" data-mapper-property="costCentre"
                <%= disabled %>/>
            </div>
        </div>
    </div>

    <div class="grid-row small">
        <div class="grid-col-12">
            <div class="form-group">
                <label for="delivery-address" class="required"><%=translate('address.delivery')%></label>

                <div id="delivery-address"
                     data-aura-component="<EMAIL>core"
                     data-form="true"
                     data-aura-view="address"
                     data-mapper-property="deliveryAddress"
                     data-validation-required="true"
                     data-aura-instance-name="delivery-address"
                     data-aura-disabled="<%= !isEditable %>"
                     data-type="editableDataRow">
                </div>
            </div>
        </div>
    </div>

    <div class="grid-row small">
        <div class="grid-col-12">
            <div class="form-group">
                <label for="billing-address" class="required"><%=translate('address.invoice')%></label>

                <div id="billing-address"
                     data-aura-component="editable-data-row@sulusalescore"
                     data-form="true"
                     data-mapper-property="invoiceAddress"
                     data-aura-view="address"
                     data-validation-required="true"
                     data-aura-instance-name="billing-address"
                     data-aura-disabled="<%= !isEditable %>"
                     data-type="editableDataRow">
                </div>
            </div>
        </div>
    </div>

    <div class="grid-row small changeListener">
        <div class="grid-col-12">
            <div class="form-group">
                <label for="delivery-terms-select"><%=translate('contact.termsOfDelivery')%></label>

                <div id="delivery-terms-row"
                     data-aura-component="editable-data-row@sulusalescore"
                     data-aura-select-data='{{ termsOfDelivery|json_encode()|raw }}'
                     data-form="true"
                     data-mapper-property="termsOfDeliveryContent"
                     data-aura-view="simple"
                     data-aura-show-plus-icon="true"
                     data-aura-instance-name="delivery-terms"
                     data-aura-disabled="<%= !isEditable %>"
                     data-type="editableDataRow">
                </div>
            </div>
        </div>
    </div>
    <div class="grid-row small changeListener">
        <div class="grid-col-12">
            <div class="form-group">
                <label for="delivery-terms-select"><%=translate('contact.termsOfPayment')%></label>

                <div id="payment-terms-row"
                     data-aura-component="editable-data-row@sulusalescore"
                     data-aura-select-data='{{ termsOfPayment|json_encode()|raw }}'
                     data-form="true"
                     data-mapper-property="termsOfPaymentContent"
                     data-aura-view="simple"
                     data-aura-show-plus-icon="true"
                     data-aura-instance-name="payment-terms"
                     data-aura-disabled="<%= !isEditable %>"
                     data-type="editableDataRow">
                </div>
            </div>
        </div>
    </div>
</div>

<h2 class="divider"><%=translate('salescore.items')%></h2>

<div class="changeListener grid-row">
    <div id="order-items"
         data-aura-component="item-table@sulusalescore"
         data-aura-is-editable="<%= isEditable %>"
         data-form="true"
         data-type="itemTable"
         data-mapper-property="items">
    </div>
</div>

<h2 class="divider m-top-40"><%=translate('public.details')%></h2>

<div class="grid-row small changeListener">
    <div class="grid-col-6">
        <div class="form-group">
{'fraction_non_alphanumeric': 0.15805751492132392, 'fraction_numerical': 0.0024959305480195333, 'mean_word_length': 1.6202729599090133, 'pattern_counts': {'":': 2, '<': 332, '<?xml version=': 0, '>': 332, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3128540', 'n_tokens_mistral': 5361, 'n_tokens_neox': 4874, 'n_words': 662}