5013-observaciones_facturas #1401
|
@ -501,7 +501,8 @@ INSERT INTO `vn`.`observationType`(`id`,`description`, `code`)
|
|||
(3, 'Delivery', 'delivery'),
|
||||
(4, 'SalesPerson', 'salesPerson'),
|
||||
(5, 'Administrative', 'administrative'),
|
||||
(6, 'Weight', 'weight');
|
||||
(6, 'Weight', 'weight'),
|
||||
(7, 'InvoiceOut', 'invoiceOut');
|
||||
|
||||
INSERT INTO `vn`.`addressObservation`(`id`,`addressFk`,`observationTypeFk`,`description`)
|
||||
VALUES
|
||||
|
@ -738,7 +739,9 @@ INSERT INTO `vn`.`ticketObservation`(`id`, `ticketFk`, `observationTypeFk`, `des
|
|||
(9, 23, 5, 'care with the dog'),
|
||||
(10, 23, 4, 'Reclama ticket: 8'),
|
||||
(11, 24, 4, 'Reclama ticket: 7'),
|
||||
(12, 11, 3, 'Delivery after 10am');
|
||||
(12, 11, 3, 'Delivery after 10am'),
|
||||
(13, 1, 7, 'observation of ticket one'),
|
||||
(14, 2, 7, 'observation of ticket two');
|
||||
|
||||
-- FIX for state hours on local, inter_afterInsert
|
||||
-- UPDATE vncontrol.inter SET odbc_date = DATE_ADD(util.VN_CURDATE(), INTERVAL -10 SECOND);
|
||||
|
|
|
@ -240,13 +240,18 @@
|
|||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
<div class="columns vn-mt-xl" v-if="invoice.payMethodCode == 'wireTransfer'">
|
||||
<div class="columns vn-mt-xl" v-if="invoice.payMethodCode == 'wireTransfer' || ticketObservations">
|
||||
<div class="size50 pull-left no-page-break">
|
||||
<div class="panel">
|
||||
<div class="header">{{$t('observations')}}</div>
|
||||
<div class="body">
|
||||
<div>{{$t('wireTransfer')}}</div>
|
||||
<div>{{$t('accountNumber', [invoice.iban])}}</div>
|
||||
<div v-if="invoice.payMethodCode == 'wireTransfer'">
|
||||
<div>{{$t('wireTransfer')}}</div>
|
||||
<div>{{$t('accountNumber', [invoice.iban])}}</div>
|
||||
</div>
|
||||
<div v-if="ticketObservations">
|
||||
{{ticketObservations}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -21,11 +21,15 @@ module.exports = {
|
|||
|
||||
const map = new Map();
|
||||
|
||||
this.ticketObservations = '';
|
||||
for (let ticket of tickets) {
|
||||
ticket.sales = [];
|
||||
|
||||
map.set(ticket.id, ticket);
|
||||
|
||||
if (ticket.description) this.ticketObservations += ticket.description + ' ';
|
||||
vicent marked this conversation as resolved
|
||||
}
|
||||
this.ticketObservations = this.ticketObservations.trim();
|
||||
|
||||
for (let sale of sales) {
|
||||
const ticket = map.get(sale.ticketFk);
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
SELECT
|
||||
t.id,
|
||||
t.shipped,
|
||||
t.nickname
|
||||
FROM invoiceOut io
|
||||
JOIN ticket t ON t.refFk = io.ref
|
||||
t.nickname,
|
||||
tto.description
|
||||
FROM invoiceOut io
|
||||
JOIN ticket t ON t.refFk = io.REF
|
||||
LEFT JOIN observationType ot ON ot.code = 'invoiceOut'
|
||||
LEFT JOIN ticketObservation tto ON tto.ticketFk = t.id
|
||||
AND tto.observationTypeFk = ot.id
|
||||
WHERE t.refFk = ?
|
||||
ORDER BY t.shipped
|
||||
ORDER BY t.shipped
|
||||
|
|
Loading…
Reference in New Issue
pots llevar el espai que es queda en blanc al final?
fent slice(0,-1)
el slice no fa lo que toca, he fet this.ticketObservations.trim(); que lo que fa es eliminar els espaic en blanc al final