Move pages to tabs
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"gitSyncId": "3c80e1fdb2304c28beaba450_9c5cb3e8-3419-484f-bffa-e79e23768bfe",
|
||||
"id": "Pending POs - All_pending_pos_alx_pending",
|
||||
"pluginId": "postgres-plugin",
|
||||
"pluginType": "DB",
|
||||
"unpublishedAction": {
|
||||
"actionConfiguration": {
|
||||
"body": "select * from mpe.get_prototype_po_dashboard_data(array['25502', '27985']::text[]);\n",
|
||||
"encodeParamsToggle": true,
|
||||
"paginationType": "NONE",
|
||||
"pluginSpecifiedTemplates": [
|
||||
{
|
||||
"value": true
|
||||
}
|
||||
],
|
||||
"timeoutInMillisecond": 10000
|
||||
},
|
||||
"confirmBeforeExecute": false,
|
||||
"datasource": {
|
||||
"id": "xTuple_Sandbox",
|
||||
"isAutoGenerated": false,
|
||||
"name": "xTuple_Sandbox",
|
||||
"pluginId": "postgres-plugin"
|
||||
},
|
||||
"dynamicBindingPathList": [],
|
||||
"name": "pending_pos_alx_pending",
|
||||
"pageId": "Pending POs - All",
|
||||
"runBehaviour": "AUTOMATIC",
|
||||
"userSetOnLoad": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
select * from mpe.get_prototype_po_dashboard_data(array['25502', '27985']::text[]);
|
||||
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"gitSyncId": "3c80e1fdb2304c28beaba450_1cad4bf5-17c0-4be7-b37a-4bfd4c61ddd4",
|
||||
"id": "Pending POs - All_pending_pos_ml_pending",
|
||||
"pluginId": "postgres-plugin",
|
||||
"pluginType": "DB",
|
||||
"unpublishedAction": {
|
||||
"actionConfiguration": {
|
||||
"body": "select * from mpe.get_prototype_po_dashboard_data(array['37111']::text[]);",
|
||||
"encodeParamsToggle": true,
|
||||
"paginationType": "NONE",
|
||||
"pluginSpecifiedTemplates": [
|
||||
{
|
||||
"value": true
|
||||
}
|
||||
],
|
||||
"timeoutInMillisecond": 10000
|
||||
},
|
||||
"confirmBeforeExecute": false,
|
||||
"datasource": {
|
||||
"id": "xTuple_Sandbox",
|
||||
"isAutoGenerated": false,
|
||||
"name": "xTuple_Sandbox",
|
||||
"pluginId": "postgres-plugin"
|
||||
},
|
||||
"dynamicBindingPathList": [],
|
||||
"name": "pending_pos_ml_pending",
|
||||
"pageId": "Pending POs - All",
|
||||
"runBehaviour": "AUTOMATIC",
|
||||
"userSetOnLoad": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
select * from mpe.get_prototype_po_dashboard_data(array['37111']::text[]);
|
||||
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"gitSyncId": "3c80e1fdb2304c28beaba450_de156d2b-c302-4b7b-bc7d-6e150866194f",
|
||||
"id": "Pending POs - All_pending_pos_slx_pending",
|
||||
"pluginId": "postgres-plugin",
|
||||
"pluginType": "DB",
|
||||
"unpublishedAction": {
|
||||
"actionConfiguration": {
|
||||
"body": "select * from mpe.get_prototype_po_dashboard_data(array['34487','35355']::text[]);",
|
||||
"encodeParamsToggle": true,
|
||||
"paginationType": "NONE",
|
||||
"pluginSpecifiedTemplates": [
|
||||
{
|
||||
"value": true
|
||||
}
|
||||
],
|
||||
"timeoutInMillisecond": 10000
|
||||
},
|
||||
"confirmBeforeExecute": false,
|
||||
"datasource": {
|
||||
"id": "xTuple_Sandbox",
|
||||
"isAutoGenerated": false,
|
||||
"name": "xTuple_Sandbox",
|
||||
"pluginId": "postgres-plugin"
|
||||
},
|
||||
"dynamicBindingPathList": [],
|
||||
"name": "pending_pos_slx_pending",
|
||||
"pageId": "Pending POs - All",
|
||||
"runBehaviour": "AUTOMATIC",
|
||||
"userSetOnLoad": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
select * from mpe.get_prototype_po_dashboard_data(array['34487','35355']::text[]);
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,149 @@
|
||||
SELECT
|
||||
datay.*,
|
||||
ARRAY_TO_STRING(dataz.wo_item_number, ',') AS wo_item,
|
||||
ARRAY_TO_STRING(dataz.work_orders, ',') AS wo_demanding,
|
||||
dataz.total_demand AS wo_total_demand,
|
||||
uom_name AS uom
|
||||
FROM (
|
||||
SELECT
|
||||
item_number AS matl,
|
||||
classcode_code AS matl_classcode,
|
||||
item_descrip1 AS matl_desc,
|
||||
item_descrip2 AS matl_spec,
|
||||
itemsite_qtyonhand AS qoh,
|
||||
SUM(CASE poh.pohead_status WHEN 'O' THEN 1 ELSE 0 END) AS po_released,
|
||||
SUM(CASE poh.pohead_status WHEN 'U' THEN 1 ELSE 0 END) AS po_opened,
|
||||
SUM(CASE poh.pohead_status WHEN 'C' THEN 1 ELSE 0 END) AS po_closed,
|
||||
datax.poitem_duedate AS poitem_due
|
||||
FROM item
|
||||
JOIN itemsite
|
||||
ON item.item_id = itemsite.itemsite_item_id
|
||||
AND itemsite_warehous_id = 35
|
||||
JOIN classcode
|
||||
ON item.item_classcode_id = classcode.classcode_id
|
||||
JOIN LATERAL (
|
||||
SELECT DISTINCT
|
||||
itemsite_id AS pohc_itemsite_id,
|
||||
pohead_number,
|
||||
pohead_status
|
||||
FROM poitem
|
||||
JOIN pohead
|
||||
ON pohead.pohead_id = poitem.poitem_pohead_id
|
||||
WHERE poitem_itemsite_id = itemsite.itemsite_id
|
||||
) AS poh
|
||||
ON poh.pohc_itemsite_id = itemsite.itemsite_id
|
||||
LEFT JOIN LATERAL (
|
||||
SELECT DISTINCT
|
||||
itemsite_id,
|
||||
poitem_duedate
|
||||
FROM poitem
|
||||
JOIN pohead
|
||||
ON poitem.poitem_pohead_id = pohead.pohead_id
|
||||
AND pohead.pohead_status = 'O'
|
||||
WHERE poitem_itemsite_id = itemsite.itemsite_id
|
||||
ORDER BY poitem_duedate
|
||||
LIMIT 1
|
||||
) AS datax
|
||||
ON datax.itemsite_id = itemsite.itemsite_id
|
||||
|
||||
WHERE item_id IN (
|
||||
SELECT DISTINCT wmtlit.item_id
|
||||
FROM item
|
||||
JOIN mpe.itemext
|
||||
ON item.item_id = itemext.itemext_item_id
|
||||
JOIN bomhead
|
||||
ON bomhead_item_id = item.item_id
|
||||
JOIN rev
|
||||
ON bomhead_rev_id = rev_id
|
||||
AND rev_status = 'P'
|
||||
JOIN itemsite
|
||||
ON item.item_id = itemsite.itemsite_item_id
|
||||
AND itemsite_warehous_id = 35
|
||||
JOIN wo
|
||||
ON wo_status IN ('E','R','I')
|
||||
AND wo_itemsite_id = itemsite.itemsite_id
|
||||
AND wo_bom_rev_id = bomhead_rev_id
|
||||
JOIN womatl
|
||||
ON wo_id = womatl_wo_id
|
||||
JOIN itemsite AS wmtlits
|
||||
ON womatl_itemsite_id = wmtlits.itemsite_id
|
||||
JOIN item AS wmtlit
|
||||
ON wmtlits.itemsite_item_id = wmtlit.item_id
|
||||
AND wmtlit.item_type = 'P'
|
||||
WHERE array['35313']::text[] && itemext.itemext_root_bom
|
||||
|
||||
UNION
|
||||
|
||||
SELECT itemsite.itemsite_item_id
|
||||
FROM poitem
|
||||
JOIN itemsite
|
||||
ON poitem.poitem_itemsite_id = itemsite.itemsite_id
|
||||
WHERE poitem.poitem_expcat_id = 29
|
||||
)
|
||||
GROUP BY
|
||||
item_number,
|
||||
classcode_code,
|
||||
item_descrip1,
|
||||
item_descrip2,
|
||||
itemsite_qtyonhand,
|
||||
datax.poitem_duedate
|
||||
) AS datay
|
||||
|
||||
LEFT JOIN (
|
||||
SELECT DISTINCT ON (wmtlit.item_id)
|
||||
ARRAY[(item.item_number || 'R' || rev.rev_number)]::text[] AS wo_item_number,
|
||||
ARRAY[formatwonumber(womatl_wo_id)] AS work_orders,
|
||||
wmtlit.item_number,
|
||||
ROUND(
|
||||
SUM(womatl_qtyreq - womatl_qtyiss)
|
||||
* itemuomtouomratio(
|
||||
wmtlit.item_id,
|
||||
womatl_uom_id,
|
||||
wmtlit.item_inv_uom_id
|
||||
),
|
||||
2
|
||||
) AS total_demand
|
||||
FROM item
|
||||
JOIN mpe.itemext
|
||||
ON item.item_id = itemext.itemext_item_id
|
||||
JOIN bomhead
|
||||
ON bomhead_item_id = item.item_id
|
||||
JOIN rev
|
||||
ON bomhead_rev_id = rev_id
|
||||
AND rev_status = 'P'
|
||||
JOIN itemsite
|
||||
ON item.item_id = itemsite.itemsite_item_id
|
||||
AND itemsite_warehous_id = 35
|
||||
JOIN wo
|
||||
ON wo_status IN ('E','R','I')
|
||||
AND wo_itemsite_id = itemsite.itemsite_id
|
||||
AND wo_bom_rev_id = bomhead_rev_id
|
||||
JOIN womatl
|
||||
ON wo_id = womatl_wo_id
|
||||
JOIN itemsite AS wmtlits
|
||||
ON womatl_itemsite_id = wmtlits.itemsite_id
|
||||
JOIN item AS wmtlit
|
||||
ON wmtlits.itemsite_item_id = wmtlit.item_id
|
||||
AND wmtlit.item_type = 'P'
|
||||
WHERE array['35313']::text[] && itemext.itemext_root_bom
|
||||
GROUP BY
|
||||
item.item_number,
|
||||
rev.rev_number,
|
||||
womatl_wo_id,
|
||||
wmtlit.item_id,
|
||||
wmtlit.item_number,
|
||||
womatl_uom_id,
|
||||
wmtlit.item_inv_uom_id
|
||||
) AS dataz
|
||||
ON datay.matl = dataz.item_number
|
||||
|
||||
JOIN item AS wmtlitem
|
||||
ON datay.matl = wmtlitem.item_number
|
||||
JOIN uom
|
||||
ON wmtlitem.item_inv_uom_id = uom.uom_id
|
||||
|
||||
WHERE
|
||||
(dataz.total_demand IS NULL)
|
||||
OR (datay.qoh < 2.0 * dataz.total_demand)
|
||||
|
||||
ORDER BY datay.matl
|
||||
Reference in New Issue
Block a user