Merge pull request 'add column in ticket split' (#279) from 2236-ticket_sale_split into dev

Reviewed-by: Joan Sanchez <joan@verdnatura.es>
This commit is contained in:
Joan Sanchez 2020-06-02 07:47:50 +00:00
commit 1926f90f4b
3 changed files with 12 additions and 5 deletions

View File

@ -26,11 +26,12 @@ module.exports = Self => {
Self.lastActiveTickets = async(id, ticketId) => {
const ticket = await Self.app.models.Ticket.findById(ticketId);
const query = `
SELECT t.id, t.shipped, a.name AS agencyName, w.name AS warehouseName
SELECT t.id, t.shipped, a.name AS agencyName, w.name AS warehouseName, ad.city AS address
FROM vn.ticket t
JOIN vn.ticketState ts ON t.id = ts.ticketFk
JOIN vn.agencyMode a ON t.agencyModeFk = a.id
JOIN vn.warehouse w ON t.warehouseFk = w.id
JOIN vn.address ad ON t.addressFk = ad.id
WHERE t.shipped >= CURDATE() AND t.clientFk = ? AND ts.alertLevel = 0
AND t.id <> ? AND t.warehouseFk = ?
ORDER BY t.shipped

View File

@ -306,9 +306,10 @@
<thead>
<tr>
<th number>Id</th>
<th number>F. envio</th>
<th number>Agencia</th>
<th number>Almacen</th>
<th number>Shipped</th>
<th number>Agency</th>
<th number>Warehouse</th>
<th number>Address</th>
</tr>
</thead>
<tbody>
@ -323,6 +324,7 @@
<td number>{{::ticket.shipped | date: 'dd/MM/yyyy'}}</td>
<td number>{{::ticket.agencyName}}</td>
<td number>{{::ticket.warehouseName}}</td>
<td number>{{::ticket.address}}</td>
</tr>
</tbody>
</table>

View File

@ -30,3 +30,7 @@ Continue anyway?: ¿Continuar de todas formas?
This ticket is now empty: El ticket ha quedado vacio
Do you want to delete it?: ¿Quieres eliminarlo?
Recalculate price: Recalcular precio
Address: Dirección
Warehouse: Almacen
Agency: Agencia
Shipped: F. envio