refs #5013 feat: añadida observacion para cada ticket
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Vicent Llopis 2023-03-21 14:08:34 +01:00
parent d209b35071
commit 1d0024c538
3 changed files with 19 additions and 3 deletions

View File

@ -0,0 +1,2 @@
INSERT INTO `vn`.`observationType` (`description`, `code`, `hasNewBornMessage`)
VALUES ('Factura', 'invocieOut', '0');

View File

@ -119,6 +119,16 @@
</td> </td>
<td class="number">{{ticketSubtotal(ticket) | currency('EUR', $i18n.locale)}}</td> <td class="number">{{ticketSubtotal(ticket) | currency('EUR', $i18n.locale)}}</td>
</tr> </tr>
<tr class="columns vn-mt-xl" v-if="ticket.description">
<div class="size50 pull-left no-page-break">
<div class="panel">
<div class="header">{{$t('observations')}}</div>
<div class="body">
<div>{{ticket.description}}</div>
</div>
</div>
</div>
</tr>
</tfoot> </tfoot>
</table> </table>
</div> </div>
@ -251,6 +261,7 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<template v-slot:footer> <template v-slot:footer>

View File

@ -1,8 +1,11 @@
SELECT SELECT
t.id, t.id,
t.shipped, t.shipped,
t.nickname t.nickname,
FROM invoiceOut io tto.description
FROM invoiceOut io
JOIN ticket t ON t.refFk = io.ref JOIN ticket t ON t.refFk = io.ref
LEFT JOIN ticketObservation tto ON tto.ticketFk = t.id
AND tto.observationTypeFk = (SELECT id FROM observationType WHERE code = 'invocieOut')
WHERE t.refFk = ? WHERE t.refFk = ?
ORDER BY t.shipped ORDER BY t.shipped