<?xml version="1.0" encoding="UTF-8"?>
<quiqqer>
    <settings name="ERP">

        <config>
            <section name="shipping">
                <conf name="deactivated">
                    <type><![CDATA[bool]]></type>
                    <defaultvalue>0</defaultvalue>
                </conf>
                <conf name="debug">
                    <type><![CDATA[bool]]></type>
                    <defaultvalue>0</defaultvalue>
                </conf>
                <conf name="ruleFields">
                    <type><![CDATA[string]]></type>
                </conf>
                <conf name="deliveryTimeDefault">
                    <type><![CDATA[string]]></type>
                    <defaultvalue>
                        <![CDATA[{"from":"","to":"","unit":"second","option":"immediately_available"}]]></defaultvalue>
                </conf>
                <conf name="showShippingInfoAfterPrice">
                    <type><![CDATA[bool]]></type>
                    <defaultvalue>0</defaultvalue>
                </conf>

                <conf name="addDefaultShipping">
                    <type><![CDATA[bool]]></type>
                    <defaultvalue>0</defaultvalue>
                </conf>
                <conf name="defaultShippingPrice">
                    <type><![CDATA[string]]></type>
                </conf>
                <conf name="considerCustomerCountry">
                    <type><![CDATA[bool]]></type>
                    <defaultvalue>0</defaultvalue>
                </conf>
            </section>

            <section name="no_rules">
                <conf name="behavior">
                    <type><![CDATA[integer]]></type>
                    <defaultvalue>1</defaultvalue>
                </conf>
            </section>

        </config>

        <window name="ERP">
            <title>
                <locale group="quiqqer/erp" var="window.erp.title"/>
            </title>
            <params>
                <icon>fa fa-sun-o</icon>
            </params>

            <categories>
                <category name="shipping">
                    <text>
                        <locale group="quiqqer/shipping" var="window.erp.shipping.title"/>
                    </text>
                    <icon>fa fa-truck</icon>

                    <settings title="shipping" name="shipping">
                        <title>
                            <locale group="quiqqer/shipping" var="shipping.settings.title"/>
                        </title>

                        <input type="checkbox" conf="shipping.deactivated">
                            <text>
                                <locale group="quiqqer/shipping" var="shipping.settings.deactivated"/>
                            </text>
                            <description>
                                <locale group="quiqqer/shipping" var="shipping.settings.deactivated.description"/>
                            </description>
                        </input>

                        <input type="checkbox" conf="shipping.debug">
                            <text>
                                <locale group="quiqqer/shipping" var="shipping.settings.debug"/>
                            </text>
                            <description>
                                <locale group="quiqqer/shipping" var="shipping.settings.debug.description"/>
                            </description>
                        </input>

                        <input type="hidden"
                               conf="shipping.ruleFields"
                               data-qui="package/quiqqer/shipping/bin/backend/controls/settings/RuleFields"
                        >
                            <text>
                                <locale group="quiqqer/shipping" var="shipping.settings.ruleFields"/>
                            </text>

                            <description>
                                <locale group="quiqqer/shipping" var="shipping.settings.ruleFields.description"/>
                            </description>
                        </input>

                        <input type="hidden"
                               conf="shipping.deliveryTimeDefault"
                               data-qui="package/quiqqer/shipping/bin/backend/controls/products/fields/ShippingTimePeriod"
                               data-qui-options-show_default_option="0"
                        >
                            <text>
                                <locale group="quiqqer/shipping" var="shipping.settings.deliveryTimeDefault"/>
                            </text>

                            <description>
                                <locale group="quiqqer/shipping"
                                        var="shipping.settings.deliveryTimeDefault.description"/>
                            </description>
                        </input>

                        <input type="checkbox" conf="shipping.showShippingInfoAfterPrice">
                            <text>
                                <locale group="quiqqer/shipping"
                                        var="shipping.settings.showShippingInfoAfterPrice.enable"/>
                            </text>
                            <description>
                                <locale group="quiqqer/shipping"
                                        var="shipping.settings.showShippingInfoAfterPrice.enable.description"/>
                            </description>
                        </input>

                        <input type="hidden"
                               data-qui="package/quiqqer/translator/bin/controls/Update"
                               data-qui-options-group="quiqqer/shipping"
                               data-qui-options-var="frontend.shippingInfo.button.text"
                        >
                            <text>
                                <locale group="quiqqer/shipping"
                                        var="shipping.settings.showShippingInfoAfterPrice.button"/>
                            </text>
                            <description>
                                <locale group="quiqqer/shipping"
                                        var="shipping.settings.showShippingInfoAfterPrice.button.desc"/>
                            </description>
                        </input>

                        <input type="hidden"
                               data-qui="package/quiqqer/translator/bin/controls/UpdateContent"
                               data-qui-options-group="quiqqer/shipping"
                               data-qui-options-var="frontend.shippingInfo.popup.content"
                               data-qui-options-html="1"
                        >
                            <text>
                                <locale group="quiqqer/shipping"
                                        var="shipping.settings.showShippingInfoAfterPrice.popup"/>
                            </text>
                            <description>
                                <locale group="quiqqer/shipping"
                                        var="shipping.settings.showShippingInfoAfterPrice.popup.desc"/>
                            </description>
                        </input>
                    </settings>

                    <settings title="defaultShipping" name="defaultShipping">
                        <title>
                            <locale group="quiqqer/shipping" var="shipping.defaultShipping.settings.title"/>
                        </title>

                        <input conf="shipping.addDefaultShipping" type="checkbox">
                            <text>
                                <locale group="quiqqer/shipping"
                                        var="shipping.defaultShipping.settings.addDefaultShipping"/>
                            </text>
                            <description>
                                <locale group="quiqqer/shipping"
                                        var="shipping.defaultShipping.settings.addDefaultShipping.desc"/>
                            </description>
                        </input>

                        <input conf="shipping.defaultShippingPrice">
                            <text>
                                <locale group="quiqqer/shipping"
                                        var="shipping.defaultShipping.settings.defaultShippingPrice"/>
                            </text>
                            <description>
                                <locale group="quiqqer/shipping"
                                        var="shipping.defaultShipping.settings.defaultShippingPrice.desc"/>
                            </description>
                        </input>

                        <input conf="shipping.considerCustomerCountry" type="checkbox">
                            <text>
                                <locale group="quiqqer/shipping"
                                        var="shipping.defaultShipping.settings.considerCustomerCountry"/>
                            </text>
                            <description>
                                <locale group="quiqqer/shipping"
                                        var="shipping.defaultShipping.settings.considerCustomerCountry.desc"/>
                            </description>
                        </input>


                        <input type="hidden"
                               data-qui="package/quiqqer/translator/bin/controls/Update"
                               data-qui-options-group="quiqqer/shipping"
                               data-qui-options-var="shipping.default.pricefactor"
                        >
                            <text>
                                <locale group="quiqqer/shipping"
                                        var="shipping.defaultShipping.settings.defaultShippingTitle"/>
                            </text>
                            <description>
                                <locale group="quiqqer/shipping"
                                        var="shipping.defaultShipping.settings.defaultShippingTitle.desc"/>
                            </description>
                        </input>
                    </settings>


                    <settings title="mail" name="mail">
                        <title>
                            <locale group="quiqqer/shipping" var="shipping.mail.settings.title"/>
                        </title>

                        <select conf="no_rules.behavior">
                            <text>
                                <locale group="quiqqer/shipping" var="shipping.mail.settings.order.title"/>
                            </text>
                            <description>
                                <locale group="quiqqer/shipping" var="shipping.mail.settings.order.description"/>
                            </description>

                            <option value="1">
                                <locale group="quiqqer/shipping" var="shipping.mail.settings.order.continue"/>
                            </option>
                            <option value="0">
                                <locale group="quiqqer/shipping" var="shipping.mail.settings.order.cancel"/>
                            </option>
                        </select>

                        <input type="hidden"
                               data-qui="package/quiqqer/translator/bin/controls/Update"
                               data-qui-options-group="quiqqer/shipping"
                               data-qui-options-var="message.no.rule.found.order.continue"
                        >
                            <text>
                                <locale group="quiqqer/shipping" var="shipping.mail.settings.text.continue"/>
                            </text>
                            <description>
                                <locale group="quiqqer/shipping"
                                        var="shipping.mail.settings.text.continue.description"/>
                            </description>
                        </input>

                        <input type="hidden"
                               data-qui="package/quiqqer/translator/bin/controls/Update"
                               data-qui-options-group="quiqqer/shipping"
                               data-qui-options-var="message.no.rule.found.order.cancel"
                        >
                            <text>
                                <locale group="quiqqer/shipping" var="shipping.mail.settings.text.cancel"/>
                            </text>
                            <description>
                                <locale group="quiqqer/shipping" var="shipping.mail.settings.text.cancel.description"/>
                            </description>
                        </input>
                    </settings>

                    <settings>
                        <title>
                            <locale group="quiqqer/shipping" var="shipping.settings.shippingStatus.title"/>
                        </title>

                        <input type="hidden"
                               label="false"
                               data-qui="package/quiqqer/shipping/bin/backend/controls/settings/ShippingStatus"
                        />
                    </settings>
                </category>
            </categories>
        </window>

    </settings>
</quiqqer>
