This commit is contained in:
parent
75a4d6947f
commit
9fcad457a7
|
@ -69,7 +69,8 @@ module.exports = Self => {
|
|||
'reason',
|
||||
LEFT(reason,LENGTH(reason) - 2)
|
||||
)
|
||||
))errors
|
||||
)
|
||||
)errors
|
||||
FROM (
|
||||
SELECT ticketFk,
|
||||
CONCAT_WS('',
|
||||
|
@ -107,14 +108,13 @@ module.exports = Self => {
|
|||
AND itc.countryFk = su.countryFk
|
||||
LEFT JOIN vn.invoiceOutSerial ios ON ios.taxAreaFk = 'WORLD'
|
||||
AND ios.code = invoiceSerial(t.clientFk, t.companyFk, 'M')
|
||||
WHERE (al.code = 'PACKED'
|
||||
OR (am.code = 'refund' AND al.code != 'delivered'))
|
||||
WHERE (al.code = 'PACKED' OR (am.code = 'refund' AND al.code <> 'delivered'))
|
||||
AND DATE(t.shipped) BETWEEN DATE_ADD(?, INTERVAL -2 DAY) AND util.dayEnd(?)
|
||||
AND t.refFk IS NULL
|
||||
AND IFNULL(a.hasDailyInvoice, co.hasDailyInvoice)
|
||||
GROUP BY ticketFk
|
||||
HAVING hasErrorToInvoice
|
||||
OR NOT hasErrorTaxDataChecked
|
||||
OR hasErrorTaxDataChecked
|
||||
OR hasErrorDeleted
|
||||
OR hasErrorItemTaxCountry
|
||||
OR hasErrorAddress
|
||||
|
|
Loading…
Reference in New Issue