Small refactor
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
bb45d78062
commit
cc00587b66
|
@ -9,6 +9,6 @@ body {
|
|||
.title {
|
||||
margin-bottom: 20px;
|
||||
font-weight: 100;
|
||||
font-size: 3em;
|
||||
font-size: 2.6rem;
|
||||
margin-top: 0
|
||||
}
|
|
@ -19,7 +19,7 @@ h2 {
|
|||
}
|
||||
|
||||
.ticket-info {
|
||||
font-size: 26px
|
||||
font-size: 22px
|
||||
}
|
||||
|
||||
#phytosanitary {
|
||||
|
|
|
@ -4,7 +4,8 @@ h2 {
|
|||
}
|
||||
|
||||
.table-title {
|
||||
margin-bottom: 15px
|
||||
margin-bottom: 15px;
|
||||
font-size: 0.8rem
|
||||
}
|
||||
|
||||
.table-title h2 {
|
||||
|
@ -12,7 +13,12 @@ h2 {
|
|||
}
|
||||
|
||||
.ticket-info {
|
||||
font-size: 26px
|
||||
font-size: 22px
|
||||
}
|
||||
|
||||
#nickname h2 {
|
||||
max-width: 400px;
|
||||
word-wrap: break-word
|
||||
}
|
||||
|
||||
#phytosanitary {
|
||||
|
|
|
@ -101,8 +101,8 @@
|
|||
<span>{{ticket.shipped | date}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<span class="pull-right">
|
||||
<h2 style="max-width: 400px; text-overflow: ellipsis;white-space: nowrap;overflow: hidden;">{{ticket.nickname}}</h2>
|
||||
<span id="nickname" class="pull-right">
|
||||
<h2>{{ticket.nickname}}</h2>
|
||||
</span>
|
||||
</div>
|
||||
<table class="column-oriented">
|
||||
|
@ -125,7 +125,7 @@
|
|||
<td class="number">{{sale.price | currency('EUR', $i18n.locale)}}</td>
|
||||
<td class="centered" width="5%">{{(sale.discount / 100) | percentage}}</td>
|
||||
<td class="centered">{{sale.vatType}}</td>
|
||||
<td class="number">{{sale.price * sale.quantity * (1 - sale.discount / 100) | currency('EUR', $i18n.locale)}}</td>
|
||||
<td class="number">{{saleImport(sale) | currency('EUR', $i18n.locale)}}</td>
|
||||
</tr>
|
||||
<tr class="description font light-gray">
|
||||
<td colspan="7">
|
||||
|
@ -146,7 +146,7 @@
|
|||
<td colspan="6" class="font bold">
|
||||
<span class="pull-right">{{$t('subtotal')}}</span>
|
||||
</td>
|
||||
<td class="number">{{subTotal(ticket) | currency('EUR', $i18n.locale)}}</td>
|
||||
<td class="number">{{ticketSubtotal(ticket) | currency('EUR', $i18n.locale)}}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
|
|
@ -59,15 +59,6 @@ module.exports = {
|
|||
const vat = this.sumTotal(this.taxes, 'vat');
|
||||
return base + vat;
|
||||
}
|
||||
/*
|
||||
serviceTotal() {
|
||||
let total = 0.00;
|
||||
this.services.forEach(service => {
|
||||
total += parseFloat(service.price) * service.quantity;
|
||||
});
|
||||
|
||||
return total;
|
||||
} */
|
||||
},
|
||||
methods: {
|
||||
fetchInvoice(invoiceId) {
|
||||
|
@ -100,17 +91,18 @@ module.exports = {
|
|||
fetchRectified(invoiceId) {
|
||||
return this.rawSqlFromDef(`rectified`, [invoiceId]);
|
||||
},
|
||||
subTotal(ticket) {
|
||||
saleImport(sale) {
|
||||
const price = sale.quantity * sale.price;
|
||||
|
||||
return price * (1 - sale.discount / 100);
|
||||
},
|
||||
ticketSubtotal(ticket) {
|
||||
let subTotal = 0.00;
|
||||
ticket.sales.forEach(sale => {
|
||||
subTotal += sale.quantity * sale.price * (1 - sale.discount / 100);
|
||||
});
|
||||
for (let sale of ticket.sales)
|
||||
subTotal += this.saleImport(sale);
|
||||
|
||||
return subTotal;
|
||||
},
|
||||
getTotal() {
|
||||
return this.getTotalBase() + this.getTotalTax();
|
||||
},
|
||||
sumTotal(rows, prop) {
|
||||
let total = 0.00;
|
||||
for (let row of rows)
|
||||
|
|
Loading…
Reference in New Issue