| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187 | <div class="row ">    <div class="col-md-4">        <h3>Offene Rechnungen</h3>        <table class="table table-striped">            <tr>                <th class="normal">Datum</th>                <th class="normal">Kasse</th>                <th class="normal">Anz. Art.</th>                <th class="normal text-right">Gesamt-Preis</th>                <th></th>            </tr>            <tr ng-repeat="invoice in filterInvoices(0)" >                <td class="normal">{{invoice.invoice_date|datum}}</td>                <td>                    <span class="label label-default pos{{invoice.pos_id}}-bg">{{invoice.pos_id}}</span>                </td>                <td class="text-right">{{invoice.line_count}}</td>                <td class="text-right">{{invoice.total|euro}}</td>                <td>                    <button type="button" class="btn btn-default" data-toggle="modal" data-target="#invoiceModal" ng-click="loadInvoice(invoice.invoice_number)">                        <i class="glyphicon glyphicon-shopping-cart"></i>                    </button>                </td>            </tr>        </table>        <br/><br/>        <h3>Bezahlte Rechnungen</h3>        <table class="table table-striped">            <tr>                <th></th>                <th></th>                <th class="normal">Datum</th>                <th class="normal">Kasse</th>                <th class="normal">Anz. Art.</th>                <th class="normal text-right">Gesamt-Preis</th>                <th class="normal text-right">Gegeben<br/>Rückgeld</th>            </tr>            <tr ng-repeat="invoice in filterInvoices(-1) | orderBy:'-invoice_date'" >                <td><button type="button" class="btn" data-toggle="modal" data-target="#invoiceModal" ng-click="loadInvoice(invoice.invoice_number)"><i class="glyphicon glyphicon-pencil"></i></button></td>                <td>                    <button type="button" class="btn btn-warning" ng-click="printInvoice(invoice.invoice_number)" ng-show="invoice.printed==0"><i class="glyphicon glyphicon-print"></i></button>                    <button type="button" class="btn btn-success" ng-click="printInvoice(invoice.invoice_number)" ng-show="invoice.printed==1"><i class="glyphicon glyphicon-check"></i></button>                </td>                <td class="normal">{{invoice.invoice_date|datum}}</td>                <td>                    <span class="label label-default pos{{invoice.pos_id}}-bg">{{invoice.pos_id}}</span>                </td>                <td class="text-right">{{invoice.line_count}}</td>                <td class="text-right">{{invoice.total|euro}}</td>                <td class="text-right" ng-show="invoice.checkout==2">                    <i class="glyphicon glyphicon-credit-card"></i>                </td>                <td class="normal text-right" ng-show="invoice.checkout==1">{{invoice.paid|euro}}<br/>{{(invoice.paid-invoice.total)|euro}}</td>            </tr>            <tr>                <td></td>                <td></td>                <th class="normal">Kassenstand</th>                <td></td>                <td></td>                <th class="text-right">{{total(1)|euro}}</th>                <td class="text-right"></td>            </tr>            <tr>                <td></td>                <td></td>                <th class="normal">Konto</th>                <td></td>                <td></td>                <th class="text-right">{{total(2)|euro}}</th>                <td class="text-right"></td>            </tr>        </table>    </div></div><div class="modal fade" tabindex="-1" role="dialog" aria-labelledby="inactiveLabel" id="invoiceModal">    <div class="modal-dialog modal-lg" role="document">        <div class="modal-content">            <div class="modal-header">                <h4 class="modal-title" id="inactiveLabel">Bezahlvorgang</h4>            </div>            <div class="modal-body">        <table class="table table-striped">            <tr class="warning">                <th class="col-md-1"># {{currentInvoice.invoice_number}}</th>                <td class="col-md-2" colspan="3">                    {{currentInvoice.details.length}} Artikel                </td>                <th class="col-md-1 text-right big">                    {{invoiceTotal()|euro}} €                </th>            </tr>            <tr ng-show="currentInvoice.checkout==0">                <td colspan="3"></td>                <td>                    <button type="button" class="btn btn-lg btn-primary" ng-click="setCheckout(2)">                        <i class="glyphicon glyphicon-credit-card"></i> Karte                    </button>                </td>                <td>                    <button type="button" class="btn btn-lg btn-info" ng-click="setCheckout(1)">                        <i class="glyphicon glyphicon-piggy-bank"></i> Bar                    </button>                </td>            </tr>            <tr ng-show="currentInvoice.checkout==1">                <td><i class="glyphicon glyphicon-download-alt"></i></td>                <td colspan="3">                    Von Kunde erhalten (/)                </td>                <td class="text-right">                    <input id="paid" class="form-control text-right" type="text" ng-model="currentInvoice.paid" data-price/>                </td>            </tr>            <tr ng-show="currentInvoice.checkout==1">                <td><i class="glyphicon glyphicon-log-out"></i></td>                <th colspan="3">                    Rückgeld                </th>                <td class="text-right">                    {{currentChange()|euro}} €                </td>            </tr>            <tr ng-show="currentInvoice.checkout!=0">                <td><i class="glyphicon glyphicon-print"></i></td>                <td colspan="3">                    Drucken?                </td>                <td class="text-right">                    <button type="button" class="btn btn-warning" ng-click="printInvoice(currentInvoice.invoice_number)" ng-show="currentInvoice.printed==0"><i class="glyphicon glyphicon-print"></i></button>                    <button type="button" class="btn btn-success" ng-click="printInvoice(currentInvoice.invoice_number)" ng-show="currentInvoice.printed==1"><i class="glyphicon glyphicon-check"></i></button>                </td>            </tr>            <tr ng-show="currentInvoice.checkout!=0">                <td><i class="glyphicon glyphicon-download-alt"></i></td>                <td colspan="3">                    Zahlung erfolgreich?                </td>                <td class="text-right">                    <button type="button" class="btn btn-lg btn-success" data-toggle="modal" data-target="#invoiceModal" ng-click="performCheckout(currentInvoice)">                        <i class="glyphicon glyphicon-ok"></i> Ja                     </button>                    <button type="button" class="btn btn-lg btn-danger" ng-click="currentInvoice.checkout=0">                        <i class="glyphicon glyphicon-remove"></i> Nein                     </button>                </td>            </tr>                        <tr>                <th></th>                <th class="text-right">Pos</th>                <th>Artikel</th>                <th class="text-right">Preis</th>                <th></th>            </tr>            <tr ng-repeat="b in currentInvoice.details">                <td></td>                <td class="normal text-right">                    {{currentInvoice.details.length-$index}}                </td>                <td class="normal">                    {{b.item}}                </td>                <td class="normal text-right">                    {{b.price}}                </td>                <td></td>            </tr>        </table>                                            </div>        </div>    </div></div>
 |