src-db/database/model/views/C_INVOICE_PRODMONTH.xml
changeset 7031 2aac4501bbd5
parent 7022 825f121b6164
child 9910 6767429386d8
equal deleted inserted replaced
7030:3ca2714ac0ef 7031:2aac4501bbd5
     8 CASE sum(il.linenetamt)
     8 CASE sum(il.linenetamt)
     9 WHEN 0 THEN 0
     9 WHEN 0 THEN 0
    10 ELSE 100 - round((sum(il.linenetamt) - sum(il.lineoverlimitamt)) / sum(il.linenetamt) * 100, 2)
    10 ELSE 100 - round((sum(il.linenetamt) - sum(il.lineoverlimitamt)) / sum(il.linenetamt) * 100, 2)
    11 END AS lineoverlimit, sum(il.qtyinvoiced) AS qtyinvoiced
    11 END AS lineoverlimit, sum(il.qtyinvoiced) AS qtyinvoiced
    12 FROM c_invoiceline_v2 il
    12 FROM c_invoiceline_v2 il
    13 GROUP BY il.ad_client_id, il.ad_org_id, il.m_product_category_id, TRUNC(il.dateinvoiced, 'MM')
    13 GROUP BY il.ad_client_id, il.ad_org_id, il.m_product_category_id, TRUNC(il.dateinvoiced, 'MM')]]></view>
    14 ]]></view>
       
    15   </database>
    14   </database>