Skip to main content
Solved

costs fetched for Work in progress report

  • November 9, 2021
  • 1 reply
  • 118 views

Dinidu Udana
Hero (Employee)
Forum|alt.badge.img+12

Order report > Shop order work in progress report,
what are the data fetching criteria for this report?

Best answer by Thilan Lasitha

Hi @Dinidu Udana 

Below is the query which takes data into the report and there is a condition for the state of the SO.

It should be in 'Started 'state of else in 'Parked 'state if the previous state was 'Started'.

 

SELECT

         i.contract,

         Site_API.Get_Description(i.contract) site_description,

         i.part_no,

         i.description,

         i.part_product_family,

         Inventory_Product_Family_API.Get_Description(part_product_family) product_family_description,

         i.part_product_code,

         Inventory_Product_Code_API.Get_Description(part_product_code) product_code_description,

         i.Planner_Buyer,

         Inventory_Part_Planner_API.Get_Buyer_Name(i.Planner_Buyer) planner,

         s.order_no,

         s.release_no,

         s.sequence_no,

         s.state

      FROM inventory_part i, shop_ord s, user_allowed_site u

      WHERE  s.contract LIKE contract_

      AND    i.planner_buyer LIKE planner_

      AND    Report_SYS.Parse_Parameter(s.part_no, from_part_no_) = 'TRUE'

      AND    i.part_no = s.part_no

      AND    i.contract = s.contract

      AND    i.contract = u.contract

      AND    u.userid = user_

      AND    (s.objstate IN ('Started')OR (s.objstate = 'Parked' AND s.state_before_park = 'Started'))

      ORDER BY s.contract, i.planner_buyer, s.part_no;

View original
Did this topic help you find an answer to your question?
This topic has been closed for comments

1 reply

Forum|alt.badge.img+7
  • Hero (Employee)
  • 11 replies
  • Answer
  • November 9, 2021

Hi @Dinidu Udana 

Below is the query which takes data into the report and there is a condition for the state of the SO.

It should be in 'Started 'state of else in 'Parked 'state if the previous state was 'Started'.

 

SELECT

         i.contract,

         Site_API.Get_Description(i.contract) site_description,

         i.part_no,

         i.description,

         i.part_product_family,

         Inventory_Product_Family_API.Get_Description(part_product_family) product_family_description,

         i.part_product_code,

         Inventory_Product_Code_API.Get_Description(part_product_code) product_code_description,

         i.Planner_Buyer,

         Inventory_Part_Planner_API.Get_Buyer_Name(i.Planner_Buyer) planner,

         s.order_no,

         s.release_no,

         s.sequence_no,

         s.state

      FROM inventory_part i, shop_ord s, user_allowed_site u

      WHERE  s.contract LIKE contract_

      AND    i.planner_buyer LIKE planner_

      AND    Report_SYS.Parse_Parameter(s.part_no, from_part_no_) = 'TRUE'

      AND    i.part_no = s.part_no

      AND    i.contract = s.contract

      AND    i.contract = u.contract

      AND    u.userid = user_

      AND    (s.objstate IN ('Started')OR (s.objstate = 'Parked' AND s.state_before_park = 'Started'))

      ORDER BY s.contract, i.planner_buyer, s.part_no;


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings