templates/themes/ottcomputer/includes/buybox-wicam.html.twig line 1

Open in your IDE?
  1. {% spaceless %}
  2.     {% if total is not defined %}
  3.         {% set total = 0 %}
  4.     {% endif %}
  5.     {% if priceSubTotal is not defined %}
  6.         {% set priceSubTotal = total %}
  7.     {% endif %}
  8.     {% if vatPercentTotal is not defined %}
  9.         {% set vatPercentTotal = 0 %}
  10.     {% endif %}
  11.     {% if vatPercent is not defined %}
  12.         {% set vatPercent = 0 %}
  13.     {% endif %}
  14.     {% if priceTotal is not defined %}
  15.         {% set priceTotal = 0 %}
  16.     {% endif %}
  17.     {% if surcharges is defined %}
  18.         {% if surcharges is not empty %}
  19.             {% for sr in surcharges %}
  20.                 {% set priceSubTotal = priceSubTotal + sr.total %}
  21.             {% endfor %}
  22.         {% endif %}
  23.     {% endif %}
  24.     {%  if wicamheader is defined %}
  25.          {% set deliveryCost = wicamheader.deliveryCost %}
  26.     {% endif %}
  27.     {%  if deliveryCost is defined %}
  28.          {% set priceSubTotal = priceSubTotal + deliveryCost %}
  29.     {% endif %}
  30.     {% set minimun_vl = 0.0 %}
  31.     {%  if wicamheader is defined %}
  32.         {% if wicamheader.CountActiveWicamFiles > 0 %}
  33.             {% if minimun is defined %}
  34.                 {% if priceSubTotal < minimun %}
  35.                     {% set minimun_vl =  minimun - priceSubTotal %}
  36.                     {% set priceSubTotal =  minimun %}
  37.                 {% endif %}
  38.             {% endif %}
  39.         {% endif %}
  40.     {% endif %}
  41.     {% set vatPercentTotal = priceSubTotal * (vatPercent/100) %}
  42.     {% set priceTotal = priceSubTotal + vatPercentTotal %}
  43.     {% if newTotal is not defined %}
  44.         {% set newTotal = false %}
  45.     {% endif %}
  46.     {% if purchaseLimit is not defined %}
  47.         {% set purchaseLimit = false %}
  48.     {% endif %}
  49. {% endspaceless %}
  50. <div class="buybox">
  51.     <div class="buybox-header">
  52.         <div class="grid-x row">
  53.             <div class="cell auto font-bold-title">
  54.                 {{ "Gesamtsumme" |  trans }}
  55.             </div>
  56.             <div class="cell auto price-total text-right" id="main_price_total">
  57.                 {{ priceTotal|price(2, ',', '.', true)|raw }}
  58.             </div>
  59.         </div>
  60.     </div>
  61.     <div class="buybox-body">
  62.         {% if wicamheader is defined %}
  63.             <div class="grid-x row">
  64.                 <div class="cell auto">
  65.                     {{ "MwSt." |  trans }} {{ vatPercent }}%
  66.                 </div>
  67.                 <div class="cell auto text-right">
  68.                     <div class="total-price-value font-bold">
  69.                         {{ vatPercentTotal|price|raw(2, ',', '.', true) }}
  70.                     </div>
  71.                 </div>
  72.             </div>
  73.         {% endif %}
  74.         <div class="grid-x row">
  75.             <div class="cell auto">
  76.                 {{"Netto gesamt" | trans}}
  77.             </div>
  78.             <div class="cell auto text-right">
  79.                 <div class="total-price-value font-bold">
  80.                     {{ priceSubTotal|price|raw(2, ',', '.', true) }}
  81.                 </div>
  82.             </div>
  83.         </div>
  84.         {%  if wicamheader is defined %}
  85.             {% if wicamheader.CountActiveWicamFiles > 0 %}
  86.                 {% if surcharges is defined %}
  87.                     {% if surcharges is not empty %}
  88.                         {% for sr in surcharges %}
  89.                             <div class="grid-x row">
  90.                                 <div class="cell auto">
  91.                                     {{ sr.surcharge.descriptions[app.request.locale]|default("")| trans}}
  92.                                 </div>
  93.                                 <div class="cell auto text-right">
  94.                                     <div class="total-price-value font-bold">
  95.                                         {{ sr.total|price|raw(2, ',', '.', true) }}
  96.                                     </div>
  97.                                 </div>
  98.                             </div>
  99.                         {% endfor %}
  100.                     {% endif %}
  101.                 {% endif %}
  102.                 {% if deliveryCost is defined %}
  103.                 <div class="grid-x row">
  104.                     <div class="cell auto">
  105.                        {{"Lieferkosten" |  trans}}
  106.                     </div>
  107.                     <div class="cell auto text-right">
  108.                         <div class="delivery-cost-value font-bold">
  109.                             {{ deliveryCost|price|raw(2, ',', '.', true) }}
  110.                         </div>
  111.                     </div>
  112.                 </div>
  113.                 {% endif %}
  114.                 <div class="grid-x row">
  115.                     <div class="cell auto">
  116.                         {{"Nettowarenwert" | trans}}
  117.                     </div>
  118.                     <div class="cell auto text-right">
  119.                         <div class="total-price-value font-bold">
  120.                             {{ total|price|raw(2, ',', '.', true) }}
  121.                         </div>
  122.                     </div>
  123.                 </div>
  124.                 {% if minimun_vl > 0.0 %}
  125.                     <div class="grid-x row">
  126.                         <div class="cell auto">
  127.                             {{"Preisdifferenz bis zum Mindestbestellwert" |  trans}}
  128.                         </div>
  129.                         <div class="cell auto text-right">
  130.                             <div class="delivery-cost-value font-bold">
  131.                                 {{ minimun_vl|price|raw(2, ',', '.', true) }}
  132.                             </div>
  133.                         </div>
  134.                     </div>
  135.                 {% endif %}
  136.             {% endif %}
  137.         {% endif %}
  138.         {% if wicamheader is defined %}
  139.             {% if wicamheader.plz is empty and wicamheader.CountActiveWicamFiles > 0 %}
  140.                 <span class="label alert plz-required-message" style="white-space: break-spaces;">
  141.                     {{ "Der angezeigte Gesamtpreis enthält keine Lieferkosten. Bitte geben Sie Ihre Postleitzahl an."|trans }}
  142.                 </span>
  143.             {% endif %}
  144.         {% endif %}
  145.         {% if newTotal is defined and purchaseLimit is defined%}
  146.             {% if newTotal and purchaseLimit %}
  147.                 <span class="label alert" style="white-space: break-spaces;">{{ "Ihr Bestell-Limit wurde überschritten. Ihre Bestellung muss zunächst von Ihrem Vertreter freigegeben werden. Ihr Angebot wurde aktualisiert."|trans }}</span>
  148.             {% endif %}
  149.         {% endif %}
  150.     </div>
  151. </div>