Updated delivery note with botanical field
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
727fcddc3d
commit
3625ea2c36
|
@ -99,13 +99,8 @@ module.exports = {
|
|||
getBotanical() {
|
||||
let phytosanitary = [];
|
||||
this.sales.forEach(sale => {
|
||||
let itemPhytosanitary;
|
||||
if (sale.latinGenusName || sale.latinSpeciesName)
|
||||
itemPhytosanitary = [sale.latinGenusName, sale.latinSpeciesName].filter(Boolean).join(' ');
|
||||
else if (sale.botanical)
|
||||
itemPhytosanitary = sale.botanical;
|
||||
|
||||
phytosanitary.push(itemPhytosanitary);
|
||||
if (sale.botanical)
|
||||
phytosanitary.push(sale.botanical);
|
||||
});
|
||||
|
||||
return phytosanitary.filter((item, index) =>
|
||||
|
|
|
@ -14,9 +14,7 @@ SELECT
|
|||
i.inkFk,
|
||||
s.ticketFk,
|
||||
tcl.code vatType,
|
||||
ib.botanical,
|
||||
eg.latinGenusName,
|
||||
es.latinSpeciesName,
|
||||
ib.ediBotanic botanical,
|
||||
i.tag5,
|
||||
i.value5,
|
||||
i.tag6,
|
||||
|
@ -37,10 +35,8 @@ FROM vn.sale s
|
|||
LEFT JOIN itemTaxCountry itc ON itc.itemFk = i.id
|
||||
AND itc.countryFk = sp.countryFk
|
||||
LEFT JOIN taxClass tcl ON tcl.id = itc.taxClassFk
|
||||
LEFT JOIN itemBotanical ib ON ib.itemFk = i.id
|
||||
LEFT JOIN itemBotanicalWithGenus ib ON ib.itemFk = i.id
|
||||
AND ic.code = 'plant'
|
||||
LEFT JOIN ediGenus eg ON eg.id = ib.genusFk
|
||||
LEFT JOIN ediSpecie es ON es.id = ib.specieFk
|
||||
WHERE s.ticketFk = ?
|
||||
GROUP BY s.id
|
||||
ORDER BY (it.isPackaging), s.concept, s.itemFk
|
Loading…
Reference in New Issue