Changes between Version 11 and Version 12 of AdvancedReports


Ignore:
Timestamp:
02/14/23 19:35:21 (17 months ago)
Author:
201065
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AdvancedReports

    v11 v12  
    8282left join (
    8383        select articleid, locationid, coalesce(sum(quantity), 0) as incoming from orderedarticles o
    84         where o.articlestatus='In progress' or o.articlestatus='Delivered'
     84        where o.articlestatus='ORDERED' or o.articlestatus='DELIVERED'
    8585        group by o.articleid, o.locationid
    8686) q2 on q2.articleid=a.articleid and q2.locationid=l.locationid
     
    144144select s.supplierinfo, u.firstname, u.lastname, u.username, coalesce(sum(o2.quantity), 0) as koldostavena, coalesce(sum(o2.quantity*o2.price)) as zarabotkasupp from suppliers s
    145145        left join users u on u.userid=s.userid
    146         left join orders o on o.supplieruserid=s.userid and (o.status='Delivered' or o.status='Processed')
    147         left join orderedarticles o2 on o2.orderid=o.orderid and (o2.articlestatus='Delivered' or o2.articlestatus='Processed')
     146        left join orders o on o.supplieruserid=s.userid and (o.status='DELIVERED' or o.status='PROCESSED')
     147        left join orderedarticles o2 on o2.orderid=o.orderid and (o2.articlestatus='DELIVERED' or o2.articlestatus='PROCESSED')
    148148        group by s.userid, u.userid
    149149        order by zarabotkasupp desc