hello,
In my projects I need to count the cable footage for installation, so I noticed a need to change the export SQL of the list of elements used.
With this I also added the unit field, as some items are obviously supplied in pieces, meters, packages or boxes.
So in each element used I use both fields, the unit and the quantity.
The SQL file that I changed still adds the items into a total, but at the same time it gives me the quantity that I add, for example in cables that connect motors and sensors and the like.
follow code.
SELECT manufacturer, description, designation, machine_manufacturer_reference, supplier, SUM(quantity) AS total_quantity, unity, COUNT(*) AS designation_qty FROM element_nomenclature_view WHERE ( element_type = 'terminal' OR element_type = 'simple' OR element_sub_type = 'commutator' OR element_sub_type = 'coil' OR element_sub_type = 'protection') GROUP BY designation ORDER BY manufacturer, description, designation, machine_manufacturer_reference, supplier, quantity, unity
and also an example project and the CSV file.
I believe there is something to improve, and many of the elements I haven't finished naming yet, but for my use I'm already happy.
Hope this helps