<div class="payment-stats" data-ng-class="{single: singleThing}">
    <div class="row">
        <div class="col-xs-12">
            <div class="ps-total-container-outer">
                <div class="ps-total-container">
                    <div class="ps-total" data-ng-class="{nototal: total == 0}">
                        <span class="price">{{total | price}}</span>
                        <span class="price-caption">{{'global.total'|translate}}</span>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-xs-6">
            <div class="ps-overdue-container">
                <div class="ps-overdue" data-ng-class="{allgood: overdue == 0}" data-ng-if="!singleThing">
                    <span class="price">{{overdue | price}}</span>
                    <span class="price-caption">{{'global.overdue' | translate}}</span>
                </div>
                <div class="ps-overdue allgood" data-ng-if="singleThing">
                    <span class="price">{{beforetax | price}}</span>
                    <span class="price-caption" data-ng-if="beforetax !== undefined">{{'items.beforeTaxPrice'|translate}}</span>
                </div>
            </div>
        </div>
        <div class="col-xs-6 text-right">
            <div class="ps-dayx-container">
                <div class="ps-dayx" data-ng-class="{nothing: dayx == 0}" data-ng-if="!singleThing">
                    <span class="price">{{dayx | price}}</span>
                    <span class="price-caption">{{'global.dayx'|translate}}</span>
                </div>
                <div class="ps-dayx nothing" data-ng-if="singleThing">
                    <span class="price">{{tax | price}}</span>
                    <span class="price-caption" data-ng-if="tax !== undefined">{{taxlabel}}</span>
                </div>
            </div>
        </div>
    </div>
    <div class="timeline-container">
        <div class="timeline">
            <div class="t-entry" data-ng-repeat="pe in payEvents" data-ng-attr-style="left: {{calcLeft(pe.date)}}%" data-ui-sref="app.invoiceDetail({id: pe.invoice_id})">
                <div class="dot"></div>
                <div class="info">
                    <span class="date">{{pe.date | amaDate:'dd.MM.yyyy'}}</span>
                    <span class="price">{{pe.sum | price}}</span>
                </div>
            </div>
        </div>
    </div>
    <div class="row" data-ng-if="payEvents.length > 0">
        <div clasS="col-xs-6">
            <div class="today">
                {{'global.today'|translate}}
            </div>
        </div>
        <div clasS="col-xs-6 text-right">
            <div class="enddate">
                {{enddate}}
            </div>
        </div>
    </div>
    </div>