Merge pull request 'refs #6791 remake negativeBases' (!2017) from 6791-negativeNickname into dev
gitea/salix/pipeline/head This commit looks good Details

Reviewed-on: #2017
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
Carlos Satorres 2024-02-09 11:49:37 +00:00
commit 3ee63e489e
1 changed files with 2 additions and 0 deletions

View File

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