SELECT DISTINCT -1 AS id,
10 AS type,
'0' AS subtype,
- 1 AS section,
+ 2 AS section,
<? value("quotes") ?> AS section_qtdisplayrole,
<? value("quotes") ?> AS name,
NULL::text AS status,
SELECT quhead_id AS id,
15 AS type,
quhead_number AS subtype,
- 1 AS section,
+ 2 AS section,
<? value("quotes") ?> AS section_qtdisplayrole,
quhead_number AS name,
CASE WHEN (quhead_status = 'C') THEN
SELECT quitem_id AS id,
17 AS type,
quhead_number AS subtype,
- 1 AS section,
+ 2 AS section,
<? value("quotes") ?> AS section_qtdisplayrole,
quitem_linenumber::text AS name,
CASE WHEN (quhead_status = 'C') THEN
SELECT quhead_id AS id,
18 AS type,
quhead_number AS subtype,
- 1 AS section,
+ 2 AS section,
<? value("quotes") ?> AS section_qtdisplayrole,
<? value("total") ?> AS name,
NULL AS status,
SELECT -1 AS id,
19 AS type,
MAX(quhead_number) AS subtype,
- 1 AS section,
+ 2 AS section,
<? value("quotes") ?> AS section_qtdisplayrole,
<? value("total") ?> || ' ' || <? value("quotes") ?> AS name,
NULL AS status,
SELECT DISTINCT -1 AS id,
20 AS type,
'0' AS subtype,
- 2 AS section,
+ 3 AS section,
<? value("sos") ?> AS section_qtdisplayrole,
<? value("sos") ?> AS name,
NULL::text AS status,
SELECT cohead_id AS id,
25 AS type,
cohead_number::text AS subtype,
- 2 AS section,
+ 3 AS section,
<? value("sos") ?> AS section_qtdisplayrole,
cohead_number::text AS name,
COALESCE((SELECT
SELECT coitem_id AS id,
27 AS type,
cohead_number::text AS subtype,
- 2 AS section,
+ 3 AS section,
<? value("sos") ?> AS section_qtdisplayrole,
coitem_linenumber::text AS name,
CASE WHEN (coitem_status = 'O') THEN
SELECT cohead_id AS id,
28 AS type,
cohead_number::text AS subtype,
- 2 AS section,
+ 3 AS section,
<? value("sos") ?> AS section_qtdisplayrole,
<? value("total") ?> AS name,
NULL AS status,
SELECT -1 AS id,
29 AS type,
MAX(cohead_number::text) AS subtype,
- 2 AS section,
+ 3 AS section,
<? value("sos") ?> AS section_qtdisplayrole,
<? value("total") ?> || ' ' || <? value("sos") ?> AS name,
NULL AS status,
SELECT DISTINCT -1 AS id,
30 AS type,
'0' AS subtype,
- 3 AS section,
+ 4 AS section,
<? value("invoices") ?> AS section_qtdisplayrole,
<? value("invoices") ?> AS name,
NULL::text AS status,
SELECT invchead_id AS id,
35 AS type,
invchead_invcnumber::text AS subtype,
- 3 AS section,
+ 4 AS section,
<? value("invoices") ?> AS section_qtdisplayrole,
invchead_invcnumber::text AS name,
CASE WHEN (invchead_posted) THEN
SELECT invcitem_id AS id,
37 AS type,
invchead_invcnumber::text AS subtype,
- 3 AS section,
+ 4 AS section,
<? value("invoices") ?> AS section_qtdisplayrole,
invcitem_linenumber::text AS name,
CASE WHEN (invchead_posted) THEN
SELECT invchead_id AS id,
38 AS type,
invchead_invcnumber::text AS subtype,
- 3 AS section,
+ 4 AS section,
<? value("invoices") ?> AS section_qtdisplayrole,
<? value("total") ?> AS name,
NULL AS status,
SELECT -1 AS id,
39 AS type,
MAX(invchead_invcnumber::text) AS subtype,
- 3 AS section,
+ 4 AS section,
<? value("invoices") ?> AS section_qtdisplayrole,
<? value("total") ?> || ' ' || <? value("invoices") ?> AS name,
NULL AS status,
SELECT DISTINCT -1 AS id,
40 AS type,
'0' AS subtype,
- 4 AS section,
+ 5 AS section,
<? value("wos") ?> AS section_qtdisplayrole,
<? value("wos") ?> AS name,
NULL::text AS status,
SELECT wo_id AS id,
45 AS type,
formatWoNumber(wo_id) AS subtype,
- 4 AS section,
+ 5 AS section,
<? value("wos") ?> AS section_qtdisplayrole,
formatWoNumber(wo_id) AS name,
CASE WHEN (wo_status = 'O') THEN
SELECT -1 AS id,
49 AS type,
MAX(formatWoNumber(wo_id)) AS subtype,
- 4 AS section,
+ 5 AS section,
<? value("wos") ?> AS section_qtdisplayrole,
<? value("total") ?> || ' ' || <? value("wos") ?> AS name,
NULL AS status,
SELECT DISTINCT -1 AS id,
50 AS type,
'0' AS subtype,
- 5 AS section,
+ 6 AS section,
<? value("prs") ?> AS section_qtdisplayrole,
<? value("prs") ?> AS name,
NULL::text AS status,
SELECT pr_id AS id,
55 AS type,
pr_number::text || '-' || pr_subnumber::text AS subtype,
- 5 AS section,
+ 6 AS section,
<? value("prs") ?> AS section_qtdisplayrole,
pr_number::text || '-' || pr_subnumber::text AS name,
<? value("open") ?> AS status,
SELECT -1 AS id,
59 AS type,
MAX(pr_number::text || '-' || pr_subnumber::text) AS subtype,
- 5 AS section,
+ 6 AS section,
<? value("prs") ?> AS section_qtdisplayrole,
<? value("total") ?> || ' ' || <? value("prs") ?> AS name,
NULL AS status,
SELECT DISTINCT -1 AS id,
60 AS type,
'0' AS subtype,
- 6 AS section,
+ 7 AS section,
<? value("pos") ?> AS section_qtdisplayrole,
<? value("pos") ?> AS name,
NULL::text AS status,
SELECT pohead_id AS id,
65 AS type,
pohead_number::text AS subtype,
- 6 AS section,
+ 7 AS section,
<? value("pos") ?> AS section_qtdisplayrole,
pohead_number::text AS name,
CASE WHEN (pohead_status = 'U') THEN
SELECT poitem_id AS id,
67 AS type,
pohead_number::text AS subtype,
- 6 AS section,
+ 7 AS section,
<? value("pos") ?> AS section_qtdisplayrole,
poitem_linenumber::text AS name,
CASE WHEN (poitem_status = 'U') THEN
SELECT pohead_id AS id,
68 AS type,
pohead_number::text AS subtype,
- 6 AS section,
+ 7 AS section,
<? value("pos") ?> AS section_qtdisplayrole,
<? value("total") ?> AS name,
NULL AS status,
SELECT -1 AS id,
69 AS type,
MAX(pohead_number::text) AS subtype,
- 6 AS section,
+ 7 AS section,
<? value("sos") ?> AS section_qtdisplayrole,
<? value("total") ?> || ' ' || <? value("pos") ?> AS name,
NULL AS status,