refs #6980 fix iban #2127
|
@ -13,15 +13,15 @@ BEGIN
|
||||||
DECLARE vWarehouseIn INT;
|
DECLARE vWarehouseIn INT;
|
||||||
DECLARE vWarehouseOut INT;
|
DECLARE vWarehouseOut INT;
|
||||||
DECLARE vCalcVisible INT;
|
DECLARE vCalcVisible INT;
|
||||||
DECLARE vInventoryDate DATE DEFAULT vn.getInventoryDate();
|
DECLARE vInventoryDate DATE DEFAULT getInventoryDate();
|
||||||
|
|
||||||
SELECT shipped, landed, warehouseInFk, warehouseOutFk
|
SELECT shipped, landed, warehouseInFk, warehouseOutFk
|
||||||
INTO vDateShipped, vDateLanded, vWarehouseIn, vWarehouseOut
|
INTO vDateShipped, vDateLanded, vWarehouseIn, vWarehouseOut
|
||||||
FROM vn.travel t
|
FROM travel t
|
||||||
JOIN vn.entry e ON e.travelFk = t.id
|
JOIN entry e ON e.travelFk = t.id
|
||||||
WHERE e.id = vSelf;
|
WHERE e.id = vSelf;
|
||||||
|
|
||||||
CALL vn.rate_getPrices(vDateShipped, vWarehouseIn);
|
CALL rate_getPrices(vDateShipped, vWarehouseIn);
|
||||||
|
|
||||||
-- Traslado en almacen origen
|
-- Traslado en almacen origen
|
||||||
CREATE OR REPLACE TEMPORARY TABLE tBuy
|
CREATE OR REPLACE TEMPORARY TABLE tBuy
|
||||||
|
@ -84,7 +84,7 @@ BEGIN
|
||||||
WHERE a.available
|
WHERE a.available
|
||||||
ON DUPLICATE KEY UPDATE availableLanding = a.available;
|
ON DUPLICATE KEY UPDATE availableLanding = a.available;
|
||||||
ELSE
|
ELSE
|
||||||
CALL vn.item_getStock(vWarehouseOut, vDateShipped, NULL);
|
CALL item_getStock(vWarehouseOut, vDateShipped, NULL);
|
||||||
|
|
||||||
CREATE OR REPLACE TEMPORARY TABLE tItem
|
CREATE OR REPLACE TEMPORARY TABLE tItem
|
||||||
(UNIQUE INDEX i USING HASH (itemFk))
|
(UNIQUE INDEX i USING HASH (itemFk))
|
||||||
|
@ -97,7 +97,7 @@ BEGIN
|
||||||
FROM tmp.itemList;
|
FROM tmp.itemList;
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
CALL vn.buyUltimateFromInterval(vWarehouseIn,vInventoryDate, vDateLanded);
|
CALL buyUltimateFromInterval(vWarehouseIn,vInventoryDate, vDateLanded);
|
||||||
|
|
||||||
CREATE OR REPLACE TEMPORARY TABLE tTransfer
|
CREATE OR REPLACE TEMPORARY TABLE tTransfer
|
||||||
ENGINE = MEMORY
|
ENGINE = MEMORY
|
||||||
|
@ -145,26 +145,26 @@ BEGIN
|
||||||
b.id buyFkOrigin,
|
b.id buyFkOrigin,
|
||||||
pa.returnCost,
|
pa.returnCost,
|
||||||
b.weight
|
b.weight
|
||||||
FROM vn.item i
|
FROM item i
|
||||||
JOIN tItem ti ON ti.itemFk = i.id
|
JOIN tItem ti ON ti.itemFk = i.id
|
||||||
LEFT JOIN vn.producer p ON p.id = i.producerFk
|
LEFT JOIN producer p ON p.id = i.producerFk
|
||||||
LEFT JOIN vn.itemType it ON it.id = i.typeFk
|
LEFT JOIN itemType it ON it.id = i.typeFk
|
||||||
JOIN vn.itemCategory ic ON ic.id = it.categoryFk
|
JOIN itemCategory ic ON ic.id = it.categoryFk
|
||||||
LEFT JOIN vn.origin o ON o.id = i.originFk
|
LEFT JOIN origin o ON o.id = i.originFk
|
||||||
LEFT JOIN tBuy lb ON lb.itemFk = i.id
|
LEFT JOIN tBuy lb ON lb.itemFk = i.id
|
||||||
LEFT JOIN vn.buy b ON b.id = lb.buyFk
|
LEFT JOIN buy b ON b.id = lb.buyFk
|
||||||
LEFT JOIN vn.packaging pa ON pa.id = b.packagingFk
|
LEFT JOIN packaging pa ON pa.id = b.packagingFk
|
||||||
LEFT JOIN vn.entry e2 ON e2.id = b.entryFk
|
LEFT JOIN entry e2 ON e2.id = b.entryFk
|
||||||
LEFT JOIN vn.supplier s ON s.id = e2.supplierFk
|
LEFT JOIN supplier s ON s.id = e2.supplierFk
|
||||||
LEFT JOIN vn.entry e ON e.id = vSelf
|
LEFT JOIN entry e ON e.id = vSelf
|
||||||
LEFT JOIN vn.travel tr ON tr.id = e.travelFk
|
LEFT JOIN travel tr ON tr.id = e.travelFk
|
||||||
LEFT JOIN vn.agencyMode am ON am.id = tr.agencyModeFk
|
LEFT JOIN agencyMode am ON am.id = tr.agencyModeFk
|
||||||
LEFT JOIN vn.buy b2 ON b2.itemFk = i.id
|
LEFT JOIN buy b2 ON b2.itemFk = i.id
|
||||||
AND b2.entryFk = vSelf
|
AND b2.entryFk = vSelf
|
||||||
LEFT JOIN vn.packaging pa2 ON pa2.id = b.packagingFk
|
LEFT JOIN packaging pa2 ON pa2.id = b.packagingFk
|
||||||
LEFT JOIN tmp.rate r ON TRUE
|
LEFT JOIN tmp.rate r ON TRUE
|
||||||
LEFT JOIN tmp.buyUltimateFromInterval bufi ON bufi.itemFk = i.id
|
LEFT JOIN tmp.buyUltimateFromInterval bufi ON bufi.itemFk = i.id
|
||||||
LEFT JOIN vn.buy b3 ON b3.id = bufi.buyFk
|
LEFT JOIN buy b3 ON b3.id = bufi.buyFk
|
||||||
WHERE ic.display
|
WHERE ic.display
|
||||||
AND NOT e.isRaid
|
AND NOT e.isRaid
|
||||||
AND (ti.visible OR ti.available)
|
AND (ti.visible OR ti.available)
|
||||||
|
@ -172,11 +172,6 @@ BEGIN
|
||||||
|
|
||||||
CREATE INDEX tIndex USING HASH ON tTransfer (itemFk);
|
CREATE INDEX tIndex USING HASH ON tTransfer (itemFk);
|
||||||
|
|
||||||
SET @carriage := 0;
|
|
||||||
SET @comission := 0;
|
|
||||||
SET @packaging := 0;
|
|
||||||
SET @rate3 := 0;
|
|
||||||
SET @cost := 0;
|
|
||||||
SELECT *,
|
SELECT *,
|
||||||
quantity - MOD(quantity , `grouping`) subQuantity,
|
quantity - MOD(quantity , `grouping`) subQuantity,
|
||||||
MOD(quantity, `grouping`) soll,
|
MOD(quantity, `grouping`) soll,
|
||||||
|
|
|
@ -15,7 +15,7 @@ BEGIN
|
||||||
JOIN agencyMode am ON am.id = t.agencyModeFk
|
JOIN agencyMode am ON am.id = t.agencyModeFk
|
||||||
LEFT JOIN ticketState ts ON ts.ticketFk = t.id
|
LEFT JOIN ticketState ts ON ts.ticketFk = t.id
|
||||||
JOIN alertLevel al ON al.id = ts.alertLevel
|
JOIN alertLevel al ON al.id = ts.alertLevel
|
||||||
WHERE al.code = 'PACKED' OR (am.code = 'refund' AND al.code != 'delivered')
|
WHERE (al.code = 'PACKED' OR (am.code = 'refund' AND al.code != 'delivered'))
|
||||||
AND t.id = vTicketFk
|
AND t.id = vTicketFk
|
||||||
AND t.refFk IS NULL
|
AND t.refFk IS NULL
|
||||||
GROUP BY t.id);
|
GROUP BY t.id);
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
-- Place your SQL code here
|
||||||
|
ALTER TABLE IF EXISTS vn2008.dock__ RENAME vn2008.dock;
|
||||||
|
ALTER TABLE IF EXISTS vn2008.dock COMMENT='';
|
||||||
|
|
||||||
|
ALTER TABLE IF EXISTS vn2008.Tramos__ RENAME vn2008.Tramos;
|
||||||
|
ALTER TABLE IF EXISTS vn2008.Tramos COMMENT='';
|
|
@ -0,0 +1 @@
|
||||||
|
ALTER TABLE vn.warehouse AUTO_INCREMENT=92;
|
|
@ -346,5 +346,6 @@
|
||||||
"You cannot update these fields": "No puedes actualizar estos campos",
|
"You cannot update these fields": "No puedes actualizar estos campos",
|
||||||
"CountryFK cannot be empty": "El país no puede estar vacío",
|
"CountryFK cannot be empty": "El país no puede estar vacío",
|
||||||
"Cmr file does not exist": "El archivo del cmr no existe",
|
"Cmr file does not exist": "El archivo del cmr no existe",
|
||||||
"You are not allowed to modify the alias": "No estás autorizado a modificar el alias"
|
"You are not allowed to modify the alias": "No estás autorizado a modificar el alias",
|
||||||
|
"The address of the customer must have information about Incoterms and Customs Agent": "El consignatario del cliente debe tener informado Incoterms y Agente de aduanas"
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,6 +80,6 @@ module.exports = Self => {
|
||||||
|
|
||||||
const content = toCSV(sales);
|
const content = toCSV(sales);
|
||||||
|
|
||||||
return [content, 'text/csv', `inline; filename="doc-${reference}.pdf"`];
|
return [content, 'text/csv', `inline; filename="doc-${reference}.csv"`];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -79,6 +79,6 @@ module.exports = Self => {
|
||||||
ORDER BY s.ticketFk, s.created`, [id]);
|
ORDER BY s.ticketFk, s.created`, [id]);
|
||||||
const content = toCSV(sales);
|
const content = toCSV(sales);
|
||||||
|
|
||||||
return [content, 'text/csv', `inline; filename="doc-${id}.pdf"`];
|
return [content, 'text/csv', `inline; filename="doc-${id}.csv"`];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -40,17 +40,6 @@ table.repeatable > tbody > tr > td {
|
||||||
padding-top: 0.5em;
|
padding-top: 0.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
section.text-area {
|
|
||||||
margin-top: 1em;
|
|
||||||
padding: 0.19em;
|
|
||||||
padding-left: 1em;
|
|
||||||
padding-right: 1em;
|
|
||||||
background-color: #e5e5e5;
|
|
||||||
& > p {
|
|
||||||
word-break: break-all;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.route-block {
|
.route-block {
|
||||||
margin-bottom: 100px;
|
margin-bottom: 100px;
|
||||||
page-break-after: always;
|
page-break-after: always;
|
||||||
|
|
|
@ -128,8 +128,8 @@
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<div v-if="ticket.description" class="text-area">
|
<div v-if="ticket.description">
|
||||||
<p>{{ticket.description}}</p>
|
<p style="word-break: break-all">{{ticket.description}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
const vnReport = require('../../../core/mixins/vn-report.js');
|
const vnReport = require('../../../core/mixins/vn-report.js');
|
||||||
|
const UserError = require('vn-loopback/util/user-error');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'invoice-incoterms',
|
name: 'invoice-incoterms',
|
||||||
|
@ -7,7 +8,10 @@ module.exports = {
|
||||||
this.invoice = await this.findOneFromDef('invoice', [this.reference]);
|
this.invoice = await this.findOneFromDef('invoice', [this.reference]);
|
||||||
this.checkMainEntity(this.invoice);
|
this.checkMainEntity(this.invoice);
|
||||||
this.client = await this.findOneFromDef('client', [this.reference]);
|
this.client = await this.findOneFromDef('client', [this.reference]);
|
||||||
this.incoterms = await this.findOneFromDef('incoterms', [this.reference, this.reference, this.reference, this.reference]);
|
this.incoterms =
|
||||||
|
await this.findOneFromDef('incoterms', [this.reference, this.reference, this.reference, this.reference]);
|
||||||
|
if (!this.incoterms)
|
||||||
|
throw new UserError(`The address of the customer must have information about Incoterms and Customs Agent`);
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
reference: {
|
reference: {
|
||||||
|
|
Loading…
Reference in New Issue