Merge pull request 'refactor: refs #7641 entry report style' (!3178) from 7641-refactorEntryReport into dev
gitea/salix/pipeline/head This commit looks good Details

Reviewed-on: #3178
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
This commit is contained in:
Jorge Penadés 2024-11-14 15:29:14 +00:00
commit f3e640e4a0
4 changed files with 45 additions and 24 deletions

View File

@ -18,3 +18,13 @@ h3 {
font-size: 10px;
margin: 0;
}
.column-oriented th,
.column-oriented td{
padding: 5px
}
[row] {
display: flex;
column-gap: 5px;
}

View File

@ -41,42 +41,50 @@
<table class="column-oriented vn-mt-ml border-collapse">
<thead>
<tr>
<th width="5%">{{$t('code')}}</th>
<th class="number">{{$t('boxes')}}</th>
<th width="5%" class="number"></th>
<th width="1px" class="number"></th>
<th class="number">{{$t('packing')}}</th>
<th width="40%">{{$t('concept')}}</th>
<th width="10%">{{$t('reference')}}</th>
<th width="10%">{{$t('tags')}}</th>
<th width="10%" class="number">{{$t('quantity')}}</th>
<th width="5%" class="number"></th>
<th width="15%" class="number">{{$t('price')}}</th>
<th width="5%" class="number"></th>
<th width="15%" class="number">{{$t('amount')}}</th>
<th width="5%">{{$t('concept')}}</th>
<th width="20%">{{$t('reference')}}</th>
<th width="20%">{{$t('tags')}}</th>
<th width="5%" class="number">{{$t('quantity')}}</th>
<th width="1px" class="number"></th>
<th width="5%" class="number">{{$t('price')}}</th>
<th width="1px" class="number"></th>
<th width="5%" class="number">{{$t('amount')}}</th>
</tr>
</thead>
<tbody v-for="buy in buys">
<tr>
<td width="5%">{{buy.itemFk}}</td>
<td class="number">{{buy.stickers}}</td>
<td width="5%" class="number">x</td>
<td class="number">{{buy.packing}}</td>
<td width="40%" class="nowrap">{{buy.name}}</td>
<td width="10%">{{buy.comment}}</td>
<td width="10%" class="font light-gray tags">
<span v-if="buy.value5" class="nowrap"><strong>{{buy.tag5}} → </strong>{{buy.value5}} </span>
<span v-if="buy.value6" class="nowrap"><strong>{{buy.tag6}} → </strong>{{buy.value6}} </span>
<span v-if="buy.value7" class="nowrap"><strong>{{buy.tag7}} → </strong>{{buy.value7}} </span>
<td width="1px" class="number">x</td>
<td class="number align-left">{{buy.packing}}</td>
<td width="5%" class="nowrap">{{buy.name}}</td>
<td width="20%">referencia de prueba</td>
<td width="20%" class="font light-gray tags" row>
<div>
<div class="nowrap" v-if="buy.value5">{{buy.tag5}}<strong>→ {{buy.value5}}</strong></div>
<div class="nowrap" v-if="buy.value6">{{buy.tag6}}<strong>→ {{buy.value6}}</strong></div>
</div>
<div>
<div class="nowrap" v-if="buy.value7">{{buy.tag7}}<strong>→ {{buy.value7}}</strong></div>
<div class="nowrap" v-if="buy.value8">{{buy.tag8}}<strong>→ {{buy.value8}}</strong></div>
</div>
</td>
<td width="10%" class="number">{{buy.quantity | number($i18n.locale)}}</td>
<td width="5%" class="number">x</td>
<td width="15%" class="number">{{buy.buyingValue | currency('EUR', $i18n.locale)}}</td>
<td width="5%" class="number">=</td>
<td width="15%" class="number">
<td width="5%" class="number">{{buy.quantity | number($i18n.locale)}}</td>
<td width="1px" class="number">x</td>
<td width="5%" class="number">{{buy.buyingValue | currency('EUR', $i18n.locale)}}</td>
<td width="1px" class="number">=</td>
<td width="5%" class="number align-left">
{{buy.buyingValue * buy.quantity | currency('EUR', $i18n.locale)}}
</td>
</tr>
</tbody>
<tfoot>
<tr class="font bold">
<td></td>
<td class="number">{{getTotalBy('stickers')}}</td>
<td></td>
<td></td>

View File

@ -16,4 +16,5 @@ entry: Entrada {0}
supplierData: Datos del proveedor
notes: Notas
reference: Referencia
tags: Tags
tags: Etiquetas
code: Código

View File

@ -10,7 +10,9 @@ SELECT b.itemFk,
i.tag6,
i.value6,
i.tag7,
i.value7
i.value7,
i.tag8,
i.value8
FROM buy b
JOIN item i ON i.id = b.itemFk
LEFT JOIN item i2 ON i2.id = b.itemOriginalFk