Merge branch 'test' into dev
gitea/salix/dev This commit has test failures Details

This commit is contained in:
Gerard 2019-04-01 08:43:22 +02:00
commit 164093af48
3 changed files with 29 additions and 34 deletions

View File

@ -22,7 +22,7 @@
<vn-table model="model">
<vn-thead>
<vn-tr>
<vn-th>Date</vn-th>
<vn-th expand>Date</vn-th>
<vn-th number order="DESC">Ticket/Entry</vn-th>
<vn-th>State</vn-th>
<vn-th>Reference</vn-th>
@ -40,7 +40,7 @@
ng-repeat="sale in sales"
vn-repeat-last
on-last="$ctrl.scrollToLine()">
<vn-td>
<vn-td expand>
<span class="chip"
ng-class="::{warning: $ctrl.isToday(sale.date)}">
{{::sale.date | dateTime:'dd/MM/yyyy' }}

View File

@ -82,7 +82,8 @@ module.exports = {
return database.pool.query(
`SELECT
t.id,
t.shipped
t.shipped,
t.companyFk
FROM ticket t
JOIN client c ON c.id = t.clientFk
JOIN account.user u ON u.id = c.id
@ -122,17 +123,10 @@ module.exports = {
i.inkFk,
s.ticketFk,
tcl.code vatType,
ibwg.ediBotanic,
ppa.denomination,
pp.number passportNumber,
be.isProtectedZone,
c.code AS countryCode,
ita.tag1,
ita.val1,
ita.tag2,
ita.val2,
ita.tag3,
ita.val3
ibwg.ediBotanic, ppa.denomination, pp.number passportNumber,
be.isProtectedZone, c.code AS countryCode,
i.tag5, i.value5,
i.tag6, i.value6, i.tag7, i.value7
FROM vn.sale s
LEFT JOIN saleComponent sc ON sc.saleFk = s.id
LEFT JOIN componentRate cr ON cr.id = sc.componentFk
@ -146,7 +140,6 @@ module.exports = {
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 itemTagArranged ita ON ita.itemFk = s.itemFk
LEFT JOIN plantpassport pp ON pp.producerFk = i.producerFk
LEFT JOIN plantpassportAuthority ppa ON ppa.id = pp.plantpassportAuthorityFk
LEFT JOIN itemBotanicalWithGenus ibwg ON ibwg.itemFk = i.id

View File

@ -46,12 +46,14 @@ module.exports = {
FROM client c
JOIN account.user u ON u.id = c.id
JOIN country ct ON ct.id = c.countryFk
JOIN mandate m ON m.clientFk = c.id AND m.finished IS NULL
JOIN mandate m ON m.clientFk = c.id
AND m.companyFk = ? AND m.finished IS NULL
JOIN supplier s ON s.id = m.companyFk
JOIN country sc ON sc.id = s.countryFk
JOIN province sp ON sp.id = s.provinceFk
LEFT JOIN province p ON p.id = c.provinceFk
WHERE m.companyFk = ? AND c.id = ?`, [companyFk, clientFk]);
WHERE m.companyFk = ? AND c.id = ?
ORDER BY m.created DESC LIMIT 1`, [companyFk, companyFk, clientFk]);
},
dated: () => {
return strftime('%d-%m-%Y', new Date());