|
|
|
|
17
|
<program>
|
17
|
<program>
|
18
|
<![CDATA[
|
18
|
<![CDATA[
|
19
|
var vendor = findChildObject(this, "vendor");
|
19
|
var vendor = findChildObject(this, "vendor");
|
20
|
- vendor.addItem("Any");
|
|
|
|
|
20
|
+ vendor.addItem(TTR("invoicereport", "Any"));
|
21
|
var query = new QSqlQuery();
|
21
|
var query = new QSqlQuery();
|
22
|
query.exec("SELECT DISTINCT vendor FROM invoices");
|
22
|
query.exec("SELECT DISTINCT vendor FROM invoices");
|
23
|
while(query.next()) {
|
23
|
while(query.next()) {
|
|
|
|
|
68
|
output.writeStartElement("html");
|
68
|
output.writeStartElement("html");
|
69
|
output.writeAttribute("xmlns", "http://www.w3.org/1999/xhtml");
|
69
|
output.writeAttribute("xmlns", "http://www.w3.org/1999/xhtml");
|
70
|
output.writeStartElement("head");
|
70
|
output.writeStartElement("head");
|
71
|
- output.writeTextElement("title", "Invoices");
|
|
|
|
|
71
|
+ output.writeTextElement("title", TTR("invoicereport", "Invoices"));
|
72
|
output.writeEndElement();
|
72
|
output.writeEndElement();
|
73
|
output.writeStartElement("body");
|
73
|
output.writeStartElement("body");
|
74
|
- output.writeTextElement("h1", "Invoices " + startDate + " - " + endDate);
|
|
|
|
|
74
|
+ output.writeTextElement("h1", TTR("invoicereport", "Invoices ") + startDate + " - " + endDate);
|
75
|
output.writeStartElement("table");
|
75
|
output.writeStartElement("table");
|
76
|
output.writeAttribute("style", "page-break-after: auto; text-align: left");
|
76
|
output.writeAttribute("style", "page-break-after: auto; text-align: left");
|
77
|
output.writeAttribute("rules", "groups");
|
77
|
output.writeAttribute("rules", "groups");
|
78
|
output.writeAttribute("cellpadding", "3px");
|
78
|
output.writeAttribute("cellpadding", "3px");
|
79
|
output.writeStartElement("thead");
|
79
|
output.writeStartElement("thead");
|
80
|
output.writeStartElement("tr");
|
80
|
output.writeStartElement("tr");
|
81
|
- output.writeTextElement("th", "Date");
|
|
|
82
|
- output.writeTextElement("th", "Vendor");
|
|
|
83
|
- output.writeTextElement("th", "Invoice");
|
|
|
84
|
- output.writeTextElement("th", "Cost");
|
|
|
|
|
81
|
+ output.writeTextElement("th", TTR("invoicereport", "Date"));
|
|
|
82
|
+ output.writeTextElement("th", TTR("invoicereport", "Vendor"));
|
|
|
83
|
+ output.writeTextElement("th", TTR("invoicereport", "Invoice"));
|
|
|
84
|
+ output.writeTextElement("th", TTR("invoicereport", "Cost"));
|
85
|
output.writeEndElement();
|
85
|
output.writeEndElement();
|
86
|
output.writeEndElement();
|
86
|
output.writeEndElement();
|
87
|
output.writeStartElement("tbody");
|
87
|
output.writeStartElement("tbody");
|
|
|
|
|
140
|
output.writeStartElement("tr");
|
140
|
output.writeStartElement("tr");
|
141
|
output.writeEmptyElement("td");
|
141
|
output.writeEmptyElement("td");
|
142
|
output.writeEmptyElement("td");
|
142
|
output.writeEmptyElement("td");
|
143
|
- output.writeTextElement("th", "Total:");
|
|
|
|
|
143
|
+ output.writeTextElement("th", TTR("invoicereport", "Total:"));
|
144
|
output.writeTextElement("td", Number(cost_sum).toFixed(2));
|
144
|
output.writeTextElement("td", Number(cost_sum).toFixed(2));
|
145
|
output.writeEndElement();
|
145
|
output.writeEndElement();
|
146
|
output.writeEndElement();
|
146
|
output.writeEndElement();
|