Solved

Query to return Inventory lines from appointments

  • 30 August 2023
  • 1 reply
  • 42 views

What is the best way to get a list of all the lines where the LINE TYPE = Inventory Item and the Estimated Quantity is not equal (<>) to the Estimated Quantity as below? This was an example where 2 grinders should have been taken our of stock but only 1 was, I need to know how many other lines are affected in the same way. I will then have to compare this to the appointment notes and the actual quantity billed. From what I can gather it will bill the actual quantity.

 

 

icon

Best answer by Brian Stevens 30 August 2023, 06:37

View original

1 reply

Userlevel 6
Badge +4

I think you mistyped that request as the picture seems to indicate that you want to see Actual Quantity <> Estimated Quantity but you said Estimated Quantity is not equal (<>) to the Estimated Quantity.

In this screen (Appointments - FS300200), the Line Type is a predefined list where the Line Type of Inventory Item is “SLPRO” in the database.  You can make your GI as complex as you like, but in the most basic sense the GI would need to set 2 conditions.  One for Line Type and another to compare the 2 fields.

It seems you would want to create a Generic Inquiry of FSAppointmentDet records where FSAppointmentDet.LineType = “SLPRO”, and EstimatedQty <> ActualQty.

To do this:

  • Copied the GI for FS-Appointment to a new GI called FS-AppointmentDet
  • Add the table PX.Objects.FS.FSAppointmentDet
  • Add a relation between FSAppointment and FSAppointmentDet joining SrvOrdType and RefNbr by the same fields of each table
  • Add columns into the Results tab for FSAppointmentDet for the fields LineType, EstimatedQty, and ActualQty
  • Add a condition for FSAppointmentDet.EstimatedQty DOES NOT EQUAL FSAppointmentDet.ActualQty
  • EITHER - view the GI and filter on LineType -or- Add a condition for FSAppointmentDet.LineType EQUAL “SLPRO” (if you always want to view for just Inventory Items)

I did this in 2023r1 and wrote the instructions as I completed each step, but my sales demo data does not have inventory items to return the list.  It contains only Line Type of Service, but Sales Demo does contain records where your two fields do not match, so I’m pretty confident the instructions above will get you what you need.  Once you have a working GI, you can continue to adjust it to fit your needs.

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved