Subversion Repositories SmartDukaan

Rev

Rev 37778 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 37778 Rev 37805
Line 135... Line 135...
135
SELECT tl.id, tl.item_id, i.catalog_item_id
135
SELECT tl.id, tl.item_id, i.catalog_item_id
136
FROM catalog.tag_listing tl
136
FROM catalog.tag_listing tl
137
JOIN catalog.item i ON i.id = tl.item_id
137
JOIN catalog.item i ON i.id = tl.item_id
138
WHERE tl.tag_id = 4                       -- default_fofo; tag 7 'test' has no rows
138
WHERE tl.tag_id = 4                       -- default_fofo; tag 7 'test' has no rows
139
  AND tl.active = 1
139
  AND tl.active = 1
-
 
140
  -- aged from the later of start and last re-activation (2026-09-28)
-
 
141
  AND GREATEST(tl.start_date, COALESCE(tl.last_activated, tl.start_date))
140
  AND tl.start_date < CURDATE() - INTERVAL 24 MONTH
142
      < CURDATE() - INTERVAL 24 MONTH
141
  -- No brand exclusion. The internal pseudo-brands (Dummy, FOC, FOC HANDSET,
143
  -- No brand exclusion. The internal pseudo-brands (Dummy, FOC, FOC HANDSET,
142
  -- Live Demo) are swept like anything else, by instruction 2026-09-10.
144
  -- Live Demo) are swept like anything else, by instruction 2026-09-10.
143
  -- no SmartDukaan stock
145
  -- no SmartDukaan stock
144
  AND NOT EXISTS (
146
  AND NOT EXISTS (
145
        SELECT 1 FROM warehouse.view_availability va
147
        SELECT 1 FROM warehouse.view_availability va