#6806 fix lastEntriesFilter #2013
|
@ -66,6 +66,7 @@ module.exports = Self => {
|
||||||
cou.country,
|
cou.country,
|
||||||
c.id clientId,
|
c.id clientId,
|
||||||
c.socialName clientSocialName,
|
c.socialName clientSocialName,
|
||||||
|
u.nickname workerSocialName,
|
||||||
SUM(s.quantity * s.price * ( 100 - s.discount ) / 100) amount,
|
SUM(s.quantity * s.price * ( 100 - s.discount ) / 100) amount,
|
||||||
negativeBase.taxableBase,
|
negativeBase.taxableBase,
|
||||||
negativeBase.ticketFk,
|
negativeBase.ticketFk,
|
||||||
|
@ -80,6 +81,7 @@ module.exports = Self => {
|
||||||
JOIN vn.client c ON c.id = t.clientFk
|
JOIN vn.client c ON c.id = t.clientFk
|
||||||
JOIN vn.country cou ON cou.id = c.countryFk
|
JOIN vn.country cou ON cou.id = c.countryFk
|
||||||
LEFT JOIN vn.worker w ON w.id = c.salesPersonFk
|
LEFT JOIN vn.worker w ON w.id = c.salesPersonFk
|
||||||
|
JOIN account.user u ON u.id = w.id
|
||||||
LEFT JOIN (
|
LEFT JOIN (
|
||||||
SELECT ticketFk, taxableBase
|
SELECT ticketFk, taxableBase
|
||||||
FROM tmp.ticketAmount
|
FROM tmp.ticketAmount
|
||||||
|
|
Loading…
Reference in New Issue