{ "gitSyncId": "6978a0503f1cbf3622b556da_bb85ebfe-2773-4f11-880e-df88217f957d", "id": "Sales - Units Ordered_units_ordered_by_series", "pluginId": "postgres-plugin", "pluginType": "DB", "unpublishedAction": { "actionConfiguration": { "body": "SELECT \nCASE WHEN item_number IN ('16688','25020') THEN 'XR Series'\nWHEN item_number IN ('22351','24952') THEN 'SL Series'\nWHEN item_number IN ('17861','25021','29243','29752') THEN 'TS Series'\nWHEN item_number IN ('17862') THEN 'MS Series'\nWHEN item_number IN ('17863') THEN 'MT Series'\nWHEN item_number IN ('17873') THEN 'Harmonic Neutralizer'\n\nELSE 'None'\nEND AS \"Product\",\nROUND(SUM(coitem_qtyord),0) as \"Qty Ordered\"\nFROM coitem LEFT OUTER JOIN cohead ON cohead_id=coitem_cohead_id\nLEFT OUTER JOIN itemsite ON coitem_itemsite_id = itemsite_id\nLEFT OUTER JOIN item ON item_id = itemsite_item_id\nLEFT OUTER JOIN charass AS reportpower ON \n(coitem_id = reportpower.charass_target_id \nAND reportpower.charass_target_type = 'SI'\nAND reportpower.charass_char_id = 25)\nWHERE item_number IN ('16688','17861','17862','17863','22351','25020','25144','25147','25021','24952','17873','29243','29752')\nAND (coitem_status <> 'X') \nAND cohead_id NOT IN(SELECT cohead_id from rahead LEFT OUTER JOIN cohead ON rahead_new_cohead_id=cohead_id WHERE cohead_id IS NOT NULL)\nAND coitem_price != 0\nAND reportpower.charass_value IS NOT NULL\nAND (\n\tNULLIF('{{SeriesDateFrom.selectedDate}}','') IS NULL\n\tOR NULLIF('{{SeriesDateTo.selectedDate}}','') IS NULL\n\tOR cohead_orderdate BETWEEN\n\tNULLIF('{{SeriesDateFrom.selectedDate}}','')::date\n\tAND NULLIF('{{SeriesDateTo.selectedDate}}','')::date\n)\nGROUP BY \"Product\"\nORDER BY \"Product\"\n", "encodeParamsToggle": true, "paginationType": "NONE", "pluginSpecifiedTemplates": [ { "value": true } ], "timeoutInMillisecond": 10000 }, "confirmBeforeExecute": false, "datasource": { "id": "xTuple_GoLive", "isAutoGenerated": false, "name": "xTuple_GoLive", "pluginId": "postgres-plugin" }, "dynamicBindingPathList": [ { "key": "body" } ], "name": "units_ordered_by_series", "pageId": "Sales - Units Ordered", "runBehaviour": "AUTOMATIC", "userSetOnLoad": false } }