Invoice
Notice, by clicking on any blue underlined text the stored link will open additional form. Also, by applying filter, while typing text, instant response appears on invoice rows.
[ Add Customer ]
[ Add Invoice ]
[ {{invoices.length}} invoices. ]
[ Filter: ]
| Invoice #: | Order Date: | Customer Name: | Order Status: | Invoice Total: |
|---|---|---|---|---|
| {{invoice.no}} | {{invoice.date}} | {{customers.$findById(invoice.customerId).name}} | {{invoice.status}} | {{invoice.total|currency}} |
| Grand Total: | {{ invoices.$sum('total') | currency }} |
[ Add Customer ]
[ Add Invoice ]
[ {{invoices.length}} invoices. ]
[ Filter: ]
| Invoice #: | Order Date: | Customer Name: | Order Status: | Invoice Total: |
|---|---|---|---|---|
| {{invoice.no}} | {{invoice.date}} | {{customers.$findById(invoice.customerId).name}} | {{invoice.status}} | {{invoice.total|currency}} |
| Grand Total: | {{ invoices.$sum('total') | currency }} |
<html>
<head>
<script type="text/javascript"
src="http://angular.getangular.com/angular-1.0a.js#database=docsdb"></script>
</head>
<body>
<div ng-entity="Invoice;Customer" ng-init="invoices=Invoice.all();customers=Customer.all()">
[ <a href="/Demo:Customer">Add Customer</a> ]
[ <a href="/Demo:Invoice">Add Invoice</a> ]
[ {{invoices.length}} invoices. ]
[ Filter: <input name="filter"> ]
</div>
<hr>
<table>
<tr>
<th>Invoice #:</th>
<th>Order Date:</th>
<th>Customer Name:</th>
<th>Order Status:</th>
<th>Invoice Total:</th>
</tr>
<tr ng-repeat="invoice in invoices.$filter(filter)">
<td><a href="/Demo:Invoice#invoice={{invoice.$id}}">{{invoice.no}}</a></td>
<td>{{invoice.date}}</td>
<td>{{customers.$findById(invoice.customerId).name}}</td>
<td>{{invoice.status}}</td>
<td>{{invoice.total|currency}}</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td><b>Grand Total:<b></td>
<td>{{ invoices.$sum('total') | currency }}</td>
</tr>
</table>
</body>
</html>
Retrieved from "http://docs.getangular.com/Demo:InvoiceList"