Skip to content

Commit 8862152

Browse files
author
Andreas Müller
committed
invoice changed position format
1 parent 6d38b88 commit 8862152

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

src/output/invoice2.js

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,8 @@ class invoice2 extends Base {
2929
this.invoiceCurrencyMaxUnit = this.config.get('invoiceCurrencyMaxUnit');
3030
this.invoiceTimeMaxUnit = this.config.get('invoiceTimeMaxUnit');
3131

32-
/*
33-
34-
<div class="positionDesc">${this.invoicePositionText} (${this.totalhForInvoice.toFixed(2)} Stunden zu ${this.invoiceCurrencyPerHour} ${this.invoiceCurrency})</div>
35-
<div class="positionValue">${this.invoiceCurrency} ${this.totalForInvoiceH.toFixed(2)}</div>
36-
*/
3732
this.invoicePositions = {}; //key=iid, value=[text, total H, Rate, Total]
38-
33+
3934
Object.keys(this.daysNew).forEach(
4035
k => {
4136
let day = this.daysNew[k];
@@ -165,15 +160,18 @@ class invoice2 extends Base {
165160
// text, total H, Rate, Total
166161
let position = this.invoicePositions[k];
167162
positions +=
168-
`<div class="positionDesc">${position[0]} (${position[1].toFixed(2)} Stunden zu ${position[2]} ${this.invoiceCurrency})</div>
169-
<div class="positionValue">${this.invoiceCurrency} ${position[3].toFixed(2)}</div>`;
163+
`<div class="positionDesc">${position[0]}: ${position[1].toFixed(2)}h (${position[2]} ${this.invoiceCurrency}/h)</div>
164+
<div class="positionValue">${this.invoiceCurrency} ${position[3].toFixed(2)}</div>
165+
`;
170166
}
171167
);
172168

173169
let extra = "";
174170
if(this.invoicePositionExtraValue > 0) {
175-
extra = `<div class="positionDesc">${this.invoicePositionExtraText}</div>
176-
<div class="positionValue">${this.invoiceCurrency} ${this.invoicePositionExtraValue.toFixed(2)}</div>`;
171+
extra =
172+
`<div class="positionDesc">${this.invoicePositionExtraText}</div>
173+
<div class="positionValue">${this.invoiceCurrency} ${this.invoicePositionExtraValue.toFixed(2)}</div>
174+
`;
177175
}
178176

179177
this.out +=

0 commit comments

Comments
 (0)