refs #7393 Modify night ticket closing report
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Ivan Mas 2024-05-20 15:17:41 +02:00
parent 38b1e48959
commit 52400ab626
2 changed files with 7 additions and 3 deletions

View File

@ -71,7 +71,8 @@ module.exports = Self => {
JSON_ARRAYAGG(
JSON_OBJECT(
'ticketId', ticketFk,
'reason', reason
'reason', reason,
'clientId', clientFk
)
)
)errors
@ -83,7 +84,8 @@ module.exports = Self => {
IF(hasErrorDeleted, 'Eliminado', NULL),
IF(hasErrorItemTaxCountry, 'Impuesto no informado', NULL),
IF(hasErrorAddress, 'Sin dirección', NULL),
IF(hasErrorInfoTaxAreaWorld, 'Datos exportaciones', NULL)) reason
IF(hasErrorInfoTaxAreaWorld, 'Datos exportaciones', NULL)) reason,
clientFk
FROM (
SELECT t.id ticketFk,
SUM(NOT c.hasToInvoice) hasErrorToInvoice,
@ -93,7 +95,8 @@ module.exports = Self => {
SUM(a.id IS NULL) hasErrorAddress,
SUM(ios.code IS NOT NULL
AND(ad.customsAgentFk IS NULL
OR ad.incotermsFk IS NULL)) hasErrorInfoTaxAreaWorld
OR ad.incotermsFk IS NULL)) hasErrorInfoTaxAreaWorld,
t.clientFk clientFk
FROM ticket t
LEFT JOIN address ad ON ad.id = t.addressFk
JOIN sale s ON s.ticketFk = t.id

View File

@ -7,6 +7,7 @@
<div v-for="ticket in tickets" class="grid-block vn-px-ml">
<p v-if="ticket.ticketId"><b>{{ $t('ticketId') }}:</b> {{ticket.ticketId}}</p>
<p v-if="ticket.reason"><b>{{ $t('reason') }}:</b> {{ticket.reason}}</p>
<p v-if="ticket.clientId"><b>{{ $t('clientId')}}</b>{{ticket.clientId}}</p>
<hr>
</div>
</div>